primevue 3.45.0 → 3.46.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/autocomplete/BaseAutoComplete.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/calendar/BaseCalendar.vue +1 -1
- package/calendar/calendar.cjs.js +1 -1
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +1 -1
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +1 -1
- package/calendar/calendar.min.js +1 -1
- package/card/Card.d.ts +4 -0
- package/card/Card.vue +7 -5
- package/card/card.cjs.js +6 -3
- package/card/card.cjs.min.js +1 -1
- package/card/card.esm.js +6 -3
- package/card/card.esm.min.js +1 -1
- package/card/card.js +6 -3
- package/card/card.min.js +1 -1
- package/card/style/cardstyle.cjs.js +1 -0
- package/card/style/cardstyle.cjs.min.js +1 -1
- package/card/style/cardstyle.esm.js +1 -0
- package/card/style/cardstyle.esm.min.js +1 -1
- package/card/style/cardstyle.js +1 -0
- package/card/style/cardstyle.min.js +1 -1
- package/cascadeselect/BaseCascadeSelect.vue +1 -1
- package/cascadeselect/CascadeSelect.d.ts +41 -0
- package/cascadeselect/CascadeSelectSub.vue +18 -5
- package/cascadeselect/cascadeselect.cjs.js +19 -6
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +19 -6
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +19 -6
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/colorpicker/BaseColorPicker.vue +1 -1
- package/colorpicker/ColorPicker.d.ts +1 -1
- package/colorpicker/colorpicker.cjs.js +1 -1
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +1 -1
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +1 -1
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/Column.d.ts +4 -0
- package/confirmdialog/ConfirmDialog.vue +1 -1
- package/confirmdialog/confirmdialog.cjs.js +1 -1
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +1 -1
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +1 -1
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmdialog/style/confirmdialogstyle.cjs.js +3 -6
- package/confirmdialog/style/confirmdialogstyle.cjs.min.js +1 -1
- package/confirmdialog/style/confirmdialogstyle.esm.js +3 -6
- package/confirmdialog/style/confirmdialogstyle.esm.min.js +1 -1
- package/confirmdialog/style/confirmdialogstyle.js +3 -6
- package/confirmdialog/style/confirmdialogstyle.min.js +1 -1
- package/confirmpopup/ConfirmPopup.vue +1 -1
- package/confirmpopup/confirmpopup.cjs.js +1 -1
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +1 -1
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +1 -1
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/confirmpopup/style/confirmpopupstyle.cjs.js +5 -8
- package/confirmpopup/style/confirmpopupstyle.cjs.min.js +1 -1
- package/confirmpopup/style/confirmpopupstyle.esm.js +5 -8
- package/confirmpopup/style/confirmpopupstyle.esm.min.js +1 -1
- package/confirmpopup/style/confirmpopupstyle.js +5 -8
- package/confirmpopup/style/confirmpopupstyle.min.js +1 -1
- package/contextmenu/BaseContextMenu.vue +1 -1
- package/contextmenu/ContextMenuSub.vue +6 -1
- package/contextmenu/contextmenu.cjs.js +11 -5
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +11 -5
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +11 -5
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +82 -78
- package/core/core.min.js +38 -38
- package/datatable/BodyRow.vue +11 -7
- package/datatable/HeaderCell.vue +1 -0
- package/datatable/datatable.cjs.js +11 -7
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +11 -7
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +11 -7
- package/datatable/datatable.min.js +1 -1
- package/datatable/style/datatablestyle.cjs.js +1 -1
- package/datatable/style/datatablestyle.cjs.min.js +1 -1
- package/datatable/style/datatablestyle.esm.js +1 -1
- package/datatable/style/datatablestyle.esm.min.js +1 -1
- package/datatable/style/datatablestyle.js +1 -1
- package/datatable/style/datatablestyle.min.js +1 -1
- package/dialog/BaseDialog.vue +1 -1
- package/dialog/dialog.cjs.js +1 -1
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +1 -1
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +1 -1
- package/dialog/dialog.min.js +1 -1
- package/dropdown/BaseDropdown.vue +1 -1
- package/dropdown/dropdown.cjs.js +1 -1
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +1 -1
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +1 -1
- package/dropdown/dropdown.min.js +1 -1
- package/icons/arrowdown/index.cjs.js +2 -2
- package/icons/arrowdown/index.cjs.min.js +1 -1
- package/icons/arrowdown/index.esm.js +2 -2
- package/icons/arrowdown/index.esm.min.js +1 -1
- package/icons/arrowdown/index.js +2 -2
- package/icons/arrowdown/index.min.js +1 -1
- package/icons/arrowdown/index.vue +1 -1
- package/icons/arrowup/index.cjs.js +2 -2
- package/icons/arrowup/index.cjs.min.js +1 -1
- package/icons/arrowup/index.esm.js +2 -2
- package/icons/arrowup/index.esm.min.js +1 -1
- package/icons/arrowup/index.js +2 -2
- package/icons/arrowup/index.min.js +1 -1
- package/icons/arrowup/index.vue +1 -1
- package/icons/ban/index.cjs.js +2 -2
- package/icons/ban/index.cjs.min.js +1 -1
- package/icons/ban/index.esm.js +2 -2
- package/icons/ban/index.esm.min.js +1 -1
- package/icons/ban/index.js +2 -2
- package/icons/ban/index.min.js +1 -1
- package/icons/ban/index.vue +1 -1
- package/icons/exclamationtriangle/index.cjs.js +2 -2
- package/icons/exclamationtriangle/index.cjs.min.js +1 -1
- package/icons/exclamationtriangle/index.esm.js +2 -2
- package/icons/exclamationtriangle/index.esm.min.js +1 -1
- package/icons/exclamationtriangle/index.js +2 -2
- package/icons/exclamationtriangle/index.min.js +1 -1
- package/icons/exclamationtriangle/index.vue +1 -1
- package/icons/eyeslash/index.cjs.js +2 -2
- package/icons/eyeslash/index.cjs.min.js +1 -1
- package/icons/eyeslash/index.esm.js +2 -2
- package/icons/eyeslash/index.esm.min.js +1 -1
- package/icons/eyeslash/index.js +2 -2
- package/icons/eyeslash/index.min.js +1 -1
- package/icons/eyeslash/index.vue +1 -1
- package/icons/filter/index.cjs.js +2 -2
- package/icons/filter/index.cjs.min.js +1 -1
- package/icons/filter/index.esm.js +2 -2
- package/icons/filter/index.esm.min.js +1 -1
- package/icons/filter/index.js +2 -2
- package/icons/filter/index.min.js +1 -1
- package/icons/filter/index.vue +1 -1
- package/icons/filterslash/index.cjs.js +2 -2
- package/icons/filterslash/index.cjs.min.js +1 -1
- package/icons/filterslash/index.esm.js +2 -2
- package/icons/filterslash/index.esm.min.js +1 -1
- package/icons/filterslash/index.js +2 -2
- package/icons/filterslash/index.min.js +1 -1
- package/icons/filterslash/index.vue +1 -1
- package/icons/infocircle/index.cjs.js +2 -2
- package/icons/infocircle/index.cjs.min.js +1 -1
- package/icons/infocircle/index.esm.js +2 -2
- package/icons/infocircle/index.esm.min.js +1 -1
- package/icons/infocircle/index.js +2 -2
- package/icons/infocircle/index.min.js +1 -1
- package/icons/infocircle/index.vue +1 -1
- package/icons/pencil/index.cjs.js +2 -2
- package/icons/pencil/index.cjs.min.js +1 -1
- package/icons/pencil/index.esm.js +2 -2
- package/icons/pencil/index.esm.min.js +1 -1
- package/icons/pencil/index.js +2 -2
- package/icons/pencil/index.min.js +1 -1
- package/icons/pencil/index.vue +1 -1
- package/icons/plus/index.cjs.js +2 -2
- package/icons/plus/index.cjs.min.js +1 -1
- package/icons/plus/index.esm.js +2 -2
- package/icons/plus/index.esm.min.js +1 -1
- package/icons/plus/index.js +2 -2
- package/icons/plus/index.min.js +1 -1
- package/icons/plus/index.vue +1 -1
- package/icons/refresh/index.cjs.js +2 -2
- package/icons/refresh/index.cjs.min.js +1 -1
- package/icons/refresh/index.esm.js +2 -2
- package/icons/refresh/index.esm.min.js +1 -1
- package/icons/refresh/index.js +2 -2
- package/icons/refresh/index.min.js +1 -1
- package/icons/refresh/index.vue +1 -1
- package/icons/search/index.cjs.js +2 -2
- package/icons/search/index.cjs.min.js +1 -1
- package/icons/search/index.esm.js +2 -2
- package/icons/search/index.esm.min.js +1 -1
- package/icons/search/index.js +2 -2
- package/icons/search/index.min.js +1 -1
- package/icons/search/index.vue +1 -1
- package/icons/searchminus/index.cjs.js +2 -2
- package/icons/searchminus/index.cjs.min.js +1 -1
- package/icons/searchminus/index.esm.js +2 -2
- package/icons/searchminus/index.esm.min.js +1 -1
- package/icons/searchminus/index.js +2 -2
- package/icons/searchminus/index.min.js +1 -1
- package/icons/searchminus/index.vue +1 -1
- package/icons/searchplus/index.cjs.js +2 -2
- package/icons/searchplus/index.cjs.min.js +1 -1
- package/icons/searchplus/index.esm.js +2 -2
- package/icons/searchplus/index.esm.min.js +1 -1
- package/icons/searchplus/index.js +2 -2
- package/icons/searchplus/index.min.js +1 -1
- package/icons/searchplus/index.vue +1 -1
- package/icons/sortalt/index.cjs.js +2 -2
- package/icons/sortalt/index.cjs.min.js +1 -1
- package/icons/sortalt/index.esm.js +2 -2
- package/icons/sortalt/index.esm.min.js +1 -1
- package/icons/sortalt/index.js +2 -2
- package/icons/sortalt/index.min.js +1 -1
- package/icons/sortalt/index.vue +1 -1
- package/icons/sortamountdown/index.cjs.js +2 -2
- package/icons/sortamountdown/index.cjs.min.js +1 -1
- package/icons/sortamountdown/index.esm.js +2 -2
- package/icons/sortamountdown/index.esm.min.js +1 -1
- package/icons/sortamountdown/index.js +2 -2
- package/icons/sortamountdown/index.min.js +1 -1
- package/icons/sortamountdown/index.vue +1 -1
- package/icons/sortamountupalt/index.cjs.js +2 -2
- package/icons/sortamountupalt/index.cjs.min.js +1 -1
- package/icons/sortamountupalt/index.esm.js +2 -2
- package/icons/sortamountupalt/index.esm.min.js +1 -1
- package/icons/sortamountupalt/index.js +2 -2
- package/icons/sortamountupalt/index.min.js +1 -1
- package/icons/sortamountupalt/index.vue +1 -1
- package/icons/spinner/index.cjs.js +2 -2
- package/icons/spinner/index.cjs.min.js +1 -1
- package/icons/spinner/index.esm.js +2 -2
- package/icons/spinner/index.esm.min.js +1 -1
- package/icons/spinner/index.js +2 -2
- package/icons/spinner/index.min.js +1 -1
- package/icons/spinner/index.vue +1 -1
- package/icons/star/index.cjs.js +2 -2
- package/icons/star/index.cjs.min.js +1 -1
- package/icons/star/index.esm.js +2 -2
- package/icons/star/index.esm.min.js +1 -1
- package/icons/star/index.js +2 -2
- package/icons/star/index.min.js +1 -1
- package/icons/star/index.vue +1 -1
- package/icons/starfill/index.cjs.js +2 -2
- package/icons/starfill/index.cjs.min.js +1 -1
- package/icons/starfill/index.esm.js +2 -2
- package/icons/starfill/index.esm.min.js +1 -1
- package/icons/starfill/index.js +2 -2
- package/icons/starfill/index.min.js +1 -1
- package/icons/starfill/index.vue +1 -1
- package/icons/thlarge/index.cjs.js +2 -2
- package/icons/thlarge/index.cjs.min.js +1 -1
- package/icons/thlarge/index.esm.js +2 -2
- package/icons/thlarge/index.esm.min.js +1 -1
- package/icons/thlarge/index.js +2 -2
- package/icons/thlarge/index.min.js +1 -1
- package/icons/thlarge/index.vue +1 -1
- package/icons/timescircle/index.cjs.js +2 -2
- package/icons/timescircle/index.cjs.min.js +1 -1
- package/icons/timescircle/index.esm.js +2 -2
- package/icons/timescircle/index.esm.min.js +1 -1
- package/icons/timescircle/index.js +2 -2
- package/icons/timescircle/index.min.js +1 -1
- package/icons/timescircle/index.vue +1 -1
- package/icons/trash/index.cjs.js +2 -2
- package/icons/trash/index.cjs.min.js +1 -1
- package/icons/trash/index.esm.js +2 -2
- package/icons/trash/index.esm.min.js +1 -1
- package/icons/trash/index.js +2 -2
- package/icons/trash/index.min.js +1 -1
- package/icons/trash/index.vue +1 -1
- package/icons/undo/index.cjs.js +2 -2
- package/icons/undo/index.cjs.min.js +1 -1
- package/icons/undo/index.esm.js +2 -2
- package/icons/undo/index.esm.min.js +1 -1
- package/icons/undo/index.js +2 -2
- package/icons/undo/index.min.js +1 -1
- package/icons/undo/index.vue +1 -1
- package/icons/upload/index.cjs.js +2 -2
- package/icons/upload/index.cjs.min.js +1 -1
- package/icons/upload/index.esm.js +2 -2
- package/icons/upload/index.esm.min.js +1 -1
- package/icons/upload/index.js +2 -2
- package/icons/upload/index.min.js +1 -1
- package/icons/upload/index.vue +1 -1
- package/icons/windowmaximize/index.cjs.js +2 -2
- package/icons/windowmaximize/index.cjs.min.js +1 -1
- package/icons/windowmaximize/index.esm.js +2 -2
- package/icons/windowmaximize/index.esm.min.js +1 -1
- package/icons/windowmaximize/index.js +2 -2
- package/icons/windowmaximize/index.min.js +1 -1
- package/icons/windowmaximize/index.vue +1 -1
- package/icons/windowminimize/index.cjs.js +2 -2
- package/icons/windowminimize/index.cjs.min.js +1 -1
- package/icons/windowminimize/index.esm.js +2 -2
- package/icons/windowminimize/index.esm.min.js +1 -1
- package/icons/windowminimize/index.js +2 -2
- package/icons/windowminimize/index.min.js +1 -1
- package/icons/windowminimize/index.vue +1 -1
- package/inputnumber/InputNumber.vue +4 -0
- package/inputnumber/inputnumber.cjs.js +3 -0
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +3 -0
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +3 -0
- package/inputnumber/inputnumber.min.js +1 -1
- package/menu/BaseMenu.vue +1 -1
- package/menu/menu.cjs.js +1 -1
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +1 -1
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +1 -1
- package/menu/menu.min.js +1 -1
- package/menubar/Menubar.vue +2 -1
- package/menubar/MenubarSub.vue +5 -1
- package/menubar/menubar.cjs.js +10 -4
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +10 -4
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +10 -4
- package/menubar/menubar.min.js +1 -1
- package/multiselect/BaseMultiSelect.vue +1 -1
- package/multiselect/multiselect.cjs.js +1 -1
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +1 -1
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +1 -1
- package/multiselect/multiselect.min.js +1 -1
- package/overlaypanel/BaseOverlayPanel.vue +1 -1
- package/overlaypanel/overlaypanel.cjs.js +1 -1
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +1 -1
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +1 -1
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/password/BasePassword.vue +1 -1
- package/password/password.cjs.js +1 -1
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +1 -1
- package/password/password.esm.min.js +1 -1
- package/password/password.js +1 -1
- package/password/password.min.js +1 -1
- package/portal/Portal.vue +1 -1
- package/portal/portal.cjs.js +1 -1
- package/portal/portal.cjs.min.js +1 -1
- package/portal/portal.esm.js +1 -1
- package/portal/portal.esm.min.js +1 -1
- package/portal/portal.js +1 -1
- package/portal/portal.min.js +1 -1
- package/sidebar/Sidebar.vue +16 -1
- package/sidebar/sidebar.cjs.js +17 -5
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +17 -5
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +17 -5
- package/sidebar/sidebar.min.js +1 -1
- package/splitbutton/BaseSplitButton.vue +1 -1
- package/splitbutton/splitbutton.cjs.js +1 -1
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +1 -1
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +1 -1
- package/splitbutton/splitbutton.min.js +1 -1
- package/steps/Steps.vue +2 -1
- package/steps/steps.cjs.js +3 -2
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +3 -2
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +3 -2
- package/steps/steps.min.js +1 -1
- package/tieredmenu/BaseTieredMenu.vue +1 -1
- package/tieredmenu/TieredMenu.d.ts +4 -0
- package/tieredmenu/TieredMenuSub.vue +5 -1
- package/tieredmenu/tieredmenu.cjs.js +10 -4
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +10 -4
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +10 -4
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/tooltip/style/tooltipstyle.cjs.js +1 -1
- package/tooltip/style/tooltipstyle.cjs.min.js +1 -1
- package/tooltip/style/tooltipstyle.esm.js +1 -1
- package/tooltip/style/tooltipstyle.esm.min.js +1 -1
- package/tooltip/style/tooltipstyle.js +1 -1
- package/tooltip/style/tooltipstyle.min.js +1 -1
- package/treeselect/BaseTreeSelect.vue +1 -1
- package/treeselect/TreeSelect.vue +0 -4
- package/treeselect/treeselect.cjs.js +1 -5
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +1 -5
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +1 -5
- package/treeselect/treeselect.min.js +1 -1
- package/web-types.json +1 -1
|
@@ -2,13 +2,10 @@ import BaseStyle from 'primevue/base/style';
|
|
|
2
2
|
|
|
3
3
|
var classes = {
|
|
4
4
|
root: 'p-confirm-dialog',
|
|
5
|
-
icon:
|
|
6
|
-
var instance = _ref.instance;
|
|
7
|
-
return ['p-confirm-dialog-icon', instance.confirmation ? instance.confirmation.icon : null];
|
|
8
|
-
},
|
|
5
|
+
icon: 'p-confirm-dialog-icon',
|
|
9
6
|
message: 'p-confirm-dialog-message',
|
|
10
|
-
rejectButton: function rejectButton(
|
|
11
|
-
var instance =
|
|
7
|
+
rejectButton: function rejectButton(_ref) {
|
|
8
|
+
var instance = _ref.instance;
|
|
12
9
|
return ['p-confirm-dialog-reject', instance.confirmation && !instance.confirmation.rejectClass ? 'p-button-text' : null];
|
|
13
10
|
},
|
|
14
11
|
acceptButton: 'p-confirm-dialog-accept'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from"primevue/base/style";var e=o.extend({name:"confirmdialog",classes:{root:"p-confirm-dialog",icon:"p-confirm-dialog-icon",message:"p-confirm-dialog-message",rejectButton:function(o){var e=o.instance;return["p-confirm-dialog-reject",e.confirmation&&!e.confirmation.rejectClass?"p-button-text":null]},acceptButton:"p-confirm-dialog-accept"}});export{e as default};
|
|
@@ -9,13 +9,10 @@ this.primevue.confirmdialog.style = (function (BaseStyle) {
|
|
|
9
9
|
|
|
10
10
|
var classes = {
|
|
11
11
|
root: 'p-confirm-dialog',
|
|
12
|
-
icon:
|
|
13
|
-
var instance = _ref.instance;
|
|
14
|
-
return ['p-confirm-dialog-icon', instance.confirmation ? instance.confirmation.icon : null];
|
|
15
|
-
},
|
|
12
|
+
icon: 'p-confirm-dialog-icon',
|
|
16
13
|
message: 'p-confirm-dialog-message',
|
|
17
|
-
rejectButton: function rejectButton(
|
|
18
|
-
var instance =
|
|
14
|
+
rejectButton: function rejectButton(_ref) {
|
|
15
|
+
var instance = _ref.instance;
|
|
19
16
|
return ['p-confirm-dialog-reject', instance.confirmation && !instance.confirmation.rejectClass ? 'p-button-text' : null];
|
|
20
17
|
},
|
|
21
18
|
acceptButton: 'p-confirm-dialog-accept'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.confirmdialog=this.primevue.confirmdialog||{},this.primevue.confirmdialog.style=function(
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.confirmdialog=this.primevue.confirmdialog||{},this.primevue.confirmdialog.style=function(e){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}return i(primevue.base.style).default.extend({name:"confirmdialog",classes:{root:"p-confirm-dialog",icon:"p-confirm-dialog-icon",message:"p-confirm-dialog-message",rejectButton:function(e){var i=e.instance;return["p-confirm-dialog-reject",i.confirmation&&!i.confirmation.rejectClass?"p-button-text":null]},acceptButton:"p-confirm-dialog-accept"}})}();
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<div :class="cx('content')" v-bind="ptm('content')">
|
|
9
9
|
<slot name="icon">
|
|
10
10
|
<component v-if="$slots.icon" :is="$slots.icon" :class="cx('icon')" />
|
|
11
|
-
<span v-else-if="confirmation.icon" :class="cx('icon')" v-bind="ptm('icon')" />
|
|
11
|
+
<span v-else-if="confirmation.icon" :class="[confirmation.icon, cx('icon')]" v-bind="ptm('icon')" />
|
|
12
12
|
</slot>
|
|
13
13
|
<span :class="cx('message')" v-bind="ptm('message')">{{ confirmation.message }}</span>
|
|
14
14
|
</div>
|
|
@@ -326,7 +326,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
326
326
|
"class": vue.normalizeClass(_ctx.cx('icon'))
|
|
327
327
|
}, null, 8, ["class"])) : $data.confirmation.icon ? (vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
|
|
328
328
|
key: 1,
|
|
329
|
-
"class": _ctx.cx('icon')
|
|
329
|
+
"class": [$data.confirmation.icon, _ctx.cx('icon')]
|
|
330
330
|
}, _ctx.ptm('icon')), null, 16)) : vue.createCommentVNode("", true)];
|
|
331
331
|
}), vue.createElementVNode("span", vue.mergeProps({
|
|
332
332
|
"class": _ctx.cx('message')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/button"),t=require("primevue/confirmationeventbus"),n=require("primevue/focustrap"),o=require("primevue/overlayeventbus"),i=require("primevue/portal"),r=require("primevue/utils"),c=require("primevue/basecomponent"),s=require("primevue/confirmpopup/style"),l=require("vue");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=a(e),f=a(t),p=a(n),d=a(o),m=a(i),h={name:"ConfirmPopup",extends:{name:"BaseConfirmPopup",extends:a(c).default,props:{group:String},style:a(s).default,provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,data:function(){return{visible:!1,confirmation:null,autoFocusAccept:null,autoFocusReject:null}},target:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,confirmListener:null,closeListener:null,mounted:function(){var e=this;this.confirmListener=function(t){t&&t.group===e.group&&(e.confirmation=t,e.target=t.target,e.confirmation.onShow&&e.confirmation.onShow(),e.visible=!0)},this.closeListener=function(){e.visible=!1,e.confirmation=null},f.default.on("confirm",this.confirmListener),f.default.on("close",this.closeListener)},beforeUnmount:function(){f.default.off("confirm",this.confirmListener),f.default.off("close",this.closeListener),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindResizeListener(),this.container&&(r.ZIndexUtils.clear(this.container),this.container=null),this.target=null,this.confirmation=null},methods:{accept:function(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject:function(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1},onHide:function(){this.confirmation.onHide&&this.confirmation.onHide(),this.visible=!1},onAcceptKeydown:function(e){"Space"!==e.code&&"Enter"!==e.code&&"NumpadEnter"!==e.code||(this.accept(),r.DomHandler.focus(this.target),e.preventDefault())},onRejectKeydown:function(e){"Space"!==e.code&&"Enter"!==e.code&&"NumpadEnter"!==e.code||(this.reject(),r.DomHandler.focus(this.target),e.preventDefault())},onEnter:function(e){this.autoFocusAccept=void 0===this.confirmation.defaultFocus||"accept"===this.confirmation.defaultFocus,this.autoFocusReject="reject"===this.confirmation.defaultFocus,this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),r.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay)},onAfterEnter:function(){this.focus()},onLeave:function(){this.autoFocusAccept=null,this.autoFocusReject=null,this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener()},onAfterLeave:function(e){r.ZIndexUtils.clear(e)},alignOverlay:function(){r.DomHandler.absolutePosition(this.container,this.target);var e=r.DomHandler.getOffset(this.container),t=r.DomHandler.getOffset(this.target),n=0;e.left<t.left&&(n=t.left-e.left),this.container.style.setProperty("--overlayArrowLeft","".concat(n,"px")),e.top<t.top&&(this.container.setAttribute("data-p-confirm-popup-flipped","true"),!this.isUnstyled&&r.DomHandler.addClass(this.container,"p-confirm-popup-flipped"))},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){e.visible&&e.container&&!e.container.contains(t.target)&&!e.isTargetClicked(t)?(e.confirmation.onHide&&e.confirmation.onHide(),e.visible=!1):e.alignOverlay()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new r.ConnectedOverlayScrollHandler(this.target,(function(){e.visible&&(e.visible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.visible&&!r.DomHandler.isTouchDevice()&&(e.visible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},focus:function(){var e=this.container.querySelector("[autofocus]");e&&e.focus({preventScroll:!0})},isTargetClicked:function(e){return this.target&&(this.target===e.target||this.target.contains(e.target))},containerRef:function(e){this.container=e},onOverlayClick:function(e){d.default.emit("overlay-click",{originalEvent:e,target:this.target})},onOverlayKeydown:function(e){"Escape"===e.code&&(f.default.emit("close",this.closeListener),r.DomHandler.focus(this.target))},getCXOptions:function(e,t){return{contenxt:{icon:e,iconClass:t.class}}}},computed:{message:function(){return this.confirmation?this.confirmation.message:null},acceptLabel:function(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel:function(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon:function(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon:function(){return this.confirmation?this.confirmation.rejectIcon:null}},components:{CPButton:u.default,Portal:m.default},directives:{focustrap:p.default}};function v(e){return v="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},v(e)}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e,t,n){var o;return(t="symbol"==v(o=L(t,"string"))?o:String(o))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L(e,t){if("object"!=v(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=v(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var k=["aria-modal"];h.render=function(e,t,n,o,i,r){var c=l.resolveComponent("CPButton"),s=l.resolveComponent("Portal"),a=l.resolveDirective("focustrap");return l.openBlock(),l.createBlock(s,null,{default:l.withCtx((function(){return[l.createVNode(l.Transition,l.mergeProps({name:"p-confirm-popup",onEnter:r.onEnter,onAfterEnter:r.onAfterEnter,onLeave:r.onLeave,onAfterLeave:r.onAfterLeave},e.ptm("transition")),{default:l.withCtx((function(){return[i.visible?l.withDirectives((l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,ref:r.containerRef,role:"alertdialog",class:e.cx("root"),"aria-modal":i.visible,onClick:t[2]||(t[2]=function(){return r.onOverlayClick&&r.onOverlayClick.apply(r,arguments)}),onKeydown:t[3]||(t[3]=function(){return r.onOverlayKeydown&&r.onOverlayKeydown.apply(r,arguments)})},y(y({},e.$attrs),e.ptm("root"))),[e.$slots.container?l.renderSlot(e.$slots,"container",{key:0,message:i.confirmation,onAccept:r.accept,onReject:r.reject,acceptCallback:r.accept,rejectCallback:r.reject}):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[e.$slots.message?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.$slots.message),{key:1,message:i.confirmation},null,8,["message"])):(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,class:e.cx("content")},e.ptm("content")),[l.renderSlot(e.$slots,"icon",{},(function(){return[e.$slots.icon?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.$slots.icon),{key:0,class:l.normalizeClass(e.cx("icon"))},null,8,["class"])):i.confirmation.icon?(l.openBlock(),l.createElementBlock("span",l.mergeProps({key:1,class:e.cx("icon")},e.ptm("icon")),null,16)):l.createCommentVNode("",!0)]})),l.createElementVNode("span",l.mergeProps({class:e.cx("message")},e.ptm("message")),l.toDisplayString(i.confirmation.message),17)],16)),l.createElementVNode("div",l.mergeProps({class:e.cx("footer")},e.ptm("footer")),[l.createVNode(c,{label:r.rejectLabel,onClick:t[0]||(t[0]=function(e){return r.reject()}),onKeydown:r.onRejectKeydown,autofocus:i.autoFocusReject,class:l.normalizeClass([e.cx("rejectButton"),i.confirmation.rejectClass]),unstyled:e.unstyled,pt:e.ptm("rejectButton"),"data-pc-name":"rejectbutton"},l.createSlots({_:2},[r.rejectIcon||e.$slots.rejecticon?{name:"icon",fn:l.withCtx((function(t){return[l.renderSlot(e.$slots,"rejecticon",{},(function(){return[l.createElementVNode("span",l.mergeProps({class:[r.rejectIcon,t.class]},e.ptm("rejectButton").icon,{"data-pc-name":"rejectbuttonicon"}),null,16)]}))]})),key:"0"}:void 0]),1032,["label","onKeydown","autofocus","class","unstyled","pt"]),l.createVNode(c,{label:r.acceptLabel,onClick:t[1]||(t[1]=function(e){return r.accept()}),onKeydown:r.onAcceptKeydown,autofocus:i.autoFocusAccept,class:l.normalizeClass([e.cx("acceptButton"),i.confirmation.acceptClass]),unstyled:e.unstyled,pt:e.ptm("acceptButton"),"data-pc-name":"acceptbutton"},l.createSlots({_:2},[r.acceptIcon||e.$slots.accepticon?{name:"icon",fn:l.withCtx((function(t){return[l.renderSlot(e.$slots,"accepticon",{},(function(){return[l.createElementVNode("span",l.mergeProps({class:[r.acceptIcon,t.class]},e.ptm("acceptButton").icon,{"data-pc-name":"acceptbuttonicon"}),null,16)]}))]})),key:"0"}:void 0]),1032,["label","onKeydown","autofocus","class","unstyled","pt"])],16)],64))],16,k)),[[a]]):l.createCommentVNode("",!0)]})),_:3},16,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]})),_:3})},module.exports=h;
|
|
1
|
+
"use strict";var e=require("primevue/button"),t=require("primevue/confirmationeventbus"),n=require("primevue/focustrap"),o=require("primevue/overlayeventbus"),i=require("primevue/portal"),r=require("primevue/utils"),c=require("primevue/basecomponent"),s=require("primevue/confirmpopup/style"),l=require("vue");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=a(e),f=a(t),p=a(n),m=a(o),d=a(i),h={name:"ConfirmPopup",extends:{name:"BaseConfirmPopup",extends:a(c).default,props:{group:String},style:a(s).default,provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,data:function(){return{visible:!1,confirmation:null,autoFocusAccept:null,autoFocusReject:null}},target:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,confirmListener:null,closeListener:null,mounted:function(){var e=this;this.confirmListener=function(t){t&&t.group===e.group&&(e.confirmation=t,e.target=t.target,e.confirmation.onShow&&e.confirmation.onShow(),e.visible=!0)},this.closeListener=function(){e.visible=!1,e.confirmation=null},f.default.on("confirm",this.confirmListener),f.default.on("close",this.closeListener)},beforeUnmount:function(){f.default.off("confirm",this.confirmListener),f.default.off("close",this.closeListener),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindResizeListener(),this.container&&(r.ZIndexUtils.clear(this.container),this.container=null),this.target=null,this.confirmation=null},methods:{accept:function(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject:function(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1},onHide:function(){this.confirmation.onHide&&this.confirmation.onHide(),this.visible=!1},onAcceptKeydown:function(e){"Space"!==e.code&&"Enter"!==e.code&&"NumpadEnter"!==e.code||(this.accept(),r.DomHandler.focus(this.target),e.preventDefault())},onRejectKeydown:function(e){"Space"!==e.code&&"Enter"!==e.code&&"NumpadEnter"!==e.code||(this.reject(),r.DomHandler.focus(this.target),e.preventDefault())},onEnter:function(e){this.autoFocusAccept=void 0===this.confirmation.defaultFocus||"accept"===this.confirmation.defaultFocus,this.autoFocusReject="reject"===this.confirmation.defaultFocus,this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),r.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay)},onAfterEnter:function(){this.focus()},onLeave:function(){this.autoFocusAccept=null,this.autoFocusReject=null,this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener()},onAfterLeave:function(e){r.ZIndexUtils.clear(e)},alignOverlay:function(){r.DomHandler.absolutePosition(this.container,this.target);var e=r.DomHandler.getOffset(this.container),t=r.DomHandler.getOffset(this.target),n=0;e.left<t.left&&(n=t.left-e.left),this.container.style.setProperty("--overlayArrowLeft","".concat(n,"px")),e.top<t.top&&(this.container.setAttribute("data-p-confirm-popup-flipped","true"),!this.isUnstyled&&r.DomHandler.addClass(this.container,"p-confirm-popup-flipped"))},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){e.visible&&e.container&&!e.container.contains(t.target)&&!e.isTargetClicked(t)?(e.confirmation.onHide&&e.confirmation.onHide(),e.visible=!1):e.alignOverlay()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new r.ConnectedOverlayScrollHandler(this.target,(function(){e.visible&&(e.visible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.visible&&!r.DomHandler.isTouchDevice()&&(e.visible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},focus:function(){var e=this.container.querySelector("[autofocus]");e&&e.focus({preventScroll:!0})},isTargetClicked:function(e){return this.target&&(this.target===e.target||this.target.contains(e.target))},containerRef:function(e){this.container=e},onOverlayClick:function(e){m.default.emit("overlay-click",{originalEvent:e,target:this.target})},onOverlayKeydown:function(e){"Escape"===e.code&&(f.default.emit("close",this.closeListener),r.DomHandler.focus(this.target))},getCXOptions:function(e,t){return{contenxt:{icon:e,iconClass:t.class}}}},computed:{message:function(){return this.confirmation?this.confirmation.message:null},acceptLabel:function(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel:function(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon:function(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon:function(){return this.confirmation?this.confirmation.rejectIcon:null}},components:{CPButton:u.default,Portal:d.default},directives:{focustrap:p.default}};function v(e){return v="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},v(e)}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e,t,n){var o;return(t="symbol"==v(o=L(t,"string"))?o:String(o))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L(e,t){if("object"!=v(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=v(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var k=["aria-modal"];h.render=function(e,t,n,o,i,r){var c=l.resolveComponent("CPButton"),s=l.resolveComponent("Portal"),a=l.resolveDirective("focustrap");return l.openBlock(),l.createBlock(s,null,{default:l.withCtx((function(){return[l.createVNode(l.Transition,l.mergeProps({name:"p-confirm-popup",onEnter:r.onEnter,onAfterEnter:r.onAfterEnter,onLeave:r.onLeave,onAfterLeave:r.onAfterLeave},e.ptm("transition")),{default:l.withCtx((function(){return[i.visible?l.withDirectives((l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,ref:r.containerRef,role:"alertdialog",class:e.cx("root"),"aria-modal":i.visible,onClick:t[2]||(t[2]=function(){return r.onOverlayClick&&r.onOverlayClick.apply(r,arguments)}),onKeydown:t[3]||(t[3]=function(){return r.onOverlayKeydown&&r.onOverlayKeydown.apply(r,arguments)})},y(y({},e.$attrs),e.ptm("root"))),[e.$slots.container?l.renderSlot(e.$slots,"container",{key:0,message:i.confirmation,onAccept:r.accept,onReject:r.reject,acceptCallback:r.accept,rejectCallback:r.reject}):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[e.$slots.message?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.$slots.message),{key:1,message:i.confirmation},null,8,["message"])):(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,class:e.cx("content")},e.ptm("content")),[l.renderSlot(e.$slots,"icon",{},(function(){return[e.$slots.icon?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.$slots.icon),{key:0,class:l.normalizeClass(e.cx("icon"))},null,8,["class"])):i.confirmation.icon?(l.openBlock(),l.createElementBlock("span",l.mergeProps({key:1,class:[i.confirmation.icon,e.cx("icon")]},e.ptm("icon")),null,16)):l.createCommentVNode("",!0)]})),l.createElementVNode("span",l.mergeProps({class:e.cx("message")},e.ptm("message")),l.toDisplayString(i.confirmation.message),17)],16)),l.createElementVNode("div",l.mergeProps({class:e.cx("footer")},e.ptm("footer")),[l.createVNode(c,{label:r.rejectLabel,onClick:t[0]||(t[0]=function(e){return r.reject()}),onKeydown:r.onRejectKeydown,autofocus:i.autoFocusReject,class:l.normalizeClass([e.cx("rejectButton"),i.confirmation.rejectClass]),unstyled:e.unstyled,pt:e.ptm("rejectButton"),"data-pc-name":"rejectbutton"},l.createSlots({_:2},[r.rejectIcon||e.$slots.rejecticon?{name:"icon",fn:l.withCtx((function(t){return[l.renderSlot(e.$slots,"rejecticon",{},(function(){return[l.createElementVNode("span",l.mergeProps({class:[r.rejectIcon,t.class]},e.ptm("rejectButton").icon,{"data-pc-name":"rejectbuttonicon"}),null,16)]}))]})),key:"0"}:void 0]),1032,["label","onKeydown","autofocus","class","unstyled","pt"]),l.createVNode(c,{label:r.acceptLabel,onClick:t[1]||(t[1]=function(e){return r.accept()}),onKeydown:r.onAcceptKeydown,autofocus:i.autoFocusAccept,class:l.normalizeClass([e.cx("acceptButton"),i.confirmation.acceptClass]),unstyled:e.unstyled,pt:e.ptm("acceptButton"),"data-pc-name":"acceptbutton"},l.createSlots({_:2},[r.acceptIcon||e.$slots.accepticon?{name:"icon",fn:l.withCtx((function(t){return[l.renderSlot(e.$slots,"accepticon",{},(function(){return[l.createElementVNode("span",l.mergeProps({class:[r.acceptIcon,t.class]},e.ptm("acceptButton").icon,{"data-pc-name":"acceptbuttonicon"}),null,16)]}))]})),key:"0"}:void 0]),1032,["label","onKeydown","autofocus","class","unstyled","pt"])],16)],64))],16,k)),[[a]]):l.createCommentVNode("",!0)]})),_:3},16,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]})),_:3})},module.exports=h;
|
|
@@ -314,7 +314,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
314
314
|
"class": normalizeClass(_ctx.cx('icon'))
|
|
315
315
|
}, null, 8, ["class"])) : $data.confirmation.icon ? (openBlock(), createElementBlock("span", mergeProps({
|
|
316
316
|
key: 1,
|
|
317
|
-
"class": _ctx.cx('icon')
|
|
317
|
+
"class": [$data.confirmation.icon, _ctx.cx('icon')]
|
|
318
318
|
}, _ctx.ptm('icon')), null, 16)) : createCommentVNode("", true)];
|
|
319
319
|
}), createElementVNode("span", mergeProps({
|
|
320
320
|
"class": _ctx.cx('message')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"primevue/button";import e from"primevue/confirmationeventbus";import n from"primevue/focustrap";import i from"primevue/overlayeventbus";import o from"primevue/portal";import{ZIndexUtils as r,DomHandler as c,ConnectedOverlayScrollHandler as s}from"primevue/utils";import a from"primevue/basecomponent";import l from"primevue/confirmpopup/style";import{resolveComponent as u,resolveDirective as f,openBlock as p,createBlock as m,withCtx as d,createVNode as h,Transition as v,mergeProps as b,withDirectives as y,createElementBlock as L,renderSlot as g,Fragment as j,resolveDynamicComponent as k,normalizeClass as O,createCommentVNode as C,createElementVNode as w,toDisplayString as S,createSlots as E}from"vue";var P={name:"ConfirmPopup",extends:{name:"BaseConfirmPopup",extends:a,props:{group:String},style:l,provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,data:function(){return{visible:!1,confirmation:null,autoFocusAccept:null,autoFocusReject:null}},target:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,confirmListener:null,closeListener:null,mounted:function(){var t=this;this.confirmListener=function(e){e&&e.group===t.group&&(t.confirmation=e,t.target=e.target,t.confirmation.onShow&&t.confirmation.onShow(),t.visible=!0)},this.closeListener=function(){t.visible=!1,t.confirmation=null},e.on("confirm",this.confirmListener),e.on("close",this.closeListener)},beforeUnmount:function(){e.off("confirm",this.confirmListener),e.off("close",this.closeListener),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindResizeListener(),this.container&&(r.clear(this.container),this.container=null),this.target=null,this.confirmation=null},methods:{accept:function(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject:function(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1},onHide:function(){this.confirmation.onHide&&this.confirmation.onHide(),this.visible=!1},onAcceptKeydown:function(t){"Space"!==t.code&&"Enter"!==t.code&&"NumpadEnter"!==t.code||(this.accept(),c.focus(this.target),t.preventDefault())},onRejectKeydown:function(t){"Space"!==t.code&&"Enter"!==t.code&&"NumpadEnter"!==t.code||(this.reject(),c.focus(this.target),t.preventDefault())},onEnter:function(t){this.autoFocusAccept=void 0===this.confirmation.defaultFocus||"accept"===this.confirmation.defaultFocus,this.autoFocusReject="reject"===this.confirmation.defaultFocus,this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),r.set("overlay",t,this.$primevue.config.zIndex.overlay)},onAfterEnter:function(){this.focus()},onLeave:function(){this.autoFocusAccept=null,this.autoFocusReject=null,this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener()},onAfterLeave:function(t){r.clear(t)},alignOverlay:function(){c.absolutePosition(this.container,this.target);var t=c.getOffset(this.container),e=c.getOffset(this.target),n=0;t.left<e.left&&(n=e.left-t.left),this.container.style.setProperty("--overlayArrowLeft","".concat(n,"px")),t.top<e.top&&(this.container.setAttribute("data-p-confirm-popup-flipped","true"),!this.isUnstyled&&c.addClass(this.container,"p-confirm-popup-flipped"))},bindOutsideClickListener:function(){var t=this;this.outsideClickListener||(this.outsideClickListener=function(e){t.visible&&t.container&&!t.container.contains(e.target)&&!t.isTargetClicked(e)?(t.confirmation.onHide&&t.confirmation.onHide(),t.visible=!1):t.alignOverlay()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener:function(){var t=this;this.scrollHandler||(this.scrollHandler=new s(this.target,(function(){t.visible&&(t.visible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var t=this;this.resizeListener||(this.resizeListener=function(){t.visible&&!c.isTouchDevice()&&(t.visible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},focus:function(){var t=this.container.querySelector("[autofocus]");t&&t.focus({preventScroll:!0})},isTargetClicked:function(t){return this.target&&(this.target===t.target||this.target.contains(t.target))},containerRef:function(t){this.container=t},onOverlayClick:function(t){i.emit("overlay-click",{originalEvent:t,target:this.target})},onOverlayKeydown:function(t){"Escape"===t.code&&(e.emit("close",this.closeListener),c.focus(this.target))},getCXOptions:function(t,e){return{contenxt:{icon:t,iconClass:e.class}}}},computed:{message:function(){return this.confirmation?this.confirmation.message:null},acceptLabel:function(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel:function(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon:function(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon:function(){return this.confirmation?this.confirmation.rejectIcon:null}},components:{CPButton:t,Portal:o},directives:{focustrap:n}};function A(t){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},A(t)}function $(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function z(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?$(Object(n),!0).forEach((function(e){x(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function x(t,e,n){var i;return(e="symbol"==A(i=H(e,"string"))?i:String(i))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function H(t,e){if("object"!=A(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=A(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var R=["aria-modal"];P.render=function(t,e,n,i,o,r){var c=u("CPButton"),s=u("Portal"),a=f("focustrap");return p(),m(s,null,{default:d((function(){return[h(v,b({name:"p-confirm-popup",onEnter:r.onEnter,onAfterEnter:r.onAfterEnter,onLeave:r.onLeave,onAfterLeave:r.onAfterLeave},t.ptm("transition")),{default:d((function(){return[o.visible?y((p(),L("div",b({key:0,ref:r.containerRef,role:"alertdialog",class:t.cx("root"),"aria-modal":o.visible,onClick:e[2]||(e[2]=function(){return r.onOverlayClick&&r.onOverlayClick.apply(r,arguments)}),onKeydown:e[3]||(e[3]=function(){return r.onOverlayKeydown&&r.onOverlayKeydown.apply(r,arguments)})},z(z({},t.$attrs),t.ptm("root"))),[t.$slots.container?g(t.$slots,"container",{key:0,message:o.confirmation,onAccept:r.accept,onReject:r.reject,acceptCallback:r.accept,rejectCallback:r.reject}):(p(),L(j,{key:1},[t.$slots.message?(p(),m(k(t.$slots.message),{key:1,message:o.confirmation},null,8,["message"])):(p(),L("div",b({key:0,class:t.cx("content")},t.ptm("content")),[g(t.$slots,"icon",{},(function(){return[t.$slots.icon?(p(),m(k(t.$slots.icon),{key:0,class:O(t.cx("icon"))},null,8,["class"])):o.confirmation.icon?(p(),L("span",b({key:1,class:t.cx("icon")},t.ptm("icon")),null,16)):C("",!0)]})),w("span",b({class:t.cx("message")},t.ptm("message")),S(o.confirmation.message),17)],16)),w("div",b({class:t.cx("footer")},t.ptm("footer")),[h(c,{label:r.rejectLabel,onClick:e[0]||(e[0]=function(t){return r.reject()}),onKeydown:r.onRejectKeydown,autofocus:o.autoFocusReject,class:O([t.cx("rejectButton"),o.confirmation.rejectClass]),unstyled:t.unstyled,pt:t.ptm("rejectButton"),"data-pc-name":"rejectbutton"},E({_:2},[r.rejectIcon||t.$slots.rejecticon?{name:"icon",fn:d((function(e){return[g(t.$slots,"rejecticon",{},(function(){return[w("span",b({class:[r.rejectIcon,e.class]},t.ptm("rejectButton").icon,{"data-pc-name":"rejectbuttonicon"}),null,16)]}))]})),key:"0"}:void 0]),1032,["label","onKeydown","autofocus","class","unstyled","pt"]),h(c,{label:r.acceptLabel,onClick:e[1]||(e[1]=function(t){return r.accept()}),onKeydown:r.onAcceptKeydown,autofocus:o.autoFocusAccept,class:O([t.cx("acceptButton"),o.confirmation.acceptClass]),unstyled:t.unstyled,pt:t.ptm("acceptButton"),"data-pc-name":"acceptbutton"},E({_:2},[r.acceptIcon||t.$slots.accepticon?{name:"icon",fn:d((function(e){return[g(t.$slots,"accepticon",{},(function(){return[w("span",b({class:[r.acceptIcon,e.class]},t.ptm("acceptButton").icon,{"data-pc-name":"acceptbuttonicon"}),null,16)]}))]})),key:"0"}:void 0]),1032,["label","onKeydown","autofocus","class","unstyled","pt"])],16)],64))],16,R)),[[a]]):C("",!0)]})),_:3},16,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]})),_:3})};export{P as default};
|
|
1
|
+
import t from"primevue/button";import e from"primevue/confirmationeventbus";import n from"primevue/focustrap";import i from"primevue/overlayeventbus";import o from"primevue/portal";import{ZIndexUtils as r,DomHandler as c,ConnectedOverlayScrollHandler as s}from"primevue/utils";import a from"primevue/basecomponent";import l from"primevue/confirmpopup/style";import{resolveComponent as u,resolveDirective as f,openBlock as p,createBlock as m,withCtx as d,createVNode as h,Transition as v,mergeProps as b,withDirectives as y,createElementBlock as L,renderSlot as g,Fragment as j,resolveDynamicComponent as k,normalizeClass as O,createCommentVNode as C,createElementVNode as w,toDisplayString as S,createSlots as E}from"vue";var P={name:"ConfirmPopup",extends:{name:"BaseConfirmPopup",extends:a,props:{group:String},style:l,provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,data:function(){return{visible:!1,confirmation:null,autoFocusAccept:null,autoFocusReject:null}},target:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,confirmListener:null,closeListener:null,mounted:function(){var t=this;this.confirmListener=function(e){e&&e.group===t.group&&(t.confirmation=e,t.target=e.target,t.confirmation.onShow&&t.confirmation.onShow(),t.visible=!0)},this.closeListener=function(){t.visible=!1,t.confirmation=null},e.on("confirm",this.confirmListener),e.on("close",this.closeListener)},beforeUnmount:function(){e.off("confirm",this.confirmListener),e.off("close",this.closeListener),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindResizeListener(),this.container&&(r.clear(this.container),this.container=null),this.target=null,this.confirmation=null},methods:{accept:function(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject:function(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1},onHide:function(){this.confirmation.onHide&&this.confirmation.onHide(),this.visible=!1},onAcceptKeydown:function(t){"Space"!==t.code&&"Enter"!==t.code&&"NumpadEnter"!==t.code||(this.accept(),c.focus(this.target),t.preventDefault())},onRejectKeydown:function(t){"Space"!==t.code&&"Enter"!==t.code&&"NumpadEnter"!==t.code||(this.reject(),c.focus(this.target),t.preventDefault())},onEnter:function(t){this.autoFocusAccept=void 0===this.confirmation.defaultFocus||"accept"===this.confirmation.defaultFocus,this.autoFocusReject="reject"===this.confirmation.defaultFocus,this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),r.set("overlay",t,this.$primevue.config.zIndex.overlay)},onAfterEnter:function(){this.focus()},onLeave:function(){this.autoFocusAccept=null,this.autoFocusReject=null,this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener()},onAfterLeave:function(t){r.clear(t)},alignOverlay:function(){c.absolutePosition(this.container,this.target);var t=c.getOffset(this.container),e=c.getOffset(this.target),n=0;t.left<e.left&&(n=e.left-t.left),this.container.style.setProperty("--overlayArrowLeft","".concat(n,"px")),t.top<e.top&&(this.container.setAttribute("data-p-confirm-popup-flipped","true"),!this.isUnstyled&&c.addClass(this.container,"p-confirm-popup-flipped"))},bindOutsideClickListener:function(){var t=this;this.outsideClickListener||(this.outsideClickListener=function(e){t.visible&&t.container&&!t.container.contains(e.target)&&!t.isTargetClicked(e)?(t.confirmation.onHide&&t.confirmation.onHide(),t.visible=!1):t.alignOverlay()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener:function(){var t=this;this.scrollHandler||(this.scrollHandler=new s(this.target,(function(){t.visible&&(t.visible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var t=this;this.resizeListener||(this.resizeListener=function(){t.visible&&!c.isTouchDevice()&&(t.visible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},focus:function(){var t=this.container.querySelector("[autofocus]");t&&t.focus({preventScroll:!0})},isTargetClicked:function(t){return this.target&&(this.target===t.target||this.target.contains(t.target))},containerRef:function(t){this.container=t},onOverlayClick:function(t){i.emit("overlay-click",{originalEvent:t,target:this.target})},onOverlayKeydown:function(t){"Escape"===t.code&&(e.emit("close",this.closeListener),c.focus(this.target))},getCXOptions:function(t,e){return{contenxt:{icon:t,iconClass:e.class}}}},computed:{message:function(){return this.confirmation?this.confirmation.message:null},acceptLabel:function(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel:function(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon:function(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon:function(){return this.confirmation?this.confirmation.rejectIcon:null}},components:{CPButton:t,Portal:o},directives:{focustrap:n}};function A(t){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},A(t)}function $(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function z(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?$(Object(n),!0).forEach((function(e){x(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function x(t,e,n){var i;return(e="symbol"==A(i=H(e,"string"))?i:String(i))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function H(t,e){if("object"!=A(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=A(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var R=["aria-modal"];P.render=function(t,e,n,i,o,r){var c=u("CPButton"),s=u("Portal"),a=f("focustrap");return p(),m(s,null,{default:d((function(){return[h(v,b({name:"p-confirm-popup",onEnter:r.onEnter,onAfterEnter:r.onAfterEnter,onLeave:r.onLeave,onAfterLeave:r.onAfterLeave},t.ptm("transition")),{default:d((function(){return[o.visible?y((p(),L("div",b({key:0,ref:r.containerRef,role:"alertdialog",class:t.cx("root"),"aria-modal":o.visible,onClick:e[2]||(e[2]=function(){return r.onOverlayClick&&r.onOverlayClick.apply(r,arguments)}),onKeydown:e[3]||(e[3]=function(){return r.onOverlayKeydown&&r.onOverlayKeydown.apply(r,arguments)})},z(z({},t.$attrs),t.ptm("root"))),[t.$slots.container?g(t.$slots,"container",{key:0,message:o.confirmation,onAccept:r.accept,onReject:r.reject,acceptCallback:r.accept,rejectCallback:r.reject}):(p(),L(j,{key:1},[t.$slots.message?(p(),m(k(t.$slots.message),{key:1,message:o.confirmation},null,8,["message"])):(p(),L("div",b({key:0,class:t.cx("content")},t.ptm("content")),[g(t.$slots,"icon",{},(function(){return[t.$slots.icon?(p(),m(k(t.$slots.icon),{key:0,class:O(t.cx("icon"))},null,8,["class"])):o.confirmation.icon?(p(),L("span",b({key:1,class:[o.confirmation.icon,t.cx("icon")]},t.ptm("icon")),null,16)):C("",!0)]})),w("span",b({class:t.cx("message")},t.ptm("message")),S(o.confirmation.message),17)],16)),w("div",b({class:t.cx("footer")},t.ptm("footer")),[h(c,{label:r.rejectLabel,onClick:e[0]||(e[0]=function(t){return r.reject()}),onKeydown:r.onRejectKeydown,autofocus:o.autoFocusReject,class:O([t.cx("rejectButton"),o.confirmation.rejectClass]),unstyled:t.unstyled,pt:t.ptm("rejectButton"),"data-pc-name":"rejectbutton"},E({_:2},[r.rejectIcon||t.$slots.rejecticon?{name:"icon",fn:d((function(e){return[g(t.$slots,"rejecticon",{},(function(){return[w("span",b({class:[r.rejectIcon,e.class]},t.ptm("rejectButton").icon,{"data-pc-name":"rejectbuttonicon"}),null,16)]}))]})),key:"0"}:void 0]),1032,["label","onKeydown","autofocus","class","unstyled","pt"]),h(c,{label:r.acceptLabel,onClick:e[1]||(e[1]=function(t){return r.accept()}),onKeydown:r.onAcceptKeydown,autofocus:o.autoFocusAccept,class:O([t.cx("acceptButton"),o.confirmation.acceptClass]),unstyled:t.unstyled,pt:t.ptm("acceptButton"),"data-pc-name":"acceptbutton"},E({_:2},[r.acceptIcon||t.$slots.accepticon?{name:"icon",fn:d((function(e){return[g(t.$slots,"accepticon",{},(function(){return[w("span",b({class:[r.acceptIcon,e.class]},t.ptm("acceptButton").icon,{"data-pc-name":"acceptbuttonicon"}),null,16)]}))]})),key:"0"}:void 0]),1032,["label","onKeydown","autofocus","class","unstyled","pt"])],16)],64))],16,R)),[[a]]):C("",!0)]})),_:3},16,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]})),_:3})};export{P as default};
|
|
@@ -318,7 +318,7 @@ this.primevue.confirmpopup = (function (Button, ConfirmationEventBus, FocusTrap,
|
|
|
318
318
|
"class": vue.normalizeClass(_ctx.cx('icon'))
|
|
319
319
|
}, null, 8, ["class"])) : $data.confirmation.icon ? (vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
|
|
320
320
|
key: 1,
|
|
321
|
-
"class": _ctx.cx('icon')
|
|
321
|
+
"class": [$data.confirmation.icon, _ctx.cx('icon')]
|
|
322
322
|
}, _ctx.ptm('icon')), null, 16)) : vue.createCommentVNode("", true)];
|
|
323
323
|
}), vue.createElementVNode("span", vue.mergeProps({
|
|
324
324
|
"class": _ctx.cx('message')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.confirmpopup=function(e,t,n,o,i,r,c,s,l){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=a(e),f=a(t),p=a(n),m=a(o),d=a(i),h={name:"ConfirmPopup",extends:{name:"BaseConfirmPopup",extends:a(c).default,props:{group:String},style:a(s).default,provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,data:function(){return{visible:!1,confirmation:null,autoFocusAccept:null,autoFocusReject:null}},target:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,confirmListener:null,closeListener:null,mounted:function(){var e=this;this.confirmListener=function(t){t&&t.group===e.group&&(e.confirmation=t,e.target=t.target,e.confirmation.onShow&&e.confirmation.onShow(),e.visible=!0)},this.closeListener=function(){e.visible=!1,e.confirmation=null},f.default.on("confirm",this.confirmListener),f.default.on("close",this.closeListener)},beforeUnmount:function(){f.default.off("confirm",this.confirmListener),f.default.off("close",this.closeListener),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindResizeListener(),this.container&&(r.ZIndexUtils.clear(this.container),this.container=null),this.target=null,this.confirmation=null},methods:{accept:function(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject:function(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1},onHide:function(){this.confirmation.onHide&&this.confirmation.onHide(),this.visible=!1},onAcceptKeydown:function(e){"Space"!==e.code&&"Enter"!==e.code&&"NumpadEnter"!==e.code||(this.accept(),r.DomHandler.focus(this.target),e.preventDefault())},onRejectKeydown:function(e){"Space"!==e.code&&"Enter"!==e.code&&"NumpadEnter"!==e.code||(this.reject(),r.DomHandler.focus(this.target),e.preventDefault())},onEnter:function(e){this.autoFocusAccept=void 0===this.confirmation.defaultFocus||"accept"===this.confirmation.defaultFocus,this.autoFocusReject="reject"===this.confirmation.defaultFocus,this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),r.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay)},onAfterEnter:function(){this.focus()},onLeave:function(){this.autoFocusAccept=null,this.autoFocusReject=null,this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener()},onAfterLeave:function(e){r.ZIndexUtils.clear(e)},alignOverlay:function(){r.DomHandler.absolutePosition(this.container,this.target);var e=r.DomHandler.getOffset(this.container),t=r.DomHandler.getOffset(this.target),n=0;e.left<t.left&&(n=t.left-e.left),this.container.style.setProperty("--overlayArrowLeft","".concat(n,"px")),e.top<t.top&&(this.container.setAttribute("data-p-confirm-popup-flipped","true"),!this.isUnstyled&&r.DomHandler.addClass(this.container,"p-confirm-popup-flipped"))},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){e.visible&&e.container&&!e.container.contains(t.target)&&!e.isTargetClicked(t)?(e.confirmation.onHide&&e.confirmation.onHide(),e.visible=!1):e.alignOverlay()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new r.ConnectedOverlayScrollHandler(this.target,(function(){e.visible&&(e.visible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.visible&&!r.DomHandler.isTouchDevice()&&(e.visible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},focus:function(){var e=this.container.querySelector("[autofocus]");e&&e.focus({preventScroll:!0})},isTargetClicked:function(e){return this.target&&(this.target===e.target||this.target.contains(e.target))},containerRef:function(e){this.container=e},onOverlayClick:function(e){m.default.emit("overlay-click",{originalEvent:e,target:this.target})},onOverlayKeydown:function(e){"Escape"===e.code&&(f.default.emit("close",this.closeListener),r.DomHandler.focus(this.target))},getCXOptions:function(e,t){return{contenxt:{icon:e,iconClass:t.class}}}},computed:{message:function(){return this.confirmation?this.confirmation.message:null},acceptLabel:function(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel:function(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon:function(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon:function(){return this.confirmation?this.confirmation.rejectIcon:null}},components:{CPButton:u.default,Portal:d.default},directives:{focustrap:p.default}};function v(e){return v="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},v(e)}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e,t,n){var o;return(t="symbol"==v(o=L(t,"string"))?o:String(o))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L(e,t){if("object"!=v(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=v(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var k=["aria-modal"];return h.render=function(e,t,n,o,i,r){var c=l.resolveComponent("CPButton"),s=l.resolveComponent("Portal"),a=l.resolveDirective("focustrap");return l.openBlock(),l.createBlock(s,null,{default:l.withCtx((function(){return[l.createVNode(l.Transition,l.mergeProps({name:"p-confirm-popup",onEnter:r.onEnter,onAfterEnter:r.onAfterEnter,onLeave:r.onLeave,onAfterLeave:r.onAfterLeave},e.ptm("transition")),{default:l.withCtx((function(){return[i.visible?l.withDirectives((l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,ref:r.containerRef,role:"alertdialog",class:e.cx("root"),"aria-modal":i.visible,onClick:t[2]||(t[2]=function(){return r.onOverlayClick&&r.onOverlayClick.apply(r,arguments)}),onKeydown:t[3]||(t[3]=function(){return r.onOverlayKeydown&&r.onOverlayKeydown.apply(r,arguments)})},y(y({},e.$attrs),e.ptm("root"))),[e.$slots.container?l.renderSlot(e.$slots,"container",{key:0,message:i.confirmation,onAccept:r.accept,onReject:r.reject,acceptCallback:r.accept,rejectCallback:r.reject}):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[e.$slots.message?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.$slots.message),{key:1,message:i.confirmation},null,8,["message"])):(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,class:e.cx("content")},e.ptm("content")),[l.renderSlot(e.$slots,"icon",{},(function(){return[e.$slots.icon?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.$slots.icon),{key:0,class:l.normalizeClass(e.cx("icon"))},null,8,["class"])):i.confirmation.icon?(l.openBlock(),l.createElementBlock("span",l.mergeProps({key:1,class:e.cx("icon")},e.ptm("icon")),null,16)):l.createCommentVNode("",!0)]})),l.createElementVNode("span",l.mergeProps({class:e.cx("message")},e.ptm("message")),l.toDisplayString(i.confirmation.message),17)],16)),l.createElementVNode("div",l.mergeProps({class:e.cx("footer")},e.ptm("footer")),[l.createVNode(c,{label:r.rejectLabel,onClick:t[0]||(t[0]=function(e){return r.reject()}),onKeydown:r.onRejectKeydown,autofocus:i.autoFocusReject,class:l.normalizeClass([e.cx("rejectButton"),i.confirmation.rejectClass]),unstyled:e.unstyled,pt:e.ptm("rejectButton"),"data-pc-name":"rejectbutton"},l.createSlots({_:2},[r.rejectIcon||e.$slots.rejecticon?{name:"icon",fn:l.withCtx((function(t){return[l.renderSlot(e.$slots,"rejecticon",{},(function(){return[l.createElementVNode("span",l.mergeProps({class:[r.rejectIcon,t.class]},e.ptm("rejectButton").icon,{"data-pc-name":"rejectbuttonicon"}),null,16)]}))]})),key:"0"}:void 0]),1032,["label","onKeydown","autofocus","class","unstyled","pt"]),l.createVNode(c,{label:r.acceptLabel,onClick:t[1]||(t[1]=function(e){return r.accept()}),onKeydown:r.onAcceptKeydown,autofocus:i.autoFocusAccept,class:l.normalizeClass([e.cx("acceptButton"),i.confirmation.acceptClass]),unstyled:e.unstyled,pt:e.ptm("acceptButton"),"data-pc-name":"acceptbutton"},l.createSlots({_:2},[r.acceptIcon||e.$slots.accepticon?{name:"icon",fn:l.withCtx((function(t){return[l.renderSlot(e.$slots,"accepticon",{},(function(){return[l.createElementVNode("span",l.mergeProps({class:[r.acceptIcon,t.class]},e.ptm("acceptButton").icon,{"data-pc-name":"acceptbuttonicon"}),null,16)]}))]})),key:"0"}:void 0]),1032,["label","onKeydown","autofocus","class","unstyled","pt"])],16)],64))],16,k)),[[a]]):l.createCommentVNode("",!0)]})),_:3},16,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]})),_:3})},h}(primevue.button,primevue.confirmationeventbus,primevue.focustrap,primevue.overlayeventbus,primevue.portal,primevue.utils,primevue.basecomponent,primevue.confirmpopup.style,Vue);
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.confirmpopup=function(e,t,n,o,i,r,c,s,l){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=a(e),f=a(t),p=a(n),m=a(o),d=a(i),h={name:"ConfirmPopup",extends:{name:"BaseConfirmPopup",extends:a(c).default,props:{group:String},style:a(s).default,provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,data:function(){return{visible:!1,confirmation:null,autoFocusAccept:null,autoFocusReject:null}},target:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,confirmListener:null,closeListener:null,mounted:function(){var e=this;this.confirmListener=function(t){t&&t.group===e.group&&(e.confirmation=t,e.target=t.target,e.confirmation.onShow&&e.confirmation.onShow(),e.visible=!0)},this.closeListener=function(){e.visible=!1,e.confirmation=null},f.default.on("confirm",this.confirmListener),f.default.on("close",this.closeListener)},beforeUnmount:function(){f.default.off("confirm",this.confirmListener),f.default.off("close",this.closeListener),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindResizeListener(),this.container&&(r.ZIndexUtils.clear(this.container),this.container=null),this.target=null,this.confirmation=null},methods:{accept:function(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject:function(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1},onHide:function(){this.confirmation.onHide&&this.confirmation.onHide(),this.visible=!1},onAcceptKeydown:function(e){"Space"!==e.code&&"Enter"!==e.code&&"NumpadEnter"!==e.code||(this.accept(),r.DomHandler.focus(this.target),e.preventDefault())},onRejectKeydown:function(e){"Space"!==e.code&&"Enter"!==e.code&&"NumpadEnter"!==e.code||(this.reject(),r.DomHandler.focus(this.target),e.preventDefault())},onEnter:function(e){this.autoFocusAccept=void 0===this.confirmation.defaultFocus||"accept"===this.confirmation.defaultFocus,this.autoFocusReject="reject"===this.confirmation.defaultFocus,this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),r.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay)},onAfterEnter:function(){this.focus()},onLeave:function(){this.autoFocusAccept=null,this.autoFocusReject=null,this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener()},onAfterLeave:function(e){r.ZIndexUtils.clear(e)},alignOverlay:function(){r.DomHandler.absolutePosition(this.container,this.target);var e=r.DomHandler.getOffset(this.container),t=r.DomHandler.getOffset(this.target),n=0;e.left<t.left&&(n=t.left-e.left),this.container.style.setProperty("--overlayArrowLeft","".concat(n,"px")),e.top<t.top&&(this.container.setAttribute("data-p-confirm-popup-flipped","true"),!this.isUnstyled&&r.DomHandler.addClass(this.container,"p-confirm-popup-flipped"))},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){e.visible&&e.container&&!e.container.contains(t.target)&&!e.isTargetClicked(t)?(e.confirmation.onHide&&e.confirmation.onHide(),e.visible=!1):e.alignOverlay()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new r.ConnectedOverlayScrollHandler(this.target,(function(){e.visible&&(e.visible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.visible&&!r.DomHandler.isTouchDevice()&&(e.visible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},focus:function(){var e=this.container.querySelector("[autofocus]");e&&e.focus({preventScroll:!0})},isTargetClicked:function(e){return this.target&&(this.target===e.target||this.target.contains(e.target))},containerRef:function(e){this.container=e},onOverlayClick:function(e){m.default.emit("overlay-click",{originalEvent:e,target:this.target})},onOverlayKeydown:function(e){"Escape"===e.code&&(f.default.emit("close",this.closeListener),r.DomHandler.focus(this.target))},getCXOptions:function(e,t){return{contenxt:{icon:e,iconClass:t.class}}}},computed:{message:function(){return this.confirmation?this.confirmation.message:null},acceptLabel:function(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel:function(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon:function(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon:function(){return this.confirmation?this.confirmation.rejectIcon:null}},components:{CPButton:u.default,Portal:d.default},directives:{focustrap:p.default}};function v(e){return v="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},v(e)}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e,t,n){var o;return(t="symbol"==v(o=L(t,"string"))?o:String(o))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L(e,t){if("object"!=v(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=v(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var k=["aria-modal"];return h.render=function(e,t,n,o,i,r){var c=l.resolveComponent("CPButton"),s=l.resolveComponent("Portal"),a=l.resolveDirective("focustrap");return l.openBlock(),l.createBlock(s,null,{default:l.withCtx((function(){return[l.createVNode(l.Transition,l.mergeProps({name:"p-confirm-popup",onEnter:r.onEnter,onAfterEnter:r.onAfterEnter,onLeave:r.onLeave,onAfterLeave:r.onAfterLeave},e.ptm("transition")),{default:l.withCtx((function(){return[i.visible?l.withDirectives((l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,ref:r.containerRef,role:"alertdialog",class:e.cx("root"),"aria-modal":i.visible,onClick:t[2]||(t[2]=function(){return r.onOverlayClick&&r.onOverlayClick.apply(r,arguments)}),onKeydown:t[3]||(t[3]=function(){return r.onOverlayKeydown&&r.onOverlayKeydown.apply(r,arguments)})},y(y({},e.$attrs),e.ptm("root"))),[e.$slots.container?l.renderSlot(e.$slots,"container",{key:0,message:i.confirmation,onAccept:r.accept,onReject:r.reject,acceptCallback:r.accept,rejectCallback:r.reject}):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[e.$slots.message?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.$slots.message),{key:1,message:i.confirmation},null,8,["message"])):(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,class:e.cx("content")},e.ptm("content")),[l.renderSlot(e.$slots,"icon",{},(function(){return[e.$slots.icon?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.$slots.icon),{key:0,class:l.normalizeClass(e.cx("icon"))},null,8,["class"])):i.confirmation.icon?(l.openBlock(),l.createElementBlock("span",l.mergeProps({key:1,class:[i.confirmation.icon,e.cx("icon")]},e.ptm("icon")),null,16)):l.createCommentVNode("",!0)]})),l.createElementVNode("span",l.mergeProps({class:e.cx("message")},e.ptm("message")),l.toDisplayString(i.confirmation.message),17)],16)),l.createElementVNode("div",l.mergeProps({class:e.cx("footer")},e.ptm("footer")),[l.createVNode(c,{label:r.rejectLabel,onClick:t[0]||(t[0]=function(e){return r.reject()}),onKeydown:r.onRejectKeydown,autofocus:i.autoFocusReject,class:l.normalizeClass([e.cx("rejectButton"),i.confirmation.rejectClass]),unstyled:e.unstyled,pt:e.ptm("rejectButton"),"data-pc-name":"rejectbutton"},l.createSlots({_:2},[r.rejectIcon||e.$slots.rejecticon?{name:"icon",fn:l.withCtx((function(t){return[l.renderSlot(e.$slots,"rejecticon",{},(function(){return[l.createElementVNode("span",l.mergeProps({class:[r.rejectIcon,t.class]},e.ptm("rejectButton").icon,{"data-pc-name":"rejectbuttonicon"}),null,16)]}))]})),key:"0"}:void 0]),1032,["label","onKeydown","autofocus","class","unstyled","pt"]),l.createVNode(c,{label:r.acceptLabel,onClick:t[1]||(t[1]=function(e){return r.accept()}),onKeydown:r.onAcceptKeydown,autofocus:i.autoFocusAccept,class:l.normalizeClass([e.cx("acceptButton"),i.confirmation.acceptClass]),unstyled:e.unstyled,pt:e.ptm("acceptButton"),"data-pc-name":"acceptbutton"},l.createSlots({_:2},[r.acceptIcon||e.$slots.accepticon?{name:"icon",fn:l.withCtx((function(t){return[l.renderSlot(e.$slots,"accepticon",{},(function(){return[l.createElementVNode("span",l.mergeProps({class:[r.acceptIcon,t.class]},e.ptm("acceptButton").icon,{"data-pc-name":"acceptbuttonicon"}),null,16)]}))]})),key:"0"}:void 0]),1032,["label","onKeydown","autofocus","class","unstyled","pt"])],16)],64))],16,k)),[[a]]):l.createCommentVNode("",!0)]})),_:3},16,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]})),_:3})},h}(primevue.button,primevue.confirmationeventbus,primevue.focustrap,primevue.overlayeventbus,primevue.portal,primevue.utils,primevue.basecomponent,primevue.confirmpopup.style,Vue);
|
|
@@ -16,18 +16,15 @@ var classes = {
|
|
|
16
16
|
}];
|
|
17
17
|
},
|
|
18
18
|
content: 'p-confirm-popup-content',
|
|
19
|
-
icon:
|
|
20
|
-
var instance = _ref2.instance;
|
|
21
|
-
return ['p-confirm-popup-icon', instance.confirmation ? instance.confirmation.icon : null];
|
|
22
|
-
},
|
|
19
|
+
icon: 'p-confirm-popup-icon',
|
|
23
20
|
message: 'p-confirm-popup-message',
|
|
24
21
|
footer: 'p-confirm-popup-footer',
|
|
25
|
-
rejectButton: function rejectButton(
|
|
26
|
-
var instance =
|
|
22
|
+
rejectButton: function rejectButton(_ref2) {
|
|
23
|
+
var instance = _ref2.instance;
|
|
27
24
|
return ['p-confirm-popup-reject', instance.confirmation && !instance.confirmation.rejectClass ? 'p-button-sm p-button-text' : null];
|
|
28
25
|
},
|
|
29
|
-
acceptButton: function acceptButton(
|
|
30
|
-
var instance =
|
|
26
|
+
acceptButton: function acceptButton(_ref3) {
|
|
27
|
+
var instance = _ref3.instance;
|
|
31
28
|
return ['p-confirm-popup-accept', instance.confirmation && !instance.confirmation.acceptClass ? 'p-button-sm' : null];
|
|
32
29
|
}
|
|
33
30
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function n(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var p=n(require("primevue/base/style")).default.extend({name:"confirmpopup",css:"\n@layer primevue {\n .p-confirm-popup {\n position: absolute;\n margin-top: 10px;\n top: 0;\n left: 0;\n }\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 transform: scaleY(0.8);\n }\n\n .p-confirm-popup-leave-to {\n opacity: 0;\n }\n\n .p-confirm-popup-enter-active {\n transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1), opacity 0.12s cubic-bezier(0, 0, 0.2, 1);\n }\n\n .p-confirm-popup-leave-active {\n transition: opacity 0.1s linear;\n }\n\n .p-confirm-popup:after,\n .p-confirm-popup:before {\n bottom: 100%;\n left: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n content: ' ';\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n }\n\n .p-confirm-popup:after {\n border-width: 8px;\n margin-left: -8px;\n }\n\n .p-confirm-popup:before {\n border-width: 10px;\n margin-left: -10px;\n }\n\n .p-confirm-popup-flipped:after,\n .p-confirm-popup-flipped:before {\n bottom: auto;\n top: 100%;\n }\n\n .p-confirm-popup.p-confirm-popup-flipped:after {\n border-bottom-color: transparent;\n }\n\n .p-confirm-popup.p-confirm-popup-flipped:before {\n border-bottom-color: transparent;\n }\n\n .p-confirm-popup .p-confirm-popup-content {\n display: flex;\n align-items: center;\n }\n}\n",classes:{root:function(n){var p=n.instance;return["p-confirm-popup p-component",{"p-input-filled":"filled"===p.$primevue.config.inputStyle,"p-ripple-disabled":!1===p.$primevue.config.ripple}]},content:"p-confirm-popup-content",icon:
|
|
1
|
+
"use strict";function n(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var p=n(require("primevue/base/style")).default.extend({name:"confirmpopup",css:"\n@layer primevue {\n .p-confirm-popup {\n position: absolute;\n margin-top: 10px;\n top: 0;\n left: 0;\n }\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 transform: scaleY(0.8);\n }\n\n .p-confirm-popup-leave-to {\n opacity: 0;\n }\n\n .p-confirm-popup-enter-active {\n transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1), opacity 0.12s cubic-bezier(0, 0, 0.2, 1);\n }\n\n .p-confirm-popup-leave-active {\n transition: opacity 0.1s linear;\n }\n\n .p-confirm-popup:after,\n .p-confirm-popup:before {\n bottom: 100%;\n left: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n content: ' ';\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n }\n\n .p-confirm-popup:after {\n border-width: 8px;\n margin-left: -8px;\n }\n\n .p-confirm-popup:before {\n border-width: 10px;\n margin-left: -10px;\n }\n\n .p-confirm-popup-flipped:after,\n .p-confirm-popup-flipped:before {\n bottom: auto;\n top: 100%;\n }\n\n .p-confirm-popup.p-confirm-popup-flipped:after {\n border-bottom-color: transparent;\n }\n\n .p-confirm-popup.p-confirm-popup-flipped:before {\n border-bottom-color: transparent;\n }\n\n .p-confirm-popup .p-confirm-popup-content {\n display: flex;\n align-items: center;\n }\n}\n",classes:{root:function(n){var p=n.instance;return["p-confirm-popup p-component",{"p-input-filled":"filled"===p.$primevue.config.inputStyle,"p-ripple-disabled":!1===p.$primevue.config.ripple}]},content:"p-confirm-popup-content",icon:"p-confirm-popup-icon",message:"p-confirm-popup-message",footer:"p-confirm-popup-footer",rejectButton:function(n){var p=n.instance;return["p-confirm-popup-reject",p.confirmation&&!p.confirmation.rejectClass?"p-button-sm p-button-text":null]},acceptButton:function(n){var p=n.instance;return["p-confirm-popup-accept",p.confirmation&&!p.confirmation.acceptClass?"p-button-sm":null]}}});module.exports=p;
|
|
@@ -10,18 +10,15 @@ var classes = {
|
|
|
10
10
|
}];
|
|
11
11
|
},
|
|
12
12
|
content: 'p-confirm-popup-content',
|
|
13
|
-
icon:
|
|
14
|
-
var instance = _ref2.instance;
|
|
15
|
-
return ['p-confirm-popup-icon', instance.confirmation ? instance.confirmation.icon : null];
|
|
16
|
-
},
|
|
13
|
+
icon: 'p-confirm-popup-icon',
|
|
17
14
|
message: 'p-confirm-popup-message',
|
|
18
15
|
footer: 'p-confirm-popup-footer',
|
|
19
|
-
rejectButton: function rejectButton(
|
|
20
|
-
var instance =
|
|
16
|
+
rejectButton: function rejectButton(_ref2) {
|
|
17
|
+
var instance = _ref2.instance;
|
|
21
18
|
return ['p-confirm-popup-reject', instance.confirmation && !instance.confirmation.rejectClass ? 'p-button-sm p-button-text' : null];
|
|
22
19
|
},
|
|
23
|
-
acceptButton: function acceptButton(
|
|
24
|
-
var instance =
|
|
20
|
+
acceptButton: function acceptButton(_ref3) {
|
|
21
|
+
var instance = _ref3.instance;
|
|
25
22
|
return ['p-confirm-popup-accept', instance.confirmation && !instance.confirmation.acceptClass ? 'p-button-sm' : null];
|
|
26
23
|
}
|
|
27
24
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import n from"primevue/base/style";var p=n.extend({name:"confirmpopup",css:"\n@layer primevue {\n .p-confirm-popup {\n position: absolute;\n margin-top: 10px;\n top: 0;\n left: 0;\n }\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 transform: scaleY(0.8);\n }\n\n .p-confirm-popup-leave-to {\n opacity: 0;\n }\n\n .p-confirm-popup-enter-active {\n transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1), opacity 0.12s cubic-bezier(0, 0, 0.2, 1);\n }\n\n .p-confirm-popup-leave-active {\n transition: opacity 0.1s linear;\n }\n\n .p-confirm-popup:after,\n .p-confirm-popup:before {\n bottom: 100%;\n left: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n content: ' ';\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n }\n\n .p-confirm-popup:after {\n border-width: 8px;\n margin-left: -8px;\n }\n\n .p-confirm-popup:before {\n border-width: 10px;\n margin-left: -10px;\n }\n\n .p-confirm-popup-flipped:after,\n .p-confirm-popup-flipped:before {\n bottom: auto;\n top: 100%;\n }\n\n .p-confirm-popup.p-confirm-popup-flipped:after {\n border-bottom-color: transparent;\n }\n\n .p-confirm-popup.p-confirm-popup-flipped:before {\n border-bottom-color: transparent;\n }\n\n .p-confirm-popup .p-confirm-popup-content {\n display: flex;\n align-items: center;\n }\n}\n",classes:{root:function(n){var p=n.instance;return["p-confirm-popup p-component",{"p-input-filled":"filled"===p.$primevue.config.inputStyle,"p-ripple-disabled":!1===p.$primevue.config.ripple}]},content:"p-confirm-popup-content",icon:
|
|
1
|
+
import n from"primevue/base/style";var p=n.extend({name:"confirmpopup",css:"\n@layer primevue {\n .p-confirm-popup {\n position: absolute;\n margin-top: 10px;\n top: 0;\n left: 0;\n }\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 transform: scaleY(0.8);\n }\n\n .p-confirm-popup-leave-to {\n opacity: 0;\n }\n\n .p-confirm-popup-enter-active {\n transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1), opacity 0.12s cubic-bezier(0, 0, 0.2, 1);\n }\n\n .p-confirm-popup-leave-active {\n transition: opacity 0.1s linear;\n }\n\n .p-confirm-popup:after,\n .p-confirm-popup:before {\n bottom: 100%;\n left: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n content: ' ';\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n }\n\n .p-confirm-popup:after {\n border-width: 8px;\n margin-left: -8px;\n }\n\n .p-confirm-popup:before {\n border-width: 10px;\n margin-left: -10px;\n }\n\n .p-confirm-popup-flipped:after,\n .p-confirm-popup-flipped:before {\n bottom: auto;\n top: 100%;\n }\n\n .p-confirm-popup.p-confirm-popup-flipped:after {\n border-bottom-color: transparent;\n }\n\n .p-confirm-popup.p-confirm-popup-flipped:before {\n border-bottom-color: transparent;\n }\n\n .p-confirm-popup .p-confirm-popup-content {\n display: flex;\n align-items: center;\n }\n}\n",classes:{root:function(n){var p=n.instance;return["p-confirm-popup p-component",{"p-input-filled":"filled"===p.$primevue.config.inputStyle,"p-ripple-disabled":!1===p.$primevue.config.ripple}]},content:"p-confirm-popup-content",icon:"p-confirm-popup-icon",message:"p-confirm-popup-message",footer:"p-confirm-popup-footer",rejectButton:function(n){var p=n.instance;return["p-confirm-popup-reject",p.confirmation&&!p.confirmation.rejectClass?"p-button-sm p-button-text":null]},acceptButton:function(n){var p=n.instance;return["p-confirm-popup-accept",p.confirmation&&!p.confirmation.acceptClass?"p-button-sm":null]}}});export{p as default};
|
|
@@ -17,18 +17,15 @@ this.primevue.confirmpopup.style = (function (BaseStyle) {
|
|
|
17
17
|
}];
|
|
18
18
|
},
|
|
19
19
|
content: 'p-confirm-popup-content',
|
|
20
|
-
icon:
|
|
21
|
-
var instance = _ref2.instance;
|
|
22
|
-
return ['p-confirm-popup-icon', instance.confirmation ? instance.confirmation.icon : null];
|
|
23
|
-
},
|
|
20
|
+
icon: 'p-confirm-popup-icon',
|
|
24
21
|
message: 'p-confirm-popup-message',
|
|
25
22
|
footer: 'p-confirm-popup-footer',
|
|
26
|
-
rejectButton: function rejectButton(
|
|
27
|
-
var instance =
|
|
23
|
+
rejectButton: function rejectButton(_ref2) {
|
|
24
|
+
var instance = _ref2.instance;
|
|
28
25
|
return ['p-confirm-popup-reject', instance.confirmation && !instance.confirmation.rejectClass ? 'p-button-sm p-button-text' : null];
|
|
29
26
|
},
|
|
30
|
-
acceptButton: function acceptButton(
|
|
31
|
-
var instance =
|
|
27
|
+
acceptButton: function acceptButton(_ref3) {
|
|
28
|
+
var instance = _ref3.instance;
|
|
32
29
|
return ['p-confirm-popup-accept', instance.confirmation && !instance.confirmation.acceptClass ? 'p-button-sm' : null];
|
|
33
30
|
}
|
|
34
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.confirmpopup=this.primevue.confirmpopup||{},this.primevue.confirmpopup.style=function(n){"use strict";function p(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}return p(primevue.base.style).default.extend({name:"confirmpopup",css:"\n@layer primevue {\n .p-confirm-popup {\n position: absolute;\n margin-top: 10px;\n top: 0;\n left: 0;\n }\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 transform: scaleY(0.8);\n }\n\n .p-confirm-popup-leave-to {\n opacity: 0;\n }\n\n .p-confirm-popup-enter-active {\n transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1), opacity 0.12s cubic-bezier(0, 0, 0.2, 1);\n }\n\n .p-confirm-popup-leave-active {\n transition: opacity 0.1s linear;\n }\n\n .p-confirm-popup:after,\n .p-confirm-popup:before {\n bottom: 100%;\n left: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n content: ' ';\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n }\n\n .p-confirm-popup:after {\n border-width: 8px;\n margin-left: -8px;\n }\n\n .p-confirm-popup:before {\n border-width: 10px;\n margin-left: -10px;\n }\n\n .p-confirm-popup-flipped:after,\n .p-confirm-popup-flipped:before {\n bottom: auto;\n top: 100%;\n }\n\n .p-confirm-popup.p-confirm-popup-flipped:after {\n border-bottom-color: transparent;\n }\n\n .p-confirm-popup.p-confirm-popup-flipped:before {\n border-bottom-color: transparent;\n }\n\n .p-confirm-popup .p-confirm-popup-content {\n display: flex;\n align-items: center;\n }\n}\n",classes:{root:function(n){var p=n.instance;return["p-confirm-popup p-component",{"p-input-filled":"filled"===p.$primevue.config.inputStyle,"p-ripple-disabled":!1===p.$primevue.config.ripple}]},content:"p-confirm-popup-content",icon:
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.confirmpopup=this.primevue.confirmpopup||{},this.primevue.confirmpopup.style=function(n){"use strict";function p(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}return p(primevue.base.style).default.extend({name:"confirmpopup",css:"\n@layer primevue {\n .p-confirm-popup {\n position: absolute;\n margin-top: 10px;\n top: 0;\n left: 0;\n }\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 transform: scaleY(0.8);\n }\n\n .p-confirm-popup-leave-to {\n opacity: 0;\n }\n\n .p-confirm-popup-enter-active {\n transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1), opacity 0.12s cubic-bezier(0, 0, 0.2, 1);\n }\n\n .p-confirm-popup-leave-active {\n transition: opacity 0.1s linear;\n }\n\n .p-confirm-popup:after,\n .p-confirm-popup:before {\n bottom: 100%;\n left: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n content: ' ';\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n }\n\n .p-confirm-popup:after {\n border-width: 8px;\n margin-left: -8px;\n }\n\n .p-confirm-popup:before {\n border-width: 10px;\n margin-left: -10px;\n }\n\n .p-confirm-popup-flipped:after,\n .p-confirm-popup-flipped:before {\n bottom: auto;\n top: 100%;\n }\n\n .p-confirm-popup.p-confirm-popup-flipped:after {\n border-bottom-color: transparent;\n }\n\n .p-confirm-popup.p-confirm-popup-flipped:before {\n border-bottom-color: transparent;\n }\n\n .p-confirm-popup .p-confirm-popup-content {\n display: flex;\n align-items: center;\n }\n}\n",classes:{root:function(n){var p=n.instance;return["p-confirm-popup p-component",{"p-input-filled":"filled"===p.$primevue.config.inputStyle,"p-ripple-disabled":!1===p.$primevue.config.ripple}]},content:"p-confirm-popup-content",icon:"p-confirm-popup-icon",message:"p-confirm-popup-message",footer:"p-confirm-popup-footer",rejectButton:function(n){var p=n.instance;return["p-confirm-popup-reject",p.confirmation&&!p.confirmation.rejectClass?"p-button-sm p-button-text":null]},acceptButton:function(n){var p=n.instance;return["p-confirm-popup-accept",p.confirmation&&!p.confirmation.acceptClass?"p-button-sm":null]}}})}();
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<a v-ripple :href="getItemProp(processedItem, 'url')" :class="cx('action')" :target="getItemProp(processedItem, 'target')" tabindex="-1" aria-hidden="true" v-bind="getPTOptions('action', processedItem, index)">
|
|
26
26
|
<component v-if="templates.itemicon" :is="templates.itemicon" :item="processedItem.item" :class="[cx('icon'), getItemProp(processedItem, 'icon')]" />
|
|
27
27
|
<span v-else-if="getItemProp(processedItem, 'icon')" :class="[cx('icon'), getItemProp(processedItem, 'icon')]" v-bind="getPTOptions('icon', processedItem, index)" />
|
|
28
|
-
<span :class="cx('label')" v-bind="getPTOptions('label', processedItem, index)">{{ getItemLabel(processedItem) }}</span>
|
|
28
|
+
<span :id="getItemLabelId(processedItem)" :class="cx('label')" v-bind="getPTOptions('label', processedItem, index)">{{ getItemLabel(processedItem) }}</span>
|
|
29
29
|
<template v-if="getItemProp(processedItem, 'items')">
|
|
30
30
|
<component v-if="templates.submenuicon" :is="templates.submenuicon" :active="isItemActive(processedItem)" :class="cx('submenuIcon')" />
|
|
31
31
|
<AngleRightIcon v-else :class="cx('submenuIcon')" v-bind="getPTOptions('submenuicon', processedItem, index)" />
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
:unstyled="unstyled"
|
|
51
51
|
@item-click="$emit('item-click', $event)"
|
|
52
52
|
@item-mouseenter="$emit('item-mouseenter', $event)"
|
|
53
|
+
:aria-labelledby="getItemLabelId(processedItem)"
|
|
53
54
|
v-bind="ptm('submenu')"
|
|
54
55
|
/>
|
|
55
56
|
</li>
|
|
@@ -129,6 +130,9 @@ export default {
|
|
|
129
130
|
getItemLabel(processedItem) {
|
|
130
131
|
return this.getItemProp(processedItem, 'label');
|
|
131
132
|
},
|
|
133
|
+
getItemLabelId(processedItem) {
|
|
134
|
+
return `${this.menuId}_${processedItem.key}_label`;
|
|
135
|
+
},
|
|
132
136
|
getPTOptions(key, processedItem, index) {
|
|
133
137
|
return this.ptm(key, {
|
|
134
138
|
context: {
|
|
@@ -202,6 +206,7 @@ export default {
|
|
|
202
206
|
};
|
|
203
207
|
}
|
|
204
208
|
},
|
|
209
|
+
|
|
205
210
|
components: {
|
|
206
211
|
AngleRightIcon: AngleRightIcon
|
|
207
212
|
},
|
|
@@ -25,7 +25,7 @@ var script$2 = {
|
|
|
25
25
|
"default": null
|
|
26
26
|
},
|
|
27
27
|
appendTo: {
|
|
28
|
-
type: String,
|
|
28
|
+
type: [String, Object],
|
|
29
29
|
"default": 'body'
|
|
30
30
|
},
|
|
31
31
|
autoZIndex: {
|
|
@@ -117,6 +117,9 @@ var script$1 = {
|
|
|
117
117
|
getItemLabel: function getItemLabel(processedItem) {
|
|
118
118
|
return this.getItemProp(processedItem, 'label');
|
|
119
119
|
},
|
|
120
|
+
getItemLabelId: function getItemLabelId(processedItem) {
|
|
121
|
+
return "".concat(this.menuId, "_").concat(processedItem.key, "_label");
|
|
122
|
+
},
|
|
120
123
|
getPTOptions: function getPTOptions(key, processedItem, index) {
|
|
121
124
|
return this.ptm(key, {
|
|
122
125
|
context: {
|
|
@@ -209,6 +212,7 @@ var _hoisted_2 = ["id", "aria-label", "aria-disabled", "aria-expanded", "aria-ha
|
|
|
209
212
|
var _hoisted_3 = ["onClick", "onMouseenter"];
|
|
210
213
|
var _hoisted_4 = ["href", "target"];
|
|
211
214
|
var _hoisted_5 = ["id"];
|
|
215
|
+
var _hoisted_6 = ["id"];
|
|
212
216
|
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
213
217
|
var _component_AngleRightIcon = vue.resolveComponent("AngleRightIcon");
|
|
214
218
|
var _component_ContextMenuSub = vue.resolveComponent("ContextMenuSub", true);
|
|
@@ -267,8 +271,9 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
267
271
|
key: 1,
|
|
268
272
|
"class": [_ctx.cx('icon'), $options.getItemProp(processedItem, 'icon')]
|
|
269
273
|
}, $options.getPTOptions('icon', processedItem, index)), null, 16)) : vue.createCommentVNode("", true), vue.createElementVNode("span", vue.mergeProps({
|
|
274
|
+
id: $options.getItemLabelId(processedItem),
|
|
270
275
|
"class": _ctx.cx('label')
|
|
271
|
-
}, $options.getPTOptions('label', processedItem, index)), vue.toDisplayString($options.getItemLabel(processedItem)), 17), $options.getItemProp(processedItem, 'items') ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
276
|
+
}, $options.getPTOptions('label', processedItem, index)), vue.toDisplayString($options.getItemLabel(processedItem)), 17, _hoisted_5), $options.getItemProp(processedItem, 'items') ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
272
277
|
key: 2
|
|
273
278
|
}, [$props.templates.submenuicon ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.templates.submenuicon), {
|
|
274
279
|
key: 0,
|
|
@@ -302,14 +307,15 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
302
307
|
}),
|
|
303
308
|
onItemMouseenter: _cache[1] || (_cache[1] = function ($event) {
|
|
304
309
|
return _ctx.$emit('item-mouseenter', $event);
|
|
305
|
-
})
|
|
306
|
-
|
|
310
|
+
}),
|
|
311
|
+
"aria-labelledby": $options.getItemLabelId(processedItem)
|
|
312
|
+
}, _ctx.ptm('submenu')), null, 16, ["id", "class", "menuId", "focusedItemId", "items", "templates", "activeItemPath", "level", "visible", "pt", "unstyled", "aria-labelledby"])) : vue.createCommentVNode("", true)], 16, _hoisted_2)) : vue.createCommentVNode("", true), $options.isItemVisible(processedItem) && $options.getItemProp(processedItem, 'separator') ? (vue.openBlock(), vue.createElementBlock("li", vue.mergeProps({
|
|
307
313
|
key: 1,
|
|
308
314
|
id: $options.getItemId(processedItem),
|
|
309
315
|
style: $options.getItemProp(processedItem, 'style'),
|
|
310
316
|
"class": [_ctx.cx('separator'), $options.getItemProp(processedItem, 'class')],
|
|
311
317
|
role: "separator"
|
|
312
|
-
}, _ctx.ptm('separator')), null, 16,
|
|
318
|
+
}, _ctx.ptm('separator')), null, 16, _hoisted_6)) : vue.createCommentVNode("", true)], 64);
|
|
313
319
|
}), 128))], 16, _hoisted_1)) : vue.createCommentVNode("", true)];
|
|
314
320
|
}),
|
|
315
321
|
_: 1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/portal"),t=require("primevue/utils"),i=require("primevue/basecomponent"),n=require("primevue/contextmenu/style"),s=require("primevue/icons/angleright"),o=require("primevue/ripple"),r=require("vue");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=c(e),u=c(i),l={name:"BaseContextMenu",extends:u.default,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},tabindex:{type:Number,default:0},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:c(n).default,provide:function(){return{$parentInstance:this}}},m={name:"ContextMenuSub",hostName:"ContextMenu",extends:u.default,emits:["item-click","item-mouseenter"],props:{items:{type:Array,default:null},menuId:{type:String,default:null},focusedItemId:{type:String,default:null},root:{type:Boolean,default:!1},visible:{type:Boolean,default:!1},level:{type:Number,default:0},templates:{type:Object,default:null},activeItemPath:{type:Object,default:null},tabindex:{type:Number,default:0}},methods:{getItemId:function(e){return"".concat(this.menuId,"_").concat(e.key)},getItemKey:function(e){return this.getItemId(e)},getItemProp:function(e,i,n){return e&&e.item?t.ObjectUtils.getItemValue(e.item[i],n):void 0},getItemLabel:function(e){return this.getItemProp(e,"label")},getPTOptions:function(e,t,i){return this.ptm(e,{context:{item:t,active:this.isItemActive(t),focused:this.isItemFocused(t),disabled:this.isItemDisabled(t),index:i}})},isItemActive:function(e){return this.activeItemPath.some((function(t){return t.key===e.key}))},isItemVisible:function(e){return!1!==this.getItemProp(e,"visible")},isItemDisabled:function(e){return this.getItemProp(e,"disabled")},isItemFocused:function(e){return this.focusedItemId===this.getItemId(e)},isItemGroup:function(e){return t.ObjectUtils.isNotEmpty(e.items)},onItemClick:function(e,t){this.getItemProp(t,"command",{originalEvent:e,item:t.item}),this.$emit("item-click",{originalEvent:e,processedItem:t,isFocus:!0})},onItemMouseEnter:function(e,t){this.$emit("item-mouseenter",{originalEvent:e,processedItem:t})},getAriaSetSize:function(){var e=this;return this.items.filter((function(t){return e.isItemVisible(t)&&!e.getItemProp(t,"separator")})).length},getAriaPosInset:function(e){var t=this;return e-this.items.slice(0,e).filter((function(e){return t.isItemVisible(e)&&t.getItemProp(e,"separator")})).length+1},onEnter:function(){t.DomHandler.nestedPosition(this.$refs.container,this.level)},getMenuItemProps:function(e,t){return{action:r.mergeProps({class:this.cx("action"),tabindex:-1,"aria-hidden":!0},this.getPTOptions("action",e,t)),icon:r.mergeProps({class:[this.cx("icon"),this.getItemProp(e,"icon")]},this.getPTOptions("icon",e,t)),label:r.mergeProps({class:this.cx("label")},this.getPTOptions("label",e,t)),submenuicon:r.mergeProps({class:this.cx("submenuIcon")},this.getPTOptions("submenuicon",e,t))}}},components:{AngleRightIcon:c(s).default},directives:{ripple:c(o).default}},d=["tabindex"],h=["id","aria-label","aria-disabled","aria-expanded","aria-haspopup","aria-level","aria-setsize","aria-posinset","data-p-highlight","data-p-focused","data-p-disabled"],f=["onClick","onMouseenter"],I=["href","target"],p=["id"];m.render=function(e,t,i,n,s,o){var c=r.resolveComponent("AngleRightIcon"),a=r.resolveComponent("ContextMenuSub",!0),u=r.resolveDirective("ripple");return r.openBlock(),r.createBlock(r.Transition,r.mergeProps({name:"p-contextmenusub",onEnter:o.onEnter},e.ptm("menu.transition")),{default:r.withCtx((function(){return[i.root||i.visible?(r.openBlock(),r.createElementBlock("ul",r.mergeProps({key:0,ref:"container",tabindex:i.tabindex},e.ptm("menu")),[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.items,(function(n,s){return r.openBlock(),r.createElementBlock(r.Fragment,{key:o.getItemKey(n)},[o.isItemVisible(n)&&!o.getItemProp(n,"separator")?(r.openBlock(),r.createElementBlock("li",r.mergeProps({key:0,id:o.getItemId(n),style:o.getItemProp(n,"style"),class:[e.cx("menuitem",{processedItem:n}),o.getItemProp(n,"class")],role:"menuitem","aria-label":o.getItemLabel(n),"aria-disabled":o.isItemDisabled(n)||void 0,"aria-expanded":o.isItemGroup(n)?o.isItemActive(n):void 0,"aria-haspopup":o.isItemGroup(n)&&!o.getItemProp(n,"to")?"menu":void 0,"aria-level":i.level+1,"aria-setsize":o.getAriaSetSize(),"aria-posinset":o.getAriaPosInset(s)},o.getPTOptions("menuitem",n,s),{"data-p-highlight":o.isItemActive(n),"data-p-focused":o.isItemFocused(n),"data-p-disabled":o.isItemDisabled(n)}),[r.createElementVNode("div",r.mergeProps({class:e.cx("content"),onClick:function(e){return o.onItemClick(e,n)},onMouseenter:function(e){return o.onItemMouseEnter(e,n)}},o.getPTOptions("content",n,s)),[i.templates.item?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(i.templates.item),{key:1,item:n.item,hasSubmenu:o.getItemProp(n,"items"),label:o.getItemLabel(n),props:o.getMenuItemProps(n,s)},null,8,["item","hasSubmenu","label","props"])):r.withDirectives((r.openBlock(),r.createElementBlock("a",r.mergeProps({key:0,href:o.getItemProp(n,"url"),class:e.cx("action"),target:o.getItemProp(n,"target"),tabindex:"-1","aria-hidden":"true"},o.getPTOptions("action",n,s)),[i.templates.itemicon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(i.templates.itemicon),{key:0,item:n.item,class:r.normalizeClass([e.cx("icon"),o.getItemProp(n,"icon")])},null,8,["item","class"])):o.getItemProp(n,"icon")?(r.openBlock(),r.createElementBlock("span",r.mergeProps({key:1,class:[e.cx("icon"),o.getItemProp(n,"icon")]},o.getPTOptions("icon",n,s)),null,16)):r.createCommentVNode("",!0),r.createElementVNode("span",r.mergeProps({class:e.cx("label")},o.getPTOptions("label",n,s)),r.toDisplayString(o.getItemLabel(n)),17),o.getItemProp(n,"items")?(r.openBlock(),r.createElementBlock(r.Fragment,{key:2},[i.templates.submenuicon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(i.templates.submenuicon),{key:0,active:o.isItemActive(n),class:r.normalizeClass(e.cx("submenuIcon"))},null,8,["active","class"])):(r.openBlock(),r.createBlock(c,r.mergeProps({key:1,class:e.cx("submenuIcon")},o.getPTOptions("submenuicon",n,s)),null,16,["class"]))],64)):r.createCommentVNode("",!0)],16,I)),[[u]])],16,f),o.isItemVisible(n)&&o.isItemGroup(n)?(r.openBlock(),r.createBlock(a,r.mergeProps({key:0,id:o.getItemId(n)+"_list",role:"menu",class:e.cx("submenu"),menuId:i.menuId,focusedItemId:i.focusedItemId,items:n.items,templates:i.templates,activeItemPath:i.activeItemPath,level:i.level+1,visible:o.isItemActive(n)&&o.isItemGroup(n),pt:e.pt,unstyled:e.unstyled,onItemClick:t[0]||(t[0]=function(t){return e.$emit("item-click",t)}),onItemMouseenter:t[1]||(t[1]=function(t){return e.$emit("item-mouseenter",t)})},e.ptm("submenu")),null,16,["id","class","menuId","focusedItemId","items","templates","activeItemPath","level","visible","pt","unstyled"])):r.createCommentVNode("",!0)],16,h)):r.createCommentVNode("",!0),o.isItemVisible(n)&&o.getItemProp(n,"separator")?(r.openBlock(),r.createElementBlock("li",r.mergeProps({key:1,id:o.getItemId(n),style:o.getItemProp(n,"style"),class:[e.cx("separator"),o.getItemProp(n,"class")],role:"separator"},e.ptm("separator")),null,16,p)):r.createCommentVNode("",!0)],64)})),128))],16,d)):r.createCommentVNode("",!0)]})),_:1},16,["onEnter"])};var b={name:"ContextMenu",extends:l,inheritAttrs:!1,emits:["focus","blur","show","hide"],target:null,outsideClickListener:null,resizeListener:null,documentContextMenuListener:null,pageX:null,pageY:null,container:null,list:null,data:function(){return{id:this.$attrs.id,focused:!1,focusedItemInfo:{index:-1,level:0,parentKey:""},activeItemPath:[],visible:!1,submenuVisible:!1}},watch:{"$attrs.id":function(e){this.id=e||t.UniqueComponentId()},activeItemPath:function(e){t.ObjectUtils.isNotEmpty(e)?(this.bindOutsideClickListener(),this.bindResizeListener()):this.visible||(this.unbindOutsideClickListener(),this.unbindResizeListener())}},mounted:function(){this.id=this.id||t.UniqueComponentId(),this.global&&this.bindDocumentContextMenuListener()},beforeUnmount:function(){this.unbindResizeListener(),this.unbindOutsideClickListener(),this.unbindDocumentContextMenuListener(),this.container&&this.autoZIndex&&t.ZIndexUtils.clear(this.container),this.target=null,this.container=null},methods:{getItemProp:function(e,i){return e?t.ObjectUtils.getItemValue(e[i]):void 0},getItemLabel:function(e){return this.getItemProp(e,"label")},isItemDisabled:function(e){return this.getItemProp(e,"disabled")},isItemGroup:function(e){return t.ObjectUtils.isNotEmpty(this.getItemProp(e,"items"))},isItemSeparator:function(e){return this.getItemProp(e,"separator")},getProccessedItemLabel:function(e){return e?this.getItemLabel(e.item):void 0},isProccessedItemGroup:function(e){return e&&t.ObjectUtils.isNotEmpty(e.items)},toggle:function(e){this.visible?this.hide():this.show(e)},show:function(e){this.activeItemPath=[],this.focusedItemInfo={index:-1,level:0,parentKey:""},t.DomHandler.focus(this.list),this.pageX=e.pageX,this.pageY=e.pageY,this.visible?this.position():this.visible=!0,e.stopPropagation(),e.preventDefault()},hide:function(){this.visible=!1,this.activeItemPath=[],this.focusedItemInfo={index:-1,level:0,parentKey:""}},onFocus:function(e){this.focused=!0,this.focusedItemInfo=-1!==this.focusedItemInfo.index?this.focusedItemInfo:{index:-1,level:0,parentKey:""},this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedItemInfo={index:-1,level:0,parentKey:""},this.searchValue="",this.$emit("blur",e)},onKeyDown:function(e){var i=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Space":this.onSpaceKey(e);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"PageDown":case"PageUp":case"Backspace":case"ShiftLeft":case"ShiftRight":break;default:!i&&t.ObjectUtils.isPrintableCharacter(e.key)&&this.searchItems(e,e.key)}},onItemChange:function(e){var i=e.processedItem,n=e.isFocus;if(!t.ObjectUtils.isEmpty(i)){var s=i.index,o=i.key,r=i.level,c=i.parentKey,a=t.ObjectUtils.isNotEmpty(i.items),u=this.activeItemPath.filter((function(e){return e.parentKey!==c&&e.parentKey!==o}));a&&(u.push(i),this.submenuVisible=!0),this.focusedItemInfo={index:s,level:r,parentKey:c},this.activeItemPath=u,n&&t.DomHandler.focus(this.list)}},onItemClick:function(e){var i=e.processedItem,n=this.isProccessedItemGroup(i);if(this.isSelected(i)){var s=i.index,o=i.key,r=i.level,c=i.parentKey;this.activeItemPath=this.activeItemPath.filter((function(e){return o!==e.key&&o.startsWith(e.key)})),this.focusedItemInfo={index:s,level:r,parentKey:c},t.DomHandler.focus(this.list)}else n?this.onItemChange(e):this.hide()},onItemMouseEnter:function(e){this.onItemChange(e)},onArrowDownKey:function(e){var t=-1!==this.focusedItemInfo.index?this.findNextItemIndex(this.focusedItemInfo.index):this.findFirstFocusedItemIndex();this.changeFocusedItemIndex(e,t),e.preventDefault()},onArrowUpKey:function(e){if(e.altKey){if(-1!==this.focusedItemInfo.index){var t=this.visibleItems[this.focusedItemInfo.index];!this.isProccessedItemGroup(t)&&this.onItemChange({originalEvent:e,processedItem:t})}this.popup&&this.hide(),e.preventDefault()}else{var i=-1!==this.focusedItemInfo.index?this.findPrevItemIndex(this.focusedItemInfo.index):this.findLastFocusedItemIndex();this.changeFocusedItemIndex(e,i),e.preventDefault()}},onArrowLeftKey:function(e){var i=this,n=this.visibleItems[this.focusedItemInfo.index],s=this.activeItemPath.find((function(e){return e.key===n.parentKey}));t.ObjectUtils.isEmpty(n.parent)||(this.focusedItemInfo={index:-1,parentKey:s?s.parentKey:""},this.searchValue="",this.onArrowDownKey(e)),this.activeItemPath=this.activeItemPath.filter((function(e){return e.parentKey!==i.focusedItemInfo.parentKey})),e.preventDefault()},onArrowRightKey:function(e){var t=this.visibleItems[this.focusedItemInfo.index];this.isProccessedItemGroup(t)&&(this.onItemChange({originalEvent:e,processedItem:t}),this.focusedItemInfo={index:-1,parentKey:t.key},this.searchValue="",this.onArrowDownKey(e)),e.preventDefault()},onHomeKey:function(e){this.changeFocusedItemIndex(e,this.findFirstItemIndex()),e.preventDefault()},onEndKey:function(e){this.changeFocusedItemIndex(e,this.findLastItemIndex()),e.preventDefault()},onEnterKey:function(e){if(-1!==this.focusedItemInfo.index){var i=t.DomHandler.findSingle(this.list,'li[id="'.concat("".concat(this.focusedItemId),'"]')),n=i&&t.DomHandler.findSingle(i,'a[data-pc-section="action"]');n?n.click():i&&i.click(),!this.isProccessedItemGroup(this.visibleItems[this.focusedItemInfo.index])&&(this.focusedItemInfo.index=this.findFirstFocusedItemIndex())}e.preventDefault()},onSpaceKey:function(e){this.onEnterKey(e)},onEscapeKey:function(e){this.hide(),!this.popup&&(this.focusedItemInfo.index=this.findFirstFocusedItemIndex()),e.preventDefault()},onTabKey:function(e){if(-1!==this.focusedItemInfo.index){var t=this.visibleItems[this.focusedItemInfo.index];!this.isProccessedItemGroup(t)&&this.onItemChange({originalEvent:e,processedItem:t})}this.hide()},onEnter:function(e){t.DomHandler.addStyles(e,{position:"absolute"}),this.position(),this.autoZIndex&&t.ZIndexUtils.set("menu",e,this.baseZIndex+this.$primevue.config.zIndex.menu)},onAfterEnter:function(){this.bindOutsideClickListener(),this.bindResizeListener(),this.$emit("show"),t.DomHandler.focus(this.list)},onLeave:function(){this.$emit("hide"),this.container=null},onAfterLeave:function(e){this.autoZIndex&&t.ZIndexUtils.clear(e),this.unbindOutsideClickListener(),this.unbindResizeListener()},position:function(){var e=this.pageX+1,i=this.pageY+1,n=this.container.offsetParent?this.container.offsetWidth:t.DomHandler.getHiddenElementOuterWidth(this.container),s=this.container.offsetParent?this.container.offsetHeight:t.DomHandler.getHiddenElementOuterHeight(this.container),o=t.DomHandler.getViewport();e+n-document.body.scrollLeft>o.width&&(e-=n),i+s-document.body.scrollTop>o.height&&(i-=s),e<document.body.scrollLeft&&(e=document.body.scrollLeft),i<document.body.scrollTop&&(i=document.body.scrollTop),this.container.style.left=e+"px",this.container.style.top=i+"px"},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){var i=e.container&&!e.container.contains(t.target),n=!e.visible||!(e.target&&(e.target===t.target||e.target.contains(t.target)));i&&n&&e.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.visible&&!t.DomHandler.isTouchDevice()&&e.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},bindDocumentContextMenuListener:function(){var e=this;this.documentContextMenuListener||(this.documentContextMenuListener=function(t){2===t.button&&e.show(t)},document.addEventListener("contextmenu",this.documentContextMenuListener))},unbindDocumentContextMenuListener:function(){this.documentContextMenuListener&&(document.removeEventListener("contextmenu",this.documentContextMenuListener),this.documentContextMenuListener=null)},isItemMatched:function(e){return this.isValidItem(e)&&this.getProccessedItemLabel(e).toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase())},isValidItem:function(e){return!!e&&!this.isItemDisabled(e.item)&&!this.isItemSeparator(e.item)},isValidSelectedItem:function(e){return this.isValidItem(e)&&this.isSelected(e)},isSelected:function(e){return this.activeItemPath.some((function(t){return t.key===e.key}))},findFirstItemIndex:function(){var e=this;return this.visibleItems.findIndex((function(t){return e.isValidItem(t)}))},findLastItemIndex:function(){var e=this;return t.ObjectUtils.findLastIndex(this.visibleItems,(function(t){return e.isValidItem(t)}))},findNextItemIndex:function(e){var t=this,i=e<this.visibleItems.length-1?this.visibleItems.slice(e+1).findIndex((function(e){return t.isValidItem(e)})):-1;return i>-1?i+e+1:e},findPrevItemIndex:function(e){var i=this,n=e>0?t.ObjectUtils.findLastIndex(this.visibleItems.slice(0,e),(function(e){return i.isValidItem(e)})):-1;return n>-1?n:e},findSelectedItemIndex:function(){var e=this;return this.visibleItems.findIndex((function(t){return e.isValidSelectedItem(t)}))},findFirstFocusedItemIndex:function(){var e=this.findSelectedItemIndex();return e<0?this.findFirstItemIndex():e},findLastFocusedItemIndex:function(){var e=this.findSelectedItemIndex();return e<0?this.findLastItemIndex():e},searchItems:function(e,t){var i=this;this.searchValue=(this.searchValue||"")+t;var n=-1,s=!1;return-1!==(n=-1!==this.focusedItemInfo.index?-1===(n=this.visibleItems.slice(this.focusedItemInfo.index).findIndex((function(e){return i.isItemMatched(e)})))?this.visibleItems.slice(0,this.focusedItemInfo.index).findIndex((function(e){return i.isItemMatched(e)})):n+this.focusedItemInfo.index:this.visibleItems.findIndex((function(e){return i.isItemMatched(e)})))&&(s=!0),-1===n&&-1===this.focusedItemInfo.index&&(n=this.findFirstFocusedItemIndex()),-1!==n&&this.changeFocusedItemIndex(e,n),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((function(){i.searchValue="",i.searchTimeout=null}),500),s},changeFocusedItemIndex:function(e,t){this.focusedItemInfo.index!==t&&(this.focusedItemInfo.index=t,this.scrollInView())},scrollInView:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,i=-1!==e?"".concat(this.id,"_").concat(e):this.focusedItemId,n=t.DomHandler.findSingle(this.list,'li[id="'.concat(i,'"]'));n&&n.scrollIntoView&&n.scrollIntoView({block:"nearest",inline:"start"})},createProcessedItems:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=[];return e&&e.forEach((function(e,r){var c=(""!==s?s+"_":"")+r,a={item:e,index:r,level:i,key:c,parent:n,parentKey:s};a.items=t.createProcessedItems(e.items,i+1,a,c),o.push(a)})),o},containerRef:function(e){this.container=e},listRef:function(e){this.list=e?e.$el:void 0}},computed:{processedItems:function(){return this.createProcessedItems(this.model||[])},visibleItems:function(){var e=this,t=this.activeItemPath.find((function(t){return t.key===e.focusedItemInfo.parentKey}));return t?t.items:this.processedItems},focusedItemId:function(){return-1!==this.focusedItemInfo.index?"".concat(this.id).concat(t.ObjectUtils.isNotEmpty(this.focusedItemInfo.parentKey)?"_"+this.focusedItemInfo.parentKey:"","_").concat(this.focusedItemInfo.index):null}},components:{ContextMenuSub:m,Portal:a.default}};function v(e){return v="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},v(e)}function g(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function y(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?g(Object(i),!0).forEach((function(t){x(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):g(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function x(e,t,i){var n;return(t="symbol"==v(n=P(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function P(e,t){if("object"!=v(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}b.render=function(e,t,i,n,s,o){var c=r.resolveComponent("ContextMenuSub"),a=r.resolveComponent("Portal");return r.openBlock(),r.createBlock(a,{appendTo:e.appendTo},{default:r.withCtx((function(){return[r.createVNode(r.Transition,r.mergeProps({name:"p-contextmenu",onEnter:o.onEnter,onAfterEnter:o.onAfterEnter,onLeave:o.onLeave,onAfterLeave:o.onAfterLeave},e.ptm("transition")),{default:r.withCtx((function(){return[s.visible?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,ref:o.containerRef,class:e.cx("root")},y(y({},e.$attrs),e.ptm("root")),{"data-pc-name":"contextmenu"}),[r.createVNode(c,{ref:o.listRef,id:s.id+"_list",class:r.normalizeClass(e.cx("menu")),role:"menubar",root:!0,tabindex:e.tabindex,"aria-orientation":"vertical","aria-activedescendant":s.focused?o.focusedItemId:void 0,menuId:s.id,focusedItemId:s.focused?o.focusedItemId:void 0,items:o.processedItems,templates:e.$slots,activeItemPath:s.activeItemPath,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,level:0,visible:s.submenuVisible,pt:e.pt,unstyled:e.unstyled,onFocus:o.onFocus,onBlur:o.onBlur,onKeydown:o.onKeyDown,onItemClick:o.onItemClick,onItemMouseenter:o.onItemMouseEnter},null,8,["id","class","tabindex","aria-activedescendant","menuId","focusedItemId","items","templates","activeItemPath","aria-labelledby","aria-label","visible","pt","unstyled","onFocus","onBlur","onKeydown","onItemClick","onItemMouseenter"])],16)):r.createCommentVNode("",!0)]})),_:1},16,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]})),_:1},8,["appendTo"])},module.exports=b;
|
|
1
|
+
"use strict";var e=require("primevue/portal"),t=require("primevue/utils"),i=require("primevue/basecomponent"),n=require("primevue/contextmenu/style"),s=require("primevue/icons/angleright"),o=require("primevue/ripple"),r=require("vue");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=a(e),u=a(i),l={name:"BaseContextMenu",extends:u.default,props:{model:{type:Array,default:null},appendTo:{type:[String,Object],default:"body"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},global:{type:Boolean,default:!1},tabindex:{type:Number,default:0},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:a(n).default,provide:function(){return{$parentInstance:this}}},m={name:"ContextMenuSub",hostName:"ContextMenu",extends:u.default,emits:["item-click","item-mouseenter"],props:{items:{type:Array,default:null},menuId:{type:String,default:null},focusedItemId:{type:String,default:null},root:{type:Boolean,default:!1},visible:{type:Boolean,default:!1},level:{type:Number,default:0},templates:{type:Object,default:null},activeItemPath:{type:Object,default:null},tabindex:{type:Number,default:0}},methods:{getItemId:function(e){return"".concat(this.menuId,"_").concat(e.key)},getItemKey:function(e){return this.getItemId(e)},getItemProp:function(e,i,n){return e&&e.item?t.ObjectUtils.getItemValue(e.item[i],n):void 0},getItemLabel:function(e){return this.getItemProp(e,"label")},getItemLabelId:function(e){return"".concat(this.menuId,"_").concat(e.key,"_label")},getPTOptions:function(e,t,i){return this.ptm(e,{context:{item:t,active:this.isItemActive(t),focused:this.isItemFocused(t),disabled:this.isItemDisabled(t),index:i}})},isItemActive:function(e){return this.activeItemPath.some((function(t){return t.key===e.key}))},isItemVisible:function(e){return!1!==this.getItemProp(e,"visible")},isItemDisabled:function(e){return this.getItemProp(e,"disabled")},isItemFocused:function(e){return this.focusedItemId===this.getItemId(e)},isItemGroup:function(e){return t.ObjectUtils.isNotEmpty(e.items)},onItemClick:function(e,t){this.getItemProp(t,"command",{originalEvent:e,item:t.item}),this.$emit("item-click",{originalEvent:e,processedItem:t,isFocus:!0})},onItemMouseEnter:function(e,t){this.$emit("item-mouseenter",{originalEvent:e,processedItem:t})},getAriaSetSize:function(){var e=this;return this.items.filter((function(t){return e.isItemVisible(t)&&!e.getItemProp(t,"separator")})).length},getAriaPosInset:function(e){var t=this;return e-this.items.slice(0,e).filter((function(e){return t.isItemVisible(e)&&t.getItemProp(e,"separator")})).length+1},onEnter:function(){t.DomHandler.nestedPosition(this.$refs.container,this.level)},getMenuItemProps:function(e,t){return{action:r.mergeProps({class:this.cx("action"),tabindex:-1,"aria-hidden":!0},this.getPTOptions("action",e,t)),icon:r.mergeProps({class:[this.cx("icon"),this.getItemProp(e,"icon")]},this.getPTOptions("icon",e,t)),label:r.mergeProps({class:this.cx("label")},this.getPTOptions("label",e,t)),submenuicon:r.mergeProps({class:this.cx("submenuIcon")},this.getPTOptions("submenuicon",e,t))}}},components:{AngleRightIcon:a(s).default},directives:{ripple:a(o).default}},d=["tabindex"],h=["id","aria-label","aria-disabled","aria-expanded","aria-haspopup","aria-level","aria-setsize","aria-posinset","data-p-highlight","data-p-focused","data-p-disabled"],I=["onClick","onMouseenter"],f=["href","target"],p=["id"],b=["id"];m.render=function(e,t,i,n,s,o){var a=r.resolveComponent("AngleRightIcon"),c=r.resolveComponent("ContextMenuSub",!0),u=r.resolveDirective("ripple");return r.openBlock(),r.createBlock(r.Transition,r.mergeProps({name:"p-contextmenusub",onEnter:o.onEnter},e.ptm("menu.transition")),{default:r.withCtx((function(){return[i.root||i.visible?(r.openBlock(),r.createElementBlock("ul",r.mergeProps({key:0,ref:"container",tabindex:i.tabindex},e.ptm("menu")),[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.items,(function(n,s){return r.openBlock(),r.createElementBlock(r.Fragment,{key:o.getItemKey(n)},[o.isItemVisible(n)&&!o.getItemProp(n,"separator")?(r.openBlock(),r.createElementBlock("li",r.mergeProps({key:0,id:o.getItemId(n),style:o.getItemProp(n,"style"),class:[e.cx("menuitem",{processedItem:n}),o.getItemProp(n,"class")],role:"menuitem","aria-label":o.getItemLabel(n),"aria-disabled":o.isItemDisabled(n)||void 0,"aria-expanded":o.isItemGroup(n)?o.isItemActive(n):void 0,"aria-haspopup":o.isItemGroup(n)&&!o.getItemProp(n,"to")?"menu":void 0,"aria-level":i.level+1,"aria-setsize":o.getAriaSetSize(),"aria-posinset":o.getAriaPosInset(s)},o.getPTOptions("menuitem",n,s),{"data-p-highlight":o.isItemActive(n),"data-p-focused":o.isItemFocused(n),"data-p-disabled":o.isItemDisabled(n)}),[r.createElementVNode("div",r.mergeProps({class:e.cx("content"),onClick:function(e){return o.onItemClick(e,n)},onMouseenter:function(e){return o.onItemMouseEnter(e,n)}},o.getPTOptions("content",n,s)),[i.templates.item?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(i.templates.item),{key:1,item:n.item,hasSubmenu:o.getItemProp(n,"items"),label:o.getItemLabel(n),props:o.getMenuItemProps(n,s)},null,8,["item","hasSubmenu","label","props"])):r.withDirectives((r.openBlock(),r.createElementBlock("a",r.mergeProps({key:0,href:o.getItemProp(n,"url"),class:e.cx("action"),target:o.getItemProp(n,"target"),tabindex:"-1","aria-hidden":"true"},o.getPTOptions("action",n,s)),[i.templates.itemicon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(i.templates.itemicon),{key:0,item:n.item,class:r.normalizeClass([e.cx("icon"),o.getItemProp(n,"icon")])},null,8,["item","class"])):o.getItemProp(n,"icon")?(r.openBlock(),r.createElementBlock("span",r.mergeProps({key:1,class:[e.cx("icon"),o.getItemProp(n,"icon")]},o.getPTOptions("icon",n,s)),null,16)):r.createCommentVNode("",!0),r.createElementVNode("span",r.mergeProps({id:o.getItemLabelId(n),class:e.cx("label")},o.getPTOptions("label",n,s)),r.toDisplayString(o.getItemLabel(n)),17,p),o.getItemProp(n,"items")?(r.openBlock(),r.createElementBlock(r.Fragment,{key:2},[i.templates.submenuicon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(i.templates.submenuicon),{key:0,active:o.isItemActive(n),class:r.normalizeClass(e.cx("submenuIcon"))},null,8,["active","class"])):(r.openBlock(),r.createBlock(a,r.mergeProps({key:1,class:e.cx("submenuIcon")},o.getPTOptions("submenuicon",n,s)),null,16,["class"]))],64)):r.createCommentVNode("",!0)],16,f)),[[u]])],16,I),o.isItemVisible(n)&&o.isItemGroup(n)?(r.openBlock(),r.createBlock(c,r.mergeProps({key:0,id:o.getItemId(n)+"_list",role:"menu",class:e.cx("submenu"),menuId:i.menuId,focusedItemId:i.focusedItemId,items:n.items,templates:i.templates,activeItemPath:i.activeItemPath,level:i.level+1,visible:o.isItemActive(n)&&o.isItemGroup(n),pt:e.pt,unstyled:e.unstyled,onItemClick:t[0]||(t[0]=function(t){return e.$emit("item-click",t)}),onItemMouseenter:t[1]||(t[1]=function(t){return e.$emit("item-mouseenter",t)}),"aria-labelledby":o.getItemLabelId(n)},e.ptm("submenu")),null,16,["id","class","menuId","focusedItemId","items","templates","activeItemPath","level","visible","pt","unstyled","aria-labelledby"])):r.createCommentVNode("",!0)],16,h)):r.createCommentVNode("",!0),o.isItemVisible(n)&&o.getItemProp(n,"separator")?(r.openBlock(),r.createElementBlock("li",r.mergeProps({key:1,id:o.getItemId(n),style:o.getItemProp(n,"style"),class:[e.cx("separator"),o.getItemProp(n,"class")],role:"separator"},e.ptm("separator")),null,16,b)):r.createCommentVNode("",!0)],64)})),128))],16,d)):r.createCommentVNode("",!0)]})),_:1},16,["onEnter"])};var v={name:"ContextMenu",extends:l,inheritAttrs:!1,emits:["focus","blur","show","hide"],target:null,outsideClickListener:null,resizeListener:null,documentContextMenuListener:null,pageX:null,pageY:null,container:null,list:null,data:function(){return{id:this.$attrs.id,focused:!1,focusedItemInfo:{index:-1,level:0,parentKey:""},activeItemPath:[],visible:!1,submenuVisible:!1}},watch:{"$attrs.id":function(e){this.id=e||t.UniqueComponentId()},activeItemPath:function(e){t.ObjectUtils.isNotEmpty(e)?(this.bindOutsideClickListener(),this.bindResizeListener()):this.visible||(this.unbindOutsideClickListener(),this.unbindResizeListener())}},mounted:function(){this.id=this.id||t.UniqueComponentId(),this.global&&this.bindDocumentContextMenuListener()},beforeUnmount:function(){this.unbindResizeListener(),this.unbindOutsideClickListener(),this.unbindDocumentContextMenuListener(),this.container&&this.autoZIndex&&t.ZIndexUtils.clear(this.container),this.target=null,this.container=null},methods:{getItemProp:function(e,i){return e?t.ObjectUtils.getItemValue(e[i]):void 0},getItemLabel:function(e){return this.getItemProp(e,"label")},isItemDisabled:function(e){return this.getItemProp(e,"disabled")},isItemGroup:function(e){return t.ObjectUtils.isNotEmpty(this.getItemProp(e,"items"))},isItemSeparator:function(e){return this.getItemProp(e,"separator")},getProccessedItemLabel:function(e){return e?this.getItemLabel(e.item):void 0},isProccessedItemGroup:function(e){return e&&t.ObjectUtils.isNotEmpty(e.items)},toggle:function(e){this.visible?this.hide():this.show(e)},show:function(e){this.activeItemPath=[],this.focusedItemInfo={index:-1,level:0,parentKey:""},t.DomHandler.focus(this.list),this.pageX=e.pageX,this.pageY=e.pageY,this.visible?this.position():this.visible=!0,e.stopPropagation(),e.preventDefault()},hide:function(){this.visible=!1,this.activeItemPath=[],this.focusedItemInfo={index:-1,level:0,parentKey:""}},onFocus:function(e){this.focused=!0,this.focusedItemInfo=-1!==this.focusedItemInfo.index?this.focusedItemInfo:{index:-1,level:0,parentKey:""},this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedItemInfo={index:-1,level:0,parentKey:""},this.searchValue="",this.$emit("blur",e)},onKeyDown:function(e){var i=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Space":this.onSpaceKey(e);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"PageDown":case"PageUp":case"Backspace":case"ShiftLeft":case"ShiftRight":break;default:!i&&t.ObjectUtils.isPrintableCharacter(e.key)&&this.searchItems(e,e.key)}},onItemChange:function(e){var i=e.processedItem,n=e.isFocus;if(!t.ObjectUtils.isEmpty(i)){var s=i.index,o=i.key,r=i.level,a=i.parentKey,c=t.ObjectUtils.isNotEmpty(i.items),u=this.activeItemPath.filter((function(e){return e.parentKey!==a&&e.parentKey!==o}));c&&(u.push(i),this.submenuVisible=!0),this.focusedItemInfo={index:s,level:r,parentKey:a},this.activeItemPath=u,n&&t.DomHandler.focus(this.list)}},onItemClick:function(e){var i=e.processedItem,n=this.isProccessedItemGroup(i);if(this.isSelected(i)){var s=i.index,o=i.key,r=i.level,a=i.parentKey;this.activeItemPath=this.activeItemPath.filter((function(e){return o!==e.key&&o.startsWith(e.key)})),this.focusedItemInfo={index:s,level:r,parentKey:a},t.DomHandler.focus(this.list)}else n?this.onItemChange(e):this.hide()},onItemMouseEnter:function(e){this.onItemChange(e)},onArrowDownKey:function(e){var t=-1!==this.focusedItemInfo.index?this.findNextItemIndex(this.focusedItemInfo.index):this.findFirstFocusedItemIndex();this.changeFocusedItemIndex(e,t),e.preventDefault()},onArrowUpKey:function(e){if(e.altKey){if(-1!==this.focusedItemInfo.index){var t=this.visibleItems[this.focusedItemInfo.index];!this.isProccessedItemGroup(t)&&this.onItemChange({originalEvent:e,processedItem:t})}this.popup&&this.hide(),e.preventDefault()}else{var i=-1!==this.focusedItemInfo.index?this.findPrevItemIndex(this.focusedItemInfo.index):this.findLastFocusedItemIndex();this.changeFocusedItemIndex(e,i),e.preventDefault()}},onArrowLeftKey:function(e){var i=this,n=this.visibleItems[this.focusedItemInfo.index],s=this.activeItemPath.find((function(e){return e.key===n.parentKey}));t.ObjectUtils.isEmpty(n.parent)||(this.focusedItemInfo={index:-1,parentKey:s?s.parentKey:""},this.searchValue="",this.onArrowDownKey(e)),this.activeItemPath=this.activeItemPath.filter((function(e){return e.parentKey!==i.focusedItemInfo.parentKey})),e.preventDefault()},onArrowRightKey:function(e){var t=this.visibleItems[this.focusedItemInfo.index];this.isProccessedItemGroup(t)&&(this.onItemChange({originalEvent:e,processedItem:t}),this.focusedItemInfo={index:-1,parentKey:t.key},this.searchValue="",this.onArrowDownKey(e)),e.preventDefault()},onHomeKey:function(e){this.changeFocusedItemIndex(e,this.findFirstItemIndex()),e.preventDefault()},onEndKey:function(e){this.changeFocusedItemIndex(e,this.findLastItemIndex()),e.preventDefault()},onEnterKey:function(e){if(-1!==this.focusedItemInfo.index){var i=t.DomHandler.findSingle(this.list,'li[id="'.concat("".concat(this.focusedItemId),'"]')),n=i&&t.DomHandler.findSingle(i,'a[data-pc-section="action"]');n?n.click():i&&i.click(),!this.isProccessedItemGroup(this.visibleItems[this.focusedItemInfo.index])&&(this.focusedItemInfo.index=this.findFirstFocusedItemIndex())}e.preventDefault()},onSpaceKey:function(e){this.onEnterKey(e)},onEscapeKey:function(e){this.hide(),!this.popup&&(this.focusedItemInfo.index=this.findFirstFocusedItemIndex()),e.preventDefault()},onTabKey:function(e){if(-1!==this.focusedItemInfo.index){var t=this.visibleItems[this.focusedItemInfo.index];!this.isProccessedItemGroup(t)&&this.onItemChange({originalEvent:e,processedItem:t})}this.hide()},onEnter:function(e){t.DomHandler.addStyles(e,{position:"absolute"}),this.position(),this.autoZIndex&&t.ZIndexUtils.set("menu",e,this.baseZIndex+this.$primevue.config.zIndex.menu)},onAfterEnter:function(){this.bindOutsideClickListener(),this.bindResizeListener(),this.$emit("show"),t.DomHandler.focus(this.list)},onLeave:function(){this.$emit("hide"),this.container=null},onAfterLeave:function(e){this.autoZIndex&&t.ZIndexUtils.clear(e),this.unbindOutsideClickListener(),this.unbindResizeListener()},position:function(){var e=this.pageX+1,i=this.pageY+1,n=this.container.offsetParent?this.container.offsetWidth:t.DomHandler.getHiddenElementOuterWidth(this.container),s=this.container.offsetParent?this.container.offsetHeight:t.DomHandler.getHiddenElementOuterHeight(this.container),o=t.DomHandler.getViewport();e+n-document.body.scrollLeft>o.width&&(e-=n),i+s-document.body.scrollTop>o.height&&(i-=s),e<document.body.scrollLeft&&(e=document.body.scrollLeft),i<document.body.scrollTop&&(i=document.body.scrollTop),this.container.style.left=e+"px",this.container.style.top=i+"px"},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){var i=e.container&&!e.container.contains(t.target),n=!e.visible||!(e.target&&(e.target===t.target||e.target.contains(t.target)));i&&n&&e.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.visible&&!t.DomHandler.isTouchDevice()&&e.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},bindDocumentContextMenuListener:function(){var e=this;this.documentContextMenuListener||(this.documentContextMenuListener=function(t){2===t.button&&e.show(t)},document.addEventListener("contextmenu",this.documentContextMenuListener))},unbindDocumentContextMenuListener:function(){this.documentContextMenuListener&&(document.removeEventListener("contextmenu",this.documentContextMenuListener),this.documentContextMenuListener=null)},isItemMatched:function(e){return this.isValidItem(e)&&this.getProccessedItemLabel(e).toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase())},isValidItem:function(e){return!!e&&!this.isItemDisabled(e.item)&&!this.isItemSeparator(e.item)},isValidSelectedItem:function(e){return this.isValidItem(e)&&this.isSelected(e)},isSelected:function(e){return this.activeItemPath.some((function(t){return t.key===e.key}))},findFirstItemIndex:function(){var e=this;return this.visibleItems.findIndex((function(t){return e.isValidItem(t)}))},findLastItemIndex:function(){var e=this;return t.ObjectUtils.findLastIndex(this.visibleItems,(function(t){return e.isValidItem(t)}))},findNextItemIndex:function(e){var t=this,i=e<this.visibleItems.length-1?this.visibleItems.slice(e+1).findIndex((function(e){return t.isValidItem(e)})):-1;return i>-1?i+e+1:e},findPrevItemIndex:function(e){var i=this,n=e>0?t.ObjectUtils.findLastIndex(this.visibleItems.slice(0,e),(function(e){return i.isValidItem(e)})):-1;return n>-1?n:e},findSelectedItemIndex:function(){var e=this;return this.visibleItems.findIndex((function(t){return e.isValidSelectedItem(t)}))},findFirstFocusedItemIndex:function(){var e=this.findSelectedItemIndex();return e<0?this.findFirstItemIndex():e},findLastFocusedItemIndex:function(){var e=this.findSelectedItemIndex();return e<0?this.findLastItemIndex():e},searchItems:function(e,t){var i=this;this.searchValue=(this.searchValue||"")+t;var n=-1,s=!1;return-1!==(n=-1!==this.focusedItemInfo.index?-1===(n=this.visibleItems.slice(this.focusedItemInfo.index).findIndex((function(e){return i.isItemMatched(e)})))?this.visibleItems.slice(0,this.focusedItemInfo.index).findIndex((function(e){return i.isItemMatched(e)})):n+this.focusedItemInfo.index:this.visibleItems.findIndex((function(e){return i.isItemMatched(e)})))&&(s=!0),-1===n&&-1===this.focusedItemInfo.index&&(n=this.findFirstFocusedItemIndex()),-1!==n&&this.changeFocusedItemIndex(e,n),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((function(){i.searchValue="",i.searchTimeout=null}),500),s},changeFocusedItemIndex:function(e,t){this.focusedItemInfo.index!==t&&(this.focusedItemInfo.index=t,this.scrollInView())},scrollInView:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,i=-1!==e?"".concat(this.id,"_").concat(e):this.focusedItemId,n=t.DomHandler.findSingle(this.list,'li[id="'.concat(i,'"]'));n&&n.scrollIntoView&&n.scrollIntoView({block:"nearest",inline:"start"})},createProcessedItems:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=[];return e&&e.forEach((function(e,r){var a=(""!==s?s+"_":"")+r,c={item:e,index:r,level:i,key:a,parent:n,parentKey:s};c.items=t.createProcessedItems(e.items,i+1,c,a),o.push(c)})),o},containerRef:function(e){this.container=e},listRef:function(e){this.list=e?e.$el:void 0}},computed:{processedItems:function(){return this.createProcessedItems(this.model||[])},visibleItems:function(){var e=this,t=this.activeItemPath.find((function(t){return t.key===e.focusedItemInfo.parentKey}));return t?t.items:this.processedItems},focusedItemId:function(){return-1!==this.focusedItemInfo.index?"".concat(this.id).concat(t.ObjectUtils.isNotEmpty(this.focusedItemInfo.parentKey)?"_"+this.focusedItemInfo.parentKey:"","_").concat(this.focusedItemInfo.index):null}},components:{ContextMenuSub:m,Portal:c.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 y(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function x(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?y(Object(i),!0).forEach((function(t){P(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):y(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function P(e,t,i){var n;return(t="symbol"==g(n=k(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function k(e,t){if("object"!=g(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=g(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}v.render=function(e,t,i,n,s,o){var a=r.resolveComponent("ContextMenuSub"),c=r.resolveComponent("Portal");return r.openBlock(),r.createBlock(c,{appendTo:e.appendTo},{default:r.withCtx((function(){return[r.createVNode(r.Transition,r.mergeProps({name:"p-contextmenu",onEnter:o.onEnter,onAfterEnter:o.onAfterEnter,onLeave:o.onLeave,onAfterLeave:o.onAfterLeave},e.ptm("transition")),{default:r.withCtx((function(){return[s.visible?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,ref:o.containerRef,class:e.cx("root")},x(x({},e.$attrs),e.ptm("root")),{"data-pc-name":"contextmenu"}),[r.createVNode(a,{ref:o.listRef,id:s.id+"_list",class:r.normalizeClass(e.cx("menu")),role:"menubar",root:!0,tabindex:e.tabindex,"aria-orientation":"vertical","aria-activedescendant":s.focused?o.focusedItemId:void 0,menuId:s.id,focusedItemId:s.focused?o.focusedItemId:void 0,items:o.processedItems,templates:e.$slots,activeItemPath:s.activeItemPath,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,level:0,visible:s.submenuVisible,pt:e.pt,unstyled:e.unstyled,onFocus:o.onFocus,onBlur:o.onBlur,onKeydown:o.onKeyDown,onItemClick:o.onItemClick,onItemMouseenter:o.onItemMouseEnter},null,8,["id","class","tabindex","aria-activedescendant","menuId","focusedItemId","items","templates","activeItemPath","aria-labelledby","aria-label","visible","pt","unstyled","onFocus","onBlur","onKeydown","onItemClick","onItemMouseenter"])],16)):r.createCommentVNode("",!0)]})),_:1},16,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]})),_:1},8,["appendTo"])},module.exports=v;
|