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
@@ -30,7 +30,7 @@
30
30
  {{ label }}
31
31
  </slot>
32
32
  </span>
33
- <div :class="cx('dropdown')" role="button" tabindex="-1" aria-hidden="true" v-bind="ptm('dropdown')">
33
+ <div :class="cx('dropdown')" role="button" tabindex="-1" v-bind="ptm('dropdown')">
34
34
  <slot v-if="loading" name="loadingicon" :class="cx('loadingIcon')">
35
35
  <span v-if="loadingIcon" :class="[cx('loadingIcon'), 'pi-spin', loadingIcon]" aria-hidden="true" v-bind="ptm('loadingIcon')" />
36
36
  <SpinnerIcon v-else :class="cx('loadingIcon')" spin aria-hidden="true" v-bind="ptm('loadingIcon')" />
@@ -53,6 +53,7 @@
53
53
  @keydown="onOverlayKeyDown"
54
54
  v-bind="{ ...panelProps, ...overlayProps, ...ptm('overlay') }"
55
55
  >
56
+ <slot name="header" :value="modelValue" :options="options" />
56
57
  <div :class="cx('listContainer')" v-bind="ptm('listContainer')">
57
58
  <CascadeSelectSub
58
59
  :id="id + '_tree'"
@@ -71,7 +72,8 @@
71
72
  :optionGroupLabel="optionGroupLabel"
72
73
  :optionGroupChildren="optionGroupChildren"
73
74
  @option-change="onOptionChange"
74
- @option-focus-change="onOptionFocusChange"
75
+ @option-focus-move-change="onOptionFocusMoveChange"
76
+ @option-focus-enter-change="onOptionFocusChangeEnter"
75
77
  :pt="pt"
76
78
  :unstyled="unstyled"
77
79
  />
@@ -79,6 +81,7 @@
79
81
  <span role="status" aria-live="polite" class="p-hidden-accessible" v-bind="ptm('hiddenSelectedMessage')" :data-p-hidden-accessible="true">
80
82
  {{ selectedMessageText }}
81
83
  </span>
84
+ <slot name="footer" :value="modelValue" :options="options" />
82
85
  </div>
83
86
  </transition>
84
87
  </Portal>
@@ -107,6 +110,7 @@ export default {
107
110
  $pcFluid: { default: null }
108
111
  },
109
112
  outsideClickListener: null,
113
+ matchMediaListener: null,
110
114
  scrollHandler: null,
111
115
  resizeListener: null,
112
116
  overlay: null,
@@ -120,7 +124,10 @@ export default {
120
124
  focusedOptionInfo: { index: -1, level: 0, parentKey: '' },
121
125
  activeOptionPath: [],
122
126
  overlayVisible: false,
123
- dirty: false
127
+ dirty: false,
128
+ mobileActive: false,
129
+ query: null,
130
+ queryMatches: false
124
131
  };
125
132
  },
126
133
  watch: {
@@ -134,10 +141,12 @@ export default {
134
141
  mounted() {
135
142
  this.id = this.id || UniqueComponentId();
136
143
  this.autoUpdateModel();
144
+ this.bindMatchMediaListener();
137
145
  },
138
146
  beforeUnmount() {
139
147
  this.unbindOutsideClickListener();
140
148
  this.unbindResizeListener();
149
+ this.unbindMatchMediaListener();
141
150
 
142
151
  if (this.scrollHandler) {
143
152
  this.scrollHandler.destroy();
@@ -148,6 +157,10 @@ export default {
148
157
  ZIndex.clear(this.overlay);
149
158
  this.overlay = null;
150
159
  }
160
+
161
+ if (this.mobileActive) {
162
+ this.mobileActive = false;
163
+ }
151
164
  },
152
165
  methods: {
153
166
  getOptionLabel(option) {
@@ -291,25 +304,23 @@ export default {
291
304
 
292
305
  this.clicked = false;
293
306
  },
294
- onOptionChange(event) {
307
+ onOptionChange(event, isSelectable = true) {
295
308
  const { originalEvent, processedOption, isFocus, isHide } = event;
296
309
 
297
310
  if (isEmpty(processedOption)) return;
298
311
 
299
- const { index, level, parentKey, children } = processedOption;
312
+ const { index, key, level, parentKey, children } = processedOption;
300
313
  const grouped = isNotEmpty(children);
301
314
  const root = isEmpty(processedOption.parent);
302
315
  const selected = this.isSelected(processedOption);
303
316
 
304
317
  if (selected) {
305
- const { index, key, level, parentKey } = processedOption;
306
-
307
318
  this.focusedOptionInfo = { index, level, parentKey };
308
319
  this.activeOptionPath = this.activeOptionPath.filter((p) => key !== p.key && key.startsWith(p.key));
309
320
 
310
321
  this.dirty = !root;
311
322
  } else {
312
- const activeOptionPath = this.activeOptionPath.filter((p) => p.parentKey !== parentKey);
323
+ const activeOptionPath = this.activeOptionPath.filter((p) => p.parentKey !== parentKey && p.parentKey !== key);
313
324
 
314
325
  activeOptionPath.push(processedOption);
315
326
 
@@ -317,10 +328,16 @@ export default {
317
328
  this.activeOptionPath = activeOptionPath;
318
329
  }
319
330
 
320
- grouped ? this.onOptionGroupSelect(originalEvent, processedOption) : this.onOptionSelect(originalEvent, processedOption, isHide);
331
+ if (grouped) {
332
+ this.dirty = true;
333
+ this.onOptionGroupSelect(originalEvent, processedOption);
334
+ } else {
335
+ isSelectable && this.onOptionSelect(originalEvent, processedOption, isHide);
336
+ }
337
+
321
338
  isFocus && focus(this.$refs.focusInput);
322
339
  },
323
- onOptionFocusChange(event) {
340
+ onOptionFocusMoveChange(event) {
324
341
  if (this.focusOnHover) {
325
342
  const { originalEvent, processedOption } = event;
326
343
  const { index, level, parentKey } = processedOption;
@@ -329,6 +346,11 @@ export default {
329
346
  this.changeFocusedOptionIndex(originalEvent, index);
330
347
  }
331
348
  },
349
+ onOptionFocusChangeEnter(event) {
350
+ if (this.dirty) {
351
+ this.onOptionChange(event, false);
352
+ }
353
+ },
332
354
  onOptionSelect(event, processedOption, isHide = true) {
333
355
  const value = this.getOptionValue(processedOption?.option);
334
356
 
@@ -569,6 +591,27 @@ export default {
569
591
  this.resizeListener = null;
570
592
  }
571
593
  },
594
+ bindMatchMediaListener() {
595
+ if (!this.matchMediaListener) {
596
+ const query = matchMedia(`(max-width: ${this.breakpoint})`);
597
+
598
+ this.query = query;
599
+ this.queryMatches = query.matches;
600
+
601
+ this.matchMediaListener = () => {
602
+ this.queryMatches = query.matches;
603
+ this.mobileActive = false;
604
+ };
605
+
606
+ this.query.addEventListener('change', this.matchMediaListener);
607
+ }
608
+ },
609
+ unbindMatchMediaListener() {
610
+ if (this.matchMediaListener) {
611
+ this.query.removeEventListener('change', this.matchMediaListener);
612
+ this.matchMediaListener = null;
613
+ }
614
+ },
572
615
  isOptionMatched(processedOption) {
573
616
  return this.isValidOption(processedOption) && this.getProccessedOptionLabel(processedOption)?.toLocaleLowerCase(this.searchLocale).startsWith(this.searchValue.toLocaleLowerCase(this.searchLocale));
574
617
  },
@@ -17,13 +17,22 @@
17
17
  :data-p-focus="isOptionFocused(processedOption)"
18
18
  :data-p-disabled="isOptionDisabled(processedOption)"
19
19
  >
20
- <div v-ripple :class="cx('optionContent')" @click="onOptionClick($event, processedOption)" @mousemove="onOptionMouseMove($event, processedOption)" v-bind="getPTOptions(processedOption, index, 'optionContent')">
20
+ <div
21
+ v-ripple
22
+ :class="cx('optionContent')"
23
+ @click="onOptionClick($event, processedOption)"
24
+ @mouseenter="onOptionMouseEnter($event, processedOption)"
25
+ @mousemove="onOptionMouseMove($event, processedOption)"
26
+ v-bind="getPTOptions(processedOption, index, 'optionContent')"
27
+ >
21
28
  <component v-if="templates['option']" :is="templates['option']" :option="processedOption.option" :selected="isOptionGroup(processedOption) ? false : isOptionSelected(processedOption)" />
22
29
  <span v-else :class="cx('optionText')" v-bind="getPTOptions(processedOption, index, 'optionText')">{{ getOptionLabelToRender(processedOption) }}</span>
23
30
  <template v-if="isOptionGroup(processedOption)">
24
- <component v-if="templates['optiongroupicon']" :is="templates['optiongroupicon']" aria-hidden="true" />
25
- <span v-else-if="optionGroupIcon" :class="[cx('groupIcon'), optionGroupIcon]" aria-hidden="true" v-bind="getPTOptions(processedOption, index, 'groupIcon')" />
26
- <AngleRightIcon v-else :class="cx('groupIcon')" aria-hidden="true" v-bind="getPTOptions(processedOption, index, 'groupIcon')" />
31
+ <span :class="cx('groupIconContainer')">
32
+ <component v-if="templates['optiongroupicon']" :is="templates['optiongroupicon']" :class="cx('groupIcon')" />
33
+ <span v-else-if="optionGroupIcon" :class="[cx('groupIcon'), optionGroupIcon]" aria-hidden="true" v-bind="getPTOptions(processedOption, index, 'groupIcon')" />
34
+ <AngleRightIcon v-else :class="cx('groupIcon')" aria-hidden="true" v-bind="getPTOptions(processedOption, index, 'groupIcon')" />
35
+ </span>
27
36
  </template>
28
37
  </div>
29
38
  <CascadeSelectSub
@@ -44,9 +53,9 @@
44
53
  :optionGroupChildren="optionGroupChildren"
45
54
  @option-change="onOptionChange"
46
55
  @option-focus-change="onOptionFocusChange"
56
+ @option-focus-enter-change="onOptionFocusEnterChange"
47
57
  :pt="pt"
48
58
  :unstyled="unstyled"
49
- :isParentMount="mounted"
50
59
  />
51
60
  </li>
52
61
  </template>
@@ -54,9 +63,8 @@
54
63
  </template>
55
64
 
56
65
  <script>
66
+ import { isNotEmpty, resolveFieldData } from '@primeuix/utils/object';
57
67
  import BaseComponent from '@primevue/core/basecomponent';
58
- import { nestedPosition } from '@primeuix/utils/dom';
59
- import { resolveFieldData, isNotEmpty } from '@primeuix/utils/object';
60
68
  import AngleRightIcon from '@primevue/icons/angleright';
61
69
  import Ripple from 'primevue/ripple';
62
70
 
@@ -64,7 +72,7 @@ export default {
64
72
  name: 'CascadeSelectSub',
65
73
  hostName: 'CascadeSelect',
66
74
  extends: BaseComponent,
67
- emits: ['option-change', 'option-focus-change'],
75
+ emits: ['option-change', 'option-focus-change', 'option-focus-enter-change'],
68
76
  container: null,
69
77
  props: {
70
78
  selectId: String,
@@ -81,26 +89,9 @@ export default {
81
89
  },
82
90
  activeOptionPath: Array,
83
91
  level: Number,
84
- templates: null,
85
- isParentMount: Boolean
86
- },
87
- data() {
88
- return {
89
- mounted: false
90
- };
91
- },
92
- watch: {
93
- isParentMount: {
94
- handler(newValue) {
95
- newValue && nestedPosition(this.container, this.level);
96
- }
97
- }
98
- },
99
- mounted() {
100
- // entering order correction when an option is selected
101
- (this.isParentMount || this.level === 0) && nestedPosition(this.container, this.level);
102
- this.mounted = true;
92
+ templates: null
103
93
  },
94
+
104
95
  methods: {
105
96
  getOptionId(processedOption) {
106
97
  return `${this.selectId}_${processedOption.key}`;
@@ -151,6 +142,9 @@ export default {
151
142
  onOptionClick(event, processedOption) {
152
143
  this.$emit('option-change', { originalEvent: event, processedOption, isFocus: true });
153
144
  },
145
+ onOptionMouseEnter(event, processedOption) {
146
+ this.$emit('option-focus-enter-change', { originalEvent: event, processedOption });
147
+ },
154
148
  onOptionMouseMove(event, processedOption) {
155
149
  this.$emit('option-focus-change', { originalEvent: event, processedOption });
156
150
  },
@@ -160,6 +154,9 @@ export default {
160
154
  onOptionFocusChange(event) {
161
155
  this.$emit('option-focus-change', event);
162
156
  },
157
+ onOptionFocusEnterChange(event) {
158
+ this.$emit('option-focus-enter-change', event);
159
+ },
163
160
  containerRef(el) {
164
161
  this.container = el;
165
162
  },
@@ -128,6 +128,10 @@ export interface CascadeSelectPassThroughOptions {
128
128
  * Used to pass attributes to the option list's DOM element.
129
129
  */
130
130
  optionList?: CascadeSelectPassThroughOptionType;
131
+ /**
132
+ * Used to pass attributes to the group icon container's DOM element.
133
+ */
134
+ groupIconContainer?: CascadeSelectPassThroughOptionType;
131
135
  /**
132
136
  * Used to pass attributes to the group icon's DOM element.
133
137
  */
@@ -287,6 +291,11 @@ export interface CascadeSelectProps {
287
291
  * Default text to display when no option is selected.
288
292
  */
289
293
  placeholder?: string | undefined;
294
+ /**
295
+ * The breakpoint to define the maximum width boundary.
296
+ * @defaultValue 960px
297
+ */
298
+ breakpoint?: string | undefined;
290
299
  /**
291
300
  * When present, it specifies that the component should have invalid state style.
292
301
  * @defaultValue false
@@ -496,7 +505,38 @@ export interface CascadeSelectSlots {
496
505
  /**
497
506
  * Custom option group icon template.
498
507
  */
499
- optiongroupicon(): VNode[];
508
+ optiongroupicon(scope: {
509
+ /**
510
+ * Style class of the icon.
511
+ */
512
+ class: string;
513
+ }): VNode[];
514
+ /**
515
+ * Custom header template.
516
+ */
517
+ header(scope: {
518
+ /**
519
+ * Current value
520
+ */
521
+ value: any;
522
+ /**
523
+ * Options of the component
524
+ */
525
+ options: any[];
526
+ }): VNode[];
527
+ /**
528
+ * Custom footer template.
529
+ */
530
+ footer(scope: {
531
+ /**
532
+ * Current value
533
+ */
534
+ value: any;
535
+ /**
536
+ * Options of the component
537
+ */
538
+ options: any[];
539
+ }): VNode[];
500
540
  }
501
541
 
502
542
  /**