primevue 3.47.1 → 3.48.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/README.md +1 -1
- package/accordion/style/accordionstyle.cjs.js +0 -2
- package/accordion/style/accordionstyle.cjs.min.js +1 -1
- package/accordion/style/accordionstyle.esm.js +0 -2
- package/accordion/style/accordionstyle.esm.min.js +1 -1
- package/accordion/style/accordionstyle.js +0 -2
- package/accordion/style/accordionstyle.min.js +1 -1
- package/autocomplete/AutoComplete.d.ts +10 -0
- package/autocomplete/AutoComplete.vue +2 -14
- package/autocomplete/BaseAutoComplete.vue +8 -0
- package/autocomplete/autocomplete.cjs.js +10 -5
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +10 -5
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +10 -5
- package/autocomplete/autocomplete.min.js +1 -1
- package/autocomplete/style/autocompletestyle.cjs.js +23 -16
- package/autocomplete/style/autocompletestyle.cjs.min.js +1 -1
- package/autocomplete/style/autocompletestyle.esm.js +23 -16
- package/autocomplete/style/autocompletestyle.esm.min.js +1 -1
- package/autocomplete/style/autocompletestyle.js +23 -16
- package/autocomplete/style/autocompletestyle.min.js +1 -1
- package/avatar/Avatar.vue +1 -1
- package/avatar/avatar.cjs.js +1 -3
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.esm.js +1 -3
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +1 -3
- package/avatar/avatar.min.js +1 -1
- package/avatar/style/avatarstyle.cjs.js +0 -2
- package/avatar/style/avatarstyle.cjs.min.js +1 -1
- package/avatar/style/avatarstyle.esm.js +0 -2
- package/avatar/style/avatarstyle.esm.min.js +1 -1
- package/avatar/style/avatarstyle.js +0 -2
- package/avatar/style/avatarstyle.min.js +1 -1
- package/avatargroup/AvatarGroup.vue +1 -1
- package/avatargroup/avatargroup.cjs.js +1 -3
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.esm.js +1 -3
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +1 -3
- package/avatargroup/avatargroup.min.js +1 -1
- package/avatargroup/style/avatargroupstyle.cjs.js +0 -2
- package/avatargroup/style/avatargroupstyle.cjs.min.js +1 -1
- package/avatargroup/style/avatargroupstyle.esm.js +0 -2
- package/avatargroup/style/avatargroupstyle.esm.min.js +1 -1
- package/avatargroup/style/avatargroupstyle.js +0 -2
- package/avatargroup/style/avatargroupstyle.min.js +1 -1
- package/badge/Badge.d.ts +1 -1
- package/badge/Badge.vue +1 -1
- package/badge/badge.cjs.js +1 -3
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +1 -3
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +1 -3
- package/badge/badge.min.js +1 -1
- package/badge/style/badgestyle.cjs.js +3 -3
- package/badge/style/badgestyle.cjs.min.js +1 -1
- package/badge/style/badgestyle.esm.js +3 -3
- package/badge/style/badgestyle.esm.min.js +1 -1
- package/badge/style/badgestyle.js +3 -3
- package/badge/style/badgestyle.min.js +1 -1
- package/badgedirective/style/badgedirectivestyle.cjs.js +0 -2
- package/badgedirective/style/badgedirectivestyle.cjs.min.js +1 -1
- package/badgedirective/style/badgedirectivestyle.esm.js +0 -2
- package/badgedirective/style/badgedirectivestyle.esm.min.js +1 -1
- package/badgedirective/style/badgedirectivestyle.js +0 -2
- package/badgedirective/style/badgedirectivestyle.min.js +1 -1
- package/basecomponent/BaseComponent.vue +20 -7
- package/basecomponent/basecomponent.cjs.js +16 -8
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +16 -8
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +16 -8
- package/basecomponent/basecomponent.min.js +1 -1
- package/basecomponent/style/basecomponentstyle.cjs.js +0 -4
- package/basecomponent/style/basecomponentstyle.cjs.min.js +1 -1
- package/basecomponent/style/basecomponentstyle.esm.js +0 -4
- package/basecomponent/style/basecomponentstyle.esm.min.js +1 -1
- package/basecomponent/style/basecomponentstyle.js +0 -4
- package/basecomponent/style/basecomponentstyle.min.js +1 -1
- package/basedirective/basedirective.cjs.js +16 -4
- package/basedirective/basedirective.cjs.min.js +1 -1
- package/basedirective/basedirective.esm.js +16 -4
- package/basedirective/basedirective.esm.min.js +1 -1
- package/basedirective/basedirective.js +16 -4
- package/basedirective/basedirective.min.js +1 -1
- package/baseicon/BaseIcon.vue +1 -6
- package/baseicon/baseicon.cjs.js +0 -5
- package/baseicon/baseicon.cjs.min.js +1 -1
- package/baseicon/baseicon.esm.js +1 -6
- package/baseicon/baseicon.esm.min.js +1 -1
- package/baseicon/baseicon.js +0 -5
- package/baseicon/baseicon.min.js +1 -1
- package/blockui/BlockUI.vue +0 -2
- package/blockui/blockui.cjs.js +0 -2
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +0 -2
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +0 -2
- package/blockui/blockui.min.js +1 -1
- package/blockui/style/blockuistyle.cjs.js +0 -2
- package/blockui/style/blockuistyle.cjs.min.js +1 -1
- package/blockui/style/blockuistyle.esm.js +0 -2
- package/blockui/style/blockuistyle.esm.min.js +1 -1
- package/blockui/style/blockuistyle.js +0 -2
- package/blockui/style/blockuistyle.min.js +1 -1
- package/breadcrumb/Breadcrumb.vue +1 -1
- package/breadcrumb/breadcrumb.cjs.js +1 -3
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +1 -3
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +1 -3
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/breadcrumb/style/breadcrumbstyle.cjs.js +0 -2
- package/breadcrumb/style/breadcrumbstyle.cjs.min.js +1 -1
- package/breadcrumb/style/breadcrumbstyle.esm.js +0 -2
- package/breadcrumb/style/breadcrumbstyle.esm.min.js +1 -1
- package/breadcrumb/style/breadcrumbstyle.js +0 -2
- package/breadcrumb/style/breadcrumbstyle.min.js +1 -1
- package/button/Button.d.ts +2 -2
- package/button/Button.vue +1 -1
- package/button/button.cjs.js +0 -1
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +0 -1
- package/button/button.esm.min.js +1 -1
- package/button/button.js +0 -1
- package/button/button.min.js +1 -1
- package/calendar/BaseCalendar.vue +8 -0
- package/calendar/Calendar.d.ts +10 -0
- package/calendar/Calendar.vue +13 -8
- package/calendar/calendar.cjs.js +23 -11
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +24 -12
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +23 -11
- package/calendar/calendar.min.js +1 -1
- package/calendar/style/calendarstyle.cjs.js +24 -20
- package/calendar/style/calendarstyle.cjs.min.js +1 -1
- package/calendar/style/calendarstyle.esm.js +24 -20
- package/calendar/style/calendarstyle.esm.min.js +1 -1
- package/calendar/style/calendarstyle.js +24 -20
- package/calendar/style/calendarstyle.min.js +1 -1
- package/card/Card.vue +1 -1
- package/card/card.cjs.js +1 -3
- package/card/card.cjs.min.js +1 -1
- package/card/card.esm.js +1 -3
- package/card/card.esm.min.js +1 -1
- package/card/card.js +1 -3
- package/card/card.min.js +1 -1
- package/carousel/style/carouselstyle.cjs.js +0 -2
- package/carousel/style/carouselstyle.cjs.min.js +1 -1
- package/carousel/style/carouselstyle.esm.js +0 -2
- package/carousel/style/carouselstyle.esm.min.js +1 -1
- package/carousel/style/carouselstyle.js +0 -2
- package/carousel/style/carouselstyle.min.js +1 -1
- package/cascadeselect/BaseCascadeSelect.vue +8 -0
- package/cascadeselect/CascadeSelect.d.ts +10 -0
- package/cascadeselect/CascadeSelect.vue +1 -1
- package/cascadeselect/cascadeselect.cjs.js +9 -3
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +9 -3
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +9 -3
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/cascadeselect/style/cascadeselectstyle.cjs.js +4 -4
- package/cascadeselect/style/cascadeselectstyle.cjs.min.js +1 -1
- package/cascadeselect/style/cascadeselectstyle.esm.js +4 -4
- package/cascadeselect/style/cascadeselectstyle.esm.min.js +1 -1
- package/cascadeselect/style/cascadeselectstyle.js +4 -4
- package/cascadeselect/style/cascadeselectstyle.min.js +1 -1
- package/chart/Chart.vue +1 -1
- package/chart/chart.cjs.js +1 -3
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +1 -3
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +1 -3
- package/chart/chart.min.js +1 -1
- package/checkbox/BaseCheckbox.vue +8 -0
- package/checkbox/Checkbox.d.ts +10 -0
- package/checkbox/Checkbox.vue +1 -1
- package/checkbox/checkbox.cjs.js +8 -1
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +8 -1
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +8 -1
- package/checkbox/checkbox.min.js +1 -1
- package/checkbox/style/checkboxstyle.cjs.js +3 -3
- package/checkbox/style/checkboxstyle.cjs.min.js +1 -1
- package/checkbox/style/checkboxstyle.esm.js +3 -3
- package/checkbox/style/checkboxstyle.esm.min.js +1 -1
- package/checkbox/style/checkboxstyle.js +3 -3
- package/checkbox/style/checkboxstyle.min.js +1 -1
- package/chip/Chip.vue +1 -1
- package/chip/chip.cjs.js +1 -3
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.esm.js +1 -3
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +1 -3
- package/chip/chip.min.js +1 -1
- package/chip/style/chipstyle.cjs.js +0 -2
- package/chip/style/chipstyle.cjs.min.js +1 -1
- package/chip/style/chipstyle.esm.js +0 -2
- package/chip/style/chipstyle.esm.min.js +1 -1
- package/chip/style/chipstyle.js +0 -2
- package/chip/style/chipstyle.min.js +1 -1
- package/chips/BaseChips.vue +8 -0
- package/chips/Chips.d.ts +11 -0
- package/chips/Chips.vue +10 -2
- package/chips/chips.cjs.js +18 -4
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +18 -4
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +18 -4
- package/chips/chips.min.js +1 -1
- package/chips/style/chipsstyle.cjs.js +11 -6
- package/chips/style/chipsstyle.cjs.min.js +1 -1
- package/chips/style/chipsstyle.esm.js +11 -6
- package/chips/style/chipsstyle.esm.min.js +1 -1
- package/chips/style/chipsstyle.js +11 -6
- package/chips/style/chipsstyle.min.js +1 -1
- package/colorpicker/ColorPicker.d.ts +1 -1
- package/colorpicker/ColorPicker.vue +11 -8
- package/colorpicker/colorpicker.cjs.js +12 -14
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +12 -14
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +12 -14
- package/colorpicker/colorpicker.min.js +1 -1
- package/colorpicker/style/colorpickerstyle.cjs.js +0 -3
- package/colorpicker/style/colorpickerstyle.cjs.min.js +1 -1
- package/colorpicker/style/colorpickerstyle.esm.js +0 -3
- package/colorpicker/style/colorpickerstyle.esm.min.js +1 -1
- package/colorpicker/style/colorpickerstyle.js +0 -3
- package/colorpicker/style/colorpickerstyle.min.js +1 -1
- package/config/PrimeVue.d.ts +1 -1
- package/config/config.cjs.js +1 -1
- package/config/config.cjs.min.js +1 -1
- package/config/config.esm.js +1 -1
- package/config/config.esm.min.js +1 -1
- package/config/config.js +1 -1
- package/config/config.min.js +1 -1
- package/confirmdialog/ConfirmDialog.vue +4 -4
- package/confirmdialog/confirmdialog.cjs.js +4 -6
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +4 -6
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +4 -6
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/ConfirmPopup.vue +4 -22
- package/confirmpopup/confirmpopup.cjs.js +4 -6
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +4 -6
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +4 -6
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/confirmpopup/style/confirmpopupstyle.cjs.js +0 -3
- package/confirmpopup/style/confirmpopupstyle.cjs.min.js +1 -1
- package/confirmpopup/style/confirmpopupstyle.esm.js +0 -3
- package/confirmpopup/style/confirmpopupstyle.esm.min.js +1 -1
- package/confirmpopup/style/confirmpopupstyle.js +0 -3
- package/confirmpopup/style/confirmpopupstyle.min.js +1 -1
- package/contextmenu/ContextMenu.vue +1 -1
- package/contextmenu/contextmenu.cjs.js +1 -3
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +1 -3
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +1 -3
- package/contextmenu/contextmenu.min.js +1 -1
- package/contextmenu/style/contextmenustyle.cjs.js +0 -3
- package/contextmenu/style/contextmenustyle.cjs.min.js +1 -1
- package/contextmenu/style/contextmenustyle.esm.js +0 -3
- package/contextmenu/style/contextmenustyle.esm.min.js +1 -1
- package/contextmenu/style/contextmenustyle.js +0 -3
- package/contextmenu/style/contextmenustyle.min.js +1 -1
- package/core/core.js +371 -761
- package/core/core.min.js +127 -127
- package/datatable/BodyRow.vue +13 -1
- package/datatable/ColumnFilter.vue +10 -17
- package/datatable/DataTable.vue +2 -2
- package/datatable/HeaderCell.vue +1 -1
- package/datatable/TableBody.vue +5 -2
- package/datatable/datatable.cjs.js +45 -22
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +45 -22
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +45 -22
- package/datatable/datatable.min.js +1 -1
- package/datatable/style/datatablestyle.cjs.js +3 -5
- package/datatable/style/datatablestyle.cjs.min.js +1 -1
- package/datatable/style/datatablestyle.esm.js +3 -5
- package/datatable/style/datatablestyle.esm.min.js +1 -1
- package/datatable/style/datatablestyle.js +3 -5
- package/datatable/style/datatablestyle.min.js +1 -1
- package/dataview/DataView.vue +1 -1
- package/dataview/dataview.cjs.js +1 -3
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +1 -3
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +1 -3
- package/dataview/dataview.min.js +1 -1
- package/dialog/Dialog.vue +11 -5
- package/dialog/dialog.cjs.js +10 -4
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +11 -5
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +10 -4
- package/dialog/dialog.min.js +1 -1
- package/dialog/style/dialogstyle.cjs.js +0 -4
- package/dialog/style/dialogstyle.cjs.min.js +1 -1
- package/dialog/style/dialogstyle.esm.js +0 -4
- package/dialog/style/dialogstyle.esm.min.js +1 -1
- package/dialog/style/dialogstyle.js +0 -4
- package/dialog/style/dialogstyle.min.js +1 -1
- package/divider/Divider.vue +1 -1
- package/divider/divider.cjs.js +1 -3
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +1 -3
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +1 -3
- package/divider/divider.min.js +1 -1
- package/divider/style/dividerstyle.cjs.js +0 -3
- package/divider/style/dividerstyle.cjs.min.js +1 -1
- package/divider/style/dividerstyle.esm.js +0 -3
- package/divider/style/dividerstyle.esm.min.js +1 -1
- package/divider/style/dividerstyle.js +0 -3
- package/divider/style/dividerstyle.min.js +1 -1
- package/dock/Dock.vue +1 -1
- package/dock/dock.cjs.js +1 -3
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +1 -3
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +1 -3
- package/dock/dock.min.js +1 -1
- package/dock/style/dockstyle.cjs.js +0 -2
- package/dock/style/dockstyle.cjs.min.js +1 -1
- package/dock/style/dockstyle.esm.js +0 -2
- package/dock/style/dockstyle.esm.min.js +1 -1
- package/dock/style/dockstyle.js +0 -2
- package/dock/style/dockstyle.min.js +1 -1
- package/dropdown/BaseDropdown.vue +8 -0
- package/dropdown/Dropdown.d.ts +10 -0
- package/dropdown/Dropdown.vue +4 -4
- package/dropdown/dropdown.cjs.js +13 -7
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +12 -6
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +14 -8
- package/dropdown/dropdown.min.js +1 -1
- package/dropdown/style/dropdownstyle.cjs.js +17 -11
- package/dropdown/style/dropdownstyle.cjs.min.js +1 -1
- package/dropdown/style/dropdownstyle.esm.js +17 -11
- package/dropdown/style/dropdownstyle.esm.min.js +1 -1
- package/dropdown/style/dropdownstyle.js +17 -11
- package/dropdown/style/dropdownstyle.min.js +1 -1
- package/editor/Editor.vue +1 -1
- package/editor/editor.cjs.js +1 -3
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +1 -3
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +1 -3
- package/editor/editor.min.js +1 -1
- package/fieldset/Fieldset.vue +12 -8
- package/fieldset/fieldset.cjs.js +13 -11
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +13 -11
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +13 -11
- package/fieldset/fieldset.min.js +1 -1
- package/fieldset/style/fieldsetstyle.cjs.js +0 -2
- package/fieldset/style/fieldsetstyle.cjs.min.js +1 -1
- package/fieldset/style/fieldsetstyle.esm.js +0 -2
- package/fieldset/style/fieldsetstyle.esm.min.js +1 -1
- package/fieldset/style/fieldsetstyle.js +0 -2
- package/fieldset/style/fieldsetstyle.min.js +1 -1
- package/fileupload/FileUpload.vue +4 -4
- package/fileupload/fileupload.cjs.js +4 -10
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +4 -10
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +4 -10
- package/fileupload/fileupload.min.js +1 -1
- package/fileupload/style/fileuploadstyle.cjs.js +0 -2
- package/fileupload/style/fileuploadstyle.cjs.min.js +1 -1
- package/fileupload/style/fileuploadstyle.esm.js +0 -2
- package/fileupload/style/fileuploadstyle.esm.min.js +1 -1
- package/fileupload/style/fileuploadstyle.js +0 -2
- package/fileupload/style/fileuploadstyle.min.js +1 -1
- package/floatlabel/BaseFloatLabel.vue +16 -0
- package/floatlabel/FloatLabel.d.ts +128 -0
- package/floatlabel/FloatLabel.vue +14 -0
- package/floatlabel/floatlabel.cjs.js +37 -0
- package/floatlabel/floatlabel.cjs.min.js +1 -0
- package/floatlabel/floatlabel.esm.js +30 -0
- package/floatlabel/floatlabel.esm.min.js +1 -0
- package/floatlabel/floatlabel.js +37 -0
- package/floatlabel/floatlabel.min.js +1 -0
- package/floatlabel/package.json +9 -0
- package/floatlabel/style/FloatLabelStyle.d.ts +3 -0
- package/floatlabel/style/floatlabelstyle.cjs.js +17 -0
- package/floatlabel/style/floatlabelstyle.cjs.min.js +1 -0
- package/floatlabel/style/floatlabelstyle.esm.js +11 -0
- package/floatlabel/style/floatlabelstyle.esm.min.js +1 -0
- package/floatlabel/style/floatlabelstyle.js +20 -0
- package/floatlabel/style/floatlabelstyle.min.js +1 -0
- package/floatlabel/style/package.json +6 -0
- package/galleria/GalleriaContent.vue +7 -2
- package/galleria/galleria.cjs.js +8 -4
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +8 -4
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +8 -4
- package/galleria/galleria.min.js +1 -1
- package/galleria/style/galleriastyle.cjs.js +0 -3
- package/galleria/style/galleriastyle.cjs.min.js +1 -1
- package/galleria/style/galleriastyle.esm.js +0 -3
- package/galleria/style/galleriastyle.esm.min.js +1 -1
- package/galleria/style/galleriastyle.js +0 -3
- package/galleria/style/galleriastyle.min.js +1 -1
- package/iconfield/BaseIconField.vue +21 -0
- package/iconfield/IconField.d.ts +127 -0
- package/iconfield/IconField.vue +14 -0
- package/iconfield/iconfield.cjs.js +42 -0
- package/iconfield/iconfield.cjs.min.js +1 -0
- package/iconfield/iconfield.esm.js +35 -0
- package/iconfield/iconfield.esm.min.js +1 -0
- package/iconfield/iconfield.js +42 -0
- package/iconfield/iconfield.min.js +1 -0
- package/iconfield/package.json +9 -0
- package/iconfield/style/IconField.d.ts +3 -0
- package/iconfield/style/iconfieldstyle.cjs.js +23 -0
- package/iconfield/style/iconfieldstyle.cjs.min.js +1 -0
- package/iconfield/style/iconfieldstyle.esm.js +17 -0
- package/iconfield/style/iconfieldstyle.esm.min.js +1 -0
- package/iconfield/style/iconfieldstyle.js +26 -0
- package/iconfield/style/iconfieldstyle.min.js +1 -0
- package/iconfield/style/package.json +6 -0
- package/icons/arrowdown/index.cjs.js +3 -15
- package/icons/arrowdown/index.cjs.min.js +1 -1
- package/icons/arrowdown/index.esm.js +3 -15
- package/icons/arrowdown/index.esm.min.js +1 -1
- package/icons/arrowdown/index.js +3 -15
- package/icons/arrowdown/index.min.js +1 -1
- package/icons/arrowdown/index.vue +6 -13
- package/icons/arrowup/index.cjs.js +3 -15
- package/icons/arrowup/index.cjs.min.js +1 -1
- package/icons/arrowup/index.esm.js +3 -15
- package/icons/arrowup/index.esm.min.js +1 -1
- package/icons/arrowup/index.js +3 -15
- package/icons/arrowup/index.min.js +1 -1
- package/icons/arrowup/index.vue +6 -13
- package/icons/ban/index.cjs.js +3 -15
- package/icons/ban/index.cjs.min.js +1 -1
- package/icons/ban/index.esm.js +3 -15
- package/icons/ban/index.esm.min.js +1 -1
- package/icons/ban/index.js +3 -15
- package/icons/ban/index.min.js +1 -1
- package/icons/ban/index.vue +4 -11
- package/icons/exclamationtriangle/index.cjs.js +5 -17
- package/icons/exclamationtriangle/index.cjs.min.js +1 -1
- package/icons/exclamationtriangle/index.esm.js +5 -17
- package/icons/exclamationtriangle/index.esm.min.js +1 -1
- package/icons/exclamationtriangle/index.js +5 -17
- package/icons/exclamationtriangle/index.min.js +1 -1
- package/icons/exclamationtriangle/index.vue +12 -19
- package/icons/eyeslash/index.cjs.js +3 -15
- package/icons/eyeslash/index.cjs.min.js +1 -1
- package/icons/eyeslash/index.esm.js +3 -15
- package/icons/eyeslash/index.esm.min.js +1 -1
- package/icons/eyeslash/index.js +3 -15
- package/icons/eyeslash/index.min.js +1 -1
- package/icons/eyeslash/index.vue +6 -13
- package/icons/filter/index.cjs.js +3 -15
- package/icons/filter/index.cjs.min.js +1 -1
- package/icons/filter/index.esm.js +3 -15
- package/icons/filter/index.esm.min.js +1 -1
- package/icons/filter/index.js +3 -15
- package/icons/filter/index.min.js +1 -1
- package/icons/filter/index.vue +4 -11
- package/icons/filterslash/index.cjs.js +3 -15
- package/icons/filterslash/index.cjs.min.js +1 -1
- package/icons/filterslash/index.esm.js +3 -15
- package/icons/filterslash/index.esm.min.js +1 -1
- package/icons/filterslash/index.js +3 -15
- package/icons/filterslash/index.min.js +1 -1
- package/icons/filterslash/index.vue +6 -13
- package/icons/infocircle/index.cjs.js +3 -15
- package/icons/infocircle/index.cjs.min.js +1 -1
- package/icons/infocircle/index.esm.js +3 -15
- package/icons/infocircle/index.esm.min.js +1 -1
- package/icons/infocircle/index.js +3 -15
- package/icons/infocircle/index.min.js +1 -1
- package/icons/infocircle/index.vue +6 -13
- package/icons/pencil/index.cjs.js +3 -15
- package/icons/pencil/index.cjs.min.js +1 -1
- package/icons/pencil/index.esm.js +3 -15
- package/icons/pencil/index.esm.min.js +1 -1
- package/icons/pencil/index.js +3 -15
- package/icons/pencil/index.min.js +1 -1
- package/icons/pencil/index.vue +4 -11
- package/icons/plus/index.cjs.js +3 -15
- package/icons/plus/index.cjs.min.js +1 -1
- package/icons/plus/index.esm.js +3 -15
- package/icons/plus/index.esm.min.js +1 -1
- package/icons/plus/index.js +3 -15
- package/icons/plus/index.min.js +1 -1
- package/icons/plus/index.vue +4 -11
- package/icons/refresh/index.cjs.js +3 -15
- package/icons/refresh/index.cjs.min.js +1 -1
- package/icons/refresh/index.esm.js +3 -15
- package/icons/refresh/index.esm.min.js +1 -1
- package/icons/refresh/index.js +3 -15
- package/icons/refresh/index.min.js +1 -1
- package/icons/refresh/index.vue +6 -13
- package/icons/search/index.cjs.js +3 -15
- package/icons/search/index.cjs.min.js +1 -1
- package/icons/search/index.esm.js +3 -15
- package/icons/search/index.esm.min.js +1 -1
- package/icons/search/index.js +3 -15
- package/icons/search/index.min.js +1 -1
- package/icons/search/index.vue +6 -13
- package/icons/searchminus/index.cjs.js +3 -15
- package/icons/searchminus/index.cjs.min.js +1 -1
- package/icons/searchminus/index.esm.js +3 -15
- package/icons/searchminus/index.esm.min.js +1 -1
- package/icons/searchminus/index.js +3 -15
- package/icons/searchminus/index.min.js +1 -1
- package/icons/searchminus/index.vue +6 -13
- package/icons/searchplus/index.cjs.js +3 -15
- package/icons/searchplus/index.cjs.min.js +1 -1
- package/icons/searchplus/index.esm.js +3 -15
- package/icons/searchplus/index.esm.min.js +1 -1
- package/icons/searchplus/index.js +3 -15
- package/icons/searchplus/index.min.js +1 -1
- package/icons/searchplus/index.vue +6 -13
- package/icons/sortalt/index.cjs.js +6 -18
- package/icons/sortalt/index.cjs.min.js +1 -1
- package/icons/sortalt/index.esm.js +6 -18
- package/icons/sortalt/index.esm.min.js +1 -1
- package/icons/sortalt/index.js +6 -18
- package/icons/sortalt/index.min.js +1 -1
- package/icons/sortalt/index.vue +10 -17
- package/icons/sortamountdown/index.cjs.js +3 -15
- package/icons/sortamountdown/index.cjs.min.js +1 -1
- package/icons/sortamountdown/index.esm.js +3 -15
- package/icons/sortamountdown/index.esm.min.js +1 -1
- package/icons/sortamountdown/index.js +3 -15
- package/icons/sortamountdown/index.min.js +1 -1
- package/icons/sortamountdown/index.vue +4 -11
- package/icons/sortamountupalt/index.cjs.js +3 -15
- package/icons/sortamountupalt/index.cjs.min.js +1 -1
- package/icons/sortamountupalt/index.esm.js +3 -15
- package/icons/sortamountupalt/index.esm.min.js +1 -1
- package/icons/sortamountupalt/index.js +3 -15
- package/icons/sortamountupalt/index.min.js +1 -1
- package/icons/sortamountupalt/index.vue +4 -11
- package/icons/spinner/index.cjs.js +3 -15
- package/icons/spinner/index.cjs.min.js +1 -1
- package/icons/spinner/index.esm.js +3 -15
- package/icons/spinner/index.esm.min.js +1 -1
- package/icons/spinner/index.js +3 -15
- package/icons/spinner/index.min.js +1 -1
- package/icons/spinner/index.vue +4 -11
- package/icons/star/index.cjs.js +3 -15
- package/icons/star/index.cjs.min.js +1 -1
- package/icons/star/index.esm.js +3 -15
- package/icons/star/index.esm.min.js +1 -1
- package/icons/star/index.js +3 -15
- package/icons/star/index.min.js +1 -1
- package/icons/star/index.vue +4 -11
- package/icons/starfill/index.cjs.js +3 -15
- package/icons/starfill/index.cjs.min.js +1 -1
- package/icons/starfill/index.esm.js +3 -15
- package/icons/starfill/index.esm.min.js +1 -1
- package/icons/starfill/index.js +3 -15
- package/icons/starfill/index.min.js +1 -1
- package/icons/starfill/index.vue +4 -11
- package/icons/thlarge/index.cjs.js +3 -15
- package/icons/thlarge/index.cjs.min.js +1 -1
- package/icons/thlarge/index.esm.js +3 -15
- package/icons/thlarge/index.esm.min.js +1 -1
- package/icons/thlarge/index.js +3 -15
- package/icons/thlarge/index.min.js +1 -1
- package/icons/thlarge/index.vue +6 -13
- package/icons/timescircle/index.cjs.js +3 -15
- package/icons/timescircle/index.cjs.min.js +1 -1
- package/icons/timescircle/index.esm.js +3 -15
- package/icons/timescircle/index.esm.min.js +1 -1
- package/icons/timescircle/index.js +3 -15
- package/icons/timescircle/index.min.js +1 -1
- package/icons/timescircle/index.vue +6 -13
- package/icons/trash/index.cjs.js +3 -15
- package/icons/trash/index.cjs.min.js +1 -1
- package/icons/trash/index.esm.js +3 -15
- package/icons/trash/index.esm.min.js +1 -1
- package/icons/trash/index.js +3 -15
- package/icons/trash/index.min.js +1 -1
- package/icons/trash/index.vue +6 -13
- package/icons/undo/index.cjs.js +3 -15
- package/icons/undo/index.cjs.min.js +1 -1
- package/icons/undo/index.esm.js +3 -15
- package/icons/undo/index.esm.min.js +1 -1
- package/icons/undo/index.js +3 -15
- package/icons/undo/index.min.js +1 -1
- package/icons/undo/index.vue +6 -13
- package/icons/upload/index.cjs.js +3 -15
- package/icons/upload/index.cjs.min.js +1 -1
- package/icons/upload/index.esm.js +3 -15
- package/icons/upload/index.esm.min.js +1 -1
- package/icons/upload/index.js +3 -15
- package/icons/upload/index.min.js +1 -1
- package/icons/upload/index.vue +6 -13
- package/icons/windowmaximize/index.cjs.js +3 -15
- package/icons/windowmaximize/index.cjs.min.js +1 -1
- package/icons/windowmaximize/index.esm.js +3 -15
- package/icons/windowmaximize/index.esm.min.js +1 -1
- package/icons/windowmaximize/index.js +3 -15
- package/icons/windowmaximize/index.min.js +1 -1
- package/icons/windowmaximize/index.vue +6 -13
- package/icons/windowminimize/index.cjs.js +3 -15
- package/icons/windowminimize/index.cjs.min.js +1 -1
- package/icons/windowminimize/index.esm.js +3 -15
- package/icons/windowminimize/index.esm.min.js +1 -1
- package/icons/windowminimize/index.js +3 -15
- package/icons/windowminimize/index.min.js +1 -1
- package/icons/windowminimize/index.vue +6 -13
- package/image/Image.vue +1 -1
- package/image/image.cjs.js +1 -3
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +1 -3
- package/image/image.esm.min.js +1 -1
- package/image/image.js +1 -3
- package/image/image.min.js +1 -1
- package/image/style/imagestyle.cjs.js +0 -2
- package/image/style/imagestyle.cjs.min.js +1 -1
- package/image/style/imagestyle.esm.js +0 -2
- package/image/style/imagestyle.esm.min.js +1 -1
- package/image/style/imagestyle.js +0 -2
- package/image/style/imagestyle.min.js +1 -1
- package/inlinemessage/InlineMessage.d.ts +1 -1
- package/inlinemessage/style/inlinemessagestyle.cjs.js +0 -2
- package/inlinemessage/style/inlinemessagestyle.cjs.min.js +1 -1
- package/inlinemessage/style/inlinemessagestyle.esm.js +0 -2
- package/inlinemessage/style/inlinemessagestyle.esm.min.js +1 -1
- package/inlinemessage/style/inlinemessagestyle.js +0 -2
- package/inlinemessage/style/inlinemessagestyle.min.js +1 -1
- package/inplace/Inplace.vue +1 -1
- package/inplace/inplace.cjs.js +1 -3
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +1 -3
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +1 -3
- package/inplace/inplace.min.js +1 -1
- package/inplace/style/inplacestyle.cjs.js +0 -2
- package/inplace/style/inplacestyle.cjs.min.js +1 -1
- package/inplace/style/inplacestyle.esm.js +0 -2
- package/inplace/style/inplacestyle.esm.min.js +1 -1
- package/inplace/style/inplacestyle.js +0 -2
- package/inplace/style/inplacestyle.min.js +1 -1
- package/inputgroup/InputGroup.vue +1 -1
- package/inputgroup/inputgroup.cjs.js +1 -3
- package/inputgroup/inputgroup.cjs.min.js +1 -1
- package/inputgroup/inputgroup.esm.js +1 -3
- package/inputgroup/inputgroup.esm.min.js +1 -1
- package/inputgroup/inputgroup.js +1 -3
- package/inputgroup/inputgroup.min.js +1 -1
- package/inputgroupaddon/InputGroupAddon.vue +1 -1
- package/inputgroupaddon/inputgroupaddon.cjs.js +1 -3
- package/inputgroupaddon/inputgroupaddon.cjs.min.js +1 -1
- package/inputgroupaddon/inputgroupaddon.esm.js +1 -3
- package/inputgroupaddon/inputgroupaddon.esm.min.js +1 -1
- package/inputgroupaddon/inputgroupaddon.js +1 -3
- package/inputgroupaddon/inputgroupaddon.min.js +1 -1
- package/inputicon/BaseInputIcon.vue +15 -0
- package/inputicon/InputIcon.d.ts +117 -0
- package/inputicon/InputIcon.vue +12 -0
- package/inputicon/inputicon.cjs.js +34 -0
- package/inputicon/inputicon.cjs.min.js +1 -0
- package/inputicon/inputicon.esm.js +27 -0
- package/inputicon/inputicon.esm.min.js +1 -0
- package/inputicon/inputicon.js +34 -0
- package/inputicon/inputicon.min.js +1 -0
- package/inputicon/package.json +9 -0
- package/inputicon/style/InputIcoonStyle.d.ts +3 -0
- package/inputicon/style/inputiconstyle.cjs.js +5 -0
- package/inputicon/style/inputiconstyle.cjs.min.js +1 -0
- package/inputicon/style/inputiconstyle.esm.js +3 -0
- package/inputicon/style/inputiconstyle.esm.min.js +1 -0
- package/inputicon/style/inputiconstyle.js +10 -0
- package/inputicon/style/inputiconstyle.min.js +1 -0
- package/inputicon/style/package.json +6 -0
- package/inputmask/BaseInputMask.vue +8 -0
- package/inputmask/InputMask.d.ts +10 -0
- package/inputmask/InputMask.vue +1 -1
- package/inputmask/inputmask.cjs.js +9 -3
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +9 -3
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +9 -3
- package/inputmask/inputmask.min.js +1 -1
- package/inputmask/style/inputmaskstyle.cjs.js +5 -2
- package/inputmask/style/inputmaskstyle.cjs.min.js +1 -1
- package/inputmask/style/inputmaskstyle.esm.js +5 -2
- package/inputmask/style/inputmaskstyle.esm.min.js +1 -1
- package/inputmask/style/inputmaskstyle.js +5 -2
- package/inputmask/style/inputmaskstyle.min.js +1 -1
- package/inputnumber/BaseInputNumber.vue +8 -0
- package/inputnumber/InputNumber.d.ts +10 -0
- package/inputnumber/InputNumber.vue +3 -26
- package/inputnumber/inputnumber.cjs.js +14 -13
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +14 -13
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +14 -13
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputnumber/style/inputnumberstyle.cjs.js +15 -10
- package/inputnumber/style/inputnumberstyle.cjs.min.js +1 -1
- package/inputnumber/style/inputnumberstyle.esm.js +15 -10
- package/inputnumber/style/inputnumberstyle.esm.min.js +1 -1
- package/inputnumber/style/inputnumberstyle.js +15 -10
- package/inputnumber/style/inputnumberstyle.min.js +1 -1
- package/inputswitch/BaseInputSwitch.vue +4 -0
- package/inputswitch/InputSwitch.d.ts +5 -0
- package/inputswitch/InputSwitch.vue +1 -1
- package/inputswitch/inputswitch.cjs.js +4 -1
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +4 -1
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +4 -1
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputswitch/style/inputswitchstyle.cjs.js +2 -3
- package/inputswitch/style/inputswitchstyle.cjs.min.js +1 -1
- package/inputswitch/style/inputswitchstyle.esm.js +2 -3
- package/inputswitch/style/inputswitchstyle.esm.min.js +1 -1
- package/inputswitch/style/inputswitchstyle.js +2 -3
- package/inputswitch/style/inputswitchstyle.min.js +1 -1
- package/inputtext/BaseInputText.vue +8 -0
- package/inputtext/InputText.d.ts +10 -0
- package/inputtext/InputText.vue +1 -1
- package/inputtext/inputtext.cjs.js +9 -3
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +9 -3
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +9 -3
- package/inputtext/inputtext.min.js +1 -1
- package/inputtext/style/inputtextstyle.cjs.js +3 -1
- package/inputtext/style/inputtextstyle.cjs.min.js +1 -1
- package/inputtext/style/inputtextstyle.esm.js +3 -1
- package/inputtext/style/inputtextstyle.esm.min.js +1 -1
- package/inputtext/style/inputtextstyle.js +3 -1
- package/inputtext/style/inputtextstyle.min.js +1 -1
- package/knob/Knob.vue +11 -8
- package/knob/knob.cjs.js +10 -10
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +10 -10
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +10 -10
- package/knob/knob.min.js +1 -1
- package/knob/style/knobstyle.cjs.js +0 -2
- package/knob/style/knobstyle.cjs.min.js +1 -1
- package/knob/style/knobstyle.esm.js +0 -2
- package/knob/style/knobstyle.esm.min.js +1 -1
- package/knob/style/knobstyle.js +0 -2
- package/knob/style/knobstyle.min.js +1 -1
- package/listbox/BaseListbox.vue +4 -0
- package/listbox/Listbox.d.ts +5 -0
- package/listbox/Listbox.vue +1 -1
- package/listbox/listbox.cjs.js +5 -3
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +5 -3
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +5 -3
- package/listbox/listbox.min.js +1 -1
- package/listbox/style/listboxstyle.cjs.js +2 -3
- package/listbox/style/listboxstyle.cjs.min.js +1 -1
- package/listbox/style/listboxstyle.esm.js +2 -3
- package/listbox/style/listboxstyle.esm.min.js +1 -1
- package/listbox/style/listboxstyle.js +2 -3
- package/listbox/style/listboxstyle.min.js +1 -1
- package/megamenu/MegaMenu.vue +1 -1
- package/megamenu/megamenu.cjs.js +1 -3
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +1 -3
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +1 -3
- package/megamenu/megamenu.min.js +1 -1
- package/megamenu/style/megamenustyle.cjs.js +0 -2
- package/megamenu/style/megamenustyle.cjs.min.js +1 -1
- package/megamenu/style/megamenustyle.esm.js +0 -2
- package/megamenu/style/megamenustyle.esm.min.js +1 -1
- package/megamenu/style/megamenustyle.js +0 -2
- package/megamenu/style/megamenustyle.min.js +1 -1
- package/menu/Menu.vue +1 -1
- package/menu/menu.cjs.js +1 -3
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +1 -3
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +1 -3
- package/menu/menu.min.js +1 -1
- package/menu/style/menustyle.cjs.js +0 -3
- package/menu/style/menustyle.cjs.min.js +1 -1
- package/menu/style/menustyle.esm.js +0 -3
- package/menu/style/menustyle.esm.min.js +1 -1
- package/menu/style/menustyle.js +0 -3
- package/menu/style/menustyle.min.js +1 -1
- package/menubar/style/menubarstyle.cjs.js +0 -2
- package/menubar/style/menubarstyle.cjs.min.js +1 -1
- package/menubar/style/menubarstyle.esm.js +0 -2
- package/menubar/style/menubarstyle.esm.min.js +1 -1
- package/menubar/style/menubarstyle.js +0 -2
- package/menubar/style/menubarstyle.min.js +1 -1
- package/message/Message.d.ts +1 -1
- package/message/Message.vue +1 -1
- package/message/message.cjs.js +1 -3
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +1 -3
- package/message/message.esm.min.js +1 -1
- package/message/message.js +1 -3
- package/message/message.min.js +1 -1
- package/message/style/messagestyle.cjs.js +0 -2
- package/message/style/messagestyle.cjs.min.js +1 -1
- package/message/style/messagestyle.esm.js +0 -2
- package/message/style/messagestyle.esm.min.js +1 -1
- package/message/style/messagestyle.js +0 -2
- package/message/style/messagestyle.min.js +1 -1
- package/metergroup/MeterGroup.vue +1 -1
- package/metergroup/metergroup.cjs.js +1 -3
- package/metergroup/metergroup.cjs.min.js +1 -1
- package/metergroup/metergroup.esm.js +1 -3
- package/metergroup/metergroup.esm.min.js +1 -1
- package/metergroup/metergroup.js +1 -3
- package/metergroup/metergroup.min.js +1 -1
- package/metergroup/style/metergroupstyle.cjs.js +7 -11
- package/metergroup/style/metergroupstyle.cjs.min.js +1 -1
- package/metergroup/style/metergroupstyle.esm.js +7 -11
- package/metergroup/style/metergroupstyle.esm.min.js +1 -1
- package/metergroup/style/metergroupstyle.js +7 -11
- package/metergroup/style/metergroupstyle.min.js +1 -1
- package/multiselect/BaseMultiSelect.vue +8 -0
- package/multiselect/MultiSelect.d.ts +10 -0
- package/multiselect/MultiSelect.vue +3 -2
- package/multiselect/multiselect.cjs.js +13 -5
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +13 -5
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +13 -5
- package/multiselect/multiselect.min.js +1 -1
- package/multiselect/style/multiselectstyle.cjs.js +17 -11
- package/multiselect/style/multiselectstyle.cjs.min.js +1 -1
- package/multiselect/style/multiselectstyle.esm.js +17 -11
- package/multiselect/style/multiselectstyle.esm.min.js +1 -1
- package/multiselect/style/multiselectstyle.js +17 -11
- package/multiselect/style/multiselectstyle.min.js +1 -1
- package/orderlist/OrderList.vue +4 -4
- package/orderlist/orderlist.cjs.js +4 -8
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +4 -8
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +4 -8
- package/orderlist/orderlist.min.js +1 -1
- package/orderlist/style/orderliststyle.cjs.js +0 -2
- package/orderlist/style/orderliststyle.cjs.min.js +1 -1
- package/orderlist/style/orderliststyle.esm.js +0 -2
- package/orderlist/style/orderliststyle.esm.min.js +1 -1
- package/orderlist/style/orderliststyle.js +0 -2
- package/orderlist/style/orderliststyle.min.js +1 -1
- package/organizationchart/style/organizationchartstyle.cjs.js +0 -2
- package/organizationchart/style/organizationchartstyle.cjs.min.js +1 -1
- package/organizationchart/style/organizationchartstyle.esm.js +0 -2
- package/organizationchart/style/organizationchartstyle.esm.min.js +1 -1
- package/organizationchart/style/organizationchartstyle.js +0 -2
- package/organizationchart/style/organizationchartstyle.min.js +1 -1
- package/overlaypanel/style/overlaypanelstyle.cjs.js +0 -3
- package/overlaypanel/style/overlaypanelstyle.cjs.min.js +1 -1
- package/overlaypanel/style/overlaypanelstyle.esm.js +0 -3
- package/overlaypanel/style/overlaypanelstyle.esm.min.js +1 -1
- package/overlaypanel/style/overlaypanelstyle.js +0 -3
- package/overlaypanel/style/overlaypanelstyle.min.js +1 -1
- package/package.json +1 -1
- package/paginator/JumpToPageDropdown.vue +0 -1
- package/paginator/JumpToPageInput.vue +1 -11
- package/paginator/Paginator.vue +1 -1
- package/paginator/RowsPerPageDropdown.vue +0 -1
- package/paginator/paginator.cjs.js +2 -7
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +2 -7
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +2 -7
- package/paginator/paginator.min.js +1 -1
- package/paginator/style/paginatorstyle.cjs.js +0 -2
- package/paginator/style/paginatorstyle.cjs.min.js +1 -1
- package/paginator/style/paginatorstyle.esm.js +0 -2
- package/paginator/style/paginatorstyle.esm.min.js +1 -1
- package/paginator/style/paginatorstyle.js +0 -2
- package/paginator/style/paginatorstyle.min.js +1 -1
- package/panel/Panel.vue +13 -9
- package/panel/panel.cjs.js +14 -12
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +14 -12
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +14 -12
- package/panel/panel.min.js +1 -1
- package/panel/style/panelstyle.cjs.js +0 -2
- package/panel/style/panelstyle.cjs.min.js +1 -1
- package/panel/style/panelstyle.esm.js +0 -2
- package/panel/style/panelstyle.esm.min.js +1 -1
- package/panel/style/panelstyle.js +0 -2
- package/panel/style/panelstyle.min.js +1 -1
- package/panelmenu/PanelMenu.vue +1 -1
- package/panelmenu/panelmenu.cjs.js +1 -3
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +1 -3
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +1 -3
- package/panelmenu/panelmenu.min.js +1 -1
- package/panelmenu/style/panelmenustyle.cjs.js +0 -2
- package/panelmenu/style/panelmenustyle.cjs.min.js +1 -1
- package/panelmenu/style/panelmenustyle.esm.js +0 -2
- package/panelmenu/style/panelmenustyle.esm.min.js +1 -1
- package/panelmenu/style/panelmenustyle.js +0 -2
- package/panelmenu/style/panelmenustyle.min.js +1 -1
- package/passthrough/index.d.ts +3 -1
- package/password/BasePassword.vue +8 -0
- package/password/Password.d.ts +10 -0
- package/password/Password.vue +11 -2
- package/password/password.cjs.js +20 -5
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +21 -6
- package/password/password.esm.min.js +1 -1
- package/password/password.js +20 -5
- package/password/password.min.js +1 -1
- package/password/style/passwordstyle.cjs.js +2 -4
- package/password/style/passwordstyle.cjs.min.js +1 -1
- package/password/style/passwordstyle.esm.js +2 -4
- package/password/style/passwordstyle.esm.min.js +1 -1
- package/password/style/passwordstyle.js +2 -4
- package/password/style/passwordstyle.min.js +1 -1
- package/picklist/PickList.vue +12 -48
- package/picklist/picklist.cjs.js +11 -23
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +11 -23
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +11 -23
- package/picklist/picklist.min.js +1 -1
- package/picklist/style/pickliststyle.cjs.js +0 -2
- package/picklist/style/pickliststyle.cjs.min.js +1 -1
- package/picklist/style/pickliststyle.esm.js +0 -2
- package/picklist/style/pickliststyle.esm.min.js +1 -1
- package/picklist/style/pickliststyle.js +0 -2
- package/picklist/style/pickliststyle.min.js +1 -1
- package/progressbar/ProgressBar.vue +1 -1
- package/progressbar/progressbar.cjs.js +1 -3
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +1 -3
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +1 -3
- package/progressbar/progressbar.min.js +1 -1
- package/progressbar/style/progressbarstyle.cjs.js +0 -2
- package/progressbar/style/progressbarstyle.cjs.min.js +1 -1
- package/progressbar/style/progressbarstyle.esm.js +0 -2
- package/progressbar/style/progressbarstyle.esm.min.js +1 -1
- package/progressbar/style/progressbarstyle.js +0 -2
- package/progressbar/style/progressbarstyle.min.js +1 -1
- package/progressspinner/ProgressSpinner.vue +1 -1
- package/progressspinner/progressspinner.cjs.js +1 -3
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +1 -3
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +1 -3
- package/progressspinner/progressspinner.min.js +1 -1
- package/progressspinner/style/progressspinnerstyle.cjs.js +0 -2
- package/progressspinner/style/progressspinnerstyle.cjs.min.js +1 -1
- package/progressspinner/style/progressspinnerstyle.esm.js +0 -2
- package/progressspinner/style/progressspinnerstyle.esm.min.js +1 -1
- package/progressspinner/style/progressspinnerstyle.js +0 -2
- package/progressspinner/style/progressspinnerstyle.min.js +1 -1
- package/radiobutton/BaseRadioButton.vue +8 -0
- package/radiobutton/RadioButton.d.ts +10 -0
- package/radiobutton/RadioButton.vue +1 -1
- package/radiobutton/radiobutton.cjs.js +8 -1
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +8 -1
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +8 -1
- package/radiobutton/radiobutton.min.js +1 -1
- package/radiobutton/style/radiobuttonstyle.cjs.js +3 -3
- package/radiobutton/style/radiobuttonstyle.cjs.min.js +1 -1
- package/radiobutton/style/radiobuttonstyle.esm.js +3 -3
- package/radiobutton/style/radiobuttonstyle.esm.min.js +1 -1
- package/radiobutton/style/radiobuttonstyle.js +3 -3
- package/radiobutton/style/radiobuttonstyle.min.js +1 -1
- package/rating/Rating.vue +1 -1
- package/rating/rating.cjs.js +1 -3
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +1 -3
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +1 -3
- package/rating/rating.min.js +1 -1
- package/rating/style/ratingstyle.cjs.js +0 -2
- package/rating/style/ratingstyle.cjs.min.js +1 -1
- package/rating/style/ratingstyle.esm.js +0 -2
- package/rating/style/ratingstyle.esm.min.js +1 -1
- package/rating/style/ratingstyle.js +0 -2
- package/rating/style/ratingstyle.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +4890 -246
- package/resources/themes/arya-green/theme.css +4890 -246
- package/resources/themes/arya-orange/theme.css +4890 -246
- package/resources/themes/arya-purple/theme.css +4890 -246
- package/resources/themes/aura-dark-amber/theme.css +5246 -390
- package/resources/themes/aura-dark-blue/theme.css +5246 -390
- package/resources/themes/aura-dark-cyan/theme.css +5246 -390
- package/resources/themes/aura-dark-green/theme.css +5246 -390
- package/resources/themes/aura-dark-indigo/theme.css +5246 -390
- package/resources/themes/aura-dark-lime/theme.css +5246 -390
- package/resources/themes/aura-dark-noir/theme.css +5246 -390
- package/resources/themes/aura-dark-pink/theme.css +5246 -390
- package/resources/themes/aura-dark-purple/theme.css +5246 -390
- package/resources/themes/aura-dark-teal/theme.css +5246 -390
- package/resources/themes/aura-light-amber/theme.css +5259 -404
- package/resources/themes/aura-light-blue/theme.css +5259 -404
- package/resources/themes/aura-light-cyan/theme.css +5259 -404
- package/resources/themes/aura-light-green/theme.css +5259 -404
- package/resources/themes/aura-light-indigo/theme.css +5259 -404
- package/resources/themes/aura-light-lime/theme.css +5259 -404
- package/resources/themes/aura-light-noir/theme.css +5260 -405
- package/resources/themes/aura-light-pink/theme.css +5259 -404
- package/resources/themes/aura-light-purple/theme.css +5259 -404
- package/resources/themes/aura-light-teal/theme.css +5259 -404
- package/resources/themes/bootstrap4-dark-blue/theme.css +4867 -223
- package/resources/themes/bootstrap4-dark-purple/theme.css +4867 -223
- package/resources/themes/bootstrap4-light-blue/theme.css +4867 -223
- package/resources/themes/bootstrap4-light-purple/theme.css +4867 -223
- package/resources/themes/fluent-light/theme.css +4862 -218
- package/resources/themes/lara-dark-amber/theme.css +4990 -268
- package/resources/themes/lara-dark-blue/theme.css +4990 -268
- package/resources/themes/lara-dark-cyan/theme.css +4990 -268
- package/resources/themes/lara-dark-green/theme.css +4990 -268
- package/resources/themes/lara-dark-indigo/theme.css +4990 -268
- package/resources/themes/lara-dark-pink/theme.css +4990 -268
- package/resources/themes/lara-dark-purple/theme.css +4990 -268
- package/resources/themes/lara-dark-teal/theme.css +4990 -268
- package/resources/themes/lara-light-amber/theme.css +4971 -249
- package/resources/themes/lara-light-blue/theme.css +4971 -249
- package/resources/themes/lara-light-cyan/theme.css +4971 -249
- package/resources/themes/lara-light-green/theme.css +4971 -249
- package/resources/themes/lara-light-indigo/theme.css +4971 -249
- package/resources/themes/lara-light-pink/theme.css +4971 -249
- package/resources/themes/lara-light-purple/theme.css +4971 -249
- package/resources/themes/lara-light-teal/theme.css +4971 -249
- package/resources/themes/luna-amber/theme.css +4889 -245
- package/resources/themes/luna-blue/theme.css +4889 -245
- package/resources/themes/luna-green/theme.css +4889 -245
- package/resources/themes/luna-pink/theme.css +4889 -245
- package/resources/themes/md-dark-deeppurple/theme.css +5304 -545
- package/resources/themes/md-dark-indigo/theme.css +5376 -617
- package/resources/themes/md-light-deeppurple/theme.css +5203 -445
- package/resources/themes/md-light-indigo/theme.css +5203 -445
- package/resources/themes/mdc-dark-deeppurple/theme.css +5371 -612
- package/resources/themes/mdc-dark-indigo/theme.css +5304 -545
- package/resources/themes/mdc-light-deeppurple/theme.css +5248 -490
- package/resources/themes/mdc-light-indigo/theme.css +5248 -490
- package/resources/themes/mira/theme.css +4889 -245
- package/resources/themes/nano/theme.css +4893 -249
- package/resources/themes/nova/theme.css +4890 -246
- package/resources/themes/nova-accent/theme.css +4890 -246
- package/resources/themes/nova-alt/theme.css +4890 -246
- package/resources/themes/nova-vue/theme.css +4890 -246
- package/resources/themes/rhea/theme.css +4890 -246
- package/resources/themes/saga-blue/theme.css +4890 -246
- package/resources/themes/saga-green/theme.css +4890 -246
- package/resources/themes/saga-orange/theme.css +4890 -246
- package/resources/themes/saga-purple/theme.css +4890 -246
- package/resources/themes/soho-dark/theme.css +4891 -247
- package/resources/themes/soho-light/theme.css +4891 -247
- package/resources/themes/tailwind-light/theme.css +4890 -246
- package/resources/themes/vela-blue/theme.css +4890 -246
- package/resources/themes/vela-green/theme.css +4890 -246
- package/resources/themes/vela-orange/theme.css +4890 -246
- package/resources/themes/vela-purple/theme.css +4890 -246
- package/resources/themes/viva-dark/theme.css +4889 -245
- package/resources/themes/viva-light/theme.css +4889 -245
- package/ripple/style/ripplestyle.cjs.js +0 -2
- package/ripple/style/ripplestyle.cjs.min.js +1 -1
- package/ripple/style/ripplestyle.esm.js +0 -2
- package/ripple/style/ripplestyle.esm.min.js +1 -1
- package/ripple/style/ripplestyle.js +0 -2
- package/ripple/style/ripplestyle.min.js +1 -1
- package/scrollpanel/ScrollPanel.vue +10 -3
- package/scrollpanel/scrollpanel.cjs.js +9 -5
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +9 -5
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +9 -5
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrollpanel/style/scrollpanelstyle.cjs.js +0 -2
- package/scrollpanel/style/scrollpanelstyle.cjs.min.js +1 -1
- package/scrollpanel/style/scrollpanelstyle.esm.js +0 -2
- package/scrollpanel/style/scrollpanelstyle.esm.min.js +1 -1
- package/scrollpanel/style/scrollpanelstyle.js +0 -2
- package/scrollpanel/style/scrollpanelstyle.min.js +1 -1
- package/scrolltop/ScrollTop.vue +1 -1
- package/scrolltop/scrolltop.cjs.js +1 -3
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.esm.js +1 -3
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +1 -3
- package/scrolltop/scrolltop.min.js +1 -1
- package/scrolltop/style/scrolltopstyle.cjs.js +0 -2
- package/scrolltop/style/scrolltopstyle.cjs.min.js +1 -1
- package/scrolltop/style/scrolltopstyle.esm.js +0 -2
- package/scrolltop/style/scrolltopstyle.esm.min.js +1 -1
- package/scrolltop/style/scrolltopstyle.js +0 -2
- package/scrolltop/style/scrolltopstyle.min.js +1 -1
- package/selectbutton/BaseSelectButton.vue +4 -0
- package/selectbutton/SelectButton.d.ts +5 -0
- package/selectbutton/SelectButton.vue +1 -1
- package/selectbutton/selectbutton.cjs.js +5 -3
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +5 -3
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +5 -3
- package/selectbutton/selectbutton.min.js +1 -1
- package/selectbutton/style/selectbuttonstyle.cjs.js +2 -1
- package/selectbutton/style/selectbuttonstyle.cjs.min.js +1 -1
- package/selectbutton/style/selectbuttonstyle.esm.js +2 -1
- package/selectbutton/style/selectbuttonstyle.esm.min.js +1 -1
- package/selectbutton/style/selectbuttonstyle.js +2 -1
- package/selectbutton/style/selectbuttonstyle.min.js +1 -1
- package/sidebar/style/sidebarstyle.cjs.js +0 -3
- package/sidebar/style/sidebarstyle.cjs.min.js +1 -1
- package/sidebar/style/sidebarstyle.esm.js +0 -3
- package/sidebar/style/sidebarstyle.esm.min.js +1 -1
- package/sidebar/style/sidebarstyle.js +0 -3
- package/sidebar/style/sidebarstyle.min.js +1 -1
- package/skeleton/Skeleton.vue +1 -1
- package/skeleton/skeleton.cjs.js +1 -3
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +1 -3
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +1 -3
- package/skeleton/skeleton.min.js +1 -1
- package/skeleton/style/skeletonstyle.cjs.js +0 -2
- package/skeleton/style/skeletonstyle.cjs.min.js +1 -1
- package/skeleton/style/skeletonstyle.esm.js +0 -2
- package/skeleton/style/skeletonstyle.esm.min.js +1 -1
- package/skeleton/style/skeletonstyle.js +0 -2
- package/skeleton/style/skeletonstyle.min.js +1 -1
- package/slider/Slider.vue +1 -1
- package/slider/slider.cjs.js +1 -2
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +1 -2
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +1 -2
- package/slider/slider.min.js +1 -1
- package/slider/style/sliderstyle.cjs.js +0 -2
- package/slider/style/sliderstyle.cjs.min.js +1 -1
- package/slider/style/sliderstyle.esm.js +0 -2
- package/slider/style/sliderstyle.esm.min.js +1 -1
- package/slider/style/sliderstyle.js +0 -2
- package/slider/style/sliderstyle.min.js +1 -1
- package/speeddial/SpeedDial.vue +1 -1
- package/speeddial/speeddial.cjs.js +1 -3
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +1 -3
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +1 -3
- package/speeddial/speeddial.min.js +1 -1
- package/speeddial/style/speeddialstyle.cjs.js +0 -2
- package/speeddial/style/speeddialstyle.cjs.min.js +1 -1
- package/speeddial/style/speeddialstyle.esm.js +0 -2
- package/speeddial/style/speeddialstyle.esm.min.js +1 -1
- package/speeddial/style/speeddialstyle.js +0 -2
- package/speeddial/style/speeddialstyle.min.js +1 -1
- package/splitbutton/SplitButton.d.ts +1 -1
- package/splitbutton/SplitButton.vue +35 -34
- package/splitbutton/splitbutton.cjs.js +44 -42
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +45 -43
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +44 -42
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitbutton/style/splitbuttonstyle.cjs.js +0 -2
- package/splitbutton/style/splitbuttonstyle.cjs.min.js +1 -1
- package/splitbutton/style/splitbuttonstyle.esm.js +0 -2
- package/splitbutton/style/splitbuttonstyle.esm.min.js +1 -1
- package/splitbutton/style/splitbuttonstyle.js +0 -2
- package/splitbutton/style/splitbuttonstyle.min.js +1 -1
- package/splitter/Splitter.vue +1 -1
- package/splitter/splitter.cjs.js +1 -3
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +1 -3
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +1 -3
- package/splitter/splitter.min.js +1 -1
- package/splitter/style/splitterstyle.cjs.js +0 -2
- package/splitter/style/splitterstyle.cjs.min.js +1 -1
- package/splitter/style/splitterstyle.esm.js +0 -2
- package/splitter/style/splitterstyle.esm.min.js +1 -1
- package/splitter/style/splitterstyle.js +0 -2
- package/splitter/style/splitterstyle.min.js +1 -1
- package/splitterpanel/SplitterPanel.vue +1 -1
- package/splitterpanel/splitterpanel.cjs.js +1 -3
- package/splitterpanel/splitterpanel.cjs.min.js +1 -1
- package/splitterpanel/splitterpanel.esm.js +1 -3
- package/splitterpanel/splitterpanel.esm.min.js +1 -1
- package/splitterpanel/splitterpanel.js +1 -3
- package/splitterpanel/splitterpanel.min.js +1 -1
- package/splitterpanel/style/splitterpanelstyle.cjs.js +0 -2
- package/splitterpanel/style/splitterpanelstyle.cjs.min.js +1 -1
- package/splitterpanel/style/splitterpanelstyle.esm.js +0 -2
- package/splitterpanel/style/splitterpanelstyle.esm.min.js +1 -1
- package/splitterpanel/style/splitterpanelstyle.js +0 -2
- package/splitterpanel/style/splitterpanelstyle.min.js +1 -1
- package/step/BaseStep.vue +18 -0
- package/step/Step.vue +12 -0
- package/step/step.cjs.js +37 -0
- package/step/step.cjs.min.js +1 -0
- package/step/step.esm.js +30 -0
- package/step/step.esm.min.js +1 -0
- package/step/step.js +37 -0
- package/step/step.min.js +1 -0
- package/step/style/stepstyle.cjs.js +5 -0
- package/step/style/stepstyle.cjs.min.js +1 -0
- package/step/style/stepstyle.esm.js +3 -0
- package/step/style/stepstyle.esm.min.js +1 -0
- package/step/style/stepstyle.js +10 -0
- package/step/style/stepstyle.min.js +1 -0
- package/stepper/BaseStepper.vue +25 -0
- package/stepper/Stepper.vue +234 -0
- package/stepper/stepper.cjs.js +271 -0
- package/stepper/stepper.cjs.min.js +1 -0
- package/stepper/stepper.esm.js +264 -0
- package/stepper/stepper.esm.min.js +1 -0
- package/stepper/stepper.js +270 -0
- package/stepper/stepper.min.js +1 -0
- package/stepper/style/stepperstyle.cjs.js +50 -0
- package/stepper/style/stepperstyle.cjs.min.js +1 -0
- package/stepper/style/stepperstyle.esm.js +44 -0
- package/stepper/style/stepperstyle.esm.min.js +1 -0
- package/stepper/style/stepperstyle.js +53 -0
- package/stepper/style/stepperstyle.min.js +1 -0
- package/steps/Steps.vue +1 -1
- package/steps/steps.cjs.js +1 -3
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +1 -3
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +1 -3
- package/steps/steps.min.js +1 -1
- package/steps/style/stepsstyle.cjs.js +0 -2
- package/steps/style/stepsstyle.cjs.min.js +1 -1
- package/steps/style/stepsstyle.esm.js +0 -2
- package/steps/style/stepsstyle.esm.min.js +1 -1
- package/steps/style/stepsstyle.js +0 -2
- package/steps/style/stepsstyle.min.js +1 -1
- package/tabmenu/TabMenu.vue +1 -1
- package/tabmenu/style/tabmenustyle.cjs.js +0 -2
- package/tabmenu/style/tabmenustyle.cjs.min.js +1 -1
- package/tabmenu/style/tabmenustyle.esm.js +0 -2
- package/tabmenu/style/tabmenustyle.esm.min.js +1 -1
- package/tabmenu/style/tabmenustyle.js +0 -2
- package/tabmenu/style/tabmenustyle.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +1 -3
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +1 -3
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +1 -3
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/TabView.vue +2 -1
- package/tabview/style/tabviewstyle.cjs.js +0 -2
- package/tabview/style/tabviewstyle.cjs.min.js +1 -1
- package/tabview/style/tabviewstyle.esm.js +0 -2
- package/tabview/style/tabviewstyle.esm.min.js +1 -1
- package/tabview/style/tabviewstyle.js +0 -2
- package/tabview/style/tabviewstyle.min.js +1 -1
- package/tabview/tabview.cjs.js +2 -3
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +2 -3
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +2 -3
- package/tabview/tabview.min.js +1 -1
- package/tag/Tag.d.ts +1 -1
- package/tag/Tag.vue +1 -1
- package/tag/style/tagstyle.cjs.js +2 -2
- package/tag/style/tagstyle.cjs.min.js +1 -1
- package/tag/style/tagstyle.esm.js +2 -2
- package/tag/style/tagstyle.esm.min.js +1 -1
- package/tag/style/tagstyle.js +2 -2
- package/tag/style/tagstyle.min.js +1 -1
- package/tag/tag.cjs.js +1 -3
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.esm.js +1 -3
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +1 -3
- package/tag/tag.min.js +1 -1
- package/terminal/Terminal.vue +1 -1
- package/terminal/style/terminalstyle.cjs.js +0 -2
- package/terminal/style/terminalstyle.cjs.min.js +1 -1
- package/terminal/style/terminalstyle.esm.js +0 -2
- package/terminal/style/terminalstyle.esm.min.js +1 -1
- package/terminal/style/terminalstyle.js +0 -2
- package/terminal/style/terminalstyle.min.js +1 -1
- package/terminal/terminal.cjs.js +1 -3
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +1 -3
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +1 -3
- package/terminal/terminal.min.js +1 -1
- package/textarea/BaseTextarea.vue +9 -1
- package/textarea/Textarea.d.ts +10 -0
- package/textarea/Textarea.vue +1 -1
- package/textarea/style/textareastyle.cjs.js +3 -3
- package/textarea/style/textareastyle.cjs.min.js +1 -1
- package/textarea/style/textareastyle.esm.js +3 -3
- package/textarea/style/textareastyle.esm.min.js +1 -1
- package/textarea/style/textareastyle.js +3 -3
- package/textarea/style/textareastyle.min.js +1 -1
- package/textarea/textarea.cjs.js +10 -4
- package/textarea/textarea.cjs.min.js +1 -1
- package/textarea/textarea.esm.js +10 -4
- package/textarea/textarea.esm.min.js +1 -1
- package/textarea/textarea.js +10 -4
- package/textarea/textarea.min.js +1 -1
- package/tieredmenu/TieredMenu.vue +1 -1
- package/tieredmenu/style/tieredmenustyle.cjs.js +0 -3
- package/tieredmenu/style/tieredmenustyle.cjs.min.js +1 -1
- package/tieredmenu/style/tieredmenustyle.esm.js +0 -3
- package/tieredmenu/style/tieredmenustyle.esm.min.js +1 -1
- package/tieredmenu/style/tieredmenustyle.js +0 -3
- package/tieredmenu/style/tieredmenustyle.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +1 -3
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +1 -3
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +1 -3
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/Timeline.vue +1 -1
- package/timeline/style/timelinestyle.cjs.js +0 -2
- package/timeline/style/timelinestyle.cjs.min.js +1 -1
- package/timeline/style/timelinestyle.esm.js +0 -2
- package/timeline/style/timelinestyle.esm.min.js +1 -1
- package/timeline/style/timelinestyle.js +0 -2
- package/timeline/style/timelinestyle.min.js +1 -1
- package/timeline/timeline.cjs.js +1 -3
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +1 -3
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +1 -3
- package/timeline/timeline.min.js +1 -1
- package/toast/Toast.d.ts +1 -1
- package/toast/style/toaststyle.cjs.js +3 -4
- package/toast/style/toaststyle.cjs.min.js +1 -1
- package/toast/style/toaststyle.esm.js +3 -4
- package/toast/style/toaststyle.esm.min.js +1 -1
- package/toast/style/toaststyle.js +3 -4
- package/toast/style/toaststyle.min.js +1 -1
- package/togglebutton/BaseToggleButton.vue +4 -0
- package/togglebutton/ToggleButton.d.ts +5 -0
- package/togglebutton/ToggleButton.vue +1 -1
- package/togglebutton/style/togglebuttonstyle.cjs.js +2 -3
- package/togglebutton/style/togglebuttonstyle.cjs.min.js +1 -1
- package/togglebutton/style/togglebuttonstyle.esm.js +2 -3
- package/togglebutton/style/togglebuttonstyle.esm.min.js +1 -1
- package/togglebutton/style/togglebuttonstyle.js +2 -3
- package/togglebutton/style/togglebuttonstyle.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +4 -1
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +4 -1
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +4 -1
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/Toolbar.vue +1 -1
- package/toolbar/style/toolbarstyle.cjs.js +0 -2
- package/toolbar/style/toolbarstyle.cjs.min.js +1 -1
- package/toolbar/style/toolbarstyle.esm.js +0 -2
- package/toolbar/style/toolbarstyle.esm.min.js +1 -1
- package/toolbar/style/toolbarstyle.js +0 -2
- package/toolbar/style/toolbarstyle.min.js +1 -1
- package/toolbar/toolbar.cjs.js +1 -3
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +1 -3
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +1 -3
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/style/tooltipstyle.cjs.js +0 -2
- package/tooltip/style/tooltipstyle.cjs.min.js +1 -1
- package/tooltip/style/tooltipstyle.esm.js +0 -2
- package/tooltip/style/tooltipstyle.esm.min.js +1 -1
- package/tooltip/style/tooltipstyle.js +0 -2
- package/tooltip/style/tooltipstyle.min.js +1 -1
- package/tree/Tree.vue +1 -1
- package/tree/style/treestyle.cjs.js +0 -2
- package/tree/style/treestyle.cjs.min.js +1 -1
- package/tree/style/treestyle.esm.js +0 -2
- package/tree/style/treestyle.esm.min.js +1 -1
- package/tree/style/treestyle.js +0 -2
- package/tree/style/treestyle.min.js +1 -1
- package/tree/tree.cjs.js +1 -3
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +1 -3
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +1 -3
- package/tree/tree.min.js +1 -1
- package/treeselect/BaseTreeSelect.vue +8 -0
- package/treeselect/TreeSelect.d.ts +10 -0
- package/treeselect/TreeSelect.vue +7 -3
- package/treeselect/style/treeselectstyle.cjs.js +4 -4
- package/treeselect/style/treeselectstyle.cjs.min.js +1 -1
- package/treeselect/style/treeselectstyle.esm.js +4 -4
- package/treeselect/style/treeselectstyle.esm.min.js +1 -1
- package/treeselect/style/treeselectstyle.js +4 -4
- package/treeselect/style/treeselectstyle.min.js +1 -1
- package/treeselect/treeselect.cjs.js +16 -6
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +17 -7
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +16 -6
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/HeaderCell.vue +1 -1
- package/treetable/TreeTable.vue +2 -4
- package/treetable/style/treetablestyle.cjs.js +0 -2
- package/treetable/style/treetablestyle.cjs.min.js +1 -1
- package/treetable/style/treetablestyle.esm.js +0 -2
- package/treetable/style/treetablestyle.esm.min.js +1 -1
- package/treetable/style/treetablestyle.js +0 -2
- package/treetable/style/treetablestyle.min.js +1 -1
- package/treetable/treetable.cjs.js +4 -9
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +4 -9
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +4 -9
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/BaseTriStateCheckbox.vue +8 -0
- package/tristatecheckbox/TriStateCheckbox.d.ts +10 -0
- package/tristatecheckbox/TriStateCheckbox.vue +1 -1
- package/tristatecheckbox/style/tristatecheckboxstyle.cjs.js +3 -3
- package/tristatecheckbox/style/tristatecheckboxstyle.cjs.min.js +1 -1
- package/tristatecheckbox/style/tristatecheckboxstyle.esm.js +3 -3
- package/tristatecheckbox/style/tristatecheckboxstyle.esm.min.js +1 -1
- package/tristatecheckbox/style/tristatecheckboxstyle.js +3 -3
- package/tristatecheckbox/style/tristatecheckboxstyle.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +8 -1
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +8 -1
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +8 -1
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +1 -1
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +1 -1
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +1 -1
- package/utils/utils.min.js +1 -1
- package/vetur-attributes.json +138 -6
- package/vetur-tags.json +33 -0
- package/virtualscroller/VirtualScroller.vue +8 -7
- package/virtualscroller/virtualscroller.cjs.js +17 -15
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +17 -15
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +17 -15
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +337 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/button"),t=require("primevue/icons/plus"),l=require("primevue/icons/times"),o=require("primevue/icons/upload"),n=require("primevue/message"),i=require("primevue/progressbar"),s=require("primevue/ripple"),a=require("primevue/utils"),r=require("primevue/basecomponent"),c=require("primevue/fileupload/style"),u=require("primevue/badge"),p=require("vue");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=d(e),m=d(t),h=d(l),y=d(o),g=d(n),v=d(i),b=d(s),B=d(r),F={name:"BaseFileUpload",extends:B.default,props:{name:{type:String,default:null},url:{type:String,default:null},mode:{type:String,default:"advanced"},multiple:{type:Boolean,default:!1},accept:{type:String,default:null},disabled:{type:Boolean,default:!1},auto:{type:Boolean,default:!1},maxFileSize:{type:Number,default:null},invalidFileSizeMessage:{type:String,default:"{0}: Invalid file size, file size should be smaller than {1}."},invalidFileTypeMessage:{type:String,default:"{0}: Invalid file type, allowed file types: {1}."},fileLimit:{type:Number,default:null},invalidFileLimitMessage:{type:String,default:"Maximum number of files exceeded, limit is {0} at most."},withCredentials:{type:Boolean,default:!1},previewWidth:{type:Number,default:50},chooseLabel:{type:String,default:null},uploadLabel:{type:String,default:null},cancelLabel:{type:String,default:null},customUpload:{type:Boolean,default:!1},showUploadButton:{type:Boolean,default:!0},showCancelButton:{type:Boolean,default:!0},chooseIcon:{type:String,default:void 0},uploadIcon:{type:String,default:void 0},cancelIcon:{type:String,default:void 0},style:null,class:null},style:d(c).default,provide:function(){return{$parentInstance:this}}},C={name:"FileContent",hostName:"FileUpload",extends:B.default,emits:["remove"],props:{files:{type:Array,default:function(){return[]}},badgeSeverity:{type:String,default:"warning"},badgeValue:{type:String,default:null},previewWidth:{type:Number,default:50},templates:{type:null,default:null}},methods:{formatSize:function(e){var t,l=(null===(t=this.$primevue.config.locale)||void 0===t?void 0:t.fileSizeTypes)||["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(0===e)return"0 ".concat(l[0]);var o=Math.floor(Math.log(e)/Math.log(1024)),n=parseFloat((e/Math.pow(1024,o)).toFixed(3));return"".concat(n," ").concat(l[o])}},components:{FileUploadButton:f.default,FileUploadBadge:d(u).default,TimesIcon:h.default}},k=["alt","src","width"];function S(e){return L(e)||x(e)||w(e)||I()}function I(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function x(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function L(e){if(Array.isArray(e))return D(e)}function E(e,t){var l="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!l){if(Array.isArray(e)||(l=w(e))||t&&e&&"number"==typeof e.length){l&&(e=l);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){l=l.call(e)},n:function(){var e=l.next();return s=e.done,e},e:function(e){a=!0,i=e},f:function(){try{s||null==l.return||l.return()}finally{if(a)throw i}}}}function w(e,t){if(e){if("string"==typeof e)return D(e,t);var l=Object.prototype.toString.call(e).slice(8,-1);return"Object"===l&&e.constructor&&(l=e.constructor.name),"Map"===l||"Set"===l?Array.from(e):"Arguments"===l||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?D(e,t):void 0}}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var l=0,o=new Array(t);l<t;l++)o[l]=e[l];return o}C.render=function(e,t,l,o,n,i){var s=p.resolveComponent("FileUploadBadge"),a=p.resolveComponent("TimesIcon"),r=p.resolveComponent("FileUploadButton");return p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(l.files,(function(t,o){return p.openBlock(),p.createElementBlock("div",p.mergeProps({key:t.name+t.type+t.size,class:e.cx("file")},e.ptm("file")),[p.createElementVNode("img",p.mergeProps({role:"presentation",class:e.cx("thumbnail"),alt:t.name,src:t.objectURL,width:l.previewWidth},e.ptm("thumbnail")),null,16,k),p.createElementVNode("div",p.mergeProps({class:e.cx("details")},e.ptm("details")),[p.createElementVNode("div",p.mergeProps({class:e.cx("fileName")},e.ptm("fileName")),p.toDisplayString(t.name),17),p.createElementVNode("span",p.mergeProps({class:e.cx("fileSize")},e.ptm("fileSize")),p.toDisplayString(i.formatSize(t.size)),17),p.createVNode(s,{value:l.badgeValue,class:p.normalizeClass(e.cx("badge")),severity:l.badgeSeverity,unstyled:e.unstyled,pt:e.ptm("badge")},null,8,["value","class","severity","unstyled","pt"])],16),p.createElementVNode("div",p.mergeProps({class:e.cx("actions")},e.ptm("actions")),[p.createVNode(r,{onClick:function(t){return e.$emit("remove",o)},text:"",rounded:"",severity:"danger",class:p.normalizeClass(e.cx("removeButton")),unstyled:e.unstyled,pt:e.ptm("removeButton")},{icon:p.withCtx((function(n){return[l.templates.fileremoveicon?(p.openBlock(),p.createBlock(p.resolveDynamicComponent(l.templates.fileremoveicon),{key:0,class:p.normalizeClass(n.class),file:t,index:o},null,8,["class","file","index"])):(p.openBlock(),p.createBlock(a,p.mergeProps({key:1,class:n.class,"aria-hidden":"true"},e.ptm("removeButton").icon),null,16,["class"]))]})),_:2},1032,["onClick","class","unstyled","pt"])],16)],16)})),128)};var $={name:"FileUpload",extends:F,emits:["select","uploader","before-upload","progress","upload","error","before-send","clear","remove","remove-uploaded-file"],duplicateIEEvent:!1,data:function(){return{uploadedFileCount:0,files:[],messages:[],focused:!1,progress:null,uploadedFiles:[]}},methods:{onFileSelect:function(e){if("drop"!==e.type&&this.isIE11()&&this.duplicateIEEvent)this.duplicateIEEvent=!1;else{this.messages=[],this.files=this.files||[];var t,l=E(e.dataTransfer?e.dataTransfer.files:e.target.files);try{for(l.s();!(t=l.n()).done;){var o=t.value;this.isFileSelected(o)||this.validate(o)&&(this.isImage(o)&&(o.objectURL=window.URL.createObjectURL(o)),this.files.push(o))}}catch(e){l.e(e)}finally{l.f()}this.$emit("select",{originalEvent:e,files:this.files}),this.fileLimit&&this.checkFileLimit(),this.auto&&this.hasFiles&&!this.isFileLimitExceeded()&&this.upload(),"drop"!==e.type&&this.isIE11()?this.clearIEInput():this.clearInputElement()}},choose:function(){this.$refs.fileInput.click()},upload:function(){var e=this;if(this.customUpload)this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.$emit("uploader",{files:this.files}),this.clear();else{var t=new XMLHttpRequest,l=new FormData;this.$emit("before-upload",{xhr:t,formData:l});var o,n=E(this.files);try{for(n.s();!(o=n.n()).done;){var i=o.value;l.append(this.name,i,i.name)}}catch(e){n.e(e)}finally{n.f()}t.upload.addEventListener("progress",(function(t){t.lengthComputable&&(e.progress=Math.round(100*t.loaded/t.total)),e.$emit("progress",{originalEvent:t,progress:e.progress})})),t.onreadystatechange=function(){var l;4===t.readyState&&(e.progress=0,t.status>=200&&t.status<300?(e.fileLimit&&(e.uploadedFileCount+=e.files.length),e.$emit("upload",{xhr:t,files:e.files})):e.$emit("error",{xhr:t,files:e.files}),(l=e.uploadedFiles).push.apply(l,S(e.files)),e.clear())},t.open("POST",this.url,!0),this.$emit("before-send",{xhr:t,formData:l}),t.withCredentials=this.withCredentials,t.send(l)}},clear:function(){this.files=[],this.messages=null,this.$emit("clear"),this.isAdvanced&&this.clearInputElement()},onFocus:function(){this.focused=!0},onBlur:function(){this.focused=!1},isFileSelected:function(e){if(this.files&&this.files.length){var t,l=E(this.files);try{for(l.s();!(t=l.n()).done;){var o=t.value;if(o.name+o.type+o.size===e.name+e.type+e.size)return!0}}catch(e){l.e(e)}finally{l.f()}}return!1},isIE11:function(){return!!window.MSInputMethodContext&&!!document.documentMode},validate:function(e){return this.accept&&!this.isFileTypeValid(e)?(this.messages.push(this.invalidFileTypeMessage.replace("{0}",e.name).replace("{1}",this.accept)),!1):!(this.maxFileSize&&e.size>this.maxFileSize)||(this.messages.push(this.invalidFileSizeMessage.replace("{0}",e.name).replace("{1}",this.formatSize(this.maxFileSize))),!1)},isFileTypeValid:function(e){var t,l=this.accept.split(",").map((function(e){return e.trim()})),o=E(l);try{for(o.s();!(t=o.n()).done;){var n=t.value;if(this.isWildcard(n)?this.getTypeClass(e.type)===this.getTypeClass(n):e.type==n||this.getFileExtension(e).toLowerCase()===n.toLowerCase())return!0}}catch(e){o.e(e)}finally{o.f()}return!1},getTypeClass:function(e){return e.substring(0,e.indexOf("/"))},isWildcard:function(e){return-1!==e.indexOf("*")},getFileExtension:function(e){return"."+e.name.split(".").pop()},isImage:function(e){return/^image\//.test(e.type)},onDragEnter:function(e){this.disabled||(e.stopPropagation(),e.preventDefault())},onDragOver:function(e){this.disabled||(!this.isUnstyled&&a.DomHandler.addClass(this.$refs.content,"p-fileupload-highlight"),this.$refs.content.setAttribute("data-p-highlight",!0),e.stopPropagation(),e.preventDefault())},onDragLeave:function(){this.disabled||(!this.isUnstyled&&a.DomHandler.removeClass(this.$refs.content,"p-fileupload-highlight"),this.$refs.content.setAttribute("data-p-highlight",!1))},onDrop:function(e){if(!this.disabled){!this.isUnstyled&&a.DomHandler.removeClass(this.$refs.content,"p-fileupload-highlight"),this.$refs.content.setAttribute("data-p-highlight",!1),e.stopPropagation(),e.preventDefault();var t=e.dataTransfer?e.dataTransfer.files:e.target.files;(this.multiple||t&&1===t.length)&&this.onFileSelect(e)}},onBasicUploaderClick:function(e){this.hasFiles?this.upload():0===e.button&&this.$refs.fileInput.click()},remove:function(e){this.clearInputElement();var t=this.files.splice(e,1)[0];this.files=S(this.files),this.$emit("remove",{file:t,files:this.files})},removeUploadedFile:function(e){var t=this.uploadedFiles.splice(e,1)[0];this.uploadedFiles=S(this.uploadedFiles),this.$emit("remove-uploaded-file",{file:t,files:this.uploadedFiles})},clearInputElement:function(){this.$refs.fileInput.value=""},clearIEInput:function(){this.$refs.fileInput&&(this.duplicateIEEvent=!0,this.$refs.fileInput.value="")},formatSize:function(e){var t,l=(null===(t=this.$primevue.config.locale)||void 0===t?void 0:t.fileSizeTypes)||["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(0===e)return"0 ".concat(l[0]);var o=Math.floor(Math.log(e)/Math.log(1024)),n=parseFloat((e/Math.pow(1024,o)).toFixed(3));return"".concat(n," ").concat(l[o])},isFileLimitExceeded:function(){return this.fileLimit&&this.fileLimit<=this.files.length+this.uploadedFileCount&&this.focused&&(this.focused=!1),this.fileLimit&&this.fileLimit<this.files.length+this.uploadedFileCount},checkFileLimit:function(){this.isFileLimitExceeded()&&this.messages.push(this.invalidFileLimitMessage.replace("{0}",this.fileLimit.toString()))},onMessageClose:function(){this.messages=null}},computed:{isAdvanced:function(){return"advanced"===this.mode},isBasic:function(){return"basic"===this.mode},chooseButtonClass:function(){return[this.cx("chooseButton"),this.class]},basicChooseButtonLabel:function(){return this.auto?this.chooseButtonLabel:this.hasFiles?this.files.map((function(e){return e.name})).join(", "):this.chooseButtonLabel},hasFiles:function(){return this.files&&this.files.length>0},hasUploadedFiles:function(){return this.uploadedFiles&&this.uploadedFiles.length>0},chooseDisabled:function(){return this.disabled||this.fileLimit&&this.fileLimit<=this.files.length+this.uploadedFileCount},uploadDisabled:function(){return this.disabled||!this.hasFiles||this.fileLimit&&this.fileLimit<this.files.length},cancelDisabled:function(){return this.disabled||!this.hasFiles},chooseButtonLabel:function(){return this.chooseLabel||this.$primevue.config.locale.choose},uploadButtonLabel:function(){return this.uploadLabel||this.$primevue.config.locale.upload},cancelButtonLabel:function(){return this.cancelLabel||this.$primevue.config.locale.cancel},completedLabel:function(){return this.$primevue.config.locale.completed},pendingLabel:function(){return this.$primevue.config.locale.pending}},components:{FileUploadButton:f.default,FileUploadProgressBar:v.default,FileUploadMessage:g.default,FileContent:C,PlusIcon:m.default,UploadIcon:y.default,TimesIcon:h.default},directives:{ripple:b.default}},U=["multiple","accept","disabled"],P=["accept","disabled","multiple"];$.render=function(e,t,l,o,n,i){var s=p.resolveComponent("FileUploadButton"),a=p.resolveComponent("FileUploadProgressBar"),r=p.resolveComponent("FileUploadMessage"),c=p.resolveComponent("FileContent"),u=p.resolveDirective("ripple");return i.isAdvanced?(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:0,class:e.cx("root")},e.ptm("root"),{"data-pc-name":"fileupload"}),[p.createElementVNode("input",p.mergeProps({ref:"fileInput",type:"file",onChange:t[0]||(t[0]=function(){return i.onFileSelect&&i.onFileSelect.apply(i,arguments)}),multiple:e.multiple,accept:e.accept,disabled:i.chooseDisabled},e.ptm("input")),null,16,U),p.createElementVNode("div",p.mergeProps({class:e.cx("buttonbar")},e.ptm("buttonbar")),[p.renderSlot(e.$slots,"header",{files:n.files,uploadedFiles:n.uploadedFiles,chooseCallback:i.choose,uploadCallback:i.upload,clearCallback:i.clear},(function(){return[p.withDirectives((p.openBlock(),p.createElementBlock("span",p.mergeProps({class:i.chooseButtonClass,style:e.style,onClick:t[1]||(t[1]=function(){return i.choose&&i.choose.apply(i,arguments)}),onKeydown:t[2]||(t[2]=p.withKeys((function(){return i.choose&&i.choose.apply(i,arguments)}),["enter"])),onFocus:t[3]||(t[3]=function(){return i.onFocus&&i.onFocus.apply(i,arguments)}),onBlur:t[4]||(t[4]=function(){return i.onBlur&&i.onBlur.apply(i,arguments)}),tabindex:"0"},e.ptm("chooseButton")),[p.renderSlot(e.$slots,"chooseicon",{class:p.normalizeClass(e.cx("chooseIcon"))},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.chooseIcon?"span":"PlusIcon"),p.mergeProps({class:[e.cx("chooseIcon"),e.chooseIcon],"aria-hidden":"true"},e.ptm("chooseIcon")),null,16,["class"]))]})),p.createElementVNode("span",p.mergeProps({class:e.cx("chooseButtonLabel")},e.ptm("chooseButtonLabel")),p.toDisplayString(i.chooseButtonLabel),17)],16)),[[u]]),e.showUploadButton?(p.openBlock(),p.createBlock(s,{key:0,label:i.uploadButtonLabel,onClick:i.upload,disabled:i.uploadDisabled,unstyled:e.unstyled,pt:e.ptm("uploadButton"),"data-pc-section":"uploadbutton"},{icon:p.withCtx((function(t){return[p.renderSlot(e.$slots,"uploadicon",{},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.uploadIcon?"span":"UploadIcon"),p.mergeProps({class:[t.class,e.uploadIcon],"aria-hidden":"true"},e.ptm("uploadButton").icon,{"data-pc-section":"uploadbuttonicon"}),null,16,["class"]))]}))]})),_:3},8,["label","onClick","disabled","unstyled","pt"])):p.createCommentVNode("",!0),e.showCancelButton?(p.openBlock(),p.createBlock(s,{key:1,label:i.cancelButtonLabel,onClick:i.clear,disabled:i.cancelDisabled,unstyled:e.unstyled,pt:e.ptm("cancelButton"),"data-pc-section":"cancelbutton"},{icon:p.withCtx((function(t){return[p.renderSlot(e.$slots,"cancelicon",{},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.cancelIcon?"span":"TimesIcon"),p.mergeProps({class:[t.class,e.cancelIcon],"aria-hidden":"true"},e.ptm("cancelButton").icon,{"data-pc-section":"cancelbuttonicon"}),null,16,["class"]))]}))]})),_:3},8,["label","onClick","disabled","unstyled","pt"])):p.createCommentVNode("",!0)]}))],16),p.createElementVNode("div",p.mergeProps({ref:"content",class:e.cx("content"),onDragenter:t[5]||(t[5]=function(){return i.onDragEnter&&i.onDragEnter.apply(i,arguments)}),onDragover:t[6]||(t[6]=function(){return i.onDragOver&&i.onDragOver.apply(i,arguments)}),onDragleave:t[7]||(t[7]=function(){return i.onDragLeave&&i.onDragLeave.apply(i,arguments)}),onDrop:t[8]||(t[8]=function(){return i.onDrop&&i.onDrop.apply(i,arguments)})},e.ptm("content"),{"data-p-highlight":!1}),[p.renderSlot(e.$slots,"content",{files:n.files,uploadedFiles:n.uploadedFiles,removeUploadedFileCallback:i.removeUploadedFile,removeFileCallback:i.remove,progress:n.progress,messages:n.messages},(function(){return[i.hasFiles?(p.openBlock(),p.createBlock(a,{key:0,value:n.progress,showValue:!1,unstyled:e.unstyled,pt:e.ptm("progressbar")},null,8,["value","unstyled","pt"])):p.createCommentVNode("",!0),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(n.messages,(function(t){return p.openBlock(),p.createBlock(r,{key:t,severity:"error",onClose:i.onMessageClose,unstyled:e.unstyled,pt:e.ptm("message")},{default:p.withCtx((function(){return[p.createTextVNode(p.toDisplayString(t),1)]})),_:2},1032,["onClose","unstyled","pt"])})),128)),i.hasFiles?(p.openBlock(),p.createBlock(c,{key:1,files:n.files,onRemove:i.remove,badgeValue:i.pendingLabel,previewWidth:e.previewWidth,templates:e.$slots,unstyled:e.unstyled,pt:e.pt},null,8,["files","onRemove","badgeValue","previewWidth","templates","unstyled","pt"])):p.createCommentVNode("",!0),p.createVNode(c,{files:n.uploadedFiles,onRemove:i.removeUploadedFile,badgeValue:i.completedLabel,badgeSeverity:"success",previewWidth:e.previewWidth,templates:e.$slots,unstyled:e.unstyled,pt:e.pt},null,8,["files","onRemove","badgeValue","previewWidth","templates","unstyled","pt"])]})),!e.$slots.empty||i.hasFiles||i.hasUploadedFiles?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:0,class:e.cx("empty")},e.ptm("empty")),[p.renderSlot(e.$slots,"empty")],16))],16)],16)):i.isBasic?(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:1,class:e.cx("root")},e.ptm("root"),{"data-pc-name":"fileupload"}),[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(n.messages,(function(t){return p.openBlock(),p.createBlock(r,{key:t,severity:"error",onClose:i.onMessageClose,unstyled:e.unstyled,pt:e.ptm("messages")},{default:p.withCtx((function(){return[p.createTextVNode(p.toDisplayString(t),1)]})),_:2},1032,["onClose","unstyled","pt"])})),128)),p.withDirectives((p.openBlock(),p.createElementBlock("span",p.mergeProps({class:i.chooseButtonClass,style:e.style,onMouseup:t[12]||(t[12]=function(){return i.onBasicUploaderClick&&i.onBasicUploaderClick.apply(i,arguments)}),onKeydown:t[13]||(t[13]=p.withKeys((function(){return i.choose&&i.choose.apply(i,arguments)}),["enter"])),onFocus:t[14]||(t[14]=function(){return i.onFocus&&i.onFocus.apply(i,arguments)}),onBlur:t[15]||(t[15]=function(){return i.onBlur&&i.onBlur.apply(i,arguments)}),tabindex:"0"},e.ptm("chooseButton")),[!i.hasFiles||e.auto?p.renderSlot(e.$slots,"uploadicon",{key:0,class:p.normalizeClass(e.cx("uploadIcon"))},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.uploadIcon?"span":"UploadIcon"),p.mergeProps({class:[e.cx("uploadIcon"),e.uploadIcon],"aria-hidden":"true"},e.ptm("uploadIcon")),null,16,["class"]))]})):p.renderSlot(e.$slots,"chooseicon",{key:1,class:p.normalizeClass(e.cx("chooseIcon"))},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.chooseIcon?"span":"PlusIcon"),p.mergeProps({class:[e.cx("chooseIcon"),e.chooseIcon],"aria-hidden":"true"},e.ptm("chooseIcon")),null,16,["class"]))]})),p.createElementVNode("span",p.mergeProps({class:e.cx("label")},e.ptm("label")),p.toDisplayString(i.basicChooseButtonLabel),17),i.hasFiles?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("input",p.mergeProps({key:2,ref:"fileInput",type:"file",accept:e.accept,disabled:e.disabled,multiple:e.multiple,onChange:t[9]||(t[9]=function(){return i.onFileSelect&&i.onFileSelect.apply(i,arguments)}),onFocus:t[10]||(t[10]=function(){return i.onFocus&&i.onFocus.apply(i,arguments)}),onBlur:t[11]||(t[11]=function(){return i.onBlur&&i.onBlur.apply(i,arguments)})},e.ptm("input")),null,16,P))],16)),[[u]])],16)):p.createCommentVNode("",!0)},module.exports=$;
|
|
1
|
+
"use strict";var e=require("primevue/button"),t=require("primevue/icons/plus"),l=require("primevue/icons/times"),o=require("primevue/icons/upload"),n=require("primevue/message"),i=require("primevue/progressbar"),s=require("primevue/ripple"),a=require("primevue/utils"),r=require("primevue/basecomponent"),c=require("primevue/fileupload/style"),u=require("primevue/badge"),p=require("vue");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=d(e),m=d(t),h=d(l),y=d(o),g=d(n),v=d(i),B=d(s),b=d(r),F={name:"BaseFileUpload",extends:b.default,props:{name:{type:String,default:null},url:{type:String,default:null},mode:{type:String,default:"advanced"},multiple:{type:Boolean,default:!1},accept:{type:String,default:null},disabled:{type:Boolean,default:!1},auto:{type:Boolean,default:!1},maxFileSize:{type:Number,default:null},invalidFileSizeMessage:{type:String,default:"{0}: Invalid file size, file size should be smaller than {1}."},invalidFileTypeMessage:{type:String,default:"{0}: Invalid file type, allowed file types: {1}."},fileLimit:{type:Number,default:null},invalidFileLimitMessage:{type:String,default:"Maximum number of files exceeded, limit is {0} at most."},withCredentials:{type:Boolean,default:!1},previewWidth:{type:Number,default:50},chooseLabel:{type:String,default:null},uploadLabel:{type:String,default:null},cancelLabel:{type:String,default:null},customUpload:{type:Boolean,default:!1},showUploadButton:{type:Boolean,default:!0},showCancelButton:{type:Boolean,default:!0},chooseIcon:{type:String,default:void 0},uploadIcon:{type:String,default:void 0},cancelIcon:{type:String,default:void 0},style:null,class:null},style:d(c).default,provide:function(){return{$parentInstance:this}}},C={name:"FileContent",hostName:"FileUpload",extends:b.default,emits:["remove"],props:{files:{type:Array,default:function(){return[]}},badgeSeverity:{type:String,default:"warning"},badgeValue:{type:String,default:null},previewWidth:{type:Number,default:50},templates:{type:null,default:null}},methods:{formatSize:function(e){var t,l=(null===(t=this.$primevue.config.locale)||void 0===t?void 0:t.fileSizeTypes)||["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(0===e)return"0 ".concat(l[0]);var o=Math.floor(Math.log(e)/Math.log(1024)),n=parseFloat((e/Math.pow(1024,o)).toFixed(3));return"".concat(n," ").concat(l[o])}},components:{FileUploadButton:f.default,FileUploadBadge:d(u).default,TimesIcon:h.default}},k=["alt","src","width"];function S(e){return L(e)||x(e)||w(e)||I()}function I(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function x(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function L(e){if(Array.isArray(e))return D(e)}function E(e,t){var l="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!l){if(Array.isArray(e)||(l=w(e))||t&&e&&"number"==typeof e.length){l&&(e=l);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){l=l.call(e)},n:function(){var e=l.next();return s=e.done,e},e:function(e){a=!0,i=e},f:function(){try{s||null==l.return||l.return()}finally{if(a)throw i}}}}function w(e,t){if(e){if("string"==typeof e)return D(e,t);var l=Object.prototype.toString.call(e).slice(8,-1);return"Object"===l&&e.constructor&&(l=e.constructor.name),"Map"===l||"Set"===l?Array.from(e):"Arguments"===l||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?D(e,t):void 0}}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var l=0,o=new Array(t);l<t;l++)o[l]=e[l];return o}C.render=function(e,t,l,o,n,i){var s=p.resolveComponent("FileUploadBadge"),a=p.resolveComponent("TimesIcon"),r=p.resolveComponent("FileUploadButton");return p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(l.files,(function(t,o){return p.openBlock(),p.createElementBlock("div",p.mergeProps({key:t.name+t.type+t.size,class:e.cx("file")},e.ptm("file")),[p.createElementVNode("img",p.mergeProps({role:"presentation",class:e.cx("thumbnail"),alt:t.name,src:t.objectURL,width:l.previewWidth},e.ptm("thumbnail")),null,16,k),p.createElementVNode("div",p.mergeProps({class:e.cx("details")},e.ptm("details")),[p.createElementVNode("div",p.mergeProps({class:e.cx("fileName")},e.ptm("fileName")),p.toDisplayString(t.name),17),p.createElementVNode("span",p.mergeProps({class:e.cx("fileSize")},e.ptm("fileSize")),p.toDisplayString(i.formatSize(t.size)),17),p.createVNode(s,{value:l.badgeValue,class:p.normalizeClass(e.cx("badge")),severity:l.badgeSeverity,unstyled:e.unstyled,pt:e.ptm("badge")},null,8,["value","class","severity","unstyled","pt"])],16),p.createElementVNode("div",p.mergeProps({class:e.cx("actions")},e.ptm("actions")),[p.createVNode(r,{onClick:function(t){return e.$emit("remove",o)},text:"",rounded:"",severity:"danger",class:p.normalizeClass(e.cx("removeButton")),unstyled:e.unstyled,pt:e.ptm("removeButton")},{icon:p.withCtx((function(n){return[l.templates.fileremoveicon?(p.openBlock(),p.createBlock(p.resolveDynamicComponent(l.templates.fileremoveicon),{key:0,class:p.normalizeClass(n.class),file:t,index:o},null,8,["class","file","index"])):(p.openBlock(),p.createBlock(a,p.mergeProps({key:1,class:n.class,"aria-hidden":"true"},e.ptm("removeButton").icon),null,16,["class"]))]})),_:2},1032,["onClick","class","unstyled","pt"])],16)],16)})),128)};var $={name:"FileUpload",extends:F,emits:["select","uploader","before-upload","progress","upload","error","before-send","clear","remove","remove-uploaded-file"],duplicateIEEvent:!1,data:function(){return{uploadedFileCount:0,files:[],messages:[],focused:!1,progress:null,uploadedFiles:[]}},methods:{onFileSelect:function(e){if("drop"!==e.type&&this.isIE11()&&this.duplicateIEEvent)this.duplicateIEEvent=!1;else{this.messages=[],this.files=this.files||[];var t,l=E(e.dataTransfer?e.dataTransfer.files:e.target.files);try{for(l.s();!(t=l.n()).done;){var o=t.value;this.isFileSelected(o)||this.validate(o)&&(this.isImage(o)&&(o.objectURL=window.URL.createObjectURL(o)),this.files.push(o))}}catch(e){l.e(e)}finally{l.f()}this.$emit("select",{originalEvent:e,files:this.files}),this.fileLimit&&this.checkFileLimit(),this.auto&&this.hasFiles&&!this.isFileLimitExceeded()&&this.upload(),"drop"!==e.type&&this.isIE11()?this.clearIEInput():this.clearInputElement()}},choose:function(){this.$refs.fileInput.click()},upload:function(){var e=this;if(this.customUpload)this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.$emit("uploader",{files:this.files}),this.clear();else{var t=new XMLHttpRequest,l=new FormData;this.$emit("before-upload",{xhr:t,formData:l});var o,n=E(this.files);try{for(n.s();!(o=n.n()).done;){var i=o.value;l.append(this.name,i,i.name)}}catch(e){n.e(e)}finally{n.f()}t.upload.addEventListener("progress",(function(t){t.lengthComputable&&(e.progress=Math.round(100*t.loaded/t.total)),e.$emit("progress",{originalEvent:t,progress:e.progress})})),t.onreadystatechange=function(){var l;4===t.readyState&&(e.progress=0,t.status>=200&&t.status<300?(e.fileLimit&&(e.uploadedFileCount+=e.files.length),e.$emit("upload",{xhr:t,files:e.files})):e.$emit("error",{xhr:t,files:e.files}),(l=e.uploadedFiles).push.apply(l,S(e.files)),e.clear())},t.open("POST",this.url,!0),this.$emit("before-send",{xhr:t,formData:l}),t.withCredentials=this.withCredentials,t.send(l)}},clear:function(){this.files=[],this.messages=null,this.$emit("clear"),this.isAdvanced&&this.clearInputElement()},onFocus:function(){this.focused=!0},onBlur:function(){this.focused=!1},isFileSelected:function(e){if(this.files&&this.files.length){var t,l=E(this.files);try{for(l.s();!(t=l.n()).done;){var o=t.value;if(o.name+o.type+o.size===e.name+e.type+e.size)return!0}}catch(e){l.e(e)}finally{l.f()}}return!1},isIE11:function(){return!!window.MSInputMethodContext&&!!document.documentMode},validate:function(e){return this.accept&&!this.isFileTypeValid(e)?(this.messages.push(this.invalidFileTypeMessage.replace("{0}",e.name).replace("{1}",this.accept)),!1):!(this.maxFileSize&&e.size>this.maxFileSize)||(this.messages.push(this.invalidFileSizeMessage.replace("{0}",e.name).replace("{1}",this.formatSize(this.maxFileSize))),!1)},isFileTypeValid:function(e){var t,l=this.accept.split(",").map((function(e){return e.trim()})),o=E(l);try{for(o.s();!(t=o.n()).done;){var n=t.value;if(this.isWildcard(n)?this.getTypeClass(e.type)===this.getTypeClass(n):e.type==n||this.getFileExtension(e).toLowerCase()===n.toLowerCase())return!0}}catch(e){o.e(e)}finally{o.f()}return!1},getTypeClass:function(e){return e.substring(0,e.indexOf("/"))},isWildcard:function(e){return-1!==e.indexOf("*")},getFileExtension:function(e){return"."+e.name.split(".").pop()},isImage:function(e){return/^image\//.test(e.type)},onDragEnter:function(e){this.disabled||(e.stopPropagation(),e.preventDefault())},onDragOver:function(e){this.disabled||(!this.isUnstyled&&a.DomHandler.addClass(this.$refs.content,"p-fileupload-highlight"),this.$refs.content.setAttribute("data-p-highlight",!0),e.stopPropagation(),e.preventDefault())},onDragLeave:function(){this.disabled||(!this.isUnstyled&&a.DomHandler.removeClass(this.$refs.content,"p-fileupload-highlight"),this.$refs.content.setAttribute("data-p-highlight",!1))},onDrop:function(e){if(!this.disabled){!this.isUnstyled&&a.DomHandler.removeClass(this.$refs.content,"p-fileupload-highlight"),this.$refs.content.setAttribute("data-p-highlight",!1),e.stopPropagation(),e.preventDefault();var t=e.dataTransfer?e.dataTransfer.files:e.target.files;(this.multiple||t&&1===t.length)&&this.onFileSelect(e)}},onBasicUploaderClick:function(e){this.hasFiles?this.upload():0===e.button&&this.$refs.fileInput.click()},remove:function(e){this.clearInputElement();var t=this.files.splice(e,1)[0];this.files=S(this.files),this.$emit("remove",{file:t,files:this.files})},removeUploadedFile:function(e){var t=this.uploadedFiles.splice(e,1)[0];this.uploadedFiles=S(this.uploadedFiles),this.$emit("remove-uploaded-file",{file:t,files:this.uploadedFiles})},clearInputElement:function(){this.$refs.fileInput.value=""},clearIEInput:function(){this.$refs.fileInput&&(this.duplicateIEEvent=!0,this.$refs.fileInput.value="")},formatSize:function(e){var t,l=(null===(t=this.$primevue.config.locale)||void 0===t?void 0:t.fileSizeTypes)||["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(0===e)return"0 ".concat(l[0]);var o=Math.floor(Math.log(e)/Math.log(1024)),n=parseFloat((e/Math.pow(1024,o)).toFixed(3));return"".concat(n," ").concat(l[o])},isFileLimitExceeded:function(){return this.fileLimit&&this.fileLimit<=this.files.length+this.uploadedFileCount&&this.focused&&(this.focused=!1),this.fileLimit&&this.fileLimit<this.files.length+this.uploadedFileCount},checkFileLimit:function(){this.isFileLimitExceeded()&&this.messages.push(this.invalidFileLimitMessage.replace("{0}",this.fileLimit.toString()))},onMessageClose:function(){this.messages=null}},computed:{isAdvanced:function(){return"advanced"===this.mode},isBasic:function(){return"basic"===this.mode},chooseButtonClass:function(){return[this.cx("chooseButton"),this.class]},basicChooseButtonLabel:function(){return this.auto?this.chooseButtonLabel:this.hasFiles?this.files.map((function(e){return e.name})).join(", "):this.chooseButtonLabel},hasFiles:function(){return this.files&&this.files.length>0},hasUploadedFiles:function(){return this.uploadedFiles&&this.uploadedFiles.length>0},chooseDisabled:function(){return this.disabled||this.fileLimit&&this.fileLimit<=this.files.length+this.uploadedFileCount},uploadDisabled:function(){return this.disabled||!this.hasFiles||this.fileLimit&&this.fileLimit<this.files.length},cancelDisabled:function(){return this.disabled||!this.hasFiles},chooseButtonLabel:function(){return this.chooseLabel||this.$primevue.config.locale.choose},uploadButtonLabel:function(){return this.uploadLabel||this.$primevue.config.locale.upload},cancelButtonLabel:function(){return this.cancelLabel||this.$primevue.config.locale.cancel},completedLabel:function(){return this.$primevue.config.locale.completed},pendingLabel:function(){return this.$primevue.config.locale.pending}},components:{FileUploadButton:f.default,FileUploadProgressBar:v.default,FileUploadMessage:g.default,FileContent:C,PlusIcon:m.default,UploadIcon:y.default,TimesIcon:h.default},directives:{ripple:B.default}},U=["multiple","accept","disabled"],P=["accept","disabled","multiple"];$.render=function(e,t,l,o,n,i){var s=p.resolveComponent("FileUploadButton"),a=p.resolveComponent("FileUploadProgressBar"),r=p.resolveComponent("FileUploadMessage"),c=p.resolveComponent("FileContent"),u=p.resolveDirective("ripple");return i.isAdvanced?(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:0,class:e.cx("root")},e.ptm("root")),[p.createElementVNode("input",p.mergeProps({ref:"fileInput",type:"file",onChange:t[0]||(t[0]=function(){return i.onFileSelect&&i.onFileSelect.apply(i,arguments)}),multiple:e.multiple,accept:e.accept,disabled:i.chooseDisabled},e.ptm("input")),null,16,U),p.createElementVNode("div",p.mergeProps({class:e.cx("buttonbar")},e.ptm("buttonbar")),[p.renderSlot(e.$slots,"header",{files:n.files,uploadedFiles:n.uploadedFiles,chooseCallback:i.choose,uploadCallback:i.upload,clearCallback:i.clear},(function(){return[p.withDirectives((p.openBlock(),p.createElementBlock("span",p.mergeProps({class:i.chooseButtonClass,style:e.style,onClick:t[1]||(t[1]=function(){return i.choose&&i.choose.apply(i,arguments)}),onKeydown:t[2]||(t[2]=p.withKeys((function(){return i.choose&&i.choose.apply(i,arguments)}),["enter"])),onFocus:t[3]||(t[3]=function(){return i.onFocus&&i.onFocus.apply(i,arguments)}),onBlur:t[4]||(t[4]=function(){return i.onBlur&&i.onBlur.apply(i,arguments)}),tabindex:"0"},e.ptm("chooseButton")),[p.renderSlot(e.$slots,"chooseicon",{class:p.normalizeClass(e.cx("chooseIcon"))},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.chooseIcon?"span":"PlusIcon"),p.mergeProps({class:[e.cx("chooseIcon"),e.chooseIcon],"aria-hidden":"true"},e.ptm("chooseIcon")),null,16,["class"]))]})),p.createElementVNode("span",p.mergeProps({class:e.cx("chooseButtonLabel")},e.ptm("chooseButtonLabel")),p.toDisplayString(i.chooseButtonLabel),17)],16)),[[u]]),e.showUploadButton?(p.openBlock(),p.createBlock(s,{key:0,label:i.uploadButtonLabel,onClick:i.upload,disabled:i.uploadDisabled,unstyled:e.unstyled,pt:e.ptm("uploadButton")},{icon:p.withCtx((function(t){return[p.renderSlot(e.$slots,"uploadicon",{},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.uploadIcon?"span":"UploadIcon"),p.mergeProps({class:[t.class,e.uploadIcon],"aria-hidden":"true"},e.ptm("uploadButton").icon,{"data-pc-section":"uploadbuttonicon"}),null,16,["class"]))]}))]})),_:3},8,["label","onClick","disabled","unstyled","pt"])):p.createCommentVNode("",!0),e.showCancelButton?(p.openBlock(),p.createBlock(s,{key:1,label:i.cancelButtonLabel,onClick:i.clear,disabled:i.cancelDisabled,unstyled:e.unstyled,pt:e.ptm("cancelButton")},{icon:p.withCtx((function(t){return[p.renderSlot(e.$slots,"cancelicon",{},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.cancelIcon?"span":"TimesIcon"),p.mergeProps({class:[t.class,e.cancelIcon],"aria-hidden":"true"},e.ptm("cancelButton").icon,{"data-pc-section":"cancelbuttonicon"}),null,16,["class"]))]}))]})),_:3},8,["label","onClick","disabled","unstyled","pt"])):p.createCommentVNode("",!0)]}))],16),p.createElementVNode("div",p.mergeProps({ref:"content",class:e.cx("content"),onDragenter:t[5]||(t[5]=function(){return i.onDragEnter&&i.onDragEnter.apply(i,arguments)}),onDragover:t[6]||(t[6]=function(){return i.onDragOver&&i.onDragOver.apply(i,arguments)}),onDragleave:t[7]||(t[7]=function(){return i.onDragLeave&&i.onDragLeave.apply(i,arguments)}),onDrop:t[8]||(t[8]=function(){return i.onDrop&&i.onDrop.apply(i,arguments)})},e.ptm("content"),{"data-p-highlight":!1}),[p.renderSlot(e.$slots,"content",{files:n.files,uploadedFiles:n.uploadedFiles,removeUploadedFileCallback:i.removeUploadedFile,removeFileCallback:i.remove,progress:n.progress,messages:n.messages},(function(){return[i.hasFiles?(p.openBlock(),p.createBlock(a,{key:0,value:n.progress,showValue:!1,unstyled:e.unstyled,pt:e.ptm("progressbar")},null,8,["value","unstyled","pt"])):p.createCommentVNode("",!0),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(n.messages,(function(t){return p.openBlock(),p.createBlock(r,{key:t,severity:"error",onClose:i.onMessageClose,unstyled:e.unstyled,pt:e.ptm("message")},{default:p.withCtx((function(){return[p.createTextVNode(p.toDisplayString(t),1)]})),_:2},1032,["onClose","unstyled","pt"])})),128)),i.hasFiles?(p.openBlock(),p.createBlock(c,{key:1,files:n.files,onRemove:i.remove,badgeValue:i.pendingLabel,previewWidth:e.previewWidth,templates:e.$slots,unstyled:e.unstyled,pt:e.pt},null,8,["files","onRemove","badgeValue","previewWidth","templates","unstyled","pt"])):p.createCommentVNode("",!0),p.createVNode(c,{files:n.uploadedFiles,onRemove:i.removeUploadedFile,badgeValue:i.completedLabel,badgeSeverity:"success",previewWidth:e.previewWidth,templates:e.$slots,unstyled:e.unstyled,pt:e.pt},null,8,["files","onRemove","badgeValue","previewWidth","templates","unstyled","pt"])]})),!e.$slots.empty||i.hasFiles||i.hasUploadedFiles?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:0,class:e.cx("empty")},e.ptm("empty")),[p.renderSlot(e.$slots,"empty")],16))],16)],16)):i.isBasic?(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:1,class:e.cx("root")},e.ptm("root")),[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(n.messages,(function(t){return p.openBlock(),p.createBlock(r,{key:t,severity:"error",onClose:i.onMessageClose,unstyled:e.unstyled,pt:e.ptm("messages")},{default:p.withCtx((function(){return[p.createTextVNode(p.toDisplayString(t),1)]})),_:2},1032,["onClose","unstyled","pt"])})),128)),p.withDirectives((p.openBlock(),p.createElementBlock("span",p.mergeProps({class:i.chooseButtonClass,style:e.style,onMouseup:t[12]||(t[12]=function(){return i.onBasicUploaderClick&&i.onBasicUploaderClick.apply(i,arguments)}),onKeydown:t[13]||(t[13]=p.withKeys((function(){return i.choose&&i.choose.apply(i,arguments)}),["enter"])),onFocus:t[14]||(t[14]=function(){return i.onFocus&&i.onFocus.apply(i,arguments)}),onBlur:t[15]||(t[15]=function(){return i.onBlur&&i.onBlur.apply(i,arguments)}),tabindex:"0"},e.ptm("chooseButton")),[!i.hasFiles||e.auto?p.renderSlot(e.$slots,"uploadicon",{key:0,class:p.normalizeClass(e.cx("uploadIcon"))},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.uploadIcon?"span":"UploadIcon"),p.mergeProps({class:[e.cx("uploadIcon"),e.uploadIcon],"aria-hidden":"true"},e.ptm("uploadIcon")),null,16,["class"]))]})):p.renderSlot(e.$slots,"chooseicon",{key:1,class:p.normalizeClass(e.cx("chooseIcon"))},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.chooseIcon?"span":"PlusIcon"),p.mergeProps({class:[e.cx("chooseIcon"),e.chooseIcon],"aria-hidden":"true"},e.ptm("chooseIcon")),null,16,["class"]))]})),p.createElementVNode("span",p.mergeProps({class:e.cx("label")},e.ptm("label")),p.toDisplayString(i.basicChooseButtonLabel),17),i.hasFiles?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("input",p.mergeProps({key:2,ref:"fileInput",type:"file",accept:e.accept,disabled:e.disabled,multiple:e.multiple,onChange:t[9]||(t[9]=function(){return i.onFileSelect&&i.onFileSelect.apply(i,arguments)}),onFocus:t[10]||(t[10]=function(){return i.onFocus&&i.onFocus.apply(i,arguments)}),onBlur:t[11]||(t[11]=function(){return i.onBlur&&i.onBlur.apply(i,arguments)})},e.ptm("input")),null,16,P))],16)),[[u]])],16)):p.createCommentVNode("",!0)},module.exports=$;
|
|
@@ -603,9 +603,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
603
603
|
return $options.isAdvanced ? (openBlock(), createElementBlock("div", mergeProps({
|
|
604
604
|
key: 0,
|
|
605
605
|
"class": _ctx.cx('root')
|
|
606
|
-
}, _ctx.ptm('root'), {
|
|
607
|
-
"data-pc-name": "fileupload"
|
|
608
|
-
}), [createElementVNode("input", mergeProps({
|
|
606
|
+
}, _ctx.ptm('root')), [createElementVNode("input", mergeProps({
|
|
609
607
|
ref: "fileInput",
|
|
610
608
|
type: "file",
|
|
611
609
|
onChange: _cache[0] || (_cache[0] = function () {
|
|
@@ -654,8 +652,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
654
652
|
onClick: $options.upload,
|
|
655
653
|
disabled: $options.uploadDisabled,
|
|
656
654
|
unstyled: _ctx.unstyled,
|
|
657
|
-
pt: _ctx.ptm('uploadButton')
|
|
658
|
-
"data-pc-section": "uploadbutton"
|
|
655
|
+
pt: _ctx.ptm('uploadButton')
|
|
659
656
|
}, {
|
|
660
657
|
icon: withCtx(function (iconProps) {
|
|
661
658
|
return [renderSlot(_ctx.$slots, "uploadicon", {}, function () {
|
|
@@ -674,8 +671,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
674
671
|
onClick: $options.clear,
|
|
675
672
|
disabled: $options.cancelDisabled,
|
|
676
673
|
unstyled: _ctx.unstyled,
|
|
677
|
-
pt: _ctx.ptm('cancelButton')
|
|
678
|
-
"data-pc-section": "cancelbutton"
|
|
674
|
+
pt: _ctx.ptm('cancelButton')
|
|
679
675
|
}, {
|
|
680
676
|
icon: withCtx(function (iconProps) {
|
|
681
677
|
return [renderSlot(_ctx.$slots, "cancelicon", {}, function () {
|
|
@@ -758,9 +754,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
758
754
|
}, _ctx.ptm('empty')), [renderSlot(_ctx.$slots, "empty")], 16)) : createCommentVNode("", true)], 16)], 16)) : $options.isBasic ? (openBlock(), createElementBlock("div", mergeProps({
|
|
759
755
|
key: 1,
|
|
760
756
|
"class": _ctx.cx('root')
|
|
761
|
-
}, _ctx.ptm('root'), {
|
|
762
|
-
"data-pc-name": "fileupload"
|
|
763
|
-
}), [(openBlock(true), createElementBlock(Fragment, null, renderList($data.messages, function (msg) {
|
|
757
|
+
}, _ctx.ptm('root')), [(openBlock(true), createElementBlock(Fragment, null, renderList($data.messages, function (msg) {
|
|
764
758
|
return openBlock(), createBlock(_component_FileUploadMessage, {
|
|
765
759
|
key: msg,
|
|
766
760
|
severity: "error",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"primevue/button";import t from"primevue/icons/plus";import i from"primevue/icons/times";import l from"primevue/icons/upload";import n from"primevue/message";import o from"primevue/progressbar";import s from"primevue/ripple";import{DomHandler as a}from"primevue/utils";import r from"primevue/basecomponent";import u from"primevue/fileupload/style";import c from"primevue/badge";import{resolveComponent as p,openBlock as d,createElementBlock as f,Fragment as h,renderList as m,mergeProps as y,createElementVNode as v,toDisplayString as g,createVNode as b,normalizeClass as F,withCtx as B,createBlock as I,resolveDynamicComponent as C,resolveDirective as L,renderSlot as x,withDirectives as S,withKeys as $,createCommentVNode as w,createTextVNode as U}from"vue";var k={name:"BaseFileUpload",extends:r,props:{name:{type:String,default:null},url:{type:String,default:null},mode:{type:String,default:"advanced"},multiple:{type:Boolean,default:!1},accept:{type:String,default:null},disabled:{type:Boolean,default:!1},auto:{type:Boolean,default:!1},maxFileSize:{type:Number,default:null},invalidFileSizeMessage:{type:String,default:"{0}: Invalid file size, file size should be smaller than {1}."},invalidFileTypeMessage:{type:String,default:"{0}: Invalid file type, allowed file types: {1}."},fileLimit:{type:Number,default:null},invalidFileLimitMessage:{type:String,default:"Maximum number of files exceeded, limit is {0} at most."},withCredentials:{type:Boolean,default:!1},previewWidth:{type:Number,default:50},chooseLabel:{type:String,default:null},uploadLabel:{type:String,default:null},cancelLabel:{type:String,default:null},customUpload:{type:Boolean,default:!1},showUploadButton:{type:Boolean,default:!0},showCancelButton:{type:Boolean,default:!0},chooseIcon:{type:String,default:void 0},uploadIcon:{type:String,default:void 0},cancelIcon:{type:String,default:void 0},style:null,class:null},style:u,provide:function(){return{$parentInstance:this}}},E={name:"FileContent",hostName:"FileUpload",extends:r,emits:["remove"],props:{files:{type:Array,default:function(){return[]}},badgeSeverity:{type:String,default:"warning"},badgeValue:{type:String,default:null},previewWidth:{type:Number,default:50},templates:{type:null,default:null}},methods:{formatSize:function(e){var t,i=(null===(t=this.$primevue.config.locale)||void 0===t?void 0:t.fileSizeTypes)||["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(0===e)return"0 ".concat(i[0]);var l=Math.floor(Math.log(e)/Math.log(1024)),n=parseFloat((e/Math.pow(1024,l)).toFixed(3));return"".concat(n," ").concat(i[l])}},components:{FileUploadButton:e,FileUploadBadge:c,TimesIcon:i}},M=["alt","src","width"];function D(e){return A(e)||z(e)||W(e)||T()}function T(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function z(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function A(e){if(Array.isArray(e))return O(e)}function P(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=W(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var l=0,n=function(){};return{s:n,n:function(){return l>=e.length?{done:!0}:{done:!1,value:e[l++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function W(e,t){if(e){if("string"==typeof e)return O(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?O(e,t):void 0}}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,l=new Array(t);i<t;i++)l[i]=e[i];return l}E.render=function(e,t,i,l,n,o){var s=p("FileUploadBadge"),a=p("TimesIcon"),r=p("FileUploadButton");return d(!0),f(h,null,m(i.files,(function(t,l){return d(),f("div",y({key:t.name+t.type+t.size,class:e.cx("file")},e.ptm("file")),[v("img",y({role:"presentation",class:e.cx("thumbnail"),alt:t.name,src:t.objectURL,width:i.previewWidth},e.ptm("thumbnail")),null,16,M),v("div",y({class:e.cx("details")},e.ptm("details")),[v("div",y({class:e.cx("fileName")},e.ptm("fileName")),g(t.name),17),v("span",y({class:e.cx("fileSize")},e.ptm("fileSize")),g(o.formatSize(t.size)),17),b(s,{value:i.badgeValue,class:F(e.cx("badge")),severity:i.badgeSeverity,unstyled:e.unstyled,pt:e.ptm("badge")},null,8,["value","class","severity","unstyled","pt"])],16),v("div",y({class:e.cx("actions")},e.ptm("actions")),[b(r,{onClick:function(t){return e.$emit("remove",l)},text:"",rounded:"",severity:"danger",class:F(e.cx("removeButton")),unstyled:e.unstyled,pt:e.ptm("removeButton")},{icon:B((function(n){return[i.templates.fileremoveicon?(d(),I(C(i.templates.fileremoveicon),{key:0,class:F(n.class),file:t,index:l},null,8,["class","file","index"])):(d(),I(a,y({key:1,class:n.class,"aria-hidden":"true"},e.ptm("removeButton").icon),null,16,["class"]))]})),_:2},1032,["onClick","class","unstyled","pt"])],16)],16)})),128)};var R={name:"FileUpload",extends:k,emits:["select","uploader","before-upload","progress","upload","error","before-send","clear","remove","remove-uploaded-file"],duplicateIEEvent:!1,data:function(){return{uploadedFileCount:0,files:[],messages:[],focused:!1,progress:null,uploadedFiles:[]}},methods:{onFileSelect:function(e){if("drop"!==e.type&&this.isIE11()&&this.duplicateIEEvent)this.duplicateIEEvent=!1;else{this.messages=[],this.files=this.files||[];var t,i=P(e.dataTransfer?e.dataTransfer.files:e.target.files);try{for(i.s();!(t=i.n()).done;){var l=t.value;this.isFileSelected(l)||this.validate(l)&&(this.isImage(l)&&(l.objectURL=window.URL.createObjectURL(l)),this.files.push(l))}}catch(e){i.e(e)}finally{i.f()}this.$emit("select",{originalEvent:e,files:this.files}),this.fileLimit&&this.checkFileLimit(),this.auto&&this.hasFiles&&!this.isFileLimitExceeded()&&this.upload(),"drop"!==e.type&&this.isIE11()?this.clearIEInput():this.clearInputElement()}},choose:function(){this.$refs.fileInput.click()},upload:function(){var e=this;if(this.customUpload)this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.$emit("uploader",{files:this.files}),this.clear();else{var t=new XMLHttpRequest,i=new FormData;this.$emit("before-upload",{xhr:t,formData:i});var l,n=P(this.files);try{for(n.s();!(l=n.n()).done;){var o=l.value;i.append(this.name,o,o.name)}}catch(e){n.e(e)}finally{n.f()}t.upload.addEventListener("progress",(function(t){t.lengthComputable&&(e.progress=Math.round(100*t.loaded/t.total)),e.$emit("progress",{originalEvent:t,progress:e.progress})})),t.onreadystatechange=function(){var i;4===t.readyState&&(e.progress=0,t.status>=200&&t.status<300?(e.fileLimit&&(e.uploadedFileCount+=e.files.length),e.$emit("upload",{xhr:t,files:e.files})):e.$emit("error",{xhr:t,files:e.files}),(i=e.uploadedFiles).push.apply(i,D(e.files)),e.clear())},t.open("POST",this.url,!0),this.$emit("before-send",{xhr:t,formData:i}),t.withCredentials=this.withCredentials,t.send(i)}},clear:function(){this.files=[],this.messages=null,this.$emit("clear"),this.isAdvanced&&this.clearInputElement()},onFocus:function(){this.focused=!0},onBlur:function(){this.focused=!1},isFileSelected:function(e){if(this.files&&this.files.length){var t,i=P(this.files);try{for(i.s();!(t=i.n()).done;){var l=t.value;if(l.name+l.type+l.size===e.name+e.type+e.size)return!0}}catch(e){i.e(e)}finally{i.f()}}return!1},isIE11:function(){return!!window.MSInputMethodContext&&!!document.documentMode},validate:function(e){return this.accept&&!this.isFileTypeValid(e)?(this.messages.push(this.invalidFileTypeMessage.replace("{0}",e.name).replace("{1}",this.accept)),!1):!(this.maxFileSize&&e.size>this.maxFileSize)||(this.messages.push(this.invalidFileSizeMessage.replace("{0}",e.name).replace("{1}",this.formatSize(this.maxFileSize))),!1)},isFileTypeValid:function(e){var t,i=this.accept.split(",").map((function(e){return e.trim()})),l=P(i);try{for(l.s();!(t=l.n()).done;){var n=t.value;if(this.isWildcard(n)?this.getTypeClass(e.type)===this.getTypeClass(n):e.type==n||this.getFileExtension(e).toLowerCase()===n.toLowerCase())return!0}}catch(e){l.e(e)}finally{l.f()}return!1},getTypeClass:function(e){return e.substring(0,e.indexOf("/"))},isWildcard:function(e){return-1!==e.indexOf("*")},getFileExtension:function(e){return"."+e.name.split(".").pop()},isImage:function(e){return/^image\//.test(e.type)},onDragEnter:function(e){this.disabled||(e.stopPropagation(),e.preventDefault())},onDragOver:function(e){this.disabled||(!this.isUnstyled&&a.addClass(this.$refs.content,"p-fileupload-highlight"),this.$refs.content.setAttribute("data-p-highlight",!0),e.stopPropagation(),e.preventDefault())},onDragLeave:function(){this.disabled||(!this.isUnstyled&&a.removeClass(this.$refs.content,"p-fileupload-highlight"),this.$refs.content.setAttribute("data-p-highlight",!1))},onDrop:function(e){if(!this.disabled){!this.isUnstyled&&a.removeClass(this.$refs.content,"p-fileupload-highlight"),this.$refs.content.setAttribute("data-p-highlight",!1),e.stopPropagation(),e.preventDefault();var t=e.dataTransfer?e.dataTransfer.files:e.target.files;(this.multiple||t&&1===t.length)&&this.onFileSelect(e)}},onBasicUploaderClick:function(e){this.hasFiles?this.upload():0===e.button&&this.$refs.fileInput.click()},remove:function(e){this.clearInputElement();var t=this.files.splice(e,1)[0];this.files=D(this.files),this.$emit("remove",{file:t,files:this.files})},removeUploadedFile:function(e){var t=this.uploadedFiles.splice(e,1)[0];this.uploadedFiles=D(this.uploadedFiles),this.$emit("remove-uploaded-file",{file:t,files:this.uploadedFiles})},clearInputElement:function(){this.$refs.fileInput.value=""},clearIEInput:function(){this.$refs.fileInput&&(this.duplicateIEEvent=!0,this.$refs.fileInput.value="")},formatSize:function(e){var t,i=(null===(t=this.$primevue.config.locale)||void 0===t?void 0:t.fileSizeTypes)||["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(0===e)return"0 ".concat(i[0]);var l=Math.floor(Math.log(e)/Math.log(1024)),n=parseFloat((e/Math.pow(1024,l)).toFixed(3));return"".concat(n," ").concat(i[l])},isFileLimitExceeded:function(){return this.fileLimit&&this.fileLimit<=this.files.length+this.uploadedFileCount&&this.focused&&(this.focused=!1),this.fileLimit&&this.fileLimit<this.files.length+this.uploadedFileCount},checkFileLimit:function(){this.isFileLimitExceeded()&&this.messages.push(this.invalidFileLimitMessage.replace("{0}",this.fileLimit.toString()))},onMessageClose:function(){this.messages=null}},computed:{isAdvanced:function(){return"advanced"===this.mode},isBasic:function(){return"basic"===this.mode},chooseButtonClass:function(){return[this.cx("chooseButton"),this.class]},basicChooseButtonLabel:function(){return this.auto?this.chooseButtonLabel:this.hasFiles?this.files.map((function(e){return e.name})).join(", "):this.chooseButtonLabel},hasFiles:function(){return this.files&&this.files.length>0},hasUploadedFiles:function(){return this.uploadedFiles&&this.uploadedFiles.length>0},chooseDisabled:function(){return this.disabled||this.fileLimit&&this.fileLimit<=this.files.length+this.uploadedFileCount},uploadDisabled:function(){return this.disabled||!this.hasFiles||this.fileLimit&&this.fileLimit<this.files.length},cancelDisabled:function(){return this.disabled||!this.hasFiles},chooseButtonLabel:function(){return this.chooseLabel||this.$primevue.config.locale.choose},uploadButtonLabel:function(){return this.uploadLabel||this.$primevue.config.locale.upload},cancelButtonLabel:function(){return this.cancelLabel||this.$primevue.config.locale.cancel},completedLabel:function(){return this.$primevue.config.locale.completed},pendingLabel:function(){return this.$primevue.config.locale.pending}},components:{FileUploadButton:e,FileUploadProgressBar:o,FileUploadMessage:n,FileContent:E,PlusIcon:t,UploadIcon:l,TimesIcon:i},directives:{ripple:s}},V=["multiple","accept","disabled"],j=["accept","disabled","multiple"];R.render=function(e,t,i,l,n,o){var s=p("FileUploadButton"),a=p("FileUploadProgressBar"),r=p("FileUploadMessage"),u=p("FileContent"),c=L("ripple");return o.isAdvanced?(d(),f("div",y({key:0,class:e.cx("root")},e.ptm("root"),{"data-pc-name":"fileupload"}),[v("input",y({ref:"fileInput",type:"file",onChange:t[0]||(t[0]=function(){return o.onFileSelect&&o.onFileSelect.apply(o,arguments)}),multiple:e.multiple,accept:e.accept,disabled:o.chooseDisabled},e.ptm("input")),null,16,V),v("div",y({class:e.cx("buttonbar")},e.ptm("buttonbar")),[x(e.$slots,"header",{files:n.files,uploadedFiles:n.uploadedFiles,chooseCallback:o.choose,uploadCallback:o.upload,clearCallback:o.clear},(function(){return[S((d(),f("span",y({class:o.chooseButtonClass,style:e.style,onClick:t[1]||(t[1]=function(){return o.choose&&o.choose.apply(o,arguments)}),onKeydown:t[2]||(t[2]=$((function(){return o.choose&&o.choose.apply(o,arguments)}),["enter"])),onFocus:t[3]||(t[3]=function(){return o.onFocus&&o.onFocus.apply(o,arguments)}),onBlur:t[4]||(t[4]=function(){return o.onBlur&&o.onBlur.apply(o,arguments)}),tabindex:"0"},e.ptm("chooseButton")),[x(e.$slots,"chooseicon",{class:F(e.cx("chooseIcon"))},(function(){return[(d(),I(C(e.chooseIcon?"span":"PlusIcon"),y({class:[e.cx("chooseIcon"),e.chooseIcon],"aria-hidden":"true"},e.ptm("chooseIcon")),null,16,["class"]))]})),v("span",y({class:e.cx("chooseButtonLabel")},e.ptm("chooseButtonLabel")),g(o.chooseButtonLabel),17)],16)),[[c]]),e.showUploadButton?(d(),I(s,{key:0,label:o.uploadButtonLabel,onClick:o.upload,disabled:o.uploadDisabled,unstyled:e.unstyled,pt:e.ptm("uploadButton"),"data-pc-section":"uploadbutton"},{icon:B((function(t){return[x(e.$slots,"uploadicon",{},(function(){return[(d(),I(C(e.uploadIcon?"span":"UploadIcon"),y({class:[t.class,e.uploadIcon],"aria-hidden":"true"},e.ptm("uploadButton").icon,{"data-pc-section":"uploadbuttonicon"}),null,16,["class"]))]}))]})),_:3},8,["label","onClick","disabled","unstyled","pt"])):w("",!0),e.showCancelButton?(d(),I(s,{key:1,label:o.cancelButtonLabel,onClick:o.clear,disabled:o.cancelDisabled,unstyled:e.unstyled,pt:e.ptm("cancelButton"),"data-pc-section":"cancelbutton"},{icon:B((function(t){return[x(e.$slots,"cancelicon",{},(function(){return[(d(),I(C(e.cancelIcon?"span":"TimesIcon"),y({class:[t.class,e.cancelIcon],"aria-hidden":"true"},e.ptm("cancelButton").icon,{"data-pc-section":"cancelbuttonicon"}),null,16,["class"]))]}))]})),_:3},8,["label","onClick","disabled","unstyled","pt"])):w("",!0)]}))],16),v("div",y({ref:"content",class:e.cx("content"),onDragenter:t[5]||(t[5]=function(){return o.onDragEnter&&o.onDragEnter.apply(o,arguments)}),onDragover:t[6]||(t[6]=function(){return o.onDragOver&&o.onDragOver.apply(o,arguments)}),onDragleave:t[7]||(t[7]=function(){return o.onDragLeave&&o.onDragLeave.apply(o,arguments)}),onDrop:t[8]||(t[8]=function(){return o.onDrop&&o.onDrop.apply(o,arguments)})},e.ptm("content"),{"data-p-highlight":!1}),[x(e.$slots,"content",{files:n.files,uploadedFiles:n.uploadedFiles,removeUploadedFileCallback:o.removeUploadedFile,removeFileCallback:o.remove,progress:n.progress,messages:n.messages},(function(){return[o.hasFiles?(d(),I(a,{key:0,value:n.progress,showValue:!1,unstyled:e.unstyled,pt:e.ptm("progressbar")},null,8,["value","unstyled","pt"])):w("",!0),(d(!0),f(h,null,m(n.messages,(function(t){return d(),I(r,{key:t,severity:"error",onClose:o.onMessageClose,unstyled:e.unstyled,pt:e.ptm("message")},{default:B((function(){return[U(g(t),1)]})),_:2},1032,["onClose","unstyled","pt"])})),128)),o.hasFiles?(d(),I(u,{key:1,files:n.files,onRemove:o.remove,badgeValue:o.pendingLabel,previewWidth:e.previewWidth,templates:e.$slots,unstyled:e.unstyled,pt:e.pt},null,8,["files","onRemove","badgeValue","previewWidth","templates","unstyled","pt"])):w("",!0),b(u,{files:n.uploadedFiles,onRemove:o.removeUploadedFile,badgeValue:o.completedLabel,badgeSeverity:"success",previewWidth:e.previewWidth,templates:e.$slots,unstyled:e.unstyled,pt:e.pt},null,8,["files","onRemove","badgeValue","previewWidth","templates","unstyled","pt"])]})),!e.$slots.empty||o.hasFiles||o.hasUploadedFiles?w("",!0):(d(),f("div",y({key:0,class:e.cx("empty")},e.ptm("empty")),[x(e.$slots,"empty")],16))],16)],16)):o.isBasic?(d(),f("div",y({key:1,class:e.cx("root")},e.ptm("root"),{"data-pc-name":"fileupload"}),[(d(!0),f(h,null,m(n.messages,(function(t){return d(),I(r,{key:t,severity:"error",onClose:o.onMessageClose,unstyled:e.unstyled,pt:e.ptm("messages")},{default:B((function(){return[U(g(t),1)]})),_:2},1032,["onClose","unstyled","pt"])})),128)),S((d(),f("span",y({class:o.chooseButtonClass,style:e.style,onMouseup:t[12]||(t[12]=function(){return o.onBasicUploaderClick&&o.onBasicUploaderClick.apply(o,arguments)}),onKeydown:t[13]||(t[13]=$((function(){return o.choose&&o.choose.apply(o,arguments)}),["enter"])),onFocus:t[14]||(t[14]=function(){return o.onFocus&&o.onFocus.apply(o,arguments)}),onBlur:t[15]||(t[15]=function(){return o.onBlur&&o.onBlur.apply(o,arguments)}),tabindex:"0"},e.ptm("chooseButton")),[!o.hasFiles||e.auto?x(e.$slots,"uploadicon",{key:0,class:F(e.cx("uploadIcon"))},(function(){return[(d(),I(C(e.uploadIcon?"span":"UploadIcon"),y({class:[e.cx("uploadIcon"),e.uploadIcon],"aria-hidden":"true"},e.ptm("uploadIcon")),null,16,["class"]))]})):x(e.$slots,"chooseicon",{key:1,class:F(e.cx("chooseIcon"))},(function(){return[(d(),I(C(e.chooseIcon?"span":"PlusIcon"),y({class:[e.cx("chooseIcon"),e.chooseIcon],"aria-hidden":"true"},e.ptm("chooseIcon")),null,16,["class"]))]})),v("span",y({class:e.cx("label")},e.ptm("label")),g(o.basicChooseButtonLabel),17),o.hasFiles?w("",!0):(d(),f("input",y({key:2,ref:"fileInput",type:"file",accept:e.accept,disabled:e.disabled,multiple:e.multiple,onChange:t[9]||(t[9]=function(){return o.onFileSelect&&o.onFileSelect.apply(o,arguments)}),onFocus:t[10]||(t[10]=function(){return o.onFocus&&o.onFocus.apply(o,arguments)}),onBlur:t[11]||(t[11]=function(){return o.onBlur&&o.onBlur.apply(o,arguments)})},e.ptm("input")),null,16,j))],16)),[[c]])],16)):w("",!0)};export{R as default};
|
|
1
|
+
import e from"primevue/button";import t from"primevue/icons/plus";import i from"primevue/icons/times";import l from"primevue/icons/upload";import n from"primevue/message";import s from"primevue/progressbar";import o from"primevue/ripple";import{DomHandler as a}from"primevue/utils";import r from"primevue/basecomponent";import u from"primevue/fileupload/style";import c from"primevue/badge";import{resolveComponent as p,openBlock as d,createElementBlock as f,Fragment as h,renderList as m,mergeProps as y,createElementVNode as v,toDisplayString as g,createVNode as b,normalizeClass as F,withCtx as B,createBlock as I,resolveDynamicComponent as C,resolveDirective as L,renderSlot as x,withDirectives as S,withKeys as $,createCommentVNode as w,createTextVNode as U}from"vue";var k={name:"BaseFileUpload",extends:r,props:{name:{type:String,default:null},url:{type:String,default:null},mode:{type:String,default:"advanced"},multiple:{type:Boolean,default:!1},accept:{type:String,default:null},disabled:{type:Boolean,default:!1},auto:{type:Boolean,default:!1},maxFileSize:{type:Number,default:null},invalidFileSizeMessage:{type:String,default:"{0}: Invalid file size, file size should be smaller than {1}."},invalidFileTypeMessage:{type:String,default:"{0}: Invalid file type, allowed file types: {1}."},fileLimit:{type:Number,default:null},invalidFileLimitMessage:{type:String,default:"Maximum number of files exceeded, limit is {0} at most."},withCredentials:{type:Boolean,default:!1},previewWidth:{type:Number,default:50},chooseLabel:{type:String,default:null},uploadLabel:{type:String,default:null},cancelLabel:{type:String,default:null},customUpload:{type:Boolean,default:!1},showUploadButton:{type:Boolean,default:!0},showCancelButton:{type:Boolean,default:!0},chooseIcon:{type:String,default:void 0},uploadIcon:{type:String,default:void 0},cancelIcon:{type:String,default:void 0},style:null,class:null},style:u,provide:function(){return{$parentInstance:this}}},E={name:"FileContent",hostName:"FileUpload",extends:r,emits:["remove"],props:{files:{type:Array,default:function(){return[]}},badgeSeverity:{type:String,default:"warning"},badgeValue:{type:String,default:null},previewWidth:{type:Number,default:50},templates:{type:null,default:null}},methods:{formatSize:function(e){var t,i=(null===(t=this.$primevue.config.locale)||void 0===t?void 0:t.fileSizeTypes)||["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(0===e)return"0 ".concat(i[0]);var l=Math.floor(Math.log(e)/Math.log(1024)),n=parseFloat((e/Math.pow(1024,l)).toFixed(3));return"".concat(n," ").concat(i[l])}},components:{FileUploadButton:e,FileUploadBadge:c,TimesIcon:i}},M=["alt","src","width"];function D(e){return A(e)||z(e)||W(e)||T()}function T(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function z(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function A(e){if(Array.isArray(e))return O(e)}function P(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=W(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var l=0,n=function(){};return{s:n,n:function(){return l>=e.length?{done:!0}:{done:!1,value:e[l++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return o=e.done,e},e:function(e){a=!0,s=e},f:function(){try{o||null==i.return||i.return()}finally{if(a)throw s}}}}function W(e,t){if(e){if("string"==typeof e)return O(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?O(e,t):void 0}}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,l=new Array(t);i<t;i++)l[i]=e[i];return l}E.render=function(e,t,i,l,n,s){var o=p("FileUploadBadge"),a=p("TimesIcon"),r=p("FileUploadButton");return d(!0),f(h,null,m(i.files,(function(t,l){return d(),f("div",y({key:t.name+t.type+t.size,class:e.cx("file")},e.ptm("file")),[v("img",y({role:"presentation",class:e.cx("thumbnail"),alt:t.name,src:t.objectURL,width:i.previewWidth},e.ptm("thumbnail")),null,16,M),v("div",y({class:e.cx("details")},e.ptm("details")),[v("div",y({class:e.cx("fileName")},e.ptm("fileName")),g(t.name),17),v("span",y({class:e.cx("fileSize")},e.ptm("fileSize")),g(s.formatSize(t.size)),17),b(o,{value:i.badgeValue,class:F(e.cx("badge")),severity:i.badgeSeverity,unstyled:e.unstyled,pt:e.ptm("badge")},null,8,["value","class","severity","unstyled","pt"])],16),v("div",y({class:e.cx("actions")},e.ptm("actions")),[b(r,{onClick:function(t){return e.$emit("remove",l)},text:"",rounded:"",severity:"danger",class:F(e.cx("removeButton")),unstyled:e.unstyled,pt:e.ptm("removeButton")},{icon:B((function(n){return[i.templates.fileremoveicon?(d(),I(C(i.templates.fileremoveicon),{key:0,class:F(n.class),file:t,index:l},null,8,["class","file","index"])):(d(),I(a,y({key:1,class:n.class,"aria-hidden":"true"},e.ptm("removeButton").icon),null,16,["class"]))]})),_:2},1032,["onClick","class","unstyled","pt"])],16)],16)})),128)};var R={name:"FileUpload",extends:k,emits:["select","uploader","before-upload","progress","upload","error","before-send","clear","remove","remove-uploaded-file"],duplicateIEEvent:!1,data:function(){return{uploadedFileCount:0,files:[],messages:[],focused:!1,progress:null,uploadedFiles:[]}},methods:{onFileSelect:function(e){if("drop"!==e.type&&this.isIE11()&&this.duplicateIEEvent)this.duplicateIEEvent=!1;else{this.messages=[],this.files=this.files||[];var t,i=P(e.dataTransfer?e.dataTransfer.files:e.target.files);try{for(i.s();!(t=i.n()).done;){var l=t.value;this.isFileSelected(l)||this.validate(l)&&(this.isImage(l)&&(l.objectURL=window.URL.createObjectURL(l)),this.files.push(l))}}catch(e){i.e(e)}finally{i.f()}this.$emit("select",{originalEvent:e,files:this.files}),this.fileLimit&&this.checkFileLimit(),this.auto&&this.hasFiles&&!this.isFileLimitExceeded()&&this.upload(),"drop"!==e.type&&this.isIE11()?this.clearIEInput():this.clearInputElement()}},choose:function(){this.$refs.fileInput.click()},upload:function(){var e=this;if(this.customUpload)this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.$emit("uploader",{files:this.files}),this.clear();else{var t=new XMLHttpRequest,i=new FormData;this.$emit("before-upload",{xhr:t,formData:i});var l,n=P(this.files);try{for(n.s();!(l=n.n()).done;){var s=l.value;i.append(this.name,s,s.name)}}catch(e){n.e(e)}finally{n.f()}t.upload.addEventListener("progress",(function(t){t.lengthComputable&&(e.progress=Math.round(100*t.loaded/t.total)),e.$emit("progress",{originalEvent:t,progress:e.progress})})),t.onreadystatechange=function(){var i;4===t.readyState&&(e.progress=0,t.status>=200&&t.status<300?(e.fileLimit&&(e.uploadedFileCount+=e.files.length),e.$emit("upload",{xhr:t,files:e.files})):e.$emit("error",{xhr:t,files:e.files}),(i=e.uploadedFiles).push.apply(i,D(e.files)),e.clear())},t.open("POST",this.url,!0),this.$emit("before-send",{xhr:t,formData:i}),t.withCredentials=this.withCredentials,t.send(i)}},clear:function(){this.files=[],this.messages=null,this.$emit("clear"),this.isAdvanced&&this.clearInputElement()},onFocus:function(){this.focused=!0},onBlur:function(){this.focused=!1},isFileSelected:function(e){if(this.files&&this.files.length){var t,i=P(this.files);try{for(i.s();!(t=i.n()).done;){var l=t.value;if(l.name+l.type+l.size===e.name+e.type+e.size)return!0}}catch(e){i.e(e)}finally{i.f()}}return!1},isIE11:function(){return!!window.MSInputMethodContext&&!!document.documentMode},validate:function(e){return this.accept&&!this.isFileTypeValid(e)?(this.messages.push(this.invalidFileTypeMessage.replace("{0}",e.name).replace("{1}",this.accept)),!1):!(this.maxFileSize&&e.size>this.maxFileSize)||(this.messages.push(this.invalidFileSizeMessage.replace("{0}",e.name).replace("{1}",this.formatSize(this.maxFileSize))),!1)},isFileTypeValid:function(e){var t,i=this.accept.split(",").map((function(e){return e.trim()})),l=P(i);try{for(l.s();!(t=l.n()).done;){var n=t.value;if(this.isWildcard(n)?this.getTypeClass(e.type)===this.getTypeClass(n):e.type==n||this.getFileExtension(e).toLowerCase()===n.toLowerCase())return!0}}catch(e){l.e(e)}finally{l.f()}return!1},getTypeClass:function(e){return e.substring(0,e.indexOf("/"))},isWildcard:function(e){return-1!==e.indexOf("*")},getFileExtension:function(e){return"."+e.name.split(".").pop()},isImage:function(e){return/^image\//.test(e.type)},onDragEnter:function(e){this.disabled||(e.stopPropagation(),e.preventDefault())},onDragOver:function(e){this.disabled||(!this.isUnstyled&&a.addClass(this.$refs.content,"p-fileupload-highlight"),this.$refs.content.setAttribute("data-p-highlight",!0),e.stopPropagation(),e.preventDefault())},onDragLeave:function(){this.disabled||(!this.isUnstyled&&a.removeClass(this.$refs.content,"p-fileupload-highlight"),this.$refs.content.setAttribute("data-p-highlight",!1))},onDrop:function(e){if(!this.disabled){!this.isUnstyled&&a.removeClass(this.$refs.content,"p-fileupload-highlight"),this.$refs.content.setAttribute("data-p-highlight",!1),e.stopPropagation(),e.preventDefault();var t=e.dataTransfer?e.dataTransfer.files:e.target.files;(this.multiple||t&&1===t.length)&&this.onFileSelect(e)}},onBasicUploaderClick:function(e){this.hasFiles?this.upload():0===e.button&&this.$refs.fileInput.click()},remove:function(e){this.clearInputElement();var t=this.files.splice(e,1)[0];this.files=D(this.files),this.$emit("remove",{file:t,files:this.files})},removeUploadedFile:function(e){var t=this.uploadedFiles.splice(e,1)[0];this.uploadedFiles=D(this.uploadedFiles),this.$emit("remove-uploaded-file",{file:t,files:this.uploadedFiles})},clearInputElement:function(){this.$refs.fileInput.value=""},clearIEInput:function(){this.$refs.fileInput&&(this.duplicateIEEvent=!0,this.$refs.fileInput.value="")},formatSize:function(e){var t,i=(null===(t=this.$primevue.config.locale)||void 0===t?void 0:t.fileSizeTypes)||["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(0===e)return"0 ".concat(i[0]);var l=Math.floor(Math.log(e)/Math.log(1024)),n=parseFloat((e/Math.pow(1024,l)).toFixed(3));return"".concat(n," ").concat(i[l])},isFileLimitExceeded:function(){return this.fileLimit&&this.fileLimit<=this.files.length+this.uploadedFileCount&&this.focused&&(this.focused=!1),this.fileLimit&&this.fileLimit<this.files.length+this.uploadedFileCount},checkFileLimit:function(){this.isFileLimitExceeded()&&this.messages.push(this.invalidFileLimitMessage.replace("{0}",this.fileLimit.toString()))},onMessageClose:function(){this.messages=null}},computed:{isAdvanced:function(){return"advanced"===this.mode},isBasic:function(){return"basic"===this.mode},chooseButtonClass:function(){return[this.cx("chooseButton"),this.class]},basicChooseButtonLabel:function(){return this.auto?this.chooseButtonLabel:this.hasFiles?this.files.map((function(e){return e.name})).join(", "):this.chooseButtonLabel},hasFiles:function(){return this.files&&this.files.length>0},hasUploadedFiles:function(){return this.uploadedFiles&&this.uploadedFiles.length>0},chooseDisabled:function(){return this.disabled||this.fileLimit&&this.fileLimit<=this.files.length+this.uploadedFileCount},uploadDisabled:function(){return this.disabled||!this.hasFiles||this.fileLimit&&this.fileLimit<this.files.length},cancelDisabled:function(){return this.disabled||!this.hasFiles},chooseButtonLabel:function(){return this.chooseLabel||this.$primevue.config.locale.choose},uploadButtonLabel:function(){return this.uploadLabel||this.$primevue.config.locale.upload},cancelButtonLabel:function(){return this.cancelLabel||this.$primevue.config.locale.cancel},completedLabel:function(){return this.$primevue.config.locale.completed},pendingLabel:function(){return this.$primevue.config.locale.pending}},components:{FileUploadButton:e,FileUploadProgressBar:s,FileUploadMessage:n,FileContent:E,PlusIcon:t,UploadIcon:l,TimesIcon:i},directives:{ripple:o}},V=["multiple","accept","disabled"],j=["accept","disabled","multiple"];R.render=function(e,t,i,l,n,s){var o=p("FileUploadButton"),a=p("FileUploadProgressBar"),r=p("FileUploadMessage"),u=p("FileContent"),c=L("ripple");return s.isAdvanced?(d(),f("div",y({key:0,class:e.cx("root")},e.ptm("root")),[v("input",y({ref:"fileInput",type:"file",onChange:t[0]||(t[0]=function(){return s.onFileSelect&&s.onFileSelect.apply(s,arguments)}),multiple:e.multiple,accept:e.accept,disabled:s.chooseDisabled},e.ptm("input")),null,16,V),v("div",y({class:e.cx("buttonbar")},e.ptm("buttonbar")),[x(e.$slots,"header",{files:n.files,uploadedFiles:n.uploadedFiles,chooseCallback:s.choose,uploadCallback:s.upload,clearCallback:s.clear},(function(){return[S((d(),f("span",y({class:s.chooseButtonClass,style:e.style,onClick:t[1]||(t[1]=function(){return s.choose&&s.choose.apply(s,arguments)}),onKeydown:t[2]||(t[2]=$((function(){return s.choose&&s.choose.apply(s,arguments)}),["enter"])),onFocus:t[3]||(t[3]=function(){return s.onFocus&&s.onFocus.apply(s,arguments)}),onBlur:t[4]||(t[4]=function(){return s.onBlur&&s.onBlur.apply(s,arguments)}),tabindex:"0"},e.ptm("chooseButton")),[x(e.$slots,"chooseicon",{class:F(e.cx("chooseIcon"))},(function(){return[(d(),I(C(e.chooseIcon?"span":"PlusIcon"),y({class:[e.cx("chooseIcon"),e.chooseIcon],"aria-hidden":"true"},e.ptm("chooseIcon")),null,16,["class"]))]})),v("span",y({class:e.cx("chooseButtonLabel")},e.ptm("chooseButtonLabel")),g(s.chooseButtonLabel),17)],16)),[[c]]),e.showUploadButton?(d(),I(o,{key:0,label:s.uploadButtonLabel,onClick:s.upload,disabled:s.uploadDisabled,unstyled:e.unstyled,pt:e.ptm("uploadButton")},{icon:B((function(t){return[x(e.$slots,"uploadicon",{},(function(){return[(d(),I(C(e.uploadIcon?"span":"UploadIcon"),y({class:[t.class,e.uploadIcon],"aria-hidden":"true"},e.ptm("uploadButton").icon,{"data-pc-section":"uploadbuttonicon"}),null,16,["class"]))]}))]})),_:3},8,["label","onClick","disabled","unstyled","pt"])):w("",!0),e.showCancelButton?(d(),I(o,{key:1,label:s.cancelButtonLabel,onClick:s.clear,disabled:s.cancelDisabled,unstyled:e.unstyled,pt:e.ptm("cancelButton")},{icon:B((function(t){return[x(e.$slots,"cancelicon",{},(function(){return[(d(),I(C(e.cancelIcon?"span":"TimesIcon"),y({class:[t.class,e.cancelIcon],"aria-hidden":"true"},e.ptm("cancelButton").icon,{"data-pc-section":"cancelbuttonicon"}),null,16,["class"]))]}))]})),_:3},8,["label","onClick","disabled","unstyled","pt"])):w("",!0)]}))],16),v("div",y({ref:"content",class:e.cx("content"),onDragenter:t[5]||(t[5]=function(){return s.onDragEnter&&s.onDragEnter.apply(s,arguments)}),onDragover:t[6]||(t[6]=function(){return s.onDragOver&&s.onDragOver.apply(s,arguments)}),onDragleave:t[7]||(t[7]=function(){return s.onDragLeave&&s.onDragLeave.apply(s,arguments)}),onDrop:t[8]||(t[8]=function(){return s.onDrop&&s.onDrop.apply(s,arguments)})},e.ptm("content"),{"data-p-highlight":!1}),[x(e.$slots,"content",{files:n.files,uploadedFiles:n.uploadedFiles,removeUploadedFileCallback:s.removeUploadedFile,removeFileCallback:s.remove,progress:n.progress,messages:n.messages},(function(){return[s.hasFiles?(d(),I(a,{key:0,value:n.progress,showValue:!1,unstyled:e.unstyled,pt:e.ptm("progressbar")},null,8,["value","unstyled","pt"])):w("",!0),(d(!0),f(h,null,m(n.messages,(function(t){return d(),I(r,{key:t,severity:"error",onClose:s.onMessageClose,unstyled:e.unstyled,pt:e.ptm("message")},{default:B((function(){return[U(g(t),1)]})),_:2},1032,["onClose","unstyled","pt"])})),128)),s.hasFiles?(d(),I(u,{key:1,files:n.files,onRemove:s.remove,badgeValue:s.pendingLabel,previewWidth:e.previewWidth,templates:e.$slots,unstyled:e.unstyled,pt:e.pt},null,8,["files","onRemove","badgeValue","previewWidth","templates","unstyled","pt"])):w("",!0),b(u,{files:n.uploadedFiles,onRemove:s.removeUploadedFile,badgeValue:s.completedLabel,badgeSeverity:"success",previewWidth:e.previewWidth,templates:e.$slots,unstyled:e.unstyled,pt:e.pt},null,8,["files","onRemove","badgeValue","previewWidth","templates","unstyled","pt"])]})),!e.$slots.empty||s.hasFiles||s.hasUploadedFiles?w("",!0):(d(),f("div",y({key:0,class:e.cx("empty")},e.ptm("empty")),[x(e.$slots,"empty")],16))],16)],16)):s.isBasic?(d(),f("div",y({key:1,class:e.cx("root")},e.ptm("root")),[(d(!0),f(h,null,m(n.messages,(function(t){return d(),I(r,{key:t,severity:"error",onClose:s.onMessageClose,unstyled:e.unstyled,pt:e.ptm("messages")},{default:B((function(){return[U(g(t),1)]})),_:2},1032,["onClose","unstyled","pt"])})),128)),S((d(),f("span",y({class:s.chooseButtonClass,style:e.style,onMouseup:t[12]||(t[12]=function(){return s.onBasicUploaderClick&&s.onBasicUploaderClick.apply(s,arguments)}),onKeydown:t[13]||(t[13]=$((function(){return s.choose&&s.choose.apply(s,arguments)}),["enter"])),onFocus:t[14]||(t[14]=function(){return s.onFocus&&s.onFocus.apply(s,arguments)}),onBlur:t[15]||(t[15]=function(){return s.onBlur&&s.onBlur.apply(s,arguments)}),tabindex:"0"},e.ptm("chooseButton")),[!s.hasFiles||e.auto?x(e.$slots,"uploadicon",{key:0,class:F(e.cx("uploadIcon"))},(function(){return[(d(),I(C(e.uploadIcon?"span":"UploadIcon"),y({class:[e.cx("uploadIcon"),e.uploadIcon],"aria-hidden":"true"},e.ptm("uploadIcon")),null,16,["class"]))]})):x(e.$slots,"chooseicon",{key:1,class:F(e.cx("chooseIcon"))},(function(){return[(d(),I(C(e.chooseIcon?"span":"PlusIcon"),y({class:[e.cx("chooseIcon"),e.chooseIcon],"aria-hidden":"true"},e.ptm("chooseIcon")),null,16,["class"]))]})),v("span",y({class:e.cx("label")},e.ptm("label")),g(s.basicChooseButtonLabel),17),s.hasFiles?w("",!0):(d(),f("input",y({key:2,ref:"fileInput",type:"file",accept:e.accept,disabled:e.disabled,multiple:e.multiple,onChange:t[9]||(t[9]=function(){return s.onFileSelect&&s.onFileSelect.apply(s,arguments)}),onFocus:t[10]||(t[10]=function(){return s.onFocus&&s.onFocus.apply(s,arguments)}),onBlur:t[11]||(t[11]=function(){return s.onBlur&&s.onBlur.apply(s,arguments)})},e.ptm("input")),null,16,j))],16)),[[c]])],16)):w("",!0)};export{R as default};
|
package/fileupload/fileupload.js
CHANGED
|
@@ -607,9 +607,7 @@ this.primevue.fileupload = (function (Button, PlusIcon, TimesIcon, UploadIcon, M
|
|
|
607
607
|
return $options.isAdvanced ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
608
608
|
key: 0,
|
|
609
609
|
"class": _ctx.cx('root')
|
|
610
|
-
}, _ctx.ptm('root'), {
|
|
611
|
-
"data-pc-name": "fileupload"
|
|
612
|
-
}), [vue.createElementVNode("input", vue.mergeProps({
|
|
610
|
+
}, _ctx.ptm('root')), [vue.createElementVNode("input", vue.mergeProps({
|
|
613
611
|
ref: "fileInput",
|
|
614
612
|
type: "file",
|
|
615
613
|
onChange: _cache[0] || (_cache[0] = function () {
|
|
@@ -658,8 +656,7 @@ this.primevue.fileupload = (function (Button, PlusIcon, TimesIcon, UploadIcon, M
|
|
|
658
656
|
onClick: $options.upload,
|
|
659
657
|
disabled: $options.uploadDisabled,
|
|
660
658
|
unstyled: _ctx.unstyled,
|
|
661
|
-
pt: _ctx.ptm('uploadButton')
|
|
662
|
-
"data-pc-section": "uploadbutton"
|
|
659
|
+
pt: _ctx.ptm('uploadButton')
|
|
663
660
|
}, {
|
|
664
661
|
icon: vue.withCtx(function (iconProps) {
|
|
665
662
|
return [vue.renderSlot(_ctx.$slots, "uploadicon", {}, function () {
|
|
@@ -678,8 +675,7 @@ this.primevue.fileupload = (function (Button, PlusIcon, TimesIcon, UploadIcon, M
|
|
|
678
675
|
onClick: $options.clear,
|
|
679
676
|
disabled: $options.cancelDisabled,
|
|
680
677
|
unstyled: _ctx.unstyled,
|
|
681
|
-
pt: _ctx.ptm('cancelButton')
|
|
682
|
-
"data-pc-section": "cancelbutton"
|
|
678
|
+
pt: _ctx.ptm('cancelButton')
|
|
683
679
|
}, {
|
|
684
680
|
icon: vue.withCtx(function (iconProps) {
|
|
685
681
|
return [vue.renderSlot(_ctx.$slots, "cancelicon", {}, function () {
|
|
@@ -762,9 +758,7 @@ this.primevue.fileupload = (function (Button, PlusIcon, TimesIcon, UploadIcon, M
|
|
|
762
758
|
}, _ctx.ptm('empty')), [vue.renderSlot(_ctx.$slots, "empty")], 16)) : vue.createCommentVNode("", true)], 16)], 16)) : $options.isBasic ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
763
759
|
key: 1,
|
|
764
760
|
"class": _ctx.cx('root')
|
|
765
|
-
}, _ctx.ptm('root'), {
|
|
766
|
-
"data-pc-name": "fileupload"
|
|
767
|
-
}), [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($data.messages, function (msg) {
|
|
761
|
+
}, _ctx.ptm('root')), [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($data.messages, function (msg) {
|
|
768
762
|
return vue.openBlock(), vue.createBlock(_component_FileUploadMessage, {
|
|
769
763
|
key: msg,
|
|
770
764
|
severity: "error",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.fileupload=function(e,t,l,n,o,i,s,a,r,c,u,p){"use strict";function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=d(e),m=d(t),h=d(l),y=d(n),g=d(o),v=d(i),b=d(s),B=d(r),F={name:"BaseFileUpload",extends:B.default,props:{name:{type:String,default:null},url:{type:String,default:null},mode:{type:String,default:"advanced"},multiple:{type:Boolean,default:!1},accept:{type:String,default:null},disabled:{type:Boolean,default:!1},auto:{type:Boolean,default:!1},maxFileSize:{type:Number,default:null},invalidFileSizeMessage:{type:String,default:"{0}: Invalid file size, file size should be smaller than {1}."},invalidFileTypeMessage:{type:String,default:"{0}: Invalid file type, allowed file types: {1}."},fileLimit:{type:Number,default:null},invalidFileLimitMessage:{type:String,default:"Maximum number of files exceeded, limit is {0} at most."},withCredentials:{type:Boolean,default:!1},previewWidth:{type:Number,default:50},chooseLabel:{type:String,default:null},uploadLabel:{type:String,default:null},cancelLabel:{type:String,default:null},customUpload:{type:Boolean,default:!1},showUploadButton:{type:Boolean,default:!0},showCancelButton:{type:Boolean,default:!0},chooseIcon:{type:String,default:void 0},uploadIcon:{type:String,default:void 0},cancelIcon:{type:String,default:void 0},style:null,class:null},style:d(c).default,provide:function(){return{$parentInstance:this}}},C={name:"FileContent",hostName:"FileUpload",extends:B.default,emits:["remove"],props:{files:{type:Array,default:function(){return[]}},badgeSeverity:{type:String,default:"warning"},badgeValue:{type:String,default:null},previewWidth:{type:Number,default:50},templates:{type:null,default:null}},methods:{formatSize:function(e){var t,l=(null===(t=this.$primevue.config.locale)||void 0===t?void 0:t.fileSizeTypes)||["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(0===e)return"0 ".concat(l[0]);var n=Math.floor(Math.log(e)/Math.log(1024)),o=parseFloat((e/Math.pow(1024,n)).toFixed(3));return"".concat(o," ").concat(l[n])}},components:{FileUploadButton:f.default,FileUploadBadge:d(u).default,TimesIcon:h.default}},k=["alt","src","width"];function S(e){return L(e)||x(e)||w(e)||I()}function I(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function x(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function L(e){if(Array.isArray(e))return D(e)}function E(e,t){var l="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!l){if(Array.isArray(e)||(l=w(e))||t&&e&&"number"==typeof e.length){l&&(e=l);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){l=l.call(e)},n:function(){var e=l.next();return s=e.done,e},e:function(e){a=!0,i=e},f:function(){try{s||null==l.return||l.return()}finally{if(a)throw i}}}}function w(e,t){if(e){if("string"==typeof e)return D(e,t);var l=Object.prototype.toString.call(e).slice(8,-1);return"Object"===l&&e.constructor&&(l=e.constructor.name),"Map"===l||"Set"===l?Array.from(e):"Arguments"===l||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?D(e,t):void 0}}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var l=0,n=new Array(t);l<t;l++)n[l]=e[l];return n}C.render=function(e,t,l,n,o,i){var s=p.resolveComponent("FileUploadBadge"),a=p.resolveComponent("TimesIcon"),r=p.resolveComponent("FileUploadButton");return p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(l.files,(function(t,n){return p.openBlock(),p.createElementBlock("div",p.mergeProps({key:t.name+t.type+t.size,class:e.cx("file")},e.ptm("file")),[p.createElementVNode("img",p.mergeProps({role:"presentation",class:e.cx("thumbnail"),alt:t.name,src:t.objectURL,width:l.previewWidth},e.ptm("thumbnail")),null,16,k),p.createElementVNode("div",p.mergeProps({class:e.cx("details")},e.ptm("details")),[p.createElementVNode("div",p.mergeProps({class:e.cx("fileName")},e.ptm("fileName")),p.toDisplayString(t.name),17),p.createElementVNode("span",p.mergeProps({class:e.cx("fileSize")},e.ptm("fileSize")),p.toDisplayString(i.formatSize(t.size)),17),p.createVNode(s,{value:l.badgeValue,class:p.normalizeClass(e.cx("badge")),severity:l.badgeSeverity,unstyled:e.unstyled,pt:e.ptm("badge")},null,8,["value","class","severity","unstyled","pt"])],16),p.createElementVNode("div",p.mergeProps({class:e.cx("actions")},e.ptm("actions")),[p.createVNode(r,{onClick:function(t){return e.$emit("remove",n)},text:"",rounded:"",severity:"danger",class:p.normalizeClass(e.cx("removeButton")),unstyled:e.unstyled,pt:e.ptm("removeButton")},{icon:p.withCtx((function(o){return[l.templates.fileremoveicon?(p.openBlock(),p.createBlock(p.resolveDynamicComponent(l.templates.fileremoveicon),{key:0,class:p.normalizeClass(o.class),file:t,index:n},null,8,["class","file","index"])):(p.openBlock(),p.createBlock(a,p.mergeProps({key:1,class:o.class,"aria-hidden":"true"},e.ptm("removeButton").icon),null,16,["class"]))]})),_:2},1032,["onClick","class","unstyled","pt"])],16)],16)})),128)};var $={name:"FileUpload",extends:F,emits:["select","uploader","before-upload","progress","upload","error","before-send","clear","remove","remove-uploaded-file"],duplicateIEEvent:!1,data:function(){return{uploadedFileCount:0,files:[],messages:[],focused:!1,progress:null,uploadedFiles:[]}},methods:{onFileSelect:function(e){if("drop"!==e.type&&this.isIE11()&&this.duplicateIEEvent)this.duplicateIEEvent=!1;else{this.messages=[],this.files=this.files||[];var t,l=E(e.dataTransfer?e.dataTransfer.files:e.target.files);try{for(l.s();!(t=l.n()).done;){var n=t.value;this.isFileSelected(n)||this.validate(n)&&(this.isImage(n)&&(n.objectURL=window.URL.createObjectURL(n)),this.files.push(n))}}catch(e){l.e(e)}finally{l.f()}this.$emit("select",{originalEvent:e,files:this.files}),this.fileLimit&&this.checkFileLimit(),this.auto&&this.hasFiles&&!this.isFileLimitExceeded()&&this.upload(),"drop"!==e.type&&this.isIE11()?this.clearIEInput():this.clearInputElement()}},choose:function(){this.$refs.fileInput.click()},upload:function(){var e=this;if(this.customUpload)this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.$emit("uploader",{files:this.files}),this.clear();else{var t=new XMLHttpRequest,l=new FormData;this.$emit("before-upload",{xhr:t,formData:l});var n,o=E(this.files);try{for(o.s();!(n=o.n()).done;){var i=n.value;l.append(this.name,i,i.name)}}catch(e){o.e(e)}finally{o.f()}t.upload.addEventListener("progress",(function(t){t.lengthComputable&&(e.progress=Math.round(100*t.loaded/t.total)),e.$emit("progress",{originalEvent:t,progress:e.progress})})),t.onreadystatechange=function(){var l;4===t.readyState&&(e.progress=0,t.status>=200&&t.status<300?(e.fileLimit&&(e.uploadedFileCount+=e.files.length),e.$emit("upload",{xhr:t,files:e.files})):e.$emit("error",{xhr:t,files:e.files}),(l=e.uploadedFiles).push.apply(l,S(e.files)),e.clear())},t.open("POST",this.url,!0),this.$emit("before-send",{xhr:t,formData:l}),t.withCredentials=this.withCredentials,t.send(l)}},clear:function(){this.files=[],this.messages=null,this.$emit("clear"),this.isAdvanced&&this.clearInputElement()},onFocus:function(){this.focused=!0},onBlur:function(){this.focused=!1},isFileSelected:function(e){if(this.files&&this.files.length){var t,l=E(this.files);try{for(l.s();!(t=l.n()).done;){var n=t.value;if(n.name+n.type+n.size===e.name+e.type+e.size)return!0}}catch(e){l.e(e)}finally{l.f()}}return!1},isIE11:function(){return!!window.MSInputMethodContext&&!!document.documentMode},validate:function(e){return this.accept&&!this.isFileTypeValid(e)?(this.messages.push(this.invalidFileTypeMessage.replace("{0}",e.name).replace("{1}",this.accept)),!1):!(this.maxFileSize&&e.size>this.maxFileSize)||(this.messages.push(this.invalidFileSizeMessage.replace("{0}",e.name).replace("{1}",this.formatSize(this.maxFileSize))),!1)},isFileTypeValid:function(e){var t,l=this.accept.split(",").map((function(e){return e.trim()})),n=E(l);try{for(n.s();!(t=n.n()).done;){var o=t.value;if(this.isWildcard(o)?this.getTypeClass(e.type)===this.getTypeClass(o):e.type==o||this.getFileExtension(e).toLowerCase()===o.toLowerCase())return!0}}catch(e){n.e(e)}finally{n.f()}return!1},getTypeClass:function(e){return e.substring(0,e.indexOf("/"))},isWildcard:function(e){return-1!==e.indexOf("*")},getFileExtension:function(e){return"."+e.name.split(".").pop()},isImage:function(e){return/^image\//.test(e.type)},onDragEnter:function(e){this.disabled||(e.stopPropagation(),e.preventDefault())},onDragOver:function(e){this.disabled||(!this.isUnstyled&&a.DomHandler.addClass(this.$refs.content,"p-fileupload-highlight"),this.$refs.content.setAttribute("data-p-highlight",!0),e.stopPropagation(),e.preventDefault())},onDragLeave:function(){this.disabled||(!this.isUnstyled&&a.DomHandler.removeClass(this.$refs.content,"p-fileupload-highlight"),this.$refs.content.setAttribute("data-p-highlight",!1))},onDrop:function(e){if(!this.disabled){!this.isUnstyled&&a.DomHandler.removeClass(this.$refs.content,"p-fileupload-highlight"),this.$refs.content.setAttribute("data-p-highlight",!1),e.stopPropagation(),e.preventDefault();var t=e.dataTransfer?e.dataTransfer.files:e.target.files;(this.multiple||t&&1===t.length)&&this.onFileSelect(e)}},onBasicUploaderClick:function(e){this.hasFiles?this.upload():0===e.button&&this.$refs.fileInput.click()},remove:function(e){this.clearInputElement();var t=this.files.splice(e,1)[0];this.files=S(this.files),this.$emit("remove",{file:t,files:this.files})},removeUploadedFile:function(e){var t=this.uploadedFiles.splice(e,1)[0];this.uploadedFiles=S(this.uploadedFiles),this.$emit("remove-uploaded-file",{file:t,files:this.uploadedFiles})},clearInputElement:function(){this.$refs.fileInput.value=""},clearIEInput:function(){this.$refs.fileInput&&(this.duplicateIEEvent=!0,this.$refs.fileInput.value="")},formatSize:function(e){var t,l=(null===(t=this.$primevue.config.locale)||void 0===t?void 0:t.fileSizeTypes)||["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(0===e)return"0 ".concat(l[0]);var n=Math.floor(Math.log(e)/Math.log(1024)),o=parseFloat((e/Math.pow(1024,n)).toFixed(3));return"".concat(o," ").concat(l[n])},isFileLimitExceeded:function(){return this.fileLimit&&this.fileLimit<=this.files.length+this.uploadedFileCount&&this.focused&&(this.focused=!1),this.fileLimit&&this.fileLimit<this.files.length+this.uploadedFileCount},checkFileLimit:function(){this.isFileLimitExceeded()&&this.messages.push(this.invalidFileLimitMessage.replace("{0}",this.fileLimit.toString()))},onMessageClose:function(){this.messages=null}},computed:{isAdvanced:function(){return"advanced"===this.mode},isBasic:function(){return"basic"===this.mode},chooseButtonClass:function(){return[this.cx("chooseButton"),this.class]},basicChooseButtonLabel:function(){return this.auto?this.chooseButtonLabel:this.hasFiles?this.files.map((function(e){return e.name})).join(", "):this.chooseButtonLabel},hasFiles:function(){return this.files&&this.files.length>0},hasUploadedFiles:function(){return this.uploadedFiles&&this.uploadedFiles.length>0},chooseDisabled:function(){return this.disabled||this.fileLimit&&this.fileLimit<=this.files.length+this.uploadedFileCount},uploadDisabled:function(){return this.disabled||!this.hasFiles||this.fileLimit&&this.fileLimit<this.files.length},cancelDisabled:function(){return this.disabled||!this.hasFiles},chooseButtonLabel:function(){return this.chooseLabel||this.$primevue.config.locale.choose},uploadButtonLabel:function(){return this.uploadLabel||this.$primevue.config.locale.upload},cancelButtonLabel:function(){return this.cancelLabel||this.$primevue.config.locale.cancel},completedLabel:function(){return this.$primevue.config.locale.completed},pendingLabel:function(){return this.$primevue.config.locale.pending}},components:{FileUploadButton:f.default,FileUploadProgressBar:v.default,FileUploadMessage:g.default,FileContent:C,PlusIcon:m.default,UploadIcon:y.default,TimesIcon:h.default},directives:{ripple:b.default}},U=["multiple","accept","disabled"],P=["accept","disabled","multiple"];return $.render=function(e,t,l,n,o,i){var s=p.resolveComponent("FileUploadButton"),a=p.resolveComponent("FileUploadProgressBar"),r=p.resolveComponent("FileUploadMessage"),c=p.resolveComponent("FileContent"),u=p.resolveDirective("ripple");return i.isAdvanced?(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:0,class:e.cx("root")},e.ptm("root"),{"data-pc-name":"fileupload"}),[p.createElementVNode("input",p.mergeProps({ref:"fileInput",type:"file",onChange:t[0]||(t[0]=function(){return i.onFileSelect&&i.onFileSelect.apply(i,arguments)}),multiple:e.multiple,accept:e.accept,disabled:i.chooseDisabled},e.ptm("input")),null,16,U),p.createElementVNode("div",p.mergeProps({class:e.cx("buttonbar")},e.ptm("buttonbar")),[p.renderSlot(e.$slots,"header",{files:o.files,uploadedFiles:o.uploadedFiles,chooseCallback:i.choose,uploadCallback:i.upload,clearCallback:i.clear},(function(){return[p.withDirectives((p.openBlock(),p.createElementBlock("span",p.mergeProps({class:i.chooseButtonClass,style:e.style,onClick:t[1]||(t[1]=function(){return i.choose&&i.choose.apply(i,arguments)}),onKeydown:t[2]||(t[2]=p.withKeys((function(){return i.choose&&i.choose.apply(i,arguments)}),["enter"])),onFocus:t[3]||(t[3]=function(){return i.onFocus&&i.onFocus.apply(i,arguments)}),onBlur:t[4]||(t[4]=function(){return i.onBlur&&i.onBlur.apply(i,arguments)}),tabindex:"0"},e.ptm("chooseButton")),[p.renderSlot(e.$slots,"chooseicon",{class:p.normalizeClass(e.cx("chooseIcon"))},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.chooseIcon?"span":"PlusIcon"),p.mergeProps({class:[e.cx("chooseIcon"),e.chooseIcon],"aria-hidden":"true"},e.ptm("chooseIcon")),null,16,["class"]))]})),p.createElementVNode("span",p.mergeProps({class:e.cx("chooseButtonLabel")},e.ptm("chooseButtonLabel")),p.toDisplayString(i.chooseButtonLabel),17)],16)),[[u]]),e.showUploadButton?(p.openBlock(),p.createBlock(s,{key:0,label:i.uploadButtonLabel,onClick:i.upload,disabled:i.uploadDisabled,unstyled:e.unstyled,pt:e.ptm("uploadButton"),"data-pc-section":"uploadbutton"},{icon:p.withCtx((function(t){return[p.renderSlot(e.$slots,"uploadicon",{},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.uploadIcon?"span":"UploadIcon"),p.mergeProps({class:[t.class,e.uploadIcon],"aria-hidden":"true"},e.ptm("uploadButton").icon,{"data-pc-section":"uploadbuttonicon"}),null,16,["class"]))]}))]})),_:3},8,["label","onClick","disabled","unstyled","pt"])):p.createCommentVNode("",!0),e.showCancelButton?(p.openBlock(),p.createBlock(s,{key:1,label:i.cancelButtonLabel,onClick:i.clear,disabled:i.cancelDisabled,unstyled:e.unstyled,pt:e.ptm("cancelButton"),"data-pc-section":"cancelbutton"},{icon:p.withCtx((function(t){return[p.renderSlot(e.$slots,"cancelicon",{},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.cancelIcon?"span":"TimesIcon"),p.mergeProps({class:[t.class,e.cancelIcon],"aria-hidden":"true"},e.ptm("cancelButton").icon,{"data-pc-section":"cancelbuttonicon"}),null,16,["class"]))]}))]})),_:3},8,["label","onClick","disabled","unstyled","pt"])):p.createCommentVNode("",!0)]}))],16),p.createElementVNode("div",p.mergeProps({ref:"content",class:e.cx("content"),onDragenter:t[5]||(t[5]=function(){return i.onDragEnter&&i.onDragEnter.apply(i,arguments)}),onDragover:t[6]||(t[6]=function(){return i.onDragOver&&i.onDragOver.apply(i,arguments)}),onDragleave:t[7]||(t[7]=function(){return i.onDragLeave&&i.onDragLeave.apply(i,arguments)}),onDrop:t[8]||(t[8]=function(){return i.onDrop&&i.onDrop.apply(i,arguments)})},e.ptm("content"),{"data-p-highlight":!1}),[p.renderSlot(e.$slots,"content",{files:o.files,uploadedFiles:o.uploadedFiles,removeUploadedFileCallback:i.removeUploadedFile,removeFileCallback:i.remove,progress:o.progress,messages:o.messages},(function(){return[i.hasFiles?(p.openBlock(),p.createBlock(a,{key:0,value:o.progress,showValue:!1,unstyled:e.unstyled,pt:e.ptm("progressbar")},null,8,["value","unstyled","pt"])):p.createCommentVNode("",!0),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(o.messages,(function(t){return p.openBlock(),p.createBlock(r,{key:t,severity:"error",onClose:i.onMessageClose,unstyled:e.unstyled,pt:e.ptm("message")},{default:p.withCtx((function(){return[p.createTextVNode(p.toDisplayString(t),1)]})),_:2},1032,["onClose","unstyled","pt"])})),128)),i.hasFiles?(p.openBlock(),p.createBlock(c,{key:1,files:o.files,onRemove:i.remove,badgeValue:i.pendingLabel,previewWidth:e.previewWidth,templates:e.$slots,unstyled:e.unstyled,pt:e.pt},null,8,["files","onRemove","badgeValue","previewWidth","templates","unstyled","pt"])):p.createCommentVNode("",!0),p.createVNode(c,{files:o.uploadedFiles,onRemove:i.removeUploadedFile,badgeValue:i.completedLabel,badgeSeverity:"success",previewWidth:e.previewWidth,templates:e.$slots,unstyled:e.unstyled,pt:e.pt},null,8,["files","onRemove","badgeValue","previewWidth","templates","unstyled","pt"])]})),!e.$slots.empty||i.hasFiles||i.hasUploadedFiles?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:0,class:e.cx("empty")},e.ptm("empty")),[p.renderSlot(e.$slots,"empty")],16))],16)],16)):i.isBasic?(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:1,class:e.cx("root")},e.ptm("root"),{"data-pc-name":"fileupload"}),[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(o.messages,(function(t){return p.openBlock(),p.createBlock(r,{key:t,severity:"error",onClose:i.onMessageClose,unstyled:e.unstyled,pt:e.ptm("messages")},{default:p.withCtx((function(){return[p.createTextVNode(p.toDisplayString(t),1)]})),_:2},1032,["onClose","unstyled","pt"])})),128)),p.withDirectives((p.openBlock(),p.createElementBlock("span",p.mergeProps({class:i.chooseButtonClass,style:e.style,onMouseup:t[12]||(t[12]=function(){return i.onBasicUploaderClick&&i.onBasicUploaderClick.apply(i,arguments)}),onKeydown:t[13]||(t[13]=p.withKeys((function(){return i.choose&&i.choose.apply(i,arguments)}),["enter"])),onFocus:t[14]||(t[14]=function(){return i.onFocus&&i.onFocus.apply(i,arguments)}),onBlur:t[15]||(t[15]=function(){return i.onBlur&&i.onBlur.apply(i,arguments)}),tabindex:"0"},e.ptm("chooseButton")),[!i.hasFiles||e.auto?p.renderSlot(e.$slots,"uploadicon",{key:0,class:p.normalizeClass(e.cx("uploadIcon"))},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.uploadIcon?"span":"UploadIcon"),p.mergeProps({class:[e.cx("uploadIcon"),e.uploadIcon],"aria-hidden":"true"},e.ptm("uploadIcon")),null,16,["class"]))]})):p.renderSlot(e.$slots,"chooseicon",{key:1,class:p.normalizeClass(e.cx("chooseIcon"))},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.chooseIcon?"span":"PlusIcon"),p.mergeProps({class:[e.cx("chooseIcon"),e.chooseIcon],"aria-hidden":"true"},e.ptm("chooseIcon")),null,16,["class"]))]})),p.createElementVNode("span",p.mergeProps({class:e.cx("label")},e.ptm("label")),p.toDisplayString(i.basicChooseButtonLabel),17),i.hasFiles?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("input",p.mergeProps({key:2,ref:"fileInput",type:"file",accept:e.accept,disabled:e.disabled,multiple:e.multiple,onChange:t[9]||(t[9]=function(){return i.onFileSelect&&i.onFileSelect.apply(i,arguments)}),onFocus:t[10]||(t[10]=function(){return i.onFocus&&i.onFocus.apply(i,arguments)}),onBlur:t[11]||(t[11]=function(){return i.onBlur&&i.onBlur.apply(i,arguments)})},e.ptm("input")),null,16,P))],16)),[[u]])],16)):p.createCommentVNode("",!0)},$}(primevue.button,primevue.icons.plus,primevue.icons.times,primevue.icons.upload,primevue.message,primevue.progressbar,primevue.ripple,primevue.utils,primevue.basecomponent,primevue.fileupload.style,primevue.badge,Vue);
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.fileupload=function(e,t,l,n,o,i,s,a,r,c,u,p){"use strict";function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=d(e),m=d(t),h=d(l),y=d(n),g=d(o),v=d(i),B=d(s),b=d(r),F={name:"BaseFileUpload",extends:b.default,props:{name:{type:String,default:null},url:{type:String,default:null},mode:{type:String,default:"advanced"},multiple:{type:Boolean,default:!1},accept:{type:String,default:null},disabled:{type:Boolean,default:!1},auto:{type:Boolean,default:!1},maxFileSize:{type:Number,default:null},invalidFileSizeMessage:{type:String,default:"{0}: Invalid file size, file size should be smaller than {1}."},invalidFileTypeMessage:{type:String,default:"{0}: Invalid file type, allowed file types: {1}."},fileLimit:{type:Number,default:null},invalidFileLimitMessage:{type:String,default:"Maximum number of files exceeded, limit is {0} at most."},withCredentials:{type:Boolean,default:!1},previewWidth:{type:Number,default:50},chooseLabel:{type:String,default:null},uploadLabel:{type:String,default:null},cancelLabel:{type:String,default:null},customUpload:{type:Boolean,default:!1},showUploadButton:{type:Boolean,default:!0},showCancelButton:{type:Boolean,default:!0},chooseIcon:{type:String,default:void 0},uploadIcon:{type:String,default:void 0},cancelIcon:{type:String,default:void 0},style:null,class:null},style:d(c).default,provide:function(){return{$parentInstance:this}}},C={name:"FileContent",hostName:"FileUpload",extends:b.default,emits:["remove"],props:{files:{type:Array,default:function(){return[]}},badgeSeverity:{type:String,default:"warning"},badgeValue:{type:String,default:null},previewWidth:{type:Number,default:50},templates:{type:null,default:null}},methods:{formatSize:function(e){var t,l=(null===(t=this.$primevue.config.locale)||void 0===t?void 0:t.fileSizeTypes)||["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(0===e)return"0 ".concat(l[0]);var n=Math.floor(Math.log(e)/Math.log(1024)),o=parseFloat((e/Math.pow(1024,n)).toFixed(3));return"".concat(o," ").concat(l[n])}},components:{FileUploadButton:f.default,FileUploadBadge:d(u).default,TimesIcon:h.default}},k=["alt","src","width"];function S(e){return L(e)||x(e)||w(e)||I()}function I(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function x(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function L(e){if(Array.isArray(e))return D(e)}function E(e,t){var l="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!l){if(Array.isArray(e)||(l=w(e))||t&&e&&"number"==typeof e.length){l&&(e=l);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){l=l.call(e)},n:function(){var e=l.next();return s=e.done,e},e:function(e){a=!0,i=e},f:function(){try{s||null==l.return||l.return()}finally{if(a)throw i}}}}function w(e,t){if(e){if("string"==typeof e)return D(e,t);var l=Object.prototype.toString.call(e).slice(8,-1);return"Object"===l&&e.constructor&&(l=e.constructor.name),"Map"===l||"Set"===l?Array.from(e):"Arguments"===l||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?D(e,t):void 0}}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var l=0,n=new Array(t);l<t;l++)n[l]=e[l];return n}C.render=function(e,t,l,n,o,i){var s=p.resolveComponent("FileUploadBadge"),a=p.resolveComponent("TimesIcon"),r=p.resolveComponent("FileUploadButton");return p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(l.files,(function(t,n){return p.openBlock(),p.createElementBlock("div",p.mergeProps({key:t.name+t.type+t.size,class:e.cx("file")},e.ptm("file")),[p.createElementVNode("img",p.mergeProps({role:"presentation",class:e.cx("thumbnail"),alt:t.name,src:t.objectURL,width:l.previewWidth},e.ptm("thumbnail")),null,16,k),p.createElementVNode("div",p.mergeProps({class:e.cx("details")},e.ptm("details")),[p.createElementVNode("div",p.mergeProps({class:e.cx("fileName")},e.ptm("fileName")),p.toDisplayString(t.name),17),p.createElementVNode("span",p.mergeProps({class:e.cx("fileSize")},e.ptm("fileSize")),p.toDisplayString(i.formatSize(t.size)),17),p.createVNode(s,{value:l.badgeValue,class:p.normalizeClass(e.cx("badge")),severity:l.badgeSeverity,unstyled:e.unstyled,pt:e.ptm("badge")},null,8,["value","class","severity","unstyled","pt"])],16),p.createElementVNode("div",p.mergeProps({class:e.cx("actions")},e.ptm("actions")),[p.createVNode(r,{onClick:function(t){return e.$emit("remove",n)},text:"",rounded:"",severity:"danger",class:p.normalizeClass(e.cx("removeButton")),unstyled:e.unstyled,pt:e.ptm("removeButton")},{icon:p.withCtx((function(o){return[l.templates.fileremoveicon?(p.openBlock(),p.createBlock(p.resolveDynamicComponent(l.templates.fileremoveicon),{key:0,class:p.normalizeClass(o.class),file:t,index:n},null,8,["class","file","index"])):(p.openBlock(),p.createBlock(a,p.mergeProps({key:1,class:o.class,"aria-hidden":"true"},e.ptm("removeButton").icon),null,16,["class"]))]})),_:2},1032,["onClick","class","unstyled","pt"])],16)],16)})),128)};var $={name:"FileUpload",extends:F,emits:["select","uploader","before-upload","progress","upload","error","before-send","clear","remove","remove-uploaded-file"],duplicateIEEvent:!1,data:function(){return{uploadedFileCount:0,files:[],messages:[],focused:!1,progress:null,uploadedFiles:[]}},methods:{onFileSelect:function(e){if("drop"!==e.type&&this.isIE11()&&this.duplicateIEEvent)this.duplicateIEEvent=!1;else{this.messages=[],this.files=this.files||[];var t,l=E(e.dataTransfer?e.dataTransfer.files:e.target.files);try{for(l.s();!(t=l.n()).done;){var n=t.value;this.isFileSelected(n)||this.validate(n)&&(this.isImage(n)&&(n.objectURL=window.URL.createObjectURL(n)),this.files.push(n))}}catch(e){l.e(e)}finally{l.f()}this.$emit("select",{originalEvent:e,files:this.files}),this.fileLimit&&this.checkFileLimit(),this.auto&&this.hasFiles&&!this.isFileLimitExceeded()&&this.upload(),"drop"!==e.type&&this.isIE11()?this.clearIEInput():this.clearInputElement()}},choose:function(){this.$refs.fileInput.click()},upload:function(){var e=this;if(this.customUpload)this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.$emit("uploader",{files:this.files}),this.clear();else{var t=new XMLHttpRequest,l=new FormData;this.$emit("before-upload",{xhr:t,formData:l});var n,o=E(this.files);try{for(o.s();!(n=o.n()).done;){var i=n.value;l.append(this.name,i,i.name)}}catch(e){o.e(e)}finally{o.f()}t.upload.addEventListener("progress",(function(t){t.lengthComputable&&(e.progress=Math.round(100*t.loaded/t.total)),e.$emit("progress",{originalEvent:t,progress:e.progress})})),t.onreadystatechange=function(){var l;4===t.readyState&&(e.progress=0,t.status>=200&&t.status<300?(e.fileLimit&&(e.uploadedFileCount+=e.files.length),e.$emit("upload",{xhr:t,files:e.files})):e.$emit("error",{xhr:t,files:e.files}),(l=e.uploadedFiles).push.apply(l,S(e.files)),e.clear())},t.open("POST",this.url,!0),this.$emit("before-send",{xhr:t,formData:l}),t.withCredentials=this.withCredentials,t.send(l)}},clear:function(){this.files=[],this.messages=null,this.$emit("clear"),this.isAdvanced&&this.clearInputElement()},onFocus:function(){this.focused=!0},onBlur:function(){this.focused=!1},isFileSelected:function(e){if(this.files&&this.files.length){var t,l=E(this.files);try{for(l.s();!(t=l.n()).done;){var n=t.value;if(n.name+n.type+n.size===e.name+e.type+e.size)return!0}}catch(e){l.e(e)}finally{l.f()}}return!1},isIE11:function(){return!!window.MSInputMethodContext&&!!document.documentMode},validate:function(e){return this.accept&&!this.isFileTypeValid(e)?(this.messages.push(this.invalidFileTypeMessage.replace("{0}",e.name).replace("{1}",this.accept)),!1):!(this.maxFileSize&&e.size>this.maxFileSize)||(this.messages.push(this.invalidFileSizeMessage.replace("{0}",e.name).replace("{1}",this.formatSize(this.maxFileSize))),!1)},isFileTypeValid:function(e){var t,l=this.accept.split(",").map((function(e){return e.trim()})),n=E(l);try{for(n.s();!(t=n.n()).done;){var o=t.value;if(this.isWildcard(o)?this.getTypeClass(e.type)===this.getTypeClass(o):e.type==o||this.getFileExtension(e).toLowerCase()===o.toLowerCase())return!0}}catch(e){n.e(e)}finally{n.f()}return!1},getTypeClass:function(e){return e.substring(0,e.indexOf("/"))},isWildcard:function(e){return-1!==e.indexOf("*")},getFileExtension:function(e){return"."+e.name.split(".").pop()},isImage:function(e){return/^image\//.test(e.type)},onDragEnter:function(e){this.disabled||(e.stopPropagation(),e.preventDefault())},onDragOver:function(e){this.disabled||(!this.isUnstyled&&a.DomHandler.addClass(this.$refs.content,"p-fileupload-highlight"),this.$refs.content.setAttribute("data-p-highlight",!0),e.stopPropagation(),e.preventDefault())},onDragLeave:function(){this.disabled||(!this.isUnstyled&&a.DomHandler.removeClass(this.$refs.content,"p-fileupload-highlight"),this.$refs.content.setAttribute("data-p-highlight",!1))},onDrop:function(e){if(!this.disabled){!this.isUnstyled&&a.DomHandler.removeClass(this.$refs.content,"p-fileupload-highlight"),this.$refs.content.setAttribute("data-p-highlight",!1),e.stopPropagation(),e.preventDefault();var t=e.dataTransfer?e.dataTransfer.files:e.target.files;(this.multiple||t&&1===t.length)&&this.onFileSelect(e)}},onBasicUploaderClick:function(e){this.hasFiles?this.upload():0===e.button&&this.$refs.fileInput.click()},remove:function(e){this.clearInputElement();var t=this.files.splice(e,1)[0];this.files=S(this.files),this.$emit("remove",{file:t,files:this.files})},removeUploadedFile:function(e){var t=this.uploadedFiles.splice(e,1)[0];this.uploadedFiles=S(this.uploadedFiles),this.$emit("remove-uploaded-file",{file:t,files:this.uploadedFiles})},clearInputElement:function(){this.$refs.fileInput.value=""},clearIEInput:function(){this.$refs.fileInput&&(this.duplicateIEEvent=!0,this.$refs.fileInput.value="")},formatSize:function(e){var t,l=(null===(t=this.$primevue.config.locale)||void 0===t?void 0:t.fileSizeTypes)||["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(0===e)return"0 ".concat(l[0]);var n=Math.floor(Math.log(e)/Math.log(1024)),o=parseFloat((e/Math.pow(1024,n)).toFixed(3));return"".concat(o," ").concat(l[n])},isFileLimitExceeded:function(){return this.fileLimit&&this.fileLimit<=this.files.length+this.uploadedFileCount&&this.focused&&(this.focused=!1),this.fileLimit&&this.fileLimit<this.files.length+this.uploadedFileCount},checkFileLimit:function(){this.isFileLimitExceeded()&&this.messages.push(this.invalidFileLimitMessage.replace("{0}",this.fileLimit.toString()))},onMessageClose:function(){this.messages=null}},computed:{isAdvanced:function(){return"advanced"===this.mode},isBasic:function(){return"basic"===this.mode},chooseButtonClass:function(){return[this.cx("chooseButton"),this.class]},basicChooseButtonLabel:function(){return this.auto?this.chooseButtonLabel:this.hasFiles?this.files.map((function(e){return e.name})).join(", "):this.chooseButtonLabel},hasFiles:function(){return this.files&&this.files.length>0},hasUploadedFiles:function(){return this.uploadedFiles&&this.uploadedFiles.length>0},chooseDisabled:function(){return this.disabled||this.fileLimit&&this.fileLimit<=this.files.length+this.uploadedFileCount},uploadDisabled:function(){return this.disabled||!this.hasFiles||this.fileLimit&&this.fileLimit<this.files.length},cancelDisabled:function(){return this.disabled||!this.hasFiles},chooseButtonLabel:function(){return this.chooseLabel||this.$primevue.config.locale.choose},uploadButtonLabel:function(){return this.uploadLabel||this.$primevue.config.locale.upload},cancelButtonLabel:function(){return this.cancelLabel||this.$primevue.config.locale.cancel},completedLabel:function(){return this.$primevue.config.locale.completed},pendingLabel:function(){return this.$primevue.config.locale.pending}},components:{FileUploadButton:f.default,FileUploadProgressBar:v.default,FileUploadMessage:g.default,FileContent:C,PlusIcon:m.default,UploadIcon:y.default,TimesIcon:h.default},directives:{ripple:B.default}},U=["multiple","accept","disabled"],P=["accept","disabled","multiple"];return $.render=function(e,t,l,n,o,i){var s=p.resolveComponent("FileUploadButton"),a=p.resolveComponent("FileUploadProgressBar"),r=p.resolveComponent("FileUploadMessage"),c=p.resolveComponent("FileContent"),u=p.resolveDirective("ripple");return i.isAdvanced?(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:0,class:e.cx("root")},e.ptm("root")),[p.createElementVNode("input",p.mergeProps({ref:"fileInput",type:"file",onChange:t[0]||(t[0]=function(){return i.onFileSelect&&i.onFileSelect.apply(i,arguments)}),multiple:e.multiple,accept:e.accept,disabled:i.chooseDisabled},e.ptm("input")),null,16,U),p.createElementVNode("div",p.mergeProps({class:e.cx("buttonbar")},e.ptm("buttonbar")),[p.renderSlot(e.$slots,"header",{files:o.files,uploadedFiles:o.uploadedFiles,chooseCallback:i.choose,uploadCallback:i.upload,clearCallback:i.clear},(function(){return[p.withDirectives((p.openBlock(),p.createElementBlock("span",p.mergeProps({class:i.chooseButtonClass,style:e.style,onClick:t[1]||(t[1]=function(){return i.choose&&i.choose.apply(i,arguments)}),onKeydown:t[2]||(t[2]=p.withKeys((function(){return i.choose&&i.choose.apply(i,arguments)}),["enter"])),onFocus:t[3]||(t[3]=function(){return i.onFocus&&i.onFocus.apply(i,arguments)}),onBlur:t[4]||(t[4]=function(){return i.onBlur&&i.onBlur.apply(i,arguments)}),tabindex:"0"},e.ptm("chooseButton")),[p.renderSlot(e.$slots,"chooseicon",{class:p.normalizeClass(e.cx("chooseIcon"))},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.chooseIcon?"span":"PlusIcon"),p.mergeProps({class:[e.cx("chooseIcon"),e.chooseIcon],"aria-hidden":"true"},e.ptm("chooseIcon")),null,16,["class"]))]})),p.createElementVNode("span",p.mergeProps({class:e.cx("chooseButtonLabel")},e.ptm("chooseButtonLabel")),p.toDisplayString(i.chooseButtonLabel),17)],16)),[[u]]),e.showUploadButton?(p.openBlock(),p.createBlock(s,{key:0,label:i.uploadButtonLabel,onClick:i.upload,disabled:i.uploadDisabled,unstyled:e.unstyled,pt:e.ptm("uploadButton")},{icon:p.withCtx((function(t){return[p.renderSlot(e.$slots,"uploadicon",{},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.uploadIcon?"span":"UploadIcon"),p.mergeProps({class:[t.class,e.uploadIcon],"aria-hidden":"true"},e.ptm("uploadButton").icon,{"data-pc-section":"uploadbuttonicon"}),null,16,["class"]))]}))]})),_:3},8,["label","onClick","disabled","unstyled","pt"])):p.createCommentVNode("",!0),e.showCancelButton?(p.openBlock(),p.createBlock(s,{key:1,label:i.cancelButtonLabel,onClick:i.clear,disabled:i.cancelDisabled,unstyled:e.unstyled,pt:e.ptm("cancelButton")},{icon:p.withCtx((function(t){return[p.renderSlot(e.$slots,"cancelicon",{},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.cancelIcon?"span":"TimesIcon"),p.mergeProps({class:[t.class,e.cancelIcon],"aria-hidden":"true"},e.ptm("cancelButton").icon,{"data-pc-section":"cancelbuttonicon"}),null,16,["class"]))]}))]})),_:3},8,["label","onClick","disabled","unstyled","pt"])):p.createCommentVNode("",!0)]}))],16),p.createElementVNode("div",p.mergeProps({ref:"content",class:e.cx("content"),onDragenter:t[5]||(t[5]=function(){return i.onDragEnter&&i.onDragEnter.apply(i,arguments)}),onDragover:t[6]||(t[6]=function(){return i.onDragOver&&i.onDragOver.apply(i,arguments)}),onDragleave:t[7]||(t[7]=function(){return i.onDragLeave&&i.onDragLeave.apply(i,arguments)}),onDrop:t[8]||(t[8]=function(){return i.onDrop&&i.onDrop.apply(i,arguments)})},e.ptm("content"),{"data-p-highlight":!1}),[p.renderSlot(e.$slots,"content",{files:o.files,uploadedFiles:o.uploadedFiles,removeUploadedFileCallback:i.removeUploadedFile,removeFileCallback:i.remove,progress:o.progress,messages:o.messages},(function(){return[i.hasFiles?(p.openBlock(),p.createBlock(a,{key:0,value:o.progress,showValue:!1,unstyled:e.unstyled,pt:e.ptm("progressbar")},null,8,["value","unstyled","pt"])):p.createCommentVNode("",!0),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(o.messages,(function(t){return p.openBlock(),p.createBlock(r,{key:t,severity:"error",onClose:i.onMessageClose,unstyled:e.unstyled,pt:e.ptm("message")},{default:p.withCtx((function(){return[p.createTextVNode(p.toDisplayString(t),1)]})),_:2},1032,["onClose","unstyled","pt"])})),128)),i.hasFiles?(p.openBlock(),p.createBlock(c,{key:1,files:o.files,onRemove:i.remove,badgeValue:i.pendingLabel,previewWidth:e.previewWidth,templates:e.$slots,unstyled:e.unstyled,pt:e.pt},null,8,["files","onRemove","badgeValue","previewWidth","templates","unstyled","pt"])):p.createCommentVNode("",!0),p.createVNode(c,{files:o.uploadedFiles,onRemove:i.removeUploadedFile,badgeValue:i.completedLabel,badgeSeverity:"success",previewWidth:e.previewWidth,templates:e.$slots,unstyled:e.unstyled,pt:e.pt},null,8,["files","onRemove","badgeValue","previewWidth","templates","unstyled","pt"])]})),!e.$slots.empty||i.hasFiles||i.hasUploadedFiles?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:0,class:e.cx("empty")},e.ptm("empty")),[p.renderSlot(e.$slots,"empty")],16))],16)],16)):i.isBasic?(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:1,class:e.cx("root")},e.ptm("root")),[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(o.messages,(function(t){return p.openBlock(),p.createBlock(r,{key:t,severity:"error",onClose:i.onMessageClose,unstyled:e.unstyled,pt:e.ptm("messages")},{default:p.withCtx((function(){return[p.createTextVNode(p.toDisplayString(t),1)]})),_:2},1032,["onClose","unstyled","pt"])})),128)),p.withDirectives((p.openBlock(),p.createElementBlock("span",p.mergeProps({class:i.chooseButtonClass,style:e.style,onMouseup:t[12]||(t[12]=function(){return i.onBasicUploaderClick&&i.onBasicUploaderClick.apply(i,arguments)}),onKeydown:t[13]||(t[13]=p.withKeys((function(){return i.choose&&i.choose.apply(i,arguments)}),["enter"])),onFocus:t[14]||(t[14]=function(){return i.onFocus&&i.onFocus.apply(i,arguments)}),onBlur:t[15]||(t[15]=function(){return i.onBlur&&i.onBlur.apply(i,arguments)}),tabindex:"0"},e.ptm("chooseButton")),[!i.hasFiles||e.auto?p.renderSlot(e.$slots,"uploadicon",{key:0,class:p.normalizeClass(e.cx("uploadIcon"))},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.uploadIcon?"span":"UploadIcon"),p.mergeProps({class:[e.cx("uploadIcon"),e.uploadIcon],"aria-hidden":"true"},e.ptm("uploadIcon")),null,16,["class"]))]})):p.renderSlot(e.$slots,"chooseicon",{key:1,class:p.normalizeClass(e.cx("chooseIcon"))},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.chooseIcon?"span":"PlusIcon"),p.mergeProps({class:[e.cx("chooseIcon"),e.chooseIcon],"aria-hidden":"true"},e.ptm("chooseIcon")),null,16,["class"]))]})),p.createElementVNode("span",p.mergeProps({class:e.cx("label")},e.ptm("label")),p.toDisplayString(i.basicChooseButtonLabel),17),i.hasFiles?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("input",p.mergeProps({key:2,ref:"fileInput",type:"file",accept:e.accept,disabled:e.disabled,multiple:e.multiple,onChange:t[9]||(t[9]=function(){return i.onFileSelect&&i.onFileSelect.apply(i,arguments)}),onFocus:t[10]||(t[10]=function(){return i.onFocus&&i.onFocus.apply(i,arguments)}),onBlur:t[11]||(t[11]=function(){return i.onBlur&&i.onBlur.apply(i,arguments)})},e.ptm("input")),null,16,P))],16)),[[u]])],16)):p.createCommentVNode("",!0)},$}(primevue.button,primevue.icons.plus,primevue.icons.times,primevue.icons.upload,primevue.message,primevue.progressbar,primevue.ripple,primevue.utils,primevue.basecomponent,primevue.fileupload.style,primevue.badge,Vue);
|
|
@@ -6,7 +6,6 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
6
6
|
|
|
7
7
|
var BaseStyle__default = /*#__PURE__*/_interopDefaultLegacy(BaseStyle);
|
|
8
8
|
|
|
9
|
-
var css = "\n@layer primevue {\n .p-fileupload-content {\n position: relative;\n }\n\n .p-fileupload-content .p-progressbar {\n width: 100%;\n position: absolute;\n top: 0;\n left: 0;\n }\n\n .p-button.p-fileupload-choose {\n position: relative;\n overflow: hidden;\n }\n\n .p-fileupload-buttonbar {\n display: flex;\n flex-wrap: wrap;\n }\n\n .p-fileupload > input[type='file'],\n .p-fileupload-basic input[type='file'] {\n display: none;\n }\n\n .p-fluid .p-fileupload .p-button {\n width: auto;\n }\n\n .p-fileupload-file {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n }\n\n .p-fileupload-file-thumbnail {\n flex-shrink: 0;\n }\n\n .p-fileupload-file-actions {\n margin-left: auto;\n }\n}\n";
|
|
10
9
|
var classes = {
|
|
11
10
|
root: function root(_ref) {
|
|
12
11
|
var props = _ref.props;
|
|
@@ -39,7 +38,6 @@ var classes = {
|
|
|
39
38
|
};
|
|
40
39
|
var FileUploadStyle = BaseStyle__default["default"].extend({
|
|
41
40
|
name: 'fileupload',
|
|
42
|
-
css: css,
|
|
43
41
|
classes: classes
|
|
44
42
|
});
|
|
45
43
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=e(require("primevue/base/style")).default.extend({name:"fileupload",classes:{root:function(e){return["p-fileupload p-fileupload-".concat(e.props.mode," p-component")]},buttonbar:"p-fileupload-buttonbar",chooseButton:function(e){var o=e.instance,l=e.props;return["p-button p-component p-fileupload-choose",{"p-fileupload-choose-selected":"basic"===l.mode&&o.hasFiles,"p-disabled":l.disabled,"p-focus":o.focused}]},chooseIcon:"p-button-icon p-button-icon-left",chooseButtonLabel:"p-button-label",content:"p-fileupload-content",empty:"p-fileupload-empty",uploadIcon:"p-button-icon p-button-icon-left",label:"p-button-label",file:"p-fileupload-file",thumbnail:"p-fileupload-file-thumbnail",details:"p-fileupload-file-details",fileName:"p-fileupload-file-name",fileSize:"p-fileupload-file-size",badge:"p-fileupload-file-badge",actions:"p-fileupload-file-actions",removeButton:"p-fileupload-file-remove"}});module.exports=o;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import BaseStyle from 'primevue/base/style';
|
|
2
2
|
|
|
3
|
-
var css = "\n@layer primevue {\n .p-fileupload-content {\n position: relative;\n }\n\n .p-fileupload-content .p-progressbar {\n width: 100%;\n position: absolute;\n top: 0;\n left: 0;\n }\n\n .p-button.p-fileupload-choose {\n position: relative;\n overflow: hidden;\n }\n\n .p-fileupload-buttonbar {\n display: flex;\n flex-wrap: wrap;\n }\n\n .p-fileupload > input[type='file'],\n .p-fileupload-basic input[type='file'] {\n display: none;\n }\n\n .p-fluid .p-fileupload .p-button {\n width: auto;\n }\n\n .p-fileupload-file {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n }\n\n .p-fileupload-file-thumbnail {\n flex-shrink: 0;\n }\n\n .p-fileupload-file-actions {\n margin-left: auto;\n }\n}\n";
|
|
4
3
|
var classes = {
|
|
5
4
|
root: function root(_ref) {
|
|
6
5
|
var props = _ref.props;
|
|
@@ -33,7 +32,6 @@ var classes = {
|
|
|
33
32
|
};
|
|
34
33
|
var FileUploadStyle = BaseStyle.extend({
|
|
35
34
|
name: 'fileupload',
|
|
36
|
-
css: css,
|
|
37
35
|
classes: classes
|
|
38
36
|
});
|
|
39
37
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"primevue/base/style";var
|
|
1
|
+
import e from"primevue/base/style";var o=e.extend({name:"fileupload",classes:{root:function(e){return["p-fileupload p-fileupload-".concat(e.props.mode," p-component")]},buttonbar:"p-fileupload-buttonbar",chooseButton:function(e){var o=e.instance,l=e.props;return["p-button p-component p-fileupload-choose",{"p-fileupload-choose-selected":"basic"===l.mode&&o.hasFiles,"p-disabled":l.disabled,"p-focus":o.focused}]},chooseIcon:"p-button-icon p-button-icon-left",chooseButtonLabel:"p-button-label",content:"p-fileupload-content",empty:"p-fileupload-empty",uploadIcon:"p-button-icon p-button-icon-left",label:"p-button-label",file:"p-fileupload-file",thumbnail:"p-fileupload-file-thumbnail",details:"p-fileupload-file-details",fileName:"p-fileupload-file-name",fileSize:"p-fileupload-file-size",badge:"p-fileupload-file-badge",actions:"p-fileupload-file-actions",removeButton:"p-fileupload-file-remove"}});export{o as default};
|
|
@@ -7,7 +7,6 @@ this.primevue.fileupload.style = (function (BaseStyle) {
|
|
|
7
7
|
|
|
8
8
|
var BaseStyle__default = /*#__PURE__*/_interopDefaultLegacy(BaseStyle);
|
|
9
9
|
|
|
10
|
-
var css = "\n@layer primevue {\n .p-fileupload-content {\n position: relative;\n }\n\n .p-fileupload-content .p-progressbar {\n width: 100%;\n position: absolute;\n top: 0;\n left: 0;\n }\n\n .p-button.p-fileupload-choose {\n position: relative;\n overflow: hidden;\n }\n\n .p-fileupload-buttonbar {\n display: flex;\n flex-wrap: wrap;\n }\n\n .p-fileupload > input[type='file'],\n .p-fileupload-basic input[type='file'] {\n display: none;\n }\n\n .p-fluid .p-fileupload .p-button {\n width: auto;\n }\n\n .p-fileupload-file {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n }\n\n .p-fileupload-file-thumbnail {\n flex-shrink: 0;\n }\n\n .p-fileupload-file-actions {\n margin-left: auto;\n }\n}\n";
|
|
11
10
|
var classes = {
|
|
12
11
|
root: function root(_ref) {
|
|
13
12
|
var props = _ref.props;
|
|
@@ -40,7 +39,6 @@ this.primevue.fileupload.style = (function (BaseStyle) {
|
|
|
40
39
|
};
|
|
41
40
|
var FileUploadStyle = BaseStyle__default["default"].extend({
|
|
42
41
|
name: 'fileupload',
|
|
43
|
-
css: css,
|
|
44
42
|
classes: classes
|
|
45
43
|
});
|
|
46
44
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.fileupload=this.primevue.fileupload||{},this.primevue.fileupload.style=function(e){"use strict";function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}return l(primevue.base.style).default.extend({name:"fileupload",
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.fileupload=this.primevue.fileupload||{},this.primevue.fileupload.style=function(e){"use strict";function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}return l(primevue.base.style).default.extend({name:"fileupload",classes:{root:function(e){return["p-fileupload p-fileupload-".concat(e.props.mode," p-component")]},buttonbar:"p-fileupload-buttonbar",chooseButton:function(e){var l=e.instance,o=e.props;return["p-button p-component p-fileupload-choose",{"p-fileupload-choose-selected":"basic"===o.mode&&l.hasFiles,"p-disabled":o.disabled,"p-focus":l.focused}]},chooseIcon:"p-button-icon p-button-icon-left",chooseButtonLabel:"p-button-label",content:"p-fileupload-content",empty:"p-fileupload-empty",uploadIcon:"p-button-icon p-button-icon-left",label:"p-button-label",file:"p-fileupload-file",thumbnail:"p-fileupload-file-thumbnail",details:"p-fileupload-file-details",fileName:"p-fileupload-file-name",fileSize:"p-fileupload-file-size",badge:"p-fileupload-file-badge",actions:"p-fileupload-file-actions",removeButton:"p-fileupload-file-remove"}})}();
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import BaseComponent from 'primevue/basecomponent';
|
|
3
|
+
import FloatLabelStyle from 'primevue/floatlabel/style';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
name: 'BaseFloatLabel',
|
|
7
|
+
extends: BaseComponent,
|
|
8
|
+
props: {},
|
|
9
|
+
style: FloatLabelStyle,
|
|
10
|
+
provide() {
|
|
11
|
+
return {
|
|
12
|
+
$parentInstance: this
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
</script>
|