primereact 10.0.0 → 10.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/accordion/accordion.esm.js +0 -1
- package/api/api.esm.js +0 -1
- package/autocomplete/autocomplete.esm.js +8 -7
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/avatar/avatar.esm.js +0 -1
- package/avatargroup/avatargroup.esm.js +0 -1
- package/badge/badge.esm.js +0 -1
- package/blockui/blockui.esm.js +3 -1
- package/blockui/blockui.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +0 -1
- package/button/button.esm.js +0 -1
- package/calendar/calendar.esm.js +2 -1
- package/calendar/calendar.esm.min.js +1 -1
- package/card/card.esm.js +0 -1
- package/carousel/carousel.esm.js +7 -8
- package/carousel/carousel.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +0 -1
- package/chart/chart.esm.js +0 -1
- package/checkbox/checkbox.esm.js +0 -1
- package/chip/chip.esm.js +0 -1
- package/chips/chips.esm.js +0 -1
- package/colorpicker/colorpicker.esm.js +0 -1
- package/column/column.esm.js +0 -1
- package/columngroup/columngroup.esm.js +0 -1
- package/componentbase/componentbase.cjs.js +12 -7
- package/componentbase/componentbase.cjs.min.js +1 -1
- package/componentbase/componentbase.esm.js +23 -13
- package/componentbase/componentbase.esm.min.js +1 -1
- package/componentbase/componentbase.js +12 -7
- package/componentbase/componentbase.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +0 -1
- package/confirmpopup/confirmpopup.esm.js +0 -1
- package/contextmenu/contextmenu.esm.js +0 -1
- package/core/core.js +12 -7
- package/core/core.min.js +1 -1
- package/csstransition/csstransition.esm.js +0 -1
- package/datascroller/datascroller.esm.js +0 -1
- package/datatable/datatable.esm.js +0 -1
- package/dataview/dataview.esm.js +0 -1
- package/deferredcontent/deferredcontent.esm.js +0 -1
- package/dialog/dialog.esm.js +2 -1
- package/dialog/dialog.esm.min.js +1 -1
- package/divider/divider.esm.js +0 -1
- package/dock/dock.esm.js +0 -1
- package/dropdown/dropdown.esm.js +0 -1
- package/editor/editor.esm.js +0 -1
- package/fieldset/fieldset.esm.js +0 -1
- package/fileupload/fileupload.esm.js +0 -1
- package/galleria/galleria.esm.js +11 -7
- package/galleria/galleria.esm.min.js +1 -1
- package/hooks/hooks.esm.js +0 -6
- package/iconbase/iconbase.esm.js +0 -1
- package/icons/angledoubledown/index.esm.js +0 -1
- package/icons/angledoubleleft/index.esm.js +0 -1
- package/icons/angledoubleright/index.esm.js +0 -1
- package/icons/angledoubleup/index.esm.js +0 -1
- package/icons/angledown/index.esm.js +0 -1
- package/icons/angleleft/index.esm.js +0 -1
- package/icons/angleright/index.esm.js +0 -1
- package/icons/angleup/index.esm.js +0 -1
- package/icons/arrowdown/index.esm.js +0 -1
- package/icons/arrowup/index.esm.js +0 -1
- package/icons/ban/index.esm.js +0 -1
- package/icons/bars/index.esm.js +0 -1
- package/icons/calendar/index.esm.js +0 -1
- package/icons/check/index.esm.js +0 -1
- package/icons/chevrondown/index.esm.js +0 -1
- package/icons/chevronleft/index.esm.js +0 -1
- package/icons/chevronright/index.esm.js +0 -1
- package/icons/chevronup/index.esm.js +0 -1
- package/icons/download/index.esm.js +0 -1
- package/icons/exclamationtriangle/index.esm.js +0 -1
- package/icons/eye/index.esm.js +0 -1
- package/icons/eyeslash/index.esm.js +0 -1
- package/icons/filter/index.esm.js +0 -1
- package/icons/filterslash/index.esm.js +0 -1
- package/icons/infocircle/index.esm.js +0 -1
- package/icons/minus/index.esm.js +0 -1
- package/icons/pencil/index.esm.js +0 -1
- package/icons/plus/index.esm.js +0 -1
- package/icons/refresh/index.esm.js +0 -1
- package/icons/search/index.esm.js +0 -1
- package/icons/searchminus/index.esm.js +0 -1
- package/icons/searchplus/index.esm.js +0 -1
- package/icons/sortalt/index.esm.js +0 -1
- package/icons/sortamountdown/index.esm.js +0 -1
- package/icons/sortamountupalt/index.esm.js +0 -1
- package/icons/spinner/index.esm.js +0 -1
- package/icons/star/index.esm.js +0 -1
- package/icons/starfill/index.esm.js +0 -1
- package/icons/thlarge/index.esm.js +0 -1
- package/icons/times/index.esm.js +0 -1
- package/icons/timescircle/index.esm.js +0 -1
- package/icons/trash/index.esm.js +0 -1
- package/icons/undo/index.esm.js +0 -1
- package/icons/upload/index.esm.js +0 -1
- package/icons/windowmaximize/index.esm.js +0 -1
- package/icons/windowminimize/index.esm.js +0 -1
- package/image/image.esm.js +2 -1
- package/image/image.esm.min.js +1 -1
- package/inplace/inplace.esm.js +0 -1
- package/inputmask/inputmask.esm.js +0 -1
- package/inputnumber/inputnumber.esm.js +0 -1
- package/inputswitch/inputswitch.esm.js +0 -1
- package/inputtext/inputtext.esm.js +0 -1
- package/inputtextarea/inputtextarea.esm.js +0 -1
- package/keyfilter/keyfilter.esm.js +0 -1
- package/knob/knob.esm.js +0 -1
- package/listbox/listbox.esm.js +0 -1
- package/megamenu/megamenu.esm.js +0 -1
- package/mention/mention.esm.js +0 -1
- package/menu/menu.esm.js +0 -1
- package/menubar/menubar.esm.js +0 -1
- package/message/message.esm.js +0 -1
- package/messages/messages.esm.js +1 -2
- package/messages/messages.esm.min.js +1 -1
- package/multiselect/multiselect.esm.js +0 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +0 -1
- package/orderlist/orderlist.esm.js +9 -5
- package/orderlist/orderlist.esm.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +0 -1
- package/overlaypanel/overlaypanel.esm.js +0 -1
- package/overlayservice/overlayservice.esm.js +0 -1
- package/package.json +2 -2
- package/paginator/paginator.esm.js +0 -1
- package/panel/panel.esm.js +0 -1
- package/panelmenu/panelmenu.esm.js +0 -1
- package/passthrough/index.esm.js +0 -1
- package/passthrough/tailwind/index.cjs.js +2 -4
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +149 -148
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +2 -4
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/password.esm.js +0 -1
- package/picklist/picklist.esm.js +0 -1
- package/portal/portal.esm.js +0 -1
- package/primereact.all.cjs.js +12 -7
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +70 -42
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +12 -7
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.esm.js +0 -1
- package/progressspinner/progressspinner.esm.js +0 -1
- package/radiobutton/radiobutton.esm.js +0 -1
- package/rating/rating.esm.js +0 -1
- package/ripple/ripple.esm.js +0 -1
- package/row/row.esm.js +0 -1
- package/scrollpanel/scrollpanel.esm.js +0 -1
- package/scrolltop/scrolltop.esm.js +0 -1
- package/selectbutton/selectbutton.esm.js +0 -1
- package/sidebar/sidebar.esm.js +2 -1
- package/sidebar/sidebar.esm.min.js +1 -1
- package/skeleton/skeleton.esm.js +0 -1
- package/slidemenu/slidemenu.esm.js +0 -1
- package/slider/slider.esm.js +0 -1
- package/speeddial/speeddial.esm.js +0 -1
- package/splitbutton/splitbutton.esm.js +0 -1
- package/splitter/splitter.esm.js +0 -1
- package/steps/steps.esm.js +0 -1
- package/styleclass/styleclass.esm.js +0 -1
- package/tabmenu/tabmenu.esm.js +0 -1
- package/tabview/tabview.esm.js +0 -1
- package/tag/tag.esm.js +0 -1
- package/terminal/terminal.esm.js +0 -1
- package/terminalservice/terminalservice.esm.js +0 -1
- package/tieredmenu/tieredmenu.esm.js +0 -1
- package/timeline/timeline.esm.js +0 -1
- package/toast/toast.esm.js +0 -1
- package/togglebutton/togglebutton.esm.js +0 -1
- package/toolbar/toolbar.esm.js +0 -1
- package/tooltip/tooltip.esm.js +0 -1
- package/tree/tree.esm.js +0 -1
- package/treeselect/treeselect.esm.js +0 -1
- package/treetable/treetable.esm.js +0 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +0 -1
- package/utils/utils.esm.js +0 -1
- package/virtualscroller/virtualscroller.esm.js +0 -1
- package/web-types.json +1 -1
- package/accordion/accordion.esm.min.mjs +0 -1
- package/accordion/accordion.esm.mjs +0 -420
- package/api/api.esm.min.mjs +0 -1
- package/api/api.esm.mjs +0 -943
- package/autocomplete/autocomplete.esm.min.mjs +0 -1
- package/autocomplete/autocomplete.esm.mjs +0 -1128
- package/avatar/avatar.esm.min.mjs +0 -1
- package/avatar/avatar.esm.mjs +0 -244
- package/avatargroup/avatargroup.esm.min.mjs +0 -1
- package/avatargroup/avatargroup.esm.mjs +0 -54
- package/badge/badge.esm.min.mjs +0 -1
- package/badge/badge.esm.mjs +0 -109
- package/blockui/blockui.esm.min.mjs +0 -1
- package/blockui/blockui.esm.mjs +0 -267
- package/breadcrumb/breadcrumb.esm.min.mjs +0 -1
- package/breadcrumb/breadcrumb.esm.mjs +0 -350
- package/button/button.esm.min.mjs +0 -1
- package/button/button.esm.mjs +0 -294
- package/calendar/calendar.esm.min.mjs +0 -1
- package/calendar/calendar.esm.mjs +0 -3474
- package/card/card.esm.min.mjs +0 -1
- package/card/card.esm.mjs +0 -97
- package/carousel/carousel.esm.min.mjs +0 -1
- package/carousel/carousel.esm.mjs +0 -800
- package/cascadeselect/cascadeselect.esm.min.mjs +0 -1
- package/cascadeselect/cascadeselect.esm.mjs +0 -818
- package/chart/chart.esm.min.mjs +0 -1
- package/chart/chart.esm.mjs +0 -154
- package/checkbox/checkbox.esm.min.mjs +0 -1
- package/checkbox/checkbox.esm.mjs +0 -356
- package/chip/chip.esm.min.mjs +0 -1
- package/chip/chip.esm.mjs +0 -247
- package/chips/chips.esm.min.mjs +0 -1
- package/chips/chips.esm.mjs +0 -500
- package/colorpicker/colorpicker.esm.min.mjs +0 -1
- package/colorpicker/colorpicker.esm.mjs +0 -787
- package/column/column.esm.min.mjs +0 -1
- package/column/column.esm.mjs +0 -7
- package/columngroup/columngroup.esm.min.mjs +0 -1
- package/columngroup/columngroup.esm.mjs +0 -5
- package/componentbase/componentbase.esm.min.mjs +0 -1
- package/componentbase/componentbase.esm.mjs +0 -328
- package/confirmdialog/confirmdialog.esm.min.mjs +0 -1
- package/confirmdialog/confirmdialog.esm.mjs +0 -375
- package/confirmpopup/confirmpopup.esm.min.mjs +0 -1
- package/confirmpopup/confirmpopup.esm.mjs +0 -609
- package/contextmenu/contextmenu.esm.min.mjs +0 -1
- package/contextmenu/contextmenu.esm.mjs +0 -663
- package/csstransition/csstransition.esm.min.mjs +0 -1
- package/csstransition/csstransition.esm.mjs +0 -137
- package/datascroller/datascroller.esm.min.mjs +0 -1
- package/datascroller/datascroller.esm.mjs +0 -319
- package/datatable/datatable.esm.min.mjs +0 -1
- package/datatable/datatable.esm.mjs +0 -6635
- package/dataview/dataview.esm.min.mjs +0 -1
- package/dataview/dataview.esm.mjs +0 -505
- package/deferredcontent/deferredcontent.esm.min.mjs +0 -1
- package/deferredcontent/deferredcontent.esm.mjs +0 -132
- package/dialog/dialog.esm.min.mjs +0 -1
- package/dialog/dialog.esm.mjs +0 -984
- package/divider/divider.esm.min.mjs +0 -1
- package/divider/divider.esm.mjs +0 -78
- package/dock/dock.esm.min.mjs +0 -1
- package/dock/dock.esm.mjs +0 -347
- package/dropdown/dropdown.esm.min.mjs +0 -1
- package/dropdown/dropdown.esm.mjs +0 -1379
- package/editor/editor.esm.min.mjs +0 -1
- package/editor/editor.esm.mjs +0 -337
- package/fieldset/fieldset.esm.min.mjs +0 -1
- package/fieldset/fieldset.esm.mjs +0 -269
- package/fileupload/fileupload.esm.min.mjs +0 -1
- package/fileupload/fileupload.esm.mjs +0 -1004
- package/galleria/galleria.esm.min.mjs +0 -1
- package/galleria/galleria.esm.mjs +0 -1094
- package/hooks/hooks.esm.min.mjs +0 -1
- package/hooks/hooks.esm.mjs +0 -1036
- package/iconbase/iconbase.esm.min.mjs +0 -1
- package/iconbase/iconbase.esm.mjs +0 -32
- package/icons/angledoubledown/index.esm.min.mjs +0 -1
- package/icons/angledoubledown/index.esm.mjs +0 -38
- package/icons/angledoubleleft/index.esm.min.mjs +0 -1
- package/icons/angledoubleleft/index.esm.mjs +0 -38
- package/icons/angledoubleright/index.esm.min.mjs +0 -1
- package/icons/angledoubleright/index.esm.mjs +0 -38
- package/icons/angledoubleup/index.esm.min.mjs +0 -1
- package/icons/angledoubleup/index.esm.mjs +0 -38
- package/icons/angledown/index.esm.min.mjs +0 -1
- package/icons/angledown/index.esm.mjs +0 -36
- package/icons/angleleft/index.esm.min.mjs +0 -1
- package/icons/angleleft/index.esm.mjs +0 -36
- package/icons/angleright/index.esm.min.mjs +0 -1
- package/icons/angleright/index.esm.mjs +0 -36
- package/icons/angleup/index.esm.min.mjs +0 -1
- package/icons/angleup/index.esm.mjs +0 -36
- package/icons/arrowdown/index.esm.min.mjs +0 -1
- package/icons/arrowdown/index.esm.mjs +0 -660
- package/icons/arrowup/index.esm.min.mjs +0 -1
- package/icons/arrowup/index.esm.mjs +0 -660
- package/icons/ban/index.esm.min.mjs +0 -1
- package/icons/ban/index.esm.mjs +0 -658
- package/icons/bars/index.esm.min.mjs +0 -1
- package/icons/bars/index.esm.mjs +0 -38
- package/icons/calendar/index.esm.min.mjs +0 -1
- package/icons/calendar/index.esm.mjs +0 -36
- package/icons/check/index.esm.min.mjs +0 -1
- package/icons/check/index.esm.mjs +0 -36
- package/icons/chevrondown/index.esm.min.mjs +0 -1
- package/icons/chevrondown/index.esm.mjs +0 -36
- package/icons/chevronleft/index.esm.min.mjs +0 -1
- package/icons/chevronleft/index.esm.mjs +0 -36
- package/icons/chevronright/index.esm.min.mjs +0 -1
- package/icons/chevronright/index.esm.mjs +0 -36
- package/icons/chevronup/index.esm.min.mjs +0 -1
- package/icons/chevronup/index.esm.mjs +0 -36
- package/icons/download/index.esm.min.mjs +0 -1
- package/icons/download/index.esm.mjs +0 -660
- package/icons/exclamationtriangle/index.esm.min.mjs +0 -1
- package/icons/exclamationtriangle/index.esm.mjs +0 -664
- package/icons/eye/index.esm.min.mjs +0 -1
- package/icons/eye/index.esm.mjs +0 -38
- package/icons/eyeslash/index.esm.min.mjs +0 -1
- package/icons/eyeslash/index.esm.mjs +0 -660
- package/icons/filter/index.esm.min.mjs +0 -1
- package/icons/filter/index.esm.mjs +0 -658
- package/icons/filterslash/index.esm.min.mjs +0 -1
- package/icons/filterslash/index.esm.mjs +0 -660
- package/icons/infocircle/index.esm.min.mjs +0 -1
- package/icons/infocircle/index.esm.mjs +0 -660
- package/icons/minus/index.esm.min.mjs +0 -1
- package/icons/minus/index.esm.mjs +0 -36
- package/icons/pencil/index.esm.min.mjs +0 -1
- package/icons/pencil/index.esm.mjs +0 -658
- package/icons/plus/index.esm.min.mjs +0 -1
- package/icons/plus/index.esm.mjs +0 -658
- package/icons/refresh/index.esm.min.mjs +0 -1
- package/icons/refresh/index.esm.mjs +0 -660
- package/icons/search/index.esm.min.mjs +0 -1
- package/icons/search/index.esm.mjs +0 -660
- package/icons/searchminus/index.esm.min.mjs +0 -1
- package/icons/searchminus/index.esm.mjs +0 -660
- package/icons/searchplus/index.esm.min.mjs +0 -1
- package/icons/searchplus/index.esm.mjs +0 -660
- package/icons/sortalt/index.esm.min.mjs +0 -1
- package/icons/sortalt/index.esm.mjs +0 -667
- package/icons/sortamountdown/index.esm.min.mjs +0 -1
- package/icons/sortamountdown/index.esm.mjs +0 -673
- package/icons/sortamountupalt/index.esm.min.mjs +0 -1
- package/icons/sortamountupalt/index.esm.mjs +0 -673
- package/icons/spinner/index.esm.min.mjs +0 -1
- package/icons/spinner/index.esm.mjs +0 -658
- package/icons/star/index.esm.min.mjs +0 -1
- package/icons/star/index.esm.mjs +0 -658
- package/icons/starfill/index.esm.min.mjs +0 -1
- package/icons/starfill/index.esm.mjs +0 -658
- package/icons/thlarge/index.esm.min.mjs +0 -1
- package/icons/thlarge/index.esm.mjs +0 -660
- package/icons/times/index.esm.min.mjs +0 -1
- package/icons/times/index.esm.mjs +0 -36
- package/icons/timescircle/index.esm.min.mjs +0 -1
- package/icons/timescircle/index.esm.mjs +0 -660
- package/icons/trash/index.esm.min.mjs +0 -1
- package/icons/trash/index.esm.mjs +0 -660
- package/icons/undo/index.esm.min.mjs +0 -1
- package/icons/undo/index.esm.mjs +0 -660
- package/icons/upload/index.esm.min.mjs +0 -1
- package/icons/upload/index.esm.mjs +0 -660
- package/icons/windowmaximize/index.esm.min.mjs +0 -1
- package/icons/windowmaximize/index.esm.mjs +0 -660
- package/icons/windowminimize/index.esm.min.mjs +0 -1
- package/icons/windowminimize/index.esm.mjs +0 -660
- package/image/image.esm.min.mjs +0 -1
- package/image/image.esm.mjs +0 -1163
- package/inplace/inplace.esm.min.mjs +0 -1
- package/inplace/inplace.esm.mjs +0 -242
- package/inputmask/inputmask.esm.min.mjs +0 -1
- package/inputmask/inputmask.esm.mjs +0 -559
- package/inputnumber/inputnumber.esm.min.mjs +0 -1
- package/inputnumber/inputnumber.esm.mjs +0 -1208
- package/inputswitch/inputswitch.esm.min.mjs +0 -1
- package/inputswitch/inputswitch.esm.mjs +0 -290
- package/inputtext/inputtext.esm.min.mjs +0 -1
- package/inputtext/inputtext.esm.mjs +0 -170
- package/inputtextarea/inputtextarea.esm.min.mjs +0 -1
- package/inputtextarea/inputtextarea.esm.mjs +0 -219
- package/keyfilter/keyfilter.esm.min.mjs +0 -1
- package/keyfilter/keyfilter.esm.mjs +0 -107
- package/knob/knob.esm.min.mjs +0 -1
- package/knob/knob.esm.mjs +0 -317
- package/listbox/listbox.esm.min.mjs +0 -1
- package/listbox/listbox.esm.mjs +0 -809
- package/megamenu/megamenu.esm.min.mjs +0 -1
- package/megamenu/megamenu.esm.mjs +0 -715
- package/mention/mention.esm.min.mjs +0 -1
- package/mention/mention.esm.mjs +0 -770
- package/menu/menu.esm.min.mjs +0 -1
- package/menu/menu.esm.mjs +0 -484
- package/menubar/menubar.esm.min.mjs +0 -1
- package/menubar/menubar.esm.mjs +0 -583
- package/message/message.esm.min.mjs +0 -1
- package/message/message.esm.mjs +0 -168
- package/messages/messages.esm.min.mjs +0 -1
- package/messages/messages.esm.mjs +0 -438
- package/multiselect/multiselect.esm.min.mjs +0 -1
- package/multiselect/multiselect.esm.mjs +0 -1723
- package/multistatecheckbox/multistatecheckbox.esm.min.mjs +0 -1
- package/multistatecheckbox/multistatecheckbox.esm.mjs +0 -351
- package/orderlist/orderlist.esm.min.mjs +0 -1
- package/orderlist/orderlist.esm.mjs +0 -820
- package/organizationchart/organizationchart.esm.min.mjs +0 -1
- package/organizationchart/organizationchart.esm.mjs +0 -479
- package/overlaypanel/overlaypanel.esm.min.mjs +0 -1
- package/overlaypanel/overlaypanel.esm.mjs +0 -515
- package/overlayservice/overlayservice.esm.min.mjs +0 -1
- package/overlayservice/overlayservice.esm.mjs +0 -6
- package/paginator/paginator.esm.min.mjs +0 -1
- package/paginator/paginator.esm.mjs +0 -932
- package/panel/panel.esm.min.mjs +0 -1
- package/panel/panel.esm.mjs +0 -315
- package/panelmenu/panelmenu.esm.min.mjs +0 -1
- package/panelmenu/panelmenu.esm.mjs +0 -644
- package/passthrough/index.esm.min.mjs +0 -1
- package/passthrough/index.esm.mjs +0 -70
- package/passthrough/tailwind/index.esm.min.mjs +0 -1
- package/passthrough/tailwind/index.esm.mjs +0 -3513
- package/password/password.esm.min.mjs +0 -1
- package/password/password.esm.mjs +0 -566
- package/picklist/picklist.esm.min.mjs +0 -1
- package/picklist/picklist.esm.mjs +0 -1118
- package/portal/portal.esm.min.mjs +0 -1
- package/portal/portal.esm.mjs +0 -109
- package/primereact.all.esm.min.mjs +0 -1
- package/primereact.all.esm.mjs +0 -51669
- package/progressbar/progressbar.esm.min.mjs +0 -1
- package/progressbar/progressbar.esm.mjs +0 -189
- package/progressspinner/progressspinner.esm.min.mjs +0 -1
- package/progressspinner/progressspinner.esm.mjs +0 -87
- package/radiobutton/radiobutton.esm.min.mjs +0 -1
- package/radiobutton/radiobutton.esm.mjs +0 -328
- package/rating/rating.esm.min.mjs +0 -1
- package/rating/rating.esm.mjs +0 -272
- package/ripple/ripple.esm.min.mjs +0 -1
- package/ripple/ripple.esm.mjs +0 -99
- package/row/row.esm.min.mjs +0 -1
- package/row/row.esm.mjs +0 -35
- package/scrollpanel/scrollpanel.esm.min.mjs +0 -1
- package/scrollpanel/scrollpanel.esm.mjs +0 -209
- package/scrolltop/scrolltop.esm.min.mjs +0 -1
- package/scrolltop/scrolltop.esm.mjs +0 -268
- package/selectbutton/selectbutton.esm.min.mjs +0 -1
- package/selectbutton/selectbutton.esm.mjs +0 -326
- package/sidebar/sidebar.esm.min.mjs +0 -1
- package/sidebar/sidebar.esm.mjs +0 -544
- package/skeleton/skeleton.esm.min.mjs +0 -1
- package/skeleton/skeleton.esm.mjs +0 -124
- package/slidemenu/slidemenu.esm.min.mjs +0 -1
- package/slidemenu/slidemenu.esm.mjs +0 -688
- package/slider/slider.esm.min.mjs +0 -1
- package/slider/slider.esm.mjs +0 -477
- package/speeddial/speeddial.esm.min.mjs +0 -1
- package/speeddial/speeddial.esm.mjs +0 -520
- package/splitbutton/splitbutton.esm.min.mjs +0 -1
- package/splitbutton/splitbutton.esm.mjs +0 -544
- package/splitter/splitter.esm.min.mjs +0 -1
- package/splitter/splitter.esm.mjs +0 -465
- package/steps/steps.esm.min.mjs +0 -1
- package/steps/steps.esm.mjs +0 -293
- package/styleclass/styleclass.esm.min.mjs +0 -1
- package/styleclass/styleclass.esm.mjs +0 -268
- package/tabmenu/tabmenu.esm.min.mjs +0 -1
- package/tabmenu/tabmenu.esm.mjs +0 -331
- package/tabview/tabview.esm.min.mjs +0 -1
- package/tabview/tabview.esm.mjs +0 -677
- package/tag/tag.esm.min.mjs +0 -1
- package/tag/tag.esm.mjs +0 -116
- package/terminal/terminal.esm.min.mjs +0 -1
- package/terminal/terminal.esm.mjs +0 -279
- package/terminalservice/terminalservice.esm.min.mjs +0 -1
- package/terminalservice/terminalservice.esm.mjs +0 -6
- package/tieredmenu/tieredmenu.esm.min.mjs +0 -1
- package/tieredmenu/tieredmenu.esm.mjs +0 -698
- package/timeline/timeline.esm.min.mjs +0 -1
- package/timeline/timeline.esm.mjs +0 -163
- package/toast/toast.esm.min.mjs +0 -1
- package/toast/toast.esm.mjs +0 -738
- package/togglebutton/togglebutton.esm.min.mjs +0 -1
- package/togglebutton/togglebutton.esm.mjs +0 -216
- package/toolbar/toolbar.esm.min.mjs +0 -1
- package/toolbar/toolbar.esm.mjs +0 -78
- package/tooltip/tooltip.esm.min.mjs +0 -1
- package/tooltip/tooltip.esm.mjs +0 -695
- package/tree/tree.esm.min.mjs +0 -1
- package/tree/tree.esm.mjs +0 -1402
- package/treeselect/treeselect.esm.min.mjs +0 -1
- package/treeselect/treeselect.esm.mjs +0 -929
- package/treetable/treetable.esm.min.mjs +0 -1
- package/treetable/treetable.esm.mjs +0 -3093
- package/tristatecheckbox/tristatecheckbox.esm.min.mjs +0 -1
- package/tristatecheckbox/tristatecheckbox.esm.mjs +0 -291
- package/utils/utils.esm.min.mjs +0 -1
- package/utils/utils.esm.mjs +0 -2382
- package/virtualscroller/virtualscroller.esm.min.mjs +0 -1
- package/virtualscroller/virtualscroller.esm.mjs +0 -971
package/message/message.esm.mjs
DELETED
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { PrimeReactContext } from 'primereact/api';
|
|
4
|
-
import { ComponentBase, useHandleStyle } from 'primereact/componentbase';
|
|
5
|
-
import { CheckIcon } from 'primereact/icons/check';
|
|
6
|
-
import { ExclamationTriangleIcon } from 'primereact/icons/exclamationtriangle';
|
|
7
|
-
import { InfoCircleIcon } from 'primereact/icons/infocircle';
|
|
8
|
-
import { TimesCircleIcon } from 'primereact/icons/timescircle';
|
|
9
|
-
import { classNames, mergeProps, ObjectUtils, IconUtils } from 'primereact/utils';
|
|
10
|
-
|
|
11
|
-
function _extends() {
|
|
12
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
13
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
14
|
-
var source = arguments[i];
|
|
15
|
-
for (var key in source) {
|
|
16
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
17
|
-
target[key] = source[key];
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return target;
|
|
22
|
-
};
|
|
23
|
-
return _extends.apply(this, arguments);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function _typeof(o) {
|
|
27
|
-
"@babel/helpers - typeof";
|
|
28
|
-
|
|
29
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
30
|
-
return typeof o;
|
|
31
|
-
} : function (o) {
|
|
32
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
33
|
-
}, _typeof(o);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function _toPrimitive(input, hint) {
|
|
37
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
38
|
-
var prim = input[Symbol.toPrimitive];
|
|
39
|
-
if (prim !== undefined) {
|
|
40
|
-
var res = prim.call(input, hint || "default");
|
|
41
|
-
if (_typeof(res) !== "object") return res;
|
|
42
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
43
|
-
}
|
|
44
|
-
return (hint === "string" ? String : Number)(input);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function _toPropertyKey(arg) {
|
|
48
|
-
var key = _toPrimitive(arg, "string");
|
|
49
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function _defineProperty(obj, key, value) {
|
|
53
|
-
key = _toPropertyKey(key);
|
|
54
|
-
if (key in obj) {
|
|
55
|
-
Object.defineProperty(obj, key, {
|
|
56
|
-
value: value,
|
|
57
|
-
enumerable: true,
|
|
58
|
-
configurable: true,
|
|
59
|
-
writable: true
|
|
60
|
-
});
|
|
61
|
-
} else {
|
|
62
|
-
obj[key] = value;
|
|
63
|
-
}
|
|
64
|
-
return obj;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
var MessageBase = ComponentBase.extend({
|
|
68
|
-
defaultProps: {
|
|
69
|
-
__TYPE: 'Message',
|
|
70
|
-
id: null,
|
|
71
|
-
className: null,
|
|
72
|
-
style: null,
|
|
73
|
-
text: null,
|
|
74
|
-
icon: null,
|
|
75
|
-
severity: 'info',
|
|
76
|
-
content: null,
|
|
77
|
-
children: undefined
|
|
78
|
-
},
|
|
79
|
-
css: {
|
|
80
|
-
classes: {
|
|
81
|
-
root: function root(_ref) {
|
|
82
|
-
var props = _ref.props;
|
|
83
|
-
return classNames('p-inline-message p-component', {
|
|
84
|
-
'p-inline-message-info': props.severity === 'info',
|
|
85
|
-
'p-inline-message-warn': props.severity === 'warn',
|
|
86
|
-
'p-inline-message-error': props.severity === 'error',
|
|
87
|
-
'p-inline-message-success': props.severity === 'success',
|
|
88
|
-
'p-inline-message-icon-only': !props.text
|
|
89
|
-
});
|
|
90
|
-
},
|
|
91
|
-
icon: 'p-inline-message-icon',
|
|
92
|
-
text: 'p-inline-message-text'
|
|
93
|
-
},
|
|
94
|
-
styles: "\n @layer primereact {\n .p-inline-message {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n vertical-align: top;\n }\n \n .p-inline-message-icon-only .p-inline-message-text {\n visibility: hidden;\n width: 0;\n }\n \n .p-fluid .p-inline-message {\n display: flex;\n } \n }\n "
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
99
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
100
|
-
var Message = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
101
|
-
var context = React.useContext(PrimeReactContext);
|
|
102
|
-
var props = MessageBase.getProps(inProps, context);
|
|
103
|
-
var elementRef = React.useRef(null);
|
|
104
|
-
var _MessageBase$setMetaD = MessageBase.setMetaData({
|
|
105
|
-
props: props
|
|
106
|
-
}),
|
|
107
|
-
ptm = _MessageBase$setMetaD.ptm,
|
|
108
|
-
cx = _MessageBase$setMetaD.cx,
|
|
109
|
-
isUnstyled = _MessageBase$setMetaD.isUnstyled;
|
|
110
|
-
useHandleStyle(MessageBase.css.styles, isUnstyled, {
|
|
111
|
-
name: 'message'
|
|
112
|
-
});
|
|
113
|
-
var createContent = function createContent() {
|
|
114
|
-
if (props.content) {
|
|
115
|
-
return ObjectUtils.getJSXElement(props.content, props);
|
|
116
|
-
}
|
|
117
|
-
var text = ObjectUtils.getJSXElement(props.text, props);
|
|
118
|
-
var iconProps = mergeProps({
|
|
119
|
-
className: cx('icon')
|
|
120
|
-
}, ptm('icon'));
|
|
121
|
-
var icon = props.icon;
|
|
122
|
-
if (!icon) {
|
|
123
|
-
switch (props.severity) {
|
|
124
|
-
case 'info':
|
|
125
|
-
icon = /*#__PURE__*/React.createElement(InfoCircleIcon, iconProps);
|
|
126
|
-
break;
|
|
127
|
-
case 'warn':
|
|
128
|
-
icon = /*#__PURE__*/React.createElement(ExclamationTriangleIcon, iconProps);
|
|
129
|
-
break;
|
|
130
|
-
case 'error':
|
|
131
|
-
icon = /*#__PURE__*/React.createElement(TimesCircleIcon, iconProps);
|
|
132
|
-
break;
|
|
133
|
-
case 'success':
|
|
134
|
-
icon = /*#__PURE__*/React.createElement(CheckIcon, iconProps);
|
|
135
|
-
break;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
var messageIcon = IconUtils.getJSXIcon(icon, _objectSpread({}, iconProps), {
|
|
139
|
-
props: props
|
|
140
|
-
});
|
|
141
|
-
var textProps = mergeProps({
|
|
142
|
-
className: cx('text')
|
|
143
|
-
}, ptm('text'));
|
|
144
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, messageIcon, /*#__PURE__*/React.createElement("span", textProps, text));
|
|
145
|
-
};
|
|
146
|
-
React.useImperativeHandle(ref, function () {
|
|
147
|
-
return {
|
|
148
|
-
props: props,
|
|
149
|
-
getElement: function getElement() {
|
|
150
|
-
return elementRef.current;
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
});
|
|
154
|
-
var content = createContent();
|
|
155
|
-
var rootProps = mergeProps({
|
|
156
|
-
className: classNames(props.className, cx('root')),
|
|
157
|
-
style: props.style,
|
|
158
|
-
role: 'alert',
|
|
159
|
-
'aria-live': 'polite'
|
|
160
|
-
}, MessageBase.getOtherProps(props), ptm('root'));
|
|
161
|
-
return /*#__PURE__*/React.createElement("div", _extends({
|
|
162
|
-
id: props.id,
|
|
163
|
-
ref: elementRef
|
|
164
|
-
}, rootProps), content);
|
|
165
|
-
}));
|
|
166
|
-
Message.displayName = 'Message';
|
|
167
|
-
|
|
168
|
-
export { Message };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as e from"react";import{TransitionGroup as t}from"react-transition-group";import{localeOption as r,PrimeReactContext as n}from"primereact/api";import{ComponentBase as o,useHandleStyle as a}from"primereact/componentbase";import{CSSTransition as i}from"primereact/csstransition";import{classNames as s,mergeProps as c,IconUtils as l}from"primereact/utils";import{useTimeout as m}from"primereact/hooks";import{CheckIcon as u}from"primereact/icons/check";import{ExclamationTriangleIcon as p}from"primereact/icons/exclamationtriangle";import{InfoCircleIcon as f}from"primereact/icons/infocircle";import{TimesIcon as y}from"primereact/icons/times";import{TimesCircleIcon as g}from"primereact/icons/timescircle";import{Ripple as b}from"primereact/ripple";function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},d.apply(this,arguments)}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function h(e){if(Array.isArray(e))return v(e)}function O(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function j(e,t){if(e){if("string"==typeof e)return v(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(e,t):void 0}}function w(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function N(e){return h(e)||O(e)||j(e)||w()}function E(e){return E="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},E(e)}function P(e,t){if("object"!==E(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==E(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function S(e){var t=P(e,"string");return"symbol"===E(t)?t:String(t)}function x(e,t,r){return(t=S(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function k(e){if(Array.isArray(e))return e}function C(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,s=[],c=!0,l=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return s}}function I(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function D(e,t){return k(e)||C(e,t)||j(e,t)||I()}var A=o.extend({defaultProps:{__TYPE:"Messages",__parentMetadata:null,id:null,className:null,style:null,transitionOptions:null,onRemove:null,onClick:null,children:void 0},css:{classes:{uimessage:{root:function(e){var t=e.severity;return s("p-message p-component",x({},"p-message-".concat(t),t))},wrapper:"p-message-wrapper",detail:"p-message-detail",summary:"p-message-summary",icon:"p-message-icon",buttonicon:"p-message-close-icon",button:"p-message-close p-link",transition:"p-message"}},styles:"\n@layer primereact {\n .p-message-wrapper {\n display: flex;\n align-items: center;\n }\n\n .p-message-icon {\n flex-shrink: 0;\n }\n \n .p-message-close {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n \n .p-message-close.p-link {\n margin-left: auto;\n overflow: hidden;\n position: relative;\n }\n \n .p-message-enter {\n opacity: 0;\n }\n \n .p-message-enter-active {\n opacity: 1;\n transition: opacity .3s;\n }\n \n .p-message-exit {\n opacity: 1;\n max-height: 1000px;\n }\n \n .p-message-exit-active {\n opacity: 0;\n max-height: 0;\n margin: 0;\n overflow: hidden;\n transition: max-height .3s cubic-bezier(0, 1, 0, 1), opacity .3s, margin .3s;\n }\n \n .p-message-exit-active .p-message-close {\n display: none;\n }\n}\n"}});function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_(Object(r),!0).forEach((function(t){x(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var R=e.memo(e.forwardRef((function(t,n){var o=t.ptCallbacks,a=o.ptm,i=o.ptmo,d=o.cx,v=t.message.message,h=v.severity,O=v.content,j=v.summary,w=v.detail,N=v.closable,E=v.life,P=v.sticky,S=v.className,x=v.style,k=v.contentClassName,C=v.contentStyle,I=v.icon,A=v.closeIcon,_=v.pt,R={index:t.index},T=M(M({},t.metaData),R),U=D(m((function(){X(null)}),E||3e3,!P),1)[0],J=function(e,r){return a(e,M({hostName:t.hostName},r))},X=function(e){U(),t.onClose&&t.onClose(t.message),e&&(e.preventDefault(),e.stopPropagation())},z=function(){if(!1!==N){var n=r("close"),o=c({className:d("uimessage.buttonicon"),"aria-hidden":!0},J("buttonicon",T),i(_,"buttonicon",M(M({},R),{},{hostName:t.hostName}))),a=l.getJSXIcon(A||e.createElement(y,o),M({},o),{props:t}),s=c({type:"button",className:d("uimessage.button"),"aria-label":n,onClick:X},J("button",T),i(_,"button",M(M({},R),{},{hostName:t.hostName})));return e.createElement("button",s,a,e.createElement(b,null))}return null}(),F=function(){if(t.message){var r=c({className:d("uimessage.icon")},J("icon",T),i(_,"icon",M(M({},R),{},{hostName:t.hostName}))),n=I;if(!I)switch(h){case"info":n=e.createElement(f,r);break;case"warn":n=e.createElement(p,r);break;case"error":n=e.createElement(g,r);break;case"success":n=e.createElement(u,r)}var o=l.getJSXIcon(n,M({},r),{props:t}),a=c({className:d("uimessage.summary")},J("summary",T),i(_,"summary",M(M({},R),{},{hostName:t.hostName}))),s=c({className:d("uimessage.detail")},J("detail",T),i(_,"detail",M(M({},R),{},{hostName:t.hostName})));return O||e.createElement(e.Fragment,null,o,e.createElement("span",a,j),e.createElement("span",s,w))}return null}(),H=c({className:s(k,d("uimessage.wrapper")),style:C},J("wrapper",T),i(_,"wrapper",M(M({},R),{},{hostName:t.hostName}))),Y=c({ref:n,className:s(S,d("uimessage.root",{severity:h})),style:x,onClick:function(){t.onClick&&t.onClick(t.message)}},J("root",T),i(_,"root",M(M({},R),{},{hostName:t.hostName})));return e.createElement("div",Y,e.createElement("div",H,F,z))})));function T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function U(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?T(Object(r),!0).forEach((function(t){x(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}R.displayName="UIMessage";var J=0,X=e.memo(e.forwardRef((function(r,o){var s=e.useContext(n),l=A.getProps(r,s),m=D(e.useState([]),2),u=m[0],p=m[1],f=e.useRef(null),y=U(U({props:l},l.__parentMetadata),{},{state:{messages:u}}),g=A.setMetaData(y);a(A.css.styles,g.isUnstyled,{name:"messages"});var b=function(e){e&&p((function(t){return v(t,e,!0)}))},v=function(e,t,r){var n;if(Array.isArray(t)){var o=t.reduce((function(e,t){return e.push({_pId:J++,message:t}),e}),[]);n=r&&e?[].concat(N(e),N(o)):o}else{var a={_pId:J++,message:t};n=r&&e?[].concat(N(e),[a]):[a]}return n},h=function(){p([])},O=function(e){p((function(t){return v(t,e,!1)}))},j=function(e){p((function(t){return t.filter((function(t){return t._pId!==e._pId}))})),l.onRemove&&l.onRemove(e.message)},w=function(e){j(e)};e.useImperativeHandle(o,(function(){return{props:l,show:b,replace:O,remove:j,clear:h,getElement:function(){return f.current}}}));var E=c({id:l.id,className:l.className,style:l.style},A.getOtherProps(l),g.ptm("root")),P=c({classNames:g.cx("transition"),unmountOnExit:!0,timeout:{enter:300,exit:300},options:l.transitionOptions},g.ptm("transition"));return e.createElement("div",d({ref:f},E),e.createElement(t,null,u&&u.map((function(t,r){var n=e.createRef();return e.createElement(i,d({nodeRef:n,key:t._pId},P),e.createElement(R,{hostName:"Messages",ref:n,message:t,onClick:l.onClick,onClose:w,ptCallbacks:g,metaData:y,index:r}))}))))})));X.displayName="Messages";export{X as Messages};
|
|
@@ -1,438 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { TransitionGroup } from 'react-transition-group';
|
|
4
|
-
import { localeOption, PrimeReactContext } from 'primereact/api';
|
|
5
|
-
import { ComponentBase, useHandleStyle } from 'primereact/componentbase';
|
|
6
|
-
import { CSSTransition } from 'primereact/csstransition';
|
|
7
|
-
import { classNames, mergeProps, IconUtils } from 'primereact/utils';
|
|
8
|
-
import { useTimeout } from 'primereact/hooks';
|
|
9
|
-
import { CheckIcon } from 'primereact/icons/check';
|
|
10
|
-
import { ExclamationTriangleIcon } from 'primereact/icons/exclamationtriangle';
|
|
11
|
-
import { InfoCircleIcon } from 'primereact/icons/infocircle';
|
|
12
|
-
import { TimesIcon } from 'primereact/icons/times';
|
|
13
|
-
import { TimesCircleIcon } from 'primereact/icons/timescircle';
|
|
14
|
-
import { Ripple } from 'primereact/ripple';
|
|
15
|
-
|
|
16
|
-
function _extends() {
|
|
17
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
18
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
19
|
-
var source = arguments[i];
|
|
20
|
-
for (var key in source) {
|
|
21
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
22
|
-
target[key] = source[key];
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
return target;
|
|
27
|
-
};
|
|
28
|
-
return _extends.apply(this, arguments);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function _arrayLikeToArray(arr, len) {
|
|
32
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
33
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
34
|
-
return arr2;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function _arrayWithoutHoles(arr) {
|
|
38
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function _iterableToArray(iter) {
|
|
42
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
46
|
-
if (!o) return;
|
|
47
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
48
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
49
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
50
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
51
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function _nonIterableSpread() {
|
|
55
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function _toConsumableArray(arr) {
|
|
59
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function _typeof(o) {
|
|
63
|
-
"@babel/helpers - typeof";
|
|
64
|
-
|
|
65
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
66
|
-
return typeof o;
|
|
67
|
-
} : function (o) {
|
|
68
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
69
|
-
}, _typeof(o);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function _toPrimitive(input, hint) {
|
|
73
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
74
|
-
var prim = input[Symbol.toPrimitive];
|
|
75
|
-
if (prim !== undefined) {
|
|
76
|
-
var res = prim.call(input, hint || "default");
|
|
77
|
-
if (_typeof(res) !== "object") return res;
|
|
78
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
79
|
-
}
|
|
80
|
-
return (hint === "string" ? String : Number)(input);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
function _toPropertyKey(arg) {
|
|
84
|
-
var key = _toPrimitive(arg, "string");
|
|
85
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function _defineProperty(obj, key, value) {
|
|
89
|
-
key = _toPropertyKey(key);
|
|
90
|
-
if (key in obj) {
|
|
91
|
-
Object.defineProperty(obj, key, {
|
|
92
|
-
value: value,
|
|
93
|
-
enumerable: true,
|
|
94
|
-
configurable: true,
|
|
95
|
-
writable: true
|
|
96
|
-
});
|
|
97
|
-
} else {
|
|
98
|
-
obj[key] = value;
|
|
99
|
-
}
|
|
100
|
-
return obj;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function _arrayWithHoles(arr) {
|
|
104
|
-
if (Array.isArray(arr)) return arr;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
function _iterableToArrayLimit(r, l) {
|
|
108
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
109
|
-
if (null != t) {
|
|
110
|
-
var e,
|
|
111
|
-
n,
|
|
112
|
-
i,
|
|
113
|
-
u,
|
|
114
|
-
a = [],
|
|
115
|
-
f = !0,
|
|
116
|
-
o = !1;
|
|
117
|
-
try {
|
|
118
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
119
|
-
if (Object(t) !== t) return;
|
|
120
|
-
f = !1;
|
|
121
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
122
|
-
} catch (r) {
|
|
123
|
-
o = !0, n = r;
|
|
124
|
-
} finally {
|
|
125
|
-
try {
|
|
126
|
-
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
127
|
-
} finally {
|
|
128
|
-
if (o) throw n;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
return a;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
function _nonIterableRest() {
|
|
136
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
function _slicedToArray(arr, i) {
|
|
140
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
var styles = "\n@layer primereact {\n .p-message-wrapper {\n display: flex;\n align-items: center;\n }\n\n .p-message-icon {\n flex-shrink: 0;\n }\n \n .p-message-close {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n \n .p-message-close.p-link {\n margin-left: auto;\n overflow: hidden;\n position: relative;\n }\n \n .p-message-enter {\n opacity: 0;\n }\n \n .p-message-enter-active {\n opacity: 1;\n transition: opacity .3s;\n }\n \n .p-message-exit {\n opacity: 1;\n max-height: 1000px;\n }\n \n .p-message-exit-active {\n opacity: 0;\n max-height: 0;\n margin: 0;\n overflow: hidden;\n transition: max-height .3s cubic-bezier(0, 1, 0, 1), opacity .3s, margin .3s;\n }\n \n .p-message-exit-active .p-message-close {\n display: none;\n }\n}\n";
|
|
144
|
-
var classes = {
|
|
145
|
-
uimessage: {
|
|
146
|
-
root: function root(_ref) {
|
|
147
|
-
var severity = _ref.severity;
|
|
148
|
-
return classNames('p-message p-component', _defineProperty({}, "p-message-".concat(severity), severity));
|
|
149
|
-
},
|
|
150
|
-
wrapper: 'p-message-wrapper',
|
|
151
|
-
detail: 'p-message-detail',
|
|
152
|
-
summary: 'p-message-summary',
|
|
153
|
-
icon: 'p-message-icon',
|
|
154
|
-
buttonicon: 'p-message-close-icon',
|
|
155
|
-
button: 'p-message-close p-link',
|
|
156
|
-
transition: 'p-message'
|
|
157
|
-
}
|
|
158
|
-
};
|
|
159
|
-
var MessagesBase = ComponentBase.extend({
|
|
160
|
-
defaultProps: {
|
|
161
|
-
__TYPE: 'Messages',
|
|
162
|
-
__parentMetadata: null,
|
|
163
|
-
id: null,
|
|
164
|
-
className: null,
|
|
165
|
-
style: null,
|
|
166
|
-
transitionOptions: null,
|
|
167
|
-
onRemove: null,
|
|
168
|
-
onClick: null,
|
|
169
|
-
children: undefined
|
|
170
|
-
},
|
|
171
|
-
css: {
|
|
172
|
-
classes: classes,
|
|
173
|
-
styles: styles
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
|
|
177
|
-
function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
178
|
-
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
179
|
-
var UIMessage = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
180
|
-
var messageInfo = props.message,
|
|
181
|
-
parentMetaData = props.metaData,
|
|
182
|
-
_props$ptCallbacks = props.ptCallbacks,
|
|
183
|
-
ptm = _props$ptCallbacks.ptm,
|
|
184
|
-
ptmo = _props$ptCallbacks.ptmo,
|
|
185
|
-
cx = _props$ptCallbacks.cx,
|
|
186
|
-
index = props.index;
|
|
187
|
-
var _messageInfo$message = messageInfo.message,
|
|
188
|
-
severity = _messageInfo$message.severity,
|
|
189
|
-
content = _messageInfo$message.content,
|
|
190
|
-
summary = _messageInfo$message.summary,
|
|
191
|
-
detail = _messageInfo$message.detail,
|
|
192
|
-
closable = _messageInfo$message.closable,
|
|
193
|
-
life = _messageInfo$message.life,
|
|
194
|
-
sticky = _messageInfo$message.sticky,
|
|
195
|
-
_className = _messageInfo$message.className,
|
|
196
|
-
style = _messageInfo$message.style,
|
|
197
|
-
_contentClassName = _messageInfo$message.contentClassName,
|
|
198
|
-
contentStyle = _messageInfo$message.contentStyle,
|
|
199
|
-
_icon = _messageInfo$message.icon,
|
|
200
|
-
_closeIcon = _messageInfo$message.closeIcon,
|
|
201
|
-
pt = _messageInfo$message.pt;
|
|
202
|
-
var params = {
|
|
203
|
-
index: index
|
|
204
|
-
};
|
|
205
|
-
var parentParams = _objectSpread$1(_objectSpread$1({}, parentMetaData), params);
|
|
206
|
-
var _useTimeout = useTimeout(function () {
|
|
207
|
-
onClose(null);
|
|
208
|
-
}, life || 3000, !sticky),
|
|
209
|
-
_useTimeout2 = _slicedToArray(_useTimeout, 1),
|
|
210
|
-
clearTimer = _useTimeout2[0];
|
|
211
|
-
var getPTOptions = function getPTOptions(key, options) {
|
|
212
|
-
return ptm(key, _objectSpread$1({
|
|
213
|
-
hostName: props.hostName
|
|
214
|
-
}, options));
|
|
215
|
-
};
|
|
216
|
-
var onClose = function onClose(event) {
|
|
217
|
-
clearTimer();
|
|
218
|
-
props.onClose && props.onClose(props.message);
|
|
219
|
-
if (event) {
|
|
220
|
-
event.preventDefault();
|
|
221
|
-
event.stopPropagation();
|
|
222
|
-
}
|
|
223
|
-
};
|
|
224
|
-
var onClick = function onClick() {
|
|
225
|
-
props.onClick && props.onClick(props.message);
|
|
226
|
-
};
|
|
227
|
-
var createCloseIcon = function createCloseIcon() {
|
|
228
|
-
if (closable !== false) {
|
|
229
|
-
var ariaLabel = localeOption('close');
|
|
230
|
-
var buttonIconProps = mergeProps({
|
|
231
|
-
className: cx('uimessage.buttonicon'),
|
|
232
|
-
'aria-hidden': true
|
|
233
|
-
}, getPTOptions('buttonicon', parentParams), ptmo(pt, 'buttonicon', _objectSpread$1(_objectSpread$1({}, params), {}, {
|
|
234
|
-
hostName: props.hostName
|
|
235
|
-
})));
|
|
236
|
-
var icon = _closeIcon || /*#__PURE__*/React.createElement(TimesIcon, buttonIconProps);
|
|
237
|
-
var _closeIcon2 = IconUtils.getJSXIcon(icon, _objectSpread$1({}, buttonIconProps), {
|
|
238
|
-
props: props
|
|
239
|
-
});
|
|
240
|
-
var buttonProps = mergeProps({
|
|
241
|
-
type: 'button',
|
|
242
|
-
className: cx('uimessage.button'),
|
|
243
|
-
'aria-label': ariaLabel,
|
|
244
|
-
onClick: onClose
|
|
245
|
-
}, getPTOptions('button', parentParams), ptmo(pt, 'button', _objectSpread$1(_objectSpread$1({}, params), {}, {
|
|
246
|
-
hostName: props.hostName
|
|
247
|
-
})));
|
|
248
|
-
return /*#__PURE__*/React.createElement("button", buttonProps, _closeIcon2, /*#__PURE__*/React.createElement(Ripple, null));
|
|
249
|
-
}
|
|
250
|
-
return null;
|
|
251
|
-
};
|
|
252
|
-
var createMessage = function createMessage() {
|
|
253
|
-
if (props.message) {
|
|
254
|
-
var iconProps = mergeProps({
|
|
255
|
-
className: cx('uimessage.icon')
|
|
256
|
-
}, getPTOptions('icon', parentParams), ptmo(pt, 'icon', _objectSpread$1(_objectSpread$1({}, params), {}, {
|
|
257
|
-
hostName: props.hostName
|
|
258
|
-
})));
|
|
259
|
-
var icon = _icon;
|
|
260
|
-
if (!_icon) {
|
|
261
|
-
switch (severity) {
|
|
262
|
-
case 'info':
|
|
263
|
-
icon = /*#__PURE__*/React.createElement(InfoCircleIcon, iconProps);
|
|
264
|
-
break;
|
|
265
|
-
case 'warn':
|
|
266
|
-
icon = /*#__PURE__*/React.createElement(ExclamationTriangleIcon, iconProps);
|
|
267
|
-
break;
|
|
268
|
-
case 'error':
|
|
269
|
-
icon = /*#__PURE__*/React.createElement(TimesCircleIcon, iconProps);
|
|
270
|
-
break;
|
|
271
|
-
case 'success':
|
|
272
|
-
icon = /*#__PURE__*/React.createElement(CheckIcon, iconProps);
|
|
273
|
-
break;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
var iconContent = IconUtils.getJSXIcon(icon, _objectSpread$1({}, iconProps), {
|
|
277
|
-
props: props
|
|
278
|
-
});
|
|
279
|
-
var summaryProps = mergeProps({
|
|
280
|
-
className: cx('uimessage.summary')
|
|
281
|
-
}, getPTOptions('summary', parentParams), ptmo(pt, 'summary', _objectSpread$1(_objectSpread$1({}, params), {}, {
|
|
282
|
-
hostName: props.hostName
|
|
283
|
-
})));
|
|
284
|
-
var detailProps = mergeProps({
|
|
285
|
-
className: cx('uimessage.detail')
|
|
286
|
-
}, getPTOptions('detail', parentParams), ptmo(pt, 'detail', _objectSpread$1(_objectSpread$1({}, params), {}, {
|
|
287
|
-
hostName: props.hostName
|
|
288
|
-
})));
|
|
289
|
-
return content || /*#__PURE__*/React.createElement(React.Fragment, null, iconContent, /*#__PURE__*/React.createElement("span", summaryProps, summary), /*#__PURE__*/React.createElement("span", detailProps, detail));
|
|
290
|
-
}
|
|
291
|
-
return null;
|
|
292
|
-
};
|
|
293
|
-
var closeIcon = createCloseIcon();
|
|
294
|
-
var message = createMessage();
|
|
295
|
-
var wrapperProps = mergeProps({
|
|
296
|
-
className: classNames(_contentClassName, cx('uimessage.wrapper')),
|
|
297
|
-
style: contentStyle
|
|
298
|
-
}, getPTOptions('wrapper', parentParams), ptmo(pt, 'wrapper', _objectSpread$1(_objectSpread$1({}, params), {}, {
|
|
299
|
-
hostName: props.hostName
|
|
300
|
-
})));
|
|
301
|
-
var rootProps = mergeProps({
|
|
302
|
-
ref: ref,
|
|
303
|
-
className: classNames(_className, cx('uimessage.root', {
|
|
304
|
-
severity: severity
|
|
305
|
-
})),
|
|
306
|
-
style: style,
|
|
307
|
-
onClick: onClick
|
|
308
|
-
}, getPTOptions('root', parentParams), ptmo(pt, 'root', _objectSpread$1(_objectSpread$1({}, params), {}, {
|
|
309
|
-
hostName: props.hostName
|
|
310
|
-
})));
|
|
311
|
-
return /*#__PURE__*/React.createElement("div", rootProps, /*#__PURE__*/React.createElement("div", wrapperProps, message, closeIcon));
|
|
312
|
-
}));
|
|
313
|
-
UIMessage.displayName = 'UIMessage';
|
|
314
|
-
|
|
315
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
316
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
317
|
-
var messageIdx = 0;
|
|
318
|
-
var Messages = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
319
|
-
var context = React.useContext(PrimeReactContext);
|
|
320
|
-
var props = MessagesBase.getProps(inProps, context);
|
|
321
|
-
var _React$useState = React.useState([]),
|
|
322
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
323
|
-
messagesState = _React$useState2[0],
|
|
324
|
-
setMessagesState = _React$useState2[1];
|
|
325
|
-
var elementRef = React.useRef(null);
|
|
326
|
-
var metaData = _objectSpread(_objectSpread({
|
|
327
|
-
props: props
|
|
328
|
-
}, props.__parentMetadata), {}, {
|
|
329
|
-
state: {
|
|
330
|
-
messages: messagesState
|
|
331
|
-
}
|
|
332
|
-
});
|
|
333
|
-
var ptCallbacks = MessagesBase.setMetaData(metaData);
|
|
334
|
-
useHandleStyle(MessagesBase.css.styles, ptCallbacks.isUnstyled, {
|
|
335
|
-
name: 'messages'
|
|
336
|
-
});
|
|
337
|
-
var show = function show(messageInfo) {
|
|
338
|
-
if (messageInfo) {
|
|
339
|
-
setMessagesState(function (prev) {
|
|
340
|
-
return assignIdentifiers(prev, messageInfo, true);
|
|
341
|
-
});
|
|
342
|
-
}
|
|
343
|
-
};
|
|
344
|
-
var assignIdentifiers = function assignIdentifiers(currentState, messageInfo, copy) {
|
|
345
|
-
var messages;
|
|
346
|
-
if (Array.isArray(messageInfo)) {
|
|
347
|
-
var multipleMessages = messageInfo.reduce(function (acc, message) {
|
|
348
|
-
acc.push({
|
|
349
|
-
_pId: messageIdx++,
|
|
350
|
-
message: message
|
|
351
|
-
});
|
|
352
|
-
return acc;
|
|
353
|
-
}, []);
|
|
354
|
-
if (copy) {
|
|
355
|
-
messages = currentState ? [].concat(_toConsumableArray(currentState), _toConsumableArray(multipleMessages)) : multipleMessages;
|
|
356
|
-
} else {
|
|
357
|
-
messages = multipleMessages;
|
|
358
|
-
}
|
|
359
|
-
} else {
|
|
360
|
-
var message = {
|
|
361
|
-
_pId: messageIdx++,
|
|
362
|
-
message: messageInfo
|
|
363
|
-
};
|
|
364
|
-
if (copy) {
|
|
365
|
-
messages = currentState ? [].concat(_toConsumableArray(currentState), [message]) : [message];
|
|
366
|
-
} else {
|
|
367
|
-
messages = [message];
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
return messages;
|
|
371
|
-
};
|
|
372
|
-
var clear = function clear() {
|
|
373
|
-
setMessagesState([]);
|
|
374
|
-
};
|
|
375
|
-
var replace = function replace(messageInfo) {
|
|
376
|
-
setMessagesState(function (prev) {
|
|
377
|
-
return assignIdentifiers(prev, messageInfo, false);
|
|
378
|
-
});
|
|
379
|
-
};
|
|
380
|
-
var remove = function remove(messageInfo) {
|
|
381
|
-
setMessagesState(function (prev) {
|
|
382
|
-
return prev.filter(function (msg) {
|
|
383
|
-
return msg._pId !== messageInfo._pId;
|
|
384
|
-
});
|
|
385
|
-
});
|
|
386
|
-
props.onRemove && props.onRemove(messageInfo.message);
|
|
387
|
-
};
|
|
388
|
-
var onClose = function onClose(messageInfo) {
|
|
389
|
-
remove(messageInfo);
|
|
390
|
-
};
|
|
391
|
-
React.useImperativeHandle(ref, function () {
|
|
392
|
-
return {
|
|
393
|
-
props: props,
|
|
394
|
-
show: show,
|
|
395
|
-
replace: replace,
|
|
396
|
-
remove: remove,
|
|
397
|
-
clear: clear,
|
|
398
|
-
getElement: function getElement() {
|
|
399
|
-
return elementRef.current;
|
|
400
|
-
}
|
|
401
|
-
};
|
|
402
|
-
});
|
|
403
|
-
var rootProps = mergeProps({
|
|
404
|
-
id: props.id,
|
|
405
|
-
className: props.className,
|
|
406
|
-
style: props.style
|
|
407
|
-
}, MessagesBase.getOtherProps(props), ptCallbacks.ptm('root'));
|
|
408
|
-
var transitionProps = mergeProps({
|
|
409
|
-
classNames: ptCallbacks.cx('transition'),
|
|
410
|
-
unmountOnExit: true,
|
|
411
|
-
timeout: {
|
|
412
|
-
enter: 300,
|
|
413
|
-
exit: 300
|
|
414
|
-
},
|
|
415
|
-
options: props.transitionOptions
|
|
416
|
-
}, ptCallbacks.ptm('transition'));
|
|
417
|
-
return /*#__PURE__*/React.createElement("div", _extends({
|
|
418
|
-
ref: elementRef
|
|
419
|
-
}, rootProps), /*#__PURE__*/React.createElement(TransitionGroup, null, messagesState && messagesState.map(function (message, index) {
|
|
420
|
-
var messageRef = /*#__PURE__*/React.createRef();
|
|
421
|
-
return /*#__PURE__*/React.createElement(CSSTransition, _extends({
|
|
422
|
-
nodeRef: messageRef,
|
|
423
|
-
key: message._pId
|
|
424
|
-
}, transitionProps), /*#__PURE__*/React.createElement(UIMessage, {
|
|
425
|
-
hostName: "Messages",
|
|
426
|
-
ref: messageRef,
|
|
427
|
-
message: message,
|
|
428
|
-
onClick: props.onClick,
|
|
429
|
-
onClose: onClose,
|
|
430
|
-
ptCallbacks: ptCallbacks,
|
|
431
|
-
metaData: metaData,
|
|
432
|
-
index: index
|
|
433
|
-
}));
|
|
434
|
-
})));
|
|
435
|
-
}));
|
|
436
|
-
Messages.displayName = 'Messages';
|
|
437
|
-
|
|
438
|
-
export { Messages };
|