primevue 3.31.0 → 3.32.1
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/accordion/Accordion.d.ts +7 -7
- package/accordion/Accordion.vue +1 -1
- package/accordion/accordion.cjs.js +3 -3
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +3 -3
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +3 -3
- package/accordion/accordion.min.js +1 -1
- package/accordiontab/AccordionTab.d.ts +22 -15
- package/autocomplete/AutoComplete.d.ts +50 -29
- package/autocomplete/AutoComplete.vue +4 -4
- package/autocomplete/BaseAutoComplete.vue +4 -0
- package/autocomplete/autocomplete.cjs.js +10 -5
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +10 -5
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +10 -5
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/Avatar.d.ts +9 -9
- package/avatar/Avatar.vue +2 -2
- package/avatar/avatar.cjs.js +2 -2
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.esm.js +2 -2
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +2 -2
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/AvatarGroup.d.ts +5 -5
- package/badge/Badge.d.ts +5 -5
- package/badgedirective/BadgeDirective.d.ts +47 -5
- package/badgedirective/badgedirective.cjs.js +11 -1
- package/badgedirective/badgedirective.cjs.min.js +1 -1
- package/badgedirective/badgedirective.esm.js +11 -1
- package/badgedirective/badgedirective.esm.min.js +1 -1
- package/badgedirective/badgedirective.js +11 -1
- package/badgedirective/badgedirective.min.js +1 -1
- package/basecomponent/BaseComponent.vue +111 -30
- package/basecomponent/basecomponent.cjs.js +133 -51
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +133 -51
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +133 -51
- package/basecomponent/basecomponent.min.js +1 -1
- package/basedirective/basedirective.cjs.js +56 -10
- package/basedirective/basedirective.cjs.min.js +1 -1
- package/basedirective/basedirective.esm.js +56 -10
- package/basedirective/basedirective.esm.min.js +1 -1
- package/basedirective/basedirective.js +56 -10
- package/basedirective/basedirective.min.js +1 -1
- package/baseicon/BaseIcon.vue +44 -32
- package/baseicon/baseicon.cjs.js +19 -30
- package/baseicon/baseicon.cjs.min.js +1 -1
- package/baseicon/baseicon.esm.js +19 -30
- package/baseicon/baseicon.esm.min.js +1 -1
- package/baseicon/baseicon.js +20 -32
- package/baseicon/baseicon.min.js +1 -1
- package/blockui/BaseBlockUI.vue +0 -8
- package/blockui/BlockUI.d.ts +9 -5
- package/blockui/BlockUI.vue +35 -10
- package/blockui/blockui.cjs.js +34 -12
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +34 -12
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +34 -12
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/Breadcrumb.d.ts +12 -12
- package/button/Button.d.ts +10 -9
- package/button/Button.vue +6 -2
- package/button/button.cjs.js +7 -2
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +7 -2
- package/button/button.esm.min.js +1 -1
- package/button/button.js +7 -2
- package/button/button.min.js +1 -1
- package/calendar/Calendar.d.ts +131 -55
- package/calendar/Calendar.vue +54 -11
- package/calendar/calendar.cjs.js +79 -41
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +79 -41
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +79 -41
- package/calendar/calendar.min.js +1 -1
- package/card/Card.d.ts +11 -11
- package/carousel/Carousel.d.ts +34 -22
- package/carousel/Carousel.vue +12 -3
- package/carousel/carousel.cjs.js +15 -5
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +15 -5
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +15 -5
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +27 -21
- package/cascadeselect/CascadeSelect.vue +1 -1
- package/cascadeselect/cascadeselect.cjs.js +3 -3
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +3 -3
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +3 -3
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/Chart.d.ts +7 -7
- package/checkbox/Checkbox.d.ts +10 -10
- package/chip/Chip.d.ts +13 -11
- package/chips/Chips.d.ts +23 -14
- package/chips/Chips.vue +1 -1
- package/chips/chips.cjs.js +1 -0
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +1 -0
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +1 -0
- package/chips/chips.min.js +1 -1
- package/colorpicker/ColorPicker.d.ts +20 -13
- package/colorpicker/ColorPicker.vue +2 -41
- package/colorpicker/colorpicker.cjs.js +11 -50
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +11 -50
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +11 -50
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/Column.d.ts +71 -68
- package/columngroup/ColumnGroup.d.ts +5 -5
- package/config/PrimeVue.d.ts +10 -2
- package/config/config.cjs.js +4 -1
- package/config/config.cjs.min.js +1 -1
- package/config/config.esm.js +4 -1
- package/config/config.esm.min.js +1 -1
- package/config/config.js +4 -1
- package/config/config.min.js +1 -1
- package/confirmdialog/ConfirmDialog.d.ts +17 -16
- package/confirmpopup/ConfirmPopup.d.ts +19 -12
- package/confirmpopup/ConfirmPopup.vue +1 -1
- package/confirmpopup/confirmpopup.cjs.js +3 -3
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +4 -4
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +3 -3
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/ContextMenu.d.ts +22 -15
- package/contextmenu/ContextMenu.vue +1 -1
- package/contextmenu/ContextMenuSub.vue +1 -1
- package/contextmenu/contextmenu.cjs.js +6 -6
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +7 -7
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +6 -6
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +2082 -1386
- package/core/core.min.js +19 -17
- package/datatable/BaseDataTable.vue +1 -1
- package/datatable/BodyCell.vue +1 -0
- package/datatable/ColumnFilter.vue +1 -1
- package/datatable/DataTable.d.ts +41 -33
- package/datatable/DataTable.vue +47 -15
- package/datatable/TableBody.vue +1 -1
- package/datatable/datatable.cjs.js +125 -77
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +125 -77
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +125 -77
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.d.ts +12 -12
- package/dataview/DataView.vue +2 -1
- package/dataview/dataview.cjs.js +4 -3
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +4 -3
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +4 -3
- package/dataview/dataview.min.js +1 -1
- package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +9 -9
- package/deferredcontent/DeferredContent.d.ts +5 -5
- package/dialog/BaseDialog.vue +3 -7
- package/dialog/Dialog.d.ts +23 -17
- package/dialog/Dialog.vue +10 -6
- package/dialog/dialog.cjs.js +17 -11
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +17 -11
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +17 -11
- package/dialog/dialog.min.js +1 -1
- package/divider/BaseDivider.vue +9 -24
- package/divider/Divider.d.ts +6 -6
- package/divider/Divider.vue +1 -1
- package/divider/divider.cjs.js +15 -2
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +15 -2
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +15 -2
- package/divider/divider.min.js +1 -1
- package/dock/BaseDock.vue +1 -1
- package/dock/Dock.d.ts +11 -11
- package/dock/Dock.vue +19 -2
- package/dock/dock.cjs.js +10 -4
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +10 -4
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +10 -4
- package/dock/dock.min.js +1 -1
- package/dropdown/BaseDropdown.vue +5 -5
- package/dropdown/Dropdown.d.ts +55 -38
- package/dropdown/Dropdown.vue +11 -2
- package/dropdown/dropdown.cjs.js +17 -9
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +17 -9
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +17 -9
- package/dropdown/dropdown.min.js +1 -1
- package/editor/BaseEditor.vue +0 -14
- package/editor/Editor.d.ts +21 -21
- package/editor/Editor.vue +20 -20
- package/editor/editor.cjs.js +20 -34
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +20 -34
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +20 -34
- package/editor/editor.min.js +1 -1
- package/fieldset/Fieldset.d.ts +19 -13
- package/fieldset/Fieldset.vue +1 -1
- package/fieldset/fieldset.cjs.js +3 -3
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +3 -3
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +3 -3
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/FileUpload.d.ts +36 -31
- package/fileupload/FileUpload.vue +8 -4
- package/fileupload/fileupload.cjs.js +14 -4
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +14 -4
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +15 -6
- package/fileupload/fileupload.min.js +1 -1
- package/focustrap/FocusTrap.d.ts +7 -6
- package/galleria/Galleria.d.ts +55 -36
- package/galleria/Galleria.vue +1 -1
- package/galleria/GalleriaItem.vue +11 -4
- package/galleria/GalleriaThumbnails.vue +6 -1
- package/galleria/galleria.cjs.js +30 -12
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +30 -12
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +30 -12
- package/galleria/galleria.min.js +1 -1
- package/image/Image.d.ts +34 -25
- package/image/Image.vue +10 -8
- package/image/image.cjs.js +22 -8
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +23 -9
- package/image/image.esm.min.js +1 -1
- package/image/image.js +22 -8
- package/image/image.min.js +1 -1
- package/inlinemessage/InlineMessage.d.ts +7 -7
- package/inplace/Inplace.d.ts +10 -10
- package/inputmask/InputMask.d.ts +34 -6
- package/inputmask/InputMask.vue +9 -1
- package/inputmask/inputmask.cjs.js +9 -1
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +9 -1
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +9 -1
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/InputNumber.d.ts +12 -12
- package/inputswitch/InputSwitch.d.ts +9 -9
- package/inputtext/InputText.d.ts +5 -5
- package/knob/Knob.d.ts +9 -9
- package/listbox/Listbox.d.ts +22 -22
- package/megamenu/MegaMenu.d.ts +21 -20
- package/megamenu/MegaMenuSub.vue +1 -0
- package/megamenu/megamenu.cjs.js +2 -1
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +2 -1
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +2 -1
- package/megamenu/megamenu.min.js +1 -1
- package/menu/Menu.d.ts +22 -16
- package/menu/Menu.vue +1 -1
- package/menu/menu.cjs.js +3 -3
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +3 -3
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +3 -3
- package/menu/menu.min.js +1 -1
- package/menubar/Menubar.d.ts +24 -19
- package/menubar/MenubarSub.vue +3 -1
- package/menubar/menubar.cjs.js +4 -2
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +4 -2
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +4 -2
- package/menubar/menubar.min.js +1 -1
- package/message/BaseMessage.vue +5 -0
- package/message/Message.d.ts +22 -14
- package/message/Message.vue +1 -1
- package/message/message.cjs.js +4 -4
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +5 -5
- package/message/message.esm.min.js +1 -1
- package/message/message.js +4 -4
- package/message/message.min.js +1 -1
- package/multiselect/MultiSelect.d.ts +63 -47
- package/multiselect/MultiSelect.vue +2 -2
- package/multiselect/multiselect.cjs.js +4 -3
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +4 -3
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +4 -3
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/OrderList.d.ts +26 -20
- package/orderlist/OrderList.vue +2 -1
- package/orderlist/orderlist.cjs.js +3 -1
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +3 -1
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +3 -1
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/OrganizationChart.d.ts +17 -17
- package/overlaypanel/OverlayPanel.d.ts +15 -9
- package/overlaypanel/OverlayPanel.vue +2 -1
- package/overlaypanel/overlaypanel.cjs.js +5 -3
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +6 -4
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +5 -3
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +15 -15
- package/paginator/Paginator.d.ts +22 -22
- package/paginator/Paginator.vue +2 -1
- package/paginator/paginator.cjs.js +2 -0
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +3 -1
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +2 -0
- package/paginator/paginator.min.js +1 -1
- package/panel/Panel.d.ts +22 -15
- package/panel/Panel.vue +1 -1
- package/panel/panel.cjs.js +3 -3
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +3 -3
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +3 -3
- package/panel/panel.min.js +1 -1
- package/panelmenu/PanelMenu.d.ts +30 -23
- package/panelmenu/PanelMenu.vue +1 -1
- package/panelmenu/PanelMenuSub.vue +1 -1
- package/panelmenu/panelmenu.cjs.js +6 -6
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +6 -6
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +6 -6
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/index.cjs.js +30 -0
- package/passthrough/index.cjs.min.js +1 -0
- package/passthrough/index.d.ts +6 -0
- package/passthrough/index.esm.js +26 -0
- package/passthrough/index.esm.min.js +1 -0
- package/passthrough/index.js +36 -0
- package/passthrough/index.min.js +1 -0
- package/passthrough/package.json +6 -0
- package/{tailwind/tailwind.cjs.js → passthrough/tailwind/index.cjs.js} +1282 -834
- package/passthrough/tailwind/index.cjs.min.js +1 -0
- package/passthrough/tailwind/index.d.ts +4 -0
- package/{tailwind/tailwind.esm.js → passthrough/tailwind/index.esm.js} +1279 -834
- package/passthrough/tailwind/index.esm.min.js +1 -0
- package/{tailwind/tailwind.js → passthrough/tailwind/index.js} +1287 -836
- package/passthrough/tailwind/index.min.js +1 -0
- package/passthrough/tailwind/package.json +6 -0
- package/password/Password.d.ts +31 -18
- package/password/Password.vue +3 -1
- package/password/password.cjs.js +6 -4
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +6 -4
- package/password/password.esm.min.js +1 -1
- package/password/password.js +6 -4
- package/password/password.min.js +1 -1
- package/picklist/PickList.d.ts +44 -38
- package/picklist/PickList.vue +12 -9
- package/picklist/picklist.cjs.js +29 -9
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +29 -9
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +29 -9
- package/picklist/picklist.min.js +1 -1
- package/progressbar/ProgressBar.d.ts +7 -7
- package/progressspinner/ProgressSpinner.d.ts +7 -7
- package/radiobutton/RadioButton.d.ts +11 -11
- package/rating/Rating.d.ts +15 -14
- package/rating/Rating.vue +3 -3
- package/rating/rating.cjs.js +3 -3
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +3 -3
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +3 -3
- package/rating/rating.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +11 -0
- package/resources/themes/arya-green/theme.css +11 -0
- package/resources/themes/arya-orange/theme.css +11 -0
- package/resources/themes/arya-purple/theme.css +11 -0
- package/resources/themes/bootstrap4-dark-blue/theme.css +15 -0
- package/resources/themes/bootstrap4-dark-purple/theme.css +15 -0
- package/resources/themes/bootstrap4-light-blue/theme.css +15 -0
- package/resources/themes/bootstrap4-light-purple/theme.css +15 -0
- package/resources/themes/fluent-light/theme.css +11 -0
- package/resources/themes/lara-dark-blue/theme.css +11 -0
- package/resources/themes/lara-dark-indigo/theme.css +11 -0
- package/resources/themes/lara-dark-purple/theme.css +11 -0
- package/resources/themes/lara-dark-teal/theme.css +11 -0
- package/resources/themes/lara-light-blue/theme.css +11 -0
- package/resources/themes/lara-light-indigo/theme.css +11 -0
- package/resources/themes/lara-light-purple/theme.css +11 -0
- package/resources/themes/lara-light-teal/theme.css +11 -0
- package/resources/themes/luna-amber/theme.css +11 -0
- package/resources/themes/luna-blue/theme.css +11 -0
- package/resources/themes/luna-green/theme.css +11 -0
- package/resources/themes/luna-pink/theme.css +11 -0
- package/resources/themes/md-dark-deeppurple/theme.css +11 -0
- package/resources/themes/md-dark-indigo/theme.css +11 -0
- package/resources/themes/md-light-deeppurple/theme.css +11 -0
- package/resources/themes/md-light-indigo/theme.css +11 -0
- package/resources/themes/mdc-dark-deeppurple/theme.css +11 -0
- package/resources/themes/mdc-dark-indigo/theme.css +11 -0
- package/resources/themes/mdc-light-deeppurple/theme.css +11 -0
- package/resources/themes/mdc-light-indigo/theme.css +11 -0
- package/resources/themes/mira/theme.css +11 -0
- package/resources/themes/nano/theme.css +11 -0
- package/resources/themes/nova/theme.css +11 -0
- package/resources/themes/nova-accent/theme.css +11 -0
- package/resources/themes/nova-alt/theme.css +11 -0
- package/resources/themes/nova-vue/theme.css +11 -0
- package/resources/themes/rhea/theme.css +11 -0
- package/resources/themes/saga-blue/theme.css +11 -0
- package/resources/themes/saga-green/theme.css +11 -0
- package/resources/themes/saga-orange/theme.css +11 -0
- package/resources/themes/saga-purple/theme.css +11 -0
- package/resources/themes/soho-dark/theme.css +11 -0
- package/resources/themes/soho-light/theme.css +11 -0
- package/resources/themes/tailwind-light/theme.css +11 -0
- package/resources/themes/vela-blue/theme.css +11 -0
- package/resources/themes/vela-green/theme.css +11 -0
- package/resources/themes/vela-orange/theme.css +11 -0
- package/resources/themes/vela-purple/theme.css +11 -0
- package/resources/themes/viva-dark/theme.css +11 -0
- package/resources/themes/viva-light/theme.css +11 -0
- package/ripple/Ripple.d.ts +5 -4
- package/row/Row.d.ts +2 -2
- package/scrollpanel/ScrollPanel.d.ts +9 -9
- package/scrolltop/ScrollTop.d.ts +13 -7
- package/scrolltop/ScrollTop.vue +1 -1
- package/scrolltop/scrolltop.cjs.js +3 -3
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.esm.js +4 -4
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +3 -3
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/SelectButton.d.ts +11 -7
- package/selectbutton/SelectButton.vue +2 -1
- package/selectbutton/selectbutton.cjs.js +2 -1
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +2 -1
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +2 -1
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/Sidebar.d.ts +18 -12
- package/sidebar/Sidebar.vue +2 -2
- package/sidebar/sidebar.cjs.js +4 -4
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +4 -4
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +4 -4
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/Skeleton.d.ts +5 -5
- package/slider/Slider.d.ts +9 -9
- package/speeddial/BaseSpeedDial.vue +12 -36
- package/speeddial/SpeedDial.d.ts +23 -16
- package/speeddial/SpeedDial.vue +6 -5
- package/speeddial/speeddial.cjs.js +45 -24
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +45 -24
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +45 -24
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/SplitButton.d.ts +12 -10
- package/splitbutton/SplitButton.vue +22 -3
- package/splitbutton/splitbutton.cjs.js +17 -5
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +17 -5
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +17 -5
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/Splitter.d.ts +18 -7
- package/splitter/Splitter.vue +8 -1
- package/splitter/splitter.cjs.js +9 -1
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +9 -1
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +9 -1
- package/splitter/splitter.min.js +1 -1
- package/splitterpanel/SplitterPanel.d.ts +5 -5
- package/splitterpanel/SplitterPanel.vue +1 -1
- package/splitterpanel/splitterpanel.cjs.js +1 -1
- package/splitterpanel/splitterpanel.cjs.min.js +1 -1
- package/splitterpanel/splitterpanel.esm.js +1 -1
- package/splitterpanel/splitterpanel.esm.min.js +1 -1
- package/splitterpanel/splitterpanel.js +1 -1
- package/splitterpanel/splitterpanel.min.js +1 -1
- package/steps/Steps.d.ts +10 -10
- package/styleclass/StyleClass.d.ts +4 -3
- package/tabmenu/TabMenu.d.ts +11 -11
- package/tabpanel/TabPanel.d.ts +12 -12
- package/tabview/TabView.d.ts +18 -18
- package/tag/Tag.d.ts +7 -7
- package/terminal/Terminal.d.ts +13 -13
- package/textarea/Textarea.d.ts +5 -5
- package/tieredmenu/TieredMenu.d.ts +22 -15
- package/tieredmenu/TieredMenu.vue +1 -1
- package/tieredmenu/tieredmenu.cjs.js +3 -3
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +3 -3
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +3 -3
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/Timeline.d.ts +11 -11
- package/toast/BaseToast.vue +4 -0
- package/toast/Toast.d.ts +25 -19
- package/toast/Toast.vue +3 -2
- package/toast/toast.cjs.js +4 -2
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +5 -3
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +4 -2
- package/toast/toast.min.js +1 -1
- package/togglebutton/ToggleButton.d.ts +34 -11
- package/togglebutton/ToggleButton.vue +12 -3
- package/togglebutton/togglebutton.cjs.js +12 -3
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +12 -3
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +12 -3
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/Toolbar.d.ts +8 -8
- package/toolbar/Toolbar.vue +3 -3
- package/toolbar/toolbar.cjs.js +3 -6
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +3 -6
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +3 -6
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/Tooltip.d.ts +37 -7
- package/tooltip/tooltip.cjs.js +17 -4
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +17 -4
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +413 -400
- package/tooltip/tooltip.min.js +1 -1
- package/tree/Tree.d.ts +26 -22
- package/tree/Tree.vue +1 -0
- package/tree/tree.cjs.js +3 -2
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +3 -2
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +3 -2
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.d.ts +26 -19
- package/treeselect/TreeSelect.vue +2 -2
- package/treeselect/treeselect.cjs.js +4 -4
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +4 -4
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +4 -4
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/TreeTable.d.ts +24 -23
- package/treetable/TreeTable.vue +6 -3
- package/treetable/treetable.cjs.js +7 -6
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +7 -6
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +7 -6
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.d.ts +16 -13
- package/ts-helpers.d.ts +2 -0
- package/usestyle/UseStyle.d.ts +2 -1
- package/usestyle/usestyle.cjs.js +20 -7
- package/usestyle/usestyle.cjs.min.js +1 -1
- package/usestyle/usestyle.esm.js +20 -7
- package/usestyle/usestyle.esm.min.js +1 -1
- package/usestyle/usestyle.js +20 -7
- package/usestyle/usestyle.min.js +1 -1
- package/utils/Utils.d.ts +4 -0
- package/utils/utils.cjs.js +48 -8
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +48 -8
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +48 -8
- package/utils/utils.min.js +1 -1
- package/vetur-attributes.json +129 -125
- package/vetur-tags.json +1 -0
- package/virtualscroller/BaseVirtualScroller.vue +1 -1
- package/virtualscroller/VirtualScroller.d.ts +15 -13
- package/virtualscroller/virtualscroller.cjs.js +2 -1
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +2 -1
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +2 -1
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +160 -127
- package/tailwind/Tailwind.d.ts +0 -5
- package/tailwind/package.json +0 -6
- package/tailwind/tailwind.cjs.min.js +0 -1
- package/tailwind/tailwind.esm.min.js +0 -1
- package/tailwind/tailwind.min.js +0 -1
package/image/Image.d.ts
CHANGED
|
@@ -7,11 +7,14 @@
|
|
|
7
7
|
* @module image
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
import { VNode } from 'vue';
|
|
10
|
+
import { 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
|
export declare type ImagePassThroughOptionType = ImagePassThroughAttributes | ((options: ImagePassThroughMethodOptions) => ImagePassThroughAttributes | string) | string | null | undefined;
|
|
14
15
|
|
|
16
|
+
export declare type ImagePassThroughTransitionType = TransitionProps | ((options: ImagePassThroughMethodOptions) => TransitionProps) | undefined;
|
|
17
|
+
|
|
15
18
|
/**
|
|
16
19
|
* Custom passthrough(pt) option method.
|
|
17
20
|
*/
|
|
@@ -27,82 +30,86 @@ export interface ImagePassThroughMethodOptions {
|
|
|
27
30
|
*/
|
|
28
31
|
export interface ImagePassThroughOptions {
|
|
29
32
|
/**
|
|
30
|
-
*
|
|
33
|
+
* Used to pass attributes to the root's DOM element.
|
|
31
34
|
*/
|
|
32
35
|
root?: ImagePassThroughOptionType;
|
|
33
36
|
/**
|
|
34
|
-
*
|
|
37
|
+
* Used to pass attributes to the image's DOM element.
|
|
35
38
|
*/
|
|
36
39
|
image?: ImagePassThroughOptionType;
|
|
37
40
|
/**
|
|
38
|
-
*
|
|
41
|
+
* Used to pass attributes to the button's DOM element.
|
|
39
42
|
*/
|
|
40
43
|
button?: ImagePassThroughOptionType;
|
|
41
44
|
/**
|
|
42
|
-
*
|
|
45
|
+
* Used to pass attributes to the icon's DOM element.
|
|
43
46
|
*/
|
|
44
47
|
icon?: ImagePassThroughOptionType;
|
|
45
48
|
/**
|
|
46
|
-
*
|
|
49
|
+
* Used to pass attributes to the mask's DOM element.
|
|
47
50
|
*/
|
|
48
51
|
mask?: ImagePassThroughOptionType;
|
|
49
52
|
/**
|
|
50
|
-
*
|
|
53
|
+
* Used to pass attributes to the toolbar's DOM element.
|
|
51
54
|
*/
|
|
52
55
|
toolbar?: ImagePassThroughOptionType;
|
|
53
56
|
/**
|
|
54
|
-
*
|
|
57
|
+
* Used to pass attributes to the rotate right button's DOM element.
|
|
55
58
|
*/
|
|
56
59
|
rotateRightButton?: ImagePassThroughOptionType;
|
|
57
60
|
/**
|
|
58
|
-
*
|
|
61
|
+
* Used to pass attributes to the rotate right icon's DOM element.
|
|
59
62
|
*/
|
|
60
63
|
rotateRightIcon?: ImagePassThroughOptionType;
|
|
61
64
|
/**
|
|
62
|
-
*
|
|
65
|
+
* Used to pass attributes to the rotate left button's DOM element.
|
|
63
66
|
*/
|
|
64
67
|
rotateLeftButton?: ImagePassThroughOptionType;
|
|
65
68
|
/**
|
|
66
|
-
*
|
|
69
|
+
* Used to pass attributes to the rotate left icon's DOM element.
|
|
67
70
|
*/
|
|
68
71
|
rotateLeftIcon?: ImagePassThroughOptionType;
|
|
69
72
|
/**
|
|
70
|
-
*
|
|
73
|
+
* Used to pass attributes to the zoom out button's DOM element.
|
|
71
74
|
*/
|
|
72
75
|
zoomOutButton?: ImagePassThroughOptionType;
|
|
73
76
|
/**
|
|
74
|
-
*
|
|
77
|
+
* Used to pass attributes to the zoom out icon's DOM element.
|
|
75
78
|
*/
|
|
76
79
|
zoomOutIcon?: ImagePassThroughOptionType;
|
|
77
80
|
/**
|
|
78
|
-
*
|
|
81
|
+
* Used to pass attributes to the zoom in button's DOM element.
|
|
79
82
|
*/
|
|
80
83
|
zoomInButton?: ImagePassThroughOptionType;
|
|
81
84
|
/**
|
|
82
|
-
*
|
|
85
|
+
* Used to pass attributes to the zoom in icon's DOM element.
|
|
83
86
|
*/
|
|
84
87
|
zoomInIcon?: ImagePassThroughOptionType;
|
|
85
88
|
/**
|
|
86
|
-
*
|
|
89
|
+
* Used to pass attributes to the close button's DOM element.
|
|
87
90
|
*/
|
|
88
91
|
closeButton?: ImagePassThroughOptionType;
|
|
89
92
|
/**
|
|
90
|
-
*
|
|
93
|
+
* Used to pass attributes to the close icon's DOM element.
|
|
91
94
|
*/
|
|
92
95
|
closeIcon?: ImagePassThroughOptionType;
|
|
93
96
|
/**
|
|
94
|
-
*
|
|
97
|
+
* Used to pass attributes to the preview container's DOM element.
|
|
95
98
|
*/
|
|
96
99
|
previewContainer?: ImagePassThroughOptionType;
|
|
97
100
|
/**
|
|
98
|
-
*
|
|
101
|
+
* Used to pass attributes to the preview's DOM element.
|
|
99
102
|
*/
|
|
100
103
|
preview?: ImagePassThroughOptionType;
|
|
101
104
|
/**
|
|
102
|
-
*
|
|
105
|
+
* Used to manage all lifecycle hooks
|
|
103
106
|
* @see {@link BaseComponent.ComponentHooks}
|
|
104
107
|
*/
|
|
105
108
|
hooks?: ComponentHooks;
|
|
109
|
+
/**
|
|
110
|
+
* Used to control Vue Transition API.
|
|
111
|
+
*/
|
|
112
|
+
transition?: ImagePassThroughTransitionType;
|
|
106
113
|
}
|
|
107
114
|
|
|
108
115
|
/**
|
|
@@ -171,10 +178,10 @@ export interface ImageProps {
|
|
|
171
178
|
*/
|
|
172
179
|
zoomOutDisabled?: boolean | undefined;
|
|
173
180
|
/**
|
|
174
|
-
*
|
|
181
|
+
* Used to pass attributes to DOM elements inside the component.
|
|
175
182
|
* @type {ImagePassThroughOptions}
|
|
176
183
|
*/
|
|
177
|
-
pt?: ImagePassThroughOptions
|
|
184
|
+
pt?: PTOptions<ImagePassThroughOptions>;
|
|
178
185
|
/**
|
|
179
186
|
* When enabled, it removes component related styles in the core.
|
|
180
187
|
* @defaultValue false
|
|
@@ -212,6 +219,7 @@ export interface ImageSlots {
|
|
|
212
219
|
close(): VNode[];
|
|
213
220
|
/**
|
|
214
221
|
* Custom image template.
|
|
222
|
+
* @param {Object} scope - image slot's params.
|
|
215
223
|
*/
|
|
216
224
|
image(scope: {
|
|
217
225
|
/**
|
|
@@ -225,10 +233,11 @@ export interface ImageSlots {
|
|
|
225
233
|
/**
|
|
226
234
|
* Image error function.
|
|
227
235
|
*/
|
|
228
|
-
onError: void;
|
|
236
|
+
onError: () => void;
|
|
229
237
|
}): VNode[];
|
|
230
238
|
/**
|
|
231
239
|
* Custom preview template.
|
|
240
|
+
* @param {Object} scope - preview slot's params.
|
|
232
241
|
*/
|
|
233
242
|
preview(scope: {
|
|
234
243
|
/**
|
|
@@ -242,7 +251,7 @@ export interface ImageSlots {
|
|
|
242
251
|
/**
|
|
243
252
|
* Preview click function.
|
|
244
253
|
*/
|
|
245
|
-
onClick: void;
|
|
254
|
+
onClick: () => void;
|
|
246
255
|
}): VNode[];
|
|
247
256
|
}
|
|
248
257
|
|
package/image/Image.vue
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<slot name="image" :onError="onError">
|
|
4
4
|
<img :style="imageStyle" :class="[cx('image'), imageClass]" @error="onError" v-bind="{ ...$attrs, ...ptm('image') }" />
|
|
5
5
|
</slot>
|
|
6
|
-
<button v-if="preview" ref="previewButton" :class="cx('button')" @click="onImageClick" v-bind="{ ...previewButtonProps, ...ptm('button') }">
|
|
6
|
+
<button v-if="preview" ref="previewButton" type="button" :class="cx('button')" @click="onImageClick" v-bind="{ ...previewButtonProps, ...ptm('button') }">
|
|
7
7
|
<slot name="indicatoricon">
|
|
8
8
|
<component :is="indicatorIcon ? 'i' : 'EyeIcon'" :class="cx('icon')" v-bind="ptm('icon')" />
|
|
9
9
|
</slot>
|
|
@@ -11,39 +11,39 @@
|
|
|
11
11
|
<Portal>
|
|
12
12
|
<div v-if="maskVisible" :ref="maskRef" v-focustrap role="dialog" :class="cx('mask')" :aria-modal="maskVisible" @click="onMaskClick" @keydown="onMaskKeydown" v-bind="ptm('mask')">
|
|
13
13
|
<div class="p-image-toolbar" v-bind="ptm('toolbar')">
|
|
14
|
-
<button :class="cx('rotateRightButton')" @click="rotateRight" type="button" :aria-label="rightAriaLabel" v-bind="ptm('rotateRightButton')">
|
|
14
|
+
<button :class="cx('rotateRightButton')" @click="rotateRight" type="button" :aria-label="rightAriaLabel" v-bind="ptm('rotateRightButton')" data-pc-group-section="action">
|
|
15
15
|
<slot name="refresh">
|
|
16
16
|
<RefreshIcon v-bind="ptm('rotateRightIcon')" />
|
|
17
17
|
</slot>
|
|
18
18
|
</button>
|
|
19
19
|
|
|
20
|
-
<button :class="cx('rotateLeftButton')" @click="rotateLeft" type="button" :aria-label="leftAriaLabel" v-bind="ptm('rotateLeftButton')">
|
|
20
|
+
<button :class="cx('rotateLeftButton')" @click="rotateLeft" type="button" :aria-label="leftAriaLabel" v-bind="ptm('rotateLeftButton')" data-pc-group-section="action">
|
|
21
21
|
<slot name="undo">
|
|
22
22
|
<UndoIcon v-bind="ptm('rotateLeftIcon')" />
|
|
23
23
|
</slot>
|
|
24
24
|
</button>
|
|
25
25
|
|
|
26
|
-
<button :class="cx('zoomOutButton')" @click="zoomOut" type="button" :disabled="isZoomOutDisabled" :aria-label="zoomOutAriaLabel" v-bind="ptm('zoomOutButton')">
|
|
26
|
+
<button :class="cx('zoomOutButton')" @click="zoomOut" type="button" :disabled="isZoomOutDisabled" :aria-label="zoomOutAriaLabel" v-bind="ptm('zoomOutButton')" data-pc-group-section="action">
|
|
27
27
|
<slot name="zoomout">
|
|
28
28
|
<SearchMinusIcon v-bind="ptm('zoomOutIcon')" />
|
|
29
29
|
</slot>
|
|
30
30
|
</button>
|
|
31
31
|
|
|
32
|
-
<button :class="cx('zoomInButton')" @click="zoomIn" type="button" :disabled="isZoomInDisabled" :aria-label="zoomInAriaLabel" v-bind="ptm('zoomInButton')">
|
|
32
|
+
<button :class="cx('zoomInButton')" @click="zoomIn" type="button" :disabled="isZoomInDisabled" :aria-label="zoomInAriaLabel" v-bind="ptm('zoomInButton')" data-pc-group-section="action">
|
|
33
33
|
<slot name="zoomin">
|
|
34
34
|
<SearchPlusIcon v-bind="ptm('zoomInIcon')" />
|
|
35
35
|
</slot>
|
|
36
36
|
</button>
|
|
37
37
|
|
|
38
|
-
<button :class="cx('closeButton')" type="button" @click="hidePreview" :aria-label="closeAriaLabel" autofocus v-bind="ptm('closeButton')">
|
|
38
|
+
<button :class="cx('closeButton')" type="button" @click="hidePreview" :aria-label="closeAriaLabel" autofocus v-bind="ptm('closeButton')" data-pc-group-section="action">
|
|
39
39
|
<slot name="close">
|
|
40
40
|
<TimesIcon v-bind="ptm('closeIcon')" />
|
|
41
41
|
</slot>
|
|
42
42
|
</button>
|
|
43
43
|
</div>
|
|
44
|
-
<transition name="p-image-preview" @before-enter="onBeforeEnter" @enter="onEnter" @leave="onLeave" @before-leave="onBeforeLeave" @after-leave="onAfterLeave">
|
|
44
|
+
<transition name="p-image-preview" @before-enter="onBeforeEnter" @enter="onEnter" @leave="onLeave" @before-leave="onBeforeLeave" @after-leave="onAfterLeave" v-bind="ptm('transition')">
|
|
45
45
|
<div v-if="previewVisible" v-bind="ptm('previewContainer')">
|
|
46
|
-
<slot name="preview" :style="imagePreviewStyle" :onClick="onPreviewImageClick">
|
|
46
|
+
<slot name="preview" :class="cx('preview')" :style="imagePreviewStyle" :onClick="onPreviewImageClick">
|
|
47
47
|
<img :src="$attrs.src" :class="cx('preview')" :style="imagePreviewStyle" @click="onPreviewImageClick" v-bind="ptm('preview')" />
|
|
48
48
|
</slot>
|
|
49
49
|
</div>
|
|
@@ -93,6 +93,7 @@ export default {
|
|
|
93
93
|
},
|
|
94
94
|
onImageClick() {
|
|
95
95
|
if (this.preview) {
|
|
96
|
+
DomHandler.addClass(document.body, 'p-overflow-hidden');
|
|
96
97
|
this.maskVisible = true;
|
|
97
98
|
setTimeout(() => {
|
|
98
99
|
this.previewVisible = true;
|
|
@@ -179,6 +180,7 @@ export default {
|
|
|
179
180
|
this.previewVisible = false;
|
|
180
181
|
this.rotate = 0;
|
|
181
182
|
this.scale = 1;
|
|
183
|
+
DomHandler.removeClass(document.body, 'p-overflow-hidden');
|
|
182
184
|
}
|
|
183
185
|
},
|
|
184
186
|
computed: {
|
package/image/image.cjs.js
CHANGED
|
@@ -143,6 +143,7 @@ var script = {
|
|
|
143
143
|
onImageClick: function onImageClick() {
|
|
144
144
|
var _this = this;
|
|
145
145
|
if (this.preview) {
|
|
146
|
+
utils.DomHandler.addClass(document.body, 'p-overflow-hidden');
|
|
146
147
|
this.maskVisible = true;
|
|
147
148
|
setTimeout(function () {
|
|
148
149
|
_this.previewVisible = true;
|
|
@@ -222,6 +223,7 @@ var script = {
|
|
|
222
223
|
this.previewVisible = false;
|
|
223
224
|
this.rotate = 0;
|
|
224
225
|
this.scale = 1;
|
|
226
|
+
utils.DomHandler.removeClass(document.body, 'p-overflow-hidden');
|
|
225
227
|
}
|
|
226
228
|
},
|
|
227
229
|
computed: {
|
|
@@ -311,6 +313,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
311
313
|
}), _ctx.preview ? (vue.openBlock(), vue.createElementBlock("button", vue.mergeProps({
|
|
312
314
|
key: 0,
|
|
313
315
|
ref: "previewButton",
|
|
316
|
+
type: "button",
|
|
314
317
|
"class": _ctx.cx('button'),
|
|
315
318
|
onClick: _cache[1] || (_cache[1] = function () {
|
|
316
319
|
return $options.onImageClick && $options.onImageClick.apply($options, arguments);
|
|
@@ -342,7 +345,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
342
345
|
}),
|
|
343
346
|
type: "button",
|
|
344
347
|
"aria-label": $options.rightAriaLabel
|
|
345
|
-
}, _ctx.ptm('rotateRightButton')
|
|
348
|
+
}, _ctx.ptm('rotateRightButton'), {
|
|
349
|
+
"data-pc-group-section": "action"
|
|
350
|
+
}), [vue.renderSlot(_ctx.$slots, "refresh", {}, function () {
|
|
346
351
|
return [vue.createVNode(_component_RefreshIcon, vue.normalizeProps(vue.guardReactiveProps(_ctx.ptm('rotateRightIcon'))), null, 16)];
|
|
347
352
|
})], 16, _hoisted_2), vue.createElementVNode("button", vue.mergeProps({
|
|
348
353
|
"class": _ctx.cx('rotateLeftButton'),
|
|
@@ -351,7 +356,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
351
356
|
}),
|
|
352
357
|
type: "button",
|
|
353
358
|
"aria-label": $options.leftAriaLabel
|
|
354
|
-
}, _ctx.ptm('rotateLeftButton')
|
|
359
|
+
}, _ctx.ptm('rotateLeftButton'), {
|
|
360
|
+
"data-pc-group-section": "action"
|
|
361
|
+
}), [vue.renderSlot(_ctx.$slots, "undo", {}, function () {
|
|
355
362
|
return [vue.createVNode(_component_UndoIcon, vue.normalizeProps(vue.guardReactiveProps(_ctx.ptm('rotateLeftIcon'))), null, 16)];
|
|
356
363
|
})], 16, _hoisted_3), vue.createElementVNode("button", vue.mergeProps({
|
|
357
364
|
"class": _ctx.cx('zoomOutButton'),
|
|
@@ -361,7 +368,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
361
368
|
type: "button",
|
|
362
369
|
disabled: $options.isZoomOutDisabled,
|
|
363
370
|
"aria-label": $options.zoomOutAriaLabel
|
|
364
|
-
}, _ctx.ptm('zoomOutButton')
|
|
371
|
+
}, _ctx.ptm('zoomOutButton'), {
|
|
372
|
+
"data-pc-group-section": "action"
|
|
373
|
+
}), [vue.renderSlot(_ctx.$slots, "zoomout", {}, function () {
|
|
365
374
|
return [vue.createVNode(_component_SearchMinusIcon, vue.normalizeProps(vue.guardReactiveProps(_ctx.ptm('zoomOutIcon'))), null, 16)];
|
|
366
375
|
})], 16, _hoisted_4), vue.createElementVNode("button", vue.mergeProps({
|
|
367
376
|
"class": _ctx.cx('zoomInButton'),
|
|
@@ -371,7 +380,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
371
380
|
type: "button",
|
|
372
381
|
disabled: $options.isZoomInDisabled,
|
|
373
382
|
"aria-label": $options.zoomInAriaLabel
|
|
374
|
-
}, _ctx.ptm('zoomInButton')
|
|
383
|
+
}, _ctx.ptm('zoomInButton'), {
|
|
384
|
+
"data-pc-group-section": "action"
|
|
385
|
+
}), [vue.renderSlot(_ctx.$slots, "zoomin", {}, function () {
|
|
375
386
|
return [vue.createVNode(_component_SearchPlusIcon, vue.normalizeProps(vue.guardReactiveProps(_ctx.ptm('zoomInIcon'))), null, 16)];
|
|
376
387
|
})], 16, _hoisted_5), vue.createElementVNode("button", vue.mergeProps({
|
|
377
388
|
"class": _ctx.cx('closeButton'),
|
|
@@ -381,20 +392,23 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
381
392
|
}),
|
|
382
393
|
"aria-label": $options.closeAriaLabel,
|
|
383
394
|
autofocus: ""
|
|
384
|
-
}, _ctx.ptm('closeButton')
|
|
395
|
+
}, _ctx.ptm('closeButton'), {
|
|
396
|
+
"data-pc-group-section": "action"
|
|
397
|
+
}), [vue.renderSlot(_ctx.$slots, "close", {}, function () {
|
|
385
398
|
return [vue.createVNode(_component_TimesIcon, vue.normalizeProps(vue.guardReactiveProps(_ctx.ptm('closeIcon'))), null, 16)];
|
|
386
|
-
})], 16, _hoisted_6)], 16), vue.createVNode(vue.Transition, {
|
|
399
|
+
})], 16, _hoisted_6)], 16), vue.createVNode(vue.Transition, vue.mergeProps({
|
|
387
400
|
name: "p-image-preview",
|
|
388
401
|
onBeforeEnter: $options.onBeforeEnter,
|
|
389
402
|
onEnter: $options.onEnter,
|
|
390
403
|
onLeave: $options.onLeave,
|
|
391
404
|
onBeforeLeave: $options.onBeforeLeave,
|
|
392
405
|
onAfterLeave: $options.onAfterLeave
|
|
393
|
-
}, {
|
|
406
|
+
}, _ctx.ptm('transition')), {
|
|
394
407
|
"default": vue.withCtx(function () {
|
|
395
408
|
return [$data.previewVisible ? (vue.openBlock(), vue.createElementBlock("div", vue.normalizeProps(vue.mergeProps({
|
|
396
409
|
key: 0
|
|
397
410
|
}, _ctx.ptm('previewContainer'))), [vue.renderSlot(_ctx.$slots, "preview", {
|
|
411
|
+
"class": vue.normalizeClass(_ctx.cx('preview')),
|
|
398
412
|
style: vue.normalizeStyle($options.imagePreviewStyle),
|
|
399
413
|
onClick: $options.onPreviewImageClick
|
|
400
414
|
}, function () {
|
|
@@ -409,7 +423,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
409
423
|
})], 16)) : vue.createCommentVNode("", true)];
|
|
410
424
|
}),
|
|
411
425
|
_: 3
|
|
412
|
-
},
|
|
426
|
+
}, 16, ["onBeforeEnter", "onEnter", "onLeave", "onBeforeLeave", "onAfterLeave"])], 16, _hoisted_1)), [[_directive_focustrap]]) : vue.createCommentVNode("", true)];
|
|
413
427
|
}),
|
|
414
428
|
_: 3
|
|
415
429
|
})], 16);
|
package/image/image.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/focustrap"),t=require("primevue/icons/eye"),n=require("primevue/icons/refresh"),o=require("primevue/icons/searchminus"),i=require("primevue/icons/searchplus"),r=require("primevue/icons/times"),a=require("primevue/icons/undo"),l=require("primevue/portal"),s=require("primevue/utils"),c=require("primevue/basecomponent"),u=require("primevue/usestyle"),p=require("vue");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=m(e),v=m(t),d=m(n),g=m(o),b=m(i),h=m(r),y=m(a),w=m(l),k=m(c),P=u.useStyle("\n.p-image-mask {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.p-image-preview-container {\n position: relative;\n display: inline-block;\n}\n\n.p-image-preview-indicator {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0;\n transition: opacity 0.3s;\n}\n\n.p-image-preview-container:hover > .p-image-preview-indicator {\n opacity: 1;\n cursor: pointer;\n}\n\n.p-image-preview-container > img {\n cursor: pointer;\n}\n\n.p-image-toolbar {\n position: absolute;\n top: 0;\n right: 0;\n display: flex;\n}\n\n.p-image-action.p-link {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.p-image-preview {\n transition: transform 0.15s;\n max-width: 100vw;\n max-height: 100vh;\n}\n\n.p-image-preview-enter-active {\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n}\n.p-image-preview-leave-active {\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n.p-image-preview-enter-from,\n.p-image-preview-leave-to {\n opacity: 0;\n transform: scale(0.7);\n}\n",{name:"image",manual:!0}),I={name:"Image",extends:{name:"BaseImage",extends:k.default,props:{preview:{type:Boolean,default:!1},class:{type:null,default:null},style:{type:null,default:null},imageStyle:{type:null,default:null},imageClass:{type:null,default:null},previewButtonProps:{type:null,default:null},indicatorIcon:{type:String,default:void 0},zoomInDisabled:{type:Boolean,default:!1},zoomOutDisabled:{type:Boolean,default:!1}},css:{classes:{root:function(e){return["p-image p-component",{"p-image-preview-container":e.props.preview}]},image:function(e){return e.props.image},button:"p-image-preview-indicator",icon:"p-image-preview-icon",mask:"p-image-mask p-component-overlay p-component-overlay-enter",rotateRightButton:"p-image-action p-link",rotateLeftButton:"p-image-action p-link",zoomOutButton:function(e){return["p-image-action p-link",{"p-disabled":e.instance.isZoomOutDisabled}]},zoomInButton:function(e){return["p-image-action p-link",{"p-disabled":e.instance.isZoomInDisabled}]},closeButton:"p-image-action p-link",preview:"p-image-preview"},loadStyle:P.load},provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["show","hide","error"],mask:null,data:function(){return{maskVisible:!1,previewVisible:!1,rotate:0,scale:1}},beforeUnmount:function(){this.mask&&s.ZIndexUtils.clear(this.container)},methods:{maskRef:function(e){this.mask=e},toolbarRef:function(e){this.toolbarRef=e},onImageClick:function(){var e=this;this.preview&&(this.maskVisible=!0,setTimeout((function(){e.previewVisible=!0}),25))},onPreviewImageClick:function(){this.previewClick=!0},onMaskClick:function(e){[e.target.classList].includes("p-image-action")||e.target.closest(".p-image-action")||(this.previewClick||(this.previewVisible=!1,this.rotate=0,this.scale=1),this.previewClick=!1)},onMaskKeydown:function(e){var t=this;if("Escape"===e.code)this.hidePreview(),setTimeout((function(){s.DomHandler.focus(t.$refs.previewButton)}),200),e.preventDefault()},onError:function(){this.$emit("error")},rotateRight:function(){this.rotate+=90,this.previewClick=!0},rotateLeft:function(){this.rotate-=90,this.previewClick=!0},zoomIn:function(){this.scale=this.scale+.1,this.previewClick=!0},zoomOut:function(){this.scale=this.scale-.1,this.previewClick=!0},onBeforeEnter:function(){s.ZIndexUtils.set("modal",this.mask,this.$primevue.config.zIndex.modal)},onEnter:function(){this.focus(),this.$emit("show")},onBeforeLeave:function(){!this.isUnstyled&&s.DomHandler.addClass(this.mask,"p-component-overlay-leave")},onLeave:function(){this.$emit("hide")},onAfterLeave:function(e){s.ZIndexUtils.clear(e),this.maskVisible=!1},focus:function(){var e=this.mask.querySelector("[autofocus]");e&&e.focus()},hidePreview:function(){this.previewVisible=!1,this.rotate=0,this.scale=1}},computed:{containerClass:function(){return[this.cx("root"),this.class]},rotateClass:function(){return"p-image-preview-rotate-"+this.rotate},imagePreviewStyle:function(){return{transform:"rotate("+this.rotate+"deg) scale("+this.scale+")"}},isZoomInDisabled:function(){return this.zoomInDisabled||this.scale>=1.5},isZoomOutDisabled:function(){return this.zoomOutDisabled||this.scale<=.5},rightAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.rotateRight:void 0},leftAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.rotateLeft:void 0},zoomInAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.zoomIn:void 0},zoomOutAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.zoomOut:void 0},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},components:{Portal:w.default,EyeIcon:v.default,RefreshIcon:d.default,UndoIcon:y.default,SearchMinusIcon:g.default,SearchPlusIcon:b.default,TimesIcon:h.default},directives:{focustrap:f.default}};function C(e){return C="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},C(e)}function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){O(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function O(e,t,n){return(t=E(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E(e){var t=S(e,"string");return"symbol"===C(t)?t:String(t)}function S(e,t){if("object"!==C(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==C(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var L=["aria-modal"],V=["aria-label"],x=["aria-label"],$=["disabled","aria-label"],D=["disabled","aria-label"],N=["aria-label"],R=["src"];I.render=function(e,t,n,o,i,r){var a=p.resolveComponent("RefreshIcon"),l=p.resolveComponent("UndoIcon"),s=p.resolveComponent("SearchMinusIcon"),c=p.resolveComponent("SearchPlusIcon"),u=p.resolveComponent("TimesIcon"),m=p.resolveComponent("Portal"),f=p.resolveDirective("focustrap");return p.openBlock(),p.createElementBlock("span",p.mergeProps({class:r.containerClass,style:e.style},e.ptm("root"),{"data-pc-name":"image"}),[p.renderSlot(e.$slots,"image",{onError:r.onError},(function(){return[p.createElementVNode("img",p.mergeProps({style:e.imageStyle,class:[e.cx("image"),e.imageClass],onError:t[0]||(t[0]=function(){return r.onError&&r.onError.apply(r,arguments)})},z(z({},e.$attrs),e.ptm("image"))),null,16)]})),e.preview?(p.openBlock(),p.createElementBlock("button",p.mergeProps({key:0,ref:"previewButton",class:e.cx("button"),onClick:t[1]||(t[1]=function(){return r.onImageClick&&r.onImageClick.apply(r,arguments)})},z(z({},e.previewButtonProps),e.ptm("button"))),[p.renderSlot(e.$slots,"indicatoricon",{},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.indicatorIcon?"i":"EyeIcon"),p.mergeProps({class:e.cx("icon")},e.ptm("icon")),null,16,["class"]))]}))],16)):p.createCommentVNode("",!0),p.createVNode(m,null,{default:p.withCtx((function(){return[i.maskVisible?p.withDirectives((p.openBlock(),p.createElementBlock("div",p.mergeProps({key:0,ref:r.maskRef,role:"dialog",class:e.cx("mask"),"aria-modal":i.maskVisible,onClick:t[8]||(t[8]=function(){return r.onMaskClick&&r.onMaskClick.apply(r,arguments)}),onKeydown:t[9]||(t[9]=function(){return r.onMaskKeydown&&r.onMaskKeydown.apply(r,arguments)})},e.ptm("mask")),[p.createElementVNode("div",p.mergeProps({class:"p-image-toolbar"},e.ptm("toolbar")),[p.createElementVNode("button",p.mergeProps({class:e.cx("rotateRightButton"),onClick:t[2]||(t[2]=function(){return r.rotateRight&&r.rotateRight.apply(r,arguments)}),type:"button","aria-label":r.rightAriaLabel},e.ptm("rotateRightButton")),[p.renderSlot(e.$slots,"refresh",{},(function(){return[p.createVNode(a,p.normalizeProps(p.guardReactiveProps(e.ptm("rotateRightIcon"))),null,16)]}))],16,V),p.createElementVNode("button",p.mergeProps({class:e.cx("rotateLeftButton"),onClick:t[3]||(t[3]=function(){return r.rotateLeft&&r.rotateLeft.apply(r,arguments)}),type:"button","aria-label":r.leftAriaLabel},e.ptm("rotateLeftButton")),[p.renderSlot(e.$slots,"undo",{},(function(){return[p.createVNode(l,p.normalizeProps(p.guardReactiveProps(e.ptm("rotateLeftIcon"))),null,16)]}))],16,x),p.createElementVNode("button",p.mergeProps({class:e.cx("zoomOutButton"),onClick:t[4]||(t[4]=function(){return r.zoomOut&&r.zoomOut.apply(r,arguments)}),type:"button",disabled:r.isZoomOutDisabled,"aria-label":r.zoomOutAriaLabel},e.ptm("zoomOutButton")),[p.renderSlot(e.$slots,"zoomout",{},(function(){return[p.createVNode(s,p.normalizeProps(p.guardReactiveProps(e.ptm("zoomOutIcon"))),null,16)]}))],16,$),p.createElementVNode("button",p.mergeProps({class:e.cx("zoomInButton"),onClick:t[5]||(t[5]=function(){return r.zoomIn&&r.zoomIn.apply(r,arguments)}),type:"button",disabled:r.isZoomInDisabled,"aria-label":r.zoomInAriaLabel},e.ptm("zoomInButton")),[p.renderSlot(e.$slots,"zoomin",{},(function(){return[p.createVNode(c,p.normalizeProps(p.guardReactiveProps(e.ptm("zoomInIcon"))),null,16)]}))],16,D),p.createElementVNode("button",p.mergeProps({class:e.cx("closeButton"),type:"button",onClick:t[6]||(t[6]=function(){return r.hidePreview&&r.hidePreview.apply(r,arguments)}),"aria-label":r.closeAriaLabel,autofocus:""},e.ptm("closeButton")),[p.renderSlot(e.$slots,"close",{},(function(){return[p.createVNode(u,p.normalizeProps(p.guardReactiveProps(e.ptm("closeIcon"))),null,16)]}))],16,N)],16),p.createVNode(p.Transition,{name:"p-image-preview",onBeforeEnter:r.onBeforeEnter,onEnter:r.onEnter,onLeave:r.onLeave,onBeforeLeave:r.onBeforeLeave,onAfterLeave:r.onAfterLeave},{default:p.withCtx((function(){return[i.previewVisible?(p.openBlock(),p.createElementBlock("div",p.normalizeProps(p.mergeProps({key:0},e.ptm("previewContainer"))),[p.renderSlot(e.$slots,"preview",{style:p.normalizeStyle(r.imagePreviewStyle),onClick:r.onPreviewImageClick},(function(){return[p.createElementVNode("img",p.mergeProps({src:e.$attrs.src,class:e.cx("preview"),style:r.imagePreviewStyle,onClick:t[7]||(t[7]=function(){return r.onPreviewImageClick&&r.onPreviewImageClick.apply(r,arguments)})},e.ptm("preview")),null,16,R)]}))],16)):p.createCommentVNode("",!0)]})),_:3},8,["onBeforeEnter","onEnter","onLeave","onBeforeLeave","onAfterLeave"])],16,L)),[[f]]):p.createCommentVNode("",!0)]})),_:3})],16)},module.exports=I;
|
|
1
|
+
"use strict";var e=require("primevue/focustrap"),t=require("primevue/icons/eye"),o=require("primevue/icons/refresh"),n=require("primevue/icons/searchminus"),i=require("primevue/icons/searchplus"),r=require("primevue/icons/times"),a=require("primevue/icons/undo"),l=require("primevue/portal"),s=require("primevue/utils"),c=require("primevue/basecomponent"),u=require("primevue/usestyle"),p=require("vue");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=m(e),d=m(t),v=m(o),g=m(n),b=m(i),h=m(r),y=m(a),w=m(l),k=m(c),P=u.useStyle("\n.p-image-mask {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.p-image-preview-container {\n position: relative;\n display: inline-block;\n}\n\n.p-image-preview-indicator {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0;\n transition: opacity 0.3s;\n}\n\n.p-image-preview-container:hover > .p-image-preview-indicator {\n opacity: 1;\n cursor: pointer;\n}\n\n.p-image-preview-container > img {\n cursor: pointer;\n}\n\n.p-image-toolbar {\n position: absolute;\n top: 0;\n right: 0;\n display: flex;\n}\n\n.p-image-action.p-link {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.p-image-preview {\n transition: transform 0.15s;\n max-width: 100vw;\n max-height: 100vh;\n}\n\n.p-image-preview-enter-active {\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n}\n.p-image-preview-leave-active {\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n.p-image-preview-enter-from,\n.p-image-preview-leave-to {\n opacity: 0;\n transform: scale(0.7);\n}\n",{name:"image",manual:!0}),C={name:"Image",extends:{name:"BaseImage",extends:k.default,props:{preview:{type:Boolean,default:!1},class:{type:null,default:null},style:{type:null,default:null},imageStyle:{type:null,default:null},imageClass:{type:null,default:null},previewButtonProps:{type:null,default:null},indicatorIcon:{type:String,default:void 0},zoomInDisabled:{type:Boolean,default:!1},zoomOutDisabled:{type:Boolean,default:!1}},css:{classes:{root:function(e){return["p-image p-component",{"p-image-preview-container":e.props.preview}]},image:function(e){return e.props.image},button:"p-image-preview-indicator",icon:"p-image-preview-icon",mask:"p-image-mask p-component-overlay p-component-overlay-enter",rotateRightButton:"p-image-action p-link",rotateLeftButton:"p-image-action p-link",zoomOutButton:function(e){return["p-image-action p-link",{"p-disabled":e.instance.isZoomOutDisabled}]},zoomInButton:function(e){return["p-image-action p-link",{"p-disabled":e.instance.isZoomInDisabled}]},closeButton:"p-image-action p-link",preview:"p-image-preview"},loadStyle:P.load},provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["show","hide","error"],mask:null,data:function(){return{maskVisible:!1,previewVisible:!1,rotate:0,scale:1}},beforeUnmount:function(){this.mask&&s.ZIndexUtils.clear(this.container)},methods:{maskRef:function(e){this.mask=e},toolbarRef:function(e){this.toolbarRef=e},onImageClick:function(){var e=this;this.preview&&(s.DomHandler.addClass(document.body,"p-overflow-hidden"),this.maskVisible=!0,setTimeout((function(){e.previewVisible=!0}),25))},onPreviewImageClick:function(){this.previewClick=!0},onMaskClick:function(e){[e.target.classList].includes("p-image-action")||e.target.closest(".p-image-action")||(this.previewClick||(this.previewVisible=!1,this.rotate=0,this.scale=1),this.previewClick=!1)},onMaskKeydown:function(e){var t=this;if("Escape"===e.code)this.hidePreview(),setTimeout((function(){s.DomHandler.focus(t.$refs.previewButton)}),200),e.preventDefault()},onError:function(){this.$emit("error")},rotateRight:function(){this.rotate+=90,this.previewClick=!0},rotateLeft:function(){this.rotate-=90,this.previewClick=!0},zoomIn:function(){this.scale=this.scale+.1,this.previewClick=!0},zoomOut:function(){this.scale=this.scale-.1,this.previewClick=!0},onBeforeEnter:function(){s.ZIndexUtils.set("modal",this.mask,this.$primevue.config.zIndex.modal)},onEnter:function(){this.focus(),this.$emit("show")},onBeforeLeave:function(){!this.isUnstyled&&s.DomHandler.addClass(this.mask,"p-component-overlay-leave")},onLeave:function(){this.$emit("hide")},onAfterLeave:function(e){s.ZIndexUtils.clear(e),this.maskVisible=!1},focus:function(){var e=this.mask.querySelector("[autofocus]");e&&e.focus()},hidePreview:function(){this.previewVisible=!1,this.rotate=0,this.scale=1,s.DomHandler.removeClass(document.body,"p-overflow-hidden")}},computed:{containerClass:function(){return[this.cx("root"),this.class]},rotateClass:function(){return"p-image-preview-rotate-"+this.rotate},imagePreviewStyle:function(){return{transform:"rotate("+this.rotate+"deg) scale("+this.scale+")"}},isZoomInDisabled:function(){return this.zoomInDisabled||this.scale>=1.5},isZoomOutDisabled:function(){return this.zoomOutDisabled||this.scale<=.5},rightAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.rotateRight:void 0},leftAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.rotateLeft:void 0},zoomInAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.zoomIn:void 0},zoomOutAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.zoomOut:void 0},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},components:{Portal:w.default,EyeIcon:d.default,RefreshIcon:v.default,UndoIcon:y.default,SearchMinusIcon:g.default,SearchPlusIcon:b.default,TimesIcon:h.default},directives:{focustrap:f.default}};function I(e){return I="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},I(e)}function B(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function z(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?B(Object(o),!0).forEach((function(t){O(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):B(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function O(e,t,o){return(t=E(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function E(e){var t=S(e,"string");return"symbol"===I(t)?t:String(t)}function S(e,t){if("object"!==I(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!==I(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var L=["aria-modal"],V=["aria-label"],x=["aria-label"],$=["disabled","aria-label"],D=["disabled","aria-label"],N=["aria-label"],R=["src"];C.render=function(e,t,o,n,i,r){var a=p.resolveComponent("RefreshIcon"),l=p.resolveComponent("UndoIcon"),s=p.resolveComponent("SearchMinusIcon"),c=p.resolveComponent("SearchPlusIcon"),u=p.resolveComponent("TimesIcon"),m=p.resolveComponent("Portal"),f=p.resolveDirective("focustrap");return p.openBlock(),p.createElementBlock("span",p.mergeProps({class:r.containerClass,style:e.style},e.ptm("root"),{"data-pc-name":"image"}),[p.renderSlot(e.$slots,"image",{onError:r.onError},(function(){return[p.createElementVNode("img",p.mergeProps({style:e.imageStyle,class:[e.cx("image"),e.imageClass],onError:t[0]||(t[0]=function(){return r.onError&&r.onError.apply(r,arguments)})},z(z({},e.$attrs),e.ptm("image"))),null,16)]})),e.preview?(p.openBlock(),p.createElementBlock("button",p.mergeProps({key:0,ref:"previewButton",type:"button",class:e.cx("button"),onClick:t[1]||(t[1]=function(){return r.onImageClick&&r.onImageClick.apply(r,arguments)})},z(z({},e.previewButtonProps),e.ptm("button"))),[p.renderSlot(e.$slots,"indicatoricon",{},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.indicatorIcon?"i":"EyeIcon"),p.mergeProps({class:e.cx("icon")},e.ptm("icon")),null,16,["class"]))]}))],16)):p.createCommentVNode("",!0),p.createVNode(m,null,{default:p.withCtx((function(){return[i.maskVisible?p.withDirectives((p.openBlock(),p.createElementBlock("div",p.mergeProps({key:0,ref:r.maskRef,role:"dialog",class:e.cx("mask"),"aria-modal":i.maskVisible,onClick:t[8]||(t[8]=function(){return r.onMaskClick&&r.onMaskClick.apply(r,arguments)}),onKeydown:t[9]||(t[9]=function(){return r.onMaskKeydown&&r.onMaskKeydown.apply(r,arguments)})},e.ptm("mask")),[p.createElementVNode("div",p.mergeProps({class:"p-image-toolbar"},e.ptm("toolbar")),[p.createElementVNode("button",p.mergeProps({class:e.cx("rotateRightButton"),onClick:t[2]||(t[2]=function(){return r.rotateRight&&r.rotateRight.apply(r,arguments)}),type:"button","aria-label":r.rightAriaLabel},e.ptm("rotateRightButton"),{"data-pc-group-section":"action"}),[p.renderSlot(e.$slots,"refresh",{},(function(){return[p.createVNode(a,p.normalizeProps(p.guardReactiveProps(e.ptm("rotateRightIcon"))),null,16)]}))],16,V),p.createElementVNode("button",p.mergeProps({class:e.cx("rotateLeftButton"),onClick:t[3]||(t[3]=function(){return r.rotateLeft&&r.rotateLeft.apply(r,arguments)}),type:"button","aria-label":r.leftAriaLabel},e.ptm("rotateLeftButton"),{"data-pc-group-section":"action"}),[p.renderSlot(e.$slots,"undo",{},(function(){return[p.createVNode(l,p.normalizeProps(p.guardReactiveProps(e.ptm("rotateLeftIcon"))),null,16)]}))],16,x),p.createElementVNode("button",p.mergeProps({class:e.cx("zoomOutButton"),onClick:t[4]||(t[4]=function(){return r.zoomOut&&r.zoomOut.apply(r,arguments)}),type:"button",disabled:r.isZoomOutDisabled,"aria-label":r.zoomOutAriaLabel},e.ptm("zoomOutButton"),{"data-pc-group-section":"action"}),[p.renderSlot(e.$slots,"zoomout",{},(function(){return[p.createVNode(s,p.normalizeProps(p.guardReactiveProps(e.ptm("zoomOutIcon"))),null,16)]}))],16,$),p.createElementVNode("button",p.mergeProps({class:e.cx("zoomInButton"),onClick:t[5]||(t[5]=function(){return r.zoomIn&&r.zoomIn.apply(r,arguments)}),type:"button",disabled:r.isZoomInDisabled,"aria-label":r.zoomInAriaLabel},e.ptm("zoomInButton"),{"data-pc-group-section":"action"}),[p.renderSlot(e.$slots,"zoomin",{},(function(){return[p.createVNode(c,p.normalizeProps(p.guardReactiveProps(e.ptm("zoomInIcon"))),null,16)]}))],16,D),p.createElementVNode("button",p.mergeProps({class:e.cx("closeButton"),type:"button",onClick:t[6]||(t[6]=function(){return r.hidePreview&&r.hidePreview.apply(r,arguments)}),"aria-label":r.closeAriaLabel,autofocus:""},e.ptm("closeButton"),{"data-pc-group-section":"action"}),[p.renderSlot(e.$slots,"close",{},(function(){return[p.createVNode(u,p.normalizeProps(p.guardReactiveProps(e.ptm("closeIcon"))),null,16)]}))],16,N)],16),p.createVNode(p.Transition,p.mergeProps({name:"p-image-preview",onBeforeEnter:r.onBeforeEnter,onEnter:r.onEnter,onLeave:r.onLeave,onBeforeLeave:r.onBeforeLeave,onAfterLeave:r.onAfterLeave},e.ptm("transition")),{default:p.withCtx((function(){return[i.previewVisible?(p.openBlock(),p.createElementBlock("div",p.normalizeProps(p.mergeProps({key:0},e.ptm("previewContainer"))),[p.renderSlot(e.$slots,"preview",{class:p.normalizeClass(e.cx("preview")),style:p.normalizeStyle(r.imagePreviewStyle),onClick:r.onPreviewImageClick},(function(){return[p.createElementVNode("img",p.mergeProps({src:e.$attrs.src,class:e.cx("preview"),style:r.imagePreviewStyle,onClick:t[7]||(t[7]=function(){return r.onPreviewImageClick&&r.onPreviewImageClick.apply(r,arguments)})},e.ptm("preview")),null,16,R)]}))],16)):p.createCommentVNode("",!0)]})),_:3},16,["onBeforeEnter","onEnter","onLeave","onBeforeLeave","onAfterLeave"])],16,L)),[[f]]):p.createCommentVNode("",!0)]})),_:3})],16)},module.exports=C;
|
package/image/image.esm.js
CHANGED
|
@@ -9,7 +9,7 @@ import Portal from 'primevue/portal';
|
|
|
9
9
|
import { ZIndexUtils, DomHandler } from 'primevue/utils';
|
|
10
10
|
import BaseComponent from 'primevue/basecomponent';
|
|
11
11
|
import { useStyle } from 'primevue/usestyle';
|
|
12
|
-
import { resolveComponent, resolveDirective, openBlock, createElementBlock, mergeProps, renderSlot, createElementVNode, createBlock, resolveDynamicComponent, createCommentVNode, createVNode, withCtx, withDirectives, normalizeProps, guardReactiveProps, Transition, normalizeStyle } from 'vue';
|
|
12
|
+
import { resolveComponent, resolveDirective, openBlock, createElementBlock, mergeProps, renderSlot, createElementVNode, createBlock, resolveDynamicComponent, createCommentVNode, createVNode, withCtx, withDirectives, normalizeProps, guardReactiveProps, Transition, normalizeClass, normalizeStyle } from 'vue';
|
|
13
13
|
|
|
14
14
|
var styles = "\n.p-image-mask {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.p-image-preview-container {\n position: relative;\n display: inline-block;\n}\n\n.p-image-preview-indicator {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0;\n transition: opacity 0.3s;\n}\n\n.p-image-preview-container:hover > .p-image-preview-indicator {\n opacity: 1;\n cursor: pointer;\n}\n\n.p-image-preview-container > img {\n cursor: pointer;\n}\n\n.p-image-toolbar {\n position: absolute;\n top: 0;\n right: 0;\n display: flex;\n}\n\n.p-image-action.p-link {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.p-image-preview {\n transition: transform 0.15s;\n max-width: 100vw;\n max-height: 100vh;\n}\n\n.p-image-preview-enter-active {\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n}\n.p-image-preview-leave-active {\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n.p-image-preview-enter-from,\n.p-image-preview-leave-to {\n opacity: 0;\n transform: scale(0.7);\n}\n";
|
|
15
15
|
var classes = {
|
|
@@ -129,6 +129,7 @@ var script = {
|
|
|
129
129
|
onImageClick: function onImageClick() {
|
|
130
130
|
var _this = this;
|
|
131
131
|
if (this.preview) {
|
|
132
|
+
DomHandler.addClass(document.body, 'p-overflow-hidden');
|
|
132
133
|
this.maskVisible = true;
|
|
133
134
|
setTimeout(function () {
|
|
134
135
|
_this.previewVisible = true;
|
|
@@ -208,6 +209,7 @@ var script = {
|
|
|
208
209
|
this.previewVisible = false;
|
|
209
210
|
this.rotate = 0;
|
|
210
211
|
this.scale = 1;
|
|
212
|
+
DomHandler.removeClass(document.body, 'p-overflow-hidden');
|
|
211
213
|
}
|
|
212
214
|
},
|
|
213
215
|
computed: {
|
|
@@ -297,6 +299,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
297
299
|
}), _ctx.preview ? (openBlock(), createElementBlock("button", mergeProps({
|
|
298
300
|
key: 0,
|
|
299
301
|
ref: "previewButton",
|
|
302
|
+
type: "button",
|
|
300
303
|
"class": _ctx.cx('button'),
|
|
301
304
|
onClick: _cache[1] || (_cache[1] = function () {
|
|
302
305
|
return $options.onImageClick && $options.onImageClick.apply($options, arguments);
|
|
@@ -328,7 +331,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
328
331
|
}),
|
|
329
332
|
type: "button",
|
|
330
333
|
"aria-label": $options.rightAriaLabel
|
|
331
|
-
}, _ctx.ptm('rotateRightButton')
|
|
334
|
+
}, _ctx.ptm('rotateRightButton'), {
|
|
335
|
+
"data-pc-group-section": "action"
|
|
336
|
+
}), [renderSlot(_ctx.$slots, "refresh", {}, function () {
|
|
332
337
|
return [createVNode(_component_RefreshIcon, normalizeProps(guardReactiveProps(_ctx.ptm('rotateRightIcon'))), null, 16)];
|
|
333
338
|
})], 16, _hoisted_2), createElementVNode("button", mergeProps({
|
|
334
339
|
"class": _ctx.cx('rotateLeftButton'),
|
|
@@ -337,7 +342,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
337
342
|
}),
|
|
338
343
|
type: "button",
|
|
339
344
|
"aria-label": $options.leftAriaLabel
|
|
340
|
-
}, _ctx.ptm('rotateLeftButton')
|
|
345
|
+
}, _ctx.ptm('rotateLeftButton'), {
|
|
346
|
+
"data-pc-group-section": "action"
|
|
347
|
+
}), [renderSlot(_ctx.$slots, "undo", {}, function () {
|
|
341
348
|
return [createVNode(_component_UndoIcon, normalizeProps(guardReactiveProps(_ctx.ptm('rotateLeftIcon'))), null, 16)];
|
|
342
349
|
})], 16, _hoisted_3), createElementVNode("button", mergeProps({
|
|
343
350
|
"class": _ctx.cx('zoomOutButton'),
|
|
@@ -347,7 +354,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
347
354
|
type: "button",
|
|
348
355
|
disabled: $options.isZoomOutDisabled,
|
|
349
356
|
"aria-label": $options.zoomOutAriaLabel
|
|
350
|
-
}, _ctx.ptm('zoomOutButton')
|
|
357
|
+
}, _ctx.ptm('zoomOutButton'), {
|
|
358
|
+
"data-pc-group-section": "action"
|
|
359
|
+
}), [renderSlot(_ctx.$slots, "zoomout", {}, function () {
|
|
351
360
|
return [createVNode(_component_SearchMinusIcon, normalizeProps(guardReactiveProps(_ctx.ptm('zoomOutIcon'))), null, 16)];
|
|
352
361
|
})], 16, _hoisted_4), createElementVNode("button", mergeProps({
|
|
353
362
|
"class": _ctx.cx('zoomInButton'),
|
|
@@ -357,7 +366,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
357
366
|
type: "button",
|
|
358
367
|
disabled: $options.isZoomInDisabled,
|
|
359
368
|
"aria-label": $options.zoomInAriaLabel
|
|
360
|
-
}, _ctx.ptm('zoomInButton')
|
|
369
|
+
}, _ctx.ptm('zoomInButton'), {
|
|
370
|
+
"data-pc-group-section": "action"
|
|
371
|
+
}), [renderSlot(_ctx.$slots, "zoomin", {}, function () {
|
|
361
372
|
return [createVNode(_component_SearchPlusIcon, normalizeProps(guardReactiveProps(_ctx.ptm('zoomInIcon'))), null, 16)];
|
|
362
373
|
})], 16, _hoisted_5), createElementVNode("button", mergeProps({
|
|
363
374
|
"class": _ctx.cx('closeButton'),
|
|
@@ -367,20 +378,23 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
367
378
|
}),
|
|
368
379
|
"aria-label": $options.closeAriaLabel,
|
|
369
380
|
autofocus: ""
|
|
370
|
-
}, _ctx.ptm('closeButton')
|
|
381
|
+
}, _ctx.ptm('closeButton'), {
|
|
382
|
+
"data-pc-group-section": "action"
|
|
383
|
+
}), [renderSlot(_ctx.$slots, "close", {}, function () {
|
|
371
384
|
return [createVNode(_component_TimesIcon, normalizeProps(guardReactiveProps(_ctx.ptm('closeIcon'))), null, 16)];
|
|
372
|
-
})], 16, _hoisted_6)], 16), createVNode(Transition, {
|
|
385
|
+
})], 16, _hoisted_6)], 16), createVNode(Transition, mergeProps({
|
|
373
386
|
name: "p-image-preview",
|
|
374
387
|
onBeforeEnter: $options.onBeforeEnter,
|
|
375
388
|
onEnter: $options.onEnter,
|
|
376
389
|
onLeave: $options.onLeave,
|
|
377
390
|
onBeforeLeave: $options.onBeforeLeave,
|
|
378
391
|
onAfterLeave: $options.onAfterLeave
|
|
379
|
-
}, {
|
|
392
|
+
}, _ctx.ptm('transition')), {
|
|
380
393
|
"default": withCtx(function () {
|
|
381
394
|
return [$data.previewVisible ? (openBlock(), createElementBlock("div", normalizeProps(mergeProps({
|
|
382
395
|
key: 0
|
|
383
396
|
}, _ctx.ptm('previewContainer'))), [renderSlot(_ctx.$slots, "preview", {
|
|
397
|
+
"class": normalizeClass(_ctx.cx('preview')),
|
|
384
398
|
style: normalizeStyle($options.imagePreviewStyle),
|
|
385
399
|
onClick: $options.onPreviewImageClick
|
|
386
400
|
}, function () {
|
|
@@ -395,7 +409,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
395
409
|
})], 16)) : createCommentVNode("", true)];
|
|
396
410
|
}),
|
|
397
411
|
_: 3
|
|
398
|
-
},
|
|
412
|
+
}, 16, ["onBeforeEnter", "onEnter", "onLeave", "onBeforeLeave", "onAfterLeave"])], 16, _hoisted_1)), [[_directive_focustrap]]) : createCommentVNode("", true)];
|
|
399
413
|
}),
|
|
400
414
|
_: 3
|
|
401
415
|
})], 16);
|
package/image/image.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"primevue/focustrap";import t from"primevue/icons/eye";import n from"primevue/icons/refresh";import i from"primevue/icons/searchminus";import o from"primevue/icons/searchplus";import r from"primevue/icons/times";import a from"primevue/icons/undo";import l from"primevue/portal";import{ZIndexUtils as s,DomHandler as c}from"primevue/utils";import u from"primevue/basecomponent";import{useStyle as p}from"primevue/usestyle";import{resolveComponent as m,resolveDirective as f,openBlock as v,createElementBlock as b,mergeProps as h,renderSlot as g,createElementVNode as d,createBlock as y,resolveDynamicComponent as w,createCommentVNode as k,createVNode as I,withCtx as C,withDirectives as O,normalizeProps as B,guardReactiveProps as L,Transition as z,normalizeStyle as P}from"vue";var $=p("\n.p-image-mask {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.p-image-preview-container {\n position: relative;\n display: inline-block;\n}\n\n.p-image-preview-indicator {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0;\n transition: opacity 0.3s;\n}\n\n.p-image-preview-container:hover > .p-image-preview-indicator {\n opacity: 1;\n cursor: pointer;\n}\n\n.p-image-preview-container > img {\n cursor: pointer;\n}\n\n.p-image-toolbar {\n position: absolute;\n top: 0;\n right: 0;\n display: flex;\n}\n\n.p-image-action.p-link {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.p-image-preview {\n transition: transform 0.15s;\n max-width: 100vw;\n max-height: 100vh;\n}\n\n.p-image-preview-enter-active {\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n}\n.p-image-preview-leave-active {\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n.p-image-preview-enter-from,\n.p-image-preview-leave-to {\n opacity: 0;\n transform: scale(0.7);\n}\n",{name:"image",manual:!0}),S={name:"Image",extends:{name:"BaseImage",extends:u,props:{preview:{type:Boolean,default:!1},class:{type:null,default:null},style:{type:null,default:null},imageStyle:{type:null,default:null},imageClass:{type:null,default:null},previewButtonProps:{type:null,default:null},indicatorIcon:{type:String,default:void 0},zoomInDisabled:{type:Boolean,default:!1},zoomOutDisabled:{type:Boolean,default:!1}},css:{classes:{root:function(e){return["p-image p-component",{"p-image-preview-container":e.props.preview}]},image:function(e){return e.props.image},button:"p-image-preview-indicator",icon:"p-image-preview-icon",mask:"p-image-mask p-component-overlay p-component-overlay-enter",rotateRightButton:"p-image-action p-link",rotateLeftButton:"p-image-action p-link",zoomOutButton:function(e){return["p-image-action p-link",{"p-disabled":e.instance.isZoomOutDisabled}]},zoomInButton:function(e){return["p-image-action p-link",{"p-disabled":e.instance.isZoomInDisabled}]},closeButton:"p-image-action p-link",preview:"p-image-preview"},loadStyle:$.load},provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["show","hide","error"],mask:null,data:function(){return{maskVisible:!1,previewVisible:!1,rotate:0,scale:1}},beforeUnmount:function(){this.mask&&s.clear(this.container)},methods:{maskRef:function(e){this.mask=e},toolbarRef:function(e){this.toolbarRef=e},onImageClick:function(){var e=this;this.preview&&(this.maskVisible=!0,setTimeout((function(){e.previewVisible=!0}),25))},onPreviewImageClick:function(){this.previewClick=!0},onMaskClick:function(e){[e.target.classList].includes("p-image-action")||e.target.closest(".p-image-action")||(this.previewClick||(this.previewVisible=!1,this.rotate=0,this.scale=1),this.previewClick=!1)},onMaskKeydown:function(e){var t=this;if("Escape"===e.code)this.hidePreview(),setTimeout((function(){c.focus(t.$refs.previewButton)}),200),e.preventDefault()},onError:function(){this.$emit("error")},rotateRight:function(){this.rotate+=90,this.previewClick=!0},rotateLeft:function(){this.rotate-=90,this.previewClick=!0},zoomIn:function(){this.scale=this.scale+.1,this.previewClick=!0},zoomOut:function(){this.scale=this.scale-.1,this.previewClick=!0},onBeforeEnter:function(){s.set("modal",this.mask,this.$primevue.config.zIndex.modal)},onEnter:function(){this.focus(),this.$emit("show")},onBeforeLeave:function(){!this.isUnstyled&&c.addClass(this.mask,"p-component-overlay-leave")},onLeave:function(){this.$emit("hide")},onAfterLeave:function(e){s.clear(e),this.maskVisible=!1},focus:function(){var e=this.mask.querySelector("[autofocus]");e&&e.focus()},hidePreview:function(){this.previewVisible=!1,this.rotate=0,this.scale=1}},computed:{containerClass:function(){return[this.cx("root"),this.class]},rotateClass:function(){return"p-image-preview-rotate-"+this.rotate},imagePreviewStyle:function(){return{transform:"rotate("+this.rotate+"deg) scale("+this.scale+")"}},isZoomInDisabled:function(){return this.zoomInDisabled||this.scale>=1.5},isZoomOutDisabled:function(){return this.zoomOutDisabled||this.scale<=.5},rightAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.rotateRight:void 0},leftAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.rotateLeft:void 0},zoomInAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.zoomIn:void 0},zoomOutAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.zoomOut:void 0},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},components:{Portal:l,EyeIcon:t,RefreshIcon:n,UndoIcon:a,SearchMinusIcon:i,SearchPlusIcon:o,TimesIcon:r},directives:{focustrap:e}};function x(e){return x="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},x(e)}function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){A(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function A(e,t,n){return(t=D(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e){var t=R(e,"string");return"symbol"===x(t)?t:String(t)}function R(e,t){if("object"!==x(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==x(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var V=["aria-modal"],M=["aria-label"],Z=["aria-label"],T=["disabled","aria-label"],K=["disabled","aria-label"],U=["aria-label"],_=["src"];S.render=function(e,t,n,i,o,r){var a=m("RefreshIcon"),l=m("UndoIcon"),s=m("SearchMinusIcon"),c=m("SearchPlusIcon"),u=m("TimesIcon"),p=m("Portal"),$=f("focustrap");return v(),b("span",h({class:r.containerClass,style:e.style},e.ptm("root"),{"data-pc-name":"image"}),[g(e.$slots,"image",{onError:r.onError},(function(){return[d("img",h({style:e.imageStyle,class:[e.cx("image"),e.imageClass],onError:t[0]||(t[0]=function(){return r.onError&&r.onError.apply(r,arguments)})},j(j({},e.$attrs),e.ptm("image"))),null,16)]})),e.preview?(v(),b("button",h({key:0,ref:"previewButton",class:e.cx("button"),onClick:t[1]||(t[1]=function(){return r.onImageClick&&r.onImageClick.apply(r,arguments)})},j(j({},e.previewButtonProps),e.ptm("button"))),[g(e.$slots,"indicatoricon",{},(function(){return[(v(),y(w(e.indicatorIcon?"i":"EyeIcon"),h({class:e.cx("icon")},e.ptm("icon")),null,16,["class"]))]}))],16)):k("",!0),I(p,null,{default:C((function(){return[o.maskVisible?O((v(),b("div",h({key:0,ref:r.maskRef,role:"dialog",class:e.cx("mask"),"aria-modal":o.maskVisible,onClick:t[8]||(t[8]=function(){return r.onMaskClick&&r.onMaskClick.apply(r,arguments)}),onKeydown:t[9]||(t[9]=function(){return r.onMaskKeydown&&r.onMaskKeydown.apply(r,arguments)})},e.ptm("mask")),[d("div",h({class:"p-image-toolbar"},e.ptm("toolbar")),[d("button",h({class:e.cx("rotateRightButton"),onClick:t[2]||(t[2]=function(){return r.rotateRight&&r.rotateRight.apply(r,arguments)}),type:"button","aria-label":r.rightAriaLabel},e.ptm("rotateRightButton")),[g(e.$slots,"refresh",{},(function(){return[I(a,B(L(e.ptm("rotateRightIcon"))),null,16)]}))],16,M),d("button",h({class:e.cx("rotateLeftButton"),onClick:t[3]||(t[3]=function(){return r.rotateLeft&&r.rotateLeft.apply(r,arguments)}),type:"button","aria-label":r.leftAriaLabel},e.ptm("rotateLeftButton")),[g(e.$slots,"undo",{},(function(){return[I(l,B(L(e.ptm("rotateLeftIcon"))),null,16)]}))],16,Z),d("button",h({class:e.cx("zoomOutButton"),onClick:t[4]||(t[4]=function(){return r.zoomOut&&r.zoomOut.apply(r,arguments)}),type:"button",disabled:r.isZoomOutDisabled,"aria-label":r.zoomOutAriaLabel},e.ptm("zoomOutButton")),[g(e.$slots,"zoomout",{},(function(){return[I(s,B(L(e.ptm("zoomOutIcon"))),null,16)]}))],16,T),d("button",h({class:e.cx("zoomInButton"),onClick:t[5]||(t[5]=function(){return r.zoomIn&&r.zoomIn.apply(r,arguments)}),type:"button",disabled:r.isZoomInDisabled,"aria-label":r.zoomInAriaLabel},e.ptm("zoomInButton")),[g(e.$slots,"zoomin",{},(function(){return[I(c,B(L(e.ptm("zoomInIcon"))),null,16)]}))],16,K),d("button",h({class:e.cx("closeButton"),type:"button",onClick:t[6]||(t[6]=function(){return r.hidePreview&&r.hidePreview.apply(r,arguments)}),"aria-label":r.closeAriaLabel,autofocus:""},e.ptm("closeButton")),[g(e.$slots,"close",{},(function(){return[I(u,B(L(e.ptm("closeIcon"))),null,16)]}))],16,U)],16),I(z,{name:"p-image-preview",onBeforeEnter:r.onBeforeEnter,onEnter:r.onEnter,onLeave:r.onLeave,onBeforeLeave:r.onBeforeLeave,onAfterLeave:r.onAfterLeave},{default:C((function(){return[o.previewVisible?(v(),b("div",B(h({key:0},e.ptm("previewContainer"))),[g(e.$slots,"preview",{style:P(r.imagePreviewStyle),onClick:r.onPreviewImageClick},(function(){return[d("img",h({src:e.$attrs.src,class:e.cx("preview"),style:r.imagePreviewStyle,onClick:t[7]||(t[7]=function(){return r.onPreviewImageClick&&r.onPreviewImageClick.apply(r,arguments)})},e.ptm("preview")),null,16,_)]}))],16)):k("",!0)]})),_:3},8,["onBeforeEnter","onEnter","onLeave","onBeforeLeave","onAfterLeave"])],16,V)),[[$]]):k("",!0)]})),_:3})],16)};export{S as default};
|
|
1
|
+
import e from"primevue/focustrap";import t from"primevue/icons/eye";import n from"primevue/icons/refresh";import o from"primevue/icons/searchminus";import i from"primevue/icons/searchplus";import r from"primevue/icons/times";import a from"primevue/icons/undo";import s from"primevue/portal";import{ZIndexUtils as l,DomHandler as c}from"primevue/utils";import u from"primevue/basecomponent";import{useStyle as p}from"primevue/usestyle";import{resolveComponent as m,resolveDirective as f,openBlock as v,createElementBlock as d,mergeProps as b,renderSlot as g,createElementVNode as h,createBlock as y,resolveDynamicComponent as w,createCommentVNode as k,createVNode as I,withCtx as C,withDirectives as O,normalizeProps as B,guardReactiveProps as L,Transition as z,normalizeClass as P,normalizeStyle as $}from"vue";var x=p("\n.p-image-mask {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.p-image-preview-container {\n position: relative;\n display: inline-block;\n}\n\n.p-image-preview-indicator {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0;\n transition: opacity 0.3s;\n}\n\n.p-image-preview-container:hover > .p-image-preview-indicator {\n opacity: 1;\n cursor: pointer;\n}\n\n.p-image-preview-container > img {\n cursor: pointer;\n}\n\n.p-image-toolbar {\n position: absolute;\n top: 0;\n right: 0;\n display: flex;\n}\n\n.p-image-action.p-link {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.p-image-preview {\n transition: transform 0.15s;\n max-width: 100vw;\n max-height: 100vh;\n}\n\n.p-image-preview-enter-active {\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n}\n.p-image-preview-leave-active {\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n.p-image-preview-enter-from,\n.p-image-preview-leave-to {\n opacity: 0;\n transform: scale(0.7);\n}\n",{name:"image",manual:!0}),S={name:"Image",extends:{name:"BaseImage",extends:u,props:{preview:{type:Boolean,default:!1},class:{type:null,default:null},style:{type:null,default:null},imageStyle:{type:null,default:null},imageClass:{type:null,default:null},previewButtonProps:{type:null,default:null},indicatorIcon:{type:String,default:void 0},zoomInDisabled:{type:Boolean,default:!1},zoomOutDisabled:{type:Boolean,default:!1}},css:{classes:{root:function(e){return["p-image p-component",{"p-image-preview-container":e.props.preview}]},image:function(e){return e.props.image},button:"p-image-preview-indicator",icon:"p-image-preview-icon",mask:"p-image-mask p-component-overlay p-component-overlay-enter",rotateRightButton:"p-image-action p-link",rotateLeftButton:"p-image-action p-link",zoomOutButton:function(e){return["p-image-action p-link",{"p-disabled":e.instance.isZoomOutDisabled}]},zoomInButton:function(e){return["p-image-action p-link",{"p-disabled":e.instance.isZoomInDisabled}]},closeButton:"p-image-action p-link",preview:"p-image-preview"},loadStyle:x.load},provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["show","hide","error"],mask:null,data:function(){return{maskVisible:!1,previewVisible:!1,rotate:0,scale:1}},beforeUnmount:function(){this.mask&&l.clear(this.container)},methods:{maskRef:function(e){this.mask=e},toolbarRef:function(e){this.toolbarRef=e},onImageClick:function(){var e=this;this.preview&&(c.addClass(document.body,"p-overflow-hidden"),this.maskVisible=!0,setTimeout((function(){e.previewVisible=!0}),25))},onPreviewImageClick:function(){this.previewClick=!0},onMaskClick:function(e){[e.target.classList].includes("p-image-action")||e.target.closest(".p-image-action")||(this.previewClick||(this.previewVisible=!1,this.rotate=0,this.scale=1),this.previewClick=!1)},onMaskKeydown:function(e){var t=this;if("Escape"===e.code)this.hidePreview(),setTimeout((function(){c.focus(t.$refs.previewButton)}),200),e.preventDefault()},onError:function(){this.$emit("error")},rotateRight:function(){this.rotate+=90,this.previewClick=!0},rotateLeft:function(){this.rotate-=90,this.previewClick=!0},zoomIn:function(){this.scale=this.scale+.1,this.previewClick=!0},zoomOut:function(){this.scale=this.scale-.1,this.previewClick=!0},onBeforeEnter:function(){l.set("modal",this.mask,this.$primevue.config.zIndex.modal)},onEnter:function(){this.focus(),this.$emit("show")},onBeforeLeave:function(){!this.isUnstyled&&c.addClass(this.mask,"p-component-overlay-leave")},onLeave:function(){this.$emit("hide")},onAfterLeave:function(e){l.clear(e),this.maskVisible=!1},focus:function(){var e=this.mask.querySelector("[autofocus]");e&&e.focus()},hidePreview:function(){this.previewVisible=!1,this.rotate=0,this.scale=1,c.removeClass(document.body,"p-overflow-hidden")}},computed:{containerClass:function(){return[this.cx("root"),this.class]},rotateClass:function(){return"p-image-preview-rotate-"+this.rotate},imagePreviewStyle:function(){return{transform:"rotate("+this.rotate+"deg) scale("+this.scale+")"}},isZoomInDisabled:function(){return this.zoomInDisabled||this.scale>=1.5},isZoomOutDisabled:function(){return this.zoomOutDisabled||this.scale<=.5},rightAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.rotateRight:void 0},leftAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.rotateLeft:void 0},zoomInAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.zoomIn:void 0},zoomOutAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.zoomOut:void 0},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},components:{Portal:s,EyeIcon:t,RefreshIcon:n,UndoIcon:a,SearchMinusIcon:o,SearchPlusIcon:i,TimesIcon:r},directives:{focustrap:e}};function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){D(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function D(e,t,n){return(t=R(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R(e){var t=V(e,"string");return"symbol"===E(t)?t:String(t)}function V(e,t){if("object"!==E(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==E(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var M=["aria-modal"],Z=["aria-label"],T=["aria-label"],K=["disabled","aria-label"],U=["disabled","aria-label"],_=["aria-label"],q=["src"];S.render=function(e,t,n,o,i,r){var a=m("RefreshIcon"),s=m("UndoIcon"),l=m("SearchMinusIcon"),c=m("SearchPlusIcon"),u=m("TimesIcon"),p=m("Portal"),x=f("focustrap");return v(),d("span",b({class:r.containerClass,style:e.style},e.ptm("root"),{"data-pc-name":"image"}),[g(e.$slots,"image",{onError:r.onError},(function(){return[h("img",b({style:e.imageStyle,class:[e.cx("image"),e.imageClass],onError:t[0]||(t[0]=function(){return r.onError&&r.onError.apply(r,arguments)})},A(A({},e.$attrs),e.ptm("image"))),null,16)]})),e.preview?(v(),d("button",b({key:0,ref:"previewButton",type:"button",class:e.cx("button"),onClick:t[1]||(t[1]=function(){return r.onImageClick&&r.onImageClick.apply(r,arguments)})},A(A({},e.previewButtonProps),e.ptm("button"))),[g(e.$slots,"indicatoricon",{},(function(){return[(v(),y(w(e.indicatorIcon?"i":"EyeIcon"),b({class:e.cx("icon")},e.ptm("icon")),null,16,["class"]))]}))],16)):k("",!0),I(p,null,{default:C((function(){return[i.maskVisible?O((v(),d("div",b({key:0,ref:r.maskRef,role:"dialog",class:e.cx("mask"),"aria-modal":i.maskVisible,onClick:t[8]||(t[8]=function(){return r.onMaskClick&&r.onMaskClick.apply(r,arguments)}),onKeydown:t[9]||(t[9]=function(){return r.onMaskKeydown&&r.onMaskKeydown.apply(r,arguments)})},e.ptm("mask")),[h("div",b({class:"p-image-toolbar"},e.ptm("toolbar")),[h("button",b({class:e.cx("rotateRightButton"),onClick:t[2]||(t[2]=function(){return r.rotateRight&&r.rotateRight.apply(r,arguments)}),type:"button","aria-label":r.rightAriaLabel},e.ptm("rotateRightButton"),{"data-pc-group-section":"action"}),[g(e.$slots,"refresh",{},(function(){return[I(a,B(L(e.ptm("rotateRightIcon"))),null,16)]}))],16,Z),h("button",b({class:e.cx("rotateLeftButton"),onClick:t[3]||(t[3]=function(){return r.rotateLeft&&r.rotateLeft.apply(r,arguments)}),type:"button","aria-label":r.leftAriaLabel},e.ptm("rotateLeftButton"),{"data-pc-group-section":"action"}),[g(e.$slots,"undo",{},(function(){return[I(s,B(L(e.ptm("rotateLeftIcon"))),null,16)]}))],16,T),h("button",b({class:e.cx("zoomOutButton"),onClick:t[4]||(t[4]=function(){return r.zoomOut&&r.zoomOut.apply(r,arguments)}),type:"button",disabled:r.isZoomOutDisabled,"aria-label":r.zoomOutAriaLabel},e.ptm("zoomOutButton"),{"data-pc-group-section":"action"}),[g(e.$slots,"zoomout",{},(function(){return[I(l,B(L(e.ptm("zoomOutIcon"))),null,16)]}))],16,K),h("button",b({class:e.cx("zoomInButton"),onClick:t[5]||(t[5]=function(){return r.zoomIn&&r.zoomIn.apply(r,arguments)}),type:"button",disabled:r.isZoomInDisabled,"aria-label":r.zoomInAriaLabel},e.ptm("zoomInButton"),{"data-pc-group-section":"action"}),[g(e.$slots,"zoomin",{},(function(){return[I(c,B(L(e.ptm("zoomInIcon"))),null,16)]}))],16,U),h("button",b({class:e.cx("closeButton"),type:"button",onClick:t[6]||(t[6]=function(){return r.hidePreview&&r.hidePreview.apply(r,arguments)}),"aria-label":r.closeAriaLabel,autofocus:""},e.ptm("closeButton"),{"data-pc-group-section":"action"}),[g(e.$slots,"close",{},(function(){return[I(u,B(L(e.ptm("closeIcon"))),null,16)]}))],16,_)],16),I(z,b({name:"p-image-preview",onBeforeEnter:r.onBeforeEnter,onEnter:r.onEnter,onLeave:r.onLeave,onBeforeLeave:r.onBeforeLeave,onAfterLeave:r.onAfterLeave},e.ptm("transition")),{default:C((function(){return[i.previewVisible?(v(),d("div",B(b({key:0},e.ptm("previewContainer"))),[g(e.$slots,"preview",{class:P(e.cx("preview")),style:$(r.imagePreviewStyle),onClick:r.onPreviewImageClick},(function(){return[h("img",b({src:e.$attrs.src,class:e.cx("preview"),style:r.imagePreviewStyle,onClick:t[7]||(t[7]=function(){return r.onPreviewImageClick&&r.onPreviewImageClick.apply(r,arguments)})},e.ptm("preview")),null,16,q)]}))],16)):k("",!0)]})),_:3},16,["onBeforeEnter","onEnter","onLeave","onBeforeLeave","onAfterLeave"])],16,M)),[[x]]):k("",!0)]})),_:3})],16)};export{S as default};
|