primereact 8.7.3 → 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.d.ts +168 -25
- package/api/api.cjs.js +1 -1
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +11 -3
- package/api/api.esm.js +1 -1
- package/api/api.esm.min.js +1 -1
- package/api/api.js +1 -1
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +18 -3
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +385 -80
- package/autocomplete/autocomplete.esm.js +18 -3
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +18 -3
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.d.ts +77 -15
- package/avatargroup/avatargroup.d.ts +33 -1
- package/badge/badge.d.ts +48 -8
- package/blockui/blockui.d.ts +71 -10
- package/breadcrumb/breadcrumb.d.ts +41 -3
- package/button/button.d.ts +67 -15
- package/calendar/calendar.cjs.js +18 -5
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +585 -112
- package/calendar/calendar.esm.js +18 -5
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +18 -5
- package/calendar/calendar.min.js +1 -1
- package/captcha/captcha.cjs.js +7 -6
- package/captcha/captcha.cjs.min.js +1 -1
- package/captcha/captcha.d.ts +77 -7
- package/captcha/captcha.esm.js +7 -6
- package/captcha/captcha.esm.min.js +1 -1
- package/captcha/captcha.js +7 -6
- package/captcha/captcha.min.js +1 -1
- package/card/card.d.ts +45 -7
- package/carousel/carousel.d.ts +138 -22
- package/cascadeselect/cascadeselect.cjs.js +7 -1
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +177 -29
- package/cascadeselect/cascadeselect.esm.js +7 -1
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +7 -1
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.d.ts +88 -10
- package/checkbox/checkbox.cjs.js +5 -1
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +137 -33
- package/checkbox/checkbox.esm.js +6 -2
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +5 -1
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.d.ts +75 -7
- package/chips/chips.cjs.js +11 -8
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +188 -36
- package/chips/chips.esm.js +11 -8
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +11 -8
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +6 -1
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +148 -31
- package/colorpicker/colorpicker.esm.js +6 -1
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +6 -1
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.d.ts +736 -134
- package/columngroup/columngroup.d.ts +30 -1
- package/confirmdialog/confirmdialog.d.ts +142 -18
- package/confirmpopup/confirmpopup.cjs.js +5 -2
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.d.ts +165 -22
- package/confirmpopup/confirmpopup.esm.js +5 -2
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +5 -2
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +4 -1
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +79 -11
- package/contextmenu/contextmenu.esm.js +4 -1
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +4 -1
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +85 -78
- package/core/core.min.js +7 -7
- package/csstransition/csstransition.d.ts +31 -1
- package/datascroller/datascroller.d.ts +102 -16
- package/datatable/datatable.cjs.js +27 -15
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +1257 -229
- package/datatable/datatable.esm.js +27 -15
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +27 -15
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.d.ts +222 -43
- package/deferredcontent/deferredcontent.d.ts +37 -1
- package/dialog/dialog.cjs.js +13 -19
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +282 -51
- package/dialog/dialog.esm.js +14 -20
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +13 -19
- package/dialog/dialog.min.css +1 -1
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.d.ts +47 -10
- package/dock/dock.d.ts +68 -12
- package/dropdown/dropdown.cjs.js +27 -11
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +337 -83
- package/dropdown/dropdown.esm.js +28 -12
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +27 -11
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.d.ts +129 -12
- package/fieldset/fieldset.d.ts +85 -7
- package/fileupload/fileupload.cjs.js +4 -0
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +425 -62
- package/fileupload/fileupload.esm.js +4 -0
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +4 -0
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/galleria.cjs.js +3 -1
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.d.ts +198 -30
- package/galleria/galleria.esm.js +3 -1
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +3 -1
- package/galleria/galleria.min.js +1 -1
- package/gmap/gmap.d.ts +91 -5
- package/hooks/hooks.cjs.js +1 -2
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.d.ts +114 -7
- package/hooks/hooks.esm.js +1 -2
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +1 -2
- package/hooks/hooks.min.js +1 -1
- package/image/image.d.ts +91 -11
- package/inplace/inplace.d.ts +101 -9
- package/inputmask/inputmask.cjs.js +6 -5
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.d.ts +119 -27
- package/inputmask/inputmask.esm.js +7 -6
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +6 -5
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +11 -33
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +265 -57
- package/inputnumber/inputnumber.esm.js +12 -34
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +11 -33
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +4 -1
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.d.ts +118 -27
- package/inputswitch/inputswitch.esm.js +5 -2
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +4 -1
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.d.ts +57 -6
- package/inputtextarea/inputtextarea.d.ts +52 -6
- package/keyfilter/keyfilteroptions.d.ts +15 -0
- package/knob/knob.d.ts +127 -20
- package/listbox/listbox.cjs.js +3 -0
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.d.ts +270 -48
- package/listbox/listbox.esm.js +3 -0
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +3 -0
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.d.ts +50 -11
- package/mention/mention.cjs.js +3 -0
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.d.ts +186 -32
- package/mention/mention.esm.js +3 -0
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +3 -0
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +3 -1
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +89 -12
- package/menu/menu.esm.js +3 -1
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +3 -1
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.d.ts +53 -8
- package/menuitem/menuitem.d.ts +114 -19
- package/message/message.d.ts +50 -11
- package/messages/messages.d.ts +91 -11
- package/multiselect/multiselect.cjs.js +11 -2
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +429 -82
- package/multiselect/multiselect.esm.js +12 -3
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +11 -2
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +3 -0
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +157 -22
- package/multistatecheckbox/multistatecheckbox.esm.js +4 -1
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +3 -0
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.d.ts +113 -16
- package/organizationchart/organizationchart.d.ts +107 -16
- package/overlaypanel/overlaypanel.cjs.js +4 -1
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +89 -15
- package/overlaypanel/overlaypanel.esm.js +4 -1
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +4 -1
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/overlayservice/overlayservice.d.ts +52 -7
- package/package.json +2 -2
- package/paginator/paginator.d.ts +409 -44
- package/panel/panel.d.ts +142 -16
- package/panelmenu/panelmenu.d.ts +46 -4
- package/password/password.cjs.js +7 -1
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +176 -36
- package/password/password.esm.js +7 -1
- package/password/password.esm.min.js +1 -1
- package/password/password.js +7 -1
- package/password/password.min.css +1 -1
- package/password/password.min.js +1 -1
- package/picklist/picklist.d.ts +272 -46
- package/primereact.all.cjs.js +305 -158
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +305 -158
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +305 -158
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.d.ts +60 -11
- package/progressspinner/progressspinner.d.ts +47 -4
- package/radiobutton/radiobutton.cjs.js +5 -1
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.d.ts +99 -29
- package/radiobutton/radiobutton.esm.js +5 -1
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +5 -1
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.d.ts +101 -24
- package/resources/primereact.css +74 -63
- 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.d.ts +29 -1
- package/row/row.d.ts +37 -3
- package/scrollpanel/scrollpanel.d.ts +45 -1
- package/scrolltop/scrolltop.d.ts +70 -10
- package/selectbutton/selectbutton.cjs.js +3 -0
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.d.ts +111 -32
- package/selectbutton/selectbutton.esm.js +4 -1
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +3 -0
- package/selectbutton/selectbutton.min.js +1 -1
- package/selectitem/selectitem.d.ts +34 -0
- package/sidebar/sidebar.cjs.js +13 -1
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +120 -22
- package/sidebar/sidebar.esm.js +13 -1
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +13 -1
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.d.ts +61 -11
- package/slidemenu/slidemenu.d.ts +132 -18
- package/slider/slider.d.ts +101 -18
- package/speeddial/speeddial.d.ts +149 -20
- package/splitbutton/splitbutton.cjs.js +3 -2
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +131 -23
- package/splitbutton/splitbutton.esm.js +3 -2
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +3 -2
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.d.ts +98 -12
- package/steps/steps.d.ts +67 -6
- package/styleclass/styleclass.d.ts +77 -12
- package/tabmenu/tabmenu.d.ts +62 -5
- package/tabview/tabview.cjs.js +1 -1
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +213 -27
- package/tabview/tabview.esm.js +1 -1
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +1 -1
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.d.ts +50 -6
- package/terminal/terminal.cjs.js +3 -0
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.d.ts +45 -3
- package/terminal/terminal.esm.js +4 -1
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +3 -0
- package/terminal/terminal.min.js +1 -1
- package/terminalservice/terminalservice.d.ts +42 -4
- package/tieredmenu/tieredmenu.cjs.js +3 -1
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +77 -12
- package/tieredmenu/tieredmenu.esm.js +3 -1
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +3 -1
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +6 -10
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.d.ts +62 -13
- package/timeline/timeline.esm.js +6 -10
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +6 -10
- package/timeline/timeline.min.js +1 -1
- package/toast/toast.cjs.js +4 -1
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +134 -27
- package/toast/toast.esm.js +4 -1
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +4 -1
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +4 -1
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.d.ts +122 -15
- package/togglebutton/togglebutton.esm.js +5 -2
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +4 -1
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +13 -7
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.d.ts +55 -5
- package/toolbar/toolbar.esm.js +13 -7
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +13 -7
- package/toolbar/toolbar.min.css +1 -1
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.d.ts +73 -9
- package/tooltip/tooltipoptions.d.ts +350 -31
- package/tree/tree.d.ts +435 -71
- package/treenode/treenode.d.ts +62 -13
- package/treeselect/treeselect.cjs.js +7 -1
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +326 -77
- package/treeselect/treeselect.esm.js +8 -2
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +7 -1
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +3 -1
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +501 -112
- package/treetable/treetable.esm.js +3 -1
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +3 -1
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +3 -0
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.d.ts +72 -20
- package/tristatecheckbox/tristatecheckbox.esm.js +4 -1
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +3 -0
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/ts-helpers.d.ts +24 -0
- package/utils/utils.cjs.js +27 -11
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +8 -1
- package/utils/utils.esm.js +27 -11
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +27 -11
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.d.ts +351 -59
- package/web-types.json +22 -4
|
@@ -1,8 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Columns can be grouped at header and footer sections by defining a ColumnGroup component.
|
|
4
|
+
* It is a helper component for DataTable.
|
|
5
|
+
*
|
|
6
|
+
* [Live Demo](https://www.primefaces.org/primereact/datatable/)
|
|
7
|
+
*
|
|
8
|
+
* @module columngroup
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
1
11
|
import * as React from 'react';
|
|
2
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Defines valid properties in ColumnGroup component.
|
|
15
|
+
* @group Properties
|
|
16
|
+
*/
|
|
3
17
|
// tslint:disable-next-line:no-empty-interface
|
|
4
18
|
export interface ColumnGroupProps {
|
|
5
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Used to get the child elements of the component.
|
|
21
|
+
* @readonly
|
|
22
|
+
*/
|
|
23
|
+
children?: React.ReactNode | undefined;
|
|
6
24
|
}
|
|
7
25
|
|
|
26
|
+
/**
|
|
27
|
+
* **PrimeReact - ColumnGroup**
|
|
28
|
+
*
|
|
29
|
+
* _It is a helper component for DataTable._
|
|
30
|
+
*
|
|
31
|
+
* [Live Demo](https://www.primefaces.org/primereact/columngroup/)
|
|
32
|
+
* --- ---
|
|
33
|
+
* 
|
|
34
|
+
*
|
|
35
|
+
* @group Component
|
|
36
|
+
*/
|
|
8
37
|
export declare class ColumnGroup extends React.Component<ColumnGroupProps, any> {}
|
|
@@ -1,49 +1,173 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* ConfirmDialog uses a Dialog UI with confirmDialog method or <ConfirmDialog> tag.
|
|
4
|
+
*
|
|
5
|
+
* [Live Demo](https://www.primefaces.org/primereact/confirmdialog)
|
|
6
|
+
*
|
|
7
|
+
* @module confirmdialog
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
1
10
|
import * as React from 'react';
|
|
2
11
|
import { DialogProps } from '../dialog';
|
|
3
12
|
import { IconType } from '../utils';
|
|
4
13
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Custom confirm dialog options
|
|
16
|
+
* @group Misc
|
|
17
|
+
*/
|
|
9
18
|
interface ConfirmDialogOptions {
|
|
19
|
+
/**
|
|
20
|
+
* Callback to execute when action is confirmed.
|
|
21
|
+
*/
|
|
10
22
|
accept(): void;
|
|
23
|
+
/**
|
|
24
|
+
* Callback to execute when action is rejected.
|
|
25
|
+
*/
|
|
11
26
|
reject(): void;
|
|
27
|
+
/**
|
|
28
|
+
* Style class of the accept button.
|
|
29
|
+
*/
|
|
12
30
|
acceptClassName: string;
|
|
31
|
+
/**
|
|
32
|
+
* Style class of the reject button.
|
|
33
|
+
*/
|
|
13
34
|
rejectClassName: string;
|
|
35
|
+
/**
|
|
36
|
+
* Label of the accept button.
|
|
37
|
+
* @defaultValue Yes
|
|
38
|
+
*/
|
|
14
39
|
acceptLabel: string;
|
|
40
|
+
/**
|
|
41
|
+
* Label of the reject button.
|
|
42
|
+
* @defaultValue No
|
|
43
|
+
*/
|
|
15
44
|
rejectLabel: string;
|
|
45
|
+
/**
|
|
46
|
+
* Default element created by the component.
|
|
47
|
+
*/
|
|
16
48
|
element: React.ReactNode;
|
|
49
|
+
/**
|
|
50
|
+
* All component props
|
|
51
|
+
* @type {ConfirmDialogProps}
|
|
52
|
+
*/
|
|
17
53
|
props: ConfirmDialogProps;
|
|
54
|
+
/**
|
|
55
|
+
* Extra options
|
|
56
|
+
*/
|
|
18
57
|
[key: string]: any;
|
|
19
58
|
}
|
|
20
59
|
|
|
60
|
+
/**
|
|
61
|
+
* Defines valid properties in ConfirmDialog component. In addition to these, all properties of {@link dialog} can be used in this component.
|
|
62
|
+
* @group Properties
|
|
63
|
+
*/
|
|
21
64
|
export interface ConfirmDialogProps extends Omit<DialogProps, 'onHide' | 'footer'> {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
65
|
+
/**
|
|
66
|
+
* Unique tag key used to separate the confirmDialog components in the page.
|
|
67
|
+
*/
|
|
68
|
+
tagKey?: string | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* Specifies the visibility of the confirm dialog.
|
|
71
|
+
* @defaultValue false
|
|
72
|
+
*/
|
|
73
|
+
visible?: boolean | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* Message of the confirmation.
|
|
76
|
+
*/
|
|
77
|
+
message?: React.ReactNode | ((options: ConfirmDialogOptions) => React.ReactNode);
|
|
78
|
+
/**
|
|
79
|
+
* Label of the reject button.
|
|
80
|
+
* @defaultValue No
|
|
81
|
+
*/
|
|
82
|
+
rejectLabel?: string | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Label of the accept button.
|
|
85
|
+
* @defaultValue Yes
|
|
86
|
+
*/
|
|
87
|
+
acceptLabel?: string | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* Icon to display next to the message.
|
|
90
|
+
*/
|
|
91
|
+
icon?: IconType<ConfirmDialogProps> | undefined;
|
|
92
|
+
/**
|
|
93
|
+
* Icon of the reject button.
|
|
94
|
+
*/
|
|
95
|
+
rejectIcon?: IconType<ConfirmDialogProps> | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* Icon of the accept button.
|
|
98
|
+
*/
|
|
99
|
+
acceptIcon?: IconType<ConfirmDialogProps> | undefined;
|
|
100
|
+
/**
|
|
101
|
+
* Style class of the reject button.
|
|
102
|
+
*/
|
|
103
|
+
rejectClassName?: string | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* Style class of the accept button.
|
|
106
|
+
*/
|
|
107
|
+
acceptClassName?: string | undefined;
|
|
108
|
+
/**
|
|
109
|
+
* DOM element instance where the overlay panel should be mounted. Valid values are any DOM Element and "self". The "self" value is used to render a component where it is located.
|
|
110
|
+
* @defaultValue document.body
|
|
111
|
+
*/
|
|
112
|
+
appendTo?: 'self' | HTMLElement | undefined | null;
|
|
113
|
+
/**
|
|
114
|
+
* Style class of the element.
|
|
115
|
+
*/
|
|
116
|
+
className?: string | undefined;
|
|
117
|
+
/**
|
|
118
|
+
* Footer content of the confirm dialog.
|
|
119
|
+
*/
|
|
120
|
+
footer?: React.ReactNode | ((options: ConfirmDialogOptions) => React.ReactNode);
|
|
121
|
+
/**
|
|
122
|
+
* Callback to invoke when confirm dialog is hidden.
|
|
123
|
+
*/
|
|
35
124
|
onHide?(result: string): void;
|
|
125
|
+
/**
|
|
126
|
+
* Callback to execute when action is confirmed.
|
|
127
|
+
*/
|
|
36
128
|
accept?(): void;
|
|
129
|
+
/**
|
|
130
|
+
* Callback to execute when action is rejected.
|
|
131
|
+
*/
|
|
37
132
|
reject?(): void;
|
|
38
|
-
|
|
133
|
+
/**
|
|
134
|
+
* Used to get the child elements of the component.
|
|
135
|
+
* @readonly
|
|
136
|
+
*/
|
|
137
|
+
children?: React.ReactNode | undefined;
|
|
39
138
|
}
|
|
40
139
|
|
|
140
|
+
/**
|
|
141
|
+
* Object returned by the {@link confirmDialog} method.
|
|
142
|
+
* @group Misc
|
|
143
|
+
*/
|
|
41
144
|
interface ConfirmDialogReturn {
|
|
145
|
+
/**
|
|
146
|
+
* Used to show the dialog.
|
|
147
|
+
*/
|
|
42
148
|
show(): void;
|
|
149
|
+
/**
|
|
150
|
+
* Used to hide the dialog.
|
|
151
|
+
*/
|
|
43
152
|
hide(): void;
|
|
44
153
|
}
|
|
45
154
|
|
|
155
|
+
/**
|
|
156
|
+
* **PrimeReact - ConfirmDialog**
|
|
157
|
+
*
|
|
158
|
+
* _ConfirmDialog uses a Dialog UI with confirmDialog method or <ConfirmDialog> tag._
|
|
159
|
+
*
|
|
160
|
+
* [Live Demo](https://www.primefaces.org/primereact/confirmdialog/)
|
|
161
|
+
* --- ---
|
|
162
|
+
* 
|
|
163
|
+
*
|
|
164
|
+
* @group Component
|
|
165
|
+
*/
|
|
46
166
|
export declare class ConfirmDialog extends React.Component<ConfirmDialogProps, any> {
|
|
167
|
+
/**
|
|
168
|
+
* Used to call/update the component manually
|
|
169
|
+
* @param {ConfirmDialogProps} props - All component props
|
|
170
|
+
*/
|
|
47
171
|
public confirm(props?: ConfirmDialogProps): void;
|
|
48
172
|
}
|
|
49
173
|
|
|
@@ -208,7 +208,7 @@ var ConfirmPopup = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
|
|
|
208
208
|
var type = _ref.type,
|
|
209
209
|
valid = _ref.valid;
|
|
210
210
|
if (valid) {
|
|
211
|
-
type === 'outside' ? props.dismissable && !isPanelClicked.current && hide() : hide();
|
|
211
|
+
type === 'outside' ? props.dismissable && !isPanelClicked.current && hide('hide') : hide('hide');
|
|
212
212
|
}
|
|
213
213
|
isPanelClicked.current = false;
|
|
214
214
|
},
|
|
@@ -379,7 +379,10 @@ var ConfirmPopup = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
|
|
|
379
379
|
};
|
|
380
380
|
var createElement = function createElement() {
|
|
381
381
|
var otherProps = utils.ObjectUtils.findDiffKeys(props, ConfirmPopup.defaultProps);
|
|
382
|
-
var className = utils.classNames('p-confirm-popup p-component', getPropValue('className')
|
|
382
|
+
var className = utils.classNames('p-confirm-popup p-component', getPropValue('className'), {
|
|
383
|
+
'p-input-filled': PrimeReact__default["default"].inputStyle === 'filled',
|
|
384
|
+
'p-ripple-disabled': PrimeReact__default["default"].ripple === false
|
|
385
|
+
});
|
|
383
386
|
var content = createContent();
|
|
384
387
|
var footer = createFooter();
|
|
385
388
|
return /*#__PURE__*/React__namespace.createElement(csstransition.CSSTransition, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/api"),r=require("primereact/button"),n=require("primereact/csstransition"),o=require("primereact/hooks"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/api"),r=require("primereact/button"),n=require("primereact/csstransition"),o=require("primereact/hooks"),i=require("primereact/overlayservice"),c=require("primereact/portal"),l=require("primereact/utils");function a(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(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var s=u(e),f=a(t);function p(){return p=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},p.apply(this,arguments)}function m(e){if(Array.isArray(e))return e}function v(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,c,l=[],a=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;a=!1}else for(;!(a=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{if(!a&&null!=r.return&&(c=r.return(),Object(c)!==c))return}finally{if(u)throw o}}return l}}function b(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 y(e,t){if(e){if("string"==typeof e)return b(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)?b(e,t):void 0}}function d(){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 g(e,t){return m(e)||v(e,t)||y(e,t)||d()}function O(e){return O="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},O(e)}function j(e,t){if("object"!==O(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==O(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function S(e){var t=j(e,"string");return"symbol"===O(t)?t:String(t)}function h(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 E(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 P(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(Object(r),!0).forEach((function(t){h(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var N=s.memo(s.forwardRef((function(e,a){var u=g(s.useState(e.visible),2),m=u[0],v=u[1],b=g(s.useState(!1),2),y=b[0],d=b[1],O=s.useRef(null),j=s.useRef(null),S=s.useRef(!1),h=s.useRef(null),E=s.useRef(null),P=function(){return E.current||e},w=function(t){return(E.current||e)[t]},C=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return l.ObjectUtils.getPropValue(w(e),r)},x=w("acceptLabel")||t.localeOption("accept"),I=w("rejectLabel")||t.localeOption("reject"),U=g(o.useOverlayListener({target:w("target"),overlay:O,listener:function(t,r){r.valid&&("outside"===r.type?e.dismissable&&!S.current&&R("hide"):R("hide")),S.current=!1},when:m}),2),k=U[0],D=U[1],q=function(e){S.current=!0,i.OverlayService.emit("overlay-click",{originalEvent:e,target:w("target")})},A=function(){C("accept"),R("accept")},L=function(){C("reject"),R("reject")},H=function(){v(!0),d(!1),h.current=function(e){!M(e.target)&&(S.current=!0)},i.OverlayService.on("overlay-click",h.current)},R=function(e){v(!1),i.OverlayService.off("overlay-click",h.current),h.current=null,e&&C("onHide",e)},T=function(){l.ZIndexUtils.set("overlay",O.current,f.default.autoZIndex,f.default.zIndex.overlay),J()},_=function(){k(),j.current&&j.current.focus(),C("onShow")},K=function(){D()},Z=function(){l.ZIndexUtils.clear(O.current),S.current=!1},J=function(){if(w("target")){l.DomHandler.absolutePosition(O.current,w("target"));var e=l.DomHandler.getOffset(O.current),t=l.DomHandler.getOffset(w("target")),r=0;e.left<t.left&&(r=t.left-e.left),O.current.style.setProperty("--overlayArrowLeft","".concat(r,"px")),e.top<t.top&&l.DomHandler.addClass(O.current,"p-confirm-popup-flipped")}},M=function(e){return O&&O.current&&!(O.current.isSameNode(e)||O.current.contains(e))},X=function(t){if(t.tagKey===e.tagKey){var r=m!==t.visible;w("target")!==t.target&&!e.target?(R(),E.current=t,d(!0)):r&&(E.current=t,t.visible?H():R())}};s.useEffect((function(){e.visible?H():R()}),[e.visible]),s.useEffect((function(){return e.target||e.message||i.OverlayService.on("confirm-popup",X),function(){i.OverlayService.off("confirm-popup",X)}}),[e.target]),o.useUpdateEffect((function(){y&&H()}),[y]),o.useUnmountEffect((function(){h.current&&(i.OverlayService.off("overlay-click",h.current),h.current=null),i.OverlayService.off("confirm-popup",X),l.ZIndexUtils.clear(O.current)})),s.useImperativeHandle(a,(function(){return{props:e,confirm:X}}));var z,B,V,Y,$,F,G,Q=function(){var e=l.classNames("p-confirm-popup-accept p-button-sm",w("acceptClassName")),t=l.classNames("p-confirm-popup-reject p-button-sm",{"p-button-text":!w("rejectClassName")},w("rejectClassName")),n=s.createElement("div",{className:"p-confirm-popup-footer"},s.createElement(r.Button,{label:I,icon:w("rejectIcon"),className:t,onClick:L}),s.createElement(r.Button,{ref:j,label:x,icon:w("acceptIcon"),className:e,onClick:A}));if(w("footer")){var o={accept:A,reject:L,className:"p-confirm-popup-footer",acceptClassName:e,rejectClassName:t,acceptLabel:x,rejectLabel:I,element:n,props:P()};return l.ObjectUtils.getJSXElement(w("footer"),o)}return n},W=(Y=l.ObjectUtils.findDiffKeys(e,N.defaultProps),$=l.classNames("p-confirm-popup p-component",w("className"),{"p-input-filled":"filled"===f.default.inputStyle,"p-ripple-disabled":!1===f.default.ripple}),z=P(),B=l.ObjectUtils.getJSXElement(w("message"),z),V=l.IconUtils.getJSXIcon(w("icon"),{className:"p-confirm-popup-icon"},{props:z}),F=s.createElement("div",{className:"p-confirm-popup-content"},V,s.createElement("span",{className:"p-confirm-popup-message"},B)),G=Q(),s.createElement(n.CSSTransition,{nodeRef:O,classNames:"p-connected-overlay",in:m,timeout:{enter:120,exit:100},options:w("transitionOptions"),unmountOnExit:!0,onEnter:T,onEntered:_,onExit:K,onExited:Z},s.createElement("div",p({ref:O,id:w("id"),className:$,style:w("style")},Y,{onClick:q}),F,G)));return s.createElement(c.Portal,{element:W,appendTo:w("appendTo"),visible:w("visible")})})));N.displayName="ConfirmPopup",N.defaultProps={__TYPE:"ConfirmPopup",tagKey:void 0,target:null,visible:!1,message:null,rejectLabel:null,acceptLabel:null,icon:null,rejectIcon:null,acceptIcon:null,rejectClassName:null,acceptClassName:null,className:null,style:null,appendTo:null,dismissable:!0,footer:null,onShow:null,onHide:null,accept:null,reject:null,transitionOptions:null},exports.ConfirmPopup=N,exports.confirmPopup=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=P(P({},e),{visible:void 0===e.visible||e.visible})).visible&&i.OverlayService.emit("confirm-popup",e);var t=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i.OverlayService.emit("confirm-popup",P(P(P({},e),t),{visible:!0}))},r=function(){i.OverlayService.emit("confirm-popup",{visible:!1})};return{show:t,hide:r}};
|
|
@@ -1,55 +1,198 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* ConfirmPopup displays a confirmation overlay displayed relatively to its target.
|
|
4
|
+
*
|
|
5
|
+
* [Live Demo](https://www.primefaces.org/primereact/confirmpopup)
|
|
6
|
+
*
|
|
7
|
+
* @module confirmpopup
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
1
10
|
import * as React from 'react';
|
|
2
11
|
import { CSSTransitionProps } from '../csstransition';
|
|
3
12
|
import { IconType } from '../utils';
|
|
4
13
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Custom confirm popup options
|
|
16
|
+
* @group Misc
|
|
17
|
+
*/
|
|
9
18
|
interface ConfirmPopupOptions {
|
|
19
|
+
/**
|
|
20
|
+
* Callback to execute when action is confirmed.
|
|
21
|
+
*/
|
|
10
22
|
accept(): void;
|
|
23
|
+
/**
|
|
24
|
+
* Callback to execute when action is rejected.
|
|
25
|
+
*/
|
|
11
26
|
reject(): void;
|
|
27
|
+
/**
|
|
28
|
+
* Style class of the component.
|
|
29
|
+
*/
|
|
12
30
|
className: string;
|
|
31
|
+
/**
|
|
32
|
+
* Style class of the accept button.
|
|
33
|
+
*/
|
|
13
34
|
acceptClassName: string;
|
|
35
|
+
/**
|
|
36
|
+
* Style class of the reject button.
|
|
37
|
+
*/
|
|
14
38
|
rejectClassName: string;
|
|
39
|
+
/**
|
|
40
|
+
* Label of the accept button.
|
|
41
|
+
* @defaultValue Yes
|
|
42
|
+
*/
|
|
15
43
|
acceptLabel: string;
|
|
44
|
+
/**
|
|
45
|
+
* Label of the reject button.
|
|
46
|
+
* @defaultValue No
|
|
47
|
+
*/
|
|
16
48
|
rejectLabel: string;
|
|
49
|
+
/**
|
|
50
|
+
* Default element created by the component.
|
|
51
|
+
*/
|
|
17
52
|
element: React.ReactNode;
|
|
53
|
+
/**
|
|
54
|
+
* All component props
|
|
55
|
+
* @type {ConfirmPopupProps}
|
|
56
|
+
*/
|
|
18
57
|
props: ConfirmPopupProps;
|
|
58
|
+
/**
|
|
59
|
+
* Extra options
|
|
60
|
+
*/
|
|
19
61
|
[key: string]: any;
|
|
20
62
|
}
|
|
21
63
|
|
|
64
|
+
/**
|
|
65
|
+
* Defines valid properties in ConfirmPopup component.
|
|
66
|
+
* @group Properties
|
|
67
|
+
*/
|
|
22
68
|
export interface ConfirmPopupProps {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
69
|
+
/**
|
|
70
|
+
* Unique tag key used to separate the confirmPopup components in the page.
|
|
71
|
+
*/
|
|
72
|
+
tagKey?: string | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* Target element to align the popup.
|
|
75
|
+
*/
|
|
76
|
+
target?: HTMLElement | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* Specifies the visibility of the confirm popup.
|
|
79
|
+
* @defaultValue false
|
|
80
|
+
*/
|
|
81
|
+
visible?: boolean | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* Message of the confirmation.
|
|
84
|
+
*/
|
|
85
|
+
message?: React.ReactNode | ((options: ConfirmPopupOptions) => React.ReactNode);
|
|
86
|
+
/**
|
|
87
|
+
* Label of the reject button.
|
|
88
|
+
* @defaultValue No
|
|
89
|
+
*/
|
|
90
|
+
rejectLabel?: string | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* Label of the accept button.
|
|
93
|
+
* @defaultValue Yes
|
|
94
|
+
*/
|
|
95
|
+
acceptLabel?: string | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* Icon to display next to the message.
|
|
98
|
+
*/
|
|
99
|
+
icon?: IconType<ConfirmPopupProps> | undefined;
|
|
100
|
+
/**
|
|
101
|
+
* Icon of the reject button.
|
|
102
|
+
*/
|
|
103
|
+
rejectIcon?: IconType<ConfirmPopupProps> | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* Icon of the accept button.
|
|
106
|
+
*/
|
|
107
|
+
acceptIcon?: IconType<ConfirmPopupProps> | undefined;
|
|
108
|
+
/**
|
|
109
|
+
* Style class of the reject button.
|
|
110
|
+
*/
|
|
111
|
+
rejectClassName?: string | undefined;
|
|
112
|
+
/**
|
|
113
|
+
* Style class of the accept button.
|
|
114
|
+
*/
|
|
115
|
+
acceptClassName?: string | undefined;
|
|
116
|
+
/**
|
|
117
|
+
* Style class of the element.
|
|
118
|
+
*/
|
|
119
|
+
className?: string | undefined;
|
|
120
|
+
/**
|
|
121
|
+
* Inline style of the element.
|
|
122
|
+
*/
|
|
123
|
+
style?: React.CSSProperties | undefined;
|
|
124
|
+
/**
|
|
125
|
+
* DOM element instance where the overlay panel should be mounted. Valid values are any DOM Element and 'self'. The self value is used to render a component where it is located.
|
|
126
|
+
* @defaultValue document.body
|
|
127
|
+
*/
|
|
128
|
+
appendTo?: 'self' | HTMLElement | undefined | null;
|
|
129
|
+
/**
|
|
130
|
+
* Enables to hide the popup when outside is clicked.
|
|
131
|
+
* @defaultValue true
|
|
132
|
+
*/
|
|
133
|
+
dismissable?: boolean | undefined;
|
|
134
|
+
/**
|
|
135
|
+
* Footer content of the confirm popup.
|
|
136
|
+
*/
|
|
137
|
+
footer?: React.ReactNode | ((options: ConfirmPopupOptions) => React.ReactNode);
|
|
138
|
+
/**
|
|
139
|
+
* The properties of CSSTransition can be customized, except for "nodeRef" and "in" properties.
|
|
140
|
+
*/
|
|
141
|
+
transitionOptions?: CSSTransitionProps | undefined;
|
|
142
|
+
/**
|
|
143
|
+
* Callback to invoke when overlay panel becomes visible.
|
|
144
|
+
*/
|
|
40
145
|
onShow?(): void;
|
|
146
|
+
/**
|
|
147
|
+
* Callback to invoke when confirm popup is hidden.
|
|
148
|
+
*/
|
|
41
149
|
onHide?(result: string): void;
|
|
150
|
+
/**
|
|
151
|
+
* Callback to execute when action is confirmed.
|
|
152
|
+
*/
|
|
42
153
|
accept?(): void;
|
|
154
|
+
/**
|
|
155
|
+
* Callback to execute when action is rejected.
|
|
156
|
+
*/
|
|
43
157
|
reject?(): void;
|
|
44
|
-
|
|
158
|
+
/**
|
|
159
|
+
* Used to get the child elements of the component.
|
|
160
|
+
* @readonly
|
|
161
|
+
*/
|
|
162
|
+
children?: React.ReactNode | undefined;
|
|
45
163
|
}
|
|
46
164
|
|
|
165
|
+
/**
|
|
166
|
+
* Object returned by the {@link confirmPopup} method.
|
|
167
|
+
* @group Misc
|
|
168
|
+
*/
|
|
47
169
|
interface ConfirmPopupReturn {
|
|
170
|
+
/**
|
|
171
|
+
* Used to show the popup.
|
|
172
|
+
*/
|
|
48
173
|
show(): void;
|
|
174
|
+
/**
|
|
175
|
+
* Used to hide the popup.
|
|
176
|
+
*/
|
|
49
177
|
hide(): void;
|
|
50
178
|
}
|
|
51
179
|
|
|
180
|
+
/**
|
|
181
|
+
* **PrimeReact - ConfirmPopup**
|
|
182
|
+
*
|
|
183
|
+
* _ConfirmPopup displays a confirmation overlay displayed relatively to its target._
|
|
184
|
+
*
|
|
185
|
+
* [Live Demo](https://www.primefaces.org/primereact/confirmpopup/)
|
|
186
|
+
* --- ---
|
|
187
|
+
* 
|
|
188
|
+
*
|
|
189
|
+
* @group Component
|
|
190
|
+
*/
|
|
52
191
|
export declare class ConfirmPopup extends React.Component<ConfirmPopupProps, any> {
|
|
192
|
+
/**
|
|
193
|
+
* Used to call/update the component manually
|
|
194
|
+
* @param {ConfirmPopupProps} props - All component props
|
|
195
|
+
*/
|
|
53
196
|
public confirm(props?: ConfirmPopupProps): void;
|
|
54
197
|
}
|
|
55
198
|
|
|
@@ -181,7 +181,7 @@ var ConfirmPopup = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functi
|
|
|
181
181
|
var type = _ref.type,
|
|
182
182
|
valid = _ref.valid;
|
|
183
183
|
if (valid) {
|
|
184
|
-
type === 'outside' ? props.dismissable && !isPanelClicked.current && hide() : hide();
|
|
184
|
+
type === 'outside' ? props.dismissable && !isPanelClicked.current && hide('hide') : hide('hide');
|
|
185
185
|
}
|
|
186
186
|
isPanelClicked.current = false;
|
|
187
187
|
},
|
|
@@ -352,7 +352,10 @@ var ConfirmPopup = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functi
|
|
|
352
352
|
};
|
|
353
353
|
var createElement = function createElement() {
|
|
354
354
|
var otherProps = ObjectUtils.findDiffKeys(props, ConfirmPopup.defaultProps);
|
|
355
|
-
var className = classNames('p-confirm-popup p-component', getPropValue('className')
|
|
355
|
+
var className = classNames('p-confirm-popup p-component', getPropValue('className'), {
|
|
356
|
+
'p-input-filled': PrimeReact.inputStyle === 'filled',
|
|
357
|
+
'p-ripple-disabled': PrimeReact.ripple === false
|
|
358
|
+
});
|
|
356
359
|
var content = createContent();
|
|
357
360
|
var footer = createFooter();
|
|
358
361
|
return /*#__PURE__*/React.createElement(CSSTransition, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import t,{localeOption as r}from"primereact/api";import{Button as n}from"primereact/button";import{CSSTransition as o}from"primereact/csstransition";import{useOverlayListener as
|
|
1
|
+
import*as e from"react";import t,{localeOption as r}from"primereact/api";import{Button as n}from"primereact/button";import{CSSTransition as o}from"primereact/csstransition";import{useOverlayListener as i,useUpdateEffect as c,useUnmountEffect as l}from"primereact/hooks";import{OverlayService as a}from"primereact/overlayservice";import{Portal as u}from"primereact/portal";import{ZIndexUtils as p,ObjectUtils as f,classNames as s,DomHandler as m,IconUtils as b}from"primereact/utils";function y(){return y=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},y.apply(this,arguments)}function v(e){if(Array.isArray(e))return e}function d(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,c,l=[],a=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;a=!1}else for(;!(a=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{if(!a&&null!=r.return&&(c=r.return(),Object(c)!==c))return}finally{if(u)throw o}}return l}}function g(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 j(e,t){if(e){if("string"==typeof e)return g(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)?g(e,t):void 0}}function O(){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 h(e,t){return v(e)||d(e,t)||j(e,t)||O()}function S(e){return S="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},S(e)}function E(e,t){if("object"!==S(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==S(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function w(e){var t=E(e,"string");return"symbol"===S(t)?t:String(t)}function N(e,t,r){return(t=w(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function P(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 C(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(Object(r),!0).forEach((function(t){N(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var I=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=C(C({},e),{visible:void 0===e.visible||e.visible})).visible&&a.emit("confirm-popup",e);var t=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a.emit("confirm-popup",C(C(C({},e),t),{visible:!0}))},r=function(){a.emit("confirm-popup",{visible:!1})};return{show:t,hide:r}},x=e.memo(e.forwardRef((function(v,d){var g=h(e.useState(v.visible),2),j=g[0],O=g[1],S=h(e.useState(!1),2),E=S[0],w=S[1],N=e.useRef(null),P=e.useRef(null),C=e.useRef(!1),I=e.useRef(null),k=e.useRef(null),A=function(){return k.current||v},L=function(e){return(k.current||v)[e]},R=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return f.getPropValue(L(e),r)},T=L("acceptLabel")||r("accept"),D=L("rejectLabel")||r("reject"),K=h(i({target:L("target"),overlay:N,listener:function(e,t){t.valid&&("outside"===t.type?v.dismissable&&!C.current&&U("hide"):U("hide")),C.current=!1},when:j}),2),H=K[0],J=K[1],X=function(e){C.current=!0,a.emit("overlay-click",{originalEvent:e,target:L("target")})},_=function(){R("accept"),U("accept")},z=function(){R("reject"),U("reject")},M=function(){O(!0),w(!1),I.current=function(e){!B(e.target)&&(C.current=!0)},a.on("overlay-click",I.current)},U=function(e){O(!1),a.off("overlay-click",I.current),I.current=null,e&&R("onHide",e)},V=function(){p.set("overlay",N.current,t.autoZIndex,t.zIndex.overlay),q()},Y=function(){H(),P.current&&P.current.focus(),R("onShow")},Z=function(){J()},$=function(){p.clear(N.current),C.current=!1},q=function(){if(L("target")){m.absolutePosition(N.current,L("target"));var e=m.getOffset(N.current),t=m.getOffset(L("target")),r=0;e.left<t.left&&(r=t.left-e.left),N.current.style.setProperty("--overlayArrowLeft","".concat(r,"px")),e.top<t.top&&m.addClass(N.current,"p-confirm-popup-flipped")}},B=function(e){return N&&N.current&&!(N.current.isSameNode(e)||N.current.contains(e))},F=function(e){if(e.tagKey===v.tagKey){var t=j!==e.visible;L("target")!==e.target&&!v.target?(U(),k.current=e,w(!0)):t&&(k.current=e,e.visible?M():U())}};e.useEffect((function(){v.visible?M():U()}),[v.visible]),e.useEffect((function(){return v.target||v.message||a.on("confirm-popup",F),function(){a.off("confirm-popup",F)}}),[v.target]),c((function(){E&&M()}),[E]),l((function(){I.current&&(a.off("overlay-click",I.current),I.current=null),a.off("confirm-popup",F),p.clear(N.current)})),e.useImperativeHandle(d,(function(){return{props:v,confirm:F}}));var G,Q,W,ee,te,re,ne,oe=function(){var t=s("p-confirm-popup-accept p-button-sm",L("acceptClassName")),r=s("p-confirm-popup-reject p-button-sm",{"p-button-text":!L("rejectClassName")},L("rejectClassName")),o=e.createElement("div",{className:"p-confirm-popup-footer"},e.createElement(n,{label:D,icon:L("rejectIcon"),className:r,onClick:z}),e.createElement(n,{ref:P,label:T,icon:L("acceptIcon"),className:t,onClick:_}));if(L("footer")){var i={accept:_,reject:z,className:"p-confirm-popup-footer",acceptClassName:t,rejectClassName:r,acceptLabel:T,rejectLabel:D,element:o,props:A()};return f.getJSXElement(L("footer"),i)}return o},ie=(ee=f.findDiffKeys(v,x.defaultProps),te=s("p-confirm-popup p-component",L("className"),{"p-input-filled":"filled"===t.inputStyle,"p-ripple-disabled":!1===t.ripple}),G=A(),Q=f.getJSXElement(L("message"),G),W=b.getJSXIcon(L("icon"),{className:"p-confirm-popup-icon"},{props:G}),re=e.createElement("div",{className:"p-confirm-popup-content"},W,e.createElement("span",{className:"p-confirm-popup-message"},Q)),ne=oe(),e.createElement(o,{nodeRef:N,classNames:"p-connected-overlay",in:j,timeout:{enter:120,exit:100},options:L("transitionOptions"),unmountOnExit:!0,onEnter:V,onEntered:Y,onExit:Z,onExited:$},e.createElement("div",y({ref:N,id:L("id"),className:te,style:L("style")},ee,{onClick:X}),re,ne)));return e.createElement(u,{element:ie,appendTo:L("appendTo"),visible:L("visible")})})));x.displayName="ConfirmPopup",x.defaultProps={__TYPE:"ConfirmPopup",tagKey:void 0,target:null,visible:!1,message:null,rejectLabel:null,acceptLabel:null,icon:null,rejectIcon:null,acceptIcon:null,rejectClassName:null,acceptClassName:null,className:null,style:null,appendTo:null,dismissable:!0,footer:null,onShow:null,onHide:null,accept:null,reject:null,transitionOptions:null};export{x as ConfirmPopup,I as confirmPopup};
|
|
@@ -199,7 +199,7 @@ this.primereact.confirmpopup = (function (exports, React, PrimeReact, button, cs
|
|
|
199
199
|
var type = _ref.type,
|
|
200
200
|
valid = _ref.valid;
|
|
201
201
|
if (valid) {
|
|
202
|
-
type === 'outside' ? props.dismissable && !isPanelClicked.current && hide() : hide();
|
|
202
|
+
type === 'outside' ? props.dismissable && !isPanelClicked.current && hide('hide') : hide('hide');
|
|
203
203
|
}
|
|
204
204
|
isPanelClicked.current = false;
|
|
205
205
|
},
|
|
@@ -370,7 +370,10 @@ this.primereact.confirmpopup = (function (exports, React, PrimeReact, button, cs
|
|
|
370
370
|
};
|
|
371
371
|
var createElement = function createElement() {
|
|
372
372
|
var otherProps = utils.ObjectUtils.findDiffKeys(props, ConfirmPopup.defaultProps);
|
|
373
|
-
var className = utils.classNames('p-confirm-popup p-component', getPropValue('className')
|
|
373
|
+
var className = utils.classNames('p-confirm-popup p-component', getPropValue('className'), {
|
|
374
|
+
'p-input-filled': PrimeReact__default["default"].inputStyle === 'filled',
|
|
375
|
+
'p-ripple-disabled': PrimeReact__default["default"].ripple === false
|
|
376
|
+
});
|
|
374
377
|
var content = createContent();
|
|
375
378
|
var footer = createFooter();
|
|
376
379
|
return /*#__PURE__*/React__namespace.createElement(csstransition.CSSTransition, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.confirmpopup=function(e,t,r,n,o,c,i,l,a){"use strict";function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function s(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.confirmpopup=function(e,t,r,n,o,c,i,l,a){"use strict";function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function s(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var p=s(t),f=u(r);function m(){return m=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},m.apply(this,arguments)}function v(e){if(Array.isArray(e))return e}function b(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,c,i,l=[],a=!0,u=!1;try{if(c=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;a=!1}else for(;!(a=(n=c.call(r)).done)&&(l.push(n.value),l.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{if(!a&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}function y(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 d(e,t){if(e){if("string"==typeof e)return y(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)?y(e,t):void 0}}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 O(e,t){return v(e)||b(e,t)||d(e,t)||g()}function j(e){return j="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},j(e)}function S(e,t){if("object"!==j(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==j(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function h(e){var t=S(e,"string");return"symbol"===j(t)?t:String(t)}function E(e,t,r){return(t=h(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function P(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 N(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(Object(r),!0).forEach((function(t){E(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var w=p.memo(p.forwardRef((function(e,t){var u=O(p.useState(e.visible),2),s=u[0],v=u[1],b=O(p.useState(!1),2),y=b[0],d=b[1],g=p.useRef(null),j=p.useRef(null),S=p.useRef(!1),h=p.useRef(null),E=p.useRef(null),P=function(){return E.current||e},N=function(t){return(E.current||e)[t]},C=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return a.ObjectUtils.getPropValue(N(e),r)},I=N("acceptLabel")||r.localeOption("accept"),x=N("rejectLabel")||r.localeOption("reject"),U=O(c.useOverlayListener({target:N("target"),overlay:g,listener:function(t,r){r.valid&&("outside"===r.type?e.dismissable&&!S.current&&T("hide"):T("hide")),S.current=!1},when:s}),2),k=U[0],D=U[1],A=function(e){S.current=!0,i.OverlayService.emit("overlay-click",{originalEvent:e,target:N("target")})},L=function(){C("accept"),T("accept")},R=function(){C("reject"),T("reject")},H=function(){v(!0),d(!1),h.current=function(e){!X(e.target)&&(S.current=!0)},i.OverlayService.on("overlay-click",h.current)},T=function(e){v(!1),i.OverlayService.off("overlay-click",h.current),h.current=null,e&&C("onHide",e)},_=function(){a.ZIndexUtils.set("overlay",g.current,f.default.autoZIndex,f.default.zIndex.overlay),M()},K=function(){k(),j.current&&j.current.focus(),C("onShow")},Z=function(){D()},J=function(){a.ZIndexUtils.clear(g.current),S.current=!1},M=function(){if(N("target")){a.DomHandler.absolutePosition(g.current,N("target"));var e=a.DomHandler.getOffset(g.current),t=a.DomHandler.getOffset(N("target")),r=0;e.left<t.left&&(r=t.left-e.left),g.current.style.setProperty("--overlayArrowLeft","".concat(r,"px")),e.top<t.top&&a.DomHandler.addClass(g.current,"p-confirm-popup-flipped")}},X=function(e){return g&&g.current&&!(g.current.isSameNode(e)||g.current.contains(e))},z=function(t){if(t.tagKey===e.tagKey){var r=s!==t.visible;N("target")!==t.target&&!e.target?(T(),E.current=t,d(!0)):r&&(E.current=t,t.visible?H():T())}};p.useEffect((function(){e.visible?H():T()}),[e.visible]),p.useEffect((function(){return e.target||e.message||i.OverlayService.on("confirm-popup",z),function(){i.OverlayService.off("confirm-popup",z)}}),[e.target]),c.useUpdateEffect((function(){y&&H()}),[y]),c.useUnmountEffect((function(){h.current&&(i.OverlayService.off("overlay-click",h.current),h.current=null),i.OverlayService.off("confirm-popup",z),a.ZIndexUtils.clear(g.current)})),p.useImperativeHandle(t,(function(){return{props:e,confirm:z}}));var B,V,Y,$,q,F,G,Q=function(){var e=a.classNames("p-confirm-popup-accept p-button-sm",N("acceptClassName")),t=a.classNames("p-confirm-popup-reject p-button-sm",{"p-button-text":!N("rejectClassName")},N("rejectClassName")),r=p.createElement("div",{className:"p-confirm-popup-footer"},p.createElement(n.Button,{label:x,icon:N("rejectIcon"),className:t,onClick:R}),p.createElement(n.Button,{ref:j,label:I,icon:N("acceptIcon"),className:e,onClick:L}));if(N("footer")){var o={accept:L,reject:R,className:"p-confirm-popup-footer",acceptClassName:e,rejectClassName:t,acceptLabel:I,rejectLabel:x,element:r,props:P()};return a.ObjectUtils.getJSXElement(N("footer"),o)}return r},W=($=a.ObjectUtils.findDiffKeys(e,w.defaultProps),q=a.classNames("p-confirm-popup p-component",N("className"),{"p-input-filled":"filled"===f.default.inputStyle,"p-ripple-disabled":!1===f.default.ripple}),B=P(),V=a.ObjectUtils.getJSXElement(N("message"),B),Y=a.IconUtils.getJSXIcon(N("icon"),{className:"p-confirm-popup-icon"},{props:B}),F=p.createElement("div",{className:"p-confirm-popup-content"},Y,p.createElement("span",{className:"p-confirm-popup-message"},V)),G=Q(),p.createElement(o.CSSTransition,{nodeRef:g,classNames:"p-connected-overlay",in:s,timeout:{enter:120,exit:100},options:N("transitionOptions"),unmountOnExit:!0,onEnter:_,onEntered:K,onExit:Z,onExited:J},p.createElement("div",m({ref:g,id:N("id"),className:q,style:N("style")},$,{onClick:A}),F,G)));return p.createElement(l.Portal,{element:W,appendTo:N("appendTo"),visible:N("visible")})})));return w.displayName="ConfirmPopup",w.defaultProps={__TYPE:"ConfirmPopup",tagKey:void 0,target:null,visible:!1,message:null,rejectLabel:null,acceptLabel:null,icon:null,rejectIcon:null,acceptIcon:null,rejectClassName:null,acceptClassName:null,className:null,style:null,appendTo:null,dismissable:!0,footer:null,onShow:null,onHide:null,accept:null,reject:null,transitionOptions:null},e.ConfirmPopup=w,e.confirmPopup=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=N(N({},e),{visible:void 0===e.visible||e.visible})).visible&&i.OverlayService.emit("confirm-popup",e);var t=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i.OverlayService.emit("confirm-popup",N(N(N({},e),t),{visible:!0}))},r=function(){i.OverlayService.emit("confirm-popup",{visible:!1})};return{show:t,hide:r}},Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.api,primereact.button,primereact.csstransition,primereact.hooks,primereact.overlayservice,primereact.portal,primereact.utils);
|
|
@@ -434,7 +434,10 @@ var ContextMenu = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
|
|
|
434
434
|
});
|
|
435
435
|
var createContextMenu = function createContextMenu() {
|
|
436
436
|
var otherProps = utils.ObjectUtils.findDiffKeys(props, ContextMenu.defaultProps);
|
|
437
|
-
var className = utils.classNames('p-contextmenu p-component', props.className
|
|
437
|
+
var className = utils.classNames('p-contextmenu p-component', props.className, {
|
|
438
|
+
'p-input-filled': PrimeReact__default["default"].inputStyle === 'filled',
|
|
439
|
+
'p-ripple-disabled': PrimeReact__default["default"].ripple === false
|
|
440
|
+
});
|
|
438
441
|
return /*#__PURE__*/React__namespace.createElement(csstransition.CSSTransition, {
|
|
439
442
|
nodeRef: menuRef,
|
|
440
443
|
classNames: "p-contextmenu",
|