primevue 2.10.0 → 2.10.2
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 +150 -3
- package/accordion/accordion.common.js +2 -7
- package/accordion/accordion.umd.js +2 -7
- package/accordiontab/accordiontab.common.js +1203 -104
- package/accordiontab/accordiontab.umd.js +1203 -104
- 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 +3 -56
- package/api/PrimeIcons.js +24 -2
- package/api/api.common.js +78 -133
- package/api/api.umd.js +78 -133
- package/api/api.umd.min.js +1 -1
- package/api/filterservice.common.js +54 -131
- package/api/filterservice.umd.js +54 -131
- package/api/filterservice.umd.min.js +1 -1
- 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 +84 -246
- package/autocomplete/autocomplete.umd.js +84 -246
- package/autocomplete/autocomplete.umd.min.js +1 -1
- package/avatar/avatar.common.js +2 -4
- package/avatar/avatar.umd.js +2 -4
- package/avatargroup/avatargroup.common.js +2 -4
- package/avatargroup/avatargroup.umd.js +2 -4
- package/badge/badge.common.js +2 -4
- package/badge/badge.umd.js +2 -4
- package/badgedirective/BadgeDirective.js +0 -13
- package/badgedirective/badgedirective.common.js +1183 -89
- package/badgedirective/badgedirective.umd.js +1183 -89
- package/badgedirective/badgedirective.umd.min.js +1 -1
- package/blockui/blockui.common.js +1180 -86
- package/blockui/blockui.umd.js +1180 -86
- package/blockui/blockui.umd.min.js +1 -1
- package/breadcrumb/breadcrumb.common.js +7 -12
- package/breadcrumb/breadcrumb.umd.js +7 -12
- package/breadcrumb/breadcrumbitem.common.js +5 -8
- package/breadcrumb/breadcrumbitem.umd.js +5 -8
- package/button/button.common.js +1211 -125
- package/button/button.umd.js +1211 -125
- package/button/button.umd.min.js +1 -1
- package/calendar/Calendar.vue +9 -7
- package/calendar/calendar.common.js +224 -613
- package/calendar/calendar.umd.js +224 -613
- package/calendar/calendar.umd.min.js +1 -1
- package/card/card.common.js +2 -4
- package/card/card.umd.js +2 -4
- package/carousel/carousel.common.js +1190 -146
- package/carousel/carousel.umd.js +1190 -146
- package/carousel/carousel.umd.min.js +1 -1
- package/cascadeselect/CascadeSelect.vue +1 -1
- package/cascadeselect/cascadeselect.common.js +136 -286
- package/cascadeselect/cascadeselect.umd.js +136 -286
- package/cascadeselect/cascadeselect.umd.min.js +1 -1
- package/cascadeselect/cascadeselectsub.common.js +69 -185
- package/cascadeselect/cascadeselectsub.umd.js +69 -185
- package/cascadeselect/cascadeselectsub.umd.min.js +1 -1
- package/cascadeselect/demo.html +4 -3
- package/chart/chart.common.js +2 -9
- package/chart/chart.umd.js +2 -9
- package/checkbox/checkbox.common.js +58 -116
- package/checkbox/checkbox.umd.js +58 -116
- package/checkbox/checkbox.umd.min.js +1 -1
- package/chip/chip.common.js +2 -4
- package/chip/chip.umd.js +2 -4
- package/chips/chips.common.js +12 -59
- package/chips/chips.umd.js +12 -59
- package/chips/chips.umd.min.js +1 -1
- package/colorpicker/colorpicker.common.js +1197 -140
- package/colorpicker/colorpicker.umd.js +1197 -140
- package/colorpicker/colorpicker.umd.min.js +1 -1
- package/columngroup/columngroup.common.js +2 -4
- package/columngroup/columngroup.umd.js +2 -4
- package/config/PrimeVue.js +4 -6
- package/config/primevue.common.js +124 -155
- package/config/primevue.umd.js +124 -155
- 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 +1252 -186
- package/confirmdialog/confirmdialog.umd.js +1252 -186
- package/confirmdialog/confirmdialog.umd.min.js +1 -1
- package/confirmpopup/confirmpopup.common.js +1212 -152
- package/confirmpopup/confirmpopup.umd.js +1212 -152
- package/confirmpopup/confirmpopup.umd.min.js +1 -1
- package/contextmenu/contextmenu.common.js +1209 -140
- package/contextmenu/contextmenu.umd.js +1209 -140
- package/contextmenu/contextmenu.umd.min.js +1 -1
- package/contextmenu/contextmenusub.common.js +1187 -107
- package/contextmenu/contextmenusub.umd.js +1187 -107
- package/contextmenu/contextmenusub.umd.min.js +1 -1
- package/datatable/TableBody.vue +1 -0
- package/datatable/bodycell.common.js +87 -215
- package/datatable/bodycell.umd.js +87 -215
- package/datatable/bodycell.umd.min.js +1 -1
- package/datatable/columnfilter.common.js +97 -299
- package/datatable/columnfilter.umd.js +97 -299
- package/datatable/columnfilter.umd.min.js +1 -1
- package/datatable/datatable.common.js +258 -950
- package/datatable/datatable.umd.js +258 -950
- package/datatable/datatable.umd.min.js +1 -1
- package/datatable/demo.html +3 -5
- package/datatable/footercell.common.js +83 -170
- package/datatable/footercell.umd.js +83 -170
- package/datatable/footercell.umd.min.js +1 -1
- package/datatable/headercell.common.js +101 -318
- package/datatable/headercell.umd.js +101 -318
- package/datatable/headercell.umd.min.js +1 -1
- package/datatable/headercheckbox.common.js +2 -4
- package/datatable/headercheckbox.umd.js +2 -4
- package/datatable/rowcheckbox.common.js +2 -4
- package/datatable/rowcheckbox.umd.js +2 -4
- package/datatable/rowradiobutton.common.js +2 -4
- package/datatable/rowradiobutton.umd.js +2 -4
- package/datatable/tablebody.common.js +91 -243
- package/datatable/tablebody.umd.js +91 -243
- package/datatable/tablebody.umd.min.js +1 -1
- package/datatable/tablefooter.common.js +88 -204
- package/datatable/tablefooter.umd.js +88 -204
- package/datatable/tablefooter.umd.min.js +1 -1
- package/datatable/tableheader.common.js +104 -342
- package/datatable/tableheader.umd.js +104 -342
- package/datatable/tableheader.umd.min.js +1 -1
- package/datatable/tableloadingbody.common.js +2 -4
- package/datatable/tableloadingbody.umd.js +2 -4
- package/dataview/dataview.common.js +172 -464
- package/dataview/dataview.umd.js +172 -464
- package/dataview/dataview.umd.min.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.common.js +2 -4
- package/dataviewlayoutoptions/dataviewlayoutoptions.umd.js +2 -4
- package/deferredcontent/deferredcontent.common.js +2 -7
- package/deferredcontent/deferredcontent.umd.js +2 -7
- package/dialog/dialog.common.js +1191 -115
- package/dialog/dialog.umd.js +1191 -115
- package/dialog/dialog.umd.min.js +1 -1
- package/divider/divider.common.js +2 -4
- package/divider/divider.umd.js +2 -4
- package/dock/dock.common.js +7 -14
- package/dock/dock.umd.js +7 -14
- package/dock/docksub.common.js +5 -9
- package/dock/docksub.umd.js +5 -9
- package/dropdown/dropdown.common.js +91 -240
- package/dropdown/dropdown.umd.js +91 -240
- package/dropdown/dropdown.umd.min.js +1 -1
- package/editor/editor.common.js +8 -21
- package/editor/editor.umd.js +8 -21
- package/fieldset/fieldset.common.js +1211 -125
- package/fieldset/fieldset.umd.js +1211 -125
- package/fieldset/fieldset.umd.min.js +1 -1
- package/fileupload/fileupload.common.js +86 -192
- package/fileupload/fileupload.umd.js +86 -192
- package/fileupload/fileupload.umd.min.js +1 -1
- package/fullcalendar/fullcalendar.common.js +1304 -36
- package/fullcalendar/fullcalendar.umd.js +1304 -36
- package/fullcalendar/fullcalendar.umd.min.js +3 -3
- package/galleria/demo.html +3 -3
- package/galleria/galleria.common.js +86 -200
- package/galleria/galleria.umd.js +86 -200
- package/galleria/galleria.umd.min.js +1 -1
- package/galleria/galleriacontent.common.js +84 -190
- package/galleria/galleriacontent.umd.js +84 -190
- package/galleria/galleriacontent.umd.min.js +1 -1
- package/galleria/galleriaitem.common.js +1212 -134
- package/galleria/galleriaitem.umd.js +1212 -134
- package/galleria/galleriaitem.umd.min.js +1 -1
- package/galleria/galleriaitemslot.common.js +4 -10
- package/galleria/galleriaitemslot.umd.js +4 -10
- package/galleria/galleriathumbnails.common.js +76 -174
- package/galleria/galleriathumbnails.umd.js +76 -174
- package/galleria/galleriathumbnails.umd.min.js +1 -1
- package/imagepreview/imagepreview.common.js +1176 -79
- package/imagepreview/imagepreview.umd.js +1176 -79
- package/imagepreview/imagepreview.umd.min.js +1 -1
- package/inlinemessage/inlinemessage.common.js +2 -5
- package/inlinemessage/inlinemessage.umd.js +2 -5
- package/inplace/inplace.common.js +1189 -105
- package/inplace/inplace.umd.js +1189 -105
- package/inplace/inplace.umd.min.js +1 -1
- package/inputmask/inputmask.common.js +1237 -217
- package/inputmask/inputmask.umd.js +1237 -217
- package/inputmask/inputmask.umd.min.js +1 -1
- package/inputnumber/InputNumber.vue +2 -2
- package/inputnumber/inputnumber.common.js +136 -286
- package/inputnumber/inputnumber.umd.js +136 -286
- package/inputnumber/inputnumber.umd.min.js +1 -1
- package/inputswitch/inputswitch.common.js +2 -5
- package/inputswitch/inputswitch.umd.js +2 -5
- package/inputtext/inputtext.common.js +1177 -31
- package/inputtext/inputtext.umd.js +1177 -31
- package/inputtext/inputtext.umd.min.js +1 -1
- package/knob/knob.common.js +4 -5
- package/knob/knob.umd.js +4 -5
- package/listbox/listbox.common.js +76 -213
- package/listbox/listbox.umd.js +76 -213
- package/listbox/listbox.umd.min.js +1 -1
- package/megamenu/megamenu.common.js +1186 -121
- package/megamenu/megamenu.umd.js +1186 -121
- package/megamenu/megamenu.umd.min.js +1 -1
- package/menu/menu.common.js +1203 -138
- package/menu/menu.umd.js +1203 -138
- package/menu/menu.umd.min.js +1 -1
- package/menu/menuitem.common.js +1214 -128
- package/menu/menuitem.umd.js +1214 -128
- package/menu/menuitem.umd.min.js +1 -1
- package/menubar/menubar.common.js +1204 -141
- package/menubar/menubar.umd.js +1204 -141
- package/menubar/menubar.umd.min.js +1 -1
- package/menubar/menubarsub.common.js +1202 -135
- package/menubar/menubarsub.umd.js +1202 -135
- package/menubar/menubarsub.umd.min.js +1 -1
- package/message/message.common.js +1187 -102
- package/message/message.umd.js +1187 -102
- package/message/message.umd.min.js +1 -1
- package/multiselect/MultiSelect.vue +1 -1
- package/multiselect/multiselect.common.js +139 -304
- package/multiselect/multiselect.umd.js +139 -304
- package/multiselect/multiselect.umd.min.js +1 -1
- package/orderlist/orderlist.common.js +88 -230
- package/orderlist/orderlist.umd.js +88 -230
- package/orderlist/orderlist.umd.min.js +1 -1
- package/organizationchart/organizationchart.common.js +1200 -111
- package/organizationchart/organizationchart.umd.js +1200 -111
- package/organizationchart/organizationchart.umd.min.js +1 -1
- package/organizationchart/organizationchartnode.common.js +1186 -87
- package/organizationchart/organizationchartnode.umd.js +1186 -87
- 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.d.ts +3 -1
- package/overlaypanel/OverlayPanel.vue +2 -0
- package/overlaypanel/overlaypanel.common.js +1223 -158
- package/overlaypanel/overlaypanel.umd.js +1223 -158
- package/overlaypanel/overlaypanel.umd.min.js +1 -1
- package/package.json +2 -2
- package/paginator/currentpagereport.common.js +2 -4
- package/paginator/currentpagereport.umd.js +2 -4
- package/paginator/firstpagelink.common.js +1211 -125
- package/paginator/firstpagelink.umd.js +1211 -125
- package/paginator/firstpagelink.umd.min.js +1 -1
- package/paginator/jumptopagedropdown.common.js +93 -246
- package/paginator/jumptopagedropdown.umd.js +93 -246
- package/paginator/jumptopagedropdown.umd.min.js +1 -1
- package/paginator/jumptopageinput.common.js +142 -294
- package/paginator/jumptopageinput.umd.js +142 -294
- package/paginator/jumptopageinput.umd.min.js +1 -1
- package/paginator/lastpagelink.common.js +1211 -125
- package/paginator/lastpagelink.umd.js +1211 -125
- package/paginator/lastpagelink.umd.min.js +1 -1
- package/paginator/nextpagelink.common.js +1211 -125
- package/paginator/nextpagelink.umd.js +1211 -125
- package/paginator/nextpagelink.umd.min.js +1 -1
- package/paginator/pagelinks.common.js +1211 -125
- package/paginator/pagelinks.umd.js +1211 -125
- package/paginator/pagelinks.umd.min.js +1 -1
- package/paginator/paginator.common.js +186 -472
- package/paginator/paginator.umd.js +186 -472
- package/paginator/paginator.umd.min.js +1 -1
- package/paginator/prevpagelink.common.js +1211 -125
- package/paginator/prevpagelink.umd.js +1211 -125
- package/paginator/prevpagelink.umd.min.js +1 -1
- package/paginator/rowsperpagedropdown.common.js +93 -246
- package/paginator/rowsperpagedropdown.umd.js +93 -246
- package/paginator/rowsperpagedropdown.umd.min.js +1 -1
- package/panel/panel.common.js +1211 -125
- package/panel/panel.umd.js +1211 -125
- package/panel/panel.umd.min.js +1 -1
- package/panelmenu/panelmenu.common.js +10 -22
- package/panelmenu/panelmenu.umd.js +10 -22
- package/panelmenu/panelmenusub.common.js +5 -11
- package/panelmenu/panelmenusub.umd.js +5 -11
- package/password/Password.vue +40 -12
- package/password/password.common.js +1306 -212
- package/password/password.umd.js +1306 -212
- package/password/password.umd.min.js +1 -1
- package/picklist/picklist.common.js +88 -262
- package/picklist/picklist.umd.js +88 -262
- package/picklist/picklist.umd.min.js +1 -1
- package/progressbar/progressbar.common.js +2 -4
- package/progressbar/progressbar.umd.js +2 -4
- package/progressspinner/progressspinner.common.js +2 -5
- package/progressspinner/progressspinner.umd.js +2 -5
- package/radiobutton/radiobutton.common.js +53 -91
- package/radiobutton/radiobutton.umd.js +53 -91
- package/radiobutton/radiobutton.umd.min.js +1 -1
- package/rating/rating.common.js +2 -4
- package/rating/rating.umd.js +2 -4
- package/resources/primevue.css +0 -0
- package/resources/primevue.min.css +0 -0
- package/ripple/Ripple.js +0 -18
- package/ripple/ripple.common.js +1178 -90
- package/ripple/ripple.umd.js +1178 -90
- package/ripple/ripple.umd.min.js +1 -1
- package/row/row.common.js +2 -4
- package/row/row.umd.js +2 -4
- package/scrollpanel/scrollpanel.common.js +1190 -103
- package/scrollpanel/scrollpanel.umd.js +1190 -103
- package/scrollpanel/scrollpanel.umd.min.js +1 -1
- package/scrolltop/scrolltop.common.js +1183 -87
- package/scrolltop/scrolltop.umd.js +1183 -87
- package/scrolltop/scrolltop.umd.min.js +1 -1
- package/selectbutton/selectbutton.common.js +74 -200
- package/selectbutton/selectbutton.umd.js +74 -200
- 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 +1223 -145
- package/sidebar/sidebar.umd.js +1223 -145
- package/sidebar/sidebar.umd.min.js +1 -1
- package/skeleton/skeleton.common.js +2 -4
- package/skeleton/skeleton.umd.js +2 -4
- package/slider/Slider.vue +1 -1
- package/slider/slider.common.js +121 -188
- package/slider/slider.umd.js +121 -188
- package/slider/slider.umd.min.js +1 -1
- package/speeddial/SpeedDial.vue +2 -2
- package/speeddial/speeddial.common.js +1269 -204
- package/speeddial/speeddial.umd.js +1269 -204
- package/speeddial/speeddial.umd.min.js +1 -1
- package/splitbutton/splitbutton.common.js +1209 -148
- package/splitbutton/splitbutton.umd.js +1209 -148
- package/splitbutton/splitbutton.umd.min.js +1 -1
- package/splitter/splitter.common.js +1182 -101
- package/splitter/splitter.umd.js +1182 -101
- package/splitter/splitter.umd.min.js +1 -1
- package/steps/steps.common.js +5 -9
- package/steps/steps.umd.js +5 -9
- package/styleclass/StyleClass.js +0 -43
- package/styleclass/styleclass.common.js +1199 -133
- package/styleclass/styleclass.umd.js +1199 -133
- package/styleclass/styleclass.umd.min.js +1 -1
- package/tabmenu/TabMenu.vue +1 -9
- package/tabmenu/tabmenu.common.js +1215 -206
- package/tabmenu/tabmenu.umd.js +1215 -206
- package/tabmenu/tabmenu.umd.min.js +1 -1
- package/tabpanel/tabpanel.common.js +2 -5
- package/tabpanel/tabpanel.umd.js +2 -5
- package/tabview/tabview.common.js +86 -185
- package/tabview/tabview.umd.js +86 -185
- package/tabview/tabview.umd.min.js +1 -1
- package/tag/tag.common.js +2 -4
- package/tag/tag.umd.js +2 -4
- package/terminal/terminal.common.js +2 -4
- package/terminal/terminal.umd.js +2 -4
- package/terminalservice/TerminalService.js +0 -3
- package/textarea/Textarea.vue +24 -1
- package/textarea/textarea.common.js +3233 -94
- package/textarea/textarea.umd.js +3233 -94
- package/textarea/textarea.umd.min.js +1 -1
- package/tieredmenu/demo.html +4 -3
- package/tieredmenu/tieredmenu.common.js +1199 -149
- package/tieredmenu/tieredmenu.umd.js +1199 -149
- package/tieredmenu/tieredmenu.umd.min.js +1 -1
- package/tieredmenu/tieredmenusub.common.js +1206 -136
- package/tieredmenu/tieredmenusub.umd.js +1206 -136
- package/tieredmenu/tieredmenusub.umd.min.js +1 -1
- package/timeline/timeline.common.js +53 -90
- package/timeline/timeline.umd.js +53 -90
- package/timeline/timeline.umd.min.js +1 -1
- package/toast/toast.common.js +74 -146
- package/toast/toast.umd.js +74 -146
- package/toast/toast.umd.min.js +1 -1
- package/toast/toastmessage.common.js +1187 -102
- package/toast/toastmessage.umd.js +1187 -102
- 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 +1211 -125
- package/togglebutton/togglebutton.umd.js +1211 -125
- package/togglebutton/togglebutton.umd.min.js +1 -1
- package/toolbar/toolbar.common.js +2 -4
- package/toolbar/toolbar.umd.js +2 -4
- package/tooltip/Tooltip.js +7 -87
- package/tooltip/tooltip.common.js +84 -201
- package/tooltip/tooltip.umd.js +84 -201
- package/tooltip/tooltip.umd.min.js +1 -1
- package/tree/demo.html +3 -3
- package/tree/tree.common.js +100 -281
- package/tree/tree.umd.js +100 -281
- package/tree/tree.umd.min.js +1 -1
- package/tree/treenode.common.js +1240 -183
- package/tree/treenode.umd.js +1240 -183
- package/tree/treenode.umd.min.js +1 -1
- package/treetable/demo.html +3 -3
- package/treetable/footercell.common.js +83 -170
- package/treetable/footercell.umd.js +83 -170
- package/treetable/footercell.umd.min.js +1 -1
- package/treetable/headercell.common.js +83 -178
- package/treetable/headercell.umd.js +83 -178
- package/treetable/headercell.umd.min.js +1 -1
- package/treetable/treetable.common.js +220 -702
- package/treetable/treetable.umd.js +220 -702
- package/treetable/treetable.umd.min.js +1 -1
- package/treetable/treetablerow.common.js +91 -211
- package/treetable/treetablerow.umd.js +91 -211
- package/treetable/treetablerow.umd.min.js +1 -1
- package/treetable/treetablerowloader.common.js +94 -232
- package/treetable/treetablerowloader.umd.js +94 -232
- package/treetable/treetablerowloader.umd.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.common.js +2 -12
- package/tristatecheckbox/tristatecheckbox.umd.js +2 -12
- package/utils/ConnectedOverlayScrollHandler.js +4 -13
- package/utils/DomHandler.js +18 -63
- package/utils/EventBus.js +0 -3
- package/utils/ObjectUtils.js +15 -59
- package/utils/UniqueComponentId.js +0 -1
- package/utils/Utils.js +0 -6
- package/utils/connectedoverlayscrollhandler.common.js +1183 -88
- package/utils/connectedoverlayscrollhandler.umd.js +1183 -88
- package/utils/connectedoverlayscrollhandler.umd.min.js +1 -1
- package/utils/domhandler.common.js +1187 -85
- package/utils/domhandler.umd.js +1187 -85
- package/utils/domhandler.umd.min.js +1 -1
- package/utils/eventbus.common.js +0 -2
- package/utils/eventbus.umd.js +0 -2
- package/utils/objectutils.common.js +51 -86
- package/utils/objectutils.umd.js +51 -86
- package/utils/objectutils.umd.min.js +1 -1
- package/utils/utils.common.js +81 -170
- package/utils/utils.umd.js +81 -170
- package/utils/utils.umd.min.js +1 -1
- package/web-types.json +8 -1
package/utils/DomHandler.js
CHANGED
|
@@ -4,24 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
7
|
+
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); }
|
|
8
8
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
9
|
-
|
|
10
9
|
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); }
|
|
11
|
-
|
|
12
|
-
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; }
|
|
13
|
-
|
|
10
|
+
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; }
|
|
14
11
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
15
|
-
|
|
16
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
17
|
-
|
|
12
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
18
13
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
19
|
-
|
|
14
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
20
16
|
var DomHandler = /*#__PURE__*/function () {
|
|
21
17
|
function DomHandler() {
|
|
22
18
|
_classCallCheck(this, DomHandler);
|
|
23
19
|
}
|
|
24
|
-
|
|
25
20
|
_createClass(DomHandler, null, [{
|
|
26
21
|
key: "innerWidth",
|
|
27
22
|
value: function innerWidth(el) {
|
|
@@ -55,12 +50,10 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
55
50
|
value: function getOuterWidth(el, margin) {
|
|
56
51
|
if (el) {
|
|
57
52
|
var width = el.offsetWidth;
|
|
58
|
-
|
|
59
53
|
if (margin) {
|
|
60
54
|
var style = getComputedStyle(el);
|
|
61
55
|
width += parseFloat(style.marginLeft) + parseFloat(style.marginRight);
|
|
62
56
|
}
|
|
63
|
-
|
|
64
57
|
return width;
|
|
65
58
|
} else {
|
|
66
59
|
return 0;
|
|
@@ -71,12 +64,10 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
71
64
|
value: function getOuterHeight(el, margin) {
|
|
72
65
|
if (el) {
|
|
73
66
|
var height = el.offsetHeight;
|
|
74
|
-
|
|
75
67
|
if (margin) {
|
|
76
68
|
var style = getComputedStyle(el);
|
|
77
69
|
height += parseFloat(style.marginTop) + parseFloat(style.marginBottom);
|
|
78
70
|
}
|
|
79
|
-
|
|
80
71
|
return height;
|
|
81
72
|
} else {
|
|
82
73
|
return 0;
|
|
@@ -87,12 +78,10 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
87
78
|
value: function getClientHeight(el, margin) {
|
|
88
79
|
if (el) {
|
|
89
80
|
var height = el.clientHeight;
|
|
90
|
-
|
|
91
81
|
if (margin) {
|
|
92
82
|
var style = getComputedStyle(el);
|
|
93
83
|
height += parseFloat(style.marginTop) + parseFloat(style.marginBottom);
|
|
94
84
|
}
|
|
95
|
-
|
|
96
85
|
return height;
|
|
97
86
|
} else {
|
|
98
87
|
return 0;
|
|
@@ -102,11 +91,11 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
102
91
|
key: "getViewport",
|
|
103
92
|
value: function getViewport() {
|
|
104
93
|
var win = window,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
94
|
+
d = document,
|
|
95
|
+
e = d.documentElement,
|
|
96
|
+
g = d.getElementsByTagName('body')[0],
|
|
97
|
+
w = win.innerWidth || e.clientWidth || g.clientWidth,
|
|
98
|
+
h = win.innerHeight || e.clientHeight || g.clientHeight;
|
|
110
99
|
return {
|
|
111
100
|
width: w,
|
|
112
101
|
height: h
|
|
@@ -137,12 +126,10 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
137
126
|
value: function index(element) {
|
|
138
127
|
var children = element.parentNode.childNodes;
|
|
139
128
|
var num = 0;
|
|
140
|
-
|
|
141
129
|
for (var i = 0; i < children.length; i++) {
|
|
142
130
|
if (children[i] === element) return num;
|
|
143
131
|
if (children[i].nodeType === 1) num++;
|
|
144
132
|
}
|
|
145
|
-
|
|
146
133
|
return -1;
|
|
147
134
|
}
|
|
148
135
|
}, {
|
|
@@ -150,13 +137,11 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
150
137
|
value: function addMultipleClasses(element, className) {
|
|
151
138
|
if (element.classList) {
|
|
152
139
|
var styles = className.split(' ');
|
|
153
|
-
|
|
154
140
|
for (var i = 0; i < styles.length; i++) {
|
|
155
141
|
element.classList.add(styles[i]);
|
|
156
142
|
}
|
|
157
143
|
} else {
|
|
158
144
|
var _styles = className.split(' ');
|
|
159
|
-
|
|
160
145
|
for (var _i = 0; _i < _styles.length; _i++) {
|
|
161
146
|
element.className += ' ' + _styles[_i];
|
|
162
147
|
}
|
|
@@ -178,7 +163,6 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
178
163
|
if (element) {
|
|
179
164
|
if (element.classList) return element.classList.contains(className);else return new RegExp('(^| )' + className + '( |$)', 'gi').test(element.className);
|
|
180
165
|
}
|
|
181
|
-
|
|
182
166
|
return false;
|
|
183
167
|
}
|
|
184
168
|
}, {
|
|
@@ -223,11 +207,9 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
223
207
|
var windowScrollLeft = this.getWindowScrollLeft();
|
|
224
208
|
var viewport = this.getViewport();
|
|
225
209
|
var top, left;
|
|
226
|
-
|
|
227
210
|
if (targetOffset.top + targetOuterHeight + elementOuterHeight > viewport.height) {
|
|
228
211
|
top = targetOffset.top + windowScrollTop - elementOuterHeight;
|
|
229
212
|
element.style.transformOrigin = 'bottom';
|
|
230
|
-
|
|
231
213
|
if (top < 0) {
|
|
232
214
|
top = windowScrollTop;
|
|
233
215
|
}
|
|
@@ -235,7 +217,6 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
235
217
|
top = targetOuterHeight + targetOffset.top + windowScrollTop;
|
|
236
218
|
element.style.transformOrigin = 'top';
|
|
237
219
|
}
|
|
238
|
-
|
|
239
220
|
if (targetOffset.left + elementOuterWidth > viewport.width) left = Math.max(0, targetOffset.left + windowScrollLeft + targetOuterWidth - elementOuterWidth);else left = targetOffset.left + windowScrollLeft;
|
|
240
221
|
element.style.top = top + 'px';
|
|
241
222
|
element.style.left = left + 'px';
|
|
@@ -251,11 +232,9 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
251
232
|
var targetOffset = target.getBoundingClientRect();
|
|
252
233
|
var viewport = this.getViewport();
|
|
253
234
|
var top, left;
|
|
254
|
-
|
|
255
235
|
if (targetOffset.top + targetHeight + elementDimensions.height > viewport.height) {
|
|
256
236
|
top = -1 * elementDimensions.height;
|
|
257
237
|
element.style.transformOrigin = 'bottom';
|
|
258
|
-
|
|
259
238
|
if (targetOffset.top + top < 0) {
|
|
260
239
|
top = -1 * targetOffset.top;
|
|
261
240
|
}
|
|
@@ -263,7 +242,6 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
263
242
|
top = targetHeight;
|
|
264
243
|
element.style.transformOrigin = 'top';
|
|
265
244
|
}
|
|
266
|
-
|
|
267
245
|
if (elementDimensions.width > viewport.width) {
|
|
268
246
|
// element wider then viewport and cannot fit on screen (align at left side of viewport)
|
|
269
247
|
left = targetOffset.left * -1;
|
|
@@ -274,7 +252,6 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
274
252
|
// element fits on screen (align with target)
|
|
275
253
|
left = 0;
|
|
276
254
|
}
|
|
277
|
-
|
|
278
255
|
element.style.top = top + 'px';
|
|
279
256
|
element.style.left = left + 'px';
|
|
280
257
|
}
|
|
@@ -288,35 +265,27 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
288
265
|
key: "getScrollableParents",
|
|
289
266
|
value: function getScrollableParents(element) {
|
|
290
267
|
var scrollableParents = [];
|
|
291
|
-
|
|
292
268
|
if (element) {
|
|
293
269
|
var parents = this.getParents(element);
|
|
294
270
|
var overflowRegex = /(auto|scroll)/;
|
|
295
|
-
|
|
296
271
|
var overflowCheck = function overflowCheck(node) {
|
|
297
272
|
var styleDeclaration = window['getComputedStyle'](node, null);
|
|
298
273
|
return overflowRegex.test(styleDeclaration.getPropertyValue('overflow')) || overflowRegex.test(styleDeclaration.getPropertyValue('overflowX')) || overflowRegex.test(styleDeclaration.getPropertyValue('overflowY'));
|
|
299
274
|
};
|
|
300
|
-
|
|
301
275
|
var _iterator = _createForOfIteratorHelper(parents),
|
|
302
|
-
|
|
303
|
-
|
|
276
|
+
_step;
|
|
304
277
|
try {
|
|
305
278
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
306
279
|
var parent = _step.value;
|
|
307
280
|
var scrollSelectors = parent.nodeType === 1 && parent.dataset['scrollselectors'];
|
|
308
|
-
|
|
309
281
|
if (scrollSelectors) {
|
|
310
282
|
var selectors = scrollSelectors.split(',');
|
|
311
|
-
|
|
312
283
|
var _iterator2 = _createForOfIteratorHelper(selectors),
|
|
313
|
-
|
|
314
|
-
|
|
284
|
+
_step2;
|
|
315
285
|
try {
|
|
316
286
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
317
287
|
var selector = _step2.value;
|
|
318
288
|
var el = this.findSingle(parent, selector);
|
|
319
|
-
|
|
320
289
|
if (el && overflowCheck(el)) {
|
|
321
290
|
scrollableParents.push(el);
|
|
322
291
|
}
|
|
@@ -334,7 +303,6 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
334
303
|
_iterator.f();
|
|
335
304
|
}
|
|
336
305
|
}
|
|
337
|
-
|
|
338
306
|
return scrollableParents;
|
|
339
307
|
}
|
|
340
308
|
}, {
|
|
@@ -375,34 +343,29 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
375
343
|
element.style.opacity = 0;
|
|
376
344
|
var last = +new Date();
|
|
377
345
|
var opacity = 0;
|
|
378
|
-
|
|
379
346
|
var tick = function tick() {
|
|
380
347
|
opacity = +element.style.opacity + (new Date().getTime() - last) / duration;
|
|
381
348
|
element.style.opacity = opacity;
|
|
382
349
|
last = +new Date();
|
|
383
|
-
|
|
384
350
|
if (+opacity < 1) {
|
|
385
351
|
window.requestAnimationFrame && requestAnimationFrame(tick) || setTimeout(tick, 16);
|
|
386
352
|
}
|
|
387
353
|
};
|
|
388
|
-
|
|
389
354
|
tick();
|
|
390
355
|
}
|
|
391
356
|
}, {
|
|
392
357
|
key: "fadeOut",
|
|
393
358
|
value: function fadeOut(element, ms) {
|
|
394
359
|
var opacity = 1,
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
360
|
+
interval = 50,
|
|
361
|
+
duration = ms,
|
|
362
|
+
gap = interval / duration;
|
|
398
363
|
var fading = setInterval(function () {
|
|
399
364
|
opacity -= gap;
|
|
400
|
-
|
|
401
365
|
if (opacity <= 0) {
|
|
402
366
|
opacity = 0;
|
|
403
367
|
clearInterval(fading);
|
|
404
368
|
}
|
|
405
|
-
|
|
406
369
|
element.style.opacity = opacity;
|
|
407
370
|
}, interval);
|
|
408
371
|
}
|
|
@@ -429,7 +392,6 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
429
392
|
var scroll = container.scrollTop;
|
|
430
393
|
var elementHeight = container.clientHeight;
|
|
431
394
|
var itemHeight = this.getOuterHeight(item);
|
|
432
|
-
|
|
433
395
|
if (offset < 0) {
|
|
434
396
|
container.scrollTop = scroll + offset;
|
|
435
397
|
} else if (offset + itemHeight > elementHeight) {
|
|
@@ -448,7 +410,8 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
448
410
|
} else if (document['selection'] && document['selection'].empty) {
|
|
449
411
|
try {
|
|
450
412
|
document['selection'].empty();
|
|
451
|
-
} catch (error) {
|
|
413
|
+
} catch (error) {
|
|
414
|
+
//ignore IE bug
|
|
452
415
|
}
|
|
453
416
|
}
|
|
454
417
|
}
|
|
@@ -470,19 +433,16 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
470
433
|
if (!this.browser) {
|
|
471
434
|
var matched = this.resolveUserAgent();
|
|
472
435
|
this.browser = {};
|
|
473
|
-
|
|
474
436
|
if (matched.browser) {
|
|
475
437
|
this.browser[matched.browser] = true;
|
|
476
438
|
this.browser['version'] = matched.version;
|
|
477
439
|
}
|
|
478
|
-
|
|
479
440
|
if (this.browser['chrome']) {
|
|
480
441
|
this.browser['webkit'] = true;
|
|
481
442
|
} else if (this.browser['webkit']) {
|
|
482
443
|
this.browser['safari'] = true;
|
|
483
444
|
}
|
|
484
445
|
}
|
|
485
|
-
|
|
486
446
|
return this.browser;
|
|
487
447
|
}
|
|
488
448
|
}, {
|
|
@@ -510,10 +470,8 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
510
470
|
value: function getFocusableElements(element) {
|
|
511
471
|
var focusableElements = DomHandler.find(element, "button:not([tabindex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden]), \n [href][clientHeight][clientWidth]:not([tabindex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden]), \n input:not([tabindex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden]), select:not([tabindex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden]), \n textarea:not([tabindex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden]), [tabIndex]:not([tabIndex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden]), \n [contenteditable]:not([tabIndex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden])");
|
|
512
472
|
var visibleFocusableElements = [];
|
|
513
|
-
|
|
514
473
|
var _iterator3 = _createForOfIteratorHelper(focusableElements),
|
|
515
|
-
|
|
516
|
-
|
|
474
|
+
_step3;
|
|
517
475
|
try {
|
|
518
476
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
519
477
|
var focusableElement = _step3.value;
|
|
@@ -524,7 +482,6 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
524
482
|
} finally {
|
|
525
483
|
_iterator3.f();
|
|
526
484
|
}
|
|
527
|
-
|
|
528
485
|
return visibleFocusableElements;
|
|
529
486
|
}
|
|
530
487
|
}, {
|
|
@@ -567,8 +524,6 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
567
524
|
return 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
|
|
568
525
|
}
|
|
569
526
|
}]);
|
|
570
|
-
|
|
571
527
|
return DomHandler;
|
|
572
528
|
}();
|
|
573
|
-
|
|
574
529
|
exports.default = DomHandler;
|
package/utils/EventBus.js
CHANGED
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = _default;
|
|
7
|
-
|
|
8
7
|
function _default() {
|
|
9
8
|
var allHandlers = new Map();
|
|
10
9
|
return {
|
|
@@ -15,14 +14,12 @@ function _default() {
|
|
|
15
14
|
},
|
|
16
15
|
off: function off(type, handler) {
|
|
17
16
|
var handlers = allHandlers.get(type);
|
|
18
|
-
|
|
19
17
|
if (handlers) {
|
|
20
18
|
handlers.splice(handlers.indexOf(handler) >>> 0, 1);
|
|
21
19
|
}
|
|
22
20
|
},
|
|
23
21
|
emit: function emit(type, evt) {
|
|
24
22
|
var handlers = allHandlers.get(type);
|
|
25
|
-
|
|
26
23
|
if (handlers) {
|
|
27
24
|
handlers.slice().map(function (handler) {
|
|
28
25
|
handler(evt);
|
package/utils/ObjectUtils.js
CHANGED
|
@@ -4,26 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
9
|
-
|
|
10
8
|
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); }
|
|
11
|
-
|
|
12
|
-
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; }
|
|
13
|
-
|
|
9
|
+
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; }
|
|
14
10
|
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); }
|
|
15
|
-
|
|
16
11
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
17
|
-
|
|
18
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
19
|
-
|
|
12
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
20
13
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
21
|
-
|
|
14
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
22
16
|
var ObjectUtils = /*#__PURE__*/function () {
|
|
23
17
|
function ObjectUtils() {
|
|
24
18
|
_classCallCheck(this, ObjectUtils);
|
|
25
19
|
}
|
|
26
|
-
|
|
27
20
|
_createClass(ObjectUtils, null, [{
|
|
28
21
|
key: "equals",
|
|
29
22
|
value: function equals(obj1, obj2, field) {
|
|
@@ -33,50 +26,37 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
33
26
|
key: "deepEquals",
|
|
34
27
|
value: function deepEquals(a, b) {
|
|
35
28
|
if (a === b) return true;
|
|
36
|
-
|
|
37
29
|
if (a && b && _typeof(a) == 'object' && _typeof(b) == 'object') {
|
|
38
30
|
var arrA = Array.isArray(a),
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
31
|
+
arrB = Array.isArray(b),
|
|
32
|
+
i,
|
|
33
|
+
length,
|
|
34
|
+
key;
|
|
44
35
|
if (arrA && arrB) {
|
|
45
36
|
length = a.length;
|
|
46
37
|
if (length != b.length) return false;
|
|
47
|
-
|
|
48
|
-
for (i = length; i-- !== 0;) {
|
|
49
|
-
if (!this.deepEquals(a[i], b[i])) return false;
|
|
50
|
-
}
|
|
51
|
-
|
|
38
|
+
for (i = length; i-- !== 0;) if (!this.deepEquals(a[i], b[i])) return false;
|
|
52
39
|
return true;
|
|
53
40
|
}
|
|
54
|
-
|
|
55
41
|
if (arrA != arrB) return false;
|
|
56
42
|
var dateA = a instanceof Date,
|
|
57
|
-
|
|
43
|
+
dateB = b instanceof Date;
|
|
58
44
|
if (dateA != dateB) return false;
|
|
59
45
|
if (dateA && dateB) return a.getTime() == b.getTime();
|
|
60
46
|
var regexpA = a instanceof RegExp,
|
|
61
|
-
|
|
47
|
+
regexpB = b instanceof RegExp;
|
|
62
48
|
if (regexpA != regexpB) return false;
|
|
63
49
|
if (regexpA && regexpB) return a.toString() == b.toString();
|
|
64
50
|
var keys = Object.keys(a);
|
|
65
51
|
length = keys.length;
|
|
66
52
|
if (length !== Object.keys(b).length) return false;
|
|
67
|
-
|
|
68
|
-
for (i = length; i-- !== 0;) {
|
|
69
|
-
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
70
|
-
}
|
|
71
|
-
|
|
53
|
+
for (i = length; i-- !== 0;) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
72
54
|
for (i = length; i-- !== 0;) {
|
|
73
55
|
key = keys[i];
|
|
74
56
|
if (!this.deepEquals(a[key], b[key])) return false;
|
|
75
57
|
}
|
|
76
|
-
|
|
77
58
|
return true;
|
|
78
59
|
}
|
|
79
|
-
|
|
80
60
|
return a !== a && b !== b;
|
|
81
61
|
}
|
|
82
62
|
}, {
|
|
@@ -90,15 +70,12 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
90
70
|
} else {
|
|
91
71
|
var fields = field.split('.');
|
|
92
72
|
var value = data;
|
|
93
|
-
|
|
94
73
|
for (var i = 0, len = fields.length; i < len; ++i) {
|
|
95
74
|
if (value == null) {
|
|
96
75
|
return null;
|
|
97
76
|
}
|
|
98
|
-
|
|
99
77
|
value = value[fields[i]];
|
|
100
78
|
}
|
|
101
|
-
|
|
102
79
|
return value;
|
|
103
80
|
}
|
|
104
81
|
} else {
|
|
@@ -114,22 +91,17 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
114
91
|
key: "filter",
|
|
115
92
|
value: function filter(value, fields, filterValue) {
|
|
116
93
|
var filteredItems = [];
|
|
117
|
-
|
|
118
94
|
if (value) {
|
|
119
95
|
var _iterator = _createForOfIteratorHelper(value),
|
|
120
|
-
|
|
121
|
-
|
|
96
|
+
_step;
|
|
122
97
|
try {
|
|
123
98
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
124
99
|
var item = _step.value;
|
|
125
|
-
|
|
126
100
|
var _iterator2 = _createForOfIteratorHelper(fields),
|
|
127
|
-
|
|
128
|
-
|
|
101
|
+
_step2;
|
|
129
102
|
try {
|
|
130
103
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
131
104
|
var field = _step2.value;
|
|
132
|
-
|
|
133
105
|
if (String(this.resolveFieldData(item, field)).toLowerCase().indexOf(filterValue.toLowerCase()) > -1) {
|
|
134
106
|
filteredItems.push(item);
|
|
135
107
|
break;
|
|
@@ -147,23 +119,19 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
147
119
|
_iterator.f();
|
|
148
120
|
}
|
|
149
121
|
}
|
|
150
|
-
|
|
151
122
|
return filteredItems;
|
|
152
123
|
}
|
|
153
124
|
}, {
|
|
154
125
|
key: "reorderArray",
|
|
155
126
|
value: function reorderArray(value, from, to) {
|
|
156
127
|
var target;
|
|
157
|
-
|
|
158
128
|
if (value && from !== to) {
|
|
159
129
|
if (to >= value.length) {
|
|
160
130
|
target = to - value.length;
|
|
161
|
-
|
|
162
131
|
while (target-- + 1) {
|
|
163
132
|
value.push(undefined);
|
|
164
133
|
}
|
|
165
134
|
}
|
|
166
|
-
|
|
167
135
|
value.splice(to, 0, value.splice(from, 1)[0]);
|
|
168
136
|
}
|
|
169
137
|
}
|
|
@@ -171,7 +139,6 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
171
139
|
key: "findIndexInList",
|
|
172
140
|
value: function findIndexInList(value, list) {
|
|
173
141
|
var index = -1;
|
|
174
|
-
|
|
175
142
|
if (list) {
|
|
176
143
|
for (var i = 0; i < list.length; i++) {
|
|
177
144
|
if (list[i] === value) {
|
|
@@ -180,7 +147,6 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
180
147
|
}
|
|
181
148
|
}
|
|
182
149
|
}
|
|
183
|
-
|
|
184
150
|
return index;
|
|
185
151
|
}
|
|
186
152
|
}, {
|
|
@@ -188,8 +154,7 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
188
154
|
value: function contains(value, list) {
|
|
189
155
|
if (value != null && list && list.length) {
|
|
190
156
|
var _iterator3 = _createForOfIteratorHelper(list),
|
|
191
|
-
|
|
192
|
-
|
|
157
|
+
_step3;
|
|
193
158
|
try {
|
|
194
159
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
195
160
|
var val = _step3.value;
|
|
@@ -201,7 +166,6 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
201
166
|
_iterator3.f();
|
|
202
167
|
}
|
|
203
168
|
}
|
|
204
|
-
|
|
205
169
|
return false;
|
|
206
170
|
}
|
|
207
171
|
}, {
|
|
@@ -209,17 +173,14 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
209
173
|
value: function insertIntoOrderedArray(item, index, arr, sourceArr) {
|
|
210
174
|
if (arr.length > 0) {
|
|
211
175
|
var injected = false;
|
|
212
|
-
|
|
213
176
|
for (var i = 0; i < arr.length; i++) {
|
|
214
177
|
var currentItemIndex = this.findIndexInList(arr[i], sourceArr);
|
|
215
|
-
|
|
216
178
|
if (currentItemIndex > index) {
|
|
217
179
|
arr.splice(i, 0, item);
|
|
218
180
|
injected = true;
|
|
219
181
|
break;
|
|
220
182
|
}
|
|
221
183
|
}
|
|
222
|
-
|
|
223
184
|
if (!injected) {
|
|
224
185
|
arr.push(item);
|
|
225
186
|
}
|
|
@@ -233,25 +194,20 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
233
194
|
if (str && str.search(/[\xC0-\xFF]/g) > -1) {
|
|
234
195
|
str = str.replace(/[\xC0-\xC5]/g, "A").replace(/[\xC6]/g, "AE").replace(/[\xC7]/g, "C").replace(/[\xC8-\xCB]/g, "E").replace(/[\xCC-\xCF]/g, "I").replace(/[\xD0]/g, "D").replace(/[\xD1]/g, "N").replace(/[\xD2-\xD6\xD8]/g, "O").replace(/[\xD9-\xDC]/g, "U").replace(/[\xDD]/g, "Y").replace(/[\xDE]/g, "P").replace(/[\xE0-\xE5]/g, "a").replace(/[\xE6]/g, "ae").replace(/[\xE7]/g, "c").replace(/[\xE8-\xEB]/g, "e").replace(/[\xEC-\xEF]/g, "i").replace(/[\xF1]/g, "n").replace(/[\xF2-\xF6\xF8]/g, "o").replace(/[\xF9-\xFC]/g, "u").replace(/[\xFE]/g, "p").replace(/[\xFD\xFF]/g, "y");
|
|
235
196
|
}
|
|
236
|
-
|
|
237
197
|
return str;
|
|
238
198
|
}
|
|
239
199
|
}, {
|
|
240
200
|
key: "getVNodeProp",
|
|
241
201
|
value: function getVNodeProp(vnode, prop) {
|
|
242
202
|
var props = vnode._props;
|
|
243
|
-
|
|
244
203
|
if (props) {
|
|
245
204
|
var kebapProp = prop.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
|
|
246
205
|
var propName = Object.prototype.hasOwnProperty.call(props, kebapProp) ? kebapProp : prop;
|
|
247
206
|
return props[propName];
|
|
248
207
|
}
|
|
249
|
-
|
|
250
208
|
return null;
|
|
251
209
|
}
|
|
252
210
|
}]);
|
|
253
|
-
|
|
254
211
|
return ObjectUtils;
|
|
255
212
|
}();
|
|
256
|
-
|
|
257
213
|
exports.default = ObjectUtils;
|
package/utils/Utils.js
CHANGED
|
@@ -33,15 +33,9 @@ Object.defineProperty(exports, "UniqueComponentId", {
|
|
|
33
33
|
return _UniqueComponentId.default;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
-
|
|
37
36
|
var _ConnectedOverlayScrollHandler = _interopRequireDefault(require("./ConnectedOverlayScrollHandler"));
|
|
38
|
-
|
|
39
37
|
var _DomHandler = _interopRequireDefault(require("./DomHandler"));
|
|
40
|
-
|
|
41
38
|
var _ObjectUtils = _interopRequireDefault(require("./ObjectUtils"));
|
|
42
|
-
|
|
43
39
|
var _UniqueComponentId = _interopRequireDefault(require("./UniqueComponentId"));
|
|
44
|
-
|
|
45
40
|
var _EventBus = _interopRequireDefault(require("./EventBus"));
|
|
46
|
-
|
|
47
41
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|