primevue 3.8.2 → 3.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/accordion/Accordion.d.ts +74 -11
- package/accordion/accordion.esm.js +1 -1
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +1 -1
- package/accordiontab/AccordionTab.d.ts +37 -8
- package/accordiontab/accordiontab.esm.js +1 -1
- package/accordiontab/accordiontab.esm.min.js +1 -1
- package/accordiontab/accordiontab.js +1 -1
- package/api/Api.d.ts +292 -251
- package/api/api.cjs.js +66 -32
- package/api/api.cjs.min.js +1 -1
- package/api/api.esm.js +66 -32
- package/api/api.esm.min.js +1 -1
- package/api/api.js +67 -33
- package/api/api.min.js +1 -1
- package/autocomplete/AutoComplete.d.ts +280 -63
- package/autocomplete/AutoComplete.vue +16 -9
- package/autocomplete/autocomplete.cjs.js +23 -15
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +20 -12
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +24 -16
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/Avatar.d.ts +57 -8
- package/avatar/avatar.esm.js +1 -1
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +1 -1
- package/avatargroup/AvatarGroup.d.ts +29 -3
- package/avatargroup/avatargroup.esm.js +1 -1
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +1 -1
- package/badge/Badge.d.ts +46 -5
- package/badge/badge.esm.js +1 -1
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +1 -1
- package/badgedirective/badgedirective.esm.js +1 -1
- package/badgedirective/badgedirective.esm.min.js +1 -1
- package/badgedirective/badgedirective.js +1 -1
- package/blockui/BlockUI.d.ts +52 -11
- package/blockui/blockui.esm.js +1 -1
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +1 -1
- package/breadcrumb/Breadcrumb.d.ts +49 -9
- package/breadcrumb/BreadcrumbItem.vue +5 -2
- package/breadcrumb/breadcrumb.cjs.js +5 -2
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +6 -3
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +6 -3
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/Button.d.ts +68 -11
- package/button/button.cjs.js +1 -1
- package/button/button.esm.js +1 -1
- package/button/button.esm.min.js +1 -1
- package/button/button.js +2 -2
- package/calendar/Calendar.d.ts +320 -58
- package/calendar/Calendar.vue +406 -84
- package/calendar/calendar.cjs.js +521 -204
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +521 -203
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +523 -205
- package/calendar/calendar.min.js +1 -1
- package/card/Card.d.ts +43 -9
- package/card/card.esm.js +1 -1
- package/card/card.esm.min.js +1 -1
- package/card/card.js +1 -1
- package/carousel/Carousel.d.ts +121 -24
- package/carousel/Carousel.vue +2 -2
- package/carousel/carousel.cjs.js +7 -7
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +7 -7
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +8 -8
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +172 -35
- package/cascadeselect/cascadeselect.cjs.js +2 -2
- package/cascadeselect/cascadeselect.esm.js +1 -1
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +3 -3
- package/chart/Chart.d.ts +104 -12
- package/chart/Chart.vue +18 -4
- package/chart/chart.cjs.js +20 -8
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +19 -5
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +19 -5
- package/chart/chart.min.js +1 -1
- package/checkbox/Checkbox.d.ts +66 -8
- package/checkbox/checkbox.esm.js +1 -1
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +1 -1
- package/chip/Chip.d.ts +50 -4
- package/chip/chip.esm.js +1 -1
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +1 -1
- package/chips/Chips.d.ts +88 -15
- package/chips/chips.esm.js +1 -1
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +1 -1
- package/colorpicker/ColorPicker.d.ts +105 -13
- package/colorpicker/ColorPicker.vue +6 -1
- package/colorpicker/colorpicker.cjs.js +7 -2
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +7 -2
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +8 -3
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/Column.d.ts +448 -78
- package/column/column.esm.js +1 -1
- package/column/column.esm.min.js +1 -1
- package/column/column.js +1 -1
- package/columngroup/ColumnGroup.d.ts +30 -4
- package/columngroup/columngroup.esm.js +1 -1
- package/columngroup/columngroup.esm.min.js +1 -1
- package/columngroup/columngroup.js +1 -1
- package/config/config.cjs.js +1 -1
- package/config/config.esm.js +1 -2
- package/config/config.esm.min.js +1 -1
- package/config/config.js +2 -2
- package/confirmationeventbus/confirmationeventbus.esm.js +1 -1
- package/confirmationeventbus/confirmationeventbus.esm.min.js +1 -1
- package/confirmationeventbus/confirmationeventbus.js +1 -1
- package/confirmationoptions/ConfirmationOptions.d.ts +58 -0
- package/confirmationoptions/package.json +3 -0
- package/confirmationservice/ConfirmationService.d.ts +2 -1
- package/confirmationservice/confirmationservice.cjs.js +2 -2
- package/confirmationservice/confirmationservice.esm.js +1 -1
- package/confirmationservice/confirmationservice.esm.min.js +1 -1
- package/confirmationservice/confirmationservice.js +3 -3
- package/confirmdialog/ConfirmDialog.d.ts +57 -5
- package/confirmdialog/ConfirmDialog.vue +8 -2
- package/confirmdialog/confirmdialog.cjs.js +17 -10
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +12 -5
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +18 -11
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/ConfirmPopup.d.ts +41 -3
- package/confirmpopup/ConfirmPopup.vue +7 -4
- package/confirmpopup/confirmpopup.cjs.js +19 -11
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +15 -7
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +20 -12
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/ContextMenu.d.ts +88 -16
- package/contextmenu/ContextMenuSub.vue +7 -4
- package/contextmenu/contextmenu.cjs.js +8 -5
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +8 -5
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +9 -6
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +861 -383
- package/core/core.min.js +15 -13
- package/datatable/BodyCell.vue +27 -1
- package/datatable/ColumnFilter.vue +17 -6
- package/datatable/DataTable.d.ts +1056 -130
- package/datatable/DataTable.vue +150 -131
- package/datatable/HeaderCheckbox.vue +5 -2
- package/datatable/RowCheckbox.vue +1 -1
- package/datatable/RowRadioButton.vue +1 -1
- package/datatable/TableBody.vue +57 -14
- package/datatable/TableFooter.vue +15 -1
- package/datatable/TableHeader.vue +15 -1
- package/datatable/datatable.cjs.js +542 -381
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +533 -373
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +543 -383
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.d.ts +198 -32
- package/dataview/DataView.vue +8 -8
- package/dataview/dataview.cjs.js +13 -13
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +13 -13
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +14 -14
- package/dataview/dataview.min.js +1 -1
- package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +34 -5
- package/dataviewlayoutoptions/dataviewlayoutoptions.esm.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.esm.min.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.js +1 -1
- package/deferredcontent/DeferredContent.d.ts +31 -6
- package/deferredcontent/deferredcontent.esm.js +1 -1
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +1 -1
- package/dialog/Dialog.d.ts +187 -34
- package/dialog/Dialog.vue +1 -1
- package/dialog/dialog.cjs.js +2 -3
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +2 -3
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +3 -4
- package/dialog/dialog.min.js +1 -1
- package/divider/Divider.d.ts +53 -8
- package/divider/divider.esm.js +1 -1
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +1 -1
- package/dock/Dock.d.ts +92 -15
- package/dock/DockSub.vue +3 -1
- package/dock/dock.cjs.js +4 -1
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +4 -2
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +5 -3
- package/dock/dock.min.js +1 -1
- package/dropdown/Dropdown.d.ts +340 -76
- package/dropdown/Dropdown.vue +1 -1
- package/dropdown/dropdown.cjs.js +4 -4
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +2 -2
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +5 -5
- package/dropdown/dropdown.min.js +1 -1
- package/editor/Editor.d.ts +78 -11
- package/editor/editor.cjs.js +1 -1
- package/editor/editor.esm.js +1 -1
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +2 -2
- package/fieldset/Fieldset.d.ts +63 -11
- package/fieldset/fieldset.cjs.js +1 -1
- package/fieldset/fieldset.esm.js +1 -1
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +2 -2
- package/fileupload/FileUpload.d.ts +255 -37
- package/fileupload/fileupload.cjs.js +4 -4
- package/fileupload/fileupload.esm.js +1 -1
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +5 -5
- package/fullcalendar/FullCalendar.d.ts +29 -3
- package/fullcalendar/fullcalendar.esm.js +1 -1
- package/fullcalendar/fullcalendar.esm.min.js +1 -1
- package/fullcalendar/fullcalendar.js +1 -1
- package/galleria/Galleria.d.ts +196 -46
- package/galleria/galleria.cjs.js +3 -3
- package/galleria/galleria.esm.js +1 -1
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +4 -4
- package/image/Image.d.ts +51 -6
- package/image/image.esm.js +1 -1
- package/image/image.esm.min.js +1 -1
- package/image/image.js +1 -1
- package/inlinemessage/InlineMessage.d.ts +34 -6
- package/inlinemessage/inlinemessage.esm.js +1 -1
- package/inlinemessage/inlinemessage.esm.min.js +1 -1
- package/inlinemessage/inlinemessage.js +1 -1
- package/inplace/Inplace.d.ts +57 -12
- package/inplace/inplace.cjs.js +1 -1
- package/inplace/inplace.esm.js +1 -1
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +2 -2
- package/inputmask/InputMask.d.ts +75 -15
- package/inputmask/inputmask.esm.js +1 -1
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +1 -1
- package/inputnumber/InputNumber.d.ts +180 -30
- package/inputnumber/InputNumber.vue +19 -3
- package/inputnumber/inputnumber.cjs.js +21 -5
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +20 -4
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +22 -6
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/InputSwitch.d.ts +61 -9
- package/inputswitch/inputswitch.esm.js +1 -1
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +1 -1
- package/inputtext/InputText.d.ts +34 -5
- package/inputtext/InputText.vue +1 -1
- package/inputtext/inputtext.cjs.js +2 -2
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +4 -4
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +3 -3
- package/inputtext/inputtext.min.js +1 -1
- package/knob/Knob.d.ts +92 -18
- package/knob/knob.esm.js +1 -1
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +1 -1
- package/listbox/Listbox.d.ts +246 -56
- package/listbox/listbox.cjs.js +2 -2
- package/listbox/listbox.esm.js +1 -1
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +3 -3
- package/megamenu/MegaMenu.d.ts +60 -12
- package/megamenu/MegaMenu.vue +10 -7
- package/megamenu/megamenu.cjs.js +11 -8
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +11 -8
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +12 -9
- package/megamenu/megamenu.min.js +1 -1
- package/menu/Menu.d.ts +84 -15
- package/menu/Menu.vue +6 -3
- package/menu/Menuitem.vue +5 -2
- package/menu/menu.cjs.js +13 -7
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +12 -6
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +14 -8
- package/menu/menu.min.js +1 -1
- package/menubar/Menubar.d.ts +52 -11
- package/menubar/Menubar.vue +1 -0
- package/menubar/MenubarSub.vue +7 -4
- package/menubar/menubar.cjs.js +9 -6
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +9 -6
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +10 -7
- package/menubar/menubar.min.js +1 -1
- package/menuitem/MenuItem.d.ts +82 -0
- package/menuitem/package.json +3 -0
- package/message/Message.d.ts +57 -10
- package/message/Message.vue +6 -2
- package/message/message.cjs.js +7 -3
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +7 -3
- package/message/message.esm.min.js +1 -1
- package/message/message.js +8 -4
- package/message/message.min.js +1 -1
- package/multiselect/MultiSelect.d.ts +368 -83
- package/multiselect/multiselect.cjs.js +3 -3
- package/multiselect/multiselect.esm.js +1 -1
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +4 -4
- package/orderlist/OrderList.d.ts +122 -17
- package/orderlist/OrderList.vue +2 -0
- package/orderlist/orderlist.cjs.js +5 -3
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +4 -2
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +6 -4
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/OrganizationChart.d.ts +137 -15
- package/organizationchart/OrganizationChart.vue +1 -0
- package/organizationchart/organizationchart.cjs.js +1 -1
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +2 -2
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +2 -2
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlayeventbus/overlayeventbus.esm.js +1 -1
- package/overlayeventbus/overlayeventbus.esm.min.js +1 -1
- package/overlayeventbus/overlayeventbus.js +1 -1
- package/overlaypanel/OverlayPanel.d.ts +107 -12
- package/overlaypanel/overlaypanel.cjs.js +5 -5
- package/overlaypanel/overlaypanel.esm.js +1 -1
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +6 -6
- package/package.json +5 -1
- package/paginator/Paginator.d.ts +129 -27
- package/paginator/Paginator.vue +4 -4
- package/paginator/paginator.cjs.js +12 -12
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +5 -5
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +13 -13
- package/paginator/paginator.min.js +1 -1
- package/panel/Panel.d.ts +64 -8
- package/panel/Panel.vue +1 -1
- package/panel/panel.cjs.js +1 -1
- package/panel/panel.esm.js +1 -1
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +2 -2
- package/panelmenu/PanelMenu.d.ts +59 -11
- package/panelmenu/PanelMenu.vue +8 -5
- package/panelmenu/PanelMenuSub.vue +8 -5
- package/panelmenu/panelmenu.cjs.js +18 -12
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +19 -13
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +19 -13
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/Password.d.ts +115 -24
- package/password/password.cjs.js +2 -2
- package/password/password.esm.js +1 -1
- package/password/password.esm.min.js +1 -1
- package/password/password.js +3 -3
- package/picklist/PickList.d.ts +199 -26
- package/picklist/PickList.vue +10 -4
- package/picklist/picklist.cjs.js +15 -9
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +14 -8
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +16 -10
- package/picklist/picklist.min.js +1 -1
- package/progressbar/ProgressBar.d.ts +43 -8
- package/progressbar/ProgressBar.vue +13 -12
- package/progressbar/progressbar.cjs.js +13 -12
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +15 -14
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +14 -13
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/ProgressSpinner.d.ts +39 -6
- package/progressspinner/progressspinner.esm.js +1 -1
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +1 -1
- package/radiobutton/RadioButton.d.ts +52 -7
- package/radiobutton/radiobutton.esm.js +1 -1
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +1 -1
- package/rating/Rating.d.ts +67 -10
- package/rating/Rating.vue +1 -1
- package/rating/rating.cjs.js +1 -1
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +2 -2
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +2 -2
- package/rating/rating.min.js +1 -1
- package/resources/primevue.css +5 -0
- package/resources/primevue.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +81 -33
- package/resources/themes/arya-green/theme.css +81 -33
- package/resources/themes/arya-orange/theme.css +81 -33
- package/resources/themes/arya-purple/theme.css +81 -33
- package/resources/themes/bootstrap4-dark-blue/theme.css +62 -21
- package/resources/themes/bootstrap4-dark-purple/theme.css +62 -21
- package/resources/themes/bootstrap4-light-blue/theme.css +62 -21
- package/resources/themes/bootstrap4-light-purple/theme.css +62 -21
- package/resources/themes/fluent-light/theme.css +81 -33
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-blue/theme.css +5421 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/theme.css +5421 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-purple/theme.css +5421 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/theme.css +5421 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-blue/theme.css +5421 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-indigo/theme.css +5421 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-purple/theme.css +5421 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-teal/theme.css +5421 -0
- package/resources/themes/luna-amber/theme.css +78 -37
- package/resources/themes/luna-blue/theme.css +78 -37
- package/resources/themes/luna-green/theme.css +78 -37
- package/resources/themes/luna-pink/theme.css +78 -37
- package/resources/themes/md-dark-deeppurple/theme.css +252 -48
- package/resources/themes/md-dark-indigo/theme.css +252 -48
- package/resources/themes/md-light-deeppurple/theme.css +252 -48
- package/resources/themes/md-light-indigo/theme.css +252 -48
- package/resources/themes/mdc-dark-deeppurple/theme.css +252 -48
- package/resources/themes/mdc-dark-indigo/theme.css +252 -48
- package/resources/themes/mdc-light-deeppurple/theme.css +252 -48
- package/resources/themes/mdc-light-indigo/theme.css +252 -48
- package/resources/themes/nova/theme.css +78 -37
- package/resources/themes/nova-accent/theme.css +78 -37
- package/resources/themes/nova-alt/theme.css +78 -37
- package/resources/themes/nova-vue/theme.css +78 -37
- package/resources/themes/rhea/theme.css +78 -37
- package/resources/themes/saga-blue/theme.css +65 -17
- package/resources/themes/saga-green/theme.css +65 -17
- package/resources/themes/saga-orange/theme.css +65 -17
- package/resources/themes/saga-purple/theme.css +65 -17
- package/resources/themes/tailwind-light/theme.css +92 -36
- package/resources/themes/vela-blue/theme.css +81 -33
- package/resources/themes/vela-green/theme.css +81 -33
- package/resources/themes/vela-orange/theme.css +81 -33
- package/resources/themes/vela-purple/theme.css +81 -33
- package/ripple/ripple.esm.js +1 -1
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +1 -1
- package/row/Row.d.ts +25 -3
- package/row/row.esm.js +1 -1
- package/row/row.esm.min.js +1 -1
- package/row/row.js +1 -1
- package/scrollpanel/ScrollPanel.d.ts +27 -5
- package/scrollpanel/scrollpanel.esm.js +1 -1
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +1 -1
- package/scrolltop/ScrollTop.d.ts +47 -7
- package/scrolltop/scrolltop.esm.js +1 -1
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +1 -1
- package/selectbutton/SelectButton.d.ts +108 -19
- package/selectbutton/SelectButton.vue +8 -2
- package/selectbutton/selectbutton.cjs.js +15 -10
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +15 -10
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +16 -11
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/Sidebar.d.ts +81 -16
- package/sidebar/sidebar.cjs.js +1 -1
- package/sidebar/sidebar.esm.js +1 -1
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +2 -2
- package/skeleton/Skeleton.d.ts +58 -9
- package/skeleton/skeleton.esm.js +1 -1
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +1 -1
- package/slider/Slider.d.ts +90 -14
- package/slider/slider.esm.js +1 -1
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +1 -1
- package/speeddial/SpeedDial.d.ts +166 -29
- package/speeddial/SpeedDial.vue +3 -1
- package/speeddial/speeddial.cjs.js +5 -2
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +4 -2
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +6 -4
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/SplitButton.d.ts +76 -11
- package/splitbutton/SplitButton.vue +3 -1
- package/splitbutton/splitbutton.cjs.js +15 -13
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +15 -13
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +16 -14
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/Splitter.d.ts +74 -7
- package/splitter/Splitter.vue +5 -5
- package/splitter/splitter.cjs.js +1 -1
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +2 -2
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +2 -2
- package/splitter/splitter.min.js +1 -1
- package/splitterpanel/SplitterPanel.d.ts +34 -7
- package/splitterpanel/splitterpanel.esm.js +1 -1
- package/splitterpanel/splitterpanel.esm.min.js +1 -1
- package/splitterpanel/splitterpanel.js +1 -1
- package/steps/Steps.d.ts +51 -11
- package/steps/Steps.vue +5 -2
- package/steps/steps.cjs.js +5 -2
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +6 -3
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +6 -3
- package/steps/steps.min.js +1 -1
- package/styleclass/styleclass.esm.js +1 -1
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +1 -1
- package/tabmenu/TabMenu.d.ts +63 -10
- package/tabmenu/TabMenu.vue +6 -3
- package/tabmenu/tabmenu.cjs.js +7 -4
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +7 -4
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +8 -5
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabpanel/TabPanel.d.ts +38 -7
- package/tabpanel/tabpanel.esm.js +1 -1
- package/tabpanel/tabpanel.esm.min.js +1 -1
- package/tabpanel/tabpanel.js +1 -1
- package/tabview/TabView.d.ts +73 -11
- package/tabview/tabview.cjs.js +1 -1
- package/tabview/tabview.esm.js +1 -1
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +2 -2
- package/tag/Tag.d.ts +44 -8
- package/tag/Tag.vue +1 -1
- package/tag/tag.cjs.js +6 -6
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.esm.js +8 -8
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +7 -7
- package/tag/tag.min.js +1 -1
- package/terminal/Terminal.d.ts +36 -5
- package/terminal/terminal.cjs.js +3 -3
- package/terminal/terminal.esm.js +1 -1
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +4 -4
- package/terminalservice/TerminalService.d.ts +9 -6
- package/terminalservice/terminalservice.esm.js +1 -1
- package/terminalservice/terminalservice.esm.min.js +1 -1
- package/terminalservice/terminalservice.js +1 -1
- package/textarea/Textarea.d.ts +38 -6
- package/textarea/textarea.esm.js +1 -1
- package/textarea/textarea.esm.min.js +1 -1
- package/textarea/textarea.js +1 -1
- package/tieredmenu/TieredMenu.d.ts +89 -15
- package/tieredmenu/TieredMenuSub.vue +7 -4
- package/tieredmenu/tieredmenu.cjs.js +9 -6
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +8 -5
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +10 -7
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/Timeline.d.ts +94 -15
- package/timeline/timeline.esm.js +1 -1
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +1 -1
- package/toast/Toast.d.ts +118 -12
- package/toast/toast.cjs.js +7 -7
- package/toast/toast.esm.js +1 -1
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +8 -8
- package/toasteventbus/toasteventbus.esm.js +1 -1
- package/toasteventbus/toasteventbus.esm.min.js +1 -1
- package/toasteventbus/toasteventbus.js +1 -1
- package/toastservice/ToastService.d.ts +17 -5
- package/toastservice/toastservice.cjs.js +3 -3
- package/toastservice/toastservice.esm.js +1 -1
- package/toastservice/toastservice.esm.min.js +1 -1
- package/toastservice/toastservice.js +4 -4
- package/togglebutton/ToggleButton.d.ts +64 -11
- package/togglebutton/togglebutton.cjs.js +1 -1
- package/togglebutton/togglebutton.esm.js +1 -1
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +2 -2
- package/toolbar/Toolbar.d.ts +31 -6
- package/toolbar/Toolbar.vue +2 -2
- package/toolbar/toolbar.cjs.js +2 -2
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +3 -3
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +3 -3
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.esm.js +1 -1
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +1 -1
- package/tree/Tree.d.ts +189 -26
- package/tree/Tree.vue +1 -0
- package/tree/TreeNode.vue +4 -1
- package/tree/tree.cjs.js +6 -3
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +6 -3
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +7 -4
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.d.ts +201 -44
- package/treeselect/TreeSelect.vue +9 -0
- package/treeselect/treeselect.cjs.js +12 -3
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +10 -1
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +13 -4
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/BodyCell.vue +3 -3
- package/treetable/TreeTable.d.ts +459 -63
- package/treetable/TreeTable.vue +9 -9
- package/treetable/treetable.cjs.js +17 -17
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +16 -16
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +18 -18
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.d.ts +40 -6
- package/tristatecheckbox/tristatecheckbox.esm.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +1 -1
- package/ts-helpers.d.ts +28 -0
- package/useconfirm/UseConfirm.d.ts +5 -19
- package/useconfirm/useconfirm.js +1 -1
- package/usetoast/UseToast.d.ts +3 -5
- package/usetoast/usetoast.js +1 -1
- package/utils/Utils.d.ts +3 -0
- package/utils/utils.cjs.js +41 -4
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +41 -4
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +42 -5
- package/utils/utils.min.js +1 -1
- package/vetur-attributes.json +66 -30
- package/vetur-tags.json +16 -7
- package/virtualscroller/VirtualScroller.d.ts +294 -53
- package/virtualscroller/VirtualScroller.vue +296 -255
- package/virtualscroller/virtualscroller.cjs.js +325 -266
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +326 -267
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +326 -267
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +296 -47
package/ripple/ripple.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DomHandler as e}from"primevue/utils";function t(e){let t=o(e);t&&(!function(e){e.removeEventListener("mousedown",n)}(e),t.removeEventListener("animationend",i),t.remove())}function n(t){let n=t.currentTarget,i=o(n);if(!i||"none"===getComputedStyle(i,null).display)return;if(e.removeClass(i,"p-ink-active"),!e.getHeight(i)&&!e.getWidth(i)){let t=Math.max(e.getOuterWidth(n),e.getOuterHeight(n));i.style.height=t+"px",i.style.width=t+"px"}let r=e.getOffset(n),l=t.pageX-r.left+document.body.scrollTop-e.getWidth(i)/2,a=t.pageY-r.top+document.body.scrollLeft-e.getHeight(i)/2;i.style.top=a+"px",i.style.left=l+"px",e.addClass(i,"p-ink-active")}function i(t){e.removeClass(t.currentTarget,"p-ink-active")}function o(e){for(let t=0;t<e.children.length;t++)if("string"==typeof e.children[t].className&&-1!==e.children[t].className.indexOf("p-ink"))return e.children[t];return null}const r={mounted(e,t){t.instance.$primevue&&t.instance.$primevue.config&&t.instance.$primevue.config.ripple&&(function(e){let t=document.createElement("span");t.className="p-ink",e.appendChild(t),t.addEventListener("animationend",i)}(e),function(e){e.addEventListener("mousedown",n)}(e))},unmounted(e){t(e)}};export default
|
|
1
|
+
import{DomHandler as e}from"primevue/utils";function t(e){let t=o(e);t&&(!function(e){e.removeEventListener("mousedown",n)}(e),t.removeEventListener("animationend",i),t.remove())}function n(t){let n=t.currentTarget,i=o(n);if(!i||"none"===getComputedStyle(i,null).display)return;if(e.removeClass(i,"p-ink-active"),!e.getHeight(i)&&!e.getWidth(i)){let t=Math.max(e.getOuterWidth(n),e.getOuterHeight(n));i.style.height=t+"px",i.style.width=t+"px"}let r=e.getOffset(n),l=t.pageX-r.left+document.body.scrollTop-e.getWidth(i)/2,a=t.pageY-r.top+document.body.scrollLeft-e.getHeight(i)/2;i.style.top=a+"px",i.style.left=l+"px",e.addClass(i,"p-ink-active")}function i(t){e.removeClass(t.currentTarget,"p-ink-active")}function o(e){for(let t=0;t<e.children.length;t++)if("string"==typeof e.children[t].className&&-1!==e.children[t].className.indexOf("p-ink"))return e.children[t];return null}const r={mounted(e,t){t.instance.$primevue&&t.instance.$primevue.config&&t.instance.$primevue.config.ripple&&(function(e){let t=document.createElement("span");t.className="p-ink",e.appendChild(t),t.addEventListener("animationend",i)}(e),function(e){e.addEventListener("mousedown",n)}(e))},unmounted(e){t(e)}};export{r as default};
|
package/ripple/ripple.js
CHANGED
package/row/Row.d.ts
CHANGED
|
@@ -1,7 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
$props: RowProps;
|
|
3
|
+
export interface RowProps {
|
|
5
4
|
}
|
|
6
5
|
|
|
6
|
+
export interface RowSlots {
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export declare type RowEmits = {
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare class Row extends ClassComponent<RowProps, RowSlots, RowEmits> { }
|
|
13
|
+
|
|
14
|
+
declare module '@vue/runtime-core' {
|
|
15
|
+
interface GlobalComponents {
|
|
16
|
+
Row: GlobalComponentConstructor<Row>
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* Row is a helper component to create column group.
|
|
23
|
+
*
|
|
24
|
+
* Demos:
|
|
25
|
+
*
|
|
26
|
+
* - [DataTable](https://www.primefaces.org/primevue/showcase/#/datatable/colgroup)
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
7
29
|
export default Row;
|
package/row/row.esm.js
CHANGED
package/row/row.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={name:"Row",render:()=>null};export default
|
|
1
|
+
var e={name:"Row",render:()=>null};export{e as default};
|
package/row/row.js
CHANGED
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
import { VNode } from 'vue';
|
|
2
|
+
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
2
3
|
|
|
3
|
-
interface ScrollPanelProps {
|
|
4
|
+
export interface ScrollPanelProps {
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface ScrollPanelSlots {
|
|
8
|
+
/**
|
|
9
|
+
* Custom content slot.
|
|
10
|
+
*/
|
|
11
|
+
default: () => VNode[];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export declare type ScrollPanelEmits = {
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare class ScrollPanel extends ClassComponent<ScrollPanelProps, ScrollPanelSlots, ScrollPanelEmits> { }
|
|
4
18
|
|
|
5
|
-
declare
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
'': VNode[];
|
|
19
|
+
declare module '@vue/runtime-core' {
|
|
20
|
+
interface GlobalComponents {
|
|
21
|
+
ScrollPanel: GlobalComponentConstructor<ScrollPanel>
|
|
9
22
|
}
|
|
10
23
|
}
|
|
11
24
|
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* ScrollPanel is a cross browser, lightweight and themable alternative to native browser scrollbar.
|
|
28
|
+
*
|
|
29
|
+
* Demos:
|
|
30
|
+
*
|
|
31
|
+
* - [ScrollPanel](https://www.primefaces.org/primevue/showcase/#/scrollpanel)
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
12
34
|
export default ScrollPanel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DomHandler as e}from"primevue/utils";import{openBlock as t,createBlock as s,createVNode as n,renderSlot as i}from"vue";var o={name:"ScrollPanel",initialized:!1,documentResizeListener:null,documentMouseMoveListener:null,documentMouseUpListener:null,frame:null,scrollXRatio:null,scrollYRatio:null,isXBarClicked:!1,isYBarClicked:!1,lastPageX:null,lastPageY:null,mounted(){this.$el.offsetParent&&this.initialize()},updated(){!this.initialized&&this.$el.offsetParent&&this.initialize()},beforeUnmount(){this.unbindDocumentResizeListener(),this.frame&&window.cancelAnimationFrame(this.frame)},methods:{initialize(){this.moveBar(),this.bindDocumentResizeListener(),this.calculateContainerHeight()},calculateContainerHeight(){let t=getComputedStyle(this.$el),s=getComputedStyle(this.$refs.xBar),n=e.getHeight(this.$el)-parseInt(s.height,10);"none"!==t["max-height"]&&0===n&&(this.$refs.content.offsetHeight+parseInt(s.height,10)>parseInt(t["max-height"],10)?this.$el.style.height=t["max-height"]:this.$el.style.height=this.$refs.content.offsetHeight+parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)+parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth)+"px")},moveBar(){let t=this.$refs.content.scrollWidth,s=this.$refs.content.clientWidth,n=-1*(this.$el.clientHeight-this.$refs.xBar.clientHeight);this.scrollXRatio=s/t;let i=this.$refs.content.scrollHeight,o=this.$refs.content.clientHeight,r=-1*(this.$el.clientWidth-this.$refs.yBar.clientWidth);this.scrollYRatio=o/i,this.frame=this.requestAnimationFrame((()=>{this.scrollXRatio>=1?e.addClass(this.$refs.xBar,"p-scrollpanel-hidden"):(e.removeClass(this.$refs.xBar,"p-scrollpanel-hidden"),this.$refs.xBar.style.cssText="width:"+Math.max(100*this.scrollXRatio,10)+"%; left:"+this.$refs.content.scrollLeft/t*100+"%;bottom:"+n+"px;"),this.scrollYRatio>=1?e.addClass(this.$refs.yBar,"p-scrollpanel-hidden"):(e.removeClass(this.$refs.yBar,"p-scrollpanel-hidden"),this.$refs.yBar.style.cssText="height:"+Math.max(100*this.scrollYRatio,10)+"%; top: calc("+this.$refs.content.scrollTop/i*100+"% - "+this.$refs.xBar.clientHeight+"px);right:"+r+"px;")}))},onYBarMouseDown(t){this.isYBarClicked=!0,this.lastPageY=t.pageY,e.addClass(this.$refs.yBar,"p-scrollpanel-grabbed"),e.addClass(document.body,"p-scrollpanel-grabbed"),this.bindDocumentMouseListeners(),t.preventDefault()},onXBarMouseDown(t){this.isXBarClicked=!0,this.lastPageX=t.pageX,e.addClass(this.$refs.xBar,"p-scrollpanel-grabbed"),e.addClass(document.body,"p-scrollpanel-grabbed"),this.bindDocumentMouseListeners(),t.preventDefault()},onDocumentMouseMove(e){this.isXBarClicked?this.onMouseMoveForXBar(e):(this.isYBarClicked||this.onMouseMoveForXBar(e),this.onMouseMoveForYBar(e))},onMouseMoveForXBar(e){let t=e.pageX-this.lastPageX;this.lastPageX=e.pageX,this.frame=this.requestAnimationFrame((()=>{this.$refs.content.scrollLeft+=t/this.scrollXRatio}))},onMouseMoveForYBar(e){let t=e.pageY-this.lastPageY;this.lastPageY=e.pageY,this.frame=this.requestAnimationFrame((()=>{this.$refs.content.scrollTop+=t/this.scrollYRatio}))},onDocumentMouseUp(){e.removeClass(this.$refs.yBar,"p-scrollpanel-grabbed"),e.removeClass(this.$refs.xBar,"p-scrollpanel-grabbed"),e.removeClass(document.body,"p-scrollpanel-grabbed"),this.unbindDocumentMouseListeners(),this.isXBarClicked=!1,this.isYBarClicked=!1},requestAnimationFrame(e){return(window.requestAnimationFrame||this.timeoutFrame)(e)},refresh(){this.moveBar()},scrollTop(e){let t=this.$refs.content.scrollHeight-this.$refs.content.clientHeight;e=e>t?t:e>0?e:0,this.$refs.contentscrollTop=e},bindDocumentMouseListeners(){this.documentMouseMoveListener||(this.documentMouseMoveListener=e=>{this.onDocumentMouseMove(e)},document.addEventListener("mousemove",this.documentMouseMoveListener)),this.documentMouseUpListener||(this.documentMouseUpListener=e=>{this.onDocumentMouseUp(e)},document.addEventListener("mouseup",this.documentMouseUpListener))},unbindDocumentMouseListeners(){this.documentMouseMoveListener&&(document.removeEventListener("mousemove",this.documentMouseMoveListener),this.documentMouseMoveListener=null),this.documentMouseUpListener&&(document.removeEventListener("mouseup",this.documentMouseUpListener),this.documentMouseUpListener=null)},bindDocumentResizeListener(){this.documentResizeListener||(this.documentResizeListener=()=>{this.moveBar()},window.addEventListener("resize",this.documentResizeListener))},unbindDocumentResizeListener(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}}};const r={class:"p-scrollpanel p-component"},l={class:"p-scrollpanel-wrapper"};!function(e,t){void 0===t&&(t={});var s=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===s&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-scrollpanel-wrapper {\n overflow: hidden;\n width: 100%;\n height: 100%;\n position: relative;\n z-index: 1;\n float: left;\n}\n.p-scrollpanel-content {\n height: calc(100% + 18px);\n width: calc(100% + 18px);\n padding: 0 18px 18px 0;\n position: relative;\n overflow: scroll;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.p-scrollpanel-bar {\n position: relative;\n background: #c1c1c1;\n border-radius: 3px;\n z-index: 2;\n cursor: pointer;\n opacity: 0;\n -webkit-transition: opacity 0.25s linear;\n transition: opacity 0.25s linear;\n}\n.p-scrollpanel-bar-y {\n width: 9px;\n top: 0;\n}\n.p-scrollpanel-bar-x {\n height: 9px;\n bottom: 0;\n}\n.p-scrollpanel-hidden {\n visibility: hidden;\n}\n.p-scrollpanel:hover .p-scrollpanel-bar,\n.p-scrollpanel:active .p-scrollpanel-bar {\n opacity: 1;\n}\n.p-scrollpanel-grabbed {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n"),o.render=function(e,o,a,c,h,d){return t(),s("div",r,[n("div",l,[n("div",{ref:"content",class:"p-scrollpanel-content",onScroll:o[1]||(o[1]=(...e)=>d.moveBar&&d.moveBar(...e)),onMouseenter:o[2]||(o[2]=(...e)=>d.moveBar&&d.moveBar(...e))},[i(e.$slots,"default")],544)]),n("div",{ref:"xBar",class:"p-scrollpanel-bar p-scrollpanel-bar-x",onMousedown:o[3]||(o[3]=(...e)=>d.onXBarMouseDown&&d.onXBarMouseDown(...e))},null,544),n("div",{ref:"yBar",class:"p-scrollpanel-bar p-scrollpanel-bar-y",onMousedown:o[4]||(o[4]=(...e)=>d.onYBarMouseDown&&d.onYBarMouseDown(...e))},null,544)])};export default
|
|
1
|
+
import{DomHandler as e}from"primevue/utils";import{openBlock as t,createBlock as s,createVNode as n,renderSlot as i}from"vue";var o={name:"ScrollPanel",initialized:!1,documentResizeListener:null,documentMouseMoveListener:null,documentMouseUpListener:null,frame:null,scrollXRatio:null,scrollYRatio:null,isXBarClicked:!1,isYBarClicked:!1,lastPageX:null,lastPageY:null,mounted(){this.$el.offsetParent&&this.initialize()},updated(){!this.initialized&&this.$el.offsetParent&&this.initialize()},beforeUnmount(){this.unbindDocumentResizeListener(),this.frame&&window.cancelAnimationFrame(this.frame)},methods:{initialize(){this.moveBar(),this.bindDocumentResizeListener(),this.calculateContainerHeight()},calculateContainerHeight(){let t=getComputedStyle(this.$el),s=getComputedStyle(this.$refs.xBar),n=e.getHeight(this.$el)-parseInt(s.height,10);"none"!==t["max-height"]&&0===n&&(this.$refs.content.offsetHeight+parseInt(s.height,10)>parseInt(t["max-height"],10)?this.$el.style.height=t["max-height"]:this.$el.style.height=this.$refs.content.offsetHeight+parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)+parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth)+"px")},moveBar(){let t=this.$refs.content.scrollWidth,s=this.$refs.content.clientWidth,n=-1*(this.$el.clientHeight-this.$refs.xBar.clientHeight);this.scrollXRatio=s/t;let i=this.$refs.content.scrollHeight,o=this.$refs.content.clientHeight,r=-1*(this.$el.clientWidth-this.$refs.yBar.clientWidth);this.scrollYRatio=o/i,this.frame=this.requestAnimationFrame((()=>{this.scrollXRatio>=1?e.addClass(this.$refs.xBar,"p-scrollpanel-hidden"):(e.removeClass(this.$refs.xBar,"p-scrollpanel-hidden"),this.$refs.xBar.style.cssText="width:"+Math.max(100*this.scrollXRatio,10)+"%; left:"+this.$refs.content.scrollLeft/t*100+"%;bottom:"+n+"px;"),this.scrollYRatio>=1?e.addClass(this.$refs.yBar,"p-scrollpanel-hidden"):(e.removeClass(this.$refs.yBar,"p-scrollpanel-hidden"),this.$refs.yBar.style.cssText="height:"+Math.max(100*this.scrollYRatio,10)+"%; top: calc("+this.$refs.content.scrollTop/i*100+"% - "+this.$refs.xBar.clientHeight+"px);right:"+r+"px;")}))},onYBarMouseDown(t){this.isYBarClicked=!0,this.lastPageY=t.pageY,e.addClass(this.$refs.yBar,"p-scrollpanel-grabbed"),e.addClass(document.body,"p-scrollpanel-grabbed"),this.bindDocumentMouseListeners(),t.preventDefault()},onXBarMouseDown(t){this.isXBarClicked=!0,this.lastPageX=t.pageX,e.addClass(this.$refs.xBar,"p-scrollpanel-grabbed"),e.addClass(document.body,"p-scrollpanel-grabbed"),this.bindDocumentMouseListeners(),t.preventDefault()},onDocumentMouseMove(e){this.isXBarClicked?this.onMouseMoveForXBar(e):(this.isYBarClicked||this.onMouseMoveForXBar(e),this.onMouseMoveForYBar(e))},onMouseMoveForXBar(e){let t=e.pageX-this.lastPageX;this.lastPageX=e.pageX,this.frame=this.requestAnimationFrame((()=>{this.$refs.content.scrollLeft+=t/this.scrollXRatio}))},onMouseMoveForYBar(e){let t=e.pageY-this.lastPageY;this.lastPageY=e.pageY,this.frame=this.requestAnimationFrame((()=>{this.$refs.content.scrollTop+=t/this.scrollYRatio}))},onDocumentMouseUp(){e.removeClass(this.$refs.yBar,"p-scrollpanel-grabbed"),e.removeClass(this.$refs.xBar,"p-scrollpanel-grabbed"),e.removeClass(document.body,"p-scrollpanel-grabbed"),this.unbindDocumentMouseListeners(),this.isXBarClicked=!1,this.isYBarClicked=!1},requestAnimationFrame(e){return(window.requestAnimationFrame||this.timeoutFrame)(e)},refresh(){this.moveBar()},scrollTop(e){let t=this.$refs.content.scrollHeight-this.$refs.content.clientHeight;e=e>t?t:e>0?e:0,this.$refs.contentscrollTop=e},bindDocumentMouseListeners(){this.documentMouseMoveListener||(this.documentMouseMoveListener=e=>{this.onDocumentMouseMove(e)},document.addEventListener("mousemove",this.documentMouseMoveListener)),this.documentMouseUpListener||(this.documentMouseUpListener=e=>{this.onDocumentMouseUp(e)},document.addEventListener("mouseup",this.documentMouseUpListener))},unbindDocumentMouseListeners(){this.documentMouseMoveListener&&(document.removeEventListener("mousemove",this.documentMouseMoveListener),this.documentMouseMoveListener=null),this.documentMouseUpListener&&(document.removeEventListener("mouseup",this.documentMouseUpListener),this.documentMouseUpListener=null)},bindDocumentResizeListener(){this.documentResizeListener||(this.documentResizeListener=()=>{this.moveBar()},window.addEventListener("resize",this.documentResizeListener))},unbindDocumentResizeListener(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}}};const r={class:"p-scrollpanel p-component"},l={class:"p-scrollpanel-wrapper"};!function(e,t){void 0===t&&(t={});var s=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===s&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-scrollpanel-wrapper {\n overflow: hidden;\n width: 100%;\n height: 100%;\n position: relative;\n z-index: 1;\n float: left;\n}\n.p-scrollpanel-content {\n height: calc(100% + 18px);\n width: calc(100% + 18px);\n padding: 0 18px 18px 0;\n position: relative;\n overflow: scroll;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.p-scrollpanel-bar {\n position: relative;\n background: #c1c1c1;\n border-radius: 3px;\n z-index: 2;\n cursor: pointer;\n opacity: 0;\n -webkit-transition: opacity 0.25s linear;\n transition: opacity 0.25s linear;\n}\n.p-scrollpanel-bar-y {\n width: 9px;\n top: 0;\n}\n.p-scrollpanel-bar-x {\n height: 9px;\n bottom: 0;\n}\n.p-scrollpanel-hidden {\n visibility: hidden;\n}\n.p-scrollpanel:hover .p-scrollpanel-bar,\n.p-scrollpanel:active .p-scrollpanel-bar {\n opacity: 1;\n}\n.p-scrollpanel-grabbed {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n"),o.render=function(e,o,a,c,h,d){return t(),s("div",r,[n("div",l,[n("div",{ref:"content",class:"p-scrollpanel-content",onScroll:o[1]||(o[1]=(...e)=>d.moveBar&&d.moveBar(...e)),onMouseenter:o[2]||(o[2]=(...e)=>d.moveBar&&d.moveBar(...e))},[i(e.$slots,"default")],544)]),n("div",{ref:"xBar",class:"p-scrollpanel-bar p-scrollpanel-bar-x",onMousedown:o[3]||(o[3]=(...e)=>d.onXBarMouseDown&&d.onXBarMouseDown(...e))},null,544),n("div",{ref:"yBar",class:"p-scrollpanel-bar p-scrollpanel-bar-y",onMousedown:o[4]||(o[4]=(...e)=>d.onYBarMouseDown&&d.onYBarMouseDown(...e))},null,544)])};export{o as default};
|
package/scrolltop/ScrollTop.d.ts
CHANGED
|
@@ -1,12 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
2
|
+
|
|
3
|
+
type ScrollTopTargetType = 'window' | 'parent' | undefined;
|
|
4
|
+
|
|
5
|
+
export interface ScrollTopProps {
|
|
6
|
+
/**
|
|
7
|
+
* Target of the ScrollTop.
|
|
8
|
+
* @see ScrollTopTargetType
|
|
9
|
+
* Default value is 'window'.
|
|
10
|
+
*/
|
|
11
|
+
target?: ScrollTopTargetType;
|
|
12
|
+
/**
|
|
13
|
+
* Defines the threshold value of the vertical scroll position of the target to toggle the visibility.
|
|
14
|
+
* Default value is 400.
|
|
15
|
+
*/
|
|
16
|
+
threshold?: number | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Icon to display.
|
|
19
|
+
* Default value is 'pi pi-chevron-up'.
|
|
20
|
+
*/
|
|
21
|
+
icon?: string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Defines the scrolling behaviour, 'smooth' adds an animation and 'auto' scrolls with a jump.
|
|
24
|
+
* Default value is 'smooth'.
|
|
25
|
+
*/
|
|
26
|
+
behavior?: string | undefined;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface ScrollTopSlots {
|
|
6
30
|
}
|
|
7
31
|
|
|
8
|
-
declare
|
|
9
|
-
|
|
32
|
+
export declare type ScrollTopEmits = {
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
declare class ScrollTop extends ClassComponent<ScrollTopProps, ScrollTopSlots, ScrollTopEmits> { }
|
|
36
|
+
|
|
37
|
+
declare module '@vue/runtime-core' {
|
|
38
|
+
interface GlobalComponents {
|
|
39
|
+
ScrollTop: GlobalComponentConstructor<ScrollTop>
|
|
40
|
+
}
|
|
10
41
|
}
|
|
11
42
|
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* ScrollTop gets displayed after a certain scroll position and used to navigates to the top of the page quickly.
|
|
46
|
+
*
|
|
47
|
+
* Demos:
|
|
48
|
+
*
|
|
49
|
+
* - [ScrollTop](https://www.primefaces.org/primevue/showcase/#/scrolltop)
|
|
50
|
+
*
|
|
51
|
+
*/
|
|
12
52
|
export default ScrollTop;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ZIndexUtils as e,DomHandler as t}from"primevue/utils";import{openBlock as n,createBlock as i,Transition as o,withCtx as r,createVNode as l,createCommentVNode as s}from"vue";var c={name:"ScrollTop",scrollListener:null,container:null,data:()=>({visible:!1}),props:{target:{type:String,default:"window"},threshold:{type:Number,default:400},icon:{type:String,default:"pi pi-chevron-up"},behavior:{type:String,default:"smooth"}},mounted(){"window"===this.target?this.bindDocumentScrollListener():"parent"===this.target&&this.bindParentScrollListener()},beforeUnmount(){"window"===this.target?this.unbindDocumentScrollListener():"parent"===this.target&&this.unbindParentScrollListener(),this.container&&(e.clear(this.container),this.overlay=null)},methods:{onClick(){("window"===this.target?window:this.$el.parentElement).scroll({top:0,behavior:this.behavior})},checkVisibility(e){e>this.threshold?this.visible=!0:this.visible=!1},bindParentScrollListener(){this.scrollListener=()=>{this.checkVisibility(this.$el.parentElement.scrollTop)},this.$el.parentElement.addEventListener("scroll",this.scrollListener)},bindDocumentScrollListener(){this.scrollListener=()=>{this.checkVisibility(t.getWindowScrollTop())},window.addEventListener("scroll",this.scrollListener)},unbindParentScrollListener(){this.scrollListener&&(this.$el.parentElement.removeEventListener("scroll",this.scrollListener),this.scrollListener=null)},unbindDocumentScrollListener(){this.scrollListener&&(window.removeEventListener("scroll",this.scrollListener),this.scrollListener=null)},onEnter(t){e.set("overlay",t,this.$primevue.config.zIndex.overlay)},onAfterLeave(t){e.clear(t)},containerRef(e){this.container=e}},computed:{containerClass(){return["p-scrolltop p-link p-component",{"p-scrolltop-sticky":"window"!==this.target}]},iconClass(){return["p-scrolltop-icon",this.icon]}}};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("\n.p-scrolltop {\n position: fixed;\n bottom: 20px;\n right: 20px;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.p-scrolltop-sticky {\n position: sticky;\n}\n.p-scrolltop-sticky.p-link {\n margin-left: auto;\n}\n.p-scrolltop-enter-from {\n opacity: 0;\n}\n.p-scrolltop-enter-active {\n -webkit-transition: opacity .15s;\n transition: opacity .15s;\n}\n.p-scrolltop.p-scrolltop-leave-to {\n opacity: 0;\n}\n.p-scrolltop-leave-active {\n -webkit-transition: opacity .15s;\n transition: opacity .15s;\n}\n"),c.render=function(e,t,c,a,p,h){return n(),i(o,{name:"p-scrolltop",appear:"",onEnter:h.onEnter,onAfterLeave:h.onAfterLeave},{default:r((()=>[p.visible?(n(),i("button",{key:0,ref:h.containerRef,class:h.containerClass,onClick:t[1]||(t[1]=(...e)=>h.onClick&&h.onClick(...e)),type:"button"},[l("span",{class:h.iconClass},null,2)],2)):s("",!0)])),_:1},8,["onEnter","onAfterLeave"])};export default
|
|
1
|
+
import{ZIndexUtils as e,DomHandler as t}from"primevue/utils";import{openBlock as n,createBlock as i,Transition as o,withCtx as r,createVNode as l,createCommentVNode as s}from"vue";var c={name:"ScrollTop",scrollListener:null,container:null,data:()=>({visible:!1}),props:{target:{type:String,default:"window"},threshold:{type:Number,default:400},icon:{type:String,default:"pi pi-chevron-up"},behavior:{type:String,default:"smooth"}},mounted(){"window"===this.target?this.bindDocumentScrollListener():"parent"===this.target&&this.bindParentScrollListener()},beforeUnmount(){"window"===this.target?this.unbindDocumentScrollListener():"parent"===this.target&&this.unbindParentScrollListener(),this.container&&(e.clear(this.container),this.overlay=null)},methods:{onClick(){("window"===this.target?window:this.$el.parentElement).scroll({top:0,behavior:this.behavior})},checkVisibility(e){e>this.threshold?this.visible=!0:this.visible=!1},bindParentScrollListener(){this.scrollListener=()=>{this.checkVisibility(this.$el.parentElement.scrollTop)},this.$el.parentElement.addEventListener("scroll",this.scrollListener)},bindDocumentScrollListener(){this.scrollListener=()=>{this.checkVisibility(t.getWindowScrollTop())},window.addEventListener("scroll",this.scrollListener)},unbindParentScrollListener(){this.scrollListener&&(this.$el.parentElement.removeEventListener("scroll",this.scrollListener),this.scrollListener=null)},unbindDocumentScrollListener(){this.scrollListener&&(window.removeEventListener("scroll",this.scrollListener),this.scrollListener=null)},onEnter(t){e.set("overlay",t,this.$primevue.config.zIndex.overlay)},onAfterLeave(t){e.clear(t)},containerRef(e){this.container=e}},computed:{containerClass(){return["p-scrolltop p-link p-component",{"p-scrolltop-sticky":"window"!==this.target}]},iconClass(){return["p-scrolltop-icon",this.icon]}}};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("\n.p-scrolltop {\n position: fixed;\n bottom: 20px;\n right: 20px;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.p-scrolltop-sticky {\n position: sticky;\n}\n.p-scrolltop-sticky.p-link {\n margin-left: auto;\n}\n.p-scrolltop-enter-from {\n opacity: 0;\n}\n.p-scrolltop-enter-active {\n -webkit-transition: opacity .15s;\n transition: opacity .15s;\n}\n.p-scrolltop.p-scrolltop-leave-to {\n opacity: 0;\n}\n.p-scrolltop-leave-active {\n -webkit-transition: opacity .15s;\n transition: opacity .15s;\n}\n"),c.render=function(e,t,c,a,p,h){return n(),i(o,{name:"p-scrolltop",appear:"",onEnter:h.onEnter,onAfterLeave:h.onAfterLeave},{default:r((()=>[p.visible?(n(),i("button",{key:0,ref:h.containerRef,class:h.containerClass,onClick:t[1]||(t[1]=(...e)=>h.onClick&&h.onClick(...e)),type:"button"},[l("span",{class:h.iconClass},null,2)],2)):s("",!0)])),_:1},8,["onEnter","onAfterLeave"])};export{c as default};
|
package/scrolltop/scrolltop.js
CHANGED
|
@@ -1,28 +1,117 @@
|
|
|
1
|
-
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
3
|
+
|
|
4
|
+
type SelectButtonOptionLabelType = string | ((data: any) => string) | undefined;
|
|
5
|
+
|
|
6
|
+
type SelectButtonOptionValueType = string | ((data: any) => any) | undefined;
|
|
7
|
+
|
|
8
|
+
type SelectButtonOptionDisabledType = string | ((data: any) => boolean) | undefined;
|
|
9
|
+
|
|
10
|
+
export interface SelectButtonChangeEvent {
|
|
11
|
+
/**
|
|
12
|
+
* Browser event.
|
|
13
|
+
*/
|
|
14
|
+
originalEvent: Event;
|
|
15
|
+
/**
|
|
16
|
+
* Single value or an array of values that are selected.
|
|
17
|
+
*/
|
|
18
|
+
value: any;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface SelectButtonProps {
|
|
22
|
+
/**
|
|
23
|
+
* Value of the component.
|
|
24
|
+
*/
|
|
2
25
|
modelValue?: any;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
26
|
+
/**
|
|
27
|
+
* An array of selectitems to display as the available options.
|
|
28
|
+
*/
|
|
29
|
+
options?: any[] | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Property name or getter function to use as the label of an option.
|
|
32
|
+
*/
|
|
33
|
+
optionLabel?: SelectButtonOptionLabelType;
|
|
34
|
+
/**
|
|
35
|
+
* Property name or getter function to use as the value of an option, defaults to the option itself when not defined.
|
|
36
|
+
*/
|
|
37
|
+
optionValue?: SelectButtonOptionValueType;
|
|
38
|
+
/**
|
|
39
|
+
* Property name or getter function to use as the disabled flag of an option, defaults to false when not defined.
|
|
40
|
+
*/
|
|
41
|
+
optionDisabled?: SelectButtonOptionDisabledType;
|
|
42
|
+
/**
|
|
43
|
+
* When specified, allows selecting multiple values.
|
|
44
|
+
*/
|
|
45
|
+
multiple?: boolean | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* When present, it specifies that the element should be disabled.
|
|
48
|
+
*/
|
|
49
|
+
disabled?: boolean | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* A property to uniquely identify an option.
|
|
52
|
+
*/
|
|
53
|
+
dataKey?: string | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Establishes relationships between the component and label(s) where its value should be one or more element IDs.
|
|
56
|
+
*/
|
|
57
|
+
ariaLabelledBy?: string | undefined;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface SelectButtonSlots {
|
|
61
|
+
/**
|
|
62
|
+
* Custom content for each option.
|
|
63
|
+
* @param {Object} scope - option slot's params.
|
|
64
|
+
*/
|
|
65
|
+
option: (scope: {
|
|
66
|
+
/**
|
|
67
|
+
* Option instance
|
|
68
|
+
*/
|
|
69
|
+
option: any;
|
|
70
|
+
/**
|
|
71
|
+
* Index of the option
|
|
72
|
+
*/
|
|
73
|
+
index: number;
|
|
74
|
+
}) => VNode[];
|
|
11
75
|
}
|
|
12
76
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
77
|
+
export declare type SelectButtonEmits = {
|
|
78
|
+
/**
|
|
79
|
+
* Emitted when the value changes.
|
|
80
|
+
* @param {*} value - New value.
|
|
81
|
+
*/
|
|
82
|
+
'update:modelValue': (value: any) => void;
|
|
83
|
+
/**
|
|
84
|
+
* Callback to invoke on value change.
|
|
85
|
+
* @param {SelectButtonChangeEvent} event - Custom change event.
|
|
86
|
+
*/
|
|
87
|
+
'change': (event: SelectButtonChangeEvent) => void;
|
|
88
|
+
/**
|
|
89
|
+
* Callback to invoke on focus.
|
|
90
|
+
* @param {SelectButtonChangeEvent} event - Browser event.
|
|
91
|
+
*/
|
|
92
|
+
'focus': (event: Event) => void;
|
|
93
|
+
/**
|
|
94
|
+
* Callback to invoke on blur.
|
|
95
|
+
* @param {Event} event - Browser event.
|
|
96
|
+
*/
|
|
97
|
+
'blur': (event: Event) => void;
|
|
16
98
|
}
|
|
17
99
|
|
|
18
|
-
declare class SelectButton {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
$slots: {
|
|
24
|
-
option: SelectButtonOptionSlotInterface;
|
|
100
|
+
declare class SelectButton extends ClassComponent<SelectButtonProps, SelectButtonSlots, SelectButtonEmits> { }
|
|
101
|
+
|
|
102
|
+
declare module '@vue/runtime-core' {
|
|
103
|
+
interface GlobalComponents {
|
|
104
|
+
SelectButton: GlobalComponentConstructor<SelectButton>
|
|
25
105
|
}
|
|
26
106
|
}
|
|
27
107
|
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
* SelectButton is a form component to choose a value from a list of options using button elements.
|
|
111
|
+
*
|
|
112
|
+
* Demos:
|
|
113
|
+
*
|
|
114
|
+
* - [SelectButton](https://www.primefaces.org/primevue/showcase/#/selectbutton)
|
|
115
|
+
*
|
|
116
|
+
*/
|
|
28
117
|
export default SelectButton;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="
|
|
2
|
+
<div :class="containerClass" role="group">
|
|
3
3
|
<div v-for="(option, i) of options" :key="getOptionRenderKey(option)" :aria-label="getOptionLabel(option)" role="button" :aria-pressed="isSelected(option)"
|
|
4
4
|
@click="onOptionSelect($event, option, i)" @keydown.enter.prevent="onOptionSelect($event, option, i)" @keydown.space.prevent="onOptionSelect($event, option)"
|
|
5
5
|
:tabindex="isOptionDisabled(option) ? null : '0'" @focus="onFocus($event)" @blur="onBlur($event)" :aria-labelledby="ariaLabelledBy" v-ripple
|
|
@@ -17,7 +17,7 @@ import Ripple from 'primevue/ripple';
|
|
|
17
17
|
|
|
18
18
|
export default {
|
|
19
19
|
name: 'SelectButton',
|
|
20
|
-
emits: ['update:modelValue', 'focus', 'blur'],
|
|
20
|
+
emits: ['update:modelValue', 'focus', 'blur', 'change'],
|
|
21
21
|
props: {
|
|
22
22
|
modelValue: null,
|
|
23
23
|
options: Array,
|
|
@@ -62,6 +62,7 @@ export default {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
this.$emit('update:modelValue', newValue);
|
|
65
|
+
this.$emit('change', {event: event, value: newValue});
|
|
65
66
|
},
|
|
66
67
|
isSelected(option) {
|
|
67
68
|
let selected = false;
|
|
@@ -97,6 +98,11 @@ export default {
|
|
|
97
98
|
}
|
|
98
99
|
},
|
|
99
100
|
computed: {
|
|
101
|
+
containerClass() {
|
|
102
|
+
return ['p-selectbutton p-buttonset p-component', {
|
|
103
|
+
'p-disabled': this.disabled
|
|
104
|
+
}];
|
|
105
|
+
},
|
|
100
106
|
equalityKey() {
|
|
101
107
|
return this.optionValue ? null : this.dataKey;
|
|
102
108
|
}
|
|
@@ -10,7 +10,7 @@ var Ripple__default = /*#__PURE__*/_interopDefaultLegacy(Ripple);
|
|
|
10
10
|
|
|
11
11
|
var script = {
|
|
12
12
|
name: 'SelectButton',
|
|
13
|
-
emits: ['update:modelValue', 'focus', 'blur'],
|
|
13
|
+
emits: ['update:modelValue', 'focus', 'blur', 'change'],
|
|
14
14
|
props: {
|
|
15
15
|
modelValue: null,
|
|
16
16
|
options: Array,
|
|
@@ -55,6 +55,7 @@ var script = {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
this.$emit('update:modelValue', newValue);
|
|
58
|
+
this.$emit('change', {event: event, value: newValue});
|
|
58
59
|
},
|
|
59
60
|
isSelected(option) {
|
|
60
61
|
let selected = false;
|
|
@@ -90,25 +91,29 @@ var script = {
|
|
|
90
91
|
}
|
|
91
92
|
},
|
|
92
93
|
computed: {
|
|
94
|
+
containerClass() {
|
|
95
|
+
return ['p-selectbutton p-buttonset p-component', {
|
|
96
|
+
'p-disabled': this.disabled
|
|
97
|
+
}];
|
|
98
|
+
},
|
|
93
99
|
equalityKey() {
|
|
94
100
|
return this.optionValue ? null : this.dataKey;
|
|
95
101
|
}
|
|
96
102
|
},
|
|
97
103
|
directives: {
|
|
98
|
-
'ripple': Ripple__default[
|
|
104
|
+
'ripple': Ripple__default["default"]
|
|
99
105
|
}
|
|
100
106
|
};
|
|
101
107
|
|
|
102
|
-
const _hoisted_1 = {
|
|
103
|
-
class: "p-selectbutton p-buttonset p-component",
|
|
104
|
-
role: "group"
|
|
105
|
-
};
|
|
106
|
-
const _hoisted_2 = { class: "p-button-label" };
|
|
108
|
+
const _hoisted_1 = { class: "p-button-label" };
|
|
107
109
|
|
|
108
110
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
109
111
|
const _directive_ripple = vue.resolveDirective("ripple");
|
|
110
112
|
|
|
111
|
-
return (vue.openBlock(), vue.createBlock("div",
|
|
113
|
+
return (vue.openBlock(), vue.createBlock("div", {
|
|
114
|
+
class: $options.containerClass,
|
|
115
|
+
role: "group"
|
|
116
|
+
}, [
|
|
112
117
|
(vue.openBlock(true), vue.createBlock(vue.Fragment, null, vue.renderList($props.options, (option, i) => {
|
|
113
118
|
return vue.withDirectives((vue.openBlock(), vue.createBlock("div", {
|
|
114
119
|
key: $options.getOptionRenderKey(option),
|
|
@@ -130,13 +135,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
130
135
|
option: option,
|
|
131
136
|
index: i
|
|
132
137
|
}, () => [
|
|
133
|
-
vue.createVNode("span",
|
|
138
|
+
vue.createVNode("span", _hoisted_1, vue.toDisplayString($options.getOptionLabel(option)), 1)
|
|
134
139
|
])
|
|
135
140
|
], 42, ["aria-label", "aria-pressed", "onClick", "onKeydown", "tabindex", "aria-labelledby"])), [
|
|
136
141
|
[_directive_ripple]
|
|
137
142
|
])
|
|
138
143
|
}), 128))
|
|
139
|
-
]))
|
|
144
|
+
], 2))
|
|
140
145
|
}
|
|
141
146
|
|
|
142
147
|
script.render = render;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/utils"),t=require("primevue/ripple"),i=require("vue");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o={name:"SelectButton",emits:["update:modelValue","focus","blur"],props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,multiple:Boolean,disabled:Boolean,dataKey:null,ariaLabelledBy:null},methods:{getOptionLabel(t){return this.optionLabel?e.ObjectUtils.resolveFieldData(t,this.optionLabel):t},getOptionValue(t){return this.optionValue?e.ObjectUtils.resolveFieldData(t,this.optionValue):t},getOptionRenderKey(t){return this.dataKey?e.ObjectUtils.resolveFieldData(t,this.dataKey):this.getOptionLabel(t)},isOptionDisabled(t){return!!this.optionDisabled&&e.ObjectUtils.resolveFieldData(t,this.optionDisabled)},onOptionSelect(t,i){if(this.disabled||this.isOptionDisabled(i))return;let l,o=this.isSelected(i),s=this.getOptionValue(i);l=this.multiple?o?this.modelValue.filter((t=>!e.ObjectUtils.equals(t,s,this.equalityKey))):this.modelValue?[...this.modelValue,s]:[s]:s,this.$emit("update:modelValue",l)},isSelected(t){let i=!1,l=this.getOptionValue(t);if(this.multiple){if(this.modelValue)for(let t of this.modelValue)if(e.ObjectUtils.equals(t,l,this.equalityKey)){i=!0;break}}else i=e.ObjectUtils.equals(this.modelValue,l,this.equalityKey);return i},onFocus(e){this.$emit("focus",e)},onBlur(e){this.$emit("blur",e)},getButtonClass(e){return["p-button p-component",{"p-highlight":this.isSelected(e),"p-disabled":this.isOptionDisabled(e)}]}},computed:{equalityKey(){return this.optionValue?null:this.dataKey}},directives:{ripple:l(t).default}};const s={class:"p-
|
|
1
|
+
"use strict";var e=require("primevue/utils"),t=require("primevue/ripple"),i=require("vue");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o={name:"SelectButton",emits:["update:modelValue","focus","blur","change"],props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,multiple:Boolean,disabled:Boolean,dataKey:null,ariaLabelledBy:null},methods:{getOptionLabel(t){return this.optionLabel?e.ObjectUtils.resolveFieldData(t,this.optionLabel):t},getOptionValue(t){return this.optionValue?e.ObjectUtils.resolveFieldData(t,this.optionValue):t},getOptionRenderKey(t){return this.dataKey?e.ObjectUtils.resolveFieldData(t,this.dataKey):this.getOptionLabel(t)},isOptionDisabled(t){return!!this.optionDisabled&&e.ObjectUtils.resolveFieldData(t,this.optionDisabled)},onOptionSelect(t,i){if(this.disabled||this.isOptionDisabled(i))return;let l,o=this.isSelected(i),s=this.getOptionValue(i);l=this.multiple?o?this.modelValue.filter((t=>!e.ObjectUtils.equals(t,s,this.equalityKey))):this.modelValue?[...this.modelValue,s]:[s]:s,this.$emit("update:modelValue",l),this.$emit("change",{event:t,value:l})},isSelected(t){let i=!1,l=this.getOptionValue(t);if(this.multiple){if(this.modelValue)for(let t of this.modelValue)if(e.ObjectUtils.equals(t,l,this.equalityKey)){i=!0;break}}else i=e.ObjectUtils.equals(this.modelValue,l,this.equalityKey);return i},onFocus(e){this.$emit("focus",e)},onBlur(e){this.$emit("blur",e)},getButtonClass(e){return["p-button p-component",{"p-highlight":this.isSelected(e),"p-disabled":this.isOptionDisabled(e)}]}},computed:{containerClass(){return["p-selectbutton p-buttonset p-component",{"p-disabled":this.disabled}]},equalityKey(){return this.optionValue?null:this.dataKey}},directives:{ripple:l(t).default}};const s={class:"p-button-label"};o.render=function(e,t,l,o,a,n){const r=i.resolveDirective("ripple");return i.openBlock(),i.createBlock("div",{class:n.containerClass,role:"group"},[(i.openBlock(!0),i.createBlock(i.Fragment,null,i.renderList(l.options,((o,a)=>i.withDirectives((i.openBlock(),i.createBlock("div",{key:n.getOptionRenderKey(o),"aria-label":n.getOptionLabel(o),role:"button","aria-pressed":n.isSelected(o),onClick:e=>n.onOptionSelect(e,o,a),onKeydown:[i.withKeys(i.withModifiers((e=>n.onOptionSelect(e,o,a)),["prevent"]),["enter"]),i.withKeys(i.withModifiers((e=>n.onOptionSelect(e,o)),["prevent"]),["space"])],tabindex:n.isOptionDisabled(o)?null:"0",onFocus:t[1]||(t[1]=e=>n.onFocus(e)),onBlur:t[2]||(t[2]=e=>n.onBlur(e)),"aria-labelledby":l.ariaLabelledBy,class:n.getButtonClass(o)},[i.renderSlot(e.$slots,"option",{option:o,index:a},(()=>[i.createVNode("span",s,i.toDisplayString(n.getOptionLabel(o)),1)]))],42,["aria-label","aria-pressed","onClick","onKeydown","tabindex","aria-labelledby"])),[[r]]))),128))],2)},module.exports=o;
|
|
@@ -4,7 +4,7 @@ import { resolveDirective, openBlock, createBlock, Fragment, renderList, withDir
|
|
|
4
4
|
|
|
5
5
|
var script = {
|
|
6
6
|
name: 'SelectButton',
|
|
7
|
-
emits: ['update:modelValue', 'focus', 'blur'],
|
|
7
|
+
emits: ['update:modelValue', 'focus', 'blur', 'change'],
|
|
8
8
|
props: {
|
|
9
9
|
modelValue: null,
|
|
10
10
|
options: Array,
|
|
@@ -49,6 +49,7 @@ var script = {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
this.$emit('update:modelValue', newValue);
|
|
52
|
+
this.$emit('change', {event: event, value: newValue});
|
|
52
53
|
},
|
|
53
54
|
isSelected(option) {
|
|
54
55
|
let selected = false;
|
|
@@ -84,6 +85,11 @@ var script = {
|
|
|
84
85
|
}
|
|
85
86
|
},
|
|
86
87
|
computed: {
|
|
88
|
+
containerClass() {
|
|
89
|
+
return ['p-selectbutton p-buttonset p-component', {
|
|
90
|
+
'p-disabled': this.disabled
|
|
91
|
+
}];
|
|
92
|
+
},
|
|
87
93
|
equalityKey() {
|
|
88
94
|
return this.optionValue ? null : this.dataKey;
|
|
89
95
|
}
|
|
@@ -93,16 +99,15 @@ var script = {
|
|
|
93
99
|
}
|
|
94
100
|
};
|
|
95
101
|
|
|
96
|
-
const _hoisted_1 = {
|
|
97
|
-
class: "p-selectbutton p-buttonset p-component",
|
|
98
|
-
role: "group"
|
|
99
|
-
};
|
|
100
|
-
const _hoisted_2 = { class: "p-button-label" };
|
|
102
|
+
const _hoisted_1 = { class: "p-button-label" };
|
|
101
103
|
|
|
102
104
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
103
105
|
const _directive_ripple = resolveDirective("ripple");
|
|
104
106
|
|
|
105
|
-
return (openBlock(), createBlock("div",
|
|
107
|
+
return (openBlock(), createBlock("div", {
|
|
108
|
+
class: $options.containerClass,
|
|
109
|
+
role: "group"
|
|
110
|
+
}, [
|
|
106
111
|
(openBlock(true), createBlock(Fragment, null, renderList($props.options, (option, i) => {
|
|
107
112
|
return withDirectives((openBlock(), createBlock("div", {
|
|
108
113
|
key: $options.getOptionRenderKey(option),
|
|
@@ -124,15 +129,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
124
129
|
option: option,
|
|
125
130
|
index: i
|
|
126
131
|
}, () => [
|
|
127
|
-
createVNode("span",
|
|
132
|
+
createVNode("span", _hoisted_1, toDisplayString($options.getOptionLabel(option)), 1)
|
|
128
133
|
])
|
|
129
134
|
], 42, ["aria-label", "aria-pressed", "onClick", "onKeydown", "tabindex", "aria-labelledby"])), [
|
|
130
135
|
[_directive_ripple]
|
|
131
136
|
])
|
|
132
137
|
}), 128))
|
|
133
|
-
]))
|
|
138
|
+
], 2))
|
|
134
139
|
}
|
|
135
140
|
|
|
136
141
|
script.render = render;
|
|
137
142
|
|
|
138
|
-
export default
|
|
143
|
+
export { script as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ObjectUtils as e}from"primevue/utils";import t from"primevue/ripple";import{resolveDirective as l,openBlock as i,createBlock as o,Fragment as a,renderList as n,withDirectives as s,withKeys as u,withModifiers as
|
|
1
|
+
import{ObjectUtils as e}from"primevue/utils";import t from"primevue/ripple";import{resolveDirective as l,openBlock as i,createBlock as o,Fragment as a,renderList as n,withDirectives as s,withKeys as u,withModifiers as r,renderSlot as p,createVNode as d,toDisplayString as h}from"vue";var b={name:"SelectButton",emits:["update:modelValue","focus","blur","change"],props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,multiple:Boolean,disabled:Boolean,dataKey:null,ariaLabelledBy:null},methods:{getOptionLabel(t){return this.optionLabel?e.resolveFieldData(t,this.optionLabel):t},getOptionValue(t){return this.optionValue?e.resolveFieldData(t,this.optionValue):t},getOptionRenderKey(t){return this.dataKey?e.resolveFieldData(t,this.dataKey):this.getOptionLabel(t)},isOptionDisabled(t){return!!this.optionDisabled&&e.resolveFieldData(t,this.optionDisabled)},onOptionSelect(t,l){if(this.disabled||this.isOptionDisabled(l))return;let i,o=this.isSelected(l),a=this.getOptionValue(l);i=this.multiple?o?this.modelValue.filter((t=>!e.equals(t,a,this.equalityKey))):this.modelValue?[...this.modelValue,a]:[a]:a,this.$emit("update:modelValue",i),this.$emit("change",{event:t,value:i})},isSelected(t){let l=!1,i=this.getOptionValue(t);if(this.multiple){if(this.modelValue)for(let t of this.modelValue)if(e.equals(t,i,this.equalityKey)){l=!0;break}}else l=e.equals(this.modelValue,i,this.equalityKey);return l},onFocus(e){this.$emit("focus",e)},onBlur(e){this.$emit("blur",e)},getButtonClass(e){return["p-button p-component",{"p-highlight":this.isSelected(e),"p-disabled":this.isOptionDisabled(e)}]}},computed:{containerClass(){return["p-selectbutton p-buttonset p-component",{"p-disabled":this.disabled}]},equalityKey(){return this.optionValue?null:this.dataKey}},directives:{ripple:t}};const c={class:"p-button-label"};b.render=function(e,t,b,m,y,O){const g=l("ripple");return i(),o("div",{class:O.containerClass,role:"group"},[(i(!0),o(a,null,n(b.options,((l,a)=>s((i(),o("div",{key:O.getOptionRenderKey(l),"aria-label":O.getOptionLabel(l),role:"button","aria-pressed":O.isSelected(l),onClick:e=>O.onOptionSelect(e,l,a),onKeydown:[u(r((e=>O.onOptionSelect(e,l,a)),["prevent"]),["enter"]),u(r((e=>O.onOptionSelect(e,l)),["prevent"]),["space"])],tabindex:O.isOptionDisabled(l)?null:"0",onFocus:t[1]||(t[1]=e=>O.onFocus(e)),onBlur:t[2]||(t[2]=e=>O.onBlur(e)),"aria-labelledby":b.ariaLabelledBy,class:O.getButtonClass(l)},[p(e.$slots,"option",{option:l,index:a},(()=>[d("span",c,h(O.getOptionLabel(l)),1)]))],42,["aria-label","aria-pressed","onClick","onKeydown","tabindex","aria-labelledby"])),[[g]]))),128))],2)};export{b as default};
|