primevue 4.0.7 → 4.1.0
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.vue +50 -50
- package/autocomplete/index.d.ts +5 -1
- package/autocomplete/index.mjs +11 -8
- package/autocomplete/index.mjs.map +1 -1
- package/autocomplete/style/index.d.ts +4 -0
- package/autocomplete/style/index.mjs +3 -2
- package/autocomplete/style/index.mjs.map +1 -1
- package/button/BaseButton.vue +2 -2
- package/button/Button.vue +1 -1
- package/button/index.d.ts +2 -2
- package/button/index.mjs +7 -6
- package/button/index.mjs.map +1 -1
- package/carousel/Carousel.vue +2 -7
- package/carousel/index.mjs +2 -7
- package/carousel/index.mjs.map +1 -1
- package/carousel/style/index.mjs +1 -1
- package/carousel/style/index.mjs.map +1 -1
- package/cascadeselect/BaseCascadeSelect.vue +4 -0
- package/cascadeselect/CascadeSelect.vue +53 -10
- package/cascadeselect/CascadeSelectSub.vue +24 -27
- package/cascadeselect/index.d.ts +41 -1
- package/cascadeselect/index.mjs +114 -73
- package/cascadeselect/index.mjs.map +1 -1
- package/cascadeselect/style/index.mjs +13 -6
- package/cascadeselect/style/index.mjs.map +1 -1
- package/colorpicker/BaseColorPicker.vue +2 -1
- package/colorpicker/ColorPicker.vue +3 -3
- package/colorpicker/index.d.ts +6 -1
- package/colorpicker/index.mjs +11 -4
- package/colorpicker/index.mjs.map +1 -1
- package/config/index.d.ts +9 -3
- package/confirmationoptions/index.d.ts +12 -0
- package/confirmdialog/ConfirmDialog.vue +11 -1
- package/confirmdialog/index.d.ts +3 -7
- package/confirmdialog/index.mjs +12 -2
- package/confirmdialog/index.mjs.map +1 -1
- package/contextmenu/BaseContextMenu.vue +4 -0
- package/contextmenu/ContextMenu.vue +37 -10
- package/contextmenu/index.d.ts +10 -5
- package/contextmenu/index.mjs +57 -28
- package/contextmenu/index.mjs.map +1 -1
- package/contextmenu/style/index.mjs +10 -5
- package/contextmenu/style/index.mjs.map +1 -1
- package/datatable/BaseDataTable.vue +4 -0
- package/datatable/DataTable.vue +5 -10
- package/datatable/HeaderCheckbox.vue +1 -1
- package/datatable/TableBody.vue +1 -1
- package/datatable/TableHeader.vue +51 -51
- package/datatable/index.d.ts +5 -0
- package/datatable/index.mjs +90 -87
- package/datatable/index.mjs.map +1 -1
- package/datatable/style/index.mjs +1 -1
- package/datatable/style/index.mjs.map +1 -1
- package/datepicker/DatePicker.vue +13 -11
- package/datepicker/index.d.ts +2 -10
- package/datepicker/index.mjs +12 -10
- package/datepicker/index.mjs.map +1 -1
- package/datepicker/style/index.mjs +3 -3
- package/datepicker/style/index.mjs.map +1 -1
- package/dialog/Dialog.vue +4 -10
- package/dialog/index.mjs +3 -10
- package/dialog/index.mjs.map +1 -1
- package/drawer/index.d.ts +5 -1
- package/fieldset/index.d.ts +2 -6
- package/fileupload/index.d.ts +1 -1
- package/floatlabel/BaseFloatLabel.vue +6 -1
- package/floatlabel/index.d.ts +7 -2
- package/floatlabel/index.mjs +6 -1
- package/floatlabel/index.mjs.map +1 -1
- package/floatlabel/style/index.d.ts +2 -2
- package/floatlabel/style/index.mjs +10 -2
- package/floatlabel/style/index.mjs.map +1 -1
- package/focustrap/index.d.ts +1 -1
- package/galleria/index.d.ts +8 -8
- package/galleria/style/index.mjs +2 -2
- package/galleria/style/index.mjs.map +1 -1
- package/iftalabel/BaseIftaLabel.vue +16 -0
- package/iftalabel/IftaLabel.vue +15 -0
- package/iftalabel/index.d.ts +130 -0
- package/iftalabel/index.mjs +32 -0
- package/iftalabel/index.mjs.map +1 -0
- package/iftalabel/package.json +11 -0
- package/iftalabel/style/index.d.ts +19 -0
- package/iftalabel/style/index.mjs +17 -0
- package/iftalabel/style/index.mjs.map +1 -0
- package/iftalabel/style/package.json +6 -0
- package/imagecompare/BaseImageCompare.vue +30 -0
- package/imagecompare/ImageCompare.vue +24 -0
- package/imagecompare/index.d.ts +149 -0
- package/imagecompare/index.mjs +61 -0
- package/imagecompare/index.mjs.map +1 -0
- package/imagecompare/package.json +11 -0
- package/imagecompare/style/index.d.ts +23 -0
- package/imagecompare/style/index.mjs +18 -0
- package/imagecompare/style/index.mjs.map +1 -0
- package/imagecompare/style/package.json +6 -0
- package/inputgroup/BaseInputGroup.vue +0 -6
- package/inputgroup/InputGroup.vue +1 -10
- package/inputgroup/index.d.ts +0 -5
- package/inputgroup/index.mjs +1 -18
- package/inputgroup/index.mjs.map +1 -1
- package/inputgroup/style/index.mjs +2 -7
- package/inputgroup/style/index.mjs.map +1 -1
- package/inputmask/InputMask.vue +23 -17
- package/inputmask/index.mjs +21 -16
- package/inputmask/index.mjs.map +1 -1
- package/inputnumber/InputNumber.vue +2 -2
- package/inputnumber/index.d.ts +1 -1
- package/inputnumber/index.mjs +2 -2
- package/inputnumber/index.mjs.map +1 -1
- package/inputnumber/style/index.mjs +2 -2
- package/inputnumber/style/index.mjs.map +1 -1
- package/inputotp/BaseInputOtp.vue +1 -1
- package/inputotp/InputOtp.vue +6 -12
- package/inputotp/index.d.ts +2 -2
- package/inputotp/index.mjs +11 -12
- package/inputotp/index.mjs.map +1 -1
- package/inputotp/style/index.mjs +1 -1
- package/inputotp/style/index.mjs.map +1 -1
- package/inputtext/style/index.mjs +1 -1
- package/inputtext/style/index.mjs.map +1 -1
- package/keyfilter/index.d.ts +153 -0
- package/keyfilter/index.mjs +127 -0
- package/keyfilter/index.mjs.map +1 -0
- package/keyfilter/package.json +5 -0
- package/keyfilter/style/index.d.ts +14 -0
- package/keyfilter/style/index.mjs +8 -0
- package/keyfilter/style/index.mjs.map +1 -0
- package/keyfilter/style/package.json +6 -0
- package/megamenu/MegaMenu.vue +4 -4
- package/megamenu/index.d.ts +4 -0
- package/megamenu/index.mjs +2 -2
- package/megamenu/index.mjs.map +1 -1
- package/message/Message.vue +3 -19
- package/message/index.mjs +4 -20
- package/message/index.mjs.map +1 -1
- package/multiselect/BaseMultiSelect.vue +1 -5
- package/multiselect/MultiSelect.vue +16 -14
- package/multiselect/index.d.ts +2 -20
- package/multiselect/index.mjs +15 -17
- package/multiselect/index.mjs.map +1 -1
- package/multiselect/style/index.mjs +1 -1
- package/multiselect/style/index.mjs.map +1 -1
- package/orderlist/OrderList.vue +4 -8
- package/orderlist/index.d.ts +1 -5
- package/orderlist/index.mjs +3 -7
- package/orderlist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/paginator/JumpToPageInput.vue +1 -1
- package/paginator/Paginator.vue +4 -16
- package/paginator/index.d.ts +1 -1
- package/paginator/index.mjs +4 -21
- package/paginator/index.mjs.map +1 -1
- package/paginator/style/index.d.ts +1 -1
- package/paginator/style/index.mjs +1 -1
- package/paginator/style/index.mjs.map +1 -1
- package/panelmenu/index.d.ts +1 -1
- package/password/BasePassword.vue +4 -0
- package/password/Password.vue +4 -3
- package/password/index.d.ts +6 -1
- package/password/index.mjs +10 -5
- package/password/index.mjs.map +1 -1
- package/password/style/index.mjs +1 -1
- package/password/style/index.mjs.map +1 -1
- package/picklist/PickList.vue +4 -8
- package/picklist/index.d.ts +1 -13
- package/picklist/index.mjs +3 -7
- package/picklist/index.mjs.map +1 -1
- package/popover/Popover.vue +4 -10
- package/popover/index.d.ts +1 -1
- package/popover/index.mjs +3 -9
- package/popover/index.mjs.map +1 -1
- package/progressspinner/index.d.ts +1 -1
- package/rating/style/index.mjs +1 -1
- package/rating/style/index.mjs.map +1 -1
- package/scrolltop/ScrollTop.vue +2 -9
- package/scrolltop/index.d.ts +1 -6
- package/scrolltop/index.mjs +3 -9
- package/scrolltop/index.mjs.map +1 -1
- package/select/Select.vue +13 -6
- package/select/index.mjs +54 -45
- package/select/index.mjs.map +1 -1
- package/select/style/index.mjs +1 -1
- package/select/style/index.mjs.map +1 -1
- package/speeddial/SpeedDial.vue +3 -1
- package/speeddial/index.d.ts +16 -1
- package/speeddial/index.mjs +10 -5
- package/speeddial/index.mjs.map +1 -1
- package/splitter/Splitter.vue +31 -25
- package/splitter/index.d.ts +8 -1
- package/splitter/index.mjs +28 -22
- package/splitter/index.mjs.map +1 -1
- package/tieredmenu/BaseTieredMenu.vue +4 -0
- package/tieredmenu/TieredMenu.vue +31 -4
- package/tieredmenu/TieredMenuSub.vue +3 -1
- package/tieredmenu/index.d.ts +5 -0
- package/tieredmenu/index.mjs +63 -34
- package/tieredmenu/index.mjs.map +1 -1
- package/tieredmenu/style/index.mjs +5 -4
- package/tieredmenu/style/index.mjs.map +1 -1
- package/toast/Toast.vue +2 -9
- package/toast/index.mjs +1 -8
- package/toast/index.mjs.map +1 -1
- package/toggleswitch/ToggleSwitch.vue +5 -1
- package/toggleswitch/index.d.ts +17 -1
- package/toggleswitch/index.mjs +7 -3
- package/toggleswitch/index.mjs.map +1 -1
- package/toggleswitch/style/index.d.ts +9 -1
- package/toggleswitch/style/index.mjs +3 -2
- package/toggleswitch/style/index.mjs.map +1 -1
- package/tooltip/index.mjs +6 -1
- package/tooltip/index.mjs.map +1 -1
- package/tree/BaseTree.vue +1 -1
- package/tree/Tree.vue +4 -2
- package/tree/TreeNode.vue +16 -4
- package/tree/index.d.ts +52 -3
- package/tree/index.mjs +23 -10
- package/tree/index.mjs.map +1 -1
- package/treeselect/BaseTreeSelect.vue +36 -0
- package/treeselect/TreeSelect.vue +31 -16
- package/treeselect/index.d.ts +73 -4
- package/treeselect/index.mjs +82 -25
- package/treeselect/index.mjs.map +1 -1
- package/treeselect/style/index.mjs +1 -1
- package/treeselect/style/index.mjs.map +1 -1
- package/treetable/BaseTreeTable.vue +8 -0
- package/treetable/TreeTable.vue +19 -11
- package/treetable/TreeTableRow.vue +28 -2
- package/treetable/index.d.ts +34 -0
- package/treetable/index.mjs +63 -19
- package/treetable/index.mjs.map +1 -1
- package/treetable/style/index.mjs +5 -3
- package/treetable/style/index.mjs.map +1 -1
- package/umd/primevue.min.js +1 -1
- package/vetur-attributes.json +3 -3
- package/virtualscroller/style/index.mjs +3 -1
- package/virtualscroller/style/index.mjs.map +1 -1
- package/web-types.json +4 -4
package/select/index.mjs
CHANGED
|
@@ -648,6 +648,7 @@ var script = {
|
|
|
648
648
|
}
|
|
649
649
|
},
|
|
650
650
|
onOverlayEnter: function onOverlayEnter(el) {
|
|
651
|
+
var _this3 = this;
|
|
651
652
|
ZIndex.set('overlay', el, this.$primevue.config.zIndex.overlay);
|
|
652
653
|
addStyle(el, {
|
|
653
654
|
position: 'absolute',
|
|
@@ -656,7 +657,9 @@ var script = {
|
|
|
656
657
|
});
|
|
657
658
|
this.alignOverlay();
|
|
658
659
|
this.scrollInView();
|
|
659
|
-
|
|
660
|
+
setTimeout(function () {
|
|
661
|
+
_this3.autoFilterFocus && focus(_this3.$refs.filterInput.$el);
|
|
662
|
+
}, 1);
|
|
660
663
|
},
|
|
661
664
|
onOverlayAfterEnter: function onOverlayAfterEnter() {
|
|
662
665
|
this.bindOutsideClickListener();
|
|
@@ -665,10 +668,15 @@ var script = {
|
|
|
665
668
|
this.$emit('show');
|
|
666
669
|
},
|
|
667
670
|
onOverlayLeave: function onOverlayLeave() {
|
|
671
|
+
var _this4 = this;
|
|
668
672
|
this.unbindOutsideClickListener();
|
|
669
673
|
this.unbindScrollListener();
|
|
670
674
|
this.unbindResizeListener();
|
|
671
|
-
this.autoFilterFocus &&
|
|
675
|
+
if (this.autoFilterFocus && this.filter) {
|
|
676
|
+
this.$nextTick(function () {
|
|
677
|
+
focus(_this4.$refs.filterInput.$el);
|
|
678
|
+
});
|
|
679
|
+
}
|
|
672
680
|
this.$emit('hide');
|
|
673
681
|
this.overlay = null;
|
|
674
682
|
},
|
|
@@ -684,11 +692,11 @@ var script = {
|
|
|
684
692
|
}
|
|
685
693
|
},
|
|
686
694
|
bindOutsideClickListener: function bindOutsideClickListener() {
|
|
687
|
-
var
|
|
695
|
+
var _this5 = this;
|
|
688
696
|
if (!this.outsideClickListener) {
|
|
689
697
|
this.outsideClickListener = function (event) {
|
|
690
|
-
if (
|
|
691
|
-
|
|
698
|
+
if (_this5.overlayVisible && _this5.overlay && !_this5.$el.contains(event.target) && !_this5.overlay.contains(event.target)) {
|
|
699
|
+
_this5.hide();
|
|
692
700
|
}
|
|
693
701
|
};
|
|
694
702
|
document.addEventListener('click', this.outsideClickListener);
|
|
@@ -701,11 +709,11 @@ var script = {
|
|
|
701
709
|
}
|
|
702
710
|
},
|
|
703
711
|
bindScrollListener: function bindScrollListener() {
|
|
704
|
-
var
|
|
712
|
+
var _this6 = this;
|
|
705
713
|
if (!this.scrollHandler) {
|
|
706
714
|
this.scrollHandler = new ConnectedOverlayScrollHandler(this.$refs.container, function () {
|
|
707
|
-
if (
|
|
708
|
-
|
|
715
|
+
if (_this6.overlayVisible) {
|
|
716
|
+
_this6.hide();
|
|
709
717
|
}
|
|
710
718
|
});
|
|
711
719
|
}
|
|
@@ -717,11 +725,11 @@ var script = {
|
|
|
717
725
|
}
|
|
718
726
|
},
|
|
719
727
|
bindResizeListener: function bindResizeListener() {
|
|
720
|
-
var
|
|
728
|
+
var _this7 = this;
|
|
721
729
|
if (!this.resizeListener) {
|
|
722
730
|
this.resizeListener = function () {
|
|
723
|
-
if (
|
|
724
|
-
|
|
731
|
+
if (_this7.overlayVisible && !isTouchDevice()) {
|
|
732
|
+
_this7.hide();
|
|
725
733
|
}
|
|
726
734
|
};
|
|
727
735
|
window.addEventListener('resize', this.resizeListener);
|
|
@@ -734,12 +742,12 @@ var script = {
|
|
|
734
742
|
}
|
|
735
743
|
},
|
|
736
744
|
bindLabelClickListener: function bindLabelClickListener() {
|
|
737
|
-
var
|
|
745
|
+
var _this8 = this;
|
|
738
746
|
if (!this.editable && !this.labelClickListener) {
|
|
739
|
-
var label = document.querySelector("label[for=\"".concat(this.
|
|
747
|
+
var label = document.querySelector("label[for=\"".concat(this.labelId, "\"]"));
|
|
740
748
|
if (label && isVisible(label)) {
|
|
741
749
|
this.labelClickListener = function () {
|
|
742
|
-
focus(
|
|
750
|
+
focus(_this8.$refs.focusInput);
|
|
743
751
|
};
|
|
744
752
|
label.addEventListener('click', this.labelClickListener);
|
|
745
753
|
}
|
|
@@ -747,7 +755,7 @@ var script = {
|
|
|
747
755
|
},
|
|
748
756
|
unbindLabelClickListener: function unbindLabelClickListener() {
|
|
749
757
|
if (this.labelClickListener) {
|
|
750
|
-
var label = document.querySelector("label[for=\"".concat(this.
|
|
758
|
+
var label = document.querySelector("label[for=\"".concat(this.labelId, "\"]"));
|
|
751
759
|
if (label && isVisible(label)) {
|
|
752
760
|
label.removeEventListener('click', this.labelClickListener);
|
|
753
761
|
}
|
|
@@ -767,38 +775,38 @@ var script = {
|
|
|
767
775
|
return this.isValidOption(option) && this.isSelected(option);
|
|
768
776
|
},
|
|
769
777
|
isSelected: function isSelected(option) {
|
|
770
|
-
return
|
|
778
|
+
return equals(this.modelValue, this.getOptionValue(option), this.equalityKey);
|
|
771
779
|
},
|
|
772
780
|
findFirstOptionIndex: function findFirstOptionIndex() {
|
|
773
|
-
var
|
|
781
|
+
var _this9 = this;
|
|
774
782
|
return this.visibleOptions.findIndex(function (option) {
|
|
775
|
-
return
|
|
783
|
+
return _this9.isValidOption(option);
|
|
776
784
|
});
|
|
777
785
|
},
|
|
778
786
|
findLastOptionIndex: function findLastOptionIndex() {
|
|
779
|
-
var
|
|
787
|
+
var _this10 = this;
|
|
780
788
|
return findLastIndex(this.visibleOptions, function (option) {
|
|
781
|
-
return
|
|
789
|
+
return _this10.isValidOption(option);
|
|
782
790
|
});
|
|
783
791
|
},
|
|
784
792
|
findNextOptionIndex: function findNextOptionIndex(index) {
|
|
785
|
-
var
|
|
793
|
+
var _this11 = this;
|
|
786
794
|
var matchedOptionIndex = index < this.visibleOptions.length - 1 ? this.visibleOptions.slice(index + 1).findIndex(function (option) {
|
|
787
|
-
return
|
|
795
|
+
return _this11.isValidOption(option);
|
|
788
796
|
}) : -1;
|
|
789
797
|
return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : index;
|
|
790
798
|
},
|
|
791
799
|
findPrevOptionIndex: function findPrevOptionIndex(index) {
|
|
792
|
-
var
|
|
800
|
+
var _this12 = this;
|
|
793
801
|
var matchedOptionIndex = index > 0 ? findLastIndex(this.visibleOptions.slice(0, index), function (option) {
|
|
794
|
-
return
|
|
802
|
+
return _this12.isValidOption(option);
|
|
795
803
|
}) : -1;
|
|
796
804
|
return matchedOptionIndex > -1 ? matchedOptionIndex : index;
|
|
797
805
|
},
|
|
798
806
|
findSelectedOptionIndex: function findSelectedOptionIndex() {
|
|
799
|
-
var
|
|
807
|
+
var _this13 = this;
|
|
800
808
|
return this.hasSelectedOption ? this.visibleOptions.findIndex(function (option) {
|
|
801
|
-
return
|
|
809
|
+
return _this13.isValidSelectedOption(option);
|
|
802
810
|
}) : -1;
|
|
803
811
|
},
|
|
804
812
|
findFirstFocusedOptionIndex: function findFirstFocusedOptionIndex() {
|
|
@@ -810,21 +818,21 @@ var script = {
|
|
|
810
818
|
return selectedIndex < 0 ? this.findLastOptionIndex() : selectedIndex;
|
|
811
819
|
},
|
|
812
820
|
searchOptions: function searchOptions(event, _char) {
|
|
813
|
-
var
|
|
821
|
+
var _this14 = this;
|
|
814
822
|
this.searchValue = (this.searchValue || '') + _char;
|
|
815
823
|
var optionIndex = -1;
|
|
816
824
|
var matched = false;
|
|
817
825
|
if (isNotEmpty(this.searchValue)) {
|
|
818
826
|
if (this.focusedOptionIndex !== -1) {
|
|
819
827
|
optionIndex = this.visibleOptions.slice(this.focusedOptionIndex).findIndex(function (option) {
|
|
820
|
-
return
|
|
828
|
+
return _this14.isOptionMatched(option);
|
|
821
829
|
});
|
|
822
830
|
optionIndex = optionIndex === -1 ? this.visibleOptions.slice(0, this.focusedOptionIndex).findIndex(function (option) {
|
|
823
|
-
return
|
|
831
|
+
return _this14.isOptionMatched(option);
|
|
824
832
|
}) : optionIndex + this.focusedOptionIndex;
|
|
825
833
|
} else {
|
|
826
834
|
optionIndex = this.visibleOptions.findIndex(function (option) {
|
|
827
|
-
return
|
|
835
|
+
return _this14.isOptionMatched(option);
|
|
828
836
|
});
|
|
829
837
|
}
|
|
830
838
|
if (optionIndex !== -1) {
|
|
@@ -841,8 +849,8 @@ var script = {
|
|
|
841
849
|
clearTimeout(this.searchTimeout);
|
|
842
850
|
}
|
|
843
851
|
this.searchTimeout = setTimeout(function () {
|
|
844
|
-
|
|
845
|
-
|
|
852
|
+
_this14.searchValue = '';
|
|
853
|
+
_this14.searchTimeout = null;
|
|
846
854
|
}, 500);
|
|
847
855
|
return matched;
|
|
848
856
|
},
|
|
@@ -856,18 +864,18 @@ var script = {
|
|
|
856
864
|
}
|
|
857
865
|
},
|
|
858
866
|
scrollInView: function scrollInView() {
|
|
859
|
-
var
|
|
867
|
+
var _this15 = this;
|
|
860
868
|
var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;
|
|
861
869
|
this.$nextTick(function () {
|
|
862
|
-
var id = index !== -1 ? "".concat(
|
|
863
|
-
var element = findSingle(
|
|
870
|
+
var id = index !== -1 ? "".concat(_this15.id, "_").concat(index) : _this15.focusedOptionId;
|
|
871
|
+
var element = findSingle(_this15.list, "li[id=\"".concat(id, "\"]"));
|
|
864
872
|
if (element) {
|
|
865
873
|
element.scrollIntoView && element.scrollIntoView({
|
|
866
874
|
block: 'nearest',
|
|
867
875
|
inline: 'start'
|
|
868
876
|
});
|
|
869
|
-
} else if (!
|
|
870
|
-
|
|
877
|
+
} else if (!_this15.virtualScrollerDisabled) {
|
|
878
|
+
_this15.virtualScroller && _this15.virtualScroller.scrollToIndex(index !== -1 ? index : _this15.focusedOptionIndex);
|
|
871
879
|
}
|
|
872
880
|
});
|
|
873
881
|
},
|
|
@@ -885,14 +893,14 @@ var script = {
|
|
|
885
893
|
});
|
|
886
894
|
},
|
|
887
895
|
flatOptions: function flatOptions(options) {
|
|
888
|
-
var
|
|
896
|
+
var _this16 = this;
|
|
889
897
|
return (options || []).reduce(function (result, option, index) {
|
|
890
898
|
result.push({
|
|
891
899
|
optionGroup: option,
|
|
892
900
|
group: true,
|
|
893
901
|
index: index
|
|
894
902
|
});
|
|
895
|
-
var optionGroupChildren =
|
|
903
|
+
var optionGroupChildren = _this16.getOptionGroupChildren(option);
|
|
896
904
|
optionGroupChildren && optionGroupChildren.forEach(function (o) {
|
|
897
905
|
return result.push(o);
|
|
898
906
|
});
|
|
@@ -912,7 +920,7 @@ var script = {
|
|
|
912
920
|
},
|
|
913
921
|
computed: {
|
|
914
922
|
visibleOptions: function visibleOptions() {
|
|
915
|
-
var
|
|
923
|
+
var _this17 = this;
|
|
916
924
|
var options = this.optionGroupLabel ? this.flatOptions(this.options) : this.options || [];
|
|
917
925
|
if (this.filterValue) {
|
|
918
926
|
var filteredOptions = FilterService.filter(options, this.searchFields, this.filterValue, this.filterMatchMode, this.filterLocale);
|
|
@@ -920,11 +928,11 @@ var script = {
|
|
|
920
928
|
var optionGroups = this.options || [];
|
|
921
929
|
var filtered = [];
|
|
922
930
|
optionGroups.forEach(function (group) {
|
|
923
|
-
var groupChildren =
|
|
931
|
+
var groupChildren = _this17.getOptionGroupChildren(group);
|
|
924
932
|
var filteredItems = groupChildren.filter(function (item) {
|
|
925
933
|
return filteredOptions.includes(item);
|
|
926
934
|
});
|
|
927
|
-
if (filteredItems.length > 0) filtered.push(_objectSpread(_objectSpread({}, group), {}, _defineProperty({}, typeof
|
|
935
|
+
if (filteredItems.length > 0) filtered.push(_objectSpread(_objectSpread({}, group), {}, _defineProperty({}, typeof _this17.optionGroupChildren === 'string' ? _this17.optionGroupChildren : 'items', _toConsumableArray(filteredItems))));
|
|
928
936
|
});
|
|
929
937
|
return this.flatOptions(filtered);
|
|
930
938
|
}
|
|
@@ -974,9 +982,9 @@ var script = {
|
|
|
974
982
|
return this.focusedOptionIndex !== -1 ? "".concat(this.id, "_").concat(this.focusedOptionIndex) : null;
|
|
975
983
|
},
|
|
976
984
|
ariaSetSize: function ariaSetSize() {
|
|
977
|
-
var
|
|
985
|
+
var _this18 = this;
|
|
978
986
|
return this.visibleOptions.filter(function (option) {
|
|
979
|
-
return !
|
|
987
|
+
return !_this18.isOptionGroup(option);
|
|
980
988
|
}).length;
|
|
981
989
|
},
|
|
982
990
|
isClearIconVisible: function isClearIconVisible() {
|
|
@@ -1091,7 +1099,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1091
1099
|
value: _ctx.modelValue,
|
|
1092
1100
|
placeholder: _ctx.placeholder
|
|
1093
1101
|
}, function () {
|
|
1094
|
-
|
|
1102
|
+
var _$options$label;
|
|
1103
|
+
return [createTextVNode(toDisplayString($options.label === 'p-emptylabel' ? ' ' : (_$options$label = $options.label) !== null && _$options$label !== void 0 ? _$options$label : 'empty'), 1)];
|
|
1095
1104
|
})], 16, _hoisted_3)), $options.isClearIconVisible ? renderSlot(_ctx.$slots, "clearicon", {
|
|
1096
1105
|
key: 2,
|
|
1097
1106
|
"class": normalizeClass(_ctx.cx('clearIcon')),
|