@progress/kendo-angular-grid 21.0.0-develop.2 → 21.0.0-develop.21
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/codemods/utils.js +485 -327
- package/codemods/v20/grid-kendogridgroupbinding.js +6 -6
- package/codemods/v21/grid-gridtoolbaraiopenevent.js +14 -0
- package/codemods/v21/grid-gridtoolbaraipromptrequestevent.js +14 -0
- package/codemods/v21/grid-gridtoolbaraipromptsettings.js +14 -0
- package/codemods/v21/grid-gridtoolbarairequestoptions.js +14 -0
- package/codemods/v21/grid-gridtoolbarairesponseerrorevent.js +14 -0
- package/codemods/v21/grid-gridtoolbaraiwindowsettings.js +14 -0
- package/column-menu/column-chooser.component.d.ts +0 -1
- package/column-resizing/column-resizing.service.d.ts +1 -0
- package/common/id.service.d.ts +1 -0
- package/common/provider.service.d.ts +4 -0
- package/esm2022/column-menu/column-chooser.component.mjs +2 -7
- package/esm2022/column-resizing/column-resizing.service.mjs +55 -1
- package/esm2022/columns/column-base.mjs +1 -1
- package/esm2022/common/id.service.mjs +3 -0
- package/esm2022/common/provider.service.mjs +2 -0
- package/esm2022/excel/excel.component.mjs +4 -0
- package/esm2022/grid.component.mjs +36 -0
- package/esm2022/localization/messages.mjs +19 -1
- package/esm2022/navigation/navigation.service.mjs +48 -2
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/pdf/pdf.component.mjs +6 -0
- package/esm2022/rendering/toolbar/tools/ai-assistant/ai-assistant.component.mjs +510 -25
- package/esm2022/rendering/toolbar/tools/ai-assistant/models.mjs +2 -2
- package/esm2022/row-reordering/row-reorder.service.mjs +28 -0
- package/esm2022/selection/selection-checkbox.directive.mjs +1 -1
- package/fesm2022/progress-kendo-angular-grid.mjs +715 -40
- package/grid.component.d.ts +8 -0
- package/localization/messages.d.ts +13 -1
- package/navigation/navigation.service.d.ts +1 -0
- package/package.json +58 -25
- package/rendering/toolbar/tools/ai-assistant/ai-assistant.component.d.ts +22 -3
- package/rendering/toolbar/tools/ai-assistant/ai-tool.directive.d.ts +8 -8
- package/rendering/toolbar/tools/ai-assistant/models.d.ts +65 -33
- package/row-reordering/row-reorder.service.d.ts +10 -1
- package/schematics/ngAdd/index.js +7 -7
|
@@ -33,18 +33,18 @@ const utils_1 = require("../utils");
|
|
|
33
33
|
const fs = __importStar(require("fs"));
|
|
34
34
|
function default_1(fileInfo, api) {
|
|
35
35
|
const filePath = fileInfo.path;
|
|
36
|
-
// Check if the file is an HTML file
|
|
37
36
|
if (filePath.endsWith('.html')) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
if ((0, utils_1.hasKendoInTemplate)(fileInfo.source)) {
|
|
38
|
+
let updatedContent = fileInfo.source;
|
|
39
|
+
updatedContent = (0, utils_1.htmlAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-grid', 'kendoGridGroupBinding', 'kendoGridBinding');
|
|
40
|
+
// Only write to file once after all transformations
|
|
41
|
+
fs.writeFileSync(filePath, updatedContent, 'utf-8');
|
|
42
|
+
}
|
|
42
43
|
return;
|
|
43
44
|
}
|
|
44
45
|
const j = api.jscodeshift;
|
|
45
46
|
const rootSource = j(fileInfo.source);
|
|
46
47
|
(0, index_1.templateTransformer)(rootSource, j, (root) => {
|
|
47
|
-
// Using node-html-parser to parse and manipulate the template: https://github.com/taoqf/node-html-parser
|
|
48
48
|
(0, utils_1.templateAttributeTransformer)(root, 'kendo-grid', 'kendoGridGroupBinding', 'kendoGridBinding');
|
|
49
49
|
});
|
|
50
50
|
return rootSource.toSource();
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
"use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.default = default_1;
|
|
8
|
+
const utils_1 = require("../utils");
|
|
9
|
+
function default_1(fileInfo, api) {
|
|
10
|
+
const j = api.jscodeshift;
|
|
11
|
+
const rootSource = j(fileInfo.source);
|
|
12
|
+
(0, utils_1.tsInterfaceTransformer)(fileInfo, rootSource, j, '@progress/kendo-angular-grid', 'GridToolbarAIOpenEvent', 'GridAIAssistantOpenEvent');
|
|
13
|
+
return rootSource.toSource();
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
"use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.default = default_1;
|
|
8
|
+
const utils_1 = require("../utils");
|
|
9
|
+
function default_1(fileInfo, api) {
|
|
10
|
+
const j = api.jscodeshift;
|
|
11
|
+
const rootSource = j(fileInfo.source);
|
|
12
|
+
(0, utils_1.tsInterfaceTransformer)(fileInfo, rootSource, j, '@progress/kendo-angular-grid', 'GridToolbarAIPromptRequestEvent', 'GridAIAssistantRequestEvent');
|
|
13
|
+
return rootSource.toSource();
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
"use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.default = default_1;
|
|
8
|
+
const utils_1 = require("../utils");
|
|
9
|
+
function default_1(fileInfo, api) {
|
|
10
|
+
const j = api.jscodeshift;
|
|
11
|
+
const rootSource = j(fileInfo.source);
|
|
12
|
+
(0, utils_1.tsInterfaceTransformer)(fileInfo, rootSource, j, '@progress/kendo-angular-grid', 'GridToolbarAIPromptSettings', 'GridAIAssistantPromptSettings');
|
|
13
|
+
return rootSource.toSource();
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
"use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.default = default_1;
|
|
8
|
+
const utils_1 = require("../utils");
|
|
9
|
+
function default_1(fileInfo, api) {
|
|
10
|
+
const j = api.jscodeshift;
|
|
11
|
+
const rootSource = j(fileInfo.source);
|
|
12
|
+
(0, utils_1.tsInterfaceTransformer)(fileInfo, rootSource, j, '@progress/kendo-angular-grid', 'GridToolbarAIRequestOptions', 'GridAIRequestOptions');
|
|
13
|
+
return rootSource.toSource();
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
"use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.default = default_1;
|
|
8
|
+
const utils_1 = require("../utils");
|
|
9
|
+
function default_1(fileInfo, api) {
|
|
10
|
+
const j = api.jscodeshift;
|
|
11
|
+
const rootSource = j(fileInfo.source);
|
|
12
|
+
(0, utils_1.tsInterfaceTransformer)(fileInfo, rootSource, j, '@progress/kendo-angular-grid', 'GridToolbarAIResponseErrorEvent', 'GridAIAssistantResponseErrorEvent');
|
|
13
|
+
return rootSource.toSource();
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
"use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.default = default_1;
|
|
8
|
+
const utils_1 = require("../utils");
|
|
9
|
+
function default_1(fileInfo, api) {
|
|
10
|
+
const j = api.jscodeshift;
|
|
11
|
+
const rootSource = j(fileInfo.source);
|
|
12
|
+
(0, utils_1.tsInterfaceTransformer)(fileInfo, rootSource, j, '@progress/kendo-angular-grid', 'GridToolbarAIWindowSettings', 'GridAIAssistantWindowSettings');
|
|
13
|
+
return rootSource.toSource();
|
|
14
|
+
}
|
|
@@ -33,6 +33,7 @@ export declare class ColumnResizingService {
|
|
|
33
33
|
}): () => void;
|
|
34
34
|
measureColumns(info: Array<any>): void;
|
|
35
35
|
autoFit(...columns: ColumnBase[]): void;
|
|
36
|
+
autoFitToGrid(gridEl: HTMLElement, scrollbarWidth: number, ...columns: ColumnBase[]): void;
|
|
36
37
|
private trackColumns;
|
|
37
38
|
private autoFitStart;
|
|
38
39
|
private autoFitBatch;
|
package/common/id.service.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export declare class IdService {
|
|
|
13
13
|
cellId(rowIndex: number, colIndex: number): string;
|
|
14
14
|
selectionCheckboxId(itemIndex: any): string;
|
|
15
15
|
selectAllCheckboxId(): string;
|
|
16
|
+
columnId(colIndex: number): string;
|
|
16
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<IdService, never>;
|
|
17
18
|
static ɵprov: i0.ɵɵInjectableDeclaration<IdService>;
|
|
18
19
|
}
|
|
@@ -9,6 +9,8 @@ import { GridToolbarNavigationService } from '../rendering/toolbar/toolbar-navig
|
|
|
9
9
|
import type { DataBindingDirective } from '../databinding.directive';
|
|
10
10
|
import type { ScrollerService } from '../scrolling/scroller.service';
|
|
11
11
|
import { HighlightDirective } from '../highlight/highlight.directive';
|
|
12
|
+
import type { ExcelComponent } from '../excel/excel.component';
|
|
13
|
+
import type { PDFComponent } from '../pdf/pdf.component';
|
|
12
14
|
import * as i0 from "@angular/core";
|
|
13
15
|
/**
|
|
14
16
|
* @hidden
|
|
@@ -29,6 +31,8 @@ export declare class ContextService {
|
|
|
29
31
|
scroller: ScrollerService;
|
|
30
32
|
dataBindingDirective: DataBindingDirective;
|
|
31
33
|
highlightDirective: HighlightDirective;
|
|
34
|
+
excelComponent?: ExcelComponent;
|
|
35
|
+
pdfComponent?: PDFComponent;
|
|
32
36
|
constructor(renderer: Renderer2, localization: LocalizationService);
|
|
33
37
|
static ɵfac: i0.ɵɵFactoryDeclaration<ContextService, never>;
|
|
34
38
|
static ɵprov: i0.ɵɵInjectableDeclaration<ContextService>;
|
|
@@ -10,7 +10,6 @@ import { Keys, guid, isDocumentAvailable } from '@progress/kendo-angular-common'
|
|
|
10
10
|
import { columnsIcon } from '@progress/kendo-svg-icons';
|
|
11
11
|
import { ButtonComponent } from '@progress/kendo-angular-buttons';
|
|
12
12
|
import { ContextService } from '../common/provider.service';
|
|
13
|
-
import { ColumnListComponent } from './column-list.component';
|
|
14
13
|
import { ColumnChooserContentComponent } from './column-chooser-content.component';
|
|
15
14
|
import * as i0 from "@angular/core";
|
|
16
15
|
import * as i1 from "../common/provider.service";
|
|
@@ -63,7 +62,6 @@ export class ColumnChooserComponent {
|
|
|
63
62
|
*/
|
|
64
63
|
allowHideAll = true;
|
|
65
64
|
anchor;
|
|
66
|
-
columnList;
|
|
67
65
|
get columns() {
|
|
68
66
|
return this.columnInfoService.leafNamedColumns;
|
|
69
67
|
}
|
|
@@ -158,7 +156,7 @@ export class ColumnChooserComponent {
|
|
|
158
156
|
}
|
|
159
157
|
}
|
|
160
158
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ColumnChooserComponent, deps: [{ token: i1.ContextService }, { token: i2.ColumnInfoService }, { token: i3.PopupService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
161
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ColumnChooserComponent, isStandalone: true, selector: "kendo-grid-column-chooser", inputs: { autoSync: "autoSync", filterable: "filterable", showSelectAll: "showSelectAll", allowHideAll: "allowHideAll" }, viewQueries: [{ propertyName: "anchor", first: true, predicate: ["anchor"], descendants: true }
|
|
159
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ColumnChooserComponent, isStandalone: true, selector: "kendo-grid-column-chooser", inputs: { autoSync: "autoSync", filterable: "filterable", showSelectAll: "showSelectAll", allowHideAll: "allowHideAll" }, viewQueries: [{ propertyName: "anchor", first: true, predicate: ["anchor"], descendants: true }], ngImport: i0, template: `
|
|
162
160
|
<button #anchor
|
|
163
161
|
kendoButton
|
|
164
162
|
type="button"
|
|
@@ -216,7 +214,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
216
214
|
</ng-template>
|
|
217
215
|
`,
|
|
218
216
|
standalone: true,
|
|
219
|
-
imports: [ButtonComponent,
|
|
217
|
+
imports: [ButtonComponent, ColumnChooserContentComponent]
|
|
220
218
|
}]
|
|
221
219
|
}], ctorParameters: () => [{ type: i1.ContextService }, { type: i2.ColumnInfoService }, { type: i3.PopupService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }], propDecorators: { autoSync: [{
|
|
222
220
|
type: Input
|
|
@@ -229,7 +227,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
229
227
|
}], anchor: [{
|
|
230
228
|
type: ViewChild,
|
|
231
229
|
args: ['anchor']
|
|
232
|
-
}], columnList: [{
|
|
233
|
-
type: ViewChild,
|
|
234
|
-
args: ['columnList']
|
|
235
230
|
}] } });
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { Injectable, EventEmitter } from '@angular/core';
|
|
6
6
|
import { zip } from 'rxjs';
|
|
7
|
-
import { leafColumns } from '../columns/column-common';
|
|
8
7
|
import { take } from 'rxjs/operators';
|
|
8
|
+
import { leafColumns } from '../columns/column-common';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
10
|
/**
|
|
11
11
|
* @hidden
|
|
@@ -18,6 +18,21 @@ const resizeArgs = (column, extra) => Object.assign({
|
|
|
18
18
|
columns: leafColumns([column]),
|
|
19
19
|
locked: isLocked(column)
|
|
20
20
|
}, extra);
|
|
21
|
+
/**
|
|
22
|
+
* @hidden
|
|
23
|
+
*/
|
|
24
|
+
const measure = (col, gridEl) => {
|
|
25
|
+
const rowIndex = col.level + 1;
|
|
26
|
+
const selector = `tr[aria-rowindex="${rowIndex}"] > th[aria-colindex="${col.leafIndex + 1}"], tr[aria-rowindex="${rowIndex}"] > th[data-kendo-grid-column-index="${col.leafIndex}"]`;
|
|
27
|
+
const headerCell = gridEl.querySelector(selector);
|
|
28
|
+
if (headerCell) {
|
|
29
|
+
const headerCellWidth = headerCell.offsetWidth;
|
|
30
|
+
if (headerCellWidth > 0) {
|
|
31
|
+
return headerCellWidth;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return 0;
|
|
35
|
+
};
|
|
21
36
|
/**
|
|
22
37
|
* @hidden
|
|
23
38
|
*/
|
|
@@ -100,6 +115,45 @@ export class ColumnResizingService {
|
|
|
100
115
|
}
|
|
101
116
|
});
|
|
102
117
|
}
|
|
118
|
+
autoFitToGrid(gridEl, scrollbarWidth, ...columns) {
|
|
119
|
+
const gridWidth = gridEl.clientWidth - scrollbarWidth - 1;
|
|
120
|
+
if (gridWidth <= 0) {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
const columnsWidths = columns.map(c => measure(c, gridEl));
|
|
124
|
+
const totalColumnsWidth = columnsWidths.reduce((sum, w) => sum + w, 0);
|
|
125
|
+
if (totalColumnsWidth === 0 || Math.abs(totalColumnsWidth - gridWidth) <= 1) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
this.start(columns[0]);
|
|
129
|
+
const calculateNewWidths = (columnsWidths) => {
|
|
130
|
+
const totalWidth = columnsWidths.reduce((s, w) => s + w, 0);
|
|
131
|
+
const nonZeroColumns = columnsWidths.filter(w => w > 0).length;
|
|
132
|
+
const diff = (gridWidth - totalWidth) / nonZeroColumns;
|
|
133
|
+
const newWidths = columnsWidths.slice();
|
|
134
|
+
newWidths.forEach((w, i) => {
|
|
135
|
+
newWidths[i] = Math.max(0, w + diff);
|
|
136
|
+
});
|
|
137
|
+
return newWidths;
|
|
138
|
+
};
|
|
139
|
+
let newWidths = calculateNewWidths(columnsWidths);
|
|
140
|
+
const newTotal = newWidths.reduce((s, w) => s + w, 0);
|
|
141
|
+
if (newTotal !== gridWidth) {
|
|
142
|
+
newWidths = calculateNewWidths(newWidths);
|
|
143
|
+
}
|
|
144
|
+
columns.forEach((col, idx) => {
|
|
145
|
+
const oldWidth = columnsWidths[idx];
|
|
146
|
+
const newWidth = newWidths[idx];
|
|
147
|
+
col.width = newWidth;
|
|
148
|
+
this.resizedColumn({ column: col, oldWidth, newWidth });
|
|
149
|
+
});
|
|
150
|
+
const totalNew = newWidths.reduce((s, w) => s + w, 0);
|
|
151
|
+
const tableDelta = totalNew - totalColumnsWidth;
|
|
152
|
+
if (tableDelta < 0) {
|
|
153
|
+
this.resizeTable(columns[0], tableDelta);
|
|
154
|
+
}
|
|
155
|
+
this.end();
|
|
156
|
+
}
|
|
103
157
|
trackColumns(column) {
|
|
104
158
|
this.resizedColumns = [];
|
|
105
159
|
this.column = column;
|
|
@@ -355,7 +355,7 @@ export class ColumnBase {
|
|
|
355
355
|
if (parent && idService && parent.idService.gridId() === idService.gridId() && !isColumnContainer(parent)) {
|
|
356
356
|
throw new Error(ColumnConfigurationErrorMessages.columnNested);
|
|
357
357
|
}
|
|
358
|
-
this._id =
|
|
358
|
+
this._id = this.idService?.columnId(columnId++);
|
|
359
359
|
}
|
|
360
360
|
ngAfterViewInit() {
|
|
361
361
|
this.initialMinResizableWidth = this.minResizableWidth || 10;
|
|
@@ -26,6 +26,9 @@ export class IdService {
|
|
|
26
26
|
selectAllCheckboxId() {
|
|
27
27
|
return `${this.prefix}-select-all`;
|
|
28
28
|
}
|
|
29
|
+
columnId(colIndex) {
|
|
30
|
+
return `${this.prefix}-col${colIndex}`;
|
|
31
|
+
}
|
|
29
32
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: IdService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
30
33
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: IdService });
|
|
31
34
|
}
|
|
@@ -126,12 +126,16 @@ export class ExcelComponent {
|
|
|
126
126
|
this.ctx = ctx;
|
|
127
127
|
this.zone = zone;
|
|
128
128
|
this.saveSubscription = excelService.saveToExcel.subscribe(this.save.bind(this));
|
|
129
|
+
this.ctx.excelComponent = this;
|
|
129
130
|
}
|
|
130
131
|
ngOnDestroy() {
|
|
131
132
|
this.saveSubscription.unsubscribe();
|
|
132
133
|
if (this.dataSubscription) {
|
|
133
134
|
this.dataSubscription.unsubscribe();
|
|
134
135
|
}
|
|
136
|
+
if (this.ctx.excelComponent === this) {
|
|
137
|
+
this.ctx.excelComponent = undefined;
|
|
138
|
+
}
|
|
135
139
|
}
|
|
136
140
|
save(component) {
|
|
137
141
|
const data = (this.fetchData || fetchComponentData)(component);
|
|
@@ -1693,6 +1693,24 @@ export class GridComponent {
|
|
|
1693
1693
|
}
|
|
1694
1694
|
this.columnResizingService.autoFit(...cols);
|
|
1695
1695
|
}
|
|
1696
|
+
/**
|
|
1697
|
+
* Adjusts the width of the Grid columns to fit the entire Grid width.
|
|
1698
|
+
* - when the sum of all columns widths is less than the available Grid width—the available space is distributed evenly between all columns.
|
|
1699
|
+
* - when the sum of all columns widths is greater than the available Grid width—the columns are shrinked equally to fit the Grid width.
|
|
1700
|
+
*
|
|
1701
|
+
* Run this method after the Grid is populated with data.
|
|
1702
|
+
*/
|
|
1703
|
+
autoFitColumnsToGrid() {
|
|
1704
|
+
const gridElement = this.wrapper.nativeElement;
|
|
1705
|
+
if (!gridElement) {
|
|
1706
|
+
return;
|
|
1707
|
+
}
|
|
1708
|
+
const leafColumns = this.columnsContainer.leafColumns.toArray();
|
|
1709
|
+
if (!leafColumns.length || leafColumns.length === 0) {
|
|
1710
|
+
return;
|
|
1711
|
+
}
|
|
1712
|
+
this.columnResizingService.autoFitToGrid(gridElement, this.scrollbarWidth, ...leafColumns);
|
|
1713
|
+
}
|
|
1696
1714
|
/**
|
|
1697
1715
|
* @hidden
|
|
1698
1716
|
*/
|
|
@@ -2866,6 +2884,15 @@ export class GridComponent {
|
|
|
2866
2884
|
i18n-aiAssistantOutputCardBodyContent="kendo.grid.aiAssistantOutputCardBodyContent|The success message dispayed in the AI Assistant Prompt Output Card's body"
|
|
2867
2885
|
aiAssistantOutputCardBodyContent="Operation is successful. Data is:"
|
|
2868
2886
|
|
|
2887
|
+
i18n-aiAssistantSelectionNotEnabled="kendo.grid.aiAssistantSelectionNotEnabled|The message shown when AI selection requires the Grid selectable option"
|
|
2888
|
+
aiAssistantSelectionNotEnabled="Selection can be applied only when the Grid selectable option is enabled."
|
|
2889
|
+
|
|
2890
|
+
i18n-aiAssistantSelectionRowModeRequired="kendo.grid.aiAssistantSelectionRowModeRequired|The message shown when AI selection requires row selection mode"
|
|
2891
|
+
aiAssistantSelectionRowModeRequired="Selection can be applied only when row selection mode is enabled."
|
|
2892
|
+
|
|
2893
|
+
i18n-aiAssistantSelectionCellModeRequired="kendo.grid.aiAssistantSelectionCellModeRequired|The message shown when AI selection requires cell selection mode"
|
|
2894
|
+
aiAssistantSelectionCellModeRequired="Selection can be applied only when cell selection mode is enabled."
|
|
2895
|
+
|
|
2869
2896
|
i18n-columnChooserSelectedColumnsCount="kendo.grid.columnChooserSelectedColumnsCount|The text displayed in the Column Chooser for the number of selected columns"
|
|
2870
2897
|
columnChooserSelectedColumnsCount="{{ '{selectedColumnsCount} Selected items' }}"
|
|
2871
2898
|
|
|
@@ -3735,6 +3762,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
3735
3762
|
i18n-aiAssistantOutputCardBodyContent="kendo.grid.aiAssistantOutputCardBodyContent|The success message dispayed in the AI Assistant Prompt Output Card's body"
|
|
3736
3763
|
aiAssistantOutputCardBodyContent="Operation is successful. Data is:"
|
|
3737
3764
|
|
|
3765
|
+
i18n-aiAssistantSelectionNotEnabled="kendo.grid.aiAssistantSelectionNotEnabled|The message shown when AI selection requires the Grid selectable option"
|
|
3766
|
+
aiAssistantSelectionNotEnabled="Selection can be applied only when the Grid selectable option is enabled."
|
|
3767
|
+
|
|
3768
|
+
i18n-aiAssistantSelectionRowModeRequired="kendo.grid.aiAssistantSelectionRowModeRequired|The message shown when AI selection requires row selection mode"
|
|
3769
|
+
aiAssistantSelectionRowModeRequired="Selection can be applied only when row selection mode is enabled."
|
|
3770
|
+
|
|
3771
|
+
i18n-aiAssistantSelectionCellModeRequired="kendo.grid.aiAssistantSelectionCellModeRequired|The message shown when AI selection requires cell selection mode"
|
|
3772
|
+
aiAssistantSelectionCellModeRequired="Selection can be applied only when cell selection mode is enabled."
|
|
3773
|
+
|
|
3738
3774
|
i18n-columnChooserSelectedColumnsCount="kendo.grid.columnChooserSelectedColumnsCount|The text displayed in the Column Chooser for the number of selected columns"
|
|
3739
3775
|
columnChooserSelectedColumnsCount="{{ '{selectedColumnsCount} Selected items' }}"
|
|
3740
3776
|
|
|
@@ -166,6 +166,18 @@ export class GridMessages extends ComponentMessages {
|
|
|
166
166
|
* The success message dispayed in the AI Assistant Prompt Output Card's body.
|
|
167
167
|
*/
|
|
168
168
|
aiAssistantOutputCardBodyContent;
|
|
169
|
+
/**
|
|
170
|
+
* The message shown when AI selection requires the Grid selectable option.
|
|
171
|
+
*/
|
|
172
|
+
aiAssistantSelectionNotEnabled;
|
|
173
|
+
/**
|
|
174
|
+
* The message shown when AI selection requires row selection mode.
|
|
175
|
+
*/
|
|
176
|
+
aiAssistantSelectionRowModeRequired;
|
|
177
|
+
/**
|
|
178
|
+
* The message shown when AI selection requires cell selection mode.
|
|
179
|
+
*/
|
|
180
|
+
aiAssistantSelectionCellModeRequired;
|
|
169
181
|
/**
|
|
170
182
|
* The title of the AI Assistant Window maximize button.
|
|
171
183
|
*/
|
|
@@ -604,7 +616,7 @@ export class GridMessages extends ComponentMessages {
|
|
|
604
616
|
*/
|
|
605
617
|
multiCheckboxFilterSelectedItemsCount;
|
|
606
618
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GridMessages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
607
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", 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", pagerInputLabel: "pagerInputLabel", pagerSelectPage: "pagerSelectPage", filter: "filter", filterInputLabel: "filterInputLabel", filterMenuTitle: "filterMenuTitle", filterMenuOperatorsDropDownLabel: "filterMenuOperatorsDropDownLabel", filterMenuLogicDropDownLabel: "filterMenuLogicDropDownLabel", filterCellOperatorLabel: "filterCellOperatorLabel", booleanFilterCellLabel: "booleanFilterCellLabel", aiAssistantApplyButtonText: "aiAssistantApplyButtonText", aiAssistantToolbarToolText: "aiAssistantToolbarToolText", aiAssistantWindowTitle: "aiAssistantWindowTitle", aiAssistantWindowCloseTitle: "aiAssistantWindowCloseTitle", aiAssistantOutputCardTitle: "aiAssistantOutputCardTitle", aiAssistantOutputCardBodyContent: "aiAssistantOutputCardBodyContent", aiAssistantWindowMaximizeTitle: "aiAssistantWindowMaximizeTitle", aiAssistantWindowMinimizeTitle: "aiAssistantWindowMinimizeTitle", aiAssistantWindowRestoreTitle: "aiAssistantWindowRestoreTitle", 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", adaptiveFilterOperatorsTitle: "adaptiveFilterOperatorsTitle", filterAfterOrEqualOperator: "filterAfterOrEqualOperator", filterAfterOperator: "filterAfterOperator", filterBeforeOperator: "filterBeforeOperator", filterBeforeOrEqualOperator: "filterBeforeOrEqualOperator", filterFilterButton: "filterFilterButton", filterClearButton: "filterClearButton", adaptiveCloseButtonTitle: "adaptiveCloseButtonTitle", adaptiveBackButtonTitle: "adaptiveBackButtonTitle", filterAndLogic: "filterAndLogic", filterOrLogic: "filterOrLogic", filterToolbarToolText: "filterToolbarToolText", loading: "loading", gridLabel: "gridLabel", columnMenu: "columnMenu", setColumnPosition: "setColumnPosition", columns: "columns", columnChooserSelectedColumnsCount: "columnChooserSelectedColumnsCount", columnsSubtitle: "columnsSubtitle", adaptiveFilterTitle: "adaptiveFilterTitle", adaptiveSortTitle: "adaptiveSortTitle", adaptiveGroupTitle: "adaptiveGroupTitle", filterClearAllButton: "filterClearAllButton", groupClearButton: "groupClearButton", sortClearButton: "sortClearButton", sortDoneButton: "sortDoneButton", groupDoneButton: "groupDoneButton", lock: "lock", unlock: "unlock", stick: "stick", unstick: "unstick", sortable: "sortable", sortAscending: "sortAscending", sortDescending: "sortDescending", autosizeThisColumn: "autosizeThisColumn", autosizeAllColumns: "autosizeAllColumns", sortedAscending: "sortedAscending", sortedDescending: "sortedDescending", sortedDefault: "sortedDefault", sortToolbarToolText: "sortToolbarToolText", 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", editToolbarToolText: "editToolbarToolText", saveToolbarToolText: "saveToolbarToolText", addToolbarToolText: "addToolbarToolText", cancelToolbarToolText: "cancelToolbarToolText", removeToolbarToolText: "removeToolbarToolText", excelExportToolbarToolText: "excelExportToolbarToolText", pdfExportToolbarToolText: "pdfExportToolbarToolText", groupPanelLabel: "groupPanelLabel", dragRowHandleLabel: "dragRowHandleLabel", columnMenuFilterTabTitle: "columnMenuFilterTabTitle", columnMenuGeneralTabTitle: "columnMenuGeneralTabTitle", columnMenuColumnsTabTitle: "columnMenuColumnsTabTitle", groupChipMenuPrevious: "groupChipMenuPrevious", groupChipMenuNext: "groupChipMenuNext", groupToolbarToolText: "groupToolbarToolText", formValidationErrorText: "formValidationErrorText", removeConfirmationDialogTitle: "removeConfirmationDialogTitle", removeConfirmationDialogContent: "removeConfirmationDialogContent", removeConfirmationDialogConfirmText: "removeConfirmationDialogConfirmText", removeConfirmationDialogRejectText: "removeConfirmationDialogRejectText", externalEditingTitle: "externalEditingTitle", externalEditingAddTitle: "externalEditingAddTitle", externalEditingSaveText: "externalEditingSaveText", externalEditingCancelText: "externalEditingCancelText", multiCheckboxFilterSearchPlaceholder: "multiCheckboxFilterSearchPlaceholder", multiCheckboxFilterSelectAllLabel: "multiCheckboxFilterSelectAllLabel", multiCheckboxFilterSelectedItemsCount: "multiCheckboxFilterSelectedItemsCount" }, usesInheritance: true, ngImport: i0 });
|
|
619
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", 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", pagerInputLabel: "pagerInputLabel", pagerSelectPage: "pagerSelectPage", filter: "filter", filterInputLabel: "filterInputLabel", filterMenuTitle: "filterMenuTitle", filterMenuOperatorsDropDownLabel: "filterMenuOperatorsDropDownLabel", filterMenuLogicDropDownLabel: "filterMenuLogicDropDownLabel", filterCellOperatorLabel: "filterCellOperatorLabel", booleanFilterCellLabel: "booleanFilterCellLabel", aiAssistantApplyButtonText: "aiAssistantApplyButtonText", aiAssistantToolbarToolText: "aiAssistantToolbarToolText", aiAssistantWindowTitle: "aiAssistantWindowTitle", aiAssistantWindowCloseTitle: "aiAssistantWindowCloseTitle", aiAssistantOutputCardTitle: "aiAssistantOutputCardTitle", aiAssistantOutputCardBodyContent: "aiAssistantOutputCardBodyContent", aiAssistantSelectionNotEnabled: "aiAssistantSelectionNotEnabled", aiAssistantSelectionRowModeRequired: "aiAssistantSelectionRowModeRequired", aiAssistantSelectionCellModeRequired: "aiAssistantSelectionCellModeRequired", aiAssistantWindowMaximizeTitle: "aiAssistantWindowMaximizeTitle", aiAssistantWindowMinimizeTitle: "aiAssistantWindowMinimizeTitle", aiAssistantWindowRestoreTitle: "aiAssistantWindowRestoreTitle", 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", adaptiveFilterOperatorsTitle: "adaptiveFilterOperatorsTitle", filterAfterOrEqualOperator: "filterAfterOrEqualOperator", filterAfterOperator: "filterAfterOperator", filterBeforeOperator: "filterBeforeOperator", filterBeforeOrEqualOperator: "filterBeforeOrEqualOperator", filterFilterButton: "filterFilterButton", filterClearButton: "filterClearButton", adaptiveCloseButtonTitle: "adaptiveCloseButtonTitle", adaptiveBackButtonTitle: "adaptiveBackButtonTitle", filterAndLogic: "filterAndLogic", filterOrLogic: "filterOrLogic", filterToolbarToolText: "filterToolbarToolText", loading: "loading", gridLabel: "gridLabel", columnMenu: "columnMenu", setColumnPosition: "setColumnPosition", columns: "columns", columnChooserSelectedColumnsCount: "columnChooserSelectedColumnsCount", columnsSubtitle: "columnsSubtitle", adaptiveFilterTitle: "adaptiveFilterTitle", adaptiveSortTitle: "adaptiveSortTitle", adaptiveGroupTitle: "adaptiveGroupTitle", filterClearAllButton: "filterClearAllButton", groupClearButton: "groupClearButton", sortClearButton: "sortClearButton", sortDoneButton: "sortDoneButton", groupDoneButton: "groupDoneButton", lock: "lock", unlock: "unlock", stick: "stick", unstick: "unstick", sortable: "sortable", sortAscending: "sortAscending", sortDescending: "sortDescending", autosizeThisColumn: "autosizeThisColumn", autosizeAllColumns: "autosizeAllColumns", sortedAscending: "sortedAscending", sortedDescending: "sortedDescending", sortedDefault: "sortedDefault", sortToolbarToolText: "sortToolbarToolText", 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", editToolbarToolText: "editToolbarToolText", saveToolbarToolText: "saveToolbarToolText", addToolbarToolText: "addToolbarToolText", cancelToolbarToolText: "cancelToolbarToolText", removeToolbarToolText: "removeToolbarToolText", excelExportToolbarToolText: "excelExportToolbarToolText", pdfExportToolbarToolText: "pdfExportToolbarToolText", groupPanelLabel: "groupPanelLabel", dragRowHandleLabel: "dragRowHandleLabel", columnMenuFilterTabTitle: "columnMenuFilterTabTitle", columnMenuGeneralTabTitle: "columnMenuGeneralTabTitle", columnMenuColumnsTabTitle: "columnMenuColumnsTabTitle", groupChipMenuPrevious: "groupChipMenuPrevious", groupChipMenuNext: "groupChipMenuNext", groupToolbarToolText: "groupToolbarToolText", formValidationErrorText: "formValidationErrorText", removeConfirmationDialogTitle: "removeConfirmationDialogTitle", removeConfirmationDialogContent: "removeConfirmationDialogContent", removeConfirmationDialogConfirmText: "removeConfirmationDialogConfirmText", removeConfirmationDialogRejectText: "removeConfirmationDialogRejectText", externalEditingTitle: "externalEditingTitle", externalEditingAddTitle: "externalEditingAddTitle", externalEditingSaveText: "externalEditingSaveText", externalEditingCancelText: "externalEditingCancelText", multiCheckboxFilterSearchPlaceholder: "multiCheckboxFilterSearchPlaceholder", multiCheckboxFilterSelectAllLabel: "multiCheckboxFilterSelectAllLabel", multiCheckboxFilterSelectedItemsCount: "multiCheckboxFilterSelectedItemsCount" }, usesInheritance: true, ngImport: i0 });
|
|
608
620
|
}
|
|
609
621
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GridMessages, decorators: [{
|
|
610
622
|
type: Directive,
|
|
@@ -666,6 +678,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
666
678
|
type: Input
|
|
667
679
|
}], aiAssistantOutputCardBodyContent: [{
|
|
668
680
|
type: Input
|
|
681
|
+
}], aiAssistantSelectionNotEnabled: [{
|
|
682
|
+
type: Input
|
|
683
|
+
}], aiAssistantSelectionRowModeRequired: [{
|
|
684
|
+
type: Input
|
|
685
|
+
}], aiAssistantSelectionCellModeRequired: [{
|
|
686
|
+
type: Input
|
|
669
687
|
}], aiAssistantWindowMaximizeTitle: [{
|
|
670
688
|
type: Input
|
|
671
689
|
}], aiAssistantWindowMinimizeTitle: [{
|
|
@@ -511,6 +511,13 @@ export class NavigationService {
|
|
|
511
511
|
const row = this.cursor.row;
|
|
512
512
|
// on some keyboards arrow keys, PageUp/Down, and Home/End are mapped to Numpad keys
|
|
513
513
|
const code = normalizeNumpadKeys(args);
|
|
514
|
+
// Handle row reordering keyboard shortcuts (Ctrl/Cmd + Shift + Up/Down Arrow)
|
|
515
|
+
if (modifier && args.shiftKey && (code === Keys.ArrowUp || code === Keys.ArrowDown)) {
|
|
516
|
+
if (this.handleRowReorderKeyboard(args, code, row)) {
|
|
517
|
+
args.preventDefault();
|
|
518
|
+
return;
|
|
519
|
+
}
|
|
520
|
+
}
|
|
514
521
|
const dir = code === Keys.ArrowDown ? 'Down' : 'Up';
|
|
515
522
|
const right = code === Keys.ArrowRight;
|
|
516
523
|
const isArrowKey = code === Keys.ArrowDown || code === Keys.ArrowUp || code === Keys.ArrowLeft || code === Keys.ArrowRight;
|
|
@@ -518,6 +525,9 @@ export class NavigationService {
|
|
|
518
525
|
startNewSelection = true;
|
|
519
526
|
this.isShiftPressed = true;
|
|
520
527
|
}
|
|
528
|
+
const cellElement = args.target;
|
|
529
|
+
const isDragCell = cellElement ? closest(cellElement, (el) => hasClasses(el, 'k-drag-cell')) : false;
|
|
530
|
+
const isRowReorderable = this.ctx.grid.rowReorderable;
|
|
521
531
|
switch (code) {
|
|
522
532
|
case Keys.ArrowDown:
|
|
523
533
|
case Keys.ArrowUp:
|
|
@@ -525,7 +535,7 @@ export class NavigationService {
|
|
|
525
535
|
rowspanOffset = this.calculateRowspanOffset(dir, rowspan);
|
|
526
536
|
step += rowspanOffset;
|
|
527
537
|
}
|
|
528
|
-
if (args.shiftKey) {
|
|
538
|
+
if (args.shiftKey && !(isDragCell && isRowReorderable)) {
|
|
529
539
|
if (this.ctx.grid.blockArrowSelection) {
|
|
530
540
|
return;
|
|
531
541
|
}
|
|
@@ -792,7 +802,7 @@ export class NavigationService {
|
|
|
792
802
|
onTabout() {
|
|
793
803
|
// Tabbed out of the last focusable content element
|
|
794
804
|
// reset to cursor mode and recapture focus.
|
|
795
|
-
if (this.cursor.cell
|
|
805
|
+
if (this.cursor.cell?.focusGroup.isNavigable()) {
|
|
796
806
|
// Unless the cell has a single focusable element,
|
|
797
807
|
// otherwise we'd return to Content mode and enter an endless loop
|
|
798
808
|
return;
|
|
@@ -873,6 +883,42 @@ export class NavigationService {
|
|
|
873
883
|
get isStackedMode() {
|
|
874
884
|
return this.ctx?.grid?.isStacked;
|
|
875
885
|
}
|
|
886
|
+
handleRowReorderKeyboard(args, code, row) {
|
|
887
|
+
if (!this.ctx.grid.rowReorderable || !this.activeCell) {
|
|
888
|
+
return false;
|
|
889
|
+
}
|
|
890
|
+
const cell = this.activeCell;
|
|
891
|
+
const cellElement = args.target;
|
|
892
|
+
if (!cellElement) {
|
|
893
|
+
return false;
|
|
894
|
+
}
|
|
895
|
+
const dragCell = closest(cellElement, (el) => hasClasses(el, 'k-drag-cell'));
|
|
896
|
+
if (!dragCell || row.dataRowIndex < 0 || !row.dataItem) {
|
|
897
|
+
return false;
|
|
898
|
+
}
|
|
899
|
+
const isUpArrow = code === Keys.ArrowUp;
|
|
900
|
+
const currentRowIndex = row.dataRowIndex;
|
|
901
|
+
const data = this.ctx.grid.flatData;
|
|
902
|
+
if (!data || data.length === 0) {
|
|
903
|
+
return false;
|
|
904
|
+
}
|
|
905
|
+
const targetRowIndex = currentRowIndex + (isUpArrow ? -1 : 1);
|
|
906
|
+
if (targetRowIndex < 0 || targetRowIndex >= data.length) {
|
|
907
|
+
return false;
|
|
908
|
+
}
|
|
909
|
+
const dropPosition = isUpArrow ? 'before' : 'after';
|
|
910
|
+
this.zone.run(() => {
|
|
911
|
+
const skip = this.ctx.grid.skip || 0;
|
|
912
|
+
this.ctx.grid.rowReorderService.reorderViaKeyboard(currentRowIndex + skip, targetRowIndex + skip, dropPosition, data);
|
|
913
|
+
// Move focus to follow the reordered row
|
|
914
|
+
// After reordering, the row will be at the target position
|
|
915
|
+
this.zone.onStable.pipe(take(1)).subscribe(() => {
|
|
916
|
+
const newRowIndex = this.meta.headerRows + targetRowIndex;
|
|
917
|
+
this.cursor.reset(newRowIndex, cell.colIndex);
|
|
918
|
+
});
|
|
919
|
+
});
|
|
920
|
+
return true;
|
|
921
|
+
}
|
|
876
922
|
handleStackedKeydown(args) {
|
|
877
923
|
const target = args.target;
|
|
878
924
|
const stackedCell = closest(target, (el) => hasClasses(el, 'k-grid-stack-cell'));
|
|
@@ -10,7 +10,7 @@ export const packageMetadata = {
|
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCode: 'KENDOUIANGULAR',
|
|
12
12
|
productCodes: ['KENDOUIANGULAR'],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: '21.0.0-develop.
|
|
13
|
+
publishDate: 1762426875,
|
|
14
|
+
version: '21.0.0-develop.21',
|
|
15
15
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
16
16
|
};
|
|
@@ -90,11 +90,17 @@ export class PDFComponent extends PDFExportComponent {
|
|
|
90
90
|
this.drawSubscription = pdfService.drawPDF.subscribe(this.drawPDF.bind(this));
|
|
91
91
|
this.reset = this.reset.bind(this);
|
|
92
92
|
this.draw = this.draw.bind(this);
|
|
93
|
+
if (this.ctx) {
|
|
94
|
+
this.ctx.pdfComponent = this;
|
|
95
|
+
}
|
|
93
96
|
}
|
|
94
97
|
ngOnDestroy() {
|
|
95
98
|
this.saveSubscription.unsubscribe();
|
|
96
99
|
this.drawSubscription.unsubscribe();
|
|
97
100
|
this.reset();
|
|
101
|
+
if (this.ctx?.pdfComponent === this) {
|
|
102
|
+
this.ctx.pdfComponent = undefined;
|
|
103
|
+
}
|
|
98
104
|
}
|
|
99
105
|
/**
|
|
100
106
|
* @hidden
|