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/rating/rating.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/icons/ban"),
|
|
1
|
+
"use strict";var e=require("primevue/basecomponent"),n=require("primevue/icons/ban"),t=require("primevue/icons/star"),o=require("primevue/icons/starfill"),a=require("primevue/utils"),l=require("vue");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=i(e),c=i(n),s=i(t),d=i(o),p={name:"Rating",extends:r.default,emits:["update:modelValue","change","focus","blur"],props:{modelValue:{type:Number,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},stars:{type:Number,default:5},cancel:{type:Boolean,default:!0},onIcon:{type:String,default:void 0},offIcon:{type:String,default:void 0},cancelIcon:{type:String,default:void 0}},data(){return{name:this.$attrs.name,focusedOptionIndex:-1}},watch:{"$attrs.name":function(e){this.name=e||a.UniqueComponentId()}},mounted(){this.name=this.name||a.UniqueComponentId()},methods:{getPTOptions(e,n){return this.ptm(n,{context:{active:e<=this.modelValue,focused:e===this.focusedOptionIndex}})},onOptionClick(e,n){if(!this.readonly&&!this.disabled){this.onOptionSelect(e,n);const t=a.DomHandler.getFirstFocusableElement(e.currentTarget);t&&a.DomHandler.focus(t)}},onFocus(e,n){this.focusedOptionIndex=n,this.$emit("focus",e)},onBlur(e){this.focusedOptionIndex=-1,this.$emit("blur",e)},onChange(e,n){this.onOptionSelect(e,n)},onOptionSelect(e,n){this.focusedOptionIndex=n,this.updateModel(e,n||null)},updateModel(e,n){this.$emit("update:modelValue",n),this.$emit("change",{originalEvent:e,value:n})},cancelAriaLabel(){return this.$primevue.config.locale.clear},starAriaLabel(e){return 1===e?this.$primevue.config.locale.aria.star:this.$primevue.config.locale.aria.stars.replace(/{star}/g,e)}},computed:{containerClass(){return["p-rating",{"p-readonly":this.readonly,"p-disabled":this.disabled}]}},components:{StarFillIcon:d.default,StarIcon:s.default,BanIcon:c.default}};const u=["name","checked","disabled","readonly","aria-label"],m=["onClick"],f=["value","name","checked","disabled","readonly","aria-label","onFocus","onChange"];!function(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===t&&o.firstChild?o.insertBefore(a,o.firstChild):o.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}("\n.p-rating {\n position: relative;\n display: flex;\n align-items: center;\n}\n.p-rating-item {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n}\n.p-rating.p-readonly .p-rating-item {\n cursor: default;\n}\n"),p.render=function(e,n,t,o,a,i){return l.openBlock(),l.createElementBlock("div",l.mergeProps({class:i.containerClass},e.ptm("root")),[t.cancel?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,class:["p-rating-item p-rating-cancel-item",{"p-focus":0===a.focusedOptionIndex}],onClick:n[3]||(n[3]=e=>i.onOptionClick(e,0))},e.ptm("cancelItem")),[l.createElementVNode("span",l.mergeProps({class:"p-hidden-accessible"},e.ptm("hiddenCancelInputWrapper")),[l.createElementVNode("input",l.mergeProps({type:"radio",value:"0",name:a.name,checked:0===t.modelValue,disabled:t.disabled,readonly:t.readonly,"aria-label":i.cancelAriaLabel(),onFocus:n[0]||(n[0]=e=>i.onFocus(e,0)),onBlur:n[1]||(n[1]=(...e)=>i.onBlur&&i.onBlur(...e)),onChange:n[2]||(n[2]=e=>i.onChange(e,0))},e.ptm("hiddenCancelInput")),null,16,u)],16),l.renderSlot(e.$slots,"cancelicon",{},(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(t.cancelIcon?"span":"BanIcon"),l.mergeProps({class:["p-rating-icon p-rating-cancel",t.cancelIcon]},e.ptm("cancelIcon")),null,16,["class"]))]))],16)):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.stars,(o=>(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:o,class:["p-rating-item",{"p-rating-item-active":o<=t.modelValue,"p-focus":o===a.focusedOptionIndex}],onClick:e=>i.onOptionClick(e,o)},i.getPTOptions(o,"item")),[l.createElementVNode("span",l.mergeProps({class:"p-hidden-accessible"},e.ptm("hiddenItemInputWrapper")),[l.createElementVNode("input",l.mergeProps({type:"radio",value:o,name:a.name,checked:t.modelValue===o,disabled:t.disabled,readonly:t.readonly,"aria-label":i.starAriaLabel(o),onFocus:e=>i.onFocus(e,o),onBlur:n[4]||(n[4]=(...e)=>i.onBlur&&i.onBlur(...e)),onChange:e=>i.onChange(e,o)},e.ptm("hiddenItemInput")),null,16,f)],16),o<=t.modelValue?l.renderSlot(e.$slots,"onicon",{key:0,value:o},(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(t.onIcon?"span":"StarFillIcon"),l.mergeProps({class:["p-rating-icon",t.onIcon]},e.ptm("onIcon")),null,16,["class"]))])):l.renderSlot(e.$slots,"officon",{key:1,value:o},(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(t.offIcon?"span":"StarIcon"),l.mergeProps({class:["p-rating-icon",t.offIcon]},e.ptm("offIcon")),null,16,["class"]))]))],16,m)))),128))],16)},module.exports=p;
|
package/rating/rating.esm.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
import BaseComponent from 'primevue/basecomponent';
|
|
1
2
|
import BanIcon from 'primevue/icons/ban';
|
|
2
3
|
import StarIcon from 'primevue/icons/star';
|
|
3
4
|
import StarFillIcon from 'primevue/icons/starfill';
|
|
4
5
|
import { UniqueComponentId, DomHandler } from 'primevue/utils';
|
|
5
|
-
import { openBlock, createElementBlock,
|
|
6
|
+
import { openBlock, createElementBlock, mergeProps, createElementVNode, renderSlot, createBlock, resolveDynamicComponent, createCommentVNode, Fragment, renderList } from 'vue';
|
|
6
7
|
|
|
7
8
|
var script = {
|
|
8
9
|
name: 'Rating',
|
|
10
|
+
extends: BaseComponent,
|
|
9
11
|
emits: ['update:modelValue', 'change', 'focus', 'blur'],
|
|
10
12
|
props: {
|
|
11
13
|
modelValue: {
|
|
@@ -56,6 +58,14 @@ var script = {
|
|
|
56
58
|
this.name = this.name || UniqueComponentId();
|
|
57
59
|
},
|
|
58
60
|
methods: {
|
|
61
|
+
getPTOptions(value, key) {
|
|
62
|
+
return this.ptm(key, {
|
|
63
|
+
context: {
|
|
64
|
+
active: value <= this.modelValue,
|
|
65
|
+
focused: value === this.focusedOptionIndex
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
},
|
|
59
69
|
onOptionClick(event, value) {
|
|
60
70
|
if (!this.readonly && !this.disabled) {
|
|
61
71
|
this.onOptionSelect(event, value);
|
|
@@ -108,24 +118,20 @@ var script = {
|
|
|
108
118
|
}
|
|
109
119
|
};
|
|
110
120
|
|
|
111
|
-
const _hoisted_1 =
|
|
112
|
-
const _hoisted_2 = ["
|
|
113
|
-
const _hoisted_3 = ["
|
|
114
|
-
const _hoisted_4 = { class: "p-hidden-accessible" };
|
|
115
|
-
const _hoisted_5 = ["value", "name", "checked", "disabled", "readonly", "aria-label", "onFocus", "onChange"];
|
|
121
|
+
const _hoisted_1 = ["name", "checked", "disabled", "readonly", "aria-label"];
|
|
122
|
+
const _hoisted_2 = ["onClick"];
|
|
123
|
+
const _hoisted_3 = ["value", "name", "checked", "disabled", "readonly", "aria-label", "onFocus", "onChange"];
|
|
116
124
|
|
|
117
125
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
118
|
-
return (openBlock(), createElementBlock("div", {
|
|
119
|
-
class: normalizeClass($options.containerClass)
|
|
120
|
-
}, [
|
|
126
|
+
return (openBlock(), createElementBlock("div", mergeProps({ class: $options.containerClass }, _ctx.ptm('root')), [
|
|
121
127
|
($props.cancel)
|
|
122
|
-
? (openBlock(), createElementBlock("div", {
|
|
128
|
+
? (openBlock(), createElementBlock("div", mergeProps({
|
|
123
129
|
key: 0,
|
|
124
|
-
class:
|
|
130
|
+
class: ['p-rating-item p-rating-cancel-item', { 'p-focus': $data.focusedOptionIndex === 0 }],
|
|
125
131
|
onClick: _cache[3] || (_cache[3] = $event => ($options.onOptionClick($event, 0)))
|
|
126
|
-
}, [
|
|
127
|
-
createElementVNode("span",
|
|
128
|
-
createElementVNode("input", {
|
|
132
|
+
}, _ctx.ptm('cancelItem')), [
|
|
133
|
+
createElementVNode("span", mergeProps({ class: "p-hidden-accessible" }, _ctx.ptm('hiddenCancelInputWrapper')), [
|
|
134
|
+
createElementVNode("input", mergeProps({
|
|
129
135
|
type: "radio",
|
|
130
136
|
value: "0",
|
|
131
137
|
name: $data.name,
|
|
@@ -136,23 +142,23 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
136
142
|
onFocus: _cache[0] || (_cache[0] = $event => ($options.onFocus($event, 0))),
|
|
137
143
|
onBlur: _cache[1] || (_cache[1] = (...args) => ($options.onBlur && $options.onBlur(...args))),
|
|
138
144
|
onChange: _cache[2] || (_cache[2] = $event => ($options.onChange($event, 0)))
|
|
139
|
-
}, null,
|
|
140
|
-
]),
|
|
145
|
+
}, _ctx.ptm('hiddenCancelInput')), null, 16, _hoisted_1)
|
|
146
|
+
], 16),
|
|
141
147
|
renderSlot(_ctx.$slots, "cancelicon", {}, () => [
|
|
142
|
-
(openBlock(), createBlock(resolveDynamicComponent($props.cancelIcon ? 'span' : 'BanIcon'), {
|
|
143
|
-
class:
|
|
144
|
-
}, null,
|
|
148
|
+
(openBlock(), createBlock(resolveDynamicComponent($props.cancelIcon ? 'span' : 'BanIcon'), mergeProps({
|
|
149
|
+
class: ['p-rating-icon p-rating-cancel', $props.cancelIcon]
|
|
150
|
+
}, _ctx.ptm('cancelIcon')), null, 16, ["class"]))
|
|
145
151
|
])
|
|
146
|
-
],
|
|
152
|
+
], 16))
|
|
147
153
|
: createCommentVNode("", true),
|
|
148
154
|
(openBlock(true), createElementBlock(Fragment, null, renderList($props.stars, (value) => {
|
|
149
|
-
return (openBlock(), createElementBlock("div", {
|
|
155
|
+
return (openBlock(), createElementBlock("div", mergeProps({
|
|
150
156
|
key: value,
|
|
151
|
-
class:
|
|
157
|
+
class: ['p-rating-item', { 'p-rating-item-active': value <= $props.modelValue, 'p-focus': value === $data.focusedOptionIndex }],
|
|
152
158
|
onClick: $event => ($options.onOptionClick($event, value))
|
|
153
|
-
}, [
|
|
154
|
-
createElementVNode("span",
|
|
155
|
-
createElementVNode("input", {
|
|
159
|
+
}, $options.getPTOptions(value, 'item')), [
|
|
160
|
+
createElementVNode("span", mergeProps({ class: "p-hidden-accessible" }, _ctx.ptm('hiddenItemInputWrapper')), [
|
|
161
|
+
createElementVNode("input", mergeProps({
|
|
156
162
|
type: "radio",
|
|
157
163
|
value: value,
|
|
158
164
|
name: $data.name,
|
|
@@ -163,28 +169,28 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
163
169
|
onFocus: $event => ($options.onFocus($event, value)),
|
|
164
170
|
onBlur: _cache[4] || (_cache[4] = (...args) => ($options.onBlur && $options.onBlur(...args))),
|
|
165
171
|
onChange: $event => ($options.onChange($event, value))
|
|
166
|
-
}, null,
|
|
167
|
-
]),
|
|
172
|
+
}, _ctx.ptm('hiddenItemInput')), null, 16, _hoisted_3)
|
|
173
|
+
], 16),
|
|
168
174
|
(value <= $props.modelValue)
|
|
169
175
|
? renderSlot(_ctx.$slots, "onicon", {
|
|
170
176
|
key: 0,
|
|
171
177
|
value: value
|
|
172
178
|
}, () => [
|
|
173
|
-
(openBlock(), createBlock(resolveDynamicComponent($props.onIcon ? 'span' : 'StarFillIcon'), {
|
|
174
|
-
class:
|
|
175
|
-
}, null,
|
|
179
|
+
(openBlock(), createBlock(resolveDynamicComponent($props.onIcon ? 'span' : 'StarFillIcon'), mergeProps({
|
|
180
|
+
class: ['p-rating-icon', $props.onIcon]
|
|
181
|
+
}, _ctx.ptm('onIcon')), null, 16, ["class"]))
|
|
176
182
|
])
|
|
177
183
|
: renderSlot(_ctx.$slots, "officon", {
|
|
178
184
|
key: 1,
|
|
179
185
|
value: value
|
|
180
186
|
}, () => [
|
|
181
|
-
(openBlock(), createBlock(resolveDynamicComponent($props.
|
|
182
|
-
class:
|
|
183
|
-
}, null,
|
|
187
|
+
(openBlock(), createBlock(resolveDynamicComponent($props.offIcon ? 'span' : 'StarIcon'), mergeProps({
|
|
188
|
+
class: ['p-rating-icon', $props.offIcon]
|
|
189
|
+
}, _ctx.ptm('offIcon')), null, 16, ["class"]))
|
|
184
190
|
])
|
|
185
|
-
],
|
|
191
|
+
], 16, _hoisted_2))
|
|
186
192
|
}), 128))
|
|
187
|
-
],
|
|
193
|
+
], 16))
|
|
188
194
|
}
|
|
189
195
|
|
|
190
196
|
function styleInject(css, ref) {
|
package/rating/rating.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"primevue/icons/ban";import
|
|
1
|
+
import e from"primevue/basecomponent";import n from"primevue/icons/ban";import t from"primevue/icons/star";import a from"primevue/icons/starfill";import{UniqueComponentId as o,DomHandler as i}from"primevue/utils";import{openBlock as l,createElementBlock as s,mergeProps as c,createElementVNode as r,renderSlot as d,createBlock as p,resolveDynamicComponent as u,createCommentVNode as m,Fragment as f,renderList as h}from"vue";var g={name:"Rating",extends:e,emits:["update:modelValue","change","focus","blur"],props:{modelValue:{type:Number,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},stars:{type:Number,default:5},cancel:{type:Boolean,default:!0},onIcon:{type:String,default:void 0},offIcon:{type:String,default:void 0},cancelIcon:{type:String,default:void 0}},data(){return{name:this.$attrs.name,focusedOptionIndex:-1}},watch:{"$attrs.name":function(e){this.name=e||o()}},mounted(){this.name=this.name||o()},methods:{getPTOptions(e,n){return this.ptm(n,{context:{active:e<=this.modelValue,focused:e===this.focusedOptionIndex}})},onOptionClick(e,n){if(!this.readonly&&!this.disabled){this.onOptionSelect(e,n);const t=i.getFirstFocusableElement(e.currentTarget);t&&i.focus(t)}},onFocus(e,n){this.focusedOptionIndex=n,this.$emit("focus",e)},onBlur(e){this.focusedOptionIndex=-1,this.$emit("blur",e)},onChange(e,n){this.onOptionSelect(e,n)},onOptionSelect(e,n){this.focusedOptionIndex=n,this.updateModel(e,n||null)},updateModel(e,n){this.$emit("update:modelValue",n),this.$emit("change",{originalEvent:e,value:n})},cancelAriaLabel(){return this.$primevue.config.locale.clear},starAriaLabel(e){return 1===e?this.$primevue.config.locale.aria.star:this.$primevue.config.locale.aria.stars.replace(/{star}/g,e)}},computed:{containerClass(){return["p-rating",{"p-readonly":this.readonly,"p-disabled":this.disabled}]}},components:{StarFillIcon:a,StarIcon:t,BanIcon:n}};const y=["name","checked","disabled","readonly","aria-label"],I=["onClick"],v=["value","name","checked","disabled","readonly","aria-label","onFocus","onChange"];!function(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("\n.p-rating {\n position: relative;\n display: flex;\n align-items: center;\n}\n.p-rating-item {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n}\n.p-rating.p-readonly .p-rating-item {\n cursor: default;\n}\n"),g.render=function(e,n,t,a,o,i){return l(),s("div",c({class:i.containerClass},e.ptm("root")),[t.cancel?(l(),s("div",c({key:0,class:["p-rating-item p-rating-cancel-item",{"p-focus":0===o.focusedOptionIndex}],onClick:n[3]||(n[3]=e=>i.onOptionClick(e,0))},e.ptm("cancelItem")),[r("span",c({class:"p-hidden-accessible"},e.ptm("hiddenCancelInputWrapper")),[r("input",c({type:"radio",value:"0",name:o.name,checked:0===t.modelValue,disabled:t.disabled,readonly:t.readonly,"aria-label":i.cancelAriaLabel(),onFocus:n[0]||(n[0]=e=>i.onFocus(e,0)),onBlur:n[1]||(n[1]=(...e)=>i.onBlur&&i.onBlur(...e)),onChange:n[2]||(n[2]=e=>i.onChange(e,0))},e.ptm("hiddenCancelInput")),null,16,y)],16),d(e.$slots,"cancelicon",{},(()=>[(l(),p(u(t.cancelIcon?"span":"BanIcon"),c({class:["p-rating-icon p-rating-cancel",t.cancelIcon]},e.ptm("cancelIcon")),null,16,["class"]))]))],16)):m("",!0),(l(!0),s(f,null,h(t.stars,(a=>(l(),s("div",c({key:a,class:["p-rating-item",{"p-rating-item-active":a<=t.modelValue,"p-focus":a===o.focusedOptionIndex}],onClick:e=>i.onOptionClick(e,a)},i.getPTOptions(a,"item")),[r("span",c({class:"p-hidden-accessible"},e.ptm("hiddenItemInputWrapper")),[r("input",c({type:"radio",value:a,name:o.name,checked:t.modelValue===a,disabled:t.disabled,readonly:t.readonly,"aria-label":i.starAriaLabel(a),onFocus:e=>i.onFocus(e,a),onBlur:n[4]||(n[4]=(...e)=>i.onBlur&&i.onBlur(...e)),onChange:e=>i.onChange(e,a)},e.ptm("hiddenItemInput")),null,16,v)],16),a<=t.modelValue?d(e.$slots,"onicon",{key:0,value:a},(()=>[(l(),p(u(t.onIcon?"span":"StarFillIcon"),c({class:["p-rating-icon",t.onIcon]},e.ptm("onIcon")),null,16,["class"]))])):d(e.$slots,"officon",{key:1,value:a},(()=>[(l(),p(u(t.offIcon?"span":"StarIcon"),c({class:["p-rating-icon",t.offIcon]},e.ptm("offIcon")),null,16,["class"]))]))],16,I)))),128))],16)};export{g as default};
|
package/rating/rating.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
this.primevue = this.primevue || {};
|
|
2
|
-
this.primevue.rating = (function (BanIcon, StarIcon, StarFillIcon, utils, vue) {
|
|
2
|
+
this.primevue.rating = (function (BaseComponent, BanIcon, StarIcon, StarFillIcon, utils, 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 BanIcon__default = /*#__PURE__*/_interopDefaultLegacy(BanIcon);
|
|
8
9
|
var StarIcon__default = /*#__PURE__*/_interopDefaultLegacy(StarIcon);
|
|
9
10
|
var StarFillIcon__default = /*#__PURE__*/_interopDefaultLegacy(StarFillIcon);
|
|
10
11
|
|
|
11
12
|
var script = {
|
|
12
13
|
name: 'Rating',
|
|
14
|
+
extends: BaseComponent__default["default"],
|
|
13
15
|
emits: ['update:modelValue', 'change', 'focus', 'blur'],
|
|
14
16
|
props: {
|
|
15
17
|
modelValue: {
|
|
@@ -60,6 +62,14 @@ this.primevue.rating = (function (BanIcon, StarIcon, StarFillIcon, utils, vue) {
|
|
|
60
62
|
this.name = this.name || utils.UniqueComponentId();
|
|
61
63
|
},
|
|
62
64
|
methods: {
|
|
65
|
+
getPTOptions(value, key) {
|
|
66
|
+
return this.ptm(key, {
|
|
67
|
+
context: {
|
|
68
|
+
active: value <= this.modelValue,
|
|
69
|
+
focused: value === this.focusedOptionIndex
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
},
|
|
63
73
|
onOptionClick(event, value) {
|
|
64
74
|
if (!this.readonly && !this.disabled) {
|
|
65
75
|
this.onOptionSelect(event, value);
|
|
@@ -112,24 +122,20 @@ this.primevue.rating = (function (BanIcon, StarIcon, StarFillIcon, utils, vue) {
|
|
|
112
122
|
}
|
|
113
123
|
};
|
|
114
124
|
|
|
115
|
-
const _hoisted_1 =
|
|
116
|
-
const _hoisted_2 = ["
|
|
117
|
-
const _hoisted_3 = ["
|
|
118
|
-
const _hoisted_4 = { class: "p-hidden-accessible" };
|
|
119
|
-
const _hoisted_5 = ["value", "name", "checked", "disabled", "readonly", "aria-label", "onFocus", "onChange"];
|
|
125
|
+
const _hoisted_1 = ["name", "checked", "disabled", "readonly", "aria-label"];
|
|
126
|
+
const _hoisted_2 = ["onClick"];
|
|
127
|
+
const _hoisted_3 = ["value", "name", "checked", "disabled", "readonly", "aria-label", "onFocus", "onChange"];
|
|
120
128
|
|
|
121
129
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
122
|
-
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
123
|
-
class: vue.normalizeClass($options.containerClass)
|
|
124
|
-
}, [
|
|
130
|
+
return (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({ class: $options.containerClass }, _ctx.ptm('root')), [
|
|
125
131
|
($props.cancel)
|
|
126
|
-
? (vue.openBlock(), vue.createElementBlock("div", {
|
|
132
|
+
? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
127
133
|
key: 0,
|
|
128
|
-
class:
|
|
134
|
+
class: ['p-rating-item p-rating-cancel-item', { 'p-focus': $data.focusedOptionIndex === 0 }],
|
|
129
135
|
onClick: _cache[3] || (_cache[3] = $event => ($options.onOptionClick($event, 0)))
|
|
130
|
-
}, [
|
|
131
|
-
vue.createElementVNode("span",
|
|
132
|
-
vue.createElementVNode("input", {
|
|
136
|
+
}, _ctx.ptm('cancelItem')), [
|
|
137
|
+
vue.createElementVNode("span", vue.mergeProps({ class: "p-hidden-accessible" }, _ctx.ptm('hiddenCancelInputWrapper')), [
|
|
138
|
+
vue.createElementVNode("input", vue.mergeProps({
|
|
133
139
|
type: "radio",
|
|
134
140
|
value: "0",
|
|
135
141
|
name: $data.name,
|
|
@@ -140,23 +146,23 @@ this.primevue.rating = (function (BanIcon, StarIcon, StarFillIcon, utils, vue) {
|
|
|
140
146
|
onFocus: _cache[0] || (_cache[0] = $event => ($options.onFocus($event, 0))),
|
|
141
147
|
onBlur: _cache[1] || (_cache[1] = (...args) => ($options.onBlur && $options.onBlur(...args))),
|
|
142
148
|
onChange: _cache[2] || (_cache[2] = $event => ($options.onChange($event, 0)))
|
|
143
|
-
}, null,
|
|
144
|
-
]),
|
|
149
|
+
}, _ctx.ptm('hiddenCancelInput')), null, 16, _hoisted_1)
|
|
150
|
+
], 16),
|
|
145
151
|
vue.renderSlot(_ctx.$slots, "cancelicon", {}, () => [
|
|
146
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.cancelIcon ? 'span' : 'BanIcon'), {
|
|
147
|
-
class:
|
|
148
|
-
}, null,
|
|
152
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.cancelIcon ? 'span' : 'BanIcon'), vue.mergeProps({
|
|
153
|
+
class: ['p-rating-icon p-rating-cancel', $props.cancelIcon]
|
|
154
|
+
}, _ctx.ptm('cancelIcon')), null, 16, ["class"]))
|
|
149
155
|
])
|
|
150
|
-
],
|
|
156
|
+
], 16))
|
|
151
157
|
: vue.createCommentVNode("", true),
|
|
152
158
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.stars, (value) => {
|
|
153
|
-
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
159
|
+
return (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
154
160
|
key: value,
|
|
155
|
-
class:
|
|
161
|
+
class: ['p-rating-item', { 'p-rating-item-active': value <= $props.modelValue, 'p-focus': value === $data.focusedOptionIndex }],
|
|
156
162
|
onClick: $event => ($options.onOptionClick($event, value))
|
|
157
|
-
}, [
|
|
158
|
-
vue.createElementVNode("span",
|
|
159
|
-
vue.createElementVNode("input", {
|
|
163
|
+
}, $options.getPTOptions(value, 'item')), [
|
|
164
|
+
vue.createElementVNode("span", vue.mergeProps({ class: "p-hidden-accessible" }, _ctx.ptm('hiddenItemInputWrapper')), [
|
|
165
|
+
vue.createElementVNode("input", vue.mergeProps({
|
|
160
166
|
type: "radio",
|
|
161
167
|
value: value,
|
|
162
168
|
name: $data.name,
|
|
@@ -167,28 +173,28 @@ this.primevue.rating = (function (BanIcon, StarIcon, StarFillIcon, utils, vue) {
|
|
|
167
173
|
onFocus: $event => ($options.onFocus($event, value)),
|
|
168
174
|
onBlur: _cache[4] || (_cache[4] = (...args) => ($options.onBlur && $options.onBlur(...args))),
|
|
169
175
|
onChange: $event => ($options.onChange($event, value))
|
|
170
|
-
}, null,
|
|
171
|
-
]),
|
|
176
|
+
}, _ctx.ptm('hiddenItemInput')), null, 16, _hoisted_3)
|
|
177
|
+
], 16),
|
|
172
178
|
(value <= $props.modelValue)
|
|
173
179
|
? vue.renderSlot(_ctx.$slots, "onicon", {
|
|
174
180
|
key: 0,
|
|
175
181
|
value: value
|
|
176
182
|
}, () => [
|
|
177
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.onIcon ? 'span' : 'StarFillIcon'), {
|
|
178
|
-
class:
|
|
179
|
-
}, null,
|
|
183
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.onIcon ? 'span' : 'StarFillIcon'), vue.mergeProps({
|
|
184
|
+
class: ['p-rating-icon', $props.onIcon]
|
|
185
|
+
}, _ctx.ptm('onIcon')), null, 16, ["class"]))
|
|
180
186
|
])
|
|
181
187
|
: vue.renderSlot(_ctx.$slots, "officon", {
|
|
182
188
|
key: 1,
|
|
183
189
|
value: value
|
|
184
190
|
}, () => [
|
|
185
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.
|
|
186
|
-
class:
|
|
187
|
-
}, null,
|
|
191
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.offIcon ? 'span' : 'StarIcon'), vue.mergeProps({
|
|
192
|
+
class: ['p-rating-icon', $props.offIcon]
|
|
193
|
+
}, _ctx.ptm('offIcon')), null, 16, ["class"]))
|
|
188
194
|
])
|
|
189
|
-
],
|
|
195
|
+
], 16, _hoisted_2))
|
|
190
196
|
}), 128))
|
|
191
|
-
],
|
|
197
|
+
], 16))
|
|
192
198
|
}
|
|
193
199
|
|
|
194
200
|
function styleInject(css, ref) {
|
|
@@ -225,4 +231,4 @@ this.primevue.rating = (function (BanIcon, StarIcon, StarFillIcon, utils, vue) {
|
|
|
225
231
|
|
|
226
232
|
return script;
|
|
227
233
|
|
|
228
|
-
})(primevue.icons.ban, primevue.icons.star, primevue.icons.starfill, primevue.utils, Vue);
|
|
234
|
+
})(primevue.basecomponent, primevue.icons.ban, primevue.icons.star, primevue.icons.starfill, primevue.utils, Vue);
|
package/rating/rating.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.rating=function(e,n,
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.rating=function(e,n,t,o,a,l){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=i(e),r=i(n),s=i(t),d=i(o),p={name:"Rating",extends:c.default,emits:["update:modelValue","change","focus","blur"],props:{modelValue:{type:Number,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},stars:{type:Number,default:5},cancel:{type:Boolean,default:!0},onIcon:{type:String,default:void 0},offIcon:{type:String,default:void 0},cancelIcon:{type:String,default:void 0}},data(){return{name:this.$attrs.name,focusedOptionIndex:-1}},watch:{"$attrs.name":function(e){this.name=e||a.UniqueComponentId()}},mounted(){this.name=this.name||a.UniqueComponentId()},methods:{getPTOptions(e,n){return this.ptm(n,{context:{active:e<=this.modelValue,focused:e===this.focusedOptionIndex}})},onOptionClick(e,n){if(!this.readonly&&!this.disabled){this.onOptionSelect(e,n);const t=a.DomHandler.getFirstFocusableElement(e.currentTarget);t&&a.DomHandler.focus(t)}},onFocus(e,n){this.focusedOptionIndex=n,this.$emit("focus",e)},onBlur(e){this.focusedOptionIndex=-1,this.$emit("blur",e)},onChange(e,n){this.onOptionSelect(e,n)},onOptionSelect(e,n){this.focusedOptionIndex=n,this.updateModel(e,n||null)},updateModel(e,n){this.$emit("update:modelValue",n),this.$emit("change",{originalEvent:e,value:n})},cancelAriaLabel(){return this.$primevue.config.locale.clear},starAriaLabel(e){return 1===e?this.$primevue.config.locale.aria.star:this.$primevue.config.locale.aria.stars.replace(/{star}/g,e)}},computed:{containerClass(){return["p-rating",{"p-readonly":this.readonly,"p-disabled":this.disabled}]}},components:{StarFillIcon:d.default,StarIcon:s.default,BanIcon:r.default}};const u=["name","checked","disabled","readonly","aria-label"],m=["onClick"],f=["value","name","checked","disabled","readonly","aria-label","onFocus","onChange"];return function(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===t&&o.firstChild?o.insertBefore(a,o.firstChild):o.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}("\n.p-rating {\n position: relative;\n display: flex;\n align-items: center;\n}\n.p-rating-item {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n}\n.p-rating.p-readonly .p-rating-item {\n cursor: default;\n}\n"),p.render=function(e,n,t,o,a,i){return l.openBlock(),l.createElementBlock("div",l.mergeProps({class:i.containerClass},e.ptm("root")),[t.cancel?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,class:["p-rating-item p-rating-cancel-item",{"p-focus":0===a.focusedOptionIndex}],onClick:n[3]||(n[3]=e=>i.onOptionClick(e,0))},e.ptm("cancelItem")),[l.createElementVNode("span",l.mergeProps({class:"p-hidden-accessible"},e.ptm("hiddenCancelInputWrapper")),[l.createElementVNode("input",l.mergeProps({type:"radio",value:"0",name:a.name,checked:0===t.modelValue,disabled:t.disabled,readonly:t.readonly,"aria-label":i.cancelAriaLabel(),onFocus:n[0]||(n[0]=e=>i.onFocus(e,0)),onBlur:n[1]||(n[1]=(...e)=>i.onBlur&&i.onBlur(...e)),onChange:n[2]||(n[2]=e=>i.onChange(e,0))},e.ptm("hiddenCancelInput")),null,16,u)],16),l.renderSlot(e.$slots,"cancelicon",{},(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(t.cancelIcon?"span":"BanIcon"),l.mergeProps({class:["p-rating-icon p-rating-cancel",t.cancelIcon]},e.ptm("cancelIcon")),null,16,["class"]))]))],16)):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.stars,(o=>(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:o,class:["p-rating-item",{"p-rating-item-active":o<=t.modelValue,"p-focus":o===a.focusedOptionIndex}],onClick:e=>i.onOptionClick(e,o)},i.getPTOptions(o,"item")),[l.createElementVNode("span",l.mergeProps({class:"p-hidden-accessible"},e.ptm("hiddenItemInputWrapper")),[l.createElementVNode("input",l.mergeProps({type:"radio",value:o,name:a.name,checked:t.modelValue===o,disabled:t.disabled,readonly:t.readonly,"aria-label":i.starAriaLabel(o),onFocus:e=>i.onFocus(e,o),onBlur:n[4]||(n[4]=(...e)=>i.onBlur&&i.onBlur(...e)),onChange:e=>i.onChange(e,o)},e.ptm("hiddenItemInput")),null,16,f)],16),o<=t.modelValue?l.renderSlot(e.$slots,"onicon",{key:0,value:o},(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(t.onIcon?"span":"StarFillIcon"),l.mergeProps({class:["p-rating-icon",t.onIcon]},e.ptm("onIcon")),null,16,["class"]))])):l.renderSlot(e.$slots,"officon",{key:1,value:o},(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(t.offIcon?"span":"StarIcon"),l.mergeProps({class:["p-rating-icon",t.offIcon]},e.ptm("offIcon")),null,16,["class"]))]))],16,m)))),128))],16)},p}(primevue.basecomponent,primevue.icons.ban,primevue.icons.star,primevue.icons.starfill,primevue.utils,Vue);
|
package/row/Row.d.ts
CHANGED
|
@@ -5,8 +5,37 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @module row
|
|
7
7
|
*/
|
|
8
|
+
import { ColumnGroupPassThroughOptions } from '../columngroup';
|
|
8
9
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
9
10
|
|
|
11
|
+
export declare type RowPassThroughOptionType = RowPassThroughAttributes | ((options: RowPassThroughMethodOptions) => RowPassThroughAttributes) | null | undefined;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Custom passthrough(pt) option method.
|
|
15
|
+
*/
|
|
16
|
+
export interface RowPassThroughMethodOptions {
|
|
17
|
+
props: RowProps;
|
|
18
|
+
parent: ColumnGroupPassThroughOptions;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Custom passthrough(pt) options.
|
|
23
|
+
* @see {@link RowProps.pt}
|
|
24
|
+
*/
|
|
25
|
+
export interface RowPassThroughOptions {
|
|
26
|
+
/**
|
|
27
|
+
* Uses to pass attributes to the root's DOM element.
|
|
28
|
+
*/
|
|
29
|
+
root?: RowPassThroughOptionType;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Custom passthrough attributes for each DOM elements
|
|
34
|
+
*/
|
|
35
|
+
export interface RowPassThroughAttributes {
|
|
36
|
+
[key: string]: any;
|
|
37
|
+
}
|
|
38
|
+
|
|
10
39
|
/**
|
|
11
40
|
* Defines valid properties in Row component.
|
|
12
41
|
*/
|
package/row/Row.vue
CHANGED
package/row/row.cjs.js
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var BaseComponent = require('primevue/basecomponent');
|
|
4
|
+
|
|
5
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
6
|
+
|
|
7
|
+
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
|
8
|
+
|
|
3
9
|
var script = {
|
|
4
10
|
name: 'Row',
|
|
11
|
+
extends: BaseComponent__default["default"],
|
|
5
12
|
render() {
|
|
6
13
|
return null;
|
|
7
14
|
}
|
package/row/row.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t={name:"Row",extends:e(require("primevue/basecomponent")).default,render:()=>null};module.exports=t;
|
package/row/row.esm.js
CHANGED
package/row/row.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
import e from"primevue/basecomponent";var r={name:"Row",extends:e,render:()=>null};export{r as default};
|
package/row/row.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
this.primevue = this.primevue || {};
|
|
2
|
-
this.primevue.row = (function () {
|
|
2
|
+
this.primevue.row = (function (BaseComponent) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
6
|
+
|
|
7
|
+
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
|
8
|
+
|
|
5
9
|
var script = {
|
|
6
10
|
name: 'Row',
|
|
11
|
+
extends: BaseComponent__default["default"],
|
|
7
12
|
render() {
|
|
8
13
|
return null;
|
|
9
14
|
}
|
|
@@ -11,4 +16,4 @@ this.primevue.row = (function () {
|
|
|
11
16
|
|
|
12
17
|
return script;
|
|
13
18
|
|
|
14
|
-
})();
|
|
19
|
+
})(primevue.basecomponent);
|
package/row/row.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.row=function(){"use strict";return{name:"Row",render:()=>null}}();
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.row=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}return{name:"Row",extends:t(primevue.basecomponent).default,render:()=>null}}();
|
|
@@ -10,6 +10,43 @@
|
|
|
10
10
|
import { VNode } from 'vue';
|
|
11
11
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
12
12
|
|
|
13
|
+
export declare type SelectButtonPassThroughOptionType = SelectButtonPassThroughAttributes | ((options: SelectButtonPassThroughMethodOptions) => SelectButtonPassThroughAttributes) | null | undefined;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Custom passthrough(pt) option method.
|
|
17
|
+
*/
|
|
18
|
+
export interface SelectButtonPassThroughMethodOptions {
|
|
19
|
+
props: SelectButtonProps;
|
|
20
|
+
state: SelectButtonState;
|
|
21
|
+
context: SelectButtonContext;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Custom passthrough(pt) options.
|
|
26
|
+
* @see {@link SelectButtonProps.pt}
|
|
27
|
+
*/
|
|
28
|
+
export interface SelectButtonPassThroughOptions {
|
|
29
|
+
/**
|
|
30
|
+
* Uses to pass attributes to the root's DOM element.
|
|
31
|
+
*/
|
|
32
|
+
root?: SelectButtonPassThroughOptionType;
|
|
33
|
+
/**
|
|
34
|
+
* Uses to pass attributes to the button's DOM element.
|
|
35
|
+
*/
|
|
36
|
+
button?: SelectButtonPassThroughOptionType;
|
|
37
|
+
/**
|
|
38
|
+
* Uses to pass attributes to the label's DOM element.
|
|
39
|
+
*/
|
|
40
|
+
label?: SelectButtonPassThroughOptionType;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Custom passthrough attributes for each DOM elements
|
|
45
|
+
*/
|
|
46
|
+
export interface SelectButtonPassThroughAttributes {
|
|
47
|
+
[key: string]: any;
|
|
48
|
+
}
|
|
49
|
+
|
|
13
50
|
/**
|
|
14
51
|
* Custom change event.
|
|
15
52
|
* @see {@link SelectButtonEmits.change}
|
|
@@ -25,6 +62,32 @@ export interface SelectButtonChangeEvent {
|
|
|
25
62
|
value: any;
|
|
26
63
|
}
|
|
27
64
|
|
|
65
|
+
/**
|
|
66
|
+
* Defines current inline state in SelectButton component.
|
|
67
|
+
*/
|
|
68
|
+
export interface SelectButtonState {
|
|
69
|
+
/**
|
|
70
|
+
* FocusedIndex state as a number.
|
|
71
|
+
*/
|
|
72
|
+
focusedIndex: number;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Defines current options in SelectButton component.
|
|
77
|
+
*/
|
|
78
|
+
export interface SelectButtonContext {
|
|
79
|
+
/**
|
|
80
|
+
* Current active state of the item as a boolean.
|
|
81
|
+
* @defaultValue false
|
|
82
|
+
*/
|
|
83
|
+
active: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Current focused state of item as a boolean.
|
|
86
|
+
* @defaultValue false
|
|
87
|
+
*/
|
|
88
|
+
focused: boolean;
|
|
89
|
+
}
|
|
90
|
+
|
|
28
91
|
/**
|
|
29
92
|
* Defines valid properties in SelectButton component.
|
|
30
93
|
*/
|
|
@@ -72,6 +135,11 @@ export interface SelectButtonProps {
|
|
|
72
135
|
* Identifier of the underlying element.
|
|
73
136
|
*/
|
|
74
137
|
'aria-labelledby'?: string | undefined;
|
|
138
|
+
/**
|
|
139
|
+
* Uses to pass attributes to DOM elements inside the component.
|
|
140
|
+
* @type {SelectButtonPassThroughOptions}
|
|
141
|
+
*/
|
|
142
|
+
pt?: SelectButtonPassThroughOptions;
|
|
75
143
|
}
|
|
76
144
|
|
|
77
145
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div ref="container" :class="containerClass" role="group" :aria-labelledby="ariaLabelledby">
|
|
2
|
+
<div ref="container" :class="containerClass" role="group" :aria-labelledby="ariaLabelledby" v-bind="ptm('root')">
|
|
3
3
|
<div
|
|
4
4
|
v-for="(option, i) of options"
|
|
5
5
|
:key="getOptionRenderKey(option)"
|
|
@@ -14,20 +14,23 @@
|
|
|
14
14
|
@keydown="onKeydown($event, option, i)"
|
|
15
15
|
@focus="onFocus($event)"
|
|
16
16
|
@blur="onBlur($event, option)"
|
|
17
|
+
v-bind="getPTOptions(option, 'button')"
|
|
17
18
|
>
|
|
18
19
|
<slot name="option" :option="option" :index="i">
|
|
19
|
-
<span class="p-button-label">{{ getOptionLabel(option) }}</span>
|
|
20
|
+
<span class="p-button-label" v-bind="getPTOptions(option, 'label')">{{ getOptionLabel(option) }}</span>
|
|
20
21
|
</slot>
|
|
21
22
|
</div>
|
|
22
23
|
</div>
|
|
23
24
|
</template>
|
|
24
25
|
|
|
25
26
|
<script>
|
|
27
|
+
import BaseComponent from 'primevue/basecomponent';
|
|
26
28
|
import Ripple from 'primevue/ripple';
|
|
27
29
|
import { DomHandler, ObjectUtils } from 'primevue/utils';
|
|
28
30
|
|
|
29
31
|
export default {
|
|
30
32
|
name: 'SelectButton',
|
|
33
|
+
extends: BaseComponent,
|
|
31
34
|
emits: ['update:modelValue', 'focus', 'blur', 'change'],
|
|
32
35
|
props: {
|
|
33
36
|
modelValue: null,
|
|
@@ -75,6 +78,14 @@ export default {
|
|
|
75
78
|
getOptionRenderKey(option) {
|
|
76
79
|
return this.dataKey ? ObjectUtils.resolveFieldData(option, this.dataKey) : this.getOptionLabel(option);
|
|
77
80
|
},
|
|
81
|
+
getPTOptions(option, key) {
|
|
82
|
+
return this.ptm(key, {
|
|
83
|
+
context: {
|
|
84
|
+
active: this.isSelected(option),
|
|
85
|
+
disabled: this.isOptionDisabled(option)
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
},
|
|
78
89
|
isOptionDisabled(option) {
|
|
79
90
|
return this.optionDisabled ? ObjectUtils.resolveFieldData(option, this.optionDisabled) : false;
|
|
80
91
|
},
|