@progress/kendo-angular-grid 20.0.4-develop.2 → 20.1.0-develop.2
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-renderer.component.d.ts +2 -3
- package/column-menu/column-chooser-content.component.d.ts +60 -0
- package/column-menu/column-chooser.component.d.ts +15 -4
- package/column-menu/column-list-kb-nav.service.d.ts +2 -2
- package/column-menu/column-list.component.d.ts +30 -21
- package/column-menu/column-menu-chooser.component.d.ts +2 -7
- package/column-menu/column-menu.component.d.ts +0 -4
- package/columns/column-base.d.ts +8 -0
- package/directives.d.ts +1 -2
- package/esm2022/adaptiveness/adaptive-renderer.component.mjs +26 -46
- package/esm2022/column-menu/column-chooser-content.component.mjs +306 -0
- package/esm2022/column-menu/column-chooser.component.mjs +39 -31
- package/esm2022/column-menu/column-list-kb-nav.service.mjs +3 -3
- package/esm2022/column-menu/column-list.component.mjs +258 -177
- package/esm2022/column-menu/column-menu-chooser.component.mjs +17 -36
- package/esm2022/column-menu/column-menu.component.mjs +12 -28
- package/esm2022/columns/column-base.mjs +8 -0
- package/esm2022/common/column-info.service.mjs +3 -0
- package/esm2022/directives.mjs +0 -2
- package/esm2022/grid.component.mjs +6 -0
- package/esm2022/grid.module.mjs +47 -48
- package/esm2022/localization/messages.mjs +12 -1
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/rendering/list.component.mjs +7 -1
- package/esm2022/rendering/toolbar/tools/column-chooser-tool.directive.mjs +38 -12
- package/fesm2022/progress-kendo-angular-grid.mjs +709 -368
- package/grid.module.d.ts +46 -47
- package/localization/messages.d.ts +10 -1
- package/package.json +21 -21
- package/rendering/toolbar/tools/column-chooser-tool.directive.d.ts +13 -1
- package/schematics/ngAdd/index.js +4 -4
- package/column-menu/column-chooser-item-checked.directive.d.ts +0 -21
- package/esm2022/column-menu/column-chooser-item-checked.directive.mjs +0 -45
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import { Directive, NgZone, Input, Renderer2, ChangeDetectorRef } from '@angular/core';
|
|
6
6
|
import { PopupService } from '@progress/kendo-angular-popup';
|
|
7
7
|
import { RefreshService, ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
|
|
8
|
-
import { ColumnListComponent } from '../../../column-menu/column-list.component';
|
|
9
8
|
import { closest, isPresent } from '@progress/kendo-angular-common';
|
|
10
9
|
import { Subscription } from 'rxjs';
|
|
11
10
|
import { columnsIcon } from '@progress/kendo-svg-icons';
|
|
@@ -15,6 +14,7 @@ import { AdaptiveGridService } from '../../../common/adaptiveness.service';
|
|
|
15
14
|
import { ColumnInfoService } from '../../../common/column-info.service';
|
|
16
15
|
import { ToolbarToolBase } from '../../../common/toolbar-tool-base.directive';
|
|
17
16
|
import { ToolbarToolName } from '../../../navigation/toolbar-tool-name';
|
|
17
|
+
import { ColumnChooserContentComponent } from '../../../column-menu/column-chooser-content.component';
|
|
18
18
|
import * as i0 from "@angular/core";
|
|
19
19
|
import * as i1 from "@progress/kendo-angular-popup";
|
|
20
20
|
import * as i2 from "@progress/kendo-angular-toolbar";
|
|
@@ -58,6 +58,18 @@ export class ColumnChooserToolbarDirective extends ToolbarToolBase {
|
|
|
58
58
|
* @default true
|
|
59
59
|
*/
|
|
60
60
|
allowHideAll = true;
|
|
61
|
+
/**
|
|
62
|
+
* When `true`, enables the columns' filtering.
|
|
63
|
+
*
|
|
64
|
+
* @default true
|
|
65
|
+
*/
|
|
66
|
+
filterable = true;
|
|
67
|
+
/**
|
|
68
|
+
* When `true`, displays a select all checkbox.
|
|
69
|
+
*
|
|
70
|
+
* @default true
|
|
71
|
+
*/
|
|
72
|
+
showSelectAll = true;
|
|
61
73
|
/**
|
|
62
74
|
* @hidden
|
|
63
75
|
*/
|
|
@@ -136,7 +148,7 @@ export class ColumnChooserToolbarDirective extends ToolbarToolBase {
|
|
|
136
148
|
const direction = this.ctx.localization.rtl ? 'right' : 'left';
|
|
137
149
|
this.popupRef = this.popupSerivce.open({
|
|
138
150
|
anchor: this.buttonElement,
|
|
139
|
-
content:
|
|
151
|
+
content: ColumnChooserContentComponent,
|
|
140
152
|
positionMode: 'absolute',
|
|
141
153
|
anchorAlign: { vertical: 'bottom', horizontal: direction },
|
|
142
154
|
popupAlign: { vertical: 'top', horizontal: direction }
|
|
@@ -158,18 +170,28 @@ export class ColumnChooserToolbarDirective extends ToolbarToolBase {
|
|
|
158
170
|
this.buttonElement?.setAttribute('aria-expanded', 'true');
|
|
159
171
|
this.buttonElement?.setAttribute('aria-controls', popupId);
|
|
160
172
|
this.host.selected = true;
|
|
161
|
-
const
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
173
|
+
const columnChooserContent = this.popupRef.content.instance;
|
|
174
|
+
columnChooserContent.columnInfoService = this.columnInfoService;
|
|
175
|
+
columnChooserContent.ctx = this.ctx;
|
|
176
|
+
columnChooserContent.showSelectAll = this.showSelectAll;
|
|
177
|
+
columnChooserContent.filterable = this.filterable;
|
|
178
|
+
columnChooserContent.isLast = true;
|
|
179
|
+
columnChooserContent.autoSync = this.autoSync;
|
|
180
|
+
columnChooserContent.allowHideAll = this.allowHideAll;
|
|
181
|
+
columnChooserContent.applyText = this.ctx.localization.get('columnsApply');
|
|
182
|
+
columnChooserContent.resetText = this.ctx.localization.get('columnsReset');
|
|
183
|
+
columnChooserContent.columns = this.ctx.grid.columns;
|
|
184
|
+
columnChooserContent.filteredColumns = this.columnInfoService?.leafNamedColumns.filter(column => {
|
|
185
|
+
if (column.includeInChooser !== false) {
|
|
186
|
+
column.initiallyChecked = column.currentlyChecked = !column.hidden;
|
|
187
|
+
return true;
|
|
188
|
+
}
|
|
189
|
+
return false;
|
|
190
|
+
});
|
|
169
191
|
this.subs.add(this.popupRef.popup.instance.anchorViewportLeave.subscribe(() => {
|
|
170
192
|
this.closePopup(true);
|
|
171
193
|
}));
|
|
172
|
-
this.subs.add(columnList.apply.subscribe((changed) => {
|
|
194
|
+
this.subs.add(columnChooserContent.columnList.apply.subscribe((changed) => {
|
|
173
195
|
if (changed.length) {
|
|
174
196
|
this.cdr.markForCheck();
|
|
175
197
|
this.columnInfoService.changeVisibility(changed);
|
|
@@ -197,7 +219,7 @@ export class ColumnChooserToolbarDirective extends ToolbarToolBase {
|
|
|
197
219
|
focusAnchor && this.buttonElement?.focus();
|
|
198
220
|
}
|
|
199
221
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnChooserToolbarDirective, deps: [{ token: i0.Renderer2 }, { token: i1.PopupService }, { token: i2.ToolBarButtonComponent }, { token: i3.ContextService }, { token: i0.NgZone }, { token: i2.RefreshService }, { token: i4.AdaptiveGridService }, { token: i5.ColumnInfoService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
200
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ColumnChooserToolbarDirective, isStandalone: true, selector: "[kendoGridColumnChooserTool]", inputs: { autoSync: "autoSync", allowHideAll: "allowHideAll" }, usesInheritance: true, ngImport: i0 });
|
|
222
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ColumnChooserToolbarDirective, isStandalone: true, selector: "[kendoGridColumnChooserTool]", inputs: { autoSync: "autoSync", allowHideAll: "allowHideAll", filterable: "filterable", showSelectAll: "showSelectAll" }, usesInheritance: true, ngImport: i0 });
|
|
201
223
|
}
|
|
202
224
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnChooserToolbarDirective, decorators: [{
|
|
203
225
|
type: Directive,
|
|
@@ -209,4 +231,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
209
231
|
type: Input
|
|
210
232
|
}], allowHideAll: [{
|
|
211
233
|
type: Input
|
|
234
|
+
}], filterable: [{
|
|
235
|
+
type: Input
|
|
236
|
+
}], showSelectAll: [{
|
|
237
|
+
type: Input
|
|
212
238
|
}] } });
|