@progress/kendo-angular-grid 13.0.0-develop.9 → 13.0.0
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/aggregates/aggregate-types.d.ts +58 -0
- package/aggregates/status-bar-template.directive.d.ts +19 -0
- package/aggregates/status-bar.component.d.ts +53 -0
- package/column-menu/column-menu.component.d.ts +1 -1
- package/esm2020/aggregates/aggregate-types.mjs +6 -0
- package/esm2020/aggregates/status-bar-template.directive.mjs +26 -0
- package/esm2020/aggregates/status-bar.component.mjs +236 -0
- package/esm2020/column-menu/column-menu.component.mjs +6 -6
- package/esm2020/filtering/cell/boolean-filter-cell.component.mjs +1 -1
- package/esm2020/filtering/cell/filter-cell-operators.component.mjs +15 -1
- package/esm2020/filtering/cell/filter-cell-wrapper.component.mjs +3 -1
- package/esm2020/filtering/cell/string-filter-cell.component.mjs +1 -1
- package/esm2020/filtering/filter-input.directive.mjs +5 -1
- package/esm2020/grid.component.mjs +574 -540
- package/esm2020/grid.module.mjs +10 -2
- package/esm2020/grouping/group-panel.component.mjs +2 -2
- package/esm2020/index.mjs +1 -0
- package/esm2020/localization/messages.mjs +5 -1
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/rendering/list.component.mjs +12 -14
- package/esm2020/selection/cell-selection.service.mjs +20 -1
- package/esm2020/selection/selection-checkbox.directive.mjs +2 -0
- package/esm2020/selection/selection-default.mjs +14 -1
- package/esm2020/selection/selection.service.mjs +31 -5
- package/fesm2015/progress-kendo-angular-grid.mjs +926 -572
- package/fesm2020/progress-kendo-angular-grid.mjs +927 -572
- package/filtering/cell/filter-cell-operators.component.d.ts +10 -1
- package/grid.component.d.ts +10 -1
- package/grid.module.d.ts +100 -98
- package/grouping/group-panel.component.d.ts +0 -1
- package/index.d.ts +2 -0
- package/localization/messages.d.ts +25 -1
- package/package.json +16 -16
- package/schematics/ngAdd/index.js +3 -3
- package/selection/cell-selection.service.d.ts +3 -0
- package/selection/selection-default.d.ts +17 -2
- package/selection/selection.service.d.ts +8 -2
- package/selection/types.d.ts +27 -0
package/esm2020/grid.module.mjs
CHANGED
|
@@ -23,6 +23,8 @@ import { FooterModule } from "./rendering/footer/footer.module";
|
|
|
23
23
|
import { SharedModule } from './shared.module';
|
|
24
24
|
import { ToolbarTemplateDirective } from "./rendering/toolbar/toolbar-template.directive";
|
|
25
25
|
import { ToolbarComponent } from "./rendering/toolbar/toolbar.component";
|
|
26
|
+
import { StatusBarTemplateDirective } from './aggregates/status-bar-template.directive';
|
|
27
|
+
import { StatusBarComponent } from './aggregates/status-bar.component';
|
|
26
28
|
import { ResizeSensorModule } from '@progress/kendo-angular-common';
|
|
27
29
|
import { TemplateEditingDirective } from './editing-directives/template-editing.directive';
|
|
28
30
|
import { ReactiveEditingDirective } from './editing-directives/reactive-editing.directive';
|
|
@@ -123,6 +125,7 @@ const exportedModules = [
|
|
|
123
125
|
ToolbarTemplateDirective,
|
|
124
126
|
ToolbarComponent,
|
|
125
127
|
GridSpacerComponent,
|
|
128
|
+
StatusBarTemplateDirective,
|
|
126
129
|
DataBindingDirective,
|
|
127
130
|
SelectionDirective,
|
|
128
131
|
CustomMessagesComponent,
|
|
@@ -160,7 +163,9 @@ const declarations = [
|
|
|
160
163
|
GroupBindingDirective,
|
|
161
164
|
GridMarqueeDirective,
|
|
162
165
|
GridSpacerComponent,
|
|
163
|
-
GridToolbarFocusableDirective
|
|
166
|
+
GridToolbarFocusableDirective,
|
|
167
|
+
StatusBarComponent,
|
|
168
|
+
StatusBarTemplateDirective
|
|
164
169
|
];
|
|
165
170
|
/**
|
|
166
171
|
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
|
|
@@ -202,7 +207,9 @@ GridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13
|
|
|
202
207
|
GroupBindingDirective,
|
|
203
208
|
GridMarqueeDirective,
|
|
204
209
|
GridSpacerComponent,
|
|
205
|
-
GridToolbarFocusableDirective
|
|
210
|
+
GridToolbarFocusableDirective,
|
|
211
|
+
StatusBarComponent,
|
|
212
|
+
StatusBarTemplateDirective], imports: [CommonModule,
|
|
206
213
|
GroupModule,
|
|
207
214
|
SharedModule,
|
|
208
215
|
BodyModule,
|
|
@@ -217,6 +224,7 @@ GridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13
|
|
|
217
224
|
ToolbarTemplateDirective,
|
|
218
225
|
ToolbarComponent,
|
|
219
226
|
GridSpacerComponent,
|
|
227
|
+
StatusBarTemplateDirective,
|
|
220
228
|
DataBindingDirective,
|
|
221
229
|
SelectionDirective,
|
|
222
230
|
CustomMessagesComponent,
|
|
@@ -180,7 +180,7 @@ GroupPanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
180
180
|
[label]="groupTitles[index]"
|
|
181
181
|
[removable]="true"
|
|
182
182
|
[icon]="getDirectionIcon(group)"
|
|
183
|
-
[svgIcon]=""
|
|
183
|
+
[svgIcon]="getDirectionSvgIcon(group)"
|
|
184
184
|
(contentClick)="directionChange(group)"
|
|
185
185
|
(remove)="remove(group)"
|
|
186
186
|
>
|
|
@@ -232,7 +232,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
232
232
|
[label]="groupTitles[index]"
|
|
233
233
|
[removable]="true"
|
|
234
234
|
[icon]="getDirectionIcon(group)"
|
|
235
|
-
[svgIcon]=""
|
|
235
|
+
[svgIcon]="getDirectionSvgIcon(group)"
|
|
236
236
|
(contentClick)="directionChange(group)"
|
|
237
237
|
(remove)="remove(group)"
|
|
238
238
|
>
|
package/esm2020/index.mjs
CHANGED
|
@@ -25,6 +25,7 @@ export { FooterTemplateDirective } from './rendering/footer/footer-template.dire
|
|
|
25
25
|
export { PagerTemplateDirective } from './pager/pager-template.directive';
|
|
26
26
|
export { GridSpacerComponent } from './rendering/common/spacer.component';
|
|
27
27
|
export { ExpandDetailsDirective } from './rendering/details-expand.directive';
|
|
28
|
+
export { StatusBarTemplateDirective } from './aggregates/status-bar-template.directive';
|
|
28
29
|
export { ExpandGroupDirective } from './rendering/groups-expand.directive';
|
|
29
30
|
export { defaultTrackBy } from './common/default-track-by';
|
|
30
31
|
export { DetailTemplateDirective } from './rendering/details/detail-template.directive';
|
|
@@ -11,7 +11,7 @@ import * as i0 from "@angular/core";
|
|
|
11
11
|
export class GridMessages extends ComponentMessages {
|
|
12
12
|
}
|
|
13
13
|
GridMessages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GridMessages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
14
|
-
GridMessages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: GridMessages, selector: "kendo-grid-messages-base", inputs: { groupPanelEmpty: "groupPanelEmpty", noRecords: "noRecords", pagerLabel: "pagerLabel", pagerFirstPage: "pagerFirstPage", pagerLastPage: "pagerLastPage", pagerPreviousPage: "pagerPreviousPage", pagerNextPage: "pagerNextPage", pagerPage: "pagerPage", pagerItemsPerPage: "pagerItemsPerPage", pagerOf: "pagerOf", pagerItems: "pagerItems", pagerPageNumberInputTitle: "pagerPageNumberInputTitle", selectPage: "selectPage", filter: "filter", filterInputLabel: "filterInputLabel", filterMenuTitle: "filterMenuTitle", filterMenuOperatorsDropDownLabel: "filterMenuOperatorsDropDownLabel", filterMenuLogicDropDownLabel: "filterMenuLogicDropDownLabel", filterEqOperator: "filterEqOperator", filterNotEqOperator: "filterNotEqOperator", filterIsNullOperator: "filterIsNullOperator", filterIsNotNullOperator: "filterIsNotNullOperator", filterIsEmptyOperator: "filterIsEmptyOperator", filterIsNotEmptyOperator: "filterIsNotEmptyOperator", filterStartsWithOperator: "filterStartsWithOperator", filterContainsOperator: "filterContainsOperator", filterNotContainsOperator: "filterNotContainsOperator", filterEndsWithOperator: "filterEndsWithOperator", filterGteOperator: "filterGteOperator", filterGtOperator: "filterGtOperator", filterLteOperator: "filterLteOperator", filterLtOperator: "filterLtOperator", filterIsTrue: "filterIsTrue", filterIsFalse: "filterIsFalse", filterBooleanAll: "filterBooleanAll", filterAfterOrEqualOperator: "filterAfterOrEqualOperator", filterAfterOperator: "filterAfterOperator", filterBeforeOperator: "filterBeforeOperator", filterBeforeOrEqualOperator: "filterBeforeOrEqualOperator", filterFilterButton: "filterFilterButton", filterClearButton: "filterClearButton", filterAndLogic: "filterAndLogic", filterOrLogic: "filterOrLogic", loading: "loading", gridLabel: "gridLabel", columnMenu: "columnMenu", setColumnPosition: "setColumnPosition", columns: "columns", lock: "lock", unlock: "unlock", stick: "stick", unstick: "unstick", sortable: "sortable", sortAscending: "sortAscending", sortDescending: "sortDescending", autosizeThisColumn: "autosizeThisColumn", autosizeAllColumns: "autosizeAllColumns", sortedAscending: "sortedAscending", sortedDescending: "sortedDescending", sortedDefault: "sortedDefault", columnsApply: "columnsApply", columnsReset: "columnsReset", detailExpand: "detailExpand", detailCollapse: "detailCollapse", filterDateToday: "filterDateToday", filterDateToggle: "filterDateToggle", filterNumericDecrement: "filterNumericDecrement", filterNumericIncrement: "filterNumericIncrement", selectionCheckboxLabel: "selectionCheckboxLabel", selectAllCheckboxLabel: "selectAllCheckboxLabel", groupCollapse: "groupCollapse", groupExpand: "groupExpand", topToolbarLabel: "topToolbarLabel", bottomToolbarLabel: "bottomToolbarLabel", groupPanelLabel: "groupPanelLabel", dragRowHandleLabel: "dragRowHandleLabel", columnMenuFilterTabTitle: "columnMenuFilterTabTitle", columnMenuGeneralTabTitle: "columnMenuGeneralTabTitle", columnMenuColumnsTabTitle: "columnMenuColumnsTabTitle" }, usesInheritance: true, ngImport: i0 });
|
|
14
|
+
GridMessages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: GridMessages, selector: "kendo-grid-messages-base", inputs: { groupPanelEmpty: "groupPanelEmpty", noRecords: "noRecords", pagerLabel: "pagerLabel", pagerFirstPage: "pagerFirstPage", pagerLastPage: "pagerLastPage", pagerPreviousPage: "pagerPreviousPage", pagerNextPage: "pagerNextPage", pagerPage: "pagerPage", pagerItemsPerPage: "pagerItemsPerPage", pagerOf: "pagerOf", pagerItems: "pagerItems", pagerPageNumberInputTitle: "pagerPageNumberInputTitle", selectPage: "selectPage", filter: "filter", filterInputLabel: "filterInputLabel", filterMenuTitle: "filterMenuTitle", filterMenuOperatorsDropDownLabel: "filterMenuOperatorsDropDownLabel", filterMenuLogicDropDownLabel: "filterMenuLogicDropDownLabel", filterCellOperatorLabel: "filterCellOperatorLabel", booleanFilterCellLabel: "booleanFilterCellLabel", filterEqOperator: "filterEqOperator", filterNotEqOperator: "filterNotEqOperator", filterIsNullOperator: "filterIsNullOperator", filterIsNotNullOperator: "filterIsNotNullOperator", filterIsEmptyOperator: "filterIsEmptyOperator", filterIsNotEmptyOperator: "filterIsNotEmptyOperator", filterStartsWithOperator: "filterStartsWithOperator", filterContainsOperator: "filterContainsOperator", filterNotContainsOperator: "filterNotContainsOperator", filterEndsWithOperator: "filterEndsWithOperator", filterGteOperator: "filterGteOperator", filterGtOperator: "filterGtOperator", filterLteOperator: "filterLteOperator", filterLtOperator: "filterLtOperator", filterIsTrue: "filterIsTrue", filterIsFalse: "filterIsFalse", filterBooleanAll: "filterBooleanAll", filterAfterOrEqualOperator: "filterAfterOrEqualOperator", filterAfterOperator: "filterAfterOperator", filterBeforeOperator: "filterBeforeOperator", filterBeforeOrEqualOperator: "filterBeforeOrEqualOperator", filterFilterButton: "filterFilterButton", filterClearButton: "filterClearButton", filterAndLogic: "filterAndLogic", filterOrLogic: "filterOrLogic", loading: "loading", gridLabel: "gridLabel", columnMenu: "columnMenu", setColumnPosition: "setColumnPosition", columns: "columns", lock: "lock", unlock: "unlock", stick: "stick", unstick: "unstick", sortable: "sortable", sortAscending: "sortAscending", sortDescending: "sortDescending", autosizeThisColumn: "autosizeThisColumn", autosizeAllColumns: "autosizeAllColumns", sortedAscending: "sortedAscending", sortedDescending: "sortedDescending", sortedDefault: "sortedDefault", columnsApply: "columnsApply", columnsReset: "columnsReset", detailExpand: "detailExpand", detailCollapse: "detailCollapse", filterDateToday: "filterDateToday", filterDateToggle: "filterDateToggle", filterNumericDecrement: "filterNumericDecrement", filterNumericIncrement: "filterNumericIncrement", selectionCheckboxLabel: "selectionCheckboxLabel", selectAllCheckboxLabel: "selectAllCheckboxLabel", groupCollapse: "groupCollapse", groupExpand: "groupExpand", topToolbarLabel: "topToolbarLabel", bottomToolbarLabel: "bottomToolbarLabel", groupPanelLabel: "groupPanelLabel", dragRowHandleLabel: "dragRowHandleLabel", columnMenuFilterTabTitle: "columnMenuFilterTabTitle", columnMenuGeneralTabTitle: "columnMenuGeneralTabTitle", columnMenuColumnsTabTitle: "columnMenuColumnsTabTitle" }, usesInheritance: true, ngImport: i0 });
|
|
15
15
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GridMessages, decorators: [{
|
|
16
16
|
type: Directive,
|
|
17
17
|
args: [{
|
|
@@ -54,6 +54,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
54
54
|
type: Input
|
|
55
55
|
}], filterMenuLogicDropDownLabel: [{
|
|
56
56
|
type: Input
|
|
57
|
+
}], filterCellOperatorLabel: [{
|
|
58
|
+
type: Input
|
|
59
|
+
}], booleanFilterCellLabel: [{
|
|
60
|
+
type: Input
|
|
57
61
|
}], filterEqOperator: [{
|
|
58
62
|
type: Input
|
|
59
63
|
}], filterNotEqOperator: [{
|
|
@@ -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: '13.0.0
|
|
12
|
+
publishDate: 1686055792,
|
|
13
|
+
version: '13.0.0',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
15
15
|
};
|
|
@@ -614,7 +614,6 @@ ListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
|
|
|
614
614
|
[size]="size"
|
|
615
615
|
[style.width.px]="lockedWidth">
|
|
616
616
|
<colgroup kendoGridColGroup
|
|
617
|
-
role="presentation"
|
|
618
617
|
[groups]="groups"
|
|
619
618
|
[columns]="$any(lockedLeafColumns)"
|
|
620
619
|
[detailTemplate]="detailTemplate"
|
|
@@ -646,11 +645,12 @@ ListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
|
|
|
646
645
|
<div [style.height.px]="totalHeight"></div>
|
|
647
646
|
</div>
|
|
648
647
|
</div>
|
|
649
|
-
<div
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
648
|
+
<div
|
|
649
|
+
#container
|
|
650
|
+
class="k-grid-content k-virtual-content"
|
|
651
|
+
[kendoGridResizableContainer]="lockedLeafColumns.length > 0"
|
|
652
|
+
[lockedWidth]="lockedWidth + 1"
|
|
653
|
+
>
|
|
654
654
|
<div role="presentation" class="k-grid-table-wrap">
|
|
655
655
|
<table
|
|
656
656
|
[style.width.px]="nonLockedWidth"
|
|
@@ -661,7 +661,6 @@ ListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
|
|
|
661
661
|
[size]="size"
|
|
662
662
|
role="presentation">
|
|
663
663
|
<colgroup kendoGridColGroup
|
|
664
|
-
role="presentation"
|
|
665
664
|
[groups]="isLocked ? [] : groups"
|
|
666
665
|
[columns]="$any(nonLockedColumnsToRender)"
|
|
667
666
|
[detailTemplate]="detailTemplate"
|
|
@@ -733,7 +732,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
733
732
|
[size]="size"
|
|
734
733
|
[style.width.px]="lockedWidth">
|
|
735
734
|
<colgroup kendoGridColGroup
|
|
736
|
-
role="presentation"
|
|
737
735
|
[groups]="groups"
|
|
738
736
|
[columns]="$any(lockedLeafColumns)"
|
|
739
737
|
[detailTemplate]="detailTemplate"
|
|
@@ -765,11 +763,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
765
763
|
<div [style.height.px]="totalHeight"></div>
|
|
766
764
|
</div>
|
|
767
765
|
</div>
|
|
768
|
-
<div
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
766
|
+
<div
|
|
767
|
+
#container
|
|
768
|
+
class="k-grid-content k-virtual-content"
|
|
769
|
+
[kendoGridResizableContainer]="lockedLeafColumns.length > 0"
|
|
770
|
+
[lockedWidth]="lockedWidth + 1"
|
|
771
|
+
>
|
|
773
772
|
<div role="presentation" class="k-grid-table-wrap">
|
|
774
773
|
<table
|
|
775
774
|
[style.width.px]="nonLockedWidth"
|
|
@@ -780,7 +779,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
780
779
|
[size]="size"
|
|
781
780
|
role="presentation">
|
|
782
781
|
<colgroup kendoGridColGroup
|
|
783
|
-
role="presentation"
|
|
784
782
|
[groups]="isLocked ? [] : groups"
|
|
785
783
|
[columns]="$any(nonLockedColumnsToRender)"
|
|
786
784
|
[detailTemplate]="detailTemplate"
|
|
@@ -21,6 +21,7 @@ export class CellSelectionService {
|
|
|
21
21
|
this.localDataChangesService = localDataChangesService;
|
|
22
22
|
this.navigationService = navigationService;
|
|
23
23
|
this.changes = new EventEmitter();
|
|
24
|
+
this.aggregateChanges = new EventEmitter();
|
|
24
25
|
this.mouseUpEvent = new EventEmitter();
|
|
25
26
|
this.currentSelection = [];
|
|
26
27
|
this.active = false;
|
|
@@ -106,6 +107,16 @@ export class CellSelectionService {
|
|
|
106
107
|
}
|
|
107
108
|
ev.ctrlKey = ctrlKey;
|
|
108
109
|
ev.shiftKey = event.shiftKey;
|
|
110
|
+
if (this.options.cellAggregates) {
|
|
111
|
+
this.aggregateChanges.emit(ev);
|
|
112
|
+
ev.cellAggregates = this.aggregates;
|
|
113
|
+
}
|
|
114
|
+
if (ev.shiftKey) {
|
|
115
|
+
ev.rangeStartCell = this.lastSelectionItem;
|
|
116
|
+
ev.rangeEndCell = {
|
|
117
|
+
...this.settings.cellSelected({ dataItem: item.data, index: item.index }, item.column, item.column.leafIndex).item
|
|
118
|
+
};
|
|
119
|
+
}
|
|
109
120
|
this.changes.emit(ev);
|
|
110
121
|
}
|
|
111
122
|
toggle(item) {
|
|
@@ -209,13 +220,20 @@ export class CellSelectionService {
|
|
|
209
220
|
}
|
|
210
221
|
next = iterator.next();
|
|
211
222
|
}
|
|
223
|
+
let cellAggregates;
|
|
224
|
+
if (this.options.cellAggregates) {
|
|
225
|
+
this.aggregateChanges.emit({ selectedCells, deselectedCells });
|
|
226
|
+
cellAggregates = this.aggregates;
|
|
227
|
+
}
|
|
212
228
|
return {
|
|
213
229
|
deselectedCells,
|
|
214
|
-
selectedCells
|
|
230
|
+
selectedCells,
|
|
231
|
+
cellAggregates
|
|
215
232
|
};
|
|
216
233
|
}
|
|
217
234
|
get options() {
|
|
218
235
|
const defaultOptions = {
|
|
236
|
+
cellAggregates: false,
|
|
219
237
|
checkboxOnly: false,
|
|
220
238
|
enabled: true,
|
|
221
239
|
mode: "multiple"
|
|
@@ -225,6 +243,7 @@ export class CellSelectionService {
|
|
|
225
243
|
}
|
|
226
244
|
if (typeof this.settings.selectable === 'boolean') {
|
|
227
245
|
return {
|
|
246
|
+
cellAggregates: false,
|
|
228
247
|
checkboxOnly: false,
|
|
229
248
|
enabled: this.settings.selectable,
|
|
230
249
|
mode: "multiple"
|
|
@@ -54,6 +54,8 @@ export class SelectionCheckboxDirective {
|
|
|
54
54
|
const ev = this.selectionService.toggleByIndex(this.itemIndex);
|
|
55
55
|
ev.ctrlKey = true;
|
|
56
56
|
ev.shiftKey = false;
|
|
57
|
+
this.selectionService.aggregateChanges.emit(ev);
|
|
58
|
+
ev.cellAggregates = this.selectionService.aggregates;
|
|
57
59
|
this.selectionService.changes.emit(ev);
|
|
58
60
|
});
|
|
59
61
|
}
|
|
@@ -20,6 +20,12 @@ export class Selection {
|
|
|
20
20
|
* @default []
|
|
21
21
|
*/
|
|
22
22
|
this.selectedKeys = [];
|
|
23
|
+
/**
|
|
24
|
+
* Defines the initial shift-click range selection starting column index when cell selection is enabled.
|
|
25
|
+
*
|
|
26
|
+
* @default 0
|
|
27
|
+
*/
|
|
28
|
+
this.rangeSelectionStartColumnIndex = 0;
|
|
23
29
|
/**
|
|
24
30
|
* Fires when the `selectedKeys` collection has been updated.
|
|
25
31
|
*/
|
|
@@ -67,6 +73,9 @@ export class Selection {
|
|
|
67
73
|
this.rowSelectionState.clear();
|
|
68
74
|
this.cellSelectionState.clear();
|
|
69
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* @hidden
|
|
78
|
+
*/
|
|
70
79
|
getItemKey(row) {
|
|
71
80
|
if (this.selectionKey) {
|
|
72
81
|
if (typeof this.selectionKey === "string") {
|
|
@@ -145,7 +154,7 @@ export class Selection {
|
|
|
145
154
|
}
|
|
146
155
|
}
|
|
147
156
|
Selection.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: Selection, deps: [{ token: i1.ContextService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
148
|
-
Selection.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: Selection, selector: "kendo-grid-selection-base", inputs: { selectedKeys: "selectedKeys", selectionKey: ["kendoGridSelectBy", "selectionKey"], columnKey: "columnKey" }, outputs: { selectedKeysChange: "selectedKeysChange" }, usesOnChanges: true, ngImport: i0 });
|
|
157
|
+
Selection.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: Selection, selector: "kendo-grid-selection-base", inputs: { selectedKeys: "selectedKeys", rangeSelectionStartRow: "rangeSelectionStartRow", rangeSelectionStartColumnIndex: "rangeSelectionStartColumnIndex", selectionKey: ["kendoGridSelectBy", "selectionKey"], columnKey: "columnKey" }, outputs: { selectedKeysChange: "selectedKeysChange" }, usesOnChanges: true, ngImport: i0 });
|
|
149
158
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: Selection, decorators: [{
|
|
150
159
|
type: Directive,
|
|
151
160
|
args: [{
|
|
@@ -154,6 +163,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
154
163
|
}]
|
|
155
164
|
}], ctorParameters: function () { return [{ type: i1.ContextService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { selectedKeys: [{
|
|
156
165
|
type: Input
|
|
166
|
+
}], rangeSelectionStartRow: [{
|
|
167
|
+
type: Input
|
|
168
|
+
}], rangeSelectionStartColumnIndex: [{
|
|
169
|
+
type: Input
|
|
157
170
|
}], selectionKey: [{
|
|
158
171
|
type: Input,
|
|
159
172
|
args: ["kendoGridSelectBy"]
|
|
@@ -8,24 +8,28 @@ import { isPresent } from '../utils';
|
|
|
8
8
|
import { DomEventsService } from '../common/dom-events.service';
|
|
9
9
|
import { LocalDataChangesService } from '../editing/local-data-changes.service';
|
|
10
10
|
import { NavigationService } from '../navigation/navigation.service';
|
|
11
|
+
import { ContextService } from '../common/provider.service';
|
|
11
12
|
import * as i0 from "@angular/core";
|
|
12
13
|
import * as i1 from "../common/dom-events.service";
|
|
13
14
|
import * as i2 from "../editing/local-data-changes.service";
|
|
14
15
|
import * as i3 from "../navigation/navigation.service";
|
|
16
|
+
import * as i4 from "../common/provider.service";
|
|
15
17
|
/**
|
|
16
18
|
* @hidden
|
|
17
19
|
*/
|
|
18
20
|
export class SelectionService {
|
|
19
|
-
constructor(domEvents, localDataChangesService, navigationService) {
|
|
21
|
+
constructor(domEvents, localDataChangesService, navigationService, ctxService) {
|
|
20
22
|
this.domEvents = domEvents;
|
|
21
23
|
this.localDataChangesService = localDataChangesService;
|
|
22
24
|
this.navigationService = navigationService;
|
|
25
|
+
this.ctxService = ctxService;
|
|
23
26
|
this.changes = new EventEmitter();
|
|
24
|
-
this.
|
|
27
|
+
this.aggregateChanges = new EventEmitter();
|
|
25
28
|
this.currentSelection = [];
|
|
26
29
|
this.selectAllChecked = false;
|
|
27
30
|
this.active = false;
|
|
28
31
|
this.dragging = false;
|
|
32
|
+
this.lastSelectionData = {};
|
|
29
33
|
this.addSubscriptions();
|
|
30
34
|
}
|
|
31
35
|
get enableMarquee() {
|
|
@@ -44,6 +48,10 @@ export class SelectionService {
|
|
|
44
48
|
}
|
|
45
49
|
init(settings) {
|
|
46
50
|
this.settings = settings;
|
|
51
|
+
if (!isPresent(this.lastSelectionStartIndex)) {
|
|
52
|
+
this.lastSelectionStartIndex = this.ctxService?.grid.selectionDirective?.rangeSelectionStartRow?.index || 0;
|
|
53
|
+
this.lastSelectionData = this.ctxService?.grid.selectionDirective?.rangeSelectionStartRow?.dataItem || {};
|
|
54
|
+
}
|
|
47
55
|
this.currentSelection = [];
|
|
48
56
|
if (settings.selectable && settings.selectable.enabled !== false) {
|
|
49
57
|
const iterator = this.getIterator();
|
|
@@ -104,12 +112,21 @@ export class SelectionService {
|
|
|
104
112
|
}
|
|
105
113
|
ev.ctrlKey = ctrlKey;
|
|
106
114
|
ev.shiftKey = event.shiftKey;
|
|
115
|
+
if (this.options.cellAggregates) {
|
|
116
|
+
this.aggregateChanges.emit(ev);
|
|
117
|
+
ev.cellAggregates = this.aggregates;
|
|
118
|
+
}
|
|
119
|
+
if (ev.shiftKey) {
|
|
120
|
+
ev.rangeStartRow = { dataItem: this.lastSelectionData, index: this.lastSelectionStartIndex };
|
|
121
|
+
ev.rangeEndRow = { dataItem: item.data, index: item.index };
|
|
122
|
+
}
|
|
107
123
|
this.changes.emit(ev);
|
|
108
124
|
}
|
|
109
125
|
toggle(item) {
|
|
110
126
|
const selectedRows = [];
|
|
111
127
|
const deselectedRows = [];
|
|
112
128
|
this.lastSelectionStartIndex = item.index;
|
|
129
|
+
this.lastSelectionData = item.data;
|
|
113
130
|
const rowArgs = { dataItem: item.data, index: item.index };
|
|
114
131
|
if (this.isSelected(item.index)) {
|
|
115
132
|
deselectedRows.push(rowArgs);
|
|
@@ -148,6 +165,7 @@ export class SelectionService {
|
|
|
148
165
|
const deselectedRows = [];
|
|
149
166
|
const selectedRows = [];
|
|
150
167
|
this.lastSelectionStartIndex = item.index;
|
|
168
|
+
this.lastSelectionData = item.data;
|
|
151
169
|
if (!this.isSelected(item.index)) {
|
|
152
170
|
selectedRows.push({ dataItem: item.data, index: item.index });
|
|
153
171
|
}
|
|
@@ -258,9 +276,15 @@ export class SelectionService {
|
|
|
258
276
|
}
|
|
259
277
|
next = iterator.next();
|
|
260
278
|
}
|
|
279
|
+
let cellAggregates;
|
|
280
|
+
if (this.options.cellAggregates) {
|
|
281
|
+
this.aggregateChanges.emit({ selectedRows, deselectedRows });
|
|
282
|
+
cellAggregates = this.aggregates;
|
|
283
|
+
}
|
|
261
284
|
return {
|
|
262
285
|
deselectedRows: deselectedRows,
|
|
263
|
-
selectedRows: selectedRows
|
|
286
|
+
selectedRows: selectedRows,
|
|
287
|
+
cellAggregates
|
|
264
288
|
};
|
|
265
289
|
}
|
|
266
290
|
get selectAllState() {
|
|
@@ -273,6 +297,7 @@ export class SelectionService {
|
|
|
273
297
|
}
|
|
274
298
|
get options() {
|
|
275
299
|
const defaultOptions = {
|
|
300
|
+
cellAggregates: false,
|
|
276
301
|
checkboxOnly: false,
|
|
277
302
|
enabled: true,
|
|
278
303
|
mode: "multiple"
|
|
@@ -282,6 +307,7 @@ export class SelectionService {
|
|
|
282
307
|
}
|
|
283
308
|
if (typeof this.settings.selectable === 'boolean') {
|
|
284
309
|
return {
|
|
310
|
+
cellAggregates: false,
|
|
285
311
|
checkboxOnly: false,
|
|
286
312
|
enabled: this.settings.selectable,
|
|
287
313
|
mode: "multiple"
|
|
@@ -354,8 +380,8 @@ export class SelectionService {
|
|
|
354
380
|
}
|
|
355
381
|
}
|
|
356
382
|
}
|
|
357
|
-
SelectionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SelectionService, deps: [{ token: i1.DomEventsService }, { token: i2.LocalDataChangesService }, { token: i3.NavigationService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
383
|
+
SelectionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SelectionService, deps: [{ token: i1.DomEventsService }, { token: i2.LocalDataChangesService }, { token: i3.NavigationService }, { token: i4.ContextService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
358
384
|
SelectionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SelectionService });
|
|
359
385
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SelectionService, decorators: [{
|
|
360
386
|
type: Injectable
|
|
361
|
-
}], ctorParameters: function () { return [{ type: i1.DomEventsService }, { type: i2.LocalDataChangesService }, { type: i3.NavigationService }]; } });
|
|
387
|
+
}], ctorParameters: function () { return [{ type: i1.DomEventsService }, { type: i2.LocalDataChangesService }, { type: i3.NavigationService }, { type: i4.ContextService }]; } });
|