primevue 3.27.0 → 3.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/autocomplete/AutoComplete.d.ts +10 -1
- package/autocomplete/AutoComplete.vue +1 -1
- package/autocomplete/autocomplete.cjs.js +4 -1
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +4 -1
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +4 -1
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/Avatar.d.ts +44 -0
- package/avatar/Avatar.vue +10 -8
- package/avatar/avatar.cjs.js +36 -34
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.esm.js +33 -35
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +37 -36
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/AvatarGroup.d.ts +27 -1
- package/avatargroup/AvatarGroup.vue +5 -2
- package/avatargroup/avatargroup.cjs.js +9 -5
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.esm.js +6 -6
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +10 -7
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/Badge.d.ts +32 -0
- package/badge/Badge.vue +3 -1
- package/badge/badge.cjs.js +8 -4
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +5 -5
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +9 -6
- package/badge/badge.min.js +1 -1
- package/basecomponent/BaseComponent.vue +10 -3
- package/basecomponent/basecomponent.cjs.js +10 -3
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +10 -3
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +10 -3
- package/basecomponent/basecomponent.min.js +1 -1
- package/baseicon/BaseIcon.vue +2 -2
- package/baseicon/baseicon.cjs.js +2 -2
- package/baseicon/baseicon.cjs.min.js +1 -1
- package/baseicon/baseicon.esm.js +2 -2
- package/baseicon/baseicon.esm.min.js +1 -1
- package/baseicon/baseicon.js +2 -2
- package/baseicon/baseicon.min.js +1 -1
- package/blockui/BlockUI.d.ts +44 -0
- package/blockui/BlockUI.vue +3 -1
- package/blockui/blockui.cjs.js +9 -3
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +6 -4
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +10 -5
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/Breadcrumb.d.ts +60 -0
- package/breadcrumb/Breadcrumb.vue +8 -6
- package/breadcrumb/BreadcrumbItem.vue +14 -10
- package/breadcrumb/breadcrumb.cjs.js +53 -51
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +53 -52
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +54 -53
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/Button.d.ts +48 -0
- package/button/Button.vue +10 -9
- package/button/button.cjs.js +43 -44
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +43 -45
- package/button/button.esm.min.js +1 -1
- package/button/button.js +44 -46
- package/button/button.min.js +1 -1
- package/chart/Chart.d.ts +36 -0
- package/chart/Chart.vue +5 -2
- package/chart/chart.cjs.js +10 -5
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +7 -6
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +11 -7
- package/chart/chart.min.js +1 -1
- package/chip/Chip.d.ts +60 -0
- package/chip/Chip.vue +10 -9
- package/chip/chip.cjs.js +35 -36
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.esm.js +35 -37
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +36 -38
- package/chip/chip.min.js +1 -1
- package/config/PrimeVue.d.ts +8 -0
- package/config/config.cjs.js +3 -1
- package/config/config.cjs.min.js +1 -1
- package/config/config.esm.js +3 -2
- package/config/config.esm.min.js +1 -1
- package/config/config.js +3 -1
- package/config/config.min.js +1 -1
- package/confirmdialog/ConfirmDialog.d.ts +88 -0
- package/confirmdialog/ConfirmDialog.vue +9 -6
- package/confirmdialog/confirmdialog.cjs.js +22 -18
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +22 -19
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +23 -20
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/ConfirmPopup.d.ts +75 -0
- package/confirmpopup/ConfirmPopup.vue +11 -9
- package/confirmpopup/confirmpopup.cjs.js +27 -25
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +27 -26
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +28 -27
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/ContextMenu.d.ts +135 -0
- package/contextmenu/ContextMenu.vue +4 -1
- package/contextmenu/ContextMenuSub.vue +46 -10
- package/contextmenu/contextmenu.cjs.js +57 -46
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +57 -47
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +58 -48
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +278 -246
- package/core/core.min.js +11 -11
- package/dialog/Dialog.d.ts +87 -0
- package/dialog/Dialog.vue +23 -10
- package/dialog/dialog.cjs.js +31 -30
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +31 -31
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +32 -32
- package/dialog/dialog.min.js +1 -1
- package/dock/Dock.d.ts +94 -0
- package/dock/Dock.vue +4 -2
- package/dock/DockSub.vue +30 -6
- package/dock/dock.cjs.js +52 -39
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +52 -40
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +53 -41
- package/dock/dock.min.js +1 -1
- package/dropdown/Dropdown.vue +1 -1
- package/dropdown/dropdown.cjs.js +1 -1
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +1 -1
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +1 -1
- package/dropdown/dropdown.min.js +1 -1
- package/dynamicdialog/DynamicDialog.vue +3 -1
- package/dynamicdialog/dynamicdialog.cjs.js +5 -1
- package/dynamicdialog/dynamicdialog.cjs.min.js +1 -1
- package/dynamicdialog/dynamicdialog.esm.js +4 -1
- package/dynamicdialog/dynamicdialog.esm.min.js +1 -1
- package/dynamicdialog/dynamicdialog.js +6 -3
- package/dynamicdialog/dynamicdialog.min.js +1 -1
- package/fileupload/FileContent.vue +11 -9
- package/fileupload/FileUpload.d.ts +154 -0
- package/fileupload/FileUpload.vue +26 -24
- package/fileupload/fileupload.cjs.js +100 -97
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +100 -98
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +101 -99
- package/fileupload/fileupload.min.js +1 -1
- package/inlinemessage/InlineMessage.d.ts +52 -0
- package/inlinemessage/InlineMessage.vue +7 -3
- package/inlinemessage/inlinemessage.cjs.js +12 -11
- package/inlinemessage/inlinemessage.cjs.min.js +1 -1
- package/inlinemessage/inlinemessage.esm.js +12 -12
- package/inlinemessage/inlinemessage.esm.min.js +1 -1
- package/inlinemessage/inlinemessage.js +13 -13
- package/inlinemessage/inlinemessage.min.js +1 -1
- package/inplace/Inplace.d.ts +59 -0
- package/inplace/Inplace.vue +7 -5
- package/inplace/inplace.cjs.js +17 -16
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +17 -17
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +18 -18
- package/inplace/inplace.min.js +1 -1
- package/listbox/Listbox.d.ts +1 -1
- package/megamenu/MegaMenu.d.ts +149 -0
- package/megamenu/MegaMenu.vue +6 -3
- package/megamenu/MegaMenuSub.vue +43 -15
- package/megamenu/megamenu.cjs.js +83 -75
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +83 -76
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +84 -77
- package/megamenu/megamenu.min.js +1 -1
- package/menu/Menu.d.ts +113 -0
- package/menu/Menu.vue +11 -8
- package/menu/Menuitem.vue +20 -8
- package/menu/menu.cjs.js +73 -62
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +73 -63
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +74 -64
- package/menu/menu.min.js +1 -1
- package/menubar/Menubar.d.ts +146 -0
- package/menubar/Menubar.vue +8 -5
- package/menubar/MenubarSub.vue +38 -10
- package/menubar/menubar.cjs.js +70 -60
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +70 -61
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +71 -62
- package/menubar/menubar.min.js +1 -1
- package/message/Message.d.ts +64 -1
- package/message/Message.vue +9 -7
- package/message/message.cjs.js +22 -21
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +22 -22
- package/message/message.esm.min.js +1 -1
- package/message/message.js +23 -23
- package/message/message.min.js +1 -1
- package/multiselect/MultiSelect.d.ts +1 -1
- package/overlaypanel/OverlayPanel.d.ts +56 -0
- package/overlaypanel/OverlayPanel.vue +6 -4
- package/overlaypanel/overlaypanel.cjs.js +13 -10
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +13 -11
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +14 -12
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/panel/Panel.d.ts +10 -1
- package/panel/Panel.vue +1 -1
- package/panel/panel.cjs.js +4 -1
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +4 -1
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +4 -1
- package/panel/panel.min.js +1 -1
- package/panelmenu/PanelMenu.d.ts +133 -0
- package/panelmenu/PanelMenu.vue +36 -13
- package/panelmenu/PanelMenuList.vue +3 -0
- package/panelmenu/PanelMenuSub.vue +33 -12
- package/panelmenu/panelmenu.cjs.js +115 -96
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +115 -97
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +116 -98
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/Password.vue +2 -2
- package/password/password.cjs.js +2 -2
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +2 -2
- package/password/password.esm.min.js +1 -1
- package/password/password.js +2 -2
- package/password/password.min.js +1 -1
- package/progressbar/ProgressBar.d.ts +40 -0
- package/progressbar/ProgressBar.vue +8 -5
- package/progressbar/progressbar.cjs.js +25 -23
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +22 -24
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +26 -25
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/ProgressSpinner.d.ts +40 -0
- package/progressspinner/ProgressSpinner.vue +6 -3
- package/progressspinner/progressspinner.cjs.js +18 -13
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +15 -14
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +19 -15
- package/progressspinner/progressspinner.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +1 -1
- package/resources/themes/arya-green/theme.css +1 -1
- package/resources/themes/arya-orange/theme.css +1 -1
- package/resources/themes/arya-purple/theme.css +1 -1
- package/resources/themes/bootstrap4-dark-blue/theme.css +1 -1
- package/resources/themes/bootstrap4-dark-purple/theme.css +1 -1
- package/resources/themes/bootstrap4-light-blue/theme.css +1 -1
- package/resources/themes/bootstrap4-light-purple/theme.css +1 -1
- package/resources/themes/fluent-light/theme.css +1 -1
- package/resources/themes/lara-dark-blue/theme.css +1 -1
- package/resources/themes/lara-dark-indigo/theme.css +1 -1
- package/resources/themes/lara-dark-purple/theme.css +1 -1
- package/resources/themes/lara-dark-teal/theme.css +1 -1
- package/resources/themes/lara-light-blue/theme.css +1 -1
- package/resources/themes/lara-light-indigo/theme.css +1 -1
- package/resources/themes/lara-light-purple/theme.css +1 -1
- package/resources/themes/lara-light-teal/theme.css +1 -1
- package/resources/themes/luna-amber/theme.css +1 -1
- package/resources/themes/luna-blue/theme.css +1 -1
- package/resources/themes/luna-green/theme.css +1 -1
- package/resources/themes/luna-pink/theme.css +1 -1
- package/resources/themes/md-dark-deeppurple/theme.css +4 -1
- package/resources/themes/md-dark-indigo/theme.css +4 -1
- package/resources/themes/md-light-deeppurple/theme.css +4 -1
- package/resources/themes/md-light-indigo/theme.css +4 -1
- package/resources/themes/mdc-dark-deeppurple/theme.css +4 -1
- package/resources/themes/mdc-dark-indigo/theme.css +4 -1
- package/resources/themes/mdc-light-deeppurple/theme.css +4 -1
- package/resources/themes/mdc-light-indigo/theme.css +4 -1
- package/resources/themes/mira/theme.css +1 -1
- package/resources/themes/nano/theme.css +1 -1
- package/resources/themes/nova/theme.css +1 -1
- package/resources/themes/nova-accent/theme.css +1 -1
- package/resources/themes/nova-alt/theme.css +1 -1
- package/resources/themes/nova-vue/theme.css +1 -1
- package/resources/themes/rhea/theme.css +1 -1
- package/resources/themes/saga-blue/theme.css +1 -1
- package/resources/themes/saga-green/theme.css +1 -1
- package/resources/themes/saga-orange/theme.css +1 -1
- package/resources/themes/saga-purple/theme.css +1 -1
- package/resources/themes/soho-dark/theme.css +1 -1
- package/resources/themes/soho-light/theme.css +1 -1
- package/resources/themes/tailwind-light/theme.css +1 -1
- package/resources/themes/vela-blue/theme.css +1 -1
- package/resources/themes/vela-green/theme.css +1 -1
- package/resources/themes/vela-orange/theme.css +1 -1
- package/resources/themes/vela-purple/theme.css +1 -1
- package/resources/themes/viva-dark/theme.css +1 -1
- package/resources/themes/viva-light/theme.css +1 -1
- package/scrolltop/ScrollTop.d.ts +48 -0
- package/scrolltop/ScrollTop.vue +5 -2
- package/scrolltop/scrolltop.cjs.js +10 -7
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.esm.js +10 -8
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +11 -9
- package/scrolltop/scrolltop.min.js +1 -1
- package/sidebar/Sidebar.d.ts +68 -0
- package/sidebar/Sidebar.vue +9 -7
- package/sidebar/sidebar.cjs.js +26 -24
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +26 -25
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +27 -26
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/Skeleton.d.ts +32 -0
- package/skeleton/Skeleton.vue +4 -1
- package/skeleton/skeleton.cjs.js +10 -4
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +7 -5
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +11 -6
- package/skeleton/skeleton.min.js +1 -1
- package/speeddial/SpeedDial.d.ts +101 -0
- package/speeddial/SpeedDial.vue +31 -8
- package/speeddial/speeddial.cjs.js +47 -33
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +47 -34
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +48 -35
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/SplitButton.d.ts +64 -0
- package/splitbutton/SplitButton.vue +8 -5
- package/splitbutton/splitbutton.cjs.js +23 -18
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +23 -19
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +24 -20
- package/splitbutton/splitbutton.min.js +1 -1
- package/steps/Steps.d.ts +52 -0
- package/steps/Steps.vue +11 -8
- package/steps/steps.cjs.js +34 -33
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +31 -34
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +35 -35
- package/steps/steps.min.js +1 -1
- package/tabmenu/TabMenu.d.ts +79 -0
- package/tabmenu/TabMenu.vue +20 -10
- package/tabmenu/tabmenu.cjs.js +47 -41
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +47 -42
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +48 -43
- package/tabmenu/tabmenu.min.js +1 -1
- package/tag/Tag.d.ts +40 -0
- package/tag/Tag.vue +7 -4
- package/tag/tag.cjs.js +14 -12
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.esm.js +11 -13
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +15 -14
- package/tag/tag.min.js +1 -1
- package/terminal/Terminal.d.ts +79 -0
- package/terminal/Terminal.vue +12 -10
- package/terminal/terminal.cjs.js +23 -28
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +23 -29
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +24 -30
- package/terminal/terminal.min.js +1 -1
- package/tieredmenu/TieredMenu.d.ts +130 -0
- package/tieredmenu/TieredMenu.vue +4 -1
- package/tieredmenu/TieredMenuSub.vue +39 -11
- package/tieredmenu/tieredmenu.cjs.js +53 -41
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +53 -42
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +54 -43
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/toast/Toast.d.ts +79 -0
- package/toast/Toast.vue +4 -1
- package/toast/ToastMessage.vue +12 -10
- package/toast/toast.cjs.js +31 -31
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +31 -32
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +32 -33
- package/toast/toast.min.js +1 -1
- package/treeselect/TreeSelect.d.ts +1 -2
- package/vetur-attributes.json +160 -0
- package/vetur-tags.json +79 -34
- package/web-types.json +404 -2
package/button/button.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"primevue/icons/spinner";import
|
|
1
|
+
import t from"primevue/basecomponent";import l from"primevue/icons/spinner";import n from"primevue/ripple";import{resolveComponent as e,resolveDirective as o,withDirectives as i,openBlock as s,createElementBlock as a,mergeProps as p,renderSlot as d,normalizeClass as u,createBlock as r,createCommentVNode as b,createElementVNode as c,toDisplayString as g}from"vue";var h={name:"Button",extends:t,props:{label:{type:String,default:null},icon:{type:String,default:null},iconPos:{type:String,default:"left"},iconClass:{type:String,default:null},badge:{type:String,default:null},badgeClass:{type:String,default:null},loading:{type:Boolean,default:!1},loadingIcon:{type:String,default:void 0},link:{type:Boolean,default:!1},severity:{type:String,default:null},raised:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},text:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},size:{type:String,default:null},plain:{type:Boolean,default:!1}},computed:{buttonClass(){return["p-button p-component",{"p-button-icon-only":this.hasIcon&&!this.label,"p-button-vertical":("top"===this.iconPos||"bottom"===this.iconPos)&&this.label,"p-disabled":this.$attrs.disabled||this.loading,"p-button-loading":this.loading,"p-button-loading-label-only":this.loading&&!this.hasIcon&&this.label,"p-button-link":this.link,[`p-button-${this.severity}`]:this.severity,"p-button-raised":this.raised,"p-button-rounded":this.rounded,"p-button-text":this.text,"p-button-outlined":this.outlined,"p-button-sm":"small"===this.size,"p-button-lg":"large"===this.size,"p-button-plain":this.plain}]},iconStyleClass(){return["p-button-icon",this.iconClass,{"p-button-icon-left":"left"===this.iconPos&&this.label,"p-button-icon-right":"right"===this.iconPos&&this.label,"p-button-icon-top":"top"===this.iconPos&&this.label,"p-button-icon-bottom":"bottom"===this.iconPos&&this.label}]},loadingIconStyleClass(){return["p-button-loading-icon pi-spin",this.iconStyleClass]},badgeStyleClass(){return["p-badge p-component",this.badgeClass,{"p-badge-no-gutter":this.badge&&1===String(this.badge).length}]},disabled(){return this.$attrs.disabled||this.loading},defaultAriaLabel(){return this.label?this.label+(this.badge?" "+this.badge:""):this.$attrs["aria-label"]},hasIcon(){return this.icon||this.$slots.icon}},components:{SpinnerIcon:l},directives:{ripple:n}};const y=["aria-label","disabled"];h.render=function(t,l,n,h,f,m){const S=e("SpinnerIcon"),C=o("ripple");return i((s(),a("button",p({class:m.buttonClass,type:"button","aria-label":m.defaultAriaLabel,disabled:m.disabled},t.ptm("root")),[d(t.$slots,"default",{},(()=>[n.loading?d(t.$slots,"loadingicon",{key:0,class:u(m.loadingIconStyleClass)},(()=>[n.loadingIcon?(s(),a("span",p({key:0,class:[m.loadingIconStyleClass,n.loadingIcon]},t.ptm("loadingIcon")),null,16)):(s(),r(S,p({key:1,class:m.loadingIconStyleClass,spin:""},t.ptm("loadingIcon")),null,16,["class"]))])):d(t.$slots,"icon",{key:1,class:u(m.iconStyleClass)},(()=>[n.icon?(s(),a("span",p({key:0,class:[m.iconStyleClass,n.icon]},t.ptm("icon")),null,16)):b("",!0)])),c("span",p({class:"p-button-label"},t.ptm("label")),g(n.label||" "),17),n.badge?(s(),a("span",p({key:2,class:m.badgeStyleClass},t.ptm("badge")),g(n.badge),17)):b("",!0)]))],16,y)),[[C]])};export{h as default};
|
package/button/button.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
this.primevue = this.primevue || {};
|
|
2
|
-
this.primevue.button = (function (SpinnerIcon, Ripple, vue) {
|
|
2
|
+
this.primevue.button = (function (BaseComponent, SpinnerIcon, Ripple, vue) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
6
6
|
|
|
7
|
+
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
|
7
8
|
var SpinnerIcon__default = /*#__PURE__*/_interopDefaultLegacy(SpinnerIcon);
|
|
8
9
|
var Ripple__default = /*#__PURE__*/_interopDefaultLegacy(Ripple);
|
|
9
10
|
|
|
10
11
|
var script = {
|
|
11
12
|
name: 'Button',
|
|
13
|
+
extends: BaseComponent__default["default"],
|
|
12
14
|
props: {
|
|
13
15
|
label: {
|
|
14
16
|
type: String,
|
|
@@ -140,58 +142,54 @@ this.primevue.button = (function (SpinnerIcon, Ripple, vue) {
|
|
|
140
142
|
};
|
|
141
143
|
|
|
142
144
|
const _hoisted_1 = ["aria-label", "disabled"];
|
|
143
|
-
const _hoisted_2 = { class: "p-button-label" };
|
|
144
145
|
|
|
145
146
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
146
147
|
const _component_SpinnerIcon = vue.resolveComponent("SpinnerIcon");
|
|
147
148
|
const _directive_ripple = vue.resolveDirective("ripple");
|
|
148
149
|
|
|
149
|
-
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
|
|
150
|
-
class:
|
|
150
|
+
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", vue.mergeProps({
|
|
151
|
+
class: $options.buttonClass,
|
|
151
152
|
type: "button",
|
|
152
153
|
"aria-label": $options.defaultAriaLabel,
|
|
153
154
|
disabled: $options.disabled
|
|
154
|
-
}, [
|
|
155
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
:
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
: vue.
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
], 64))
|
|
193
|
-
: vue.createCommentVNode("", true)
|
|
194
|
-
], 10, _hoisted_1)), [
|
|
155
|
+
}, _ctx.ptm('root')), [
|
|
156
|
+
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
157
|
+
($props.loading)
|
|
158
|
+
? vue.renderSlot(_ctx.$slots, "loadingicon", {
|
|
159
|
+
key: 0,
|
|
160
|
+
class: vue.normalizeClass($options.loadingIconStyleClass)
|
|
161
|
+
}, () => [
|
|
162
|
+
($props.loadingIcon)
|
|
163
|
+
? (vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
|
|
164
|
+
key: 0,
|
|
165
|
+
class: [$options.loadingIconStyleClass, $props.loadingIcon]
|
|
166
|
+
}, _ctx.ptm('loadingIcon')), null, 16))
|
|
167
|
+
: (vue.openBlock(), vue.createBlock(_component_SpinnerIcon, vue.mergeProps({
|
|
168
|
+
key: 1,
|
|
169
|
+
class: $options.loadingIconStyleClass,
|
|
170
|
+
spin: ""
|
|
171
|
+
}, _ctx.ptm('loadingIcon')), null, 16, ["class"]))
|
|
172
|
+
])
|
|
173
|
+
: vue.renderSlot(_ctx.$slots, "icon", {
|
|
174
|
+
key: 1,
|
|
175
|
+
class: vue.normalizeClass($options.iconStyleClass)
|
|
176
|
+
}, () => [
|
|
177
|
+
($props.icon)
|
|
178
|
+
? (vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
|
|
179
|
+
key: 0,
|
|
180
|
+
class: [$options.iconStyleClass, $props.icon]
|
|
181
|
+
}, _ctx.ptm('icon')), null, 16))
|
|
182
|
+
: vue.createCommentVNode("", true)
|
|
183
|
+
]),
|
|
184
|
+
vue.createElementVNode("span", vue.mergeProps({ class: "p-button-label" }, _ctx.ptm('label')), vue.toDisplayString($props.label || ' '), 17),
|
|
185
|
+
($props.badge)
|
|
186
|
+
? (vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
|
|
187
|
+
key: 2,
|
|
188
|
+
class: $options.badgeStyleClass
|
|
189
|
+
}, _ctx.ptm('badge')), vue.toDisplayString($props.badge), 17))
|
|
190
|
+
: vue.createCommentVNode("", true)
|
|
191
|
+
])
|
|
192
|
+
], 16, _hoisted_1)), [
|
|
195
193
|
[_directive_ripple]
|
|
196
194
|
])
|
|
197
195
|
}
|
|
@@ -200,4 +198,4 @@ this.primevue.button = (function (SpinnerIcon, Ripple, vue) {
|
|
|
200
198
|
|
|
201
199
|
return script;
|
|
202
200
|
|
|
203
|
-
})(primevue.icons.spinner, primevue.ripple, Vue);
|
|
201
|
+
})(primevue.basecomponent, primevue.icons.spinner, primevue.ripple, Vue);
|
package/button/button.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.button=function(t,e,l){"use strict";function
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.button=function(t,e,l,n){"use strict";function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var i=o(t),s=o(e),a=o(l),r={name:"Button",extends:i.default,props:{label:{type:String,default:null},icon:{type:String,default:null},iconPos:{type:String,default:"left"},iconClass:{type:String,default:null},badge:{type:String,default:null},badgeClass:{type:String,default:null},loading:{type:Boolean,default:!1},loadingIcon:{type:String,default:void 0},link:{type:Boolean,default:!1},severity:{type:String,default:null},raised:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},text:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},size:{type:String,default:null},plain:{type:Boolean,default:!1}},computed:{buttonClass(){return["p-button p-component",{"p-button-icon-only":this.hasIcon&&!this.label,"p-button-vertical":("top"===this.iconPos||"bottom"===this.iconPos)&&this.label,"p-disabled":this.$attrs.disabled||this.loading,"p-button-loading":this.loading,"p-button-loading-label-only":this.loading&&!this.hasIcon&&this.label,"p-button-link":this.link,[`p-button-${this.severity}`]:this.severity,"p-button-raised":this.raised,"p-button-rounded":this.rounded,"p-button-text":this.text,"p-button-outlined":this.outlined,"p-button-sm":"small"===this.size,"p-button-lg":"large"===this.size,"p-button-plain":this.plain}]},iconStyleClass(){return["p-button-icon",this.iconClass,{"p-button-icon-left":"left"===this.iconPos&&this.label,"p-button-icon-right":"right"===this.iconPos&&this.label,"p-button-icon-top":"top"===this.iconPos&&this.label,"p-button-icon-bottom":"bottom"===this.iconPos&&this.label}]},loadingIconStyleClass(){return["p-button-loading-icon pi-spin",this.iconStyleClass]},badgeStyleClass(){return["p-badge p-component",this.badgeClass,{"p-badge-no-gutter":this.badge&&1===String(this.badge).length}]},disabled(){return this.$attrs.disabled||this.loading},defaultAriaLabel(){return this.label?this.label+(this.badge?" "+this.badge:""):this.$attrs["aria-label"]},hasIcon(){return this.icon||this.$slots.icon}},components:{SpinnerIcon:s.default},directives:{ripple:a.default}};const p=["aria-label","disabled"];return r.render=function(t,e,l,o,i,s){const a=n.resolveComponent("SpinnerIcon"),r=n.resolveDirective("ripple");return n.withDirectives((n.openBlock(),n.createElementBlock("button",n.mergeProps({class:s.buttonClass,type:"button","aria-label":s.defaultAriaLabel,disabled:s.disabled},t.ptm("root")),[n.renderSlot(t.$slots,"default",{},(()=>[l.loading?n.renderSlot(t.$slots,"loadingicon",{key:0,class:n.normalizeClass(s.loadingIconStyleClass)},(()=>[l.loadingIcon?(n.openBlock(),n.createElementBlock("span",n.mergeProps({key:0,class:[s.loadingIconStyleClass,l.loadingIcon]},t.ptm("loadingIcon")),null,16)):(n.openBlock(),n.createBlock(a,n.mergeProps({key:1,class:s.loadingIconStyleClass,spin:""},t.ptm("loadingIcon")),null,16,["class"]))])):n.renderSlot(t.$slots,"icon",{key:1,class:n.normalizeClass(s.iconStyleClass)},(()=>[l.icon?(n.openBlock(),n.createElementBlock("span",n.mergeProps({key:0,class:[s.iconStyleClass,l.icon]},t.ptm("icon")),null,16)):n.createCommentVNode("",!0)])),n.createElementVNode("span",n.mergeProps({class:"p-button-label"},t.ptm("label")),n.toDisplayString(l.label||" "),17),l.badge?(n.openBlock(),n.createElementBlock("span",n.mergeProps({key:2,class:s.badgeStyleClass},t.ptm("badge")),n.toDisplayString(l.badge),17)):n.createCommentVNode("",!0)]))],16,p)),[[r]])},r}(primevue.basecomponent,primevue.icons.spinner,primevue.ripple,Vue);
|
package/chart/Chart.d.ts
CHANGED
|
@@ -10,6 +10,37 @@
|
|
|
10
10
|
import { CanvasHTMLAttributes } from 'vue';
|
|
11
11
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
12
12
|
|
|
13
|
+
export declare type ChartPassThroughOptionType = ChartPassThroughAttributes | ((options: ChartPassThroughMethodOptions) => ChartPassThroughAttributes) | null | undefined;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Custom passthrough(pt) option method.
|
|
17
|
+
*/
|
|
18
|
+
export interface ChartPassThroughMethodOptions {
|
|
19
|
+
props: ChartProps;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Custom passthrough(pt) options.
|
|
24
|
+
* @see {@link ChartProps.pt}
|
|
25
|
+
*/
|
|
26
|
+
export interface ChartPassThroughOptions {
|
|
27
|
+
/**
|
|
28
|
+
* Uses to pass attributes to the root's DOM element.
|
|
29
|
+
*/
|
|
30
|
+
root?: ChartPassThroughOptionType;
|
|
31
|
+
/**
|
|
32
|
+
* Uses to pass attributes to the canvas's DOM element.
|
|
33
|
+
*/
|
|
34
|
+
canvas?: ChartPassThroughOptionType;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Custom passthrough attributes for each DOM elements
|
|
39
|
+
*/
|
|
40
|
+
export interface ChartPassThroughAttributes {
|
|
41
|
+
[key: string]: any;
|
|
42
|
+
}
|
|
43
|
+
|
|
13
44
|
/**
|
|
14
45
|
* Custom select event.
|
|
15
46
|
* @see {@link ChartEmits.select}
|
|
@@ -63,6 +94,11 @@ export interface ChartProps {
|
|
|
63
94
|
* Uses to pass all properties of the CanvasHTMLAttributes to canvas element inside the component.
|
|
64
95
|
*/
|
|
65
96
|
canvasProps?: CanvasHTMLAttributes | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* Uses to pass attributes to DOM elements inside the component.
|
|
99
|
+
* @type {ChartPassThroughOptions}
|
|
100
|
+
*/
|
|
101
|
+
pt?: ChartPassThroughOptions;
|
|
66
102
|
}
|
|
67
103
|
|
|
68
104
|
export interface ChartSlots {}
|
package/chart/Chart.vue
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="p-chart">
|
|
3
|
-
<canvas ref="canvas" :width="width" :height="height" @click="onCanvasClick($event)" v-bind="canvasProps"></canvas>
|
|
2
|
+
<div class="p-chart" v-bind="ptm('root')">
|
|
3
|
+
<canvas ref="canvas" :width="width" :height="height" @click="onCanvasClick($event)" v-bind="{ ...canvasProps, ...ptm('canvas') }"></canvas>
|
|
4
4
|
</div>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script>
|
|
8
|
+
import BaseComponent from 'primevue/basecomponent';
|
|
9
|
+
|
|
8
10
|
export default {
|
|
9
11
|
name: 'Chart',
|
|
12
|
+
extends: BaseComponent,
|
|
10
13
|
emits: ['select', 'loaded'],
|
|
11
14
|
props: {
|
|
12
15
|
type: String,
|
package/chart/chart.cjs.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var BaseComponent = require('primevue/basecomponent');
|
|
3
4
|
var vue = require('vue');
|
|
4
5
|
|
|
6
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
7
|
+
|
|
5
8
|
function _interopNamespace(e) {
|
|
6
9
|
if (e && e.__esModule) return e;
|
|
7
10
|
var n = Object.create(null);
|
|
@@ -20,8 +23,11 @@ function _interopNamespace(e) {
|
|
|
20
23
|
return Object.freeze(n);
|
|
21
24
|
}
|
|
22
25
|
|
|
26
|
+
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
|
27
|
+
|
|
23
28
|
var script = {
|
|
24
29
|
name: 'Chart',
|
|
30
|
+
extends: BaseComponent__default["default"],
|
|
25
31
|
emits: ['select', 'loaded'],
|
|
26
32
|
props: {
|
|
27
33
|
type: String,
|
|
@@ -124,18 +130,17 @@ var script = {
|
|
|
124
130
|
}
|
|
125
131
|
};
|
|
126
132
|
|
|
127
|
-
const _hoisted_1 =
|
|
128
|
-
const _hoisted_2 = ["width", "height"];
|
|
133
|
+
const _hoisted_1 = ["width", "height"];
|
|
129
134
|
|
|
130
135
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
131
|
-
return (vue.openBlock(), vue.createElementBlock("div",
|
|
136
|
+
return (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({ class: "p-chart" }, _ctx.ptm('root')), [
|
|
132
137
|
vue.createElementVNode("canvas", vue.mergeProps({
|
|
133
138
|
ref: "canvas",
|
|
134
139
|
width: $props.width,
|
|
135
140
|
height: $props.height,
|
|
136
141
|
onClick: _cache[0] || (_cache[0] = $event => ($options.onCanvasClick($event)))
|
|
137
|
-
},
|
|
138
|
-
]))
|
|
142
|
+
}, { ...$props.canvasProps, ..._ctx.ptm('canvas') }), null, 16, _hoisted_1)
|
|
143
|
+
], 16))
|
|
139
144
|
}
|
|
140
145
|
|
|
141
146
|
function styleInject(css, ref) {
|
package/chart/chart.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var t=require("vue");function
|
|
1
|
+
"use strict";var t=require("primevue/basecomponent"),e=require("vue");function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function n(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}})),e.default=t,Object.freeze(e)}var a={name:"Chart",extends:r(t).default,emits:["select","loaded"],props:{type:String,data:null,options:null,plugins:null,width:{type:Number,default:300},height:{type:Number,default:150},canvasProps:{type:null,default:null}},chart:null,watch:{data:{handler(){this.reinit()},deep:!0},type(){this.reinit()},options(){this.reinit()}},mounted(){this.initChart()},beforeUnmount(){this.chart&&(this.chart.destroy(),this.chart=null)},methods:{initChart(){Promise.resolve().then((function(){return n(require("chart.js/auto"))})).then((t=>{this.chart&&(this.chart.destroy(),this.chart=null),t&&t.default&&(this.chart=new t.default(this.$refs.canvas,{type:this.type,data:this.data,options:this.options,plugins:this.plugins})),this.$emit("loaded",this.chart)}))},getCanvas(){return this.$canvas},getChart(){return this.chart},getBase64Image(){return this.chart.toBase64Image()},refresh(){this.chart&&this.chart.update()},reinit(){this.initChart()},onCanvasClick(t){if(this.chart){const e=this.chart.getElementsAtEventForMode(t,"nearest",{intersect:!0},!1),r=this.chart.getElementsAtEventForMode(t,"dataset",{intersect:!0},!1);e&&e[0]&&r&&this.$emit("select",{originalEvent:t,element:e[0],dataset:r})}},generateLegend(){if(this.chart)return this.chart.generateLegend()}}};const i=["width","height"];!function(t,e){void 0===e&&(e={});var r=e.insertAt;if(t&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===r&&n.firstChild?n.insertBefore(a,n.firstChild):n.appendChild(a),a.styleSheet?a.styleSheet.cssText=t:a.appendChild(document.createTextNode(t))}}("\n.p-chart {\n position: relative;\n}\n"),a.render=function(t,r,n,a,s,h){return e.openBlock(),e.createElementBlock("div",e.mergeProps({class:"p-chart"},t.ptm("root")),[e.createElementVNode("canvas",e.mergeProps({ref:"canvas",width:n.width,height:n.height,onClick:r[0]||(r[0]=t=>h.onCanvasClick(t))},{...n.canvasProps,...t.ptm("canvas")}),null,16,i)],16)},module.exports=a;
|
package/chart/chart.esm.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import BaseComponent from 'primevue/basecomponent';
|
|
2
|
+
import { openBlock, createElementBlock, mergeProps, createElementVNode } from 'vue';
|
|
2
3
|
|
|
3
4
|
var script = {
|
|
4
5
|
name: 'Chart',
|
|
6
|
+
extends: BaseComponent,
|
|
5
7
|
emits: ['select', 'loaded'],
|
|
6
8
|
props: {
|
|
7
9
|
type: String,
|
|
@@ -104,18 +106,17 @@ var script = {
|
|
|
104
106
|
}
|
|
105
107
|
};
|
|
106
108
|
|
|
107
|
-
const _hoisted_1 =
|
|
108
|
-
const _hoisted_2 = ["width", "height"];
|
|
109
|
+
const _hoisted_1 = ["width", "height"];
|
|
109
110
|
|
|
110
111
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
111
|
-
return (openBlock(), createElementBlock("div",
|
|
112
|
+
return (openBlock(), createElementBlock("div", mergeProps({ class: "p-chart" }, _ctx.ptm('root')), [
|
|
112
113
|
createElementVNode("canvas", mergeProps({
|
|
113
114
|
ref: "canvas",
|
|
114
115
|
width: $props.width,
|
|
115
116
|
height: $props.height,
|
|
116
117
|
onClick: _cache[0] || (_cache[0] = $event => ($options.onCanvasClick($event)))
|
|
117
|
-
},
|
|
118
|
-
]))
|
|
118
|
+
}, { ...$props.canvasProps, ..._ctx.ptm('canvas') }), null, 16, _hoisted_1)
|
|
119
|
+
], 16))
|
|
119
120
|
}
|
|
120
121
|
|
|
121
122
|
function styleInject(css, ref) {
|
package/chart/chart.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{openBlock as
|
|
1
|
+
import t from"primevue/basecomponent";import{openBlock as e,createElementBlock as a,mergeProps as i,createElementVNode as n}from"vue";var s={name:"Chart",extends:t,emits:["select","loaded"],props:{type:String,data:null,options:null,plugins:null,width:{type:Number,default:300},height:{type:Number,default:150},canvasProps:{type:null,default:null}},chart:null,watch:{data:{handler(){this.reinit()},deep:!0},type(){this.reinit()},options(){this.reinit()}},mounted(){this.initChart()},beforeUnmount(){this.chart&&(this.chart.destroy(),this.chart=null)},methods:{initChart(){import("chart.js/auto").then((t=>{this.chart&&(this.chart.destroy(),this.chart=null),t&&t.default&&(this.chart=new t.default(this.$refs.canvas,{type:this.type,data:this.data,options:this.options,plugins:this.plugins})),this.$emit("loaded",this.chart)}))},getCanvas(){return this.$canvas},getChart(){return this.chart},getBase64Image(){return this.chart.toBase64Image()},refresh(){this.chart&&this.chart.update()},reinit(){this.initChart()},onCanvasClick(t){if(this.chart){const e=this.chart.getElementsAtEventForMode(t,"nearest",{intersect:!0},!1),a=this.chart.getElementsAtEventForMode(t,"dataset",{intersect:!0},!1);e&&e[0]&&a&&this.$emit("select",{originalEvent:t,element:e[0],dataset:a})}},generateLegend(){if(this.chart)return this.chart.generateLegend()}}};const r=["width","height"];!function(t,e){void 0===e&&(e={});var a=e.insertAt;if(t&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===a&&i.firstChild?i.insertBefore(n,i.firstChild):i.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}}("\n.p-chart {\n position: relative;\n}\n"),s.render=function(t,s,h,o,c,d){return e(),a("div",i({class:"p-chart"},t.ptm("root")),[n("canvas",i({ref:"canvas",width:h.width,height:h.height,onClick:s[0]||(s[0]=t=>d.onCanvasClick(t))},{...h.canvasProps,...t.ptm("canvas")}),null,16,r)],16)};export{s as default};
|
package/chart/chart.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
this.primevue = this.primevue || {};
|
|
2
|
-
this.primevue.chart = (function (vue) {
|
|
2
|
+
this.primevue.chart = (function (BaseComponent, vue) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
6
|
+
|
|
7
|
+
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
|
8
|
+
|
|
5
9
|
var script = {
|
|
6
10
|
name: 'Chart',
|
|
11
|
+
extends: BaseComponent__default["default"],
|
|
7
12
|
emits: ['select', 'loaded'],
|
|
8
13
|
props: {
|
|
9
14
|
type: String,
|
|
@@ -106,18 +111,17 @@ this.primevue.chart = (function (vue) {
|
|
|
106
111
|
}
|
|
107
112
|
};
|
|
108
113
|
|
|
109
|
-
const _hoisted_1 =
|
|
110
|
-
const _hoisted_2 = ["width", "height"];
|
|
114
|
+
const _hoisted_1 = ["width", "height"];
|
|
111
115
|
|
|
112
116
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
113
|
-
return (vue.openBlock(), vue.createElementBlock("div",
|
|
117
|
+
return (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({ class: "p-chart" }, _ctx.ptm('root')), [
|
|
114
118
|
vue.createElementVNode("canvas", vue.mergeProps({
|
|
115
119
|
ref: "canvas",
|
|
116
120
|
width: $props.width,
|
|
117
121
|
height: $props.height,
|
|
118
122
|
onClick: _cache[0] || (_cache[0] = $event => ($options.onCanvasClick($event)))
|
|
119
|
-
},
|
|
120
|
-
]))
|
|
123
|
+
}, { ...$props.canvasProps, ..._ctx.ptm('canvas') }), null, 16, _hoisted_1)
|
|
124
|
+
], 16))
|
|
121
125
|
}
|
|
122
126
|
|
|
123
127
|
function styleInject(css, ref) {
|
|
@@ -154,4 +158,4 @@ this.primevue.chart = (function (vue) {
|
|
|
154
158
|
|
|
155
159
|
return script;
|
|
156
160
|
|
|
157
|
-
})(Vue);
|
|
161
|
+
})(primevue.basecomponent, Vue);
|
package/chart/chart.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.chart=function(t){"use strict";var
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.chart=function(t,e){"use strict";function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n={name:"Chart",extends:i(t).default,emits:["select","loaded"],props:{type:String,data:null,options:null,plugins:null,width:{type:Number,default:300},height:{type:Number,default:150},canvasProps:{type:null,default:null}},chart:null,watch:{data:{handler(){this.reinit()},deep:!0},type(){this.reinit()},options(){this.reinit()}},mounted(){this.initChart()},beforeUnmount(){this.chart&&(this.chart.destroy(),this.chart=null)},methods:{initChart(){import("chart.js/auto").then((t=>{this.chart&&(this.chart.destroy(),this.chart=null),t&&t.default&&(this.chart=new t.default(this.$refs.canvas,{type:this.type,data:this.data,options:this.options,plugins:this.plugins})),this.$emit("loaded",this.chart)}))},getCanvas(){return this.$canvas},getChart(){return this.chart},getBase64Image(){return this.chart.toBase64Image()},refresh(){this.chart&&this.chart.update()},reinit(){this.initChart()},onCanvasClick(t){if(this.chart){const e=this.chart.getElementsAtEventForMode(t,"nearest",{intersect:!0},!1),i=this.chart.getElementsAtEventForMode(t,"dataset",{intersect:!0},!1);e&&e[0]&&i&&this.$emit("select",{originalEvent:t,element:e[0],dataset:i})}},generateLegend(){if(this.chart)return this.chart.generateLegend()}}};const a=["width","height"];return function(t,e){void 0===e&&(e={});var i=e.insertAt;if(t&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===i&&n.firstChild?n.insertBefore(a,n.firstChild):n.appendChild(a),a.styleSheet?a.styleSheet.cssText=t:a.appendChild(document.createTextNode(t))}}("\n.p-chart {\n position: relative;\n}\n"),n.render=function(t,i,n,s,r,h){return e.openBlock(),e.createElementBlock("div",e.mergeProps({class:"p-chart"},t.ptm("root")),[e.createElementVNode("canvas",e.mergeProps({ref:"canvas",width:n.width,height:n.height,onClick:i[0]||(i[0]=t=>h.onCanvasClick(t))},{...n.canvasProps,...t.ptm("canvas")}),null,16,a)],16)},n}(primevue.basecomponent,Vue);
|
package/chip/Chip.d.ts
CHANGED
|
@@ -10,6 +10,61 @@
|
|
|
10
10
|
import { VNode } from 'vue';
|
|
11
11
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
12
12
|
|
|
13
|
+
export declare type ChipPassThroughOptionType = ChipPassThroughAttributes | ((options: ChipPassThroughMethodOptions) => ChipPassThroughAttributes) | null | undefined;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Custom passthrough(pt) option method.
|
|
17
|
+
*/
|
|
18
|
+
export interface ChipPassThroughMethodOptions {
|
|
19
|
+
props: ChipProps;
|
|
20
|
+
state: ChipState;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Custom passthrough(pt) options.
|
|
25
|
+
* @see {@link ChipProps.pt}
|
|
26
|
+
*/
|
|
27
|
+
export interface ChipPassThroughOptions {
|
|
28
|
+
/**
|
|
29
|
+
* Uses to pass attributes to the root's DOM element.
|
|
30
|
+
*/
|
|
31
|
+
root?: ChipPassThroughOptionType;
|
|
32
|
+
/**
|
|
33
|
+
* Uses to pass attributes to the image's DOM element.
|
|
34
|
+
*/
|
|
35
|
+
image?: ChipPassThroughOptionType;
|
|
36
|
+
/**
|
|
37
|
+
* Uses to pass attributes to the icon's DOM element.
|
|
38
|
+
*/
|
|
39
|
+
icon?: ChipPassThroughOptionType;
|
|
40
|
+
/**
|
|
41
|
+
* Uses to pass attributes to the label' DOM element.
|
|
42
|
+
*/
|
|
43
|
+
label?: ChipPassThroughOptionType;
|
|
44
|
+
/**
|
|
45
|
+
* Uses to pass attributes to the removeIcon's DOM element.
|
|
46
|
+
*/
|
|
47
|
+
removeIcon?: ChipPassThroughOptionType;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Custom passthrough attributes for each DOM elements
|
|
52
|
+
*/
|
|
53
|
+
export interface ChipPassThroughAttributes {
|
|
54
|
+
[key: string]: any;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Defines current inline state in Chip component.
|
|
59
|
+
*/
|
|
60
|
+
export interface ChipState {
|
|
61
|
+
/**
|
|
62
|
+
* Current visible state as a boolean.
|
|
63
|
+
* @defaultValue true
|
|
64
|
+
*/
|
|
65
|
+
visible: boolean;
|
|
66
|
+
}
|
|
67
|
+
|
|
13
68
|
/**
|
|
14
69
|
* Defines valid properties in Chip component.
|
|
15
70
|
*/
|
|
@@ -37,6 +92,11 @@ export interface ChipProps {
|
|
|
37
92
|
* @deprecated since v3.27.0. Use 'removeicon' slot.
|
|
38
93
|
*/
|
|
39
94
|
removeIcon?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Uses to pass attributes to DOM elements inside the component.
|
|
97
|
+
* @type {ChipPassThroughOptions}
|
|
98
|
+
*/
|
|
99
|
+
pt?: ChipPassThroughOptions;
|
|
40
100
|
}
|
|
41
101
|
|
|
42
102
|
/**
|
package/chip/Chip.vue
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div v-if="visible" :class="containerClass" :aria-label="label">
|
|
3
|
-
<slot
|
|
4
|
-
|
|
5
|
-
<
|
|
6
|
-
<
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
</template>
|
|
2
|
+
<div v-if="visible" :class="containerClass" :aria-label="label" v-bind="ptm('root')">
|
|
3
|
+
<slot>
|
|
4
|
+
<img v-if="image" :src="image" v-bind="ptm('image')" />
|
|
5
|
+
<component v-else-if="$slots.icon" :is="$slots.icon" class="p-chip-icon" v-bind="ptm('icon')" />
|
|
6
|
+
<span v-else-if="icon" :class="['p-chip-icon', icon]" v-bind="ptm('icon')" />
|
|
7
|
+
<div v-if="label" class="p-chip-text" v-bind="ptm('label')">{{ label }}</div>
|
|
8
|
+
</slot>
|
|
10
9
|
<slot v-if="removable" name="removeicon" :onClick="close" :onKeydown="onKeydown">
|
|
11
|
-
<component :is="removeIcon ? 'span' : 'TimesCircleIcon'" tabindex="0" :class="['p-chip-remove-icon', removeIcon]" @click="close" @keydown="onKeydown"></component>
|
|
10
|
+
<component :is="removeIcon ? 'span' : 'TimesCircleIcon'" tabindex="0" :class="['p-chip-remove-icon', removeIcon]" @click="close" @keydown="onKeydown" v-bind="ptm('removeIcon')"></component>
|
|
12
11
|
</slot>
|
|
13
12
|
</div>
|
|
14
13
|
</template>
|
|
15
14
|
|
|
16
15
|
<script>
|
|
16
|
+
import BaseComponent from 'primevue/basecomponent';
|
|
17
17
|
import TimesCircleIcon from 'primevue/icons/timescircle';
|
|
18
18
|
|
|
19
19
|
export default {
|
|
20
20
|
name: 'Chip',
|
|
21
|
+
extends: BaseComponent,
|
|
21
22
|
emits: ['remove'],
|
|
22
23
|
props: {
|
|
23
24
|
label: {
|
package/chip/chip.cjs.js
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var BaseComponent = require('primevue/basecomponent');
|
|
3
4
|
var TimesCircleIcon = require('primevue/icons/timescircle');
|
|
4
5
|
var vue = require('vue');
|
|
5
6
|
|
|
6
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
7
8
|
|
|
9
|
+
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
|
8
10
|
var TimesCircleIcon__default = /*#__PURE__*/_interopDefaultLegacy(TimesCircleIcon);
|
|
9
11
|
|
|
10
12
|
var script = {
|
|
11
13
|
name: 'Chip',
|
|
14
|
+
extends: BaseComponent__default["default"],
|
|
12
15
|
emits: ['remove'],
|
|
13
16
|
props: {
|
|
14
17
|
label: {
|
|
@@ -65,57 +68,53 @@ var script = {
|
|
|
65
68
|
|
|
66
69
|
const _hoisted_1 = ["aria-label"];
|
|
67
70
|
const _hoisted_2 = ["src"];
|
|
68
|
-
const _hoisted_3 = {
|
|
69
|
-
key: 3,
|
|
70
|
-
class: "p-chip-text"
|
|
71
|
-
};
|
|
72
71
|
|
|
73
72
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
74
73
|
return ($data.visible)
|
|
75
|
-
? (vue.openBlock(), vue.createElementBlock("div", {
|
|
74
|
+
? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
76
75
|
key: 0,
|
|
77
|
-
class:
|
|
76
|
+
class: $options.containerClass,
|
|
78
77
|
"aria-label": $props.label
|
|
79
|
-
}, [
|
|
80
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
78
|
+
}, _ctx.ptm('root')), [
|
|
79
|
+
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
80
|
+
($props.image)
|
|
81
|
+
? (vue.openBlock(), vue.createElementBlock("img", vue.mergeProps({
|
|
82
|
+
key: 0,
|
|
83
|
+
src: $props.image
|
|
84
|
+
}, _ctx.ptm('image')), null, 16, _hoisted_2))
|
|
85
|
+
: (_ctx.$slots.icon)
|
|
86
|
+
? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.$slots.icon), vue.mergeProps({
|
|
87
|
+
key: 1,
|
|
88
|
+
class: "p-chip-icon"
|
|
89
|
+
}, _ctx.ptm('icon')), null, 16))
|
|
90
|
+
: ($props.icon)
|
|
91
|
+
? (vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
|
|
92
|
+
key: 2,
|
|
93
|
+
class: ['p-chip-icon', $props.icon]
|
|
94
|
+
}, _ctx.ptm('icon')), null, 16))
|
|
95
|
+
: vue.createCommentVNode("", true),
|
|
96
|
+
($props.label)
|
|
97
|
+
? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
98
|
+
key: 3,
|
|
99
|
+
class: "p-chip-text"
|
|
100
|
+
}, _ctx.ptm('label')), vue.toDisplayString($props.label), 17))
|
|
101
|
+
: vue.createCommentVNode("", true)
|
|
102
|
+
]),
|
|
104
103
|
($props.removable)
|
|
105
104
|
? vue.renderSlot(_ctx.$slots, "removeicon", {
|
|
106
|
-
key:
|
|
105
|
+
key: 0,
|
|
107
106
|
onClick: $options.close,
|
|
108
107
|
onKeydown: $options.onKeydown
|
|
109
108
|
}, () => [
|
|
110
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.removeIcon ? 'span' : 'TimesCircleIcon'), {
|
|
109
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.removeIcon ? 'span' : 'TimesCircleIcon'), vue.mergeProps({
|
|
111
110
|
tabindex: "0",
|
|
112
|
-
class:
|
|
111
|
+
class: ['p-chip-remove-icon', $props.removeIcon],
|
|
113
112
|
onClick: $options.close,
|
|
114
113
|
onKeydown: $options.onKeydown
|
|
115
|
-
}, null,
|
|
114
|
+
}, _ctx.ptm('removeIcon')), null, 16, ["class", "onClick", "onKeydown"]))
|
|
116
115
|
])
|
|
117
116
|
: vue.createCommentVNode("", true)
|
|
118
|
-
],
|
|
117
|
+
], 16, _hoisted_1))
|
|
119
118
|
: vue.createCommentVNode("", true)
|
|
120
119
|
}
|
|
121
120
|
|