primevue 3.40.0 → 3.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -20
- package/autocomplete/AutoComplete.vue +1 -1
- package/autocomplete/autocomplete.cjs.js +1 -1
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +1 -1
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +1 -1
- package/autocomplete/autocomplete.min.js +1 -1
- package/baseicon/BaseIcon.vue +3 -0
- package/baseicon/baseicon.cjs.js +4 -0
- package/baseicon/baseicon.cjs.min.js +1 -1
- package/baseicon/baseicon.esm.js +3 -0
- package/baseicon/baseicon.esm.min.js +1 -1
- package/baseicon/baseicon.js +5 -2
- package/baseicon/baseicon.min.js +1 -1
- package/breadcrumb/BreadcrumbItem.vue +1 -1
- package/breadcrumb/breadcrumb.cjs.js +1 -1
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +1 -1
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +1 -1
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/calendar/BaseCalendar.vue +4 -0
- package/calendar/Calendar.d.ts +6 -1
- package/calendar/Calendar.vue +9 -1
- package/calendar/calendar.cjs.js +54 -43
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +54 -43
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +54 -43
- package/calendar/calendar.min.js +1 -1
- package/calendar/style/calendarstyle.cjs.js +1 -0
- package/calendar/style/calendarstyle.cjs.min.js +1 -1
- package/calendar/style/calendarstyle.esm.js +1 -0
- package/calendar/style/calendarstyle.esm.min.js +1 -1
- package/calendar/style/calendarstyle.js +1 -0
- package/calendar/style/calendarstyle.min.js +1 -1
- package/confirmationoptions/ConfirmationOptions.d.ts +5 -1
- package/confirmdialog/ConfirmDialog.d.ts +2 -2
- package/core/core.js +65 -50
- package/core/core.min.js +17 -17
- package/datatable/DataTable.vue +3 -2
- package/datatable/datatable.cjs.js +3 -2
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +3 -2
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +3 -2
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.d.ts +9 -19
- package/dataview/DataView.vue +11 -10
- package/dataview/dataview.cjs.js +18 -18
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +19 -19
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +18 -18
- package/dataview/dataview.min.js +1 -1
- package/dataview/style/dataviewstyle.cjs.js +0 -2
- package/dataview/style/dataviewstyle.cjs.min.js +1 -1
- package/dataview/style/dataviewstyle.esm.js +0 -2
- package/dataview/style/dataviewstyle.esm.min.js +1 -1
- package/dataview/style/dataviewstyle.js +0 -2
- package/dataview/style/dataviewstyle.min.js +1 -1
- package/dialog/Dialog.d.ts +2 -2
- package/dialog/Dialog.vue +4 -4
- package/dialog/dialog.cjs.js +6 -6
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +6 -6
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +6 -6
- package/dialog/dialog.min.js +1 -1
- package/dialog/style/dialogstyle.cjs.js +2 -2
- package/dialog/style/dialogstyle.cjs.min.js +1 -1
- package/dialog/style/dialogstyle.esm.js +2 -2
- package/dialog/style/dialogstyle.esm.min.js +1 -1
- package/dialog/style/dialogstyle.js +2 -2
- package/dialog/style/dialogstyle.min.js +1 -1
- package/dock/BaseDock.vue +4 -0
- package/dock/Dock.d.ts +5 -0
- package/dock/Dock.vue +14 -0
- package/dock/dock.cjs.js +17 -0
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +17 -0
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +17 -0
- package/dock/dock.min.js +1 -1
- package/dock/style/dockstyle.cjs.js +5 -2
- package/dock/style/dockstyle.cjs.min.js +1 -1
- package/dock/style/dockstyle.esm.js +5 -2
- package/dock/style/dockstyle.esm.min.js +1 -1
- package/dock/style/dockstyle.js +5 -2
- package/dock/style/dockstyle.min.js +1 -1
- package/fileupload/FileContent.vue +1 -1
- package/fileupload/FileUpload.vue +1 -1
- package/fileupload/fileupload.cjs.js +2 -2
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +2 -2
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +2 -2
- package/fileupload/fileupload.min.js +1 -1
- package/focustrap/focustrap.cjs.js +1 -1
- package/focustrap/focustrap.cjs.min.js +1 -1
- package/focustrap/focustrap.esm.js +1 -1
- package/focustrap/focustrap.esm.min.js +1 -1
- package/focustrap/focustrap.js +1 -1
- package/focustrap/focustrap.min.js +1 -1
- package/inputgroupaddon/package.json +1 -1
- package/inputnumber/style/inputnumberstyle.cjs.js +1 -1
- package/inputnumber/style/inputnumberstyle.cjs.min.js +1 -1
- package/inputnumber/style/inputnumberstyle.esm.js +1 -1
- package/inputnumber/style/inputnumberstyle.esm.min.js +1 -1
- package/inputnumber/style/inputnumberstyle.js +1 -1
- package/inputnumber/style/inputnumberstyle.min.js +1 -1
- package/megamenu/BaseMegaMenu.vue +4 -0
- package/megamenu/MegaMenu.d.ts +9 -0
- package/megamenu/MegaMenu.vue +74 -6
- package/megamenu/MegaMenuSub.vue +6 -1
- package/megamenu/megamenu.cjs.js +118 -35
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +119 -37
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +119 -37
- package/megamenu/megamenu.min.js +1 -1
- package/megamenu/style/megamenustyle.cjs.js +22 -17
- package/megamenu/style/megamenustyle.cjs.min.js +1 -1
- package/megamenu/style/megamenustyle.esm.js +22 -17
- package/megamenu/style/megamenustyle.esm.min.js +1 -1
- package/megamenu/style/megamenustyle.js +22 -17
- package/megamenu/style/megamenustyle.min.js +1 -1
- package/menu/Menu.d.ts +1 -1
- package/menu/Menuitem.vue +0 -1
- package/menubar/BaseMenubar.vue +4 -0
- package/menubar/Menubar.d.ts +5 -0
- package/menubar/Menubar.vue +10 -1
- package/menubar/menubar.cjs.js +48 -36
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +48 -36
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +48 -36
- package/menubar/menubar.min.js +1 -1
- package/menubar/style/menubarstyle.cjs.js +2 -1
- package/menubar/style/menubarstyle.cjs.min.js +1 -1
- package/menubar/style/menubarstyle.esm.js +2 -1
- package/menubar/style/menubarstyle.esm.min.js +1 -1
- package/menubar/style/menubarstyle.js +2 -1
- package/menubar/style/menubarstyle.min.js +1 -1
- package/orderlist/OrderList.vue +18 -2
- package/orderlist/orderlist.cjs.js +16 -2
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +16 -2
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +16 -2
- package/orderlist/orderlist.min.js +1 -1
- package/overlaypanel/OverlayPanel.d.ts +14 -14
- package/package.json +1 -1
- package/paginator/Paginator.vue +21 -13
- package/paginator/paginator.cjs.js +9 -2
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +9 -2
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +9 -2
- package/paginator/paginator.min.js +1 -1
- package/panelmenu/BasePanelMenu.vue +4 -0
- package/panelmenu/PanelMenu.d.ts +5 -0
- package/panelmenu/PanelMenu.vue +13 -2
- package/panelmenu/panelmenu.cjs.js +21 -2
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +21 -2
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +21 -2
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/tailwind/index.cjs.js +4 -4
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +4 -4
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +4 -4
- package/passthrough/tailwind/index.min.js +1 -1
- package/picklist/PickList.vue +16 -2
- package/picklist/picklist.cjs.js +15 -2
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +15 -2
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +15 -2
- package/picklist/picklist.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +133 -117
- package/resources/themes/arya-green/theme.css +133 -117
- package/resources/themes/arya-orange/theme.css +133 -117
- package/resources/themes/arya-purple/theme.css +133 -117
- package/resources/themes/bootstrap4-dark-blue/theme.css +133 -117
- package/resources/themes/bootstrap4-dark-purple/theme.css +133 -117
- package/resources/themes/bootstrap4-light-blue/theme.css +133 -117
- package/resources/themes/bootstrap4-light-purple/theme.css +133 -117
- package/resources/themes/fluent-light/theme.css +133 -117
- package/resources/themes/lara-dark-amber/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-dark-amber/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-dark-amber/theme.css +5757 -0
- package/resources/themes/lara-dark-blue/theme.css +337 -321
- package/resources/themes/lara-dark-cyan/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-dark-cyan/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-dark-cyan/theme.css +5757 -0
- package/resources/themes/lara-dark-green/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-dark-green/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-dark-green/theme.css +5757 -0
- package/resources/themes/lara-dark-indigo/theme.css +337 -321
- package/resources/themes/lara-dark-pink/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-dark-pink/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-dark-pink/theme.css +5757 -0
- package/resources/themes/lara-dark-purple/theme.css +337 -321
- package/resources/themes/lara-dark-teal/theme.css +577 -561
- package/resources/themes/lara-light-amber/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-light-amber/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-light-amber/theme.css +5749 -0
- package/resources/themes/lara-light-blue/theme.css +192 -176
- package/resources/themes/lara-light-cyan/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-light-cyan/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-light-cyan/theme.css +5749 -0
- package/resources/themes/lara-light-green/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-light-green/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-light-green/theme.css +5749 -0
- package/resources/themes/lara-light-indigo/theme.css +192 -176
- package/resources/themes/lara-light-pink/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-light-pink/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-light-pink/theme.css +5749 -0
- package/resources/themes/lara-light-purple/theme.css +192 -176
- package/resources/themes/lara-light-teal/theme.css +483 -467
- package/resources/themes/luna-amber/theme.css +133 -117
- package/resources/themes/luna-blue/theme.css +133 -117
- package/resources/themes/luna-green/theme.css +133 -117
- package/resources/themes/luna-pink/theme.css +133 -117
- package/resources/themes/md-dark-deeppurple/theme.css +133 -117
- package/resources/themes/md-dark-indigo/theme.css +133 -117
- package/resources/themes/md-light-deeppurple/theme.css +133 -117
- package/resources/themes/md-light-indigo/theme.css +133 -117
- package/resources/themes/mdc-dark-deeppurple/theme.css +133 -117
- package/resources/themes/mdc-dark-indigo/theme.css +133 -117
- package/resources/themes/mdc-light-deeppurple/theme.css +133 -117
- package/resources/themes/mdc-light-indigo/theme.css +133 -117
- package/resources/themes/mira/theme.css +133 -117
- package/resources/themes/nano/theme.css +133 -117
- package/resources/themes/nova/theme.css +133 -117
- package/resources/themes/nova-accent/theme.css +133 -117
- package/resources/themes/nova-alt/theme.css +133 -117
- package/resources/themes/nova-vue/theme.css +133 -117
- package/resources/themes/rhea/theme.css +133 -117
- package/resources/themes/saga-blue/theme.css +133 -117
- package/resources/themes/saga-green/theme.css +133 -117
- package/resources/themes/saga-orange/theme.css +133 -117
- package/resources/themes/saga-purple/theme.css +133 -117
- package/resources/themes/soho-dark/theme.css +133 -117
- package/resources/themes/soho-light/theme.css +133 -117
- package/resources/themes/tailwind-light/theme.css +133 -117
- package/resources/themes/vela-blue/theme.css +133 -117
- package/resources/themes/vela-green/theme.css +133 -117
- package/resources/themes/vela-orange/theme.css +133 -117
- package/resources/themes/vela-purple/theme.css +133 -117
- package/resources/themes/viva-dark/theme.css +133 -117
- package/resources/themes/viva-light/theme.css +133 -117
- package/sidebar/BaseSidebar.vue +4 -0
- package/sidebar/Sidebar.d.ts +12 -2
- package/sidebar/Sidebar.vue +3 -3
- package/sidebar/sidebar.cjs.js +12 -4
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +13 -5
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +12 -4
- package/sidebar/sidebar.min.js +1 -1
- package/sidebar/style/sidebarstyle.cjs.js +2 -2
- package/sidebar/style/sidebarstyle.cjs.min.js +1 -1
- package/sidebar/style/sidebarstyle.esm.js +2 -2
- package/sidebar/style/sidebarstyle.esm.min.js +1 -1
- package/sidebar/style/sidebarstyle.js +2 -2
- package/sidebar/style/sidebarstyle.min.js +1 -1
- package/speeddial/style/speeddialstyle.cjs.js +2 -2
- package/speeddial/style/speeddialstyle.cjs.min.js +1 -1
- package/speeddial/style/speeddialstyle.esm.js +2 -2
- package/speeddial/style/speeddialstyle.esm.min.js +1 -1
- package/speeddial/style/speeddialstyle.js +2 -2
- package/speeddial/style/speeddialstyle.min.js +1 -1
- package/splitter/Splitter.vue +3 -1
- package/splitter/splitter.cjs.js +3 -1
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +3 -1
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +3 -1
- package/splitter/splitter.min.js +1 -1
- package/splitterpanel/style/splitterpanelstyle.cjs.js +1 -1
- package/splitterpanel/style/splitterpanelstyle.cjs.min.js +1 -1
- package/splitterpanel/style/splitterpanelstyle.esm.js +1 -1
- package/splitterpanel/style/splitterpanelstyle.esm.min.js +1 -1
- package/splitterpanel/style/splitterpanelstyle.js +1 -1
- package/splitterpanel/style/splitterpanelstyle.min.js +1 -1
- package/tree/TreeNode.vue +1 -1
- package/tree/style/treestyle.cjs.js +1 -4
- package/tree/style/treestyle.cjs.min.js +1 -1
- package/tree/style/treestyle.esm.js +1 -4
- package/tree/style/treestyle.esm.min.js +1 -1
- package/tree/style/treestyle.js +1 -4
- package/tree/style/treestyle.min.js +1 -1
- package/tree/tree.cjs.js +1 -1
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +1 -1
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +1 -1
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.vue +67 -2
- package/treeselect/treeselect.cjs.js +73 -9
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +73 -9
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +73 -9
- package/treeselect/treeselect.min.js +1 -1
- package/web-types.json +1 -1
- /package/dynamicdialog/style/{AccordionStyle.d.ts → DynamicDialogStyle.d.ts} +0 -0
package/dialog/dialog.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"primevue/focustrap";import t from"primevue/icons/times";import n from"primevue/icons/windowmaximize";import i from"primevue/icons/windowminimize";import o from"primevue/portal";import a from"primevue/ripple";import{ZIndexUtils as s,DomHandler as l,UniqueComponentId as r}from"primevue/utils";import{computed as c,resolveComponent as u,resolveDirective as m,openBlock as d,createBlock as f,withCtx as p,createElementBlock as h,mergeProps as b,createVNode as y,Transition as g,withDirectives as v,renderSlot as x,Fragment as L,normalizeClass as w,toDisplayString as z,createCommentVNode as k,createElementVNode as D,resolveDynamicComponent as B,createTextVNode as E}from"vue";import I from"primevue/basecomponent";import S from"primevue/dialog/style";var C={name:"Dialog",extends:{name:"BaseDialog",extends:I,props:{header:{type:null,default:null},footer:{type:null,default:null},visible:{type:Boolean,default:!1},modal:{type:Boolean,default:null},contentStyle:{type:null,default:null},contentClass:{type:String,default:null},contentProps:{type:null,default:null},rtl:{type:Boolean,default:null},maximizable:{type:Boolean,default:!1},dismissableMask:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!1},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0},position:{type:String,default:"center"},breakpoints:{type:Object,default:null},draggable:{type:Boolean,default:!0},keepInViewport:{type:Boolean,default:!0},minX:{type:Number,default:0},minY:{type:Number,default:0},appendTo:{type:String,default:"body"},closeIcon:{type:String,default:void 0},maximizeIcon:{type:String,default:void 0},minimizeIcon:{type:String,default:void 0},closeButtonProps:{type:null,default:null},_instance:null},style:S,provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["update:visible","show","hide","after-hide","maximize","unmaximize","dragend"],provide:function(){var e=this;return{dialogRef:c((function(){return e._instance}))}},data:function(){return{containerVisible:this.visible,maximized:!1,focusableMax:null,focusableClose:null}},documentKeydownListener:null,container:null,mask:null,content:null,headerContainer:null,footerContainer:null,maximizableButton:null,closeButton:null,styleElement:null,dragging:null,documentDragListener:null,documentDragEndListener:null,lastPageX:null,lastPageY:null,updated:function(){this.visible&&(this.containerVisible=this.visible)},beforeUnmount:function(){this.unbindDocumentState(),this.unbindGlobalListeners(),this.destroyStyle(),this.mask&&this.autoZIndex&&s.clear(this.mask),this.container=null,this.mask=null},mounted:function(){this.breakpoints&&this.createStyle()},methods:{close:function(){this.$emit("update:visible",!1)},onBeforeEnter:function(e){e.setAttribute(this.attributeSelector,"")},onEnter:function(){this.$emit("show"),this.focus(),this.enableDocumentSettings(),this.bindGlobalListeners(),this.autoZIndex&&s.set("modal",this.mask,this.baseZIndex+this.$primevue.config.zIndex.modal)},onBeforeLeave:function(){this.modal&&!this.isUnstyled&&l.addClass(this.mask,"p-component-overlay-leave")},onLeave:function(){this.$emit("hide"),this.focusableClose=null,this.focusableMax=null},onAfterLeave:function(){this.autoZIndex&&s.clear(this.mask),this.containerVisible=!1,this.unbindDocumentState(),this.unbindGlobalListeners(),this.$emit("after-hide")},onMaskClick:function(e){this.dismissableMask&&this.modal&&this.mask===e.target&&this.close()},focus:function(){var e=function(e){return e&&e.querySelector("[autofocus]")},t=this.$slots.footer&&e(this.footerContainer);t||(t=this.$slots.header&&e(this.headerContainer))||(t=this.$slots.default&&e(this.content))||(this.maximizable?(this.focusableMax=!0,t=this.maximizableButton):(this.focusableClose=!0,t=this.closeButton)),t&&l.focus(t,{focusVisible:!0})},maximize:function(e){this.maximized?(this.maximized=!1,this.$emit("unmaximize",e)):(this.maximized=!0,this.$emit("maximize",e)),this.modal||(this.maximized?l.blockBodyScroll():l.unblockBodyScroll())},enableDocumentSettings:function(){(this.modal||!this.modal&&this.blockScroll||this.maximizable&&this.maximized)&&l.blockBodyScroll()},unbindDocumentState:function(){(this.modal||!this.modal&&this.blockScroll||this.maximizable&&this.maximized)&&l.unblockBodyScroll()},onKeyDown:function(e){"Escape"===e.code&&this.closeOnEscape&&this.close()},bindDocumentKeyDownListener:function(){this.documentKeydownListener||(this.documentKeydownListener=this.onKeyDown.bind(this),window.document.addEventListener("keydown",this.documentKeydownListener))},unbindDocumentKeyDownListener:function(){this.documentKeydownListener&&(window.document.removeEventListener("keydown",this.documentKeydownListener),this.documentKeydownListener=null)},containerRef:function(e){this.container=e},maskRef:function(e){this.mask=e},contentRef:function(e){this.content=e},headerContainerRef:function(e){this.headerContainer=e},footerContainerRef:function(e){this.footerContainer=e},maximizableRef:function(e){this.maximizableButton=e},closeButtonRef:function(e){this.closeButton=e},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.styleElement=document.createElement("style"),this.styleElement.type="text/css",l.setAttribute(this.styleElement,"nonce",null===(e=this.$primevue)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce),document.head.appendChild(this.styleElement);var t="";for(var n in this.breakpoints)t+="\n @media screen and (max-width: ".concat(n,") {\n .p-dialog[").concat(this.attributeSelector,"] {\n width: ").concat(this.breakpoints[n]," !important;\n }\n }\n ");this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},initDrag:function(e){"headericons"!==e.target.closest("div").getAttribute("data-pc-section")&&this.draggable&&(this.dragging=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.container.style.margin="0",!this.isUnstyled&&l.addClass(document.body,"p-unselectable-text"))},bindGlobalListeners:function(){this.draggable&&(this.bindDocumentDragListener(),this.bindDocumentDragEndListener()),this.closeOnEscape&&this.closable&&this.bindDocumentKeyDownListener()},unbindGlobalListeners:function(){this.unbindDocumentDragListener(),this.unbindDocumentDragEndListener(),this.unbindDocumentKeyDownListener()},bindDocumentDragListener:function(){var e=this;this.documentDragListener=function(t){if(e.dragging){var n=l.getOuterWidth(e.container),i=l.getOuterHeight(e.container),o=t.pageX-e.lastPageX,a=t.pageY-e.lastPageY,s=e.container.getBoundingClientRect(),r=s.left+o,c=s.top+a,u=l.getViewport(),m=getComputedStyle(e.container),d=parseFloat(m.marginLeft),f=parseFloat(m.marginTop);e.container.style.position="fixed",e.keepInViewport?(r>=e.minX&&r+n<u.width&&(e.lastPageX=t.pageX,e.container.style.left=r-d+"px"),c>=e.minY&&c+i<u.height&&(e.lastPageY=t.pageY,e.container.style.top=c-f+"px")):(e.lastPageX=t.pageX,e.container.style.left=r-d+"px",e.lastPageY=t.pageY,e.container.style.top=c-f+"px")}},window.document.addEventListener("mousemove",this.documentDragListener)},unbindDocumentDragListener:function(){this.documentDragListener&&(window.document.removeEventListener("mousemove",this.documentDragListener),this.documentDragListener=null)},bindDocumentDragEndListener:function(){var e=this;this.documentDragEndListener=function(t){e.dragging&&(e.dragging=!1,!e.isUnstyled&&l.removeClass(document.body,"p-unselectable-text"),e.$emit("dragend",t))},window.document.addEventListener("mouseup",this.documentDragEndListener)},unbindDocumentDragEndListener:function(){this.documentDragEndListener&&(window.document.removeEventListener("mouseup",this.documentDragEndListener),this.documentDragEndListener=null)}},computed:{maximizeIconComponent:function(){return this.maximized?this.minimizeIcon?"span":"WindowMinimizeIcon":this.maximizeIcon?"span":"WindowMaximizeIcon"},ariaId:function(){return r()},ariaLabelledById:function(){return null!=this.header||null!==this.$attrs["aria-labelledby"]?this.ariaId+"_header":null},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0},attributeSelector:function(){return r()}},directives:{ripple:a,focustrap:e},components:{Portal:o,WindowMinimizeIcon:i,WindowMaximizeIcon:n,TimesIcon:t}};function P(e){return P="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},P(e)}function $(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 O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach((function(t){M(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function M(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=j(e,"string");return"symbol"===P(t)?t:String(t)}function j(e,t){if("object"!==P(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==P(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var K=["aria-labelledby","aria-modal"],T=["id"],X=["autofocus","tabindex"],Y=["autofocus","aria-label"];C.render=function(e,t,n,i,o,a){var s=u("Portal"),l=m("ripple"),r=m("focustrap");return d(),f(s,{appendTo:e.appendTo},{default:p((function(){return[o.containerVisible?(d(),h("div",b({key:0,ref:a.maskRef,class:e.cx("mask"),style:e.sx("mask",!0,{position:e.position,modal:e.modal}),onClick:t[3]||(t[3]=function(){return a.onMaskClick&&a.onMaskClick.apply(a,arguments)})},e.ptm("mask")),[y(g,b({name:"p-dialog",onBeforeEnter:a.onBeforeEnter,onEnter:a.onEnter,onBeforeLeave:a.onBeforeLeave,onLeave:a.onLeave,onAfterLeave:a.onAfterLeave,appear:""},e.ptm("transition")),{default:p((function(){return[e.visible?v((d(),h("div",b({key:0,ref:a.containerRef,class:e.cx("root"),style:e.sx("root"),role:"dialog","aria-labelledby":a.ariaLabelledById,"aria-modal":e.modal},O(O({},e.$attrs),e.ptm("root"))),[e.$slots.container?x(e.$slots,"container",{key:0,onClose:a.close,onMaximize:function(e){return a.maximize(e)},closeCallback:a.close,maximizeCallback:function(e){return a.maximize(e)}}):(d(),h(L,{key:1},[e.showHeader?(d(),h("div",b({key:0,ref:a.headerContainerRef,class:e.cx("header"),onMousedown:t[2]||(t[2]=function(){return a.initDrag&&a.initDrag.apply(a,arguments)})},e.ptm("header")),[x(e.$slots,"header",{class:w(e.cx("headerTitle"))},(function(){return[e.header?(d(),h("span",b({key:0,id:a.ariaLabelledById,class:e.cx("headerTitle")},e.ptm("headerTitle")),z(e.header),17,T)):k("",!0)]})),D("div",b({class:e.cx("headerIcons")},e.ptm("headerIcons")),[e.maximizable?v((d(),h("button",b({key:0,ref:a.maximizableRef,autofocus:o.focusableMax,class:e.cx("maximizableButton"),onClick:t[0]||(t[0]=function(){return a.maximize&&a.maximize.apply(a,arguments)}),type:"button",tabindex:e.maximizable?"0":"-1"},e.ptm("maximizableButton"),{"data-pc-group-section":"headericon"}),[x(e.$slots,"maximizeicon",{maximized:o.maximized,class:w(e.cx("maximizableIcon"))},(function(){return[(d(),f(B(a.maximizeIconComponent),b({class:[e.cx("maximizableIcon"),o.maximized?e.minimizeIcon:e.maximizeIcon]},e.ptm("maximizableIcon")),null,16,["class"]))]}))],16,X)),[[l]]):k("",!0),e.closable?v((d(),h("button",b({key:1,ref:a.closeButtonRef,autofocus:o.focusableClose,class:e.cx("closeButton"),onClick:t[1]||(t[1]=function(){return a.close&&a.close.apply(a,arguments)}),"aria-label":a.closeAriaLabel,type:"button"},O(O({},e.closeButtonProps),e.ptm("closeButton")),{"data-pc-group-section":"headericon"}),[x(e.$slots,"closeicon",{class:w(e.cx("closeButtonIcon"))},(function(){return[(d(),f(B(e.closeIcon?"span":"TimesIcon"),b({class:[e.cx("closeButtonIcon"),e.closeIcon]},e.ptm("closeButtonIcon")),null,16,["class"]))]}))],16,Y)),[[l]]):k("",!0)],16)],16)):k("",!0),D("div",b({ref:a.contentRef,class:[e.cx("content"),e.contentClass],style:e.contentStyle},O(O({},e.contentProps),e.ptm("content"))),[x(e.$slots,"default")],16),e.footer||e.$slots.footer?(d(),h("div",b({key:1,ref:a.footerContainerRef,class:e.cx("footer")},e.ptm("footer")),[x(e.$slots,"footer",{},(function(){return[E(z(e.footer),1)]}))],16)):k("",!0)],64))],16,K)),[[r,{disabled:!e.modal}]]):k("",!0)]})),_:3},16,["onBeforeEnter","onEnter","onBeforeLeave","onLeave","onAfterLeave"])],16)):k("",!0)]})),_:3},8,["appendTo"])};export{C as default};
|
|
1
|
+
import e from"primevue/focustrap";import t from"primevue/icons/times";import n from"primevue/icons/windowmaximize";import i from"primevue/icons/windowminimize";import o from"primevue/portal";import a from"primevue/ripple";import{ZIndexUtils as s,DomHandler as l,UniqueComponentId as r}from"primevue/utils";import{computed as c,resolveComponent as u,resolveDirective as m,openBlock as d,createBlock as f,withCtx as p,createElementBlock as h,mergeProps as b,createVNode as y,Transition as g,withDirectives as v,renderSlot as x,Fragment as L,normalizeClass as w,toDisplayString as z,createCommentVNode as k,createElementVNode as D,resolveDynamicComponent as B,createTextVNode as E}from"vue";import S from"primevue/basecomponent";import I from"primevue/dialog/style";var C={name:"Dialog",extends:{name:"BaseDialog",extends:S,props:{header:{type:null,default:null},footer:{type:null,default:null},visible:{type:Boolean,default:!1},modal:{type:Boolean,default:null},contentStyle:{type:null,default:null},contentClass:{type:String,default:null},contentProps:{type:null,default:null},rtl:{type:Boolean,default:null},maximizable:{type:Boolean,default:!1},dismissableMask:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!1},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0},position:{type:String,default:"center"},breakpoints:{type:Object,default:null},draggable:{type:Boolean,default:!0},keepInViewport:{type:Boolean,default:!0},minX:{type:Number,default:0},minY:{type:Number,default:0},appendTo:{type:String,default:"body"},closeIcon:{type:String,default:void 0},maximizeIcon:{type:String,default:void 0},minimizeIcon:{type:String,default:void 0},closeButtonProps:{type:null,default:null},_instance:null},style:I,provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["update:visible","show","hide","after-hide","maximize","unmaximize","dragend"],provide:function(){var e=this;return{dialogRef:c((function(){return e._instance}))}},data:function(){return{containerVisible:this.visible,maximized:!1,focusableMax:null,focusableClose:null}},documentKeydownListener:null,container:null,mask:null,content:null,headerContainer:null,footerContainer:null,maximizableButton:null,closeButton:null,styleElement:null,dragging:null,documentDragListener:null,documentDragEndListener:null,lastPageX:null,lastPageY:null,updated:function(){this.visible&&(this.containerVisible=this.visible)},beforeUnmount:function(){this.unbindDocumentState(),this.unbindGlobalListeners(),this.destroyStyle(),this.mask&&this.autoZIndex&&s.clear(this.mask),this.container=null,this.mask=null},mounted:function(){this.breakpoints&&this.createStyle()},methods:{close:function(){this.$emit("update:visible",!1)},onBeforeEnter:function(e){e.setAttribute(this.attributeSelector,"")},onEnter:function(){this.$emit("show"),this.focus(),this.enableDocumentSettings(),this.bindGlobalListeners(),this.autoZIndex&&s.set("modal",this.mask,this.baseZIndex+this.$primevue.config.zIndex.modal)},onBeforeLeave:function(){this.modal&&!this.isUnstyled&&l.addClass(this.mask,"p-component-overlay-leave")},onLeave:function(){this.$emit("hide"),this.focusableClose=null,this.focusableMax=null},onAfterLeave:function(){this.autoZIndex&&s.clear(this.mask),this.containerVisible=!1,this.unbindDocumentState(),this.unbindGlobalListeners(),this.$emit("after-hide")},onMaskClick:function(e){this.dismissableMask&&this.modal&&this.mask===e.target&&this.close()},focus:function(){var e=function(e){return e&&e.querySelector("[autofocus]")},t=this.$slots.footer&&e(this.footerContainer);t||(t=this.$slots.header&&e(this.headerContainer))||(t=this.$slots.default&&e(this.content))||(this.maximizable?(this.focusableMax=!0,t=this.maximizableButton):(this.focusableClose=!0,t=this.closeButton)),t&&l.focus(t,{focusVisible:!0})},maximize:function(e){this.maximized?(this.maximized=!1,this.$emit("unmaximize",e)):(this.maximized=!0,this.$emit("maximize",e)),this.modal||(this.maximized?l.blockBodyScroll():l.unblockBodyScroll())},enableDocumentSettings:function(){(this.modal||!this.modal&&this.blockScroll||this.maximizable&&this.maximized)&&l.blockBodyScroll()},unbindDocumentState:function(){(this.modal||!this.modal&&this.blockScroll||this.maximizable&&this.maximized)&&l.unblockBodyScroll()},onKeyDown:function(e){"Escape"===e.code&&this.closeOnEscape&&this.close()},bindDocumentKeyDownListener:function(){this.documentKeydownListener||(this.documentKeydownListener=this.onKeyDown.bind(this),window.document.addEventListener("keydown",this.documentKeydownListener))},unbindDocumentKeyDownListener:function(){this.documentKeydownListener&&(window.document.removeEventListener("keydown",this.documentKeydownListener),this.documentKeydownListener=null)},containerRef:function(e){this.container=e},maskRef:function(e){this.mask=e},contentRef:function(e){this.content=e},headerContainerRef:function(e){this.headerContainer=e},footerContainerRef:function(e){this.footerContainer=e},maximizableRef:function(e){this.maximizableButton=e},closeButtonRef:function(e){this.closeButton=e},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.styleElement=document.createElement("style"),this.styleElement.type="text/css",l.setAttribute(this.styleElement,"nonce",null===(e=this.$primevue)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce),document.head.appendChild(this.styleElement);var t="";for(var n in this.breakpoints)t+="\n @media screen and (max-width: ".concat(n,") {\n .p-dialog[").concat(this.attributeSelector,"] {\n width: ").concat(this.breakpoints[n]," !important;\n }\n }\n ");this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},initDrag:function(e){"icons"!==e.target.closest("div").getAttribute("data-pc-section")&&this.draggable&&(this.dragging=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.container.style.margin="0",!this.isUnstyled&&l.addClass(document.body,"p-unselectable-text"))},bindGlobalListeners:function(){this.draggable&&(this.bindDocumentDragListener(),this.bindDocumentDragEndListener()),this.closeOnEscape&&this.closable&&this.bindDocumentKeyDownListener()},unbindGlobalListeners:function(){this.unbindDocumentDragListener(),this.unbindDocumentDragEndListener(),this.unbindDocumentKeyDownListener()},bindDocumentDragListener:function(){var e=this;this.documentDragListener=function(t){if(e.dragging){var n=l.getOuterWidth(e.container),i=l.getOuterHeight(e.container),o=t.pageX-e.lastPageX,a=t.pageY-e.lastPageY,s=e.container.getBoundingClientRect(),r=s.left+o,c=s.top+a,u=l.getViewport(),m=getComputedStyle(e.container),d=parseFloat(m.marginLeft),f=parseFloat(m.marginTop);e.container.style.position="fixed",e.keepInViewport?(r>=e.minX&&r+n<u.width&&(e.lastPageX=t.pageX,e.container.style.left=r-d+"px"),c>=e.minY&&c+i<u.height&&(e.lastPageY=t.pageY,e.container.style.top=c-f+"px")):(e.lastPageX=t.pageX,e.container.style.left=r-d+"px",e.lastPageY=t.pageY,e.container.style.top=c-f+"px")}},window.document.addEventListener("mousemove",this.documentDragListener)},unbindDocumentDragListener:function(){this.documentDragListener&&(window.document.removeEventListener("mousemove",this.documentDragListener),this.documentDragListener=null)},bindDocumentDragEndListener:function(){var e=this;this.documentDragEndListener=function(t){e.dragging&&(e.dragging=!1,!e.isUnstyled&&l.removeClass(document.body,"p-unselectable-text"),e.$emit("dragend",t))},window.document.addEventListener("mouseup",this.documentDragEndListener)},unbindDocumentDragEndListener:function(){this.documentDragEndListener&&(window.document.removeEventListener("mouseup",this.documentDragEndListener),this.documentDragEndListener=null)}},computed:{maximizeIconComponent:function(){return this.maximized?this.minimizeIcon?"span":"WindowMinimizeIcon":this.maximizeIcon?"span":"WindowMaximizeIcon"},ariaId:function(){return r()},ariaLabelledById:function(){return null!=this.header||null!==this.$attrs["aria-labelledby"]?this.ariaId+"_header":null},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0},attributeSelector:function(){return r()}},directives:{ripple:a,focustrap:e},components:{Portal:o,WindowMinimizeIcon:i,WindowMaximizeIcon:n,TimesIcon:t}};function P(e){return P="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},P(e)}function $(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 O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach((function(t){M(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function M(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=j(e,"string");return"symbol"===P(t)?t:String(t)}function j(e,t){if("object"!==P(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==P(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var K=["aria-labelledby","aria-modal"],X=["id"],Y=["autofocus","tabindex"],A=["autofocus","aria-label"];C.render=function(e,t,n,i,o,a){var s=u("Portal"),l=m("ripple"),r=m("focustrap");return d(),f(s,{appendTo:e.appendTo},{default:p((function(){return[o.containerVisible?(d(),h("div",b({key:0,ref:a.maskRef,class:e.cx("mask"),style:e.sx("mask",!0,{position:e.position,modal:e.modal}),onClick:t[3]||(t[3]=function(){return a.onMaskClick&&a.onMaskClick.apply(a,arguments)})},e.ptm("mask")),[y(g,b({name:"p-dialog",onBeforeEnter:a.onBeforeEnter,onEnter:a.onEnter,onBeforeLeave:a.onBeforeLeave,onLeave:a.onLeave,onAfterLeave:a.onAfterLeave,appear:""},e.ptm("transition")),{default:p((function(){return[e.visible?v((d(),h("div",b({key:0,ref:a.containerRef,class:e.cx("root"),style:e.sx("root"),role:"dialog","aria-labelledby":a.ariaLabelledById,"aria-modal":e.modal},O(O({},e.$attrs),e.ptm("root"))),[e.$slots.container?x(e.$slots,"container",{key:0,onClose:a.close,onMaximize:function(e){return a.maximize(e)},closeCallback:a.close,maximizeCallback:function(e){return a.maximize(e)}}):(d(),h(L,{key:1},[e.showHeader?(d(),h("div",b({key:0,ref:a.headerContainerRef,class:e.cx("header"),onMousedown:t[2]||(t[2]=function(){return a.initDrag&&a.initDrag.apply(a,arguments)})},e.ptm("header")),[x(e.$slots,"header",{class:w(e.cx("title"))},(function(){return[e.header?(d(),h("span",b({key:0,id:a.ariaLabelledById,class:e.cx("title")},e.ptm("title")),z(e.header),17,X)):k("",!0)]})),D("div",b({class:e.cx("icons")},e.ptm("icons")),[e.maximizable?v((d(),h("button",b({key:0,ref:a.maximizableRef,autofocus:o.focusableMax,class:e.cx("maximizableButton"),onClick:t[0]||(t[0]=function(){return a.maximize&&a.maximize.apply(a,arguments)}),type:"button",tabindex:e.maximizable?"0":"-1"},e.ptm("maximizableButton"),{"data-pc-group-section":"headericon"}),[x(e.$slots,"maximizeicon",{maximized:o.maximized,class:w(e.cx("maximizableIcon"))},(function(){return[(d(),f(B(a.maximizeIconComponent),b({class:[e.cx("maximizableIcon"),o.maximized?e.minimizeIcon:e.maximizeIcon]},e.ptm("maximizableIcon")),null,16,["class"]))]}))],16,Y)),[[l]]):k("",!0),e.closable?v((d(),h("button",b({key:1,ref:a.closeButtonRef,autofocus:o.focusableClose,class:e.cx("closeButton"),onClick:t[1]||(t[1]=function(){return a.close&&a.close.apply(a,arguments)}),"aria-label":a.closeAriaLabel,type:"button"},O(O({},e.closeButtonProps),e.ptm("closeButton")),{"data-pc-group-section":"headericon"}),[x(e.$slots,"closeicon",{class:w(e.cx("closeButtonIcon"))},(function(){return[(d(),f(B(e.closeIcon?"span":"TimesIcon"),b({class:[e.cx("closeButtonIcon"),e.closeIcon]},e.ptm("closeButtonIcon")),null,16,["class"]))]}))],16,A)),[[l]]):k("",!0)],16)],16)):k("",!0),D("div",b({ref:a.contentRef,class:[e.cx("content"),e.contentClass],style:e.contentStyle},O(O({},e.contentProps),e.ptm("content"))),[x(e.$slots,"default")],16),e.footer||e.$slots.footer?(d(),h("div",b({key:1,ref:a.footerContainerRef,class:e.cx("footer")},e.ptm("footer")),[x(e.$slots,"footer",{},(function(){return[E(z(e.footer),1)]}))],16)):k("",!0)],64))],16,K)),[[r,{disabled:!e.modal}]]):k("",!0)]})),_:3},16,["onBeforeEnter","onEnter","onBeforeLeave","onLeave","onAfterLeave"])],16)):k("",!0)]})),_:3},8,["appendTo"])};export{C as default};
|
package/dialog/dialog.js
CHANGED
|
@@ -337,7 +337,7 @@ this.primevue.dialog = (function (FocusTrap, TimesIcon, WindowMaximizeIcon, Wind
|
|
|
337
337
|
}
|
|
338
338
|
},
|
|
339
339
|
initDrag: function initDrag(event) {
|
|
340
|
-
if (event.target.closest('div').getAttribute('data-pc-section') === '
|
|
340
|
+
if (event.target.closest('div').getAttribute('data-pc-section') === 'icons') {
|
|
341
341
|
return;
|
|
342
342
|
}
|
|
343
343
|
if (this.draggable) {
|
|
@@ -517,16 +517,16 @@ this.primevue.dialog = (function (FocusTrap, TimesIcon, WindowMaximizeIcon, Wind
|
|
|
517
517
|
return $options.initDrag && $options.initDrag.apply($options, arguments);
|
|
518
518
|
})
|
|
519
519
|
}, _ctx.ptm('header')), [vue.renderSlot(_ctx.$slots, "header", {
|
|
520
|
-
"class": vue.normalizeClass(_ctx.cx('
|
|
520
|
+
"class": vue.normalizeClass(_ctx.cx('title'))
|
|
521
521
|
}, function () {
|
|
522
522
|
return [_ctx.header ? (vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
|
|
523
523
|
key: 0,
|
|
524
524
|
id: $options.ariaLabelledById,
|
|
525
|
-
"class": _ctx.cx('
|
|
526
|
-
}, _ctx.ptm('
|
|
525
|
+
"class": _ctx.cx('title')
|
|
526
|
+
}, _ctx.ptm('title')), vue.toDisplayString(_ctx.header), 17, _hoisted_2)) : vue.createCommentVNode("", true)];
|
|
527
527
|
}), vue.createElementVNode("div", vue.mergeProps({
|
|
528
|
-
"class": _ctx.cx('
|
|
529
|
-
}, _ctx.ptm('
|
|
528
|
+
"class": _ctx.cx('icons')
|
|
529
|
+
}, _ctx.ptm('icons')), [_ctx.maximizable ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", vue.mergeProps({
|
|
530
530
|
key: 0,
|
|
531
531
|
ref: $options.maximizableRef,
|
|
532
532
|
autofocus: $data.focusableMax,
|
package/dialog/dialog.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.dialog=function(e,t,n,o,i,a,l,r,s,c){"use strict";function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=u(e),d=u(t),p=u(n),f=u(o),h=u(i),b=u(a),y={name:"Dialog",extends:{name:"BaseDialog",extends:u(s).default,props:{header:{type:null,default:null},footer:{type:null,default:null},visible:{type:Boolean,default:!1},modal:{type:Boolean,default:null},contentStyle:{type:null,default:null},contentClass:{type:String,default:null},contentProps:{type:null,default:null},rtl:{type:Boolean,default:null},maximizable:{type:Boolean,default:!1},dismissableMask:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!1},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0},position:{type:String,default:"center"},breakpoints:{type:Object,default:null},draggable:{type:Boolean,default:!0},keepInViewport:{type:Boolean,default:!0},minX:{type:Number,default:0},minY:{type:Number,default:0},appendTo:{type:String,default:"body"},closeIcon:{type:String,default:void 0},maximizeIcon:{type:String,default:void 0},minimizeIcon:{type:String,default:void 0},closeButtonProps:{type:null,default:null},_instance:null},style:u(c).default,provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["update:visible","show","hide","after-hide","maximize","unmaximize","dragend"],provide:function(){var e=this;return{dialogRef:r.computed((function(){return e._instance}))}},data:function(){return{containerVisible:this.visible,maximized:!1,focusableMax:null,focusableClose:null}},documentKeydownListener:null,container:null,mask:null,content:null,headerContainer:null,footerContainer:null,maximizableButton:null,closeButton:null,styleElement:null,dragging:null,documentDragListener:null,documentDragEndListener:null,lastPageX:null,lastPageY:null,updated:function(){this.visible&&(this.containerVisible=this.visible)},beforeUnmount:function(){this.unbindDocumentState(),this.unbindGlobalListeners(),this.destroyStyle(),this.mask&&this.autoZIndex&&l.ZIndexUtils.clear(this.mask),this.container=null,this.mask=null},mounted:function(){this.breakpoints&&this.createStyle()},methods:{close:function(){this.$emit("update:visible",!1)},onBeforeEnter:function(e){e.setAttribute(this.attributeSelector,"")},onEnter:function(){this.$emit("show"),this.focus(),this.enableDocumentSettings(),this.bindGlobalListeners(),this.autoZIndex&&l.ZIndexUtils.set("modal",this.mask,this.baseZIndex+this.$primevue.config.zIndex.modal)},onBeforeLeave:function(){this.modal&&!this.isUnstyled&&l.DomHandler.addClass(this.mask,"p-component-overlay-leave")},onLeave:function(){this.$emit("hide"),this.focusableClose=null,this.focusableMax=null},onAfterLeave:function(){this.autoZIndex&&l.ZIndexUtils.clear(this.mask),this.containerVisible=!1,this.unbindDocumentState(),this.unbindGlobalListeners(),this.$emit("after-hide")},onMaskClick:function(e){this.dismissableMask&&this.modal&&this.mask===e.target&&this.close()},focus:function(){var e=function(e){return e&&e.querySelector("[autofocus]")},t=this.$slots.footer&&e(this.footerContainer);t||(t=this.$slots.header&&e(this.headerContainer))||(t=this.$slots.default&&e(this.content))||(this.maximizable?(this.focusableMax=!0,t=this.maximizableButton):(this.focusableClose=!0,t=this.closeButton)),t&&l.DomHandler.focus(t,{focusVisible:!0})},maximize:function(e){this.maximized?(this.maximized=!1,this.$emit("unmaximize",e)):(this.maximized=!0,this.$emit("maximize",e)),this.modal||(this.maximized?l.DomHandler.blockBodyScroll():l.DomHandler.unblockBodyScroll())},enableDocumentSettings:function(){(this.modal||!this.modal&&this.blockScroll||this.maximizable&&this.maximized)&&l.DomHandler.blockBodyScroll()},unbindDocumentState:function(){(this.modal||!this.modal&&this.blockScroll||this.maximizable&&this.maximized)&&l.DomHandler.unblockBodyScroll()},onKeyDown:function(e){"Escape"===e.code&&this.closeOnEscape&&this.close()},bindDocumentKeyDownListener:function(){this.documentKeydownListener||(this.documentKeydownListener=this.onKeyDown.bind(this),window.document.addEventListener("keydown",this.documentKeydownListener))},unbindDocumentKeyDownListener:function(){this.documentKeydownListener&&(window.document.removeEventListener("keydown",this.documentKeydownListener),this.documentKeydownListener=null)},containerRef:function(e){this.container=e},maskRef:function(e){this.mask=e},contentRef:function(e){this.content=e},headerContainerRef:function(e){this.headerContainer=e},footerContainerRef:function(e){this.footerContainer=e},maximizableRef:function(e){this.maximizableButton=e},closeButtonRef:function(e){this.closeButton=e},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.styleElement=document.createElement("style"),this.styleElement.type="text/css",l.DomHandler.setAttribute(this.styleElement,"nonce",null===(e=this.$primevue)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce),document.head.appendChild(this.styleElement);var t="";for(var n in this.breakpoints)t+="\n @media screen and (max-width: ".concat(n,") {\n .p-dialog[").concat(this.attributeSelector,"] {\n width: ").concat(this.breakpoints[n]," !important;\n }\n }\n ");this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},initDrag:function(e){"headericons"!==e.target.closest("div").getAttribute("data-pc-section")&&this.draggable&&(this.dragging=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.container.style.margin="0",!this.isUnstyled&&l.DomHandler.addClass(document.body,"p-unselectable-text"))},bindGlobalListeners:function(){this.draggable&&(this.bindDocumentDragListener(),this.bindDocumentDragEndListener()),this.closeOnEscape&&this.closable&&this.bindDocumentKeyDownListener()},unbindGlobalListeners:function(){this.unbindDocumentDragListener(),this.unbindDocumentDragEndListener(),this.unbindDocumentKeyDownListener()},bindDocumentDragListener:function(){var e=this;this.documentDragListener=function(t){if(e.dragging){var n=l.DomHandler.getOuterWidth(e.container),o=l.DomHandler.getOuterHeight(e.container),i=t.pageX-e.lastPageX,a=t.pageY-e.lastPageY,r=e.container.getBoundingClientRect(),s=r.left+i,c=r.top+a,u=l.DomHandler.getViewport(),m=getComputedStyle(e.container),d=parseFloat(m.marginLeft),p=parseFloat(m.marginTop);e.container.style.position="fixed",e.keepInViewport?(s>=e.minX&&s+n<u.width&&(e.lastPageX=t.pageX,e.container.style.left=s-d+"px"),c>=e.minY&&c+o<u.height&&(e.lastPageY=t.pageY,e.container.style.top=c-p+"px")):(e.lastPageX=t.pageX,e.container.style.left=s-d+"px",e.lastPageY=t.pageY,e.container.style.top=c-p+"px")}},window.document.addEventListener("mousemove",this.documentDragListener)},unbindDocumentDragListener:function(){this.documentDragListener&&(window.document.removeEventListener("mousemove",this.documentDragListener),this.documentDragListener=null)},bindDocumentDragEndListener:function(){var e=this;this.documentDragEndListener=function(t){e.dragging&&(e.dragging=!1,!e.isUnstyled&&l.DomHandler.removeClass(document.body,"p-unselectable-text"),e.$emit("dragend",t))},window.document.addEventListener("mouseup",this.documentDragEndListener)},unbindDocumentDragEndListener:function(){this.documentDragEndListener&&(window.document.removeEventListener("mouseup",this.documentDragEndListener),this.documentDragEndListener=null)}},computed:{maximizeIconComponent:function(){return this.maximized?this.minimizeIcon?"span":"WindowMinimizeIcon":this.maximizeIcon?"span":"WindowMaximizeIcon"},ariaId:function(){return l.UniqueComponentId()},ariaLabelledById:function(){return null!=this.header||null!==this.$attrs["aria-labelledby"]?this.ariaId+"_header":null},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0},attributeSelector:function(){return l.UniqueComponentId()}},directives:{ripple:b.default,focustrap:m.default},components:{Portal:h.default,WindowMinimizeIcon:f.default,WindowMaximizeIcon:p.default,TimesIcon:d.default}};function g(e){return g="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},g(e)}function v(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 x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(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=B(e,"string");return"symbol"===g(t)?t:String(t)}function B(e,t){if("object"!==g(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==g(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var L=["aria-labelledby","aria-modal"],w=["id"],z=["autofocus","tabindex"],E=["autofocus","aria-label"];return y.render=function(e,t,n,o,i,a){var l=r.resolveComponent("Portal"),s=r.resolveDirective("ripple"),c=r.resolveDirective("focustrap");return r.openBlock(),r.createBlock(l,{appendTo:e.appendTo},{default:r.withCtx((function(){return[i.containerVisible?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,ref:a.maskRef,class:e.cx("mask"),style:e.sx("mask",!0,{position:e.position,modal:e.modal}),onClick:t[3]||(t[3]=function(){return a.onMaskClick&&a.onMaskClick.apply(a,arguments)})},e.ptm("mask")),[r.createVNode(r.Transition,r.mergeProps({name:"p-dialog",onBeforeEnter:a.onBeforeEnter,onEnter:a.onEnter,onBeforeLeave:a.onBeforeLeave,onLeave:a.onLeave,onAfterLeave:a.onAfterLeave,appear:""},e.ptm("transition")),{default:r.withCtx((function(){return[e.visible?r.withDirectives((r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,ref:a.containerRef,class:e.cx("root"),style:e.sx("root"),role:"dialog","aria-labelledby":a.ariaLabelledById,"aria-modal":e.modal},x(x({},e.$attrs),e.ptm("root"))),[e.$slots.container?r.renderSlot(e.$slots,"container",{key:0,onClose:a.close,onMaximize:function(e){return a.maximize(e)},closeCallback:a.close,maximizeCallback:function(e){return a.maximize(e)}}):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[e.showHeader?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,ref:a.headerContainerRef,class:e.cx("header"),onMousedown:t[2]||(t[2]=function(){return a.initDrag&&a.initDrag.apply(a,arguments)})},e.ptm("header")),[r.renderSlot(e.$slots,"header",{class:r.normalizeClass(e.cx("headerTitle"))},(function(){return[e.header?(r.openBlock(),r.createElementBlock("span",r.mergeProps({key:0,id:a.ariaLabelledById,class:e.cx("headerTitle")},e.ptm("headerTitle")),r.toDisplayString(e.header),17,w)):r.createCommentVNode("",!0)]})),r.createElementVNode("div",r.mergeProps({class:e.cx("headerIcons")},e.ptm("headerIcons")),[e.maximizable?r.withDirectives((r.openBlock(),r.createElementBlock("button",r.mergeProps({key:0,ref:a.maximizableRef,autofocus:i.focusableMax,class:e.cx("maximizableButton"),onClick:t[0]||(t[0]=function(){return a.maximize&&a.maximize.apply(a,arguments)}),type:"button",tabindex:e.maximizable?"0":"-1"},e.ptm("maximizableButton"),{"data-pc-group-section":"headericon"}),[r.renderSlot(e.$slots,"maximizeicon",{maximized:i.maximized,class:r.normalizeClass(e.cx("maximizableIcon"))},(function(){return[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(a.maximizeIconComponent),r.mergeProps({class:[e.cx("maximizableIcon"),i.maximized?e.minimizeIcon:e.maximizeIcon]},e.ptm("maximizableIcon")),null,16,["class"]))]}))],16,z)),[[s]]):r.createCommentVNode("",!0),e.closable?r.withDirectives((r.openBlock(),r.createElementBlock("button",r.mergeProps({key:1,ref:a.closeButtonRef,autofocus:i.focusableClose,class:e.cx("closeButton"),onClick:t[1]||(t[1]=function(){return a.close&&a.close.apply(a,arguments)}),"aria-label":a.closeAriaLabel,type:"button"},x(x({},e.closeButtonProps),e.ptm("closeButton")),{"data-pc-group-section":"headericon"}),[r.renderSlot(e.$slots,"closeicon",{class:r.normalizeClass(e.cx("closeButtonIcon"))},(function(){return[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(e.closeIcon?"span":"TimesIcon"),r.mergeProps({class:[e.cx("closeButtonIcon"),e.closeIcon]},e.ptm("closeButtonIcon")),null,16,["class"]))]}))],16,E)),[[s]]):r.createCommentVNode("",!0)],16)],16)):r.createCommentVNode("",!0),r.createElementVNode("div",r.mergeProps({ref:a.contentRef,class:[e.cx("content"),e.contentClass],style:e.contentStyle},x(x({},e.contentProps),e.ptm("content"))),[r.renderSlot(e.$slots,"default")],16),e.footer||e.$slots.footer?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:1,ref:a.footerContainerRef,class:e.cx("footer")},e.ptm("footer")),[r.renderSlot(e.$slots,"footer",{},(function(){return[r.createTextVNode(r.toDisplayString(e.footer),1)]}))],16)):r.createCommentVNode("",!0)],64))],16,L)),[[c,{disabled:!e.modal}]]):r.createCommentVNode("",!0)]})),_:3},16,["onBeforeEnter","onEnter","onBeforeLeave","onLeave","onAfterLeave"])],16)):r.createCommentVNode("",!0)]})),_:3},8,["appendTo"])},y}(primevue.focustrap,primevue.icons.times,primevue.icons.windowmaximize,primevue.icons.windowminimize,primevue.portal,primevue.ripple,primevue.utils,Vue,primevue.basecomponent,primevue.dialog.style);
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.dialog=function(e,t,n,o,i,a,l,r,s,c){"use strict";function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=u(e),d=u(t),p=u(n),f=u(o),h=u(i),b=u(a),y={name:"Dialog",extends:{name:"BaseDialog",extends:u(s).default,props:{header:{type:null,default:null},footer:{type:null,default:null},visible:{type:Boolean,default:!1},modal:{type:Boolean,default:null},contentStyle:{type:null,default:null},contentClass:{type:String,default:null},contentProps:{type:null,default:null},rtl:{type:Boolean,default:null},maximizable:{type:Boolean,default:!1},dismissableMask:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!1},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0},position:{type:String,default:"center"},breakpoints:{type:Object,default:null},draggable:{type:Boolean,default:!0},keepInViewport:{type:Boolean,default:!0},minX:{type:Number,default:0},minY:{type:Number,default:0},appendTo:{type:String,default:"body"},closeIcon:{type:String,default:void 0},maximizeIcon:{type:String,default:void 0},minimizeIcon:{type:String,default:void 0},closeButtonProps:{type:null,default:null},_instance:null},style:u(c).default,provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["update:visible","show","hide","after-hide","maximize","unmaximize","dragend"],provide:function(){var e=this;return{dialogRef:r.computed((function(){return e._instance}))}},data:function(){return{containerVisible:this.visible,maximized:!1,focusableMax:null,focusableClose:null}},documentKeydownListener:null,container:null,mask:null,content:null,headerContainer:null,footerContainer:null,maximizableButton:null,closeButton:null,styleElement:null,dragging:null,documentDragListener:null,documentDragEndListener:null,lastPageX:null,lastPageY:null,updated:function(){this.visible&&(this.containerVisible=this.visible)},beforeUnmount:function(){this.unbindDocumentState(),this.unbindGlobalListeners(),this.destroyStyle(),this.mask&&this.autoZIndex&&l.ZIndexUtils.clear(this.mask),this.container=null,this.mask=null},mounted:function(){this.breakpoints&&this.createStyle()},methods:{close:function(){this.$emit("update:visible",!1)},onBeforeEnter:function(e){e.setAttribute(this.attributeSelector,"")},onEnter:function(){this.$emit("show"),this.focus(),this.enableDocumentSettings(),this.bindGlobalListeners(),this.autoZIndex&&l.ZIndexUtils.set("modal",this.mask,this.baseZIndex+this.$primevue.config.zIndex.modal)},onBeforeLeave:function(){this.modal&&!this.isUnstyled&&l.DomHandler.addClass(this.mask,"p-component-overlay-leave")},onLeave:function(){this.$emit("hide"),this.focusableClose=null,this.focusableMax=null},onAfterLeave:function(){this.autoZIndex&&l.ZIndexUtils.clear(this.mask),this.containerVisible=!1,this.unbindDocumentState(),this.unbindGlobalListeners(),this.$emit("after-hide")},onMaskClick:function(e){this.dismissableMask&&this.modal&&this.mask===e.target&&this.close()},focus:function(){var e=function(e){return e&&e.querySelector("[autofocus]")},t=this.$slots.footer&&e(this.footerContainer);t||(t=this.$slots.header&&e(this.headerContainer))||(t=this.$slots.default&&e(this.content))||(this.maximizable?(this.focusableMax=!0,t=this.maximizableButton):(this.focusableClose=!0,t=this.closeButton)),t&&l.DomHandler.focus(t,{focusVisible:!0})},maximize:function(e){this.maximized?(this.maximized=!1,this.$emit("unmaximize",e)):(this.maximized=!0,this.$emit("maximize",e)),this.modal||(this.maximized?l.DomHandler.blockBodyScroll():l.DomHandler.unblockBodyScroll())},enableDocumentSettings:function(){(this.modal||!this.modal&&this.blockScroll||this.maximizable&&this.maximized)&&l.DomHandler.blockBodyScroll()},unbindDocumentState:function(){(this.modal||!this.modal&&this.blockScroll||this.maximizable&&this.maximized)&&l.DomHandler.unblockBodyScroll()},onKeyDown:function(e){"Escape"===e.code&&this.closeOnEscape&&this.close()},bindDocumentKeyDownListener:function(){this.documentKeydownListener||(this.documentKeydownListener=this.onKeyDown.bind(this),window.document.addEventListener("keydown",this.documentKeydownListener))},unbindDocumentKeyDownListener:function(){this.documentKeydownListener&&(window.document.removeEventListener("keydown",this.documentKeydownListener),this.documentKeydownListener=null)},containerRef:function(e){this.container=e},maskRef:function(e){this.mask=e},contentRef:function(e){this.content=e},headerContainerRef:function(e){this.headerContainer=e},footerContainerRef:function(e){this.footerContainer=e},maximizableRef:function(e){this.maximizableButton=e},closeButtonRef:function(e){this.closeButton=e},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.styleElement=document.createElement("style"),this.styleElement.type="text/css",l.DomHandler.setAttribute(this.styleElement,"nonce",null===(e=this.$primevue)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce),document.head.appendChild(this.styleElement);var t="";for(var n in this.breakpoints)t+="\n @media screen and (max-width: ".concat(n,") {\n .p-dialog[").concat(this.attributeSelector,"] {\n width: ").concat(this.breakpoints[n]," !important;\n }\n }\n ");this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},initDrag:function(e){"icons"!==e.target.closest("div").getAttribute("data-pc-section")&&this.draggable&&(this.dragging=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.container.style.margin="0",!this.isUnstyled&&l.DomHandler.addClass(document.body,"p-unselectable-text"))},bindGlobalListeners:function(){this.draggable&&(this.bindDocumentDragListener(),this.bindDocumentDragEndListener()),this.closeOnEscape&&this.closable&&this.bindDocumentKeyDownListener()},unbindGlobalListeners:function(){this.unbindDocumentDragListener(),this.unbindDocumentDragEndListener(),this.unbindDocumentKeyDownListener()},bindDocumentDragListener:function(){var e=this;this.documentDragListener=function(t){if(e.dragging){var n=l.DomHandler.getOuterWidth(e.container),o=l.DomHandler.getOuterHeight(e.container),i=t.pageX-e.lastPageX,a=t.pageY-e.lastPageY,r=e.container.getBoundingClientRect(),s=r.left+i,c=r.top+a,u=l.DomHandler.getViewport(),m=getComputedStyle(e.container),d=parseFloat(m.marginLeft),p=parseFloat(m.marginTop);e.container.style.position="fixed",e.keepInViewport?(s>=e.minX&&s+n<u.width&&(e.lastPageX=t.pageX,e.container.style.left=s-d+"px"),c>=e.minY&&c+o<u.height&&(e.lastPageY=t.pageY,e.container.style.top=c-p+"px")):(e.lastPageX=t.pageX,e.container.style.left=s-d+"px",e.lastPageY=t.pageY,e.container.style.top=c-p+"px")}},window.document.addEventListener("mousemove",this.documentDragListener)},unbindDocumentDragListener:function(){this.documentDragListener&&(window.document.removeEventListener("mousemove",this.documentDragListener),this.documentDragListener=null)},bindDocumentDragEndListener:function(){var e=this;this.documentDragEndListener=function(t){e.dragging&&(e.dragging=!1,!e.isUnstyled&&l.DomHandler.removeClass(document.body,"p-unselectable-text"),e.$emit("dragend",t))},window.document.addEventListener("mouseup",this.documentDragEndListener)},unbindDocumentDragEndListener:function(){this.documentDragEndListener&&(window.document.removeEventListener("mouseup",this.documentDragEndListener),this.documentDragEndListener=null)}},computed:{maximizeIconComponent:function(){return this.maximized?this.minimizeIcon?"span":"WindowMinimizeIcon":this.maximizeIcon?"span":"WindowMaximizeIcon"},ariaId:function(){return l.UniqueComponentId()},ariaLabelledById:function(){return null!=this.header||null!==this.$attrs["aria-labelledby"]?this.ariaId+"_header":null},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0},attributeSelector:function(){return l.UniqueComponentId()}},directives:{ripple:b.default,focustrap:m.default},components:{Portal:h.default,WindowMinimizeIcon:f.default,WindowMaximizeIcon:p.default,TimesIcon:d.default}};function g(e){return g="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},g(e)}function v(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 x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(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=B(e,"string");return"symbol"===g(t)?t:String(t)}function B(e,t){if("object"!==g(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==g(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var L=["aria-labelledby","aria-modal"],w=["id"],z=["autofocus","tabindex"],E=["autofocus","aria-label"];return y.render=function(e,t,n,o,i,a){var l=r.resolveComponent("Portal"),s=r.resolveDirective("ripple"),c=r.resolveDirective("focustrap");return r.openBlock(),r.createBlock(l,{appendTo:e.appendTo},{default:r.withCtx((function(){return[i.containerVisible?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,ref:a.maskRef,class:e.cx("mask"),style:e.sx("mask",!0,{position:e.position,modal:e.modal}),onClick:t[3]||(t[3]=function(){return a.onMaskClick&&a.onMaskClick.apply(a,arguments)})},e.ptm("mask")),[r.createVNode(r.Transition,r.mergeProps({name:"p-dialog",onBeforeEnter:a.onBeforeEnter,onEnter:a.onEnter,onBeforeLeave:a.onBeforeLeave,onLeave:a.onLeave,onAfterLeave:a.onAfterLeave,appear:""},e.ptm("transition")),{default:r.withCtx((function(){return[e.visible?r.withDirectives((r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,ref:a.containerRef,class:e.cx("root"),style:e.sx("root"),role:"dialog","aria-labelledby":a.ariaLabelledById,"aria-modal":e.modal},x(x({},e.$attrs),e.ptm("root"))),[e.$slots.container?r.renderSlot(e.$slots,"container",{key:0,onClose:a.close,onMaximize:function(e){return a.maximize(e)},closeCallback:a.close,maximizeCallback:function(e){return a.maximize(e)}}):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[e.showHeader?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,ref:a.headerContainerRef,class:e.cx("header"),onMousedown:t[2]||(t[2]=function(){return a.initDrag&&a.initDrag.apply(a,arguments)})},e.ptm("header")),[r.renderSlot(e.$slots,"header",{class:r.normalizeClass(e.cx("title"))},(function(){return[e.header?(r.openBlock(),r.createElementBlock("span",r.mergeProps({key:0,id:a.ariaLabelledById,class:e.cx("title")},e.ptm("title")),r.toDisplayString(e.header),17,w)):r.createCommentVNode("",!0)]})),r.createElementVNode("div",r.mergeProps({class:e.cx("icons")},e.ptm("icons")),[e.maximizable?r.withDirectives((r.openBlock(),r.createElementBlock("button",r.mergeProps({key:0,ref:a.maximizableRef,autofocus:i.focusableMax,class:e.cx("maximizableButton"),onClick:t[0]||(t[0]=function(){return a.maximize&&a.maximize.apply(a,arguments)}),type:"button",tabindex:e.maximizable?"0":"-1"},e.ptm("maximizableButton"),{"data-pc-group-section":"headericon"}),[r.renderSlot(e.$slots,"maximizeicon",{maximized:i.maximized,class:r.normalizeClass(e.cx("maximizableIcon"))},(function(){return[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(a.maximizeIconComponent),r.mergeProps({class:[e.cx("maximizableIcon"),i.maximized?e.minimizeIcon:e.maximizeIcon]},e.ptm("maximizableIcon")),null,16,["class"]))]}))],16,z)),[[s]]):r.createCommentVNode("",!0),e.closable?r.withDirectives((r.openBlock(),r.createElementBlock("button",r.mergeProps({key:1,ref:a.closeButtonRef,autofocus:i.focusableClose,class:e.cx("closeButton"),onClick:t[1]||(t[1]=function(){return a.close&&a.close.apply(a,arguments)}),"aria-label":a.closeAriaLabel,type:"button"},x(x({},e.closeButtonProps),e.ptm("closeButton")),{"data-pc-group-section":"headericon"}),[r.renderSlot(e.$slots,"closeicon",{class:r.normalizeClass(e.cx("closeButtonIcon"))},(function(){return[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(e.closeIcon?"span":"TimesIcon"),r.mergeProps({class:[e.cx("closeButtonIcon"),e.closeIcon]},e.ptm("closeButtonIcon")),null,16,["class"]))]}))],16,E)),[[s]]):r.createCommentVNode("",!0)],16)],16)):r.createCommentVNode("",!0),r.createElementVNode("div",r.mergeProps({ref:a.contentRef,class:[e.cx("content"),e.contentClass],style:e.contentStyle},x(x({},e.contentProps),e.ptm("content"))),[r.renderSlot(e.$slots,"default")],16),e.footer||e.$slots.footer?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:1,ref:a.footerContainerRef,class:e.cx("footer")},e.ptm("footer")),[r.renderSlot(e.$slots,"footer",{},(function(){return[r.createTextVNode(r.toDisplayString(e.footer),1)]}))],16)):r.createCommentVNode("",!0)],64))],16,L)),[[c,{disabled:!e.modal}]]):r.createCommentVNode("",!0)]})),_:3},16,["onBeforeEnter","onEnter","onBeforeLeave","onLeave","onAfterLeave"])],16)):r.createCommentVNode("",!0)]})),_:3},8,["appendTo"])},y}(primevue.focustrap,primevue.icons.times,primevue.icons.windowmaximize,primevue.icons.windowminimize,primevue.portal,primevue.ripple,primevue.utils,Vue,primevue.basecomponent,primevue.dialog.style);
|
|
@@ -53,8 +53,8 @@ var classes = {
|
|
|
53
53
|
}];
|
|
54
54
|
},
|
|
55
55
|
header: 'p-dialog-header',
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
title: 'p-dialog-title',
|
|
57
|
+
icons: 'p-dialog-header-icons',
|
|
58
58
|
maximizableButton: 'p-dialog-header-icon p-dialog-header-maximize p-link',
|
|
59
59
|
maximizableIcon: 'p-dialog-header-maximize-icon',
|
|
60
60
|
closeButton: 'p-dialog-header-icon p-dialog-header-close p-link',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function o(o){return o&&"object"==typeof o&&"default"in o?o:{default:o}}var t=o(require("primevue/base/style")).default.extend({name:"dialog",css:"\n@layer primevue {\n .p-dialog-mask.p-component-overlay {\n pointer-events: auto;\n }\n\n .p-dialog {\n max-height: 90%;\n transform: scale(1);\n }\n\n .p-dialog-content {\n overflow-y: auto;\n }\n\n .p-dialog-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-shrink: 0;\n }\n\n .p-dialog-footer {\n flex-shrink: 0;\n }\n\n .p-dialog .p-dialog-header-icons {\n display: flex;\n align-items: center;\n }\n\n .p-dialog .p-dialog-header-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n\n /* Fluid */\n .p-fluid .p-dialog-footer .p-button {\n width: auto;\n }\n\n /* Animation */\n /* Center */\n .p-dialog-enter-active {\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n }\n .p-dialog-leave-active {\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n }\n .p-dialog-enter-from,\n .p-dialog-leave-to {\n opacity: 0;\n transform: scale(0.7);\n }\n\n /* Top, Bottom, Left, Right, Top* and Bottom* */\n .p-dialog-top .p-dialog,\n .p-dialog-bottom .p-dialog,\n .p-dialog-left .p-dialog,\n .p-dialog-right .p-dialog,\n .p-dialog-topleft .p-dialog,\n .p-dialog-topright .p-dialog,\n .p-dialog-bottomleft .p-dialog,\n .p-dialog-bottomright .p-dialog {\n margin: 0.75rem;\n transform: translate3d(0px, 0px, 0px);\n }\n .p-dialog-top .p-dialog-enter-active,\n .p-dialog-top .p-dialog-leave-active,\n .p-dialog-bottom .p-dialog-enter-active,\n .p-dialog-bottom .p-dialog-leave-active,\n .p-dialog-left .p-dialog-enter-active,\n .p-dialog-left .p-dialog-leave-active,\n .p-dialog-right .p-dialog-enter-active,\n .p-dialog-right .p-dialog-leave-active,\n .p-dialog-topleft .p-dialog-enter-active,\n .p-dialog-topleft .p-dialog-leave-active,\n .p-dialog-topright .p-dialog-enter-active,\n .p-dialog-topright .p-dialog-leave-active,\n .p-dialog-bottomleft .p-dialog-enter-active,\n .p-dialog-bottomleft .p-dialog-leave-active,\n .p-dialog-bottomright .p-dialog-enter-active,\n .p-dialog-bottomright .p-dialog-leave-active {\n transition: all 0.3s ease-out;\n }\n .p-dialog-top .p-dialog-enter-from,\n .p-dialog-top .p-dialog-leave-to {\n transform: translate3d(0px, -100%, 0px);\n }\n .p-dialog-bottom .p-dialog-enter-from,\n .p-dialog-bottom .p-dialog-leave-to {\n transform: translate3d(0px, 100%, 0px);\n }\n .p-dialog-left .p-dialog-enter-from,\n .p-dialog-left .p-dialog-leave-to,\n .p-dialog-topleft .p-dialog-enter-from,\n .p-dialog-topleft .p-dialog-leave-to,\n .p-dialog-bottomleft .p-dialog-enter-from,\n .p-dialog-bottomleft .p-dialog-leave-to {\n transform: translate3d(-100%, 0px, 0px);\n }\n .p-dialog-right .p-dialog-enter-from,\n .p-dialog-right .p-dialog-leave-to,\n .p-dialog-topright .p-dialog-enter-from,\n .p-dialog-topright .p-dialog-leave-to,\n .p-dialog-bottomright .p-dialog-enter-from,\n .p-dialog-bottomright .p-dialog-leave-to {\n transform: translate3d(100%, 0px, 0px);\n }\n\n /* Maximize */\n .p-dialog-maximized {\n -webkit-transition: none;\n transition: none;\n transform: none;\n width: 100vw !important;\n height: 100vh !important;\n top: 0px !important;\n left: 0px !important;\n max-height: 100%;\n height: 100%;\n }\n .p-dialog-maximized .p-dialog-content {\n flex-grow: 1;\n }\n\n .p-confirm-dialog .p-dialog-content {\n display: flex;\n align-items: center;\n }\n}\n",classes:{mask:function(o){var t=o.props,e=["left","right","top","topleft","topright","bottom","bottomleft","bottomright"].find((function(o){return o===t.position}));return["p-dialog-mask",{"p-component-overlay p-component-overlay-enter":t.modal},e?"p-dialog-".concat(e):""]},root:function(o){var t=o.props,e=o.instance;return["p-dialog p-component",{"p-dialog-rtl":t.rtl,"p-dialog-maximized":t.maximizable&&e.maximized,"p-input-filled":"filled"===e.$primevue.config.inputStyle,"p-ripple-disabled":!1===e.$primevue.config.ripple}]},header:"p-dialog-header",
|
|
1
|
+
"use strict";function o(o){return o&&"object"==typeof o&&"default"in o?o:{default:o}}var t=o(require("primevue/base/style")).default.extend({name:"dialog",css:"\n@layer primevue {\n .p-dialog-mask.p-component-overlay {\n pointer-events: auto;\n }\n\n .p-dialog {\n max-height: 90%;\n transform: scale(1);\n }\n\n .p-dialog-content {\n overflow-y: auto;\n }\n\n .p-dialog-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-shrink: 0;\n }\n\n .p-dialog-footer {\n flex-shrink: 0;\n }\n\n .p-dialog .p-dialog-header-icons {\n display: flex;\n align-items: center;\n }\n\n .p-dialog .p-dialog-header-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n\n /* Fluid */\n .p-fluid .p-dialog-footer .p-button {\n width: auto;\n }\n\n /* Animation */\n /* Center */\n .p-dialog-enter-active {\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n }\n .p-dialog-leave-active {\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n }\n .p-dialog-enter-from,\n .p-dialog-leave-to {\n opacity: 0;\n transform: scale(0.7);\n }\n\n /* Top, Bottom, Left, Right, Top* and Bottom* */\n .p-dialog-top .p-dialog,\n .p-dialog-bottom .p-dialog,\n .p-dialog-left .p-dialog,\n .p-dialog-right .p-dialog,\n .p-dialog-topleft .p-dialog,\n .p-dialog-topright .p-dialog,\n .p-dialog-bottomleft .p-dialog,\n .p-dialog-bottomright .p-dialog {\n margin: 0.75rem;\n transform: translate3d(0px, 0px, 0px);\n }\n .p-dialog-top .p-dialog-enter-active,\n .p-dialog-top .p-dialog-leave-active,\n .p-dialog-bottom .p-dialog-enter-active,\n .p-dialog-bottom .p-dialog-leave-active,\n .p-dialog-left .p-dialog-enter-active,\n .p-dialog-left .p-dialog-leave-active,\n .p-dialog-right .p-dialog-enter-active,\n .p-dialog-right .p-dialog-leave-active,\n .p-dialog-topleft .p-dialog-enter-active,\n .p-dialog-topleft .p-dialog-leave-active,\n .p-dialog-topright .p-dialog-enter-active,\n .p-dialog-topright .p-dialog-leave-active,\n .p-dialog-bottomleft .p-dialog-enter-active,\n .p-dialog-bottomleft .p-dialog-leave-active,\n .p-dialog-bottomright .p-dialog-enter-active,\n .p-dialog-bottomright .p-dialog-leave-active {\n transition: all 0.3s ease-out;\n }\n .p-dialog-top .p-dialog-enter-from,\n .p-dialog-top .p-dialog-leave-to {\n transform: translate3d(0px, -100%, 0px);\n }\n .p-dialog-bottom .p-dialog-enter-from,\n .p-dialog-bottom .p-dialog-leave-to {\n transform: translate3d(0px, 100%, 0px);\n }\n .p-dialog-left .p-dialog-enter-from,\n .p-dialog-left .p-dialog-leave-to,\n .p-dialog-topleft .p-dialog-enter-from,\n .p-dialog-topleft .p-dialog-leave-to,\n .p-dialog-bottomleft .p-dialog-enter-from,\n .p-dialog-bottomleft .p-dialog-leave-to {\n transform: translate3d(-100%, 0px, 0px);\n }\n .p-dialog-right .p-dialog-enter-from,\n .p-dialog-right .p-dialog-leave-to,\n .p-dialog-topright .p-dialog-enter-from,\n .p-dialog-topright .p-dialog-leave-to,\n .p-dialog-bottomright .p-dialog-enter-from,\n .p-dialog-bottomright .p-dialog-leave-to {\n transform: translate3d(100%, 0px, 0px);\n }\n\n /* Maximize */\n .p-dialog-maximized {\n -webkit-transition: none;\n transition: none;\n transform: none;\n width: 100vw !important;\n height: 100vh !important;\n top: 0px !important;\n left: 0px !important;\n max-height: 100%;\n height: 100%;\n }\n .p-dialog-maximized .p-dialog-content {\n flex-grow: 1;\n }\n\n .p-confirm-dialog .p-dialog-content {\n display: flex;\n align-items: center;\n }\n}\n",classes:{mask:function(o){var t=o.props,e=["left","right","top","topleft","topright","bottom","bottomleft","bottomright"].find((function(o){return o===t.position}));return["p-dialog-mask",{"p-component-overlay p-component-overlay-enter":t.modal},e?"p-dialog-".concat(e):""]},root:function(o){var t=o.props,e=o.instance;return["p-dialog p-component",{"p-dialog-rtl":t.rtl,"p-dialog-maximized":t.maximizable&&e.maximized,"p-input-filled":"filled"===e.$primevue.config.inputStyle,"p-ripple-disabled":!1===e.$primevue.config.ripple}]},header:"p-dialog-header",title:"p-dialog-title",icons:"p-dialog-header-icons",maximizableButton:"p-dialog-header-icon p-dialog-header-maximize p-link",maximizableIcon:"p-dialog-header-maximize-icon",closeButton:"p-dialog-header-icon p-dialog-header-close p-link",closeButtonIcon:"p-dialog-header-close-icon",content:"p-dialog-content",footer:"p-dialog-footer"},inlineStyles:{mask:function(o){var t=o.position;return{position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:"left"===t||"topleft"===t||"bottomleft"===t?"flex-start":"right"===t||"topright"===t||"bottomright"===t?"flex-end":"center",alignItems:"top"===t||"topleft"===t||"topright"===t?"flex-start":"bottom"===t||"bottomleft"===t||"bottomright"===t?"flex-end":"center",pointerEvents:o.modal?"auto":"none"}},root:{display:"flex",flexDirection:"column",pointerEvents:"auto"}}});module.exports=t;
|
|
@@ -47,8 +47,8 @@ var classes = {
|
|
|
47
47
|
}];
|
|
48
48
|
},
|
|
49
49
|
header: 'p-dialog-header',
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
title: 'p-dialog-title',
|
|
51
|
+
icons: 'p-dialog-header-icons',
|
|
52
52
|
maximizableButton: 'p-dialog-header-icon p-dialog-header-maximize p-link',
|
|
53
53
|
maximizableIcon: 'p-dialog-header-maximize-icon',
|
|
54
54
|
closeButton: 'p-dialog-header-icon p-dialog-header-close p-link',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"primevue/base/style";var t=o.extend({name:"dialog",css:"\n@layer primevue {\n .p-dialog-mask.p-component-overlay {\n pointer-events: auto;\n }\n\n .p-dialog {\n max-height: 90%;\n transform: scale(1);\n }\n\n .p-dialog-content {\n overflow-y: auto;\n }\n\n .p-dialog-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-shrink: 0;\n }\n\n .p-dialog-footer {\n flex-shrink: 0;\n }\n\n .p-dialog .p-dialog-header-icons {\n display: flex;\n align-items: center;\n }\n\n .p-dialog .p-dialog-header-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n\n /* Fluid */\n .p-fluid .p-dialog-footer .p-button {\n width: auto;\n }\n\n /* Animation */\n /* Center */\n .p-dialog-enter-active {\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n }\n .p-dialog-leave-active {\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n }\n .p-dialog-enter-from,\n .p-dialog-leave-to {\n opacity: 0;\n transform: scale(0.7);\n }\n\n /* Top, Bottom, Left, Right, Top* and Bottom* */\n .p-dialog-top .p-dialog,\n .p-dialog-bottom .p-dialog,\n .p-dialog-left .p-dialog,\n .p-dialog-right .p-dialog,\n .p-dialog-topleft .p-dialog,\n .p-dialog-topright .p-dialog,\n .p-dialog-bottomleft .p-dialog,\n .p-dialog-bottomright .p-dialog {\n margin: 0.75rem;\n transform: translate3d(0px, 0px, 0px);\n }\n .p-dialog-top .p-dialog-enter-active,\n .p-dialog-top .p-dialog-leave-active,\n .p-dialog-bottom .p-dialog-enter-active,\n .p-dialog-bottom .p-dialog-leave-active,\n .p-dialog-left .p-dialog-enter-active,\n .p-dialog-left .p-dialog-leave-active,\n .p-dialog-right .p-dialog-enter-active,\n .p-dialog-right .p-dialog-leave-active,\n .p-dialog-topleft .p-dialog-enter-active,\n .p-dialog-topleft .p-dialog-leave-active,\n .p-dialog-topright .p-dialog-enter-active,\n .p-dialog-topright .p-dialog-leave-active,\n .p-dialog-bottomleft .p-dialog-enter-active,\n .p-dialog-bottomleft .p-dialog-leave-active,\n .p-dialog-bottomright .p-dialog-enter-active,\n .p-dialog-bottomright .p-dialog-leave-active {\n transition: all 0.3s ease-out;\n }\n .p-dialog-top .p-dialog-enter-from,\n .p-dialog-top .p-dialog-leave-to {\n transform: translate3d(0px, -100%, 0px);\n }\n .p-dialog-bottom .p-dialog-enter-from,\n .p-dialog-bottom .p-dialog-leave-to {\n transform: translate3d(0px, 100%, 0px);\n }\n .p-dialog-left .p-dialog-enter-from,\n .p-dialog-left .p-dialog-leave-to,\n .p-dialog-topleft .p-dialog-enter-from,\n .p-dialog-topleft .p-dialog-leave-to,\n .p-dialog-bottomleft .p-dialog-enter-from,\n .p-dialog-bottomleft .p-dialog-leave-to {\n transform: translate3d(-100%, 0px, 0px);\n }\n .p-dialog-right .p-dialog-enter-from,\n .p-dialog-right .p-dialog-leave-to,\n .p-dialog-topright .p-dialog-enter-from,\n .p-dialog-topright .p-dialog-leave-to,\n .p-dialog-bottomright .p-dialog-enter-from,\n .p-dialog-bottomright .p-dialog-leave-to {\n transform: translate3d(100%, 0px, 0px);\n }\n\n /* Maximize */\n .p-dialog-maximized {\n -webkit-transition: none;\n transition: none;\n transform: none;\n width: 100vw !important;\n height: 100vh !important;\n top: 0px !important;\n left: 0px !important;\n max-height: 100%;\n height: 100%;\n }\n .p-dialog-maximized .p-dialog-content {\n flex-grow: 1;\n }\n\n .p-confirm-dialog .p-dialog-content {\n display: flex;\n align-items: center;\n }\n}\n",classes:{mask:function(o){var t=o.props,
|
|
1
|
+
import o from"primevue/base/style";var t=o.extend({name:"dialog",css:"\n@layer primevue {\n .p-dialog-mask.p-component-overlay {\n pointer-events: auto;\n }\n\n .p-dialog {\n max-height: 90%;\n transform: scale(1);\n }\n\n .p-dialog-content {\n overflow-y: auto;\n }\n\n .p-dialog-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-shrink: 0;\n }\n\n .p-dialog-footer {\n flex-shrink: 0;\n }\n\n .p-dialog .p-dialog-header-icons {\n display: flex;\n align-items: center;\n }\n\n .p-dialog .p-dialog-header-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n\n /* Fluid */\n .p-fluid .p-dialog-footer .p-button {\n width: auto;\n }\n\n /* Animation */\n /* Center */\n .p-dialog-enter-active {\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n }\n .p-dialog-leave-active {\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n }\n .p-dialog-enter-from,\n .p-dialog-leave-to {\n opacity: 0;\n transform: scale(0.7);\n }\n\n /* Top, Bottom, Left, Right, Top* and Bottom* */\n .p-dialog-top .p-dialog,\n .p-dialog-bottom .p-dialog,\n .p-dialog-left .p-dialog,\n .p-dialog-right .p-dialog,\n .p-dialog-topleft .p-dialog,\n .p-dialog-topright .p-dialog,\n .p-dialog-bottomleft .p-dialog,\n .p-dialog-bottomright .p-dialog {\n margin: 0.75rem;\n transform: translate3d(0px, 0px, 0px);\n }\n .p-dialog-top .p-dialog-enter-active,\n .p-dialog-top .p-dialog-leave-active,\n .p-dialog-bottom .p-dialog-enter-active,\n .p-dialog-bottom .p-dialog-leave-active,\n .p-dialog-left .p-dialog-enter-active,\n .p-dialog-left .p-dialog-leave-active,\n .p-dialog-right .p-dialog-enter-active,\n .p-dialog-right .p-dialog-leave-active,\n .p-dialog-topleft .p-dialog-enter-active,\n .p-dialog-topleft .p-dialog-leave-active,\n .p-dialog-topright .p-dialog-enter-active,\n .p-dialog-topright .p-dialog-leave-active,\n .p-dialog-bottomleft .p-dialog-enter-active,\n .p-dialog-bottomleft .p-dialog-leave-active,\n .p-dialog-bottomright .p-dialog-enter-active,\n .p-dialog-bottomright .p-dialog-leave-active {\n transition: all 0.3s ease-out;\n }\n .p-dialog-top .p-dialog-enter-from,\n .p-dialog-top .p-dialog-leave-to {\n transform: translate3d(0px, -100%, 0px);\n }\n .p-dialog-bottom .p-dialog-enter-from,\n .p-dialog-bottom .p-dialog-leave-to {\n transform: translate3d(0px, 100%, 0px);\n }\n .p-dialog-left .p-dialog-enter-from,\n .p-dialog-left .p-dialog-leave-to,\n .p-dialog-topleft .p-dialog-enter-from,\n .p-dialog-topleft .p-dialog-leave-to,\n .p-dialog-bottomleft .p-dialog-enter-from,\n .p-dialog-bottomleft .p-dialog-leave-to {\n transform: translate3d(-100%, 0px, 0px);\n }\n .p-dialog-right .p-dialog-enter-from,\n .p-dialog-right .p-dialog-leave-to,\n .p-dialog-topright .p-dialog-enter-from,\n .p-dialog-topright .p-dialog-leave-to,\n .p-dialog-bottomright .p-dialog-enter-from,\n .p-dialog-bottomright .p-dialog-leave-to {\n transform: translate3d(100%, 0px, 0px);\n }\n\n /* Maximize */\n .p-dialog-maximized {\n -webkit-transition: none;\n transition: none;\n transform: none;\n width: 100vw !important;\n height: 100vh !important;\n top: 0px !important;\n left: 0px !important;\n max-height: 100%;\n height: 100%;\n }\n .p-dialog-maximized .p-dialog-content {\n flex-grow: 1;\n }\n\n .p-confirm-dialog .p-dialog-content {\n display: flex;\n align-items: center;\n }\n}\n",classes:{mask:function(o){var t=o.props,n=["left","right","top","topleft","topright","bottom","bottomleft","bottomright"].find((function(o){return o===t.position}));return["p-dialog-mask",{"p-component-overlay p-component-overlay-enter":t.modal},n?"p-dialog-".concat(n):""]},root:function(o){var t=o.props,n=o.instance;return["p-dialog p-component",{"p-dialog-rtl":t.rtl,"p-dialog-maximized":t.maximizable&&n.maximized,"p-input-filled":"filled"===n.$primevue.config.inputStyle,"p-ripple-disabled":!1===n.$primevue.config.ripple}]},header:"p-dialog-header",title:"p-dialog-title",icons:"p-dialog-header-icons",maximizableButton:"p-dialog-header-icon p-dialog-header-maximize p-link",maximizableIcon:"p-dialog-header-maximize-icon",closeButton:"p-dialog-header-icon p-dialog-header-close p-link",closeButtonIcon:"p-dialog-header-close-icon",content:"p-dialog-content",footer:"p-dialog-footer"},inlineStyles:{mask:function(o){var t=o.position;return{position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:"left"===t||"topleft"===t||"bottomleft"===t?"flex-start":"right"===t||"topright"===t||"bottomright"===t?"flex-end":"center",alignItems:"top"===t||"topleft"===t||"topright"===t?"flex-start":"bottom"===t||"bottomleft"===t||"bottomright"===t?"flex-end":"center",pointerEvents:o.modal?"auto":"none"}},root:{display:"flex",flexDirection:"column",pointerEvents:"auto"}}});export{t as default};
|
|
@@ -54,8 +54,8 @@ this.primevue.dialog.style = (function (BaseStyle) {
|
|
|
54
54
|
}];
|
|
55
55
|
},
|
|
56
56
|
header: 'p-dialog-header',
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
title: 'p-dialog-title',
|
|
58
|
+
icons: 'p-dialog-header-icons',
|
|
59
59
|
maximizableButton: 'p-dialog-header-icon p-dialog-header-maximize p-link',
|
|
60
60
|
maximizableIcon: 'p-dialog-header-maximize-icon',
|
|
61
61
|
closeButton: 'p-dialog-header-icon p-dialog-header-close p-link',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.dialog=this.primevue.dialog||{},this.primevue.dialog.style=function(t){"use strict";function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}return o(primevue.base.style).default.extend({name:"dialog",css:"\n@layer primevue {\n .p-dialog-mask.p-component-overlay {\n pointer-events: auto;\n }\n\n .p-dialog {\n max-height: 90%;\n transform: scale(1);\n }\n\n .p-dialog-content {\n overflow-y: auto;\n }\n\n .p-dialog-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-shrink: 0;\n }\n\n .p-dialog-footer {\n flex-shrink: 0;\n }\n\n .p-dialog .p-dialog-header-icons {\n display: flex;\n align-items: center;\n }\n\n .p-dialog .p-dialog-header-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n\n /* Fluid */\n .p-fluid .p-dialog-footer .p-button {\n width: auto;\n }\n\n /* Animation */\n /* Center */\n .p-dialog-enter-active {\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n }\n .p-dialog-leave-active {\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n }\n .p-dialog-enter-from,\n .p-dialog-leave-to {\n opacity: 0;\n transform: scale(0.7);\n }\n\n /* Top, Bottom, Left, Right, Top* and Bottom* */\n .p-dialog-top .p-dialog,\n .p-dialog-bottom .p-dialog,\n .p-dialog-left .p-dialog,\n .p-dialog-right .p-dialog,\n .p-dialog-topleft .p-dialog,\n .p-dialog-topright .p-dialog,\n .p-dialog-bottomleft .p-dialog,\n .p-dialog-bottomright .p-dialog {\n margin: 0.75rem;\n transform: translate3d(0px, 0px, 0px);\n }\n .p-dialog-top .p-dialog-enter-active,\n .p-dialog-top .p-dialog-leave-active,\n .p-dialog-bottom .p-dialog-enter-active,\n .p-dialog-bottom .p-dialog-leave-active,\n .p-dialog-left .p-dialog-enter-active,\n .p-dialog-left .p-dialog-leave-active,\n .p-dialog-right .p-dialog-enter-active,\n .p-dialog-right .p-dialog-leave-active,\n .p-dialog-topleft .p-dialog-enter-active,\n .p-dialog-topleft .p-dialog-leave-active,\n .p-dialog-topright .p-dialog-enter-active,\n .p-dialog-topright .p-dialog-leave-active,\n .p-dialog-bottomleft .p-dialog-enter-active,\n .p-dialog-bottomleft .p-dialog-leave-active,\n .p-dialog-bottomright .p-dialog-enter-active,\n .p-dialog-bottomright .p-dialog-leave-active {\n transition: all 0.3s ease-out;\n }\n .p-dialog-top .p-dialog-enter-from,\n .p-dialog-top .p-dialog-leave-to {\n transform: translate3d(0px, -100%, 0px);\n }\n .p-dialog-bottom .p-dialog-enter-from,\n .p-dialog-bottom .p-dialog-leave-to {\n transform: translate3d(0px, 100%, 0px);\n }\n .p-dialog-left .p-dialog-enter-from,\n .p-dialog-left .p-dialog-leave-to,\n .p-dialog-topleft .p-dialog-enter-from,\n .p-dialog-topleft .p-dialog-leave-to,\n .p-dialog-bottomleft .p-dialog-enter-from,\n .p-dialog-bottomleft .p-dialog-leave-to {\n transform: translate3d(-100%, 0px, 0px);\n }\n .p-dialog-right .p-dialog-enter-from,\n .p-dialog-right .p-dialog-leave-to,\n .p-dialog-topright .p-dialog-enter-from,\n .p-dialog-topright .p-dialog-leave-to,\n .p-dialog-bottomright .p-dialog-enter-from,\n .p-dialog-bottomright .p-dialog-leave-to {\n transform: translate3d(100%, 0px, 0px);\n }\n\n /* Maximize */\n .p-dialog-maximized {\n -webkit-transition: none;\n transition: none;\n transform: none;\n width: 100vw !important;\n height: 100vh !important;\n top: 0px !important;\n left: 0px !important;\n max-height: 100%;\n height: 100%;\n }\n .p-dialog-maximized .p-dialog-content {\n flex-grow: 1;\n }\n\n .p-confirm-dialog .p-dialog-content {\n display: flex;\n align-items: center;\n }\n}\n",classes:{mask:function(t){var o=t.props,e=["left","right","top","topleft","topright","bottom","bottomleft","bottomright"].find((function(t){return t===o.position}));return["p-dialog-mask",{"p-component-overlay p-component-overlay-enter":o.modal},e?"p-dialog-".concat(e):""]},root:function(t){var o=t.props,e=t.instance;return["p-dialog p-component",{"p-dialog-rtl":o.rtl,"p-dialog-maximized":o.maximizable&&e.maximized,"p-input-filled":"filled"===e.$primevue.config.inputStyle,"p-ripple-disabled":!1===e.$primevue.config.ripple}]},header:"p-dialog-header",
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.dialog=this.primevue.dialog||{},this.primevue.dialog.style=function(t){"use strict";function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}return o(primevue.base.style).default.extend({name:"dialog",css:"\n@layer primevue {\n .p-dialog-mask.p-component-overlay {\n pointer-events: auto;\n }\n\n .p-dialog {\n max-height: 90%;\n transform: scale(1);\n }\n\n .p-dialog-content {\n overflow-y: auto;\n }\n\n .p-dialog-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-shrink: 0;\n }\n\n .p-dialog-footer {\n flex-shrink: 0;\n }\n\n .p-dialog .p-dialog-header-icons {\n display: flex;\n align-items: center;\n }\n\n .p-dialog .p-dialog-header-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n\n /* Fluid */\n .p-fluid .p-dialog-footer .p-button {\n width: auto;\n }\n\n /* Animation */\n /* Center */\n .p-dialog-enter-active {\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n }\n .p-dialog-leave-active {\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n }\n .p-dialog-enter-from,\n .p-dialog-leave-to {\n opacity: 0;\n transform: scale(0.7);\n }\n\n /* Top, Bottom, Left, Right, Top* and Bottom* */\n .p-dialog-top .p-dialog,\n .p-dialog-bottom .p-dialog,\n .p-dialog-left .p-dialog,\n .p-dialog-right .p-dialog,\n .p-dialog-topleft .p-dialog,\n .p-dialog-topright .p-dialog,\n .p-dialog-bottomleft .p-dialog,\n .p-dialog-bottomright .p-dialog {\n margin: 0.75rem;\n transform: translate3d(0px, 0px, 0px);\n }\n .p-dialog-top .p-dialog-enter-active,\n .p-dialog-top .p-dialog-leave-active,\n .p-dialog-bottom .p-dialog-enter-active,\n .p-dialog-bottom .p-dialog-leave-active,\n .p-dialog-left .p-dialog-enter-active,\n .p-dialog-left .p-dialog-leave-active,\n .p-dialog-right .p-dialog-enter-active,\n .p-dialog-right .p-dialog-leave-active,\n .p-dialog-topleft .p-dialog-enter-active,\n .p-dialog-topleft .p-dialog-leave-active,\n .p-dialog-topright .p-dialog-enter-active,\n .p-dialog-topright .p-dialog-leave-active,\n .p-dialog-bottomleft .p-dialog-enter-active,\n .p-dialog-bottomleft .p-dialog-leave-active,\n .p-dialog-bottomright .p-dialog-enter-active,\n .p-dialog-bottomright .p-dialog-leave-active {\n transition: all 0.3s ease-out;\n }\n .p-dialog-top .p-dialog-enter-from,\n .p-dialog-top .p-dialog-leave-to {\n transform: translate3d(0px, -100%, 0px);\n }\n .p-dialog-bottom .p-dialog-enter-from,\n .p-dialog-bottom .p-dialog-leave-to {\n transform: translate3d(0px, 100%, 0px);\n }\n .p-dialog-left .p-dialog-enter-from,\n .p-dialog-left .p-dialog-leave-to,\n .p-dialog-topleft .p-dialog-enter-from,\n .p-dialog-topleft .p-dialog-leave-to,\n .p-dialog-bottomleft .p-dialog-enter-from,\n .p-dialog-bottomleft .p-dialog-leave-to {\n transform: translate3d(-100%, 0px, 0px);\n }\n .p-dialog-right .p-dialog-enter-from,\n .p-dialog-right .p-dialog-leave-to,\n .p-dialog-topright .p-dialog-enter-from,\n .p-dialog-topright .p-dialog-leave-to,\n .p-dialog-bottomright .p-dialog-enter-from,\n .p-dialog-bottomright .p-dialog-leave-to {\n transform: translate3d(100%, 0px, 0px);\n }\n\n /* Maximize */\n .p-dialog-maximized {\n -webkit-transition: none;\n transition: none;\n transform: none;\n width: 100vw !important;\n height: 100vh !important;\n top: 0px !important;\n left: 0px !important;\n max-height: 100%;\n height: 100%;\n }\n .p-dialog-maximized .p-dialog-content {\n flex-grow: 1;\n }\n\n .p-confirm-dialog .p-dialog-content {\n display: flex;\n align-items: center;\n }\n}\n",classes:{mask:function(t){var o=t.props,e=["left","right","top","topleft","topright","bottom","bottomleft","bottomright"].find((function(t){return t===o.position}));return["p-dialog-mask",{"p-component-overlay p-component-overlay-enter":o.modal},e?"p-dialog-".concat(e):""]},root:function(t){var o=t.props,e=t.instance;return["p-dialog p-component",{"p-dialog-rtl":o.rtl,"p-dialog-maximized":o.maximizable&&e.maximized,"p-input-filled":"filled"===e.$primevue.config.inputStyle,"p-ripple-disabled":!1===e.$primevue.config.ripple}]},header:"p-dialog-header",title:"p-dialog-title",icons:"p-dialog-header-icons",maximizableButton:"p-dialog-header-icon p-dialog-header-maximize p-link",maximizableIcon:"p-dialog-header-maximize-icon",closeButton:"p-dialog-header-icon p-dialog-header-close p-link",closeButtonIcon:"p-dialog-header-close-icon",content:"p-dialog-content",footer:"p-dialog-footer"},inlineStyles:{mask:function(t){var o=t.position;return{position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:"left"===o||"topleft"===o||"bottomleft"===o?"flex-start":"right"===o||"topright"===o||"bottomright"===o?"flex-end":"center",alignItems:"top"===o||"topleft"===o||"topright"===o?"flex-start":"bottom"===o||"bottomleft"===o||"bottomright"===o?"flex-end":"center",pointerEvents:t.modal?"auto":"none"}},root:{display:"flex",flexDirection:"column",pointerEvents:"auto"}}})}();
|
package/dock/BaseDock.vue
CHANGED
package/dock/Dock.d.ts
CHANGED
|
@@ -186,6 +186,11 @@ export interface DockProps {
|
|
|
186
186
|
* Inline style of the element.
|
|
187
187
|
*/
|
|
188
188
|
style?: any;
|
|
189
|
+
/**
|
|
190
|
+
* The breakpoint to define the maximum width boundary.
|
|
191
|
+
* @defaultValue 960px
|
|
192
|
+
*/
|
|
193
|
+
breakpoint?: string | undefined;
|
|
189
194
|
/**
|
|
190
195
|
* Whether to apply 'router-link-active-exact' class if route exactly matches the item path.
|
|
191
196
|
* @deprecated since v3.40.0.
|
package/dock/Dock.vue
CHANGED
|
@@ -11,6 +11,20 @@ import DockSub from './DockSub.vue';
|
|
|
11
11
|
export default {
|
|
12
12
|
name: 'Dock',
|
|
13
13
|
extends: BaseDock,
|
|
14
|
+
data() {
|
|
15
|
+
return {
|
|
16
|
+
queryMatches: false
|
|
17
|
+
};
|
|
18
|
+
},
|
|
19
|
+
mounted() {
|
|
20
|
+
const query = matchMedia(`(max-width: ${this.breakpoint})`);
|
|
21
|
+
|
|
22
|
+
this.queryMatches = query.matches;
|
|
23
|
+
|
|
24
|
+
query.addEventListener('change', () => {
|
|
25
|
+
this.queryMatches = query.matches;
|
|
26
|
+
});
|
|
27
|
+
},
|
|
14
28
|
computed: {
|
|
15
29
|
containerClass() {
|
|
16
30
|
return [this.class, this.cx('root')];
|
package/dock/dock.cjs.js
CHANGED
|
@@ -34,6 +34,10 @@ var script$2 = {
|
|
|
34
34
|
type: Number,
|
|
35
35
|
"default": 0
|
|
36
36
|
},
|
|
37
|
+
breakpoint: {
|
|
38
|
+
type: String,
|
|
39
|
+
"default": '960px'
|
|
40
|
+
},
|
|
37
41
|
'aria-label': {
|
|
38
42
|
type: String,
|
|
39
43
|
"default": null
|
|
@@ -353,6 +357,19 @@ script$1.render = render$1;
|
|
|
353
357
|
var script = {
|
|
354
358
|
name: 'Dock',
|
|
355
359
|
"extends": script$2,
|
|
360
|
+
data: function data() {
|
|
361
|
+
return {
|
|
362
|
+
queryMatches: false
|
|
363
|
+
};
|
|
364
|
+
},
|
|
365
|
+
mounted: function mounted() {
|
|
366
|
+
var _this = this;
|
|
367
|
+
var query = matchMedia("(max-width: ".concat(this.breakpoint, ")"));
|
|
368
|
+
this.queryMatches = query.matches;
|
|
369
|
+
query.addEventListener('change', function () {
|
|
370
|
+
_this.queryMatches = query.matches;
|
|
371
|
+
});
|
|
372
|
+
},
|
|
356
373
|
computed: {
|
|
357
374
|
containerClass: function containerClass() {
|
|
358
375
|
return [this["class"], this.cx('root')];
|
package/dock/dock.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/basecomponent"),t=require("primevue/dock/style"),n=require("primevue/ripple"),i=require("primevue/tooltip"),o=require("primevue/utils"),
|
|
1
|
+
"use strict";var e=require("primevue/basecomponent"),t=require("primevue/dock/style"),n=require("primevue/ripple"),i=require("primevue/tooltip"),o=require("primevue/utils"),a=require("vue");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=r(e),l={name:"BaseDock",extends:s.default,props:{position:{type:String,default:"bottom"},model:null,class:null,style:null,tooltipOptions:null,menuId:{type:String,default:null},tabindex:{type:Number,default:0},breakpoint:{type:String,default:"960px"},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},style:r(t).default,provide:function(){return{$parentInstance:this}}};function c(e){return m(e)||p(e)||u(e)||d()}function d(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}function p(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function m(e){if(Array.isArray(e))return f(e)}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var h={name:"DockSub",hostName:"Dock",extends:s.default,emits:["focus","blur"],props:{position:{type:String,default:"bottom"},model:{type:Array,default:null},templates:{type:null,default:null},tooltipOptions:null,menuId:{type:String,default:null},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},data:function(){return{id:this.menuId,currentIndex:-3,focused:!1,focusedOptionIndex:-1}},watch:{menuId:function(e){this.id=e||o.UniqueComponentId()}},mounted:function(){this.id=this.id||o.UniqueComponentId()},methods:{getItemId:function(e){return"".concat(this.id,"_").concat(e)},getItemProp:function(e,t){return e&&e.item?o.ObjectUtils.getItemValue(e.item[t]):void 0},getPTOptions:function(e,t,n){return this.ptm(e,{context:{index:n,item:t,active:this.isItemActive(this.getItemId(n))}})},isSameMenuItem:function(e){return e.currentTarget&&(e.currentTarget.isSameNode(e.target)||e.currentTarget.isSameNode(e.target.closest('[data-pc-section="menuitem"]')))},isItemActive:function(e){return e===this.focusedOptionIndex},onListMouseLeave:function(){this.currentIndex=-3},onItemMouseEnter:function(e){this.currentIndex=e},onItemClick:function(e,t){if(this.isSameMenuItem(e)){var n=this.getItemProp(t,"command");n&&n({originalEvent:e,item:t.item})}},onListFocus:function(e){this.focused=!0,this.changeFocusedOptionIndex(0),this.$emit("focus",e)},onListBlur:function(e){this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onListKeyDown:function(e){switch(e.code){case"ArrowDown":"left"!==this.position&&"right"!==this.position||this.onArrowDownKey(),e.preventDefault();break;case"ArrowUp":"left"!==this.position&&"right"!==this.position||this.onArrowUpKey(),e.preventDefault();break;case"ArrowRight":"top"!==this.position&&"bottom"!==this.position||this.onArrowDownKey(),e.preventDefault();break;case"ArrowLeft":"top"!==this.position&&"bottom"!==this.position||this.onArrowUpKey(),e.preventDefault();break;case"Home":this.onHomeKey(),e.preventDefault();break;case"End":this.onEndKey(),e.preventDefault();break;case"Enter":case"Space":this.onSpaceKey(e),e.preventDefault()}},onArrowDownKey:function(){var e=this.findNextOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(e)},onArrowUpKey:function(){var e=this.findPrevOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(e)},onHomeKey:function(){this.changeFocusedOptionIndex(0)},onEndKey:function(){this.changeFocusedOptionIndex(o.DomHandler.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]').length-1)},onSpaceKey:function(){var e=o.DomHandler.findSingle(this.$refs.list,'li[id="'.concat("".concat(this.focusedOptionIndex),'"]')),t=e&&o.DomHandler.findSingle(e,'[data-pc-section="action"]');t?t.click():e&&e.click()},findNextOptionIndex:function(e){var t=c(o.DomHandler.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]')).findIndex((function(t){return t.id===e}));return t>-1?t+1:0},findPrevOptionIndex:function(e){var t=c(o.DomHandler.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]')).findIndex((function(t){return t.id===e}));return t>-1?t-1:0},changeFocusedOptionIndex:function(e){var t=o.DomHandler.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]');this.focusedOptionIndex=t[e>=t.length?t.length-1:e<0?0:e].getAttribute("id")},disabled:function(e){return"function"==typeof e.disabled?e.disabled():e.disabled},getMenuItemProps:function(e,t){return{action:a.mergeProps({tabindex:-1,"aria-hidden":!0,class:this.cx("action")},this.getPTOptions("action",e,t)),icon:a.mergeProps({class:[this.cx("icon"),e.icon]},this.getPTOptions("icon",e,t))}}},computed:{focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null}},directives:{ripple:r(n).default,tooltip:r(i).default}},b=["id","aria-orientation","aria-activedescendant","tabindex","aria-label","aria-labelledby"],y=["id","aria-label","aria-disabled","onClick","onMouseenter","data-p-focused","data-p-disabled"],g=["href","target"];h.render=function(e,t,n,i,o,r){var s=a.resolveDirective("ripple"),l=a.resolveDirective("tooltip");return a.openBlock(),a.createElementBlock("div",a.mergeProps({class:e.cx("container")},e.ptm("container")),[a.createElementVNode("ul",a.mergeProps({ref:"list",id:o.id,class:e.cx("menu"),role:"menu","aria-orientation":"bottom"===n.position||"top"===n.position?"horizontal":"vertical","aria-activedescendant":o.focused?r.focusedOptionId:void 0,tabindex:n.tabindex,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,onFocus:t[0]||(t[0]=function(){return r.onListFocus&&r.onListFocus.apply(r,arguments)}),onBlur:t[1]||(t[1]=function(){return r.onListBlur&&r.onListBlur.apply(r,arguments)}),onKeydown:t[2]||(t[2]=function(){return r.onListKeyDown&&r.onListKeyDown.apply(r,arguments)}),onMouseleave:t[3]||(t[3]=function(){return r.onListMouseLeave&&r.onListMouseLeave.apply(r,arguments)})},e.ptm("menu")),[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.model,(function(t,i){return a.openBlock(),a.createElementBlock("li",a.mergeProps({key:i,id:r.getItemId(i),class:e.cx("menuitem",{processedItem:t,index:i,id:r.getItemId(i)}),role:"menuitem","aria-label":t.label,"aria-disabled":r.disabled(t),onClick:function(e){return r.onItemClick(e,t)},onMouseenter:function(e){return r.onItemMouseEnter(i)}},r.getPTOptions("menuitem",t,i),{"data-p-focused":r.isItemActive(r.getItemId(i)),"data-p-disabled":r.disabled(t)||!1}),[a.createElementVNode("div",a.mergeProps({class:e.cx("content")},r.getPTOptions("content",t,i)),[n.templates.item?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.templates.item),{key:1,item:t,index:i,label:t.label,props:r.getMenuItemProps(t,i)},null,8,["item","index","label","props"])):a.withDirectives((a.openBlock(),a.createElementBlock("a",a.mergeProps({key:0,href:t.url,class:e.cx("action"),target:t.target,tabindex:"-1","aria-hidden":"true"},r.getPTOptions("action",t,i)),[n.templates.icon?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.templates.icon),{key:1,item:t,class:a.normalizeClass(e.cx("icon"))},null,8,["item","class"])):a.withDirectives((a.openBlock(),a.createElementBlock("span",a.mergeProps({key:0,class:[e.cx("icon"),t.icon]},r.getPTOptions("icon",t,i)),null,16)),[[s]])],16,g)),[[l,{value:t.label,disabled:!n.tooltipOptions},n.tooltipOptions]])],16)],16,y)})),128))],16,b)],16)};var v={name:"Dock",extends:l,data:function(){return{queryMatches:!1}},mounted:function(){var e=this,t=matchMedia("(max-width: ".concat(this.breakpoint,")"));this.queryMatches=t.matches,t.addEventListener("change",(function(){e.queryMatches=t.matches}))},computed:{containerClass:function(){return[this.class,this.cx("root")]}},components:{DockSub:h}};v.render=function(e,t,n,i,o,r){var s=a.resolveComponent("DockSub");return a.openBlock(),a.createElementBlock("div",a.mergeProps({class:r.containerClass,style:e.style},e.ptm("root"),{"data-pc-name":"dock"}),[a.createVNode(s,{model:e.model,templates:e.$slots,tooltipOptions:e.tooltipOptions,position:e.position,menuId:e.menuId,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,tabindex:e.tabindex,pt:e.pt,unstyled:e.unstyled},null,8,["model","templates","tooltipOptions","position","menuId","aria-label","aria-labelledby","tabindex","pt","unstyled"])],16)},module.exports=v;
|
package/dock/dock.esm.js
CHANGED
|
@@ -25,6 +25,10 @@ var script$2 = {
|
|
|
25
25
|
type: Number,
|
|
26
26
|
"default": 0
|
|
27
27
|
},
|
|
28
|
+
breakpoint: {
|
|
29
|
+
type: String,
|
|
30
|
+
"default": '960px'
|
|
31
|
+
},
|
|
28
32
|
'aria-label': {
|
|
29
33
|
type: String,
|
|
30
34
|
"default": null
|
|
@@ -344,6 +348,19 @@ script$1.render = render$1;
|
|
|
344
348
|
var script = {
|
|
345
349
|
name: 'Dock',
|
|
346
350
|
"extends": script$2,
|
|
351
|
+
data: function data() {
|
|
352
|
+
return {
|
|
353
|
+
queryMatches: false
|
|
354
|
+
};
|
|
355
|
+
},
|
|
356
|
+
mounted: function mounted() {
|
|
357
|
+
var _this = this;
|
|
358
|
+
var query = matchMedia("(max-width: ".concat(this.breakpoint, ")"));
|
|
359
|
+
this.queryMatches = query.matches;
|
|
360
|
+
query.addEventListener('change', function () {
|
|
361
|
+
_this.queryMatches = query.matches;
|
|
362
|
+
});
|
|
363
|
+
},
|
|
347
364
|
computed: {
|
|
348
365
|
containerClass: function containerClass() {
|
|
349
366
|
return [this["class"], this.cx('root')];
|
package/dock/dock.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"primevue/basecomponent";import e from"primevue/dock/style";import n from"primevue/ripple";import i from"primevue/tooltip";import{UniqueComponentId as o,ObjectUtils as a,DomHandler as r}from"primevue/utils";import{mergeProps as s,resolveDirective as l,openBlock as d,createElementBlock as u,createElementVNode as c,Fragment as p,renderList as m,withDirectives as f,createBlock as
|
|
1
|
+
import t from"primevue/basecomponent";import e from"primevue/dock/style";import n from"primevue/ripple";import i from"primevue/tooltip";import{UniqueComponentId as o,ObjectUtils as a,DomHandler as r}from"primevue/utils";import{mergeProps as s,resolveDirective as l,openBlock as d,createElementBlock as u,createElementVNode as c,Fragment as p,renderList as m,withDirectives as f,createBlock as h,resolveDynamicComponent as b,normalizeClass as y,resolveComponent as I,createVNode as x}from"vue";var g={name:"BaseDock",extends:t,props:{position:{type:String,default:"bottom"},model:null,class:null,style:null,tooltipOptions:null,menuId:{type:String,default:null},tabindex:{type:Number,default:0},breakpoint:{type:String,default:"960px"},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},style:e,provide:function(){return{$parentInstance:this}}};function v(t){return w(t)||S(t)||k(t)||O()}function O(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function k(t,e){if(t){if("string"==typeof t)return A(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(t,e):void 0}}function S(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function w(t){if(Array.isArray(t))return A(t)}function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var L={name:"DockSub",hostName:"Dock",extends:t,emits:["focus","blur"],props:{position:{type:String,default:"bottom"},model:{type:Array,default:null},templates:{type:null,default:null},tooltipOptions:null,menuId:{type:String,default:null},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},data:function(){return{id:this.menuId,currentIndex:-3,focused:!1,focusedOptionIndex:-1}},watch:{menuId:function(t){this.id=t||o()}},mounted:function(){this.id=this.id||o()},methods:{getItemId:function(t){return"".concat(this.id,"_").concat(t)},getItemProp:function(t,e){return t&&t.item?a.getItemValue(t.item[e]):void 0},getPTOptions:function(t,e,n){return this.ptm(t,{context:{index:n,item:e,active:this.isItemActive(this.getItemId(n))}})},isSameMenuItem:function(t){return t.currentTarget&&(t.currentTarget.isSameNode(t.target)||t.currentTarget.isSameNode(t.target.closest('[data-pc-section="menuitem"]')))},isItemActive:function(t){return t===this.focusedOptionIndex},onListMouseLeave:function(){this.currentIndex=-3},onItemMouseEnter:function(t){this.currentIndex=t},onItemClick:function(t,e){if(this.isSameMenuItem(t)){var n=this.getItemProp(e,"command");n&&n({originalEvent:t,item:e.item})}},onListFocus:function(t){this.focused=!0,this.changeFocusedOptionIndex(0),this.$emit("focus",t)},onListBlur:function(t){this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",t)},onListKeyDown:function(t){switch(t.code){case"ArrowDown":"left"!==this.position&&"right"!==this.position||this.onArrowDownKey(),t.preventDefault();break;case"ArrowUp":"left"!==this.position&&"right"!==this.position||this.onArrowUpKey(),t.preventDefault();break;case"ArrowRight":"top"!==this.position&&"bottom"!==this.position||this.onArrowDownKey(),t.preventDefault();break;case"ArrowLeft":"top"!==this.position&&"bottom"!==this.position||this.onArrowUpKey(),t.preventDefault();break;case"Home":this.onHomeKey(),t.preventDefault();break;case"End":this.onEndKey(),t.preventDefault();break;case"Enter":case"Space":this.onSpaceKey(t),t.preventDefault()}},onArrowDownKey:function(){var t=this.findNextOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(t)},onArrowUpKey:function(){var t=this.findPrevOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(t)},onHomeKey:function(){this.changeFocusedOptionIndex(0)},onEndKey:function(){this.changeFocusedOptionIndex(r.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]').length-1)},onSpaceKey:function(){var t=r.findSingle(this.$refs.list,'li[id="'.concat("".concat(this.focusedOptionIndex),'"]')),e=t&&r.findSingle(t,'[data-pc-section="action"]');e?e.click():t&&t.click()},findNextOptionIndex:function(t){var e=v(r.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]')).findIndex((function(e){return e.id===t}));return e>-1?e+1:0},findPrevOptionIndex:function(t){var e=v(r.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]')).findIndex((function(e){return e.id===t}));return e>-1?e-1:0},changeFocusedOptionIndex:function(t){var e=r.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]');this.focusedOptionIndex=e[t>=e.length?e.length-1:t<0?0:t].getAttribute("id")},disabled:function(t){return"function"==typeof t.disabled?t.disabled():t.disabled},getMenuItemProps:function(t,e){return{action:s({tabindex:-1,"aria-hidden":!0,class:this.cx("action")},this.getPTOptions("action",t,e)),icon:s({class:[this.cx("icon"),t.icon]},this.getPTOptions("icon",t,e))}}},computed:{focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null}},directives:{ripple:n,tooltip:i}},D=["id","aria-orientation","aria-activedescendant","tabindex","aria-label","aria-labelledby"],M=["id","aria-label","aria-disabled","onClick","onMouseenter","data-p-focused","data-p-disabled"],K=["href","target"];L.render=function(t,e,n,i,o,a){var r=l("ripple"),I=l("tooltip");return d(),u("div",s({class:t.cx("container")},t.ptm("container")),[c("ul",s({ref:"list",id:o.id,class:t.cx("menu"),role:"menu","aria-orientation":"bottom"===n.position||"top"===n.position?"horizontal":"vertical","aria-activedescendant":o.focused?a.focusedOptionId:void 0,tabindex:n.tabindex,"aria-label":t.ariaLabel,"aria-labelledby":t.ariaLabelledby,onFocus:e[0]||(e[0]=function(){return a.onListFocus&&a.onListFocus.apply(a,arguments)}),onBlur:e[1]||(e[1]=function(){return a.onListBlur&&a.onListBlur.apply(a,arguments)}),onKeydown:e[2]||(e[2]=function(){return a.onListKeyDown&&a.onListKeyDown.apply(a,arguments)}),onMouseleave:e[3]||(e[3]=function(){return a.onListMouseLeave&&a.onListMouseLeave.apply(a,arguments)})},t.ptm("menu")),[(d(!0),u(p,null,m(n.model,(function(e,i){return d(),u("li",s({key:i,id:a.getItemId(i),class:t.cx("menuitem",{processedItem:e,index:i,id:a.getItemId(i)}),role:"menuitem","aria-label":e.label,"aria-disabled":a.disabled(e),onClick:function(t){return a.onItemClick(t,e)},onMouseenter:function(t){return a.onItemMouseEnter(i)}},a.getPTOptions("menuitem",e,i),{"data-p-focused":a.isItemActive(a.getItemId(i)),"data-p-disabled":a.disabled(e)||!1}),[c("div",s({class:t.cx("content")},a.getPTOptions("content",e,i)),[n.templates.item?(d(),h(b(n.templates.item),{key:1,item:e,index:i,label:e.label,props:a.getMenuItemProps(e,i)},null,8,["item","index","label","props"])):f((d(),u("a",s({key:0,href:e.url,class:t.cx("action"),target:e.target,tabindex:"-1","aria-hidden":"true"},a.getPTOptions("action",e,i)),[n.templates.icon?(d(),h(b(n.templates.icon),{key:1,item:e,class:y(t.cx("icon"))},null,8,["item","class"])):f((d(),u("span",s({key:0,class:[t.cx("icon"),e.icon]},a.getPTOptions("icon",e,i)),null,16)),[[r]])],16,K)),[[I,{value:e.label,disabled:!n.tooltipOptions},n.tooltipOptions]])],16)],16,M)})),128))],16,D)],16)};var P={name:"Dock",extends:g,data:function(){return{queryMatches:!1}},mounted:function(){var t=this,e=matchMedia("(max-width: ".concat(this.breakpoint,")"));this.queryMatches=e.matches,e.addEventListener("change",(function(){t.queryMatches=e.matches}))},computed:{containerClass:function(){return[this.class,this.cx("root")]}},components:{DockSub:L}};P.render=function(t,e,n,i,o,a){var r=I("DockSub");return d(),u("div",s({class:a.containerClass,style:t.style},t.ptm("root"),{"data-pc-name":"dock"}),[x(r,{model:t.model,templates:t.$slots,tooltipOptions:t.tooltipOptions,position:t.position,menuId:t.menuId,"aria-label":t.ariaLabel,"aria-labelledby":t.ariaLabelledby,tabindex:t.tabindex,pt:t.pt,unstyled:t.unstyled},null,8,["model","templates","tooltipOptions","position","menuId","aria-label","aria-labelledby","tabindex","pt","unstyled"])],16)};export{P as default};
|
package/dock/dock.js
CHANGED
|
@@ -29,6 +29,10 @@ this.primevue.dock = (function (BaseComponent, DockStyle, Ripple, Tooltip, utils
|
|
|
29
29
|
type: Number,
|
|
30
30
|
"default": 0
|
|
31
31
|
},
|
|
32
|
+
breakpoint: {
|
|
33
|
+
type: String,
|
|
34
|
+
"default": '960px'
|
|
35
|
+
},
|
|
32
36
|
'aria-label': {
|
|
33
37
|
type: String,
|
|
34
38
|
"default": null
|
|
@@ -348,6 +352,19 @@ this.primevue.dock = (function (BaseComponent, DockStyle, Ripple, Tooltip, utils
|
|
|
348
352
|
var script = {
|
|
349
353
|
name: 'Dock',
|
|
350
354
|
"extends": script$2,
|
|
355
|
+
data: function data() {
|
|
356
|
+
return {
|
|
357
|
+
queryMatches: false
|
|
358
|
+
};
|
|
359
|
+
},
|
|
360
|
+
mounted: function mounted() {
|
|
361
|
+
var _this = this;
|
|
362
|
+
var query = matchMedia("(max-width: ".concat(this.breakpoint, ")"));
|
|
363
|
+
this.queryMatches = query.matches;
|
|
364
|
+
query.addEventListener('change', function () {
|
|
365
|
+
_this.queryMatches = query.matches;
|
|
366
|
+
});
|
|
367
|
+
},
|
|
351
368
|
computed: {
|
|
352
369
|
containerClass: function containerClass() {
|
|
353
370
|
return [this["class"], this.cx('root')];
|
package/dock/dock.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.dock=function(e,t,n,i,o,a){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=r(e),l={name:"BaseDock",extends:s.default,props:{position:{type:String,default:"bottom"},model:null,class:null,style:null,tooltipOptions:null,menuId:{type:String,default:null},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},style:r(t).default,provide:function(){return{$parentInstance:this}}};function c(e){return m(e)||p(e)||u(e)||d()}function d(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}function p(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function m(e){if(Array.isArray(e))return f(e)}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var h={name:"DockSub",hostName:"Dock",extends:s.default,emits:["focus","blur"],props:{position:{type:String,default:"bottom"},model:{type:Array,default:null},templates:{type:null,default:null},tooltipOptions:null,menuId:{type:String,default:null},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},data:function(){return{id:this.menuId,currentIndex:-3,focused:!1,focusedOptionIndex:-1}},watch:{menuId:function(e){this.id=e||o.UniqueComponentId()}},mounted:function(){this.id=this.id||o.UniqueComponentId()},methods:{getItemId:function(e){return"".concat(this.id,"_").concat(e)},getItemProp:function(e,t){return e&&e.item?o.ObjectUtils.getItemValue(e.item[t]):void 0},getPTOptions:function(e,t,n){return this.ptm(e,{context:{index:n,item:t,active:this.isItemActive(this.getItemId(n))}})},isSameMenuItem:function(e){return e.currentTarget&&(e.currentTarget.isSameNode(e.target)||e.currentTarget.isSameNode(e.target.closest('[data-pc-section="menuitem"]')))},isItemActive:function(e){return e===this.focusedOptionIndex},onListMouseLeave:function(){this.currentIndex=-3},onItemMouseEnter:function(e){this.currentIndex=e},onItemClick:function(e,t){if(this.isSameMenuItem(e)){var n=this.getItemProp(t,"command");n&&n({originalEvent:e,item:t.item})}},onListFocus:function(e){this.focused=!0,this.changeFocusedOptionIndex(0),this.$emit("focus",e)},onListBlur:function(e){this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onListKeyDown:function(e){switch(e.code){case"ArrowDown":"left"!==this.position&&"right"!==this.position||this.onArrowDownKey(),e.preventDefault();break;case"ArrowUp":"left"!==this.position&&"right"!==this.position||this.onArrowUpKey(),e.preventDefault();break;case"ArrowRight":"top"!==this.position&&"bottom"!==this.position||this.onArrowDownKey(),e.preventDefault();break;case"ArrowLeft":"top"!==this.position&&"bottom"!==this.position||this.onArrowUpKey(),e.preventDefault();break;case"Home":this.onHomeKey(),e.preventDefault();break;case"End":this.onEndKey(),e.preventDefault();break;case"Enter":case"Space":this.onSpaceKey(e),e.preventDefault()}},onArrowDownKey:function(){var e=this.findNextOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(e)},onArrowUpKey:function(){var e=this.findPrevOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(e)},onHomeKey:function(){this.changeFocusedOptionIndex(0)},onEndKey:function(){this.changeFocusedOptionIndex(o.DomHandler.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]').length-1)},onSpaceKey:function(){var e=o.DomHandler.findSingle(this.$refs.list,'li[id="'.concat("".concat(this.focusedOptionIndex),'"]')),t=e&&o.DomHandler.findSingle(e,'[data-pc-section="action"]');t?t.click():e&&e.click()},findNextOptionIndex:function(e){var t=c(o.DomHandler.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]')).findIndex((function(t){return t.id===e}));return t>-1?t+1:0},findPrevOptionIndex:function(e){var t=c(o.DomHandler.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]')).findIndex((function(t){return t.id===e}));return t>-1?t-1:0},changeFocusedOptionIndex:function(e){var t=o.DomHandler.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]');this.focusedOptionIndex=t[e>=t.length?t.length-1:e<0?0:e].getAttribute("id")},disabled:function(e){return"function"==typeof e.disabled?e.disabled():e.disabled},getMenuItemProps:function(e,t){return{action:a.mergeProps({tabindex:-1,"aria-hidden":!0,class:this.cx("action")},this.getPTOptions("action",e,t)),icon:a.mergeProps({class:[this.cx("icon"),e.icon]},this.getPTOptions("icon",e,t))}}},computed:{focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null}},directives:{ripple:r(n).default,tooltip:r(i).default}},b=["id","aria-orientation","aria-activedescendant","tabindex","aria-label","aria-labelledby"],y=["id","aria-label","aria-disabled","onClick","onMouseenter","data-p-focused","data-p-disabled"],g=["href","target"];h.render=function(e,t,n,i,o,r){var s=a.resolveDirective("ripple"),l=a.resolveDirective("tooltip");return a.openBlock(),a.createElementBlock("div",a.mergeProps({class:e.cx("container")},e.ptm("container")),[a.createElementVNode("ul",a.mergeProps({ref:"list",id:o.id,class:e.cx("menu"),role:"menu","aria-orientation":"bottom"===n.position||"top"===n.position?"horizontal":"vertical","aria-activedescendant":o.focused?r.focusedOptionId:void 0,tabindex:n.tabindex,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,onFocus:t[0]||(t[0]=function(){return r.onListFocus&&r.onListFocus.apply(r,arguments)}),onBlur:t[1]||(t[1]=function(){return r.onListBlur&&r.onListBlur.apply(r,arguments)}),onKeydown:t[2]||(t[2]=function(){return r.onListKeyDown&&r.onListKeyDown.apply(r,arguments)}),onMouseleave:t[3]||(t[3]=function(){return r.onListMouseLeave&&r.onListMouseLeave.apply(r,arguments)})},e.ptm("menu")),[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.model,(function(t,i){return a.openBlock(),a.createElementBlock("li",a.mergeProps({key:i,id:r.getItemId(i),class:e.cx("menuitem",{processedItem:t,index:i,id:r.getItemId(i)}),role:"menuitem","aria-label":t.label,"aria-disabled":r.disabled(t),onClick:function(e){return r.onItemClick(e,t)},onMouseenter:function(e){return r.onItemMouseEnter(i)}},r.getPTOptions("menuitem",t,i),{"data-p-focused":r.isItemActive(r.getItemId(i)),"data-p-disabled":r.disabled(t)||!1}),[a.createElementVNode("div",a.mergeProps({class:e.cx("content")},r.getPTOptions("content",t,i)),[n.templates.item?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.templates.item),{key:1,item:t,index:i,label:t.label,props:r.getMenuItemProps(t,i)},null,8,["item","index","label","props"])):a.withDirectives((a.openBlock(),a.createElementBlock("a",a.mergeProps({key:0,href:t.url,class:e.cx("action"),target:t.target,tabindex:"-1","aria-hidden":"true"},r.getPTOptions("action",t,i)),[n.templates.icon?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.templates.icon),{key:1,item:t,class:a.normalizeClass(e.cx("icon"))},null,8,["item","class"])):a.withDirectives((a.openBlock(),a.createElementBlock("span",a.mergeProps({key:0,class:[e.cx("icon"),t.icon]},r.getPTOptions("icon",t,i)),null,16)),[[s]])],16,g)),[[l,{value:t.label,disabled:!n.tooltipOptions},n.tooltipOptions]])],16)],16,y)})),128))],16,b)],16)};var
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.dock=function(e,t,n,i,o,a){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=r(e),l={name:"BaseDock",extends:s.default,props:{position:{type:String,default:"bottom"},model:null,class:null,style:null,tooltipOptions:null,menuId:{type:String,default:null},tabindex:{type:Number,default:0},breakpoint:{type:String,default:"960px"},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},style:r(t).default,provide:function(){return{$parentInstance:this}}};function c(e){return m(e)||p(e)||u(e)||d()}function d(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}function p(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function m(e){if(Array.isArray(e))return f(e)}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var h={name:"DockSub",hostName:"Dock",extends:s.default,emits:["focus","blur"],props:{position:{type:String,default:"bottom"},model:{type:Array,default:null},templates:{type:null,default:null},tooltipOptions:null,menuId:{type:String,default:null},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},data:function(){return{id:this.menuId,currentIndex:-3,focused:!1,focusedOptionIndex:-1}},watch:{menuId:function(e){this.id=e||o.UniqueComponentId()}},mounted:function(){this.id=this.id||o.UniqueComponentId()},methods:{getItemId:function(e){return"".concat(this.id,"_").concat(e)},getItemProp:function(e,t){return e&&e.item?o.ObjectUtils.getItemValue(e.item[t]):void 0},getPTOptions:function(e,t,n){return this.ptm(e,{context:{index:n,item:t,active:this.isItemActive(this.getItemId(n))}})},isSameMenuItem:function(e){return e.currentTarget&&(e.currentTarget.isSameNode(e.target)||e.currentTarget.isSameNode(e.target.closest('[data-pc-section="menuitem"]')))},isItemActive:function(e){return e===this.focusedOptionIndex},onListMouseLeave:function(){this.currentIndex=-3},onItemMouseEnter:function(e){this.currentIndex=e},onItemClick:function(e,t){if(this.isSameMenuItem(e)){var n=this.getItemProp(t,"command");n&&n({originalEvent:e,item:t.item})}},onListFocus:function(e){this.focused=!0,this.changeFocusedOptionIndex(0),this.$emit("focus",e)},onListBlur:function(e){this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onListKeyDown:function(e){switch(e.code){case"ArrowDown":"left"!==this.position&&"right"!==this.position||this.onArrowDownKey(),e.preventDefault();break;case"ArrowUp":"left"!==this.position&&"right"!==this.position||this.onArrowUpKey(),e.preventDefault();break;case"ArrowRight":"top"!==this.position&&"bottom"!==this.position||this.onArrowDownKey(),e.preventDefault();break;case"ArrowLeft":"top"!==this.position&&"bottom"!==this.position||this.onArrowUpKey(),e.preventDefault();break;case"Home":this.onHomeKey(),e.preventDefault();break;case"End":this.onEndKey(),e.preventDefault();break;case"Enter":case"Space":this.onSpaceKey(e),e.preventDefault()}},onArrowDownKey:function(){var e=this.findNextOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(e)},onArrowUpKey:function(){var e=this.findPrevOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(e)},onHomeKey:function(){this.changeFocusedOptionIndex(0)},onEndKey:function(){this.changeFocusedOptionIndex(o.DomHandler.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]').length-1)},onSpaceKey:function(){var e=o.DomHandler.findSingle(this.$refs.list,'li[id="'.concat("".concat(this.focusedOptionIndex),'"]')),t=e&&o.DomHandler.findSingle(e,'[data-pc-section="action"]');t?t.click():e&&e.click()},findNextOptionIndex:function(e){var t=c(o.DomHandler.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]')).findIndex((function(t){return t.id===e}));return t>-1?t+1:0},findPrevOptionIndex:function(e){var t=c(o.DomHandler.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]')).findIndex((function(t){return t.id===e}));return t>-1?t-1:0},changeFocusedOptionIndex:function(e){var t=o.DomHandler.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]');this.focusedOptionIndex=t[e>=t.length?t.length-1:e<0?0:e].getAttribute("id")},disabled:function(e){return"function"==typeof e.disabled?e.disabled():e.disabled},getMenuItemProps:function(e,t){return{action:a.mergeProps({tabindex:-1,"aria-hidden":!0,class:this.cx("action")},this.getPTOptions("action",e,t)),icon:a.mergeProps({class:[this.cx("icon"),e.icon]},this.getPTOptions("icon",e,t))}}},computed:{focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null}},directives:{ripple:r(n).default,tooltip:r(i).default}},b=["id","aria-orientation","aria-activedescendant","tabindex","aria-label","aria-labelledby"],y=["id","aria-label","aria-disabled","onClick","onMouseenter","data-p-focused","data-p-disabled"],g=["href","target"];h.render=function(e,t,n,i,o,r){var s=a.resolveDirective("ripple"),l=a.resolveDirective("tooltip");return a.openBlock(),a.createElementBlock("div",a.mergeProps({class:e.cx("container")},e.ptm("container")),[a.createElementVNode("ul",a.mergeProps({ref:"list",id:o.id,class:e.cx("menu"),role:"menu","aria-orientation":"bottom"===n.position||"top"===n.position?"horizontal":"vertical","aria-activedescendant":o.focused?r.focusedOptionId:void 0,tabindex:n.tabindex,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,onFocus:t[0]||(t[0]=function(){return r.onListFocus&&r.onListFocus.apply(r,arguments)}),onBlur:t[1]||(t[1]=function(){return r.onListBlur&&r.onListBlur.apply(r,arguments)}),onKeydown:t[2]||(t[2]=function(){return r.onListKeyDown&&r.onListKeyDown.apply(r,arguments)}),onMouseleave:t[3]||(t[3]=function(){return r.onListMouseLeave&&r.onListMouseLeave.apply(r,arguments)})},e.ptm("menu")),[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.model,(function(t,i){return a.openBlock(),a.createElementBlock("li",a.mergeProps({key:i,id:r.getItemId(i),class:e.cx("menuitem",{processedItem:t,index:i,id:r.getItemId(i)}),role:"menuitem","aria-label":t.label,"aria-disabled":r.disabled(t),onClick:function(e){return r.onItemClick(e,t)},onMouseenter:function(e){return r.onItemMouseEnter(i)}},r.getPTOptions("menuitem",t,i),{"data-p-focused":r.isItemActive(r.getItemId(i)),"data-p-disabled":r.disabled(t)||!1}),[a.createElementVNode("div",a.mergeProps({class:e.cx("content")},r.getPTOptions("content",t,i)),[n.templates.item?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.templates.item),{key:1,item:t,index:i,label:t.label,props:r.getMenuItemProps(t,i)},null,8,["item","index","label","props"])):a.withDirectives((a.openBlock(),a.createElementBlock("a",a.mergeProps({key:0,href:t.url,class:e.cx("action"),target:t.target,tabindex:"-1","aria-hidden":"true"},r.getPTOptions("action",t,i)),[n.templates.icon?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.templates.icon),{key:1,item:t,class:a.normalizeClass(e.cx("icon"))},null,8,["item","class"])):a.withDirectives((a.openBlock(),a.createElementBlock("span",a.mergeProps({key:0,class:[e.cx("icon"),t.icon]},r.getPTOptions("icon",t,i)),null,16)),[[s]])],16,g)),[[l,{value:t.label,disabled:!n.tooltipOptions},n.tooltipOptions]])],16)],16,y)})),128))],16,b)],16)};var v={name:"Dock",extends:l,data:function(){return{queryMatches:!1}},mounted:function(){var e=this,t=matchMedia("(max-width: ".concat(this.breakpoint,")"));this.queryMatches=t.matches,t.addEventListener("change",(function(){e.queryMatches=t.matches}))},computed:{containerClass:function(){return[this.class,this.cx("root")]}},components:{DockSub:h}};return v.render=function(e,t,n,i,o,r){var s=a.resolveComponent("DockSub");return a.openBlock(),a.createElementBlock("div",a.mergeProps({class:r.containerClass,style:e.style},e.ptm("root"),{"data-pc-name":"dock"}),[a.createVNode(s,{model:e.model,templates:e.$slots,tooltipOptions:e.tooltipOptions,position:e.position,menuId:e.menuId,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,tabindex:e.tabindex,pt:e.pt,unstyled:e.unstyled},null,8,["model","templates","tooltipOptions","position","menuId","aria-label","aria-labelledby","tabindex","pt","unstyled"])],16)},v}(primevue.basecomponent,primevue.dock.style,primevue.ripple,primevue.tooltip,primevue.utils,Vue);
|