primevue 2.4.2 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/Accordion.vue +8 -1
- package/accordion/accordion.common.js +9 -3
- package/accordion/accordion.umd.js +9 -3
- package/accordion/accordion.umd.min.js +1 -1
- package/accordiontab/AccordionTab.vue +2 -2
- package/accordiontab/accordiontab.common.js +9 -4
- package/accordiontab/accordiontab.umd.js +9 -4
- package/accordiontab/accordiontab.umd.min.js +1 -1
- package/autocomplete/AutoComplete.d.ts +1 -0
- package/autocomplete/AutoComplete.vue +8 -0
- package/autocomplete/autocomplete.common.js +21 -3
- package/autocomplete/autocomplete.umd.js +21 -3
- package/autocomplete/autocomplete.umd.min.js +1 -1
- package/avatar/avatar.common.js +1 -1
- package/avatar/avatar.umd.js +1 -1
- package/avatargroup/avatargroup.common.js +1 -1
- package/avatargroup/avatargroup.umd.js +1 -1
- package/badge/badge.common.js +1 -1
- package/badge/badge.umd.js +1 -1
- package/badgedirective/badgedirective.common.js +5 -0
- package/badgedirective/badgedirective.umd.js +5 -0
- package/badgedirective/badgedirective.umd.min.js +1 -1
- package/blockui/BlockUI.vue +6 -16
- package/blockui/blockui.common.js +16 -16
- package/blockui/blockui.umd.js +16 -16
- package/blockui/blockui.umd.min.js +1 -1
- package/breadcrumb/Breadcrumb.d.ts +1 -0
- package/breadcrumb/Breadcrumb.vue +11 -3
- package/breadcrumb/BreadcrumbItem.vue +30 -11
- package/breadcrumb/breadcrumb.common.js +45 -17
- package/breadcrumb/breadcrumb.umd.js +45 -17
- package/breadcrumb/breadcrumb.umd.min.js +1 -1
- package/breadcrumb/breadcrumbitem.common.js +34 -10
- package/breadcrumb/breadcrumbitem.umd.js +34 -10
- package/breadcrumb/breadcrumbitem.umd.min.js +1 -1
- package/button/button.common.js +6 -1
- package/button/button.umd.js +6 -1
- package/button/button.umd.min.js +1 -1
- package/calendar/Calendar.d.ts +5 -0
- package/calendar/Calendar.vue +321 -69
- package/calendar/calendar.common.js +340 -42
- package/calendar/calendar.umd.js +340 -42
- package/calendar/calendar.umd.min.js +1 -1
- package/card/card.common.js +1 -1
- package/card/card.umd.js +1 -1
- package/carousel/Carousel.vue +2 -2
- package/carousel/carousel.common.js +8 -3
- package/carousel/carousel.umd.js +8 -3
- package/carousel/carousel.umd.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +6 -4
- package/cascadeselect/CascadeSelect.vue +3 -1
- package/cascadeselect/cascadeselect.common.js +15 -4
- package/cascadeselect/cascadeselect.umd.js +15 -4
- package/cascadeselect/cascadeselect.umd.min.js +1 -1
- package/cascadeselect/cascadeselectsub.common.js +10 -1
- package/cascadeselect/cascadeselectsub.umd.js +10 -1
- package/cascadeselect/cascadeselectsub.umd.min.js +1 -1
- package/cascadeselect/demo.html +3 -4
- package/chart/Chart.vue +22 -13
- package/chart/chart.common.1.js +12825 -0
- package/chart/chart.common.js +1040 -37026
- package/chart/chart.umd.1.js +12825 -0
- package/chart/chart.umd.js +1040 -37026
- package/chart/chart.umd.min.1.js +7 -0
- package/chart/chart.umd.min.js +1 -278
- package/checkbox/Checkbox.css +1 -0
- package/checkbox/Checkbox.d.ts +2 -0
- package/checkbox/Checkbox.vue +11 -3
- package/checkbox/checkbox.common.js +17 -5
- package/checkbox/checkbox.umd.js +17 -5
- package/checkbox/checkbox.umd.min.js +1 -1
- package/chip/chip.common.js +1 -1
- package/chip/chip.umd.js +1 -1
- package/chips/chips.common.js +1 -1
- package/chips/chips.umd.js +1 -1
- package/colorpicker/colorpicker.common.js +6 -1
- package/colorpicker/colorpicker.umd.js +6 -1
- package/colorpicker/colorpicker.umd.min.js +1 -1
- package/columngroup/columngroup.common.js +1 -1
- package/columngroup/columngroup.umd.js +1 -1
- package/common/Common.css +13 -4
- package/config/primevue.common.js +4 -0
- package/config/primevue.umd.js +4 -0
- package/config/primevue.umd.min.js +1 -1
- package/{confirmationservice → confirmationeventbus}/ConfirmationEventBus.js +3 -3
- package/confirmationeventbus/confirmationeventbus.common.js +1777 -0
- package/confirmationeventbus/confirmationeventbus.umd.js +1787 -0
- package/confirmationeventbus/confirmationeventbus.umd.min.js +1 -0
- package/confirmationeventbus/demo.html +8 -0
- package/confirmationeventbus/index.d.ts +1 -0
- package/confirmationeventbus/index.js +2 -0
- package/confirmationservice/ConfirmationService.js +1 -1
- package/confirmationservice/confirmationservice.common.js +1609 -6
- package/confirmationservice/confirmationservice.umd.js +1609 -6
- package/confirmationservice/confirmationservice.umd.min.js +1 -1
- package/confirmdialog/ConfirmDialog.vue +9 -3
- package/confirmdialog/confirmdialog.common.js +437 -38
- package/confirmdialog/confirmdialog.umd.js +437 -38
- package/confirmdialog/confirmdialog.umd.min.js +1 -1
- package/confirmpopup/ConfirmPopup.d.ts +4 -1
- package/confirmpopup/ConfirmPopup.vue +9 -6
- package/confirmpopup/confirmpopup.common.js +513 -13
- package/confirmpopup/confirmpopup.umd.js +513 -13
- package/confirmpopup/confirmpopup.umd.min.js +1 -1
- package/contextmenu/ContextMenu.d.ts +1 -0
- package/contextmenu/ContextMenu.vue +5 -1
- package/contextmenu/ContextMenuSub.vue +33 -13
- package/contextmenu/contextmenu.common.js +46 -14
- package/contextmenu/contextmenu.umd.js +46 -14
- package/contextmenu/contextmenu.umd.min.js +1 -1
- package/contextmenu/contextmenusub.common.js +36 -8
- package/contextmenu/contextmenusub.umd.js +36 -8
- package/contextmenu/contextmenusub.umd.min.js +1 -1
- package/contextmenu/demo.html +4 -3
- package/datatable/BodyCell.vue +9 -5
- package/datatable/DataTable.d.ts +10 -9
- package/datatable/DataTable.vue +27 -19
- package/datatable/TableBody.vue +18 -5
- package/datatable/bodycell.common.js +21 -9
- package/datatable/bodycell.umd.js +21 -9
- package/datatable/bodycell.umd.min.js +1 -1
- package/datatable/datatable.common.js +1993 -89
- package/datatable/datatable.umd.js +1993 -89
- package/datatable/datatable.umd.min.js +1 -1
- package/datatable/headercheckbox.common.js +1 -1
- package/datatable/headercheckbox.umd.js +1 -1
- package/datatable/rowcheckbox.common.js +1 -1
- package/datatable/rowcheckbox.umd.js +1 -1
- package/datatable/rowradiobutton.common.js +1 -1
- package/datatable/rowradiobutton.umd.js +1 -1
- package/datatable/scrollableview.common.js +7 -2
- package/datatable/scrollableview.umd.js +7 -2
- package/datatable/scrollableview.umd.min.js +1 -1
- package/datatable/tablebody.common.js +44 -15
- package/datatable/tablebody.umd.js +44 -15
- package/datatable/tablebody.umd.min.js +1 -1
- package/datatable/tablefooter.common.js +1 -1
- package/datatable/tablefooter.umd.js +1 -1
- package/datatable/tableheader.common.js +7 -2
- package/datatable/tableheader.umd.js +7 -2
- package/datatable/tableheader.umd.min.js +1 -1
- package/datatable/tableloadingbody.common.js +1 -1
- package/datatable/tableloadingbody.umd.js +1 -1
- package/dataview/DataView.d.ts +2 -2
- package/dataview/DataView.vue +10 -10
- package/dataview/dataview.common.js +1937 -65
- package/dataview/dataview.umd.js +1937 -65
- package/dataview/dataview.umd.min.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.common.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.umd.js +1 -1
- package/deferredcontent/DeferredContent.vue +1 -7
- package/deferredcontent/deferredcontent.common.js +2 -2
- package/deferredcontent/deferredcontent.umd.js +2 -2
- package/dialog/Dialog.vue +35 -21
- package/dialog/dialog.common.js +42 -18
- package/dialog/dialog.umd.js +42 -18
- package/dialog/dialog.umd.min.js +1 -1
- package/divider/divider.common.js +1 -1
- package/divider/divider.umd.js +1 -1
- package/dock/Dock.d.ts +15 -0
- package/dock/Dock.vue +173 -0
- package/dock/DockSub.vue +132 -0
- package/dock/demo.html +17 -0
- package/dock/dock.common.js +917 -0
- package/dock/dock.umd.js +927 -0
- package/dock/dock.umd.min.js +1 -0
- package/dock/docksub.common.js +428 -0
- package/dock/docksub.umd.js +438 -0
- package/dock/docksub.umd.min.js +1 -0
- package/dock/index.d.ts +1 -0
- package/dock/index.js +2 -0
- package/dock/plugin.js +4 -0
- package/dropdown/Dropdown.d.ts +5 -3
- package/dropdown/Dropdown.vue +31 -5
- package/dropdown/dropdown.common.js +44 -6
- package/dropdown/dropdown.umd.js +44 -6
- package/dropdown/dropdown.umd.min.js +1 -1
- package/editor/editor.common.js +1 -1
- package/editor/editor.umd.js +1 -1
- package/fieldset/fieldset.common.js +6 -1
- package/fieldset/fieldset.umd.js +6 -1
- package/fieldset/fieldset.umd.min.js +1 -1
- package/fileupload/FileUpload.d.ts +2 -0
- package/fileupload/FileUpload.vue +12 -7
- package/fileupload/fileupload.common.js +42 -23
- package/fileupload/fileupload.umd.js +42 -23
- package/fileupload/fileupload.umd.min.js +1 -1
- package/fullcalendar/fullcalendar.common.js +1573 -777
- package/fullcalendar/fullcalendar.umd.js +1573 -777
- package/fullcalendar/fullcalendar.umd.min.js +5 -5
- package/galleria/Galleria.vue +3 -8
- package/galleria/GalleriaContent.vue +9 -0
- package/galleria/galleria.common.js +31 -13
- package/galleria/galleria.umd.js +31 -13
- package/galleria/galleria.umd.min.js +1 -1
- package/galleria/galleriacontent.common.js +18 -4
- package/galleria/galleriacontent.umd.js +18 -4
- package/galleria/galleriacontent.umd.min.js +1 -1
- package/galleria/galleriaitem.common.js +6 -1
- package/galleria/galleriaitem.umd.js +6 -1
- package/galleria/galleriaitem.umd.min.js +1 -1
- package/galleria/galleriathumbnails.common.js +6 -1
- package/galleria/galleriathumbnails.umd.js +6 -1
- package/galleria/galleriathumbnails.umd.min.js +1 -1
- package/imagepreview/ImagePreview.d.ts +10 -0
- package/imagepreview/ImagePreview.vue +205 -0
- package/imagepreview/demo.html +17 -0
- package/imagepreview/imagepreview.common.js +4083 -0
- package/imagepreview/imagepreview.umd.js +4093 -0
- package/imagepreview/imagepreview.umd.min.js +1 -0
- package/imagepreview/index.d.ts +1 -0
- package/imagepreview/index.js +2 -0
- package/imagepreview/plugin.js +4 -0
- package/inlinemessage/inlinemessage.common.js +1 -1
- package/inlinemessage/inlinemessage.umd.js +1 -1
- package/inplace/inplace.common.js +7 -2
- package/inplace/inplace.umd.js +7 -2
- package/inplace/inplace.umd.min.js +1 -1
- package/inputmask/InputMask.vue +7 -5
- package/inputmask/inputmask.common.js +19 -6
- package/inputmask/inputmask.umd.js +19 -6
- package/inputmask/inputmask.umd.min.js +1 -1
- package/inputnumber/InputNumber.vue +183 -62
- package/inputnumber/inputnumber.common.js +228 -104
- package/inputnumber/inputnumber.umd.js +228 -104
- package/inputnumber/inputnumber.umd.min.js +1 -1
- package/inputswitch/InputSwitch.d.ts +2 -0
- package/inputswitch/InputSwitch.vue +15 -3
- package/inputswitch/inputswitch.common.js +17 -5
- package/inputswitch/inputswitch.umd.js +17 -5
- package/inputswitch/inputswitch.umd.min.js +1 -1
- package/inputtext/inputtext.common.js +5 -1
- package/inputtext/inputtext.umd.js +5 -1
- package/inputtext/inputtext.umd.min.js +1 -1
- package/knob/knob.common.js +1 -1
- package/knob/knob.umd.js +1 -1
- package/listbox/Listbox.d.ts +3 -3
- package/listbox/listbox.common.js +10 -1
- package/listbox/listbox.umd.js +10 -1
- package/listbox/listbox.umd.min.js +1 -1
- package/megamenu/MegaMenu.d.ts +6 -1
- package/megamenu/MegaMenu.vue +51 -22
- package/megamenu/megamenu.common.js +52 -10
- package/megamenu/megamenu.umd.js +52 -10
- package/megamenu/megamenu.umd.min.js +1 -1
- package/menu/Menu.d.ts +1 -0
- package/menu/Menu.vue +11 -4
- package/menu/Menuitem.vue +25 -11
- package/menu/menu.common.js +46 -17
- package/menu/menu.umd.js +46 -17
- package/menu/menu.umd.min.js +1 -1
- package/menu/menuitem.common.js +33 -11
- package/menu/menuitem.umd.js +33 -11
- package/menu/menuitem.umd.min.js +1 -1
- package/menubar/Menubar.d.ts +1 -0
- package/menubar/Menubar.vue +5 -1
- package/menubar/MenubarSub.vue +34 -14
- package/menubar/menubar.common.js +46 -14
- package/menubar/menubar.umd.js +46 -14
- package/menubar/menubar.umd.min.js +1 -1
- package/menubar/menubarsub.common.js +36 -8
- package/menubar/menubarsub.umd.js +36 -8
- package/menubar/menubarsub.umd.min.js +1 -1
- package/message/Message.d.ts +1 -0
- package/message/Message.vue +5 -1
- package/message/message.common.js +12 -3
- package/message/message.umd.js +12 -3
- package/message/message.umd.min.js +1 -1
- package/multiselect/MultiSelect.d.ts +4 -3
- package/multiselect/MultiSelect.vue +8 -1
- package/multiselect/multiselect.common.js +20 -5
- package/multiselect/multiselect.umd.js +20 -5
- package/multiselect/multiselect.umd.min.js +1 -1
- package/orderlist/OrderList.d.ts +2 -0
- package/orderlist/OrderList.vue +2 -0
- package/orderlist/orderlist.common.js +15 -4
- package/orderlist/orderlist.umd.js +15 -4
- package/orderlist/orderlist.umd.min.js +1 -1
- package/organizationchart/organizationchart.common.js +11 -2
- package/organizationchart/organizationchart.umd.js +11 -2
- package/organizationchart/organizationchart.umd.min.js +1 -1
- package/organizationchart/organizationchartnode.common.js +6 -1
- package/organizationchart/organizationchartnode.umd.js +6 -1
- package/organizationchart/organizationchartnode.umd.min.js +1 -1
- package/overlaypanel/overlaypanel.common.js +6 -1
- package/overlaypanel/overlaypanel.umd.js +6 -1
- package/overlaypanel/overlaypanel.umd.min.js +1 -1
- package/package.json +5 -1
- package/paginator/CurrentPageReport.vue +6 -2
- package/paginator/JumpToPageDropdown.vue +33 -0
- package/paginator/JumpToPageInput.vue +25 -0
- package/paginator/Paginator.d.ts +2 -2
- package/paginator/Paginator.vue +24 -11
- package/paginator/RowsPerPageDropdown.vue +3 -2
- package/paginator/currentpagereport.common.js +7 -3
- package/paginator/currentpagereport.umd.js +7 -3
- package/paginator/currentpagereport.umd.min.js +1 -1
- package/paginator/demo.html +3 -3
- package/paginator/firstpagelink.common.js +6 -1
- package/paginator/firstpagelink.umd.js +6 -1
- package/paginator/firstpagelink.umd.min.js +1 -1
- package/paginator/jumptopagedropdown.common.js +6476 -0
- package/paginator/jumptopagedropdown.umd.js +6486 -0
- package/paginator/jumptopagedropdown.umd.min.js +1 -0
- package/paginator/jumptopageinput.common.js +7421 -0
- package/paginator/jumptopageinput.umd.js +7431 -0
- package/paginator/jumptopageinput.umd.min.js +1 -0
- package/paginator/lastpagelink.common.js +6 -1
- package/paginator/lastpagelink.umd.js +6 -1
- package/paginator/lastpagelink.umd.min.js +1 -1
- package/paginator/nextpagelink.common.js +6 -1
- package/paginator/nextpagelink.umd.js +6 -1
- package/paginator/nextpagelink.umd.min.js +1 -1
- package/paginator/pagelinks.common.js +6 -1
- package/paginator/pagelinks.umd.js +6 -1
- package/paginator/pagelinks.umd.min.js +1 -1
- package/paginator/paginator.common.js +2264 -125
- package/paginator/paginator.umd.js +2264 -125
- package/paginator/paginator.umd.min.js +1 -1
- package/paginator/prevpagelink.common.js +6 -1
- package/paginator/prevpagelink.umd.js +6 -1
- package/paginator/prevpagelink.umd.min.js +1 -1
- package/paginator/rowsperpagedropdown.common.js +52 -13
- package/paginator/rowsperpagedropdown.umd.js +52 -13
- package/paginator/rowsperpagedropdown.umd.min.js +1 -1
- package/panel/Panel.d.ts +1 -0
- package/panel/Panel.vue +1 -1
- package/panel/panel.common.js +7 -2
- package/panel/panel.umd.js +7 -2
- package/panel/panel.umd.min.js +1 -1
- package/panelmenu/PanelMenu.d.ts +1 -0
- package/panelmenu/PanelMenu.vue +32 -6
- package/panelmenu/PanelMenuSub.vue +32 -13
- package/panelmenu/panelmenu.common.js +69 -16
- package/panelmenu/panelmenu.umd.js +69 -16
- package/panelmenu/panelmenu.umd.min.js +1 -1
- package/panelmenu/panelmenusub.common.js +29 -7
- package/panelmenu/panelmenusub.umd.js +29 -7
- package/panelmenu/panelmenusub.umd.min.js +1 -1
- package/password/password.common.js +11 -2
- package/password/password.umd.js +11 -2
- package/password/password.umd.min.js +1 -1
- package/picklist/PickList.d.ts +8 -0
- package/picklist/PickList.vue +13 -4
- package/picklist/picklist.common.js +22 -4
- package/picklist/picklist.umd.js +22 -4
- package/picklist/picklist.umd.min.js +1 -1
- package/progressbar/ProgressBar.vue +20 -13
- package/progressbar/progressbar.common.js +11 -6
- package/progressbar/progressbar.umd.js +11 -6
- package/progressbar/progressbar.umd.min.js +1 -1
- package/progressspinner/progressspinner.common.js +1 -1
- package/progressspinner/progressspinner.umd.js +1 -1
- package/radiobutton/radiobutton.common.js +5 -1
- package/radiobutton/radiobutton.umd.js +5 -1
- package/radiobutton/radiobutton.umd.min.js +1 -1
- package/rating/Rating.vue +1 -1
- package/rating/rating.common.js +3 -3
- package/rating/rating.umd.js +3 -3
- package/rating/rating.umd.min.js +1 -1
- package/resources/primevue.css +15 -4
- package/resources/primevue.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +503 -83
- package/resources/themes/arya-green/theme.css +503 -83
- package/resources/themes/arya-orange/theme.css +503 -83
- package/resources/themes/arya-purple/theme.css +503 -83
- package/resources/themes/bootstrap4-dark-blue/theme.css +500 -87
- package/resources/themes/bootstrap4-dark-purple/theme.css +500 -87
- package/resources/themes/bootstrap4-light-blue/theme.css +490 -77
- package/resources/themes/bootstrap4-light-purple/theme.css +490 -77
- package/resources/themes/fluent-light/theme.css +497 -77
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-blue/theme.css +5418 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/theme.css +5418 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-purple/theme.css +5418 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/theme.css +5418 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-blue/theme.css +5418 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-indigo/theme.css +5418 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-purple/theme.css +5418 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-teal/theme.css +5418 -0
- package/resources/themes/luna-amber/theme.css +500 -87
- package/resources/themes/luna-blue/theme.css +500 -87
- package/resources/themes/luna-green/theme.css +500 -87
- package/resources/themes/luna-pink/theme.css +500 -87
- package/resources/themes/md-dark-deeppurple/theme.css +801 -128
- package/resources/themes/md-dark-indigo/theme.css +801 -128
- package/resources/themes/md-light-deeppurple/theme.css +791 -118
- package/resources/themes/md-light-indigo/theme.css +791 -118
- package/resources/themes/mdc-dark-deeppurple/theme.css +1087 -414
- package/resources/themes/mdc-dark-indigo/theme.css +1035 -362
- package/resources/themes/mdc-light-deeppurple/theme.css +791 -118
- package/resources/themes/mdc-light-indigo/theme.css +791 -118
- package/resources/themes/nova/theme.css +490 -77
- package/resources/themes/nova-accent/theme.css +490 -77
- package/resources/themes/nova-alt/theme.css +490 -77
- package/resources/themes/nova-vue/theme.css +490 -77
- package/resources/themes/rhea/theme.css +490 -77
- package/resources/themes/saga-blue/theme.css +493 -73
- package/resources/themes/saga-green/theme.css +493 -73
- package/resources/themes/saga-orange/theme.css +493 -73
- package/resources/themes/saga-purple/theme.css +493 -73
- package/resources/themes/tailwind-light/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-Light.woff +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/tailwind-light/theme.css +5493 -0
- package/resources/themes/vela-blue/theme.css +503 -83
- package/resources/themes/vela-green/theme.css +503 -83
- package/resources/themes/vela-orange/theme.css +503 -83
- package/resources/themes/vela-purple/theme.css +503 -83
- package/ripple/ripple.common.js +5 -0
- package/ripple/ripple.umd.js +5 -0
- package/ripple/ripple.umd.min.js +1 -1
- package/row/row.common.js +1 -1
- package/row/row.umd.js +1 -1
- package/scrollpanel/scrollpanel.common.js +6 -1
- package/scrollpanel/scrollpanel.umd.js +6 -1
- package/scrollpanel/scrollpanel.umd.min.js +1 -1
- package/scrolltop/scrolltop.common.js +6 -1
- package/scrolltop/scrolltop.umd.js +6 -1
- package/scrolltop/scrolltop.umd.min.js +1 -1
- package/selectbutton/SelectButton.d.ts +3 -3
- package/selectbutton/SelectButton.vue +6 -1
- package/selectbutton/selectbutton.common.js +17 -3
- package/selectbutton/selectbutton.umd.js +17 -3
- package/selectbutton/selectbutton.umd.min.js +1 -1
- package/sidebar/Sidebar.vue +3 -16
- package/sidebar/sidebar.common.js +15 -15
- package/sidebar/sidebar.umd.js +15 -15
- package/sidebar/sidebar.umd.min.js +1 -1
- package/skeleton/skeleton.common.js +1 -1
- package/skeleton/skeleton.umd.js +1 -1
- package/slider/slider.common.js +6 -1
- package/slider/slider.umd.js +6 -1
- package/slider/slider.umd.min.js +1 -1
- package/speeddial/SpeedDial.d.ts +31 -0
- package/speeddial/SpeedDial.vue +341 -0
- package/speeddial/demo.html +17 -0
- package/speeddial/index.d.ts +1 -0
- package/speeddial/index.js +2 -0
- package/speeddial/plugin.js +4 -0
- package/speeddial/speeddial.common.js +4741 -0
- package/speeddial/speeddial.umd.js +4751 -0
- package/speeddial/speeddial.umd.min.js +1 -0
- package/splitbutton/splitbutton.common.js +51 -22
- package/splitbutton/splitbutton.umd.js +51 -22
- package/splitbutton/splitbutton.umd.min.js +1 -1
- package/splitter/splitter.common.js +5 -0
- package/splitter/splitter.umd.js +5 -0
- package/splitter/splitter.umd.min.js +1 -1
- package/steps/Steps.d.ts +1 -0
- package/steps/Steps.vue +30 -8
- package/steps/steps.common.js +33 -6
- package/steps/steps.umd.js +33 -6
- package/steps/steps.umd.min.js +1 -1
- package/styleclass/StyleClass.d.ts +5 -0
- package/styleclass/StyleClass.js +179 -0
- package/styleclass/demo.html +8 -0
- package/styleclass/index.d.ts +1 -0
- package/styleclass/index.js +2 -0
- package/styleclass/plugin.js +4 -0
- package/styleclass/styleclass.common.js +3576 -0
- package/styleclass/styleclass.umd.js +3586 -0
- package/styleclass/styleclass.umd.min.js +1 -0
- package/tabmenu/TabMenu.d.ts +1 -0
- package/tabmenu/TabMenu.vue +44 -11
- package/tabmenu/tabmenu.common.js +171 -9
- package/tabmenu/tabmenu.umd.js +171 -9
- package/tabmenu/tabmenu.umd.min.js +1 -1
- package/tabpanel/tabpanel.common.js +1 -1
- package/tabpanel/tabpanel.umd.js +1 -1
- package/tabview/TabView.d.ts +1 -0
- package/tabview/TabView.vue +111 -11
- package/tabview/tabview.common.js +86 -5
- package/tabview/tabview.umd.js +86 -5
- package/tabview/tabview.umd.min.js +1 -1
- package/tag/tag.common.js +1 -1
- package/tag/tag.umd.js +1 -1
- package/terminal/terminal.common.js +1 -1
- package/terminal/terminal.umd.js +1 -1
- package/textarea/textarea.common.js +5 -1
- package/textarea/textarea.umd.js +5 -1
- package/textarea/textarea.umd.min.js +1 -1
- package/tieredmenu/TieredMenu.d.ts +1 -0
- package/tieredmenu/TieredMenu.vue +5 -1
- package/tieredmenu/TieredMenuSub.vue +30 -14
- package/tieredmenu/demo.html +4 -3
- package/tieredmenu/tieredmenu.common.js +41 -13
- package/tieredmenu/tieredmenu.umd.js +41 -13
- package/tieredmenu/tieredmenu.umd.min.js +1 -1
- package/tieredmenu/tieredmenusub.common.js +31 -7
- package/tieredmenu/tieredmenusub.umd.js +31 -7
- package/tieredmenu/tieredmenusub.umd.min.js +1 -1
- package/timeline/timeline.common.js +5 -1
- package/timeline/timeline.umd.js +5 -1
- package/timeline/timeline.umd.min.js +1 -1
- package/toast/Toast.d.ts +7 -1
- package/toast/Toast.vue +51 -4
- package/toast/ToastMessage.vue +44 -10
- package/toast/toast.common.js +103 -14
- package/toast/toast.umd.js +103 -14
- package/toast/toast.umd.min.js +1 -1
- package/toast/toastmessage.common.js +44 -7
- package/toast/toastmessage.umd.js +44 -7
- package/toast/toastmessage.umd.min.js +1 -1
- package/togglebutton/togglebutton.common.js +6 -1
- package/togglebutton/togglebutton.umd.js +6 -1
- package/togglebutton/togglebutton.umd.min.js +1 -1
- package/toolbar/Toolbar.d.ts +1 -1
- package/toolbar/Toolbar.vue +2 -2
- package/toolbar/toolbar.common.js +3 -3
- package/toolbar/toolbar.umd.js +3 -3
- package/toolbar/toolbar.umd.min.js +1 -1
- package/tooltip/Tooltip.css +1 -0
- package/tooltip/Tooltip.js +59 -6
- package/tooltip/tooltip.common.js +1763 -70
- package/tooltip/tooltip.umd.js +1763 -70
- package/tooltip/tooltip.umd.min.js +1 -1
- package/tree/TreeNode.vue +5 -1
- package/tree/tree.common.js +23 -8
- package/tree/tree.umd.js +23 -8
- package/tree/tree.umd.min.js +1 -1
- package/tree/treenode.common.js +16 -3
- package/tree/treenode.umd.js +16 -3
- package/tree/treenode.umd.min.js +1 -1
- package/treetable/TreeTable.d.ts +2 -2
- package/treetable/TreeTable.vue +8 -8
- package/treetable/treetable.common.js +1900 -90
- package/treetable/treetable.umd.js +1900 -90
- package/treetable/treetable.umd.min.js +1 -1
- package/treetable/treetablerow.common.js +11 -1
- package/treetable/treetablerow.umd.js +11 -1
- package/treetable/treetablerow.umd.min.js +1 -1
- package/treetable/treetablerowloader.common.js +12 -1
- package/treetable/treetablerowloader.umd.js +12 -1
- package/treetable/treetablerowloader.umd.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.common.js +1 -1
- package/tristatecheckbox/tristatecheckbox.umd.js +1 -1
- package/utils/DomHandler.js +5 -0
- package/utils/EventBus.js +33 -0
- package/utils/connectedoverlayscrollhandler.common.js +5 -0
- package/utils/connectedoverlayscrollhandler.umd.js +5 -0
- package/utils/connectedoverlayscrollhandler.umd.min.js +1 -1
- package/utils/domhandler.common.js +5 -0
- package/utils/domhandler.umd.js +5 -0
- package/utils/domhandler.umd.min.js +1 -1
- package/utils/eventbus.common.js +1774 -0
- package/utils/eventbus.umd.js +1784 -0
- package/utils/eventbus.umd.min.js +1 -0
- package/utils/filterutils.common.js +4 -0
- package/utils/filterutils.umd.js +4 -0
- package/utils/filterutils.umd.min.js +1 -1
- package/utils/objectutils.common.js +4 -0
- package/utils/objectutils.umd.js +4 -0
- package/utils/objectutils.umd.min.js +1 -1
- package/vetur-attributes.json +236 -16
- package/vetur-tags.json +88 -18
- package/web-types.json +2042 -1266
- package/confirmationservice/confirmationeventbus.common.js +0 -174
- package/confirmationservice/confirmationeventbus.umd.js +0 -184
- package/confirmationservice/confirmationeventbus.umd.min.js +0 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<span :class="containerClass">
|
|
3
|
-
<INInputText ref="input" :class="['p-inputnumber-input', inputClass]" :style="inputStyle" :value="formattedValue" v-bind="$attrs"
|
|
2
|
+
<span :class="containerClass" :style="styles">
|
|
3
|
+
<INInputText ref="input" :class="['p-inputnumber-input', inputClass]" :style="inputStyle" :value="formattedValue" v-bind="$attrs" :aria-valumin="min" :aria-valuemax="max"
|
|
4
|
+
@input="onUserInput" @keydown="onInputKeyDown" @keypress="onInputKeyPress" @paste="onPaste" @click="onInputClick" @focus="onInputFocus" @blur="onInputBlur"/>
|
|
4
5
|
<span class="p-inputnumber-button-group" v-if="showButtons && buttonLayout === 'stacked'">
|
|
5
6
|
<INButton :class="upButtonClass" :icon="incrementButtonIcon" v-on="upButtonListeners" :disabled="$attrs.disabled" />
|
|
6
7
|
<INButton :class="downButtonClass" :icon="decrementButtonIcon" v-on="downButtonListeners" :disabled="$attrs.disabled" />
|
|
@@ -101,6 +102,12 @@ export default {
|
|
|
101
102
|
type: Number,
|
|
102
103
|
default: 1
|
|
103
104
|
},
|
|
105
|
+
allowEmpty: {
|
|
106
|
+
type: Boolean,
|
|
107
|
+
default: true
|
|
108
|
+
},
|
|
109
|
+
styles: null,
|
|
110
|
+
className: null,
|
|
104
111
|
inputStyle: null,
|
|
105
112
|
inputClass: null
|
|
106
113
|
},
|
|
@@ -120,10 +127,14 @@ export default {
|
|
|
120
127
|
timer: null,
|
|
121
128
|
data() {
|
|
122
129
|
return {
|
|
130
|
+
d_value: null,
|
|
123
131
|
focused: false
|
|
124
132
|
}
|
|
125
133
|
},
|
|
126
134
|
watch: {
|
|
135
|
+
value(newValue) {
|
|
136
|
+
this.d_value = newValue;
|
|
137
|
+
},
|
|
127
138
|
locale(newValue, oldValue) {
|
|
128
139
|
this.updateConstructParser(newValue, oldValue);
|
|
129
140
|
},
|
|
@@ -175,10 +186,10 @@ export default {
|
|
|
175
186
|
const numerals = [...new Intl.NumberFormat(this.locale, {useGrouping: false}).format(9876543210)].reverse();
|
|
176
187
|
const index = new Map(numerals.map((d, i) => [d, i]));
|
|
177
188
|
this._numeral = new RegExp(`[${numerals.join('')}]`, 'g');
|
|
178
|
-
this._decimal = this.getDecimalExpression();
|
|
179
189
|
this._group = this.getGroupingExpression();
|
|
180
190
|
this._minusSign = this.getMinusSignExpression();
|
|
181
191
|
this._currency = this.getCurrencyExpression();
|
|
192
|
+
this._decimal = this.getDecimalExpression();
|
|
182
193
|
this._suffix = this.getSuffixExpression();
|
|
183
194
|
this._prefix = this.getPrefixExpression();
|
|
184
195
|
this._index = d => index.get(d);
|
|
@@ -192,8 +203,8 @@ export default {
|
|
|
192
203
|
return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
|
|
193
204
|
},
|
|
194
205
|
getDecimalExpression() {
|
|
195
|
-
const formatter = new Intl.NumberFormat(this.locale, {useGrouping: false});
|
|
196
|
-
return new RegExp(`[${formatter.format(1.1).trim().replace(this._numeral, '')}]`, 'g');
|
|
206
|
+
const formatter = new Intl.NumberFormat(this.locale, {...this.getOptions(), useGrouping: false});
|
|
207
|
+
return new RegExp(`[${formatter.format(1.1).replace(this._currency, '').trim().replace(this._numeral, '')}]`, 'g');
|
|
197
208
|
},
|
|
198
209
|
getGroupingExpression() {
|
|
199
210
|
const formatter = new Intl.NumberFormat(this.locale, {useGrouping: true});
|
|
@@ -206,8 +217,9 @@ export default {
|
|
|
206
217
|
},
|
|
207
218
|
getCurrencyExpression() {
|
|
208
219
|
if (this.currency) {
|
|
209
|
-
const formatter = new Intl.NumberFormat(this.locale, {style: 'currency', currency: this.currency, currencyDisplay: this.currencyDisplay
|
|
210
|
-
|
|
220
|
+
const formatter = new Intl.NumberFormat(this.locale, {style: 'currency', currency: this.currency, currencyDisplay: this.currencyDisplay,
|
|
221
|
+
minimumFractionDigits: 0, maximumFractionDigits: 0});
|
|
222
|
+
return new RegExp(`[${formatter.format(1).replace(/\s/g, '').replace(this._numeral, '').replace(this._group, '')}]`, 'g');
|
|
211
223
|
}
|
|
212
224
|
|
|
213
225
|
return new RegExp(`[]`,'g');
|
|
@@ -300,6 +312,8 @@ export default {
|
|
|
300
312
|
|
|
301
313
|
this.updateInput(newValue, null, 'spin');
|
|
302
314
|
this.updateModel(event, newValue);
|
|
315
|
+
|
|
316
|
+
this.handleOnInput(event, currentValue, newValue);
|
|
303
317
|
}
|
|
304
318
|
},
|
|
305
319
|
onUpButtonMouseDown(event) {
|
|
@@ -356,7 +370,7 @@ export default {
|
|
|
356
370
|
this.repeat(event, null, -1);
|
|
357
371
|
}
|
|
358
372
|
},
|
|
359
|
-
|
|
373
|
+
onUserInput() {
|
|
360
374
|
if (this.isSpecialChar) {
|
|
361
375
|
this.$refs.input.$el.value = this.lastValue;
|
|
362
376
|
}
|
|
@@ -418,23 +432,31 @@ export default {
|
|
|
418
432
|
event.preventDefault();
|
|
419
433
|
|
|
420
434
|
if (selectionStart === selectionEnd) {
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
this._decimal.lastIndex = 0;
|
|
435
|
+
const deleteChar = inputValue.charAt(selectionStart - 1);
|
|
436
|
+
const { decimalCharIndex, decimalCharIndexWithoutPrefix } = this.getDecimalCharIndexes(inputValue);
|
|
424
437
|
|
|
425
438
|
if (this.isNumeralChar(deleteChar)) {
|
|
439
|
+
const decimalLength = this.getDecimalLength(inputValue);
|
|
440
|
+
|
|
426
441
|
if (this._group.test(deleteChar)) {
|
|
427
442
|
this._group.lastIndex = 0;
|
|
428
443
|
newValueStr = inputValue.slice(0, selectionStart - 2) + inputValue.slice(selectionStart - 1);
|
|
429
444
|
}
|
|
430
445
|
else if (this._decimal.test(deleteChar)) {
|
|
431
446
|
this._decimal.lastIndex = 0;
|
|
432
|
-
|
|
447
|
+
|
|
448
|
+
if (decimalLength) {
|
|
449
|
+
this.$refs.input.$el.setSelectionRange(selectionStart - 1, selectionStart - 1);
|
|
450
|
+
}
|
|
451
|
+
else {
|
|
452
|
+
newValueStr = inputValue.slice(0, selectionStart - 1) + inputValue.slice(selectionStart);
|
|
453
|
+
}
|
|
433
454
|
}
|
|
434
455
|
else if (decimalCharIndex > 0 && selectionStart > decimalCharIndex) {
|
|
435
|
-
|
|
456
|
+
const insertedText = this.isDecimalMode() && (this.minFractionDigits || 0) < decimalLength ? '' : '0';
|
|
457
|
+
newValueStr = inputValue.slice(0, selectionStart - 1) + insertedText + inputValue.slice(selectionStart);
|
|
436
458
|
}
|
|
437
|
-
else if (
|
|
459
|
+
else if (decimalCharIndexWithoutPrefix === 1) {
|
|
438
460
|
newValueStr = inputValue.slice(0, selectionStart - 1) + '0' + inputValue.slice(selectionStart);
|
|
439
461
|
newValueStr = this.parseValue(newValueStr) > 0 ? newValueStr : '';
|
|
440
462
|
}
|
|
@@ -458,23 +480,31 @@ export default {
|
|
|
458
480
|
event.preventDefault();
|
|
459
481
|
|
|
460
482
|
if (selectionStart === selectionEnd) {
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
this._decimal.lastIndex = 0;
|
|
483
|
+
const deleteChar = inputValue.charAt(selectionStart);
|
|
484
|
+
const { decimalCharIndex, decimalCharIndexWithoutPrefix } = this.getDecimalCharIndexes(inputValue);
|
|
464
485
|
|
|
465
486
|
if (this.isNumeralChar(deleteChar)) {
|
|
487
|
+
const decimalLength = this.getDecimalLength(inputValue);
|
|
488
|
+
|
|
466
489
|
if (this._group.test(deleteChar)) {
|
|
467
490
|
this._group.lastIndex = 0;
|
|
468
491
|
newValueStr = inputValue.slice(0, selectionStart) + inputValue.slice(selectionStart + 2);
|
|
469
492
|
}
|
|
470
493
|
else if (this._decimal.test(deleteChar)) {
|
|
471
494
|
this._decimal.lastIndex = 0;
|
|
472
|
-
|
|
495
|
+
|
|
496
|
+
if (decimalLength) {
|
|
497
|
+
this.$refs.input.$el.setSelectionRange(selectionStart + 1, selectionStart + 1);
|
|
498
|
+
}
|
|
499
|
+
else {
|
|
500
|
+
newValueStr = inputValue.slice(0, selectionStart) + inputValue.slice(selectionStart + 1);
|
|
501
|
+
}
|
|
473
502
|
}
|
|
474
503
|
else if (decimalCharIndex > 0 && selectionStart > decimalCharIndex) {
|
|
475
|
-
|
|
504
|
+
const insertedText = this.isDecimalMode() && (this.minFractionDigits || 0) < decimalLength ? '' : '0';
|
|
505
|
+
newValueStr = inputValue.slice(0, selectionStart) + insertedText + inputValue.slice(selectionStart + 1);
|
|
476
506
|
}
|
|
477
|
-
else if (
|
|
507
|
+
else if (decimalCharIndexWithoutPrefix === 1) {
|
|
478
508
|
newValueStr = inputValue.slice(0, selectionStart) + '0' + inputValue.slice(selectionStart + 1);
|
|
479
509
|
newValueStr = this.parseValue(newValueStr) > 0 ? newValueStr : '';
|
|
480
510
|
}
|
|
@@ -520,7 +550,7 @@ export default {
|
|
|
520
550
|
return this.min === null || this.min < 0;
|
|
521
551
|
},
|
|
522
552
|
isMinusSign(char) {
|
|
523
|
-
if (this._minusSign.test(char)) {
|
|
553
|
+
if (this._minusSign.test(char) || char === '-') {
|
|
524
554
|
this._minusSign.lastIndex = 0;
|
|
525
555
|
return true;
|
|
526
556
|
}
|
|
@@ -535,6 +565,31 @@ export default {
|
|
|
535
565
|
|
|
536
566
|
return false;
|
|
537
567
|
},
|
|
568
|
+
isDecimalMode() {
|
|
569
|
+
return this.mode === 'decimal';
|
|
570
|
+
},
|
|
571
|
+
getDecimalCharIndexes(val) {
|
|
572
|
+
let decimalCharIndex = val.search(this._decimal);
|
|
573
|
+
this._decimal.lastIndex = 0;
|
|
574
|
+
|
|
575
|
+
const filteredVal = val.replace(this._prefix, '').trim().replace(/\s/g, '').replace(this._currency, '');
|
|
576
|
+
const decimalCharIndexWithoutPrefix = filteredVal.search(this._decimal);
|
|
577
|
+
this._decimal.lastIndex = 0;
|
|
578
|
+
|
|
579
|
+
return { decimalCharIndex, decimalCharIndexWithoutPrefix };
|
|
580
|
+
},
|
|
581
|
+
getCharIndexes(val) {
|
|
582
|
+
const decimalCharIndex = val.search(this._decimal);
|
|
583
|
+
this._decimal.lastIndex = 0;
|
|
584
|
+
const minusCharIndex = val.search(this._minusSign);
|
|
585
|
+
this._minusSign.lastIndex = 0;
|
|
586
|
+
const suffixCharIndex = val.search(this._suffix);
|
|
587
|
+
this._suffix.lastIndex = 0;
|
|
588
|
+
const currencyCharIndex = val.search(this._currency);
|
|
589
|
+
this._currency.lastIndex = 0;
|
|
590
|
+
|
|
591
|
+
return { decimalCharIndex, minusCharIndex, suffixCharIndex, currencyCharIndex };
|
|
592
|
+
},
|
|
538
593
|
insert(event, text, sign = { isDecimalSign: false, isMinusSign: false }) {
|
|
539
594
|
const minusCharIndexOnText = text.search(this._minusSign);
|
|
540
595
|
this._minusSign.lastIndex = 0;
|
|
@@ -545,10 +600,7 @@ export default {
|
|
|
545
600
|
const selectionStart = this.$refs.input.$el.selectionStart;
|
|
546
601
|
const selectionEnd = this.$refs.input.$el.selectionEnd;
|
|
547
602
|
let inputValue = this.$refs.input.$el.value.trim();
|
|
548
|
-
const decimalCharIndex =
|
|
549
|
-
this._decimal.lastIndex = 0;
|
|
550
|
-
const minusCharIndex = inputValue.search(this._minusSign);
|
|
551
|
-
this._minusSign.lastIndex = 0;
|
|
603
|
+
const { decimalCharIndex, minusCharIndex, suffixCharIndex, currencyCharIndex } = this.getCharIndexes(inputValue);
|
|
552
604
|
let newValueStr;
|
|
553
605
|
|
|
554
606
|
if (sign.isMinusSign) {
|
|
@@ -569,6 +621,10 @@ export default {
|
|
|
569
621
|
newValueStr = this.insertText(inputValue, text, selectionStart, selectionEnd);
|
|
570
622
|
this.updateValue(event, newValueStr, text, 'insert');
|
|
571
623
|
}
|
|
624
|
+
else if (decimalCharIndex === -1 && this.maxFractionDigits) {
|
|
625
|
+
newValueStr = this.insertText(inputValue, text, selectionStart, selectionEnd);
|
|
626
|
+
this.updateValue(event, newValueStr, text, 'insert');
|
|
627
|
+
}
|
|
572
628
|
}
|
|
573
629
|
else {
|
|
574
630
|
const maxFractionDigits = this.numberFormat.resolvedOptions().maximumFractionDigits;
|
|
@@ -576,7 +632,9 @@ export default {
|
|
|
576
632
|
|
|
577
633
|
if (decimalCharIndex > 0 && selectionStart > decimalCharIndex) {
|
|
578
634
|
if ((selectionStart + text.length - (decimalCharIndex + 1)) <= maxFractionDigits) {
|
|
579
|
-
|
|
635
|
+
const charIndex = currencyCharIndex >= selectionStart ? currencyCharIndex - 1 : (suffixCharIndex >= selectionStart ? suffixCharIndex : inputValue.length);
|
|
636
|
+
|
|
637
|
+
newValueStr = inputValue.slice(0, selectionStart) + text + inputValue.slice(selectionStart + text.length, charIndex) + inputValue.slice(charIndex);
|
|
580
638
|
this.updateValue(event, newValueStr, text, operation);
|
|
581
639
|
}
|
|
582
640
|
}
|
|
@@ -587,7 +645,7 @@ export default {
|
|
|
587
645
|
}
|
|
588
646
|
},
|
|
589
647
|
insertText(value, text, start, end) {
|
|
590
|
-
let textSplit = text.split('.');
|
|
648
|
+
let textSplit = text === '.' ? text : text.split('.');
|
|
591
649
|
|
|
592
650
|
if (textSplit.length === 2) {
|
|
593
651
|
const decimalCharIndex = value.slice(start, end).search(this._decimal);
|
|
@@ -627,9 +685,14 @@ export default {
|
|
|
627
685
|
let valueLength = inputValue.length;
|
|
628
686
|
let index = null;
|
|
629
687
|
|
|
688
|
+
// remove prefix
|
|
689
|
+
let prefixLength = (this.prefixChar || '').length;
|
|
690
|
+
inputValue = inputValue.replace(this._prefix, '');
|
|
691
|
+
selectionStart = selectionStart - prefixLength;
|
|
692
|
+
|
|
630
693
|
let char = inputValue.charAt(selectionStart);
|
|
631
694
|
if (this.isNumeralChar(char)) {
|
|
632
|
-
return;
|
|
695
|
+
return selectionStart + prefixLength;
|
|
633
696
|
}
|
|
634
697
|
|
|
635
698
|
//left
|
|
@@ -637,7 +700,7 @@ export default {
|
|
|
637
700
|
while (i >= 0) {
|
|
638
701
|
char = inputValue.charAt(i);
|
|
639
702
|
if (this.isNumeralChar(char)) {
|
|
640
|
-
index = i;
|
|
703
|
+
index = i + prefixLength;
|
|
641
704
|
break;
|
|
642
705
|
}
|
|
643
706
|
else {
|
|
@@ -649,11 +712,11 @@ export default {
|
|
|
649
712
|
this.$refs.input.$el.setSelectionRange(index + 1, index + 1);
|
|
650
713
|
}
|
|
651
714
|
else {
|
|
652
|
-
i = selectionStart
|
|
715
|
+
i = selectionStart;
|
|
653
716
|
while (i < valueLength) {
|
|
654
717
|
char = inputValue.charAt(i);
|
|
655
718
|
if (this.isNumeralChar(char)) {
|
|
656
|
-
index = i;
|
|
719
|
+
index = i + prefixLength;
|
|
657
720
|
break;
|
|
658
721
|
}
|
|
659
722
|
else {
|
|
@@ -665,6 +728,8 @@ export default {
|
|
|
665
728
|
this.$refs.input.$el.setSelectionRange(index, index);
|
|
666
729
|
}
|
|
667
730
|
}
|
|
731
|
+
|
|
732
|
+
return index || 0;
|
|
668
733
|
},
|
|
669
734
|
onInputClick() {
|
|
670
735
|
this.initCursor();
|
|
@@ -684,12 +749,39 @@ export default {
|
|
|
684
749
|
this._minusSign.lastIndex = 0;
|
|
685
750
|
},
|
|
686
751
|
updateValue(event, valueStr, insertedValueStr, operation) {
|
|
752
|
+
let currentValue = this.$refs.input.$el.value;
|
|
753
|
+
let newValue = null;
|
|
754
|
+
|
|
687
755
|
if (valueStr != null) {
|
|
688
|
-
|
|
689
|
-
this.
|
|
756
|
+
newValue = this.parseValue(valueStr);
|
|
757
|
+
newValue = !newValue && !this.allowEmpty ? 0 : newValue;
|
|
758
|
+
this.updateInput(newValue, insertedValueStr, operation, valueStr);
|
|
759
|
+
|
|
760
|
+
this.handleOnInput(event, currentValue, newValue);
|
|
761
|
+
}
|
|
762
|
+
},
|
|
763
|
+
handleOnInput(event, currentValue, newValue) {
|
|
764
|
+
if (this.isValueChanged(currentValue, newValue)) {
|
|
765
|
+
this.$emit('input', newValue);
|
|
766
|
+
}
|
|
767
|
+
},
|
|
768
|
+
isValueChanged(currentValue, newValue) {
|
|
769
|
+
if (newValue === null && currentValue !== null) {
|
|
770
|
+
return true;
|
|
690
771
|
}
|
|
772
|
+
|
|
773
|
+
if (newValue != null) {
|
|
774
|
+
let parsedCurrentValue = (typeof currentValue === 'string') ? this.parseValue(currentValue) : currentValue;
|
|
775
|
+
return newValue !== parsedCurrentValue;
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
return false;
|
|
691
779
|
},
|
|
692
780
|
validateValue(value) {
|
|
781
|
+
if (value === '-' || value == null) {
|
|
782
|
+
return null;
|
|
783
|
+
}
|
|
784
|
+
|
|
693
785
|
if (this.min != null && value < this.min) {
|
|
694
786
|
return this.min;
|
|
695
787
|
}
|
|
@@ -698,25 +790,24 @@ export default {
|
|
|
698
790
|
return this.max;
|
|
699
791
|
}
|
|
700
792
|
|
|
701
|
-
if (value === '-') { // Minus sign
|
|
702
|
-
return null;
|
|
703
|
-
}
|
|
704
|
-
|
|
705
793
|
return value;
|
|
706
794
|
},
|
|
707
|
-
updateInput(value, insertedValueStr, operation) {
|
|
795
|
+
updateInput(value, insertedValueStr, operation, valueStr) {
|
|
708
796
|
insertedValueStr = insertedValueStr || '';
|
|
709
797
|
|
|
710
798
|
let inputValue = this.$refs.input.$el.value;
|
|
711
799
|
let newValue = this.formatValue(value);
|
|
712
800
|
let currentLength = inputValue.length;
|
|
713
801
|
|
|
802
|
+
if (newValue !== valueStr) {
|
|
803
|
+
newValue = this.concatValues(newValue, valueStr);
|
|
804
|
+
}
|
|
805
|
+
|
|
714
806
|
if (currentLength === 0) {
|
|
715
807
|
this.$refs.input.$el.value = newValue;
|
|
716
808
|
this.$refs.input.$el.setSelectionRange(0, 0);
|
|
717
|
-
this.initCursor();
|
|
718
|
-
const
|
|
719
|
-
const selectionEnd = prefixLength + insertedValueStr.length;
|
|
809
|
+
const index = this.initCursor();
|
|
810
|
+
const selectionEnd = index + insertedValueStr.length;
|
|
720
811
|
this.$refs.input.$el.setSelectionRange(selectionEnd, selectionEnd);
|
|
721
812
|
}
|
|
722
813
|
else {
|
|
@@ -763,6 +854,12 @@ export default {
|
|
|
763
854
|
this._group.lastIndex = 0;
|
|
764
855
|
this.$refs.input.$el.setSelectionRange(selectionEnd, selectionEnd);
|
|
765
856
|
}
|
|
857
|
+
else if (inputValue === '-' && operation === 'insert') {
|
|
858
|
+
this.$refs.input.$el.setSelectionRange(0, 0);
|
|
859
|
+
const index = this.initCursor();
|
|
860
|
+
const selectionEnd = index + insertedValueStr.length + 1;
|
|
861
|
+
this.$refs.input.$el.setSelectionRange(selectionEnd, selectionEnd);
|
|
862
|
+
}
|
|
766
863
|
else {
|
|
767
864
|
selectionEnd = selectionEnd + (newLength - currentLength);
|
|
768
865
|
this.$refs.input.$el.setSelectionRange(selectionEnd, selectionEnd);
|
|
@@ -771,12 +868,36 @@ export default {
|
|
|
771
868
|
|
|
772
869
|
this.$refs.input.$el.setAttribute('aria-valuenow', value);
|
|
773
870
|
},
|
|
871
|
+
concatValues(val1, val2) {
|
|
872
|
+
if (val1 && val2) {
|
|
873
|
+
let decimalCharIndex = val2.search(this._decimal);
|
|
874
|
+
this._decimal.lastIndex = 0;
|
|
875
|
+
|
|
876
|
+
return decimalCharIndex !== -1 ? (val1.split(this._decimal)[0] + val2.slice(decimalCharIndex)) : val1;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
return val1;
|
|
880
|
+
},
|
|
881
|
+
getDecimalLength(value) {
|
|
882
|
+
if (value) {
|
|
883
|
+
const valueSplit = value.split(this._decimal);
|
|
884
|
+
|
|
885
|
+
if (valueSplit.length === 2) {
|
|
886
|
+
return valueSplit[1].replace(this._suffix, '')
|
|
887
|
+
.trim()
|
|
888
|
+
.replace(/\s/g, '')
|
|
889
|
+
.replace(this._currency, '').length;
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
return 0;
|
|
894
|
+
},
|
|
774
895
|
updateModel(event, value) {
|
|
896
|
+
this.d_value = value;
|
|
775
897
|
this.$emit('input', value);
|
|
776
898
|
},
|
|
777
|
-
onInputFocus(
|
|
899
|
+
onInputFocus() {
|
|
778
900
|
this.focused = true;
|
|
779
|
-
this.$emit('focus', event);
|
|
780
901
|
},
|
|
781
902
|
onInputBlur(event) {
|
|
782
903
|
this.focused = false;
|
|
@@ -786,18 +907,22 @@ export default {
|
|
|
786
907
|
input.value = this.formatValue(newValue);
|
|
787
908
|
input.setAttribute('aria-valuenow', newValue);
|
|
788
909
|
this.updateModel(event, newValue);
|
|
789
|
-
|
|
790
|
-
this.$emit('blur', event);
|
|
791
910
|
},
|
|
792
911
|
clearTimer() {
|
|
793
912
|
if (this.timer) {
|
|
794
913
|
clearInterval(this.timer);
|
|
795
914
|
}
|
|
796
|
-
}
|
|
915
|
+
},
|
|
916
|
+
maxBoundry() {
|
|
917
|
+
return this.d_value >= this.max;
|
|
918
|
+
},
|
|
919
|
+
minBoundry() {
|
|
920
|
+
return this.d_value <= this.min;
|
|
921
|
+
},
|
|
797
922
|
},
|
|
798
923
|
computed: {
|
|
799
924
|
containerClass() {
|
|
800
|
-
return ['p-inputnumber p-component', {
|
|
925
|
+
return ['p-inputnumber p-component p-inputwrapper', this.className, {
|
|
801
926
|
'p-inputwrapper-filled': this.filled,
|
|
802
927
|
'p-inputwrapper-focus': this.focused,
|
|
803
928
|
'p-inputnumber-buttons-stacked': this.showButtons && this.buttonLayout === 'stacked',
|
|
@@ -806,26 +931,18 @@ export default {
|
|
|
806
931
|
}];
|
|
807
932
|
},
|
|
808
933
|
upButtonClass() {
|
|
809
|
-
return ['p-inputnumber-button p-inputnumber-button-up', this.incrementButtonClass
|
|
934
|
+
return ['p-inputnumber-button p-inputnumber-button-up', this.incrementButtonClass, {
|
|
935
|
+
'p-disabled': this.showButtons && this.max !== null && this.maxBoundry()
|
|
936
|
+
}];
|
|
810
937
|
},
|
|
811
938
|
downButtonClass() {
|
|
812
|
-
return ['p-inputnumber-button p-inputnumber-button-down', this.decrementButtonClass
|
|
939
|
+
return ['p-inputnumber-button p-inputnumber-button-down', this.decrementButtonClass, {
|
|
940
|
+
'p-disabled': this.showButtons && this.min !== null && this.minBoundry()
|
|
941
|
+
}];
|
|
813
942
|
},
|
|
814
943
|
filled() {
|
|
815
944
|
return (this.value != null && this.value.toString().length > 0)
|
|
816
945
|
},
|
|
817
|
-
listeners() {
|
|
818
|
-
return {
|
|
819
|
-
...this.$listeners,
|
|
820
|
-
input: val => this.onInput(val),
|
|
821
|
-
keydown: event => this.onInputKeyDown(event),
|
|
822
|
-
keypress: event => this.onInputKeyPress(event),
|
|
823
|
-
paste: event => this.onPaste(event),
|
|
824
|
-
click: event => this.onInputClick(event),
|
|
825
|
-
focus: event => this.onInputFocus(event),
|
|
826
|
-
blur: event => this.onInputBlur(event)
|
|
827
|
-
};
|
|
828
|
-
},
|
|
829
946
|
upButtonListeners() {
|
|
830
947
|
return {
|
|
831
948
|
mousedown: event => this.onUpButtonMouseDown(event),
|
|
@@ -845,7 +962,11 @@ export default {
|
|
|
845
962
|
}
|
|
846
963
|
},
|
|
847
964
|
formattedValue() {
|
|
848
|
-
|
|
965
|
+
const val = !this.value && !this.allowEmpty ? 0 : this.value;
|
|
966
|
+
return this.formatValue(val);
|
|
967
|
+
},
|
|
968
|
+
getFormatter() {
|
|
969
|
+
return this.numberFormat;
|
|
849
970
|
}
|
|
850
971
|
},
|
|
851
972
|
components: {
|