@progress/kendo-angular-grid 19.0.0-develop.9 → 19.0.0
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/adaptiveness/adaptive-mode.d.ts +12 -0
- package/adaptiveness/adaptive-renderer.component.d.ts +89 -0
- package/codemods/template-transformer/index.js +94 -0
- package/codemods/utils.js +553 -0
- package/codemods/v19/grid-kendogridgroupbinding.js +51 -0
- package/column-menu/column-chooser.component.d.ts +4 -0
- package/column-menu/column-list.component.d.ts +10 -3
- package/column-menu/column-menu-item.component.d.ts +48 -3
- package/column-menu/column-menu-item.directive.d.ts +5 -2
- package/column-menu/column-menu.component.d.ts +4 -2
- package/columns/column-base.d.ts +5 -0
- package/columns/span-column.component.d.ts +2 -2
- package/common/adaptiveness.service.d.ts +50 -0
- package/common/single-popup.service.d.ts +3 -1
- package/common/toolbar-tool-base.directive.d.ts +26 -0
- package/directives.d.ts +13 -5
- package/editing/add-command-tool.directive.d.ts +7 -6
- package/editing/cancel-command-tool.directive.d.ts +38 -0
- package/editing/edit-command-tool.directive.d.ts +38 -0
- package/editing/edit.service.d.ts +1 -1
- package/editing/remove-command-tool.directive.d.ts +39 -0
- package/editing/save-command-tool.directive.d.ts +38 -0
- package/editing/toolbar-editing-tool-base.directive.d.ts +29 -0
- package/editing-directives/editing-directive-base.d.ts +4 -1
- package/editing-directives/external-editing.directive.d.ts +3 -1
- package/esm2022/adaptiveness/adaptive-mode.mjs +5 -0
- package/esm2022/adaptiveness/adaptive-renderer.component.mjs +1197 -0
- package/esm2022/column-menu/column-chooser.component.mjs +13 -11
- package/esm2022/column-menu/column-list.component.mjs +51 -8
- package/esm2022/column-menu/column-menu-autosize-all.component.mjs +1 -1
- package/esm2022/column-menu/column-menu-autosize.component.mjs +1 -1
- package/esm2022/column-menu/column-menu-chooser.component.mjs +1 -1
- package/esm2022/column-menu/column-menu-container.component.mjs +1 -1
- package/esm2022/column-menu/column-menu-filter.component.mjs +1 -1
- package/esm2022/column-menu/column-menu-item.component.mjs +123 -12
- package/esm2022/column-menu/column-menu-item.directive.mjs +14 -5
- package/esm2022/column-menu/column-menu-lock.component.mjs +1 -1
- package/esm2022/column-menu/column-menu-position.component.mjs +1 -1
- package/esm2022/column-menu/column-menu-sort.component.mjs +1 -1
- package/esm2022/column-menu/column-menu-stick.component.mjs +1 -1
- package/esm2022/column-menu/column-menu.component.mjs +68 -44
- package/esm2022/column-resizing/column-handle.directive.mjs +2 -2
- package/esm2022/columns/column-base.mjs +9 -0
- package/esm2022/columns/columns-container.mjs +1 -1
- package/esm2022/columns/span-column.component.mjs +9 -9
- package/esm2022/common/adaptiveness.service.mjs +72 -0
- package/esm2022/common/single-popup.service.mjs +9 -3
- package/esm2022/common/toolbar-tool-base.directive.mjs +81 -0
- package/esm2022/directives.mjs +21 -4
- package/esm2022/editing/add-command-tool.directive.mjs +12 -15
- package/esm2022/editing/cancel-command-tool.directive.mjs +64 -0
- package/esm2022/editing/edit-command-tool.directive.mjs +59 -0
- package/esm2022/editing/remove-command-tool.directive.mjs +60 -0
- package/esm2022/editing/remove-command.directive.mjs +1 -0
- package/esm2022/editing/save-command-tool.directive.mjs +64 -0
- package/esm2022/editing/toolbar-editing-tool-base.directive.mjs +94 -0
- package/esm2022/editing-directives/editing-directive-base.mjs +5 -2
- package/esm2022/editing-directives/external-editing.directive.mjs +28 -14
- package/esm2022/excel/excel-command-tool.directive.mjs +12 -17
- package/esm2022/filtering/filter-input.directive.mjs +14 -2
- package/esm2022/filtering/menu/boolean-filter-menu.component.mjs +4 -2
- package/esm2022/filtering/menu/date-filter-menu-input.component.mjs +4 -0
- package/esm2022/filtering/menu/date-filter-menu.component.mjs +6 -0
- package/esm2022/filtering/menu/filter-menu-container.component.mjs +24 -10
- package/esm2022/filtering/menu/filter-menu-input-wrapper.component.mjs +26 -4
- package/esm2022/filtering/menu/filter-menu.component.mjs +44 -29
- package/esm2022/filtering/menu/numeric-filter-menu-input.component.mjs +2 -0
- package/esm2022/filtering/menu/numeric-filter-menu.component.mjs +6 -0
- package/esm2022/filtering/menu/string-filter-menu-input.component.mjs +2 -0
- package/esm2022/filtering/menu/string-filter-menu.component.mjs +10 -1
- package/esm2022/grid.component.mjs +376 -82
- package/esm2022/grid.module.mjs +115 -101
- package/esm2022/index.mjs +11 -1
- package/esm2022/localization/messages.mjs +128 -2
- package/esm2022/navigation/toolbar-tool-name.mjs +17 -0
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/pdf/pdf-command-tool.directive.mjs +12 -15
- package/esm2022/rendering/cell.component.mjs +3 -3
- package/esm2022/rendering/header/header.component.mjs +1 -1
- package/esm2022/rendering/list.component.mjs +1 -1
- package/esm2022/rendering/table-body.component.mjs +1 -1
- package/esm2022/rendering/toolbar/tools/column-chooser-tool.directive.mjs +210 -0
- package/esm2022/rendering/toolbar/tools/filter-command-tool.directive.mjs +69 -34
- package/esm2022/rendering/toolbar/tools/filter-tool-wrapper.component.mjs +29 -8
- package/esm2022/rendering/toolbar/tools/filter-toolbar-tool.component.mjs +78 -8
- package/esm2022/rendering/toolbar/tools/group-command-tool.directive.mjs +206 -0
- package/esm2022/rendering/toolbar/tools/group-toolbar-tool.component.mjs +425 -0
- package/esm2022/rendering/toolbar/tools/sort-command-tool.directive.mjs +54 -20
- package/esm2022/rendering/toolbar/tools/sort-toolbar-tool.component.mjs +24 -8
- package/esm2022/selection/selection.service.mjs +11 -0
- package/esm2022/state-management/grid-state.models.mjs +26 -0
- package/esm2022/state-management/redo-command-tool.mjs +66 -0
- package/esm2022/state-management/undo-command-tool.mjs +66 -0
- package/esm2022/state-management/undo-redo.directive.mjs +178 -0
- package/esm2022/state-management/undo-redo.service.mjs +22 -0
- package/esm2022/state-management/undo-redo.stack.mjs +232 -0
- package/esm2022/utils.mjs +13 -13
- package/excel/excel-command-tool.directive.d.ts +5 -5
- package/fesm2022/progress-kendo-angular-grid.mjs +7384 -3773
- package/filtering/filter-input.directive.d.ts +1 -0
- package/filtering/menu/date-filter-menu-input.component.d.ts +1 -1
- package/filtering/menu/filter-menu-container.component.d.ts +15 -4
- package/filtering/menu/filter-menu-input-wrapper.component.d.ts +8 -3
- package/filtering/menu/filter-menu.component.d.ts +6 -3
- package/filtering/menu/numeric-filter-menu-input.component.d.ts +1 -1
- package/filtering/menu/string-filter-menu-input.component.d.ts +1 -1
- package/filtering/menu/string-filter-menu.component.d.ts +1 -0
- package/grid.component.d.ts +86 -33
- package/grid.module.d.ts +108 -100
- package/index.d.ts +10 -1
- package/localization/messages.d.ts +86 -2
- package/navigation/toolbar-tool-name.d.ts +17 -0
- package/package.json +36 -20
- package/pdf/pdf-command-tool.directive.d.ts +6 -5
- package/rendering/cell.component.d.ts +1 -1
- package/{column-menu → rendering/toolbar/tools}/column-chooser-tool.directive.d.ts +18 -6
- package/rendering/toolbar/tools/filter-command-tool.directive.d.ts +10 -1
- package/rendering/toolbar/tools/filter-tool-wrapper.component.d.ts +6 -5
- package/rendering/toolbar/tools/filter-toolbar-tool.component.d.ts +11 -2
- package/rendering/toolbar/tools/group-command-tool.directive.d.ts +51 -0
- package/rendering/toolbar/tools/group-toolbar-tool.component.d.ts +61 -0
- package/rendering/toolbar/tools/sort-command-tool.directive.d.ts +10 -1
- package/rendering/toolbar/tools/sort-toolbar-tool.component.d.ts +5 -1
- package/schematics/ngAdd/index.js +4 -4
- package/selection/selection.service.d.ts +1 -0
- package/state-management/grid-state.models.d.ts +58 -0
- package/state-management/redo-command-tool.d.ts +38 -0
- package/state-management/undo-command-tool.d.ts +38 -0
- package/state-management/undo-redo.directive.d.ts +51 -0
- package/state-management/undo-redo.service.d.ts +19 -0
- package/state-management/undo-redo.stack.d.ts +104 -0
- package/utils.d.ts +11 -5
- package/esm2022/column-menu/column-chooser-tool.directive.mjs +0 -172
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Directive } from '@angular/core';
|
|
5
|
+
import { ChangeDetectorRef, Directive, NgZone } from '@angular/core';
|
|
6
6
|
import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
|
|
7
|
-
import { Subscription } from 'rxjs';
|
|
8
|
-
import { fileExcelIcon } from '@progress/kendo-svg-icons';
|
|
9
7
|
import { ExcelService } from './excel.service';
|
|
8
|
+
import { ContextService } from '../common/provider.service';
|
|
9
|
+
import { ToolbarToolBase } from '../common/toolbar-tool-base.directive';
|
|
10
|
+
import { ToolbarToolName } from '../navigation/toolbar-tool-name';
|
|
10
11
|
import * as i0 from "@angular/core";
|
|
11
12
|
import * as i1 from "./excel.service";
|
|
12
13
|
import * as i2 from "@progress/kendo-angular-toolbar";
|
|
14
|
+
import * as i3 from "../common/provider.service";
|
|
13
15
|
/**
|
|
14
16
|
* Represents the `export-to-Excel` toolbar tool of the Grid.
|
|
15
17
|
* You can apply this directive to any `kendo-toolbar-button` element inside a
|
|
@@ -30,22 +32,15 @@ import * as i2 from "@progress/kendo-angular-toolbar";
|
|
|
30
32
|
* </kendo-grid>
|
|
31
33
|
* ```
|
|
32
34
|
*/
|
|
33
|
-
export class ExcelCommandToolbarDirective {
|
|
35
|
+
export class ExcelCommandToolbarDirective extends ToolbarToolBase {
|
|
34
36
|
excelService;
|
|
35
|
-
host
|
|
36
|
-
|
|
37
|
-
constructor(excelService, host) {
|
|
37
|
+
constructor(excelService, host, ctx, zone, cdr) {
|
|
38
|
+
super(host, ToolbarToolName.excelExport, ctx, zone, cdr);
|
|
38
39
|
this.excelService = excelService;
|
|
39
|
-
this.host = host;
|
|
40
40
|
}
|
|
41
41
|
ngOnInit() {
|
|
42
|
-
|
|
42
|
+
super.ngOnInit();
|
|
43
43
|
this.host.className = 'k-grid-excel';
|
|
44
|
-
this.host.svgIcon = fileExcelIcon;
|
|
45
|
-
this.host.icon = 'file-excel';
|
|
46
|
-
}
|
|
47
|
-
ngOnDestroy() {
|
|
48
|
-
this.clickSub.unsubscribe();
|
|
49
44
|
}
|
|
50
45
|
/**
|
|
51
46
|
* @hidden
|
|
@@ -54,8 +49,8 @@ export class ExcelCommandToolbarDirective {
|
|
|
54
49
|
e.preventDefault();
|
|
55
50
|
this.excelService.exportClick.emit();
|
|
56
51
|
}
|
|
57
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ExcelCommandToolbarDirective, deps: [{ token: i1.ExcelService }, { token: i2.ToolBarButtonComponent }], target: i0.ɵɵFactoryTarget.Directive });
|
|
58
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ExcelCommandToolbarDirective, isStandalone: true, selector: "[kendoGridExcelTool]", ngImport: i0 });
|
|
52
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ExcelCommandToolbarDirective, deps: [{ token: i1.ExcelService }, { token: i2.ToolBarButtonComponent }, { token: i3.ContextService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
53
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ExcelCommandToolbarDirective, isStandalone: true, selector: "[kendoGridExcelTool]", usesInheritance: true, ngImport: i0 });
|
|
59
54
|
}
|
|
60
55
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ExcelCommandToolbarDirective, decorators: [{
|
|
61
56
|
type: Directive,
|
|
@@ -63,4 +58,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
63
58
|
selector: '[kendoGridExcelTool]',
|
|
64
59
|
standalone: true
|
|
65
60
|
}]
|
|
66
|
-
}], ctorParameters: function () { return [{ type: i1.ExcelService }, { type: i2.ToolBarButtonComponent }]; } });
|
|
61
|
+
}], ctorParameters: function () { return [{ type: i1.ExcelService }, { type: i2.ToolBarButtonComponent }, { type: i3.ContextService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; } });
|
|
@@ -13,6 +13,7 @@ import * as i0 from "@angular/core";
|
|
|
13
13
|
* @hidden
|
|
14
14
|
*/
|
|
15
15
|
export class FilterInputDirective {
|
|
16
|
+
ngZone;
|
|
16
17
|
element;
|
|
17
18
|
renderer;
|
|
18
19
|
change = new EventEmitter();
|
|
@@ -31,12 +32,19 @@ export class FilterInputDirective {
|
|
|
31
32
|
changeRequestsSubscription;
|
|
32
33
|
unsubscribeEvents;
|
|
33
34
|
constructor(valueAccessors, ngZone, element, renderer) {
|
|
35
|
+
this.ngZone = ngZone;
|
|
34
36
|
this.element = element;
|
|
35
37
|
this.renderer = renderer;
|
|
36
38
|
this.accessor = valueAccessors[0];
|
|
37
39
|
ngZone.runOutsideAngular(() => {
|
|
38
40
|
const unsubscribeStart = renderer.listen(element.nativeElement, 'compositionstart', () => this.composing = true);
|
|
39
|
-
const unsubscribeEnd = renderer.listen(element.nativeElement, 'compositionend', () =>
|
|
41
|
+
const unsubscribeEnd = renderer.listen(element.nativeElement, 'compositionend', (event) => {
|
|
42
|
+
this.composing = false;
|
|
43
|
+
const value = event.target?.value;
|
|
44
|
+
this.filterDelay > 0 ?
|
|
45
|
+
this.changeRequests.next(value) :
|
|
46
|
+
this.change.emit(value);
|
|
47
|
+
});
|
|
40
48
|
this.unsubscribeEvents = () => {
|
|
41
49
|
unsubscribeStart();
|
|
42
50
|
unsubscribeEnd();
|
|
@@ -63,7 +71,11 @@ export class FilterInputDirective {
|
|
|
63
71
|
subscribeChanges() {
|
|
64
72
|
this.changeRequestsSubscription = this.changeRequests
|
|
65
73
|
.pipe(debounceTime(this.filterDelay), filter(() => !this.composing))
|
|
66
|
-
.subscribe(x =>
|
|
74
|
+
.subscribe((x) => {
|
|
75
|
+
this.ngZone.run(() => {
|
|
76
|
+
this.change.emit(x);
|
|
77
|
+
});
|
|
78
|
+
});
|
|
67
79
|
}
|
|
68
80
|
unsubscribeChanges() {
|
|
69
81
|
if (this.changeRequestsSubscription) {
|
|
@@ -113,13 +113,14 @@ export class BooleanFilterMenuComponent extends BooleanFilterComponent {
|
|
|
113
113
|
kendoFilterMenuRadioButton
|
|
114
114
|
[columnLabel]="columnLabel"
|
|
115
115
|
#input
|
|
116
|
+
[size]="ctx.grid?.isActionSheetExpanded ? 'large' : null"
|
|
116
117
|
[name]="idPrefix"
|
|
117
118
|
[checked]="isSelected(item.value)"
|
|
118
119
|
[attr.id]="radioId(item.value)"
|
|
119
120
|
(change)="onChange(item.value, input)"
|
|
120
121
|
(keydown.shift.tab)="onShiftTab($event)"
|
|
121
122
|
></kendo-radiobutton>
|
|
122
|
-
<label class="k-radio-label" [attr.for]="
|
|
123
|
+
<label class="k-radio-label" [attr.for]="input.focusableId">{{item.text}}</label>
|
|
123
124
|
</li>
|
|
124
125
|
</ul>
|
|
125
126
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: RadioButtonComponent, selector: "kendo-radiobutton", inputs: ["checked"], outputs: ["checkedChange"], exportAs: ["kendoRadioButton"] }, { kind: "directive", type: BooleanFilterRadioButtonDirective, selector: "[kendoFilterMenuRadioButton]", inputs: ["columnLabel"] }] });
|
|
@@ -135,13 +136,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
135
136
|
kendoFilterMenuRadioButton
|
|
136
137
|
[columnLabel]="columnLabel"
|
|
137
138
|
#input
|
|
139
|
+
[size]="ctx.grid?.isActionSheetExpanded ? 'large' : null"
|
|
138
140
|
[name]="idPrefix"
|
|
139
141
|
[checked]="isSelected(item.value)"
|
|
140
142
|
[attr.id]="radioId(item.value)"
|
|
141
143
|
(change)="onChange(item.value, input)"
|
|
142
144
|
(keydown.shift.tab)="onShiftTab($event)"
|
|
143
145
|
></kendo-radiobutton>
|
|
144
|
-
<label class="k-radio-label" [attr.for]="
|
|
146
|
+
<label class="k-radio-label" [attr.for]="input.focusableId">{{item.text}}</label>
|
|
145
147
|
</li>
|
|
146
148
|
</ul>
|
|
147
149
|
`,
|
|
@@ -76,6 +76,8 @@ export class DateFilterMenuInputComponent {
|
|
|
76
76
|
<kendo-datepicker
|
|
77
77
|
#picker
|
|
78
78
|
kendoFilterInput
|
|
79
|
+
[adaptiveMode]="ctx.grid?.adaptiveMode"
|
|
80
|
+
[size]="ctx.grid?.isActionSheetExpanded ? 'large' : null"
|
|
79
81
|
[columnLabel]="columnLabel"
|
|
80
82
|
[filterDelay]="0"
|
|
81
83
|
(open)="open(picker)"
|
|
@@ -114,6 +116,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
114
116
|
<kendo-datepicker
|
|
115
117
|
#picker
|
|
116
118
|
kendoFilterInput
|
|
119
|
+
[adaptiveMode]="ctx.grid?.adaptiveMode"
|
|
120
|
+
[size]="ctx.grid?.isActionSheetExpanded ? 'large' : null"
|
|
117
121
|
[columnLabel]="columnLabel"
|
|
118
122
|
[filterDelay]="0"
|
|
119
123
|
(open)="open(picker)"
|
|
@@ -101,6 +101,9 @@ export class DateFilterMenuComponent extends DateFilterComponent {
|
|
|
101
101
|
<kendo-dropdownlist
|
|
102
102
|
*ngIf="extra"
|
|
103
103
|
kendoFilterMenuDropDown
|
|
104
|
+
[adaptiveTitle]="ctx.localization.get('adaptiveFilterOperatorsTitle')"
|
|
105
|
+
[adaptiveMode]="ctx.grid?.adaptiveMode"
|
|
106
|
+
[size]="ctx.grid?.isActionSheetExpanded ? 'large' : null"
|
|
104
107
|
[filterMenuDropDownLabel]="filterMenuDropDownLabel"
|
|
105
108
|
class="k-filter-and"
|
|
106
109
|
[data]="logicOperators"
|
|
@@ -156,6 +159,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
156
159
|
<kendo-dropdownlist
|
|
157
160
|
*ngIf="extra"
|
|
158
161
|
kendoFilterMenuDropDown
|
|
162
|
+
[adaptiveTitle]="ctx.localization.get('adaptiveFilterOperatorsTitle')"
|
|
163
|
+
[adaptiveMode]="ctx.grid?.adaptiveMode"
|
|
164
|
+
[size]="ctx.grid?.isActionSheetExpanded ? 'large' : null"
|
|
159
165
|
[filterMenuDropDownLabel]="filterMenuDropDownLabel"
|
|
160
166
|
class="k-filter-and"
|
|
161
167
|
[data]="logicOperators"
|
|
@@ -13,16 +13,21 @@ import { ContextService } from '../../common/provider.service';
|
|
|
13
13
|
import { FilterMenuHostDirective } from './filter-menu-host.directive';
|
|
14
14
|
import { NgSwitch, NgSwitchCase, NgIf, NgTemplateOutlet, NgClass } from '@angular/common';
|
|
15
15
|
import { FormsModule } from '@angular/forms';
|
|
16
|
+
import { AdaptiveGridService } from '../../common/adaptiveness.service';
|
|
16
17
|
import * as i0 from "@angular/core";
|
|
17
18
|
import * as i1 from "../filter.service";
|
|
18
19
|
import * as i2 from "../../common/provider.service";
|
|
19
20
|
import * as i3 from "./menu-tabbing.service";
|
|
20
|
-
import * as i4 from "
|
|
21
|
+
import * as i4 from "../../common/adaptiveness.service";
|
|
22
|
+
import * as i5 from "@angular/forms";
|
|
21
23
|
const isNoValueOperator = operator => (operator === "isnull"
|
|
22
24
|
|| operator === "isnotnull"
|
|
23
25
|
|| operator === "isempty"
|
|
24
26
|
|| operator === "isnotempty");
|
|
25
|
-
|
|
27
|
+
/**
|
|
28
|
+
* @hidden
|
|
29
|
+
*/
|
|
30
|
+
export const validFilters = ({ value, operator }) => !isNullOrEmptyString(value) || isNoValueOperator(operator);
|
|
26
31
|
const trimFilters = filter => {
|
|
27
32
|
filter.filters = filter.filters.filter(validFilters);
|
|
28
33
|
return filter;
|
|
@@ -41,7 +46,10 @@ const findParent = (filters, field, parent) => {
|
|
|
41
46
|
return acc;
|
|
42
47
|
}, undefined);
|
|
43
48
|
};
|
|
44
|
-
|
|
49
|
+
/**
|
|
50
|
+
* @hidden
|
|
51
|
+
*/
|
|
52
|
+
export const parentLogicOfDefault = (filter, field, def = "and") => {
|
|
45
53
|
const parent = findParent(((filter || {}).filters || []), field);
|
|
46
54
|
return isPresent(parent) ? parent.logic : def;
|
|
47
55
|
};
|
|
@@ -53,6 +61,7 @@ export class FilterMenuContainerComponent {
|
|
|
53
61
|
childService;
|
|
54
62
|
ctx;
|
|
55
63
|
cd;
|
|
64
|
+
adaptiveGridService;
|
|
56
65
|
close = new EventEmitter();
|
|
57
66
|
/**
|
|
58
67
|
* The column with which the filter is associated.
|
|
@@ -100,12 +109,14 @@ export class FilterMenuContainerComponent {
|
|
|
100
109
|
subscription;
|
|
101
110
|
_templateContext = {};
|
|
102
111
|
_filter;
|
|
103
|
-
constructor(parentService, childService, ctx, cd, menuTabbingService) {
|
|
112
|
+
constructor(parentService, childService, ctx, cd, menuTabbingService, adaptiveGridService) {
|
|
104
113
|
this.parentService = parentService;
|
|
105
114
|
this.childService = childService;
|
|
106
115
|
this.ctx = ctx;
|
|
107
116
|
this.cd = cd;
|
|
117
|
+
this.adaptiveGridService = adaptiveGridService;
|
|
108
118
|
this.menuTabbingService = menuTabbingService;
|
|
119
|
+
this.adaptiveGridService.filterMenuContainer = this;
|
|
109
120
|
}
|
|
110
121
|
ngOnInit() {
|
|
111
122
|
this.subscription = this.childService.changes.subscribe(filter => this._childFilter = filter);
|
|
@@ -113,7 +124,7 @@ export class FilterMenuContainerComponent {
|
|
|
113
124
|
}
|
|
114
125
|
ngAfterViewChecked() {
|
|
115
126
|
if (!this.menuTabbingService.isColumnMenu || (this.isLast && this.isExpanded)) {
|
|
116
|
-
this.menuTabbingService.lastFocusable = this.resetButton
|
|
127
|
+
this.menuTabbingService.lastFocusable = this.resetButton?.nativeElement;
|
|
117
128
|
}
|
|
118
129
|
}
|
|
119
130
|
ngOnDestroy() {
|
|
@@ -158,6 +169,9 @@ export class FilterMenuContainerComponent {
|
|
|
158
169
|
this.parentService.filter(root);
|
|
159
170
|
this.close.emit();
|
|
160
171
|
}
|
|
172
|
+
resetChildFilters() {
|
|
173
|
+
this._childFilter = null;
|
|
174
|
+
}
|
|
161
175
|
onTab(e, buttonType) {
|
|
162
176
|
if (this.menuTabbingService.firstFocusable && (!this.menuTabbingService.isColumnMenu || this.isLast)) {
|
|
163
177
|
e.preventDefault();
|
|
@@ -175,7 +189,7 @@ export class FilterMenuContainerComponent {
|
|
|
175
189
|
get filterText() {
|
|
176
190
|
return this.ctx.localization.get("filterFilterButton");
|
|
177
191
|
}
|
|
178
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FilterMenuContainerComponent, deps: [{ token: i1.FilterService, skipSelf: true }, { token: i1.FilterService }, { token: i2.ContextService }, { token: i0.ChangeDetectorRef }, { token: i3.MenuTabbingService }], target: i0.ɵɵFactoryTarget.Component });
|
|
192
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FilterMenuContainerComponent, deps: [{ token: i1.FilterService, skipSelf: true }, { token: i1.FilterService }, { token: i2.ContextService }, { token: i0.ChangeDetectorRef }, { token: i3.MenuTabbingService }, { token: i4.AdaptiveGridService }], target: i0.ɵɵFactoryTarget.Component });
|
|
179
193
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FilterMenuContainerComponent, isStandalone: true, selector: "kendo-grid-filter-menu-container", inputs: { column: "column", isLast: "isLast", isExpanded: "isExpanded", menuTabbingService: "menuTabbingService", filter: "filter", actionsClass: "actionsClass" }, outputs: { close: "close" }, providers: [
|
|
180
194
|
FilterService,
|
|
181
195
|
MenuTabbingService
|
|
@@ -202,7 +216,7 @@ export class FilterMenuContainerComponent {
|
|
|
202
216
|
</ng-template>
|
|
203
217
|
</ng-container>
|
|
204
218
|
</ng-container>
|
|
205
|
-
<div [ngClass]="actionsClass">
|
|
219
|
+
<div *ngIf="!ctx.grid?.isActionSheetExpanded" [ngClass]="actionsClass">
|
|
206
220
|
<button #filterButton
|
|
207
221
|
type="submit"
|
|
208
222
|
class="k-button k-button-solid-primary k-button-solid k-button-md k-rounded-md k-button-rectangle"
|
|
@@ -216,7 +230,7 @@ export class FilterMenuContainerComponent {
|
|
|
216
230
|
</div>
|
|
217
231
|
</div>
|
|
218
232
|
</form>
|
|
219
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type:
|
|
233
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: FilterMenuHostDirective, selector: "[kendoFilterMenuHost]", inputs: ["filterService", "menuTabbingService"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
220
234
|
}
|
|
221
235
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FilterMenuContainerComponent, decorators: [{
|
|
222
236
|
type: Component,
|
|
@@ -249,7 +263,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
249
263
|
</ng-template>
|
|
250
264
|
</ng-container>
|
|
251
265
|
</ng-container>
|
|
252
|
-
<div [ngClass]="actionsClass">
|
|
266
|
+
<div *ngIf="!ctx.grid?.isActionSheetExpanded" [ngClass]="actionsClass">
|
|
253
267
|
<button #filterButton
|
|
254
268
|
type="submit"
|
|
255
269
|
class="k-button k-button-solid-primary k-button-solid k-button-md k-rounded-md k-button-rectangle"
|
|
@@ -269,7 +283,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
269
283
|
}]
|
|
270
284
|
}], ctorParameters: function () { return [{ type: i1.FilterService, decorators: [{
|
|
271
285
|
type: SkipSelf
|
|
272
|
-
}] }, { type: i1.FilterService }, { type: i2.ContextService }, { type: i0.ChangeDetectorRef }, { type: i3.MenuTabbingService }]; }, propDecorators: { close: [{
|
|
286
|
+
}] }, { type: i1.FilterService }, { type: i2.ContextService }, { type: i0.ChangeDetectorRef }, { type: i3.MenuTabbingService }, { type: i4.AdaptiveGridService }]; }, propDecorators: { close: [{
|
|
273
287
|
type: Output
|
|
274
288
|
}], column: [{
|
|
275
289
|
type: Input
|
|
@@ -10,36 +10,52 @@ import { FilterInputWrapperComponent } from "../filter-input-wrapper.component";
|
|
|
10
10
|
import { replaceMessagePlaceholder } from '../../utils';
|
|
11
11
|
import { ContextService } from '../../common/provider.service';
|
|
12
12
|
import { FilterMenuDropDownListDirective } from './filter-menu-dropdownlist.directive';
|
|
13
|
+
import { AdaptiveGridService } from '../../common/adaptiveness.service';
|
|
14
|
+
import { Subscription } from 'rxjs';
|
|
13
15
|
import * as i0 from "@angular/core";
|
|
14
16
|
import * as i1 from "../../common/provider.service";
|
|
17
|
+
import * as i2 from "../../common/adaptiveness.service";
|
|
15
18
|
/**
|
|
16
19
|
* @hidden
|
|
17
20
|
*/
|
|
18
21
|
export class FilterMenuInputWrapperComponent extends FilterInputWrapperComponent {
|
|
19
22
|
ctx;
|
|
23
|
+
adaptiveGridService;
|
|
20
24
|
filterService;
|
|
21
25
|
isFirstDropDown;
|
|
22
26
|
menuTabbingService;
|
|
23
27
|
firstOperatorDropDown;
|
|
24
28
|
_currentFilter;
|
|
29
|
+
subs = new Subscription();
|
|
25
30
|
/**
|
|
26
31
|
* @hidden
|
|
27
32
|
*/
|
|
28
33
|
get hostClasses() {
|
|
29
34
|
return false;
|
|
30
35
|
}
|
|
31
|
-
constructor(ctx) {
|
|
36
|
+
constructor(ctx, adaptiveGridService) {
|
|
32
37
|
super(null);
|
|
33
38
|
this.ctx = ctx;
|
|
39
|
+
this.adaptiveGridService = adaptiveGridService;
|
|
34
40
|
}
|
|
35
41
|
ngAfterViewInit() {
|
|
36
42
|
const shouldFocusFirstFocusable = this.isFirstDropDown && this.filterService?.menuTabbingService;
|
|
37
43
|
const isTabbedInterface = this.menuTabbingService?.isTabbedInterface;
|
|
38
44
|
if (shouldFocusFirstFocusable && !isTabbedInterface) {
|
|
39
45
|
this.filterService.menuTabbingService.firstFocusable = this.firstOperatorDropDown;
|
|
40
|
-
this.
|
|
46
|
+
if (this.ctx.grid?.isActionSheetExpanded) {
|
|
47
|
+
this.subs.add(this.adaptiveGridService.animationEnd.subscribe(() => {
|
|
48
|
+
this.firstOperatorDropDown.focus();
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
this.firstOperatorDropDown.focus();
|
|
53
|
+
}
|
|
41
54
|
}
|
|
42
55
|
}
|
|
56
|
+
ngOnDestroy() {
|
|
57
|
+
this.subs?.unsubscribe();
|
|
58
|
+
}
|
|
43
59
|
operatorChange(dataItem) {
|
|
44
60
|
this.currentOperator = dataItem;
|
|
45
61
|
}
|
|
@@ -85,10 +101,13 @@ export class FilterMenuInputWrapperComponent extends FilterInputWrapperComponent
|
|
|
85
101
|
const columnName = this.column ? this.column.title || this.column.field : '';
|
|
86
102
|
return replaceMessagePlaceholder(localizationMsg, 'columnName', columnName);
|
|
87
103
|
}
|
|
88
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FilterMenuInputWrapperComponent, deps: [{ token: i1.ContextService }], target: i0.ɵɵFactoryTarget.Component });
|
|
104
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FilterMenuInputWrapperComponent, deps: [{ token: i1.ContextService }, { token: i2.AdaptiveGridService }], target: i0.ɵɵFactoryTarget.Component });
|
|
89
105
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FilterMenuInputWrapperComponent, isStandalone: true, selector: "kendo-grid-filter-menu-input-wrapper", inputs: { filterService: "filterService", isFirstDropDown: "isFirstDropDown", menuTabbingService: "menuTabbingService", currentFilter: "currentFilter" }, viewQueries: [{ propertyName: "firstOperatorDropDown", first: true, predicate: DropDownListComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
90
106
|
<kendo-dropdownlist
|
|
91
107
|
kendoFilterMenuDropDown
|
|
108
|
+
[adaptiveTitle]="ctx.localization.get('adaptiveFilterOperatorsTitle')"
|
|
109
|
+
[adaptiveMode]="ctx.grid?.adaptiveMode"
|
|
110
|
+
[size]="ctx.grid?.isActionSheetExpanded ? 'large' : null"
|
|
92
111
|
[filterMenuDropDownLabel]="filterMenuDropDownLabel"
|
|
93
112
|
[data]="operators"
|
|
94
113
|
(valueChange)="operatorChange($event)"
|
|
@@ -108,6 +127,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
108
127
|
template: `
|
|
109
128
|
<kendo-dropdownlist
|
|
110
129
|
kendoFilterMenuDropDown
|
|
130
|
+
[adaptiveTitle]="ctx.localization.get('adaptiveFilterOperatorsTitle')"
|
|
131
|
+
[adaptiveMode]="ctx.grid?.adaptiveMode"
|
|
132
|
+
[size]="ctx.grid?.isActionSheetExpanded ? 'large' : null"
|
|
111
133
|
[filterMenuDropDownLabel]="filterMenuDropDownLabel"
|
|
112
134
|
[data]="operators"
|
|
113
135
|
(valueChange)="operatorChange($event)"
|
|
@@ -122,7 +144,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
122
144
|
standalone: true,
|
|
123
145
|
imports: [DropDownListComponent, FilterMenuDropDownListDirective]
|
|
124
146
|
}]
|
|
125
|
-
}], ctorParameters: function () { return [{ type: i1.ContextService }]; }, propDecorators: { filterService: [{
|
|
147
|
+
}], ctorParameters: function () { return [{ type: i1.ContextService }, { type: i2.AdaptiveGridService }]; }, propDecorators: { filterService: [{
|
|
126
148
|
type: Input
|
|
127
149
|
}], isFirstDropDown: [{
|
|
128
150
|
type: Input
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { NavigationService } from './../../navigation/navigation.service';
|
|
6
|
-
import { ChangeDetectorRef, Component, ElementRef, Input, Optional, Renderer2, TemplateRef, ViewChild } from '@angular/core';
|
|
6
|
+
import { ChangeDetectorRef, Component, ElementRef, Input, NgZone, Optional, Renderer2, TemplateRef, ViewChild } from '@angular/core';
|
|
7
7
|
import { FilterService } from "../filter.service";
|
|
8
8
|
import { ColumnComponent } from '../../columns/column.component';
|
|
9
9
|
import { SinglePopupService } from '../../common/single-popup.service';
|
|
@@ -14,12 +14,14 @@ import { ContextService } from '../../common/provider.service';
|
|
|
14
14
|
import { IdService } from '../../common/id.service';
|
|
15
15
|
import { FilterMenuContainerComponent } from './filter-menu-container.component';
|
|
16
16
|
import { IconWrapperComponent } from '@progress/kendo-angular-icons';
|
|
17
|
+
import { AdaptiveGridService } from '../../common/adaptiveness.service';
|
|
17
18
|
import * as i0 from "@angular/core";
|
|
18
19
|
import * as i1 from "../filter.service";
|
|
19
20
|
import * as i2 from "../../common/single-popup.service";
|
|
20
21
|
import * as i3 from "../../common/provider.service";
|
|
21
22
|
import * as i4 from "./../../navigation/navigation.service";
|
|
22
|
-
import * as i5 from "../../common/
|
|
23
|
+
import * as i5 from "../../common/adaptiveness.service";
|
|
24
|
+
import * as i6 from "../../common/id.service";
|
|
23
25
|
let id = 0;
|
|
24
26
|
const getId = (gridId) => `${gridId}-filter-menu-${id++}`;
|
|
25
27
|
/**
|
|
@@ -32,6 +34,8 @@ export class FilterMenuComponent {
|
|
|
32
34
|
navigationService;
|
|
33
35
|
renderer;
|
|
34
36
|
cdr;
|
|
37
|
+
adaptiveGridService;
|
|
38
|
+
zone;
|
|
35
39
|
idService;
|
|
36
40
|
filterIcon = filterIcon;
|
|
37
41
|
/**
|
|
@@ -49,13 +53,15 @@ export class FilterMenuComponent {
|
|
|
49
53
|
tabIndex = '-1';
|
|
50
54
|
popupRef;
|
|
51
55
|
popupSubs;
|
|
52
|
-
constructor(filterService, popupService, ctx, navigationService, renderer, cdr, idService) {
|
|
56
|
+
constructor(filterService, popupService, ctx, navigationService, renderer, cdr, adaptiveGridService, zone, idService) {
|
|
53
57
|
this.filterService = filterService;
|
|
54
58
|
this.popupService = popupService;
|
|
55
59
|
this.ctx = ctx;
|
|
56
60
|
this.navigationService = navigationService;
|
|
57
61
|
this.renderer = renderer;
|
|
58
62
|
this.cdr = cdr;
|
|
63
|
+
this.adaptiveGridService = adaptiveGridService;
|
|
64
|
+
this.zone = zone;
|
|
59
65
|
this.idService = idService;
|
|
60
66
|
}
|
|
61
67
|
ngOnDestroy() {
|
|
@@ -79,32 +85,41 @@ export class FilterMenuComponent {
|
|
|
79
85
|
return this.navigationService.tableEnabled;
|
|
80
86
|
}
|
|
81
87
|
toggle(anchor, template) {
|
|
82
|
-
this.
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
this.popupSubs?.unsubscribe();
|
|
88
|
-
this.popupSubs = this.popupRef.popup.instance.anchorViewportLeave.subscribe(() => {
|
|
89
|
-
this.close();
|
|
90
|
-
this.updateAria(ariaRoot);
|
|
91
|
-
});
|
|
92
|
-
this.popupSubs.add(() => this.popupRef.popup.instance.close.subscribe(() => {
|
|
93
|
-
this.popupRef = null;
|
|
94
|
-
this.updateAria(ariaRoot);
|
|
95
|
-
}));
|
|
96
|
-
const popupAriaElement = this.popupRef.popupElement.querySelector('.k-grid-filter-popup');
|
|
97
|
-
if (popupAriaElement) {
|
|
98
|
-
const popupId = getId(this.idService?.gridId());
|
|
99
|
-
this.renderer.setAttribute(popupAriaElement, 'id', popupId);
|
|
100
|
-
this.renderer.setAttribute(popupAriaElement, 'role', 'dialog');
|
|
101
|
-
this.renderer.setAttribute(popupAriaElement, 'aria-label', this.filterLabel);
|
|
102
|
-
ariaRoot && this.renderer.setAttribute(ariaRoot, 'aria-controls', popupId);
|
|
103
|
-
ariaRoot && this.renderer.setAttribute(ariaRoot, 'aria-expanded', 'true');
|
|
88
|
+
if (this.ctx.grid?.adaptiveMode === 'auto' && this.adaptiveGridService.windowSize !== 'large') {
|
|
89
|
+
if (!this.ctx.grid.isActionSheetExpanded) {
|
|
90
|
+
this.adaptiveGridService.viewType = 'filterMenu';
|
|
91
|
+
this.adaptiveGridService.column = this.column;
|
|
92
|
+
this.ctx.grid.adaptiveRenderer.actionSheet.toggle(true);
|
|
104
93
|
}
|
|
105
94
|
}
|
|
106
95
|
else {
|
|
107
|
-
this.
|
|
96
|
+
this.popupRef = this.popupService.open(anchor, template, this.popupRef);
|
|
97
|
+
// Needed as changes to 'popupRef' are not reflected
|
|
98
|
+
// automatically when the Popup is closed by clicking outside the anchor
|
|
99
|
+
const ariaRoot = this.isNavigable ? anchor.closest('.k-table-th') : anchor;
|
|
100
|
+
if (this.popupRef) {
|
|
101
|
+
this.popupSubs?.unsubscribe();
|
|
102
|
+
this.popupSubs = this.popupRef.popup.instance.anchorViewportLeave.subscribe(() => {
|
|
103
|
+
this.close();
|
|
104
|
+
this.updateAria(ariaRoot);
|
|
105
|
+
});
|
|
106
|
+
this.popupSubs.add(() => this.popupRef.popup.instance.close.subscribe(() => {
|
|
107
|
+
this.popupRef = null;
|
|
108
|
+
this.updateAria(ariaRoot);
|
|
109
|
+
}));
|
|
110
|
+
const popupAriaElement = this.popupRef.popupElement.querySelector('.k-grid-filter-popup');
|
|
111
|
+
if (popupAriaElement) {
|
|
112
|
+
const popupId = getId(this.idService?.gridId());
|
|
113
|
+
this.renderer.setAttribute(popupAriaElement, 'id', popupId);
|
|
114
|
+
this.renderer.setAttribute(popupAriaElement, 'role', 'dialog');
|
|
115
|
+
this.renderer.setAttribute(popupAriaElement, 'aria-label', this.filterLabel);
|
|
116
|
+
ariaRoot && this.renderer.setAttribute(ariaRoot, 'aria-controls', popupId);
|
|
117
|
+
ariaRoot && this.renderer.setAttribute(ariaRoot, 'aria-expanded', 'true');
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
this.focusRoot();
|
|
122
|
+
}
|
|
108
123
|
}
|
|
109
124
|
return false;
|
|
110
125
|
}
|
|
@@ -126,7 +141,7 @@ export class FilterMenuComponent {
|
|
|
126
141
|
focusRoot() {
|
|
127
142
|
this.isNavigable ? this.navigationService.focusCell(0, this.column.leafIndex) : this.anchor.nativeElement.focus();
|
|
128
143
|
}
|
|
129
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FilterMenuComponent, deps: [{ token: i1.FilterService }, { token: i2.SinglePopupService }, { token: i3.ContextService }, { token: i4.NavigationService }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i5.IdService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
144
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FilterMenuComponent, deps: [{ token: i1.FilterService }, { token: i2.SinglePopupService }, { token: i3.ContextService }, { token: i4.NavigationService }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i5.AdaptiveGridService }, { token: i0.NgZone }, { token: i6.IdService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
130
145
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FilterMenuComponent, isStandalone: true, selector: "kendo-grid-filter-menu", inputs: { column: "column", filter: "filter", tabIndex: "tabIndex" }, viewQueries: [{ propertyName: "anchor", first: true, predicate: ["anchor"], descendants: true, static: true }, { propertyName: "template", first: true, predicate: ["template"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: `
|
|
131
146
|
<a #anchor
|
|
132
147
|
class="k-grid-filter-menu k-grid-header-menu"
|
|
@@ -183,9 +198,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
183
198
|
</ng-template>
|
|
184
199
|
`,
|
|
185
200
|
standalone: true,
|
|
186
|
-
imports: [IconWrapperComponent, FilterMenuContainerComponent]
|
|
201
|
+
imports: [IconWrapperComponent, FilterMenuContainerComponent],
|
|
187
202
|
}]
|
|
188
|
-
}], ctorParameters: function () { return [{ type: i1.FilterService }, { type: i2.SinglePopupService }, { type: i3.ContextService }, { type: i4.NavigationService }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i5.IdService, decorators: [{
|
|
203
|
+
}], ctorParameters: function () { return [{ type: i1.FilterService }, { type: i2.SinglePopupService }, { type: i3.ContextService }, { type: i4.NavigationService }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i5.AdaptiveGridService }, { type: i0.NgZone }, { type: i6.IdService, decorators: [{
|
|
189
204
|
type: Optional
|
|
190
205
|
}] }]; }, propDecorators: { column: [{
|
|
191
206
|
type: Input
|
|
@@ -94,6 +94,7 @@ export class NumericFilterMenuInputComponent {
|
|
|
94
94
|
[columnLabel]="columnLabel"
|
|
95
95
|
[filterDelay]="filterDelay"
|
|
96
96
|
[autoCorrect]="true"
|
|
97
|
+
[size]="ctx.grid?.isActionSheetExpanded ? 'large' : null"
|
|
97
98
|
[value]="currentFilter?.value"
|
|
98
99
|
[format]="format"
|
|
99
100
|
[decimals]="decimals"
|
|
@@ -129,6 +130,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
129
130
|
[columnLabel]="columnLabel"
|
|
130
131
|
[filterDelay]="filterDelay"
|
|
131
132
|
[autoCorrect]="true"
|
|
133
|
+
[size]="ctx.grid?.isActionSheetExpanded ? 'large' : null"
|
|
132
134
|
[value]="currentFilter?.value"
|
|
133
135
|
[format]="format"
|
|
134
136
|
[decimals]="decimals"
|
|
@@ -116,6 +116,9 @@ export class NumericFilterMenuComponent extends NumericFilterComponent {
|
|
|
116
116
|
<kendo-dropdownlist
|
|
117
117
|
*ngIf="extra"
|
|
118
118
|
kendoFilterMenuDropDown
|
|
119
|
+
[adaptiveTitle]="ctx.localization.get('adaptiveFilterOperatorsTitle')"
|
|
120
|
+
[adaptiveMode]="ctx.grid?.adaptiveMode"
|
|
121
|
+
[size]="ctx.grid?.isActionSheetExpanded ? 'large' : null"
|
|
119
122
|
[filterMenuDropDownLabel]="filterMenuDropDownLabel"
|
|
120
123
|
class="k-filter-and"
|
|
121
124
|
[data]="logicOperators"
|
|
@@ -168,6 +171,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
168
171
|
<kendo-dropdownlist
|
|
169
172
|
*ngIf="extra"
|
|
170
173
|
kendoFilterMenuDropDown
|
|
174
|
+
[adaptiveTitle]="ctx.localization.get('adaptiveFilterOperatorsTitle')"
|
|
175
|
+
[adaptiveMode]="ctx.grid?.adaptiveMode"
|
|
176
|
+
[size]="ctx.grid?.isActionSheetExpanded ? 'large' : null"
|
|
171
177
|
[filterMenuDropDownLabel]="filterMenuDropDownLabel"
|
|
172
178
|
class="k-filter-and"
|
|
173
179
|
[data]="logicOperators"
|
|
@@ -51,6 +51,7 @@ export class StringFilterMenuInputComponent {
|
|
|
51
51
|
<kendo-textbox
|
|
52
52
|
kendoFilterInput
|
|
53
53
|
[columnLabel]="columnLabel"
|
|
54
|
+
[size]="ctx.grid?.isActionSheetExpanded ? 'large' : null"
|
|
54
55
|
[filterDelay]="0"
|
|
55
56
|
[placeholder]="placeholder"
|
|
56
57
|
[ngModel]="currentFilter?.value ?? null">
|
|
@@ -75,6 +76,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
75
76
|
<kendo-textbox
|
|
76
77
|
kendoFilterInput
|
|
77
78
|
[columnLabel]="columnLabel"
|
|
79
|
+
[size]="ctx.grid?.isActionSheetExpanded ? 'large' : null"
|
|
78
80
|
[filterDelay]="0"
|
|
79
81
|
[placeholder]="placeholder"
|
|
80
82
|
[ngModel]="currentFilter?.value ?? null">
|
|
@@ -32,7 +32,8 @@ import * as i1 from "../../common/provider.service";
|
|
|
32
32
|
* ```
|
|
33
33
|
*/
|
|
34
34
|
export class StringFilterMenuComponent extends StringFilterComponent {
|
|
35
|
-
|
|
35
|
+
ctx;
|
|
36
|
+
logicOperators = [];
|
|
36
37
|
/**
|
|
37
38
|
* @hidden
|
|
38
39
|
*/
|
|
@@ -69,6 +70,8 @@ export class StringFilterMenuComponent extends StringFilterComponent {
|
|
|
69
70
|
menuTabbingService;
|
|
70
71
|
constructor(ctx) {
|
|
71
72
|
super(null, ctx);
|
|
73
|
+
this.ctx = ctx;
|
|
74
|
+
this.logicOperators = logicOperators(this.ctx.localization);
|
|
72
75
|
}
|
|
73
76
|
get firstFilter() {
|
|
74
77
|
return setFilter(0, this.filter, (this.column || {}).field, this.operator);
|
|
@@ -103,6 +106,9 @@ export class StringFilterMenuComponent extends StringFilterComponent {
|
|
|
103
106
|
<kendo-dropdownlist
|
|
104
107
|
*ngIf="extra"
|
|
105
108
|
kendoFilterMenuDropDown
|
|
109
|
+
[adaptiveTitle]="ctx.localization.get('adaptiveFilterOperatorsTitle')"
|
|
110
|
+
[adaptiveMode]="ctx.grid?.adaptiveMode"
|
|
111
|
+
[size]="ctx.grid?.isActionSheetExpanded ? 'large' : null"
|
|
106
112
|
[filterMenuDropDownLabel]="filterMenuDropDownLabel"
|
|
107
113
|
class="k-filter-and"
|
|
108
114
|
[data]="logicOperators"
|
|
@@ -141,6 +147,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
141
147
|
<kendo-dropdownlist
|
|
142
148
|
*ngIf="extra"
|
|
143
149
|
kendoFilterMenuDropDown
|
|
150
|
+
[adaptiveTitle]="ctx.localization.get('adaptiveFilterOperatorsTitle')"
|
|
151
|
+
[adaptiveMode]="ctx.grid?.adaptiveMode"
|
|
152
|
+
[size]="ctx.grid?.isActionSheetExpanded ? 'large' : null"
|
|
144
153
|
[filterMenuDropDownLabel]="filterMenuDropDownLabel"
|
|
145
154
|
class="k-filter-and"
|
|
146
155
|
[data]="logicOperators"
|