@progress/kendo-angular-grid 14.4.0-develop.14 → 14.4.0-develop.16
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/NOTICE.txt +146 -593
- package/common/clipboard-types.d.ts +102 -0
- package/common/clipboard.directive.d.ts +53 -0
- package/common/clipboard.service.d.ts +28 -0
- package/common/dom-events.service.d.ts +1 -0
- package/common/error-messages.d.ts +12 -0
- package/databinding.directive.d.ts +1 -1
- package/esm2020/column-menu/column-menu-item-base.mjs +2 -1
- package/esm2020/columns/column-base.mjs +3 -2
- package/esm2020/columns/column-group.component.mjs +2 -1
- package/esm2020/columns/span-column.component.mjs +2 -1
- package/esm2020/common/clipboard-types.mjs +5 -0
- package/esm2020/common/clipboard.directive.mjs +190 -0
- package/esm2020/common/clipboard.service.mjs +191 -0
- package/esm2020/common/dom-events.service.mjs +1 -0
- package/esm2020/common/error-messages.mjs +46 -1
- package/esm2020/databinding.directive.mjs +3 -2
- package/esm2020/editing-directives/local-edit.service.mjs +2 -2
- package/esm2020/excel/excel.service.mjs +2 -1
- package/esm2020/grid.component.mjs +40 -34
- package/esm2020/grid.module.mjs +8 -4
- package/esm2020/grouping/group-scroll-binding.directive.mjs +2 -3
- package/esm2020/index.mjs +2 -0
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/pdf/pdf.component.mjs +3 -2
- package/esm2020/pdf/pdf.service.mjs +2 -1
- package/esm2020/rendering/details/detail-template.directive.mjs +2 -1
- package/esm2020/selection/selection-default.mjs +11 -5
- package/esm2020/utils.mjs +10 -0
- package/fesm2015/progress-kendo-angular-grid.mjs +498 -72
- package/fesm2020/progress-kendo-angular-grid.mjs +495 -72
- package/grid.component.d.ts +7 -1
- package/grid.module.d.ts +99 -98
- package/index.d.ts +3 -1
- package/package.json +16 -16
- package/schematics/ngAdd/index.js +3 -3
- package/selection/selection-default.d.ts +10 -4
- package/selection/types.d.ts +6 -0
- package/utils.d.ts +8 -0
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Injectable } from '@angular/core';
|
|
6
|
+
import { ColumnComponent } from '../columns/column.component';
|
|
7
|
+
import { isPresent } from '@progress/kendo-angular-common';
|
|
8
|
+
import { ContextService } from './provider.service';
|
|
9
|
+
import { groupBy } from '@progress/kendo-data-query';
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
11
|
+
import * as i1 from "./provider.service";
|
|
12
|
+
/**
|
|
13
|
+
* @hidden
|
|
14
|
+
*/
|
|
15
|
+
export class ClipboardService {
|
|
16
|
+
constructor(contextService) {
|
|
17
|
+
this.contextService = contextService;
|
|
18
|
+
this.itemToString = (item, cols) => {
|
|
19
|
+
if (!cols.length) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
return cols.map(col => item[col.field]).join(`\t`);
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
createClipboardData(data, columns, options) {
|
|
26
|
+
let result = {
|
|
27
|
+
gridItems: [],
|
|
28
|
+
dataString: ''
|
|
29
|
+
};
|
|
30
|
+
if (options.wholeRow) {
|
|
31
|
+
const fieldCols = columns.flatMap(c => c instanceof ColumnComponent && isPresent(c.field) ? [c] : []);
|
|
32
|
+
this.targetColField = fieldCols[0]?.field;
|
|
33
|
+
this.targetRowIndex = data[0].dataRowIndex;
|
|
34
|
+
const clipboardData = { items: [], dataStrings: [] };
|
|
35
|
+
const colFields = fieldCols.map(c => c.field);
|
|
36
|
+
data.forEach(item => {
|
|
37
|
+
clipboardData.items.push({ dataItem: { ...item.dataItem }, fields: colFields });
|
|
38
|
+
clipboardData.dataStrings.push(this.itemToString(item.dataItem, fieldCols));
|
|
39
|
+
});
|
|
40
|
+
result = {
|
|
41
|
+
gridItems: options.operationType === 'cut' ? clipboardData.items.map(item => {
|
|
42
|
+
item.fields.forEach(field => item.dataItem[field] = null);
|
|
43
|
+
return item;
|
|
44
|
+
}) : [...clipboardData.items],
|
|
45
|
+
dataString: options.copyHeaders ? this.addHeaders(clipboardData.dataStrings.join(`\r\n`), fieldCols) : clipboardData.dataStrings.join(`\n`)
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
const { tabular, groups } = this.groupSelection();
|
|
50
|
+
const selectionDirective = this.contextService.grid.selectionDirective;
|
|
51
|
+
const colIdentifier = selectionDirective.columnKey;
|
|
52
|
+
if (tabular) {
|
|
53
|
+
const selectionKeys = groups[0].items.map(item => item.columnKey);
|
|
54
|
+
const selectedFieldCols = columns.flatMap((c, i) => (c instanceof ColumnComponent && c.field) && selectionKeys.find(k => typeof colIdentifier === 'function' ? k === colIdentifier(c, i) : k === i) ? [c] : []);
|
|
55
|
+
const selectedColFields = selectedFieldCols.map(c => c.field);
|
|
56
|
+
this.targetColField = selectedColFields[0];
|
|
57
|
+
result.dataString = data.flatMap(item => {
|
|
58
|
+
const itemString = this.itemToString(item.dataItem, selectedFieldCols);
|
|
59
|
+
const existingItem = isPresent(itemString);
|
|
60
|
+
if (!isPresent(this.targetRowIndex) && isPresent(itemString)) {
|
|
61
|
+
this.targetRowIndex = item.dataRowIndex;
|
|
62
|
+
}
|
|
63
|
+
result.gridItems.push({
|
|
64
|
+
dataItem: item.dataItem,
|
|
65
|
+
fields: selectedColFields
|
|
66
|
+
});
|
|
67
|
+
return existingItem ? [itemString] : [];
|
|
68
|
+
}).join(`\r\n`);
|
|
69
|
+
if (options.copyHeaders) {
|
|
70
|
+
result.dataString = this.addHeaders(result.dataString, selectedFieldCols);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
else { // split per row (uneven rows)
|
|
74
|
+
const rowIdentifier = selectionDirective.selectionKey;
|
|
75
|
+
result.dataString = data.flatMap(item => {
|
|
76
|
+
// determine cols per item
|
|
77
|
+
const key = rowIdentifier ?
|
|
78
|
+
typeof rowIdentifier === 'string' ? item.dataItem[rowIdentifier] : rowIdentifier({ index: item.dataRowIndex, dataItem: item.dataItem }) :
|
|
79
|
+
item.dataRowIndex;
|
|
80
|
+
const selectionKeys = groups.find(gr => gr.value === key).items.map(item => item.columnKey);
|
|
81
|
+
const selectedFieldCols = columns.flatMap((c, i) => (c instanceof ColumnComponent && c.field) && selectionKeys.find(k => typeof colIdentifier === 'function' ? k === colIdentifier(c, i) : k === i) ? [c] : []);
|
|
82
|
+
const selectedColFields = selectedFieldCols.map(c => c.field);
|
|
83
|
+
if (!this.targetColField) {
|
|
84
|
+
this.targetColField = selectedColFields[0];
|
|
85
|
+
}
|
|
86
|
+
const itemString = this.itemToString(item.dataItem, selectedFieldCols);
|
|
87
|
+
const existingItem = isPresent(itemString);
|
|
88
|
+
if (!isPresent(this.targetRowIndex) && existingItem) {
|
|
89
|
+
this.targetRowIndex = item.dataRowIndex;
|
|
90
|
+
}
|
|
91
|
+
if (existingItem) {
|
|
92
|
+
result.gridItems.push({
|
|
93
|
+
dataItem: item.dataItem,
|
|
94
|
+
fields: selectedColFields
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
return existingItem ? options.copyHeaders ? [this.addHeaders(itemString, selectedFieldCols)] : [itemString] : [];
|
|
98
|
+
}).join(`\r\n`);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return result;
|
|
102
|
+
}
|
|
103
|
+
getGridData(data, columns, targetType, targetRowIndex, options) {
|
|
104
|
+
const separator = data.includes(`\r\n`) ? `\r\n` : data.includes(`\n`) ? `\n` : null;
|
|
105
|
+
const dataRows = separator ? data.split(separator) : [data];
|
|
106
|
+
this.targetRowIndex = targetRowIndex;
|
|
107
|
+
if (targetType === 'activeCell') {
|
|
108
|
+
if (options.wholeRow) {
|
|
109
|
+
this.targetColField = columns.find(c => c instanceof ColumnComponent && c.field)?.field;
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
const activeCellIndex = this.contextService.grid.activeCell.colIndex;
|
|
113
|
+
for (let i = 0; i < columns.length; i++) {
|
|
114
|
+
const col = columns[i];
|
|
115
|
+
if (col instanceof ColumnComponent && col.field && i >= activeCellIndex) {
|
|
116
|
+
this.targetColField = col.field;
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
if (options.wholeRow || !options.isCellSelection) {
|
|
124
|
+
this.targetColField = (columns.filter(c => c instanceof ColumnComponent && c.field))[0]['field'];
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
const { groups } = this.groupSelection();
|
|
128
|
+
const selectionDirective = this.contextService.grid.selectionDirective;
|
|
129
|
+
const colIdentifier = selectionDirective.columnKey;
|
|
130
|
+
const visibleCols = columns.filter(c => c.isVisible);
|
|
131
|
+
const selectionKeys = groups[0].items.map(item => item.columnKey);
|
|
132
|
+
const selectedFieldCols = visibleCols.flatMap((c, i) => (c instanceof ColumnComponent && c.field) && selectionKeys.find(k => typeof colIdentifier === 'function' ? k === colIdentifier(c, i) : k === i) ? [c] : []);
|
|
133
|
+
const selectedColFields = selectedFieldCols.map(c => c.field);
|
|
134
|
+
this.targetColField = selectedColFields[0];
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
const items = dataRows.map(rowString => {
|
|
138
|
+
const cells = rowString.includes(`\t`) ? rowString.split(`\t`) : [rowString];
|
|
139
|
+
const colFields = columns.flatMap(c => (c instanceof ColumnComponent) && c.field ? [c.field] : []);
|
|
140
|
+
const targetColFieldIndex = colFields.indexOf(this.targetColField);
|
|
141
|
+
const affectedFields = colFields.slice(targetColFieldIndex, targetColFieldIndex + cells.length);
|
|
142
|
+
const item = {};
|
|
143
|
+
colFields.slice(targetColFieldIndex, targetColFieldIndex + cells.length).forEach((colField, index) => item[colField] = cells[index]);
|
|
144
|
+
return {
|
|
145
|
+
dataItem: item,
|
|
146
|
+
fields: affectedFields
|
|
147
|
+
};
|
|
148
|
+
});
|
|
149
|
+
return items;
|
|
150
|
+
}
|
|
151
|
+
groupSelection() {
|
|
152
|
+
const selection = this.contextService.grid.selection;
|
|
153
|
+
const groups = groupBy(selection, [{ field: 'itemKey' }])
|
|
154
|
+
.map(gr => {
|
|
155
|
+
gr.items.sort((a, b) => a.columnKey - b.columnKey);
|
|
156
|
+
return gr;
|
|
157
|
+
});
|
|
158
|
+
for (let i = 1; i < groups.length; i++) {
|
|
159
|
+
if (!this.areEqual(groups[i].items, groups[i - 1].items)) {
|
|
160
|
+
return {
|
|
161
|
+
tabular: false,
|
|
162
|
+
groups
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return {
|
|
167
|
+
tabular: true,
|
|
168
|
+
groups
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
areEqual(arr1, arr2) {
|
|
172
|
+
if (arr1.length !== arr2.length) {
|
|
173
|
+
return false;
|
|
174
|
+
}
|
|
175
|
+
for (let i = 0; i < arr1.length; i++) {
|
|
176
|
+
if (arr1[i].columnKey !== arr2[i].columnKey) {
|
|
177
|
+
return false;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
return true;
|
|
181
|
+
}
|
|
182
|
+
addHeaders(initialData, cols) {
|
|
183
|
+
const headersRowData = cols.map(c => c.title || c.field).join(`\t`);
|
|
184
|
+
return `${headersRowData}\r\n${initialData}`;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
ClipboardService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ClipboardService, deps: [{ token: i1.ContextService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
188
|
+
ClipboardService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ClipboardService });
|
|
189
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ClipboardService, decorators: [{
|
|
190
|
+
type: Injectable
|
|
191
|
+
}], ctorParameters: function () { return [{ type: i1.ContextService }]; } });
|
|
@@ -18,6 +18,7 @@ export class DomEventsService {
|
|
|
18
18
|
this.focusIn = new EventEmitter();
|
|
19
19
|
this.focusOut = new EventEmitter();
|
|
20
20
|
this.windowBlur = new EventEmitter();
|
|
21
|
+
this.paste = new EventEmitter();
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
DomEventsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DomEventsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -7,5 +7,50 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export const ColumnMenuErrorMessages = {
|
|
9
9
|
autoSizeColumn: 'The auto size column does not work with enabled virtual columns',
|
|
10
|
-
autoSizeAllColumns: 'The auto size all columns does not work with enabled virtual columns'
|
|
10
|
+
autoSizeAllColumns: 'The auto size all columns does not work with enabled virtual columns',
|
|
11
|
+
serviceInput: 'The service input of the predefined column menu components is mandatory.'
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
export const ClipboardErrorMessages = {
|
|
17
|
+
clipboardTarget: 'The "clipboardTarget" option must be set for the ClipboardDirective to function as designed.',
|
|
18
|
+
activeCellNavigable: 'Grid must be navigable to use "activeCell" as clipboard target type.',
|
|
19
|
+
selectionStartSelectable: 'Grid must be selectable to use "selectionStart" as clipboard target type.'
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* @hidden
|
|
23
|
+
*/
|
|
24
|
+
export const ColumnConfigurationErrorMessages = {
|
|
25
|
+
fieldName: (field) => `Grid column field name '${field}' does not look like a valid JavaScript identifier.
|
|
26
|
+
Identifiers can contain only alphanumeric characters (including "$" or "_"), and may not start with a digit.
|
|
27
|
+
Please use only valid identifier names to ensure error-free operation.`,
|
|
28
|
+
width: (value, parsedValue) => `Expected numeric value for column width, but got a string "${value}". Treating as ${parsedValue}px.`,
|
|
29
|
+
invalidColumn: (column) => `Invalid column ${column}.`,
|
|
30
|
+
requiredWidth: (columnType) => `${columnType} columns feature requires all columns to have set width.`,
|
|
31
|
+
requiredScroll: (columnType) => `${columnType} columns are only supported when scrolling is enabled.`,
|
|
32
|
+
groupColumnContent: 'ColumnGroupComponent should contain ColumnComponent or CommandColumnComponent.',
|
|
33
|
+
lockedParent: 'Locked child columns require their parent columns to be locked.',
|
|
34
|
+
columnNested: 'Columns can be nested only inside ColumnGroupComponent',
|
|
35
|
+
nestedInside: (nestedColumnNameType, parentColumnType) => `${nestedColumnNameType} cannot be nested inside ${parentColumnType}.`
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* @hidden
|
|
39
|
+
*/
|
|
40
|
+
export const GridConfigurationErrorMessages = {
|
|
41
|
+
functionType: (propName, fn) => `${propName} must be a function, but received ${JSON.stringify(fn)}.`,
|
|
42
|
+
incompatibleFeatures: (feat1Name, feat2Name) => `'Having both ${feat1Name} and ${feat2Name} is not supported.'`,
|
|
43
|
+
nonLockedColumnPresent: 'There should be at least one non-locked column',
|
|
44
|
+
rowHeightVirtual: 'Row height and detail row height settings require virtual scrolling mode to be enabled.',
|
|
45
|
+
focusNavigable: 'The Grid should be configured as navigable to control focus',
|
|
46
|
+
expandCollapseMethods: (expandMethodName, collapseMethodName, directiveName, callbackName) => `The ${expandMethodName} and ${collapseMethodName} methods should not be called
|
|
47
|
+
when using the ${directiveName} directive or the ${callbackName} callback.
|
|
48
|
+
These methods are provided only for backwards compatibility with legacy versions.`,
|
|
49
|
+
requiredEditService: `The default edit service of the editing directives works only when binding to plain array.
|
|
50
|
+
Please provide an editService.`,
|
|
51
|
+
requiredModule: (exportedType, moduleName, componentSelector) => `Creating ${exportedType} requires including the ${moduleName} and adding the ${componentSelector} component.`,
|
|
52
|
+
groupBindingDirectives: `Using the "kendoGridGroupBinding" directive in combination with the "kendoGridExpandGroupBy" directive
|
|
53
|
+
or the "isGroupExpanded" callback is not supported. To use grouping with the "kendoGridGroupBinding" directive,
|
|
54
|
+
set the Grid "groupable" property to "true".`,
|
|
55
|
+
unsupportedMethod: (methodName, suggestedMethodName) => `Using ${methodName} in this context is not supported. Use ${suggestedMethodName} instead.`
|
|
11
56
|
};
|
|
@@ -171,11 +171,12 @@ export class DataBindingDirective {
|
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
DataBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DataBindingDirective, deps: [{ token: i1.GridComponent }, { token: i0.ChangeDetectorRef }, { token: i2.LocalDataChangesService }, { token: i3.RowReorderService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
174
|
-
DataBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: DataBindingDirective, selector: "[kendoGridBinding]", inputs: { skip: "skip", sort: "sort", filter: "filter", pageSize: "pageSize", group: "group", data: ["kendoGridBinding", "data"] }, usesOnChanges: true, ngImport: i0 });
|
|
174
|
+
DataBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: DataBindingDirective, selector: "[kendoGridBinding]", inputs: { skip: "skip", sort: "sort", filter: "filter", pageSize: "pageSize", group: "group", data: ["kendoGridBinding", "data"] }, exportAs: ["kendoGridBinding"], usesOnChanges: true, ngImport: i0 });
|
|
175
175
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DataBindingDirective, decorators: [{
|
|
176
176
|
type: Directive,
|
|
177
177
|
args: [{
|
|
178
|
-
selector: '[kendoGridBinding]'
|
|
178
|
+
selector: '[kendoGridBinding]',
|
|
179
|
+
exportAs: 'kendoGridBinding'
|
|
179
180
|
}]
|
|
180
181
|
}], ctorParameters: function () { return [{ type: i1.GridComponent }, { type: i0.ChangeDetectorRef }, { type: i2.LocalDataChangesService }, { type: i3.RowReorderService }]; }, propDecorators: { skip: [{
|
|
181
182
|
type: Input
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { isDevMode } from '@angular/core';
|
|
6
|
+
import { GridConfigurationErrorMessages } from '../common/error-messages';
|
|
6
7
|
/**
|
|
7
8
|
* @hidden
|
|
8
9
|
*/
|
|
@@ -52,8 +53,7 @@ export class LocalEditService {
|
|
|
52
53
|
return data;
|
|
53
54
|
}
|
|
54
55
|
if (isDevMode()) {
|
|
55
|
-
throw new Error(
|
|
56
|
-
'Please provide an editService.');
|
|
56
|
+
throw new Error(GridConfigurationErrorMessages.requiredEditService);
|
|
57
57
|
}
|
|
58
58
|
return [];
|
|
59
59
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { EventEmitter, Injectable, isDevMode } from '@angular/core';
|
|
6
|
+
import { GridConfigurationErrorMessages } from '../common/error-messages';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
/**
|
|
8
9
|
* @hidden
|
|
@@ -15,7 +16,7 @@ export class ExcelService {
|
|
|
15
16
|
save(component) {
|
|
16
17
|
if (this.saveToExcel.observers.length === 0) {
|
|
17
18
|
if (isDevMode()) {
|
|
18
|
-
throw new Error('
|
|
19
|
+
throw new Error(GridConfigurationErrorMessages.requiredModule('excel', 'ExcelModule', '<kendo-grid-excel>'));
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
22
|
else {
|
|
@@ -77,6 +77,8 @@ import { DragTargetContainerDirective, DropTargetContainerDirective } from '@pro
|
|
|
77
77
|
import { RowReorderService } from './row-reordering/row-reorder.service';
|
|
78
78
|
import { StatusBarTemplateDirective } from './aggregates/status-bar-template.directive';
|
|
79
79
|
import { CellSelectionAggregateService } from './aggregates/selection-aggregate.service';
|
|
80
|
+
import { ClipboardService } from './common/clipboard.service';
|
|
81
|
+
import { ColumnConfigurationErrorMessages, GridConfigurationErrorMessages } from './common/error-messages';
|
|
80
82
|
import * as i0 from "@angular/core";
|
|
81
83
|
import * as i1 from "./layout/browser-support.service";
|
|
82
84
|
import * as i2 from "./selection/selection.service";
|
|
@@ -128,11 +130,7 @@ const createControl = (source) => (acc, key) => {
|
|
|
128
130
|
const validateColumnsField = (columns) => expandColumns(columns.toArray())
|
|
129
131
|
.filter(isColumnComponent)
|
|
130
132
|
.filter(({ field }) => !isValidFieldName(field))
|
|
131
|
-
.forEach(({ field }) => console.warn(
|
|
132
|
-
Grid column field name '${field}' does not look like a valid JavaScript identifier.
|
|
133
|
-
Identifiers can contain only alphanumeric characters (including "$" or "_"), and may not start with a digit.
|
|
134
|
-
Please use only valid identifier names to ensure error-free operation.
|
|
135
|
-
`));
|
|
133
|
+
.forEach(({ field }) => console.warn(ColumnConfigurationErrorMessages.fieldName(field)));
|
|
136
134
|
const handleExpandCollapseGroupsService = (service, expandEmitter, collapseEmitter, map) => (service.changes.pipe(filter(({ group }) => isPresent(group)))
|
|
137
135
|
.subscribe((x) => x.expand ? expandEmitter.emit(map(x)) : collapseEmitter.emit(map(x))));
|
|
138
136
|
const handleExpandCollapseDetailsService = (service, expandEmitter, collapseEmitter, map) => (service.changes.pipe(filter(({ dataItem }) => isPresent(dataItem)))
|
|
@@ -647,7 +645,7 @@ export class GridComponent {
|
|
|
647
645
|
*/
|
|
648
646
|
set rowClass(fn) {
|
|
649
647
|
if (isDevMode() && typeof fn !== 'function') {
|
|
650
|
-
throw new Error(
|
|
648
|
+
throw new Error(GridConfigurationErrorMessages.functionType('rowClass', fn));
|
|
651
649
|
}
|
|
652
650
|
this._rowClass = fn;
|
|
653
651
|
}
|
|
@@ -660,7 +658,7 @@ export class GridComponent {
|
|
|
660
658
|
*/
|
|
661
659
|
set rowSticky(fn) {
|
|
662
660
|
if (isDevMode() && isPresent(fn) && typeof fn !== 'function') {
|
|
663
|
-
throw new Error(
|
|
661
|
+
throw new Error(GridConfigurationErrorMessages.functionType('rowSticky', fn));
|
|
664
662
|
}
|
|
665
663
|
if (isPresent(fn)) {
|
|
666
664
|
this._rowSticky = fn;
|
|
@@ -676,7 +674,7 @@ export class GridComponent {
|
|
|
676
674
|
*/
|
|
677
675
|
set rowSelected(fn) {
|
|
678
676
|
if (isDevMode() && typeof fn !== 'function') {
|
|
679
|
-
throw new Error(
|
|
677
|
+
throw new Error(GridConfigurationErrorMessages.functionType('rowSelected', fn));
|
|
680
678
|
}
|
|
681
679
|
this._rowSelected = fn;
|
|
682
680
|
}
|
|
@@ -693,7 +691,7 @@ export class GridComponent {
|
|
|
693
691
|
*/
|
|
694
692
|
set cellSelected(fn) {
|
|
695
693
|
if (isDevMode() && typeof fn !== 'function') {
|
|
696
|
-
throw new Error(
|
|
694
|
+
throw new Error(GridConfigurationErrorMessages.functionType('cellSelected', fn));
|
|
697
695
|
}
|
|
698
696
|
this._cellSelected = fn;
|
|
699
697
|
}
|
|
@@ -712,6 +710,16 @@ export class GridComponent {
|
|
|
712
710
|
get activeRow() {
|
|
713
711
|
return this.navigationService.activeRow;
|
|
714
712
|
}
|
|
713
|
+
/**
|
|
714
|
+
* Returns the current Grid selection.
|
|
715
|
+
*
|
|
716
|
+
* @hidden
|
|
717
|
+
*/
|
|
718
|
+
get selection() {
|
|
719
|
+
return (this.selectable || this.selectionDirective) ?
|
|
720
|
+
this.defaultSelection ? this.defaultSelection.stateToArray() : this.selectionDirective.stateToArray() :
|
|
721
|
+
[];
|
|
722
|
+
}
|
|
715
723
|
/**
|
|
716
724
|
* Specifies if the loading indicator of the Grid will be displayed ([see example]({% slug binding_grid %})).
|
|
717
725
|
*
|
|
@@ -1628,7 +1636,7 @@ export class GridComponent {
|
|
|
1628
1636
|
instance = column;
|
|
1629
1637
|
}
|
|
1630
1638
|
if (!instance && isDevMode()) {
|
|
1631
|
-
throw new Error(
|
|
1639
|
+
throw new Error(ColumnConfigurationErrorMessages.invalidColumn(column));
|
|
1632
1640
|
}
|
|
1633
1641
|
return instance;
|
|
1634
1642
|
}
|
|
@@ -1637,43 +1645,43 @@ export class GridComponent {
|
|
|
1637
1645
|
const locked = this.lockedLeafColumns.length || (this.columnMenu && this.columnMenu.lock);
|
|
1638
1646
|
const stickyColumns = this.stickyColumns.length || (this.columnMenu && this.columnMenu.stick);
|
|
1639
1647
|
if (locked && this.detailTemplate) {
|
|
1640
|
-
throw new Error('
|
|
1648
|
+
throw new Error(GridConfigurationErrorMessages.incompatibleFeatures('detail template', 'locked columns'));
|
|
1641
1649
|
}
|
|
1642
1650
|
if (stickyColumns && this.detailTemplate) {
|
|
1643
|
-
throw new Error('
|
|
1651
|
+
throw new Error(GridConfigurationErrorMessages.incompatibleFeatures('detail template', 'sticky columns'));
|
|
1644
1652
|
}
|
|
1645
1653
|
if (this.lockedLeafColumns.length && !this.nonLockedLeafColumns.length) {
|
|
1646
|
-
throw new Error(
|
|
1654
|
+
throw new Error(GridConfigurationErrorMessages.nonLockedColumnPresent);
|
|
1647
1655
|
}
|
|
1648
1656
|
if ((locked || this.virtualColumns) && expandColumns(this.columnList.toArray()).filter(column => !column.width && !isColumnGroupComponent(column)).length) {
|
|
1649
|
-
throw new Error((locked ? 'Locked' : 'Virtual')
|
|
1657
|
+
throw new Error(ColumnConfigurationErrorMessages.requiredWidth(locked ? 'Locked' : 'Virtual'));
|
|
1650
1658
|
}
|
|
1651
1659
|
if (locked && !this.isScrollable) {
|
|
1652
|
-
throw new Error('Locked
|
|
1660
|
+
throw new Error(ColumnConfigurationErrorMessages.requiredScroll('Locked'));
|
|
1661
|
+
}
|
|
1662
|
+
if (stickyColumns && !this.isScrollable) {
|
|
1663
|
+
throw new Error(ColumnConfigurationErrorMessages.requiredScroll('Sticky'));
|
|
1653
1664
|
}
|
|
1654
1665
|
if (this.columnList.filter(isColumnGroupComponent).filter((x) => !x.hasChildren).length) {
|
|
1655
|
-
throw new Error(
|
|
1666
|
+
throw new Error(ColumnConfigurationErrorMessages.groupColumnContent);
|
|
1656
1667
|
}
|
|
1657
1668
|
if (this.columnList.filter(x => x.locked && x.parent && !x.parent.isLocked).length) {
|
|
1658
|
-
throw new Error(
|
|
1669
|
+
throw new Error(ColumnConfigurationErrorMessages.lockedParent);
|
|
1659
1670
|
}
|
|
1660
1671
|
if ((this.rowHeight || this.detailRowHeight) && !this.isVirtual) {
|
|
1661
|
-
throw new Error(
|
|
1672
|
+
throw new Error(GridConfigurationErrorMessages.rowHeightVirtual);
|
|
1662
1673
|
}
|
|
1663
1674
|
if (stickyColumns && expandColumns(this.columnList.toArray()).filter(column => !column.width && !isColumnGroupComponent(column)).length) {
|
|
1664
|
-
throw new Error('Sticky
|
|
1665
|
-
}
|
|
1666
|
-
if (stickyColumns && !this.isScrollable) {
|
|
1667
|
-
throw new Error('Sticky columns are only supported when scrolling is enabled.');
|
|
1675
|
+
throw new Error(ColumnConfigurationErrorMessages.requiredWidth('Sticky'));
|
|
1668
1676
|
}
|
|
1669
1677
|
if (stickyColumns && this.virtualColumns) {
|
|
1670
|
-
throw new Error('
|
|
1678
|
+
throw new Error(GridConfigurationErrorMessages.incompatibleFeatures('sticky columns', 'column virtualization'));
|
|
1671
1679
|
}
|
|
1672
1680
|
if (this.rowSticky && this.scrollable === 'virtual') {
|
|
1673
|
-
throw new Error('
|
|
1681
|
+
throw new Error(GridConfigurationErrorMessages.incompatibleFeatures('sticky rows', 'row virtualization (scrollable="virtual")'));
|
|
1674
1682
|
}
|
|
1675
1683
|
if (this.rowSticky && this.groupable) {
|
|
1676
|
-
throw new Error('
|
|
1684
|
+
throw new Error(GridConfigurationErrorMessages.incompatibleFeatures('sticky rows', 'grouping'));
|
|
1677
1685
|
}
|
|
1678
1686
|
validateColumnsField(this.columnList);
|
|
1679
1687
|
}
|
|
@@ -1872,7 +1880,7 @@ export class GridComponent {
|
|
|
1872
1880
|
}
|
|
1873
1881
|
assertNavigable() {
|
|
1874
1882
|
if (isDevMode() && !this.navigationService.enabled) {
|
|
1875
|
-
throw new Error(
|
|
1883
|
+
throw new Error(GridConfigurationErrorMessages.focusNavigable);
|
|
1876
1884
|
}
|
|
1877
1885
|
}
|
|
1878
1886
|
navigationMetadata() {
|
|
@@ -1944,9 +1952,7 @@ export class GridComponent {
|
|
|
1944
1952
|
toggleDetailRowLegacy(index, expand) {
|
|
1945
1953
|
const hasCallback = typeof this.isDetailExpanded === 'function';
|
|
1946
1954
|
if (isDevMode() && hasCallback) {
|
|
1947
|
-
throw new Error('
|
|
1948
|
-
'kendoGridDetailsExpandBy directive or the isDetailExpanded callback. ' +
|
|
1949
|
-
'These methods are provided only for backwards compatibility with legacy versions.');
|
|
1955
|
+
throw new Error(GridConfigurationErrorMessages.expandCollapseMethods('expandRow', 'collapseRow', 'kendoGridDetailsExpandBy', 'isDetailExpanded'));
|
|
1950
1956
|
}
|
|
1951
1957
|
if (!isDevMode() && hasCallback) {
|
|
1952
1958
|
return;
|
|
@@ -1958,9 +1964,7 @@ export class GridComponent {
|
|
|
1958
1964
|
toggleGroupRowLegacy(index, expand) {
|
|
1959
1965
|
const hasCallback = typeof this.isGroupExpanded === 'function';
|
|
1960
1966
|
if (isDevMode() && hasCallback) {
|
|
1961
|
-
throw new Error('
|
|
1962
|
-
'kendoGridExpandGroupBy directive or the isGroupExpanded callback. ' +
|
|
1963
|
-
'These methods are provided only for backwards compatibility with legacy versions.');
|
|
1967
|
+
throw new Error(GridConfigurationErrorMessages.expandCollapseMethods('expandGroup', 'collapseGroup', 'kendoGridExpandGroupBy', 'isGroupExpanded'));
|
|
1964
1968
|
}
|
|
1965
1969
|
if (!isDevMode() && hasCallback) {
|
|
1966
1970
|
return;
|
|
@@ -2034,7 +2038,8 @@ GridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
|
|
|
2034
2038
|
SortService,
|
|
2035
2039
|
ContextService,
|
|
2036
2040
|
SizingOptionsService,
|
|
2037
|
-
RowReorderService
|
|
2041
|
+
RowReorderService,
|
|
2042
|
+
ClipboardService
|
|
2038
2043
|
], queries: [{ propertyName: "columns", predicate: ColumnBase }, { propertyName: "detailTemplateChildren", predicate: DetailTemplateDirective }, { propertyName: "cellLoadingTemplateChildren", predicate: CellLoadingTemplateDirective }, { propertyName: "loadingTemplateChildren", predicate: LoadingTemplateDirective }, { propertyName: "statusBarTemplateChildren", predicate: StatusBarTemplateDirective }, { propertyName: "noRecordsTemplateChildren", predicate: NoRecordsTemplateDirective }, { propertyName: "pagerTemplateChildren", predicate: PagerTemplateDirective }, { propertyName: "toolbarTemplateChildren", predicate: ToolbarTemplateDirective }, { propertyName: "columnMenuTemplates", predicate: ColumnMenuTemplateDirective }], viewQueries: [{ propertyName: "lockedHeader", first: true, predicate: ["lockedHeader"], descendants: true }, { propertyName: "header", first: true, predicate: ["header"], descendants: true }, { propertyName: "ariaRoot", first: true, predicate: ["ariaRoot"], descendants: true, static: true }, { propertyName: "dragTargetContainer", first: true, predicate: DragTargetContainerDirective, descendants: true }, { propertyName: "dropTargetContainer", first: true, predicate: DropTargetContainerDirective, descendants: true }, { propertyName: "footer", predicate: ["footer"], descendants: true }], exportAs: ["kendoGrid"], usesOnChanges: true, ngImport: i0, template: `
|
|
2039
2044
|
<ng-container kendoGridLocalizedMessages
|
|
2040
2045
|
i18n-groupPanelEmpty="kendo.grid.groupPanelEmpty|The label visible in the Grid group panel when it is empty"
|
|
@@ -2662,7 +2667,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2662
2667
|
SortService,
|
|
2663
2668
|
ContextService,
|
|
2664
2669
|
SizingOptionsService,
|
|
2665
|
-
RowReorderService
|
|
2670
|
+
RowReorderService,
|
|
2671
|
+
ClipboardService
|
|
2666
2672
|
],
|
|
2667
2673
|
selector: 'kendo-grid',
|
|
2668
2674
|
template: `
|
package/esm2020/grid.module.mjs
CHANGED
|
@@ -34,6 +34,7 @@ import { FilterMenuModule } from "./filtering/menu/filter-menu.module";
|
|
|
34
34
|
import { ColumnMenuModule } from './column-menu/column-menu.module';
|
|
35
35
|
import { GridToolbarFocusableDirective } from './rendering/toolbar/toolbar-focusable.directive';
|
|
36
36
|
import { DragAndDropModule } from '@progress/kendo-angular-utils';
|
|
37
|
+
import { GridClipboardDirective } from './common/clipboard.directive';
|
|
37
38
|
import * as i0 from "@angular/core";
|
|
38
39
|
import * as i1 from "./grouping/group-header-template.directive";
|
|
39
40
|
import * as i2 from "./grouping/group-header-column-template.directive";
|
|
@@ -144,7 +145,8 @@ const exportedModules = [
|
|
|
144
145
|
...PagerModule.exports(),
|
|
145
146
|
...RowFilterModule.exports(),
|
|
146
147
|
...FilterMenuModule.exports(),
|
|
147
|
-
...ColumnMenuModule.exports()
|
|
148
|
+
...ColumnMenuModule.exports(),
|
|
149
|
+
GridClipboardDirective
|
|
148
150
|
];
|
|
149
151
|
const declarations = [
|
|
150
152
|
GridComponent,
|
|
@@ -165,7 +167,8 @@ const declarations = [
|
|
|
165
167
|
GridSpacerComponent,
|
|
166
168
|
GridToolbarFocusableDirective,
|
|
167
169
|
StatusBarComponent,
|
|
168
|
-
StatusBarTemplateDirective
|
|
170
|
+
StatusBarTemplateDirective,
|
|
171
|
+
GridClipboardDirective
|
|
169
172
|
];
|
|
170
173
|
/**
|
|
171
174
|
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
|
|
@@ -209,7 +212,8 @@ GridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13
|
|
|
209
212
|
GridSpacerComponent,
|
|
210
213
|
GridToolbarFocusableDirective,
|
|
211
214
|
StatusBarComponent,
|
|
212
|
-
StatusBarTemplateDirective
|
|
215
|
+
StatusBarTemplateDirective,
|
|
216
|
+
GridClipboardDirective], imports: [CommonModule,
|
|
213
217
|
GroupModule,
|
|
214
218
|
SharedModule,
|
|
215
219
|
BodyModule,
|
|
@@ -235,7 +239,7 @@ GridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13
|
|
|
235
239
|
InCellEditingDirective,
|
|
236
240
|
ExpandDetailsDirective,
|
|
237
241
|
ExpandGroupDirective,
|
|
238
|
-
GridToolbarFocusableDirective, i1.GroupHeaderTemplateDirective, i2.GroupHeaderColumnTemplateDirective, i3.GroupFooterTemplateDirective, i4.ColumnComponent, i5.SpanColumnComponent, i6.ColumnGroupComponent, i7.FooterTemplateDirective, i8.DetailTemplateDirective, i9.FocusableDirective, i10.GridTableDirective, i11.CommandColumnComponent, i12.CheckboxColumnComponent, i13.SelectionCheckboxDirective, i14.CellTemplateDirective, i15.NoRecordsTemplateDirective, i16.EditTemplateDirective, i17.EditCommandDirective, i18.CancelCommandDirective, i19.SaveCommandDirective, i20.RemoveCommandDirective, i21.AddCommandDirective, i22.CellLoadingTemplateDirective, i23.LoadingTemplateDirective, i24.RowReorderColumnComponent, i25.HeaderTemplateDirective, i26.SelectAllCheckboxDirective, i27.PagerComponent, i28.PagerPrevButtonsComponent, i29.PagerNextButtonsComponent, i30.PagerNumericButtonsComponent, i31.PagerInputComponent, i32.PagerInfoComponent, i33.PagerPageSizesComponent, i34.PagerTemplateDirective, i35.PagerDropDownListDirective, i36.PagerInputDirective, i37.FilterRowComponent, i38.FilterCellComponent, i39.FilterCellTemplateDirective, i40.FilterCellOperatorsComponent, i41.StringFilterCellComponent, i42.NumericFilterCellComponent, i43.AutoCompleteFilterCellComponent, i44.BooleanFilterCellComponent, i45.DateFilterCellComponent, i40.FilterCellOperatorsComponent, i46.ContainsFilterOperatorComponent, i47.DoesNotContainFilterOperatorComponent, i48.EndsWithFilterOperatorComponent, i49.EqualFilterOperatorComponent, i50.IsEmptyFilterOperatorComponent, i51.IsNotEmptyFilterOperatorComponent, i52.IsNotNullFilterOperatorComponent, i53.IsNullFilterOperatorComponent, i54.NotEqualFilterOperatorComponent, i55.StartsWithFilterOperatorComponent, i56.GreaterFilterOperatorComponent, i57.GreaterOrEqualToFilterOperatorComponent, i58.LessFilterOperatorComponent, i59.LessOrEqualToFilterOperatorComponent, i60.AfterFilterOperatorComponent, i61.AfterEqFilterOperatorComponent, i62.BeforeEqFilterOperatorComponent, i63.BeforeFilterOperatorComponent, i64.StringFilterMenuComponent, i65.FilterMenuTemplateDirective, i66.NumericFilterMenuComponent, i67.DateFilterMenuComponent, i68.BooleanFilterMenuComponent, i69.FilterMenuDropDownListDirective, i70.BooleanFilterRadioButtonDirective, i40.FilterCellOperatorsComponent, i46.ContainsFilterOperatorComponent, i47.DoesNotContainFilterOperatorComponent, i48.EndsWithFilterOperatorComponent, i49.EqualFilterOperatorComponent, i50.IsEmptyFilterOperatorComponent, i51.IsNotEmptyFilterOperatorComponent, i52.IsNotNullFilterOperatorComponent, i53.IsNullFilterOperatorComponent, i54.NotEqualFilterOperatorComponent, i55.StartsWithFilterOperatorComponent, i56.GreaterFilterOperatorComponent, i57.GreaterOrEqualToFilterOperatorComponent, i58.LessFilterOperatorComponent, i59.LessOrEqualToFilterOperatorComponent, i60.AfterFilterOperatorComponent, i61.AfterEqFilterOperatorComponent, i62.BeforeEqFilterOperatorComponent, i63.BeforeFilterOperatorComponent, i71.ColumnChooserComponent, i72.ColumnMenuFilterComponent, i73.ColumnMenuItemComponent, i74.ColumnMenuItemContentTemplateDirective, i75.ColumnMenuSortComponent, i76.ColumnMenuLockComponent, i77.ColumnMenuStickComponent, i78.ColumnMenuPositionComponent, i79.ColumnMenuChooserComponent, i80.ColumnMenuTemplateDirective, i81.ColumnMenuContainerComponent, i82.ColumnMenuItemDirective, i83.ColumnMenuComponent, i84.ColumnMenuAutoSizeColumnComponent, i85.ColumnMenuAutoSizeAllColumnsComponent] });
|
|
242
|
+
GridToolbarFocusableDirective, i1.GroupHeaderTemplateDirective, i2.GroupHeaderColumnTemplateDirective, i3.GroupFooterTemplateDirective, i4.ColumnComponent, i5.SpanColumnComponent, i6.ColumnGroupComponent, i7.FooterTemplateDirective, i8.DetailTemplateDirective, i9.FocusableDirective, i10.GridTableDirective, i11.CommandColumnComponent, i12.CheckboxColumnComponent, i13.SelectionCheckboxDirective, i14.CellTemplateDirective, i15.NoRecordsTemplateDirective, i16.EditTemplateDirective, i17.EditCommandDirective, i18.CancelCommandDirective, i19.SaveCommandDirective, i20.RemoveCommandDirective, i21.AddCommandDirective, i22.CellLoadingTemplateDirective, i23.LoadingTemplateDirective, i24.RowReorderColumnComponent, i25.HeaderTemplateDirective, i26.SelectAllCheckboxDirective, i27.PagerComponent, i28.PagerPrevButtonsComponent, i29.PagerNextButtonsComponent, i30.PagerNumericButtonsComponent, i31.PagerInputComponent, i32.PagerInfoComponent, i33.PagerPageSizesComponent, i34.PagerTemplateDirective, i35.PagerDropDownListDirective, i36.PagerInputDirective, i37.FilterRowComponent, i38.FilterCellComponent, i39.FilterCellTemplateDirective, i40.FilterCellOperatorsComponent, i41.StringFilterCellComponent, i42.NumericFilterCellComponent, i43.AutoCompleteFilterCellComponent, i44.BooleanFilterCellComponent, i45.DateFilterCellComponent, i40.FilterCellOperatorsComponent, i46.ContainsFilterOperatorComponent, i47.DoesNotContainFilterOperatorComponent, i48.EndsWithFilterOperatorComponent, i49.EqualFilterOperatorComponent, i50.IsEmptyFilterOperatorComponent, i51.IsNotEmptyFilterOperatorComponent, i52.IsNotNullFilterOperatorComponent, i53.IsNullFilterOperatorComponent, i54.NotEqualFilterOperatorComponent, i55.StartsWithFilterOperatorComponent, i56.GreaterFilterOperatorComponent, i57.GreaterOrEqualToFilterOperatorComponent, i58.LessFilterOperatorComponent, i59.LessOrEqualToFilterOperatorComponent, i60.AfterFilterOperatorComponent, i61.AfterEqFilterOperatorComponent, i62.BeforeEqFilterOperatorComponent, i63.BeforeFilterOperatorComponent, i64.StringFilterMenuComponent, i65.FilterMenuTemplateDirective, i66.NumericFilterMenuComponent, i67.DateFilterMenuComponent, i68.BooleanFilterMenuComponent, i69.FilterMenuDropDownListDirective, i70.BooleanFilterRadioButtonDirective, i40.FilterCellOperatorsComponent, i46.ContainsFilterOperatorComponent, i47.DoesNotContainFilterOperatorComponent, i48.EndsWithFilterOperatorComponent, i49.EqualFilterOperatorComponent, i50.IsEmptyFilterOperatorComponent, i51.IsNotEmptyFilterOperatorComponent, i52.IsNotNullFilterOperatorComponent, i53.IsNullFilterOperatorComponent, i54.NotEqualFilterOperatorComponent, i55.StartsWithFilterOperatorComponent, i56.GreaterFilterOperatorComponent, i57.GreaterOrEqualToFilterOperatorComponent, i58.LessFilterOperatorComponent, i59.LessOrEqualToFilterOperatorComponent, i60.AfterFilterOperatorComponent, i61.AfterEqFilterOperatorComponent, i62.BeforeEqFilterOperatorComponent, i63.BeforeFilterOperatorComponent, i71.ColumnChooserComponent, i72.ColumnMenuFilterComponent, i73.ColumnMenuItemComponent, i74.ColumnMenuItemContentTemplateDirective, i75.ColumnMenuSortComponent, i76.ColumnMenuLockComponent, i77.ColumnMenuStickComponent, i78.ColumnMenuPositionComponent, i79.ColumnMenuChooserComponent, i80.ColumnMenuTemplateDirective, i81.ColumnMenuContainerComponent, i82.ColumnMenuItemDirective, i83.ColumnMenuComponent, i84.ColumnMenuAutoSizeColumnComponent, i85.ColumnMenuAutoSizeAllColumnsComponent, GridClipboardDirective] });
|
|
239
243
|
GridModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GridModule, imports: [[
|
|
240
244
|
CommonModule,
|
|
241
245
|
GroupModule,
|
|
@@ -9,6 +9,7 @@ import { filterBy, process } from "@progress/kendo-data-query";
|
|
|
9
9
|
import { isPresent, isArray } from "../utils";
|
|
10
10
|
import { diffFilters, cloneFilters } from "../common/filter-descriptor-differ";
|
|
11
11
|
import { LocalDataChangesService } from "../editing/local-data-changes.service";
|
|
12
|
+
import { GridConfigurationErrorMessages } from '../common/error-messages';
|
|
12
13
|
import * as i0 from "@angular/core";
|
|
13
14
|
import * as i1 from "../grid.component";
|
|
14
15
|
import * as i2 from "../editing/local-data-changes.service";
|
|
@@ -193,9 +194,7 @@ export class GroupBindingDirective extends DataBindingDirective {
|
|
|
193
194
|
}
|
|
194
195
|
ngAfterContentInit() {
|
|
195
196
|
if (isDevMode() && this.grid.isGroupExpanded) {
|
|
196
|
-
throw new Error(
|
|
197
|
-
'or the `isGroupExpanded` callback is not supported. To use grouping with the `kendoGridGroupBinding` directive, ' +
|
|
198
|
-
'set the Grid `groupable` property to `true`.');
|
|
197
|
+
throw new Error(GridConfigurationErrorMessages.groupBindingDirectives);
|
|
199
198
|
}
|
|
200
199
|
}
|
|
201
200
|
groupExpand({ groupIndex }) {
|
package/esm2020/index.mjs
CHANGED
|
@@ -151,6 +151,8 @@ export { ColumnMenuComponent } from './column-menu/column-menu.component';
|
|
|
151
151
|
export { ColumnLockedChangeEvent } from './column-menu/column-locked-change-event';
|
|
152
152
|
export { ColumnStickyChangeEvent } from './column-menu/column-sticky-change-event';
|
|
153
153
|
export { SinglePopupService, PopupCloseEvent } from './common/single-popup.service';
|
|
154
|
+
// Clipboard
|
|
155
|
+
export { GridClipboardDirective } from './common/clipboard.directive';
|
|
154
156
|
// addresses error NG3001: Unsupported private class
|
|
155
157
|
export { ColumnMenuTemplateDirective } from './column-menu/column-menu-template.directive';
|
|
156
158
|
export { EditCommandDirective } from './editing/edit-command.directive';
|
|
@@ -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.4.0-develop.
|
|
12
|
+
publishDate: 1706186543,
|
|
13
|
+
version: '14.4.0-develop.16',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
15
15
|
};
|
|
@@ -14,6 +14,7 @@ import { ColumnBase } from '../columns/column-base';
|
|
|
14
14
|
import { PDFExportComponent } from '@progress/kendo-angular-pdf-export';
|
|
15
15
|
import { isDocumentAvailable } from '@progress/kendo-angular-common';
|
|
16
16
|
import { ContextService } from '../common/provider.service';
|
|
17
|
+
import { GridConfigurationErrorMessages } from '../common/error-messages';
|
|
17
18
|
import * as i0 from "@angular/core";
|
|
18
19
|
import * as i1 from "./pdf.service";
|
|
19
20
|
import * as i2 from "../scrolling/suspend.service";
|
|
@@ -61,13 +62,13 @@ export class PDFComponent extends PDFExportComponent {
|
|
|
61
62
|
* @hidden
|
|
62
63
|
*/
|
|
63
64
|
saveAs(_) {
|
|
64
|
-
throw new Error('
|
|
65
|
+
throw new Error(GridConfigurationErrorMessages.unsupportedMethod('saveAs', 'GridComponent.saveAsPDF'));
|
|
65
66
|
}
|
|
66
67
|
/**
|
|
67
68
|
* @hidden
|
|
68
69
|
*/
|
|
69
70
|
export() {
|
|
70
|
-
throw new Error('
|
|
71
|
+
throw new Error(GridConfigurationErrorMessages.unsupportedMethod('export', 'GridComponent.drawPDF'));
|
|
71
72
|
}
|
|
72
73
|
savePDF(component) {
|
|
73
74
|
this.createPDF(component, this.draw);
|