primereact 8.7.2 → 9.0.0-beta.1
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.cjs.js +56 -57
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +168 -25
- package/accordion/accordion.esm.js +56 -57
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +56 -57
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +31 -69
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +11 -3
- package/api/api.esm.js +31 -69
- package/api/api.esm.min.js +1 -1
- package/api/api.js +31 -69
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +100 -157
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +385 -80
- package/autocomplete/autocomplete.esm.js +100 -157
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +100 -157
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +86 -14
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.d.ts +77 -14
- package/avatar/avatar.esm.js +86 -14
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +86 -14
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.cjs.js +0 -2
- package/avatargroup/avatargroup.d.ts +33 -1
- package/avatargroup/avatargroup.esm.js +0 -2
- package/avatargroup/avatargroup.js +0 -2
- package/badge/badge.cjs.js +27 -3
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.d.ts +48 -8
- package/badge/badge.esm.js +27 -3
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +27 -3
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +40 -54
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.d.ts +71 -8
- package/blockui/blockui.esm.js +40 -54
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +40 -54
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +6 -29
- package/breadcrumb/breadcrumb.d.ts +41 -3
- package/breadcrumb/breadcrumb.esm.js +6 -29
- package/breadcrumb/breadcrumb.js +6 -29
- package/button/button.cjs.js +29 -11
- package/button/button.cjs.min.js +1 -1
- package/button/button.d.ts +67 -15
- package/button/button.esm.js +29 -11
- package/button/button.esm.min.js +1 -1
- package/button/button.js +29 -11
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +203 -668
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +585 -110
- package/calendar/calendar.esm.js +203 -668
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +203 -668
- package/calendar/calendar.min.js +1 -1
- package/captcha/captcha.cjs.js +7 -21
- package/captcha/captcha.cjs.min.js +1 -1
- package/captcha/captcha.d.ts +77 -7
- package/captcha/captcha.esm.js +7 -21
- package/captcha/captcha.esm.min.js +1 -1
- package/captcha/captcha.js +7 -21
- package/captcha/captcha.min.js +1 -1
- package/card/card.cjs.js +0 -6
- package/card/card.d.ts +45 -7
- package/card/card.esm.js +0 -6
- package/card/card.js +0 -6
- package/carousel/carousel.cjs.js +42 -130
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.d.ts +138 -22
- package/carousel/carousel.esm.js +42 -130
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +42 -130
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +54 -133
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +177 -29
- package/cascadeselect/cascadeselect.esm.js +54 -133
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +54 -133
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +6 -7
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.d.ts +88 -10
- package/chart/chart.esm.js +6 -7
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +6 -7
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +31 -41
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +137 -33
- package/checkbox/checkbox.esm.js +32 -42
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +31 -41
- package/checkbox/checkbox.min.css +1 -1
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +26 -41
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +75 -7
- package/chip/chip.esm.js +26 -41
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +26 -41
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +39 -79
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +188 -36
- package/chips/chips.esm.js +39 -79
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +39 -79
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +81 -144
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +150 -31
- package/colorpicker/colorpicker.esm.js +81 -144
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +81 -144
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.d.ts +736 -134
- package/columngroup/columngroup.d.ts +30 -1
- package/confirmdialog/confirmdialog.cjs.js +60 -60
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +142 -18
- package/confirmdialog/confirmdialog.esm.js +60 -60
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +60 -60
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +78 -95
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.d.ts +165 -22
- package/confirmpopup/confirmpopup.esm.js +78 -95
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +78 -95
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +79 -121
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +79 -11
- package/contextmenu/contextmenu.esm.js +79 -121
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +79 -121
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +1048 -2092
- package/core/core.min.js +15 -15
- package/csstransition/csstransition.cjs.js +27 -13
- package/csstransition/csstransition.cjs.min.js +1 -1
- package/csstransition/csstransition.d.ts +31 -1
- package/csstransition/csstransition.esm.js +27 -13
- package/csstransition/csstransition.esm.min.js +1 -1
- package/csstransition/csstransition.js +27 -13
- package/csstransition/csstransition.min.js +1 -1
- package/datascroller/datascroller.cjs.js +32 -64
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.d.ts +102 -16
- package/datascroller/datascroller.esm.js +32 -64
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +32 -64
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +345 -1092
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +1259 -226
- package/datatable/datatable.esm.js +345 -1092
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +345 -1092
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +56 -68
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.d.ts +222 -43
- package/dataview/dataview.esm.js +56 -68
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +56 -68
- package/dataview/dataview.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +37 -46
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.d.ts +37 -1
- package/deferredcontent/deferredcontent.esm.js +37 -46
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +37 -46
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +99 -191
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +282 -51
- package/dialog/dialog.esm.js +100 -192
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +99 -191
- package/dialog/dialog.min.css +1 -1
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +0 -2
- package/divider/divider.d.ts +47 -10
- package/divider/divider.esm.js +0 -2
- package/divider/divider.js +0 -2
- package/dock/dock.cjs.js +31 -53
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.d.ts +68 -12
- package/dock/dock.esm.js +31 -53
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +31 -53
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +98 -209
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +338 -83
- package/dropdown/dropdown.esm.js +99 -210
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +98 -209
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +31 -22
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.d.ts +129 -12
- package/editor/editor.esm.js +31 -22
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +31 -22
- package/editor/editor.min.js +1 -1
- package/fieldset/fieldset.cjs.js +29 -51
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.d.ts +85 -7
- package/fieldset/fieldset.esm.js +29 -51
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +29 -51
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +49 -128
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +425 -62
- package/fileupload/fileupload.esm.js +49 -128
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +49 -128
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/galleria.cjs.js +57 -166
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.d.ts +198 -30
- package/galleria/galleria.esm.js +57 -166
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +57 -166
- package/galleria/galleria.min.js +1 -1
- package/gmap/gmap.cjs.js +2 -23
- package/gmap/gmap.d.ts +91 -5
- package/gmap/gmap.esm.js +2 -23
- package/gmap/gmap.js +2 -23
- package/hooks/hooks.cjs.js +101 -131
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.d.ts +114 -7
- package/hooks/hooks.esm.js +101 -131
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +101 -131
- package/hooks/hooks.min.js +1 -1
- package/image/image.cjs.js +41 -67
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +91 -11
- package/image/image.esm.js +41 -67
- package/image/image.esm.min.js +1 -1
- package/image/image.js +41 -67
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +26 -45
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.d.ts +101 -9
- package/inplace/inplace.esm.js +26 -45
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +26 -45
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +22 -113
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.d.ts +120 -28
- package/inputmask/inputmask.esm.js +23 -114
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +22 -113
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +93 -267
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +266 -58
- package/inputnumber/inputnumber.esm.js +94 -268
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +93 -267
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +30 -38
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.d.ts +118 -27
- package/inputswitch/inputswitch.esm.js +31 -39
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +30 -38
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +0 -11
- package/inputtext/inputtext.d.ts +58 -9
- package/inputtext/inputtext.esm.js +0 -11
- package/inputtext/inputtext.js +0 -11
- package/inputtextarea/inputtextarea.cjs.js +0 -20
- package/inputtextarea/inputtextarea.d.ts +53 -9
- package/inputtextarea/inputtextarea.esm.js +0 -20
- package/inputtextarea/inputtextarea.js +0 -20
- package/keyfilter/keyfilter.cjs.js +4 -15
- package/keyfilter/keyfilter.esm.js +4 -15
- package/keyfilter/keyfilter.js +4 -15
- package/keyfilter/keyfilteroptions.d.ts +15 -0
- package/knob/knob.cjs.js +74 -106
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.d.ts +127 -20
- package/knob/knob.esm.js +74 -106
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +74 -106
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +97 -125
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.d.ts +270 -42
- package/listbox/listbox.esm.js +98 -126
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +97 -125
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +36 -99
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.d.ts +50 -11
- package/megamenu/megamenu.esm.js +36 -99
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +36 -99
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +85 -138
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.d.ts +187 -33
- package/mention/mention.esm.js +85 -138
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +85 -138
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +41 -73
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +89 -12
- package/menu/menu.esm.js +41 -73
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +41 -73
- package/menu/menu.min.css +1 -1
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +49 -99
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.d.ts +53 -8
- package/menubar/menubar.esm.js +49 -99
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +49 -99
- package/menubar/menubar.min.js +1 -1
- package/menuitem/menuitem.d.ts +114 -19
- package/message/message.cjs.js +0 -7
- package/message/message.d.ts +50 -11
- package/message/message.esm.js +0 -7
- package/message/message.js +0 -7
- package/messages/messages.cjs.js +39 -67
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +91 -11
- package/messages/messages.esm.js +39 -67
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +39 -67
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +148 -212
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +433 -81
- package/multiselect/multiselect.esm.js +149 -213
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +148 -212
- package/multiselect/multiselect.min.css +1 -1
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +61 -53
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +157 -22
- package/multistatecheckbox/multistatecheckbox.esm.js +62 -54
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +61 -53
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +38 -103
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.d.ts +113 -16
- package/orderlist/orderlist.esm.js +38 -103
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +38 -103
- package/orderlist/orderlist.min.css +1 -1
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +26 -52
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.d.ts +107 -16
- package/organizationchart/organizationchart.esm.js +26 -52
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +26 -52
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +44 -80
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +89 -15
- package/overlaypanel/overlaypanel.esm.js +44 -80
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +44 -80
- package/overlaypanel/overlaypanel.min.css +1 -1
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/overlayservice/overlayservice.d.ts +52 -7
- package/package.json +2 -2
- package/paginator/paginator.cjs.js +46 -87
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.d.ts +409 -44
- package/paginator/paginator.esm.js +46 -87
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +46 -87
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +29 -50
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.d.ts +142 -16
- package/panel/panel.esm.js +29 -50
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +29 -50
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +35 -81
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +46 -4
- package/panelmenu/panelmenu.esm.js +35 -81
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +35 -81
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/password.cjs.js +61 -108
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +177 -37
- package/password/password.esm.js +61 -108
- package/password/password.esm.min.js +1 -1
- package/password/password.js +61 -108
- package/password/password.min.css +1 -1
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +48 -159
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.d.ts +272 -46
- package/picklist/picklist.esm.js +48 -159
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +48 -159
- package/picklist/picklist.min.js +1 -1
- package/portal/portal.cjs.js +26 -31
- package/portal/portal.cjs.min.js +1 -1
- package/portal/portal.esm.js +26 -31
- package/portal/portal.esm.min.js +1 -1
- package/portal/portal.js +26 -31
- package/portal/portal.min.js +1 -1
- package/primereact.all.cjs.js +2541 -7484
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +2541 -7484
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +2541 -7484
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +0 -7
- package/progressbar/progressbar.d.ts +60 -11
- package/progressbar/progressbar.esm.js +0 -7
- package/progressbar/progressbar.js +0 -7
- package/progressspinner/progressspinner.cjs.js +0 -2
- package/progressspinner/progressspinner.d.ts +47 -4
- package/progressspinner/progressspinner.esm.js +0 -2
- package/progressspinner/progressspinner.js +0 -2
- package/radiobutton/radiobutton.cjs.js +35 -41
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.d.ts +99 -29
- package/radiobutton/radiobutton.esm.js +35 -41
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +35 -41
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +27 -14
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.d.ts +101 -24
- package/rating/rating.esm.js +27 -14
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +27 -14
- package/rating/rating.min.js +1 -1
- package/resources/primereact.css +121 -64
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +5 -9
- package/resources/themes/arya-green/theme.css +4 -10
- package/resources/themes/arya-orange/theme.css +4 -9
- package/resources/themes/arya-purple/theme.css +4 -9
- package/resources/themes/bootstrap4-dark-blue/theme.css +4 -9
- package/resources/themes/bootstrap4-dark-purple/theme.css +4 -9
- package/resources/themes/bootstrap4-light-blue/theme.css +4 -9
- package/resources/themes/bootstrap4-light-purple/theme.css +4 -10
- package/resources/themes/fluent-light/theme.css +4 -10
- package/resources/themes/lara-dark-blue/theme.css +4 -9
- package/resources/themes/lara-dark-indigo/theme.css +4 -10
- package/resources/themes/lara-dark-purple/theme.css +4 -9
- package/resources/themes/lara-dark-teal/theme.css +4 -10
- package/resources/themes/lara-light-blue/theme.css +4 -9
- package/resources/themes/lara-light-indigo/theme.css +4 -9
- package/resources/themes/lara-light-purple/theme.css +4 -9
- package/resources/themes/lara-light-teal/theme.css +4 -9
- package/resources/themes/luna-amber/theme.css +5 -9
- package/resources/themes/luna-blue/theme.css +4 -9
- package/resources/themes/luna-green/theme.css +5 -9
- package/resources/themes/luna-pink/theme.css +4 -9
- package/resources/themes/md-dark-deeppurple/theme.css +4 -9
- package/resources/themes/md-dark-indigo/theme.css +5 -9
- package/resources/themes/md-light-deeppurple/theme.css +5 -9
- package/resources/themes/md-light-indigo/theme.css +5 -9
- package/resources/themes/mdc-dark-deeppurple/theme.css +5 -9
- package/resources/themes/mdc-dark-indigo/theme.css +4 -9
- package/resources/themes/mdc-light-deeppurple/theme.css +5 -9
- package/resources/themes/mdc-light-indigo/theme.css +4 -9
- package/resources/themes/mira/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/mira/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/mira/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/mira/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/mira/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/mira/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/mira/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/mira/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/mira/theme.css +6237 -0
- package/resources/themes/nano/theme.css +6009 -0
- package/resources/themes/nova/theme.css +4 -9
- package/resources/themes/nova-accent/theme.css +5 -9
- package/resources/themes/nova-alt/theme.css +4 -9
- package/resources/themes/rhea/theme.css +5 -9
- package/resources/themes/saga-blue/theme.css +4 -9
- package/resources/themes/saga-green/theme.css +5 -9
- package/resources/themes/saga-orange/theme.css +5 -9
- package/resources/themes/saga-purple/theme.css +5 -9
- package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-300.woff +0 -0
- package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-300.woff2 +0 -0
- package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-700.woff +0 -0
- package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-700.woff2 +0 -0
- package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-regular.woff +0 -0
- package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-regular.woff2 +0 -0
- package/resources/themes/soho-dark/theme.css +6002 -0
- package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-300.woff +0 -0
- package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-300.woff2 +0 -0
- package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-700.woff +0 -0
- package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-700.woff2 +0 -0
- package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-regular.woff +0 -0
- package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-regular.woff2 +0 -0
- package/resources/themes/soho-light/theme.css +6056 -0
- package/resources/themes/vela-blue/theme.css +4 -9
- package/resources/themes/vela-green/theme.css +4 -9
- package/resources/themes/vela-orange/theme.css +4 -9
- package/resources/themes/vela-purple/theme.css +5 -9
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-300.woff +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-300.woff2 +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-600.woff +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-600.woff2 +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-700.woff +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-700.woff2 +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-regular.woff +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-regular.woff2 +0 -0
- package/resources/themes/viva-dark/theme.css +6164 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-300.woff +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-300.woff2 +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-600.woff +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-600.woff2 +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-700.woff +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-700.woff2 +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-regular.woff +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-regular.woff2 +0 -0
- package/resources/themes/viva-light/theme.css +6164 -0
- package/ripple/ripple.cjs.js +0 -12
- package/ripple/ripple.d.ts +29 -1
- package/ripple/ripple.esm.js +0 -12
- package/ripple/ripple.js +0 -12
- package/row/row.cjs.js +0 -2
- package/row/row.d.ts +37 -3
- package/row/row.esm.js +0 -2
- package/row/row.js +0 -2
- package/scrollpanel/scrollpanel.cjs.js +2 -16
- package/scrollpanel/scrollpanel.d.ts +45 -1
- package/scrollpanel/scrollpanel.esm.js +2 -16
- package/scrollpanel/scrollpanel.js +2 -16
- package/scrolltop/scrolltop.cjs.js +44 -57
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.d.ts +70 -10
- package/scrolltop/scrolltop.esm.js +44 -57
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +44 -57
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +29 -53
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.d.ts +111 -32
- package/selectbutton/selectbutton.esm.js +30 -54
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +29 -53
- package/selectbutton/selectbutton.min.js +1 -1
- package/selectitem/selectitem.d.ts +34 -0
- package/sidebar/sidebar.cjs.js +65 -84
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +120 -22
- package/sidebar/sidebar.esm.js +65 -84
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +65 -84
- package/sidebar/sidebar.min.css +1 -1
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +0 -2
- package/skeleton/skeleton.d.ts +61 -11
- package/skeleton/skeleton.esm.js +0 -2
- package/skeleton/skeleton.js +0 -2
- package/slidemenu/slidemenu.cjs.js +73 -87
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +132 -18
- package/slidemenu/slidemenu.esm.js +73 -87
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +73 -87
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +61 -96
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.d.ts +101 -18
- package/slider/slider.esm.js +61 -96
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +61 -96
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +70 -89
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.d.ts +149 -20
- package/speeddial/speeddial.esm.js +70 -89
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +70 -89
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +48 -81
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +131 -23
- package/splitbutton/splitbutton.esm.js +48 -81
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +48 -81
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +72 -85
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.d.ts +98 -12
- package/splitter/splitter.esm.js +72 -85
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +72 -85
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +0 -14
- package/steps/steps.d.ts +67 -6
- package/steps/steps.esm.js +0 -14
- package/steps/steps.js +0 -14
- package/styleclass/styleclass.cjs.js +75 -111
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.d.ts +77 -12
- package/styleclass/styleclass.esm.js +75 -111
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +75 -111
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +33 -54
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.d.ts +62 -5
- package/tabmenu/tabmenu.esm.js +33 -54
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +33 -54
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +84 -103
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +213 -27
- package/tabview/tabview.esm.js +84 -103
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +84 -103
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +27 -4
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.d.ts +50 -6
- package/tag/tag.esm.js +27 -4
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +27 -4
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +40 -63
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.d.ts +45 -3
- package/terminal/terminal.esm.js +41 -64
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +40 -63
- package/terminal/terminal.min.js +1 -1
- package/terminalservice/terminalservice.d.ts +42 -4
- package/tieredmenu/tieredmenu.cjs.js +68 -111
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +77 -12
- package/tieredmenu/tieredmenu.esm.js +68 -111
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +68 -111
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +33 -17
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.d.ts +62 -13
- package/timeline/timeline.esm.js +33 -17
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +33 -17
- package/timeline/timeline.min.js +1 -1
- package/toast/toast.cjs.js +85 -100
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +134 -27
- package/toast/toast.esm.js +85 -100
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +85 -100
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +4 -8
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.d.ts +122 -15
- package/togglebutton/togglebutton.esm.js +5 -9
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +4 -8
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +13 -9
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.d.ts +55 -5
- package/toolbar/toolbar.esm.js +13 -9
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +13 -9
- package/toolbar/toolbar.min.css +1 -1
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +111 -164
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.d.ts +73 -9
- package/tooltip/tooltip.esm.js +111 -164
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +111 -164
- package/tooltip/tooltip.min.css +1 -1
- package/tooltip/tooltip.min.js +1 -1
- package/tooltip/tooltipoptions.d.ts +350 -31
- package/tree/tree.cjs.js +68 -223
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +435 -71
- package/tree/tree.esm.js +68 -223
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +68 -223
- package/tree/tree.min.js +1 -1
- package/treenode/treenode.d.ts +62 -12
- package/treeselect/treeselect.cjs.js +124 -168
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +327 -77
- package/treeselect/treeselect.esm.js +125 -169
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +124 -168
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +143 -461
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +501 -112
- package/treetable/treetable.esm.js +143 -461
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +143 -461
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +32 -39
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.d.ts +72 -20
- package/tristatecheckbox/tristatecheckbox.esm.js +33 -40
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +32 -39
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/ts-helpers.d.ts +24 -0
- package/utils/utils.cjs.js +137 -339
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +8 -1
- package/utils/utils.esm.js +137 -339
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +137 -339
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +108 -204
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.d.ts +351 -59
- package/virtualscroller/virtualscroller.esm.js +108 -204
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +108 -204
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +173 -41
package/toast/toast.cjs.js
CHANGED
|
@@ -38,14 +38,12 @@ function _extends() {
|
|
|
38
38
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
39
39
|
for (var i = 1; i < arguments.length; i++) {
|
|
40
40
|
var source = arguments[i];
|
|
41
|
-
|
|
42
41
|
for (var key in source) {
|
|
43
42
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
44
43
|
target[key] = source[key];
|
|
45
44
|
}
|
|
46
45
|
}
|
|
47
46
|
}
|
|
48
|
-
|
|
49
47
|
return target;
|
|
50
48
|
};
|
|
51
49
|
return _extends.apply(this, arguments);
|
|
@@ -53,11 +51,9 @@ function _extends() {
|
|
|
53
51
|
|
|
54
52
|
function _arrayLikeToArray(arr, len) {
|
|
55
53
|
if (len == null || len > arr.length) len = arr.length;
|
|
56
|
-
|
|
57
54
|
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
58
55
|
arr2[i] = arr[i];
|
|
59
56
|
}
|
|
60
|
-
|
|
61
57
|
return arr2;
|
|
62
58
|
}
|
|
63
59
|
|
|
@@ -91,33 +87,33 @@ function _arrayWithHoles(arr) {
|
|
|
91
87
|
}
|
|
92
88
|
|
|
93
89
|
function _iterableToArrayLimit(arr, i) {
|
|
94
|
-
var _i =
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
try {
|
|
104
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
105
|
-
_arr.push(_s.value);
|
|
106
|
-
|
|
107
|
-
if (i && _arr.length === i) break;
|
|
108
|
-
}
|
|
109
|
-
} catch (err) {
|
|
110
|
-
_d = true;
|
|
111
|
-
_e = err;
|
|
112
|
-
} finally {
|
|
90
|
+
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
91
|
+
if (null != _i) {
|
|
92
|
+
var _s,
|
|
93
|
+
_e,
|
|
94
|
+
_x,
|
|
95
|
+
_r,
|
|
96
|
+
_arr = [],
|
|
97
|
+
_n = !0,
|
|
98
|
+
_d = !1;
|
|
113
99
|
try {
|
|
114
|
-
if (
|
|
100
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
101
|
+
if (Object(_i) !== _i) return;
|
|
102
|
+
_n = !1;
|
|
103
|
+
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) {
|
|
104
|
+
;
|
|
105
|
+
}
|
|
106
|
+
} catch (err) {
|
|
107
|
+
_d = !0, _e = err;
|
|
115
108
|
} finally {
|
|
116
|
-
|
|
109
|
+
try {
|
|
110
|
+
if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
|
|
111
|
+
} finally {
|
|
112
|
+
if (_d) throw _e;
|
|
113
|
+
}
|
|
117
114
|
}
|
|
115
|
+
return _arr;
|
|
118
116
|
}
|
|
119
|
-
|
|
120
|
-
return _arr;
|
|
121
117
|
}
|
|
122
118
|
|
|
123
119
|
function _nonIterableRest() {
|
|
@@ -128,7 +124,34 @@ function _slicedToArray(arr, i) {
|
|
|
128
124
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
129
125
|
}
|
|
130
126
|
|
|
127
|
+
function _typeof(obj) {
|
|
128
|
+
"@babel/helpers - typeof";
|
|
129
|
+
|
|
130
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
131
|
+
return typeof obj;
|
|
132
|
+
} : function (obj) {
|
|
133
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
134
|
+
}, _typeof(obj);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function _toPrimitive(input, hint) {
|
|
138
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
139
|
+
var prim = input[Symbol.toPrimitive];
|
|
140
|
+
if (prim !== undefined) {
|
|
141
|
+
var res = prim.call(input, hint || "default");
|
|
142
|
+
if (_typeof(res) !== "object") return res;
|
|
143
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
144
|
+
}
|
|
145
|
+
return (hint === "string" ? String : Number)(input);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function _toPropertyKey(arg) {
|
|
149
|
+
var key = _toPrimitive(arg, "string");
|
|
150
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
151
|
+
}
|
|
152
|
+
|
|
131
153
|
function _defineProperty(obj, key, value) {
|
|
154
|
+
key = _toPropertyKey(key);
|
|
132
155
|
if (key in obj) {
|
|
133
156
|
Object.defineProperty(obj, key, {
|
|
134
157
|
value: value,
|
|
@@ -139,7 +162,6 @@ function _defineProperty(obj, key, value) {
|
|
|
139
162
|
} else {
|
|
140
163
|
obj[key] = value;
|
|
141
164
|
}
|
|
142
|
-
|
|
143
165
|
return obj;
|
|
144
166
|
}
|
|
145
167
|
|
|
@@ -149,10 +171,9 @@ function _defineProperties(target, props) {
|
|
|
149
171
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
150
172
|
descriptor.configurable = true;
|
|
151
173
|
if ("value" in descriptor) descriptor.writable = true;
|
|
152
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
174
|
+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
153
175
|
}
|
|
154
176
|
}
|
|
155
|
-
|
|
156
177
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
157
178
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
158
179
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
@@ -191,23 +212,14 @@ var FilterMatchMode = Object.freeze({
|
|
|
191
212
|
var PrimeReact = /*#__PURE__*/_createClass(function PrimeReact() {
|
|
192
213
|
_classCallCheck(this, PrimeReact);
|
|
193
214
|
});
|
|
194
|
-
|
|
195
215
|
_defineProperty(PrimeReact, "ripple", false);
|
|
196
|
-
|
|
197
216
|
_defineProperty(PrimeReact, "inputStyle", 'outlined');
|
|
198
|
-
|
|
199
217
|
_defineProperty(PrimeReact, "locale", 'en');
|
|
200
|
-
|
|
201
218
|
_defineProperty(PrimeReact, "appendTo", null);
|
|
202
|
-
|
|
203
219
|
_defineProperty(PrimeReact, "cssTransition", true);
|
|
204
|
-
|
|
205
220
|
_defineProperty(PrimeReact, "autoZIndex", true);
|
|
206
|
-
|
|
207
221
|
_defineProperty(PrimeReact, "nonce", null);
|
|
208
|
-
|
|
209
222
|
_defineProperty(PrimeReact, "nullSortOrder", 1);
|
|
210
|
-
|
|
211
223
|
_defineProperty(PrimeReact, "zIndex", {
|
|
212
224
|
modal: 1100,
|
|
213
225
|
overlay: 1000,
|
|
@@ -215,7 +227,6 @@ _defineProperty(PrimeReact, "zIndex", {
|
|
|
215
227
|
tooltip: 1100,
|
|
216
228
|
toast: 1200
|
|
217
229
|
});
|
|
218
|
-
|
|
219
230
|
_defineProperty(PrimeReact, "filterMatchModeOptions", {
|
|
220
231
|
text: [FilterMatchMode.STARTS_WITH, FilterMatchMode.CONTAINS, FilterMatchMode.NOT_CONTAINS, FilterMatchMode.ENDS_WITH, FilterMatchMode.EQUALS, FilterMatchMode.NOT_EQUALS],
|
|
221
232
|
numeric: [FilterMatchMode.EQUALS, FilterMatchMode.NOT_EQUALS, FilterMatchMode.LESS_THAN, FilterMatchMode.LESS_THAN_OR_EQUAL_TO, FilterMatchMode.GREATER_THAN, FilterMatchMode.GREATER_THAN_OR_EQUAL_TO],
|
|
@@ -284,87 +295,78 @@ var locales = {
|
|
|
284
295
|
}
|
|
285
296
|
}
|
|
286
297
|
};
|
|
287
|
-
|
|
288
298
|
function localeOption(key, locale) {
|
|
289
299
|
var _locale = locale || PrimeReact.locale;
|
|
290
|
-
|
|
291
300
|
try {
|
|
292
301
|
return localeOptions(_locale)[key];
|
|
293
302
|
} catch (error) {
|
|
294
303
|
throw new Error("The ".concat(key, " option is not found in the current locale('").concat(_locale, "')."));
|
|
295
304
|
}
|
|
296
305
|
}
|
|
297
|
-
|
|
298
306
|
function localeOptions(locale) {
|
|
299
307
|
var _locale = locale || PrimeReact.locale;
|
|
300
|
-
|
|
301
308
|
return locales[_locale];
|
|
302
309
|
}
|
|
303
310
|
|
|
304
311
|
var ToastMessage = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
|
|
305
312
|
var messageInfo = props.messageInfo;
|
|
306
313
|
var _messageInfo$message = messageInfo.message,
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
314
|
+
severity = _messageInfo$message.severity,
|
|
315
|
+
content = _messageInfo$message.content,
|
|
316
|
+
summary = _messageInfo$message.summary,
|
|
317
|
+
detail = _messageInfo$message.detail,
|
|
318
|
+
closable = _messageInfo$message.closable,
|
|
319
|
+
life = _messageInfo$message.life,
|
|
320
|
+
sticky = _messageInfo$message.sticky,
|
|
321
|
+
_className = _messageInfo$message.className,
|
|
322
|
+
style = _messageInfo$message.style,
|
|
323
|
+
_contentClassName = _messageInfo$message.contentClassName,
|
|
324
|
+
contentStyle = _messageInfo$message.contentStyle;
|
|
319
325
|
var _React$useState = React__namespace.useState(false),
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
326
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
327
|
+
focused = _React$useState2[0],
|
|
328
|
+
setFocused = _React$useState2[1];
|
|
324
329
|
var _useTimeout = hooks.useTimeout(function () {
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
+
onClose();
|
|
331
|
+
}, life || 3000, !sticky && !focused),
|
|
332
|
+
_useTimeout2 = _slicedToArray(_useTimeout, 1),
|
|
333
|
+
clearTimer = _useTimeout2[0];
|
|
330
334
|
var onClose = function onClose() {
|
|
331
335
|
clearTimer();
|
|
332
336
|
props.onClose && props.onClose(messageInfo);
|
|
333
337
|
};
|
|
334
|
-
|
|
335
338
|
var onClick = function onClick(event) {
|
|
336
339
|
if (props.onClick && !(utils.DomHandler.hasClass(event.target, 'p-toast-icon-close') || utils.DomHandler.hasClass(event.target, 'p-toast-icon-close-icon'))) {
|
|
337
340
|
props.onClick(messageInfo.message);
|
|
338
341
|
}
|
|
339
342
|
};
|
|
340
|
-
|
|
341
343
|
var onMouseEnter = function onMouseEnter(event) {
|
|
342
|
-
props.onMouseEnter && props.onMouseEnter(event);
|
|
344
|
+
props.onMouseEnter && props.onMouseEnter(event);
|
|
343
345
|
|
|
346
|
+
// do not continue if the user has canceled the event
|
|
344
347
|
if (event.defaultPrevented) {
|
|
345
348
|
return;
|
|
346
|
-
}
|
|
347
|
-
|
|
349
|
+
}
|
|
348
350
|
|
|
351
|
+
// stop timer while user has focused message
|
|
349
352
|
if (!sticky) {
|
|
350
353
|
clearTimer();
|
|
351
354
|
setFocused(true);
|
|
352
355
|
}
|
|
353
356
|
};
|
|
354
|
-
|
|
355
357
|
var onMouseLeave = function onMouseLeave(event) {
|
|
356
|
-
props.onMouseLeave && props.onMouseLeave(event);
|
|
358
|
+
props.onMouseLeave && props.onMouseLeave(event);
|
|
357
359
|
|
|
360
|
+
// do not continue if the user has canceled the event
|
|
358
361
|
if (event.defaultPrevented) {
|
|
359
362
|
return;
|
|
360
|
-
}
|
|
361
|
-
|
|
363
|
+
}
|
|
362
364
|
|
|
365
|
+
// restart timer when user has left message
|
|
363
366
|
if (!sticky) {
|
|
364
367
|
setFocused(false);
|
|
365
368
|
}
|
|
366
369
|
};
|
|
367
|
-
|
|
368
370
|
var createCloseIcon = function createCloseIcon() {
|
|
369
371
|
if (closable !== false) {
|
|
370
372
|
return /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement("button", {
|
|
@@ -377,10 +379,8 @@ var ToastMessage = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
|
|
|
377
379
|
"aria-hidden": "true"
|
|
378
380
|
}), /*#__PURE__*/React__namespace.createElement(ripple.Ripple, null)));
|
|
379
381
|
}
|
|
380
|
-
|
|
381
382
|
return null;
|
|
382
383
|
};
|
|
383
|
-
|
|
384
384
|
var createMessage = function createMessage() {
|
|
385
385
|
if (messageInfo) {
|
|
386
386
|
var contentEl = utils.ObjectUtils.getJSXElement(content, {
|
|
@@ -404,10 +404,8 @@ var ToastMessage = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
|
|
|
404
404
|
className: "p-toast-detail"
|
|
405
405
|
}, detail)));
|
|
406
406
|
}
|
|
407
|
-
|
|
408
407
|
return null;
|
|
409
408
|
};
|
|
410
|
-
|
|
411
409
|
var className = utils.classNames('p-toast-message', _defineProperty({}, "p-toast-message-".concat(severity), severity), _className);
|
|
412
410
|
var contentClassName = utils.classNames('p-toast-message-content', _contentClassName);
|
|
413
411
|
var message = createMessage();
|
|
@@ -432,12 +430,10 @@ ToastMessage.displayName = 'ToastMessage';
|
|
|
432
430
|
var messageIdx = 0;
|
|
433
431
|
var Toast = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
|
|
434
432
|
var _React$useState = React__namespace.useState([]),
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
433
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
434
|
+
messagesState = _React$useState2[0],
|
|
435
|
+
setMessagesState = _React$useState2[1];
|
|
439
436
|
var containerRef = React__namespace.useRef(null);
|
|
440
|
-
|
|
441
437
|
var show = function show(messageInfo) {
|
|
442
438
|
if (messageInfo) {
|
|
443
439
|
var messages = assignIdentifiers(messageInfo, true);
|
|
@@ -445,10 +441,8 @@ var Toast = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
|
|
|
445
441
|
setMessagesState(messages);
|
|
446
442
|
}
|
|
447
443
|
};
|
|
448
|
-
|
|
449
444
|
var assignIdentifiers = function assignIdentifiers(messageInfo, copy) {
|
|
450
445
|
var messages;
|
|
451
|
-
|
|
452
446
|
if (Array.isArray(messageInfo)) {
|
|
453
447
|
var multipleMessages = messageInfo.reduce(function (acc, message) {
|
|
454
448
|
acc.push({
|
|
@@ -457,7 +451,6 @@ var Toast = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
|
|
|
457
451
|
});
|
|
458
452
|
return acc;
|
|
459
453
|
}, []);
|
|
460
|
-
|
|
461
454
|
if (copy) {
|
|
462
455
|
messages = messagesState ? [].concat(_toConsumableArray(messagesState), _toConsumableArray(multipleMessages)) : multipleMessages;
|
|
463
456
|
} else {
|
|
@@ -468,27 +461,22 @@ var Toast = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
|
|
|
468
461
|
_pId: messageIdx++,
|
|
469
462
|
message: messageInfo
|
|
470
463
|
};
|
|
471
|
-
|
|
472
464
|
if (copy) {
|
|
473
465
|
messages = messagesState ? [].concat(_toConsumableArray(messagesState), [message]) : [message];
|
|
474
466
|
} else {
|
|
475
467
|
messages = [message];
|
|
476
468
|
}
|
|
477
469
|
}
|
|
478
|
-
|
|
479
470
|
return messages;
|
|
480
471
|
};
|
|
481
|
-
|
|
482
472
|
var clear = function clear() {
|
|
483
473
|
utils.ZIndexUtils.clear(containerRef.current);
|
|
484
474
|
setMessagesState([]);
|
|
485
475
|
};
|
|
486
|
-
|
|
487
476
|
var replace = function replace(messageInfo) {
|
|
488
477
|
var replaced = assignIdentifiers(messageInfo, false);
|
|
489
478
|
setMessagesState(replaced);
|
|
490
479
|
};
|
|
491
|
-
|
|
492
480
|
var remove = function remove(messageInfo) {
|
|
493
481
|
var messages = messagesState.filter(function (msg) {
|
|
494
482
|
return msg._pId !== messageInfo._pId;
|
|
@@ -496,20 +484,16 @@ var Toast = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
|
|
|
496
484
|
setMessagesState(messages);
|
|
497
485
|
props.onRemove && props.onRemove(messageInfo.message);
|
|
498
486
|
};
|
|
499
|
-
|
|
500
487
|
var onClose = function onClose(messageInfo) {
|
|
501
488
|
remove(messageInfo);
|
|
502
489
|
};
|
|
503
|
-
|
|
504
490
|
var onEntered = function onEntered() {
|
|
505
491
|
props.onShow && props.onShow();
|
|
506
492
|
};
|
|
507
|
-
|
|
508
493
|
var onExited = function onExited() {
|
|
509
494
|
messagesState.length === 1 && utils.ZIndexUtils.clear(containerRef.current);
|
|
510
495
|
props.onHide && props.onHide();
|
|
511
496
|
};
|
|
512
|
-
|
|
513
497
|
hooks.useUnmountEffect(function () {
|
|
514
498
|
utils.ZIndexUtils.clear(containerRef.current);
|
|
515
499
|
});
|
|
@@ -525,16 +509,18 @@ var Toast = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
|
|
|
525
509
|
}
|
|
526
510
|
};
|
|
527
511
|
});
|
|
528
|
-
|
|
529
512
|
var createElement = function createElement() {
|
|
530
513
|
var otherProps = utils.ObjectUtils.findDiffKeys(props, Toast.defaultProps);
|
|
531
|
-
var className = utils.classNames('p-toast p-component p-toast-' + props.position, props.className
|
|
514
|
+
var className = utils.classNames('p-toast p-component p-toast-' + props.position, props.className, {
|
|
515
|
+
'p-input-filled': PrimeReact__default["default"].inputStyle === 'filled',
|
|
516
|
+
'p-ripple-disabled': PrimeReact__default["default"].ripple === false
|
|
517
|
+
});
|
|
532
518
|
return /*#__PURE__*/React__namespace.createElement("div", _extends({
|
|
533
519
|
ref: containerRef,
|
|
534
520
|
id: props.id,
|
|
535
521
|
className: className,
|
|
536
522
|
style: props.style
|
|
537
|
-
}, otherProps), /*#__PURE__*/React__namespace.createElement(reactTransitionGroup.TransitionGroup, null, messagesState.map(function (messageInfo) {
|
|
523
|
+
}, otherProps), /*#__PURE__*/React__namespace.createElement(reactTransitionGroup.TransitionGroup, null, messagesState && messagesState.map(function (messageInfo) {
|
|
538
524
|
var messageRef = /*#__PURE__*/React__namespace.createRef();
|
|
539
525
|
return /*#__PURE__*/React__namespace.createElement(csstransition.CSSTransition, {
|
|
540
526
|
nodeRef: messageRef,
|
|
@@ -558,7 +544,6 @@ var Toast = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
|
|
|
558
544
|
}));
|
|
559
545
|
})));
|
|
560
546
|
};
|
|
561
|
-
|
|
562
547
|
var element = createElement();
|
|
563
548
|
return /*#__PURE__*/React__namespace.createElement(portal.Portal, {
|
|
564
549
|
element: element,
|
package/toast/toast.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("react-transition-group"),n=require("primereact/api"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("react-transition-group"),n=require("primereact/api"),r=require("primereact/csstransition"),a=require("primereact/hooks"),o=require("primereact/portal"),l=require("primereact/utils"),s=require("primereact/ripple");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function u(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var c=u(e),f=i(n);function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m.apply(this,arguments)}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e){if(Array.isArray(e))return p(e)}function y(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function b(e,t){if(e){if("string"==typeof e)return p(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)?p(e,t):void 0}}function E(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function v(e){return d(e)||y(e)||b(e)||E()}function T(e){if(Array.isArray(e))return e}function S(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,l,s=[],i=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;i=!1}else for(;!(i=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);i=!0);}catch(e){u=!0,a=e}finally{try{if(!i&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return s}}function g(){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 N(e,t){return T(e)||S(e,t)||b(e,t)||g()}function h(e){return h="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},h(e)}function A(e,t){if("object"!==h(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function O(e){var t=A(e,"string");return"symbol"===h(t)?t:String(t)}function _(e,t,n){return(t=O(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,O(r.key),r)}}function L(e,t,n){return t&&I(e.prototype,t),n&&I(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function C(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var M=Object.freeze({STARTS_WITH:"startsWith",CONTAINS:"contains",NOT_CONTAINS:"notContains",ENDS_WITH:"endsWith",EQUALS:"equals",NOT_EQUALS:"notEquals",IN:"in",LESS_THAN:"lt",LESS_THAN_OR_EQUAL_TO:"lte",GREATER_THAN:"gt",GREATER_THAN_OR_EQUAL_TO:"gte",BETWEEN:"between",DATE_IS:"dateIs",DATE_IS_NOT:"dateIsNot",DATE_BEFORE:"dateBefore",DATE_AFTER:"dateAfter",CUSTOM:"custom"}),R=L((function e(){C(this,e)}));_(R,"ripple",!1),_(R,"inputStyle","outlined"),_(R,"locale","en"),_(R,"appendTo",null),_(R,"cssTransition",!0),_(R,"autoZIndex",!0),_(R,"nonce",null),_(R,"nullSortOrder",1),_(R,"zIndex",{modal:1100,overlay:1e3,menu:1e3,tooltip:1100,toast:1200}),_(R,"filterMatchModeOptions",{text:[M.STARTS_WITH,M.CONTAINS,M.NOT_CONTAINS,M.ENDS_WITH,M.EQUALS,M.NOT_EQUALS],numeric:[M.EQUALS,M.NOT_EQUALS,M.LESS_THAN,M.LESS_THAN_OR_EQUAL_TO,M.GREATER_THAN,M.GREATER_THAN_OR_EQUAL_TO],date:[M.DATE_IS,M.DATE_IS_NOT,M.DATE_BEFORE,M.DATE_AFTER]});var w={en:{startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",filter:"Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",custom:"Custom",clear:"Clear",close:"Close",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",weekHeader:"Wk",firstDayOfWeek:0,dateFormat:"mm/dd/yy",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyFilterMessage:"No available options",emptyMessage:"No results found",aria:{trueLabel:"True",falseLabel:"False",nullLabel:"Not Selected",pageLabel:"Page",firstPageLabel:"First Page",lastPageLabel:"Last Page",nextPageLabel:"Next Page",previousPageLabel:"Previous Page",selectLabel:"Select",unselectLabel:"Unselect",expandLabel:"Expand",collapseLabel:"Collapse"}}};function P(e,t){var n=t||R.locale;try{return j(n)[e]}catch(t){throw new Error("The ".concat(e," option is not found in the current locale('").concat(n,"')."))}}function j(e){return w[e||R.locale]}var x=c.memo(c.forwardRef((function(e,t){var n=e.messageInfo,r=n.message,o=r.severity,i=r.content,u=r.summary,f=r.detail,m=r.closable,p=r.life,d=r.sticky,y=r.className,b=r.style,E=r.contentClassName,v=r.contentStyle,T=N(c.useState(!1),2),S=T[1],g=N(a.useTimeout((function(){h()}),p||3e3,!d&&!T[0]),1)[0],h=function(){g(),e.onClose&&e.onClose(n)},A=function(t){!e.onClick||l.DomHandler.hasClass(t.target,"p-toast-icon-close")||l.DomHandler.hasClass(t.target,"p-toast-icon-close-icon")||e.onClick(n.message)},O=l.classNames("p-toast-message",_({},"p-toast-message-".concat(o),o),y),I=l.classNames("p-toast-message-content",E),L=function(){if(n){var e=l.ObjectUtils.getJSXElement(i,{message:n.message,onClick:A,onClose:h}),t=l.classNames("p-toast-message-icon pi",{"pi-info-circle":"info"===o,"pi-exclamation-triangle":"warn"===o,"pi-times":"error"===o,"pi-check":"success"===o});return e||c.createElement(c.Fragment,null,c.createElement("span",{className:t}),c.createElement("div",{className:"p-toast-message-text"},c.createElement("span",{className:"p-toast-summary"},u),f&&c.createElement("div",{className:"p-toast-detail"},f)))}return null}(),C=!1!==m?c.createElement("div",null,c.createElement("button",{type:"button",className:"p-toast-icon-close p-link",onClick:h,"aria-label":P("close")},c.createElement("span",{className:"p-toast-icon-close-icon pi pi-times","aria-hidden":"true"}),c.createElement(s.Ripple,null))):null;return c.createElement("div",{ref:t,className:O,style:b,role:"alert","aria-live":"assertive","aria-atomic":"true",onClick:A,onMouseEnter:function(t){e.onMouseEnter&&e.onMouseEnter(t),t.defaultPrevented||d||(g(),S(!0))},onMouseLeave:function(t){e.onMouseLeave&&e.onMouseLeave(t),t.defaultPrevented||d||S(!1)}},c.createElement("div",{className:I,style:v},L,C))})));x.displayName="ToastMessage";var D=0,U=c.memo(c.forwardRef((function(e,n){var s=N(c.useState([]),2),i=s[0],u=s[1],p=c.useRef(null),d=function(t){if(t){var n=y(t,!0);0===i.length&&l.ZIndexUtils.set("toast",p.current,f.default.autoZIndex,e.baseZIndex||f.default.zIndex.toast),u(n)}},y=function(e,t){var n;if(Array.isArray(e)){var r=e.reduce((function(e,t){return e.push({_pId:D++,message:t}),e}),[]);n=t&&i?[].concat(v(i),v(r)):r}else{var a={_pId:D++,message:e};n=t&&i?[].concat(v(i),[a]):[a]}return n},b=function(){l.ZIndexUtils.clear(p.current),u([])},E=function(e){var t=y(e,!1);u(t)},T=function(t){var n=i.filter((function(e){return e._pId!==t._pId}));u(n),e.onRemove&&e.onRemove(t.message)},S=function(e){T(e)},g=function(){e.onShow&&e.onShow()},h=function(){1===i.length&&l.ZIndexUtils.clear(p.current),e.onHide&&e.onHide()};a.useUnmountEffect((function(){l.ZIndexUtils.clear(p.current)})),c.useImperativeHandle(n,(function(){return{props:e,show:d,replace:E,remove:T,clear:b,getElement:function(){return p.current}}}));var A,O,_=(A=l.ObjectUtils.findDiffKeys(e,U.defaultProps),O=l.classNames("p-toast p-component p-toast-"+e.position,e.className,{"p-input-filled":"filled"===f.default.inputStyle,"p-ripple-disabled":!1===f.default.ripple}),c.createElement("div",m({ref:p,id:e.id,className:O,style:e.style},A),c.createElement(t.TransitionGroup,null,i&&i.map((function(t){var n=c.createRef();return c.createElement(r.CSSTransition,{nodeRef:n,key:t._pId,classNames:"p-toast-message",unmountOnExit:!0,timeout:{enter:300,exit:300},onEntered:g,onExited:h,options:e.transitionOptions},c.createElement(x,{ref:n,messageInfo:t,onClick:e.onClick,onClose:S,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave}))})))));return c.createElement(o.Portal,{element:_,appendTo:e.appendTo})})));U.displayName="Toast",U.defaultProps={__TYPE:"Toast",id:null,className:null,style:null,baseZIndex:0,position:"top-right",transitionOptions:null,appendTo:"self",onClick:null,onRemove:null,onShow:null,onHide:null,onMouseEnter:null,onMouseLeave:null},exports.Toast=U;
|
package/toast/toast.d.ts
CHANGED
|
@@ -1,44 +1,151 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Toast is used to display messages in an overlay.
|
|
4
|
+
*
|
|
5
|
+
* [Live Demo](https://www.primefaces.org/primereact/toast/)
|
|
6
|
+
*
|
|
7
|
+
* @module toast
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
1
10
|
import * as React from 'react';
|
|
2
11
|
import { CSSTransitionProps } from '../csstransition';
|
|
3
12
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
type ToastPositionType = 'center' | 'top' | 'bottom' | 'left' | 'right' | 'top-center' | 'top-left' | 'top-right' | 'bottom-center' | 'bottom-left' | 'bottom-right';
|
|
9
|
-
|
|
10
|
-
type ToastAppendToType = 'self' | HTMLElement | undefined | null;
|
|
11
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Message options for toast component
|
|
15
|
+
* @group Misc
|
|
16
|
+
*/
|
|
12
17
|
export interface ToastMessage {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Severity of the message.
|
|
20
|
+
*/
|
|
21
|
+
severity?: 'success' | 'info' | 'warn' | 'error' | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Summary content of the message.
|
|
24
|
+
*/
|
|
25
|
+
summary?: React.ReactNode | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Detail content of the message.
|
|
28
|
+
*/
|
|
29
|
+
detail?: React.ReactNode | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Custom content of the message. If enabled, summary and details properties are ignored.
|
|
32
|
+
*/
|
|
33
|
+
content?: React.ReactNode | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Whether the message can be closed manually using the close icon.
|
|
36
|
+
* @defaultValue true
|
|
37
|
+
*/
|
|
38
|
+
closable?: boolean | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* When enabled, message is not removed automatically.
|
|
41
|
+
*/
|
|
42
|
+
sticky?: boolean | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Delay in milliseconds to close the message automatically.
|
|
45
|
+
* @defaultValue 3000
|
|
46
|
+
*/
|
|
47
|
+
life?: number | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Style class of the message.
|
|
50
|
+
*/
|
|
51
|
+
className?: string | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Inline style of the message.
|
|
54
|
+
*/
|
|
55
|
+
style?: React.CSSProperties | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Style class of the message content.
|
|
58
|
+
*/
|
|
59
|
+
contentClassName?: string | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* Inline style of the message content.
|
|
62
|
+
*/
|
|
63
|
+
contentStyle?: React.CSSProperties | undefined;
|
|
24
64
|
}
|
|
25
65
|
|
|
66
|
+
/**
|
|
67
|
+
* Defines valid properties in Toast component. In addition to these, all properties of HTMLDivElement can be used in this component.
|
|
68
|
+
* @group Properties
|
|
69
|
+
*/
|
|
26
70
|
export interface ToastProps extends Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'ref'> {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
71
|
+
/**
|
|
72
|
+
* Base zIndex value to add to initial layering of PrimeReact components which start from 1000.
|
|
73
|
+
* @defaultValue 0
|
|
74
|
+
*/
|
|
75
|
+
baseZIndex?: number | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Position of the toast in viewport, valid values are "top-right", "top-left", "bottom-left" and "bottom-right".
|
|
78
|
+
* @defaultValue top-right
|
|
79
|
+
*/
|
|
80
|
+
position?: 'center' | 'top' | 'bottom' | 'left' | 'right' | 'top-center' | 'top-left' | 'top-right' | 'bottom-center' | 'bottom-left' | 'bottom-right' | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* The properties of CSSTransition can be customized, except for "nodeRef" and "in" properties.
|
|
83
|
+
*/
|
|
84
|
+
transitionOptions?: CSSTransitionProps | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* DOM element instance where the component should be mounted. Valid values are any DOM Element and 'self'. The self value is used to render a component where it is located.
|
|
87
|
+
* @defaultValue self
|
|
88
|
+
*/
|
|
89
|
+
appendTo?: 'self' | HTMLElement | null | undefined;
|
|
90
|
+
/**
|
|
91
|
+
* Callback to invoke when an active tab is collapsed by clicking on the header.
|
|
92
|
+
* @param {ToastMessage} message - Clicked message
|
|
93
|
+
*/
|
|
31
94
|
onClick?(message: ToastMessage): void;
|
|
95
|
+
/**
|
|
96
|
+
* Callback to invoke when a message is removed.
|
|
97
|
+
* @param {ToastMessage} message - Removed message
|
|
98
|
+
*/
|
|
32
99
|
onRemove?(message: ToastMessage): void;
|
|
100
|
+
/**
|
|
101
|
+
* Callback to invoke when message becomes visible.
|
|
102
|
+
*/
|
|
33
103
|
onShow?(): void;
|
|
104
|
+
/**
|
|
105
|
+
* Callback to invoke when message becomes hidden.
|
|
106
|
+
*/
|
|
34
107
|
onHide?(): void;
|
|
35
|
-
|
|
108
|
+
/**
|
|
109
|
+
* Used to get the child elements of the component.
|
|
110
|
+
* @readonly
|
|
111
|
+
*/
|
|
112
|
+
children?: React.ReactNode | undefined;
|
|
36
113
|
}
|
|
37
114
|
|
|
115
|
+
/**
|
|
116
|
+
* **PrimeReact - Toast**
|
|
117
|
+
*
|
|
118
|
+
* _Toast is used to display messages in an overlay._
|
|
119
|
+
*
|
|
120
|
+
* [Live Demo](https://www.primefaces.org/primereact/toast/)
|
|
121
|
+
* --- ---
|
|
122
|
+
* 
|
|
123
|
+
*
|
|
124
|
+
* @group Component
|
|
125
|
+
*/
|
|
38
126
|
export declare class Toast extends React.Component<ToastProps, any> {
|
|
39
|
-
|
|
127
|
+
/**
|
|
128
|
+
* Used to show the message.
|
|
129
|
+
* @param {ToastMessage | ToastMessage[]} message - Message to show
|
|
130
|
+
*/
|
|
131
|
+
public show(message: ToastMessage | ToastMessage[]): void;
|
|
132
|
+
/**
|
|
133
|
+
* Clears the all messages from Toast.
|
|
134
|
+
*/
|
|
40
135
|
public clear(): void;
|
|
41
|
-
|
|
42
|
-
|
|
136
|
+
/**
|
|
137
|
+
* Used to add new messages after removing all old messages.
|
|
138
|
+
* @param {ToastMessage | ToastMessage[]} message - Message to replace
|
|
139
|
+
*/
|
|
140
|
+
public replace(message: ToastMessage | ToastMessage[]): void;
|
|
141
|
+
/**
|
|
142
|
+
* Used to remove messages.
|
|
143
|
+
* @param {ToastMessage | ToastMessage[]} message - Message to remove
|
|
144
|
+
*/
|
|
145
|
+
public remove(message: ToastMessage | ToastMessage[]): void;
|
|
146
|
+
/**
|
|
147
|
+
* Used to get container element.
|
|
148
|
+
* @return {HTMLDivElement} Container element
|
|
149
|
+
*/
|
|
43
150
|
public getElement(): HTMLDivElement;
|
|
44
151
|
}
|