primevue 4.0.7 → 4.1.0

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 (238) hide show
  1. package/autocomplete/AutoComplete.vue +50 -50
  2. package/autocomplete/index.d.ts +5 -1
  3. package/autocomplete/index.mjs +11 -8
  4. package/autocomplete/index.mjs.map +1 -1
  5. package/autocomplete/style/index.d.ts +4 -0
  6. package/autocomplete/style/index.mjs +3 -2
  7. package/autocomplete/style/index.mjs.map +1 -1
  8. package/button/BaseButton.vue +2 -2
  9. package/button/Button.vue +1 -1
  10. package/button/index.d.ts +2 -2
  11. package/button/index.mjs +7 -6
  12. package/button/index.mjs.map +1 -1
  13. package/carousel/Carousel.vue +2 -7
  14. package/carousel/index.mjs +2 -7
  15. package/carousel/index.mjs.map +1 -1
  16. package/carousel/style/index.mjs +1 -1
  17. package/carousel/style/index.mjs.map +1 -1
  18. package/cascadeselect/BaseCascadeSelect.vue +4 -0
  19. package/cascadeselect/CascadeSelect.vue +53 -10
  20. package/cascadeselect/CascadeSelectSub.vue +24 -27
  21. package/cascadeselect/index.d.ts +41 -1
  22. package/cascadeselect/index.mjs +114 -73
  23. package/cascadeselect/index.mjs.map +1 -1
  24. package/cascadeselect/style/index.mjs +13 -6
  25. package/cascadeselect/style/index.mjs.map +1 -1
  26. package/colorpicker/BaseColorPicker.vue +2 -1
  27. package/colorpicker/ColorPicker.vue +3 -3
  28. package/colorpicker/index.d.ts +6 -1
  29. package/colorpicker/index.mjs +11 -4
  30. package/colorpicker/index.mjs.map +1 -1
  31. package/config/index.d.ts +9 -3
  32. package/confirmationoptions/index.d.ts +12 -0
  33. package/confirmdialog/ConfirmDialog.vue +11 -1
  34. package/confirmdialog/index.d.ts +3 -7
  35. package/confirmdialog/index.mjs +12 -2
  36. package/confirmdialog/index.mjs.map +1 -1
  37. package/contextmenu/BaseContextMenu.vue +4 -0
  38. package/contextmenu/ContextMenu.vue +37 -10
  39. package/contextmenu/index.d.ts +10 -5
  40. package/contextmenu/index.mjs +57 -28
  41. package/contextmenu/index.mjs.map +1 -1
  42. package/contextmenu/style/index.mjs +10 -5
  43. package/contextmenu/style/index.mjs.map +1 -1
  44. package/datatable/BaseDataTable.vue +4 -0
  45. package/datatable/DataTable.vue +5 -10
  46. package/datatable/HeaderCheckbox.vue +1 -1
  47. package/datatable/TableBody.vue +1 -1
  48. package/datatable/TableHeader.vue +51 -51
  49. package/datatable/index.d.ts +5 -0
  50. package/datatable/index.mjs +90 -87
  51. package/datatable/index.mjs.map +1 -1
  52. package/datatable/style/index.mjs +1 -1
  53. package/datatable/style/index.mjs.map +1 -1
  54. package/datepicker/DatePicker.vue +13 -11
  55. package/datepicker/index.d.ts +2 -10
  56. package/datepicker/index.mjs +12 -10
  57. package/datepicker/index.mjs.map +1 -1
  58. package/datepicker/style/index.mjs +3 -3
  59. package/datepicker/style/index.mjs.map +1 -1
  60. package/dialog/Dialog.vue +4 -10
  61. package/dialog/index.mjs +3 -10
  62. package/dialog/index.mjs.map +1 -1
  63. package/drawer/index.d.ts +5 -1
  64. package/fieldset/index.d.ts +2 -6
  65. package/fileupload/index.d.ts +1 -1
  66. package/floatlabel/BaseFloatLabel.vue +6 -1
  67. package/floatlabel/index.d.ts +7 -2
  68. package/floatlabel/index.mjs +6 -1
  69. package/floatlabel/index.mjs.map +1 -1
  70. package/floatlabel/style/index.d.ts +2 -2
  71. package/floatlabel/style/index.mjs +10 -2
  72. package/floatlabel/style/index.mjs.map +1 -1
  73. package/focustrap/index.d.ts +1 -1
  74. package/galleria/index.d.ts +8 -8
  75. package/galleria/style/index.mjs +2 -2
  76. package/galleria/style/index.mjs.map +1 -1
  77. package/iftalabel/BaseIftaLabel.vue +16 -0
  78. package/iftalabel/IftaLabel.vue +15 -0
  79. package/iftalabel/index.d.ts +130 -0
  80. package/iftalabel/index.mjs +32 -0
  81. package/iftalabel/index.mjs.map +1 -0
  82. package/iftalabel/package.json +11 -0
  83. package/iftalabel/style/index.d.ts +19 -0
  84. package/iftalabel/style/index.mjs +17 -0
  85. package/iftalabel/style/index.mjs.map +1 -0
  86. package/iftalabel/style/package.json +6 -0
  87. package/imagecompare/BaseImageCompare.vue +30 -0
  88. package/imagecompare/ImageCompare.vue +24 -0
  89. package/imagecompare/index.d.ts +149 -0
  90. package/imagecompare/index.mjs +61 -0
  91. package/imagecompare/index.mjs.map +1 -0
  92. package/imagecompare/package.json +11 -0
  93. package/imagecompare/style/index.d.ts +23 -0
  94. package/imagecompare/style/index.mjs +18 -0
  95. package/imagecompare/style/index.mjs.map +1 -0
  96. package/imagecompare/style/package.json +6 -0
  97. package/inputgroup/BaseInputGroup.vue +0 -6
  98. package/inputgroup/InputGroup.vue +1 -10
  99. package/inputgroup/index.d.ts +0 -5
  100. package/inputgroup/index.mjs +1 -18
  101. package/inputgroup/index.mjs.map +1 -1
  102. package/inputgroup/style/index.mjs +2 -7
  103. package/inputgroup/style/index.mjs.map +1 -1
  104. package/inputmask/InputMask.vue +23 -17
  105. package/inputmask/index.mjs +21 -16
  106. package/inputmask/index.mjs.map +1 -1
  107. package/inputnumber/InputNumber.vue +2 -2
  108. package/inputnumber/index.d.ts +1 -1
  109. package/inputnumber/index.mjs +2 -2
  110. package/inputnumber/index.mjs.map +1 -1
  111. package/inputnumber/style/index.mjs +2 -2
  112. package/inputnumber/style/index.mjs.map +1 -1
  113. package/inputotp/BaseInputOtp.vue +1 -1
  114. package/inputotp/InputOtp.vue +6 -12
  115. package/inputotp/index.d.ts +2 -2
  116. package/inputotp/index.mjs +11 -12
  117. package/inputotp/index.mjs.map +1 -1
  118. package/inputotp/style/index.mjs +1 -1
  119. package/inputotp/style/index.mjs.map +1 -1
  120. package/inputtext/style/index.mjs +1 -1
  121. package/inputtext/style/index.mjs.map +1 -1
  122. package/keyfilter/index.d.ts +153 -0
  123. package/keyfilter/index.mjs +127 -0
  124. package/keyfilter/index.mjs.map +1 -0
  125. package/keyfilter/package.json +5 -0
  126. package/keyfilter/style/index.d.ts +14 -0
  127. package/keyfilter/style/index.mjs +8 -0
  128. package/keyfilter/style/index.mjs.map +1 -0
  129. package/keyfilter/style/package.json +6 -0
  130. package/megamenu/MegaMenu.vue +4 -4
  131. package/megamenu/index.d.ts +4 -0
  132. package/megamenu/index.mjs +2 -2
  133. package/megamenu/index.mjs.map +1 -1
  134. package/message/Message.vue +3 -19
  135. package/message/index.mjs +4 -20
  136. package/message/index.mjs.map +1 -1
  137. package/multiselect/BaseMultiSelect.vue +1 -5
  138. package/multiselect/MultiSelect.vue +16 -14
  139. package/multiselect/index.d.ts +2 -20
  140. package/multiselect/index.mjs +15 -17
  141. package/multiselect/index.mjs.map +1 -1
  142. package/multiselect/style/index.mjs +1 -1
  143. package/multiselect/style/index.mjs.map +1 -1
  144. package/orderlist/OrderList.vue +4 -8
  145. package/orderlist/index.d.ts +1 -5
  146. package/orderlist/index.mjs +3 -7
  147. package/orderlist/index.mjs.map +1 -1
  148. package/package.json +5 -5
  149. package/paginator/JumpToPageInput.vue +1 -1
  150. package/paginator/Paginator.vue +4 -16
  151. package/paginator/index.d.ts +1 -1
  152. package/paginator/index.mjs +4 -21
  153. package/paginator/index.mjs.map +1 -1
  154. package/paginator/style/index.d.ts +1 -1
  155. package/paginator/style/index.mjs +1 -1
  156. package/paginator/style/index.mjs.map +1 -1
  157. package/panelmenu/index.d.ts +1 -1
  158. package/password/BasePassword.vue +4 -0
  159. package/password/Password.vue +4 -3
  160. package/password/index.d.ts +6 -1
  161. package/password/index.mjs +10 -5
  162. package/password/index.mjs.map +1 -1
  163. package/password/style/index.mjs +1 -1
  164. package/password/style/index.mjs.map +1 -1
  165. package/picklist/PickList.vue +4 -8
  166. package/picklist/index.d.ts +1 -13
  167. package/picklist/index.mjs +3 -7
  168. package/picklist/index.mjs.map +1 -1
  169. package/popover/Popover.vue +4 -10
  170. package/popover/index.d.ts +1 -1
  171. package/popover/index.mjs +3 -9
  172. package/popover/index.mjs.map +1 -1
  173. package/progressspinner/index.d.ts +1 -1
  174. package/rating/style/index.mjs +1 -1
  175. package/rating/style/index.mjs.map +1 -1
  176. package/scrolltop/ScrollTop.vue +2 -9
  177. package/scrolltop/index.d.ts +1 -6
  178. package/scrolltop/index.mjs +3 -9
  179. package/scrolltop/index.mjs.map +1 -1
  180. package/select/Select.vue +13 -6
  181. package/select/index.mjs +54 -45
  182. package/select/index.mjs.map +1 -1
  183. package/select/style/index.mjs +1 -1
  184. package/select/style/index.mjs.map +1 -1
  185. package/speeddial/SpeedDial.vue +3 -1
  186. package/speeddial/index.d.ts +16 -1
  187. package/speeddial/index.mjs +10 -5
  188. package/speeddial/index.mjs.map +1 -1
  189. package/splitter/Splitter.vue +31 -25
  190. package/splitter/index.d.ts +8 -1
  191. package/splitter/index.mjs +28 -22
  192. package/splitter/index.mjs.map +1 -1
  193. package/tieredmenu/BaseTieredMenu.vue +4 -0
  194. package/tieredmenu/TieredMenu.vue +31 -4
  195. package/tieredmenu/TieredMenuSub.vue +3 -1
  196. package/tieredmenu/index.d.ts +5 -0
  197. package/tieredmenu/index.mjs +63 -34
  198. package/tieredmenu/index.mjs.map +1 -1
  199. package/tieredmenu/style/index.mjs +5 -4
  200. package/tieredmenu/style/index.mjs.map +1 -1
  201. package/toast/Toast.vue +2 -9
  202. package/toast/index.mjs +1 -8
  203. package/toast/index.mjs.map +1 -1
  204. package/toggleswitch/ToggleSwitch.vue +5 -1
  205. package/toggleswitch/index.d.ts +17 -1
  206. package/toggleswitch/index.mjs +7 -3
  207. package/toggleswitch/index.mjs.map +1 -1
  208. package/toggleswitch/style/index.d.ts +9 -1
  209. package/toggleswitch/style/index.mjs +3 -2
  210. package/toggleswitch/style/index.mjs.map +1 -1
  211. package/tooltip/index.mjs +6 -1
  212. package/tooltip/index.mjs.map +1 -1
  213. package/tree/BaseTree.vue +1 -1
  214. package/tree/Tree.vue +4 -2
  215. package/tree/TreeNode.vue +16 -4
  216. package/tree/index.d.ts +52 -3
  217. package/tree/index.mjs +23 -10
  218. package/tree/index.mjs.map +1 -1
  219. package/treeselect/BaseTreeSelect.vue +36 -0
  220. package/treeselect/TreeSelect.vue +31 -16
  221. package/treeselect/index.d.ts +73 -4
  222. package/treeselect/index.mjs +82 -25
  223. package/treeselect/index.mjs.map +1 -1
  224. package/treeselect/style/index.mjs +1 -1
  225. package/treeselect/style/index.mjs.map +1 -1
  226. package/treetable/BaseTreeTable.vue +8 -0
  227. package/treetable/TreeTable.vue +19 -11
  228. package/treetable/TreeTableRow.vue +28 -2
  229. package/treetable/index.d.ts +34 -0
  230. package/treetable/index.mjs +63 -19
  231. package/treetable/index.mjs.map +1 -1
  232. package/treetable/style/index.mjs +5 -3
  233. package/treetable/style/index.mjs.map +1 -1
  234. package/umd/primevue.min.js +1 -1
  235. package/vetur-attributes.json +3 -3
  236. package/virtualscroller/style/index.mjs +3 -1
  237. package/virtualscroller/style/index.mjs.map +1 -1
  238. package/web-types.json +4 -4
@@ -1,4 +1,4 @@
1
- import { nestedPosition, focus, addStyle, relativePosition, getOuterWidth, absolutePosition, isTouchDevice, findSingle } from '@primeuix/utils/dom';
1
+ import { focus, addStyle, relativePosition, getOuterWidth, absolutePosition, isTouchDevice, findSingle } from '@primeuix/utils/dom';
2
2
  import { resolveFieldData, isNotEmpty, isString, isPrintableCharacter, isEmpty, findLastIndex, equals } from '@primeuix/utils/object';
3
3
  import { ZIndex } from '@primeuix/utils/zindex';
4
4
  import { UniqueComponentId, ConnectedOverlayScrollHandler } from '@primevue/core/utils';
@@ -10,7 +10,7 @@ import Portal from 'primevue/portal';
10
10
  import BaseComponent from '@primevue/core/basecomponent';
11
11
  import CascadeSelectStyle from 'primevue/cascadeselect/style';
12
12
  import Ripple from 'primevue/ripple';
13
- import { resolveComponent, resolveDirective, openBlock, createElementBlock, mergeProps, Fragment, renderList, withDirectives, createBlock, resolveDynamicComponent, toDisplayString, createCommentVNode, normalizeClass, createElementVNode, renderSlot, createTextVNode, createVNode, withCtx, Transition } from 'vue';
13
+ import { resolveComponent, resolveDirective, openBlock, createElementBlock, mergeProps, Fragment, renderList, withDirectives, createBlock, resolveDynamicComponent, toDisplayString, normalizeClass, createCommentVNode, createElementVNode, renderSlot, createTextVNode, createVNode, withCtx, Transition } from 'vue';
14
14
 
15
15
  var script$2 = {
16
16
  name: 'BaseCascadeSelect',
@@ -24,6 +24,10 @@ var script$2 = {
24
24
  optionGroupLabel: null,
25
25
  optionGroupChildren: null,
26
26
  placeholder: String,
27
+ breakpoint: {
28
+ type: String,
29
+ "default": '960px'
30
+ },
27
31
  variant: {
28
32
  type: String,
29
33
  "default": null
@@ -160,7 +164,7 @@ var script$1 = {
160
164
  name: 'CascadeSelectSub',
161
165
  hostName: 'CascadeSelect',
162
166
  "extends": BaseComponent,
163
- emits: ['option-change', 'option-focus-change'],
167
+ emits: ['option-change', 'option-focus-change', 'option-focus-enter-change'],
164
168
  container: null,
165
169
  props: {
166
170
  selectId: String,
@@ -177,25 +181,7 @@ var script$1 = {
177
181
  },
178
182
  activeOptionPath: Array,
179
183
  level: Number,
180
- templates: null,
181
- isParentMount: Boolean
182
- },
183
- data: function data() {
184
- return {
185
- mounted: false
186
- };
187
- },
188
- watch: {
189
- isParentMount: {
190
- handler: function handler(newValue) {
191
- newValue && nestedPosition(this.container, this.level);
192
- }
193
- }
194
- },
195
- mounted: function mounted() {
196
- // entering order correction when an option is selected
197
- (this.isParentMount || this.level === 0) && nestedPosition(this.container, this.level);
198
- this.mounted = true;
184
+ templates: null
199
185
  },
200
186
  methods: {
201
187
  getOptionId: function getOptionId(processedOption) {
@@ -253,6 +239,12 @@ var script$1 = {
253
239
  isFocus: true
254
240
  });
255
241
  },
242
+ onOptionMouseEnter: function onOptionMouseEnter(event, processedOption) {
243
+ this.$emit('option-focus-enter-change', {
244
+ originalEvent: event,
245
+ processedOption: processedOption
246
+ });
247
+ },
256
248
  onOptionMouseMove: function onOptionMouseMove(event, processedOption) {
257
249
  this.$emit('option-focus-change', {
258
250
  originalEvent: event,
@@ -265,6 +257,9 @@ var script$1 = {
265
257
  onOptionFocusChange: function onOptionFocusChange(event) {
266
258
  this.$emit('option-focus-change', event);
267
259
  },
260
+ onOptionFocusEnterChange: function onOptionFocusEnterChange(event) {
261
+ this.$emit('option-focus-enter-change', event);
262
+ },
268
263
  containerRef: function containerRef(el) {
269
264
  this.container = el;
270
265
  },
@@ -281,7 +276,7 @@ var script$1 = {
281
276
  };
282
277
 
283
278
  var _hoisted_1$1 = ["id", "aria-label", "aria-selected", "aria-expanded", "aria-level", "aria-setsize", "aria-posinset", "data-p-option-group", "data-p-active", "data-p-focus", "data-p-disabled"];
284
- var _hoisted_2 = ["onClick", "onMousemove"];
279
+ var _hoisted_2 = ["onClick", "onMouseenter", "onMousemove"];
285
280
  function render$1(_ctx, _cache, $props, $setup, $data, $options) {
286
281
  var _component_AngleRightIcon = resolveComponent("AngleRightIcon");
287
282
  var _component_CascadeSelectSub = resolveComponent("CascadeSelectSub", true);
@@ -314,6 +309,9 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
314
309
  onClick: function onClick($event) {
315
310
  return $options.onOptionClick($event, processedOption);
316
311
  },
312
+ onMouseenter: function onMouseenter($event) {
313
+ return $options.onOptionMouseEnter($event, processedOption);
314
+ },
317
315
  onMousemove: function onMousemove($event) {
318
316
  return $options.onOptionMouseMove($event, processedOption);
319
317
  },
@@ -326,12 +324,13 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
326
324
  key: 1,
327
325
  "class": _ctx.cx('optionText'),
328
326
  ref_for: true
329
- }, $options.getPTOptions(processedOption, index, 'optionText')), toDisplayString($options.getOptionLabelToRender(processedOption)), 17)), $options.isOptionGroup(processedOption) ? (openBlock(), createElementBlock(Fragment, {
330
- key: 2
327
+ }, $options.getPTOptions(processedOption, index, 'optionText')), toDisplayString($options.getOptionLabelToRender(processedOption)), 17)), $options.isOptionGroup(processedOption) ? (openBlock(), createElementBlock("span", {
328
+ key: 2,
329
+ "class": normalizeClass(_ctx.cx('groupIconContainer'))
331
330
  }, [$props.templates['optiongroupicon'] ? (openBlock(), createBlock(resolveDynamicComponent($props.templates['optiongroupicon']), {
332
331
  key: 0,
333
- "aria-hidden": "true"
334
- })) : $props.optionGroupIcon ? (openBlock(), createElementBlock("span", mergeProps({
332
+ "class": normalizeClass(_ctx.cx('groupIcon'))
333
+ }, null, 8, ["class"])) : $props.optionGroupIcon ? (openBlock(), createElementBlock("span", mergeProps({
335
334
  key: 1,
336
335
  "class": [_ctx.cx('groupIcon'), $props.optionGroupIcon],
337
336
  "aria-hidden": "true",
@@ -341,7 +340,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
341
340
  "class": _ctx.cx('groupIcon'),
342
341
  "aria-hidden": "true",
343
342
  ref_for: true
344
- }, $options.getPTOptions(processedOption, index, 'groupIcon')), null, 16, ["class"]))], 64)) : createCommentVNode("", true)], 16, _hoisted_2)), [[_directive_ripple]]), $options.isOptionGroup(processedOption) && $options.isOptionActive(processedOption) ? (openBlock(), createBlock(_component_CascadeSelectSub, {
343
+ }, $options.getPTOptions(processedOption, index, 'groupIcon')), null, 16, ["class"]))], 2)) : createCommentVNode("", true)], 16, _hoisted_2)), [[_directive_ripple]]), $options.isOptionGroup(processedOption) && $options.isOptionActive(processedOption) ? (openBlock(), createBlock(_component_CascadeSelectSub, {
345
344
  key: 0,
346
345
  role: "group",
347
346
  "class": normalizeClass(_ctx.cx('optionList')),
@@ -359,10 +358,10 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
359
358
  optionGroupChildren: $props.optionGroupChildren,
360
359
  onOptionChange: $options.onOptionChange,
361
360
  onOptionFocusChange: $options.onOptionFocusChange,
361
+ onOptionFocusEnterChange: $options.onOptionFocusEnterChange,
362
362
  pt: _ctx.pt,
363
- unstyled: _ctx.unstyled,
364
- isParentMount: $data.mounted
365
- }, null, 8, ["class", "selectId", "focusedOptionId", "options", "activeOptionPath", "level", "templates", "optionLabel", "optionValue", "optionDisabled", "optionGroupIcon", "optionGroupLabel", "optionGroupChildren", "onOptionChange", "onOptionFocusChange", "pt", "unstyled", "isParentMount"])) : createCommentVNode("", true)], 16, _hoisted_1$1);
363
+ unstyled: _ctx.unstyled
364
+ }, null, 8, ["class", "selectId", "focusedOptionId", "options", "activeOptionPath", "level", "templates", "optionLabel", "optionValue", "optionDisabled", "optionGroupIcon", "optionGroupLabel", "optionGroupChildren", "onOptionChange", "onOptionFocusChange", "onOptionFocusEnterChange", "pt", "unstyled"])) : createCommentVNode("", true)], 16, _hoisted_1$1);
366
365
  }), 128))], 16);
367
366
  }
368
367
 
@@ -379,6 +378,7 @@ var script = {
379
378
  }
380
379
  },
381
380
  outsideClickListener: null,
381
+ matchMediaListener: null,
382
382
  scrollHandler: null,
383
383
  resizeListener: null,
384
384
  overlay: null,
@@ -396,7 +396,10 @@ var script = {
396
396
  },
397
397
  activeOptionPath: [],
398
398
  overlayVisible: false,
399
- dirty: false
399
+ dirty: false,
400
+ mobileActive: false,
401
+ query: null,
402
+ queryMatches: false
400
403
  };
401
404
  },
402
405
  watch: {
@@ -410,10 +413,12 @@ var script = {
410
413
  mounted: function mounted() {
411
414
  this.id = this.id || UniqueComponentId();
412
415
  this.autoUpdateModel();
416
+ this.bindMatchMediaListener();
413
417
  },
414
418
  beforeUnmount: function beforeUnmount() {
415
419
  this.unbindOutsideClickListener();
416
420
  this.unbindResizeListener();
421
+ this.unbindMatchMediaListener();
417
422
  if (this.scrollHandler) {
418
423
  this.scrollHandler.destroy();
419
424
  this.scrollHandler = null;
@@ -422,6 +427,9 @@ var script = {
422
427
  ZIndex.clear(this.overlay);
423
428
  this.overlay = null;
424
429
  }
430
+ if (this.mobileActive) {
431
+ this.mobileActive = false;
432
+ }
425
433
  },
426
434
  methods: {
427
435
  getOptionLabel: function getOptionLabel(option) {
@@ -561,12 +569,14 @@ var script = {
561
569
  this.clicked = false;
562
570
  },
563
571
  onOptionChange: function onOptionChange(event) {
572
+ var isSelectable = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
564
573
  var originalEvent = event.originalEvent,
565
574
  processedOption = event.processedOption,
566
575
  isFocus = event.isFocus,
567
576
  isHide = event.isHide;
568
577
  if (isEmpty(processedOption)) return;
569
578
  var index = processedOption.index,
579
+ key = processedOption.key,
570
580
  level = processedOption.level,
571
581
  parentKey = processedOption.parentKey,
572
582
  children = processedOption.children;
@@ -574,14 +584,10 @@ var script = {
574
584
  var root = isEmpty(processedOption.parent);
575
585
  var selected = this.isSelected(processedOption);
576
586
  if (selected) {
577
- var _index = processedOption.index,
578
- key = processedOption.key,
579
- _level = processedOption.level,
580
- _parentKey = processedOption.parentKey;
581
587
  this.focusedOptionInfo = {
582
- index: _index,
583
- level: _level,
584
- parentKey: _parentKey
588
+ index: index,
589
+ level: level,
590
+ parentKey: parentKey
585
591
  };
586
592
  this.activeOptionPath = this.activeOptionPath.filter(function (p) {
587
593
  return key !== p.key && key.startsWith(p.key);
@@ -589,7 +595,7 @@ var script = {
589
595
  this.dirty = !root;
590
596
  } else {
591
597
  var activeOptionPath = this.activeOptionPath.filter(function (p) {
592
- return p.parentKey !== parentKey;
598
+ return p.parentKey !== parentKey && p.parentKey !== key;
593
599
  });
594
600
  activeOptionPath.push(processedOption);
595
601
  this.focusedOptionInfo = {
@@ -599,10 +605,15 @@ var script = {
599
605
  };
600
606
  this.activeOptionPath = activeOptionPath;
601
607
  }
602
- grouped ? this.onOptionGroupSelect(originalEvent, processedOption) : this.onOptionSelect(originalEvent, processedOption, isHide);
608
+ if (grouped) {
609
+ this.dirty = true;
610
+ this.onOptionGroupSelect(originalEvent, processedOption);
611
+ } else {
612
+ isSelectable && this.onOptionSelect(originalEvent, processedOption, isHide);
613
+ }
603
614
  isFocus && focus(this.$refs.focusInput);
604
615
  },
605
- onOptionFocusChange: function onOptionFocusChange(event) {
616
+ onOptionFocusMoveChange: function onOptionFocusMoveChange(event) {
606
617
  if (this.focusOnHover) {
607
618
  var originalEvent = event.originalEvent,
608
619
  processedOption = event.processedOption;
@@ -617,6 +628,11 @@ var script = {
617
628
  this.changeFocusedOptionIndex(originalEvent, index);
618
629
  }
619
630
  },
631
+ onOptionFocusChangeEnter: function onOptionFocusChangeEnter(event) {
632
+ if (this.dirty) {
633
+ this.onOptionChange(event, false);
634
+ }
635
+ },
620
636
  onOptionSelect: function onOptionSelect(event, processedOption) {
621
637
  var isHide = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
622
638
  var value = this.getOptionValue(processedOption === null || processedOption === void 0 ? void 0 : processedOption.option);
@@ -865,6 +881,25 @@ var script = {
865
881
  this.resizeListener = null;
866
882
  }
867
883
  },
884
+ bindMatchMediaListener: function bindMatchMediaListener() {
885
+ var _this6 = this;
886
+ if (!this.matchMediaListener) {
887
+ var query = matchMedia("(max-width: ".concat(this.breakpoint, ")"));
888
+ this.query = query;
889
+ this.queryMatches = query.matches;
890
+ this.matchMediaListener = function () {
891
+ _this6.queryMatches = query.matches;
892
+ _this6.mobileActive = false;
893
+ };
894
+ this.query.addEventListener('change', this.matchMediaListener);
895
+ }
896
+ },
897
+ unbindMatchMediaListener: function unbindMatchMediaListener() {
898
+ if (this.matchMediaListener) {
899
+ this.query.removeEventListener('change', this.matchMediaListener);
900
+ this.matchMediaListener = null;
901
+ }
902
+ },
868
903
  isOptionMatched: function isOptionMatched(processedOption) {
869
904
  var _this$getProccessedOp;
870
905
  return this.isValidOption(processedOption) && ((_this$getProccessedOp = this.getProccessedOptionLabel(processedOption)) === null || _this$getProccessedOp === void 0 ? void 0 : _this$getProccessedOp.toLocaleLowerCase(this.searchLocale).startsWith(this.searchValue.toLocaleLowerCase(this.searchLocale)));
@@ -881,35 +916,35 @@ var script = {
881
916
  });
882
917
  },
883
918
  findFirstOptionIndex: function findFirstOptionIndex() {
884
- var _this6 = this;
919
+ var _this7 = this;
885
920
  return this.visibleOptions.findIndex(function (processedOption) {
886
- return _this6.isValidOption(processedOption);
921
+ return _this7.isValidOption(processedOption);
887
922
  });
888
923
  },
889
924
  findLastOptionIndex: function findLastOptionIndex() {
890
- var _this7 = this;
925
+ var _this8 = this;
891
926
  return findLastIndex(this.visibleOptions, function (processedOption) {
892
- return _this7.isValidOption(processedOption);
927
+ return _this8.isValidOption(processedOption);
893
928
  });
894
929
  },
895
930
  findNextOptionIndex: function findNextOptionIndex(index) {
896
- var _this8 = this;
931
+ var _this9 = this;
897
932
  var matchedOptionIndex = index < this.visibleOptions.length - 1 ? this.visibleOptions.slice(index + 1).findIndex(function (processedOption) {
898
- return _this8.isValidOption(processedOption);
933
+ return _this9.isValidOption(processedOption);
899
934
  }) : -1;
900
935
  return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : index;
901
936
  },
902
937
  findPrevOptionIndex: function findPrevOptionIndex(index) {
903
- var _this9 = this;
938
+ var _this10 = this;
904
939
  var matchedOptionIndex = index > 0 ? findLastIndex(this.visibleOptions.slice(0, index), function (processedOption) {
905
- return _this9.isValidOption(processedOption);
940
+ return _this10.isValidOption(processedOption);
906
941
  }) : -1;
907
942
  return matchedOptionIndex > -1 ? matchedOptionIndex : index;
908
943
  },
909
944
  findSelectedOptionIndex: function findSelectedOptionIndex() {
910
- var _this10 = this;
945
+ var _this11 = this;
911
946
  return this.visibleOptions.findIndex(function (processedOption) {
912
- return _this10.isValidSelectedOption(processedOption);
947
+ return _this11.isValidSelectedOption(processedOption);
913
948
  });
914
949
  },
915
950
  findFirstFocusedOptionIndex: function findFirstFocusedOptionIndex() {
@@ -938,21 +973,21 @@ var script = {
938
973
  }
939
974
  },
940
975
  searchOptions: function searchOptions(event, _char) {
941
- var _this11 = this;
976
+ var _this12 = this;
942
977
  this.searchValue = (this.searchValue || '') + _char;
943
978
  var optionIndex = -1;
944
979
  var matched = false;
945
980
  if (isNotEmpty(this.searchValue)) {
946
981
  if (this.focusedOptionInfo.index !== -1) {
947
982
  optionIndex = this.visibleOptions.slice(this.focusedOptionInfo.index).findIndex(function (processedOption) {
948
- return _this11.isOptionMatched(processedOption);
983
+ return _this12.isOptionMatched(processedOption);
949
984
  });
950
985
  optionIndex = optionIndex === -1 ? this.visibleOptions.slice(0, this.focusedOptionInfo.index).findIndex(function (processedOption) {
951
- return _this11.isOptionMatched(processedOption);
986
+ return _this12.isOptionMatched(processedOption);
952
987
  }) : optionIndex + this.focusedOptionInfo.index;
953
988
  } else {
954
989
  optionIndex = this.visibleOptions.findIndex(function (processedOption) {
955
- return _this11.isOptionMatched(processedOption);
990
+ return _this12.isOptionMatched(processedOption);
956
991
  });
957
992
  }
958
993
  if (optionIndex !== -1) {
@@ -969,8 +1004,8 @@ var script = {
969
1004
  clearTimeout(this.searchTimeout);
970
1005
  }
971
1006
  this.searchTimeout = setTimeout(function () {
972
- _this11.searchValue = '';
973
- _this11.searchTimeout = null;
1007
+ _this12.searchValue = '';
1008
+ _this12.searchTimeout = null;
974
1009
  }, 500);
975
1010
  return matched;
976
1011
  },
@@ -988,11 +1023,11 @@ var script = {
988
1023
  }
989
1024
  },
990
1025
  scrollInView: function scrollInView() {
991
- var _this12 = this;
1026
+ var _this13 = this;
992
1027
  var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;
993
1028
  this.$nextTick(function () {
994
- var id = index !== -1 ? "".concat(_this12.id, "_").concat(index) : _this12.focusedOptionId;
995
- var element = findSingle(_this12.list, "li[id=\"".concat(id, "\"]"));
1029
+ var id = index !== -1 ? "".concat(_this13.id, "_").concat(index) : _this13.focusedOptionId;
1030
+ var element = findSingle(_this13.list, "li[id=\"".concat(id, "\"]"));
996
1031
  if (element) {
997
1032
  element.scrollIntoView && element.scrollIntoView({
998
1033
  block: 'nearest',
@@ -1023,7 +1058,7 @@ var script = {
1023
1058
  });
1024
1059
  },
1025
1060
  createProcessedOptions: function createProcessedOptions(options) {
1026
- var _this13 = this;
1061
+ var _this14 = this;
1027
1062
  var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
1028
1063
  var parent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
1029
1064
  var parentKey = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
@@ -1038,7 +1073,7 @@ var script = {
1038
1073
  parent: parent,
1039
1074
  parentKey: parentKey
1040
1075
  };
1041
- newOption['children'] = _this13.createProcessedOptions(_this13.getOptionGroupChildren(option, level), level + 1, newOption, key);
1076
+ newOption['children'] = _this14.createProcessedOptions(_this14.getOptionGroupChildren(option, level), level + 1, newOption, key);
1042
1077
  processedOptions.push(newOption);
1043
1078
  });
1044
1079
  return processedOptions;
@@ -1064,9 +1099,9 @@ var script = {
1064
1099
  return this.createProcessedOptions(this.options || []);
1065
1100
  },
1066
1101
  visibleOptions: function visibleOptions() {
1067
- var _this14 = this;
1102
+ var _this15 = this;
1068
1103
  var processedOption = this.activeOptionPath.find(function (p) {
1069
- return p.key === _this14.focusedOptionInfo.parentKey;
1104
+ return p.key === _this15.focusedOptionInfo.parentKey;
1070
1105
  });
1071
1106
  return processedOption ? processedOption.children : this.processedOptions;
1072
1107
  },
@@ -1169,8 +1204,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1169
1204
  })], 16), createElementVNode("div", mergeProps({
1170
1205
  "class": _ctx.cx('dropdown'),
1171
1206
  role: "button",
1172
- tabindex: "-1",
1173
- "aria-hidden": "true"
1207
+ tabindex: "-1"
1174
1208
  }, _ctx.ptm('dropdown')), [_ctx.loading ? renderSlot(_ctx.$slots, "loadingicon", {
1175
1209
  key: 0,
1176
1210
  "class": normalizeClass(_ctx.cx('loadingIcon'))
@@ -1222,7 +1256,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1222
1256
  onKeydown: _cache[4] || (_cache[4] = function () {
1223
1257
  return $options.onOverlayKeyDown && $options.onOverlayKeyDown.apply($options, arguments);
1224
1258
  })
1225
- }, _objectSpread(_objectSpread(_objectSpread({}, _ctx.panelProps), _ctx.overlayProps), _ctx.ptm('overlay'))), [createElementVNode("div", mergeProps({
1259
+ }, _objectSpread(_objectSpread(_objectSpread({}, _ctx.panelProps), _ctx.overlayProps), _ctx.ptm('overlay'))), [renderSlot(_ctx.$slots, "header", {
1260
+ value: _ctx.modelValue,
1261
+ options: _ctx.options
1262
+ }), createElementVNode("div", mergeProps({
1226
1263
  "class": _ctx.cx('listContainer')
1227
1264
  }, _ctx.ptm('listContainer')), [createVNode(_component_CascadeSelectSub, {
1228
1265
  id: $data.id + '_tree',
@@ -1241,21 +1278,25 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1241
1278
  optionGroupLabel: _ctx.optionGroupLabel,
1242
1279
  optionGroupChildren: _ctx.optionGroupChildren,
1243
1280
  onOptionChange: $options.onOptionChange,
1244
- onOptionFocusChange: $options.onOptionFocusChange,
1281
+ onOptionFocusMoveChange: $options.onOptionFocusMoveChange,
1282
+ onOptionFocusEnterChange: $options.onOptionFocusChangeEnter,
1245
1283
  pt: _ctx.pt,
1246
1284
  unstyled: _ctx.unstyled
1247
- }, null, 8, ["id", "selectId", "focusedOptionId", "options", "activeOptionPath", "templates", "optionLabel", "optionValue", "optionDisabled", "optionGroupIcon", "optionGroupLabel", "optionGroupChildren", "onOptionChange", "onOptionFocusChange", "pt", "unstyled"])], 16), createElementVNode("span", mergeProps({
1285
+ }, null, 8, ["id", "selectId", "focusedOptionId", "options", "activeOptionPath", "templates", "optionLabel", "optionValue", "optionDisabled", "optionGroupIcon", "optionGroupLabel", "optionGroupChildren", "onOptionChange", "onOptionFocusMoveChange", "onOptionFocusEnterChange", "pt", "unstyled"])], 16), createElementVNode("span", mergeProps({
1248
1286
  role: "status",
1249
1287
  "aria-live": "polite",
1250
1288
  "class": "p-hidden-accessible"
1251
1289
  }, _ctx.ptm('hiddenSelectedMessage'), {
1252
1290
  "data-p-hidden-accessible": true
1253
- }), toDisplayString($options.selectedMessageText), 17)], 16)) : createCommentVNode("", true)];
1291
+ }), toDisplayString($options.selectedMessageText), 17), renderSlot(_ctx.$slots, "footer", {
1292
+ value: _ctx.modelValue,
1293
+ options: _ctx.options
1294
+ })], 16)) : createCommentVNode("", true)];
1254
1295
  }),
1255
- _: 1
1296
+ _: 3
1256
1297
  }, 16, ["onEnter", "onAfterEnter", "onLeave", "onAfterLeave"])];
1257
1298
  }),
1258
- _: 1
1299
+ _: 3
1259
1300
  }, 8, ["appendTo"])], 16);
1260
1301
  }
1261
1302