primevue 3.30.2 → 3.32.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.d.ts +5 -5
- package/accordion/Accordion.vue +1 -1
- package/accordion/accordion.cjs.js +3 -3
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +3 -3
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +3 -3
- package/accordion/accordion.min.js +1 -1
- package/accordiontab/AccordionTab.d.ts +18 -12
- package/autocomplete/AutoComplete.d.ts +34 -23
- package/autocomplete/AutoComplete.vue +3 -3
- package/autocomplete/BaseAutoComplete.vue +4 -0
- package/autocomplete/autocomplete.cjs.js +9 -5
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +9 -5
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +9 -5
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/Avatar.d.ts +7 -7
- package/avatar/Avatar.vue +2 -2
- package/avatar/avatar.cjs.js +2 -2
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.esm.js +2 -2
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +2 -2
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/AvatarGroup.d.ts +3 -3
- package/badge/Badge.d.ts +3 -3
- package/badgedirective/BadgeDirective.d.ts +45 -4
- package/badgedirective/badgedirective.cjs.js +11 -1
- package/badgedirective/badgedirective.cjs.min.js +1 -1
- package/badgedirective/badgedirective.esm.js +11 -1
- package/badgedirective/badgedirective.esm.min.js +1 -1
- package/badgedirective/badgedirective.js +11 -1
- package/badgedirective/badgedirective.min.js +1 -1
- package/basecomponent/BaseComponent.vue +51 -25
- package/basecomponent/basecomponent.cjs.js +66 -42
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +66 -42
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +66 -42
- package/basecomponent/basecomponent.min.js +1 -1
- package/basedirective/basedirective.cjs.js +9 -3
- package/basedirective/basedirective.cjs.min.js +1 -1
- package/basedirective/basedirective.esm.js +9 -3
- package/basedirective/basedirective.esm.min.js +1 -1
- package/basedirective/basedirective.js +9 -3
- package/basedirective/basedirective.min.js +1 -1
- package/blockui/BaseBlockUI.vue +0 -8
- package/blockui/BlockUI.d.ts +7 -3
- package/blockui/BlockUI.vue +35 -10
- package/blockui/blockui.cjs.js +34 -12
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +34 -12
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +34 -12
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/Breadcrumb.d.ts +25 -10
- package/breadcrumb/BreadcrumbItem.vue +18 -8
- package/breadcrumb/breadcrumb.cjs.js +18 -8
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +18 -8
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +18 -8
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/Button.d.ts +8 -7
- package/button/Button.vue +4 -0
- package/button/button.cjs.js +5 -0
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +5 -0
- package/button/button.esm.min.js +1 -1
- package/button/button.js +5 -0
- package/button/button.min.js +1 -1
- package/calendar/Calendar.d.ts +129 -53
- package/calendar/Calendar.vue +49 -7
- package/calendar/calendar.cjs.js +72 -35
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +72 -35
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +72 -35
- package/calendar/calendar.min.js +1 -1
- package/card/Card.d.ts +9 -9
- package/carousel/Carousel.d.ts +32 -20
- package/carousel/Carousel.vue +10 -2
- package/carousel/carousel.cjs.js +11 -2
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +11 -2
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +11 -2
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +25 -19
- package/cascadeselect/CascadeSelect.vue +2 -1
- package/cascadeselect/CascadeSelectSub.vue +1 -0
- package/cascadeselect/cascadeselect.cjs.js +9 -7
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +9 -7
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +9 -7
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/Chart.d.ts +5 -5
- package/checkbox/Checkbox.d.ts +8 -8
- package/chip/Chip.d.ts +7 -7
- package/chips/Chips.d.ts +10 -10
- package/colorpicker/ColorPicker.d.ts +18 -11
- package/colorpicker/ColorPicker.vue +1 -1
- package/colorpicker/colorpicker.cjs.js +3 -3
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +3 -3
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +3 -3
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/Column.d.ts +58 -58
- package/columngroup/ColumnGroup.d.ts +3 -3
- package/config/PrimeVue.d.ts +22 -0
- package/config/config.cjs.js +4 -1
- package/config/config.cjs.min.js +1 -1
- package/config/config.esm.js +4 -1
- package/config/config.esm.min.js +1 -1
- package/config/config.js +4 -1
- package/config/config.min.js +1 -1
- package/confirmdialog/ConfirmDialog.d.ts +14 -14
- package/confirmpopup/ConfirmPopup.d.ts +16 -10
- package/confirmpopup/ConfirmPopup.vue +1 -1
- package/confirmpopup/confirmpopup.cjs.js +3 -3
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +4 -4
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +3 -3
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/ContextMenu.d.ts +27 -13
- package/contextmenu/ContextMenu.vue +1 -1
- package/contextmenu/ContextMenuSub.vue +14 -12
- package/contextmenu/contextmenu.cjs.js +19 -17
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +20 -18
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +19 -17
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +4538 -507
- package/core/core.min.js +19 -15
- package/datatable/BaseDataTable.vue +1 -1
- package/datatable/BodyCell.vue +1 -0
- package/datatable/ColumnFilter.vue +1 -1
- package/datatable/DataTable.d.ts +37 -31
- package/datatable/DataTable.vue +4 -1
- package/datatable/datatable.cjs.js +10 -5
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +10 -5
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +10 -5
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.d.ts +10 -10
- package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +7 -7
- package/deferredcontent/DeferredContent.d.ts +3 -3
- package/dialog/BaseDialog.vue +3 -7
- package/dialog/Dialog.d.ts +21 -15
- package/dialog/Dialog.vue +2 -1
- package/dialog/dialog.cjs.js +9 -6
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +9 -6
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +9 -6
- package/dialog/dialog.min.js +1 -1
- package/divider/BaseDivider.vue +9 -24
- package/divider/Divider.d.ts +4 -4
- package/divider/Divider.vue +1 -1
- package/divider/divider.cjs.js +15 -2
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +15 -2
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +15 -2
- package/divider/divider.min.js +1 -1
- package/dock/BaseDock.vue +1 -1
- package/dock/Dock.d.ts +13 -9
- package/dock/Dock.vue +19 -2
- package/dock/DockSub.vue +8 -7
- package/dock/dock.cjs.js +18 -11
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +18 -11
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +18 -11
- package/dock/dock.min.js +1 -1
- package/dropdown/BaseDropdown.vue +5 -5
- package/dropdown/Dropdown.d.ts +34 -28
- package/dropdown/Dropdown.vue +2 -2
- package/dropdown/dropdown.cjs.js +9 -9
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +9 -9
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +9 -9
- package/dropdown/dropdown.min.js +1 -1
- package/editor/BaseEditor.vue +0 -14
- package/editor/Editor.d.ts +19 -19
- package/editor/Editor.vue +20 -20
- package/editor/editor.cjs.js +20 -34
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +20 -34
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +20 -34
- package/editor/editor.min.js +1 -1
- package/fieldset/Fieldset.d.ts +17 -11
- package/fieldset/Fieldset.vue +1 -1
- package/fieldset/fieldset.cjs.js +3 -3
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +3 -3
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +3 -3
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/FileUpload.d.ts +24 -24
- package/fileupload/FileUpload.vue +4 -4
- package/fileupload/fileupload.cjs.js +10 -4
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +10 -4
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +10 -4
- package/fileupload/fileupload.min.js +1 -1
- package/focustrap/FocusTrap.d.ts +5 -5
- package/galleria/Galleria.d.ts +53 -34
- package/galleria/Galleria.vue +1 -1
- package/galleria/GalleriaItem.vue +9 -2
- package/galleria/GalleriaThumbnails.vue +1 -0
- package/galleria/galleria.cjs.js +14 -5
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +14 -5
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +14 -5
- package/galleria/galleria.min.js +1 -1
- package/image/Image.d.ts +28 -21
- package/image/Image.vue +4 -4
- package/image/image.cjs.js +6 -5
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +6 -5
- package/image/image.esm.min.js +1 -1
- package/image/image.js +6 -5
- package/image/image.min.js +1 -1
- package/inlinemessage/InlineMessage.d.ts +5 -5
- package/inplace/Inplace.d.ts +8 -8
- package/inputmask/InputMask.d.ts +32 -4
- package/inputmask/InputMask.vue +9 -1
- package/inputmask/inputmask.cjs.js +9 -1
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +9 -1
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +9 -1
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/InputNumber.d.ts +10 -10
- package/inputswitch/InputSwitch.d.ts +9 -9
- package/inputtext/InputText.d.ts +3 -3
- package/knob/Knob.d.ts +7 -7
- package/listbox/Listbox.d.ts +18 -18
- package/megamenu/MegaMenu.d.ts +26 -18
- package/megamenu/MegaMenuSub.vue +14 -11
- package/megamenu/megamenu.cjs.js +15 -12
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +15 -12
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +15 -12
- package/megamenu/megamenu.min.js +1 -1
- package/menu/Menu.d.ts +28 -14
- package/menu/Menu.vue +2 -2
- package/menu/Menuitem.vue +4 -1
- package/menu/menu.cjs.js +9 -5
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +9 -5
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +9 -5
- package/menu/menu.min.js +1 -1
- package/menubar/Menubar.d.ts +29 -17
- package/menubar/MenubarSub.vue +15 -11
- package/menubar/menubar.cjs.js +16 -12
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +16 -12
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +16 -12
- package/menubar/menubar.min.js +1 -1
- package/message/Message.d.ts +18 -12
- package/message/Message.vue +1 -1
- package/message/message.cjs.js +3 -3
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +4 -4
- package/message/message.esm.min.js +1 -1
- package/message/message.js +3 -3
- package/message/message.min.js +1 -1
- package/multiselect/MultiSelect.d.ts +47 -41
- package/multiselect/MultiSelect.vue +1 -1
- package/multiselect/multiselect.cjs.js +3 -3
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +3 -3
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +3 -3
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/OrderList.d.ts +24 -18
- package/orderlist/OrderList.vue +2 -1
- package/orderlist/orderlist.cjs.js +3 -1
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +3 -1
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +3 -1
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/OrganizationChart.d.ts +15 -15
- package/overlaypanel/OverlayPanel.d.ts +13 -7
- package/overlaypanel/OverlayPanel.vue +2 -1
- package/overlaypanel/overlaypanel.cjs.js +5 -3
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +6 -4
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +5 -3
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +15 -15
- package/paginator/Paginator.d.ts +20 -20
- package/paginator/Paginator.vue +2 -1
- package/paginator/paginator.cjs.js +2 -0
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +3 -1
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +2 -0
- package/paginator/paginator.min.js +1 -1
- package/panel/Panel.d.ts +19 -13
- package/panel/Panel.vue +1 -1
- package/panel/panel.cjs.js +3 -3
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +3 -3
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +3 -3
- package/panel/panel.min.js +1 -1
- package/panelmenu/PanelMenu.d.ts +35 -21
- package/panelmenu/PanelMenu.vue +13 -12
- package/panelmenu/PanelMenuSub.vue +14 -12
- package/panelmenu/panelmenu.cjs.js +31 -28
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +31 -28
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +31 -28
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/index.cjs.js +74 -0
- package/passthrough/index.cjs.min.js +1 -0
- package/passthrough/index.d.ts +15 -0
- package/passthrough/index.esm.js +70 -0
- package/passthrough/index.esm.min.js +1 -0
- package/passthrough/index.js +77 -0
- package/passthrough/index.min.js +1 -0
- package/passthrough/package.json +6 -0
- package/passthrough/tailwind/index.cjs.js +3828 -0
- package/passthrough/tailwind/index.cjs.min.js +1 -0
- package/passthrough/tailwind/index.d.ts +5 -0
- package/passthrough/tailwind/index.esm.js +3823 -0
- package/passthrough/tailwind/index.esm.min.js +1 -0
- package/passthrough/tailwind/index.js +3835 -0
- package/passthrough/tailwind/index.min.js +1 -0
- package/passthrough/tailwind/package.json +6 -0
- package/password/Password.d.ts +25 -14
- package/password/Password.vue +2 -1
- package/password/password.cjs.js +4 -3
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +4 -3
- package/password/password.esm.min.js +1 -1
- package/password/password.js +4 -3
- package/password/password.min.js +1 -1
- package/picklist/PickList.d.ts +42 -36
- package/picklist/PickList.vue +3 -2
- package/picklist/picklist.cjs.js +4 -2
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +4 -2
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +4 -2
- package/picklist/picklist.min.js +1 -1
- package/progressbar/ProgressBar.d.ts +5 -5
- package/progressspinner/ProgressSpinner.d.ts +5 -5
- package/radiobutton/RadioButton.d.ts +10 -10
- package/rating/Rating.d.ts +12 -12
- package/rating/Rating.vue +3 -3
- package/rating/rating.cjs.js +3 -3
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +3 -3
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +3 -3
- package/rating/rating.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +7 -0
- package/resources/themes/arya-green/theme.css +7 -0
- package/resources/themes/arya-orange/theme.css +7 -0
- package/resources/themes/arya-purple/theme.css +7 -0
- package/resources/themes/bootstrap4-dark-blue/theme.css +7 -0
- package/resources/themes/bootstrap4-dark-purple/theme.css +7 -0
- package/resources/themes/bootstrap4-light-blue/theme.css +7 -0
- package/resources/themes/bootstrap4-light-purple/theme.css +7 -0
- package/resources/themes/fluent-light/theme.css +7 -0
- package/resources/themes/lara-dark-blue/theme.css +7 -0
- package/resources/themes/lara-dark-indigo/theme.css +7 -0
- package/resources/themes/lara-dark-purple/theme.css +7 -0
- package/resources/themes/lara-dark-teal/theme.css +7 -0
- package/resources/themes/lara-light-blue/theme.css +7 -0
- package/resources/themes/lara-light-indigo/theme.css +7 -0
- package/resources/themes/lara-light-purple/theme.css +7 -0
- package/resources/themes/lara-light-teal/theme.css +7 -0
- package/resources/themes/luna-amber/theme.css +7 -0
- package/resources/themes/luna-blue/theme.css +7 -0
- package/resources/themes/luna-green/theme.css +7 -0
- package/resources/themes/luna-pink/theme.css +7 -0
- package/resources/themes/md-dark-deeppurple/theme.css +7 -0
- package/resources/themes/md-dark-indigo/theme.css +7 -0
- package/resources/themes/md-light-deeppurple/theme.css +7 -0
- package/resources/themes/md-light-indigo/theme.css +7 -0
- package/resources/themes/mdc-dark-deeppurple/theme.css +7 -0
- package/resources/themes/mdc-dark-indigo/theme.css +7 -0
- package/resources/themes/mdc-light-deeppurple/theme.css +7 -0
- package/resources/themes/mdc-light-indigo/theme.css +7 -0
- package/resources/themes/mira/theme.css +7 -0
- package/resources/themes/nano/theme.css +7 -0
- package/resources/themes/nova/theme.css +7 -0
- package/resources/themes/nova-accent/theme.css +7 -0
- package/resources/themes/nova-alt/theme.css +7 -0
- package/resources/themes/nova-vue/theme.css +7 -0
- package/resources/themes/rhea/theme.css +7 -0
- package/resources/themes/saga-blue/theme.css +7 -0
- package/resources/themes/saga-green/theme.css +7 -0
- package/resources/themes/saga-orange/theme.css +7 -0
- package/resources/themes/saga-purple/theme.css +7 -0
- package/resources/themes/soho-dark/theme.css +7 -0
- package/resources/themes/soho-light/theme.css +7 -0
- package/resources/themes/tailwind-light/theme.css +7 -0
- package/resources/themes/vela-blue/theme.css +7 -0
- package/resources/themes/vela-green/theme.css +7 -0
- package/resources/themes/vela-orange/theme.css +7 -0
- package/resources/themes/vela-purple/theme.css +7 -0
- package/resources/themes/viva-dark/theme.css +7 -0
- package/resources/themes/viva-light/theme.css +7 -0
- package/ripple/Ripple.d.ts +3 -3
- package/row/Row.d.ts +2 -2
- package/scrollpanel/ScrollPanel.d.ts +7 -7
- package/scrolltop/ScrollTop.d.ts +11 -5
- package/scrolltop/ScrollTop.vue +1 -1
- package/scrolltop/scrolltop.cjs.js +3 -3
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.esm.js +4 -4
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +3 -3
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/SelectButton.d.ts +5 -5
- package/sidebar/Sidebar.d.ts +16 -10
- package/sidebar/Sidebar.vue +1 -1
- package/sidebar/sidebar.cjs.js +3 -3
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +3 -3
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +3 -3
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/Skeleton.d.ts +3 -3
- package/slider/Slider.d.ts +7 -7
- package/speeddial/BaseSpeedDial.vue +12 -36
- package/speeddial/SpeedDial.d.ts +14 -9
- package/speeddial/SpeedDial.vue +5 -4
- package/speeddial/speeddial.cjs.js +44 -23
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +44 -23
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +44 -23
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/SplitButton.d.ts +8 -8
- package/splitbutton/SplitButton.vue +22 -3
- package/splitbutton/splitbutton.cjs.js +17 -5
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +17 -5
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +17 -5
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/Splitter.d.ts +16 -5
- package/splitter/Splitter.vue +8 -1
- package/splitter/splitter.cjs.js +9 -1
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +9 -1
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +9 -1
- package/splitter/splitter.min.js +1 -1
- package/splitterpanel/SplitterPanel.d.ts +14 -3
- package/splitterpanel/SplitterPanel.vue +8 -1
- package/splitterpanel/splitterpanel.cjs.js +8 -1
- package/splitterpanel/splitterpanel.cjs.min.js +1 -1
- package/splitterpanel/splitterpanel.esm.js +8 -1
- package/splitterpanel/splitterpanel.esm.min.js +1 -1
- package/splitterpanel/splitterpanel.js +8 -1
- package/splitterpanel/splitterpanel.min.js +1 -1
- package/steps/BaseSteps.vue +1 -1
- package/steps/Steps.d.ts +33 -8
- package/steps/Steps.vue +17 -7
- package/steps/steps.cjs.js +19 -9
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +19 -9
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +19 -9
- package/steps/steps.min.js +1 -1
- package/styleclass/StyleClass.d.ts +2 -2
- package/tabmenu/TabMenu.d.ts +15 -11
- package/tabmenu/TabMenu.vue +11 -10
- package/tabmenu/tabmenu.cjs.js +11 -10
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +11 -10
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +11 -10
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabpanel/TabPanel.d.ts +10 -10
- package/tabview/TabView.d.ts +16 -16
- package/tabview/TabView.vue +1 -0
- package/tabview/tabview.cjs.js +2 -1
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +2 -1
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +2 -1
- package/tabview/tabview.min.js +1 -1
- package/tag/Tag.d.ts +5 -5
- package/terminal/Terminal.d.ts +11 -11
- package/textarea/Textarea.d.ts +3 -3
- package/tieredmenu/TieredMenu.d.ts +27 -13
- package/tieredmenu/TieredMenu.vue +1 -1
- package/tieredmenu/TieredMenuSub.vue +13 -11
- package/tieredmenu/tieredmenu.cjs.js +16 -14
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +16 -14
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +16 -14
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/Timeline.d.ts +9 -9
- package/toast/BaseToast.vue +4 -0
- package/toast/Toast.d.ts +23 -17
- package/toast/Toast.vue +3 -2
- package/toast/toast.cjs.js +4 -2
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +5 -3
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +4 -2
- package/toast/toast.min.js +1 -1
- package/togglebutton/ToggleButton.d.ts +31 -9
- package/togglebutton/ToggleButton.vue +12 -3
- package/togglebutton/togglebutton.cjs.js +12 -3
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +12 -3
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +12 -3
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/Toolbar.d.ts +6 -6
- package/toolbar/Toolbar.vue +3 -3
- package/toolbar/toolbar.cjs.js +3 -6
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +3 -6
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +3 -6
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/Tooltip.d.ts +35 -6
- package/tooltip/tooltip.cjs.js +17 -4
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +17 -4
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +413 -400
- package/tooltip/tooltip.min.js +1 -1
- package/tree/Tree.d.ts +20 -20
- package/tree/Tree.vue +1 -0
- package/tree/tree.cjs.js +3 -2
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +3 -2
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +3 -2
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.d.ts +23 -17
- package/treeselect/TreeSelect.vue +2 -2
- package/treeselect/treeselect.cjs.js +4 -4
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +4 -4
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +4 -4
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/TreeTable.d.ts +21 -21
- package/treetable/TreeTable.vue +2 -1
- package/treetable/treetable.cjs.js +1 -1
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +1 -1
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +1 -1
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.d.ts +11 -11
- package/usestyle/UseStyle.d.ts +2 -1
- package/usestyle/usestyle.cjs.js +20 -7
- package/usestyle/usestyle.cjs.min.js +1 -1
- package/usestyle/usestyle.esm.js +20 -7
- package/usestyle/usestyle.esm.min.js +1 -1
- package/usestyle/usestyle.js +20 -7
- package/usestyle/usestyle.min.js +1 -1
- package/utils/Utils.d.ts +4 -0
- package/utils/utils.cjs.js +48 -8
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +48 -8
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +48 -8
- package/utils/utils.min.js +1 -1
- package/vetur-attributes.json +129 -125
- package/vetur-tags.json +1 -0
- package/virtualscroller/BaseVirtualScroller.vue +1 -1
- package/virtualscroller/VirtualScroller.d.ts +7 -7
- package/virtualscroller/virtualscroller.cjs.js +2 -1
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +2 -1
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +2 -1
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +160 -127
package/image/image.js
CHANGED
|
@@ -157,10 +157,10 @@ this.primevue.image = (function (FocusTrap, EyeIcon, RefreshIcon, SearchMinusIco
|
|
|
157
157
|
var _this2 = this;
|
|
158
158
|
switch (event.code) {
|
|
159
159
|
case 'Escape':
|
|
160
|
-
this.
|
|
160
|
+
this.hidePreview();
|
|
161
161
|
setTimeout(function () {
|
|
162
162
|
utils.DomHandler.focus(_this2.$refs.previewButton);
|
|
163
|
-
},
|
|
163
|
+
}, 200);
|
|
164
164
|
event.preventDefault();
|
|
165
165
|
break;
|
|
166
166
|
}
|
|
@@ -300,6 +300,7 @@ this.primevue.image = (function (FocusTrap, EyeIcon, RefreshIcon, SearchMinusIco
|
|
|
300
300
|
}), _ctx.preview ? (vue.openBlock(), vue.createElementBlock("button", vue.mergeProps({
|
|
301
301
|
key: 0,
|
|
302
302
|
ref: "previewButton",
|
|
303
|
+
type: "button",
|
|
303
304
|
"class": _ctx.cx('button'),
|
|
304
305
|
onClick: _cache[1] || (_cache[1] = function () {
|
|
305
306
|
return $options.onImageClick && $options.onImageClick.apply($options, arguments);
|
|
@@ -372,14 +373,14 @@ this.primevue.image = (function (FocusTrap, EyeIcon, RefreshIcon, SearchMinusIco
|
|
|
372
373
|
autofocus: ""
|
|
373
374
|
}, _ctx.ptm('closeButton')), [vue.renderSlot(_ctx.$slots, "close", {}, function () {
|
|
374
375
|
return [vue.createVNode(_component_TimesIcon, vue.normalizeProps(vue.guardReactiveProps(_ctx.ptm('closeIcon'))), null, 16)];
|
|
375
|
-
})], 16, _hoisted_6)], 16), vue.createVNode(vue.Transition, {
|
|
376
|
+
})], 16, _hoisted_6)], 16), vue.createVNode(vue.Transition, vue.mergeProps({
|
|
376
377
|
name: "p-image-preview",
|
|
377
378
|
onBeforeEnter: $options.onBeforeEnter,
|
|
378
379
|
onEnter: $options.onEnter,
|
|
379
380
|
onLeave: $options.onLeave,
|
|
380
381
|
onBeforeLeave: $options.onBeforeLeave,
|
|
381
382
|
onAfterLeave: $options.onAfterLeave
|
|
382
|
-
}, {
|
|
383
|
+
}, _ctx.ptm('transition')), {
|
|
383
384
|
"default": vue.withCtx(function () {
|
|
384
385
|
return [$data.previewVisible ? (vue.openBlock(), vue.createElementBlock("div", vue.normalizeProps(vue.mergeProps({
|
|
385
386
|
key: 0
|
|
@@ -398,7 +399,7 @@ this.primevue.image = (function (FocusTrap, EyeIcon, RefreshIcon, SearchMinusIco
|
|
|
398
399
|
})], 16)) : vue.createCommentVNode("", true)];
|
|
399
400
|
}),
|
|
400
401
|
_: 3
|
|
401
|
-
},
|
|
402
|
+
}, 16, ["onBeforeEnter", "onEnter", "onLeave", "onBeforeLeave", "onAfterLeave"])], 16, _hoisted_1)), [[_directive_focustrap]]) : vue.createCommentVNode("", true)];
|
|
402
403
|
}),
|
|
403
404
|
_: 3
|
|
404
405
|
})], 16);
|
package/image/image.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.image=function(e,t,n,o,i,r,a,l,s,c,u,p){"use strict";function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=m(e),v=m(t),d=m(n),g=m(o),h=m(i),b=m(r),y=m(a),k=m(l),w=m(c),P=u.useStyle("\n.p-image-mask {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.p-image-preview-container {\n position: relative;\n display: inline-block;\n}\n\n.p-image-preview-indicator {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0;\n transition: opacity 0.3s;\n}\n\n.p-image-preview-container:hover > .p-image-preview-indicator {\n opacity: 1;\n cursor: pointer;\n}\n\n.p-image-preview-container > img {\n cursor: pointer;\n}\n\n.p-image-toolbar {\n position: absolute;\n top: 0;\n right: 0;\n display: flex;\n}\n\n.p-image-action.p-link {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.p-image-preview {\n transition: transform 0.15s;\n max-width: 100vw;\n max-height: 100vh;\n}\n\n.p-image-preview-enter-active {\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n}\n.p-image-preview-leave-active {\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n.p-image-preview-enter-from,\n.p-image-preview-leave-to {\n opacity: 0;\n transform: scale(0.7);\n}\n",{name:"image",manual:!0}),I={name:"Image",extends:{name:"BaseImage",extends:w.default,props:{preview:{type:Boolean,default:!1},class:{type:null,default:null},style:{type:null,default:null},imageStyle:{type:null,default:null},imageClass:{type:null,default:null},previewButtonProps:{type:null,default:null},indicatorIcon:{type:String,default:void 0},zoomInDisabled:{type:Boolean,default:!1},zoomOutDisabled:{type:Boolean,default:!1}},css:{classes:{root:function(e){return["p-image p-component",{"p-image-preview-container":e.props.preview}]},image:function(e){return e.props.image},button:"p-image-preview-indicator",icon:"p-image-preview-icon",mask:"p-image-mask p-component-overlay p-component-overlay-enter",rotateRightButton:"p-image-action p-link",rotateLeftButton:"p-image-action p-link",zoomOutButton:function(e){return["p-image-action p-link",{"p-disabled":e.instance.isZoomOutDisabled}]},zoomInButton:function(e){return["p-image-action p-link",{"p-disabled":e.instance.isZoomInDisabled}]},closeButton:"p-image-action p-link",preview:"p-image-preview"},loadStyle:P.load},provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["show","hide","error"],mask:null,data:function(){return{maskVisible:!1,previewVisible:!1,rotate:0,scale:1}},beforeUnmount:function(){this.mask&&s.ZIndexUtils.clear(this.container)},methods:{maskRef:function(e){this.mask=e},toolbarRef:function(e){this.toolbarRef=e},onImageClick:function(){var e=this;this.preview&&(this.maskVisible=!0,setTimeout((function(){e.previewVisible=!0}),25))},onPreviewImageClick:function(){this.previewClick=!0},onMaskClick:function(e){[e.target.classList].includes("p-image-action")||e.target.closest(".p-image-action")||(this.previewClick||(this.previewVisible=!1,this.rotate=0,this.scale=1),this.previewClick=!1)},onMaskKeydown:function(e){var t=this;if("Escape"===e.code)this.onMaskClick(),setTimeout((function(){s.DomHandler.focus(t.$refs.previewButton)}),25),e.preventDefault()},onError:function(){this.$emit("error")},rotateRight:function(){this.rotate+=90,this.previewClick=!0},rotateLeft:function(){this.rotate-=90,this.previewClick=!0},zoomIn:function(){this.scale=this.scale+.1,this.previewClick=!0},zoomOut:function(){this.scale=this.scale-.1,this.previewClick=!0},onBeforeEnter:function(){s.ZIndexUtils.set("modal",this.mask,this.$primevue.config.zIndex.modal)},onEnter:function(){this.focus(),this.$emit("show")},onBeforeLeave:function(){!this.isUnstyled&&s.DomHandler.addClass(this.mask,"p-component-overlay-leave")},onLeave:function(){this.$emit("hide")},onAfterLeave:function(e){s.ZIndexUtils.clear(e),this.maskVisible=!1},focus:function(){var e=this.mask.querySelector("[autofocus]");e&&e.focus()},hidePreview:function(){this.previewVisible=!1,this.rotate=0,this.scale=1}},computed:{containerClass:function(){return[this.cx("root"),this.class]},rotateClass:function(){return"p-image-preview-rotate-"+this.rotate},imagePreviewStyle:function(){return{transform:"rotate("+this.rotate+"deg) scale("+this.scale+")"}},isZoomInDisabled:function(){return this.zoomInDisabled||this.scale>=1.5},isZoomOutDisabled:function(){return this.zoomOutDisabled||this.scale<=.5},rightAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.rotateRight:void 0},leftAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.rotateLeft:void 0},zoomInAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.zoomIn:void 0},zoomOutAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.zoomOut:void 0},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},components:{Portal:k.default,EyeIcon:v.default,RefreshIcon:d.default,UndoIcon:y.default,SearchMinusIcon:g.default,SearchPlusIcon:h.default,TimesIcon:b.default},directives:{focustrap:f.default}};function C(e){return C="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},C(e)}function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function z(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){O(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 O(e,t,n){return(t=E(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E(e){var t=S(e,"string");return"symbol"===C(t)?t:String(t)}function S(e,t){if("object"!==C(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==C(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var L=["aria-modal"],V=["aria-label"],$=["aria-label"],x=["disabled","aria-label"],D=["disabled","aria-label"],N=["aria-label"],R=["src"];return I.render=function(e,t,n,o,i,r){var a=p.resolveComponent("RefreshIcon"),l=p.resolveComponent("UndoIcon"),s=p.resolveComponent("SearchMinusIcon"),c=p.resolveComponent("SearchPlusIcon"),u=p.resolveComponent("TimesIcon"),m=p.resolveComponent("Portal"),f=p.resolveDirective("focustrap");return p.openBlock(),p.createElementBlock("span",p.mergeProps({class:r.containerClass,style:e.style},e.ptm("root"),{"data-pc-name":"image"}),[p.renderSlot(e.$slots,"image",{onError:r.onError},(function(){return[p.createElementVNode("img",p.mergeProps({style:e.imageStyle,class:[e.cx("image"),e.imageClass],onError:t[0]||(t[0]=function(){return r.onError&&r.onError.apply(r,arguments)})},z(z({},e.$attrs),e.ptm("image"))),null,16)]})),e.preview?(p.openBlock(),p.createElementBlock("button",p.mergeProps({key:0,ref:"previewButton",class:e.cx("button"),onClick:t[1]||(t[1]=function(){return r.onImageClick&&r.onImageClick.apply(r,arguments)})},z(z({},e.previewButtonProps),e.ptm("button"))),[p.renderSlot(e.$slots,"indicatoricon",{},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.indicatorIcon?"i":"EyeIcon"),p.mergeProps({class:e.cx("icon")},e.ptm("icon")),null,16,["class"]))]}))],16)):p.createCommentVNode("",!0),p.createVNode(m,null,{default:p.withCtx((function(){return[i.maskVisible?p.withDirectives((p.openBlock(),p.createElementBlock("div",p.mergeProps({key:0,ref:r.maskRef,role:"dialog",class:e.cx("mask"),"aria-modal":i.maskVisible,onClick:t[8]||(t[8]=function(){return r.onMaskClick&&r.onMaskClick.apply(r,arguments)}),onKeydown:t[9]||(t[9]=function(){return r.onMaskKeydown&&r.onMaskKeydown.apply(r,arguments)})},e.ptm("mask")),[p.createElementVNode("div",p.mergeProps({class:"p-image-toolbar"},e.ptm("toolbar")),[p.createElementVNode("button",p.mergeProps({class:e.cx("rotateRightButton"),onClick:t[2]||(t[2]=function(){return r.rotateRight&&r.rotateRight.apply(r,arguments)}),type:"button","aria-label":r.rightAriaLabel},e.ptm("rotateRightButton")),[p.renderSlot(e.$slots,"refresh",{},(function(){return[p.createVNode(a,p.normalizeProps(p.guardReactiveProps(e.ptm("rotateRightIcon"))),null,16)]}))],16,V),p.createElementVNode("button",p.mergeProps({class:e.cx("rotateLeftButton"),onClick:t[3]||(t[3]=function(){return r.rotateLeft&&r.rotateLeft.apply(r,arguments)}),type:"button","aria-label":r.leftAriaLabel},e.ptm("rotateLeftButton")),[p.renderSlot(e.$slots,"undo",{},(function(){return[p.createVNode(l,p.normalizeProps(p.guardReactiveProps(e.ptm("rotateLeftIcon"))),null,16)]}))],16,$),p.createElementVNode("button",p.mergeProps({class:e.cx("zoomOutButton"),onClick:t[4]||(t[4]=function(){return r.zoomOut&&r.zoomOut.apply(r,arguments)}),type:"button",disabled:r.isZoomOutDisabled,"aria-label":r.zoomOutAriaLabel},e.ptm("zoomOutButton")),[p.renderSlot(e.$slots,"zoomout",{},(function(){return[p.createVNode(s,p.normalizeProps(p.guardReactiveProps(e.ptm("zoomOutIcon"))),null,16)]}))],16,x),p.createElementVNode("button",p.mergeProps({class:e.cx("zoomInButton"),onClick:t[5]||(t[5]=function(){return r.zoomIn&&r.zoomIn.apply(r,arguments)}),type:"button",disabled:r.isZoomInDisabled,"aria-label":r.zoomInAriaLabel},e.ptm("zoomInButton")),[p.renderSlot(e.$slots,"zoomin",{},(function(){return[p.createVNode(c,p.normalizeProps(p.guardReactiveProps(e.ptm("zoomInIcon"))),null,16)]}))],16,D),p.createElementVNode("button",p.mergeProps({class:e.cx("closeButton"),type:"button",onClick:t[6]||(t[6]=function(){return r.hidePreview&&r.hidePreview.apply(r,arguments)}),"aria-label":r.closeAriaLabel,autofocus:""},e.ptm("closeButton")),[p.renderSlot(e.$slots,"close",{},(function(){return[p.createVNode(u,p.normalizeProps(p.guardReactiveProps(e.ptm("closeIcon"))),null,16)]}))],16,N)],16),p.createVNode(p.Transition,{name:"p-image-preview",onBeforeEnter:r.onBeforeEnter,onEnter:r.onEnter,onLeave:r.onLeave,onBeforeLeave:r.onBeforeLeave,onAfterLeave:r.onAfterLeave},{default:p.withCtx((function(){return[i.previewVisible?(p.openBlock(),p.createElementBlock("div",p.normalizeProps(p.mergeProps({key:0},e.ptm("previewContainer"))),[p.renderSlot(e.$slots,"preview",{style:p.normalizeStyle(r.imagePreviewStyle),onClick:r.onPreviewImageClick},(function(){return[p.createElementVNode("img",p.mergeProps({src:e.$attrs.src,class:e.cx("preview"),style:r.imagePreviewStyle,onClick:t[7]||(t[7]=function(){return r.onPreviewImageClick&&r.onPreviewImageClick.apply(r,arguments)})},e.ptm("preview")),null,16,R)]}))],16)):p.createCommentVNode("",!0)]})),_:3},8,["onBeforeEnter","onEnter","onLeave","onBeforeLeave","onAfterLeave"])],16,L)),[[f]]):p.createCommentVNode("",!0)]})),_:3})],16)},I}(primevue.focustrap,primevue.icons.eye,primevue.icons.refresh,primevue.icons.searchminus,primevue.icons.searchplus,primevue.icons.times,primevue.icons.undo,primevue.portal,primevue.utils,primevue.basecomponent,primevue.usestyle,Vue);
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.image=function(e,t,n,o,i,r,a,l,s,c,u,p){"use strict";function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=m(e),v=m(t),d=m(n),g=m(o),h=m(i),b=m(r),y=m(a),w=m(l),k=m(c),P=u.useStyle("\n.p-image-mask {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.p-image-preview-container {\n position: relative;\n display: inline-block;\n}\n\n.p-image-preview-indicator {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0;\n transition: opacity 0.3s;\n}\n\n.p-image-preview-container:hover > .p-image-preview-indicator {\n opacity: 1;\n cursor: pointer;\n}\n\n.p-image-preview-container > img {\n cursor: pointer;\n}\n\n.p-image-toolbar {\n position: absolute;\n top: 0;\n right: 0;\n display: flex;\n}\n\n.p-image-action.p-link {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.p-image-preview {\n transition: transform 0.15s;\n max-width: 100vw;\n max-height: 100vh;\n}\n\n.p-image-preview-enter-active {\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n}\n.p-image-preview-leave-active {\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n.p-image-preview-enter-from,\n.p-image-preview-leave-to {\n opacity: 0;\n transform: scale(0.7);\n}\n",{name:"image",manual:!0}),I={name:"Image",extends:{name:"BaseImage",extends:k.default,props:{preview:{type:Boolean,default:!1},class:{type:null,default:null},style:{type:null,default:null},imageStyle:{type:null,default:null},imageClass:{type:null,default:null},previewButtonProps:{type:null,default:null},indicatorIcon:{type:String,default:void 0},zoomInDisabled:{type:Boolean,default:!1},zoomOutDisabled:{type:Boolean,default:!1}},css:{classes:{root:function(e){return["p-image p-component",{"p-image-preview-container":e.props.preview}]},image:function(e){return e.props.image},button:"p-image-preview-indicator",icon:"p-image-preview-icon",mask:"p-image-mask p-component-overlay p-component-overlay-enter",rotateRightButton:"p-image-action p-link",rotateLeftButton:"p-image-action p-link",zoomOutButton:function(e){return["p-image-action p-link",{"p-disabled":e.instance.isZoomOutDisabled}]},zoomInButton:function(e){return["p-image-action p-link",{"p-disabled":e.instance.isZoomInDisabled}]},closeButton:"p-image-action p-link",preview:"p-image-preview"},loadStyle:P.load},provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["show","hide","error"],mask:null,data:function(){return{maskVisible:!1,previewVisible:!1,rotate:0,scale:1}},beforeUnmount:function(){this.mask&&s.ZIndexUtils.clear(this.container)},methods:{maskRef:function(e){this.mask=e},toolbarRef:function(e){this.toolbarRef=e},onImageClick:function(){var e=this;this.preview&&(this.maskVisible=!0,setTimeout((function(){e.previewVisible=!0}),25))},onPreviewImageClick:function(){this.previewClick=!0},onMaskClick:function(e){[e.target.classList].includes("p-image-action")||e.target.closest(".p-image-action")||(this.previewClick||(this.previewVisible=!1,this.rotate=0,this.scale=1),this.previewClick=!1)},onMaskKeydown:function(e){var t=this;if("Escape"===e.code)this.hidePreview(),setTimeout((function(){s.DomHandler.focus(t.$refs.previewButton)}),200),e.preventDefault()},onError:function(){this.$emit("error")},rotateRight:function(){this.rotate+=90,this.previewClick=!0},rotateLeft:function(){this.rotate-=90,this.previewClick=!0},zoomIn:function(){this.scale=this.scale+.1,this.previewClick=!0},zoomOut:function(){this.scale=this.scale-.1,this.previewClick=!0},onBeforeEnter:function(){s.ZIndexUtils.set("modal",this.mask,this.$primevue.config.zIndex.modal)},onEnter:function(){this.focus(),this.$emit("show")},onBeforeLeave:function(){!this.isUnstyled&&s.DomHandler.addClass(this.mask,"p-component-overlay-leave")},onLeave:function(){this.$emit("hide")},onAfterLeave:function(e){s.ZIndexUtils.clear(e),this.maskVisible=!1},focus:function(){var e=this.mask.querySelector("[autofocus]");e&&e.focus()},hidePreview:function(){this.previewVisible=!1,this.rotate=0,this.scale=1}},computed:{containerClass:function(){return[this.cx("root"),this.class]},rotateClass:function(){return"p-image-preview-rotate-"+this.rotate},imagePreviewStyle:function(){return{transform:"rotate("+this.rotate+"deg) scale("+this.scale+")"}},isZoomInDisabled:function(){return this.zoomInDisabled||this.scale>=1.5},isZoomOutDisabled:function(){return this.zoomOutDisabled||this.scale<=.5},rightAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.rotateRight:void 0},leftAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.rotateLeft:void 0},zoomInAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.zoomIn:void 0},zoomOutAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.zoomOut:void 0},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},components:{Portal:w.default,EyeIcon:v.default,RefreshIcon:d.default,UndoIcon:y.default,SearchMinusIcon:g.default,SearchPlusIcon:h.default,TimesIcon:b.default},directives:{focustrap:f.default}};function C(e){return C="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},C(e)}function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function z(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){O(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 O(e,t,n){return(t=E(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E(e){var t=S(e,"string");return"symbol"===C(t)?t:String(t)}function S(e,t){if("object"!==C(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==C(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var L=["aria-modal"],V=["aria-label"],$=["aria-label"],x=["disabled","aria-label"],D=["disabled","aria-label"],N=["aria-label"],R=["src"];return I.render=function(e,t,n,o,i,r){var a=p.resolveComponent("RefreshIcon"),l=p.resolveComponent("UndoIcon"),s=p.resolveComponent("SearchMinusIcon"),c=p.resolveComponent("SearchPlusIcon"),u=p.resolveComponent("TimesIcon"),m=p.resolveComponent("Portal"),f=p.resolveDirective("focustrap");return p.openBlock(),p.createElementBlock("span",p.mergeProps({class:r.containerClass,style:e.style},e.ptm("root"),{"data-pc-name":"image"}),[p.renderSlot(e.$slots,"image",{onError:r.onError},(function(){return[p.createElementVNode("img",p.mergeProps({style:e.imageStyle,class:[e.cx("image"),e.imageClass],onError:t[0]||(t[0]=function(){return r.onError&&r.onError.apply(r,arguments)})},z(z({},e.$attrs),e.ptm("image"))),null,16)]})),e.preview?(p.openBlock(),p.createElementBlock("button",p.mergeProps({key:0,ref:"previewButton",type:"button",class:e.cx("button"),onClick:t[1]||(t[1]=function(){return r.onImageClick&&r.onImageClick.apply(r,arguments)})},z(z({},e.previewButtonProps),e.ptm("button"))),[p.renderSlot(e.$slots,"indicatoricon",{},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.indicatorIcon?"i":"EyeIcon"),p.mergeProps({class:e.cx("icon")},e.ptm("icon")),null,16,["class"]))]}))],16)):p.createCommentVNode("",!0),p.createVNode(m,null,{default:p.withCtx((function(){return[i.maskVisible?p.withDirectives((p.openBlock(),p.createElementBlock("div",p.mergeProps({key:0,ref:r.maskRef,role:"dialog",class:e.cx("mask"),"aria-modal":i.maskVisible,onClick:t[8]||(t[8]=function(){return r.onMaskClick&&r.onMaskClick.apply(r,arguments)}),onKeydown:t[9]||(t[9]=function(){return r.onMaskKeydown&&r.onMaskKeydown.apply(r,arguments)})},e.ptm("mask")),[p.createElementVNode("div",p.mergeProps({class:"p-image-toolbar"},e.ptm("toolbar")),[p.createElementVNode("button",p.mergeProps({class:e.cx("rotateRightButton"),onClick:t[2]||(t[2]=function(){return r.rotateRight&&r.rotateRight.apply(r,arguments)}),type:"button","aria-label":r.rightAriaLabel},e.ptm("rotateRightButton")),[p.renderSlot(e.$slots,"refresh",{},(function(){return[p.createVNode(a,p.normalizeProps(p.guardReactiveProps(e.ptm("rotateRightIcon"))),null,16)]}))],16,V),p.createElementVNode("button",p.mergeProps({class:e.cx("rotateLeftButton"),onClick:t[3]||(t[3]=function(){return r.rotateLeft&&r.rotateLeft.apply(r,arguments)}),type:"button","aria-label":r.leftAriaLabel},e.ptm("rotateLeftButton")),[p.renderSlot(e.$slots,"undo",{},(function(){return[p.createVNode(l,p.normalizeProps(p.guardReactiveProps(e.ptm("rotateLeftIcon"))),null,16)]}))],16,$),p.createElementVNode("button",p.mergeProps({class:e.cx("zoomOutButton"),onClick:t[4]||(t[4]=function(){return r.zoomOut&&r.zoomOut.apply(r,arguments)}),type:"button",disabled:r.isZoomOutDisabled,"aria-label":r.zoomOutAriaLabel},e.ptm("zoomOutButton")),[p.renderSlot(e.$slots,"zoomout",{},(function(){return[p.createVNode(s,p.normalizeProps(p.guardReactiveProps(e.ptm("zoomOutIcon"))),null,16)]}))],16,x),p.createElementVNode("button",p.mergeProps({class:e.cx("zoomInButton"),onClick:t[5]||(t[5]=function(){return r.zoomIn&&r.zoomIn.apply(r,arguments)}),type:"button",disabled:r.isZoomInDisabled,"aria-label":r.zoomInAriaLabel},e.ptm("zoomInButton")),[p.renderSlot(e.$slots,"zoomin",{},(function(){return[p.createVNode(c,p.normalizeProps(p.guardReactiveProps(e.ptm("zoomInIcon"))),null,16)]}))],16,D),p.createElementVNode("button",p.mergeProps({class:e.cx("closeButton"),type:"button",onClick:t[6]||(t[6]=function(){return r.hidePreview&&r.hidePreview.apply(r,arguments)}),"aria-label":r.closeAriaLabel,autofocus:""},e.ptm("closeButton")),[p.renderSlot(e.$slots,"close",{},(function(){return[p.createVNode(u,p.normalizeProps(p.guardReactiveProps(e.ptm("closeIcon"))),null,16)]}))],16,N)],16),p.createVNode(p.Transition,p.mergeProps({name:"p-image-preview",onBeforeEnter:r.onBeforeEnter,onEnter:r.onEnter,onLeave:r.onLeave,onBeforeLeave:r.onBeforeLeave,onAfterLeave:r.onAfterLeave},e.ptm("transition")),{default:p.withCtx((function(){return[i.previewVisible?(p.openBlock(),p.createElementBlock("div",p.normalizeProps(p.mergeProps({key:0},e.ptm("previewContainer"))),[p.renderSlot(e.$slots,"preview",{style:p.normalizeStyle(r.imagePreviewStyle),onClick:r.onPreviewImageClick},(function(){return[p.createElementVNode("img",p.mergeProps({src:e.$attrs.src,class:e.cx("preview"),style:r.imagePreviewStyle,onClick:t[7]||(t[7]=function(){return r.onPreviewImageClick&&r.onPreviewImageClick.apply(r,arguments)})},e.ptm("preview")),null,16,R)]}))],16)):p.createCommentVNode("",!0)]})),_:3},16,["onBeforeEnter","onEnter","onLeave","onBeforeLeave","onAfterLeave"])],16,L)),[[f]]):p.createCommentVNode("",!0)]})),_:3})],16)},I}(primevue.focustrap,primevue.icons.eye,primevue.icons.refresh,primevue.icons.searchminus,primevue.icons.searchplus,primevue.icons.times,primevue.icons.undo,primevue.portal,primevue.utils,primevue.basecomponent,primevue.usestyle,Vue);
|
|
@@ -28,19 +28,19 @@ export interface InlineMessagePassThroughMethodOptions {
|
|
|
28
28
|
*/
|
|
29
29
|
export interface InlineMessagePassThroughOptions {
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* Used to pass attributes to the root's DOM element.
|
|
32
32
|
*/
|
|
33
33
|
root?: InlineMessagePassThroughOptionType;
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* Used to pass attributes to the icon's DOM element.
|
|
36
36
|
*/
|
|
37
37
|
icon?: InlineMessagePassThroughOptionType;
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
39
|
+
* Used to pass attributes to the text's DOM element.
|
|
40
40
|
*/
|
|
41
41
|
text?: InlineMessagePassThroughOptionType;
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
43
|
+
* Used to manage all lifecycle hooks
|
|
44
44
|
* @see {@link BaseComponent.ComponentHooks}
|
|
45
45
|
*/
|
|
46
46
|
hooks?: ComponentHooks;
|
|
@@ -79,7 +79,7 @@ export interface InlineMessageProps {
|
|
|
79
79
|
*/
|
|
80
80
|
icon?: string | undefined;
|
|
81
81
|
/**
|
|
82
|
-
*
|
|
82
|
+
* Used to pass attributes to DOM elements inside the component.
|
|
83
83
|
* @type {InlineMessagePassThroughOptions}
|
|
84
84
|
*/
|
|
85
85
|
pt?: InlineMessagePassThroughOptions;
|
package/inplace/Inplace.d.ts
CHANGED
|
@@ -30,24 +30,24 @@ export interface InplacePassThroughMethodOptions {
|
|
|
30
30
|
*/
|
|
31
31
|
export interface InplacePassThroughOptions {
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* Used to pass attributes to the root's DOM element.
|
|
34
34
|
*/
|
|
35
35
|
root?: InplacePassThroughOptionType;
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* Used to pass attributes to the display's DOM element.
|
|
38
38
|
*/
|
|
39
39
|
display?: InplacePassThroughOptionType;
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* Used to pass attributes to the content's DOM element.
|
|
42
42
|
*/
|
|
43
43
|
content?: InplacePassThroughOptionType;
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* Used to pass attributes to the Button component.
|
|
46
46
|
* @see {@link ButtonPassThroughOptions}
|
|
47
47
|
*/
|
|
48
48
|
closeButton?: ButtonPassThroughOptions;
|
|
49
49
|
/**
|
|
50
|
-
*
|
|
50
|
+
* Used to manage all lifecycle hooks
|
|
51
51
|
* @see {@link BaseComponent.ComponentHooks}
|
|
52
52
|
*/
|
|
53
53
|
hooks?: ComponentHooks;
|
|
@@ -96,15 +96,15 @@ export interface InplaceProps {
|
|
|
96
96
|
*/
|
|
97
97
|
closeIcon?: string | undefined;
|
|
98
98
|
/**
|
|
99
|
-
*
|
|
99
|
+
* Used to pass all properties of the HTMLDivElement to display container.
|
|
100
100
|
*/
|
|
101
101
|
displayProps?: HTMLAttributes | undefined;
|
|
102
102
|
/**
|
|
103
|
-
*
|
|
103
|
+
* Used to pass all properties of the HTMLButtonElement to the close button.
|
|
104
104
|
*/
|
|
105
105
|
closeButtonProps?: ButtonHTMLAttributes | undefined;
|
|
106
106
|
/**
|
|
107
|
-
*
|
|
107
|
+
* Used to pass attributes to DOM elements inside the component.
|
|
108
108
|
* @type {InplacePassThroughOptions}
|
|
109
109
|
*/
|
|
110
110
|
pt?: InplacePassThroughOptions;
|
package/inputmask/InputMask.d.ts
CHANGED
|
@@ -10,7 +10,16 @@
|
|
|
10
10
|
import { ComponentHooks } from '../basecomponent';
|
|
11
11
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
12
12
|
|
|
13
|
-
export declare type InputMaskPassThroughOptionType = InputMaskPassThroughAttributes | null | undefined;
|
|
13
|
+
export declare type InputMaskPassThroughOptionType = InputMaskPassThroughAttributes | ((options: InputMaskPassThroughMethodOptions) => InputMaskPassThroughAttributes | string) | string | null | undefined;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Custom passthrough(pt) option method.
|
|
17
|
+
*/
|
|
18
|
+
export interface InputMaskPassThroughMethodOptions {
|
|
19
|
+
instance: any;
|
|
20
|
+
props: InputMaskProps;
|
|
21
|
+
context: InputMaskContext;
|
|
22
|
+
}
|
|
14
23
|
|
|
15
24
|
/**
|
|
16
25
|
* Custom passthrough(pt) options.
|
|
@@ -18,11 +27,11 @@ export declare type InputMaskPassThroughOptionType = InputMaskPassThroughAttribu
|
|
|
18
27
|
*/
|
|
19
28
|
export interface InputMaskPassThroughOptions {
|
|
20
29
|
/**
|
|
21
|
-
*
|
|
30
|
+
* Used to pass attributes to the root's DOM element.
|
|
22
31
|
*/
|
|
23
32
|
root?: InputMaskPassThroughOptionType;
|
|
24
33
|
/**
|
|
25
|
-
*
|
|
34
|
+
* Used to manage all lifecycle hooks
|
|
26
35
|
* @see {@link BaseComponent.ComponentHooks}
|
|
27
36
|
*/
|
|
28
37
|
hooks?: ComponentHooks;
|
|
@@ -35,6 +44,22 @@ export interface InputMaskPassThroughAttributes {
|
|
|
35
44
|
[key: string]: any;
|
|
36
45
|
}
|
|
37
46
|
|
|
47
|
+
/**
|
|
48
|
+
* Defines current options in InputMask component.
|
|
49
|
+
*/
|
|
50
|
+
export interface InputMaskContext {
|
|
51
|
+
/**
|
|
52
|
+
* Current filled state of the component as a boolean.
|
|
53
|
+
* @defaultValue false
|
|
54
|
+
*/
|
|
55
|
+
filled: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Current disabled state of the component as a boolean.
|
|
58
|
+
* @defaultValue false
|
|
59
|
+
*/
|
|
60
|
+
disabled: boolean;
|
|
61
|
+
}
|
|
62
|
+
|
|
38
63
|
/**
|
|
39
64
|
* Defines valid properties in InputMask component.
|
|
40
65
|
*/
|
|
@@ -68,7 +93,7 @@ export interface InputMaskProps {
|
|
|
68
93
|
*/
|
|
69
94
|
readonly?: boolean | undefined;
|
|
70
95
|
/**
|
|
71
|
-
*
|
|
96
|
+
* Used to pass attributes to DOM elements inside the component.
|
|
72
97
|
* @type {InputMaskPassThroughOptions}
|
|
73
98
|
*/
|
|
74
99
|
pt?: InputMaskPassThroughOptions;
|
|
@@ -79,6 +104,9 @@ export interface InputMaskProps {
|
|
|
79
104
|
unstyled?: boolean;
|
|
80
105
|
}
|
|
81
106
|
|
|
107
|
+
/**
|
|
108
|
+
* Defines valid slots in InputMask component.
|
|
109
|
+
*/
|
|
82
110
|
export interface InputMaskSlots {}
|
|
83
111
|
|
|
84
112
|
/**
|
package/inputmask/InputMask.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<input :class="cx('root')" :readonly="readonly" @input="onInput" @focus="onFocus" @blur="onBlur" @keydown="onKeyDown" @keypress="onKeyPress" @paste="onPaste" v-bind="ptm('root')" data-pc-name="inputmask" />
|
|
2
|
+
<input :class="cx('root')" :readonly="readonly" @input="onInput" @focus="onFocus" @blur="onBlur" @keydown="onKeyDown" @keypress="onKeyPress" @paste="onPaste" v-bind="ptm('root', ptmParams)" data-pc-name="inputmask" />
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script>
|
|
@@ -496,6 +496,14 @@ export default {
|
|
|
496
496
|
computed: {
|
|
497
497
|
filled() {
|
|
498
498
|
return this.modelValue != null && this.modelValue.toString().length > 0;
|
|
499
|
+
},
|
|
500
|
+
ptmParams() {
|
|
501
|
+
return {
|
|
502
|
+
context: {
|
|
503
|
+
filled: this.filled,
|
|
504
|
+
disabled: this.$attrs.disabled || this.$attrs.disabled === ''
|
|
505
|
+
}
|
|
506
|
+
};
|
|
499
507
|
}
|
|
500
508
|
}
|
|
501
509
|
};
|
|
@@ -461,6 +461,14 @@ var script = {
|
|
|
461
461
|
computed: {
|
|
462
462
|
filled: function filled() {
|
|
463
463
|
return this.modelValue != null && this.modelValue.toString().length > 0;
|
|
464
|
+
},
|
|
465
|
+
ptmParams: function ptmParams() {
|
|
466
|
+
return {
|
|
467
|
+
context: {
|
|
468
|
+
filled: this.filled,
|
|
469
|
+
disabled: this.$attrs.disabled || this.$attrs.disabled === ''
|
|
470
|
+
}
|
|
471
|
+
};
|
|
464
472
|
}
|
|
465
473
|
}
|
|
466
474
|
};
|
|
@@ -488,7 +496,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
488
496
|
onPaste: _cache[5] || (_cache[5] = function () {
|
|
489
497
|
return $options.onPaste && $options.onPaste.apply($options, arguments);
|
|
490
498
|
})
|
|
491
|
-
}, _ctx.ptm('root'), {
|
|
499
|
+
}, _ctx.ptm('root', $options.ptmParams), {
|
|
492
500
|
"data-pc-name": "inputmask"
|
|
493
501
|
}), null, 16, _hoisted_1);
|
|
494
502
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/utils"),t=require("primevue/basecomponent"),s=require("vue");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n={name:"InputMask",extends:{name:"BaseInputMask",extends:i(t).default,props:{modelValue:null,slotChar:{type:String,default:"_"},mask:{type:String,default:null},autoClear:{type:Boolean,default:!0},unmask:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},css:{classes:{root:function(e){return["p-inputmask p-inputtext p-component",{"p-filled":e.instance.filled}]}}}},emits:["update:modelValue","focus","blur","keydown","complete","keypress","paste"],watch:{mask:function(e,t){t!==e&&this.initMask()}},mounted:function(){this.initMask()},updated:function(){this.isValueUpdated()&&this.updateValue()},methods:{onInput:function(e){this.androidChrome?this.handleAndroidInput(e):this.handleInputChange(e),this.$emit("update:modelValue",e.target.value)},onFocus:function(e){var t,s=this;this.readonly||(this.focus=!0,clearTimeout(this.caretTimeoutId),this.focusText=this.$el.value,t=this.checkVal(),this.caretTimeoutId=setTimeout((function(){s.$el===document.activeElement&&(s.writeBuffer(),t===s.mask.replace("?","").length?s.caret(0,t):s.caret(t))}),10),this.$emit("focus",e))},onBlur:function(e){if(this.focus=!1,this.checkVal(),this.updateModel(e),this.$el.value!==this.focusText){var t=document.createEvent("HTMLEvents");t.initEvent("change",!0,!1),this.$el.dispatchEvent(t)}this.$emit("blur",e)},onKeyDown:function(t){if(!this.readonly){var s,i,n,a=t.which||t.keyCode,h=/iphone/i.test(e.DomHandler.getUserAgent());this.oldVal=this.$el.value,8===a||46===a||h&&127===a?((n=(s=this.caret()).end)-(i=s.begin)==0&&(i=46!==a?this.seekPrev(i):n=this.seekNext(i-1),n=46===a?this.seekNext(n):n),this.clearBuffer(i,n),this.shiftL(i,n-1),this.updateModel(t),t.preventDefault()):13===a?(this.$el.blur(),this.updateModel(t)):27===a&&(this.$el.value=this.focusText,this.caret(0,this.checkVal()),this.updateModel(t),t.preventDefault()),this.$emit("keydown",t)}},onKeyPress:function(t){var s=this;if(!this.readonly){var i,n,a,h,l=t.which||t.keyCode,r=this.caret();if(!(t.ctrlKey||t.altKey||t.metaKey||l<32)){if(l&&13!==l){if(r.end-r.begin!=0&&(this.clearBuffer(r.begin,r.end),this.shiftL(r.begin,r.end-1)),(i=this.seekNext(r.begin-1))<this.len&&(n=String.fromCharCode(l),this.tests[i].test(n))){if(this.shiftR(i),this.buffer[i]=n,this.writeBuffer(),a=this.seekNext(i),/android/i.test(e.DomHandler.getUserAgent())){setTimeout((function(){s.caret(a)}),0)}else this.caret(a);r.begin<=this.lastRequiredNonMaskPos&&(h=this.isCompleted())}t.preventDefault()}this.updateModel(t),h&&this.$emit("complete",t),this.$emit("keypress",t)}}},onPaste:function(e){this.handleInputChange(e),this.$emit("paste",e)},caret:function(e,t){var s,i,n;if(this.$el.offsetParent&&this.$el===document.activeElement)return"number"!=typeof e?(this.$el.setSelectionRange?(i=this.$el.selectionStart,n=this.$el.selectionEnd):document.selection&&document.selection.createRange&&(n=(i=0-(s=document.selection.createRange()).duplicate().moveStart("character",-1e5))+s.text.length),{begin:i,end:n}):(i=e,n="number"==typeof t?t:i,void(this.$el.setSelectionRange?this.$el.setSelectionRange(i,n):this.$el.createTextRange&&((s=this.$el.createTextRange()).collapse(!0),s.moveEnd("character",n),s.moveStart("character",i),s.select())))},isCompleted:function(){for(var e=this.firstNonMaskPos;e<=this.lastRequiredNonMaskPos;e++)if(this.tests[e]&&this.buffer[e]===this.getPlaceholder(e))return!1;return!0},getPlaceholder:function(e){return this.slotChar.charAt(e<this.slotChar.length?e:0)},seekNext:function(e){for(;++e<this.len&&!this.tests[e];);return e},seekPrev:function(e){for(;--e>=0&&!this.tests[e];);return e},shiftL:function(e,t){var s,i;if(!(e<0)){for(s=e,i=this.seekNext(t);s<this.len;s++)if(this.tests[s]){if(!(i<this.len&&this.tests[s].test(this.buffer[i])))break;this.buffer[s]=this.buffer[i],this.buffer[i]=this.getPlaceholder(i),i=this.seekNext(i)}this.writeBuffer(),this.caret(Math.max(this.firstNonMaskPos,e))}},shiftR:function(e){var t,s,i,n;for(t=e,s=this.getPlaceholder(e);t<this.len;t++)if(this.tests[t]){if(i=this.seekNext(t),n=this.buffer[t],this.buffer[t]=s,!(i<this.len&&this.tests[i].test(n)))break;s=n}},handleAndroidInput:function(e){var t=this.$el.value,s=this.caret();if(this.oldVal&&this.oldVal.length&&this.oldVal.length>t.length){for(this.checkVal(!0);s.begin>0&&!this.tests[s.begin-1];)s.begin--;if(0===s.begin)for(;s.begin<this.firstNonMaskPos&&!this.tests[s.begin];)s.begin++;this.caret(s.begin,s.begin)}else{for(this.checkVal(!0);s.begin<this.len&&!this.tests[s.begin];)s.begin++;this.caret(s.begin,s.begin)}this.isCompleted()&&this.$emit("complete",e)},clearBuffer:function(e,t){var s;for(s=e;s<t&&s<this.len;s++)this.tests[s]&&(this.buffer[s]=this.getPlaceholder(s))},writeBuffer:function(){this.$el.value=this.buffer.join("")},checkVal:function(e){this.isValueChecked=!0;var t,s,i,n=this.$el.value,a=-1;for(t=0,i=0;t<this.len;t++)if(this.tests[t]){for(this.buffer[t]=this.getPlaceholder(t);i++<n.length;)if(s=n.charAt(i-1),this.tests[t].test(s)){this.buffer[t]=s,a=t;break}if(i>n.length){this.clearBuffer(t+1,this.len);break}}else this.buffer[t]===n.charAt(i)&&i++,t<this.partialPosition&&(a=t);return e?this.writeBuffer():a+1<this.partialPosition?this.autoClear||this.buffer.join("")===this.defaultBuffer?(this.$el.value&&(this.$el.value=""),this.clearBuffer(0,this.len)):this.writeBuffer():(this.writeBuffer(),this.$el.value=this.$el.value.substring(0,a+1)),this.partialPosition?t:this.firstNonMaskPos},handleInputChange:function(e){if(!this.readonly){var t=this.checkVal(!0);this.caret(t),this.updateModel(e),this.isCompleted()&&this.$emit("complete",e)}},getUnmaskedValue:function(){for(var e=[],t=0;t<this.buffer.length;t++){var s=this.buffer[t];this.tests[t]&&s!==this.getPlaceholder(t)&&e.push(s)}return e.join("")},updateModel:function(e){var t=this.unmask?this.getUnmaskedValue():e.target.value;this.$emit("update:modelValue",this.defaultBuffer!==t?t:"")},updateValue:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.$el&&(null==this.modelValue?(this.$el.value="",t&&this.$emit("update:modelValue","")):(this.$el.value=this.modelValue,this.checkVal(),setTimeout((function(){if(e.$el&&(e.writeBuffer(),e.checkVal(),t)){var s=e.unmask?e.getUnmaskedValue():e.$el.value;e.$emit("update:modelValue",e.defaultBuffer!==s?s:"")}}),10)),this.focusText=this.$el.value)},initMask:function(){this.tests=[],this.partialPosition=this.mask.length,this.len=this.mask.length,this.firstNonMaskPos=null,this.defs={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"};var t=e.DomHandler.getUserAgent();this.androidChrome=/chrome/i.test(t)&&/android/i.test(t);for(var s=this.mask.split(""),i=0;i<s.length;i++){var n=s[i];"?"===n?(this.len--,this.partialPosition=i):this.defs[n]?(this.tests.push(new RegExp(this.defs[n])),null===this.firstNonMaskPos&&(this.firstNonMaskPos=this.tests.length-1),i<this.partialPosition&&(this.lastRequiredNonMaskPos=this.tests.length-1)):this.tests.push(null)}this.buffer=[];for(var a=0;a<s.length;a++){var h=s[a];"?"!==h&&this.buffer.push(this.defs[h]?this.getPlaceholder(a):h)}this.defaultBuffer=this.buffer.join(""),this.updateValue(!1)},isValueUpdated:function(){return this.unmask?this.modelValue!=this.getUnmaskedValue():this.defaultBuffer!==this.$el.value&&this.$el.value!==this.modelValue}},computed:{filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0}}},a=["readonly"];n.render=function(e,t,i,n,h,l){return s.openBlock(),s.createElementBlock("input",s.mergeProps({class:e.cx("root"),readonly:e.readonly,onInput:t[0]||(t[0]=function(){return l.onInput&&l.onInput.apply(l,arguments)}),onFocus:t[1]||(t[1]=function(){return l.onFocus&&l.onFocus.apply(l,arguments)}),onBlur:t[2]||(t[2]=function(){return l.onBlur&&l.onBlur.apply(l,arguments)}),onKeydown:t[3]||(t[3]=function(){return l.onKeyDown&&l.onKeyDown.apply(l,arguments)}),onKeypress:t[4]||(t[4]=function(){return l.onKeyPress&&l.onKeyPress.apply(l,arguments)}),onPaste:t[5]||(t[5]=function(){return l.onPaste&&l.onPaste.apply(l,arguments)})},e.ptm("root"),{"data-pc-name":"inputmask"}),null,16,a)},module.exports=n;
|
|
1
|
+
"use strict";var e=require("primevue/utils"),t=require("primevue/basecomponent"),s=require("vue");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n={name:"InputMask",extends:{name:"BaseInputMask",extends:i(t).default,props:{modelValue:null,slotChar:{type:String,default:"_"},mask:{type:String,default:null},autoClear:{type:Boolean,default:!0},unmask:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},css:{classes:{root:function(e){return["p-inputmask p-inputtext p-component",{"p-filled":e.instance.filled}]}}}},emits:["update:modelValue","focus","blur","keydown","complete","keypress","paste"],watch:{mask:function(e,t){t!==e&&this.initMask()}},mounted:function(){this.initMask()},updated:function(){this.isValueUpdated()&&this.updateValue()},methods:{onInput:function(e){this.androidChrome?this.handleAndroidInput(e):this.handleInputChange(e),this.$emit("update:modelValue",e.target.value)},onFocus:function(e){var t,s=this;this.readonly||(this.focus=!0,clearTimeout(this.caretTimeoutId),this.focusText=this.$el.value,t=this.checkVal(),this.caretTimeoutId=setTimeout((function(){s.$el===document.activeElement&&(s.writeBuffer(),t===s.mask.replace("?","").length?s.caret(0,t):s.caret(t))}),10),this.$emit("focus",e))},onBlur:function(e){if(this.focus=!1,this.checkVal(),this.updateModel(e),this.$el.value!==this.focusText){var t=document.createEvent("HTMLEvents");t.initEvent("change",!0,!1),this.$el.dispatchEvent(t)}this.$emit("blur",e)},onKeyDown:function(t){if(!this.readonly){var s,i,n,a=t.which||t.keyCode,h=/iphone/i.test(e.DomHandler.getUserAgent());this.oldVal=this.$el.value,8===a||46===a||h&&127===a?((n=(s=this.caret()).end)-(i=s.begin)==0&&(i=46!==a?this.seekPrev(i):n=this.seekNext(i-1),n=46===a?this.seekNext(n):n),this.clearBuffer(i,n),this.shiftL(i,n-1),this.updateModel(t),t.preventDefault()):13===a?(this.$el.blur(),this.updateModel(t)):27===a&&(this.$el.value=this.focusText,this.caret(0,this.checkVal()),this.updateModel(t),t.preventDefault()),this.$emit("keydown",t)}},onKeyPress:function(t){var s=this;if(!this.readonly){var i,n,a,h,l=t.which||t.keyCode,r=this.caret();if(!(t.ctrlKey||t.altKey||t.metaKey||l<32)){if(l&&13!==l){if(r.end-r.begin!=0&&(this.clearBuffer(r.begin,r.end),this.shiftL(r.begin,r.end-1)),(i=this.seekNext(r.begin-1))<this.len&&(n=String.fromCharCode(l),this.tests[i].test(n))){if(this.shiftR(i),this.buffer[i]=n,this.writeBuffer(),a=this.seekNext(i),/android/i.test(e.DomHandler.getUserAgent())){setTimeout((function(){s.caret(a)}),0)}else this.caret(a);r.begin<=this.lastRequiredNonMaskPos&&(h=this.isCompleted())}t.preventDefault()}this.updateModel(t),h&&this.$emit("complete",t),this.$emit("keypress",t)}}},onPaste:function(e){this.handleInputChange(e),this.$emit("paste",e)},caret:function(e,t){var s,i,n;if(this.$el.offsetParent&&this.$el===document.activeElement)return"number"!=typeof e?(this.$el.setSelectionRange?(i=this.$el.selectionStart,n=this.$el.selectionEnd):document.selection&&document.selection.createRange&&(n=(i=0-(s=document.selection.createRange()).duplicate().moveStart("character",-1e5))+s.text.length),{begin:i,end:n}):(i=e,n="number"==typeof t?t:i,void(this.$el.setSelectionRange?this.$el.setSelectionRange(i,n):this.$el.createTextRange&&((s=this.$el.createTextRange()).collapse(!0),s.moveEnd("character",n),s.moveStart("character",i),s.select())))},isCompleted:function(){for(var e=this.firstNonMaskPos;e<=this.lastRequiredNonMaskPos;e++)if(this.tests[e]&&this.buffer[e]===this.getPlaceholder(e))return!1;return!0},getPlaceholder:function(e){return this.slotChar.charAt(e<this.slotChar.length?e:0)},seekNext:function(e){for(;++e<this.len&&!this.tests[e];);return e},seekPrev:function(e){for(;--e>=0&&!this.tests[e];);return e},shiftL:function(e,t){var s,i;if(!(e<0)){for(s=e,i=this.seekNext(t);s<this.len;s++)if(this.tests[s]){if(!(i<this.len&&this.tests[s].test(this.buffer[i])))break;this.buffer[s]=this.buffer[i],this.buffer[i]=this.getPlaceholder(i),i=this.seekNext(i)}this.writeBuffer(),this.caret(Math.max(this.firstNonMaskPos,e))}},shiftR:function(e){var t,s,i,n;for(t=e,s=this.getPlaceholder(e);t<this.len;t++)if(this.tests[t]){if(i=this.seekNext(t),n=this.buffer[t],this.buffer[t]=s,!(i<this.len&&this.tests[i].test(n)))break;s=n}},handleAndroidInput:function(e){var t=this.$el.value,s=this.caret();if(this.oldVal&&this.oldVal.length&&this.oldVal.length>t.length){for(this.checkVal(!0);s.begin>0&&!this.tests[s.begin-1];)s.begin--;if(0===s.begin)for(;s.begin<this.firstNonMaskPos&&!this.tests[s.begin];)s.begin++;this.caret(s.begin,s.begin)}else{for(this.checkVal(!0);s.begin<this.len&&!this.tests[s.begin];)s.begin++;this.caret(s.begin,s.begin)}this.isCompleted()&&this.$emit("complete",e)},clearBuffer:function(e,t){var s;for(s=e;s<t&&s<this.len;s++)this.tests[s]&&(this.buffer[s]=this.getPlaceholder(s))},writeBuffer:function(){this.$el.value=this.buffer.join("")},checkVal:function(e){this.isValueChecked=!0;var t,s,i,n=this.$el.value,a=-1;for(t=0,i=0;t<this.len;t++)if(this.tests[t]){for(this.buffer[t]=this.getPlaceholder(t);i++<n.length;)if(s=n.charAt(i-1),this.tests[t].test(s)){this.buffer[t]=s,a=t;break}if(i>n.length){this.clearBuffer(t+1,this.len);break}}else this.buffer[t]===n.charAt(i)&&i++,t<this.partialPosition&&(a=t);return e?this.writeBuffer():a+1<this.partialPosition?this.autoClear||this.buffer.join("")===this.defaultBuffer?(this.$el.value&&(this.$el.value=""),this.clearBuffer(0,this.len)):this.writeBuffer():(this.writeBuffer(),this.$el.value=this.$el.value.substring(0,a+1)),this.partialPosition?t:this.firstNonMaskPos},handleInputChange:function(e){if(!this.readonly){var t=this.checkVal(!0);this.caret(t),this.updateModel(e),this.isCompleted()&&this.$emit("complete",e)}},getUnmaskedValue:function(){for(var e=[],t=0;t<this.buffer.length;t++){var s=this.buffer[t];this.tests[t]&&s!==this.getPlaceholder(t)&&e.push(s)}return e.join("")},updateModel:function(e){var t=this.unmask?this.getUnmaskedValue():e.target.value;this.$emit("update:modelValue",this.defaultBuffer!==t?t:"")},updateValue:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.$el&&(null==this.modelValue?(this.$el.value="",t&&this.$emit("update:modelValue","")):(this.$el.value=this.modelValue,this.checkVal(),setTimeout((function(){if(e.$el&&(e.writeBuffer(),e.checkVal(),t)){var s=e.unmask?e.getUnmaskedValue():e.$el.value;e.$emit("update:modelValue",e.defaultBuffer!==s?s:"")}}),10)),this.focusText=this.$el.value)},initMask:function(){this.tests=[],this.partialPosition=this.mask.length,this.len=this.mask.length,this.firstNonMaskPos=null,this.defs={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"};var t=e.DomHandler.getUserAgent();this.androidChrome=/chrome/i.test(t)&&/android/i.test(t);for(var s=this.mask.split(""),i=0;i<s.length;i++){var n=s[i];"?"===n?(this.len--,this.partialPosition=i):this.defs[n]?(this.tests.push(new RegExp(this.defs[n])),null===this.firstNonMaskPos&&(this.firstNonMaskPos=this.tests.length-1),i<this.partialPosition&&(this.lastRequiredNonMaskPos=this.tests.length-1)):this.tests.push(null)}this.buffer=[];for(var a=0;a<s.length;a++){var h=s[a];"?"!==h&&this.buffer.push(this.defs[h]?this.getPlaceholder(a):h)}this.defaultBuffer=this.buffer.join(""),this.updateValue(!1)},isValueUpdated:function(){return this.unmask?this.modelValue!=this.getUnmaskedValue():this.defaultBuffer!==this.$el.value&&this.$el.value!==this.modelValue}},computed:{filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0},ptmParams:function(){return{context:{filled:this.filled,disabled:this.$attrs.disabled||""===this.$attrs.disabled}}}}},a=["readonly"];n.render=function(e,t,i,n,h,l){return s.openBlock(),s.createElementBlock("input",s.mergeProps({class:e.cx("root"),readonly:e.readonly,onInput:t[0]||(t[0]=function(){return l.onInput&&l.onInput.apply(l,arguments)}),onFocus:t[1]||(t[1]=function(){return l.onFocus&&l.onFocus.apply(l,arguments)}),onBlur:t[2]||(t[2]=function(){return l.onBlur&&l.onBlur.apply(l,arguments)}),onKeydown:t[3]||(t[3]=function(){return l.onKeyDown&&l.onKeyDown.apply(l,arguments)}),onKeypress:t[4]||(t[4]=function(){return l.onKeyPress&&l.onKeyPress.apply(l,arguments)}),onPaste:t[5]||(t[5]=function(){return l.onPaste&&l.onPaste.apply(l,arguments)})},e.ptm("root",l.ptmParams),{"data-pc-name":"inputmask"}),null,16,a)},module.exports=n;
|
|
@@ -455,6 +455,14 @@ var script = {
|
|
|
455
455
|
computed: {
|
|
456
456
|
filled: function filled() {
|
|
457
457
|
return this.modelValue != null && this.modelValue.toString().length > 0;
|
|
458
|
+
},
|
|
459
|
+
ptmParams: function ptmParams() {
|
|
460
|
+
return {
|
|
461
|
+
context: {
|
|
462
|
+
filled: this.filled,
|
|
463
|
+
disabled: this.$attrs.disabled || this.$attrs.disabled === ''
|
|
464
|
+
}
|
|
465
|
+
};
|
|
458
466
|
}
|
|
459
467
|
}
|
|
460
468
|
};
|
|
@@ -482,7 +490,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
482
490
|
onPaste: _cache[5] || (_cache[5] = function () {
|
|
483
491
|
return $options.onPaste && $options.onPaste.apply($options, arguments);
|
|
484
492
|
})
|
|
485
|
-
}, _ctx.ptm('root'), {
|
|
493
|
+
}, _ctx.ptm('root', $options.ptmParams), {
|
|
486
494
|
"data-pc-name": "inputmask"
|
|
487
495
|
}), null, 16, _hoisted_1);
|
|
488
496
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DomHandler as
|
|
1
|
+
import{DomHandler as t}from"primevue/utils";import e from"primevue/basecomponent";import{openBlock as s,createElementBlock as i,mergeProps as n}from"vue";var a={name:"InputMask",extends:{name:"BaseInputMask",extends:e,props:{modelValue:null,slotChar:{type:String,default:"_"},mask:{type:String,default:null},autoClear:{type:Boolean,default:!0},unmask:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},css:{classes:{root:function(t){return["p-inputmask p-inputtext p-component",{"p-filled":t.instance.filled}]}}}},emits:["update:modelValue","focus","blur","keydown","complete","keypress","paste"],watch:{mask:function(t,e){e!==t&&this.initMask()}},mounted:function(){this.initMask()},updated:function(){this.isValueUpdated()&&this.updateValue()},methods:{onInput:function(t){this.androidChrome?this.handleAndroidInput(t):this.handleInputChange(t),this.$emit("update:modelValue",t.target.value)},onFocus:function(t){var e,s=this;this.readonly||(this.focus=!0,clearTimeout(this.caretTimeoutId),this.focusText=this.$el.value,e=this.checkVal(),this.caretTimeoutId=setTimeout((function(){s.$el===document.activeElement&&(s.writeBuffer(),e===s.mask.replace("?","").length?s.caret(0,e):s.caret(e))}),10),this.$emit("focus",t))},onBlur:function(t){if(this.focus=!1,this.checkVal(),this.updateModel(t),this.$el.value!==this.focusText){var e=document.createEvent("HTMLEvents");e.initEvent("change",!0,!1),this.$el.dispatchEvent(e)}this.$emit("blur",t)},onKeyDown:function(e){if(!this.readonly){var s,i,n,a=e.which||e.keyCode,h=/iphone/i.test(t.getUserAgent());this.oldVal=this.$el.value,8===a||46===a||h&&127===a?((n=(s=this.caret()).end)-(i=s.begin)==0&&(i=46!==a?this.seekPrev(i):n=this.seekNext(i-1),n=46===a?this.seekNext(n):n),this.clearBuffer(i,n),this.shiftL(i,n-1),this.updateModel(e),e.preventDefault()):13===a?(this.$el.blur(),this.updateModel(e)):27===a&&(this.$el.value=this.focusText,this.caret(0,this.checkVal()),this.updateModel(e),e.preventDefault()),this.$emit("keydown",e)}},onKeyPress:function(e){var s=this;if(!this.readonly){var i,n,a,h,l=e.which||e.keyCode,r=this.caret();if(!(e.ctrlKey||e.altKey||e.metaKey||l<32)){if(l&&13!==l){if(r.end-r.begin!=0&&(this.clearBuffer(r.begin,r.end),this.shiftL(r.begin,r.end-1)),(i=this.seekNext(r.begin-1))<this.len&&(n=String.fromCharCode(l),this.tests[i].test(n))){if(this.shiftR(i),this.buffer[i]=n,this.writeBuffer(),a=this.seekNext(i),/android/i.test(t.getUserAgent())){setTimeout((function(){s.caret(a)}),0)}else this.caret(a);r.begin<=this.lastRequiredNonMaskPos&&(h=this.isCompleted())}e.preventDefault()}this.updateModel(e),h&&this.$emit("complete",e),this.$emit("keypress",e)}}},onPaste:function(t){this.handleInputChange(t),this.$emit("paste",t)},caret:function(t,e){var s,i,n;if(this.$el.offsetParent&&this.$el===document.activeElement)return"number"!=typeof t?(this.$el.setSelectionRange?(i=this.$el.selectionStart,n=this.$el.selectionEnd):document.selection&&document.selection.createRange&&(n=(i=0-(s=document.selection.createRange()).duplicate().moveStart("character",-1e5))+s.text.length),{begin:i,end:n}):(i=t,n="number"==typeof e?e:i,void(this.$el.setSelectionRange?this.$el.setSelectionRange(i,n):this.$el.createTextRange&&((s=this.$el.createTextRange()).collapse(!0),s.moveEnd("character",n),s.moveStart("character",i),s.select())))},isCompleted:function(){for(var t=this.firstNonMaskPos;t<=this.lastRequiredNonMaskPos;t++)if(this.tests[t]&&this.buffer[t]===this.getPlaceholder(t))return!1;return!0},getPlaceholder:function(t){return this.slotChar.charAt(t<this.slotChar.length?t:0)},seekNext:function(t){for(;++t<this.len&&!this.tests[t];);return t},seekPrev:function(t){for(;--t>=0&&!this.tests[t];);return t},shiftL:function(t,e){var s,i;if(!(t<0)){for(s=t,i=this.seekNext(e);s<this.len;s++)if(this.tests[s]){if(!(i<this.len&&this.tests[s].test(this.buffer[i])))break;this.buffer[s]=this.buffer[i],this.buffer[i]=this.getPlaceholder(i),i=this.seekNext(i)}this.writeBuffer(),this.caret(Math.max(this.firstNonMaskPos,t))}},shiftR:function(t){var e,s,i,n;for(e=t,s=this.getPlaceholder(t);e<this.len;e++)if(this.tests[e]){if(i=this.seekNext(e),n=this.buffer[e],this.buffer[e]=s,!(i<this.len&&this.tests[i].test(n)))break;s=n}},handleAndroidInput:function(t){var e=this.$el.value,s=this.caret();if(this.oldVal&&this.oldVal.length&&this.oldVal.length>e.length){for(this.checkVal(!0);s.begin>0&&!this.tests[s.begin-1];)s.begin--;if(0===s.begin)for(;s.begin<this.firstNonMaskPos&&!this.tests[s.begin];)s.begin++;this.caret(s.begin,s.begin)}else{for(this.checkVal(!0);s.begin<this.len&&!this.tests[s.begin];)s.begin++;this.caret(s.begin,s.begin)}this.isCompleted()&&this.$emit("complete",t)},clearBuffer:function(t,e){var s;for(s=t;s<e&&s<this.len;s++)this.tests[s]&&(this.buffer[s]=this.getPlaceholder(s))},writeBuffer:function(){this.$el.value=this.buffer.join("")},checkVal:function(t){this.isValueChecked=!0;var e,s,i,n=this.$el.value,a=-1;for(e=0,i=0;e<this.len;e++)if(this.tests[e]){for(this.buffer[e]=this.getPlaceholder(e);i++<n.length;)if(s=n.charAt(i-1),this.tests[e].test(s)){this.buffer[e]=s,a=e;break}if(i>n.length){this.clearBuffer(e+1,this.len);break}}else this.buffer[e]===n.charAt(i)&&i++,e<this.partialPosition&&(a=e);return t?this.writeBuffer():a+1<this.partialPosition?this.autoClear||this.buffer.join("")===this.defaultBuffer?(this.$el.value&&(this.$el.value=""),this.clearBuffer(0,this.len)):this.writeBuffer():(this.writeBuffer(),this.$el.value=this.$el.value.substring(0,a+1)),this.partialPosition?e:this.firstNonMaskPos},handleInputChange:function(t){if(!this.readonly){var e=this.checkVal(!0);this.caret(e),this.updateModel(t),this.isCompleted()&&this.$emit("complete",t)}},getUnmaskedValue:function(){for(var t=[],e=0;e<this.buffer.length;e++){var s=this.buffer[e];this.tests[e]&&s!==this.getPlaceholder(e)&&t.push(s)}return t.join("")},updateModel:function(t){var e=this.unmask?this.getUnmaskedValue():t.target.value;this.$emit("update:modelValue",this.defaultBuffer!==e?e:"")},updateValue:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.$el&&(null==this.modelValue?(this.$el.value="",e&&this.$emit("update:modelValue","")):(this.$el.value=this.modelValue,this.checkVal(),setTimeout((function(){if(t.$el&&(t.writeBuffer(),t.checkVal(),e)){var s=t.unmask?t.getUnmaskedValue():t.$el.value;t.$emit("update:modelValue",t.defaultBuffer!==s?s:"")}}),10)),this.focusText=this.$el.value)},initMask:function(){this.tests=[],this.partialPosition=this.mask.length,this.len=this.mask.length,this.firstNonMaskPos=null,this.defs={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"};var e=t.getUserAgent();this.androidChrome=/chrome/i.test(e)&&/android/i.test(e);for(var s=this.mask.split(""),i=0;i<s.length;i++){var n=s[i];"?"===n?(this.len--,this.partialPosition=i):this.defs[n]?(this.tests.push(new RegExp(this.defs[n])),null===this.firstNonMaskPos&&(this.firstNonMaskPos=this.tests.length-1),i<this.partialPosition&&(this.lastRequiredNonMaskPos=this.tests.length-1)):this.tests.push(null)}this.buffer=[];for(var a=0;a<s.length;a++){var h=s[a];"?"!==h&&this.buffer.push(this.defs[h]?this.getPlaceholder(a):h)}this.defaultBuffer=this.buffer.join(""),this.updateValue(!1)},isValueUpdated:function(){return this.unmask?this.modelValue!=this.getUnmaskedValue():this.defaultBuffer!==this.$el.value&&this.$el.value!==this.modelValue}},computed:{filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0},ptmParams:function(){return{context:{filled:this.filled,disabled:this.$attrs.disabled||""===this.$attrs.disabled}}}}},h=["readonly"];a.render=function(t,e,a,l,r,o){return s(),i("input",n({class:t.cx("root"),readonly:t.readonly,onInput:e[0]||(e[0]=function(){return o.onInput&&o.onInput.apply(o,arguments)}),onFocus:e[1]||(e[1]=function(){return o.onFocus&&o.onFocus.apply(o,arguments)}),onBlur:e[2]||(e[2]=function(){return o.onBlur&&o.onBlur.apply(o,arguments)}),onKeydown:e[3]||(e[3]=function(){return o.onKeyDown&&o.onKeyDown.apply(o,arguments)}),onKeypress:e[4]||(e[4]=function(){return o.onKeyPress&&o.onKeyPress.apply(o,arguments)}),onPaste:e[5]||(e[5]=function(){return o.onPaste&&o.onPaste.apply(o,arguments)})},t.ptm("root",o.ptmParams),{"data-pc-name":"inputmask"}),null,16,h)};export{a as default};
|
package/inputmask/inputmask.js
CHANGED
|
@@ -459,6 +459,14 @@ this.primevue.inputmask = (function (utils, BaseComponent, vue) {
|
|
|
459
459
|
computed: {
|
|
460
460
|
filled: function filled() {
|
|
461
461
|
return this.modelValue != null && this.modelValue.toString().length > 0;
|
|
462
|
+
},
|
|
463
|
+
ptmParams: function ptmParams() {
|
|
464
|
+
return {
|
|
465
|
+
context: {
|
|
466
|
+
filled: this.filled,
|
|
467
|
+
disabled: this.$attrs.disabled || this.$attrs.disabled === ''
|
|
468
|
+
}
|
|
469
|
+
};
|
|
462
470
|
}
|
|
463
471
|
}
|
|
464
472
|
};
|
|
@@ -486,7 +494,7 @@ this.primevue.inputmask = (function (utils, BaseComponent, vue) {
|
|
|
486
494
|
onPaste: _cache[5] || (_cache[5] = function () {
|
|
487
495
|
return $options.onPaste && $options.onPaste.apply($options, arguments);
|
|
488
496
|
})
|
|
489
|
-
}, _ctx.ptm('root'), {
|
|
497
|
+
}, _ctx.ptm('root', $options.ptmParams), {
|
|
490
498
|
"data-pc-name": "inputmask"
|
|
491
499
|
}), null, 16, _hoisted_1);
|
|
492
500
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.inputmask=function(e,t,s){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n={name:"InputMask",extends:{name:"BaseInputMask",extends:i(t).default,props:{modelValue:null,slotChar:{type:String,default:"_"},mask:{type:String,default:null},autoClear:{type:Boolean,default:!0},unmask:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},css:{classes:{root:function(e){return["p-inputmask p-inputtext p-component",{"p-filled":e.instance.filled}]}}}},emits:["update:modelValue","focus","blur","keydown","complete","keypress","paste"],watch:{mask:function(e,t){t!==e&&this.initMask()}},mounted:function(){this.initMask()},updated:function(){this.isValueUpdated()&&this.updateValue()},methods:{onInput:function(e){this.androidChrome?this.handleAndroidInput(e):this.handleInputChange(e),this.$emit("update:modelValue",e.target.value)},onFocus:function(e){var t,s=this;this.readonly||(this.focus=!0,clearTimeout(this.caretTimeoutId),this.focusText=this.$el.value,t=this.checkVal(),this.caretTimeoutId=setTimeout((function(){s.$el===document.activeElement&&(s.writeBuffer(),t===s.mask.replace("?","").length?s.caret(0,t):s.caret(t))}),10),this.$emit("focus",e))},onBlur:function(e){if(this.focus=!1,this.checkVal(),this.updateModel(e),this.$el.value!==this.focusText){var t=document.createEvent("HTMLEvents");t.initEvent("change",!0,!1),this.$el.dispatchEvent(t)}this.$emit("blur",e)},onKeyDown:function(t){if(!this.readonly){var s,i,n,a=t.which||t.keyCode,h=/iphone/i.test(e.DomHandler.getUserAgent());this.oldVal=this.$el.value,8===a||46===a||h&&127===a?((n=(s=this.caret()).end)-(i=s.begin)==0&&(i=46!==a?this.seekPrev(i):n=this.seekNext(i-1),n=46===a?this.seekNext(n):n),this.clearBuffer(i,n),this.shiftL(i,n-1),this.updateModel(t),t.preventDefault()):13===a?(this.$el.blur(),this.updateModel(t)):27===a&&(this.$el.value=this.focusText,this.caret(0,this.checkVal()),this.updateModel(t),t.preventDefault()),this.$emit("keydown",t)}},onKeyPress:function(t){var s=this;if(!this.readonly){var i,n,a,h,l=t.which||t.keyCode,r=this.caret();if(!(t.ctrlKey||t.altKey||t.metaKey||l<32)){if(l&&13!==l){if(r.end-r.begin!=0&&(this.clearBuffer(r.begin,r.end),this.shiftL(r.begin,r.end-1)),(i=this.seekNext(r.begin-1))<this.len&&(n=String.fromCharCode(l),this.tests[i].test(n))){if(this.shiftR(i),this.buffer[i]=n,this.writeBuffer(),a=this.seekNext(i),/android/i.test(e.DomHandler.getUserAgent())){setTimeout((function(){s.caret(a)}),0)}else this.caret(a);r.begin<=this.lastRequiredNonMaskPos&&(h=this.isCompleted())}t.preventDefault()}this.updateModel(t),h&&this.$emit("complete",t),this.$emit("keypress",t)}}},onPaste:function(e){this.handleInputChange(e),this.$emit("paste",e)},caret:function(e,t){var s,i,n;if(this.$el.offsetParent&&this.$el===document.activeElement)return"number"!=typeof e?(this.$el.setSelectionRange?(i=this.$el.selectionStart,n=this.$el.selectionEnd):document.selection&&document.selection.createRange&&(n=(i=0-(s=document.selection.createRange()).duplicate().moveStart("character",-1e5))+s.text.length),{begin:i,end:n}):(i=e,n="number"==typeof t?t:i,void(this.$el.setSelectionRange?this.$el.setSelectionRange(i,n):this.$el.createTextRange&&((s=this.$el.createTextRange()).collapse(!0),s.moveEnd("character",n),s.moveStart("character",i),s.select())))},isCompleted:function(){for(var e=this.firstNonMaskPos;e<=this.lastRequiredNonMaskPos;e++)if(this.tests[e]&&this.buffer[e]===this.getPlaceholder(e))return!1;return!0},getPlaceholder:function(e){return this.slotChar.charAt(e<this.slotChar.length?e:0)},seekNext:function(e){for(;++e<this.len&&!this.tests[e];);return e},seekPrev:function(e){for(;--e>=0&&!this.tests[e];);return e},shiftL:function(e,t){var s,i;if(!(e<0)){for(s=e,i=this.seekNext(t);s<this.len;s++)if(this.tests[s]){if(!(i<this.len&&this.tests[s].test(this.buffer[i])))break;this.buffer[s]=this.buffer[i],this.buffer[i]=this.getPlaceholder(i),i=this.seekNext(i)}this.writeBuffer(),this.caret(Math.max(this.firstNonMaskPos,e))}},shiftR:function(e){var t,s,i,n;for(t=e,s=this.getPlaceholder(e);t<this.len;t++)if(this.tests[t]){if(i=this.seekNext(t),n=this.buffer[t],this.buffer[t]=s,!(i<this.len&&this.tests[i].test(n)))break;s=n}},handleAndroidInput:function(e){var t=this.$el.value,s=this.caret();if(this.oldVal&&this.oldVal.length&&this.oldVal.length>t.length){for(this.checkVal(!0);s.begin>0&&!this.tests[s.begin-1];)s.begin--;if(0===s.begin)for(;s.begin<this.firstNonMaskPos&&!this.tests[s.begin];)s.begin++;this.caret(s.begin,s.begin)}else{for(this.checkVal(!0);s.begin<this.len&&!this.tests[s.begin];)s.begin++;this.caret(s.begin,s.begin)}this.isCompleted()&&this.$emit("complete",e)},clearBuffer:function(e,t){var s;for(s=e;s<t&&s<this.len;s++)this.tests[s]&&(this.buffer[s]=this.getPlaceholder(s))},writeBuffer:function(){this.$el.value=this.buffer.join("")},checkVal:function(e){this.isValueChecked=!0;var t,s,i,n=this.$el.value,a=-1;for(t=0,i=0;t<this.len;t++)if(this.tests[t]){for(this.buffer[t]=this.getPlaceholder(t);i++<n.length;)if(s=n.charAt(i-1),this.tests[t].test(s)){this.buffer[t]=s,a=t;break}if(i>n.length){this.clearBuffer(t+1,this.len);break}}else this.buffer[t]===n.charAt(i)&&i++,t<this.partialPosition&&(a=t);return e?this.writeBuffer():a+1<this.partialPosition?this.autoClear||this.buffer.join("")===this.defaultBuffer?(this.$el.value&&(this.$el.value=""),this.clearBuffer(0,this.len)):this.writeBuffer():(this.writeBuffer(),this.$el.value=this.$el.value.substring(0,a+1)),this.partialPosition?t:this.firstNonMaskPos},handleInputChange:function(e){if(!this.readonly){var t=this.checkVal(!0);this.caret(t),this.updateModel(e),this.isCompleted()&&this.$emit("complete",e)}},getUnmaskedValue:function(){for(var e=[],t=0;t<this.buffer.length;t++){var s=this.buffer[t];this.tests[t]&&s!==this.getPlaceholder(t)&&e.push(s)}return e.join("")},updateModel:function(e){var t=this.unmask?this.getUnmaskedValue():e.target.value;this.$emit("update:modelValue",this.defaultBuffer!==t?t:"")},updateValue:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.$el&&(null==this.modelValue?(this.$el.value="",t&&this.$emit("update:modelValue","")):(this.$el.value=this.modelValue,this.checkVal(),setTimeout((function(){if(e.$el&&(e.writeBuffer(),e.checkVal(),t)){var s=e.unmask?e.getUnmaskedValue():e.$el.value;e.$emit("update:modelValue",e.defaultBuffer!==s?s:"")}}),10)),this.focusText=this.$el.value)},initMask:function(){this.tests=[],this.partialPosition=this.mask.length,this.len=this.mask.length,this.firstNonMaskPos=null,this.defs={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"};var t=e.DomHandler.getUserAgent();this.androidChrome=/chrome/i.test(t)&&/android/i.test(t);for(var s=this.mask.split(""),i=0;i<s.length;i++){var n=s[i];"?"===n?(this.len--,this.partialPosition=i):this.defs[n]?(this.tests.push(new RegExp(this.defs[n])),null===this.firstNonMaskPos&&(this.firstNonMaskPos=this.tests.length-1),i<this.partialPosition&&(this.lastRequiredNonMaskPos=this.tests.length-1)):this.tests.push(null)}this.buffer=[];for(var a=0;a<s.length;a++){var h=s[a];"?"!==h&&this.buffer.push(this.defs[h]?this.getPlaceholder(a):h)}this.defaultBuffer=this.buffer.join(""),this.updateValue(!1)},isValueUpdated:function(){return this.unmask?this.modelValue!=this.getUnmaskedValue():this.defaultBuffer!==this.$el.value&&this.$el.value!==this.modelValue}},computed:{filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0}}},a=["readonly"];return n.render=function(e,t,i,n,h,l){return s.openBlock(),s.createElementBlock("input",s.mergeProps({class:e.cx("root"),readonly:e.readonly,onInput:t[0]||(t[0]=function(){return l.onInput&&l.onInput.apply(l,arguments)}),onFocus:t[1]||(t[1]=function(){return l.onFocus&&l.onFocus.apply(l,arguments)}),onBlur:t[2]||(t[2]=function(){return l.onBlur&&l.onBlur.apply(l,arguments)}),onKeydown:t[3]||(t[3]=function(){return l.onKeyDown&&l.onKeyDown.apply(l,arguments)}),onKeypress:t[4]||(t[4]=function(){return l.onKeyPress&&l.onKeyPress.apply(l,arguments)}),onPaste:t[5]||(t[5]=function(){return l.onPaste&&l.onPaste.apply(l,arguments)})},e.ptm("root"),{"data-pc-name":"inputmask"}),null,16,a)},n}(primevue.utils,primevue.basecomponent,Vue);
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.inputmask=function(e,t,s){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n={name:"InputMask",extends:{name:"BaseInputMask",extends:i(t).default,props:{modelValue:null,slotChar:{type:String,default:"_"},mask:{type:String,default:null},autoClear:{type:Boolean,default:!0},unmask:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},css:{classes:{root:function(e){return["p-inputmask p-inputtext p-component",{"p-filled":e.instance.filled}]}}}},emits:["update:modelValue","focus","blur","keydown","complete","keypress","paste"],watch:{mask:function(e,t){t!==e&&this.initMask()}},mounted:function(){this.initMask()},updated:function(){this.isValueUpdated()&&this.updateValue()},methods:{onInput:function(e){this.androidChrome?this.handleAndroidInput(e):this.handleInputChange(e),this.$emit("update:modelValue",e.target.value)},onFocus:function(e){var t,s=this;this.readonly||(this.focus=!0,clearTimeout(this.caretTimeoutId),this.focusText=this.$el.value,t=this.checkVal(),this.caretTimeoutId=setTimeout((function(){s.$el===document.activeElement&&(s.writeBuffer(),t===s.mask.replace("?","").length?s.caret(0,t):s.caret(t))}),10),this.$emit("focus",e))},onBlur:function(e){if(this.focus=!1,this.checkVal(),this.updateModel(e),this.$el.value!==this.focusText){var t=document.createEvent("HTMLEvents");t.initEvent("change",!0,!1),this.$el.dispatchEvent(t)}this.$emit("blur",e)},onKeyDown:function(t){if(!this.readonly){var s,i,n,a=t.which||t.keyCode,h=/iphone/i.test(e.DomHandler.getUserAgent());this.oldVal=this.$el.value,8===a||46===a||h&&127===a?((n=(s=this.caret()).end)-(i=s.begin)==0&&(i=46!==a?this.seekPrev(i):n=this.seekNext(i-1),n=46===a?this.seekNext(n):n),this.clearBuffer(i,n),this.shiftL(i,n-1),this.updateModel(t),t.preventDefault()):13===a?(this.$el.blur(),this.updateModel(t)):27===a&&(this.$el.value=this.focusText,this.caret(0,this.checkVal()),this.updateModel(t),t.preventDefault()),this.$emit("keydown",t)}},onKeyPress:function(t){var s=this;if(!this.readonly){var i,n,a,h,l=t.which||t.keyCode,r=this.caret();if(!(t.ctrlKey||t.altKey||t.metaKey||l<32)){if(l&&13!==l){if(r.end-r.begin!=0&&(this.clearBuffer(r.begin,r.end),this.shiftL(r.begin,r.end-1)),(i=this.seekNext(r.begin-1))<this.len&&(n=String.fromCharCode(l),this.tests[i].test(n))){if(this.shiftR(i),this.buffer[i]=n,this.writeBuffer(),a=this.seekNext(i),/android/i.test(e.DomHandler.getUserAgent())){setTimeout((function(){s.caret(a)}),0)}else this.caret(a);r.begin<=this.lastRequiredNonMaskPos&&(h=this.isCompleted())}t.preventDefault()}this.updateModel(t),h&&this.$emit("complete",t),this.$emit("keypress",t)}}},onPaste:function(e){this.handleInputChange(e),this.$emit("paste",e)},caret:function(e,t){var s,i,n;if(this.$el.offsetParent&&this.$el===document.activeElement)return"number"!=typeof e?(this.$el.setSelectionRange?(i=this.$el.selectionStart,n=this.$el.selectionEnd):document.selection&&document.selection.createRange&&(n=(i=0-(s=document.selection.createRange()).duplicate().moveStart("character",-1e5))+s.text.length),{begin:i,end:n}):(i=e,n="number"==typeof t?t:i,void(this.$el.setSelectionRange?this.$el.setSelectionRange(i,n):this.$el.createTextRange&&((s=this.$el.createTextRange()).collapse(!0),s.moveEnd("character",n),s.moveStart("character",i),s.select())))},isCompleted:function(){for(var e=this.firstNonMaskPos;e<=this.lastRequiredNonMaskPos;e++)if(this.tests[e]&&this.buffer[e]===this.getPlaceholder(e))return!1;return!0},getPlaceholder:function(e){return this.slotChar.charAt(e<this.slotChar.length?e:0)},seekNext:function(e){for(;++e<this.len&&!this.tests[e];);return e},seekPrev:function(e){for(;--e>=0&&!this.tests[e];);return e},shiftL:function(e,t){var s,i;if(!(e<0)){for(s=e,i=this.seekNext(t);s<this.len;s++)if(this.tests[s]){if(!(i<this.len&&this.tests[s].test(this.buffer[i])))break;this.buffer[s]=this.buffer[i],this.buffer[i]=this.getPlaceholder(i),i=this.seekNext(i)}this.writeBuffer(),this.caret(Math.max(this.firstNonMaskPos,e))}},shiftR:function(e){var t,s,i,n;for(t=e,s=this.getPlaceholder(e);t<this.len;t++)if(this.tests[t]){if(i=this.seekNext(t),n=this.buffer[t],this.buffer[t]=s,!(i<this.len&&this.tests[i].test(n)))break;s=n}},handleAndroidInput:function(e){var t=this.$el.value,s=this.caret();if(this.oldVal&&this.oldVal.length&&this.oldVal.length>t.length){for(this.checkVal(!0);s.begin>0&&!this.tests[s.begin-1];)s.begin--;if(0===s.begin)for(;s.begin<this.firstNonMaskPos&&!this.tests[s.begin];)s.begin++;this.caret(s.begin,s.begin)}else{for(this.checkVal(!0);s.begin<this.len&&!this.tests[s.begin];)s.begin++;this.caret(s.begin,s.begin)}this.isCompleted()&&this.$emit("complete",e)},clearBuffer:function(e,t){var s;for(s=e;s<t&&s<this.len;s++)this.tests[s]&&(this.buffer[s]=this.getPlaceholder(s))},writeBuffer:function(){this.$el.value=this.buffer.join("")},checkVal:function(e){this.isValueChecked=!0;var t,s,i,n=this.$el.value,a=-1;for(t=0,i=0;t<this.len;t++)if(this.tests[t]){for(this.buffer[t]=this.getPlaceholder(t);i++<n.length;)if(s=n.charAt(i-1),this.tests[t].test(s)){this.buffer[t]=s,a=t;break}if(i>n.length){this.clearBuffer(t+1,this.len);break}}else this.buffer[t]===n.charAt(i)&&i++,t<this.partialPosition&&(a=t);return e?this.writeBuffer():a+1<this.partialPosition?this.autoClear||this.buffer.join("")===this.defaultBuffer?(this.$el.value&&(this.$el.value=""),this.clearBuffer(0,this.len)):this.writeBuffer():(this.writeBuffer(),this.$el.value=this.$el.value.substring(0,a+1)),this.partialPosition?t:this.firstNonMaskPos},handleInputChange:function(e){if(!this.readonly){var t=this.checkVal(!0);this.caret(t),this.updateModel(e),this.isCompleted()&&this.$emit("complete",e)}},getUnmaskedValue:function(){for(var e=[],t=0;t<this.buffer.length;t++){var s=this.buffer[t];this.tests[t]&&s!==this.getPlaceholder(t)&&e.push(s)}return e.join("")},updateModel:function(e){var t=this.unmask?this.getUnmaskedValue():e.target.value;this.$emit("update:modelValue",this.defaultBuffer!==t?t:"")},updateValue:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.$el&&(null==this.modelValue?(this.$el.value="",t&&this.$emit("update:modelValue","")):(this.$el.value=this.modelValue,this.checkVal(),setTimeout((function(){if(e.$el&&(e.writeBuffer(),e.checkVal(),t)){var s=e.unmask?e.getUnmaskedValue():e.$el.value;e.$emit("update:modelValue",e.defaultBuffer!==s?s:"")}}),10)),this.focusText=this.$el.value)},initMask:function(){this.tests=[],this.partialPosition=this.mask.length,this.len=this.mask.length,this.firstNonMaskPos=null,this.defs={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"};var t=e.DomHandler.getUserAgent();this.androidChrome=/chrome/i.test(t)&&/android/i.test(t);for(var s=this.mask.split(""),i=0;i<s.length;i++){var n=s[i];"?"===n?(this.len--,this.partialPosition=i):this.defs[n]?(this.tests.push(new RegExp(this.defs[n])),null===this.firstNonMaskPos&&(this.firstNonMaskPos=this.tests.length-1),i<this.partialPosition&&(this.lastRequiredNonMaskPos=this.tests.length-1)):this.tests.push(null)}this.buffer=[];for(var a=0;a<s.length;a++){var h=s[a];"?"!==h&&this.buffer.push(this.defs[h]?this.getPlaceholder(a):h)}this.defaultBuffer=this.buffer.join(""),this.updateValue(!1)},isValueUpdated:function(){return this.unmask?this.modelValue!=this.getUnmaskedValue():this.defaultBuffer!==this.$el.value&&this.$el.value!==this.modelValue}},computed:{filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0},ptmParams:function(){return{context:{filled:this.filled,disabled:this.$attrs.disabled||""===this.$attrs.disabled}}}}},a=["readonly"];return n.render=function(e,t,i,n,h,l){return s.openBlock(),s.createElementBlock("input",s.mergeProps({class:e.cx("root"),readonly:e.readonly,onInput:t[0]||(t[0]=function(){return l.onInput&&l.onInput.apply(l,arguments)}),onFocus:t[1]||(t[1]=function(){return l.onFocus&&l.onFocus.apply(l,arguments)}),onBlur:t[2]||(t[2]=function(){return l.onBlur&&l.onBlur.apply(l,arguments)}),onKeydown:t[3]||(t[3]=function(){return l.onKeyDown&&l.onKeyDown.apply(l,arguments)}),onKeypress:t[4]||(t[4]=function(){return l.onKeyPress&&l.onKeyPress.apply(l,arguments)}),onPaste:t[5]||(t[5]=function(){return l.onPaste&&l.onPaste.apply(l,arguments)})},e.ptm("root",l.ptmParams),{"data-pc-name":"inputmask"}),null,16,a)},n}(primevue.utils,primevue.basecomponent,Vue);
|
|
@@ -60,30 +60,30 @@ export interface InputNumberBlurEvent {
|
|
|
60
60
|
*/
|
|
61
61
|
export interface InputNumberPassThroughOptions {
|
|
62
62
|
/**
|
|
63
|
-
*
|
|
63
|
+
* Used to pass attributes to the root's DOM element.
|
|
64
64
|
*/
|
|
65
65
|
root?: InputNumberPassThroughOptionType;
|
|
66
66
|
/**
|
|
67
|
-
*
|
|
67
|
+
* Used to pass attributes to the Input component.
|
|
68
68
|
* @see {@link InputTextPassThroughOptionType}
|
|
69
69
|
*/
|
|
70
70
|
input?: InputTextPassThroughOptionType;
|
|
71
71
|
/**
|
|
72
|
-
*
|
|
72
|
+
* Used to pass attributes to the button group's DOM element.
|
|
73
73
|
*/
|
|
74
74
|
buttonGroup?: InputNumberPassThroughOptionType;
|
|
75
75
|
/**
|
|
76
|
-
*
|
|
76
|
+
* Used to pass attributes to the Button component.
|
|
77
77
|
* @see {@link ButtonPassThroughOptions}
|
|
78
78
|
*/
|
|
79
79
|
incrementButton?: ButtonPassThroughOptionType;
|
|
80
80
|
/**
|
|
81
|
-
*
|
|
81
|
+
* Used to pass attributes to the Button component.
|
|
82
82
|
* @see {@link ButtonPassThroughOptions}
|
|
83
83
|
*/
|
|
84
84
|
decrementButton?: ButtonPassThroughOptionType;
|
|
85
85
|
/**
|
|
86
|
-
*
|
|
86
|
+
* Used to manage all lifecycle hooks
|
|
87
87
|
* @see {@link BaseComponent.ComponentHooks}
|
|
88
88
|
*/
|
|
89
89
|
hooks?: ComponentHooks;
|
|
@@ -250,15 +250,15 @@ export interface InputNumberProps {
|
|
|
250
250
|
*/
|
|
251
251
|
inputStyle?: object | undefined;
|
|
252
252
|
/**
|
|
253
|
-
*
|
|
253
|
+
* Used to pass all properties of the HTMLInputElement to the focusable input element inside the component.
|
|
254
254
|
*/
|
|
255
255
|
inputProps?: InputHTMLAttributes | undefined;
|
|
256
256
|
/**
|
|
257
|
-
*
|
|
257
|
+
* Used to pass all properties of the HTMLButtonElement to increment button inside the component.
|
|
258
258
|
*/
|
|
259
259
|
incrementButtonProps?: ButtonHTMLAttributes | undefined;
|
|
260
260
|
/**
|
|
261
|
-
*
|
|
261
|
+
* Used to pass all properties of the HTMLButtonElement to decrement button inside the component.
|
|
262
262
|
*/
|
|
263
263
|
decrementButtonProps?: ButtonHTMLAttributes | undefined;
|
|
264
264
|
/**
|
|
@@ -270,7 +270,7 @@ export interface InputNumberProps {
|
|
|
270
270
|
*/
|
|
271
271
|
'aria-label'?: string | undefined;
|
|
272
272
|
/**
|
|
273
|
-
*
|
|
273
|
+
* Used to pass attributes to DOM elements inside the component.
|
|
274
274
|
* @type {InputNumberPassThroughOptions}
|
|
275
275
|
*/
|
|
276
276
|
pt?: InputNumberPassThroughOptions;
|
|
@@ -28,23 +28,23 @@ export interface InputSwitchPassThroughMethodOptions {
|
|
|
28
28
|
*/
|
|
29
29
|
export interface InputSwitchPassThroughOptions {
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* Used to pass attributes to the root's DOM element.
|
|
32
32
|
*/
|
|
33
33
|
root?: InputSwitchPassThroughOptionType;
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* Used to pass attributes to the slider's DOM element.
|
|
36
36
|
*/
|
|
37
37
|
slider?: InputSwitchPassThroughOptionType;
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
39
|
+
* Used to pass attributes to the hidden input wrapper's DOM element.
|
|
40
40
|
*/
|
|
41
41
|
hiddenInputWrapper?: InputSwitchPassThroughOptionType;
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
43
|
+
* Used to pass attributes to the hidden input's DOM element.
|
|
44
44
|
*/
|
|
45
45
|
hiddenInput?: InputSwitchPassThroughOptionType;
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
47
|
+
* Used to manage all lifecycle hooks
|
|
48
48
|
* @see {@link BaseComponent.ComponentHooks}
|
|
49
49
|
*/
|
|
50
50
|
hooks?: ComponentHooks;
|
|
@@ -100,7 +100,7 @@ export interface InputSwitchProps {
|
|
|
100
100
|
*/
|
|
101
101
|
inputStyle?: object | undefined;
|
|
102
102
|
/**
|
|
103
|
-
*
|
|
103
|
+
* Used to pass all properties of the HTMLInputElement to the focusable input element inside the component.
|
|
104
104
|
*/
|
|
105
105
|
inputProps?: InputHTMLAttributes | undefined;
|
|
106
106
|
/**
|
|
@@ -112,10 +112,10 @@ export interface InputSwitchProps {
|
|
|
112
112
|
*/
|
|
113
113
|
'aria-label'?: string | undefined;
|
|
114
114
|
/**
|
|
115
|
-
*
|
|
116
|
-
* @type {
|
|
115
|
+
* Used to pass attributes to DOM elements inside the component.
|
|
116
|
+
* @type {InputSwitchPassThroughOptions}
|
|
117
117
|
*/
|
|
118
|
-
pt?:
|
|
118
|
+
pt?: InputSwitchPassThroughOptions;
|
|
119
119
|
/**
|
|
120
120
|
* When enabled, it removes component related styles in the core.
|
|
121
121
|
* @defaultValue false
|