@acorex/data-grid 6.5.70 → 6.5.72
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +7 -2
- package/esm2022/acorex-data-grid.mjs +5 -0
- package/esm2022/index.mjs +18 -0
- package/esm2022/lib/data-grid/columns/check-column.component.mjs +109 -0
- package/esm2022/lib/data-grid/columns/column.component.mjs +168 -0
- package/esm2022/lib/data-grid/columns/command-column.component.mjs +115 -0
- package/esm2022/lib/data-grid/columns/date-column.component.mjs +115 -0
- package/esm2022/lib/data-grid/columns/row-number-column.component.mjs +38 -0
- package/esm2022/lib/data-grid/columns/selection-column.component.mjs +43 -0
- package/esm2022/lib/data-grid/columns/text-column.component.mjs +97 -0
- package/esm2022/lib/data-grid/datagrid.component.mjs +721 -0
- package/esm2022/lib/data-grid/datagrid.events.mjs +2 -0
- package/esm2022/lib/data-grid/datagrid.module.mjs +143 -0
- package/esm2022/lib/data-grid/filters/filter.component.mjs +39 -0
- package/esm2022/lib/data-grid/templates/cell-template.component.mjs +58 -0
- package/esm2022/lib/data-grid/templates/detail-template.component.mjs +51 -0
- package/esm2022/lib/data-grid/templates/row-template.component.mjs +48 -0
- package/esm2022/lib/data-lov/data-lov-popup/data-lov-popup.component.mjs +121 -0
- package/esm2022/lib/data-lov/data-lov.component.mjs +175 -0
- package/esm2022/lib/data-lov/data-lov.module.mjs +23 -0
- package/{fesm2020 → fesm2022}/acorex-data-grid.mjs +380 -319
- package/fesm2022/acorex-data-grid.mjs.map +1 -0
- package/lib/data-grid/columns/check-column.component.d.ts +4 -4
- package/lib/data-grid/columns/column.component.d.ts +1 -1
- package/lib/data-grid/columns/command-column.component.d.ts +3 -3
- package/lib/data-grid/columns/date-column.component.d.ts +2 -2
- package/lib/data-grid/columns/row-number-column.component.d.ts +1 -1
- package/lib/data-grid/columns/selection-column.component.d.ts +1 -1
- package/lib/data-grid/columns/text-column.component.d.ts +3 -3
- package/lib/data-grid/datagrid.component.d.ts +1 -1
- package/lib/data-grid/filters/filter.component.d.ts +1 -1
- package/lib/data-grid/templates/cell-template.component.d.ts +2 -2
- package/lib/data-grid/templates/detail-template.component.d.ts +2 -2
- package/lib/data-grid/templates/row-template.component.d.ts +2 -2
- package/lib/data-lov/data-lov-popup/data-lov-popup.component.d.ts +1 -1
- package/lib/data-lov/data-lov.component.d.ts +1 -1
- package/package.json +12 -21
- package/acorex-data-grid.d.ts +0 -5
- package/esm2020/acorex-data-grid.mjs +0 -5
- package/esm2020/lib/data-grid/columns/check-column.component.mjs +0 -117
- package/esm2020/lib/data-grid/columns/column.component.mjs +0 -164
- package/esm2020/lib/data-grid/columns/command-column.component.mjs +0 -117
- package/esm2020/lib/data-grid/columns/date-column.component.mjs +0 -111
- package/esm2020/lib/data-grid/columns/row-number-column.component.mjs +0 -37
- package/esm2020/lib/data-grid/columns/selection-column.component.mjs +0 -42
- package/esm2020/lib/data-grid/columns/text-column.component.mjs +0 -89
- package/esm2020/lib/data-grid/datagrid.component.mjs +0 -698
- package/esm2020/lib/data-grid/datagrid.events.mjs +0 -2
- package/esm2020/lib/data-grid/datagrid.module.mjs +0 -145
- package/esm2020/lib/data-grid/filters/filter.component.mjs +0 -39
- package/esm2020/lib/data-grid/templates/cell-template.component.mjs +0 -53
- package/esm2020/lib/data-grid/templates/detail-template.component.mjs +0 -46
- package/esm2020/lib/data-grid/templates/row-template.component.mjs +0 -43
- package/esm2020/lib/data-lov/data-lov-popup/data-lov-popup.component.mjs +0 -114
- package/esm2020/lib/data-lov/data-lov.component.mjs +0 -165
- package/esm2020/lib/data-lov/data-lov.module.mjs +0 -23
- package/esm2020/public-api.mjs +0 -18
- package/fesm2015/acorex-data-grid.mjs +0 -1915
- package/fesm2015/acorex-data-grid.mjs.map +0 -1
- package/fesm2020/acorex-data-grid.mjs.map +0 -1
- /package/{public-api.d.ts → index.d.ts} +0 -0
@@ -0,0 +1,38 @@
|
|
1
|
+
import { AXGridDataColumn } from './column.component';
|
2
|
+
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
3
|
+
import { AXConfig } from '@acorex/core';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
export class AXGridRowNumberColumn extends AXGridDataColumn {
|
6
|
+
constructor() {
|
7
|
+
super();
|
8
|
+
}
|
9
|
+
ngOnInit() { }
|
10
|
+
condition;
|
11
|
+
render() {
|
12
|
+
const col = super.render();
|
13
|
+
// col.checkboxSelection = this.condition ? this.condition : true;
|
14
|
+
// col.headerCheckboxSelection = true;
|
15
|
+
(col.headerName = this.caption ? this.caption : AXConfig.get('layout.rtl') ? 'ردیف' : 'Row'),
|
16
|
+
(col.valueGetter = 'node.rowIndex + 1'),
|
17
|
+
(col.pinned = this.pinned == null ? null : this.pinned === 'start' ? 'right' : 'left'),
|
18
|
+
(col.filter = false);
|
19
|
+
col.resizable = true;
|
20
|
+
col.sortable = false;
|
21
|
+
col.width = this.width;
|
22
|
+
return col;
|
23
|
+
}
|
24
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXGridRowNumberColumn, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
25
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AXGridRowNumberColumn, selector: "ax-row-number-column", inputs: { condition: "condition" }, providers: [{ provide: AXGridDataColumn, useExisting: AXGridRowNumberColumn }], usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
26
|
+
}
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXGridRowNumberColumn, decorators: [{
|
28
|
+
type: Component,
|
29
|
+
args: [{
|
30
|
+
selector: 'ax-row-number-column',
|
31
|
+
template: '',
|
32
|
+
providers: [{ provide: AXGridDataColumn, useExisting: AXGridRowNumberColumn }],
|
33
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
34
|
+
}]
|
35
|
+
}], ctorParameters: function () { return []; }, propDecorators: { condition: [{
|
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CA6IHRoaXMucGlubmVkID09PSAnc3RhcnQnID8gJ3JpZ2h0JyA6ICdsZWZ0JyksXG4gICAgICAoY29sLmZpbHRlciA9IGZhbHNlKTtcbiAgICBjb2wucmVzaXphYmxlID0gdHJ1ZTtcbiAgICBjb2wuc29ydGFibGUgPSBmYWxzZTtcbiAgICBjb2wud2lkdGggPSB0aGlzLndpZHRoO1xuXG4gICAgcmV0dXJuIGNvbDtcbiAgfVxufVxuIl19
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import { AXGridDataColumn } from './column.component';
|
2
|
+
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export class AXGridSelectionColumn extends AXGridDataColumn {
|
5
|
+
constructor() {
|
6
|
+
super();
|
7
|
+
}
|
8
|
+
ngOnInit() { }
|
9
|
+
condition;
|
10
|
+
pinned = 'start';
|
11
|
+
width = 40;
|
12
|
+
render() {
|
13
|
+
const col = super.render();
|
14
|
+
col.checkboxSelection = this.condition ? this.condition : true;
|
15
|
+
// col.headerCheckboxSelection = true;
|
16
|
+
col.pinned = this.pinned === 'start' ? 'right' : 'left';
|
17
|
+
col.filter = false;
|
18
|
+
col.resizable = true;
|
19
|
+
col.sortable = false;
|
20
|
+
col.minWidth = 5;
|
21
|
+
col.width = this.width;
|
22
|
+
col.floatingFilter = false;
|
23
|
+
return col;
|
24
|
+
}
|
25
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXGridSelectionColumn, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
26
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AXGridSelectionColumn, selector: "ax-selection-column", inputs: { condition: "condition", pinned: "pinned", width: "width" }, providers: [{ provide: AXGridDataColumn, useExisting: AXGridSelectionColumn }], usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
27
|
+
}
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXGridSelectionColumn, decorators: [{
|
29
|
+
type: Component,
|
30
|
+
args: [{
|
31
|
+
selector: 'ax-selection-column',
|
32
|
+
template: '',
|
33
|
+
providers: [{ provide: AXGridDataColumn, useExisting: AXGridSelectionColumn }],
|
34
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
35
|
+
}]
|
36
|
+
}], ctorParameters: function () { return []; }, propDecorators: { condition: [{
|
37
|
+
type: Input
|
38
|
+
}], pinned: [{
|
39
|
+
type: Input
|
40
|
+
}], width: [{
|
41
|
+
type: Input
|
42
|
+
}] } });
|
43
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VsZWN0aW9uLWNvbHVtbi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2RhdGEtZ3JpZC9zcmMvbGliL2RhdGEtZ3JpZC9jb2x1bW5zL3NlbGVjdGlvbi1jb2x1bW4uY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBQ3RELE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFDOztBQVExRSxNQUFNLE9BQU8scUJBQXNCLFNBQVEsZ0JBQWdCO0lBQ3pEO1FBQ0UsS0FBSyxFQUFFLENBQUM7SUFDVixDQUFDO0lBRUQsUUFBUSxLQUFVLENBQUM7SUFHbkIsU0FBUyxDQUFzQjtJQUcvQixNQUFNLEdBQW9CLE9BQU8sQ0FBQztJQUdsQyxLQUFLLEdBQVcsRUFBRSxDQUFDO0lBRW5CLE1BQU07UUFDSixNQUF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G4gICAgLy8gIGNvbC5oZWFkZXJDaGVja2JveFNlbGVjdGlvbiA9IHRydWU7XG4gICAgY29sLnBpbm5lZCA9IHRoaXMucGlubmVkID09PSAnc3RhcnQnID8gJ3JpZ2h0JyA6ICdsZWZ0JztcbiAgICBjb2wuZmlsdGVyID0gZmFsc2U7XG4gICAgY29sLnJlc2l6YWJsZSA9IHRydWU7XG4gICAgY29sLnNvcnRhYmxlID0gZmFsc2U7XG4gICAgY29sLm1pbldpZHRoID0gNTtcbiAgICBjb2wud2lkdGggPSB0aGlzLndpZHRoO1xuICAgIGNvbC5mbG9hdGluZ0ZpbHRlciA9IGZhbHNlO1xuICAgIHJldHVybiBjb2w7XG4gIH1cbn1cbiJdfQ==
|
@@ -0,0 +1,97 @@
|
|
1
|
+
import { AXGridDataColumn } from './column.component';
|
2
|
+
import { ChangeDetectionStrategy, Component, ViewChild, } from '@angular/core';
|
3
|
+
import { AXTextBoxComponent } from '@acorex/components';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
import * as i1 from "@acorex/components";
|
6
|
+
import * as i2 from "../filters/filter.component";
|
7
|
+
export class AXGridTextColumn extends AXGridDataColumn {
|
8
|
+
constructor() {
|
9
|
+
super();
|
10
|
+
}
|
11
|
+
render() {
|
12
|
+
const col = super.render();
|
13
|
+
// if (this.allowFiltering) {
|
14
|
+
// col.filterFramework = TextFilterRenderer;
|
15
|
+
// }
|
16
|
+
col.filter = 'agTextColumnFilter';
|
17
|
+
return col;
|
18
|
+
}
|
19
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXGridTextColumn, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
20
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AXGridTextColumn, selector: "ax-text-column", providers: [{ provide: AXGridDataColumn, useExisting: AXGridTextColumn }], usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
21
|
+
}
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXGridTextColumn, decorators: [{
|
23
|
+
type: Component,
|
24
|
+
args: [{
|
25
|
+
selector: 'ax-text-column',
|
26
|
+
template: '',
|
27
|
+
providers: [{ provide: AXGridDataColumn, useExisting: AXGridTextColumn }],
|
28
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
29
|
+
}]
|
30
|
+
}], ctorParameters: function () { return []; } });
|
31
|
+
export class TextFilterRenderer {
|
32
|
+
value = null;
|
33
|
+
params;
|
34
|
+
valueGetter;
|
35
|
+
input;
|
36
|
+
agInit(params) {
|
37
|
+
this.params = params;
|
38
|
+
this.valueGetter = params.valueGetter;
|
39
|
+
}
|
40
|
+
isFilterActive() {
|
41
|
+
return this.value !== null && this.value !== undefined;
|
42
|
+
}
|
43
|
+
doesFilterPass(params) {
|
44
|
+
return this.value === this.valueGetter(params.node);
|
45
|
+
}
|
46
|
+
getModel() {
|
47
|
+
return { value: this.value };
|
48
|
+
}
|
49
|
+
setModel(model) {
|
50
|
+
this.onChange(model ? model.value : null);
|
51
|
+
}
|
52
|
+
ngAfterViewInit(params) {
|
53
|
+
window.setTimeout(() => {
|
54
|
+
this.input.focus();
|
55
|
+
});
|
56
|
+
}
|
57
|
+
onChange(newValue) {
|
58
|
+
if (this.value !== newValue) {
|
59
|
+
this.value = newValue;
|
60
|
+
if (this.value === '') {
|
61
|
+
this.value = null;
|
62
|
+
}
|
63
|
+
this.params.filterChangedCallback();
|
64
|
+
}
|
65
|
+
}
|
66
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TextFilterRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
67
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TextFilterRenderer, selector: "ng-component", viewQueries: [{ propertyName: "input", first: true, predicate: AXTextBoxComponent, descendants: true, static: true }], ngImport: i0, template: `
|
68
|
+
<ax-data-grid-filter>
|
69
|
+
<ax-text-box
|
70
|
+
label="Filter"
|
71
|
+
allowClear="true"
|
72
|
+
(textChange)="onChange($event)"
|
73
|
+
>
|
74
|
+
</ax-text-box>
|
75
|
+
</ax-data-grid-filter>
|
76
|
+
`, isInline: true, dependencies: [{ kind: "component", type: i1.AXTextBoxComponent, selector: "ax-text-box", inputs: ["mask", "showMask", "type", "maxLength", "maskGuid", "maskPlaceholder", "maskKeepCharPositions"] }, { kind: "component", type: i2.AXDataGridFilterComponent, selector: "ax-data-grid-filter" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
77
|
+
}
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TextFilterRenderer, decorators: [{
|
79
|
+
type: Component,
|
80
|
+
args: [{
|
81
|
+
template: `
|
82
|
+
<ax-data-grid-filter>
|
83
|
+
<ax-text-box
|
84
|
+
label="Filter"
|
85
|
+
allowClear="true"
|
86
|
+
(textChange)="onChange($event)"
|
87
|
+
>
|
88
|
+
</ax-text-box>
|
89
|
+
</ax-data-grid-filter>
|
90
|
+
`,
|
91
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
92
|
+
}]
|
93
|
+
}], propDecorators: { input: [{
|
94
|
+
type: ViewChild,
|
95
|
+
args: [AXTextBoxComponent, { static: true }]
|
96
|
+
}] } });
|
97
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGV4dC1jb2x1bW4uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9kYXRhLWdyaWQvc3JjL2xpYi9kYXRhLWdyaWQvY29sdW1ucy90ZXh0LWNvbHVtbi5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW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