@progress/kendo-vue-dropdowns 5.2.0-dev.202406241421 → 5.2.0-dev.202407150706

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.
@@ -320,7 +320,6 @@ var DropDownTreeVue2 = {
320
320
  },
321
321
  // @ts-ignore
322
322
  render: function render(createElement) {
323
- var _this2 = this;
324
323
  var _this = this;
325
324
  var h = gh || createElement;
326
325
  var id = this.$props.id || this.componentGuid;
@@ -527,14 +526,41 @@ var DropDownTreeVue2 = {
527
526
  size = _b.size,
528
527
  rounded = _b.rounded,
529
528
  fillMode = _b.fillMode;
530
- var component = h("span", {
531
- "class": this.wrapperClass,
532
- tabIndex: tabIndex,
533
- attrs: this.v3 ? undefined : {
529
+ var component = function component() {
530
+ var _this2 = this;
531
+ return h("span", {
532
+ "class": this.wrapperClass,
534
533
  tabIndex: tabIndex,
534
+ attrs: this.v3 ? undefined : {
535
+ tabIndex: tabIndex,
536
+ accessKey: this.$props.accessKey,
537
+ id: id,
538
+ dir: dir,
539
+ role: "combobox",
540
+ "aria-haspopup": "tree",
541
+ "aria-expanded": this.isOpen,
542
+ "aria-disabled": disabled,
543
+ "aria-label": label || this.$props.ariaLabel,
544
+ "aria-labelledby": this.$props.ariaLabelledBy,
545
+ "aria-describedby": this.$props.ariaDescribedBy,
546
+ "aria-required": required
547
+ },
535
548
  accessKey: this.$props.accessKey,
536
549
  id: id,
537
550
  dir: dir,
551
+ ref: setRef(this, 'kendoAnchor', this.anchor),
552
+ onKeydown: this.onWrapperKeyDown,
553
+ on: this.v3 ? undefined : {
554
+ "keydown": this.onWrapperKeyDown,
555
+ "click": this.onWrapperClick,
556
+ "mousedown": this.onWrapperMouseDown,
557
+ "focusin": this.onFocus,
558
+ "focusout": this.onBlur
559
+ },
560
+ onClick: this.onWrapperClick,
561
+ onMousedown: this.onWrapperMouseDown,
562
+ onFocusin: this.onFocus,
563
+ onFocusout: this.onBlur,
538
564
  role: "combobox",
539
565
  "aria-haspopup": "tree",
540
566
  "aria-expanded": this.isOpen,
@@ -543,146 +569,182 @@ var DropDownTreeVue2 = {
543
569
  "aria-labelledby": this.$props.ariaLabelledBy,
544
570
  "aria-describedby": this.$props.ariaDescribedBy,
545
571
  "aria-required": required
546
- },
547
- accessKey: this.$props.accessKey,
548
- id: id,
549
- dir: dir,
550
- ref: setRef(this, 'kendoAnchor', this.anchor),
551
- onKeydown: this.onWrapperKeyDown,
552
- on: this.v3 ? undefined : {
553
- "keydown": this.onWrapperKeyDown,
554
- "click": this.onWrapperClick,
555
- "mousedown": this.onWrapperMouseDown,
556
- "focusin": this.onFocus,
557
- "focusout": this.onBlur
558
- },
559
- onClick: this.onWrapperClick,
560
- onMousedown: this.onWrapperMouseDown,
561
- onFocusin: this.onFocus,
562
- onFocusout: this.onBlur,
563
- role: "combobox",
564
- "aria-haspopup": "tree",
565
- "aria-expanded": this.isOpen,
566
- "aria-disabled": disabled,
567
- "aria-label": label || this.$props.ariaLabel,
568
- "aria-labelledby": this.$props.ariaLabelledBy,
569
- "aria-describedby": this.$props.ariaDescribedBy,
570
- "aria-required": required
571
- }, [h("span", {
572
- "class": "k-input-inner"
573
- }, [valueToRender]), this.$props.loading && h(Icon, {
574
- "class": "k-input-loading-icon",
575
- name: "loading",
576
- attrs: this.v3 ? undefined : {
577
- name: "loading"
578
- }
579
- }), this.hasValue && !disabled && h("span", {
580
- onClick: this.onClear,
581
- on: this.v3 ? undefined : {
582
- "click": this.onClear,
583
- "mousedown": function mousedown(e) {
584
- return e.preventDefault();
572
+ }, [h("span", {
573
+ "class": "k-input-inner"
574
+ }, [valueToRender]), this.$props.loading && h(Icon, {
575
+ "class": "k-input-loading-icon",
576
+ name: "loading",
577
+ attrs: this.v3 ? undefined : {
578
+ name: "loading"
585
579
  }
586
- },
587
- "class": "k-clear-value",
588
- title: localization.toLanguageString(clear, messages[clear]),
589
- attrs: this.v3 ? undefined : {
580
+ }), this.hasValue && !disabled && h("span", {
581
+ onClick: this.onClear,
582
+ on: this.v3 ? undefined : {
583
+ "click": this.onClear,
584
+ "mousedown": function mousedown(e) {
585
+ return e.preventDefault();
586
+ }
587
+ },
588
+ "class": "k-clear-value",
590
589
  title: localization.toLanguageString(clear, messages[clear]),
590
+ attrs: this.v3 ? undefined : {
591
+ title: localization.toLanguageString(clear, messages[clear]),
592
+ role: "button",
593
+ tabIndex: -1
594
+ },
591
595
  role: "button",
592
- tabIndex: -1
593
- },
594
- role: "button",
595
- tabIndex: -1,
596
- onMousedown: function mousedown(e) {
597
- return e.preventDefault();
598
- }
599
- }, [h(Icon, {
600
- name: "x",
601
- attrs: this.v3 ? undefined : {
596
+ tabIndex: -1,
597
+ onMousedown: function mousedown(e) {
598
+ return e.preventDefault();
599
+ }
600
+ }, [h(Icon, {
602
601
  name: "x",
602
+ attrs: this.v3 ? undefined : {
603
+ name: "x",
604
+ icon: xIcon
605
+ },
603
606
  icon: xIcon
604
- },
605
- icon: xIcon
606
- })]), h(KButton, {
607
- tabIndex: -1,
608
- attrs: this.v3 ? undefined : {
607
+ })]), h(KButton, {
609
608
  tabIndex: -1,
609
+ attrs: this.v3 ? undefined : {
610
+ tabIndex: -1,
611
+ type: "button",
612
+ "aria-label": "select",
613
+ size: size,
614
+ fillMode: fillMode,
615
+ themeColor: "base",
616
+ rounded: null,
617
+ icon: "caret-alt-down",
618
+ svgIcon: caretAltDownIcon
619
+ },
610
620
  type: "button",
611
621
  "aria-label": "select",
622
+ "class": "k-input-button",
612
623
  size: size,
613
624
  fillMode: fillMode,
614
625
  themeColor: "base",
615
626
  rounded: null,
616
627
  icon: "caret-alt-down",
617
628
  svgIcon: caretAltDownIcon
618
- },
619
- type: "button",
620
- "aria-label": "select",
621
- "class": "k-input-button",
622
- size: size,
623
- fillMode: fillMode,
624
- themeColor: "base",
625
- rounded: null,
626
- icon: "caret-alt-down",
627
- svgIcon: caretAltDownIcon
628
- }), /* Dummy component to support forms */h("select", {
629
- name: name,
630
- attrs: this.v3 ? undefined : {
629
+ }), /* Dummy component to support forms */h("select", {
631
630
  name: name,
631
+ attrs: this.v3 ? undefined : {
632
+ name: name,
633
+ tabIndex: -1,
634
+ "aria-hidden": true,
635
+ title: label
636
+ },
637
+ ref: setRef(this, 'select'),
632
638
  tabIndex: -1,
633
639
  "aria-hidden": true,
634
- title: label
635
- },
636
- ref: setRef(this, 'select'),
637
- tabIndex: -1,
638
- "aria-hidden": true,
639
- title: label,
640
- style: {
641
- opacity: 0,
642
- width: 1,
643
- border: 0,
644
- zIndex: -1,
645
- position: 'absolute',
646
- left: '50%'
647
- }
648
- }, [h("option", {
649
- value: this.v3 ? this.$props.valueMap ? this.$props.valueMap.call(undefined, this.computedValue) : this.computedValue : null,
650
- domProps: this.v3 ? undefined : {
651
- "value": this.$props.valueMap ? this.$props.valueMap.call(undefined, this.computedValue) : this.computedValue
652
- }
653
- })]), !renderAdaptive &&
654
- // @ts-ignore function children
655
- h(Popup, {
656
- style: {
657
- width: this.popupWidth,
658
- direction: dir
659
- },
660
- ref: setRef(this, 'popup'),
661
- "class": classNames(popupSettings.className, {
662
- 'k-rtl': dir === 'rtl'
663
- }),
664
- popupClass: classNames(popupSettings.popupClass, 'k-dropdowntree-popup', 'popup-' + this.componentGuid),
665
- attrs: this.v3 ? undefined : {
640
+ title: label,
641
+ style: {
642
+ opacity: 0,
643
+ width: 1,
644
+ border: 0,
645
+ zIndex: -1,
646
+ position: 'absolute',
647
+ left: '50%'
648
+ }
649
+ }, [h("option", {
650
+ value: this.v3 ? this.$props.valueMap ? this.$props.valueMap.call(undefined, this.computedValue) : this.computedValue : null,
651
+ domProps: this.v3 ? undefined : {
652
+ "value": this.$props.valueMap ? this.$props.valueMap.call(undefined, this.computedValue) : this.computedValue
653
+ }
654
+ })]), !renderAdaptive &&
655
+ // @ts-ignore function children
656
+ h(Popup, {
657
+ style: {
658
+ width: this.popupWidth,
659
+ direction: dir
660
+ },
661
+ ref: setRef(this, 'popup'),
662
+ "class": classNames(popupSettings.className, {
663
+ 'k-rtl': dir === 'rtl'
664
+ }),
666
665
  popupClass: classNames(popupSettings.popupClass, 'k-dropdowntree-popup', 'popup-' + this.componentGuid),
666
+ attrs: this.v3 ? undefined : {
667
+ popupClass: classNames(popupSettings.popupClass, 'k-dropdowntree-popup', 'popup-' + this.componentGuid),
668
+ animate: popupSettings.animate,
669
+ anchor: this.anchor,
670
+ show: this.isOpen,
671
+ appendTo: popupSettings.appendTo
672
+ },
667
673
  animate: popupSettings.animate,
668
674
  anchor: this.anchor,
669
675
  show: this.isOpen,
676
+ onOpen: this.onPopupOpened,
677
+ on: this.v3 ? undefined : {
678
+ "open": this.onPopupOpened,
679
+ "close": this.onPopupClosed
680
+ },
681
+ onClose: this.onPopupClosed,
670
682
  appendTo: popupSettings.appendTo
671
- },
672
- animate: popupSettings.animate,
673
- anchor: this.anchor,
674
- show: this.isOpen,
675
- onOpen: this.onPopupOpened,
676
- on: this.v3 ? undefined : {
677
- "open": this.onPopupOpened,
678
- "close": this.onPopupClosed
679
- },
680
- onClose: this.onPopupClosed,
681
- appendTo: popupSettings.appendTo
682
- }, this.v3 ? function () {
683
- return [_this2.$props.filterable &&
684
- // @ts-ignore
685
- h(ListFilter, {
683
+ }, this.v3 ? function () {
684
+ return [_this2.$props.filterable &&
685
+ // @ts-ignore
686
+ h(ListFilter, {
687
+ value: _this2.$props.filter === undefined ? _this2.filterState : _this2.$props.filter,
688
+ attrs: _this2.v3 ? undefined : {
689
+ value: _this2.$props.filter === undefined ? _this2.filterState : _this2.$props.filter,
690
+ size: size,
691
+ rounded: rounded,
692
+ fillMode: fillMode
693
+ },
694
+ ref: setRef(_this2, 'input'),
695
+ onChange: _this2.onFilterChange,
696
+ on: _this2.v3 ? undefined : {
697
+ "change": _this2.onFilterChange,
698
+ "keydown": _this2.onInputKeyDown
699
+ },
700
+ onKeydown: _this2.onInputKeyDown,
701
+ size: size,
702
+ rounded: rounded,
703
+ fillMode: fillMode
704
+ }), header && h("div", {
705
+ "class": "k-list-header"
706
+ }, [header]), dataItems.length > 0 ?
707
+ // @ts-ignore
708
+ h(TreeView, {
709
+ ref: setRef(_this2, 'treeView'),
710
+ tabIndex: tabIndex,
711
+ attrs: _this2.v3 ? undefined : {
712
+ tabIndex: tabIndex,
713
+ dataItems: dataItems,
714
+ focusIdField: dataItemKey,
715
+ textField: _this2.$props.textField,
716
+ selectField: selectField,
717
+ expandField: _this2.$props.expandField,
718
+ childrenField: subItemsField,
719
+ expandIcons: true,
720
+ size: size,
721
+ item: itemTemplate
722
+ },
723
+ dataItems: dataItems,
724
+ focusIdField: dataItemKey,
725
+ textField: _this2.$props.textField,
726
+ selectField: selectField,
727
+ expandField: _this2.$props.expandField,
728
+ childrenField: subItemsField,
729
+ expandIcons: true,
730
+ onItemclick: _this2.onChange,
731
+ on: _this2.v3 ? undefined : {
732
+ "itemclick": _this2.onChange,
733
+ "expandchange": _this2.onExpand,
734
+ "focus": _this2.onFocus,
735
+ "blur": _this2.onBlur,
736
+ "keydown": _this2.onWrapperKeyDown
737
+ },
738
+ onExpandchange: _this2.onExpand,
739
+ onFocus: _this2.onFocus,
740
+ onBlur: _this2.onBlur,
741
+ onKeydown: _this2.onWrapperKeyDown,
742
+ size: size,
743
+ item: itemTemplate
744
+ }) : noDataTemplate, footer && h("div", {
745
+ "class": "k-list-footer"
746
+ }, [footer])];
747
+ } : [_this2.$props.filterable && h(ListFilter, {
686
748
  value: _this2.$props.filter === undefined ? _this2.filterState : _this2.$props.filter,
687
749
  attrs: _this2.v3 ? undefined : {
688
750
  value: _this2.$props.filter === undefined ? _this2.filterState : _this2.$props.filter,
@@ -702,9 +764,7 @@ var DropDownTreeVue2 = {
702
764
  fillMode: fillMode
703
765
  }), header && h("div", {
704
766
  "class": "k-list-header"
705
- }, [header]), dataItems.length > 0 ?
706
- // @ts-ignore
707
- h(TreeView, {
767
+ }, [header]), dataItems.length > 0 ? h(TreeView, {
708
768
  ref: setRef(_this2, 'treeView'),
709
769
  tabIndex: tabIndex,
710
770
  attrs: _this2.v3 ? undefined : {
@@ -742,70 +802,12 @@ var DropDownTreeVue2 = {
742
802
  item: itemTemplate
743
803
  }) : noDataTemplate, footer && h("div", {
744
804
  "class": "k-list-footer"
745
- }, [footer])];
746
- } : [_this2.$props.filterable && h(ListFilter, {
747
- value: _this2.$props.filter === undefined ? _this2.filterState : _this2.$props.filter,
748
- attrs: _this2.v3 ? undefined : {
749
- value: _this2.$props.filter === undefined ? _this2.filterState : _this2.$props.filter,
750
- size: size,
751
- rounded: rounded,
752
- fillMode: fillMode
753
- },
754
- ref: setRef(_this2, 'input'),
755
- onChange: _this2.onFilterChange,
756
- on: _this2.v3 ? undefined : {
757
- "change": _this2.onFilterChange,
758
- "keydown": _this2.onInputKeyDown
759
- },
760
- onKeydown: _this2.onInputKeyDown,
761
- size: size,
762
- rounded: rounded,
763
- fillMode: fillMode
764
- }), header && h("div", {
765
- "class": "k-list-header"
766
- }, [header]), dataItems.length > 0 ? h(TreeView, {
767
- ref: setRef(_this2, 'treeView'),
768
- tabIndex: tabIndex,
769
- attrs: _this2.v3 ? undefined : {
770
- tabIndex: tabIndex,
771
- dataItems: dataItems,
772
- focusIdField: dataItemKey,
773
- textField: _this2.$props.textField,
774
- selectField: selectField,
775
- expandField: _this2.$props.expandField,
776
- childrenField: subItemsField,
777
- expandIcons: true,
778
- size: size,
779
- item: itemTemplate
780
- },
781
- dataItems: dataItems,
782
- focusIdField: dataItemKey,
783
- textField: _this2.$props.textField,
784
- selectField: selectField,
785
- expandField: _this2.$props.expandField,
786
- childrenField: subItemsField,
787
- expandIcons: true,
788
- onItemclick: _this2.onChange,
789
- on: _this2.v3 ? undefined : {
790
- "itemclick": _this2.onChange,
791
- "expandchange": _this2.onExpand,
792
- "focus": _this2.onFocus,
793
- "blur": _this2.onBlur,
794
- "keydown": _this2.onWrapperKeyDown
795
- },
796
- onExpandchange: _this2.onExpand,
797
- onFocus: _this2.onFocus,
798
- onBlur: _this2.onBlur,
799
- onKeydown: _this2.onWrapperKeyDown,
800
- size: size,
801
- item: itemTemplate
802
- }) : noDataTemplate, footer && h("div", {
803
- "class": "k-list-footer"
804
- }, [footer])])]);
805
+ }, [footer])])]);
806
+ };
805
807
  // The following one combines the default rendering of the MultiSelect and the Adaptive rendering.
806
808
  // This is needed because of Vue 2 specifics
807
- var dropdowntree = [component, renderAdaptive && renderAdaptiveListContainer.call(this)];
808
- var dropdowntreeToRender = isV3 ? dropdowntree : this.$props.adaptive ? h("span", [dropdowntree]) : component;
809
+ var dropdowntree = [isV3 ? h(component.call(this), __assign({}, this.$attrs)) : component.call(this), renderAdaptive && renderAdaptiveListContainer.call(this)];
810
+ var dropdowntreeToRender = isV3 ? dropdowntree : this.$props.adaptive ? h("span", [dropdowntree]) : component.call(this);
809
811
  return label ?
810
812
  // @ts-ignore function children
811
813
  h(FloatingLabel, {