@progress/kendo-angular-dropdowns 7.0.0-next.202204040550 → 7.0.1-dev.202204281135
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 +14 -14
- 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 +49 -34
- package/esm2015/main.js +4 -0
- package/esm2015/multiselect/multiselect.component.js +34 -28
- package/esm2015/package-metadata.js +1 -1
- package/fesm2015/kendo-angular-dropdowns.js +298 -174
- package/main.d.ts +4 -0
- package/multiselect/multiselect.component.d.ts +14 -14
- package/package.json +10 -12
- package/schematics/ngAdd/index.js +2 -2
|
@@ -52,6 +52,9 @@ export const DROPDOWNLIST_VALUE_ACCESSOR = {
|
|
|
52
52
|
provide: NG_VALUE_ACCESSOR,
|
|
53
53
|
useExisting: forwardRef(() => DropDownListComponent)
|
|
54
54
|
};
|
|
55
|
+
const DEFAULT_SIZE = 'medium';
|
|
56
|
+
const DEFAULT_ROUNDED = 'medium';
|
|
57
|
+
const DEFAULT_FILL_MODE = 'solid';
|
|
55
58
|
/**
|
|
56
59
|
* Represents the [Kendo UI DropDownList component for Angular]({% slug overview_ddl %}).
|
|
57
60
|
*
|
|
@@ -341,18 +344,19 @@ export class DropDownListComponent {
|
|
|
341
344
|
* Sets the size of the component.
|
|
342
345
|
*
|
|
343
346
|
* The possible values are:
|
|
344
|
-
* * `
|
|
345
|
-
* * `
|
|
346
|
-
* * `
|
|
347
|
-
* * `
|
|
347
|
+
* * `small`
|
|
348
|
+
* * `medium` (default)
|
|
349
|
+
* * `large`
|
|
350
|
+
* * `none`
|
|
348
351
|
*
|
|
349
352
|
*/
|
|
350
353
|
set size(size) {
|
|
354
|
+
const newSize = size ? size : DEFAULT_SIZE;
|
|
351
355
|
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('picker', this.size));
|
|
352
|
-
if (size) {
|
|
353
|
-
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('picker',
|
|
356
|
+
if (size !== 'none') {
|
|
357
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('picker', newSize));
|
|
354
358
|
}
|
|
355
|
-
this._size =
|
|
359
|
+
this._size = newSize;
|
|
356
360
|
}
|
|
357
361
|
get size() {
|
|
358
362
|
return this._size;
|
|
@@ -361,17 +365,18 @@ export class DropDownListComponent {
|
|
|
361
365
|
* Sets the border radius of the component.
|
|
362
366
|
*
|
|
363
367
|
* The possible values are:
|
|
364
|
-
* * `
|
|
365
|
-
* * `
|
|
366
|
-
* * `
|
|
367
|
-
* * `
|
|
368
|
-
* * `
|
|
368
|
+
* * `small`
|
|
369
|
+
* * `medium` (default)
|
|
370
|
+
* * `large`
|
|
371
|
+
* * `full`
|
|
372
|
+
* * `none`
|
|
369
373
|
*
|
|
370
374
|
*/
|
|
371
375
|
set rounded(rounded) {
|
|
376
|
+
const newRounded = rounded ? rounded : DEFAULT_ROUNDED;
|
|
372
377
|
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
373
|
-
if (rounded) {
|
|
374
|
-
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(
|
|
378
|
+
if (rounded !== 'none') {
|
|
379
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(newRounded));
|
|
375
380
|
}
|
|
376
381
|
this._rounded = rounded;
|
|
377
382
|
}
|
|
@@ -382,18 +387,19 @@ export class DropDownListComponent {
|
|
|
382
387
|
* Sets the fillMode of the component.
|
|
383
388
|
*
|
|
384
389
|
* The possible values are:
|
|
385
|
-
* * `
|
|
386
|
-
* * `
|
|
387
|
-
* * `
|
|
388
|
-
* * `
|
|
390
|
+
* * `flat`
|
|
391
|
+
* * `solid` (default)
|
|
392
|
+
* * `outline`
|
|
393
|
+
* * `none`
|
|
389
394
|
*
|
|
390
395
|
*/
|
|
391
396
|
set fillMode(fillMode) {
|
|
397
|
+
const newFillMode = fillMode ? fillMode : DEFAULT_FILL_MODE;
|
|
392
398
|
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('picker', this.fillMode));
|
|
393
|
-
if (fillMode) {
|
|
394
|
-
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('picker',
|
|
399
|
+
if (fillMode !== 'none') {
|
|
400
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('picker', newFillMode));
|
|
395
401
|
}
|
|
396
|
-
this._fillMode =
|
|
402
|
+
this._fillMode = newFillMode;
|
|
397
403
|
}
|
|
398
404
|
get fillMode() {
|
|
399
405
|
return this._fillMode;
|
|
@@ -721,7 +727,7 @@ export class DropDownListComponent {
|
|
|
721
727
|
* @hidden
|
|
722
728
|
*/
|
|
723
729
|
get buttonClasses() {
|
|
724
|
-
return this.loading ? 'k-i-loading' : this.iconClass || 'k-i-arrow-s';
|
|
730
|
+
return this.loading ? 'k-i-loading k-input-loading-icon' : this.iconClass || 'k-i-arrow-s';
|
|
725
731
|
}
|
|
726
732
|
/**
|
|
727
733
|
* @hidden
|
|
@@ -1199,13 +1205,13 @@ export class DropDownListComponent {
|
|
|
1199
1205
|
this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-describedby', newValue);
|
|
1200
1206
|
}
|
|
1201
1207
|
setComponentClasses() {
|
|
1202
|
-
if (this.size) {
|
|
1208
|
+
if (this.size !== 'none') {
|
|
1203
1209
|
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('picker', this.size));
|
|
1204
1210
|
}
|
|
1205
|
-
if (this.rounded) {
|
|
1211
|
+
if (this.rounded !== 'none') {
|
|
1206
1212
|
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
1207
1213
|
}
|
|
1208
|
-
if (this.fillMode) {
|
|
1214
|
+
if (this.fillMode !== 'none') {
|
|
1209
1215
|
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('picker', this.fillMode));
|
|
1210
1216
|
}
|
|
1211
1217
|
}
|
|
@@ -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
|
*/
|
|
@@ -187,7 +190,7 @@ export class MultiSelectTreeComponent {
|
|
|
187
190
|
*/
|
|
188
191
|
this.valueChange = new EventEmitter();
|
|
189
192
|
/**
|
|
190
|
-
* Fires each time a tag is about to be removed.
|
|
193
|
+
* Fires each time a tag is about to be removed([see examples]({% slug summarytagmode_multiselect %}#toc-notifying-on-removing-group-tags)).
|
|
191
194
|
* This event is preventable. If you cancel it, the tag will not be removed.
|
|
192
195
|
*/
|
|
193
196
|
this.removeTag = new EventEmitter();
|
|
@@ -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';
|