primevue 4.3.3 → 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 +4 -1
- package/autocomplete/index.d.ts +4 -0
- package/autocomplete/index.mjs +30 -27
- package/autocomplete/index.mjs.map +1 -1
- package/cascadeselect/CascadeSelect.vue +3 -0
- package/cascadeselect/CascadeSelectSub.vue +1 -1
- package/cascadeselect/index.mjs +21 -18
- package/cascadeselect/index.mjs.map +1 -1
- package/colorpicker/ColorPicker.vue +4 -0
- package/colorpicker/index.mjs +4 -0
- 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/ColumnFilter.vue +2 -2
- package/datatable/index.d.ts +2 -2
- package/datatable/index.mjs +12 -12
- package/datatable/index.mjs.map +1 -1
- package/datatable/style/index.mjs +4 -4
- package/datatable/style/index.mjs.map +1 -1
- package/dataview/index.d.ts +5 -5
- package/datepicker/DatePicker.vue +10 -3
- package/datepicker/index.mjs +69 -59
- package/datepicker/index.mjs.map +1 -1
- package/fileupload/FileUpload.vue +2 -3
- package/fileupload/index.mjs +6 -8
- package/fileupload/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/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/InputNumber.vue +1 -1
- package/inputnumber/index.mjs +2 -2
- package/inputnumber/index.mjs.map +1 -1
- package/inputtext/index.d.ts +2 -1
- package/listbox/Listbox.vue +1 -0
- package/listbox/index.mjs +27 -26
- 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 +4 -4
- package/menu/index.d.ts +3 -12
- package/menu/index.mjs +4 -4
- package/menu/index.mjs.map +1 -1
- package/menubar/index.mjs +16 -16
- package/menubar/index.mjs.map +1 -1
- package/metergroup/index.d.ts +1 -1
- package/multiselect/MultiSelect.vue +4 -1
- package/multiselect/index.d.ts +1 -1
- package/multiselect/index.mjs +51 -48
- 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/panel/Panel.vue +2 -2
- package/panel/index.mjs +2 -2
- package/panel/index.mjs.map +1 -1
- package/panelmenu/index.mjs +3 -3
- package/panelmenu/index.mjs.map +1 -1
- package/password/Password.vue +7 -3
- package/password/index.d.ts +1 -1
- package/password/index.mjs +14 -8
- package/password/index.mjs.map +1 -1
- package/select/Select.vue +20 -1
- package/select/index.mjs +53 -35
- package/select/index.mjs.map +1 -1
- package/selectbutton/index.d.ts +0 -24
- package/splitter/Splitter.vue +1 -1
- package/splitter/index.d.ts +1 -1
- package/splitter/index.mjs +0 -1
- 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 +2 -2
- package/step/index.mjs +2 -2
- package/step/index.mjs.map +1 -1
- package/steppanel/StepPanel.vue +2 -2
- package/steppanel/index.mjs +2 -2
- package/steppanel/index.mjs.map +1 -1
- package/textarea/index.d.ts +2 -1
- package/tieredmenu/index.mjs +12 -12
- package/tieredmenu/index.mjs.map +1 -1
- package/tooltip/index.mjs +25 -14
- package/tooltip/index.mjs.map +1 -1
- package/treeselect/TreeSelect.vue +3 -0
- package/treeselect/index.mjs +3 -0
- package/treeselect/index.mjs.map +1 -1
- package/umd/primevue.min.js +12213 -1
- package/virtualscroller/index.mjs +18 -18
- package/virtualscroller/index.mjs.map +1 -1
- package/web-types.json +1 -1
package/select/index.mjs
CHANGED
|
@@ -19,7 +19,7 @@ import Ripple from 'primevue/ripple';
|
|
|
19
19
|
import VirtualScroller from 'primevue/virtualscroller';
|
|
20
20
|
import BaseInput from '@primevue/core/baseinput';
|
|
21
21
|
import SelectStyle from 'primevue/select/style';
|
|
22
|
-
import { resolveComponent, resolveDirective, createElementBlock, openBlock, mergeProps, renderSlot, createCommentVNode, createElementVNode, createVNode, createTextVNode, toDisplayString, normalizeClass, createBlock, resolveDynamicComponent, withCtx, Transition, normalizeProps, createSlots, Fragment, renderList, withDirectives } from 'vue';
|
|
22
|
+
import { resolveComponent, resolveDirective, createElementBlock, openBlock, mergeProps, renderSlot, createCommentVNode, createElementVNode, createVNode, createTextVNode, toDisplayString, normalizeClass, createBlock, resolveDynamicComponent, withCtx, Transition, normalizeProps, createSlots, Fragment, renderList, withDirectives, withModifiers } from 'vue';
|
|
23
23
|
|
|
24
24
|
var script$1 = {
|
|
25
25
|
name: 'BaseSelect',
|
|
@@ -356,10 +356,24 @@ var script = {
|
|
|
356
356
|
}, 100);
|
|
357
357
|
},
|
|
358
358
|
onKeyDown: function onKeyDown(event) {
|
|
359
|
-
if (this.disabled
|
|
359
|
+
if (this.disabled) {
|
|
360
360
|
event.preventDefault();
|
|
361
361
|
return;
|
|
362
362
|
}
|
|
363
|
+
if (isAndroid()) {
|
|
364
|
+
switch (event.code) {
|
|
365
|
+
case 'Backspace':
|
|
366
|
+
this.onBackspaceKey(event, this.editable);
|
|
367
|
+
break;
|
|
368
|
+
case 'Enter':
|
|
369
|
+
case 'NumpadDecimal':
|
|
370
|
+
this.onEnterKey(event);
|
|
371
|
+
break;
|
|
372
|
+
default:
|
|
373
|
+
event.preventDefault();
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
363
377
|
var metaKey = event.metaKey || event.ctrlKey;
|
|
364
378
|
switch (event.code) {
|
|
365
379
|
case 'ArrowDown':
|
|
@@ -639,6 +653,9 @@ var script = {
|
|
|
639
653
|
});
|
|
640
654
|
this.alignOverlay();
|
|
641
655
|
this.scrollInView();
|
|
656
|
+
|
|
657
|
+
// Issue: #7508
|
|
658
|
+
this.$attrSelector && el.setAttribute(this.$attrSelector, '');
|
|
642
659
|
setTimeout(function () {
|
|
643
660
|
_this4.autoFilterFocus && _this4.filter && focus(_this4.$refs.filterInput.$el);
|
|
644
661
|
_this4.autoUpdateModel();
|
|
@@ -750,12 +767,12 @@ var script = {
|
|
|
750
767
|
}
|
|
751
768
|
},
|
|
752
769
|
bindMatchMediaOrientationListener: function bindMatchMediaOrientationListener() {
|
|
753
|
-
var
|
|
770
|
+
var _this0 = this;
|
|
754
771
|
if (!this.matchMediaOrientationListener) {
|
|
755
772
|
var query = matchMedia("(orientation: portrait)");
|
|
756
773
|
this.queryOrientation = query;
|
|
757
774
|
this.matchMediaOrientationListener = function () {
|
|
758
|
-
|
|
775
|
+
_this0.alignOverlay();
|
|
759
776
|
};
|
|
760
777
|
this.queryOrientation.addEventListener('change', this.matchMediaOrientationListener);
|
|
761
778
|
}
|
|
@@ -788,35 +805,35 @@ var script = {
|
|
|
788
805
|
return equals(this.d_value, this.getOptionValue(option), this.equalityKey);
|
|
789
806
|
},
|
|
790
807
|
findFirstOptionIndex: function findFirstOptionIndex() {
|
|
791
|
-
var
|
|
808
|
+
var _this1 = this;
|
|
792
809
|
return this.visibleOptions.findIndex(function (option) {
|
|
793
|
-
return
|
|
810
|
+
return _this1.isValidOption(option);
|
|
794
811
|
});
|
|
795
812
|
},
|
|
796
813
|
findLastOptionIndex: function findLastOptionIndex() {
|
|
797
|
-
var
|
|
814
|
+
var _this10 = this;
|
|
798
815
|
return findLastIndex(this.visibleOptions, function (option) {
|
|
799
|
-
return
|
|
816
|
+
return _this10.isValidOption(option);
|
|
800
817
|
});
|
|
801
818
|
},
|
|
802
819
|
findNextOptionIndex: function findNextOptionIndex(index) {
|
|
803
|
-
var
|
|
820
|
+
var _this11 = this;
|
|
804
821
|
var matchedOptionIndex = index < this.visibleOptions.length - 1 ? this.visibleOptions.slice(index + 1).findIndex(function (option) {
|
|
805
|
-
return
|
|
822
|
+
return _this11.isValidOption(option);
|
|
806
823
|
}) : -1;
|
|
807
824
|
return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : index;
|
|
808
825
|
},
|
|
809
826
|
findPrevOptionIndex: function findPrevOptionIndex(index) {
|
|
810
|
-
var
|
|
827
|
+
var _this12 = this;
|
|
811
828
|
var matchedOptionIndex = index > 0 ? findLastIndex(this.visibleOptions.slice(0, index), function (option) {
|
|
812
|
-
return
|
|
829
|
+
return _this12.isValidOption(option);
|
|
813
830
|
}) : -1;
|
|
814
831
|
return matchedOptionIndex > -1 ? matchedOptionIndex : index;
|
|
815
832
|
},
|
|
816
833
|
findSelectedOptionIndex: function findSelectedOptionIndex() {
|
|
817
|
-
var
|
|
834
|
+
var _this13 = this;
|
|
818
835
|
return this.$filled ? this.visibleOptions.findIndex(function (option) {
|
|
819
|
-
return
|
|
836
|
+
return _this13.isValidSelectedOption(option);
|
|
820
837
|
}) : -1;
|
|
821
838
|
},
|
|
822
839
|
findFirstFocusedOptionIndex: function findFirstFocusedOptionIndex() {
|
|
@@ -828,17 +845,17 @@ var script = {
|
|
|
828
845
|
return selectedIndex < 0 ? this.findLastOptionIndex() : selectedIndex;
|
|
829
846
|
},
|
|
830
847
|
searchOptions: function searchOptions(event, _char) {
|
|
831
|
-
var
|
|
848
|
+
var _this14 = this;
|
|
832
849
|
this.searchValue = (this.searchValue || '') + _char;
|
|
833
850
|
var optionIndex = -1;
|
|
834
851
|
var matched = false;
|
|
835
852
|
if (isNotEmpty(this.searchValue)) {
|
|
836
853
|
optionIndex = this.visibleOptions.findIndex(function (option) {
|
|
837
|
-
return
|
|
854
|
+
return _this14.isOptionExactMatched(option);
|
|
838
855
|
});
|
|
839
856
|
if (optionIndex === -1) {
|
|
840
857
|
optionIndex = this.visibleOptions.findIndex(function (option) {
|
|
841
|
-
return
|
|
858
|
+
return _this14.isOptionStartsWith(option);
|
|
842
859
|
});
|
|
843
860
|
}
|
|
844
861
|
if (optionIndex !== -1) {
|
|
@@ -855,8 +872,8 @@ var script = {
|
|
|
855
872
|
clearTimeout(this.searchTimeout);
|
|
856
873
|
}
|
|
857
874
|
this.searchTimeout = setTimeout(function () {
|
|
858
|
-
|
|
859
|
-
|
|
875
|
+
_this14.searchValue = '';
|
|
876
|
+
_this14.searchTimeout = null;
|
|
860
877
|
}, 500);
|
|
861
878
|
return matched;
|
|
862
879
|
},
|
|
@@ -870,18 +887,18 @@ var script = {
|
|
|
870
887
|
}
|
|
871
888
|
},
|
|
872
889
|
scrollInView: function scrollInView() {
|
|
873
|
-
var
|
|
890
|
+
var _this15 = this;
|
|
874
891
|
var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;
|
|
875
892
|
this.$nextTick(function () {
|
|
876
|
-
var id = index !== -1 ? "".concat(
|
|
877
|
-
var element = findSingle(
|
|
893
|
+
var id = index !== -1 ? "".concat(_this15.$id, "_").concat(index) : _this15.focusedOptionId;
|
|
894
|
+
var element = findSingle(_this15.list, "li[id=\"".concat(id, "\"]"));
|
|
878
895
|
if (element) {
|
|
879
896
|
element.scrollIntoView && element.scrollIntoView({
|
|
880
897
|
block: 'nearest',
|
|
881
898
|
inline: 'nearest'
|
|
882
899
|
});
|
|
883
|
-
} else if (!
|
|
884
|
-
|
|
900
|
+
} else if (!_this15.virtualScrollerDisabled) {
|
|
901
|
+
_this15.virtualScroller && _this15.virtualScroller.scrollToIndex(index !== -1 ? index : _this15.focusedOptionIndex);
|
|
885
902
|
}
|
|
886
903
|
});
|
|
887
904
|
},
|
|
@@ -901,14 +918,14 @@ var script = {
|
|
|
901
918
|
});
|
|
902
919
|
},
|
|
903
920
|
flatOptions: function flatOptions(options) {
|
|
904
|
-
var
|
|
921
|
+
var _this16 = this;
|
|
905
922
|
return (options || []).reduce(function (result, option, index) {
|
|
906
923
|
result.push({
|
|
907
924
|
optionGroup: option,
|
|
908
925
|
group: true,
|
|
909
926
|
index: index
|
|
910
927
|
});
|
|
911
|
-
var optionGroupChildren =
|
|
928
|
+
var optionGroupChildren = _this16.getOptionGroupChildren(option);
|
|
912
929
|
optionGroupChildren && optionGroupChildren.forEach(function (o) {
|
|
913
930
|
return result.push(o);
|
|
914
931
|
});
|
|
@@ -928,7 +945,7 @@ var script = {
|
|
|
928
945
|
},
|
|
929
946
|
computed: {
|
|
930
947
|
visibleOptions: function visibleOptions() {
|
|
931
|
-
var
|
|
948
|
+
var _this17 = this;
|
|
932
949
|
var options = this.optionGroupLabel ? this.flatOptions(this.options) : this.options || [];
|
|
933
950
|
if (this.filterValue) {
|
|
934
951
|
var filteredOptions = FilterService.filter(options, this.searchFields, this.filterValue, this.filterMatchMode, this.filterLocale);
|
|
@@ -936,11 +953,11 @@ var script = {
|
|
|
936
953
|
var optionGroups = this.options || [];
|
|
937
954
|
var filtered = [];
|
|
938
955
|
optionGroups.forEach(function (group) {
|
|
939
|
-
var groupChildren =
|
|
956
|
+
var groupChildren = _this17.getOptionGroupChildren(group);
|
|
940
957
|
var filteredItems = groupChildren.filter(function (item) {
|
|
941
958
|
return filteredOptions.includes(item);
|
|
942
959
|
});
|
|
943
|
-
if (filteredItems.length > 0) filtered.push(_objectSpread(_objectSpread({}, group), {}, _defineProperty({}, typeof
|
|
960
|
+
if (filteredItems.length > 0) filtered.push(_objectSpread(_objectSpread({}, group), {}, _defineProperty({}, typeof _this17.optionGroupChildren === 'string' ? _this17.optionGroupChildren : 'items', _toConsumableArray(filteredItems))));
|
|
944
961
|
});
|
|
945
962
|
return this.flatOptions(filtered);
|
|
946
963
|
}
|
|
@@ -991,9 +1008,9 @@ var script = {
|
|
|
991
1008
|
return this.focusedOptionIndex !== -1 ? "".concat(this.$id, "_").concat(this.focusedOptionIndex) : null;
|
|
992
1009
|
},
|
|
993
1010
|
ariaSetSize: function ariaSetSize() {
|
|
994
|
-
var
|
|
1011
|
+
var _this18 = this;
|
|
995
1012
|
return this.visibleOptions.filter(function (option) {
|
|
996
|
-
return !
|
|
1013
|
+
return !_this18.isOptionGroup(option);
|
|
997
1014
|
}).length;
|
|
998
1015
|
},
|
|
999
1016
|
isClearIconVisible: function isClearIconVisible() {
|
|
@@ -1066,7 +1083,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1066
1083
|
ref: "container",
|
|
1067
1084
|
id: _ctx.$id,
|
|
1068
1085
|
"class": _ctx.cx('root'),
|
|
1069
|
-
onClick: _cache[
|
|
1086
|
+
onClick: _cache[12] || (_cache[12] = function () {
|
|
1070
1087
|
return $options.onContainerClick && $options.onContainerClick.apply($options, arguments);
|
|
1071
1088
|
}),
|
|
1072
1089
|
"data-p": $options.containerDataP
|
|
@@ -1191,10 +1208,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1191
1208
|
ref: $options.overlayRef,
|
|
1192
1209
|
"class": [_ctx.cx('overlay'), _ctx.panelClass, _ctx.overlayClass],
|
|
1193
1210
|
style: [_ctx.panelStyle, _ctx.overlayStyle],
|
|
1194
|
-
onClick: _cache[
|
|
1211
|
+
onClick: _cache[10] || (_cache[10] = function () {
|
|
1195
1212
|
return $options.onOverlayClick && $options.onOverlayClick.apply($options, arguments);
|
|
1196
1213
|
}),
|
|
1197
|
-
onKeydown: _cache[
|
|
1214
|
+
onKeydown: _cache[11] || (_cache[11] = function () {
|
|
1198
1215
|
return $options.onOverlayKeyDown && $options.onOverlayKeyDown.apply($options, arguments);
|
|
1199
1216
|
}),
|
|
1200
1217
|
"data-p": $options.overlayDataP
|
|
@@ -1339,6 +1356,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1339
1356
|
onMousemove: function onMousemove($event) {
|
|
1340
1357
|
return $options.onOptionMouseMove($event, $options.getOptionIndex(i, getItemOptions));
|
|
1341
1358
|
},
|
|
1359
|
+
onClick: _cache[8] || (_cache[8] = withModifiers(function () {}, ["stop"])),
|
|
1342
1360
|
"data-p-selected": !_ctx.checkmark && $options.isSelected(option),
|
|
1343
1361
|
"data-p-focused": $data.focusedOptionIndex === $options.getOptionIndex(i, getItemOptions),
|
|
1344
1362
|
"data-p-disabled": $options.isOptionDisabled(option),
|
|
@@ -1413,7 +1431,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1413
1431
|
"aria-hidden": "true",
|
|
1414
1432
|
"class": "p-hidden-accessible p-hidden-focusable",
|
|
1415
1433
|
tabindex: 0,
|
|
1416
|
-
onFocus: _cache[
|
|
1434
|
+
onFocus: _cache[9] || (_cache[9] = function () {
|
|
1417
1435
|
return $options.onLastHiddenFocus && $options.onLastHiddenFocus.apply($options, arguments);
|
|
1418
1436
|
})
|
|
1419
1437
|
}, _ctx.ptm('hiddenLastFocusableEl'), {
|