primevue 4.3.2 → 4.3.4
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/accordionheader/AccordionHeader.vue +1 -1
- package/accordionheader/index.d.ts +6 -1
- package/accordionheader/index.mjs +1 -1
- package/accordionheader/index.mjs.map +1 -1
- package/autocomplete/AutoComplete.vue +60 -11
- package/autocomplete/index.d.ts +4 -0
- package/autocomplete/index.mjs +96 -59
- package/autocomplete/index.mjs.map +1 -1
- package/cascadeselect/CascadeSelect.vue +4 -1
- package/cascadeselect/CascadeSelectSub.vue +1 -1
- package/cascadeselect/index.mjs +22 -20
- package/cascadeselect/index.mjs.map +1 -1
- package/checkbox/Checkbox.vue +1 -1
- package/checkbox/index.mjs +2 -1
- package/checkbox/index.mjs.map +1 -1
- package/chip/BaseChip.vue +1 -1
- package/chip/index.d.ts +1 -1
- package/chip/index.mjs +1 -1
- package/chip/index.mjs.map +1 -1
- package/colorpicker/ColorPicker.vue +5 -1
- package/colorpicker/index.mjs +5 -1
- package/colorpicker/index.mjs.map +1 -1
- package/confirmationoptions/index.d.ts +1 -1
- package/confirmdialog/index.d.ts +4 -0
- package/contextmenu/index.mjs +12 -12
- package/contextmenu/index.mjs.map +1 -1
- package/datatable/BodyCell.vue +1 -0
- package/datatable/ColumnFilter.vue +3 -3
- package/datatable/DataTable.vue +103 -44
- package/datatable/HeaderCheckbox.vue +2 -2
- package/datatable/RowCheckbox.vue +1 -1
- package/datatable/TableBody.vue +12 -1
- package/datatable/TableFooter.vue +9 -1
- package/datatable/TableHeader.vue +9 -2
- package/datatable/index.d.ts +37 -29
- package/datatable/index.mjs +175 -111
- package/datatable/index.mjs.map +1 -1
- package/datatable/style/index.mjs +4 -4
- package/datatable/style/index.mjs.map +1 -1
- package/dataview/DataView.vue +4 -0
- package/dataview/index.d.ts +63 -6
- package/dataview/index.mjs +6 -2
- package/dataview/index.mjs.map +1 -1
- package/datepicker/DatePicker.vue +379 -236
- package/datepicker/index.d.ts +156 -0
- package/datepicker/index.mjs +676 -406
- package/datepicker/index.mjs.map +1 -1
- package/drawer/Drawer.vue +30 -20
- package/drawer/index.d.ts +10 -0
- package/drawer/index.mjs +42 -25
- package/drawer/index.mjs.map +1 -1
- package/fileupload/FileUpload.vue +3 -4
- package/fileupload/index.mjs +8 -10
- package/fileupload/index.mjs.map +1 -1
- package/galleria/Galleria.vue +39 -3
- package/galleria/index.mjs +40 -3
- package/galleria/index.mjs.map +1 -1
- package/image/Image.vue +1 -1
- package/image/index.mjs +1 -1
- package/image/index.mjs.map +1 -1
- package/inplace/Inplace.vue +1 -1
- package/inplace/index.mjs +3 -2
- package/inplace/index.mjs.map +1 -1
- package/inputmask/InputMask.vue +3 -3
- package/inputmask/index.d.ts +3 -3
- package/inputmask/index.mjs +3 -3
- package/inputmask/index.mjs.map +1 -1
- package/inputnumber/BaseInputNumber.vue +4 -0
- package/inputnumber/InputNumber.vue +3 -10
- package/inputnumber/index.mjs +8 -9
- package/inputnumber/index.mjs.map +1 -1
- package/keyfilter/index.mjs +12 -19
- package/keyfilter/index.mjs.map +1 -1
- package/listbox/Listbox.vue +10 -2
- package/listbox/index.mjs +38 -29
- package/listbox/index.mjs.map +1 -1
- package/megamenu/index.d.ts +1 -1
- package/megamenu/index.mjs +11 -11
- package/megamenu/index.mjs.map +1 -1
- package/menu/Menu.vue +12 -6
- package/menu/Menuitem.vue +14 -4
- package/menu/index.d.ts +3 -12
- package/menu/index.mjs +40 -20
- package/menu/index.mjs.map +1 -1
- package/menubar/index.mjs +16 -16
- package/menubar/index.mjs.map +1 -1
- package/metergroup/MeterGroup.vue +9 -3
- package/metergroup/MeterGroupLabel.vue +10 -1
- package/metergroup/index.d.ts +1 -1
- package/metergroup/index.mjs +32 -7
- package/metergroup/index.mjs.map +1 -1
- package/multiselect/MultiSelect.vue +40 -6
- package/multiselect/index.d.ts +1 -1
- package/multiselect/index.mjs +100 -68
- package/multiselect/index.mjs.map +1 -1
- package/organizationchart/OrganizationChartNode.vue +1 -1
- package/organizationchart/index.mjs.map +1 -1
- package/organizationchart/style/index.mjs +11 -6
- package/organizationchart/style/index.mjs.map +1 -1
- package/package.json +6 -6
- package/paginator/Paginator.vue +2 -0
- package/paginator/index.d.ts +8 -0
- package/paginator/index.mjs +3 -1
- package/paginator/index.mjs.map +1 -1
- package/panel/Panel.vue +2 -2
- package/panel/index.mjs +2 -2
- package/panel/index.mjs.map +1 -1
- package/panelmenu/PanelMenuList.vue +1 -1
- package/panelmenu/index.mjs +4 -4
- package/panelmenu/index.mjs.map +1 -1
- package/password/Password.vue +28 -6
- package/password/index.mjs +44 -16
- package/password/index.mjs.map +1 -1
- package/popover/Popover.vue +1 -1
- package/popover/index.mjs +1 -2
- package/popover/index.mjs.map +1 -1
- package/progressbar/ProgressBar.vue +4 -4
- package/progressbar/index.mjs +8 -12
- package/progressbar/index.mjs.map +1 -1
- package/scrolltop/ScrollTop.vue +2 -2
- package/scrolltop/index.mjs +4 -2
- package/scrolltop/index.mjs.map +1 -1
- package/select/Select.vue +68 -13
- package/select/index.mjs +128 -77
- package/select/index.mjs.map +1 -1
- package/selectbutton/index.d.ts +0 -24
- package/splitter/Splitter.vue +10 -2
- package/splitter/index.d.ts +1 -1
- package/splitter/index.mjs +19 -7
- package/splitter/index.mjs.map +1 -1
- package/splitter/style/index.mjs +1 -13
- package/splitter/style/index.mjs.map +1 -1
- package/step/Step.vue +27 -9
- package/step/index.mjs +46 -16
- package/step/index.mjs.map +1 -1
- package/steppanel/StepPanel.vue +11 -5
- package/steppanel/index.d.ts +8 -0
- package/steppanel/index.mjs +25 -10
- package/steppanel/index.mjs.map +1 -1
- package/stepper/StepperSeparator.vue +5 -2
- package/tab/Tab.vue +4 -4
- package/tab/index.mjs +4 -4
- package/tab/index.mjs.map +1 -1
- package/tablist/TabList.vue +3 -0
- package/tablist/index.mjs +1 -0
- package/tablist/index.mjs.map +1 -1
- package/tabpanel/TabPanel.vue +2 -2
- package/tabpanel/index.mjs +2 -2
- package/tabpanel/index.mjs.map +1 -1
- package/tieredmenu/TieredMenu.vue +1 -1
- package/tieredmenu/index.mjs +13 -14
- package/tieredmenu/index.mjs.map +1 -1
- package/tooltip/index.mjs +47 -30
- package/tooltip/index.mjs.map +1 -1
- package/tree/Tree.vue +14 -2
- package/tree/TreeNode.vue +2 -2
- package/tree/index.mjs +28 -10
- package/tree/index.mjs.map +1 -1
- package/treeselect/TreeSelect.vue +4 -1
- package/treeselect/index.mjs +4 -2
- package/treeselect/index.mjs.map +1 -1
- package/umd/primevue.min.js +12213 -1
- package/virtualscroller/VirtualScroller.vue +13 -2
- package/virtualscroller/index.mjs +28 -18
- package/virtualscroller/index.mjs.map +1 -1
- package/virtualscroller/style/index.mjs +1 -1
- package/virtualscroller/style/index.mjs.map +1 -1
- package/web-types.json +1 -1
package/multiselect/index.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { cn } from '@primeuix/utils';
|
|
1
2
|
import { findSingle, getFocusableElements, isTouchDevice, relativePosition, getOuterWidth, absolutePosition, addStyle, focus, getLastFocusableElement, getFirstFocusableElement } from '@primeuix/utils/dom';
|
|
2
3
|
import { isNotEmpty, isEmpty, findLastIndex, equals, isPrintableCharacter, resolveFieldData } from '@primeuix/utils/object';
|
|
3
4
|
import { ZIndex } from '@primeuix/utils/zindex';
|
|
@@ -659,13 +660,15 @@ var script = {
|
|
|
659
660
|
ZIndex.set('overlay', el, this.$primevue.config.zIndex.overlay);
|
|
660
661
|
addStyle(el, {
|
|
661
662
|
position: 'absolute',
|
|
662
|
-
top: '0'
|
|
663
|
-
left: '0'
|
|
663
|
+
top: '0'
|
|
664
664
|
});
|
|
665
665
|
this.alignOverlay();
|
|
666
666
|
this.scrollInView();
|
|
667
667
|
this.autoFilterFocus && focus(this.$refs.filterInput.$el);
|
|
668
668
|
this.autoUpdateModel();
|
|
669
|
+
|
|
670
|
+
// Issue: #7508
|
|
671
|
+
this.$attrSelector && el.setAttribute(this.$attrSelector, '');
|
|
669
672
|
},
|
|
670
673
|
onOverlayAfterEnter: function onOverlayAfterEnter() {
|
|
671
674
|
this.bindOutsideClickListener();
|
|
@@ -761,7 +764,7 @@ var script = {
|
|
|
761
764
|
return selectedItemsLabel;
|
|
762
765
|
},
|
|
763
766
|
onToggleAll: function onToggleAll(event) {
|
|
764
|
-
var
|
|
767
|
+
var _this0 = this;
|
|
765
768
|
if (this.selectAll !== null) {
|
|
766
769
|
this.$emit('selectall-change', {
|
|
767
770
|
originalEvent: event,
|
|
@@ -769,18 +772,18 @@ var script = {
|
|
|
769
772
|
});
|
|
770
773
|
} else {
|
|
771
774
|
var value = this.allSelected ? [] : this.visibleOptions.filter(function (option) {
|
|
772
|
-
return
|
|
775
|
+
return _this0.isValidOption(option);
|
|
773
776
|
}).map(function (option) {
|
|
774
|
-
return
|
|
777
|
+
return _this0.getOptionValue(option);
|
|
775
778
|
});
|
|
776
779
|
this.updateModel(event, value);
|
|
777
780
|
}
|
|
778
781
|
},
|
|
779
782
|
removeOption: function removeOption(event, optionValue) {
|
|
780
|
-
var
|
|
783
|
+
var _this1 = this;
|
|
781
784
|
event.stopPropagation();
|
|
782
785
|
var value = this.d_value.filter(function (val) {
|
|
783
|
-
return !equals(val, optionValue,
|
|
786
|
+
return !equals(val, optionValue, _this1.equalityKey);
|
|
784
787
|
});
|
|
785
788
|
this.updateModel(event, value);
|
|
786
789
|
},
|
|
@@ -804,45 +807,45 @@ var script = {
|
|
|
804
807
|
return equals(value1, value2, this.equalityKey);
|
|
805
808
|
},
|
|
806
809
|
isSelected: function isSelected(option) {
|
|
807
|
-
var
|
|
810
|
+
var _this10 = this;
|
|
808
811
|
var optionValue = this.getOptionValue(option);
|
|
809
812
|
return (this.d_value || []).some(function (value) {
|
|
810
|
-
return
|
|
813
|
+
return _this10.isEquals(value, optionValue);
|
|
811
814
|
});
|
|
812
815
|
},
|
|
813
816
|
findFirstOptionIndex: function findFirstOptionIndex() {
|
|
814
|
-
var
|
|
817
|
+
var _this11 = this;
|
|
815
818
|
return this.visibleOptions.findIndex(function (option) {
|
|
816
|
-
return
|
|
819
|
+
return _this11.isValidOption(option);
|
|
817
820
|
});
|
|
818
821
|
},
|
|
819
822
|
findLastOptionIndex: function findLastOptionIndex() {
|
|
820
|
-
var
|
|
823
|
+
var _this12 = this;
|
|
821
824
|
return findLastIndex(this.visibleOptions, function (option) {
|
|
822
|
-
return
|
|
825
|
+
return _this12.isValidOption(option);
|
|
823
826
|
});
|
|
824
827
|
},
|
|
825
828
|
findNextOptionIndex: function findNextOptionIndex(index) {
|
|
826
|
-
var
|
|
829
|
+
var _this13 = this;
|
|
827
830
|
var matchedOptionIndex = index < this.visibleOptions.length - 1 ? this.visibleOptions.slice(index + 1).findIndex(function (option) {
|
|
828
|
-
return
|
|
831
|
+
return _this13.isValidOption(option);
|
|
829
832
|
}) : -1;
|
|
830
833
|
return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : index;
|
|
831
834
|
},
|
|
832
835
|
findPrevOptionIndex: function findPrevOptionIndex(index) {
|
|
833
|
-
var
|
|
836
|
+
var _this14 = this;
|
|
834
837
|
var matchedOptionIndex = index > 0 ? findLastIndex(this.visibleOptions.slice(0, index), function (option) {
|
|
835
|
-
return
|
|
838
|
+
return _this14.isValidOption(option);
|
|
836
839
|
}) : -1;
|
|
837
840
|
return matchedOptionIndex > -1 ? matchedOptionIndex : index;
|
|
838
841
|
},
|
|
839
842
|
findSelectedOptionIndex: function findSelectedOptionIndex() {
|
|
840
|
-
var
|
|
843
|
+
var _this15 = this;
|
|
841
844
|
if (this.$filled) {
|
|
842
845
|
var _loop = function _loop() {
|
|
843
|
-
var value =
|
|
844
|
-
var matchedOptionIndex =
|
|
845
|
-
return
|
|
846
|
+
var value = _this15.d_value[index];
|
|
847
|
+
var matchedOptionIndex = _this15.visibleOptions.findIndex(function (option) {
|
|
848
|
+
return _this15.isValidSelectedOption(option) && _this15.isEquals(value, _this15.getOptionValue(option));
|
|
846
849
|
});
|
|
847
850
|
if (matchedOptionIndex > -1) return {
|
|
848
851
|
v: matchedOptionIndex
|
|
@@ -857,28 +860,28 @@ var script = {
|
|
|
857
860
|
return -1;
|
|
858
861
|
},
|
|
859
862
|
findFirstSelectedOptionIndex: function findFirstSelectedOptionIndex() {
|
|
860
|
-
var
|
|
863
|
+
var _this16 = this;
|
|
861
864
|
return this.$filled ? this.visibleOptions.findIndex(function (option) {
|
|
862
|
-
return
|
|
865
|
+
return _this16.isValidSelectedOption(option);
|
|
863
866
|
}) : -1;
|
|
864
867
|
},
|
|
865
868
|
findLastSelectedOptionIndex: function findLastSelectedOptionIndex() {
|
|
866
|
-
var
|
|
869
|
+
var _this17 = this;
|
|
867
870
|
return this.$filled ? findLastIndex(this.visibleOptions, function (option) {
|
|
868
|
-
return
|
|
871
|
+
return _this17.isValidSelectedOption(option);
|
|
869
872
|
}) : -1;
|
|
870
873
|
},
|
|
871
874
|
findNextSelectedOptionIndex: function findNextSelectedOptionIndex(index) {
|
|
872
|
-
var
|
|
875
|
+
var _this18 = this;
|
|
873
876
|
var matchedOptionIndex = this.$filled && index < this.visibleOptions.length - 1 ? this.visibleOptions.slice(index + 1).findIndex(function (option) {
|
|
874
|
-
return
|
|
877
|
+
return _this18.isValidSelectedOption(option);
|
|
875
878
|
}) : -1;
|
|
876
879
|
return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : -1;
|
|
877
880
|
},
|
|
878
881
|
findPrevSelectedOptionIndex: function findPrevSelectedOptionIndex(index) {
|
|
879
|
-
var
|
|
882
|
+
var _this19 = this;
|
|
880
883
|
var matchedOptionIndex = this.$filled && index > 0 ? findLastIndex(this.visibleOptions.slice(0, index), function (option) {
|
|
881
|
-
return
|
|
884
|
+
return _this19.isValidSelectedOption(option);
|
|
882
885
|
}) : -1;
|
|
883
886
|
return matchedOptionIndex > -1 ? matchedOptionIndex : -1;
|
|
884
887
|
},
|
|
@@ -897,7 +900,7 @@ var script = {
|
|
|
897
900
|
return matchedOptionIndex > -1 ? matchedOptionIndex : index;
|
|
898
901
|
},
|
|
899
902
|
findFirstFocusedOptionIndex: function findFirstFocusedOptionIndex() {
|
|
900
|
-
var selectedIndex = this.
|
|
903
|
+
var selectedIndex = this.findFirstSelectedOptionIndex();
|
|
901
904
|
return selectedIndex < 0 ? this.findFirstOptionIndex() : selectedIndex;
|
|
902
905
|
},
|
|
903
906
|
findLastFocusedOptionIndex: function findLastFocusedOptionIndex() {
|
|
@@ -905,20 +908,20 @@ var script = {
|
|
|
905
908
|
return selectedIndex < 0 ? this.findLastOptionIndex() : selectedIndex;
|
|
906
909
|
},
|
|
907
910
|
searchOptions: function searchOptions(event) {
|
|
908
|
-
var
|
|
911
|
+
var _this20 = this;
|
|
909
912
|
this.searchValue = (this.searchValue || '') + event.key;
|
|
910
913
|
var optionIndex = -1;
|
|
911
914
|
if (isNotEmpty(this.searchValue)) {
|
|
912
915
|
if (this.focusedOptionIndex !== -1) {
|
|
913
916
|
optionIndex = this.visibleOptions.slice(this.focusedOptionIndex).findIndex(function (option) {
|
|
914
|
-
return
|
|
917
|
+
return _this20.isOptionMatched(option);
|
|
915
918
|
});
|
|
916
919
|
optionIndex = optionIndex === -1 ? this.visibleOptions.slice(0, this.focusedOptionIndex).findIndex(function (option) {
|
|
917
|
-
return
|
|
920
|
+
return _this20.isOptionMatched(option);
|
|
918
921
|
}) : optionIndex + this.focusedOptionIndex;
|
|
919
922
|
} else {
|
|
920
923
|
optionIndex = this.visibleOptions.findIndex(function (option) {
|
|
921
|
-
return
|
|
924
|
+
return _this20.isOptionMatched(option);
|
|
922
925
|
});
|
|
923
926
|
}
|
|
924
927
|
if (optionIndex === -1 && this.focusedOptionIndex === -1) {
|
|
@@ -932,8 +935,8 @@ var script = {
|
|
|
932
935
|
clearTimeout(this.searchTimeout);
|
|
933
936
|
}
|
|
934
937
|
this.searchTimeout = setTimeout(function () {
|
|
935
|
-
|
|
936
|
-
|
|
938
|
+
_this20.searchValue = '';
|
|
939
|
+
_this20.searchTimeout = null;
|
|
937
940
|
}, 500);
|
|
938
941
|
},
|
|
939
942
|
changeFocusedOptionIndex: function changeFocusedOptionIndex(event, index) {
|
|
@@ -946,18 +949,18 @@ var script = {
|
|
|
946
949
|
}
|
|
947
950
|
},
|
|
948
951
|
scrollInView: function scrollInView() {
|
|
949
|
-
var
|
|
952
|
+
var _this21 = this;
|
|
950
953
|
var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;
|
|
951
954
|
this.$nextTick(function () {
|
|
952
|
-
var id = index !== -1 ? "".concat(
|
|
953
|
-
var element = findSingle(
|
|
955
|
+
var id = index !== -1 ? "".concat(_this21.$id, "_").concat(index) : _this21.focusedOptionId;
|
|
956
|
+
var element = findSingle(_this21.list, "li[id=\"".concat(id, "\"]"));
|
|
954
957
|
if (element) {
|
|
955
958
|
element.scrollIntoView && element.scrollIntoView({
|
|
956
959
|
block: 'nearest',
|
|
957
960
|
inline: 'nearest'
|
|
958
961
|
});
|
|
959
|
-
} else if (!
|
|
960
|
-
|
|
962
|
+
} else if (!_this21.virtualScrollerDisabled) {
|
|
963
|
+
_this21.virtualScroller && _this21.virtualScroller.scrollToIndex(index !== -1 ? index : _this21.focusedOptionIndex);
|
|
961
964
|
}
|
|
962
965
|
});
|
|
963
966
|
},
|
|
@@ -978,14 +981,14 @@ var script = {
|
|
|
978
981
|
});
|
|
979
982
|
},
|
|
980
983
|
flatOptions: function flatOptions(options) {
|
|
981
|
-
var
|
|
984
|
+
var _this22 = this;
|
|
982
985
|
return (options || []).reduce(function (result, option, index) {
|
|
983
986
|
result.push({
|
|
984
987
|
optionGroup: option,
|
|
985
988
|
group: true,
|
|
986
989
|
index: index
|
|
987
990
|
});
|
|
988
|
-
var optionGroupChildren =
|
|
991
|
+
var optionGroupChildren = _this22.getOptionGroupChildren(option);
|
|
989
992
|
optionGroupChildren && optionGroupChildren.forEach(function (o) {
|
|
990
993
|
return result.push(o);
|
|
991
994
|
});
|
|
@@ -1005,7 +1008,7 @@ var script = {
|
|
|
1005
1008
|
},
|
|
1006
1009
|
computed: {
|
|
1007
1010
|
visibleOptions: function visibleOptions() {
|
|
1008
|
-
var
|
|
1011
|
+
var _this23 = this;
|
|
1009
1012
|
var options = this.optionGroupLabel ? this.flatOptions(this.options) : this.options || [];
|
|
1010
1013
|
if (this.filterValue) {
|
|
1011
1014
|
var filteredOptions = FilterService.filter(options, this.searchFields, this.filterValue, this.filterMatchMode, this.filterLocale);
|
|
@@ -1013,11 +1016,11 @@ var script = {
|
|
|
1013
1016
|
var optionGroups = this.options || [];
|
|
1014
1017
|
var filtered = [];
|
|
1015
1018
|
optionGroups.forEach(function (group) {
|
|
1016
|
-
var groupChildren =
|
|
1019
|
+
var groupChildren = _this23.getOptionGroupChildren(group);
|
|
1017
1020
|
var filteredItems = groupChildren.filter(function (item) {
|
|
1018
1021
|
return filteredOptions.includes(item);
|
|
1019
1022
|
});
|
|
1020
|
-
if (filteredItems.length > 0) filtered.push(_objectSpread(_objectSpread({}, group), {}, _defineProperty$1({}, typeof
|
|
1023
|
+
if (filteredItems.length > 0) filtered.push(_objectSpread(_objectSpread({}, group), {}, _defineProperty$1({}, typeof _this23.optionGroupChildren === 'string' ? _this23.optionGroupChildren : 'items', _toConsumableArray(filteredItems))));
|
|
1021
1024
|
});
|
|
1022
1025
|
return this.flatOptions(filtered);
|
|
1023
1026
|
}
|
|
@@ -1049,9 +1052,9 @@ var script = {
|
|
|
1049
1052
|
return isNotEmpty(this.maxSelectedLabels) && this.d_value && this.d_value.length > this.maxSelectedLabels;
|
|
1050
1053
|
},
|
|
1051
1054
|
allSelected: function allSelected() {
|
|
1052
|
-
var
|
|
1055
|
+
var _this24 = this;
|
|
1053
1056
|
return this.selectAll !== null ? this.selectAll : isNotEmpty(this.visibleOptions) && this.visibleOptions.every(function (option) {
|
|
1054
|
-
return
|
|
1057
|
+
return _this24.isOptionGroup(option) || _this24.isOptionDisabled(option) || _this24.isSelected(option);
|
|
1055
1058
|
});
|
|
1056
1059
|
},
|
|
1057
1060
|
// @deprecated use $filled instead.
|
|
@@ -1092,9 +1095,9 @@ var script = {
|
|
|
1092
1095
|
return this.focusedOptionIndex !== -1 ? "".concat(this.$id, "_").concat(this.focusedOptionIndex) : null;
|
|
1093
1096
|
},
|
|
1094
1097
|
ariaSetSize: function ariaSetSize() {
|
|
1095
|
-
var
|
|
1098
|
+
var _this25 = this;
|
|
1096
1099
|
return this.visibleOptions.filter(function (option) {
|
|
1097
|
-
return !
|
|
1100
|
+
return !_this25.isOptionGroup(option);
|
|
1098
1101
|
}).length;
|
|
1099
1102
|
},
|
|
1100
1103
|
toggleAllAriaLabel: function toggleAllAriaLabel() {
|
|
@@ -1111,6 +1114,28 @@ var script = {
|
|
|
1111
1114
|
},
|
|
1112
1115
|
isClearIconVisible: function isClearIconVisible() {
|
|
1113
1116
|
return this.showClear && this.d_value && this.d_value.length && this.d_value != null && isNotEmpty(this.options);
|
|
1117
|
+
},
|
|
1118
|
+
containerDataP: function containerDataP() {
|
|
1119
|
+
return cn(_defineProperty$1({
|
|
1120
|
+
invalid: this.$invalid,
|
|
1121
|
+
disabled: this.disabled,
|
|
1122
|
+
focus: this.focused,
|
|
1123
|
+
fluid: this.$fluid,
|
|
1124
|
+
filled: this.$variant === 'filled'
|
|
1125
|
+
}, this.size, this.size));
|
|
1126
|
+
},
|
|
1127
|
+
labelDataP: function labelDataP() {
|
|
1128
|
+
return cn(_defineProperty$1(_defineProperty$1(_defineProperty$1({
|
|
1129
|
+
placeholder: this.label === this.placeholder,
|
|
1130
|
+
clearable: this.showClear,
|
|
1131
|
+
disabled: this.disabled
|
|
1132
|
+
}, this.size, this.size), 'has-chip', this.display === 'chip' && this.d_value && this.d_value.length && (this.maxSelectedLabels ? this.d_value.length <= this.maxSelectedLabels : true)), "empty", !this.placeholder && !this.$filled));
|
|
1133
|
+
},
|
|
1134
|
+
dropdownIconDataP: function dropdownIconDataP() {
|
|
1135
|
+
return cn(_defineProperty$1({}, this.size, this.size));
|
|
1136
|
+
},
|
|
1137
|
+
overlayDataP: function overlayDataP() {
|
|
1138
|
+
return cn(_defineProperty$1({}, 'portal-' + this.appendTo, 'portal-' + this.appendTo));
|
|
1114
1139
|
}
|
|
1115
1140
|
},
|
|
1116
1141
|
directives: {
|
|
@@ -1136,13 +1161,16 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1136
1161
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; }
|
|
1137
1162
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
1138
1163
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
1139
|
-
var _hoisted_1 = ["
|
|
1140
|
-
var _hoisted_2 =
|
|
1164
|
+
var _hoisted_1 = ["data-p"];
|
|
1165
|
+
var _hoisted_2 = ["id", "disabled", "placeholder", "tabindex", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant", "aria-invalid"];
|
|
1166
|
+
var _hoisted_3 = ["data-p"];
|
|
1167
|
+
var _hoisted_4 = {
|
|
1141
1168
|
key: 0
|
|
1142
1169
|
};
|
|
1143
|
-
var
|
|
1144
|
-
var
|
|
1145
|
-
var
|
|
1170
|
+
var _hoisted_5 = ["data-p"];
|
|
1171
|
+
var _hoisted_6 = ["id", "aria-label"];
|
|
1172
|
+
var _hoisted_7 = ["id"];
|
|
1173
|
+
var _hoisted_8 = ["id", "aria-label", "aria-selected", "aria-disabled", "aria-setsize", "aria-posinset", "onClick", "onMousemove", "data-p-selected", "data-p-focused", "data-p-disabled"];
|
|
1146
1174
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1147
1175
|
var _component_Chip = resolveComponent("Chip");
|
|
1148
1176
|
var _component_SpinnerIcon = resolveComponent("SpinnerIcon");
|
|
@@ -1160,7 +1188,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1160
1188
|
style: _ctx.sx('root'),
|
|
1161
1189
|
onClick: _cache[7] || (_cache[7] = function () {
|
|
1162
1190
|
return $options.onContainerClick && $options.onContainerClick.apply($options, arguments);
|
|
1163
|
-
})
|
|
1191
|
+
}),
|
|
1192
|
+
"data-p": $options.containerDataP
|
|
1164
1193
|
}, _ctx.ptmi('root')), [createElementVNode("div", mergeProps({
|
|
1165
1194
|
"class": "p-hidden-accessible"
|
|
1166
1195
|
}, _ctx.ptm('hiddenInputContainer'), {
|
|
@@ -1190,10 +1219,11 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1190
1219
|
onKeydown: _cache[2] || (_cache[2] = function () {
|
|
1191
1220
|
return $options.onKeyDown && $options.onKeyDown.apply($options, arguments);
|
|
1192
1221
|
})
|
|
1193
|
-
}, _ctx.ptm('hiddenInput')), null, 16,
|
|
1222
|
+
}, _ctx.ptm('hiddenInput')), null, 16, _hoisted_2)], 16), createElementVNode("div", mergeProps({
|
|
1194
1223
|
"class": _ctx.cx('labelContainer')
|
|
1195
1224
|
}, _ctx.ptm('labelContainer')), [createElementVNode("div", mergeProps({
|
|
1196
|
-
"class": _ctx.cx('label')
|
|
1225
|
+
"class": _ctx.cx('label'),
|
|
1226
|
+
"data-p": $options.labelDataP
|
|
1197
1227
|
}, _ctx.ptm('label')), [renderSlot(_ctx.$slots, "value", {
|
|
1198
1228
|
value: _ctx.d_value,
|
|
1199
1229
|
placeholder: _ctx.placeholder
|
|
@@ -1202,7 +1232,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1202
1232
|
key: 0
|
|
1203
1233
|
}, [createTextVNode(toDisplayString($options.label || 'empty'), 1)], 64)) : _ctx.display === 'chip' ? (openBlock(), createElementBlock(Fragment, {
|
|
1204
1234
|
key: 1
|
|
1205
|
-
}, [$options.chipSelectedItems ? (openBlock(), createElementBlock("span",
|
|
1235
|
+
}, [$options.chipSelectedItems ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString($options.label), 1)) : (openBlock(true), createElementBlock(Fragment, {
|
|
1206
1236
|
key: 1
|
|
1207
1237
|
}, renderList(_ctx.d_value, function (item) {
|
|
1208
1238
|
return openBlock(), createElementBlock("span", mergeProps({
|
|
@@ -1241,7 +1271,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1241
1271
|
}), 128)), !_ctx.d_value || _ctx.d_value.length === 0 ? (openBlock(), createElementBlock(Fragment, {
|
|
1242
1272
|
key: 2
|
|
1243
1273
|
}, [createTextVNode(toDisplayString(_ctx.placeholder || 'empty'), 1)], 64)) : createCommentVNode("", true)], 64)) : createCommentVNode("", true)];
|
|
1244
|
-
})], 16)], 16), $options.isClearIconVisible ? renderSlot(_ctx.$slots, "clearicon", {
|
|
1274
|
+
})], 16, _hoisted_3)], 16), $options.isClearIconVisible ? renderSlot(_ctx.$slots, "clearicon", {
|
|
1245
1275
|
key: 0,
|
|
1246
1276
|
"class": normalizeClass(_ctx.cx('clearIcon')),
|
|
1247
1277
|
clearCallback: $options.onClearClick
|
|
@@ -1275,8 +1305,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1275
1305
|
}, function () {
|
|
1276
1306
|
return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.dropdownIcon ? 'span' : 'ChevronDownIcon'), mergeProps({
|
|
1277
1307
|
"class": [_ctx.cx('dropdownIcon'), _ctx.dropdownIcon],
|
|
1278
|
-
"aria-hidden": "true"
|
|
1279
|
-
|
|
1308
|
+
"aria-hidden": "true",
|
|
1309
|
+
"data-p": $options.dropdownIconDataP
|
|
1310
|
+
}, _ctx.ptm('dropdownIcon')), null, 16, ["class", "data-p"]))];
|
|
1280
1311
|
})], 16), createVNode(_component_Portal, {
|
|
1281
1312
|
appendTo: _ctx.appendTo
|
|
1282
1313
|
}, {
|
|
@@ -1299,7 +1330,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1299
1330
|
}),
|
|
1300
1331
|
onKeydown: _cache[6] || (_cache[6] = function () {
|
|
1301
1332
|
return $options.onOverlayKeyDown && $options.onOverlayKeyDown.apply($options, arguments);
|
|
1302
|
-
})
|
|
1333
|
+
}),
|
|
1334
|
+
"data-p": $options.overlayDataP
|
|
1303
1335
|
}, _ctx.ptm('overlay')), [createElementVNode("span", mergeProps({
|
|
1304
1336
|
ref: "firstHiddenFocusableElementOnOverlay",
|
|
1305
1337
|
role: "presentation",
|
|
@@ -1446,7 +1478,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1446
1478
|
index: $options.getOptionIndex(i, getItemOptions)
|
|
1447
1479
|
}, function () {
|
|
1448
1480
|
return [createTextVNode(toDisplayString($options.getOptionGroupLabel(option.optionGroup)), 1)];
|
|
1449
|
-
})], 16,
|
|
1481
|
+
})], 16, _hoisted_7)) : withDirectives((openBlock(), createElementBlock("li", mergeProps({
|
|
1450
1482
|
key: 1,
|
|
1451
1483
|
id: _ctx.$id + '_' + $options.getOptionIndex(i, getItemOptions),
|
|
1452
1484
|
style: {
|
|
@@ -1505,7 +1537,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1505
1537
|
return [createElementVNode("span", mergeProps({
|
|
1506
1538
|
ref_for: true
|
|
1507
1539
|
}, _ctx.ptm('optionLabel')), toDisplayString($options.getOptionLabel(option)), 17)];
|
|
1508
|
-
})], 16,
|
|
1540
|
+
})], 16, _hoisted_8)), [[_directive_ripple]])], 64);
|
|
1509
1541
|
}), 128)), $data.filterValue && (!items || items && items.length === 0) ? (openBlock(), createElementBlock("li", mergeProps({
|
|
1510
1542
|
key: 0,
|
|
1511
1543
|
"class": _ctx.cx('emptyMessage'),
|
|
@@ -1518,7 +1550,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1518
1550
|
role: "option"
|
|
1519
1551
|
}, _ctx.ptm('emptyMessage')), [renderSlot(_ctx.$slots, "empty", {}, function () {
|
|
1520
1552
|
return [createTextVNode(toDisplayString($options.emptyMessageText), 1)];
|
|
1521
|
-
})], 16)) : createCommentVNode("", true)], 16,
|
|
1553
|
+
})], 16)) : createCommentVNode("", true)], 16, _hoisted_6)];
|
|
1522
1554
|
}),
|
|
1523
1555
|
_: 2
|
|
1524
1556
|
}, [_ctx.$slots.loader ? {
|
|
@@ -1558,13 +1590,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1558
1590
|
}, _ctx.ptm('hiddenLastFocusableEl'), {
|
|
1559
1591
|
"data-p-hidden-accessible": true,
|
|
1560
1592
|
"data-p-hidden-focusable": true
|
|
1561
|
-
}), null, 16)], 16)) : createCommentVNode("", true)];
|
|
1593
|
+
}), null, 16)], 16, _hoisted_5)) : createCommentVNode("", true)];
|
|
1562
1594
|
}),
|
|
1563
1595
|
_: 3
|
|
1564
1596
|
}, 16, ["onEnter", "onAfterEnter", "onLeave", "onAfterLeave"])];
|
|
1565
1597
|
}),
|
|
1566
1598
|
_: 3
|
|
1567
|
-
}, 8, ["appendTo"])], 16);
|
|
1599
|
+
}, 8, ["appendTo"])], 16, _hoisted_1);
|
|
1568
1600
|
}
|
|
1569
1601
|
|
|
1570
1602
|
script.render = render;
|