primevue 3.28.0 → 3.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/autocomplete/AutoComplete.d.ts +153 -1
- package/autocomplete/AutoComplete.vue +46 -17
- package/autocomplete/autocomplete.cjs.js +80 -74
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +80 -75
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +81 -76
- package/autocomplete/autocomplete.min.js +1 -1
- package/basecomponent/BaseComponent.vue +19 -5
- package/basecomponent/basecomponent.cjs.js +19 -5
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +19 -5
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +20 -7
- package/basecomponent/basecomponent.min.js +1 -1
- package/calendar/Calendar.d.ts +269 -0
- package/calendar/Calendar.vue +75 -59
- package/calendar/calendar.cjs.js +223 -259
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +223 -260
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +224 -261
- package/calendar/calendar.min.js +1 -1
- package/carousel/Carousel.d.ts +154 -0
- package/carousel/Carousel.vue +27 -14
- package/carousel/carousel.cjs.js +64 -65
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +64 -66
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +65 -67
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +133 -0
- package/cascadeselect/CascadeSelect.vue +15 -12
- package/cascadeselect/CascadeSelectSub.vue +7 -3
- package/cascadeselect/cascadeselect.cjs.js +63 -66
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +63 -67
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +64 -68
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/checkbox/Checkbox.d.ts +60 -0
- package/checkbox/Checkbox.vue +7 -5
- package/checkbox/checkbox.cjs.js +17 -15
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +17 -16
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +18 -17
- package/checkbox/checkbox.min.js +1 -1
- package/chips/Chips.d.ts +80 -0
- package/chips/Chips.vue +9 -5
- package/chips/chips.cjs.js +23 -24
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +23 -25
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +24 -26
- package/chips/chips.min.js +1 -1
- package/colorpicker/ColorPicker.d.ts +76 -0
- package/colorpicker/ColorPicker.vue +11 -9
- package/colorpicker/colorpicker.cjs.js +28 -27
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +28 -28
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +29 -29
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/Column.d.ts +303 -2
- package/column/Column.vue +3 -0
- package/column/column.cjs.js +7 -0
- package/column/column.cjs.min.js +1 -1
- package/column/column.esm.js +3 -0
- package/column/column.esm.min.js +1 -1
- package/column/column.js +7 -2
- package/column/column.min.js +1 -1
- package/columngroup/ColumnGroup.d.ts +34 -0
- package/columngroup/ColumnGroup.vue +3 -0
- package/columngroup/columngroup.cjs.js +7 -0
- package/columngroup/columngroup.cjs.min.js +1 -1
- package/columngroup/columngroup.esm.js +3 -0
- package/columngroup/columngroup.esm.min.js +1 -1
- package/columngroup/columngroup.js +7 -2
- package/columngroup/columngroup.min.js +1 -1
- package/config/PrimeVue.d.ts +163 -2
- package/confirmdialog/ConfirmDialog.d.ts +14 -7
- package/contextmenu/ContextMenu.d.ts +1 -1
- package/core/core.js +448 -331
- package/core/core.min.js +9 -9
- package/datatable/BodyCell.vue +29 -13
- package/datatable/ColumnFilter.vue +49 -20
- package/datatable/DataTable.d.ts +188 -1
- package/datatable/DataTable.vue +25 -14
- package/datatable/FooterCell.vue +15 -1
- package/datatable/HeaderCell.vue +31 -6
- package/datatable/HeaderCheckbox.vue +35 -5
- package/datatable/RowCheckbox.vue +36 -5
- package/datatable/RowRadioButton.vue +26 -6
- package/datatable/TableBody.vue +41 -11
- package/datatable/TableFooter.vue +31 -5
- package/datatable/TableHeader.vue +53 -6
- package/datatable/datatable.cjs.js +559 -376
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +559 -377
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +560 -378
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.d.ts +72 -0
- package/dataview/DataView.vue +13 -8
- package/dataview/dataview.cjs.js +33 -37
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +33 -38
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +33 -38
- package/dataview/dataview.min.js +1 -1
- package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +65 -0
- package/dataviewlayoutoptions/DataViewLayoutOptions.vue +7 -5
- package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.js +19 -17
- package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.min.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.esm.js +19 -18
- package/dataviewlayoutoptions/dataviewlayoutoptions.esm.min.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.js +20 -19
- package/dataviewlayoutoptions/dataviewlayoutoptions.min.js +1 -1
- package/dialog/Dialog.d.ts +6 -4
- package/dialog/Dialog.vue +2 -3
- package/dialog/dialog.cjs.js +4 -5
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +4 -5
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +4 -5
- package/dialog/dialog.min.js +1 -1
- package/dropdown/Dropdown.d.ts +162 -1
- package/dropdown/Dropdown.vue +44 -25
- package/dropdown/dropdown.cjs.js +97 -93
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +97 -94
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +98 -95
- package/dropdown/dropdown.min.js +1 -1
- package/editor/Editor.d.ts +67 -0
- package/editor/Editor.vue +35 -33
- package/editor/editor.cjs.js +88 -73
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +85 -74
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +89 -75
- package/editor/editor.min.js +1 -1
- package/fileupload/FileUpload.d.ts +23 -23
- package/fileupload/FileUpload.vue +3 -3
- package/fileupload/fileupload.cjs.js +4 -4
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +4 -4
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +4 -4
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/Galleria.d.ts +196 -0
- package/galleria/Galleria.vue +5 -3
- package/galleria/GalleriaContent.vue +10 -6
- package/galleria/GalleriaItem.vue +12 -9
- package/galleria/GalleriaThumbnails.vue +46 -9
- package/galleria/galleria.cjs.js +106 -104
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +106 -105
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +107 -106
- package/galleria/galleria.min.js +1 -1
- package/image/Image.d.ts +170 -0
- package/image/Image.vue +49 -21
- package/image/image.cjs.js +94 -59
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +94 -60
- package/image/image.esm.min.js +1 -1
- package/image/image.js +95 -61
- package/image/image.min.js +1 -1
- package/inputmask/InputMask.d.ts +25 -0
- package/inputmask/InputMask.vue +3 -1
- package/inputmask/inputmask.cjs.js +9 -3
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +6 -4
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +10 -5
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/InputNumber.d.ts +69 -0
- package/inputnumber/InputNumber.vue +13 -11
- package/inputnumber/inputnumber.cjs.js +19 -28
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +19 -29
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +20 -30
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/InputSwitch.d.ts +51 -0
- package/inputswitch/InputSwitch.vue +7 -4
- package/inputswitch/inputswitch.cjs.js +15 -11
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +12 -12
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +16 -13
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/InputText.d.ts +25 -0
- package/inputtext/InputText.vue +4 -1
- package/inputtext/inputtext.cjs.js +9 -3
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +6 -4
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +10 -5
- package/inputtext/inputtext.min.js +1 -1
- package/knob/Knob.d.ts +78 -0
- package/knob/Knob.vue +8 -4
- package/knob/knob.cjs.js +17 -13
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +14 -14
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +18 -15
- package/knob/knob.min.js +1 -1
- package/listbox/Listbox.d.ts +137 -1
- package/listbox/Listbox.vue +28 -15
- package/listbox/listbox.cjs.js +83 -78
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +83 -79
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +84 -80
- package/listbox/listbox.min.js +1 -1
- package/megamenu/MegaMenu.d.ts +5 -5
- package/menu/Menu.d.ts +4 -4
- package/menubar/Menubar.d.ts +1 -1
- package/multiselect/MultiSelect.d.ts +223 -1
- package/multiselect/MultiSelect.vue +72 -41
- package/multiselect/multiselect.cjs.js +156 -151
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +156 -152
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +157 -153
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/OrderList.d.ts +94 -0
- package/orderlist/OrderList.vue +38 -18
- package/orderlist/orderlist.cjs.js +50 -36
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +50 -37
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +51 -38
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/OrganizationChart.d.ts +129 -0
- package/organizationchart/OrganizationChart.vue +14 -2
- package/organizationchart/OrganizationChartNode.vue +37 -16
- package/organizationchart/organizationchart.cjs.js +77 -61
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +77 -62
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +78 -63
- package/organizationchart/organizationchart.min.js +1 -1
- package/package.json +1 -1
- package/paginator/CurrentPageReport.vue +5 -1
- package/paginator/FirstPageLink.vue +13 -2
- package/paginator/JumpToPageDropdown.vue +3 -1
- package/paginator/JumpToPageInput.vue +3 -1
- package/paginator/LastPageLink.vue +13 -2
- package/paginator/NextPageLink.vue +13 -2
- package/paginator/PageLinks.vue +12 -2
- package/paginator/Paginator.d.ts +133 -0
- package/paginator/Paginator.vue +23 -12
- package/paginator/PrevPageLink.vue +13 -2
- package/paginator/RowsPerPageDropdown.vue +3 -1
- package/paginator/paginator.cjs.js +135 -76
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +135 -77
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +136 -78
- package/paginator/paginator.min.js +1 -1
- package/panelmenu/PanelMenu.d.ts +4 -8
- package/password/Password.d.ts +104 -0
- package/password/Password.vue +11 -9
- package/password/password.cjs.js +26 -28
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +26 -29
- package/password/password.esm.min.js +1 -1
- package/password/password.js +27 -30
- package/password/password.min.js +1 -1
- package/picklist/PickList.d.ts +160 -0
- package/picklist/PickList.vue +46 -34
- package/picklist/picklist.cjs.js +111 -85
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +111 -86
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +112 -87
- package/picklist/picklist.min.js +1 -1
- package/radiobutton/RadioButton.d.ts +55 -0
- package/radiobutton/RadioButton.vue +7 -5
- package/radiobutton/radiobutton.cjs.js +19 -16
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +16 -17
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +20 -18
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/Rating.d.ts +96 -0
- package/rating/Rating.vue +32 -9
- package/rating/rating.cjs.js +41 -34
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +41 -35
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +42 -36
- package/rating/rating.min.js +1 -1
- package/row/Row.d.ts +29 -0
- package/row/Row.vue +3 -0
- package/row/row.cjs.js +7 -0
- package/row/row.cjs.min.js +1 -1
- package/row/row.esm.js +3 -0
- package/row/row.esm.min.js +1 -1
- package/row/row.js +7 -2
- package/row/row.min.js +1 -1
- package/selectbutton/SelectButton.d.ts +68 -0
- package/selectbutton/SelectButton.vue +13 -2
- package/selectbutton/selectbutton.cjs.js +20 -10
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +20 -11
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +21 -12
- package/selectbutton/selectbutton.min.js +1 -1
- package/slider/Slider.d.ts +48 -0
- package/slider/Slider.vue +7 -2
- package/slider/slider.cjs.js +22 -16
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +19 -17
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +23 -18
- package/slider/slider.min.js +1 -1
- package/splitbutton/SplitButton.d.ts +0 -4
- package/splitbutton/SplitButton.vue +2 -2
- package/splitbutton/splitbutton.cjs.js +7 -6
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +7 -6
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +7 -6
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/Splitter.d.ts +3 -3
- package/textarea/Textarea.d.ts +32 -0
- package/textarea/Textarea.vue +4 -1
- package/textarea/textarea.cjs.js +9 -3
- package/textarea/textarea.cjs.min.js +1 -1
- package/textarea/textarea.esm.js +6 -4
- package/textarea/textarea.esm.min.js +1 -1
- package/textarea/textarea.js +10 -5
- package/textarea/textarea.min.js +1 -1
- package/timeline/Timeline.d.ts +49 -0
- package/timeline/Timeline.vue +9 -7
- package/timeline/timeline.cjs.js +19 -21
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +16 -22
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +20 -23
- package/timeline/timeline.min.js +1 -1
- package/toast/Toast.d.ts +4 -0
- package/toast/Toast.vue +1 -1
- package/toast/toast.cjs.js +3 -3
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +3 -3
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +3 -3
- package/toast/toast.min.js +1 -1
- package/togglebutton/ToggleButton.d.ts +59 -0
- package/togglebutton/ToggleButton.vue +7 -5
- package/togglebutton/togglebutton.cjs.js +15 -14
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +15 -15
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +16 -16
- package/togglebutton/togglebutton.min.js +1 -1
- package/tooltip/Tooltip.d.ts +10 -0
- package/tooltip/tooltip.cjs.js +51 -9
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +52 -10
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +51 -9
- package/tooltip/tooltip.min.js +1 -1
- package/tree/Tree.d.ts +137 -0
- package/tree/Tree.vue +12 -9
- package/tree/TreeNode.vue +23 -10
- package/tree/tree.cjs.js +85 -79
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +85 -80
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +86 -81
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.d.ts +103 -1
- package/treeselect/TreeSelect.vue +15 -12
- package/treeselect/treeselect.cjs.js +37 -39
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +37 -40
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +38 -41
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/BodyCell.vue +38 -10
- package/treetable/FooterCell.vue +15 -1
- package/treetable/HeaderCell.vue +28 -5
- package/treetable/TreeTable.d.ts +162 -0
- package/treetable/TreeTable.vue +25 -19
- package/treetable/TreeTableRow.vue +5 -0
- package/treetable/treetable.cjs.js +205 -158
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +205 -159
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +206 -160
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.d.ts +93 -0
- package/tristatecheckbox/TriStateCheckbox.vue +19 -8
- package/tristatecheckbox/tristatecheckbox.cjs.js +31 -22
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +31 -23
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +32 -24
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/ts-helpers.d.ts +3 -1
- package/vetur-attributes.json +180 -0
- package/vetur-tags.json +94 -39
- package/virtualscroller/VirtualScroller.d.ts +97 -0
- package/virtualscroller/VirtualScroller.vue +7 -5
- package/virtualscroller/virtualscroller.cjs.js +22 -19
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +22 -20
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +23 -21
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +467 -3
- package/datatable/TableLoadingBody.vue +0 -25
package/dataview/dataview.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.dataview=function(t,e,a){"use strict";function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.dataview=function(t,e,r,a){"use strict";function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var s=o(t),i=o(e),n={name:"DataView",extends:s.default,emits:["update:first","update:rows","page"],props:{value:{type:Array,default:null},layout:{type:String,default:"list"},rows:{type:Number,default:0},first:{type:Number,default:0},totalRecords:{type:Number,default:0},paginator:{type:Boolean,default:!1},paginatorPosition:{type:String,default:"bottom"},alwaysShowPaginator:{type:Boolean,default:!0},paginatorTemplate:{type:String,default:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown"},pageLinkSize:{type:Number,default:5},rowsPerPageOptions:{type:Array,default:null},currentPageReportTemplate:{type:String,default:"({currentPage} of {totalPages})"},sortField:{type:[String,Function],default:null},sortOrder:{type:Number,default:null},lazy:{type:Boolean,default:!1},dataKey:{type:String,default:null}},data(){return{d_first:this.first,d_rows:this.rows}},watch:{first(t){this.d_first=t},rows(t){this.d_rows=t},sortField(){this.resetPage()},sortOrder(){this.resetPage()}},methods:{getKey(t,e){return this.dataKey?r.ObjectUtils.resolveFieldData(t,this.dataKey):e},onPage(t){this.d_first=t.first,this.d_rows=t.rows,this.$emit("update:first",this.d_first),this.$emit("update:rows",this.d_rows),this.$emit("page",t)},sort(){if(this.value){const t=[...this.value];return t.sort(((t,e)=>{let a=r.ObjectUtils.resolveFieldData(t,this.sortField),o=r.ObjectUtils.resolveFieldData(e,this.sortField),s=null;return s=null==a&&null!=o?-1:null!=a&&null==o?1:null==a&&null==o?0:"string"==typeof a&&"string"==typeof o?a.localeCompare(o,void 0,{numeric:!0}):a<o?-1:a>o?1:0,this.sortOrder*s})),t}return null},resetPage(){this.d_first=0,this.$emit("update:first",this.d_first)}},computed:{containerClass(){return["p-dataview p-component",{"p-dataview-list":"list"===this.layout,"p-dataview-grid":"grid"===this.layout}]},getTotalRecords(){return this.totalRecords?this.totalRecords:this.value?this.value.length:0},empty(){return!this.value||0===this.value.length},paginatorTop(){return this.paginator&&("bottom"!==this.paginatorPosition||"both"===this.paginatorPosition)},paginatorBottom(){return this.paginator&&("top"!==this.paginatorPosition||"both"===this.paginatorPosition)},items(){if(this.value&&this.value.length){let t=this.value;if(t&&t.length&&this.sortField&&(t=this.sort()),this.paginator){const e=this.lazy?0:this.d_first;return t.slice(e,e+this.d_rows)}return t}return null}},components:{DVPaginator:i.default}};return n.render=function(t,e,r,o,s,i){const n=a.resolveComponent("DVPaginator");return a.openBlock(),a.createElementBlock("div",a.mergeProps({class:i.containerClass},t.ptm("root")),[t.$slots.header?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,class:"p-dataview-header"},t.ptm("header")),[a.renderSlot(t.$slots,"header")],16)):a.createCommentVNode("",!0),i.paginatorTop?(a.openBlock(),a.createBlock(n,{key:1,rows:s.d_rows,first:s.d_first,totalRecords:i.getTotalRecords,pageLinkSize:r.pageLinkSize,template:r.paginatorTemplate,rowsPerPageOptions:r.rowsPerPageOptions,currentPageReportTemplate:r.currentPageReportTemplate,class:a.normalizeClass({"p-paginator-top":i.paginatorTop}),alwaysShow:r.alwaysShowPaginator,onPage:e[0]||(e[0]=t=>i.onPage(t)),pt:t.ptm("paginator")},a.createSlots({_:2},[t.$slots.paginatorstart?{name:"start",fn:a.withCtx((()=>[a.renderSlot(t.$slots,"paginatorstart")])),key:"0"}:void 0,t.$slots.paginatorend?{name:"end",fn:a.withCtx((()=>[a.renderSlot(t.$slots,"paginatorend")])),key:"1"}:void 0]),1032,["rows","first","totalRecords","pageLinkSize","template","rowsPerPageOptions","currentPageReportTemplate","class","alwaysShow","pt"])):a.createCommentVNode("",!0),a.createElementVNode("div",a.mergeProps({class:"p-dataview-content"},t.ptm("content")),[a.createElementVNode("div",a.mergeProps({class:"p-grid p-nogutter grid grid-nogutter"},t.ptm("grid")),[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(i.items,((e,o)=>(a.openBlock(),a.createElementBlock(a.Fragment,{key:i.getKey(e,o)},[t.$slots.list&&"list"===r.layout?a.renderSlot(t.$slots,"list",{key:0,data:e,index:o}):a.createCommentVNode("",!0),t.$slots.grid&&"grid"===r.layout?a.renderSlot(t.$slots,"grid",{key:1,data:e,index:o}):a.createCommentVNode("",!0)],64)))),128)),i.empty?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,class:"p-col col"},t.ptm("column")),[a.createElementVNode("div",a.mergeProps({class:"p-dataview-emptymessage"},t.ptm("emptyMessage")),[a.renderSlot(t.$slots,"empty")],16)],16)):a.createCommentVNode("",!0)],16)],16),i.paginatorBottom?(a.openBlock(),a.createBlock(n,{key:2,rows:s.d_rows,first:s.d_first,totalRecords:i.getTotalRecords,pageLinkSize:r.pageLinkSize,template:r.paginatorTemplate,rowsPerPageOptions:r.rowsPerPageOptions,currentPageReportTemplate:r.currentPageReportTemplate,class:a.normalizeClass({"p-paginator-bottom":i.paginatorBottom}),alwaysShow:r.alwaysShowPaginator,onPage:e[1]||(e[1]=t=>i.onPage(t)),pt:t.ptm("root")},a.createSlots({_:2},[t.$slots.paginatorstart?{name:"start",fn:a.withCtx((()=>[a.renderSlot(t.$slots,"paginatorstart")])),key:"0"}:void 0,t.$slots.paginatorend?{name:"end",fn:a.withCtx((()=>[a.renderSlot(t.$slots,"paginatorend")])),key:"1"}:void 0]),1032,["rows","first","totalRecords","pageLinkSize","template","rowsPerPageOptions","currentPageReportTemplate","class","alwaysShow","pt"])):a.createCommentVNode("",!0),t.$slots.footer?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:3,class:"p-dataview-footer"},t.ptm("footer")),[a.renderSlot(t.$slots,"footer")],16)):a.createCommentVNode("",!0)],16)},n}(primevue.basecomponent,primevue.paginator,primevue.utils,Vue);
|
|
@@ -10,6 +10,66 @@
|
|
|
10
10
|
import { VNode } from 'vue';
|
|
11
11
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
12
12
|
|
|
13
|
+
export declare type DataViewLayoutOptionsPassThroughOptionType = DataViewLayoutOptionsPassThroughAttributes | ((options: DataViewLayoutOptionsPassThroughMethodOptions) => DataViewLayoutOptionsPassThroughAttributes) | null | undefined;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Custom passthrough(pt) option method.
|
|
17
|
+
*/
|
|
18
|
+
export interface DataViewLayoutOptionsPassThroughMethodOptions {
|
|
19
|
+
props: DataViewLayoutOptionsProps;
|
|
20
|
+
state: DataViewLayoutOptionsState;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Custom passthrough(pt) options.
|
|
25
|
+
* @see {@link DataViewLayoutOptionsProps.pt}
|
|
26
|
+
*/
|
|
27
|
+
export interface DataViewLayoutOptionsPassThroughOptions {
|
|
28
|
+
/**
|
|
29
|
+
* Uses to pass attributes to the root's DOM element.
|
|
30
|
+
*/
|
|
31
|
+
root?: DataViewLayoutOptionsPassThroughOptionType;
|
|
32
|
+
/**
|
|
33
|
+
* Uses to pass attributes to the list button's DOM element.
|
|
34
|
+
*/
|
|
35
|
+
listButton?: DataViewLayoutOptionsPassThroughOptionType;
|
|
36
|
+
/**
|
|
37
|
+
* Uses to pass attributes to the list icon's DOM element.
|
|
38
|
+
*/
|
|
39
|
+
listIcon?: DataViewLayoutOptionsPassThroughOptionType;
|
|
40
|
+
/**
|
|
41
|
+
* Uses to pass attributes to the grid button's DOM element.
|
|
42
|
+
*/
|
|
43
|
+
gridButton?: DataViewLayoutOptionsPassThroughOptionType;
|
|
44
|
+
/**
|
|
45
|
+
* Uses to pass attributes to the grid icon's DOM element.
|
|
46
|
+
*/
|
|
47
|
+
gridIcon?: DataViewLayoutOptionsPassThroughOptionType;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Custom passthrough attributes for each DOM elements
|
|
52
|
+
*/
|
|
53
|
+
export interface DataViewLayoutOptionsPassThroughAttributes {
|
|
54
|
+
[key: string]: any;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Defines current inline state in DataViewLayoutOptions component.
|
|
59
|
+
*/
|
|
60
|
+
export interface DataViewLayoutOptionsState {
|
|
61
|
+
/**
|
|
62
|
+
* Current list button pressed state as a boolean.
|
|
63
|
+
* @defaultValue false
|
|
64
|
+
*/
|
|
65
|
+
isListButtonPressed: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Current grid button pressed state as a boolean.
|
|
68
|
+
* @defaultValue false
|
|
69
|
+
*/
|
|
70
|
+
isGridButtonPressed: boolean;
|
|
71
|
+
}
|
|
72
|
+
|
|
13
73
|
/**
|
|
14
74
|
* Defines valid properties in DataViewLayoutOptions component.
|
|
15
75
|
*/
|
|
@@ -18,6 +78,11 @@ export interface DataViewLayoutOptionsProps {
|
|
|
18
78
|
* Value of the component.
|
|
19
79
|
*/
|
|
20
80
|
modelValue?: string | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* Uses to pass attributes to DOM elements inside the component.
|
|
83
|
+
* @type {DataViewLayoutOptionsPassThroughOptions}
|
|
84
|
+
*/
|
|
85
|
+
pt?: DataViewLayoutOptionsPassThroughOptions;
|
|
21
86
|
}
|
|
22
87
|
|
|
23
88
|
/**
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="p-dataview-layout-options p-selectbutton p-buttonset" role="group">
|
|
3
|
-
<button :aria-label="listViewAriaLabel" :class="buttonListClass" @click="changeLayout('list')" type="button" :aria-pressed="isListButtonPressed">
|
|
2
|
+
<div class="p-dataview-layout-options p-selectbutton p-buttonset" role="group" v-bind="ptm('root')">
|
|
3
|
+
<button :aria-label="listViewAriaLabel" :class="buttonListClass" @click="changeLayout('list')" type="button" :aria-pressed="isListButtonPressed" v-bind="ptm('listButton')">
|
|
4
4
|
<slot name="listicon">
|
|
5
|
-
<BarsIcon />
|
|
5
|
+
<BarsIcon v-bind="ptm('listIcon')" />
|
|
6
6
|
</slot>
|
|
7
7
|
</button>
|
|
8
|
-
<button :aria-label="gridViewAriaLabel" :class="buttonGridClass" @click="changeLayout('grid')" type="button" :aria-pressed="isGridButtonPressed">
|
|
8
|
+
<button :aria-label="gridViewAriaLabel" :class="buttonGridClass" @click="changeLayout('grid')" type="button" :aria-pressed="isGridButtonPressed" v-bind="ptm('gridButton')">
|
|
9
9
|
<slot name="gridicon">
|
|
10
|
-
<ThLargeIcon />
|
|
10
|
+
<ThLargeIcon v-bind="ptm('gridIcon')" />
|
|
11
11
|
</slot>
|
|
12
12
|
</button>
|
|
13
13
|
</div>
|
|
14
14
|
</template>
|
|
15
15
|
|
|
16
16
|
<script>
|
|
17
|
+
import BaseComponent from 'primevue/basecomponent';
|
|
17
18
|
import BarsIcon from 'primevue/icons/bars';
|
|
18
19
|
import ThLargeIcon from 'primevue/icons/thlarge';
|
|
19
20
|
|
|
20
21
|
export default {
|
|
21
22
|
name: 'DataViewLayoutOptions',
|
|
23
|
+
extends: BaseComponent,
|
|
22
24
|
emits: ['update:modelValue'],
|
|
23
25
|
props: {
|
|
24
26
|
modelValue: String
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var BaseComponent = require('primevue/basecomponent');
|
|
3
4
|
var BarsIcon = require('primevue/icons/bars');
|
|
4
5
|
var ThLargeIcon = require('primevue/icons/thlarge');
|
|
5
6
|
var vue = require('vue');
|
|
6
7
|
|
|
7
8
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
9
|
|
|
10
|
+
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
|
9
11
|
var BarsIcon__default = /*#__PURE__*/_interopDefaultLegacy(BarsIcon);
|
|
10
12
|
var ThLargeIcon__default = /*#__PURE__*/_interopDefaultLegacy(ThLargeIcon);
|
|
11
13
|
|
|
12
14
|
var script = {
|
|
13
15
|
name: 'DataViewLayoutOptions',
|
|
16
|
+
extends: BaseComponent__default["default"],
|
|
14
17
|
emits: ['update:modelValue'],
|
|
15
18
|
props: {
|
|
16
19
|
modelValue: String
|
|
@@ -54,41 +57,40 @@ var script = {
|
|
|
54
57
|
}
|
|
55
58
|
};
|
|
56
59
|
|
|
57
|
-
const _hoisted_1 =
|
|
58
|
-
class: "p-dataview-layout-options p-selectbutton p-buttonset",
|
|
59
|
-
role: "group"
|
|
60
|
-
};
|
|
60
|
+
const _hoisted_1 = ["aria-label", "aria-pressed"];
|
|
61
61
|
const _hoisted_2 = ["aria-label", "aria-pressed"];
|
|
62
|
-
const _hoisted_3 = ["aria-label", "aria-pressed"];
|
|
63
62
|
|
|
64
63
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
65
64
|
const _component_BarsIcon = vue.resolveComponent("BarsIcon");
|
|
66
65
|
const _component_ThLargeIcon = vue.resolveComponent("ThLargeIcon");
|
|
67
66
|
|
|
68
|
-
return (vue.openBlock(), vue.createElementBlock("div",
|
|
69
|
-
|
|
67
|
+
return (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
68
|
+
class: "p-dataview-layout-options p-selectbutton p-buttonset",
|
|
69
|
+
role: "group"
|
|
70
|
+
}, _ctx.ptm('root')), [
|
|
71
|
+
vue.createElementVNode("button", vue.mergeProps({
|
|
70
72
|
"aria-label": $options.listViewAriaLabel,
|
|
71
|
-
class:
|
|
73
|
+
class: $options.buttonListClass,
|
|
72
74
|
onClick: _cache[0] || (_cache[0] = $event => ($options.changeLayout('list'))),
|
|
73
75
|
type: "button",
|
|
74
76
|
"aria-pressed": $data.isListButtonPressed
|
|
75
|
-
}, [
|
|
77
|
+
}, _ctx.ptm('listButton')), [
|
|
76
78
|
vue.renderSlot(_ctx.$slots, "listicon", {}, () => [
|
|
77
|
-
vue.createVNode(_component_BarsIcon)
|
|
79
|
+
vue.createVNode(_component_BarsIcon, vue.normalizeProps(vue.guardReactiveProps(_ctx.ptm('listIcon'))), null, 16)
|
|
78
80
|
])
|
|
79
|
-
],
|
|
80
|
-
vue.createElementVNode("button", {
|
|
81
|
+
], 16, _hoisted_1),
|
|
82
|
+
vue.createElementVNode("button", vue.mergeProps({
|
|
81
83
|
"aria-label": $options.gridViewAriaLabel,
|
|
82
|
-
class:
|
|
84
|
+
class: $options.buttonGridClass,
|
|
83
85
|
onClick: _cache[1] || (_cache[1] = $event => ($options.changeLayout('grid'))),
|
|
84
86
|
type: "button",
|
|
85
87
|
"aria-pressed": $data.isGridButtonPressed
|
|
86
|
-
}, [
|
|
88
|
+
}, _ctx.ptm('gridButton')), [
|
|
87
89
|
vue.renderSlot(_ctx.$slots, "gridicon", {}, () => [
|
|
88
|
-
vue.createVNode(_component_ThLargeIcon)
|
|
90
|
+
vue.createVNode(_component_ThLargeIcon, vue.normalizeProps(vue.guardReactiveProps(_ctx.ptm('gridIcon'))), null, 16)
|
|
89
91
|
])
|
|
90
|
-
],
|
|
91
|
-
]))
|
|
92
|
+
], 16, _hoisted_2)
|
|
93
|
+
], 16))
|
|
92
94
|
}
|
|
93
95
|
|
|
94
96
|
script.render = render;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/icons/bars"),
|
|
1
|
+
"use strict";var e=require("primevue/basecomponent"),t=require("primevue/icons/bars"),i=require("primevue/icons/thlarge"),r=require("vue");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=o(e),a=o(t),n=o(i),l={name:"DataViewLayoutOptions",extends:s.default,emits:["update:modelValue"],props:{modelValue:String},data:()=>({isListButtonPressed:!1,isGridButtonPressed:!1}),methods:{changeLayout(e){this.$emit("update:modelValue",e),"list"===e?(this.isListButtonPressed=!0,this.isGridButtonPressed=!1):"grid"===e&&(this.isGridButtonPressed=!0,this.isListButtonPressed=!1)}},computed:{buttonListClass(){return["p-button p-button-icon-only",{"p-highlight":"list"===this.modelValue}]},buttonGridClass(){return["p-button p-button-icon-only",{"p-highlight":"grid"===this.modelValue}]},listViewAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.listView:void 0},gridViewAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.gridView:void 0}},components:{BarsIcon:a.default,ThLargeIcon:n.default}};const u=["aria-label","aria-pressed"],d=["aria-label","aria-pressed"];l.render=function(e,t,i,o,s,a){const n=r.resolveComponent("BarsIcon"),l=r.resolveComponent("ThLargeIcon");return r.openBlock(),r.createElementBlock("div",r.mergeProps({class:"p-dataview-layout-options p-selectbutton p-buttonset",role:"group"},e.ptm("root")),[r.createElementVNode("button",r.mergeProps({"aria-label":a.listViewAriaLabel,class:a.buttonListClass,onClick:t[0]||(t[0]=e=>a.changeLayout("list")),type:"button","aria-pressed":s.isListButtonPressed},e.ptm("listButton")),[r.renderSlot(e.$slots,"listicon",{},(()=>[r.createVNode(n,r.normalizeProps(r.guardReactiveProps(e.ptm("listIcon"))),null,16)]))],16,u),r.createElementVNode("button",r.mergeProps({"aria-label":a.gridViewAriaLabel,class:a.buttonGridClass,onClick:t[1]||(t[1]=e=>a.changeLayout("grid")),type:"button","aria-pressed":s.isGridButtonPressed},e.ptm("gridButton")),[r.renderSlot(e.$slots,"gridicon",{},(()=>[r.createVNode(l,r.normalizeProps(r.guardReactiveProps(e.ptm("gridIcon"))),null,16)]))],16,d)],16)},module.exports=l;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import BaseComponent from 'primevue/basecomponent';
|
|
1
2
|
import BarsIcon from 'primevue/icons/bars';
|
|
2
3
|
import ThLargeIcon from 'primevue/icons/thlarge';
|
|
3
|
-
import { resolveComponent, openBlock, createElementBlock,
|
|
4
|
+
import { resolveComponent, openBlock, createElementBlock, mergeProps, createElementVNode, renderSlot, createVNode, normalizeProps, guardReactiveProps } from 'vue';
|
|
4
5
|
|
|
5
6
|
var script = {
|
|
6
7
|
name: 'DataViewLayoutOptions',
|
|
8
|
+
extends: BaseComponent,
|
|
7
9
|
emits: ['update:modelValue'],
|
|
8
10
|
props: {
|
|
9
11
|
modelValue: String
|
|
@@ -47,41 +49,40 @@ var script = {
|
|
|
47
49
|
}
|
|
48
50
|
};
|
|
49
51
|
|
|
50
|
-
const _hoisted_1 =
|
|
51
|
-
class: "p-dataview-layout-options p-selectbutton p-buttonset",
|
|
52
|
-
role: "group"
|
|
53
|
-
};
|
|
52
|
+
const _hoisted_1 = ["aria-label", "aria-pressed"];
|
|
54
53
|
const _hoisted_2 = ["aria-label", "aria-pressed"];
|
|
55
|
-
const _hoisted_3 = ["aria-label", "aria-pressed"];
|
|
56
54
|
|
|
57
55
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
58
56
|
const _component_BarsIcon = resolveComponent("BarsIcon");
|
|
59
57
|
const _component_ThLargeIcon = resolveComponent("ThLargeIcon");
|
|
60
58
|
|
|
61
|
-
return (openBlock(), createElementBlock("div",
|
|
62
|
-
|
|
59
|
+
return (openBlock(), createElementBlock("div", mergeProps({
|
|
60
|
+
class: "p-dataview-layout-options p-selectbutton p-buttonset",
|
|
61
|
+
role: "group"
|
|
62
|
+
}, _ctx.ptm('root')), [
|
|
63
|
+
createElementVNode("button", mergeProps({
|
|
63
64
|
"aria-label": $options.listViewAriaLabel,
|
|
64
|
-
class:
|
|
65
|
+
class: $options.buttonListClass,
|
|
65
66
|
onClick: _cache[0] || (_cache[0] = $event => ($options.changeLayout('list'))),
|
|
66
67
|
type: "button",
|
|
67
68
|
"aria-pressed": $data.isListButtonPressed
|
|
68
|
-
}, [
|
|
69
|
+
}, _ctx.ptm('listButton')), [
|
|
69
70
|
renderSlot(_ctx.$slots, "listicon", {}, () => [
|
|
70
|
-
createVNode(_component_BarsIcon)
|
|
71
|
+
createVNode(_component_BarsIcon, normalizeProps(guardReactiveProps(_ctx.ptm('listIcon'))), null, 16)
|
|
71
72
|
])
|
|
72
|
-
],
|
|
73
|
-
createElementVNode("button", {
|
|
73
|
+
], 16, _hoisted_1),
|
|
74
|
+
createElementVNode("button", mergeProps({
|
|
74
75
|
"aria-label": $options.gridViewAriaLabel,
|
|
75
|
-
class:
|
|
76
|
+
class: $options.buttonGridClass,
|
|
76
77
|
onClick: _cache[1] || (_cache[1] = $event => ($options.changeLayout('grid'))),
|
|
77
78
|
type: "button",
|
|
78
79
|
"aria-pressed": $data.isGridButtonPressed
|
|
79
|
-
}, [
|
|
80
|
+
}, _ctx.ptm('gridButton')), [
|
|
80
81
|
renderSlot(_ctx.$slots, "gridicon", {}, () => [
|
|
81
|
-
createVNode(_component_ThLargeIcon)
|
|
82
|
+
createVNode(_component_ThLargeIcon, normalizeProps(guardReactiveProps(_ctx.ptm('gridIcon'))), null, 16)
|
|
82
83
|
])
|
|
83
|
-
],
|
|
84
|
-
]))
|
|
84
|
+
], 16, _hoisted_2)
|
|
85
|
+
], 16))
|
|
85
86
|
}
|
|
86
87
|
|
|
87
88
|
script.render = render;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"primevue/icons/bars";import
|
|
1
|
+
import t from"primevue/basecomponent";import i from"primevue/icons/bars";import e from"primevue/icons/thlarge";import{resolveComponent as s,openBlock as o,createElementBlock as r,mergeProps as a,createElementVNode as n,renderSlot as l,createVNode as u,normalizeProps as d,guardReactiveProps as p}from"vue";var c={name:"DataViewLayoutOptions",extends:t,emits:["update:modelValue"],props:{modelValue:String},data:()=>({isListButtonPressed:!1,isGridButtonPressed:!1}),methods:{changeLayout(t){this.$emit("update:modelValue",t),"list"===t?(this.isListButtonPressed=!0,this.isGridButtonPressed=!1):"grid"===t&&(this.isGridButtonPressed=!0,this.isListButtonPressed=!1)}},computed:{buttonListClass(){return["p-button p-button-icon-only",{"p-highlight":"list"===this.modelValue}]},buttonGridClass(){return["p-button p-button-icon-only",{"p-highlight":"grid"===this.modelValue}]},listViewAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.listView:void 0},gridViewAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.gridView:void 0}},components:{BarsIcon:i,ThLargeIcon:e}};const m=["aria-label","aria-pressed"],g=["aria-label","aria-pressed"];c.render=function(t,i,e,c,b,h){const L=s("BarsIcon"),v=s("ThLargeIcon");return o(),r("div",a({class:"p-dataview-layout-options p-selectbutton p-buttonset",role:"group"},t.ptm("root")),[n("button",a({"aria-label":h.listViewAriaLabel,class:h.buttonListClass,onClick:i[0]||(i[0]=t=>h.changeLayout("list")),type:"button","aria-pressed":b.isListButtonPressed},t.ptm("listButton")),[l(t.$slots,"listicon",{},(()=>[u(L,d(p(t.ptm("listIcon"))),null,16)]))],16,m),n("button",a({"aria-label":h.gridViewAriaLabel,class:h.buttonGridClass,onClick:i[1]||(i[1]=t=>h.changeLayout("grid")),type:"button","aria-pressed":b.isGridButtonPressed},t.ptm("gridButton")),[l(t.$slots,"gridicon",{},(()=>[u(v,d(p(t.ptm("gridIcon"))),null,16)]))],16,g)],16)};export{c as default};
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
this.primevue = this.primevue || {};
|
|
2
|
-
this.primevue.dataviewlayoutoptions = (function (BarsIcon, ThLargeIcon, vue) {
|
|
2
|
+
this.primevue.dataviewlayoutoptions = (function (BaseComponent, BarsIcon, ThLargeIcon, vue) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
6
6
|
|
|
7
|
+
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
|
7
8
|
var BarsIcon__default = /*#__PURE__*/_interopDefaultLegacy(BarsIcon);
|
|
8
9
|
var ThLargeIcon__default = /*#__PURE__*/_interopDefaultLegacy(ThLargeIcon);
|
|
9
10
|
|
|
10
11
|
var script = {
|
|
11
12
|
name: 'DataViewLayoutOptions',
|
|
13
|
+
extends: BaseComponent__default["default"],
|
|
12
14
|
emits: ['update:modelValue'],
|
|
13
15
|
props: {
|
|
14
16
|
modelValue: String
|
|
@@ -52,45 +54,44 @@ this.primevue.dataviewlayoutoptions = (function (BarsIcon, ThLargeIcon, vue) {
|
|
|
52
54
|
}
|
|
53
55
|
};
|
|
54
56
|
|
|
55
|
-
const _hoisted_1 =
|
|
56
|
-
class: "p-dataview-layout-options p-selectbutton p-buttonset",
|
|
57
|
-
role: "group"
|
|
58
|
-
};
|
|
57
|
+
const _hoisted_1 = ["aria-label", "aria-pressed"];
|
|
59
58
|
const _hoisted_2 = ["aria-label", "aria-pressed"];
|
|
60
|
-
const _hoisted_3 = ["aria-label", "aria-pressed"];
|
|
61
59
|
|
|
62
60
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
63
61
|
const _component_BarsIcon = vue.resolveComponent("BarsIcon");
|
|
64
62
|
const _component_ThLargeIcon = vue.resolveComponent("ThLargeIcon");
|
|
65
63
|
|
|
66
|
-
return (vue.openBlock(), vue.createElementBlock("div",
|
|
67
|
-
|
|
64
|
+
return (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
65
|
+
class: "p-dataview-layout-options p-selectbutton p-buttonset",
|
|
66
|
+
role: "group"
|
|
67
|
+
}, _ctx.ptm('root')), [
|
|
68
|
+
vue.createElementVNode("button", vue.mergeProps({
|
|
68
69
|
"aria-label": $options.listViewAriaLabel,
|
|
69
|
-
class:
|
|
70
|
+
class: $options.buttonListClass,
|
|
70
71
|
onClick: _cache[0] || (_cache[0] = $event => ($options.changeLayout('list'))),
|
|
71
72
|
type: "button",
|
|
72
73
|
"aria-pressed": $data.isListButtonPressed
|
|
73
|
-
}, [
|
|
74
|
+
}, _ctx.ptm('listButton')), [
|
|
74
75
|
vue.renderSlot(_ctx.$slots, "listicon", {}, () => [
|
|
75
|
-
vue.createVNode(_component_BarsIcon)
|
|
76
|
+
vue.createVNode(_component_BarsIcon, vue.normalizeProps(vue.guardReactiveProps(_ctx.ptm('listIcon'))), null, 16)
|
|
76
77
|
])
|
|
77
|
-
],
|
|
78
|
-
vue.createElementVNode("button", {
|
|
78
|
+
], 16, _hoisted_1),
|
|
79
|
+
vue.createElementVNode("button", vue.mergeProps({
|
|
79
80
|
"aria-label": $options.gridViewAriaLabel,
|
|
80
|
-
class:
|
|
81
|
+
class: $options.buttonGridClass,
|
|
81
82
|
onClick: _cache[1] || (_cache[1] = $event => ($options.changeLayout('grid'))),
|
|
82
83
|
type: "button",
|
|
83
84
|
"aria-pressed": $data.isGridButtonPressed
|
|
84
|
-
}, [
|
|
85
|
+
}, _ctx.ptm('gridButton')), [
|
|
85
86
|
vue.renderSlot(_ctx.$slots, "gridicon", {}, () => [
|
|
86
|
-
vue.createVNode(_component_ThLargeIcon)
|
|
87
|
+
vue.createVNode(_component_ThLargeIcon, vue.normalizeProps(vue.guardReactiveProps(_ctx.ptm('gridIcon'))), null, 16)
|
|
87
88
|
])
|
|
88
|
-
],
|
|
89
|
-
]))
|
|
89
|
+
], 16, _hoisted_2)
|
|
90
|
+
], 16))
|
|
90
91
|
}
|
|
91
92
|
|
|
92
93
|
script.render = render;
|
|
93
94
|
|
|
94
95
|
return script;
|
|
95
96
|
|
|
96
|
-
})(primevue.icons.bars, primevue.icons.thlarge, Vue);
|
|
97
|
+
})(primevue.basecomponent, primevue.icons.bars, primevue.icons.thlarge, Vue);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.dataviewlayoutoptions=function(e,t,i){"use strict";function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.dataviewlayoutoptions=function(e,t,i,o){"use strict";function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=s(e),a=s(t),n=s(i),l={name:"DataViewLayoutOptions",extends:r.default,emits:["update:modelValue"],props:{modelValue:String},data:()=>({isListButtonPressed:!1,isGridButtonPressed:!1}),methods:{changeLayout(e){this.$emit("update:modelValue",e),"list"===e?(this.isListButtonPressed=!0,this.isGridButtonPressed=!1):"grid"===e&&(this.isGridButtonPressed=!0,this.isListButtonPressed=!1)}},computed:{buttonListClass(){return["p-button p-button-icon-only",{"p-highlight":"list"===this.modelValue}]},buttonGridClass(){return["p-button p-button-icon-only",{"p-highlight":"grid"===this.modelValue}]},listViewAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.listView:void 0},gridViewAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.gridView:void 0}},components:{BarsIcon:a.default,ThLargeIcon:n.default}};const u=["aria-label","aria-pressed"],d=["aria-label","aria-pressed"];return l.render=function(e,t,i,s,r,a){const n=o.resolveComponent("BarsIcon"),l=o.resolveComponent("ThLargeIcon");return o.openBlock(),o.createElementBlock("div",o.mergeProps({class:"p-dataview-layout-options p-selectbutton p-buttonset",role:"group"},e.ptm("root")),[o.createElementVNode("button",o.mergeProps({"aria-label":a.listViewAriaLabel,class:a.buttonListClass,onClick:t[0]||(t[0]=e=>a.changeLayout("list")),type:"button","aria-pressed":r.isListButtonPressed},e.ptm("listButton")),[o.renderSlot(e.$slots,"listicon",{},(()=>[o.createVNode(n,o.normalizeProps(o.guardReactiveProps(e.ptm("listIcon"))),null,16)]))],16,u),o.createElementVNode("button",o.mergeProps({"aria-label":a.gridViewAriaLabel,class:a.buttonGridClass,onClick:t[1]||(t[1]=e=>a.changeLayout("grid")),type:"button","aria-pressed":r.isGridButtonPressed},e.ptm("gridButton")),[o.renderSlot(e.$slots,"gridicon",{},(()=>[o.createVNode(l,o.normalizeProps(o.guardReactiveProps(e.ptm("gridIcon"))),null,16)]))],16,d)],16)},l}(primevue.basecomponent,primevue.icons.bars,primevue.icons.thlarge,Vue);
|
package/dialog/Dialog.d.ts
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
10
|
import { HTMLAttributes, VNode } from 'vue';
|
|
11
|
-
import { ButtonPassThroughOptions } from '../button';
|
|
12
11
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
13
12
|
|
|
14
13
|
export declare type DialogPassThroughOptionType = DialogPassThroughAttributes | ((options: DialogPassThroughMethodOptions) => DialogPassThroughAttributes) | null | undefined;
|
|
@@ -51,10 +50,13 @@ export interface DialogPassThroughOptions {
|
|
|
51
50
|
*/
|
|
52
51
|
maximizableIcon?: DialogPassThroughOptionType;
|
|
53
52
|
/**
|
|
54
|
-
* Uses to pass attributes to the
|
|
55
|
-
* @see {@link ButtonPassThroughOptions}
|
|
53
|
+
* Uses to pass attributes to the close button's component.
|
|
56
54
|
*/
|
|
57
|
-
closeButton?:
|
|
55
|
+
closeButton?: DialogPassThroughOptionType;
|
|
56
|
+
/**
|
|
57
|
+
* Uses to pass attributes to the close button icon's component.
|
|
58
|
+
*/
|
|
59
|
+
closeButtonIcon?: DialogPassThroughOptionType;
|
|
58
60
|
/**
|
|
59
61
|
* Uses to pass attributes to the content's DOM element.
|
|
60
62
|
*/
|
package/dialog/Dialog.vue
CHANGED
|
@@ -32,11 +32,10 @@
|
|
|
32
32
|
@click="close"
|
|
33
33
|
:aria-label="closeAriaLabel"
|
|
34
34
|
type="button"
|
|
35
|
-
|
|
36
|
-
v-bind="closeButtonProps"
|
|
35
|
+
v-bind="{ ...closeButtonProps, ...ptm('closeButton') }"
|
|
37
36
|
>
|
|
38
37
|
<slot name="closeicon">
|
|
39
|
-
<component :is="closeIcon ? 'span' : 'TimesIcon'" :class="['p-dialog-header-close-icon', closeIcon]" v-bind="ptm('
|
|
38
|
+
<component :is="closeIcon ? 'span' : 'TimesIcon'" :class="['p-dialog-header-close-icon', closeIcon]" v-bind="ptm('closeButtonIcon')"></component>
|
|
40
39
|
</slot>
|
|
41
40
|
</button>
|
|
42
41
|
</div>
|
package/dialog/dialog.cjs.js
CHANGED
|
@@ -490,7 +490,7 @@ var script = {
|
|
|
490
490
|
const _hoisted_1 = ["aria-labelledby", "aria-modal"];
|
|
491
491
|
const _hoisted_2 = ["id"];
|
|
492
492
|
const _hoisted_3 = ["autofocus", "tabindex"];
|
|
493
|
-
const _hoisted_4 = ["autofocus", "aria-label"
|
|
493
|
+
const _hoisted_4 = ["autofocus", "aria-label"];
|
|
494
494
|
|
|
495
495
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
496
496
|
const _component_Portal = vue.resolveComponent("Portal");
|
|
@@ -567,13 +567,12 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
567
567
|
class: "p-dialog-header-icon p-dialog-header-close p-link",
|
|
568
568
|
onClick: _cache[1] || (_cache[1] = (...args) => ($options.close && $options.close(...args))),
|
|
569
569
|
"aria-label": $options.closeAriaLabel,
|
|
570
|
-
type: "button"
|
|
571
|
-
|
|
572
|
-
}, $props.closeButtonProps), [
|
|
570
|
+
type: "button"
|
|
571
|
+
}, { ...$props.closeButtonProps, ..._ctx.ptm('closeButton') }), [
|
|
573
572
|
vue.renderSlot(_ctx.$slots, "closeicon", {}, () => [
|
|
574
573
|
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.closeIcon ? 'span' : 'TimesIcon'), vue.mergeProps({
|
|
575
574
|
class: ['p-dialog-header-close-icon', $props.closeIcon]
|
|
576
|
-
}, _ctx.ptm('
|
|
575
|
+
}, _ctx.ptm('closeButtonIcon')), null, 16, ["class"]))
|
|
577
576
|
])
|
|
578
577
|
], 16, _hoisted_4)), [
|
|
579
578
|
[_directive_ripple]
|
package/dialog/dialog.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/basecomponent"),t=require("primevue/focustrap"),n=require("primevue/icons/times"),i=require("primevue/icons/windowmaximize"),o=require("primevue/icons/windowminimize"),a=require("primevue/portal"),l=require("primevue/ripple"),s=require("primevue/utils"),r=require("vue");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=d(e),p=d(t),c=d(n),u=d(i),g=d(o),h=d(a),f=d(l),b={name:"Dialog",extends:m.default,inheritAttrs:!1,emits:["update:visible","show","hide","after-hide","maximize","unmaximize","dragend"],props:{header:{type:null,default:null},footer:{type:null,default:null},visible:{type:Boolean,default:!1},modal:{type:Boolean,default:null},contentStyle:{type:null,default:null},contentClass:{type:String,default:null},contentProps:{type:null,default:null},rtl:{type:Boolean,default:null},maximizable:{type:Boolean,default:!1},dismissableMask:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0},position:{type:String,default:"center"},breakpoints:{type:Object,default:null},draggable:{type:Boolean,default:!0},keepInViewport:{type:Boolean,default:!0},minX:{type:Number,default:0},minY:{type:Number,default:0},appendTo:{type:String,default:"body"},closeIcon:{type:String,default:void 0},maximizeIcon:{type:String,default:void 0},minimizeIcon:{type:String,default:void 0},closeButtonProps:{type:null,default:null},_instance:null},provide(){return{dialogRef:r.computed((()=>this._instance))}},data(){return{containerVisible:this.visible,maximized:!1,focusableMax:null,focusableClose:null}},documentKeydownListener:null,container:null,mask:null,content:null,headerContainer:null,footerContainer:null,maximizableButton:null,closeButton:null,styleElement:null,dragging:null,documentDragListener:null,documentDragEndListener:null,lastPageX:null,lastPageY:null,updated(){this.visible&&(this.containerVisible=this.visible)},beforeUnmount(){this.unbindDocumentState(),this.unbindGlobalListeners(),this.destroyStyle(),this.mask&&this.autoZIndex&&s.ZIndexUtils.clear(this.mask),this.container=null,this.mask=null},mounted(){this.breakpoints&&this.createStyle()},methods:{close(){this.$emit("update:visible",!1)},onBeforeEnter(e){e.setAttribute(this.attributeSelector,"")},onEnter(){this.$emit("show"),this.focus(),this.enableDocumentSettings(),this.bindGlobalListeners(),this.autoZIndex&&s.ZIndexUtils.set("modal",this.mask,this.baseZIndex+this.$primevue.config.zIndex.modal)},onBeforeLeave(){this.modal&&s.DomHandler.addClass(this.mask,"p-component-overlay-leave")},onLeave(){this.$emit("hide"),this.focusableClose=null,this.focusableMax=null},onAfterLeave(){this.autoZIndex&&s.ZIndexUtils.clear(this.mask),this.containerVisible=!1,this.unbindDocumentState(),this.unbindGlobalListeners(),this.$emit("after-hide")},onMaskClick(e){this.dismissableMask&&this.modal&&this.mask===e.target&&this.close()},focus(){const e=e=>e.querySelector("[autofocus]");let t=this.$slots.footer&&e(this.footerContainer);t||(t=this.$slots.header&&e(this.headerContainer),t||(t=this.$slots.default&&e(this.content),t||(this.maximizable?(this.focusableMax=!0,t=this.maximizableButton):(this.focusableClose=!0,t=this.closeButton)))),t&&s.DomHandler.focus(t)},maximize(e){this.maximized?(this.maximized=!1,this.$emit("unmaximize",e)):(this.maximized=!0,this.$emit("maximize",e)),this.modal||(this.maximized?s.DomHandler.addClass(document.body,"p-overflow-hidden"):s.DomHandler.removeClass(document.body,"p-overflow-hidden"))},enableDocumentSettings(){(this.modal||this.maximizable&&this.maximized)&&s.DomHandler.addClass(document.body,"p-overflow-hidden")},unbindDocumentState(){(this.modal||this.maximizable&&this.maximized)&&s.DomHandler.removeClass(document.body,"p-overflow-hidden")},onKeyDown(e){"Escape"===e.code&&this.closeOnEscape&&this.close()},bindDocumentKeyDownListener(){this.documentKeydownListener||(this.documentKeydownListener=this.onKeyDown.bind(this),window.document.addEventListener("keydown",this.documentKeydownListener))},unbindDocumentKeyDownListener(){this.documentKeydownListener&&(window.document.removeEventListener("keydown",this.documentKeydownListener),this.documentKeydownListener=null)},getPositionClass(){const e=["left","right","top","topleft","topright","bottom","bottomleft","bottomright"].find((e=>e===this.position));return e?`p-dialog-${e}`:""},containerRef(e){this.container=e},maskRef(e){this.mask=e},contentRef(e){this.content=e},headerContainerRef(e){this.headerContainer=e},footerContainerRef(e){this.footerContainer=e},maximizableRef(e){this.maximizableButton=e},closeButtonRef(e){this.closeButton=e},createStyle(){if(!this.styleElement){this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let e="";for(let t in this.breakpoints)e+=`\n @media screen and (max-width: ${t}) {\n .p-dialog[${this.attributeSelector}] {\n width: ${this.breakpoints[t]} !important;\n }\n }\n `;this.styleElement.innerHTML=e}},destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},initDrag(e){s.DomHandler.hasClass(e.target,"p-dialog-header-icon")||s.DomHandler.hasClass(e.target.parentElement,"p-dialog-header-icon")||this.draggable&&(this.dragging=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.container.style.margin="0",s.DomHandler.addClass(document.body,"p-unselectable-text"))},bindGlobalListeners(){this.draggable&&(this.bindDocumentDragListener(),this.bindDocumentDragEndListener()),this.closeOnEscape&&this.closable&&this.bindDocumentKeyDownListener()},unbindGlobalListeners(){this.unbindDocumentDragListener(),this.unbindDocumentDragEndListener(),this.unbindDocumentKeyDownListener()},bindDocumentDragListener(){this.documentDragListener=e=>{if(this.dragging){let t=s.DomHandler.getOuterWidth(this.container),n=s.DomHandler.getOuterHeight(this.container),i=e.pageX-this.lastPageX,o=e.pageY-this.lastPageY,a=this.container.getBoundingClientRect(),l=a.left+i,r=a.top+o,d=s.DomHandler.getViewport();this.container.style.position="fixed",this.keepInViewport?(l>=this.minX&&l+t<d.width&&(this.lastPageX=e.pageX,this.container.style.left=l+"px"),r>=this.minY&&r+n<d.height&&(this.lastPageY=e.pageY,this.container.style.top=r+"px")):(this.lastPageX=e.pageX,this.container.style.left=l+"px",this.lastPageY=e.pageY,this.container.style.top=r+"px")}},window.document.addEventListener("mousemove",this.documentDragListener)},unbindDocumentDragListener(){this.documentDragListener&&(window.document.removeEventListener("mousemove",this.documentDragListener),this.documentDragListener=null)},bindDocumentDragEndListener(){this.documentDragEndListener=e=>{this.dragging&&(this.dragging=!1,s.DomHandler.removeClass(document.body,"p-unselectable-text"),this.$emit("dragend",e))},window.document.addEventListener("mouseup",this.documentDragEndListener)},unbindDocumentDragEndListener(){this.documentDragEndListener&&(window.document.removeEventListener("mouseup",this.documentDragEndListener),this.documentDragEndListener=null)}},computed:{maskClass(){return["p-dialog-mask",{"p-component-overlay p-component-overlay-enter":this.modal},this.getPositionClass()]},dialogClass(){return["p-dialog p-component",{"p-dialog-rtl":this.rtl,"p-dialog-maximized":this.maximizable&&this.maximized,"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},maximizeIconComponent(){return this.maximized?this.minimizeIcon?"span":"WindowMinimizeIcon":this.maximizeIcon?"span":"WindowMaximizeIcon"},maximizeIconClass(){return`p-dialog-header-maximize-icon ${this.maximized?this.minimizeIcon:this.maximizeIcon}`},ariaId:()=>s.UniqueComponentId(),ariaLabelledById(){return null!=this.header||null!==this.$attrs["aria-labelledby"]?this.ariaId+"_header":null},closeAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0},attributeSelector:()=>s.UniqueComponentId(),contentStyleClass(){return["p-dialog-content",this.contentClass]}},directives:{ripple:f.default,focustrap:p.default},components:{Portal:h.default,WindowMinimizeIcon:g.default,WindowMaximizeIcon:u.default,TimesIcon:c.default}};const v=["aria-labelledby","aria-modal"],y=["id"],x=["autofocus","tabindex"],D=["autofocus","aria-label","pt"];!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("\n.p-dialog-mask {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n}\n.p-dialog-mask.p-component-overlay {\n pointer-events: auto;\n}\n.p-dialog {\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n max-height: 90%;\n transform: scale(1);\n}\n.p-dialog-content {\n overflow-y: auto;\n}\n.p-dialog-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-shrink: 0;\n}\n.p-dialog-footer {\n flex-shrink: 0;\n}\n.p-dialog .p-dialog-header-icons {\n display: flex;\n align-items: center;\n}\n.p-dialog .p-dialog-header-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n\n/* Fluid */\n.p-fluid .p-dialog-footer .p-button {\n width: auto;\n}\n\n/* Animation */\n/* Center */\n.p-dialog-enter-active {\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n}\n.p-dialog-leave-active {\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n.p-dialog-enter-from,\n.p-dialog-leave-to {\n opacity: 0;\n transform: scale(0.7);\n}\n\n/* Top, Bottom, Left, Right, Top* and Bottom* */\n.p-dialog-top .p-dialog,\n.p-dialog-bottom .p-dialog,\n.p-dialog-left .p-dialog,\n.p-dialog-right .p-dialog,\n.p-dialog-topleft .p-dialog,\n.p-dialog-topright .p-dialog,\n.p-dialog-bottomleft .p-dialog,\n.p-dialog-bottomright .p-dialog {\n margin: 0.75rem;\n transform: translate3d(0px, 0px, 0px);\n}\n.p-dialog-top .p-dialog-enter-active,\n.p-dialog-top .p-dialog-leave-active,\n.p-dialog-bottom .p-dialog-enter-active,\n.p-dialog-bottom .p-dialog-leave-active,\n.p-dialog-left .p-dialog-enter-active,\n.p-dialog-left .p-dialog-leave-active,\n.p-dialog-right .p-dialog-enter-active,\n.p-dialog-right .p-dialog-leave-active,\n.p-dialog-topleft .p-dialog-enter-active,\n.p-dialog-topleft .p-dialog-leave-active,\n.p-dialog-topright .p-dialog-enter-active,\n.p-dialog-topright .p-dialog-leave-active,\n.p-dialog-bottomleft .p-dialog-enter-active,\n.p-dialog-bottomleft .p-dialog-leave-active,\n.p-dialog-bottomright .p-dialog-enter-active,\n.p-dialog-bottomright .p-dialog-leave-active {\n transition: all 0.3s ease-out;\n}\n.p-dialog-top .p-dialog-enter-from,\n.p-dialog-top .p-dialog-leave-to {\n transform: translate3d(0px, -100%, 0px);\n}\n.p-dialog-bottom .p-dialog-enter-from,\n.p-dialog-bottom .p-dialog-leave-to {\n transform: translate3d(0px, 100%, 0px);\n}\n.p-dialog-left .p-dialog-enter-from,\n.p-dialog-left .p-dialog-leave-to,\n.p-dialog-topleft .p-dialog-enter-from,\n.p-dialog-topleft .p-dialog-leave-to,\n.p-dialog-bottomleft .p-dialog-enter-from,\n.p-dialog-bottomleft .p-dialog-leave-to {\n transform: translate3d(-100%, 0px, 0px);\n}\n.p-dialog-right .p-dialog-enter-from,\n.p-dialog-right .p-dialog-leave-to,\n.p-dialog-topright .p-dialog-enter-from,\n.p-dialog-topright .p-dialog-leave-to,\n.p-dialog-bottomright .p-dialog-enter-from,\n.p-dialog-bottomright .p-dialog-leave-to {\n transform: translate3d(100%, 0px, 0px);\n}\n\n/* Maximize */\n.p-dialog-maximized {\n -webkit-transition: none;\n transition: none;\n transform: none;\n width: 100vw !important;\n height: 100vh !important;\n top: 0px !important;\n left: 0px !important;\n max-height: 100%;\n height: 100%;\n}\n.p-dialog-maximized .p-dialog-content {\n flex-grow: 1;\n}\n\n/* Position */\n.p-dialog-left {\n justify-content: flex-start;\n}\n.p-dialog-right {\n justify-content: flex-end;\n}\n.p-dialog-top {\n align-items: flex-start;\n}\n.p-dialog-topleft {\n justify-content: flex-start;\n align-items: flex-start;\n}\n.p-dialog-topright {\n justify-content: flex-end;\n align-items: flex-start;\n}\n.p-dialog-bottom {\n align-items: flex-end;\n}\n.p-dialog-bottomleft {\n justify-content: flex-start;\n align-items: flex-end;\n}\n.p-dialog-bottomright {\n justify-content: flex-end;\n align-items: flex-end;\n}\n.p-confirm-dialog .p-dialog-content {\n display: flex;\n align-items: center;\n}\n"),b.render=function(e,t,n,i,o,a){const l=r.resolveComponent("Portal"),s=r.resolveDirective("ripple"),d=r.resolveDirective("focustrap");return r.openBlock(),r.createBlock(l,{appendTo:n.appendTo},{default:r.withCtx((()=>[o.containerVisible?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,ref:a.maskRef,class:a.maskClass,onClick:t[3]||(t[3]=(...e)=>a.onMaskClick&&a.onMaskClick(...e))},e.ptm("mask")),[r.createVNode(r.Transition,{name:"p-dialog",onBeforeEnter:a.onBeforeEnter,onEnter:a.onEnter,onBeforeLeave:a.onBeforeLeave,onLeave:a.onLeave,onAfterLeave:a.onAfterLeave,appear:""},{default:r.withCtx((()=>[n.visible?r.withDirectives((r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,ref:a.containerRef,class:a.dialogClass,role:"dialog","aria-labelledby":a.ariaLabelledById,"aria-modal":n.modal},{...e.$attrs,...e.ptm("root")}),[n.showHeader?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,ref:a.headerContainerRef,class:"p-dialog-header",onMousedown:t[2]||(t[2]=(...e)=>a.initDrag&&a.initDrag(...e))},e.ptm("header")),[r.renderSlot(e.$slots,"header",{},(()=>[n.header?(r.openBlock(),r.createElementBlock("span",r.mergeProps({key:0,id:a.ariaLabelledById,class:"p-dialog-title"},e.ptm("headerTitle")),r.toDisplayString(n.header),17,y)):r.createCommentVNode("",!0)])),r.createElementVNode("div",r.mergeProps({class:"p-dialog-header-icons"},e.ptm("headerIcons")),[n.maximizable?r.withDirectives((r.openBlock(),r.createElementBlock("button",r.mergeProps({key:0,ref:a.maximizableRef,autofocus:o.focusableMax,class:"p-dialog-header-icon p-dialog-header-maximize p-link",onClick:t[0]||(t[0]=(...e)=>a.maximize&&a.maximize(...e)),type:"button",tabindex:n.maximizable?"0":"-1"},e.ptm("maximizableButton")),[r.renderSlot(e.$slots,"maximizeicon",{maximized:o.maximized},(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(a.maximizeIconComponent),r.mergeProps({class:a.maximizeIconClass},e.ptm("maximizableIcon")),null,16,["class"]))]))],16,x)),[[s]]):r.createCommentVNode("",!0),n.closable?r.withDirectives((r.openBlock(),r.createElementBlock("button",r.mergeProps({key:1,ref:a.closeButtonRef,autofocus:o.focusableClose,class:"p-dialog-header-icon p-dialog-header-close p-link",onClick:t[1]||(t[1]=(...e)=>a.close&&a.close(...e)),"aria-label":a.closeAriaLabel,type:"button",pt:e.ptm("closeButton")},n.closeButtonProps),[r.renderSlot(e.$slots,"closeicon",{},(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.closeIcon?"span":"TimesIcon"),r.mergeProps({class:["p-dialog-header-close-icon",n.closeIcon]},e.ptm("closeButton").icon),null,16,["class"]))]))],16,D)),[[s]]):r.createCommentVNode("",!0)],16)],16)):r.createCommentVNode("",!0),r.createElementVNode("div",r.mergeProps({ref:a.contentRef,class:a.contentStyleClass,style:n.contentStyle},{...n.contentProps,...e.ptm("content")}),[r.renderSlot(e.$slots,"default")],16),n.footer||e.$slots.footer?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:1,ref:a.footerContainerRef,class:"p-dialog-footer"},e.ptm("footer")),[r.renderSlot(e.$slots,"footer",{},(()=>[r.createTextVNode(r.toDisplayString(n.footer),1)]))],16)):r.createCommentVNode("",!0)],16,v)),[[d,{disabled:!n.modal}]]):r.createCommentVNode("",!0)])),_:3},8,["onBeforeEnter","onEnter","onBeforeLeave","onLeave","onAfterLeave"])],16)):r.createCommentVNode("",!0)])),_:3},8,["appendTo"])},module.exports=b;
|
|
1
|
+
"use strict";var e=require("primevue/basecomponent"),t=require("primevue/focustrap"),n=require("primevue/icons/times"),i=require("primevue/icons/windowmaximize"),o=require("primevue/icons/windowminimize"),a=require("primevue/portal"),l=require("primevue/ripple"),s=require("primevue/utils"),r=require("vue");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=d(e),p=d(t),c=d(n),u=d(i),g=d(o),h=d(a),f=d(l),b={name:"Dialog",extends:m.default,inheritAttrs:!1,emits:["update:visible","show","hide","after-hide","maximize","unmaximize","dragend"],props:{header:{type:null,default:null},footer:{type:null,default:null},visible:{type:Boolean,default:!1},modal:{type:Boolean,default:null},contentStyle:{type:null,default:null},contentClass:{type:String,default:null},contentProps:{type:null,default:null},rtl:{type:Boolean,default:null},maximizable:{type:Boolean,default:!1},dismissableMask:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0},position:{type:String,default:"center"},breakpoints:{type:Object,default:null},draggable:{type:Boolean,default:!0},keepInViewport:{type:Boolean,default:!0},minX:{type:Number,default:0},minY:{type:Number,default:0},appendTo:{type:String,default:"body"},closeIcon:{type:String,default:void 0},maximizeIcon:{type:String,default:void 0},minimizeIcon:{type:String,default:void 0},closeButtonProps:{type:null,default:null},_instance:null},provide(){return{dialogRef:r.computed((()=>this._instance))}},data(){return{containerVisible:this.visible,maximized:!1,focusableMax:null,focusableClose:null}},documentKeydownListener:null,container:null,mask:null,content:null,headerContainer:null,footerContainer:null,maximizableButton:null,closeButton:null,styleElement:null,dragging:null,documentDragListener:null,documentDragEndListener:null,lastPageX:null,lastPageY:null,updated(){this.visible&&(this.containerVisible=this.visible)},beforeUnmount(){this.unbindDocumentState(),this.unbindGlobalListeners(),this.destroyStyle(),this.mask&&this.autoZIndex&&s.ZIndexUtils.clear(this.mask),this.container=null,this.mask=null},mounted(){this.breakpoints&&this.createStyle()},methods:{close(){this.$emit("update:visible",!1)},onBeforeEnter(e){e.setAttribute(this.attributeSelector,"")},onEnter(){this.$emit("show"),this.focus(),this.enableDocumentSettings(),this.bindGlobalListeners(),this.autoZIndex&&s.ZIndexUtils.set("modal",this.mask,this.baseZIndex+this.$primevue.config.zIndex.modal)},onBeforeLeave(){this.modal&&s.DomHandler.addClass(this.mask,"p-component-overlay-leave")},onLeave(){this.$emit("hide"),this.focusableClose=null,this.focusableMax=null},onAfterLeave(){this.autoZIndex&&s.ZIndexUtils.clear(this.mask),this.containerVisible=!1,this.unbindDocumentState(),this.unbindGlobalListeners(),this.$emit("after-hide")},onMaskClick(e){this.dismissableMask&&this.modal&&this.mask===e.target&&this.close()},focus(){const e=e=>e.querySelector("[autofocus]");let t=this.$slots.footer&&e(this.footerContainer);t||(t=this.$slots.header&&e(this.headerContainer),t||(t=this.$slots.default&&e(this.content),t||(this.maximizable?(this.focusableMax=!0,t=this.maximizableButton):(this.focusableClose=!0,t=this.closeButton)))),t&&s.DomHandler.focus(t)},maximize(e){this.maximized?(this.maximized=!1,this.$emit("unmaximize",e)):(this.maximized=!0,this.$emit("maximize",e)),this.modal||(this.maximized?s.DomHandler.addClass(document.body,"p-overflow-hidden"):s.DomHandler.removeClass(document.body,"p-overflow-hidden"))},enableDocumentSettings(){(this.modal||this.maximizable&&this.maximized)&&s.DomHandler.addClass(document.body,"p-overflow-hidden")},unbindDocumentState(){(this.modal||this.maximizable&&this.maximized)&&s.DomHandler.removeClass(document.body,"p-overflow-hidden")},onKeyDown(e){"Escape"===e.code&&this.closeOnEscape&&this.close()},bindDocumentKeyDownListener(){this.documentKeydownListener||(this.documentKeydownListener=this.onKeyDown.bind(this),window.document.addEventListener("keydown",this.documentKeydownListener))},unbindDocumentKeyDownListener(){this.documentKeydownListener&&(window.document.removeEventListener("keydown",this.documentKeydownListener),this.documentKeydownListener=null)},getPositionClass(){const e=["left","right","top","topleft","topright","bottom","bottomleft","bottomright"].find((e=>e===this.position));return e?`p-dialog-${e}`:""},containerRef(e){this.container=e},maskRef(e){this.mask=e},contentRef(e){this.content=e},headerContainerRef(e){this.headerContainer=e},footerContainerRef(e){this.footerContainer=e},maximizableRef(e){this.maximizableButton=e},closeButtonRef(e){this.closeButton=e},createStyle(){if(!this.styleElement){this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let e="";for(let t in this.breakpoints)e+=`\n @media screen and (max-width: ${t}) {\n .p-dialog[${this.attributeSelector}] {\n width: ${this.breakpoints[t]} !important;\n }\n }\n `;this.styleElement.innerHTML=e}},destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},initDrag(e){s.DomHandler.hasClass(e.target,"p-dialog-header-icon")||s.DomHandler.hasClass(e.target.parentElement,"p-dialog-header-icon")||this.draggable&&(this.dragging=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.container.style.margin="0",s.DomHandler.addClass(document.body,"p-unselectable-text"))},bindGlobalListeners(){this.draggable&&(this.bindDocumentDragListener(),this.bindDocumentDragEndListener()),this.closeOnEscape&&this.closable&&this.bindDocumentKeyDownListener()},unbindGlobalListeners(){this.unbindDocumentDragListener(),this.unbindDocumentDragEndListener(),this.unbindDocumentKeyDownListener()},bindDocumentDragListener(){this.documentDragListener=e=>{if(this.dragging){let t=s.DomHandler.getOuterWidth(this.container),n=s.DomHandler.getOuterHeight(this.container),i=e.pageX-this.lastPageX,o=e.pageY-this.lastPageY,a=this.container.getBoundingClientRect(),l=a.left+i,r=a.top+o,d=s.DomHandler.getViewport();this.container.style.position="fixed",this.keepInViewport?(l>=this.minX&&l+t<d.width&&(this.lastPageX=e.pageX,this.container.style.left=l+"px"),r>=this.minY&&r+n<d.height&&(this.lastPageY=e.pageY,this.container.style.top=r+"px")):(this.lastPageX=e.pageX,this.container.style.left=l+"px",this.lastPageY=e.pageY,this.container.style.top=r+"px")}},window.document.addEventListener("mousemove",this.documentDragListener)},unbindDocumentDragListener(){this.documentDragListener&&(window.document.removeEventListener("mousemove",this.documentDragListener),this.documentDragListener=null)},bindDocumentDragEndListener(){this.documentDragEndListener=e=>{this.dragging&&(this.dragging=!1,s.DomHandler.removeClass(document.body,"p-unselectable-text"),this.$emit("dragend",e))},window.document.addEventListener("mouseup",this.documentDragEndListener)},unbindDocumentDragEndListener(){this.documentDragEndListener&&(window.document.removeEventListener("mouseup",this.documentDragEndListener),this.documentDragEndListener=null)}},computed:{maskClass(){return["p-dialog-mask",{"p-component-overlay p-component-overlay-enter":this.modal},this.getPositionClass()]},dialogClass(){return["p-dialog p-component",{"p-dialog-rtl":this.rtl,"p-dialog-maximized":this.maximizable&&this.maximized,"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},maximizeIconComponent(){return this.maximized?this.minimizeIcon?"span":"WindowMinimizeIcon":this.maximizeIcon?"span":"WindowMaximizeIcon"},maximizeIconClass(){return`p-dialog-header-maximize-icon ${this.maximized?this.minimizeIcon:this.maximizeIcon}`},ariaId:()=>s.UniqueComponentId(),ariaLabelledById(){return null!=this.header||null!==this.$attrs["aria-labelledby"]?this.ariaId+"_header":null},closeAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0},attributeSelector:()=>s.UniqueComponentId(),contentStyleClass(){return["p-dialog-content",this.contentClass]}},directives:{ripple:f.default,focustrap:p.default},components:{Portal:h.default,WindowMinimizeIcon:g.default,WindowMaximizeIcon:u.default,TimesIcon:c.default}};const v=["aria-labelledby","aria-modal"],y=["id"],x=["autofocus","tabindex"],D=["autofocus","aria-label"];!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("\n.p-dialog-mask {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n}\n.p-dialog-mask.p-component-overlay {\n pointer-events: auto;\n}\n.p-dialog {\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n max-height: 90%;\n transform: scale(1);\n}\n.p-dialog-content {\n overflow-y: auto;\n}\n.p-dialog-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-shrink: 0;\n}\n.p-dialog-footer {\n flex-shrink: 0;\n}\n.p-dialog .p-dialog-header-icons {\n display: flex;\n align-items: center;\n}\n.p-dialog .p-dialog-header-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n\n/* Fluid */\n.p-fluid .p-dialog-footer .p-button {\n width: auto;\n}\n\n/* Animation */\n/* Center */\n.p-dialog-enter-active {\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n}\n.p-dialog-leave-active {\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n.p-dialog-enter-from,\n.p-dialog-leave-to {\n opacity: 0;\n transform: scale(0.7);\n}\n\n/* Top, Bottom, Left, Right, Top* and Bottom* */\n.p-dialog-top .p-dialog,\n.p-dialog-bottom .p-dialog,\n.p-dialog-left .p-dialog,\n.p-dialog-right .p-dialog,\n.p-dialog-topleft .p-dialog,\n.p-dialog-topright .p-dialog,\n.p-dialog-bottomleft .p-dialog,\n.p-dialog-bottomright .p-dialog {\n margin: 0.75rem;\n transform: translate3d(0px, 0px, 0px);\n}\n.p-dialog-top .p-dialog-enter-active,\n.p-dialog-top .p-dialog-leave-active,\n.p-dialog-bottom .p-dialog-enter-active,\n.p-dialog-bottom .p-dialog-leave-active,\n.p-dialog-left .p-dialog-enter-active,\n.p-dialog-left .p-dialog-leave-active,\n.p-dialog-right .p-dialog-enter-active,\n.p-dialog-right .p-dialog-leave-active,\n.p-dialog-topleft .p-dialog-enter-active,\n.p-dialog-topleft .p-dialog-leave-active,\n.p-dialog-topright .p-dialog-enter-active,\n.p-dialog-topright .p-dialog-leave-active,\n.p-dialog-bottomleft .p-dialog-enter-active,\n.p-dialog-bottomleft .p-dialog-leave-active,\n.p-dialog-bottomright .p-dialog-enter-active,\n.p-dialog-bottomright .p-dialog-leave-active {\n transition: all 0.3s ease-out;\n}\n.p-dialog-top .p-dialog-enter-from,\n.p-dialog-top .p-dialog-leave-to {\n transform: translate3d(0px, -100%, 0px);\n}\n.p-dialog-bottom .p-dialog-enter-from,\n.p-dialog-bottom .p-dialog-leave-to {\n transform: translate3d(0px, 100%, 0px);\n}\n.p-dialog-left .p-dialog-enter-from,\n.p-dialog-left .p-dialog-leave-to,\n.p-dialog-topleft .p-dialog-enter-from,\n.p-dialog-topleft .p-dialog-leave-to,\n.p-dialog-bottomleft .p-dialog-enter-from,\n.p-dialog-bottomleft .p-dialog-leave-to {\n transform: translate3d(-100%, 0px, 0px);\n}\n.p-dialog-right .p-dialog-enter-from,\n.p-dialog-right .p-dialog-leave-to,\n.p-dialog-topright .p-dialog-enter-from,\n.p-dialog-topright .p-dialog-leave-to,\n.p-dialog-bottomright .p-dialog-enter-from,\n.p-dialog-bottomright .p-dialog-leave-to {\n transform: translate3d(100%, 0px, 0px);\n}\n\n/* Maximize */\n.p-dialog-maximized {\n -webkit-transition: none;\n transition: none;\n transform: none;\n width: 100vw !important;\n height: 100vh !important;\n top: 0px !important;\n left: 0px !important;\n max-height: 100%;\n height: 100%;\n}\n.p-dialog-maximized .p-dialog-content {\n flex-grow: 1;\n}\n\n/* Position */\n.p-dialog-left {\n justify-content: flex-start;\n}\n.p-dialog-right {\n justify-content: flex-end;\n}\n.p-dialog-top {\n align-items: flex-start;\n}\n.p-dialog-topleft {\n justify-content: flex-start;\n align-items: flex-start;\n}\n.p-dialog-topright {\n justify-content: flex-end;\n align-items: flex-start;\n}\n.p-dialog-bottom {\n align-items: flex-end;\n}\n.p-dialog-bottomleft {\n justify-content: flex-start;\n align-items: flex-end;\n}\n.p-dialog-bottomright {\n justify-content: flex-end;\n align-items: flex-end;\n}\n.p-confirm-dialog .p-dialog-content {\n display: flex;\n align-items: center;\n}\n"),b.render=function(e,t,n,i,o,a){const l=r.resolveComponent("Portal"),s=r.resolveDirective("ripple"),d=r.resolveDirective("focustrap");return r.openBlock(),r.createBlock(l,{appendTo:n.appendTo},{default:r.withCtx((()=>[o.containerVisible?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,ref:a.maskRef,class:a.maskClass,onClick:t[3]||(t[3]=(...e)=>a.onMaskClick&&a.onMaskClick(...e))},e.ptm("mask")),[r.createVNode(r.Transition,{name:"p-dialog",onBeforeEnter:a.onBeforeEnter,onEnter:a.onEnter,onBeforeLeave:a.onBeforeLeave,onLeave:a.onLeave,onAfterLeave:a.onAfterLeave,appear:""},{default:r.withCtx((()=>[n.visible?r.withDirectives((r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,ref:a.containerRef,class:a.dialogClass,role:"dialog","aria-labelledby":a.ariaLabelledById,"aria-modal":n.modal},{...e.$attrs,...e.ptm("root")}),[n.showHeader?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,ref:a.headerContainerRef,class:"p-dialog-header",onMousedown:t[2]||(t[2]=(...e)=>a.initDrag&&a.initDrag(...e))},e.ptm("header")),[r.renderSlot(e.$slots,"header",{},(()=>[n.header?(r.openBlock(),r.createElementBlock("span",r.mergeProps({key:0,id:a.ariaLabelledById,class:"p-dialog-title"},e.ptm("headerTitle")),r.toDisplayString(n.header),17,y)):r.createCommentVNode("",!0)])),r.createElementVNode("div",r.mergeProps({class:"p-dialog-header-icons"},e.ptm("headerIcons")),[n.maximizable?r.withDirectives((r.openBlock(),r.createElementBlock("button",r.mergeProps({key:0,ref:a.maximizableRef,autofocus:o.focusableMax,class:"p-dialog-header-icon p-dialog-header-maximize p-link",onClick:t[0]||(t[0]=(...e)=>a.maximize&&a.maximize(...e)),type:"button",tabindex:n.maximizable?"0":"-1"},e.ptm("maximizableButton")),[r.renderSlot(e.$slots,"maximizeicon",{maximized:o.maximized},(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(a.maximizeIconComponent),r.mergeProps({class:a.maximizeIconClass},e.ptm("maximizableIcon")),null,16,["class"]))]))],16,x)),[[s]]):r.createCommentVNode("",!0),n.closable?r.withDirectives((r.openBlock(),r.createElementBlock("button",r.mergeProps({key:1,ref:a.closeButtonRef,autofocus:o.focusableClose,class:"p-dialog-header-icon p-dialog-header-close p-link",onClick:t[1]||(t[1]=(...e)=>a.close&&a.close(...e)),"aria-label":a.closeAriaLabel,type:"button"},{...n.closeButtonProps,...e.ptm("closeButton")}),[r.renderSlot(e.$slots,"closeicon",{},(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.closeIcon?"span":"TimesIcon"),r.mergeProps({class:["p-dialog-header-close-icon",n.closeIcon]},e.ptm("closeButtonIcon")),null,16,["class"]))]))],16,D)),[[s]]):r.createCommentVNode("",!0)],16)],16)):r.createCommentVNode("",!0),r.createElementVNode("div",r.mergeProps({ref:a.contentRef,class:a.contentStyleClass,style:n.contentStyle},{...n.contentProps,...e.ptm("content")}),[r.renderSlot(e.$slots,"default")],16),n.footer||e.$slots.footer?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:1,ref:a.footerContainerRef,class:"p-dialog-footer"},e.ptm("footer")),[r.renderSlot(e.$slots,"footer",{},(()=>[r.createTextVNode(r.toDisplayString(n.footer),1)]))],16)):r.createCommentVNode("",!0)],16,v)),[[d,{disabled:!n.modal}]]):r.createCommentVNode("",!0)])),_:3},8,["onBeforeEnter","onEnter","onBeforeLeave","onLeave","onAfterLeave"])],16)):r.createCommentVNode("",!0)])),_:3},8,["appendTo"])},module.exports=b;
|
package/dialog/dialog.esm.js
CHANGED
|
@@ -478,7 +478,7 @@ var script = {
|
|
|
478
478
|
const _hoisted_1 = ["aria-labelledby", "aria-modal"];
|
|
479
479
|
const _hoisted_2 = ["id"];
|
|
480
480
|
const _hoisted_3 = ["autofocus", "tabindex"];
|
|
481
|
-
const _hoisted_4 = ["autofocus", "aria-label"
|
|
481
|
+
const _hoisted_4 = ["autofocus", "aria-label"];
|
|
482
482
|
|
|
483
483
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
484
484
|
const _component_Portal = resolveComponent("Portal");
|
|
@@ -555,13 +555,12 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
555
555
|
class: "p-dialog-header-icon p-dialog-header-close p-link",
|
|
556
556
|
onClick: _cache[1] || (_cache[1] = (...args) => ($options.close && $options.close(...args))),
|
|
557
557
|
"aria-label": $options.closeAriaLabel,
|
|
558
|
-
type: "button"
|
|
559
|
-
|
|
560
|
-
}, $props.closeButtonProps), [
|
|
558
|
+
type: "button"
|
|
559
|
+
}, { ...$props.closeButtonProps, ..._ctx.ptm('closeButton') }), [
|
|
561
560
|
renderSlot(_ctx.$slots, "closeicon", {}, () => [
|
|
562
561
|
(openBlock(), createBlock(resolveDynamicComponent($props.closeIcon ? 'span' : 'TimesIcon'), mergeProps({
|
|
563
562
|
class: ['p-dialog-header-close-icon', $props.closeIcon]
|
|
564
|
-
}, _ctx.ptm('
|
|
563
|
+
}, _ctx.ptm('closeButtonIcon')), null, 16, ["class"]))
|
|
565
564
|
])
|
|
566
565
|
], 16, _hoisted_4)), [
|
|
567
566
|
[_directive_ripple]
|