raise-common-lib 0.0.1 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/bundles/raise-common-lib.umd.js +1130 -0
  2. package/bundles/raise-common-lib.umd.js.map +1 -0
  3. package/bundles/raise-common-lib.umd.min.js +16 -0
  4. package/bundles/raise-common-lib.umd.min.js.map +1 -0
  5. package/esm2015/lib/common-grid/index.component.js +716 -0
  6. package/esm2015/lib/constant/index.js +107 -0
  7. package/esm2015/lib/raise-common-lib.module.js +38 -0
  8. package/esm2015/public-api.js +11 -0
  9. package/esm2015/raise-common-lib.js +10 -0
  10. package/esm5/lib/common-grid/index.component.js +865 -0
  11. package/esm5/lib/constant/index.js +107 -0
  12. package/esm5/lib/raise-common-lib.module.js +42 -0
  13. package/esm5/public-api.js +11 -0
  14. package/esm5/raise-common-lib.js +10 -0
  15. package/fesm2015/raise-common-lib.js +766 -0
  16. package/fesm2015/raise-common-lib.js.map +1 -0
  17. package/fesm5/raise-common-lib.js +917 -0
  18. package/fesm5/raise-common-lib.js.map +1 -0
  19. package/lib/common-grid/index.component.d.ts +116 -0
  20. package/lib/constant/index.d.ts +54 -0
  21. package/lib/raise-common-lib.module.d.ts +2 -0
  22. package/package.json +17 -4
  23. package/{src/public-api.ts → public-api.d.ts} +2 -5
  24. package/raise-common-lib.d.ts +4 -0
  25. package/raise-common-lib.metadata.json +1 -0
  26. package/karma.conf.js +0 -32
  27. package/ng-package.json +0 -7
  28. package/src/lib/common-grid/grid-utils.ts +0 -26
  29. package/src/lib/common-grid/index.component.html +0 -80
  30. package/src/lib/common-grid/index.component.scss +0 -230
  31. package/src/lib/common-grid/index.component.ts +0 -420
  32. package/src/lib/constant/index.ts +0 -59
  33. package/src/lib/raise-common-lib.module.ts +0 -48
  34. package/tsconfig.lib.json +0 -26
  35. package/tsconfig.spec.json +0 -17
  36. package/tslint.json +0 -17
@@ -0,0 +1,917 @@
1
+ import { __assign } from 'tslib';
2
+ import { EventEmitter, Component, ChangeDetectorRef, ViewChild, Input, Output, NgModule } from '@angular/core';
3
+ import { GridModule, PagerModule, GridAllModule, PageService, SortService, FilterService, ExcelExportService, EditService, ResizeService, ToolbarService, ColumnChooserService, AggregateService, ColumnMenuService, DetailRowService, SelectionService, GroupService } from '@syncfusion/ej2-angular-grids';
4
+ import { CommonModule } from '@angular/common';
5
+
6
+ /**
7
+ * @fileoverview added by tsickle
8
+ * Generated from: lib/common-grid/index.component.ts
9
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
10
+ */
11
+ var CommonGridComponent = /** @class */ (function () {
12
+ function CommonGridComponent(ref) {
13
+ this.ref = ref;
14
+ this.showCheckBox = true;
15
+ this.loaded = true;
16
+ this.hiddenLoaded = false;
17
+ this.authorized = true; // Dataset是否授权,未授权则显示权限错误提示
18
+ // Dataset是否授权,未授权则显示权限错误提示
19
+ // only use for local data pagination
20
+ this.selectedDiffKey = '';
21
+ this.gridHeight = '';
22
+ // 这玩意必填,不然filter columnChooser都会报错
23
+ this.gridId = 'grid';
24
+ this.resizeSettings = { mode: 'Auto' };
25
+ this.filterSettings = { type: 'Menu' };
26
+ this.fields = [];
27
+ this.dataSource = [];
28
+ this.allowPaging = true;
29
+ this.clipMode = 'EllipsisWithTooltip';
30
+ this.checkBoxWidth = 32; // col 数量过少的时候,check宽度会拉伸,这时候设置null
31
+ /**
32
+ * Sample: [
33
+ * {
34
+ * text: "Preview",
35
+ * target: ".e-content",
36
+ * id: "preview-icon",
37
+ * iconCss: "preview",
38
+ * },
39
+ * {
40
+ * text: "Download",
41
+ * target: ".e-content",
42
+ * id: "download-icon",
43
+ * iconCss: "download",
44
+ * }
45
+ * ]
46
+ * 用于定义row中 点击事件
47
+ */
48
+ this.contextMenuItems = [];
49
+ // @Input() selectionSettings = { checkboxOnly: true, type: "Multiple" };
50
+ this.selectionSettings = {
51
+ type: 'Multiple',
52
+ // persistSelection: true,
53
+ checkboxOnly: true,
54
+ };
55
+ this.alwaysShowCheckbox = false;
56
+ this.disableSystemRow = false; // 禁用IsSytem = true的整行
57
+ // 禁用IsSytem = true的整行
58
+ this.recordDoubleClick = new EventEmitter();
59
+ this.actionComplete = new EventEmitter();
60
+ this.rowSelected = new EventEmitter();
61
+ this.rowDeselected = new EventEmitter();
62
+ this.onContextMenu = new EventEmitter();
63
+ this.actionHandler = new EventEmitter();
64
+ this.queryCellInfo = new EventEmitter();
65
+ this.recordClick = new EventEmitter();
66
+ this.actionBegin = new EventEmitter();
67
+ this.rowDataBound = new EventEmitter();
68
+ this.dataBound = new EventEmitter();
69
+ this.exportQueryCellInfo = new EventEmitter();
70
+ this.rowSelecting = new EventEmitter();
71
+ this.selectId = [];
72
+ this.startPaging = false;
73
+ this.indexList = [];
74
+ this.className = 'grid-loading';
75
+ this.translation = JSON.parse(localStorage.getItem('translation'));
76
+ }
77
+ /**
78
+ * @return {?}
79
+ */
80
+ CommonGridComponent.prototype.ngOnInit = /**
81
+ * @return {?}
82
+ */
83
+ function () {
84
+ if (this.hiddenLoaded)
85
+ this.className = '';
86
+ this.ref && this.ref.markForCheck();
87
+ };
88
+ /**
89
+ * @param {?} index
90
+ * @param {?} item
91
+ * @return {?}
92
+ */
93
+ CommonGridComponent.prototype.trackByFn = /**
94
+ * @param {?} index
95
+ * @param {?} item
96
+ * @return {?}
97
+ */
98
+ function (index, item) {
99
+ return index; // or a unique identifier in your object
100
+ };
101
+ /**
102
+ * @param {?} changes
103
+ * @return {?}
104
+ */
105
+ CommonGridComponent.prototype.ngOnChanges = /**
106
+ * @param {?} changes
107
+ * @return {?}
108
+ */
109
+ function (changes) {
110
+ if (changes.dataSource && changes.dataSource.currentValue) {
111
+ if (this.allowPaging &&
112
+ changes.dataSource.currentValue.length &&
113
+ !this.pageSettings) {
114
+ this.pageSettings =
115
+ changes.dataSource.currentValue.length > 9
116
+ ? {
117
+ pageSizes: ['All', '25', '50', '100'],
118
+ pageSize: 50,
119
+ }
120
+ : null;
121
+ }
122
+ }
123
+ };
124
+ /**
125
+ * @return {?}
126
+ */
127
+ CommonGridComponent.prototype._load = /**
128
+ * @return {?}
129
+ */
130
+ function () {
131
+ if (!this.authorized) {
132
+ ((/** @type {?} */ (this.grid.localeObj))).localeStrings.EmptyRecord =
133
+ this.translation.YOU_DO_NOT_HAVE_THE_DATASET_PERMISSION ||
134
+ "You don't have the dataset permission to view the record.";
135
+ }
136
+ };
137
+ /**
138
+ * @param {?} args
139
+ * @return {?}
140
+ */
141
+ CommonGridComponent.prototype._dataBound = /**
142
+ * @param {?} args
143
+ * @return {?}
144
+ */
145
+ function (args) {
146
+ var _this = this;
147
+ // 整个组件加载完成时的回调函数
148
+ /** @type {?} */
149
+ var pagerContainer = document.querySelector('.e-pagercontainer');
150
+ if (pagerContainer) {
151
+ /** @type {?} */
152
+ var linkElements = pagerContainer.querySelectorAll('.e-link');
153
+ linkElements.forEach((/**
154
+ * @param {?} element
155
+ * @return {?}
156
+ */
157
+ function (element) {
158
+ element.removeAttribute('href'); // SMP2-10310 删除分页器的href属性
159
+ }));
160
+ }
161
+ if (this.selectedDiffKey) {
162
+ setTimeout((/**
163
+ * @return {?}
164
+ */
165
+ function () {
166
+ _this.chooseRecords();
167
+ }));
168
+ }
169
+ this.dataBound.emit(args);
170
+ };
171
+ /**
172
+ * @param {?} args
173
+ * @return {?}
174
+ */
175
+ CommonGridComponent.prototype._exportQueryCellInfo = /**
176
+ * @param {?} args
177
+ * @return {?}
178
+ */
179
+ function (args) {
180
+ this.exportQueryCellInfo.emit(args);
181
+ };
182
+ /**
183
+ * @param {?} $event
184
+ * @return {?}
185
+ */
186
+ CommonGridComponent.prototype._recordDoubleClick = /**
187
+ * @param {?} $event
188
+ * @return {?}
189
+ */
190
+ function ($event) {
191
+ this.recordDoubleClick.emit($event);
192
+ };
193
+ /**
194
+ * [selectionSettings]="{ checkboxOnly: true }"
195
+ [showCheckBox]="true"
196
+ 控件使用时,必须配置上面两个属性,否则,全选会失效
197
+ */
198
+ /**
199
+ * [selectionSettings]="{ checkboxOnly: true }"
200
+ * [showCheckBox]="true"
201
+ * 控件使用时,必须配置上面两个属性,否则,全选会失效
202
+ * @param {?} $event
203
+ * @return {?}
204
+ */
205
+ CommonGridComponent.prototype._rowSelected = /**
206
+ * [selectionSettings]="{ checkboxOnly: true }"
207
+ * [showCheckBox]="true"
208
+ * 控件使用时,必须配置上面两个属性,否则,全选会失效
209
+ * @param {?} $event
210
+ * @return {?}
211
+ */
212
+ function ($event) {
213
+ var _this = this;
214
+ if (this.selectedDiffKey) {
215
+ if ($event.isHeaderCheckboxClicked && Array.isArray($event.data)) {
216
+ if ($event.data && $event.data.length) {
217
+ $event.data.forEach((/**
218
+ * @param {?} item
219
+ * @return {?}
220
+ */
221
+ function (item) {
222
+ item.isSelected = true;
223
+ _this.selectId.push(item);
224
+ }));
225
+ this.dataSource.forEach((/**
226
+ * @param {?} data
227
+ * @return {?}
228
+ */
229
+ function (data) {
230
+ $event.data.forEach((/**
231
+ * @param {?} _data
232
+ * @return {?}
233
+ */
234
+ function (_data) {
235
+ if (_data[_this.selectedDiffKey] === data[_this.selectedDiffKey]) {
236
+ data.isSelected = true;
237
+ }
238
+ }));
239
+ }));
240
+ }
241
+ }
242
+ else {
243
+ $event.data.isSelected = true;
244
+ this.selectId.push($event.data);
245
+ this.dataSource.forEach((/**
246
+ * @param {?} data
247
+ * @return {?}
248
+ */
249
+ function (data) {
250
+ if (data[_this.selectedDiffKey] === $event.data[_this.selectedDiffKey]) {
251
+ data.isSelected = true;
252
+ }
253
+ }));
254
+ }
255
+ this.ref && this.ref.markForCheck();
256
+ }
257
+ this.rowSelected.emit($event);
258
+ };
259
+ /**
260
+ * @param {?} $event
261
+ * @return {?}
262
+ */
263
+ CommonGridComponent.prototype._rowDeselected = /**
264
+ * @param {?} $event
265
+ * @return {?}
266
+ */
267
+ function ($event) {
268
+ var _this = this;
269
+ if (this.selectedDiffKey) {
270
+ if (this.startPaging) {
271
+ return;
272
+ }
273
+ if ($event.isHeaderCheckboxClicked && Array.isArray($event.data)) {
274
+ $event.data.forEach((/**
275
+ * @param {?} item
276
+ * @return {?}
277
+ */
278
+ function (item) {
279
+ item.isSelected = false;
280
+ }));
281
+ this.selectId = [];
282
+ this.dataSource.forEach((/**
283
+ * @param {?} data
284
+ * @return {?}
285
+ */
286
+ function (data) {
287
+ $event.data.forEach((/**
288
+ * @param {?} _data
289
+ * @return {?}
290
+ */
291
+ function (_data) {
292
+ if (_data[_this.selectedDiffKey] === data[_this.selectedDiffKey]) {
293
+ data.isSelected = false;
294
+ }
295
+ }));
296
+ }));
297
+ }
298
+ else {
299
+ $event.data.isSelected = false;
300
+ this.selectId = this.selectId.filter((/**
301
+ * @param {?} item
302
+ * @return {?}
303
+ */
304
+ function (item) {
305
+ return item[_this.selectedDiffKey] !== $event.data[_this.selectedDiffKey];
306
+ }));
307
+ this.dataSource.forEach((/**
308
+ * @param {?} data
309
+ * @return {?}
310
+ */
311
+ function (data) {
312
+ if (data[_this.selectedDiffKey] === $event.data[_this.selectedDiffKey]) {
313
+ data.isSelected = false;
314
+ }
315
+ }));
316
+ }
317
+ this.ref && this.ref.markForCheck();
318
+ }
319
+ this.rowDeselected.emit($event);
320
+ };
321
+ /**
322
+ * @param {?} args
323
+ * @return {?}
324
+ */
325
+ CommonGridComponent.prototype._onContextMenu = /**
326
+ * @param {?} args
327
+ * @return {?}
328
+ */
329
+ function (args) {
330
+ this.onContextMenu.emit(args);
331
+ };
332
+ /**
333
+ * @param {?} args
334
+ * @return {?}
335
+ */
336
+ CommonGridComponent.prototype._actionBegin = /**
337
+ * @param {?} args
338
+ * @return {?}
339
+ */
340
+ function (args) {
341
+ if (this.selectedDiffKey &&
342
+ (args.requestType === 'paging' ||
343
+ args.requestType === 'searching' ||
344
+ args.requestType === 'filtering' ||
345
+ args.requestType === 'sorting')) {
346
+ this.startPaging = true;
347
+ }
348
+ this.actionBegin.emit(args);
349
+ };
350
+ /**
351
+ * @param {?} keywords
352
+ * @return {?}
353
+ */
354
+ CommonGridComponent.prototype.search = /**
355
+ * @param {?} keywords
356
+ * @return {?}
357
+ */
358
+ function (keywords) {
359
+ this.grid.search(keywords);
360
+ };
361
+ /**
362
+ * @param {?} indexList
363
+ * @return {?}
364
+ */
365
+ CommonGridComponent.prototype.selectRows = /**
366
+ * @param {?} indexList
367
+ * @return {?}
368
+ */
369
+ function (indexList) {
370
+ this.grid.selectRows(indexList);
371
+ };
372
+ /**
373
+ * @param {?} index
374
+ * @return {?}
375
+ */
376
+ CommonGridComponent.prototype.selectRow = /**
377
+ * @param {?} index
378
+ * @return {?}
379
+ */
380
+ function (index) {
381
+ this.grid.selectRow(index);
382
+ };
383
+ /**
384
+ * @return {?}
385
+ */
386
+ CommonGridComponent.prototype.getCurrentViewRecords = /**
387
+ * @return {?}
388
+ */
389
+ function () {
390
+ return this.grid.getCurrentViewRecords();
391
+ };
392
+ /**
393
+ * @param {?} $event
394
+ * @return {?}
395
+ */
396
+ CommonGridComponent.prototype.customiseCell = /**
397
+ * @param {?} $event
398
+ * @return {?}
399
+ */
400
+ function ($event) {
401
+ this.queryCellInfo.emit($event);
402
+ };
403
+ /**
404
+ * @param {?=} args
405
+ * @return {?}
406
+ */
407
+ CommonGridComponent.prototype.contextMenuOpen = /**
408
+ * @param {?=} args
409
+ * @return {?}
410
+ */
411
+ function (args) {
412
+ /** @type {?} */
413
+ var data = ((/** @type {?} */ (args))).rowInfo.rowData;
414
+ if (!data) {
415
+ args.cancel = true;
416
+ return;
417
+ }
418
+ /** @type {?} */
419
+ var enableItems = [];
420
+ /** @type {?} */
421
+ var hideItems = [];
422
+ this.grid.contextMenuModule.contextMenu.refresh(); // 每次点击按钮弹窗前需再次初始化状态 否则不更新;
423
+ this.contextMenuItems.forEach((/**
424
+ * @param {?} item
425
+ * @return {?}
426
+ */
427
+ function (item) {
428
+ // 用于处理部分按钮disabled的情况
429
+ if (item.disabled ||
430
+ (data.disableItem && data.disableItem.includes(item.iconCss))) {
431
+ enableItems.push(item.text);
432
+ // this.grid.contextMenuModule.contextMenu.enableItems(
433
+ // [item.text],
434
+ // false
435
+ // );
436
+ }
437
+ // 用于处理部分按钮需要hide的情况
438
+ if (item.isHide ||
439
+ (data.hideItem && data.hideItem.includes(item.iconCss))) {
440
+ hideItems.push(item.text);
441
+ // this.grid.contextMenuModule.contextMenu.hideItems(
442
+ // [item.text],
443
+ // false
444
+ // );
445
+ }
446
+ }));
447
+ this.grid.contextMenuModule.contextMenu.enableItems(enableItems, false);
448
+ this.grid.contextMenuModule.contextMenu.hideItems(hideItems, false);
449
+ };
450
+ /**
451
+ * @param {?} $event
452
+ * @return {?}
453
+ */
454
+ CommonGridComponent.prototype._actionHandler = /**
455
+ * @param {?} $event
456
+ * @return {?}
457
+ */
458
+ function ($event) {
459
+ var _this = this;
460
+ if (this.selectedDiffKey &&
461
+ ($event.requestType === 'paging' ||
462
+ $event.requestType === 'searching' ||
463
+ $event.requestType === 'filtering' ||
464
+ $event.requestType === 'sorting')) {
465
+ this.indexList = [];
466
+ setTimeout((/**
467
+ * @return {?}
468
+ */
469
+ function () {
470
+ _this.chooseRecords();
471
+ _this.startPaging = false;
472
+ _this.ref && _this.ref.detectChanges();
473
+ _this.ref && _this.ref.markForCheck();
474
+ }));
475
+ }
476
+ this.actionHandler.emit($event);
477
+ this.actionComplete.emit($event);
478
+ };
479
+ /**
480
+ * @private
481
+ * @return {?}
482
+ */
483
+ CommonGridComponent.prototype.chooseRecords = /**
484
+ * @private
485
+ * @return {?}
486
+ */
487
+ function () {
488
+ var _this = this;
489
+ this.indexList = [];
490
+ this.dataSource.forEach((/**
491
+ * @param {?} data
492
+ * @return {?}
493
+ */
494
+ function (data) {
495
+ _this.grid.getCurrentViewRecords().forEach((/**
496
+ * @param {?} row
497
+ * @param {?} i
498
+ * @return {?}
499
+ */
500
+ function (row, i) {
501
+ if (row &&
502
+ data[_this.selectedDiffKey] === row[_this.selectedDiffKey] &&
503
+ data.isSelected) {
504
+ _this.indexList.push(i);
505
+ }
506
+ }));
507
+ }));
508
+ this.grid.selectRows(this.indexList);
509
+ };
510
+ /**
511
+ * @param {?} $event
512
+ * @return {?}
513
+ */
514
+ CommonGridComponent.prototype._recordClick = /**
515
+ * @param {?} $event
516
+ * @return {?}
517
+ */
518
+ function ($event) {
519
+ this.recordClick.emit($event);
520
+ };
521
+ /**
522
+ * @return {?}
523
+ */
524
+ CommonGridComponent.prototype.refresh = /**
525
+ * @return {?}
526
+ */
527
+ function () {
528
+ this.grid.refresh();
529
+ };
530
+ /**
531
+ * @param {?} e
532
+ * @return {?}
533
+ */
534
+ CommonGridComponent.prototype._rowSelecting = /**
535
+ * @param {?} e
536
+ * @return {?}
537
+ */
538
+ function (e) {
539
+ this.rowSelecting.emit(e);
540
+ };
541
+ /**
542
+ * @return {?}
543
+ */
544
+ CommonGridComponent.prototype.refreshColumns = /**
545
+ * @return {?}
546
+ */
547
+ function () {
548
+ this.grid.refreshColumns();
549
+ };
550
+ /**
551
+ * @return {?}
552
+ */
553
+ CommonGridComponent.prototype.refreshHeader = /**
554
+ * @return {?}
555
+ */
556
+ function () {
557
+ this.grid.refreshHeader();
558
+ };
559
+ /**
560
+ * @param {?=} excelExportProperties
561
+ * @return {?}
562
+ */
563
+ CommonGridComponent.prototype.export = /**
564
+ * @param {?=} excelExportProperties
565
+ * @return {?}
566
+ */
567
+ function (excelExportProperties) {
568
+ this.grid.excelExport(excelExportProperties);
569
+ };
570
+ /**
571
+ * @return {?}
572
+ */
573
+ CommonGridComponent.prototype.getSelectedRecords = /**
574
+ * @return {?}
575
+ */
576
+ function () {
577
+ return this.grid.getSelectedRecords();
578
+ };
579
+ /**
580
+ * @param {?} $event
581
+ * @return {?}
582
+ */
583
+ CommonGridComponent.prototype._rowDataBound = /**
584
+ * @param {?} $event
585
+ * @return {?}
586
+ */
587
+ function ($event) {
588
+ if (this.disableSystemRow && $event.data && $event.data.IsSystem) {
589
+ $event.row.classList.add('e-disabled');
590
+ }
591
+ this.rowDataBound.emit($event);
592
+ };
593
+ /**
594
+ * @return {?}
595
+ */
596
+ CommonGridComponent.prototype.clearSelection = /**
597
+ * @return {?}
598
+ */
599
+ function () {
600
+ this.grid.clearSelection();
601
+ };
602
+ /**
603
+ * @return {?}
604
+ */
605
+ CommonGridComponent.prototype.excelExport = /**
606
+ * @return {?}
607
+ */
608
+ function () {
609
+ this.grid.excelExport();
610
+ };
611
+ /**
612
+ * @return {?}
613
+ */
614
+ CommonGridComponent.prototype.addItem = /**
615
+ * @return {?}
616
+ */
617
+ function () {
618
+ var _this = this;
619
+ this.grid.addRecord(__assign({}, this.defaultRecord, { isNew: true }), 0);
620
+ setTimeout((/**
621
+ * @return {?}
622
+ */
623
+ function () {
624
+ _this.grid.selectRow(0);
625
+ _this.grid.startEdit();
626
+ }), 30);
627
+ };
628
+ /**
629
+ * @return {?}
630
+ */
631
+ CommonGridComponent.prototype.saveItem = /**
632
+ * @return {?}
633
+ */
634
+ function () {
635
+ this.grid.endEdit();
636
+ };
637
+ /**
638
+ * @param {?} index
639
+ * @return {?}
640
+ */
641
+ CommonGridComponent.prototype.editItem = /**
642
+ * @param {?} index
643
+ * @return {?}
644
+ */
645
+ function (index) {
646
+ var _this = this;
647
+ setTimeout((/**
648
+ * @return {?}
649
+ */
650
+ function () {
651
+ _this.grid.selectRow(Number(index));
652
+ _this.grid.startEdit();
653
+ }), 30);
654
+ };
655
+ /**
656
+ * @param {?} index
657
+ * @return {?}
658
+ */
659
+ CommonGridComponent.prototype.deleteItem = /**
660
+ * @param {?} index
661
+ * @return {?}
662
+ */
663
+ function (index) {
664
+ this.grid.selectRow(Number(index));
665
+ /** @type {?} */
666
+ var selectedRecord = (/** @type {?} */ (this.grid.getSelectedRecords()[0]));
667
+ this.grid.deleteRecord((/** @type {?} */ (selectedRecord)));
668
+ };
669
+ /**
670
+ * @param {?} index
671
+ * @return {?}
672
+ */
673
+ CommonGridComponent.prototype.cancelItem = /**
674
+ * @param {?} index
675
+ * @return {?}
676
+ */
677
+ function (index) {
678
+ this.grid.closeEdit();
679
+ this.deleteItem(index);
680
+ };
681
+ /**
682
+ * @return {?}
683
+ */
684
+ CommonGridComponent.prototype.showLoading = /**
685
+ * @return {?}
686
+ */
687
+ function () {
688
+ this.className = 'grid-loading';
689
+ this.ref && this.ref.markForCheck();
690
+ this.ref && this.ref.detectChanges();
691
+ };
692
+ /**
693
+ * @return {?}
694
+ */
695
+ CommonGridComponent.prototype.hideLoading = /**
696
+ * @return {?}
697
+ */
698
+ function () {
699
+ this.className = '';
700
+ this.ref && this.ref.markForCheck();
701
+ this.ref && this.ref.detectChanges();
702
+ };
703
+ CommonGridComponent.decorators = [
704
+ { type: Component, args: [{
705
+ selector: 'kt-common-grid',
706
+ template: "<ejs-grid\r\n\t#grid\r\n\t[id]=\"gridId\"\r\n\t[ngClass]=\"{\r\n\t\t'hide-Check-box': !alwaysShowCheckbox,\r\n\t\t'grid-loading': className === 'grid-loading'\r\n\t}\"\r\n\t[dataSource]=\"dataSource\"\r\n\t[allowPaging]=\"allowPaging && pageSettings\"\r\n\t[allowResizing]=\"true\"\r\n\t[pageSettings]=\"pageSettings\"\r\n\t[showColumnMenu]=\"true\"\r\n\t[allowSorting]=\"true\"\r\n\t[allowFiltering]=\"true\"\r\n\t[allowExcelExport]=\"true\"\r\n\t[filterSettings]=\"filterSettings\"\r\n\t[resizeSettings]=\"resizeSettings\"\r\n\t[allowSelection]=\"true\"\r\n\t[editSettings]=\"editSettings\"\r\n\t[childGrid]=\"childGrid\"\r\n\t[contextMenuItems]=\"\r\n\t\tdataSource && dataSource.length ? contextMenuItems : null\r\n\t\"\r\n\t[selectionSettings]=\"selectionSettings\"\r\n\t(recordClick)=\"_recordClick($event)\"\r\n\t(recordDoubleClick)=\"_recordDoubleClick($event)\"\r\n\t(actionBegin)=\"_actionBegin($event)\"\r\n\t(actionComplete)=\"_actionHandler($event)\"\r\n\t(rowSelected)=\"_rowSelected($event)\"\r\n\t(rowDeselected)=\"_rowDeselected($event)\"\r\n\tstyle=\"border: none\"\r\n\t(contextMenuClick)=\"_onContextMenu($event)\"\r\n\t(contextMenuOpen)=\"contextMenuOpen($event)\"\r\n\t(queryCellInfo)=\"customiseCell($event)\"\r\n\t(dataBound)=\"_dataBound($event)\"\r\n\t(rowDataBound)=\"_rowDataBound($event)\"\r\n\t(rowSelecting)=\"_rowSelecting($event)\"\r\n\t(excelQueryCellInfo)=\"_exportQueryCellInfo($event)\"\r\n\t(load)=\"_load()\"\r\n>\r\n\t<e-columns>\r\n\t\t<e-column\r\n\t\t\t*ngIf=\"showCheckBox\"\r\n\t\t\ttype=\"checkbox\"\r\n\t\t\t[width]=\"checkBoxWidth\"\r\n\t\t\t[showColumnMenu]=\"false\"\r\n\t\t></e-column>\r\n\t\t<e-column\r\n\t\t\t*ngFor=\"let item of fields; trackBy: trackByFn\"\r\n\t\t\t[field]=\"item.columnName\"\r\n\t\t\t[filter]=\"item.filter ? item.filter : { type: 'CheckBox' }\"\r\n\t\t\t[customAttributes]=\"\r\n\t\t\t\titem.colName === 'entityUserList' ||\r\n\t\t\t\titem.colName === 'kycProgress'\r\n\t\t\t\t\t? { class: 'hideColumnFilterClass' }\r\n\t\t\t\t\t: {}\r\n\t\t\t\"\r\n\t\t\t[headerText]=\"item.columnDisplayName\"\r\n\t\t\t[textAlign]=\"item.textAlign\"\r\n\t\t\t[showColumnMenu]=\"item.showColumnMenu === undefined ? true : false\"\r\n\t\t\t[allowFiltering]=\"item.allowFiltering === undefined ? true : false\"\r\n\t\t\t[allowSorting]=\"item.allowSorting === undefined ? true : false\"\r\n\t\t\t[editType]=\"item.editType\"\r\n\t\t\t[validationRules]=\"item.validationRules\"\r\n\t\t\t[type]=\"item.dataType\"\r\n\t\t\t[width]=\"item.width\"\r\n\t\t\t[minWidth]=\"item.minWidth\"\r\n\t\t\t[format]=\"item.format\"\r\n\t\t\t[visible]=\"item.visible\"\r\n\t\t\t[template]=\"item.showTemplate ? columnTemplate : undefined\"\r\n\t\t\t[clipMode]=\"\r\n\t\t\t\titem.clipMode\r\n\t\t\t\t\t? item.clipMode\r\n\t\t\t\t\t: clipMode || 'EllipsisWithTooltip'\r\n\t\t\t\"\r\n\t\t\t[sortComparer]=\"item.dateComparer\"\r\n\t\t>\r\n\t\t</e-column>\r\n\t</e-columns>\r\n</ejs-grid>\r\n",
707
+ styles: [".e-grid.e-gridhover tr[role=row]:hover .e-rowcell:not(.e-cellselectionbackground):not(.e-active):not(.e-updatedtd):not(.e-indentcell){background:rgba(31,123,255,.04)!important}.e-summaryrow .e-summarycell:nth-child(2){padding-left:0!important}.e-footerpadding{padding-right:0!important}.e-footerpadding .e-summaryrow{margin-right:5px!important}.e-footerpadding .e-summaryrow .e-indentcell{background-color:unset!important}kt-common-grid{display:flex;flex:1;height:100%}kt-common-grid .e-grid{height:100%}kt-common-grid .e-grid .e-headercontent{margin-right:0!important}.e-grid td.e-active{background:#edf5ff!important}.grid-tools{height:32px;min-height:32px;display:flex;align-items:center;justify-content:space-between;padding-left:7px}.grid-tools .right-opt-group{display:flex;align-items:center;margin-right:6px}.grid-tools .tools-button{border:none;font-family:Arial;font-size:12px;color:#43566c;background:0 0;display:flex;align-items:center;padding:0;margin-right:16px}.grid-tools .tools-button.disabled-button{pointer-events:none;opacity:.5}.grid-tools .tools-button img{margin-right:4px;height:16px!important;width:16px!important}.grid-tools .tools-button .tools-font{transform:translateY(1px);display:inline-block}.grid-tools .select-num{font-size:12px;color:#43566c;margin-right:24px;white-space:nowrap}.e-rowcell{padding:0 8px 0 12px}.e-rowcell.e-gridchkbox{padding:0 0 0 8px!important}.e-headercell{padding:0}.e-headercell:first-child.e-defaultcursor+.e-headercell .e-headercelldiv{padding-left:0}.e-headercell .e-headercelldiv{margin:0;padding:0 20px 0 12px}.e-headercell .e-headerchkcelldiv{padding:0 0 0 8px!important}.e-headercell .e-columnmenu{position:absolute;right:0;float:unset;margin:0;padding:0;top:8px}.e-headercell .e-sortfilterdiv{padding-top:11px}.e-headercell.e-rightalign .e-sortfilterdiv{padding-left:5px}.e-detailheadercell{height:28px!important}.e-grid{font-family:Arial!important;display:flex;flex-direction:column;flex:1;border:none;overflow:hidden}.e-grid .e-gridcontent{flex:1}.e-grid .e-content{overflow:scroll!important}.e-grid .e-content::-webkit-scrollbar{width:5px;height:5px;background:#fff;position:static;z-index:999;border-radius:10px}.e-grid .e-content::-webkit-scrollbar-thumb{background:#eaedf0;border-radius:10px}.e-grid .e-gridheader{margin-right:5px!important;padding-right:0!important;height:30px!important}.e-grid .e-content,.e-grid .e-gridcontent{display:flex;flex-direction:column;flex:1}.e-grid .e-columnheader,.e-grid .e-headercell,.e-grid .e-rhandler{height:28px!important}.e-grid .e-headertext{font-size:10px!important}.e-grid .e-headercell .e-columnmenu{color:#929dab}.e-grid .e-row{height:26px!important;line-height:26px!important}.e-grid .e-rowcell{font-size:11px!important;color:#43566c!important;padding-top:0;padding-bottom:0;padding-right:7px}.e-grid .e-rowcell .mat-icon-button{height:26px;width:26px;line-height:26px}.e-grid .e-rowcell:empty{height:26px!important}.e-grid .e-rowcell.e-gridchkbox+.e-rowcell{padding-left:0!important}.e-grid .e-gridpager{border:none}.e-grid .e-gridpager .e-gridcontent{transform:unset}.e-grid .e-summaryrow{height:24px!important}.e-grid .e-summaryrow .e-indentcell,.e-grid .e-summaryrow .e-summarycell{background-color:#fff;border:none;font-family:Arial;font-size:11px!important;font-weight:700;color:#43566c;padding:0 12px}.e-grid .e-row:last-child .e-rowcell{border-bottom:1px solid #dee2e6}"]
708
+ }] }
709
+ ];
710
+ /** @nocollapse */
711
+ CommonGridComponent.ctorParameters = function () { return [
712
+ { type: ChangeDetectorRef }
713
+ ]; };
714
+ CommonGridComponent.propDecorators = {
715
+ grid: [{ type: ViewChild, args: ['grid', { static: false },] }],
716
+ showCheckBox: [{ type: Input }],
717
+ loaded: [{ type: Input }],
718
+ hiddenLoaded: [{ type: Input }],
719
+ authorized: [{ type: Input }],
720
+ selectedDiffKey: [{ type: Input }],
721
+ gridHeight: [{ type: Input }],
722
+ gridId: [{ type: Input }],
723
+ resizeSettings: [{ type: Input }],
724
+ filterSettings: [{ type: Input }],
725
+ template: [{ type: Input }],
726
+ fields: [{ type: Input }],
727
+ dataSource: [{ type: Input }],
728
+ editSettings: [{ type: Input }],
729
+ columnTemplate: [{ type: Input }],
730
+ pageSettings: [{ type: Input }],
731
+ allowPaging: [{ type: Input }],
732
+ clipMode: [{ type: Input }],
733
+ checkBoxWidth: [{ type: Input }],
734
+ childGrid: [{ type: Input }],
735
+ contextMenuItems: [{ type: Input }],
736
+ selectionSettings: [{ type: Input }],
737
+ alwaysShowCheckbox: [{ type: Input }],
738
+ defaultRecord: [{ type: Input }],
739
+ disableSystemRow: [{ type: Input }],
740
+ recordDoubleClick: [{ type: Output }],
741
+ actionComplete: [{ type: Output }],
742
+ rowSelected: [{ type: Output }],
743
+ rowDeselected: [{ type: Output }],
744
+ onContextMenu: [{ type: Output }],
745
+ actionHandler: [{ type: Output }],
746
+ queryCellInfo: [{ type: Output }],
747
+ recordClick: [{ type: Output }],
748
+ actionBegin: [{ type: Output }],
749
+ rowDataBound: [{ type: Output }],
750
+ dataBound: [{ type: Output }],
751
+ exportQueryCellInfo: [{ type: Output }],
752
+ rowSelecting: [{ type: Output }]
753
+ };
754
+ return CommonGridComponent;
755
+ }());
756
+ if (false) {
757
+ /** @type {?} */
758
+ CommonGridComponent.prototype.grid;
759
+ /** @type {?} */
760
+ CommonGridComponent.prototype.showCheckBox;
761
+ /** @type {?} */
762
+ CommonGridComponent.prototype.loaded;
763
+ /** @type {?} */
764
+ CommonGridComponent.prototype.hiddenLoaded;
765
+ /** @type {?} */
766
+ CommonGridComponent.prototype.authorized;
767
+ /** @type {?} */
768
+ CommonGridComponent.prototype.selectedDiffKey;
769
+ /** @type {?} */
770
+ CommonGridComponent.prototype.gridHeight;
771
+ /** @type {?} */
772
+ CommonGridComponent.prototype.gridId;
773
+ /** @type {?} */
774
+ CommonGridComponent.prototype.resizeSettings;
775
+ /** @type {?} */
776
+ CommonGridComponent.prototype.filterSettings;
777
+ /** @type {?} */
778
+ CommonGridComponent.prototype.template;
779
+ /** @type {?} */
780
+ CommonGridComponent.prototype.fields;
781
+ /** @type {?} */
782
+ CommonGridComponent.prototype.dataSource;
783
+ /** @type {?} */
784
+ CommonGridComponent.prototype.editSettings;
785
+ /** @type {?} */
786
+ CommonGridComponent.prototype.columnTemplate;
787
+ /** @type {?} */
788
+ CommonGridComponent.prototype.pageSettings;
789
+ /** @type {?} */
790
+ CommonGridComponent.prototype.allowPaging;
791
+ /** @type {?} */
792
+ CommonGridComponent.prototype.clipMode;
793
+ /** @type {?} */
794
+ CommonGridComponent.prototype.checkBoxWidth;
795
+ /** @type {?} */
796
+ CommonGridComponent.prototype.childGrid;
797
+ /**
798
+ * Sample: [
799
+ * {
800
+ * text: "Preview",
801
+ * target: ".e-content",
802
+ * id: "preview-icon",
803
+ * iconCss: "preview",
804
+ * },
805
+ * {
806
+ * text: "Download",
807
+ * target: ".e-content",
808
+ * id: "download-icon",
809
+ * iconCss: "download",
810
+ * }
811
+ * ]
812
+ * 用于定义row中 点击事件
813
+ * @type {?}
814
+ */
815
+ CommonGridComponent.prototype.contextMenuItems;
816
+ /** @type {?} */
817
+ CommonGridComponent.prototype.selectionSettings;
818
+ /** @type {?} */
819
+ CommonGridComponent.prototype.alwaysShowCheckbox;
820
+ /** @type {?} */
821
+ CommonGridComponent.prototype.defaultRecord;
822
+ /** @type {?} */
823
+ CommonGridComponent.prototype.disableSystemRow;
824
+ /** @type {?} */
825
+ CommonGridComponent.prototype.recordDoubleClick;
826
+ /** @type {?} */
827
+ CommonGridComponent.prototype.actionComplete;
828
+ /** @type {?} */
829
+ CommonGridComponent.prototype.rowSelected;
830
+ /** @type {?} */
831
+ CommonGridComponent.prototype.rowDeselected;
832
+ /** @type {?} */
833
+ CommonGridComponent.prototype.onContextMenu;
834
+ /** @type {?} */
835
+ CommonGridComponent.prototype.actionHandler;
836
+ /** @type {?} */
837
+ CommonGridComponent.prototype.queryCellInfo;
838
+ /** @type {?} */
839
+ CommonGridComponent.prototype.recordClick;
840
+ /** @type {?} */
841
+ CommonGridComponent.prototype.actionBegin;
842
+ /** @type {?} */
843
+ CommonGridComponent.prototype.rowDataBound;
844
+ /** @type {?} */
845
+ CommonGridComponent.prototype.dataBound;
846
+ /** @type {?} */
847
+ CommonGridComponent.prototype.exportQueryCellInfo;
848
+ /** @type {?} */
849
+ CommonGridComponent.prototype.rowSelecting;
850
+ /** @type {?} */
851
+ CommonGridComponent.prototype.selectId;
852
+ /** @type {?} */
853
+ CommonGridComponent.prototype.startPaging;
854
+ /** @type {?} */
855
+ CommonGridComponent.prototype.indexList;
856
+ /** @type {?} */
857
+ CommonGridComponent.prototype.className;
858
+ /** @type {?} */
859
+ CommonGridComponent.prototype.translation;
860
+ /**
861
+ * @type {?}
862
+ * @private
863
+ */
864
+ CommonGridComponent.prototype.ref;
865
+ }
866
+
867
+ /**
868
+ * @fileoverview added by tsickle
869
+ * Generated from: lib/raise-common-lib.module.ts
870
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
871
+ */
872
+ var RaiseCommonLibModule = /** @class */ (function () {
873
+ function RaiseCommonLibModule() {
874
+ }
875
+ RaiseCommonLibModule.decorators = [
876
+ { type: NgModule, args: [{
877
+ declarations: [
878
+ CommonGridComponent,
879
+ ],
880
+ imports: [CommonModule, GridModule, PagerModule, GridAllModule],
881
+ providers: [
882
+ PageService,
883
+ SortService,
884
+ FilterService,
885
+ ExcelExportService,
886
+ EditService,
887
+ ResizeService,
888
+ ToolbarService,
889
+ ColumnChooserService,
890
+ AggregateService,
891
+ ColumnMenuService,
892
+ DetailRowService,
893
+ SelectionService,
894
+ GroupService,
895
+ ],
896
+ exports: [
897
+ CommonGridComponent,
898
+ ]
899
+ },] }
900
+ ];
901
+ return RaiseCommonLibModule;
902
+ }());
903
+
904
+ /**
905
+ * @fileoverview added by tsickle
906
+ * Generated from: public-api.ts
907
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
908
+ */
909
+
910
+ /**
911
+ * @fileoverview added by tsickle
912
+ * Generated from: raise-common-lib.ts
913
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
914
+ */
915
+
916
+ export { CommonGridComponent, RaiseCommonLibModule };
917
+ //# sourceMappingURL=raise-common-lib.js.map