@progress/kendo-angular-dropdowns 7.0.0-next.202204011414 → 7.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/autocomplete/autocomplete.component.d.ts +13 -13
- package/bundles/kendo-angular-dropdowns.umd.js +1 -1
- package/comboboxes/combobox.component.d.ts +13 -13
- package/common/models/fillmode.d.ts +1 -7
- package/common/models/remove-tag-event.d.ts +4 -1
- package/common/models/rounded.d.ts +1 -8
- package/common/models/size.d.ts +1 -7
- package/dropdownlist/dropdownlist.component.d.ts +13 -13
- package/dropdowntrees/data-binding/dropdowntree/flat-binding.directive.d.ts +8 -0
- package/dropdowntrees/data-binding/dropdowntree/hierarchy-binding.directive.d.ts +8 -0
- package/dropdowntrees/data-binding/multiselecttree/flat-binding.directive.d.ts +8 -0
- package/dropdowntrees/data-binding/multiselecttree/hierarchy-binding.directive.d.ts +8 -0
- package/dropdowntrees/dropdowntree.component.d.ts +13 -13
- package/dropdowntrees/multiselecttree.component.d.ts +13 -13
- package/esm2015/autocomplete/autocomplete.component.js +33 -27
- package/esm2015/comboboxes/combobox.component.js +32 -26
- package/esm2015/dropdownlist/dropdownlist.component.js +31 -25
- package/esm2015/dropdowntrees/checked-state/check-all.directive.js +12 -5
- package/esm2015/dropdowntrees/data-binding/dropdowntree/flat-binding.directive.js +12 -0
- package/esm2015/dropdowntrees/data-binding/dropdowntree/hierarchy-binding.directive.js +34 -0
- package/esm2015/dropdowntrees/data-binding/multiselecttree/flat-binding.directive.js +12 -0
- package/esm2015/dropdowntrees/data-binding/multiselecttree/hierarchy-binding.directive.js +12 -0
- package/esm2015/dropdowntrees/dropdowntree.component.js +37 -28
- package/esm2015/dropdowntrees/multiselecttree.component.js +48 -33
- package/esm2015/main.js +4 -0
- package/esm2015/multiselect/multiselect.component.js +33 -27
- package/esm2015/package-metadata.js +1 -1
- package/fesm2015/kendo-angular-dropdowns.js +296 -172
- package/main.d.ts +4 -0
- package/multiselect/multiselect.component.d.ts +14 -14
- package/package.json +11 -13
- package/schematics/ngAdd/index.js +2 -2
|
@@ -84,14 +84,20 @@ export class CheckAllDirective extends BaseCheckDirective {
|
|
|
84
84
|
.forEach(lookup => pendingCheck.push(lookup.item));
|
|
85
85
|
pendingCheck.forEach(item => {
|
|
86
86
|
if (this.currentIndeterminateState) {
|
|
87
|
-
this.lastAction === 'check'
|
|
88
|
-
this.addItem(item)
|
|
87
|
+
if (this.lastAction === 'check') {
|
|
88
|
+
this.addItem(item);
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
89
91
|
this.removeItem(item);
|
|
92
|
+
}
|
|
90
93
|
return;
|
|
91
94
|
}
|
|
92
|
-
this.currentCheckedState
|
|
93
|
-
this.addItem(item)
|
|
95
|
+
if (this.currentCheckedState) {
|
|
96
|
+
this.addItem(item);
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
94
99
|
this.removeItem(item);
|
|
100
|
+
}
|
|
95
101
|
});
|
|
96
102
|
}
|
|
97
103
|
allChecked(lookup) {
|
|
@@ -126,7 +132,8 @@ CheckAllDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", vers
|
|
|
126
132
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CheckAllDirective, decorators: [{
|
|
127
133
|
type: Directive,
|
|
128
134
|
args: [{
|
|
129
|
-
|
|
135
|
+
// eslint-disable-next-line
|
|
136
|
+
selector: '[checkAll]'
|
|
130
137
|
}]
|
|
131
138
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }]; }, propDecorators: { lastAction: [{
|
|
132
139
|
type: Input
|
|
@@ -22,6 +22,18 @@ export class DropDownTreeFlatBindingDirective extends FlatDataBindingDirective {
|
|
|
22
22
|
this.nodes = nodes;
|
|
23
23
|
}
|
|
24
24
|
;
|
|
25
|
+
/**
|
|
26
|
+
* @hidden
|
|
27
|
+
*/
|
|
28
|
+
set nodes(values) {
|
|
29
|
+
super.nodes = values;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @hidden
|
|
33
|
+
*/
|
|
34
|
+
set filter(term) {
|
|
35
|
+
super.filter = term;
|
|
36
|
+
}
|
|
25
37
|
}
|
|
26
38
|
DropDownTreeFlatBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DropDownTreeFlatBindingDirective, deps: [{ token: i1.DataBoundComponent }], target: i0.ɵɵFactoryTarget.Directive });
|
|
27
39
|
DropDownTreeFlatBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: DropDownTreeFlatBindingDirective, selector: "[kendoDropDownTreeFlatBinding]", inputs: { data: ["kendoDropDownTreeFlatBinding", "data"], idField: ["valueField", "idField"] }, usesInheritance: true, ngImport: i0 });
|
|
@@ -4,8 +4,30 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { Directive, Input } from '@angular/core';
|
|
6
6
|
import { HierarchyBindingDirective } from '@progress/kendo-angular-treeview';
|
|
7
|
+
import { getter } from '@progress/kendo-common';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
import * as i1 from "@progress/kendo-angular-treeview";
|
|
10
|
+
const INDEX_SEPARATOR = '_';
|
|
11
|
+
const nodeIndex = (index = '', parentIndex = '') => {
|
|
12
|
+
return `${parentIndex}${parentIndex ? INDEX_SEPARATOR : ''}${index}`;
|
|
13
|
+
};
|
|
14
|
+
const isArrayWithAtLeastOneItem = v => v && Array.isArray(v) && v.length !== 0;
|
|
15
|
+
const mapToWrappers = (currentLevelNodes, childrenField, parent = null, parentIndex = '') => {
|
|
16
|
+
if (!isArrayWithAtLeastOneItem(currentLevelNodes)) {
|
|
17
|
+
return [];
|
|
18
|
+
}
|
|
19
|
+
return currentLevelNodes.map((node, idx) => {
|
|
20
|
+
const index = nodeIndex(idx.toString(), parentIndex);
|
|
21
|
+
const wrapper = {
|
|
22
|
+
dataItem: node,
|
|
23
|
+
index,
|
|
24
|
+
parent,
|
|
25
|
+
visible: true
|
|
26
|
+
};
|
|
27
|
+
wrapper.children = mapToWrappers(getter(childrenField)(node), childrenField, wrapper, index);
|
|
28
|
+
return wrapper;
|
|
29
|
+
});
|
|
30
|
+
};
|
|
9
31
|
/**
|
|
10
32
|
* A directive which encapsulates the retrieval of the child nodes when hierarchical data is provided.
|
|
11
33
|
*/
|
|
@@ -21,6 +43,18 @@ export class DropDownTreeHierarchyBindingDirective extends HierarchyBindingDirec
|
|
|
21
43
|
this.dropDownTree.nodes = nodes;
|
|
22
44
|
this.nodes = nodes;
|
|
23
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* @hidden
|
|
48
|
+
*/
|
|
49
|
+
set nodes(values) {
|
|
50
|
+
super.nodes = values;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* @hidden
|
|
54
|
+
*/
|
|
55
|
+
set filter(term) {
|
|
56
|
+
super.filter = term;
|
|
57
|
+
}
|
|
24
58
|
}
|
|
25
59
|
DropDownTreeHierarchyBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DropDownTreeHierarchyBindingDirective, deps: [{ token: i1.DataBoundComponent }], target: i0.ɵɵFactoryTarget.Directive });
|
|
26
60
|
DropDownTreeHierarchyBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: DropDownTreeHierarchyBindingDirective, selector: "[kendoDropDownTreeHierarchyBinding]", inputs: { data: ["kendoDropDownTreeHierarchyBinding", "data"] }, usesInheritance: true, ngImport: i0 });
|
|
@@ -21,6 +21,18 @@ export class MultiSelectTreeFlatBindingDirective extends FlatDataBindingDirectiv
|
|
|
21
21
|
this.multiSelectTree.nodes = nodes;
|
|
22
22
|
this.nodes = nodes;
|
|
23
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* @hidden
|
|
26
|
+
*/
|
|
27
|
+
set nodes(values) {
|
|
28
|
+
super.nodes = values;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* @hidden
|
|
32
|
+
*/
|
|
33
|
+
set filter(term) {
|
|
34
|
+
super.filter = term;
|
|
35
|
+
}
|
|
24
36
|
}
|
|
25
37
|
MultiSelectTreeFlatBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MultiSelectTreeFlatBindingDirective, deps: [{ token: i1.DataBoundComponent }], target: i0.ɵɵFactoryTarget.Directive });
|
|
26
38
|
MultiSelectTreeFlatBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: MultiSelectTreeFlatBindingDirective, selector: "[kendoMultiSelectTreeFlatBinding]", inputs: { data: ["kendoMultiSelectTreeFlatBinding", "data"], idField: ["valueField", "idField"] }, usesInheritance: true, ngImport: i0 });
|
|
@@ -21,6 +21,18 @@ export class MultiSelectTreeHierarchyBindingDirective extends HierarchyBindingDi
|
|
|
21
21
|
this.multiSelectTree.nodes = nodes;
|
|
22
22
|
this.nodes = nodes;
|
|
23
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* @hidden
|
|
26
|
+
*/
|
|
27
|
+
set nodes(values) {
|
|
28
|
+
super.nodes = values;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* @hidden
|
|
32
|
+
*/
|
|
33
|
+
set filter(term) {
|
|
34
|
+
super.filter = term;
|
|
35
|
+
}
|
|
24
36
|
}
|
|
25
37
|
MultiSelectTreeHierarchyBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MultiSelectTreeHierarchyBindingDirective, deps: [{ token: i1.DataBoundComponent }], target: i0.ɵɵFactoryTarget.Directive });
|
|
26
38
|
MultiSelectTreeHierarchyBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: MultiSelectTreeHierarchyBindingDirective, selector: "[kendoMultiSelectTreeHierarchyBinding]", inputs: { data: ["kendoMultiSelectTreeHierarchyBinding", "data"] }, usesInheritance: true, ngImport: i0 });
|
|
@@ -39,6 +39,9 @@ const hasChildren = () => false;
|
|
|
39
39
|
const fetchChildren = () => of([]);
|
|
40
40
|
const itemDisabled = () => false;
|
|
41
41
|
const isNodeVisible = () => true;
|
|
42
|
+
const DEFAULT_SIZE = 'medium';
|
|
43
|
+
const DEFAULT_ROUNDED = 'medium';
|
|
44
|
+
const DEFAULT_FILL_MODE = 'solid';
|
|
42
45
|
/**
|
|
43
46
|
* Represents the [Kendo UI DropDownTree component for Angular]({% slug overview_ddt %}).
|
|
44
47
|
*/
|
|
@@ -317,18 +320,19 @@ export class DropDownTreeComponent {
|
|
|
317
320
|
* Sets the size of the component.
|
|
318
321
|
*
|
|
319
322
|
* The possible values are:
|
|
320
|
-
* * `
|
|
321
|
-
* * `
|
|
322
|
-
* * `
|
|
323
|
-
* * `
|
|
323
|
+
* * `small`
|
|
324
|
+
* * `medium` (default)
|
|
325
|
+
* * `large`
|
|
326
|
+
* * `none`
|
|
324
327
|
*
|
|
325
328
|
*/
|
|
326
329
|
set size(size) {
|
|
330
|
+
const newSize = size ? size : DEFAULT_SIZE;
|
|
327
331
|
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('picker', this.size));
|
|
328
|
-
if (size) {
|
|
329
|
-
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('picker',
|
|
332
|
+
if (size !== 'none') {
|
|
333
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('picker', newSize));
|
|
330
334
|
}
|
|
331
|
-
this._size =
|
|
335
|
+
this._size = newSize;
|
|
332
336
|
}
|
|
333
337
|
get size() {
|
|
334
338
|
return this._size;
|
|
@@ -337,19 +341,20 @@ export class DropDownTreeComponent {
|
|
|
337
341
|
* Sets the border radius of the component.
|
|
338
342
|
*
|
|
339
343
|
* The possible values are:
|
|
340
|
-
* * `
|
|
341
|
-
* * `
|
|
342
|
-
* * `
|
|
343
|
-
* * `
|
|
344
|
-
* * `
|
|
344
|
+
* * `small`
|
|
345
|
+
* * `medium` (default)
|
|
346
|
+
* * `large`
|
|
347
|
+
* * `full`
|
|
348
|
+
* * `none`
|
|
345
349
|
*
|
|
346
350
|
*/
|
|
347
351
|
set rounded(rounded) {
|
|
352
|
+
const newRounded = rounded ? rounded : DEFAULT_ROUNDED;
|
|
348
353
|
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
349
|
-
if (rounded) {
|
|
350
|
-
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(
|
|
354
|
+
if (rounded !== 'none') {
|
|
355
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(newRounded));
|
|
351
356
|
}
|
|
352
|
-
this._rounded =
|
|
357
|
+
this._rounded = newRounded;
|
|
353
358
|
}
|
|
354
359
|
get rounded() {
|
|
355
360
|
return this._rounded;
|
|
@@ -358,18 +363,19 @@ export class DropDownTreeComponent {
|
|
|
358
363
|
* Sets the fillMode of the component.
|
|
359
364
|
*
|
|
360
365
|
* The possible values are:
|
|
361
|
-
* * `
|
|
362
|
-
* * `
|
|
363
|
-
* * `
|
|
364
|
-
* * `
|
|
366
|
+
* * `flat`
|
|
367
|
+
* * `solid` (default)
|
|
368
|
+
* * `outline`
|
|
369
|
+
* * `none`
|
|
365
370
|
*
|
|
366
371
|
*/
|
|
367
372
|
set fillMode(fillMode) {
|
|
373
|
+
const newFillMode = fillMode ? fillMode : DEFAULT_FILL_MODE;
|
|
368
374
|
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('picker', this.fillMode));
|
|
369
|
-
if (fillMode) {
|
|
370
|
-
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('picker',
|
|
375
|
+
if (fillMode !== 'none') {
|
|
376
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('picker', newFillMode));
|
|
371
377
|
}
|
|
372
|
-
this._fillMode =
|
|
378
|
+
this._fillMode = newFillMode;
|
|
373
379
|
}
|
|
374
380
|
get fillMode() {
|
|
375
381
|
return this._fillMode;
|
|
@@ -520,9 +526,12 @@ export class DropDownTreeComponent {
|
|
|
520
526
|
}
|
|
521
527
|
const togglePrevented = this.triggerPopupEvents(open);
|
|
522
528
|
if (!togglePrevented) {
|
|
523
|
-
open
|
|
524
|
-
this.createPopup()
|
|
529
|
+
if (open) {
|
|
530
|
+
this.createPopup();
|
|
531
|
+
}
|
|
532
|
+
else {
|
|
525
533
|
this.destroyPopup();
|
|
534
|
+
}
|
|
526
535
|
}
|
|
527
536
|
}
|
|
528
537
|
/**
|
|
@@ -723,7 +732,7 @@ export class DropDownTreeComponent {
|
|
|
723
732
|
* @hidden
|
|
724
733
|
*/
|
|
725
734
|
get buttonClasses() {
|
|
726
|
-
return this.loading ? 'k-i-loading' : 'k-i-arrow-s';
|
|
735
|
+
return this.loading ? 'k-i-loading k-input-loading-icon' : 'k-i-arrow-s';
|
|
727
736
|
}
|
|
728
737
|
/**
|
|
729
738
|
* @hidden
|
|
@@ -945,13 +954,13 @@ export class DropDownTreeComponent {
|
|
|
945
954
|
this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-describedby', newValue);
|
|
946
955
|
}
|
|
947
956
|
setComponentClasses() {
|
|
948
|
-
if (this.size) {
|
|
957
|
+
if (this.size !== 'none') {
|
|
949
958
|
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('picker', this.size));
|
|
950
959
|
}
|
|
951
|
-
if (this.rounded) {
|
|
960
|
+
if (this.rounded !== 'none') {
|
|
952
961
|
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
953
962
|
}
|
|
954
|
-
if (this.fillMode) {
|
|
963
|
+
if (this.fillMode !== 'none') {
|
|
955
964
|
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('picker', this.fillMode));
|
|
956
965
|
}
|
|
957
966
|
}
|
|
@@ -45,6 +45,9 @@ const hasChildren = () => false;
|
|
|
45
45
|
const fetchChildren = () => of([]);
|
|
46
46
|
const itemDisabled = () => false;
|
|
47
47
|
const isNodeVisible = () => true;
|
|
48
|
+
const DEFAULT_SIZE = 'medium';
|
|
49
|
+
const DEFAULT_ROUNDED = 'medium';
|
|
50
|
+
const DEFAULT_FILL_MODE = 'solid';
|
|
48
51
|
/**
|
|
49
52
|
* Represents the [Kendo UI MultiSelectTree component for Angular]({% slug overview_multiselecttree %}).
|
|
50
53
|
*/
|
|
@@ -319,18 +322,19 @@ export class MultiSelectTreeComponent {
|
|
|
319
322
|
* Sets the size of the component.
|
|
320
323
|
*
|
|
321
324
|
* The possible values are:
|
|
322
|
-
* * `
|
|
323
|
-
* * `
|
|
324
|
-
* * `
|
|
325
|
-
* * `
|
|
325
|
+
* * `small`
|
|
326
|
+
* * `medium` (default)
|
|
327
|
+
* * `large`
|
|
328
|
+
* * `none`
|
|
326
329
|
*
|
|
327
330
|
*/
|
|
328
331
|
set size(size) {
|
|
332
|
+
const newSize = size ? size : DEFAULT_SIZE;
|
|
329
333
|
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
330
|
-
if (size) {
|
|
331
|
-
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input',
|
|
334
|
+
if (size !== 'none') {
|
|
335
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', newSize));
|
|
332
336
|
}
|
|
333
|
-
this._size =
|
|
337
|
+
this._size = newSize;
|
|
334
338
|
}
|
|
335
339
|
get size() {
|
|
336
340
|
return this._size;
|
|
@@ -339,19 +343,20 @@ export class MultiSelectTreeComponent {
|
|
|
339
343
|
* Sets the border radius of the component.
|
|
340
344
|
*
|
|
341
345
|
* The possible values are:
|
|
342
|
-
* * `
|
|
343
|
-
* * `
|
|
344
|
-
* * `
|
|
345
|
-
* * `
|
|
346
|
-
* * `
|
|
346
|
+
* * `small`
|
|
347
|
+
* * `medium` (default)
|
|
348
|
+
* * `large`
|
|
349
|
+
* * `full`
|
|
350
|
+
* * `none`
|
|
347
351
|
*
|
|
348
352
|
*/
|
|
349
353
|
set rounded(rounded) {
|
|
354
|
+
const newRounded = rounded ? rounded : DEFAULT_ROUNDED;
|
|
350
355
|
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
351
|
-
if (rounded) {
|
|
352
|
-
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(
|
|
356
|
+
if (rounded !== 'none') {
|
|
357
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(newRounded));
|
|
353
358
|
}
|
|
354
|
-
this._rounded =
|
|
359
|
+
this._rounded = newRounded;
|
|
355
360
|
}
|
|
356
361
|
get rounded() {
|
|
357
362
|
return this._rounded;
|
|
@@ -360,18 +365,19 @@ export class MultiSelectTreeComponent {
|
|
|
360
365
|
* Sets the fillMode of the component.
|
|
361
366
|
*
|
|
362
367
|
* The possible values are:
|
|
363
|
-
* * `
|
|
364
|
-
* * `
|
|
365
|
-
* * `
|
|
366
|
-
* * `
|
|
368
|
+
* * `flat`
|
|
369
|
+
* * `solid` (default)
|
|
370
|
+
* * `outline`
|
|
371
|
+
* * `none`
|
|
367
372
|
*
|
|
368
373
|
*/
|
|
369
374
|
set fillMode(fillMode) {
|
|
375
|
+
const newFillMode = fillMode ? fillMode : DEFAULT_FILL_MODE;
|
|
370
376
|
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
371
|
-
if (fillMode) {
|
|
372
|
-
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input',
|
|
377
|
+
if (fillMode !== 'none') {
|
|
378
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', newFillMode));
|
|
373
379
|
}
|
|
374
|
-
this._fillMode =
|
|
380
|
+
this._fillMode = newFillMode;
|
|
375
381
|
}
|
|
376
382
|
get fillMode() {
|
|
377
383
|
return this._fillMode;
|
|
@@ -764,9 +770,12 @@ export class MultiSelectTreeComponent {
|
|
|
764
770
|
}
|
|
765
771
|
const togglePrevented = this.triggerPopupEvents(open);
|
|
766
772
|
if (!togglePrevented) {
|
|
767
|
-
open
|
|
768
|
-
this.createPopup()
|
|
773
|
+
if (open) {
|
|
774
|
+
this.createPopup();
|
|
775
|
+
}
|
|
776
|
+
else {
|
|
769
777
|
this.destroyPopup();
|
|
778
|
+
}
|
|
770
779
|
}
|
|
771
780
|
else {
|
|
772
781
|
this.removeTreeViewFromTabOrder();
|
|
@@ -935,9 +944,12 @@ export class MultiSelectTreeComponent {
|
|
|
935
944
|
}
|
|
936
945
|
triggerPopupEvents(open) {
|
|
937
946
|
const eventArgs = new PreventableEvent();
|
|
938
|
-
open
|
|
939
|
-
this.open.emit(eventArgs)
|
|
947
|
+
if (open) {
|
|
948
|
+
this.open.emit(eventArgs);
|
|
949
|
+
}
|
|
950
|
+
else {
|
|
940
951
|
this.close.emit(eventArgs);
|
|
952
|
+
}
|
|
941
953
|
return eventArgs.isDefaultPrevented();
|
|
942
954
|
}
|
|
943
955
|
createPopup() {
|
|
@@ -1049,9 +1061,12 @@ export class MultiSelectTreeComponent {
|
|
|
1049
1061
|
// => should focus either the filter input (if enabled) or the wrapper
|
|
1050
1062
|
}
|
|
1051
1063
|
else if (this.isCheckAllActive || isFirstNodeActive) {
|
|
1052
|
-
this.filterable
|
|
1053
|
-
this.filterInput.nativeElement.focus()
|
|
1064
|
+
if (this.filterable) {
|
|
1065
|
+
this.filterInput.nativeElement.focus();
|
|
1066
|
+
}
|
|
1067
|
+
else {
|
|
1054
1068
|
this.focus();
|
|
1069
|
+
}
|
|
1055
1070
|
}
|
|
1056
1071
|
}
|
|
1057
1072
|
handleDownKey(event) {
|
|
@@ -1171,13 +1186,13 @@ export class MultiSelectTreeComponent {
|
|
|
1171
1186
|
}, []));
|
|
1172
1187
|
}
|
|
1173
1188
|
setComponentClasses() {
|
|
1174
|
-
if (this.size) {
|
|
1189
|
+
if (this.size !== 'none') {
|
|
1175
1190
|
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
1176
1191
|
}
|
|
1177
|
-
if (this.rounded) {
|
|
1192
|
+
if (this.rounded !== 'none') {
|
|
1178
1193
|
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
1179
1194
|
}
|
|
1180
|
-
if (this.fillMode) {
|
|
1195
|
+
if (this.fillMode !== 'none') {
|
|
1181
1196
|
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
1182
1197
|
}
|
|
1183
1198
|
}
|
|
@@ -1257,7 +1272,7 @@ MultiSelectTreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0
|
|
|
1257
1272
|
</span>
|
|
1258
1273
|
<span
|
|
1259
1274
|
*ngIf="loading"
|
|
1260
|
-
class="k-icon k-i-loading"
|
|
1275
|
+
class="k-icon k-i-loading k-input-loading-icon"
|
|
1261
1276
|
>
|
|
1262
1277
|
</span>
|
|
1263
1278
|
<ng-template #popupTemplate>
|
|
@@ -1460,7 +1475,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1460
1475
|
</span>
|
|
1461
1476
|
<span
|
|
1462
1477
|
*ngIf="loading"
|
|
1463
|
-
class="k-icon k-i-loading"
|
|
1478
|
+
class="k-icon k-i-loading k-input-loading-icon"
|
|
1464
1479
|
>
|
|
1465
1480
|
</span>
|
|
1466
1481
|
<ng-template #popupTemplate>
|
package/esm2015/main.js
CHANGED
|
@@ -50,6 +50,10 @@ export { ComboBoxModule } from './comboboxes/combobox.module';
|
|
|
50
50
|
export { DropDownListModule } from './dropdownlist/dropdownlist.module';
|
|
51
51
|
export { SharedDirectivesModule } from './common/shared-directives.module';
|
|
52
52
|
export { ListComponent } from './common/list.component';
|
|
53
|
+
/**
|
|
54
|
+
* @hidden
|
|
55
|
+
* TODO: See if the export could be removed (AOT should pass)
|
|
56
|
+
*/
|
|
53
57
|
export { PopupComponent } from '@progress/kendo-angular-popup';
|
|
54
58
|
export { PreventableEvent } from './common/models/preventable-event';
|
|
55
59
|
export { RemoveTagEvent } from './common/models/remove-tag-event';
|
|
@@ -54,6 +54,9 @@ const MULTISELECT_VALUE_ACCESSOR = {
|
|
|
54
54
|
provide: NG_VALUE_ACCESSOR,
|
|
55
55
|
useExisting: forwardRef(() => MultiSelectComponent)
|
|
56
56
|
};
|
|
57
|
+
const DEFAULT_SIZE = 'medium';
|
|
58
|
+
const DEFAULT_ROUNDED = 'medium';
|
|
59
|
+
const DEFAULT_FILL_MODE = 'solid';
|
|
57
60
|
/**
|
|
58
61
|
* Represents the [Kendo UI MultiSelect component for Angular]({% slug overview_multiselect %}).
|
|
59
62
|
*
|
|
@@ -421,18 +424,19 @@ export class MultiSelectComponent {
|
|
|
421
424
|
* Sets the size of the component.
|
|
422
425
|
*
|
|
423
426
|
* The possible values are:
|
|
424
|
-
* * `
|
|
425
|
-
* * `
|
|
426
|
-
* * `
|
|
427
|
-
* * `
|
|
427
|
+
* * `small`
|
|
428
|
+
* * `medium` (default)
|
|
429
|
+
* * `large`
|
|
430
|
+
* * `none`
|
|
428
431
|
*
|
|
429
432
|
*/
|
|
430
433
|
set size(size) {
|
|
434
|
+
const newSize = size ? size : DEFAULT_SIZE;
|
|
431
435
|
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
432
|
-
if (size) {
|
|
433
|
-
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input',
|
|
436
|
+
if (size !== 'none') {
|
|
437
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', newSize));
|
|
434
438
|
}
|
|
435
|
-
this._size =
|
|
439
|
+
this._size = newSize;
|
|
436
440
|
}
|
|
437
441
|
get size() {
|
|
438
442
|
return this._size;
|
|
@@ -441,19 +445,20 @@ export class MultiSelectComponent {
|
|
|
441
445
|
* Sets the border radius of the component.
|
|
442
446
|
*
|
|
443
447
|
* The possible values are:
|
|
444
|
-
* * `
|
|
445
|
-
* * `
|
|
446
|
-
* * `
|
|
447
|
-
* * `
|
|
448
|
-
* * `
|
|
448
|
+
* * `small`
|
|
449
|
+
* * `medium` (default)
|
|
450
|
+
* * `large`
|
|
451
|
+
* * `full`
|
|
452
|
+
* * `none`
|
|
449
453
|
*
|
|
450
454
|
*/
|
|
451
455
|
set rounded(rounded) {
|
|
456
|
+
const newRounded = rounded ? rounded : DEFAULT_ROUNDED;
|
|
452
457
|
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
453
|
-
if (rounded) {
|
|
454
|
-
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(
|
|
458
|
+
if (rounded !== 'none') {
|
|
459
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(newRounded));
|
|
455
460
|
}
|
|
456
|
-
this._rounded =
|
|
461
|
+
this._rounded = newRounded;
|
|
457
462
|
}
|
|
458
463
|
get rounded() {
|
|
459
464
|
return this._rounded;
|
|
@@ -462,18 +467,19 @@ export class MultiSelectComponent {
|
|
|
462
467
|
* Sets the fillMode of the component.
|
|
463
468
|
*
|
|
464
469
|
* The possible values are:
|
|
465
|
-
* * `
|
|
466
|
-
* * `
|
|
467
|
-
* * `
|
|
468
|
-
* * `
|
|
470
|
+
* * `flat`
|
|
471
|
+
* * `solid` (default)
|
|
472
|
+
* * `outline`
|
|
473
|
+
* * `none`
|
|
469
474
|
*
|
|
470
475
|
*/
|
|
471
476
|
set fillMode(fillMode) {
|
|
477
|
+
const newFillMode = fillMode ? fillMode : DEFAULT_FILL_MODE;
|
|
472
478
|
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
473
|
-
if (fillMode) {
|
|
474
|
-
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input',
|
|
479
|
+
if (fillMode !== 'none') {
|
|
480
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', newFillMode));
|
|
475
481
|
}
|
|
476
|
-
this._fillMode =
|
|
482
|
+
this._fillMode = newFillMode;
|
|
477
483
|
}
|
|
478
484
|
get fillMode() {
|
|
479
485
|
return this._fillMode;
|
|
@@ -1325,13 +1331,13 @@ export class MultiSelectComponent {
|
|
|
1325
1331
|
});
|
|
1326
1332
|
}
|
|
1327
1333
|
setComponentClasses() {
|
|
1328
|
-
if (this.size) {
|
|
1334
|
+
if (this.size !== 'none') {
|
|
1329
1335
|
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
1330
1336
|
}
|
|
1331
|
-
if (this.rounded) {
|
|
1337
|
+
if (this.rounded !== 'none') {
|
|
1332
1338
|
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
1333
1339
|
}
|
|
1334
|
-
if (this.fillMode) {
|
|
1340
|
+
if (this.fillMode !== 'none') {
|
|
1335
1341
|
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
1336
1342
|
}
|
|
1337
1343
|
}
|
|
@@ -1413,7 +1419,7 @@ MultiSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
|
1413
1419
|
</span>
|
|
1414
1420
|
<span
|
|
1415
1421
|
*ngIf="loading"
|
|
1416
|
-
class="k-icon k-i-loading"
|
|
1422
|
+
class="k-icon k-i-loading k-input-loading-icon"
|
|
1417
1423
|
>
|
|
1418
1424
|
</span>
|
|
1419
1425
|
<ng-template #popupTemplate>
|
|
@@ -1566,7 +1572,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1566
1572
|
</span>
|
|
1567
1573
|
<span
|
|
1568
1574
|
*ngIf="loading"
|
|
1569
|
-
class="k-icon k-i-loading"
|
|
1575
|
+
class="k-icon k-i-loading k-input-loading-icon"
|
|
1570
1576
|
>
|
|
1571
1577
|
</span>
|
|
1572
1578
|
<ng-template #popupTemplate>
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-dropdowns',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1650440767,
|
|
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
|
};
|