@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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { ChangeDetectionStrategy, Component, ElementRef, EventEmitter, HostBinding, Input, Output, NgZone, Renderer2, TemplateRef, ViewChild, ChangeDetectorRef, ContentChild, forwardRef, ViewContainerRef, isDevMode, Optional, Inject, Injector } from '@angular/core';
|
|
6
|
-
import { anyChanged, guid, hasObservers, isDocumentAvailable, KendoInput } from '@progress/kendo-angular-common';
|
|
6
|
+
import { anyChanged, guid, hasObservers, isDocumentAvailable, KendoInput, Keys } from '@progress/kendo-angular-common';
|
|
7
7
|
import { PopupService } from '@progress/kendo-angular-popup';
|
|
8
8
|
import { TreeViewComponent, DataBoundComponent, ExpandableComponent } from '@progress/kendo-angular-treeview';
|
|
9
9
|
import { getter } from '@progress/kendo-common';
|
|
@@ -14,7 +14,7 @@ import { NavigationService } from '../common/navigation/navigation.service';
|
|
|
14
14
|
import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
|
|
15
15
|
import { SelectionService } from '../common/selection/selection.service';
|
|
16
16
|
import { PreventableEvent } from '../common/models/preventable-event';
|
|
17
|
-
import { getFillModeClass, getRoundedClass, getSearchableItems, getSizeClass, inDropDown, isArray, isLetter, isPresent, isUntouched, noop } from '../common/util';
|
|
17
|
+
import { animationDuration, getFillModeClass, getRoundedClass, getSearchableItems, getSizeClass, inDropDown, isArray, isLetter, isPresent, isTruthy, isUntouched, noop, setActionSheetTitle, updateActionSheetAdaptiveAppearance, windowSize } from '../common/util';
|
|
18
18
|
import { NoDataTemplateDirective } from '../common/templates/no-data-template.directive';
|
|
19
19
|
import { of, Subject, Subscription } from 'rxjs';
|
|
20
20
|
import { debounceTime, tap } from 'rxjs/operators';
|
|
@@ -25,18 +25,20 @@ import { DropDownTreeMessages } from '../common/constants/error-messages';
|
|
|
25
25
|
import { TOUCH_ENABLED } from '../common/constants/touch-enabled';
|
|
26
26
|
import { ValueTemplateDirective } from '../common/templates/value-template.directive';
|
|
27
27
|
import { caretAltDownIcon, searchIcon, xIcon } from '@progress/kendo-svg-icons';
|
|
28
|
+
import { ResponsiveRendererComponent } from '../common/action-sheet.component';
|
|
28
29
|
import * as i0 from "@angular/core";
|
|
29
30
|
import * as i1 from "@progress/kendo-angular-popup";
|
|
30
31
|
import * as i2 from "../common/navigation/navigation.service";
|
|
31
32
|
import * as i3 from "@progress/kendo-angular-l10n";
|
|
32
33
|
import * as i4 from "@progress/kendo-angular-icons";
|
|
33
|
-
import * as i5 from "
|
|
34
|
-
import * as i6 from "
|
|
35
|
-
import * as i7 from "@angular
|
|
36
|
-
import * as i8 from "../common/
|
|
37
|
-
import * as i9 from "@angular/
|
|
38
|
-
import * as i10 from "../common/
|
|
39
|
-
import * as i11 from "@
|
|
34
|
+
import * as i5 from "../common/action-sheet.component";
|
|
35
|
+
import * as i6 from "@progress/kendo-angular-treeview";
|
|
36
|
+
import * as i7 from "@progress/kendo-angular-common";
|
|
37
|
+
import * as i8 from "../common/localization/localized-messages.directive";
|
|
38
|
+
import * as i9 from "@angular/common";
|
|
39
|
+
import * as i10 from "../common/templates/template-context.directive";
|
|
40
|
+
import * as i11 from "@angular/forms";
|
|
41
|
+
import * as i12 from "../common/filter-input.directive";
|
|
40
42
|
const DEFAULT_POPUP_SETTINGS = { animate: true };
|
|
41
43
|
const hasChildren = () => false;
|
|
42
44
|
const fetchChildren = () => of([]);
|
|
@@ -59,6 +61,10 @@ export class DropDownTreeComponent {
|
|
|
59
61
|
this.cdr = cdr;
|
|
60
62
|
this.localization = localization;
|
|
61
63
|
this.touchEnabled = touchEnabled;
|
|
64
|
+
/**
|
|
65
|
+
* @hidden
|
|
66
|
+
*/
|
|
67
|
+
this.animationDuration = animationDuration;
|
|
62
68
|
/**
|
|
63
69
|
* @hidden
|
|
64
70
|
*/
|
|
@@ -136,13 +142,7 @@ export class DropDownTreeComponent {
|
|
|
136
142
|
* The hint which is displayed when the component is empty.
|
|
137
143
|
*/
|
|
138
144
|
this.placeholder = "";
|
|
139
|
-
|
|
140
|
-
* Sets the height of the options list. By default, `listHeight` is 200px.
|
|
141
|
-
*
|
|
142
|
-
* > The `listHeight` property affects only the list of options and not the whole popup container.
|
|
143
|
-
* > To set the height of the popup container, use `popupSettings.height`.
|
|
144
|
-
*/
|
|
145
|
-
this.listHeight = 200;
|
|
145
|
+
this._listHeight = 200;
|
|
146
146
|
/**
|
|
147
147
|
* Sets the disabled state of the component.
|
|
148
148
|
*/
|
|
@@ -191,6 +191,28 @@ export class DropDownTreeComponent {
|
|
|
191
191
|
* @hidden
|
|
192
192
|
*/
|
|
193
193
|
this.selectedKeys = [];
|
|
194
|
+
/**
|
|
195
|
+
* Enables or disables the adaptive mode. By default the adaptive rendering is disabled.
|
|
196
|
+
*/
|
|
197
|
+
this.adaptiveMode = 'none';
|
|
198
|
+
/**
|
|
199
|
+
* Sets the title of the ActionSheet that is rendered instead of the Popup when using small screen devices.
|
|
200
|
+
* By default the ActionSheet title uses the text provided for the label of the AutoComplete.
|
|
201
|
+
*/
|
|
202
|
+
this.title = '';
|
|
203
|
+
/**
|
|
204
|
+
* Sets the subtitle of the ActionSheet that is rendered instead of the Popup when using small screen devices.
|
|
205
|
+
* By default the ActionSheet subtitle uses the text provided for the `placeholder` of the AutoComplete.
|
|
206
|
+
*/
|
|
207
|
+
this.subtitle = '';
|
|
208
|
+
/**
|
|
209
|
+
* @hidden
|
|
210
|
+
*/
|
|
211
|
+
this.windowSize = 'large';
|
|
212
|
+
/**
|
|
213
|
+
* @hidden
|
|
214
|
+
*/
|
|
215
|
+
this.isActionSheetExpanded = false;
|
|
194
216
|
/**
|
|
195
217
|
* @hidden
|
|
196
218
|
*/
|
|
@@ -223,6 +245,21 @@ export class DropDownTreeComponent {
|
|
|
223
245
|
this.subscribeTouchEvents();
|
|
224
246
|
this.subscribeFocusEvents();
|
|
225
247
|
}
|
|
248
|
+
/**
|
|
249
|
+
* @hidden
|
|
250
|
+
*/
|
|
251
|
+
get actionSheet() {
|
|
252
|
+
return this.responsiveRendererComponent?.actionSheet;
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* @hidden
|
|
256
|
+
*/
|
|
257
|
+
get actionSheetSearchBar() {
|
|
258
|
+
return this.responsiveRendererComponent?.actionSheetSearchBar;
|
|
259
|
+
}
|
|
260
|
+
get isReadonly() {
|
|
261
|
+
return this.readonly ? '' : null;
|
|
262
|
+
}
|
|
226
263
|
get hostAriaInvalid() {
|
|
227
264
|
return this.formControl ? this.formControl.invalid.toString() : null;
|
|
228
265
|
}
|
|
@@ -253,9 +290,6 @@ export class DropDownTreeComponent {
|
|
|
253
290
|
get hostAriaAutocomplete() {
|
|
254
291
|
return this.filterable ? 'list' : null;
|
|
255
292
|
}
|
|
256
|
-
get isReadonly() {
|
|
257
|
-
return this.readonly ? '' : null;
|
|
258
|
-
}
|
|
259
293
|
set treeview(treeview) {
|
|
260
294
|
if (treeview) {
|
|
261
295
|
if (this.isFocused && !this.filterable || this.touchEnabled) {
|
|
@@ -322,6 +356,24 @@ export class DropDownTreeComponent {
|
|
|
322
356
|
get dataItem() {
|
|
323
357
|
return this._dataItem ? this._dataItem : this.value;
|
|
324
358
|
}
|
|
359
|
+
/**
|
|
360
|
+
* Sets the height of the options list in the popup. By default, `listHeight` is 200px.
|
|
361
|
+
*
|
|
362
|
+
* > The `listHeight` property affects only the list of options and not the whole popup container.
|
|
363
|
+
* > To set the height of the popup container, use `popupSettings.height`.
|
|
364
|
+
*
|
|
365
|
+
* > When using `adaptiveMode` and the screen size is `small` or `medium` the `listHeight` property is set to null.
|
|
366
|
+
*/
|
|
367
|
+
set listHeight(_listHeight) {
|
|
368
|
+
this._listHeight = _listHeight;
|
|
369
|
+
}
|
|
370
|
+
;
|
|
371
|
+
get listHeight() {
|
|
372
|
+
if (this.isAdaptive) {
|
|
373
|
+
return;
|
|
374
|
+
}
|
|
375
|
+
return this._listHeight;
|
|
376
|
+
}
|
|
325
377
|
/**
|
|
326
378
|
* Specifies the [`tabindex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
|
|
327
379
|
*/
|
|
@@ -416,10 +468,10 @@ export class DropDownTreeComponent {
|
|
|
416
468
|
return isPresent(popupHeight) ? `${popupHeight}px` : 'auto';
|
|
417
469
|
}
|
|
418
470
|
/**
|
|
419
|
-
* Returns the current open state
|
|
471
|
+
* Returns the current open state. Returns `true` if the popup or actionSheet is open.
|
|
420
472
|
*/
|
|
421
473
|
get isOpen() {
|
|
422
|
-
return isPresent(this.popupRef);
|
|
474
|
+
return isTruthy(isPresent(this.popupRef) || this.isActionSheetExpanded);
|
|
423
475
|
}
|
|
424
476
|
get clearButtonVisiblity() {
|
|
425
477
|
if (this.touchEnabled) {
|
|
@@ -429,6 +481,26 @@ export class DropDownTreeComponent {
|
|
|
429
481
|
get isFilterActive() {
|
|
430
482
|
return this.filterInput && document.activeElement === this.filterInput.nativeElement;
|
|
431
483
|
}
|
|
484
|
+
/**
|
|
485
|
+
* @hidden
|
|
486
|
+
*/
|
|
487
|
+
onFilterChange(text) {
|
|
488
|
+
if (this.filterable) {
|
|
489
|
+
this.filterChange.emit(text);
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* @hidden
|
|
494
|
+
*/
|
|
495
|
+
get isAdaptiveModeEnabled() {
|
|
496
|
+
return this.adaptiveMode === 'auto';
|
|
497
|
+
}
|
|
498
|
+
/**
|
|
499
|
+
* @hidden
|
|
500
|
+
*/
|
|
501
|
+
get isAdaptive() {
|
|
502
|
+
return this.isAdaptiveModeEnabled && this.windowSize !== 'large';
|
|
503
|
+
}
|
|
432
504
|
/**
|
|
433
505
|
* @hidden
|
|
434
506
|
*
|
|
@@ -543,8 +615,27 @@ export class DropDownTreeComponent {
|
|
|
543
615
|
this.verifySettings();
|
|
544
616
|
}
|
|
545
617
|
ngAfterViewInit() {
|
|
618
|
+
this.windowSize = windowSize();
|
|
546
619
|
this.subs.add(this.renderer.listen(this.wrapper.nativeElement, 'click', this.handleClick.bind(this)));
|
|
547
620
|
this.subs.add(this.renderer.listen(this.wrapper.nativeElement, 'keydown', this.handleKeydown.bind(this)));
|
|
621
|
+
this.renderer.setAttribute(this.actionSheet?.element.nativeElement, 'style', '--kendo-actionsheet-height: 60vh; --kendo-actionsheet-max-height: none');
|
|
622
|
+
}
|
|
623
|
+
/**
|
|
624
|
+
* @hidden
|
|
625
|
+
*/
|
|
626
|
+
onResize() {
|
|
627
|
+
if (this.isAdaptiveModeEnabled && this.windowSize !== windowSize()) {
|
|
628
|
+
if (this.isOpen) {
|
|
629
|
+
this.togglePopup(false);
|
|
630
|
+
}
|
|
631
|
+
this.windowSize = windowSize();
|
|
632
|
+
}
|
|
633
|
+
if (this.isOpen && !this.isActionSheetExpanded) {
|
|
634
|
+
const popupWrapper = this.popupRef.popupElement;
|
|
635
|
+
const { min, max } = this.width;
|
|
636
|
+
popupWrapper.style.minWidth = min;
|
|
637
|
+
popupWrapper.style.width = max;
|
|
638
|
+
}
|
|
548
639
|
}
|
|
549
640
|
/**
|
|
550
641
|
* @hidden
|
|
@@ -595,19 +686,21 @@ export class DropDownTreeComponent {
|
|
|
595
686
|
* @hidden
|
|
596
687
|
*/
|
|
597
688
|
handleBlur(e) {
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
(this.
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
this.
|
|
609
|
-
|
|
610
|
-
|
|
689
|
+
if (!this.isActionSheetExpanded) {
|
|
690
|
+
const relatedTarget = e && e.relatedTarget;
|
|
691
|
+
if (this.wrapper.nativeElement.contains(relatedTarget) ||
|
|
692
|
+
(this.isOpen && this.popupRef.popupElement.contains(relatedTarget))) {
|
|
693
|
+
return;
|
|
694
|
+
}
|
|
695
|
+
this.isFocused = false;
|
|
696
|
+
this.togglePopup(false);
|
|
697
|
+
if (hasObservers(this.onBlur) ||
|
|
698
|
+
isUntouched(this.wrapper.nativeElement)) {
|
|
699
|
+
this._zone.run(() => {
|
|
700
|
+
this.onBlur.emit();
|
|
701
|
+
this.onTouchedCallback();
|
|
702
|
+
});
|
|
703
|
+
}
|
|
611
704
|
}
|
|
612
705
|
}
|
|
613
706
|
/**
|
|
@@ -617,7 +710,11 @@ export class DropDownTreeComponent {
|
|
|
617
710
|
if (this.disabled || this.readonly) {
|
|
618
711
|
return;
|
|
619
712
|
}
|
|
620
|
-
if (
|
|
713
|
+
if (event.keyCode === Keys.Tab && this.isActionSheetExpanded) {
|
|
714
|
+
this.togglePopup(false);
|
|
715
|
+
return;
|
|
716
|
+
}
|
|
717
|
+
if (!this.isFilterActive && isLetter(event.key) && !this.actionSheetSearchBar?.onFocus) {
|
|
621
718
|
this.printableCharacters.next(event.key);
|
|
622
719
|
}
|
|
623
720
|
const eventData = event;
|
|
@@ -665,9 +762,9 @@ export class DropDownTreeComponent {
|
|
|
665
762
|
this.dataItem = undefined;
|
|
666
763
|
}
|
|
667
764
|
/**
|
|
668
|
-
* Toggles the visibility of the popup
|
|
765
|
+
* Toggles the visibility of the popup or actionSheet.
|
|
669
766
|
* ([see example]({% slug openstate_ddt %})).
|
|
670
|
-
* If you use the `toggle` method to open or close the popup, the `open` and `close` events will not be fired.
|
|
767
|
+
* If you use the `toggle` method to open or close the popup or actionSheet, the `open` and `close` events will not be fired.
|
|
671
768
|
*
|
|
672
769
|
* @param open - The state of the popup.
|
|
673
770
|
*/
|
|
@@ -777,7 +874,7 @@ export class DropDownTreeComponent {
|
|
|
777
874
|
* @hidden
|
|
778
875
|
*/
|
|
779
876
|
handleFilterInputChange(input) {
|
|
780
|
-
this.filterChange.next(input.value);
|
|
877
|
+
this.filterChange.next(typeof (input) === 'string' ? input : input.value);
|
|
781
878
|
this.allNodesHidden = this.nodes.every((node, index) => !this.isVisible(node, String(index)));
|
|
782
879
|
}
|
|
783
880
|
/**
|
|
@@ -837,8 +934,24 @@ export class DropDownTreeComponent {
|
|
|
837
934
|
if (this.popupRef) {
|
|
838
935
|
this._searchableNodes = getSearchableItems(this.treeViewId, this.popupRef.popupElement);
|
|
839
936
|
}
|
|
937
|
+
if (this.isActionSheetExpanded) {
|
|
938
|
+
this._searchableNodes = getSearchableItems(this.treeViewId, this.actionSheet.element.nativeElement);
|
|
939
|
+
}
|
|
840
940
|
});
|
|
841
941
|
}
|
|
942
|
+
/**
|
|
943
|
+
* @hidden
|
|
944
|
+
*/
|
|
945
|
+
onExpand() {
|
|
946
|
+
this._searchableNodes = getSearchableItems(this.treeViewId, this.actionSheet.element.nativeElement);
|
|
947
|
+
this.isActionSheetExpanded = true;
|
|
948
|
+
}
|
|
949
|
+
/**
|
|
950
|
+
* @hidden
|
|
951
|
+
*/
|
|
952
|
+
onCollapse() {
|
|
953
|
+
this.isActionSheetExpanded = false;
|
|
954
|
+
}
|
|
842
955
|
/**
|
|
843
956
|
* @hidden
|
|
844
957
|
*
|
|
@@ -873,6 +986,12 @@ export class DropDownTreeComponent {
|
|
|
873
986
|
return eventArgs.isDefaultPrevented();
|
|
874
987
|
}
|
|
875
988
|
createPopup() {
|
|
989
|
+
this.windowSize = windowSize();
|
|
990
|
+
if (this.isAdaptive) {
|
|
991
|
+
this.openActionSheet();
|
|
992
|
+
this.cdr.detectChanges();
|
|
993
|
+
return;
|
|
994
|
+
}
|
|
876
995
|
const horizontalAlign = this.direction === "rtl" ? "right" : "left";
|
|
877
996
|
const anchorPosition = { horizontal: horizontalAlign, vertical: 'bottom' };
|
|
878
997
|
const popupPosition = { horizontal: horizontalAlign, vertical: 'top' };
|
|
@@ -905,6 +1024,9 @@ export class DropDownTreeComponent {
|
|
|
905
1024
|
});
|
|
906
1025
|
}
|
|
907
1026
|
destroyPopup() {
|
|
1027
|
+
if (this.isActionSheetExpanded) {
|
|
1028
|
+
this.closeActionSheet();
|
|
1029
|
+
}
|
|
908
1030
|
if (this.popupRef) {
|
|
909
1031
|
this.popupRef.close();
|
|
910
1032
|
this.popupRef = null;
|
|
@@ -921,10 +1043,13 @@ export class DropDownTreeComponent {
|
|
|
921
1043
|
}
|
|
922
1044
|
handleClick(e) {
|
|
923
1045
|
// The check is needed otherwise when appended to the component, the popup reopens on click
|
|
924
|
-
// https://github.com/telerik/kendo-angular/issues/3738
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
this.
|
|
1046
|
+
// https://github.com/telerik/kendo-angular/issues/3738
|
|
1047
|
+
this.windowSize = windowSize();
|
|
1048
|
+
if (!this.isActionSheetExpanded) {
|
|
1049
|
+
if ((this.popupRef && !this.popupRef.popupElement.contains(e.target))
|
|
1050
|
+
|| (!this.popupRef && !e.target.className.includes('k-treeview-leaf'))) {
|
|
1051
|
+
this.togglePopup(!this.isOpen);
|
|
1052
|
+
}
|
|
928
1053
|
}
|
|
929
1054
|
}
|
|
930
1055
|
handleEscape() {
|
|
@@ -994,7 +1119,12 @@ export class DropDownTreeComponent {
|
|
|
994
1119
|
}
|
|
995
1120
|
event.originalEvent.preventDefault();
|
|
996
1121
|
if (this.filterable && this.treeview['navigationService']['activeIndex'] === '0') {
|
|
997
|
-
this.
|
|
1122
|
+
if (this.isActionSheetExpanded) {
|
|
1123
|
+
this.actionSheetSearchBar.focus();
|
|
1124
|
+
}
|
|
1125
|
+
else {
|
|
1126
|
+
this.filterInput.nativeElement.focus();
|
|
1127
|
+
}
|
|
998
1128
|
}
|
|
999
1129
|
})
|
|
1000
1130
|
].forEach(sub => this.subs.add(sub));
|
|
@@ -1079,9 +1209,30 @@ export class DropDownTreeComponent {
|
|
|
1079
1209
|
}
|
|
1080
1210
|
});
|
|
1081
1211
|
}
|
|
1212
|
+
closeActionSheet() {
|
|
1213
|
+
this.actionSheet.toggle(false);
|
|
1214
|
+
if (this.filterable) {
|
|
1215
|
+
this.actionSheetSearchBar.value = '';
|
|
1216
|
+
this.filterChange.emit('');
|
|
1217
|
+
}
|
|
1218
|
+
this.wrapper.nativeElement.focus();
|
|
1219
|
+
this.closed.emit();
|
|
1220
|
+
}
|
|
1221
|
+
openActionSheet() {
|
|
1222
|
+
this.windowSize = windowSize();
|
|
1223
|
+
this.isActionSheetExpanded = true;
|
|
1224
|
+
this.actionSheet.toggle(true);
|
|
1225
|
+
this.title = setActionSheetTitle(this.wrapper, this.title);
|
|
1226
|
+
this.cdr.detectChanges();
|
|
1227
|
+
updateActionSheetAdaptiveAppearance(this.actionSheet, this.windowSize, this.renderer);
|
|
1228
|
+
this.cdr.detectChanges();
|
|
1229
|
+
this.opened.emit();
|
|
1230
|
+
this.removeTreeViewFromTabOrder();
|
|
1231
|
+
this.filterable && this.actionSheetSearchBar.focus();
|
|
1232
|
+
}
|
|
1082
1233
|
}
|
|
1083
1234
|
DropDownTreeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DropDownTreeComponent, deps: [{ token: i0.Injector }, { token: i0.ElementRef }, { token: i1.PopupService }, { token: i2.NavigationService }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i3.LocalizationService }, { token: TOUCH_ENABLED, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
1084
|
-
DropDownTreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: DropDownTreeComponent, selector: "kendo-dropdowntree", inputs: { loading: "loading", clearButton: "clearButton", data: "data", value: "value", textField: "textField", valueField: "valueField", valueDepth: "valueDepth", hasChildren: "hasChildren", fetchChildren: "fetchChildren", placeholder: "placeholder", popupSettings: "popupSettings", dataItem: "dataItem", listHeight: "listHeight", disabled: "disabled", readonly: "readonly", valuePrimitive: "valuePrimitive", tabindex: "tabindex", size: "size", rounded: "rounded", fillMode: "fillMode", itemDisabled: "itemDisabled", isNodeExpanded: "isNodeExpanded", isNodeVisible: "isNodeVisible", loadOnDemand: "loadOnDemand", filterable: "filterable", filter: "filter", focusableId: "focusableId" }, outputs: { open: "open", opened: "opened", close: "close", closed: "closed", nodeExpand: "nodeExpand", nodeCollapse: "nodeCollapse", onFocus: "focus", onBlur: "blur", valueChange: "valueChange", filterChange: "filterChange" }, host: { properties: { "class.k-dropdowntree": "this.hostClasses", "class.k-picker": "this.hostClasses", "attr.aria-invalid": "this.hostAriaInvalid", "class.k-disabled": "this.isDisabled", "attr.disabled": "this.isDisabledAttribute", "class.k-loading": "this.isLoading", "attr.aria-busy": "this.isBusy", "attr.aria-controls": "this.hostAriaControls", "attr.id": "this.id", "attr.dir": "this.direction", "attr.tabindex": "this.hostTabIndex", "attr.role": "this.role", "attr.aria-haspopup": "this.ariaHasPopup", "attr.aria-expanded": "this.isAriaExpanded", "attr.aria-autocomplete": "this.hostAriaAutocomplete"
|
|
1235
|
+
DropDownTreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: DropDownTreeComponent, selector: "kendo-dropdowntree", inputs: { loading: "loading", clearButton: "clearButton", data: "data", value: "value", textField: "textField", valueField: "valueField", valueDepth: "valueDepth", hasChildren: "hasChildren", fetchChildren: "fetchChildren", placeholder: "placeholder", popupSettings: "popupSettings", dataItem: "dataItem", listHeight: "listHeight", disabled: "disabled", readonly: "readonly", valuePrimitive: "valuePrimitive", tabindex: "tabindex", size: "size", rounded: "rounded", fillMode: "fillMode", itemDisabled: "itemDisabled", isNodeExpanded: "isNodeExpanded", isNodeVisible: "isNodeVisible", loadOnDemand: "loadOnDemand", filterable: "filterable", filter: "filter", focusableId: "focusableId", adaptiveMode: "adaptiveMode", title: "title", subtitle: "subtitle" }, outputs: { open: "open", opened: "opened", close: "close", closed: "closed", nodeExpand: "nodeExpand", nodeCollapse: "nodeCollapse", onFocus: "focus", onBlur: "blur", valueChange: "valueChange", filterChange: "filterChange" }, host: { properties: { "class.k-dropdowntree": "this.hostClasses", "class.k-picker": "this.hostClasses", "attr.readonly": "this.isReadonly", "attr.aria-invalid": "this.hostAriaInvalid", "class.k-disabled": "this.isDisabled", "attr.disabled": "this.isDisabledAttribute", "class.k-loading": "this.isLoading", "attr.aria-busy": "this.isBusy", "attr.aria-controls": "this.hostAriaControls", "attr.id": "this.id", "attr.dir": "this.direction", "attr.tabindex": "this.hostTabIndex", "attr.role": "this.role", "attr.aria-haspopup": "this.ariaHasPopup", "attr.aria-expanded": "this.isAriaExpanded", "attr.aria-autocomplete": "this.hostAriaAutocomplete" } }, providers: [
|
|
1085
1236
|
DataService,
|
|
1086
1237
|
SelectionService,
|
|
1087
1238
|
NavigationService,
|
|
@@ -1108,7 +1259,7 @@ DropDownTreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
1108
1259
|
provide: ExpandableComponent,
|
|
1109
1260
|
useExisting: forwardRef(() => DropDownTreeComponent)
|
|
1110
1261
|
}
|
|
1111
|
-
], queries: [{ propertyName: "noDataTemplate", first: true, predicate: NoDataTemplateDirective, descendants: true }, { propertyName: "headerTemplate", first: true, predicate: HeaderTemplateDirective, descendants: true }, { propertyName: "footerTemplate", first: true, predicate: FooterTemplateDirective, descendants: true }, { propertyName: "nodeTemplate", first: true, predicate: NodeTemplateDirective, descendants: true }, { propertyName: "valueTemplate", first: true, predicate: ValueTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "treeview", first: true, predicate: ["treeview"], descendants: true }, { propertyName: "filterInput", first: true, predicate: ["filterInput"], descendants: true }], exportAs: ["kendoDropDownTree"], usesOnChanges: true, ngImport: i0, template: `
|
|
1262
|
+
], queries: [{ propertyName: "noDataTemplate", first: true, predicate: NoDataTemplateDirective, descendants: true }, { propertyName: "headerTemplate", first: true, predicate: HeaderTemplateDirective, descendants: true }, { propertyName: "footerTemplate", first: true, predicate: FooterTemplateDirective, descendants: true }, { propertyName: "nodeTemplate", first: true, predicate: NodeTemplateDirective, descendants: true }, { propertyName: "valueTemplate", first: true, predicate: ValueTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "responsiveRendererComponent", first: true, predicate: ResponsiveRendererComponent, descendants: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "treeview", first: true, predicate: ["treeview"], descendants: true }, { propertyName: "filterInput", first: true, predicate: ["filterInput"], descendants: true }], exportAs: ["kendoDropDownTree"], usesOnChanges: true, ngImport: i0, template: `
|
|
1112
1263
|
<ng-container kendoDropDownTreeLocalizedMessages
|
|
1113
1264
|
i18n-noDataText="kendo.dropdowntree.noDataText|The text displayed in the popup when there are no items"
|
|
1114
1265
|
noDataText="NO DATA FOUND"
|
|
@@ -1172,8 +1323,26 @@ DropDownTreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
1172
1323
|
</kendo-icon-wrapper>
|
|
1173
1324
|
</button>
|
|
1174
1325
|
<ng-template #popupTemplate>
|
|
1175
|
-
<
|
|
1176
|
-
|
|
1326
|
+
<ng-container *ngTemplateOutlet="sharedPopupActionSheetTemplate"></ng-container>
|
|
1327
|
+
</ng-template>
|
|
1328
|
+
<ng-container #container></ng-container>
|
|
1329
|
+
|
|
1330
|
+
<!--adaptive rendering-->
|
|
1331
|
+
<responsive-renderer
|
|
1332
|
+
[sharedPopupActionSheetTemplate]="sharedPopupActionSheetTemplate"
|
|
1333
|
+
[isActionSheetExpanded]="isActionSheetExpanded"
|
|
1334
|
+
[title]="title"
|
|
1335
|
+
[showTextInput]="filterable"
|
|
1336
|
+
[subtitle]="subtitle"
|
|
1337
|
+
(closePopup)="togglePopup(false)"
|
|
1338
|
+
(onExpand)="onExpand()"
|
|
1339
|
+
(onCollapse)="onCollapse()"
|
|
1340
|
+
(textInputChange)="handleFilterInputChange($event)"
|
|
1341
|
+
>
|
|
1342
|
+
</responsive-renderer>
|
|
1343
|
+
<ng-template #sharedPopupActionSheetTemplate>
|
|
1344
|
+
<span
|
|
1345
|
+
*ngIf="filterable && !isActionSheetExpanded"
|
|
1177
1346
|
class="k-list-filter"
|
|
1178
1347
|
>
|
|
1179
1348
|
<span
|
|
@@ -1259,8 +1428,9 @@ DropDownTreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
1259
1428
|
</ng-template>
|
|
1260
1429
|
</div>
|
|
1261
1430
|
</ng-template>
|
|
1262
|
-
|
|
1263
|
-
|
|
1431
|
+
|
|
1432
|
+
<kendo-resize-sensor *ngIf="isOpen || isAdaptiveModeEnabled" (resize)="onResize()"></kendo-resize-sensor>
|
|
1433
|
+
`, isInline: true, components: [{ type: i4.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }, { type: i5.ResponsiveRendererComponent, selector: "responsive-renderer", inputs: ["title", "showActionButtons", "subtitle", "size", "showTextInput", "sharedPopupActionSheetTemplate", "isActionSheetExpanded", "text", "placeholder"], outputs: ["closePopup", "textInputChange", "navigate", "onExpand", "onCollapse", "onApply", "onCancel"] }, { type: i6.TreeViewComponent, selector: "kendo-treeview", inputs: ["filterInputPlaceholder", "expandDisabledNodes", "animate", "nodeTemplate", "loadMoreButtonTemplate", "trackBy", "nodes", "textField", "hasChildren", "isChecked", "isDisabled", "isExpanded", "isSelected", "isVisible", "navigable", "children", "loadOnDemand", "filterable", "filter", "size", "disableParentNodesOnly"], outputs: ["childrenLoaded", "blur", "focus", "expand", "collapse", "nodeDragStart", "nodeDrag", "filterStateChange", "nodeDrop", "nodeDragEnd", "addItem", "removeItem", "checkedChange", "selectionChange", "filterChange", "nodeClick", "nodeDblClick"], exportAs: ["kendoTreeView"] }, { type: i7.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], directives: [{ type: i8.LocalizedMessagesDirective, selector: "\n [kendoDropDownListLocalizedMessages],\n [kendoDropDownTreeLocalizedMessages],\n [kendoComboBoxLocalizedMessages],\n [kendoMultiColumnComboBoxLocalizedMessages],\n [kendoAutoCompleteLocalizedMessages],\n [kendoMultiSelectLocalizedMessages],\n [kendoMultiSelectTreeLocalizedMessages]\n " }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10.TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { type: i9.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i9.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i11.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: i12.FilterInputDirective, selector: "[filterInput]", inputs: ["filterInput"] }, { type: i11.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i11.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i7.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i6.SelectDirective, selector: "[kendoTreeViewSelectable]", inputs: ["isSelected", "selectBy", "kendoTreeViewSelectable", "selectedKeys"], outputs: ["selectedKeysChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1264
1434
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DropDownTreeComponent, decorators: [{
|
|
1265
1435
|
type: Component,
|
|
1266
1436
|
args: [{
|
|
@@ -1358,8 +1528,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1358
1528
|
</kendo-icon-wrapper>
|
|
1359
1529
|
</button>
|
|
1360
1530
|
<ng-template #popupTemplate>
|
|
1361
|
-
<
|
|
1362
|
-
|
|
1531
|
+
<ng-container *ngTemplateOutlet="sharedPopupActionSheetTemplate"></ng-container>
|
|
1532
|
+
</ng-template>
|
|
1533
|
+
<ng-container #container></ng-container>
|
|
1534
|
+
|
|
1535
|
+
<!--adaptive rendering-->
|
|
1536
|
+
<responsive-renderer
|
|
1537
|
+
[sharedPopupActionSheetTemplate]="sharedPopupActionSheetTemplate"
|
|
1538
|
+
[isActionSheetExpanded]="isActionSheetExpanded"
|
|
1539
|
+
[title]="title"
|
|
1540
|
+
[showTextInput]="filterable"
|
|
1541
|
+
[subtitle]="subtitle"
|
|
1542
|
+
(closePopup)="togglePopup(false)"
|
|
1543
|
+
(onExpand)="onExpand()"
|
|
1544
|
+
(onCollapse)="onCollapse()"
|
|
1545
|
+
(textInputChange)="handleFilterInputChange($event)"
|
|
1546
|
+
>
|
|
1547
|
+
</responsive-renderer>
|
|
1548
|
+
<ng-template #sharedPopupActionSheetTemplate>
|
|
1549
|
+
<span
|
|
1550
|
+
*ngIf="filterable && !isActionSheetExpanded"
|
|
1363
1551
|
class="k-list-filter"
|
|
1364
1552
|
>
|
|
1365
1553
|
<span
|
|
@@ -1445,7 +1633,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1445
1633
|
</ng-template>
|
|
1446
1634
|
</div>
|
|
1447
1635
|
</ng-template>
|
|
1448
|
-
|
|
1636
|
+
|
|
1637
|
+
<kendo-resize-sensor *ngIf="isOpen || isAdaptiveModeEnabled" (resize)="onResize()"></kendo-resize-sensor>
|
|
1449
1638
|
`,
|
|
1450
1639
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
1451
1640
|
}]
|
|
@@ -1454,12 +1643,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1454
1643
|
}, {
|
|
1455
1644
|
type: Inject,
|
|
1456
1645
|
args: [TOUCH_ENABLED]
|
|
1457
|
-
}] }]; }, propDecorators: {
|
|
1646
|
+
}] }]; }, propDecorators: { responsiveRendererComponent: [{
|
|
1647
|
+
type: ViewChild,
|
|
1648
|
+
args: [ResponsiveRendererComponent]
|
|
1649
|
+
}], hostClasses: [{
|
|
1458
1650
|
type: HostBinding,
|
|
1459
1651
|
args: ['class.k-dropdowntree']
|
|
1460
1652
|
}, {
|
|
1461
1653
|
type: HostBinding,
|
|
1462
1654
|
args: ['class.k-picker']
|
|
1655
|
+
}], isReadonly: [{
|
|
1656
|
+
type: HostBinding,
|
|
1657
|
+
args: ['attr.readonly']
|
|
1463
1658
|
}], hostAriaInvalid: [{
|
|
1464
1659
|
type: HostBinding,
|
|
1465
1660
|
args: ['attr.aria-invalid']
|
|
@@ -1499,9 +1694,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1499
1694
|
}], hostAriaAutocomplete: [{
|
|
1500
1695
|
type: HostBinding,
|
|
1501
1696
|
args: ['attr.aria-autocomplete']
|
|
1502
|
-
}], isReadonly: [{
|
|
1503
|
-
type: HostBinding,
|
|
1504
|
-
args: ['attr.readonly']
|
|
1505
1697
|
}], noDataTemplate: [{
|
|
1506
1698
|
type: ContentChild,
|
|
1507
1699
|
args: [NoDataTemplateDirective, { static: false }]
|
|
@@ -1605,4 +1797,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1605
1797
|
type: Input
|
|
1606
1798
|
}], focusableId: [{
|
|
1607
1799
|
type: Input
|
|
1800
|
+
}], adaptiveMode: [{
|
|
1801
|
+
type: Input
|
|
1802
|
+
}], title: [{
|
|
1803
|
+
type: Input
|
|
1804
|
+
}], subtitle: [{
|
|
1805
|
+
type: Input
|
|
1608
1806
|
}] } });
|