@progress/kendo-angular-dropdowns 12.0.0-develop.1 → 12.0.0-develop.11
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 +82 -20
- package/comboboxes/combobox.component.d.ts +76 -8
- package/comboboxes/multicolumncombobox.component.d.ts +4 -0
- package/common/action-sheet.component.d.ts +43 -0
- package/common/list.component.d.ts +2 -1
- package/common/localization/messages.d.ts +9 -1
- package/common/selection/selectable.directive.d.ts +2 -1
- package/common/shared.module.d.ts +11 -7
- package/common/util.d.ts +39 -2
- package/dropdownlist/dropdownlist.component.d.ts +78 -9
- package/dropdowntrees/dropdowntree.component.d.ts +80 -8
- package/dropdowntrees/multiselecttree.component.d.ts +90 -6
- package/esm2020/autocomplete/autocomplete.component.mjs +294 -116
- package/esm2020/comboboxes/combobox.component.mjs +251 -60
- package/esm2020/comboboxes/multicolumncombobox.component.mjs +110 -119
- package/esm2020/common/action-sheet.component.mjs +243 -0
- package/esm2020/common/list.component.mjs +11 -2
- package/esm2020/common/localization/messages.mjs +5 -1
- package/esm2020/common/selection/selectable.directive.mjs +3 -3
- package/esm2020/common/shared.module.mjs +13 -6
- package/esm2020/common/util.mjs +68 -2
- package/esm2020/dropdownlist/dropdownlist.component.mjs +245 -64
- package/esm2020/dropdowntrees/dropdowntree.component.mjs +254 -56
- package/esm2020/dropdowntrees/multiselecttree.component.mjs +291 -55
- package/esm2020/index.mjs +1 -0
- package/esm2020/multiselect/multiselect.component.mjs +320 -88
- package/esm2020/package-metadata.mjs +2 -2
- package/fesm2015/progress-kendo-angular-dropdowns.mjs +2085 -552
- package/fesm2020/progress-kendo-angular-dropdowns.mjs +2054 -545
- package/index.d.ts +2 -0
- package/multiselect/multiselect.component.d.ts +87 -10
- package/package.json +9 -8
- package/schematics/ngAdd/index.js +2 -2
|
@@ -10,7 +10,7 @@ import { merge, interval, Subscription } from 'rxjs';
|
|
|
10
10
|
import { concatMap, filter, map, skipWhile, take, takeUntil, tap } from 'rxjs/operators';
|
|
11
11
|
import { isDocumentAvailable, KendoInput, hasObservers, anyChanged, isChanged } from '@progress/kendo-angular-common';
|
|
12
12
|
import { Keys } from '@progress/kendo-angular-common';
|
|
13
|
-
import { isPresent, guid, getter, shuffleData, sameCharsOnly, matchText, isUntouched, inDropDown, getSizeClass, getRoundedClass, getFillModeClass } from '../common/util';
|
|
13
|
+
import { isPresent, guid, getter, shuffleData, sameCharsOnly, matchText, isUntouched, inDropDown, getSizeClass, getRoundedClass, getFillModeClass, isTruthy, windowSize, updateActionSheetAdaptiveAppearance, setListBoxAriaLabelLebBy, setActionSheetTitle, animationDuration } from '../common/util';
|
|
14
14
|
import { SelectionService } from '../common/selection/selection.service';
|
|
15
15
|
import { NavigationService, NavigationEvent } from '../common/navigation/navigation.service';
|
|
16
16
|
import { ItemTemplateDirective } from '../common/templates/item-template.directive';
|
|
@@ -31,7 +31,8 @@ import { DataService } from '../common/data.service';
|
|
|
31
31
|
import { FilterableComponent } from '../common/filtering/filterable-component';
|
|
32
32
|
import { ListComponent } from '../common/list.component';
|
|
33
33
|
import { normalizeVirtualizationSettings } from '../common/models/virtualization-settings';
|
|
34
|
-
import { caretAltDownIcon, searchIcon } from '@progress/kendo-svg-icons';
|
|
34
|
+
import { caretAltDownIcon, searchIcon, xIcon } from '@progress/kendo-svg-icons';
|
|
35
|
+
import { ResponsiveRendererComponent } from '../common/action-sheet.component';
|
|
35
36
|
import * as i0 from "@angular/core";
|
|
36
37
|
import * as i1 from "@progress/kendo-angular-l10n";
|
|
37
38
|
import * as i2 from "@progress/kendo-angular-popup";
|
|
@@ -40,14 +41,15 @@ import * as i4 from "../common/navigation/navigation.service";
|
|
|
40
41
|
import * as i5 from "../common/disabled-items/disabled-items.service";
|
|
41
42
|
import * as i6 from "../common/data.service";
|
|
42
43
|
import * as i7 from "@progress/kendo-angular-icons";
|
|
43
|
-
import * as i8 from "
|
|
44
|
-
import * as i9 from "
|
|
45
|
-
import * as i10 from "../common/
|
|
46
|
-
import * as i11 from "
|
|
47
|
-
import * as i12 from "
|
|
48
|
-
import * as i13 from "
|
|
49
|
-
import * as i14 from "
|
|
50
|
-
import * as i15 from "../common/
|
|
44
|
+
import * as i8 from "@progress/kendo-angular-common";
|
|
45
|
+
import * as i9 from "../common/action-sheet.component";
|
|
46
|
+
import * as i10 from "../common/list.component";
|
|
47
|
+
import * as i11 from "../common/localization/localized-messages.directive";
|
|
48
|
+
import * as i12 from "@angular/common";
|
|
49
|
+
import * as i13 from "../common/templates/template-context.directive";
|
|
50
|
+
import * as i14 from "@angular/forms";
|
|
51
|
+
import * as i15 from "../common/filter-input.directive";
|
|
52
|
+
import * as i16 from "../common/selection/selectable.directive";
|
|
51
53
|
/**
|
|
52
54
|
* @hidden
|
|
53
55
|
*/
|
|
@@ -90,6 +92,14 @@ export class DropDownListComponent {
|
|
|
90
92
|
this.cdr = cdr;
|
|
91
93
|
this.touchEnabled = touchEnabled;
|
|
92
94
|
this.injector = injector;
|
|
95
|
+
/**
|
|
96
|
+
* @hidden
|
|
97
|
+
*/
|
|
98
|
+
this.animationDuration = animationDuration;
|
|
99
|
+
/**
|
|
100
|
+
* @hidden
|
|
101
|
+
*/
|
|
102
|
+
this.xIcon = xIcon;
|
|
93
103
|
/**
|
|
94
104
|
* @hidden
|
|
95
105
|
*/
|
|
@@ -100,12 +110,24 @@ export class DropDownListComponent {
|
|
|
100
110
|
this.caretAltDownIcon = caretAltDownIcon;
|
|
101
111
|
this.listBoxId = `k-${guid()}`;
|
|
102
112
|
/**
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
* > The `listHeight` property affects only the list of options and not the whole popup container.
|
|
106
|
-
* > To set the height of the popup container, use `popupSettings.height`.
|
|
113
|
+
* Enables or disables the adaptive mode. By default the adaptive rendering is disabled.
|
|
107
114
|
*/
|
|
108
|
-
this.
|
|
115
|
+
this.adaptiveMode = 'none';
|
|
116
|
+
/**
|
|
117
|
+
* Sets the title of the ActionSheet that is rendered instead of the Popup when using small screen devices.
|
|
118
|
+
* By default the ActionSheet title uses the text provided for the label of the AutoComplete.
|
|
119
|
+
*/
|
|
120
|
+
this.title = '';
|
|
121
|
+
/**
|
|
122
|
+
* Sets the subtitle of the ActionSheet that is rendered instead of the Popup when using small screen devices.
|
|
123
|
+
* By default the ActionSheet subtitle uses the text provided for the `placeholder` of the AutoComplete.
|
|
124
|
+
*/
|
|
125
|
+
this.subtitle = '';
|
|
126
|
+
/**
|
|
127
|
+
* @hidden
|
|
128
|
+
*/
|
|
129
|
+
this.windowSize = 'large';
|
|
130
|
+
this._listHeight = 200;
|
|
109
131
|
/**
|
|
110
132
|
* Sets the read-only state of the component.
|
|
111
133
|
*/
|
|
@@ -205,6 +227,18 @@ export class DropDownListComponent {
|
|
|
205
227
|
this.subscribeFocusEvents();
|
|
206
228
|
this.popupMouseDownHandler = this.onMouseDown.bind(this);
|
|
207
229
|
}
|
|
230
|
+
/**
|
|
231
|
+
* @hidden
|
|
232
|
+
*/
|
|
233
|
+
get actionSheet() {
|
|
234
|
+
return this.responsiveRendererComponent?.actionSheet;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* @hidden
|
|
238
|
+
*/
|
|
239
|
+
get actionSheetSearchBar() {
|
|
240
|
+
return this.responsiveRendererComponent?.actionSheetSearchBar;
|
|
241
|
+
}
|
|
208
242
|
get width() {
|
|
209
243
|
const wrapperWidth = isDocumentAvailable() ? this.wrapper.nativeElement.offsetWidth : 0;
|
|
210
244
|
const width = this.popupSettings.width || wrapperWidth;
|
|
@@ -246,6 +280,14 @@ export class DropDownListComponent {
|
|
|
246
280
|
}
|
|
247
281
|
return appendTo === 'component' ? this.container : appendTo;
|
|
248
282
|
}
|
|
283
|
+
/**
|
|
284
|
+
* @hidden
|
|
285
|
+
*/
|
|
286
|
+
onFilterChange(text) {
|
|
287
|
+
if (this.filterable) {
|
|
288
|
+
this.filterChange.emit(text);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
249
291
|
/**
|
|
250
292
|
* @hidden
|
|
251
293
|
*/
|
|
@@ -293,6 +335,25 @@ export class DropDownListComponent {
|
|
|
293
335
|
get value() {
|
|
294
336
|
return this._value;
|
|
295
337
|
}
|
|
338
|
+
/**
|
|
339
|
+
* @hidden
|
|
340
|
+
*/
|
|
341
|
+
get isAdaptiveModeEnabled() {
|
|
342
|
+
return this.adaptiveMode === 'auto';
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* @hidden
|
|
346
|
+
*/
|
|
347
|
+
get isActionSheetExpanded() {
|
|
348
|
+
return this.actionSheet?.expanded;
|
|
349
|
+
}
|
|
350
|
+
;
|
|
351
|
+
/**
|
|
352
|
+
* @hidden
|
|
353
|
+
*/
|
|
354
|
+
get isAdaptive() {
|
|
355
|
+
return this.isAdaptiveModeEnabled && this.windowSize !== 'large';
|
|
356
|
+
}
|
|
296
357
|
/**
|
|
297
358
|
* Configures the popup of the DropDownList.
|
|
298
359
|
*
|
|
@@ -309,6 +370,24 @@ export class DropDownListComponent {
|
|
|
309
370
|
get popupSettings() {
|
|
310
371
|
return this._popupSettings;
|
|
311
372
|
}
|
|
373
|
+
/**
|
|
374
|
+
* Sets the height of the options list in the popup. By default, `listHeight` is 200px.
|
|
375
|
+
*
|
|
376
|
+
* > The `listHeight` property affects only the list of options and not the whole popup container.
|
|
377
|
+
* > To set the height of the popup container, use `popupSettings.height`.
|
|
378
|
+
*
|
|
379
|
+
* > When using `adaptiveMode` and the screen size is `small` or `medium` the `listHeight` property is set to null.
|
|
380
|
+
*/
|
|
381
|
+
set listHeight(_listHeight) {
|
|
382
|
+
this._listHeight = _listHeight;
|
|
383
|
+
}
|
|
384
|
+
;
|
|
385
|
+
get listHeight() {
|
|
386
|
+
if (this.isAdaptive) {
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
389
|
+
return this._listHeight;
|
|
390
|
+
}
|
|
312
391
|
/**
|
|
313
392
|
* Defines a Boolean function that is executed for each data item in the component
|
|
314
393
|
* ([see examples]({% slug disableditems_ddl %})). Determines whether the item will be disabled.
|
|
@@ -453,7 +532,13 @@ export class DropDownListComponent {
|
|
|
453
532
|
* @hidden
|
|
454
533
|
*/
|
|
455
534
|
onResize() {
|
|
456
|
-
if (this.
|
|
535
|
+
if (this.isAdaptiveModeEnabled && this.windowSize !== windowSize()) {
|
|
536
|
+
if (this.isOpen) {
|
|
537
|
+
this.togglePopup(false);
|
|
538
|
+
}
|
|
539
|
+
this.windowSize = windowSize();
|
|
540
|
+
}
|
|
541
|
+
if (this.isOpen && !this.isActionSheetExpanded) {
|
|
457
542
|
const popupWrapper = this.popupRef.popupElement;
|
|
458
543
|
const { min, max } = this.width;
|
|
459
544
|
popupWrapper.style.minWidth = min;
|
|
@@ -496,7 +581,10 @@ export class DropDownListComponent {
|
|
|
496
581
|
/**
|
|
497
582
|
* @hidden
|
|
498
583
|
*/
|
|
499
|
-
keydown(event) {
|
|
584
|
+
keydown(event, input) {
|
|
585
|
+
if (input) {
|
|
586
|
+
event.stopPropagation();
|
|
587
|
+
}
|
|
500
588
|
const firstIndex = isPresent(this.defaultItem) ? -1 : 0;
|
|
501
589
|
const focused = isNaN(this.selectionService.focused) ? this.firstFocusableIndex(firstIndex) : this.selectionService.focused;
|
|
502
590
|
let offset = 0;
|
|
@@ -538,6 +626,9 @@ export class DropDownListComponent {
|
|
|
538
626
|
) {
|
|
539
627
|
eventData.preventDefault();
|
|
540
628
|
}
|
|
629
|
+
if (action === NavigationAction.Tab && this.isActionSheetExpanded) {
|
|
630
|
+
this.togglePopup(false);
|
|
631
|
+
}
|
|
541
632
|
}
|
|
542
633
|
/**
|
|
543
634
|
* @hidden
|
|
@@ -551,10 +642,11 @@ export class DropDownListComponent {
|
|
|
551
642
|
/**
|
|
552
643
|
* @hidden
|
|
553
644
|
*/
|
|
554
|
-
click(
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
645
|
+
click() {
|
|
646
|
+
if (!this.isActionSheetExpanded) {
|
|
647
|
+
this.focus();
|
|
648
|
+
this.togglePopup(!this.isOpen);
|
|
649
|
+
}
|
|
558
650
|
}
|
|
559
651
|
set isFocused(isFocused) {
|
|
560
652
|
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-focus');
|
|
@@ -573,6 +665,10 @@ export class DropDownListComponent {
|
|
|
573
665
|
this.assignAriaDescribedBy();
|
|
574
666
|
this.setComponentClasses();
|
|
575
667
|
}
|
|
668
|
+
ngAfterViewInit() {
|
|
669
|
+
this.windowSize = windowSize();
|
|
670
|
+
this.renderer.setAttribute(this.actionSheet?.element.nativeElement, 'style', '--kendo-actionsheet-height: 60vh; --kendo-actionsheet-max-height: none');
|
|
671
|
+
}
|
|
576
672
|
/**
|
|
577
673
|
* @hidden
|
|
578
674
|
* Used by the TextBoxContainer to determine if the component is empty.
|
|
@@ -660,7 +756,7 @@ export class DropDownListComponent {
|
|
|
660
756
|
}
|
|
661
757
|
}
|
|
662
758
|
/**
|
|
663
|
-
* Toggles the visibility of the popup
|
|
759
|
+
* Toggles the visibility of the popup or actionSheet
|
|
664
760
|
* ([see example]({% slug openstate_ddl %}#toc-setting-the-initially-opened-component)).
|
|
665
761
|
* If you use the `toggle` method to open or close the popup, the `open` and `close` events will not be fired.
|
|
666
762
|
*
|
|
@@ -677,6 +773,9 @@ export class DropDownListComponent {
|
|
|
677
773
|
_toggle(open) {
|
|
678
774
|
this._open = open;
|
|
679
775
|
this.destroyPopup();
|
|
776
|
+
if (this.isActionSheetExpanded) {
|
|
777
|
+
this.closeActionSheet();
|
|
778
|
+
}
|
|
680
779
|
if (this._open) {
|
|
681
780
|
this.createPopup();
|
|
682
781
|
}
|
|
@@ -709,10 +808,10 @@ export class DropDownListComponent {
|
|
|
709
808
|
}
|
|
710
809
|
}
|
|
711
810
|
/**
|
|
712
|
-
* Returns the current open state
|
|
811
|
+
* Returns the current open state. Returns `true` if the popup or actionSheet is open.
|
|
713
812
|
*/
|
|
714
813
|
get isOpen() {
|
|
715
|
-
return this._open;
|
|
814
|
+
return isTruthy(this._open || this.isActionSheetExpanded);
|
|
716
815
|
}
|
|
717
816
|
/**
|
|
718
817
|
* Resets the value of the DropDownList.
|
|
@@ -808,6 +907,11 @@ export class DropDownListComponent {
|
|
|
808
907
|
if (this.virtual) {
|
|
809
908
|
this.virtual.skip = 0;
|
|
810
909
|
}
|
|
910
|
+
this.windowSize = windowSize();
|
|
911
|
+
if (this.isAdaptive) {
|
|
912
|
+
this.openActionSheet();
|
|
913
|
+
return;
|
|
914
|
+
}
|
|
811
915
|
const horizontalAlign = this.direction === "rtl" ? "right" : "left";
|
|
812
916
|
const anchorPosition = { horizontal: horizontalAlign, vertical: "bottom" };
|
|
813
917
|
const popupPosition = { horizontal: horizontalAlign, vertical: "top" };
|
|
@@ -839,7 +943,9 @@ export class DropDownListComponent {
|
|
|
839
943
|
}
|
|
840
944
|
this.subs.add(this.popupRef.popupOpen.subscribe(() => {
|
|
841
945
|
this.cdr.detectChanges();
|
|
946
|
+
setListBoxAriaLabelLebBy(this.optionsList, this.wrapper, this.renderer);
|
|
842
947
|
this.optionsList.scrollToItem(this.selectionService.focused);
|
|
948
|
+
this.selectionService.focus(this.selectionService.focused);
|
|
843
949
|
this.opened.emit();
|
|
844
950
|
}));
|
|
845
951
|
this.subs.add(this.popupRef.popupClose.subscribe(() => {
|
|
@@ -1048,26 +1154,28 @@ export class DropDownListComponent {
|
|
|
1048
1154
|
}
|
|
1049
1155
|
}
|
|
1050
1156
|
componentBlur() {
|
|
1051
|
-
this.
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1157
|
+
if (!this.isActionSheetExpanded) {
|
|
1158
|
+
this.isFocused = false;
|
|
1159
|
+
const selectionPresent = isPresent(this.selectionService.selected[0]);
|
|
1160
|
+
const valueHasChanged = selectionPresent && getter(this.value, this.valueField) !== getter(this.dataService.itemAt(this.selectionService.selected[0]), this.valueField);
|
|
1161
|
+
if (valueHasChanged ||
|
|
1162
|
+
hasObservers(this.close) ||
|
|
1163
|
+
hasObservers(this.onBlur) ||
|
|
1164
|
+
hasObservers(this.filterChange) ||
|
|
1165
|
+
isUntouched(this.wrapper.nativeElement)) {
|
|
1166
|
+
this._zone.run(() => {
|
|
1167
|
+
if (valueHasChanged) {
|
|
1168
|
+
this.selectionService.change(this.selectionService.selected[0]);
|
|
1169
|
+
}
|
|
1170
|
+
this.togglePopup(false);
|
|
1171
|
+
this.clearFilter();
|
|
1172
|
+
this.onBlur.emit();
|
|
1173
|
+
this.onTouchedCallback();
|
|
1174
|
+
});
|
|
1175
|
+
}
|
|
1176
|
+
else {
|
|
1063
1177
|
this.togglePopup(false);
|
|
1064
|
-
|
|
1065
|
-
this.onBlur.emit();
|
|
1066
|
-
this.onTouchedCallback();
|
|
1067
|
-
});
|
|
1068
|
-
}
|
|
1069
|
-
else {
|
|
1070
|
-
this.togglePopup(false);
|
|
1178
|
+
}
|
|
1071
1179
|
}
|
|
1072
1180
|
}
|
|
1073
1181
|
/**
|
|
@@ -1212,6 +1320,15 @@ export class DropDownListComponent {
|
|
|
1212
1320
|
handleFilter(event) {
|
|
1213
1321
|
this.filterChange.emit(event.target.value);
|
|
1214
1322
|
}
|
|
1323
|
+
/**
|
|
1324
|
+
* @hidden
|
|
1325
|
+
*/
|
|
1326
|
+
handleClick() {
|
|
1327
|
+
this.windowSize = windowSize();
|
|
1328
|
+
if (this.isAdaptive) {
|
|
1329
|
+
this.togglePopup(true);
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1215
1332
|
/**
|
|
1216
1333
|
* @hidden
|
|
1217
1334
|
*/
|
|
@@ -1239,9 +1356,32 @@ export class DropDownListComponent {
|
|
|
1239
1356
|
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('picker', this.fillMode));
|
|
1240
1357
|
}
|
|
1241
1358
|
}
|
|
1359
|
+
closeActionSheet() {
|
|
1360
|
+
this.actionSheet.toggle(false);
|
|
1361
|
+
if (this.filterable) {
|
|
1362
|
+
this.actionSheetSearchBar.value = '';
|
|
1363
|
+
this.filterChange.emit('');
|
|
1364
|
+
}
|
|
1365
|
+
this.closed.emit();
|
|
1366
|
+
}
|
|
1367
|
+
openActionSheet() {
|
|
1368
|
+
this.windowSize = windowSize();
|
|
1369
|
+
this.actionSheet.toggle(true);
|
|
1370
|
+
this.cdr.detectChanges();
|
|
1371
|
+
setListBoxAriaLabelLebBy(this.optionsList, this.wrapper, this.renderer);
|
|
1372
|
+
this.title = setActionSheetTitle(this.wrapper, this.title);
|
|
1373
|
+
updateActionSheetAdaptiveAppearance(this.actionSheet, this.windowSize, this.renderer);
|
|
1374
|
+
this.cdr.detectChanges();
|
|
1375
|
+
this.opened.emit();
|
|
1376
|
+
this.optionsList.scrollToItem(this.selectionService.focused);
|
|
1377
|
+
this.selectionService.focus(this.selectionService.focused);
|
|
1378
|
+
if (this.filterable) {
|
|
1379
|
+
this.actionSheetSearchBar.focus();
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1242
1382
|
}
|
|
1243
1383
|
DropDownListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DropDownListComponent, deps: [{ token: i0.ElementRef }, { token: i1.LocalizationService }, { token: i2.PopupService }, { token: i3.SelectionService }, { token: i4.NavigationService }, { token: i5.DisabledItemsService }, { token: i6.DataService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: TOUCH_ENABLED, optional: true }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
1244
|
-
DropDownListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: DropDownListComponent, selector: "kendo-dropdownlist", inputs: { iconClass: "iconClass", loading: "loading", data: "data", value: "value", textField: "textField", valueField: "valueField", popupSettings: "popupSettings", listHeight: "listHeight", defaultItem: "defaultItem", disabled: "disabled", itemDisabled: "itemDisabled", readonly: "readonly", filterable: "filterable", virtual: "virtual", ignoreCase: "ignoreCase", delay: "delay", valuePrimitive: "valuePrimitive", tabindex: "tabindex", tabIndex: "tabIndex", size: "size", rounded: "rounded", fillMode: "fillMode", focusableId: ["id", "focusableId"] }, outputs: { valueChange: "valueChange", filterChange: "filterChange", selectionChange: "selectionChange", open: "open", opened: "opened", close: "close", closed: "closed", onFocus: "focus", onBlur: "blur" }, host: { listeners: { "keydown": "keydown($event)", "keypress": "keypress($event)", "click": "click(
|
|
1384
|
+
DropDownListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: DropDownListComponent, selector: "kendo-dropdownlist", inputs: { iconClass: "iconClass", loading: "loading", data: "data", value: "value", textField: "textField", valueField: "valueField", adaptiveMode: "adaptiveMode", title: "title", subtitle: "subtitle", popupSettings: "popupSettings", listHeight: "listHeight", defaultItem: "defaultItem", disabled: "disabled", itemDisabled: "itemDisabled", readonly: "readonly", filterable: "filterable", virtual: "virtual", ignoreCase: "ignoreCase", delay: "delay", valuePrimitive: "valuePrimitive", tabindex: "tabindex", tabIndex: "tabIndex", size: "size", rounded: "rounded", fillMode: "fillMode", focusableId: ["id", "focusableId"] }, outputs: { valueChange: "valueChange", filterChange: "filterChange", selectionChange: "selectionChange", open: "open", opened: "opened", close: "close", closed: "closed", onFocus: "focus", onBlur: "blur" }, host: { listeners: { "keydown": "keydown($event)", "keypress": "keypress($event)", "click": "click()" }, properties: { "attr.aria-controls": "this.ariaControls", "class.k-dropdownlist": "this.hostClasses", "class.k-picker": "this.hostClasses", "class.k-disabled": "this.isDisabledClass", "attr.disabled": "this.isDisabledAttribute", "class.k-loading": "this.isLoading", "attr.id": "this.focusableId", "attr.dir": "this.dir", "attr.tabindex": "this.hostTabIndex", "attr.readonly": "this.readonlyAttr", "attr.aria-busy": "this.isBusy", "attr.role": "this.role", "attr.aria-haspopup": "this.haspopup", "attr.aria-expanded": "this.isAriaExpanded", "attr.aria-invalid": "this.hostAriaInvalid", "attr.aria-activedescendant": "this.hostAriaActivedescendant" } }, providers: [
|
|
1245
1385
|
DROPDOWNLIST_VALUE_ACCESSOR,
|
|
1246
1386
|
DataService,
|
|
1247
1387
|
SelectionService,
|
|
@@ -1258,7 +1398,7 @@ DropDownListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
1258
1398
|
{
|
|
1259
1399
|
provide: KendoInput, useExisting: forwardRef(() => DropDownListComponent)
|
|
1260
1400
|
}
|
|
1261
|
-
], queries: [{ propertyName: "itemTemplate", first: true, predicate: ItemTemplateDirective, descendants: true }, { propertyName: "groupTemplate", first: true, predicate: GroupTemplateDirective, descendants: true }, { propertyName: "fixedGroupTemplate", first: true, predicate: FixedGroupTemplateDirective, descendants: true }, { propertyName: "valueTemplate", first: true, predicate: ValueTemplateDirective, descendants: true }, { propertyName: "headerTemplate", first: true, predicate: HeaderTemplateDirective, descendants: true }, { propertyName: "footerTemplate", first: true, predicate: FooterTemplateDirective, descendants: true }, { propertyName: "noDataTemplate", first: true, predicate: NoDataTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "optionsList", first: true, predicate: ["optionsList"], descendants: true }], exportAs: ["kendoDropDownList"], usesOnChanges: true, ngImport: i0, template: `
|
|
1401
|
+
], queries: [{ propertyName: "itemTemplate", first: true, predicate: ItemTemplateDirective, descendants: true }, { propertyName: "groupTemplate", first: true, predicate: GroupTemplateDirective, descendants: true }, { propertyName: "fixedGroupTemplate", first: true, predicate: FixedGroupTemplateDirective, descendants: true }, { propertyName: "valueTemplate", first: true, predicate: ValueTemplateDirective, descendants: true }, { propertyName: "headerTemplate", first: true, predicate: HeaderTemplateDirective, descendants: true }, { propertyName: "footerTemplate", first: true, predicate: FooterTemplateDirective, descendants: true }, { propertyName: "noDataTemplate", first: true, predicate: NoDataTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "responsiveRendererComponent", first: true, predicate: ResponsiveRendererComponent, descendants: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "optionsList", first: true, predicate: ["optionsList"], descendants: true }], exportAs: ["kendoDropDownList"], usesOnChanges: true, ngImport: i0, template: `
|
|
1262
1402
|
<ng-container kendoDropDownListLocalizedMessages
|
|
1263
1403
|
i18n-noDataText="kendo.dropdownlist.noDataText|The text displayed in the popup when there are no items"
|
|
1264
1404
|
noDataText="NO DATA FOUND"
|
|
@@ -1305,8 +1445,26 @@ DropDownListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
1305
1445
|
<span *ngIf="loading || iconClass" class="k-button-icon k-icon" [ngClass]="buttonClasses"></span>
|
|
1306
1446
|
</button>
|
|
1307
1447
|
<ng-template #popupTemplate>
|
|
1448
|
+
<ng-container *ngTemplateOutlet="sharedPopupActionSheetTemplate"></ng-container>
|
|
1449
|
+
</ng-template>
|
|
1450
|
+
<kendo-resize-sensor *ngIf="isOpen || isAdaptiveModeEnabled" (resize)="onResize()"></kendo-resize-sensor>
|
|
1451
|
+
<ng-container #container></ng-container>
|
|
1452
|
+
|
|
1453
|
+
<!--adaptive rendering-->
|
|
1454
|
+
<responsive-renderer
|
|
1455
|
+
[sharedPopupActionSheetTemplate]="sharedPopupActionSheetTemplate"
|
|
1456
|
+
[isActionSheetExpanded]="isActionSheetExpanded"
|
|
1457
|
+
[title]="title"
|
|
1458
|
+
[showTextInput]="filterable"
|
|
1459
|
+
[subtitle]="subtitle"
|
|
1460
|
+
(closePopup)="togglePopup(false)"
|
|
1461
|
+
(textInputChange)="onFilterChange($event)"
|
|
1462
|
+
>
|
|
1463
|
+
</responsive-renderer>
|
|
1464
|
+
|
|
1465
|
+
<ng-template #sharedPopupActionSheetTemplate>
|
|
1308
1466
|
<!--filterable-->
|
|
1309
|
-
<ng-template [ngIf]="filterable">
|
|
1467
|
+
<ng-template [ngIf]="filterable && !isActionSheetExpanded">
|
|
1310
1468
|
<div class="k-list-filter" (click)="$event.stopImmediatePropagation()">
|
|
1311
1469
|
<span
|
|
1312
1470
|
class="k-searchbox k-input"
|
|
@@ -1318,6 +1476,7 @@ DropDownListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
1318
1476
|
[svgIcon]="searchIcon">
|
|
1319
1477
|
</kendo-icon-wrapper>
|
|
1320
1478
|
<input
|
|
1479
|
+
#searchInput
|
|
1321
1480
|
role="searchbox"
|
|
1322
1481
|
aria-autocomplete="list"
|
|
1323
1482
|
aria-haspopup="listbox"
|
|
@@ -1329,10 +1488,11 @@ DropDownListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
1329
1488
|
[dir]="direction"
|
|
1330
1489
|
[(ngModel)]="filterText"
|
|
1331
1490
|
class="k-input-inner"
|
|
1332
|
-
(keydown)="keydown($event)"
|
|
1491
|
+
(keydown)="keydown($event, searchInput)"
|
|
1333
1492
|
(input)="handleFilter($event)"
|
|
1334
1493
|
(focus)="onFilterFocus()"
|
|
1335
|
-
(blur)="blurFilterInput()"
|
|
1494
|
+
(blur)="blurFilterInput()"
|
|
1495
|
+
(click)="handleClick()" />
|
|
1336
1496
|
</span>
|
|
1337
1497
|
</div>
|
|
1338
1498
|
</ng-template>
|
|
@@ -1368,7 +1528,7 @@ DropDownListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
1368
1528
|
templateRef: headerTemplate.templateRef
|
|
1369
1529
|
}">
|
|
1370
1530
|
</ng-template>
|
|
1371
|
-
<!--list-->
|
|
1531
|
+
<!--list-->
|
|
1372
1532
|
<kendo-list
|
|
1373
1533
|
#optionsList
|
|
1374
1534
|
[id]="listBoxId"
|
|
@@ -1405,11 +1565,7 @@ DropDownListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
1405
1565
|
}">
|
|
1406
1566
|
</ng-template>
|
|
1407
1567
|
</ng-template>
|
|
1408
|
-
|
|
1409
|
-
<kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
|
|
1410
|
-
</ng-template>
|
|
1411
|
-
<ng-container #container></ng-container>
|
|
1412
|
-
`, isInline: true, components: [{ type: i7.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }, { type: i8.ListComponent, selector: "kendo-list", inputs: ["selected", "focused", "textField", "valueField", "height", "template", "groupTemplate", "fixedGroupTemplate", "show", "id", "optionPrefix", "multipleSelection", "virtual", "type", "checkboxes", "ariaLive", "isMultiselect", "data", "size", "rounded"], outputs: ["onClick", "pageChange", "listResize"] }, { type: i9.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], directives: [{ type: i10.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: i12.TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { type: i11.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i9.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i13.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: i14.FilterInputDirective, selector: "[filterInput]", inputs: ["filterInput"] }, { type: i13.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i13.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i15.SelectableDirective, selector: "[kendoDropDownsSelectable]", inputs: ["index", "checkboxes", "height", "multipleSelection"] }] });
|
|
1568
|
+
`, isInline: true, components: [{ type: i7.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }, { type: i8.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { type: i9.ResponsiveRendererComponent, selector: "responsive-renderer", inputs: ["title", "showActionButtons", "subtitle", "size", "showTextInput", "sharedPopupActionSheetTemplate", "isActionSheetExpanded", "text", "placeholder"], outputs: ["closePopup", "textInputChange", "navigate", "onExpand", "onCollapse", "onApply", "onCancel"] }, { type: i10.ListComponent, selector: "kendo-list", inputs: ["selected", "focused", "textField", "valueField", "height", "template", "groupTemplate", "fixedGroupTemplate", "show", "id", "optionPrefix", "multipleSelection", "virtual", "type", "checkboxes", "ariaLive", "isMultiselect", "isActionSheetExpanded", "data", "size", "rounded"], outputs: ["onClick", "pageChange", "listResize"] }], directives: [{ type: i11.LocalizedMessagesDirective, selector: "\n [kendoDropDownListLocalizedMessages],\n [kendoDropDownTreeLocalizedMessages],\n [kendoComboBoxLocalizedMessages],\n [kendoMultiColumnComboBoxLocalizedMessages],\n [kendoAutoCompleteLocalizedMessages],\n [kendoMultiSelectLocalizedMessages],\n [kendoMultiSelectTreeLocalizedMessages]\n " }, { type: i12.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i13.TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { type: i12.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i8.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i12.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i14.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: i15.FilterInputDirective, selector: "[filterInput]", inputs: ["filterInput"] }, { type: i14.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i14.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i16.SelectableDirective, selector: "[kendoDropDownsSelectable]", inputs: ["index", "checkboxes", "height", "isMultiselect", "multipleSelection"] }] });
|
|
1413
1569
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DropDownListComponent, decorators: [{
|
|
1414
1570
|
type: Component,
|
|
1415
1571
|
args: [{
|
|
@@ -1480,8 +1636,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1480
1636
|
<span *ngIf="loading || iconClass" class="k-button-icon k-icon" [ngClass]="buttonClasses"></span>
|
|
1481
1637
|
</button>
|
|
1482
1638
|
<ng-template #popupTemplate>
|
|
1639
|
+
<ng-container *ngTemplateOutlet="sharedPopupActionSheetTemplate"></ng-container>
|
|
1640
|
+
</ng-template>
|
|
1641
|
+
<kendo-resize-sensor *ngIf="isOpen || isAdaptiveModeEnabled" (resize)="onResize()"></kendo-resize-sensor>
|
|
1642
|
+
<ng-container #container></ng-container>
|
|
1643
|
+
|
|
1644
|
+
<!--adaptive rendering-->
|
|
1645
|
+
<responsive-renderer
|
|
1646
|
+
[sharedPopupActionSheetTemplate]="sharedPopupActionSheetTemplate"
|
|
1647
|
+
[isActionSheetExpanded]="isActionSheetExpanded"
|
|
1648
|
+
[title]="title"
|
|
1649
|
+
[showTextInput]="filterable"
|
|
1650
|
+
[subtitle]="subtitle"
|
|
1651
|
+
(closePopup)="togglePopup(false)"
|
|
1652
|
+
(textInputChange)="onFilterChange($event)"
|
|
1653
|
+
>
|
|
1654
|
+
</responsive-renderer>
|
|
1655
|
+
|
|
1656
|
+
<ng-template #sharedPopupActionSheetTemplate>
|
|
1483
1657
|
<!--filterable-->
|
|
1484
|
-
<ng-template [ngIf]="filterable">
|
|
1658
|
+
<ng-template [ngIf]="filterable && !isActionSheetExpanded">
|
|
1485
1659
|
<div class="k-list-filter" (click)="$event.stopImmediatePropagation()">
|
|
1486
1660
|
<span
|
|
1487
1661
|
class="k-searchbox k-input"
|
|
@@ -1493,6 +1667,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1493
1667
|
[svgIcon]="searchIcon">
|
|
1494
1668
|
</kendo-icon-wrapper>
|
|
1495
1669
|
<input
|
|
1670
|
+
#searchInput
|
|
1496
1671
|
role="searchbox"
|
|
1497
1672
|
aria-autocomplete="list"
|
|
1498
1673
|
aria-haspopup="listbox"
|
|
@@ -1504,10 +1679,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1504
1679
|
[dir]="direction"
|
|
1505
1680
|
[(ngModel)]="filterText"
|
|
1506
1681
|
class="k-input-inner"
|
|
1507
|
-
(keydown)="keydown($event)"
|
|
1682
|
+
(keydown)="keydown($event, searchInput)"
|
|
1508
1683
|
(input)="handleFilter($event)"
|
|
1509
1684
|
(focus)="onFilterFocus()"
|
|
1510
|
-
(blur)="blurFilterInput()"
|
|
1685
|
+
(blur)="blurFilterInput()"
|
|
1686
|
+
(click)="handleClick()" />
|
|
1511
1687
|
</span>
|
|
1512
1688
|
</div>
|
|
1513
1689
|
</ng-template>
|
|
@@ -1543,7 +1719,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1543
1719
|
templateRef: headerTemplate.templateRef
|
|
1544
1720
|
}">
|
|
1545
1721
|
</ng-template>
|
|
1546
|
-
<!--list-->
|
|
1722
|
+
<!--list-->
|
|
1547
1723
|
<kendo-list
|
|
1548
1724
|
#optionsList
|
|
1549
1725
|
[id]="listBoxId"
|
|
@@ -1580,10 +1756,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1580
1756
|
}">
|
|
1581
1757
|
</ng-template>
|
|
1582
1758
|
</ng-template>
|
|
1583
|
-
<ng-template [ngIf]="isOpen">
|
|
1584
|
-
<kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
|
|
1585
|
-
</ng-template>
|
|
1586
|
-
<ng-container #container></ng-container>
|
|
1587
1759
|
`
|
|
1588
1760
|
}]
|
|
1589
1761
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.LocalizationService }, { type: i2.PopupService }, { type: i3.SelectionService }, { type: i4.NavigationService }, { type: i5.DisabledItemsService }, { type: i6.DataService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
|
|
@@ -1591,7 +1763,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1591
1763
|
}, {
|
|
1592
1764
|
type: Inject,
|
|
1593
1765
|
args: [TOUCH_ENABLED]
|
|
1594
|
-
}] }, { type: i0.Injector }]; }, propDecorators: {
|
|
1766
|
+
}] }, { type: i0.Injector }]; }, propDecorators: { responsiveRendererComponent: [{
|
|
1767
|
+
type: ViewChild,
|
|
1768
|
+
args: [ResponsiveRendererComponent]
|
|
1769
|
+
}], ariaControls: [{
|
|
1595
1770
|
type: HostBinding,
|
|
1596
1771
|
args: ['attr.aria-controls']
|
|
1597
1772
|
}], iconClass: [{
|
|
@@ -1606,6 +1781,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1606
1781
|
type: Input
|
|
1607
1782
|
}], valueField: [{
|
|
1608
1783
|
type: Input
|
|
1784
|
+
}], adaptiveMode: [{
|
|
1785
|
+
type: Input
|
|
1786
|
+
}], title: [{
|
|
1787
|
+
type: Input
|
|
1788
|
+
}], subtitle: [{
|
|
1789
|
+
type: Input
|
|
1609
1790
|
}], popupSettings: [{
|
|
1610
1791
|
type: Input
|
|
1611
1792
|
}], listHeight: [{
|
|
@@ -1748,5 +1929,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1748
1929
|
args: ['keypress', ['$event']]
|
|
1749
1930
|
}], click: [{
|
|
1750
1931
|
type: HostListener,
|
|
1751
|
-
args: ['click'
|
|
1932
|
+
args: ['click']
|
|
1752
1933
|
}] } });
|