@progress/kendo-angular-grid 15.2.0 → 15.3.0-develop.2
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/common/provider.service.d.ts +2 -0
- package/esm2020/common/error-messages.mjs +20 -11
- package/esm2020/grid.component.mjs +20 -19
- package/esm2020/grouping/group-scroll-binding.directive.mjs +80 -16
- package/esm2020/grouping/groups.service.mjs +8 -3
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/rendering/table-body.component.mjs +0 -2
- package/fesm2015/progress-kendo-angular-grid.mjs +124 -50
- package/fesm2020/progress-kendo-angular-grid.mjs +124 -50
- package/grid.component.d.ts +1 -9
- package/grouping/group-rows-args.interface.d.ts +3 -3
- package/grouping/group-scroll-binding.directive.d.ts +30 -7
- package/grouping/groups.service.d.ts +3 -2
- package/package.json +17 -17
- package/schematics/ngAdd/index.js +3 -3
|
@@ -1344,7 +1344,12 @@ const getGroupRowArgs = (groupItem) => {
|
|
|
1344
1344
|
return { group: groupItem.data, groupIndex: groupItem.index, parentGroup: getGroupRowArgs(groupItem.parentGroup) };
|
|
1345
1345
|
};
|
|
1346
1346
|
|
|
1347
|
-
const isChildIndex = (targetIndex, parentIndex) =>
|
|
1347
|
+
const isChildIndex = (targetIndex, parentIndex) => {
|
|
1348
|
+
const sameIndex = parentIndex === targetIndex;
|
|
1349
|
+
const lastSeparatorIndex = targetIndex.lastIndexOf('_');
|
|
1350
|
+
const sameSubGroupIndex = targetIndex.substring(0, lastSeparatorIndex) === parentIndex;
|
|
1351
|
+
return !sameIndex && sameSubGroupIndex;
|
|
1352
|
+
};
|
|
1348
1353
|
/**
|
|
1349
1354
|
* @hidden
|
|
1350
1355
|
*/
|
|
@@ -1377,10 +1382,10 @@ class GroupsService {
|
|
|
1377
1382
|
}
|
|
1378
1383
|
return expanded;
|
|
1379
1384
|
}
|
|
1380
|
-
toggleRow(groupItem) {
|
|
1385
|
+
toggleRow(groupItem, emit = true) {
|
|
1381
1386
|
const parentGroup = getGroupRowArgs(groupItem.parentGroup);
|
|
1382
1387
|
const expand = !this.isExpanded({ group: groupItem.data, groupIndex: groupItem.index, parentGroup });
|
|
1383
|
-
this.changes.next({ group: groupItem.data, expand, groupIndex: groupItem.index, parentGroup });
|
|
1388
|
+
this.changes.next({ group: groupItem.data, expand, groupIndex: groupItem.index, parentGroup, emit });
|
|
1384
1389
|
// if usercallback is given, the rowState should be ignored
|
|
1385
1390
|
if (this.userCallback) {
|
|
1386
1391
|
return;
|
|
@@ -2255,16 +2260,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2255
2260
|
* @hidden
|
|
2256
2261
|
*/
|
|
2257
2262
|
const ColumnMenuErrorMessages = {
|
|
2258
|
-
autoSizeColumn:
|
|
2259
|
-
|
|
2260
|
-
|
|
2263
|
+
autoSizeColumn: `The auto size column does not work with enabled virtual columns.
|
|
2264
|
+
See https://www.telerik.com/kendo-angular-ui/components/grid/accessories/column-menu/#toc-autosize-column-item.`,
|
|
2265
|
+
autoSizeAllColumns: `The auto size all columns does not work with enabled virtual columns.
|
|
2266
|
+
See https://www.telerik.com/kendo-angular-ui/components/grid/accessories/column-menu/#toc-autosize-all-columns-item.`,
|
|
2267
|
+
serviceInput: `The service input of the predefined column menu components is mandatory.
|
|
2268
|
+
See https://www.telerik.com/kendo-angular-ui/components/grid/accessories/column-menu/#toc-customizing-the-content.`
|
|
2261
2269
|
};
|
|
2262
2270
|
/**
|
|
2263
2271
|
* @hidden
|
|
2264
2272
|
*/
|
|
2265
2273
|
const ClipboardErrorMessages = {
|
|
2266
|
-
activeCellNavigable:
|
|
2267
|
-
|
|
2274
|
+
activeCellNavigable: `Grid must be navigable to use "activeCell" as clipboard target type.
|
|
2275
|
+
See https://www.telerik.com/kendo-angular-ui/components/grid/accessories/clipboard/#toc-active-cell.`,
|
|
2276
|
+
selectionSelectable: `Grid must be selectable to use "selection" as clipboard target type.
|
|
2277
|
+
See https://www.telerik.com/kendo-angular-ui/components/grid/accessories/clipboard/#toc-current-selection.`
|
|
2268
2278
|
};
|
|
2269
2279
|
/**
|
|
2270
2280
|
* @hidden
|
|
@@ -2275,8 +2285,10 @@ const ColumnConfigurationErrorMessages = {
|
|
|
2275
2285
|
Please use only valid identifier names to ensure error-free operation.`,
|
|
2276
2286
|
width: (value, parsedValue) => `Expected numeric value for column width, but got a string "${value}". Treating as ${parsedValue}px.`,
|
|
2277
2287
|
invalidColumn: (column) => `Invalid column ${column}.`,
|
|
2278
|
-
requiredWidth: (columnType) => `${columnType} columns feature requires all columns to have set width
|
|
2279
|
-
|
|
2288
|
+
requiredWidth: (columnType) => `${columnType} columns feature requires all columns to have set width.
|
|
2289
|
+
See https://www.telerik.com/kendo-angular-ui/components/grid/columns/${columnType.toLowerCase()}.`,
|
|
2290
|
+
requiredScroll: (columnType) => `${columnType} columns are only supported when scrolling is enabled.
|
|
2291
|
+
See https://www.telerik.com/kendo-angular-ui/components/grid/columns/${columnType.toLowerCase()}/`,
|
|
2280
2292
|
groupColumnContent: 'ColumnGroupComponent should contain ColumnComponent or CommandColumnComponent.',
|
|
2281
2293
|
lockedParent: 'Locked child columns require their parent columns to be locked.',
|
|
2282
2294
|
columnNested: 'Columns can be nested only inside ColumnGroupComponent',
|
|
@@ -2288,14 +2300,16 @@ const ColumnConfigurationErrorMessages = {
|
|
|
2288
2300
|
const GridConfigurationErrorMessages = {
|
|
2289
2301
|
functionType: (propName, fn) => `${propName} must be a function, but received ${JSON.stringify(fn)}.`,
|
|
2290
2302
|
incompatibleFeatures: (feat1Name, feat2Name) => `'Having both ${feat1Name} and ${feat2Name} is not supported.'`,
|
|
2291
|
-
nonLockedColumnPresent: 'There should be at least one non-locked column',
|
|
2292
|
-
rowHeightVirtual:
|
|
2293
|
-
|
|
2303
|
+
nonLockedColumnPresent: 'There should be at least one non-locked column. See https://www.telerik.com/kendo-angular-ui/components/grid/columns/locked/#toc-known-limitations',
|
|
2304
|
+
rowHeightVirtual: `The virtual scrolling functionality requires setting the rowHeight (and detailRowHeight when there are detail rows).
|
|
2305
|
+
Row height and detail row height settings should be set only when virtual scrolling mode is enabled.
|
|
2306
|
+
See https://www.telerik.com/kendo-angular-ui/components/grid/scroll-modes/virtual/#toc-getting-started.`,
|
|
2307
|
+
focusNavigable: 'The Grid should be configured as navigable to control focus. See https://www.telerik.com/kendo-angular-ui/components/grid/keyboard-navigation/.',
|
|
2294
2308
|
expandCollapseMethods: (expandMethodName, collapseMethodName, directiveName, callbackName) => `The ${expandMethodName} and ${collapseMethodName} methods should not be called
|
|
2295
2309
|
when using the ${directiveName} directive or the ${callbackName} callback.
|
|
2296
2310
|
These methods are provided only for backwards compatibility with legacy versions.`,
|
|
2297
2311
|
requiredEditService: `The default edit service of the editing directives works only when binding to plain array.
|
|
2298
|
-
Please provide an editService.`,
|
|
2312
|
+
Please provide an editService. See https://www.telerik.com/kendo-angular-ui/components/grid/editing/editing-directives/#toc-custom-editing-service.`,
|
|
2299
2313
|
requiredModule: (exportedType, moduleName, componentSelector) => `Creating ${exportedType} requires including the ${moduleName} and adding the ${componentSelector} component.`,
|
|
2300
2314
|
groupBindingDirectives: `Using the "kendoGridGroupBinding" directive in combination with the "kendoGridExpandGroupBy" directive
|
|
2301
2315
|
or the "isGroupExpanded" callback is not supported. To use grouping with the "kendoGridGroupBinding" directive,
|
|
@@ -4518,8 +4532,8 @@ const packageMetadata = {
|
|
|
4518
4532
|
name: '@progress/kendo-angular-grid',
|
|
4519
4533
|
productName: 'Kendo UI for Angular',
|
|
4520
4534
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
4521
|
-
publishDate:
|
|
4522
|
-
version: '15.
|
|
4535
|
+
publishDate: 1710359369,
|
|
4536
|
+
version: '15.3.0-develop.2',
|
|
4523
4537
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
4524
4538
|
};
|
|
4525
4539
|
|
|
@@ -18007,7 +18021,6 @@ TableBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
|
|
|
18007
18021
|
</ng-container>
|
|
18008
18022
|
</td>
|
|
18009
18023
|
</tr>
|
|
18010
|
-
|
|
18011
18024
|
<ng-container *ngFor="let item of data; trackBy: trackByWrapper; let rowIndex = index;">
|
|
18012
18025
|
<tr *ngIf="isGroup(item) && isParentGroupExpanded($any(item)) && showGroupHeader(item)"
|
|
18013
18026
|
kendoGridGroupHeader
|
|
@@ -18237,7 +18250,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
18237
18250
|
</ng-container>
|
|
18238
18251
|
</td>
|
|
18239
18252
|
</tr>
|
|
18240
|
-
|
|
18241
18253
|
<ng-container *ngFor="let item of data; trackBy: trackByWrapper; let rowIndex = index;">
|
|
18242
18254
|
<tr *ngIf="isGroup(item) && isParentGroupExpanded($any(item)) && showGroupHeader(item)"
|
|
18243
18255
|
kendoGridGroupHeader
|
|
@@ -19996,7 +20008,7 @@ const validateColumnsField = (columns) => expandColumns(columns.toArray())
|
|
|
19996
20008
|
.filter(isColumnComponent)
|
|
19997
20009
|
.filter(({ field }) => !isValidFieldName(field))
|
|
19998
20010
|
.forEach(({ field }) => console.warn(ColumnConfigurationErrorMessages.fieldName(field)));
|
|
19999
|
-
const handleExpandCollapseGroupsService = (service, expandEmitter, collapseEmitter, map) => (service.changes.pipe(filter(({ group }) => isPresent(group)))
|
|
20011
|
+
const handleExpandCollapseGroupsService = (service, expandEmitter, collapseEmitter, map) => (service.changes.pipe(filter(({ group, emit }) => emit && isPresent(group)))
|
|
20000
20012
|
.subscribe((x) => x.expand ? expandEmitter.emit(map(x)) : collapseEmitter.emit(map(x))));
|
|
20001
20013
|
const handleExpandCollapseDetailsService = (service, expandEmitter, collapseEmitter, map) => (service.changes.pipe(filter(({ dataItem }) => isPresent(dataItem)))
|
|
20002
20014
|
.subscribe((x) => x.expand ? expandEmitter.emit(map(x)) : collapseEmitter.emit(map(x))));
|
|
@@ -20830,8 +20842,6 @@ class GridComponent {
|
|
|
20830
20842
|
* This method is provided only for backwards-compatibility with legacy versions.
|
|
20831
20843
|
* These versions tracked the expanded group state internally using the hierarchical group index.
|
|
20832
20844
|
*
|
|
20833
|
-
* The `expandGroup` method is not supported when you use the [kendoGridGroupBinding]({% slug api_grid_groupbindingdirective %}) directive.
|
|
20834
|
-
*
|
|
20835
20845
|
* When a Grid is pageable, the indexes of the groups are offset by the current Grid [skip]({% slug api_grid_gridcomponent %}#toc-skip).
|
|
20836
20846
|
*
|
|
20837
20847
|
* @param {string} index - The underscore separated hierarchical index of the group.
|
|
@@ -20846,8 +20856,6 @@ class GridComponent {
|
|
|
20846
20856
|
* This method is provided only for backwards-compatibility with legacy versions.
|
|
20847
20857
|
* These versions tracked the expanded group state internally using the hierarchical group index.
|
|
20848
20858
|
*
|
|
20849
|
-
* The `collapseGroup` method is not supported when you use the [kendoGridGroupBinding]({% slug api_grid_groupbindingdirective %}) directive.
|
|
20850
|
-
*
|
|
20851
20859
|
* When a Grid is pageable, the indexes of the groups are offset by the current Grid [skip]({% slug api_grid_gridcomponent %}#toc-skip).
|
|
20852
20860
|
*
|
|
20853
20861
|
* @param {string} index - The underscore separated hierarchical index of the group.
|
|
@@ -20861,12 +20869,6 @@ class GridComponent {
|
|
|
20861
20869
|
resetGroupsState() {
|
|
20862
20870
|
this.groupsService.reset();
|
|
20863
20871
|
}
|
|
20864
|
-
/**
|
|
20865
|
-
* @hidden
|
|
20866
|
-
*/
|
|
20867
|
-
expandGroupChildren(groupIndex) {
|
|
20868
|
-
this.groupsService.expandChildren(groupIndex);
|
|
20869
|
-
}
|
|
20870
20872
|
/**
|
|
20871
20873
|
* @hidden
|
|
20872
20874
|
*/
|
|
@@ -20935,7 +20937,6 @@ class GridComponent {
|
|
|
20935
20937
|
this.attachElementEventHandlers();
|
|
20936
20938
|
this.updateNavigationMetadata();
|
|
20937
20939
|
this.applyAutoSize();
|
|
20938
|
-
// this.sizingService.changes.next(this.size);
|
|
20939
20940
|
}
|
|
20940
20941
|
ngAfterContentChecked() {
|
|
20941
20942
|
this.columnsContainer.refresh();
|
|
@@ -21520,16 +21521,19 @@ class GridComponent {
|
|
|
21520
21521
|
throw new Error(GridConfigurationErrorMessages.incompatibleFeatures('detail template', 'sticky columns'));
|
|
21521
21522
|
}
|
|
21522
21523
|
if (this.lockedLeafColumns.length && !this.nonLockedLeafColumns.length) {
|
|
21523
|
-
|
|
21524
|
+
console.warn(GridConfigurationErrorMessages.nonLockedColumnPresent);
|
|
21524
21525
|
}
|
|
21525
21526
|
if ((locked || this.virtualColumns) && expandColumns(this.columnList.toArray()).filter(column => !column.width && !isColumnGroupComponent(column)).length) {
|
|
21526
|
-
|
|
21527
|
+
console.warn(ColumnConfigurationErrorMessages.requiredWidth(locked ? 'Locked' : 'Virtual'));
|
|
21527
21528
|
}
|
|
21528
21529
|
if (locked && !this.isScrollable) {
|
|
21529
|
-
|
|
21530
|
+
console.warn(ColumnConfigurationErrorMessages.requiredScroll('Locked'));
|
|
21530
21531
|
}
|
|
21531
21532
|
if (stickyColumns && !this.isScrollable) {
|
|
21532
|
-
|
|
21533
|
+
console.warn(ColumnConfigurationErrorMessages.requiredScroll('Sticky'));
|
|
21534
|
+
}
|
|
21535
|
+
if (this.virtualColumns && !this.isScrollable) {
|
|
21536
|
+
console.warn(ColumnConfigurationErrorMessages.requiredScroll('Virtual'));
|
|
21533
21537
|
}
|
|
21534
21538
|
if (this.columnList.filter(isColumnGroupComponent).filter((x) => !x.hasChildren).length) {
|
|
21535
21539
|
throw new Error(ColumnConfigurationErrorMessages.groupColumnContent);
|
|
@@ -21538,10 +21542,16 @@ class GridComponent {
|
|
|
21538
21542
|
throw new Error(ColumnConfigurationErrorMessages.lockedParent);
|
|
21539
21543
|
}
|
|
21540
21544
|
if ((this.rowHeight || this.detailRowHeight) && !this.isVirtual) {
|
|
21541
|
-
|
|
21545
|
+
console.warn(GridConfigurationErrorMessages.rowHeightVirtual);
|
|
21546
|
+
}
|
|
21547
|
+
if (!this.rowHeight && this.isVirtual) {
|
|
21548
|
+
console.warn(GridConfigurationErrorMessages.rowHeightVirtual);
|
|
21549
|
+
}
|
|
21550
|
+
if (!this.detailRowHeight && this.isVirtual && this.detailTemplate) {
|
|
21551
|
+
console.warn(GridConfigurationErrorMessages.rowHeightVirtual);
|
|
21542
21552
|
}
|
|
21543
21553
|
if (stickyColumns && expandColumns(this.columnList.toArray()).filter(column => !column.width && !isColumnGroupComponent(column)).length) {
|
|
21544
|
-
|
|
21554
|
+
console.warn(ColumnConfigurationErrorMessages.requiredWidth('Sticky'));
|
|
21545
21555
|
}
|
|
21546
21556
|
if (stickyColumns && this.virtualColumns) {
|
|
21547
21557
|
throw new Error(GridConfigurationErrorMessages.incompatibleFeatures('sticky columns', 'column virtualization'));
|
|
@@ -21839,7 +21849,10 @@ class GridComponent {
|
|
|
21839
21849
|
return;
|
|
21840
21850
|
}
|
|
21841
21851
|
if (this.groupsService.isExpanded({ groupIndex: index }) !== expand) {
|
|
21842
|
-
this.groupsService.toggleRow({ index });
|
|
21852
|
+
this.groupsService.toggleRow({ index }, false);
|
|
21853
|
+
if (this.ctx.groupBindingDirective) {
|
|
21854
|
+
this.ctx.groupBindingDirective[`group${expand ? 'Expand' : 'Collapse'}`]({ groupIndex: index });
|
|
21855
|
+
}
|
|
21843
21856
|
}
|
|
21844
21857
|
}
|
|
21845
21858
|
shouldResetSelection(selectableChanges) {
|
|
@@ -26361,6 +26374,10 @@ const count = (groups, includeFooters = false) => (groups.reduce((acc, group) =>
|
|
|
26361
26374
|
}
|
|
26362
26375
|
return acc;
|
|
26363
26376
|
}, 0));
|
|
26377
|
+
/**
|
|
26378
|
+
* @hidden
|
|
26379
|
+
*/
|
|
26380
|
+
const noDescriptors = (descriptors) => !isPresent(descriptors) || !descriptors.length;
|
|
26364
26381
|
/**
|
|
26365
26382
|
* @hidden
|
|
26366
26383
|
*/
|
|
@@ -26436,8 +26453,11 @@ const skippedHeaders = (groupItem) => {
|
|
|
26436
26453
|
* A directive which encapsulates the in-memory handling of grouping with virtual scrolling.
|
|
26437
26454
|
*/
|
|
26438
26455
|
class GroupBindingDirective extends DataBindingDirective {
|
|
26439
|
-
constructor(
|
|
26440
|
-
super(grid, changeDetector, localDataChangesService);
|
|
26456
|
+
constructor(changeDetector, localDataChangesService, ctxService, groupsService) {
|
|
26457
|
+
super(ctxService.grid, changeDetector, localDataChangesService);
|
|
26458
|
+
this.groupsService = groupsService;
|
|
26459
|
+
this.gridSubs = new Subscription();
|
|
26460
|
+
ctxService.groupBindingDirective = this;
|
|
26441
26461
|
}
|
|
26442
26462
|
/**
|
|
26443
26463
|
* The array of data which will be used to populate the Grid.
|
|
@@ -26458,7 +26478,9 @@ class GroupBindingDirective extends DataBindingDirective {
|
|
|
26458
26478
|
* Defines the descriptors by which the data will be sorted.
|
|
26459
26479
|
*/
|
|
26460
26480
|
set sort(value) {
|
|
26461
|
-
const
|
|
26481
|
+
const noCurrentDescriptors = noDescriptors(this.state.sort);
|
|
26482
|
+
const noIncomingDescriptors = noDescriptors(value);
|
|
26483
|
+
const clear = this.state.sort !== value && !(noCurrentDescriptors && noIncomingDescriptors);
|
|
26462
26484
|
this.grid.sort = this.state.sort = value;
|
|
26463
26485
|
if (clear) {
|
|
26464
26486
|
this.groups = null;
|
|
@@ -26491,22 +26513,65 @@ class GroupBindingDirective extends DataBindingDirective {
|
|
|
26491
26513
|
this.skip = 0;
|
|
26492
26514
|
}
|
|
26493
26515
|
}
|
|
26494
|
-
/**
|
|
26495
|
-
* @hidden
|
|
26496
|
-
*/
|
|
26497
26516
|
ngOnInit() {
|
|
26498
26517
|
super.ngOnInit();
|
|
26499
|
-
this.grid.groupExpand.subscribe(this.groupExpand.bind(this));
|
|
26500
|
-
this.grid.groupCollapse.subscribe(this.groupCollapse.bind(this));
|
|
26518
|
+
this.gridSubs.add(this.grid.groupExpand.subscribe(this.groupExpand.bind(this)));
|
|
26519
|
+
this.gridSubs.add(this.grid.groupCollapse.subscribe(this.groupCollapse.bind(this)));
|
|
26501
26520
|
}
|
|
26502
26521
|
ngAfterContentInit() {
|
|
26503
26522
|
if (isDevMode() && this.grid.isGroupExpanded) {
|
|
26504
26523
|
throw new Error(GridConfigurationErrorMessages.groupBindingDirectives);
|
|
26505
26524
|
}
|
|
26506
26525
|
}
|
|
26526
|
+
ngOnDestroy() {
|
|
26527
|
+
this.gridSubs.unsubscribe();
|
|
26528
|
+
}
|
|
26529
|
+
/**
|
|
26530
|
+
* @hidden
|
|
26531
|
+
*/
|
|
26532
|
+
toggleAll(expand) {
|
|
26533
|
+
this.skip = 0;
|
|
26534
|
+
this.grid.scrollTo({ row: 0, column: 0 });
|
|
26535
|
+
this.groups.forEach((gr, idx) => {
|
|
26536
|
+
const expanded = this.groupsService.isExpanded({
|
|
26537
|
+
group: gr,
|
|
26538
|
+
groupIndex: idx.toString(),
|
|
26539
|
+
parentGroup: undefined
|
|
26540
|
+
});
|
|
26541
|
+
const performToggle = (expand && !expanded) || (!expand && expanded);
|
|
26542
|
+
if (performToggle) {
|
|
26543
|
+
this.grid.groupsService.toggleRow({
|
|
26544
|
+
type: 'group',
|
|
26545
|
+
data: gr,
|
|
26546
|
+
index: idx.toString(),
|
|
26547
|
+
level: 0,
|
|
26548
|
+
parentGroup: undefined
|
|
26549
|
+
});
|
|
26550
|
+
this[expand ? 'groupExpand' : 'groupCollapse']({ groupIndex: idx.toString() });
|
|
26551
|
+
}
|
|
26552
|
+
});
|
|
26553
|
+
}
|
|
26554
|
+
/**
|
|
26555
|
+
* Collapses all expanded root level groups.
|
|
26556
|
+
*/
|
|
26557
|
+
collapseAll() {
|
|
26558
|
+
this.toggleAll(false);
|
|
26559
|
+
}
|
|
26560
|
+
/**
|
|
26561
|
+
* Expands all expanded root level groups.
|
|
26562
|
+
*/
|
|
26563
|
+
expandAll() {
|
|
26564
|
+
this.toggleAll(true);
|
|
26565
|
+
}
|
|
26566
|
+
/**
|
|
26567
|
+
* @hidden
|
|
26568
|
+
*/
|
|
26507
26569
|
groupExpand({ groupIndex }) {
|
|
26508
|
-
this.grid.expandGroupChildren(groupIndex);
|
|
26509
26570
|
const { group, parents } = findGroup(groupIndex, this.groups);
|
|
26571
|
+
if (!group) {
|
|
26572
|
+
return;
|
|
26573
|
+
}
|
|
26574
|
+
this.groupsService.expandChildren(groupIndex);
|
|
26510
26575
|
if (!group.items.length) {
|
|
26511
26576
|
const descriptors = this.state.group.filter(removeParentDescriptors(parents, group));
|
|
26512
26577
|
const children = findChildren(this.originalData, parents.concat(group));
|
|
@@ -26518,11 +26583,17 @@ class GroupBindingDirective extends DataBindingDirective {
|
|
|
26518
26583
|
}
|
|
26519
26584
|
this.grid.data = this.dataResult(this.state.skip, this.state.take);
|
|
26520
26585
|
}
|
|
26586
|
+
/**
|
|
26587
|
+
* @hidden
|
|
26588
|
+
*/
|
|
26521
26589
|
groupCollapse({ groupIndex }) {
|
|
26522
26590
|
const { group } = findGroup(groupIndex, this.groups);
|
|
26523
26591
|
if (group) {
|
|
26524
26592
|
group.items = [];
|
|
26525
26593
|
}
|
|
26594
|
+
else {
|
|
26595
|
+
return;
|
|
26596
|
+
}
|
|
26526
26597
|
this.grid.data = this.dataResult(this.state.skip, this.state.take);
|
|
26527
26598
|
}
|
|
26528
26599
|
process(state) {
|
|
@@ -26562,12 +26633,15 @@ class GroupBindingDirective extends DataBindingDirective {
|
|
|
26562
26633
|
this.filter = filter;
|
|
26563
26634
|
}
|
|
26564
26635
|
}
|
|
26565
|
-
GroupBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GroupBindingDirective, deps: [{ token:
|
|
26566
|
-
GroupBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: GroupBindingDirective, selector: "[kendoGridGroupBinding]", inputs: { kendoGridGroupBinding: "kendoGridGroupBinding", sort: "sort", filter: "filter", group: "group" }, usesInheritance: true, ngImport: i0 });
|
|
26636
|
+
GroupBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GroupBindingDirective, deps: [{ token: i0.ChangeDetectorRef }, { token: LocalDataChangesService }, { token: ContextService }, { token: GroupsService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
26637
|
+
GroupBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: GroupBindingDirective, selector: "[kendoGridGroupBinding]", inputs: { kendoGridGroupBinding: "kendoGridGroupBinding", sort: "sort", filter: "filter", group: "group" }, exportAs: ["kendoGridGroupBinding"], usesInheritance: true, ngImport: i0 });
|
|
26567
26638
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GroupBindingDirective, decorators: [{
|
|
26568
26639
|
type: Directive,
|
|
26569
|
-
args: [{
|
|
26570
|
-
|
|
26640
|
+
args: [{
|
|
26641
|
+
selector: '[kendoGridGroupBinding]',
|
|
26642
|
+
exportAs: 'kendoGridGroupBinding'
|
|
26643
|
+
}]
|
|
26644
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: LocalDataChangesService }, { type: ContextService }, { type: GroupsService }]; }, propDecorators: { kendoGridGroupBinding: [{
|
|
26571
26645
|
type: Input,
|
|
26572
26646
|
args: ["kendoGridGroupBinding"]
|
|
26573
26647
|
}], sort: [{
|
package/grid.component.d.ts
CHANGED
|
@@ -95,7 +95,7 @@ export declare class GridComponent implements AfterContentInit, AfterViewInit, O
|
|
|
95
95
|
private cellSelectionService;
|
|
96
96
|
wrapper: ElementRef;
|
|
97
97
|
private groupInfoService;
|
|
98
|
-
|
|
98
|
+
groupsService: GroupsService;
|
|
99
99
|
private changeNotification;
|
|
100
100
|
private detailsService;
|
|
101
101
|
private editService;
|
|
@@ -659,8 +659,6 @@ export declare class GridComponent implements AfterContentInit, AfterViewInit, O
|
|
|
659
659
|
* This method is provided only for backwards-compatibility with legacy versions.
|
|
660
660
|
* These versions tracked the expanded group state internally using the hierarchical group index.
|
|
661
661
|
*
|
|
662
|
-
* The `expandGroup` method is not supported when you use the [kendoGridGroupBinding]({% slug api_grid_groupbindingdirective %}) directive.
|
|
663
|
-
*
|
|
664
662
|
* When a Grid is pageable, the indexes of the groups are offset by the current Grid [skip]({% slug api_grid_gridcomponent %}#toc-skip).
|
|
665
663
|
*
|
|
666
664
|
* @param {string} index - The underscore separated hierarchical index of the group.
|
|
@@ -673,8 +671,6 @@ export declare class GridComponent implements AfterContentInit, AfterViewInit, O
|
|
|
673
671
|
* This method is provided only for backwards-compatibility with legacy versions.
|
|
674
672
|
* These versions tracked the expanded group state internally using the hierarchical group index.
|
|
675
673
|
*
|
|
676
|
-
* The `collapseGroup` method is not supported when you use the [kendoGridGroupBinding]({% slug api_grid_groupbindingdirective %}) directive.
|
|
677
|
-
*
|
|
678
674
|
* When a Grid is pageable, the indexes of the groups are offset by the current Grid [skip]({% slug api_grid_gridcomponent %}#toc-skip).
|
|
679
675
|
*
|
|
680
676
|
* @param {string} index - The underscore separated hierarchical index of the group.
|
|
@@ -684,10 +680,6 @@ export declare class GridComponent implements AfterContentInit, AfterViewInit, O
|
|
|
684
680
|
* @hidden
|
|
685
681
|
*/
|
|
686
682
|
resetGroupsState(): void;
|
|
687
|
-
/**
|
|
688
|
-
* @hidden
|
|
689
|
-
*/
|
|
690
|
-
expandGroupChildren(groupIndex: string): void;
|
|
691
683
|
/**
|
|
692
684
|
* @hidden
|
|
693
685
|
*/
|
|
@@ -8,12 +8,12 @@ import { GroupResult } from "@progress/kendo-data-query";
|
|
|
8
8
|
*/
|
|
9
9
|
export interface GroupRowArgs {
|
|
10
10
|
/**
|
|
11
|
-
* The
|
|
12
|
-
* For example, "4_0" would be the 1st sub-group in the 5th group.
|
|
11
|
+
* The GroupResult object associated with the group row.
|
|
13
12
|
*/
|
|
14
13
|
group?: GroupResult;
|
|
15
14
|
/**
|
|
16
|
-
* The
|
|
15
|
+
* The hierarchical row group index.
|
|
16
|
+
* For example, "4_0" would be the 1st sub-group in the 5th group.
|
|
17
17
|
*/
|
|
18
18
|
groupIndex: string;
|
|
19
19
|
/**
|
|
@@ -4,16 +4,21 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { ChangeDetectorRef, AfterContentInit } from '@angular/core';
|
|
6
6
|
import { DataBindingDirective } from "../databinding.directive";
|
|
7
|
-
import { GridComponent } from "../grid.component";
|
|
8
7
|
import { CompositeFilterDescriptor, GroupDescriptor, SortDescriptor, State } from "@progress/kendo-data-query";
|
|
9
8
|
import { GridDataResult } from "../data/data.collection";
|
|
10
9
|
import { VirtualGroupResult } from "./virtual-group-result.interface";
|
|
11
10
|
import { LocalDataChangesService } from "../editing/local-data-changes.service";
|
|
11
|
+
import { ContextService } from '../common/provider.service';
|
|
12
|
+
import { GroupsService } from './groups.service';
|
|
12
13
|
import * as i0 from "@angular/core";
|
|
13
14
|
/**
|
|
14
15
|
* @hidden
|
|
15
16
|
*/
|
|
16
17
|
export declare const count: (groups: any[], includeFooters?: boolean) => any;
|
|
18
|
+
/**
|
|
19
|
+
* @hidden
|
|
20
|
+
*/
|
|
21
|
+
export declare const noDescriptors: (descriptors?: any[]) => boolean;
|
|
17
22
|
/**
|
|
18
23
|
* @hidden
|
|
19
24
|
*/
|
|
@@ -22,6 +27,7 @@ export declare const slice: (groups: any[], skip: number, take: number, includeF
|
|
|
22
27
|
* A directive which encapsulates the in-memory handling of grouping with virtual scrolling.
|
|
23
28
|
*/
|
|
24
29
|
export declare class GroupBindingDirective extends DataBindingDirective implements AfterContentInit {
|
|
30
|
+
private groupsService;
|
|
25
31
|
/**
|
|
26
32
|
* The array of data which will be used to populate the Grid.
|
|
27
33
|
*/
|
|
@@ -43,18 +49,35 @@ export declare class GroupBindingDirective extends DataBindingDirective implemen
|
|
|
43
49
|
*/
|
|
44
50
|
set group(value: GroupDescriptor[]);
|
|
45
51
|
private groups;
|
|
46
|
-
|
|
52
|
+
private gridSubs;
|
|
53
|
+
constructor(changeDetector: ChangeDetectorRef, localDataChangesService: LocalDataChangesService, ctxService: ContextService, groupsService: GroupsService);
|
|
54
|
+
ngOnInit(): void;
|
|
55
|
+
ngAfterContentInit(): void;
|
|
56
|
+
ngOnDestroy(): void;
|
|
47
57
|
/**
|
|
48
58
|
* @hidden
|
|
49
59
|
*/
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
60
|
+
toggleAll(expand: boolean): void;
|
|
61
|
+
/**
|
|
62
|
+
* Collapses all expanded root level groups.
|
|
63
|
+
*/
|
|
64
|
+
collapseAll(): void;
|
|
65
|
+
/**
|
|
66
|
+
* Expands all expanded root level groups.
|
|
67
|
+
*/
|
|
68
|
+
expandAll(): void;
|
|
69
|
+
/**
|
|
70
|
+
* @hidden
|
|
71
|
+
*/
|
|
72
|
+
groupExpand({ groupIndex }: any): void;
|
|
73
|
+
/**
|
|
74
|
+
* @hidden
|
|
75
|
+
*/
|
|
76
|
+
groupCollapse({ groupIndex }: any): void;
|
|
54
77
|
protected process(state: State): GridDataResult;
|
|
55
78
|
protected processGroups(state: State): GridDataResult;
|
|
56
79
|
protected dataResult(skip: number, take: number): GridDataResult;
|
|
57
80
|
protected applyState({ skip, take, sort, group, filter }: State): void;
|
|
58
81
|
static ɵfac: i0.ɵɵFactoryDeclaration<GroupBindingDirective, never>;
|
|
59
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<GroupBindingDirective, "[kendoGridGroupBinding]",
|
|
82
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<GroupBindingDirective, "[kendoGridGroupBinding]", ["kendoGridGroupBinding"], { "kendoGridGroupBinding": "kendoGridGroupBinding"; "sort": "sort"; "filter": "filter"; "group": "group"; }, {}, never>;
|
|
60
83
|
}
|
|
@@ -17,9 +17,10 @@ export declare class GroupsService implements OnDestroy {
|
|
|
17
17
|
expand: boolean;
|
|
18
18
|
groupIndex: string;
|
|
19
19
|
parentGroup: GroupRowArgs;
|
|
20
|
+
emit?: boolean;
|
|
20
21
|
}>;
|
|
21
22
|
userCallback: (args: GroupRowArgs) => boolean;
|
|
22
|
-
|
|
23
|
+
rowState: Set<string>;
|
|
23
24
|
reset(): void;
|
|
24
25
|
ngOnDestroy(): void;
|
|
25
26
|
isExpanded(groupArgs: GroupRowArgs): boolean;
|
|
@@ -28,7 +29,7 @@ export declare class GroupsService implements OnDestroy {
|
|
|
28
29
|
index: string;
|
|
29
30
|
parentGroup: GroupItem;
|
|
30
31
|
}): boolean;
|
|
31
|
-
toggleRow(groupItem: GroupItem): void;
|
|
32
|
+
toggleRow(groupItem: GroupItem, emit?: boolean): void;
|
|
32
33
|
expandChildren(parentIndex: string): void;
|
|
33
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<GroupsService, never>;
|
|
34
35
|
static ɵprov: i0.ɵɵInjectableDeclaration<GroupsService>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-grid",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.3.0-develop.2",
|
|
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",
|
|
@@ -33,26 +33,26 @@
|
|
|
33
33
|
"@progress/kendo-data-query": "^1.0.0",
|
|
34
34
|
"@progress/kendo-drawing": "^1.19.0",
|
|
35
35
|
"@progress/kendo-licensing": "^1.0.2",
|
|
36
|
-
"@progress/kendo-angular-buttons": "15.
|
|
37
|
-
"@progress/kendo-angular-common": "15.
|
|
38
|
-
"@progress/kendo-angular-dateinputs": "15.
|
|
39
|
-
"@progress/kendo-angular-layout": "15.
|
|
40
|
-
"@progress/kendo-angular-dropdowns": "15.
|
|
41
|
-
"@progress/kendo-angular-excel-export": "15.
|
|
42
|
-
"@progress/kendo-angular-icons": "15.
|
|
43
|
-
"@progress/kendo-angular-inputs": "15.
|
|
44
|
-
"@progress/kendo-angular-intl": "15.
|
|
45
|
-
"@progress/kendo-angular-l10n": "15.
|
|
46
|
-
"@progress/kendo-angular-label": "15.
|
|
47
|
-
"@progress/kendo-angular-pdf-export": "15.
|
|
48
|
-
"@progress/kendo-angular-popup": "15.
|
|
49
|
-
"@progress/kendo-angular-utils": "15.
|
|
36
|
+
"@progress/kendo-angular-buttons": "15.3.0-develop.2",
|
|
37
|
+
"@progress/kendo-angular-common": "15.3.0-develop.2",
|
|
38
|
+
"@progress/kendo-angular-dateinputs": "15.3.0-develop.2",
|
|
39
|
+
"@progress/kendo-angular-layout": "15.3.0-develop.2",
|
|
40
|
+
"@progress/kendo-angular-dropdowns": "15.3.0-develop.2",
|
|
41
|
+
"@progress/kendo-angular-excel-export": "15.3.0-develop.2",
|
|
42
|
+
"@progress/kendo-angular-icons": "15.3.0-develop.2",
|
|
43
|
+
"@progress/kendo-angular-inputs": "15.3.0-develop.2",
|
|
44
|
+
"@progress/kendo-angular-intl": "15.3.0-develop.2",
|
|
45
|
+
"@progress/kendo-angular-l10n": "15.3.0-develop.2",
|
|
46
|
+
"@progress/kendo-angular-label": "15.3.0-develop.2",
|
|
47
|
+
"@progress/kendo-angular-pdf-export": "15.3.0-develop.2",
|
|
48
|
+
"@progress/kendo-angular-popup": "15.3.0-develop.2",
|
|
49
|
+
"@progress/kendo-angular-utils": "15.3.0-develop.2",
|
|
50
50
|
"rxjs": "^6.5.3 || ^7.0.0",
|
|
51
|
-
"@progress/kendo-angular-spreadsheet": "15.
|
|
51
|
+
"@progress/kendo-angular-spreadsheet": "15.3.0-develop.2"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"tslib": "^2.3.1",
|
|
55
|
-
"@progress/kendo-angular-schematics": "15.
|
|
55
|
+
"@progress/kendo-angular-schematics": "15.3.0-develop.2",
|
|
56
56
|
"@progress/kendo-common": "^0.2.0",
|
|
57
57
|
"@progress/kendo-file-saver": "^1.0.0"
|
|
58
58
|
},
|
|
@@ -4,13 +4,13 @@ const schematics_1 = require("@angular-devkit/schematics");
|
|
|
4
4
|
function default_1(options) {
|
|
5
5
|
const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'GridModule', package: 'grid', peerDependencies: {
|
|
6
6
|
// peer dep of the dropdowns
|
|
7
|
-
'@progress/kendo-angular-treeview': '15.
|
|
7
|
+
'@progress/kendo-angular-treeview': '15.3.0-develop.2',
|
|
8
8
|
// peer dependency of kendo-angular-inputs
|
|
9
|
-
'@progress/kendo-angular-dialog': '15.
|
|
9
|
+
'@progress/kendo-angular-dialog': '15.3.0-develop.2',
|
|
10
10
|
// peer dependency of kendo-angular-icons
|
|
11
11
|
'@progress/kendo-svg-icons': '^2.0.0',
|
|
12
12
|
// peer dependency of kendo-angular-layout
|
|
13
|
-
'@progress/kendo-angular-progressbar': '15.
|
|
13
|
+
'@progress/kendo-angular-progressbar': '15.3.0-develop.2'
|
|
14
14
|
} });
|
|
15
15
|
return (0, schematics_1.externalSchematic)('@progress/kendo-angular-schematics', 'ng-add', finalOptions);
|
|
16
16
|
}
|