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
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var BaseComponent = require('primevue/basecomponent');
|
|
3
4
|
var Ripple = require('primevue/ripple');
|
|
4
5
|
var utils = require('primevue/utils');
|
|
5
6
|
var vue = require('vue');
|
|
6
7
|
|
|
7
8
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
9
|
|
|
10
|
+
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
|
9
11
|
var Ripple__default = /*#__PURE__*/_interopDefaultLegacy(Ripple);
|
|
10
12
|
|
|
11
13
|
var script = {
|
|
12
14
|
name: 'SelectButton',
|
|
15
|
+
extends: BaseComponent__default["default"],
|
|
13
16
|
emits: ['update:modelValue', 'focus', 'blur', 'change'],
|
|
14
17
|
props: {
|
|
15
18
|
modelValue: null,
|
|
@@ -57,6 +60,14 @@ var script = {
|
|
|
57
60
|
getOptionRenderKey(option) {
|
|
58
61
|
return this.dataKey ? utils.ObjectUtils.resolveFieldData(option, this.dataKey) : this.getOptionLabel(option);
|
|
59
62
|
},
|
|
63
|
+
getPTOptions(option, key) {
|
|
64
|
+
return this.ptm(key, {
|
|
65
|
+
context: {
|
|
66
|
+
active: this.isSelected(option),
|
|
67
|
+
disabled: this.isOptionDisabled(option)
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
},
|
|
60
71
|
isOptionDisabled(option) {
|
|
61
72
|
return this.optionDisabled ? utils.ObjectUtils.resolveFieldData(option, this.optionDisabled) : false;
|
|
62
73
|
},
|
|
@@ -187,42 +198,41 @@ var script = {
|
|
|
187
198
|
|
|
188
199
|
const _hoisted_1 = ["aria-labelledby"];
|
|
189
200
|
const _hoisted_2 = ["tabindex", "aria-label", "role", "aria-checked", "aria-disabled", "onClick", "onKeydown", "onBlur"];
|
|
190
|
-
const _hoisted_3 = { class: "p-button-label" };
|
|
191
201
|
|
|
192
202
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
193
203
|
const _directive_ripple = vue.resolveDirective("ripple");
|
|
194
204
|
|
|
195
|
-
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
205
|
+
return (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
196
206
|
ref: "container",
|
|
197
|
-
class:
|
|
207
|
+
class: $options.containerClass,
|
|
198
208
|
role: "group",
|
|
199
209
|
"aria-labelledby": _ctx.ariaLabelledby
|
|
200
|
-
}, [
|
|
210
|
+
}, _ctx.ptm('root')), [
|
|
201
211
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.options, (option, i) => {
|
|
202
|
-
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
212
|
+
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
203
213
|
key: $options.getOptionRenderKey(option),
|
|
204
214
|
tabindex: i === $data.focusedIndex ? '0' : '-1',
|
|
205
215
|
"aria-label": $options.getOptionLabel(option),
|
|
206
216
|
role: $props.multiple ? 'checkbox' : 'radio',
|
|
207
217
|
"aria-checked": $options.isSelected(option),
|
|
208
218
|
"aria-disabled": $props.optionDisabled,
|
|
209
|
-
class:
|
|
219
|
+
class: $options.getButtonClass(option, i),
|
|
210
220
|
onClick: $event => ($options.onOptionSelect($event, option, i)),
|
|
211
221
|
onKeydown: $event => ($options.onKeydown($event, option, i)),
|
|
212
222
|
onFocus: _cache[0] || (_cache[0] = $event => ($options.onFocus($event))),
|
|
213
223
|
onBlur: $event => ($options.onBlur($event, option))
|
|
214
|
-
}, [
|
|
224
|
+
}, $options.getPTOptions(option, 'button')), [
|
|
215
225
|
vue.renderSlot(_ctx.$slots, "option", {
|
|
216
226
|
option: option,
|
|
217
227
|
index: i
|
|
218
228
|
}, () => [
|
|
219
|
-
vue.createElementVNode("span",
|
|
229
|
+
vue.createElementVNode("span", vue.mergeProps({ class: "p-button-label" }, $options.getPTOptions(option, 'label')), vue.toDisplayString($options.getOptionLabel(option)), 17)
|
|
220
230
|
])
|
|
221
|
-
],
|
|
231
|
+
], 16, _hoisted_2)), [
|
|
222
232
|
[_directive_ripple]
|
|
223
233
|
])
|
|
224
234
|
}), 128))
|
|
225
|
-
],
|
|
235
|
+
], 16, _hoisted_1))
|
|
226
236
|
}
|
|
227
237
|
|
|
228
238
|
script.render = render;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/
|
|
1
|
+
"use strict";var e=require("primevue/basecomponent"),t=require("primevue/ripple"),i=require("primevue/utils"),l=require("vue");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=n(e),o=n(t),s={name:"SelectButton",extends:a.default,emits:["update:modelValue","focus","blur","change"],props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,multiple:Boolean,unselectable:{type:Boolean,default:!1},disabled:Boolean,dataKey:null,"aria-labelledby":{type:String,default:null}},data:()=>({focusedIndex:0}),mounted(){this.defaultTabIndexes()},methods:{defaultTabIndexes(){let e=i.DomHandler.find(this.$refs.container,".p-button"),t=i.DomHandler.findSingle(this.$refs.container,".p-highlight");for(let l=0;l<e.length;l++)(i.DomHandler.hasClass(e[l],"p-highlight")&&i.ObjectUtils.equals(e[l],t)||null===t&&0==l)&&(this.focusedIndex=l)},getOptionLabel(e){return this.optionLabel?i.ObjectUtils.resolveFieldData(e,this.optionLabel):e},getOptionValue(e){return this.optionValue?i.ObjectUtils.resolveFieldData(e,this.optionValue):e},getOptionRenderKey(e){return this.dataKey?i.ObjectUtils.resolveFieldData(e,this.dataKey):this.getOptionLabel(e)},getPTOptions(e,t){return this.ptm(t,{context:{active:this.isSelected(e),disabled:this.isOptionDisabled(e)}})},isOptionDisabled(e){return!!this.optionDisabled&&i.ObjectUtils.resolveFieldData(e,this.optionDisabled)},onOptionSelect(e,t,l){if(this.disabled||this.isOptionDisabled(t))return;let n=this.isSelected(t);if(n&&this.unselectable)return;let a,o=this.getOptionValue(t);a=this.multiple?n?this.modelValue.filter((e=>!i.ObjectUtils.equals(e,o,this.equalityKey))):this.modelValue?[...this.modelValue,o]:[o]:n?null:o,this.focusedIndex=l,this.$emit("update:modelValue",a),this.$emit("change",{event:e,value:a})},isSelected(e){let t=!1,l=this.getOptionValue(e);if(this.multiple){if(this.modelValue)for(let e of this.modelValue)if(i.ObjectUtils.equals(e,l,this.equalityKey)){t=!0;break}}else t=i.ObjectUtils.equals(this.modelValue,l,this.equalityKey);return t},onKeydown(e,t,i){switch(e.code){case"Space":this.onOptionSelect(e,t,i),e.preventDefault();break;case"ArrowDown":case"ArrowRight":this.changeTabIndexes(e,"next"),e.preventDefault();break;case"ArrowUp":case"ArrowLeft":this.changeTabIndexes(e,"prev"),e.preventDefault()}},changeTabIndexes(e,t){let i,l;for(let e=0;e<=this.$refs.container.children.length-1;e++)"0"===this.$refs.container.children[e].getAttribute("tabindex")&&(i={elem:this.$refs.container.children[e],index:e});l="prev"===t?0===i.index?this.$refs.container.children.length-1:i.index-1:i.index===this.$refs.container.children.length-1?0:i.index+1,this.focusedIndex=l,this.$refs.container.children[l].focus()},onFocus(e){this.$emit("focus",e)},onBlur(e,t){e.target&&e.relatedTarget&&e.target.parentElement!==e.relatedTarget.parentElement&&this.defaultTabIndexes(),this.$emit("blur",e,t)},getButtonClass(e){return["p-button p-component",{"p-highlight":this.isSelected(e),"p-disabled":this.isOptionDisabled(e)}]}},computed:{containerClass(){return["p-selectbutton p-buttonset p-component",{"p-disabled":this.disabled}]},equalityKey(){return this.optionValue?null:this.dataKey}},directives:{ripple:o.default}};const r=["aria-labelledby"],d=["tabindex","aria-label","role","aria-checked","aria-disabled","onClick","onKeydown","onBlur"];s.render=function(e,t,i,n,a,o){const s=l.resolveDirective("ripple");return l.openBlock(),l.createElementBlock("div",l.mergeProps({ref:"container",class:o.containerClass,role:"group","aria-labelledby":e.ariaLabelledby},e.ptm("root")),[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i.options,((n,r)=>l.withDirectives((l.openBlock(),l.createElementBlock("div",l.mergeProps({key:o.getOptionRenderKey(n),tabindex:r===a.focusedIndex?"0":"-1","aria-label":o.getOptionLabel(n),role:i.multiple?"checkbox":"radio","aria-checked":o.isSelected(n),"aria-disabled":i.optionDisabled,class:o.getButtonClass(n,r),onClick:e=>o.onOptionSelect(e,n,r),onKeydown:e=>o.onKeydown(e,n,r),onFocus:t[0]||(t[0]=e=>o.onFocus(e)),onBlur:e=>o.onBlur(e,n)},o.getPTOptions(n,"button")),[l.renderSlot(e.$slots,"option",{option:n,index:r},(()=>[l.createElementVNode("span",l.mergeProps({class:"p-button-label"},o.getPTOptions(n,"label")),l.toDisplayString(o.getOptionLabel(n)),17)]))],16,d)),[[s]]))),128))],16,r)},module.exports=s;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import BaseComponent from 'primevue/basecomponent';
|
|
1
2
|
import Ripple from 'primevue/ripple';
|
|
2
3
|
import { DomHandler, ObjectUtils } from 'primevue/utils';
|
|
3
|
-
import { resolveDirective, openBlock, createElementBlock,
|
|
4
|
+
import { resolveDirective, openBlock, createElementBlock, mergeProps, Fragment, renderList, withDirectives, renderSlot, createElementVNode, toDisplayString } from 'vue';
|
|
4
5
|
|
|
5
6
|
var script = {
|
|
6
7
|
name: 'SelectButton',
|
|
8
|
+
extends: BaseComponent,
|
|
7
9
|
emits: ['update:modelValue', 'focus', 'blur', 'change'],
|
|
8
10
|
props: {
|
|
9
11
|
modelValue: null,
|
|
@@ -51,6 +53,14 @@ var script = {
|
|
|
51
53
|
getOptionRenderKey(option) {
|
|
52
54
|
return this.dataKey ? ObjectUtils.resolveFieldData(option, this.dataKey) : this.getOptionLabel(option);
|
|
53
55
|
},
|
|
56
|
+
getPTOptions(option, key) {
|
|
57
|
+
return this.ptm(key, {
|
|
58
|
+
context: {
|
|
59
|
+
active: this.isSelected(option),
|
|
60
|
+
disabled: this.isOptionDisabled(option)
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
},
|
|
54
64
|
isOptionDisabled(option) {
|
|
55
65
|
return this.optionDisabled ? ObjectUtils.resolveFieldData(option, this.optionDisabled) : false;
|
|
56
66
|
},
|
|
@@ -181,42 +191,41 @@ var script = {
|
|
|
181
191
|
|
|
182
192
|
const _hoisted_1 = ["aria-labelledby"];
|
|
183
193
|
const _hoisted_2 = ["tabindex", "aria-label", "role", "aria-checked", "aria-disabled", "onClick", "onKeydown", "onBlur"];
|
|
184
|
-
const _hoisted_3 = { class: "p-button-label" };
|
|
185
194
|
|
|
186
195
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
187
196
|
const _directive_ripple = resolveDirective("ripple");
|
|
188
197
|
|
|
189
|
-
return (openBlock(), createElementBlock("div", {
|
|
198
|
+
return (openBlock(), createElementBlock("div", mergeProps({
|
|
190
199
|
ref: "container",
|
|
191
|
-
class:
|
|
200
|
+
class: $options.containerClass,
|
|
192
201
|
role: "group",
|
|
193
202
|
"aria-labelledby": _ctx.ariaLabelledby
|
|
194
|
-
}, [
|
|
203
|
+
}, _ctx.ptm('root')), [
|
|
195
204
|
(openBlock(true), createElementBlock(Fragment, null, renderList($props.options, (option, i) => {
|
|
196
|
-
return withDirectives((openBlock(), createElementBlock("div", {
|
|
205
|
+
return withDirectives((openBlock(), createElementBlock("div", mergeProps({
|
|
197
206
|
key: $options.getOptionRenderKey(option),
|
|
198
207
|
tabindex: i === $data.focusedIndex ? '0' : '-1',
|
|
199
208
|
"aria-label": $options.getOptionLabel(option),
|
|
200
209
|
role: $props.multiple ? 'checkbox' : 'radio',
|
|
201
210
|
"aria-checked": $options.isSelected(option),
|
|
202
211
|
"aria-disabled": $props.optionDisabled,
|
|
203
|
-
class:
|
|
212
|
+
class: $options.getButtonClass(option, i),
|
|
204
213
|
onClick: $event => ($options.onOptionSelect($event, option, i)),
|
|
205
214
|
onKeydown: $event => ($options.onKeydown($event, option, i)),
|
|
206
215
|
onFocus: _cache[0] || (_cache[0] = $event => ($options.onFocus($event))),
|
|
207
216
|
onBlur: $event => ($options.onBlur($event, option))
|
|
208
|
-
}, [
|
|
217
|
+
}, $options.getPTOptions(option, 'button')), [
|
|
209
218
|
renderSlot(_ctx.$slots, "option", {
|
|
210
219
|
option: option,
|
|
211
220
|
index: i
|
|
212
221
|
}, () => [
|
|
213
|
-
createElementVNode("span",
|
|
222
|
+
createElementVNode("span", mergeProps({ class: "p-button-label" }, $options.getPTOptions(option, 'label')), toDisplayString($options.getOptionLabel(option)), 17)
|
|
214
223
|
])
|
|
215
|
-
],
|
|
224
|
+
], 16, _hoisted_2)), [
|
|
216
225
|
[_directive_ripple]
|
|
217
226
|
])
|
|
218
227
|
}), 128))
|
|
219
|
-
],
|
|
228
|
+
], 16, _hoisted_1))
|
|
220
229
|
}
|
|
221
230
|
|
|
222
231
|
script.render = render;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"primevue/ripple";import{DomHandler as
|
|
1
|
+
import e from"primevue/basecomponent";import t from"primevue/ripple";import{DomHandler as i,ObjectUtils as l}from"primevue/utils";import{resolveDirective as n,openBlock as a,createElementBlock as o,mergeProps as s,Fragment as r,renderList as d,withDirectives as u,renderSlot as p,createElementVNode as h,toDisplayString as c}from"vue";var b={name:"SelectButton",extends:e,emits:["update:modelValue","focus","blur","change"],props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,multiple:Boolean,unselectable:{type:Boolean,default:!1},disabled:Boolean,dataKey:null,"aria-labelledby":{type:String,default:null}},data:()=>({focusedIndex:0}),mounted(){this.defaultTabIndexes()},methods:{defaultTabIndexes(){let e=i.find(this.$refs.container,".p-button"),t=i.findSingle(this.$refs.container,".p-highlight");for(let n=0;n<e.length;n++)(i.hasClass(e[n],"p-highlight")&&l.equals(e[n],t)||null===t&&0==n)&&(this.focusedIndex=n)},getOptionLabel(e){return this.optionLabel?l.resolveFieldData(e,this.optionLabel):e},getOptionValue(e){return this.optionValue?l.resolveFieldData(e,this.optionValue):e},getOptionRenderKey(e){return this.dataKey?l.resolveFieldData(e,this.dataKey):this.getOptionLabel(e)},getPTOptions(e,t){return this.ptm(t,{context:{active:this.isSelected(e),disabled:this.isOptionDisabled(e)}})},isOptionDisabled(e){return!!this.optionDisabled&&l.resolveFieldData(e,this.optionDisabled)},onOptionSelect(e,t,i){if(this.disabled||this.isOptionDisabled(t))return;let n=this.isSelected(t);if(n&&this.unselectable)return;let a,o=this.getOptionValue(t);a=this.multiple?n?this.modelValue.filter((e=>!l.equals(e,o,this.equalityKey))):this.modelValue?[...this.modelValue,o]:[o]:n?null:o,this.focusedIndex=i,this.$emit("update:modelValue",a),this.$emit("change",{event:e,value:a})},isSelected(e){let t=!1,i=this.getOptionValue(e);if(this.multiple){if(this.modelValue)for(let e of this.modelValue)if(l.equals(e,i,this.equalityKey)){t=!0;break}}else t=l.equals(this.modelValue,i,this.equalityKey);return t},onKeydown(e,t,i){switch(e.code){case"Space":this.onOptionSelect(e,t,i),e.preventDefault();break;case"ArrowDown":case"ArrowRight":this.changeTabIndexes(e,"next"),e.preventDefault();break;case"ArrowUp":case"ArrowLeft":this.changeTabIndexes(e,"prev"),e.preventDefault()}},changeTabIndexes(e,t){let i,l;for(let e=0;e<=this.$refs.container.children.length-1;e++)"0"===this.$refs.container.children[e].getAttribute("tabindex")&&(i={elem:this.$refs.container.children[e],index:e});l="prev"===t?0===i.index?this.$refs.container.children.length-1:i.index-1:i.index===this.$refs.container.children.length-1?0:i.index+1,this.focusedIndex=l,this.$refs.container.children[l].focus()},onFocus(e){this.$emit("focus",e)},onBlur(e,t){e.target&&e.relatedTarget&&e.target.parentElement!==e.relatedTarget.parentElement&&this.defaultTabIndexes(),this.$emit("blur",e,t)},getButtonClass(e){return["p-button p-component",{"p-highlight":this.isSelected(e),"p-disabled":this.isOptionDisabled(e)}]}},computed:{containerClass(){return["p-selectbutton p-buttonset p-component",{"p-disabled":this.disabled}]},equalityKey(){return this.optionValue?null:this.dataKey}},directives:{ripple:t}};const f=["aria-labelledby"],m=["tabindex","aria-label","role","aria-checked","aria-disabled","onClick","onKeydown","onBlur"];b.render=function(e,t,i,l,b,g){const y=n("ripple");return a(),o("div",s({ref:"container",class:g.containerClass,role:"group","aria-labelledby":e.ariaLabelledby},e.ptm("root")),[(a(!0),o(r,null,d(i.options,((l,n)=>u((a(),o("div",s({key:g.getOptionRenderKey(l),tabindex:n===b.focusedIndex?"0":"-1","aria-label":g.getOptionLabel(l),role:i.multiple?"checkbox":"radio","aria-checked":g.isSelected(l),"aria-disabled":i.optionDisabled,class:g.getButtonClass(l,n),onClick:e=>g.onOptionSelect(e,l,n),onKeydown:e=>g.onKeydown(e,l,n),onFocus:t[0]||(t[0]=e=>g.onFocus(e)),onBlur:e=>g.onBlur(e,l)},g.getPTOptions(l,"button")),[p(e.$slots,"option",{option:l,index:n},(()=>[h("span",s({class:"p-button-label"},g.getPTOptions(l,"label")),c(g.getOptionLabel(l)),17)]))],16,m)),[[y]]))),128))],16,f)};export{b as default};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
this.primevue = this.primevue || {};
|
|
2
|
-
this.primevue.selectbutton = (function (Ripple, utils, vue) {
|
|
2
|
+
this.primevue.selectbutton = (function (BaseComponent, Ripple, 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 Ripple__default = /*#__PURE__*/_interopDefaultLegacy(Ripple);
|
|
8
9
|
|
|
9
10
|
var script = {
|
|
10
11
|
name: 'SelectButton',
|
|
12
|
+
extends: BaseComponent__default["default"],
|
|
11
13
|
emits: ['update:modelValue', 'focus', 'blur', 'change'],
|
|
12
14
|
props: {
|
|
13
15
|
modelValue: null,
|
|
@@ -55,6 +57,14 @@ this.primevue.selectbutton = (function (Ripple, utils, vue) {
|
|
|
55
57
|
getOptionRenderKey(option) {
|
|
56
58
|
return this.dataKey ? utils.ObjectUtils.resolveFieldData(option, this.dataKey) : this.getOptionLabel(option);
|
|
57
59
|
},
|
|
60
|
+
getPTOptions(option, key) {
|
|
61
|
+
return this.ptm(key, {
|
|
62
|
+
context: {
|
|
63
|
+
active: this.isSelected(option),
|
|
64
|
+
disabled: this.isOptionDisabled(option)
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
},
|
|
58
68
|
isOptionDisabled(option) {
|
|
59
69
|
return this.optionDisabled ? utils.ObjectUtils.resolveFieldData(option, this.optionDisabled) : false;
|
|
60
70
|
},
|
|
@@ -185,46 +195,45 @@ this.primevue.selectbutton = (function (Ripple, utils, vue) {
|
|
|
185
195
|
|
|
186
196
|
const _hoisted_1 = ["aria-labelledby"];
|
|
187
197
|
const _hoisted_2 = ["tabindex", "aria-label", "role", "aria-checked", "aria-disabled", "onClick", "onKeydown", "onBlur"];
|
|
188
|
-
const _hoisted_3 = { class: "p-button-label" };
|
|
189
198
|
|
|
190
199
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
191
200
|
const _directive_ripple = vue.resolveDirective("ripple");
|
|
192
201
|
|
|
193
|
-
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
202
|
+
return (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
194
203
|
ref: "container",
|
|
195
|
-
class:
|
|
204
|
+
class: $options.containerClass,
|
|
196
205
|
role: "group",
|
|
197
206
|
"aria-labelledby": _ctx.ariaLabelledby
|
|
198
|
-
}, [
|
|
207
|
+
}, _ctx.ptm('root')), [
|
|
199
208
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.options, (option, i) => {
|
|
200
|
-
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
209
|
+
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
201
210
|
key: $options.getOptionRenderKey(option),
|
|
202
211
|
tabindex: i === $data.focusedIndex ? '0' : '-1',
|
|
203
212
|
"aria-label": $options.getOptionLabel(option),
|
|
204
213
|
role: $props.multiple ? 'checkbox' : 'radio',
|
|
205
214
|
"aria-checked": $options.isSelected(option),
|
|
206
215
|
"aria-disabled": $props.optionDisabled,
|
|
207
|
-
class:
|
|
216
|
+
class: $options.getButtonClass(option, i),
|
|
208
217
|
onClick: $event => ($options.onOptionSelect($event, option, i)),
|
|
209
218
|
onKeydown: $event => ($options.onKeydown($event, option, i)),
|
|
210
219
|
onFocus: _cache[0] || (_cache[0] = $event => ($options.onFocus($event))),
|
|
211
220
|
onBlur: $event => ($options.onBlur($event, option))
|
|
212
|
-
}, [
|
|
221
|
+
}, $options.getPTOptions(option, 'button')), [
|
|
213
222
|
vue.renderSlot(_ctx.$slots, "option", {
|
|
214
223
|
option: option,
|
|
215
224
|
index: i
|
|
216
225
|
}, () => [
|
|
217
|
-
vue.createElementVNode("span",
|
|
226
|
+
vue.createElementVNode("span", vue.mergeProps({ class: "p-button-label" }, $options.getPTOptions(option, 'label')), vue.toDisplayString($options.getOptionLabel(option)), 17)
|
|
218
227
|
])
|
|
219
|
-
],
|
|
228
|
+
], 16, _hoisted_2)), [
|
|
220
229
|
[_directive_ripple]
|
|
221
230
|
])
|
|
222
231
|
}), 128))
|
|
223
|
-
],
|
|
232
|
+
], 16, _hoisted_1))
|
|
224
233
|
}
|
|
225
234
|
|
|
226
235
|
script.render = render;
|
|
227
236
|
|
|
228
237
|
return script;
|
|
229
238
|
|
|
230
|
-
})(primevue.ripple, primevue.utils, Vue);
|
|
239
|
+
})(primevue.basecomponent, primevue.ripple, primevue.utils, Vue);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.selectbutton=function(e,t,l){"use strict";function
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.selectbutton=function(e,t,i,l){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=n(e),s=n(t),o={name:"SelectButton",extends:a.default,emits:["update:modelValue","focus","blur","change"],props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,multiple:Boolean,unselectable:{type:Boolean,default:!1},disabled:Boolean,dataKey:null,"aria-labelledby":{type:String,default:null}},data:()=>({focusedIndex:0}),mounted(){this.defaultTabIndexes()},methods:{defaultTabIndexes(){let e=i.DomHandler.find(this.$refs.container,".p-button"),t=i.DomHandler.findSingle(this.$refs.container,".p-highlight");for(let l=0;l<e.length;l++)(i.DomHandler.hasClass(e[l],"p-highlight")&&i.ObjectUtils.equals(e[l],t)||null===t&&0==l)&&(this.focusedIndex=l)},getOptionLabel(e){return this.optionLabel?i.ObjectUtils.resolveFieldData(e,this.optionLabel):e},getOptionValue(e){return this.optionValue?i.ObjectUtils.resolveFieldData(e,this.optionValue):e},getOptionRenderKey(e){return this.dataKey?i.ObjectUtils.resolveFieldData(e,this.dataKey):this.getOptionLabel(e)},getPTOptions(e,t){return this.ptm(t,{context:{active:this.isSelected(e),disabled:this.isOptionDisabled(e)}})},isOptionDisabled(e){return!!this.optionDisabled&&i.ObjectUtils.resolveFieldData(e,this.optionDisabled)},onOptionSelect(e,t,l){if(this.disabled||this.isOptionDisabled(t))return;let n=this.isSelected(t);if(n&&this.unselectable)return;let a,s=this.getOptionValue(t);a=this.multiple?n?this.modelValue.filter((e=>!i.ObjectUtils.equals(e,s,this.equalityKey))):this.modelValue?[...this.modelValue,s]:[s]:n?null:s,this.focusedIndex=l,this.$emit("update:modelValue",a),this.$emit("change",{event:e,value:a})},isSelected(e){let t=!1,l=this.getOptionValue(e);if(this.multiple){if(this.modelValue)for(let e of this.modelValue)if(i.ObjectUtils.equals(e,l,this.equalityKey)){t=!0;break}}else t=i.ObjectUtils.equals(this.modelValue,l,this.equalityKey);return t},onKeydown(e,t,i){switch(e.code){case"Space":this.onOptionSelect(e,t,i),e.preventDefault();break;case"ArrowDown":case"ArrowRight":this.changeTabIndexes(e,"next"),e.preventDefault();break;case"ArrowUp":case"ArrowLeft":this.changeTabIndexes(e,"prev"),e.preventDefault()}},changeTabIndexes(e,t){let i,l;for(let e=0;e<=this.$refs.container.children.length-1;e++)"0"===this.$refs.container.children[e].getAttribute("tabindex")&&(i={elem:this.$refs.container.children[e],index:e});l="prev"===t?0===i.index?this.$refs.container.children.length-1:i.index-1:i.index===this.$refs.container.children.length-1?0:i.index+1,this.focusedIndex=l,this.$refs.container.children[l].focus()},onFocus(e){this.$emit("focus",e)},onBlur(e,t){e.target&&e.relatedTarget&&e.target.parentElement!==e.relatedTarget.parentElement&&this.defaultTabIndexes(),this.$emit("blur",e,t)},getButtonClass(e){return["p-button p-component",{"p-highlight":this.isSelected(e),"p-disabled":this.isOptionDisabled(e)}]}},computed:{containerClass(){return["p-selectbutton p-buttonset p-component",{"p-disabled":this.disabled}]},equalityKey(){return this.optionValue?null:this.dataKey}},directives:{ripple:s.default}};const r=["aria-labelledby"],d=["tabindex","aria-label","role","aria-checked","aria-disabled","onClick","onKeydown","onBlur"];return o.render=function(e,t,i,n,a,s){const o=l.resolveDirective("ripple");return l.openBlock(),l.createElementBlock("div",l.mergeProps({ref:"container",class:s.containerClass,role:"group","aria-labelledby":e.ariaLabelledby},e.ptm("root")),[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i.options,((n,r)=>l.withDirectives((l.openBlock(),l.createElementBlock("div",l.mergeProps({key:s.getOptionRenderKey(n),tabindex:r===a.focusedIndex?"0":"-1","aria-label":s.getOptionLabel(n),role:i.multiple?"checkbox":"radio","aria-checked":s.isSelected(n),"aria-disabled":i.optionDisabled,class:s.getButtonClass(n,r),onClick:e=>s.onOptionSelect(e,n,r),onKeydown:e=>s.onKeydown(e,n,r),onFocus:t[0]||(t[0]=e=>s.onFocus(e)),onBlur:e=>s.onBlur(e,n)},s.getPTOptions(n,"button")),[l.renderSlot(e.$slots,"option",{option:n,index:r},(()=>[l.createElementVNode("span",l.mergeProps({class:"p-button-label"},s.getPTOptions(n,"label")),l.toDisplayString(s.getOptionLabel(n)),17)]))],16,d)),[[o]]))),128))],16,r)},o}(primevue.basecomponent,primevue.ripple,primevue.utils,Vue);
|
package/slider/Slider.d.ts
CHANGED
|
@@ -9,6 +9,49 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
11
11
|
|
|
12
|
+
export declare type SliderPassThroughOptionType = SliderPassThroughAttributes | ((options: SliderPassThroughMethodOptions) => SliderPassThroughAttributes) | null | undefined;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Custom passthrough(pt) option method.
|
|
16
|
+
*/
|
|
17
|
+
export interface SliderPassThroughMethodOptions {
|
|
18
|
+
props: SliderProps;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Custom passthrough(pt) options.
|
|
23
|
+
* @see {@link SliderProps.pt}
|
|
24
|
+
*/
|
|
25
|
+
export interface SliderPassThroughOptions {
|
|
26
|
+
/**
|
|
27
|
+
* Uses to pass attributes to the root's DOM element.
|
|
28
|
+
*/
|
|
29
|
+
root?: SliderPassThroughOptionType;
|
|
30
|
+
/**
|
|
31
|
+
* Uses to pass attributes to the range's DOM element.
|
|
32
|
+
*/
|
|
33
|
+
range?: SliderPassThroughOptionType;
|
|
34
|
+
/**
|
|
35
|
+
* Uses to pass attributes to the handle's DOM element.
|
|
36
|
+
*/
|
|
37
|
+
handle?: SliderPassThroughOptionType;
|
|
38
|
+
/**
|
|
39
|
+
* Uses to pass attributes to the start handler's DOM element.
|
|
40
|
+
*/
|
|
41
|
+
startHandler?: SliderPassThroughOptionType;
|
|
42
|
+
/**
|
|
43
|
+
* Uses to pass attributes to the end handler's DOM element.
|
|
44
|
+
*/
|
|
45
|
+
endHandler?: SliderPassThroughOptionType;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Custom passthrough attributes for each DOM elements
|
|
50
|
+
*/
|
|
51
|
+
export interface SliderPassThroughAttributes {
|
|
52
|
+
[key: string]: any;
|
|
53
|
+
}
|
|
54
|
+
|
|
12
55
|
/**
|
|
13
56
|
* Custom slide end event.
|
|
14
57
|
* @see {@link SliderEmits.slideend}
|
|
@@ -74,6 +117,11 @@ export interface SliderProps {
|
|
|
74
117
|
* Used to define a string that labels the element.
|
|
75
118
|
*/
|
|
76
119
|
'aria-label'?: string | undefined;
|
|
120
|
+
/**
|
|
121
|
+
* Uses to pass attributes to DOM elements inside the component.
|
|
122
|
+
* @type {SliderPassThroughOptions}
|
|
123
|
+
*/
|
|
124
|
+
pt?: SliderPassThroughOptions;
|
|
77
125
|
}
|
|
78
126
|
|
|
79
127
|
/**
|
package/slider/Slider.vue
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :class="containerClass" @click="onBarClick">
|
|
3
|
-
<span class="p-slider-range" :style="rangeStyle"></span>
|
|
2
|
+
<div :class="containerClass" @click="onBarClick" v-bind="ptm('root')">
|
|
3
|
+
<span class="p-slider-range" :style="rangeStyle" v-bind="ptm('range')"></span>
|
|
4
4
|
<span
|
|
5
5
|
v-if="!range"
|
|
6
6
|
class="p-slider-handle"
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
:aria-labelledby="ariaLabelledby"
|
|
19
19
|
:aria-label="ariaLabel"
|
|
20
20
|
:aria-orientation="orientation"
|
|
21
|
+
v-bind="ptm('handle')"
|
|
21
22
|
></span>
|
|
22
23
|
<span
|
|
23
24
|
v-if="range"
|
|
@@ -36,6 +37,7 @@
|
|
|
36
37
|
:aria-labelledby="ariaLabelledby"
|
|
37
38
|
:aria-label="ariaLabel"
|
|
38
39
|
:aria-orientation="orientation"
|
|
40
|
+
v-bind="ptm('startHandler')"
|
|
39
41
|
></span>
|
|
40
42
|
<span
|
|
41
43
|
v-if="range"
|
|
@@ -54,15 +56,18 @@
|
|
|
54
56
|
:aria-labelledby="ariaLabelledby"
|
|
55
57
|
:aria-label="ariaLabel"
|
|
56
58
|
:aria-orientation="orientation"
|
|
59
|
+
v-bind="ptm('endHandler')"
|
|
57
60
|
></span>
|
|
58
61
|
</div>
|
|
59
62
|
</template>
|
|
60
63
|
|
|
61
64
|
<script>
|
|
65
|
+
import BaseComponent from 'primevue/basecomponent';
|
|
62
66
|
import { DomHandler } from 'primevue/utils';
|
|
63
67
|
|
|
64
68
|
export default {
|
|
65
69
|
name: 'Slider',
|
|
70
|
+
extends: BaseComponent,
|
|
66
71
|
emits: ['update:modelValue', 'change', 'slideend'],
|
|
67
72
|
props: {
|
|
68
73
|
modelValue: [Number, Array],
|
package/slider/slider.cjs.js
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var BaseComponent = require('primevue/basecomponent');
|
|
3
4
|
var utils = require('primevue/utils');
|
|
4
5
|
var vue = require('vue');
|
|
5
6
|
|
|
7
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
+
|
|
9
|
+
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
|
10
|
+
|
|
6
11
|
var script = {
|
|
7
12
|
name: 'Slider',
|
|
13
|
+
extends: BaseComponent__default["default"],
|
|
8
14
|
emits: ['update:modelValue', 'change', 'slideend'],
|
|
9
15
|
props: {
|
|
10
16
|
modelValue: [Number, Array],
|
|
@@ -311,19 +317,19 @@ const _hoisted_2 = ["tabindex", "aria-valuemin", "aria-valuenow", "aria-valuemax
|
|
|
311
317
|
const _hoisted_3 = ["tabindex", "aria-valuemin", "aria-valuenow", "aria-valuemax", "aria-labelledby", "aria-label", "aria-orientation"];
|
|
312
318
|
|
|
313
319
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
314
|
-
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
315
|
-
class:
|
|
320
|
+
return (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
321
|
+
class: $options.containerClass,
|
|
316
322
|
onClick: _cache[15] || (_cache[15] = (...args) => ($options.onBarClick && $options.onBarClick(...args)))
|
|
317
|
-
}, [
|
|
318
|
-
vue.createElementVNode("span", {
|
|
323
|
+
}, _ctx.ptm('root')), [
|
|
324
|
+
vue.createElementVNode("span", vue.mergeProps({
|
|
319
325
|
class: "p-slider-range",
|
|
320
|
-
style:
|
|
321
|
-
}, null,
|
|
326
|
+
style: $options.rangeStyle
|
|
327
|
+
}, _ctx.ptm('range')), null, 16),
|
|
322
328
|
(!$props.range)
|
|
323
|
-
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
329
|
+
? (vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
|
|
324
330
|
key: 0,
|
|
325
331
|
class: "p-slider-handle",
|
|
326
|
-
style:
|
|
332
|
+
style: $options.handleStyle,
|
|
327
333
|
onTouchstart: _cache[0] || (_cache[0] = $event => ($options.onDragStart($event))),
|
|
328
334
|
onTouchmove: _cache[1] || (_cache[1] = $event => ($options.onDrag($event))),
|
|
329
335
|
onTouchend: _cache[2] || (_cache[2] = $event => ($options.onDragEnd($event))),
|
|
@@ -337,13 +343,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
337
343
|
"aria-labelledby": _ctx.ariaLabelledby,
|
|
338
344
|
"aria-label": _ctx.ariaLabel,
|
|
339
345
|
"aria-orientation": $props.orientation
|
|
340
|
-
}, null,
|
|
346
|
+
}, _ctx.ptm('handle')), null, 16, _hoisted_1))
|
|
341
347
|
: vue.createCommentVNode("", true),
|
|
342
348
|
($props.range)
|
|
343
|
-
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
349
|
+
? (vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
|
|
344
350
|
key: 1,
|
|
345
351
|
class: "p-slider-handle",
|
|
346
|
-
style:
|
|
352
|
+
style: $options.rangeStartHandleStyle,
|
|
347
353
|
onTouchstart: _cache[5] || (_cache[5] = $event => ($options.onDragStart($event, 0))),
|
|
348
354
|
onTouchmove: _cache[6] || (_cache[6] = $event => ($options.onDrag($event))),
|
|
349
355
|
onTouchend: _cache[7] || (_cache[7] = $event => ($options.onDragEnd($event))),
|
|
@@ -357,13 +363,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
357
363
|
"aria-labelledby": _ctx.ariaLabelledby,
|
|
358
364
|
"aria-label": _ctx.ariaLabel,
|
|
359
365
|
"aria-orientation": $props.orientation
|
|
360
|
-
}, null,
|
|
366
|
+
}, _ctx.ptm('startHandler')), null, 16, _hoisted_2))
|
|
361
367
|
: vue.createCommentVNode("", true),
|
|
362
368
|
($props.range)
|
|
363
|
-
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
369
|
+
? (vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
|
|
364
370
|
key: 2,
|
|
365
371
|
class: "p-slider-handle",
|
|
366
|
-
style:
|
|
372
|
+
style: $options.rangeEndHandleStyle,
|
|
367
373
|
onTouchstart: _cache[10] || (_cache[10] = $event => ($options.onDragStart($event, 1))),
|
|
368
374
|
onTouchmove: _cache[11] || (_cache[11] = $event => ($options.onDrag($event))),
|
|
369
375
|
onTouchend: _cache[12] || (_cache[12] = $event => ($options.onDragEnd($event))),
|
|
@@ -377,9 +383,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
377
383
|
"aria-labelledby": _ctx.ariaLabelledby,
|
|
378
384
|
"aria-label": _ctx.ariaLabel,
|
|
379
385
|
"aria-orientation": $props.orientation
|
|
380
|
-
}, null,
|
|
386
|
+
}, _ctx.ptm('endHandler')), null, 16, _hoisted_3))
|
|
381
387
|
: vue.createCommentVNode("", true)
|
|
382
|
-
],
|
|
388
|
+
], 16))
|
|
383
389
|
}
|
|
384
390
|
|
|
385
391
|
function styleInject(css, ref) {
|
package/slider/slider.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/
|
|
1
|
+
"use strict";var e=require("primevue/basecomponent"),t=require("primevue/utils"),i=require("vue");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n={name:"Slider",extends:a(e).default,emits:["update:modelValue","change","slideend"],props:{modelValue:[Number,Array],min:{type:Number,default:0},max:{type:Number,default:100},orientation:{type:String,default:"horizontal"},step:{type:Number,default:null},range:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},tabindex:{type:Number,default:0},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},dragging:!1,handleIndex:null,initX:null,initY:null,barWidth:null,barHeight:null,dragListener:null,dragEndListener:null,beforeUnmount(){this.unbindDragListeners()},methods:{updateDomData(){let e=this.$el.getBoundingClientRect();this.initX=e.left+t.DomHandler.getWindowScrollLeft(),this.initY=e.top+t.DomHandler.getWindowScrollTop(),this.barWidth=this.$el.offsetWidth,this.barHeight=this.$el.offsetHeight},setValue(e){let t,i=e.touches?e.touches[0].pageX:e.pageX,a=e.touches?e.touches[0].pageY:e.pageY;t="horizontal"===this.orientation?100*(i-this.initX)/this.barWidth:100*(this.initY+this.barHeight-a)/this.barHeight;let n=(this.max-this.min)*(t/100)+this.min;if(this.step){const e=this.range?this.modelValue[this.handleIndex]:this.modelValue,t=n-e;t<0?n=e+Math.ceil(n/this.step-e/this.step)*this.step:t>0&&(n=e+Math.floor(n/this.step-e/this.step)*this.step)}else n=Math.floor(n);this.updateModel(e,n)},updateModel(e,t){let i,a=parseFloat(t.toFixed(10));this.range?(i=this.modelValue?[...this.modelValue]:[],0==this.handleIndex?(a<this.min?a=this.min:a>=this.max&&(a=this.max),i[0]=a):(a>this.max?a=this.max:a<=this.min&&(a=this.min),i[1]=a)):(a<this.min?a=this.min:a>this.max&&(a=this.max),i=a),this.$emit("update:modelValue",i),this.$emit("change",i)},onDragStart(e,i){this.disabled||(t.DomHandler.addClass(this.$el,"p-slider-sliding"),this.dragging=!0,this.updateDomData(),this.range&&this.modelValue[0]===this.max?this.handleIndex=0:this.handleIndex=i,e.currentTarget.focus(),e.preventDefault())},onDrag(e){this.dragging&&(this.setValue(e),e.preventDefault())},onDragEnd(e){this.dragging&&(this.dragging=!1,t.DomHandler.removeClass(this.$el,"p-slider-sliding"),this.$emit("slideend",{originalEvent:e,value:this.modelValue}))},onBarClick(e){this.disabled||t.DomHandler.hasClass(e.target,"p-slider-handle")||(this.updateDomData(),this.setValue(e))},onMouseDown(e,t){this.bindDragListeners(),this.onDragStart(e,t)},onKeyDown(e,t){switch(this.handleIndex=t,e.code){case"ArrowDown":case"ArrowLeft":this.decrementValue(e,t),e.preventDefault();break;case"ArrowUp":case"ArrowRight":this.incrementValue(e,t),e.preventDefault();break;case"PageDown":this.decrementValue(e,t,!0),e.preventDefault();break;case"PageUp":this.incrementValue(e,t,!0),e.preventDefault();break;case"Home":this.updateModel(e,this.min),e.preventDefault();break;case"End":this.updateModel(e,this.max),e.preventDefault()}},decrementValue(e,t,i=!1){let a;a=this.range?this.step?this.modelValue[t]-this.step:this.modelValue[t]-1:this.step?this.modelValue-this.step:!this.step&&i?this.modelValue-10:this.modelValue-1,this.updateModel(e,a),e.preventDefault()},incrementValue(e,t,i=!1){let a;a=this.range?this.step?this.modelValue[t]+this.step:this.modelValue[t]+1:this.step?this.modelValue+this.step:!this.step&&i?this.modelValue+10:this.modelValue+1,this.updateModel(e,a),e.preventDefault()},bindDragListeners(){this.dragListener||(this.dragListener=this.onDrag.bind(this),document.addEventListener("mousemove",this.dragListener)),this.dragEndListener||(this.dragEndListener=this.onDragEnd.bind(this),document.addEventListener("mouseup",this.dragEndListener))},unbindDragListeners(){this.dragListener&&(document.removeEventListener("mousemove",this.dragListener),this.dragListener=null),this.dragEndListener&&(document.removeEventListener("mouseup",this.dragEndListener),this.dragEndListener=null)}},computed:{containerClass(){return["p-slider p-component",{"p-disabled":this.disabled,"p-slider-horizontal":"horizontal"===this.orientation,"p-slider-vertical":"vertical"===this.orientation}]},horizontal(){return"horizontal"===this.orientation},vertical(){return"vertical"===this.orientation},rangeStyle(){if(this.range){const e=this.rangeEndPosition>this.rangeStartPosition?this.rangeEndPosition-this.rangeStartPosition:this.rangeStartPosition-this.rangeEndPosition,t=this.rangeEndPosition>this.rangeStartPosition?this.rangeStartPosition:this.rangeEndPosition;return this.horizontal?{left:t+"%",width:e+"%"}:{bottom:t+"%",height:e+"%"}}return this.horizontal?{width:this.handlePosition+"%"}:{height:this.handlePosition+"%"}},handleStyle(){return this.horizontal?{left:this.handlePosition+"%"}:{bottom:this.handlePosition+"%"}},handlePosition(){return this.modelValue<this.min?0:this.modelValue>this.max?100:100*(this.modelValue-this.min)/(this.max-this.min)},rangeStartPosition(){return this.modelValue&&this.modelValue[0]?100*(this.modelValue[0]<this.min?0:this.modelValue[0]-this.min)/(this.max-this.min):0},rangeEndPosition(){return this.modelValue&&2===this.modelValue.length?100*(this.modelValue[1]>this.max?100:this.modelValue[1]-this.min)/(this.max-this.min):100},rangeStartHandleStyle(){return this.horizontal?{left:this.rangeStartPosition+"%"}:{bottom:this.rangeStartPosition+"%"}},rangeEndHandleStyle(){return this.horizontal?{left:this.rangeEndPosition+"%"}:{bottom:this.rangeEndPosition+"%"}}}};const l=["tabindex","aria-valuemin","aria-valuenow","aria-valuemax","aria-labelledby","aria-label","aria-orientation"],s=["tabindex","aria-valuemin","aria-valuenow","aria-valuemax","aria-labelledby","aria-label","aria-orientation"],r=["tabindex","aria-valuemin","aria-valuenow","aria-valuemax","aria-labelledby","aria-label","aria-orientation"];!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===i&&a.firstChild?a.insertBefore(n,a.firstChild):a.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-slider {\n position: relative;\n}\n.p-slider .p-slider-handle {\n position: absolute;\n cursor: grab;\n touch-action: none;\n display: block;\n}\n.p-slider-range {\n position: absolute;\n display: block;\n}\n.p-slider-horizontal .p-slider-range {\n top: 0;\n left: 0;\n height: 100%;\n}\n.p-slider-horizontal .p-slider-handle {\n top: 50%;\n}\n.p-slider-vertical {\n height: 100px;\n}\n.p-slider-vertical .p-slider-handle {\n left: 50%;\n}\n.p-slider-vertical .p-slider-range {\n bottom: 0;\n left: 0;\n width: 100%;\n}\n"),n.render=function(e,t,a,n,o,d){return i.openBlock(),i.createElementBlock("div",i.mergeProps({class:d.containerClass,onClick:t[15]||(t[15]=(...e)=>d.onBarClick&&d.onBarClick(...e))},e.ptm("root")),[i.createElementVNode("span",i.mergeProps({class:"p-slider-range",style:d.rangeStyle},e.ptm("range")),null,16),a.range?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("span",i.mergeProps({key:0,class:"p-slider-handle",style:d.handleStyle,onTouchstart:t[0]||(t[0]=e=>d.onDragStart(e)),onTouchmove:t[1]||(t[1]=e=>d.onDrag(e)),onTouchend:t[2]||(t[2]=e=>d.onDragEnd(e)),onMousedown:t[3]||(t[3]=e=>d.onMouseDown(e)),onKeydown:t[4]||(t[4]=e=>d.onKeyDown(e)),tabindex:a.tabindex,role:"slider","aria-valuemin":a.min,"aria-valuenow":a.modelValue,"aria-valuemax":a.max,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-orientation":a.orientation},e.ptm("handle")),null,16,l)),a.range?(i.openBlock(),i.createElementBlock("span",i.mergeProps({key:1,class:"p-slider-handle",style:d.rangeStartHandleStyle,onTouchstart:t[5]||(t[5]=e=>d.onDragStart(e,0)),onTouchmove:t[6]||(t[6]=e=>d.onDrag(e)),onTouchend:t[7]||(t[7]=e=>d.onDragEnd(e)),onMousedown:t[8]||(t[8]=e=>d.onMouseDown(e,0)),onKeydown:t[9]||(t[9]=e=>d.onKeyDown(e,0)),tabindex:a.tabindex,role:"slider","aria-valuemin":a.min,"aria-valuenow":a.modelValue?a.modelValue[0]:null,"aria-valuemax":a.max,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-orientation":a.orientation},e.ptm("startHandler")),null,16,s)):i.createCommentVNode("",!0),a.range?(i.openBlock(),i.createElementBlock("span",i.mergeProps({key:2,class:"p-slider-handle",style:d.rangeEndHandleStyle,onTouchstart:t[10]||(t[10]=e=>d.onDragStart(e,1)),onTouchmove:t[11]||(t[11]=e=>d.onDrag(e)),onTouchend:t[12]||(t[12]=e=>d.onDragEnd(e)),onMousedown:t[13]||(t[13]=e=>d.onMouseDown(e,1)),onKeydown:t[14]||(t[14]=e=>d.onKeyDown(e,1)),tabindex:a.tabindex,role:"slider","aria-valuemin":a.min,"aria-valuenow":a.modelValue?a.modelValue[1]:null,"aria-valuemax":a.max,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-orientation":a.orientation},e.ptm("endHandler")),null,16,r)):i.createCommentVNode("",!0)],16)},module.exports=n;
|