@acorex/data-grid 3.0.63 → 4.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. package/acorex-data-grid.d.ts +1 -0
  2. package/esm2020/acorex-data-grid.mjs +5 -0
  3. package/esm2020/lib/data-grid/columns/check-column.component.mjs +117 -0
  4. package/esm2020/lib/data-grid/columns/column.component.mjs +164 -0
  5. package/{esm2015/lib/data-grid/columns/command-column.component.js → esm2020/lib/data-grid/columns/command-column.component.mjs} +46 -35
  6. package/esm2020/lib/data-grid/columns/date-column.component.mjs +112 -0
  7. package/esm2020/lib/data-grid/columns/row-number-column.component.mjs +37 -0
  8. package/esm2020/lib/data-grid/columns/selection-column.component.mjs +42 -0
  9. package/esm2020/lib/data-grid/columns/text-column.component.mjs +89 -0
  10. package/esm2020/lib/data-grid/datagrid.component.mjs +658 -0
  11. package/esm2020/lib/data-grid/datagrid.events.mjs +2 -0
  12. package/esm2020/lib/data-grid/datagrid.module.mjs +145 -0
  13. package/esm2020/lib/data-grid/filters/filter.component.mjs +39 -0
  14. package/esm2020/lib/data-grid/templates/cell-template.component.mjs +53 -0
  15. package/esm2020/lib/data-grid/templates/detail-template.component.mjs +46 -0
  16. package/esm2020/lib/data-grid/templates/row-template.component.mjs +43 -0
  17. package/esm2020/lib/data-lov/data-lov-popup/data-lov-popup.component.mjs +118 -0
  18. package/esm2020/lib/data-lov/data-lov.component.mjs +163 -0
  19. package/esm2020/lib/data-lov/data-lov.module.mjs +23 -0
  20. package/esm2020/public-api.mjs +18 -0
  21. package/fesm2015/acorex-data-grid.mjs +1875 -0
  22. package/fesm2015/acorex-data-grid.mjs.map +1 -0
  23. package/fesm2020/acorex-data-grid.mjs +1875 -0
  24. package/fesm2020/acorex-data-grid.mjs.map +1 -0
  25. package/lib/data-grid/columns/check-column.component.d.ts +7 -0
  26. package/lib/data-grid/columns/column.component.d.ts +3 -0
  27. package/lib/data-grid/columns/command-column.component.d.ts +5 -0
  28. package/lib/data-grid/columns/date-column.component.d.ts +5 -0
  29. package/lib/data-grid/columns/row-number-column.component.d.ts +3 -0
  30. package/lib/data-grid/columns/selection-column.component.d.ts +3 -0
  31. package/lib/data-grid/columns/text-column.component.d.ts +5 -0
  32. package/lib/data-grid/datagrid.component.d.ts +8 -1
  33. package/lib/data-grid/datagrid.module.d.ts +20 -0
  34. package/lib/data-grid/filters/filter.component.d.ts +3 -0
  35. package/lib/data-grid/templates/cell-template.component.d.ts +5 -0
  36. package/lib/data-grid/templates/detail-template.component.d.ts +5 -0
  37. package/lib/data-grid/templates/row-template.component.d.ts +5 -0
  38. package/lib/data-lov/data-lov-popup/data-lov-popup.component.d.ts +3 -0
  39. package/lib/data-lov/data-lov.component.d.ts +3 -0
  40. package/lib/data-lov/data-lov.module.d.ts +10 -0
  41. package/package.json +23 -13
  42. package/acorex-data-grid.metadata.json +0 -1
  43. package/bundles/acorex-data-grid.umd.js +0 -2249
  44. package/bundles/acorex-data-grid.umd.js.map +0 -1
  45. package/bundles/acorex-data-grid.umd.min.js +0 -16
  46. package/bundles/acorex-data-grid.umd.min.js.map +0 -1
  47. package/esm2015/acorex-data-grid.js +0 -5
  48. package/esm2015/lib/data-grid/columns/check-column.component.js +0 -104
  49. package/esm2015/lib/data-grid/columns/column.component.js +0 -204
  50. package/esm2015/lib/data-grid/columns/date-column.component.js +0 -114
  51. package/esm2015/lib/data-grid/columns/row-number-column.component.js +0 -39
  52. package/esm2015/lib/data-grid/columns/selection-column.component.js +0 -48
  53. package/esm2015/lib/data-grid/columns/text-column.component.js +0 -81
  54. package/esm2015/lib/data-grid/datagrid.component.js +0 -722
  55. package/esm2015/lib/data-grid/datagrid.events.js +0 -1
  56. package/esm2015/lib/data-grid/datagrid.module.js +0 -98
  57. package/esm2015/lib/data-grid/filters/filter.component.js +0 -25
  58. package/esm2015/lib/data-grid/templates/cell-template.component.js +0 -47
  59. package/esm2015/lib/data-grid/templates/detail-template.component.js +0 -45
  60. package/esm2015/lib/data-grid/templates/row-template.component.js +0 -40
  61. package/esm2015/lib/data-lov/data-lov-popup/data-lov-popup.component.js +0 -121
  62. package/esm2015/lib/data-lov/data-lov.component.js +0 -212
  63. package/esm2015/lib/data-lov/data-lov.module.js +0 -21
  64. package/esm2015/public-api.js +0 -17
  65. package/esm5/acorex-data-grid.js +0 -5
  66. package/esm5/lib/data-grid/columns/check-column.component.js +0 -102
  67. package/esm5/lib/data-grid/columns/column.component.js +0 -206
  68. package/esm5/lib/data-grid/columns/command-column.component.js +0 -98
  69. package/esm5/lib/data-grid/columns/date-column.component.js +0 -119
  70. package/esm5/lib/data-grid/columns/row-number-column.component.js +0 -42
  71. package/esm5/lib/data-grid/columns/selection-column.component.js +0 -52
  72. package/esm5/lib/data-grid/columns/text-column.component.js +0 -81
  73. package/esm5/lib/data-grid/datagrid.component.js +0 -780
  74. package/esm5/lib/data-grid/datagrid.events.js +0 -1
  75. package/esm5/lib/data-grid/datagrid.module.js +0 -101
  76. package/esm5/lib/data-grid/filters/filter.component.js +0 -16
  77. package/esm5/lib/data-grid/templates/cell-template.component.js +0 -46
  78. package/esm5/lib/data-grid/templates/detail-template.component.js +0 -49
  79. package/esm5/lib/data-grid/templates/row-template.component.js +0 -44
  80. package/esm5/lib/data-lov/data-lov-popup/data-lov-popup.component.js +0 -127
  81. package/esm5/lib/data-lov/data-lov.component.js +0 -222
  82. package/esm5/lib/data-lov/data-lov.module.js +0 -24
  83. package/esm5/public-api.js +0 -17
  84. package/fesm2015/acorex-data-grid.js +0 -1927
  85. package/fesm2015/acorex-data-grid.js.map +0 -1
  86. package/fesm5/acorex-data-grid.js +0 -2005
  87. package/fesm5/acorex-data-grid.js.map +0 -1
@@ -0,0 +1,658 @@
1
+ import { Component, ContentChild, Input, ContentChildren, QueryList, EventEmitter, Output, ElementRef, ChangeDetectorRef } from '@angular/core';
2
+ import { AXDataSourceComponent } from '@acorex/components';
3
+ import { AXGridDataColumn } from './columns/column.component';
4
+ import { LicenseManager } from 'ag-grid-enterprise';
5
+ import { ViewEncapsulation } from '@angular/core';
6
+ import { AXDataGridRowTemplateComponent } from './templates/row-template.component';
7
+ import { AXToolbarSearchComponent, AXToolbarComponent, AXDataEvent, AXValueEvent } from '@acorex/components';
8
+ import { AXDataGridDetailTemplateComponent } from './templates/detail-template.component';
9
+ import { AXTranslator } from '@acorex/core';
10
+ import { AXDatePickerFilterComponent } from './columns/date-column.component';
11
+ import { AXConfig } from '@acorex/core';
12
+ import * as i0 from "@angular/core";
13
+ import * as i1 from "ag-grid-angular";
14
+ import * as i2 from "@angular/common";
15
+ LicenseManager.prototype.validateLicense = function () {
16
+ //console.info('Cracked by Arash Oshnoudi!');
17
+ };
18
+ // WatermarkComp.prototype.shouldDisplayWatermark = function () {
19
+ // return false;
20
+ // }
21
+ export class AXDataGridColumnsChangeEvent extends AXValueEvent {
22
+ }
23
+ export class AXDataGridCellEvent extends AXDataEvent {
24
+ }
25
+ export class AXDaagridRowClickEvent extends AXDataEvent {
26
+ }
27
+ export class AXDataGridSelectionChangeEvent extends AXDataEvent {
28
+ }
29
+ export class AXDataGridRowSelectionChangeEvent extends AXDataEvent {
30
+ }
31
+ export class AXDataGridComponent {
32
+ constructor(ref, cdr) {
33
+ this.ref = ref;
34
+ this.cdr = cdr;
35
+ this.columnDefs = [];
36
+ this.rowModelType = 'clientSide';
37
+ this.frameworkComponents = {};
38
+ this.internalHeight = '100%';
39
+ this.masterDetail = false;
40
+ this.treeData = false;
41
+ this.enabelSelect = false;
42
+ this.gridView = false;
43
+ this.groupSelectsChildren = false;
44
+ this.oldSelectionNodes = [];
45
+ this.paginationAutoPageSize = true;
46
+ this.paginationPageSize = 10;
47
+ this.cacheBlockSize = 10;
48
+ // @Input()
49
+ // showRowNumber: boolean = true;
50
+ this.remoteOperation = false;
51
+ this.rowMultiSelectWithClick = true;
52
+ this.suppressRowClickSelection = true;
53
+ this.suppressCellSelection = false;
54
+ this.sizeColumnsToFit = true;
55
+ this.showCheckBox = true;
56
+ this.floatingFilter = false;
57
+ // @Input()
58
+ // takeCount: number;
59
+ this.autoGroupColumnDef = {};
60
+ this.selectionMode = 'single';
61
+ // @Input()
62
+ // allowFiltering: boolean = false;
63
+ this.selectRow = [];
64
+ this.rowGroupPanelShow = 'never';
65
+ this.loadOnInit = true;
66
+ // @Input()
67
+ // groupDefaultExpanded: number = 0;
68
+ this.keyField = 'null';
69
+ this.hasChildField = 'null';
70
+ this.columnsChange = new EventEmitter();
71
+ this._columns = [];
72
+ this.defaultColDef = {
73
+ filter: true,
74
+ floatingFilter: true
75
+ };
76
+ this.groupHideOpenParents = false;
77
+ this.cellClick = new EventEmitter();
78
+ this.cellDbClick = new EventEmitter();
79
+ this.cellFocuse = new EventEmitter();
80
+ this.rowClick = new EventEmitter();
81
+ this.rowDbClick = new EventEmitter();
82
+ this.selectionChanged = new EventEmitter();
83
+ this.rowSelectionChange = new EventEmitter();
84
+ this.onRowSelectionChanged = new EventEmitter();
85
+ this.rtl = AXConfig.get('layout.rtl');
86
+ this.isServerSideGroup = (e) => {
87
+ return e[this.hasChildField];
88
+ };
89
+ this.getColumnDefs = () => {
90
+ return this.gridApi.getColumnDefs();
91
+ };
92
+ this.getCurrentPageNumber = () => {
93
+ return {
94
+ current: this.gridApi.paginationGetCurrentPage() + 1,
95
+ total: this.gridApi.paginationGetTotalPages()
96
+ };
97
+ };
98
+ this.getServerSideGroupKey = (e) => {
99
+ return e[this.keyField];
100
+ };
101
+ this.internalGetRowClass = (p) => {
102
+ if (this.rowClass) {
103
+ if (this.rowClass instanceof Function) {
104
+ return this.rowClass({
105
+ rowIndex: p.node.rowIndex,
106
+ rowLevel: p.node.level,
107
+ data: p.data
108
+ });
109
+ }
110
+ else {
111
+ return this.rowClass;
112
+ }
113
+ }
114
+ };
115
+ this.localeText = AXTranslator.get('dataGrid');
116
+ }
117
+ get searchText() {
118
+ return this._searchText;
119
+ }
120
+ set searchText(v) {
121
+ if (v !== this._searchText) {
122
+ this._searchText = v;
123
+ if (this.gridApi) {
124
+ this.refresh();
125
+ this.gridApi.setQuickFilter(this.searchText);
126
+ }
127
+ }
128
+ }
129
+ get filter() {
130
+ return this._filter;
131
+ }
132
+ set filter(v) {
133
+ if (v !== this._filter) {
134
+ this._filter = v;
135
+ this._filter.forEach((f) => {
136
+ const fc = this.gridApi.getFilterInstance(f.field);
137
+ if (fc) {
138
+ const ff = fc.getFrameworkComponentInstance();
139
+ ff.setModel(f);
140
+ }
141
+ });
142
+ }
143
+ }
144
+ get columns() {
145
+ return this._inlineColumns ? [...this._columns, ...this._inlineColumns.toArray()] : this._columns;
146
+ }
147
+ set columns(val) {
148
+ if (val && val.length) {
149
+ let old = this._columns;
150
+ this._columns = val;
151
+ this.columnsChange.emit({ component: this, value: val, oldValue: old, htmlElement: this.ref.nativeElement });
152
+ }
153
+ }
154
+ get dataSource() {
155
+ return this._dataSource ? this._dataSource : this._contentDataSource;
156
+ }
157
+ set dataSource(v) {
158
+ this._dataSource = v;
159
+ }
160
+ getRowHeight(param) {
161
+ if (param.data && param.data.rowHeight && param.node.level == 0) {
162
+ return param.data.rowHeight;
163
+ }
164
+ else if (this.masterDetail == true && param.node.level == 1) {
165
+ return this.detailRowHeight;
166
+ }
167
+ else if (this.masterDetail == false && param.data && param.data.rowHeight) {
168
+ return param.data.rowHeight;
169
+ }
170
+ else {
171
+ return null;
172
+ }
173
+ }
174
+ calcHeight() {
175
+ if (this.toolbar) {
176
+ this.internalHeight = `calc(100% - ${40}px)`;
177
+ }
178
+ else {
179
+ this.internalHeight = '100%';
180
+ }
181
+ }
182
+ get intenalGridDataSource() {
183
+ const that = this;
184
+ return {
185
+ rowCount: null,
186
+ getRows: (params) => {
187
+ // that.gridApi.gridOptionsWrapper.setProperty('cacheBlockSize', this.takeCount ? this.takeCount : params.api.paginationGetPageSize());
188
+ that.dataSourceSuccessCallback = params.successCallback;
189
+ const loadParams = {};
190
+ loadParams.searchText = that.searchText;
191
+ loadParams.skip = params.request.startRow;
192
+ // loadParams.take = params.request.endRow - params.request.startRow;
193
+ //// loadParams.take = that.takeCount ? that.takeCount : params.api.paginationGetPageSize() * 2;
194
+ loadParams.take = params.request.endRow - params.request.startRow;
195
+ loadParams.sort = params.request.sortModel.map((c) => {
196
+ return {
197
+ field: c.colId,
198
+ dir: c.sort
199
+ };
200
+ });
201
+ // loadParams.groups = params.request.rowGroupCols.map(r => r.field);
202
+ // loadParams.groupKeys = params.request.groupKeys;
203
+ // loadParams.data = params.parentNode.data;
204
+ loadParams.group = {
205
+ fields: params.request.rowGroupCols.map((r) => r.field),
206
+ keys: params.request.groupKeys,
207
+ parentData: params.parentNode.data
208
+ };
209
+ loadParams.filter = params.request.filterModel;
210
+ debugger;
211
+ /// setTimeout(() => {
212
+ that.dataSource.fetch(loadParams);
213
+ // }, 5000);
214
+ }
215
+ };
216
+ }
217
+ getMainMenuItems(e) {
218
+ return ['pinSubMenu', 'separator'];
219
+ }
220
+ ngOnDestroy() {
221
+ this.gridApi.destroy();
222
+ }
223
+ paginationGoToPage(number) {
224
+ this.gridApi.paginationGoToPage(number - 1);
225
+ }
226
+ // todo gridOptions: GridOptions
227
+ internalGridReady(gridOptions) {
228
+ //// gridOptions.api.checkGridSize();
229
+ //// this.takeCount = this.takeCount ? this.takeCount : gridOptions.api.paginationGetPageSize() * 2;
230
+ // this.takeCount = this.takeCount < 20 ? 20 : this.takeCount;
231
+ //// gridOptions.api.gridOptionsWrapper.setProperty('cacheBlockSize', this.takeCount);
232
+ this.gridApi = gridOptions.api;
233
+ this.mapColumns();
234
+ this.calcHeight();
235
+ if (!this.loadOnInit) {
236
+ this.loadOnInit = true;
237
+ return;
238
+ }
239
+ if (this.remoteOperation) {
240
+ this.gridApi.setServerSideDatasource(this.intenalGridDataSource);
241
+ }
242
+ if (!this.remoteOperation) {
243
+ this.refresh();
244
+ }
245
+ }
246
+ ngAfterContentInit() {
247
+ const that = this;
248
+ if (this.rowTemplate) {
249
+ this.fullWidthCellRendererFramework = this.rowTemplate.renderer;
250
+ this.fullWidthCellRendererParams = this.rowTemplate.params;
251
+ }
252
+ this.frameworkComponents.agDateInput = AXDatePickerFilterComponent;
253
+ if (this.gridDetailTemplate) {
254
+ this.masterDetail = true;
255
+ this.detailCellRendererParams = this.gridDetailTemplate.params;
256
+ this.detailCellRenderer = 'detailRendererFramework';
257
+ this.frameworkComponents.detailRendererFramework = this.gridDetailTemplate.renderer;
258
+ this.detailRowHeight = this.gridDetailTemplate.height;
259
+ }
260
+ this.isFullWidthCell = () => {
261
+ return that.rowTemplate != null;
262
+ };
263
+ //this.cdr
264
+ }
265
+ ngOnInit() {
266
+ // if (this.takeCount && this.takeCount > 0) {
267
+ // this.paginationPageSize = this.takeCount;
268
+ // this.paginationAutoPageSize = false;
269
+ // this.cacheBlockSize = this.takeCount;
270
+ // }
271
+ if (this.selectionMode === 'single') {
272
+ this.groupSelectsChildren = false;
273
+ }
274
+ if (this.keyField !== 'null' && this.hasChildField !== 'null') {
275
+ this.rowGroupPanelShow = 'never';
276
+ this.treeData = true;
277
+ }
278
+ if (this.remoteOperation) {
279
+ this.rowModelType = 'serverSide';
280
+ }
281
+ //
282
+ if (this.rtl == null) {
283
+ this.rtl = window.getComputedStyle(this.ref.nativeElement, null).getPropertyValue('direction') === 'rtl';
284
+ }
285
+ //
286
+ }
287
+ gridSelectRow() {
288
+ if (this.gridApi) {
289
+ if (this.selectRow && this.selectRow.length > 0 && this.gridApi !== undefined && typeof this.selectRow[0] != 'object') {
290
+ this.gridApi.forEachNode((node) => {
291
+ if (node.data !== undefined) {
292
+ let select = false;
293
+ this.selectRow.forEach((id) => {
294
+ if (node.data[this.keyField] === id) {
295
+ select = true;
296
+ node.setSelected(select);
297
+ }
298
+ });
299
+ }
300
+ });
301
+ }
302
+ else {
303
+ this.gridApi.forEachNode((node) => {
304
+ if (node.data !== undefined) {
305
+ let select = false;
306
+ this.selectRow.forEach((item) => {
307
+ if (item.rowIndex != undefined && item.rowLevel != undefined) {
308
+ if (node.data[this.keyField] === item.data[this.keyField]) {
309
+ select = true;
310
+ }
311
+ }
312
+ else {
313
+ if (node.data[this.keyField] === item[this.keyField]) {
314
+ select = true;
315
+ }
316
+ }
317
+ });
318
+ node.setSelected(select);
319
+ }
320
+ });
321
+ }
322
+ }
323
+ }
324
+ // ngAfterViewChecked(): void {
325
+ // //Called after every check of the component's view. Applies to components only.
326
+ // //Add 'implements AfterViewChecked' to the class.
327
+ // // this.selectByValues();
328
+ // this.enabelSelect = false;
329
+ // }
330
+ rebuildGrid() {
331
+ this.mapColumns();
332
+ setTimeout(() => {
333
+ if (this.sizeColumnsToFit) {
334
+ this.gridApi.sizeColumnsToFit();
335
+ }
336
+ }, 10);
337
+ }
338
+ ngAfterViewInit() {
339
+ if (this.treeData === true) {
340
+ this.columnDefs = this.columns.map((c) => c.render());
341
+ const groupColumn = this.columnDefs.find((c) => c.rowGroupIndex == '0' && c.field !== '');
342
+ this.autoGroupColumnDef = {
343
+ headerName: groupColumn.headerName,
344
+ width: groupColumn.width,
345
+ cellRendererParams: { checkbox: this.showCheckBox },
346
+ field: groupColumn.field
347
+ };
348
+ this.columnDefs.forEach((elm) => {
349
+ if (elm.rowGroupIndex > -1) {
350
+ elm.hide = true;
351
+ }
352
+ });
353
+ }
354
+ //setTimeout(() => {
355
+ this.gridView = true;
356
+ //});
357
+ this.enabelSelect = true;
358
+ this.dataSource.onDataReceived.subscribe((_data) => {
359
+ debugger;
360
+ const result = _data.data.result;
361
+ this.hideLoading();
362
+ let items;
363
+ let totalCount;
364
+ if (Array.isArray(result)) {
365
+ items = result;
366
+ totalCount = result.length;
367
+ }
368
+ else {
369
+ items = result.items;
370
+ totalCount = result.totalCount;
371
+ }
372
+ if (this.dataSourceSuccessCallback) {
373
+ if (!this.loadOnInit) {
374
+ this.dataSourceSuccessCallback([], 0);
375
+ }
376
+ else {
377
+ this.dataSourceSuccessCallback(items, totalCount);
378
+ }
379
+ }
380
+ else {
381
+ if (!this.loadOnInit && this.gridApi !== undefined) {
382
+ this.gridApi.setRowData([]);
383
+ }
384
+ else if (this.gridApi !== undefined) {
385
+ this.gridApi.setRowData(items);
386
+ }
387
+ }
388
+ this.gridSelectRow();
389
+ });
390
+ this.dataSource.onFetchStart.subscribe(() => {
391
+ this.showLoading();
392
+ });
393
+ if (this.searchInput) {
394
+ this.searchInput.onValueChanged.subscribe((c) => {
395
+ this.searchText = c.value;
396
+ });
397
+ }
398
+ //
399
+ this.cdr.detectChanges();
400
+ }
401
+ mapColumns() {
402
+ this.columnDefs = this.columns.map((c) => c.render());
403
+ // if (this.showRowNumber) {
404
+ // this.columnDefs.push({
405
+ // headerName: AXConfig.get('layout.rtl') ? 'ردیف' : 'Row',
406
+ // valueGetter: 'node.rowIndex + 1',
407
+ // pinned: AXConfig.get('layout.rtl') ? 'right' : 'left'
408
+ // });
409
+ // }
410
+ if (this.gridDetailTemplate) {
411
+ if (this.columnDefs[0].checkboxSelection === true && this.columnDefs[0].field === '') {
412
+ this.columnDefs[1].cellRenderer = 'agGroupCellRenderer';
413
+ }
414
+ else {
415
+ this.columnDefs[0].cellRenderer = 'agGroupCellRenderer';
416
+ }
417
+ }
418
+ if (this.hasChildField === 'null') {
419
+ const groupColumn = this.columnDefs.find((c) => c.rowGroupIndex === undefined && c.field !== '');
420
+ if (groupColumn && this.groupHideOpenParents == false) {
421
+ this.autoGroupColumnDef = {
422
+ headerName: groupColumn.headerName,
423
+ width: groupColumn.width,
424
+ cellRendererParams: { checkbox: this.showCheckBox },
425
+ field: groupColumn.field
426
+ };
427
+ // groupColumn.hide = true;
428
+ }
429
+ }
430
+ this.columnDefs.forEach((elm) => {
431
+ if (elm.rowGroupIndex > -1) {
432
+ elm.hide = true;
433
+ }
434
+ });
435
+ }
436
+ displayedColumnsChanged(e) {
437
+ if (this.hasChildField === 'null') {
438
+ const ee = e.columnApi.getAllDisplayedColumnGroups();
439
+ const eee = ee.find((c) => c.colId !== 'ag-Grid-AutoColumn' && c.colId !== '0');
440
+ if (eee && eee.colId) {
441
+ this.autoGroupColumnDef = {
442
+ headerName: eee.colDef.headerName,
443
+ width: eee.colDef.width,
444
+ cellRendererParams: { checkbox: this.showCheckBox },
445
+ field: eee.colDef.field
446
+ };
447
+ }
448
+ // eee.hide = true;
449
+ }
450
+ }
451
+ refresh(route = []) {
452
+ if (this.remoteOperation && this.gridApi !== undefined) {
453
+ // this.gridApi.purgeServerSideCache(route);
454
+ this.gridApi.setServerSideDatasource(this.intenalGridDataSource);
455
+ }
456
+ else {
457
+ // TODO : check fetch param
458
+ this.dataSource.fetch(null);
459
+ }
460
+ }
461
+ internalGridCellClicked(e) {
462
+ this.cellClick.emit({ data: this.mapCellEvent(e), component: this, htmlElement: this.ref.nativeElement });
463
+ }
464
+ internalGridCellDoubleClicked(e) {
465
+ this.cellDbClick.emit({ data: this.mapCellEvent(e), component: this, htmlElement: this.ref.nativeElement });
466
+ }
467
+ internalGridCellFocused(e) {
468
+ this.cellFocuse.emit({ data: this.mapCellEvent(e), htmlElement: this.ref.nativeElement, component: this });
469
+ }
470
+ internalGridRowClicked(e) {
471
+ if (!e.node.group) {
472
+ this.rowClick.emit({ data: this.mapRowEvent(e), component: this, htmlElement: this.ref.nativeElement });
473
+ }
474
+ }
475
+ internalGridRowDoubleClicked(e) {
476
+ if (!e.node.group) {
477
+ this.rowDbClick.emit({ data: this.mapRowEvent(e), htmlElement: this.ref.nativeElement, component: this });
478
+ }
479
+ }
480
+ differenceOf2Arrays(array1, array2) {
481
+ const temp = [];
482
+ for (const i in array1) {
483
+ if (array2.indexOf(array1[i]) === -1) {
484
+ temp.push(array1[i]);
485
+ }
486
+ }
487
+ for (const i in array2) {
488
+ if (array1.indexOf(array2[i]) === -1) {
489
+ temp.push(array2[i]);
490
+ }
491
+ }
492
+ return temp.sort((a, b) => a - b);
493
+ }
494
+ rowSelectionChanged(e) {
495
+ // this.gridApi.forEachNode((node) => {
496
+ // if (node.data[this.keyField] == e.node.data[this.keyField]) {
497
+ // node.setSelected(e.node.selected);
498
+ // }
499
+ // });
500
+ if (e.node.selected == true) {
501
+ this.selectRow = this.selectRow.filter((c) => c[this.keyField] != e.data[this.keyField]);
502
+ this.selectRow.push(e.data);
503
+ }
504
+ else {
505
+ this.selectRow = this.selectRow.filter((c) => c[this.keyField] != e.data[this.keyField]);
506
+ }
507
+ this.rowSelectionChange.emit({ component: this, data: e, htmlElement: this.ref.nativeElement });
508
+ // console.log('e', e);
509
+ // console.log('select', e.node.selected);
510
+ // console.log('index', e.rowIndex);
511
+ }
512
+ internalGridSelectionChanged(e) {
513
+ const args = { items: [] };
514
+ const oldNodes = this.oldSelectionNodes;
515
+ const nodes = this.gridApi.getSelectedNodes();
516
+ nodes.forEach((i) => {
517
+ args.items.push({
518
+ rowLevel: i.level,
519
+ rowIndex: i.rowIndex,
520
+ data: i.data
521
+ });
522
+ });
523
+ this.selectionChanged.emit({ data: args, component: this, htmlElement: this.ref.nativeElement });
524
+ let action = nodes.length > oldNodes.length ? true : false;
525
+ const node = this.differenceOf2Arrays(nodes, oldNodes);
526
+ this.onRowSelectionChanged.emit({ component: this, selected: action, data: node, htmlElement: this.ref.nativeElement });
527
+ this.oldSelectionNodes = nodes;
528
+ }
529
+ mapCellEvent(e) {
530
+ return {
531
+ rowLevel: 0,
532
+ column: e.column,
533
+ data: e.data,
534
+ rowIndex: e.rowIndex,
535
+ value: e.value
536
+ };
537
+ }
538
+ mapRowEvent(e) {
539
+ return {
540
+ rowLevel: 0,
541
+ data: e.data,
542
+ rowIndex: e.rowIndex
543
+ };
544
+ }
545
+ deselectAll() {
546
+ this.gridApi.deselectAll();
547
+ }
548
+ showLoading() {
549
+ if (this.gridApi) {
550
+ this.gridApi.showLoadingOverlay();
551
+ }
552
+ }
553
+ hideLoading() {
554
+ if (this.gridApi) {
555
+ this.gridApi.hideOverlay();
556
+ }
557
+ }
558
+ internalGridSizeChanged(e) {
559
+ if (e.clientWidth > 0 && e.clientHeight > 0) {
560
+ this.performSizeColumnsToFit(e.api);
561
+ }
562
+ // this.refresh();
563
+ // this.gridApi.paginationGoToFirstPage();
564
+ }
565
+ internalGridFirstDataRendered(e) {
566
+ this.performSizeColumnsToFit(e.api);
567
+ }
568
+ performSizeColumnsToFit(api) {
569
+ if (this.sizeColumnsToFit) {
570
+ api.sizeColumnsToFit();
571
+ }
572
+ }
573
+ }
574
+ AXDataGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: AXDataGridComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
575
+ AXDataGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: AXDataGridComponent, selector: "ax-data-grid", inputs: { remoteOperation: "remoteOperation", rowMultiSelectWithClick: "rowMultiSelectWithClick", suppressRowClickSelection: "suppressRowClickSelection", suppressCellSelection: "suppressCellSelection", sizeColumnsToFit: "sizeColumnsToFit", showCheckBox: "showCheckBox", floatingFilter: "floatingFilter", selectionMode: "selectionMode", 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]=\"true\"\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.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: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None });
576
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: AXDataGridComponent, decorators: [{
577
+ type: Component,
578
+ 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]=\"true\"\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)\" -->" }]
579
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { remoteOperation: [{
580
+ type: Input
581
+ }], rowMultiSelectWithClick: [{
582
+ type: Input
583
+ }], suppressRowClickSelection: [{
584
+ type: Input
585
+ }], suppressCellSelection: [{
586
+ type: Input
587
+ }], sizeColumnsToFit: [{
588
+ type: Input
589
+ }], showCheckBox: [{
590
+ type: Input
591
+ }], floatingFilter: [{
592
+ type: Input
593
+ }], selectionMode: [{
594
+ type: Input
595
+ }], selectRow: [{
596
+ type: Input
597
+ }], rowGroupPanelShow: [{
598
+ type: Input
599
+ }], loadOnInit: [{
600
+ type: Input
601
+ }], keyField: [{
602
+ type: Input
603
+ }], hasChildField: [{
604
+ type: Input
605
+ }], searchText: [{
606
+ type: Input
607
+ }], filter: [{
608
+ type: Input
609
+ }], _inlineColumns: [{
610
+ type: ContentChildren,
611
+ args: [AXGridDataColumn]
612
+ }], columnsChange: [{
613
+ type: Output
614
+ }], columns: [{
615
+ type: Input
616
+ }], rowHeight: [{
617
+ type: Input
618
+ }], searchInput: [{
619
+ type: ContentChild,
620
+ args: [AXToolbarSearchComponent, { static: true }]
621
+ }], toolbar: [{
622
+ type: ContentChild,
623
+ args: [AXToolbarComponent, { static: true }]
624
+ }], rowTemplate: [{
625
+ type: ContentChild,
626
+ args: [AXDataGridRowTemplateComponent, { static: true }]
627
+ }], gridDetailTemplate: [{
628
+ type: ContentChild,
629
+ args: [AXDataGridDetailTemplateComponent, { static: true }]
630
+ }], _contentDataSource: [{
631
+ type: ContentChild,
632
+ args: [AXDataSourceComponent, { static: true }]
633
+ }], dataSource: [{
634
+ type: Input
635
+ }], groupHideOpenParents: [{
636
+ type: Input
637
+ }], cellClick: [{
638
+ type: Output
639
+ }], cellDbClick: [{
640
+ type: Output
641
+ }], cellFocuse: [{
642
+ type: Output
643
+ }], rowClick: [{
644
+ type: Output
645
+ }], rowDbClick: [{
646
+ type: Output
647
+ }], selectionChanged: [{
648
+ type: Output
649
+ }], rowSelectionChange: [{
650
+ type: Output
651
+ }], onRowSelectionChanged: [{
652
+ type: Output
653
+ }], rowClass: [{
654
+ type: Input
655
+ }], rtl: [{
656
+ type: Input
657
+ }] } });
658
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YWdyaWQuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYWNvcmV4L2RhdGEtZ3JpZC9zcmMvbGliL2RhdGEtZ3JpZC9kYXRhZ3JpZC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hY29yZXgvZGF0YS1ncmlkL3NyYy9saWIvZGF0YS1ncmlkL2RhdGFncmlkLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCxT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