@progress/kendo-angular-grid 14.1.0-develop.9 → 14.1.1-develop.1
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/column-menu/column-menu-container.component.d.ts +4 -3
- package/column-menu/column-menu-item.component.d.ts +7 -1
- package/column-menu/column-menu-item.directive.d.ts +15 -3
- package/column-menu/column-menu.service.d.ts +5 -0
- package/dragdrop/context-types.d.ts +1 -0
- package/esm2020/column-menu/column-menu-autosize-all.component.mjs +1 -1
- package/esm2020/column-menu/column-menu-autosize.component.mjs +1 -1
- package/esm2020/column-menu/column-menu-chooser.component.mjs +1 -1
- package/esm2020/column-menu/column-menu-container.component.mjs +18 -7
- package/esm2020/column-menu/column-menu-filter.component.mjs +1 -1
- package/esm2020/column-menu/column-menu-item.component.mjs +4 -1
- package/esm2020/column-menu/column-menu-item.directive.mjs +13 -3
- package/esm2020/column-menu/column-menu-lock.component.mjs +1 -1
- package/esm2020/column-menu/column-menu-position.component.mjs +1 -1
- package/esm2020/column-menu/column-menu-sort.component.mjs +1 -1
- package/esm2020/column-menu/column-menu-stick.component.mjs +1 -1
- package/esm2020/column-menu/column-menu.component.mjs +16 -8
- package/esm2020/grid.component.mjs +24 -0
- package/esm2020/grouping/group-panel.component.mjs +213 -23
- package/esm2020/grouping/group.module.mjs +6 -5
- package/esm2020/localization/messages.mjs +5 -1
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/pager/pager.component.mjs +4 -0
- package/fesm2015/progress-kendo-angular-grid.mjs +302 -50
- package/fesm2020/progress-kendo-angular-grid.mjs +298 -50
- package/grouping/group-panel.component.d.ts +25 -4
- package/grouping/group.module.d.ts +2 -1
- package/localization/messages.d.ts +11 -7
- package/package.json +16 -16
- package/schematics/ngAdd/index.js +3 -3
|
@@ -2,27 +2,32 @@
|
|
|
2
2
|
* Copyright © 2023 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 { ChangeDetectionStrategy, Component, EventEmitter, HostBinding, Input, Output, QueryList, ViewChildren, ChangeDetectorRef } from '@angular/core';
|
|
6
|
-
import { Subscription, from, merge } from "rxjs";
|
|
7
|
-
import { and, isNullOrEmptyString, observe, or } from '../utils';
|
|
5
|
+
import { ChangeDetectionStrategy, Component, EventEmitter, HostBinding, Input, Output, QueryList, ViewChildren, ChangeDetectorRef, NgZone, ViewChild, TemplateRef, Renderer2 } from '@angular/core';
|
|
6
|
+
import { Subscription, from, fromEvent, merge } from "rxjs";
|
|
7
|
+
import { and, isNullOrEmptyString, isUniversal, observe, or } from '../utils';
|
|
8
8
|
import { GroupInfoService } from './group-info.service';
|
|
9
9
|
import { DropTargetDirective } from '../dragdrop/drop-target.directive';
|
|
10
10
|
import { DragHintService } from '../dragdrop/drag-hint.service';
|
|
11
11
|
import { DropCueService } from '../dragdrop/drop-cue.service';
|
|
12
12
|
import { position, isTargetBefore } from '../dragdrop/common';
|
|
13
13
|
import { tap, filter, switchMapTo, takeUntil } from 'rxjs/operators';
|
|
14
|
-
import { sortAscSmallIcon, sortDescSmallIcon } from '@progress/kendo-svg-icons';
|
|
14
|
+
import { arrowLeftIcon, arrowRightIcon, sortAscSmallIcon, sortDescSmallIcon } from '@progress/kendo-svg-icons';
|
|
15
15
|
import { ContextService } from '../common/provider.service';
|
|
16
|
+
import { PopupService } from '@progress/kendo-angular-popup';
|
|
17
|
+
import { closest } from '../rendering/common/dom-queries';
|
|
18
|
+
import { Keys } from '@progress/kendo-angular-common';
|
|
16
19
|
import * as i0 from "@angular/core";
|
|
17
20
|
import * as i1 from "../dragdrop/drag-hint.service";
|
|
18
21
|
import * as i2 from "../dragdrop/drop-cue.service";
|
|
19
22
|
import * as i3 from "./group-info.service";
|
|
20
23
|
import * as i4 from "../common/provider.service";
|
|
21
|
-
import * as i5 from "@progress/kendo-angular-
|
|
22
|
-
import * as i6 from "@angular
|
|
23
|
-
import * as i7 from "
|
|
24
|
-
import * as i8 from "
|
|
25
|
-
import * as i9 from "
|
|
24
|
+
import * as i5 from "@progress/kendo-angular-popup";
|
|
25
|
+
import * as i6 from "@progress/kendo-angular-buttons";
|
|
26
|
+
import * as i7 from "@progress/kendo-angular-icons";
|
|
27
|
+
import * as i8 from "@angular/common";
|
|
28
|
+
import * as i9 from "../dragdrop/drop-target.directive";
|
|
29
|
+
import * as i10 from "../dragdrop/draggable-column.directive";
|
|
30
|
+
import * as i11 from "@progress/kendo-angular-common";
|
|
26
31
|
const withoutField = ({ field }) => isNullOrEmptyString(field);
|
|
27
32
|
const alreadyGrouped = ({ groups, field }) => groups.some(group => group.field === field);
|
|
28
33
|
const overSameTarget = ({ target, field }) => target.field === field;
|
|
@@ -35,17 +40,53 @@ const indicatorRules = or(overSameTarget, and(overLastTarget, isLastGroup));
|
|
|
35
40
|
* @hidden
|
|
36
41
|
*/
|
|
37
42
|
export class GroupPanelComponent {
|
|
38
|
-
constructor(hint, cue, groupInfoService, ctx, cd) {
|
|
43
|
+
constructor(hint, cue, groupInfoService, ctx, cd, popupService, ngZone, renderer) {
|
|
39
44
|
this.hint = hint;
|
|
40
45
|
this.cue = cue;
|
|
41
46
|
this.groupInfoService = groupInfoService;
|
|
42
47
|
this.ctx = ctx;
|
|
43
48
|
this.cd = cd;
|
|
49
|
+
this.popupService = popupService;
|
|
50
|
+
this.ngZone = ngZone;
|
|
51
|
+
this.renderer = renderer;
|
|
44
52
|
this.change = new EventEmitter();
|
|
45
53
|
this.groups = [];
|
|
46
54
|
this.dropTargets = new QueryList();
|
|
47
55
|
this.groupTitles = [];
|
|
48
|
-
this.
|
|
56
|
+
this.isChipMenuOpen = false;
|
|
57
|
+
this.rtl = false;
|
|
58
|
+
this.arrowLeftIcon = arrowLeftIcon;
|
|
59
|
+
this.arrowRightIcon = arrowRightIcon;
|
|
60
|
+
this.handleKeyDown = (e) => {
|
|
61
|
+
if (e.keyCode === Keys.ArrowDown || e.keyCode === Keys.ArrowUp) {
|
|
62
|
+
e.preventDefault();
|
|
63
|
+
const relatedItemType = e.target.matches(':first-child') ? 'next' : 'previous';
|
|
64
|
+
this.activateMenuItem(e.target, relatedItemType);
|
|
65
|
+
}
|
|
66
|
+
else if (e.keyCode === Keys.Escape) {
|
|
67
|
+
this.destroyMenu(true);
|
|
68
|
+
}
|
|
69
|
+
else if (e.keyCode === Keys.Tab) {
|
|
70
|
+
this.destroyMenu(true);
|
|
71
|
+
}
|
|
72
|
+
else if (e.keyCode === Keys.Space || e.keyCode === Keys.Enter) {
|
|
73
|
+
this.handleMenuClick(e);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
this.handleClick = (e) => {
|
|
77
|
+
e.preventDefault();
|
|
78
|
+
const menuItemEl = e.target.closest('.k-menu-item');
|
|
79
|
+
if (!menuItemEl.matches('[aria-disabled="true"]')) {
|
|
80
|
+
this.handleMenuClick(e);
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if (menuItemEl.getAttribute('tabindex') === '0') {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
const activeMenuItem = menuItemEl.closest('.k-menu-group').querySelector('[tabindex="0"]');
|
|
87
|
+
const relatedItemType = activeMenuItem.matches(':first-child') ? 'next' : 'previous';
|
|
88
|
+
this.activateMenuItem(activeMenuItem, relatedItemType);
|
|
89
|
+
};
|
|
49
90
|
}
|
|
50
91
|
get groupHeaderClass() {
|
|
51
92
|
return true;
|
|
@@ -56,13 +97,17 @@ export class GroupPanelComponent {
|
|
|
56
97
|
get text() {
|
|
57
98
|
return this.emptyText ? this.emptyText : this.ctx.localization.get('groupPanelEmpty');
|
|
58
99
|
}
|
|
100
|
+
get gridId() {
|
|
101
|
+
return this.ctx.grid?.ariaRootId;
|
|
102
|
+
}
|
|
59
103
|
ngAfterViewInit() {
|
|
104
|
+
this.subscription = this.ctx.localization.changes.subscribe(({ rtl }) => {
|
|
105
|
+
this.rtl = rtl;
|
|
106
|
+
this.cd.markForCheck();
|
|
107
|
+
});
|
|
60
108
|
this.subscription.add(observe(this.dropTargets)
|
|
61
109
|
.subscribe(this.attachTargets.bind(this)));
|
|
62
110
|
}
|
|
63
|
-
ngOnInit() {
|
|
64
|
-
this.subscription.add(this.ctx.localization.changes.subscribe(() => this.cd.markForCheck()));
|
|
65
|
-
}
|
|
66
111
|
ngDoCheck() {
|
|
67
112
|
const currentTitles = this.groups.map(group => this.groupInfoService.groupTitle(group));
|
|
68
113
|
if (currentTitles.length !== this.groupTitles.length || currentTitles.some((current, idx) => current !== this.groupTitles[idx])) {
|
|
@@ -77,6 +122,7 @@ export class GroupPanelComponent {
|
|
|
77
122
|
if (this.targetSubscription) {
|
|
78
123
|
this.targetSubscription.unsubscribe();
|
|
79
124
|
}
|
|
125
|
+
this.destroyMenu();
|
|
80
126
|
}
|
|
81
127
|
messageFor(token) {
|
|
82
128
|
return this.ctx.localization.get(token);
|
|
@@ -106,6 +152,42 @@ export class GroupPanelComponent {
|
|
|
106
152
|
remove(group) {
|
|
107
153
|
this.change.emit(this.groups.filter(x => x.field !== group.field));
|
|
108
154
|
}
|
|
155
|
+
toggleMenu(chip, first, last, field) {
|
|
156
|
+
const anchor = chip.element.nativeElement.querySelector('.k-chip-action');
|
|
157
|
+
if (this.popupRef) {
|
|
158
|
+
const popupAnchor = this.popupRef.popup.instance.anchor;
|
|
159
|
+
this.destroyMenu();
|
|
160
|
+
if (anchor === popupAnchor) {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
this.first = first;
|
|
165
|
+
this.last = last;
|
|
166
|
+
const direction = this.ctx.localization.rtl ? 'right' : 'left';
|
|
167
|
+
this.popupRef = this.popupService.open({
|
|
168
|
+
anchor: anchor,
|
|
169
|
+
content: this.defaultTemplate,
|
|
170
|
+
anchorAlign: { vertical: 'bottom', horizontal: direction },
|
|
171
|
+
popupAlign: { vertical: 'top', horizontal: direction },
|
|
172
|
+
positionMode: 'absolute'
|
|
173
|
+
});
|
|
174
|
+
this.activeItem = this.dropTargets.find(dt => dt.context.field === field);
|
|
175
|
+
this.renderer.setAttribute(this.popupRef.popupElement, 'dir', this.ctx.localization.rtl ? 'rtl' : 'ltr');
|
|
176
|
+
const menuItems = Array.from(this.popupRef.popupElement.querySelectorAll('.k-menu-item'));
|
|
177
|
+
this.activateMenuItem(menuItems[1], 'previous');
|
|
178
|
+
this.popupSubs = this.popupRef.popupAnchorViewportLeave.subscribe(() => {
|
|
179
|
+
this.destroyMenu(true);
|
|
180
|
+
});
|
|
181
|
+
if (isUniversal()) {
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
this.ngZone.runOutsideAngular(() => {
|
|
185
|
+
this.popupSubs.add(fromEvent(document, 'click')
|
|
186
|
+
.pipe(filter((event) => !closest(event.target, (node) => node === this.popupRef.popupElement || (node.matches && node.matches('.k-chip-action'))))).subscribe(() => {
|
|
187
|
+
this.destroyMenu();
|
|
188
|
+
}));
|
|
189
|
+
});
|
|
190
|
+
}
|
|
109
191
|
canDrop(draggable, target) {
|
|
110
192
|
const isIndicator = draggable.type === 'groupIndicator';
|
|
111
193
|
const rules = isIndicator
|
|
@@ -128,7 +210,10 @@ export class GroupPanelComponent {
|
|
|
128
210
|
.reduce((acc, target) => merge(acc, target.leave), from([]));
|
|
129
211
|
const dropStream = this.dropTargets
|
|
130
212
|
.reduce((acc, target) => merge(acc, target.drop), from([]));
|
|
131
|
-
this.targetSubscription.add(enterStream.pipe(tap(_ =>
|
|
213
|
+
this.targetSubscription.add(enterStream.pipe(tap(_ => {
|
|
214
|
+
this.hint.removeLock();
|
|
215
|
+
this.destroyMenu();
|
|
216
|
+
}), filter(({ draggable, target }) => this.canDrop(draggable.context, target.context)), tap(this.enter.bind(this)), switchMapTo(dropStream.pipe(takeUntil(leaveStream.pipe(tap(this.leave.bind(this))))))).subscribe(this.drop.bind(this)));
|
|
132
217
|
}
|
|
133
218
|
enter({ draggable, target }) {
|
|
134
219
|
this.hint.enable();
|
|
@@ -147,9 +232,47 @@ export class GroupPanelComponent {
|
|
|
147
232
|
const index = this.dropTargets.toArray().indexOf(target);
|
|
148
233
|
this.insert(field, index);
|
|
149
234
|
}
|
|
235
|
+
destroyMenu(focusAnchor) {
|
|
236
|
+
if (this.popupRef) {
|
|
237
|
+
this.popupRef.close();
|
|
238
|
+
this.popupRef = null;
|
|
239
|
+
this.popupSubs && this.popupSubs.unsubscribe();
|
|
240
|
+
focusAnchor && this.activeItem.context.target.focus();
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
activateMenuItem(item, relatedItemType) {
|
|
244
|
+
this.renderer.setAttribute(item, 'tabindex', '-1');
|
|
245
|
+
this.renderer.removeClass(item, 'k-focus');
|
|
246
|
+
const relatedItem = item[`${relatedItemType}ElementSibling`];
|
|
247
|
+
this.renderer.setAttribute(relatedItem, 'tabindex', '0');
|
|
248
|
+
this.renderer.addClass(relatedItem, 'k-focus');
|
|
249
|
+
this.ngZone.runOutsideAngular(() => setTimeout(() => relatedItem.focus()));
|
|
250
|
+
}
|
|
251
|
+
handleMenuClick(e) {
|
|
252
|
+
e.preventDefault();
|
|
253
|
+
if (e.target.getAttribute('aria-disabled') !== 'true') {
|
|
254
|
+
const chips = this.dropTargets.toArray().slice(0, this.dropTargets.length - 1);
|
|
255
|
+
let groupChip, groupChipIndex;
|
|
256
|
+
for (let i = 0; i < chips.length; i++) {
|
|
257
|
+
if (chips[i].element.nativeElement === this.popupRef.popup.instance.anchor.closest('.k-chip')) {
|
|
258
|
+
groupChip = chips[i];
|
|
259
|
+
groupChipIndex = i;
|
|
260
|
+
break;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
const isPrev = e.target.closest('.k-menu-item').matches(':first-child');
|
|
264
|
+
if (isPrev && groupChipIndex > 0) {
|
|
265
|
+
this.insert(groupChip.context.field, groupChipIndex - 1);
|
|
266
|
+
}
|
|
267
|
+
else if (!isPrev && groupChipIndex < chips.length - 1) {
|
|
268
|
+
this.insert(groupChip.context.field, groupChipIndex + 1);
|
|
269
|
+
}
|
|
270
|
+
this.destroyMenu(true);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
150
273
|
}
|
|
151
|
-
GroupPanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GroupPanelComponent, deps: [{ token: i1.DragHintService }, { token: i2.DropCueService }, { token: i3.GroupInfoService }, { token: i4.ContextService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
152
|
-
GroupPanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GroupPanelComponent, selector: "kendo-grid-group-panel", inputs: { text: "text", navigable: "navigable", groups: "groups" }, outputs: { change: "change" }, host: { properties: { "class.k-grouping-header": "this.groupHeaderClass" } }, viewQueries: [{ propertyName: "dropTargets", predicate: DropTargetDirective, descendants: true }], ngImport: i0, template: `
|
|
274
|
+
GroupPanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GroupPanelComponent, deps: [{ token: i1.DragHintService }, { token: i2.DropCueService }, { token: i3.GroupInfoService }, { token: i4.ContextService }, { token: i0.ChangeDetectorRef }, { token: i5.PopupService }, { token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
275
|
+
GroupPanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GroupPanelComponent, selector: "kendo-grid-group-panel", inputs: { text: "text", navigable: "navigable", groups: "groups" }, outputs: { change: "change" }, host: { properties: { "class.k-grouping-header": "this.groupHeaderClass" } }, viewQueries: [{ propertyName: "defaultTemplate", first: true, predicate: ["defaultTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "dropTargets", predicate: DropTargetDirective, descendants: true }], ngImport: i0, template: `
|
|
153
276
|
<div
|
|
154
277
|
*ngIf="groups.length === 0"
|
|
155
278
|
class="k-grouping-drop-container"
|
|
@@ -166,7 +289,8 @@ GroupPanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
166
289
|
[navigable]="navigable"
|
|
167
290
|
role="none">
|
|
168
291
|
<kendo-chip
|
|
169
|
-
*ngFor="let group of groups; let index = index;"
|
|
292
|
+
*ngFor="let group of groups; let index = index; let first = first; let last = last;"
|
|
293
|
+
#chip
|
|
170
294
|
kendoDropTarget
|
|
171
295
|
kendoDraggableColumn
|
|
172
296
|
kendoDraggable
|
|
@@ -175,14 +299,21 @@ GroupPanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
175
299
|
[context]="{
|
|
176
300
|
field: group.field,
|
|
177
301
|
type: 'groupIndicator',
|
|
178
|
-
hint: groupTitles[index]
|
|
302
|
+
hint: groupTitles[index],
|
|
303
|
+
target: chip
|
|
179
304
|
}"
|
|
180
305
|
[label]="groupTitles[index]"
|
|
181
306
|
[removable]="true"
|
|
307
|
+
[hasMenu]="true"
|
|
182
308
|
[icon]="getDirectionIcon(group)"
|
|
183
309
|
[svgIcon]="getDirectionSvgIcon(group)"
|
|
310
|
+
[attr.aria-haspopup]="'menu'"
|
|
311
|
+
[attr.aria-expanded]="isChipMenuOpen"
|
|
312
|
+
[attr.aria-controls]="gridId"
|
|
184
313
|
(contentClick)="directionChange(group)"
|
|
185
314
|
(remove)="remove(group)"
|
|
315
|
+
(menuToggle)="toggleMenu(chip, first, last, group.field)"
|
|
316
|
+
(keydown.alt.arrowdown)="$event.preventDefault(); toggleMenu(chip, first, last, group.field)"
|
|
186
317
|
>
|
|
187
318
|
</kendo-chip>
|
|
188
319
|
</kendo-chiplist>
|
|
@@ -195,7 +326,31 @@ GroupPanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
195
326
|
}"
|
|
196
327
|
kendoDropTarget
|
|
197
328
|
> </div>
|
|
198
|
-
|
|
329
|
+
|
|
330
|
+
<ng-template #defaultTemplate>
|
|
331
|
+
<ul unselectable="on" role="menu" class="k-group k-menu-group k-reset k-menu-group-md" [kendoEventsOutsideAngular]="{
|
|
332
|
+
keydown: handleKeyDown,
|
|
333
|
+
click: handleClick
|
|
334
|
+
}">
|
|
335
|
+
<li role="menuitem" unselectable="on" class="k-item k-menu-item" [attr.aria-disabled]="first">
|
|
336
|
+
<span class="k-link k-menu-link" [class.k-disabled]="first">
|
|
337
|
+
<kendo-icon-wrapper
|
|
338
|
+
[name]="rtl ? 'arrow-right' : 'arrow-left'"
|
|
339
|
+
[svgIcon]="rtl ? arrowRightIcon : arrowLeftIcon"></kendo-icon-wrapper>
|
|
340
|
+
<span class="k-menu-link-text">{{messageFor('groupChipMenuPrevious')}}</span>
|
|
341
|
+
</span>
|
|
342
|
+
</li>
|
|
343
|
+
<li role="menuitem" unselectable="on" class="k-item k-menu-item" [attr.aria-disabled]="last">
|
|
344
|
+
<span class="k-link k-menu-link" [class.k-disabled]="last">
|
|
345
|
+
<kendo-icon-wrapper
|
|
346
|
+
[name]="rtl ? 'arrow-left' : 'arrow-right'"
|
|
347
|
+
[svgIcon]="rtl ? arrowLeftIcon : arrowRightIcon"></kendo-icon-wrapper>
|
|
348
|
+
<span class="k-menu-link-text">{{messageFor('groupChipMenuNext')}}</span>
|
|
349
|
+
</span>
|
|
350
|
+
</li>
|
|
351
|
+
</ul>
|
|
352
|
+
</ng-template>
|
|
353
|
+
`, isInline: true, components: [{ type: i6.ChipListComponent, selector: "kendo-chiplist, kendo-chip-list", inputs: ["selection", "size", "role", "navigable"], outputs: ["selectedChange", "remove"] }, { type: i6.ChipComponent, selector: "kendo-chip", inputs: ["label", "icon", "svgIcon", "iconClass", "avatarClass", "selected", "removable", "removeIcon", "removeSvgIcon", "hasMenu", "menuIcon", "menuSvgIcon", "disabled", "size", "rounded", "fillMode", "themeColor"], outputs: ["remove", "menuToggle", "contentClick"] }, { type: i7.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }], directives: [{ type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.DropTargetDirective, selector: "[kendoDropTarget]", inputs: ["context"], outputs: ["enter", "leave", "drop"] }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.DraggableColumnDirective, selector: "[kendoDraggableColumn]", inputs: ["context", "enableDrag"], outputs: ["drag"] }, { type: i11.DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { type: i11.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
199
354
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GroupPanelComponent, decorators: [{
|
|
200
355
|
type: Component,
|
|
201
356
|
args: [{
|
|
@@ -218,7 +373,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
218
373
|
[navigable]="navigable"
|
|
219
374
|
role="none">
|
|
220
375
|
<kendo-chip
|
|
221
|
-
*ngFor="let group of groups; let index = index;"
|
|
376
|
+
*ngFor="let group of groups; let index = index; let first = first; let last = last;"
|
|
377
|
+
#chip
|
|
222
378
|
kendoDropTarget
|
|
223
379
|
kendoDraggableColumn
|
|
224
380
|
kendoDraggable
|
|
@@ -227,14 +383,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
227
383
|
[context]="{
|
|
228
384
|
field: group.field,
|
|
229
385
|
type: 'groupIndicator',
|
|
230
|
-
hint: groupTitles[index]
|
|
386
|
+
hint: groupTitles[index],
|
|
387
|
+
target: chip
|
|
231
388
|
}"
|
|
232
389
|
[label]="groupTitles[index]"
|
|
233
390
|
[removable]="true"
|
|
391
|
+
[hasMenu]="true"
|
|
234
392
|
[icon]="getDirectionIcon(group)"
|
|
235
393
|
[svgIcon]="getDirectionSvgIcon(group)"
|
|
394
|
+
[attr.aria-haspopup]="'menu'"
|
|
395
|
+
[attr.aria-expanded]="isChipMenuOpen"
|
|
396
|
+
[attr.aria-controls]="gridId"
|
|
236
397
|
(contentClick)="directionChange(group)"
|
|
237
398
|
(remove)="remove(group)"
|
|
399
|
+
(menuToggle)="toggleMenu(chip, first, last, group.field)"
|
|
400
|
+
(keydown.alt.arrowdown)="$event.preventDefault(); toggleMenu(chip, first, last, group.field)"
|
|
238
401
|
>
|
|
239
402
|
</kendo-chip>
|
|
240
403
|
</kendo-chiplist>
|
|
@@ -247,9 +410,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
247
410
|
}"
|
|
248
411
|
kendoDropTarget
|
|
249
412
|
> </div>
|
|
413
|
+
|
|
414
|
+
<ng-template #defaultTemplate>
|
|
415
|
+
<ul unselectable="on" role="menu" class="k-group k-menu-group k-reset k-menu-group-md" [kendoEventsOutsideAngular]="{
|
|
416
|
+
keydown: handleKeyDown,
|
|
417
|
+
click: handleClick
|
|
418
|
+
}">
|
|
419
|
+
<li role="menuitem" unselectable="on" class="k-item k-menu-item" [attr.aria-disabled]="first">
|
|
420
|
+
<span class="k-link k-menu-link" [class.k-disabled]="first">
|
|
421
|
+
<kendo-icon-wrapper
|
|
422
|
+
[name]="rtl ? 'arrow-right' : 'arrow-left'"
|
|
423
|
+
[svgIcon]="rtl ? arrowRightIcon : arrowLeftIcon"></kendo-icon-wrapper>
|
|
424
|
+
<span class="k-menu-link-text">{{messageFor('groupChipMenuPrevious')}}</span>
|
|
425
|
+
</span>
|
|
426
|
+
</li>
|
|
427
|
+
<li role="menuitem" unselectable="on" class="k-item k-menu-item" [attr.aria-disabled]="last">
|
|
428
|
+
<span class="k-link k-menu-link" [class.k-disabled]="last">
|
|
429
|
+
<kendo-icon-wrapper
|
|
430
|
+
[name]="rtl ? 'arrow-left' : 'arrow-right'"
|
|
431
|
+
[svgIcon]="rtl ? arrowLeftIcon : arrowRightIcon"></kendo-icon-wrapper>
|
|
432
|
+
<span class="k-menu-link-text">{{messageFor('groupChipMenuNext')}}</span>
|
|
433
|
+
</span>
|
|
434
|
+
</li>
|
|
435
|
+
</ul>
|
|
436
|
+
</ng-template>
|
|
250
437
|
`
|
|
251
438
|
}]
|
|
252
|
-
}], ctorParameters: function () { return [{ type: i1.DragHintService }, { type: i2.DropCueService }, { type: i3.GroupInfoService }, { type: i4.ContextService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { change: [{
|
|
439
|
+
}], ctorParameters: function () { return [{ type: i1.DragHintService }, { type: i2.DropCueService }, { type: i3.GroupInfoService }, { type: i4.ContextService }, { type: i0.ChangeDetectorRef }, { type: i5.PopupService }, { type: i0.NgZone }, { type: i0.Renderer2 }]; }, propDecorators: { change: [{
|
|
253
440
|
type: Output
|
|
254
441
|
}], groupHeaderClass: [{
|
|
255
442
|
type: HostBinding,
|
|
@@ -263,4 +450,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
263
450
|
}], dropTargets: [{
|
|
264
451
|
type: ViewChildren,
|
|
265
452
|
args: [DropTargetDirective]
|
|
453
|
+
}], defaultTemplate: [{
|
|
454
|
+
type: ViewChild,
|
|
455
|
+
args: ['defaultTemplate', { static: true, read: TemplateRef }]
|
|
266
456
|
}] } });
|
|
@@ -12,13 +12,14 @@ import { GroupPanelComponent } from './group-panel.component';
|
|
|
12
12
|
import { SharedModule } from "../shared.module";
|
|
13
13
|
import { DragAndDropModule } from '../dragdrop/drag-and-drop.module';
|
|
14
14
|
import { ChipModule } from '@progress/kendo-angular-buttons';
|
|
15
|
+
import { PopupModule } from '@progress/kendo-angular-popup';
|
|
15
16
|
import * as i0 from "@angular/core";
|
|
16
17
|
const exportedModules = [
|
|
17
18
|
GroupHeaderTemplateDirective,
|
|
18
19
|
GroupHeaderColumnTemplateDirective,
|
|
19
20
|
GroupFooterTemplateDirective,
|
|
20
21
|
GroupHeaderComponent,
|
|
21
|
-
GroupPanelComponent
|
|
22
|
+
GroupPanelComponent,
|
|
22
23
|
];
|
|
23
24
|
/**
|
|
24
25
|
* @hidden
|
|
@@ -37,17 +38,17 @@ GroupModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "1
|
|
|
37
38
|
GroupHeaderColumnTemplateDirective,
|
|
38
39
|
GroupFooterTemplateDirective,
|
|
39
40
|
GroupHeaderComponent,
|
|
40
|
-
GroupPanelComponent], imports: [CommonModule, SharedModule, DragAndDropModule, ChipModule], exports: [GroupHeaderTemplateDirective,
|
|
41
|
+
GroupPanelComponent], imports: [CommonModule, SharedModule, DragAndDropModule, ChipModule, PopupModule], exports: [GroupHeaderTemplateDirective,
|
|
41
42
|
GroupHeaderColumnTemplateDirective,
|
|
42
43
|
GroupFooterTemplateDirective,
|
|
43
44
|
GroupHeaderComponent,
|
|
44
45
|
GroupPanelComponent] });
|
|
45
|
-
GroupModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GroupModule, imports: [[CommonModule, SharedModule, DragAndDropModule, ChipModule]] });
|
|
46
|
+
GroupModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GroupModule, imports: [[CommonModule, SharedModule, DragAndDropModule, ChipModule, PopupModule]] });
|
|
46
47
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GroupModule, decorators: [{
|
|
47
48
|
type: NgModule,
|
|
48
49
|
args: [{
|
|
49
|
-
declarations: [exportedModules],
|
|
50
|
+
declarations: [...exportedModules],
|
|
50
51
|
exports: [exportedModules],
|
|
51
|
-
imports: [CommonModule, SharedModule, DragAndDropModule, ChipModule]
|
|
52
|
+
imports: [CommonModule, SharedModule, DragAndDropModule, ChipModule, PopupModule]
|
|
52
53
|
}]
|
|
53
54
|
}] });
|
|
@@ -11,7 +11,7 @@ import * as i0 from "@angular/core";
|
|
|
11
11
|
export class GridMessages extends ComponentMessages {
|
|
12
12
|
}
|
|
13
13
|
GridMessages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GridMessages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
14
|
-
GridMessages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: GridMessages, selector: "kendo-grid-messages-base", inputs: { groupPanelEmpty: "groupPanelEmpty", noRecords: "noRecords", pagerLabel: "pagerLabel", pagerFirstPage: "pagerFirstPage", pagerLastPage: "pagerLastPage", pagerPreviousPage: "pagerPreviousPage", pagerNextPage: "pagerNextPage", pagerPage: "pagerPage", pagerItemsPerPage: "pagerItemsPerPage", pagerOf: "pagerOf", pagerItems: "pagerItems", pagerPageNumberInputTitle: "pagerPageNumberInputTitle", selectPage: "selectPage", filter: "filter", filterInputLabel: "filterInputLabel", filterMenuTitle: "filterMenuTitle", filterMenuOperatorsDropDownLabel: "filterMenuOperatorsDropDownLabel", filterMenuLogicDropDownLabel: "filterMenuLogicDropDownLabel", filterCellOperatorLabel: "filterCellOperatorLabel", booleanFilterCellLabel: "booleanFilterCellLabel", filterEqOperator: "filterEqOperator", filterNotEqOperator: "filterNotEqOperator", filterIsNullOperator: "filterIsNullOperator", filterIsNotNullOperator: "filterIsNotNullOperator", filterIsEmptyOperator: "filterIsEmptyOperator", filterIsNotEmptyOperator: "filterIsNotEmptyOperator", filterStartsWithOperator: "filterStartsWithOperator", filterContainsOperator: "filterContainsOperator", filterNotContainsOperator: "filterNotContainsOperator", filterEndsWithOperator: "filterEndsWithOperator", filterGteOperator: "filterGteOperator", filterGtOperator: "filterGtOperator", filterLteOperator: "filterLteOperator", filterLtOperator: "filterLtOperator", filterIsTrue: "filterIsTrue", filterIsFalse: "filterIsFalse", filterBooleanAll: "filterBooleanAll", filterAfterOrEqualOperator: "filterAfterOrEqualOperator", filterAfterOperator: "filterAfterOperator", filterBeforeOperator: "filterBeforeOperator", filterBeforeOrEqualOperator: "filterBeforeOrEqualOperator", filterFilterButton: "filterFilterButton", filterClearButton: "filterClearButton", filterAndLogic: "filterAndLogic", filterOrLogic: "filterOrLogic", loading: "loading", gridLabel: "gridLabel", columnMenu: "columnMenu", setColumnPosition: "setColumnPosition", columns: "columns", lock: "lock", unlock: "unlock", stick: "stick", unstick: "unstick", sortable: "sortable", sortAscending: "sortAscending", sortDescending: "sortDescending", autosizeThisColumn: "autosizeThisColumn", autosizeAllColumns: "autosizeAllColumns", sortedAscending: "sortedAscending", sortedDescending: "sortedDescending", sortedDefault: "sortedDefault", columnsApply: "columnsApply", columnsReset: "columnsReset", detailExpand: "detailExpand", detailCollapse: "detailCollapse", filterDateToday: "filterDateToday", filterDateToggle: "filterDateToggle", filterNumericDecrement: "filterNumericDecrement", filterNumericIncrement: "filterNumericIncrement", selectionCheckboxLabel: "selectionCheckboxLabel", selectAllCheckboxLabel: "selectAllCheckboxLabel", groupCollapse: "groupCollapse", groupExpand: "groupExpand", topToolbarLabel: "topToolbarLabel", bottomToolbarLabel: "bottomToolbarLabel", groupPanelLabel: "groupPanelLabel", dragRowHandleLabel: "dragRowHandleLabel", columnMenuFilterTabTitle: "columnMenuFilterTabTitle", columnMenuGeneralTabTitle: "columnMenuGeneralTabTitle", columnMenuColumnsTabTitle: "columnMenuColumnsTabTitle" }, usesInheritance: true, ngImport: i0 });
|
|
14
|
+
GridMessages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: GridMessages, selector: "kendo-grid-messages-base", inputs: { groupPanelEmpty: "groupPanelEmpty", noRecords: "noRecords", pagerLabel: "pagerLabel", pagerFirstPage: "pagerFirstPage", pagerLastPage: "pagerLastPage", pagerPreviousPage: "pagerPreviousPage", pagerNextPage: "pagerNextPage", pagerPage: "pagerPage", pagerItemsPerPage: "pagerItemsPerPage", pagerOf: "pagerOf", pagerItems: "pagerItems", pagerPageNumberInputTitle: "pagerPageNumberInputTitle", selectPage: "selectPage", filter: "filter", filterInputLabel: "filterInputLabel", filterMenuTitle: "filterMenuTitle", filterMenuOperatorsDropDownLabel: "filterMenuOperatorsDropDownLabel", filterMenuLogicDropDownLabel: "filterMenuLogicDropDownLabel", filterCellOperatorLabel: "filterCellOperatorLabel", booleanFilterCellLabel: "booleanFilterCellLabel", filterEqOperator: "filterEqOperator", filterNotEqOperator: "filterNotEqOperator", filterIsNullOperator: "filterIsNullOperator", filterIsNotNullOperator: "filterIsNotNullOperator", filterIsEmptyOperator: "filterIsEmptyOperator", filterIsNotEmptyOperator: "filterIsNotEmptyOperator", filterStartsWithOperator: "filterStartsWithOperator", filterContainsOperator: "filterContainsOperator", filterNotContainsOperator: "filterNotContainsOperator", filterEndsWithOperator: "filterEndsWithOperator", filterGteOperator: "filterGteOperator", filterGtOperator: "filterGtOperator", filterLteOperator: "filterLteOperator", filterLtOperator: "filterLtOperator", filterIsTrue: "filterIsTrue", filterIsFalse: "filterIsFalse", filterBooleanAll: "filterBooleanAll", filterAfterOrEqualOperator: "filterAfterOrEqualOperator", filterAfterOperator: "filterAfterOperator", filterBeforeOperator: "filterBeforeOperator", filterBeforeOrEqualOperator: "filterBeforeOrEqualOperator", filterFilterButton: "filterFilterButton", filterClearButton: "filterClearButton", filterAndLogic: "filterAndLogic", filterOrLogic: "filterOrLogic", loading: "loading", gridLabel: "gridLabel", columnMenu: "columnMenu", setColumnPosition: "setColumnPosition", columns: "columns", lock: "lock", unlock: "unlock", stick: "stick", unstick: "unstick", sortable: "sortable", sortAscending: "sortAscending", sortDescending: "sortDescending", autosizeThisColumn: "autosizeThisColumn", autosizeAllColumns: "autosizeAllColumns", sortedAscending: "sortedAscending", sortedDescending: "sortedDescending", sortedDefault: "sortedDefault", columnsApply: "columnsApply", columnsReset: "columnsReset", detailExpand: "detailExpand", detailCollapse: "detailCollapse", filterDateToday: "filterDateToday", filterDateToggle: "filterDateToggle", filterNumericDecrement: "filterNumericDecrement", filterNumericIncrement: "filterNumericIncrement", selectionCheckboxLabel: "selectionCheckboxLabel", selectAllCheckboxLabel: "selectAllCheckboxLabel", groupCollapse: "groupCollapse", groupExpand: "groupExpand", topToolbarLabel: "topToolbarLabel", bottomToolbarLabel: "bottomToolbarLabel", groupPanelLabel: "groupPanelLabel", dragRowHandleLabel: "dragRowHandleLabel", columnMenuFilterTabTitle: "columnMenuFilterTabTitle", columnMenuGeneralTabTitle: "columnMenuGeneralTabTitle", columnMenuColumnsTabTitle: "columnMenuColumnsTabTitle", groupChipMenuPrevious: "groupChipMenuPrevious", groupChipMenuNext: "groupChipMenuNext" }, usesInheritance: true, ngImport: i0 });
|
|
15
15
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GridMessages, decorators: [{
|
|
16
16
|
type: Directive,
|
|
17
17
|
args: [{
|
|
@@ -180,4 +180,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
180
180
|
type: Input
|
|
181
181
|
}], columnMenuColumnsTabTitle: [{
|
|
182
182
|
type: Input
|
|
183
|
+
}], groupChipMenuPrevious: [{
|
|
184
|
+
type: Input
|
|
185
|
+
}], groupChipMenuNext: [{
|
|
186
|
+
type: Input
|
|
183
187
|
}] } });
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-grid',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
13
|
-
version: '14.1.
|
|
12
|
+
publishDate: 1699865049,
|
|
13
|
+
version: '14.1.1-develop.1',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
15
15
|
};
|
|
@@ -154,21 +154,25 @@ export class PagerComponent {
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
navigateToPreviousPage(e) {
|
|
157
|
+
e.preventDefault();
|
|
157
158
|
if (this.shouldTriggerPageChange(e.target, this.currentPage > 1)) {
|
|
158
159
|
this.pagerContext.prevPage();
|
|
159
160
|
}
|
|
160
161
|
}
|
|
161
162
|
navigateToNextPage(e) {
|
|
163
|
+
e.preventDefault();
|
|
162
164
|
if (this.shouldTriggerPageChange(e.target, this.currentPage < this.totalPages)) {
|
|
163
165
|
this.pagerContext.nextPage();
|
|
164
166
|
}
|
|
165
167
|
}
|
|
166
168
|
navigateToFirstPage(e) {
|
|
169
|
+
e.preventDefault();
|
|
167
170
|
if (this.shouldTriggerPageChange(e.target, this.currentPage > 1)) {
|
|
168
171
|
this.pagerContext.changePage(0);
|
|
169
172
|
}
|
|
170
173
|
}
|
|
171
174
|
navigateToLastPage(e) {
|
|
175
|
+
e.preventDefault();
|
|
172
176
|
if (this.shouldTriggerPageChange(e.target, this.currentPage < this.totalPages)) {
|
|
173
177
|
this.pagerContext.changePage(this.totalPages - 1);
|
|
174
178
|
}
|