@acorex/data-grid 6.5.23 → 6.5.27
Sign up to get free protection for your applications and to get access to all the features.
- package/karma.conf.js +32 -0
- package/ng-package.json +12 -0
- package/package.json +16 -36
- package/src/lib/data-grid/columns/check-column.component.ts +113 -0
- package/src/lib/data-grid/columns/column.component.ts +182 -0
- package/src/lib/data-grid/columns/command-column.component.ts +101 -0
- package/src/lib/data-grid/columns/date-column.component.ts +118 -0
- package/src/lib/data-grid/columns/row-number-column.component.ts +36 -0
- package/src/lib/data-grid/columns/selection-column.component.ts +39 -0
- package/src/lib/data-grid/columns/text-column.component.ts +92 -0
- package/src/lib/data-grid/datagrid.component.html +27 -0
- package/src/lib/data-grid/datagrid.component.ts +769 -0
- package/{lib/data-grid/datagrid.events.d.ts → src/lib/data-grid/datagrid.events.ts} +4 -1
- package/src/lib/data-grid/datagrid.module.ts +81 -0
- package/src/lib/data-grid/filters/filter.component.ts +21 -0
- package/src/lib/data-grid/templates/cell-template.component.ts +47 -0
- package/src/lib/data-grid/templates/detail-template.component.ts +43 -0
- package/src/lib/data-grid/templates/row-template.component.ts +41 -0
- package/src/lib/data-lov/data-lov-popup/data-lov-popup.component.html +16 -0
- package/src/lib/data-lov/data-lov-popup/data-lov-popup.component.ts +130 -0
- package/src/lib/data-lov/data-lov.component.html +61 -0
- package/src/lib/data-lov/data-lov.component.ts +184 -0
- package/src/lib/data-lov/data-lov.module.ts +16 -0
- package/{public-api.d.ts → src/public-api.ts} +3 -0
- package/src/test.ts +28 -0
- package/tsconfig.lib.json +23 -0
- package/tsconfig.lib.prod.json +6 -0
- package/tsconfig.spec.json +17 -0
- package/tslint.json +17 -0
- package/acorex-data-grid.d.ts +0 -5
- package/esm2020/acorex-data-grid.mjs +0 -5
- package/esm2020/lib/data-grid/columns/check-column.component.mjs +0 -117
- package/esm2020/lib/data-grid/columns/column.component.mjs +0 -164
- package/esm2020/lib/data-grid/columns/command-column.component.mjs +0 -115
- package/esm2020/lib/data-grid/columns/date-column.component.mjs +0 -111
- package/esm2020/lib/data-grid/columns/row-number-column.component.mjs +0 -37
- package/esm2020/lib/data-grid/columns/selection-column.component.mjs +0 -42
- package/esm2020/lib/data-grid/columns/text-column.component.mjs +0 -89
- package/esm2020/lib/data-grid/datagrid.component.mjs +0 -667
- package/esm2020/lib/data-grid/datagrid.events.mjs +0 -2
- package/esm2020/lib/data-grid/datagrid.module.mjs +0 -145
- package/esm2020/lib/data-grid/filters/filter.component.mjs +0 -39
- package/esm2020/lib/data-grid/templates/cell-template.component.mjs +0 -53
- package/esm2020/lib/data-grid/templates/detail-template.component.mjs +0 -46
- package/esm2020/lib/data-grid/templates/row-template.component.mjs +0 -43
- package/esm2020/lib/data-lov/data-lov-popup/data-lov-popup.component.mjs +0 -114
- package/esm2020/lib/data-lov/data-lov.component.mjs +0 -165
- package/esm2020/lib/data-lov/data-lov.module.mjs +0 -23
- package/esm2020/public-api.mjs +0 -18
- package/fesm2015/acorex-data-grid.mjs +0 -1881
- package/fesm2015/acorex-data-grid.mjs.map +0 -1
- package/fesm2020/acorex-data-grid.mjs +0 -1881
- package/fesm2020/acorex-data-grid.mjs.map +0 -1
- package/lib/data-grid/columns/check-column.component.d.ts +0 -37
- package/lib/data-grid/columns/column.component.d.ts +0 -32
- package/lib/data-grid/columns/command-column.component.d.ts +0 -27
- package/lib/data-grid/columns/date-column.component.d.ts +0 -32
- package/lib/data-grid/columns/row-number-column.component.d.ts +0 -10
- package/lib/data-grid/columns/selection-column.component.d.ts +0 -12
- package/lib/data-grid/columns/text-column.component.d.ts +0 -25
- package/lib/data-grid/datagrid.component.d.ts +0 -142
- package/lib/data-grid/datagrid.module.d.ts +0 -23
- package/lib/data-grid/filters/filter.component.d.ts +0 -5
- package/lib/data-grid/templates/cell-template.component.d.ts +0 -22
- package/lib/data-grid/templates/detail-template.component.d.ts +0 -21
- package/lib/data-grid/templates/row-template.component.d.ts +0 -20
- package/lib/data-lov/data-lov-popup/data-lov-popup.component.d.ts +0 -33
- package/lib/data-lov/data-lov.component.d.ts +0 -43
- package/lib/data-lov/data-lov.module.d.ts +0 -12
@@ -1,1881 +0,0 @@
|
|
1
|
-
import * as i0 from '@angular/core';
|
2
|
-
import { TemplateRef, Component, ContentChild, Directive, Input, ViewEncapsulation, ChangeDetectionStrategy, ViewContainerRef, ViewChild, EventEmitter, Output, ElementRef, ContentChildren, NgModule } from '@angular/core';
|
3
|
-
import { AXConfig, AXDateTime, AXTranslator, AXCoreModule } from '@acorex/core';
|
4
|
-
import * as i1 from '@angular/common';
|
5
|
-
import { CommonModule } from '@angular/common';
|
6
|
-
import * as i1$1 from '@acorex/components';
|
7
|
-
import { AXDatePickerComponent, AXTextBoxComponent, AXValueEvent, AXDataEvent, AXToolbarSearchComponent, AXToolbarComponent, AXDataSourceComponent, AXTextBoxModule, AXCheckBoxModule, AXSelectBoxModule, AXDataSourceModule, AXButtonModule, AXDatePickerModule, AXBasePopupPageComponent, AXValidatableComponent, AXValidation, AXToolbarModule, AXSearchBoxModule } from '@acorex/components';
|
8
|
-
import { LicenseManager } from 'ag-grid-enterprise';
|
9
|
-
import * as i1$2 from 'ag-grid-angular';
|
10
|
-
import { AgGridModule } from 'ag-grid-angular';
|
11
|
-
import { FormsModule } from '@angular/forms';
|
12
|
-
|
13
|
-
class AXDataGridCellTemplateComponent {
|
14
|
-
constructor() {
|
15
|
-
this.renderer = AXDataGridCellTemplateRenderer;
|
16
|
-
}
|
17
|
-
ngOnInit() {
|
18
|
-
this.params = {
|
19
|
-
templateRef: this.templateRef
|
20
|
-
};
|
21
|
-
}
|
22
|
-
}
|
23
|
-
AXDataGridCellTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXDataGridCellTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
24
|
-
AXDataGridCellTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXDataGridCellTemplateComponent, selector: "ax-cell-template", queries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true, static: true }], ngImport: i0, template: `<ng-content></ng-content>
|
25
|
-
`, isInline: true });
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXDataGridCellTemplateComponent, decorators: [{
|
27
|
-
type: Component,
|
28
|
-
args: [{
|
29
|
-
selector: 'ax-cell-template',
|
30
|
-
template: `<ng-content></ng-content>
|
31
|
-
`
|
32
|
-
}]
|
33
|
-
}], ctorParameters: function () { return []; }, propDecorators: { templateRef: [{
|
34
|
-
type: ContentChild,
|
35
|
-
args: [TemplateRef, { static: true }]
|
36
|
-
}] } });
|
37
|
-
class AXDataGridCellTemplateRenderer {
|
38
|
-
constructor() { }
|
39
|
-
agInit(params) {
|
40
|
-
this.rowData = params.data;
|
41
|
-
this.templateRef = params.templateRef;
|
42
|
-
}
|
43
|
-
refresh(params) {
|
44
|
-
this.rowData = params.data;
|
45
|
-
return true;
|
46
|
-
}
|
47
|
-
}
|
48
|
-
AXDataGridCellTemplateRenderer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXDataGridCellTemplateRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
49
|
-
AXDataGridCellTemplateRenderer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXDataGridCellTemplateRenderer, selector: "ng-component", ngImport: i0, template: `
|
50
|
-
<ng-container *ngTemplateOutlet='templateRef; context: { $implicit: rowData }'>
|
51
|
-
</ng-container>
|
52
|
-
`, isInline: true, directives: [{ type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
53
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXDataGridCellTemplateRenderer, decorators: [{
|
54
|
-
type: Component,
|
55
|
-
args: [{
|
56
|
-
template: `
|
57
|
-
<ng-container *ngTemplateOutlet='templateRef; context: { $implicit: rowData }'>
|
58
|
-
</ng-container>
|
59
|
-
`
|
60
|
-
}]
|
61
|
-
}], ctorParameters: function () { return []; } });
|
62
|
-
|
63
|
-
class AXGridDataColumn {
|
64
|
-
constructor() {
|
65
|
-
this.width = 100;
|
66
|
-
this.pinned = null;
|
67
|
-
this.allowSorting = true;
|
68
|
-
this.allowFiltering = AXConfig.get('datagrid.allowFiltering') || false;
|
69
|
-
this.sort = null;
|
70
|
-
this.field = '';
|
71
|
-
this.caption = '';
|
72
|
-
this.checkbox = false;
|
73
|
-
this.headerCheckbox = false;
|
74
|
-
this.groupIndex = -1;
|
75
|
-
this.treeIndex = -1;
|
76
|
-
this.enableRowGroup = false;
|
77
|
-
this.hide = false;
|
78
|
-
this.floatingFilter = AXConfig.get('datagrid.floatingFilter') || false;
|
79
|
-
this.disableMenu = false;
|
80
|
-
this.resizable = true;
|
81
|
-
this.menuColumnDisable = false;
|
82
|
-
this.menuItemDisable = false;
|
83
|
-
}
|
84
|
-
;
|
85
|
-
render() {
|
86
|
-
const col = {
|
87
|
-
field: this.field,
|
88
|
-
width: this.width,
|
89
|
-
};
|
90
|
-
col.resizable = this.resizable;
|
91
|
-
col.suppressMenu = this.disableMenu;
|
92
|
-
col.menuTabs = ['filterMenuTab', 'columnsMenuTab', 'generalMenuTab'];
|
93
|
-
col.floatingFilter = this.floatingFilter;
|
94
|
-
if (!this.allowFiltering) {
|
95
|
-
col.filter = false;
|
96
|
-
col.menuTabs = col.menuTabs.filter(c => c != 'filterMenuTab');
|
97
|
-
col.floatingFilter = false;
|
98
|
-
}
|
99
|
-
if (this.menuColumnDisable == true) {
|
100
|
-
col.menuTabs = col.menuTabs.filter(c => c != 'columnsMenuTab');
|
101
|
-
}
|
102
|
-
if (this.menuItemDisable == true) {
|
103
|
-
col.menuTabs = col.menuTabs.filter(c => c != 'generalMenuTab');
|
104
|
-
}
|
105
|
-
if (this.caption) {
|
106
|
-
col.headerName = this.caption;
|
107
|
-
}
|
108
|
-
if (this.minWidth) {
|
109
|
-
col.minWidth = this.minWidth;
|
110
|
-
}
|
111
|
-
if (this.maxWidth) {
|
112
|
-
col.maxWidth = this.maxWidth;
|
113
|
-
}
|
114
|
-
if (this.pinned) {
|
115
|
-
col.pinned = this.pinned === 'start' ? 'right' : 'left';
|
116
|
-
// TODO: Change based on layout
|
117
|
-
}
|
118
|
-
if (this.allowSorting) {
|
119
|
-
col.sortable = this.allowSorting;
|
120
|
-
}
|
121
|
-
if (this.sort) {
|
122
|
-
col.sort = this.sort;
|
123
|
-
}
|
124
|
-
if (this.groupIndex >= 0) {
|
125
|
-
col.rowGroupIndex = this.groupIndex;
|
126
|
-
col.rowGroup = true;
|
127
|
-
this.enableRowGroup = true;
|
128
|
-
}
|
129
|
-
if (this.treeIndex >= 0) {
|
130
|
-
col.rowGroupIndex = this.treeIndex;
|
131
|
-
col.rowGroup = false;
|
132
|
-
}
|
133
|
-
if (this.hide) {
|
134
|
-
col.hide = true;
|
135
|
-
}
|
136
|
-
if (this.enableRowGroup) {
|
137
|
-
col.enableRowGroup = this.enableRowGroup;
|
138
|
-
}
|
139
|
-
if (this.cellClass) {
|
140
|
-
const THAT = this;
|
141
|
-
if (this.cellClass instanceof Function) {
|
142
|
-
col.cellClass = (p) => {
|
143
|
-
return THAT.cellClass({
|
144
|
-
column: THAT,
|
145
|
-
rowIndex: p.node.rowIndex,
|
146
|
-
rowLevel: p.node.level,
|
147
|
-
data: p.data,
|
148
|
-
value: p.value
|
149
|
-
});
|
150
|
-
};
|
151
|
-
}
|
152
|
-
else {
|
153
|
-
col.cellClass = this.cellClass;
|
154
|
-
}
|
155
|
-
}
|
156
|
-
//
|
157
|
-
if (this.cellTemplate != null) {
|
158
|
-
col.cellRendererFramework = this.cellTemplate.renderer;
|
159
|
-
col.cellRendererParams = this.cellTemplate.params;
|
160
|
-
}
|
161
|
-
if (this.checkbox) {
|
162
|
-
col.checkboxSelection = (params) => {
|
163
|
-
return true;
|
164
|
-
};
|
165
|
-
// col.headerCheckboxSelection = this.headerCheckbox;
|
166
|
-
}
|
167
|
-
return col;
|
168
|
-
}
|
169
|
-
}
|
170
|
-
AXGridDataColumn.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXGridDataColumn, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
171
|
-
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 });
|
172
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXGridDataColumn, decorators: [{
|
173
|
-
type: Directive
|
174
|
-
}], ctorParameters: function () { return []; }, propDecorators: { cellTemplate: [{
|
175
|
-
type: ContentChild,
|
176
|
-
args: [AXDataGridCellTemplateComponent]
|
177
|
-
}], width: [{
|
178
|
-
type: Input
|
179
|
-
}], maxWidth: [{
|
180
|
-
type: Input
|
181
|
-
}], minWidth: [{
|
182
|
-
type: Input
|
183
|
-
}], pinned: [{
|
184
|
-
type: Input
|
185
|
-
}], allowSorting: [{
|
186
|
-
type: Input
|
187
|
-
}], allowFiltering: [{
|
188
|
-
type: Input
|
189
|
-
}], cellClass: [{
|
190
|
-
type: Input
|
191
|
-
}], sort: [{
|
192
|
-
type: Input
|
193
|
-
}], field: [{
|
194
|
-
type: Input
|
195
|
-
}], caption: [{
|
196
|
-
type: Input
|
197
|
-
}], cellRendererParams: [{
|
198
|
-
type: Input
|
199
|
-
}], checkbox: [{
|
200
|
-
type: Input
|
201
|
-
}], headerCheckbox: [{
|
202
|
-
type: Input
|
203
|
-
}], groupIndex: [{
|
204
|
-
type: Input
|
205
|
-
}], treeIndex: [{
|
206
|
-
type: Input
|
207
|
-
}], enableRowGroup: [{
|
208
|
-
type: Input
|
209
|
-
}], hide: [{
|
210
|
-
type: Input
|
211
|
-
}], floatingFilter: [{
|
212
|
-
type: Input
|
213
|
-
}], disableMenu: [{
|
214
|
-
type: Input
|
215
|
-
}], resizable: [{
|
216
|
-
type: Input
|
217
|
-
}], menuColumnDisable: [{
|
218
|
-
type: Input
|
219
|
-
}], menuItemDisable: [{
|
220
|
-
type: Input
|
221
|
-
}] } });
|
222
|
-
|
223
|
-
class AXDataGridFilterComponent {
|
224
|
-
}
|
225
|
-
AXDataGridFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXDataGridFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
226
|
-
AXDataGridFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXDataGridFilterComponent, selector: "ax-data-grid-filter", ngImport: i0, template: `
|
227
|
-
<div class='ax-grid-filter-container'>
|
228
|
-
<ng-content></ng-content>
|
229
|
-
<div class='btn-group' role='group'>
|
230
|
-
<button type='button' class='btn btn-primary btn-sm'>
|
231
|
-
<i class='fas fa-filter'></i>
|
232
|
-
</button>
|
233
|
-
<button type='button' class='btn btn-danger btn-sm'>
|
234
|
-
<i class='fas fa-trash-alt'></i>
|
235
|
-
</button>
|
236
|
-
</div>
|
237
|
-
</div>
|
238
|
-
`, isInline: true, encapsulation: i0.ViewEncapsulation.None });
|
239
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXDataGridFilterComponent, decorators: [{
|
240
|
-
type: Component,
|
241
|
-
args: [{
|
242
|
-
selector: 'ax-data-grid-filter',
|
243
|
-
template: `
|
244
|
-
<div class='ax-grid-filter-container'>
|
245
|
-
<ng-content></ng-content>
|
246
|
-
<div class='btn-group' role='group'>
|
247
|
-
<button type='button' class='btn btn-primary btn-sm'>
|
248
|
-
<i class='fas fa-filter'></i>
|
249
|
-
</button>
|
250
|
-
<button type='button' class='btn btn-danger btn-sm'>
|
251
|
-
<i class='fas fa-trash-alt'></i>
|
252
|
-
</button>
|
253
|
-
</div>
|
254
|
-
</div>
|
255
|
-
`,
|
256
|
-
encapsulation: ViewEncapsulation.None
|
257
|
-
}]
|
258
|
-
}] });
|
259
|
-
|
260
|
-
class AXGridCheckColumn extends AXGridDataColumn {
|
261
|
-
constructor() {
|
262
|
-
super();
|
263
|
-
}
|
264
|
-
render() {
|
265
|
-
const col = super.render();
|
266
|
-
if (!col.cellRendererFramework) {
|
267
|
-
col.cellRendererFramework = BooleanRenderer;
|
268
|
-
}
|
269
|
-
if (this.allowFiltering) {
|
270
|
-
col.filterFramework = BooleanFilterRenderer;
|
271
|
-
}
|
272
|
-
return col;
|
273
|
-
}
|
274
|
-
}
|
275
|
-
AXGridCheckColumn.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXGridCheckColumn, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
276
|
-
AXGridCheckColumn.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXGridCheckColumn, selector: "ax-check-column", providers: [{ provide: AXGridDataColumn, useExisting: AXGridCheckColumn }], usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
277
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXGridCheckColumn, decorators: [{
|
278
|
-
type: Component,
|
279
|
-
args: [{
|
280
|
-
selector: 'ax-check-column',
|
281
|
-
template: '',
|
282
|
-
providers: [{ provide: AXGridDataColumn, useExisting: AXGridCheckColumn }],
|
283
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
284
|
-
}]
|
285
|
-
}], ctorParameters: function () { return []; } });
|
286
|
-
class BooleanRenderer {
|
287
|
-
constructor() { }
|
288
|
-
agInit(params) {
|
289
|
-
this.value = params.value;
|
290
|
-
}
|
291
|
-
refresh(params) {
|
292
|
-
this.value = params.value;
|
293
|
-
return true;
|
294
|
-
}
|
295
|
-
}
|
296
|
-
BooleanRenderer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BooleanRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
297
|
-
BooleanRenderer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: BooleanRenderer, selector: "ng-component", ngImport: i0, template: `
|
298
|
-
<ax-check-box [value]='value' readonly='true'></ax-check-box>
|
299
|
-
`, isInline: true, components: [{ type: i1$1.AXCheckBoxComponent, selector: "ax-check-box", inputs: ["readonly", "disabled", "size", "label", "tabIndex", "indeterminate", "value"], outputs: ["onValueChanged", "valueChange", "onClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
300
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BooleanRenderer, decorators: [{
|
301
|
-
type: Component,
|
302
|
-
args: [{
|
303
|
-
template: `
|
304
|
-
<ax-check-box [value]='value' readonly='true'></ax-check-box>
|
305
|
-
`,
|
306
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
307
|
-
}]
|
308
|
-
}], ctorParameters: function () { return []; } });
|
309
|
-
class BooleanFilterRenderer {
|
310
|
-
constructor() {
|
311
|
-
this.value = null;
|
312
|
-
this.selectItem = [
|
313
|
-
{ value: 0, label: 'True' },
|
314
|
-
{ value: 1, label: 'False' },
|
315
|
-
];
|
316
|
-
}
|
317
|
-
agInit(params) {
|
318
|
-
this.params = params;
|
319
|
-
this.valueGetter = (params.valueGetter);
|
320
|
-
}
|
321
|
-
isFilterActive() {
|
322
|
-
return this.value !== null && this.value !== undefined;
|
323
|
-
}
|
324
|
-
doesFilterPass(params) {
|
325
|
-
return this.value === this.valueGetter(params.node);
|
326
|
-
}
|
327
|
-
getModel() {
|
328
|
-
return { value: this.value };
|
329
|
-
}
|
330
|
-
setModel(model) {
|
331
|
-
this.value = model ? model.value : null;
|
332
|
-
}
|
333
|
-
ngAfterViewInit(params) {
|
334
|
-
window.setTimeout(() => {
|
335
|
-
this.input.element.nativeElement.focus();
|
336
|
-
});
|
337
|
-
}
|
338
|
-
onChange(newValue) {
|
339
|
-
if (this.value !== newValue) {
|
340
|
-
this.value = newValue;
|
341
|
-
this.params.filterChangedCallback();
|
342
|
-
}
|
343
|
-
}
|
344
|
-
}
|
345
|
-
BooleanFilterRenderer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BooleanFilterRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
346
|
-
BooleanFilterRenderer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: BooleanFilterRenderer, selector: "ng-component", viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: `
|
347
|
-
<ax-data-grid-filter>
|
348
|
-
<ax-select-box
|
349
|
-
label='Select Box'
|
350
|
-
[items]='selectItem'
|
351
|
-
></ax-select-box>
|
352
|
-
</ax-data-grid-filter>
|
353
|
-
`, isInline: true, components: [{ type: AXDataGridFilterComponent, selector: "ax-data-grid-filter" }, { type: i1$1.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["showDropDownButton", "rowInputTemplate", "showCheckBox", "readonly", "rtl", "disabled", "placeholder", "size", "allowNull", "textAlign", "bufferSize", "remoteOperation", "fitParent", "dropdownWidth", "dataSource", "validation", "disabledCallback", "allowSearch", "textField", "valueField", "disabledField", "mode", "items", "selectedItems", "selectedValues"], outputs: ["dropdownToggle", "itemsChange", "onBlur", "onFocus", "selectionChanged", "selectedItemsChange", "selectedValuesChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
354
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BooleanFilterRenderer, decorators: [{
|
355
|
-
type: Component,
|
356
|
-
args: [{
|
357
|
-
template: `
|
358
|
-
<ax-data-grid-filter>
|
359
|
-
<ax-select-box
|
360
|
-
label='Select Box'
|
361
|
-
[items]='selectItem'
|
362
|
-
></ax-select-box>
|
363
|
-
</ax-data-grid-filter>
|
364
|
-
`,
|
365
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
366
|
-
}]
|
367
|
-
}], propDecorators: { input: [{
|
368
|
-
type: ViewChild,
|
369
|
-
args: ['input', { static: true, read: ViewContainerRef }]
|
370
|
-
}] } });
|
371
|
-
|
372
|
-
class AXGridCommandColumn extends AXGridDataColumn {
|
373
|
-
constructor() {
|
374
|
-
super(...arguments);
|
375
|
-
this.items = [];
|
376
|
-
this.onItemClick = new EventEmitter();
|
377
|
-
}
|
378
|
-
render() {
|
379
|
-
const col = super.render();
|
380
|
-
if (!col.cellRendererFramework) {
|
381
|
-
col.cellRendererFramework = CommandRenderer;
|
382
|
-
}
|
383
|
-
col.cellRendererParams = {
|
384
|
-
items: this.items,
|
385
|
-
onClick: (e) => {
|
386
|
-
this.onItemClick.emit({
|
387
|
-
command: e.name,
|
388
|
-
data: e.data,
|
389
|
-
rowIndex: e.rowIndex,
|
390
|
-
rowLevel: e.rowLevel,
|
391
|
-
htmlEvent: e.htmlEvent
|
392
|
-
});
|
393
|
-
}
|
394
|
-
};
|
395
|
-
col.sortable = false;
|
396
|
-
col.filter = false;
|
397
|
-
col.valueGetter = (params) => {
|
398
|
-
return this.items;
|
399
|
-
};
|
400
|
-
return col;
|
401
|
-
}
|
402
|
-
}
|
403
|
-
AXGridCommandColumn.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXGridCommandColumn, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
404
|
-
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 });
|
405
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXGridCommandColumn, decorators: [{
|
406
|
-
type: Component,
|
407
|
-
args: [{
|
408
|
-
selector: 'ax-command-column',
|
409
|
-
template: '',
|
410
|
-
providers: [{ provide: AXGridDataColumn, useExisting: AXGridCommandColumn }],
|
411
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
412
|
-
encapsulation: ViewEncapsulation.None
|
413
|
-
}]
|
414
|
-
}], propDecorators: { items: [{
|
415
|
-
type: Input
|
416
|
-
}], onItemClick: [{
|
417
|
-
type: Output
|
418
|
-
}] } });
|
419
|
-
class CommandRenderer {
|
420
|
-
constructor() {
|
421
|
-
this.items = [];
|
422
|
-
}
|
423
|
-
agInit(params) {
|
424
|
-
this.mapParams(params);
|
425
|
-
}
|
426
|
-
refresh(params) {
|
427
|
-
this.mapParams(params);
|
428
|
-
return true;
|
429
|
-
}
|
430
|
-
mapParams(params) {
|
431
|
-
this.node = params.node;
|
432
|
-
this.items = typeof params.items == 'function' ? params.items({ data: this.node.data }) : Array.isArray(params.items) ? params.items : [];
|
433
|
-
this.clickCallback = params.onClick;
|
434
|
-
}
|
435
|
-
onClick(item, e) {
|
436
|
-
if (this.clickCallback && !item.disable) {
|
437
|
-
this.clickCallback({
|
438
|
-
name: item.name,
|
439
|
-
rowLevel: this.node.level,
|
440
|
-
rowIndex: this.node.rowIndex,
|
441
|
-
data: this.node.data,
|
442
|
-
htmlEvent: e
|
443
|
-
});
|
444
|
-
}
|
445
|
-
}
|
446
|
-
}
|
447
|
-
CommandRenderer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CommandRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
448
|
-
CommandRenderer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: CommandRenderer, selector: "ax-command-cell", ngImport: i0, template: `
|
449
|
-
<button
|
450
|
-
*ngFor="let item of items; let i = index"
|
451
|
-
class="ax button md ax-grid-command-button {{ item.style || 'ax primary blank' }}"
|
452
|
-
[class.disabled]="item.disable"
|
453
|
-
type="button"
|
454
|
-
[title]="item.tooltip"
|
455
|
-
[attr.tabindex]="i"
|
456
|
-
(click)="onClick(item, $event)"
|
457
|
-
>
|
458
|
-
<i [ngClass]="item.icon"></i>{{ item.text }}
|
459
|
-
</button>
|
460
|
-
`, 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 });
|
461
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CommandRenderer, decorators: [{
|
462
|
-
type: Component,
|
463
|
-
args: [{
|
464
|
-
selector: 'ax-command-cell',
|
465
|
-
template: `
|
466
|
-
<button
|
467
|
-
*ngFor="let item of items; let i = index"
|
468
|
-
class="ax button md ax-grid-command-button {{ item.style || 'ax primary blank' }}"
|
469
|
-
[class.disabled]="item.disable"
|
470
|
-
type="button"
|
471
|
-
[title]="item.tooltip"
|
472
|
-
[attr.tabindex]="i"
|
473
|
-
(click)="onClick(item, $event)"
|
474
|
-
>
|
475
|
-
<i [ngClass]="item.icon"></i>{{ item.text }}
|
476
|
-
</button>
|
477
|
-
`,
|
478
|
-
encapsulation: ViewEncapsulation.None,
|
479
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
480
|
-
}]
|
481
|
-
}], ctorParameters: function () { return []; } });
|
482
|
-
|
483
|
-
class AXGridDateColumn extends AXGridDataColumn {
|
484
|
-
constructor() {
|
485
|
-
super();
|
486
|
-
this.type = AXConfig.get('dateTime.type');
|
487
|
-
}
|
488
|
-
render() {
|
489
|
-
const col = super.render();
|
490
|
-
col.cellRendererParams = {
|
491
|
-
format: this.format,
|
492
|
-
};
|
493
|
-
col.comparator = (valueA, valueB) => {
|
494
|
-
const date1 = AXDateTime.convert(valueA);
|
495
|
-
const date2 = AXDateTime.convert(valueB);
|
496
|
-
//
|
497
|
-
if (date1 === null && date2 === null) {
|
498
|
-
return 0;
|
499
|
-
}
|
500
|
-
if (date1 === null) {
|
501
|
-
return -1;
|
502
|
-
}
|
503
|
-
if (date2 === null) {
|
504
|
-
return 1;
|
505
|
-
}
|
506
|
-
return (date1.date.getTime() - date2.date.getTime());
|
507
|
-
};
|
508
|
-
col.valueFormatter = (params) => {
|
509
|
-
const date = AXDateTime.convert(params.value, this.type);
|
510
|
-
if (date) {
|
511
|
-
return date.format(this.format);
|
512
|
-
}
|
513
|
-
else {
|
514
|
-
return null;
|
515
|
-
}
|
516
|
-
};
|
517
|
-
col.filter = 'agDateColumnFilter';
|
518
|
-
// col.floatingFilter = true;
|
519
|
-
return col;
|
520
|
-
}
|
521
|
-
}
|
522
|
-
AXGridDateColumn.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXGridDateColumn, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
523
|
-
AXGridDateColumn.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXGridDateColumn, selector: "ax-date-column", inputs: { format: "format", type: "type" }, providers: [{ provide: AXGridDataColumn, useExisting: AXGridDateColumn }], usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
524
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXGridDateColumn, decorators: [{
|
525
|
-
type: Component,
|
526
|
-
args: [{
|
527
|
-
selector: 'ax-date-column',
|
528
|
-
template: '',
|
529
|
-
providers: [{ provide: AXGridDataColumn, useExisting: AXGridDateColumn }],
|
530
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
531
|
-
}]
|
532
|
-
}], ctorParameters: function () { return []; }, propDecorators: { format: [{
|
533
|
-
type: Input
|
534
|
-
}], type: [{
|
535
|
-
type: Input
|
536
|
-
}] } });
|
537
|
-
class AXDatePickerFilterComponent {
|
538
|
-
constructor() {
|
539
|
-
this.selectableHoliday = false;
|
540
|
-
this.type = 'jalali';
|
541
|
-
}
|
542
|
-
agInit(params) {
|
543
|
-
this.params = params;
|
544
|
-
}
|
545
|
-
ngAfterViewInit() {
|
546
|
-
}
|
547
|
-
ngOnDestroy() {
|
548
|
-
}
|
549
|
-
onDateChanged(selectedDates) {
|
550
|
-
//this.date = selectedDates[0] || null;
|
551
|
-
this.params.onDateChanged();
|
552
|
-
}
|
553
|
-
getDate() {
|
554
|
-
return this.date;
|
555
|
-
}
|
556
|
-
setDate(date) {
|
557
|
-
this.date = date || null;
|
558
|
-
//this.picker.setDate(date);
|
559
|
-
}
|
560
|
-
setInputPlaceholder(placeholder) {
|
561
|
-
//this.div.nativeElement.setAttribute('placeholder', placeholder);
|
562
|
-
}
|
563
|
-
onValueChanged(e) {
|
564
|
-
this.setDate(e.value);
|
565
|
-
this.onDateChanged(e.value);
|
566
|
-
}
|
567
|
-
}
|
568
|
-
AXDatePickerFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXDatePickerFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
569
|
-
AXDatePickerFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXDatePickerFilterComponent, selector: "ax-data-picker-filter", viewQueries: [{ propertyName: "datePicker", first: true, predicate: AXDatePickerComponent, descendants: true }, { propertyName: "div", first: true, predicate: ["div"], descendants: true, read: ElementRef }], ngImport: i0, template: `<ax-date-picker [selectableHoliday]="selectableHoliday" [allowClear]="true" (onValueChanged)="onValueChanged($event)" size="sm">
|
570
|
-
</ax-date-picker>`, isInline: true, components: [{ type: i1$1.AXDatePickerComponent, selector: "ax-date-picker", inputs: ["dayStyle", "dayMinMaxResoan", "validation", "placeholder", "min", "max", "readonly", "disabled", "allowClear", "textAlign", "showToday", "selectableHoliday", "dateType", "showTodayButton", "openByClick", "size", "type", "value"], outputs: ["typeChange", "onValueChanged", "valueChange"] }], encapsulation: i0.ViewEncapsulation.None });
|
571
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXDatePickerFilterComponent, decorators: [{
|
572
|
-
type: Component,
|
573
|
-
args: [{
|
574
|
-
selector: 'ax-data-picker-filter',
|
575
|
-
template: `<ax-date-picker [selectableHoliday]="selectableHoliday" [allowClear]="true" (onValueChanged)="onValueChanged($event)" size="sm">
|
576
|
-
</ax-date-picker>`,
|
577
|
-
host: {},
|
578
|
-
encapsulation: ViewEncapsulation.None
|
579
|
-
}]
|
580
|
-
}], propDecorators: { datePicker: [{
|
581
|
-
type: ViewChild,
|
582
|
-
args: [AXDatePickerComponent]
|
583
|
-
}], div: [{
|
584
|
-
type: ViewChild,
|
585
|
-
args: ['div', { read: ElementRef }]
|
586
|
-
}] } });
|
587
|
-
|
588
|
-
class AXGridSelectionColumn extends AXGridDataColumn {
|
589
|
-
constructor() {
|
590
|
-
super();
|
591
|
-
this.pinned = 'start';
|
592
|
-
this.width = 40;
|
593
|
-
}
|
594
|
-
ngOnInit() { }
|
595
|
-
render() {
|
596
|
-
const col = super.render();
|
597
|
-
col.checkboxSelection = this.condition ? this.condition : true;
|
598
|
-
// col.headerCheckboxSelection = true;
|
599
|
-
col.pinned = this.pinned === 'start' ? 'right' : 'left';
|
600
|
-
col.filter = false;
|
601
|
-
col.resizable = true;
|
602
|
-
col.sortable = false;
|
603
|
-
col.minWidth = 5;
|
604
|
-
col.width = this.width;
|
605
|
-
col.floatingFilter = false;
|
606
|
-
return col;
|
607
|
-
}
|
608
|
-
}
|
609
|
-
AXGridSelectionColumn.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXGridSelectionColumn, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
610
|
-
AXGridSelectionColumn.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXGridSelectionColumn, selector: "ax-selection-column", inputs: { condition: "condition", pinned: "pinned", width: "width" }, providers: [{ provide: AXGridDataColumn, useExisting: AXGridSelectionColumn }], usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
611
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXGridSelectionColumn, decorators: [{
|
612
|
-
type: Component,
|
613
|
-
args: [{
|
614
|
-
selector: 'ax-selection-column',
|
615
|
-
template: '',
|
616
|
-
providers: [{ provide: AXGridDataColumn, useExisting: AXGridSelectionColumn }],
|
617
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
618
|
-
}]
|
619
|
-
}], ctorParameters: function () { return []; }, propDecorators: { condition: [{
|
620
|
-
type: Input
|
621
|
-
}], pinned: [{
|
622
|
-
type: Input
|
623
|
-
}], width: [{
|
624
|
-
type: Input
|
625
|
-
}] } });
|
626
|
-
|
627
|
-
class AXGridTextColumn extends AXGridDataColumn {
|
628
|
-
constructor() {
|
629
|
-
super();
|
630
|
-
}
|
631
|
-
render() {
|
632
|
-
const col = super.render();
|
633
|
-
// if (this.allowFiltering) {
|
634
|
-
// col.filterFramework = TextFilterRenderer;
|
635
|
-
// }
|
636
|
-
col.filter = 'agTextColumnFilter';
|
637
|
-
return col;
|
638
|
-
}
|
639
|
-
}
|
640
|
-
AXGridTextColumn.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXGridTextColumn, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
641
|
-
AXGridTextColumn.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXGridTextColumn, selector: "ax-text-column", providers: [{ provide: AXGridDataColumn, useExisting: AXGridTextColumn }], usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
642
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXGridTextColumn, decorators: [{
|
643
|
-
type: Component,
|
644
|
-
args: [{
|
645
|
-
selector: 'ax-text-column',
|
646
|
-
template: '',
|
647
|
-
providers: [{ provide: AXGridDataColumn, useExisting: AXGridTextColumn }],
|
648
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
649
|
-
}]
|
650
|
-
}], ctorParameters: function () { return []; } });
|
651
|
-
class TextFilterRenderer {
|
652
|
-
constructor() {
|
653
|
-
this.value = null;
|
654
|
-
}
|
655
|
-
agInit(params) {
|
656
|
-
this.params = params;
|
657
|
-
this.valueGetter = (params.valueGetter);
|
658
|
-
}
|
659
|
-
isFilterActive() {
|
660
|
-
return this.value !== null && this.value !== undefined;
|
661
|
-
}
|
662
|
-
doesFilterPass(params) {
|
663
|
-
return this.value === this.valueGetter(params.node);
|
664
|
-
}
|
665
|
-
getModel() {
|
666
|
-
return { value: this.value };
|
667
|
-
}
|
668
|
-
setModel(model) {
|
669
|
-
;
|
670
|
-
this.onChange(model ? model.value : null);
|
671
|
-
}
|
672
|
-
ngAfterViewInit(params) {
|
673
|
-
window.setTimeout(() => {
|
674
|
-
this.input.focus();
|
675
|
-
});
|
676
|
-
}
|
677
|
-
onChange(newValue) {
|
678
|
-
if (this.value !== newValue) {
|
679
|
-
this.value = newValue;
|
680
|
-
if (this.value === '') {
|
681
|
-
this.value = null;
|
682
|
-
}
|
683
|
-
this.params.filterChangedCallback();
|
684
|
-
}
|
685
|
-
}
|
686
|
-
}
|
687
|
-
TextFilterRenderer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TextFilterRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
688
|
-
TextFilterRenderer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: TextFilterRenderer, selector: "ng-component", viewQueries: [{ propertyName: "input", first: true, predicate: AXTextBoxComponent, descendants: true, static: true }], ngImport: i0, template: `
|
689
|
-
<ax-data-grid-filter>
|
690
|
-
<ax-text-box label='Filter' allowClear='true' (textChange)='onChange($event)'>
|
691
|
-
</ax-text-box>
|
692
|
-
</ax-data-grid-filter>
|
693
|
-
`, isInline: true, components: [{ type: AXDataGridFilterComponent, selector: "ax-data-grid-filter" }, { type: i1$1.AXTextBoxComponent, selector: "ax-text-box", inputs: ["mask", "type", "showMask", "maxLength", "maskGuid", "maskPlaceholder", "maskKeepCharPositions"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
694
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TextFilterRenderer, decorators: [{
|
695
|
-
type: Component,
|
696
|
-
args: [{
|
697
|
-
template: `
|
698
|
-
<ax-data-grid-filter>
|
699
|
-
<ax-text-box label='Filter' allowClear='true' (textChange)='onChange($event)'>
|
700
|
-
</ax-text-box>
|
701
|
-
</ax-data-grid-filter>
|
702
|
-
`,
|
703
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
704
|
-
}]
|
705
|
-
}], propDecorators: { input: [{
|
706
|
-
type: ViewChild,
|
707
|
-
args: [AXTextBoxComponent, { static: true }]
|
708
|
-
}] } });
|
709
|
-
|
710
|
-
class AXGridRowNumberColumn extends AXGridDataColumn {
|
711
|
-
constructor() {
|
712
|
-
super();
|
713
|
-
}
|
714
|
-
ngOnInit() { }
|
715
|
-
render() {
|
716
|
-
const col = super.render();
|
717
|
-
// col.checkboxSelection = this.condition ? this.condition : true;
|
718
|
-
// col.headerCheckboxSelection = true;
|
719
|
-
(col.headerName = this.caption ? this.caption : AXConfig.get('layout.rtl') ? 'ردیف' : 'Row'),
|
720
|
-
(col.valueGetter = 'node.rowIndex + 1'),
|
721
|
-
(col.pinned = this.pinned == null ? null : this.pinned === 'start' ? 'right' : 'left'),
|
722
|
-
(col.filter = false);
|
723
|
-
col.resizable = true;
|
724
|
-
col.sortable = false;
|
725
|
-
col.width = this.width;
|
726
|
-
return col;
|
727
|
-
}
|
728
|
-
}
|
729
|
-
AXGridRowNumberColumn.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXGridRowNumberColumn, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
730
|
-
AXGridRowNumberColumn.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXGridRowNumberColumn, selector: "ax-row-number-column", inputs: { condition: "condition" }, providers: [{ provide: AXGridDataColumn, useExisting: AXGridRowNumberColumn }], usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
731
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXGridRowNumberColumn, decorators: [{
|
732
|
-
type: Component,
|
733
|
-
args: [{
|
734
|
-
selector: 'ax-row-number-column',
|
735
|
-
template: '',
|
736
|
-
providers: [{ provide: AXGridDataColumn, useExisting: AXGridRowNumberColumn }],
|
737
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
738
|
-
}]
|
739
|
-
}], ctorParameters: function () { return []; }, propDecorators: { condition: [{
|
740
|
-
type: Input
|
741
|
-
}] } });
|
742
|
-
|
743
|
-
class AXDataGridRowTemplateComponent {
|
744
|
-
constructor() {
|
745
|
-
this.renderer = AXDataGridRowTemplateRenderer;
|
746
|
-
}
|
747
|
-
ngOnInit() {
|
748
|
-
this.params = {
|
749
|
-
templateRef: this.templateRef
|
750
|
-
};
|
751
|
-
}
|
752
|
-
}
|
753
|
-
AXDataGridRowTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXDataGridRowTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
754
|
-
AXDataGridRowTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXDataGridRowTemplateComponent, selector: "ax-row-template", queries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true, static: true }], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
|
755
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXDataGridRowTemplateComponent, decorators: [{
|
756
|
-
type: Component,
|
757
|
-
args: [{
|
758
|
-
selector: 'ax-row-template',
|
759
|
-
template: `<ng-content></ng-content>`
|
760
|
-
}]
|
761
|
-
}], ctorParameters: function () { return []; }, propDecorators: { templateRef: [{
|
762
|
-
type: ContentChild,
|
763
|
-
args: [TemplateRef, { static: true }]
|
764
|
-
}] } });
|
765
|
-
class AXDataGridRowTemplateRenderer {
|
766
|
-
refresh(params) {
|
767
|
-
return false;
|
768
|
-
}
|
769
|
-
agInit(params) {
|
770
|
-
this.data = params.data.callRecords;
|
771
|
-
this.templateRef = params.templateRef;
|
772
|
-
}
|
773
|
-
}
|
774
|
-
AXDataGridRowTemplateRenderer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXDataGridRowTemplateRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
775
|
-
AXDataGridRowTemplateRenderer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXDataGridRowTemplateRenderer, selector: "ng-component", ngImport: i0, template: `<ng-container *ngTemplateOutlet='templateRef; context: { $implicit: data }'></ng-container>`, isInline: true, directives: [{ type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
776
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXDataGridRowTemplateRenderer, decorators: [{
|
777
|
-
type: Component,
|
778
|
-
args: [{
|
779
|
-
template: `<ng-container *ngTemplateOutlet='templateRef; context: { $implicit: data }'></ng-container>`
|
780
|
-
}]
|
781
|
-
}] });
|
782
|
-
|
783
|
-
class AXDataGridDetailTemplateComponent {
|
784
|
-
constructor() {
|
785
|
-
this.height = 100;
|
786
|
-
this.renderer = AXDataGridDetailTemplateRenderer;
|
787
|
-
}
|
788
|
-
ngOnInit() {
|
789
|
-
this.params = {
|
790
|
-
templateRef: this.templateRef
|
791
|
-
};
|
792
|
-
}
|
793
|
-
}
|
794
|
-
AXDataGridDetailTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXDataGridDetailTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
795
|
-
AXDataGridDetailTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXDataGridDetailTemplateComponent, selector: "ax-grid-detail-template", inputs: { height: "height" }, queries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true, static: true }], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
|
796
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXDataGridDetailTemplateComponent, decorators: [{
|
797
|
-
type: Component,
|
798
|
-
args: [{
|
799
|
-
selector: 'ax-grid-detail-template',
|
800
|
-
template: `<ng-content></ng-content>`
|
801
|
-
}]
|
802
|
-
}], ctorParameters: function () { return []; }, propDecorators: { templateRef: [{
|
803
|
-
type: ContentChild,
|
804
|
-
args: [TemplateRef, { static: true }]
|
805
|
-
}], height: [{
|
806
|
-
type: Input
|
807
|
-
}] } });
|
808
|
-
class AXDataGridDetailTemplateRenderer {
|
809
|
-
refresh(params) {
|
810
|
-
return false;
|
811
|
-
}
|
812
|
-
agInit(params) {
|
813
|
-
this.data = params.data;
|
814
|
-
this.templateRef = params.templateRef;
|
815
|
-
}
|
816
|
-
}
|
817
|
-
AXDataGridDetailTemplateRenderer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXDataGridDetailTemplateRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
818
|
-
AXDataGridDetailTemplateRenderer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXDataGridDetailTemplateRenderer, selector: "ng-component", ngImport: i0, template: `<ng-container *ngTemplateOutlet='templateRef; context: { $implicit: data }'></ng-container>`, isInline: true, directives: [{ type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
819
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXDataGridDetailTemplateRenderer, decorators: [{
|
820
|
-
type: Component,
|
821
|
-
args: [{
|
822
|
-
template: `<ng-container *ngTemplateOutlet='templateRef; context: { $implicit: data }'></ng-container>`
|
823
|
-
}]
|
824
|
-
}] });
|
825
|
-
|
826
|
-
LicenseManager.prototype.validateLicense = function () {
|
827
|
-
//console.info('Cracked by Arash Oshnoudi!');
|
828
|
-
};
|
829
|
-
// WatermarkComp.prototype.shouldDisplayWatermark = function () {
|
830
|
-
// return false;
|
831
|
-
// }
|
832
|
-
class AXDataGridColumnsChangeEvent extends AXValueEvent {
|
833
|
-
}
|
834
|
-
class AXDataGridCellEvent extends AXDataEvent {
|
835
|
-
}
|
836
|
-
class AXDaagridRowClickEvent extends AXDataEvent {
|
837
|
-
}
|
838
|
-
class AXDataGridSelectionChangeEvent extends AXDataEvent {
|
839
|
-
}
|
840
|
-
class AXDataGridRowSelectionChangeEvent extends AXDataEvent {
|
841
|
-
}
|
842
|
-
class AXDataGridComponent {
|
843
|
-
constructor(ref, cdr) {
|
844
|
-
this.ref = ref;
|
845
|
-
this.cdr = cdr;
|
846
|
-
this.columnDefs = [];
|
847
|
-
this.rowModelType = 'clientSide';
|
848
|
-
this.frameworkComponents = {};
|
849
|
-
this.internalHeight = '100%';
|
850
|
-
this.masterDetail = false;
|
851
|
-
this.treeData = false;
|
852
|
-
this.enabelSelect = false;
|
853
|
-
this.gridView = false;
|
854
|
-
this.groupSelectsChildren = false;
|
855
|
-
this.oldSelectionNodes = [];
|
856
|
-
this.paginationAutoPageSize = true;
|
857
|
-
this.paginationPageSize = 10;
|
858
|
-
this.cacheBlockSize = 10;
|
859
|
-
// @Input()
|
860
|
-
// showRowNumber: boolean = true;
|
861
|
-
this.remoteOperation = false;
|
862
|
-
this.rowMultiSelectWithClick = true;
|
863
|
-
this.suppressRowClickSelection = true;
|
864
|
-
this.suppressCellSelection = false;
|
865
|
-
this.sizeColumnsToFit = true;
|
866
|
-
this.showCheckBox = true;
|
867
|
-
this.floatingFilter = false;
|
868
|
-
// @Input()
|
869
|
-
// takeCount: number;
|
870
|
-
this.autoGroupColumnDef = {};
|
871
|
-
this.selectionMode = 'single';
|
872
|
-
// @Input()
|
873
|
-
// allowFiltering: boolean = false;
|
874
|
-
this.pagination = true;
|
875
|
-
this.selectRow = [];
|
876
|
-
this.rowGroupPanelShow = 'never';
|
877
|
-
this.loadOnInit = true;
|
878
|
-
// @Input()
|
879
|
-
// groupDefaultExpanded: number = 0;
|
880
|
-
this.keyField = 'null';
|
881
|
-
this.hasChildField = 'null';
|
882
|
-
this.columnsChange = new EventEmitter();
|
883
|
-
this._columns = [];
|
884
|
-
this.defaultColDef = {
|
885
|
-
filter: true,
|
886
|
-
floatingFilter: true
|
887
|
-
};
|
888
|
-
this.groupHideOpenParents = false;
|
889
|
-
this.cellClick = new EventEmitter();
|
890
|
-
this.cellDbClick = new EventEmitter();
|
891
|
-
this.cellFocuse = new EventEmitter();
|
892
|
-
this.rowClick = new EventEmitter();
|
893
|
-
this.rowDbClick = new EventEmitter();
|
894
|
-
this.selectionChanged = new EventEmitter();
|
895
|
-
this.rowSelectionChange = new EventEmitter();
|
896
|
-
this.onRowSelectionChanged = new EventEmitter();
|
897
|
-
this.rtl = AXConfig.get('layout.rtl');
|
898
|
-
this.isServerSideGroup = (e) => {
|
899
|
-
return e[this.hasChildField];
|
900
|
-
};
|
901
|
-
this.getColumnDefs = () => {
|
902
|
-
return this.gridApi.getColumnDefs();
|
903
|
-
};
|
904
|
-
this.getCurrentPageNumber = () => {
|
905
|
-
return {
|
906
|
-
current: this.gridApi.paginationGetCurrentPage() + 1,
|
907
|
-
total: this.gridApi.paginationGetTotalPages()
|
908
|
-
};
|
909
|
-
};
|
910
|
-
this.getServerSideGroupKey = (e) => {
|
911
|
-
return e[this.keyField];
|
912
|
-
};
|
913
|
-
this.internalGetRowClass = (p) => {
|
914
|
-
if (this.rowClass) {
|
915
|
-
if (this.rowClass instanceof Function) {
|
916
|
-
return this.rowClass({
|
917
|
-
rowIndex: p.node.rowIndex,
|
918
|
-
rowLevel: p.node.level,
|
919
|
-
data: p.data
|
920
|
-
});
|
921
|
-
}
|
922
|
-
else {
|
923
|
-
return this.rowClass;
|
924
|
-
}
|
925
|
-
}
|
926
|
-
};
|
927
|
-
this.localeText = AXTranslator.get('dataGrid');
|
928
|
-
}
|
929
|
-
get searchText() {
|
930
|
-
return this._searchText;
|
931
|
-
}
|
932
|
-
set searchText(v) {
|
933
|
-
if (v !== this._searchText) {
|
934
|
-
this._searchText = v;
|
935
|
-
if (this.gridApi) {
|
936
|
-
this.refresh();
|
937
|
-
this.gridApi.setQuickFilter(this.searchText);
|
938
|
-
}
|
939
|
-
}
|
940
|
-
}
|
941
|
-
get filter() {
|
942
|
-
return this._filter;
|
943
|
-
}
|
944
|
-
set filter(v) {
|
945
|
-
if (v !== this._filter) {
|
946
|
-
this._filter = v;
|
947
|
-
this._filter.forEach((f) => {
|
948
|
-
const fc = this.gridApi.getFilterInstance(f.field);
|
949
|
-
if (fc) {
|
950
|
-
const ff = fc.getFrameworkComponentInstance();
|
951
|
-
ff.setModel(f);
|
952
|
-
}
|
953
|
-
});
|
954
|
-
}
|
955
|
-
}
|
956
|
-
get columns() {
|
957
|
-
return this._inlineColumns ? [...this._columns, ...this._inlineColumns.toArray()] : this._columns;
|
958
|
-
}
|
959
|
-
set columns(val) {
|
960
|
-
if (val && val.length) {
|
961
|
-
let old = this._columns;
|
962
|
-
this._columns = val;
|
963
|
-
this.columnsChange.emit({ component: this, value: val, oldValue: old, htmlElement: this.ref.nativeElement });
|
964
|
-
}
|
965
|
-
}
|
966
|
-
get dataSource() {
|
967
|
-
return this._dataSource ? this._dataSource : this._contentDataSource;
|
968
|
-
}
|
969
|
-
set dataSource(v) {
|
970
|
-
this._dataSource = v;
|
971
|
-
}
|
972
|
-
getRowHeight(param) {
|
973
|
-
if (param.data && param.data.rowHeight && param.node.level == 0) {
|
974
|
-
return param.data.rowHeight;
|
975
|
-
}
|
976
|
-
else if (this.masterDetail == true && param.node.level == 1) {
|
977
|
-
return this.detailRowHeight;
|
978
|
-
}
|
979
|
-
else if (this.masterDetail == false && param.data && param.data.rowHeight) {
|
980
|
-
return param.data.rowHeight;
|
981
|
-
}
|
982
|
-
else {
|
983
|
-
return null;
|
984
|
-
}
|
985
|
-
}
|
986
|
-
calcHeight() {
|
987
|
-
if (this.toolbar) {
|
988
|
-
this.internalHeight = `calc(100% - ${40}px)`;
|
989
|
-
}
|
990
|
-
else {
|
991
|
-
this.internalHeight = '100%';
|
992
|
-
}
|
993
|
-
}
|
994
|
-
get intenalGridDataSource() {
|
995
|
-
const that = this;
|
996
|
-
return {
|
997
|
-
rowCount: null,
|
998
|
-
getRows: (params) => {
|
999
|
-
// that.gridApi.gridOptionsWrapper.setProperty('cacheBlockSize', this.takeCount ? this.takeCount : params.api.paginationGetPageSize());
|
1000
|
-
that.dataSourceSuccessCallback = params.successCallback;
|
1001
|
-
const loadParams = {};
|
1002
|
-
loadParams.searchText = that.searchText;
|
1003
|
-
loadParams.skip = params.request.startRow;
|
1004
|
-
// loadParams.take = params.request.endRow - params.request.startRow;
|
1005
|
-
//// loadParams.take = that.takeCount ? that.takeCount : params.api.paginationGetPageSize() * 2;
|
1006
|
-
loadParams.take = params.request.endRow - params.request.startRow;
|
1007
|
-
loadParams.sort = params.request.sortModel.map((c) => {
|
1008
|
-
return {
|
1009
|
-
field: c.colId,
|
1010
|
-
dir: c.sort
|
1011
|
-
};
|
1012
|
-
});
|
1013
|
-
// loadParams.groups = params.request.rowGroupCols.map(r => r.field);
|
1014
|
-
// loadParams.groupKeys = params.request.groupKeys;
|
1015
|
-
// loadParams.data = params.parentNode.data;
|
1016
|
-
loadParams.group = {
|
1017
|
-
fields: params.request.rowGroupCols.map((r) => r.field),
|
1018
|
-
keys: params.request.groupKeys,
|
1019
|
-
parentData: params.parentNode.data
|
1020
|
-
};
|
1021
|
-
loadParams.filter = params.request.filterModel;
|
1022
|
-
/// setTimeout(() => {
|
1023
|
-
that.dataSource.fetch(loadParams);
|
1024
|
-
// }, 5000);
|
1025
|
-
}
|
1026
|
-
};
|
1027
|
-
}
|
1028
|
-
getMainMenuItems(e) {
|
1029
|
-
return ['pinSubMenu', 'separator'];
|
1030
|
-
}
|
1031
|
-
ngOnDestroy() {
|
1032
|
-
this.gridApi.destroy();
|
1033
|
-
}
|
1034
|
-
paginationGoToPage(number) {
|
1035
|
-
this.gridApi.paginationGoToPage(number - 1);
|
1036
|
-
}
|
1037
|
-
// todo gridOptions: GridOptions
|
1038
|
-
internalGridReady(gridOptions) {
|
1039
|
-
//// gridOptions.api.checkGridSize();
|
1040
|
-
//// this.takeCount = this.takeCount ? this.takeCount : gridOptions.api.paginationGetPageSize() * 2;
|
1041
|
-
// this.takeCount = this.takeCount < 20 ? 20 : this.takeCount;
|
1042
|
-
//// gridOptions.api.gridOptionsWrapper.setProperty('cacheBlockSize', this.takeCount);
|
1043
|
-
this.gridApi = gridOptions.api;
|
1044
|
-
this.mapColumns();
|
1045
|
-
this.calcHeight();
|
1046
|
-
if (!this.loadOnInit) {
|
1047
|
-
this.loadOnInit = true;
|
1048
|
-
return;
|
1049
|
-
}
|
1050
|
-
if (this.remoteOperation) {
|
1051
|
-
this.gridApi.setServerSideDatasource(this.intenalGridDataSource);
|
1052
|
-
}
|
1053
|
-
if (!this.remoteOperation) {
|
1054
|
-
this.refresh();
|
1055
|
-
}
|
1056
|
-
}
|
1057
|
-
ngAfterContentInit() {
|
1058
|
-
const that = this;
|
1059
|
-
if (this.rowTemplate) {
|
1060
|
-
this.fullWidthCellRendererFramework = this.rowTemplate.renderer;
|
1061
|
-
this.fullWidthCellRendererParams = this.rowTemplate.params;
|
1062
|
-
}
|
1063
|
-
this.frameworkComponents.agDateInput = AXDatePickerFilterComponent;
|
1064
|
-
if (this.gridDetailTemplate) {
|
1065
|
-
this.masterDetail = true;
|
1066
|
-
this.detailCellRendererParams = this.gridDetailTemplate.params;
|
1067
|
-
this.detailCellRenderer = 'detailRendererFramework';
|
1068
|
-
this.frameworkComponents.detailRendererFramework = this.gridDetailTemplate.renderer;
|
1069
|
-
this.detailRowHeight = this.gridDetailTemplate.height;
|
1070
|
-
}
|
1071
|
-
this.isFullWidthCell = () => {
|
1072
|
-
return that.rowTemplate != null;
|
1073
|
-
};
|
1074
|
-
//this.cdr
|
1075
|
-
}
|
1076
|
-
ngOnInit() {
|
1077
|
-
// if (this.takeCount && this.takeCount > 0) {
|
1078
|
-
// this.paginationPageSize = this.takeCount;
|
1079
|
-
// this.paginationAutoPageSize = false;
|
1080
|
-
// this.cacheBlockSize = this.takeCount;
|
1081
|
-
// }
|
1082
|
-
if (this.selectionMode === 'single') {
|
1083
|
-
this.groupSelectsChildren = false;
|
1084
|
-
}
|
1085
|
-
if (this.keyField !== 'null' && this.hasChildField !== 'null') {
|
1086
|
-
this.rowGroupPanelShow = 'never';
|
1087
|
-
this.treeData = true;
|
1088
|
-
}
|
1089
|
-
if (this.remoteOperation) {
|
1090
|
-
this.rowModelType = 'serverSide';
|
1091
|
-
}
|
1092
|
-
//
|
1093
|
-
if (this.rtl == null) {
|
1094
|
-
this.rtl = window.getComputedStyle(this.ref.nativeElement, null).getPropertyValue('direction') === 'rtl';
|
1095
|
-
}
|
1096
|
-
//
|
1097
|
-
}
|
1098
|
-
gridSelectRow() {
|
1099
|
-
if (this.gridApi) {
|
1100
|
-
if (this.selectRow && this.selectRow.length > 0 && this.gridApi !== undefined && typeof this.selectRow[0] != 'object') {
|
1101
|
-
this.gridApi.forEachNode((node) => {
|
1102
|
-
if (node.data !== undefined) {
|
1103
|
-
let select = false;
|
1104
|
-
this.selectRow.forEach((id) => {
|
1105
|
-
if (node.data[this.keyField] === id) {
|
1106
|
-
select = true;
|
1107
|
-
node.setSelected(select);
|
1108
|
-
}
|
1109
|
-
});
|
1110
|
-
}
|
1111
|
-
});
|
1112
|
-
}
|
1113
|
-
else {
|
1114
|
-
this.gridApi.forEachNode((node) => {
|
1115
|
-
if (node.data !== undefined) {
|
1116
|
-
let select = false;
|
1117
|
-
this.selectRow.forEach((item) => {
|
1118
|
-
if (item.rowIndex != undefined && item.rowLevel != undefined) {
|
1119
|
-
if (node.data[this.keyField] === item.data[this.keyField]) {
|
1120
|
-
select = true;
|
1121
|
-
}
|
1122
|
-
}
|
1123
|
-
else {
|
1124
|
-
if (node.data[this.keyField] === item[this.keyField]) {
|
1125
|
-
select = true;
|
1126
|
-
}
|
1127
|
-
}
|
1128
|
-
});
|
1129
|
-
node.setSelected(select);
|
1130
|
-
}
|
1131
|
-
});
|
1132
|
-
}
|
1133
|
-
}
|
1134
|
-
}
|
1135
|
-
// ngAfterViewChecked(): void {
|
1136
|
-
// //Called after every check of the component's view. Applies to components only.
|
1137
|
-
// //Add 'implements AfterViewChecked' to the class.
|
1138
|
-
// // this.selectByValues();
|
1139
|
-
// this.enabelSelect = false;
|
1140
|
-
// }
|
1141
|
-
rebuildGrid() {
|
1142
|
-
this.mapColumns();
|
1143
|
-
setTimeout(() => {
|
1144
|
-
if (this.sizeColumnsToFit) {
|
1145
|
-
this.gridApi.sizeColumnsToFit();
|
1146
|
-
}
|
1147
|
-
}, 10);
|
1148
|
-
}
|
1149
|
-
ngAfterViewInit() {
|
1150
|
-
if (this.treeData === true) {
|
1151
|
-
this.columnDefs = this.columns.map((c) => c.render());
|
1152
|
-
const groupColumn = this.columnDefs.find((c) => c.rowGroupIndex == '0' && c.field !== '');
|
1153
|
-
this.autoGroupColumnDef = {
|
1154
|
-
headerName: groupColumn.headerName,
|
1155
|
-
width: groupColumn.width,
|
1156
|
-
cellRendererParams: { checkbox: this.showCheckBox },
|
1157
|
-
field: groupColumn.field
|
1158
|
-
};
|
1159
|
-
this.columnDefs.forEach((elm) => {
|
1160
|
-
if (elm.rowGroupIndex > -1) {
|
1161
|
-
elm.hide = true;
|
1162
|
-
}
|
1163
|
-
});
|
1164
|
-
}
|
1165
|
-
//setTimeout(() => {
|
1166
|
-
this.gridView = true;
|
1167
|
-
//});
|
1168
|
-
this.enabelSelect = true;
|
1169
|
-
this.dataSource.onDataReceived.subscribe((_data) => {
|
1170
|
-
const result = _data.data.result;
|
1171
|
-
this.hideLoading();
|
1172
|
-
let items;
|
1173
|
-
let totalCount;
|
1174
|
-
if (Array.isArray(result)) {
|
1175
|
-
items = result;
|
1176
|
-
totalCount = result.length;
|
1177
|
-
}
|
1178
|
-
else {
|
1179
|
-
items = result.items;
|
1180
|
-
totalCount = result.totalCount;
|
1181
|
-
}
|
1182
|
-
if (this.dataSourceSuccessCallback) {
|
1183
|
-
if (!this.loadOnInit) {
|
1184
|
-
this.dataSourceSuccessCallback([], 0);
|
1185
|
-
}
|
1186
|
-
else {
|
1187
|
-
this.dataSourceSuccessCallback(items, totalCount);
|
1188
|
-
}
|
1189
|
-
}
|
1190
|
-
else {
|
1191
|
-
if (!this.loadOnInit && this.gridApi !== undefined) {
|
1192
|
-
this.gridApi.setRowData([]);
|
1193
|
-
}
|
1194
|
-
else if (this.gridApi !== undefined) {
|
1195
|
-
this.gridApi.setRowData(items);
|
1196
|
-
}
|
1197
|
-
}
|
1198
|
-
this.gridSelectRow();
|
1199
|
-
});
|
1200
|
-
this.dataSource.onFetchStart.subscribe(() => {
|
1201
|
-
this.showLoading();
|
1202
|
-
});
|
1203
|
-
if (this.searchInput) {
|
1204
|
-
this.searchInput.onValueChanged.subscribe((c) => {
|
1205
|
-
this.searchText = c.value;
|
1206
|
-
});
|
1207
|
-
}
|
1208
|
-
//
|
1209
|
-
this.cdr.detectChanges();
|
1210
|
-
}
|
1211
|
-
mapColumns() {
|
1212
|
-
this.columnDefs = this.columns.map((c) => c.render());
|
1213
|
-
// if (this.showRowNumber) {
|
1214
|
-
// this.columnDefs.push({
|
1215
|
-
// headerName: AXConfig.get('layout.rtl') ? 'ردیف' : 'Row',
|
1216
|
-
// valueGetter: 'node.rowIndex + 1',
|
1217
|
-
// pinned: AXConfig.get('layout.rtl') ? 'right' : 'left'
|
1218
|
-
// });
|
1219
|
-
// }
|
1220
|
-
if (this.gridDetailTemplate) {
|
1221
|
-
if (this.columnDefs[0].checkboxSelection === true && this.columnDefs[0].field === '') {
|
1222
|
-
this.columnDefs[1].cellRenderer = 'agGroupCellRenderer';
|
1223
|
-
}
|
1224
|
-
else {
|
1225
|
-
this.columnDefs[0].cellRenderer = 'agGroupCellRenderer';
|
1226
|
-
}
|
1227
|
-
}
|
1228
|
-
if (this.hasChildField === 'null') {
|
1229
|
-
const groupColumn = this.columnDefs.find((c) => c.rowGroupIndex === undefined && c.field !== '');
|
1230
|
-
if (groupColumn && this.groupHideOpenParents == false) {
|
1231
|
-
this.autoGroupColumnDef = {
|
1232
|
-
headerName: groupColumn.headerName,
|
1233
|
-
width: groupColumn.width,
|
1234
|
-
cellRendererParams: { checkbox: this.showCheckBox },
|
1235
|
-
field: groupColumn.field
|
1236
|
-
};
|
1237
|
-
// groupColumn.hide = true;
|
1238
|
-
}
|
1239
|
-
}
|
1240
|
-
this.columnDefs.forEach((elm) => {
|
1241
|
-
if (elm.rowGroupIndex > -1) {
|
1242
|
-
elm.hide = true;
|
1243
|
-
}
|
1244
|
-
});
|
1245
|
-
}
|
1246
|
-
displayedColumnsChanged(e) {
|
1247
|
-
if (this.hasChildField === 'null') {
|
1248
|
-
const ee = e.columnApi.getAllDisplayedColumnGroups();
|
1249
|
-
const eee = ee.find((c) => c.colId !== 'ag-Grid-AutoColumn' && c.colId !== '0');
|
1250
|
-
if (eee && eee.colId) {
|
1251
|
-
this.autoGroupColumnDef = {
|
1252
|
-
headerName: eee.colDef.headerName,
|
1253
|
-
width: eee.colDef.width,
|
1254
|
-
cellRendererParams: { checkbox: this.showCheckBox },
|
1255
|
-
field: eee.colDef.field
|
1256
|
-
};
|
1257
|
-
}
|
1258
|
-
// eee.hide = true;
|
1259
|
-
}
|
1260
|
-
}
|
1261
|
-
refresh(route = []) {
|
1262
|
-
if (this.remoteOperation && this.gridApi !== undefined) {
|
1263
|
-
// this.gridApi.purgeServerSideCache(route);
|
1264
|
-
this.gridApi.setServerSideDatasource(this.intenalGridDataSource);
|
1265
|
-
}
|
1266
|
-
else {
|
1267
|
-
// TODO : check fetch param
|
1268
|
-
this.dataSource.fetch(null);
|
1269
|
-
}
|
1270
|
-
}
|
1271
|
-
internalGridCellClicked(e) {
|
1272
|
-
this.cellClick.emit({ data: this.mapCellEvent(e), component: this, htmlElement: this.ref.nativeElement });
|
1273
|
-
}
|
1274
|
-
internalGridCellDoubleClicked(e) {
|
1275
|
-
this.cellDbClick.emit({ data: this.mapCellEvent(e), component: this, htmlElement: this.ref.nativeElement });
|
1276
|
-
}
|
1277
|
-
internalGridCellFocused(e) {
|
1278
|
-
this.cellFocuse.emit({ data: this.mapCellEvent(e), htmlElement: this.ref.nativeElement, component: this });
|
1279
|
-
}
|
1280
|
-
internalGridRowClicked(e) {
|
1281
|
-
if (!e.node.group) {
|
1282
|
-
this.rowClick.emit({ data: this.mapRowEvent(e), component: this, htmlElement: this.ref.nativeElement });
|
1283
|
-
}
|
1284
|
-
}
|
1285
|
-
internalGridRowDoubleClicked(e) {
|
1286
|
-
if (!e.node.group) {
|
1287
|
-
this.rowDbClick.emit({ data: this.mapRowEvent(e), htmlElement: this.ref.nativeElement, component: this });
|
1288
|
-
}
|
1289
|
-
}
|
1290
|
-
differenceOf2Arrays(array1, array2) {
|
1291
|
-
const temp = [];
|
1292
|
-
for (const i in array1) {
|
1293
|
-
if (array2.indexOf(array1[i]) === -1) {
|
1294
|
-
temp.push(array1[i]);
|
1295
|
-
}
|
1296
|
-
}
|
1297
|
-
for (const i in array2) {
|
1298
|
-
if (array1.indexOf(array2[i]) === -1) {
|
1299
|
-
temp.push(array2[i]);
|
1300
|
-
}
|
1301
|
-
}
|
1302
|
-
return temp.sort((a, b) => a - b);
|
1303
|
-
}
|
1304
|
-
rowSelectionChanged(e) {
|
1305
|
-
// this.gridApi.forEachNode((node) => {
|
1306
|
-
// if (node.data[this.keyField] == e.node.data[this.keyField]) {
|
1307
|
-
// node.setSelected(e.node.selected);
|
1308
|
-
// }
|
1309
|
-
// });
|
1310
|
-
if (e.node.selected == true) {
|
1311
|
-
this.selectRow = this.selectRow.filter((c) => c[this.keyField] != e.data[this.keyField]);
|
1312
|
-
this.selectRow.push(e.data);
|
1313
|
-
}
|
1314
|
-
else {
|
1315
|
-
this.selectRow = this.selectRow.filter((c) => c[this.keyField] != e.data[this.keyField]);
|
1316
|
-
}
|
1317
|
-
this.rowSelectionChange.emit({ component: this, data: e, htmlElement: this.ref.nativeElement });
|
1318
|
-
}
|
1319
|
-
internalGridSelectionChanged(e) {
|
1320
|
-
const args = { items: [] };
|
1321
|
-
const oldNodes = this.oldSelectionNodes;
|
1322
|
-
const nodes = this.gridApi.getSelectedNodes();
|
1323
|
-
nodes.forEach((i) => {
|
1324
|
-
args.items.push({
|
1325
|
-
rowLevel: i.level,
|
1326
|
-
rowIndex: i.rowIndex,
|
1327
|
-
data: i.data
|
1328
|
-
});
|
1329
|
-
});
|
1330
|
-
this.selectionChanged.emit({ data: args, component: this, htmlElement: this.ref.nativeElement });
|
1331
|
-
let action = nodes.length > oldNodes.length ? true : false;
|
1332
|
-
const node = this.differenceOf2Arrays(nodes, oldNodes);
|
1333
|
-
this.onRowSelectionChanged.emit({ component: this, selected: action, data: node, htmlElement: this.ref.nativeElement });
|
1334
|
-
this.oldSelectionNodes = nodes;
|
1335
|
-
}
|
1336
|
-
mapCellEvent(e) {
|
1337
|
-
return {
|
1338
|
-
rowLevel: 0,
|
1339
|
-
column: e.column,
|
1340
|
-
data: e.data,
|
1341
|
-
rowIndex: e.rowIndex,
|
1342
|
-
value: e.value
|
1343
|
-
};
|
1344
|
-
}
|
1345
|
-
mapRowEvent(e) {
|
1346
|
-
return {
|
1347
|
-
rowLevel: 0,
|
1348
|
-
data: e.data,
|
1349
|
-
rowIndex: e.rowIndex
|
1350
|
-
};
|
1351
|
-
}
|
1352
|
-
deselectAll() {
|
1353
|
-
this.gridApi.deselectAll();
|
1354
|
-
}
|
1355
|
-
deselectByKeyField(keyField) {
|
1356
|
-
this.gridApi.forEachNode((node) => {
|
1357
|
-
if (node.data !== undefined) {
|
1358
|
-
let select = false;
|
1359
|
-
if (node.data[this.keyField] === keyField) {
|
1360
|
-
node.setSelected(select);
|
1361
|
-
this.selectRow = this.selectRow.filter((c) => c[this.keyField] != keyField);
|
1362
|
-
}
|
1363
|
-
}
|
1364
|
-
});
|
1365
|
-
}
|
1366
|
-
showLoading() {
|
1367
|
-
if (this.gridApi) {
|
1368
|
-
this.gridApi.showLoadingOverlay();
|
1369
|
-
}
|
1370
|
-
}
|
1371
|
-
hideLoading() {
|
1372
|
-
if (this.gridApi) {
|
1373
|
-
this.gridApi.hideOverlay();
|
1374
|
-
}
|
1375
|
-
}
|
1376
|
-
internalGridSizeChanged(e) {
|
1377
|
-
if (e.clientWidth > 0 && e.clientHeight > 0) {
|
1378
|
-
this.performSizeColumnsToFit(e.api);
|
1379
|
-
}
|
1380
|
-
// this.refresh();
|
1381
|
-
// this.gridApi.paginationGoToFirstPage();
|
1382
|
-
}
|
1383
|
-
internalGridFirstDataRendered(e) {
|
1384
|
-
this.performSizeColumnsToFit(e.api);
|
1385
|
-
}
|
1386
|
-
performSizeColumnsToFit(api) {
|
1387
|
-
if (this.sizeColumnsToFit) {
|
1388
|
-
api.sizeColumnsToFit();
|
1389
|
-
}
|
1390
|
-
}
|
1391
|
-
}
|
1392
|
-
AXDataGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXDataGridComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
1393
|
-
AXDataGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXDataGridComponent, selector: "ax-data-grid", inputs: { remoteOperation: "remoteOperation", rowMultiSelectWithClick: "rowMultiSelectWithClick", suppressRowClickSelection: "suppressRowClickSelection", suppressCellSelection: "suppressCellSelection", sizeColumnsToFit: "sizeColumnsToFit", showCheckBox: "showCheckBox", floatingFilter: "floatingFilter", selectionMode: "selectionMode", pagination: "pagination", selectRow: "selectRow", rowGroupPanelShow: "rowGroupPanelShow", loadOnInit: "loadOnInit", keyField: "keyField", hasChildField: "hasChildField", searchText: "searchText", filter: "filter", columns: "columns", rowHeight: "rowHeight", dataSource: "dataSource", groupHideOpenParents: "groupHideOpenParents", rowClass: "rowClass", rtl: "rtl" }, outputs: { columnsChange: "columnsChange", cellClick: "cellClick", cellDbClick: "cellDbClick", cellFocuse: "cellFocuse", rowClick: "rowClick", rowDbClick: "rowDbClick", selectionChanged: "selectionChanged", rowSelectionChange: "rowSelectionChange", onRowSelectionChanged: "onRowSelectionChanged" }, queries: [{ propertyName: "searchInput", first: true, predicate: AXToolbarSearchComponent, descendants: true, static: true }, { propertyName: "toolbar", first: true, predicate: AXToolbarComponent, descendants: true, static: true }, { propertyName: "rowTemplate", first: true, predicate: AXDataGridRowTemplateComponent, descendants: true, static: true }, { propertyName: "gridDetailTemplate", first: true, predicate: AXDataGridDetailTemplateComponent, descendants: true, static: true }, { propertyName: "_contentDataSource", first: true, predicate: AXDataSourceComponent, descendants: true, static: true }, { propertyName: "_inlineColumns", predicate: AXGridDataColumn }], ngImport: i0, template: "<div class=\"ax-grid-toolbar\" *ngIf=\"toolbar\">\r\n <ng-content select=\"ax-toolbar\"></ng-content>\r\n</div>\r\n<!-- [enableSorting]=\"true\" [enableColResize]=\"true\" [enableFilter]=\"allowFiltering\" -->\r\n<ag-grid-angular *ngIf=\"gridView\" class=\"ag-theme-balham\" [getRowClass]=\"internalGetRowClass\"\r\n [style.height]=\"internalHeight\" [columnDefs]=\"columnDefs\" [enableRtl]=\"rtl\" [pagination]=\"pagination\"\r\n [rowGroupPanelShow]=\"rowGroupPanelShow\" [rowModelType]=\"rowModelType\" [detailRowHeight]=\"detailRowHeight\"\r\n [getRowHeight]=\"getRowHeight\" [paginationAutoPageSize]=\"paginationAutoPageSize\"\r\n [paginationPageSize]=\"paginationPageSize\" [suppressMenuHide]=\"true\" [frameworkComponents]=\"frameworkComponents\"\r\n [isFullWidthCell]=\"isFullWidthCell\" [rowSelection]=\"selectionMode\" [rowMultiSelectWithClick]=\"rowMultiSelectWithClick\"\r\n [fullWidthCellRendererFramework]=\"fullWidthCellRendererFramework\"\r\n [fullWidthCellRendererParams]=\"fullWidthCellRendererParams\" (cellClicked)=\"internalGridCellClicked($event)\"\r\n (cellDoubleClicked)=\"internalGridCellDoubleClicked($event)\" (cellFocused)=\"internalGridCellFocused($event)\"\r\n (rowClicked)=\"internalGridRowClicked($event)\" (selectionChanged)=\"internalGridSelectionChanged($event)\"\r\n (rowSelected)=\"rowSelectionChanged($event)\" (rowDoubleClicked)=\"internalGridRowDoubleClicked($event)\"\r\n (gridReady)=\"internalGridReady($event)\" [groupSelectsChildren]=\"groupSelectsChildren\"\r\n [suppressRowClickSelection]=\"suppressRowClickSelection\" [groupSelectsFiltered]=\"true\"\r\n [suppressCellSelection]=\"suppressCellSelection\" [autoGroupColumnDef]=\"autoGroupColumnDef\"\r\n [suppressAggFuncInHeader]=\"true\" [treeData]=\"treeData\" [animateRows]=\"true\" [isServerSideGroup]=\"isServerSideGroup\"\r\n [getServerSideGroupKey]=\"getServerSideGroupKey\" [masterDetail]=\"masterDetail\"\r\n [detailCellRendererParams]=\"detailCellRendererParams\" [detailCellRenderer]=\"detailCellRenderer\"\r\n (gridSizeChanged)=\"internalGridSizeChanged($event)\" (firstDataRendered)=\"internalGridFirstDataRendered($event)\"\r\n [localeText]=\"localeText\" [groupHideOpenParents]=\"groupHideOpenParents\" [enableRangeSelection]=\"true\"\r\n [enableRangeSelection]=\"false\" [allowContextMenuWithControlKey]=\"false\" [getMainMenuItems]=\"getMainMenuItems\">\r\n</ag-grid-angular>\r\n\r\n<!-- (displayedColumnsChanged)=\"displayedColumnsChanged($event)\" -->", components: [{ type: i1$2.AgGridAngular, selector: "ag-grid-angular", inputs: ["alignedGrids", "rowData", "columnDefs", "excelStyles", "pinnedTopRowData", "pinnedBottomRowData", "chartThemes", "components", "frameworkComponents", "rowStyle", "context", "autoGroupColumnDef", "localeText", "icons", "datasource", "serverSideDatasource", "viewportDatasource", "groupRowRendererParams", "aggFuncs", "fullWidthCellRendererParams", "defaultColGroupDef", "defaultColDef", "defaultExportParams", "columnTypes", "rowClassRules", "detailGridOptions", "detailCellRendererParams", "loadingCellRendererParams", "loadingOverlayComponentParams", "noRowsOverlayComponentParams", "popupParent", "colResizeDefault", "reduxStore", "statusBar", "sideBar", "chartThemeOverrides", "customChartThemes", "sortingOrder", "rowClass", "rowSelection", "overlayLoadingTemplate", "overlayNoRowsTemplate", "quickFilterText", "rowModelType", "editType", "domLayout", "clipboardDeliminator", "rowGroupPanelShow", "multiSortKey", "pivotColumnGroupTotals", "pivotRowTotals", "pivotPanelShow", "fillHandleDirection", "rowHeight", "detailRowHeight", "rowBuffer", "colWidth", "headerHeight", "groupHeaderHeight", "floatingFiltersHeight", "pivotHeaderHeight", "pivotGroupHeaderHeight", "groupDefaultExpanded", "minColWidth", "maxColWidth", "viewportRowModelPageSize", "viewportRowModelBufferSize", "autoSizePadding", "maxBlocksInCache", "maxConcurrentDatasourceRequests", "tooltipShowDelay", "cacheOverflowSize", "paginationPageSize", "cacheBlockSize", "infiniteInitialRowCount", "scrollbarWidth", "batchUpdateWaitMillis", "asyncTransactionWaitMillis", "blockLoadDebounceMillis", "keepDetailRowsCount", "undoRedoCellEditingLimit", "cellFlashDelay", "cellFadeDelay", "localeTextFunc", "groupRowInnerRenderer", "groupRowInnerRendererFramework", "dateComponent", "dateComponentFramework", "groupRowRenderer", "groupRowRendererFramework", "isExternalFilterPresent", "getRowHeight", "doesExternalFilterPass", "getRowClass", "getRowStyle", "getRowClassRules", "traverseNode", "getContextMenuItems", "getMainMenuItems", "processRowPostCreate", "processCellForClipboard", "groupRowAggNodes", "getRowNodeId", "isFullWidthCell", "fullWidthCellRenderer", "fullWidthCellRendererFramework", "processSecondaryColDef", "processSecondaryColGroupDef", "getBusinessKeyForNode", "sendToClipboard", "navigateToNextHeader", "tabToNextHeader", "navigateToNextCell", "tabToNextCell", "getDetailRowData", "processCellFromClipboard", "getDocument", "postProcessPopup", "getChildCount", "getDataPath", "loadingCellRenderer", "loadingCellRendererFramework", "loadingOverlayComponent", "loadingOverlayComponentFramework", "noRowsOverlayComponent", "noRowsOverlayComponentFramework", "detailCellRenderer", "detailCellRendererFramework", "defaultGroupSortComparator", "isRowMaster", "isRowSelectable", "postSort", "processHeaderForClipboard", "paginationNumberFormatter", "processDataFromClipboard", "getServerSideGroupKey", "isServerSideGroup", "suppressKeyboardEvent", "createChartContainer", "processChartOptions", "getChartToolbarItems", "fillOperation", "suppressMakeColumnVisibleAfterUnGroup", "suppressRowClickSelection", "suppressCellSelection", "suppressHorizontalScroll", "alwaysShowVerticalScroll", "debug", "enableBrowserTooltips", "enableCellExpressions", "angularCompileRows", "angularCompileFilters", "groupSuppressAutoColumn", "groupSelectsChildren", "groupIncludeFooter", "groupIncludeTotalFooter", "groupUseEntireRow", "groupSuppressBlankHeader", "suppressMenuHide", "suppressRowDeselection", "unSortIcon", "suppressMultiSort", "singleClickEdit", "suppressLoadingOverlay", "suppressNoRowsOverlay", "suppressAutoSize", "skipHeaderOnAutoSize", "suppressParentsInRowNodes", "suppressColumnMoveAnimation", "suppressMovableColumns", "suppressFieldDotNotation", "enableRangeSelection", "enableRangeHandle", "enableFillHandle", "suppressClearOnFillReduction", "deltaSort", "suppressTouch", "suppressAsyncEvents", "allowContextMenuWithControlKey", "suppressContextMenu", "rememberGroupStateWhenNewData", "enableCellChangeFlash", "suppressDragLeaveHidesColumns", "suppressMiddleClickScrolls", "suppressPreventDefaultOnMouseWheel", "suppressCopyRowsToClipboard", "copyHeadersToClipboard", "pivotMode", "suppressAggFuncInHeader", "suppressColumnVirtualisation", "suppressAggAtRootLevel", "suppressFocusAfterRefresh", "functionsPassive", "functionsReadOnly", "animateRows", "groupSelectsFiltered", "groupRemoveSingleChildren", "groupRemoveLowestSingleChildren", "enableRtl", "suppressClickEdit", "rowDragManaged", "suppressRowDrag", "suppressMoveWhenRowDragging", "enableMultiRowDragging", "enableGroupEdit", "embedFullWidthRows", "deprecatedEmbedFullWidthRows", "suppressPaginationPanel", "floatingFilter", "groupHideOpenParents", "groupMultiAutoColumn", "pagination", "stopEditingWhenGridLosesFocus", "paginationAutoPageSize", "suppressScrollOnNewData", "purgeClosedRowNodes", "cacheQuickFilter", "deltaRowDataMode", "ensureDomOrder", "accentedSort", "suppressChangeDetection", "valueCache", "valueCacheNeverExpires", "aggregateOnlyChangedColumns", "suppressAnimationFrame", "suppressExcelExport", "suppressCsvExport", "treeData", "masterDetail", "suppressMultiRangeSelection", "enterMovesDownAfterEdit", "enterMovesDown", "suppressPropertyNamesCheck", "rowMultiSelectWithClick", "suppressEnterpriseResetOnNewColumns", "enableOldSetFilterModel", "suppressRowHoverHighlight", "suppressRowTransform", "suppressClipboardPaste", "suppressLastEmptyLineOnPaste", "serverSideSortingAlwaysResets", "reactNext", "suppressSetColumnStateEvents", "suppressColumnStateEvents", "enableCharts", "deltaColumnMode", "suppressMaintainUnsortedOrder", "enableCellTextSelection", "suppressBrowserResizeObserver", "suppressMaxRenderedRowRestriction", "excludeChildrenWhenTreeDataFiltering", "tooltipMouseTrack", "keepDetailRows", "paginateChildRows", "preventDefaultOnContextMenu", "undoRedoCellEditing", "allowDragFromColumnsToolPanel", "immutableData", "immutableColumns", "pivotSuppressAutoColumn", "suppressExpandablePivotGroups", "applyColumnDefOrder", "debounceVerticalScrollbar", "detailRowAutoHeight", "gridOptions", "modules"], outputs: ["columnEverythingChanged", "newColumnsLoaded", "columnPivotModeChanged", "columnRowGroupChanged", "expandOrCollapseAll", "columnPivotChanged", "gridColumnsChanged", "columnValueChanged", "columnMoved", "columnVisible", "columnPinned", "columnGroupOpened", "columnResized", "displayedColumnsChanged", "virtualColumnsChanged", "rowGroupOpened", "rowDataChanged", "rowDataUpdated", "pinnedRowDataChanged", "rangeSelectionChanged", "chartCreated", "chartRangeSelectionChanged", "chartOptionsChanged", "chartDestroyed", "toolPanelVisibleChanged", "modelUpdated", "pasteStart", "pasteEnd", "fillStart", "fillEnd", "cellClicked", "cellDoubleClicked", "cellMouseDown", "cellContextMenu", "cellValueChanged", "rowValueChanged", "cellFocused", "rowSelected", "selectionChanged", "cellKeyDown", "cellKeyPress", "cellMouseOver", "cellMouseOut", "filterChanged", "filterModified", "filterOpened", "sortChanged", "virtualRowRemoved", "rowClicked", "rowDoubleClicked", "gridReady", "gridSizeChanged", "viewportChanged", "scrollbarWidthChanged", "firstDataRendered", "dragStarted", "dragStopped", "checkboxChanged", "rowEditingStarted", "rowEditingStopped", "cellEditingStarted", "cellEditingStopped", "bodyScroll", "animationQueueEmpty", "heightScaleChanged", "paginationChanged", "componentStateChanged", "bodyHeightChanged", "displayedColumnsWidthChanged", "scrollVisibilityChanged", "columnHoverChanged", "flashCells", "paginationPixelOffsetChanged", "rowDragEnter", "rowDragMove", "rowDragLeave", "rowDragEnd", "popupToFront", "columnRowGroupChangeRequest", "columnPivotChangeRequest", "columnValueChangeRequest", "columnAggFuncChangeRequest", "keyboardFocus", "mouseFocus"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None });
|
1394
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXDataGridComponent, decorators: [{
|
1395
|
-
type: Component,
|
1396
|
-
args: [{ selector: 'ax-data-grid', encapsulation: ViewEncapsulation.None, template: "<div class=\"ax-grid-toolbar\" *ngIf=\"toolbar\">\r\n <ng-content select=\"ax-toolbar\"></ng-content>\r\n</div>\r\n<!-- [enableSorting]=\"true\" [enableColResize]=\"true\" [enableFilter]=\"allowFiltering\" -->\r\n<ag-grid-angular *ngIf=\"gridView\" class=\"ag-theme-balham\" [getRowClass]=\"internalGetRowClass\"\r\n [style.height]=\"internalHeight\" [columnDefs]=\"columnDefs\" [enableRtl]=\"rtl\" [pagination]=\"pagination\"\r\n [rowGroupPanelShow]=\"rowGroupPanelShow\" [rowModelType]=\"rowModelType\" [detailRowHeight]=\"detailRowHeight\"\r\n [getRowHeight]=\"getRowHeight\" [paginationAutoPageSize]=\"paginationAutoPageSize\"\r\n [paginationPageSize]=\"paginationPageSize\" [suppressMenuHide]=\"true\" [frameworkComponents]=\"frameworkComponents\"\r\n [isFullWidthCell]=\"isFullWidthCell\" [rowSelection]=\"selectionMode\" [rowMultiSelectWithClick]=\"rowMultiSelectWithClick\"\r\n [fullWidthCellRendererFramework]=\"fullWidthCellRendererFramework\"\r\n [fullWidthCellRendererParams]=\"fullWidthCellRendererParams\" (cellClicked)=\"internalGridCellClicked($event)\"\r\n (cellDoubleClicked)=\"internalGridCellDoubleClicked($event)\" (cellFocused)=\"internalGridCellFocused($event)\"\r\n (rowClicked)=\"internalGridRowClicked($event)\" (selectionChanged)=\"internalGridSelectionChanged($event)\"\r\n (rowSelected)=\"rowSelectionChanged($event)\" (rowDoubleClicked)=\"internalGridRowDoubleClicked($event)\"\r\n (gridReady)=\"internalGridReady($event)\" [groupSelectsChildren]=\"groupSelectsChildren\"\r\n [suppressRowClickSelection]=\"suppressRowClickSelection\" [groupSelectsFiltered]=\"true\"\r\n [suppressCellSelection]=\"suppressCellSelection\" [autoGroupColumnDef]=\"autoGroupColumnDef\"\r\n [suppressAggFuncInHeader]=\"true\" [treeData]=\"treeData\" [animateRows]=\"true\" [isServerSideGroup]=\"isServerSideGroup\"\r\n [getServerSideGroupKey]=\"getServerSideGroupKey\" [masterDetail]=\"masterDetail\"\r\n [detailCellRendererParams]=\"detailCellRendererParams\" [detailCellRenderer]=\"detailCellRenderer\"\r\n (gridSizeChanged)=\"internalGridSizeChanged($event)\" (firstDataRendered)=\"internalGridFirstDataRendered($event)\"\r\n [localeText]=\"localeText\" [groupHideOpenParents]=\"groupHideOpenParents\" [enableRangeSelection]=\"true\"\r\n [enableRangeSelection]=\"false\" [allowContextMenuWithControlKey]=\"false\" [getMainMenuItems]=\"getMainMenuItems\">\r\n</ag-grid-angular>\r\n\r\n<!-- (displayedColumnsChanged)=\"displayedColumnsChanged($event)\" -->" }]
|
1397
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { remoteOperation: [{
|
1398
|
-
type: Input
|
1399
|
-
}], rowMultiSelectWithClick: [{
|
1400
|
-
type: Input
|
1401
|
-
}], suppressRowClickSelection: [{
|
1402
|
-
type: Input
|
1403
|
-
}], suppressCellSelection: [{
|
1404
|
-
type: Input
|
1405
|
-
}], sizeColumnsToFit: [{
|
1406
|
-
type: Input
|
1407
|
-
}], showCheckBox: [{
|
1408
|
-
type: Input
|
1409
|
-
}], floatingFilter: [{
|
1410
|
-
type: Input
|
1411
|
-
}], selectionMode: [{
|
1412
|
-
type: Input
|
1413
|
-
}], pagination: [{
|
1414
|
-
type: Input
|
1415
|
-
}], selectRow: [{
|
1416
|
-
type: Input
|
1417
|
-
}], rowGroupPanelShow: [{
|
1418
|
-
type: Input
|
1419
|
-
}], loadOnInit: [{
|
1420
|
-
type: Input
|
1421
|
-
}], keyField: [{
|
1422
|
-
type: Input
|
1423
|
-
}], hasChildField: [{
|
1424
|
-
type: Input
|
1425
|
-
}], searchText: [{
|
1426
|
-
type: Input
|
1427
|
-
}], filter: [{
|
1428
|
-
type: Input
|
1429
|
-
}], _inlineColumns: [{
|
1430
|
-
type: ContentChildren,
|
1431
|
-
args: [AXGridDataColumn]
|
1432
|
-
}], columnsChange: [{
|
1433
|
-
type: Output
|
1434
|
-
}], columns: [{
|
1435
|
-
type: Input
|
1436
|
-
}], rowHeight: [{
|
1437
|
-
type: Input
|
1438
|
-
}], searchInput: [{
|
1439
|
-
type: ContentChild,
|
1440
|
-
args: [AXToolbarSearchComponent, { static: true }]
|
1441
|
-
}], toolbar: [{
|
1442
|
-
type: ContentChild,
|
1443
|
-
args: [AXToolbarComponent, { static: true }]
|
1444
|
-
}], rowTemplate: [{
|
1445
|
-
type: ContentChild,
|
1446
|
-
args: [AXDataGridRowTemplateComponent, { static: true }]
|
1447
|
-
}], gridDetailTemplate: [{
|
1448
|
-
type: ContentChild,
|
1449
|
-
args: [AXDataGridDetailTemplateComponent, { static: true }]
|
1450
|
-
}], _contentDataSource: [{
|
1451
|
-
type: ContentChild,
|
1452
|
-
args: [AXDataSourceComponent, { static: true }]
|
1453
|
-
}], dataSource: [{
|
1454
|
-
type: Input
|
1455
|
-
}], groupHideOpenParents: [{
|
1456
|
-
type: Input
|
1457
|
-
}], cellClick: [{
|
1458
|
-
type: Output
|
1459
|
-
}], cellDbClick: [{
|
1460
|
-
type: Output
|
1461
|
-
}], cellFocuse: [{
|
1462
|
-
type: Output
|
1463
|
-
}], rowClick: [{
|
1464
|
-
type: Output
|
1465
|
-
}], rowDbClick: [{
|
1466
|
-
type: Output
|
1467
|
-
}], selectionChanged: [{
|
1468
|
-
type: Output
|
1469
|
-
}], rowSelectionChange: [{
|
1470
|
-
type: Output
|
1471
|
-
}], onRowSelectionChanged: [{
|
1472
|
-
type: Output
|
1473
|
-
}], rowClass: [{
|
1474
|
-
type: Input
|
1475
|
-
}], rtl: [{
|
1476
|
-
type: Input
|
1477
|
-
}] } });
|
1478
|
-
|
1479
|
-
class AXDataGridModule {
|
1480
|
-
}
|
1481
|
-
AXDataGridModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXDataGridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1482
|
-
AXDataGridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXDataGridModule, declarations: [AXDataGridComponent,
|
1483
|
-
AXGridTextColumn,
|
1484
|
-
AXGridCheckColumn,
|
1485
|
-
AXGridSelectionColumn,
|
1486
|
-
AXGridDateColumn,
|
1487
|
-
AXGridRowNumberColumn,
|
1488
|
-
AXGridCommandColumn,
|
1489
|
-
BooleanRenderer,
|
1490
|
-
BooleanFilterRenderer,
|
1491
|
-
TextFilterRenderer,
|
1492
|
-
AXDataGridFilterComponent,
|
1493
|
-
AXDataGridRowTemplateComponent,
|
1494
|
-
AXDataGridDetailTemplateComponent,
|
1495
|
-
AXDataGridRowTemplateRenderer,
|
1496
|
-
AXDataGridDetailTemplateRenderer,
|
1497
|
-
AXDataGridCellTemplateComponent,
|
1498
|
-
AXDataGridCellTemplateRenderer,
|
1499
|
-
AXDatePickerFilterComponent,
|
1500
|
-
CommandRenderer], imports: [CommonModule,
|
1501
|
-
AXCoreModule,
|
1502
|
-
FormsModule,
|
1503
|
-
//AgGridModule,
|
1504
|
-
AXTextBoxModule,
|
1505
|
-
AXCheckBoxModule,
|
1506
|
-
AXSelectBoxModule,
|
1507
|
-
AXDataSourceModule,
|
1508
|
-
AXButtonModule,
|
1509
|
-
AXDatePickerModule, i1$2.AgGridModule], exports: [AXDataGridComponent,
|
1510
|
-
AXDataGridFilterComponent,
|
1511
|
-
AXDataGridRowTemplateComponent,
|
1512
|
-
AXDataGridDetailTemplateComponent,
|
1513
|
-
AXDataGridRowTemplateRenderer,
|
1514
|
-
AXDataGridDetailTemplateRenderer,
|
1515
|
-
AXDataGridCellTemplateComponent,
|
1516
|
-
AXDataGridCellTemplateRenderer,
|
1517
|
-
AXGridTextColumn,
|
1518
|
-
AXGridRowNumberColumn,
|
1519
|
-
AXGridCheckColumn,
|
1520
|
-
AXGridDateColumn,
|
1521
|
-
AXGridSelectionColumn,
|
1522
|
-
AXGridCommandColumn,
|
1523
|
-
BooleanRenderer,
|
1524
|
-
BooleanFilterRenderer,
|
1525
|
-
CommandRenderer] });
|
1526
|
-
AXDataGridModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXDataGridModule, providers: [], imports: [[
|
1527
|
-
CommonModule,
|
1528
|
-
AXCoreModule,
|
1529
|
-
FormsModule,
|
1530
|
-
//AgGridModule,
|
1531
|
-
AXTextBoxModule,
|
1532
|
-
AXCheckBoxModule,
|
1533
|
-
AXSelectBoxModule,
|
1534
|
-
AXDataSourceModule,
|
1535
|
-
AXButtonModule,
|
1536
|
-
AXDatePickerModule,
|
1537
|
-
AgGridModule.withComponents([AXDatePickerFilterComponent])
|
1538
|
-
]] });
|
1539
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXDataGridModule, decorators: [{
|
1540
|
-
type: NgModule,
|
1541
|
-
args: [{
|
1542
|
-
declarations: [
|
1543
|
-
AXDataGridComponent,
|
1544
|
-
AXGridTextColumn,
|
1545
|
-
AXGridCheckColumn,
|
1546
|
-
AXGridSelectionColumn,
|
1547
|
-
AXGridDateColumn,
|
1548
|
-
AXGridRowNumberColumn,
|
1549
|
-
AXGridCommandColumn,
|
1550
|
-
BooleanRenderer,
|
1551
|
-
BooleanFilterRenderer,
|
1552
|
-
TextFilterRenderer,
|
1553
|
-
AXDataGridFilterComponent,
|
1554
|
-
AXDataGridRowTemplateComponent,
|
1555
|
-
AXDataGridDetailTemplateComponent,
|
1556
|
-
AXDataGridRowTemplateRenderer,
|
1557
|
-
AXDataGridDetailTemplateRenderer,
|
1558
|
-
AXDataGridCellTemplateComponent,
|
1559
|
-
AXDataGridCellTemplateRenderer,
|
1560
|
-
AXDatePickerFilterComponent,
|
1561
|
-
CommandRenderer
|
1562
|
-
],
|
1563
|
-
imports: [
|
1564
|
-
CommonModule,
|
1565
|
-
AXCoreModule,
|
1566
|
-
FormsModule,
|
1567
|
-
//AgGridModule,
|
1568
|
-
AXTextBoxModule,
|
1569
|
-
AXCheckBoxModule,
|
1570
|
-
AXSelectBoxModule,
|
1571
|
-
AXDataSourceModule,
|
1572
|
-
AXButtonModule,
|
1573
|
-
AXDatePickerModule,
|
1574
|
-
AgGridModule.withComponents([AXDatePickerFilterComponent])
|
1575
|
-
],
|
1576
|
-
exports: [
|
1577
|
-
AXDataGridComponent,
|
1578
|
-
AXDataGridFilterComponent,
|
1579
|
-
AXDataGridRowTemplateComponent,
|
1580
|
-
AXDataGridDetailTemplateComponent,
|
1581
|
-
AXDataGridRowTemplateRenderer,
|
1582
|
-
AXDataGridDetailTemplateRenderer,
|
1583
|
-
AXDataGridCellTemplateComponent,
|
1584
|
-
AXDataGridCellTemplateRenderer,
|
1585
|
-
AXGridTextColumn,
|
1586
|
-
AXGridRowNumberColumn,
|
1587
|
-
AXGridCheckColumn,
|
1588
|
-
AXGridDateColumn,
|
1589
|
-
AXGridSelectionColumn,
|
1590
|
-
AXGridCommandColumn,
|
1591
|
-
BooleanRenderer,
|
1592
|
-
BooleanFilterRenderer,
|
1593
|
-
CommandRenderer
|
1594
|
-
],
|
1595
|
-
providers: []
|
1596
|
-
}]
|
1597
|
-
}] });
|
1598
|
-
|
1599
|
-
class AXDataLovPopupComponent extends AXBasePopupPageComponent {
|
1600
|
-
constructor(cdr, ref) {
|
1601
|
-
super();
|
1602
|
-
this.cdr = cdr;
|
1603
|
-
this.ref = ref;
|
1604
|
-
this.columns = [];
|
1605
|
-
this.selectedItems = [];
|
1606
|
-
this.keyField = '';
|
1607
|
-
this.allowNull = true;
|
1608
|
-
this.rtl = AXConfig.get('layout.rtl');
|
1609
|
-
this.selectedRows = [];
|
1610
|
-
this.pagination = true;
|
1611
|
-
}
|
1612
|
-
ngOnInit() {
|
1613
|
-
if (this.rtl == null) {
|
1614
|
-
this.rtl = window.getComputedStyle(this.ref.nativeElement, null).getPropertyValue('direction') === 'rtl';
|
1615
|
-
}
|
1616
|
-
}
|
1617
|
-
onDoneClick() {
|
1618
|
-
if (this.selectedItems) {
|
1619
|
-
this.close(this.selectedItems);
|
1620
|
-
}
|
1621
|
-
else {
|
1622
|
-
this.close();
|
1623
|
-
}
|
1624
|
-
}
|
1625
|
-
rowDoubleClicked(e) {
|
1626
|
-
if (this.selectionMode == 'single') {
|
1627
|
-
this.selectedItems = [];
|
1628
|
-
}
|
1629
|
-
this.selectedItems = this.selectedItems.filter((c) => c[this.keyField] != e.data.data[this.keyField]);
|
1630
|
-
this.selectedItems.push(e.data.data);
|
1631
|
-
this.onDoneClick();
|
1632
|
-
}
|
1633
|
-
onCancelClick() {
|
1634
|
-
this.close();
|
1635
|
-
}
|
1636
|
-
rowSelectionChange(e) {
|
1637
|
-
if (e.data.node.selected == true) {
|
1638
|
-
this.selectedItems = this.selectedItems.filter((c) => c[this.keyField] != e.data.node.data[this.keyField]);
|
1639
|
-
this.selectedItems.push(e.data.node.data);
|
1640
|
-
}
|
1641
|
-
else {
|
1642
|
-
if (this.allowNull == true || (this.allowNull == false && this.selectedItems.length > 1)) {
|
1643
|
-
this.selectedItems = this.selectedItems.filter((c) => c[this.keyField] != e.data.node.data[this.keyField]);
|
1644
|
-
}
|
1645
|
-
}
|
1646
|
-
}
|
1647
|
-
ngAfterViewInit() {
|
1648
|
-
this.selectedItems.forEach((ele) => {
|
1649
|
-
this.selectedRows.push(ele);
|
1650
|
-
});
|
1651
|
-
this.searchBox.focus();
|
1652
|
-
if (this.dataSource.onDataReceived) {
|
1653
|
-
this.dataSource.onDataReceived.subscribe((arg) => {
|
1654
|
-
this.cdr.markForCheck();
|
1655
|
-
this.cdr.detectChanges();
|
1656
|
-
});
|
1657
|
-
}
|
1658
|
-
}
|
1659
|
-
// onValueSearchChanged(e) {
|
1660
|
-
// const params: AXDataSourceReadParams = {}
|
1661
|
-
// params.searchText = e.value;
|
1662
|
-
// // params.take = 100;
|
1663
|
-
// // params.skip = 0
|
1664
|
-
// this.dataSource.fetch(params);
|
1665
|
-
// }
|
1666
|
-
getFooterButtons() {
|
1667
|
-
return [
|
1668
|
-
{
|
1669
|
-
text: AXTranslator.get('common.confirm'),
|
1670
|
-
name: 'confirm',
|
1671
|
-
style: 'ax primary',
|
1672
|
-
icon: 'far fa-check-circle'
|
1673
|
-
},
|
1674
|
-
{
|
1675
|
-
text: AXTranslator.get('common.cancel'),
|
1676
|
-
name: 'cancel',
|
1677
|
-
style: 'ax light',
|
1678
|
-
icon: 'far fa-times'
|
1679
|
-
}
|
1680
|
-
];
|
1681
|
-
}
|
1682
|
-
onFooterButtonClick(e) {
|
1683
|
-
if (e.name === 'confirm') {
|
1684
|
-
this.onDoneClick();
|
1685
|
-
}
|
1686
|
-
if (e.name === 'cancel') {
|
1687
|
-
this.onCancelClick();
|
1688
|
-
}
|
1689
|
-
}
|
1690
|
-
}
|
1691
|
-
AXDataLovPopupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXDataLovPopupComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
1692
|
-
AXDataLovPopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXDataLovPopupComponent, selector: "ng-component", viewQueries: [{ propertyName: "grid", first: true, predicate: ["grid"], descendants: true, static: true }, { propertyName: "searchBox", first: true, predicate: ["searchBox"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div style=\"height: 70vh; padding: 0.5em;\">\r\n <div style=\"height: calc(100%);\">\r\n\r\n <ax-data-grid [pagination]=\"pagination\" [rtl]=\"rtl\" [suppressRowClickSelection]=\"false\" [keyField]=\"keyField\"\r\n [hasChildField]=\"hasChildField\" [selectRow]=\"selectedItems\" #grid [columns]=\"columns\"\r\n [remoteOperation]=\"true\" [selectionMode]=\"selectionMode\" (rowDbClick)=\"rowDoubleClicked($event)\"\r\n (rowSelectionChange)=\"rowSelectionChange($event)\" [dataSource]=\"dataSource\">\r\n <ax-toolbar>\r\n <ax-toolbar-search #searchBox style=\"width: 100%;\"></ax-toolbar-search>\r\n </ax-toolbar>\r\n <ax-selection-column *ngIf=\"selectionMode== 'single'? false : true\"></ax-selection-column>\r\n <!-- <ax-data-source [provideData]=\"dataSource.provideData\">\r\n </ax-data-source> -->\r\n </ax-data-grid>\r\n </div>\r\n</div>", components: [{ type: AXDataGridComponent, selector: "ax-data-grid", inputs: ["remoteOperation", "rowMultiSelectWithClick", "suppressRowClickSelection", "suppressCellSelection", "sizeColumnsToFit", "showCheckBox", "floatingFilter", "selectionMode", "pagination", "selectRow", "rowGroupPanelShow", "loadOnInit", "keyField", "hasChildField", "searchText", "filter", "columns", "rowHeight", "dataSource", "groupHideOpenParents", "rowClass", "rtl"], outputs: ["columnsChange", "cellClick", "cellDbClick", "cellFocuse", "rowClick", "rowDbClick", "selectionChanged", "rowSelectionChange", "onRowSelectionChanged"] }, { type: i1$1.AXToolbarComponent, selector: "ax-toolbar" }, { type: i1$1.AXToolbarSearchComponent, selector: "ax-toolbar-search", inputs: ["text"], outputs: ["onValueChanged"] }, { type: AXGridSelectionColumn, selector: "ax-selection-column", inputs: ["condition", "pinned", "width"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
1693
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXDataLovPopupComponent, decorators: [{
|
1694
|
-
type: Component,
|
1695
|
-
args: [{ template: "<div style=\"height: 70vh; padding: 0.5em;\">\r\n <div style=\"height: calc(100%);\">\r\n\r\n <ax-data-grid [pagination]=\"pagination\" [rtl]=\"rtl\" [suppressRowClickSelection]=\"false\" [keyField]=\"keyField\"\r\n [hasChildField]=\"hasChildField\" [selectRow]=\"selectedItems\" #grid [columns]=\"columns\"\r\n [remoteOperation]=\"true\" [selectionMode]=\"selectionMode\" (rowDbClick)=\"rowDoubleClicked($event)\"\r\n (rowSelectionChange)=\"rowSelectionChange($event)\" [dataSource]=\"dataSource\">\r\n <ax-toolbar>\r\n <ax-toolbar-search #searchBox style=\"width: 100%;\"></ax-toolbar-search>\r\n </ax-toolbar>\r\n <ax-selection-column *ngIf=\"selectionMode== 'single'? false : true\"></ax-selection-column>\r\n <!-- <ax-data-source [provideData]=\"dataSource.provideData\">\r\n </ax-data-source> -->\r\n </ax-data-grid>\r\n </div>\r\n</div>" }]
|
1696
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { grid: [{
|
1697
|
-
type: ViewChild,
|
1698
|
-
args: ['grid', { static: true }]
|
1699
|
-
}], searchBox: [{
|
1700
|
-
type: ViewChild,
|
1701
|
-
args: ['searchBox']
|
1702
|
-
}] } });
|
1703
|
-
|
1704
|
-
class AXLOVComponent extends AXValidatableComponent {
|
1705
|
-
constructor(popup, ref) {
|
1706
|
-
super();
|
1707
|
-
this.popup = popup;
|
1708
|
-
this.ref = ref;
|
1709
|
-
this.textField = '';
|
1710
|
-
this.allowSearch = true;
|
1711
|
-
this.valueField = '';
|
1712
|
-
this.hasChildField = 'null';
|
1713
|
-
this.allowNull = true;
|
1714
|
-
this.popupSize = 'md';
|
1715
|
-
this.pagination = true;
|
1716
|
-
this.selectedItems = [];
|
1717
|
-
// @Input()
|
1718
|
-
// selectedValues: any[] = [];
|
1719
|
-
this.readonly = false;
|
1720
|
-
this.disabled = false;
|
1721
|
-
this.chipsWidth = '';
|
1722
|
-
this.size = 'md';
|
1723
|
-
this.mode = 'single';
|
1724
|
-
this.onSelectionChange = new EventEmitter();
|
1725
|
-
this.rtl = AXConfig.get('layout.rtl');
|
1726
|
-
}
|
1727
|
-
get validation() {
|
1728
|
-
return this._validation ? this._validation : this._contentValidation;
|
1729
|
-
}
|
1730
|
-
set validation(v) {
|
1731
|
-
this._validation = v;
|
1732
|
-
}
|
1733
|
-
focus() {
|
1734
|
-
this.selectBox.focus();
|
1735
|
-
}
|
1736
|
-
refresh() {
|
1737
|
-
this.selectBox.refresh();
|
1738
|
-
}
|
1739
|
-
handleButtonClick() {
|
1740
|
-
this.open();
|
1741
|
-
}
|
1742
|
-
ngOnInit() {
|
1743
|
-
if (this.rtl == null) {
|
1744
|
-
this.rtl = window.getComputedStyle(this.ref.nativeElement, null).getPropertyValue('direction') === 'rtl';
|
1745
|
-
}
|
1746
|
-
// this.selectVal = this.selectedValues;
|
1747
|
-
this.onSelectionChange.subscribe((c) => {
|
1748
|
-
this.clearValidationStyle(this.ref.nativeElement);
|
1749
|
-
});
|
1750
|
-
}
|
1751
|
-
ngAfterContentInit() {
|
1752
|
-
this.initValidation(this.ref, 'selectedItems', this.validation);
|
1753
|
-
}
|
1754
|
-
handleSelectChange(e) {
|
1755
|
-
this.onSelectionChange.emit({ data: this.selectedItems, component: this, htmlElement: this.ref.nativeElement });
|
1756
|
-
}
|
1757
|
-
open() {
|
1758
|
-
return new Promise((resolve) => {
|
1759
|
-
this.selectBox.dropdown.close();
|
1760
|
-
this.popup
|
1761
|
-
.open(AXDataLovPopupComponent, {
|
1762
|
-
size: this.popupSize,
|
1763
|
-
// closable: false,
|
1764
|
-
data: {
|
1765
|
-
dataSource: this.dataSource,
|
1766
|
-
selectionMode: this.mode,
|
1767
|
-
columns: this.columns.toArray(),
|
1768
|
-
// selectedItems: this.selectedValues,
|
1769
|
-
selectedItems: this.selectedItems,
|
1770
|
-
keyField: this.valueField,
|
1771
|
-
allowNull: this.allowNull,
|
1772
|
-
hasChildField: this.hasChildField,
|
1773
|
-
rtl: this.rtl,
|
1774
|
-
pagination: this.pagination
|
1775
|
-
},
|
1776
|
-
title: this.caption
|
1777
|
-
// size: this.size,
|
1778
|
-
})
|
1779
|
-
.then((c) => {
|
1780
|
-
if (c.data) {
|
1781
|
-
// this.selectedValues = [];
|
1782
|
-
this.selectedItems = [];
|
1783
|
-
c.data.forEach((elm) => {
|
1784
|
-
this.selectedItems.push(elm);
|
1785
|
-
});
|
1786
|
-
// this.selectedItems = c.data;
|
1787
|
-
// this.selectBox.refresh();
|
1788
|
-
this.onSelectionChange.emit({ data: this.selectedItems, component: this, htmlElement: this.ref.nativeElement });
|
1789
|
-
if (resolve) {
|
1790
|
-
resolve(c.data);
|
1791
|
-
}
|
1792
|
-
}
|
1793
|
-
else {
|
1794
|
-
if (resolve) {
|
1795
|
-
resolve(this.selectedItems);
|
1796
|
-
}
|
1797
|
-
}
|
1798
|
-
this.selectBox.refresh();
|
1799
|
-
});
|
1800
|
-
});
|
1801
|
-
}
|
1802
|
-
}
|
1803
|
-
AXLOVComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXLOVComponent, deps: [{ token: i1$1.AXPopupService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
1804
|
-
AXLOVComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXLOVComponent, selector: "ax-lov", inputs: { validation: "validation", textField: "textField", allowSearch: "allowSearch", valueField: "valueField", hasChildField: "hasChildField", allowNull: "allowNull", popupSize: "popupSize", pagination: "pagination", selectedItems: "selectedItems", readonly: "readonly", disabled: "disabled", chipsWidth: "chipsWidth", size: "size", caption: "caption", mode: "mode", placeholder: "placeholder", rtl: "rtl" }, outputs: { onSelectionChange: "onSelectionChange" }, host: { styleAttribute: "width: 100%" }, providers: [{ provide: AXValidatableComponent, useExisting: AXLOVComponent }], queries: [{ propertyName: "_contentValidation", first: true, predicate: AXValidation, descendants: true, static: true }, { propertyName: "dataSource", first: true, predicate: AXDataSourceComponent, descendants: true, static: true }, { propertyName: "rowTemplate", first: true, predicate: ["itemTemplate"], descendants: true, static: true }, { propertyName: "columns", predicate: AXGridDataColumn }], viewQueries: [{ propertyName: "selectBox", first: true, predicate: ["selectBox"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ax-select-box [rowInputTemplate]=\"rowTemplate\" [rtl]=\"rtl\" [allowSearch]=\"allowSearch\" #selectBox [showDropDownButton]=\"false\" [allowNull]=\"allowNull\"\r\n [remoteOperation]=\"true\" [placeholder]=\"placeholder\" [size]=\"size\" [textField]=\"textField\" [valueField]=\"valueField\"\r\n [disabled]=\"disabled\" [mode]=\"mode\" [(selectedItems)]=\"selectedItems\"\r\n (selectionChanged)=\"handleSelectChange($event)\" [dataSource]=\"dataSource\">\r\n <ng-container start>\r\n <ng-content select=\"[start]\">\r\n </ng-content>\r\n </ng-container>\r\n <ng-container end>\r\n <ax-button icon=\"far fa-bars icon\" [disabled]=\"disabled\" type=\"light blank\" (click)=\"handleButtonClick()\" end\r\n [tabIndex]=\"-1\">\r\n </ax-button>\r\n <ng-content select=\"[end]\">\r\n </ng-content>\r\n </ng-container>\r\n</ax-select-box>\r\n\r\n\r\n<!-- <ax-select-box2 [rtl]=\"rtl\" [allowSearch]=\"allowSearch\" #selectBox [showDropDownButton]=\"false\" [allowNull]=\"allowNull\"\r\n [remoteOperation]=\"true\" [placeholder]=\"placeholder\" [size]=\"size\" [textField]=\"textField\" [valueField]=\"valueField\"\r\n [disabled]=\"disabled\" [selectionMode]=\"mode\" (onValueChanged)=\"handleSelectChange($event)\" [dataSource]=\"dataSource\"\r\n [(value)]=\"selectedItems\" selectionDataMode=\"item\">\r\n <ng-container start>\r\n <ng-content select=\"[start]\">\r\n </ng-content>\r\n </ng-container>\r\n <ng-container end>\r\n <ax-button icon=\"far fa-bars icon\" [disabled]=\"disabled\" type=\"primary blank\" (click)=\"handleButtonClick()\" end\r\n [tabIndex]=\"-1\">\r\n </ax-button>\r\n <ng-content select=\"[end]\">\r\n </ng-content>\r\n </ng-container>\r\n</ax-select-box2> -->\r\n\r\n\r\n<!-- <div class=\"ax-lov-box\" [style.display]=\"mode=='hidden' ? 'none':'unset'\">\r\n <div class=\"ax-field-set\">\r\n <div class=\"ax-field-set-wrapper\" [ngClass]=\"{ 'no-label': !label }\">\r\n <fieldset [ngClass]=\"{ 'input-focused': isFocused, 'input-error': errorText }\">\r\n <legend *ngIf=\"label\">\r\n {{ label }}\r\n </legend>\r\n </fieldset>\r\n <input type=\"text\" [(ngModel)]=\"text\" [placeholder]=\"placeholder\" (keyup)=\"handleKeyEvent($event)\"\r\n (blur)=\"handleBlurEvent($event)\" (focus)=\"handleFocusEvent($event)\" class=\"ax-text-box\" disabled />\r\n <div class=\"ax-field-set-button\">\r\n <button *ngIf=\"text && allowClear\" type=\"button\" class=\"btn btn-light\" (click)=\"clearText()\">\r\n <i class=\"far fa-times\"></i>\r\n </button>\r\n <button type=\"button\" class=\" btn btn-primary\" (click)=\"handleButtonClick($event)\">\r\n <i class=\"far fa-check-circle\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"validation-text\" *ngIf=\"errorText\">\r\n {{ errorText }}\r\n </div>\r\n\r\n</div> -->", components: [{ type: i1$1.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["showDropDownButton", "rowInputTemplate", "showCheckBox", "readonly", "rtl", "disabled", "placeholder", "size", "allowNull", "textAlign", "bufferSize", "remoteOperation", "fitParent", "dropdownWidth", "dataSource", "validation", "disabledCallback", "allowSearch", "textField", "valueField", "disabledField", "mode", "items", "selectedItems", "selectedValues"], outputs: ["dropdownToggle", "itemsChange", "onBlur", "onFocus", "selectionChanged", "selectedItemsChange", "selectedValuesChange"] }, { type: i1$1.AXButtonComponent, selector: "ax-button", inputs: ["type", "icon", "submitBehavior", "cancelBehavior", "block", "loading", "selected"] }], encapsulation: i0.ViewEncapsulation.None });
|
1805
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXLOVComponent, decorators: [{
|
1806
|
-
type: Component,
|
1807
|
-
args: [{ selector: 'ax-lov', encapsulation: ViewEncapsulation.None, host: { style: 'width: 100%' }, providers: [{ provide: AXValidatableComponent, useExisting: AXLOVComponent }], template: "<ax-select-box [rowInputTemplate]=\"rowTemplate\" [rtl]=\"rtl\" [allowSearch]=\"allowSearch\" #selectBox [showDropDownButton]=\"false\" [allowNull]=\"allowNull\"\r\n [remoteOperation]=\"true\" [placeholder]=\"placeholder\" [size]=\"size\" [textField]=\"textField\" [valueField]=\"valueField\"\r\n [disabled]=\"disabled\" [mode]=\"mode\" [(selectedItems)]=\"selectedItems\"\r\n (selectionChanged)=\"handleSelectChange($event)\" [dataSource]=\"dataSource\">\r\n <ng-container start>\r\n <ng-content select=\"[start]\">\r\n </ng-content>\r\n </ng-container>\r\n <ng-container end>\r\n <ax-button icon=\"far fa-bars icon\" [disabled]=\"disabled\" type=\"light blank\" (click)=\"handleButtonClick()\" end\r\n [tabIndex]=\"-1\">\r\n </ax-button>\r\n <ng-content select=\"[end]\">\r\n </ng-content>\r\n </ng-container>\r\n</ax-select-box>\r\n\r\n\r\n<!-- <ax-select-box2 [rtl]=\"rtl\" [allowSearch]=\"allowSearch\" #selectBox [showDropDownButton]=\"false\" [allowNull]=\"allowNull\"\r\n [remoteOperation]=\"true\" [placeholder]=\"placeholder\" [size]=\"size\" [textField]=\"textField\" [valueField]=\"valueField\"\r\n [disabled]=\"disabled\" [selectionMode]=\"mode\" (onValueChanged)=\"handleSelectChange($event)\" [dataSource]=\"dataSource\"\r\n [(value)]=\"selectedItems\" selectionDataMode=\"item\">\r\n <ng-container start>\r\n <ng-content select=\"[start]\">\r\n </ng-content>\r\n </ng-container>\r\n <ng-container end>\r\n <ax-button icon=\"far fa-bars icon\" [disabled]=\"disabled\" type=\"primary blank\" (click)=\"handleButtonClick()\" end\r\n [tabIndex]=\"-1\">\r\n </ax-button>\r\n <ng-content select=\"[end]\">\r\n </ng-content>\r\n </ng-container>\r\n</ax-select-box2> -->\r\n\r\n\r\n<!-- <div class=\"ax-lov-box\" [style.display]=\"mode=='hidden' ? 'none':'unset'\">\r\n <div class=\"ax-field-set\">\r\n <div class=\"ax-field-set-wrapper\" [ngClass]=\"{ 'no-label': !label }\">\r\n <fieldset [ngClass]=\"{ 'input-focused': isFocused, 'input-error': errorText }\">\r\n <legend *ngIf=\"label\">\r\n {{ label }}\r\n </legend>\r\n </fieldset>\r\n <input type=\"text\" [(ngModel)]=\"text\" [placeholder]=\"placeholder\" (keyup)=\"handleKeyEvent($event)\"\r\n (blur)=\"handleBlurEvent($event)\" (focus)=\"handleFocusEvent($event)\" class=\"ax-text-box\" disabled />\r\n <div class=\"ax-field-set-button\">\r\n <button *ngIf=\"text && allowClear\" type=\"button\" class=\"btn btn-light\" (click)=\"clearText()\">\r\n <i class=\"far fa-times\"></i>\r\n </button>\r\n <button type=\"button\" class=\" btn btn-primary\" (click)=\"handleButtonClick($event)\">\r\n <i class=\"far fa-check-circle\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"validation-text\" *ngIf=\"errorText\">\r\n {{ errorText }}\r\n </div>\r\n\r\n</div> -->" }]
|
1808
|
-
}], ctorParameters: function () { return [{ type: i1$1.AXPopupService }, { type: i0.ElementRef }]; }, propDecorators: { _contentValidation: [{
|
1809
|
-
type: ContentChild,
|
1810
|
-
args: [AXValidation, { static: true }]
|
1811
|
-
}], validation: [{
|
1812
|
-
type: Input
|
1813
|
-
}], selectBox: [{
|
1814
|
-
type: ViewChild,
|
1815
|
-
args: ['selectBox', { static: true }]
|
1816
|
-
}], dataSource: [{
|
1817
|
-
type: ContentChild,
|
1818
|
-
args: [AXDataSourceComponent, { static: true }]
|
1819
|
-
}], columns: [{
|
1820
|
-
type: ContentChildren,
|
1821
|
-
args: [AXGridDataColumn]
|
1822
|
-
}], rowTemplate: [{
|
1823
|
-
type: ContentChild,
|
1824
|
-
args: ['itemTemplate', { static: true }]
|
1825
|
-
}], textField: [{
|
1826
|
-
type: Input
|
1827
|
-
}], allowSearch: [{
|
1828
|
-
type: Input
|
1829
|
-
}], valueField: [{
|
1830
|
-
type: Input
|
1831
|
-
}], hasChildField: [{
|
1832
|
-
type: Input
|
1833
|
-
}], allowNull: [{
|
1834
|
-
type: Input
|
1835
|
-
}], popupSize: [{
|
1836
|
-
type: Input
|
1837
|
-
}], pagination: [{
|
1838
|
-
type: Input
|
1839
|
-
}], selectedItems: [{
|
1840
|
-
type: Input
|
1841
|
-
}], readonly: [{
|
1842
|
-
type: Input
|
1843
|
-
}], disabled: [{
|
1844
|
-
type: Input
|
1845
|
-
}], chipsWidth: [{
|
1846
|
-
type: Input
|
1847
|
-
}], size: [{
|
1848
|
-
type: Input
|
1849
|
-
}], caption: [{
|
1850
|
-
type: Input
|
1851
|
-
}], mode: [{
|
1852
|
-
type: Input
|
1853
|
-
}], placeholder: [{
|
1854
|
-
type: Input
|
1855
|
-
}], onSelectionChange: [{
|
1856
|
-
type: Output
|
1857
|
-
}], rtl: [{
|
1858
|
-
type: Input
|
1859
|
-
}] } });
|
1860
|
-
|
1861
|
-
class AXLOVModule {
|
1862
|
-
}
|
1863
|
-
AXLOVModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXLOVModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1864
|
-
AXLOVModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXLOVModule, declarations: [AXLOVComponent, AXDataLovPopupComponent], imports: [CommonModule, FormsModule, AXDataGridModule, AXDataSourceModule, AXButtonModule, AXToolbarModule, AXSelectBoxModule, AXSearchBoxModule], exports: [AXLOVComponent, AXDataLovPopupComponent] });
|
1865
|
-
AXLOVModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXLOVModule, providers: [], imports: [[CommonModule, FormsModule, AXDataGridModule, AXDataSourceModule, AXButtonModule, AXToolbarModule, AXSelectBoxModule, AXSearchBoxModule]] });
|
1866
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXLOVModule, decorators: [{
|
1867
|
-
type: NgModule,
|
1868
|
-
args: [{
|
1869
|
-
declarations: [AXLOVComponent, AXDataLovPopupComponent],
|
1870
|
-
imports: [CommonModule, FormsModule, AXDataGridModule, AXDataSourceModule, AXButtonModule, AXToolbarModule, AXSelectBoxModule, AXSearchBoxModule],
|
1871
|
-
exports: [AXLOVComponent, AXDataLovPopupComponent],
|
1872
|
-
providers: []
|
1873
|
-
}]
|
1874
|
-
}] });
|
1875
|
-
|
1876
|
-
/**
|
1877
|
-
* Generated bundle index. Do not edit.
|
1878
|
-
*/
|
1879
|
-
|
1880
|
-
export { AXDaagridRowClickEvent, AXDataGridCellEvent, AXDataGridCellTemplateComponent, AXDataGridCellTemplateRenderer, AXDataGridColumnsChangeEvent, AXDataGridComponent, AXDataGridDetailTemplateComponent, AXDataGridDetailTemplateRenderer, AXDataGridFilterComponent, AXDataGridModule, AXDataGridRowSelectionChangeEvent, AXDataGridRowTemplateComponent, AXDataGridRowTemplateRenderer, AXDataGridSelectionChangeEvent, AXDataLovPopupComponent, AXDatePickerFilterComponent, AXGridCheckColumn, AXGridCommandColumn, AXGridDataColumn, AXGridDateColumn, AXGridRowNumberColumn, AXGridSelectionColumn, AXGridTextColumn, AXLOVComponent, AXLOVModule, BooleanFilterRenderer, BooleanRenderer, CommandRenderer, TextFilterRenderer };
|
1881
|
-
//# sourceMappingURL=acorex-data-grid.mjs.map
|