primevue 3.48.1 → 3.49.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 +2 -1
- package/accordion/accordion.cjs.js +2 -1
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +2 -1
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +2 -1
- package/accordion/accordion.min.js +1 -1
- package/accordiontab/AccordionTab.vue +2 -1
- package/accordiontab/accordiontab.cjs.js +2 -1
- package/accordiontab/accordiontab.cjs.min.js +1 -1
- package/accordiontab/accordiontab.esm.js +2 -1
- package/accordiontab/accordiontab.esm.min.js +1 -1
- package/accordiontab/accordiontab.js +2 -1
- package/accordiontab/accordiontab.min.js +1 -1
- package/autocomplete/AutoComplete.d.ts +2 -2
- package/autocomplete/AutoComplete.vue +4 -1
- package/autocomplete/autocomplete.cjs.js +6 -3
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +6 -3
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +6 -3
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/Avatar.vue +2 -1
- package/avatar/avatar.cjs.js +2 -1
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.esm.js +2 -1
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +2 -1
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/AvatarGroup.d.ts +37 -5
- package/avatargroup/AvatarGroup.vue +3 -2
- package/avatargroup/avatargroup.cjs.js +3 -2
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.esm.js +3 -2
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +3 -2
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/Badge.d.ts +2 -2
- package/badge/Badge.vue +3 -2
- package/badge/badge.cjs.js +3 -2
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +3 -2
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +3 -2
- package/badge/badge.min.js +1 -1
- package/basecomponent/BaseComponent.vue +36 -1
- package/basecomponent/basecomponent.cjs.js +58 -1
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +58 -1
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +58 -1
- package/basecomponent/basecomponent.min.js +1 -1
- package/blockui/BlockUI.vue +2 -1
- package/blockui/blockui.cjs.js +2 -1
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +2 -1
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +2 -1
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/Breadcrumb.vue +4 -3
- package/breadcrumb/breadcrumb.cjs.js +2 -1
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +2 -1
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +2 -1
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/Button.d.ts +3 -3
- package/button/Button.vue +5 -2
- package/button/button.cjs.js +5 -3
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +5 -3
- package/button/button.esm.min.js +1 -1
- package/button/button.js +5 -3
- package/button/button.min.js +1 -1
- package/buttongroup/BaseButtonGroup.vue +15 -0
- package/buttongroup/ButtonGroup.d.ts +113 -0
- package/buttongroup/ButtonGroup.vue +15 -0
- package/buttongroup/buttongroup.cjs.js +38 -0
- package/buttongroup/buttongroup.cjs.min.js +1 -0
- package/buttongroup/buttongroup.esm.js +31 -0
- package/buttongroup/buttongroup.esm.min.js +1 -0
- package/buttongroup/buttongroup.js +38 -0
- package/buttongroup/buttongroup.min.js +1 -0
- package/buttongroup/package.json +9 -0
- package/buttongroup/style/ButtonGroupStyle.d.ts +3 -0
- package/buttongroup/style/buttongroupstyle.cjs.js +17 -0
- package/buttongroup/style/buttongroupstyle.cjs.min.js +1 -0
- package/buttongroup/style/buttongroupstyle.esm.js +11 -0
- package/buttongroup/style/buttongroupstyle.esm.min.js +1 -0
- package/buttongroup/style/buttongroupstyle.js +20 -0
- package/buttongroup/style/buttongroupstyle.min.js +1 -0
- package/buttongroup/style/package.json +6 -0
- package/calendar/Calendar.d.ts +2 -2
- package/calendar/Calendar.vue +9 -3
- package/calendar/calendar.cjs.js +10 -4
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +10 -4
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +10 -4
- package/calendar/calendar.min.js +1 -1
- package/calendar/style/calendarstyle.cjs.js +2 -2
- package/calendar/style/calendarstyle.cjs.min.js +1 -1
- package/calendar/style/calendarstyle.esm.js +2 -2
- package/calendar/style/calendarstyle.esm.min.js +1 -1
- package/calendar/style/calendarstyle.js +2 -2
- package/calendar/style/calendarstyle.min.js +1 -1
- package/card/Card.d.ts +23 -1
- package/card/Card.vue +3 -2
- package/card/card.cjs.js +3 -2
- package/card/card.cjs.min.js +1 -1
- package/card/card.esm.js +3 -2
- package/card/card.esm.min.js +1 -1
- package/card/card.js +3 -2
- package/card/card.min.js +1 -1
- package/carousel/Carousel.vue +2 -1
- package/carousel/carousel.cjs.js +2 -1
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +2 -1
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +2 -1
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +2 -2
- package/cascadeselect/CascadeSelect.vue +18 -5
- package/cascadeselect/cascadeselect.cjs.js +32 -12
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +32 -12
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +32 -12
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/Chart.vue +2 -1
- package/chart/chart.cjs.js +2 -1
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +2 -1
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +2 -1
- package/chart/chart.min.js +1 -1
- package/checkbox/Checkbox.vue +5 -1
- package/checkbox/checkbox.cjs.js +5 -2
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +5 -2
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +5 -2
- package/checkbox/checkbox.min.js +1 -1
- package/chip/Chip.vue +2 -1
- package/chip/chip.cjs.js +2 -1
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.esm.js +2 -1
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +2 -1
- package/chip/chip.min.js +1 -1
- package/chips/Chips.vue +3 -1
- package/chips/chips.cjs.js +4 -2
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +4 -2
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +4 -2
- package/chips/chips.min.js +1 -1
- package/colorpicker/ColorPicker.d.ts +2 -2
- package/colorpicker/ColorPicker.vue +3 -2
- package/colorpicker/colorpicker.cjs.js +3 -2
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +3 -2
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +3 -2
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/Column.vue +1 -0
- package/column/column.cjs.js +1 -0
- package/column/column.cjs.min.js +1 -1
- package/column/column.esm.js +1 -0
- package/column/column.esm.min.js +1 -1
- package/column/column.js +1 -0
- package/column/column.min.js +1 -1
- package/columngroup/ColumnGroup.vue +1 -0
- package/columngroup/columngroup.cjs.js +1 -0
- package/columngroup/columngroup.cjs.min.js +1 -1
- package/columngroup/columngroup.esm.js +1 -0
- package/columngroup/columngroup.esm.min.js +1 -1
- package/columngroup/columngroup.js +1 -0
- package/columngroup/columngroup.min.js +1 -1
- package/confirmpopup/ConfirmPopup.vue +1 -1
- package/confirmpopup/confirmpopup.cjs.js +1 -7
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +1 -7
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +1 -7
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/ContextMenu.d.ts +2 -2
- package/contextmenu/ContextMenu.vue +7 -1
- package/contextmenu/ContextMenuSub.vue +13 -3
- package/contextmenu/contextmenu.cjs.js +25 -12
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +25 -12
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +25 -12
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +198 -82
- package/core/core.min.js +23 -21
- package/datatable/BaseDataTable.vue +4 -4
- package/datatable/BodyCell.vue +0 -3
- package/datatable/DataTable.d.ts +6 -6
- package/datatable/DataTable.vue +5 -3
- package/datatable/datatable.cjs.js +8 -10
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +8 -10
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +8 -10
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.vue +2 -1
- package/dataview/dataview.cjs.js +2 -1
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +2 -1
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +2 -1
- package/dataview/dataview.min.js +1 -1
- package/dataviewlayoutoptions/DataViewLayoutOptions.vue +2 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.js +2 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.min.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.esm.js +2 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.esm.min.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.js +2 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.min.js +1 -1
- package/dataviewlayoutoptions/style/dataviewlayoutoptionsstyle.cjs.js +1 -1
- package/dataviewlayoutoptions/style/dataviewlayoutoptionsstyle.cjs.min.js +1 -1
- package/dataviewlayoutoptions/style/dataviewlayoutoptionsstyle.esm.js +1 -1
- package/dataviewlayoutoptions/style/dataviewlayoutoptionsstyle.esm.min.js +1 -1
- package/dataviewlayoutoptions/style/dataviewlayoutoptionsstyle.js +1 -1
- package/dataviewlayoutoptions/style/dataviewlayoutoptionsstyle.min.js +1 -1
- package/deferredcontent/DeferredContent.vue +2 -1
- package/deferredcontent/deferredcontent.cjs.js +2 -1
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.esm.js +2 -1
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +2 -1
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/Dialog.d.ts +2 -2
- package/dialog/Dialog.vue +2 -2
- package/dialog/dialog.cjs.js +2 -2
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +2 -2
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +2 -2
- package/dialog/dialog.min.js +1 -1
- package/divider/Divider.vue +3 -2
- package/divider/divider.cjs.js +3 -2
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +3 -2
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +3 -2
- package/divider/divider.min.js +1 -1
- package/dock/Dock.vue +2 -1
- package/dock/dock.cjs.js +2 -1
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +2 -1
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +2 -1
- package/dock/dock.min.js +1 -1
- package/dropdown/Dropdown.d.ts +3 -3
- package/dropdown/Dropdown.vue +4 -1
- package/dropdown/dropdown.cjs.js +5 -2
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +5 -2
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +5 -2
- package/dropdown/dropdown.min.js +1 -1
- package/editor/Editor.vue +2 -1
- package/editor/editor.cjs.js +2 -1
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +2 -1
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +2 -1
- package/editor/editor.min.js +1 -1
- package/fieldset/Fieldset.vue +2 -1
- package/fieldset/fieldset.cjs.js +2 -1
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +2 -1
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +2 -1
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/FileUpload.vue +8 -5
- package/fileupload/fileupload.cjs.js +9 -8
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +9 -8
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +9 -8
- package/fileupload/fileupload.min.js +1 -1
- package/floatlabel/FloatLabel.vue +3 -2
- package/floatlabel/floatlabel.cjs.js +3 -2
- package/floatlabel/floatlabel.cjs.min.js +1 -1
- package/floatlabel/floatlabel.esm.js +3 -2
- package/floatlabel/floatlabel.esm.min.js +1 -1
- package/floatlabel/floatlabel.js +3 -2
- package/floatlabel/floatlabel.min.js +1 -1
- package/galleria/GalleriaContent.vue +1 -1
- package/galleria/GalleriaThumbnails.vue +12 -3
- package/galleria/galleria.cjs.js +5 -5
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +5 -5
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +5 -5
- package/galleria/galleria.min.js +1 -1
- package/iconfield/IconField.vue +4 -3
- package/iconfield/iconfield.cjs.js +3 -2
- package/iconfield/iconfield.cjs.min.js +1 -1
- package/iconfield/iconfield.esm.js +3 -2
- package/iconfield/iconfield.esm.min.js +1 -1
- package/iconfield/iconfield.js +3 -2
- package/iconfield/iconfield.min.js +1 -1
- package/iconfield/style/iconfieldstyle.cjs.js +3 -3
- package/iconfield/style/iconfieldstyle.cjs.min.js +1 -1
- package/iconfield/style/iconfieldstyle.esm.js +3 -3
- package/iconfield/style/iconfieldstyle.esm.min.js +1 -1
- package/iconfield/style/iconfieldstyle.js +3 -3
- package/iconfield/style/iconfieldstyle.min.js +1 -1
- package/image/Image.vue +1 -1
- package/image/image.cjs.js +1 -1
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +1 -1
- package/image/image.esm.min.js +1 -1
- package/image/image.js +1 -1
- package/image/image.min.js +1 -1
- package/inlinemessage/InlineMessage.d.ts +2 -2
- package/inlinemessage/InlineMessage.vue +2 -1
- package/inlinemessage/inlinemessage.cjs.js +2 -1
- package/inlinemessage/inlinemessage.cjs.min.js +1 -1
- package/inlinemessage/inlinemessage.esm.js +2 -1
- package/inlinemessage/inlinemessage.esm.min.js +1 -1
- package/inlinemessage/inlinemessage.js +2 -1
- package/inlinemessage/inlinemessage.min.js +1 -1
- package/inplace/Inplace.vue +2 -1
- package/inplace/inplace.cjs.js +2 -1
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +2 -1
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +2 -1
- package/inplace/inplace.min.js +1 -1
- package/inputgroup/InputGroup.vue +3 -2
- package/inputgroup/inputgroup.cjs.js +3 -2
- package/inputgroup/inputgroup.cjs.min.js +1 -1
- package/inputgroup/inputgroup.esm.js +3 -2
- package/inputgroup/inputgroup.esm.min.js +1 -1
- package/inputgroup/inputgroup.js +3 -2
- package/inputgroup/inputgroup.min.js +1 -1
- package/inputgroupaddon/InputGroupAddon.vue +3 -2
- package/inputgroupaddon/inputgroupaddon.cjs.js +3 -2
- package/inputgroupaddon/inputgroupaddon.cjs.min.js +1 -1
- package/inputgroupaddon/inputgroupaddon.esm.js +3 -2
- package/inputgroupaddon/inputgroupaddon.esm.min.js +1 -1
- package/inputgroupaddon/inputgroupaddon.js +3 -2
- package/inputgroupaddon/inputgroupaddon.min.js +1 -1
- package/inputicon/BaseInputIcon.vue +3 -0
- package/inputicon/InputIcon.vue +10 -2
- package/inputicon/inputicon.cjs.js +13 -2
- package/inputicon/inputicon.cjs.min.js +1 -1
- package/inputicon/inputicon.esm.js +14 -3
- package/inputicon/inputicon.esm.min.js +1 -1
- package/inputicon/inputicon.js +13 -2
- package/inputicon/inputicon.min.js +1 -1
- package/inputicon/style/inputiconstyle.cjs.js +13 -1
- package/inputicon/style/inputiconstyle.cjs.min.js +1 -1
- package/inputicon/style/inputiconstyle.esm.js +9 -1
- package/inputicon/style/inputiconstyle.esm.min.js +1 -1
- package/inputicon/style/inputiconstyle.js +15 -5
- package/inputicon/style/inputiconstyle.min.js +1 -1
- package/inputmask/InputMask.vue +2 -1
- package/inputmask/inputmask.cjs.js +4 -2
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +4 -2
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +4 -2
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/InputNumber.vue +3 -1
- package/inputnumber/inputnumber.cjs.js +4 -2
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +4 -2
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +4 -2
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputotp/BaseInputOtp.vue +53 -0
- package/inputotp/InputOtp.d.ts +275 -0
- package/inputotp/InputOtp.vue +201 -0
- package/inputotp/inputotp.cjs.js +265 -0
- package/inputotp/inputotp.cjs.min.js +1 -0
- package/inputotp/inputotp.esm.js +257 -0
- package/inputotp/inputotp.esm.min.js +1 -0
- package/inputotp/inputotp.js +264 -0
- package/inputotp/inputotp.min.js +1 -0
- package/inputotp/package.json +9 -0
- package/inputotp/style/InputOtpStyle.d.ts +3 -0
- package/inputotp/style/inputotpstyle.cjs.js +18 -0
- package/inputotp/style/inputotpstyle.cjs.min.js +1 -0
- package/inputotp/style/inputotpstyle.esm.js +12 -0
- package/inputotp/style/inputotpstyle.esm.min.js +1 -0
- package/inputotp/style/inputotpstyle.js +21 -0
- package/inputotp/style/inputotpstyle.min.js +1 -0
- package/inputotp/style/package.json +6 -0
- package/inputswitch/InputSwitch.d.ts +0 -11
- package/inputswitch/InputSwitch.vue +5 -1
- package/inputswitch/inputswitch.cjs.js +5 -2
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +5 -2
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +5 -2
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/InputText.vue +5 -2
- package/inputtext/inputtext.cjs.js +5 -2
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +5 -2
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +5 -2
- package/inputtext/inputtext.min.js +1 -1
- package/knob/Knob.vue +2 -1
- package/knob/knob.cjs.js +2 -1
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +2 -1
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +2 -1
- package/knob/knob.min.js +1 -1
- package/listbox/Listbox.d.ts +2 -2
- package/listbox/Listbox.vue +2 -3
- package/listbox/listbox.cjs.js +2 -2
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +2 -2
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +2 -2
- package/listbox/listbox.min.js +1 -1
- package/megamenu/MegaMenu.vue +2 -1
- package/megamenu/MegaMenuSub.vue +1 -1
- package/megamenu/megamenu.cjs.js +3 -2
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +3 -2
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +3 -2
- package/megamenu/megamenu.min.js +1 -1
- package/menu/Menu.d.ts +2 -2
- package/menu/Menu.vue +18 -11
- package/menu/Menuitem.vue +6 -3
- package/menu/menu.cjs.js +23 -18
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +23 -18
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +23 -18
- package/menu/menu.min.js +1 -1
- package/menubar/Menubar.vue +19 -6
- package/menubar/MenubarSub.vue +7 -3
- package/menubar/menubar.cjs.js +41 -18
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +41 -18
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +41 -18
- package/menubar/menubar.min.js +1 -1
- package/message/Message.d.ts +2 -2
- package/message/Message.vue +2 -1
- package/message/message.cjs.js +2 -1
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +2 -1
- package/message/message.esm.min.js +1 -1
- package/message/message.js +2 -1
- package/message/message.min.js +1 -1
- package/metergroup/MeterGroup.vue +3 -2
- package/metergroup/metergroup.cjs.js +5 -3
- package/metergroup/metergroup.cjs.min.js +1 -1
- package/metergroup/metergroup.esm.js +5 -3
- package/metergroup/metergroup.esm.min.js +1 -1
- package/metergroup/metergroup.js +5 -3
- package/metergroup/metergroup.min.js +1 -1
- package/multiselect/MultiSelect.d.ts +3 -3
- package/multiselect/MultiSelect.vue +3 -1
- package/multiselect/multiselect.cjs.js +4 -2
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +4 -2
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +4 -2
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/OrderList.vue +2 -1
- package/orderlist/orderlist.cjs.js +2 -1
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +2 -1
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +2 -1
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/OrganizationChart.vue +2 -1
- package/organizationchart/organizationchart.cjs.js +2 -1
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +2 -1
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +2 -1
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/OverlayPanel.d.ts +2 -2
- package/overlaypanel/OverlayPanel.vue +1 -1
- package/overlaypanel/overlaypanel.cjs.js +1 -7
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +1 -7
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +1 -7
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/Paginator.vue +2 -1
- package/paginator/paginator.cjs.js +2 -1
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +2 -1
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +2 -1
- package/paginator/paginator.min.js +1 -1
- package/panel/Panel.vue +2 -1
- package/panel/panel.cjs.js +2 -1
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +2 -1
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +2 -1
- package/panel/panel.min.js +1 -1
- package/panelmenu/PanelMenu.vue +2 -1
- package/panelmenu/PanelMenuList.vue +6 -0
- package/panelmenu/PanelMenuSub.vue +7 -3
- package/panelmenu/panelmenu.cjs.js +24 -5
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +24 -5
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +24 -5
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/Password.d.ts +2 -2
- package/password/Password.vue +10 -4
- package/password/password.cjs.js +9 -4
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +9 -4
- package/password/password.esm.min.js +1 -1
- package/password/password.js +9 -4
- package/password/password.min.js +1 -1
- package/password/style/passwordstyle.cjs.js +4 -3
- package/password/style/passwordstyle.cjs.min.js +1 -1
- package/password/style/passwordstyle.esm.js +4 -3
- package/password/style/passwordstyle.esm.min.js +1 -1
- package/password/style/passwordstyle.js +4 -3
- package/password/style/passwordstyle.min.js +1 -1
- package/picklist/PickList.vue +2 -1
- package/picklist/picklist.cjs.js +2 -1
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +2 -1
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +2 -1
- package/picklist/picklist.min.js +1 -1
- package/portal/Portal.d.ts +2 -2
- package/progressbar/ProgressBar.vue +2 -1
- package/progressbar/progressbar.cjs.js +2 -1
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +2 -1
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +2 -1
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/ProgressSpinner.vue +2 -1
- package/progressspinner/progressspinner.cjs.js +2 -1
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +2 -1
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +2 -1
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/RadioButton.vue +5 -1
- package/radiobutton/radiobutton.cjs.js +5 -2
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +5 -2
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +5 -2
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/Rating.vue +2 -1
- package/rating/rating.cjs.js +2 -1
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +2 -1
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +2 -1
- package/rating/rating.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +335 -103
- package/resources/themes/arya-green/theme.css +335 -103
- package/resources/themes/arya-orange/theme.css +335 -103
- package/resources/themes/arya-purple/theme.css +335 -103
- package/resources/themes/aura-dark-amber/theme.css +363 -113
- package/resources/themes/aura-dark-blue/theme.css +363 -113
- package/resources/themes/aura-dark-cyan/theme.css +363 -113
- package/resources/themes/aura-dark-green/theme.css +363 -113
- package/resources/themes/aura-dark-indigo/theme.css +363 -113
- package/resources/themes/aura-dark-lime/theme.css +363 -113
- package/resources/themes/aura-dark-noir/theme.css +363 -113
- package/resources/themes/aura-dark-pink/theme.css +363 -113
- package/resources/themes/aura-dark-purple/theme.css +363 -113
- package/resources/themes/aura-dark-teal/theme.css +363 -113
- package/resources/themes/aura-light-amber/theme.css +363 -113
- package/resources/themes/aura-light-blue/theme.css +363 -113
- package/resources/themes/aura-light-cyan/theme.css +363 -113
- package/resources/themes/aura-light-green/theme.css +363 -113
- package/resources/themes/aura-light-indigo/theme.css +363 -113
- package/resources/themes/aura-light-lime/theme.css +363 -113
- package/resources/themes/aura-light-noir/theme.css +363 -113
- package/resources/themes/aura-light-pink/theme.css +363 -113
- package/resources/themes/aura-light-purple/theme.css +363 -113
- package/resources/themes/aura-light-teal/theme.css +363 -113
- package/resources/themes/bootstrap4-dark-blue/theme.css +345 -113
- package/resources/themes/bootstrap4-dark-purple/theme.css +345 -113
- package/resources/themes/bootstrap4-light-blue/theme.css +345 -113
- package/resources/themes/bootstrap4-light-purple/theme.css +345 -113
- package/resources/themes/fluent-light/theme.css +329 -103
- package/resources/themes/lara-dark-amber/theme.css +354 -113
- package/resources/themes/lara-dark-blue/theme.css +354 -113
- package/resources/themes/lara-dark-cyan/theme.css +354 -113
- package/resources/themes/lara-dark-green/theme.css +354 -113
- package/resources/themes/lara-dark-indigo/theme.css +354 -113
- package/resources/themes/lara-dark-pink/theme.css +354 -113
- package/resources/themes/lara-dark-purple/theme.css +354 -113
- package/resources/themes/lara-dark-teal/theme.css +354 -113
- package/resources/themes/lara-light-amber/theme.css +350 -113
- package/resources/themes/lara-light-blue/theme.css +350 -113
- package/resources/themes/lara-light-cyan/theme.css +350 -113
- package/resources/themes/lara-light-green/theme.css +350 -113
- package/resources/themes/lara-light-indigo/theme.css +350 -113
- package/resources/themes/lara-light-pink/theme.css +350 -113
- package/resources/themes/lara-light-purple/theme.css +350 -113
- package/resources/themes/lara-light-teal/theme.css +350 -113
- package/resources/themes/luna-amber/theme.css +335 -103
- package/resources/themes/luna-blue/theme.css +335 -103
- package/resources/themes/luna-green/theme.css +335 -103
- package/resources/themes/luna-pink/theme.css +335 -103
- package/resources/themes/md-dark-deeppurple/theme.css +420 -169
- package/resources/themes/md-dark-indigo/theme.css +420 -169
- package/resources/themes/md-light-deeppurple/theme.css +420 -169
- package/resources/themes/md-light-indigo/theme.css +420 -169
- package/resources/themes/mdc-dark-deeppurple/theme.css +420 -169
- package/resources/themes/mdc-dark-indigo/theme.css +420 -169
- package/resources/themes/mdc-light-deeppurple/theme.css +420 -169
- package/resources/themes/mdc-light-indigo/theme.css +420 -169
- package/resources/themes/mira/theme.css +335 -103
- package/resources/themes/nano/theme.css +335 -103
- package/resources/themes/nova/theme.css +335 -103
- package/resources/themes/nova-accent/theme.css +335 -103
- package/resources/themes/nova-alt/theme.css +335 -103
- package/resources/themes/nova-vue/theme.css +335 -103
- package/resources/themes/rhea/theme.css +335 -103
- package/resources/themes/saga-blue/theme.css +335 -103
- package/resources/themes/saga-green/theme.css +335 -103
- package/resources/themes/saga-orange/theme.css +335 -103
- package/resources/themes/saga-purple/theme.css +335 -103
- package/resources/themes/soho-dark/theme.css +345 -113
- package/resources/themes/soho-light/theme.css +345 -113
- package/resources/themes/tailwind-light/theme.css +335 -103
- package/resources/themes/vela-blue/theme.css +335 -103
- package/resources/themes/vela-green/theme.css +335 -103
- package/resources/themes/vela-orange/theme.css +335 -103
- package/resources/themes/vela-purple/theme.css +335 -103
- package/resources/themes/viva-dark/theme.css +346 -114
- package/resources/themes/viva-light/theme.css +346 -114
- package/scrollpanel/ScrollPanel.vue +2 -1
- package/scrollpanel/scrollpanel.cjs.js +2 -1
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +2 -1
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +2 -1
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/ScrollTop.vue +2 -1
- package/scrolltop/scrolltop.cjs.js +2 -1
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.esm.js +2 -1
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +2 -1
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/SelectButton.vue +44 -17
- package/selectbutton/selectbutton.cjs.js +41 -18
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +41 -18
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +41 -18
- package/selectbutton/selectbutton.min.js +1 -1
- package/selectbutton/style/selectbuttonstyle.cjs.js +1 -1
- package/selectbutton/style/selectbuttonstyle.cjs.min.js +1 -1
- package/selectbutton/style/selectbuttonstyle.esm.js +1 -1
- package/selectbutton/style/selectbuttonstyle.esm.min.js +1 -1
- package/selectbutton/style/selectbuttonstyle.js +1 -1
- package/selectbutton/style/selectbuttonstyle.min.js +1 -1
- package/sidebar/Sidebar.vue +1 -1
- package/sidebar/sidebar.cjs.js +1 -7
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +1 -7
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +1 -7
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/Skeleton.vue +2 -1
- package/skeleton/skeleton.cjs.js +2 -1
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +2 -1
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +2 -1
- package/skeleton/skeleton.min.js +1 -1
- package/slider/Slider.vue +2 -1
- package/slider/slider.cjs.js +2 -1
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +2 -1
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +2 -1
- package/slider/slider.min.js +1 -1
- package/speeddial/SpeedDial.vue +2 -1
- package/speeddial/speeddial.cjs.js +2 -1
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +2 -1
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +2 -1
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/SplitButton.d.ts +3 -3
- package/splitbutton/SplitButton.vue +2 -1
- package/splitbutton/splitbutton.cjs.js +4 -3
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +4 -3
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +4 -3
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/Splitter.vue +9 -8
- package/splitter/splitter.cjs.js +10 -9
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +10 -9
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +10 -9
- package/splitter/splitter.min.js +1 -1
- package/splitterpanel/SplitterPanel.vue +10 -2
- package/splitterpanel/splitterpanel.cjs.js +10 -2
- package/splitterpanel/splitterpanel.cjs.min.js +1 -1
- package/splitterpanel/splitterpanel.esm.js +10 -2
- package/splitterpanel/splitterpanel.esm.min.js +1 -1
- package/splitterpanel/splitterpanel.js +10 -2
- package/splitterpanel/splitterpanel.min.js +1 -1
- package/stepper/BaseStepper.vue +29 -0
- package/stepper/Stepper.d.ts +197 -0
- package/stepper/Stepper.vue +267 -0
- package/stepper/StepperContent.vue +47 -0
- package/stepper/StepperHeader.vue +41 -0
- package/stepper/StepperSeparator.vue +23 -0
- package/stepper/package.json +9 -0
- package/stepper/stepper.cjs.js +489 -0
- package/stepper/stepper.cjs.min.js +1 -0
- package/stepper/stepper.esm.js +482 -0
- package/stepper/stepper.esm.min.js +1 -0
- package/stepper/stepper.js +488 -0
- package/stepper/stepper.min.js +1 -0
- package/stepper/style/StepperStyle.d.ts +3 -0
- package/stepper/style/package.json +6 -0
- package/stepper/style/stepperstyle.cjs.js +56 -0
- package/stepper/style/stepperstyle.cjs.min.js +1 -0
- package/stepper/style/stepperstyle.esm.js +50 -0
- package/stepper/style/stepperstyle.esm.min.js +1 -0
- package/stepper/style/stepperstyle.js +59 -0
- package/stepper/style/stepperstyle.min.js +1 -0
- package/stepperpanel/BaseStepperPanel.vue +18 -0
- package/stepperpanel/StepperPanel.d.ts +286 -0
- package/stepperpanel/StepperPanel.vue +12 -0
- package/stepperpanel/package.json +9 -0
- package/stepperpanel/stepperpanel.cjs.js +37 -0
- package/stepperpanel/stepperpanel.cjs.min.js +1 -0
- package/stepperpanel/stepperpanel.esm.js +30 -0
- package/stepperpanel/stepperpanel.esm.min.js +1 -0
- package/stepperpanel/stepperpanel.js +37 -0
- package/stepperpanel/stepperpanel.min.js +1 -0
- package/stepperpanel/style/StepperPanelStyle.d.ts +3 -0
- package/stepperpanel/style/package.json +6 -0
- package/stepperpanel/style/stepperpanelstyle.cjs.js +5 -0
- package/stepperpanel/style/stepperpanelstyle.cjs.min.js +1 -0
- package/stepperpanel/style/stepperpanelstyle.esm.js +3 -0
- package/stepperpanel/style/stepperpanelstyle.esm.min.js +1 -0
- package/stepperpanel/style/stepperpanelstyle.js +10 -0
- package/stepperpanel/style/stepperpanelstyle.min.js +1 -0
- package/steps/Steps.vue +2 -1
- package/steps/steps.cjs.js +2 -1
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +2 -1
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +2 -1
- package/steps/steps.min.js +1 -1
- package/styleclass/StyleClass.d.ts +2 -2
- package/tabmenu/TabMenu.vue +3 -2
- package/tabmenu/tabmenu.cjs.js +3 -2
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +3 -2
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +3 -2
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabpanel/TabPanel.d.ts +1 -1
- package/tabview/TabView.d.ts +31 -1
- package/tabview/TabView.vue +4 -3
- package/tabview/tabview.cjs.js +4 -3
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +4 -3
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +4 -3
- package/tabview/tabview.min.js +1 -1
- package/tag/Tag.d.ts +2 -2
- package/tag/Tag.vue +3 -2
- package/tag/tag.cjs.js +3 -2
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.esm.js +3 -2
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +3 -2
- package/tag/tag.min.js +1 -1
- package/terminal/Terminal.vue +2 -1
- package/terminal/terminal.cjs.js +2 -1
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +2 -1
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +2 -1
- package/terminal/terminal.min.js +1 -1
- package/textarea/Textarea.vue +2 -1
- package/textarea/textarea.cjs.js +4 -2
- package/textarea/textarea.cjs.min.js +1 -1
- package/textarea/textarea.esm.js +4 -2
- package/textarea/textarea.esm.min.js +1 -1
- package/textarea/textarea.js +4 -2
- package/textarea/textarea.min.js +1 -1
- package/tieredmenu/TieredMenu.d.ts +2 -2
- package/tieredmenu/TieredMenu.vue +11 -4
- package/tieredmenu/TieredMenuSub.vue +13 -3
- package/tieredmenu/tieredmenu.cjs.js +31 -22
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +31 -22
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +31 -22
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/Timeline.vue +2 -1
- package/timeline/timeline.cjs.js +2 -1
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +2 -1
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +2 -1
- package/timeline/timeline.min.js +1 -1
- package/toast/Toast.vue +1 -1
- package/toast/toast.cjs.js +1 -1
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +1 -1
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +1 -1
- package/toast/toast.min.js +1 -1
- package/togglebutton/ToggleButton.vue +5 -1
- package/togglebutton/togglebutton.cjs.js +5 -2
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +5 -2
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +5 -2
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/Toolbar.vue +3 -2
- package/toolbar/toolbar.cjs.js +3 -2
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +3 -2
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +3 -2
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +6 -7
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +6 -7
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +6 -7
- package/tooltip/tooltip.min.js +1 -1
- package/tree/Tree.d.ts +2 -2
- package/tree/Tree.vue +2 -1
- package/tree/tree.cjs.js +2 -1
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +2 -1
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +2 -1
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.d.ts +2 -2
- package/treeselect/TreeSelect.vue +2 -1
- package/treeselect/treeselect.cjs.js +2 -1
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +2 -1
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +2 -1
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/TreeTable.d.ts +4 -4
- package/treetable/TreeTable.vue +2 -1
- package/treetable/treetable.cjs.js +2 -1
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +2 -1
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +2 -1
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.vue +5 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +5 -2
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +5 -2
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +5 -2
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/ts-helpers.d.ts +2 -0
- package/vetur-attributes.json +36 -0
- package/vetur-tags.json +14 -0
- package/virtualscroller/VirtualScroller.vue +9 -6
- package/virtualscroller/virtualscroller.cjs.js +8 -6
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +8 -6
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +8 -6
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +119 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"primevue/button";import t from"primevue/icons/angledown";import n from"primevue/icons/angleup";import i from"primevue/inputtext";import{ObjectUtils as r,DomHandler as s}from"primevue/utils";import a from"primevue/basecomponent";import u from"primevue/inputnumber/style";import{resolveComponent as l,openBlock as o,createElementBlock as c,mergeProps as h,createVNode as p,toHandlers as d,withCtx as f,renderSlot as m,createBlock as g,resolveDynamicComponent as y,createCommentVNode as x}from"vue";function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e,t,n){var i;return(t="symbol"==v(i=C(t,"string"))?i:String(i))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e,t){if("object"!=v(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=v(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function w(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function D(e,t){if(e){if("string"==typeof e)return $(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$(e,t):void 0}}function _(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function B(e){if(Array.isArray(e))return $(e)}function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var V={name:"InputNumber",extends:{name:"BaseInputNumber",extends:a,props:{modelValue:{type:Number,default:null},format:{type:Boolean,default:!0},showButtons:{type:Boolean,default:!1},buttonLayout:{type:String,default:"stacked"},incrementButtonClass:{type:String,default:null},decrementButtonClass:{type:String,default:null},incrementButtonIcon:{type:String,default:void 0},decrementButtonIcon:{type:String,default:void 0},locale:{type:String,default:void 0},localeMatcher:{type:String,default:void 0},mode:{type:String,default:"decimal"},prefix:{type:String,default:null},suffix:{type:String,default:null},currency:{type:String,default:void 0},currencyDisplay:{type:String,default:void 0},useGrouping:{type:Boolean,default:!0},minFractionDigits:{type:Number,default:void 0},maxFractionDigits:{type:Number,default:void 0},roundingMode:{type:String,default:"halfExpand",validator:function(e){return["ceil","floor","expand","trunc","halfCeil","halfFloor","halfExpand","halfTrunc","halfEven"].includes(e)}},min:{type:Number,default:null},max:{type:Number,default:null},step:{type:Number,default:1},allowEmpty:{type:Boolean,default:!0},highlightOnFocus:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},variant:{type:String,default:null},invalid:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},incrementButtonProps:{type:null,default:null},decrementButtonProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:u,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","input","focus","blur"],numberFormat:null,_numeral:null,_decimal:null,_group:null,_minusSign:null,_currency:null,_suffix:null,_prefix:null,_index:null,groupChar:"",isSpecialChar:null,prefixChar:null,suffixChar:null,timer:null,data:function(){return{d_modelValue:this.modelValue,focused:!1}},watch:{modelValue:function(e){this.d_modelValue=e},locale:function(e,t){this.updateConstructParser(e,t)},localeMatcher:function(e,t){this.updateConstructParser(e,t)},mode:function(e,t){this.updateConstructParser(e,t)},currency:function(e,t){this.updateConstructParser(e,t)},currencyDisplay:function(e,t){this.updateConstructParser(e,t)},useGrouping:function(e,t){this.updateConstructParser(e,t)},minFractionDigits:function(e,t){this.updateConstructParser(e,t)},maxFractionDigits:function(e,t){this.updateConstructParser(e,t)},suffix:function(e,t){this.updateConstructParser(e,t)},prefix:function(e,t){this.updateConstructParser(e,t)}},created:function(){this.constructParser()},methods:{getOptions:function(){return{localeMatcher:this.localeMatcher,style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,useGrouping:this.useGrouping,minimumFractionDigits:this.minFractionDigits,maximumFractionDigits:this.maxFractionDigits,roundingMode:this.roundingMode}},constructParser:function(){this.numberFormat=new Intl.NumberFormat(this.locale,this.getOptions());var e,t=(e=new Intl.NumberFormat(this.locale,{useGrouping:!1}).format(9876543210),B(e)||_(e)||D(e)||w()).reverse(),n=new Map(t.map((function(e,t){return[e,t]})));this._numeral=new RegExp("[".concat(t.join(""),"]"),"g"),this._group=this.getGroupingExpression(),this._minusSign=this.getMinusSignExpression(),this._currency=this.getCurrencyExpression(),this._decimal=this.getDecimalExpression(),this._suffix=this.getSuffixExpression(),this._prefix=this.getPrefixExpression(),this._index=function(e){return n.get(e)}},updateConstructParser:function(e,t){e!==t&&this.constructParser()},escapeRegExp:function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},getDecimalExpression:function(){var e=new Intl.NumberFormat(this.locale,I(I({},this.getOptions()),{},{useGrouping:!1}));return new RegExp("[".concat(e.format(1.1).replace(this._currency,"").trim().replace(this._numeral,""),"]"),"g")},getGroupingExpression:function(){var e=new Intl.NumberFormat(this.locale,{useGrouping:!0});return this.groupChar=e.format(1e6).trim().replace(this._numeral,"").charAt(0),new RegExp("[".concat(this.groupChar,"]"),"g")},getMinusSignExpression:function(){var e=new Intl.NumberFormat(this.locale,{useGrouping:!1});return new RegExp("[".concat(e.format(-1).trim().replace(this._numeral,""),"]"),"g")},getCurrencyExpression:function(){if(this.currency){var e=new Intl.NumberFormat(this.locale,{style:"currency",currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0,roundingMode:this.roundingMode});return new RegExp("[".concat(e.format(1).replace(/\s/g,"").replace(this._numeral,"").replace(this._group,""),"]"),"g")}return new RegExp("[]","g")},getPrefixExpression:function(){if(this.prefix)this.prefixChar=this.prefix;else{var e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay});this.prefixChar=e.format(1).split("1")[0]}return new RegExp("".concat(this.escapeRegExp(this.prefixChar||"")),"g")},getSuffixExpression:function(){if(this.suffix)this.suffixChar=this.suffix;else{var e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0,roundingMode:this.roundingMode});this.suffixChar=e.format(1).split("1")[1]}return new RegExp("".concat(this.escapeRegExp(this.suffixChar||"")),"g")},formatValue:function(e){if(null!=e){if("-"===e)return e;if(this.format){var t=new Intl.NumberFormat(this.locale,this.getOptions()).format(e);return this.prefix&&(t=this.prefix+t),this.suffix&&(t+=this.suffix),t}return e.toString()}return""},parseValue:function(e){var t=e.replace(this._suffix,"").replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,"").replace(this._group,"").replace(this._minusSign,"-").replace(this._decimal,".").replace(this._numeral,this._index);if(t){if("-"===t)return t;var n=+t;return isNaN(n)?null:n}return null},repeat:function(e,t,n){var i=this;if(!this.readonly){var r=t||500;this.clearTimer(),this.timer=setTimeout((function(){i.repeat(e,40,n)}),r),this.spin(e,n)}},spin:function(e,t){if(this.$refs.input){var n=this.step*t,i=this.parseValue(this.$refs.input.$el.value)||0,r=this.validateValue(i+n);this.updateInput(r,null,"spin"),this.updateModel(e,r),this.handleOnInput(e,i,r)}},onUpButtonMouseDown:function(e){this.disabled||(this.$refs.input.$el.focus(),this.repeat(e,null,1),e.preventDefault())},onUpButtonMouseUp:function(){this.disabled||this.clearTimer()},onUpButtonMouseLeave:function(){this.disabled||this.clearTimer()},onUpButtonKeyUp:function(){this.disabled||this.clearTimer()},onUpButtonKeyDown:function(e){32!==e.keyCode&&13!==e.keyCode||this.repeat(e,null,1)},onDownButtonMouseDown:function(e){this.disabled||(this.$refs.input.$el.focus(),this.repeat(e,null,-1),e.preventDefault())},onDownButtonMouseUp:function(){this.disabled||this.clearTimer()},onDownButtonMouseLeave:function(){this.disabled||this.clearTimer()},onDownButtonKeyUp:function(){this.disabled||this.clearTimer()},onDownButtonKeyDown:function(e){32!==e.keyCode&&13!==e.keyCode||this.repeat(e,null,-1)},onUserInput:function(){this.isSpecialChar&&(this.$refs.input.$el.value=this.lastValue),this.isSpecialChar=!1},onInputKeyDown:function(e){if(!this.readonly)if(this.lastValue=e.target.value,e.shiftKey||e.altKey)this.isSpecialChar=!0;else{var t=e.target.selectionStart,n=e.target.selectionEnd,i=e.target.value,s=null;switch(e.altKey&&e.preventDefault(),e.code){case"ArrowUp":this.spin(e,1),e.preventDefault();break;case"ArrowDown":this.spin(e,-1),e.preventDefault();break;case"ArrowLeft":this.isNumeralChar(i.charAt(t-1))||e.preventDefault();break;case"ArrowRight":this.isNumeralChar(i.charAt(t))||e.preventDefault();break;case"Tab":case"Enter":case"NumpadEnter":s=this.validateValue(this.parseValue(i)),this.$refs.input.$el.value=this.formatValue(s),this.$refs.input.$el.setAttribute("aria-valuenow",s),this.updateModel(e,s);break;case"Backspace":if(e.preventDefault(),t===n){var a=i.charAt(t-1),u=this.getDecimalCharIndexes(i),l=u.decimalCharIndex,o=u.decimalCharIndexWithoutPrefix;if(this.isNumeralChar(a)){var c=this.getDecimalLength(i);if(this._group.test(a))this._group.lastIndex=0,s=i.slice(0,t-2)+i.slice(t-1);else if(this._decimal.test(a))this._decimal.lastIndex=0,c?this.$refs.input.$el.setSelectionRange(t-1,t-1):s=i.slice(0,t-1)+i.slice(t);else if(l>0&&t>l){var h=this.isDecimalMode()&&(this.minFractionDigits||0)<c?"":"0";s=i.slice(0,t-1)+h+i.slice(t)}else 1===o?(s=i.slice(0,t-1)+"0"+i.slice(t),s=this.parseValue(s)>0?s:""):s=i.slice(0,t-1)+i.slice(t)}this.updateValue(e,s,null,"delete-single")}else s=this.deleteRange(i,t,n),this.updateValue(e,s,null,"delete-range");break;case"Delete":if(e.preventDefault(),t===n){var p=i.charAt(t),d=this.getDecimalCharIndexes(i),f=d.decimalCharIndex,m=d.decimalCharIndexWithoutPrefix;if(this.isNumeralChar(p)){var g=this.getDecimalLength(i);if(this._group.test(p))this._group.lastIndex=0,s=i.slice(0,t)+i.slice(t+2);else if(this._decimal.test(p))this._decimal.lastIndex=0,g?this.$refs.input.$el.setSelectionRange(t+1,t+1):s=i.slice(0,t)+i.slice(t+1);else if(f>0&&t>f){var y=this.isDecimalMode()&&(this.minFractionDigits||0)<g?"":"0";s=i.slice(0,t)+y+i.slice(t+1)}else 1===m?(s=i.slice(0,t)+"0"+i.slice(t+1),s=this.parseValue(s)>0?s:""):s=i.slice(0,t)+i.slice(t+1)}this.updateValue(e,s,null,"delete-back-single")}else s=this.deleteRange(i,t,n),this.updateValue(e,s,null,"delete-range");break;case"Home":e.preventDefault(),r.isEmpty(this.min)||this.updateModel(e,this.min);break;case"End":e.preventDefault(),r.isEmpty(this.max)||this.updateModel(e,this.max)}}},onInputKeyPress:function(e){if(!this.readonly){e.preventDefault();var t=e.which||e.keyCode,n=String.fromCharCode(t),i=this.isDecimalSign(n),r=this.isMinusSign(n);(48<=t&&t<=57||r||i)&&this.insert(e,n,{isDecimalSign:i,isMinusSign:r})}},onPaste:function(e){e.preventDefault();var t=(e.clipboardData||window.clipboardData).getData("Text");if(t){var n=this.parseValue(t);null!=n&&this.insert(e,n.toString())}},allowMinusSign:function(){return null===this.min||this.min<0},isMinusSign:function(e){return!(!this._minusSign.test(e)&&"-"!==e)&&(this._minusSign.lastIndex=0,!0)},isDecimalSign:function(e){return!!this._decimal.test(e)&&(this._decimal.lastIndex=0,!0)},isDecimalMode:function(){return"decimal"===this.mode},getDecimalCharIndexes:function(e){var t=e.search(this._decimal);this._decimal.lastIndex=0;var n=e.replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,"").search(this._decimal);return this._decimal.lastIndex=0,{decimalCharIndex:t,decimalCharIndexWithoutPrefix:n}},getCharIndexes:function(e){var t=e.search(this._decimal);this._decimal.lastIndex=0;var n=e.search(this._minusSign);this._minusSign.lastIndex=0;var i=e.search(this._suffix);this._suffix.lastIndex=0;var r=e.search(this._currency);return this._currency.lastIndex=0,{decimalCharIndex:t,minusCharIndex:n,suffixCharIndex:i,currencyCharIndex:r}},insert:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{isDecimalSign:!1,isMinusSign:!1},i=t.search(this._minusSign);if(this._minusSign.lastIndex=0,this.allowMinusSign()||-1===i){var r,s=this.$refs.input.$el.selectionStart,a=this.$refs.input.$el.selectionEnd,u=this.$refs.input.$el.value.trim(),l=this.getCharIndexes(u),o=l.decimalCharIndex,c=l.suffixCharIndex,h=l.currencyCharIndex;if(n.isMinusSign)0===s&&(r=u,-1!==l.minusCharIndex&&0===a||(r=this.insertText(u,t,0,a)),this.updateValue(e,r,t,"insert"));else if(n.isDecimalSign)o>0&&s===o?this.updateValue(e,u,t,"insert"):(o>s&&o<a||-1===o&&this.maxFractionDigits)&&(r=this.insertText(u,t,s,a),this.updateValue(e,r,t,"insert"));else{var p=this.numberFormat.resolvedOptions().maximumFractionDigits,d=s!==a?"range-insert":"insert";if(o>0&&s>o){if(s+t.length-(o+1)<=p){var f=h>=s?h-1:c>=s?c:u.length;r=u.slice(0,s)+t+u.slice(s+t.length,f)+u.slice(f),this.updateValue(e,r,t,d)}}else r=this.insertText(u,t,s,a),this.updateValue(e,r,t,d)}}},insertText:function(e,t,n,i){if(2===("."===t?t:t.split(".")).length){var r=e.slice(n,i).search(this._decimal);return this._decimal.lastIndex=0,r>0?e.slice(0,n)+this.formatValue(t)+e.slice(i):this.formatValue(t)||e}return i-n===e.length?this.formatValue(t):0===n?t+e.slice(i):i===e.length?e.slice(0,n)+t:e.slice(0,n)+t+e.slice(i)},deleteRange:function(e,t,n){return n-t===e.length?"":0===t?e.slice(n):n===e.length?e.slice(0,t):e.slice(0,t)+e.slice(n)},initCursor:function(){var e=this.$refs.input.$el.selectionStart,t=this.$refs.input.$el.value,n=t.length,i=null,r=(this.prefixChar||"").length,s=(t=t.replace(this._prefix,"")).charAt(e-=r);if(this.isNumeralChar(s))return e+r;for(var a=e-1;a>=0;){if(s=t.charAt(a),this.isNumeralChar(s)){i=a+r;break}a--}if(null!==i)this.$refs.input.$el.setSelectionRange(i+1,i+1);else{for(a=e;a<n;){if(s=t.charAt(a),this.isNumeralChar(s)){i=a+r;break}a++}null!==i&&this.$refs.input.$el.setSelectionRange(i,i)}return i||0},onInputClick:function(){this.readonly||this.$refs.input.$el.value===s.getSelection()||this.initCursor()},isNumeralChar:function(e){return!(1!==e.length||!(this._numeral.test(e)||this._decimal.test(e)||this._group.test(e)||this._minusSign.test(e)))&&(this.resetRegex(),!0)},resetRegex:function(){this._numeral.lastIndex=0,this._decimal.lastIndex=0,this._group.lastIndex=0,this._minusSign.lastIndex=0},updateValue:function(e,t,n,i){var r=this.$refs.input.$el.value,s=null;null!=t&&(s=this.parseValue(t),this.updateInput(s=s||this.allowEmpty?s:0,n,i,t),this.handleOnInput(e,r,s))},handleOnInput:function(e,t,n){this.isValueChanged(t,n)&&this.$emit("input",{originalEvent:e,value:n,formattedValue:t})},isValueChanged:function(e,t){return null===t&&null!==e||null!=t&&t!==("string"==typeof e?this.parseValue(e):e)},validateValue:function(e){return"-"===e||null==e?null:null!=this.min&&e<this.min?this.min:null!=this.max&&e>this.max?this.max:e},updateInput:function(e,t,n,i){t=t||"";var r=this.$refs.input.$el.value,s=this.formatValue(e),a=r.length;if(s!==i&&(s=this.concatValues(s,i)),0===a){this.$refs.input.$el.value=s,this.$refs.input.$el.setSelectionRange(0,0);var u=this.initCursor()+t.length;this.$refs.input.$el.setSelectionRange(u,u)}else{var l=this.$refs.input.$el.selectionStart,o=this.$refs.input.$el.selectionEnd;this.$refs.input.$el.value=s;var c=s.length;if("range-insert"===n){var h=this.parseValue((r||"").slice(0,l)),p=(null!==h?h.toString():"").split("").join("(".concat(this.groupChar,")?")),d=new RegExp(p,"g");d.test(s);var f=t.split("").join("(".concat(this.groupChar,")?")),m=new RegExp(f,"g");m.test(s.slice(d.lastIndex)),this.$refs.input.$el.setSelectionRange(o=d.lastIndex+m.lastIndex,o)}else if(c===a)if("insert"===n||"delete-back-single"===n){var g=/[.,]/g,y=o+Number(g.test(e)||g.test(t));this.$refs.input.$el.setSelectionRange(y,y)}else"delete-single"===n?this.$refs.input.$el.setSelectionRange(o-1,o-1):"delete-range"!==n&&"spin"!==n||this.$refs.input.$el.setSelectionRange(o,o);else if("delete-back-single"===n){var x=r.charAt(o-1),v=r.charAt(o),b=a-c,I=this._group.test(v);I&&1===b?o+=1:!I&&this.isNumeralChar(x)&&(o+=-1*b+1),this._group.lastIndex=0,this.$refs.input.$el.setSelectionRange(o,o)}else if("-"===r&&"insert"===n){this.$refs.input.$el.setSelectionRange(0,0);var S=this.initCursor()+t.length+1;this.$refs.input.$el.setSelectionRange(S,S)}else this.$refs.input.$el.setSelectionRange(o+=c-a,o)}this.$refs.input.$el.setAttribute("aria-valuenow",e)},concatValues:function(e,t){if(e&&t){var n=t.search(this._decimal);return this._decimal.lastIndex=0,this.suffixChar?-1!==n?e.replace(this.suffixChar,"").split(this._decimal)[0]+t.replace(this.suffixChar,"").slice(n)+this.suffixChar:e:-1!==n?e.split(this._decimal)[0]+t.slice(n):e}return e},getDecimalLength:function(e){if(e){var t=e.split(this._decimal);if(2===t.length)return t[1].replace(this._suffix,"").trim().replace(/\s/g,"").replace(this._currency,"").length}return 0},updateModel:function(e,t){this.d_modelValue=t,this.$emit("update:modelValue",t)},onInputFocus:function(e){this.focused=!0,this.disabled||this.readonly||this.$refs.input.$el.value===s.getSelection()||!this.highlightOnFocus||e.target.select(),this.$emit("focus",e)},onInputBlur:function(e){this.focused=!1;var t=e.target,n=this.validateValue(this.parseValue(t.value));this.$emit("blur",{originalEvent:e,value:t.value}),t.value=this.formatValue(n),t.setAttribute("aria-valuenow",n),this.updateModel(e,n),this.disabled||this.readonly||!this.highlightOnFocus||s.clearSelection()},clearTimer:function(){this.timer&&clearInterval(this.timer)},maxBoundry:function(){return this.d_modelValue>=this.max},minBoundry:function(){return this.d_modelValue<=this.min}},computed:{filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0},upButtonListeners:function(){var e=this;return{mousedown:function(t){return e.onUpButtonMouseDown(t)},mouseup:function(t){return e.onUpButtonMouseUp(t)},mouseleave:function(t){return e.onUpButtonMouseLeave(t)},keydown:function(t){return e.onUpButtonKeyDown(t)},keyup:function(t){return e.onUpButtonKeyUp(t)}}},downButtonListeners:function(){var e=this;return{mousedown:function(t){return e.onDownButtonMouseDown(t)},mouseup:function(t){return e.onDownButtonMouseUp(t)},mouseleave:function(t){return e.onDownButtonMouseLeave(t)},keydown:function(t){return e.onDownButtonKeyDown(t)},keyup:function(t){return e.onDownButtonKeyUp(t)}}},formattedValue:function(){return this.formatValue(this.modelValue||this.allowEmpty?this.modelValue:0)},getFormatter:function(){return this.numberFormat}},components:{INInputText:i,INButton:e,AngleUpIcon:n,AngleDownIcon:t}};V.render=function(e,t,n,i,r,s){var a=l("INInputText"),u=l("INButton");return o(),c("span",h({class:e.cx("root")},e.ptm("root")),[p(a,h({ref:"input",id:e.inputId,role:"spinbutton",class:[e.cx("input"),e.inputClass],style:e.inputStyle,value:s.formattedValue,"aria-valuemin":e.min,"aria-valuemax":e.max,"aria-valuenow":e.modelValue,disabled:e.disabled,readonly:e.readonly,placeholder:e.placeholder,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,onInput:s.onUserInput,onKeydown:s.onInputKeyDown,onKeypress:s.onInputKeyPress,onPaste:s.onPaste,onClick:s.onInputClick,onFocus:s.onInputFocus,onBlur:s.onInputBlur},e.inputProps,{pt:e.ptm("input"),unstyled:e.unstyled}),null,16,["id","class","style","value","aria-valuemin","aria-valuemax","aria-valuenow","disabled","readonly","placeholder","aria-labelledby","aria-label","onInput","onKeydown","onKeypress","onPaste","onClick","onFocus","onBlur","pt","unstyled"]),e.showButtons&&"stacked"===e.buttonLayout?(o(),c("span",h({key:0,class:e.cx("buttonGroup")},e.ptm("buttonGroup")),[p(u,h({class:[e.cx("incrementButton"),e.incrementButtonClass]},d(s.upButtonListeners),{disabled:e.disabled,tabindex:-1,"aria-hidden":"true"},e.incrementButtonProps,{pt:e.ptm("incrementButton"),unstyled:e.unstyled}),{icon:f((function(){return[m(e.$slots,"incrementbuttonicon",{},(function(){return[(o(),g(y(e.incrementButtonIcon?"span":"AngleUpIcon"),h({class:e.incrementButtonIcon},e.ptm("incrementButton").icon,{"data-pc-section":"incrementbuttonicon"}),null,16,["class"]))]}))]})),_:3},16,["class","disabled","pt","unstyled"]),p(u,h({class:[e.cx("decrementButton"),e.decrementButtonClass]},d(s.downButtonListeners),{disabled:e.disabled,tabindex:-1,"aria-hidden":"true"},e.decrementButtonProps,{pt:e.ptm("decrementButton"),unstyled:e.unstyled}),{icon:f((function(){return[m(e.$slots,"decrementbuttonicon",{},(function(){return[(o(),g(y(e.decrementButtonIcon?"span":"AngleDownIcon"),h({class:e.decrementButtonIcon},e.ptm("decrementButton").icon,{"data-pc-section":"decrementbuttonicon"}),null,16,["class"]))]}))]})),_:3},16,["class","disabled","pt","unstyled"])],16)):x("",!0),e.showButtons&&"stacked"!==e.buttonLayout?(o(),g(u,h({key:1,class:[e.cx("incrementButton"),e.incrementButtonClass]},d(s.upButtonListeners),{disabled:e.disabled,tabindex:-1,"aria-hidden":"true"},e.incrementButtonProps,{pt:e.ptm("incrementButton"),unstyled:e.unstyled}),{icon:f((function(){return[m(e.$slots,"incrementbuttonicon",{},(function(){return[(o(),g(y(e.incrementButtonIcon?"span":"AngleUpIcon"),h({class:e.incrementButtonIcon},e.ptm("incrementButton").icon,{"data-pc-section":"incrementbuttonicon"}),null,16,["class"]))]}))]})),_:3},16,["class","disabled","pt","unstyled"])):x("",!0),e.showButtons&&"stacked"!==e.buttonLayout?(o(),g(u,h({key:2,class:[e.cx("decrementButton"),e.decrementButtonClass]},d(s.downButtonListeners),{disabled:e.disabled,tabindex:-1,"aria-hidden":"true"},e.decrementButtonProps,{pt:e.ptm("decrementButton"),unstyled:e.unstyled}),{icon:f((function(){return[m(e.$slots,"decrementbuttonicon",{},(function(){return[(o(),g(y(e.decrementButtonIcon?"span":"AngleDownIcon"),h({class:e.decrementButtonIcon},e.ptm("decrementButton").icon,{"data-pc-section":"decrementbuttonicon"}),null,16,["class"]))]}))]})),_:3},16,["class","disabled","pt","unstyled"])):x("",!0)],16)};export{V as default};
|
|
1
|
+
import e from"primevue/button";import t from"primevue/icons/angledown";import n from"primevue/icons/angleup";import i from"primevue/inputtext";import{ObjectUtils as r,DomHandler as s}from"primevue/utils";import a from"primevue/basecomponent";import u from"primevue/inputnumber/style";import{resolveComponent as l,openBlock as o,createElementBlock as c,mergeProps as h,createVNode as p,toHandlers as d,withCtx as f,renderSlot as m,createBlock as g,resolveDynamicComponent as y,createCommentVNode as x}from"vue";function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e,t,n){var i;return(t="symbol"==v(i=C(t,"string"))?i:String(i))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e,t){if("object"!=v(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=v(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function w(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function D(e,t){if(e){if("string"==typeof e)return $(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$(e,t):void 0}}function _(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function B(e){if(Array.isArray(e))return $(e)}function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var V={name:"InputNumber",extends:{name:"BaseInputNumber",extends:a,props:{modelValue:{type:Number,default:null},format:{type:Boolean,default:!0},showButtons:{type:Boolean,default:!1},buttonLayout:{type:String,default:"stacked"},incrementButtonClass:{type:String,default:null},decrementButtonClass:{type:String,default:null},incrementButtonIcon:{type:String,default:void 0},decrementButtonIcon:{type:String,default:void 0},locale:{type:String,default:void 0},localeMatcher:{type:String,default:void 0},mode:{type:String,default:"decimal"},prefix:{type:String,default:null},suffix:{type:String,default:null},currency:{type:String,default:void 0},currencyDisplay:{type:String,default:void 0},useGrouping:{type:Boolean,default:!0},minFractionDigits:{type:Number,default:void 0},maxFractionDigits:{type:Number,default:void 0},roundingMode:{type:String,default:"halfExpand",validator:function(e){return["ceil","floor","expand","trunc","halfCeil","halfFloor","halfExpand","halfTrunc","halfEven"].includes(e)}},min:{type:Number,default:null},max:{type:Number,default:null},step:{type:Number,default:1},allowEmpty:{type:Boolean,default:!0},highlightOnFocus:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},variant:{type:String,default:null},invalid:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},incrementButtonProps:{type:null,default:null},decrementButtonProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:u,provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["update:modelValue","input","focus","blur"],numberFormat:null,_numeral:null,_decimal:null,_group:null,_minusSign:null,_currency:null,_suffix:null,_prefix:null,_index:null,groupChar:"",isSpecialChar:null,prefixChar:null,suffixChar:null,timer:null,data:function(){return{d_modelValue:this.modelValue,focused:!1}},watch:{modelValue:function(e){this.d_modelValue=e},locale:function(e,t){this.updateConstructParser(e,t)},localeMatcher:function(e,t){this.updateConstructParser(e,t)},mode:function(e,t){this.updateConstructParser(e,t)},currency:function(e,t){this.updateConstructParser(e,t)},currencyDisplay:function(e,t){this.updateConstructParser(e,t)},useGrouping:function(e,t){this.updateConstructParser(e,t)},minFractionDigits:function(e,t){this.updateConstructParser(e,t)},maxFractionDigits:function(e,t){this.updateConstructParser(e,t)},suffix:function(e,t){this.updateConstructParser(e,t)},prefix:function(e,t){this.updateConstructParser(e,t)}},created:function(){this.constructParser()},methods:{getOptions:function(){return{localeMatcher:this.localeMatcher,style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,useGrouping:this.useGrouping,minimumFractionDigits:this.minFractionDigits,maximumFractionDigits:this.maxFractionDigits,roundingMode:this.roundingMode}},constructParser:function(){this.numberFormat=new Intl.NumberFormat(this.locale,this.getOptions());var e,t=(e=new Intl.NumberFormat(this.locale,{useGrouping:!1}).format(9876543210),B(e)||_(e)||D(e)||w()).reverse(),n=new Map(t.map((function(e,t){return[e,t]})));this._numeral=new RegExp("[".concat(t.join(""),"]"),"g"),this._group=this.getGroupingExpression(),this._minusSign=this.getMinusSignExpression(),this._currency=this.getCurrencyExpression(),this._decimal=this.getDecimalExpression(),this._suffix=this.getSuffixExpression(),this._prefix=this.getPrefixExpression(),this._index=function(e){return n.get(e)}},updateConstructParser:function(e,t){e!==t&&this.constructParser()},escapeRegExp:function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},getDecimalExpression:function(){var e=new Intl.NumberFormat(this.locale,I(I({},this.getOptions()),{},{useGrouping:!1}));return new RegExp("[".concat(e.format(1.1).replace(this._currency,"").trim().replace(this._numeral,""),"]"),"g")},getGroupingExpression:function(){var e=new Intl.NumberFormat(this.locale,{useGrouping:!0});return this.groupChar=e.format(1e6).trim().replace(this._numeral,"").charAt(0),new RegExp("[".concat(this.groupChar,"]"),"g")},getMinusSignExpression:function(){var e=new Intl.NumberFormat(this.locale,{useGrouping:!1});return new RegExp("[".concat(e.format(-1).trim().replace(this._numeral,""),"]"),"g")},getCurrencyExpression:function(){if(this.currency){var e=new Intl.NumberFormat(this.locale,{style:"currency",currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0,roundingMode:this.roundingMode});return new RegExp("[".concat(e.format(1).replace(/\s/g,"").replace(this._numeral,"").replace(this._group,""),"]"),"g")}return new RegExp("[]","g")},getPrefixExpression:function(){if(this.prefix)this.prefixChar=this.prefix;else{var e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay});this.prefixChar=e.format(1).split("1")[0]}return new RegExp("".concat(this.escapeRegExp(this.prefixChar||"")),"g")},getSuffixExpression:function(){if(this.suffix)this.suffixChar=this.suffix;else{var e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0,roundingMode:this.roundingMode});this.suffixChar=e.format(1).split("1")[1]}return new RegExp("".concat(this.escapeRegExp(this.suffixChar||"")),"g")},formatValue:function(e){if(null!=e){if("-"===e)return e;if(this.format){var t=new Intl.NumberFormat(this.locale,this.getOptions()).format(e);return this.prefix&&(t=this.prefix+t),this.suffix&&(t+=this.suffix),t}return e.toString()}return""},parseValue:function(e){var t=e.replace(this._suffix,"").replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,"").replace(this._group,"").replace(this._minusSign,"-").replace(this._decimal,".").replace(this._numeral,this._index);if(t){if("-"===t)return t;var n=+t;return isNaN(n)?null:n}return null},repeat:function(e,t,n){var i=this;if(!this.readonly){var r=t||500;this.clearTimer(),this.timer=setTimeout((function(){i.repeat(e,40,n)}),r),this.spin(e,n)}},spin:function(e,t){if(this.$refs.input){var n=this.step*t,i=this.parseValue(this.$refs.input.$el.value)||0,r=this.validateValue(i+n);this.updateInput(r,null,"spin"),this.updateModel(e,r),this.handleOnInput(e,i,r)}},onUpButtonMouseDown:function(e){this.disabled||(this.$refs.input.$el.focus(),this.repeat(e,null,1),e.preventDefault())},onUpButtonMouseUp:function(){this.disabled||this.clearTimer()},onUpButtonMouseLeave:function(){this.disabled||this.clearTimer()},onUpButtonKeyUp:function(){this.disabled||this.clearTimer()},onUpButtonKeyDown:function(e){32!==e.keyCode&&13!==e.keyCode||this.repeat(e,null,1)},onDownButtonMouseDown:function(e){this.disabled||(this.$refs.input.$el.focus(),this.repeat(e,null,-1),e.preventDefault())},onDownButtonMouseUp:function(){this.disabled||this.clearTimer()},onDownButtonMouseLeave:function(){this.disabled||this.clearTimer()},onDownButtonKeyUp:function(){this.disabled||this.clearTimer()},onDownButtonKeyDown:function(e){32!==e.keyCode&&13!==e.keyCode||this.repeat(e,null,-1)},onUserInput:function(){this.isSpecialChar&&(this.$refs.input.$el.value=this.lastValue),this.isSpecialChar=!1},onInputKeyDown:function(e){if(!this.readonly)if(this.lastValue=e.target.value,e.shiftKey||e.altKey)this.isSpecialChar=!0;else{var t=e.target.selectionStart,n=e.target.selectionEnd,i=e.target.value,s=null;switch(e.altKey&&e.preventDefault(),e.code){case"ArrowUp":this.spin(e,1),e.preventDefault();break;case"ArrowDown":this.spin(e,-1),e.preventDefault();break;case"ArrowLeft":this.isNumeralChar(i.charAt(t-1))||e.preventDefault();break;case"ArrowRight":this.isNumeralChar(i.charAt(t))||e.preventDefault();break;case"Tab":case"Enter":case"NumpadEnter":s=this.validateValue(this.parseValue(i)),this.$refs.input.$el.value=this.formatValue(s),this.$refs.input.$el.setAttribute("aria-valuenow",s),this.updateModel(e,s);break;case"Backspace":if(e.preventDefault(),t===n){var a=i.charAt(t-1),u=this.getDecimalCharIndexes(i),l=u.decimalCharIndex,o=u.decimalCharIndexWithoutPrefix;if(this.isNumeralChar(a)){var c=this.getDecimalLength(i);if(this._group.test(a))this._group.lastIndex=0,s=i.slice(0,t-2)+i.slice(t-1);else if(this._decimal.test(a))this._decimal.lastIndex=0,c?this.$refs.input.$el.setSelectionRange(t-1,t-1):s=i.slice(0,t-1)+i.slice(t);else if(l>0&&t>l){var h=this.isDecimalMode()&&(this.minFractionDigits||0)<c?"":"0";s=i.slice(0,t-1)+h+i.slice(t)}else 1===o?(s=i.slice(0,t-1)+"0"+i.slice(t),s=this.parseValue(s)>0?s:""):s=i.slice(0,t-1)+i.slice(t)}this.updateValue(e,s,null,"delete-single")}else s=this.deleteRange(i,t,n),this.updateValue(e,s,null,"delete-range");break;case"Delete":if(e.preventDefault(),t===n){var p=i.charAt(t),d=this.getDecimalCharIndexes(i),f=d.decimalCharIndex,m=d.decimalCharIndexWithoutPrefix;if(this.isNumeralChar(p)){var g=this.getDecimalLength(i);if(this._group.test(p))this._group.lastIndex=0,s=i.slice(0,t)+i.slice(t+2);else if(this._decimal.test(p))this._decimal.lastIndex=0,g?this.$refs.input.$el.setSelectionRange(t+1,t+1):s=i.slice(0,t)+i.slice(t+1);else if(f>0&&t>f){var y=this.isDecimalMode()&&(this.minFractionDigits||0)<g?"":"0";s=i.slice(0,t)+y+i.slice(t+1)}else 1===m?(s=i.slice(0,t)+"0"+i.slice(t+1),s=this.parseValue(s)>0?s:""):s=i.slice(0,t)+i.slice(t+1)}this.updateValue(e,s,null,"delete-back-single")}else s=this.deleteRange(i,t,n),this.updateValue(e,s,null,"delete-range");break;case"Home":e.preventDefault(),r.isEmpty(this.min)||this.updateModel(e,this.min);break;case"End":e.preventDefault(),r.isEmpty(this.max)||this.updateModel(e,this.max)}}},onInputKeyPress:function(e){if(!this.readonly){e.preventDefault();var t=e.which||e.keyCode,n=String.fromCharCode(t),i=this.isDecimalSign(n),r=this.isMinusSign(n);(48<=t&&t<=57||r||i)&&this.insert(e,n,{isDecimalSign:i,isMinusSign:r})}},onPaste:function(e){e.preventDefault();var t=(e.clipboardData||window.clipboardData).getData("Text");if(t){var n=this.parseValue(t);null!=n&&this.insert(e,n.toString())}},allowMinusSign:function(){return null===this.min||this.min<0},isMinusSign:function(e){return!(!this._minusSign.test(e)&&"-"!==e)&&(this._minusSign.lastIndex=0,!0)},isDecimalSign:function(e){return!!this._decimal.test(e)&&(this._decimal.lastIndex=0,!0)},isDecimalMode:function(){return"decimal"===this.mode},getDecimalCharIndexes:function(e){var t=e.search(this._decimal);this._decimal.lastIndex=0;var n=e.replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,"").search(this._decimal);return this._decimal.lastIndex=0,{decimalCharIndex:t,decimalCharIndexWithoutPrefix:n}},getCharIndexes:function(e){var t=e.search(this._decimal);this._decimal.lastIndex=0;var n=e.search(this._minusSign);this._minusSign.lastIndex=0;var i=e.search(this._suffix);this._suffix.lastIndex=0;var r=e.search(this._currency);return this._currency.lastIndex=0,{decimalCharIndex:t,minusCharIndex:n,suffixCharIndex:i,currencyCharIndex:r}},insert:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{isDecimalSign:!1,isMinusSign:!1},i=t.search(this._minusSign);if(this._minusSign.lastIndex=0,this.allowMinusSign()||-1===i){var r,s=this.$refs.input.$el.selectionStart,a=this.$refs.input.$el.selectionEnd,u=this.$refs.input.$el.value.trim(),l=this.getCharIndexes(u),o=l.decimalCharIndex,c=l.suffixCharIndex,h=l.currencyCharIndex;if(n.isMinusSign)0===s&&(r=u,-1!==l.minusCharIndex&&0===a||(r=this.insertText(u,t,0,a)),this.updateValue(e,r,t,"insert"));else if(n.isDecimalSign)o>0&&s===o?this.updateValue(e,u,t,"insert"):(o>s&&o<a||-1===o&&this.maxFractionDigits)&&(r=this.insertText(u,t,s,a),this.updateValue(e,r,t,"insert"));else{var p=this.numberFormat.resolvedOptions().maximumFractionDigits,d=s!==a?"range-insert":"insert";if(o>0&&s>o){if(s+t.length-(o+1)<=p){var f=h>=s?h-1:c>=s?c:u.length;r=u.slice(0,s)+t+u.slice(s+t.length,f)+u.slice(f),this.updateValue(e,r,t,d)}}else r=this.insertText(u,t,s,a),this.updateValue(e,r,t,d)}}},insertText:function(e,t,n,i){if(2===("."===t?t:t.split(".")).length){var r=e.slice(n,i).search(this._decimal);return this._decimal.lastIndex=0,r>0?e.slice(0,n)+this.formatValue(t)+e.slice(i):this.formatValue(t)||e}return i-n===e.length?this.formatValue(t):0===n?t+e.slice(i):i===e.length?e.slice(0,n)+t:e.slice(0,n)+t+e.slice(i)},deleteRange:function(e,t,n){return n-t===e.length?"":0===t?e.slice(n):n===e.length?e.slice(0,t):e.slice(0,t)+e.slice(n)},initCursor:function(){var e=this.$refs.input.$el.selectionStart,t=this.$refs.input.$el.value,n=t.length,i=null,r=(this.prefixChar||"").length,s=(t=t.replace(this._prefix,"")).charAt(e-=r);if(this.isNumeralChar(s))return e+r;for(var a=e-1;a>=0;){if(s=t.charAt(a),this.isNumeralChar(s)){i=a+r;break}a--}if(null!==i)this.$refs.input.$el.setSelectionRange(i+1,i+1);else{for(a=e;a<n;){if(s=t.charAt(a),this.isNumeralChar(s)){i=a+r;break}a++}null!==i&&this.$refs.input.$el.setSelectionRange(i,i)}return i||0},onInputClick:function(){this.readonly||this.$refs.input.$el.value===s.getSelection()||this.initCursor()},isNumeralChar:function(e){return!(1!==e.length||!(this._numeral.test(e)||this._decimal.test(e)||this._group.test(e)||this._minusSign.test(e)))&&(this.resetRegex(),!0)},resetRegex:function(){this._numeral.lastIndex=0,this._decimal.lastIndex=0,this._group.lastIndex=0,this._minusSign.lastIndex=0},updateValue:function(e,t,n,i){var r=this.$refs.input.$el.value,s=null;null!=t&&(s=this.parseValue(t),this.updateInput(s=s||this.allowEmpty?s:0,n,i,t),this.handleOnInput(e,r,s))},handleOnInput:function(e,t,n){this.isValueChanged(t,n)&&this.$emit("input",{originalEvent:e,value:n,formattedValue:t})},isValueChanged:function(e,t){return null===t&&null!==e||null!=t&&t!==("string"==typeof e?this.parseValue(e):e)},validateValue:function(e){return"-"===e||null==e?null:null!=this.min&&e<this.min?this.min:null!=this.max&&e>this.max?this.max:e},updateInput:function(e,t,n,i){t=t||"";var r=this.$refs.input.$el.value,s=this.formatValue(e),a=r.length;if(s!==i&&(s=this.concatValues(s,i)),0===a){this.$refs.input.$el.value=s,this.$refs.input.$el.setSelectionRange(0,0);var u=this.initCursor()+t.length;this.$refs.input.$el.setSelectionRange(u,u)}else{var l=this.$refs.input.$el.selectionStart,o=this.$refs.input.$el.selectionEnd;this.$refs.input.$el.value=s;var c=s.length;if("range-insert"===n){var h=this.parseValue((r||"").slice(0,l)),p=(null!==h?h.toString():"").split("").join("(".concat(this.groupChar,")?")),d=new RegExp(p,"g");d.test(s);var f=t.split("").join("(".concat(this.groupChar,")?")),m=new RegExp(f,"g");m.test(s.slice(d.lastIndex)),this.$refs.input.$el.setSelectionRange(o=d.lastIndex+m.lastIndex,o)}else if(c===a)if("insert"===n||"delete-back-single"===n){var g=/[.,]/g,y=o+Number(g.test(e)||g.test(t));this.$refs.input.$el.setSelectionRange(y,y)}else"delete-single"===n?this.$refs.input.$el.setSelectionRange(o-1,o-1):"delete-range"!==n&&"spin"!==n||this.$refs.input.$el.setSelectionRange(o,o);else if("delete-back-single"===n){var x=r.charAt(o-1),v=r.charAt(o),b=a-c,I=this._group.test(v);I&&1===b?o+=1:!I&&this.isNumeralChar(x)&&(o+=-1*b+1),this._group.lastIndex=0,this.$refs.input.$el.setSelectionRange(o,o)}else if("-"===r&&"insert"===n){this.$refs.input.$el.setSelectionRange(0,0);var S=this.initCursor()+t.length+1;this.$refs.input.$el.setSelectionRange(S,S)}else this.$refs.input.$el.setSelectionRange(o+=c-a,o)}this.$refs.input.$el.setAttribute("aria-valuenow",e)},concatValues:function(e,t){if(e&&t){var n=t.search(this._decimal);return this._decimal.lastIndex=0,this.suffixChar?-1!==n?e.replace(this.suffixChar,"").split(this._decimal)[0]+t.replace(this.suffixChar,"").slice(n)+this.suffixChar:e:-1!==n?e.split(this._decimal)[0]+t.slice(n):e}return e},getDecimalLength:function(e){if(e){var t=e.split(this._decimal);if(2===t.length)return t[1].replace(this._suffix,"").trim().replace(/\s/g,"").replace(this._currency,"").length}return 0},updateModel:function(e,t){this.d_modelValue=t,this.$emit("update:modelValue",t)},onInputFocus:function(e){this.focused=!0,this.disabled||this.readonly||this.$refs.input.$el.value===s.getSelection()||!this.highlightOnFocus||e.target.select(),this.$emit("focus",e)},onInputBlur:function(e){this.focused=!1;var t=e.target,n=this.validateValue(this.parseValue(t.value));this.$emit("blur",{originalEvent:e,value:t.value}),t.value=this.formatValue(n),t.setAttribute("aria-valuenow",n),this.updateModel(e,n),this.disabled||this.readonly||!this.highlightOnFocus||s.clearSelection()},clearTimer:function(){this.timer&&clearInterval(this.timer)},maxBoundry:function(){return this.d_modelValue>=this.max},minBoundry:function(){return this.d_modelValue<=this.min}},computed:{filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0},upButtonListeners:function(){var e=this;return{mousedown:function(t){return e.onUpButtonMouseDown(t)},mouseup:function(t){return e.onUpButtonMouseUp(t)},mouseleave:function(t){return e.onUpButtonMouseLeave(t)},keydown:function(t){return e.onUpButtonKeyDown(t)},keyup:function(t){return e.onUpButtonKeyUp(t)}}},downButtonListeners:function(){var e=this;return{mousedown:function(t){return e.onDownButtonMouseDown(t)},mouseup:function(t){return e.onDownButtonMouseUp(t)},mouseleave:function(t){return e.onDownButtonMouseLeave(t)},keydown:function(t){return e.onDownButtonKeyDown(t)},keyup:function(t){return e.onDownButtonKeyUp(t)}}},formattedValue:function(){return this.formatValue(this.modelValue||this.allowEmpty?this.modelValue:0)},getFormatter:function(){return this.numberFormat}},components:{INInputText:i,INButton:e,AngleUpIcon:n,AngleDownIcon:t}};V.render=function(e,t,n,i,r,s){var a=l("INInputText"),u=l("INButton");return o(),c("span",h({class:e.cx("root")},e.ptmi("root")),[p(a,h({ref:"input",id:e.inputId,role:"spinbutton",class:[e.cx("input"),e.inputClass],style:e.inputStyle,value:s.formattedValue,"aria-valuemin":e.min,"aria-valuemax":e.max,"aria-valuenow":e.modelValue,disabled:e.disabled,readonly:e.readonly,placeholder:e.placeholder,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-invalid":e.invalid||void 0,onInput:s.onUserInput,onKeydown:s.onInputKeyDown,onKeypress:s.onInputKeyPress,onPaste:s.onPaste,onClick:s.onInputClick,onFocus:s.onInputFocus,onBlur:s.onInputBlur},e.inputProps,{pt:e.ptm("input"),unstyled:e.unstyled}),null,16,["id","class","style","value","aria-valuemin","aria-valuemax","aria-valuenow","disabled","readonly","placeholder","aria-labelledby","aria-label","aria-invalid","onInput","onKeydown","onKeypress","onPaste","onClick","onFocus","onBlur","pt","unstyled"]),e.showButtons&&"stacked"===e.buttonLayout?(o(),c("span",h({key:0,class:e.cx("buttonGroup")},e.ptm("buttonGroup")),[p(u,h({class:[e.cx("incrementButton"),e.incrementButtonClass]},d(s.upButtonListeners),{disabled:e.disabled,tabindex:-1,"aria-hidden":"true"},e.incrementButtonProps,{pt:e.ptm("incrementButton"),unstyled:e.unstyled}),{icon:f((function(){return[m(e.$slots,"incrementbuttonicon",{},(function(){return[(o(),g(y(e.incrementButtonIcon?"span":"AngleUpIcon"),h({class:e.incrementButtonIcon},e.ptm("incrementButton").icon,{"data-pc-section":"incrementbuttonicon"}),null,16,["class"]))]}))]})),_:3},16,["class","disabled","pt","unstyled"]),p(u,h({class:[e.cx("decrementButton"),e.decrementButtonClass]},d(s.downButtonListeners),{disabled:e.disabled,tabindex:-1,"aria-hidden":"true"},e.decrementButtonProps,{pt:e.ptm("decrementButton"),unstyled:e.unstyled}),{icon:f((function(){return[m(e.$slots,"decrementbuttonicon",{},(function(){return[(o(),g(y(e.decrementButtonIcon?"span":"AngleDownIcon"),h({class:e.decrementButtonIcon},e.ptm("decrementButton").icon,{"data-pc-section":"decrementbuttonicon"}),null,16,["class"]))]}))]})),_:3},16,["class","disabled","pt","unstyled"])],16)):x("",!0),e.showButtons&&"stacked"!==e.buttonLayout?(o(),g(u,h({key:1,class:[e.cx("incrementButton"),e.incrementButtonClass]},d(s.upButtonListeners),{disabled:e.disabled,tabindex:-1,"aria-hidden":"true"},e.incrementButtonProps,{pt:e.ptm("incrementButton"),unstyled:e.unstyled}),{icon:f((function(){return[m(e.$slots,"incrementbuttonicon",{},(function(){return[(o(),g(y(e.incrementButtonIcon?"span":"AngleUpIcon"),h({class:e.incrementButtonIcon},e.ptm("incrementButton").icon,{"data-pc-section":"incrementbuttonicon"}),null,16,["class"]))]}))]})),_:3},16,["class","disabled","pt","unstyled"])):x("",!0),e.showButtons&&"stacked"!==e.buttonLayout?(o(),g(u,h({key:2,class:[e.cx("decrementButton"),e.decrementButtonClass]},d(s.downButtonListeners),{disabled:e.disabled,tabindex:-1,"aria-hidden":"true"},e.decrementButtonProps,{pt:e.ptm("decrementButton"),unstyled:e.unstyled}),{icon:f((function(){return[m(e.$slots,"decrementbuttonicon",{},(function(){return[(o(),g(y(e.decrementButtonIcon?"span":"AngleDownIcon"),h({class:e.decrementButtonIcon},e.ptm("decrementButton").icon,{"data-pc-section":"decrementbuttonicon"}),null,16,["class"]))]}))]})),_:3},16,["class","disabled","pt","unstyled"])):x("",!0)],16)};export{V as default};
|
|
@@ -190,6 +190,7 @@ this.primevue.inputnumber = (function (Button, AngleDownIcon, AngleUpIcon, Input
|
|
|
190
190
|
var script = {
|
|
191
191
|
name: 'InputNumber',
|
|
192
192
|
"extends": script$1,
|
|
193
|
+
inheritAttrs: false,
|
|
193
194
|
emits: ['update:modelValue', 'input', 'focus', 'blur'],
|
|
194
195
|
numberFormat: null,
|
|
195
196
|
_numeral: null,
|
|
@@ -1033,7 +1034,7 @@ this.primevue.inputnumber = (function (Button, AngleDownIcon, AngleUpIcon, Input
|
|
|
1033
1034
|
var _component_INButton = vue.resolveComponent("INButton");
|
|
1034
1035
|
return vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
|
|
1035
1036
|
"class": _ctx.cx('root')
|
|
1036
|
-
}, _ctx.
|
|
1037
|
+
}, _ctx.ptmi('root')), [vue.createVNode(_component_INInputText, vue.mergeProps({
|
|
1037
1038
|
ref: "input",
|
|
1038
1039
|
id: _ctx.inputId,
|
|
1039
1040
|
role: "spinbutton",
|
|
@@ -1048,6 +1049,7 @@ this.primevue.inputnumber = (function (Button, AngleDownIcon, AngleUpIcon, Input
|
|
|
1048
1049
|
placeholder: _ctx.placeholder,
|
|
1049
1050
|
"aria-labelledby": _ctx.ariaLabelledby,
|
|
1050
1051
|
"aria-label": _ctx.ariaLabel,
|
|
1052
|
+
"aria-invalid": _ctx.invalid || undefined,
|
|
1051
1053
|
onInput: $options.onUserInput,
|
|
1052
1054
|
onKeydown: $options.onInputKeyDown,
|
|
1053
1055
|
onKeypress: $options.onInputKeyPress,
|
|
@@ -1058,7 +1060,7 @@ this.primevue.inputnumber = (function (Button, AngleDownIcon, AngleUpIcon, Input
|
|
|
1058
1060
|
}, _ctx.inputProps, {
|
|
1059
1061
|
pt: _ctx.ptm('input'),
|
|
1060
1062
|
unstyled: _ctx.unstyled
|
|
1061
|
-
}), null, 16, ["id", "class", "style", "value", "aria-valuemin", "aria-valuemax", "aria-valuenow", "disabled", "readonly", "placeholder", "aria-labelledby", "aria-label", "onInput", "onKeydown", "onKeypress", "onPaste", "onClick", "onFocus", "onBlur", "pt", "unstyled"]), _ctx.showButtons && _ctx.buttonLayout === 'stacked' ? (vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
|
|
1063
|
+
}), null, 16, ["id", "class", "style", "value", "aria-valuemin", "aria-valuemax", "aria-valuenow", "disabled", "readonly", "placeholder", "aria-labelledby", "aria-label", "aria-invalid", "onInput", "onKeydown", "onKeypress", "onPaste", "onClick", "onFocus", "onBlur", "pt", "unstyled"]), _ctx.showButtons && _ctx.buttonLayout === 'stacked' ? (vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
|
|
1062
1064
|
key: 0,
|
|
1063
1065
|
"class": _ctx.cx('buttonGroup')
|
|
1064
1066
|
}, _ctx.ptm('buttonGroup')), [vue.createVNode(_component_INButton, vue.mergeProps({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.inputnumber=function(e,t,n,i,r,s,a,l){"use strict";function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=u(e),c=u(t),h=u(n),p=u(i);function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e,t,n){var i;return(t="symbol"==d(i=y(t,"string"))?i:String(i))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e,t){if("object"!=d(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=d(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function x(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function v(e,t){if(e){if("string"==typeof e)return I(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?I(e,t):void 0}}function b(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function C(e){if(Array.isArray(e))return I(e)}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var B={name:"InputNumber",extends:{name:"BaseInputNumber",extends:u(s).default,props:{modelValue:{type:Number,default:null},format:{type:Boolean,default:!0},showButtons:{type:Boolean,default:!1},buttonLayout:{type:String,default:"stacked"},incrementButtonClass:{type:String,default:null},decrementButtonClass:{type:String,default:null},incrementButtonIcon:{type:String,default:void 0},decrementButtonIcon:{type:String,default:void 0},locale:{type:String,default:void 0},localeMatcher:{type:String,default:void 0},mode:{type:String,default:"decimal"},prefix:{type:String,default:null},suffix:{type:String,default:null},currency:{type:String,default:void 0},currencyDisplay:{type:String,default:void 0},useGrouping:{type:Boolean,default:!0},minFractionDigits:{type:Number,default:void 0},maxFractionDigits:{type:Number,default:void 0},roundingMode:{type:String,default:"halfExpand",validator:function(e){return["ceil","floor","expand","trunc","halfCeil","halfFloor","halfExpand","halfTrunc","halfEven"].includes(e)}},min:{type:Number,default:null},max:{type:Number,default:null},step:{type:Number,default:1},allowEmpty:{type:Boolean,default:!0},highlightOnFocus:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},variant:{type:String,default:null},invalid:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},incrementButtonProps:{type:null,default:null},decrementButtonProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:u(a).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","input","focus","blur"],numberFormat:null,_numeral:null,_decimal:null,_group:null,_minusSign:null,_currency:null,_suffix:null,_prefix:null,_index:null,groupChar:"",isSpecialChar:null,prefixChar:null,suffixChar:null,timer:null,data:function(){return{d_modelValue:this.modelValue,focused:!1}},watch:{modelValue:function(e){this.d_modelValue=e},locale:function(e,t){this.updateConstructParser(e,t)},localeMatcher:function(e,t){this.updateConstructParser(e,t)},mode:function(e,t){this.updateConstructParser(e,t)},currency:function(e,t){this.updateConstructParser(e,t)},currencyDisplay:function(e,t){this.updateConstructParser(e,t)},useGrouping:function(e,t){this.updateConstructParser(e,t)},minFractionDigits:function(e,t){this.updateConstructParser(e,t)},maxFractionDigits:function(e,t){this.updateConstructParser(e,t)},suffix:function(e,t){this.updateConstructParser(e,t)},prefix:function(e,t){this.updateConstructParser(e,t)}},created:function(){this.constructParser()},methods:{getOptions:function(){return{localeMatcher:this.localeMatcher,style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,useGrouping:this.useGrouping,minimumFractionDigits:this.minFractionDigits,maximumFractionDigits:this.maxFractionDigits,roundingMode:this.roundingMode}},constructParser:function(){this.numberFormat=new Intl.NumberFormat(this.locale,this.getOptions());var e,t=(e=new Intl.NumberFormat(this.locale,{useGrouping:!1}).format(9876543210),C(e)||b(e)||v(e)||x()).reverse(),n=new Map(t.map((function(e,t){return[e,t]})));this._numeral=new RegExp("[".concat(t.join(""),"]"),"g"),this._group=this.getGroupingExpression(),this._minusSign=this.getMinusSignExpression(),this._currency=this.getCurrencyExpression(),this._decimal=this.getDecimalExpression(),this._suffix=this.getSuffixExpression(),this._prefix=this.getPrefixExpression(),this._index=function(e){return n.get(e)}},updateConstructParser:function(e,t){e!==t&&this.constructParser()},escapeRegExp:function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},getDecimalExpression:function(){var e=new Intl.NumberFormat(this.locale,m(m({},this.getOptions()),{},{useGrouping:!1}));return new RegExp("[".concat(e.format(1.1).replace(this._currency,"").trim().replace(this._numeral,""),"]"),"g")},getGroupingExpression:function(){var e=new Intl.NumberFormat(this.locale,{useGrouping:!0});return this.groupChar=e.format(1e6).trim().replace(this._numeral,"").charAt(0),new RegExp("[".concat(this.groupChar,"]"),"g")},getMinusSignExpression:function(){var e=new Intl.NumberFormat(this.locale,{useGrouping:!1});return new RegExp("[".concat(e.format(-1).trim().replace(this._numeral,""),"]"),"g")},getCurrencyExpression:function(){if(this.currency){var e=new Intl.NumberFormat(this.locale,{style:"currency",currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0,roundingMode:this.roundingMode});return new RegExp("[".concat(e.format(1).replace(/\s/g,"").replace(this._numeral,"").replace(this._group,""),"]"),"g")}return new RegExp("[]","g")},getPrefixExpression:function(){if(this.prefix)this.prefixChar=this.prefix;else{var e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay});this.prefixChar=e.format(1).split("1")[0]}return new RegExp("".concat(this.escapeRegExp(this.prefixChar||"")),"g")},getSuffixExpression:function(){if(this.suffix)this.suffixChar=this.suffix;else{var e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0,roundingMode:this.roundingMode});this.suffixChar=e.format(1).split("1")[1]}return new RegExp("".concat(this.escapeRegExp(this.suffixChar||"")),"g")},formatValue:function(e){if(null!=e){if("-"===e)return e;if(this.format){var t=new Intl.NumberFormat(this.locale,this.getOptions()).format(e);return this.prefix&&(t=this.prefix+t),this.suffix&&(t+=this.suffix),t}return e.toString()}return""},parseValue:function(e){var t=e.replace(this._suffix,"").replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,"").replace(this._group,"").replace(this._minusSign,"-").replace(this._decimal,".").replace(this._numeral,this._index);if(t){if("-"===t)return t;var n=+t;return isNaN(n)?null:n}return null},repeat:function(e,t,n){var i=this;if(!this.readonly){var r=t||500;this.clearTimer(),this.timer=setTimeout((function(){i.repeat(e,40,n)}),r),this.spin(e,n)}},spin:function(e,t){if(this.$refs.input){var n=this.step*t,i=this.parseValue(this.$refs.input.$el.value)||0,r=this.validateValue(i+n);this.updateInput(r,null,"spin"),this.updateModel(e,r),this.handleOnInput(e,i,r)}},onUpButtonMouseDown:function(e){this.disabled||(this.$refs.input.$el.focus(),this.repeat(e,null,1),e.preventDefault())},onUpButtonMouseUp:function(){this.disabled||this.clearTimer()},onUpButtonMouseLeave:function(){this.disabled||this.clearTimer()},onUpButtonKeyUp:function(){this.disabled||this.clearTimer()},onUpButtonKeyDown:function(e){32!==e.keyCode&&13!==e.keyCode||this.repeat(e,null,1)},onDownButtonMouseDown:function(e){this.disabled||(this.$refs.input.$el.focus(),this.repeat(e,null,-1),e.preventDefault())},onDownButtonMouseUp:function(){this.disabled||this.clearTimer()},onDownButtonMouseLeave:function(){this.disabled||this.clearTimer()},onDownButtonKeyUp:function(){this.disabled||this.clearTimer()},onDownButtonKeyDown:function(e){32!==e.keyCode&&13!==e.keyCode||this.repeat(e,null,-1)},onUserInput:function(){this.isSpecialChar&&(this.$refs.input.$el.value=this.lastValue),this.isSpecialChar=!1},onInputKeyDown:function(e){if(!this.readonly)if(this.lastValue=e.target.value,e.shiftKey||e.altKey)this.isSpecialChar=!0;else{var t=e.target.selectionStart,n=e.target.selectionEnd,i=e.target.value,s=null;switch(e.altKey&&e.preventDefault(),e.code){case"ArrowUp":this.spin(e,1),e.preventDefault();break;case"ArrowDown":this.spin(e,-1),e.preventDefault();break;case"ArrowLeft":this.isNumeralChar(i.charAt(t-1))||e.preventDefault();break;case"ArrowRight":this.isNumeralChar(i.charAt(t))||e.preventDefault();break;case"Tab":case"Enter":case"NumpadEnter":s=this.validateValue(this.parseValue(i)),this.$refs.input.$el.value=this.formatValue(s),this.$refs.input.$el.setAttribute("aria-valuenow",s),this.updateModel(e,s);break;case"Backspace":if(e.preventDefault(),t===n){var a=i.charAt(t-1),l=this.getDecimalCharIndexes(i),u=l.decimalCharIndex,o=l.decimalCharIndexWithoutPrefix;if(this.isNumeralChar(a)){var c=this.getDecimalLength(i);if(this._group.test(a))this._group.lastIndex=0,s=i.slice(0,t-2)+i.slice(t-1);else if(this._decimal.test(a))this._decimal.lastIndex=0,c?this.$refs.input.$el.setSelectionRange(t-1,t-1):s=i.slice(0,t-1)+i.slice(t);else if(u>0&&t>u){var h=this.isDecimalMode()&&(this.minFractionDigits||0)<c?"":"0";s=i.slice(0,t-1)+h+i.slice(t)}else 1===o?(s=i.slice(0,t-1)+"0"+i.slice(t),s=this.parseValue(s)>0?s:""):s=i.slice(0,t-1)+i.slice(t)}this.updateValue(e,s,null,"delete-single")}else s=this.deleteRange(i,t,n),this.updateValue(e,s,null,"delete-range");break;case"Delete":if(e.preventDefault(),t===n){var p=i.charAt(t),d=this.getDecimalCharIndexes(i),f=d.decimalCharIndex,m=d.decimalCharIndexWithoutPrefix;if(this.isNumeralChar(p)){var g=this.getDecimalLength(i);if(this._group.test(p))this._group.lastIndex=0,s=i.slice(0,t)+i.slice(t+2);else if(this._decimal.test(p))this._decimal.lastIndex=0,g?this.$refs.input.$el.setSelectionRange(t+1,t+1):s=i.slice(0,t)+i.slice(t+1);else if(f>0&&t>f){var y=this.isDecimalMode()&&(this.minFractionDigits||0)<g?"":"0";s=i.slice(0,t)+y+i.slice(t+1)}else 1===m?(s=i.slice(0,t)+"0"+i.slice(t+1),s=this.parseValue(s)>0?s:""):s=i.slice(0,t)+i.slice(t+1)}this.updateValue(e,s,null,"delete-back-single")}else s=this.deleteRange(i,t,n),this.updateValue(e,s,null,"delete-range");break;case"Home":e.preventDefault(),r.ObjectUtils.isEmpty(this.min)||this.updateModel(e,this.min);break;case"End":e.preventDefault(),r.ObjectUtils.isEmpty(this.max)||this.updateModel(e,this.max)}}},onInputKeyPress:function(e){if(!this.readonly){e.preventDefault();var t=e.which||e.keyCode,n=String.fromCharCode(t),i=this.isDecimalSign(n),r=this.isMinusSign(n);(48<=t&&t<=57||r||i)&&this.insert(e,n,{isDecimalSign:i,isMinusSign:r})}},onPaste:function(e){e.preventDefault();var t=(e.clipboardData||window.clipboardData).getData("Text");if(t){var n=this.parseValue(t);null!=n&&this.insert(e,n.toString())}},allowMinusSign:function(){return null===this.min||this.min<0},isMinusSign:function(e){return!(!this._minusSign.test(e)&&"-"!==e)&&(this._minusSign.lastIndex=0,!0)},isDecimalSign:function(e){return!!this._decimal.test(e)&&(this._decimal.lastIndex=0,!0)},isDecimalMode:function(){return"decimal"===this.mode},getDecimalCharIndexes:function(e){var t=e.search(this._decimal);this._decimal.lastIndex=0;var n=e.replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,"").search(this._decimal);return this._decimal.lastIndex=0,{decimalCharIndex:t,decimalCharIndexWithoutPrefix:n}},getCharIndexes:function(e){var t=e.search(this._decimal);this._decimal.lastIndex=0;var n=e.search(this._minusSign);this._minusSign.lastIndex=0;var i=e.search(this._suffix);this._suffix.lastIndex=0;var r=e.search(this._currency);return this._currency.lastIndex=0,{decimalCharIndex:t,minusCharIndex:n,suffixCharIndex:i,currencyCharIndex:r}},insert:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{isDecimalSign:!1,isMinusSign:!1},i=t.search(this._minusSign);if(this._minusSign.lastIndex=0,this.allowMinusSign()||-1===i){var r,s=this.$refs.input.$el.selectionStart,a=this.$refs.input.$el.selectionEnd,l=this.$refs.input.$el.value.trim(),u=this.getCharIndexes(l),o=u.decimalCharIndex,c=u.suffixCharIndex,h=u.currencyCharIndex;if(n.isMinusSign)0===s&&(r=l,-1!==u.minusCharIndex&&0===a||(r=this.insertText(l,t,0,a)),this.updateValue(e,r,t,"insert"));else if(n.isDecimalSign)o>0&&s===o?this.updateValue(e,l,t,"insert"):(o>s&&o<a||-1===o&&this.maxFractionDigits)&&(r=this.insertText(l,t,s,a),this.updateValue(e,r,t,"insert"));else{var p=this.numberFormat.resolvedOptions().maximumFractionDigits,d=s!==a?"range-insert":"insert";if(o>0&&s>o){if(s+t.length-(o+1)<=p){var f=h>=s?h-1:c>=s?c:l.length;r=l.slice(0,s)+t+l.slice(s+t.length,f)+l.slice(f),this.updateValue(e,r,t,d)}}else r=this.insertText(l,t,s,a),this.updateValue(e,r,t,d)}}},insertText:function(e,t,n,i){if(2===("."===t?t:t.split(".")).length){var r=e.slice(n,i).search(this._decimal);return this._decimal.lastIndex=0,r>0?e.slice(0,n)+this.formatValue(t)+e.slice(i):this.formatValue(t)||e}return i-n===e.length?this.formatValue(t):0===n?t+e.slice(i):i===e.length?e.slice(0,n)+t:e.slice(0,n)+t+e.slice(i)},deleteRange:function(e,t,n){return n-t===e.length?"":0===t?e.slice(n):n===e.length?e.slice(0,t):e.slice(0,t)+e.slice(n)},initCursor:function(){var e=this.$refs.input.$el.selectionStart,t=this.$refs.input.$el.value,n=t.length,i=null,r=(this.prefixChar||"").length,s=(t=t.replace(this._prefix,"")).charAt(e-=r);if(this.isNumeralChar(s))return e+r;for(var a=e-1;a>=0;){if(s=t.charAt(a),this.isNumeralChar(s)){i=a+r;break}a--}if(null!==i)this.$refs.input.$el.setSelectionRange(i+1,i+1);else{for(a=e;a<n;){if(s=t.charAt(a),this.isNumeralChar(s)){i=a+r;break}a++}null!==i&&this.$refs.input.$el.setSelectionRange(i,i)}return i||0},onInputClick:function(){this.readonly||this.$refs.input.$el.value===r.DomHandler.getSelection()||this.initCursor()},isNumeralChar:function(e){return!(1!==e.length||!(this._numeral.test(e)||this._decimal.test(e)||this._group.test(e)||this._minusSign.test(e)))&&(this.resetRegex(),!0)},resetRegex:function(){this._numeral.lastIndex=0,this._decimal.lastIndex=0,this._group.lastIndex=0,this._minusSign.lastIndex=0},updateValue:function(e,t,n,i){var r=this.$refs.input.$el.value,s=null;null!=t&&(s=this.parseValue(t),this.updateInput(s=s||this.allowEmpty?s:0,n,i,t),this.handleOnInput(e,r,s))},handleOnInput:function(e,t,n){this.isValueChanged(t,n)&&this.$emit("input",{originalEvent:e,value:n,formattedValue:t})},isValueChanged:function(e,t){return null===t&&null!==e||null!=t&&t!==("string"==typeof e?this.parseValue(e):e)},validateValue:function(e){return"-"===e||null==e?null:null!=this.min&&e<this.min?this.min:null!=this.max&&e>this.max?this.max:e},updateInput:function(e,t,n,i){t=t||"";var r=this.$refs.input.$el.value,s=this.formatValue(e),a=r.length;if(s!==i&&(s=this.concatValues(s,i)),0===a){this.$refs.input.$el.value=s,this.$refs.input.$el.setSelectionRange(0,0);var l=this.initCursor()+t.length;this.$refs.input.$el.setSelectionRange(l,l)}else{var u=this.$refs.input.$el.selectionStart,o=this.$refs.input.$el.selectionEnd;this.$refs.input.$el.value=s;var c=s.length;if("range-insert"===n){var h=this.parseValue((r||"").slice(0,u)),p=(null!==h?h.toString():"").split("").join("(".concat(this.groupChar,")?")),d=new RegExp(p,"g");d.test(s);var f=t.split("").join("(".concat(this.groupChar,")?")),m=new RegExp(f,"g");m.test(s.slice(d.lastIndex)),this.$refs.input.$el.setSelectionRange(o=d.lastIndex+m.lastIndex,o)}else if(c===a)if("insert"===n||"delete-back-single"===n){var g=/[.,]/g,y=o+Number(g.test(e)||g.test(t));this.$refs.input.$el.setSelectionRange(y,y)}else"delete-single"===n?this.$refs.input.$el.setSelectionRange(o-1,o-1):"delete-range"!==n&&"spin"!==n||this.$refs.input.$el.setSelectionRange(o,o);else if("delete-back-single"===n){var x=r.charAt(o-1),v=r.charAt(o),b=a-c,C=this._group.test(v);C&&1===b?o+=1:!C&&this.isNumeralChar(x)&&(o+=-1*b+1),this._group.lastIndex=0,this.$refs.input.$el.setSelectionRange(o,o)}else if("-"===r&&"insert"===n){this.$refs.input.$el.setSelectionRange(0,0);var I=this.initCursor()+t.length+1;this.$refs.input.$el.setSelectionRange(I,I)}else this.$refs.input.$el.setSelectionRange(o+=c-a,o)}this.$refs.input.$el.setAttribute("aria-valuenow",e)},concatValues:function(e,t){if(e&&t){var n=t.search(this._decimal);return this._decimal.lastIndex=0,this.suffixChar?-1!==n?e.replace(this.suffixChar,"").split(this._decimal)[0]+t.replace(this.suffixChar,"").slice(n)+this.suffixChar:e:-1!==n?e.split(this._decimal)[0]+t.slice(n):e}return e},getDecimalLength:function(e){if(e){var t=e.split(this._decimal);if(2===t.length)return t[1].replace(this._suffix,"").trim().replace(/\s/g,"").replace(this._currency,"").length}return 0},updateModel:function(e,t){this.d_modelValue=t,this.$emit("update:modelValue",t)},onInputFocus:function(e){this.focused=!0,this.disabled||this.readonly||this.$refs.input.$el.value===r.DomHandler.getSelection()||!this.highlightOnFocus||e.target.select(),this.$emit("focus",e)},onInputBlur:function(e){this.focused=!1;var t=e.target,n=this.validateValue(this.parseValue(t.value));this.$emit("blur",{originalEvent:e,value:t.value}),t.value=this.formatValue(n),t.setAttribute("aria-valuenow",n),this.updateModel(e,n),this.disabled||this.readonly||!this.highlightOnFocus||r.DomHandler.clearSelection()},clearTimer:function(){this.timer&&clearInterval(this.timer)},maxBoundry:function(){return this.d_modelValue>=this.max},minBoundry:function(){return this.d_modelValue<=this.min}},computed:{filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0},upButtonListeners:function(){var e=this;return{mousedown:function(t){return e.onUpButtonMouseDown(t)},mouseup:function(t){return e.onUpButtonMouseUp(t)},mouseleave:function(t){return e.onUpButtonMouseLeave(t)},keydown:function(t){return e.onUpButtonKeyDown(t)},keyup:function(t){return e.onUpButtonKeyUp(t)}}},downButtonListeners:function(){var e=this;return{mousedown:function(t){return e.onDownButtonMouseDown(t)},mouseup:function(t){return e.onDownButtonMouseUp(t)},mouseleave:function(t){return e.onDownButtonMouseLeave(t)},keydown:function(t){return e.onDownButtonKeyDown(t)},keyup:function(t){return e.onDownButtonKeyUp(t)}}},formattedValue:function(){return this.formatValue(this.modelValue||this.allowEmpty?this.modelValue:0)},getFormatter:function(){return this.numberFormat}},components:{INInputText:p.default,INButton:o.default,AngleUpIcon:h.default,AngleDownIcon:c.default}};return B.render=function(e,t,n,i,r,s){var a=l.resolveComponent("INInputText"),u=l.resolveComponent("INButton");return l.openBlock(),l.createElementBlock("span",l.mergeProps({class:e.cx("root")},e.ptm("root")),[l.createVNode(a,l.mergeProps({ref:"input",id:e.inputId,role:"spinbutton",class:[e.cx("input"),e.inputClass],style:e.inputStyle,value:s.formattedValue,"aria-valuemin":e.min,"aria-valuemax":e.max,"aria-valuenow":e.modelValue,disabled:e.disabled,readonly:e.readonly,placeholder:e.placeholder,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,onInput:s.onUserInput,onKeydown:s.onInputKeyDown,onKeypress:s.onInputKeyPress,onPaste:s.onPaste,onClick:s.onInputClick,onFocus:s.onInputFocus,onBlur:s.onInputBlur},e.inputProps,{pt:e.ptm("input"),unstyled:e.unstyled}),null,16,["id","class","style","value","aria-valuemin","aria-valuemax","aria-valuenow","disabled","readonly","placeholder","aria-labelledby","aria-label","onInput","onKeydown","onKeypress","onPaste","onClick","onFocus","onBlur","pt","unstyled"]),e.showButtons&&"stacked"===e.buttonLayout?(l.openBlock(),l.createElementBlock("span",l.mergeProps({key:0,class:e.cx("buttonGroup")},e.ptm("buttonGroup")),[l.createVNode(u,l.mergeProps({class:[e.cx("incrementButton"),e.incrementButtonClass]},l.toHandlers(s.upButtonListeners),{disabled:e.disabled,tabindex:-1,"aria-hidden":"true"},e.incrementButtonProps,{pt:e.ptm("incrementButton"),unstyled:e.unstyled}),{icon:l.withCtx((function(){return[l.renderSlot(e.$slots,"incrementbuttonicon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.incrementButtonIcon?"span":"AngleUpIcon"),l.mergeProps({class:e.incrementButtonIcon},e.ptm("incrementButton").icon,{"data-pc-section":"incrementbuttonicon"}),null,16,["class"]))]}))]})),_:3},16,["class","disabled","pt","unstyled"]),l.createVNode(u,l.mergeProps({class:[e.cx("decrementButton"),e.decrementButtonClass]},l.toHandlers(s.downButtonListeners),{disabled:e.disabled,tabindex:-1,"aria-hidden":"true"},e.decrementButtonProps,{pt:e.ptm("decrementButton"),unstyled:e.unstyled}),{icon:l.withCtx((function(){return[l.renderSlot(e.$slots,"decrementbuttonicon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.decrementButtonIcon?"span":"AngleDownIcon"),l.mergeProps({class:e.decrementButtonIcon},e.ptm("decrementButton").icon,{"data-pc-section":"decrementbuttonicon"}),null,16,["class"]))]}))]})),_:3},16,["class","disabled","pt","unstyled"])],16)):l.createCommentVNode("",!0),e.showButtons&&"stacked"!==e.buttonLayout?(l.openBlock(),l.createBlock(u,l.mergeProps({key:1,class:[e.cx("incrementButton"),e.incrementButtonClass]},l.toHandlers(s.upButtonListeners),{disabled:e.disabled,tabindex:-1,"aria-hidden":"true"},e.incrementButtonProps,{pt:e.ptm("incrementButton"),unstyled:e.unstyled}),{icon:l.withCtx((function(){return[l.renderSlot(e.$slots,"incrementbuttonicon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.incrementButtonIcon?"span":"AngleUpIcon"),l.mergeProps({class:e.incrementButtonIcon},e.ptm("incrementButton").icon,{"data-pc-section":"incrementbuttonicon"}),null,16,["class"]))]}))]})),_:3},16,["class","disabled","pt","unstyled"])):l.createCommentVNode("",!0),e.showButtons&&"stacked"!==e.buttonLayout?(l.openBlock(),l.createBlock(u,l.mergeProps({key:2,class:[e.cx("decrementButton"),e.decrementButtonClass]},l.toHandlers(s.downButtonListeners),{disabled:e.disabled,tabindex:-1,"aria-hidden":"true"},e.decrementButtonProps,{pt:e.ptm("decrementButton"),unstyled:e.unstyled}),{icon:l.withCtx((function(){return[l.renderSlot(e.$slots,"decrementbuttonicon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.decrementButtonIcon?"span":"AngleDownIcon"),l.mergeProps({class:e.decrementButtonIcon},e.ptm("decrementButton").icon,{"data-pc-section":"decrementbuttonicon"}),null,16,["class"]))]}))]})),_:3},16,["class","disabled","pt","unstyled"])):l.createCommentVNode("",!0)],16)},B}(primevue.button,primevue.icons.angledown,primevue.icons.angleup,primevue.inputtext,primevue.utils,primevue.basecomponent,primevue.inputnumber.style,Vue);
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.inputnumber=function(e,t,n,i,r,s,a,l){"use strict";function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=u(e),c=u(t),h=u(n),p=u(i);function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e,t,n){var i;return(t="symbol"==d(i=y(t,"string"))?i:String(i))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e,t){if("object"!=d(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=d(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function x(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function v(e,t){if(e){if("string"==typeof e)return I(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?I(e,t):void 0}}function b(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function C(e){if(Array.isArray(e))return I(e)}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var B={name:"InputNumber",extends:{name:"BaseInputNumber",extends:u(s).default,props:{modelValue:{type:Number,default:null},format:{type:Boolean,default:!0},showButtons:{type:Boolean,default:!1},buttonLayout:{type:String,default:"stacked"},incrementButtonClass:{type:String,default:null},decrementButtonClass:{type:String,default:null},incrementButtonIcon:{type:String,default:void 0},decrementButtonIcon:{type:String,default:void 0},locale:{type:String,default:void 0},localeMatcher:{type:String,default:void 0},mode:{type:String,default:"decimal"},prefix:{type:String,default:null},suffix:{type:String,default:null},currency:{type:String,default:void 0},currencyDisplay:{type:String,default:void 0},useGrouping:{type:Boolean,default:!0},minFractionDigits:{type:Number,default:void 0},maxFractionDigits:{type:Number,default:void 0},roundingMode:{type:String,default:"halfExpand",validator:function(e){return["ceil","floor","expand","trunc","halfCeil","halfFloor","halfExpand","halfTrunc","halfEven"].includes(e)}},min:{type:Number,default:null},max:{type:Number,default:null},step:{type:Number,default:1},allowEmpty:{type:Boolean,default:!0},highlightOnFocus:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},variant:{type:String,default:null},invalid:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},incrementButtonProps:{type:null,default:null},decrementButtonProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:u(a).default,provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["update:modelValue","input","focus","blur"],numberFormat:null,_numeral:null,_decimal:null,_group:null,_minusSign:null,_currency:null,_suffix:null,_prefix:null,_index:null,groupChar:"",isSpecialChar:null,prefixChar:null,suffixChar:null,timer:null,data:function(){return{d_modelValue:this.modelValue,focused:!1}},watch:{modelValue:function(e){this.d_modelValue=e},locale:function(e,t){this.updateConstructParser(e,t)},localeMatcher:function(e,t){this.updateConstructParser(e,t)},mode:function(e,t){this.updateConstructParser(e,t)},currency:function(e,t){this.updateConstructParser(e,t)},currencyDisplay:function(e,t){this.updateConstructParser(e,t)},useGrouping:function(e,t){this.updateConstructParser(e,t)},minFractionDigits:function(e,t){this.updateConstructParser(e,t)},maxFractionDigits:function(e,t){this.updateConstructParser(e,t)},suffix:function(e,t){this.updateConstructParser(e,t)},prefix:function(e,t){this.updateConstructParser(e,t)}},created:function(){this.constructParser()},methods:{getOptions:function(){return{localeMatcher:this.localeMatcher,style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,useGrouping:this.useGrouping,minimumFractionDigits:this.minFractionDigits,maximumFractionDigits:this.maxFractionDigits,roundingMode:this.roundingMode}},constructParser:function(){this.numberFormat=new Intl.NumberFormat(this.locale,this.getOptions());var e,t=(e=new Intl.NumberFormat(this.locale,{useGrouping:!1}).format(9876543210),C(e)||b(e)||v(e)||x()).reverse(),n=new Map(t.map((function(e,t){return[e,t]})));this._numeral=new RegExp("[".concat(t.join(""),"]"),"g"),this._group=this.getGroupingExpression(),this._minusSign=this.getMinusSignExpression(),this._currency=this.getCurrencyExpression(),this._decimal=this.getDecimalExpression(),this._suffix=this.getSuffixExpression(),this._prefix=this.getPrefixExpression(),this._index=function(e){return n.get(e)}},updateConstructParser:function(e,t){e!==t&&this.constructParser()},escapeRegExp:function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},getDecimalExpression:function(){var e=new Intl.NumberFormat(this.locale,m(m({},this.getOptions()),{},{useGrouping:!1}));return new RegExp("[".concat(e.format(1.1).replace(this._currency,"").trim().replace(this._numeral,""),"]"),"g")},getGroupingExpression:function(){var e=new Intl.NumberFormat(this.locale,{useGrouping:!0});return this.groupChar=e.format(1e6).trim().replace(this._numeral,"").charAt(0),new RegExp("[".concat(this.groupChar,"]"),"g")},getMinusSignExpression:function(){var e=new Intl.NumberFormat(this.locale,{useGrouping:!1});return new RegExp("[".concat(e.format(-1).trim().replace(this._numeral,""),"]"),"g")},getCurrencyExpression:function(){if(this.currency){var e=new Intl.NumberFormat(this.locale,{style:"currency",currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0,roundingMode:this.roundingMode});return new RegExp("[".concat(e.format(1).replace(/\s/g,"").replace(this._numeral,"").replace(this._group,""),"]"),"g")}return new RegExp("[]","g")},getPrefixExpression:function(){if(this.prefix)this.prefixChar=this.prefix;else{var e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay});this.prefixChar=e.format(1).split("1")[0]}return new RegExp("".concat(this.escapeRegExp(this.prefixChar||"")),"g")},getSuffixExpression:function(){if(this.suffix)this.suffixChar=this.suffix;else{var e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0,roundingMode:this.roundingMode});this.suffixChar=e.format(1).split("1")[1]}return new RegExp("".concat(this.escapeRegExp(this.suffixChar||"")),"g")},formatValue:function(e){if(null!=e){if("-"===e)return e;if(this.format){var t=new Intl.NumberFormat(this.locale,this.getOptions()).format(e);return this.prefix&&(t=this.prefix+t),this.suffix&&(t+=this.suffix),t}return e.toString()}return""},parseValue:function(e){var t=e.replace(this._suffix,"").replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,"").replace(this._group,"").replace(this._minusSign,"-").replace(this._decimal,".").replace(this._numeral,this._index);if(t){if("-"===t)return t;var n=+t;return isNaN(n)?null:n}return null},repeat:function(e,t,n){var i=this;if(!this.readonly){var r=t||500;this.clearTimer(),this.timer=setTimeout((function(){i.repeat(e,40,n)}),r),this.spin(e,n)}},spin:function(e,t){if(this.$refs.input){var n=this.step*t,i=this.parseValue(this.$refs.input.$el.value)||0,r=this.validateValue(i+n);this.updateInput(r,null,"spin"),this.updateModel(e,r),this.handleOnInput(e,i,r)}},onUpButtonMouseDown:function(e){this.disabled||(this.$refs.input.$el.focus(),this.repeat(e,null,1),e.preventDefault())},onUpButtonMouseUp:function(){this.disabled||this.clearTimer()},onUpButtonMouseLeave:function(){this.disabled||this.clearTimer()},onUpButtonKeyUp:function(){this.disabled||this.clearTimer()},onUpButtonKeyDown:function(e){32!==e.keyCode&&13!==e.keyCode||this.repeat(e,null,1)},onDownButtonMouseDown:function(e){this.disabled||(this.$refs.input.$el.focus(),this.repeat(e,null,-1),e.preventDefault())},onDownButtonMouseUp:function(){this.disabled||this.clearTimer()},onDownButtonMouseLeave:function(){this.disabled||this.clearTimer()},onDownButtonKeyUp:function(){this.disabled||this.clearTimer()},onDownButtonKeyDown:function(e){32!==e.keyCode&&13!==e.keyCode||this.repeat(e,null,-1)},onUserInput:function(){this.isSpecialChar&&(this.$refs.input.$el.value=this.lastValue),this.isSpecialChar=!1},onInputKeyDown:function(e){if(!this.readonly)if(this.lastValue=e.target.value,e.shiftKey||e.altKey)this.isSpecialChar=!0;else{var t=e.target.selectionStart,n=e.target.selectionEnd,i=e.target.value,s=null;switch(e.altKey&&e.preventDefault(),e.code){case"ArrowUp":this.spin(e,1),e.preventDefault();break;case"ArrowDown":this.spin(e,-1),e.preventDefault();break;case"ArrowLeft":this.isNumeralChar(i.charAt(t-1))||e.preventDefault();break;case"ArrowRight":this.isNumeralChar(i.charAt(t))||e.preventDefault();break;case"Tab":case"Enter":case"NumpadEnter":s=this.validateValue(this.parseValue(i)),this.$refs.input.$el.value=this.formatValue(s),this.$refs.input.$el.setAttribute("aria-valuenow",s),this.updateModel(e,s);break;case"Backspace":if(e.preventDefault(),t===n){var a=i.charAt(t-1),l=this.getDecimalCharIndexes(i),u=l.decimalCharIndex,o=l.decimalCharIndexWithoutPrefix;if(this.isNumeralChar(a)){var c=this.getDecimalLength(i);if(this._group.test(a))this._group.lastIndex=0,s=i.slice(0,t-2)+i.slice(t-1);else if(this._decimal.test(a))this._decimal.lastIndex=0,c?this.$refs.input.$el.setSelectionRange(t-1,t-1):s=i.slice(0,t-1)+i.slice(t);else if(u>0&&t>u){var h=this.isDecimalMode()&&(this.minFractionDigits||0)<c?"":"0";s=i.slice(0,t-1)+h+i.slice(t)}else 1===o?(s=i.slice(0,t-1)+"0"+i.slice(t),s=this.parseValue(s)>0?s:""):s=i.slice(0,t-1)+i.slice(t)}this.updateValue(e,s,null,"delete-single")}else s=this.deleteRange(i,t,n),this.updateValue(e,s,null,"delete-range");break;case"Delete":if(e.preventDefault(),t===n){var p=i.charAt(t),d=this.getDecimalCharIndexes(i),f=d.decimalCharIndex,m=d.decimalCharIndexWithoutPrefix;if(this.isNumeralChar(p)){var g=this.getDecimalLength(i);if(this._group.test(p))this._group.lastIndex=0,s=i.slice(0,t)+i.slice(t+2);else if(this._decimal.test(p))this._decimal.lastIndex=0,g?this.$refs.input.$el.setSelectionRange(t+1,t+1):s=i.slice(0,t)+i.slice(t+1);else if(f>0&&t>f){var y=this.isDecimalMode()&&(this.minFractionDigits||0)<g?"":"0";s=i.slice(0,t)+y+i.slice(t+1)}else 1===m?(s=i.slice(0,t)+"0"+i.slice(t+1),s=this.parseValue(s)>0?s:""):s=i.slice(0,t)+i.slice(t+1)}this.updateValue(e,s,null,"delete-back-single")}else s=this.deleteRange(i,t,n),this.updateValue(e,s,null,"delete-range");break;case"Home":e.preventDefault(),r.ObjectUtils.isEmpty(this.min)||this.updateModel(e,this.min);break;case"End":e.preventDefault(),r.ObjectUtils.isEmpty(this.max)||this.updateModel(e,this.max)}}},onInputKeyPress:function(e){if(!this.readonly){e.preventDefault();var t=e.which||e.keyCode,n=String.fromCharCode(t),i=this.isDecimalSign(n),r=this.isMinusSign(n);(48<=t&&t<=57||r||i)&&this.insert(e,n,{isDecimalSign:i,isMinusSign:r})}},onPaste:function(e){e.preventDefault();var t=(e.clipboardData||window.clipboardData).getData("Text");if(t){var n=this.parseValue(t);null!=n&&this.insert(e,n.toString())}},allowMinusSign:function(){return null===this.min||this.min<0},isMinusSign:function(e){return!(!this._minusSign.test(e)&&"-"!==e)&&(this._minusSign.lastIndex=0,!0)},isDecimalSign:function(e){return!!this._decimal.test(e)&&(this._decimal.lastIndex=0,!0)},isDecimalMode:function(){return"decimal"===this.mode},getDecimalCharIndexes:function(e){var t=e.search(this._decimal);this._decimal.lastIndex=0;var n=e.replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,"").search(this._decimal);return this._decimal.lastIndex=0,{decimalCharIndex:t,decimalCharIndexWithoutPrefix:n}},getCharIndexes:function(e){var t=e.search(this._decimal);this._decimal.lastIndex=0;var n=e.search(this._minusSign);this._minusSign.lastIndex=0;var i=e.search(this._suffix);this._suffix.lastIndex=0;var r=e.search(this._currency);return this._currency.lastIndex=0,{decimalCharIndex:t,minusCharIndex:n,suffixCharIndex:i,currencyCharIndex:r}},insert:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{isDecimalSign:!1,isMinusSign:!1},i=t.search(this._minusSign);if(this._minusSign.lastIndex=0,this.allowMinusSign()||-1===i){var r,s=this.$refs.input.$el.selectionStart,a=this.$refs.input.$el.selectionEnd,l=this.$refs.input.$el.value.trim(),u=this.getCharIndexes(l),o=u.decimalCharIndex,c=u.suffixCharIndex,h=u.currencyCharIndex;if(n.isMinusSign)0===s&&(r=l,-1!==u.minusCharIndex&&0===a||(r=this.insertText(l,t,0,a)),this.updateValue(e,r,t,"insert"));else if(n.isDecimalSign)o>0&&s===o?this.updateValue(e,l,t,"insert"):(o>s&&o<a||-1===o&&this.maxFractionDigits)&&(r=this.insertText(l,t,s,a),this.updateValue(e,r,t,"insert"));else{var p=this.numberFormat.resolvedOptions().maximumFractionDigits,d=s!==a?"range-insert":"insert";if(o>0&&s>o){if(s+t.length-(o+1)<=p){var f=h>=s?h-1:c>=s?c:l.length;r=l.slice(0,s)+t+l.slice(s+t.length,f)+l.slice(f),this.updateValue(e,r,t,d)}}else r=this.insertText(l,t,s,a),this.updateValue(e,r,t,d)}}},insertText:function(e,t,n,i){if(2===("."===t?t:t.split(".")).length){var r=e.slice(n,i).search(this._decimal);return this._decimal.lastIndex=0,r>0?e.slice(0,n)+this.formatValue(t)+e.slice(i):this.formatValue(t)||e}return i-n===e.length?this.formatValue(t):0===n?t+e.slice(i):i===e.length?e.slice(0,n)+t:e.slice(0,n)+t+e.slice(i)},deleteRange:function(e,t,n){return n-t===e.length?"":0===t?e.slice(n):n===e.length?e.slice(0,t):e.slice(0,t)+e.slice(n)},initCursor:function(){var e=this.$refs.input.$el.selectionStart,t=this.$refs.input.$el.value,n=t.length,i=null,r=(this.prefixChar||"").length,s=(t=t.replace(this._prefix,"")).charAt(e-=r);if(this.isNumeralChar(s))return e+r;for(var a=e-1;a>=0;){if(s=t.charAt(a),this.isNumeralChar(s)){i=a+r;break}a--}if(null!==i)this.$refs.input.$el.setSelectionRange(i+1,i+1);else{for(a=e;a<n;){if(s=t.charAt(a),this.isNumeralChar(s)){i=a+r;break}a++}null!==i&&this.$refs.input.$el.setSelectionRange(i,i)}return i||0},onInputClick:function(){this.readonly||this.$refs.input.$el.value===r.DomHandler.getSelection()||this.initCursor()},isNumeralChar:function(e){return!(1!==e.length||!(this._numeral.test(e)||this._decimal.test(e)||this._group.test(e)||this._minusSign.test(e)))&&(this.resetRegex(),!0)},resetRegex:function(){this._numeral.lastIndex=0,this._decimal.lastIndex=0,this._group.lastIndex=0,this._minusSign.lastIndex=0},updateValue:function(e,t,n,i){var r=this.$refs.input.$el.value,s=null;null!=t&&(s=this.parseValue(t),this.updateInput(s=s||this.allowEmpty?s:0,n,i,t),this.handleOnInput(e,r,s))},handleOnInput:function(e,t,n){this.isValueChanged(t,n)&&this.$emit("input",{originalEvent:e,value:n,formattedValue:t})},isValueChanged:function(e,t){return null===t&&null!==e||null!=t&&t!==("string"==typeof e?this.parseValue(e):e)},validateValue:function(e){return"-"===e||null==e?null:null!=this.min&&e<this.min?this.min:null!=this.max&&e>this.max?this.max:e},updateInput:function(e,t,n,i){t=t||"";var r=this.$refs.input.$el.value,s=this.formatValue(e),a=r.length;if(s!==i&&(s=this.concatValues(s,i)),0===a){this.$refs.input.$el.value=s,this.$refs.input.$el.setSelectionRange(0,0);var l=this.initCursor()+t.length;this.$refs.input.$el.setSelectionRange(l,l)}else{var u=this.$refs.input.$el.selectionStart,o=this.$refs.input.$el.selectionEnd;this.$refs.input.$el.value=s;var c=s.length;if("range-insert"===n){var h=this.parseValue((r||"").slice(0,u)),p=(null!==h?h.toString():"").split("").join("(".concat(this.groupChar,")?")),d=new RegExp(p,"g");d.test(s);var f=t.split("").join("(".concat(this.groupChar,")?")),m=new RegExp(f,"g");m.test(s.slice(d.lastIndex)),this.$refs.input.$el.setSelectionRange(o=d.lastIndex+m.lastIndex,o)}else if(c===a)if("insert"===n||"delete-back-single"===n){var g=/[.,]/g,y=o+Number(g.test(e)||g.test(t));this.$refs.input.$el.setSelectionRange(y,y)}else"delete-single"===n?this.$refs.input.$el.setSelectionRange(o-1,o-1):"delete-range"!==n&&"spin"!==n||this.$refs.input.$el.setSelectionRange(o,o);else if("delete-back-single"===n){var x=r.charAt(o-1),v=r.charAt(o),b=a-c,C=this._group.test(v);C&&1===b?o+=1:!C&&this.isNumeralChar(x)&&(o+=-1*b+1),this._group.lastIndex=0,this.$refs.input.$el.setSelectionRange(o,o)}else if("-"===r&&"insert"===n){this.$refs.input.$el.setSelectionRange(0,0);var I=this.initCursor()+t.length+1;this.$refs.input.$el.setSelectionRange(I,I)}else this.$refs.input.$el.setSelectionRange(o+=c-a,o)}this.$refs.input.$el.setAttribute("aria-valuenow",e)},concatValues:function(e,t){if(e&&t){var n=t.search(this._decimal);return this._decimal.lastIndex=0,this.suffixChar?-1!==n?e.replace(this.suffixChar,"").split(this._decimal)[0]+t.replace(this.suffixChar,"").slice(n)+this.suffixChar:e:-1!==n?e.split(this._decimal)[0]+t.slice(n):e}return e},getDecimalLength:function(e){if(e){var t=e.split(this._decimal);if(2===t.length)return t[1].replace(this._suffix,"").trim().replace(/\s/g,"").replace(this._currency,"").length}return 0},updateModel:function(e,t){this.d_modelValue=t,this.$emit("update:modelValue",t)},onInputFocus:function(e){this.focused=!0,this.disabled||this.readonly||this.$refs.input.$el.value===r.DomHandler.getSelection()||!this.highlightOnFocus||e.target.select(),this.$emit("focus",e)},onInputBlur:function(e){this.focused=!1;var t=e.target,n=this.validateValue(this.parseValue(t.value));this.$emit("blur",{originalEvent:e,value:t.value}),t.value=this.formatValue(n),t.setAttribute("aria-valuenow",n),this.updateModel(e,n),this.disabled||this.readonly||!this.highlightOnFocus||r.DomHandler.clearSelection()},clearTimer:function(){this.timer&&clearInterval(this.timer)},maxBoundry:function(){return this.d_modelValue>=this.max},minBoundry:function(){return this.d_modelValue<=this.min}},computed:{filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0},upButtonListeners:function(){var e=this;return{mousedown:function(t){return e.onUpButtonMouseDown(t)},mouseup:function(t){return e.onUpButtonMouseUp(t)},mouseleave:function(t){return e.onUpButtonMouseLeave(t)},keydown:function(t){return e.onUpButtonKeyDown(t)},keyup:function(t){return e.onUpButtonKeyUp(t)}}},downButtonListeners:function(){var e=this;return{mousedown:function(t){return e.onDownButtonMouseDown(t)},mouseup:function(t){return e.onDownButtonMouseUp(t)},mouseleave:function(t){return e.onDownButtonMouseLeave(t)},keydown:function(t){return e.onDownButtonKeyDown(t)},keyup:function(t){return e.onDownButtonKeyUp(t)}}},formattedValue:function(){return this.formatValue(this.modelValue||this.allowEmpty?this.modelValue:0)},getFormatter:function(){return this.numberFormat}},components:{INInputText:p.default,INButton:o.default,AngleUpIcon:h.default,AngleDownIcon:c.default}};return B.render=function(e,t,n,i,r,s){var a=l.resolveComponent("INInputText"),u=l.resolveComponent("INButton");return l.openBlock(),l.createElementBlock("span",l.mergeProps({class:e.cx("root")},e.ptmi("root")),[l.createVNode(a,l.mergeProps({ref:"input",id:e.inputId,role:"spinbutton",class:[e.cx("input"),e.inputClass],style:e.inputStyle,value:s.formattedValue,"aria-valuemin":e.min,"aria-valuemax":e.max,"aria-valuenow":e.modelValue,disabled:e.disabled,readonly:e.readonly,placeholder:e.placeholder,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-invalid":e.invalid||void 0,onInput:s.onUserInput,onKeydown:s.onInputKeyDown,onKeypress:s.onInputKeyPress,onPaste:s.onPaste,onClick:s.onInputClick,onFocus:s.onInputFocus,onBlur:s.onInputBlur},e.inputProps,{pt:e.ptm("input"),unstyled:e.unstyled}),null,16,["id","class","style","value","aria-valuemin","aria-valuemax","aria-valuenow","disabled","readonly","placeholder","aria-labelledby","aria-label","aria-invalid","onInput","onKeydown","onKeypress","onPaste","onClick","onFocus","onBlur","pt","unstyled"]),e.showButtons&&"stacked"===e.buttonLayout?(l.openBlock(),l.createElementBlock("span",l.mergeProps({key:0,class:e.cx("buttonGroup")},e.ptm("buttonGroup")),[l.createVNode(u,l.mergeProps({class:[e.cx("incrementButton"),e.incrementButtonClass]},l.toHandlers(s.upButtonListeners),{disabled:e.disabled,tabindex:-1,"aria-hidden":"true"},e.incrementButtonProps,{pt:e.ptm("incrementButton"),unstyled:e.unstyled}),{icon:l.withCtx((function(){return[l.renderSlot(e.$slots,"incrementbuttonicon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.incrementButtonIcon?"span":"AngleUpIcon"),l.mergeProps({class:e.incrementButtonIcon},e.ptm("incrementButton").icon,{"data-pc-section":"incrementbuttonicon"}),null,16,["class"]))]}))]})),_:3},16,["class","disabled","pt","unstyled"]),l.createVNode(u,l.mergeProps({class:[e.cx("decrementButton"),e.decrementButtonClass]},l.toHandlers(s.downButtonListeners),{disabled:e.disabled,tabindex:-1,"aria-hidden":"true"},e.decrementButtonProps,{pt:e.ptm("decrementButton"),unstyled:e.unstyled}),{icon:l.withCtx((function(){return[l.renderSlot(e.$slots,"decrementbuttonicon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.decrementButtonIcon?"span":"AngleDownIcon"),l.mergeProps({class:e.decrementButtonIcon},e.ptm("decrementButton").icon,{"data-pc-section":"decrementbuttonicon"}),null,16,["class"]))]}))]})),_:3},16,["class","disabled","pt","unstyled"])],16)):l.createCommentVNode("",!0),e.showButtons&&"stacked"!==e.buttonLayout?(l.openBlock(),l.createBlock(u,l.mergeProps({key:1,class:[e.cx("incrementButton"),e.incrementButtonClass]},l.toHandlers(s.upButtonListeners),{disabled:e.disabled,tabindex:-1,"aria-hidden":"true"},e.incrementButtonProps,{pt:e.ptm("incrementButton"),unstyled:e.unstyled}),{icon:l.withCtx((function(){return[l.renderSlot(e.$slots,"incrementbuttonicon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.incrementButtonIcon?"span":"AngleUpIcon"),l.mergeProps({class:e.incrementButtonIcon},e.ptm("incrementButton").icon,{"data-pc-section":"incrementbuttonicon"}),null,16,["class"]))]}))]})),_:3},16,["class","disabled","pt","unstyled"])):l.createCommentVNode("",!0),e.showButtons&&"stacked"!==e.buttonLayout?(l.openBlock(),l.createBlock(u,l.mergeProps({key:2,class:[e.cx("decrementButton"),e.decrementButtonClass]},l.toHandlers(s.downButtonListeners),{disabled:e.disabled,tabindex:-1,"aria-hidden":"true"},e.decrementButtonProps,{pt:e.ptm("decrementButton"),unstyled:e.unstyled}),{icon:l.withCtx((function(){return[l.renderSlot(e.$slots,"decrementbuttonicon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.decrementButtonIcon?"span":"AngleDownIcon"),l.mergeProps({class:e.decrementButtonIcon},e.ptm("decrementButton").icon,{"data-pc-section":"decrementbuttonicon"}),null,16,["class"]))]}))]})),_:3},16,["class","disabled","pt","unstyled"])):l.createCommentVNode("",!0)],16)},B}(primevue.button,primevue.icons.angledown,primevue.icons.angleup,primevue.inputtext,primevue.utils,primevue.basecomponent,primevue.inputnumber.style,Vue);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import BaseComponent from 'primevue/basecomponent';
|
|
3
|
+
import InputOtpStyle from 'primevue/inputotp/style';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
name: 'BaseInputOtp',
|
|
7
|
+
extends: BaseComponent,
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: {
|
|
10
|
+
type: null,
|
|
11
|
+
default: false
|
|
12
|
+
},
|
|
13
|
+
invalid: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: false
|
|
16
|
+
},
|
|
17
|
+
disabled: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: false
|
|
20
|
+
},
|
|
21
|
+
readonly: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: false
|
|
24
|
+
},
|
|
25
|
+
variant: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: null
|
|
28
|
+
},
|
|
29
|
+
tabindex: {
|
|
30
|
+
type: Number,
|
|
31
|
+
default: null
|
|
32
|
+
},
|
|
33
|
+
length: {
|
|
34
|
+
type: Number,
|
|
35
|
+
default: 4
|
|
36
|
+
},
|
|
37
|
+
mask: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: false
|
|
40
|
+
},
|
|
41
|
+
integerOnly: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: false
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
style: InputOtpStyle,
|
|
47
|
+
provide() {
|
|
48
|
+
return {
|
|
49
|
+
$parentInstance: this
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
</script>
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* InputOtp is used to enter one time passwords.
|
|
4
|
+
*
|
|
5
|
+
* [Live Demo](https://www.primevue.org/inputotp/)
|
|
6
|
+
*
|
|
7
|
+
* @module inputotp
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
import { VNode } from 'vue';
|
|
11
|
+
import { ComponentHooks } from '../basecomponent/BaseComponent';
|
|
12
|
+
import { InputTextPassThroughOptions } from '../inputtext';
|
|
13
|
+
import { PassThroughOptions } from '../passthrough';
|
|
14
|
+
import { ClassComponent, GlobalComponentConstructor, PassThrough } from '../ts-helpers';
|
|
15
|
+
|
|
16
|
+
export declare type InputOtpPassThroughOptionType = InputOtpPassThroughAttributes | ((options: InputOtpPassThroughMethodOptions) => InputOtpPassThroughAttributes | string) | string | null | undefined;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Custom passthrough(pt) option method.
|
|
20
|
+
*/
|
|
21
|
+
export interface InputOtpPassThroughMethodOptions {
|
|
22
|
+
/**
|
|
23
|
+
* Defines instance.
|
|
24
|
+
*/
|
|
25
|
+
instance: any;
|
|
26
|
+
/**
|
|
27
|
+
* Defines valid properties.
|
|
28
|
+
*/
|
|
29
|
+
props: InputOtpProps;
|
|
30
|
+
/**
|
|
31
|
+
* Defines current inline state.
|
|
32
|
+
*/
|
|
33
|
+
state: InputOtpState;
|
|
34
|
+
/**
|
|
35
|
+
* Defines valid attributes.
|
|
36
|
+
*/
|
|
37
|
+
attrs: any;
|
|
38
|
+
/**
|
|
39
|
+
* Defines passthrough(pt) options in global config.
|
|
40
|
+
*/
|
|
41
|
+
global: object | undefined;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Custom shared passthrough(pt) option method.
|
|
46
|
+
*/
|
|
47
|
+
export interface InputOtpSharedPassThroughMethodOptions {
|
|
48
|
+
/**
|
|
49
|
+
* Defines valid properties.
|
|
50
|
+
*/
|
|
51
|
+
props: InputOtpProps;
|
|
52
|
+
/**
|
|
53
|
+
* Defines current inline state.
|
|
54
|
+
*/
|
|
55
|
+
state: InputOtpState;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Custom passthrough(pt) options.
|
|
60
|
+
* @see {@link InputOtpProps.pt}
|
|
61
|
+
*/
|
|
62
|
+
export interface InputOtpPassThroughOptions {
|
|
63
|
+
/**
|
|
64
|
+
* Used to pass attributes to the root's DOM element.
|
|
65
|
+
*/
|
|
66
|
+
root?: InputOtpPassThroughOptionType;
|
|
67
|
+
/**
|
|
68
|
+
* Used to pass attributes to the InputText component.
|
|
69
|
+
* @see {@link InputTextPassThroughOptions}
|
|
70
|
+
*/
|
|
71
|
+
input?: InputTextPassThroughOptions<InputOtpSharedPassThroughMethodOptions>;
|
|
72
|
+
/**
|
|
73
|
+
* Used to manage all lifecycle hooks.
|
|
74
|
+
* @see {@link BaseComponent.ComponentHooks}
|
|
75
|
+
*/
|
|
76
|
+
hooks?: ComponentHooks;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Custom passthrough attributes for each DOM elements
|
|
81
|
+
*/
|
|
82
|
+
export interface InputOtpPassThroughAttributes {
|
|
83
|
+
[key: string]: any;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Defines current inline state in InputOtp component.
|
|
88
|
+
*/
|
|
89
|
+
export interface InputOtpState {
|
|
90
|
+
/**
|
|
91
|
+
* Array of input tokens
|
|
92
|
+
*/
|
|
93
|
+
tokens: string[] | number[];
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* InputOtp attr options
|
|
98
|
+
*/
|
|
99
|
+
export interface InputOtpTemplateAttrsOptions {
|
|
100
|
+
/**
|
|
101
|
+
* Input token value
|
|
102
|
+
*/
|
|
103
|
+
value: string;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* InputOtp templating events
|
|
108
|
+
*/
|
|
109
|
+
export interface InputOtpTemplateEvents {
|
|
110
|
+
/**
|
|
111
|
+
* Input event
|
|
112
|
+
* @param {Event} event - Browser event
|
|
113
|
+
*/
|
|
114
|
+
input: (event: Event) => void;
|
|
115
|
+
/**
|
|
116
|
+
* Keydown event
|
|
117
|
+
* @param {Event} event - Browser event
|
|
118
|
+
*/
|
|
119
|
+
keydown: (event: Event) => void;
|
|
120
|
+
/**
|
|
121
|
+
* Focus event
|
|
122
|
+
* @param {Event} event - Browser event
|
|
123
|
+
*/
|
|
124
|
+
focus: (event: Event) => void;
|
|
125
|
+
/**
|
|
126
|
+
* Blur event
|
|
127
|
+
* @param {Event} event - Browser event
|
|
128
|
+
*/
|
|
129
|
+
blur: (event: Event) => void;
|
|
130
|
+
/**
|
|
131
|
+
* Paste event
|
|
132
|
+
* @param {Event} event - Browser event
|
|
133
|
+
*/
|
|
134
|
+
paste: (event: Event) => void;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Defines valid properties in InputOtp component.
|
|
139
|
+
*/
|
|
140
|
+
export interface InputOtpProps {
|
|
141
|
+
/**
|
|
142
|
+
* Specifies whether a inputotp should be checked or not.
|
|
143
|
+
* @defaultValue false
|
|
144
|
+
*/
|
|
145
|
+
modelValue?: boolean | string | undefined;
|
|
146
|
+
/**
|
|
147
|
+
* When present, it specifies that the component should have invalid state style.
|
|
148
|
+
* @defaultValue false
|
|
149
|
+
*/
|
|
150
|
+
invalid?: boolean | undefined;
|
|
151
|
+
/**
|
|
152
|
+
* When present, it specifies that the component should be disabled.
|
|
153
|
+
* @defaultValue false
|
|
154
|
+
*/
|
|
155
|
+
disabled?: boolean | undefined;
|
|
156
|
+
/**
|
|
157
|
+
* When present, it specifies that an input field is read-only.
|
|
158
|
+
* @defaultValue false
|
|
159
|
+
*/
|
|
160
|
+
readonly?: boolean | undefined;
|
|
161
|
+
/**
|
|
162
|
+
* Specifies the input variant of the component.
|
|
163
|
+
* @defaultValue outlined
|
|
164
|
+
*/
|
|
165
|
+
variant?: 'outlined' | 'filled' | undefined;
|
|
166
|
+
/**
|
|
167
|
+
* Index of the element in tabbing order.
|
|
168
|
+
*/
|
|
169
|
+
tabindex?: number | undefined;
|
|
170
|
+
/**
|
|
171
|
+
* Number of characters to initiate.
|
|
172
|
+
* @defaultValue 4
|
|
173
|
+
*/
|
|
174
|
+
length?: number | undefined;
|
|
175
|
+
/**
|
|
176
|
+
* Mask pattern.
|
|
177
|
+
* @defaultValue false
|
|
178
|
+
*/
|
|
179
|
+
mask?: boolean | undefined;
|
|
180
|
+
/**
|
|
181
|
+
* When present, it specifies that an input field is integer-only.
|
|
182
|
+
* @defaultValue false
|
|
183
|
+
*/
|
|
184
|
+
integerOnly?: boolean | undefined;
|
|
185
|
+
/**
|
|
186
|
+
* Used to pass attributes to DOM elements inside the component.
|
|
187
|
+
* @type {InputOtpPassThroughOptions}
|
|
188
|
+
*/
|
|
189
|
+
pt?: PassThrough<InputOtpPassThroughOptions>;
|
|
190
|
+
/**
|
|
191
|
+
* Used to configure passthrough(pt) options of the component.
|
|
192
|
+
* @type {PassThroughOptions}
|
|
193
|
+
*/
|
|
194
|
+
ptOptions?: PassThroughOptions;
|
|
195
|
+
/**
|
|
196
|
+
* When enabled, it removes component related styles in the core.
|
|
197
|
+
* @defaultValue false
|
|
198
|
+
*/
|
|
199
|
+
unstyled?: boolean;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
*
|
|
204
|
+
*/
|
|
205
|
+
export interface InputOtpSlots {
|
|
206
|
+
/**
|
|
207
|
+
* Default content slot.
|
|
208
|
+
*/
|
|
209
|
+
default(scope: {
|
|
210
|
+
/**
|
|
211
|
+
* Events of the component
|
|
212
|
+
* @param {number} index - Index of the input field
|
|
213
|
+
* @return {InputOtpTemplateEvents}
|
|
214
|
+
*/
|
|
215
|
+
events: (index: number) => InputOtpTemplateEvents;
|
|
216
|
+
/**
|
|
217
|
+
* Attributes of the component
|
|
218
|
+
* @param {number} index - Index of the input field
|
|
219
|
+
* @return {InputOtpTemplateAttrsOptions}
|
|
220
|
+
*/
|
|
221
|
+
attrs: (index: number) => InputOtpTemplateAttrsOptions;
|
|
222
|
+
/**
|
|
223
|
+
* Index of the input field
|
|
224
|
+
*/
|
|
225
|
+
index: number;
|
|
226
|
+
}): VNode[];
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Defines valid emits in InputOtp component.
|
|
231
|
+
*/
|
|
232
|
+
export interface InputOtpEmits {
|
|
233
|
+
/**
|
|
234
|
+
* Emitted when the value changes.
|
|
235
|
+
* @param {boolean} value - New value.
|
|
236
|
+
*/
|
|
237
|
+
'update:modelValue'(value: boolean): void;
|
|
238
|
+
/**
|
|
239
|
+
* Callback to invoke on value change.
|
|
240
|
+
* @param {Event} event - Browser event.
|
|
241
|
+
*/
|
|
242
|
+
change(event: Event): void;
|
|
243
|
+
/**
|
|
244
|
+
* Callback to invoke when the component receives focus.
|
|
245
|
+
* @param {Event} event - Browser event.
|
|
246
|
+
*/
|
|
247
|
+
focus(event: Event): void;
|
|
248
|
+
/**
|
|
249
|
+
* Callback to invoke when the component loses focus.
|
|
250
|
+
* @param {Event} event - Browser event.
|
|
251
|
+
*/
|
|
252
|
+
blur(event: Event): void;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* **PrimeVue - InputOtp**
|
|
257
|
+
*
|
|
258
|
+
* _InputOtp is used to enter one time passwords._
|
|
259
|
+
*
|
|
260
|
+
* [Live Demo](https://www.primevue.org/inputotp/)
|
|
261
|
+
* --- ---
|
|
262
|
+
* 
|
|
263
|
+
*
|
|
264
|
+
* @group Component
|
|
265
|
+
*
|
|
266
|
+
*/
|
|
267
|
+
declare class InputOtp extends ClassComponent<InputOtpProps, InputOtpSlots, InputOtpEmits> {}
|
|
268
|
+
|
|
269
|
+
declare module '@vue/runtime-core' {
|
|
270
|
+
interface GlobalComponents {
|
|
271
|
+
InputOtp: GlobalComponentConstructor<InputOtp>;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
export default InputOtp;
|