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