primevue 4.3.3 → 4.3.5

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 (144) hide show
  1. package/accordion/index.mjs +4 -2
  2. package/accordion/index.mjs.map +1 -1
  3. package/accordionheader/AccordionHeader.vue +1 -1
  4. package/accordionheader/index.d.ts +6 -1
  5. package/accordionheader/index.mjs +1 -1
  6. package/accordionheader/index.mjs.map +1 -1
  7. package/autocomplete/AutoComplete.vue +4 -1
  8. package/autocomplete/index.d.ts +4 -0
  9. package/autocomplete/index.mjs +38 -31
  10. package/autocomplete/index.mjs.map +1 -1
  11. package/breadcrumb/index.mjs +4 -2
  12. package/breadcrumb/index.mjs.map +1 -1
  13. package/carousel/index.mjs +10 -5
  14. package/carousel/index.mjs.map +1 -1
  15. package/cascadeselect/CascadeSelect.vue +3 -0
  16. package/cascadeselect/CascadeSelectSub.vue +1 -1
  17. package/cascadeselect/index.mjs +31 -23
  18. package/cascadeselect/index.mjs.map +1 -1
  19. package/colorpicker/ColorPicker.vue +4 -0
  20. package/colorpicker/index.mjs +4 -0
  21. package/colorpicker/index.mjs.map +1 -1
  22. package/confirmationoptions/index.d.ts +1 -1
  23. package/confirmdialog/index.d.ts +4 -0
  24. package/contextmenu/index.mjs +28 -20
  25. package/contextmenu/index.mjs.map +1 -1
  26. package/datatable/ColumnFilter.vue +2 -2
  27. package/datatable/DataTable.vue +7 -3
  28. package/datatable/index.d.ts +2 -2
  29. package/datatable/index.mjs +48 -40
  30. package/datatable/index.mjs.map +1 -1
  31. package/datatable/style/index.mjs +4 -4
  32. package/datatable/style/index.mjs.map +1 -1
  33. package/dataview/index.d.ts +5 -5
  34. package/datepicker/DatePicker.vue +10 -3
  35. package/datepicker/index.mjs +123 -84
  36. package/datepicker/index.mjs.map +1 -1
  37. package/dock/index.mjs +8 -4
  38. package/dock/index.mjs.map +1 -1
  39. package/dynamicdialog/index.mjs +6 -3
  40. package/dynamicdialog/index.mjs.map +1 -1
  41. package/fileupload/FileUpload.vue +2 -3
  42. package/fileupload/index.mjs +20 -15
  43. package/fileupload/index.mjs.map +1 -1
  44. package/floatlabel/index.d.ts +1 -1
  45. package/galleria/index.mjs +8 -4
  46. package/galleria/index.mjs.map +1 -1
  47. package/image/Image.vue +1 -1
  48. package/image/index.mjs +1 -1
  49. package/image/index.mjs.map +1 -1
  50. package/inputchips/index.mjs +2 -1
  51. package/inputchips/index.mjs.map +1 -1
  52. package/inputmask/InputMask.vue +3 -3
  53. package/inputmask/index.d.ts +3 -3
  54. package/inputmask/index.mjs +3 -3
  55. package/inputmask/index.mjs.map +1 -1
  56. package/inputnumber/InputNumber.vue +1 -1
  57. package/inputnumber/index.mjs +2 -2
  58. package/inputnumber/index.mjs.map +1 -1
  59. package/inputtext/index.d.ts +2 -1
  60. package/listbox/Listbox.vue +1 -0
  61. package/listbox/index.mjs +35 -30
  62. package/listbox/index.mjs.map +1 -1
  63. package/megamenu/index.d.ts +1 -1
  64. package/megamenu/index.mjs +33 -22
  65. package/megamenu/index.mjs.map +1 -1
  66. package/menu/Menu.vue +4 -4
  67. package/menu/index.d.ts +3 -12
  68. package/menu/index.mjs +10 -7
  69. package/menu/index.mjs.map +1 -1
  70. package/menubar/index.mjs +30 -23
  71. package/menubar/index.mjs.map +1 -1
  72. package/metergroup/index.d.ts +1 -1
  73. package/metergroup/index.mjs +10 -5
  74. package/metergroup/index.mjs.map +1 -1
  75. package/multiselect/MultiSelect.vue +4 -1
  76. package/multiselect/index.d.ts +1 -1
  77. package/multiselect/index.mjs +59 -52
  78. package/multiselect/index.mjs.map +1 -1
  79. package/organizationchart/OrganizationChartNode.vue +1 -1
  80. package/organizationchart/index.mjs +6 -3
  81. package/organizationchart/index.mjs.map +1 -1
  82. package/organizationchart/style/index.mjs +11 -6
  83. package/organizationchart/style/index.mjs.map +1 -1
  84. package/package.json +6 -6
  85. package/paginator/index.mjs +10 -4
  86. package/paginator/index.mjs.map +1 -1
  87. package/panel/Panel.vue +2 -2
  88. package/panel/index.mjs +2 -2
  89. package/panel/index.mjs.map +1 -1
  90. package/panelmenu/index.mjs +45 -24
  91. package/panelmenu/index.mjs.map +1 -1
  92. package/password/Password.vue +8 -3
  93. package/password/index.d.ts +1 -1
  94. package/password/index.mjs +18 -9
  95. package/password/index.mjs.map +1 -1
  96. package/rating/index.mjs +10 -5
  97. package/rating/index.mjs.map +1 -1
  98. package/select/Select.vue +21 -3
  99. package/select/index.mjs +66 -42
  100. package/select/index.mjs.map +1 -1
  101. package/selectbutton/index.d.ts +0 -24
  102. package/speeddial/index.mjs +6 -3
  103. package/speeddial/index.mjs.map +1 -1
  104. package/splitter/Splitter.vue +2 -2
  105. package/splitter/index.d.ts +1 -1
  106. package/splitter/index.mjs +5 -3
  107. package/splitter/index.mjs.map +1 -1
  108. package/splitter/style/index.mjs +1 -13
  109. package/splitter/style/index.mjs.map +1 -1
  110. package/step/Step.vue +2 -2
  111. package/step/index.mjs +2 -2
  112. package/step/index.mjs.map +1 -1
  113. package/steppanel/StepPanel.vue +2 -2
  114. package/steppanel/index.mjs +2 -2
  115. package/steppanel/index.mjs.map +1 -1
  116. package/steps/index.mjs +8 -4
  117. package/steps/index.mjs.map +1 -1
  118. package/tabmenu/index.mjs +8 -2
  119. package/tabmenu/index.mjs.map +1 -1
  120. package/tabview/index.mjs +8 -4
  121. package/tabview/index.mjs.map +1 -1
  122. package/terminal/index.mjs +8 -4
  123. package/terminal/index.mjs.map +1 -1
  124. package/textarea/index.d.ts +2 -1
  125. package/tieredmenu/index.mjs +30 -21
  126. package/tieredmenu/index.mjs.map +1 -1
  127. package/timeline/index.mjs +12 -6
  128. package/timeline/index.mjs.map +1 -1
  129. package/toast/ToastMessage.vue +1 -1
  130. package/toast/index.mjs +1 -1
  131. package/toast/index.mjs.map +1 -1
  132. package/toggleswitch/style/index.d.ts +1 -5
  133. package/tooltip/index.mjs +25 -14
  134. package/tooltip/index.mjs.map +1 -1
  135. package/treeselect/TreeSelect.vue +3 -0
  136. package/treeselect/index.mjs +5 -1
  137. package/treeselect/index.mjs.map +1 -1
  138. package/treetable/index.mjs +2 -1
  139. package/treetable/index.mjs.map +1 -1
  140. package/umd/primevue.min.js +12213 -1
  141. package/virtualscroller/VirtualScroller.vue +4 -1
  142. package/virtualscroller/index.mjs +21 -19
  143. package/virtualscroller/index.mjs.map +1 -1
  144. package/web-types.json +1 -1
@@ -10,6 +10,7 @@
10
10
  import type { DefineComponent, DesignToken, EmitFn, HintedString, Nullable, PassThrough } from '@primevue/core';
11
11
  import type { ComponentHooks } from '@primevue/core/basecomponent';
12
12
  import type { PassThroughOptions } from 'primevue/passthrough';
13
+ import { InputHTMLAttributes } from 'vue';
13
14
 
14
15
  export declare type InputTextPassThroughOptionType<T = any> = InputTextPassThroughAttributes | ((options: InputTextPassThroughMethodOptions<T>) => InputTextPassThroughAttributes | string) | string | null | undefined;
15
16
 
@@ -81,7 +82,7 @@ export interface InputTextContext {
81
82
  /**
82
83
  * Defines valid properties in InputText component.
83
84
  */
84
- export interface InputTextProps {
85
+ export interface InputTextProps extends Omit<InputHTMLAttributes, 'size'> {
85
86
  /**
86
87
  * Value of the component.
87
88
  */
@@ -240,6 +240,7 @@ export default {
240
240
  this.focused = true;
241
241
  this.focusedOptionIndex = this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : this.findSelectedOptionIndex();
242
242
  this.autoUpdateModel();
243
+ this.scrollInView(this.focusedOptionIndex);
243
244
  this.$emit('focus', event);
244
245
  },
245
246
  onListBlur(event) {
package/listbox/index.mjs CHANGED
@@ -221,6 +221,7 @@ var script = {
221
221
  this.focused = true;
222
222
  this.focusedOptionIndex = this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : this.findSelectedOptionIndex();
223
223
  this.autoUpdateModel();
224
+ this.scrollInView(this.focusedOptionIndex);
224
225
  this.$emit('focus', event);
225
226
  },
226
227
  onListBlur: function onListBlur(event) {
@@ -565,28 +566,28 @@ var script = {
565
566
  return -1;
566
567
  },
567
568
  findFirstSelectedOptionIndex: function findFirstSelectedOptionIndex() {
568
- var _this10 = this;
569
+ var _this0 = this;
569
570
  return this.$filled ? this.visibleOptions.findIndex(function (option) {
570
- return _this10.isValidSelectedOption(option);
571
+ return _this0.isValidSelectedOption(option);
571
572
  }) : -1;
572
573
  },
573
574
  findLastSelectedOptionIndex: function findLastSelectedOptionIndex() {
574
- var _this11 = this;
575
+ var _this1 = this;
575
576
  return this.$filled ? findLastIndex(this.visibleOptions, function (option) {
576
- return _this11.isValidSelectedOption(option);
577
+ return _this1.isValidSelectedOption(option);
577
578
  }) : -1;
578
579
  },
579
580
  findNextSelectedOptionIndex: function findNextSelectedOptionIndex(index) {
580
- var _this12 = this;
581
+ var _this10 = this;
581
582
  var matchedOptionIndex = this.$filled && index < this.visibleOptions.length - 1 ? this.visibleOptions.slice(index + 1).findIndex(function (option) {
582
- return _this12.isValidSelectedOption(option);
583
+ return _this10.isValidSelectedOption(option);
583
584
  }) : -1;
584
585
  return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : -1;
585
586
  },
586
587
  findPrevSelectedOptionIndex: function findPrevSelectedOptionIndex(index) {
587
- var _this13 = this;
588
+ var _this11 = this;
588
589
  var matchedOptionIndex = this.$filled && index > 0 ? findLastIndex(this.visibleOptions.slice(0, index), function (option) {
589
- return _this13.isValidSelectedOption(option);
590
+ return _this11.isValidSelectedOption(option);
590
591
  }) : -1;
591
592
  return matchedOptionIndex > -1 ? matchedOptionIndex : -1;
592
593
  },
@@ -613,20 +614,20 @@ var script = {
613
614
  return selectedIndex < 0 ? this.findLastOptionIndex() : selectedIndex;
614
615
  },
615
616
  searchOptions: function searchOptions(event, _char) {
616
- var _this14 = this;
617
+ var _this12 = this;
617
618
  this.searchValue = (this.searchValue || '') + _char;
618
619
  var optionIndex = -1;
619
620
  if (isNotEmpty(this.searchValue)) {
620
621
  if (this.focusedOptionIndex !== -1) {
621
622
  optionIndex = this.visibleOptions.slice(this.focusedOptionIndex).findIndex(function (option) {
622
- return _this14.isOptionMatched(option);
623
+ return _this12.isOptionMatched(option);
623
624
  });
624
625
  optionIndex = optionIndex === -1 ? this.visibleOptions.slice(0, this.focusedOptionIndex).findIndex(function (option) {
625
- return _this14.isOptionMatched(option);
626
+ return _this12.isOptionMatched(option);
626
627
  }) : optionIndex + this.focusedOptionIndex;
627
628
  } else {
628
629
  optionIndex = this.visibleOptions.findIndex(function (option) {
629
- return _this14.isOptionMatched(option);
630
+ return _this12.isOptionMatched(option);
630
631
  });
631
632
  }
632
633
  if (optionIndex === -1 && this.focusedOptionIndex === -1) {
@@ -640,14 +641,14 @@ var script = {
640
641
  clearTimeout(this.searchTimeout);
641
642
  }
642
643
  this.searchTimeout = setTimeout(function () {
643
- _this14.searchValue = '';
644
- _this14.searchTimeout = null;
644
+ _this12.searchValue = '';
645
+ _this12.searchTimeout = null;
645
646
  }, 500);
646
647
  },
647
648
  removeOption: function removeOption(option) {
648
- var _this15 = this;
649
+ var _this13 = this;
649
650
  return this.d_value.filter(function (val) {
650
- return !equals(val, _this15.getOptionValue(option), _this15.equalityKey);
651
+ return !equals(val, _this13.getOptionValue(option), _this13.equalityKey);
651
652
  });
652
653
  },
653
654
  changeFocusedOptionIndex: function changeFocusedOptionIndex(event, index) {
@@ -660,19 +661,19 @@ var script = {
660
661
  }
661
662
  },
662
663
  scrollInView: function scrollInView() {
663
- var _this16 = this;
664
+ var _this14 = this;
664
665
  var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;
665
666
  this.$nextTick(function () {
666
- var id = index !== -1 ? "".concat(_this16.$id, "_").concat(index) : _this16.focusedOptionId;
667
- var element = findSingle(_this16.list, "li[id=\"".concat(id, "\"]"));
667
+ var id = index !== -1 ? "".concat(_this14.$id, "_").concat(index) : _this14.focusedOptionId;
668
+ var element = findSingle(_this14.list, "li[id=\"".concat(id, "\"]"));
668
669
  if (element) {
669
670
  element.scrollIntoView && element.scrollIntoView({
670
671
  block: 'nearest',
671
672
  inline: 'nearest',
672
673
  behavior: 'smooth'
673
674
  });
674
- } else if (!_this16.virtualScrollerDisabled) {
675
- _this16.virtualScroller && _this16.virtualScroller.scrollToIndex(index !== -1 ? index : _this16.focusedOptionIndex);
675
+ } else if (!_this14.virtualScrollerDisabled) {
676
+ _this14.virtualScroller && _this14.virtualScroller.scrollToIndex(index !== -1 ? index : _this14.focusedOptionIndex);
676
677
  }
677
678
  });
678
679
  },
@@ -702,11 +703,11 @@ var script = {
702
703
  return this.filterValue ? FilterService.filter(this.options, this.searchFields, this.filterValue, this.filterMatchMode, this.filterLocale) : this.options;
703
704
  },
704
705
  optionsListGroup: function optionsListGroup() {
705
- var _this17 = this;
706
+ var _this15 = this;
706
707
  var filteredOptions = [];
707
708
  (this.options || []).forEach(function (optionGroup) {
708
- var optionGroupChildren = _this17.getOptionGroupChildren(optionGroup) || [];
709
- var filteredChildren = _this17.filterValue ? FilterService.filter(optionGroupChildren, _this17.searchFields, _this17.filterValue, _this17.filterMatchMode, _this17.filterLocale) : optionGroupChildren;
709
+ var optionGroupChildren = _this15.getOptionGroupChildren(optionGroup) || [];
710
+ var filteredChildren = _this15.filterValue ? FilterService.filter(optionGroupChildren, _this15.searchFields, _this15.filterValue, _this15.filterMatchMode, _this15.filterLocale) : optionGroupChildren;
710
711
  if (filteredChildren !== null && filteredChildren !== void 0 && filteredChildren.length) {
711
712
  filteredOptions.push.apply(filteredOptions, [{
712
713
  optionGroup: optionGroup,
@@ -754,9 +755,9 @@ var script = {
754
755
  return this.focusedOptionIndex !== -1 ? "".concat(this.$id, "_").concat(this.focusedOptionIndex) : null;
755
756
  },
756
757
  ariaSetSize: function ariaSetSize() {
757
- var _this18 = this;
758
+ var _this16 = this;
758
759
  return this.visibleOptions.filter(function (option) {
759
- return !_this18.isOptionGroup(option);
760
+ return !_this16.isOptionGroup(option);
760
761
  }).length;
761
762
  },
762
763
  virtualScrollerDisabled: function virtualScrollerDisabled() {
@@ -930,7 +931,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
930
931
  height: itemSize ? itemSize + 'px' : undefined
931
932
  },
932
933
  "class": _ctx.cx('optionGroup'),
933
- role: "option",
934
+ role: "option"
935
+ }, {
934
936
  ref_for: true
935
937
  }, _ctx.ptm('optionGroup')), [renderSlot(_ctx.$slots, "optiongroup", {
936
938
  option: option.optionGroup,
@@ -968,7 +970,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
968
970
  }),
969
971
  onDblclick: function onDblclick($event) {
970
972
  return $options.onOptionDblClick($event, option);
971
- },
973
+ }
974
+ }, {
972
975
  ref_for: true
973
976
  }, $options.getPTOptions(option, getItemOptions, i, 'option'), {
974
977
  "data-p-selected": !_ctx.checkmark && $options.isSelected(option),
@@ -978,11 +981,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
978
981
  key: 0
979
982
  }, [$options.isSelected(option) ? (openBlock(), createBlock(_component_CheckIcon, mergeProps({
980
983
  key: 0,
981
- "class": _ctx.cx('optionCheckIcon'),
984
+ "class": _ctx.cx('optionCheckIcon')
985
+ }, {
982
986
  ref_for: true
983
987
  }, _ctx.ptm('optionCheckIcon')), null, 16, ["class"])) : (openBlock(), createBlock(_component_BlankIcon, mergeProps({
984
988
  key: 1,
985
- "class": _ctx.cx('optionBlankIcon'),
989
+ "class": _ctx.cx('optionBlankIcon')
990
+ }, {
986
991
  ref_for: true
987
992
  }, _ctx.ptm('optionBlankIcon')), null, 16, ["class"]))], 64)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "option", {
988
993
  option: option,