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.
Files changed (102) hide show
  1. package/accordionheader/AccordionHeader.vue +1 -1
  2. package/accordionheader/index.d.ts +6 -1
  3. package/accordionheader/index.mjs +1 -1
  4. package/accordionheader/index.mjs.map +1 -1
  5. package/autocomplete/AutoComplete.vue +4 -1
  6. package/autocomplete/index.d.ts +4 -0
  7. package/autocomplete/index.mjs +30 -27
  8. package/autocomplete/index.mjs.map +1 -1
  9. package/cascadeselect/CascadeSelect.vue +3 -0
  10. package/cascadeselect/CascadeSelectSub.vue +1 -1
  11. package/cascadeselect/index.mjs +21 -18
  12. package/cascadeselect/index.mjs.map +1 -1
  13. package/colorpicker/ColorPicker.vue +4 -0
  14. package/colorpicker/index.mjs +4 -0
  15. package/colorpicker/index.mjs.map +1 -1
  16. package/confirmationoptions/index.d.ts +1 -1
  17. package/confirmdialog/index.d.ts +4 -0
  18. package/contextmenu/index.mjs +12 -12
  19. package/contextmenu/index.mjs.map +1 -1
  20. package/datatable/ColumnFilter.vue +2 -2
  21. package/datatable/index.d.ts +2 -2
  22. package/datatable/index.mjs +12 -12
  23. package/datatable/index.mjs.map +1 -1
  24. package/datatable/style/index.mjs +4 -4
  25. package/datatable/style/index.mjs.map +1 -1
  26. package/dataview/index.d.ts +5 -5
  27. package/datepicker/DatePicker.vue +10 -3
  28. package/datepicker/index.mjs +69 -59
  29. package/datepicker/index.mjs.map +1 -1
  30. package/fileupload/FileUpload.vue +2 -3
  31. package/fileupload/index.mjs +6 -8
  32. package/fileupload/index.mjs.map +1 -1
  33. package/image/Image.vue +1 -1
  34. package/image/index.mjs +1 -1
  35. package/image/index.mjs.map +1 -1
  36. package/inputmask/InputMask.vue +3 -3
  37. package/inputmask/index.d.ts +3 -3
  38. package/inputmask/index.mjs +3 -3
  39. package/inputmask/index.mjs.map +1 -1
  40. package/inputnumber/InputNumber.vue +1 -1
  41. package/inputnumber/index.mjs +2 -2
  42. package/inputnumber/index.mjs.map +1 -1
  43. package/inputtext/index.d.ts +2 -1
  44. package/listbox/Listbox.vue +1 -0
  45. package/listbox/index.mjs +27 -26
  46. package/listbox/index.mjs.map +1 -1
  47. package/megamenu/index.d.ts +1 -1
  48. package/megamenu/index.mjs +11 -11
  49. package/megamenu/index.mjs.map +1 -1
  50. package/menu/Menu.vue +4 -4
  51. package/menu/index.d.ts +3 -12
  52. package/menu/index.mjs +4 -4
  53. package/menu/index.mjs.map +1 -1
  54. package/menubar/index.mjs +16 -16
  55. package/menubar/index.mjs.map +1 -1
  56. package/metergroup/index.d.ts +1 -1
  57. package/multiselect/MultiSelect.vue +4 -1
  58. package/multiselect/index.d.ts +1 -1
  59. package/multiselect/index.mjs +51 -48
  60. package/multiselect/index.mjs.map +1 -1
  61. package/organizationchart/OrganizationChartNode.vue +1 -1
  62. package/organizationchart/index.mjs.map +1 -1
  63. package/organizationchart/style/index.mjs +11 -6
  64. package/organizationchart/style/index.mjs.map +1 -1
  65. package/package.json +6 -6
  66. package/panel/Panel.vue +2 -2
  67. package/panel/index.mjs +2 -2
  68. package/panel/index.mjs.map +1 -1
  69. package/panelmenu/index.mjs +3 -3
  70. package/panelmenu/index.mjs.map +1 -1
  71. package/password/Password.vue +7 -3
  72. package/password/index.d.ts +1 -1
  73. package/password/index.mjs +14 -8
  74. package/password/index.mjs.map +1 -1
  75. package/select/Select.vue +20 -1
  76. package/select/index.mjs +53 -35
  77. package/select/index.mjs.map +1 -1
  78. package/selectbutton/index.d.ts +0 -24
  79. package/splitter/Splitter.vue +1 -1
  80. package/splitter/index.d.ts +1 -1
  81. package/splitter/index.mjs +0 -1
  82. package/splitter/index.mjs.map +1 -1
  83. package/splitter/style/index.mjs +1 -13
  84. package/splitter/style/index.mjs.map +1 -1
  85. package/step/Step.vue +2 -2
  86. package/step/index.mjs +2 -2
  87. package/step/index.mjs.map +1 -1
  88. package/steppanel/StepPanel.vue +2 -2
  89. package/steppanel/index.mjs +2 -2
  90. package/steppanel/index.mjs.map +1 -1
  91. package/textarea/index.d.ts +2 -1
  92. package/tieredmenu/index.mjs +12 -12
  93. package/tieredmenu/index.mjs.map +1 -1
  94. package/tooltip/index.mjs +25 -14
  95. package/tooltip/index.mjs.map +1 -1
  96. package/treeselect/TreeSelect.vue +3 -0
  97. package/treeselect/index.mjs +3 -0
  98. package/treeselect/index.mjs.map +1 -1
  99. package/umd/primevue.min.js +12213 -1
  100. package/virtualscroller/index.mjs +18 -18
  101. package/virtualscroller/index.mjs.map +1 -1
  102. 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 || isAndroid()) {
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 _this10 = this;
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
- _this10.alignOverlay();
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 _this11 = this;
808
+ var _this1 = this;
792
809
  return this.visibleOptions.findIndex(function (option) {
793
- return _this11.isValidOption(option);
810
+ return _this1.isValidOption(option);
794
811
  });
795
812
  },
796
813
  findLastOptionIndex: function findLastOptionIndex() {
797
- var _this12 = this;
814
+ var _this10 = this;
798
815
  return findLastIndex(this.visibleOptions, function (option) {
799
- return _this12.isValidOption(option);
816
+ return _this10.isValidOption(option);
800
817
  });
801
818
  },
802
819
  findNextOptionIndex: function findNextOptionIndex(index) {
803
- var _this13 = this;
820
+ var _this11 = this;
804
821
  var matchedOptionIndex = index < this.visibleOptions.length - 1 ? this.visibleOptions.slice(index + 1).findIndex(function (option) {
805
- return _this13.isValidOption(option);
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 _this14 = this;
827
+ var _this12 = this;
811
828
  var matchedOptionIndex = index > 0 ? findLastIndex(this.visibleOptions.slice(0, index), function (option) {
812
- return _this14.isValidOption(option);
829
+ return _this12.isValidOption(option);
813
830
  }) : -1;
814
831
  return matchedOptionIndex > -1 ? matchedOptionIndex : index;
815
832
  },
816
833
  findSelectedOptionIndex: function findSelectedOptionIndex() {
817
- var _this15 = this;
834
+ var _this13 = this;
818
835
  return this.$filled ? this.visibleOptions.findIndex(function (option) {
819
- return _this15.isValidSelectedOption(option);
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 _this16 = this;
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 _this16.isOptionExactMatched(option);
854
+ return _this14.isOptionExactMatched(option);
838
855
  });
839
856
  if (optionIndex === -1) {
840
857
  optionIndex = this.visibleOptions.findIndex(function (option) {
841
- return _this16.isOptionStartsWith(option);
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
- _this16.searchValue = '';
859
- _this16.searchTimeout = null;
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 _this17 = this;
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(_this17.$id, "_").concat(index) : _this17.focusedOptionId;
877
- var element = findSingle(_this17.list, "li[id=\"".concat(id, "\"]"));
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 (!_this17.virtualScrollerDisabled) {
884
- _this17.virtualScroller && _this17.virtualScroller.scrollToIndex(index !== -1 ? index : _this17.focusedOptionIndex);
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 _this18 = this;
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 = _this18.getOptionGroupChildren(option);
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 _this19 = this;
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 = _this19.getOptionGroupChildren(group);
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 _this19.optionGroupChildren === 'string' ? _this19.optionGroupChildren : 'items', _toConsumableArray(filteredItems))));
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 _this20 = this;
1011
+ var _this18 = this;
995
1012
  return this.visibleOptions.filter(function (option) {
996
- return !_this20.isOptionGroup(option);
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[11] || (_cache[11] = function () {
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[9] || (_cache[9] = function () {
1211
+ onClick: _cache[10] || (_cache[10] = function () {
1195
1212
  return $options.onOverlayClick && $options.onOverlayClick.apply($options, arguments);
1196
1213
  }),
1197
- onKeydown: _cache[10] || (_cache[10] = function () {
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[8] || (_cache[8] = function () {
1434
+ onFocus: _cache[9] || (_cache[9] = function () {
1417
1435
  return $options.onLastHiddenFocus && $options.onLastHiddenFocus.apply($options, arguments);
1418
1436
  })
1419
1437
  }, _ctx.ptm('hiddenLastFocusableEl'), {