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/tooltip/tooltip.cjs.js
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var utils = require('primevue/utils');
|
|
4
4
|
|
|
5
|
+
let timer;
|
|
6
|
+
|
|
5
7
|
function bindEvents(el) {
|
|
6
8
|
const modifiers = el.$_ptooltipModifiers;
|
|
7
9
|
|
|
@@ -49,30 +51,45 @@ function unbindScrollListener(el) {
|
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
function onMouseEnter(event) {
|
|
52
|
-
|
|
54
|
+
const el = event.currentTarget;
|
|
55
|
+
const showDelay = el.$_ptooltipShowDelay;
|
|
56
|
+
|
|
57
|
+
show(el, showDelay);
|
|
53
58
|
}
|
|
54
59
|
|
|
55
60
|
function onMouseLeave(event) {
|
|
56
|
-
|
|
61
|
+
const el = event.currentTarget;
|
|
62
|
+
const hideDelay = el.$_ptooltipHideDelay;
|
|
63
|
+
|
|
64
|
+
hide(el, hideDelay);
|
|
57
65
|
}
|
|
58
66
|
|
|
59
67
|
function onFocus(event) {
|
|
60
|
-
|
|
68
|
+
const el = event.currentTarget;
|
|
69
|
+
const showDelay = el.$_ptooltipShowDelay;
|
|
70
|
+
|
|
71
|
+
show(el, showDelay);
|
|
61
72
|
}
|
|
62
73
|
|
|
63
74
|
function onBlur(event) {
|
|
64
|
-
|
|
75
|
+
const el = event.currentTarget;
|
|
76
|
+
const hideDelay = el.$_ptooltipHideDelay;
|
|
77
|
+
|
|
78
|
+
hide(el, hideDelay);
|
|
65
79
|
}
|
|
66
80
|
|
|
67
81
|
function onClick(event) {
|
|
68
|
-
|
|
82
|
+
const el = event.currentTarget;
|
|
83
|
+
const hideDelay = el.$_ptooltipHideDelay;
|
|
84
|
+
|
|
85
|
+
hide(el, hideDelay);
|
|
69
86
|
}
|
|
70
87
|
|
|
71
88
|
function onKeydown(event) {
|
|
72
|
-
event.code === 'Escape' && hide(event.currentTarget);
|
|
89
|
+
event.code === 'Escape' && hide(event.currentTarget, hideDelay);
|
|
73
90
|
}
|
|
74
91
|
|
|
75
|
-
function
|
|
92
|
+
function tooltipActions(el) {
|
|
76
93
|
if (el.$_ptooltipDisabled) {
|
|
77
94
|
return;
|
|
78
95
|
}
|
|
@@ -94,11 +111,29 @@ function show(el) {
|
|
|
94
111
|
utils.ZIndexUtils.set('tooltip', tooltipElement, el.$_ptooltipZIndex);
|
|
95
112
|
}
|
|
96
113
|
|
|
97
|
-
function
|
|
114
|
+
function show(el, showDelay) {
|
|
115
|
+
if (showDelay !== undefined) {
|
|
116
|
+
timer = setTimeout(() => tooltipActions(el), showDelay);
|
|
117
|
+
} else {
|
|
118
|
+
tooltipActions(el);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function tooltipRemoval(el) {
|
|
98
123
|
remove(el);
|
|
99
124
|
unbindScrollListener(el);
|
|
100
125
|
}
|
|
101
126
|
|
|
127
|
+
function hide(el, hideDelay) {
|
|
128
|
+
clearTimeout(timer);
|
|
129
|
+
|
|
130
|
+
if (hideDelay !== undefined) {
|
|
131
|
+
setTimeout(() => tooltipRemoval(el), hideDelay);
|
|
132
|
+
} else {
|
|
133
|
+
tooltipRemoval(el);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
102
137
|
function getTooltipElement(el) {
|
|
103
138
|
return document.getElementById(el.$_ptooltipId);
|
|
104
139
|
}
|
|
@@ -323,7 +358,8 @@ const Tooltip = {
|
|
|
323
358
|
target.$_ptooltipEscape = false;
|
|
324
359
|
target.$_ptooltipClass = null;
|
|
325
360
|
target.$_ptooltipFitContent = true;
|
|
326
|
-
target.$
|
|
361
|
+
target.$_ptooltipShowDelay = 0;
|
|
362
|
+
target.$_ptooltipHideDelay = 0;
|
|
327
363
|
} else if (typeof options.value === 'object' && options.value) {
|
|
328
364
|
if (utils.ObjectUtils.isEmpty(options.value.value) || options.value.value.trim() === '') return;
|
|
329
365
|
else {
|
|
@@ -334,6 +370,8 @@ const Tooltip = {
|
|
|
334
370
|
target.$_ptooltipClass = options.value.class;
|
|
335
371
|
target.$_ptooltipFitContent = !!options.value.fitContent === options.value.fitContent ? options.value.fitContent : true;
|
|
336
372
|
target.$_ptooltipIdAttr = options.value.id || '';
|
|
373
|
+
target.$_ptooltipShowDelay = options.value.showDelay || 0;
|
|
374
|
+
target.$_ptooltipHideDelay = options.value.hideDelay || 0;
|
|
337
375
|
}
|
|
338
376
|
}
|
|
339
377
|
|
|
@@ -365,6 +403,8 @@ const Tooltip = {
|
|
|
365
403
|
target.$_ptooltipEscape = false;
|
|
366
404
|
target.$_ptooltipClass = null;
|
|
367
405
|
target.$_ptooltipIdAttr = '';
|
|
406
|
+
target.$_ptooltipShowDelay = 0;
|
|
407
|
+
target.$_ptooltipHideDelay = 0;
|
|
368
408
|
|
|
369
409
|
bindEvents(target);
|
|
370
410
|
} else if (typeof options.value === 'object' && options.value) {
|
|
@@ -379,6 +419,8 @@ const Tooltip = {
|
|
|
379
419
|
target.$_ptooltipClass = options.value.class;
|
|
380
420
|
target.$_ptooltipFitContent = !!options.value.fitContent === options.value.fitContent ? options.value.fitContent : true;
|
|
381
421
|
target.$_ptooltipIdAttr = options.value.id || '';
|
|
422
|
+
target.$_ptooltipShowDelay = options.value.showDelay || 0;
|
|
423
|
+
target.$_ptooltipHideDelay = options.value.hideDelay || 0;
|
|
382
424
|
|
|
383
425
|
bindEvents(target);
|
|
384
426
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/utils");function
|
|
1
|
+
"use strict";var e=require("primevue/utils");let t;function o(e){e.$_ptooltipModifiers.focus?(e.addEventListener("focus",p),e.addEventListener("blur",a)):(e.addEventListener("mouseenter",i),e.addEventListener("mouseleave",n),e.addEventListener("click",r)),e.addEventListener("keydown",u)}function l(e){e.$_ptooltipModifiers.focus?(e.removeEventListener("focus",p),e.removeEventListener("blur",a)):(e.removeEventListener("mouseenter",i),e.removeEventListener("mouseleave",n),e.removeEventListener("click",r)),e.removeEventListener("keydown",u)}function i(e){const t=e.currentTarget;s(t,t.$_ptooltipShowDelay)}function n(e){const t=e.currentTarget;v(t,t.$_ptooltipHideDelay)}function p(e){const t=e.currentTarget;s(t,t.$_ptooltipShowDelay)}function a(e){const t=e.currentTarget;v(t,t.$_ptooltipHideDelay)}function r(e){const t=e.currentTarget;v(t,t.$_ptooltipHideDelay)}function u(e){"Escape"===e.code&&v(e.currentTarget,hideDelay)}function d(t){if(t.$_ptooltipDisabled)return;let o=function(t){const o=""!==t.$_ptooltipIdAttr?t.$_ptooltipIdAttr:e.UniqueComponentId()+"_tooltip";t.$_ptooltipId=o;let l=document.createElement("div");l.id=o;let i=document.createElement("div");i.className="p-tooltip-arrow",l.appendChild(i);let n=document.createElement("div");n.className="p-tooltip-text",t.$_ptooltipEscape?n.innerHTML=t.$_ptooltipValue:(n.innerHTML="",n.appendChild(document.createTextNode(t.$_ptooltipValue)));l.setAttribute("role","tooltip"),l.appendChild(n),document.body.appendChild(l),l.style.display="inline-block",t.$_ptooltipFitContent&&(l.style.width="fit-content");return l}(t);!function(e){const t=e.$_ptooltipModifiers;t.top?(y(e),h(e)&&(H(e),h(e)&&y(e))):t.left?(g(e),h(e)&&(_(e),h(e)&&(y(e),h(e)&&(H(e),h(e)&&g(e))))):t.bottom?(H(e),h(e)&&(y(e),h(e)&&H(e))):(_(e),h(e)&&(g(e),h(e)&&(y(e),h(e)&&(H(e),h(e)&&_(e)))))}(t),e.DomHandler.fadeIn(o,250),window.addEventListener("resize",(function o(){e.DomHandler.isTouchDevice()||v(t),this.removeEventListener("resize",o)})),function(t){t.$_ptooltipScrollHandler||(t.$_ptooltipScrollHandler=new e.ConnectedOverlayScrollHandler(t,(function(){v(t)}))),t.$_ptooltipScrollHandler.bindScrollListener()}(t),e.ZIndexUtils.set("tooltip",o,t.$_ptooltipZIndex)}function s(e,o){void 0!==o?t=setTimeout((()=>d(e)),o):d(e)}function c(e){m(e),function(e){e.$_ptooltipScrollHandler&&e.$_ptooltipScrollHandler.unbindScrollListener()}(e)}function v(e,o){clearTimeout(t),void 0!==o?setTimeout((()=>c(e)),o):c(e)}function f(e){return document.getElementById(e.$_ptooltipId)}function m(t){if(t){let o=f(t);o&&o.parentElement&&(e.ZIndexUtils.clear(o),document.body.removeChild(o)),t.$_ptooltipId=null}}function $(t){let o=t.getBoundingClientRect();return{left:o.left+e.DomHandler.getWindowScrollLeft(),top:o.top+e.DomHandler.getWindowScrollTop()}}function _(t){D(t,"right");let o=f(t),l=$(t),i=l.left+e.DomHandler.getOuterWidth(t),n=l.top+(e.DomHandler.getOuterHeight(t)-e.DomHandler.getOuterHeight(o))/2;o.style.left=i+"px",o.style.top=n+"px"}function g(t){D(t,"left");let o=f(t),l=$(t),i=l.left-e.DomHandler.getOuterWidth(o),n=l.top+(e.DomHandler.getOuterHeight(t)-e.DomHandler.getOuterHeight(o))/2;o.style.left=i+"px",o.style.top=n+"px"}function y(t){D(t,"top");let o=f(t),l=$(t),i=l.left+(e.DomHandler.getOuterWidth(t)-e.DomHandler.getOuterWidth(o))/2,n=l.top-e.DomHandler.getOuterHeight(o);o.style.left=i+"px",o.style.top=n+"px"}function H(t){D(t,"bottom");let o=f(t),l=$(t),i=l.left+(e.DomHandler.getOuterWidth(t)-e.DomHandler.getOuterWidth(o))/2,n=l.top+e.DomHandler.getOuterHeight(t);o.style.left=i+"px",o.style.top=n+"px"}function D(e,t){let o=f(e);o.style.left="-999px",o.style.top="-999px",o.className=`p-tooltip p-component p-tooltip-${t} ${e.$_ptooltipClass||""}`}function h(t){let o=f(t),l=o.getBoundingClientRect(),i=l.top,n=l.left,p=e.DomHandler.getOuterWidth(o),a=e.DomHandler.getOuterHeight(o),r=e.DomHandler.getViewport();return n+p>r.width||n<0||i<0||i+a>r.height}function b(t){return e.DomHandler.hasClass(t,"p-inputwrapper")?e.DomHandler.findSingle(t,"input"):t}function E(e){return e.modifiers&&Object.keys(e.modifiers).length?e.modifiers:e.arg&&"object"==typeof e.arg?Object.entries(e.arg).reduce(((e,[t,o])=>("event"!==t&&"position"!==t||(e[o]=!0),e)),{}):{}}const C={beforeMount(t,l){let i=b(t);if(i.$_ptooltipModifiers=E(l),l.value){if("string"==typeof l.value)i.$_ptooltipValue=l.value,i.$_ptooltipDisabled=!1,i.$_ptooltipEscape=!1,i.$_ptooltipClass=null,i.$_ptooltipFitContent=!0,i.$_ptooltipShowDelay=0,i.$_ptooltipHideDelay=0;else if("object"==typeof l.value&&l.value){if(e.ObjectUtils.isEmpty(l.value.value)||""===l.value.value.trim())return;i.$_ptooltipValue=l.value.value,i.$_ptooltipDisabled=!!l.value.disabled===l.value.disabled&&l.value.disabled,i.$_ptooltipEscape=!!l.value.escape===l.value.escape&&l.value.escape,i.$_ptooltipClass=l.value.class,i.$_ptooltipFitContent=!!l.value.fitContent!==l.value.fitContent||l.value.fitContent,i.$_ptooltipIdAttr=l.value.id||"",i.$_ptooltipShowDelay=l.value.showDelay||0,i.$_ptooltipHideDelay=l.value.hideDelay||0}i.$_ptooltipZIndex=l.instance.$primevue&&l.instance.$primevue.config&&l.instance.$primevue.config.zIndex.tooltip,o(i)}},unmounted(e){let t=b(e);m(t),l(t),t.$_ptooltipScrollHandler&&(t.$_ptooltipScrollHandler.destroy(),t.$_ptooltipScrollHandler=null)},updated(t,i){let n=b(t);if(n.$_ptooltipModifiers=E(i),i.value){if("string"==typeof i.value)n.$_ptooltipValue=i.value,n.$_ptooltipDisabled=!1,n.$_ptooltipEscape=!1,n.$_ptooltipClass=null,n.$_ptooltipIdAttr="",n.$_ptooltipShowDelay=0,n.$_ptooltipHideDelay=0,o(n);else if("object"==typeof i.value&&i.value){if(e.ObjectUtils.isEmpty(i.value.value)||""===i.value.value.trim())return void l(n);n.$_ptooltipValue=i.value.value,n.$_ptooltipDisabled=!!i.value.disabled===i.value.disabled&&i.value.disabled,n.$_ptooltipEscape=!!i.value.escape===i.value.escape&&i.value.escape,n.$_ptooltipClass=i.value.class,n.$_ptooltipFitContent=!!i.value.fitContent!==i.value.fitContent||i.value.fitContent,n.$_ptooltipIdAttr=i.value.id||"",n.$_ptooltipShowDelay=i.value.showDelay||0,n.$_ptooltipHideDelay=i.value.hideDelay||0,o(n)}}else l(n)}};module.exports=C;
|
package/tooltip/tooltip.esm.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { ObjectUtils,
|
|
1
|
+
import { ObjectUtils, ZIndexUtils, DomHandler, UniqueComponentId, ConnectedOverlayScrollHandler } from 'primevue/utils';
|
|
2
|
+
|
|
3
|
+
let timer;
|
|
2
4
|
|
|
3
5
|
function bindEvents(el) {
|
|
4
6
|
const modifiers = el.$_ptooltipModifiers;
|
|
@@ -47,30 +49,45 @@ function unbindScrollListener(el) {
|
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
function onMouseEnter(event) {
|
|
50
|
-
|
|
52
|
+
const el = event.currentTarget;
|
|
53
|
+
const showDelay = el.$_ptooltipShowDelay;
|
|
54
|
+
|
|
55
|
+
show(el, showDelay);
|
|
51
56
|
}
|
|
52
57
|
|
|
53
58
|
function onMouseLeave(event) {
|
|
54
|
-
|
|
59
|
+
const el = event.currentTarget;
|
|
60
|
+
const hideDelay = el.$_ptooltipHideDelay;
|
|
61
|
+
|
|
62
|
+
hide(el, hideDelay);
|
|
55
63
|
}
|
|
56
64
|
|
|
57
65
|
function onFocus(event) {
|
|
58
|
-
|
|
66
|
+
const el = event.currentTarget;
|
|
67
|
+
const showDelay = el.$_ptooltipShowDelay;
|
|
68
|
+
|
|
69
|
+
show(el, showDelay);
|
|
59
70
|
}
|
|
60
71
|
|
|
61
72
|
function onBlur(event) {
|
|
62
|
-
|
|
73
|
+
const el = event.currentTarget;
|
|
74
|
+
const hideDelay = el.$_ptooltipHideDelay;
|
|
75
|
+
|
|
76
|
+
hide(el, hideDelay);
|
|
63
77
|
}
|
|
64
78
|
|
|
65
79
|
function onClick(event) {
|
|
66
|
-
|
|
80
|
+
const el = event.currentTarget;
|
|
81
|
+
const hideDelay = el.$_ptooltipHideDelay;
|
|
82
|
+
|
|
83
|
+
hide(el, hideDelay);
|
|
67
84
|
}
|
|
68
85
|
|
|
69
86
|
function onKeydown(event) {
|
|
70
|
-
event.code === 'Escape' && hide(event.currentTarget);
|
|
87
|
+
event.code === 'Escape' && hide(event.currentTarget, hideDelay);
|
|
71
88
|
}
|
|
72
89
|
|
|
73
|
-
function
|
|
90
|
+
function tooltipActions(el) {
|
|
74
91
|
if (el.$_ptooltipDisabled) {
|
|
75
92
|
return;
|
|
76
93
|
}
|
|
@@ -92,11 +109,29 @@ function show(el) {
|
|
|
92
109
|
ZIndexUtils.set('tooltip', tooltipElement, el.$_ptooltipZIndex);
|
|
93
110
|
}
|
|
94
111
|
|
|
95
|
-
function
|
|
112
|
+
function show(el, showDelay) {
|
|
113
|
+
if (showDelay !== undefined) {
|
|
114
|
+
timer = setTimeout(() => tooltipActions(el), showDelay);
|
|
115
|
+
} else {
|
|
116
|
+
tooltipActions(el);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function tooltipRemoval(el) {
|
|
96
121
|
remove(el);
|
|
97
122
|
unbindScrollListener(el);
|
|
98
123
|
}
|
|
99
124
|
|
|
125
|
+
function hide(el, hideDelay) {
|
|
126
|
+
clearTimeout(timer);
|
|
127
|
+
|
|
128
|
+
if (hideDelay !== undefined) {
|
|
129
|
+
setTimeout(() => tooltipRemoval(el), hideDelay);
|
|
130
|
+
} else {
|
|
131
|
+
tooltipRemoval(el);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
100
135
|
function getTooltipElement(el) {
|
|
101
136
|
return document.getElementById(el.$_ptooltipId);
|
|
102
137
|
}
|
|
@@ -321,7 +356,8 @@ const Tooltip = {
|
|
|
321
356
|
target.$_ptooltipEscape = false;
|
|
322
357
|
target.$_ptooltipClass = null;
|
|
323
358
|
target.$_ptooltipFitContent = true;
|
|
324
|
-
target.$
|
|
359
|
+
target.$_ptooltipShowDelay = 0;
|
|
360
|
+
target.$_ptooltipHideDelay = 0;
|
|
325
361
|
} else if (typeof options.value === 'object' && options.value) {
|
|
326
362
|
if (ObjectUtils.isEmpty(options.value.value) || options.value.value.trim() === '') return;
|
|
327
363
|
else {
|
|
@@ -332,6 +368,8 @@ const Tooltip = {
|
|
|
332
368
|
target.$_ptooltipClass = options.value.class;
|
|
333
369
|
target.$_ptooltipFitContent = !!options.value.fitContent === options.value.fitContent ? options.value.fitContent : true;
|
|
334
370
|
target.$_ptooltipIdAttr = options.value.id || '';
|
|
371
|
+
target.$_ptooltipShowDelay = options.value.showDelay || 0;
|
|
372
|
+
target.$_ptooltipHideDelay = options.value.hideDelay || 0;
|
|
335
373
|
}
|
|
336
374
|
}
|
|
337
375
|
|
|
@@ -363,6 +401,8 @@ const Tooltip = {
|
|
|
363
401
|
target.$_ptooltipEscape = false;
|
|
364
402
|
target.$_ptooltipClass = null;
|
|
365
403
|
target.$_ptooltipIdAttr = '';
|
|
404
|
+
target.$_ptooltipShowDelay = 0;
|
|
405
|
+
target.$_ptooltipHideDelay = 0;
|
|
366
406
|
|
|
367
407
|
bindEvents(target);
|
|
368
408
|
} else if (typeof options.value === 'object' && options.value) {
|
|
@@ -377,6 +417,8 @@ const Tooltip = {
|
|
|
377
417
|
target.$_ptooltipClass = options.value.class;
|
|
378
418
|
target.$_ptooltipFitContent = !!options.value.fitContent === options.value.fitContent ? options.value.fitContent : true;
|
|
379
419
|
target.$_ptooltipIdAttr = options.value.id || '';
|
|
420
|
+
target.$_ptooltipShowDelay = options.value.showDelay || 0;
|
|
421
|
+
target.$_ptooltipHideDelay = options.value.hideDelay || 0;
|
|
380
422
|
|
|
381
423
|
bindEvents(target);
|
|
382
424
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ObjectUtils as t,
|
|
1
|
+
import{ObjectUtils as t,ZIndexUtils as e,DomHandler as o,UniqueComponentId as l,ConnectedOverlayScrollHandler as i}from"primevue/utils";let n;function p(t){t.$_ptooltipModifiers.focus?(t.addEventListener("focus",d),t.addEventListener("blur",s)):(t.addEventListener("mouseenter",u),t.addEventListener("mouseleave",r),t.addEventListener("click",c)),t.addEventListener("keydown",f)}function a(t){t.$_ptooltipModifiers.focus?(t.removeEventListener("focus",d),t.removeEventListener("blur",s)):(t.removeEventListener("mouseenter",u),t.removeEventListener("mouseleave",r),t.removeEventListener("click",c)),t.removeEventListener("keydown",f)}function u(t){const e=t.currentTarget;$(e,e.$_ptooltipShowDelay)}function r(t){const e=t.currentTarget;m(e,e.$_ptooltipHideDelay)}function d(t){const e=t.currentTarget;$(e,e.$_ptooltipShowDelay)}function s(t){const e=t.currentTarget;m(e,e.$_ptooltipHideDelay)}function c(t){const e=t.currentTarget;m(e,e.$_ptooltipHideDelay)}function f(t){"Escape"===t.code&&m(t.currentTarget,hideDelay)}function v(t){if(t.$_ptooltipDisabled)return;let n=function(t){const e=""!==t.$_ptooltipIdAttr?t.$_ptooltipIdAttr:l()+"_tooltip";t.$_ptooltipId=e;let o=document.createElement("div");o.id=e;let i=document.createElement("div");i.className="p-tooltip-arrow",o.appendChild(i);let n=document.createElement("div");n.className="p-tooltip-text",t.$_ptooltipEscape?n.innerHTML=t.$_ptooltipValue:(n.innerHTML="",n.appendChild(document.createTextNode(t.$_ptooltipValue)));o.setAttribute("role","tooltip"),o.appendChild(n),document.body.appendChild(o),o.style.display="inline-block",t.$_ptooltipFitContent&&(o.style.width="fit-content");return o}(t);!function(t){const e=t.$_ptooltipModifiers;e.top?(D(t),w(t)&&(H(t),w(t)&&D(t))):e.left?(E(t),w(t)&&(b(t),w(t)&&(D(t),w(t)&&(H(t),w(t)&&E(t))))):e.bottom?(H(t),w(t)&&(D(t),w(t)&&H(t))):(b(t),w(t)&&(E(t),w(t)&&(D(t),w(t)&&(H(t),w(t)&&b(t)))))}(t),o.fadeIn(n,250),window.addEventListener("resize",(function e(){o.isTouchDevice()||m(t),this.removeEventListener("resize",e)})),function(t){t.$_ptooltipScrollHandler||(t.$_ptooltipScrollHandler=new i(t,(function(){m(t)}))),t.$_ptooltipScrollHandler.bindScrollListener()}(t),e.set("tooltip",n,t.$_ptooltipZIndex)}function $(t,e){void 0!==e?n=setTimeout((()=>v(t)),e):v(t)}function _(t){y(t),function(t){t.$_ptooltipScrollHandler&&t.$_ptooltipScrollHandler.unbindScrollListener()}(t)}function m(t,e){clearTimeout(n),void 0!==e?setTimeout((()=>_(t)),e):_(t)}function g(t){return document.getElementById(t.$_ptooltipId)}function y(t){if(t){let o=g(t);o&&o.parentElement&&(e.clear(o),document.body.removeChild(o)),t.$_ptooltipId=null}}function h(t){let e=t.getBoundingClientRect();return{left:e.left+o.getWindowScrollLeft(),top:e.top+o.getWindowScrollTop()}}function b(t){C(t,"right");let e=g(t),l=h(t),i=l.left+o.getOuterWidth(t),n=l.top+(o.getOuterHeight(t)-o.getOuterHeight(e))/2;e.style.left=i+"px",e.style.top=n+"px"}function E(t){C(t,"left");let e=g(t),l=h(t),i=l.left-o.getOuterWidth(e),n=l.top+(o.getOuterHeight(t)-o.getOuterHeight(e))/2;e.style.left=i+"px",e.style.top=n+"px"}function D(t){C(t,"top");let e=g(t),l=h(t),i=l.left+(o.getOuterWidth(t)-o.getOuterWidth(e))/2,n=l.top-o.getOuterHeight(e);e.style.left=i+"px",e.style.top=n+"px"}function H(t){C(t,"bottom");let e=g(t),l=h(t),i=l.left+(o.getOuterWidth(t)-o.getOuterWidth(e))/2,n=l.top+o.getOuterHeight(t);e.style.left=i+"px",e.style.top=n+"px"}function C(t,e){let o=g(t);o.style.left="-999px",o.style.top="-999px",o.className=`p-tooltip p-component p-tooltip-${e} ${t.$_ptooltipClass||""}`}function w(t){let e=g(t),l=e.getBoundingClientRect(),i=l.top,n=l.left,p=o.getOuterWidth(e),a=o.getOuterHeight(e),u=o.getViewport();return n+p>u.width||n<0||i<0||i+a>u.height}function L(t){return o.hasClass(t,"p-inputwrapper")?o.findSingle(t,"input"):t}function S(t){return t.modifiers&&Object.keys(t.modifiers).length?t.modifiers:t.arg&&"object"==typeof t.arg?Object.entries(t.arg).reduce(((t,[e,o])=>("event"!==e&&"position"!==e||(t[o]=!0),t)),{}):{}}const x={beforeMount(e,o){let l=L(e);if(l.$_ptooltipModifiers=S(o),o.value){if("string"==typeof o.value)l.$_ptooltipValue=o.value,l.$_ptooltipDisabled=!1,l.$_ptooltipEscape=!1,l.$_ptooltipClass=null,l.$_ptooltipFitContent=!0,l.$_ptooltipShowDelay=0,l.$_ptooltipHideDelay=0;else if("object"==typeof o.value&&o.value){if(t.isEmpty(o.value.value)||""===o.value.value.trim())return;l.$_ptooltipValue=o.value.value,l.$_ptooltipDisabled=!!o.value.disabled===o.value.disabled&&o.value.disabled,l.$_ptooltipEscape=!!o.value.escape===o.value.escape&&o.value.escape,l.$_ptooltipClass=o.value.class,l.$_ptooltipFitContent=!!o.value.fitContent!==o.value.fitContent||o.value.fitContent,l.$_ptooltipIdAttr=o.value.id||"",l.$_ptooltipShowDelay=o.value.showDelay||0,l.$_ptooltipHideDelay=o.value.hideDelay||0}l.$_ptooltipZIndex=o.instance.$primevue&&o.instance.$primevue.config&&o.instance.$primevue.config.zIndex.tooltip,p(l)}},unmounted(t){let e=L(t);y(e),a(e),e.$_ptooltipScrollHandler&&(e.$_ptooltipScrollHandler.destroy(),e.$_ptooltipScrollHandler=null)},updated(e,o){let l=L(e);if(l.$_ptooltipModifiers=S(o),o.value){if("string"==typeof o.value)l.$_ptooltipValue=o.value,l.$_ptooltipDisabled=!1,l.$_ptooltipEscape=!1,l.$_ptooltipClass=null,l.$_ptooltipIdAttr="",l.$_ptooltipShowDelay=0,l.$_ptooltipHideDelay=0,p(l);else if("object"==typeof o.value&&o.value){if(t.isEmpty(o.value.value)||""===o.value.value.trim())return void a(l);l.$_ptooltipValue=o.value.value,l.$_ptooltipDisabled=!!o.value.disabled===o.value.disabled&&o.value.disabled,l.$_ptooltipEscape=!!o.value.escape===o.value.escape&&o.value.escape,l.$_ptooltipClass=o.value.class,l.$_ptooltipFitContent=!!o.value.fitContent!==o.value.fitContent||o.value.fitContent,l.$_ptooltipIdAttr=o.value.id||"",l.$_ptooltipShowDelay=o.value.showDelay||0,l.$_ptooltipHideDelay=o.value.hideDelay||0,p(l)}}else a(l)}};export{x as default};
|
package/tooltip/tooltip.js
CHANGED
|
@@ -2,6 +2,8 @@ this.primevue = this.primevue || {};
|
|
|
2
2
|
this.primevue.tooltip = (function (utils) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
+
let timer;
|
|
6
|
+
|
|
5
7
|
function bindEvents(el) {
|
|
6
8
|
const modifiers = el.$_ptooltipModifiers;
|
|
7
9
|
|
|
@@ -49,30 +51,45 @@ this.primevue.tooltip = (function (utils) {
|
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
function onMouseEnter(event) {
|
|
52
|
-
|
|
54
|
+
const el = event.currentTarget;
|
|
55
|
+
const showDelay = el.$_ptooltipShowDelay;
|
|
56
|
+
|
|
57
|
+
show(el, showDelay);
|
|
53
58
|
}
|
|
54
59
|
|
|
55
60
|
function onMouseLeave(event) {
|
|
56
|
-
|
|
61
|
+
const el = event.currentTarget;
|
|
62
|
+
const hideDelay = el.$_ptooltipHideDelay;
|
|
63
|
+
|
|
64
|
+
hide(el, hideDelay);
|
|
57
65
|
}
|
|
58
66
|
|
|
59
67
|
function onFocus(event) {
|
|
60
|
-
|
|
68
|
+
const el = event.currentTarget;
|
|
69
|
+
const showDelay = el.$_ptooltipShowDelay;
|
|
70
|
+
|
|
71
|
+
show(el, showDelay);
|
|
61
72
|
}
|
|
62
73
|
|
|
63
74
|
function onBlur(event) {
|
|
64
|
-
|
|
75
|
+
const el = event.currentTarget;
|
|
76
|
+
const hideDelay = el.$_ptooltipHideDelay;
|
|
77
|
+
|
|
78
|
+
hide(el, hideDelay);
|
|
65
79
|
}
|
|
66
80
|
|
|
67
81
|
function onClick(event) {
|
|
68
|
-
|
|
82
|
+
const el = event.currentTarget;
|
|
83
|
+
const hideDelay = el.$_ptooltipHideDelay;
|
|
84
|
+
|
|
85
|
+
hide(el, hideDelay);
|
|
69
86
|
}
|
|
70
87
|
|
|
71
88
|
function onKeydown(event) {
|
|
72
|
-
event.code === 'Escape' && hide(event.currentTarget);
|
|
89
|
+
event.code === 'Escape' && hide(event.currentTarget, hideDelay);
|
|
73
90
|
}
|
|
74
91
|
|
|
75
|
-
function
|
|
92
|
+
function tooltipActions(el) {
|
|
76
93
|
if (el.$_ptooltipDisabled) {
|
|
77
94
|
return;
|
|
78
95
|
}
|
|
@@ -94,11 +111,29 @@ this.primevue.tooltip = (function (utils) {
|
|
|
94
111
|
utils.ZIndexUtils.set('tooltip', tooltipElement, el.$_ptooltipZIndex);
|
|
95
112
|
}
|
|
96
113
|
|
|
97
|
-
function
|
|
114
|
+
function show(el, showDelay) {
|
|
115
|
+
if (showDelay !== undefined) {
|
|
116
|
+
timer = setTimeout(() => tooltipActions(el), showDelay);
|
|
117
|
+
} else {
|
|
118
|
+
tooltipActions(el);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function tooltipRemoval(el) {
|
|
98
123
|
remove(el);
|
|
99
124
|
unbindScrollListener(el);
|
|
100
125
|
}
|
|
101
126
|
|
|
127
|
+
function hide(el, hideDelay) {
|
|
128
|
+
clearTimeout(timer);
|
|
129
|
+
|
|
130
|
+
if (hideDelay !== undefined) {
|
|
131
|
+
setTimeout(() => tooltipRemoval(el), hideDelay);
|
|
132
|
+
} else {
|
|
133
|
+
tooltipRemoval(el);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
102
137
|
function getTooltipElement(el) {
|
|
103
138
|
return document.getElementById(el.$_ptooltipId);
|
|
104
139
|
}
|
|
@@ -323,7 +358,8 @@ this.primevue.tooltip = (function (utils) {
|
|
|
323
358
|
target.$_ptooltipEscape = false;
|
|
324
359
|
target.$_ptooltipClass = null;
|
|
325
360
|
target.$_ptooltipFitContent = true;
|
|
326
|
-
target.$
|
|
361
|
+
target.$_ptooltipShowDelay = 0;
|
|
362
|
+
target.$_ptooltipHideDelay = 0;
|
|
327
363
|
} else if (typeof options.value === 'object' && options.value) {
|
|
328
364
|
if (utils.ObjectUtils.isEmpty(options.value.value) || options.value.value.trim() === '') return;
|
|
329
365
|
else {
|
|
@@ -334,6 +370,8 @@ this.primevue.tooltip = (function (utils) {
|
|
|
334
370
|
target.$_ptooltipClass = options.value.class;
|
|
335
371
|
target.$_ptooltipFitContent = !!options.value.fitContent === options.value.fitContent ? options.value.fitContent : true;
|
|
336
372
|
target.$_ptooltipIdAttr = options.value.id || '';
|
|
373
|
+
target.$_ptooltipShowDelay = options.value.showDelay || 0;
|
|
374
|
+
target.$_ptooltipHideDelay = options.value.hideDelay || 0;
|
|
337
375
|
}
|
|
338
376
|
}
|
|
339
377
|
|
|
@@ -365,6 +403,8 @@ this.primevue.tooltip = (function (utils) {
|
|
|
365
403
|
target.$_ptooltipEscape = false;
|
|
366
404
|
target.$_ptooltipClass = null;
|
|
367
405
|
target.$_ptooltipIdAttr = '';
|
|
406
|
+
target.$_ptooltipShowDelay = 0;
|
|
407
|
+
target.$_ptooltipHideDelay = 0;
|
|
368
408
|
|
|
369
409
|
bindEvents(target);
|
|
370
410
|
} else if (typeof options.value === 'object' && options.value) {
|
|
@@ -379,6 +419,8 @@ this.primevue.tooltip = (function (utils) {
|
|
|
379
419
|
target.$_ptooltipClass = options.value.class;
|
|
380
420
|
target.$_ptooltipFitContent = !!options.value.fitContent === options.value.fitContent ? options.value.fitContent : true;
|
|
381
421
|
target.$_ptooltipIdAttr = options.value.id || '';
|
|
422
|
+
target.$_ptooltipShowDelay = options.value.showDelay || 0;
|
|
423
|
+
target.$_ptooltipHideDelay = options.value.hideDelay || 0;
|
|
382
424
|
|
|
383
425
|
bindEvents(target);
|
|
384
426
|
}
|
package/tooltip/tooltip.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.tooltip=function(
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.tooltip=function(e){"use strict";let t;function o(e){e.$_ptooltipModifiers.focus?(e.addEventListener("focus",p),e.addEventListener("blur",a)):(e.addEventListener("mouseenter",i),e.addEventListener("mouseleave",n),e.addEventListener("click",r)),e.addEventListener("keydown",u)}function l(e){e.$_ptooltipModifiers.focus?(e.removeEventListener("focus",p),e.removeEventListener("blur",a)):(e.removeEventListener("mouseenter",i),e.removeEventListener("mouseleave",n),e.removeEventListener("click",r)),e.removeEventListener("keydown",u)}function i(e){const t=e.currentTarget;s(t,t.$_ptooltipShowDelay)}function n(e){const t=e.currentTarget;v(t,t.$_ptooltipHideDelay)}function p(e){const t=e.currentTarget;s(t,t.$_ptooltipShowDelay)}function a(e){const t=e.currentTarget;v(t,t.$_ptooltipHideDelay)}function r(e){const t=e.currentTarget;v(t,t.$_ptooltipHideDelay)}function u(e){"Escape"===e.code&&v(e.currentTarget,hideDelay)}function d(t){if(t.$_ptooltipDisabled)return;let o=function(t){const o=""!==t.$_ptooltipIdAttr?t.$_ptooltipIdAttr:e.UniqueComponentId()+"_tooltip";t.$_ptooltipId=o;let l=document.createElement("div");l.id=o;let i=document.createElement("div");i.className="p-tooltip-arrow",l.appendChild(i);let n=document.createElement("div");n.className="p-tooltip-text",t.$_ptooltipEscape?n.innerHTML=t.$_ptooltipValue:(n.innerHTML="",n.appendChild(document.createTextNode(t.$_ptooltipValue)));l.setAttribute("role","tooltip"),l.appendChild(n),document.body.appendChild(l),l.style.display="inline-block",t.$_ptooltipFitContent&&(l.style.width="fit-content");return l}(t);!function(e){const t=e.$_ptooltipModifiers;t.top?(y(e),h(e)&&(H(e),h(e)&&y(e))):t.left?(g(e),h(e)&&(_(e),h(e)&&(y(e),h(e)&&(H(e),h(e)&&g(e))))):t.bottom?(H(e),h(e)&&(y(e),h(e)&&H(e))):(_(e),h(e)&&(g(e),h(e)&&(y(e),h(e)&&(H(e),h(e)&&_(e)))))}(t),e.DomHandler.fadeIn(o,250),window.addEventListener("resize",(function o(){e.DomHandler.isTouchDevice()||v(t),this.removeEventListener("resize",o)})),function(t){t.$_ptooltipScrollHandler||(t.$_ptooltipScrollHandler=new e.ConnectedOverlayScrollHandler(t,(function(){v(t)}))),t.$_ptooltipScrollHandler.bindScrollListener()}(t),e.ZIndexUtils.set("tooltip",o,t.$_ptooltipZIndex)}function s(e,o){void 0!==o?t=setTimeout((()=>d(e)),o):d(e)}function c(e){m(e),function(e){e.$_ptooltipScrollHandler&&e.$_ptooltipScrollHandler.unbindScrollListener()}(e)}function v(e,o){clearTimeout(t),void 0!==o?setTimeout((()=>c(e)),o):c(e)}function f(e){return document.getElementById(e.$_ptooltipId)}function m(t){if(t){let o=f(t);o&&o.parentElement&&(e.ZIndexUtils.clear(o),document.body.removeChild(o)),t.$_ptooltipId=null}}function $(t){let o=t.getBoundingClientRect();return{left:o.left+e.DomHandler.getWindowScrollLeft(),top:o.top+e.DomHandler.getWindowScrollTop()}}function _(t){D(t,"right");let o=f(t),l=$(t),i=l.left+e.DomHandler.getOuterWidth(t),n=l.top+(e.DomHandler.getOuterHeight(t)-e.DomHandler.getOuterHeight(o))/2;o.style.left=i+"px",o.style.top=n+"px"}function g(t){D(t,"left");let o=f(t),l=$(t),i=l.left-e.DomHandler.getOuterWidth(o),n=l.top+(e.DomHandler.getOuterHeight(t)-e.DomHandler.getOuterHeight(o))/2;o.style.left=i+"px",o.style.top=n+"px"}function y(t){D(t,"top");let o=f(t),l=$(t),i=l.left+(e.DomHandler.getOuterWidth(t)-e.DomHandler.getOuterWidth(o))/2,n=l.top-e.DomHandler.getOuterHeight(o);o.style.left=i+"px",o.style.top=n+"px"}function H(t){D(t,"bottom");let o=f(t),l=$(t),i=l.left+(e.DomHandler.getOuterWidth(t)-e.DomHandler.getOuterWidth(o))/2,n=l.top+e.DomHandler.getOuterHeight(t);o.style.left=i+"px",o.style.top=n+"px"}function D(e,t){let o=f(e);o.style.left="-999px",o.style.top="-999px",o.className=`p-tooltip p-component p-tooltip-${t} ${e.$_ptooltipClass||""}`}function h(t){let o=f(t),l=o.getBoundingClientRect(),i=l.top,n=l.left,p=e.DomHandler.getOuterWidth(o),a=e.DomHandler.getOuterHeight(o),r=e.DomHandler.getViewport();return n+p>r.width||n<0||i<0||i+a>r.height}function b(t){return e.DomHandler.hasClass(t,"p-inputwrapper")?e.DomHandler.findSingle(t,"input"):t}function E(e){return e.modifiers&&Object.keys(e.modifiers).length?e.modifiers:e.arg&&"object"==typeof e.arg?Object.entries(e.arg).reduce(((e,[t,o])=>("event"!==t&&"position"!==t||(e[o]=!0),e)),{}):{}}return{beforeMount(t,l){let i=b(t);if(i.$_ptooltipModifiers=E(l),l.value){if("string"==typeof l.value)i.$_ptooltipValue=l.value,i.$_ptooltipDisabled=!1,i.$_ptooltipEscape=!1,i.$_ptooltipClass=null,i.$_ptooltipFitContent=!0,i.$_ptooltipShowDelay=0,i.$_ptooltipHideDelay=0;else if("object"==typeof l.value&&l.value){if(e.ObjectUtils.isEmpty(l.value.value)||""===l.value.value.trim())return;i.$_ptooltipValue=l.value.value,i.$_ptooltipDisabled=!!l.value.disabled===l.value.disabled&&l.value.disabled,i.$_ptooltipEscape=!!l.value.escape===l.value.escape&&l.value.escape,i.$_ptooltipClass=l.value.class,i.$_ptooltipFitContent=!!l.value.fitContent!==l.value.fitContent||l.value.fitContent,i.$_ptooltipIdAttr=l.value.id||"",i.$_ptooltipShowDelay=l.value.showDelay||0,i.$_ptooltipHideDelay=l.value.hideDelay||0}i.$_ptooltipZIndex=l.instance.$primevue&&l.instance.$primevue.config&&l.instance.$primevue.config.zIndex.tooltip,o(i)}},unmounted(e){let t=b(e);m(t),l(t),t.$_ptooltipScrollHandler&&(t.$_ptooltipScrollHandler.destroy(),t.$_ptooltipScrollHandler=null)},updated(t,i){let n=b(t);if(n.$_ptooltipModifiers=E(i),i.value){if("string"==typeof i.value)n.$_ptooltipValue=i.value,n.$_ptooltipDisabled=!1,n.$_ptooltipEscape=!1,n.$_ptooltipClass=null,n.$_ptooltipIdAttr="",n.$_ptooltipShowDelay=0,n.$_ptooltipHideDelay=0,o(n);else if("object"==typeof i.value&&i.value){if(e.ObjectUtils.isEmpty(i.value.value)||""===i.value.value.trim())return void l(n);n.$_ptooltipValue=i.value.value,n.$_ptooltipDisabled=!!i.value.disabled===i.value.disabled&&i.value.disabled,n.$_ptooltipEscape=!!i.value.escape===i.value.escape&&i.value.escape,n.$_ptooltipClass=i.value.class,n.$_ptooltipFitContent=!!i.value.fitContent!==i.value.fitContent||i.value.fitContent,n.$_ptooltipIdAttr=i.value.id||"",n.$_ptooltipShowDelay=i.value.showDelay||0,n.$_ptooltipHideDelay=i.value.hideDelay||0,o(n)}}else l(n)}}}(primevue.utils);
|
package/tree/Tree.d.ts
CHANGED
|
@@ -10,6 +10,17 @@
|
|
|
10
10
|
import { VNode } from 'vue';
|
|
11
11
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
12
12
|
|
|
13
|
+
export declare type TreePassThroughOptionType = TreePassThroughAttributes | ((options: TreePassThroughMethodOptions) => TreePassThroughAttributes) | null | undefined;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Custom passthrough(pt) option method.
|
|
17
|
+
*/
|
|
18
|
+
export interface TreePassThroughMethodOptions {
|
|
19
|
+
props: TreeProps;
|
|
20
|
+
state: TreeState;
|
|
21
|
+
context: TreeContext;
|
|
22
|
+
}
|
|
23
|
+
|
|
13
24
|
/**
|
|
14
25
|
* Custom TreeNode metadata.
|
|
15
26
|
*/
|
|
@@ -90,6 +101,127 @@ export interface TreeSelectionKeys {
|
|
|
90
101
|
[key: string]: any;
|
|
91
102
|
}
|
|
92
103
|
|
|
104
|
+
/**
|
|
105
|
+
* Custom passthrough(pt) options.
|
|
106
|
+
* @see {@link TreeProps.pt}
|
|
107
|
+
*/
|
|
108
|
+
export interface TreePassThroughOptions {
|
|
109
|
+
/**
|
|
110
|
+
* Uses to pass attributes to the root's DOM element.
|
|
111
|
+
*/
|
|
112
|
+
root?: TreePassThroughOptionType;
|
|
113
|
+
/**
|
|
114
|
+
* Uses to pass attributes to the loading overlay's DOM element.
|
|
115
|
+
*/
|
|
116
|
+
loadingOverlay?: TreePassThroughOptionType;
|
|
117
|
+
/**
|
|
118
|
+
* Uses to pass attributes to the loading icon's DOM element.
|
|
119
|
+
*/
|
|
120
|
+
loadingIcon?: TreePassThroughOptionType;
|
|
121
|
+
/**
|
|
122
|
+
* Uses to pass attributes to the filter container's DOM element.
|
|
123
|
+
*/
|
|
124
|
+
filterContainer?: TreePassThroughOptionType;
|
|
125
|
+
/**
|
|
126
|
+
* Uses to pass attributes to the input's DOM element.
|
|
127
|
+
*/
|
|
128
|
+
input?: TreePassThroughOptionType;
|
|
129
|
+
/**
|
|
130
|
+
* Uses to pass attributes to the search icon's DOM element.
|
|
131
|
+
*/
|
|
132
|
+
searchIcon?: TreePassThroughOptionType;
|
|
133
|
+
/**
|
|
134
|
+
* Uses to pass attributes to the wrapper's DOM element.
|
|
135
|
+
*/
|
|
136
|
+
wrapper?: TreePassThroughOptionType;
|
|
137
|
+
/**
|
|
138
|
+
* Uses to pass attributes to the container's DOM element.
|
|
139
|
+
*/
|
|
140
|
+
container?: TreePassThroughOptionType;
|
|
141
|
+
/**
|
|
142
|
+
* Uses to pass attributes to the node's DOM element.
|
|
143
|
+
*/
|
|
144
|
+
node?: TreePassThroughOptionType;
|
|
145
|
+
/**
|
|
146
|
+
* Uses to pass attributes to the content's DOM element.
|
|
147
|
+
*/
|
|
148
|
+
content?: TreePassThroughOptionType;
|
|
149
|
+
/**
|
|
150
|
+
* Uses to pass attributes to the toggler's DOM element.
|
|
151
|
+
*/
|
|
152
|
+
toggler?: TreePassThroughOptionType;
|
|
153
|
+
/**
|
|
154
|
+
* Uses to pass attributes to the toggler icon's DOM element.
|
|
155
|
+
*/
|
|
156
|
+
togglerIcon?: TreePassThroughOptionType;
|
|
157
|
+
/**
|
|
158
|
+
* Uses to pass attributes to the checkbox container's DOM element.
|
|
159
|
+
*/
|
|
160
|
+
checkboxContainer?: TreePassThroughOptionType;
|
|
161
|
+
/**
|
|
162
|
+
* Uses to pass attributes to the checkbox's DOM element.
|
|
163
|
+
*/
|
|
164
|
+
checkbox?: TreePassThroughOptionType;
|
|
165
|
+
/**
|
|
166
|
+
* Uses to pass attributes to the checkbox icon's DOM element.
|
|
167
|
+
*/
|
|
168
|
+
checkboxIcon?: TreePassThroughOptionType;
|
|
169
|
+
/**
|
|
170
|
+
* Uses to pass attributes to the node icon's DOM element.
|
|
171
|
+
*/
|
|
172
|
+
nodeIcon?: TreePassThroughOptionType;
|
|
173
|
+
/**
|
|
174
|
+
* Uses to pass attributes to the label's DOM element.
|
|
175
|
+
*/
|
|
176
|
+
label?: TreePassThroughOptionType;
|
|
177
|
+
/**
|
|
178
|
+
* Uses to pass attributes to the subgroup's DOM element.
|
|
179
|
+
*/
|
|
180
|
+
subgroup?: TreePassThroughOptionType;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Custom passthrough attributes for each DOM elements
|
|
185
|
+
*/
|
|
186
|
+
export interface TreePassThroughAttributes {
|
|
187
|
+
[key: string]: any;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Defines current inline state in Tree component.
|
|
192
|
+
*/
|
|
193
|
+
export interface TreeState {
|
|
194
|
+
/**
|
|
195
|
+
* Current expanded keys state.
|
|
196
|
+
*/
|
|
197
|
+
d_expandedKeys: TreeExpandedKeys;
|
|
198
|
+
/**
|
|
199
|
+
* Current filter value state as a string.
|
|
200
|
+
*/
|
|
201
|
+
filterValue: string;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Defines current options in Tree component.
|
|
206
|
+
*/
|
|
207
|
+
export interface TreeContext {
|
|
208
|
+
/**
|
|
209
|
+
* Current expanded state of the node as a boolean.
|
|
210
|
+
* @defaultValue false
|
|
211
|
+
*/
|
|
212
|
+
expanded: boolean;
|
|
213
|
+
/**
|
|
214
|
+
* Current selected state of the node as a boolean.
|
|
215
|
+
* @defaultValue false
|
|
216
|
+
*/
|
|
217
|
+
selected: boolean;
|
|
218
|
+
/**
|
|
219
|
+
* Current checked state of the node as a boolean.
|
|
220
|
+
* @defaultValue false
|
|
221
|
+
*/
|
|
222
|
+
checked: boolean;
|
|
223
|
+
}
|
|
224
|
+
|
|
93
225
|
/**
|
|
94
226
|
* Defines valid properties in Tree component.
|
|
95
227
|
*/
|
|
@@ -161,6 +293,11 @@ export interface TreeProps {
|
|
|
161
293
|
* Identifier of the underlying menu element.
|
|
162
294
|
*/
|
|
163
295
|
'aria-labelledby'?: string | undefined;
|
|
296
|
+
/**
|
|
297
|
+
* Uses to pass attributes to DOM elements inside the component.
|
|
298
|
+
* @type {TreePassThroughOptions}
|
|
299
|
+
*/
|
|
300
|
+
pt?: TreePassThroughOptions;
|
|
164
301
|
}
|
|
165
302
|
|
|
166
303
|
/**
|