primevue 3.8.2 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/api/Api.d.ts +70 -36
- package/api/api.cjs.js +66 -32
- package/api/api.cjs.min.js +1 -1
- package/api/api.esm.js +66 -32
- package/api/api.esm.min.js +1 -1
- package/api/api.js +66 -32
- package/api/api.min.js +1 -1
- package/autocomplete/AutoComplete.vue +16 -9
- package/autocomplete/autocomplete.cjs.js +19 -11
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +19 -11
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +19 -11
- package/autocomplete/autocomplete.min.js +1 -1
- package/breadcrumb/BreadcrumbItem.vue +5 -2
- package/breadcrumb/breadcrumb.cjs.js +5 -2
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +5 -2
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +5 -2
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/calendar/Calendar.d.ts +6 -0
- package/calendar/Calendar.vue +362 -67
- package/calendar/calendar.cjs.js +459 -168
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +461 -170
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +459 -168
- package/calendar/calendar.min.js +1 -1
- package/carousel/Carousel.vue +2 -2
- package/carousel/carousel.cjs.js +6 -6
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +6 -6
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +6 -6
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +8 -4
- package/chart/Chart.vue +9 -2
- package/chart/chart.cjs.js +9 -2
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +9 -2
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +9 -2
- package/chart/chart.min.js +1 -1
- package/colorpicker/ColorPicker.d.ts +3 -0
- package/colorpicker/ColorPicker.vue +6 -1
- package/colorpicker/colorpicker.cjs.js +6 -1
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +6 -1
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +6 -1
- package/colorpicker/colorpicker.min.js +1 -1
- package/confirmdialog/ConfirmDialog.vue +8 -2
- package/confirmdialog/confirmdialog.cjs.js +11 -4
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +11 -4
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +11 -4
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/ConfirmPopup.d.ts +7 -0
- package/confirmpopup/ConfirmPopup.vue +7 -4
- package/confirmpopup/confirmpopup.cjs.js +13 -5
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +14 -6
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +13 -5
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/ContextMenuSub.vue +7 -4
- package/contextmenu/contextmenu.cjs.js +7 -4
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +7 -4
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +7 -4
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +132 -65
- package/core/core.min.js +14 -11
- package/datatable/BodyCell.vue +1 -0
- package/datatable/ColumnFilter.vue +17 -6
- package/datatable/DataTable.d.ts +5 -4
- package/datatable/DataTable.vue +34 -21
- package/datatable/TableBody.vue +5 -1
- package/datatable/TableFooter.vue +15 -1
- package/datatable/TableHeader.vue +15 -1
- package/datatable/datatable.cjs.js +175 -106
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +175 -106
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +175 -106
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.d.ts +2 -2
- package/dataview/DataView.vue +8 -8
- package/dataview/dataview.cjs.js +12 -12
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +12 -12
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +12 -12
- package/dataview/dataview.min.js +1 -1
- package/dropdown/Dropdown.d.ts +10 -5
- package/inputnumber/InputNumber.vue +19 -3
- package/inputnumber/inputnumber.cjs.js +19 -3
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +19 -3
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +19 -3
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputtext/InputText.vue +1 -1
- package/inputtext/inputtext.cjs.js +2 -2
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +3 -3
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +2 -2
- package/inputtext/inputtext.min.js +1 -1
- package/listbox/Listbox.d.ts +10 -5
- package/megamenu/MegaMenu.vue +10 -7
- package/megamenu/megamenu.cjs.js +10 -7
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +10 -7
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +10 -7
- package/megamenu/megamenu.min.js +1 -1
- package/menu/Menu.vue +6 -3
- package/menu/Menuitem.vue +5 -2
- package/menu/menu.cjs.js +11 -5
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +11 -5
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +11 -5
- package/menu/menu.min.js +1 -1
- package/menubar/MenubarSub.vue +7 -4
- package/menubar/menubar.cjs.js +7 -4
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +7 -4
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +7 -4
- package/menubar/menubar.min.js +1 -1
- package/message/Message.d.ts +1 -0
- package/message/Message.vue +6 -2
- package/message/message.cjs.js +6 -2
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +6 -2
- package/message/message.esm.min.js +1 -1
- package/message/message.js +6 -2
- package/message/message.min.js +1 -1
- package/multiselect/MultiSelect.d.ts +10 -5
- package/orderlist/OrderList.d.ts +2 -0
- package/orderlist/OrderList.vue +2 -0
- package/orderlist/orderlist.cjs.js +3 -1
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +3 -1
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +3 -1
- package/orderlist/orderlist.min.js +1 -1
- package/package.json +5 -1
- package/paginator/Paginator.vue +4 -4
- package/paginator/paginator.cjs.js +4 -4
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +4 -4
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +4 -4
- package/paginator/paginator.min.js +1 -1
- package/panel/Panel.d.ts +1 -0
- package/panel/Panel.vue +1 -1
- package/panelmenu/PanelMenu.vue +6 -3
- package/panelmenu/PanelMenuSub.vue +8 -5
- package/panelmenu/panelmenu.cjs.js +14 -8
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +14 -8
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +14 -8
- package/panelmenu/panelmenu.min.js +1 -1
- package/picklist/PickList.d.ts +8 -2
- package/picklist/PickList.vue +10 -4
- package/picklist/picklist.cjs.js +13 -7
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +13 -7
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +13 -7
- package/picklist/picklist.min.js +1 -1
- package/progressbar/ProgressBar.vue +13 -12
- package/progressbar/progressbar.cjs.js +13 -12
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +14 -13
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +13 -12
- package/progressbar/progressbar.min.js +1 -1
- package/rating/Rating.vue +1 -1
- package/rating/rating.cjs.js +1 -1
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +1 -1
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +1 -1
- package/rating/rating.min.js +1 -1
- package/resources/primevue.css +5 -0
- package/resources/primevue.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +56 -15
- package/resources/themes/arya-green/theme.css +56 -15
- package/resources/themes/arya-orange/theme.css +56 -15
- package/resources/themes/arya-purple/theme.css +56 -15
- package/resources/themes/bootstrap4-dark-blue/theme.css +53 -19
- package/resources/themes/bootstrap4-dark-purple/theme.css +53 -19
- package/resources/themes/bootstrap4-light-blue/theme.css +53 -19
- package/resources/themes/bootstrap4-light-purple/theme.css +53 -19
- package/resources/themes/fluent-light/theme.css +56 -15
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-blue/theme.css +5414 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/theme.css +5414 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-purple/theme.css +5414 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/theme.css +5414 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-blue/theme.css +5414 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-indigo/theme.css +5414 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-purple/theme.css +5414 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-teal/theme.css +5414 -0
- package/resources/themes/luna-amber/theme.css +53 -19
- package/resources/themes/luna-blue/theme.css +53 -19
- package/resources/themes/luna-green/theme.css +53 -19
- package/resources/themes/luna-pink/theme.css +53 -19
- package/resources/themes/md-dark-deeppurple/theme.css +244 -47
- package/resources/themes/md-dark-indigo/theme.css +244 -47
- package/resources/themes/md-light-deeppurple/theme.css +244 -47
- package/resources/themes/md-light-indigo/theme.css +244 -47
- package/resources/themes/mdc-dark-deeppurple/theme.css +244 -47
- package/resources/themes/mdc-dark-indigo/theme.css +244 -47
- package/resources/themes/mdc-light-deeppurple/theme.css +244 -47
- package/resources/themes/mdc-light-indigo/theme.css +244 -47
- package/resources/themes/nova/theme.css +53 -19
- package/resources/themes/nova-accent/theme.css +53 -19
- package/resources/themes/nova-alt/theme.css +53 -19
- package/resources/themes/nova-vue/theme.css +53 -19
- package/resources/themes/rhea/theme.css +53 -19
- package/resources/themes/saga-blue/theme.css +56 -15
- package/resources/themes/saga-green/theme.css +56 -15
- package/resources/themes/saga-orange/theme.css +56 -15
- package/resources/themes/saga-purple/theme.css +56 -15
- package/resources/themes/tailwind-light/theme.css +67 -18
- package/resources/themes/vela-blue/theme.css +56 -15
- package/resources/themes/vela-green/theme.css +56 -15
- package/resources/themes/vela-orange/theme.css +56 -15
- package/resources/themes/vela-purple/theme.css +56 -15
- package/selectbutton/SelectButton.d.ts +8 -3
- package/selectbutton/SelectButton.vue +8 -2
- package/selectbutton/selectbutton.cjs.js +14 -9
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +14 -9
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +14 -9
- package/selectbutton/selectbutton.min.js +1 -1
- package/steps/Steps.vue +5 -2
- package/steps/steps.cjs.js +5 -2
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +5 -2
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +5 -2
- package/steps/steps.min.js +1 -1
- package/tabmenu/TabMenu.vue +6 -3
- package/tabmenu/tabmenu.cjs.js +6 -3
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +6 -3
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +6 -3
- package/tabmenu/tabmenu.min.js +1 -1
- package/terminalservice/TerminalService.d.ts +9 -6
- package/tieredmenu/TieredMenuSub.vue +7 -4
- package/tieredmenu/tieredmenu.cjs.js +7 -4
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +7 -4
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +7 -4
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/tree/TreeNode.vue +4 -1
- package/tree/tree.cjs.js +4 -1
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +4 -1
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +4 -1
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.vue +9 -0
- package/treeselect/treeselect.cjs.js +9 -0
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +9 -0
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +9 -0
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/TreeTable.d.ts +2 -2
- package/treetable/TreeTable.vue +8 -8
- package/treetable/treetable.cjs.js +12 -12
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +12 -12
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +12 -12
- package/treetable/treetable.min.js +1 -1
- package/vetur-attributes.json +8 -0
- package/vetur-tags.json +3 -1
- package/web-types.json +143 -9
|
@@ -100,6 +100,12 @@ var script = {
|
|
|
100
100
|
},
|
|
101
101
|
rejectClass() {
|
|
102
102
|
return ['p-confirm-dialog-reject', this.confirmation ? (this.confirmation.rejectClass || 'p-button-text') : null];
|
|
103
|
+
},
|
|
104
|
+
autoFocusAccept() {
|
|
105
|
+
return (this.confirmation.defaultFocus === undefined || this.confirmation.defaultFocus === 'accept') ? true : false;
|
|
106
|
+
},
|
|
107
|
+
autoFocusReject() {
|
|
108
|
+
return this.confirmation.defaultFocus === 'reject' ? true : false;
|
|
103
109
|
}
|
|
104
110
|
},
|
|
105
111
|
components: {
|
|
@@ -129,15 +135,16 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
129
135
|
label: $options.rejectLabel,
|
|
130
136
|
icon: $options.rejectIcon,
|
|
131
137
|
class: $options.rejectClass,
|
|
132
|
-
onClick: _cache[1] || (_cache[1] = $event => ($options.reject()))
|
|
133
|
-
|
|
138
|
+
onClick: _cache[1] || (_cache[1] = $event => ($options.reject())),
|
|
139
|
+
autofocus: $options.autoFocusReject
|
|
140
|
+
}, null, 8, ["label", "icon", "class", "autofocus"]),
|
|
134
141
|
vue.createVNode(_component_CDButton, {
|
|
135
142
|
label: $options.acceptLabel,
|
|
136
143
|
icon: $options.acceptIcon,
|
|
137
144
|
class: $options.acceptClass,
|
|
138
145
|
onClick: _cache[2] || (_cache[2] = $event => ($options.accept())),
|
|
139
|
-
autofocus:
|
|
140
|
-
}, null, 8, ["label", "icon", "class"])
|
|
146
|
+
autofocus: $options.autoFocusAccept
|
|
147
|
+
}, null, 8, ["label", "icon", "class", "autofocus"])
|
|
141
148
|
]),
|
|
142
149
|
default: vue.withCtx(() => [
|
|
143
150
|
vue.createVNode("i", { class: $options.iconClass }, null, 2),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var t=require("primevue/confirmationeventbus"),e=require("primevue/dialog"),i=require("primevue/button"),o=require("vue");function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var c=n(t),r=n(e),s=n(i),a={name:"ConfirmDialog",props:{group:String,breakpoints:{type:Object,default:null}},confirmListener:null,closeListener:null,data:()=>({visible:!1,confirmation:null}),mounted(){this.confirmListener=t=>{t&&t.group===this.group&&(this.confirmation=t,this.visible=!0)},this.closeListener=()=>{this.visible=!1,this.confirmation=null},c.default.on("confirm",this.confirmListener),c.default.on("close",this.closeListener)},beforeUnmount(){c.default.off("confirm",this.confirmListener),c.default.off("close",this.closeListener)},methods:{accept(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1}},computed:{header(){return this.confirmation?this.confirmation.header:null},message(){return this.confirmation?this.confirmation.message:null},blockScroll(){return!this.confirmation||this.confirmation.blockScroll},position(){return this.confirmation?this.confirmation.position:null},iconClass(){return["p-confirm-dialog-icon",this.confirmation?this.confirmation.icon:null]},acceptLabel(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon(){return this.confirmation?this.confirmation.rejectIcon:null},acceptClass(){return["p-confirm-dialog-accept",this.confirmation?this.confirmation.acceptClass:null]},rejectClass(){return["p-confirm-dialog-reject",this.confirmation?this.confirmation.rejectClass||"p-button-text":null]},autoFocusAccept(){return void 0===this.confirmation.defaultFocus||"accept"===this.confirmation.defaultFocus},autoFocusReject(){return"reject"===this.confirmation.defaultFocus}},components:{CDialog:r.default,CDButton:s.default}};const l={class:"p-confirm-dialog-message"};a.render=function(t,e,i,n,c,r){const s=o.resolveComponent("CDButton"),a=o.resolveComponent("CDialog");return o.openBlock(),o.createBlock(a,{visible:c.visible,"onUpdate:visible":e[3]||(e[3]=t=>c.visible=t),modal:!0,header:r.header,blockScroll:r.blockScroll,position:r.position,class:"p-confirm-dialog",breakpoints:i.breakpoints},{footer:o.withCtx((()=>[o.createVNode(s,{label:r.rejectLabel,icon:r.rejectIcon,class:r.rejectClass,onClick:e[1]||(e[1]=t=>r.reject()),autofocus:r.autoFocusReject},null,8,["label","icon","class","autofocus"]),o.createVNode(s,{label:r.acceptLabel,icon:r.acceptIcon,class:r.acceptClass,onClick:e[2]||(e[2]=t=>r.accept()),autofocus:r.autoFocusAccept},null,8,["label","icon","class","autofocus"])])),default:o.withCtx((()=>[o.createVNode("i",{class:r.iconClass},null,2),o.createVNode("span",l,o.toDisplayString(r.message),1)])),_:1},8,["visible","header","blockScroll","position","breakpoints"])},module.exports=a;
|
|
@@ -92,6 +92,12 @@ var script = {
|
|
|
92
92
|
},
|
|
93
93
|
rejectClass() {
|
|
94
94
|
return ['p-confirm-dialog-reject', this.confirmation ? (this.confirmation.rejectClass || 'p-button-text') : null];
|
|
95
|
+
},
|
|
96
|
+
autoFocusAccept() {
|
|
97
|
+
return (this.confirmation.defaultFocus === undefined || this.confirmation.defaultFocus === 'accept') ? true : false;
|
|
98
|
+
},
|
|
99
|
+
autoFocusReject() {
|
|
100
|
+
return this.confirmation.defaultFocus === 'reject' ? true : false;
|
|
95
101
|
}
|
|
96
102
|
},
|
|
97
103
|
components: {
|
|
@@ -121,15 +127,16 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
121
127
|
label: $options.rejectLabel,
|
|
122
128
|
icon: $options.rejectIcon,
|
|
123
129
|
class: $options.rejectClass,
|
|
124
|
-
onClick: _cache[1] || (_cache[1] = $event => ($options.reject()))
|
|
125
|
-
|
|
130
|
+
onClick: _cache[1] || (_cache[1] = $event => ($options.reject())),
|
|
131
|
+
autofocus: $options.autoFocusReject
|
|
132
|
+
}, null, 8, ["label", "icon", "class", "autofocus"]),
|
|
126
133
|
createVNode(_component_CDButton, {
|
|
127
134
|
label: $options.acceptLabel,
|
|
128
135
|
icon: $options.acceptIcon,
|
|
129
136
|
class: $options.acceptClass,
|
|
130
137
|
onClick: _cache[2] || (_cache[2] = $event => ($options.accept())),
|
|
131
|
-
autofocus:
|
|
132
|
-
}, null, 8, ["label", "icon", "class"])
|
|
138
|
+
autofocus: $options.autoFocusAccept
|
|
139
|
+
}, null, 8, ["label", "icon", "class", "autofocus"])
|
|
133
140
|
]),
|
|
134
141
|
default: withCtx(() => [
|
|
135
142
|
createVNode("i", { class: $options.iconClass }, null, 2),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import i from"primevue/confirmationeventbus";import o from"primevue/dialog";import t from"primevue/button";import{resolveComponent as
|
|
1
|
+
import i from"primevue/confirmationeventbus";import o from"primevue/dialog";import t from"primevue/button";import{resolveComponent as e,openBlock as n,createBlock as c,withCtx as r,createVNode as s,toDisplayString as a}from"vue";var l={name:"ConfirmDialog",props:{group:String,breakpoints:{type:Object,default:null}},confirmListener:null,closeListener:null,data:()=>({visible:!1,confirmation:null}),mounted(){this.confirmListener=i=>{i&&i.group===this.group&&(this.confirmation=i,this.visible=!0)},this.closeListener=()=>{this.visible=!1,this.confirmation=null},i.on("confirm",this.confirmListener),i.on("close",this.closeListener)},beforeUnmount(){i.off("confirm",this.confirmListener),i.off("close",this.closeListener)},methods:{accept(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1}},computed:{header(){return this.confirmation?this.confirmation.header:null},message(){return this.confirmation?this.confirmation.message:null},blockScroll(){return!this.confirmation||this.confirmation.blockScroll},position(){return this.confirmation?this.confirmation.position:null},iconClass(){return["p-confirm-dialog-icon",this.confirmation?this.confirmation.icon:null]},acceptLabel(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon(){return this.confirmation?this.confirmation.rejectIcon:null},acceptClass(){return["p-confirm-dialog-accept",this.confirmation?this.confirmation.acceptClass:null]},rejectClass(){return["p-confirm-dialog-reject",this.confirmation?this.confirmation.rejectClass||"p-button-text":null]},autoFocusAccept(){return void 0===this.confirmation.defaultFocus||"accept"===this.confirmation.defaultFocus},autoFocusReject(){return"reject"===this.confirmation.defaultFocus}},components:{CDialog:o,CDButton:t}};const u={class:"p-confirm-dialog-message"};l.render=function(i,o,t,l,m,f){const p=e("CDButton"),h=e("CDialog");return n(),c(h,{visible:m.visible,"onUpdate:visible":o[3]||(o[3]=i=>m.visible=i),modal:!0,header:f.header,blockScroll:f.blockScroll,position:f.position,class:"p-confirm-dialog",breakpoints:t.breakpoints},{footer:r((()=>[s(p,{label:f.rejectLabel,icon:f.rejectIcon,class:f.rejectClass,onClick:o[1]||(o[1]=i=>f.reject()),autofocus:f.autoFocusReject},null,8,["label","icon","class","autofocus"]),s(p,{label:f.acceptLabel,icon:f.acceptIcon,class:f.acceptClass,onClick:o[2]||(o[2]=i=>f.accept()),autofocus:f.autoFocusAccept},null,8,["label","icon","class","autofocus"])])),default:r((()=>[s("i",{class:f.iconClass},null,2),s("span",u,a(f.message),1)])),_:1},8,["visible","header","blockScroll","position","breakpoints"])};export default l;
|
|
@@ -97,6 +97,12 @@ this.primevue.confirmdialog = (function (ConfirmationEventBus, Dialog, Button, v
|
|
|
97
97
|
},
|
|
98
98
|
rejectClass() {
|
|
99
99
|
return ['p-confirm-dialog-reject', this.confirmation ? (this.confirmation.rejectClass || 'p-button-text') : null];
|
|
100
|
+
},
|
|
101
|
+
autoFocusAccept() {
|
|
102
|
+
return (this.confirmation.defaultFocus === undefined || this.confirmation.defaultFocus === 'accept') ? true : false;
|
|
103
|
+
},
|
|
104
|
+
autoFocusReject() {
|
|
105
|
+
return this.confirmation.defaultFocus === 'reject' ? true : false;
|
|
100
106
|
}
|
|
101
107
|
},
|
|
102
108
|
components: {
|
|
@@ -126,15 +132,16 @@ this.primevue.confirmdialog = (function (ConfirmationEventBus, Dialog, Button, v
|
|
|
126
132
|
label: $options.rejectLabel,
|
|
127
133
|
icon: $options.rejectIcon,
|
|
128
134
|
class: $options.rejectClass,
|
|
129
|
-
onClick: _cache[1] || (_cache[1] = $event => ($options.reject()))
|
|
130
|
-
|
|
135
|
+
onClick: _cache[1] || (_cache[1] = $event => ($options.reject())),
|
|
136
|
+
autofocus: $options.autoFocusReject
|
|
137
|
+
}, null, 8, ["label", "icon", "class", "autofocus"]),
|
|
131
138
|
vue.createVNode(_component_CDButton, {
|
|
132
139
|
label: $options.acceptLabel,
|
|
133
140
|
icon: $options.acceptIcon,
|
|
134
141
|
class: $options.acceptClass,
|
|
135
142
|
onClick: _cache[2] || (_cache[2] = $event => ($options.accept())),
|
|
136
|
-
autofocus:
|
|
137
|
-
}, null, 8, ["label", "icon", "class"])
|
|
143
|
+
autofocus: $options.autoFocusAccept
|
|
144
|
+
}, null, 8, ["label", "icon", "class", "autofocus"])
|
|
138
145
|
]),
|
|
139
146
|
default: vue.withCtx(() => [
|
|
140
147
|
vue.createVNode("i", { class: $options.iconClass }, null, 2),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.confirmdialog=function(i,e,
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.confirmdialog=function(t,i,e,o){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var c=n(t),r=n(i),s=n(e),a={name:"ConfirmDialog",props:{group:String,breakpoints:{type:Object,default:null}},confirmListener:null,closeListener:null,data:()=>({visible:!1,confirmation:null}),mounted(){this.confirmListener=t=>{t&&t.group===this.group&&(this.confirmation=t,this.visible=!0)},this.closeListener=()=>{this.visible=!1,this.confirmation=null},c.default.on("confirm",this.confirmListener),c.default.on("close",this.closeListener)},beforeUnmount(){c.default.off("confirm",this.confirmListener),c.default.off("close",this.closeListener)},methods:{accept(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1}},computed:{header(){return this.confirmation?this.confirmation.header:null},message(){return this.confirmation?this.confirmation.message:null},blockScroll(){return!this.confirmation||this.confirmation.blockScroll},position(){return this.confirmation?this.confirmation.position:null},iconClass(){return["p-confirm-dialog-icon",this.confirmation?this.confirmation.icon:null]},acceptLabel(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon(){return this.confirmation?this.confirmation.rejectIcon:null},acceptClass(){return["p-confirm-dialog-accept",this.confirmation?this.confirmation.acceptClass:null]},rejectClass(){return["p-confirm-dialog-reject",this.confirmation?this.confirmation.rejectClass||"p-button-text":null]},autoFocusAccept(){return void 0===this.confirmation.defaultFocus||"accept"===this.confirmation.defaultFocus},autoFocusReject(){return"reject"===this.confirmation.defaultFocus}},components:{CDialog:r.default,CDButton:s.default}};const l={class:"p-confirm-dialog-message"};return a.render=function(t,i,e,n,c,r){const s=o.resolveComponent("CDButton"),a=o.resolveComponent("CDialog");return o.openBlock(),o.createBlock(a,{visible:c.visible,"onUpdate:visible":i[3]||(i[3]=t=>c.visible=t),modal:!0,header:r.header,blockScroll:r.blockScroll,position:r.position,class:"p-confirm-dialog",breakpoints:e.breakpoints},{footer:o.withCtx((()=>[o.createVNode(s,{label:r.rejectLabel,icon:r.rejectIcon,class:r.rejectClass,onClick:i[1]||(i[1]=t=>r.reject()),autofocus:r.autoFocusReject},null,8,["label","icon","class","autofocus"]),o.createVNode(s,{label:r.acceptLabel,icon:r.acceptIcon,class:r.acceptClass,onClick:i[2]||(i[2]=t=>r.accept()),autofocus:r.autoFocusAccept},null,8,["label","icon","class","autofocus"])])),default:o.withCtx((()=>[o.createVNode("i",{class:r.iconClass},null,2),o.createVNode("span",l,o.toDisplayString(r.message),1)])),_:1},8,["visible","header","blockScroll","position","breakpoints"])},a}(primevue.confirmationeventbus,primevue.dialog,primevue.button,Vue);
|
|
@@ -2,8 +2,15 @@ interface ConfirmPopupProps {
|
|
|
2
2
|
group?: string;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
+
interface ConfirmPopupMessageSlot {
|
|
6
|
+
message: any;
|
|
7
|
+
}
|
|
8
|
+
|
|
5
9
|
declare class ConfirmPopup {
|
|
6
10
|
$props: ConfirmPopupProps;
|
|
11
|
+
$slots: {
|
|
12
|
+
message: ConfirmPopupMessageSlot
|
|
13
|
+
}
|
|
7
14
|
}
|
|
8
15
|
|
|
9
16
|
export default ConfirmPopup;
|
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
<Teleport to="body">
|
|
3
3
|
<transition name="p-confirm-popup" @enter="onEnter" @leave="onLeave" @after-leave="onAfterLeave">
|
|
4
4
|
<div :class="containerClass" v-if="visible" :ref="containerRef" v-bind="$attrs" @click="onOverlayClick">
|
|
5
|
-
<
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
<template v-if="!$slots.message">
|
|
6
|
+
<div class="p-confirm-popup-content">
|
|
7
|
+
<i :class="iconClass" />
|
|
8
|
+
<span class="p-confirm-popup-message">{{confirmation.message}}</span>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
<component v-else :is="$slots.message" :message="confirmation"></component>
|
|
9
12
|
<div class="p-confirm-popup-footer">
|
|
10
13
|
<CPButton :label="rejectLabel" :icon="rejectIcon" :class="rejectClass" @click="reject()"/>
|
|
11
14
|
<CPButton :label="acceptLabel" :icon="acceptIcon" :class="acceptClass" @click="accept()" autofocus />
|
|
@@ -214,7 +214,10 @@ var script = {
|
|
|
214
214
|
}
|
|
215
215
|
};
|
|
216
216
|
|
|
217
|
-
const _hoisted_1 = {
|
|
217
|
+
const _hoisted_1 = {
|
|
218
|
+
key: 0,
|
|
219
|
+
class: "p-confirm-popup-content"
|
|
220
|
+
};
|
|
218
221
|
const _hoisted_2 = { class: "p-confirm-popup-message" };
|
|
219
222
|
const _hoisted_3 = { class: "p-confirm-popup-footer" };
|
|
220
223
|
|
|
@@ -237,10 +240,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
237
240
|
}, _ctx.$attrs, {
|
|
238
241
|
onClick: _cache[3] || (_cache[3] = (...args) => ($options.onOverlayClick && $options.onOverlayClick(...args)))
|
|
239
242
|
}), [
|
|
240
|
-
|
|
241
|
-
vue.
|
|
242
|
-
|
|
243
|
-
|
|
243
|
+
(!_ctx.$slots.message)
|
|
244
|
+
? (vue.openBlock(), vue.createBlock("div", _hoisted_1, [
|
|
245
|
+
vue.createVNode("i", { class: $options.iconClass }, null, 2),
|
|
246
|
+
vue.createVNode("span", _hoisted_2, vue.toDisplayString($data.confirmation.message), 1)
|
|
247
|
+
]))
|
|
248
|
+
: (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.$slots.message), {
|
|
249
|
+
key: 1,
|
|
250
|
+
message: $data.confirmation
|
|
251
|
+
}, null, 8, ["message"])),
|
|
244
252
|
vue.createVNode("div", _hoisted_3, [
|
|
245
253
|
vue.createVNode(_component_CPButton, {
|
|
246
254
|
label: $options.rejectLabel,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/confirmationeventbus"),t=require("primevue/utils"),i=require("primevue/overlayeventbus"),n=require("primevue/button"),r=require("vue");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=o(e),c=o(i),l={name:"ConfirmPopup",inheritAttrs:!1,props:{group:String},data:()=>({visible:!1,confirmation:null}),target:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,confirmListener:null,closeListener:null,mounted(){this.confirmListener=e=>{e&&e.group===this.group&&(this.confirmation=e,this.target=e.target,this.visible=!0)},this.closeListener=()=>{this.visible=!1,this.confirmation=null},s.default.on("confirm",this.confirmListener),s.default.on("close",this.closeListener)},beforeUnmount(){s.default.off("confirm",this.confirmListener),s.default.off("close",this.closeListener),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindResizeListener(),this.container&&(t.ZIndexUtils.clear(this.container),this.container=null),this.target=null,this.confirmation=null},methods:{accept(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1},onEnter(e){this.alignOverlay(),this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),t.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay)},onLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener()},onAfterLeave(e){t.ZIndexUtils.clear(e)},alignOverlay(){t.DomHandler.absolutePosition(this.container,this.target);const e=t.DomHandler.getOffset(this.container),i=t.DomHandler.getOffset(this.target);let n=0;e.left<i.left&&(n=i.left-e.left),this.container.style.setProperty("--overlayArrowLeft",`${n}px`),e.top<i.top&&t.DomHandler.addClass(this.container,"p-confirm-popup-flipped")},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.visible&&this.container&&!this.container.contains(e.target)&&!this.isTargetClicked(e)&&(this.visible=!1)},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new t.ConnectedOverlayScrollHandler(this.target,(()=>{this.visible&&(this.visible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.visible&&(this.visible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isTargetClicked(){return this.target&&(this.target===event.target||this.target.contains(event.target))},containerRef(e){this.container=e},onOverlayClick(e){c.default.emit("overlay-click",{originalEvent:e,target:this.target})}},computed:{containerClass(){return["p-confirm-popup p-component",{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},message(){return this.confirmation?this.confirmation.message:null},iconClass(){return["p-confirm-popup-icon",this.confirmation?this.confirmation.icon:null]},acceptLabel(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon(){return this.confirmation?this.confirmation.rejectIcon:null},acceptClass(){return["p-confirm-popup-accept p-button-sm",this.confirmation?this.confirmation.acceptClass:null]},rejectClass(){return["p-confirm-popup-reject p-button-sm",this.confirmation?this.confirmation.rejectClass||"p-button-text":null]}},components:{CPButton:o(n).default}};const a={class:"p-confirm-popup-content"},p={class:"p-confirm-popup-message"},u={class:"p-confirm-popup-footer"};!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===i&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}('\n.p-confirm-popup {\n position: absolute;\n margin-top: 10px;\n top: 0;\n left: 0;\n}\n.p-confirm-popup-flipped {\n margin-top: 0;\n margin-bottom: 10px;\n}\n\n/* Animation */\n.p-confirm-popup-enter-from {\n opacity: 0;\n -webkit-transform: scaleY(0.8);\n transform: scaleY(0.8);\n}\n.p-confirm-popup-leave-to {\n opacity: 0;\n}\n.p-confirm-popup-enter-active {\n -webkit-transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n}\n.p-confirm-popup-leave-active {\n -webkit-transition: opacity .1s linear;\n transition: opacity .1s linear;\n}\n.p-confirm-popup:after, .p-confirm-popup:before {\n\tbottom: 100%;\n\tleft: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n\tcontent: " ";\n\theight: 0;\n\twidth: 0;\n\tposition: absolute;\n\tpointer-events: none;\n}\n.p-confirm-popup:after {\n\tborder-width: 8px;\n\tmargin-left: -8px;\n}\n.p-confirm-popup:before {\n\tborder-width: 10px;\n\tmargin-left: -10px;\n}\n.p-confirm-popup-flipped:after, .p-confirm-popup-flipped:before {\n bottom: auto;\n top: 100%;\n}\n.p-confirm-popup.p-confirm-popup-flipped:after {\n border-bottom-color: transparent;\n}\n.p-confirm-popup.p-confirm-popup-flipped:before {\n border-bottom-color: transparent\n}\n.p-confirm-popup .p-confirm-popup-content {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n'),l.render=function(e,t,i,n,o,s){const c=r.resolveComponent("CPButton");return r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,{name:"p-confirm-popup",onEnter:s.onEnter,onLeave:s.onLeave,onAfterLeave:s.onAfterLeave},{default:r.withCtx((()=>[o.visible?(r.openBlock(),r.createBlock("div",r.mergeProps({key:0,class:s.containerClass,ref:s.containerRef},e.$attrs,{onClick:t[3]||(t[3]=(...e)=>s.onOverlayClick&&s.onOverlayClick(...e))}),[r.
|
|
1
|
+
"use strict";var e=require("primevue/confirmationeventbus"),t=require("primevue/utils"),i=require("primevue/overlayeventbus"),n=require("primevue/button"),r=require("vue");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=o(e),c=o(i),l={name:"ConfirmPopup",inheritAttrs:!1,props:{group:String},data:()=>({visible:!1,confirmation:null}),target:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,confirmListener:null,closeListener:null,mounted(){this.confirmListener=e=>{e&&e.group===this.group&&(this.confirmation=e,this.target=e.target,this.visible=!0)},this.closeListener=()=>{this.visible=!1,this.confirmation=null},s.default.on("confirm",this.confirmListener),s.default.on("close",this.closeListener)},beforeUnmount(){s.default.off("confirm",this.confirmListener),s.default.off("close",this.closeListener),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindResizeListener(),this.container&&(t.ZIndexUtils.clear(this.container),this.container=null),this.target=null,this.confirmation=null},methods:{accept(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1},onEnter(e){this.alignOverlay(),this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),t.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay)},onLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener()},onAfterLeave(e){t.ZIndexUtils.clear(e)},alignOverlay(){t.DomHandler.absolutePosition(this.container,this.target);const e=t.DomHandler.getOffset(this.container),i=t.DomHandler.getOffset(this.target);let n=0;e.left<i.left&&(n=i.left-e.left),this.container.style.setProperty("--overlayArrowLeft",`${n}px`),e.top<i.top&&t.DomHandler.addClass(this.container,"p-confirm-popup-flipped")},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.visible&&this.container&&!this.container.contains(e.target)&&!this.isTargetClicked(e)&&(this.visible=!1)},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new t.ConnectedOverlayScrollHandler(this.target,(()=>{this.visible&&(this.visible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.visible&&(this.visible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isTargetClicked(){return this.target&&(this.target===event.target||this.target.contains(event.target))},containerRef(e){this.container=e},onOverlayClick(e){c.default.emit("overlay-click",{originalEvent:e,target:this.target})}},computed:{containerClass(){return["p-confirm-popup p-component",{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},message(){return this.confirmation?this.confirmation.message:null},iconClass(){return["p-confirm-popup-icon",this.confirmation?this.confirmation.icon:null]},acceptLabel(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon(){return this.confirmation?this.confirmation.rejectIcon:null},acceptClass(){return["p-confirm-popup-accept p-button-sm",this.confirmation?this.confirmation.acceptClass:null]},rejectClass(){return["p-confirm-popup-reject p-button-sm",this.confirmation?this.confirmation.rejectClass||"p-button-text":null]}},components:{CPButton:o(n).default}};const a={key:0,class:"p-confirm-popup-content"},p={class:"p-confirm-popup-message"},u={class:"p-confirm-popup-footer"};!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===i&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}('\n.p-confirm-popup {\n position: absolute;\n margin-top: 10px;\n top: 0;\n left: 0;\n}\n.p-confirm-popup-flipped {\n margin-top: 0;\n margin-bottom: 10px;\n}\n\n/* Animation */\n.p-confirm-popup-enter-from {\n opacity: 0;\n -webkit-transform: scaleY(0.8);\n transform: scaleY(0.8);\n}\n.p-confirm-popup-leave-to {\n opacity: 0;\n}\n.p-confirm-popup-enter-active {\n -webkit-transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n}\n.p-confirm-popup-leave-active {\n -webkit-transition: opacity .1s linear;\n transition: opacity .1s linear;\n}\n.p-confirm-popup:after, .p-confirm-popup:before {\n\tbottom: 100%;\n\tleft: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n\tcontent: " ";\n\theight: 0;\n\twidth: 0;\n\tposition: absolute;\n\tpointer-events: none;\n}\n.p-confirm-popup:after {\n\tborder-width: 8px;\n\tmargin-left: -8px;\n}\n.p-confirm-popup:before {\n\tborder-width: 10px;\n\tmargin-left: -10px;\n}\n.p-confirm-popup-flipped:after, .p-confirm-popup-flipped:before {\n bottom: auto;\n top: 100%;\n}\n.p-confirm-popup.p-confirm-popup-flipped:after {\n border-bottom-color: transparent;\n}\n.p-confirm-popup.p-confirm-popup-flipped:before {\n border-bottom-color: transparent\n}\n.p-confirm-popup .p-confirm-popup-content {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n'),l.render=function(e,t,i,n,o,s){const c=r.resolveComponent("CPButton");return r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,{name:"p-confirm-popup",onEnter:s.onEnter,onLeave:s.onLeave,onAfterLeave:s.onAfterLeave},{default:r.withCtx((()=>[o.visible?(r.openBlock(),r.createBlock("div",r.mergeProps({key:0,class:s.containerClass,ref:s.containerRef},e.$attrs,{onClick:t[3]||(t[3]=(...e)=>s.onOverlayClick&&s.onOverlayClick(...e))}),[e.$slots.message?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(e.$slots.message),{key:1,message:o.confirmation},null,8,["message"])):(r.openBlock(),r.createBlock("div",a,[r.createVNode("i",{class:s.iconClass},null,2),r.createVNode("span",p,r.toDisplayString(o.confirmation.message),1)])),r.createVNode("div",u,[r.createVNode(c,{label:s.rejectLabel,icon:s.rejectIcon,class:s.rejectClass,onClick:t[1]||(t[1]=e=>s.reject())},null,8,["label","icon","class"]),r.createVNode(c,{label:s.acceptLabel,icon:s.acceptIcon,class:s.acceptClass,onClick:t[2]||(t[2]=e=>s.accept()),autofocus:""},null,8,["label","icon","class"])])],16)):r.createCommentVNode("",!0)])),_:1},8,["onEnter","onLeave","onAfterLeave"])])},module.exports=l;
|
|
@@ -2,7 +2,7 @@ import ConfirmationEventBus from 'primevue/confirmationeventbus';
|
|
|
2
2
|
import { ZIndexUtils, DomHandler, ConnectedOverlayScrollHandler } from 'primevue/utils';
|
|
3
3
|
import OverlayEventBus from 'primevue/overlayeventbus';
|
|
4
4
|
import Button from 'primevue/button';
|
|
5
|
-
import { resolveComponent, openBlock, createBlock, Teleport, createVNode, Transition, withCtx, mergeProps, toDisplayString, createCommentVNode } from 'vue';
|
|
5
|
+
import { resolveComponent, openBlock, createBlock, Teleport, createVNode, Transition, withCtx, mergeProps, toDisplayString, resolveDynamicComponent, createCommentVNode } from 'vue';
|
|
6
6
|
|
|
7
7
|
var script = {
|
|
8
8
|
name: 'ConfirmPopup',
|
|
@@ -206,7 +206,10 @@ var script = {
|
|
|
206
206
|
}
|
|
207
207
|
};
|
|
208
208
|
|
|
209
|
-
const _hoisted_1 = {
|
|
209
|
+
const _hoisted_1 = {
|
|
210
|
+
key: 0,
|
|
211
|
+
class: "p-confirm-popup-content"
|
|
212
|
+
};
|
|
210
213
|
const _hoisted_2 = { class: "p-confirm-popup-message" };
|
|
211
214
|
const _hoisted_3 = { class: "p-confirm-popup-footer" };
|
|
212
215
|
|
|
@@ -229,10 +232,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
229
232
|
}, _ctx.$attrs, {
|
|
230
233
|
onClick: _cache[3] || (_cache[3] = (...args) => ($options.onOverlayClick && $options.onOverlayClick(...args)))
|
|
231
234
|
}), [
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
235
|
+
(!_ctx.$slots.message)
|
|
236
|
+
? (openBlock(), createBlock("div", _hoisted_1, [
|
|
237
|
+
createVNode("i", { class: $options.iconClass }, null, 2),
|
|
238
|
+
createVNode("span", _hoisted_2, toDisplayString($data.confirmation.message), 1)
|
|
239
|
+
]))
|
|
240
|
+
: (openBlock(), createBlock(resolveDynamicComponent(_ctx.$slots.message), {
|
|
241
|
+
key: 1,
|
|
242
|
+
message: $data.confirmation
|
|
243
|
+
}, null, 8, ["message"])),
|
|
236
244
|
createVNode("div", _hoisted_3, [
|
|
237
245
|
createVNode(_component_CPButton, {
|
|
238
246
|
label: $options.rejectLabel,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"primevue/confirmationeventbus";import{ZIndexUtils as t,DomHandler as i,ConnectedOverlayScrollHandler as n}from"primevue/utils";import r from"primevue/overlayeventbus";import o from"primevue/button";import{resolveComponent as s,openBlock as c,createBlock as l,Teleport as a,createVNode as p,Transition as u,withCtx as f,mergeProps as m,toDisplayString as h,createCommentVNode as
|
|
1
|
+
import e from"primevue/confirmationeventbus";import{ZIndexUtils as t,DomHandler as i,ConnectedOverlayScrollHandler as n}from"primevue/utils";import r from"primevue/overlayeventbus";import o from"primevue/button";import{resolveComponent as s,openBlock as c,createBlock as l,Teleport as a,createVNode as p,Transition as u,withCtx as f,mergeProps as m,toDisplayString as h,resolveDynamicComponent as d,createCommentVNode as b}from"vue";var v={name:"ConfirmPopup",inheritAttrs:!1,props:{group:String},data:()=>({visible:!1,confirmation:null}),target:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,confirmListener:null,closeListener:null,mounted(){this.confirmListener=e=>{e&&e.group===this.group&&(this.confirmation=e,this.target=e.target,this.visible=!0)},this.closeListener=()=>{this.visible=!1,this.confirmation=null},e.on("confirm",this.confirmListener),e.on("close",this.closeListener)},beforeUnmount(){e.off("confirm",this.confirmListener),e.off("close",this.closeListener),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindResizeListener(),this.container&&(t.clear(this.container),this.container=null),this.target=null,this.confirmation=null},methods:{accept(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1},onEnter(e){this.alignOverlay(),this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),t.set("overlay",e,this.$primevue.config.zIndex.overlay)},onLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener()},onAfterLeave(e){t.clear(e)},alignOverlay(){i.absolutePosition(this.container,this.target);const e=i.getOffset(this.container),t=i.getOffset(this.target);let n=0;e.left<t.left&&(n=t.left-e.left),this.container.style.setProperty("--overlayArrowLeft",`${n}px`),e.top<t.top&&i.addClass(this.container,"p-confirm-popup-flipped")},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.visible&&this.container&&!this.container.contains(e.target)&&!this.isTargetClicked(e)&&(this.visible=!1)},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new n(this.target,(()=>{this.visible&&(this.visible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.visible&&(this.visible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isTargetClicked(){return this.target&&(this.target===event.target||this.target.contains(event.target))},containerRef(e){this.container=e},onOverlayClick(e){r.emit("overlay-click",{originalEvent:e,target:this.target})}},computed:{containerClass(){return["p-confirm-popup p-component",{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},message(){return this.confirmation?this.confirmation.message:null},iconClass(){return["p-confirm-popup-icon",this.confirmation?this.confirmation.icon:null]},acceptLabel(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon(){return this.confirmation?this.confirmation.rejectIcon:null},acceptClass(){return["p-confirm-popup-accept p-button-sm",this.confirmation?this.confirmation.acceptClass:null]},rejectClass(){return["p-confirm-popup-reject p-button-sm",this.confirmation?this.confirmation.rejectClass||"p-button-text":null]}},components:{CPButton:o}};const L={key:0,class:"p-confirm-popup-content"},g={class:"p-confirm-popup-message"},C={class:"p-confirm-popup-footer"};!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===i&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}('\n.p-confirm-popup {\n position: absolute;\n margin-top: 10px;\n top: 0;\n left: 0;\n}\n.p-confirm-popup-flipped {\n margin-top: 0;\n margin-bottom: 10px;\n}\n\n/* Animation */\n.p-confirm-popup-enter-from {\n opacity: 0;\n -webkit-transform: scaleY(0.8);\n transform: scaleY(0.8);\n}\n.p-confirm-popup-leave-to {\n opacity: 0;\n}\n.p-confirm-popup-enter-active {\n -webkit-transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n}\n.p-confirm-popup-leave-active {\n -webkit-transition: opacity .1s linear;\n transition: opacity .1s linear;\n}\n.p-confirm-popup:after, .p-confirm-popup:before {\n\tbottom: 100%;\n\tleft: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n\tcontent: " ";\n\theight: 0;\n\twidth: 0;\n\tposition: absolute;\n\tpointer-events: none;\n}\n.p-confirm-popup:after {\n\tborder-width: 8px;\n\tmargin-left: -8px;\n}\n.p-confirm-popup:before {\n\tborder-width: 10px;\n\tmargin-left: -10px;\n}\n.p-confirm-popup-flipped:after, .p-confirm-popup-flipped:before {\n bottom: auto;\n top: 100%;\n}\n.p-confirm-popup.p-confirm-popup-flipped:after {\n border-bottom-color: transparent;\n}\n.p-confirm-popup.p-confirm-popup-flipped:before {\n border-bottom-color: transparent\n}\n.p-confirm-popup .p-confirm-popup-content {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n'),v.render=function(e,t,i,n,r,o){const v=s("CPButton");return c(),l(a,{to:"body"},[p(u,{name:"p-confirm-popup",onEnter:o.onEnter,onLeave:o.onLeave,onAfterLeave:o.onAfterLeave},{default:f((()=>[r.visible?(c(),l("div",m({key:0,class:o.containerClass,ref:o.containerRef},e.$attrs,{onClick:t[3]||(t[3]=(...e)=>o.onOverlayClick&&o.onOverlayClick(...e))}),[e.$slots.message?(c(),l(d(e.$slots.message),{key:1,message:r.confirmation},null,8,["message"])):(c(),l("div",L,[p("i",{class:o.iconClass},null,2),p("span",g,h(r.confirmation.message),1)])),p("div",C,[p(v,{label:o.rejectLabel,icon:o.rejectIcon,class:o.rejectClass,onClick:t[1]||(t[1]=e=>o.reject())},null,8,["label","icon","class"]),p(v,{label:o.acceptLabel,icon:o.acceptIcon,class:o.acceptClass,onClick:t[2]||(t[2]=e=>o.accept()),autofocus:""},null,8,["label","icon","class"])])],16)):b("",!0)])),_:1},8,["onEnter","onLeave","onAfterLeave"])])};export default v;
|
|
@@ -210,7 +210,10 @@ this.primevue.confirmpopup = (function (ConfirmationEventBus, utils, OverlayEven
|
|
|
210
210
|
}
|
|
211
211
|
};
|
|
212
212
|
|
|
213
|
-
const _hoisted_1 = {
|
|
213
|
+
const _hoisted_1 = {
|
|
214
|
+
key: 0,
|
|
215
|
+
class: "p-confirm-popup-content"
|
|
216
|
+
};
|
|
214
217
|
const _hoisted_2 = { class: "p-confirm-popup-message" };
|
|
215
218
|
const _hoisted_3 = { class: "p-confirm-popup-footer" };
|
|
216
219
|
|
|
@@ -233,10 +236,15 @@ this.primevue.confirmpopup = (function (ConfirmationEventBus, utils, OverlayEven
|
|
|
233
236
|
}, _ctx.$attrs, {
|
|
234
237
|
onClick: _cache[3] || (_cache[3] = (...args) => ($options.onOverlayClick && $options.onOverlayClick(...args)))
|
|
235
238
|
}), [
|
|
236
|
-
|
|
237
|
-
vue.
|
|
238
|
-
|
|
239
|
-
|
|
239
|
+
(!_ctx.$slots.message)
|
|
240
|
+
? (vue.openBlock(), vue.createBlock("div", _hoisted_1, [
|
|
241
|
+
vue.createVNode("i", { class: $options.iconClass }, null, 2),
|
|
242
|
+
vue.createVNode("span", _hoisted_2, vue.toDisplayString($data.confirmation.message), 1)
|
|
243
|
+
]))
|
|
244
|
+
: (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.$slots.message), {
|
|
245
|
+
key: 1,
|
|
246
|
+
message: $data.confirmation
|
|
247
|
+
}, null, 8, ["message"])),
|
|
240
248
|
vue.createVNode("div", _hoisted_3, [
|
|
241
249
|
vue.createVNode(_component_CPButton, {
|
|
242
250
|
label: $options.rejectLabel,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.confirmpopup=function(e,t,i,n,
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.confirmpopup=function(e,t,i,n,o){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=r(e),c=r(i),l={name:"ConfirmPopup",inheritAttrs:!1,props:{group:String},data:()=>({visible:!1,confirmation:null}),target:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,confirmListener:null,closeListener:null,mounted(){this.confirmListener=e=>{e&&e.group===this.group&&(this.confirmation=e,this.target=e.target,this.visible=!0)},this.closeListener=()=>{this.visible=!1,this.confirmation=null},s.default.on("confirm",this.confirmListener),s.default.on("close",this.closeListener)},beforeUnmount(){s.default.off("confirm",this.confirmListener),s.default.off("close",this.closeListener),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindResizeListener(),this.container&&(t.ZIndexUtils.clear(this.container),this.container=null),this.target=null,this.confirmation=null},methods:{accept(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1},onEnter(e){this.alignOverlay(),this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),t.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay)},onLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener()},onAfterLeave(e){t.ZIndexUtils.clear(e)},alignOverlay(){t.DomHandler.absolutePosition(this.container,this.target);const e=t.DomHandler.getOffset(this.container),i=t.DomHandler.getOffset(this.target);let n=0;e.left<i.left&&(n=i.left-e.left),this.container.style.setProperty("--overlayArrowLeft",`${n}px`),e.top<i.top&&t.DomHandler.addClass(this.container,"p-confirm-popup-flipped")},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.visible&&this.container&&!this.container.contains(e.target)&&!this.isTargetClicked(e)&&(this.visible=!1)},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new t.ConnectedOverlayScrollHandler(this.target,(()=>{this.visible&&(this.visible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.visible&&(this.visible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isTargetClicked(){return this.target&&(this.target===event.target||this.target.contains(event.target))},containerRef(e){this.container=e},onOverlayClick(e){c.default.emit("overlay-click",{originalEvent:e,target:this.target})}},computed:{containerClass(){return["p-confirm-popup p-component",{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},message(){return this.confirmation?this.confirmation.message:null},iconClass(){return["p-confirm-popup-icon",this.confirmation?this.confirmation.icon:null]},acceptLabel(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon(){return this.confirmation?this.confirmation.rejectIcon:null},acceptClass(){return["p-confirm-popup-accept p-button-sm",this.confirmation?this.confirmation.acceptClass:null]},rejectClass(){return["p-confirm-popup-reject p-button-sm",this.confirmation?this.confirmation.rejectClass||"p-button-text":null]}},components:{CPButton:r(n).default}};const a={key:0,class:"p-confirm-popup-content"},p={class:"p-confirm-popup-message"},u={class:"p-confirm-popup-footer"};return function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}('\n.p-confirm-popup {\n position: absolute;\n margin-top: 10px;\n top: 0;\n left: 0;\n}\n.p-confirm-popup-flipped {\n margin-top: 0;\n margin-bottom: 10px;\n}\n\n/* Animation */\n.p-confirm-popup-enter-from {\n opacity: 0;\n -webkit-transform: scaleY(0.8);\n transform: scaleY(0.8);\n}\n.p-confirm-popup-leave-to {\n opacity: 0;\n}\n.p-confirm-popup-enter-active {\n -webkit-transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n}\n.p-confirm-popup-leave-active {\n -webkit-transition: opacity .1s linear;\n transition: opacity .1s linear;\n}\n.p-confirm-popup:after, .p-confirm-popup:before {\n\tbottom: 100%;\n\tleft: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n\tcontent: " ";\n\theight: 0;\n\twidth: 0;\n\tposition: absolute;\n\tpointer-events: none;\n}\n.p-confirm-popup:after {\n\tborder-width: 8px;\n\tmargin-left: -8px;\n}\n.p-confirm-popup:before {\n\tborder-width: 10px;\n\tmargin-left: -10px;\n}\n.p-confirm-popup-flipped:after, .p-confirm-popup-flipped:before {\n bottom: auto;\n top: 100%;\n}\n.p-confirm-popup.p-confirm-popup-flipped:after {\n border-bottom-color: transparent;\n}\n.p-confirm-popup.p-confirm-popup-flipped:before {\n border-bottom-color: transparent\n}\n.p-confirm-popup .p-confirm-popup-content {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n'),l.render=function(e,t,i,n,r,s){const c=o.resolveComponent("CPButton");return o.openBlock(),o.createBlock(o.Teleport,{to:"body"},[o.createVNode(o.Transition,{name:"p-confirm-popup",onEnter:s.onEnter,onLeave:s.onLeave,onAfterLeave:s.onAfterLeave},{default:o.withCtx((()=>[r.visible?(o.openBlock(),o.createBlock("div",o.mergeProps({key:0,class:s.containerClass,ref:s.containerRef},e.$attrs,{onClick:t[3]||(t[3]=(...e)=>s.onOverlayClick&&s.onOverlayClick(...e))}),[e.$slots.message?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.$slots.message),{key:1,message:r.confirmation},null,8,["message"])):(o.openBlock(),o.createBlock("div",a,[o.createVNode("i",{class:s.iconClass},null,2),o.createVNode("span",p,o.toDisplayString(r.confirmation.message),1)])),o.createVNode("div",u,[o.createVNode(c,{label:s.rejectLabel,icon:s.rejectIcon,class:s.rejectClass,onClick:t[1]||(t[1]=e=>s.reject())},null,8,["label","icon","class"]),o.createVNode(c,{label:s.acceptLabel,icon:s.acceptIcon,class:s.acceptClass,onClick:t[2]||(t[2]=e=>s.accept()),autofocus:""},null,8,["label","icon","class"])])],16)):o.createCommentVNode("",!0)])),_:1},8,["onEnter","onLeave","onAfterLeave"])])},l}(primevue.confirmationeventbus,primevue.utils,primevue.overlayeventbus,primevue.button,Vue);
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<transition name="p-contextmenusub" @enter="onEnter">
|
|
3
3
|
<ul ref="container" :class="containerClass" role="menu" v-if="root ? true : parentActive">
|
|
4
|
-
<template v-for="(item, i) of model" :key="item
|
|
4
|
+
<template v-for="(item, i) of model" :key="label(item) + i.toString()">
|
|
5
5
|
<li role="none" :class="getItemClass(item)" :style="item.style" v-if="visible(item) && !item.separator"
|
|
6
6
|
@mouseenter="onItemMouseEnter($event, item)">
|
|
7
7
|
<template v-if="!template">
|
|
8
8
|
<router-link v-if="item.to && !disabled(item)" :to="item.to" custom v-slot="{navigate, href, isActive, isExactActive}">
|
|
9
9
|
<a :href="href" @click="onItemClick($event, item, navigate)" :class="linkClass(item, {isActive, isExactActive})" v-ripple role="menuitem">
|
|
10
10
|
<span :class="['p-menuitem-icon', item.icon]"></span>
|
|
11
|
-
<span class="p-menuitem-text">{{item
|
|
11
|
+
<span class="p-menuitem-text">{{label(item)}}</span>
|
|
12
12
|
</a>
|
|
13
13
|
</router-link>
|
|
14
14
|
<a v-else :href="item.url" :class="linkClass(item)" :target="item.target" @click="onItemClick($event, item)" v-ripple
|
|
15
15
|
:aria-haspopup="item.items != null" :aria-expanded="item === activeItem" role="menuitem" :tabindex="disabled(item) ? null : '0'">
|
|
16
16
|
<span :class="['p-menuitem-icon', item.icon]"></span>
|
|
17
|
-
<span class="p-menuitem-text">{{item
|
|
17
|
+
<span class="p-menuitem-text">{{label(item)}}</span>
|
|
18
18
|
<span class="p-submenu-icon pi pi-angle-right" v-if="item.items"></span>
|
|
19
19
|
</a>
|
|
20
20
|
</template>
|
|
21
21
|
<component v-else :is="template" :item="item"></component>
|
|
22
|
-
<ContextMenuSub :model="item.items" v-if="visible(item) && item.items" :key="item
|
|
22
|
+
<ContextMenuSub :model="item.items" v-if="visible(item) && item.items" :key="label(item) + '_sub_'" :template="template"
|
|
23
23
|
@leaf-click="onLeafClick" :parentActive="item === activeItem" :exact="exact" />
|
|
24
24
|
</li>
|
|
25
25
|
<li :class="['p-menu-separator', item.class]" :style="item.style" v-if="visible(item) && item.separator" :key="'separator' + i.toString()" role="separator"></li>
|
|
@@ -148,6 +148,9 @@ export default {
|
|
|
148
148
|
},
|
|
149
149
|
disabled(item) {
|
|
150
150
|
return (typeof item.disabled === 'function' ? item.disabled() : item.disabled);
|
|
151
|
+
},
|
|
152
|
+
label(item) {
|
|
153
|
+
return (typeof item.label === 'function' ? item.label() : item.label);
|
|
151
154
|
}
|
|
152
155
|
},
|
|
153
156
|
computed: {
|
|
@@ -124,6 +124,9 @@ var script$1 = {
|
|
|
124
124
|
},
|
|
125
125
|
disabled(item) {
|
|
126
126
|
return (typeof item.disabled === 'function' ? item.disabled() : item.disabled);
|
|
127
|
+
},
|
|
128
|
+
label(item) {
|
|
129
|
+
return (typeof item.label === 'function' ? item.label() : item.label);
|
|
127
130
|
}
|
|
128
131
|
},
|
|
129
132
|
computed: {
|
|
@@ -162,7 +165,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
162
165
|
}, [
|
|
163
166
|
(vue.openBlock(true), vue.createBlock(vue.Fragment, null, vue.renderList($props.model, (item, i) => {
|
|
164
167
|
return (vue.openBlock(), vue.createBlock(vue.Fragment, {
|
|
165
|
-
key:
|
|
168
|
+
key: $options.label(item) + i.toString()
|
|
166
169
|
}, [
|
|
167
170
|
($options.visible(item) && !item.separator)
|
|
168
171
|
? (vue.openBlock(), vue.createBlock("li", {
|
|
@@ -190,7 +193,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
190
193
|
vue.createVNode("span", {
|
|
191
194
|
class: ['p-menuitem-icon', item.icon]
|
|
192
195
|
}, null, 2),
|
|
193
|
-
vue.createVNode("span", _hoisted_1, vue.toDisplayString(
|
|
196
|
+
vue.createVNode("span", _hoisted_1, vue.toDisplayString($options.label(item)), 1)
|
|
194
197
|
], 10, ["href", "onClick"]), [
|
|
195
198
|
[_directive_ripple]
|
|
196
199
|
])
|
|
@@ -211,7 +214,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
211
214
|
vue.createVNode("span", {
|
|
212
215
|
class: ['p-menuitem-icon', item.icon]
|
|
213
216
|
}, null, 2),
|
|
214
|
-
vue.createVNode("span", _hoisted_2, vue.toDisplayString(
|
|
217
|
+
vue.createVNode("span", _hoisted_2, vue.toDisplayString($options.label(item)), 1),
|
|
215
218
|
(item.items)
|
|
216
219
|
? (vue.openBlock(), vue.createBlock("span", _hoisted_3))
|
|
217
220
|
: vue.createCommentVNode("", true)
|
|
@@ -226,7 +229,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
226
229
|
($options.visible(item) && item.items)
|
|
227
230
|
? (vue.openBlock(), vue.createBlock(_component_ContextMenuSub, {
|
|
228
231
|
model: item.items,
|
|
229
|
-
key:
|
|
232
|
+
key: $options.label(item) + '_sub_',
|
|
230
233
|
template: $props.template,
|
|
231
234
|
onLeafClick: $options.onLeafClick,
|
|
232
235
|
parentActive: item === $data.activeItem,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/utils"),t=require("primevue/ripple"),n=require("vue");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o={name:"ContextMenuSub",emits:["leaf-click"],props:{model:{type:Array,default:null},root:{type:Boolean,default:!1},parentActive:{type:Boolean,default:!1},template:{type:Function,default:null},exact:{type:Boolean,default:!0}},watch:{parentActive(e){e||(this.activeItem=null)}},data:()=>({activeItem:null}),methods:{onItemMouseEnter(e,t){this.disabled(t)?e.preventDefault():this.activeItem=t},onItemClick(e,t,n){this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.items&&(this.activeItem&&t===this.activeItem?this.activeItem=null:this.activeItem=t),t.items||this.onLeafClick(),t.to&&n&&n(e))},onLeafClick(){this.activeItem=null,this.$emit("leaf-click")},onEnter(){this.position()},position(){const t=this.$refs.container.parentElement,n=e.DomHandler.getOffset(this.$refs.container.parentElement),i=e.DomHandler.getViewport(),o=this.$refs.container.offsetParent?this.$refs.container.offsetWidth:e.DomHandler.getHiddenElementOuterWidth(this.$refs.container),s=e.DomHandler.getOuterWidth(t.children[0]);this.$refs.container.style.top="0px",parseInt(n.left,10)+s+o>i.width-e.DomHandler.calculateScrollbarWidth()?this.$refs.container.style.left=-1*o+"px":this.$refs.container.style.left=s+"px"},getItemClass(e){return["p-menuitem",e.class,{"p-menuitem-active":this.activeItem===e}]},linkClass(e,t){return["p-menuitem-link",{"p-disabled":this.disabled(e),"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled},computed:{containerClass(){return{"p-submenu-list":!this.root}}},directives:{ripple:i(t).default}};const s={class:"p-menuitem-text"},l={class:"p-menuitem-text"},a={key:0,class:"p-submenu-icon pi pi-angle-right"};o.render=function(e,t,i,o,r,c){const u=n.resolveComponent("router-link"),d=n.resolveComponent("ContextMenuSub",!0),m=n.resolveDirective("ripple");return n.openBlock(),n.createBlock(n.Transition,{name:"p-contextmenusub",onEnter:c.onEnter},{default:n.withCtx((()=>[i.root||i.parentActive?(n.openBlock(),n.createBlock("ul",{key:0,ref:"container",class:c.containerClass,role:"menu"},[(n.openBlock(!0),n.createBlock(n.Fragment,null,n.renderList(i.model,((e,t)=>(n.openBlock(),n.createBlock(n.Fragment,{key:
|
|
1
|
+
"use strict";var e=require("primevue/utils"),t=require("primevue/ripple"),n=require("vue");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o={name:"ContextMenuSub",emits:["leaf-click"],props:{model:{type:Array,default:null},root:{type:Boolean,default:!1},parentActive:{type:Boolean,default:!1},template:{type:Function,default:null},exact:{type:Boolean,default:!0}},watch:{parentActive(e){e||(this.activeItem=null)}},data:()=>({activeItem:null}),methods:{onItemMouseEnter(e,t){this.disabled(t)?e.preventDefault():this.activeItem=t},onItemClick(e,t,n){this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.items&&(this.activeItem&&t===this.activeItem?this.activeItem=null:this.activeItem=t),t.items||this.onLeafClick(),t.to&&n&&n(e))},onLeafClick(){this.activeItem=null,this.$emit("leaf-click")},onEnter(){this.position()},position(){const t=this.$refs.container.parentElement,n=e.DomHandler.getOffset(this.$refs.container.parentElement),i=e.DomHandler.getViewport(),o=this.$refs.container.offsetParent?this.$refs.container.offsetWidth:e.DomHandler.getHiddenElementOuterWidth(this.$refs.container),s=e.DomHandler.getOuterWidth(t.children[0]);this.$refs.container.style.top="0px",parseInt(n.left,10)+s+o>i.width-e.DomHandler.calculateScrollbarWidth()?this.$refs.container.style.left=-1*o+"px":this.$refs.container.style.left=s+"px"},getItemClass(e){return["p-menuitem",e.class,{"p-menuitem-active":this.activeItem===e}]},linkClass(e,t){return["p-menuitem-link",{"p-disabled":this.disabled(e),"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled,label:e=>"function"==typeof e.label?e.label():e.label},computed:{containerClass(){return{"p-submenu-list":!this.root}}},directives:{ripple:i(t).default}};const s={class:"p-menuitem-text"},l={class:"p-menuitem-text"},a={key:0,class:"p-submenu-icon pi pi-angle-right"};o.render=function(e,t,i,o,r,c){const u=n.resolveComponent("router-link"),d=n.resolveComponent("ContextMenuSub",!0),m=n.resolveDirective("ripple");return n.openBlock(),n.createBlock(n.Transition,{name:"p-contextmenusub",onEnter:c.onEnter},{default:n.withCtx((()=>[i.root||i.parentActive?(n.openBlock(),n.createBlock("ul",{key:0,ref:"container",class:c.containerClass,role:"menu"},[(n.openBlock(!0),n.createBlock(n.Fragment,null,n.renderList(i.model,((e,t)=>(n.openBlock(),n.createBlock(n.Fragment,{key:c.label(e)+t.toString()},[c.visible(e)&&!e.separator?(n.openBlock(),n.createBlock("li",{key:0,role:"none",class:c.getItemClass(e),style:e.style,onMouseenter:t=>c.onItemMouseEnter(t,e)},[i.template?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(i.template),{key:1,item:e},null,8,["item"])):(n.openBlock(),n.createBlock(n.Fragment,{key:0},[e.to&&!c.disabled(e)?(n.openBlock(),n.createBlock(u,{key:0,to:e.to,custom:""},{default:n.withCtx((({navigate:t,href:i,isActive:o,isExactActive:l})=>[n.withDirectives(n.createVNode("a",{href:i,onClick:n=>c.onItemClick(n,e,t),class:c.linkClass(e,{isActive:o,isExactActive:l}),role:"menuitem"},[n.createVNode("span",{class:["p-menuitem-icon",e.icon]},null,2),n.createVNode("span",s,n.toDisplayString(c.label(e)),1)],10,["href","onClick"]),[[m]])])),_:2},1032,["to"])):n.withDirectives((n.openBlock(),n.createBlock("a",{key:1,href:e.url,class:c.linkClass(e),target:e.target,onClick:t=>c.onItemClick(t,e),"aria-haspopup":null!=e.items,"aria-expanded":e===r.activeItem,role:"menuitem",tabindex:c.disabled(e)?null:"0"},[n.createVNode("span",{class:["p-menuitem-icon",e.icon]},null,2),n.createVNode("span",l,n.toDisplayString(c.label(e)),1),e.items?(n.openBlock(),n.createBlock("span",a)):n.createCommentVNode("",!0)],10,["href","target","onClick","aria-haspopup","aria-expanded","tabindex"])),[[m]])],64)),c.visible(e)&&e.items?(n.openBlock(),n.createBlock(d,{model:e.items,key:c.label(e)+"_sub_",template:i.template,onLeafClick:c.onLeafClick,parentActive:e===r.activeItem,exact:i.exact},null,8,["model","template","onLeafClick","parentActive","exact"])):n.createCommentVNode("",!0)],46,["onMouseenter"])):n.createCommentVNode("",!0),c.visible(e)&&e.separator?(n.openBlock(),n.createBlock("li",{class:["p-menu-separator",e.class],style:e.style,key:"separator"+t.toString(),role:"separator"},null,6)):n.createCommentVNode("",!0)],64)))),128))],2)):n.createCommentVNode("",!0)])),_:1},8,["onEnter"])};var r={name:"ContextMenu",inheritAttrs:!1,props:{model:{type:Array,default:null},appendTo:{type:String,default:"body"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},global:{type:Boolean,default:!1},exact:{type:Boolean,default:!0}},target:null,outsideClickListener:null,resizeListener:null,documentContextMenuListener:null,pageX:null,pageY:null,container:null,data:()=>({visible:!1}),beforeUnmount(){this.unbindResizeListener(),this.unbindOutsideClickListener(),this.unbindDocumentContextMenuListener(),this.container&&this.autoZIndex&&e.ZIndexUtils.clear(this.container),this.container=null},mounted(){this.global&&this.bindDocumentContextMenuListener()},methods:{itemClick(e){const t=e.item;t.command&&(t.command(e),e.originalEvent.preventDefault()),this.hide()},toggle(e){this.visible?this.hide():this.show(e)},onLeafClick(){this.hide()},show(e){this.pageX=e.pageX,this.pageY=e.pageY,this.visible?this.position():this.visible=!0,e.stopPropagation(),e.preventDefault()},hide(){this.visible=!1},onEnter(t){this.position(),this.bindOutsideClickListener(),this.bindResizeListener(),this.autoZIndex&&e.ZIndexUtils.set("menu",t,this.baseZIndex+this.$primevue.config.zIndex.menu)},onLeave(){this.unbindOutsideClickListener(),this.unbindResizeListener()},onAfterLeave(t){this.autoZIndex&&e.ZIndexUtils.clear(t)},position(){let t=this.pageX+1,n=this.pageY+1,i=this.container.offsetParent?this.container.offsetWidth:e.DomHandler.getHiddenElementOuterWidth(this.container),o=this.container.offsetParent?this.container.offsetHeight:e.DomHandler.getHiddenElementOuterHeight(this.container),s=e.DomHandler.getViewport();t+i-document.body.scrollLeft>s.width&&(t-=i),n+o-document.body.scrollTop>s.height&&(n-=o),t<document.body.scrollLeft&&(t=document.body.scrollLeft),n<document.body.scrollTop&&(n=document.body.scrollTop),this.container.style.left=t+"px",this.container.style.top=n+"px"},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.visible&&this.container&&!this.container.contains(e.target)&&!e.ctrlKey&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.visible&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},bindDocumentContextMenuListener(){this.documentContextMenuListener||(this.documentContextMenuListener=e=>{this.show(e)},document.addEventListener("contextmenu",this.documentContextMenuListener))},unbindDocumentContextMenuListener(){this.documentContextMenuListener&&(document.removeEventListener("contextmenu",this.documentContextMenuListener),this.documentContextMenuListener=null)},containerRef(e){this.container=e}},computed:{containerClass(){return["p-contextmenu p-component",{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]}},components:{ContextMenuSub:o}};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("\n.p-contextmenu {\n position: absolute;\n}\n.p-contextmenu ul {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-contextmenu .p-submenu-list {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n}\n.p-contextmenu .p-menuitem-link {\n cursor: pointer;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n}\n.p-contextmenu .p-menuitem-text {\n line-height: 1;\n}\n.p-contextmenu .p-menuitem {\n position: relative;\n}\n.p-contextmenu .p-menuitem-link .p-submenu-icon {\n margin-left: auto;\n}\n.p-contextmenu-enter-from {\n opacity: 0;\n}\n.p-contextmenu-enter-active {\n -webkit-transition: opacity 250ms;\n transition: opacity 250ms;\n}\n"),r.render=function(e,t,i,o,s,l){const a=n.resolveComponent("ContextMenuSub");return n.openBlock(),n.createBlock(n.Teleport,{to:i.appendTo},[n.createVNode(n.Transition,{name:"p-contextmenu",onEnter:l.onEnter,onLeave:l.onLeave,onAfterLeave:l.onAfterLeave},{default:n.withCtx((()=>[s.visible?(n.openBlock(),n.createBlock("div",n.mergeProps({key:0,ref:l.containerRef,class:l.containerClass},e.$attrs),[n.createVNode(a,{model:i.model,root:!0,onLeafClick:l.onLeafClick,template:e.$slots.item,exact:i.exact},null,8,["model","onLeafClick","template","exact"])],16)):n.createCommentVNode("",!0)])),_:1},8,["onEnter","onLeave","onAfterLeave"])],8,["to"])},module.exports=r;
|