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
package/ripple/ripple.d.ts
CHANGED
|
@@ -1,7 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Ripple component adds ripple effect to the host element.
|
|
4
|
+
*
|
|
5
|
+
* [Live Demo](https://www.primefaces.org/primereact/ripple)
|
|
6
|
+
*
|
|
7
|
+
* @module ripple
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
1
10
|
import * as React from 'react';
|
|
2
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Defines valid properties in Ripple component.
|
|
14
|
+
* @group Properties
|
|
15
|
+
*/
|
|
3
16
|
export interface RippleProps {
|
|
4
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Used to get the child elements of the component.
|
|
19
|
+
* @readonly
|
|
20
|
+
*/
|
|
21
|
+
children?: React.ReactNode | undefined;
|
|
5
22
|
}
|
|
6
23
|
|
|
24
|
+
/**
|
|
25
|
+
* **PrimeReact - Ripple**
|
|
26
|
+
*
|
|
27
|
+
* _Ripple component adds ripple effect to the host element._
|
|
28
|
+
*
|
|
29
|
+
* [Live Demo](https://www.primefaces.org/primereact/ripple/)
|
|
30
|
+
* --- ---
|
|
31
|
+
* 
|
|
32
|
+
*
|
|
33
|
+
* @group Component
|
|
34
|
+
*/
|
|
7
35
|
export declare class Ripple extends React.Component<RippleProps, any> {}
|
package/row/row.d.ts
CHANGED
|
@@ -1,9 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Row component is a helper component used to create grouping structures in DataTable.
|
|
4
|
+
*
|
|
5
|
+
* [Live Demo](https://www.primefaces.org/primereact/datatable/)
|
|
6
|
+
*
|
|
7
|
+
* @module row
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
1
10
|
import * as React from 'react';
|
|
2
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Defines valid properties in Row component.
|
|
14
|
+
* @group Properties
|
|
15
|
+
*/
|
|
3
16
|
export interface RowProps {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Inline style of the element.
|
|
19
|
+
*/
|
|
20
|
+
style?: React.CSSProperties | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Style class of the row.
|
|
23
|
+
*/
|
|
24
|
+
className?: string | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Used to get the child elements of the component.
|
|
27
|
+
* @readonly
|
|
28
|
+
*/
|
|
29
|
+
children?: React.ReactNode | undefined;
|
|
7
30
|
}
|
|
8
31
|
|
|
32
|
+
/**
|
|
33
|
+
* **PrimeReact - Row**
|
|
34
|
+
*
|
|
35
|
+
* _Row component is a helper component used to create grouping structures in DataTable._
|
|
36
|
+
*
|
|
37
|
+
* [Live Demo](https://www.primefaces.org/primereact/datatable/)
|
|
38
|
+
* --- ---
|
|
39
|
+
* 
|
|
40
|
+
*
|
|
41
|
+
* @group Component
|
|
42
|
+
*/
|
|
9
43
|
export declare class Row extends React.Component<RowProps, any> {}
|
|
@@ -1,12 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* ScrollPanel is a cross browser, lightweight and skinnable alternative to native browser scrollbar.
|
|
4
|
+
*
|
|
5
|
+
* [Live Demo](https://www.primefaces.org/primereact/scrollpanel/)
|
|
6
|
+
*
|
|
7
|
+
* @module scrollpanel
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
1
10
|
import * as React from 'react';
|
|
2
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Defines valid properties in ScrollPanel component. In addition to these, all properties of HTMLDivElement can be used in this component.
|
|
14
|
+
* @group Properties
|
|
15
|
+
*/
|
|
3
16
|
export interface ScrollPanelProps extends Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'ref'> {
|
|
4
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Used to get the child elements of the component.
|
|
19
|
+
* @readonly
|
|
20
|
+
*/
|
|
21
|
+
children?: React.ReactNode | undefined;
|
|
5
22
|
}
|
|
6
23
|
|
|
24
|
+
/**
|
|
25
|
+
* **PrimeReact - ScrollPanel**
|
|
26
|
+
*
|
|
27
|
+
* _ScrollPanel is a cross browser, lightweight and skinnable alternative to native browser scrollbar._
|
|
28
|
+
*
|
|
29
|
+
* [Live Demo](https://www.primefaces.org/primereact/scrollpanel/)
|
|
30
|
+
* --- ---
|
|
31
|
+
* 
|
|
32
|
+
*
|
|
33
|
+
* @group Component
|
|
34
|
+
*/
|
|
7
35
|
export declare class ScrollPanel extends React.Component<ScrollPanelProps, any> {
|
|
36
|
+
/**
|
|
37
|
+
* Used to get container element.
|
|
38
|
+
* @return {HTMLDivElement} Container element
|
|
39
|
+
*/
|
|
8
40
|
public getElement(): HTMLDivElement;
|
|
41
|
+
/**
|
|
42
|
+
* Used to get content of the scrollpanel.
|
|
43
|
+
* @return {HTMLDivElement} Content element
|
|
44
|
+
*/
|
|
9
45
|
public getContent(): HTMLDivElement;
|
|
46
|
+
/**
|
|
47
|
+
* Used to get horizontal scrollbar of the panel.
|
|
48
|
+
* @return {HTMLDivElement} Horizontal bar element
|
|
49
|
+
*/
|
|
10
50
|
public getXBar(): HTMLDivElement;
|
|
51
|
+
/**
|
|
52
|
+
* Used to get vertical scrollbar of the panel.
|
|
53
|
+
* @return {HTMLDivElement} Vertical bar element
|
|
54
|
+
*/
|
|
11
55
|
public getYBar(): HTMLDivElement;
|
|
12
56
|
}
|
package/scrolltop/scrolltop.d.ts
CHANGED
|
@@ -1,24 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* ScrollTop gets displayed after a certain scroll position and used to navigates to the top of the page quickly.
|
|
4
|
+
*
|
|
5
|
+
* [Live Demo](https://www.primefaces.org/primereact/scrolltop/)
|
|
6
|
+
*
|
|
7
|
+
* @module scrolltop
|
|
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
|
+
* Defines valid properties in ScrollTop component.
|
|
16
|
+
* @group Properties
|
|
17
|
+
*/
|
|
9
18
|
export interface ScrollTopProps {
|
|
10
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Target of the ScrollTop, valid values are "window" and "parent".
|
|
21
|
+
* @defaultValue window
|
|
22
|
+
*/
|
|
23
|
+
target?: 'window' | 'parent' | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Defines the threshold value of the vertical scroll position of the target to toggle the visibility.
|
|
26
|
+
* @defaultValue 400
|
|
27
|
+
*/
|
|
11
28
|
threshold?: number;
|
|
29
|
+
/**
|
|
30
|
+
* Icon to display.
|
|
31
|
+
* @defaultValue pi pi-chevron-up
|
|
32
|
+
*/
|
|
12
33
|
icon?: IconType<ScrollTopProps>;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Defines the scrolling behavior, "smooth" adds an animation and "auto" scrolls with a jump.
|
|
36
|
+
* @defaultValue smooth
|
|
37
|
+
*/
|
|
38
|
+
behavior?: 'auto' | 'smooth' | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Style class of the component.
|
|
41
|
+
*/
|
|
42
|
+
className?: string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Inline style of the component.
|
|
45
|
+
*/
|
|
46
|
+
style?: React.CSSProperties | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* The properties of CSSTransition can be customized, except for "nodeRef" and "in" properties.
|
|
49
|
+
* @type {CSSTransitionProps}
|
|
50
|
+
*/
|
|
51
|
+
transitionOptions?: CSSTransitionProps | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Callback to invoke when overlay panel becomes visible.
|
|
54
|
+
*/
|
|
17
55
|
onShow?(): void;
|
|
56
|
+
/**
|
|
57
|
+
* Callback to invoke when overlay becomes hidden.
|
|
58
|
+
*/
|
|
18
59
|
onHide?(): void;
|
|
19
|
-
|
|
60
|
+
/**
|
|
61
|
+
* Used to get the child elements of the component.
|
|
62
|
+
* @readonly
|
|
63
|
+
*/
|
|
64
|
+
children?: React.ReactNode | undefined;
|
|
20
65
|
}
|
|
21
66
|
|
|
67
|
+
/**
|
|
68
|
+
* **PrimeReact - ScrollTop**
|
|
69
|
+
*
|
|
70
|
+
* _ScrollTop gets displayed after a certain scroll position and used to navigates to the top of the page quickly._
|
|
71
|
+
*
|
|
72
|
+
* [Live Demo](https://www.primefaces.org/primereact/scrolltop/)
|
|
73
|
+
* --- ---
|
|
74
|
+
* 
|
|
75
|
+
*
|
|
76
|
+
* @group Component
|
|
77
|
+
*/
|
|
22
78
|
export declare class ScrollTop extends React.Component<ScrollTopProps, any> {
|
|
79
|
+
/**
|
|
80
|
+
* Used to get container element.
|
|
81
|
+
* @return {HTMLButtonElement} Container element
|
|
82
|
+
*/
|
|
23
83
|
public getElement(): HTMLButtonElement;
|
|
24
84
|
}
|
|
@@ -253,6 +253,9 @@ var SelectButton = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
|
|
|
253
253
|
React__namespace.useImperativeHandle(ref, function () {
|
|
254
254
|
return {
|
|
255
255
|
props: props,
|
|
256
|
+
focus: function focus() {
|
|
257
|
+
return utils.DomHandler.focusFirstElement(elementRef.current);
|
|
258
|
+
},
|
|
256
259
|
getElement: function getElement() {
|
|
257
260
|
return elementRef.current;
|
|
258
261
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/tooltip"),n=require("primereact/utils"),l=require("primereact/ripple");function r(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var l=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,l.get?l:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var o=r(e);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e},a.apply(this,arguments)}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,l=new Array(t);n<t;n++)l[n]=e[n];return l}function u(e){if(Array.isArray(e))return i(e)}function c(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function s(e,t){if(e){if("string"==typeof e)return i(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)?i(e,t):void 0}}function p(){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 f(e){return u(e)||c(e)||s(e)||p()}function d(e){if(Array.isArray(e))return e}function b(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var l,r,o,a,i=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(l=o.call(n)).done)&&(i.push(l.value),i.length!==t);u=!0);}catch(e){c=!0,r=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw r}}return i}}function m(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var v=o.memo((function(e){var t,r,a=o.useState(!1),i=(r=2,d(t=a)||b(t,r)||s(t,r)||m()),u=i[1],c=function(t){e.onClick&&e.onClick({originalEvent:t,option:e.option})},p=n.classNames("p-button p-component",{"p-highlight":e.selected,"p-disabled":e.disabled,"p-focus":i[0]},e.className),f=e.template?n.ObjectUtils.getJSXElement(e.template,e.option):o.createElement("span",{className:"p-button-label p-c"},e.label);return o.createElement("div",{className:p,role:"button","aria-label":e.label,"aria-pressed":e.selected,onClick:c,onKeyDown:function(e){32===e.which&&(c(e),e.preventDefault())},tabIndex:e.tabIndex,onFocus:function(){u(!0)},onBlur:function(){u(!1)}},f,!e.disabled&&o.createElement(l.Ripple,null))}));v.displayName="SelectButtonItem";var y=o.memo(o.forwardRef((function(e,l){var r=o.useRef(null),i=function(t){if(!e.disabled&&!s(t.option)){var l=p(t.option);if(!l||e.unselectable){var r,o=c(t.option);if(e.multiple){var a=e.value?f(e.value):[];r=l?a.filter((function(t){return!n.ObjectUtils.equals(t,o,e.dataKey)})):[].concat(f(a),[o])}else r=l?null:o;e.onChange&&e.onChange({originalEvent:t.originalEvent,value:r,stopPropagation:function(){},preventDefault:function(){},target:{name:e.name,id:e.id,value:r}})}}},u=function(t){return e.optionLabel?n.ObjectUtils.resolveFieldData(t,e.optionLabel):t&&void 0!==t.label?t.label:t},c=function(t){return e.optionValue?n.ObjectUtils.resolveFieldData(t,e.optionValue):t&&void 0!==t.value?t.value:t},s=function(t){return e.optionDisabled?n.ObjectUtils.isFunction(e.optionDisabled)?e.optionDisabled(t):n.ObjectUtils.resolveFieldData(t,e.optionDisabled):!(!t||void 0===t.disabled)&&t.disabled},p=function(t){var l=c(t);return e.multiple?!(!e.value||!e.value.length)&&e.value.some((function(t){return n.ObjectUtils.equals(t,l,e.dataKey)})):n.ObjectUtils.equals(e.value,l,e.dataKey)};o.useImperativeHandle(l,(function(){return{props:e,getElement:function(){return r.current}}}));var d=n.ObjectUtils.isNotEmpty(e.tooltip),b=n.ObjectUtils.findDiffKeys(e,y.defaultProps),m=n.classNames("p-selectbutton p-buttonset p-component",e.className),g=e.options&&e.options.length?e.options.map((function(t,n){var l=e.disabled||s(t),r=u(t),a=l?null:0,c=p(t);return o.createElement(v,{key:r+"_"+n,label:r,className:t.className,option:t,onClick:i,template:e.itemTemplate,selected:c,tabIndex:a,disabled:l})})):null;return o.createElement(o.Fragment,null,o.createElement("div",a({ref:r,id:e.id,className:m,style:e.style},b,{role:"group"}),g),d&&o.createElement(t.Tooltip,a({target:r,content:e.tooltip},e.tooltipOptions)))})));y.displayName="SelectButton",y.defaultProps={__TYPE:"SelectButton",id:null,value:null,options:null,optionLabel:null,optionValue:null,optionDisabled:null,tabIndex:null,multiple:!1,unselectable:!0,disabled:!1,style:null,className:null,dataKey:null,tooltip:null,tooltipOptions:null,itemTemplate:null,onChange:null},exports.SelectButton=y;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/tooltip"),n=require("primereact/utils"),l=require("primereact/ripple");function r(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var l=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,l.get?l:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var o=r(e);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e},a.apply(this,arguments)}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,l=new Array(t);n<t;n++)l[n]=e[n];return l}function u(e){if(Array.isArray(e))return i(e)}function c(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function s(e,t){if(e){if("string"==typeof e)return i(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)?i(e,t):void 0}}function p(){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 f(e){return u(e)||c(e)||s(e)||p()}function d(e){if(Array.isArray(e))return e}function b(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var l,r,o,a,i=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(l=o.call(n)).done)&&(i.push(l.value),i.length!==t);u=!0);}catch(e){c=!0,r=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw r}}return i}}function m(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var v=o.memo((function(e){var t,r,a=o.useState(!1),i=(r=2,d(t=a)||b(t,r)||s(t,r)||m()),u=i[1],c=function(t){e.onClick&&e.onClick({originalEvent:t,option:e.option})},p=n.classNames("p-button p-component",{"p-highlight":e.selected,"p-disabled":e.disabled,"p-focus":i[0]},e.className),f=e.template?n.ObjectUtils.getJSXElement(e.template,e.option):o.createElement("span",{className:"p-button-label p-c"},e.label);return o.createElement("div",{className:p,role:"button","aria-label":e.label,"aria-pressed":e.selected,onClick:c,onKeyDown:function(e){32===e.which&&(c(e),e.preventDefault())},tabIndex:e.tabIndex,onFocus:function(){u(!0)},onBlur:function(){u(!1)}},f,!e.disabled&&o.createElement(l.Ripple,null))}));v.displayName="SelectButtonItem";var y=o.memo(o.forwardRef((function(e,l){var r=o.useRef(null),i=function(t){if(!e.disabled&&!s(t.option)){var l=p(t.option);if(!l||e.unselectable){var r,o=c(t.option);if(e.multiple){var a=e.value?f(e.value):[];r=l?a.filter((function(t){return!n.ObjectUtils.equals(t,o,e.dataKey)})):[].concat(f(a),[o])}else r=l?null:o;e.onChange&&e.onChange({originalEvent:t.originalEvent,value:r,stopPropagation:function(){},preventDefault:function(){},target:{name:e.name,id:e.id,value:r}})}}},u=function(t){return e.optionLabel?n.ObjectUtils.resolveFieldData(t,e.optionLabel):t&&void 0!==t.label?t.label:t},c=function(t){return e.optionValue?n.ObjectUtils.resolveFieldData(t,e.optionValue):t&&void 0!==t.value?t.value:t},s=function(t){return e.optionDisabled?n.ObjectUtils.isFunction(e.optionDisabled)?e.optionDisabled(t):n.ObjectUtils.resolveFieldData(t,e.optionDisabled):!(!t||void 0===t.disabled)&&t.disabled},p=function(t){var l=c(t);return e.multiple?!(!e.value||!e.value.length)&&e.value.some((function(t){return n.ObjectUtils.equals(t,l,e.dataKey)})):n.ObjectUtils.equals(e.value,l,e.dataKey)};o.useImperativeHandle(l,(function(){return{props:e,focus:function(){return n.DomHandler.focusFirstElement(r.current)},getElement:function(){return r.current}}}));var d=n.ObjectUtils.isNotEmpty(e.tooltip),b=n.ObjectUtils.findDiffKeys(e,y.defaultProps),m=n.classNames("p-selectbutton p-buttonset p-component",e.className),g=e.options&&e.options.length?e.options.map((function(t,n){var l=e.disabled||s(t),r=u(t),a=l?null:0,c=p(t);return o.createElement(v,{key:r+"_"+n,label:r,className:t.className,option:t,onClick:i,template:e.itemTemplate,selected:c,tabIndex:a,disabled:l})})):null;return o.createElement(o.Fragment,null,o.createElement("div",a({ref:r,id:e.id,className:m,style:e.style},b,{role:"group"}),g),d&&o.createElement(t.Tooltip,a({target:r,content:e.tooltip},e.tooltipOptions)))})));y.displayName="SelectButton",y.defaultProps={__TYPE:"SelectButton",id:null,value:null,options:null,optionLabel:null,optionValue:null,optionDisabled:null,tabIndex:null,multiple:!1,unselectable:!0,disabled:!1,style:null,className:null,dataKey:null,tooltip:null,tooltipOptions:null,itemTemplate:null,onChange:null},exports.SelectButton=y;
|
|
@@ -1,42 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* SelectButton is used to choose single or multiple items from a list using buttons.
|
|
4
|
+
*
|
|
5
|
+
* [Live Demo](https://www.primefaces.org/primereact/selectbutton/)
|
|
6
|
+
*
|
|
7
|
+
* @module selectbutton
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
1
10
|
import * as React from 'react';
|
|
2
|
-
import TooltipOptions from '../tooltip/tooltipoptions';
|
|
3
11
|
import { SelectItemOptionsType } from '../selectitem/selectitem';
|
|
12
|
+
import { TooltipOptions } from '../tooltip/tooltipoptions';
|
|
13
|
+
import { FormEvent } from '../ts-helpers';
|
|
4
14
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
interface SelectButtonChangeParams {
|
|
14
|
-
originalEvent: React.SyntheticEvent;
|
|
15
|
-
value: any;
|
|
16
|
-
stopPropagation(): void;
|
|
17
|
-
preventDefault(): void;
|
|
18
|
-
target: SelectButtonChangeTargetOptions;
|
|
19
|
-
}
|
|
15
|
+
/**
|
|
16
|
+
* Custom change event.
|
|
17
|
+
* @see {@link SelectButtonProps.onChange}
|
|
18
|
+
* @extends {FormEvent}
|
|
19
|
+
* @event
|
|
20
|
+
*/
|
|
21
|
+
interface SelectButtonChangeEvent extends FormEvent {}
|
|
20
22
|
|
|
23
|
+
/**
|
|
24
|
+
* Defines valid properties in SelectButton component. In addition to these, all properties of HTMLDivElement can be used in this component.
|
|
25
|
+
* @group Properties
|
|
26
|
+
*/
|
|
21
27
|
export interface SelectButtonProps extends Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'unselectable' | 'onChange' | 'ref'> {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Value of the component.
|
|
30
|
+
*/
|
|
31
|
+
value?: any | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* An array of objects to display as the available options.
|
|
34
|
+
*/
|
|
35
|
+
options?: SelectItemOptionsType | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Name of the label field of an option when an arbitrary objects instead of SelectItems are used as options.
|
|
38
|
+
*/
|
|
39
|
+
optionLabel?: string | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Name of the value field of an option when arbitrary objects are used as options instead of SelectItems.
|
|
42
|
+
*/
|
|
43
|
+
optionValue?: string | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Property name or getter function to use as the disabled flag of an option, defaults to false when not defined.
|
|
46
|
+
*/
|
|
47
|
+
optionDisabled?: string | ((option: any) => boolean);
|
|
48
|
+
/**
|
|
49
|
+
* Index of the element in tabbing order.
|
|
50
|
+
*/
|
|
51
|
+
tabIndex?: number | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* When specified, allows selecting multiple values.
|
|
54
|
+
* @defaultValue false
|
|
55
|
+
*/
|
|
56
|
+
multiple?: boolean | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Whether selection can be cleared.
|
|
59
|
+
* @defaultValue true
|
|
60
|
+
*/
|
|
61
|
+
unselectable?: boolean | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* When present, it specifies that the element should be disabled.
|
|
64
|
+
* @defaultValue false
|
|
65
|
+
*/
|
|
66
|
+
disabled?: boolean | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* A property to uniquely match the value in options for better performance.
|
|
69
|
+
*/
|
|
70
|
+
dataKey?: string | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* Content of the tooltip.
|
|
73
|
+
*/
|
|
74
|
+
tooltip?: string | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* Configuration of the tooltip, refer to the tooltip documentation for more information.
|
|
77
|
+
*/
|
|
78
|
+
tooltipOptions?: TooltipOptions | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* Establishes relationships between the component and label(s) where its value should be one or more element IDs.
|
|
81
|
+
*/
|
|
82
|
+
ariaLabelledBy?: string | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Function that gets the option and returns the content.
|
|
85
|
+
* @param {*} item - Current item
|
|
86
|
+
*/
|
|
87
|
+
itemTemplate?(item: any): React.ReactNode;
|
|
88
|
+
/**
|
|
89
|
+
* Callback to invoke on value change.
|
|
90
|
+
* @param {SelectButtonChangeEvent} event - Custom change event.
|
|
91
|
+
*/
|
|
92
|
+
onChange?(event: SelectButtonChangeEvent): void;
|
|
93
|
+
/**
|
|
94
|
+
* Used to get the child elements of the component.
|
|
95
|
+
* @readonly
|
|
96
|
+
*/
|
|
97
|
+
children?: React.ReactNode | undefined;
|
|
38
98
|
}
|
|
39
99
|
|
|
100
|
+
/**
|
|
101
|
+
* **PrimeReact - SelectButton**
|
|
102
|
+
*
|
|
103
|
+
* _SelectButton is used to choose single or multiple items from a list using buttons._
|
|
104
|
+
*
|
|
105
|
+
* [Live Demo](https://www.primefaces.org/primereact/selectbutton/)
|
|
106
|
+
* --- ---
|
|
107
|
+
* 
|
|
108
|
+
*
|
|
109
|
+
* @group Component
|
|
110
|
+
*/
|
|
40
111
|
export declare class SelectButton extends React.Component<SelectButtonProps, any> {
|
|
112
|
+
/**
|
|
113
|
+
* Used to get container element.
|
|
114
|
+
* @return {HTMLDivElement} Container element
|
|
115
|
+
*/
|
|
41
116
|
public getElement(): HTMLDivElement;
|
|
117
|
+
/**
|
|
118
|
+
* Used to focus the component.
|
|
119
|
+
*/
|
|
120
|
+
public focus(): void;
|
|
42
121
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Tooltip } from 'primereact/tooltip';
|
|
3
|
-
import { classNames, ObjectUtils } from 'primereact/utils';
|
|
3
|
+
import { classNames, ObjectUtils, DomHandler } from 'primereact/utils';
|
|
4
4
|
import { Ripple } from 'primereact/ripple';
|
|
5
5
|
|
|
6
6
|
function _extends() {
|
|
@@ -229,6 +229,9 @@ var SelectButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functi
|
|
|
229
229
|
React.useImperativeHandle(ref, function () {
|
|
230
230
|
return {
|
|
231
231
|
props: props,
|
|
232
|
+
focus: function focus() {
|
|
233
|
+
return DomHandler.focusFirstElement(elementRef.current);
|
|
234
|
+
},
|
|
232
235
|
getElement: function getElement() {
|
|
233
236
|
return elementRef.current;
|
|
234
237
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{Tooltip as t}from"primereact/tooltip";import{classNames as n,ObjectUtils as l}from"primereact/utils";import{Ripple as
|
|
1
|
+
import*as e from"react";import{Tooltip as t}from"primereact/tooltip";import{classNames as n,ObjectUtils as l,DomHandler as o}from"primereact/utils";import{Ripple as r}from"primereact/ripple";function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e},a.apply(this,arguments)}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,l=new Array(t);n<t;n++)l[n]=e[n];return l}function u(e){if(Array.isArray(e))return i(e)}function s(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function c(e,t){if(e){if("string"==typeof e)return i(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)?i(e,t):void 0}}function p(){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 f(e){return u(e)||s(e)||c(e)||p()}function m(e){if(Array.isArray(e))return e}function d(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var l,o,r,a,i=[],u=!0,s=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(l=r.call(n)).done)&&(i.push(l.value),i.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return i}}function b(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var v=e.memo((function(t){var o,a,i=e.useState(!1),u=(a=2,m(o=i)||d(o,a)||c(o,a)||b()),s=u[1],p=function(e){t.onClick&&t.onClick({originalEvent:e,option:t.option})},f=n("p-button p-component",{"p-highlight":t.selected,"p-disabled":t.disabled,"p-focus":u[0]},t.className),v=t.template?l.getJSXElement(t.template,t.option):e.createElement("span",{className:"p-button-label p-c"},t.label);return e.createElement("div",{className:f,role:"button","aria-label":t.label,"aria-pressed":t.selected,onClick:p,onKeyDown:function(e){32===e.which&&(p(e),e.preventDefault())},tabIndex:t.tabIndex,onFocus:function(){s(!0)},onBlur:function(){s(!1)}},v,!t.disabled&&e.createElement(r,null))}));v.displayName="SelectButtonItem";var y=e.memo(e.forwardRef((function(r,i){var u=e.useRef(null),s=function(e){if(!r.disabled&&!m(e.option)){var t=d(e.option);if(!t||r.unselectable){var n,o=p(e.option);if(r.multiple){var a=r.value?f(r.value):[];n=t?a.filter((function(e){return!l.equals(e,o,r.dataKey)})):[].concat(f(a),[o])}else n=t?null:o;r.onChange&&r.onChange({originalEvent:e.originalEvent,value:n,stopPropagation:function(){},preventDefault:function(){},target:{name:r.name,id:r.id,value:n}})}}},c=function(e){return r.optionLabel?l.resolveFieldData(e,r.optionLabel):e&&void 0!==e.label?e.label:e},p=function(e){return r.optionValue?l.resolveFieldData(e,r.optionValue):e&&void 0!==e.value?e.value:e},m=function(e){return r.optionDisabled?l.isFunction(r.optionDisabled)?r.optionDisabled(e):l.resolveFieldData(e,r.optionDisabled):!(!e||void 0===e.disabled)&&e.disabled},d=function(e){var t=p(e);return r.multiple?!(!r.value||!r.value.length)&&r.value.some((function(e){return l.equals(e,t,r.dataKey)})):l.equals(r.value,t,r.dataKey)};e.useImperativeHandle(i,(function(){return{props:r,focus:function(){return o.focusFirstElement(u.current)},getElement:function(){return u.current}}}));var b=l.isNotEmpty(r.tooltip),g=l.findDiffKeys(r,y.defaultProps),h=n("p-selectbutton p-buttonset p-component",r.className),E=r.options&&r.options.length?r.options.map((function(t,n){var l=r.disabled||m(t),o=c(t),a=l?null:0,i=d(t);return e.createElement(v,{key:o+"_"+n,label:o,className:t.className,option:t,onClick:s,template:r.itemTemplate,selected:i,tabIndex:a,disabled:l})})):null;return e.createElement(e.Fragment,null,e.createElement("div",a({ref:u,id:r.id,className:h,style:r.style},g,{role:"group"}),E),b&&e.createElement(t,a({target:u,content:r.tooltip},r.tooltipOptions)))})));y.displayName="SelectButton",y.defaultProps={__TYPE:"SelectButton",id:null,value:null,options:null,optionLabel:null,optionValue:null,optionDisabled:null,tabIndex:null,multiple:!1,unselectable:!0,disabled:!1,style:null,className:null,dataKey:null,tooltip:null,tooltipOptions:null,itemTemplate:null,onChange:null};export{y as SelectButton};
|
|
@@ -248,6 +248,9 @@ this.primereact.selectbutton = (function (exports, React, tooltip, utils, ripple
|
|
|
248
248
|
React__namespace.useImperativeHandle(ref, function () {
|
|
249
249
|
return {
|
|
250
250
|
props: props,
|
|
251
|
+
focus: function focus() {
|
|
252
|
+
return utils.DomHandler.focusFirstElement(elementRef.current);
|
|
253
|
+
},
|
|
251
254
|
getElement: function getElement() {
|
|
252
255
|
return elementRef.current;
|
|
253
256
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.selectbutton=function(e,t,n,l,r){"use strict";function
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.selectbutton=function(e,t,n,l,r){"use strict";function o(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var l=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,l.get?l:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var a=o(t);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e},i.apply(this,arguments)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,l=new Array(t);n<t;n++)l[n]=e[n];return l}function c(e){if(Array.isArray(e))return u(e)}function s(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function p(e,t){if(e){if("string"==typeof e)return u(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)?u(e,t):void 0}}function f(){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 d(e){return c(e)||s(e)||p(e)||f()}function b(e){if(Array.isArray(e))return e}function m(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var l,r,o,a,i=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(l=o.call(n)).done)&&(i.push(l.value),i.length!==t);u=!0);}catch(e){c=!0,r=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw r}}return i}}function v(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var y=a.memo((function(e){var t,n,o=a.useState(!1),i=(n=2,b(t=o)||m(t,n)||p(t,n)||v()),u=i[1],c=function(t){e.onClick&&e.onClick({originalEvent:t,option:e.option})},s=l.classNames("p-button p-component",{"p-highlight":e.selected,"p-disabled":e.disabled,"p-focus":i[0]},e.className),f=e.template?l.ObjectUtils.getJSXElement(e.template,e.option):a.createElement("span",{className:"p-button-label p-c"},e.label);return a.createElement("div",{className:s,role:"button","aria-label":e.label,"aria-pressed":e.selected,onClick:c,onKeyDown:function(e){32===e.which&&(c(e),e.preventDefault())},tabIndex:e.tabIndex,onFocus:function(){u(!0)},onBlur:function(){u(!1)}},f,!e.disabled&&a.createElement(r.Ripple,null))}));y.displayName="SelectButtonItem";var g=a.memo(a.forwardRef((function(e,t){var r=a.useRef(null),o=function(t){if(!e.disabled&&!s(t.option)){var n=p(t.option);if(!n||e.unselectable){var r,o=c(t.option);if(e.multiple){var a=e.value?d(e.value):[];r=n?a.filter((function(t){return!l.ObjectUtils.equals(t,o,e.dataKey)})):[].concat(d(a),[o])}else r=n?null:o;e.onChange&&e.onChange({originalEvent:t.originalEvent,value:r,stopPropagation:function(){},preventDefault:function(){},target:{name:e.name,id:e.id,value:r}})}}},u=function(t){return e.optionLabel?l.ObjectUtils.resolveFieldData(t,e.optionLabel):t&&void 0!==t.label?t.label:t},c=function(t){return e.optionValue?l.ObjectUtils.resolveFieldData(t,e.optionValue):t&&void 0!==t.value?t.value:t},s=function(t){return e.optionDisabled?l.ObjectUtils.isFunction(e.optionDisabled)?e.optionDisabled(t):l.ObjectUtils.resolveFieldData(t,e.optionDisabled):!(!t||void 0===t.disabled)&&t.disabled},p=function(t){var n=c(t);return e.multiple?!(!e.value||!e.value.length)&&e.value.some((function(t){return l.ObjectUtils.equals(t,n,e.dataKey)})):l.ObjectUtils.equals(e.value,n,e.dataKey)};a.useImperativeHandle(t,(function(){return{props:e,focus:function(){return l.DomHandler.focusFirstElement(r.current)},getElement:function(){return r.current}}}));var f=l.ObjectUtils.isNotEmpty(e.tooltip),b=l.ObjectUtils.findDiffKeys(e,g.defaultProps),m=l.classNames("p-selectbutton p-buttonset p-component",e.className),v=e.options&&e.options.length?e.options.map((function(t,n){var l=e.disabled||s(t),r=u(t),i=l?null:0,c=p(t);return a.createElement(y,{key:r+"_"+n,label:r,className:t.className,option:t,onClick:o,template:e.itemTemplate,selected:c,tabIndex:i,disabled:l})})):null;return a.createElement(a.Fragment,null,a.createElement("div",i({ref:r,id:e.id,className:m,style:e.style},b,{role:"group"}),v),f&&a.createElement(n.Tooltip,i({target:r,content:e.tooltip},e.tooltipOptions)))})));return g.displayName="SelectButton",g.defaultProps={__TYPE:"SelectButton",id:null,value:null,options:null,optionLabel:null,optionValue:null,optionDisabled:null,tabIndex:null,multiple:!1,unselectable:!0,disabled:!1,style:null,className:null,dataKey:null,tooltip:null,tooltipOptions:null,itemTemplate:null,onChange:null},e.SelectButton=g,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.tooltip,primereact.utils,primereact.ripple);
|
|
@@ -1,12 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* This module contains the interface and types for options in a select component.
|
|
4
|
+
*
|
|
5
|
+
* @module selectitem
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
1
8
|
import { IconType } from '../utils';
|
|
2
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Custom options type.
|
|
12
|
+
* @group Misc
|
|
13
|
+
*/
|
|
3
14
|
export type SelectItemOptionsType = SelectItem[] | any[];
|
|
4
15
|
|
|
16
|
+
/**
|
|
17
|
+
* Defines valid properties in SelectItem component.
|
|
18
|
+
* @group Properties
|
|
19
|
+
*/
|
|
5
20
|
export interface SelectItem {
|
|
21
|
+
/**
|
|
22
|
+
* Label of the option.
|
|
23
|
+
*/
|
|
6
24
|
label?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Value of the option.
|
|
27
|
+
*/
|
|
7
28
|
value?: any;
|
|
29
|
+
/**
|
|
30
|
+
* ClassName of the option.
|
|
31
|
+
*/
|
|
8
32
|
className?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Icon to display to the option.
|
|
35
|
+
*/
|
|
9
36
|
icon?: IconType<SelectItem>;
|
|
37
|
+
/**
|
|
38
|
+
* Tooltip text of the option. (Not supported)
|
|
39
|
+
*/
|
|
10
40
|
title?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Whether the option is disabled or not. (Not supported)
|
|
43
|
+
* @defaultValue false
|
|
44
|
+
*/
|
|
11
45
|
disabled?: boolean;
|
|
12
46
|
}
|
package/sidebar/sidebar.cjs.js
CHANGED
|
@@ -239,6 +239,15 @@ var Sidebar = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
|
|
|
239
239
|
setVisibleState(true);
|
|
240
240
|
}
|
|
241
241
|
}, [maskVisibleState]);
|
|
242
|
+
hooks.useUpdateEffect(function () {
|
|
243
|
+
// #3811 if dismissible state is toggled while open we must unregister and re-regisetr
|
|
244
|
+
if (visibleState) {
|
|
245
|
+
unbindDocumentClickListener();
|
|
246
|
+
if (props.dismissable && !props.modal) {
|
|
247
|
+
bindDocumentClickListener();
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}, [props.dismissable, props.modal, visibleState]);
|
|
242
251
|
hooks.useUnmountEffect(function () {
|
|
243
252
|
disableDocumentSettings();
|
|
244
253
|
maskRef.current && utils.ZIndexUtils.clear(maskRef.current);
|
|
@@ -264,7 +273,10 @@ var Sidebar = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
|
|
|
264
273
|
};
|
|
265
274
|
var createElement = function createElement() {
|
|
266
275
|
var otherProps = utils.ObjectUtils.findDiffKeys(props, Sidebar.defaultProps);
|
|
267
|
-
var className = utils.classNames('p-sidebar p-component', props.className
|
|
276
|
+
var className = utils.classNames('p-sidebar p-component', props.className, {
|
|
277
|
+
'p-input-filled': PrimeReact__default["default"].inputStyle === 'filled',
|
|
278
|
+
'p-ripple-disabled': PrimeReact__default["default"].ripple === false
|
|
279
|
+
});
|
|
268
280
|
var maskClassName = utils.classNames('p-sidebar-mask', {
|
|
269
281
|
'p-component-overlay p-component-overlay-enter': props.modal,
|
|
270
282
|
'p-sidebar-mask-scrollblocker': props.blockScroll,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/api"),n=require("primereact/csstransition"),r=require("primereact/hooks"),l=require("primereact/portal"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/api"),n=require("primereact/csstransition"),r=require("primereact/hooks"),l=require("primereact/portal"),i=require("primereact/ripple"),o=require("primereact/utils");function a(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(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=s(e),u=a(t);function d(){return d=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},d.apply(this,arguments)}function f(e){if(Array.isArray(e))return e}function p(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,l,i,o,a=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);s=!0);}catch(e){c=!0,l=e}finally{try{if(!s&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw l}}return a}}function m(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 b(e,t){if(e){if("string"==typeof e)return m(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)?m(e,t):void 0}}function v(){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 y(e,t){return f(e)||p(e,t)||b(e,t)||v()}var h=c.forwardRef((function(e,a){var s=y(c.useState(!1),2),f=s[0],p=s[1],m=y(c.useState(!1),2),b=m[0],v=m[1],E=c.useRef(null),S=c.useRef(null),O=c.useRef(null),g=y(r.useEventListener({type:"keydown",listener:function(e){27===e.which&&o.ZIndexUtils.get(S.current)===o.ZIndexUtils.getCurrent("modal",u.default.autoZIndex)&&U(e)}}),2),w=g[0],k=g[1],I=y(r.useEventListener({type:"click",listener:function(e){2!==e.which&&C(e)&&U(e)}}),2),j=I[0],x=I[1],C=function(e){return E&&E.current&&!E.current.contains(e.target)},N=function(t){e.dismissable&&e.modal&&S.current===t.target&&U(t)},U=function(t){e.onHide(),t.preventDefault()},Z=function(){var t;e.onShow&&e.onShow(),!((t=document.activeElement)&&E&&E.current.contains(t))&&e.showCloseIcon&&O.current.focus(),D()},P=function(){e.modal&&o.DomHandler.addClass(S.current,"p-component-overlay-leave")},q=function(){o.ZIndexUtils.clear(S.current),p(!1),A()},D=function(){e.closeOnEscape&&w(),e.dismissable&&!e.modal&&j(),e.blockScroll&&o.DomHandler.addClass(document.body,"p-overflow-hidden")},A=function(){k(),x(),e.blockScroll&&o.DomHandler.removeClass(document.body,"p-overflow-hidden")};c.useImperativeHandle(a,(function(){return{props:e,getElement:function(){return E.current},gteMask:function(){return S.current},getCloseIcon:function(){return O.current}}})),r.useMountEffect((function(){e.visible&&p(!0)})),r.useUpdateEffect((function(){e.visible&&!f&&p(!0),e.visible!==b&&f&&v(e.visible)})),r.useUpdateEffect((function(){f&&(o.ZIndexUtils.set("modal",S.current,u.default.autoZIndex,e.baseZIndex||u.default.zIndex.modal),v(!0))}),[f]),r.useUpdateEffect((function(){b&&(x(),e.dismissable&&!e.modal&&j())}),[e.dismissable,e.modal,b]),r.useUnmountEffect((function(){A(),S.current&&o.ZIndexUtils.clear(S.current)}));var H,M,R,T,_,L,z,J=function(){if(e.showCloseIcon){var n=e.ariaCloseLabel||t.localeOption("close");return c.createElement("button",{type:"button",ref:O,className:"p-sidebar-close p-sidebar-icon p-link",onClick:U,"aria-label":n},c.createElement("span",{className:"p-sidebar-close-icon pi pi-times","aria-hidden":"true"}),c.createElement(i.Ripple,null))}return null};return f&&(M=o.ObjectUtils.findDiffKeys(e,h.defaultProps),R=o.classNames("p-sidebar p-component",e.className,{"p-input-filled":"filled"===u.default.inputStyle,"p-ripple-disabled":!1===u.default.ripple}),T=o.classNames("p-sidebar-mask",{"p-component-overlay p-component-overlay-enter":e.modal,"p-sidebar-mask-scrollblocker":e.blockScroll,"p-sidebar-visible":f,"p-sidebar-full":e.fullScreen},(H=["left","right","top","bottom"].find((function(t){return t===e.position})))?"p-sidebar-".concat(H):"",e.maskClassName),_=J(),L=e.icons?o.ObjectUtils.getJSXElement(e.icons,e):null,z=c.createElement("div",{ref:S,style:e.maskStyle,className:T,onMouseDown:N},c.createElement(n.CSSTransition,{nodeRef:E,classNames:"p-sidebar",in:b,timeout:{enter:e.fullScreen?150:300,exit:e.fullScreen?150:300},options:e.transitionOptions,unmountOnExit:!0,onEntered:Z,onExiting:P,onExited:q},c.createElement("div",d({ref:E,id:e.id,className:R,style:e.style},M,{role:"complementary"}),c.createElement("div",{className:"p-sidebar-header"},L,_),c.createElement("div",{className:"p-sidebar-content"},e.children)))),c.createElement(l.Portal,{element:z,appendTo:e.appendTo,visible:!0}))}));h.displayName="Sidebar",h.defaultProps={__TYPE:"Sidebar",id:null,style:null,className:null,maskStyle:null,maskClassName:null,visible:!1,position:"left",fullScreen:!1,blockScroll:!1,baseZIndex:0,dismissable:!0,showCloseIcon:!0,ariaCloseLabel:null,closeOnEscape:!0,icons:null,modal:!0,appendTo:null,transitionOptions:null,onShow:null,onHide:null},exports.Sidebar=h;
|