@progress/kendo-angular-grid 7.2.5-dev.202208151739 → 7.3.0-dev.202209071125
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/bundles/kendo-angular-grid.umd.js +1 -1
- package/column-menu/column-menu.service.d.ts +1 -1
- package/column-resizing/column-handle.directive.d.ts +1 -0
- package/columns/column-base.d.ts +8 -2
- package/columns/column-group.component.d.ts +4 -0
- package/esm2015/column-menu/column-menu-sort.component.js +4 -4
- package/esm2015/column-menu/column-menu.component.js +2 -2
- package/esm2015/column-menu/column-menu.service.js +1 -1
- package/esm2015/column-resizing/column-handle.directive.js +24 -3
- package/esm2015/columns/column-base.js +5 -2
- package/esm2015/dragdrop/draggable-column.directive.js +2 -2
- package/esm2015/filtering/menu/filter-menu.component.js +2 -2
- package/esm2015/grid.component.js +3 -1
- package/esm2015/grouping/group-header.component.js +2 -2
- package/esm2015/grouping/group-indicator.component.js +6 -6
- package/esm2015/package-metadata.js +1 -1
- package/esm2015/pager/pager-next-buttons.component.js +4 -4
- package/esm2015/pager/pager-prev-buttons.component.js +4 -4
- package/esm2015/rendering/common/col-group.component.js +24 -3
- package/esm2015/rendering/header/header.component.js +110 -84
- package/esm2015/rendering/list.component.js +13 -6
- package/esm2015/rendering/table-body.component.js +4 -4
- package/fesm2015/kendo-angular-grid.js +210 -131
- package/package.json +1 -1
- package/rendering/common/col-group.component.d.ts +7 -2
- package/rendering/list.component.d.ts +3 -2
|
@@ -17,7 +17,7 @@ import * as i0 from "@angular/core";
|
|
|
17
17
|
* template: `
|
|
18
18
|
* <kendo-grid [data]="data" [columnMenu]="true">
|
|
19
19
|
* <ng-template kendoGridColumnMenuTemplate let-service="service">
|
|
20
|
-
* <span class="k-icon k-i-
|
|
20
|
+
* <span class="k-icon k-i-x" (click)="service.close()"
|
|
21
21
|
* style="position: absolute; right: 5px; top: 5px;cursor: pointer;"></span>
|
|
22
22
|
* <kendo-grid-columnmenu-sort [service]="service">
|
|
23
23
|
* </kendo-grid-columnmenu-sort>
|
|
@@ -38,6 +38,7 @@ export declare class ColumnHandleDirective implements OnInit, OnDestroy {
|
|
|
38
38
|
private sizeToFit;
|
|
39
39
|
private updateWidth;
|
|
40
40
|
private columnsForLevel;
|
|
41
|
+
private getTableDelta;
|
|
41
42
|
static ɵfac: i0.ɵɵFactoryDeclaration<ColumnHandleDirective, [{ host: true; }, null, null, null, null, null, null]>;
|
|
42
43
|
static ɵdir: i0.ɵɵDirectiveDeclaration<ColumnHandleDirective, "[kendoGridColumnHandle]", never, { "columns": "columns"; "column": "column"; }, {}, never>;
|
|
43
44
|
}
|
package/columns/column-base.d.ts
CHANGED
|
@@ -59,9 +59,15 @@ export declare class ColumnBase {
|
|
|
59
59
|
*/
|
|
60
60
|
reorderable: boolean;
|
|
61
61
|
/**
|
|
62
|
-
* The width (in pixels) below which the user is not able to resize the column by using the UI.
|
|
62
|
+
* The width (in pixels) below which the user is not able to resize the column by using the UI ([see example]({% slug resizing_columns_grid %}#toc-limiting-the-resizing)).
|
|
63
|
+
* @default 10
|
|
63
64
|
*/
|
|
64
65
|
minResizableWidth: number;
|
|
66
|
+
/**
|
|
67
|
+
* The width (in pixels) above which the user is not able to resize the column by using the UI ([see example]({% slug resizing_columns_grid %}#toc-limiting-the-resizing)).
|
|
68
|
+
* By default, the maximum width is not restricted.
|
|
69
|
+
*/
|
|
70
|
+
maxResizableWidth: number;
|
|
65
71
|
/**
|
|
66
72
|
* The title of the column.
|
|
67
73
|
*/
|
|
@@ -618,5 +624,5 @@ export declare class ColumnBase {
|
|
|
618
624
|
*/
|
|
619
625
|
constructor(parent?: ColumnBase, idService?: IdService);
|
|
620
626
|
static ɵfac: i0.ɵɵFactoryDeclaration<ColumnBase, never>;
|
|
621
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ColumnBase, "kendo-grid-column-base", never, { "resizable": "resizable"; "reorderable": "reorderable"; "minResizableWidth": "minResizableWidth"; "title": "title"; "width": "width"; "autoSize": "autoSize"; "locked": "locked"; "sticky": "sticky"; "hidden": "hidden"; "media": "media"; "lockable": "lockable"; "stickable": "stickable"; "columnMenu": "columnMenu"; "includeInChooser": "includeInChooser"; "style": "style"; "headerStyle": "headerStyle"; "filterStyle": "filterStyle"; "footerStyle": "footerStyle"; "cssClass": "class"; "headerClass": "headerClass"; "filterClass": "filterClass"; "footerClass": "footerClass"; }, {}, ["footerTemplate", "headerTemplates", "columnMenuTemplates"], never>;
|
|
627
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ColumnBase, "kendo-grid-column-base", never, { "resizable": "resizable"; "reorderable": "reorderable"; "minResizableWidth": "minResizableWidth"; "maxResizableWidth": "maxResizableWidth"; "title": "title"; "width": "width"; "autoSize": "autoSize"; "locked": "locked"; "sticky": "sticky"; "hidden": "hidden"; "media": "media"; "lockable": "lockable"; "stickable": "stickable"; "columnMenu": "columnMenu"; "includeInChooser": "includeInChooser"; "style": "style"; "headerStyle": "headerStyle"; "filterStyle": "filterStyle"; "footerStyle": "footerStyle"; "cssClass": "class"; "headerClass": "headerClass"; "filterClass": "filterClass"; "footerClass": "footerClass"; }, {}, ["footerTemplate", "headerTemplates", "columnMenuTemplates"], never>;
|
|
622
628
|
}
|
|
@@ -82,13 +82,13 @@ ColumnMenuSortComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0",
|
|
|
82
82
|
ColumnMenuSortComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ColumnMenuSortComponent, selector: "kendo-grid-columnmenu-sort", usesInheritance: true, ngImport: i0, template: `
|
|
83
83
|
<kendo-grid-columnmenu-item
|
|
84
84
|
[text]="localization.get('sortAscending')"
|
|
85
|
-
icon="sort-asc-
|
|
85
|
+
icon="sort-asc-small"
|
|
86
86
|
(itemClick)="toggleSort('asc')"
|
|
87
87
|
[selected]="sortedAsc">
|
|
88
88
|
</kendo-grid-columnmenu-item>
|
|
89
89
|
<kendo-grid-columnmenu-item
|
|
90
90
|
[text]="localization.get('sortDescending')"
|
|
91
|
-
icon="sort-desc-
|
|
91
|
+
icon="sort-desc-small"
|
|
92
92
|
(itemClick)="toggleSort('desc')"
|
|
93
93
|
[selected]="sortedDesc">
|
|
94
94
|
</kendo-grid-columnmenu-item>
|
|
@@ -100,13 +100,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
100
100
|
template: `
|
|
101
101
|
<kendo-grid-columnmenu-item
|
|
102
102
|
[text]="localization.get('sortAscending')"
|
|
103
|
-
icon="sort-asc-
|
|
103
|
+
icon="sort-asc-small"
|
|
104
104
|
(itemClick)="toggleSort('asc')"
|
|
105
105
|
[selected]="sortedAsc">
|
|
106
106
|
</kendo-grid-columnmenu-item>
|
|
107
107
|
<kendo-grid-columnmenu-item
|
|
108
108
|
[text]="localization.get('sortDescending')"
|
|
109
|
-
icon="sort-desc-
|
|
109
|
+
icon="sort-desc-small"
|
|
110
110
|
(itemClick)="toggleSort('desc')"
|
|
111
111
|
[selected]="sortedDesc">
|
|
112
112
|
</kendo-grid-columnmenu-item>
|
|
@@ -167,7 +167,7 @@ ColumnMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
167
167
|
MenuTabbingService
|
|
168
168
|
], viewQueries: [{ propertyName: "anchor", first: true, predicate: ["anchor"], descendants: true, static: true }, { propertyName: "template", first: true, predicate: ["template"], descendants: true, read: TemplateRef, static: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
169
169
|
<a #anchor
|
|
170
|
-
class="k-grid-
|
|
170
|
+
class="k-grid-header-menu k-grid-column-menu"
|
|
171
171
|
[ngClass]="{ 'k-active': isActive }"
|
|
172
172
|
(click)="toggle($event, anchor, template)"
|
|
173
173
|
(keydown.enter)="$event.stopImmediatePropagation()"
|
|
@@ -228,7 +228,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
228
228
|
selector: 'kendo-grid-column-menu',
|
|
229
229
|
template: `
|
|
230
230
|
<a #anchor
|
|
231
|
-
class="k-grid-
|
|
231
|
+
class="k-grid-header-menu k-grid-column-menu"
|
|
232
232
|
[ngClass]="{ 'k-active': isActive }"
|
|
233
233
|
(click)="toggle($event, anchor, template)"
|
|
234
234
|
(keydown.enter)="$event.stopImmediatePropagation()"
|
|
@@ -17,7 +17,7 @@ import * as i1 from "./../filtering/menu/menu-tabbing.service";
|
|
|
17
17
|
* template: `
|
|
18
18
|
* <kendo-grid [data]="data" [columnMenu]="true">
|
|
19
19
|
* <ng-template kendoGridColumnMenuTemplate let-service="service">
|
|
20
|
-
* <span class="k-icon k-i-
|
|
20
|
+
* <span class="k-icon k-i-x" (click)="service.close()"
|
|
21
21
|
* style="position: absolute; right: 5px; top: 5px;cursor: pointer;"></span>
|
|
22
22
|
* <kendo-grid-columnmenu-sort [service]="service">
|
|
23
23
|
* </kendo-grid-columnmenu-sort>
|
|
@@ -172,9 +172,11 @@ export class ColumnHandleDirective {
|
|
|
172
172
|
if (isTruthy(this.rtl)) {
|
|
173
173
|
delta *= -1;
|
|
174
174
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
175
|
+
let newWidth = Math.max(this.column.resizeStartWidth + delta, this.column.minResizableWidth);
|
|
176
|
+
if (isPresent(this.column.maxResizableWidth)) {
|
|
177
|
+
newWidth = Math.min(newWidth, this.column.maxResizableWidth);
|
|
178
|
+
}
|
|
179
|
+
const tableDelta = this.getTableDelta(newWidth, delta);
|
|
178
180
|
this.updateWidth(this.column, newWidth);
|
|
179
181
|
this.service.resizeTable(this.column, tableDelta);
|
|
180
182
|
}
|
|
@@ -199,6 +201,25 @@ export class ColumnHandleDirective {
|
|
|
199
201
|
columnsForLevel(level) {
|
|
200
202
|
return columnsToRender(this.columns ? this.columns.filter(column => column.level === level) : []);
|
|
201
203
|
}
|
|
204
|
+
getTableDelta(newWidth, delta) {
|
|
205
|
+
const minWidth = this.column.minResizableWidth;
|
|
206
|
+
const maxWidth = this.column.maxResizableWidth;
|
|
207
|
+
const startWidth = this.column.resizeStartWidth;
|
|
208
|
+
const isAboveMin = newWidth > minWidth;
|
|
209
|
+
const isBelowMax = newWidth < maxWidth;
|
|
210
|
+
const isInBoundaries = isPresent(maxWidth) ?
|
|
211
|
+
isAboveMin && isBelowMax :
|
|
212
|
+
isAboveMin;
|
|
213
|
+
if (isInBoundaries) {
|
|
214
|
+
return delta;
|
|
215
|
+
}
|
|
216
|
+
else if (newWidth <= minWidth) {
|
|
217
|
+
return minWidth - startWidth;
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
return startWidth - maxWidth;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
202
223
|
}
|
|
203
224
|
ColumnHandleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ColumnHandleDirective, deps: [{ token: i1.DraggableDirective, host: true }, { token: i0.ElementRef }, { token: i2.ColumnResizingService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i3.LocalizationService }, { token: i4.ColumnInfoService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
204
225
|
ColumnHandleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ColumnHandleDirective, selector: "[kendoGridColumnHandle]", inputs: { columns: "columns", column: "column" }, host: { listeners: { "dblclick": "autoFit()" }, properties: { "style.display": "this.visible", "style.left": "this.leftStyle", "style.right": "this.rightStyle" } }, ngImport: i0 });
|
|
@@ -55,7 +55,8 @@ export class ColumnBase {
|
|
|
55
55
|
*/
|
|
56
56
|
this.reorderable = true;
|
|
57
57
|
/**
|
|
58
|
-
* The width (in pixels) below which the user is not able to resize the column by using the UI.
|
|
58
|
+
* The width (in pixels) below which the user is not able to resize the column by using the UI ([see example]({% slug resizing_columns_grid %}#toc-limiting-the-resizing)).
|
|
59
|
+
* @default 10
|
|
59
60
|
*/
|
|
60
61
|
this.minResizableWidth = 10;
|
|
61
62
|
this._locked = false;
|
|
@@ -232,7 +233,7 @@ export class ColumnBase {
|
|
|
232
233
|
}
|
|
233
234
|
}
|
|
234
235
|
ColumnBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ColumnBase, deps: [{ token: ColumnBase }, { token: i1.IdService }], target: i0.ɵɵFactoryTarget.Component });
|
|
235
|
-
ColumnBase.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ColumnBase, selector: "kendo-grid-column-base", inputs: { resizable: "resizable", reorderable: "reorderable", minResizableWidth: "minResizableWidth", title: "title", width: "width", autoSize: "autoSize", locked: "locked", sticky: "sticky", hidden: "hidden", media: "media", lockable: "lockable", stickable: "stickable", columnMenu: "columnMenu", includeInChooser: "includeInChooser", style: "style", headerStyle: "headerStyle", filterStyle: "filterStyle", footerStyle: "footerStyle", cssClass: ["class", "cssClass"], headerClass: "headerClass", filterClass: "filterClass", footerClass: "footerClass" }, queries: [{ propertyName: "footerTemplate", first: true, predicate: FooterTemplateDirective, descendants: true }, { propertyName: "headerTemplates", predicate: HeaderTemplateDirective }, { propertyName: "columnMenuTemplates", predicate: ColumnMenuTemplateDirective }], ngImport: i0, template: ``, isInline: true });
|
|
236
|
+
ColumnBase.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ColumnBase, selector: "kendo-grid-column-base", inputs: { resizable: "resizable", reorderable: "reorderable", minResizableWidth: "minResizableWidth", maxResizableWidth: "maxResizableWidth", title: "title", width: "width", autoSize: "autoSize", locked: "locked", sticky: "sticky", hidden: "hidden", media: "media", lockable: "lockable", stickable: "stickable", columnMenu: "columnMenu", includeInChooser: "includeInChooser", style: "style", headerStyle: "headerStyle", filterStyle: "filterStyle", footerStyle: "footerStyle", cssClass: ["class", "cssClass"], headerClass: "headerClass", filterClass: "filterClass", footerClass: "footerClass" }, queries: [{ propertyName: "footerTemplate", first: true, predicate: FooterTemplateDirective, descendants: true }, { propertyName: "headerTemplates", predicate: HeaderTemplateDirective }, { propertyName: "columnMenuTemplates", predicate: ColumnMenuTemplateDirective }], ngImport: i0, template: ``, isInline: true });
|
|
236
237
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ColumnBase, decorators: [{
|
|
237
238
|
type: Component,
|
|
238
239
|
args: [{
|
|
@@ -245,6 +246,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
245
246
|
type: Input
|
|
246
247
|
}], minResizableWidth: [{
|
|
247
248
|
type: Input
|
|
249
|
+
}], maxResizableWidth: [{
|
|
250
|
+
type: Input
|
|
248
251
|
}], title: [{
|
|
249
252
|
type: Input
|
|
250
253
|
}], width: [{
|
|
@@ -18,8 +18,8 @@ import * as i5 from "../navigation/navigation.service";
|
|
|
18
18
|
*/
|
|
19
19
|
const preventOnDblClick = release => mouseDown => of(mouseDown).pipe(delay(150), takeUntil(release));
|
|
20
20
|
const hasClass = className => el => new RegExp(`(^| )${className}( |$)`).test(el.className);
|
|
21
|
-
const isDeleteButton = or(hasClass('k-i-
|
|
22
|
-
const isSortIcon = or(hasClass('k-i-sort-asc-
|
|
21
|
+
const isDeleteButton = or(hasClass('k-i-x'), hasClass('k-icon-button'));
|
|
22
|
+
const isSortIcon = or(hasClass('k-i-sort-asc-small'), hasClass('k-i-sort-desc-small'));
|
|
23
23
|
const skipButtons = and(not(isDeleteButton), not(isSortIcon), not(isFocusableWithTabKey), not(matchesNodeName('label')));
|
|
24
24
|
const elementUnderCursor = ({ clientX, clientY }) => document.elementFromPoint(clientX, clientY);
|
|
25
25
|
const hideThenShow = (element, cont) => {
|
|
@@ -59,7 +59,7 @@ export class FilterMenuComponent {
|
|
|
59
59
|
FilterMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterMenuComponent, deps: [{ token: i1.FilterService }, { token: i2.SinglePopupService }, { token: i3.LocalizationService }, { token: i4.NavigationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
60
60
|
FilterMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilterMenuComponent, 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: `
|
|
61
61
|
<a #anchor
|
|
62
|
-
[ngClass]="{'k-grid-filter':true, 'k-active': hasFilters}"
|
|
62
|
+
[ngClass]="{'k-grid-filter-menu':true, 'k-grid-header-menu':true, 'k-active': hasFilters}"
|
|
63
63
|
[tabindex]="tabIndex"
|
|
64
64
|
(click)="toggle(anchor, template)"
|
|
65
65
|
(keydown.enter)="$event.stopImmediatePropagation()"
|
|
@@ -84,7 +84,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
84
84
|
selector: 'kendo-grid-filter-menu',
|
|
85
85
|
template: `
|
|
86
86
|
<a #anchor
|
|
87
|
-
[ngClass]="{'k-grid-filter':true, 'k-active': hasFilters}"
|
|
87
|
+
[ngClass]="{'k-grid-filter-menu':true, 'k-grid-header-menu':true, 'k-active': hasFilters}"
|
|
88
88
|
[tabindex]="tabIndex"
|
|
89
89
|
(click)="toggle(anchor, template)"
|
|
90
90
|
(keydown.enter)="$event.stopImmediatePropagation()"
|
|
@@ -2501,6 +2501,7 @@ GridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
|
|
|
2501
2501
|
kendoDraggable
|
|
2502
2502
|
kendoGridSelectionMarquee
|
|
2503
2503
|
[enableDrag]="marqueeSelection"
|
|
2504
|
+
[sort]="sort"
|
|
2504
2505
|
>
|
|
2505
2506
|
</kendo-grid-list>
|
|
2506
2507
|
<div
|
|
@@ -2614,7 +2615,7 @@ GridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
|
|
|
2614
2615
|
(pageChange)="notifyPageChange('pager', $event)">
|
|
2615
2616
|
</kendo-pager>
|
|
2616
2617
|
<kendo-grid-toolbar class="k-toolbar k-grid-toolbar k-grid-toolbar-bottom" *ngIf="showBottomToolbar" position="bottom"></kendo-grid-toolbar>
|
|
2617
|
-
`, isInline: true, components: [{ type: i23.ToolbarComponent, selector: "kendo-grid-toolbar", inputs: ["position"] }, { type: i24.PagerComponent, selector: "kendo-pager", inputs: ["total", "skip", "pageSize", "options", "template"], outputs: ["pageChange"] }, { type: i25.GroupPanelComponent, selector: "kendo-grid-group-panel", inputs: ["text", "groups"], outputs: ["change"] }, { type: i26.ColGroupComponent, selector: "[kendoGridColGroup]", inputs: ["columns", "groups", "detailTemplate"] }, { type: i27.HeaderComponent, selector: "[kendoGridHeader]", inputs: ["totalColumnLevels", "columns", "groups", "detailTemplate", "scrollable", "filterable", "sort", "filter", "sortable", "groupable", "lockedColumnsCount", "resizable", "reorderable", "columnMenu", "columnMenuTemplate", "totalColumnsCount", "tabIndex"] }, { type: i28.ListComponent, selector: "kendo-grid-list", inputs: ["data", "groups", "total", "rowHeight", "stickyRowHeight", "detailRowHeight", "take", "skip", "columns", "detailTemplate", "noRecordsTemplate", "selectable", "groupable", "filterable", "rowClass", "rowSticky", "loading", "trackBy", "virtualColumns", "isVirtual", "cellLoadingTemplate", "loadingTemplate"], outputs: ["contentScroll", "pageChange", "scrollBottom"] }, { type: i29.FooterComponent, selector: "[kendoGridFooter]", inputs: ["columns", "groups", "detailTemplate", "scrollable", "lockedColumnsCount", "logicalRowIndex"] }, { type: i30.TableBodyComponent, selector: "[kendoGridTableBody]", inputs: ["columns", "allColumns", "groups", "detailTemplate", "noRecordsTemplate", "data", "skip", "selectable", "filterable", "noRecordsText", "isLocked", "isLoading", "isVirtual", "cellLoadingTemplate", "skipGroupDecoration", "showGroupFooters", "lockedColumnsCount", "totalColumnsCount", "virtualColumns", "trackBy", "rowSticky", "rowClass"] }, { type: i31.LoadingComponent, selector: "[kendoGridLoading]", inputs: ["loadingTemplate"] }], directives: [{ type: i32.LocalizedMessagesDirective, selector: "[kendoGridLocalizedMessages]" }, { type: i33.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i34.TableDirective, selector: "table", inputs: ["locked", "virtualColumns"] }, { type: i35.ResizableContainerDirective, selector: "[kendoGridResizableContainer]", inputs: ["lockedWidth", "kendoGridResizableContainer"] }, { type: i36.DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { type: i37.GridMarqueeDirective, selector: "[kendoGridSelectionMarquee]" }], encapsulation: i0.ViewEncapsulation.None });
|
|
2618
|
+
`, isInline: true, components: [{ type: i23.ToolbarComponent, selector: "kendo-grid-toolbar", inputs: ["position"] }, { type: i24.PagerComponent, selector: "kendo-pager", inputs: ["total", "skip", "pageSize", "options", "template"], outputs: ["pageChange"] }, { type: i25.GroupPanelComponent, selector: "kendo-grid-group-panel", inputs: ["text", "groups"], outputs: ["change"] }, { type: i26.ColGroupComponent, selector: "[kendoGridColGroup]", inputs: ["columns", "groups", "detailTemplate", "sort"] }, { type: i27.HeaderComponent, selector: "[kendoGridHeader]", inputs: ["totalColumnLevels", "columns", "groups", "detailTemplate", "scrollable", "filterable", "sort", "filter", "sortable", "groupable", "lockedColumnsCount", "resizable", "reorderable", "columnMenu", "columnMenuTemplate", "totalColumnsCount", "tabIndex"] }, { type: i28.ListComponent, selector: "kendo-grid-list", inputs: ["data", "groups", "total", "rowHeight", "stickyRowHeight", "detailRowHeight", "take", "skip", "columns", "detailTemplate", "noRecordsTemplate", "selectable", "groupable", "filterable", "rowClass", "rowSticky", "loading", "trackBy", "virtualColumns", "isVirtual", "cellLoadingTemplate", "loadingTemplate", "sort"], outputs: ["contentScroll", "pageChange", "scrollBottom"] }, { type: i29.FooterComponent, selector: "[kendoGridFooter]", inputs: ["columns", "groups", "detailTemplate", "scrollable", "lockedColumnsCount", "logicalRowIndex"] }, { type: i30.TableBodyComponent, selector: "[kendoGridTableBody]", inputs: ["columns", "allColumns", "groups", "detailTemplate", "noRecordsTemplate", "data", "skip", "selectable", "filterable", "noRecordsText", "isLocked", "isLoading", "isVirtual", "cellLoadingTemplate", "skipGroupDecoration", "showGroupFooters", "lockedColumnsCount", "totalColumnsCount", "virtualColumns", "trackBy", "rowSticky", "rowClass"] }, { type: i31.LoadingComponent, selector: "[kendoGridLoading]", inputs: ["loadingTemplate"] }], directives: [{ type: i32.LocalizedMessagesDirective, selector: "[kendoGridLocalizedMessages]" }, { type: i33.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i34.TableDirective, selector: "table", inputs: ["locked", "virtualColumns"] }, { type: i35.ResizableContainerDirective, selector: "[kendoGridResizableContainer]", inputs: ["lockedWidth", "kendoGridResizableContainer"] }, { type: i36.DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { type: i37.GridMarqueeDirective, selector: "[kendoGridSelectionMarquee]" }], encapsulation: i0.ViewEncapsulation.None });
|
|
2618
2619
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: GridComponent, decorators: [{
|
|
2619
2620
|
type: Component,
|
|
2620
2621
|
args: [{
|
|
@@ -2998,6 +2999,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2998
2999
|
kendoDraggable
|
|
2999
3000
|
kendoGridSelectionMarquee
|
|
3000
3001
|
[enableDrag]="marqueeSelection"
|
|
3002
|
+
[sort]="sort"
|
|
3001
3003
|
>
|
|
3002
3004
|
</kendo-grid-list>
|
|
3003
3005
|
<div
|
|
@@ -101,7 +101,7 @@ GroupHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
|
101
101
|
<ng-container *ngIf="!skipGroupDecoration">
|
|
102
102
|
<a href="#" tabindex="-1" (click)="toggleGroup(item)"
|
|
103
103
|
class="k-icon"
|
|
104
|
-
[ngClass]="{ 'k-i-
|
|
104
|
+
[ngClass]="{ 'k-i-caret-alt-down': isExpanded, 'k-i-caret-alt-right': !isExpanded }" role="presentation"
|
|
105
105
|
[attr.title]="groupButtonTitle"
|
|
106
106
|
[attr.aria-label]="groupButtonTitle">
|
|
107
107
|
</a>
|
|
@@ -171,7 +171,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
171
171
|
<ng-container *ngIf="!skipGroupDecoration">
|
|
172
172
|
<a href="#" tabindex="-1" (click)="toggleGroup(item)"
|
|
173
173
|
class="k-icon"
|
|
174
|
-
[ngClass]="{ 'k-i-
|
|
174
|
+
[ngClass]="{ 'k-i-caret-alt-down': isExpanded, 'k-i-caret-alt-right': !isExpanded }" role="presentation"
|
|
175
175
|
[attr.title]="groupButtonTitle"
|
|
176
176
|
[attr.aria-label]="groupButtonTitle">
|
|
177
177
|
</a>
|
|
@@ -37,11 +37,11 @@ GroupIndicatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0",
|
|
|
37
37
|
GroupIndicatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: GroupIndicatorComponent, selector: "[kendoGroupIndicator]", inputs: { group: "group", groupTitle: "groupTitle" }, outputs: { directionChange: "directionChange", remove: "remove" }, host: { properties: { "class.k-group-indicator": "this.groupIndicatorClass" } }, ngImport: i0, template: `
|
|
38
38
|
<a href="#" class="k-link" tabindex="-1" (click)="toggleDirection()">
|
|
39
39
|
<span class="k-icon"
|
|
40
|
-
[class.k-i-sort-asc-
|
|
41
|
-
[class.k-i-sort-desc-
|
|
40
|
+
[class.k-i-sort-asc-small]="dir === 'asc'"
|
|
41
|
+
[class.k-i-sort-desc-small]="dir === 'desc'"></span>
|
|
42
42
|
{{groupTitle}}</a>
|
|
43
43
|
<a class="k-button k-button-flat-base k-button-flat k-icon-button k-button-md k-rounded-md k-button-rectangle k-icon-button" tabindex="-1" (click)="removeDescriptor()">
|
|
44
|
-
<span class="k-button-icon k-icon k-i-
|
|
44
|
+
<span class="k-button-icon k-icon k-i-x"></span>
|
|
45
45
|
</a>
|
|
46
46
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
47
47
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: GroupIndicatorComponent, decorators: [{
|
|
@@ -52,11 +52,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
52
52
|
template: `
|
|
53
53
|
<a href="#" class="k-link" tabindex="-1" (click)="toggleDirection()">
|
|
54
54
|
<span class="k-icon"
|
|
55
|
-
[class.k-i-sort-asc-
|
|
56
|
-
[class.k-i-sort-desc-
|
|
55
|
+
[class.k-i-sort-asc-small]="dir === 'asc'"
|
|
56
|
+
[class.k-i-sort-desc-small]="dir === 'desc'"></span>
|
|
57
57
|
{{groupTitle}}</a>
|
|
58
58
|
<a class="k-button k-button-flat-base k-button-flat k-icon-button k-button-md k-rounded-md k-button-rectangle k-icon-button" tabindex="-1" (click)="removeDescriptor()">
|
|
59
|
-
<span class="k-button-icon k-icon k-i-
|
|
59
|
+
<span class="k-button-icon k-icon k-i-x"></span>
|
|
60
60
|
</a>
|
|
61
61
|
`
|
|
62
62
|
}]
|
|
@@ -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:
|
|
12
|
+
publishDate: 1662549819,
|
|
13
13
|
version: '',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
15
15
|
};
|
|
@@ -53,7 +53,7 @@ PagerNextButtonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
|
|
|
53
53
|
<span role="note" [attr.aria-label]="textFor('pagerNextPage')"
|
|
54
54
|
[ngClass]="{
|
|
55
55
|
'k-icon':true,
|
|
56
|
-
'k-i-
|
|
56
|
+
'k-i-caret-alt-right': true
|
|
57
57
|
}">
|
|
58
58
|
</span>
|
|
59
59
|
</span>
|
|
@@ -73,7 +73,7 @@ PagerNextButtonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
|
|
|
73
73
|
<span role="note" [attr.aria-label]="textFor('pagerLastPage')"
|
|
74
74
|
[ngClass]="{
|
|
75
75
|
'k-icon':true,
|
|
76
|
-
'k-i-
|
|
76
|
+
'k-i-caret-alt-to-right': true
|
|
77
77
|
}">
|
|
78
78
|
</span>
|
|
79
79
|
</span>
|
|
@@ -100,7 +100,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
100
100
|
<span role="note" [attr.aria-label]="textFor('pagerNextPage')"
|
|
101
101
|
[ngClass]="{
|
|
102
102
|
'k-icon':true,
|
|
103
|
-
'k-i-
|
|
103
|
+
'k-i-caret-alt-right': true
|
|
104
104
|
}">
|
|
105
105
|
</span>
|
|
106
106
|
</span>
|
|
@@ -120,7 +120,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
120
120
|
<span role="note" [attr.aria-label]="textFor('pagerLastPage')"
|
|
121
121
|
[ngClass]="{
|
|
122
122
|
'k-icon':true,
|
|
123
|
-
'k-i-
|
|
123
|
+
'k-i-caret-alt-to-right': true
|
|
124
124
|
}">
|
|
125
125
|
</span>
|
|
126
126
|
</span>
|
|
@@ -53,7 +53,7 @@ PagerPrevButtonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
|
|
|
53
53
|
[attr.aria-label]="textFor('pagerFirstPage')"
|
|
54
54
|
[ngClass]="{
|
|
55
55
|
'k-icon': true,
|
|
56
|
-
'k-i-
|
|
56
|
+
'k-i-caret-alt-to-left': true
|
|
57
57
|
}">
|
|
58
58
|
</span>
|
|
59
59
|
</span>
|
|
@@ -73,7 +73,7 @@ PagerPrevButtonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
|
|
|
73
73
|
[attr.aria-label]="textFor('pagerPreviousPage')"
|
|
74
74
|
[ngClass]="{
|
|
75
75
|
'k-icon': true,
|
|
76
|
-
'k-i-
|
|
76
|
+
'k-i-caret-alt-left': true
|
|
77
77
|
}">
|
|
78
78
|
</span>
|
|
79
79
|
</span>
|
|
@@ -100,7 +100,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
100
100
|
[attr.aria-label]="textFor('pagerFirstPage')"
|
|
101
101
|
[ngClass]="{
|
|
102
102
|
'k-icon': true,
|
|
103
|
-
'k-i-
|
|
103
|
+
'k-i-caret-alt-to-left': true
|
|
104
104
|
}">
|
|
105
105
|
</span>
|
|
106
106
|
</span>
|
|
@@ -120,7 +120,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
120
120
|
[attr.aria-label]="textFor('pagerPreviousPage')"
|
|
121
121
|
[ngClass]="{
|
|
122
122
|
'k-icon': true,
|
|
123
|
-
'k-i-
|
|
123
|
+
'k-i-caret-alt-left': true
|
|
124
124
|
}">
|
|
125
125
|
</span>
|
|
126
126
|
</span>
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { Component, Input } from '@angular/core';
|
|
6
6
|
import { columnsToRender } from '../../columns/column-common';
|
|
7
|
+
import { isNullOrEmptyString, isTruthy } from '../../utils';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
import * as i1 from "@angular/common";
|
|
9
10
|
/**
|
|
@@ -13,6 +14,7 @@ export class ColGroupComponent {
|
|
|
13
14
|
constructor() {
|
|
14
15
|
this.columns = [];
|
|
15
16
|
this.groups = [];
|
|
17
|
+
this.sort = new Array();
|
|
16
18
|
}
|
|
17
19
|
get columnsToRender() {
|
|
18
20
|
return columnsToRender(this.columns);
|
|
@@ -20,13 +22,28 @@ export class ColGroupComponent {
|
|
|
20
22
|
trackBy(index, _item) {
|
|
21
23
|
return index;
|
|
22
24
|
}
|
|
25
|
+
isSorted(column) {
|
|
26
|
+
const state = this.sortDescriptor(column.field);
|
|
27
|
+
return this.isSortable(column) && (state.dir === 'asc' || state.dir === 'desc');
|
|
28
|
+
}
|
|
29
|
+
getColumnComponent(column) {
|
|
30
|
+
return column;
|
|
31
|
+
}
|
|
32
|
+
isSortable(column) {
|
|
33
|
+
return !isNullOrEmptyString(column.field) && isTruthy(column.sortable);
|
|
34
|
+
}
|
|
35
|
+
sortDescriptor(field) {
|
|
36
|
+
return this.sort.find(item => item.field === field) || { field };
|
|
37
|
+
}
|
|
23
38
|
}
|
|
24
39
|
ColGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ColGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
25
|
-
ColGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ColGroupComponent, selector: "[kendoGridColGroup]", inputs: { columns: "columns", groups: "groups", detailTemplate: "detailTemplate" }, ngImport: i0, template: `
|
|
40
|
+
ColGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ColGroupComponent, selector: "[kendoGridColGroup]", inputs: { columns: "columns", groups: "groups", detailTemplate: "detailTemplate", sort: "sort" }, ngImport: i0, template: `
|
|
26
41
|
<ng-container>
|
|
27
42
|
<col [class.k-group-col]="true" *ngFor="let g of groups" />
|
|
28
43
|
<col [class.k-hierarchy-col]="true" *ngIf="detailTemplate?.templateRef"/>
|
|
29
|
-
<col *ngFor="let column of columnsToRender; trackBy: trackBy;"
|
|
44
|
+
<col *ngFor="let column of columnsToRender; trackBy: trackBy;"
|
|
45
|
+
[style.width.px]="column.width"
|
|
46
|
+
[class.k-sorted]="isSorted(getColumnComponent(column))"/>
|
|
30
47
|
</ng-container>
|
|
31
48
|
`, isInline: true, directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
32
49
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ColGroupComponent, decorators: [{
|
|
@@ -37,7 +54,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
37
54
|
<ng-container>
|
|
38
55
|
<col [class.k-group-col]="true" *ngFor="let g of groups" />
|
|
39
56
|
<col [class.k-hierarchy-col]="true" *ngIf="detailTemplate?.templateRef"/>
|
|
40
|
-
<col *ngFor="let column of columnsToRender; trackBy: trackBy;"
|
|
57
|
+
<col *ngFor="let column of columnsToRender; trackBy: trackBy;"
|
|
58
|
+
[style.width.px]="column.width"
|
|
59
|
+
[class.k-sorted]="isSorted(getColumnComponent(column))"/>
|
|
41
60
|
</ng-container>
|
|
42
61
|
`
|
|
43
62
|
}]
|
|
@@ -47,4 +66,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
47
66
|
type: Input
|
|
48
67
|
}], detailTemplate: [{
|
|
49
68
|
type: Input
|
|
69
|
+
}], sort: [{
|
|
70
|
+
type: Input
|
|
50
71
|
}] } });
|