@progress/kendo-angular-dropdowns 5.5.1-dev.202111181325 → 6.0.0-dev.202201190829
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/NOTICE.txt +119 -79
- package/README.md +1 -1
- package/dist/cdn/js/kendo-angular-dropdowns.js +2 -2
- package/dist/cdn/main.js +1 -1
- package/dist/es/autocomplete/autocomplete.component.js +120 -5
- package/dist/es/comboboxes/combobox.component.js +141 -20
- package/dist/es/comboboxes/multicolumncombobox.component.js +30 -10
- package/dist/es/common/list.component.js +83 -5
- package/dist/es/common/models/fillmode.js +4 -0
- package/dist/es/common/models/list-type.js +4 -0
- package/dist/es/common/models/rounded.js +4 -0
- package/dist/es/common/models/size.js +4 -0
- package/dist/es/common/searchbar.component.js +1 -1
- package/dist/es/common/selection/selectable.directive.js +2 -2
- package/dist/es/common/taglist.component.js +58 -5
- package/dist/es/common/util.js +37 -0
- package/dist/es/dropdownlist/dropdownlist.component.js +338 -46
- package/dist/es/dropdowntrees/dropdowntree.component.js +276 -42
- package/dist/es/dropdowntrees/multiselecttree.component.js +307 -46
- package/dist/es/multiselect/multiselect.component.js +162 -35
- package/dist/es/package-metadata.js +1 -1
- package/dist/es2015/autocomplete/autocomplete.component.d.ts +42 -0
- package/dist/es2015/autocomplete/autocomplete.component.js +109 -7
- package/dist/es2015/comboboxes/combobox.component.d.ts +49 -4
- package/dist/es2015/comboboxes/combobox.component.js +207 -106
- package/dist/es2015/comboboxes/multicolumncombobox.component.d.ts +9 -1
- package/dist/es2015/comboboxes/multicolumncombobox.component.js +185 -166
- package/dist/es2015/common/list.component.d.ts +22 -1
- package/dist/es2015/common/list.component.js +115 -36
- package/dist/es2015/common/models/fillmode.d.ts +14 -0
- package/dist/es2015/common/models/fillmode.js +4 -0
- package/dist/es2015/common/models/list-type.d.ts +8 -0
- package/dist/es2015/common/models/list-type.js +4 -0
- package/dist/es2015/common/models/rounded.d.ts +15 -0
- package/dist/es2015/common/models/rounded.js +4 -0
- package/dist/es2015/common/models/size.d.ts +14 -0
- package/dist/es2015/common/models/size.js +4 -0
- package/dist/es2015/common/searchbar.component.js +1 -1
- package/dist/es2015/common/selection/selectable.directive.js +2 -2
- package/dist/es2015/common/taglist.component.d.ts +13 -1
- package/dist/es2015/common/taglist.component.js +102 -47
- package/dist/es2015/common/util.d.ts +17 -0
- package/dist/es2015/common/util.js +37 -0
- package/dist/es2015/dropdownlist/dropdownlist.component.d.ts +77 -13
- package/dist/es2015/dropdownlist/dropdownlist.component.js +390 -159
- package/dist/es2015/dropdowntrees/dropdowntree.component.d.ts +71 -13
- package/dist/es2015/dropdowntrees/dropdowntree.component.js +287 -99
- package/dist/es2015/dropdowntrees/multiselecttree.component.d.ts +72 -12
- package/dist/es2015/dropdowntrees/multiselecttree.component.js +319 -117
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/multiselect/multiselect.component.d.ts +53 -8
- package/dist/es2015/multiselect/multiselect.component.js +183 -70
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/fesm2015/index.js +1928 -801
- package/dist/fesm5/index.js +1569 -231
- package/dist/npm/autocomplete/autocomplete.component.js +119 -4
- package/dist/npm/comboboxes/combobox.component.js +140 -19
- package/dist/npm/comboboxes/multicolumncombobox.component.js +29 -9
- package/dist/npm/common/list.component.js +82 -4
- package/dist/npm/common/models/fillmode.js +6 -0
- package/dist/npm/common/models/list-type.js +6 -0
- package/dist/npm/common/models/rounded.js +6 -0
- package/dist/npm/common/models/size.js +6 -0
- package/dist/npm/common/searchbar.component.js +1 -1
- package/dist/npm/common/selection/selectable.directive.js +2 -2
- package/dist/npm/common/taglist.component.js +56 -3
- package/dist/npm/common/util.js +37 -0
- package/dist/npm/dropdownlist/dropdownlist.component.js +336 -44
- package/dist/npm/dropdowntrees/dropdowntree.component.js +274 -40
- package/dist/npm/dropdowntrees/multiselecttree.component.js +304 -43
- package/dist/npm/multiselect/multiselect.component.js +160 -33
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-angular-dropdowns.js +1 -1
- package/package.json +21 -17
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
/* tslint:disable:member-ordering */
|
|
6
6
|
import * as tslib_1 from "tslib";
|
|
7
|
-
import { guid, isPresent, isArray, isObjectArray, resolveAllValues, selectedIndices, getter, isNumber, isUntouched, inDropDown } from '../common/util';
|
|
7
|
+
import { guid, isPresent, isArray, isObjectArray, resolveAllValues, selectedIndices, getter, isNumber, isUntouched, inDropDown, getSizeClass, getRoundedClass, getFillModeClass } from '../common/util';
|
|
8
8
|
import { SearchBarComponent } from '../common/searchbar.component';
|
|
9
|
-
import { ViewChild, Renderer2, ViewContainerRef, Component, HostBinding, Input, ElementRef, TemplateRef, Output, EventEmitter, isDevMode, forwardRef, ContentChild, ChangeDetectorRef, KeyValueDiffers, NgZone, Optional, Inject } from '@angular/core';
|
|
9
|
+
import { ViewChild, Renderer2, ViewContainerRef, Component, HostBinding, Input, ElementRef, TemplateRef, Output, EventEmitter, isDevMode, forwardRef, ContentChild, ChangeDetectorRef, KeyValueDiffers, NgZone, Optional, Inject, HostListener } from '@angular/core';
|
|
10
10
|
import { Subscription, Subject, of } from 'rxjs';
|
|
11
11
|
import { catchError, filter, map, tap } from 'rxjs/operators';
|
|
12
12
|
import { isChanged, isDocumentAvailable, KendoInput, hasObservers, anyChanged } from '@progress/kendo-angular-common';
|
|
@@ -62,8 +62,9 @@ var MULTISELECT_VALUE_ACCESSOR = {
|
|
|
62
62
|
* ```
|
|
63
63
|
*/
|
|
64
64
|
var MultiSelectComponent = /** @class */ (function () {
|
|
65
|
-
function MultiSelectComponent(localization, popupService, dataService, selectionService, navigationService, disabledItemsService, cdr, differs, renderer,
|
|
65
|
+
function MultiSelectComponent(wrapper, localization, popupService, dataService, selectionService, navigationService, disabledItemsService, cdr, differs, renderer, _zone, touchEnabled) {
|
|
66
66
|
var _this = this;
|
|
67
|
+
this.wrapper = wrapper;
|
|
67
68
|
this.localization = localization;
|
|
68
69
|
this.popupService = popupService;
|
|
69
70
|
this.dataService = dataService;
|
|
@@ -73,7 +74,6 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
73
74
|
this.cdr = cdr;
|
|
74
75
|
this.differs = differs;
|
|
75
76
|
this.renderer = renderer;
|
|
76
|
-
this.hostElement = hostElement;
|
|
77
77
|
this._zone = _zone;
|
|
78
78
|
this.touchEnabled = touchEnabled;
|
|
79
79
|
this.listBoxId = guid();
|
|
@@ -234,8 +234,11 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
234
234
|
* This event is preventable. If you cancel it, the tag will not be removed.
|
|
235
235
|
*/
|
|
236
236
|
this.removeTag = new EventEmitter();
|
|
237
|
-
this.
|
|
237
|
+
this.hostClasses = true;
|
|
238
238
|
this.initialized = false;
|
|
239
|
+
this._size = 'medium';
|
|
240
|
+
this._rounded = 'medium';
|
|
241
|
+
this._fillMode = 'solid';
|
|
239
242
|
this.onChangeCallback = function (_) { };
|
|
240
243
|
this.onTouchedCallback = function (_) { };
|
|
241
244
|
this._placeholder = '';
|
|
@@ -312,7 +315,7 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
312
315
|
if (hasObservers(this.onBlur) ||
|
|
313
316
|
hasObservers(this.filterChange) ||
|
|
314
317
|
hasObservers(this.close) ||
|
|
315
|
-
isUntouched(this.
|
|
318
|
+
isUntouched(this.wrapper.nativeElement)) {
|
|
316
319
|
this._zone.run(function () {
|
|
317
320
|
_this.closePopup();
|
|
318
321
|
if (!(_this.isOpen && _this.allowCustom)) {
|
|
@@ -329,22 +332,6 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
329
332
|
this.closePopup();
|
|
330
333
|
}
|
|
331
334
|
};
|
|
332
|
-
/**
|
|
333
|
-
* @hidden
|
|
334
|
-
*/
|
|
335
|
-
MultiSelectComponent.prototype.wrapperMousedown = function (event) {
|
|
336
|
-
var inputElement = this.searchbar.input.nativeElement;
|
|
337
|
-
if (event.button === 0) {
|
|
338
|
-
if (this.isFocused && this.isOpen && event.target === inputElement) {
|
|
339
|
-
return;
|
|
340
|
-
}
|
|
341
|
-
if (!this.touchEnabled || (this.touchEnabled && event.target.tagName !== 'SPAN')) {
|
|
342
|
-
this.searchbar.focus();
|
|
343
|
-
}
|
|
344
|
-
this.togglePopup(!this.isOpen);
|
|
345
|
-
event.preventDefault();
|
|
346
|
-
}
|
|
347
|
-
};
|
|
348
335
|
/**
|
|
349
336
|
* @hidden
|
|
350
337
|
*/
|
|
@@ -438,6 +425,79 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
438
425
|
enumerable: true,
|
|
439
426
|
configurable: true
|
|
440
427
|
});
|
|
428
|
+
Object.defineProperty(MultiSelectComponent.prototype, "size", {
|
|
429
|
+
get: function () {
|
|
430
|
+
return this._size;
|
|
431
|
+
},
|
|
432
|
+
/**
|
|
433
|
+
* Sets the size of the component.
|
|
434
|
+
*
|
|
435
|
+
* The possible values are:
|
|
436
|
+
* * `'small'`
|
|
437
|
+
* * `'medium'` (default)
|
|
438
|
+
* * `'large'`
|
|
439
|
+
* * `null`
|
|
440
|
+
*
|
|
441
|
+
*/
|
|
442
|
+
set: function (size) {
|
|
443
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
444
|
+
if (size) {
|
|
445
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', size));
|
|
446
|
+
}
|
|
447
|
+
this._size = size;
|
|
448
|
+
},
|
|
449
|
+
enumerable: true,
|
|
450
|
+
configurable: true
|
|
451
|
+
});
|
|
452
|
+
Object.defineProperty(MultiSelectComponent.prototype, "rounded", {
|
|
453
|
+
get: function () {
|
|
454
|
+
return this._rounded;
|
|
455
|
+
},
|
|
456
|
+
/**
|
|
457
|
+
* Sets the border radius of the component.
|
|
458
|
+
*
|
|
459
|
+
* The possible values are:
|
|
460
|
+
* * `'small'`
|
|
461
|
+
* * `'medium'` (default)
|
|
462
|
+
* * `'large'`
|
|
463
|
+
* * `'full'`
|
|
464
|
+
* * `null`
|
|
465
|
+
*
|
|
466
|
+
*/
|
|
467
|
+
set: function (rounded) {
|
|
468
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
469
|
+
if (rounded) {
|
|
470
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
471
|
+
}
|
|
472
|
+
this._rounded = rounded;
|
|
473
|
+
},
|
|
474
|
+
enumerable: true,
|
|
475
|
+
configurable: true
|
|
476
|
+
});
|
|
477
|
+
Object.defineProperty(MultiSelectComponent.prototype, "fillMode", {
|
|
478
|
+
get: function () {
|
|
479
|
+
return this._fillMode;
|
|
480
|
+
},
|
|
481
|
+
/**
|
|
482
|
+
* Sets the fillMode of the component.
|
|
483
|
+
*
|
|
484
|
+
* The possible values are:
|
|
485
|
+
* * `'flat'`
|
|
486
|
+
* * `'solid'` (default)
|
|
487
|
+
* * `'outline'`
|
|
488
|
+
* * `null`
|
|
489
|
+
*
|
|
490
|
+
*/
|
|
491
|
+
set: function (fillMode) {
|
|
492
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
493
|
+
if (fillMode) {
|
|
494
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
|
|
495
|
+
}
|
|
496
|
+
this._fillMode = fillMode;
|
|
497
|
+
},
|
|
498
|
+
enumerable: true,
|
|
499
|
+
configurable: true
|
|
500
|
+
});
|
|
441
501
|
Object.defineProperty(MultiSelectComponent.prototype, "placeholder", {
|
|
442
502
|
get: function () {
|
|
443
503
|
return this.selectedDataItems.length ? '' : this._placeholder;
|
|
@@ -544,6 +604,29 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
544
604
|
enumerable: true,
|
|
545
605
|
configurable: true
|
|
546
606
|
});
|
|
607
|
+
Object.defineProperty(MultiSelectComponent.prototype, "isLoading", {
|
|
608
|
+
get: function () {
|
|
609
|
+
return this.loading;
|
|
610
|
+
},
|
|
611
|
+
enumerable: true,
|
|
612
|
+
configurable: true
|
|
613
|
+
});
|
|
614
|
+
/**
|
|
615
|
+
* @hidden
|
|
616
|
+
*/
|
|
617
|
+
MultiSelectComponent.prototype.hostMousedown = function (event) {
|
|
618
|
+
var inputElement = this.searchbar.input.nativeElement;
|
|
619
|
+
if (event.button === 0) {
|
|
620
|
+
if (this.isFocused && this.isOpen && event.target === inputElement) {
|
|
621
|
+
return;
|
|
622
|
+
}
|
|
623
|
+
if (!this.touchEnabled || (this.touchEnabled && event.target.tagName !== 'SPAN')) {
|
|
624
|
+
this.searchbar.focus();
|
|
625
|
+
}
|
|
626
|
+
this.togglePopup(!this.isOpen);
|
|
627
|
+
event.preventDefault();
|
|
628
|
+
}
|
|
629
|
+
};
|
|
547
630
|
Object.defineProperty(MultiSelectComponent.prototype, "listContainerClasses", {
|
|
548
631
|
get: function () {
|
|
549
632
|
var containerClasses = ['k-list-container', 'k-reset'];
|
|
@@ -555,6 +638,16 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
555
638
|
enumerable: true,
|
|
556
639
|
configurable: true
|
|
557
640
|
});
|
|
641
|
+
Object.defineProperty(MultiSelectComponent.prototype, "customItemSizeClass", {
|
|
642
|
+
/**
|
|
643
|
+
* @hidden
|
|
644
|
+
*/
|
|
645
|
+
get: function () {
|
|
646
|
+
return "" + (this.size ? getSizeClass('list', this.size) : '');
|
|
647
|
+
},
|
|
648
|
+
enumerable: true,
|
|
649
|
+
configurable: true
|
|
650
|
+
});
|
|
558
651
|
Object.defineProperty(MultiSelectComponent.prototype, "width", {
|
|
559
652
|
get: function () {
|
|
560
653
|
var wrapperOffsetWidth = 0;
|
|
@@ -828,7 +921,7 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
828
921
|
};
|
|
829
922
|
MultiSelectComponent.prototype.ngOnInit = function () {
|
|
830
923
|
var _this = this;
|
|
831
|
-
this.renderer.removeAttribute(this.
|
|
924
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, "tabindex");
|
|
832
925
|
this.createCustomValueStream();
|
|
833
926
|
this.localizationChangeSubscription = this.localization
|
|
834
927
|
.changes.subscribe(function (_a) {
|
|
@@ -838,6 +931,7 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
838
931
|
});
|
|
839
932
|
this.setMessages();
|
|
840
933
|
this.setState(this.value);
|
|
934
|
+
this.setComponentClasses();
|
|
841
935
|
this.initialized = true;
|
|
842
936
|
};
|
|
843
937
|
MultiSelectComponent.prototype.ngOnChanges = function (changes) {
|
|
@@ -934,7 +1028,7 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
934
1028
|
return this._isFocused;
|
|
935
1029
|
},
|
|
936
1030
|
set: function (isFocused) {
|
|
937
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.
|
|
1031
|
+
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-focus');
|
|
938
1032
|
this._isFocused = isFocused;
|
|
939
1033
|
},
|
|
940
1034
|
enumerable: true,
|
|
@@ -973,7 +1067,7 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
973
1067
|
// Roll up MultiSelect on iOS when tapped outside
|
|
974
1068
|
return _this.touchstartDisposeHandler = _this.renderer.listen(document, 'touchstart', function (e) {
|
|
975
1069
|
var target = e.target;
|
|
976
|
-
if ((_this.isFocused || _this.isOpen) && !inDropDown(_this.
|
|
1070
|
+
if ((_this.isFocused || _this.isOpen) && !inDropDown(_this.wrapper, target, _this.popupRef)) {
|
|
977
1071
|
_this._zone.run(function () {
|
|
978
1072
|
_this.blur();
|
|
979
1073
|
if (_this.isOpen) {
|
|
@@ -1351,6 +1445,17 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
1351
1445
|
});
|
|
1352
1446
|
});
|
|
1353
1447
|
};
|
|
1448
|
+
MultiSelectComponent.prototype.setComponentClasses = function () {
|
|
1449
|
+
if (this.size) {
|
|
1450
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
1451
|
+
}
|
|
1452
|
+
if (this.rounded) {
|
|
1453
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
1454
|
+
}
|
|
1455
|
+
if (this.fillMode) {
|
|
1456
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
1457
|
+
}
|
|
1458
|
+
};
|
|
1354
1459
|
var MultiSelectComponent_1;
|
|
1355
1460
|
tslib_1.__decorate([
|
|
1356
1461
|
Input(),
|
|
@@ -1391,6 +1496,21 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
1391
1496
|
tslib_1.__metadata("design:type", Number),
|
|
1392
1497
|
tslib_1.__metadata("design:paramtypes", [Number])
|
|
1393
1498
|
], MultiSelectComponent.prototype, "tabIndex", null);
|
|
1499
|
+
tslib_1.__decorate([
|
|
1500
|
+
Input(),
|
|
1501
|
+
tslib_1.__metadata("design:type", String),
|
|
1502
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
1503
|
+
], MultiSelectComponent.prototype, "size", null);
|
|
1504
|
+
tslib_1.__decorate([
|
|
1505
|
+
Input(),
|
|
1506
|
+
tslib_1.__metadata("design:type", String),
|
|
1507
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
1508
|
+
], MultiSelectComponent.prototype, "rounded", null);
|
|
1509
|
+
tslib_1.__decorate([
|
|
1510
|
+
Input(),
|
|
1511
|
+
tslib_1.__metadata("design:type", String),
|
|
1512
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
1513
|
+
], MultiSelectComponent.prototype, "fillMode", null);
|
|
1394
1514
|
tslib_1.__decorate([
|
|
1395
1515
|
Input(),
|
|
1396
1516
|
tslib_1.__metadata("design:type", String),
|
|
@@ -1501,10 +1621,6 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
1501
1621
|
ViewChild('popupTemplate', { static: true }),
|
|
1502
1622
|
tslib_1.__metadata("design:type", TemplateRef)
|
|
1503
1623
|
], MultiSelectComponent.prototype, "popupTemplate", void 0);
|
|
1504
|
-
tslib_1.__decorate([
|
|
1505
|
-
ViewChild('wrapper', { static: true }),
|
|
1506
|
-
tslib_1.__metadata("design:type", ElementRef)
|
|
1507
|
-
], MultiSelectComponent.prototype, "wrapper", void 0);
|
|
1508
1624
|
tslib_1.__decorate([
|
|
1509
1625
|
ViewChild('optionsList', { static: false }),
|
|
1510
1626
|
tslib_1.__metadata("design:type", ListComponent)
|
|
@@ -1546,20 +1662,31 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
1546
1662
|
tslib_1.__metadata("design:type", NoDataTemplateDirective)
|
|
1547
1663
|
], MultiSelectComponent.prototype, "noDataTemplate", void 0);
|
|
1548
1664
|
tslib_1.__decorate([
|
|
1549
|
-
HostBinding('class.k-widget'),
|
|
1550
1665
|
HostBinding('class.k-multiselect'),
|
|
1666
|
+
HostBinding('class.k-input'),
|
|
1551
1667
|
tslib_1.__metadata("design:type", Boolean)
|
|
1552
|
-
], MultiSelectComponent.prototype, "
|
|
1668
|
+
], MultiSelectComponent.prototype, "hostClasses", void 0);
|
|
1553
1669
|
tslib_1.__decorate([
|
|
1554
1670
|
HostBinding('attr.dir'),
|
|
1555
1671
|
tslib_1.__metadata("design:type", String),
|
|
1556
1672
|
tslib_1.__metadata("design:paramtypes", [])
|
|
1557
1673
|
], MultiSelectComponent.prototype, "dir", null);
|
|
1558
1674
|
tslib_1.__decorate([
|
|
1559
|
-
HostBinding('class.k-
|
|
1675
|
+
HostBinding('class.k-disabled'),
|
|
1560
1676
|
tslib_1.__metadata("design:type", Boolean),
|
|
1561
1677
|
tslib_1.__metadata("design:paramtypes", [])
|
|
1562
1678
|
], MultiSelectComponent.prototype, "disabledClass", null);
|
|
1679
|
+
tslib_1.__decorate([
|
|
1680
|
+
HostBinding('class.k-loading'),
|
|
1681
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
1682
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1683
|
+
], MultiSelectComponent.prototype, "isLoading", null);
|
|
1684
|
+
tslib_1.__decorate([
|
|
1685
|
+
HostListener('mousedown', ['$event']),
|
|
1686
|
+
tslib_1.__metadata("design:type", Function),
|
|
1687
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1688
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
1689
|
+
], MultiSelectComponent.prototype, "hostMousedown", null);
|
|
1563
1690
|
MultiSelectComponent = MultiSelectComponent_1 = tslib_1.__decorate([
|
|
1564
1691
|
Component({
|
|
1565
1692
|
exportAs: 'kendoMultiSelect',
|
|
@@ -1582,10 +1709,11 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
1582
1709
|
}
|
|
1583
1710
|
],
|
|
1584
1711
|
selector: 'kendo-multiselect',
|
|
1585
|
-
template: "\n <ng-container kendoMultiSelectLocalizedMessages\n i18n-noDataText=\"kendo.multiselect.noDataText|The text displayed in the popup when there are no items\"\n noDataText=\"NO DATA FOUND\"\n\n i18n-clearTitle=\"kendo.combobox.clearTitle|The title of the clear button\"\n clearTitle=\"clear\"\n >\n </ng-container>\n <
|
|
1712
|
+
template: "\n <ng-container kendoMultiSelectLocalizedMessages\n i18n-noDataText=\"kendo.multiselect.noDataText|The text displayed in the popup when there are no items\"\n noDataText=\"NO DATA FOUND\"\n\n i18n-clearTitle=\"kendo.combobox.clearTitle|The title of the clear button\"\n clearTitle=\"clear\"\n >\n </ng-container>\n <kendo-taglist\n [size]=\"size\"\n [rounded]=\"rounded\"\n [fillMode]=\"fillMode\"\n [id]=\"tagListId\"\n [tags]=\"tags\"\n [textField]=\"textField\"\n [valueField]=\"valueField\"\n [focused]=\"focusedTagIndex\"\n [disabled]=\"disabled\"\n [template]=\"tagTemplate\"\n [groupTemplate]=\"groupTagTemplate\"\n [tagPrefix]=\"tagPrefix\"\n [disabledIndices]=\"disabledIndices\"\n (removeTag)=\"handleRemoveTag($event)\"\n >\n <kendo-searchbar\n #searchbar\n [id]=\"focusableId\"\n [role]=\"'listbox'\"\n [tagListId]=\"tagListId\"\n [activeDescendant]=\"activeDescendant\"\n [noDataLabel]=\"noDataLabel\"\n [userInput]=\"text\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [tabIndex]=\"tabIndex\"\n [popupOpen]=\"isOpen\"\n [placeholder]=\"placeholder\"\n (onNavigate)=\"handleNavigate($event)\"\n (valueChange)=\"handleFilter($event)\"\n (onBlur)=\"onSearchBarBlur()\"\n (onFocus)=\"onSearchBarFocus()\"\n >\n </kendo-searchbar>\n </kendo-taglist>\n\n <span\n *ngIf=\"!loading && !readonly && clearButton && (tags?.length || text?.length)\"\n class=\"k-clear-value\"\n [style.visibility]=\"clearButtonVisiblity\"\n [attr.title]=\"clearTitle\"\n role=\"button\"\n tabindex=\"-1\"\n (mousedown)=\"clearAll($event)\"\n >\n <span class=\"k-icon k-i-x\"></span>\n </span>\n <span\n *ngIf=\"loading\"\n class=\"k-icon k-i-loading\"\n >\n </span>\n <ng-template #popupTemplate>\n <!--header template-->\n <ng-template *ngIf=\"headerTemplate\"\n [templateContext]=\"{\n templateRef: headerTemplate.templateRef\n }\">\n </ng-template>\n <!--custom item template-->\n <div\n *ngIf=\"allowCustom && text\"\n class=\"k-list\"\n [ngClass]=\"customItemSizeClass\"\n >\n <div class=\"k-list-item k-custom-item\" kendoDropDownsSelectable [multipleSelection]=\"true\" [index]=\"-1\">\n <ng-template *ngIf=\"customItemTemplate;else default_custom_item_template\"\n [templateContext]=\"{\n templateRef: customItemTemplate.templateRef,\n $implicit: text\n }\">\n </ng-template>\n <ng-template #default_custom_item_template>{{ text }}</ng-template>\n <span class=\"k-icon k-i-plus\" style=\"float: right\"></span>\n </div>\n </div>\n <!--list-->\n <kendo-list\n #optionsList\n [size]=\"size\"\n [rounded]=\"rounded\"\n [id]=\"listBoxId\"\n [optionPrefix]=\"optionPrefix\"\n [data]=\"data\"\n [textField]=\"textField\"\n [valueField]=\"valueField\"\n [height]=\"listHeight\"\n [template]=\"template\"\n [groupTemplate]=\"groupTemplate\"\n [fixedGroupTemplate]=\"fixedGroupTemplate\"\n [show]=\"isOpen\"\n [multipleSelection]=\"true\"\n [virtual]=\"virtual\"\n (pageChange)=\"pageChange($event)\"\n [checkboxes]=\"checkboxes\"\n >\n </kendo-list>\n <!--no data template-->\n <div class=\"k-no-data\" *ngIf=\"data.length === 0\">\n <ng-template [ngIf]=\"noDataTemplate\"\n [templateContext]=\"{\n templateRef: noDataTemplate ? noDataTemplate.templateRef : undefined\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!noDataTemplate\">\n <div>{{ noDataText }}</div>\n </ng-template>\n </div>\n <!--footer template-->\n <ng-template *ngIf=\"footerTemplate\"\n [templateContext]=\"{\n templateRef: footerTemplate.templateRef\n }\">\n </ng-template>\n </ng-template>\n <ng-template [ngIf]=\"isOpen\">\n <kendo-resize-sensor (resize)=\"onResize()\"></kendo-resize-sensor>\n </ng-template>\n <ng-container #container></ng-container>\n "
|
|
1586
1713
|
}),
|
|
1587
1714
|
tslib_1.__param(11, Optional()), tslib_1.__param(11, Inject(TOUCH_ENABLED)),
|
|
1588
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
1715
|
+
tslib_1.__metadata("design:paramtypes", [ElementRef,
|
|
1716
|
+
LocalizationService,
|
|
1589
1717
|
PopupService,
|
|
1590
1718
|
DataService,
|
|
1591
1719
|
SelectionService,
|
|
@@ -1594,7 +1722,6 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
1594
1722
|
ChangeDetectorRef,
|
|
1595
1723
|
KeyValueDiffers,
|
|
1596
1724
|
Renderer2,
|
|
1597
|
-
ElementRef,
|
|
1598
1725
|
NgZone, Boolean])
|
|
1599
1726
|
], MultiSelectComponent);
|
|
1600
1727
|
return MultiSelectComponent;
|
|
@@ -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: 1642580652,
|
|
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
|
};
|
|
@@ -24,6 +24,9 @@ import { DataService } from '../common/data.service';
|
|
|
24
24
|
import { ListComponent } from '../common/list.component';
|
|
25
25
|
import { VirtualizationSettings } from '../common/models/virtualization-settings';
|
|
26
26
|
import { PageChangeEvent } from '../common/models/page-change-event';
|
|
27
|
+
import { DropDownSize } from '../common/models/size';
|
|
28
|
+
import { DropDownRounded } from '../common/models/rounded';
|
|
29
|
+
import { DropDownFillMode } from '../common/models/fillmode';
|
|
27
30
|
/**
|
|
28
31
|
* @hidden
|
|
29
32
|
*/
|
|
@@ -179,6 +182,40 @@ export declare class AutoCompleteComponent implements ControlValueAccessor, OnDe
|
|
|
179
182
|
* Enables the [virtualization]({% slug virtualization_autocomplete %}) functionality.
|
|
180
183
|
*/
|
|
181
184
|
virtual: boolean | VirtualizationSettings;
|
|
185
|
+
/**
|
|
186
|
+
* Sets the size of the component.
|
|
187
|
+
*
|
|
188
|
+
* The possible values are:
|
|
189
|
+
* * `'small'`
|
|
190
|
+
* * `'medium'` (default)
|
|
191
|
+
* * `'large'`
|
|
192
|
+
* * `null`
|
|
193
|
+
*
|
|
194
|
+
*/
|
|
195
|
+
size: DropDownSize;
|
|
196
|
+
/**
|
|
197
|
+
* Sets the border radius of the component.
|
|
198
|
+
*
|
|
199
|
+
* The possible values are:
|
|
200
|
+
* * `'small'`
|
|
201
|
+
* * `'medium'` (default)
|
|
202
|
+
* * `'large'`
|
|
203
|
+
* * `'full'`
|
|
204
|
+
* * `null`
|
|
205
|
+
*
|
|
206
|
+
*/
|
|
207
|
+
rounded: DropDownRounded;
|
|
208
|
+
/**
|
|
209
|
+
* Sets the fillMode of the component.
|
|
210
|
+
*
|
|
211
|
+
* The possible values are:
|
|
212
|
+
* * `'flat'`
|
|
213
|
+
* * `'solid'` (default)
|
|
214
|
+
* * `'outline'`
|
|
215
|
+
* * `null`
|
|
216
|
+
*
|
|
217
|
+
*/
|
|
218
|
+
fillMode: DropDownFillMode;
|
|
182
219
|
/**
|
|
183
220
|
* Fires each time the value is changed—
|
|
184
221
|
* when the component is blurred or the value is cleared through the **Clear** button
|
|
@@ -233,6 +270,7 @@ export declare class AutoCompleteComponent implements ControlValueAccessor, OnDe
|
|
|
233
270
|
widgetClasses: boolean;
|
|
234
271
|
isFocused: boolean;
|
|
235
272
|
readonly isDisabled: boolean;
|
|
273
|
+
readonly isLoading: boolean;
|
|
236
274
|
readonly dir: any;
|
|
237
275
|
text: string;
|
|
238
276
|
listBoxId: string;
|
|
@@ -336,6 +374,9 @@ export declare class AutoCompleteComponent implements ControlValueAccessor, OnDe
|
|
|
336
374
|
private wrapper;
|
|
337
375
|
private _isFocused;
|
|
338
376
|
private direction;
|
|
377
|
+
private _size;
|
|
378
|
+
private _rounded;
|
|
379
|
+
private _fillMode;
|
|
339
380
|
private subscribeEvents;
|
|
340
381
|
private subscribeTouchEvents;
|
|
341
382
|
private unsubscribeEvents;
|
|
@@ -348,4 +389,5 @@ export declare class AutoCompleteComponent implements ControlValueAccessor, OnDe
|
|
|
348
389
|
private firstFocusableIndex;
|
|
349
390
|
private findIndexPredicate;
|
|
350
391
|
private setMessages;
|
|
392
|
+
private setComponentClasses;
|
|
351
393
|
}
|
|
@@ -20,7 +20,7 @@ import { SelectionService } from '../common/selection/selection.service';
|
|
|
20
20
|
import { NavigationService } from '../common/navigation/navigation.service';
|
|
21
21
|
import { DisabledItemsService } from '../common/disabled-items/disabled-items.service';
|
|
22
22
|
import { Subject, merge } from 'rxjs';
|
|
23
|
-
import { isPresent, guid, getter, isUntouched, noop, inDropDown } from '../common/util';
|
|
23
|
+
import { isPresent, guid, getter, isUntouched, noop, inDropDown, getSizeClass, getRoundedClass, getFillModeClass } from '../common/util';
|
|
24
24
|
import { NavigationAction } from '../common/navigation/navigation-action';
|
|
25
25
|
import { NoDataTemplateDirective } from '../common/templates/no-data-template.directive';
|
|
26
26
|
import { PreventableEvent } from '../common/models/preventable-event';
|
|
@@ -169,6 +169,9 @@ let AutoCompleteComponent = AutoCompleteComponent_1 = class AutoCompleteComponen
|
|
|
169
169
|
this._value = "";
|
|
170
170
|
this.valueChangeSubject = new Subject();
|
|
171
171
|
this._isFocused = false;
|
|
172
|
+
this._size = 'medium';
|
|
173
|
+
this._rounded = 'medium';
|
|
174
|
+
this._fillMode = 'solid';
|
|
172
175
|
validatePackage(packageMetadata);
|
|
173
176
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
174
177
|
this.wrapper = this.hostElement.nativeElement;
|
|
@@ -353,16 +356,80 @@ let AutoCompleteComponent = AutoCompleteComponent_1 = class AutoCompleteComponen
|
|
|
353
356
|
get virtual() {
|
|
354
357
|
return this._virtualSettings;
|
|
355
358
|
}
|
|
359
|
+
/**
|
|
360
|
+
* Sets the size of the component.
|
|
361
|
+
*
|
|
362
|
+
* The possible values are:
|
|
363
|
+
* * `'small'`
|
|
364
|
+
* * `'medium'` (default)
|
|
365
|
+
* * `'large'`
|
|
366
|
+
* * `null`
|
|
367
|
+
*
|
|
368
|
+
*/
|
|
369
|
+
set size(size) {
|
|
370
|
+
this.renderer.removeClass(this.wrapper, getSizeClass('input', this.size));
|
|
371
|
+
if (size) {
|
|
372
|
+
this.renderer.addClass(this.wrapper, getSizeClass('input', size));
|
|
373
|
+
}
|
|
374
|
+
this._size = size;
|
|
375
|
+
}
|
|
376
|
+
get size() {
|
|
377
|
+
return this._size;
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* Sets the border radius of the component.
|
|
381
|
+
*
|
|
382
|
+
* The possible values are:
|
|
383
|
+
* * `'small'`
|
|
384
|
+
* * `'medium'` (default)
|
|
385
|
+
* * `'large'`
|
|
386
|
+
* * `'full'`
|
|
387
|
+
* * `null`
|
|
388
|
+
*
|
|
389
|
+
*/
|
|
390
|
+
set rounded(rounded) {
|
|
391
|
+
this.renderer.removeClass(this.wrapper, getRoundedClass(this.rounded));
|
|
392
|
+
if (rounded) {
|
|
393
|
+
this.renderer.addClass(this.wrapper, getRoundedClass(rounded));
|
|
394
|
+
}
|
|
395
|
+
this._rounded = rounded;
|
|
396
|
+
}
|
|
397
|
+
get rounded() {
|
|
398
|
+
return this._rounded;
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* Sets the fillMode of the component.
|
|
402
|
+
*
|
|
403
|
+
* The possible values are:
|
|
404
|
+
* * `'flat'`
|
|
405
|
+
* * `'solid'` (default)
|
|
406
|
+
* * `'outline'`
|
|
407
|
+
* * `null`
|
|
408
|
+
*
|
|
409
|
+
*/
|
|
410
|
+
set fillMode(fillMode) {
|
|
411
|
+
this.renderer.removeClass(this.wrapper, getFillModeClass('input', this.fillMode));
|
|
412
|
+
if (fillMode) {
|
|
413
|
+
this.renderer.addClass(this.wrapper, getFillModeClass('input', fillMode));
|
|
414
|
+
}
|
|
415
|
+
this._fillMode = fillMode;
|
|
416
|
+
}
|
|
417
|
+
get fillMode() {
|
|
418
|
+
return this._fillMode;
|
|
419
|
+
}
|
|
356
420
|
get isFocused() {
|
|
357
421
|
return this._isFocused;
|
|
358
422
|
}
|
|
359
423
|
set isFocused(isFocused) {
|
|
360
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper, "k-
|
|
424
|
+
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper, "k-focus");
|
|
361
425
|
this._isFocused = isFocused;
|
|
362
426
|
}
|
|
363
427
|
get isDisabled() {
|
|
364
428
|
return this.disabled;
|
|
365
429
|
}
|
|
430
|
+
get isLoading() {
|
|
431
|
+
return this.loading;
|
|
432
|
+
}
|
|
366
433
|
get dir() {
|
|
367
434
|
return this.direction;
|
|
368
435
|
}
|
|
@@ -375,6 +442,7 @@ let AutoCompleteComponent = AutoCompleteComponent_1 = class AutoCompleteComponen
|
|
|
375
442
|
this.setMessages();
|
|
376
443
|
});
|
|
377
444
|
this.setMessages();
|
|
445
|
+
this.setComponentClasses();
|
|
378
446
|
}
|
|
379
447
|
ngOnDestroy() {
|
|
380
448
|
this.destroyPopup();
|
|
@@ -802,6 +870,17 @@ let AutoCompleteComponent = AutoCompleteComponent_1 = class AutoCompleteComponen
|
|
|
802
870
|
});
|
|
803
871
|
});
|
|
804
872
|
}
|
|
873
|
+
setComponentClasses() {
|
|
874
|
+
if (this.size) {
|
|
875
|
+
this.renderer.addClass(this.wrapper, getSizeClass('input', this.size));
|
|
876
|
+
}
|
|
877
|
+
if (this.rounded) {
|
|
878
|
+
this.renderer.addClass(this.wrapper, getRoundedClass(this.rounded));
|
|
879
|
+
}
|
|
880
|
+
if (this.fillMode) {
|
|
881
|
+
this.renderer.addClass(this.wrapper, getFillModeClass('input', this.fillMode));
|
|
882
|
+
}
|
|
883
|
+
}
|
|
805
884
|
};
|
|
806
885
|
tslib_1.__decorate([
|
|
807
886
|
Input(),
|
|
@@ -881,6 +960,21 @@ tslib_1.__decorate([
|
|
|
881
960
|
tslib_1.__metadata("design:type", Object),
|
|
882
961
|
tslib_1.__metadata("design:paramtypes", [Object])
|
|
883
962
|
], AutoCompleteComponent.prototype, "virtual", null);
|
|
963
|
+
tslib_1.__decorate([
|
|
964
|
+
Input(),
|
|
965
|
+
tslib_1.__metadata("design:type", String),
|
|
966
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
967
|
+
], AutoCompleteComponent.prototype, "size", null);
|
|
968
|
+
tslib_1.__decorate([
|
|
969
|
+
Input(),
|
|
970
|
+
tslib_1.__metadata("design:type", String),
|
|
971
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
972
|
+
], AutoCompleteComponent.prototype, "rounded", null);
|
|
973
|
+
tslib_1.__decorate([
|
|
974
|
+
Input(),
|
|
975
|
+
tslib_1.__metadata("design:type", String),
|
|
976
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
977
|
+
], AutoCompleteComponent.prototype, "fillMode", null);
|
|
884
978
|
tslib_1.__decorate([
|
|
885
979
|
Output(),
|
|
886
980
|
tslib_1.__metadata("design:type", EventEmitter)
|
|
@@ -954,15 +1048,20 @@ tslib_1.__decorate([
|
|
|
954
1048
|
tslib_1.__metadata("design:type", ListComponent)
|
|
955
1049
|
], AutoCompleteComponent.prototype, "optionsList", void 0);
|
|
956
1050
|
tslib_1.__decorate([
|
|
957
|
-
HostBinding('class.k-widget'),
|
|
958
1051
|
HostBinding('class.k-autocomplete'),
|
|
1052
|
+
HostBinding('class.k-input'),
|
|
959
1053
|
tslib_1.__metadata("design:type", Boolean)
|
|
960
1054
|
], AutoCompleteComponent.prototype, "widgetClasses", void 0);
|
|
961
1055
|
tslib_1.__decorate([
|
|
962
|
-
HostBinding('class.k-
|
|
1056
|
+
HostBinding('class.k-disabled'),
|
|
963
1057
|
tslib_1.__metadata("design:type", Boolean),
|
|
964
1058
|
tslib_1.__metadata("design:paramtypes", [])
|
|
965
1059
|
], AutoCompleteComponent.prototype, "isDisabled", null);
|
|
1060
|
+
tslib_1.__decorate([
|
|
1061
|
+
HostBinding('class.k-loading'),
|
|
1062
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
1063
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1064
|
+
], AutoCompleteComponent.prototype, "isLoading", null);
|
|
966
1065
|
tslib_1.__decorate([
|
|
967
1066
|
HostBinding('attr.dir'),
|
|
968
1067
|
tslib_1.__metadata("design:type", Object),
|
|
@@ -1021,7 +1120,7 @@ AutoCompleteComponent = AutoCompleteComponent_1 = tslib_1.__decorate([
|
|
|
1021
1120
|
></kendo-searchbar>
|
|
1022
1121
|
<span
|
|
1023
1122
|
*ngIf="!loading && !readonly && (clearButton && text?.length)"
|
|
1024
|
-
class="k-
|
|
1123
|
+
class="k-clear-value"
|
|
1025
1124
|
[style.visibility]="clearButtonVisiblity"
|
|
1026
1125
|
[attr.title]="clearTitle"
|
|
1027
1126
|
role="button"
|
|
@@ -1029,7 +1128,8 @@ AutoCompleteComponent = AutoCompleteComponent_1 = tslib_1.__decorate([
|
|
|
1029
1128
|
(click)="clearValue($event)"
|
|
1030
1129
|
(mousedown)="$event.preventDefault()"
|
|
1031
1130
|
>
|
|
1032
|
-
|
|
1131
|
+
<span class="k-icon k-i-x"></span>
|
|
1132
|
+
</span>
|
|
1033
1133
|
<span *ngIf="loading" class="k-icon k-i-loading"></span>
|
|
1034
1134
|
<ng-template #popupTemplate>
|
|
1035
1135
|
<!--header template-->
|
|
@@ -1041,6 +1141,8 @@ AutoCompleteComponent = AutoCompleteComponent_1 = tslib_1.__decorate([
|
|
|
1041
1141
|
<!--list-->
|
|
1042
1142
|
<kendo-list
|
|
1043
1143
|
#optionsList
|
|
1144
|
+
[size]="size"
|
|
1145
|
+
[rounded]="rounded"
|
|
1044
1146
|
[id]="listBoxId"
|
|
1045
1147
|
[optionPrefix]="optionPrefix"
|
|
1046
1148
|
[data]="data"
|
|
@@ -1056,7 +1158,7 @@ AutoCompleteComponent = AutoCompleteComponent_1 = tslib_1.__decorate([
|
|
|
1056
1158
|
>
|
|
1057
1159
|
</kendo-list>
|
|
1058
1160
|
<!--no-data template-->
|
|
1059
|
-
<div class="k-
|
|
1161
|
+
<div class="k-no-data" *ngIf="data.length === 0">
|
|
1060
1162
|
<ng-template [ngIf]="noDataTemplate"
|
|
1061
1163
|
[templateContext]="{
|
|
1062
1164
|
templateRef: noDataTemplate?.templateRef
|