@progress/kendo-angular-dropdowns 6.0.1-dev.202201201129 → 6.0.2-dev.202202171128
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/dist/cdn/js/kendo-angular-dropdowns.js +2 -2
- package/dist/cdn/main.js +1 -1
- package/dist/es/dropdownlist/dropdownlist.component.js +1 -1
- package/dist/es/dropdowntrees/checked-state/base-check.directive.js +19 -5
- package/dist/es/multiselect/multiselect.component.js +2 -1
- package/dist/es/package-metadata.js +1 -1
- package/dist/es2015/dropdownlist/dropdownlist.component.d.ts +1 -1
- package/dist/es2015/dropdownlist/dropdownlist.component.js +1 -1
- package/dist/es2015/dropdowntrees/checked-state/base-check.directive.d.ts +7 -0
- package/dist/es2015/dropdowntrees/checked-state/base-check.directive.js +19 -5
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/multiselect/multiselect.component.d.ts +2 -1
- package/dist/es2015/multiselect/multiselect.component.js +2 -1
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/fesm2015/index.js +22 -7
- package/dist/fesm5/index.js +22 -7
- package/dist/npm/dropdownlist/dropdownlist.component.js +1 -1
- package/dist/npm/dropdowntrees/checked-state/base-check.directive.js +18 -4
- package/dist/npm/multiselect/multiselect.component.js +2 -1
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-angular-dropdowns.js +1 -1
- package/package.json +3 -5
- package/schematics/ngAdd/index.js +1 -1
|
@@ -1611,7 +1611,7 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
1611
1611
|
tslib_1.__decorate([
|
|
1612
1612
|
HostListener('click', ['$event']),
|
|
1613
1613
|
tslib_1.__metadata("design:type", Function),
|
|
1614
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
1614
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1615
1615
|
tslib_1.__metadata("design:returntype", void 0)
|
|
1616
1616
|
], DropDownListComponent.prototype, "click", null);
|
|
1617
1617
|
DropDownListComponent = DropDownListComponent_1 = tslib_1.__decorate([
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as tslib_1 from "tslib";
|
|
6
6
|
import { Input } from '@angular/core';
|
|
7
|
-
import { getHierarchicalItemLevel, valueFrom } from '../../common/util';
|
|
7
|
+
import { getHierarchicalItemLevel, isArray, valueFrom } from '../../common/util';
|
|
8
8
|
/**
|
|
9
9
|
* @hidden
|
|
10
10
|
*
|
|
@@ -20,7 +20,7 @@ var BaseCheckDirective = /** @class */ (function () {
|
|
|
20
20
|
var level = getHierarchicalItemLevel(item.index);
|
|
21
21
|
var candidate = tslib_1.__assign({}, item, { level: level });
|
|
22
22
|
this.checkedItems.push(candidate);
|
|
23
|
-
this.checkedKeys.add(
|
|
23
|
+
this.checkedKeys.add(this.getKey(candidate));
|
|
24
24
|
};
|
|
25
25
|
BaseCheckDirective.prototype.removeItem = function (item) {
|
|
26
26
|
var _this = this;
|
|
@@ -31,15 +31,29 @@ var BaseCheckDirective = /** @class */ (function () {
|
|
|
31
31
|
var candidate = tslib_1.__assign({}, item, { level: level });
|
|
32
32
|
this.checkedItems = this.checkedItems
|
|
33
33
|
.filter(function (item) { return valueFrom(item, _this.valueField) !== valueFrom(candidate, _this.valueField); });
|
|
34
|
-
this.checkedKeys.delete(
|
|
34
|
+
this.checkedKeys.delete(this.getKey(candidate));
|
|
35
35
|
};
|
|
36
36
|
BaseCheckDirective.prototype.isItemChecked = function (item) {
|
|
37
|
-
|
|
37
|
+
var level = item.index.split('_').length - 1;
|
|
38
|
+
item.level = level;
|
|
39
|
+
return this.checkedKeys.has(this.getKey(item));
|
|
38
40
|
};
|
|
39
41
|
BaseCheckDirective.prototype.updateItems = function () {
|
|
40
42
|
var _this = this;
|
|
41
43
|
this.checkedItems = this.checkedItems || [];
|
|
42
|
-
this.checkedKeys = new Set(this.checkedItems.map(function (item) { return
|
|
44
|
+
this.checkedKeys = new Set(this.checkedItems.map(function (item) { return _this.getKey(item); }));
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Adds the item's depth to the item's value to allow duplicate values on different levels.
|
|
48
|
+
*
|
|
49
|
+
* @param item - The checked key.
|
|
50
|
+
* @returns { string } - A string key consisting of the item's `valueField` value and its depth.
|
|
51
|
+
*/
|
|
52
|
+
BaseCheckDirective.prototype.getKey = function (item) {
|
|
53
|
+
if (isArray(this.valueField)) {
|
|
54
|
+
return valueFrom(item, this.valueField) + '_' + item.level;
|
|
55
|
+
}
|
|
56
|
+
return valueFrom(item, this.valueField);
|
|
43
57
|
};
|
|
44
58
|
tslib_1.__decorate([
|
|
45
59
|
Input(),
|
|
@@ -120,7 +120,8 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
120
120
|
*/
|
|
121
121
|
this.clearButton = true;
|
|
122
122
|
/**
|
|
123
|
-
* A user-defined callback function which receives an array of selected data items and maps them to an array of tags
|
|
123
|
+
* A user-defined callback function which receives an array of selected data items and maps them to an array of tags
|
|
124
|
+
* ([see examples]({% slug summarytagmode_multiselect %}#toc-rendering-of-tags)).
|
|
124
125
|
*
|
|
125
126
|
* @param { Any[] } dataItems - The selected data items from the list.
|
|
126
127
|
* @returns { Any[] } - The tags that will be rendered by the component.
|
|
@@ -9,7 +9,7 @@ export var packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-dropdowns',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1645097139,
|
|
13
13
|
version: '',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
15
15
|
};
|
|
@@ -1454,7 +1454,7 @@ tslib_1.__decorate([
|
|
|
1454
1454
|
tslib_1.__decorate([
|
|
1455
1455
|
HostListener('click', ['$event']),
|
|
1456
1456
|
tslib_1.__metadata("design:type", Function),
|
|
1457
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
1457
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1458
1458
|
tslib_1.__metadata("design:returntype", void 0)
|
|
1459
1459
|
], DropDownListComponent.prototype, "click", null);
|
|
1460
1460
|
DropDownListComponent = DropDownListComponent_1 = tslib_1.__decorate([
|
|
@@ -29,4 +29,11 @@ export declare abstract class BaseCheckDirective {
|
|
|
29
29
|
protected removeItem(item: TreeItem): void;
|
|
30
30
|
protected isItemChecked(item: CheckedItem): boolean;
|
|
31
31
|
protected updateItems(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Adds the item's depth to the item's value to allow duplicate values on different levels.
|
|
34
|
+
*
|
|
35
|
+
* @param item - The checked key.
|
|
36
|
+
* @returns { string } - A string key consisting of the item's `valueField` value and its depth.
|
|
37
|
+
*/
|
|
38
|
+
private getKey;
|
|
32
39
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as tslib_1 from "tslib";
|
|
6
6
|
import { Input } from '@angular/core';
|
|
7
|
-
import { getHierarchicalItemLevel, valueFrom } from '../../common/util';
|
|
7
|
+
import { getHierarchicalItemLevel, isArray, valueFrom } from '../../common/util';
|
|
8
8
|
/**
|
|
9
9
|
* @hidden
|
|
10
10
|
*
|
|
@@ -18,7 +18,7 @@ export class BaseCheckDirective {
|
|
|
18
18
|
const level = getHierarchicalItemLevel(item.index);
|
|
19
19
|
const candidate = Object.assign({}, item, { level });
|
|
20
20
|
this.checkedItems.push(candidate);
|
|
21
|
-
this.checkedKeys.add(
|
|
21
|
+
this.checkedKeys.add(this.getKey(candidate));
|
|
22
22
|
}
|
|
23
23
|
removeItem(item) {
|
|
24
24
|
if (!this.isItemChecked(item)) {
|
|
@@ -28,14 +28,28 @@ export class BaseCheckDirective {
|
|
|
28
28
|
const candidate = Object.assign({}, item, { level });
|
|
29
29
|
this.checkedItems = this.checkedItems
|
|
30
30
|
.filter(item => valueFrom(item, this.valueField) !== valueFrom(candidate, this.valueField));
|
|
31
|
-
this.checkedKeys.delete(
|
|
31
|
+
this.checkedKeys.delete(this.getKey(candidate));
|
|
32
32
|
}
|
|
33
33
|
isItemChecked(item) {
|
|
34
|
-
|
|
34
|
+
const level = item.index.split('_').length - 1;
|
|
35
|
+
item.level = level;
|
|
36
|
+
return this.checkedKeys.has(this.getKey(item));
|
|
35
37
|
}
|
|
36
38
|
updateItems() {
|
|
37
39
|
this.checkedItems = this.checkedItems || [];
|
|
38
|
-
this.checkedKeys = new Set(this.checkedItems.map(item =>
|
|
40
|
+
this.checkedKeys = new Set(this.checkedItems.map(item => this.getKey(item)));
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Adds the item's depth to the item's value to allow duplicate values on different levels.
|
|
44
|
+
*
|
|
45
|
+
* @param item - The checked key.
|
|
46
|
+
* @returns { string } - A string key consisting of the item's `valueField` value and its depth.
|
|
47
|
+
*/
|
|
48
|
+
getKey(item) {
|
|
49
|
+
if (isArray(this.valueField)) {
|
|
50
|
+
return valueFrom(item, this.valueField) + '_' + item.level;
|
|
51
|
+
}
|
|
52
|
+
return valueFrom(item, this.valueField);
|
|
39
53
|
}
|
|
40
54
|
}
|
|
41
55
|
tslib_1.__decorate([
|