primevue 2.9.2 → 2.10.1
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/LICENSE.md +2 -2
- package/README.md +150 -3
- package/accordion/accordion.common.js +66 -72
- package/accordion/accordion.umd.js +66 -72
- package/accordion/accordion.umd.min.js +1 -1
- package/accordiontab/accordiontab.common.js +73 -103
- package/accordiontab/accordiontab.umd.js +73 -103
- package/accordiontab/accordiontab.umd.min.js +1 -1
- package/api/Api.d.ts +24 -2
- package/api/Api.js +0 -6
- package/api/FilterService.js +2 -55
- package/api/PrimeIcons.js +24 -2
- package/api/api.common.js +35 -98
- package/api/api.umd.js +35 -98
- package/api/api.umd.min.js +1 -1
- package/api/filterservice.common.js +11 -96
- package/api/filterservice.umd.js +11 -96
- package/api/primeicons.common.js +24 -2
- package/api/primeicons.umd.js +24 -2
- package/api/primeicons.umd.min.js +1 -1
- package/autocomplete/autocomplete.common.js +241 -293
- package/autocomplete/autocomplete.umd.js +241 -293
- package/autocomplete/autocomplete.umd.min.js +1 -1
- package/avatar/avatar.common.js +64 -61
- package/avatar/avatar.umd.js +64 -61
- package/avatar/avatar.umd.min.js +1 -1
- package/avatargroup/avatargroup.common.js +44 -47
- package/avatargroup/avatargroup.umd.js +44 -47
- package/avatargroup/avatargroup.umd.min.js +1 -1
- package/badge/badge.common.js +22 -23
- package/badge/badge.umd.js +22 -23
- package/badge/badge.umd.min.js +1 -1
- package/badgedirective/BadgeDirective.js +0 -13
- package/badgedirective/badgedirective.common.js +13 -71
- package/badgedirective/badgedirective.umd.js +13 -71
- package/blockui/blockui.common.js +79 -138
- package/blockui/blockui.umd.js +79 -138
- package/blockui/blockui.umd.min.js +1 -1
- package/breadcrumb/breadcrumb.common.js +130 -90
- package/breadcrumb/breadcrumb.umd.js +130 -90
- package/breadcrumb/breadcrumb.umd.min.js +1 -1
- package/breadcrumb/breadcrumbitem.common.js +67 -40
- package/breadcrumb/breadcrumbitem.umd.js +67 -40
- package/breadcrumb/breadcrumbitem.umd.min.js +1 -1
- package/button/Button.d.ts +2 -0
- package/button/Button.vue +10 -1
- package/button/button.common.js +64 -109
- package/button/button.umd.js +64 -109
- package/button/button.umd.min.js +1 -1
- package/calendar/Calendar.vue +7 -3
- package/calendar/calendar.common.js +714 -721
- package/calendar/calendar.umd.js +714 -721
- package/calendar/calendar.umd.min.js +1 -1
- package/card/card.common.js +59 -62
- package/card/card.umd.js +59 -62
- package/card/card.umd.min.js +1 -1
- package/carousel/carousel.common.js +190 -231
- package/carousel/carousel.umd.js +190 -231
- package/carousel/carousel.umd.min.js +1 -1
- package/cascadeselect/cascadeselect.common.js +230 -294
- package/cascadeselect/cascadeselect.umd.js +230 -294
- package/cascadeselect/cascadeselect.umd.min.js +1 -1
- package/cascadeselect/cascadeselectsub.common.js +101 -183
- package/cascadeselect/cascadeselectsub.umd.js +101 -183
- package/cascadeselect/cascadeselectsub.umd.min.js +1 -1
- package/cascadeselect/demo.html +4 -3
- package/chart/chart.common.js +77 -74
- package/chart/chart.umd.js +77 -74
- package/chart/chart.umd.min.js +1 -1
- package/checkbox/checkbox.common.js +70 -87
- package/checkbox/checkbox.umd.js +70 -87
- package/checkbox/checkbox.umd.min.js +1 -1
- package/chip/chip.common.js +66 -52
- package/chip/chip.umd.js +66 -52
- package/chip/chip.umd.min.js +1 -1
- package/chips/chips.common.js +122 -96
- package/chips/chips.umd.js +122 -96
- package/chips/chips.umd.min.js +1 -1
- package/colorpicker/colorpicker.common.js +149 -193
- package/colorpicker/colorpicker.umd.js +149 -193
- package/colorpicker/colorpicker.umd.min.js +1 -1
- package/column/column.common.js +13 -15
- package/column/column.umd.js +13 -15
- package/columngroup/columngroup.common.js +20 -25
- package/columngroup/columngroup.umd.js +20 -25
- package/columngroup/columngroup.umd.min.js +1 -1
- package/config/PrimeVue.js +0 -5
- package/config/primevue.common.js +35 -102
- package/config/primevue.umd.js +35 -102
- package/config/primevue.umd.min.js +1 -1
- package/confirmationeventbus/ConfirmationEventBus.js +0 -4
- package/confirmationeventbus/confirmationeventbus.common.js +0 -2
- package/confirmationeventbus/confirmationeventbus.umd.js +0 -2
- package/confirmationservice/ConfirmationService.js +0 -3
- package/confirmationservice/confirmationservice.common.js +0 -2
- package/confirmationservice/confirmationservice.umd.js +0 -2
- package/confirmdialog/confirmdialog.common.js +247 -218
- package/confirmdialog/confirmdialog.umd.js +247 -218
- package/confirmdialog/confirmdialog.umd.min.js +1 -1
- package/confirmpopup/confirmpopup.common.js +154 -196
- package/confirmpopup/confirmpopup.umd.js +154 -196
- package/confirmpopup/confirmpopup.umd.min.js +1 -1
- package/contextmenu/contextmenu.common.js +216 -206
- package/contextmenu/contextmenu.umd.js +216 -206
- package/contextmenu/contextmenu.umd.min.js +1 -1
- package/contextmenu/contextmenusub.common.js +138 -134
- package/contextmenu/contextmenusub.umd.js +138 -134
- package/contextmenu/contextmenusub.umd.min.js +1 -1
- package/contextmenu/demo.html +3 -4
- package/datatable/BodyCell.vue +11 -2
- package/datatable/ColumnFilter.vue +1 -1
- package/datatable/DataTable.vue +2 -12
- package/datatable/HeaderCheckbox.vue +5 -8
- package/datatable/bodycell.common.js +283 -246
- package/datatable/bodycell.umd.js +283 -246
- package/datatable/bodycell.umd.min.js +1 -1
- package/datatable/columnfilter.common.js +516 -422
- package/datatable/columnfilter.umd.js +516 -422
- package/datatable/columnfilter.umd.min.js +1 -1
- package/datatable/columnslot.common.js +13 -15
- package/datatable/columnslot.umd.js +13 -15
- package/datatable/datatable.common.js +2250 -1551
- package/datatable/datatable.umd.js +2250 -1551
- package/datatable/datatable.umd.min.js +1 -1
- package/datatable/footercell.common.js +56 -142
- package/datatable/footercell.umd.js +56 -142
- package/datatable/footercell.umd.min.js +1 -1
- package/datatable/headercell.common.js +666 -483
- package/datatable/headercell.umd.js +666 -483
- package/datatable/headercell.umd.min.js +1 -1
- package/datatable/headercheckbox.common.js +59 -33
- package/datatable/headercheckbox.umd.js +59 -33
- package/datatable/headercheckbox.umd.min.js +1 -1
- package/datatable/rowcheckbox.common.js +61 -30
- package/datatable/rowcheckbox.umd.js +61 -30
- package/datatable/rowcheckbox.umd.min.js +1 -1
- package/datatable/rowradiobutton.common.js +54 -27
- package/datatable/rowradiobutton.umd.js +54 -27
- package/datatable/rowradiobutton.umd.min.js +1 -1
- package/datatable/tablebody.common.js +461 -321
- package/datatable/tablebody.umd.js +461 -321
- package/datatable/tablebody.umd.min.js +1 -1
- package/datatable/tablefooter.common.js +94 -175
- package/datatable/tablefooter.umd.js +94 -175
- package/datatable/tablefooter.umd.min.js +1 -1
- package/datatable/tableheader.common.js +872 -539
- package/datatable/tableheader.umd.js +872 -539
- package/datatable/tableheader.umd.min.js +1 -1
- package/datatable/tableloadingbody.common.js +36 -29
- package/datatable/tableloadingbody.umd.js +36 -29
- package/datatable/tableloadingbody.umd.min.js +1 -1
- package/dataview/dataview.common.js +851 -720
- package/dataview/dataview.umd.js +851 -720
- package/dataview/dataview.umd.min.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.common.js +46 -30
- package/dataviewlayoutoptions/dataviewlayoutoptions.umd.js +46 -30
- package/dataviewlayoutoptions/dataviewlayoutoptions.umd.min.js +1 -1
- package/deferredcontent/deferredcontent.common.js +22 -28
- package/deferredcontent/deferredcontent.umd.js +22 -28
- package/deferredcontent/deferredcontent.umd.min.js +1 -1
- package/dialog/dialog.common.js +152 -179
- package/dialog/dialog.umd.js +152 -179
- package/dialog/dialog.umd.min.js +1 -1
- package/divider/divider.common.js +49 -49
- package/divider/divider.umd.js +49 -49
- package/divider/divider.umd.min.js +1 -1
- package/dock/dock.common.js +179 -95
- package/dock/dock.umd.js +179 -95
- package/dock/dock.umd.min.js +1 -1
- package/dock/docksub.common.js +132 -54
- package/dock/docksub.umd.js +132 -54
- package/dock/docksub.umd.min.js +1 -1
- package/dropdown/dropdown.common.js +233 -289
- package/dropdown/dropdown.umd.js +233 -289
- package/dropdown/dropdown.umd.min.js +1 -1
- package/editor/editor.common.js +194 -104
- package/editor/editor.umd.js +194 -104
- package/editor/editor.umd.min.js +3 -3
- package/fieldset/fieldset.common.js +133 -165
- package/fieldset/fieldset.umd.js +133 -165
- package/fieldset/fieldset.umd.min.js +1 -1
- package/fileupload/fileupload.common.js +431 -373
- package/fileupload/fileupload.umd.js +431 -373
- package/fileupload/fileupload.umd.min.js +1 -1
- package/fullcalendar/fullcalendar.common.js +75 -64
- package/fullcalendar/fullcalendar.umd.js +75 -64
- package/fullcalendar/fullcalendar.umd.min.js +4 -18
- package/galleria/galleria.common.js +403 -299
- package/galleria/galleria.umd.js +403 -299
- package/galleria/galleria.umd.min.js +1 -1
- package/galleria/galleriacontent.common.js +324 -235
- package/galleria/galleriacontent.umd.js +324 -235
- package/galleria/galleriacontent.umd.min.js +1 -1
- package/galleria/galleriaitem.common.js +127 -135
- package/galleria/galleriaitem.umd.js +127 -135
- package/galleria/galleriaitem.umd.min.js +1 -1
- package/galleria/galleriaitemslot.common.js +17 -25
- package/galleria/galleriaitemslot.umd.js +17 -25
- package/galleria/galleriathumbnails.common.js +125 -171
- package/galleria/galleriathumbnails.umd.js +125 -171
- package/galleria/galleriathumbnails.umd.min.js +1 -1
- package/imagepreview/imagepreview.common.js +174 -163
- package/imagepreview/imagepreview.umd.js +174 -163
- package/imagepreview/imagepreview.umd.min.js +1 -1
- package/inlinemessage/inlinemessage.common.js +61 -57
- package/inlinemessage/inlinemessage.umd.js +61 -57
- package/inlinemessage/inlinemessage.umd.min.js +1 -1
- package/inplace/inplace.common.js +139 -170
- package/inplace/inplace.umd.js +139 -170
- package/inplace/inplace.umd.min.js +1 -1
- package/inputmask/inputmask.common.js +51 -174
- package/inputmask/inputmask.umd.js +51 -174
- package/inputmask/inputmask.umd.min.js +1 -1
- package/inputnumber/InputNumber.vue +6 -3
- package/inputnumber/inputnumber.common.js +205 -293
- package/inputnumber/inputnumber.umd.js +205 -293
- package/inputnumber/inputnumber.umd.min.js +1 -1
- package/inputswitch/inputswitch.common.js +219 -37
- package/inputswitch/inputswitch.umd.js +219 -37
- package/inputswitch/inputswitch.umd.min.js +1 -1
- package/inputtext/inputtext.common.js +27 -28
- package/inputtext/inputtext.umd.js +27 -28
- package/inputtext/inputtext.umd.min.js +1 -1
- package/knob/knob.common.js +102 -74
- package/knob/knob.umd.js +102 -74
- package/knob/knob.umd.min.js +1 -1
- package/listbox/listbox.common.js +163 -237
- package/listbox/listbox.umd.js +163 -237
- package/listbox/listbox.umd.min.js +1 -1
- package/megamenu/MegaMenu.vue +2 -2
- package/megamenu/megamenu.common.js +273 -230
- package/megamenu/megamenu.umd.js +273 -230
- package/megamenu/megamenu.umd.min.js +1 -1
- package/menu/menu.common.js +201 -203
- package/menu/menu.umd.js +201 -203
- package/menu/menu.umd.min.js +1 -1
- package/menu/menuitem.common.js +95 -116
- package/menu/menuitem.umd.js +95 -116
- package/menu/menuitem.umd.min.js +1 -1
- package/menubar/menubar.common.js +223 -214
- package/menubar/menubar.umd.js +223 -214
- package/menubar/menubar.umd.min.js +1 -1
- package/menubar/menubarsub.common.js +142 -149
- package/menubar/menubarsub.umd.js +142 -149
- package/menubar/menubarsub.umd.min.js +1 -1
- package/message/message.common.js +108 -157
- package/message/message.umd.js +108 -157
- package/message/message.umd.min.js +1 -1
- package/multiselect/multiselect.common.js +291 -315
- package/multiselect/multiselect.umd.js +291 -315
- package/multiselect/multiselect.umd.min.js +1 -1
- package/orderlist/orderlist.common.js +206 -263
- package/orderlist/orderlist.umd.js +206 -263
- package/orderlist/orderlist.umd.min.js +1 -1
- package/organizationchart/organizationchart.common.js +188 -190
- package/organizationchart/organizationchart.umd.js +188 -190
- package/organizationchart/organizationchart.umd.min.js +1 -1
- package/organizationchart/organizationchartnode.common.js +122 -124
- package/organizationchart/organizationchartnode.umd.js +122 -124
- package/organizationchart/organizationchartnode.umd.min.js +1 -1
- package/overlayeventbus/OverlayEventBus.js +0 -4
- package/overlayeventbus/overlayeventbus.common.js +0 -2
- package/overlayeventbus/overlayeventbus.umd.js +0 -2
- package/overlaypanel/overlaypanel.common.js +108 -176
- package/overlaypanel/overlaypanel.umd.js +108 -176
- package/overlaypanel/overlaypanel.umd.min.js +1 -1
- package/package.json +3 -3
- package/paginator/currentpagereport.common.js +22 -22
- package/paginator/currentpagereport.umd.js +22 -22
- package/paginator/currentpagereport.umd.min.js +1 -1
- package/paginator/firstpagelink.common.js +44 -102
- package/paginator/firstpagelink.umd.js +44 -102
- package/paginator/firstpagelink.umd.min.js +1 -1
- package/paginator/jumptopagedropdown.common.js +254 -300
- package/paginator/jumptopagedropdown.umd.js +254 -300
- package/paginator/jumptopagedropdown.umd.min.js +1 -1
- package/paginator/jumptopageinput.common.js +225 -303
- package/paginator/jumptopageinput.umd.js +225 -303
- package/paginator/jumptopageinput.umd.min.js +1 -1
- package/paginator/lastpagelink.common.js +44 -102
- package/paginator/lastpagelink.umd.js +44 -102
- package/paginator/lastpagelink.umd.min.js +1 -1
- package/paginator/nextpagelink.common.js +44 -102
- package/paginator/nextpagelink.umd.js +44 -102
- package/paginator/nextpagelink.umd.min.js +1 -1
- package/paginator/pagelinks.common.js +54 -102
- package/paginator/pagelinks.umd.js +54 -102
- package/paginator/pagelinks.umd.min.js +1 -1
- package/paginator/paginator.common.js +741 -654
- package/paginator/paginator.umd.js +741 -654
- package/paginator/paginator.umd.min.js +1 -1
- package/paginator/prevpagelink.common.js +44 -102
- package/paginator/prevpagelink.umd.js +44 -102
- package/paginator/prevpagelink.umd.min.js +1 -1
- package/paginator/rowsperpagedropdown.common.js +253 -300
- package/paginator/rowsperpagedropdown.umd.js +253 -300
- package/paginator/rowsperpagedropdown.umd.min.js +1 -1
- package/panel/panel.common.js +129 -164
- package/panel/panel.umd.js +129 -164
- package/panel/panel.umd.min.js +1 -1
- package/panelmenu/panelmenu.common.js +235 -129
- package/panelmenu/panelmenu.umd.js +235 -129
- package/panelmenu/panelmenu.umd.min.js +1 -1
- package/panelmenu/panelmenusub.common.js +110 -55
- package/panelmenu/panelmenusub.umd.js +110 -55
- package/panelmenu/panelmenusub.umd.min.js +1 -1
- package/password/Password.vue +64 -14
- package/password/password.common.js +243 -239
- package/password/password.umd.js +243 -239
- package/password/password.umd.min.js +1 -1
- package/picklist/picklist.common.js +332 -323
- package/picklist/picklist.umd.js +332 -323
- package/picklist/picklist.umd.min.js +1 -1
- package/progressbar/progressbar.common.js +83 -76
- package/progressbar/progressbar.umd.js +83 -76
- package/progressbar/progressbar.umd.min.js +1 -1
- package/progressspinner/progressspinner.common.js +545 -45
- package/progressspinner/progressspinner.umd.js +545 -45
- package/progressspinner/progressspinner.umd.min.js +1 -1
- package/radiobutton/radiobutton.common.js +68 -83
- package/radiobutton/radiobutton.umd.js +68 -83
- package/radiobutton/radiobutton.umd.min.js +1 -1
- package/rating/rating.common.js +92 -68
- package/rating/rating.umd.js +92 -68
- package/rating/rating.umd.min.js +1 -1
- package/ripple/Ripple.js +0 -18
- package/ripple/ripple.common.js +13 -77
- package/ripple/ripple.umd.js +13 -77
- package/row/row.common.js +20 -25
- package/row/row.umd.js +20 -25
- package/row/row.umd.min.js +1 -1
- package/scrollpanel/scrollpanel.common.js +103 -154
- package/scrollpanel/scrollpanel.umd.js +103 -154
- package/scrollpanel/scrollpanel.umd.min.js +1 -1
- package/scrolltop/scrolltop.common.js +90 -132
- package/scrolltop/scrolltop.umd.js +90 -132
- package/scrolltop/scrolltop.umd.min.js +1 -1
- package/selectbutton/selectbutton.common.js +91 -171
- package/selectbutton/selectbutton.umd.js +91 -171
- package/selectbutton/selectbutton.umd.min.js +1 -1
- package/sidebar/Sidebar.d.ts +1 -0
- package/sidebar/Sidebar.vue +3 -0
- package/sidebar/sidebar.common.js +115 -166
- package/sidebar/sidebar.umd.js +115 -166
- package/sidebar/sidebar.umd.min.js +1 -1
- package/skeleton/skeleton.common.js +57 -57
- package/skeleton/skeleton.umd.js +57 -57
- package/skeleton/skeleton.umd.min.js +1 -1
- package/slider/Slider.vue +1 -1
- package/slider/slider.common.js +175 -166
- package/slider/slider.umd.js +175 -166
- package/slider/slider.umd.min.js +1 -1
- package/speeddial/SpeedDial.vue +2 -2
- package/speeddial/speeddial.common.js +186 -204
- package/speeddial/speeddial.umd.js +186 -204
- package/speeddial/speeddial.umd.min.js +1 -1
- package/splitbutton/splitbutton.common.js +327 -279
- package/splitbutton/splitbutton.umd.js +327 -279
- package/splitbutton/splitbutton.umd.min.js +1 -1
- package/splitter/splitter.common.js +70 -143
- package/splitter/splitter.umd.js +70 -143
- package/splitter/splitter.umd.min.js +1 -1
- package/splitterpanel/splitterpanel.common.js +13 -15
- package/splitterpanel/splitterpanel.umd.js +13 -15
- package/steps/steps.common.js +112 -77
- package/steps/steps.umd.js +112 -77
- package/steps/steps.umd.min.js +1 -1
- package/styleclass/StyleClass.js +0 -43
- package/styleclass/styleclass.common.js +13 -99
- package/styleclass/styleclass.umd.js +13 -99
- package/tabmenu/tabmenu.common.js +139 -165
- package/tabmenu/tabmenu.umd.js +139 -165
- package/tabmenu/tabmenu.umd.min.js +1 -1
- package/tabpanel/tabpanel.common.js +31 -26
- package/tabpanel/tabpanel.umd.js +31 -26
- package/tabpanel/tabpanel.umd.min.js +1 -1
- package/tabview/tabview.common.js +178 -220
- package/tabview/tabview.umd.js +178 -220
- package/tabview/tabview.umd.min.js +1 -1
- package/tag/tag.common.js +59 -59
- package/tag/tag.umd.js +59 -59
- package/tag/tag.umd.min.js +1 -1
- package/terminal/terminal.common.js +96 -68
- package/terminal/terminal.umd.js +96 -68
- package/terminal/terminal.umd.min.js +1 -1
- package/terminalservice/TerminalService.js +0 -3
- package/textarea/Textarea.vue +24 -1
- package/textarea/textarea.common.js +2083 -91
- package/textarea/textarea.umd.js +2083 -91
- package/textarea/textarea.umd.min.js +1 -1
- package/tieredmenu/demo.html +3 -4
- package/tieredmenu/tieredmenu.common.js +214 -219
- package/tieredmenu/tieredmenu.umd.js +214 -219
- package/tieredmenu/tieredmenu.umd.min.js +1 -1
- package/tieredmenu/tieredmenusub.common.js +142 -145
- package/tieredmenu/tieredmenusub.umd.js +142 -145
- package/tieredmenu/tieredmenusub.umd.min.js +1 -1
- package/timeline/timeline.common.js +101 -134
- package/timeline/timeline.umd.js +101 -134
- package/timeline/timeline.umd.min.js +1 -1
- package/toast/toast.common.js +145 -182
- package/toast/toast.umd.js +145 -182
- package/toast/toast.umd.min.js +1 -1
- package/toast/toastmessage.common.js +70 -115
- package/toast/toastmessage.umd.js +70 -115
- package/toast/toastmessage.umd.min.js +1 -1
- package/toastservice/ToastEventBus.js +0 -3
- package/toastservice/ToastService.js +0 -3
- package/togglebutton/togglebutton.common.js +54 -103
- package/togglebutton/togglebutton.umd.js +54 -103
- package/togglebutton/togglebutton.umd.min.js +1 -1
- package/toolbar/toolbar.common.js +46 -47
- package/toolbar/toolbar.umd.js +46 -47
- package/toolbar/toolbar.umd.min.js +1 -1
- package/tooltip/Tooltip.js +4 -84
- package/tooltip/tooltip.common.js +17 -133
- package/tooltip/tooltip.umd.js +17 -133
- package/tree/tree.common.js +227 -316
- package/tree/tree.umd.js +227 -316
- package/tree/tree.umd.min.js +1 -1
- package/tree/treenode.common.js +108 -158
- package/tree/treenode.umd.js +108 -158
- package/tree/treenode.umd.min.js +1 -1
- package/treetable/footercell.common.js +49 -141
- package/treetable/footercell.umd.js +49 -141
- package/treetable/footercell.umd.min.js +1 -1
- package/treetable/headercell.common.js +68 -153
- package/treetable/headercell.umd.js +68 -153
- package/treetable/headercell.umd.min.js +1 -1
- package/treetable/treetable.common.js +1086 -1044
- package/treetable/treetable.umd.js +1086 -1044
- package/treetable/treetable.umd.min.js +1 -1
- package/treetable/treetablecolumnslot.common.js +13 -15
- package/treetable/treetablecolumnslot.umd.js +13 -15
- package/treetable/treetablerow.common.js +113 -194
- package/treetable/treetablerow.umd.js +113 -194
- package/treetable/treetablerow.umd.min.js +1 -1
- package/treetable/treetablerowloader.common.js +115 -214
- package/treetable/treetablerowloader.umd.js +115 -214
- package/treetable/treetablerowloader.umd.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.common.js +59 -38
- package/tristatecheckbox/tristatecheckbox.umd.js +59 -38
- package/tristatecheckbox/tristatecheckbox.umd.min.js +1 -1
- package/utils/ConnectedOverlayScrollHandler.js +0 -12
- package/utils/DomHandler.js +13 -61
- package/utils/EventBus.js +0 -3
- package/utils/ObjectUtils.js +9 -51
- package/utils/UniqueComponentId.js +0 -1
- package/utils/Utils.js +0 -6
- package/utils/connectedoverlayscrollhandler.common.js +13 -70
- package/utils/connectedoverlayscrollhandler.umd.js +13 -70
- package/utils/domhandler.common.js +13 -63
- package/utils/domhandler.umd.js +13 -63
- package/utils/eventbus.common.js +0 -2
- package/utils/eventbus.umd.js +0 -2
- package/utils/objectutils.common.js +9 -52
- package/utils/objectutils.umd.js +9 -52
- package/utils/utils.common.js +22 -119
- package/utils/utils.umd.js +22 -119
- package/vetur-attributes.json +8 -0
- package/vetur-tags.json +3 -1
- package/web-types.json +28 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["toolbar"]=t():e["toolbar"]=t()})("undefined"!==typeof self?self:this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="fb15")}({2350:function(e,t){function n(e,t){var n=e[1]||"",o=e[3];if(!o)return n;if(t&&"function"===typeof btoa){var i=r(o),a=o.sources.map((function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"}));return[n].concat(a).concat([i]).join("\n")}return[n].join("\n")}function r(e){var t=btoa(unescape(encodeURIComponent(JSON.stringify(e)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,"+t;return"/*# "+n+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=n(t,e);return t[2]?"@media "+t[2]+"{"+r+"}":r})).join("")},t.i=function(e,n){"string"===typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"===typeof i&&(r[i]=!0)}for(o=0;o<e.length;o++){var a=e[o];"number"===typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},"499e":function(e,t,n){"use strict";function r(e,t){for(var n=[],r={},o=0;o<t.length;o++){var i=t[o],a=i[0],s=i[1],u=i[2],f=i[3],c={id:e+":"+o,css:s,media:u,sourceMap:f};r[a]?r[a].parts.push(c):n.push(r[a]={id:a,parts:[c]})}return n}n.r(t),n.d(t,"default",(function(){return v}));var o="undefined"!==typeof document;if("undefined"!==typeof DEBUG&&DEBUG&&!o)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var i={},a=o&&(document.head||document.getElementsByTagName("head")[0]),s=null,u=0,f=!1,c=function(){},l=null,d="data-vue-ssr-id",p="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function v(e,t,n,o){f=n,l=o||{};var a=r(e,t);return h(a),function(t){for(var n=[],o=0;o<a.length;o++){var s=a[o],u=i[s.id];u.refs--,n.push(u)}t?(a=r(e,t),h(a)):a=[];for(o=0;o<n.length;o++){u=n[o];if(0===u.refs){for(var f=0;f<u.parts.length;f++)u.parts[f]();delete i[u.id]}}}}function h(e){for(var t=0;t<e.length;t++){var n=e[t],r=i[n.id];if(r){r.refs++;for(var o=0;o<r.parts.length;o++)r.parts[o](n.parts[o]);for(;o<n.parts.length;o++)r.parts.push(
|
|
1
|
+
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["toolbar"]=t():e["toolbar"]=t()})("undefined"!==typeof self?self:this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="fb15")}({2350:function(e,t){function n(e,t){var n=e[1]||"",o=e[3];if(!o)return n;if(t&&"function"===typeof btoa){var i=r(o),a=o.sources.map((function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"}));return[n].concat(a).concat([i]).join("\n")}return[n].join("\n")}function r(e){var t=btoa(unescape(encodeURIComponent(JSON.stringify(e)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,"+t;return"/*# "+n+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=n(t,e);return t[2]?"@media "+t[2]+"{"+r+"}":r})).join("")},t.i=function(e,n){"string"===typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"===typeof i&&(r[i]=!0)}for(o=0;o<e.length;o++){var a=e[o];"number"===typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},"499e":function(e,t,n){"use strict";function r(e,t){for(var n=[],r={},o=0;o<t.length;o++){var i=t[o],a=i[0],s=i[1],u=i[2],f=i[3],c={id:e+":"+o,css:s,media:u,sourceMap:f};r[a]?r[a].parts.push(c):n.push(r[a]={id:a,parts:[c]})}return n}n.r(t),n.d(t,"default",(function(){return v}));var o="undefined"!==typeof document;if("undefined"!==typeof DEBUG&&DEBUG&&!o)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var i={},a=o&&(document.head||document.getElementsByTagName("head")[0]),s=null,u=0,f=!1,c=function(){},l=null,d="data-vue-ssr-id",p="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function v(e,t,n,o){f=n,l=o||{};var a=r(e,t);return h(a),function(t){for(var n=[],o=0;o<a.length;o++){var s=a[o],u=i[s.id];u.refs--,n.push(u)}t?(a=r(e,t),h(a)):a=[];for(o=0;o<n.length;o++){u=n[o];if(0===u.refs){for(var f=0;f<u.parts.length;f++)u.parts[f]();delete i[u.id]}}}}function h(e){for(var t=0;t<e.length;t++){var n=e[t],r=i[n.id];if(r){r.refs++;for(var o=0;o<r.parts.length;o++)r.parts[o](n.parts[o]);for(;o<n.parts.length;o++)r.parts.push(g(n.parts[o]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(o=0;o<n.parts.length;o++)a.push(g(n.parts[o]));i[n.id]={id:n.id,refs:1,parts:a}}}}function b(){var e=document.createElement("style");return e.type="text/css",a.appendChild(e),e}function g(e){var t,n,r=document.querySelector("style["+d+'~="'+e.id+'"]');if(r){if(f)return c;r.parentNode.removeChild(r)}if(p){var o=u++;r=s||(s=b()),t=y.bind(null,r,o,!1),n=y.bind(null,r,o,!0)}else r=b(),t=x.bind(null,r),n=function(){r.parentNode.removeChild(r)};return t(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;t(e=r)}else n()}}var m=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}();function y(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=m(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function x(e,t){var n=t.css,r=t.media,o=t.sourceMap;if(r&&e.setAttribute("media",r),l.ssrId&&e.setAttribute(d,t.id),o&&(n+="\n/*# sourceURL="+o.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{while(e.firstChild)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}},"4b86":function(e,t,n){t=e.exports=n("2350")(!1),t.push([e.i,".p-toolbar{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:wrap;flex-wrap:wrap}.p-toolbar,.p-toolbar-group-left,.p-toolbar-group-right{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}",""])},"81cb":function(e,t,n){"use strict";n("a193")},a193:function(e,t,n){var r=n("4b86");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);var o=n("499e").default;o("8521731a",r,!0,{sourceMap:!1,shadowMode:!1})},f6fd:function(e,t){(function(e){var t="currentScript",n=e.getElementsByTagName("script");t in e||Object.defineProperty(e,t,{get:function(){try{throw new Error}catch(r){var e,t=(/.*at [^\(]*\((.*):.+:.+\)$/gi.exec(r.stack)||[!1])[1];for(e in n)if(n[e].src==t||"interactive"==n[e].readyState)return n[e];return null}}})})(document)},fb15:function(e,t,n){"use strict";var r;(n.r(t),"undefined"!==typeof window)&&(n("f6fd"),(r=window.document.currentScript)&&(r=r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(n.p=r[1]));var o=function(){var e=this,t=e._self._c;return t("div",{staticClass:"p-toolbar p-component",attrs:{role:"toolbar"}},[t("div",{staticClass:"p-toolbar-group-left"},[e._t("start")],2),t("div",{staticClass:"p-toolbar-group-right"},[e._t("end")],2)])},i=[],a={},s=a;n("81cb");function u(e,t,n,r,o,i,a,s){var u,f="function"===typeof e?e.options:e;if(t&&(f.render=t,f.staticRenderFns=n,f._compiled=!0),r&&(f.functional=!0),i&&(f._scopeId="data-v-"+i),a?(u=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},f._ssrRegister=u):o&&(u=s?function(){o.call(this,(f.functional?this.parent:this).$root.$options.shadowRoot)}:o),u)if(f.functional){f._injectStyles=u;var c=f.render;f.render=function(e,t){return u.call(t),c(e,t)}}else{var l=f.beforeCreate;f.beforeCreate=l?[].concat(l,u):[u]}return{exports:e,options:f}}var f=u(s,o,i,!1,null,null,null),c=f.exports;t["default"]=c}})["default"]}));
|
package/tooltip/Tooltip.js
CHANGED
|
@@ -4,32 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _UniqueComponentId = _interopRequireDefault(require("../utils/UniqueComponentId"));
|
|
9
|
-
|
|
10
8
|
var _DomHandler = _interopRequireDefault(require("../utils/DomHandler"));
|
|
11
|
-
|
|
12
9
|
var _ConnectedOverlayScrollHandler = _interopRequireDefault(require("../utils/ConnectedOverlayScrollHandler"));
|
|
13
|
-
|
|
14
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
11
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
17
|
-
|
|
18
12
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
19
|
-
|
|
20
13
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
21
|
-
|
|
22
14
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
23
|
-
|
|
24
15
|
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
25
|
-
|
|
26
16
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
27
|
-
|
|
28
17
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
29
|
-
|
|
30
18
|
function bindEvents(el) {
|
|
31
19
|
var modifiers = el.$_ptooltipModifiers;
|
|
32
|
-
|
|
33
20
|
if (modifiers.focus) {
|
|
34
21
|
el.addEventListener('focus', onFocus);
|
|
35
22
|
el.addEventListener('blur', onBlur);
|
|
@@ -39,10 +26,8 @@ function bindEvents(el) {
|
|
|
39
26
|
el.addEventListener('click', onClick);
|
|
40
27
|
}
|
|
41
28
|
}
|
|
42
|
-
|
|
43
29
|
function unbindEvents(el) {
|
|
44
30
|
var modifiers = el.$_ptooltipModifiers;
|
|
45
|
-
|
|
46
31
|
if (modifiers.focus) {
|
|
47
32
|
el.removeEventListener('focus', onFocus);
|
|
48
33
|
el.removeEventListener('blur', onBlur);
|
|
@@ -52,73 +37,57 @@ function unbindEvents(el) {
|
|
|
52
37
|
el.removeEventListener('click', onClick);
|
|
53
38
|
}
|
|
54
39
|
}
|
|
55
|
-
|
|
56
40
|
function bindScrollListener(el) {
|
|
57
41
|
if (!el.$_ptooltipScrollHandler) {
|
|
58
42
|
el.$_ptooltipScrollHandler = new _ConnectedOverlayScrollHandler.default(el, function () {
|
|
59
43
|
hide(el);
|
|
60
44
|
});
|
|
61
45
|
}
|
|
62
|
-
|
|
63
46
|
el.$_ptooltipScrollHandler.bindScrollListener();
|
|
64
47
|
}
|
|
65
|
-
|
|
66
48
|
function unbindScrollListener(el) {
|
|
67
49
|
if (el.$_ptooltipScrollHandler) {
|
|
68
50
|
el.$_ptooltipScrollHandler.unbindScrollListener();
|
|
69
51
|
}
|
|
70
52
|
}
|
|
71
|
-
|
|
72
53
|
function onMouseEnter(event) {
|
|
73
54
|
show(event.currentTarget);
|
|
74
55
|
}
|
|
75
|
-
|
|
76
56
|
function onMouseLeave(event) {
|
|
77
57
|
hide(event.currentTarget);
|
|
78
58
|
}
|
|
79
|
-
|
|
80
59
|
function onFocus(event) {
|
|
81
60
|
show(event.currentTarget);
|
|
82
61
|
}
|
|
83
|
-
|
|
84
62
|
function onBlur(event) {
|
|
85
63
|
hide(event.currentTarget);
|
|
86
64
|
}
|
|
87
|
-
|
|
88
65
|
function onClick(event) {
|
|
89
66
|
hide(event.currentTarget);
|
|
90
67
|
}
|
|
91
|
-
|
|
92
68
|
function show(el) {
|
|
93
69
|
if (el.$_ptooltipDisabled) {
|
|
94
70
|
return;
|
|
95
71
|
}
|
|
96
|
-
|
|
97
72
|
var tooltipElement = create(el);
|
|
98
73
|
align(el);
|
|
99
|
-
|
|
100
74
|
_DomHandler.default.fadeIn(tooltipElement, 250);
|
|
101
|
-
|
|
102
75
|
tooltipElement.style.zIndex = ++_DomHandler.default.zindex;
|
|
103
76
|
window.addEventListener('resize', function onWindowResize() {
|
|
104
77
|
if (!_DomHandler.default.isAndroid()) {
|
|
105
78
|
hide(el);
|
|
106
79
|
}
|
|
107
|
-
|
|
108
80
|
this.removeEventListener('resize', onWindowResize);
|
|
109
81
|
});
|
|
110
82
|
bindScrollListener(el);
|
|
111
83
|
}
|
|
112
|
-
|
|
113
84
|
function hide(el) {
|
|
114
85
|
remove(el);
|
|
115
86
|
unbindScrollListener(el);
|
|
116
87
|
}
|
|
117
|
-
|
|
118
88
|
function getTooltipElement(el) {
|
|
119
89
|
return document.getElementById(el.$_ptooltipId);
|
|
120
90
|
}
|
|
121
|
-
|
|
122
91
|
function create(el) {
|
|
123
92
|
var id = (0, _UniqueComponentId.default)() + '_tooltip';
|
|
124
93
|
el.$_ptooltipId = id;
|
|
@@ -129,57 +98,44 @@ function create(el) {
|
|
|
129
98
|
container.appendChild(tooltipArrow);
|
|
130
99
|
var tooltipText = document.createElement('div');
|
|
131
100
|
tooltipText.className = 'p-tooltip-text';
|
|
132
|
-
|
|
133
101
|
if (el.$_ptooltipEscape) {
|
|
134
102
|
tooltipText.innerHTML = el.$_ptooltipValue;
|
|
135
103
|
} else {
|
|
136
104
|
tooltipText.innerHTML = '';
|
|
137
105
|
tooltipText.appendChild(document.createTextNode(el.$_ptooltipValue));
|
|
138
106
|
}
|
|
139
|
-
|
|
140
107
|
container.appendChild(tooltipText);
|
|
141
108
|
document.body.appendChild(container);
|
|
142
109
|
container.style.display = 'inline-block';
|
|
143
110
|
return container;
|
|
144
111
|
}
|
|
145
|
-
|
|
146
112
|
function remove(el) {
|
|
147
113
|
if (el) {
|
|
148
114
|
var tooltipElement = getTooltipElement(el);
|
|
149
|
-
|
|
150
115
|
if (tooltipElement && tooltipElement.parentElement) {
|
|
151
116
|
document.body.removeChild(tooltipElement);
|
|
152
117
|
}
|
|
153
|
-
|
|
154
118
|
el.$_ptooltipId = null;
|
|
155
119
|
}
|
|
156
120
|
}
|
|
157
|
-
|
|
158
121
|
function align(el) {
|
|
159
122
|
var modifiers = el.$_ptooltipModifiers;
|
|
160
|
-
|
|
161
123
|
if (modifiers.top) {
|
|
162
124
|
alignTop(el);
|
|
163
|
-
|
|
164
125
|
if (isOutOfBounds(el)) {
|
|
165
126
|
alignBottom(el);
|
|
166
|
-
|
|
167
127
|
if (isOutOfBounds(el)) {
|
|
168
128
|
alignTop(el);
|
|
169
129
|
}
|
|
170
130
|
}
|
|
171
131
|
} else if (modifiers.left) {
|
|
172
132
|
alignLeft(el);
|
|
173
|
-
|
|
174
133
|
if (isOutOfBounds(el)) {
|
|
175
134
|
alignRight(el);
|
|
176
|
-
|
|
177
135
|
if (isOutOfBounds(el)) {
|
|
178
136
|
alignTop(el);
|
|
179
|
-
|
|
180
137
|
if (isOutOfBounds(el)) {
|
|
181
138
|
alignBottom(el);
|
|
182
|
-
|
|
183
139
|
if (isOutOfBounds(el)) {
|
|
184
140
|
alignLeft(el);
|
|
185
141
|
}
|
|
@@ -188,26 +144,20 @@ function align(el) {
|
|
|
188
144
|
}
|
|
189
145
|
} else if (modifiers.bottom) {
|
|
190
146
|
alignBottom(el);
|
|
191
|
-
|
|
192
147
|
if (isOutOfBounds(el)) {
|
|
193
148
|
alignTop(el);
|
|
194
|
-
|
|
195
149
|
if (isOutOfBounds(el)) {
|
|
196
150
|
alignBottom(el);
|
|
197
151
|
}
|
|
198
152
|
}
|
|
199
153
|
} else {
|
|
200
154
|
alignRight(el);
|
|
201
|
-
|
|
202
155
|
if (isOutOfBounds(el)) {
|
|
203
156
|
alignLeft(el);
|
|
204
|
-
|
|
205
157
|
if (isOutOfBounds(el)) {
|
|
206
158
|
alignTop(el);
|
|
207
|
-
|
|
208
159
|
if (isOutOfBounds(el)) {
|
|
209
160
|
alignBottom(el);
|
|
210
|
-
|
|
211
161
|
if (isOutOfBounds(el)) {
|
|
212
162
|
alignRight(el);
|
|
213
163
|
}
|
|
@@ -216,115 +166,88 @@ function align(el) {
|
|
|
216
166
|
}
|
|
217
167
|
}
|
|
218
168
|
}
|
|
219
|
-
|
|
220
169
|
function getHostOffset(el) {
|
|
221
170
|
var offset = el.getBoundingClientRect();
|
|
222
|
-
|
|
223
171
|
var targetLeft = offset.left + _DomHandler.default.getWindowScrollLeft();
|
|
224
|
-
|
|
225
172
|
var targetTop = offset.top + _DomHandler.default.getWindowScrollTop();
|
|
226
|
-
|
|
227
173
|
return {
|
|
228
174
|
left: targetLeft,
|
|
229
175
|
top: targetTop
|
|
230
176
|
};
|
|
231
177
|
}
|
|
232
|
-
|
|
233
178
|
function alignRight(el) {
|
|
234
179
|
preAlign(el, 'right');
|
|
235
180
|
var tooltipElement = getTooltipElement(el);
|
|
236
181
|
var hostOffset = getHostOffset(el);
|
|
237
|
-
|
|
238
182
|
var left = hostOffset.left + _DomHandler.default.getOuterWidth(el);
|
|
239
|
-
|
|
240
183
|
var top = hostOffset.top + (_DomHandler.default.getOuterHeight(el) - _DomHandler.default.getOuterHeight(tooltipElement)) / 2;
|
|
241
184
|
tooltipElement.style.left = left + 'px';
|
|
242
185
|
tooltipElement.style.top = top + 'px';
|
|
243
186
|
}
|
|
244
|
-
|
|
245
187
|
function alignLeft(el) {
|
|
246
188
|
preAlign(el, 'left');
|
|
247
189
|
var tooltipElement = getTooltipElement(el);
|
|
248
190
|
var hostOffset = getHostOffset(el);
|
|
249
|
-
|
|
250
191
|
var left = hostOffset.left - _DomHandler.default.getOuterWidth(tooltipElement);
|
|
251
|
-
|
|
252
192
|
var top = hostOffset.top + (_DomHandler.default.getOuterHeight(el) - _DomHandler.default.getOuterHeight(tooltipElement)) / 2;
|
|
253
193
|
tooltipElement.style.left = left + 'px';
|
|
254
194
|
tooltipElement.style.top = top + 'px';
|
|
255
195
|
}
|
|
256
|
-
|
|
257
196
|
function alignTop(el) {
|
|
258
197
|
preAlign(el, 'top');
|
|
259
198
|
var tooltipElement = getTooltipElement(el);
|
|
260
199
|
var hostOffset = getHostOffset(el);
|
|
261
200
|
var left = hostOffset.left + (_DomHandler.default.getOuterWidth(el) - _DomHandler.default.getOuterWidth(tooltipElement)) / 2;
|
|
262
|
-
|
|
263
201
|
var top = hostOffset.top - _DomHandler.default.getOuterHeight(tooltipElement);
|
|
264
|
-
|
|
265
202
|
tooltipElement.style.left = left + 'px';
|
|
266
203
|
tooltipElement.style.top = top + 'px';
|
|
267
204
|
}
|
|
268
|
-
|
|
269
205
|
function alignBottom(el) {
|
|
270
206
|
preAlign(el, 'bottom');
|
|
271
207
|
var tooltipElement = getTooltipElement(el);
|
|
272
208
|
var hostOffset = getHostOffset(el);
|
|
273
209
|
var left = hostOffset.left + (_DomHandler.default.getOuterWidth(el) - _DomHandler.default.getOuterWidth(tooltipElement)) / 2;
|
|
274
|
-
|
|
275
210
|
var top = hostOffset.top + _DomHandler.default.getOuterHeight(el);
|
|
276
|
-
|
|
277
211
|
tooltipElement.style.left = left + 'px';
|
|
278
212
|
tooltipElement.style.top = top + 'px';
|
|
279
213
|
}
|
|
280
|
-
|
|
281
214
|
function preAlign(el, position) {
|
|
282
215
|
var tooltipElement = getTooltipElement(el);
|
|
283
216
|
tooltipElement.style.left = -999 + 'px';
|
|
284
217
|
tooltipElement.style.top = -999 + 'px';
|
|
285
218
|
tooltipElement.className = 'p-tooltip p-component p-tooltip-' + position;
|
|
286
219
|
}
|
|
287
|
-
|
|
288
220
|
function isOutOfBounds(el) {
|
|
289
221
|
var tooltipElement = getTooltipElement(el);
|
|
290
222
|
var offset = tooltipElement.getBoundingClientRect();
|
|
291
223
|
var targetTop = offset.top;
|
|
292
224
|
var targetLeft = offset.left;
|
|
293
|
-
|
|
294
225
|
var width = _DomHandler.default.getOuterWidth(tooltipElement);
|
|
295
|
-
|
|
296
226
|
var height = _DomHandler.default.getOuterHeight(tooltipElement);
|
|
297
|
-
|
|
298
227
|
var viewport = _DomHandler.default.getViewport();
|
|
299
|
-
|
|
300
228
|
return targetLeft + width > viewport.width || targetLeft < 0 || targetTop < 0 || targetTop + height > viewport.height;
|
|
301
229
|
}
|
|
302
|
-
|
|
303
230
|
function getModifiers(options) {
|
|
304
231
|
// modifiers
|
|
305
232
|
if (options.modifiers && Object.keys(options.modifiers).length) {
|
|
306
233
|
return options.modifiers;
|
|
307
|
-
}
|
|
308
|
-
|
|
234
|
+
}
|
|
309
235
|
|
|
236
|
+
// arg
|
|
310
237
|
if (options.arg && _typeof(options.arg) === 'object') {
|
|
311
238
|
return Object.entries(options.arg).reduce(function (acc, _ref) {
|
|
312
239
|
var _ref2 = _slicedToArray(_ref, 2),
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
240
|
+
key = _ref2[0],
|
|
241
|
+
val = _ref2[1];
|
|
316
242
|
if (key === 'event' || key === 'position') acc[val] = true;
|
|
317
243
|
return acc;
|
|
318
244
|
}, {});
|
|
319
245
|
}
|
|
320
|
-
|
|
321
246
|
return {};
|
|
322
247
|
}
|
|
323
|
-
|
|
324
248
|
var Tooltip = {
|
|
325
249
|
bind: function bind(el, options) {
|
|
326
250
|
el.$_ptooltipModifiers = getModifiers(options);
|
|
327
|
-
|
|
328
251
|
if (typeof options.value === 'string') {
|
|
329
252
|
el.$_ptooltipValue = options.value;
|
|
330
253
|
el.$_ptooltipDisabled = false;
|
|
@@ -334,13 +257,11 @@ var Tooltip = {
|
|
|
334
257
|
el.$_ptooltipDisabled = options.value.disabled || false;
|
|
335
258
|
el.$_ptooltipEscape = options.value.escape || false;
|
|
336
259
|
}
|
|
337
|
-
|
|
338
260
|
bindEvents(el);
|
|
339
261
|
},
|
|
340
262
|
unbind: function unbind(el) {
|
|
341
263
|
remove(el);
|
|
342
264
|
unbindEvents(el);
|
|
343
|
-
|
|
344
265
|
if (el.$_ptooltipScrollHandler) {
|
|
345
266
|
el.$_ptooltipScrollHandler.destroy();
|
|
346
267
|
el.$_ptooltipScrollHandler = null;
|
|
@@ -348,7 +269,6 @@ var Tooltip = {
|
|
|
348
269
|
},
|
|
349
270
|
update: function update(el, options) {
|
|
350
271
|
el.$_ptooltipModifiers = getModifiers(options);
|
|
351
|
-
|
|
352
272
|
if (typeof options.value === 'string') {
|
|
353
273
|
el.$_ptooltipValue = options.value;
|
|
354
274
|
el.$_ptooltipDisabled = false;
|