@acorex/data-grid 4.1.4 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/karma.conf.js +32 -0
- package/ng-package.json +12 -0
- package/package.json +17 -37
- package/src/lib/data-grid/columns/check-column.component.ts +113 -0
- package/src/lib/data-grid/columns/column.component.ts +182 -0
- package/src/lib/data-grid/columns/command-column.component.ts +101 -0
- package/src/lib/data-grid/columns/date-column.component.ts +118 -0
- package/src/lib/data-grid/columns/row-number-column.component.ts +36 -0
- package/src/lib/data-grid/columns/selection-column.component.ts +39 -0
- package/src/lib/data-grid/columns/text-column.component.ts +92 -0
- package/src/lib/data-grid/datagrid.component.html +27 -0
- package/src/lib/data-grid/datagrid.component.ts +769 -0
- package/{lib/data-grid/datagrid.events.d.ts → src/lib/data-grid/datagrid.events.ts} +4 -1
- package/src/lib/data-grid/datagrid.module.ts +81 -0
- package/src/lib/data-grid/filters/filter.component.ts +21 -0
- package/src/lib/data-grid/templates/cell-template.component.ts +47 -0
- package/src/lib/data-grid/templates/detail-template.component.ts +43 -0
- package/src/lib/data-grid/templates/row-template.component.ts +41 -0
- package/src/lib/data-lov/data-lov-popup/data-lov-popup.component.html +16 -0
- package/src/lib/data-lov/data-lov-popup/data-lov-popup.component.ts +130 -0
- package/src/lib/data-lov/data-lov.component.html +61 -0
- package/src/lib/data-lov/data-lov.component.ts +181 -0
- package/src/lib/data-lov/data-lov.module.ts +16 -0
- package/{public-api.d.ts → src/public-api.ts} +3 -0
- package/src/test.ts +28 -0
- package/tsconfig.lib.json +23 -0
- package/tsconfig.lib.prod.json +6 -0
- package/tsconfig.spec.json +17 -0
- package/tslint.json +17 -0
- 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 -115
- package/esm2020/lib/data-grid/columns/date-column.component.mjs +0 -112
- 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 -672
- 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 -118
- package/esm2020/lib/data-lov/data-lov.component.mjs +0 -163
- 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 -1889
- package/fesm2015/acorex-data-grid.mjs.map +0 -1
- package/fesm2020/acorex-data-grid.mjs +0 -1889
- package/fesm2020/acorex-data-grid.mjs.map +0 -1
- package/lib/data-grid/columns/check-column.component.d.ts +0 -37
- package/lib/data-grid/columns/column.component.d.ts +0 -32
- package/lib/data-grid/columns/command-column.component.d.ts +0 -27
- package/lib/data-grid/columns/date-column.component.d.ts +0 -32
- package/lib/data-grid/columns/row-number-column.component.d.ts +0 -10
- package/lib/data-grid/columns/selection-column.component.d.ts +0 -12
- package/lib/data-grid/columns/text-column.component.d.ts +0 -25
- package/lib/data-grid/datagrid.component.d.ts +0 -142
- package/lib/data-grid/datagrid.module.d.ts +0 -23
- package/lib/data-grid/filters/filter.component.d.ts +0 -5
- package/lib/data-grid/templates/cell-template.component.d.ts +0 -22
- package/lib/data-grid/templates/detail-template.component.d.ts +0 -21
- package/lib/data-grid/templates/row-template.component.d.ts +0 -20
- package/lib/data-lov/data-lov-popup/data-lov-popup.component.d.ts +0 -32
- package/lib/data-lov/data-lov.component.d.ts +0 -42
- package/lib/data-lov/data-lov.module.d.ts +0 -12
@@ -1,112 +0,0 @@
|
|
1
|
-
import { Component, ChangeDetectionStrategy, Input, ViewEncapsulation, ViewChild, ElementRef } from '@angular/core';
|
2
|
-
import { AXGridDataColumn } from './column.component';
|
3
|
-
import { AXDateTime, AXConfig } from '@acorex/core';
|
4
|
-
import { AXDatePickerComponent } from '@acorex/components';
|
5
|
-
import * as i0 from "@angular/core";
|
6
|
-
import * as i1 from "@acorex/components";
|
7
|
-
export class AXGridDateColumn extends AXGridDataColumn {
|
8
|
-
constructor() {
|
9
|
-
super();
|
10
|
-
this.type = AXConfig.get('dateTime.type');
|
11
|
-
}
|
12
|
-
render() {
|
13
|
-
const col = super.render();
|
14
|
-
col.cellRendererParams = {
|
15
|
-
format: this.format,
|
16
|
-
};
|
17
|
-
col.comparator = (valueA, valueB) => {
|
18
|
-
const date1 = AXDateTime.convert(valueA);
|
19
|
-
const date2 = AXDateTime.convert(valueB);
|
20
|
-
//
|
21
|
-
if (date1 === null && date2 === null) {
|
22
|
-
return 0;
|
23
|
-
}
|
24
|
-
if (date1 === null) {
|
25
|
-
return -1;
|
26
|
-
}
|
27
|
-
if (date2 === null) {
|
28
|
-
return 1;
|
29
|
-
}
|
30
|
-
return (date1.date.getTime() - date2.date.getTime());
|
31
|
-
};
|
32
|
-
col.valueFormatter = (params) => {
|
33
|
-
const date = AXDateTime.convert(params.value, this.type);
|
34
|
-
if (date) {
|
35
|
-
return date.format(this.format);
|
36
|
-
}
|
37
|
-
else {
|
38
|
-
return null;
|
39
|
-
}
|
40
|
-
};
|
41
|
-
col.filter = 'agDateColumnFilter';
|
42
|
-
// col.floatingFilter = true;
|
43
|
-
return col;
|
44
|
-
}
|
45
|
-
}
|
46
|
-
AXGridDateColumn.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXGridDateColumn, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
47
|
-
AXGridDateColumn.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXGridDateColumn, selector: "ax-date-column", inputs: { format: "format", type: "type" }, providers: [{ provide: AXGridDataColumn, useExisting: AXGridDateColumn }], usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
48
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXGridDateColumn, decorators: [{
|
49
|
-
type: Component,
|
50
|
-
args: [{
|
51
|
-
selector: 'ax-date-column',
|
52
|
-
template: '',
|
53
|
-
providers: [{ provide: AXGridDataColumn, useExisting: AXGridDateColumn }],
|
54
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
55
|
-
}]
|
56
|
-
}], ctorParameters: function () { return []; }, propDecorators: { format: [{
|
57
|
-
type: Input
|
58
|
-
}], type: [{
|
59
|
-
type: Input
|
60
|
-
}] } });
|
61
|
-
export class AXDatePickerFilterComponent {
|
62
|
-
constructor() {
|
63
|
-
this.selectableHoliday = false;
|
64
|
-
this.type = 'jalali';
|
65
|
-
}
|
66
|
-
agInit(params) {
|
67
|
-
this.params = params;
|
68
|
-
}
|
69
|
-
ngAfterViewInit() {
|
70
|
-
}
|
71
|
-
ngOnDestroy() {
|
72
|
-
console.log(`Destroying DateComponent`);
|
73
|
-
}
|
74
|
-
onDateChanged(selectedDates) {
|
75
|
-
//this.date = selectedDates[0] || null;
|
76
|
-
this.params.onDateChanged();
|
77
|
-
}
|
78
|
-
getDate() {
|
79
|
-
return this.date;
|
80
|
-
}
|
81
|
-
setDate(date) {
|
82
|
-
this.date = date || null;
|
83
|
-
//this.picker.setDate(date);
|
84
|
-
}
|
85
|
-
setInputPlaceholder(placeholder) {
|
86
|
-
//this.div.nativeElement.setAttribute('placeholder', placeholder);
|
87
|
-
}
|
88
|
-
onValueChanged(e) {
|
89
|
-
this.setDate(e.value);
|
90
|
-
this.onDateChanged(e.value);
|
91
|
-
}
|
92
|
-
}
|
93
|
-
AXDatePickerFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXDatePickerFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
94
|
-
AXDatePickerFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXDatePickerFilterComponent, selector: "ax-data-picker-filter", viewQueries: [{ propertyName: "datePicker", first: true, predicate: AXDatePickerComponent, descendants: true }, { propertyName: "div", first: true, predicate: ["div"], descendants: true, read: ElementRef }], ngImport: i0, template: `<ax-date-picker [selectableHoliday]="selectableHoliday" [allowClear]="true" (onValueChanged)="onValueChanged($event)" size="sm">
|
95
|
-
</ax-date-picker>`, isInline: true, components: [{ type: i1.AXDatePickerComponent, selector: "ax-date-picker", inputs: ["dayStyle", "dayMinMaxResoan", "validation", "placeholder", "min", "max", "readonly", "disabled", "allowClear", "textAlign", "showToday", "selectableHoliday", "dateType", "showTodayButton", "openByClick", "size", "type", "value"], outputs: ["typeChange", "onValueChanged", "valueChange"] }], encapsulation: i0.ViewEncapsulation.None });
|
96
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXDatePickerFilterComponent, decorators: [{
|
97
|
-
type: Component,
|
98
|
-
args: [{
|
99
|
-
selector: 'ax-data-picker-filter',
|
100
|
-
template: `<ax-date-picker [selectableHoliday]="selectableHoliday" [allowClear]="true" (onValueChanged)="onValueChanged($event)" size="sm">
|
101
|
-
</ax-date-picker>`,
|
102
|
-
host: {},
|
103
|
-
encapsulation: ViewEncapsulation.None
|
104
|
-
}]
|
105
|
-
}], propDecorators: { datePicker: [{
|
106
|
-
type: ViewChild,
|
107
|
-
args: [AXDatePickerComponent]
|
108
|
-
}], div: [{
|
109
|
-
type: ViewChild,
|
110
|
-
args: ['div', { read: ElementRef }]
|
111
|
-
}] } });
|
112
|
-
//# sourceMappingURL=data:application/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hdGUgPSBkYXRlIHx8IG51bGw7XHJcbiAgICAvL3RoaXMucGlja2VyLnNldERhdGUoZGF0ZSk7XHJcbiAgfVxyXG5cclxuICBzZXRJbnB1dFBsYWNlaG9sZGVyKHBsYWNlaG9sZGVyOiBzdHJpbmcpOiB2b2lkIHtcclxuICAgIC8vdGhpcy5kaXYubmF0aXZlRWxlbWVudC5zZXRBdHRyaWJ1dGUoJ3BsYWNlaG9sZGVyJywgcGxhY2Vob2xkZXIpO1xyXG4gIH1cclxuICBvblZhbHVlQ2hhbmdlZChlKSB7XHJcblxyXG4gICAgdGhpcy5zZXREYXRlKGUudmFsdWUpO1xyXG4gICAgdGhpcy5vbkRhdGVDaGFuZ2VkKGUudmFsdWUpO1xyXG4gIH1cclxuXHJcbn1cclxuIl19
|
@@ -1,37 +0,0 @@
|
|
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
|
-
render() {
|
11
|
-
const col = super.render();
|
12
|
-
// col.checkboxSelection = this.condition ? this.condition : true;
|
13
|
-
// col.headerCheckboxSelection = true;
|
14
|
-
(col.headerName = this.caption ? this.caption : AXConfig.get('layout.rtl') ? 'ردیف' : 'Row'),
|
15
|
-
(col.valueGetter = 'node.rowIndex + 1'),
|
16
|
-
(col.pinned = this.pinned == null ? null : this.pinned === 'start' ? 'right' : 'left'),
|
17
|
-
(col.filter = false);
|
18
|
-
col.resizable = true;
|
19
|
-
col.sortable = false;
|
20
|
-
col.width = this.width;
|
21
|
-
return col;
|
22
|
-
}
|
23
|
-
}
|
24
|
-
AXGridRowNumberColumn.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXGridRowNumberColumn, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
25
|
-
AXGridRowNumberColumn.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", 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
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXGridRowNumberColumn, decorators: [{
|
27
|
-
type: Component,
|
28
|
-
args: [{
|
29
|
-
selector: 'ax-row-number-column',
|
30
|
-
template: '',
|
31
|
-
providers: [{ provide: AXGridDataColumn, useExisting: AXGridRowNumberColumn }],
|
32
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
33
|
-
}]
|
34
|
-
}], ctorParameters: function () { return []; }, propDecorators: { condition: [{
|
35
|
-
type: Input
|
36
|
-
}] } });
|
37
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm93LW51bWJlci1jb2x1bW4uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYWNvcmV4L2RhdGEtZ3JpZC9zcmMvbGliL2RhdGEtZ3JpZC9jb2x1bW5zL3Jvdy1udW1iZXItY29sdW1uLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUN0RCxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMxRSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sY0F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XG4gIH1cclxuXHJcbiAgbmdPbkluaXQoKTogdm9pZCB7fVxyXG5cclxuICBASW5wdXQoKVxyXG4gIGNvbmRpdGlvbjogKHBhcmFtcykgPT4gYm9vbGVhbjtcclxuXHJcbiAgcmVuZGVyKCkge1xyXG4gICAgY29uc3QgY29sID0gc3VwZXIucmVuZGVyKCk7XHJcbiAgICAvLyAgY29sLmNoZWNrYm94U2VsZWN0aW9uID0gdGhpcy5jb25kaXRpb24gPyB0aGlzLmNvbmRpdGlvbiA6IHRydWU7XHJcbiAgICAvLyAgY29sLmhlYWRlckNoZWNrYm94U2VsZWN0aW9uID0gdHJ1ZTtcclxuXHJcbiAgICAoY29sLmhlYWRlck5hbWUgPSB0aGlzLmNhcHRpb24gPyB0aGlzLmNhcHRpb24gOiBBWENvbmZpZy5nZXQoJ2xheW91dC5ydGwnKSA/ICfYsdiv24zZgScgOiAnUm93JyksXHJcbiAgICAgIChjb2wudmFsdWVHZXR0ZXIgPSAnbm9kZS5yb3dJbmRleCArIDEnKSxcclxuICAgICAgKGNvbC5waW5uZWQgPSB0aGlzLnBpbm5lZCA9PSBudWxsID8gbnVsbCA6IHRoaXMucGlubmVkID09PSAnc3RhcnQnID8gJ3JpZ2h0JyA6ICdsZWZ0JyksXHJcbiAgICAgIChjb2wuZmlsdGVyID0gZmFsc2UpO1xyXG4gICAgY29sLnJlc2l6YWJsZSA9IHRydWU7XHJcbiAgICBjb2wuc29ydGFibGUgPSBmYWxzZTtcclxuICAgIGNvbC53aWR0aCA9IHRoaXMud2lkdGg7XHJcblxyXG4gICAgcmV0dXJuIGNvbDtcclxuICB9XHJcbn1cclxuIl19
|
@@ -1,42 +0,0 @@
|
|
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
|
-
this.pinned = 'start';
|
8
|
-
this.width = 40;
|
9
|
-
}
|
10
|
-
ngOnInit() { }
|
11
|
-
render() {
|
12
|
-
const col = super.render();
|
13
|
-
col.checkboxSelection = this.condition ? this.condition : true;
|
14
|
-
// col.headerCheckboxSelection = true;
|
15
|
-
col.pinned = this.pinned === 'start' ? 'right' : 'left';
|
16
|
-
col.filter = false;
|
17
|
-
col.resizable = true;
|
18
|
-
col.sortable = false;
|
19
|
-
col.minWidth = 5;
|
20
|
-
col.width = this.width;
|
21
|
-
col.floatingFilter = false;
|
22
|
-
return col;
|
23
|
-
}
|
24
|
-
}
|
25
|
-
AXGridSelectionColumn.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXGridSelectionColumn, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
26
|
-
AXGridSelectionColumn.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", 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
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXGridSelectionColumn, decorators: [{
|
28
|
-
type: Component,
|
29
|
-
args: [{
|
30
|
-
selector: 'ax-selection-column',
|
31
|
-
template: '',
|
32
|
-
providers: [{ provide: AXGridDataColumn, useExisting: AXGridSelectionColumn }],
|
33
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
34
|
-
}]
|
35
|
-
}], ctorParameters: function () { return []; }, propDecorators: { condition: [{
|
36
|
-
type: Input
|
37
|
-
}], pinned: [{
|
38
|
-
type: Input
|
39
|
-
}], width: [{
|
40
|
-
type: Input
|
41
|
-
}] } });
|
42
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJ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GaWx0ZXIgPSBmYWxzZTtcclxuICAgIHJldHVybiBjb2w7XHJcbiAgfVxyXG59XHJcbiJdfQ==
|
@@ -1,89 +0,0 @@
|
|
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 "../filters/filter.component";
|
6
|
-
import * as i2 from "@acorex/components";
|
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
|
-
}
|
20
|
-
AXGridTextColumn.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXGridTextColumn, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
21
|
-
AXGridTextColumn.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXGridTextColumn, selector: "ax-text-column", providers: [{ provide: AXGridDataColumn, useExisting: AXGridTextColumn }], usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", 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
|
-
constructor() {
|
33
|
-
this.value = null;
|
34
|
-
}
|
35
|
-
agInit(params) {
|
36
|
-
this.params = params;
|
37
|
-
this.valueGetter = params.valueGetter;
|
38
|
-
}
|
39
|
-
isFilterActive() {
|
40
|
-
return this.value !== null && this.value !== undefined;
|
41
|
-
}
|
42
|
-
doesFilterPass(params) {
|
43
|
-
return this.value === this.valueGetter(params.node);
|
44
|
-
}
|
45
|
-
getModel() {
|
46
|
-
return { value: this.value };
|
47
|
-
}
|
48
|
-
setModel(model) {
|
49
|
-
;
|
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
|
-
}
|
67
|
-
TextFilterRenderer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TextFilterRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
68
|
-
TextFilterRenderer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: TextFilterRenderer, selector: "ng-component", viewQueries: [{ propertyName: "input", first: true, predicate: AXTextBoxComponent, descendants: true, static: true }], ngImport: i0, template: `
|
69
|
-
<ax-data-grid-filter>
|
70
|
-
<ax-text-box label='Filter' allowClear='true' (textChange)='onChange($event)'>
|
71
|
-
</ax-text-box>
|
72
|
-
</ax-data-grid-filter>
|
73
|
-
`, isInline: true, components: [{ type: i1.AXDataGridFilterComponent, selector: "ax-data-grid-filter" }, { type: i2.AXTextBoxComponent, selector: "ax-text-box", inputs: ["mask", "type", "showMask", "maxLength", "maskGuid", "maskPlaceholder", "maskKeepCharPositions"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
74
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TextFilterRenderer, decorators: [{
|
75
|
-
type: Component,
|
76
|
-
args: [{
|
77
|
-
template: `
|
78
|
-
<ax-data-grid-filter>
|
79
|
-
<ax-text-box label='Filter' allowClear='true' (textChange)='onChange($event)'>
|
80
|
-
</ax-text-box>
|
81
|
-
</ax-data-grid-filter>
|
82
|
-
`,
|
83
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
84
|
-
}]
|
85
|
-
}], propDecorators: { input: [{
|
86
|
-
type: ViewChild,
|
87
|
-
args: [AXTextBoxComponent, { static: true }]
|
88
|
-
}] } });
|
89
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGV4dC1jb2x1bW4uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYWNvcmV4L2RhdGEtZ3JpZC9zcmMvbGliL2RhdGEtZ3JpZC9jb2x1bW5zL3RleHQtY29sdW1uLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUN0RCxPQUFPLEVBQ0wsdUJBQXVCLEVBQ3ZCLFNBQVMsRUFFVCxTQUFTLEVBQ1YsTUFBTSxlQUFlLENBQUM7QUFRdkIsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sb0JBQW9CLENBQUM7Ozs7QUFTeEQsTUFBTSxPQUFPLGdCQUFpQixTQUFRLGdCQUFnQjtJQUNwRDtRQUNFLEtBQUssRUFBRSxDQUFDO0lBQ1YsQ0FBQztJQUVELE1BQU07UUFDSixNQUFNLEdBQUcsR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