@progress/kendo-angular-grid 7.2.5-dev.202208181343 → 7.3.0-dev.202208190713
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-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-resizing/column-handle.directive.js +24 -3
- package/esm2015/columns/column-base.js +5 -2
- package/esm2015/package-metadata.js +1 -1
- package/fesm2015/kendo-angular-grid.js +30 -6
- package/package.json +1 -1
|
@@ -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
|
}
|
|
@@ -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: [{
|
|
@@ -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: 1660893095,
|
|
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
|
};
|
|
@@ -2836,7 +2836,7 @@ const packageMetadata = {
|
|
|
2836
2836
|
name: '@progress/kendo-angular-grid',
|
|
2837
2837
|
productName: 'Kendo UI for Angular',
|
|
2838
2838
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
2839
|
-
publishDate:
|
|
2839
|
+
publishDate: 1660893095,
|
|
2840
2840
|
version: '',
|
|
2841
2841
|
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'
|
|
2842
2842
|
};
|
|
@@ -3367,7 +3367,8 @@ class ColumnBase {
|
|
|
3367
3367
|
*/
|
|
3368
3368
|
this.reorderable = true;
|
|
3369
3369
|
/**
|
|
3370
|
-
* The width (in pixels) below which the user is not able to resize the column by using the UI.
|
|
3370
|
+
* 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)).
|
|
3371
|
+
* @default 10
|
|
3371
3372
|
*/
|
|
3372
3373
|
this.minResizableWidth = 10;
|
|
3373
3374
|
this._locked = false;
|
|
@@ -3544,7 +3545,7 @@ class ColumnBase {
|
|
|
3544
3545
|
}
|
|
3545
3546
|
}
|
|
3546
3547
|
ColumnBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ColumnBase, deps: [{ token: ColumnBase }, { token: IdService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3547
|
-
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 });
|
|
3548
|
+
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 });
|
|
3548
3549
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ColumnBase, decorators: [{
|
|
3549
3550
|
type: Component,
|
|
3550
3551
|
args: [{
|
|
@@ -3557,6 +3558,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3557
3558
|
type: Input
|
|
3558
3559
|
}], minResizableWidth: [{
|
|
3559
3560
|
type: Input
|
|
3561
|
+
}], maxResizableWidth: [{
|
|
3562
|
+
type: Input
|
|
3560
3563
|
}], title: [{
|
|
3561
3564
|
type: Input
|
|
3562
3565
|
}], width: [{
|
|
@@ -14118,9 +14121,11 @@ class ColumnHandleDirective {
|
|
|
14118
14121
|
if (isTruthy(this.rtl)) {
|
|
14119
14122
|
delta *= -1;
|
|
14120
14123
|
}
|
|
14121
|
-
|
|
14122
|
-
|
|
14123
|
-
|
|
14124
|
+
let newWidth = Math.max(this.column.resizeStartWidth + delta, this.column.minResizableWidth);
|
|
14125
|
+
if (isPresent(this.column.maxResizableWidth)) {
|
|
14126
|
+
newWidth = Math.min(newWidth, this.column.maxResizableWidth);
|
|
14127
|
+
}
|
|
14128
|
+
const tableDelta = this.getTableDelta(newWidth, delta);
|
|
14124
14129
|
this.updateWidth(this.column, newWidth);
|
|
14125
14130
|
this.service.resizeTable(this.column, tableDelta);
|
|
14126
14131
|
}
|
|
@@ -14145,6 +14150,25 @@ class ColumnHandleDirective {
|
|
|
14145
14150
|
columnsForLevel(level) {
|
|
14146
14151
|
return columnsToRender(this.columns ? this.columns.filter(column => column.level === level) : []);
|
|
14147
14152
|
}
|
|
14153
|
+
getTableDelta(newWidth, delta) {
|
|
14154
|
+
const minWidth = this.column.minResizableWidth;
|
|
14155
|
+
const maxWidth = this.column.maxResizableWidth;
|
|
14156
|
+
const startWidth = this.column.resizeStartWidth;
|
|
14157
|
+
const isAboveMin = newWidth > minWidth;
|
|
14158
|
+
const isBelowMax = newWidth < maxWidth;
|
|
14159
|
+
const isInBoundaries = isPresent(maxWidth) ?
|
|
14160
|
+
isAboveMin && isBelowMax :
|
|
14161
|
+
isAboveMin;
|
|
14162
|
+
if (isInBoundaries) {
|
|
14163
|
+
return delta;
|
|
14164
|
+
}
|
|
14165
|
+
else if (newWidth <= minWidth) {
|
|
14166
|
+
return minWidth - startWidth;
|
|
14167
|
+
}
|
|
14168
|
+
else {
|
|
14169
|
+
return startWidth - maxWidth;
|
|
14170
|
+
}
|
|
14171
|
+
}
|
|
14148
14172
|
}
|
|
14149
14173
|
ColumnHandleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ColumnHandleDirective, deps: [{ token: i1$1.DraggableDirective, host: true }, { token: i0.ElementRef }, { token: ColumnResizingService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i1.LocalizationService }, { token: ColumnInfoService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
14150
14174
|
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 });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-grid",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0-dev.202208190713",
|
|
4
4
|
"description": "Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|