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.
Files changed (168) 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 +60 -11
  6. package/autocomplete/index.d.ts +4 -0
  7. package/autocomplete/index.mjs +96 -59
  8. package/autocomplete/index.mjs.map +1 -1
  9. package/cascadeselect/CascadeSelect.vue +4 -1
  10. package/cascadeselect/CascadeSelectSub.vue +1 -1
  11. package/cascadeselect/index.mjs +22 -20
  12. package/cascadeselect/index.mjs.map +1 -1
  13. package/checkbox/Checkbox.vue +1 -1
  14. package/checkbox/index.mjs +2 -1
  15. package/checkbox/index.mjs.map +1 -1
  16. package/chip/BaseChip.vue +1 -1
  17. package/chip/index.d.ts +1 -1
  18. package/chip/index.mjs +1 -1
  19. package/chip/index.mjs.map +1 -1
  20. package/colorpicker/ColorPicker.vue +5 -1
  21. package/colorpicker/index.mjs +5 -1
  22. package/colorpicker/index.mjs.map +1 -1
  23. package/confirmationoptions/index.d.ts +1 -1
  24. package/confirmdialog/index.d.ts +4 -0
  25. package/contextmenu/index.mjs +12 -12
  26. package/contextmenu/index.mjs.map +1 -1
  27. package/datatable/BodyCell.vue +1 -0
  28. package/datatable/ColumnFilter.vue +3 -3
  29. package/datatable/DataTable.vue +103 -44
  30. package/datatable/HeaderCheckbox.vue +2 -2
  31. package/datatable/RowCheckbox.vue +1 -1
  32. package/datatable/TableBody.vue +12 -1
  33. package/datatable/TableFooter.vue +9 -1
  34. package/datatable/TableHeader.vue +9 -2
  35. package/datatable/index.d.ts +37 -29
  36. package/datatable/index.mjs +175 -111
  37. package/datatable/index.mjs.map +1 -1
  38. package/datatable/style/index.mjs +4 -4
  39. package/datatable/style/index.mjs.map +1 -1
  40. package/dataview/DataView.vue +4 -0
  41. package/dataview/index.d.ts +63 -6
  42. package/dataview/index.mjs +6 -2
  43. package/dataview/index.mjs.map +1 -1
  44. package/datepicker/DatePicker.vue +379 -236
  45. package/datepicker/index.d.ts +156 -0
  46. package/datepicker/index.mjs +676 -406
  47. package/datepicker/index.mjs.map +1 -1
  48. package/drawer/Drawer.vue +30 -20
  49. package/drawer/index.d.ts +10 -0
  50. package/drawer/index.mjs +42 -25
  51. package/drawer/index.mjs.map +1 -1
  52. package/fileupload/FileUpload.vue +3 -4
  53. package/fileupload/index.mjs +8 -10
  54. package/fileupload/index.mjs.map +1 -1
  55. package/galleria/Galleria.vue +39 -3
  56. package/galleria/index.mjs +40 -3
  57. package/galleria/index.mjs.map +1 -1
  58. package/image/Image.vue +1 -1
  59. package/image/index.mjs +1 -1
  60. package/image/index.mjs.map +1 -1
  61. package/inplace/Inplace.vue +1 -1
  62. package/inplace/index.mjs +3 -2
  63. package/inplace/index.mjs.map +1 -1
  64. package/inputmask/InputMask.vue +3 -3
  65. package/inputmask/index.d.ts +3 -3
  66. package/inputmask/index.mjs +3 -3
  67. package/inputmask/index.mjs.map +1 -1
  68. package/inputnumber/BaseInputNumber.vue +4 -0
  69. package/inputnumber/InputNumber.vue +3 -10
  70. package/inputnumber/index.mjs +8 -9
  71. package/inputnumber/index.mjs.map +1 -1
  72. package/keyfilter/index.mjs +12 -19
  73. package/keyfilter/index.mjs.map +1 -1
  74. package/listbox/Listbox.vue +10 -2
  75. package/listbox/index.mjs +38 -29
  76. package/listbox/index.mjs.map +1 -1
  77. package/megamenu/index.d.ts +1 -1
  78. package/megamenu/index.mjs +11 -11
  79. package/megamenu/index.mjs.map +1 -1
  80. package/menu/Menu.vue +12 -6
  81. package/menu/Menuitem.vue +14 -4
  82. package/menu/index.d.ts +3 -12
  83. package/menu/index.mjs +40 -20
  84. package/menu/index.mjs.map +1 -1
  85. package/menubar/index.mjs +16 -16
  86. package/menubar/index.mjs.map +1 -1
  87. package/metergroup/MeterGroup.vue +9 -3
  88. package/metergroup/MeterGroupLabel.vue +10 -1
  89. package/metergroup/index.d.ts +1 -1
  90. package/metergroup/index.mjs +32 -7
  91. package/metergroup/index.mjs.map +1 -1
  92. package/multiselect/MultiSelect.vue +40 -6
  93. package/multiselect/index.d.ts +1 -1
  94. package/multiselect/index.mjs +100 -68
  95. package/multiselect/index.mjs.map +1 -1
  96. package/organizationchart/OrganizationChartNode.vue +1 -1
  97. package/organizationchart/index.mjs.map +1 -1
  98. package/organizationchart/style/index.mjs +11 -6
  99. package/organizationchart/style/index.mjs.map +1 -1
  100. package/package.json +6 -6
  101. package/paginator/Paginator.vue +2 -0
  102. package/paginator/index.d.ts +8 -0
  103. package/paginator/index.mjs +3 -1
  104. package/paginator/index.mjs.map +1 -1
  105. package/panel/Panel.vue +2 -2
  106. package/panel/index.mjs +2 -2
  107. package/panel/index.mjs.map +1 -1
  108. package/panelmenu/PanelMenuList.vue +1 -1
  109. package/panelmenu/index.mjs +4 -4
  110. package/panelmenu/index.mjs.map +1 -1
  111. package/password/Password.vue +28 -6
  112. package/password/index.mjs +44 -16
  113. package/password/index.mjs.map +1 -1
  114. package/popover/Popover.vue +1 -1
  115. package/popover/index.mjs +1 -2
  116. package/popover/index.mjs.map +1 -1
  117. package/progressbar/ProgressBar.vue +4 -4
  118. package/progressbar/index.mjs +8 -12
  119. package/progressbar/index.mjs.map +1 -1
  120. package/scrolltop/ScrollTop.vue +2 -2
  121. package/scrolltop/index.mjs +4 -2
  122. package/scrolltop/index.mjs.map +1 -1
  123. package/select/Select.vue +68 -13
  124. package/select/index.mjs +128 -77
  125. package/select/index.mjs.map +1 -1
  126. package/selectbutton/index.d.ts +0 -24
  127. package/splitter/Splitter.vue +10 -2
  128. package/splitter/index.d.ts +1 -1
  129. package/splitter/index.mjs +19 -7
  130. package/splitter/index.mjs.map +1 -1
  131. package/splitter/style/index.mjs +1 -13
  132. package/splitter/style/index.mjs.map +1 -1
  133. package/step/Step.vue +27 -9
  134. package/step/index.mjs +46 -16
  135. package/step/index.mjs.map +1 -1
  136. package/steppanel/StepPanel.vue +11 -5
  137. package/steppanel/index.d.ts +8 -0
  138. package/steppanel/index.mjs +25 -10
  139. package/steppanel/index.mjs.map +1 -1
  140. package/stepper/StepperSeparator.vue +5 -2
  141. package/tab/Tab.vue +4 -4
  142. package/tab/index.mjs +4 -4
  143. package/tab/index.mjs.map +1 -1
  144. package/tablist/TabList.vue +3 -0
  145. package/tablist/index.mjs +1 -0
  146. package/tablist/index.mjs.map +1 -1
  147. package/tabpanel/TabPanel.vue +2 -2
  148. package/tabpanel/index.mjs +2 -2
  149. package/tabpanel/index.mjs.map +1 -1
  150. package/tieredmenu/TieredMenu.vue +1 -1
  151. package/tieredmenu/index.mjs +13 -14
  152. package/tieredmenu/index.mjs.map +1 -1
  153. package/tooltip/index.mjs +47 -30
  154. package/tooltip/index.mjs.map +1 -1
  155. package/tree/Tree.vue +14 -2
  156. package/tree/TreeNode.vue +2 -2
  157. package/tree/index.mjs +28 -10
  158. package/tree/index.mjs.map +1 -1
  159. package/treeselect/TreeSelect.vue +4 -1
  160. package/treeselect/index.mjs +4 -2
  161. package/treeselect/index.mjs.map +1 -1
  162. package/umd/primevue.min.js +12213 -1
  163. package/virtualscroller/VirtualScroller.vue +13 -2
  164. package/virtualscroller/index.mjs +28 -18
  165. package/virtualscroller/index.mjs.map +1 -1
  166. package/virtualscroller/style/index.mjs +1 -1
  167. package/virtualscroller/style/index.mjs.map +1 -1
  168. package/web-types.json +1 -1
package/select/index.mjs CHANGED
@@ -1,3 +1,4 @@
1
+ import { cn } from '@primeuix/utils';
1
2
  import { findSingle, getFocusableElements, isVisible, focus, isTouchDevice, relativePosition, getOuterWidth, absolutePosition, addStyle, getLastFocusableElement, getFirstFocusableElement, isAndroid } from '@primeuix/utils/dom';
2
3
  import { isNotEmpty, findLastIndex, equals, isPrintableCharacter, resolveFieldData } from '@primeuix/utils/object';
3
4
  import { ZIndex } from '@primeuix/utils/zindex';
@@ -18,7 +19,7 @@ import Ripple from 'primevue/ripple';
18
19
  import VirtualScroller from 'primevue/virtualscroller';
19
20
  import BaseInput from '@primevue/core/baseinput';
20
21
  import SelectStyle from 'primevue/select/style';
21
- 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';
22
23
 
23
24
  var script$1 = {
24
25
  name: 'BaseSelect',
@@ -344,18 +345,35 @@ var script = {
344
345
  this.$emit('focus', event);
345
346
  },
346
347
  onBlur: function onBlur(event) {
347
- var _this$formField$onBlu, _this$formField;
348
- this.focused = false;
349
- this.focusedOptionIndex = -1;
350
- this.searchValue = '';
351
- this.$emit('blur', event);
352
- (_this$formField$onBlu = (_this$formField = this.formField).onBlur) === null || _this$formField$onBlu === void 0 || _this$formField$onBlu.call(_this$formField, event);
348
+ var _this3 = this;
349
+ setTimeout(function () {
350
+ var _this3$formField$onBl, _this3$formField;
351
+ _this3.focused = false;
352
+ _this3.focusedOptionIndex = -1;
353
+ _this3.searchValue = '';
354
+ _this3.$emit('blur', event);
355
+ (_this3$formField$onBl = (_this3$formField = _this3.formField).onBlur) === null || _this3$formField$onBl === void 0 || _this3$formField$onBl.call(_this3$formField, event);
356
+ }, 100);
353
357
  },
354
358
  onKeyDown: function onKeyDown(event) {
355
- if (this.disabled || isAndroid()) {
359
+ if (this.disabled) {
356
360
  event.preventDefault();
357
361
  return;
358
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
+ }
359
377
  var metaKey = event.metaKey || event.ctrlKey;
360
378
  switch (event.code) {
361
379
  case 'ArrowDown':
@@ -627,18 +645,20 @@ var script = {
627
645
  }
628
646
  },
629
647
  onOverlayEnter: function onOverlayEnter(el) {
630
- var _this3 = this;
648
+ var _this4 = this;
631
649
  ZIndex.set('overlay', el, this.$primevue.config.zIndex.overlay);
632
650
  addStyle(el, {
633
651
  position: 'absolute',
634
- top: '0',
635
- left: '0'
652
+ top: '0'
636
653
  });
637
654
  this.alignOverlay();
638
655
  this.scrollInView();
656
+
657
+ // Issue: #7508
658
+ this.$attrSelector && el.setAttribute(this.$attrSelector, '');
639
659
  setTimeout(function () {
640
- _this3.autoFilterFocus && _this3.filter && focus(_this3.$refs.filterInput.$el);
641
- _this3.autoUpdateModel();
660
+ _this4.autoFilterFocus && _this4.filter && focus(_this4.$refs.filterInput.$el);
661
+ _this4.autoUpdateModel();
642
662
  }, 1);
643
663
  },
644
664
  onOverlayAfterEnter: function onOverlayAfterEnter() {
@@ -648,14 +668,14 @@ var script = {
648
668
  this.$emit('show');
649
669
  },
650
670
  onOverlayLeave: function onOverlayLeave() {
651
- var _this4 = this;
671
+ var _this5 = this;
652
672
  this.unbindOutsideClickListener();
653
673
  this.unbindScrollListener();
654
674
  this.unbindResizeListener();
655
675
  if (this.autoFilterFocus && this.filter && !this.editable) {
656
676
  this.$nextTick(function () {
657
- if (_this4.$refs.filterInput) {
658
- focus(_this4.$refs.filterInput.$el);
677
+ if (_this5.$refs.filterInput) {
678
+ focus(_this5.$refs.filterInput.$el);
659
679
  }
660
680
  });
661
681
  }
@@ -676,11 +696,12 @@ var script = {
676
696
  }
677
697
  },
678
698
  bindOutsideClickListener: function bindOutsideClickListener() {
679
- var _this5 = this;
699
+ var _this6 = this;
680
700
  if (!this.outsideClickListener) {
681
701
  this.outsideClickListener = function (event) {
682
- if (_this5.overlayVisible && _this5.overlay && !_this5.$el.contains(event.target) && !_this5.overlay.contains(event.target)) {
683
- _this5.hide();
702
+ var composedPath = event.composedPath();
703
+ if (_this6.overlayVisible && _this6.overlay && !composedPath.includes(_this6.$el) && !composedPath.includes(_this6.overlay)) {
704
+ _this6.hide();
684
705
  }
685
706
  };
686
707
  document.addEventListener('click', this.outsideClickListener, true);
@@ -693,11 +714,11 @@ var script = {
693
714
  }
694
715
  },
695
716
  bindScrollListener: function bindScrollListener() {
696
- var _this6 = this;
717
+ var _this7 = this;
697
718
  if (!this.scrollHandler) {
698
719
  this.scrollHandler = new ConnectedOverlayScrollHandler(this.$refs.container, function () {
699
- if (_this6.overlayVisible) {
700
- _this6.hide();
720
+ if (_this7.overlayVisible) {
721
+ _this7.hide();
701
722
  }
702
723
  });
703
724
  }
@@ -709,11 +730,11 @@ var script = {
709
730
  }
710
731
  },
711
732
  bindResizeListener: function bindResizeListener() {
712
- var _this7 = this;
733
+ var _this8 = this;
713
734
  if (!this.resizeListener) {
714
735
  this.resizeListener = function () {
715
- if (_this7.overlayVisible && !isTouchDevice()) {
716
- _this7.hide();
736
+ if (_this8.overlayVisible && !isTouchDevice()) {
737
+ _this8.hide();
717
738
  }
718
739
  };
719
740
  window.addEventListener('resize', this.resizeListener);
@@ -726,12 +747,12 @@ var script = {
726
747
  }
727
748
  },
728
749
  bindLabelClickListener: function bindLabelClickListener() {
729
- var _this8 = this;
750
+ var _this9 = this;
730
751
  if (!this.editable && !this.labelClickListener) {
731
752
  var label = document.querySelector("label[for=\"".concat(this.labelId, "\"]"));
732
753
  if (label && isVisible(label)) {
733
754
  this.labelClickListener = function () {
734
- focus(_this8.$refs.focusInput);
755
+ focus(_this9.$refs.focusInput);
735
756
  };
736
757
  label.addEventListener('click', this.labelClickListener);
737
758
  }
@@ -746,12 +767,12 @@ var script = {
746
767
  }
747
768
  },
748
769
  bindMatchMediaOrientationListener: function bindMatchMediaOrientationListener() {
749
- var _this9 = this;
770
+ var _this0 = this;
750
771
  if (!this.matchMediaOrientationListener) {
751
772
  var query = matchMedia("(orientation: portrait)");
752
773
  this.queryOrientation = query;
753
774
  this.matchMediaOrientationListener = function () {
754
- _this9.alignOverlay();
775
+ _this0.alignOverlay();
755
776
  };
756
777
  this.queryOrientation.addEventListener('change', this.matchMediaOrientationListener);
757
778
  }
@@ -784,35 +805,35 @@ var script = {
784
805
  return equals(this.d_value, this.getOptionValue(option), this.equalityKey);
785
806
  },
786
807
  findFirstOptionIndex: function findFirstOptionIndex() {
787
- var _this10 = this;
808
+ var _this1 = this;
788
809
  return this.visibleOptions.findIndex(function (option) {
789
- return _this10.isValidOption(option);
810
+ return _this1.isValidOption(option);
790
811
  });
791
812
  },
792
813
  findLastOptionIndex: function findLastOptionIndex() {
793
- var _this11 = this;
814
+ var _this10 = this;
794
815
  return findLastIndex(this.visibleOptions, function (option) {
795
- return _this11.isValidOption(option);
816
+ return _this10.isValidOption(option);
796
817
  });
797
818
  },
798
819
  findNextOptionIndex: function findNextOptionIndex(index) {
799
- var _this12 = this;
820
+ var _this11 = this;
800
821
  var matchedOptionIndex = index < this.visibleOptions.length - 1 ? this.visibleOptions.slice(index + 1).findIndex(function (option) {
801
- return _this12.isValidOption(option);
822
+ return _this11.isValidOption(option);
802
823
  }) : -1;
803
824
  return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : index;
804
825
  },
805
826
  findPrevOptionIndex: function findPrevOptionIndex(index) {
806
- var _this13 = this;
827
+ var _this12 = this;
807
828
  var matchedOptionIndex = index > 0 ? findLastIndex(this.visibleOptions.slice(0, index), function (option) {
808
- return _this13.isValidOption(option);
829
+ return _this12.isValidOption(option);
809
830
  }) : -1;
810
831
  return matchedOptionIndex > -1 ? matchedOptionIndex : index;
811
832
  },
812
833
  findSelectedOptionIndex: function findSelectedOptionIndex() {
813
- var _this14 = this;
834
+ var _this13 = this;
814
835
  return this.$filled ? this.visibleOptions.findIndex(function (option) {
815
- return _this14.isValidSelectedOption(option);
836
+ return _this13.isValidSelectedOption(option);
816
837
  }) : -1;
817
838
  },
818
839
  findFirstFocusedOptionIndex: function findFirstFocusedOptionIndex() {
@@ -824,17 +845,17 @@ var script = {
824
845
  return selectedIndex < 0 ? this.findLastOptionIndex() : selectedIndex;
825
846
  },
826
847
  searchOptions: function searchOptions(event, _char) {
827
- var _this15 = this;
848
+ var _this14 = this;
828
849
  this.searchValue = (this.searchValue || '') + _char;
829
850
  var optionIndex = -1;
830
851
  var matched = false;
831
852
  if (isNotEmpty(this.searchValue)) {
832
853
  optionIndex = this.visibleOptions.findIndex(function (option) {
833
- return _this15.isOptionExactMatched(option);
854
+ return _this14.isOptionExactMatched(option);
834
855
  });
835
856
  if (optionIndex === -1) {
836
857
  optionIndex = this.visibleOptions.findIndex(function (option) {
837
- return _this15.isOptionStartsWith(option);
858
+ return _this14.isOptionStartsWith(option);
838
859
  });
839
860
  }
840
861
  if (optionIndex !== -1) {
@@ -851,8 +872,8 @@ var script = {
851
872
  clearTimeout(this.searchTimeout);
852
873
  }
853
874
  this.searchTimeout = setTimeout(function () {
854
- _this15.searchValue = '';
855
- _this15.searchTimeout = null;
875
+ _this14.searchValue = '';
876
+ _this14.searchTimeout = null;
856
877
  }, 500);
857
878
  return matched;
858
879
  },
@@ -866,18 +887,18 @@ var script = {
866
887
  }
867
888
  },
868
889
  scrollInView: function scrollInView() {
869
- var _this16 = this;
890
+ var _this15 = this;
870
891
  var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;
871
892
  this.$nextTick(function () {
872
- var id = index !== -1 ? "".concat(_this16.$id, "_").concat(index) : _this16.focusedOptionId;
873
- var element = findSingle(_this16.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, "\"]"));
874
895
  if (element) {
875
896
  element.scrollIntoView && element.scrollIntoView({
876
897
  block: 'nearest',
877
898
  inline: 'nearest'
878
899
  });
879
- } else if (!_this16.virtualScrollerDisabled) {
880
- _this16.virtualScroller && _this16.virtualScroller.scrollToIndex(index !== -1 ? index : _this16.focusedOptionIndex);
900
+ } else if (!_this15.virtualScrollerDisabled) {
901
+ _this15.virtualScroller && _this15.virtualScroller.scrollToIndex(index !== -1 ? index : _this15.focusedOptionIndex);
881
902
  }
882
903
  });
883
904
  },
@@ -897,14 +918,14 @@ var script = {
897
918
  });
898
919
  },
899
920
  flatOptions: function flatOptions(options) {
900
- var _this17 = this;
921
+ var _this16 = this;
901
922
  return (options || []).reduce(function (result, option, index) {
902
923
  result.push({
903
924
  optionGroup: option,
904
925
  group: true,
905
926
  index: index
906
927
  });
907
- var optionGroupChildren = _this17.getOptionGroupChildren(option);
928
+ var optionGroupChildren = _this16.getOptionGroupChildren(option);
908
929
  optionGroupChildren && optionGroupChildren.forEach(function (o) {
909
930
  return result.push(o);
910
931
  });
@@ -924,7 +945,7 @@ var script = {
924
945
  },
925
946
  computed: {
926
947
  visibleOptions: function visibleOptions() {
927
- var _this18 = this;
948
+ var _this17 = this;
928
949
  var options = this.optionGroupLabel ? this.flatOptions(this.options) : this.options || [];
929
950
  if (this.filterValue) {
930
951
  var filteredOptions = FilterService.filter(options, this.searchFields, this.filterValue, this.filterMatchMode, this.filterLocale);
@@ -932,11 +953,11 @@ var script = {
932
953
  var optionGroups = this.options || [];
933
954
  var filtered = [];
934
955
  optionGroups.forEach(function (group) {
935
- var groupChildren = _this18.getOptionGroupChildren(group);
956
+ var groupChildren = _this17.getOptionGroupChildren(group);
936
957
  var filteredItems = groupChildren.filter(function (item) {
937
958
  return filteredOptions.includes(item);
938
959
  });
939
- if (filteredItems.length > 0) filtered.push(_objectSpread(_objectSpread({}, group), {}, _defineProperty({}, typeof _this18.optionGroupChildren === 'string' ? _this18.optionGroupChildren : 'items', _toConsumableArray(filteredItems))));
960
+ if (filteredItems.length > 0) filtered.push(_objectSpread(_objectSpread({}, group), {}, _defineProperty({}, typeof _this17.optionGroupChildren === 'string' ? _this17.optionGroupChildren : 'items', _toConsumableArray(filteredItems))));
940
961
  });
941
962
  return this.flatOptions(filtered);
942
963
  }
@@ -987,9 +1008,9 @@ var script = {
987
1008
  return this.focusedOptionIndex !== -1 ? "".concat(this.$id, "_").concat(this.focusedOptionIndex) : null;
988
1009
  },
989
1010
  ariaSetSize: function ariaSetSize() {
990
- var _this19 = this;
1011
+ var _this18 = this;
991
1012
  return this.visibleOptions.filter(function (option) {
992
- return !_this19.isOptionGroup(option);
1013
+ return !_this18.isOptionGroup(option);
993
1014
  }).length;
994
1015
  },
995
1016
  isClearIconVisible: function isClearIconVisible() {
@@ -997,6 +1018,29 @@ var script = {
997
1018
  },
998
1019
  virtualScrollerDisabled: function virtualScrollerDisabled() {
999
1020
  return !this.virtualScrollerOptions;
1021
+ },
1022
+ containerDataP: function containerDataP() {
1023
+ return cn(_defineProperty({
1024
+ invalid: this.$invalid,
1025
+ disabled: this.disabled,
1026
+ focus: this.focused,
1027
+ fluid: this.$fluid,
1028
+ filled: this.$variant === 'filled'
1029
+ }, this.size, this.size));
1030
+ },
1031
+ labelDataP: function labelDataP() {
1032
+ return cn(_defineProperty(_defineProperty({
1033
+ placeholder: !this.editable && this.label === this.placeholder,
1034
+ clearable: this.showClear,
1035
+ disabled: this.disabled,
1036
+ editable: this.editable
1037
+ }, this.size, this.size), "empty", !this.editable && !this.$slots['value'] && (this.label === 'p-emptylabel' || this.label.length === 0)));
1038
+ },
1039
+ dropdownIconDataP: function dropdownIconDataP() {
1040
+ return cn(_defineProperty({}, this.size, this.size));
1041
+ },
1042
+ overlayDataP: function overlayDataP() {
1043
+ return cn(_defineProperty({}, 'portal-' + this.appendTo, 'portal-' + this.appendTo));
1000
1044
  }
1001
1045
  },
1002
1046
  directives: {
@@ -1017,12 +1061,13 @@ var script = {
1017
1061
  }
1018
1062
  };
1019
1063
 
1020
- var _hoisted_1 = ["id"];
1021
- var _hoisted_2 = ["name", "id", "value", "placeholder", "tabindex", "disabled", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant", "aria-invalid"];
1022
- var _hoisted_3 = ["name", "id", "tabindex", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant", "aria-invalid", "aria-disabled"];
1023
- var _hoisted_4 = ["id"];
1064
+ var _hoisted_1 = ["id", "data-p"];
1065
+ var _hoisted_2 = ["name", "id", "value", "placeholder", "tabindex", "disabled", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant", "aria-invalid", "data-p"];
1066
+ var _hoisted_3 = ["name", "id", "tabindex", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant", "aria-invalid", "aria-disabled", "data-p"];
1067
+ var _hoisted_4 = ["data-p"];
1024
1068
  var _hoisted_5 = ["id"];
1025
- var _hoisted_6 = ["id", "aria-label", "aria-selected", "aria-disabled", "aria-setsize", "aria-posinset", "onClick", "onMousemove", "data-p-selected", "data-p-focused", "data-p-disabled"];
1069
+ var _hoisted_6 = ["id"];
1070
+ var _hoisted_7 = ["id", "aria-label", "aria-selected", "aria-disabled", "aria-setsize", "aria-posinset", "onMousedown", "onMousemove", "data-p-selected", "data-p-focused", "data-p-disabled"];
1026
1071
  function render(_ctx, _cache, $props, $setup, $data, $options) {
1027
1072
  var _component_SpinnerIcon = resolveComponent("SpinnerIcon");
1028
1073
  var _component_InputText = resolveComponent("InputText");
@@ -1038,9 +1083,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1038
1083
  ref: "container",
1039
1084
  id: _ctx.$id,
1040
1085
  "class": _ctx.cx('root'),
1041
- onClick: _cache[11] || (_cache[11] = function () {
1086
+ onClick: _cache[12] || (_cache[12] = function () {
1042
1087
  return $options.onContainerClick && $options.onContainerClick.apply($options, arguments);
1043
- })
1088
+ }),
1089
+ "data-p": $options.containerDataP
1044
1090
  }, _ctx.ptmi('root')), [_ctx.editable ? (openBlock(), createElementBlock("input", mergeProps({
1045
1091
  key: 0,
1046
1092
  ref: "focusInput",
@@ -1073,7 +1119,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1073
1119
  }),
1074
1120
  onInput: _cache[3] || (_cache[3] = function () {
1075
1121
  return $options.onEditableInput && $options.onEditableInput.apply($options, arguments);
1076
- })
1122
+ }),
1123
+ "data-p": $options.labelDataP
1077
1124
  }, _ctx.ptm('label')), null, 16, _hoisted_2)) : (openBlock(), createElementBlock("span", mergeProps({
1078
1125
  key: 1,
1079
1126
  ref: "focusInput",
@@ -1099,7 +1146,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1099
1146
  }),
1100
1147
  onKeydown: _cache[6] || (_cache[6] = function () {
1101
1148
  return $options.onKeyDown && $options.onKeyDown.apply($options, arguments);
1102
- })
1149
+ }),
1150
+ "data-p": $options.labelDataP
1103
1151
  }, _ctx.ptm('label')), [renderSlot(_ctx.$slots, "value", {
1104
1152
  value: _ctx.d_value,
1105
1153
  placeholder: _ctx.placeholder
@@ -1140,8 +1188,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1140
1188
  }, function () {
1141
1189
  return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.dropdownIcon ? 'span' : 'ChevronDownIcon'), mergeProps({
1142
1190
  "class": [_ctx.cx('dropdownIcon'), _ctx.dropdownIcon],
1143
- "aria-hidden": "true"
1144
- }, _ctx.ptm('dropdownIcon')), null, 16, ["class"]))];
1191
+ "aria-hidden": "true",
1192
+ "data-p": $options.dropdownIconDataP
1193
+ }, _ctx.ptm('dropdownIcon')), null, 16, ["class", "data-p"]))];
1145
1194
  })], 16), createVNode(_component_Portal, {
1146
1195
  appendTo: _ctx.appendTo
1147
1196
  }, {
@@ -1159,12 +1208,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1159
1208
  ref: $options.overlayRef,
1160
1209
  "class": [_ctx.cx('overlay'), _ctx.panelClass, _ctx.overlayClass],
1161
1210
  style: [_ctx.panelStyle, _ctx.overlayStyle],
1162
- onClick: _cache[9] || (_cache[9] = function () {
1211
+ onClick: _cache[10] || (_cache[10] = function () {
1163
1212
  return $options.onOverlayClick && $options.onOverlayClick.apply($options, arguments);
1164
1213
  }),
1165
- onKeydown: _cache[10] || (_cache[10] = function () {
1214
+ onKeydown: _cache[11] || (_cache[11] = function () {
1166
1215
  return $options.onOverlayKeyDown && $options.onOverlayKeyDown.apply($options, arguments);
1167
- })
1216
+ }),
1217
+ "data-p": $options.overlayDataP
1168
1218
  }, _ctx.ptm('overlay')), [createElementVNode("span", mergeProps({
1169
1219
  ref: "firstHiddenFocusableElementOnOverlay",
1170
1220
  role: "presentation",
@@ -1284,7 +1334,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1284
1334
  "class": _ctx.cx('optionGroupLabel'),
1285
1335
  ref_for: true
1286
1336
  }, _ctx.ptm('optionGroupLabel')), toDisplayString($options.getOptionGroupLabel(option.optionGroup)), 17)];
1287
- })], 16, _hoisted_5)) : withDirectives((openBlock(), createElementBlock("li", mergeProps({
1337
+ })], 16, _hoisted_6)) : withDirectives((openBlock(), createElementBlock("li", mergeProps({
1288
1338
  key: 1,
1289
1339
  id: _ctx.$id + '_' + $options.getOptionIndex(i, getItemOptions),
1290
1340
  "class": _ctx.cx('option', {
@@ -1300,13 +1350,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1300
1350
  "aria-disabled": $options.isOptionDisabled(option),
1301
1351
  "aria-setsize": $options.ariaSetSize,
1302
1352
  "aria-posinset": $options.getAriaPosInset($options.getOptionIndex(i, getItemOptions)),
1303
- onClick: function onClick($event) {
1353
+ onMousedown: function onMousedown($event) {
1304
1354
  return $options.onOptionSelect($event, option);
1305
1355
  },
1306
1356
  onMousemove: function onMousemove($event) {
1307
1357
  return $options.onOptionMouseMove($event, $options.getOptionIndex(i, getItemOptions));
1308
1358
  },
1309
- "data-p-selected": $options.isSelected(option),
1359
+ onClick: _cache[8] || (_cache[8] = withModifiers(function () {}, ["stop"])),
1360
+ "data-p-selected": !_ctx.checkmark && $options.isSelected(option),
1310
1361
  "data-p-focused": $data.focusedOptionIndex === $options.getOptionIndex(i, getItemOptions),
1311
1362
  "data-p-disabled": $options.isOptionDisabled(option),
1312
1363
  ref_for: true
@@ -1329,7 +1380,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1329
1380
  "class": _ctx.cx('optionLabel'),
1330
1381
  ref_for: true
1331
1382
  }, _ctx.ptm('optionLabel')), toDisplayString($options.getOptionLabel(option)), 17)];
1332
- })], 16, _hoisted_6)), [[_directive_ripple]])], 64);
1383
+ })], 16, _hoisted_7)), [[_directive_ripple]])], 64);
1333
1384
  }), 128)), $data.filterValue && (!items || items && items.length === 0) ? (openBlock(), createElementBlock("li", mergeProps({
1334
1385
  key: 0,
1335
1386
  "class": _ctx.cx('emptyMessage'),
@@ -1346,7 +1397,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1346
1397
  "data-p-hidden-accessible": true
1347
1398
  }), [renderSlot(_ctx.$slots, "empty", {}, function () {
1348
1399
  return [createTextVNode(toDisplayString($options.emptyMessageText), 1)];
1349
- })], 16)) : createCommentVNode("", true)], 16, _hoisted_4)];
1400
+ })], 16)) : createCommentVNode("", true)], 16, _hoisted_5)];
1350
1401
  }),
1351
1402
  _: 2
1352
1403
  }, [_ctx.$slots.loader ? {
@@ -1380,13 +1431,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1380
1431
  "aria-hidden": "true",
1381
1432
  "class": "p-hidden-accessible p-hidden-focusable",
1382
1433
  tabindex: 0,
1383
- onFocus: _cache[8] || (_cache[8] = function () {
1434
+ onFocus: _cache[9] || (_cache[9] = function () {
1384
1435
  return $options.onLastHiddenFocus && $options.onLastHiddenFocus.apply($options, arguments);
1385
1436
  })
1386
1437
  }, _ctx.ptm('hiddenLastFocusableEl'), {
1387
1438
  "data-p-hidden-accessible": true,
1388
1439
  "data-p-hidden-focusable": true
1389
- }), null, 16)], 16)) : createCommentVNode("", true)];
1440
+ }), null, 16)], 16, _hoisted_4)) : createCommentVNode("", true)];
1390
1441
  }),
1391
1442
  _: 3
1392
1443
  }, 16, ["onEnter", "onAfterEnter", "onLeave", "onAfterLeave"])];