@progress/kendo-angular-grid 5.5.2-dev.202201041402 → 6.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/LICENSE.md +1 -1
- package/NOTICE.txt +119 -79
- package/README.md +1 -1
- package/dist/cdn/js/kendo-angular-grid.js +2 -2
- package/dist/cdn/main.js +1 -1
- package/dist/es/column-menu/column-chooser.component.js +1 -1
- package/dist/es/column-menu/column-list.component.js +1 -1
- package/dist/es/dragdrop/draggable-column.directive.js +3 -3
- package/dist/es/filtering/cell/filter-cell-operators.component.js +1 -1
- package/dist/es/filtering/cell/string-filter-cell.component.js +1 -1
- package/dist/es/filtering/filter-input.directive.js +2 -1
- package/dist/es/filtering/menu/boolean-filter-menu.component.js +1 -1
- package/dist/es/filtering/menu/filter-menu-container.component.js +1 -1
- package/dist/es/filtering/menu/string-filter-menu-input.component.js +1 -1
- package/dist/es/grid.component.js +4 -5
- package/dist/es/grouping/group-indicator.component.js +1 -1
- package/dist/es/navigation/focusable.directive.js +5 -5
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/pager/pager-numeric-buttons.component.js +1 -1
- package/dist/es/pager/pager.component.js +0 -5
- package/dist/es/pdf/export-element.js +1 -1
- package/dist/es/rendering/cell.component.js +1 -1
- package/dist/es/rendering/constants.js +1 -1
- package/dist/es/rendering/details-expand.directive.js +20 -6
- package/dist/es/rendering/header/header.component.js +1 -1
- package/dist/es/rendering/toolbar/toolbar-template.directive.js +4 -4
- package/dist/es/selection/pair-set.js +91 -0
- package/dist/es/selection/selection-default.js +48 -30
- package/dist/es/utils.js +1 -3
- package/dist/es2015/column-menu/column-chooser.component.js +2 -2
- package/dist/es2015/column-menu/column-list.component.js +3 -3
- package/dist/es2015/dragdrop/draggable-column.directive.js +3 -3
- package/dist/es2015/filtering/cell/filter-cell-operators.component.js +3 -3
- package/dist/es2015/filtering/cell/string-filter-cell.component.js +1 -1
- package/dist/es2015/filtering/filter-input.directive.js +2 -1
- package/dist/es2015/filtering/menu/boolean-filter-menu.component.js +1 -1
- package/dist/es2015/filtering/menu/filter-menu-container.component.js +2 -2
- package/dist/es2015/filtering/menu/string-filter-menu-input.component.js +1 -1
- package/dist/es2015/grid.component.d.ts +4 -4
- package/dist/es2015/grid.component.js +4 -5
- package/dist/es2015/grouping/group-indicator.component.js +2 -2
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/navigation/focusable.directive.d.ts +5 -5
- package/dist/es2015/navigation/focusable.directive.js +5 -5
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/es2015/pager/pager-numeric-buttons.component.js +1 -1
- package/dist/es2015/pager/pager.component.d.ts +0 -1
- package/dist/es2015/pager/pager.component.js +0 -5
- package/dist/es2015/pdf/export-element.js +1 -1
- package/dist/es2015/rendering/cell.component.js +3 -3
- package/dist/es2015/rendering/constants.d.ts +1 -1
- package/dist/es2015/rendering/constants.js +1 -1
- package/dist/es2015/rendering/details-expand.directive.d.ts +8 -2
- package/dist/es2015/rendering/details-expand.directive.js +20 -6
- package/dist/es2015/rendering/header/header.component.js +1 -1
- package/dist/es2015/rendering/toolbar/toolbar-template.directive.d.ts +4 -4
- package/dist/es2015/rendering/toolbar/toolbar-template.directive.js +4 -4
- package/dist/es2015/selection/pair-set.d.ts +50 -0
- package/dist/es2015/selection/pair-set.js +81 -0
- package/dist/es2015/selection/selection-default.d.ts +10 -2
- package/dist/es2015/selection/selection-default.js +42 -28
- package/dist/es2015/utils.d.ts +2 -2
- package/dist/fesm2015/index.js +179 -78
- package/dist/fesm5/index.js +186 -74
- package/dist/npm/column-menu/column-chooser.component.js +1 -1
- package/dist/npm/column-menu/column-list.component.js +1 -1
- package/dist/npm/dragdrop/draggable-column.directive.js +3 -3
- package/dist/npm/filtering/cell/filter-cell-operators.component.js +1 -1
- package/dist/npm/filtering/cell/string-filter-cell.component.js +1 -1
- package/dist/npm/filtering/filter-input.directive.js +2 -1
- package/dist/npm/filtering/menu/boolean-filter-menu.component.js +1 -1
- package/dist/npm/filtering/menu/filter-menu-container.component.js +1 -1
- package/dist/npm/filtering/menu/string-filter-menu-input.component.js +1 -1
- package/dist/npm/grid.component.js +4 -5
- package/dist/npm/grouping/group-indicator.component.js +1 -1
- package/dist/npm/navigation/focusable.directive.js +5 -5
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/pager/pager-numeric-buttons.component.js +1 -1
- package/dist/npm/pager/pager.component.js +0 -5
- package/dist/npm/pdf/export-element.js +1 -1
- package/dist/npm/rendering/cell.component.js +1 -1
- package/dist/npm/rendering/constants.js +1 -1
- package/dist/npm/rendering/details-expand.directive.js +19 -5
- package/dist/npm/rendering/header/header.component.js +1 -1
- package/dist/npm/rendering/toolbar/toolbar-template.directive.js +4 -4
- package/dist/npm/selection/pair-set.js +93 -0
- package/dist/npm/selection/selection-default.js +48 -30
- package/dist/npm/utils.js +1 -3
- package/dist/systemjs/kendo-angular-grid.js +1 -1
- package/package.json +14 -14
package/dist/fesm2015/index.js
CHANGED
|
@@ -487,7 +487,7 @@ const EMPTY_CELL_CONTEXT = {};
|
|
|
487
487
|
* _@Component({
|
|
488
488
|
* selector: 'my-app',
|
|
489
489
|
* template: `
|
|
490
|
-
* <input type="text"
|
|
490
|
+
* <input type="text" placeholder="Tab stop #0" style="margin-bottom: 8px;" />
|
|
491
491
|
* <kendo-grid [data]="data" [navigable]="true">
|
|
492
492
|
* <kendo-grid-column field="ProductID" title="Product ID" width="100">
|
|
493
493
|
* </kendo-grid-column>
|
|
@@ -496,18 +496,18 @@ const EMPTY_CELL_CONTEXT = {};
|
|
|
496
496
|
* <kendo-grid-column>
|
|
497
497
|
* <ng-template kendoGridCellTemplate let-dataItem>
|
|
498
498
|
* <!-- The first focusable element will be focused when pressing Enter on the cell -->
|
|
499
|
-
* <input type="text"
|
|
500
|
-
* <button
|
|
499
|
+
* <input type="text" kendoGridFocusable [value]="dataItem.ProductName" style="margin-right: 8px;" />
|
|
500
|
+
* <button kendoGridFocusable>Update</button>
|
|
501
501
|
* </ng-template>
|
|
502
502
|
* </kendo-grid-column>
|
|
503
503
|
* <kendo-grid-column width="100">
|
|
504
504
|
* <ng-template kendoGridCellTemplate>
|
|
505
505
|
* <!-- A single focusable element will be focused during navigation -->
|
|
506
|
-
* <button
|
|
506
|
+
* <button kendoGridFocusable>Delete</button>
|
|
507
507
|
* </ng-template>
|
|
508
508
|
* </kendo-grid-column>
|
|
509
509
|
* </kendo-grid>
|
|
510
|
-
* <input type="text"
|
|
510
|
+
* <input type="text" placeholder="Tab stop #2" style="margin-top: 8px;" />
|
|
511
511
|
* `
|
|
512
512
|
* })
|
|
513
513
|
*
|
|
@@ -2831,7 +2831,7 @@ const packageMetadata = {
|
|
|
2831
2831
|
name: '@progress/kendo-angular-grid',
|
|
2832
2832
|
productName: 'Kendo UI for Angular',
|
|
2833
2833
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
2834
|
-
publishDate:
|
|
2834
|
+
publishDate: 1642606465,
|
|
2835
2835
|
version: '',
|
|
2836
2836
|
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'
|
|
2837
2837
|
};
|
|
@@ -4760,6 +4760,84 @@ class DataCollection {
|
|
|
4760
4760
|
toString() { return this.accessor().toString(); }
|
|
4761
4761
|
}
|
|
4762
4762
|
|
|
4763
|
+
/**
|
|
4764
|
+
* @hidden
|
|
4765
|
+
*
|
|
4766
|
+
* Quick look-up structure for combinations of keys.
|
|
4767
|
+
* Similar to the native JS Set, however, working with a couple of keys instead of with a single key.
|
|
4768
|
+
* Supports both primitive keys and object keys (compared by reference).
|
|
4769
|
+
*/
|
|
4770
|
+
class PairSet {
|
|
4771
|
+
constructor(items, keyXField, keyYField) {
|
|
4772
|
+
/**
|
|
4773
|
+
* Holds a set of Y keys for each defined X key.
|
|
4774
|
+
* Each X key creates a map which holds a set of Y keys.
|
|
4775
|
+
*
|
|
4776
|
+
* Map { 1 => Set { 1, 2, 3 } } // pairs: [1, 1], [1, 2], [1, 3]
|
|
4777
|
+
*/
|
|
4778
|
+
this.keysX = new Map();
|
|
4779
|
+
/**
|
|
4780
|
+
* Count the each added or deleted key manually to avoid iterating over all items when calling `this.size`.
|
|
4781
|
+
*/
|
|
4782
|
+
this.totalKeysCount = 0;
|
|
4783
|
+
if (items && keyXField && keyYField) {
|
|
4784
|
+
items.forEach(item => this.add(item[keyXField], item[keyYField]));
|
|
4785
|
+
}
|
|
4786
|
+
}
|
|
4787
|
+
/**
|
|
4788
|
+
* Gets the total number of X/Y key pairs.
|
|
4789
|
+
*/
|
|
4790
|
+
get size() {
|
|
4791
|
+
return this.totalKeysCount;
|
|
4792
|
+
}
|
|
4793
|
+
/**
|
|
4794
|
+
* Adds a couple of items identified as a combination.
|
|
4795
|
+
*/
|
|
4796
|
+
add(keyX, keyY) {
|
|
4797
|
+
if (!this.keysX.has(keyX)) {
|
|
4798
|
+
this.keysX.set(keyX, new Set());
|
|
4799
|
+
}
|
|
4800
|
+
if (!this.has(keyX, keyY)) {
|
|
4801
|
+
this.keysX.get(keyX).add(keyY);
|
|
4802
|
+
this.totalKeysCount += 1;
|
|
4803
|
+
}
|
|
4804
|
+
}
|
|
4805
|
+
/**
|
|
4806
|
+
* Adds a combination of a couple of items identified together.
|
|
4807
|
+
*/
|
|
4808
|
+
delete(keyX, keyY) {
|
|
4809
|
+
if (this.has(keyX, keyY)) {
|
|
4810
|
+
this.keysX.get(keyX).delete(keyY);
|
|
4811
|
+
this.totalKeysCount -= 1;
|
|
4812
|
+
}
|
|
4813
|
+
}
|
|
4814
|
+
/**
|
|
4815
|
+
* Checks whether the defined combination is stored.
|
|
4816
|
+
*/
|
|
4817
|
+
has(keyX, keyY) {
|
|
4818
|
+
return this.keysX.has(keyX) && this.keysX.get(keyX).has(keyY);
|
|
4819
|
+
}
|
|
4820
|
+
/**
|
|
4821
|
+
* Clears all key combinations.
|
|
4822
|
+
*/
|
|
4823
|
+
clear() {
|
|
4824
|
+
this.keysX.clear();
|
|
4825
|
+
this.totalKeysCount = 0;
|
|
4826
|
+
}
|
|
4827
|
+
/**
|
|
4828
|
+
* Converts the persisted data structure to an array of objects,
|
|
4829
|
+
* using the provided field names for the object props.
|
|
4830
|
+
*/
|
|
4831
|
+
toArray(keyXField, keyYField) {
|
|
4832
|
+
return Array.from(this.keysX).reduce((pairs, pair) => {
|
|
4833
|
+
// Array.from(mapInstance) returns an array of arrays [[itemKey1, columnKeysSet1], [itemKey2, columnKeysSet2]]
|
|
4834
|
+
const [keyX, keysY] = pair;
|
|
4835
|
+
Array.from(keysY).forEach(keyY => pairs.push({ [keyXField]: keyX, [keyYField]: keyY }));
|
|
4836
|
+
return pairs;
|
|
4837
|
+
}, []);
|
|
4838
|
+
}
|
|
4839
|
+
}
|
|
4840
|
+
|
|
4763
4841
|
/**
|
|
4764
4842
|
* @hidden
|
|
4765
4843
|
*/
|
|
@@ -4775,19 +4853,28 @@ class Selection {
|
|
|
4775
4853
|
* Fires when the `selectedKeys` collection has been updated.
|
|
4776
4854
|
*/
|
|
4777
4855
|
this.selectedKeysChange = new EventEmitter();
|
|
4856
|
+
this.rowSelectionState = new Set();
|
|
4857
|
+
this.cellSelectionState = new PairSet();
|
|
4778
4858
|
this.init();
|
|
4779
4859
|
}
|
|
4860
|
+
get isCellSelectionMode() {
|
|
4861
|
+
return isPresent(this.grid.selectable) && this.grid.selectable['cell'];
|
|
4862
|
+
}
|
|
4863
|
+
ngOnChanges(changes) {
|
|
4864
|
+
// skip reinitialization if the user data is the same as the last state change
|
|
4865
|
+
if (isPresent(changes.selectedKeys) && this.lastSelectionState !== this.selectedKeys) {
|
|
4866
|
+
this.setState(this.selectedKeys);
|
|
4867
|
+
}
|
|
4868
|
+
}
|
|
4780
4869
|
init() {
|
|
4781
4870
|
if (!isPresent(this.grid.rowSelected)) {
|
|
4782
|
-
this.grid.rowSelected = (row) =>
|
|
4783
|
-
return this.selectedKeys.indexOf(this.getItemKey(row)) >= 0;
|
|
4784
|
-
};
|
|
4871
|
+
this.grid.rowSelected = (row) => this.rowSelectionState.has(this.getItemKey(row));
|
|
4785
4872
|
}
|
|
4786
4873
|
if (!isPresent(this.grid.cellSelected)) {
|
|
4787
4874
|
this.grid.cellSelected = (row, column, colIndex) => {
|
|
4788
4875
|
const contender = this.getSelectionItem(row, column, colIndex);
|
|
4789
4876
|
return {
|
|
4790
|
-
selected: this.
|
|
4877
|
+
selected: this.cellSelectionState.has(contender.itemKey, contender.columnKey),
|
|
4791
4878
|
item: contender
|
|
4792
4879
|
};
|
|
4793
4880
|
};
|
|
@@ -4806,7 +4893,8 @@ class Selection {
|
|
|
4806
4893
|
* @hidden
|
|
4807
4894
|
*/
|
|
4808
4895
|
reset() {
|
|
4809
|
-
this.
|
|
4896
|
+
this.rowSelectionState.clear();
|
|
4897
|
+
this.cellSelectionState.clear();
|
|
4810
4898
|
}
|
|
4811
4899
|
getItemKey(row) {
|
|
4812
4900
|
if (this.selectionKey) {
|
|
@@ -4842,43 +4930,47 @@ class Selection {
|
|
|
4842
4930
|
if (selection.selectedRows) {
|
|
4843
4931
|
selection.deselectedRows.forEach((item) => {
|
|
4844
4932
|
const itemKey = this.getItemKey(item);
|
|
4845
|
-
|
|
4846
|
-
if (itemIndex >= 0) {
|
|
4847
|
-
this.selectedKeys.splice(itemIndex, 1);
|
|
4848
|
-
}
|
|
4933
|
+
this.rowSelectionState.delete(itemKey);
|
|
4849
4934
|
});
|
|
4850
|
-
if (this.grid.selectableSettings.mode === "single" && this.
|
|
4935
|
+
if (this.grid.selectableSettings.mode === "single" && this.rowSelectionState.size > 0) {
|
|
4851
4936
|
this.reset();
|
|
4852
4937
|
}
|
|
4853
4938
|
selection.selectedRows.forEach((item) => {
|
|
4854
4939
|
const itemKey = this.getItemKey(item);
|
|
4855
|
-
|
|
4856
|
-
this.selectedKeys.push(itemKey);
|
|
4857
|
-
}
|
|
4940
|
+
this.rowSelectionState.add(itemKey);
|
|
4858
4941
|
});
|
|
4859
4942
|
}
|
|
4860
4943
|
else {
|
|
4861
|
-
selection.deselectedCells.forEach((
|
|
4862
|
-
|
|
4863
|
-
if (itemIndex >= 0) {
|
|
4864
|
-
this.selectedKeys.splice(itemIndex, 1);
|
|
4865
|
-
}
|
|
4944
|
+
selection.deselectedCells.forEach(({ itemKey, columnKey }) => {
|
|
4945
|
+
this.cellSelectionState.delete(itemKey, columnKey);
|
|
4866
4946
|
});
|
|
4867
|
-
if (this.grid.selectableSettings.mode === "single" && this.
|
|
4947
|
+
if (this.grid.selectableSettings.mode === "single" && this.cellSelectionState.size > 0) {
|
|
4868
4948
|
this.reset();
|
|
4869
4949
|
}
|
|
4870
|
-
selection.selectedCells.forEach((
|
|
4871
|
-
|
|
4872
|
-
if (itemIndex < 0) {
|
|
4873
|
-
this.selectedKeys.push(item);
|
|
4874
|
-
}
|
|
4950
|
+
selection.selectedCells.forEach(({ itemKey, columnKey }) => {
|
|
4951
|
+
this.cellSelectionState.add(itemKey, columnKey);
|
|
4875
4952
|
});
|
|
4876
4953
|
}
|
|
4877
4954
|
this.cd.markForCheck();
|
|
4878
|
-
this.
|
|
4955
|
+
this.notifyChange();
|
|
4956
|
+
}
|
|
4957
|
+
notifyChange() {
|
|
4958
|
+
this.lastSelectionState = this.stateToArray();
|
|
4959
|
+
this.selectedKeysChange.emit(this.lastSelectionState);
|
|
4960
|
+
}
|
|
4961
|
+
setState(selectedKeys) {
|
|
4962
|
+
this.reset();
|
|
4963
|
+
if (this.isCellSelectionMode) {
|
|
4964
|
+
this.cellSelectionState = new PairSet(selectedKeys, 'itemKey', 'columnKey');
|
|
4965
|
+
}
|
|
4966
|
+
else {
|
|
4967
|
+
this.rowSelectionState = new Set(selectedKeys);
|
|
4968
|
+
}
|
|
4879
4969
|
}
|
|
4880
|
-
|
|
4881
|
-
return this.
|
|
4970
|
+
stateToArray() {
|
|
4971
|
+
return this.isCellSelectionMode ?
|
|
4972
|
+
this.cellSelectionState.toArray('itemKey', 'columnKey') :
|
|
4973
|
+
Array.from(this.rowSelectionState);
|
|
4882
4974
|
}
|
|
4883
4975
|
}
|
|
4884
4976
|
__decorate([
|
|
@@ -5499,16 +5591,16 @@ ExcelService = __decorate([
|
|
|
5499
5591
|
* selector: 'my-app',
|
|
5500
5592
|
* template: `
|
|
5501
5593
|
* <div class="example-config">
|
|
5502
|
-
* <input type="radio" id="top" name="position"
|
|
5594
|
+
* <input type="radio" id="top" name="position" value="top" checked (click)="positionChange($event)"/>
|
|
5503
5595
|
* <label class="k-radio-label" for="top">Top</label><br/>
|
|
5504
|
-
* <input type="radio" id="bottom" name="position"
|
|
5596
|
+
* <input type="radio" id="bottom" name="position" value="bottom" (click)="positionChange($event)"/>
|
|
5505
5597
|
* <label class="k-radio-label" for="bottom">Bottom</label><br/>
|
|
5506
|
-
* <input type="radio" id="both" name="position" value="both"
|
|
5598
|
+
* <input type="radio" id="both" name="position" value="both" (click)="positionChange($event)"/>
|
|
5507
5599
|
* <label class="k-radio-label" for="both">Both</label><br/>
|
|
5508
5600
|
* </div>
|
|
5509
5601
|
* <kendo-grid [data]="gridData" style="height: 200px">
|
|
5510
5602
|
* <ng-template kendoGridToolbarTemplate [position]="position" let-position="position">
|
|
5511
|
-
* <button (click)="onClick()"
|
|
5603
|
+
* <button (click)="onClick()">Custom action</button>
|
|
5512
5604
|
* </ng-template>
|
|
5513
5605
|
* <kendo-grid-column field="ProductName">
|
|
5514
5606
|
* </kendo-grid-column>
|
|
@@ -7511,7 +7603,7 @@ let GridComponent = class GridComponent {
|
|
|
7511
7603
|
* [resizable]="true"
|
|
7512
7604
|
* style="height: 300px">
|
|
7513
7605
|
* <ng-template kendoGridToolbarTemplate>
|
|
7514
|
-
* <button
|
|
7606
|
+
* <button kendoButton (click)="grid.autoFitColumn(groupColumn)">
|
|
7515
7607
|
* Auto-fit the group column
|
|
7516
7608
|
* </button>
|
|
7517
7609
|
* </ng-template>
|
|
@@ -7577,10 +7669,10 @@ let GridComponent = class GridComponent {
|
|
|
7577
7669
|
* [resizable]="true"
|
|
7578
7670
|
* style="height: 300px">
|
|
7579
7671
|
* <ng-template kendoGridToolbarTemplate>
|
|
7580
|
-
* <button
|
|
7672
|
+
* <button kendoButton (click)="grid.autoFitColumns([firstColumn, lastColumn])">
|
|
7581
7673
|
* Auto-fit the first and last column
|
|
7582
7674
|
* </button>
|
|
7583
|
-
* <button
|
|
7675
|
+
* <button kendoButton (click)="grid.autoFitColumns()">
|
|
7584
7676
|
* Auto-fit all columns
|
|
7585
7677
|
* </button>
|
|
7586
7678
|
* </ng-template>
|
|
@@ -7753,7 +7845,7 @@ let GridComponent = class GridComponent {
|
|
|
7753
7845
|
* [reorderable]="true"
|
|
7754
7846
|
* style="height: 300px">
|
|
7755
7847
|
* <ng-template kendoGridToolbarTemplate>
|
|
7756
|
-
* <button
|
|
7848
|
+
* <button kendoButton
|
|
7757
7849
|
* (click)="grid.reorderColumn(groupColumn, 2, { before: true })">
|
|
7758
7850
|
* Move the group column before the last one.
|
|
7759
7851
|
* </button>
|
|
@@ -8590,7 +8682,6 @@ __decorate([
|
|
|
8590
8682
|
__metadata("design:paramtypes", [])
|
|
8591
8683
|
], GridComponent.prototype, "dir", null);
|
|
8592
8684
|
__decorate([
|
|
8593
|
-
HostBinding('class.k-widget'),
|
|
8594
8685
|
HostBinding('class.k-grid'),
|
|
8595
8686
|
__metadata("design:type", Boolean),
|
|
8596
8687
|
__metadata("design:paramtypes", [])
|
|
@@ -9379,7 +9470,7 @@ const IGNORE_TARGET_CLASSSES = 'k-icon';
|
|
|
9379
9470
|
/**
|
|
9380
9471
|
* @hidden
|
|
9381
9472
|
*/
|
|
9382
|
-
const IGNORE_CONTAINER_CLASSES = 'k-
|
|
9473
|
+
const IGNORE_CONTAINER_CLASSES = 'k-grid k-grid-ignore-click';
|
|
9383
9474
|
|
|
9384
9475
|
const elementAt = (index, elements, elementOffset) => {
|
|
9385
9476
|
for (let idx = 0, elementIdx = 0; idx < elements.length; idx++) {
|
|
@@ -10375,9 +10466,12 @@ let ExpandDetailsDirective = class ExpandDetailsDirective {
|
|
|
10375
10466
|
this.expandedDetailKeys = [];
|
|
10376
10467
|
/**
|
|
10377
10468
|
* Specifies if the items should be initially expanded.
|
|
10469
|
+
* When set to `true` items added to the `expandedDetailKeys` collection will be collapsed, and items that are not present in it will be expanded.
|
|
10470
|
+
*
|
|
10378
10471
|
* @default false
|
|
10379
10472
|
*/
|
|
10380
10473
|
this.initiallyExpanded = false;
|
|
10474
|
+
this.expandedState = new Set();
|
|
10381
10475
|
this.subscriptions = new Subscription();
|
|
10382
10476
|
this.grid.isDetailExpanded = this.isExpanded.bind(this);
|
|
10383
10477
|
this.subscriptions.add(merge(this.grid.detailExpand.pipe(map(e => (Object.assign({ expand: true }, e)))), this.grid.detailCollapse.pipe(map(e => (Object.assign({ expand: false }, e))))).subscribe(this.toggleState.bind(this)));
|
|
@@ -10407,6 +10501,12 @@ let ExpandDetailsDirective = class ExpandDetailsDirective {
|
|
|
10407
10501
|
set expandDetailBy(key) {
|
|
10408
10502
|
this.expandDetailsKey = key;
|
|
10409
10503
|
}
|
|
10504
|
+
ngOnChanges(changes) {
|
|
10505
|
+
// skip reinitialization if the user data is the same as the last state change
|
|
10506
|
+
if (isPresent(changes.expandedDetailKeys) && this.lastExpandedState !== this.expandedDetailKeys) {
|
|
10507
|
+
this.expandedState = new Set(this.expandedDetailKeys);
|
|
10508
|
+
}
|
|
10509
|
+
}
|
|
10410
10510
|
ngOnDestroy() {
|
|
10411
10511
|
this.subscriptions.unsubscribe();
|
|
10412
10512
|
}
|
|
@@ -10418,18 +10518,23 @@ let ExpandDetailsDirective = class ExpandDetailsDirective {
|
|
|
10418
10518
|
*/
|
|
10419
10519
|
isExpanded(args) {
|
|
10420
10520
|
const key = this.keyGetter(args.dataItem);
|
|
10421
|
-
|
|
10521
|
+
const hasKey = this.expandedState.has(key);
|
|
10522
|
+
// when [initiallyExpanded]="true" a present key means the corresponding detail row is collapsed
|
|
10523
|
+
return this.initiallyExpanded ? !hasKey : hasKey;
|
|
10422
10524
|
}
|
|
10423
10525
|
toggleState(args) {
|
|
10424
10526
|
const key = this.keyGetter(args.dataItem);
|
|
10425
10527
|
if (Boolean(this.initiallyExpanded) !== args.expand) {
|
|
10426
|
-
this.
|
|
10528
|
+
this.expandedState.add(key);
|
|
10427
10529
|
}
|
|
10428
10530
|
else {
|
|
10429
|
-
|
|
10430
|
-
this.expandedDetailKeys.splice(index, 1);
|
|
10531
|
+
this.expandedState.delete(key);
|
|
10431
10532
|
}
|
|
10432
|
-
this.
|
|
10533
|
+
this.notifyChange();
|
|
10534
|
+
}
|
|
10535
|
+
notifyChange() {
|
|
10536
|
+
this.lastExpandedState = Array.from(this.expandedState);
|
|
10537
|
+
this.expandedDetailKeysChange.emit(this.lastExpandedState);
|
|
10433
10538
|
}
|
|
10434
10539
|
};
|
|
10435
10540
|
__decorate([
|
|
@@ -11622,7 +11727,8 @@ let FilterInputDirective = class FilterInputDirective {
|
|
|
11622
11727
|
addAriaAttributes() {
|
|
11623
11728
|
const ariaValue = this.columnLabel;
|
|
11624
11729
|
if (this.kendoInput && this.kendoInput.focusableId && isDocumentAvailable()) {
|
|
11625
|
-
const focusableElement = this.element.nativeElement.querySelector(`#${this.kendoInput.focusableId}`)
|
|
11730
|
+
const focusableElement = this.element.nativeElement.querySelector(`#${this.kendoInput.focusableId}`) ||
|
|
11731
|
+
this.element.nativeElement;
|
|
11626
11732
|
this.renderer.setAttribute(focusableElement, 'aria-label', ariaValue);
|
|
11627
11733
|
}
|
|
11628
11734
|
else {
|
|
@@ -11958,7 +12064,7 @@ StringFilterCellComponent = __decorate([
|
|
|
11958
12064
|
[defaultOperator]="operator"
|
|
11959
12065
|
[showOperators]="showOperators">
|
|
11960
12066
|
<input
|
|
11961
|
-
|
|
12067
|
+
kendoTextBox
|
|
11962
12068
|
kendoGridFocusable
|
|
11963
12069
|
kendoFilterInput
|
|
11964
12070
|
[columnLabel]="columnLabel"
|
|
@@ -12095,12 +12201,12 @@ FilterCellOperatorsComponent = __decorate([
|
|
|
12095
12201
|
</kendo-dropdownlist>
|
|
12096
12202
|
<button type="button"
|
|
12097
12203
|
kendoGridFocusable
|
|
12098
|
-
|
|
12099
|
-
class="k-button k-button-icon"
|
|
12204
|
+
*ngIf="showButton"
|
|
12205
|
+
class="k-button k-button-solid-base k-button-solid k-button-md k-rounded-md k-button-rectangle k-icon-button"
|
|
12100
12206
|
[title]="clearText"
|
|
12101
12207
|
(click)="clearClick()"
|
|
12102
12208
|
(keydown)="clearKeydown($event)">
|
|
12103
|
-
<span class="k-icon k-i-filter-clear"></span>
|
|
12209
|
+
<span class="k-icon k-button-icon k-i-filter-clear"></span>
|
|
12104
12210
|
</button>
|
|
12105
12211
|
`
|
|
12106
12212
|
}),
|
|
@@ -14037,7 +14143,6 @@ let PagerComponent = class PagerComponent {
|
|
|
14037
14143
|
this.pageChange = new EventEmitter();
|
|
14038
14144
|
this.pagerWrapClass = true;
|
|
14039
14145
|
this.gridPagerClass = true;
|
|
14040
|
-
this.widgetClass = true;
|
|
14041
14146
|
this.settings = normalize({});
|
|
14042
14147
|
this.subscriptions = new Subscription();
|
|
14043
14148
|
this._templateContext = {};
|
|
@@ -14252,10 +14357,6 @@ __decorate([
|
|
|
14252
14357
|
HostBinding('class.k-grid-pager'),
|
|
14253
14358
|
__metadata("design:type", Boolean)
|
|
14254
14359
|
], PagerComponent.prototype, "gridPagerClass", void 0);
|
|
14255
|
-
__decorate([
|
|
14256
|
-
HostBinding('class.k-widget'),
|
|
14257
|
-
__metadata("design:type", Boolean)
|
|
14258
|
-
], PagerComponent.prototype, "widgetClass", void 0);
|
|
14259
14360
|
__decorate([
|
|
14260
14361
|
HostBinding('class.k-state-focused'),
|
|
14261
14362
|
__metadata("design:type", Boolean),
|
|
@@ -14689,7 +14790,7 @@ PagerNumericButtonsComponent = __decorate([
|
|
|
14689
14790
|
selector: 'kendo-pager-numeric-buttons',
|
|
14690
14791
|
template: `
|
|
14691
14792
|
<select
|
|
14692
|
-
class="k-
|
|
14793
|
+
class="k-dropdownlist k-pager-nav"
|
|
14693
14794
|
kendoGridFocusable
|
|
14694
14795
|
tabindex="0"
|
|
14695
14796
|
[value]="(currentPage).toString()"
|
|
@@ -15716,8 +15817,8 @@ GroupIndicatorComponent = __decorate([
|
|
|
15716
15817
|
[class.k-i-sort-asc-sm]="dir === 'asc'"
|
|
15717
15818
|
[class.k-i-sort-desc-sm]="dir === 'desc'"></span>
|
|
15718
15819
|
{{groupTitle}}</a>
|
|
15719
|
-
<a class="k-button k-button-icon k-
|
|
15720
|
-
<span class="k-icon k-i-group-delete"></span>
|
|
15820
|
+
<a class="k-button k-button-flat-base k-button-flat k-icon-button k-button-md k-rounded-md k-button-rectangle k-icon-button" tabindex="-1" (click)="removeDescriptor()">
|
|
15821
|
+
<span class="k-button-icon k-icon k-i-group-delete"></span>
|
|
15721
15822
|
</a>
|
|
15722
15823
|
`
|
|
15723
15824
|
})
|
|
@@ -15730,9 +15831,9 @@ GroupIndicatorComponent = __decorate([
|
|
|
15730
15831
|
*/
|
|
15731
15832
|
const preventOnDblClick = release => mouseDown => of(mouseDown).pipe(delay(150), takeUntil(release));
|
|
15732
15833
|
const hasClass = className => el => new RegExp(`(^| )${className}( |$)`).test(el.className);
|
|
15733
|
-
const isDeleteButton = or(hasClass(
|
|
15734
|
-
const isSortIcon = or(hasClass(
|
|
15735
|
-
const skipButtons = and(not(isDeleteButton), not(isSortIcon), not(isFocusableWithTabKey), not(matchesNodeName(
|
|
15834
|
+
const isDeleteButton = or(hasClass('k-i-group-delete'), hasClass('k-icon-button'));
|
|
15835
|
+
const isSortIcon = or(hasClass('k-i-sort-asc-sm'), hasClass('k-i-sort-desc-sm'));
|
|
15836
|
+
const skipButtons = and(not(isDeleteButton), not(isSortIcon), not(isFocusableWithTabKey), not(matchesNodeName('label')));
|
|
15736
15837
|
const elementUnderCursor = ({ clientX, clientY }) => document.elementFromPoint(clientX, clientY);
|
|
15737
15838
|
const hideThenShow = (element, cont) => {
|
|
15738
15839
|
element.style.display = 'none';
|
|
@@ -16895,7 +16996,7 @@ HeaderComponent = __decorate([
|
|
|
16895
16996
|
|
|
16896
16997
|
<ng-template [ngIf]="isCheckboxColumn(column) && !column.headerTemplateRef && column.showSelectAll">
|
|
16897
16998
|
<input
|
|
16898
|
-
class="k-checkbox"
|
|
16999
|
+
class="k-checkbox k-checkbox-md k-rounded-md"
|
|
16899
17000
|
[attr.id]="selectAllCheckboxId()"
|
|
16900
17001
|
[attr.aria-label]="selectAllCheckboxLabel"
|
|
16901
17002
|
kendoGridSelectAllCheckbox
|
|
@@ -17501,11 +17602,11 @@ FilterMenuContainerComponent = __decorate([
|
|
|
17501
17602
|
<button
|
|
17502
17603
|
#resetButton
|
|
17503
17604
|
type="reset"
|
|
17504
|
-
class="k-button"
|
|
17605
|
+
class="k-button k-button-solid-base k-button-solid k-button-md k-rounded-md k-button-rectangle"
|
|
17505
17606
|
(keydown.tab)="onTab($event, 'reset')">{{clearText}}</button>
|
|
17506
17607
|
<button #filterButton
|
|
17507
17608
|
type="submit"
|
|
17508
|
-
class="k-button k-primary"
|
|
17609
|
+
class="k-button k-button-solid-primary k-button-solid k-button-md k-rounded-md k-button-rectangle"
|
|
17509
17610
|
[disabled]="disabled"
|
|
17510
17611
|
(keydown.tab)="onTab($event, 'filter')">{{filterText}}</button>
|
|
17511
17612
|
</div>
|
|
@@ -17690,7 +17791,7 @@ StringFilterMenuInputComponent = __decorate([
|
|
|
17690
17791
|
[menuTabbingService]="menuTabbingService"
|
|
17691
17792
|
>
|
|
17692
17793
|
<input
|
|
17693
|
-
|
|
17794
|
+
kendoTextBox
|
|
17694
17795
|
kendoFilterInput
|
|
17695
17796
|
[columnLabel]="columnLabel"
|
|
17696
17797
|
[filterDelay]="0"
|
|
@@ -18339,7 +18440,7 @@ BooleanFilterMenuComponent = __decorate([
|
|
|
18339
18440
|
[columnLabel]="columnLabel"
|
|
18340
18441
|
#input
|
|
18341
18442
|
[name]="idPrefix"
|
|
18342
|
-
|
|
18443
|
+
kendoRadioButton
|
|
18343
18444
|
[checked]="isSelected(item.value)"
|
|
18344
18445
|
[attr.id]="radioId(item.value)"
|
|
18345
18446
|
(change)="onChange(item.value, input)"
|
|
@@ -18827,12 +18928,12 @@ ColumnListComponent = __decorate([
|
|
|
18827
18928
|
template: `
|
|
18828
18929
|
<div class="k-column-list">
|
|
18829
18930
|
<label *ngFor="let column of columns; let index = index;" class='k-column-list-item'>
|
|
18830
|
-
<input class="k-checkbox" type="checkbox" [attr.data-index]="index" [checked]="!column.hidden" [disabled]="isDisabled(column)" /><span class="k-checkbox-label">{{ column.displayTitle }}</span>
|
|
18931
|
+
<input class="k-checkbox k-checkbox-md k-rounded-md" type="checkbox" [attr.data-index]="index" [checked]="!column.hidden" [disabled]="isDisabled(column)" /><span class="k-checkbox-label">{{ column.displayTitle }}</span>
|
|
18831
18932
|
</label>
|
|
18832
18933
|
</div>
|
|
18833
18934
|
<div [ngClass]="actionsClass" *ngIf="!autoSync">
|
|
18834
|
-
<button type="button" class="k-button" (click)="cancelChanges()">{{ resetText }}</button>
|
|
18835
|
-
<button #applyButton type="button" (keydown.tab)="onTab($event)" class="k-button k-primary" (click)="applyChanges()">{{ applyText }}</button>
|
|
18935
|
+
<button type="button" class="k-button k-button-solid-base k-button-solid k-button-md k-rounded-md k-button-rectangle" (click)="cancelChanges()">{{ resetText }}</button>
|
|
18936
|
+
<button #applyButton type="button" (keydown.tab)="onTab($event)" class="k-button k-button-solid-primary k-button-solid k-button-md k-rounded-md k-button-rectangle" (click)="applyChanges()">{{ applyText }}</button>
|
|
18836
18937
|
</div>
|
|
18837
18938
|
`
|
|
18838
18939
|
}),
|
|
@@ -18962,9 +19063,9 @@ ColumnChooserComponent = __decorate([
|
|
|
18962
19063
|
<button #anchor
|
|
18963
19064
|
type="button"
|
|
18964
19065
|
(click)="toggle(anchor, template)"
|
|
18965
|
-
class="k-button k-
|
|
19066
|
+
class="k-button k-button-flat-base k-button-flat k-icon-button k-button-md k-rounded-md k-button-rectangle k-icon-button"
|
|
18966
19067
|
[attr.title]="localization.get('columns')">
|
|
18967
|
-
<span class="k-icon k-i-columns"></span>
|
|
19068
|
+
<span class="k-button-icon k-icon k-i-columns"></span>
|
|
18968
19069
|
</button>
|
|
18969
19070
|
<ng-template #template>
|
|
18970
19071
|
<span class='k-column-chooser-title'>{{ localization.get('columns') }}</span>
|
|
@@ -21289,7 +21390,7 @@ CellComponent = __decorate([
|
|
|
21289
21390
|
<ng-template [ngIf]="isBoundColumn">{{ dataItem | valueOf: column.field: column.format}}</ng-template>
|
|
21290
21391
|
<ng-template [ngIf]="isCheckboxColumn && !isNew">
|
|
21291
21392
|
<input
|
|
21292
|
-
class="k-checkbox"
|
|
21393
|
+
class="k-checkbox k-checkbox-md k-rounded-md"
|
|
21293
21394
|
[kendoGridSelectionCheckbox]="rowIndex"
|
|
21294
21395
|
[attr.id]="selectionCheckboxId"
|
|
21295
21396
|
[attr.aria-label]="selectionCheckboxLabel" />
|
|
@@ -21328,7 +21429,7 @@ CellComponent = __decorate([
|
|
|
21328
21429
|
<input
|
|
21329
21430
|
*ngSwitchCase="'boolean'"
|
|
21330
21431
|
type="checkbox"
|
|
21331
|
-
class="k-checkbox"
|
|
21432
|
+
class="k-checkbox k-checkbox-md k-rounded-md"
|
|
21332
21433
|
[formControl]="formGroup.get(column.field)"
|
|
21333
21434
|
kendoGridFocusable
|
|
21334
21435
|
/>
|
|
@@ -21336,7 +21437,7 @@ CellComponent = __decorate([
|
|
|
21336
21437
|
<input
|
|
21337
21438
|
*ngSwitchDefault
|
|
21338
21439
|
type="text"
|
|
21339
|
-
class="k-textbox"
|
|
21440
|
+
class="k-textbox k-input k-rounded-md"
|
|
21340
21441
|
[formControl]="formGroup.get(column.field)"
|
|
21341
21442
|
kendoGridFocusable
|
|
21342
21443
|
/>
|
|
@@ -22828,7 +22929,7 @@ const appendNodes = (element, nodes) => {
|
|
|
22828
22929
|
};
|
|
22829
22930
|
const wrapTable = (table) => {
|
|
22830
22931
|
const wrapper = document.createElement('div');
|
|
22831
|
-
wrapper.className = 'k-
|
|
22932
|
+
wrapper.className = 'k-grid';
|
|
22832
22933
|
wrapper.appendChild(table);
|
|
22833
22934
|
return wrapper;
|
|
22834
22935
|
};
|