primevue 3.30.2 → 3.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/Accordion.d.ts +5 -5
- package/accordion/Accordion.vue +1 -1
- package/accordion/accordion.cjs.js +3 -3
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +3 -3
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +3 -3
- package/accordion/accordion.min.js +1 -1
- package/accordiontab/AccordionTab.d.ts +18 -12
- package/autocomplete/AutoComplete.d.ts +34 -23
- package/autocomplete/AutoComplete.vue +3 -3
- package/autocomplete/BaseAutoComplete.vue +4 -0
- package/autocomplete/autocomplete.cjs.js +9 -5
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +9 -5
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +9 -5
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/Avatar.d.ts +7 -7
- package/avatar/Avatar.vue +2 -2
- package/avatar/avatar.cjs.js +2 -2
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.esm.js +2 -2
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +2 -2
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/AvatarGroup.d.ts +3 -3
- package/badge/Badge.d.ts +3 -3
- package/badgedirective/BadgeDirective.d.ts +45 -4
- package/badgedirective/badgedirective.cjs.js +11 -1
- package/badgedirective/badgedirective.cjs.min.js +1 -1
- package/badgedirective/badgedirective.esm.js +11 -1
- package/badgedirective/badgedirective.esm.min.js +1 -1
- package/badgedirective/badgedirective.js +11 -1
- package/badgedirective/badgedirective.min.js +1 -1
- package/basecomponent/BaseComponent.vue +51 -25
- package/basecomponent/basecomponent.cjs.js +66 -42
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +66 -42
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +66 -42
- package/basecomponent/basecomponent.min.js +1 -1
- package/basedirective/basedirective.cjs.js +9 -3
- package/basedirective/basedirective.cjs.min.js +1 -1
- package/basedirective/basedirective.esm.js +9 -3
- package/basedirective/basedirective.esm.min.js +1 -1
- package/basedirective/basedirective.js +9 -3
- package/basedirective/basedirective.min.js +1 -1
- package/blockui/BaseBlockUI.vue +0 -8
- package/blockui/BlockUI.d.ts +7 -3
- package/blockui/BlockUI.vue +35 -10
- package/blockui/blockui.cjs.js +34 -12
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +34 -12
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +34 -12
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/Breadcrumb.d.ts +25 -10
- package/breadcrumb/BreadcrumbItem.vue +18 -8
- package/breadcrumb/breadcrumb.cjs.js +18 -8
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +18 -8
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +18 -8
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/Button.d.ts +8 -7
- package/button/Button.vue +4 -0
- package/button/button.cjs.js +5 -0
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +5 -0
- package/button/button.esm.min.js +1 -1
- package/button/button.js +5 -0
- package/button/button.min.js +1 -1
- package/calendar/Calendar.d.ts +129 -53
- package/calendar/Calendar.vue +49 -7
- package/calendar/calendar.cjs.js +72 -35
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +72 -35
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +72 -35
- package/calendar/calendar.min.js +1 -1
- package/card/Card.d.ts +9 -9
- package/carousel/Carousel.d.ts +32 -20
- package/carousel/Carousel.vue +10 -2
- package/carousel/carousel.cjs.js +11 -2
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +11 -2
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +11 -2
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +25 -19
- package/cascadeselect/CascadeSelect.vue +2 -1
- package/cascadeselect/CascadeSelectSub.vue +1 -0
- package/cascadeselect/cascadeselect.cjs.js +9 -7
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +9 -7
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +9 -7
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/Chart.d.ts +5 -5
- package/checkbox/Checkbox.d.ts +8 -8
- package/chip/Chip.d.ts +7 -7
- package/chips/Chips.d.ts +10 -10
- package/colorpicker/ColorPicker.d.ts +18 -11
- package/colorpicker/ColorPicker.vue +1 -1
- package/colorpicker/colorpicker.cjs.js +3 -3
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +3 -3
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +3 -3
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/Column.d.ts +58 -58
- package/columngroup/ColumnGroup.d.ts +3 -3
- package/config/PrimeVue.d.ts +22 -0
- package/config/config.cjs.js +4 -1
- package/config/config.cjs.min.js +1 -1
- package/config/config.esm.js +4 -1
- package/config/config.esm.min.js +1 -1
- package/config/config.js +4 -1
- package/config/config.min.js +1 -1
- package/confirmdialog/ConfirmDialog.d.ts +14 -14
- package/confirmpopup/ConfirmPopup.d.ts +16 -10
- package/confirmpopup/ConfirmPopup.vue +1 -1
- package/confirmpopup/confirmpopup.cjs.js +3 -3
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +4 -4
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +3 -3
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/ContextMenu.d.ts +27 -13
- package/contextmenu/ContextMenu.vue +1 -1
- package/contextmenu/ContextMenuSub.vue +14 -12
- package/contextmenu/contextmenu.cjs.js +19 -17
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +20 -18
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +19 -17
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +4538 -507
- package/core/core.min.js +19 -15
- package/datatable/BaseDataTable.vue +1 -1
- package/datatable/BodyCell.vue +1 -0
- package/datatable/ColumnFilter.vue +1 -1
- package/datatable/DataTable.d.ts +37 -31
- package/datatable/DataTable.vue +4 -1
- package/datatable/datatable.cjs.js +10 -5
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +10 -5
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +10 -5
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.d.ts +10 -10
- package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +7 -7
- package/deferredcontent/DeferredContent.d.ts +3 -3
- package/dialog/BaseDialog.vue +3 -7
- package/dialog/Dialog.d.ts +21 -15
- package/dialog/Dialog.vue +2 -1
- package/dialog/dialog.cjs.js +9 -6
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +9 -6
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +9 -6
- package/dialog/dialog.min.js +1 -1
- package/divider/BaseDivider.vue +9 -24
- package/divider/Divider.d.ts +4 -4
- package/divider/Divider.vue +1 -1
- package/divider/divider.cjs.js +15 -2
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +15 -2
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +15 -2
- package/divider/divider.min.js +1 -1
- package/dock/BaseDock.vue +1 -1
- package/dock/Dock.d.ts +13 -9
- package/dock/Dock.vue +19 -2
- package/dock/DockSub.vue +8 -7
- package/dock/dock.cjs.js +18 -11
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +18 -11
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +18 -11
- package/dock/dock.min.js +1 -1
- package/dropdown/BaseDropdown.vue +5 -5
- package/dropdown/Dropdown.d.ts +34 -28
- package/dropdown/Dropdown.vue +2 -2
- package/dropdown/dropdown.cjs.js +9 -9
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +9 -9
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +9 -9
- package/dropdown/dropdown.min.js +1 -1
- package/editor/BaseEditor.vue +0 -14
- package/editor/Editor.d.ts +19 -19
- package/editor/Editor.vue +20 -20
- package/editor/editor.cjs.js +20 -34
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +20 -34
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +20 -34
- package/editor/editor.min.js +1 -1
- package/fieldset/Fieldset.d.ts +17 -11
- package/fieldset/Fieldset.vue +1 -1
- package/fieldset/fieldset.cjs.js +3 -3
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +3 -3
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +3 -3
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/FileUpload.d.ts +24 -24
- package/fileupload/FileUpload.vue +4 -4
- package/fileupload/fileupload.cjs.js +10 -4
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +10 -4
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +10 -4
- package/fileupload/fileupload.min.js +1 -1
- package/focustrap/FocusTrap.d.ts +5 -5
- package/galleria/Galleria.d.ts +53 -34
- package/galleria/Galleria.vue +1 -1
- package/galleria/GalleriaItem.vue +9 -2
- package/galleria/GalleriaThumbnails.vue +1 -0
- package/galleria/galleria.cjs.js +14 -5
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +14 -5
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +14 -5
- package/galleria/galleria.min.js +1 -1
- package/image/Image.d.ts +28 -21
- package/image/Image.vue +4 -4
- package/image/image.cjs.js +6 -5
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +6 -5
- package/image/image.esm.min.js +1 -1
- package/image/image.js +6 -5
- package/image/image.min.js +1 -1
- package/inlinemessage/InlineMessage.d.ts +5 -5
- package/inplace/Inplace.d.ts +8 -8
- package/inputmask/InputMask.d.ts +32 -4
- package/inputmask/InputMask.vue +9 -1
- package/inputmask/inputmask.cjs.js +9 -1
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +9 -1
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +9 -1
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/InputNumber.d.ts +10 -10
- package/inputswitch/InputSwitch.d.ts +9 -9
- package/inputtext/InputText.d.ts +3 -3
- package/knob/Knob.d.ts +7 -7
- package/listbox/Listbox.d.ts +18 -18
- package/megamenu/MegaMenu.d.ts +26 -18
- package/megamenu/MegaMenuSub.vue +14 -11
- package/megamenu/megamenu.cjs.js +15 -12
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +15 -12
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +15 -12
- package/megamenu/megamenu.min.js +1 -1
- package/menu/Menu.d.ts +28 -14
- package/menu/Menu.vue +2 -2
- package/menu/Menuitem.vue +4 -1
- package/menu/menu.cjs.js +9 -5
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +9 -5
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +9 -5
- package/menu/menu.min.js +1 -1
- package/menubar/Menubar.d.ts +29 -17
- package/menubar/MenubarSub.vue +15 -11
- package/menubar/menubar.cjs.js +16 -12
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +16 -12
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +16 -12
- package/menubar/menubar.min.js +1 -1
- package/message/Message.d.ts +18 -12
- package/message/Message.vue +1 -1
- package/message/message.cjs.js +3 -3
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +4 -4
- package/message/message.esm.min.js +1 -1
- package/message/message.js +3 -3
- package/message/message.min.js +1 -1
- package/multiselect/MultiSelect.d.ts +47 -41
- package/multiselect/MultiSelect.vue +1 -1
- package/multiselect/multiselect.cjs.js +3 -3
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +3 -3
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +3 -3
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/OrderList.d.ts +24 -18
- package/orderlist/OrderList.vue +2 -1
- package/orderlist/orderlist.cjs.js +3 -1
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +3 -1
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +3 -1
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/OrganizationChart.d.ts +15 -15
- package/overlaypanel/OverlayPanel.d.ts +13 -7
- package/overlaypanel/OverlayPanel.vue +2 -1
- package/overlaypanel/overlaypanel.cjs.js +5 -3
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +6 -4
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +5 -3
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +15 -15
- package/paginator/Paginator.d.ts +20 -20
- package/paginator/Paginator.vue +2 -1
- package/paginator/paginator.cjs.js +2 -0
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +3 -1
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +2 -0
- package/paginator/paginator.min.js +1 -1
- package/panel/Panel.d.ts +19 -13
- package/panel/Panel.vue +1 -1
- package/panel/panel.cjs.js +3 -3
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +3 -3
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +3 -3
- package/panel/panel.min.js +1 -1
- package/panelmenu/PanelMenu.d.ts +35 -21
- package/panelmenu/PanelMenu.vue +13 -12
- package/panelmenu/PanelMenuSub.vue +14 -12
- package/panelmenu/panelmenu.cjs.js +31 -28
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +31 -28
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +31 -28
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/index.cjs.js +74 -0
- package/passthrough/index.cjs.min.js +1 -0
- package/passthrough/index.d.ts +15 -0
- package/passthrough/index.esm.js +70 -0
- package/passthrough/index.esm.min.js +1 -0
- package/passthrough/index.js +77 -0
- package/passthrough/index.min.js +1 -0
- package/passthrough/package.json +6 -0
- package/passthrough/tailwind/index.cjs.js +3828 -0
- package/passthrough/tailwind/index.cjs.min.js +1 -0
- package/passthrough/tailwind/index.d.ts +5 -0
- package/passthrough/tailwind/index.esm.js +3823 -0
- package/passthrough/tailwind/index.esm.min.js +1 -0
- package/passthrough/tailwind/index.js +3835 -0
- package/passthrough/tailwind/index.min.js +1 -0
- package/passthrough/tailwind/package.json +6 -0
- package/password/Password.d.ts +25 -14
- package/password/Password.vue +2 -1
- package/password/password.cjs.js +4 -3
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +4 -3
- package/password/password.esm.min.js +1 -1
- package/password/password.js +4 -3
- package/password/password.min.js +1 -1
- package/picklist/PickList.d.ts +42 -36
- package/picklist/PickList.vue +3 -2
- package/picklist/picklist.cjs.js +4 -2
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +4 -2
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +4 -2
- package/picklist/picklist.min.js +1 -1
- package/progressbar/ProgressBar.d.ts +5 -5
- package/progressspinner/ProgressSpinner.d.ts +5 -5
- package/radiobutton/RadioButton.d.ts +10 -10
- package/rating/Rating.d.ts +12 -12
- package/rating/Rating.vue +3 -3
- package/rating/rating.cjs.js +3 -3
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +3 -3
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +3 -3
- package/rating/rating.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +7 -0
- package/resources/themes/arya-green/theme.css +7 -0
- package/resources/themes/arya-orange/theme.css +7 -0
- package/resources/themes/arya-purple/theme.css +7 -0
- package/resources/themes/bootstrap4-dark-blue/theme.css +7 -0
- package/resources/themes/bootstrap4-dark-purple/theme.css +7 -0
- package/resources/themes/bootstrap4-light-blue/theme.css +7 -0
- package/resources/themes/bootstrap4-light-purple/theme.css +7 -0
- package/resources/themes/fluent-light/theme.css +7 -0
- package/resources/themes/lara-dark-blue/theme.css +7 -0
- package/resources/themes/lara-dark-indigo/theme.css +7 -0
- package/resources/themes/lara-dark-purple/theme.css +7 -0
- package/resources/themes/lara-dark-teal/theme.css +7 -0
- package/resources/themes/lara-light-blue/theme.css +7 -0
- package/resources/themes/lara-light-indigo/theme.css +7 -0
- package/resources/themes/lara-light-purple/theme.css +7 -0
- package/resources/themes/lara-light-teal/theme.css +7 -0
- package/resources/themes/luna-amber/theme.css +7 -0
- package/resources/themes/luna-blue/theme.css +7 -0
- package/resources/themes/luna-green/theme.css +7 -0
- package/resources/themes/luna-pink/theme.css +7 -0
- package/resources/themes/md-dark-deeppurple/theme.css +7 -0
- package/resources/themes/md-dark-indigo/theme.css +7 -0
- package/resources/themes/md-light-deeppurple/theme.css +7 -0
- package/resources/themes/md-light-indigo/theme.css +7 -0
- package/resources/themes/mdc-dark-deeppurple/theme.css +7 -0
- package/resources/themes/mdc-dark-indigo/theme.css +7 -0
- package/resources/themes/mdc-light-deeppurple/theme.css +7 -0
- package/resources/themes/mdc-light-indigo/theme.css +7 -0
- package/resources/themes/mira/theme.css +7 -0
- package/resources/themes/nano/theme.css +7 -0
- package/resources/themes/nova/theme.css +7 -0
- package/resources/themes/nova-accent/theme.css +7 -0
- package/resources/themes/nova-alt/theme.css +7 -0
- package/resources/themes/nova-vue/theme.css +7 -0
- package/resources/themes/rhea/theme.css +7 -0
- package/resources/themes/saga-blue/theme.css +7 -0
- package/resources/themes/saga-green/theme.css +7 -0
- package/resources/themes/saga-orange/theme.css +7 -0
- package/resources/themes/saga-purple/theme.css +7 -0
- package/resources/themes/soho-dark/theme.css +7 -0
- package/resources/themes/soho-light/theme.css +7 -0
- package/resources/themes/tailwind-light/theme.css +7 -0
- package/resources/themes/vela-blue/theme.css +7 -0
- package/resources/themes/vela-green/theme.css +7 -0
- package/resources/themes/vela-orange/theme.css +7 -0
- package/resources/themes/vela-purple/theme.css +7 -0
- package/resources/themes/viva-dark/theme.css +7 -0
- package/resources/themes/viva-light/theme.css +7 -0
- package/ripple/Ripple.d.ts +3 -3
- package/row/Row.d.ts +2 -2
- package/scrollpanel/ScrollPanel.d.ts +7 -7
- package/scrolltop/ScrollTop.d.ts +11 -5
- package/scrolltop/ScrollTop.vue +1 -1
- package/scrolltop/scrolltop.cjs.js +3 -3
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.esm.js +4 -4
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +3 -3
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/SelectButton.d.ts +5 -5
- package/sidebar/Sidebar.d.ts +16 -10
- package/sidebar/Sidebar.vue +1 -1
- package/sidebar/sidebar.cjs.js +3 -3
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +3 -3
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +3 -3
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/Skeleton.d.ts +3 -3
- package/slider/Slider.d.ts +7 -7
- package/speeddial/BaseSpeedDial.vue +12 -36
- package/speeddial/SpeedDial.d.ts +14 -9
- package/speeddial/SpeedDial.vue +5 -4
- package/speeddial/speeddial.cjs.js +44 -23
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +44 -23
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +44 -23
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/SplitButton.d.ts +8 -8
- package/splitbutton/SplitButton.vue +22 -3
- package/splitbutton/splitbutton.cjs.js +17 -5
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +17 -5
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +17 -5
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/Splitter.d.ts +16 -5
- package/splitter/Splitter.vue +8 -1
- package/splitter/splitter.cjs.js +9 -1
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +9 -1
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +9 -1
- package/splitter/splitter.min.js +1 -1
- package/splitterpanel/SplitterPanel.d.ts +14 -3
- package/splitterpanel/SplitterPanel.vue +8 -1
- package/splitterpanel/splitterpanel.cjs.js +8 -1
- package/splitterpanel/splitterpanel.cjs.min.js +1 -1
- package/splitterpanel/splitterpanel.esm.js +8 -1
- package/splitterpanel/splitterpanel.esm.min.js +1 -1
- package/splitterpanel/splitterpanel.js +8 -1
- package/splitterpanel/splitterpanel.min.js +1 -1
- package/steps/BaseSteps.vue +1 -1
- package/steps/Steps.d.ts +33 -8
- package/steps/Steps.vue +17 -7
- package/steps/steps.cjs.js +19 -9
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +19 -9
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +19 -9
- package/steps/steps.min.js +1 -1
- package/styleclass/StyleClass.d.ts +2 -2
- package/tabmenu/TabMenu.d.ts +15 -11
- package/tabmenu/TabMenu.vue +11 -10
- package/tabmenu/tabmenu.cjs.js +11 -10
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +11 -10
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +11 -10
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabpanel/TabPanel.d.ts +10 -10
- package/tabview/TabView.d.ts +16 -16
- package/tabview/TabView.vue +1 -0
- package/tabview/tabview.cjs.js +2 -1
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +2 -1
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +2 -1
- package/tabview/tabview.min.js +1 -1
- package/tag/Tag.d.ts +5 -5
- package/terminal/Terminal.d.ts +11 -11
- package/textarea/Textarea.d.ts +3 -3
- package/tieredmenu/TieredMenu.d.ts +27 -13
- package/tieredmenu/TieredMenu.vue +1 -1
- package/tieredmenu/TieredMenuSub.vue +13 -11
- package/tieredmenu/tieredmenu.cjs.js +16 -14
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +16 -14
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +16 -14
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/Timeline.d.ts +9 -9
- package/toast/BaseToast.vue +4 -0
- package/toast/Toast.d.ts +23 -17
- package/toast/Toast.vue +3 -2
- package/toast/toast.cjs.js +4 -2
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +5 -3
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +4 -2
- package/toast/toast.min.js +1 -1
- package/togglebutton/ToggleButton.d.ts +31 -9
- package/togglebutton/ToggleButton.vue +12 -3
- package/togglebutton/togglebutton.cjs.js +12 -3
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +12 -3
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +12 -3
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/Toolbar.d.ts +6 -6
- package/toolbar/Toolbar.vue +3 -3
- package/toolbar/toolbar.cjs.js +3 -6
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +3 -6
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +3 -6
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/Tooltip.d.ts +35 -6
- package/tooltip/tooltip.cjs.js +17 -4
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +17 -4
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +413 -400
- package/tooltip/tooltip.min.js +1 -1
- package/tree/Tree.d.ts +20 -20
- package/tree/Tree.vue +1 -0
- package/tree/tree.cjs.js +3 -2
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +3 -2
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +3 -2
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.d.ts +23 -17
- package/treeselect/TreeSelect.vue +2 -2
- package/treeselect/treeselect.cjs.js +4 -4
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +4 -4
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +4 -4
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/TreeTable.d.ts +21 -21
- package/treetable/TreeTable.vue +2 -1
- package/treetable/treetable.cjs.js +1 -1
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +1 -1
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +1 -1
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.d.ts +11 -11
- package/usestyle/UseStyle.d.ts +2 -1
- package/usestyle/usestyle.cjs.js +20 -7
- package/usestyle/usestyle.cjs.min.js +1 -1
- package/usestyle/usestyle.esm.js +20 -7
- package/usestyle/usestyle.esm.min.js +1 -1
- package/usestyle/usestyle.js +20 -7
- package/usestyle/usestyle.min.js +1 -1
- package/utils/Utils.d.ts +4 -0
- package/utils/utils.cjs.js +48 -8
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +48 -8
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +48 -8
- package/utils/utils.min.js +1 -1
- package/vetur-attributes.json +129 -125
- package/vetur-tags.json +1 -0
- package/virtualscroller/BaseVirtualScroller.vue +1 -1
- package/virtualscroller/VirtualScroller.d.ts +7 -7
- package/virtualscroller/virtualscroller.cjs.js +2 -1
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +2 -1
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +2 -1
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +160 -127
package/timeline/Timeline.d.ts
CHANGED
|
@@ -27,35 +27,35 @@ export interface TimelinePassThroughMethodOptions {
|
|
|
27
27
|
*/
|
|
28
28
|
export interface TimelinePassThroughOptions {
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* Used to pass attributes to the root's DOM element.
|
|
31
31
|
*/
|
|
32
32
|
root?: TimelinePassThroughOptionType;
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
34
|
+
* Used to pass attributes to the event's DOM element.
|
|
35
35
|
*/
|
|
36
36
|
event?: TimelinePassThroughOptionType;
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
* Used to pass attributes to the opposite's DOM element.
|
|
39
39
|
*/
|
|
40
40
|
opposite?: TimelinePassThroughOptionType;
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* Used to pass attributes to the separator's DOM element.
|
|
43
43
|
*/
|
|
44
44
|
separator?: TimelinePassThroughOptionType;
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
46
|
+
* Used to pass attributes to the marker's DOM element.
|
|
47
47
|
*/
|
|
48
48
|
marker?: TimelinePassThroughOptionType;
|
|
49
49
|
/**
|
|
50
|
-
*
|
|
50
|
+
* Used to pass attributes to the connector's DOM element.
|
|
51
51
|
*/
|
|
52
52
|
connector?: TimelinePassThroughOptionType;
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
54
|
+
* Used to pass attributes to the content's DOM element.
|
|
55
55
|
*/
|
|
56
56
|
content?: TimelinePassThroughOptionType;
|
|
57
57
|
/**
|
|
58
|
-
*
|
|
58
|
+
* Used to manage all lifecycle hooks
|
|
59
59
|
* @see {@link BaseComponent.ComponentHooks}
|
|
60
60
|
*/
|
|
61
61
|
hooks?: ComponentHooks;
|
|
@@ -101,7 +101,7 @@ export interface TimelineProps {
|
|
|
101
101
|
*/
|
|
102
102
|
dataKey?: string | undefined;
|
|
103
103
|
/**
|
|
104
|
-
*
|
|
104
|
+
* Used to pass attributes to DOM elements inside the component.
|
|
105
105
|
* @type {TimelinePassThroughOptions}
|
|
106
106
|
*/
|
|
107
107
|
pt?: TimelinePassThroughOptions;
|
package/toast/BaseToast.vue
CHANGED
package/toast/Toast.d.ts
CHANGED
|
@@ -7,12 +7,14 @@
|
|
|
7
7
|
* @module toast
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
import { ButtonHTMLAttributes, VNode } from 'vue';
|
|
10
|
+
import { ButtonHTMLAttributes, TransitionProps, VNode } from 'vue';
|
|
11
11
|
import { ComponentHooks } from '../basecomponent';
|
|
12
12
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
13
13
|
|
|
14
14
|
export declare type ToastPassThroughOptionType = ToastPassThroughAttributes | ((options: ToastPassThroughMethodOptions) => ToastPassThroughAttributes | string) | string | null | undefined;
|
|
15
15
|
|
|
16
|
+
export declare type ToastPassThroughTransitionType = TransitionProps | ((options: ToastPassThroughMethodOptions) => TransitionProps) | undefined;
|
|
17
|
+
|
|
16
18
|
/**
|
|
17
19
|
* Custom passthrough(pt) option method.
|
|
18
20
|
*/
|
|
@@ -28,64 +30,68 @@ export interface ToastPassThroughMethodOptions {
|
|
|
28
30
|
*/
|
|
29
31
|
export interface ToastPassThroughOptions {
|
|
30
32
|
/**
|
|
31
|
-
*
|
|
33
|
+
* Used to pass attributes to the root's DOM element.
|
|
32
34
|
*/
|
|
33
35
|
root?: ToastPassThroughOptionType;
|
|
34
36
|
/**
|
|
35
|
-
*
|
|
37
|
+
* Used to pass attributes to the message's DOM element.
|
|
36
38
|
*/
|
|
37
39
|
message?: ToastPassThroughOptionType;
|
|
38
40
|
/**
|
|
39
|
-
*
|
|
41
|
+
* Used to pass attributes to the container's DOM element.
|
|
40
42
|
*/
|
|
41
43
|
container?: ToastPassThroughOptionType;
|
|
42
44
|
/**
|
|
43
|
-
*
|
|
45
|
+
* Used to pass attributes to the content's DOM element.
|
|
44
46
|
*/
|
|
45
47
|
content?: ToastPassThroughOptionType;
|
|
46
48
|
/**
|
|
47
|
-
*
|
|
49
|
+
* Used to pass attributes to the icon's DOM element.
|
|
48
50
|
*/
|
|
49
51
|
icon?: ToastPassThroughOptionType;
|
|
50
52
|
/**
|
|
51
|
-
*
|
|
53
|
+
* Used to pass attributes to the text's DOM element.
|
|
52
54
|
*/
|
|
53
55
|
text?: ToastPassThroughOptionType;
|
|
54
56
|
/**
|
|
55
|
-
*
|
|
57
|
+
* Used to pass attributes to the summary's DOM element.
|
|
56
58
|
*/
|
|
57
59
|
summary?: ToastPassThroughOptionType;
|
|
58
60
|
/**
|
|
59
|
-
*
|
|
61
|
+
* Used to pass attributes to the detail's DOM element.
|
|
60
62
|
*/
|
|
61
63
|
detail?: ToastPassThroughOptionType;
|
|
62
64
|
/**
|
|
63
|
-
*
|
|
65
|
+
* Used to pass attributes to the button container's DOM element.
|
|
64
66
|
*/
|
|
65
67
|
buttonContainer?: ToastPassThroughOptionType;
|
|
66
68
|
/**
|
|
67
|
-
*
|
|
69
|
+
* Used to pass attributes to the button's DOM element.
|
|
68
70
|
* @deprecated since v3.30.2. Use 'closeButton' option.
|
|
69
71
|
*/
|
|
70
72
|
button?: ToastPassThroughOptionType;
|
|
71
73
|
/**
|
|
72
|
-
*
|
|
74
|
+
* Used to pass attributes to the button's DOM element.
|
|
73
75
|
*/
|
|
74
76
|
closeButton?: ToastPassThroughOptionType;
|
|
75
77
|
/**
|
|
76
|
-
*
|
|
78
|
+
* Used to pass attributes to the button icon's DOM element.
|
|
77
79
|
* @deprecated since v3.30.2. Use 'closeIcon' option.
|
|
78
80
|
*/
|
|
79
81
|
buttonIcon?: ToastPassThroughOptionType;
|
|
80
82
|
/**
|
|
81
|
-
*
|
|
83
|
+
* Used to pass attributes to the button icon's DOM element.
|
|
82
84
|
*/
|
|
83
85
|
closeIcon?: ToastPassThroughOptionType;
|
|
84
86
|
/**
|
|
85
|
-
*
|
|
87
|
+
* Used to manage all lifecycle hooks
|
|
86
88
|
* @see {@link BaseComponent.ComponentHooks}
|
|
87
89
|
*/
|
|
88
90
|
hooks?: ComponentHooks;
|
|
91
|
+
/**
|
|
92
|
+
* Used to control Vue Transition API.
|
|
93
|
+
*/
|
|
94
|
+
transition?: ToastPassThroughTransitionType;
|
|
89
95
|
}
|
|
90
96
|
|
|
91
97
|
/**
|
|
@@ -214,12 +220,12 @@ export interface ToastProps {
|
|
|
214
220
|
*/
|
|
215
221
|
successIcon?: string | undefined;
|
|
216
222
|
/**
|
|
217
|
-
*
|
|
223
|
+
* Used to pass all properties of the HTMLButtonElement to the close button.
|
|
218
224
|
* @deprecated since v3.26.0. Use 'pt' property.
|
|
219
225
|
*/
|
|
220
226
|
closeButtonProps?: ButtonHTMLAttributes | undefined;
|
|
221
227
|
/**
|
|
222
|
-
*
|
|
228
|
+
* Used to pass attributes to DOM elements inside the component.
|
|
223
229
|
* @type {ToastPassThroughOptions}
|
|
224
230
|
*/
|
|
225
231
|
pt?: ToastPassThroughOptions;
|
package/toast/Toast.vue
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<Portal>
|
|
3
3
|
<div ref="container" :class="cx('root')" :style="sx('root', true, { position })" v-bind="{ ...$attrs, ...ptm('root') }">
|
|
4
|
-
<transition-group name="p-toast-message" tag="div" @enter="onEnter" @leave="onLeave" v-bind="ptm('message')">
|
|
4
|
+
<transition-group name="p-toast-message" tag="div" @enter="onEnter" @leave="onLeave" v-bind="{ ...ptm('message'), ...ptm('transition') }">
|
|
5
5
|
<ToastMessage
|
|
6
6
|
v-for="msg of messages"
|
|
7
7
|
:key="msg.id"
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<script>
|
|
25
25
|
import Portal from 'primevue/portal';
|
|
26
26
|
import ToastEventBus from 'primevue/toasteventbus';
|
|
27
|
-
import { ObjectUtils, UniqueComponentId, ZIndexUtils } from 'primevue/utils';
|
|
27
|
+
import { DomHandler, ObjectUtils, UniqueComponentId, ZIndexUtils } from 'primevue/utils';
|
|
28
28
|
import BaseToast from './BaseToast.vue';
|
|
29
29
|
import ToastMessage from './ToastMessage.vue';
|
|
30
30
|
|
|
@@ -113,6 +113,7 @@ export default {
|
|
|
113
113
|
if (!this.styleElement && !this.isUnstyled) {
|
|
114
114
|
this.styleElement = document.createElement('style');
|
|
115
115
|
this.styleElement.type = 'text/css';
|
|
116
|
+
DomHandler.setAttribute(this.styleElement, 'nonce', this.$primevue?.config?.csp?.nonce);
|
|
116
117
|
document.head.appendChild(this.styleElement);
|
|
117
118
|
|
|
118
119
|
let innerHTML = '';
|
package/toast/toast.cjs.js
CHANGED
|
@@ -29,7 +29,7 @@ function _typeof$2(obj) { "@babel/helpers - typeof"; return _typeof$2 = "functio
|
|
|
29
29
|
function _defineProperty$2(obj, key, value) { key = _toPropertyKey$2(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
30
30
|
function _toPropertyKey$2(arg) { var key = _toPrimitive$2(arg, "string"); return _typeof$2(key) === "symbol" ? key : String(key); }
|
|
31
31
|
function _toPrimitive$2(input, hint) { if (_typeof$2(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$2(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
32
|
-
var styles = "\n.p-toast {\n width: 25rem;\n}\n\n.p-toast-message-content {\n display: flex;\n align-items: flex-start;\n}\n\n.p-toast-message-text {\n flex: 1 1 auto;\n}\n\n.p-toast-top-center {\n transform: translateX(-50%);\n}\n\n.p-toast-bottom-center {\n transform: translateX(-50%);\n}\n\n.p-toast-center {\n min-width: 20vw;\n transform: translate(-50%, -50%);\n}\n\n.p-toast-icon-close {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-toast-icon-close.p-link {\n cursor: pointer;\n}\n\n/* Animations */\n.p-toast-message-enter-from {\n opacity: 0;\n -webkit-transform: translateY(50%);\n -ms-transform: translateY(50%);\n transform: translateY(50%);\n}\n\n.p-toast-message-leave-from {\n max-height: 1000px;\n}\n\n.p-toast .p-toast-message.p-toast-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin-bottom: 0;\n overflow: hidden;\n}\n\n.p-toast-message-enter-active {\n -webkit-transition: transform 0.3s, opacity 0.3s;\n transition: transform 0.3s, opacity 0.3s;\n}\n\n.p-toast-message-leave-active {\n -webkit-transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n}\n";
|
|
32
|
+
var styles = "\n.p-toast {\n width: 25rem;\n}\n\n.p-toast-message-icon {\n flex-shrink: 0;\n}\n\n.p-toast-message-content {\n display: flex;\n align-items: flex-start;\n}\n\n.p-toast-message-text {\n flex: 1 1 auto;\n}\n\n.p-toast-top-center {\n transform: translateX(-50%);\n}\n\n.p-toast-bottom-center {\n transform: translateX(-50%);\n}\n\n.p-toast-center {\n min-width: 20vw;\n transform: translate(-50%, -50%);\n}\n\n.p-toast-icon-close {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-toast-icon-close.p-link {\n cursor: pointer;\n}\n\n/* Animations */\n.p-toast-message-enter-from {\n opacity: 0;\n -webkit-transform: translateY(50%);\n -ms-transform: translateY(50%);\n transform: translateY(50%);\n}\n\n.p-toast-message-leave-from {\n max-height: 1000px;\n}\n\n.p-toast .p-toast-message.p-toast-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin-bottom: 0;\n overflow: hidden;\n}\n\n.p-toast-message-enter-active {\n -webkit-transition: transform 0.3s, opacity 0.3s;\n transition: transform 0.3s, opacity 0.3s;\n}\n\n.p-toast-message-leave-active {\n -webkit-transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n}\n";
|
|
33
33
|
|
|
34
34
|
// Position
|
|
35
35
|
var inlineStyles = {
|
|
@@ -367,8 +367,10 @@ var script = {
|
|
|
367
367
|
},
|
|
368
368
|
createStyle: function createStyle() {
|
|
369
369
|
if (!this.styleElement && !this.isUnstyled) {
|
|
370
|
+
var _this$$primevue;
|
|
370
371
|
this.styleElement = document.createElement('style');
|
|
371
372
|
this.styleElement.type = 'text/css';
|
|
373
|
+
utils.DomHandler.setAttribute(this.styleElement, 'nonce', (_this$$primevue = this.$primevue) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.config) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.csp) === null || _this$$primevue === void 0 ? void 0 : _this$$primevue.nonce);
|
|
372
374
|
document.head.appendChild(this.styleElement);
|
|
373
375
|
var innerHTML = '';
|
|
374
376
|
for (var breakpoint in this.breakpoints) {
|
|
@@ -421,7 +423,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
421
423
|
tag: "div",
|
|
422
424
|
onEnter: $options.onEnter,
|
|
423
425
|
onLeave: $options.onLeave
|
|
424
|
-
}, _ctx.ptm('message')), {
|
|
426
|
+
}, _objectSpread(_objectSpread({}, _ctx.ptm('message')), _ctx.ptm('transition'))), {
|
|
425
427
|
"default": vue.withCtx(function () {
|
|
426
428
|
return [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($data.messages, function (msg) {
|
|
427
429
|
return vue.openBlock(), vue.createBlock(_component_ToastMessage, {
|
package/toast/toast.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/portal"),t=require("primevue/toasteventbus"),n=require("primevue/utils"),o=require("primevue/basecomponent"),r=require("primevue/usestyle"),s=require("primevue/icons/check"),i=require("primevue/icons/exclamationtriangle"),a=require("primevue/icons/infocircle"),l=require("primevue/icons/times"),c=require("primevue/icons/timescircle"),u=require("primevue/ripple"),m=require("vue");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=p(e),y=p(t),d=p(o),g=p(s),v=p(i),b=p(a),h=p(l),I=p(c),S=p(u);function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function w(e,t,n){return(t=P(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P(e){var t=k(e,"string");return"symbol"===x(t)?t:String(t)}function k(e,t){if("object"!==x(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==x(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var O={root:function(e){var t=e.instance;return["p-toast p-component p-toast-"+e.props.position,{"p-input-filled":"filled"===t.$primevue.config.inputStyle,"p-ripple-disabled":!1===t.$primevue.config.ripple}]},container:function(e){var t=e.props;return["p-toast-message",{"p-toast-message-info":"info"===t.message.severity||void 0===t.message.severity,"p-toast-message-warn":"warn"===t.message.severity,"p-toast-message-error":"error"===t.message.severity,"p-toast-message-success":"success"===t.message.severity}]},content:"p-toast-message-content",icon:function(e){var t,n=e.props;return["p-toast-message-icon",(t={},w(t,n.infoIcon,"info"===n.message.severity),w(t,n.warnIcon,"warn"===n.message.severity),w(t,n.errorIcon,"error"===n.message.severity),w(t,n.successIcon,"success"===n.message.severity),t)]},text:"p-toast-message-text",summary:"p-toast-summary",detail:"p-toast-detail",closeButton:"p-toast-icon-close p-link",closeIcon:"p-toast-icon-close-icon"},j=r.useStyle("\n.p-toast {\n width: 25rem;\n}\n\n.p-toast-message-content {\n display: flex;\n align-items: flex-start;\n}\n\n.p-toast-message-text {\n flex: 1 1 auto;\n}\n\n.p-toast-top-center {\n transform: translateX(-50%);\n}\n\n.p-toast-bottom-center {\n transform: translateX(-50%);\n}\n\n.p-toast-center {\n min-width: 20vw;\n transform: translate(-50%, -50%);\n}\n\n.p-toast-icon-close {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-toast-icon-close.p-link {\n cursor: pointer;\n}\n\n/* Animations */\n.p-toast-message-enter-from {\n opacity: 0;\n -webkit-transform: translateY(50%);\n -ms-transform: translateY(50%);\n transform: translateY(50%);\n}\n\n.p-toast-message-leave-from {\n max-height: 1000px;\n}\n\n.p-toast .p-toast-message.p-toast-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin-bottom: 0;\n overflow: hidden;\n}\n\n.p-toast-message-enter-active {\n -webkit-transition: transform 0.3s, opacity 0.3s;\n transition: transform 0.3s, opacity 0.3s;\n}\n\n.p-toast-message-leave-active {\n -webkit-transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n}\n",{name:"toast",manual:!0}),E={name:"BaseToast",extends:d.default,props:{group:{type:String,default:null},position:{type:String,default:"top-right"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},breakpoints:{type:Object,default:null},closeIcon:{type:String,default:void 0},infoIcon:{type:String,default:void 0},warnIcon:{type:String,default:void 0},errorIcon:{type:String,default:void 0},successIcon:{type:String,default:void 0},closeButtonProps:{type:null,default:null}},css:{classes:O,inlineStyles:{root:function(e){var t=e.position;return{position:"fixed",top:"top-right"===t||"top-left"===t||"top-center"===t?"20px":"center"===t?"50%":null,right:("top-right"===t||"bottom-right"===t)&&"20px",bottom:("bottom-left"===t||"bottom-right"===t||"bottom-center"===t)&&"20px",left:"top-left"===t||"bottom-left"===t?"20px":"center"===t||"top-center"===t||"bottom-center"===t?"50%":null}}},loadStyle:j.load},provide:function(){return{$parentInstance:this}}},C={name:"ToastMessage",hostName:"Toast",extends:d.default,emits:["close"],closeTimeout:null,props:{message:{type:null,default:null},templates:{type:Object,default:null},closeIcon:{type:String,default:null},infoIcon:{type:String,default:null},warnIcon:{type:String,default:null},errorIcon:{type:String,default:null},successIcon:{type:String,default:null},closeButtonProps:{type:null,default:null}},mounted:function(){var e=this;this.message.life&&(this.closeTimeout=setTimeout((function(){e.close({message:e.message,type:"life-end"})}),this.message.life))},beforeUnmount:function(){this.clearCloseTimeout()},methods:{close:function(e){this.$emit("close",e)},onCloseClick:function(){this.clearCloseTimeout(),this.close({message:this.message,type:"close"})},clearCloseTimeout:function(){this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null)}},computed:{iconComponent:function(){return{info:!this.infoIcon&&b.default,success:!this.successIcon&&g.default,warn:!this.warnIcon&&v.default,error:!this.errorIcon&&I.default}[this.message.severity]},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},components:{TimesIcon:h.default,InfoCircleIcon:b.default,CheckIcon:g.default,ExclamationTriangleIcon:v.default,TimesCircleIcon:I.default},directives:{ripple:S.default}};function B(e){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B(e)}function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $(e,t,n){return(t=D(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e){var t=q(e,"string");return"symbol"===B(t)?t:String(t)}function q(e,t){if("object"!==B(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==B(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var N=["aria-label"];function U(){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,t){if(e){if("string"==typeof e)return V(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?V(e,t):void 0}}function L(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function G(e){if(Array.isArray(e))return V(e)}function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}C.render=function(e,t,n,o,r,s){var i=m.resolveDirective("ripple");return m.openBlock(),m.createElementBlock("div",m.mergeProps({class:e.cx("container"),role:"alert","aria-live":"assertive","aria-atomic":"true"},e.ptm("container")),[m.createElementVNode("div",m.mergeProps({class:[e.cx("content"),n.message.contentStyleClass]},e.ptm("content")),[n.templates.message?(m.openBlock(),m.createBlock(m.resolveDynamicComponent(n.templates.message),{key:1,message:n.message},null,8,["message"])):(m.openBlock(),m.createElementBlock(m.Fragment,{key:0},[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(n.templates.icon?n.templates.icon:s.iconComponent&&s.iconComponent.name?s.iconComponent:"span"),m.mergeProps({class:e.cx("icon")},e.ptm("icon")),null,16,["class"])),m.createElementVNode("div",m.mergeProps({class:e.cx("text")},e.ptm("text")),[m.createElementVNode("span",m.mergeProps({class:e.cx("summary")},e.ptm("summary")),m.toDisplayString(n.message.summary),17),m.createElementVNode("div",m.mergeProps({class:e.cx("detail")},e.ptm("detail")),m.toDisplayString(n.message.detail),17)],16)],64)),!1!==n.message.closable?(m.openBlock(),m.createElementBlock("div",m.normalizeProps(m.mergeProps({key:2},e.ptm("buttonContainer"))),[m.withDirectives((m.openBlock(),m.createElementBlock("button",m.mergeProps({class:e.cx("closeButton"),type:"button","aria-label":s.closeAriaLabel,onClick:t[0]||(t[0]=function(){return s.onCloseClick&&s.onCloseClick.apply(s,arguments)}),autofocus:""},A(A(A({},n.closeButtonProps),e.ptm("button")),e.ptm("closeButton"))),[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(n.templates.closeicon||"TimesIcon"),m.mergeProps({class:[e.cx("closeIcon"),n.closeIcon]},A(A({},e.ptm("buttonIcon")),e.ptm("closeIcon"))),null,16,["class"]))],16,N)),[[i]])],16)):m.createCommentVNode("",!0)],16)],16)};var R=0,M={name:"Toast",extends:E,inheritAttrs:!1,emits:["close","life-end"],data:function(){return{messages:[]}},styleElement:null,mounted:function(){y.default.on("add",this.onAdd),y.default.on("remove-group",this.onRemoveGroup),y.default.on("remove-all-groups",this.onRemoveAllGroups),this.breakpoints&&this.createStyle()},beforeUnmount:function(){this.destroyStyle(),this.$refs.container&&this.autoZIndex&&n.ZIndexUtils.clear(this.$refs.container),y.default.off("add",this.onAdd),y.default.off("remove-group",this.onRemoveGroup),y.default.off("remove-all-groups",this.onRemoveAllGroups)},methods:{add:function(e){var t;null==e.id&&(e.id=R++),this.messages=[].concat(G(t=this.messages)||L(t)||Z(t)||U(),[e])},remove:function(e){for(var t=-1,n=0;n<this.messages.length;n++)if(this.messages[n]===e.message){t=n;break}this.messages.splice(t,1),this.$emit(e.type,{message:e.message})},onAdd:function(e){this.group==e.group&&this.add(e)},onRemoveGroup:function(e){this.group===e&&(this.messages=[])},onRemoveAllGroups:function(){this.messages=[]},onEnter:function(){this.$refs.container.setAttribute(this.attributeSelector,""),this.autoZIndex&&n.ZIndexUtils.set("modal",this.$refs.container,this.baseZIndex||this.$primevue.config.zIndex.modal)},onLeave:function(){var e=this;this.$refs.container&&this.autoZIndex&&n.ObjectUtils.isEmpty(this.messages)&&setTimeout((function(){n.ZIndexUtils.clear(e.$refs.container)}),200)},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);var e="";for(var t in this.breakpoints){var n="";for(var o in this.breakpoints[t])n+=o+":"+this.breakpoints[t][o]+"!important;";e+="\n @media screen and (max-width: ".concat(t,") {\n .p-toast[").concat(this.attributeSelector,"] {\n ").concat(n,"\n }\n }\n ")}this.styleElement.innerHTML=e}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}},computed:{attributeSelector:function(){return n.UniqueComponentId()}},components:{ToastMessage:C,Portal:f.default}};function z(e){return z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},z(e)}function Y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(n),!0).forEach((function(t){X(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function X(e,t,n){return(t=_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _(e){var t=H(e,"string");return"symbol"===z(t)?t:String(t)}function H(e,t){if("object"!==z(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==z(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}M.render=function(e,t,n,o,r,s){var i=m.resolveComponent("ToastMessage"),a=m.resolveComponent("Portal");return m.openBlock(),m.createBlock(a,null,{default:m.withCtx((function(){return[m.createElementVNode("div",m.mergeProps({ref:"container",class:e.cx("root"),style:e.sx("root",!0,{position:e.position})},F(F({},e.$attrs),e.ptm("root"))),[m.createVNode(m.TransitionGroup,m.mergeProps({name:"p-toast-message",tag:"div",onEnter:s.onEnter,onLeave:s.onLeave},e.ptm("message")),{default:m.withCtx((function(){return[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(r.messages,(function(n){return m.openBlock(),m.createBlock(i,{key:n.id,message:n,templates:e.$slots,closeIcon:e.closeIcon,infoIcon:e.infoIcon,warnIcon:e.warnIcon,errorIcon:e.errorIcon,successIcon:e.successIcon,closeButtonProps:e.closeButtonProps,onClose:t[0]||(t[0]=function(e){return s.remove(e)}),pt:e.pt},null,8,["message","templates","closeIcon","infoIcon","warnIcon","errorIcon","successIcon","closeButtonProps","pt"])})),128))]})),_:1},16,["onEnter","onLeave"])],16)]})),_:1})},module.exports=M;
|
|
1
|
+
"use strict";var e=require("primevue/portal"),t=require("primevue/toasteventbus"),n=require("primevue/utils"),o=require("primevue/basecomponent"),r=require("primevue/usestyle"),s=require("primevue/icons/check"),i=require("primevue/icons/exclamationtriangle"),a=require("primevue/icons/infocircle"),l=require("primevue/icons/times"),c=require("primevue/icons/timescircle"),u=require("primevue/ripple"),m=require("vue");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=p(e),y=p(t),d=p(o),g=p(s),v=p(i),b=p(a),h=p(l),I=p(c),S=p(u);function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function w(e,t,n){return(t=P(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P(e){var t=k(e,"string");return"symbol"===x(t)?t:String(t)}function k(e,t){if("object"!==x(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==x(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var O={root:function(e){var t=e.instance;return["p-toast p-component p-toast-"+e.props.position,{"p-input-filled":"filled"===t.$primevue.config.inputStyle,"p-ripple-disabled":!1===t.$primevue.config.ripple}]},container:function(e){var t=e.props;return["p-toast-message",{"p-toast-message-info":"info"===t.message.severity||void 0===t.message.severity,"p-toast-message-warn":"warn"===t.message.severity,"p-toast-message-error":"error"===t.message.severity,"p-toast-message-success":"success"===t.message.severity}]},content:"p-toast-message-content",icon:function(e){var t,n=e.props;return["p-toast-message-icon",(t={},w(t,n.infoIcon,"info"===n.message.severity),w(t,n.warnIcon,"warn"===n.message.severity),w(t,n.errorIcon,"error"===n.message.severity),w(t,n.successIcon,"success"===n.message.severity),t)]},text:"p-toast-message-text",summary:"p-toast-summary",detail:"p-toast-detail",closeButton:"p-toast-icon-close p-link",closeIcon:"p-toast-icon-close-icon"},j=r.useStyle("\n.p-toast {\n width: 25rem;\n}\n\n.p-toast-message-icon {\n flex-shrink: 0;\n}\n\n.p-toast-message-content {\n display: flex;\n align-items: flex-start;\n}\n\n.p-toast-message-text {\n flex: 1 1 auto;\n}\n\n.p-toast-top-center {\n transform: translateX(-50%);\n}\n\n.p-toast-bottom-center {\n transform: translateX(-50%);\n}\n\n.p-toast-center {\n min-width: 20vw;\n transform: translate(-50%, -50%);\n}\n\n.p-toast-icon-close {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-toast-icon-close.p-link {\n cursor: pointer;\n}\n\n/* Animations */\n.p-toast-message-enter-from {\n opacity: 0;\n -webkit-transform: translateY(50%);\n -ms-transform: translateY(50%);\n transform: translateY(50%);\n}\n\n.p-toast-message-leave-from {\n max-height: 1000px;\n}\n\n.p-toast .p-toast-message.p-toast-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin-bottom: 0;\n overflow: hidden;\n}\n\n.p-toast-message-enter-active {\n -webkit-transition: transform 0.3s, opacity 0.3s;\n transition: transform 0.3s, opacity 0.3s;\n}\n\n.p-toast-message-leave-active {\n -webkit-transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n}\n",{name:"toast",manual:!0}),E={name:"BaseToast",extends:d.default,props:{group:{type:String,default:null},position:{type:String,default:"top-right"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},breakpoints:{type:Object,default:null},closeIcon:{type:String,default:void 0},infoIcon:{type:String,default:void 0},warnIcon:{type:String,default:void 0},errorIcon:{type:String,default:void 0},successIcon:{type:String,default:void 0},closeButtonProps:{type:null,default:null}},css:{classes:O,inlineStyles:{root:function(e){var t=e.position;return{position:"fixed",top:"top-right"===t||"top-left"===t||"top-center"===t?"20px":"center"===t?"50%":null,right:("top-right"===t||"bottom-right"===t)&&"20px",bottom:("bottom-left"===t||"bottom-right"===t||"bottom-center"===t)&&"20px",left:"top-left"===t||"bottom-left"===t?"20px":"center"===t||"top-center"===t||"bottom-center"===t?"50%":null}}},loadStyle:j.load},provide:function(){return{$parentInstance:this}}},C={name:"ToastMessage",hostName:"Toast",extends:d.default,emits:["close"],closeTimeout:null,props:{message:{type:null,default:null},templates:{type:Object,default:null},closeIcon:{type:String,default:null},infoIcon:{type:String,default:null},warnIcon:{type:String,default:null},errorIcon:{type:String,default:null},successIcon:{type:String,default:null},closeButtonProps:{type:null,default:null}},mounted:function(){var e=this;this.message.life&&(this.closeTimeout=setTimeout((function(){e.close({message:e.message,type:"life-end"})}),this.message.life))},beforeUnmount:function(){this.clearCloseTimeout()},methods:{close:function(e){this.$emit("close",e)},onCloseClick:function(){this.clearCloseTimeout(),this.close({message:this.message,type:"close"})},clearCloseTimeout:function(){this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null)}},computed:{iconComponent:function(){return{info:!this.infoIcon&&b.default,success:!this.successIcon&&g.default,warn:!this.warnIcon&&v.default,error:!this.errorIcon&&I.default}[this.message.severity]},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},components:{TimesIcon:h.default,InfoCircleIcon:b.default,CheckIcon:g.default,ExclamationTriangleIcon:v.default,TimesCircleIcon:I.default},directives:{ripple:S.default}};function B(e){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B(e)}function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $(e,t,n){return(t=D(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e){var t=q(e,"string");return"symbol"===B(t)?t:String(t)}function q(e,t){if("object"!==B(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==B(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var N=["aria-label"];function U(){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,t){if(e){if("string"==typeof e)return V(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?V(e,t):void 0}}function L(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function G(e){if(Array.isArray(e))return V(e)}function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}C.render=function(e,t,n,o,r,s){var i=m.resolveDirective("ripple");return m.openBlock(),m.createElementBlock("div",m.mergeProps({class:e.cx("container"),role:"alert","aria-live":"assertive","aria-atomic":"true"},e.ptm("container")),[m.createElementVNode("div",m.mergeProps({class:[e.cx("content"),n.message.contentStyleClass]},e.ptm("content")),[n.templates.message?(m.openBlock(),m.createBlock(m.resolveDynamicComponent(n.templates.message),{key:1,message:n.message},null,8,["message"])):(m.openBlock(),m.createElementBlock(m.Fragment,{key:0},[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(n.templates.icon?n.templates.icon:s.iconComponent&&s.iconComponent.name?s.iconComponent:"span"),m.mergeProps({class:e.cx("icon")},e.ptm("icon")),null,16,["class"])),m.createElementVNode("div",m.mergeProps({class:e.cx("text")},e.ptm("text")),[m.createElementVNode("span",m.mergeProps({class:e.cx("summary")},e.ptm("summary")),m.toDisplayString(n.message.summary),17),m.createElementVNode("div",m.mergeProps({class:e.cx("detail")},e.ptm("detail")),m.toDisplayString(n.message.detail),17)],16)],64)),!1!==n.message.closable?(m.openBlock(),m.createElementBlock("div",m.normalizeProps(m.mergeProps({key:2},e.ptm("buttonContainer"))),[m.withDirectives((m.openBlock(),m.createElementBlock("button",m.mergeProps({class:e.cx("closeButton"),type:"button","aria-label":s.closeAriaLabel,onClick:t[0]||(t[0]=function(){return s.onCloseClick&&s.onCloseClick.apply(s,arguments)}),autofocus:""},A(A(A({},n.closeButtonProps),e.ptm("button")),e.ptm("closeButton"))),[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(n.templates.closeicon||"TimesIcon"),m.mergeProps({class:[e.cx("closeIcon"),n.closeIcon]},A(A({},e.ptm("buttonIcon")),e.ptm("closeIcon"))),null,16,["class"]))],16,N)),[[i]])],16)):m.createCommentVNode("",!0)],16)],16)};var R=0,M={name:"Toast",extends:E,inheritAttrs:!1,emits:["close","life-end"],data:function(){return{messages:[]}},styleElement:null,mounted:function(){y.default.on("add",this.onAdd),y.default.on("remove-group",this.onRemoveGroup),y.default.on("remove-all-groups",this.onRemoveAllGroups),this.breakpoints&&this.createStyle()},beforeUnmount:function(){this.destroyStyle(),this.$refs.container&&this.autoZIndex&&n.ZIndexUtils.clear(this.$refs.container),y.default.off("add",this.onAdd),y.default.off("remove-group",this.onRemoveGroup),y.default.off("remove-all-groups",this.onRemoveAllGroups)},methods:{add:function(e){var t;null==e.id&&(e.id=R++),this.messages=[].concat(G(t=this.messages)||L(t)||Z(t)||U(),[e])},remove:function(e){for(var t=-1,n=0;n<this.messages.length;n++)if(this.messages[n]===e.message){t=n;break}this.messages.splice(t,1),this.$emit(e.type,{message:e.message})},onAdd:function(e){this.group==e.group&&this.add(e)},onRemoveGroup:function(e){this.group===e&&(this.messages=[])},onRemoveAllGroups:function(){this.messages=[]},onEnter:function(){this.$refs.container.setAttribute(this.attributeSelector,""),this.autoZIndex&&n.ZIndexUtils.set("modal",this.$refs.container,this.baseZIndex||this.$primevue.config.zIndex.modal)},onLeave:function(){var e=this;this.$refs.container&&this.autoZIndex&&n.ObjectUtils.isEmpty(this.messages)&&setTimeout((function(){n.ZIndexUtils.clear(e.$refs.container)}),200)},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.styleElement=document.createElement("style"),this.styleElement.type="text/css",n.DomHandler.setAttribute(this.styleElement,"nonce",null===(e=this.$primevue)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce),document.head.appendChild(this.styleElement);var t="";for(var o in this.breakpoints){var r="";for(var s in this.breakpoints[o])r+=s+":"+this.breakpoints[o][s]+"!important;";t+="\n @media screen and (max-width: ".concat(o,") {\n .p-toast[").concat(this.attributeSelector,"] {\n ").concat(r,"\n }\n }\n ")}this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}},computed:{attributeSelector:function(){return n.UniqueComponentId()}},components:{ToastMessage:C,Portal:f.default}};function z(e){return z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},z(e)}function Y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(n),!0).forEach((function(t){H(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function H(e,t,n){return(t=X(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function X(e){var t=_(e,"string");return"symbol"===z(t)?t:String(t)}function _(e,t){if("object"!==z(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==z(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}M.render=function(e,t,n,o,r,s){var i=m.resolveComponent("ToastMessage"),a=m.resolveComponent("Portal");return m.openBlock(),m.createBlock(a,null,{default:m.withCtx((function(){return[m.createElementVNode("div",m.mergeProps({ref:"container",class:e.cx("root"),style:e.sx("root",!0,{position:e.position})},F(F({},e.$attrs),e.ptm("root"))),[m.createVNode(m.TransitionGroup,m.mergeProps({name:"p-toast-message",tag:"div",onEnter:s.onEnter,onLeave:s.onLeave},F(F({},e.ptm("message")),e.ptm("transition"))),{default:m.withCtx((function(){return[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(r.messages,(function(n){return m.openBlock(),m.createBlock(i,{key:n.id,message:n,templates:e.$slots,closeIcon:e.closeIcon,infoIcon:e.infoIcon,warnIcon:e.warnIcon,errorIcon:e.errorIcon,successIcon:e.successIcon,closeButtonProps:e.closeButtonProps,onClose:t[0]||(t[0]=function(e){return s.remove(e)}),pt:e.pt},null,8,["message","templates","closeIcon","infoIcon","warnIcon","errorIcon","successIcon","closeButtonProps","pt"])})),128))]})),_:1},16,["onEnter","onLeave"])],16)]})),_:1})},module.exports=M;
|
package/toast/toast.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Portal from 'primevue/portal';
|
|
2
2
|
import ToastEventBus from 'primevue/toasteventbus';
|
|
3
|
-
import { ZIndexUtils, ObjectUtils, UniqueComponentId } from 'primevue/utils';
|
|
3
|
+
import { ZIndexUtils, ObjectUtils, DomHandler, UniqueComponentId } from 'primevue/utils';
|
|
4
4
|
import BaseComponent from 'primevue/basecomponent';
|
|
5
5
|
import { useStyle } from 'primevue/usestyle';
|
|
6
6
|
import CheckIcon from 'primevue/icons/check';
|
|
@@ -15,7 +15,7 @@ function _typeof$2(obj) { "@babel/helpers - typeof"; return _typeof$2 = "functio
|
|
|
15
15
|
function _defineProperty$2(obj, key, value) { key = _toPropertyKey$2(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
16
16
|
function _toPropertyKey$2(arg) { var key = _toPrimitive$2(arg, "string"); return _typeof$2(key) === "symbol" ? key : String(key); }
|
|
17
17
|
function _toPrimitive$2(input, hint) { if (_typeof$2(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$2(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
18
|
-
var styles = "\n.p-toast {\n width: 25rem;\n}\n\n.p-toast-message-content {\n display: flex;\n align-items: flex-start;\n}\n\n.p-toast-message-text {\n flex: 1 1 auto;\n}\n\n.p-toast-top-center {\n transform: translateX(-50%);\n}\n\n.p-toast-bottom-center {\n transform: translateX(-50%);\n}\n\n.p-toast-center {\n min-width: 20vw;\n transform: translate(-50%, -50%);\n}\n\n.p-toast-icon-close {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-toast-icon-close.p-link {\n cursor: pointer;\n}\n\n/* Animations */\n.p-toast-message-enter-from {\n opacity: 0;\n -webkit-transform: translateY(50%);\n -ms-transform: translateY(50%);\n transform: translateY(50%);\n}\n\n.p-toast-message-leave-from {\n max-height: 1000px;\n}\n\n.p-toast .p-toast-message.p-toast-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin-bottom: 0;\n overflow: hidden;\n}\n\n.p-toast-message-enter-active {\n -webkit-transition: transform 0.3s, opacity 0.3s;\n transition: transform 0.3s, opacity 0.3s;\n}\n\n.p-toast-message-leave-active {\n -webkit-transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n}\n";
|
|
18
|
+
var styles = "\n.p-toast {\n width: 25rem;\n}\n\n.p-toast-message-icon {\n flex-shrink: 0;\n}\n\n.p-toast-message-content {\n display: flex;\n align-items: flex-start;\n}\n\n.p-toast-message-text {\n flex: 1 1 auto;\n}\n\n.p-toast-top-center {\n transform: translateX(-50%);\n}\n\n.p-toast-bottom-center {\n transform: translateX(-50%);\n}\n\n.p-toast-center {\n min-width: 20vw;\n transform: translate(-50%, -50%);\n}\n\n.p-toast-icon-close {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-toast-icon-close.p-link {\n cursor: pointer;\n}\n\n/* Animations */\n.p-toast-message-enter-from {\n opacity: 0;\n -webkit-transform: translateY(50%);\n -ms-transform: translateY(50%);\n transform: translateY(50%);\n}\n\n.p-toast-message-leave-from {\n max-height: 1000px;\n}\n\n.p-toast .p-toast-message.p-toast-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin-bottom: 0;\n overflow: hidden;\n}\n\n.p-toast-message-enter-active {\n -webkit-transition: transform 0.3s, opacity 0.3s;\n transition: transform 0.3s, opacity 0.3s;\n}\n\n.p-toast-message-leave-active {\n -webkit-transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n}\n";
|
|
19
19
|
|
|
20
20
|
// Position
|
|
21
21
|
var inlineStyles = {
|
|
@@ -353,8 +353,10 @@ var script = {
|
|
|
353
353
|
},
|
|
354
354
|
createStyle: function createStyle() {
|
|
355
355
|
if (!this.styleElement && !this.isUnstyled) {
|
|
356
|
+
var _this$$primevue;
|
|
356
357
|
this.styleElement = document.createElement('style');
|
|
357
358
|
this.styleElement.type = 'text/css';
|
|
359
|
+
DomHandler.setAttribute(this.styleElement, 'nonce', (_this$$primevue = this.$primevue) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.config) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.csp) === null || _this$$primevue === void 0 ? void 0 : _this$$primevue.nonce);
|
|
358
360
|
document.head.appendChild(this.styleElement);
|
|
359
361
|
var innerHTML = '';
|
|
360
362
|
for (var breakpoint in this.breakpoints) {
|
|
@@ -407,7 +409,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
407
409
|
tag: "div",
|
|
408
410
|
onEnter: $options.onEnter,
|
|
409
411
|
onLeave: $options.onLeave
|
|
410
|
-
}, _ctx.ptm('message')), {
|
|
412
|
+
}, _objectSpread(_objectSpread({}, _ctx.ptm('message')), _ctx.ptm('transition'))), {
|
|
411
413
|
"default": withCtx(function () {
|
|
412
414
|
return [(openBlock(true), createElementBlock(Fragment, null, renderList($data.messages, function (msg) {
|
|
413
415
|
return openBlock(), createBlock(_component_ToastMessage, {
|
package/toast/toast.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"primevue/portal";import t from"primevue/toasteventbus";import{ZIndexUtils as n,ObjectUtils as o,UniqueComponentId as r}from"primevue/utils";import s from"primevue/basecomponent";import{useStyle as i}from"primevue/usestyle";import a from"primevue/icons/check";import c from"primevue/icons/exclamationtriangle";import l from"primevue/icons/infocircle";import u from"primevue/icons/times";import m from"primevue/icons/timescircle";import p from"primevue/ripple";import{resolveDirective as f,openBlock as y,createElementBlock as g,mergeProps as b,createElementVNode as d,Fragment as v,createBlock as h,resolveDynamicComponent as I,toDisplayString as S,normalizeProps as w,withDirectives as x,createCommentVNode as O,resolveComponent as j,withCtx as P,createVNode as T,TransitionGroup as E,renderList as k}from"vue";function C(e){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(e)}function A(e,t,n){return(t=$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $(e){var t=B(e,"string");return"symbol"===C(t)?t:String(t)}function B(e,t){if("object"!==C(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==C(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var D={root:function(e){var t=e.instance;return["p-toast p-component p-toast-"+e.props.position,{"p-input-filled":"filled"===t.$primevue.config.inputStyle,"p-ripple-disabled":!1===t.$primevue.config.ripple}]},container:function(e){var t=e.props;return["p-toast-message",{"p-toast-message-info":"info"===t.message.severity||void 0===t.message.severity,"p-toast-message-warn":"warn"===t.message.severity,"p-toast-message-error":"error"===t.message.severity,"p-toast-message-success":"success"===t.message.severity}]},content:"p-toast-message-content",icon:function(e){var t,n=e.props;return["p-toast-message-icon",(t={},A(t,n.infoIcon,"info"===n.message.severity),A(t,n.warnIcon,"warn"===n.message.severity),A(t,n.errorIcon,"error"===n.message.severity),A(t,n.successIcon,"success"===n.message.severity),t)]},text:"p-toast-message-text",summary:"p-toast-summary",detail:"p-toast-detail",closeButton:"p-toast-icon-close p-link",closeIcon:"p-toast-icon-close-icon"},L=i("\n.p-toast {\n width: 25rem;\n}\n\n.p-toast-message-content {\n display: flex;\n align-items: flex-start;\n}\n\n.p-toast-message-text {\n flex: 1 1 auto;\n}\n\n.p-toast-top-center {\n transform: translateX(-50%);\n}\n\n.p-toast-bottom-center {\n transform: translateX(-50%);\n}\n\n.p-toast-center {\n min-width: 20vw;\n transform: translate(-50%, -50%);\n}\n\n.p-toast-icon-close {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-toast-icon-close.p-link {\n cursor: pointer;\n}\n\n/* Animations */\n.p-toast-message-enter-from {\n opacity: 0;\n -webkit-transform: translateY(50%);\n -ms-transform: translateY(50%);\n transform: translateY(50%);\n}\n\n.p-toast-message-leave-from {\n max-height: 1000px;\n}\n\n.p-toast .p-toast-message.p-toast-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin-bottom: 0;\n overflow: hidden;\n}\n\n.p-toast-message-enter-active {\n -webkit-transition: transform 0.3s, opacity 0.3s;\n transition: transform 0.3s, opacity 0.3s;\n}\n\n.p-toast-message-leave-active {\n -webkit-transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n}\n",{name:"toast",manual:!0}),G={name:"BaseToast",extends:s,props:{group:{type:String,default:null},position:{type:String,default:"top-right"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},breakpoints:{type:Object,default:null},closeIcon:{type:String,default:void 0},infoIcon:{type:String,default:void 0},warnIcon:{type:String,default:void 0},errorIcon:{type:String,default:void 0},successIcon:{type:String,default:void 0},closeButtonProps:{type:null,default:null}},css:{classes:D,inlineStyles:{root:function(e){var t=e.position;return{position:"fixed",top:"top-right"===t||"top-left"===t||"top-center"===t?"20px":"center"===t?"50%":null,right:("top-right"===t||"bottom-right"===t)&&"20px",bottom:("bottom-left"===t||"bottom-right"===t||"bottom-center"===t)&&"20px",left:"top-left"===t||"bottom-left"===t?"20px":"center"===t||"top-center"===t||"bottom-center"===t?"50%":null}}},loadStyle:L.load},provide:function(){return{$parentInstance:this}}},R={name:"ToastMessage",hostName:"Toast",extends:s,emits:["close"],closeTimeout:null,props:{message:{type:null,default:null},templates:{type:Object,default:null},closeIcon:{type:String,default:null},infoIcon:{type:String,default:null},warnIcon:{type:String,default:null},errorIcon:{type:String,default:null},successIcon:{type:String,default:null},closeButtonProps:{type:null,default:null}},mounted:function(){var e=this;this.message.life&&(this.closeTimeout=setTimeout((function(){e.close({message:e.message,type:"life-end"})}),this.message.life))},beforeUnmount:function(){this.clearCloseTimeout()},methods:{close:function(e){this.$emit("close",e)},onCloseClick:function(){this.clearCloseTimeout(),this.close({message:this.message,type:"close"})},clearCloseTimeout:function(){this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null)}},computed:{iconComponent:function(){return{info:!this.infoIcon&&l,success:!this.successIcon&&a,warn:!this.warnIcon&&c,error:!this.errorIcon&&m}[this.message.severity]},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},components:{TimesIcon:u,InfoCircleIcon:l,CheckIcon:a,ExclamationTriangleIcon:c,TimesCircleIcon:m},directives:{ripple:p}};function Z(e){return Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Z(e)}function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){U(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function U(e,t,n){return(t=z(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z(e){var t=Y(e,"string");return"symbol"===Z(t)?t:String(t)}function Y(e,t){if("object"!==Z(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==Z(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var X=["aria-label"];function _(){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 H(e,t){if(e){if("string"==typeof e)return J(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?J(e,t):void 0}}function q(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function F(e){if(Array.isArray(e))return J(e)}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}R.render=function(e,t,n,o,r,s){var i=f("ripple");return y(),g("div",b({class:e.cx("container"),role:"alert","aria-live":"assertive","aria-atomic":"true"},e.ptm("container")),[d("div",b({class:[e.cx("content"),n.message.contentStyleClass]},e.ptm("content")),[n.templates.message?(y(),h(I(n.templates.message),{key:1,message:n.message},null,8,["message"])):(y(),g(v,{key:0},[(y(),h(I(n.templates.icon?n.templates.icon:s.iconComponent&&s.iconComponent.name?s.iconComponent:"span"),b({class:e.cx("icon")},e.ptm("icon")),null,16,["class"])),d("div",b({class:e.cx("text")},e.ptm("text")),[d("span",b({class:e.cx("summary")},e.ptm("summary")),S(n.message.summary),17),d("div",b({class:e.cx("detail")},e.ptm("detail")),S(n.message.detail),17)],16)],64)),!1!==n.message.closable?(y(),g("div",w(b({key:2},e.ptm("buttonContainer"))),[x((y(),g("button",b({class:e.cx("closeButton"),type:"button","aria-label":s.closeAriaLabel,onClick:t[0]||(t[0]=function(){return s.onCloseClick&&s.onCloseClick.apply(s,arguments)}),autofocus:""},N(N(N({},n.closeButtonProps),e.ptm("button")),e.ptm("closeButton"))),[(y(),h(I(n.templates.closeicon||"TimesIcon"),b({class:[e.cx("closeIcon"),n.closeIcon]},N(N({},e.ptm("buttonIcon")),e.ptm("closeIcon"))),null,16,["class"]))],16,X)),[[i]])],16)):O("",!0)],16)],16)};var K=0,Q={name:"Toast",extends:G,inheritAttrs:!1,emits:["close","life-end"],data:function(){return{messages:[]}},styleElement:null,mounted:function(){t.on("add",this.onAdd),t.on("remove-group",this.onRemoveGroup),t.on("remove-all-groups",this.onRemoveAllGroups),this.breakpoints&&this.createStyle()},beforeUnmount:function(){this.destroyStyle(),this.$refs.container&&this.autoZIndex&&n.clear(this.$refs.container),t.off("add",this.onAdd),t.off("remove-group",this.onRemoveGroup),t.off("remove-all-groups",this.onRemoveAllGroups)},methods:{add:function(e){var t;null==e.id&&(e.id=K++),this.messages=[].concat(F(t=this.messages)||q(t)||H(t)||_(),[e])},remove:function(e){for(var t=-1,n=0;n<this.messages.length;n++)if(this.messages[n]===e.message){t=n;break}this.messages.splice(t,1),this.$emit(e.type,{message:e.message})},onAdd:function(e){this.group==e.group&&this.add(e)},onRemoveGroup:function(e){this.group===e&&(this.messages=[])},onRemoveAllGroups:function(){this.messages=[]},onEnter:function(){this.$refs.container.setAttribute(this.attributeSelector,""),this.autoZIndex&&n.set("modal",this.$refs.container,this.baseZIndex||this.$primevue.config.zIndex.modal)},onLeave:function(){var e=this;this.$refs.container&&this.autoZIndex&&o.isEmpty(this.messages)&&setTimeout((function(){n.clear(e.$refs.container)}),200)},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);var e="";for(var t in this.breakpoints){var n="";for(var o in this.breakpoints[t])n+=o+":"+this.breakpoints[t][o]+"!important;";e+="\n @media screen and (max-width: ".concat(t,") {\n .p-toast[").concat(this.attributeSelector,"] {\n ").concat(n,"\n }\n }\n ")}this.styleElement.innerHTML=e}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}},computed:{attributeSelector:function(){return r()}},components:{ToastMessage:R,Portal:e}};function V(e){return V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},V(e)}function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W(Object(n),!0).forEach((function(t){te(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function te(e,t,n){return(t=ne(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ne(e){var t=oe(e,"string");return"symbol"===V(t)?t:String(t)}function oe(e,t){if("object"!==V(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==V(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Q.render=function(e,t,n,o,r,s){var i=j("ToastMessage"),a=j("Portal");return y(),h(a,null,{default:P((function(){return[d("div",b({ref:"container",class:e.cx("root"),style:e.sx("root",!0,{position:e.position})},ee(ee({},e.$attrs),e.ptm("root"))),[T(E,b({name:"p-toast-message",tag:"div",onEnter:s.onEnter,onLeave:s.onLeave},e.ptm("message")),{default:P((function(){return[(y(!0),g(v,null,k(r.messages,(function(n){return y(),h(i,{key:n.id,message:n,templates:e.$slots,closeIcon:e.closeIcon,infoIcon:e.infoIcon,warnIcon:e.warnIcon,errorIcon:e.errorIcon,successIcon:e.successIcon,closeButtonProps:e.closeButtonProps,onClose:t[0]||(t[0]=function(e){return s.remove(e)}),pt:e.pt},null,8,["message","templates","closeIcon","infoIcon","warnIcon","errorIcon","successIcon","closeButtonProps","pt"])})),128))]})),_:1},16,["onEnter","onLeave"])],16)]})),_:1})};export{Q as default};
|
|
1
|
+
import e from"primevue/portal";import t from"primevue/toasteventbus";import{ZIndexUtils as n,ObjectUtils as o,DomHandler as r,UniqueComponentId as s}from"primevue/utils";import i from"primevue/basecomponent";import{useStyle as a}from"primevue/usestyle";import c from"primevue/icons/check";import l from"primevue/icons/exclamationtriangle";import u from"primevue/icons/infocircle";import m from"primevue/icons/times";import p from"primevue/icons/timescircle";import f from"primevue/ripple";import{resolveDirective as y,openBlock as g,createElementBlock as d,mergeProps as v,createElementVNode as b,Fragment as h,createBlock as I,resolveDynamicComponent as S,toDisplayString as x,normalizeProps as w,withDirectives as O,createCommentVNode as j,resolveComponent as P,withCtx as T,createVNode as E,TransitionGroup as k,renderList as C}from"vue";function A(e){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A(e)}function $(e,t,n){return(t=B(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B(e){var t=D(e,"string");return"symbol"===A(t)?t:String(t)}function D(e,t){if("object"!==A(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==A(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var L={root:function(e){var t=e.instance;return["p-toast p-component p-toast-"+e.props.position,{"p-input-filled":"filled"===t.$primevue.config.inputStyle,"p-ripple-disabled":!1===t.$primevue.config.ripple}]},container:function(e){var t=e.props;return["p-toast-message",{"p-toast-message-info":"info"===t.message.severity||void 0===t.message.severity,"p-toast-message-warn":"warn"===t.message.severity,"p-toast-message-error":"error"===t.message.severity,"p-toast-message-success":"success"===t.message.severity}]},content:"p-toast-message-content",icon:function(e){var t,n=e.props;return["p-toast-message-icon",(t={},$(t,n.infoIcon,"info"===n.message.severity),$(t,n.warnIcon,"warn"===n.message.severity),$(t,n.errorIcon,"error"===n.message.severity),$(t,n.successIcon,"success"===n.message.severity),t)]},text:"p-toast-message-text",summary:"p-toast-summary",detail:"p-toast-detail",closeButton:"p-toast-icon-close p-link",closeIcon:"p-toast-icon-close-icon"},G=a("\n.p-toast {\n width: 25rem;\n}\n\n.p-toast-message-icon {\n flex-shrink: 0;\n}\n\n.p-toast-message-content {\n display: flex;\n align-items: flex-start;\n}\n\n.p-toast-message-text {\n flex: 1 1 auto;\n}\n\n.p-toast-top-center {\n transform: translateX(-50%);\n}\n\n.p-toast-bottom-center {\n transform: translateX(-50%);\n}\n\n.p-toast-center {\n min-width: 20vw;\n transform: translate(-50%, -50%);\n}\n\n.p-toast-icon-close {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-toast-icon-close.p-link {\n cursor: pointer;\n}\n\n/* Animations */\n.p-toast-message-enter-from {\n opacity: 0;\n -webkit-transform: translateY(50%);\n -ms-transform: translateY(50%);\n transform: translateY(50%);\n}\n\n.p-toast-message-leave-from {\n max-height: 1000px;\n}\n\n.p-toast .p-toast-message.p-toast-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin-bottom: 0;\n overflow: hidden;\n}\n\n.p-toast-message-enter-active {\n -webkit-transition: transform 0.3s, opacity 0.3s;\n transition: transform 0.3s, opacity 0.3s;\n}\n\n.p-toast-message-leave-active {\n -webkit-transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n}\n",{name:"toast",manual:!0}),R={name:"BaseToast",extends:i,props:{group:{type:String,default:null},position:{type:String,default:"top-right"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},breakpoints:{type:Object,default:null},closeIcon:{type:String,default:void 0},infoIcon:{type:String,default:void 0},warnIcon:{type:String,default:void 0},errorIcon:{type:String,default:void 0},successIcon:{type:String,default:void 0},closeButtonProps:{type:null,default:null}},css:{classes:L,inlineStyles:{root:function(e){var t=e.position;return{position:"fixed",top:"top-right"===t||"top-left"===t||"top-center"===t?"20px":"center"===t?"50%":null,right:("top-right"===t||"bottom-right"===t)&&"20px",bottom:("bottom-left"===t||"bottom-right"===t||"bottom-center"===t)&&"20px",left:"top-left"===t||"bottom-left"===t?"20px":"center"===t||"top-center"===t||"bottom-center"===t?"50%":null}}},loadStyle:G.load},provide:function(){return{$parentInstance:this}}},Z={name:"ToastMessage",hostName:"Toast",extends:i,emits:["close"],closeTimeout:null,props:{message:{type:null,default:null},templates:{type:Object,default:null},closeIcon:{type:String,default:null},infoIcon:{type:String,default:null},warnIcon:{type:String,default:null},errorIcon:{type:String,default:null},successIcon:{type:String,default:null},closeButtonProps:{type:null,default:null}},mounted:function(){var e=this;this.message.life&&(this.closeTimeout=setTimeout((function(){e.close({message:e.message,type:"life-end"})}),this.message.life))},beforeUnmount:function(){this.clearCloseTimeout()},methods:{close:function(e){this.$emit("close",e)},onCloseClick:function(){this.clearCloseTimeout(),this.close({message:this.message,type:"close"})},clearCloseTimeout:function(){this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null)}},computed:{iconComponent:function(){return{info:!this.infoIcon&&u,success:!this.successIcon&&c,warn:!this.warnIcon&&l,error:!this.errorIcon&&p}[this.message.severity]},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},components:{TimesIcon:m,InfoCircleIcon:u,CheckIcon:c,ExclamationTriangleIcon:l,TimesCircleIcon:p},directives:{ripple:f}};function M(e){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M(e)}function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){z(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function z(e,t,n){return(t=Y(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Y(e){var t=X(e,"string");return"symbol"===M(t)?t:String(t)}function X(e,t){if("object"!==M(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==M(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var _=["aria-label"];function H(){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 q(e,t){if(e){if("string"==typeof e)return K(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?K(e,t):void 0}}function F(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function J(e){if(Array.isArray(e))return K(e)}function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}Z.render=function(e,t,n,o,r,s){var i=y("ripple");return g(),d("div",v({class:e.cx("container"),role:"alert","aria-live":"assertive","aria-atomic":"true"},e.ptm("container")),[b("div",v({class:[e.cx("content"),n.message.contentStyleClass]},e.ptm("content")),[n.templates.message?(g(),I(S(n.templates.message),{key:1,message:n.message},null,8,["message"])):(g(),d(h,{key:0},[(g(),I(S(n.templates.icon?n.templates.icon:s.iconComponent&&s.iconComponent.name?s.iconComponent:"span"),v({class:e.cx("icon")},e.ptm("icon")),null,16,["class"])),b("div",v({class:e.cx("text")},e.ptm("text")),[b("span",v({class:e.cx("summary")},e.ptm("summary")),x(n.message.summary),17),b("div",v({class:e.cx("detail")},e.ptm("detail")),x(n.message.detail),17)],16)],64)),!1!==n.message.closable?(g(),d("div",w(v({key:2},e.ptm("buttonContainer"))),[O((g(),d("button",v({class:e.cx("closeButton"),type:"button","aria-label":s.closeAriaLabel,onClick:t[0]||(t[0]=function(){return s.onCloseClick&&s.onCloseClick.apply(s,arguments)}),autofocus:""},U(U(U({},n.closeButtonProps),e.ptm("button")),e.ptm("closeButton"))),[(g(),I(S(n.templates.closeicon||"TimesIcon"),v({class:[e.cx("closeIcon"),n.closeIcon]},U(U({},e.ptm("buttonIcon")),e.ptm("closeIcon"))),null,16,["class"]))],16,_)),[[i]])],16)):j("",!0)],16)],16)};var Q=0,V={name:"Toast",extends:R,inheritAttrs:!1,emits:["close","life-end"],data:function(){return{messages:[]}},styleElement:null,mounted:function(){t.on("add",this.onAdd),t.on("remove-group",this.onRemoveGroup),t.on("remove-all-groups",this.onRemoveAllGroups),this.breakpoints&&this.createStyle()},beforeUnmount:function(){this.destroyStyle(),this.$refs.container&&this.autoZIndex&&n.clear(this.$refs.container),t.off("add",this.onAdd),t.off("remove-group",this.onRemoveGroup),t.off("remove-all-groups",this.onRemoveAllGroups)},methods:{add:function(e){var t;null==e.id&&(e.id=Q++),this.messages=[].concat(J(t=this.messages)||F(t)||q(t)||H(),[e])},remove:function(e){for(var t=-1,n=0;n<this.messages.length;n++)if(this.messages[n]===e.message){t=n;break}this.messages.splice(t,1),this.$emit(e.type,{message:e.message})},onAdd:function(e){this.group==e.group&&this.add(e)},onRemoveGroup:function(e){this.group===e&&(this.messages=[])},onRemoveAllGroups:function(){this.messages=[]},onEnter:function(){this.$refs.container.setAttribute(this.attributeSelector,""),this.autoZIndex&&n.set("modal",this.$refs.container,this.baseZIndex||this.$primevue.config.zIndex.modal)},onLeave:function(){var e=this;this.$refs.container&&this.autoZIndex&&o.isEmpty(this.messages)&&setTimeout((function(){n.clear(e.$refs.container)}),200)},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.styleElement=document.createElement("style"),this.styleElement.type="text/css",r.setAttribute(this.styleElement,"nonce",null===(e=this.$primevue)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce),document.head.appendChild(this.styleElement);var t="";for(var n in this.breakpoints){var o="";for(var s in this.breakpoints[n])o+=s+":"+this.breakpoints[n][s]+"!important;";t+="\n @media screen and (max-width: ".concat(n,") {\n .p-toast[").concat(this.attributeSelector,"] {\n ").concat(o,"\n }\n }\n ")}this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}},computed:{attributeSelector:function(){return s()}},components:{ToastMessage:Z,Portal:e}};function W(e){return W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},W(e)}function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(n),!0).forEach((function(t){ne(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ne(e,t,n){return(t=oe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oe(e){var t=re(e,"string");return"symbol"===W(t)?t:String(t)}function re(e,t){if("object"!==W(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==W(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}V.render=function(e,t,n,o,r,s){var i=P("ToastMessage"),a=P("Portal");return g(),I(a,null,{default:T((function(){return[b("div",v({ref:"container",class:e.cx("root"),style:e.sx("root",!0,{position:e.position})},te(te({},e.$attrs),e.ptm("root"))),[E(k,v({name:"p-toast-message",tag:"div",onEnter:s.onEnter,onLeave:s.onLeave},te(te({},e.ptm("message")),e.ptm("transition"))),{default:T((function(){return[(g(!0),d(h,null,C(r.messages,(function(n){return g(),I(i,{key:n.id,message:n,templates:e.$slots,closeIcon:e.closeIcon,infoIcon:e.infoIcon,warnIcon:e.warnIcon,errorIcon:e.errorIcon,successIcon:e.successIcon,closeButtonProps:e.closeButtonProps,onClose:t[0]||(t[0]=function(e){return s.remove(e)}),pt:e.pt},null,8,["message","templates","closeIcon","infoIcon","warnIcon","errorIcon","successIcon","closeButtonProps","pt"])})),128))]})),_:1},16,["onEnter","onLeave"])],16)]})),_:1})};export{V as default};
|
package/toast/toast.js
CHANGED
|
@@ -18,7 +18,7 @@ this.primevue.toast = (function (Portal, ToastEventBus, utils, BaseComponent, us
|
|
|
18
18
|
function _defineProperty$2(obj, key, value) { key = _toPropertyKey$2(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19
19
|
function _toPropertyKey$2(arg) { var key = _toPrimitive$2(arg, "string"); return _typeof$2(key) === "symbol" ? key : String(key); }
|
|
20
20
|
function _toPrimitive$2(input, hint) { if (_typeof$2(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$2(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
21
|
-
var styles = "\n.p-toast {\n width: 25rem;\n}\n\n.p-toast-message-content {\n display: flex;\n align-items: flex-start;\n}\n\n.p-toast-message-text {\n flex: 1 1 auto;\n}\n\n.p-toast-top-center {\n transform: translateX(-50%);\n}\n\n.p-toast-bottom-center {\n transform: translateX(-50%);\n}\n\n.p-toast-center {\n min-width: 20vw;\n transform: translate(-50%, -50%);\n}\n\n.p-toast-icon-close {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-toast-icon-close.p-link {\n cursor: pointer;\n}\n\n/* Animations */\n.p-toast-message-enter-from {\n opacity: 0;\n -webkit-transform: translateY(50%);\n -ms-transform: translateY(50%);\n transform: translateY(50%);\n}\n\n.p-toast-message-leave-from {\n max-height: 1000px;\n}\n\n.p-toast .p-toast-message.p-toast-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin-bottom: 0;\n overflow: hidden;\n}\n\n.p-toast-message-enter-active {\n -webkit-transition: transform 0.3s, opacity 0.3s;\n transition: transform 0.3s, opacity 0.3s;\n}\n\n.p-toast-message-leave-active {\n -webkit-transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n}\n";
|
|
21
|
+
var styles = "\n.p-toast {\n width: 25rem;\n}\n\n.p-toast-message-icon {\n flex-shrink: 0;\n}\n\n.p-toast-message-content {\n display: flex;\n align-items: flex-start;\n}\n\n.p-toast-message-text {\n flex: 1 1 auto;\n}\n\n.p-toast-top-center {\n transform: translateX(-50%);\n}\n\n.p-toast-bottom-center {\n transform: translateX(-50%);\n}\n\n.p-toast-center {\n min-width: 20vw;\n transform: translate(-50%, -50%);\n}\n\n.p-toast-icon-close {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-toast-icon-close.p-link {\n cursor: pointer;\n}\n\n/* Animations */\n.p-toast-message-enter-from {\n opacity: 0;\n -webkit-transform: translateY(50%);\n -ms-transform: translateY(50%);\n transform: translateY(50%);\n}\n\n.p-toast-message-leave-from {\n max-height: 1000px;\n}\n\n.p-toast .p-toast-message.p-toast-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin-bottom: 0;\n overflow: hidden;\n}\n\n.p-toast-message-enter-active {\n -webkit-transition: transform 0.3s, opacity 0.3s;\n transition: transform 0.3s, opacity 0.3s;\n}\n\n.p-toast-message-leave-active {\n -webkit-transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n}\n";
|
|
22
22
|
|
|
23
23
|
// Position
|
|
24
24
|
var inlineStyles = {
|
|
@@ -356,8 +356,10 @@ this.primevue.toast = (function (Portal, ToastEventBus, utils, BaseComponent, us
|
|
|
356
356
|
},
|
|
357
357
|
createStyle: function createStyle() {
|
|
358
358
|
if (!this.styleElement && !this.isUnstyled) {
|
|
359
|
+
var _this$$primevue;
|
|
359
360
|
this.styleElement = document.createElement('style');
|
|
360
361
|
this.styleElement.type = 'text/css';
|
|
362
|
+
utils.DomHandler.setAttribute(this.styleElement, 'nonce', (_this$$primevue = this.$primevue) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.config) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.csp) === null || _this$$primevue === void 0 ? void 0 : _this$$primevue.nonce);
|
|
361
363
|
document.head.appendChild(this.styleElement);
|
|
362
364
|
var innerHTML = '';
|
|
363
365
|
for (var breakpoint in this.breakpoints) {
|
|
@@ -410,7 +412,7 @@ this.primevue.toast = (function (Portal, ToastEventBus, utils, BaseComponent, us
|
|
|
410
412
|
tag: "div",
|
|
411
413
|
onEnter: $options.onEnter,
|
|
412
414
|
onLeave: $options.onLeave
|
|
413
|
-
}, _ctx.ptm('message')), {
|
|
415
|
+
}, _objectSpread(_objectSpread({}, _ctx.ptm('message')), _ctx.ptm('transition'))), {
|
|
414
416
|
"default": vue.withCtx(function () {
|
|
415
417
|
return [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($data.messages, function (msg) {
|
|
416
418
|
return vue.openBlock(), vue.createBlock(_component_ToastMessage, {
|
package/toast/toast.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.toast=function(e,t,n,o,r,s,i,a,l,c,u,m){"use strict";function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=p(e),y=p(t),d=p(o),g=p(s),v=p(i),b=p(a),h=p(l),I=p(c),S=p(u);function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function w(e,t,n){return(t=P(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P(e){var t=k(e,"string");return"symbol"===x(t)?t:String(t)}function k(e,t){if("object"!==x(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==x(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var O={root:function(e){var t=e.instance;return["p-toast p-component p-toast-"+e.props.position,{"p-input-filled":"filled"===t.$primevue.config.inputStyle,"p-ripple-disabled":!1===t.$primevue.config.ripple}]},container:function(e){var t=e.props;return["p-toast-message",{"p-toast-message-info":"info"===t.message.severity||void 0===t.message.severity,"p-toast-message-warn":"warn"===t.message.severity,"p-toast-message-error":"error"===t.message.severity,"p-toast-message-success":"success"===t.message.severity}]},content:"p-toast-message-content",icon:function(e){var t,n=e.props;return["p-toast-message-icon",(t={},w(t,n.infoIcon,"info"===n.message.severity),w(t,n.warnIcon,"warn"===n.message.severity),w(t,n.errorIcon,"error"===n.message.severity),w(t,n.successIcon,"success"===n.message.severity),t)]},text:"p-toast-message-text",summary:"p-toast-summary",detail:"p-toast-detail",closeButton:"p-toast-icon-close p-link",closeIcon:"p-toast-icon-close-icon"},j=r.useStyle("\n.p-toast {\n width: 25rem;\n}\n\n.p-toast-message-content {\n display: flex;\n align-items: flex-start;\n}\n\n.p-toast-message-text {\n flex: 1 1 auto;\n}\n\n.p-toast-top-center {\n transform: translateX(-50%);\n}\n\n.p-toast-bottom-center {\n transform: translateX(-50%);\n}\n\n.p-toast-center {\n min-width: 20vw;\n transform: translate(-50%, -50%);\n}\n\n.p-toast-icon-close {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-toast-icon-close.p-link {\n cursor: pointer;\n}\n\n/* Animations */\n.p-toast-message-enter-from {\n opacity: 0;\n -webkit-transform: translateY(50%);\n -ms-transform: translateY(50%);\n transform: translateY(50%);\n}\n\n.p-toast-message-leave-from {\n max-height: 1000px;\n}\n\n.p-toast .p-toast-message.p-toast-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin-bottom: 0;\n overflow: hidden;\n}\n\n.p-toast-message-enter-active {\n -webkit-transition: transform 0.3s, opacity 0.3s;\n transition: transform 0.3s, opacity 0.3s;\n}\n\n.p-toast-message-leave-active {\n -webkit-transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n}\n",{name:"toast",manual:!0}),E={name:"BaseToast",extends:d.default,props:{group:{type:String,default:null},position:{type:String,default:"top-right"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},breakpoints:{type:Object,default:null},closeIcon:{type:String,default:void 0},infoIcon:{type:String,default:void 0},warnIcon:{type:String,default:void 0},errorIcon:{type:String,default:void 0},successIcon:{type:String,default:void 0},closeButtonProps:{type:null,default:null}},css:{classes:O,inlineStyles:{root:function(e){var t=e.position;return{position:"fixed",top:"top-right"===t||"top-left"===t||"top-center"===t?"20px":"center"===t?"50%":null,right:("top-right"===t||"bottom-right"===t)&&"20px",bottom:("bottom-left"===t||"bottom-right"===t||"bottom-center"===t)&&"20px",left:"top-left"===t||"bottom-left"===t?"20px":"center"===t||"top-center"===t||"bottom-center"===t?"50%":null}}},loadStyle:j.load},provide:function(){return{$parentInstance:this}}},C={name:"ToastMessage",hostName:"Toast",extends:d.default,emits:["close"],closeTimeout:null,props:{message:{type:null,default:null},templates:{type:Object,default:null},closeIcon:{type:String,default:null},infoIcon:{type:String,default:null},warnIcon:{type:String,default:null},errorIcon:{type:String,default:null},successIcon:{type:String,default:null},closeButtonProps:{type:null,default:null}},mounted:function(){var e=this;this.message.life&&(this.closeTimeout=setTimeout((function(){e.close({message:e.message,type:"life-end"})}),this.message.life))},beforeUnmount:function(){this.clearCloseTimeout()},methods:{close:function(e){this.$emit("close",e)},onCloseClick:function(){this.clearCloseTimeout(),this.close({message:this.message,type:"close"})},clearCloseTimeout:function(){this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null)}},computed:{iconComponent:function(){return{info:!this.infoIcon&&b.default,success:!this.successIcon&&g.default,warn:!this.warnIcon&&v.default,error:!this.errorIcon&&I.default}[this.message.severity]},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},components:{TimesIcon:h.default,InfoCircleIcon:b.default,CheckIcon:g.default,ExclamationTriangleIcon:v.default,TimesCircleIcon:I.default},directives:{ripple:S.default}};function B(e){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B(e)}function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $(e,t,n){return(t=D(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e){var t=N(e,"string");return"symbol"===B(t)?t:String(t)}function N(e,t){if("object"!==B(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==B(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var U=["aria-label"];function Z(){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 L(e,t){if(e){if("string"==typeof e)return R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(e,t):void 0}}function V(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function G(e){if(Array.isArray(e))return R(e)}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}C.render=function(e,t,n,o,r,s){var i=m.resolveDirective("ripple");return m.openBlock(),m.createElementBlock("div",m.mergeProps({class:e.cx("container"),role:"alert","aria-live":"assertive","aria-atomic":"true"},e.ptm("container")),[m.createElementVNode("div",m.mergeProps({class:[e.cx("content"),n.message.contentStyleClass]},e.ptm("content")),[n.templates.message?(m.openBlock(),m.createBlock(m.resolveDynamicComponent(n.templates.message),{key:1,message:n.message},null,8,["message"])):(m.openBlock(),m.createElementBlock(m.Fragment,{key:0},[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(n.templates.icon?n.templates.icon:s.iconComponent&&s.iconComponent.name?s.iconComponent:"span"),m.mergeProps({class:e.cx("icon")},e.ptm("icon")),null,16,["class"])),m.createElementVNode("div",m.mergeProps({class:e.cx("text")},e.ptm("text")),[m.createElementVNode("span",m.mergeProps({class:e.cx("summary")},e.ptm("summary")),m.toDisplayString(n.message.summary),17),m.createElementVNode("div",m.mergeProps({class:e.cx("detail")},e.ptm("detail")),m.toDisplayString(n.message.detail),17)],16)],64)),!1!==n.message.closable?(m.openBlock(),m.createElementBlock("div",m.normalizeProps(m.mergeProps({key:2},e.ptm("buttonContainer"))),[m.withDirectives((m.openBlock(),m.createElementBlock("button",m.mergeProps({class:e.cx("closeButton"),type:"button","aria-label":s.closeAriaLabel,onClick:t[0]||(t[0]=function(){return s.onCloseClick&&s.onCloseClick.apply(s,arguments)}),autofocus:""},A(A(A({},n.closeButtonProps),e.ptm("button")),e.ptm("closeButton"))),[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(n.templates.closeicon||"TimesIcon"),m.mergeProps({class:[e.cx("closeIcon"),n.closeIcon]},A(A({},e.ptm("buttonIcon")),e.ptm("closeIcon"))),null,16,["class"]))],16,U)),[[i]])],16)):m.createCommentVNode("",!0)],16)],16)};var M=0,z={name:"Toast",extends:E,inheritAttrs:!1,emits:["close","life-end"],data:function(){return{messages:[]}},styleElement:null,mounted:function(){y.default.on("add",this.onAdd),y.default.on("remove-group",this.onRemoveGroup),y.default.on("remove-all-groups",this.onRemoveAllGroups),this.breakpoints&&this.createStyle()},beforeUnmount:function(){this.destroyStyle(),this.$refs.container&&this.autoZIndex&&n.ZIndexUtils.clear(this.$refs.container),y.default.off("add",this.onAdd),y.default.off("remove-group",this.onRemoveGroup),y.default.off("remove-all-groups",this.onRemoveAllGroups)},methods:{add:function(e){var t;null==e.id&&(e.id=M++),this.messages=[].concat(G(t=this.messages)||V(t)||L(t)||Z(),[e])},remove:function(e){for(var t=-1,n=0;n<this.messages.length;n++)if(this.messages[n]===e.message){t=n;break}this.messages.splice(t,1),this.$emit(e.type,{message:e.message})},onAdd:function(e){this.group==e.group&&this.add(e)},onRemoveGroup:function(e){this.group===e&&(this.messages=[])},onRemoveAllGroups:function(){this.messages=[]},onEnter:function(){this.$refs.container.setAttribute(this.attributeSelector,""),this.autoZIndex&&n.ZIndexUtils.set("modal",this.$refs.container,this.baseZIndex||this.$primevue.config.zIndex.modal)},onLeave:function(){var e=this;this.$refs.container&&this.autoZIndex&&n.ObjectUtils.isEmpty(this.messages)&&setTimeout((function(){n.ZIndexUtils.clear(e.$refs.container)}),200)},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);var e="";for(var t in this.breakpoints){var n="";for(var o in this.breakpoints[t])n+=o+":"+this.breakpoints[t][o]+"!important;";e+="\n @media screen and (max-width: ".concat(t,") {\n .p-toast[").concat(this.attributeSelector,"] {\n ").concat(n,"\n }\n }\n ")}this.styleElement.innerHTML=e}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}},computed:{attributeSelector:function(){return n.UniqueComponentId()}},components:{ToastMessage:C,Portal:f.default}};function Y(e){return Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Y(e)}function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _(e,t,n){return(t=q(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q(e){var t=H(e,"string");return"symbol"===Y(t)?t:String(t)}function H(e,t){if("object"!==Y(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==Y(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}return z.render=function(e,t,n,o,r,s){var i=m.resolveComponent("ToastMessage"),a=m.resolveComponent("Portal");return m.openBlock(),m.createBlock(a,null,{default:m.withCtx((function(){return[m.createElementVNode("div",m.mergeProps({ref:"container",class:e.cx("root"),style:e.sx("root",!0,{position:e.position})},X(X({},e.$attrs),e.ptm("root"))),[m.createVNode(m.TransitionGroup,m.mergeProps({name:"p-toast-message",tag:"div",onEnter:s.onEnter,onLeave:s.onLeave},e.ptm("message")),{default:m.withCtx((function(){return[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(r.messages,(function(n){return m.openBlock(),m.createBlock(i,{key:n.id,message:n,templates:e.$slots,closeIcon:e.closeIcon,infoIcon:e.infoIcon,warnIcon:e.warnIcon,errorIcon:e.errorIcon,successIcon:e.successIcon,closeButtonProps:e.closeButtonProps,onClose:t[0]||(t[0]=function(e){return s.remove(e)}),pt:e.pt},null,8,["message","templates","closeIcon","infoIcon","warnIcon","errorIcon","successIcon","closeButtonProps","pt"])})),128))]})),_:1},16,["onEnter","onLeave"])],16)]})),_:1})},z}(primevue.portal,primevue.toasteventbus,primevue.utils,primevue.basecomponent,primevue.usestyle,primevue.icons.check,primevue.icons.exclamationtriangle,primevue.icons.infocircle,primevue.icons.times,primevue.icons.timescircle,primevue.ripple,Vue);
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.toast=function(e,t,n,o,r,s,i,a,l,c,u,m){"use strict";function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=p(e),y=p(t),d=p(o),g=p(s),v=p(i),b=p(a),h=p(l),I=p(c),S=p(u);function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function w(e,t,n){return(t=P(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P(e){var t=k(e,"string");return"symbol"===x(t)?t:String(t)}function k(e,t){if("object"!==x(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==x(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var O={root:function(e){var t=e.instance;return["p-toast p-component p-toast-"+e.props.position,{"p-input-filled":"filled"===t.$primevue.config.inputStyle,"p-ripple-disabled":!1===t.$primevue.config.ripple}]},container:function(e){var t=e.props;return["p-toast-message",{"p-toast-message-info":"info"===t.message.severity||void 0===t.message.severity,"p-toast-message-warn":"warn"===t.message.severity,"p-toast-message-error":"error"===t.message.severity,"p-toast-message-success":"success"===t.message.severity}]},content:"p-toast-message-content",icon:function(e){var t,n=e.props;return["p-toast-message-icon",(t={},w(t,n.infoIcon,"info"===n.message.severity),w(t,n.warnIcon,"warn"===n.message.severity),w(t,n.errorIcon,"error"===n.message.severity),w(t,n.successIcon,"success"===n.message.severity),t)]},text:"p-toast-message-text",summary:"p-toast-summary",detail:"p-toast-detail",closeButton:"p-toast-icon-close p-link",closeIcon:"p-toast-icon-close-icon"},j=r.useStyle("\n.p-toast {\n width: 25rem;\n}\n\n.p-toast-message-icon {\n flex-shrink: 0;\n}\n\n.p-toast-message-content {\n display: flex;\n align-items: flex-start;\n}\n\n.p-toast-message-text {\n flex: 1 1 auto;\n}\n\n.p-toast-top-center {\n transform: translateX(-50%);\n}\n\n.p-toast-bottom-center {\n transform: translateX(-50%);\n}\n\n.p-toast-center {\n min-width: 20vw;\n transform: translate(-50%, -50%);\n}\n\n.p-toast-icon-close {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-toast-icon-close.p-link {\n cursor: pointer;\n}\n\n/* Animations */\n.p-toast-message-enter-from {\n opacity: 0;\n -webkit-transform: translateY(50%);\n -ms-transform: translateY(50%);\n transform: translateY(50%);\n}\n\n.p-toast-message-leave-from {\n max-height: 1000px;\n}\n\n.p-toast .p-toast-message.p-toast-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin-bottom: 0;\n overflow: hidden;\n}\n\n.p-toast-message-enter-active {\n -webkit-transition: transform 0.3s, opacity 0.3s;\n transition: transform 0.3s, opacity 0.3s;\n}\n\n.p-toast-message-leave-active {\n -webkit-transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n}\n",{name:"toast",manual:!0}),E={name:"BaseToast",extends:d.default,props:{group:{type:String,default:null},position:{type:String,default:"top-right"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},breakpoints:{type:Object,default:null},closeIcon:{type:String,default:void 0},infoIcon:{type:String,default:void 0},warnIcon:{type:String,default:void 0},errorIcon:{type:String,default:void 0},successIcon:{type:String,default:void 0},closeButtonProps:{type:null,default:null}},css:{classes:O,inlineStyles:{root:function(e){var t=e.position;return{position:"fixed",top:"top-right"===t||"top-left"===t||"top-center"===t?"20px":"center"===t?"50%":null,right:("top-right"===t||"bottom-right"===t)&&"20px",bottom:("bottom-left"===t||"bottom-right"===t||"bottom-center"===t)&&"20px",left:"top-left"===t||"bottom-left"===t?"20px":"center"===t||"top-center"===t||"bottom-center"===t?"50%":null}}},loadStyle:j.load},provide:function(){return{$parentInstance:this}}},C={name:"ToastMessage",hostName:"Toast",extends:d.default,emits:["close"],closeTimeout:null,props:{message:{type:null,default:null},templates:{type:Object,default:null},closeIcon:{type:String,default:null},infoIcon:{type:String,default:null},warnIcon:{type:String,default:null},errorIcon:{type:String,default:null},successIcon:{type:String,default:null},closeButtonProps:{type:null,default:null}},mounted:function(){var e=this;this.message.life&&(this.closeTimeout=setTimeout((function(){e.close({message:e.message,type:"life-end"})}),this.message.life))},beforeUnmount:function(){this.clearCloseTimeout()},methods:{close:function(e){this.$emit("close",e)},onCloseClick:function(){this.clearCloseTimeout(),this.close({message:this.message,type:"close"})},clearCloseTimeout:function(){this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null)}},computed:{iconComponent:function(){return{info:!this.infoIcon&&b.default,success:!this.successIcon&&g.default,warn:!this.warnIcon&&v.default,error:!this.errorIcon&&I.default}[this.message.severity]},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},components:{TimesIcon:h.default,InfoCircleIcon:b.default,CheckIcon:g.default,ExclamationTriangleIcon:v.default,TimesCircleIcon:I.default},directives:{ripple:S.default}};function B(e){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B(e)}function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $(e,t,n){return(t=D(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e){var t=N(e,"string");return"symbol"===B(t)?t:String(t)}function N(e,t){if("object"!==B(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==B(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var U=["aria-label"];function Z(){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 L(e,t){if(e){if("string"==typeof e)return R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(e,t):void 0}}function V(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function G(e){if(Array.isArray(e))return R(e)}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}C.render=function(e,t,n,o,r,s){var i=m.resolveDirective("ripple");return m.openBlock(),m.createElementBlock("div",m.mergeProps({class:e.cx("container"),role:"alert","aria-live":"assertive","aria-atomic":"true"},e.ptm("container")),[m.createElementVNode("div",m.mergeProps({class:[e.cx("content"),n.message.contentStyleClass]},e.ptm("content")),[n.templates.message?(m.openBlock(),m.createBlock(m.resolveDynamicComponent(n.templates.message),{key:1,message:n.message},null,8,["message"])):(m.openBlock(),m.createElementBlock(m.Fragment,{key:0},[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(n.templates.icon?n.templates.icon:s.iconComponent&&s.iconComponent.name?s.iconComponent:"span"),m.mergeProps({class:e.cx("icon")},e.ptm("icon")),null,16,["class"])),m.createElementVNode("div",m.mergeProps({class:e.cx("text")},e.ptm("text")),[m.createElementVNode("span",m.mergeProps({class:e.cx("summary")},e.ptm("summary")),m.toDisplayString(n.message.summary),17),m.createElementVNode("div",m.mergeProps({class:e.cx("detail")},e.ptm("detail")),m.toDisplayString(n.message.detail),17)],16)],64)),!1!==n.message.closable?(m.openBlock(),m.createElementBlock("div",m.normalizeProps(m.mergeProps({key:2},e.ptm("buttonContainer"))),[m.withDirectives((m.openBlock(),m.createElementBlock("button",m.mergeProps({class:e.cx("closeButton"),type:"button","aria-label":s.closeAriaLabel,onClick:t[0]||(t[0]=function(){return s.onCloseClick&&s.onCloseClick.apply(s,arguments)}),autofocus:""},A(A(A({},n.closeButtonProps),e.ptm("button")),e.ptm("closeButton"))),[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(n.templates.closeicon||"TimesIcon"),m.mergeProps({class:[e.cx("closeIcon"),n.closeIcon]},A(A({},e.ptm("buttonIcon")),e.ptm("closeIcon"))),null,16,["class"]))],16,U)),[[i]])],16)):m.createCommentVNode("",!0)],16)],16)};var M=0,z={name:"Toast",extends:E,inheritAttrs:!1,emits:["close","life-end"],data:function(){return{messages:[]}},styleElement:null,mounted:function(){y.default.on("add",this.onAdd),y.default.on("remove-group",this.onRemoveGroup),y.default.on("remove-all-groups",this.onRemoveAllGroups),this.breakpoints&&this.createStyle()},beforeUnmount:function(){this.destroyStyle(),this.$refs.container&&this.autoZIndex&&n.ZIndexUtils.clear(this.$refs.container),y.default.off("add",this.onAdd),y.default.off("remove-group",this.onRemoveGroup),y.default.off("remove-all-groups",this.onRemoveAllGroups)},methods:{add:function(e){var t;null==e.id&&(e.id=M++),this.messages=[].concat(G(t=this.messages)||V(t)||L(t)||Z(),[e])},remove:function(e){for(var t=-1,n=0;n<this.messages.length;n++)if(this.messages[n]===e.message){t=n;break}this.messages.splice(t,1),this.$emit(e.type,{message:e.message})},onAdd:function(e){this.group==e.group&&this.add(e)},onRemoveGroup:function(e){this.group===e&&(this.messages=[])},onRemoveAllGroups:function(){this.messages=[]},onEnter:function(){this.$refs.container.setAttribute(this.attributeSelector,""),this.autoZIndex&&n.ZIndexUtils.set("modal",this.$refs.container,this.baseZIndex||this.$primevue.config.zIndex.modal)},onLeave:function(){var e=this;this.$refs.container&&this.autoZIndex&&n.ObjectUtils.isEmpty(this.messages)&&setTimeout((function(){n.ZIndexUtils.clear(e.$refs.container)}),200)},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.styleElement=document.createElement("style"),this.styleElement.type="text/css",n.DomHandler.setAttribute(this.styleElement,"nonce",null===(e=this.$primevue)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce),document.head.appendChild(this.styleElement);var t="";for(var o in this.breakpoints){var r="";for(var s in this.breakpoints[o])r+=s+":"+this.breakpoints[o][s]+"!important;";t+="\n @media screen and (max-width: ".concat(o,") {\n .p-toast[").concat(this.attributeSelector,"] {\n ").concat(r,"\n }\n }\n ")}this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}},computed:{attributeSelector:function(){return n.UniqueComponentId()}},components:{ToastMessage:C,Portal:f.default}};function Y(e){return Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Y(e)}function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){X(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function X(e,t,n){return(t=_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _(e){var t=q(e,"string");return"symbol"===Y(t)?t:String(t)}function q(e,t){if("object"!==Y(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==Y(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}return z.render=function(e,t,n,o,r,s){var i=m.resolveComponent("ToastMessage"),a=m.resolveComponent("Portal");return m.openBlock(),m.createBlock(a,null,{default:m.withCtx((function(){return[m.createElementVNode("div",m.mergeProps({ref:"container",class:e.cx("root"),style:e.sx("root",!0,{position:e.position})},H(H({},e.$attrs),e.ptm("root"))),[m.createVNode(m.TransitionGroup,m.mergeProps({name:"p-toast-message",tag:"div",onEnter:s.onEnter,onLeave:s.onLeave},H(H({},e.ptm("message")),e.ptm("transition"))),{default:m.withCtx((function(){return[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(r.messages,(function(n){return m.openBlock(),m.createBlock(i,{key:n.id,message:n,templates:e.$slots,closeIcon:e.closeIcon,infoIcon:e.infoIcon,warnIcon:e.warnIcon,errorIcon:e.errorIcon,successIcon:e.successIcon,closeButtonProps:e.closeButtonProps,onClose:t[0]||(t[0]=function(e){return s.remove(e)}),pt:e.pt},null,8,["message","templates","closeIcon","infoIcon","warnIcon","errorIcon","successIcon","closeButtonProps","pt"])})),128))]})),_:1},16,["onEnter","onLeave"])],16)]})),_:1})},z}(primevue.portal,primevue.toasteventbus,primevue.utils,primevue.basecomponent,primevue.usestyle,primevue.icons.check,primevue.icons.exclamationtriangle,primevue.icons.infocircle,primevue.icons.times,primevue.icons.timescircle,primevue.ripple,Vue);
|