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/image/image.cjs.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var BaseComponent = require('primevue/basecomponent');
|
|
3
4
|
var FocusTrap = require('primevue/focustrap');
|
|
4
5
|
var EyeIcon = require('primevue/icons/eye');
|
|
5
6
|
var RefreshIcon = require('primevue/icons/refresh');
|
|
@@ -13,6 +14,7 @@ var vue = require('vue');
|
|
|
13
14
|
|
|
14
15
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
15
16
|
|
|
17
|
+
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
|
16
18
|
var FocusTrap__default = /*#__PURE__*/_interopDefaultLegacy(FocusTrap);
|
|
17
19
|
var EyeIcon__default = /*#__PURE__*/_interopDefaultLegacy(EyeIcon);
|
|
18
20
|
var RefreshIcon__default = /*#__PURE__*/_interopDefaultLegacy(RefreshIcon);
|
|
@@ -24,6 +26,7 @@ var Portal__default = /*#__PURE__*/_interopDefaultLegacy(Portal);
|
|
|
24
26
|
|
|
25
27
|
var script = {
|
|
26
28
|
name: 'Image',
|
|
29
|
+
extends: BaseComponent__default["default"],
|
|
27
30
|
inheritAttrs: false,
|
|
28
31
|
emits: ['show', 'hide', 'error'],
|
|
29
32
|
props: {
|
|
@@ -54,6 +57,14 @@ var script = {
|
|
|
54
57
|
indicatorIcon: {
|
|
55
58
|
type: String,
|
|
56
59
|
default: undefined
|
|
60
|
+
},
|
|
61
|
+
zoomInDisabled: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: false
|
|
64
|
+
},
|
|
65
|
+
zoomOutDisabled: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: false
|
|
57
68
|
}
|
|
58
69
|
},
|
|
59
70
|
mask: null,
|
|
@@ -88,7 +99,13 @@ var script = {
|
|
|
88
99
|
onPreviewImageClick() {
|
|
89
100
|
this.previewClick = true;
|
|
90
101
|
},
|
|
91
|
-
onMaskClick() {
|
|
102
|
+
onMaskClick(event) {
|
|
103
|
+
const isActionbarTarget = [event.target.classList].includes('p-image-action') || event.target.closest('.p-image-action');
|
|
104
|
+
|
|
105
|
+
if (isActionbarTarget) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
|
|
92
109
|
if (!this.previewClick) {
|
|
93
110
|
this.previewVisible = false;
|
|
94
111
|
this.rotate = 0;
|
|
@@ -151,6 +168,11 @@ var script = {
|
|
|
151
168
|
if (focusTarget) {
|
|
152
169
|
focusTarget.focus();
|
|
153
170
|
}
|
|
171
|
+
},
|
|
172
|
+
hidePreview() {
|
|
173
|
+
this.previewVisible = false;
|
|
174
|
+
this.rotate = 0;
|
|
175
|
+
this.scale = 1;
|
|
154
176
|
}
|
|
155
177
|
},
|
|
156
178
|
computed: {
|
|
@@ -172,8 +194,11 @@ var script = {
|
|
|
172
194
|
imagePreviewStyle() {
|
|
173
195
|
return { transform: 'rotate(' + this.rotate + 'deg) scale(' + this.scale + ')' };
|
|
174
196
|
},
|
|
175
|
-
|
|
176
|
-
return this.
|
|
197
|
+
isZoomInDisabled() {
|
|
198
|
+
return this.zoomInDisabled || this.scale >= 1.5;
|
|
199
|
+
},
|
|
200
|
+
isZoomOutDisabled() {
|
|
201
|
+
return this.zoomOutDisabled || this.scale <= 0.5;
|
|
177
202
|
},
|
|
178
203
|
rightAriaLabel() {
|
|
179
204
|
return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.rotateRight : undefined;
|
|
@@ -206,14 +231,12 @@ var script = {
|
|
|
206
231
|
};
|
|
207
232
|
|
|
208
233
|
const _hoisted_1 = ["aria-modal"];
|
|
209
|
-
const _hoisted_2 =
|
|
234
|
+
const _hoisted_2 = ["aria-label"];
|
|
210
235
|
const _hoisted_3 = ["aria-label"];
|
|
211
|
-
const _hoisted_4 = ["aria-label"];
|
|
236
|
+
const _hoisted_4 = ["disabled", "aria-label"];
|
|
212
237
|
const _hoisted_5 = ["disabled", "aria-label"];
|
|
213
|
-
const _hoisted_6 = ["
|
|
214
|
-
const _hoisted_7 = ["
|
|
215
|
-
const _hoisted_8 = { key: 0 };
|
|
216
|
-
const _hoisted_9 = ["src"];
|
|
238
|
+
const _hoisted_6 = ["aria-label"];
|
|
239
|
+
const _hoisted_7 = ["src"];
|
|
217
240
|
|
|
218
241
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
219
242
|
const _component_RefreshIcon = vue.resolveComponent("RefreshIcon");
|
|
@@ -224,94 +247,100 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
224
247
|
const _component_Portal = vue.resolveComponent("Portal");
|
|
225
248
|
const _directive_focustrap = vue.resolveDirective("focustrap");
|
|
226
249
|
|
|
227
|
-
return (vue.openBlock(), vue.createElementBlock("span", {
|
|
228
|
-
class:
|
|
229
|
-
style:
|
|
230
|
-
}, [
|
|
231
|
-
vue.
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
onError:
|
|
235
|
-
}
|
|
250
|
+
return (vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
|
|
251
|
+
class: $options.containerClass,
|
|
252
|
+
style: $props.style
|
|
253
|
+
}, _ctx.ptm('root')), [
|
|
254
|
+
vue.renderSlot(_ctx.$slots, "image", {
|
|
255
|
+
class: vue.normalizeClass($props.imageClass),
|
|
256
|
+
style: vue.normalizeStyle($props.imageStyle),
|
|
257
|
+
onError: $options.onError
|
|
258
|
+
}, () => [
|
|
259
|
+
vue.createElementVNode("img", vue.mergeProps({
|
|
260
|
+
style: $props.imageStyle,
|
|
261
|
+
class: $props.imageClass,
|
|
262
|
+
onError: _cache[0] || (_cache[0] = (...args) => ($options.onError && $options.onError(...args)))
|
|
263
|
+
}, { ..._ctx.$attrs, ..._ctx.ptm('image') }), null, 16)
|
|
264
|
+
]),
|
|
236
265
|
($props.preview)
|
|
237
266
|
? (vue.openBlock(), vue.createElementBlock("button", vue.mergeProps({
|
|
238
267
|
key: 0,
|
|
239
268
|
ref: "previewButton",
|
|
240
269
|
class: "p-image-preview-indicator",
|
|
241
270
|
onClick: _cache[1] || (_cache[1] = (...args) => ($options.onImageClick && $options.onImageClick(...args)))
|
|
242
|
-
},
|
|
271
|
+
}, { ...$props.previewButtonProps, ..._ctx.ptm('button') }), [
|
|
243
272
|
vue.renderSlot(_ctx.$slots, "indicatoricon", {}, () => [
|
|
244
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.indicatorIcon ? 'i' : 'EyeIcon'), { class: "p-image-preview-icon" }))
|
|
273
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.indicatorIcon ? 'i' : 'EyeIcon'), vue.mergeProps({ class: "p-image-preview-icon" }, _ctx.ptm('icon')), null, 16))
|
|
245
274
|
])
|
|
246
275
|
], 16))
|
|
247
276
|
: vue.createCommentVNode("", true),
|
|
248
277
|
vue.createVNode(_component_Portal, null, {
|
|
249
278
|
default: vue.withCtx(() => [
|
|
250
279
|
($data.maskVisible)
|
|
251
|
-
? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
280
|
+
? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
252
281
|
key: 0,
|
|
253
282
|
ref: $options.maskRef,
|
|
254
283
|
role: "dialog",
|
|
255
|
-
class:
|
|
284
|
+
class: $options.maskClass,
|
|
256
285
|
"aria-modal": $data.maskVisible,
|
|
257
286
|
onClick: _cache[8] || (_cache[8] = (...args) => ($options.onMaskClick && $options.onMaskClick(...args))),
|
|
258
287
|
onKeydown: _cache[9] || (_cache[9] = (...args) => ($options.onMaskKeydown && $options.onMaskKeydown(...args)))
|
|
259
|
-
}, [
|
|
260
|
-
vue.createElementVNode("div",
|
|
261
|
-
vue.createElementVNode("button", {
|
|
288
|
+
}, _ctx.ptm('mask')), [
|
|
289
|
+
vue.createElementVNode("div", vue.mergeProps({ class: "p-image-toolbar" }, _ctx.ptm('toolbar')), [
|
|
290
|
+
vue.createElementVNode("button", vue.mergeProps({
|
|
262
291
|
class: "p-image-action p-link",
|
|
263
292
|
onClick: _cache[2] || (_cache[2] = (...args) => ($options.rotateRight && $options.rotateRight(...args))),
|
|
264
293
|
type: "button",
|
|
265
294
|
"aria-label": $options.rightAriaLabel
|
|
266
|
-
}, [
|
|
295
|
+
}, _ctx.ptm('rotateRightButton')), [
|
|
267
296
|
vue.renderSlot(_ctx.$slots, "refresh", {}, () => [
|
|
268
|
-
vue.createVNode(_component_RefreshIcon)
|
|
297
|
+
vue.createVNode(_component_RefreshIcon, vue.normalizeProps(vue.guardReactiveProps(_ctx.ptm('rotateRightIcon'))), null, 16)
|
|
269
298
|
])
|
|
270
|
-
],
|
|
271
|
-
vue.createElementVNode("button", {
|
|
299
|
+
], 16, _hoisted_2),
|
|
300
|
+
vue.createElementVNode("button", vue.mergeProps({
|
|
272
301
|
class: "p-image-action p-link",
|
|
273
302
|
onClick: _cache[3] || (_cache[3] = (...args) => ($options.rotateLeft && $options.rotateLeft(...args))),
|
|
274
303
|
type: "button",
|
|
275
304
|
"aria-label": $options.leftAriaLabel
|
|
276
|
-
}, [
|
|
305
|
+
}, _ctx.ptm('rotateLeftButton')), [
|
|
277
306
|
vue.renderSlot(_ctx.$slots, "undo", {}, () => [
|
|
278
|
-
vue.createVNode(_component_UndoIcon)
|
|
307
|
+
vue.createVNode(_component_UndoIcon, vue.normalizeProps(vue.guardReactiveProps(_ctx.ptm('rotateLeftIcon'))), null, 16)
|
|
279
308
|
])
|
|
280
|
-
],
|
|
281
|
-
vue.createElementVNode("button", {
|
|
282
|
-
class:
|
|
309
|
+
], 16, _hoisted_3),
|
|
310
|
+
vue.createElementVNode("button", vue.mergeProps({
|
|
311
|
+
class: ['p-image-action p-link', { 'p-disabled': $options.isZoomOutDisabled }],
|
|
283
312
|
onClick: _cache[4] || (_cache[4] = (...args) => ($options.zoomOut && $options.zoomOut(...args))),
|
|
284
313
|
type: "button",
|
|
285
|
-
disabled: $options.
|
|
314
|
+
disabled: $options.isZoomOutDisabled,
|
|
286
315
|
"aria-label": $options.zoomOutAriaLabel
|
|
287
|
-
}, [
|
|
316
|
+
}, _ctx.ptm('zoomOutButton')), [
|
|
288
317
|
vue.renderSlot(_ctx.$slots, "zoomout", {}, () => [
|
|
289
|
-
vue.createVNode(_component_SearchMinusIcon)
|
|
318
|
+
vue.createVNode(_component_SearchMinusIcon, vue.normalizeProps(vue.guardReactiveProps(_ctx.ptm('zoomOutIcon'))), null, 16)
|
|
290
319
|
])
|
|
291
|
-
],
|
|
292
|
-
vue.createElementVNode("button", {
|
|
293
|
-
class:
|
|
320
|
+
], 16, _hoisted_4),
|
|
321
|
+
vue.createElementVNode("button", vue.mergeProps({
|
|
322
|
+
class: ['p-image-action p-link', { 'p-disabled': $options.isZoomInDisabled }],
|
|
294
323
|
onClick: _cache[5] || (_cache[5] = (...args) => ($options.zoomIn && $options.zoomIn(...args))),
|
|
295
324
|
type: "button",
|
|
296
|
-
disabled: $options.
|
|
325
|
+
disabled: $options.isZoomInDisabled,
|
|
297
326
|
"aria-label": $options.zoomInAriaLabel
|
|
298
|
-
}, [
|
|
327
|
+
}, _ctx.ptm('zoomInButton')), [
|
|
299
328
|
vue.renderSlot(_ctx.$slots, "zoomin", {}, () => [
|
|
300
|
-
vue.createVNode(_component_SearchPlusIcon)
|
|
329
|
+
vue.createVNode(_component_SearchPlusIcon, vue.normalizeProps(vue.guardReactiveProps(_ctx.ptm('zoomInIcon'))), null, 16)
|
|
301
330
|
])
|
|
302
|
-
],
|
|
303
|
-
vue.createElementVNode("button", {
|
|
331
|
+
], 16, _hoisted_5),
|
|
332
|
+
vue.createElementVNode("button", vue.mergeProps({
|
|
304
333
|
class: "p-image-action p-link",
|
|
305
334
|
type: "button",
|
|
306
|
-
onClick: _cache[6] || (_cache[6] = (...args) => (
|
|
335
|
+
onClick: _cache[6] || (_cache[6] = (...args) => ($options.hidePreview && $options.hidePreview(...args))),
|
|
307
336
|
"aria-label": $options.closeAriaLabel,
|
|
308
337
|
autofocus: ""
|
|
309
|
-
}, [
|
|
338
|
+
}, _ctx.ptm('closeButton')), [
|
|
310
339
|
vue.renderSlot(_ctx.$slots, "close", {}, () => [
|
|
311
|
-
vue.createVNode(_component_TimesIcon)
|
|
340
|
+
vue.createVNode(_component_TimesIcon, vue.normalizeProps(vue.guardReactiveProps(_ctx.ptm('closeIcon'))), null, 16)
|
|
312
341
|
])
|
|
313
|
-
],
|
|
314
|
-
]),
|
|
342
|
+
], 16, _hoisted_6)
|
|
343
|
+
], 16),
|
|
315
344
|
vue.createVNode(vue.Transition, {
|
|
316
345
|
name: "p-image-preview",
|
|
317
346
|
onBeforeEnter: $options.onBeforeEnter,
|
|
@@ -322,26 +351,32 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
322
351
|
}, {
|
|
323
352
|
default: vue.withCtx(() => [
|
|
324
353
|
($data.previewVisible)
|
|
325
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
326
|
-
vue.
|
|
327
|
-
src: _ctx.$attrs.src,
|
|
354
|
+
? (vue.openBlock(), vue.createElementBlock("div", vue.normalizeProps(vue.mergeProps({ key: 0 }, _ctx.ptm('previewContainer'))), [
|
|
355
|
+
vue.renderSlot(_ctx.$slots, "preview", {
|
|
328
356
|
class: "p-image-preview",
|
|
329
357
|
style: vue.normalizeStyle($options.imagePreviewStyle),
|
|
330
|
-
onClick:
|
|
331
|
-
},
|
|
332
|
-
|
|
358
|
+
onClick: $options.onPreviewImageClick
|
|
359
|
+
}, () => [
|
|
360
|
+
vue.createElementVNode("img", vue.mergeProps({
|
|
361
|
+
src: _ctx.$attrs.src,
|
|
362
|
+
class: "p-image-preview",
|
|
363
|
+
style: $options.imagePreviewStyle,
|
|
364
|
+
onClick: _cache[7] || (_cache[7] = (...args) => ($options.onPreviewImageClick && $options.onPreviewImageClick(...args)))
|
|
365
|
+
}, _ctx.ptm('preview')), null, 16, _hoisted_7)
|
|
366
|
+
])
|
|
367
|
+
], 16))
|
|
333
368
|
: vue.createCommentVNode("", true)
|
|
334
369
|
]),
|
|
335
|
-
_:
|
|
370
|
+
_: 3
|
|
336
371
|
}, 8, ["onBeforeEnter", "onEnter", "onLeave", "onBeforeLeave", "onAfterLeave"])
|
|
337
|
-
],
|
|
372
|
+
], 16, _hoisted_1)), [
|
|
338
373
|
[_directive_focustrap]
|
|
339
374
|
])
|
|
340
375
|
: vue.createCommentVNode("", true)
|
|
341
376
|
]),
|
|
342
377
|
_: 3
|
|
343
378
|
})
|
|
344
|
-
],
|
|
379
|
+
], 16))
|
|
345
380
|
}
|
|
346
381
|
|
|
347
382
|
function styleInject(css, ref) {
|
package/image/image.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/
|
|
1
|
+
"use strict";var e=require("primevue/basecomponent"),t=require("primevue/focustrap"),o=require("primevue/icons/eye"),i=require("primevue/icons/refresh"),r=require("primevue/icons/searchminus"),a=require("primevue/icons/searchplus"),n=require("primevue/icons/times"),l=require("primevue/icons/undo"),s=require("primevue/portal"),c=require("primevue/utils"),m=require("vue");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=p(e),d=p(t),v=p(o),h=p(i),g=p(r),f=p(a),b=p(n),k=p(l),y=p(s),w={name:"Image",extends:u.default,inheritAttrs:!1,emits:["show","hide","error"],props:{preview:{type:Boolean,default:!1},class:{type:null,default:null},style:{type:null,default:null},imageStyle:{type:null,default:null},imageClass:{type:null,default:null},previewButtonProps:{type:null,default:null},indicatorIcon:{type:String,default:void 0},zoomInDisabled:{type:Boolean,default:!1},zoomOutDisabled:{type:Boolean,default:!1}},mask:null,data:()=>({maskVisible:!1,previewVisible:!1,rotate:0,scale:1}),beforeUnmount(){this.mask&&c.ZIndexUtils.clear(this.container)},methods:{maskRef(e){this.mask=e},toolbarRef(e){this.toolbarRef=e},onImageClick(){this.preview&&(this.maskVisible=!0,setTimeout((()=>{this.previewVisible=!0}),25))},onPreviewImageClick(){this.previewClick=!0},onMaskClick(e){[e.target.classList].includes("p-image-action")||e.target.closest(".p-image-action")||(this.previewClick||(this.previewVisible=!1,this.rotate=0,this.scale=1),this.previewClick=!1)},onMaskKeydown(e){if("Escape"===e.code)this.onMaskClick(),setTimeout((()=>{c.DomHandler.focus(this.$refs.previewButton)}),25),e.preventDefault()},onError(){this.$emit("error")},rotateRight(){this.rotate+=90,this.previewClick=!0},rotateLeft(){this.rotate-=90,this.previewClick=!0},zoomIn(){this.scale=this.scale+.1,this.previewClick=!0},zoomOut(){this.scale=this.scale-.1,this.previewClick=!0},onBeforeEnter(){c.ZIndexUtils.set("modal",this.mask,this.$primevue.config.zIndex.modal)},onEnter(){this.focus(),this.$emit("show")},onBeforeLeave(){c.DomHandler.addClass(this.mask,"p-component-overlay-leave")},onLeave(){this.$emit("hide")},onAfterLeave(e){c.ZIndexUtils.clear(e),this.maskVisible=!1},focus(){let e=this.mask.querySelector("[autofocus]");e&&e.focus()},hidePreview(){this.previewVisible=!1,this.rotate=0,this.scale=1}},computed:{containerClass(){return["p-image p-component",this.class,{"p-image-preview-container":this.preview}]},maskClass:()=>["p-image-mask p-component-overlay p-component-overlay-enter"],rotateClass(){return"p-image-preview-rotate-"+this.rotate},imagePreviewStyle(){return{transform:"rotate("+this.rotate+"deg) scale("+this.scale+")"}},isZoomInDisabled(){return this.zoomInDisabled||this.scale>=1.5},isZoomOutDisabled(){return this.zoomOutDisabled||this.scale<=.5},rightAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.rotateRight:void 0},leftAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.rotateLeft:void 0},zoomInAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.zoomIn:void 0},zoomOutAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.zoomOut:void 0},closeAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},components:{Portal:y.default,EyeIcon:v.default,RefreshIcon:h.default,UndoIcon:k.default,SearchMinusIcon:g.default,SearchPlusIcon:f.default,TimesIcon:b.default},directives:{focustrap:d.default}};const C=["aria-modal"],I=["aria-label"],P=["aria-label"],z=["disabled","aria-label"],B=["disabled","aria-label"],E=["aria-label"],L=["src"];!function(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===o&&i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}("\n.p-image-mask {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.p-image-preview-container {\n position: relative;\n display: inline-block;\n}\n.p-image-preview-indicator {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0;\n transition: opacity 0.3s;\n}\n.p-image-preview-container:hover > .p-image-preview-indicator {\n opacity: 1;\n cursor: pointer;\n}\n.p-image-preview-container > img {\n cursor: pointer;\n}\n.p-image-toolbar {\n position: absolute;\n top: 0;\n right: 0;\n display: flex;\n}\n.p-image-action.p-link {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.p-image-preview {\n transition: transform 0.15s;\n max-width: 100vw;\n max-height: 100vh;\n}\n.p-image-preview-enter-active {\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n}\n.p-image-preview-leave-active {\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n.p-image-preview-enter-from,\n.p-image-preview-leave-to {\n opacity: 0;\n transform: scale(0.7);\n}\n"),w.render=function(e,t,o,i,r,a){const n=m.resolveComponent("RefreshIcon"),l=m.resolveComponent("UndoIcon"),s=m.resolveComponent("SearchMinusIcon"),c=m.resolveComponent("SearchPlusIcon"),p=m.resolveComponent("TimesIcon"),u=m.resolveComponent("Portal"),d=m.resolveDirective("focustrap");return m.openBlock(),m.createElementBlock("span",m.mergeProps({class:a.containerClass,style:o.style},e.ptm("root")),[m.renderSlot(e.$slots,"image",{class:m.normalizeClass(o.imageClass),style:m.normalizeStyle(o.imageStyle),onError:a.onError},(()=>[m.createElementVNode("img",m.mergeProps({style:o.imageStyle,class:o.imageClass,onError:t[0]||(t[0]=(...e)=>a.onError&&a.onError(...e))},{...e.$attrs,...e.ptm("image")}),null,16)])),o.preview?(m.openBlock(),m.createElementBlock("button",m.mergeProps({key:0,ref:"previewButton",class:"p-image-preview-indicator",onClick:t[1]||(t[1]=(...e)=>a.onImageClick&&a.onImageClick(...e))},{...o.previewButtonProps,...e.ptm("button")}),[m.renderSlot(e.$slots,"indicatoricon",{},(()=>[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(o.indicatorIcon?"i":"EyeIcon"),m.mergeProps({class:"p-image-preview-icon"},e.ptm("icon")),null,16))]))],16)):m.createCommentVNode("",!0),m.createVNode(u,null,{default:m.withCtx((()=>[r.maskVisible?m.withDirectives((m.openBlock(),m.createElementBlock("div",m.mergeProps({key:0,ref:a.maskRef,role:"dialog",class:a.maskClass,"aria-modal":r.maskVisible,onClick:t[8]||(t[8]=(...e)=>a.onMaskClick&&a.onMaskClick(...e)),onKeydown:t[9]||(t[9]=(...e)=>a.onMaskKeydown&&a.onMaskKeydown(...e))},e.ptm("mask")),[m.createElementVNode("div",m.mergeProps({class:"p-image-toolbar"},e.ptm("toolbar")),[m.createElementVNode("button",m.mergeProps({class:"p-image-action p-link",onClick:t[2]||(t[2]=(...e)=>a.rotateRight&&a.rotateRight(...e)),type:"button","aria-label":a.rightAriaLabel},e.ptm("rotateRightButton")),[m.renderSlot(e.$slots,"refresh",{},(()=>[m.createVNode(n,m.normalizeProps(m.guardReactiveProps(e.ptm("rotateRightIcon"))),null,16)]))],16,I),m.createElementVNode("button",m.mergeProps({class:"p-image-action p-link",onClick:t[3]||(t[3]=(...e)=>a.rotateLeft&&a.rotateLeft(...e)),type:"button","aria-label":a.leftAriaLabel},e.ptm("rotateLeftButton")),[m.renderSlot(e.$slots,"undo",{},(()=>[m.createVNode(l,m.normalizeProps(m.guardReactiveProps(e.ptm("rotateLeftIcon"))),null,16)]))],16,P),m.createElementVNode("button",m.mergeProps({class:["p-image-action p-link",{"p-disabled":a.isZoomOutDisabled}],onClick:t[4]||(t[4]=(...e)=>a.zoomOut&&a.zoomOut(...e)),type:"button",disabled:a.isZoomOutDisabled,"aria-label":a.zoomOutAriaLabel},e.ptm("zoomOutButton")),[m.renderSlot(e.$slots,"zoomout",{},(()=>[m.createVNode(s,m.normalizeProps(m.guardReactiveProps(e.ptm("zoomOutIcon"))),null,16)]))],16,z),m.createElementVNode("button",m.mergeProps({class:["p-image-action p-link",{"p-disabled":a.isZoomInDisabled}],onClick:t[5]||(t[5]=(...e)=>a.zoomIn&&a.zoomIn(...e)),type:"button",disabled:a.isZoomInDisabled,"aria-label":a.zoomInAriaLabel},e.ptm("zoomInButton")),[m.renderSlot(e.$slots,"zoomin",{},(()=>[m.createVNode(c,m.normalizeProps(m.guardReactiveProps(e.ptm("zoomInIcon"))),null,16)]))],16,B),m.createElementVNode("button",m.mergeProps({class:"p-image-action p-link",type:"button",onClick:t[6]||(t[6]=(...e)=>a.hidePreview&&a.hidePreview(...e)),"aria-label":a.closeAriaLabel,autofocus:""},e.ptm("closeButton")),[m.renderSlot(e.$slots,"close",{},(()=>[m.createVNode(p,m.normalizeProps(m.guardReactiveProps(e.ptm("closeIcon"))),null,16)]))],16,E)],16),m.createVNode(m.Transition,{name:"p-image-preview",onBeforeEnter:a.onBeforeEnter,onEnter:a.onEnter,onLeave:a.onLeave,onBeforeLeave:a.onBeforeLeave,onAfterLeave:a.onAfterLeave},{default:m.withCtx((()=>[r.previewVisible?(m.openBlock(),m.createElementBlock("div",m.normalizeProps(m.mergeProps({key:0},e.ptm("previewContainer"))),[m.renderSlot(e.$slots,"preview",{class:"p-image-preview",style:m.normalizeStyle(a.imagePreviewStyle),onClick:a.onPreviewImageClick},(()=>[m.createElementVNode("img",m.mergeProps({src:e.$attrs.src,class:"p-image-preview",style:a.imagePreviewStyle,onClick:t[7]||(t[7]=(...e)=>a.onPreviewImageClick&&a.onPreviewImageClick(...e))},e.ptm("preview")),null,16,L)]))],16)):m.createCommentVNode("",!0)])),_:3},8,["onBeforeEnter","onEnter","onLeave","onBeforeLeave","onAfterLeave"])],16,C)),[[d]]):m.createCommentVNode("",!0)])),_:3})],16)},module.exports=w;
|
package/image/image.esm.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import BaseComponent from 'primevue/basecomponent';
|
|
1
2
|
import FocusTrap from 'primevue/focustrap';
|
|
2
3
|
import EyeIcon from 'primevue/icons/eye';
|
|
3
4
|
import RefreshIcon from 'primevue/icons/refresh';
|
|
@@ -7,10 +8,11 @@ import TimesIcon from 'primevue/icons/times';
|
|
|
7
8
|
import UndoIcon from 'primevue/icons/undo';
|
|
8
9
|
import Portal from 'primevue/portal';
|
|
9
10
|
import { ZIndexUtils, DomHandler } from 'primevue/utils';
|
|
10
|
-
import { resolveComponent, resolveDirective, openBlock, createElementBlock,
|
|
11
|
+
import { resolveComponent, resolveDirective, openBlock, createElementBlock, mergeProps, renderSlot, normalizeClass, normalizeStyle, createElementVNode, createBlock, resolveDynamicComponent, createCommentVNode, createVNode, withCtx, withDirectives, normalizeProps, guardReactiveProps, Transition } from 'vue';
|
|
11
12
|
|
|
12
13
|
var script = {
|
|
13
14
|
name: 'Image',
|
|
15
|
+
extends: BaseComponent,
|
|
14
16
|
inheritAttrs: false,
|
|
15
17
|
emits: ['show', 'hide', 'error'],
|
|
16
18
|
props: {
|
|
@@ -41,6 +43,14 @@ var script = {
|
|
|
41
43
|
indicatorIcon: {
|
|
42
44
|
type: String,
|
|
43
45
|
default: undefined
|
|
46
|
+
},
|
|
47
|
+
zoomInDisabled: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: false
|
|
50
|
+
},
|
|
51
|
+
zoomOutDisabled: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
default: false
|
|
44
54
|
}
|
|
45
55
|
},
|
|
46
56
|
mask: null,
|
|
@@ -75,7 +85,13 @@ var script = {
|
|
|
75
85
|
onPreviewImageClick() {
|
|
76
86
|
this.previewClick = true;
|
|
77
87
|
},
|
|
78
|
-
onMaskClick() {
|
|
88
|
+
onMaskClick(event) {
|
|
89
|
+
const isActionbarTarget = [event.target.classList].includes('p-image-action') || event.target.closest('.p-image-action');
|
|
90
|
+
|
|
91
|
+
if (isActionbarTarget) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
|
|
79
95
|
if (!this.previewClick) {
|
|
80
96
|
this.previewVisible = false;
|
|
81
97
|
this.rotate = 0;
|
|
@@ -138,6 +154,11 @@ var script = {
|
|
|
138
154
|
if (focusTarget) {
|
|
139
155
|
focusTarget.focus();
|
|
140
156
|
}
|
|
157
|
+
},
|
|
158
|
+
hidePreview() {
|
|
159
|
+
this.previewVisible = false;
|
|
160
|
+
this.rotate = 0;
|
|
161
|
+
this.scale = 1;
|
|
141
162
|
}
|
|
142
163
|
},
|
|
143
164
|
computed: {
|
|
@@ -159,8 +180,11 @@ var script = {
|
|
|
159
180
|
imagePreviewStyle() {
|
|
160
181
|
return { transform: 'rotate(' + this.rotate + 'deg) scale(' + this.scale + ')' };
|
|
161
182
|
},
|
|
162
|
-
|
|
163
|
-
return this.
|
|
183
|
+
isZoomInDisabled() {
|
|
184
|
+
return this.zoomInDisabled || this.scale >= 1.5;
|
|
185
|
+
},
|
|
186
|
+
isZoomOutDisabled() {
|
|
187
|
+
return this.zoomOutDisabled || this.scale <= 0.5;
|
|
164
188
|
},
|
|
165
189
|
rightAriaLabel() {
|
|
166
190
|
return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.rotateRight : undefined;
|
|
@@ -193,14 +217,12 @@ var script = {
|
|
|
193
217
|
};
|
|
194
218
|
|
|
195
219
|
const _hoisted_1 = ["aria-modal"];
|
|
196
|
-
const _hoisted_2 =
|
|
220
|
+
const _hoisted_2 = ["aria-label"];
|
|
197
221
|
const _hoisted_3 = ["aria-label"];
|
|
198
|
-
const _hoisted_4 = ["aria-label"];
|
|
222
|
+
const _hoisted_4 = ["disabled", "aria-label"];
|
|
199
223
|
const _hoisted_5 = ["disabled", "aria-label"];
|
|
200
|
-
const _hoisted_6 = ["
|
|
201
|
-
const _hoisted_7 = ["
|
|
202
|
-
const _hoisted_8 = { key: 0 };
|
|
203
|
-
const _hoisted_9 = ["src"];
|
|
224
|
+
const _hoisted_6 = ["aria-label"];
|
|
225
|
+
const _hoisted_7 = ["src"];
|
|
204
226
|
|
|
205
227
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
206
228
|
const _component_RefreshIcon = resolveComponent("RefreshIcon");
|
|
@@ -211,94 +233,100 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
211
233
|
const _component_Portal = resolveComponent("Portal");
|
|
212
234
|
const _directive_focustrap = resolveDirective("focustrap");
|
|
213
235
|
|
|
214
|
-
return (openBlock(), createElementBlock("span", {
|
|
215
|
-
class:
|
|
216
|
-
style:
|
|
217
|
-
}, [
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
onError:
|
|
222
|
-
}
|
|
236
|
+
return (openBlock(), createElementBlock("span", mergeProps({
|
|
237
|
+
class: $options.containerClass,
|
|
238
|
+
style: $props.style
|
|
239
|
+
}, _ctx.ptm('root')), [
|
|
240
|
+
renderSlot(_ctx.$slots, "image", {
|
|
241
|
+
class: normalizeClass($props.imageClass),
|
|
242
|
+
style: normalizeStyle($props.imageStyle),
|
|
243
|
+
onError: $options.onError
|
|
244
|
+
}, () => [
|
|
245
|
+
createElementVNode("img", mergeProps({
|
|
246
|
+
style: $props.imageStyle,
|
|
247
|
+
class: $props.imageClass,
|
|
248
|
+
onError: _cache[0] || (_cache[0] = (...args) => ($options.onError && $options.onError(...args)))
|
|
249
|
+
}, { ..._ctx.$attrs, ..._ctx.ptm('image') }), null, 16)
|
|
250
|
+
]),
|
|
223
251
|
($props.preview)
|
|
224
252
|
? (openBlock(), createElementBlock("button", mergeProps({
|
|
225
253
|
key: 0,
|
|
226
254
|
ref: "previewButton",
|
|
227
255
|
class: "p-image-preview-indicator",
|
|
228
256
|
onClick: _cache[1] || (_cache[1] = (...args) => ($options.onImageClick && $options.onImageClick(...args)))
|
|
229
|
-
},
|
|
257
|
+
}, { ...$props.previewButtonProps, ..._ctx.ptm('button') }), [
|
|
230
258
|
renderSlot(_ctx.$slots, "indicatoricon", {}, () => [
|
|
231
|
-
(openBlock(), createBlock(resolveDynamicComponent($props.indicatorIcon ? 'i' : 'EyeIcon'), { class: "p-image-preview-icon" }))
|
|
259
|
+
(openBlock(), createBlock(resolveDynamicComponent($props.indicatorIcon ? 'i' : 'EyeIcon'), mergeProps({ class: "p-image-preview-icon" }, _ctx.ptm('icon')), null, 16))
|
|
232
260
|
])
|
|
233
261
|
], 16))
|
|
234
262
|
: createCommentVNode("", true),
|
|
235
263
|
createVNode(_component_Portal, null, {
|
|
236
264
|
default: withCtx(() => [
|
|
237
265
|
($data.maskVisible)
|
|
238
|
-
? withDirectives((openBlock(), createElementBlock("div", {
|
|
266
|
+
? withDirectives((openBlock(), createElementBlock("div", mergeProps({
|
|
239
267
|
key: 0,
|
|
240
268
|
ref: $options.maskRef,
|
|
241
269
|
role: "dialog",
|
|
242
|
-
class:
|
|
270
|
+
class: $options.maskClass,
|
|
243
271
|
"aria-modal": $data.maskVisible,
|
|
244
272
|
onClick: _cache[8] || (_cache[8] = (...args) => ($options.onMaskClick && $options.onMaskClick(...args))),
|
|
245
273
|
onKeydown: _cache[9] || (_cache[9] = (...args) => ($options.onMaskKeydown && $options.onMaskKeydown(...args)))
|
|
246
|
-
}, [
|
|
247
|
-
createElementVNode("div",
|
|
248
|
-
createElementVNode("button", {
|
|
274
|
+
}, _ctx.ptm('mask')), [
|
|
275
|
+
createElementVNode("div", mergeProps({ class: "p-image-toolbar" }, _ctx.ptm('toolbar')), [
|
|
276
|
+
createElementVNode("button", mergeProps({
|
|
249
277
|
class: "p-image-action p-link",
|
|
250
278
|
onClick: _cache[2] || (_cache[2] = (...args) => ($options.rotateRight && $options.rotateRight(...args))),
|
|
251
279
|
type: "button",
|
|
252
280
|
"aria-label": $options.rightAriaLabel
|
|
253
|
-
}, [
|
|
281
|
+
}, _ctx.ptm('rotateRightButton')), [
|
|
254
282
|
renderSlot(_ctx.$slots, "refresh", {}, () => [
|
|
255
|
-
createVNode(_component_RefreshIcon)
|
|
283
|
+
createVNode(_component_RefreshIcon, normalizeProps(guardReactiveProps(_ctx.ptm('rotateRightIcon'))), null, 16)
|
|
256
284
|
])
|
|
257
|
-
],
|
|
258
|
-
createElementVNode("button", {
|
|
285
|
+
], 16, _hoisted_2),
|
|
286
|
+
createElementVNode("button", mergeProps({
|
|
259
287
|
class: "p-image-action p-link",
|
|
260
288
|
onClick: _cache[3] || (_cache[3] = (...args) => ($options.rotateLeft && $options.rotateLeft(...args))),
|
|
261
289
|
type: "button",
|
|
262
290
|
"aria-label": $options.leftAriaLabel
|
|
263
|
-
}, [
|
|
291
|
+
}, _ctx.ptm('rotateLeftButton')), [
|
|
264
292
|
renderSlot(_ctx.$slots, "undo", {}, () => [
|
|
265
|
-
createVNode(_component_UndoIcon)
|
|
293
|
+
createVNode(_component_UndoIcon, normalizeProps(guardReactiveProps(_ctx.ptm('rotateLeftIcon'))), null, 16)
|
|
266
294
|
])
|
|
267
|
-
],
|
|
268
|
-
createElementVNode("button", {
|
|
269
|
-
class:
|
|
295
|
+
], 16, _hoisted_3),
|
|
296
|
+
createElementVNode("button", mergeProps({
|
|
297
|
+
class: ['p-image-action p-link', { 'p-disabled': $options.isZoomOutDisabled }],
|
|
270
298
|
onClick: _cache[4] || (_cache[4] = (...args) => ($options.zoomOut && $options.zoomOut(...args))),
|
|
271
299
|
type: "button",
|
|
272
|
-
disabled: $options.
|
|
300
|
+
disabled: $options.isZoomOutDisabled,
|
|
273
301
|
"aria-label": $options.zoomOutAriaLabel
|
|
274
|
-
}, [
|
|
302
|
+
}, _ctx.ptm('zoomOutButton')), [
|
|
275
303
|
renderSlot(_ctx.$slots, "zoomout", {}, () => [
|
|
276
|
-
createVNode(_component_SearchMinusIcon)
|
|
304
|
+
createVNode(_component_SearchMinusIcon, normalizeProps(guardReactiveProps(_ctx.ptm('zoomOutIcon'))), null, 16)
|
|
277
305
|
])
|
|
278
|
-
],
|
|
279
|
-
createElementVNode("button", {
|
|
280
|
-
class:
|
|
306
|
+
], 16, _hoisted_4),
|
|
307
|
+
createElementVNode("button", mergeProps({
|
|
308
|
+
class: ['p-image-action p-link', { 'p-disabled': $options.isZoomInDisabled }],
|
|
281
309
|
onClick: _cache[5] || (_cache[5] = (...args) => ($options.zoomIn && $options.zoomIn(...args))),
|
|
282
310
|
type: "button",
|
|
283
|
-
disabled: $options.
|
|
311
|
+
disabled: $options.isZoomInDisabled,
|
|
284
312
|
"aria-label": $options.zoomInAriaLabel
|
|
285
|
-
}, [
|
|
313
|
+
}, _ctx.ptm('zoomInButton')), [
|
|
286
314
|
renderSlot(_ctx.$slots, "zoomin", {}, () => [
|
|
287
|
-
createVNode(_component_SearchPlusIcon)
|
|
315
|
+
createVNode(_component_SearchPlusIcon, normalizeProps(guardReactiveProps(_ctx.ptm('zoomInIcon'))), null, 16)
|
|
288
316
|
])
|
|
289
|
-
],
|
|
290
|
-
createElementVNode("button", {
|
|
317
|
+
], 16, _hoisted_5),
|
|
318
|
+
createElementVNode("button", mergeProps({
|
|
291
319
|
class: "p-image-action p-link",
|
|
292
320
|
type: "button",
|
|
293
|
-
onClick: _cache[6] || (_cache[6] = (...args) => (
|
|
321
|
+
onClick: _cache[6] || (_cache[6] = (...args) => ($options.hidePreview && $options.hidePreview(...args))),
|
|
294
322
|
"aria-label": $options.closeAriaLabel,
|
|
295
323
|
autofocus: ""
|
|
296
|
-
}, [
|
|
324
|
+
}, _ctx.ptm('closeButton')), [
|
|
297
325
|
renderSlot(_ctx.$slots, "close", {}, () => [
|
|
298
|
-
createVNode(_component_TimesIcon)
|
|
326
|
+
createVNode(_component_TimesIcon, normalizeProps(guardReactiveProps(_ctx.ptm('closeIcon'))), null, 16)
|
|
299
327
|
])
|
|
300
|
-
],
|
|
301
|
-
]),
|
|
328
|
+
], 16, _hoisted_6)
|
|
329
|
+
], 16),
|
|
302
330
|
createVNode(Transition, {
|
|
303
331
|
name: "p-image-preview",
|
|
304
332
|
onBeforeEnter: $options.onBeforeEnter,
|
|
@@ -309,26 +337,32 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
309
337
|
}, {
|
|
310
338
|
default: withCtx(() => [
|
|
311
339
|
($data.previewVisible)
|
|
312
|
-
? (openBlock(), createElementBlock("div",
|
|
313
|
-
|
|
314
|
-
src: _ctx.$attrs.src,
|
|
340
|
+
? (openBlock(), createElementBlock("div", normalizeProps(mergeProps({ key: 0 }, _ctx.ptm('previewContainer'))), [
|
|
341
|
+
renderSlot(_ctx.$slots, "preview", {
|
|
315
342
|
class: "p-image-preview",
|
|
316
343
|
style: normalizeStyle($options.imagePreviewStyle),
|
|
317
|
-
onClick:
|
|
318
|
-
},
|
|
319
|
-
|
|
344
|
+
onClick: $options.onPreviewImageClick
|
|
345
|
+
}, () => [
|
|
346
|
+
createElementVNode("img", mergeProps({
|
|
347
|
+
src: _ctx.$attrs.src,
|
|
348
|
+
class: "p-image-preview",
|
|
349
|
+
style: $options.imagePreviewStyle,
|
|
350
|
+
onClick: _cache[7] || (_cache[7] = (...args) => ($options.onPreviewImageClick && $options.onPreviewImageClick(...args)))
|
|
351
|
+
}, _ctx.ptm('preview')), null, 16, _hoisted_7)
|
|
352
|
+
])
|
|
353
|
+
], 16))
|
|
320
354
|
: createCommentVNode("", true)
|
|
321
355
|
]),
|
|
322
|
-
_:
|
|
356
|
+
_: 3
|
|
323
357
|
}, 8, ["onBeforeEnter", "onEnter", "onLeave", "onBeforeLeave", "onAfterLeave"])
|
|
324
|
-
],
|
|
358
|
+
], 16, _hoisted_1)), [
|
|
325
359
|
[_directive_focustrap]
|
|
326
360
|
])
|
|
327
361
|
: createCommentVNode("", true)
|
|
328
362
|
]),
|
|
329
363
|
_: 3
|
|
330
364
|
})
|
|
331
|
-
],
|
|
365
|
+
], 16))
|
|
332
366
|
}
|
|
333
367
|
|
|
334
368
|
function styleInject(css, ref) {
|