@progress/kendo-angular-grid 20.0.4-develop.2 → 20.1.0-develop.10
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 +28 -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/columns/command-column.component.d.ts +1 -1
- package/columns/span-column.component.d.ts +1 -1
- package/directives.d.ts +1 -2
- package/editing/cancel-command.directive.d.ts +1 -1
- package/editing/edit-row-options.interface.d.ts +1 -1
- package/editing/edit-template.directive.d.ts +1 -1
- package/editing/remove-command.directive.d.ts +1 -1
- package/editing/save-command.directive.d.ts +1 -1
- package/editing-directives/edit-service.interface.d.ts +2 -2
- package/editing-directives/external-editing.directive.d.ts +1 -1
- package/editing-directives/in-cell-editing.directive.d.ts +1 -1
- package/editing-directives/reactive-editing.directive.d.ts +1 -1
- package/editing-directives/template-editing.directive.d.ts +1 -1
- 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 +4 -4
- package/esm2022/column-menu/column-list.component.mjs +221 -176
- package/esm2022/column-menu/column-menu-chooser.component.mjs +17 -36
- package/esm2022/column-menu/column-menu-container.component.mjs +10 -1
- package/esm2022/column-menu/column-menu.component.mjs +19 -29
- package/esm2022/columns/column-base.mjs +8 -0
- package/esm2022/columns/command-column.component.mjs +1 -1
- package/esm2022/columns/span-column.component.mjs +1 -1
- package/esm2022/common/column-info.service.mjs +3 -0
- package/esm2022/directives.mjs +0 -2
- package/esm2022/editing/cancel-command.directive.mjs +1 -1
- package/esm2022/editing/edit-template.directive.mjs +1 -1
- package/esm2022/editing/remove-command.directive.mjs +1 -1
- package/esm2022/editing/save-command.directive.mjs +1 -1
- package/esm2022/editing-directives/external-editing.directive.mjs +1 -1
- package/esm2022/editing-directives/in-cell-editing.directive.mjs +1 -1
- package/esm2022/editing-directives/reactive-editing.directive.mjs +1 -1
- package/esm2022/editing-directives/template-editing.directive.mjs +1 -1
- package/esm2022/filtering/menu/filter-menu-input-wrapper.component.mjs +2 -2
- package/esm2022/filtering/menu/filter-menu.component.mjs +7 -1
- package/esm2022/grid.component.mjs +6 -0
- package/esm2022/grid.module.mjs +47 -48
- package/esm2022/localization/messages.mjs +12 -1
- package/esm2022/navigation/logical-cell.directive.mjs +8 -2
- package/esm2022/navigation/navigation.service.mjs +1 -0
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/rendering/list.component.mjs +23 -1
- package/esm2022/rendering/toolbar/tools/column-chooser-tool.directive.mjs +39 -13
- package/esm2022/rendering/toolbar/tools/filter-toolbar-tool.component.mjs +1 -1
- package/esm2022/rendering/toolbar/tools/group-toolbar-tool.component.mjs +2 -2
- package/esm2022/rendering/toolbar/tools/sort-toolbar-tool.component.mjs +1 -1
- package/fesm2022/progress-kendo-angular-grid.mjs +739 -391
- package/grid.module.d.ts +46 -47
- package/localization/messages.d.ts +10 -1
- package/navigation/navigation.service.d.ts +1 -0
- package/package.json +21 -21
- package/rendering/list.component.d.ts +1 -0
- 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
|
@@ -24,7 +24,6 @@ import { ColumnMenuItemComponent } from '../column-menu/column-menu-item.compone
|
|
|
24
24
|
import { ColumnMenuItemDirective } from '../column-menu/column-menu-item.directive';
|
|
25
25
|
import { hasFilter, hasSort, hasLock, hasStick, hasColumnChooser, hasAutoSizeColumn, hasPosition, hasAutoSizeAllColumns } from '../column-menu/utils';
|
|
26
26
|
import { ColumnMenuService } from '../column-menu/column-menu.service';
|
|
27
|
-
import { ColumnListComponent } from '../column-menu/column-list.component';
|
|
28
27
|
import { ContextService } from '../common/provider.service';
|
|
29
28
|
import { AdaptiveService } from '@progress/kendo-angular-utils';
|
|
30
29
|
import { SortService } from '../common/sort.service';
|
|
@@ -34,6 +33,7 @@ import { directions } from '../rendering/toolbar/tools/sort-toolbar-tool.compone
|
|
|
34
33
|
import { EventsOutsideAngularDirective, replaceMessagePlaceholder } from '@progress/kendo-angular-common';
|
|
35
34
|
import { FormComponent } from '../editing/form';
|
|
36
35
|
import { GroupToolbarToolComponent } from '../rendering/toolbar/tools/group-toolbar-tool.component';
|
|
36
|
+
import { ColumnChooserContentComponent } from '../column-menu/column-chooser-content.component';
|
|
37
37
|
import * as i0 from "@angular/core";
|
|
38
38
|
import * as i1 from "../column-menu/column-menu.service";
|
|
39
39
|
import * as i2 from "../common/adaptiveness.service";
|
|
@@ -62,7 +62,6 @@ export class AdaptiveRendererComponent {
|
|
|
62
62
|
cancelIcon = cancelIcon;
|
|
63
63
|
saveIcon = saveIcon;
|
|
64
64
|
columns;
|
|
65
|
-
actionsClass = 'k-actions';
|
|
66
65
|
externalEditingSettings;
|
|
67
66
|
get hasSort() {
|
|
68
67
|
return hasSort(this.ctx.grid.columnMenu, this.adaptiveGridService.column);
|
|
@@ -160,7 +159,7 @@ export class AdaptiveRendererComponent {
|
|
|
160
159
|
get hasCheckCloseIcon() {
|
|
161
160
|
return this.adaptiveGridService.viewType === 'sortToolbarTool' || this.adaptiveGridService.viewType === 'groupToolbarTool';
|
|
162
161
|
}
|
|
163
|
-
|
|
162
|
+
columnChooserContent;
|
|
164
163
|
filterToolbarToolTemplate;
|
|
165
164
|
filterMenuContainer;
|
|
166
165
|
actionSheet;
|
|
@@ -224,7 +223,7 @@ export class AdaptiveRendererComponent {
|
|
|
224
223
|
this.actionSheet.nextView();
|
|
225
224
|
}
|
|
226
225
|
applyChanges() {
|
|
227
|
-
this.
|
|
226
|
+
this.columnChooserContent.applyChanges();
|
|
228
227
|
this.actionSheet.toggle(false);
|
|
229
228
|
}
|
|
230
229
|
sortBy(column) {
|
|
@@ -276,10 +275,11 @@ export class AdaptiveRendererComponent {
|
|
|
276
275
|
this.adaptiveGridService.notifyAnimationEnd();
|
|
277
276
|
}
|
|
278
277
|
cancelChanges() {
|
|
279
|
-
this.
|
|
278
|
+
this.columnChooserContent.cancelChanges();
|
|
279
|
+
this.columnChooserContent.cdr.detectChanges();
|
|
280
280
|
}
|
|
281
281
|
onTab(event) {
|
|
282
|
-
this.
|
|
282
|
+
this.columnChooserContent.onTab(event);
|
|
283
283
|
}
|
|
284
284
|
saveEditing() {
|
|
285
285
|
const { event, formGroup, externalEditingDirective } = this.externalEditingSettings;
|
|
@@ -287,7 +287,7 @@ export class AdaptiveRendererComponent {
|
|
|
287
287
|
this.actionSheet.toggle(false);
|
|
288
288
|
}
|
|
289
289
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AdaptiveRendererComponent, deps: [{ token: i1.ColumnMenuService }, { token: i2.AdaptiveGridService }, { token: i3.FilterService }, { token: i4.ContextService }, { token: i5.AdaptiveService }, { token: i6.SortService }, { token: i7.ColumnInfoService }], target: i0.ɵɵFactoryTarget.Component });
|
|
290
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AdaptiveRendererComponent, isStandalone: true, selector: "kendo-grid-adaptive-renderer", viewQueries: [{ propertyName: "
|
|
290
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AdaptiveRendererComponent, isStandalone: true, selector: "kendo-grid-adaptive-renderer", viewQueries: [{ propertyName: "columnChooserContent", first: true, predicate: ["columnChooserContent"], descendants: true }, { propertyName: "filterToolbarToolTemplate", first: true, predicate: ["filterToolbarToolTemplate"], descendants: true, read: ViewContainerRef }, { propertyName: "filterMenuContainer", first: true, predicate: ["filterMenuContainer"], descendants: true }, { propertyName: "actionSheet", first: true, predicate: ActionSheetComponent, descendants: true }, { propertyName: "groupToolbarTool", first: true, predicate: GroupToolbarToolComponent, descendants: true }], ngImport: i0, template: `
|
|
291
291
|
<kendo-actionsheet
|
|
292
292
|
[cssClass]="{
|
|
293
293
|
'k-adaptive-actionsheet': true,
|
|
@@ -347,19 +347,14 @@ export class AdaptiveRendererComponent {
|
|
|
347
347
|
</ng-container>
|
|
348
348
|
</ng-template>
|
|
349
349
|
<ng-template kendoActionSheetContentTemplate>
|
|
350
|
-
<kendo-grid-
|
|
351
|
-
#
|
|
352
|
-
[columns]="
|
|
353
|
-
[ariaLabel]="messageFor('columns')"
|
|
350
|
+
<kendo-grid-column-chooser-content
|
|
351
|
+
#columnChooserContent
|
|
352
|
+
[columns]="columns"
|
|
354
353
|
[isLast]="true"
|
|
355
|
-
[showActions]="false"
|
|
356
|
-
[applyText]="messageFor('columnsApply')"
|
|
357
|
-
[resetText]="messageFor('columnsReset')"
|
|
358
354
|
[autoSync]="false"
|
|
359
|
-
[actionsClass]="actionsClass"
|
|
360
355
|
[allowHideAll]="false"
|
|
361
356
|
>
|
|
362
|
-
</kendo-grid-
|
|
357
|
+
</kendo-grid-column-chooser-content>
|
|
363
358
|
</ng-template>
|
|
364
359
|
<ng-template kendoActionSheetFooterTemplate>
|
|
365
360
|
<ng-container [ngTemplateOutlet]="actionSheetFooterTemplate">
|
|
@@ -501,20 +496,15 @@ export class AdaptiveRendererComponent {
|
|
|
501
496
|
</ng-template>
|
|
502
497
|
|
|
503
498
|
<ng-template kendoActionSheetContentTemplate>
|
|
504
|
-
<kendo-grid-
|
|
499
|
+
<kendo-grid-column-chooser-content
|
|
505
500
|
*ngIf="adaptiveGridService.secondaryView === 'columnChooser'"
|
|
506
|
-
#
|
|
501
|
+
#columnChooserContent
|
|
507
502
|
[columns]="adaptiveGridService.columns"
|
|
508
|
-
[ariaLabel]="messageFor('columns')"
|
|
509
503
|
[isLast]="true"
|
|
510
|
-
[showActions]="false"
|
|
511
|
-
[applyText]="messageFor('columnsApply')"
|
|
512
|
-
[resetText]="messageFor('columnsReset')"
|
|
513
504
|
[autoSync]="false"
|
|
514
|
-
[actionsClass]="actionsClass"
|
|
515
505
|
[allowHideAll]="false"
|
|
516
506
|
>
|
|
517
|
-
</kendo-grid-
|
|
507
|
+
</kendo-grid-column-chooser-content>
|
|
518
508
|
<kendo-grid-filter-menu-container
|
|
519
509
|
*ngIf="adaptiveGridService.secondaryView === 'columnFilter'"
|
|
520
510
|
[column]="adaptiveGridService.column"
|
|
@@ -713,7 +703,7 @@ export class AdaptiveRendererComponent {
|
|
|
713
703
|
{{messageFor('filterFilterButton')}}
|
|
714
704
|
</button>
|
|
715
705
|
</ng-template>
|
|
716
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ActionSheetComponent, selector: "kendo-actionsheet", inputs: ["actions", "actionsLayout", "overlayClickClose", "title", "subtitle", "items", "cssClass", "cssStyle", "animation", "expanded", "titleId", "initialFocus"], outputs: ["expandedChange", "action", "expand", "collapse", "itemClick", "overlayClick"], exportAs: ["kendoActionSheet"] }, { kind: "component", type: ActionSheetViewComponent, selector: "kendo-actionsheet-view", inputs: ["title", "subtitle", "titleId"] }, { kind: "component", type: FilterToolbarToolComponent, selector: "kendo-filter-toolbar-tool", outputs: ["close"] }, { kind: "component", type: GroupToolbarToolComponent, selector: "kendo-group-toolbar-tool", inputs: ["adaptive"], outputs: ["close", "groupClear"] }, { kind: "component", type: ButtonDirective, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: ActionSheetHeaderTemplateDirective, selector: "[kendoActionSheetHeaderTemplate]" }, { kind: "directive", type: ActionSheetContentTemplateDirective, selector: "[kendoActionSheetContentTemplate]" }, { kind: "directive", type: ActionSheetFooterTemplateDirective, selector: "[kendoActionSheetFooterTemplate]" }, { kind: "component", type: ColumnMenuContainerComponent, selector: "kendo-grid-columnmenu-container" }, { kind: "component", type: ColumnMenuFilterComponent, selector: "kendo-grid-columnmenu-filter", inputs: ["expanded", "isLast"], outputs: ["expand", "collapse"] }, { kind: "component", type: ColumnMenuSortComponent, selector: "kendo-grid-columnmenu-sort" }, { kind: "component", type: ColumnMenuLockComponent, selector: "kendo-grid-columnmenu-lock" }, { kind: "component", type: ColumnMenuStickComponent, selector: "kendo-grid-columnmenu-stick" }, { kind: "component", type: ColumnMenuPositionComponent, selector: "kendo-grid-columnmenu-position", inputs: ["expanded", "showLock", "showStick", "isLast"], outputs: ["expand", "collapse"] }, { kind: "component", type: ColumnMenuChooserComponent, selector: "kendo-grid-columnmenu-chooser", inputs: ["expanded", "isLast"], outputs: ["expand", "collapse"] }, { kind: "component", type: ColumnMenuAutoSizeColumnComponent, selector: "kendo-grid-columnmenu-autosize-column", inputs: ["column"] }, { kind: "component", type: ColumnMenuAutoSizeAllColumnsComponent, selector: "kendo-grid-columnmenu-autosize-all-columns" }, { kind: "component", type: ColumnMenuItemComponent, selector: "kendo-grid-columnmenu-item", inputs: ["icon", "svgIcon", "indicatorIcon", "text", "selected", "disabled", "expanded", "focused", "service", "column"], outputs: ["itemClick", "expand", "collapse"] }, { kind: "directive", type: ColumnMenuItemDirective, selector: "[kendoGridColumnMenuItem]", inputs: ["kendoGridColumnMenuItem"] }, { kind: "component", type:
|
|
706
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ActionSheetComponent, selector: "kendo-actionsheet", inputs: ["actions", "actionsLayout", "overlayClickClose", "title", "subtitle", "items", "cssClass", "cssStyle", "animation", "expanded", "titleId", "initialFocus"], outputs: ["expandedChange", "action", "expand", "collapse", "itemClick", "overlayClick"], exportAs: ["kendoActionSheet"] }, { kind: "component", type: ActionSheetViewComponent, selector: "kendo-actionsheet-view", inputs: ["title", "subtitle", "titleId"] }, { kind: "component", type: FilterToolbarToolComponent, selector: "kendo-filter-toolbar-tool", outputs: ["close"] }, { kind: "component", type: GroupToolbarToolComponent, selector: "kendo-group-toolbar-tool", inputs: ["adaptive"], outputs: ["close", "groupClear"] }, { kind: "component", type: ButtonDirective, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: ActionSheetHeaderTemplateDirective, selector: "[kendoActionSheetHeaderTemplate]" }, { kind: "directive", type: ActionSheetContentTemplateDirective, selector: "[kendoActionSheetContentTemplate]" }, { kind: "directive", type: ActionSheetFooterTemplateDirective, selector: "[kendoActionSheetFooterTemplate]" }, { kind: "component", type: ColumnMenuContainerComponent, selector: "kendo-grid-columnmenu-container" }, { kind: "component", type: ColumnMenuFilterComponent, selector: "kendo-grid-columnmenu-filter", inputs: ["expanded", "isLast"], outputs: ["expand", "collapse"] }, { kind: "component", type: ColumnMenuSortComponent, selector: "kendo-grid-columnmenu-sort" }, { kind: "component", type: ColumnMenuLockComponent, selector: "kendo-grid-columnmenu-lock" }, { kind: "component", type: ColumnMenuStickComponent, selector: "kendo-grid-columnmenu-stick" }, { kind: "component", type: ColumnMenuPositionComponent, selector: "kendo-grid-columnmenu-position", inputs: ["expanded", "showLock", "showStick", "isLast"], outputs: ["expand", "collapse"] }, { kind: "component", type: ColumnMenuChooserComponent, selector: "kendo-grid-columnmenu-chooser", inputs: ["expanded", "isLast"], outputs: ["expand", "collapse"] }, { kind: "component", type: ColumnMenuAutoSizeColumnComponent, selector: "kendo-grid-columnmenu-autosize-column", inputs: ["column"] }, { kind: "component", type: ColumnMenuAutoSizeAllColumnsComponent, selector: "kendo-grid-columnmenu-autosize-all-columns" }, { kind: "component", type: ColumnMenuItemComponent, selector: "kendo-grid-columnmenu-item", inputs: ["icon", "svgIcon", "indicatorIcon", "text", "selected", "disabled", "expanded", "focused", "service", "column"], outputs: ["itemClick", "expand", "collapse"] }, { kind: "directive", type: ColumnMenuItemDirective, selector: "[kendoGridColumnMenuItem]", inputs: ["kendoGridColumnMenuItem"] }, { kind: "component", type: FilterMenuContainerComponent, selector: "kendo-grid-filter-menu-container", inputs: ["column", "isLast", "isExpanded", "menuTabbingService", "filter", "actionsClass"], outputs: ["close"] }, { kind: "directive", type: EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { kind: "component", type: FormComponent, selector: "kendo-grid-external-form", inputs: ["controls", "formSettings", "formGroup", "actionButtons"], outputs: ["formSubmit"] }, { kind: "component", type: ColumnChooserContentComponent, selector: "kendo-grid-column-chooser-content", inputs: ["filterable", "showSelectAll", "showCheckedCount", "allowHideAll", "autoSync", "actionsClass", "closeOnReset", "columns", "isLast", "isExpanded", "service"], outputs: ["close"] }] });
|
|
717
707
|
}
|
|
718
708
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AdaptiveRendererComponent, decorators: [{
|
|
719
709
|
type: Component,
|
|
@@ -779,19 +769,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
779
769
|
</ng-container>
|
|
780
770
|
</ng-template>
|
|
781
771
|
<ng-template kendoActionSheetContentTemplate>
|
|
782
|
-
<kendo-grid-
|
|
783
|
-
#
|
|
784
|
-
[columns]="
|
|
785
|
-
[ariaLabel]="messageFor('columns')"
|
|
772
|
+
<kendo-grid-column-chooser-content
|
|
773
|
+
#columnChooserContent
|
|
774
|
+
[columns]="columns"
|
|
786
775
|
[isLast]="true"
|
|
787
|
-
[showActions]="false"
|
|
788
|
-
[applyText]="messageFor('columnsApply')"
|
|
789
|
-
[resetText]="messageFor('columnsReset')"
|
|
790
776
|
[autoSync]="false"
|
|
791
|
-
[actionsClass]="actionsClass"
|
|
792
777
|
[allowHideAll]="false"
|
|
793
778
|
>
|
|
794
|
-
</kendo-grid-
|
|
779
|
+
</kendo-grid-column-chooser-content>
|
|
795
780
|
</ng-template>
|
|
796
781
|
<ng-template kendoActionSheetFooterTemplate>
|
|
797
782
|
<ng-container [ngTemplateOutlet]="actionSheetFooterTemplate">
|
|
@@ -933,20 +918,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
933
918
|
</ng-template>
|
|
934
919
|
|
|
935
920
|
<ng-template kendoActionSheetContentTemplate>
|
|
936
|
-
<kendo-grid-
|
|
921
|
+
<kendo-grid-column-chooser-content
|
|
937
922
|
*ngIf="adaptiveGridService.secondaryView === 'columnChooser'"
|
|
938
|
-
#
|
|
923
|
+
#columnChooserContent
|
|
939
924
|
[columns]="adaptiveGridService.columns"
|
|
940
|
-
[ariaLabel]="messageFor('columns')"
|
|
941
925
|
[isLast]="true"
|
|
942
|
-
[showActions]="false"
|
|
943
|
-
[applyText]="messageFor('columnsApply')"
|
|
944
|
-
[resetText]="messageFor('columnsReset')"
|
|
945
926
|
[autoSync]="false"
|
|
946
|
-
[actionsClass]="actionsClass"
|
|
947
927
|
[allowHideAll]="false"
|
|
948
928
|
>
|
|
949
|
-
</kendo-grid-
|
|
929
|
+
</kendo-grid-column-chooser-content>
|
|
950
930
|
<kendo-grid-filter-menu-container
|
|
951
931
|
*ngIf="adaptiveGridService.secondaryView === 'columnFilter'"
|
|
952
932
|
[column]="adaptiveGridService.column"
|
|
@@ -1171,16 +1151,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
1171
1151
|
ColumnMenuAutoSizeAllColumnsComponent,
|
|
1172
1152
|
ColumnMenuItemComponent,
|
|
1173
1153
|
ColumnMenuItemDirective,
|
|
1174
|
-
ColumnListComponent,
|
|
1175
1154
|
FilterMenuContainerComponent,
|
|
1176
1155
|
ColumnMenuLockComponent,
|
|
1177
1156
|
EventsOutsideAngularDirective,
|
|
1178
|
-
FormComponent
|
|
1157
|
+
FormComponent,
|
|
1158
|
+
ColumnChooserContentComponent
|
|
1179
1159
|
]
|
|
1180
1160
|
}]
|
|
1181
|
-
}], ctorParameters: function () { return [{ type: i1.ColumnMenuService }, { type: i2.AdaptiveGridService }, { type: i3.FilterService }, { type: i4.ContextService }, { type: i5.AdaptiveService }, { type: i6.SortService }, { type: i7.ColumnInfoService }]; }, propDecorators: {
|
|
1161
|
+
}], ctorParameters: function () { return [{ type: i1.ColumnMenuService }, { type: i2.AdaptiveGridService }, { type: i3.FilterService }, { type: i4.ContextService }, { type: i5.AdaptiveService }, { type: i6.SortService }, { type: i7.ColumnInfoService }]; }, propDecorators: { columnChooserContent: [{
|
|
1182
1162
|
type: ViewChild,
|
|
1183
|
-
args: ['
|
|
1163
|
+
args: ['columnChooserContent', { static: false }]
|
|
1184
1164
|
}], filterToolbarToolTemplate: [{
|
|
1185
1165
|
type: ViewChild,
|
|
1186
1166
|
args: ['filterToolbarToolTemplate', { read: ViewContainerRef, static: false }]
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Component, Input, ChangeDetectorRef, ViewChild, EventEmitter, Output, ElementRef, Optional } from '@angular/core';
|
|
6
|
+
import { ColumnInfoService } from '../common/column-info.service';
|
|
7
|
+
import { EventsOutsideAngularDirective, PrefixTemplateDirective, replaceMessagePlaceholder } from '@progress/kendo-angular-common';
|
|
8
|
+
import { arrowRotateCcwIcon, checkIcon, searchIcon } from '@progress/kendo-svg-icons';
|
|
9
|
+
import { ButtonComponent } from '@progress/kendo-angular-buttons';
|
|
10
|
+
import { ColumnListComponent } from './column-list.component';
|
|
11
|
+
import { TextBoxComponent } from '@progress/kendo-angular-inputs';
|
|
12
|
+
import { NgClass, NgIf } from '@angular/common';
|
|
13
|
+
import { IconWrapperComponent } from '@progress/kendo-angular-icons';
|
|
14
|
+
import { ColumnMenuService } from './column-menu.service';
|
|
15
|
+
import { ContextService } from '../common/provider.service';
|
|
16
|
+
import { filterBy } from '@progress/kendo-data-query';
|
|
17
|
+
import * as i0 from "@angular/core";
|
|
18
|
+
import * as i1 from "../common/column-info.service";
|
|
19
|
+
import * as i2 from "../common/provider.service";
|
|
20
|
+
/**
|
|
21
|
+
* @hidden
|
|
22
|
+
*/
|
|
23
|
+
export class ColumnChooserContentComponent {
|
|
24
|
+
cdr;
|
|
25
|
+
columnInfoService;
|
|
26
|
+
ctx;
|
|
27
|
+
resetButton;
|
|
28
|
+
applyButton;
|
|
29
|
+
columnList;
|
|
30
|
+
filterInput;
|
|
31
|
+
filterable = true;
|
|
32
|
+
showSelectAll = true;
|
|
33
|
+
showCheckedCount = true;
|
|
34
|
+
allowHideAll = false;
|
|
35
|
+
autoSync = false;
|
|
36
|
+
actionsClass = 'k-actions k-actions-stretched k-actions-horizontal';
|
|
37
|
+
closeOnReset = true;
|
|
38
|
+
set columns(value) {
|
|
39
|
+
this._columns = value;
|
|
40
|
+
}
|
|
41
|
+
get columns() {
|
|
42
|
+
return this._columns;
|
|
43
|
+
}
|
|
44
|
+
isLast;
|
|
45
|
+
isExpanded;
|
|
46
|
+
service;
|
|
47
|
+
close = new EventEmitter();
|
|
48
|
+
get selectedItemsText() {
|
|
49
|
+
const count = this.columnList?.checkedCheckboxesLength || 0;
|
|
50
|
+
const localizedMessage = this.messageFor('columnChooserSelectedColumnsCount');
|
|
51
|
+
return replaceMessagePlaceholder(localizedMessage, 'selectedColumnsCount', count.toString());
|
|
52
|
+
}
|
|
53
|
+
get actionSheetOpened() {
|
|
54
|
+
return this.ctx?.grid?.isActionSheetExpanded;
|
|
55
|
+
}
|
|
56
|
+
searchIcon = searchIcon;
|
|
57
|
+
checkIcon = checkIcon;
|
|
58
|
+
arrowRotateCcwIcon = arrowRotateCcwIcon;
|
|
59
|
+
applyText;
|
|
60
|
+
resetText;
|
|
61
|
+
filteredColumns = [];
|
|
62
|
+
isFiltered = false;
|
|
63
|
+
_columns = [];
|
|
64
|
+
constructor(cdr, columnInfoService, ctx) {
|
|
65
|
+
this.cdr = cdr;
|
|
66
|
+
this.columnInfoService = columnInfoService;
|
|
67
|
+
this.ctx = ctx;
|
|
68
|
+
}
|
|
69
|
+
ngOnInit() {
|
|
70
|
+
this.applyText = this.ctx?.localization.get('columnsApply');
|
|
71
|
+
this.resetText = this.ctx?.localization.get('columnsReset');
|
|
72
|
+
}
|
|
73
|
+
ngAfterViewInit() {
|
|
74
|
+
this.filteredColumns = this.columnInfoService?.leafNamedColumns.filter(column => {
|
|
75
|
+
if (column.includeInChooser !== false) {
|
|
76
|
+
column.initiallyChecked = column.currentlyChecked = !column.hidden;
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
return false;
|
|
80
|
+
});
|
|
81
|
+
this.cdr.detectChanges();
|
|
82
|
+
}
|
|
83
|
+
ngAfterViewChecked() {
|
|
84
|
+
this.columnList.resetButton = this.resetButton;
|
|
85
|
+
this.columnList.applyButton = this.applyButton;
|
|
86
|
+
this.columnList.filterInput = this.filterInput;
|
|
87
|
+
}
|
|
88
|
+
onFilter(value) {
|
|
89
|
+
this.isFiltered = value.length > 0;
|
|
90
|
+
this.showSelectAll = !this.isFiltered;
|
|
91
|
+
const filterDescriptor = {
|
|
92
|
+
field: 'displayTitle',
|
|
93
|
+
operator: 'contains',
|
|
94
|
+
value: value
|
|
95
|
+
};
|
|
96
|
+
this.filteredColumns = filterBy(this.columnInfoService?.leafNamedColumns, filterDescriptor);
|
|
97
|
+
this.cdr.detectChanges();
|
|
98
|
+
this.columnList.listNavigationService.activeIndex = 0;
|
|
99
|
+
this.columnList.listNavigationService.items = this.columnList.checkboxes?.toArray();
|
|
100
|
+
}
|
|
101
|
+
messageFor = token => this.ctx?.localization.get(token);
|
|
102
|
+
onChange(changed) {
|
|
103
|
+
this.cdr.markForCheck();
|
|
104
|
+
this.columnInfoService?.changeVisibility(changed);
|
|
105
|
+
}
|
|
106
|
+
applyChanges() {
|
|
107
|
+
this.columnList.applyChanges();
|
|
108
|
+
this.close.emit();
|
|
109
|
+
}
|
|
110
|
+
cancelChanges() {
|
|
111
|
+
this.columnList.cancelChanges();
|
|
112
|
+
if (this.closeOnReset) {
|
|
113
|
+
this.close.emit();
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
onTab(e) {
|
|
117
|
+
if (e.key === 'Tab' && !e.shiftKey) {
|
|
118
|
+
this.columnList.listNavigationService.toggle(this.columnList.listNavigationService.activeIndex, true);
|
|
119
|
+
e.preventDefault();
|
|
120
|
+
}
|
|
121
|
+
if (e.key === 'Tab' && e.shiftKey && !this.service) {
|
|
122
|
+
this.columnList.resetButton?.nativeElement.focus();
|
|
123
|
+
e.preventDefault();
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
onApplyButtonKeydown(e) {
|
|
127
|
+
if (e.key === 'Tab') {
|
|
128
|
+
this.columnList.focusActiveColumn(e);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnChooserContentComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.ColumnInfoService, optional: true }, { token: i2.ContextService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
132
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ColumnChooserContentComponent, isStandalone: true, selector: "kendo-grid-column-chooser-content", inputs: { filterable: "filterable", showSelectAll: "showSelectAll", showCheckedCount: "showCheckedCount", allowHideAll: "allowHideAll", autoSync: "autoSync", actionsClass: "actionsClass", closeOnReset: "closeOnReset", columns: "columns", isLast: "isLast", isExpanded: "isExpanded", service: "service" }, outputs: { close: "close" }, viewQueries: [{ propertyName: "resetButton", first: true, predicate: ["resetButton"], descendants: true }, { propertyName: "applyButton", first: true, predicate: ["applyButton"], descendants: true }, { propertyName: "columnList", first: true, predicate: ["columnList"], descendants: true }, { propertyName: "filterInput", first: true, predicate: ["filterInput"], descendants: true }], ngImport: i0, template: `
|
|
133
|
+
<form class="k-filter-menu">
|
|
134
|
+
<div class="k-filter-menu-container">
|
|
135
|
+
<kendo-textbox
|
|
136
|
+
#filterInput
|
|
137
|
+
*ngIf="filterable"
|
|
138
|
+
class="k-searchbox"
|
|
139
|
+
(valueChange)="onFilter($event)"
|
|
140
|
+
[kendoEventsOutsideAngular]="{'keydown': onTab}"
|
|
141
|
+
[scope]="this"
|
|
142
|
+
>
|
|
143
|
+
<ng-template kendoPrefixTemplate>
|
|
144
|
+
<kendo-icon-wrapper
|
|
145
|
+
[name]="'search'"
|
|
146
|
+
[svgIcon]="searchIcon">
|
|
147
|
+
</kendo-icon-wrapper>
|
|
148
|
+
</ng-template>
|
|
149
|
+
</kendo-textbox>
|
|
150
|
+
<kendo-grid-columnlist
|
|
151
|
+
#columnList
|
|
152
|
+
[columns]="columns"
|
|
153
|
+
[filteredColumns]="filteredColumns"
|
|
154
|
+
[ariaLabel]="messageFor('columns')"
|
|
155
|
+
[showSelectAll]="showSelectAll"
|
|
156
|
+
[isLast]="isLast"
|
|
157
|
+
[isFiltered]="isFiltered"
|
|
158
|
+
[filterable]="filterable"
|
|
159
|
+
[isExpanded]="isExpanded"
|
|
160
|
+
[service]="service"
|
|
161
|
+
[applyText]="messageFor('columnsApply')"
|
|
162
|
+
[resetText]="messageFor('columnsReset')"
|
|
163
|
+
[autoSync]="autoSync"
|
|
164
|
+
[allowHideAll]="allowHideAll"
|
|
165
|
+
(columnChange)="onChange($event)"
|
|
166
|
+
>
|
|
167
|
+
</kendo-grid-columnlist>
|
|
168
|
+
<div *ngIf="showCheckedCount" class="k-filter-selected-items">
|
|
169
|
+
{{selectedItemsText}}
|
|
170
|
+
</div>
|
|
171
|
+
<div [ngClass]="actionsClass" *ngIf="!autoSync && !actionSheetOpened">
|
|
172
|
+
<button
|
|
173
|
+
#applyButton
|
|
174
|
+
kendoButton
|
|
175
|
+
type="button"
|
|
176
|
+
icon="check"
|
|
177
|
+
[svgIcon]="checkIcon"
|
|
178
|
+
themeColor="primary"
|
|
179
|
+
(click)="applyChanges()"
|
|
180
|
+
(keydown)="onApplyButtonKeydown($event)"
|
|
181
|
+
>{{ applyText }}</button>
|
|
182
|
+
<button
|
|
183
|
+
#resetButton
|
|
184
|
+
kendoButton
|
|
185
|
+
type="button"
|
|
186
|
+
icon="reset"
|
|
187
|
+
(keydown.tab)="columnList.onTab($event)"
|
|
188
|
+
[svgIcon]="arrowRotateCcwIcon"
|
|
189
|
+
(click)="cancelChanges()"
|
|
190
|
+
>{{ resetText }}</button>
|
|
191
|
+
</div>
|
|
192
|
+
</div>
|
|
193
|
+
</form>
|
|
194
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: ColumnListComponent, selector: "kendo-grid-columnlist", inputs: ["columns", "filteredColumns", "autoSync", "showSelectAll", "isFiltered", "ariaLabel", "allowHideAll", "applyText", "resetText", "isLast", "isExpanded", "service", "filterable"], outputs: ["reset", "apply", "columnChange"] }, { kind: "component", type: TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "type", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "successSvgIcon", "errorIcon", "errorSvgIcon", "clearButtonIcon", "clearButtonSvgIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength", "inputAttributes"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }, { kind: "directive", type: PrefixTemplateDirective, selector: "[kendoPrefixTemplate]", inputs: ["showSeparator"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }] });
|
|
195
|
+
}
|
|
196
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnChooserContentComponent, decorators: [{
|
|
197
|
+
type: Component,
|
|
198
|
+
args: [{
|
|
199
|
+
selector: 'kendo-grid-column-chooser-content',
|
|
200
|
+
template: `
|
|
201
|
+
<form class="k-filter-menu">
|
|
202
|
+
<div class="k-filter-menu-container">
|
|
203
|
+
<kendo-textbox
|
|
204
|
+
#filterInput
|
|
205
|
+
*ngIf="filterable"
|
|
206
|
+
class="k-searchbox"
|
|
207
|
+
(valueChange)="onFilter($event)"
|
|
208
|
+
[kendoEventsOutsideAngular]="{'keydown': onTab}"
|
|
209
|
+
[scope]="this"
|
|
210
|
+
>
|
|
211
|
+
<ng-template kendoPrefixTemplate>
|
|
212
|
+
<kendo-icon-wrapper
|
|
213
|
+
[name]="'search'"
|
|
214
|
+
[svgIcon]="searchIcon">
|
|
215
|
+
</kendo-icon-wrapper>
|
|
216
|
+
</ng-template>
|
|
217
|
+
</kendo-textbox>
|
|
218
|
+
<kendo-grid-columnlist
|
|
219
|
+
#columnList
|
|
220
|
+
[columns]="columns"
|
|
221
|
+
[filteredColumns]="filteredColumns"
|
|
222
|
+
[ariaLabel]="messageFor('columns')"
|
|
223
|
+
[showSelectAll]="showSelectAll"
|
|
224
|
+
[isLast]="isLast"
|
|
225
|
+
[isFiltered]="isFiltered"
|
|
226
|
+
[filterable]="filterable"
|
|
227
|
+
[isExpanded]="isExpanded"
|
|
228
|
+
[service]="service"
|
|
229
|
+
[applyText]="messageFor('columnsApply')"
|
|
230
|
+
[resetText]="messageFor('columnsReset')"
|
|
231
|
+
[autoSync]="autoSync"
|
|
232
|
+
[allowHideAll]="allowHideAll"
|
|
233
|
+
(columnChange)="onChange($event)"
|
|
234
|
+
>
|
|
235
|
+
</kendo-grid-columnlist>
|
|
236
|
+
<div *ngIf="showCheckedCount" class="k-filter-selected-items">
|
|
237
|
+
{{selectedItemsText}}
|
|
238
|
+
</div>
|
|
239
|
+
<div [ngClass]="actionsClass" *ngIf="!autoSync && !actionSheetOpened">
|
|
240
|
+
<button
|
|
241
|
+
#applyButton
|
|
242
|
+
kendoButton
|
|
243
|
+
type="button"
|
|
244
|
+
icon="check"
|
|
245
|
+
[svgIcon]="checkIcon"
|
|
246
|
+
themeColor="primary"
|
|
247
|
+
(click)="applyChanges()"
|
|
248
|
+
(keydown)="onApplyButtonKeydown($event)"
|
|
249
|
+
>{{ applyText }}</button>
|
|
250
|
+
<button
|
|
251
|
+
#resetButton
|
|
252
|
+
kendoButton
|
|
253
|
+
type="button"
|
|
254
|
+
icon="reset"
|
|
255
|
+
(keydown.tab)="columnList.onTab($event)"
|
|
256
|
+
[svgIcon]="arrowRotateCcwIcon"
|
|
257
|
+
(click)="cancelChanges()"
|
|
258
|
+
>{{ resetText }}</button>
|
|
259
|
+
</div>
|
|
260
|
+
</div>
|
|
261
|
+
</form>
|
|
262
|
+
`,
|
|
263
|
+
standalone: true,
|
|
264
|
+
imports: [NgIf, NgClass, ButtonComponent, ColumnListComponent, TextBoxComponent, PrefixTemplateDirective, IconWrapperComponent, EventsOutsideAngularDirective]
|
|
265
|
+
}]
|
|
266
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.ColumnInfoService, decorators: [{
|
|
267
|
+
type: Optional
|
|
268
|
+
}] }, { type: i2.ContextService, decorators: [{
|
|
269
|
+
type: Optional
|
|
270
|
+
}] }]; }, propDecorators: { resetButton: [{
|
|
271
|
+
type: ViewChild,
|
|
272
|
+
args: ['resetButton']
|
|
273
|
+
}], applyButton: [{
|
|
274
|
+
type: ViewChild,
|
|
275
|
+
args: ['applyButton']
|
|
276
|
+
}], columnList: [{
|
|
277
|
+
type: ViewChild,
|
|
278
|
+
args: ['columnList']
|
|
279
|
+
}], filterInput: [{
|
|
280
|
+
type: ViewChild,
|
|
281
|
+
args: ['filterInput']
|
|
282
|
+
}], filterable: [{
|
|
283
|
+
type: Input
|
|
284
|
+
}], showSelectAll: [{
|
|
285
|
+
type: Input
|
|
286
|
+
}], showCheckedCount: [{
|
|
287
|
+
type: Input
|
|
288
|
+
}], allowHideAll: [{
|
|
289
|
+
type: Input
|
|
290
|
+
}], autoSync: [{
|
|
291
|
+
type: Input
|
|
292
|
+
}], actionsClass: [{
|
|
293
|
+
type: Input
|
|
294
|
+
}], closeOnReset: [{
|
|
295
|
+
type: Input
|
|
296
|
+
}], columns: [{
|
|
297
|
+
type: Input
|
|
298
|
+
}], isLast: [{
|
|
299
|
+
type: Input
|
|
300
|
+
}], isExpanded: [{
|
|
301
|
+
type: Input
|
|
302
|
+
}], service: [{
|
|
303
|
+
type: Input
|
|
304
|
+
}], close: [{
|
|
305
|
+
type: Output
|
|
306
|
+
}] } });
|