@acorex/data-grid 3.0.21 → 3.0.25
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.
- package/acorex-data-grid.d.ts +4 -0
- package/acorex-data-grid.metadata.json +1 -0
- package/bundles/acorex-data-grid.umd.js +2224 -0
- package/bundles/acorex-data-grid.umd.js.map +1 -0
- package/bundles/acorex-data-grid.umd.min.js +16 -0
- package/bundles/acorex-data-grid.umd.min.js.map +1 -0
- package/esm2015/acorex-data-grid.js +5 -0
- package/esm2015/lib/data-grid/columns/check-column.component.js +104 -0
- package/esm2015/lib/data-grid/columns/column.component.js +204 -0
- package/esm2015/lib/data-grid/columns/command-column.component.js +103 -0
- package/esm2015/lib/data-grid/columns/date-column.component.js +114 -0
- package/esm2015/lib/data-grid/columns/row-number-column.component.js +39 -0
- package/esm2015/lib/data-grid/columns/selection-column.component.js +42 -0
- package/esm2015/lib/data-grid/columns/text-column.component.js +81 -0
- package/esm2015/lib/data-grid/datagrid.component.js +709 -0
- package/esm2015/lib/data-grid/datagrid.events.js +1 -0
- package/esm2015/lib/data-grid/datagrid.module.js +98 -0
- package/esm2015/lib/data-grid/filters/filter.component.js +25 -0
- package/esm2015/lib/data-grid/templates/cell-template.component.js +47 -0
- package/esm2015/lib/data-grid/templates/detail-template.component.js +45 -0
- package/esm2015/lib/data-grid/templates/row-template.component.js +40 -0
- package/esm2015/lib/data-lov/data-lov-popup/data-lov-popup.component.js +121 -0
- package/esm2015/lib/data-lov/data-lov.component.js +206 -0
- package/esm2015/lib/data-lov/data-lov.module.js +21 -0
- package/esm2015/public-api.js +17 -0
- package/esm5/acorex-data-grid.js +5 -0
- package/esm5/lib/data-grid/columns/check-column.component.js +102 -0
- package/esm5/lib/data-grid/columns/column.component.js +206 -0
- package/esm5/lib/data-grid/columns/command-column.component.js +98 -0
- package/esm5/lib/data-grid/columns/date-column.component.js +119 -0
- package/esm5/lib/data-grid/columns/row-number-column.component.js +42 -0
- package/esm5/lib/data-grid/columns/selection-column.component.js +46 -0
- package/esm5/lib/data-grid/columns/text-column.component.js +81 -0
- package/esm5/lib/data-grid/datagrid.component.js +767 -0
- package/esm5/lib/data-grid/datagrid.events.js +1 -0
- package/esm5/lib/data-grid/datagrid.module.js +101 -0
- package/esm5/lib/data-grid/filters/filter.component.js +16 -0
- package/esm5/lib/data-grid/templates/cell-template.component.js +46 -0
- package/esm5/lib/data-grid/templates/detail-template.component.js +49 -0
- package/esm5/lib/data-grid/templates/row-template.component.js +44 -0
- package/esm5/lib/data-lov/data-lov-popup/data-lov-popup.component.js +127 -0
- package/esm5/lib/data-lov/data-lov.component.js +216 -0
- package/esm5/lib/data-lov/data-lov.module.js +24 -0
- package/esm5/public-api.js +17 -0
- package/fesm2015/acorex-data-grid.js +1901 -0
- package/fesm2015/acorex-data-grid.js.map +1 -0
- package/fesm5/acorex-data-grid.js +1980 -0
- package/fesm5/acorex-data-grid.js.map +1 -0
- package/lib/data-grid/columns/check-column.component.d.ts +30 -0
- package/lib/data-grid/columns/column.component.d.ts +29 -0
- package/lib/data-grid/columns/command-column.component.d.ts +22 -0
- package/lib/data-grid/columns/date-column.component.d.ts +27 -0
- package/lib/data-grid/columns/row-number-column.component.d.ts +7 -0
- package/lib/data-grid/columns/selection-column.component.d.ts +8 -0
- package/lib/data-grid/columns/text-column.component.d.ts +20 -0
- package/lib/data-grid/datagrid.component.d.ts +129 -0
- package/{src/lib/data-grid/datagrid.events.ts → lib/data-grid/datagrid.events.d.ts} +1 -4
- package/lib/data-grid/datagrid.module.d.ts +3 -0
- package/lib/data-grid/filters/filter.component.d.ts +2 -0
- package/lib/data-grid/templates/cell-template.component.d.ts +17 -0
- package/lib/data-grid/templates/detail-template.component.d.ts +16 -0
- package/lib/data-grid/templates/row-template.component.d.ts +15 -0
- package/lib/data-lov/data-lov-popup/data-lov-popup.component.d.ts +29 -0
- package/lib/data-lov/data-lov.component.d.ts +39 -0
- package/lib/data-lov/data-lov.module.d.ts +2 -0
- package/package.json +27 -17
- package/{src/public-api.ts → public-api.d.ts} +0 -3
- package/karma.conf.js +0 -32
- package/ng-package.json +0 -12
- package/src/lib/data-grid/columns/check-column.component.ts +0 -113
- package/src/lib/data-grid/columns/column.component.ts +0 -181
- package/src/lib/data-grid/columns/command-column.component.ts +0 -102
- package/src/lib/data-grid/columns/date-column.component.ts +0 -119
- package/src/lib/data-grid/columns/row-number-column.component.ts +0 -36
- package/src/lib/data-grid/columns/selection-column.component.ts +0 -37
- package/src/lib/data-grid/columns/text-column.component.ts +0 -92
- package/src/lib/data-grid/datagrid.component.html +0 -26
- package/src/lib/data-grid/datagrid.component.ts +0 -724
- package/src/lib/data-grid/datagrid.module.ts +0 -93
- package/src/lib/data-grid/filters/filter.component.ts +0 -21
- package/src/lib/data-grid/templates/cell-template.component.ts +0 -47
- package/src/lib/data-grid/templates/detail-template.component.ts +0 -43
- package/src/lib/data-grid/templates/row-template.component.ts +0 -41
- package/src/lib/data-lov/data-lov-popup/data-lov-popup.component.html +0 -16
- package/src/lib/data-lov/data-lov-popup/data-lov-popup.component.ts +0 -135
- package/src/lib/data-lov/data-lov.component.html +0 -61
- package/src/lib/data-lov/data-lov.component.ts +0 -177
- package/src/lib/data-lov/data-lov.module.ts +0 -17
- package/src/test.ts +0 -26
- package/tsconfig.lib.json +0 -23
- package/tsconfig.lib.prod.json +0 -6
- package/tsconfig.spec.json +0 -17
- package/tslint.json +0 -17
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { AXGridDataColumn } from './column.component';
|
|
2
|
-
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
3
|
-
import { AXConfig } from '@acorex/core';
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'ax-row-number-column',
|
|
7
|
-
template: '',
|
|
8
|
-
providers: [{ provide: AXGridDataColumn, useExisting: AXGridRowNumberColumn }],
|
|
9
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
10
|
-
})
|
|
11
|
-
export class AXGridRowNumberColumn extends AXGridDataColumn {
|
|
12
|
-
constructor() {
|
|
13
|
-
super();
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
ngOnInit(): void {}
|
|
17
|
-
|
|
18
|
-
@Input()
|
|
19
|
-
condition: (params) => boolean;
|
|
20
|
-
|
|
21
|
-
render() {
|
|
22
|
-
const col = super.render();
|
|
23
|
-
// col.checkboxSelection = this.condition ? this.condition : true;
|
|
24
|
-
// col.headerCheckboxSelection = true;
|
|
25
|
-
|
|
26
|
-
(col.headerName = this.caption ? this.caption : AXConfig.get('layout.rtl') ? 'ردیف' : 'Row'),
|
|
27
|
-
(col.valueGetter = 'node.rowIndex + 1'),
|
|
28
|
-
(col.pinned = this.pinned == null ? (AXConfig.get('layout.rtl') ? 'right' : 'left') : this.pinned === 'start' ? 'right' : 'left'),
|
|
29
|
-
(col.filter = false);
|
|
30
|
-
col.resizable = true;
|
|
31
|
-
col.sortable = false;
|
|
32
|
-
col.width = this.width;
|
|
33
|
-
|
|
34
|
-
return col;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { AXGridDataColumn } from './column.component';
|
|
2
|
-
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
3
|
-
|
|
4
|
-
@Component({
|
|
5
|
-
selector: 'ax-selection-column',
|
|
6
|
-
template: '',
|
|
7
|
-
providers: [{ provide: AXGridDataColumn, useExisting: AXGridSelectionColumn }],
|
|
8
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
9
|
-
})
|
|
10
|
-
export class AXGridSelectionColumn extends AXGridDataColumn {
|
|
11
|
-
constructor() {
|
|
12
|
-
super();
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
ngOnInit(): void {
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
@Input()
|
|
20
|
-
condition: (params) => boolean;
|
|
21
|
-
|
|
22
|
-
@Input()
|
|
23
|
-
pinned: 'start' | 'end' = 'start';
|
|
24
|
-
|
|
25
|
-
render() {
|
|
26
|
-
const col = super.render();
|
|
27
|
-
col.checkboxSelection = this.condition ? this.condition : true;
|
|
28
|
-
// col.headerCheckboxSelection = true;
|
|
29
|
-
col.pinned = this.pinned === 'start' ? 'right' : 'left';
|
|
30
|
-
col.filter = false;
|
|
31
|
-
col.resizable = false;
|
|
32
|
-
col.sortable = false;
|
|
33
|
-
col.width = 40;
|
|
34
|
-
|
|
35
|
-
return col;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { AXGridDataColumn } from './column.component';
|
|
2
|
-
import {
|
|
3
|
-
ChangeDetectionStrategy,
|
|
4
|
-
Component,
|
|
5
|
-
ViewContainerRef,
|
|
6
|
-
ViewChild
|
|
7
|
-
} from '@angular/core';
|
|
8
|
-
import {
|
|
9
|
-
IFilterParams,
|
|
10
|
-
RowNode,
|
|
11
|
-
IDoesFilterPassParams,
|
|
12
|
-
IAfterGuiAttachedParams
|
|
13
|
-
} from 'ag-grid-community';
|
|
14
|
-
import { IFilterAngularComp } from 'ag-grid-angular';
|
|
15
|
-
import { AXTextBoxComponent } from '@acorex/components';
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
@Component({
|
|
19
|
-
selector: 'ax-text-column',
|
|
20
|
-
template: '',
|
|
21
|
-
providers: [{ provide: AXGridDataColumn, useExisting: AXGridTextColumn }],
|
|
22
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
23
|
-
})
|
|
24
|
-
export class AXGridTextColumn extends AXGridDataColumn {
|
|
25
|
-
constructor() {
|
|
26
|
-
super();
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
render() {
|
|
30
|
-
const col = super.render();
|
|
31
|
-
// if (this.allowFiltering) {
|
|
32
|
-
// col.filterFramework = TextFilterRenderer;
|
|
33
|
-
// }
|
|
34
|
-
col.filter = 'agTextColumnFilter';
|
|
35
|
-
return col;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
@Component({
|
|
40
|
-
template: `
|
|
41
|
-
<ax-data-grid-filter>
|
|
42
|
-
<ax-text-box label='Filter' allowClear='true' (textChange)='onChange($event)'>
|
|
43
|
-
</ax-text-box>
|
|
44
|
-
</ax-data-grid-filter>
|
|
45
|
-
`,
|
|
46
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
47
|
-
})
|
|
48
|
-
export class TextFilterRenderer implements IFilterAngularComp {
|
|
49
|
-
public value?: string = null;
|
|
50
|
-
private params: IFilterParams;
|
|
51
|
-
private valueGetter: (rowNode: RowNode) => any;
|
|
52
|
-
@ViewChild(AXTextBoxComponent, { static: true })
|
|
53
|
-
private input: AXTextBoxComponent;
|
|
54
|
-
|
|
55
|
-
agInit(params: IFilterParams): void {
|
|
56
|
-
this.params = params;
|
|
57
|
-
this.valueGetter = params.valueGetter;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
isFilterActive(): boolean {
|
|
61
|
-
return this.value !== null && this.value !== undefined;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
doesFilterPass(params: IDoesFilterPassParams): boolean {
|
|
65
|
-
return this.value === this.valueGetter(params.node);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
getModel(): any {
|
|
69
|
-
return { value: this.value };
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
setModel(model: any): void {
|
|
73
|
-
;
|
|
74
|
-
this.onChange(model ? model.value : null);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
ngAfterViewInit(params: IAfterGuiAttachedParams): void {
|
|
78
|
-
window.setTimeout(() => {
|
|
79
|
-
this.input.focus();
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
onChange(newValue): void {
|
|
84
|
-
if (this.value !== newValue) {
|
|
85
|
-
this.value = newValue;
|
|
86
|
-
if (this.value === '') {
|
|
87
|
-
this.value = null;
|
|
88
|
-
}
|
|
89
|
-
this.params.filterChangedCallback();
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
<div class="ax-grid-toolbar" *ngIf="toolbar">
|
|
2
|
-
<ng-content select="ax-toolbar"></ng-content>
|
|
3
|
-
</div>
|
|
4
|
-
<!-- [enableSorting]="true" [enableColResize]="true" [enableFilter]="allowFiltering" -->
|
|
5
|
-
<ag-grid-angular *ngIf="gridView" class="ag-theme-balham" [getRowClass]="internalGetRowClass"
|
|
6
|
-
[style.height]="internalHeight" [columnDefs]="columnDefs" [enableRtl]="rtl" [pagination]="true"
|
|
7
|
-
[rowGroupPanelShow]="rowGroupPanelShow" [rowModelType]="rowModelType" [detailRowHeight]="detailRowHeight"
|
|
8
|
-
[getRowHeight]="getRowHeight" [paginationAutoPageSize]="true" [suppressMenuHide]="true"
|
|
9
|
-
[frameworkComponents]="frameworkComponents" [isFullWidthCell]="isFullWidthCell" [rowSelection]="selectionMode"
|
|
10
|
-
[rowMultiSelectWithClick]="rowMultiSelectWithClick" [fullWidthCellRendererFramework]="fullWidthCellRendererFramework"
|
|
11
|
-
[fullWidthCellRendererParams]="fullWidthCellRendererParams" (cellClicked)="internalGridCellClicked($event)"
|
|
12
|
-
(cellDoubleClicked)="internalGridCellDoubleClicked($event)" (cellFocused)="internalGridCellFocused($event)"
|
|
13
|
-
(rowClicked)="internalGridRowClicked($event)" (selectionChanged)="internalGridSelectionChanged($event)"
|
|
14
|
-
(rowSelected)="rowSelectionChanged($event)" (rowDoubleClicked)="internalGridRowDoubleClicked($event)"
|
|
15
|
-
(gridReady)="internalGridReady($event)" [groupSelectsChildren]="groupSelectsChildren"
|
|
16
|
-
[suppressRowClickSelection]="suppressRowClickSelection" [groupSelectsFiltered]="true"
|
|
17
|
-
[suppressCellSelection]="suppressCellSelection" [autoGroupColumnDef]="autoGroupColumnDef"
|
|
18
|
-
[suppressAggFuncInHeader]="true" [treeData]="treeData" [animateRows]="true" [isServerSideGroup]="isServerSideGroup"
|
|
19
|
-
[getServerSideGroupKey]="getServerSideGroupKey" [masterDetail]="masterDetail"
|
|
20
|
-
[detailCellRendererParams]="detailCellRendererParams" [detailCellRenderer]="detailCellRenderer"
|
|
21
|
-
(gridSizeChanged)="internalGridSizeChanged($event)" (firstDataRendered)="internalGridFirstDataRendered($event)"
|
|
22
|
-
[localeText]="localeText" [groupHideOpenParents]="groupHideOpenParents" [enableRangeSelection]="true"
|
|
23
|
-
[enableRangeSelection]="false" [allowContextMenuWithControlKey]="false" [getMainMenuItems]="getMainMenuItems">
|
|
24
|
-
</ag-grid-angular>
|
|
25
|
-
|
|
26
|
-
<!-- (displayedColumnsChanged)="displayedColumnsChanged($event)" -->
|