primevue 3.32.0 → 3.32.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 (353) hide show
  1. package/accordion/Accordion.d.ts +2 -2
  2. package/accordiontab/AccordionTab.d.ts +4 -3
  3. package/autocomplete/AutoComplete.d.ts +17 -7
  4. package/autocomplete/AutoComplete.vue +2 -2
  5. package/autocomplete/autocomplete.cjs.js +3 -2
  6. package/autocomplete/autocomplete.cjs.min.js +1 -1
  7. package/autocomplete/autocomplete.esm.js +3 -2
  8. package/autocomplete/autocomplete.esm.min.js +1 -1
  9. package/autocomplete/autocomplete.js +3 -2
  10. package/autocomplete/autocomplete.min.js +1 -1
  11. package/avatar/Avatar.d.ts +2 -2
  12. package/avatargroup/AvatarGroup.d.ts +2 -2
  13. package/badge/Badge.d.ts +2 -2
  14. package/badgedirective/BadgeDirective.d.ts +2 -1
  15. package/basecomponent/BaseComponent.vue +67 -12
  16. package/basecomponent/basecomponent.cjs.js +76 -22
  17. package/basecomponent/basecomponent.cjs.min.js +1 -1
  18. package/basecomponent/basecomponent.esm.js +76 -22
  19. package/basecomponent/basecomponent.esm.min.js +1 -1
  20. package/basecomponent/basecomponent.js +76 -22
  21. package/basecomponent/basecomponent.min.js +1 -1
  22. package/basedirective/basedirective.cjs.js +47 -7
  23. package/basedirective/basedirective.cjs.min.js +1 -1
  24. package/basedirective/basedirective.esm.js +47 -7
  25. package/basedirective/basedirective.esm.min.js +1 -1
  26. package/basedirective/basedirective.js +47 -7
  27. package/basedirective/basedirective.min.js +1 -1
  28. package/baseicon/BaseIcon.vue +44 -32
  29. package/baseicon/baseicon.cjs.js +19 -30
  30. package/baseicon/baseicon.cjs.min.js +1 -1
  31. package/baseicon/baseicon.esm.js +19 -30
  32. package/baseicon/baseicon.esm.min.js +1 -1
  33. package/baseicon/baseicon.js +20 -32
  34. package/baseicon/baseicon.min.js +1 -1
  35. package/blockui/BlockUI.d.ts +2 -2
  36. package/breadcrumb/Breadcrumb.d.ts +2 -2
  37. package/button/Button.d.ts +2 -2
  38. package/button/Button.vue +2 -2
  39. package/button/button.cjs.js +2 -2
  40. package/button/button.cjs.min.js +1 -1
  41. package/button/button.esm.js +2 -2
  42. package/button/button.esm.min.js +1 -1
  43. package/button/button.js +2 -2
  44. package/button/button.min.js +1 -1
  45. package/calendar/Calendar.d.ts +30 -6
  46. package/calendar/Calendar.vue +9 -8
  47. package/calendar/calendar.cjs.js +19 -10
  48. package/calendar/calendar.cjs.min.js +1 -1
  49. package/calendar/calendar.esm.js +19 -10
  50. package/calendar/calendar.esm.min.js +1 -1
  51. package/calendar/calendar.js +19 -10
  52. package/calendar/calendar.min.js +1 -1
  53. package/card/Card.d.ts +2 -2
  54. package/carousel/Carousel.d.ts +2 -2
  55. package/carousel/Carousel.vue +2 -1
  56. package/carousel/carousel.cjs.js +4 -3
  57. package/carousel/carousel.cjs.min.js +1 -1
  58. package/carousel/carousel.esm.js +4 -3
  59. package/carousel/carousel.esm.min.js +1 -1
  60. package/carousel/carousel.js +4 -3
  61. package/carousel/carousel.min.js +1 -1
  62. package/cascadeselect/CascadeSelect.d.ts +2 -2
  63. package/chart/Chart.d.ts +2 -2
  64. package/checkbox/Checkbox.d.ts +2 -2
  65. package/chip/Chip.d.ts +6 -4
  66. package/chips/Chips.d.ts +13 -4
  67. package/chips/Chips.vue +1 -1
  68. package/chips/chips.cjs.js +1 -0
  69. package/chips/chips.cjs.min.js +1 -1
  70. package/chips/chips.esm.js +1 -0
  71. package/chips/chips.esm.min.js +1 -1
  72. package/chips/chips.js +1 -0
  73. package/chips/chips.min.js +1 -1
  74. package/colorpicker/ColorPicker.d.ts +2 -2
  75. package/colorpicker/ColorPicker.vue +1 -40
  76. package/colorpicker/colorpicker.cjs.js +8 -47
  77. package/colorpicker/colorpicker.cjs.min.js +1 -1
  78. package/colorpicker/colorpicker.esm.js +8 -47
  79. package/colorpicker/colorpicker.esm.min.js +1 -1
  80. package/colorpicker/colorpicker.js +8 -47
  81. package/colorpicker/colorpicker.min.js +1 -1
  82. package/column/Column.d.ts +13 -10
  83. package/columngroup/ColumnGroup.d.ts +2 -2
  84. package/config/PrimeVue.d.ts +2 -2
  85. package/confirmdialog/ConfirmDialog.d.ts +3 -2
  86. package/confirmpopup/ConfirmPopup.d.ts +3 -2
  87. package/contextmenu/ContextMenu.d.ts +3 -2
  88. package/core/core.js +551 -489
  89. package/core/core.min.js +10 -10
  90. package/datatable/BodyCell.vue +2 -0
  91. package/datatable/DataTable.d.ts +4 -2
  92. package/datatable/DataTable.vue +45 -15
  93. package/datatable/TableBody.vue +1 -1
  94. package/datatable/datatable.cjs.js +119 -74
  95. package/datatable/datatable.cjs.min.js +1 -1
  96. package/datatable/datatable.esm.js +119 -74
  97. package/datatable/datatable.esm.min.js +1 -1
  98. package/datatable/datatable.js +119 -74
  99. package/datatable/datatable.min.js +1 -1
  100. package/dataview/DataView.d.ts +2 -2
  101. package/dataview/DataView.vue +2 -1
  102. package/dataview/dataview.cjs.js +4 -3
  103. package/dataview/dataview.cjs.min.js +1 -1
  104. package/dataview/dataview.esm.js +4 -3
  105. package/dataview/dataview.esm.min.js +1 -1
  106. package/dataview/dataview.js +4 -3
  107. package/dataview/dataview.min.js +1 -1
  108. package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +2 -2
  109. package/deferredcontent/DeferredContent.d.ts +2 -2
  110. package/dialog/Dialog.d.ts +13 -3
  111. package/dialog/Dialog.vue +10 -7
  112. package/dialog/dialog.cjs.js +13 -7
  113. package/dialog/dialog.cjs.min.js +1 -1
  114. package/dialog/dialog.esm.js +14 -8
  115. package/dialog/dialog.esm.min.js +1 -1
  116. package/dialog/dialog.js +13 -7
  117. package/dialog/dialog.min.js +1 -1
  118. package/divider/Divider.d.ts +2 -2
  119. package/dock/Dock.d.ts +2 -2
  120. package/dropdown/Dropdown.d.ts +21 -10
  121. package/dropdown/Dropdown.vue +9 -0
  122. package/dropdown/dropdown.cjs.js +8 -0
  123. package/dropdown/dropdown.cjs.min.js +1 -1
  124. package/dropdown/dropdown.esm.js +8 -0
  125. package/dropdown/dropdown.esm.min.js +1 -1
  126. package/dropdown/dropdown.js +8 -0
  127. package/dropdown/dropdown.min.js +1 -1
  128. package/editor/BaseEditor.vue +8 -6
  129. package/editor/Editor.d.ts +2 -2
  130. package/editor/editor.cjs.js +8 -6
  131. package/editor/editor.cjs.min.js +1 -1
  132. package/editor/editor.esm.js +8 -6
  133. package/editor/editor.esm.min.js +1 -1
  134. package/editor/editor.js +8 -6
  135. package/editor/editor.min.js +1 -1
  136. package/fieldset/Fieldset.d.ts +2 -2
  137. package/fileupload/FileUpload.d.ts +12 -7
  138. package/fileupload/FileUpload.vue +4 -0
  139. package/fileupload/fileupload.cjs.js +4 -0
  140. package/fileupload/fileupload.cjs.min.js +1 -1
  141. package/fileupload/fileupload.esm.js +4 -0
  142. package/fileupload/fileupload.esm.min.js +1 -1
  143. package/fileupload/fileupload.js +5 -2
  144. package/fileupload/fileupload.min.js +1 -1
  145. package/focustrap/FocusTrap.d.ts +2 -1
  146. package/galleria/Galleria.d.ts +2 -2
  147. package/galleria/GalleriaItem.vue +2 -2
  148. package/galleria/GalleriaThumbnails.vue +5 -1
  149. package/galleria/galleria.cjs.js +16 -7
  150. package/galleria/galleria.cjs.min.js +1 -1
  151. package/galleria/galleria.esm.js +16 -7
  152. package/galleria/galleria.esm.min.js +1 -1
  153. package/galleria/galleria.js +16 -7
  154. package/galleria/galleria.min.js +1 -1
  155. package/image/Image.d.ts +6 -4
  156. package/image/Image.vue +8 -6
  157. package/image/image.cjs.js +18 -5
  158. package/image/image.cjs.min.js +1 -1
  159. package/image/image.esm.js +19 -6
  160. package/image/image.esm.min.js +1 -1
  161. package/image/image.js +18 -5
  162. package/image/image.min.js +1 -1
  163. package/inlinemessage/InlineMessage.d.ts +2 -2
  164. package/inplace/Inplace.d.ts +2 -2
  165. package/inputmask/InputMask.d.ts +2 -2
  166. package/inputnumber/InputNumber.d.ts +2 -2
  167. package/inputnumber/InputNumber.vue +1 -0
  168. package/inputnumber/inputnumber.cjs.js +1 -0
  169. package/inputnumber/inputnumber.cjs.min.js +1 -1
  170. package/inputnumber/inputnumber.esm.js +1 -0
  171. package/inputnumber/inputnumber.esm.min.js +1 -1
  172. package/inputnumber/inputnumber.js +1 -0
  173. package/inputnumber/inputnumber.min.js +1 -1
  174. package/inputswitch/InputSwitch.d.ts +2 -2
  175. package/inputtext/InputText.d.ts +2 -2
  176. package/knob/Knob.d.ts +2 -2
  177. package/listbox/Listbox.d.ts +11 -5
  178. package/megamenu/MegaMenu.d.ts +3 -2
  179. package/menu/Menu.d.ts +2 -2
  180. package/menubar/Menubar.d.ts +3 -2
  181. package/message/BaseMessage.vue +5 -0
  182. package/message/Message.d.ts +4 -2
  183. package/message/message.cjs.js +1 -1
  184. package/message/message.cjs.min.js +1 -1
  185. package/message/message.esm.js +1 -1
  186. package/message/message.esm.min.js +1 -1
  187. package/message/message.js +1 -1
  188. package/message/message.min.js +1 -1
  189. package/multiselect/MultiSelect.d.ts +16 -6
  190. package/multiselect/MultiSelect.vue +1 -1
  191. package/multiselect/multiselect.cjs.js +1 -0
  192. package/multiselect/multiselect.cjs.min.js +1 -1
  193. package/multiselect/multiselect.esm.js +1 -0
  194. package/multiselect/multiselect.esm.min.js +1 -1
  195. package/multiselect/multiselect.js +1 -0
  196. package/multiselect/multiselect.min.js +1 -1
  197. package/orderlist/OrderList.d.ts +2 -2
  198. package/organizationchart/OrganizationChart.d.ts +2 -2
  199. package/overlaypanel/OverlayPanel.d.ts +2 -2
  200. package/package.json +9 -4
  201. package/paginator/Paginator.d.ts +2 -2
  202. package/panel/Panel.d.ts +3 -2
  203. package/panelmenu/PanelMenu.d.ts +3 -2
  204. package/passthrough/index.cjs.js +16 -60
  205. package/passthrough/index.cjs.min.js +1 -1
  206. package/passthrough/index.d.ts +0 -9
  207. package/passthrough/index.esm.js +16 -60
  208. package/passthrough/index.esm.min.js +1 -1
  209. package/passthrough/index.js +18 -59
  210. package/passthrough/index.min.js +1 -1
  211. package/passthrough/tailwind/index.cjs.js +365 -359
  212. package/passthrough/tailwind/index.cjs.min.js +1 -1
  213. package/passthrough/tailwind/index.d.ts +1 -2
  214. package/passthrough/tailwind/index.esm.js +365 -359
  215. package/passthrough/tailwind/index.esm.min.js +1 -1
  216. package/passthrough/tailwind/index.js +365 -359
  217. package/passthrough/tailwind/index.min.js +1 -1
  218. package/password/Password.d.ts +6 -4
  219. package/password/Password.vue +1 -0
  220. package/password/password.cjs.js +2 -1
  221. package/password/password.cjs.min.js +1 -1
  222. package/password/password.esm.js +2 -1
  223. package/password/password.esm.min.js +1 -1
  224. package/password/password.js +2 -1
  225. package/password/password.min.js +1 -1
  226. package/picklist/PickList.d.ts +2 -2
  227. package/picklist/PickList.vue +9 -7
  228. package/picklist/picklist.cjs.js +27 -9
  229. package/picklist/picklist.cjs.min.js +1 -1
  230. package/picklist/picklist.esm.js +27 -9
  231. package/picklist/picklist.esm.min.js +1 -1
  232. package/picklist/picklist.js +27 -9
  233. package/picklist/picklist.min.js +1 -1
  234. package/progressbar/ProgressBar.d.ts +2 -2
  235. package/progressspinner/ProgressSpinner.d.ts +2 -2
  236. package/radiobutton/RadioButton.d.ts +2 -2
  237. package/rating/Rating.d.ts +3 -2
  238. package/resources/themes/arya-blue/theme.css +4 -4
  239. package/resources/themes/arya-green/theme.css +4 -4
  240. package/resources/themes/arya-orange/theme.css +4 -4
  241. package/resources/themes/arya-purple/theme.css +4 -4
  242. package/resources/themes/bootstrap4-dark-blue/theme.css +8 -11
  243. package/resources/themes/bootstrap4-dark-purple/theme.css +8 -11
  244. package/resources/themes/bootstrap4-light-blue/theme.css +8 -11
  245. package/resources/themes/bootstrap4-light-purple/theme.css +8 -11
  246. package/resources/themes/fluent-light/theme.css +4 -4
  247. package/resources/themes/lara-dark-blue/theme.css +4 -4
  248. package/resources/themes/lara-dark-indigo/theme.css +4 -4
  249. package/resources/themes/lara-dark-purple/theme.css +4 -4
  250. package/resources/themes/lara-dark-teal/theme.css +4 -4
  251. package/resources/themes/lara-light-blue/theme.css +4 -4
  252. package/resources/themes/lara-light-indigo/theme.css +4 -4
  253. package/resources/themes/lara-light-purple/theme.css +4 -4
  254. package/resources/themes/lara-light-teal/theme.css +4 -4
  255. package/resources/themes/luna-amber/theme.css +4 -4
  256. package/resources/themes/luna-blue/theme.css +4 -4
  257. package/resources/themes/luna-green/theme.css +4 -4
  258. package/resources/themes/luna-pink/theme.css +4 -4
  259. package/resources/themes/md-dark-deeppurple/theme.css +4 -4
  260. package/resources/themes/md-dark-indigo/theme.css +4 -4
  261. package/resources/themes/md-light-deeppurple/theme.css +4 -4
  262. package/resources/themes/md-light-indigo/theme.css +4 -4
  263. package/resources/themes/mdc-dark-deeppurple/theme.css +4 -4
  264. package/resources/themes/mdc-dark-indigo/theme.css +4 -4
  265. package/resources/themes/mdc-light-deeppurple/theme.css +4 -4
  266. package/resources/themes/mdc-light-indigo/theme.css +4 -4
  267. package/resources/themes/mira/theme.css +4 -4
  268. package/resources/themes/nano/theme.css +4 -4
  269. package/resources/themes/nova/theme.css +4 -4
  270. package/resources/themes/nova-accent/theme.css +4 -4
  271. package/resources/themes/nova-alt/theme.css +4 -4
  272. package/resources/themes/nova-vue/theme.css +4 -4
  273. package/resources/themes/rhea/theme.css +4 -4
  274. package/resources/themes/saga-blue/theme.css +4 -4
  275. package/resources/themes/saga-green/theme.css +4 -4
  276. package/resources/themes/saga-orange/theme.css +4 -4
  277. package/resources/themes/saga-purple/theme.css +4 -4
  278. package/resources/themes/soho-dark/theme.css +4 -4
  279. package/resources/themes/soho-light/theme.css +4 -4
  280. package/resources/themes/tailwind-light/theme.css +4 -4
  281. package/resources/themes/vela-blue/theme.css +4 -4
  282. package/resources/themes/vela-green/theme.css +4 -4
  283. package/resources/themes/vela-orange/theme.css +4 -4
  284. package/resources/themes/vela-purple/theme.css +4 -4
  285. package/resources/themes/viva-dark/theme.css +4 -4
  286. package/resources/themes/viva-light/theme.css +4 -4
  287. package/ripple/Ripple.d.ts +2 -1
  288. package/scrollpanel/ScrollPanel.d.ts +2 -2
  289. package/scrolltop/ScrollTop.d.ts +2 -2
  290. package/selectbutton/SelectButton.d.ts +6 -2
  291. package/selectbutton/SelectButton.vue +2 -1
  292. package/selectbutton/selectbutton.cjs.js +2 -1
  293. package/selectbutton/selectbutton.cjs.min.js +1 -1
  294. package/selectbutton/selectbutton.esm.js +2 -1
  295. package/selectbutton/selectbutton.esm.min.js +1 -1
  296. package/selectbutton/selectbutton.js +2 -1
  297. package/selectbutton/selectbutton.min.js +1 -1
  298. package/sidebar/Sidebar.d.ts +10 -4
  299. package/sidebar/Sidebar.vue +2 -2
  300. package/sidebar/sidebar.cjs.js +4 -2
  301. package/sidebar/sidebar.cjs.min.js +1 -1
  302. package/sidebar/sidebar.esm.js +5 -3
  303. package/sidebar/sidebar.esm.min.js +1 -1
  304. package/sidebar/sidebar.js +4 -2
  305. package/sidebar/sidebar.min.js +1 -1
  306. package/skeleton/Skeleton.d.ts +2 -2
  307. package/slider/Slider.d.ts +2 -2
  308. package/speeddial/SpeedDial.d.ts +9 -7
  309. package/speeddial/SpeedDial.vue +1 -1
  310. package/speeddial/speeddial.cjs.js +1 -1
  311. package/speeddial/speeddial.cjs.min.js +1 -1
  312. package/speeddial/speeddial.esm.js +1 -1
  313. package/speeddial/speeddial.esm.min.js +1 -1
  314. package/speeddial/speeddial.js +1 -1
  315. package/speeddial/speeddial.min.js +1 -1
  316. package/splitbutton/SplitButton.d.ts +4 -2
  317. package/splitter/Splitter.d.ts +2 -2
  318. package/splitterpanel/SplitterPanel.d.ts +2 -2
  319. package/steps/Steps.d.ts +2 -2
  320. package/styleclass/StyleClass.d.ts +2 -1
  321. package/tabmenu/TabMenu.d.ts +2 -2
  322. package/tabpanel/TabPanel.d.ts +2 -2
  323. package/tabview/TabView.d.ts +2 -2
  324. package/tag/Tag.d.ts +2 -2
  325. package/terminal/Terminal.d.ts +2 -2
  326. package/textarea/Textarea.d.ts +2 -2
  327. package/tieredmenu/TieredMenu.d.ts +3 -2
  328. package/timeline/Timeline.d.ts +2 -2
  329. package/toast/BaseToast.vue +2 -0
  330. package/toast/Toast.d.ts +16 -4
  331. package/toast/toast.cjs.js +1 -1
  332. package/toast/toast.cjs.min.js +1 -1
  333. package/toast/toast.esm.js +1 -1
  334. package/toast/toast.esm.min.js +1 -1
  335. package/toast/toast.js +1 -1
  336. package/toast/toast.min.js +1 -1
  337. package/togglebutton/ToggleButton.d.ts +3 -2
  338. package/toolbar/Toolbar.d.ts +2 -2
  339. package/tooltip/Tooltip.d.ts +2 -1
  340. package/tree/Tree.d.ts +6 -2
  341. package/treeselect/TreeSelect.d.ts +3 -2
  342. package/treetable/TreeTable.d.ts +3 -2
  343. package/treetable/TreeTable.vue +4 -2
  344. package/treetable/treetable.cjs.js +6 -5
  345. package/treetable/treetable.cjs.min.js +1 -1
  346. package/treetable/treetable.esm.js +6 -5
  347. package/treetable/treetable.esm.min.js +1 -1
  348. package/treetable/treetable.js +6 -5
  349. package/treetable/treetable.min.js +1 -1
  350. package/tristatecheckbox/TriStateCheckbox.d.ts +5 -2
  351. package/ts-helpers.d.ts +2 -0
  352. package/virtualscroller/VirtualScroller.d.ts +8 -6
  353. package/web-types.json +1 -1
@@ -519,13 +519,14 @@ var script = {
519
519
  var innerHTML = "\n .p-carousel[".concat(this.attributeSelector, "] .p-carousel-item {\n flex: 1 0 ").concat(100 / this.d_numVisible, "%\n }\n ");
520
520
  if (this.responsiveOptions && !this.isUnstyled) {
521
521
  var _responsiveOptions = _toConsumableArray(this.responsiveOptions);
522
+ var comparer = new Intl.Collator(undefined, {
523
+ numeric: true
524
+ }).compare;
522
525
  _responsiveOptions.sort(function (data1, data2) {
523
526
  var value1 = data1.breakpoint;
524
527
  var value2 = data2.breakpoint;
525
528
  var result = null;
526
- if (value1 == null && value2 != null) result = -1;else if (value1 != null && value2 == null) result = 1;else if (value1 == null && value2 == null) result = 0;else if (typeof value1 === 'string' && typeof value2 === 'string') result = value1.localeCompare(value2, undefined, {
527
- numeric: true
528
- });else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;
529
+ if (value1 == null && value2 != null) result = -1;else if (value1 != null && value2 == null) result = 1;else if (value1 == null && value2 == null) result = 0;else if (typeof value1 === 'string' && typeof value2 === 'string') result = comparer(value1, value2);else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;
529
530
  return -1 * result;
530
531
  });
531
532
  for (var i = 0; i < _responsiveOptions.length; i++) {
@@ -1 +1 @@
1
- import t from"primevue/icons/chevrondown";import e from"primevue/icons/chevronleft";import i from"primevue/icons/chevronright";import n from"primevue/icons/chevronup";import a from"primevue/ripple";import{DomHandler as o,UniqueComponentId as r}from"primevue/utils";import s from"primevue/basecomponent";import{useStyle as l}from"primevue/usestyle";import{resolveDirective as c,openBlock as u,createElementBlock as d,mergeProps as h,renderSlot as p,createCommentVNode as m,createElementVNode as f,withDirectives as v,createBlock as b,resolveDynamicComponent as g,Fragment as y,renderList as I}from"vue";var x=l("\n.p-carousel {\n display: flex;\n flex-direction: column;\n}\n\n.p-carousel-content {\n display: flex;\n flex-direction: column;\n overflow: auto;\n}\n\n.p-carousel-prev,\n.p-carousel-next {\n align-self: center;\n flex-grow: 0;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-carousel-container {\n display: flex;\n flex-direction: row;\n}\n\n.p-carousel-items-content {\n overflow: hidden;\n width: 100%;\n}\n\n.p-carousel-items-container {\n display: flex;\n flex-direction: row;\n}\n\n.p-carousel-indicators {\n display: flex;\n flex-direction: row;\n justify-content: center;\n flex-wrap: wrap;\n}\n\n.p-carousel-indicator > button {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* Vertical */\n.p-carousel-vertical .p-carousel-container {\n flex-direction: column;\n}\n\n.p-carousel-vertical .p-carousel-items-container {\n flex-direction: column;\n height: 100%;\n}\n\n/* Keyboard Support */\n.p-items-hidden .p-carousel-item {\n visibility: hidden;\n}\n\n.p-items-hidden .p-carousel-item.p-carousel-item-active {\n visibility: visible;\n}\n",{name:"carousel",manual:!0});function S(t){return V(t)||C(t)||w(t)||_()}function _(){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 w(t,e){if(t){if("string"==typeof t)return $(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)?$(t,e):void 0}}function C(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function V(t){if(Array.isArray(t))return $(t)}function $(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 k={name:"Carousel",extends:{name:"BaseCarousel",extends:s,props:{value:null,page:{type:Number,default:0},numVisible:{type:Number,default:1},numScroll:{type:Number,default:1},responsiveOptions:Array,orientation:{type:String,default:"horizontal"},verticalViewPortHeight:{type:String,default:"300px"},contentClass:String,containerClass:String,indicatorsContentClass:String,circular:{type:Boolean,default:!1},autoplayInterval:{type:Number,default:0},showNavigators:{type:Boolean,default:!0},showIndicators:{type:Boolean,default:!0},prevButtonProps:{type:null,default:null},nextButtonProps:{type:null,default:null}},css:{classes:{root:function(t){var e=t.instance;return["p-carousel p-component",{"p-carousel-vertical":e.isVertical(),"p-carousel-horizontal":!e.isVertical()}]},header:"p-carousel-header",content:"p-carousel-content",container:"p-carousel-container",previousButton:function(t){return["p-carousel-prev p-link",{"p-disabled":t.instance.backwardIsDisabled}]},previousButtonIcon:"p-carousel-next-icon",itemsContent:"p-carousel-items-content",itemsContainer:"p-carousel-items-container",itemCloned:function(t){var e=t.index,i=t.value,n=t.d_numVisible;return["p-carousel-item p-carousel-item-cloned",{"p-carousel-item-active":-1*t.totalShiftedItems===i.length+n,"p-carousel-item-start":0===e,"p-carousel-item-end":i.slice(-1*n).length-1===e}]},item:function(t){var e=t.instance,i=t.index;return["p-carousel-item",{"p-carousel-item-active":e.firstIndex()<=i&&e.lastIndex()>=i,"p-carousel-item-start":e.firstIndex()===i,"p-carousel-item-end":e.lastIndex()===i}]},nextButton:function(t){return["p-carousel-next p-link",{"p-disabled":t.instance.forwardIsDisabled}]},nextButtonIcon:"p-carousel-prev-icon",indicators:"p-carousel-indicators p-reset",indicator:function(t){return["p-carousel-indicator",{"p-highlight":t.instance.d_page===t.index}]},indicatorButton:"p-link",footer:"p-carousel-footer"},loadStyle:x.load},provide:function(){return{$parentInstance:this}}},emits:["update:page"],isRemainingItemsAdded:!1,data:function(){return{remainingItems:0,d_numVisible:this.numVisible,d_numScroll:this.numScroll,d_oldNumScroll:0,d_oldNumVisible:0,d_oldValue:null,d_page:this.page,totalShiftedItems:this.page*this.numScroll*-1,allowAutoplay:!!this.autoplayInterval,d_circular:this.circular||this.allowAutoplay,swipeThreshold:20}},watch:{page:function(t){this.d_page=t},circular:function(t){this.d_circular=t},numVisible:function(t,e){this.d_numVisible=t,this.d_oldNumVisible=e},numScroll:function(t,e){this.d_oldNumScroll=e,this.d_numScroll=t},value:function(t){this.d_oldValue=t}},mounted:function(){var t=!1;if(this.$el.setAttribute(this.attributeSelector,""),this.createStyle(),this.calculatePosition(),this.responsiveOptions&&this.bindDocumentListeners(),this.isCircular()){var e=this.totalShiftedItems;0===this.d_page?e=-1*this.d_numVisible:0===e&&(e=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),e!==this.totalShiftedItems&&(this.totalShiftedItems=e,t=!0)}!t&&this.isAutoplay()&&this.startAutoplay()},updated:function(){var t=this.isCircular(),e=!1,i=this.totalShiftedItems;if(this.autoplayInterval&&this.stopAutoplay(),this.d_oldNumScroll!==this.d_numScroll||this.d_oldNumVisible!==this.d_numVisible||this.d_oldValue.length!==this.value.length){this.remainingItems=(this.value.length-this.d_numVisible)%this.d_numScroll;var n=this.d_page;0!==this.totalIndicators&&n>=this.totalIndicators&&(this.$emit("update:page",n=this.totalIndicators-1),this.d_page=n,e=!0),i=n*this.d_numScroll*-1,t&&(i-=this.d_numVisible),n===this.totalIndicators-1&&this.remainingItems>0?(i+=-1*this.remainingItems+this.d_numScroll,this.isRemainingItemsAdded=!0):this.isRemainingItemsAdded=!1,i!==this.totalShiftedItems&&(this.totalShiftedItems=i,e=!0),this.d_oldNumScroll=this.d_numScroll,this.d_oldNumVisible=this.d_numVisible,this.d_oldValue=this.value,this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(i*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(i*(100/this.d_numVisible),"%, 0, 0)")}t&&(0===this.d_page?i=-1*this.d_numVisible:0===i&&(i=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),i!==this.totalShiftedItems&&(this.totalShiftedItems=i,e=!0)),!e&&this.isAutoplay()&&this.startAutoplay()},beforeUnmount:function(){this.responsiveOptions&&this.unbindDocumentListeners(),this.autoplayInterval&&this.stopAutoplay()},methods:{getIndicatorPTOptions:function(t){return{context:{highlighted:t===this.d_page}}},step:function(t,e){var i=this.totalShiftedItems,n=this.isCircular();null!=e?(i=this.d_numScroll*e*-1,n&&(i-=this.d_numVisible),this.isRemainingItemsAdded=!1):(i+=this.d_numScroll*t,this.isRemainingItemsAdded&&(i+=this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!1),e=Math.abs(Math.floor((n?i+this.d_numVisible:i)/this.d_numScroll)));n&&this.d_page===this.totalIndicators-1&&-1===t?(i=-1*(this.value.length+this.d_numVisible),e=0):n&&0===this.d_page&&1===t?(i=0,e=this.totalIndicators-1):e===this.totalIndicators-1&&this.remainingItems>0&&(i+=-1*this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!0),this.$refs.itemsContainer&&(!this.isUnstyled&&o.removeClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(i*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(i*(100/this.d_numVisible),"%, 0, 0)"),this.$refs.itemsContainer.style.transition="transform 500ms ease 0s"),this.totalShiftedItems=i,this.$emit("update:page",e),this.d_page=e},calculatePosition:function(){if(this.$refs.itemsContainer&&this.responsiveOptions){for(var t=window.innerWidth,e={numVisible:this.numVisible,numScroll:this.numScroll},i=0;i<this.responsiveOptions.length;i++){var n=this.responsiveOptions[i];parseInt(n.breakpoint,10)>=t&&(e=n)}if(this.d_numScroll!==e.numScroll){var a=this.d_page;a=parseInt(a*this.d_numScroll/e.numScroll),this.totalShiftedItems=e.numScroll*a*-1,this.isCircular()&&(this.totalShiftedItems-=e.numVisible),this.d_numScroll=e.numScroll,this.$emit("update:page",a),this.d_page=a}this.d_numVisible!==e.numVisible&&(this.d_numVisible=e.numVisible)}},navBackward:function(t,e){(this.d_circular||0!==this.d_page)&&this.step(1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()},navForward:function(t,e){(this.d_circular||this.d_page<this.totalIndicators-1)&&this.step(-1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()},onIndicatorClick:function(t,e){var i=this.d_page;e>i?this.navForward(t,e):e<i&&this.navBackward(t,e)},onTransitionEnd:function(){this.$refs.itemsContainer&&(!this.isUnstyled&&o.addClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transition="",0!==this.d_page&&this.d_page!==this.totalIndicators-1||!this.isCircular()||(this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(this.totalShiftedItems*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(this.totalShiftedItems*(100/this.d_numVisible),"%, 0, 0)")))},onTouchStart:function(t){var e=t.changedTouches[0];this.startPos={x:e.pageX,y:e.pageY}},onTouchMove:function(t){t.cancelable&&t.preventDefault()},onTouchEnd:function(t){var e=t.changedTouches[0];this.isVertical()?this.changePageOnTouch(t,e.pageY-this.startPos.y):this.changePageOnTouch(t,e.pageX-this.startPos.x)},changePageOnTouch:function(t,e){Math.abs(e)>this.swipeThreshold&&(e<0?this.navForward(t):this.navBackward(t))},onIndicatorKeydown:function(t){switch(t.code){case"ArrowRight":this.onRightKey();break;case"ArrowLeft":this.onLeftKey();break;case"Home":this.onHomeKey(),t.preventDefault();break;case"End":this.onEndKey(),t.preventDefault();break;case"ArrowUp":case"ArrowDown":t.preventDefault();break;case"Tab":this.onTabKey()}},onRightKey:function(){var t=S(o.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,e+1===t.length?t.length-1:e+1)},onLeftKey:function(){var t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,t-1<=0?0:t-1)},onHomeKey:function(){var t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,0)},onEndKey:function(){var t=S(o.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]r')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,t.length-1)},onTabKey:function(){var t=S(o.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=t.findIndex((function(t){return!0===o.getAttribute(t,"data-p-highlight")})),i=o.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]'),n=t.findIndex((function(t){return t===i.parentElement}));t[n].children[0].tabIndex="-1",t[e].children[0].tabIndex="0"},findFocusedIndicatorIndex:function(){var t=S(o.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=o.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]');return t.findIndex((function(t){return t===e.parentElement}))},changedFocusedIndicator:function(t,e){var i=S(o.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]'));i[t].children[0].tabIndex="-1",i[e].children[0].tabIndex="0",i[e].children[0].focus()},bindDocumentListeners:function(){var t=this;this.documentResizeListener||(this.documentResizeListener=function(e){t.calculatePosition(e)},window.addEventListener("resize",this.documentResizeListener))},unbindDocumentListeners:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)},startAutoplay:function(){var t=this;this.interval=setInterval((function(){t.step(-1,t.d_page===t.totalIndicators-1?0:t.d_page+1)}),this.autoplayInterval)},stopAutoplay:function(){this.interval&&clearInterval(this.interval)},createStyle:function(){var t;this.carouselStyle||(this.carouselStyle=document.createElement("style"),this.carouselStyle.type="text/css",o.setAttribute(this.carouselStyle,"nonce",null===(t=this.$primevue)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.csp)||void 0===t?void 0:t.nonce),document.body.appendChild(this.carouselStyle));var e="\n .p-carousel[".concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/this.d_numVisible,"%\n }\n ");if(this.responsiveOptions&&!this.isUnstyled){var i=S(this.responsiveOptions);i.sort((function(t,e){var i=t.breakpoint,n=e.breakpoint;return-1*(null==i&&null!=n?-1:null!=i&&null==n?1:null==i&&null==n?0:"string"==typeof i&&"string"==typeof n?i.localeCompare(n,void 0,{numeric:!0}):i<n?-1:i>n?1:0)}));for(var n=0;n<i.length;n++){var a=i[n];e+="\n @media screen and (max-width: ".concat(a.breakpoint,") {\n .p-carousel[").concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/a.numVisible,"%\n }\n }\n ")}}this.carouselStyle.innerHTML=e},isVertical:function(){return"vertical"===this.orientation},isCircular:function(){return this.value&&this.d_circular&&this.value.length>=this.d_numVisible},isAutoplay:function(){return this.autoplayInterval&&this.allowAutoplay},firstIndex:function(){return this.isCircular()?-1*(this.totalShiftedItems+this.d_numVisible):-1*this.totalShiftedItems},lastIndex:function(){return this.firstIndex()+this.d_numVisible-1},ariaSlideNumber:function(t){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slideNumber.replace(/{slideNumber}/g,t):void 0},ariaPageLabel:function(t){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,t):void 0}},computed:{totalIndicators:function(){return this.value?Math.max(Math.ceil((this.value.length-this.d_numVisible)/this.d_numScroll)+1,0):0},backwardIsDisabled:function(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&0===this.d_page},forwardIsDisabled:function(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&(this.d_page===this.totalIndicators-1||0===this.totalIndicators)},ariaSlideLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slide:void 0},ariaPrevButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.prevPageLabel:void 0},ariaNextButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.nextPageLabel:void 0},attributeSelector:function(){return r()}},components:{ChevronRightIcon:i,ChevronDownIcon:t,ChevronLeftIcon:e,ChevronUpIcon:n},directives:{ripple:a}};function A(t){return A="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},A(t)}function P(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 O(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?P(Object(i),!0).forEach((function(e){B(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):P(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function B(t,e,i){return(e=T(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function T(t){var e=L(t,"string");return"symbol"===A(e)?e:String(e)}function L(t,e){if("object"!==A(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!==A(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var D=["aria-live"],N=["disabled","aria-label"],j=["data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],R=["aria-hidden","aria-label","aria-roledescription","data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],E=["disabled","aria-label"],F=["data-p-highlight"],K=["tabindex","aria-label","aria-current","onClick"];k.render=function(t,e,i,n,a,o){var r=c("ripple");return u(),d("div",h({class:t.cx("root"),role:"region"},t.ptm("root")),[t.$slots.header?(u(),d("div",h({key:0,class:t.cx("header")},t.ptm("header")),[p(t.$slots,"header")],16)):m("",!0),f("div",h({class:[t.cx("content"),t.contentClass]},t.ptm("content")),[f("div",h({class:[t.cx("container"),t.containerClass],"aria-live":a.allowAutoplay?"polite":"off"},t.ptm("container")),[t.showNavigators?v((u(),d("button",h({key:0,type:"button",class:t.cx("previousButton"),disabled:o.backwardIsDisabled,"aria-label":o.ariaPrevButtonLabel,onClick:e[0]||(e[0]=function(){return o.navBackward&&o.navBackward.apply(o,arguments)})},O(O({},t.prevButtonProps),t.ptm("previousButton"))),[p(t.$slots,"previousicon",{},(function(){return[(u(),b(g(o.isVertical()?"ChevronUpIcon":"ChevronLeftIcon"),h({class:t.cx("previousButtonIcon")},t.ptm("previousButtonIcon")),null,16,["class"]))]}))],16,N)),[[r]]):m("",!0),f("div",h({class:t.cx("itemsContent"),style:[{height:o.isVertical()?t.verticalViewPortHeight:"auto"}],onTouchend:e[2]||(e[2]=function(){return o.onTouchEnd&&o.onTouchEnd.apply(o,arguments)}),onTouchstart:e[3]||(e[3]=function(){return o.onTouchStart&&o.onTouchStart.apply(o,arguments)}),onTouchmove:e[4]||(e[4]=function(){return o.onTouchMove&&o.onTouchMove.apply(o,arguments)})},t.ptm("itemsContent")),[f("div",h({ref:"itemsContainer",class:t.cx("itemsContainer"),onTransitionend:e[1]||(e[1]=function(){return o.onTransitionEnd&&o.onTransitionEnd.apply(o,arguments)})},t.ptm("itemsContainer")),[o.isCircular()?(u(!0),d(y,{key:0},I(t.value.slice(-1*a.d_numVisible),(function(e,i){return u(),d("div",h({key:i+"_scloned",class:t.cx("itemCloned",{index:i,value:t.value,totalShiftedItems:a.totalShiftedItems,d_numVisible:a.d_numVisible})},t.ptm("itemCloned"),{"data-p-carousel-item-active":-1*a.totalShiftedItems===t.value.length+a.d_numVisible,"data-p-carousel-item-start":0===i,"data-p-carousel-item-end":t.value.slice(-1*a.d_numVisible).length-1===i}),[p(t.$slots,"item",{data:e,index:i})],16,j)})),128)):m("",!0),(u(!0),d(y,null,I(t.value,(function(e,i){return u(),d("div",h({key:i,class:t.cx("item",{index:i}),role:"group","aria-hidden":o.firstIndex()>i||o.lastIndex()<i||void 0,"aria-label":o.ariaSlideNumber(i),"aria-roledescription":o.ariaSlideLabel},t.ptm("item"),{"data-p-carousel-item-active":o.firstIndex()<=i&&o.lastIndex()>=i,"data-p-carousel-item-start":o.firstIndex()===i,"data-p-carousel-item-end":o.lastIndex()===i}),[p(t.$slots,"item",{data:e,index:i})],16,R)})),128)),o.isCircular()?(u(!0),d(y,{key:1},I(t.value.slice(0,a.d_numVisible),(function(e,i){return u(),d("div",h({key:i+"_fcloned",class:t.cx("itemCloned",{index:i,value:t.value,totalShiftedItems:a.totalShiftedItems,d_numVisible:a.d_numVisible})},t.ptm("itemCloned")),[p(t.$slots,"item",{data:e,index:i})],16)})),128)):m("",!0)],16)],16),t.showNavigators?v((u(),d("button",h({key:1,type:"button",class:t.cx("nextButton"),disabled:o.forwardIsDisabled,"aria-label":o.ariaNextButtonLabel,onClick:e[5]||(e[5]=function(){return o.navForward&&o.navForward.apply(o,arguments)})},O(O({},t.nextButtonProps),t.ptm("nextButton"))),[p(t.$slots,"nexticon",{},(function(){return[(u(),b(g(o.isVertical()?"ChevronDownIcon":"ChevronRightIcon"),h({class:t.cx("nextButtonIcon")},t.ptm("nextButtonIcon")),null,16,["class"]))]}))],16,E)),[[r]]):m("",!0)],16,D),o.totalIndicators>=0&&t.showIndicators?(u(),d("ul",h({key:0,ref:"indicatorContent",class:[t.cx("indicators"),t.indicatorsContentClass],onKeydown:e[6]||(e[6]=function(){return o.onIndicatorKeydown&&o.onIndicatorKeydown.apply(o,arguments)})},t.ptm("indicators")),[(u(!0),d(y,null,I(o.totalIndicators,(function(e,i){return u(),d("li",h({key:"p-carousel-indicator-"+i.toString(),class:t.cx("indicator",{index:i})},t.ptm("indicator",o.getIndicatorPTOptions(i)),{"data-p-highlight":a.d_page===i}),[f("button",h({class:t.cx("indicatorButton"),type:"button",tabindex:a.d_page===i?"0":"-1","aria-label":o.ariaPageLabel(i+1),"aria-current":a.d_page===i?"page":void 0,onClick:function(t){return o.onIndicatorClick(t,i)}},t.ptm("indicatorButton",o.getIndicatorPTOptions(i))),null,16,K)],16,F)})),128))],16)):m("",!0)],16),t.$slots.footer?(u(),d("div",h({key:1,class:t.cx("footer")},t.ptm("footer")),[p(t.$slots,"footer")],16)):m("",!0)],16)};export{k as default};
1
+ import t from"primevue/icons/chevrondown";import e from"primevue/icons/chevronleft";import i from"primevue/icons/chevronright";import n from"primevue/icons/chevronup";import a from"primevue/ripple";import{DomHandler as o,UniqueComponentId as r}from"primevue/utils";import s from"primevue/basecomponent";import{useStyle as l}from"primevue/usestyle";import{resolveDirective as c,openBlock as u,createElementBlock as d,mergeProps as h,renderSlot as p,createCommentVNode as m,createElementVNode as f,withDirectives as v,createBlock as b,resolveDynamicComponent as g,Fragment as y,renderList as I}from"vue";var x=l("\n.p-carousel {\n display: flex;\n flex-direction: column;\n}\n\n.p-carousel-content {\n display: flex;\n flex-direction: column;\n overflow: auto;\n}\n\n.p-carousel-prev,\n.p-carousel-next {\n align-self: center;\n flex-grow: 0;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-carousel-container {\n display: flex;\n flex-direction: row;\n}\n\n.p-carousel-items-content {\n overflow: hidden;\n width: 100%;\n}\n\n.p-carousel-items-container {\n display: flex;\n flex-direction: row;\n}\n\n.p-carousel-indicators {\n display: flex;\n flex-direction: row;\n justify-content: center;\n flex-wrap: wrap;\n}\n\n.p-carousel-indicator > button {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* Vertical */\n.p-carousel-vertical .p-carousel-container {\n flex-direction: column;\n}\n\n.p-carousel-vertical .p-carousel-items-container {\n flex-direction: column;\n height: 100%;\n}\n\n/* Keyboard Support */\n.p-items-hidden .p-carousel-item {\n visibility: hidden;\n}\n\n.p-items-hidden .p-carousel-item.p-carousel-item-active {\n visibility: visible;\n}\n",{name:"carousel",manual:!0});function S(t){return V(t)||C(t)||w(t)||_()}function _(){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 w(t,e){if(t){if("string"==typeof t)return $(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)?$(t,e):void 0}}function C(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function V(t){if(Array.isArray(t))return $(t)}function $(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 k={name:"Carousel",extends:{name:"BaseCarousel",extends:s,props:{value:null,page:{type:Number,default:0},numVisible:{type:Number,default:1},numScroll:{type:Number,default:1},responsiveOptions:Array,orientation:{type:String,default:"horizontal"},verticalViewPortHeight:{type:String,default:"300px"},contentClass:String,containerClass:String,indicatorsContentClass:String,circular:{type:Boolean,default:!1},autoplayInterval:{type:Number,default:0},showNavigators:{type:Boolean,default:!0},showIndicators:{type:Boolean,default:!0},prevButtonProps:{type:null,default:null},nextButtonProps:{type:null,default:null}},css:{classes:{root:function(t){var e=t.instance;return["p-carousel p-component",{"p-carousel-vertical":e.isVertical(),"p-carousel-horizontal":!e.isVertical()}]},header:"p-carousel-header",content:"p-carousel-content",container:"p-carousel-container",previousButton:function(t){return["p-carousel-prev p-link",{"p-disabled":t.instance.backwardIsDisabled}]},previousButtonIcon:"p-carousel-next-icon",itemsContent:"p-carousel-items-content",itemsContainer:"p-carousel-items-container",itemCloned:function(t){var e=t.index,i=t.value,n=t.d_numVisible;return["p-carousel-item p-carousel-item-cloned",{"p-carousel-item-active":-1*t.totalShiftedItems===i.length+n,"p-carousel-item-start":0===e,"p-carousel-item-end":i.slice(-1*n).length-1===e}]},item:function(t){var e=t.instance,i=t.index;return["p-carousel-item",{"p-carousel-item-active":e.firstIndex()<=i&&e.lastIndex()>=i,"p-carousel-item-start":e.firstIndex()===i,"p-carousel-item-end":e.lastIndex()===i}]},nextButton:function(t){return["p-carousel-next p-link",{"p-disabled":t.instance.forwardIsDisabled}]},nextButtonIcon:"p-carousel-prev-icon",indicators:"p-carousel-indicators p-reset",indicator:function(t){return["p-carousel-indicator",{"p-highlight":t.instance.d_page===t.index}]},indicatorButton:"p-link",footer:"p-carousel-footer"},loadStyle:x.load},provide:function(){return{$parentInstance:this}}},emits:["update:page"],isRemainingItemsAdded:!1,data:function(){return{remainingItems:0,d_numVisible:this.numVisible,d_numScroll:this.numScroll,d_oldNumScroll:0,d_oldNumVisible:0,d_oldValue:null,d_page:this.page,totalShiftedItems:this.page*this.numScroll*-1,allowAutoplay:!!this.autoplayInterval,d_circular:this.circular||this.allowAutoplay,swipeThreshold:20}},watch:{page:function(t){this.d_page=t},circular:function(t){this.d_circular=t},numVisible:function(t,e){this.d_numVisible=t,this.d_oldNumVisible=e},numScroll:function(t,e){this.d_oldNumScroll=e,this.d_numScroll=t},value:function(t){this.d_oldValue=t}},mounted:function(){var t=!1;if(this.$el.setAttribute(this.attributeSelector,""),this.createStyle(),this.calculatePosition(),this.responsiveOptions&&this.bindDocumentListeners(),this.isCircular()){var e=this.totalShiftedItems;0===this.d_page?e=-1*this.d_numVisible:0===e&&(e=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),e!==this.totalShiftedItems&&(this.totalShiftedItems=e,t=!0)}!t&&this.isAutoplay()&&this.startAutoplay()},updated:function(){var t=this.isCircular(),e=!1,i=this.totalShiftedItems;if(this.autoplayInterval&&this.stopAutoplay(),this.d_oldNumScroll!==this.d_numScroll||this.d_oldNumVisible!==this.d_numVisible||this.d_oldValue.length!==this.value.length){this.remainingItems=(this.value.length-this.d_numVisible)%this.d_numScroll;var n=this.d_page;0!==this.totalIndicators&&n>=this.totalIndicators&&(this.$emit("update:page",n=this.totalIndicators-1),this.d_page=n,e=!0),i=n*this.d_numScroll*-1,t&&(i-=this.d_numVisible),n===this.totalIndicators-1&&this.remainingItems>0?(i+=-1*this.remainingItems+this.d_numScroll,this.isRemainingItemsAdded=!0):this.isRemainingItemsAdded=!1,i!==this.totalShiftedItems&&(this.totalShiftedItems=i,e=!0),this.d_oldNumScroll=this.d_numScroll,this.d_oldNumVisible=this.d_numVisible,this.d_oldValue=this.value,this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(i*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(i*(100/this.d_numVisible),"%, 0, 0)")}t&&(0===this.d_page?i=-1*this.d_numVisible:0===i&&(i=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),i!==this.totalShiftedItems&&(this.totalShiftedItems=i,e=!0)),!e&&this.isAutoplay()&&this.startAutoplay()},beforeUnmount:function(){this.responsiveOptions&&this.unbindDocumentListeners(),this.autoplayInterval&&this.stopAutoplay()},methods:{getIndicatorPTOptions:function(t){return{context:{highlighted:t===this.d_page}}},step:function(t,e){var i=this.totalShiftedItems,n=this.isCircular();null!=e?(i=this.d_numScroll*e*-1,n&&(i-=this.d_numVisible),this.isRemainingItemsAdded=!1):(i+=this.d_numScroll*t,this.isRemainingItemsAdded&&(i+=this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!1),e=Math.abs(Math.floor((n?i+this.d_numVisible:i)/this.d_numScroll)));n&&this.d_page===this.totalIndicators-1&&-1===t?(i=-1*(this.value.length+this.d_numVisible),e=0):n&&0===this.d_page&&1===t?(i=0,e=this.totalIndicators-1):e===this.totalIndicators-1&&this.remainingItems>0&&(i+=-1*this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!0),this.$refs.itemsContainer&&(!this.isUnstyled&&o.removeClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(i*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(i*(100/this.d_numVisible),"%, 0, 0)"),this.$refs.itemsContainer.style.transition="transform 500ms ease 0s"),this.totalShiftedItems=i,this.$emit("update:page",e),this.d_page=e},calculatePosition:function(){if(this.$refs.itemsContainer&&this.responsiveOptions){for(var t=window.innerWidth,e={numVisible:this.numVisible,numScroll:this.numScroll},i=0;i<this.responsiveOptions.length;i++){var n=this.responsiveOptions[i];parseInt(n.breakpoint,10)>=t&&(e=n)}if(this.d_numScroll!==e.numScroll){var a=this.d_page;a=parseInt(a*this.d_numScroll/e.numScroll),this.totalShiftedItems=e.numScroll*a*-1,this.isCircular()&&(this.totalShiftedItems-=e.numVisible),this.d_numScroll=e.numScroll,this.$emit("update:page",a),this.d_page=a}this.d_numVisible!==e.numVisible&&(this.d_numVisible=e.numVisible)}},navBackward:function(t,e){(this.d_circular||0!==this.d_page)&&this.step(1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()},navForward:function(t,e){(this.d_circular||this.d_page<this.totalIndicators-1)&&this.step(-1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()},onIndicatorClick:function(t,e){var i=this.d_page;e>i?this.navForward(t,e):e<i&&this.navBackward(t,e)},onTransitionEnd:function(){this.$refs.itemsContainer&&(!this.isUnstyled&&o.addClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transition="",0!==this.d_page&&this.d_page!==this.totalIndicators-1||!this.isCircular()||(this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(this.totalShiftedItems*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(this.totalShiftedItems*(100/this.d_numVisible),"%, 0, 0)")))},onTouchStart:function(t){var e=t.changedTouches[0];this.startPos={x:e.pageX,y:e.pageY}},onTouchMove:function(t){t.cancelable&&t.preventDefault()},onTouchEnd:function(t){var e=t.changedTouches[0];this.isVertical()?this.changePageOnTouch(t,e.pageY-this.startPos.y):this.changePageOnTouch(t,e.pageX-this.startPos.x)},changePageOnTouch:function(t,e){Math.abs(e)>this.swipeThreshold&&(e<0?this.navForward(t):this.navBackward(t))},onIndicatorKeydown:function(t){switch(t.code){case"ArrowRight":this.onRightKey();break;case"ArrowLeft":this.onLeftKey();break;case"Home":this.onHomeKey(),t.preventDefault();break;case"End":this.onEndKey(),t.preventDefault();break;case"ArrowUp":case"ArrowDown":t.preventDefault();break;case"Tab":this.onTabKey()}},onRightKey:function(){var t=S(o.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,e+1===t.length?t.length-1:e+1)},onLeftKey:function(){var t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,t-1<=0?0:t-1)},onHomeKey:function(){var t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,0)},onEndKey:function(){var t=S(o.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]r')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,t.length-1)},onTabKey:function(){var t=S(o.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=t.findIndex((function(t){return!0===o.getAttribute(t,"data-p-highlight")})),i=o.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]'),n=t.findIndex((function(t){return t===i.parentElement}));t[n].children[0].tabIndex="-1",t[e].children[0].tabIndex="0"},findFocusedIndicatorIndex:function(){var t=S(o.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=o.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]');return t.findIndex((function(t){return t===e.parentElement}))},changedFocusedIndicator:function(t,e){var i=S(o.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]'));i[t].children[0].tabIndex="-1",i[e].children[0].tabIndex="0",i[e].children[0].focus()},bindDocumentListeners:function(){var t=this;this.documentResizeListener||(this.documentResizeListener=function(e){t.calculatePosition(e)},window.addEventListener("resize",this.documentResizeListener))},unbindDocumentListeners:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)},startAutoplay:function(){var t=this;this.interval=setInterval((function(){t.step(-1,t.d_page===t.totalIndicators-1?0:t.d_page+1)}),this.autoplayInterval)},stopAutoplay:function(){this.interval&&clearInterval(this.interval)},createStyle:function(){var t;this.carouselStyle||(this.carouselStyle=document.createElement("style"),this.carouselStyle.type="text/css",o.setAttribute(this.carouselStyle,"nonce",null===(t=this.$primevue)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.csp)||void 0===t?void 0:t.nonce),document.body.appendChild(this.carouselStyle));var e="\n .p-carousel[".concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/this.d_numVisible,"%\n }\n ");if(this.responsiveOptions&&!this.isUnstyled){var i=S(this.responsiveOptions),n=new Intl.Collator(void 0,{numeric:!0}).compare;i.sort((function(t,e){var i=t.breakpoint,a=e.breakpoint;return-1*(null==i&&null!=a?-1:null!=i&&null==a?1:null==i&&null==a?0:"string"==typeof i&&"string"==typeof a?n(i,a):i<a?-1:i>a?1:0)}));for(var a=0;a<i.length;a++){var r=i[a];e+="\n @media screen and (max-width: ".concat(r.breakpoint,") {\n .p-carousel[").concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/r.numVisible,"%\n }\n }\n ")}}this.carouselStyle.innerHTML=e},isVertical:function(){return"vertical"===this.orientation},isCircular:function(){return this.value&&this.d_circular&&this.value.length>=this.d_numVisible},isAutoplay:function(){return this.autoplayInterval&&this.allowAutoplay},firstIndex:function(){return this.isCircular()?-1*(this.totalShiftedItems+this.d_numVisible):-1*this.totalShiftedItems},lastIndex:function(){return this.firstIndex()+this.d_numVisible-1},ariaSlideNumber:function(t){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slideNumber.replace(/{slideNumber}/g,t):void 0},ariaPageLabel:function(t){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,t):void 0}},computed:{totalIndicators:function(){return this.value?Math.max(Math.ceil((this.value.length-this.d_numVisible)/this.d_numScroll)+1,0):0},backwardIsDisabled:function(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&0===this.d_page},forwardIsDisabled:function(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&(this.d_page===this.totalIndicators-1||0===this.totalIndicators)},ariaSlideLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slide:void 0},ariaPrevButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.prevPageLabel:void 0},ariaNextButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.nextPageLabel:void 0},attributeSelector:function(){return r()}},components:{ChevronRightIcon:i,ChevronDownIcon:t,ChevronLeftIcon:e,ChevronUpIcon:n},directives:{ripple:a}};function A(t){return A="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},A(t)}function P(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 O(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?P(Object(i),!0).forEach((function(e){B(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):P(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function B(t,e,i){return(e=T(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function T(t){var e=L(t,"string");return"symbol"===A(e)?e:String(e)}function L(t,e){if("object"!==A(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!==A(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var D=["aria-live"],N=["disabled","aria-label"],j=["data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],R=["aria-hidden","aria-label","aria-roledescription","data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],E=["disabled","aria-label"],F=["data-p-highlight"],K=["tabindex","aria-label","aria-current","onClick"];k.render=function(t,e,i,n,a,o){var r=c("ripple");return u(),d("div",h({class:t.cx("root"),role:"region"},t.ptm("root")),[t.$slots.header?(u(),d("div",h({key:0,class:t.cx("header")},t.ptm("header")),[p(t.$slots,"header")],16)):m("",!0),f("div",h({class:[t.cx("content"),t.contentClass]},t.ptm("content")),[f("div",h({class:[t.cx("container"),t.containerClass],"aria-live":a.allowAutoplay?"polite":"off"},t.ptm("container")),[t.showNavigators?v((u(),d("button",h({key:0,type:"button",class:t.cx("previousButton"),disabled:o.backwardIsDisabled,"aria-label":o.ariaPrevButtonLabel,onClick:e[0]||(e[0]=function(){return o.navBackward&&o.navBackward.apply(o,arguments)})},O(O({},t.prevButtonProps),t.ptm("previousButton"))),[p(t.$slots,"previousicon",{},(function(){return[(u(),b(g(o.isVertical()?"ChevronUpIcon":"ChevronLeftIcon"),h({class:t.cx("previousButtonIcon")},t.ptm("previousButtonIcon")),null,16,["class"]))]}))],16,N)),[[r]]):m("",!0),f("div",h({class:t.cx("itemsContent"),style:[{height:o.isVertical()?t.verticalViewPortHeight:"auto"}],onTouchend:e[2]||(e[2]=function(){return o.onTouchEnd&&o.onTouchEnd.apply(o,arguments)}),onTouchstart:e[3]||(e[3]=function(){return o.onTouchStart&&o.onTouchStart.apply(o,arguments)}),onTouchmove:e[4]||(e[4]=function(){return o.onTouchMove&&o.onTouchMove.apply(o,arguments)})},t.ptm("itemsContent")),[f("div",h({ref:"itemsContainer",class:t.cx("itemsContainer"),onTransitionend:e[1]||(e[1]=function(){return o.onTransitionEnd&&o.onTransitionEnd.apply(o,arguments)})},t.ptm("itemsContainer")),[o.isCircular()?(u(!0),d(y,{key:0},I(t.value.slice(-1*a.d_numVisible),(function(e,i){return u(),d("div",h({key:i+"_scloned",class:t.cx("itemCloned",{index:i,value:t.value,totalShiftedItems:a.totalShiftedItems,d_numVisible:a.d_numVisible})},t.ptm("itemCloned"),{"data-p-carousel-item-active":-1*a.totalShiftedItems===t.value.length+a.d_numVisible,"data-p-carousel-item-start":0===i,"data-p-carousel-item-end":t.value.slice(-1*a.d_numVisible).length-1===i}),[p(t.$slots,"item",{data:e,index:i})],16,j)})),128)):m("",!0),(u(!0),d(y,null,I(t.value,(function(e,i){return u(),d("div",h({key:i,class:t.cx("item",{index:i}),role:"group","aria-hidden":o.firstIndex()>i||o.lastIndex()<i||void 0,"aria-label":o.ariaSlideNumber(i),"aria-roledescription":o.ariaSlideLabel},t.ptm("item"),{"data-p-carousel-item-active":o.firstIndex()<=i&&o.lastIndex()>=i,"data-p-carousel-item-start":o.firstIndex()===i,"data-p-carousel-item-end":o.lastIndex()===i}),[p(t.$slots,"item",{data:e,index:i})],16,R)})),128)),o.isCircular()?(u(!0),d(y,{key:1},I(t.value.slice(0,a.d_numVisible),(function(e,i){return u(),d("div",h({key:i+"_fcloned",class:t.cx("itemCloned",{index:i,value:t.value,totalShiftedItems:a.totalShiftedItems,d_numVisible:a.d_numVisible})},t.ptm("itemCloned")),[p(t.$slots,"item",{data:e,index:i})],16)})),128)):m("",!0)],16)],16),t.showNavigators?v((u(),d("button",h({key:1,type:"button",class:t.cx("nextButton"),disabled:o.forwardIsDisabled,"aria-label":o.ariaNextButtonLabel,onClick:e[5]||(e[5]=function(){return o.navForward&&o.navForward.apply(o,arguments)})},O(O({},t.nextButtonProps),t.ptm("nextButton"))),[p(t.$slots,"nexticon",{},(function(){return[(u(),b(g(o.isVertical()?"ChevronDownIcon":"ChevronRightIcon"),h({class:t.cx("nextButtonIcon")},t.ptm("nextButtonIcon")),null,16,["class"]))]}))],16,E)),[[r]]):m("",!0)],16,D),o.totalIndicators>=0&&t.showIndicators?(u(),d("ul",h({key:0,ref:"indicatorContent",class:[t.cx("indicators"),t.indicatorsContentClass],onKeydown:e[6]||(e[6]=function(){return o.onIndicatorKeydown&&o.onIndicatorKeydown.apply(o,arguments)})},t.ptm("indicators")),[(u(!0),d(y,null,I(o.totalIndicators,(function(e,i){return u(),d("li",h({key:"p-carousel-indicator-"+i.toString(),class:t.cx("indicator",{index:i})},t.ptm("indicator",o.getIndicatorPTOptions(i)),{"data-p-highlight":a.d_page===i}),[f("button",h({class:t.cx("indicatorButton"),type:"button",tabindex:a.d_page===i?"0":"-1","aria-label":o.ariaPageLabel(i+1),"aria-current":a.d_page===i?"page":void 0,onClick:function(t){return o.onIndicatorClick(t,i)}},t.ptm("indicatorButton",o.getIndicatorPTOptions(i))),null,16,K)],16,F)})),128))],16)):m("",!0)],16),t.$slots.footer?(u(),d("div",h({key:1,class:t.cx("footer")},t.ptm("footer")),[p(t.$slots,"footer")],16)):m("",!0)],16)};export{k as default};
@@ -522,13 +522,14 @@ this.primevue.carousel = (function (ChevronDownIcon, ChevronLeftIcon, ChevronRig
522
522
  var innerHTML = "\n .p-carousel[".concat(this.attributeSelector, "] .p-carousel-item {\n flex: 1 0 ").concat(100 / this.d_numVisible, "%\n }\n ");
523
523
  if (this.responsiveOptions && !this.isUnstyled) {
524
524
  var _responsiveOptions = _toConsumableArray(this.responsiveOptions);
525
+ var comparer = new Intl.Collator(undefined, {
526
+ numeric: true
527
+ }).compare;
525
528
  _responsiveOptions.sort(function (data1, data2) {
526
529
  var value1 = data1.breakpoint;
527
530
  var value2 = data2.breakpoint;
528
531
  var result = null;
529
- if (value1 == null && value2 != null) result = -1;else if (value1 != null && value2 == null) result = 1;else if (value1 == null && value2 == null) result = 0;else if (typeof value1 === 'string' && typeof value2 === 'string') result = value1.localeCompare(value2, undefined, {
530
- numeric: true
531
- });else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;
532
+ if (value1 == null && value2 != null) result = -1;else if (value1 != null && value2 == null) result = 1;else if (value1 == null && value2 == null) result = 0;else if (typeof value1 === 'string' && typeof value2 === 'string') result = comparer(value1, value2);else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;
532
533
  return -1 * result;
533
534
  });
534
535
  for (var i = 0; i < _responsiveOptions.length; i++) {
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.carousel=function(t,e,n,i,o,r,a,s,l){"use strict";function c(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var u=c(t),d=c(e),h=c(n),m=c(i),p=c(o),f=c(a),v=s.useStyle("\n.p-carousel {\n display: flex;\n flex-direction: column;\n}\n\n.p-carousel-content {\n display: flex;\n flex-direction: column;\n overflow: auto;\n}\n\n.p-carousel-prev,\n.p-carousel-next {\n align-self: center;\n flex-grow: 0;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-carousel-container {\n display: flex;\n flex-direction: row;\n}\n\n.p-carousel-items-content {\n overflow: hidden;\n width: 100%;\n}\n\n.p-carousel-items-container {\n display: flex;\n flex-direction: row;\n}\n\n.p-carousel-indicators {\n display: flex;\n flex-direction: row;\n justify-content: center;\n flex-wrap: wrap;\n}\n\n.p-carousel-indicator > button {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* Vertical */\n.p-carousel-vertical .p-carousel-container {\n flex-direction: column;\n}\n\n.p-carousel-vertical .p-carousel-items-container {\n flex-direction: column;\n height: 100%;\n}\n\n/* Keyboard Support */\n.p-items-hidden .p-carousel-item {\n visibility: hidden;\n}\n\n.p-items-hidden .p-carousel-item.p-carousel-item-active {\n visibility: visible;\n}\n",{name:"carousel",manual:!0});function g(t){return S(t)||I(t)||y(t)||b()}function b(){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 y(t,e){if(t){if("string"==typeof t)return x(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(t,e):void 0}}function I(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function S(t){if(Array.isArray(t))return x(t)}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var _={name:"Carousel",extends:{name:"BaseCarousel",extends:f.default,props:{value:null,page:{type:Number,default:0},numVisible:{type:Number,default:1},numScroll:{type:Number,default:1},responsiveOptions:Array,orientation:{type:String,default:"horizontal"},verticalViewPortHeight:{type:String,default:"300px"},contentClass:String,containerClass:String,indicatorsContentClass:String,circular:{type:Boolean,default:!1},autoplayInterval:{type:Number,default:0},showNavigators:{type:Boolean,default:!0},showIndicators:{type:Boolean,default:!0},prevButtonProps:{type:null,default:null},nextButtonProps:{type:null,default:null}},css:{classes:{root:function(t){var e=t.instance;return["p-carousel p-component",{"p-carousel-vertical":e.isVertical(),"p-carousel-horizontal":!e.isVertical()}]},header:"p-carousel-header",content:"p-carousel-content",container:"p-carousel-container",previousButton:function(t){return["p-carousel-prev p-link",{"p-disabled":t.instance.backwardIsDisabled}]},previousButtonIcon:"p-carousel-next-icon",itemsContent:"p-carousel-items-content",itemsContainer:"p-carousel-items-container",itemCloned:function(t){var e=t.index,n=t.value,i=t.d_numVisible;return["p-carousel-item p-carousel-item-cloned",{"p-carousel-item-active":-1*t.totalShiftedItems===n.length+i,"p-carousel-item-start":0===e,"p-carousel-item-end":n.slice(-1*i).length-1===e}]},item:function(t){var e=t.instance,n=t.index;return["p-carousel-item",{"p-carousel-item-active":e.firstIndex()<=n&&e.lastIndex()>=n,"p-carousel-item-start":e.firstIndex()===n,"p-carousel-item-end":e.lastIndex()===n}]},nextButton:function(t){return["p-carousel-next p-link",{"p-disabled":t.instance.forwardIsDisabled}]},nextButtonIcon:"p-carousel-prev-icon",indicators:"p-carousel-indicators p-reset",indicator:function(t){return["p-carousel-indicator",{"p-highlight":t.instance.d_page===t.index}]},indicatorButton:"p-link",footer:"p-carousel-footer"},loadStyle:v.load},provide:function(){return{$parentInstance:this}}},emits:["update:page"],isRemainingItemsAdded:!1,data:function(){return{remainingItems:0,d_numVisible:this.numVisible,d_numScroll:this.numScroll,d_oldNumScroll:0,d_oldNumVisible:0,d_oldValue:null,d_page:this.page,totalShiftedItems:this.page*this.numScroll*-1,allowAutoplay:!!this.autoplayInterval,d_circular:this.circular||this.allowAutoplay,swipeThreshold:20}},watch:{page:function(t){this.d_page=t},circular:function(t){this.d_circular=t},numVisible:function(t,e){this.d_numVisible=t,this.d_oldNumVisible=e},numScroll:function(t,e){this.d_oldNumScroll=e,this.d_numScroll=t},value:function(t){this.d_oldValue=t}},mounted:function(){var t=!1;if(this.$el.setAttribute(this.attributeSelector,""),this.createStyle(),this.calculatePosition(),this.responsiveOptions&&this.bindDocumentListeners(),this.isCircular()){var e=this.totalShiftedItems;0===this.d_page?e=-1*this.d_numVisible:0===e&&(e=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),e!==this.totalShiftedItems&&(this.totalShiftedItems=e,t=!0)}!t&&this.isAutoplay()&&this.startAutoplay()},updated:function(){var t=this.isCircular(),e=!1,n=this.totalShiftedItems;if(this.autoplayInterval&&this.stopAutoplay(),this.d_oldNumScroll!==this.d_numScroll||this.d_oldNumVisible!==this.d_numVisible||this.d_oldValue.length!==this.value.length){this.remainingItems=(this.value.length-this.d_numVisible)%this.d_numScroll;var i=this.d_page;0!==this.totalIndicators&&i>=this.totalIndicators&&(this.$emit("update:page",i=this.totalIndicators-1),this.d_page=i,e=!0),n=i*this.d_numScroll*-1,t&&(n-=this.d_numVisible),i===this.totalIndicators-1&&this.remainingItems>0?(n+=-1*this.remainingItems+this.d_numScroll,this.isRemainingItemsAdded=!0):this.isRemainingItemsAdded=!1,n!==this.totalShiftedItems&&(this.totalShiftedItems=n,e=!0),this.d_oldNumScroll=this.d_numScroll,this.d_oldNumVisible=this.d_numVisible,this.d_oldValue=this.value,this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(n*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(n*(100/this.d_numVisible),"%, 0, 0)")}t&&(0===this.d_page?n=-1*this.d_numVisible:0===n&&(n=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),n!==this.totalShiftedItems&&(this.totalShiftedItems=n,e=!0)),!e&&this.isAutoplay()&&this.startAutoplay()},beforeUnmount:function(){this.responsiveOptions&&this.unbindDocumentListeners(),this.autoplayInterval&&this.stopAutoplay()},methods:{getIndicatorPTOptions:function(t){return{context:{highlighted:t===this.d_page}}},step:function(t,e){var n=this.totalShiftedItems,i=this.isCircular();null!=e?(n=this.d_numScroll*e*-1,i&&(n-=this.d_numVisible),this.isRemainingItemsAdded=!1):(n+=this.d_numScroll*t,this.isRemainingItemsAdded&&(n+=this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!1),e=Math.abs(Math.floor((i?n+this.d_numVisible:n)/this.d_numScroll)));i&&this.d_page===this.totalIndicators-1&&-1===t?(n=-1*(this.value.length+this.d_numVisible),e=0):i&&0===this.d_page&&1===t?(n=0,e=this.totalIndicators-1):e===this.totalIndicators-1&&this.remainingItems>0&&(n+=-1*this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!0),this.$refs.itemsContainer&&(!this.isUnstyled&&r.DomHandler.removeClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(n*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(n*(100/this.d_numVisible),"%, 0, 0)"),this.$refs.itemsContainer.style.transition="transform 500ms ease 0s"),this.totalShiftedItems=n,this.$emit("update:page",e),this.d_page=e},calculatePosition:function(){if(this.$refs.itemsContainer&&this.responsiveOptions){for(var t=window.innerWidth,e={numVisible:this.numVisible,numScroll:this.numScroll},n=0;n<this.responsiveOptions.length;n++){var i=this.responsiveOptions[n];parseInt(i.breakpoint,10)>=t&&(e=i)}if(this.d_numScroll!==e.numScroll){var o=this.d_page;o=parseInt(o*this.d_numScroll/e.numScroll),this.totalShiftedItems=e.numScroll*o*-1,this.isCircular()&&(this.totalShiftedItems-=e.numVisible),this.d_numScroll=e.numScroll,this.$emit("update:page",o),this.d_page=o}this.d_numVisible!==e.numVisible&&(this.d_numVisible=e.numVisible)}},navBackward:function(t,e){(this.d_circular||0!==this.d_page)&&this.step(1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()},navForward:function(t,e){(this.d_circular||this.d_page<this.totalIndicators-1)&&this.step(-1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()},onIndicatorClick:function(t,e){var n=this.d_page;e>n?this.navForward(t,e):e<n&&this.navBackward(t,e)},onTransitionEnd:function(){this.$refs.itemsContainer&&(!this.isUnstyled&&r.DomHandler.addClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transition="",0!==this.d_page&&this.d_page!==this.totalIndicators-1||!this.isCircular()||(this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(this.totalShiftedItems*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(this.totalShiftedItems*(100/this.d_numVisible),"%, 0, 0)")))},onTouchStart:function(t){var e=t.changedTouches[0];this.startPos={x:e.pageX,y:e.pageY}},onTouchMove:function(t){t.cancelable&&t.preventDefault()},onTouchEnd:function(t){var e=t.changedTouches[0];this.isVertical()?this.changePageOnTouch(t,e.pageY-this.startPos.y):this.changePageOnTouch(t,e.pageX-this.startPos.x)},changePageOnTouch:function(t,e){Math.abs(e)>this.swipeThreshold&&(e<0?this.navForward(t):this.navBackward(t))},onIndicatorKeydown:function(t){switch(t.code){case"ArrowRight":this.onRightKey();break;case"ArrowLeft":this.onLeftKey();break;case"Home":this.onHomeKey(),t.preventDefault();break;case"End":this.onEndKey(),t.preventDefault();break;case"ArrowUp":case"ArrowDown":t.preventDefault();break;case"Tab":this.onTabKey()}},onRightKey:function(){var t=g(r.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,e+1===t.length?t.length-1:e+1)},onLeftKey:function(){var t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,t-1<=0?0:t-1)},onHomeKey:function(){var t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,0)},onEndKey:function(){var t=g(r.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]r')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,t.length-1)},onTabKey:function(){var t=g(r.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=t.findIndex((function(t){return!0===r.DomHandler.getAttribute(t,"data-p-highlight")})),n=r.DomHandler.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]'),i=t.findIndex((function(t){return t===n.parentElement}));t[i].children[0].tabIndex="-1",t[e].children[0].tabIndex="0"},findFocusedIndicatorIndex:function(){var t=g(r.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=r.DomHandler.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]');return t.findIndex((function(t){return t===e.parentElement}))},changedFocusedIndicator:function(t,e){var n=g(r.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]'));n[t].children[0].tabIndex="-1",n[e].children[0].tabIndex="0",n[e].children[0].focus()},bindDocumentListeners:function(){var t=this;this.documentResizeListener||(this.documentResizeListener=function(e){t.calculatePosition(e)},window.addEventListener("resize",this.documentResizeListener))},unbindDocumentListeners:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)},startAutoplay:function(){var t=this;this.interval=setInterval((function(){t.step(-1,t.d_page===t.totalIndicators-1?0:t.d_page+1)}),this.autoplayInterval)},stopAutoplay:function(){this.interval&&clearInterval(this.interval)},createStyle:function(){var t;this.carouselStyle||(this.carouselStyle=document.createElement("style"),this.carouselStyle.type="text/css",r.DomHandler.setAttribute(this.carouselStyle,"nonce",null===(t=this.$primevue)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.csp)||void 0===t?void 0:t.nonce),document.body.appendChild(this.carouselStyle));var e="\n .p-carousel[".concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/this.d_numVisible,"%\n }\n ");if(this.responsiveOptions&&!this.isUnstyled){var n=g(this.responsiveOptions);n.sort((function(t,e){var n=t.breakpoint,i=e.breakpoint;return-1*(null==n&&null!=i?-1:null!=n&&null==i?1:null==n&&null==i?0:"string"==typeof n&&"string"==typeof i?n.localeCompare(i,void 0,{numeric:!0}):n<i?-1:n>i?1:0)}));for(var i=0;i<n.length;i++){var o=n[i];e+="\n @media screen and (max-width: ".concat(o.breakpoint,") {\n .p-carousel[").concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/o.numVisible,"%\n }\n }\n ")}}this.carouselStyle.innerHTML=e},isVertical:function(){return"vertical"===this.orientation},isCircular:function(){return this.value&&this.d_circular&&this.value.length>=this.d_numVisible},isAutoplay:function(){return this.autoplayInterval&&this.allowAutoplay},firstIndex:function(){return this.isCircular()?-1*(this.totalShiftedItems+this.d_numVisible):-1*this.totalShiftedItems},lastIndex:function(){return this.firstIndex()+this.d_numVisible-1},ariaSlideNumber:function(t){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slideNumber.replace(/{slideNumber}/g,t):void 0},ariaPageLabel:function(t){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,t):void 0}},computed:{totalIndicators:function(){return this.value?Math.max(Math.ceil((this.value.length-this.d_numVisible)/this.d_numScroll)+1,0):0},backwardIsDisabled:function(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&0===this.d_page},forwardIsDisabled:function(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&(this.d_page===this.totalIndicators-1||0===this.totalIndicators)},ariaSlideLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slide:void 0},ariaPrevButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.prevPageLabel:void 0},ariaNextButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.nextPageLabel:void 0},attributeSelector:function(){return r.UniqueComponentId()}},components:{ChevronRightIcon:h.default,ChevronDownIcon:u.default,ChevronLeftIcon:d.default,ChevronUpIcon:m.default},directives:{ripple:p.default}};function C(t){return C="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},C(t)}function V(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function w(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?V(Object(n),!0).forEach((function(e){k(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function k(t,e,n){return(e=B(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function B(t){var e=P(t,"string");return"symbol"===C(e)?e:String(e)}function P(t,e){if("object"!==C(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==C(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var $=["aria-live"],A=["disabled","aria-label"],D=["data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],E=["aria-hidden","aria-label","aria-roledescription","data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],N=["disabled","aria-label"],O=["data-p-highlight"],L=["tabindex","aria-label","aria-current","onClick"];return _.render=function(t,e,n,i,o,r){var a=l.resolveDirective("ripple");return l.openBlock(),l.createElementBlock("div",l.mergeProps({class:t.cx("root"),role:"region"},t.ptm("root")),[t.$slots.header?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,class:t.cx("header")},t.ptm("header")),[l.renderSlot(t.$slots,"header")],16)):l.createCommentVNode("",!0),l.createElementVNode("div",l.mergeProps({class:[t.cx("content"),t.contentClass]},t.ptm("content")),[l.createElementVNode("div",l.mergeProps({class:[t.cx("container"),t.containerClass],"aria-live":o.allowAutoplay?"polite":"off"},t.ptm("container")),[t.showNavigators?l.withDirectives((l.openBlock(),l.createElementBlock("button",l.mergeProps({key:0,type:"button",class:t.cx("previousButton"),disabled:r.backwardIsDisabled,"aria-label":r.ariaPrevButtonLabel,onClick:e[0]||(e[0]=function(){return r.navBackward&&r.navBackward.apply(r,arguments)})},w(w({},t.prevButtonProps),t.ptm("previousButton"))),[l.renderSlot(t.$slots,"previousicon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(r.isVertical()?"ChevronUpIcon":"ChevronLeftIcon"),l.mergeProps({class:t.cx("previousButtonIcon")},t.ptm("previousButtonIcon")),null,16,["class"]))]}))],16,A)),[[a]]):l.createCommentVNode("",!0),l.createElementVNode("div",l.mergeProps({class:t.cx("itemsContent"),style:[{height:r.isVertical()?t.verticalViewPortHeight:"auto"}],onTouchend:e[2]||(e[2]=function(){return r.onTouchEnd&&r.onTouchEnd.apply(r,arguments)}),onTouchstart:e[3]||(e[3]=function(){return r.onTouchStart&&r.onTouchStart.apply(r,arguments)}),onTouchmove:e[4]||(e[4]=function(){return r.onTouchMove&&r.onTouchMove.apply(r,arguments)})},t.ptm("itemsContent")),[l.createElementVNode("div",l.mergeProps({ref:"itemsContainer",class:t.cx("itemsContainer"),onTransitionend:e[1]||(e[1]=function(){return r.onTransitionEnd&&r.onTransitionEnd.apply(r,arguments)})},t.ptm("itemsContainer")),[r.isCircular()?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:0},l.renderList(t.value.slice(-1*o.d_numVisible),(function(e,n){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:n+"_scloned",class:t.cx("itemCloned",{index:n,value:t.value,totalShiftedItems:o.totalShiftedItems,d_numVisible:o.d_numVisible})},t.ptm("itemCloned"),{"data-p-carousel-item-active":-1*o.totalShiftedItems===t.value.length+o.d_numVisible,"data-p-carousel-item-start":0===n,"data-p-carousel-item-end":t.value.slice(-1*o.d_numVisible).length-1===n}),[l.renderSlot(t.$slots,"item",{data:e,index:n})],16,D)})),128)):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.value,(function(e,n){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:n,class:t.cx("item",{index:n}),role:"group","aria-hidden":r.firstIndex()>n||r.lastIndex()<n||void 0,"aria-label":r.ariaSlideNumber(n),"aria-roledescription":r.ariaSlideLabel},t.ptm("item"),{"data-p-carousel-item-active":r.firstIndex()<=n&&r.lastIndex()>=n,"data-p-carousel-item-start":r.firstIndex()===n,"data-p-carousel-item-end":r.lastIndex()===n}),[l.renderSlot(t.$slots,"item",{data:e,index:n})],16,E)})),128)),r.isCircular()?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:1},l.renderList(t.value.slice(0,o.d_numVisible),(function(e,n){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:n+"_fcloned",class:t.cx("itemCloned",{index:n,value:t.value,totalShiftedItems:o.totalShiftedItems,d_numVisible:o.d_numVisible})},t.ptm("itemCloned")),[l.renderSlot(t.$slots,"item",{data:e,index:n})],16)})),128)):l.createCommentVNode("",!0)],16)],16),t.showNavigators?l.withDirectives((l.openBlock(),l.createElementBlock("button",l.mergeProps({key:1,type:"button",class:t.cx("nextButton"),disabled:r.forwardIsDisabled,"aria-label":r.ariaNextButtonLabel,onClick:e[5]||(e[5]=function(){return r.navForward&&r.navForward.apply(r,arguments)})},w(w({},t.nextButtonProps),t.ptm("nextButton"))),[l.renderSlot(t.$slots,"nexticon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(r.isVertical()?"ChevronDownIcon":"ChevronRightIcon"),l.mergeProps({class:t.cx("nextButtonIcon")},t.ptm("nextButtonIcon")),null,16,["class"]))]}))],16,N)),[[a]]):l.createCommentVNode("",!0)],16,$),r.totalIndicators>=0&&t.showIndicators?(l.openBlock(),l.createElementBlock("ul",l.mergeProps({key:0,ref:"indicatorContent",class:[t.cx("indicators"),t.indicatorsContentClass],onKeydown:e[6]||(e[6]=function(){return r.onIndicatorKeydown&&r.onIndicatorKeydown.apply(r,arguments)})},t.ptm("indicators")),[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.totalIndicators,(function(e,n){return l.openBlock(),l.createElementBlock("li",l.mergeProps({key:"p-carousel-indicator-"+n.toString(),class:t.cx("indicator",{index:n})},t.ptm("indicator",r.getIndicatorPTOptions(n)),{"data-p-highlight":o.d_page===n}),[l.createElementVNode("button",l.mergeProps({class:t.cx("indicatorButton"),type:"button",tabindex:o.d_page===n?"0":"-1","aria-label":r.ariaPageLabel(n+1),"aria-current":o.d_page===n?"page":void 0,onClick:function(t){return r.onIndicatorClick(t,n)}},t.ptm("indicatorButton",r.getIndicatorPTOptions(n))),null,16,L)],16,O)})),128))],16)):l.createCommentVNode("",!0)],16),t.$slots.footer?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:1,class:t.cx("footer")},t.ptm("footer")),[l.renderSlot(t.$slots,"footer")],16)):l.createCommentVNode("",!0)],16)},_}(primevue.icons.chevrondown,primevue.icons.chevronleft,primevue.icons.chevronright,primevue.icons.chevronup,primevue.ripple,primevue.utils,primevue.basecomponent,primevue.usestyle,Vue);
1
+ this.primevue=this.primevue||{},this.primevue.carousel=function(t,e,n,i,o,r,a,s,l){"use strict";function c(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var u=c(t),d=c(e),h=c(n),m=c(i),p=c(o),f=c(a),v=s.useStyle("\n.p-carousel {\n display: flex;\n flex-direction: column;\n}\n\n.p-carousel-content {\n display: flex;\n flex-direction: column;\n overflow: auto;\n}\n\n.p-carousel-prev,\n.p-carousel-next {\n align-self: center;\n flex-grow: 0;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-carousel-container {\n display: flex;\n flex-direction: row;\n}\n\n.p-carousel-items-content {\n overflow: hidden;\n width: 100%;\n}\n\n.p-carousel-items-container {\n display: flex;\n flex-direction: row;\n}\n\n.p-carousel-indicators {\n display: flex;\n flex-direction: row;\n justify-content: center;\n flex-wrap: wrap;\n}\n\n.p-carousel-indicator > button {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* Vertical */\n.p-carousel-vertical .p-carousel-container {\n flex-direction: column;\n}\n\n.p-carousel-vertical .p-carousel-items-container {\n flex-direction: column;\n height: 100%;\n}\n\n/* Keyboard Support */\n.p-items-hidden .p-carousel-item {\n visibility: hidden;\n}\n\n.p-items-hidden .p-carousel-item.p-carousel-item-active {\n visibility: visible;\n}\n",{name:"carousel",manual:!0});function g(t){return S(t)||I(t)||y(t)||b()}function b(){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 y(t,e){if(t){if("string"==typeof t)return x(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(t,e):void 0}}function I(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function S(t){if(Array.isArray(t))return x(t)}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var _={name:"Carousel",extends:{name:"BaseCarousel",extends:f.default,props:{value:null,page:{type:Number,default:0},numVisible:{type:Number,default:1},numScroll:{type:Number,default:1},responsiveOptions:Array,orientation:{type:String,default:"horizontal"},verticalViewPortHeight:{type:String,default:"300px"},contentClass:String,containerClass:String,indicatorsContentClass:String,circular:{type:Boolean,default:!1},autoplayInterval:{type:Number,default:0},showNavigators:{type:Boolean,default:!0},showIndicators:{type:Boolean,default:!0},prevButtonProps:{type:null,default:null},nextButtonProps:{type:null,default:null}},css:{classes:{root:function(t){var e=t.instance;return["p-carousel p-component",{"p-carousel-vertical":e.isVertical(),"p-carousel-horizontal":!e.isVertical()}]},header:"p-carousel-header",content:"p-carousel-content",container:"p-carousel-container",previousButton:function(t){return["p-carousel-prev p-link",{"p-disabled":t.instance.backwardIsDisabled}]},previousButtonIcon:"p-carousel-next-icon",itemsContent:"p-carousel-items-content",itemsContainer:"p-carousel-items-container",itemCloned:function(t){var e=t.index,n=t.value,i=t.d_numVisible;return["p-carousel-item p-carousel-item-cloned",{"p-carousel-item-active":-1*t.totalShiftedItems===n.length+i,"p-carousel-item-start":0===e,"p-carousel-item-end":n.slice(-1*i).length-1===e}]},item:function(t){var e=t.instance,n=t.index;return["p-carousel-item",{"p-carousel-item-active":e.firstIndex()<=n&&e.lastIndex()>=n,"p-carousel-item-start":e.firstIndex()===n,"p-carousel-item-end":e.lastIndex()===n}]},nextButton:function(t){return["p-carousel-next p-link",{"p-disabled":t.instance.forwardIsDisabled}]},nextButtonIcon:"p-carousel-prev-icon",indicators:"p-carousel-indicators p-reset",indicator:function(t){return["p-carousel-indicator",{"p-highlight":t.instance.d_page===t.index}]},indicatorButton:"p-link",footer:"p-carousel-footer"},loadStyle:v.load},provide:function(){return{$parentInstance:this}}},emits:["update:page"],isRemainingItemsAdded:!1,data:function(){return{remainingItems:0,d_numVisible:this.numVisible,d_numScroll:this.numScroll,d_oldNumScroll:0,d_oldNumVisible:0,d_oldValue:null,d_page:this.page,totalShiftedItems:this.page*this.numScroll*-1,allowAutoplay:!!this.autoplayInterval,d_circular:this.circular||this.allowAutoplay,swipeThreshold:20}},watch:{page:function(t){this.d_page=t},circular:function(t){this.d_circular=t},numVisible:function(t,e){this.d_numVisible=t,this.d_oldNumVisible=e},numScroll:function(t,e){this.d_oldNumScroll=e,this.d_numScroll=t},value:function(t){this.d_oldValue=t}},mounted:function(){var t=!1;if(this.$el.setAttribute(this.attributeSelector,""),this.createStyle(),this.calculatePosition(),this.responsiveOptions&&this.bindDocumentListeners(),this.isCircular()){var e=this.totalShiftedItems;0===this.d_page?e=-1*this.d_numVisible:0===e&&(e=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),e!==this.totalShiftedItems&&(this.totalShiftedItems=e,t=!0)}!t&&this.isAutoplay()&&this.startAutoplay()},updated:function(){var t=this.isCircular(),e=!1,n=this.totalShiftedItems;if(this.autoplayInterval&&this.stopAutoplay(),this.d_oldNumScroll!==this.d_numScroll||this.d_oldNumVisible!==this.d_numVisible||this.d_oldValue.length!==this.value.length){this.remainingItems=(this.value.length-this.d_numVisible)%this.d_numScroll;var i=this.d_page;0!==this.totalIndicators&&i>=this.totalIndicators&&(this.$emit("update:page",i=this.totalIndicators-1),this.d_page=i,e=!0),n=i*this.d_numScroll*-1,t&&(n-=this.d_numVisible),i===this.totalIndicators-1&&this.remainingItems>0?(n+=-1*this.remainingItems+this.d_numScroll,this.isRemainingItemsAdded=!0):this.isRemainingItemsAdded=!1,n!==this.totalShiftedItems&&(this.totalShiftedItems=n,e=!0),this.d_oldNumScroll=this.d_numScroll,this.d_oldNumVisible=this.d_numVisible,this.d_oldValue=this.value,this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(n*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(n*(100/this.d_numVisible),"%, 0, 0)")}t&&(0===this.d_page?n=-1*this.d_numVisible:0===n&&(n=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),n!==this.totalShiftedItems&&(this.totalShiftedItems=n,e=!0)),!e&&this.isAutoplay()&&this.startAutoplay()},beforeUnmount:function(){this.responsiveOptions&&this.unbindDocumentListeners(),this.autoplayInterval&&this.stopAutoplay()},methods:{getIndicatorPTOptions:function(t){return{context:{highlighted:t===this.d_page}}},step:function(t,e){var n=this.totalShiftedItems,i=this.isCircular();null!=e?(n=this.d_numScroll*e*-1,i&&(n-=this.d_numVisible),this.isRemainingItemsAdded=!1):(n+=this.d_numScroll*t,this.isRemainingItemsAdded&&(n+=this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!1),e=Math.abs(Math.floor((i?n+this.d_numVisible:n)/this.d_numScroll)));i&&this.d_page===this.totalIndicators-1&&-1===t?(n=-1*(this.value.length+this.d_numVisible),e=0):i&&0===this.d_page&&1===t?(n=0,e=this.totalIndicators-1):e===this.totalIndicators-1&&this.remainingItems>0&&(n+=-1*this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!0),this.$refs.itemsContainer&&(!this.isUnstyled&&r.DomHandler.removeClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(n*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(n*(100/this.d_numVisible),"%, 0, 0)"),this.$refs.itemsContainer.style.transition="transform 500ms ease 0s"),this.totalShiftedItems=n,this.$emit("update:page",e),this.d_page=e},calculatePosition:function(){if(this.$refs.itemsContainer&&this.responsiveOptions){for(var t=window.innerWidth,e={numVisible:this.numVisible,numScroll:this.numScroll},n=0;n<this.responsiveOptions.length;n++){var i=this.responsiveOptions[n];parseInt(i.breakpoint,10)>=t&&(e=i)}if(this.d_numScroll!==e.numScroll){var o=this.d_page;o=parseInt(o*this.d_numScroll/e.numScroll),this.totalShiftedItems=e.numScroll*o*-1,this.isCircular()&&(this.totalShiftedItems-=e.numVisible),this.d_numScroll=e.numScroll,this.$emit("update:page",o),this.d_page=o}this.d_numVisible!==e.numVisible&&(this.d_numVisible=e.numVisible)}},navBackward:function(t,e){(this.d_circular||0!==this.d_page)&&this.step(1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()},navForward:function(t,e){(this.d_circular||this.d_page<this.totalIndicators-1)&&this.step(-1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()},onIndicatorClick:function(t,e){var n=this.d_page;e>n?this.navForward(t,e):e<n&&this.navBackward(t,e)},onTransitionEnd:function(){this.$refs.itemsContainer&&(!this.isUnstyled&&r.DomHandler.addClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transition="",0!==this.d_page&&this.d_page!==this.totalIndicators-1||!this.isCircular()||(this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(this.totalShiftedItems*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(this.totalShiftedItems*(100/this.d_numVisible),"%, 0, 0)")))},onTouchStart:function(t){var e=t.changedTouches[0];this.startPos={x:e.pageX,y:e.pageY}},onTouchMove:function(t){t.cancelable&&t.preventDefault()},onTouchEnd:function(t){var e=t.changedTouches[0];this.isVertical()?this.changePageOnTouch(t,e.pageY-this.startPos.y):this.changePageOnTouch(t,e.pageX-this.startPos.x)},changePageOnTouch:function(t,e){Math.abs(e)>this.swipeThreshold&&(e<0?this.navForward(t):this.navBackward(t))},onIndicatorKeydown:function(t){switch(t.code){case"ArrowRight":this.onRightKey();break;case"ArrowLeft":this.onLeftKey();break;case"Home":this.onHomeKey(),t.preventDefault();break;case"End":this.onEndKey(),t.preventDefault();break;case"ArrowUp":case"ArrowDown":t.preventDefault();break;case"Tab":this.onTabKey()}},onRightKey:function(){var t=g(r.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,e+1===t.length?t.length-1:e+1)},onLeftKey:function(){var t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,t-1<=0?0:t-1)},onHomeKey:function(){var t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,0)},onEndKey:function(){var t=g(r.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]r')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,t.length-1)},onTabKey:function(){var t=g(r.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=t.findIndex((function(t){return!0===r.DomHandler.getAttribute(t,"data-p-highlight")})),n=r.DomHandler.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]'),i=t.findIndex((function(t){return t===n.parentElement}));t[i].children[0].tabIndex="-1",t[e].children[0].tabIndex="0"},findFocusedIndicatorIndex:function(){var t=g(r.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=r.DomHandler.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]');return t.findIndex((function(t){return t===e.parentElement}))},changedFocusedIndicator:function(t,e){var n=g(r.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]'));n[t].children[0].tabIndex="-1",n[e].children[0].tabIndex="0",n[e].children[0].focus()},bindDocumentListeners:function(){var t=this;this.documentResizeListener||(this.documentResizeListener=function(e){t.calculatePosition(e)},window.addEventListener("resize",this.documentResizeListener))},unbindDocumentListeners:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)},startAutoplay:function(){var t=this;this.interval=setInterval((function(){t.step(-1,t.d_page===t.totalIndicators-1?0:t.d_page+1)}),this.autoplayInterval)},stopAutoplay:function(){this.interval&&clearInterval(this.interval)},createStyle:function(){var t;this.carouselStyle||(this.carouselStyle=document.createElement("style"),this.carouselStyle.type="text/css",r.DomHandler.setAttribute(this.carouselStyle,"nonce",null===(t=this.$primevue)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.csp)||void 0===t?void 0:t.nonce),document.body.appendChild(this.carouselStyle));var e="\n .p-carousel[".concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/this.d_numVisible,"%\n }\n ");if(this.responsiveOptions&&!this.isUnstyled){var n=g(this.responsiveOptions),i=new Intl.Collator(void 0,{numeric:!0}).compare;n.sort((function(t,e){var n=t.breakpoint,o=e.breakpoint;return-1*(null==n&&null!=o?-1:null!=n&&null==o?1:null==n&&null==o?0:"string"==typeof n&&"string"==typeof o?i(n,o):n<o?-1:n>o?1:0)}));for(var o=0;o<n.length;o++){var a=n[o];e+="\n @media screen and (max-width: ".concat(a.breakpoint,") {\n .p-carousel[").concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/a.numVisible,"%\n }\n }\n ")}}this.carouselStyle.innerHTML=e},isVertical:function(){return"vertical"===this.orientation},isCircular:function(){return this.value&&this.d_circular&&this.value.length>=this.d_numVisible},isAutoplay:function(){return this.autoplayInterval&&this.allowAutoplay},firstIndex:function(){return this.isCircular()?-1*(this.totalShiftedItems+this.d_numVisible):-1*this.totalShiftedItems},lastIndex:function(){return this.firstIndex()+this.d_numVisible-1},ariaSlideNumber:function(t){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slideNumber.replace(/{slideNumber}/g,t):void 0},ariaPageLabel:function(t){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,t):void 0}},computed:{totalIndicators:function(){return this.value?Math.max(Math.ceil((this.value.length-this.d_numVisible)/this.d_numScroll)+1,0):0},backwardIsDisabled:function(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&0===this.d_page},forwardIsDisabled:function(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&(this.d_page===this.totalIndicators-1||0===this.totalIndicators)},ariaSlideLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slide:void 0},ariaPrevButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.prevPageLabel:void 0},ariaNextButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.nextPageLabel:void 0},attributeSelector:function(){return r.UniqueComponentId()}},components:{ChevronRightIcon:h.default,ChevronDownIcon:u.default,ChevronLeftIcon:d.default,ChevronUpIcon:m.default},directives:{ripple:p.default}};function C(t){return C="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},C(t)}function V(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function w(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?V(Object(n),!0).forEach((function(e){k(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function k(t,e,n){return(e=B(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function B(t){var e=P(t,"string");return"symbol"===C(e)?e:String(e)}function P(t,e){if("object"!==C(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==C(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var $=["aria-live"],A=["disabled","aria-label"],D=["data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],E=["aria-hidden","aria-label","aria-roledescription","data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],N=["disabled","aria-label"],O=["data-p-highlight"],L=["tabindex","aria-label","aria-current","onClick"];return _.render=function(t,e,n,i,o,r){var a=l.resolveDirective("ripple");return l.openBlock(),l.createElementBlock("div",l.mergeProps({class:t.cx("root"),role:"region"},t.ptm("root")),[t.$slots.header?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,class:t.cx("header")},t.ptm("header")),[l.renderSlot(t.$slots,"header")],16)):l.createCommentVNode("",!0),l.createElementVNode("div",l.mergeProps({class:[t.cx("content"),t.contentClass]},t.ptm("content")),[l.createElementVNode("div",l.mergeProps({class:[t.cx("container"),t.containerClass],"aria-live":o.allowAutoplay?"polite":"off"},t.ptm("container")),[t.showNavigators?l.withDirectives((l.openBlock(),l.createElementBlock("button",l.mergeProps({key:0,type:"button",class:t.cx("previousButton"),disabled:r.backwardIsDisabled,"aria-label":r.ariaPrevButtonLabel,onClick:e[0]||(e[0]=function(){return r.navBackward&&r.navBackward.apply(r,arguments)})},w(w({},t.prevButtonProps),t.ptm("previousButton"))),[l.renderSlot(t.$slots,"previousicon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(r.isVertical()?"ChevronUpIcon":"ChevronLeftIcon"),l.mergeProps({class:t.cx("previousButtonIcon")},t.ptm("previousButtonIcon")),null,16,["class"]))]}))],16,A)),[[a]]):l.createCommentVNode("",!0),l.createElementVNode("div",l.mergeProps({class:t.cx("itemsContent"),style:[{height:r.isVertical()?t.verticalViewPortHeight:"auto"}],onTouchend:e[2]||(e[2]=function(){return r.onTouchEnd&&r.onTouchEnd.apply(r,arguments)}),onTouchstart:e[3]||(e[3]=function(){return r.onTouchStart&&r.onTouchStart.apply(r,arguments)}),onTouchmove:e[4]||(e[4]=function(){return r.onTouchMove&&r.onTouchMove.apply(r,arguments)})},t.ptm("itemsContent")),[l.createElementVNode("div",l.mergeProps({ref:"itemsContainer",class:t.cx("itemsContainer"),onTransitionend:e[1]||(e[1]=function(){return r.onTransitionEnd&&r.onTransitionEnd.apply(r,arguments)})},t.ptm("itemsContainer")),[r.isCircular()?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:0},l.renderList(t.value.slice(-1*o.d_numVisible),(function(e,n){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:n+"_scloned",class:t.cx("itemCloned",{index:n,value:t.value,totalShiftedItems:o.totalShiftedItems,d_numVisible:o.d_numVisible})},t.ptm("itemCloned"),{"data-p-carousel-item-active":-1*o.totalShiftedItems===t.value.length+o.d_numVisible,"data-p-carousel-item-start":0===n,"data-p-carousel-item-end":t.value.slice(-1*o.d_numVisible).length-1===n}),[l.renderSlot(t.$slots,"item",{data:e,index:n})],16,D)})),128)):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.value,(function(e,n){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:n,class:t.cx("item",{index:n}),role:"group","aria-hidden":r.firstIndex()>n||r.lastIndex()<n||void 0,"aria-label":r.ariaSlideNumber(n),"aria-roledescription":r.ariaSlideLabel},t.ptm("item"),{"data-p-carousel-item-active":r.firstIndex()<=n&&r.lastIndex()>=n,"data-p-carousel-item-start":r.firstIndex()===n,"data-p-carousel-item-end":r.lastIndex()===n}),[l.renderSlot(t.$slots,"item",{data:e,index:n})],16,E)})),128)),r.isCircular()?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:1},l.renderList(t.value.slice(0,o.d_numVisible),(function(e,n){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:n+"_fcloned",class:t.cx("itemCloned",{index:n,value:t.value,totalShiftedItems:o.totalShiftedItems,d_numVisible:o.d_numVisible})},t.ptm("itemCloned")),[l.renderSlot(t.$slots,"item",{data:e,index:n})],16)})),128)):l.createCommentVNode("",!0)],16)],16),t.showNavigators?l.withDirectives((l.openBlock(),l.createElementBlock("button",l.mergeProps({key:1,type:"button",class:t.cx("nextButton"),disabled:r.forwardIsDisabled,"aria-label":r.ariaNextButtonLabel,onClick:e[5]||(e[5]=function(){return r.navForward&&r.navForward.apply(r,arguments)})},w(w({},t.nextButtonProps),t.ptm("nextButton"))),[l.renderSlot(t.$slots,"nexticon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(r.isVertical()?"ChevronDownIcon":"ChevronRightIcon"),l.mergeProps({class:t.cx("nextButtonIcon")},t.ptm("nextButtonIcon")),null,16,["class"]))]}))],16,N)),[[a]]):l.createCommentVNode("",!0)],16,$),r.totalIndicators>=0&&t.showIndicators?(l.openBlock(),l.createElementBlock("ul",l.mergeProps({key:0,ref:"indicatorContent",class:[t.cx("indicators"),t.indicatorsContentClass],onKeydown:e[6]||(e[6]=function(){return r.onIndicatorKeydown&&r.onIndicatorKeydown.apply(r,arguments)})},t.ptm("indicators")),[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.totalIndicators,(function(e,n){return l.openBlock(),l.createElementBlock("li",l.mergeProps({key:"p-carousel-indicator-"+n.toString(),class:t.cx("indicator",{index:n})},t.ptm("indicator",r.getIndicatorPTOptions(n)),{"data-p-highlight":o.d_page===n}),[l.createElementVNode("button",l.mergeProps({class:t.cx("indicatorButton"),type:"button",tabindex:o.d_page===n?"0":"-1","aria-label":r.ariaPageLabel(n+1),"aria-current":o.d_page===n?"page":void 0,onClick:function(t){return r.onIndicatorClick(t,n)}},t.ptm("indicatorButton",r.getIndicatorPTOptions(n))),null,16,L)],16,O)})),128))],16)):l.createCommentVNode("",!0)],16),t.$slots.footer?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:1,class:t.cx("footer")},t.ptm("footer")),[l.renderSlot(t.$slots,"footer")],16)):l.createCommentVNode("",!0)],16)},_}(primevue.icons.chevrondown,primevue.icons.chevronleft,primevue.icons.chevronright,primevue.icons.chevronup,primevue.ripple,primevue.utils,primevue.basecomponent,primevue.usestyle,Vue);
@@ -9,7 +9,7 @@
9
9
  */
10
10
  import { HTMLAttributes, InputHTMLAttributes, TransitionProps, VNode } from 'vue';
11
11
  import { ComponentHooks } from '../basecomponent';
12
- import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
12
+ import { ClassComponent, GlobalComponentConstructor, PTOptions } from '../ts-helpers';
13
13
 
14
14
  export declare type CascadeSelectPassThroughOptionType = CascadeSelectPassThroughAttributes | ((options: CascadeSelectPassThroughMethodOptions) => CascadeSelectPassThroughAttributes | string) | string | null | undefined;
15
15
 
@@ -325,7 +325,7 @@ export interface CascadeSelectProps {
325
325
  * Used to pass attributes to DOM elements inside the component.
326
326
  * @type {CascadeSelectPassThroughOptions}
327
327
  */
328
- pt?: CascadeSelectPassThroughOptions;
328
+ pt?: PTOptions<CascadeSelectPassThroughOptions>;
329
329
  /**
330
330
  * When enabled, it removes component related styles in the core.
331
331
  * @defaultValue false
package/chart/Chart.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  */
10
10
  import { CanvasHTMLAttributes } from 'vue';
11
11
  import { ComponentHooks } from '../basecomponent';
12
- import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
12
+ import { ClassComponent, GlobalComponentConstructor, PTOptions } from '../ts-helpers';
13
13
 
14
14
  export declare type ChartPassThroughOptionType = ChartPassThroughAttributes | ((options: ChartPassThroughMethodOptions) => ChartPassThroughAttributes | string) | string | null | undefined;
15
15
 
@@ -105,7 +105,7 @@ export interface ChartProps {
105
105
  * Used to pass attributes to DOM elements inside the component.
106
106
  * @type {ChartPassThroughOptions}
107
107
  */
108
- pt?: ChartPassThroughOptions;
108
+ pt?: PTOptions<ChartPassThroughOptions>;
109
109
  /**
110
110
  * When enabled, it removes component related styles in the core.
111
111
  * @defaultValue false
@@ -9,7 +9,7 @@
9
9
  */
10
10
  import { InputHTMLAttributes, VNode } from 'vue';
11
11
  import { ComponentHooks } from '../basecomponent';
12
- import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
12
+ import { ClassComponent, GlobalComponentConstructor, PTOptions } from '../ts-helpers';
13
13
 
14
14
  export declare type CheckboxPassThroughOptionType = CheckboxPassThroughAttributes | ((options: CheckboxPassThroughMethodOptions) => CheckboxPassThroughAttributes | string) | string | null | undefined;
15
15
 
@@ -151,7 +151,7 @@ export interface CheckboxProps {
151
151
  * Used to pass attributes to DOM elements inside the component.
152
152
  * @type {CheckboxPassThroughOptions}
153
153
  */
154
- pt?: CheckboxPassThroughOptions;
154
+ pt?: PTOptions<CheckboxPassThroughOptions>;
155
155
  /**
156
156
  * When enabled, it removes component related styles in the core.
157
157
  * @defaultValue false
package/chip/Chip.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  */
10
10
  import { VNode } from 'vue';
11
11
  import { ComponentHooks } from '../basecomponent';
12
- import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
12
+ import { ClassComponent, GlobalComponentConstructor, PTOptions } from '../ts-helpers';
13
13
 
14
14
  export declare type ChipPassThroughOptionType = ChipPassThroughAttributes | ((options: ChipPassThroughMethodOptions) => ChipPassThroughAttributes | string) | string | null | undefined;
15
15
 
@@ -103,7 +103,7 @@ export interface ChipProps {
103
103
  * Used to pass attributes to DOM elements inside the component.
104
104
  * @type {ChipPassThroughOptions}
105
105
  */
106
- pt?: ChipPassThroughOptions;
106
+ pt?: PTOptions<ChipPassThroughOptions>;
107
107
  /**
108
108
  * When enabled, it removes component related styles in the core.
109
109
  * @defaultValue false
@@ -130,12 +130,14 @@ export interface ChipSlots {
130
130
  removeicon(scope: {
131
131
  /**
132
132
  * Remove icon click event
133
+ * @param {Event} event - Browser event
133
134
  */
134
- onClick(): void;
135
+ onClick: (event: Event) => void;
135
136
  /**
136
137
  * Remove icon keydown event
138
+ * @param {Event} event - Browser event
137
139
  */
138
- onKeydown(): void;
140
+ onKeydown: (event: Event) => void;
139
141
  }): VNode[];
140
142
  }
141
143
 
package/chips/Chips.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  */
10
10
  import { InputHTMLAttributes, VNode } from 'vue';
11
11
  import { ComponentHooks } from '../basecomponent';
12
- import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
12
+ import { ClassComponent, GlobalComponentConstructor, PTOptions } from '../ts-helpers';
13
13
 
14
14
  export declare type ChipsPassThroughOptionType = ChipsPassThroughAttributes | ((options: ChipsPassThroughMethodOptions) => ChipsPassThroughAttributes | string) | string | null | undefined;
15
15
 
@@ -182,7 +182,7 @@ export interface ChipsProps {
182
182
  * Used to pass attributes to DOM elements inside the component.
183
183
  * @type {ChipsPassThroughOptions}
184
184
  */
185
- pt?: ChipsPassThroughOptions;
185
+ pt?: PTOptions<ChipsPassThroughOptions>;
186
186
  /**
187
187
  * When enabled, it removes component related styles in the core.
188
188
  * @defaultValue false
@@ -209,9 +209,18 @@ export interface ChipsSlots {
209
209
  */
210
210
  removetokenicon(scope: {
211
211
  /**
212
- * Remove icon click event
212
+ * Style class of the icon.
213
213
  */
214
- onClick(): void;
214
+ class: string;
215
+ /**
216
+ * Index of the token.
217
+ */
218
+ index: number;
219
+ /**
220
+ * Remove token icon function.
221
+ * @param {Event} event - Browser event
222
+ */
223
+ onClick: (event: Event, index: number) => void;
215
224
  }): VNode[];
216
225
  }
217
226
  /**
package/chips/Chips.vue CHANGED
@@ -31,7 +31,7 @@
31
31
  <slot name="chip" :class="cx('label')" :value="val">
32
32
  <span :class="cx('label')" v-bind="ptm('label')">{{ val }}</span>
33
33
  </slot>
34
- <slot name="removetokenicon" :class="cx('removeTokenIcon')" :onClick="(event) => removeItem(event, i)">
34
+ <slot name="removetokenicon" :class="cx('removeTokenIcon')" :index="i" :onClick="(event) => removeItem(event, i)">
35
35
  <component :is="removeTokenIcon ? 'span' : 'TimesCircleIcon'" :class="[cx('removeTokenIcon'), removeTokenIcon]" @click="removeItem($event, i)" aria-hidden="true" v-bind="ptm('removeTokenIcon')" />
36
36
  </slot>
37
37
  </li>
@@ -350,6 +350,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
350
350
  }, _ctx.ptm('label')), vue.toDisplayString(val), 17)];
351
351
  }), vue.renderSlot(_ctx.$slots, "removetokenicon", {
352
352
  "class": vue.normalizeClass(_ctx.cx('removeTokenIcon')),
353
+ index: i,
353
354
  onClick: function onClick(event) {
354
355
  return $options.removeItem(event, i);
355
356
  }
@@ -1 +1 @@
1
- "use strict";var e=require("primevue/icons/timescircle"),n=require("primevue/utils"),t=require("primevue/basecomponent"),o=require("primevue/usestyle"),r=require("vue");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=i(e),a=i(t),u=o.useStyle("\n.p-chips {\n display: inline-flex;\n}\n\n.p-chips-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n}\n\n.p-chips-token {\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n}\n\n.p-chips-input-token {\n flex: 1 1 auto;\n display: inline-flex;\n}\n\n.p-chips-token-icon {\n cursor: pointer;\n}\n\n.p-chips-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n}\n\n.p-fluid .p-chips {\n display: flex;\n}\n",{name:"chips",manual:!0});function s(e){return f(e)||d(e)||p(e)||c()}function c(){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 p(e,n){if(e){if("string"==typeof e)return m(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?m(e,n):void 0}}function d(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function f(e){if(Array.isArray(e))return m(e)}function m(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=new Array(n);t<n;t++)o[t]=e[t];return o}var h={name:"Chips",extends:{name:"BaseChips",extends:a.default,props:{modelValue:{type:Array,default:null},max:{type:Number,default:null},separator:{type:[String,Object],default:null},addOnBlur:{type:Boolean,default:null},allowDuplicate:{type:Boolean,default:!0},placeholder:{type:String,default:null},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},removeTokenIcon:{type:String,default:void 0},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:{root:function(e){var n=e.instance,t=e.props;return["p-chips p-component p-inputwrapper",{"p-disabled":t.disabled,"p-focus":n.focused,"p-inputwrapper-filled":t.modelValue&&t.modelValue.length||n.inputValue&&n.inputValue.length,"p-inputwrapper-focus":n.focused}]},container:"p-inputtext p-chips-multiple-container",token:function(e){return["p-chips-token",{"p-focus":e.state.focusedIndex===e.index}]},label:"p-chips-token-label",removeTokenIcon:"p-chips-token-icon",inputToken:"p-chips-input-token"},loadStyle:u.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","add","remove","focus","blur"],data:function(){return{id:n.UniqueComponentId(),inputValue:null,focused:!1,focusedIndex:null}},methods:{onWrapperClick:function(){this.$refs.input.focus()},onInput:function(e){this.inputValue=e.target.value,this.focusedIndex=null},onFocus:function(e){this.focused=!0,this.focusedIndex=null,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedIndex=null,this.addOnBlur&&this.addItem(e,e.target.value,!1),this.$emit("blur",e)},onKeyDown:function(e){var n=e.target.value;switch(e.code){case"Backspace":0===n.length&&this.modelValue&&this.modelValue.length>0&&this.removeItem(e,null!==this.focusedIndex?this.focusedIndex:this.modelValue.length-1);break;case"Enter":n&&n.trim().length&&!this.maxedOut&&this.addItem(e,n,!0);break;case"ArrowLeft":0===n.length&&this.modelValue&&this.modelValue.length>0&&this.$refs.container.focus();break;case"ArrowRight":e.stopPropagation();break;default:this.separator&&(this.separator===e.key||e.key.match(this.separator))&&this.addItem(e,n,!0)}},onPaste:function(e){var n=this;if(this.separator){var t=(e.clipboardData||window.clipboardData).getData("Text");if(t){var o=this.modelValue||[],r=t.split(this.separator);r=r.filter((function(e){return n.allowDuplicate||-1===o.indexOf(e)})),o=[].concat(s(o),s(r)),this.updateModel(e,o,!0)}}},onContainerFocus:function(){this.focused=!0},onContainerBlur:function(){this.focusedIndex=-1,this.focused=!1},onContainerKeyDown:function(e){switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOn(e);break;case"ArrowRight":this.onArrowRightKeyOn(e);break;case"Backspace":this.onBackspaceKeyOn(e)}},onArrowLeftKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex=null===this.focusedIndex?this.modelValue.length-1:this.focusedIndex-1,this.focusedIndex<0&&(this.focusedIndex=0))},onArrowRightKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex===this.modelValue.length-1?(this.focusedIndex=null,this.$refs.input.focus()):this.focusedIndex++)},onBackspaceKeyOn:function(e){null!==this.focusedIndex&&this.removeItem(e,this.focusedIndex)},updateModel:function(e,n,t){var o=this;this.$emit("update:modelValue",n),this.$emit("add",{originalEvent:e,value:n}),this.$refs.input.value="",this.inputValue="",setTimeout((function(){o.maxedOut&&(o.focused=!1)}),0),t&&e.preventDefault()},addItem:function(e,n,t){if(n&&n.trim().length){var o=this.modelValue?s(this.modelValue):[];(this.allowDuplicate||-1===o.indexOf(n))&&(o.push(n),this.updateModel(e,o,t))}},removeItem:function(e,n){if(!this.disabled){var t=s(this.modelValue),o=t.splice(n,1);this.focusedIndex=null,this.$refs.input.focus(),this.$emit("update:modelValue",t),this.$emit("remove",{originalEvent:e,value:o})}}},computed:{maxedOut:function(){return this.max&&this.modelValue&&this.max===this.modelValue.length},focusedOptionId:function(){return null!==this.focusedIndex?"".concat(this.id,"_chips_item_").concat(this.focusedIndex):null}},components:{TimesCircleIcon:l.default}};function y(e){return y="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},y(e)}function b(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function g(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?b(Object(t),!0).forEach((function(n){v(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):b(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function v(e,n,t){return(n=x(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function x(e){var n=I(e,"string");return"symbol"===y(n)?n:String(n)}function I(e,n){if("object"!==y(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,n||"default");if("object"!==y(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}var k=["aria-labelledby","aria-label","aria-activedescendant"],w=["id","aria-label","aria-setsize","aria-posinset","data-p-focused"],O=["id","disabled","placeholder"];h.render=function(e,n,t,o,i,l){return r.openBlock(),r.createElementBlock("div",r.mergeProps({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"chips"}),[r.createElementVNode("ul",r.mergeProps({ref:"container",class:e.cx("container"),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-activedescendant":i.focused?l.focusedOptionId:void 0,onClick:n[5]||(n[5]=function(e){return l.onWrapperClick()}),onFocus:n[6]||(n[6]=function(){return l.onContainerFocus&&l.onContainerFocus.apply(l,arguments)}),onBlur:n[7]||(n[7]=function(){return l.onContainerBlur&&l.onContainerBlur.apply(l,arguments)}),onKeydown:n[8]||(n[8]=function(){return l.onContainerKeyDown&&l.onContainerKeyDown.apply(l,arguments)})},e.ptm("container")),[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.modelValue,(function(n,t){return r.openBlock(),r.createElementBlock("li",r.mergeProps({key:"".concat(t,"_").concat(n),id:i.id+"_chips_item_"+t,role:"option",class:e.cx("token",{index:t}),"aria-label":n,"aria-selected":!0,"aria-setsize":e.modelValue.length,"aria-posinset":t+1},e.ptm("token"),{"data-p-focused":i.focusedIndex===t}),[r.renderSlot(e.$slots,"chip",{class:r.normalizeClass(e.cx("label")),value:n},(function(){return[r.createElementVNode("span",r.mergeProps({class:e.cx("label")},e.ptm("label")),r.toDisplayString(n),17)]})),r.renderSlot(e.$slots,"removetokenicon",{class:r.normalizeClass(e.cx("removeTokenIcon")),onClick:function(e){return l.removeItem(e,t)}},(function(){return[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(e.removeTokenIcon?"span":"TimesCircleIcon"),r.mergeProps({class:[e.cx("removeTokenIcon"),e.removeTokenIcon],onClick:function(e){return l.removeItem(e,t)},"aria-hidden":"true"},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]}))],16,w)})),128)),r.createElementVNode("li",r.mergeProps({class:e.cx("inputToken"),role:"option"},e.ptm("inputToken")),[r.createElementVNode("input",r.mergeProps({ref:"input",id:e.inputId,type:"text",class:e.inputClass,style:e.inputStyle,disabled:e.disabled||l.maxedOut,placeholder:e.placeholder,onFocus:n[0]||(n[0]=function(e){return l.onFocus(e)}),onBlur:n[1]||(n[1]=function(e){return l.onBlur(e)}),onInput:n[2]||(n[2]=function(){return l.onInput&&l.onInput.apply(l,arguments)}),onKeydown:n[3]||(n[3]=function(e){return l.onKeyDown(e)}),onPaste:n[4]||(n[4]=function(e){return l.onPaste(e)})},g(g({},e.inputProps),e.ptm("input"))),null,16,O)],16)],16,k)],16)},module.exports=h;
1
+ "use strict";var e=require("primevue/icons/timescircle"),n=require("primevue/utils"),t=require("primevue/basecomponent"),o=require("primevue/usestyle"),r=require("vue");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=i(e),a=i(t),u=o.useStyle("\n.p-chips {\n display: inline-flex;\n}\n\n.p-chips-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n}\n\n.p-chips-token {\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n}\n\n.p-chips-input-token {\n flex: 1 1 auto;\n display: inline-flex;\n}\n\n.p-chips-token-icon {\n cursor: pointer;\n}\n\n.p-chips-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n}\n\n.p-fluid .p-chips {\n display: flex;\n}\n",{name:"chips",manual:!0});function s(e){return f(e)||d(e)||p(e)||c()}function c(){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 p(e,n){if(e){if("string"==typeof e)return m(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?m(e,n):void 0}}function d(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function f(e){if(Array.isArray(e))return m(e)}function m(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=new Array(n);t<n;t++)o[t]=e[t];return o}var h={name:"Chips",extends:{name:"BaseChips",extends:a.default,props:{modelValue:{type:Array,default:null},max:{type:Number,default:null},separator:{type:[String,Object],default:null},addOnBlur:{type:Boolean,default:null},allowDuplicate:{type:Boolean,default:!0},placeholder:{type:String,default:null},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},removeTokenIcon:{type:String,default:void 0},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:{root:function(e){var n=e.instance,t=e.props;return["p-chips p-component p-inputwrapper",{"p-disabled":t.disabled,"p-focus":n.focused,"p-inputwrapper-filled":t.modelValue&&t.modelValue.length||n.inputValue&&n.inputValue.length,"p-inputwrapper-focus":n.focused}]},container:"p-inputtext p-chips-multiple-container",token:function(e){return["p-chips-token",{"p-focus":e.state.focusedIndex===e.index}]},label:"p-chips-token-label",removeTokenIcon:"p-chips-token-icon",inputToken:"p-chips-input-token"},loadStyle:u.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","add","remove","focus","blur"],data:function(){return{id:n.UniqueComponentId(),inputValue:null,focused:!1,focusedIndex:null}},methods:{onWrapperClick:function(){this.$refs.input.focus()},onInput:function(e){this.inputValue=e.target.value,this.focusedIndex=null},onFocus:function(e){this.focused=!0,this.focusedIndex=null,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedIndex=null,this.addOnBlur&&this.addItem(e,e.target.value,!1),this.$emit("blur",e)},onKeyDown:function(e){var n=e.target.value;switch(e.code){case"Backspace":0===n.length&&this.modelValue&&this.modelValue.length>0&&this.removeItem(e,null!==this.focusedIndex?this.focusedIndex:this.modelValue.length-1);break;case"Enter":n&&n.trim().length&&!this.maxedOut&&this.addItem(e,n,!0);break;case"ArrowLeft":0===n.length&&this.modelValue&&this.modelValue.length>0&&this.$refs.container.focus();break;case"ArrowRight":e.stopPropagation();break;default:this.separator&&(this.separator===e.key||e.key.match(this.separator))&&this.addItem(e,n,!0)}},onPaste:function(e){var n=this;if(this.separator){var t=(e.clipboardData||window.clipboardData).getData("Text");if(t){var o=this.modelValue||[],r=t.split(this.separator);r=r.filter((function(e){return n.allowDuplicate||-1===o.indexOf(e)})),o=[].concat(s(o),s(r)),this.updateModel(e,o,!0)}}},onContainerFocus:function(){this.focused=!0},onContainerBlur:function(){this.focusedIndex=-1,this.focused=!1},onContainerKeyDown:function(e){switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOn(e);break;case"ArrowRight":this.onArrowRightKeyOn(e);break;case"Backspace":this.onBackspaceKeyOn(e)}},onArrowLeftKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex=null===this.focusedIndex?this.modelValue.length-1:this.focusedIndex-1,this.focusedIndex<0&&(this.focusedIndex=0))},onArrowRightKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex===this.modelValue.length-1?(this.focusedIndex=null,this.$refs.input.focus()):this.focusedIndex++)},onBackspaceKeyOn:function(e){null!==this.focusedIndex&&this.removeItem(e,this.focusedIndex)},updateModel:function(e,n,t){var o=this;this.$emit("update:modelValue",n),this.$emit("add",{originalEvent:e,value:n}),this.$refs.input.value="",this.inputValue="",setTimeout((function(){o.maxedOut&&(o.focused=!1)}),0),t&&e.preventDefault()},addItem:function(e,n,t){if(n&&n.trim().length){var o=this.modelValue?s(this.modelValue):[];(this.allowDuplicate||-1===o.indexOf(n))&&(o.push(n),this.updateModel(e,o,t))}},removeItem:function(e,n){if(!this.disabled){var t=s(this.modelValue),o=t.splice(n,1);this.focusedIndex=null,this.$refs.input.focus(),this.$emit("update:modelValue",t),this.$emit("remove",{originalEvent:e,value:o})}}},computed:{maxedOut:function(){return this.max&&this.modelValue&&this.max===this.modelValue.length},focusedOptionId:function(){return null!==this.focusedIndex?"".concat(this.id,"_chips_item_").concat(this.focusedIndex):null}},components:{TimesCircleIcon:l.default}};function y(e){return y="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},y(e)}function b(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function g(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?b(Object(t),!0).forEach((function(n){v(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):b(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function v(e,n,t){return(n=x(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function x(e){var n=I(e,"string");return"symbol"===y(n)?n:String(n)}function I(e,n){if("object"!==y(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,n||"default");if("object"!==y(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}var k=["aria-labelledby","aria-label","aria-activedescendant"],w=["id","aria-label","aria-setsize","aria-posinset","data-p-focused"],O=["id","disabled","placeholder"];h.render=function(e,n,t,o,i,l){return r.openBlock(),r.createElementBlock("div",r.mergeProps({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"chips"}),[r.createElementVNode("ul",r.mergeProps({ref:"container",class:e.cx("container"),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-activedescendant":i.focused?l.focusedOptionId:void 0,onClick:n[5]||(n[5]=function(e){return l.onWrapperClick()}),onFocus:n[6]||(n[6]=function(){return l.onContainerFocus&&l.onContainerFocus.apply(l,arguments)}),onBlur:n[7]||(n[7]=function(){return l.onContainerBlur&&l.onContainerBlur.apply(l,arguments)}),onKeydown:n[8]||(n[8]=function(){return l.onContainerKeyDown&&l.onContainerKeyDown.apply(l,arguments)})},e.ptm("container")),[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.modelValue,(function(n,t){return r.openBlock(),r.createElementBlock("li",r.mergeProps({key:"".concat(t,"_").concat(n),id:i.id+"_chips_item_"+t,role:"option",class:e.cx("token",{index:t}),"aria-label":n,"aria-selected":!0,"aria-setsize":e.modelValue.length,"aria-posinset":t+1},e.ptm("token"),{"data-p-focused":i.focusedIndex===t}),[r.renderSlot(e.$slots,"chip",{class:r.normalizeClass(e.cx("label")),value:n},(function(){return[r.createElementVNode("span",r.mergeProps({class:e.cx("label")},e.ptm("label")),r.toDisplayString(n),17)]})),r.renderSlot(e.$slots,"removetokenicon",{class:r.normalizeClass(e.cx("removeTokenIcon")),index:t,onClick:function(e){return l.removeItem(e,t)}},(function(){return[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(e.removeTokenIcon?"span":"TimesCircleIcon"),r.mergeProps({class:[e.cx("removeTokenIcon"),e.removeTokenIcon],onClick:function(e){return l.removeItem(e,t)},"aria-hidden":"true"},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]}))],16,w)})),128)),r.createElementVNode("li",r.mergeProps({class:e.cx("inputToken"),role:"option"},e.ptm("inputToken")),[r.createElementVNode("input",r.mergeProps({ref:"input",id:e.inputId,type:"text",class:e.inputClass,style:e.inputStyle,disabled:e.disabled||l.maxedOut,placeholder:e.placeholder,onFocus:n[0]||(n[0]=function(e){return l.onFocus(e)}),onBlur:n[1]||(n[1]=function(e){return l.onBlur(e)}),onInput:n[2]||(n[2]=function(){return l.onInput&&l.onInput.apply(l,arguments)}),onKeydown:n[3]||(n[3]=function(e){return l.onKeyDown(e)}),onPaste:n[4]||(n[4]=function(e){return l.onPaste(e)})},g(g({},e.inputProps),e.ptm("input"))),null,16,O)],16)],16,k)],16)},module.exports=h;
@@ -343,6 +343,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
343
343
  }, _ctx.ptm('label')), toDisplayString(val), 17)];
344
344
  }), renderSlot(_ctx.$slots, "removetokenicon", {
345
345
  "class": normalizeClass(_ctx.cx('removeTokenIcon')),
346
+ index: i,
346
347
  onClick: function onClick(event) {
347
348
  return $options.removeItem(event, i);
348
349
  }
@@ -1 +1 @@
1
- import e from"primevue/icons/timescircle";import{UniqueComponentId as n}from"primevue/utils";import t from"primevue/basecomponent";import{useStyle as o}from"primevue/usestyle";import{openBlock as i,createElementBlock as r,mergeProps as a,createElementVNode as l,Fragment as u,renderList as s,renderSlot as c,normalizeClass as p,toDisplayString as d,createBlock as f,resolveDynamicComponent as h}from"vue";var m=o("\n.p-chips {\n display: inline-flex;\n}\n\n.p-chips-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n}\n\n.p-chips-token {\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n}\n\n.p-chips-input-token {\n flex: 1 1 auto;\n display: inline-flex;\n}\n\n.p-chips-token-icon {\n cursor: pointer;\n}\n\n.p-chips-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n}\n\n.p-fluid .p-chips {\n display: flex;\n}\n",{name:"chips",manual:!0});function y(e){return x(e)||g(e)||v(e)||b()}function b(){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 v(e,n){if(e){if("string"==typeof e)return I(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?I(e,n):void 0}}function g(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function x(e){if(Array.isArray(e))return I(e)}function I(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=new Array(n);t<n;t++)o[t]=e[t];return o}var k={name:"Chips",extends:{name:"BaseChips",extends:t,props:{modelValue:{type:Array,default:null},max:{type:Number,default:null},separator:{type:[String,Object],default:null},addOnBlur:{type:Boolean,default:null},allowDuplicate:{type:Boolean,default:!0},placeholder:{type:String,default:null},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},removeTokenIcon:{type:String,default:void 0},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:{root:function(e){var n=e.instance,t=e.props;return["p-chips p-component p-inputwrapper",{"p-disabled":t.disabled,"p-focus":n.focused,"p-inputwrapper-filled":t.modelValue&&t.modelValue.length||n.inputValue&&n.inputValue.length,"p-inputwrapper-focus":n.focused}]},container:"p-inputtext p-chips-multiple-container",token:function(e){return["p-chips-token",{"p-focus":e.state.focusedIndex===e.index}]},label:"p-chips-token-label",removeTokenIcon:"p-chips-token-icon",inputToken:"p-chips-input-token"},loadStyle:m.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","add","remove","focus","blur"],data:function(){return{id:n(),inputValue:null,focused:!1,focusedIndex:null}},methods:{onWrapperClick:function(){this.$refs.input.focus()},onInput:function(e){this.inputValue=e.target.value,this.focusedIndex=null},onFocus:function(e){this.focused=!0,this.focusedIndex=null,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedIndex=null,this.addOnBlur&&this.addItem(e,e.target.value,!1),this.$emit("blur",e)},onKeyDown:function(e){var n=e.target.value;switch(e.code){case"Backspace":0===n.length&&this.modelValue&&this.modelValue.length>0&&this.removeItem(e,null!==this.focusedIndex?this.focusedIndex:this.modelValue.length-1);break;case"Enter":n&&n.trim().length&&!this.maxedOut&&this.addItem(e,n,!0);break;case"ArrowLeft":0===n.length&&this.modelValue&&this.modelValue.length>0&&this.$refs.container.focus();break;case"ArrowRight":e.stopPropagation();break;default:this.separator&&(this.separator===e.key||e.key.match(this.separator))&&this.addItem(e,n,!0)}},onPaste:function(e){var n=this;if(this.separator){var t=(e.clipboardData||window.clipboardData).getData("Text");if(t){var o=this.modelValue||[],i=t.split(this.separator);i=i.filter((function(e){return n.allowDuplicate||-1===o.indexOf(e)})),o=[].concat(y(o),y(i)),this.updateModel(e,o,!0)}}},onContainerFocus:function(){this.focused=!0},onContainerBlur:function(){this.focusedIndex=-1,this.focused=!1},onContainerKeyDown:function(e){switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOn(e);break;case"ArrowRight":this.onArrowRightKeyOn(e);break;case"Backspace":this.onBackspaceKeyOn(e)}},onArrowLeftKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex=null===this.focusedIndex?this.modelValue.length-1:this.focusedIndex-1,this.focusedIndex<0&&(this.focusedIndex=0))},onArrowRightKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex===this.modelValue.length-1?(this.focusedIndex=null,this.$refs.input.focus()):this.focusedIndex++)},onBackspaceKeyOn:function(e){null!==this.focusedIndex&&this.removeItem(e,this.focusedIndex)},updateModel:function(e,n,t){var o=this;this.$emit("update:modelValue",n),this.$emit("add",{originalEvent:e,value:n}),this.$refs.input.value="",this.inputValue="",setTimeout((function(){o.maxedOut&&(o.focused=!1)}),0),t&&e.preventDefault()},addItem:function(e,n,t){if(n&&n.trim().length){var o=this.modelValue?y(this.modelValue):[];(this.allowDuplicate||-1===o.indexOf(n))&&(o.push(n),this.updateModel(e,o,t))}},removeItem:function(e,n){if(!this.disabled){var t=y(this.modelValue),o=t.splice(n,1);this.focusedIndex=null,this.$refs.input.focus(),this.$emit("update:modelValue",t),this.$emit("remove",{originalEvent:e,value:o})}}},computed:{maxedOut:function(){return this.max&&this.modelValue&&this.max===this.modelValue.length},focusedOptionId:function(){return null!==this.focusedIndex?"".concat(this.id,"_chips_item_").concat(this.focusedIndex):null}},components:{TimesCircleIcon:e}};function w(e){return w="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},w(e)}function O(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function V(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?O(Object(t),!0).forEach((function(n){S(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function S(e,n,t){return(n=C(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function C(e){var n=j(e,"string");return"symbol"===w(n)?n:String(n)}function j(e,n){if("object"!==w(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,n||"default");if("object"!==w(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}var B=["aria-labelledby","aria-label","aria-activedescendant"],P=["id","aria-label","aria-setsize","aria-posinset","data-p-focused"],A=["id","disabled","placeholder"];k.render=function(e,n,t,o,m,y){return i(),r("div",a({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"chips"}),[l("ul",a({ref:"container",class:e.cx("container"),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-activedescendant":m.focused?y.focusedOptionId:void 0,onClick:n[5]||(n[5]=function(e){return y.onWrapperClick()}),onFocus:n[6]||(n[6]=function(){return y.onContainerFocus&&y.onContainerFocus.apply(y,arguments)}),onBlur:n[7]||(n[7]=function(){return y.onContainerBlur&&y.onContainerBlur.apply(y,arguments)}),onKeydown:n[8]||(n[8]=function(){return y.onContainerKeyDown&&y.onContainerKeyDown.apply(y,arguments)})},e.ptm("container")),[(i(!0),r(u,null,s(e.modelValue,(function(n,t){return i(),r("li",a({key:"".concat(t,"_").concat(n),id:m.id+"_chips_item_"+t,role:"option",class:e.cx("token",{index:t}),"aria-label":n,"aria-selected":!0,"aria-setsize":e.modelValue.length,"aria-posinset":t+1},e.ptm("token"),{"data-p-focused":m.focusedIndex===t}),[c(e.$slots,"chip",{class:p(e.cx("label")),value:n},(function(){return[l("span",a({class:e.cx("label")},e.ptm("label")),d(n),17)]})),c(e.$slots,"removetokenicon",{class:p(e.cx("removeTokenIcon")),onClick:function(e){return y.removeItem(e,t)}},(function(){return[(i(),f(h(e.removeTokenIcon?"span":"TimesCircleIcon"),a({class:[e.cx("removeTokenIcon"),e.removeTokenIcon],onClick:function(e){return y.removeItem(e,t)},"aria-hidden":"true"},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]}))],16,P)})),128)),l("li",a({class:e.cx("inputToken"),role:"option"},e.ptm("inputToken")),[l("input",a({ref:"input",id:e.inputId,type:"text",class:e.inputClass,style:e.inputStyle,disabled:e.disabled||y.maxedOut,placeholder:e.placeholder,onFocus:n[0]||(n[0]=function(e){return y.onFocus(e)}),onBlur:n[1]||(n[1]=function(e){return y.onBlur(e)}),onInput:n[2]||(n[2]=function(){return y.onInput&&y.onInput.apply(y,arguments)}),onKeydown:n[3]||(n[3]=function(e){return y.onKeyDown(e)}),onPaste:n[4]||(n[4]=function(e){return y.onPaste(e)})},V(V({},e.inputProps),e.ptm("input"))),null,16,A)],16)],16,B)],16)};export{k as default};
1
+ import e from"primevue/icons/timescircle";import{UniqueComponentId as n}from"primevue/utils";import t from"primevue/basecomponent";import{useStyle as o}from"primevue/usestyle";import{openBlock as i,createElementBlock as r,mergeProps as a,createElementVNode as l,Fragment as u,renderList as s,renderSlot as c,normalizeClass as p,toDisplayString as d,createBlock as f,resolveDynamicComponent as h}from"vue";var m=o("\n.p-chips {\n display: inline-flex;\n}\n\n.p-chips-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n}\n\n.p-chips-token {\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n}\n\n.p-chips-input-token {\n flex: 1 1 auto;\n display: inline-flex;\n}\n\n.p-chips-token-icon {\n cursor: pointer;\n}\n\n.p-chips-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n}\n\n.p-fluid .p-chips {\n display: flex;\n}\n",{name:"chips",manual:!0});function y(e){return g(e)||x(e)||v(e)||b()}function b(){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 v(e,n){if(e){if("string"==typeof e)return I(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?I(e,n):void 0}}function x(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function g(e){if(Array.isArray(e))return I(e)}function I(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=new Array(n);t<n;t++)o[t]=e[t];return o}var k={name:"Chips",extends:{name:"BaseChips",extends:t,props:{modelValue:{type:Array,default:null},max:{type:Number,default:null},separator:{type:[String,Object],default:null},addOnBlur:{type:Boolean,default:null},allowDuplicate:{type:Boolean,default:!0},placeholder:{type:String,default:null},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},removeTokenIcon:{type:String,default:void 0},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:{root:function(e){var n=e.instance,t=e.props;return["p-chips p-component p-inputwrapper",{"p-disabled":t.disabled,"p-focus":n.focused,"p-inputwrapper-filled":t.modelValue&&t.modelValue.length||n.inputValue&&n.inputValue.length,"p-inputwrapper-focus":n.focused}]},container:"p-inputtext p-chips-multiple-container",token:function(e){return["p-chips-token",{"p-focus":e.state.focusedIndex===e.index}]},label:"p-chips-token-label",removeTokenIcon:"p-chips-token-icon",inputToken:"p-chips-input-token"},loadStyle:m.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","add","remove","focus","blur"],data:function(){return{id:n(),inputValue:null,focused:!1,focusedIndex:null}},methods:{onWrapperClick:function(){this.$refs.input.focus()},onInput:function(e){this.inputValue=e.target.value,this.focusedIndex=null},onFocus:function(e){this.focused=!0,this.focusedIndex=null,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedIndex=null,this.addOnBlur&&this.addItem(e,e.target.value,!1),this.$emit("blur",e)},onKeyDown:function(e){var n=e.target.value;switch(e.code){case"Backspace":0===n.length&&this.modelValue&&this.modelValue.length>0&&this.removeItem(e,null!==this.focusedIndex?this.focusedIndex:this.modelValue.length-1);break;case"Enter":n&&n.trim().length&&!this.maxedOut&&this.addItem(e,n,!0);break;case"ArrowLeft":0===n.length&&this.modelValue&&this.modelValue.length>0&&this.$refs.container.focus();break;case"ArrowRight":e.stopPropagation();break;default:this.separator&&(this.separator===e.key||e.key.match(this.separator))&&this.addItem(e,n,!0)}},onPaste:function(e){var n=this;if(this.separator){var t=(e.clipboardData||window.clipboardData).getData("Text");if(t){var o=this.modelValue||[],i=t.split(this.separator);i=i.filter((function(e){return n.allowDuplicate||-1===o.indexOf(e)})),o=[].concat(y(o),y(i)),this.updateModel(e,o,!0)}}},onContainerFocus:function(){this.focused=!0},onContainerBlur:function(){this.focusedIndex=-1,this.focused=!1},onContainerKeyDown:function(e){switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOn(e);break;case"ArrowRight":this.onArrowRightKeyOn(e);break;case"Backspace":this.onBackspaceKeyOn(e)}},onArrowLeftKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex=null===this.focusedIndex?this.modelValue.length-1:this.focusedIndex-1,this.focusedIndex<0&&(this.focusedIndex=0))},onArrowRightKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex===this.modelValue.length-1?(this.focusedIndex=null,this.$refs.input.focus()):this.focusedIndex++)},onBackspaceKeyOn:function(e){null!==this.focusedIndex&&this.removeItem(e,this.focusedIndex)},updateModel:function(e,n,t){var o=this;this.$emit("update:modelValue",n),this.$emit("add",{originalEvent:e,value:n}),this.$refs.input.value="",this.inputValue="",setTimeout((function(){o.maxedOut&&(o.focused=!1)}),0),t&&e.preventDefault()},addItem:function(e,n,t){if(n&&n.trim().length){var o=this.modelValue?y(this.modelValue):[];(this.allowDuplicate||-1===o.indexOf(n))&&(o.push(n),this.updateModel(e,o,t))}},removeItem:function(e,n){if(!this.disabled){var t=y(this.modelValue),o=t.splice(n,1);this.focusedIndex=null,this.$refs.input.focus(),this.$emit("update:modelValue",t),this.$emit("remove",{originalEvent:e,value:o})}}},computed:{maxedOut:function(){return this.max&&this.modelValue&&this.max===this.modelValue.length},focusedOptionId:function(){return null!==this.focusedIndex?"".concat(this.id,"_chips_item_").concat(this.focusedIndex):null}},components:{TimesCircleIcon:e}};function w(e){return w="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},w(e)}function O(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function V(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?O(Object(t),!0).forEach((function(n){S(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function S(e,n,t){return(n=C(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function C(e){var n=j(e,"string");return"symbol"===w(n)?n:String(n)}function j(e,n){if("object"!==w(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,n||"default");if("object"!==w(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}var B=["aria-labelledby","aria-label","aria-activedescendant"],P=["id","aria-label","aria-setsize","aria-posinset","data-p-focused"],A=["id","disabled","placeholder"];k.render=function(e,n,t,o,m,y){return i(),r("div",a({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"chips"}),[l("ul",a({ref:"container",class:e.cx("container"),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-activedescendant":m.focused?y.focusedOptionId:void 0,onClick:n[5]||(n[5]=function(e){return y.onWrapperClick()}),onFocus:n[6]||(n[6]=function(){return y.onContainerFocus&&y.onContainerFocus.apply(y,arguments)}),onBlur:n[7]||(n[7]=function(){return y.onContainerBlur&&y.onContainerBlur.apply(y,arguments)}),onKeydown:n[8]||(n[8]=function(){return y.onContainerKeyDown&&y.onContainerKeyDown.apply(y,arguments)})},e.ptm("container")),[(i(!0),r(u,null,s(e.modelValue,(function(n,t){return i(),r("li",a({key:"".concat(t,"_").concat(n),id:m.id+"_chips_item_"+t,role:"option",class:e.cx("token",{index:t}),"aria-label":n,"aria-selected":!0,"aria-setsize":e.modelValue.length,"aria-posinset":t+1},e.ptm("token"),{"data-p-focused":m.focusedIndex===t}),[c(e.$slots,"chip",{class:p(e.cx("label")),value:n},(function(){return[l("span",a({class:e.cx("label")},e.ptm("label")),d(n),17)]})),c(e.$slots,"removetokenicon",{class:p(e.cx("removeTokenIcon")),index:t,onClick:function(e){return y.removeItem(e,t)}},(function(){return[(i(),f(h(e.removeTokenIcon?"span":"TimesCircleIcon"),a({class:[e.cx("removeTokenIcon"),e.removeTokenIcon],onClick:function(e){return y.removeItem(e,t)},"aria-hidden":"true"},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]}))],16,P)})),128)),l("li",a({class:e.cx("inputToken"),role:"option"},e.ptm("inputToken")),[l("input",a({ref:"input",id:e.inputId,type:"text",class:e.inputClass,style:e.inputStyle,disabled:e.disabled||y.maxedOut,placeholder:e.placeholder,onFocus:n[0]||(n[0]=function(e){return y.onFocus(e)}),onBlur:n[1]||(n[1]=function(e){return y.onBlur(e)}),onInput:n[2]||(n[2]=function(){return y.onInput&&y.onInput.apply(y,arguments)}),onKeydown:n[3]||(n[3]=function(e){return y.onKeyDown(e)}),onPaste:n[4]||(n[4]=function(e){return y.onPaste(e)})},V(V({},e.inputProps),e.ptm("input"))),null,16,A)],16)],16,B)],16)};export{k as default};
package/chips/chips.js CHANGED
@@ -346,6 +346,7 @@ this.primevue.chips = (function (TimesCircleIcon, utils, BaseComponent, usestyle
346
346
  }, _ctx.ptm('label')), vue.toDisplayString(val), 17)];
347
347
  }), vue.renderSlot(_ctx.$slots, "removetokenicon", {
348
348
  "class": vue.normalizeClass(_ctx.cx('removeTokenIcon')),
349
+ index: i,
349
350
  onClick: function onClick(event) {
350
351
  return $options.removeItem(event, i);
351
352
  }