@progress/kendo-angular-dropdowns 7.0.2 → 7.0.4-dev.202208041601
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/README.md +93 -7
- package/bundles/kendo-angular-dropdowns.umd.js +1 -1
- package/common/util.d.ts +1 -1
- package/dropdowntrees/checked-state/base-check.directive.d.ts +9 -2
- package/dropdowntrees/checked-state/checked-item.d.ts +4 -0
- package/dropdowntrees/lookup/lookup.d.ts +51 -0
- package/dropdowntrees/lookup/lookup.service.d.ts +32 -0
- package/dropdowntrees/multiselecttree.component.d.ts +16 -3
- package/esm2015/comboboxes/combobox.component.js +1 -1
- package/esm2015/dropdownlist/dropdownlist.component.js +1 -1
- package/esm2015/dropdowntrees/checked-state/base-check.directive.js +16 -14
- package/esm2015/dropdowntrees/dropdowntree.component.js +2 -2
- package/esm2015/dropdowntrees/lookup/lookup.js +6 -0
- package/esm2015/dropdowntrees/lookup/lookup.service.js +84 -0
- package/esm2015/dropdowntrees/multiselecttree.component.js +88 -24
- package/esm2015/package-metadata.js +1 -1
- package/fesm2015/kendo-angular-dropdowns.js +175 -33
- package/package.json +2 -2
|
@@ -6,7 +6,7 @@ import * as i0 from '@angular/core';
|
|
|
6
6
|
import { EventEmitter, Component, Input, Output, ViewChild, HostBinding, Directive, Injectable, InjectionToken, HostListener, ViewChildren, forwardRef, isDevMode, ViewContainerRef, Optional, Inject, ContentChild, ContentChildren, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
7
7
|
import * as i9 from '@progress/kendo-angular-common';
|
|
8
8
|
import { isDocumentAvailable, Keys, isChanged, hasObservers, KendoInput, anyChanged, guid as guid$1, ResizeSensorModule, EventsModule } from '@progress/kendo-angular-common';
|
|
9
|
-
import * as
|
|
9
|
+
import * as i12 from '@angular/forms';
|
|
10
10
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
11
11
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
12
12
|
import { getter as getter$1, pointers, touchEnabled } from '@progress/kendo-common';
|
|
@@ -29,7 +29,7 @@ const packageMetadata = {
|
|
|
29
29
|
name: '@progress/kendo-angular-dropdowns',
|
|
30
30
|
productName: 'Kendo UI for Angular',
|
|
31
31
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
32
|
-
publishDate:
|
|
32
|
+
publishDate: 1659628812,
|
|
33
33
|
version: '',
|
|
34
34
|
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'
|
|
35
35
|
};
|
|
@@ -4231,7 +4231,7 @@ class ComboBoxComponent {
|
|
|
4231
4231
|
* @hidden
|
|
4232
4232
|
*/
|
|
4233
4233
|
get buttonClasses() {
|
|
4234
|
-
return this.loading ? 'k-i-loading k-input-loading-icon' : this.iconClass || 'k-i-
|
|
4234
|
+
return this.loading ? 'k-i-loading k-input-loading-icon' : this.iconClass || 'k-i-caret-alt-down';
|
|
4235
4235
|
}
|
|
4236
4236
|
/**
|
|
4237
4237
|
* @hidden
|
|
@@ -5842,7 +5842,7 @@ class DropDownListComponent {
|
|
|
5842
5842
|
* @hidden
|
|
5843
5843
|
*/
|
|
5844
5844
|
get buttonClasses() {
|
|
5845
|
-
return this.loading ? 'k-i-loading k-input-loading-icon' : this.iconClass || 'k-i-
|
|
5845
|
+
return this.loading ? 'k-i-loading k-input-loading-icon' : this.iconClass || 'k-i-caret-alt-down';
|
|
5846
5846
|
}
|
|
5847
5847
|
/**
|
|
5848
5848
|
* @hidden
|
|
@@ -6485,7 +6485,7 @@ DropDownListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
6485
6485
|
<kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
|
|
6486
6486
|
</ng-template>
|
|
6487
6487
|
<ng-container #container></ng-container>
|
|
6488
|
-
`, isInline: true, components: [{ type: ListComponent, selector: "kendo-list", inputs: ["selected", "focused", "textField", "valueField", "height", "template", "groupTemplate", "fixedGroupTemplate", "show", "id", "optionPrefix", "multipleSelection", "virtual", "type", "checkboxes", "data", "size", "rounded"], outputs: ["onClick", "pageChange", "listResize"] }, { type: i9.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], directives: [{ type: LocalizedMessagesDirective, selector: "\n [kendoDropDownListLocalizedMessages],\n [kendoDropDownTreeLocalizedMessages],\n [kendoComboBoxLocalizedMessages],\n [kendoMultiColumnComboBoxLocalizedMessages],\n [kendoAutoCompleteLocalizedMessages],\n [kendoMultiSelectLocalizedMessages],\n [kendoMultiSelectTreeLocalizedMessages]\n " }, { type: i11.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { type: i11.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i9.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type:
|
|
6488
|
+
`, isInline: true, components: [{ type: ListComponent, selector: "kendo-list", inputs: ["selected", "focused", "textField", "valueField", "height", "template", "groupTemplate", "fixedGroupTemplate", "show", "id", "optionPrefix", "multipleSelection", "virtual", "type", "checkboxes", "data", "size", "rounded"], outputs: ["onClick", "pageChange", "listResize"] }, { type: i9.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], directives: [{ type: LocalizedMessagesDirective, selector: "\n [kendoDropDownListLocalizedMessages],\n [kendoDropDownTreeLocalizedMessages],\n [kendoComboBoxLocalizedMessages],\n [kendoMultiColumnComboBoxLocalizedMessages],\n [kendoAutoCompleteLocalizedMessages],\n [kendoMultiSelectLocalizedMessages],\n [kendoMultiSelectTreeLocalizedMessages]\n " }, { type: i11.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { type: i11.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i9.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i12.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: FilterInputDirective, selector: "[filterInput]", inputs: ["filterInput"] }, { type: i12.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i12.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: SelectableDirective, selector: "[kendoDropDownsSelectable]", inputs: ["index", "checkboxes", "height", "multipleSelection"] }] });
|
|
6489
6489
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DropDownListComponent, decorators: [{
|
|
6490
6490
|
type: Component,
|
|
6491
6491
|
args: [{
|
|
@@ -10425,7 +10425,7 @@ class DropDownTreeComponent {
|
|
|
10425
10425
|
* @hidden
|
|
10426
10426
|
*/
|
|
10427
10427
|
get buttonClasses() {
|
|
10428
|
-
return this.loading ? 'k-i-loading k-input-loading-icon' : 'k-i-
|
|
10428
|
+
return this.loading ? 'k-i-loading k-input-loading-icon' : 'k-i-caret-alt-down';
|
|
10429
10429
|
}
|
|
10430
10430
|
/**
|
|
10431
10431
|
* @hidden
|
|
@@ -10822,7 +10822,7 @@ DropDownTreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
10822
10822
|
</div>
|
|
10823
10823
|
</ng-template>
|
|
10824
10824
|
<ng-container #container></ng-container>
|
|
10825
|
-
`, isInline: true, components: [{ type: i1$1.TreeViewComponent, selector: "kendo-treeview", inputs: ["filterInputPlaceholder", "animate", "nodeTemplate", "loadMoreButtonTemplate", "trackBy", "nodes", "textField", "hasChildren", "isChecked", "isDisabled", "isExpanded", "isSelected", "isVisible", "navigable", "children", "loadOnDemand", "filterable", "filter", "size"], outputs: ["childrenLoaded", "blur", "focus", "expand", "collapse", "nodeDragStart", "nodeDrag", "filterStateChange", "nodeDrop", "nodeDragEnd", "addItem", "removeItem", "checkedChange", "selectionChange", "filterChange", "nodeClick", "nodeDblClick"], exportAs: ["kendoTreeView"] }], directives: [{ type: LocalizedMessagesDirective, selector: "\n [kendoDropDownListLocalizedMessages],\n [kendoDropDownTreeLocalizedMessages],\n [kendoComboBoxLocalizedMessages],\n [kendoMultiColumnComboBoxLocalizedMessages],\n [kendoAutoCompleteLocalizedMessages],\n [kendoMultiSelectLocalizedMessages],\n [kendoMultiSelectTreeLocalizedMessages]\n " }, { type: i11.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { type: i11.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type:
|
|
10825
|
+
`, isInline: true, components: [{ type: i1$1.TreeViewComponent, selector: "kendo-treeview", inputs: ["filterInputPlaceholder", "expandDisabledNodes", "animate", "nodeTemplate", "loadMoreButtonTemplate", "trackBy", "nodes", "textField", "hasChildren", "isChecked", "isDisabled", "isExpanded", "isSelected", "isVisible", "navigable", "children", "loadOnDemand", "filterable", "filter", "size", "disableParentNodesOnly"], outputs: ["childrenLoaded", "blur", "focus", "expand", "collapse", "nodeDragStart", "nodeDrag", "filterStateChange", "nodeDrop", "nodeDragEnd", "addItem", "removeItem", "checkedChange", "selectionChange", "filterChange", "nodeClick", "nodeDblClick"], exportAs: ["kendoTreeView"] }], directives: [{ type: LocalizedMessagesDirective, selector: "\n [kendoDropDownListLocalizedMessages],\n [kendoDropDownTreeLocalizedMessages],\n [kendoComboBoxLocalizedMessages],\n [kendoMultiColumnComboBoxLocalizedMessages],\n [kendoAutoCompleteLocalizedMessages],\n [kendoMultiSelectLocalizedMessages],\n [kendoMultiSelectTreeLocalizedMessages]\n " }, { type: i11.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { type: i11.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i12.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: FilterInputDirective, selector: "[filterInput]", inputs: ["filterInput"] }, { type: i12.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i12.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i1$1.SelectDirective, selector: "[kendoTreeViewSelectable]", inputs: ["isSelected", "selectBy", "kendoTreeViewSelectable", "selectedKeys"], outputs: ["selectedKeysChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
10826
10826
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DropDownTreeComponent, decorators: [{
|
|
10827
10827
|
type: Component,
|
|
10828
10828
|
args: [{
|
|
@@ -11150,6 +11150,84 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
11150
11150
|
type: Input
|
|
11151
11151
|
}] } });
|
|
11152
11152
|
|
|
11153
|
+
/**
|
|
11154
|
+
* @hidden
|
|
11155
|
+
*/
|
|
11156
|
+
const nodeIndex$1 = (item) => (item || {}).key;
|
|
11157
|
+
/**
|
|
11158
|
+
* @hidden
|
|
11159
|
+
*/
|
|
11160
|
+
const buildTreeIndex = (parentIndex, itemIndex) => {
|
|
11161
|
+
return [parentIndex, itemIndex].filter(part => isPresent(part)).join('_');
|
|
11162
|
+
};
|
|
11163
|
+
/**
|
|
11164
|
+
* @hidden
|
|
11165
|
+
*/
|
|
11166
|
+
const buildTreeItem = (dataItem, valueField, currentLevelIndex) => {
|
|
11167
|
+
if (!isPresent(dataItem)) {
|
|
11168
|
+
return null;
|
|
11169
|
+
}
|
|
11170
|
+
return {
|
|
11171
|
+
dataItem,
|
|
11172
|
+
key: valueFrom({ dataItem, level: currentLevelIndex }, valueField) + '_' + currentLevelIndex
|
|
11173
|
+
};
|
|
11174
|
+
};
|
|
11175
|
+
/**
|
|
11176
|
+
* @hidden
|
|
11177
|
+
*/
|
|
11178
|
+
class MultiSelectTreeLookupService {
|
|
11179
|
+
constructor() {
|
|
11180
|
+
this.map = new Map();
|
|
11181
|
+
}
|
|
11182
|
+
reset() {
|
|
11183
|
+
this.map.clear();
|
|
11184
|
+
}
|
|
11185
|
+
registerChildren(index, children) {
|
|
11186
|
+
const item = this.item(index);
|
|
11187
|
+
if (!item) {
|
|
11188
|
+
return;
|
|
11189
|
+
}
|
|
11190
|
+
item.children = children;
|
|
11191
|
+
}
|
|
11192
|
+
item(index) {
|
|
11193
|
+
return this.map.get(index) || null;
|
|
11194
|
+
}
|
|
11195
|
+
registerItem(item, parent) {
|
|
11196
|
+
const currentLookup = {
|
|
11197
|
+
children: [],
|
|
11198
|
+
item,
|
|
11199
|
+
parent: this.item(nodeIndex$1(parent))
|
|
11200
|
+
};
|
|
11201
|
+
this.map.set(item.key, currentLookup);
|
|
11202
|
+
}
|
|
11203
|
+
itemLookup(index) {
|
|
11204
|
+
const item = this.item(index);
|
|
11205
|
+
if (!item) {
|
|
11206
|
+
return null;
|
|
11207
|
+
}
|
|
11208
|
+
return {
|
|
11209
|
+
children: this.mapChildren(item.children),
|
|
11210
|
+
item: item.item,
|
|
11211
|
+
parent: item.parent
|
|
11212
|
+
};
|
|
11213
|
+
}
|
|
11214
|
+
mapChildren(children = []) {
|
|
11215
|
+
return children.map(c => {
|
|
11216
|
+
const { item, parent, children } = this.item(c.key);
|
|
11217
|
+
return {
|
|
11218
|
+
children: this.mapChildren(children),
|
|
11219
|
+
item,
|
|
11220
|
+
parent
|
|
11221
|
+
};
|
|
11222
|
+
});
|
|
11223
|
+
}
|
|
11224
|
+
}
|
|
11225
|
+
MultiSelectTreeLookupService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MultiSelectTreeLookupService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11226
|
+
MultiSelectTreeLookupService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MultiSelectTreeLookupService });
|
|
11227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MultiSelectTreeLookupService, decorators: [{
|
|
11228
|
+
type: Injectable
|
|
11229
|
+
}] });
|
|
11230
|
+
|
|
11153
11231
|
/**
|
|
11154
11232
|
* @hidden
|
|
11155
11233
|
*
|
|
@@ -11161,50 +11239,52 @@ class BaseCheckDirective {
|
|
|
11161
11239
|
return;
|
|
11162
11240
|
}
|
|
11163
11241
|
const level = getHierarchicalItemLevel(item.index);
|
|
11164
|
-
const
|
|
11242
|
+
const key = this.getKey(item, level);
|
|
11243
|
+
const candidate = Object.assign(Object.assign({}, item), { level, key });
|
|
11165
11244
|
this.checkedItems.push(candidate);
|
|
11166
|
-
this.checkedKeys.add(
|
|
11245
|
+
this.checkedKeys.add(key);
|
|
11167
11246
|
}
|
|
11168
11247
|
removeItem(item) {
|
|
11169
11248
|
if (!this.isItemChecked(item)) {
|
|
11170
11249
|
return;
|
|
11171
11250
|
}
|
|
11172
11251
|
const level = getHierarchicalItemLevel(item.index);
|
|
11173
|
-
const
|
|
11252
|
+
const key = this.getKey(item, level);
|
|
11253
|
+
const candidate = Object.assign(Object.assign({}, item), { level, key });
|
|
11174
11254
|
this.checkedItems = this.checkedItems
|
|
11175
11255
|
.filter(item => valueFrom(item, this.valueField) !== valueFrom(candidate, this.valueField));
|
|
11176
|
-
this.checkedKeys.delete(
|
|
11256
|
+
this.checkedKeys.delete(key);
|
|
11177
11257
|
}
|
|
11178
11258
|
isItemChecked(item) {
|
|
11179
11259
|
const level = item.index.split('_').length - 1;
|
|
11180
11260
|
item.level = level;
|
|
11181
|
-
|
|
11261
|
+
const key = this.getKey(item, level);
|
|
11262
|
+
return this.checkedKeys.has(key);
|
|
11182
11263
|
}
|
|
11183
11264
|
updateItems() {
|
|
11184
11265
|
this.checkedItems = this.checkedItems || [];
|
|
11185
|
-
this.checkedKeys = new Set(this.checkedItems.map(item =>
|
|
11266
|
+
this.checkedKeys = new Set(this.checkedItems.map(item => item.key));
|
|
11186
11267
|
}
|
|
11187
11268
|
/**
|
|
11188
11269
|
* Adds the item's depth to the item's value to allow duplicate values on different levels.
|
|
11189
11270
|
*
|
|
11190
11271
|
* @param item - The checked key.
|
|
11191
|
-
* @returns { string } - A string key consisting of the item's `valueField` value and its depth.
|
|
11272
|
+
* @returns { string } - A string key consisting of the item's `valueField` value and its depth (depth is 0 if data is homogeneous).
|
|
11192
11273
|
*/
|
|
11193
|
-
getKey(item) {
|
|
11194
|
-
|
|
11195
|
-
return valueFrom(item, this.valueField) + '_' + item.level;
|
|
11196
|
-
}
|
|
11197
|
-
return valueFrom(item, this.valueField);
|
|
11274
|
+
getKey(item, level) {
|
|
11275
|
+
return valueFrom(item, this.valueField) + '_' + (this.isHeterogeneous ? level : 0);
|
|
11198
11276
|
}
|
|
11199
11277
|
}
|
|
11200
11278
|
BaseCheckDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: BaseCheckDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
11201
|
-
BaseCheckDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: BaseCheckDirective, inputs: { valueField: "valueField", checkedItems: "checkedItems" }, ngImport: i0 });
|
|
11279
|
+
BaseCheckDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: BaseCheckDirective, inputs: { valueField: "valueField", checkedItems: "checkedItems", isHeterogeneous: "isHeterogeneous" }, ngImport: i0 });
|
|
11202
11280
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: BaseCheckDirective, decorators: [{
|
|
11203
11281
|
type: Directive
|
|
11204
11282
|
}], propDecorators: { valueField: [{
|
|
11205
11283
|
type: Input
|
|
11206
11284
|
}], checkedItems: [{
|
|
11207
11285
|
type: Input
|
|
11286
|
+
}], isHeterogeneous: [{
|
|
11287
|
+
type: Input
|
|
11208
11288
|
}] } });
|
|
11209
11289
|
|
|
11210
11290
|
/**
|
|
@@ -11511,7 +11591,7 @@ const DEFAULT_FILL_MODE = 'solid';
|
|
|
11511
11591
|
* Represents the [Kendo UI MultiSelectTree component for Angular]({% slug overview_multiselecttree %}).
|
|
11512
11592
|
*/
|
|
11513
11593
|
class MultiSelectTreeComponent {
|
|
11514
|
-
constructor(wrapper, popupService, renderer, navigationService, _zone, localization, cdr, touchEnabled) {
|
|
11594
|
+
constructor(wrapper, popupService, renderer, navigationService, _zone, localization, cdr, lookup, touchEnabled) {
|
|
11515
11595
|
this.wrapper = wrapper;
|
|
11516
11596
|
this.popupService = popupService;
|
|
11517
11597
|
this.renderer = renderer;
|
|
@@ -11519,6 +11599,7 @@ class MultiSelectTreeComponent {
|
|
|
11519
11599
|
this._zone = _zone;
|
|
11520
11600
|
this.localization = localization;
|
|
11521
11601
|
this.cdr = cdr;
|
|
11602
|
+
this.lookup = lookup;
|
|
11522
11603
|
this.touchEnabled = touchEnabled;
|
|
11523
11604
|
this.hostClasses = true;
|
|
11524
11605
|
this.role = 'combobox';
|
|
@@ -11665,10 +11746,6 @@ class MultiSelectTreeComponent {
|
|
|
11665
11746
|
* @hidden
|
|
11666
11747
|
*/
|
|
11667
11748
|
this.checkedItems = [];
|
|
11668
|
-
/**
|
|
11669
|
-
* @hidden
|
|
11670
|
-
*/
|
|
11671
|
-
this.checkBy = (item) => item;
|
|
11672
11749
|
/**
|
|
11673
11750
|
* @hidden
|
|
11674
11751
|
*/
|
|
@@ -11907,7 +11984,8 @@ class MultiSelectTreeComponent {
|
|
|
11907
11984
|
return {
|
|
11908
11985
|
dataItem: item,
|
|
11909
11986
|
index: null,
|
|
11910
|
-
level: this.valueDepth[index] || 0
|
|
11987
|
+
level: this.valueDepth[index] || 0,
|
|
11988
|
+
key: valueFrom({ dataItem: item }, this.valueField) + '_' + (this.isHeterogeneous ? this.valueDepth[index] : 0)
|
|
11911
11989
|
};
|
|
11912
11990
|
});
|
|
11913
11991
|
this.setState();
|
|
@@ -11916,7 +11994,8 @@ class MultiSelectTreeComponent {
|
|
|
11916
11994
|
return this._dataItems || this.value.map((value, index) => ({
|
|
11917
11995
|
dataItem: value,
|
|
11918
11996
|
index: null,
|
|
11919
|
-
level: this.valueDepth[index] || 0
|
|
11997
|
+
level: this.valueDepth[index] || 0,
|
|
11998
|
+
key: valueFrom({ dataItem: value }, this.valueField) + '_' + (this.isHeterogeneous ? this.valueDepth[index] : 0)
|
|
11920
11999
|
}));
|
|
11921
12000
|
}
|
|
11922
12001
|
/**
|
|
@@ -12073,6 +12152,7 @@ class MultiSelectTreeComponent {
|
|
|
12073
12152
|
*/
|
|
12074
12153
|
ngOnChanges(changes) {
|
|
12075
12154
|
if (anyChanged(['textField', 'valueField', 'valuePrimitive'], changes, false)) {
|
|
12155
|
+
this.isHeterogeneous = this.valueField && isArray(this.valueField);
|
|
12076
12156
|
this.setState();
|
|
12077
12157
|
}
|
|
12078
12158
|
if (anyChanged(['valueDepth', 'value', 'dataItems'], changes, false)) {
|
|
@@ -12086,6 +12166,10 @@ class MultiSelectTreeComponent {
|
|
|
12086
12166
|
this.dataItems = this.dataItems.map((item, index) => (Object.assign(Object.assign({}, item), { level: this.valueDepth[index] || 0 })));
|
|
12087
12167
|
}
|
|
12088
12168
|
}
|
|
12169
|
+
if (anyChanged(['data', 'children', 'hasChildren', 'loadOnDemand', 'valueField'], changes, true) && !this.loadOnDemand) {
|
|
12170
|
+
this.lookup.reset();
|
|
12171
|
+
this.registerLookupItems(this.data);
|
|
12172
|
+
}
|
|
12089
12173
|
}
|
|
12090
12174
|
/**
|
|
12091
12175
|
* @hidden
|
|
@@ -12093,6 +12177,9 @@ class MultiSelectTreeComponent {
|
|
|
12093
12177
|
ngAfterContentChecked() {
|
|
12094
12178
|
this.verifySettings();
|
|
12095
12179
|
}
|
|
12180
|
+
ngAfterContentInit() {
|
|
12181
|
+
this.registerLookupItems(this.data);
|
|
12182
|
+
}
|
|
12096
12183
|
/**
|
|
12097
12184
|
* @hidden
|
|
12098
12185
|
*
|
|
@@ -12275,11 +12362,26 @@ class MultiSelectTreeComponent {
|
|
|
12275
12362
|
}
|
|
12276
12363
|
else {
|
|
12277
12364
|
// Remove single tag
|
|
12278
|
-
|
|
12279
|
-
|
|
12365
|
+
const dataItem = this.dataItems[index];
|
|
12366
|
+
const itemKey = dataItem.key;
|
|
12367
|
+
const lookup = this.lookup.itemLookup(itemKey);
|
|
12368
|
+
const pendingCheck = [lookup.item];
|
|
12369
|
+
if (this.checkableSettings.checkChildren) {
|
|
12370
|
+
fetchDescendentNodes(lookup)
|
|
12371
|
+
.forEach(lookup => pendingCheck.push(lookup.item));
|
|
12372
|
+
pendingCheck.push(...this.removeParents(lookup.parent));
|
|
12373
|
+
}
|
|
12374
|
+
const keysToRemove = pendingCheck.map(item => item.key);
|
|
12375
|
+
const valueDepthIndices = [];
|
|
12376
|
+
this.dataItems = this.dataItems.filter((_item, i) => {
|
|
12377
|
+
// We need to know the index position of the data item to be able to update the valueDepth array accordignly
|
|
12378
|
+
// as each data item's position is corresponding to the same position in valueDepth
|
|
12379
|
+
valueDepthIndices.push(i);
|
|
12380
|
+
return !keysToRemove.includes(_item.key) || this.disabledIndices.has(i);
|
|
12381
|
+
});
|
|
12382
|
+
this.valueDepth = this.valueDepth.filter((_item, i) => valueDepthIndices.includes(i) || this.disabledIndices.has(i));
|
|
12280
12383
|
}
|
|
12281
12384
|
this.updateValue(this.dataItems);
|
|
12282
|
-
// focus the wrapper if the component is not focused - the floating label reacts to focus/blur
|
|
12283
12385
|
if (!this.isFocused) {
|
|
12284
12386
|
this.focus();
|
|
12285
12387
|
}
|
|
@@ -12655,14 +12757,53 @@ class MultiSelectTreeComponent {
|
|
|
12655
12757
|
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
12656
12758
|
}
|
|
12657
12759
|
}
|
|
12760
|
+
removeParents(parent) {
|
|
12761
|
+
let currentParent = parent;
|
|
12762
|
+
const nodes = [];
|
|
12763
|
+
while (currentParent) {
|
|
12764
|
+
nodes.push(currentParent.item);
|
|
12765
|
+
currentParent = currentParent.parent;
|
|
12766
|
+
}
|
|
12767
|
+
return nodes;
|
|
12768
|
+
}
|
|
12769
|
+
/**
|
|
12770
|
+
* Creates an internal map of the available tree items to be used as a reference
|
|
12771
|
+
* to retrieve the item's children/parent and determine the checked sate
|
|
12772
|
+
*/
|
|
12773
|
+
registerLookupItems(data, parentItem = null, levelIndex = 0) {
|
|
12774
|
+
if (!isPresent(data) || data.length === 0) {
|
|
12775
|
+
return;
|
|
12776
|
+
}
|
|
12777
|
+
const parentIndex = nodeIndex$1(parentItem);
|
|
12778
|
+
const treeItems = data.map((node) => buildTreeItem(node, this.valueField, levelIndex));
|
|
12779
|
+
if (isPresent(parentItem)) {
|
|
12780
|
+
this.lookup.registerChildren(parentIndex, treeItems);
|
|
12781
|
+
}
|
|
12782
|
+
treeItems.forEach(item => {
|
|
12783
|
+
this.lookup.registerItem(item, parentItem);
|
|
12784
|
+
if (!this.loadOnDemand) {
|
|
12785
|
+
this.registerChildLookupItems(item, levelIndex);
|
|
12786
|
+
}
|
|
12787
|
+
});
|
|
12788
|
+
}
|
|
12789
|
+
registerChildLookupItems(item, levelIndex) {
|
|
12790
|
+
if (this.hasChildren(item.dataItem)) {
|
|
12791
|
+
this.children(item.dataItem)
|
|
12792
|
+
.subscribe(children => {
|
|
12793
|
+
const index = this.isHeterogeneous ? levelIndex + 1 : 0;
|
|
12794
|
+
this.registerLookupItems(children, item, index);
|
|
12795
|
+
});
|
|
12796
|
+
}
|
|
12797
|
+
}
|
|
12658
12798
|
}
|
|
12659
|
-
MultiSelectTreeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MultiSelectTreeComponent, deps: [{ token: i0.ElementRef }, { token: i2.PopupService }, { token: i0.Renderer2 }, { token: NavigationService }, { token: i0.NgZone }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: TOUCH_ENABLED, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
12799
|
+
MultiSelectTreeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MultiSelectTreeComponent, deps: [{ token: i0.ElementRef }, { token: i2.PopupService }, { token: i0.Renderer2 }, { token: NavigationService }, { token: i0.NgZone }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: MultiSelectTreeLookupService }, { token: TOUCH_ENABLED, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
12660
12800
|
MultiSelectTreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: MultiSelectTreeComponent, selector: "kendo-multiselecttree", inputs: { tabindex: "tabindex", size: "size", rounded: "rounded", fillMode: "fillMode", popupSettings: "popupSettings", checkableSettings: "checkableSettings", data: "data", value: "value", dataItems: "dataItems", textField: "textField", valueField: "valueField", valueDepth: "valueDepth", loading: "loading", placeholder: "placeholder", listHeight: "listHeight", disabled: "disabled", readonly: "readonly", valuePrimitive: "valuePrimitive", loadOnDemand: "loadOnDemand", focusableId: "focusableId", clearButton: "clearButton", filterable: "filterable", checkAll: "checkAll", hasChildren: "hasChildren", fetchChildren: "fetchChildren", isNodeExpanded: "isNodeExpanded", isNodeVisible: "isNodeVisible", itemDisabled: "itemDisabled", tagMapper: "tagMapper" }, outputs: { onFocus: "focus", onBlur: "blur", open: "open", opened: "opened", close: "close", closed: "closed", nodeExpand: "nodeExpand", nodeCollapse: "nodeCollapse", valueChange: "valueChange", removeTag: "removeTag", filterChange: "filterChange" }, host: { listeners: { "click": "handleClick()", "keydown": "handleKeydown($event)" }, properties: { "class.k-dropdowntree": "this.hostClasses", "class.k-input": "this.hostClasses", "class.k-disabled": "this.isDisabled", "attr.aria-disabled": "this.isDisabled", "class.k-loading": "this.isLoading", "attr.id": "this.id", "attr.dir": "this.direction", "attr.tabindex": "this.hostTabIndex", "attr.role": "this.role", "attr.aria-expanded": "this.isAriaExpanded", "attr.aria-haspopup": "this.ariaHasPopup", "attr.readonly": "this.isReadonly", "attr.aria-readonly": "this.isReadonly", "attr.aria-describedby": "this.ariaDescribedBy", "attr.aria-activedescendant": "this.ariaActiveDescendant" } }, providers: [
|
|
12661
12801
|
LocalizationService,
|
|
12662
12802
|
NavigationService,
|
|
12663
12803
|
DataService,
|
|
12664
12804
|
DisabledItemsService,
|
|
12665
12805
|
SelectionService,
|
|
12806
|
+
MultiSelectTreeLookupService,
|
|
12666
12807
|
{
|
|
12667
12808
|
provide: L10N_PREFIX,
|
|
12668
12809
|
useValue: 'kendo.multiselecttree'
|
|
@@ -12853,7 +12994,7 @@ MultiSelectTreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0
|
|
|
12853
12994
|
</div>
|
|
12854
12995
|
</ng-template>
|
|
12855
12996
|
<ng-container #container></ng-container>
|
|
12856
|
-
`, isInline: true, components: [{ type: TagListComponent, selector: "kendo-taglist", inputs: ["tags", "textField", "valueField", "valueDepth", "focused", "template", "groupTemplate", "disabled", "tagPrefix", "id", "size", "rounded", "fillMode", "disabledIndices"], outputs: ["removeTag"] }, { type: i1$1.TreeViewComponent, selector: "kendo-treeview", inputs: ["filterInputPlaceholder", "animate", "nodeTemplate", "loadMoreButtonTemplate", "trackBy", "nodes", "textField", "hasChildren", "isChecked", "isDisabled", "isExpanded", "isSelected", "isVisible", "navigable", "children", "loadOnDemand", "filterable", "filter", "size"], outputs: ["childrenLoaded", "blur", "focus", "expand", "collapse", "nodeDragStart", "nodeDrag", "filterStateChange", "nodeDrop", "nodeDragEnd", "addItem", "removeItem", "checkedChange", "selectionChange", "filterChange", "nodeClick", "nodeDblClick"], exportAs: ["kendoTreeView"] }], directives: [{ type: LocalizedMessagesDirective, selector: "\n [kendoDropDownListLocalizedMessages],\n [kendoDropDownTreeLocalizedMessages],\n [kendoComboBoxLocalizedMessages],\n [kendoMultiColumnComboBoxLocalizedMessages],\n [kendoAutoCompleteLocalizedMessages],\n [kendoMultiSelectLocalizedMessages],\n [kendoMultiSelectTreeLocalizedMessages]\n " }, { type: i11.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i11.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type:
|
|
12997
|
+
`, isInline: true, components: [{ type: TagListComponent, selector: "kendo-taglist", inputs: ["tags", "textField", "valueField", "valueDepth", "focused", "template", "groupTemplate", "disabled", "tagPrefix", "id", "size", "rounded", "fillMode", "disabledIndices"], outputs: ["removeTag"] }, { type: i1$1.TreeViewComponent, selector: "kendo-treeview", inputs: ["filterInputPlaceholder", "expandDisabledNodes", "animate", "nodeTemplate", "loadMoreButtonTemplate", "trackBy", "nodes", "textField", "hasChildren", "isChecked", "isDisabled", "isExpanded", "isSelected", "isVisible", "navigable", "children", "loadOnDemand", "filterable", "filter", "size", "disableParentNodesOnly"], outputs: ["childrenLoaded", "blur", "focus", "expand", "collapse", "nodeDragStart", "nodeDrag", "filterStateChange", "nodeDrop", "nodeDragEnd", "addItem", "removeItem", "checkedChange", "selectionChange", "filterChange", "nodeClick", "nodeDblClick"], exportAs: ["kendoTreeView"] }], directives: [{ type: LocalizedMessagesDirective, selector: "\n [kendoDropDownListLocalizedMessages],\n [kendoDropDownTreeLocalizedMessages],\n [kendoComboBoxLocalizedMessages],\n [kendoMultiColumnComboBoxLocalizedMessages],\n [kendoAutoCompleteLocalizedMessages],\n [kendoMultiSelectLocalizedMessages],\n [kendoMultiSelectTreeLocalizedMessages]\n " }, { type: i11.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i11.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i12.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: FilterInputDirective, selector: "[filterInput]", inputs: ["filterInput"] }, { type: i12.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i12.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { type: CheckAllDirective, selector: "[checkAll]", inputs: ["lastAction", "treeview", "checkedItems", "valueField", "checkAll"], outputs: ["checkedItemsChange"] }, { type: CheckDirective, selector: "[kendoMultiSelectTreeCheckable]", inputs: ["checkable", "valueField", "checkedItems"], outputs: ["checkedItemsChange"] }] });
|
|
12857
12998
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MultiSelectTreeComponent, decorators: [{
|
|
12858
12999
|
type: Component,
|
|
12859
13000
|
args: [{
|
|
@@ -12864,6 +13005,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
12864
13005
|
DataService,
|
|
12865
13006
|
DisabledItemsService,
|
|
12866
13007
|
SelectionService,
|
|
13008
|
+
MultiSelectTreeLookupService,
|
|
12867
13009
|
{
|
|
12868
13010
|
provide: L10N_PREFIX,
|
|
12869
13011
|
useValue: 'kendo.multiselecttree'
|
|
@@ -13058,7 +13200,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
13058
13200
|
<ng-container #container></ng-container>
|
|
13059
13201
|
`
|
|
13060
13202
|
}]
|
|
13061
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i2.PopupService }, { type: i0.Renderer2 }, { type: NavigationService }, { type: i0.NgZone }, { type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
|
|
13203
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i2.PopupService }, { type: i0.Renderer2 }, { type: NavigationService }, { type: i0.NgZone }, { type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: MultiSelectTreeLookupService }, { type: undefined, decorators: [{
|
|
13062
13204
|
type: Optional
|
|
13063
13205
|
}, {
|
|
13064
13206
|
type: Inject,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-dropdowns",
|
|
3
|
-
"version": "7.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "7.0.4-dev.202208041601",
|
|
4
|
+
"description": "A wide variety of native Angular dropdown components including AutoComplete, ComboBox, DropDownList, DropDownTree, MultiColumnComboBox, MultiSelect, and MultiSelectTree ",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
7
7
|
"homepage": "https://www.telerik.com/kendo-angular-ui/components/",
|