primevue 3.30.0 → 3.30.2

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 (303) hide show
  1. package/README.md +4 -2
  2. package/accordion/Accordion.d.ts +6 -1
  3. package/accordion/Accordion.vue +2 -1
  4. package/accordion/accordion.cjs.js +5 -9
  5. package/accordion/accordion.cjs.min.js +1 -1
  6. package/accordion/accordion.esm.js +5 -9
  7. package/accordion/accordion.esm.min.js +1 -1
  8. package/accordion/accordion.js +6 -10
  9. package/accordion/accordion.min.js +1 -1
  10. package/accordiontab/AccordionTab.d.ts +1 -1
  11. package/autocomplete/AutoComplete.d.ts +1 -1
  12. package/avatar/Avatar.d.ts +1 -1
  13. package/badge/Badge.d.ts +1 -1
  14. package/basecomponent/BaseComponent.vue +12 -16
  15. package/basecomponent/basecomponent.cjs.js +18 -6
  16. package/basecomponent/basecomponent.cjs.min.js +1 -1
  17. package/basecomponent/basecomponent.esm.js +18 -6
  18. package/basecomponent/basecomponent.esm.min.js +1 -1
  19. package/basecomponent/basecomponent.js +18 -6
  20. package/basecomponent/basecomponent.min.js +1 -1
  21. package/basedirective/basedirective.cjs.js +8 -2
  22. package/basedirective/basedirective.cjs.min.js +1 -1
  23. package/basedirective/basedirective.esm.js +8 -2
  24. package/basedirective/basedirective.esm.min.js +1 -1
  25. package/basedirective/basedirective.js +8 -2
  26. package/basedirective/basedirective.min.js +1 -1
  27. package/blockui/BlockUI.d.ts +1 -1
  28. package/breadcrumb/Breadcrumb.d.ts +1 -1
  29. package/button/Button.d.ts +1 -1
  30. package/calendar/Calendar.d.ts +1 -1
  31. package/carousel/Carousel.d.ts +1 -1
  32. package/cascadeselect/CascadeSelect.d.ts +1 -1
  33. package/chart/Chart.d.ts +1 -1
  34. package/checkbox/Checkbox.d.ts +1 -1
  35. package/chip/Chip.d.ts +1 -1
  36. package/chips/Chips.d.ts +1 -1
  37. package/colorpicker/ColorPicker.d.ts +1 -1
  38. package/column/Column.d.ts +49 -1
  39. package/columngroup/ColumnGroup.d.ts +6 -1
  40. package/config/PrimeVue.d.ts +13 -6
  41. package/confirmdialog/ConfirmDialog.d.ts +1 -1
  42. package/confirmpopup/ConfirmPopup.d.ts +1 -1
  43. package/contextmenu/ContextMenu.d.ts +1 -1
  44. package/core/core.js +144 -103
  45. package/core/core.min.js +10 -10
  46. package/datatable/BaseDataTable.vue +7 -1
  47. package/datatable/BodyCell.vue +7 -4
  48. package/datatable/ColumnFilter.vue +43 -8
  49. package/datatable/DataTable.d.ts +31 -1
  50. package/datatable/FooterCell.vue +5 -2
  51. package/datatable/HeaderCell.vue +8 -3
  52. package/datatable/HeaderCheckbox.vue +5 -2
  53. package/datatable/RowCheckbox.vue +5 -2
  54. package/datatable/RowRadioButton.vue +5 -2
  55. package/datatable/TableBody.vue +33 -13
  56. package/datatable/TableFooter.vue +13 -4
  57. package/datatable/TableHeader.vue +16 -5
  58. package/datatable/datatable.cjs.js +221 -145
  59. package/datatable/datatable.cjs.min.js +1 -1
  60. package/datatable/datatable.esm.js +221 -145
  61. package/datatable/datatable.esm.min.js +1 -1
  62. package/datatable/datatable.js +222 -146
  63. package/datatable/datatable.min.js +1 -1
  64. package/dataview/BaseDataView.vue +1 -2
  65. package/dataview/DataView.d.ts +1 -1
  66. package/dataview/DataView.vue +3 -3
  67. package/dataview/dataview.cjs.js +5 -13
  68. package/dataview/dataview.cjs.min.js +1 -1
  69. package/dataview/dataview.esm.js +5 -13
  70. package/dataview/dataview.esm.min.js +1 -1
  71. package/dataview/dataview.js +5 -13
  72. package/dataview/dataview.min.js +1 -1
  73. package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +6 -1
  74. package/deferredcontent/DeferredContent.d.ts +1 -1
  75. package/dialog/Dialog.d.ts +1 -1
  76. package/dialog/Dialog.vue +13 -1
  77. package/dialog/dialog.cjs.js +6 -2
  78. package/dialog/dialog.cjs.min.js +1 -1
  79. package/dialog/dialog.esm.js +6 -2
  80. package/dialog/dialog.esm.min.js +1 -1
  81. package/dialog/dialog.js +6 -2
  82. package/dialog/dialog.min.js +1 -1
  83. package/divider/Divider.d.ts +1 -1
  84. package/dock/Dock.d.ts +5 -1
  85. package/dock/DockSub.vue +9 -8
  86. package/dock/dock.cjs.js +9 -8
  87. package/dock/dock.cjs.min.js +1 -1
  88. package/dock/dock.esm.js +9 -8
  89. package/dock/dock.esm.min.js +1 -1
  90. package/dock/dock.js +9 -8
  91. package/dock/dock.min.js +1 -1
  92. package/dropdown/Dropdown.d.ts +1 -1
  93. package/editor/Editor.d.ts +1 -1
  94. package/fieldset/Fieldset.d.ts +1 -1
  95. package/fileupload/FileUpload.d.ts +1 -1
  96. package/galleria/Galleria.d.ts +5 -1
  97. package/galleria/GalleriaContent.vue +16 -6
  98. package/galleria/GalleriaItem.vue +2 -1
  99. package/galleria/GalleriaThumbnails.vue +1 -0
  100. package/galleria/galleria.cjs.js +34 -17
  101. package/galleria/galleria.cjs.min.js +1 -1
  102. package/galleria/galleria.esm.js +35 -18
  103. package/galleria/galleria.esm.min.js +1 -1
  104. package/galleria/galleria.js +34 -17
  105. package/galleria/galleria.min.js +1 -1
  106. package/image/Image.d.ts +1 -1
  107. package/inlinemessage/InlineMessage.d.ts +1 -1
  108. package/inplace/Inplace.d.ts +1 -1
  109. package/inputnumber/InputNumber.d.ts +1 -1
  110. package/inputswitch/InputSwitch.d.ts +1 -1
  111. package/inputtext/InputText.d.ts +26 -1
  112. package/inputtext/InputText.vue +2 -1
  113. package/inputtext/inputtext.cjs.js +2 -1
  114. package/inputtext/inputtext.cjs.min.js +1 -1
  115. package/inputtext/inputtext.esm.js +2 -1
  116. package/inputtext/inputtext.esm.min.js +1 -1
  117. package/inputtext/inputtext.js +2 -1
  118. package/inputtext/inputtext.min.js +1 -1
  119. package/knob/Knob.d.ts +1 -1
  120. package/listbox/Listbox.d.ts +1 -1
  121. package/megamenu/MegaMenu.d.ts +1 -1
  122. package/menu/Menu.d.ts +1 -1
  123. package/menubar/Menubar.d.ts +1 -1
  124. package/message/BaseMessage.vue +2 -2
  125. package/message/Message.d.ts +11 -1
  126. package/message/Message.vue +3 -3
  127. package/message/message.cjs.js +8 -8
  128. package/message/message.cjs.min.js +1 -1
  129. package/message/message.esm.js +8 -8
  130. package/message/message.esm.min.js +1 -1
  131. package/message/message.js +8 -8
  132. package/message/message.min.js +1 -1
  133. package/multiselect/MultiSelect.d.ts +1 -1
  134. package/multiselect/MultiSelect.vue +3 -2
  135. package/multiselect/multiselect.cjs.js +5 -5
  136. package/multiselect/multiselect.cjs.min.js +1 -1
  137. package/multiselect/multiselect.esm.js +6 -6
  138. package/multiselect/multiselect.esm.min.js +1 -1
  139. package/multiselect/multiselect.js +5 -5
  140. package/multiselect/multiselect.min.js +1 -1
  141. package/orderlist/OrderList.d.ts +18 -1
  142. package/orderlist/OrderList.vue +7 -7
  143. package/orderlist/orderlist.cjs.js +19 -15
  144. package/orderlist/orderlist.cjs.min.js +1 -1
  145. package/orderlist/orderlist.esm.js +19 -15
  146. package/orderlist/orderlist.esm.min.js +1 -1
  147. package/orderlist/orderlist.js +19 -15
  148. package/orderlist/orderlist.min.js +1 -1
  149. package/organizationchart/OrganizationChart.d.ts +1 -1
  150. package/overlaypanel/OverlayPanel.d.ts +1 -1
  151. package/overlaypanel/OverlayPanel.vue +4 -2
  152. package/overlaypanel/overlaypanel.cjs.js +4 -2
  153. package/overlaypanel/overlaypanel.cjs.min.js +1 -1
  154. package/overlaypanel/overlaypanel.esm.js +4 -2
  155. package/overlaypanel/overlaypanel.esm.min.js +1 -1
  156. package/overlaypanel/overlaypanel.js +4 -2
  157. package/overlaypanel/overlaypanel.min.js +1 -1
  158. package/package.json +1 -1
  159. package/paginator/JumpToPageDropdown.vue +1 -1
  160. package/paginator/Paginator.d.ts +1 -26
  161. package/paginator/paginator.cjs.js +1 -1
  162. package/paginator/paginator.cjs.min.js +1 -1
  163. package/paginator/paginator.esm.js +1 -1
  164. package/paginator/paginator.esm.min.js +1 -1
  165. package/paginator/paginator.js +1 -1
  166. package/paginator/paginator.min.js +1 -1
  167. package/panel/Panel.d.ts +2 -2
  168. package/panelmenu/PanelMenu.d.ts +1 -1
  169. package/password/Password.d.ts +1 -1
  170. package/picklist/BasePickList.vue +4 -4
  171. package/picklist/PickList.d.ts +22 -1
  172. package/picklist/PickList.vue +19 -19
  173. package/picklist/picklist.cjs.js +59 -47
  174. package/picklist/picklist.cjs.min.js +1 -1
  175. package/picklist/picklist.esm.js +59 -47
  176. package/picklist/picklist.esm.min.js +1 -1
  177. package/picklist/picklist.js +59 -47
  178. package/picklist/picklist.min.js +1 -1
  179. package/progressbar/ProgressBar.d.ts +1 -1
  180. package/progressspinner/ProgressSpinner.d.ts +1 -1
  181. package/radiobutton/RadioButton.d.ts +1 -1
  182. package/rating/Rating.d.ts +1 -1
  183. package/row/Row.d.ts +1 -1
  184. package/scrollpanel/ScrollPanel.d.ts +1 -1
  185. package/scrollpanel/ScrollPanel.vue +2 -0
  186. package/scrollpanel/scrollpanel.cjs.js +6 -2
  187. package/scrollpanel/scrollpanel.cjs.min.js +1 -1
  188. package/scrollpanel/scrollpanel.esm.js +6 -2
  189. package/scrollpanel/scrollpanel.esm.min.js +1 -1
  190. package/scrollpanel/scrollpanel.js +6 -2
  191. package/scrollpanel/scrollpanel.min.js +1 -1
  192. package/scrolltop/ScrollTop.d.ts +1 -1
  193. package/selectbutton/SelectButton.d.ts +1 -1
  194. package/sidebar/Sidebar.d.ts +1 -1
  195. package/sidebar/Sidebar.vue +1 -1
  196. package/sidebar/sidebar.cjs.js +3 -1
  197. package/sidebar/sidebar.cjs.min.js +1 -1
  198. package/sidebar/sidebar.esm.js +3 -1
  199. package/sidebar/sidebar.esm.min.js +1 -1
  200. package/sidebar/sidebar.js +3 -1
  201. package/sidebar/sidebar.min.js +1 -1
  202. package/skeleton/Skeleton.d.ts +1 -1
  203. package/slider/Slider.d.ts +1 -1
  204. package/speeddial/SpeedDial.d.ts +1 -1
  205. package/splitbutton/SplitButton.d.ts +1 -1
  206. package/splitbutton/SplitButton.vue +2 -1
  207. package/splitbutton/splitbutton.cjs.js +4 -2
  208. package/splitbutton/splitbutton.cjs.min.js +1 -1
  209. package/splitbutton/splitbutton.esm.js +4 -2
  210. package/splitbutton/splitbutton.esm.min.js +1 -1
  211. package/splitbutton/splitbutton.js +4 -2
  212. package/splitbutton/splitbutton.min.js +1 -1
  213. package/splitter/Splitter.d.ts +1 -1
  214. package/splitterpanel/SplitterPanel.d.ts +1 -1
  215. package/steps/Steps.d.ts +1 -1
  216. package/tabmenu/TabMenu.d.ts +1 -1
  217. package/tabmenu/TabMenu.vue +71 -72
  218. package/tabmenu/tabmenu.cjs.js +67 -75
  219. package/tabmenu/tabmenu.cjs.min.js +1 -1
  220. package/tabmenu/tabmenu.esm.js +67 -75
  221. package/tabmenu/tabmenu.esm.min.js +1 -1
  222. package/tabmenu/tabmenu.js +67 -75
  223. package/tabmenu/tabmenu.min.js +1 -1
  224. package/tabpanel/TabPanel.d.ts +17 -1
  225. package/tabview/TabView.d.ts +6 -1
  226. package/tabview/TabView.vue +12 -4
  227. package/tabview/tabview.cjs.js +23 -16
  228. package/tabview/tabview.cjs.min.js +1 -1
  229. package/tabview/tabview.esm.js +23 -16
  230. package/tabview/tabview.esm.min.js +1 -1
  231. package/tabview/tabview.js +24 -17
  232. package/tabview/tabview.min.js +1 -1
  233. package/tag/Tag.d.ts +1 -1
  234. package/terminal/Terminal.d.ts +1 -1
  235. package/textarea/Textarea.d.ts +18 -1
  236. package/textarea/Textarea.vue +8 -1
  237. package/textarea/textarea.cjs.js +8 -1
  238. package/textarea/textarea.cjs.min.js +1 -1
  239. package/textarea/textarea.esm.js +8 -1
  240. package/textarea/textarea.esm.min.js +1 -1
  241. package/textarea/textarea.js +8 -1
  242. package/textarea/textarea.min.js +1 -1
  243. package/tieredmenu/TieredMenu.d.ts +1 -1
  244. package/timeline/Timeline.d.ts +20 -1
  245. package/timeline/Timeline.vue +14 -6
  246. package/timeline/timeline.cjs.js +17 -7
  247. package/timeline/timeline.cjs.min.js +1 -1
  248. package/timeline/timeline.esm.js +17 -7
  249. package/timeline/timeline.esm.min.js +1 -1
  250. package/timeline/timeline.js +17 -7
  251. package/timeline/timeline.min.js +1 -1
  252. package/toast/BaseToast.vue +2 -2
  253. package/toast/Toast.d.ts +11 -1
  254. package/toast/ToastMessage.vue +3 -2
  255. package/toast/toast.cjs.js +7 -6
  256. package/toast/toast.cjs.min.js +1 -1
  257. package/toast/toast.esm.js +7 -6
  258. package/toast/toast.esm.min.js +1 -1
  259. package/toast/toast.js +7 -6
  260. package/toast/toast.min.js +1 -1
  261. package/togglebutton/ToggleButton.d.ts +1 -1
  262. package/toolbar/Toolbar.d.ts +1 -1
  263. package/tree/Tree.d.ts +10 -1
  264. package/tree/TreeNode.vue +3 -1
  265. package/tree/tree.cjs.js +3 -1
  266. package/tree/tree.cjs.min.js +1 -1
  267. package/tree/tree.esm.js +3 -1
  268. package/tree/tree.esm.min.js +1 -1
  269. package/tree/tree.js +3 -1
  270. package/tree/tree.min.js +1 -1
  271. package/treeselect/TreeSelect.d.ts +1 -1
  272. package/treetable/BaseTreeTable.vue +9 -3
  273. package/treetable/BodyCell.vue +16 -5
  274. package/treetable/FooterCell.vue +5 -2
  275. package/treetable/HeaderCell.vue +11 -3
  276. package/treetable/TreeTable.d.ts +31 -9
  277. package/treetable/TreeTable.vue +13 -5
  278. package/treetable/TreeTableRow.vue +11 -2
  279. package/treetable/treetable.cjs.js +84 -55
  280. package/treetable/treetable.cjs.min.js +1 -1
  281. package/treetable/treetable.esm.js +85 -56
  282. package/treetable/treetable.esm.min.js +1 -1
  283. package/treetable/treetable.js +84 -55
  284. package/treetable/treetable.min.js +1 -1
  285. package/tristatecheckbox/TriStateCheckbox.d.ts +1 -1
  286. package/usestyle/UseStyle.d.ts +1 -0
  287. package/usestyle/usestyle.cjs.js +12 -10
  288. package/usestyle/usestyle.cjs.min.js +1 -1
  289. package/usestyle/usestyle.esm.js +12 -10
  290. package/usestyle/usestyle.esm.min.js +1 -1
  291. package/usestyle/usestyle.js +12 -10
  292. package/usestyle/usestyle.min.js +1 -1
  293. package/utils/Utils.d.ts +4 -3
  294. package/utils/utils.cjs.js +19 -5
  295. package/utils/utils.cjs.min.js +1 -1
  296. package/utils/utils.esm.js +19 -5
  297. package/utils/utils.esm.min.js +1 -1
  298. package/utils/utils.js +19 -5
  299. package/utils/utils.min.js +1 -1
  300. package/vetur-attributes.json +8 -0
  301. package/vetur-tags.json +2 -0
  302. package/virtualscroller/VirtualScroller.d.ts +1 -1
  303. package/web-types.json +21 -1
@@ -174,11 +174,11 @@ var script = {
174
174
  getItemKey: function getItemKey(item, index) {
175
175
  return this.dataKey ? utils.ObjectUtils.resolveFieldData(item, this.dataKey) : index;
176
176
  },
177
- getPTOptions: function getPTOptions(item, key) {
177
+ getPTOptions: function getPTOptions(item, key, index) {
178
178
  return this.ptm(key, {
179
179
  context: {
180
180
  active: this.isSelected(item),
181
- focused: this.id === this.focusedOptionId
181
+ focused: "".concat(this.id, "_").concat(index) === this.focusedOptionId
182
182
  }
183
183
  });
184
184
  },
@@ -559,8 +559,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
559
559
  type: "button",
560
560
  onClick: $options.moveUp,
561
561
  "aria-label": $options.moveUpAriaLabel,
562
- disabled: $options.moveDisabled()
563
- }, _objectSpread(_objectSpread({}, _ctx.moveUpButtonProps), _ctx.ptm('moveUpButton')), {
562
+ disabled: $options.moveDisabled(),
563
+ pt: _ctx.ptm('moveUpButton')
564
+ }, _ctx.moveUpButtonProps, {
564
565
  unstyled: _ctx.unstyled
565
566
  }), {
566
567
  icon: vue.withCtx(function () {
@@ -569,12 +570,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
569
570
  })];
570
571
  }),
571
572
  _: 3
572
- }, 16, ["onClick", "aria-label", "disabled", "unstyled"]), vue.createVNode(_component_OLButton, vue.mergeProps({
573
+ }, 16, ["onClick", "aria-label", "disabled", "pt", "unstyled"]), vue.createVNode(_component_OLButton, vue.mergeProps({
573
574
  type: "button",
574
575
  onClick: $options.moveTop,
575
576
  "aria-label": $options.moveTopAriaLabel,
576
- disabled: $options.moveDisabled()
577
- }, _objectSpread(_objectSpread({}, _ctx.moveTopButtonProps), _ctx.ptm('moveTopButton')), {
577
+ disabled: $options.moveDisabled(),
578
+ pt: _ctx.ptm('moveTopButton')
579
+ }, _ctx.ptm('moveTopButton'), {
578
580
  unstyled: _ctx.unstyled
579
581
  }), {
580
582
  icon: vue.withCtx(function () {
@@ -583,12 +585,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
583
585
  })];
584
586
  }),
585
587
  _: 3
586
- }, 16, ["onClick", "aria-label", "disabled", "unstyled"]), vue.createVNode(_component_OLButton, vue.mergeProps({
588
+ }, 16, ["onClick", "aria-label", "disabled", "pt", "unstyled"]), vue.createVNode(_component_OLButton, vue.mergeProps({
587
589
  type: "button",
588
590
  onClick: $options.moveDown,
589
591
  "aria-label": $options.moveDownAriaLabel,
590
- disabled: $options.moveDisabled()
591
- }, _objectSpread(_objectSpread({}, _ctx.moveDownButtonProps), _ctx.ptm('moveDownButton')), {
592
+ disabled: $options.moveDisabled(),
593
+ pt: _ctx.ptm('moveDownButton')
594
+ }, _ctx.moveDownButtonProps, {
592
595
  unstyled: _ctx.unstyled
593
596
  }), {
594
597
  icon: vue.withCtx(function () {
@@ -597,12 +600,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
597
600
  })];
598
601
  }),
599
602
  _: 3
600
- }, 16, ["onClick", "aria-label", "disabled", "unstyled"]), vue.createVNode(_component_OLButton, vue.mergeProps({
603
+ }, 16, ["onClick", "aria-label", "disabled", "pt", "unstyled"]), vue.createVNode(_component_OLButton, vue.mergeProps({
601
604
  type: "button",
602
605
  onClick: $options.moveBottom,
603
606
  "aria-label": $options.moveBottomAriaLabel,
604
- disabled: $options.moveDisabled()
605
- }, _objectSpread(_objectSpread({}, _ctx.moveBottomButtonProps), _ctx.ptm('moveBottomButton')), {
607
+ disabled: $options.moveDisabled(),
608
+ pt: _ctx.ptm('moveBottomButton')
609
+ }, _ctx.moveBottomButtonProps, {
606
610
  unstyled: _ctx.unstyled
607
611
  }), {
608
612
  icon: vue.withCtx(function () {
@@ -611,7 +615,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
611
615
  })];
612
616
  }),
613
617
  _: 3
614
- }, 16, ["onClick", "aria-label", "disabled", "unstyled"]), vue.renderSlot(_ctx.$slots, "controlsend")], 16), vue.createElementVNode("div", vue.mergeProps({
618
+ }, 16, ["onClick", "aria-label", "disabled", "pt", "unstyled"]), vue.renderSlot(_ctx.$slots, "controlsend")], 16), vue.createElementVNode("div", vue.mergeProps({
615
619
  "class": _ctx.cx('container')
616
620
  }, _ctx.ptm('container')), [_ctx.$slots.header ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
617
621
  key: 0,
@@ -653,7 +657,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
653
657
  onMousedown: function onMousedown($event) {
654
658
  return $options.onOptionMouseDown(i);
655
659
  }
656
- }, $options.getPTOptions(item, 'item'), {
660
+ }, $options.getPTOptions(item, 'item', i), {
657
661
  "data-p-highlight": $options.isSelected(item),
658
662
  "data-p-focused": "".concat($data.id, "_").concat(i) === $options.focusedOptionId
659
663
  }), [vue.renderSlot(_ctx.$slots, "item", {
@@ -1 +1 @@
1
- "use strict";var e=require("primevue/button"),t=require("primevue/icons/angledoubledown"),n=require("primevue/icons/angledoubleup"),i=require("primevue/icons/angledown"),o=require("primevue/icons/angleup"),r=require("primevue/ripple"),l=require("primevue/utils"),s=require("primevue/basecomponent"),d=require("primevue/usestyle"),a=require("vue");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=c(e),p=c(t),m=c(n),h=c(i),f=c(o),v=c(r),b=c(s),y=d.useStyle("\n.p-orderlist {\n display: flex;\n}\n\n.p-orderlist-controls {\n display: flex;\n flex-direction: column;\n justify-content: center;\n}\n\n.p-orderlist-list-container {\n flex: 1 1 auto;\n}\n\n.p-orderlist-list {\n list-style-type: none;\n margin: 0;\n padding: 0;\n overflow: auto;\n min-height: 12rem;\n max-height: 24rem;\n}\n\n.p-orderlist-item {\n cursor: pointer;\n overflow: hidden;\n position: relative;\n}\n\n.p-orderlist.p-state-disabled .p-orderlist-item,\n.p-orderlist.p-state-disabled .p-button {\n cursor: default;\n}\n\n.p-orderlist.p-state-disabled .p-orderlist-list {\n overflow: hidden;\n}\n",{name:"orderlist",manual:!0});function g(e){return O(e)||D(e)||x(e)||I()}function I(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function x(e,t){if(e){if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(e,t):void 0}}function D(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function O(e){if(Array.isArray(e))return w(e)}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var S={name:"OrderList",extends:{name:"BaseOrderList",extends:b.default,props:{modelValue:{type:Array,default:null},selection:{type:Array,default:null},dataKey:{type:String,default:null},listStyle:{type:null,default:null},metaKeySelection:{type:Boolean,default:!0},responsive:{type:Boolean,default:!0},breakpoint:{type:String,default:"960px"},stripedRows:{type:Boolean,default:!1},tabindex:{type:Number,default:0},listProps:{type:null,default:null},moveUpButtonProps:{type:null,default:null},moveTopButtonProps:{type:null,default:null},moveDownButtonProps:{type:null,default:null},moveBottomButtonProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:{root:function(e){return["p-orderlist p-component",{"p-orderlist-striped":e.props.stripedRows}]},controls:"p-orderlist-controls",header:"p-orderlist-header",container:"p-orderlist-list-container",list:"p-orderlist-list",item:function(e){var t=e.instance,n=e.id;return["p-orderlist-item",{"p-highlight":t.isSelected(e.item),"p-focus":n===t.focusedOptionId}]}},loadStyle:y.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","reorder","update:selection","selection-change","focus","blur"],itemTouched:!1,reorderDirection:null,styleElement:null,list:null,data:function(){return{id:this.$attrs.id,d_selection:this.selection,focused:!1,focusedOptionIndex:-1}},watch:{"$attrs.id":function(e){this.id=e||l.UniqueComponentId()}},beforeUnmount:function(){this.destroyStyle()},updated:function(){this.reorderDirection&&(this.updateListScroll(),this.reorderDirection=null)},mounted:function(){this.id=this.id||l.UniqueComponentId(),this.responsive&&this.createStyle()},methods:{getItemKey:function(e,t){return this.dataKey?l.ObjectUtils.resolveFieldData(e,this.dataKey):t},getPTOptions:function(e,t){return this.ptm(t,{context:{active:this.isSelected(e),focused:this.id===this.focusedOptionId}})},isSelected:function(e){return-1!=l.ObjectUtils.findIndexInList(e,this.d_selection)},onListFocus:function(e){var t=l.DomHandler.findSingle(this.list,'[data-p-highlight="true"]'),n=l.ObjectUtils.findIndexInList(t,this.list.children);this.focused=!0,this.changeFocusedOptionIndex(-1!==this.focusedOptionIndex?this.focusedOptionIndex:t?n:-1),this.$emit("focus",e)},onListBlur:function(e){this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onListKeyDown:function(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Enter":this.onEnterKey(e);break;case"Space":this.onSpaceKey(e);break;case"KeyA":e.ctrlKey&&(this.d_selection=g(this.modelValue),this.$emit("update:selection",this.d_selection))}},onOptionMouseDown:function(e){this.focused=!0,this.focusedOptionIndex=e},onArrowDownKey:function(e){var t=this.findNextOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(t),e.shiftKey&&this.onEnterKey(e),e.preventDefault()},onArrowUpKey:function(e){var t=this.findPrevOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(t),e.shiftKey&&this.onEnterKey(e),e.preventDefault()},onHomeKey:function(e){if(e.ctrlKey&&e.shiftKey){var t=l.DomHandler.find(this.list,'[data-pc-section="item"]'),n=l.DomHandler.findSingle(this.list,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),i=g(t).findIndex((function(e){return e===n}));this.d_selection=g(this.modelValue).slice(0,i+1),this.$emit("update:selection",this.d_selection)}else this.changeFocusedOptionIndex(0);e.preventDefault()},onEndKey:function(e){if(e.ctrlKey&&e.shiftKey){var t=l.DomHandler.find(this.list,'[data-pc-section="item"]'),n=l.DomHandler.findSingle(this.list,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),i=g(t).findIndex((function(e){return e===n}));this.d_selection=g(this.modelValue).slice(i,t.length),this.$emit("update:selection",this.d_selection)}else this.changeFocusedOptionIndex(l.DomHandler.find(this.list,'[data-pc-section="item"]').length-1);e.preventDefault()},onEnterKey:function(e){var t=l.DomHandler.find(this.list,'[data-pc-section="item"]'),n=l.DomHandler.findSingle(this.list,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),i=g(t).findIndex((function(e){return e===n}));this.onItemClick(e,this.modelValue[i],i),e.preventDefault()},onSpaceKey:function(e){if(e.shiftKey){var t=l.DomHandler.find(this.list,'[data-pc-section="item"]'),n=l.ObjectUtils.findIndexInList(this.d_selection[0],g(this.modelValue)),i=l.DomHandler.findSingle(this.list,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),o=g(t).findIndex((function(e){return e===i}));this.d_selection=g(this.modelValue).slice(Math.min(n,o),Math.max(n,o)+1),this.$emit("update:selection",this.d_selection)}else this.onEnterKey(e)},findNextOptionIndex:function(e){var t=g(l.DomHandler.find(this.list,'[data-pc-section="item"]')).findIndex((function(t){return t.id===e}));return t>-1?t+1:0},findPrevOptionIndex:function(e){var t=g(l.DomHandler.find(this.list,'[data-pc-section="item"]')).findIndex((function(t){return t.id===e}));return t>-1?t-1:0},changeFocusedOptionIndex:function(e){var t=l.DomHandler.find(this.list,'[data-pc-section="item"]'),n=e>=t.length?t.length-1:e<0?0:e;this.focusedOptionIndex=t[n]?t[n].getAttribute("id"):-1,this.scrollInView(this.focusedOptionIndex)},scrollInView:function(e){var t=l.DomHandler.findSingle(this.list,'[data-pc-section="item"][id="'.concat(e,'"]'));t&&t.scrollIntoView&&t.scrollIntoView({block:"nearest",inline:"start"})},moveUp:function(e){if(this.d_selection){for(var t=g(this.modelValue),n=0;n<this.d_selection.length;n++){var i=l.ObjectUtils.findIndexInList(this.d_selection[n],t);if(0===i)break;var o=t[i-1];t[i-1]=t[i],t[i]=o}this.reorderDirection="up",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},moveTop:function(e){if(this.d_selection){for(var t=g(this.modelValue),n=0;n<this.d_selection.length;n++){var i=l.ObjectUtils.findIndexInList(this.d_selection[n],t);if(0===i)break;var o=t.splice(i,1)[0];t.unshift(o)}this.reorderDirection="top",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},moveDown:function(e){if(this.d_selection){for(var t=g(this.modelValue),n=this.d_selection.length-1;n>=0;n--){var i=l.ObjectUtils.findIndexInList(this.d_selection[n],t);if(i===t.length-1)break;var o=t[i+1];t[i+1]=t[i],t[i]=o}this.reorderDirection="down",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},moveBottom:function(e){if(this.d_selection){for(var t=g(this.modelValue),n=this.d_selection.length-1;n>=0;n--){var i=l.ObjectUtils.findIndexInList(this.d_selection[n],t);if(i===t.length-1)break;var o=t.splice(i,1)[0];t.push(o)}this.reorderDirection="bottom",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},onItemClick:function(e,t,n){this.itemTouched=!1;var i=l.ObjectUtils.findIndexInList(t,this.d_selection),o=-1!=i,r=!this.itemTouched&&this.metaKeySelection,s=l.DomHandler.find(this.list,'[data-pc-section="item"]')[n].getAttribute("id");if(this.focusedOptionIndex=s,r){var d=e.metaKey||e.ctrlKey;o&&d?this.d_selection=this.d_selection.filter((function(e,t){return t!==i})):(this.d_selection=d&&this.d_selection?g(this.d_selection):[],l.ObjectUtils.insertIntoOrderedArray(t,n,this.d_selection,this.modelValue))}else o?this.d_selection=this.d_selection.filter((function(e,t){return t!==i})):(this.d_selection=this.d_selection?g(this.d_selection):[],l.ObjectUtils.insertIntoOrderedArray(t,n,this.d_selection,this.modelValue));this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},onItemTouchEnd:function(){this.itemTouched=!0},findNextItem:function(e){var t=e.nextElementSibling;return t?"item"!==l.DomHandler.getAttribute(t,"data-pc-section")?this.findNextItem(t):t:null},findPrevItem:function(e){var t=e.previousElementSibling;return t?"item"!==l.DomHandler.getAttribute(nextItem,"data-pc-section")?this.findPrevItem(t):t:null},updateListScroll:function(){var e=l.DomHandler.find(this.list,'[data-pc-section="item"][data-p-highlight="true"]');if(e&&e.length)switch(this.reorderDirection){case"up":l.DomHandler.scrollInView(this.list,e[0]);break;case"top":this.list.scrollTop=0;break;case"down":l.DomHandler.scrollInView(this.list,e[e.length-1]);break;case"bottom":this.list.scrollTop=this.list.scrollHeight}},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){this.$el.setAttribute(this.attributeSelector,""),this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);var e="\n@media screen and (max-width: ".concat(this.breakpoint,") {\n .p-orderlist[").concat(this.attributeSelector,"] {\n flex-direction: column;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls .p-button:last-child {\n margin-right: 0;\n }\n}\n");this.styleElement.innerHTML=e}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},moveDisabled:function(){if(!this.d_selection||!this.d_selection.length)return!0},listRef:function(e){this.list=e?e.$el:void 0}},computed:{attributeSelector:function(){return l.UniqueComponentId()},focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null},moveUpAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveUp:void 0},moveTopAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveTop:void 0},moveDownAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveDown:void 0},moveBottomAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveBottom:void 0}},components:{OLButton:u.default,AngleUpIcon:f.default,AngleDownIcon:h.default,AngleDoubleUpIcon:m.default,AngleDoubleDownIcon:p.default},directives:{ripple:v.default}};function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(e,t,n){return(t=A(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A(e){var t=E(e,"string");return"symbol"===_(t)?t:String(t)}function E(e,t){if("object"!==_(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==_(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var $=["id","onClick","aria-selected","onMousedown","data-p-highlight","data-p-focused"];S.render=function(e,t,n,i,o,r){var l=a.resolveComponent("AngleUpIcon"),s=a.resolveComponent("OLButton"),d=a.resolveComponent("AngleDoubleUpIcon"),c=a.resolveComponent("AngleDownIcon"),u=a.resolveComponent("AngleDoubleDownIcon"),p=a.resolveDirective("ripple");return a.openBlock(),a.createElementBlock("div",a.mergeProps({class:e.cx("root")},e.ptm("root")),[a.createElementVNode("div",a.mergeProps({class:e.cx("controls")},e.ptm("controls")),[a.renderSlot(e.$slots,"controlsstart"),a.createVNode(s,a.mergeProps({type:"button",onClick:r.moveUp,"aria-label":r.moveUpAriaLabel,disabled:r.moveDisabled()},B(B({},e.moveUpButtonProps),e.ptm("moveUpButton")),{unstyled:e.unstyled}),{icon:a.withCtx((function(){return[a.renderSlot(e.$slots,"moveupicon",{},(function(){return[a.createVNode(l,a.normalizeProps(a.guardReactiveProps(e.ptm("moveUpButton").icon)),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","unstyled"]),a.createVNode(s,a.mergeProps({type:"button",onClick:r.moveTop,"aria-label":r.moveTopAriaLabel,disabled:r.moveDisabled()},B(B({},e.moveTopButtonProps),e.ptm("moveTopButton")),{unstyled:e.unstyled}),{icon:a.withCtx((function(){return[a.renderSlot(e.$slots,"movetopicon",{},(function(){return[a.createVNode(d,a.normalizeProps(a.guardReactiveProps(e.ptm("moveTopButton").icon)),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","unstyled"]),a.createVNode(s,a.mergeProps({type:"button",onClick:r.moveDown,"aria-label":r.moveDownAriaLabel,disabled:r.moveDisabled()},B(B({},e.moveDownButtonProps),e.ptm("moveDownButton")),{unstyled:e.unstyled}),{icon:a.withCtx((function(){return[a.renderSlot(e.$slots,"movedownicon",{},(function(){return[a.createVNode(c,a.normalizeProps(a.guardReactiveProps(e.ptm("moveDownButton").icon)),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","unstyled"]),a.createVNode(s,a.mergeProps({type:"button",onClick:r.moveBottom,"aria-label":r.moveBottomAriaLabel,disabled:r.moveDisabled()},B(B({},e.moveBottomButtonProps),e.ptm("moveBottomButton")),{unstyled:e.unstyled}),{icon:a.withCtx((function(){return[a.renderSlot(e.$slots,"movebottomicon",{},(function(){return[a.createVNode(u,a.normalizeProps(a.guardReactiveProps(e.ptm("moveBottomButton").icon)),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","unstyled"]),a.renderSlot(e.$slots,"controlsend")],16),a.createElementVNode("div",a.mergeProps({class:e.cx("container")},e.ptm("container")),[e.$slots.header?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,class:e.cx("header")},e.ptm("header")),[a.renderSlot(e.$slots,"header")],16)):a.createCommentVNode("",!0),a.createVNode(a.TransitionGroup,a.mergeProps({ref:r.listRef,id:o.id+"_list",name:"p-orderlist-flip",tag:"ul",class:e.cx("list"),style:e.listStyle,role:"listbox","aria-multiselectable":"true",tabindex:e.tabindex,"aria-activedescendant":o.focused?r.focusedOptionId:void 0,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,onFocus:r.onListFocus,onBlur:r.onListBlur,onKeydown:r.onListKeyDown},B(B({},e.listProps),e.ptm("list"))),{default:a.withCtx((function(){return[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.modelValue,(function(n,i){return a.withDirectives((a.openBlock(),a.createElementBlock("li",a.mergeProps({key:r.getItemKey(n,i),id:o.id+"_"+i,role:"option",class:e.cx("item",{item:n,id:"".concat(o.id,"_").concat(i)}),onClick:function(e){return r.onItemClick(e,n,i)},onTouchend:t[0]||(t[0]=function(){return r.onItemTouchEnd&&r.onItemTouchEnd.apply(r,arguments)}),"aria-selected":r.isSelected(n),onMousedown:function(e){return r.onOptionMouseDown(i)}},r.getPTOptions(n,"item"),{"data-p-highlight":r.isSelected(n),"data-p-focused":"".concat(o.id,"_").concat(i)===r.focusedOptionId}),[a.renderSlot(e.$slots,"item",{item:n,index:i})],16,$)),[[p]])})),128))]})),_:3},16,["id","class","style","tabindex","aria-activedescendant","aria-label","aria-labelledby","onFocus","onBlur","onKeydown"])],16)],16)},module.exports=S;
1
+ "use strict";var e=require("primevue/button"),t=require("primevue/icons/angledoubledown"),n=require("primevue/icons/angledoubleup"),i=require("primevue/icons/angledown"),o=require("primevue/icons/angleup"),r=require("primevue/ripple"),l=require("primevue/utils"),s=require("primevue/basecomponent"),d=require("primevue/usestyle"),a=require("vue");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=c(e),p=c(t),m=c(n),h=c(i),f=c(o),v=c(r),b=c(s),y=d.useStyle("\n.p-orderlist {\n display: flex;\n}\n\n.p-orderlist-controls {\n display: flex;\n flex-direction: column;\n justify-content: center;\n}\n\n.p-orderlist-list-container {\n flex: 1 1 auto;\n}\n\n.p-orderlist-list {\n list-style-type: none;\n margin: 0;\n padding: 0;\n overflow: auto;\n min-height: 12rem;\n max-height: 24rem;\n}\n\n.p-orderlist-item {\n cursor: pointer;\n overflow: hidden;\n position: relative;\n}\n\n.p-orderlist.p-state-disabled .p-orderlist-item,\n.p-orderlist.p-state-disabled .p-button {\n cursor: default;\n}\n\n.p-orderlist.p-state-disabled .p-orderlist-list {\n overflow: hidden;\n}\n",{name:"orderlist",manual:!0});function g(e){return O(e)||D(e)||x(e)||I()}function I(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function x(e,t){if(e){if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(e,t):void 0}}function D(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function O(e){if(Array.isArray(e))return w(e)}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var S={name:"OrderList",extends:{name:"BaseOrderList",extends:b.default,props:{modelValue:{type:Array,default:null},selection:{type:Array,default:null},dataKey:{type:String,default:null},listStyle:{type:null,default:null},metaKeySelection:{type:Boolean,default:!0},responsive:{type:Boolean,default:!0},breakpoint:{type:String,default:"960px"},stripedRows:{type:Boolean,default:!1},tabindex:{type:Number,default:0},listProps:{type:null,default:null},moveUpButtonProps:{type:null,default:null},moveTopButtonProps:{type:null,default:null},moveDownButtonProps:{type:null,default:null},moveBottomButtonProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:{root:function(e){return["p-orderlist p-component",{"p-orderlist-striped":e.props.stripedRows}]},controls:"p-orderlist-controls",header:"p-orderlist-header",container:"p-orderlist-list-container",list:"p-orderlist-list",item:function(e){var t=e.instance,n=e.id;return["p-orderlist-item",{"p-highlight":t.isSelected(e.item),"p-focus":n===t.focusedOptionId}]}},loadStyle:y.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","reorder","update:selection","selection-change","focus","blur"],itemTouched:!1,reorderDirection:null,styleElement:null,list:null,data:function(){return{id:this.$attrs.id,d_selection:this.selection,focused:!1,focusedOptionIndex:-1}},watch:{"$attrs.id":function(e){this.id=e||l.UniqueComponentId()}},beforeUnmount:function(){this.destroyStyle()},updated:function(){this.reorderDirection&&(this.updateListScroll(),this.reorderDirection=null)},mounted:function(){this.id=this.id||l.UniqueComponentId(),this.responsive&&this.createStyle()},methods:{getItemKey:function(e,t){return this.dataKey?l.ObjectUtils.resolveFieldData(e,this.dataKey):t},getPTOptions:function(e,t,n){return this.ptm(t,{context:{active:this.isSelected(e),focused:"".concat(this.id,"_").concat(n)===this.focusedOptionId}})},isSelected:function(e){return-1!=l.ObjectUtils.findIndexInList(e,this.d_selection)},onListFocus:function(e){var t=l.DomHandler.findSingle(this.list,'[data-p-highlight="true"]'),n=l.ObjectUtils.findIndexInList(t,this.list.children);this.focused=!0,this.changeFocusedOptionIndex(-1!==this.focusedOptionIndex?this.focusedOptionIndex:t?n:-1),this.$emit("focus",e)},onListBlur:function(e){this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onListKeyDown:function(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Enter":this.onEnterKey(e);break;case"Space":this.onSpaceKey(e);break;case"KeyA":e.ctrlKey&&(this.d_selection=g(this.modelValue),this.$emit("update:selection",this.d_selection))}},onOptionMouseDown:function(e){this.focused=!0,this.focusedOptionIndex=e},onArrowDownKey:function(e){var t=this.findNextOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(t),e.shiftKey&&this.onEnterKey(e),e.preventDefault()},onArrowUpKey:function(e){var t=this.findPrevOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(t),e.shiftKey&&this.onEnterKey(e),e.preventDefault()},onHomeKey:function(e){if(e.ctrlKey&&e.shiftKey){var t=l.DomHandler.find(this.list,'[data-pc-section="item"]'),n=l.DomHandler.findSingle(this.list,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),i=g(t).findIndex((function(e){return e===n}));this.d_selection=g(this.modelValue).slice(0,i+1),this.$emit("update:selection",this.d_selection)}else this.changeFocusedOptionIndex(0);e.preventDefault()},onEndKey:function(e){if(e.ctrlKey&&e.shiftKey){var t=l.DomHandler.find(this.list,'[data-pc-section="item"]'),n=l.DomHandler.findSingle(this.list,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),i=g(t).findIndex((function(e){return e===n}));this.d_selection=g(this.modelValue).slice(i,t.length),this.$emit("update:selection",this.d_selection)}else this.changeFocusedOptionIndex(l.DomHandler.find(this.list,'[data-pc-section="item"]').length-1);e.preventDefault()},onEnterKey:function(e){var t=l.DomHandler.find(this.list,'[data-pc-section="item"]'),n=l.DomHandler.findSingle(this.list,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),i=g(t).findIndex((function(e){return e===n}));this.onItemClick(e,this.modelValue[i],i),e.preventDefault()},onSpaceKey:function(e){if(e.shiftKey){var t=l.DomHandler.find(this.list,'[data-pc-section="item"]'),n=l.ObjectUtils.findIndexInList(this.d_selection[0],g(this.modelValue)),i=l.DomHandler.findSingle(this.list,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),o=g(t).findIndex((function(e){return e===i}));this.d_selection=g(this.modelValue).slice(Math.min(n,o),Math.max(n,o)+1),this.$emit("update:selection",this.d_selection)}else this.onEnterKey(e)},findNextOptionIndex:function(e){var t=g(l.DomHandler.find(this.list,'[data-pc-section="item"]')).findIndex((function(t){return t.id===e}));return t>-1?t+1:0},findPrevOptionIndex:function(e){var t=g(l.DomHandler.find(this.list,'[data-pc-section="item"]')).findIndex((function(t){return t.id===e}));return t>-1?t-1:0},changeFocusedOptionIndex:function(e){var t=l.DomHandler.find(this.list,'[data-pc-section="item"]'),n=e>=t.length?t.length-1:e<0?0:e;this.focusedOptionIndex=t[n]?t[n].getAttribute("id"):-1,this.scrollInView(this.focusedOptionIndex)},scrollInView:function(e){var t=l.DomHandler.findSingle(this.list,'[data-pc-section="item"][id="'.concat(e,'"]'));t&&t.scrollIntoView&&t.scrollIntoView({block:"nearest",inline:"start"})},moveUp:function(e){if(this.d_selection){for(var t=g(this.modelValue),n=0;n<this.d_selection.length;n++){var i=l.ObjectUtils.findIndexInList(this.d_selection[n],t);if(0===i)break;var o=t[i-1];t[i-1]=t[i],t[i]=o}this.reorderDirection="up",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},moveTop:function(e){if(this.d_selection){for(var t=g(this.modelValue),n=0;n<this.d_selection.length;n++){var i=l.ObjectUtils.findIndexInList(this.d_selection[n],t);if(0===i)break;var o=t.splice(i,1)[0];t.unshift(o)}this.reorderDirection="top",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},moveDown:function(e){if(this.d_selection){for(var t=g(this.modelValue),n=this.d_selection.length-1;n>=0;n--){var i=l.ObjectUtils.findIndexInList(this.d_selection[n],t);if(i===t.length-1)break;var o=t[i+1];t[i+1]=t[i],t[i]=o}this.reorderDirection="down",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},moveBottom:function(e){if(this.d_selection){for(var t=g(this.modelValue),n=this.d_selection.length-1;n>=0;n--){var i=l.ObjectUtils.findIndexInList(this.d_selection[n],t);if(i===t.length-1)break;var o=t.splice(i,1)[0];t.push(o)}this.reorderDirection="bottom",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},onItemClick:function(e,t,n){this.itemTouched=!1;var i=l.ObjectUtils.findIndexInList(t,this.d_selection),o=-1!=i,r=!this.itemTouched&&this.metaKeySelection,s=l.DomHandler.find(this.list,'[data-pc-section="item"]')[n].getAttribute("id");if(this.focusedOptionIndex=s,r){var d=e.metaKey||e.ctrlKey;o&&d?this.d_selection=this.d_selection.filter((function(e,t){return t!==i})):(this.d_selection=d&&this.d_selection?g(this.d_selection):[],l.ObjectUtils.insertIntoOrderedArray(t,n,this.d_selection,this.modelValue))}else o?this.d_selection=this.d_selection.filter((function(e,t){return t!==i})):(this.d_selection=this.d_selection?g(this.d_selection):[],l.ObjectUtils.insertIntoOrderedArray(t,n,this.d_selection,this.modelValue));this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},onItemTouchEnd:function(){this.itemTouched=!0},findNextItem:function(e){var t=e.nextElementSibling;return t?"item"!==l.DomHandler.getAttribute(t,"data-pc-section")?this.findNextItem(t):t:null},findPrevItem:function(e){var t=e.previousElementSibling;return t?"item"!==l.DomHandler.getAttribute(nextItem,"data-pc-section")?this.findPrevItem(t):t:null},updateListScroll:function(){var e=l.DomHandler.find(this.list,'[data-pc-section="item"][data-p-highlight="true"]');if(e&&e.length)switch(this.reorderDirection){case"up":l.DomHandler.scrollInView(this.list,e[0]);break;case"top":this.list.scrollTop=0;break;case"down":l.DomHandler.scrollInView(this.list,e[e.length-1]);break;case"bottom":this.list.scrollTop=this.list.scrollHeight}},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){this.$el.setAttribute(this.attributeSelector,""),this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);var e="\n@media screen and (max-width: ".concat(this.breakpoint,") {\n .p-orderlist[").concat(this.attributeSelector,"] {\n flex-direction: column;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls .p-button:last-child {\n margin-right: 0;\n }\n}\n");this.styleElement.innerHTML=e}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},moveDisabled:function(){if(!this.d_selection||!this.d_selection.length)return!0},listRef:function(e){this.list=e?e.$el:void 0}},computed:{attributeSelector:function(){return l.UniqueComponentId()},focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null},moveUpAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveUp:void 0},moveTopAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveTop:void 0},moveDownAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveDown:void 0},moveBottomAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveBottom:void 0}},components:{OLButton:u.default,AngleUpIcon:f.default,AngleDownIcon:h.default,AngleDoubleUpIcon:m.default,AngleDoubleDownIcon:p.default},directives:{ripple:v.default}};function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(e,t,n){return(t=A(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A(e){var t=E(e,"string");return"symbol"===_(t)?t:String(t)}function E(e,t){if("object"!==_(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==_(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var $=["id","onClick","aria-selected","onMousedown","data-p-highlight","data-p-focused"];S.render=function(e,t,n,i,o,r){var l=a.resolveComponent("AngleUpIcon"),s=a.resolveComponent("OLButton"),d=a.resolveComponent("AngleDoubleUpIcon"),c=a.resolveComponent("AngleDownIcon"),u=a.resolveComponent("AngleDoubleDownIcon"),p=a.resolveDirective("ripple");return a.openBlock(),a.createElementBlock("div",a.mergeProps({class:e.cx("root")},e.ptm("root")),[a.createElementVNode("div",a.mergeProps({class:e.cx("controls")},e.ptm("controls")),[a.renderSlot(e.$slots,"controlsstart"),a.createVNode(s,a.mergeProps({type:"button",onClick:r.moveUp,"aria-label":r.moveUpAriaLabel,disabled:r.moveDisabled(),pt:e.ptm("moveUpButton")},e.moveUpButtonProps,{unstyled:e.unstyled}),{icon:a.withCtx((function(){return[a.renderSlot(e.$slots,"moveupicon",{},(function(){return[a.createVNode(l,a.normalizeProps(a.guardReactiveProps(e.ptm("moveUpButton").icon)),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),a.createVNode(s,a.mergeProps({type:"button",onClick:r.moveTop,"aria-label":r.moveTopAriaLabel,disabled:r.moveDisabled(),pt:e.ptm("moveTopButton")},e.ptm("moveTopButton"),{unstyled:e.unstyled}),{icon:a.withCtx((function(){return[a.renderSlot(e.$slots,"movetopicon",{},(function(){return[a.createVNode(d,a.normalizeProps(a.guardReactiveProps(e.ptm("moveTopButton").icon)),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),a.createVNode(s,a.mergeProps({type:"button",onClick:r.moveDown,"aria-label":r.moveDownAriaLabel,disabled:r.moveDisabled(),pt:e.ptm("moveDownButton")},e.moveDownButtonProps,{unstyled:e.unstyled}),{icon:a.withCtx((function(){return[a.renderSlot(e.$slots,"movedownicon",{},(function(){return[a.createVNode(c,a.normalizeProps(a.guardReactiveProps(e.ptm("moveDownButton").icon)),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),a.createVNode(s,a.mergeProps({type:"button",onClick:r.moveBottom,"aria-label":r.moveBottomAriaLabel,disabled:r.moveDisabled(),pt:e.ptm("moveBottomButton")},e.moveBottomButtonProps,{unstyled:e.unstyled}),{icon:a.withCtx((function(){return[a.renderSlot(e.$slots,"movebottomicon",{},(function(){return[a.createVNode(u,a.normalizeProps(a.guardReactiveProps(e.ptm("moveBottomButton").icon)),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),a.renderSlot(e.$slots,"controlsend")],16),a.createElementVNode("div",a.mergeProps({class:e.cx("container")},e.ptm("container")),[e.$slots.header?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,class:e.cx("header")},e.ptm("header")),[a.renderSlot(e.$slots,"header")],16)):a.createCommentVNode("",!0),a.createVNode(a.TransitionGroup,a.mergeProps({ref:r.listRef,id:o.id+"_list",name:"p-orderlist-flip",tag:"ul",class:e.cx("list"),style:e.listStyle,role:"listbox","aria-multiselectable":"true",tabindex:e.tabindex,"aria-activedescendant":o.focused?r.focusedOptionId:void 0,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,onFocus:r.onListFocus,onBlur:r.onListBlur,onKeydown:r.onListKeyDown},B(B({},e.listProps),e.ptm("list"))),{default:a.withCtx((function(){return[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.modelValue,(function(n,i){return a.withDirectives((a.openBlock(),a.createElementBlock("li",a.mergeProps({key:r.getItemKey(n,i),id:o.id+"_"+i,role:"option",class:e.cx("item",{item:n,id:"".concat(o.id,"_").concat(i)}),onClick:function(e){return r.onItemClick(e,n,i)},onTouchend:t[0]||(t[0]=function(){return r.onItemTouchEnd&&r.onItemTouchEnd.apply(r,arguments)}),"aria-selected":r.isSelected(n),onMousedown:function(e){return r.onOptionMouseDown(i)}},r.getPTOptions(n,"item",i),{"data-p-highlight":r.isSelected(n),"data-p-focused":"".concat(o.id,"_").concat(i)===r.focusedOptionId}),[a.renderSlot(e.$slots,"item",{item:n,index:i})],16,$)),[[p]])})),128))]})),_:3},16,["id","class","style","tabindex","aria-activedescendant","aria-label","aria-labelledby","onFocus","onBlur","onKeydown"])],16)],16)},module.exports=S;
@@ -162,11 +162,11 @@ var script = {
162
162
  getItemKey: function getItemKey(item, index) {
163
163
  return this.dataKey ? ObjectUtils.resolveFieldData(item, this.dataKey) : index;
164
164
  },
165
- getPTOptions: function getPTOptions(item, key) {
165
+ getPTOptions: function getPTOptions(item, key, index) {
166
166
  return this.ptm(key, {
167
167
  context: {
168
168
  active: this.isSelected(item),
169
- focused: this.id === this.focusedOptionId
169
+ focused: "".concat(this.id, "_").concat(index) === this.focusedOptionId
170
170
  }
171
171
  });
172
172
  },
@@ -547,8 +547,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
547
547
  type: "button",
548
548
  onClick: $options.moveUp,
549
549
  "aria-label": $options.moveUpAriaLabel,
550
- disabled: $options.moveDisabled()
551
- }, _objectSpread(_objectSpread({}, _ctx.moveUpButtonProps), _ctx.ptm('moveUpButton')), {
550
+ disabled: $options.moveDisabled(),
551
+ pt: _ctx.ptm('moveUpButton')
552
+ }, _ctx.moveUpButtonProps, {
552
553
  unstyled: _ctx.unstyled
553
554
  }), {
554
555
  icon: withCtx(function () {
@@ -557,12 +558,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
557
558
  })];
558
559
  }),
559
560
  _: 3
560
- }, 16, ["onClick", "aria-label", "disabled", "unstyled"]), createVNode(_component_OLButton, mergeProps({
561
+ }, 16, ["onClick", "aria-label", "disabled", "pt", "unstyled"]), createVNode(_component_OLButton, mergeProps({
561
562
  type: "button",
562
563
  onClick: $options.moveTop,
563
564
  "aria-label": $options.moveTopAriaLabel,
564
- disabled: $options.moveDisabled()
565
- }, _objectSpread(_objectSpread({}, _ctx.moveTopButtonProps), _ctx.ptm('moveTopButton')), {
565
+ disabled: $options.moveDisabled(),
566
+ pt: _ctx.ptm('moveTopButton')
567
+ }, _ctx.ptm('moveTopButton'), {
566
568
  unstyled: _ctx.unstyled
567
569
  }), {
568
570
  icon: withCtx(function () {
@@ -571,12 +573,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
571
573
  })];
572
574
  }),
573
575
  _: 3
574
- }, 16, ["onClick", "aria-label", "disabled", "unstyled"]), createVNode(_component_OLButton, mergeProps({
576
+ }, 16, ["onClick", "aria-label", "disabled", "pt", "unstyled"]), createVNode(_component_OLButton, mergeProps({
575
577
  type: "button",
576
578
  onClick: $options.moveDown,
577
579
  "aria-label": $options.moveDownAriaLabel,
578
- disabled: $options.moveDisabled()
579
- }, _objectSpread(_objectSpread({}, _ctx.moveDownButtonProps), _ctx.ptm('moveDownButton')), {
580
+ disabled: $options.moveDisabled(),
581
+ pt: _ctx.ptm('moveDownButton')
582
+ }, _ctx.moveDownButtonProps, {
580
583
  unstyled: _ctx.unstyled
581
584
  }), {
582
585
  icon: withCtx(function () {
@@ -585,12 +588,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
585
588
  })];
586
589
  }),
587
590
  _: 3
588
- }, 16, ["onClick", "aria-label", "disabled", "unstyled"]), createVNode(_component_OLButton, mergeProps({
591
+ }, 16, ["onClick", "aria-label", "disabled", "pt", "unstyled"]), createVNode(_component_OLButton, mergeProps({
589
592
  type: "button",
590
593
  onClick: $options.moveBottom,
591
594
  "aria-label": $options.moveBottomAriaLabel,
592
- disabled: $options.moveDisabled()
593
- }, _objectSpread(_objectSpread({}, _ctx.moveBottomButtonProps), _ctx.ptm('moveBottomButton')), {
595
+ disabled: $options.moveDisabled(),
596
+ pt: _ctx.ptm('moveBottomButton')
597
+ }, _ctx.moveBottomButtonProps, {
594
598
  unstyled: _ctx.unstyled
595
599
  }), {
596
600
  icon: withCtx(function () {
@@ -599,7 +603,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
599
603
  })];
600
604
  }),
601
605
  _: 3
602
- }, 16, ["onClick", "aria-label", "disabled", "unstyled"]), renderSlot(_ctx.$slots, "controlsend")], 16), createElementVNode("div", mergeProps({
606
+ }, 16, ["onClick", "aria-label", "disabled", "pt", "unstyled"]), renderSlot(_ctx.$slots, "controlsend")], 16), createElementVNode("div", mergeProps({
603
607
  "class": _ctx.cx('container')
604
608
  }, _ctx.ptm('container')), [_ctx.$slots.header ? (openBlock(), createElementBlock("div", mergeProps({
605
609
  key: 0,
@@ -641,7 +645,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
641
645
  onMousedown: function onMousedown($event) {
642
646
  return $options.onOptionMouseDown(i);
643
647
  }
644
- }, $options.getPTOptions(item, 'item'), {
648
+ }, $options.getPTOptions(item, 'item', i), {
645
649
  "data-p-highlight": $options.isSelected(item),
646
650
  "data-p-focused": "".concat($data.id, "_").concat(i) === $options.focusedOptionId
647
651
  }), [renderSlot(_ctx.$slots, "item", {
@@ -1 +1 @@
1
- import t from"primevue/button";import e from"primevue/icons/angledoubledown";import i from"primevue/icons/angledoubleup";import n from"primevue/icons/angledown";import o from"primevue/icons/angleup";import r from"primevue/ripple";import{UniqueComponentId as s,ObjectUtils as l,DomHandler as c}from"primevue/utils";import d from"primevue/basecomponent";import{useStyle as a}from"primevue/usestyle";import{resolveComponent as u,resolveDirective as p,openBlock as h,createElementBlock as m,mergeProps as f,createElementVNode as v,renderSlot as y,createVNode as b,withCtx as g,normalizeProps as I,guardReactiveProps as x,createCommentVNode as w,TransitionGroup as O,Fragment as S,renderList as D,withDirectives as _}from"vue";var A=a("\n.p-orderlist {\n display: flex;\n}\n\n.p-orderlist-controls {\n display: flex;\n flex-direction: column;\n justify-content: center;\n}\n\n.p-orderlist-list-container {\n flex: 1 1 auto;\n}\n\n.p-orderlist-list {\n list-style-type: none;\n margin: 0;\n padding: 0;\n overflow: auto;\n min-height: 12rem;\n max-height: 24rem;\n}\n\n.p-orderlist-item {\n cursor: pointer;\n overflow: hidden;\n position: relative;\n}\n\n.p-orderlist.p-state-disabled .p-orderlist-item,\n.p-orderlist.p-state-disabled .p-button {\n cursor: default;\n}\n\n.p-orderlist.p-state-disabled .p-orderlist-list {\n overflow: hidden;\n}\n",{name:"orderlist",manual:!0});function $(t){return k(t)||E(t)||B(t)||K()}function K(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function B(t,e){if(t){if("string"==typeof t)return L(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?L(t,e):void 0}}function E(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function k(t){if(Array.isArray(t))return L(t)}function L(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var P={name:"OrderList",extends:{name:"BaseOrderList",extends:d,props:{modelValue:{type:Array,default:null},selection:{type:Array,default:null},dataKey:{type:String,default:null},listStyle:{type:null,default:null},metaKeySelection:{type:Boolean,default:!0},responsive:{type:Boolean,default:!0},breakpoint:{type:String,default:"960px"},stripedRows:{type:Boolean,default:!1},tabindex:{type:Number,default:0},listProps:{type:null,default:null},moveUpButtonProps:{type:null,default:null},moveTopButtonProps:{type:null,default:null},moveDownButtonProps:{type:null,default:null},moveBottomButtonProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:{root:function(t){return["p-orderlist p-component",{"p-orderlist-striped":t.props.stripedRows}]},controls:"p-orderlist-controls",header:"p-orderlist-header",container:"p-orderlist-list-container",list:"p-orderlist-list",item:function(t){var e=t.instance,i=t.id;return["p-orderlist-item",{"p-highlight":e.isSelected(t.item),"p-focus":i===e.focusedOptionId}]}},loadStyle:A.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","reorder","update:selection","selection-change","focus","blur"],itemTouched:!1,reorderDirection:null,styleElement:null,list:null,data:function(){return{id:this.$attrs.id,d_selection:this.selection,focused:!1,focusedOptionIndex:-1}},watch:{"$attrs.id":function(t){this.id=t||s()}},beforeUnmount:function(){this.destroyStyle()},updated:function(){this.reorderDirection&&(this.updateListScroll(),this.reorderDirection=null)},mounted:function(){this.id=this.id||s(),this.responsive&&this.createStyle()},methods:{getItemKey:function(t,e){return this.dataKey?l.resolveFieldData(t,this.dataKey):e},getPTOptions:function(t,e){return this.ptm(e,{context:{active:this.isSelected(t),focused:this.id===this.focusedOptionId}})},isSelected:function(t){return-1!=l.findIndexInList(t,this.d_selection)},onListFocus:function(t){var e=c.findSingle(this.list,'[data-p-highlight="true"]'),i=l.findIndexInList(e,this.list.children);this.focused=!0,this.changeFocusedOptionIndex(-1!==this.focusedOptionIndex?this.focusedOptionIndex:e?i:-1),this.$emit("focus",t)},onListBlur:function(t){this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",t)},onListKeyDown:function(t){switch(t.code){case"ArrowDown":this.onArrowDownKey(t);break;case"ArrowUp":this.onArrowUpKey(t);break;case"Home":this.onHomeKey(t);break;case"End":this.onEndKey(t);break;case"Enter":this.onEnterKey(t);break;case"Space":this.onSpaceKey(t);break;case"KeyA":t.ctrlKey&&(this.d_selection=$(this.modelValue),this.$emit("update:selection",this.d_selection))}},onOptionMouseDown:function(t){this.focused=!0,this.focusedOptionIndex=t},onArrowDownKey:function(t){var e=this.findNextOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(e),t.shiftKey&&this.onEnterKey(t),t.preventDefault()},onArrowUpKey:function(t){var e=this.findPrevOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(e),t.shiftKey&&this.onEnterKey(t),t.preventDefault()},onHomeKey:function(t){if(t.ctrlKey&&t.shiftKey){var e=c.find(this.list,'[data-pc-section="item"]'),i=c.findSingle(this.list,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),n=$(e).findIndex((function(t){return t===i}));this.d_selection=$(this.modelValue).slice(0,n+1),this.$emit("update:selection",this.d_selection)}else this.changeFocusedOptionIndex(0);t.preventDefault()},onEndKey:function(t){if(t.ctrlKey&&t.shiftKey){var e=c.find(this.list,'[data-pc-section="item"]'),i=c.findSingle(this.list,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),n=$(e).findIndex((function(t){return t===i}));this.d_selection=$(this.modelValue).slice(n,e.length),this.$emit("update:selection",this.d_selection)}else this.changeFocusedOptionIndex(c.find(this.list,'[data-pc-section="item"]').length-1);t.preventDefault()},onEnterKey:function(t){var e=c.find(this.list,'[data-pc-section="item"]'),i=c.findSingle(this.list,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),n=$(e).findIndex((function(t){return t===i}));this.onItemClick(t,this.modelValue[n],n),t.preventDefault()},onSpaceKey:function(t){if(t.shiftKey){var e=c.find(this.list,'[data-pc-section="item"]'),i=l.findIndexInList(this.d_selection[0],$(this.modelValue)),n=c.findSingle(this.list,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),o=$(e).findIndex((function(t){return t===n}));this.d_selection=$(this.modelValue).slice(Math.min(i,o),Math.max(i,o)+1),this.$emit("update:selection",this.d_selection)}else this.onEnterKey(t)},findNextOptionIndex:function(t){var e=$(c.find(this.list,'[data-pc-section="item"]')).findIndex((function(e){return e.id===t}));return e>-1?e+1:0},findPrevOptionIndex:function(t){var e=$(c.find(this.list,'[data-pc-section="item"]')).findIndex((function(e){return e.id===t}));return e>-1?e-1:0},changeFocusedOptionIndex:function(t){var e=c.find(this.list,'[data-pc-section="item"]'),i=t>=e.length?e.length-1:t<0?0:t;this.focusedOptionIndex=e[i]?e[i].getAttribute("id"):-1,this.scrollInView(this.focusedOptionIndex)},scrollInView:function(t){var e=c.findSingle(this.list,'[data-pc-section="item"][id="'.concat(t,'"]'));e&&e.scrollIntoView&&e.scrollIntoView({block:"nearest",inline:"start"})},moveUp:function(t){if(this.d_selection){for(var e=$(this.modelValue),i=0;i<this.d_selection.length;i++){var n=l.findIndexInList(this.d_selection[i],e);if(0===n)break;var o=e[n-1];e[n-1]=e[n],e[n]=o}this.reorderDirection="up",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:t,value:e,direction:this.reorderDirection})}},moveTop:function(t){if(this.d_selection){for(var e=$(this.modelValue),i=0;i<this.d_selection.length;i++){var n=l.findIndexInList(this.d_selection[i],e);if(0===n)break;var o=e.splice(n,1)[0];e.unshift(o)}this.reorderDirection="top",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:t,value:e,direction:this.reorderDirection})}},moveDown:function(t){if(this.d_selection){for(var e=$(this.modelValue),i=this.d_selection.length-1;i>=0;i--){var n=l.findIndexInList(this.d_selection[i],e);if(n===e.length-1)break;var o=e[n+1];e[n+1]=e[n],e[n]=o}this.reorderDirection="down",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:t,value:e,direction:this.reorderDirection})}},moveBottom:function(t){if(this.d_selection){for(var e=$(this.modelValue),i=this.d_selection.length-1;i>=0;i--){var n=l.findIndexInList(this.d_selection[i],e);if(n===e.length-1)break;var o=e.splice(n,1)[0];e.push(o)}this.reorderDirection="bottom",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:t,value:e,direction:this.reorderDirection})}},onItemClick:function(t,e,i){this.itemTouched=!1;var n=l.findIndexInList(e,this.d_selection),o=-1!=n,r=!this.itemTouched&&this.metaKeySelection,s=c.find(this.list,'[data-pc-section="item"]')[i].getAttribute("id");if(this.focusedOptionIndex=s,r){var d=t.metaKey||t.ctrlKey;o&&d?this.d_selection=this.d_selection.filter((function(t,e){return e!==n})):(this.d_selection=d&&this.d_selection?$(this.d_selection):[],l.insertIntoOrderedArray(e,i,this.d_selection,this.modelValue))}else o?this.d_selection=this.d_selection.filter((function(t,e){return e!==n})):(this.d_selection=this.d_selection?$(this.d_selection):[],l.insertIntoOrderedArray(e,i,this.d_selection,this.modelValue));this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:t,value:this.d_selection})},onItemTouchEnd:function(){this.itemTouched=!0},findNextItem:function(t){var e=t.nextElementSibling;return e?"item"!==c.getAttribute(e,"data-pc-section")?this.findNextItem(e):e:null},findPrevItem:function(t){var e=t.previousElementSibling;return e?"item"!==c.getAttribute(nextItem,"data-pc-section")?this.findPrevItem(e):e:null},updateListScroll:function(){var t=c.find(this.list,'[data-pc-section="item"][data-p-highlight="true"]');if(t&&t.length)switch(this.reorderDirection){case"up":c.scrollInView(this.list,t[0]);break;case"top":this.list.scrollTop=0;break;case"down":c.scrollInView(this.list,t[t.length-1]);break;case"bottom":this.list.scrollTop=this.list.scrollHeight}},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){this.$el.setAttribute(this.attributeSelector,""),this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);var t="\n@media screen and (max-width: ".concat(this.breakpoint,") {\n .p-orderlist[").concat(this.attributeSelector,"] {\n flex-direction: column;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls .p-button:last-child {\n margin-right: 0;\n }\n}\n");this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},moveDisabled:function(){if(!this.d_selection||!this.d_selection.length)return!0},listRef:function(t){this.list=t?t.$el:void 0}},computed:{attributeSelector:function(){return s()},focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null},moveUpAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveUp:void 0},moveTopAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveTop:void 0},moveDownAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveDown:void 0},moveBottomAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveBottom:void 0}},components:{OLButton:t,AngleUpIcon:o,AngleDownIcon:n,AngleDoubleUpIcon:i,AngleDoubleDownIcon:e},directives:{ripple:r}};function V(t){return V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},V(t)}function T(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function U(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?T(Object(i),!0).forEach((function(e){j(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):T(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function j(t,e,i){return(e=C(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function C(t){var e=F(t,"string");return"symbol"===V(e)?e:String(e)}function F(t,e){if("object"!==V(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!==V(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var M=["id","onClick","aria-selected","onMousedown","data-p-highlight","data-p-focused"];P.render=function(t,e,i,n,o,r){var s=u("AngleUpIcon"),l=u("OLButton"),c=u("AngleDoubleUpIcon"),d=u("AngleDownIcon"),a=u("AngleDoubleDownIcon"),A=p("ripple");return h(),m("div",f({class:t.cx("root")},t.ptm("root")),[v("div",f({class:t.cx("controls")},t.ptm("controls")),[y(t.$slots,"controlsstart"),b(l,f({type:"button",onClick:r.moveUp,"aria-label":r.moveUpAriaLabel,disabled:r.moveDisabled()},U(U({},t.moveUpButtonProps),t.ptm("moveUpButton")),{unstyled:t.unstyled}),{icon:g((function(){return[y(t.$slots,"moveupicon",{},(function(){return[b(s,I(x(t.ptm("moveUpButton").icon)),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","unstyled"]),b(l,f({type:"button",onClick:r.moveTop,"aria-label":r.moveTopAriaLabel,disabled:r.moveDisabled()},U(U({},t.moveTopButtonProps),t.ptm("moveTopButton")),{unstyled:t.unstyled}),{icon:g((function(){return[y(t.$slots,"movetopicon",{},(function(){return[b(c,I(x(t.ptm("moveTopButton").icon)),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","unstyled"]),b(l,f({type:"button",onClick:r.moveDown,"aria-label":r.moveDownAriaLabel,disabled:r.moveDisabled()},U(U({},t.moveDownButtonProps),t.ptm("moveDownButton")),{unstyled:t.unstyled}),{icon:g((function(){return[y(t.$slots,"movedownicon",{},(function(){return[b(d,I(x(t.ptm("moveDownButton").icon)),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","unstyled"]),b(l,f({type:"button",onClick:r.moveBottom,"aria-label":r.moveBottomAriaLabel,disabled:r.moveDisabled()},U(U({},t.moveBottomButtonProps),t.ptm("moveBottomButton")),{unstyled:t.unstyled}),{icon:g((function(){return[y(t.$slots,"movebottomicon",{},(function(){return[b(a,I(x(t.ptm("moveBottomButton").icon)),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","unstyled"]),y(t.$slots,"controlsend")],16),v("div",f({class:t.cx("container")},t.ptm("container")),[t.$slots.header?(h(),m("div",f({key:0,class:t.cx("header")},t.ptm("header")),[y(t.$slots,"header")],16)):w("",!0),b(O,f({ref:r.listRef,id:o.id+"_list",name:"p-orderlist-flip",tag:"ul",class:t.cx("list"),style:t.listStyle,role:"listbox","aria-multiselectable":"true",tabindex:t.tabindex,"aria-activedescendant":o.focused?r.focusedOptionId:void 0,"aria-label":t.ariaLabel,"aria-labelledby":t.ariaLabelledby,onFocus:r.onListFocus,onBlur:r.onListBlur,onKeydown:r.onListKeyDown},U(U({},t.listProps),t.ptm("list"))),{default:g((function(){return[(h(!0),m(S,null,D(t.modelValue,(function(i,n){return _((h(),m("li",f({key:r.getItemKey(i,n),id:o.id+"_"+n,role:"option",class:t.cx("item",{item:i,id:"".concat(o.id,"_").concat(n)}),onClick:function(t){return r.onItemClick(t,i,n)},onTouchend:e[0]||(e[0]=function(){return r.onItemTouchEnd&&r.onItemTouchEnd.apply(r,arguments)}),"aria-selected":r.isSelected(i),onMousedown:function(t){return r.onOptionMouseDown(n)}},r.getPTOptions(i,"item"),{"data-p-highlight":r.isSelected(i),"data-p-focused":"".concat(o.id,"_").concat(n)===r.focusedOptionId}),[y(t.$slots,"item",{item:i,index:n})],16,M)),[[A]])})),128))]})),_:3},16,["id","class","style","tabindex","aria-activedescendant","aria-label","aria-labelledby","onFocus","onBlur","onKeydown"])],16)],16)};export{P as default};
1
+ import t from"primevue/button";import e from"primevue/icons/angledoubledown";import i from"primevue/icons/angledoubleup";import n from"primevue/icons/angledown";import o from"primevue/icons/angleup";import r from"primevue/ripple";import{UniqueComponentId as s,ObjectUtils as l,DomHandler as c}from"primevue/utils";import d from"primevue/basecomponent";import{useStyle as a}from"primevue/usestyle";import{resolveComponent as u,resolveDirective as p,openBlock as h,createElementBlock as m,mergeProps as f,createElementVNode as v,renderSlot as y,createVNode as b,withCtx as g,normalizeProps as I,guardReactiveProps as x,createCommentVNode as w,TransitionGroup as O,Fragment as S,renderList as D,withDirectives as _}from"vue";var A=a("\n.p-orderlist {\n display: flex;\n}\n\n.p-orderlist-controls {\n display: flex;\n flex-direction: column;\n justify-content: center;\n}\n\n.p-orderlist-list-container {\n flex: 1 1 auto;\n}\n\n.p-orderlist-list {\n list-style-type: none;\n margin: 0;\n padding: 0;\n overflow: auto;\n min-height: 12rem;\n max-height: 24rem;\n}\n\n.p-orderlist-item {\n cursor: pointer;\n overflow: hidden;\n position: relative;\n}\n\n.p-orderlist.p-state-disabled .p-orderlist-item,\n.p-orderlist.p-state-disabled .p-button {\n cursor: default;\n}\n\n.p-orderlist.p-state-disabled .p-orderlist-list {\n overflow: hidden;\n}\n",{name:"orderlist",manual:!0});function $(t){return k(t)||E(t)||B(t)||K()}function K(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function B(t,e){if(t){if("string"==typeof t)return L(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?L(t,e):void 0}}function E(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function k(t){if(Array.isArray(t))return L(t)}function L(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var P={name:"OrderList",extends:{name:"BaseOrderList",extends:d,props:{modelValue:{type:Array,default:null},selection:{type:Array,default:null},dataKey:{type:String,default:null},listStyle:{type:null,default:null},metaKeySelection:{type:Boolean,default:!0},responsive:{type:Boolean,default:!0},breakpoint:{type:String,default:"960px"},stripedRows:{type:Boolean,default:!1},tabindex:{type:Number,default:0},listProps:{type:null,default:null},moveUpButtonProps:{type:null,default:null},moveTopButtonProps:{type:null,default:null},moveDownButtonProps:{type:null,default:null},moveBottomButtonProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:{root:function(t){return["p-orderlist p-component",{"p-orderlist-striped":t.props.stripedRows}]},controls:"p-orderlist-controls",header:"p-orderlist-header",container:"p-orderlist-list-container",list:"p-orderlist-list",item:function(t){var e=t.instance,i=t.id;return["p-orderlist-item",{"p-highlight":e.isSelected(t.item),"p-focus":i===e.focusedOptionId}]}},loadStyle:A.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","reorder","update:selection","selection-change","focus","blur"],itemTouched:!1,reorderDirection:null,styleElement:null,list:null,data:function(){return{id:this.$attrs.id,d_selection:this.selection,focused:!1,focusedOptionIndex:-1}},watch:{"$attrs.id":function(t){this.id=t||s()}},beforeUnmount:function(){this.destroyStyle()},updated:function(){this.reorderDirection&&(this.updateListScroll(),this.reorderDirection=null)},mounted:function(){this.id=this.id||s(),this.responsive&&this.createStyle()},methods:{getItemKey:function(t,e){return this.dataKey?l.resolveFieldData(t,this.dataKey):e},getPTOptions:function(t,e,i){return this.ptm(e,{context:{active:this.isSelected(t),focused:"".concat(this.id,"_").concat(i)===this.focusedOptionId}})},isSelected:function(t){return-1!=l.findIndexInList(t,this.d_selection)},onListFocus:function(t){var e=c.findSingle(this.list,'[data-p-highlight="true"]'),i=l.findIndexInList(e,this.list.children);this.focused=!0,this.changeFocusedOptionIndex(-1!==this.focusedOptionIndex?this.focusedOptionIndex:e?i:-1),this.$emit("focus",t)},onListBlur:function(t){this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",t)},onListKeyDown:function(t){switch(t.code){case"ArrowDown":this.onArrowDownKey(t);break;case"ArrowUp":this.onArrowUpKey(t);break;case"Home":this.onHomeKey(t);break;case"End":this.onEndKey(t);break;case"Enter":this.onEnterKey(t);break;case"Space":this.onSpaceKey(t);break;case"KeyA":t.ctrlKey&&(this.d_selection=$(this.modelValue),this.$emit("update:selection",this.d_selection))}},onOptionMouseDown:function(t){this.focused=!0,this.focusedOptionIndex=t},onArrowDownKey:function(t){var e=this.findNextOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(e),t.shiftKey&&this.onEnterKey(t),t.preventDefault()},onArrowUpKey:function(t){var e=this.findPrevOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(e),t.shiftKey&&this.onEnterKey(t),t.preventDefault()},onHomeKey:function(t){if(t.ctrlKey&&t.shiftKey){var e=c.find(this.list,'[data-pc-section="item"]'),i=c.findSingle(this.list,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),n=$(e).findIndex((function(t){return t===i}));this.d_selection=$(this.modelValue).slice(0,n+1),this.$emit("update:selection",this.d_selection)}else this.changeFocusedOptionIndex(0);t.preventDefault()},onEndKey:function(t){if(t.ctrlKey&&t.shiftKey){var e=c.find(this.list,'[data-pc-section="item"]'),i=c.findSingle(this.list,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),n=$(e).findIndex((function(t){return t===i}));this.d_selection=$(this.modelValue).slice(n,e.length),this.$emit("update:selection",this.d_selection)}else this.changeFocusedOptionIndex(c.find(this.list,'[data-pc-section="item"]').length-1);t.preventDefault()},onEnterKey:function(t){var e=c.find(this.list,'[data-pc-section="item"]'),i=c.findSingle(this.list,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),n=$(e).findIndex((function(t){return t===i}));this.onItemClick(t,this.modelValue[n],n),t.preventDefault()},onSpaceKey:function(t){if(t.shiftKey){var e=c.find(this.list,'[data-pc-section="item"]'),i=l.findIndexInList(this.d_selection[0],$(this.modelValue)),n=c.findSingle(this.list,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),o=$(e).findIndex((function(t){return t===n}));this.d_selection=$(this.modelValue).slice(Math.min(i,o),Math.max(i,o)+1),this.$emit("update:selection",this.d_selection)}else this.onEnterKey(t)},findNextOptionIndex:function(t){var e=$(c.find(this.list,'[data-pc-section="item"]')).findIndex((function(e){return e.id===t}));return e>-1?e+1:0},findPrevOptionIndex:function(t){var e=$(c.find(this.list,'[data-pc-section="item"]')).findIndex((function(e){return e.id===t}));return e>-1?e-1:0},changeFocusedOptionIndex:function(t){var e=c.find(this.list,'[data-pc-section="item"]'),i=t>=e.length?e.length-1:t<0?0:t;this.focusedOptionIndex=e[i]?e[i].getAttribute("id"):-1,this.scrollInView(this.focusedOptionIndex)},scrollInView:function(t){var e=c.findSingle(this.list,'[data-pc-section="item"][id="'.concat(t,'"]'));e&&e.scrollIntoView&&e.scrollIntoView({block:"nearest",inline:"start"})},moveUp:function(t){if(this.d_selection){for(var e=$(this.modelValue),i=0;i<this.d_selection.length;i++){var n=l.findIndexInList(this.d_selection[i],e);if(0===n)break;var o=e[n-1];e[n-1]=e[n],e[n]=o}this.reorderDirection="up",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:t,value:e,direction:this.reorderDirection})}},moveTop:function(t){if(this.d_selection){for(var e=$(this.modelValue),i=0;i<this.d_selection.length;i++){var n=l.findIndexInList(this.d_selection[i],e);if(0===n)break;var o=e.splice(n,1)[0];e.unshift(o)}this.reorderDirection="top",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:t,value:e,direction:this.reorderDirection})}},moveDown:function(t){if(this.d_selection){for(var e=$(this.modelValue),i=this.d_selection.length-1;i>=0;i--){var n=l.findIndexInList(this.d_selection[i],e);if(n===e.length-1)break;var o=e[n+1];e[n+1]=e[n],e[n]=o}this.reorderDirection="down",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:t,value:e,direction:this.reorderDirection})}},moveBottom:function(t){if(this.d_selection){for(var e=$(this.modelValue),i=this.d_selection.length-1;i>=0;i--){var n=l.findIndexInList(this.d_selection[i],e);if(n===e.length-1)break;var o=e.splice(n,1)[0];e.push(o)}this.reorderDirection="bottom",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:t,value:e,direction:this.reorderDirection})}},onItemClick:function(t,e,i){this.itemTouched=!1;var n=l.findIndexInList(e,this.d_selection),o=-1!=n,r=!this.itemTouched&&this.metaKeySelection,s=c.find(this.list,'[data-pc-section="item"]')[i].getAttribute("id");if(this.focusedOptionIndex=s,r){var d=t.metaKey||t.ctrlKey;o&&d?this.d_selection=this.d_selection.filter((function(t,e){return e!==n})):(this.d_selection=d&&this.d_selection?$(this.d_selection):[],l.insertIntoOrderedArray(e,i,this.d_selection,this.modelValue))}else o?this.d_selection=this.d_selection.filter((function(t,e){return e!==n})):(this.d_selection=this.d_selection?$(this.d_selection):[],l.insertIntoOrderedArray(e,i,this.d_selection,this.modelValue));this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:t,value:this.d_selection})},onItemTouchEnd:function(){this.itemTouched=!0},findNextItem:function(t){var e=t.nextElementSibling;return e?"item"!==c.getAttribute(e,"data-pc-section")?this.findNextItem(e):e:null},findPrevItem:function(t){var e=t.previousElementSibling;return e?"item"!==c.getAttribute(nextItem,"data-pc-section")?this.findPrevItem(e):e:null},updateListScroll:function(){var t=c.find(this.list,'[data-pc-section="item"][data-p-highlight="true"]');if(t&&t.length)switch(this.reorderDirection){case"up":c.scrollInView(this.list,t[0]);break;case"top":this.list.scrollTop=0;break;case"down":c.scrollInView(this.list,t[t.length-1]);break;case"bottom":this.list.scrollTop=this.list.scrollHeight}},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){this.$el.setAttribute(this.attributeSelector,""),this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);var t="\n@media screen and (max-width: ".concat(this.breakpoint,") {\n .p-orderlist[").concat(this.attributeSelector,"] {\n flex-direction: column;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls .p-button:last-child {\n margin-right: 0;\n }\n}\n");this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},moveDisabled:function(){if(!this.d_selection||!this.d_selection.length)return!0},listRef:function(t){this.list=t?t.$el:void 0}},computed:{attributeSelector:function(){return s()},focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null},moveUpAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveUp:void 0},moveTopAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveTop:void 0},moveDownAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveDown:void 0},moveBottomAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveBottom:void 0}},components:{OLButton:t,AngleUpIcon:o,AngleDownIcon:n,AngleDoubleUpIcon:i,AngleDoubleDownIcon:e},directives:{ripple:r}};function V(t){return V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},V(t)}function T(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function U(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?T(Object(i),!0).forEach((function(e){j(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):T(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function j(t,e,i){return(e=C(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function C(t){var e=F(t,"string");return"symbol"===V(e)?e:String(e)}function F(t,e){if("object"!==V(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!==V(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var M=["id","onClick","aria-selected","onMousedown","data-p-highlight","data-p-focused"];P.render=function(t,e,i,n,o,r){var s=u("AngleUpIcon"),l=u("OLButton"),c=u("AngleDoubleUpIcon"),d=u("AngleDownIcon"),a=u("AngleDoubleDownIcon"),A=p("ripple");return h(),m("div",f({class:t.cx("root")},t.ptm("root")),[v("div",f({class:t.cx("controls")},t.ptm("controls")),[y(t.$slots,"controlsstart"),b(l,f({type:"button",onClick:r.moveUp,"aria-label":r.moveUpAriaLabel,disabled:r.moveDisabled(),pt:t.ptm("moveUpButton")},t.moveUpButtonProps,{unstyled:t.unstyled}),{icon:g((function(){return[y(t.$slots,"moveupicon",{},(function(){return[b(s,I(x(t.ptm("moveUpButton").icon)),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),b(l,f({type:"button",onClick:r.moveTop,"aria-label":r.moveTopAriaLabel,disabled:r.moveDisabled(),pt:t.ptm("moveTopButton")},t.ptm("moveTopButton"),{unstyled:t.unstyled}),{icon:g((function(){return[y(t.$slots,"movetopicon",{},(function(){return[b(c,I(x(t.ptm("moveTopButton").icon)),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),b(l,f({type:"button",onClick:r.moveDown,"aria-label":r.moveDownAriaLabel,disabled:r.moveDisabled(),pt:t.ptm("moveDownButton")},t.moveDownButtonProps,{unstyled:t.unstyled}),{icon:g((function(){return[y(t.$slots,"movedownicon",{},(function(){return[b(d,I(x(t.ptm("moveDownButton").icon)),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),b(l,f({type:"button",onClick:r.moveBottom,"aria-label":r.moveBottomAriaLabel,disabled:r.moveDisabled(),pt:t.ptm("moveBottomButton")},t.moveBottomButtonProps,{unstyled:t.unstyled}),{icon:g((function(){return[y(t.$slots,"movebottomicon",{},(function(){return[b(a,I(x(t.ptm("moveBottomButton").icon)),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),y(t.$slots,"controlsend")],16),v("div",f({class:t.cx("container")},t.ptm("container")),[t.$slots.header?(h(),m("div",f({key:0,class:t.cx("header")},t.ptm("header")),[y(t.$slots,"header")],16)):w("",!0),b(O,f({ref:r.listRef,id:o.id+"_list",name:"p-orderlist-flip",tag:"ul",class:t.cx("list"),style:t.listStyle,role:"listbox","aria-multiselectable":"true",tabindex:t.tabindex,"aria-activedescendant":o.focused?r.focusedOptionId:void 0,"aria-label":t.ariaLabel,"aria-labelledby":t.ariaLabelledby,onFocus:r.onListFocus,onBlur:r.onListBlur,onKeydown:r.onListKeyDown},U(U({},t.listProps),t.ptm("list"))),{default:g((function(){return[(h(!0),m(S,null,D(t.modelValue,(function(i,n){return _((h(),m("li",f({key:r.getItemKey(i,n),id:o.id+"_"+n,role:"option",class:t.cx("item",{item:i,id:"".concat(o.id,"_").concat(n)}),onClick:function(t){return r.onItemClick(t,i,n)},onTouchend:e[0]||(e[0]=function(){return r.onItemTouchEnd&&r.onItemTouchEnd.apply(r,arguments)}),"aria-selected":r.isSelected(i),onMousedown:function(t){return r.onOptionMouseDown(n)}},r.getPTOptions(i,"item",n),{"data-p-highlight":r.isSelected(i),"data-p-focused":"".concat(o.id,"_").concat(n)===r.focusedOptionId}),[y(t.$slots,"item",{item:i,index:n})],16,M)),[[A]])})),128))]})),_:3},16,["id","class","style","tabindex","aria-activedescendant","aria-label","aria-labelledby","onFocus","onBlur","onKeydown"])],16)],16)};export{P as default};
@@ -165,11 +165,11 @@ this.primevue.orderlist = (function (Button, AngleDoubleDownIcon, AngleDoubleUpI
165
165
  getItemKey: function getItemKey(item, index) {
166
166
  return this.dataKey ? utils.ObjectUtils.resolveFieldData(item, this.dataKey) : index;
167
167
  },
168
- getPTOptions: function getPTOptions(item, key) {
168
+ getPTOptions: function getPTOptions(item, key, index) {
169
169
  return this.ptm(key, {
170
170
  context: {
171
171
  active: this.isSelected(item),
172
- focused: this.id === this.focusedOptionId
172
+ focused: "".concat(this.id, "_").concat(index) === this.focusedOptionId
173
173
  }
174
174
  });
175
175
  },
@@ -550,8 +550,9 @@ this.primevue.orderlist = (function (Button, AngleDoubleDownIcon, AngleDoubleUpI
550
550
  type: "button",
551
551
  onClick: $options.moveUp,
552
552
  "aria-label": $options.moveUpAriaLabel,
553
- disabled: $options.moveDisabled()
554
- }, _objectSpread(_objectSpread({}, _ctx.moveUpButtonProps), _ctx.ptm('moveUpButton')), {
553
+ disabled: $options.moveDisabled(),
554
+ pt: _ctx.ptm('moveUpButton')
555
+ }, _ctx.moveUpButtonProps, {
555
556
  unstyled: _ctx.unstyled
556
557
  }), {
557
558
  icon: vue.withCtx(function () {
@@ -560,12 +561,13 @@ this.primevue.orderlist = (function (Button, AngleDoubleDownIcon, AngleDoubleUpI
560
561
  })];
561
562
  }),
562
563
  _: 3
563
- }, 16, ["onClick", "aria-label", "disabled", "unstyled"]), vue.createVNode(_component_OLButton, vue.mergeProps({
564
+ }, 16, ["onClick", "aria-label", "disabled", "pt", "unstyled"]), vue.createVNode(_component_OLButton, vue.mergeProps({
564
565
  type: "button",
565
566
  onClick: $options.moveTop,
566
567
  "aria-label": $options.moveTopAriaLabel,
567
- disabled: $options.moveDisabled()
568
- }, _objectSpread(_objectSpread({}, _ctx.moveTopButtonProps), _ctx.ptm('moveTopButton')), {
568
+ disabled: $options.moveDisabled(),
569
+ pt: _ctx.ptm('moveTopButton')
570
+ }, _ctx.ptm('moveTopButton'), {
569
571
  unstyled: _ctx.unstyled
570
572
  }), {
571
573
  icon: vue.withCtx(function () {
@@ -574,12 +576,13 @@ this.primevue.orderlist = (function (Button, AngleDoubleDownIcon, AngleDoubleUpI
574
576
  })];
575
577
  }),
576
578
  _: 3
577
- }, 16, ["onClick", "aria-label", "disabled", "unstyled"]), vue.createVNode(_component_OLButton, vue.mergeProps({
579
+ }, 16, ["onClick", "aria-label", "disabled", "pt", "unstyled"]), vue.createVNode(_component_OLButton, vue.mergeProps({
578
580
  type: "button",
579
581
  onClick: $options.moveDown,
580
582
  "aria-label": $options.moveDownAriaLabel,
581
- disabled: $options.moveDisabled()
582
- }, _objectSpread(_objectSpread({}, _ctx.moveDownButtonProps), _ctx.ptm('moveDownButton')), {
583
+ disabled: $options.moveDisabled(),
584
+ pt: _ctx.ptm('moveDownButton')
585
+ }, _ctx.moveDownButtonProps, {
583
586
  unstyled: _ctx.unstyled
584
587
  }), {
585
588
  icon: vue.withCtx(function () {
@@ -588,12 +591,13 @@ this.primevue.orderlist = (function (Button, AngleDoubleDownIcon, AngleDoubleUpI
588
591
  })];
589
592
  }),
590
593
  _: 3
591
- }, 16, ["onClick", "aria-label", "disabled", "unstyled"]), vue.createVNode(_component_OLButton, vue.mergeProps({
594
+ }, 16, ["onClick", "aria-label", "disabled", "pt", "unstyled"]), vue.createVNode(_component_OLButton, vue.mergeProps({
592
595
  type: "button",
593
596
  onClick: $options.moveBottom,
594
597
  "aria-label": $options.moveBottomAriaLabel,
595
- disabled: $options.moveDisabled()
596
- }, _objectSpread(_objectSpread({}, _ctx.moveBottomButtonProps), _ctx.ptm('moveBottomButton')), {
598
+ disabled: $options.moveDisabled(),
599
+ pt: _ctx.ptm('moveBottomButton')
600
+ }, _ctx.moveBottomButtonProps, {
597
601
  unstyled: _ctx.unstyled
598
602
  }), {
599
603
  icon: vue.withCtx(function () {
@@ -602,7 +606,7 @@ this.primevue.orderlist = (function (Button, AngleDoubleDownIcon, AngleDoubleUpI
602
606
  })];
603
607
  }),
604
608
  _: 3
605
- }, 16, ["onClick", "aria-label", "disabled", "unstyled"]), vue.renderSlot(_ctx.$slots, "controlsend")], 16), vue.createElementVNode("div", vue.mergeProps({
609
+ }, 16, ["onClick", "aria-label", "disabled", "pt", "unstyled"]), vue.renderSlot(_ctx.$slots, "controlsend")], 16), vue.createElementVNode("div", vue.mergeProps({
606
610
  "class": _ctx.cx('container')
607
611
  }, _ctx.ptm('container')), [_ctx.$slots.header ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
608
612
  key: 0,
@@ -644,7 +648,7 @@ this.primevue.orderlist = (function (Button, AngleDoubleDownIcon, AngleDoubleUpI
644
648
  onMousedown: function onMousedown($event) {
645
649
  return $options.onOptionMouseDown(i);
646
650
  }
647
- }, $options.getPTOptions(item, 'item'), {
651
+ }, $options.getPTOptions(item, 'item', i), {
648
652
  "data-p-highlight": $options.isSelected(item),
649
653
  "data-p-focused": "".concat($data.id, "_").concat(i) === $options.focusedOptionId
650
654
  }), [vue.renderSlot(_ctx.$slots, "item", {
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.orderlist=function(e,t,n,i,o,r,l,s,d,a){"use strict";function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=c(e),p=c(t),m=c(n),h=c(i),f=c(o),v=c(r),b=c(s),y=d.useStyle("\n.p-orderlist {\n display: flex;\n}\n\n.p-orderlist-controls {\n display: flex;\n flex-direction: column;\n justify-content: center;\n}\n\n.p-orderlist-list-container {\n flex: 1 1 auto;\n}\n\n.p-orderlist-list {\n list-style-type: none;\n margin: 0;\n padding: 0;\n overflow: auto;\n min-height: 12rem;\n max-height: 24rem;\n}\n\n.p-orderlist-item {\n cursor: pointer;\n overflow: hidden;\n position: relative;\n}\n\n.p-orderlist.p-state-disabled .p-orderlist-item,\n.p-orderlist.p-state-disabled .p-button {\n cursor: default;\n}\n\n.p-orderlist.p-state-disabled .p-orderlist-list {\n overflow: hidden;\n}\n",{name:"orderlist",manual:!0});function g(e){return O(e)||D(e)||x(e)||I()}function I(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function x(e,t){if(e){if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(e,t):void 0}}function D(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function O(e){if(Array.isArray(e))return w(e)}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var S={name:"OrderList",extends:{name:"BaseOrderList",extends:b.default,props:{modelValue:{type:Array,default:null},selection:{type:Array,default:null},dataKey:{type:String,default:null},listStyle:{type:null,default:null},metaKeySelection:{type:Boolean,default:!0},responsive:{type:Boolean,default:!0},breakpoint:{type:String,default:"960px"},stripedRows:{type:Boolean,default:!1},tabindex:{type:Number,default:0},listProps:{type:null,default:null},moveUpButtonProps:{type:null,default:null},moveTopButtonProps:{type:null,default:null},moveDownButtonProps:{type:null,default:null},moveBottomButtonProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:{root:function(e){return["p-orderlist p-component",{"p-orderlist-striped":e.props.stripedRows}]},controls:"p-orderlist-controls",header:"p-orderlist-header",container:"p-orderlist-list-container",list:"p-orderlist-list",item:function(e){var t=e.instance,n=e.id;return["p-orderlist-item",{"p-highlight":t.isSelected(e.item),"p-focus":n===t.focusedOptionId}]}},loadStyle:y.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","reorder","update:selection","selection-change","focus","blur"],itemTouched:!1,reorderDirection:null,styleElement:null,list:null,data:function(){return{id:this.$attrs.id,d_selection:this.selection,focused:!1,focusedOptionIndex:-1}},watch:{"$attrs.id":function(e){this.id=e||l.UniqueComponentId()}},beforeUnmount:function(){this.destroyStyle()},updated:function(){this.reorderDirection&&(this.updateListScroll(),this.reorderDirection=null)},mounted:function(){this.id=this.id||l.UniqueComponentId(),this.responsive&&this.createStyle()},methods:{getItemKey:function(e,t){return this.dataKey?l.ObjectUtils.resolveFieldData(e,this.dataKey):t},getPTOptions:function(e,t){return this.ptm(t,{context:{active:this.isSelected(e),focused:this.id===this.focusedOptionId}})},isSelected:function(e){return-1!=l.ObjectUtils.findIndexInList(e,this.d_selection)},onListFocus:function(e){var t=l.DomHandler.findSingle(this.list,'[data-p-highlight="true"]'),n=l.ObjectUtils.findIndexInList(t,this.list.children);this.focused=!0,this.changeFocusedOptionIndex(-1!==this.focusedOptionIndex?this.focusedOptionIndex:t?n:-1),this.$emit("focus",e)},onListBlur:function(e){this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onListKeyDown:function(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Enter":this.onEnterKey(e);break;case"Space":this.onSpaceKey(e);break;case"KeyA":e.ctrlKey&&(this.d_selection=g(this.modelValue),this.$emit("update:selection",this.d_selection))}},onOptionMouseDown:function(e){this.focused=!0,this.focusedOptionIndex=e},onArrowDownKey:function(e){var t=this.findNextOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(t),e.shiftKey&&this.onEnterKey(e),e.preventDefault()},onArrowUpKey:function(e){var t=this.findPrevOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(t),e.shiftKey&&this.onEnterKey(e),e.preventDefault()},onHomeKey:function(e){if(e.ctrlKey&&e.shiftKey){var t=l.DomHandler.find(this.list,'[data-pc-section="item"]'),n=l.DomHandler.findSingle(this.list,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),i=g(t).findIndex((function(e){return e===n}));this.d_selection=g(this.modelValue).slice(0,i+1),this.$emit("update:selection",this.d_selection)}else this.changeFocusedOptionIndex(0);e.preventDefault()},onEndKey:function(e){if(e.ctrlKey&&e.shiftKey){var t=l.DomHandler.find(this.list,'[data-pc-section="item"]'),n=l.DomHandler.findSingle(this.list,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),i=g(t).findIndex((function(e){return e===n}));this.d_selection=g(this.modelValue).slice(i,t.length),this.$emit("update:selection",this.d_selection)}else this.changeFocusedOptionIndex(l.DomHandler.find(this.list,'[data-pc-section="item"]').length-1);e.preventDefault()},onEnterKey:function(e){var t=l.DomHandler.find(this.list,'[data-pc-section="item"]'),n=l.DomHandler.findSingle(this.list,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),i=g(t).findIndex((function(e){return e===n}));this.onItemClick(e,this.modelValue[i],i),e.preventDefault()},onSpaceKey:function(e){if(e.shiftKey){var t=l.DomHandler.find(this.list,'[data-pc-section="item"]'),n=l.ObjectUtils.findIndexInList(this.d_selection[0],g(this.modelValue)),i=l.DomHandler.findSingle(this.list,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),o=g(t).findIndex((function(e){return e===i}));this.d_selection=g(this.modelValue).slice(Math.min(n,o),Math.max(n,o)+1),this.$emit("update:selection",this.d_selection)}else this.onEnterKey(e)},findNextOptionIndex:function(e){var t=g(l.DomHandler.find(this.list,'[data-pc-section="item"]')).findIndex((function(t){return t.id===e}));return t>-1?t+1:0},findPrevOptionIndex:function(e){var t=g(l.DomHandler.find(this.list,'[data-pc-section="item"]')).findIndex((function(t){return t.id===e}));return t>-1?t-1:0},changeFocusedOptionIndex:function(e){var t=l.DomHandler.find(this.list,'[data-pc-section="item"]'),n=e>=t.length?t.length-1:e<0?0:e;this.focusedOptionIndex=t[n]?t[n].getAttribute("id"):-1,this.scrollInView(this.focusedOptionIndex)},scrollInView:function(e){var t=l.DomHandler.findSingle(this.list,'[data-pc-section="item"][id="'.concat(e,'"]'));t&&t.scrollIntoView&&t.scrollIntoView({block:"nearest",inline:"start"})},moveUp:function(e){if(this.d_selection){for(var t=g(this.modelValue),n=0;n<this.d_selection.length;n++){var i=l.ObjectUtils.findIndexInList(this.d_selection[n],t);if(0===i)break;var o=t[i-1];t[i-1]=t[i],t[i]=o}this.reorderDirection="up",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},moveTop:function(e){if(this.d_selection){for(var t=g(this.modelValue),n=0;n<this.d_selection.length;n++){var i=l.ObjectUtils.findIndexInList(this.d_selection[n],t);if(0===i)break;var o=t.splice(i,1)[0];t.unshift(o)}this.reorderDirection="top",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},moveDown:function(e){if(this.d_selection){for(var t=g(this.modelValue),n=this.d_selection.length-1;n>=0;n--){var i=l.ObjectUtils.findIndexInList(this.d_selection[n],t);if(i===t.length-1)break;var o=t[i+1];t[i+1]=t[i],t[i]=o}this.reorderDirection="down",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},moveBottom:function(e){if(this.d_selection){for(var t=g(this.modelValue),n=this.d_selection.length-1;n>=0;n--){var i=l.ObjectUtils.findIndexInList(this.d_selection[n],t);if(i===t.length-1)break;var o=t.splice(i,1)[0];t.push(o)}this.reorderDirection="bottom",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},onItemClick:function(e,t,n){this.itemTouched=!1;var i=l.ObjectUtils.findIndexInList(t,this.d_selection),o=-1!=i,r=!this.itemTouched&&this.metaKeySelection,s=l.DomHandler.find(this.list,'[data-pc-section="item"]')[n].getAttribute("id");if(this.focusedOptionIndex=s,r){var d=e.metaKey||e.ctrlKey;o&&d?this.d_selection=this.d_selection.filter((function(e,t){return t!==i})):(this.d_selection=d&&this.d_selection?g(this.d_selection):[],l.ObjectUtils.insertIntoOrderedArray(t,n,this.d_selection,this.modelValue))}else o?this.d_selection=this.d_selection.filter((function(e,t){return t!==i})):(this.d_selection=this.d_selection?g(this.d_selection):[],l.ObjectUtils.insertIntoOrderedArray(t,n,this.d_selection,this.modelValue));this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},onItemTouchEnd:function(){this.itemTouched=!0},findNextItem:function(e){var t=e.nextElementSibling;return t?"item"!==l.DomHandler.getAttribute(t,"data-pc-section")?this.findNextItem(t):t:null},findPrevItem:function(e){var t=e.previousElementSibling;return t?"item"!==l.DomHandler.getAttribute(nextItem,"data-pc-section")?this.findPrevItem(t):t:null},updateListScroll:function(){var e=l.DomHandler.find(this.list,'[data-pc-section="item"][data-p-highlight="true"]');if(e&&e.length)switch(this.reorderDirection){case"up":l.DomHandler.scrollInView(this.list,e[0]);break;case"top":this.list.scrollTop=0;break;case"down":l.DomHandler.scrollInView(this.list,e[e.length-1]);break;case"bottom":this.list.scrollTop=this.list.scrollHeight}},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){this.$el.setAttribute(this.attributeSelector,""),this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);var e="\n@media screen and (max-width: ".concat(this.breakpoint,") {\n .p-orderlist[").concat(this.attributeSelector,"] {\n flex-direction: column;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls .p-button:last-child {\n margin-right: 0;\n }\n}\n");this.styleElement.innerHTML=e}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},moveDisabled:function(){if(!this.d_selection||!this.d_selection.length)return!0},listRef:function(e){this.list=e?e.$el:void 0}},computed:{attributeSelector:function(){return l.UniqueComponentId()},focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null},moveUpAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveUp:void 0},moveTopAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveTop:void 0},moveDownAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveDown:void 0},moveBottomAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveBottom:void 0}},components:{OLButton:u.default,AngleUpIcon:f.default,AngleDownIcon:h.default,AngleDoubleUpIcon:m.default,AngleDoubleDownIcon:p.default},directives:{ripple:v.default}};function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(e,t,n){return(t=A(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A(e){var t=E(e,"string");return"symbol"===_(t)?t:String(t)}function E(e,t){if("object"!==_(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==_(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var $=["id","onClick","aria-selected","onMousedown","data-p-highlight","data-p-focused"];return S.render=function(e,t,n,i,o,r){var l=a.resolveComponent("AngleUpIcon"),s=a.resolveComponent("OLButton"),d=a.resolveComponent("AngleDoubleUpIcon"),c=a.resolveComponent("AngleDownIcon"),u=a.resolveComponent("AngleDoubleDownIcon"),p=a.resolveDirective("ripple");return a.openBlock(),a.createElementBlock("div",a.mergeProps({class:e.cx("root")},e.ptm("root")),[a.createElementVNode("div",a.mergeProps({class:e.cx("controls")},e.ptm("controls")),[a.renderSlot(e.$slots,"controlsstart"),a.createVNode(s,a.mergeProps({type:"button",onClick:r.moveUp,"aria-label":r.moveUpAriaLabel,disabled:r.moveDisabled()},B(B({},e.moveUpButtonProps),e.ptm("moveUpButton")),{unstyled:e.unstyled}),{icon:a.withCtx((function(){return[a.renderSlot(e.$slots,"moveupicon",{},(function(){return[a.createVNode(l,a.normalizeProps(a.guardReactiveProps(e.ptm("moveUpButton").icon)),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","unstyled"]),a.createVNode(s,a.mergeProps({type:"button",onClick:r.moveTop,"aria-label":r.moveTopAriaLabel,disabled:r.moveDisabled()},B(B({},e.moveTopButtonProps),e.ptm("moveTopButton")),{unstyled:e.unstyled}),{icon:a.withCtx((function(){return[a.renderSlot(e.$slots,"movetopicon",{},(function(){return[a.createVNode(d,a.normalizeProps(a.guardReactiveProps(e.ptm("moveTopButton").icon)),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","unstyled"]),a.createVNode(s,a.mergeProps({type:"button",onClick:r.moveDown,"aria-label":r.moveDownAriaLabel,disabled:r.moveDisabled()},B(B({},e.moveDownButtonProps),e.ptm("moveDownButton")),{unstyled:e.unstyled}),{icon:a.withCtx((function(){return[a.renderSlot(e.$slots,"movedownicon",{},(function(){return[a.createVNode(c,a.normalizeProps(a.guardReactiveProps(e.ptm("moveDownButton").icon)),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","unstyled"]),a.createVNode(s,a.mergeProps({type:"button",onClick:r.moveBottom,"aria-label":r.moveBottomAriaLabel,disabled:r.moveDisabled()},B(B({},e.moveBottomButtonProps),e.ptm("moveBottomButton")),{unstyled:e.unstyled}),{icon:a.withCtx((function(){return[a.renderSlot(e.$slots,"movebottomicon",{},(function(){return[a.createVNode(u,a.normalizeProps(a.guardReactiveProps(e.ptm("moveBottomButton").icon)),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","unstyled"]),a.renderSlot(e.$slots,"controlsend")],16),a.createElementVNode("div",a.mergeProps({class:e.cx("container")},e.ptm("container")),[e.$slots.header?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,class:e.cx("header")},e.ptm("header")),[a.renderSlot(e.$slots,"header")],16)):a.createCommentVNode("",!0),a.createVNode(a.TransitionGroup,a.mergeProps({ref:r.listRef,id:o.id+"_list",name:"p-orderlist-flip",tag:"ul",class:e.cx("list"),style:e.listStyle,role:"listbox","aria-multiselectable":"true",tabindex:e.tabindex,"aria-activedescendant":o.focused?r.focusedOptionId:void 0,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,onFocus:r.onListFocus,onBlur:r.onListBlur,onKeydown:r.onListKeyDown},B(B({},e.listProps),e.ptm("list"))),{default:a.withCtx((function(){return[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.modelValue,(function(n,i){return a.withDirectives((a.openBlock(),a.createElementBlock("li",a.mergeProps({key:r.getItemKey(n,i),id:o.id+"_"+i,role:"option",class:e.cx("item",{item:n,id:"".concat(o.id,"_").concat(i)}),onClick:function(e){return r.onItemClick(e,n,i)},onTouchend:t[0]||(t[0]=function(){return r.onItemTouchEnd&&r.onItemTouchEnd.apply(r,arguments)}),"aria-selected":r.isSelected(n),onMousedown:function(e){return r.onOptionMouseDown(i)}},r.getPTOptions(n,"item"),{"data-p-highlight":r.isSelected(n),"data-p-focused":"".concat(o.id,"_").concat(i)===r.focusedOptionId}),[a.renderSlot(e.$slots,"item",{item:n,index:i})],16,$)),[[p]])})),128))]})),_:3},16,["id","class","style","tabindex","aria-activedescendant","aria-label","aria-labelledby","onFocus","onBlur","onKeydown"])],16)],16)},S}(primevue.button,primevue.icons.angledoubledown,primevue.icons.angledoubleup,primevue.icons.angledown,primevue.icons.angleup,primevue.ripple,primevue.utils,primevue.basecomponent,primevue.usestyle,Vue);
1
+ this.primevue=this.primevue||{},this.primevue.orderlist=function(e,t,n,i,o,r,l,s,d,a){"use strict";function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=c(e),p=c(t),m=c(n),h=c(i),f=c(o),v=c(r),b=c(s),y=d.useStyle("\n.p-orderlist {\n display: flex;\n}\n\n.p-orderlist-controls {\n display: flex;\n flex-direction: column;\n justify-content: center;\n}\n\n.p-orderlist-list-container {\n flex: 1 1 auto;\n}\n\n.p-orderlist-list {\n list-style-type: none;\n margin: 0;\n padding: 0;\n overflow: auto;\n min-height: 12rem;\n max-height: 24rem;\n}\n\n.p-orderlist-item {\n cursor: pointer;\n overflow: hidden;\n position: relative;\n}\n\n.p-orderlist.p-state-disabled .p-orderlist-item,\n.p-orderlist.p-state-disabled .p-button {\n cursor: default;\n}\n\n.p-orderlist.p-state-disabled .p-orderlist-list {\n overflow: hidden;\n}\n",{name:"orderlist",manual:!0});function g(e){return O(e)||D(e)||x(e)||I()}function I(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function x(e,t){if(e){if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(e,t):void 0}}function D(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function O(e){if(Array.isArray(e))return w(e)}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var S={name:"OrderList",extends:{name:"BaseOrderList",extends:b.default,props:{modelValue:{type:Array,default:null},selection:{type:Array,default:null},dataKey:{type:String,default:null},listStyle:{type:null,default:null},metaKeySelection:{type:Boolean,default:!0},responsive:{type:Boolean,default:!0},breakpoint:{type:String,default:"960px"},stripedRows:{type:Boolean,default:!1},tabindex:{type:Number,default:0},listProps:{type:null,default:null},moveUpButtonProps:{type:null,default:null},moveTopButtonProps:{type:null,default:null},moveDownButtonProps:{type:null,default:null},moveBottomButtonProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:{root:function(e){return["p-orderlist p-component",{"p-orderlist-striped":e.props.stripedRows}]},controls:"p-orderlist-controls",header:"p-orderlist-header",container:"p-orderlist-list-container",list:"p-orderlist-list",item:function(e){var t=e.instance,n=e.id;return["p-orderlist-item",{"p-highlight":t.isSelected(e.item),"p-focus":n===t.focusedOptionId}]}},loadStyle:y.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","reorder","update:selection","selection-change","focus","blur"],itemTouched:!1,reorderDirection:null,styleElement:null,list:null,data:function(){return{id:this.$attrs.id,d_selection:this.selection,focused:!1,focusedOptionIndex:-1}},watch:{"$attrs.id":function(e){this.id=e||l.UniqueComponentId()}},beforeUnmount:function(){this.destroyStyle()},updated:function(){this.reorderDirection&&(this.updateListScroll(),this.reorderDirection=null)},mounted:function(){this.id=this.id||l.UniqueComponentId(),this.responsive&&this.createStyle()},methods:{getItemKey:function(e,t){return this.dataKey?l.ObjectUtils.resolveFieldData(e,this.dataKey):t},getPTOptions:function(e,t,n){return this.ptm(t,{context:{active:this.isSelected(e),focused:"".concat(this.id,"_").concat(n)===this.focusedOptionId}})},isSelected:function(e){return-1!=l.ObjectUtils.findIndexInList(e,this.d_selection)},onListFocus:function(e){var t=l.DomHandler.findSingle(this.list,'[data-p-highlight="true"]'),n=l.ObjectUtils.findIndexInList(t,this.list.children);this.focused=!0,this.changeFocusedOptionIndex(-1!==this.focusedOptionIndex?this.focusedOptionIndex:t?n:-1),this.$emit("focus",e)},onListBlur:function(e){this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onListKeyDown:function(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Enter":this.onEnterKey(e);break;case"Space":this.onSpaceKey(e);break;case"KeyA":e.ctrlKey&&(this.d_selection=g(this.modelValue),this.$emit("update:selection",this.d_selection))}},onOptionMouseDown:function(e){this.focused=!0,this.focusedOptionIndex=e},onArrowDownKey:function(e){var t=this.findNextOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(t),e.shiftKey&&this.onEnterKey(e),e.preventDefault()},onArrowUpKey:function(e){var t=this.findPrevOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(t),e.shiftKey&&this.onEnterKey(e),e.preventDefault()},onHomeKey:function(e){if(e.ctrlKey&&e.shiftKey){var t=l.DomHandler.find(this.list,'[data-pc-section="item"]'),n=l.DomHandler.findSingle(this.list,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),i=g(t).findIndex((function(e){return e===n}));this.d_selection=g(this.modelValue).slice(0,i+1),this.$emit("update:selection",this.d_selection)}else this.changeFocusedOptionIndex(0);e.preventDefault()},onEndKey:function(e){if(e.ctrlKey&&e.shiftKey){var t=l.DomHandler.find(this.list,'[data-pc-section="item"]'),n=l.DomHandler.findSingle(this.list,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),i=g(t).findIndex((function(e){return e===n}));this.d_selection=g(this.modelValue).slice(i,t.length),this.$emit("update:selection",this.d_selection)}else this.changeFocusedOptionIndex(l.DomHandler.find(this.list,'[data-pc-section="item"]').length-1);e.preventDefault()},onEnterKey:function(e){var t=l.DomHandler.find(this.list,'[data-pc-section="item"]'),n=l.DomHandler.findSingle(this.list,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),i=g(t).findIndex((function(e){return e===n}));this.onItemClick(e,this.modelValue[i],i),e.preventDefault()},onSpaceKey:function(e){if(e.shiftKey){var t=l.DomHandler.find(this.list,'[data-pc-section="item"]'),n=l.ObjectUtils.findIndexInList(this.d_selection[0],g(this.modelValue)),i=l.DomHandler.findSingle(this.list,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),o=g(t).findIndex((function(e){return e===i}));this.d_selection=g(this.modelValue).slice(Math.min(n,o),Math.max(n,o)+1),this.$emit("update:selection",this.d_selection)}else this.onEnterKey(e)},findNextOptionIndex:function(e){var t=g(l.DomHandler.find(this.list,'[data-pc-section="item"]')).findIndex((function(t){return t.id===e}));return t>-1?t+1:0},findPrevOptionIndex:function(e){var t=g(l.DomHandler.find(this.list,'[data-pc-section="item"]')).findIndex((function(t){return t.id===e}));return t>-1?t-1:0},changeFocusedOptionIndex:function(e){var t=l.DomHandler.find(this.list,'[data-pc-section="item"]'),n=e>=t.length?t.length-1:e<0?0:e;this.focusedOptionIndex=t[n]?t[n].getAttribute("id"):-1,this.scrollInView(this.focusedOptionIndex)},scrollInView:function(e){var t=l.DomHandler.findSingle(this.list,'[data-pc-section="item"][id="'.concat(e,'"]'));t&&t.scrollIntoView&&t.scrollIntoView({block:"nearest",inline:"start"})},moveUp:function(e){if(this.d_selection){for(var t=g(this.modelValue),n=0;n<this.d_selection.length;n++){var i=l.ObjectUtils.findIndexInList(this.d_selection[n],t);if(0===i)break;var o=t[i-1];t[i-1]=t[i],t[i]=o}this.reorderDirection="up",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},moveTop:function(e){if(this.d_selection){for(var t=g(this.modelValue),n=0;n<this.d_selection.length;n++){var i=l.ObjectUtils.findIndexInList(this.d_selection[n],t);if(0===i)break;var o=t.splice(i,1)[0];t.unshift(o)}this.reorderDirection="top",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},moveDown:function(e){if(this.d_selection){for(var t=g(this.modelValue),n=this.d_selection.length-1;n>=0;n--){var i=l.ObjectUtils.findIndexInList(this.d_selection[n],t);if(i===t.length-1)break;var o=t[i+1];t[i+1]=t[i],t[i]=o}this.reorderDirection="down",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},moveBottom:function(e){if(this.d_selection){for(var t=g(this.modelValue),n=this.d_selection.length-1;n>=0;n--){var i=l.ObjectUtils.findIndexInList(this.d_selection[n],t);if(i===t.length-1)break;var o=t.splice(i,1)[0];t.push(o)}this.reorderDirection="bottom",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},onItemClick:function(e,t,n){this.itemTouched=!1;var i=l.ObjectUtils.findIndexInList(t,this.d_selection),o=-1!=i,r=!this.itemTouched&&this.metaKeySelection,s=l.DomHandler.find(this.list,'[data-pc-section="item"]')[n].getAttribute("id");if(this.focusedOptionIndex=s,r){var d=e.metaKey||e.ctrlKey;o&&d?this.d_selection=this.d_selection.filter((function(e,t){return t!==i})):(this.d_selection=d&&this.d_selection?g(this.d_selection):[],l.ObjectUtils.insertIntoOrderedArray(t,n,this.d_selection,this.modelValue))}else o?this.d_selection=this.d_selection.filter((function(e,t){return t!==i})):(this.d_selection=this.d_selection?g(this.d_selection):[],l.ObjectUtils.insertIntoOrderedArray(t,n,this.d_selection,this.modelValue));this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},onItemTouchEnd:function(){this.itemTouched=!0},findNextItem:function(e){var t=e.nextElementSibling;return t?"item"!==l.DomHandler.getAttribute(t,"data-pc-section")?this.findNextItem(t):t:null},findPrevItem:function(e){var t=e.previousElementSibling;return t?"item"!==l.DomHandler.getAttribute(nextItem,"data-pc-section")?this.findPrevItem(t):t:null},updateListScroll:function(){var e=l.DomHandler.find(this.list,'[data-pc-section="item"][data-p-highlight="true"]');if(e&&e.length)switch(this.reorderDirection){case"up":l.DomHandler.scrollInView(this.list,e[0]);break;case"top":this.list.scrollTop=0;break;case"down":l.DomHandler.scrollInView(this.list,e[e.length-1]);break;case"bottom":this.list.scrollTop=this.list.scrollHeight}},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){this.$el.setAttribute(this.attributeSelector,""),this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);var e="\n@media screen and (max-width: ".concat(this.breakpoint,") {\n .p-orderlist[").concat(this.attributeSelector,"] {\n flex-direction: column;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls .p-button:last-child {\n margin-right: 0;\n }\n}\n");this.styleElement.innerHTML=e}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},moveDisabled:function(){if(!this.d_selection||!this.d_selection.length)return!0},listRef:function(e){this.list=e?e.$el:void 0}},computed:{attributeSelector:function(){return l.UniqueComponentId()},focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null},moveUpAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveUp:void 0},moveTopAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveTop:void 0},moveDownAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveDown:void 0},moveBottomAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveBottom:void 0}},components:{OLButton:u.default,AngleUpIcon:f.default,AngleDownIcon:h.default,AngleDoubleUpIcon:m.default,AngleDoubleDownIcon:p.default},directives:{ripple:v.default}};function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(e,t,n){return(t=A(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A(e){var t=E(e,"string");return"symbol"===_(t)?t:String(t)}function E(e,t){if("object"!==_(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==_(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var $=["id","onClick","aria-selected","onMousedown","data-p-highlight","data-p-focused"];return S.render=function(e,t,n,i,o,r){var l=a.resolveComponent("AngleUpIcon"),s=a.resolveComponent("OLButton"),d=a.resolveComponent("AngleDoubleUpIcon"),c=a.resolveComponent("AngleDownIcon"),u=a.resolveComponent("AngleDoubleDownIcon"),p=a.resolveDirective("ripple");return a.openBlock(),a.createElementBlock("div",a.mergeProps({class:e.cx("root")},e.ptm("root")),[a.createElementVNode("div",a.mergeProps({class:e.cx("controls")},e.ptm("controls")),[a.renderSlot(e.$slots,"controlsstart"),a.createVNode(s,a.mergeProps({type:"button",onClick:r.moveUp,"aria-label":r.moveUpAriaLabel,disabled:r.moveDisabled(),pt:e.ptm("moveUpButton")},e.moveUpButtonProps,{unstyled:e.unstyled}),{icon:a.withCtx((function(){return[a.renderSlot(e.$slots,"moveupicon",{},(function(){return[a.createVNode(l,a.normalizeProps(a.guardReactiveProps(e.ptm("moveUpButton").icon)),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),a.createVNode(s,a.mergeProps({type:"button",onClick:r.moveTop,"aria-label":r.moveTopAriaLabel,disabled:r.moveDisabled(),pt:e.ptm("moveTopButton")},e.ptm("moveTopButton"),{unstyled:e.unstyled}),{icon:a.withCtx((function(){return[a.renderSlot(e.$slots,"movetopicon",{},(function(){return[a.createVNode(d,a.normalizeProps(a.guardReactiveProps(e.ptm("moveTopButton").icon)),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),a.createVNode(s,a.mergeProps({type:"button",onClick:r.moveDown,"aria-label":r.moveDownAriaLabel,disabled:r.moveDisabled(),pt:e.ptm("moveDownButton")},e.moveDownButtonProps,{unstyled:e.unstyled}),{icon:a.withCtx((function(){return[a.renderSlot(e.$slots,"movedownicon",{},(function(){return[a.createVNode(c,a.normalizeProps(a.guardReactiveProps(e.ptm("moveDownButton").icon)),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),a.createVNode(s,a.mergeProps({type:"button",onClick:r.moveBottom,"aria-label":r.moveBottomAriaLabel,disabled:r.moveDisabled(),pt:e.ptm("moveBottomButton")},e.moveBottomButtonProps,{unstyled:e.unstyled}),{icon:a.withCtx((function(){return[a.renderSlot(e.$slots,"movebottomicon",{},(function(){return[a.createVNode(u,a.normalizeProps(a.guardReactiveProps(e.ptm("moveBottomButton").icon)),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),a.renderSlot(e.$slots,"controlsend")],16),a.createElementVNode("div",a.mergeProps({class:e.cx("container")},e.ptm("container")),[e.$slots.header?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,class:e.cx("header")},e.ptm("header")),[a.renderSlot(e.$slots,"header")],16)):a.createCommentVNode("",!0),a.createVNode(a.TransitionGroup,a.mergeProps({ref:r.listRef,id:o.id+"_list",name:"p-orderlist-flip",tag:"ul",class:e.cx("list"),style:e.listStyle,role:"listbox","aria-multiselectable":"true",tabindex:e.tabindex,"aria-activedescendant":o.focused?r.focusedOptionId:void 0,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,onFocus:r.onListFocus,onBlur:r.onListBlur,onKeydown:r.onListKeyDown},B(B({},e.listProps),e.ptm("list"))),{default:a.withCtx((function(){return[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.modelValue,(function(n,i){return a.withDirectives((a.openBlock(),a.createElementBlock("li",a.mergeProps({key:r.getItemKey(n,i),id:o.id+"_"+i,role:"option",class:e.cx("item",{item:n,id:"".concat(o.id,"_").concat(i)}),onClick:function(e){return r.onItemClick(e,n,i)},onTouchend:t[0]||(t[0]=function(){return r.onItemTouchEnd&&r.onItemTouchEnd.apply(r,arguments)}),"aria-selected":r.isSelected(n),onMousedown:function(e){return r.onOptionMouseDown(i)}},r.getPTOptions(n,"item",i),{"data-p-highlight":r.isSelected(n),"data-p-focused":"".concat(o.id,"_").concat(i)===r.focusedOptionId}),[a.renderSlot(e.$slots,"item",{item:n,index:i})],16,$)),[[p]])})),128))]})),_:3},16,["id","class","style","tabindex","aria-activedescendant","aria-label","aria-labelledby","onFocus","onBlur","onKeydown"])],16)],16)},S}(primevue.button,primevue.icons.angledoubledown,primevue.icons.angledoubleup,primevue.icons.angledown,primevue.icons.angleup,primevue.ripple,primevue.utils,primevue.basecomponent,primevue.usestyle,Vue);
@@ -11,7 +11,7 @@ import { VNode } from 'vue';
11
11
  import { ComponentHooks } from '../basecomponent';
12
12
  import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
13
13
 
14
- export declare type OrganizationChartPassThroughOptionType = OrganizationChartPassThroughAttributes | ((options: OrganizationChartPassThroughMethodOptions) => OrganizationChartPassThroughAttributes) | null | undefined;
14
+ export declare type OrganizationChartPassThroughOptionType = OrganizationChartPassThroughAttributes | ((options: OrganizationChartPassThroughMethodOptions) => OrganizationChartPassThroughAttributes | string) | string | null | undefined;
15
15
 
16
16
  /**
17
17
  * Custom passthrough(pt) option method.
@@ -11,7 +11,7 @@ import { VNode } from 'vue';
11
11
  import { ComponentHooks } from '../basecomponent';
12
12
  import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
13
13
 
14
- export declare type OverlayPanelPassThroughOptionType = OverlayPanelPassThroughAttributes | ((options: OverlayPanelPassThroughMethodOptions) => OverlayPanelPassThroughAttributes) | null | undefined;
14
+ export declare type OverlayPanelPassThroughOptionType = OverlayPanelPassThroughAttributes | ((options: OverlayPanelPassThroughMethodOptions) => OverlayPanelPassThroughAttributes | string) | string | null | undefined;
15
15
 
16
16
  /**
17
17
  * Custom passthrough(pt) option method.
@@ -97,7 +97,6 @@ export default {
97
97
  },
98
98
  hide() {
99
99
  this.visible = false;
100
- DomHandler.focus(this.target);
101
100
  },
102
101
  onContentClick() {
103
102
  this.selfClick = true;
@@ -160,7 +159,10 @@ export default {
160
159
  }
161
160
  },
162
161
  onContentKeydown(event) {
163
- event.code === 'Escape' && this.hide();
162
+ if (event.code === 'Escape') {
163
+ this.hide();
164
+ DomHandler.focus(this.target);
165
+ }
164
166
  },
165
167
  onButtonKeydown(event) {
166
168
  switch (event.code) {