primereact 8.1.1 → 8.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/accordion/accordion.cjs.js +10 -0
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +4 -5
- package/accordion/accordion.esm.js +10 -0
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +10 -0
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +2 -0
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +1 -0
- package/api/api.esm.js +2 -0
- package/api/api.esm.min.js +1 -1
- package/api/api.js +2 -0
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +33 -11
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +5 -1
- package/autocomplete/autocomplete.esm.js +34 -12
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +33 -11
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +18 -7
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.d.ts +4 -4
- package/avatar/avatar.esm.js +18 -7
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +18 -7
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.cjs.js +10 -0
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.d.ts +4 -4
- package/avatargroup/avatargroup.esm.js +10 -0
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +10 -0
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/badge.cjs.js +12 -2
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.d.ts +5 -5
- package/badge/badge.esm.js +12 -2
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +12 -2
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +7 -1
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.d.ts +2 -4
- package/blockui/blockui.esm.js +7 -1
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +7 -1
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +11 -0
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.d.ts +4 -5
- package/breadcrumb/breadcrumb.esm.js +11 -0
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +11 -0
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.d.ts +3 -1
- package/calendar/calendar.cjs.js +143 -32
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +4 -0
- package/calendar/calendar.esm.js +143 -32
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +143 -32
- package/calendar/calendar.min.js +1 -1
- package/captcha/captcha.cjs.js +5 -1
- package/captcha/captcha.cjs.min.js +1 -1
- package/captcha/captcha.d.ts +2 -3
- package/captcha/captcha.esm.js +5 -1
- package/captcha/captcha.esm.min.js +1 -1
- package/captcha/captcha.js +5 -1
- package/captcha/captcha.min.js +1 -1
- package/card/card.d.ts +1 -4
- package/carousel/carousel.cjs.js +9 -1
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.d.ts +4 -5
- package/carousel/carousel.esm.js +9 -1
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +9 -1
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +20 -3
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +7 -2
- package/cascadeselect/cascadeselect.esm.js +20 -3
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +20 -3
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +52 -23
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.d.ts +1 -0
- package/chart/chart.esm.js +52 -23
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +52 -23
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +31 -16
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +5 -2
- package/checkbox/checkbox.esm.js +32 -17
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +31 -16
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +11 -0
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +4 -4
- package/chip/chip.esm.js +11 -0
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +11 -0
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +39 -2
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +9 -5
- package/chips/chips.esm.js +40 -3
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +40 -4
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +16 -0
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +7 -1
- package/colorpicker/colorpicker.esm.js +16 -0
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +16 -0
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.d.ts +1 -0
- package/confirmdialog/confirmdialog.cjs.js +2 -1
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +1 -6
- package/confirmdialog/confirmdialog.esm.js +2 -1
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +2 -1
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +1 -0
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +1 -0
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +1 -0
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +6 -1
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +2 -4
- package/contextmenu/contextmenu.esm.js +6 -1
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +6 -1
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +650 -195
- package/core/core.min.js +14 -14
- package/datascroller/datascroller.cjs.js +10 -1
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.d.ts +2 -4
- package/datascroller/datascroller.esm.js +10 -1
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +10 -1
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +92 -28
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +6 -2
- package/datatable/datatable.esm.js +93 -29
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +92 -28
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +11 -1
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.d.ts +4 -5
- package/dataview/dataview.esm.js +11 -1
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +11 -1
- package/dataview/dataview.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +8 -0
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.d.ts +4 -2
- package/deferredcontent/deferredcontent.esm.js +8 -0
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +8 -0
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +23 -3
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +6 -0
- package/dialog/dialog.esm.js +23 -3
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +23 -3
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +10 -0
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.d.ts +4 -4
- package/divider/divider.esm.js +10 -0
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +10 -0
- package/divider/divider.min.js +1 -1
- package/dock/dock.cjs.js +11 -0
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.d.ts +4 -5
- package/dock/dock.esm.js +11 -0
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +11 -0
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +141 -30
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +15 -2
- package/dropdown/dropdown.esm.js +141 -30
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +141 -30
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +103 -50
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.d.ts +3 -0
- package/editor/editor.esm.js +103 -50
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +103 -50
- package/editor/editor.min.js +1 -1
- package/fieldset/fieldset.cjs.js +13 -0
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.d.ts +5 -5
- package/fieldset/fieldset.esm.js +13 -0
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +13 -0
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +15 -1
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +4 -0
- package/fileupload/fileupload.esm.js +15 -1
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +15 -1
- package/fileupload/fileupload.min.js +1 -1
- package/fullcalendar/fullcalendar.cjs.js +8 -0
- package/fullcalendar/fullcalendar.cjs.min.js +1 -1
- package/fullcalendar/fullcalendar.d.ts +3 -1
- package/fullcalendar/fullcalendar.esm.js +8 -0
- package/fullcalendar/fullcalendar.esm.min.js +1 -1
- package/fullcalendar/fullcalendar.js +8 -0
- package/fullcalendar/fullcalendar.min.js +1 -1
- package/galleria/galleria.cjs.js +9 -2
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.d.ts +2 -4
- package/galleria/galleria.esm.js +9 -2
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +9 -2
- package/galleria/galleria.min.js +1 -1
- package/gmap/gmap.cjs.js +5 -1
- package/gmap/gmap.cjs.min.js +1 -1
- package/gmap/gmap.d.ts +5 -4
- package/gmap/gmap.esm.js +5 -1
- package/gmap/gmap.esm.min.js +1 -1
- package/gmap/gmap.js +5 -1
- package/gmap/gmap.min.js +1 -1
- package/image/image.cjs.js +18 -5
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +5 -4
- package/image/image.esm.js +18 -5
- package/image/image.esm.min.js +1 -1
- package/image/image.js +18 -5
- package/image/image.min.css +1 -1
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +11 -1
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.d.ts +4 -5
- package/inplace/inplace.esm.js +11 -1
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +11 -1
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +15 -5
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.d.ts +5 -13
- package/inputmask/inputmask.esm.js +15 -5
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +15 -5
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +12 -4
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +4 -5
- package/inputnumber/inputnumber.esm.js +12 -4
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +12 -4
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +12 -1
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.d.ts +4 -1
- package/inputswitch/inputswitch.esm.js +13 -2
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +12 -1
- package/inputswitch/inputswitch.min.css +1 -1
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +3 -2
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.d.ts +4 -1
- package/inputtext/inputtext.esm.js +3 -2
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +3 -2
- package/inputtext/inputtext.min.css +1 -1
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +3 -2
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.d.ts +4 -1
- package/inputtextarea/inputtextarea.esm.js +3 -2
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +3 -2
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/keyfilter/keyfilter.cjs.js +4 -4
- package/keyfilter/keyfilter.cjs.min.js +1 -1
- package/keyfilter/keyfilter.esm.js +4 -4
- package/keyfilter/keyfilter.esm.min.js +1 -1
- package/keyfilter/keyfilter.js +4 -4
- package/keyfilter/keyfilter.min.js +1 -1
- package/knob/knob.cjs.js +8 -0
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.d.ts +3 -1
- package/knob/knob.esm.js +8 -0
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +8 -0
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +129 -20
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.d.ts +14 -7
- package/listbox/listbox.esm.js +130 -21
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +130 -22
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +40 -12
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.d.ts +11 -5
- package/megamenu/megamenu.esm.js +40 -12
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +40 -12
- package/megamenu/megamenu.min.css +1 -1
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +23 -5
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.d.ts +7 -5
- package/mention/mention.esm.js +23 -5
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +23 -5
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +8 -1
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +3 -4
- package/menu/menu.esm.js +8 -1
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +8 -1
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +13 -1
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.d.ts +6 -5
- package/menubar/menubar.esm.js +13 -1
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +13 -1
- package/menubar/menubar.min.js +1 -1
- package/menuitem/menuitem.d.ts +2 -0
- package/message/message.cjs.js +11 -0
- package/message/message.cjs.min.js +1 -1
- package/message/message.d.ts +5 -6
- package/message/message.esm.js +11 -0
- package/message/message.esm.min.js +1 -1
- package/message/message.js +11 -0
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +11 -3
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +3 -5
- package/messages/messages.esm.js +11 -3
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +11 -3
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +95 -27
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +16 -2
- package/multiselect/multiselect.esm.js +95 -27
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +95 -27
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +8 -0
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +4 -6
- package/multistatecheckbox/multistatecheckbox.esm.js +8 -0
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +8 -0
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +128 -4
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.d.ts +17 -6
- package/orderlist/orderlist.esm.js +128 -4
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +129 -6
- package/orderlist/orderlist.min.css +1 -1
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +10 -0
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.d.ts +4 -5
- package/organizationchart/organizationchart.esm.js +10 -0
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +10 -0
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +7 -3
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +2 -4
- package/overlaypanel/overlaypanel.esm.js +7 -3
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +7 -3
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.cjs.js +10 -0
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.d.ts +4 -4
- package/paginator/paginator.esm.js +10 -0
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +10 -0
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +11 -0
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.d.ts +5 -5
- package/panel/panel.esm.js +11 -0
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +11 -0
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +11 -0
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +4 -5
- package/panelmenu/panelmenu.esm.js +11 -0
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +11 -0
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/password.cjs.js +17 -2
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +6 -4
- package/password/password.esm.js +17 -2
- package/password/password.esm.min.js +1 -1
- package/password/password.js +17 -2
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +199 -25
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.d.ts +32 -1
- package/picklist/picklist.esm.js +199 -25
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +200 -27
- package/picklist/picklist.min.css +1 -1
- package/picklist/picklist.min.js +1 -1
- package/primereact.all.cjs.js +2536 -640
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +2536 -640
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +2536 -640
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +12 -0
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.d.ts +4 -5
- package/progressbar/progressbar.esm.js +12 -0
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +12 -0
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/progressspinner.cjs.js +10 -0
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.d.ts +4 -5
- package/progressspinner/progressspinner.esm.js +10 -0
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +10 -0
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +30 -15
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.d.ts +3 -4
- package/radiobutton/radiobutton.esm.js +31 -16
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +30 -15
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +8 -0
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.d.ts +3 -4
- package/rating/rating.esm.js +8 -0
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +8 -0
- package/rating/rating.min.js +1 -1
- package/resources/primereact.css +94 -26
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +41 -7
- package/resources/themes/arya-green/theme.css +41 -7
- package/resources/themes/arya-orange/theme.css +41 -7
- package/resources/themes/arya-purple/theme.css +41 -7
- package/resources/themes/bootstrap4-dark-blue/theme.css +41 -7
- package/resources/themes/bootstrap4-dark-purple/theme.css +41 -7
- package/resources/themes/bootstrap4-light-blue/theme.css +40 -6
- package/resources/themes/bootstrap4-light-purple/theme.css +40 -6
- package/resources/themes/fluent-light/theme.css +41 -7
- package/resources/themes/lara-dark-blue/theme.css +41 -7
- package/resources/themes/lara-dark-indigo/theme.css +41 -7
- package/resources/themes/lara-dark-purple/theme.css +41 -7
- package/resources/themes/lara-dark-teal/theme.css +41 -7
- package/resources/themes/lara-light-blue/theme.css +41 -7
- package/resources/themes/lara-light-indigo/theme.css +41 -7
- package/resources/themes/lara-light-purple/theme.css +41 -7
- package/resources/themes/lara-light-teal/theme.css +41 -7
- package/resources/themes/luna-amber/theme.css +41 -7
- package/resources/themes/luna-blue/theme.css +41 -7
- package/resources/themes/luna-green/theme.css +41 -7
- package/resources/themes/luna-pink/theme.css +41 -7
- package/resources/themes/md-dark-deeppurple/theme.css +41 -7
- package/resources/themes/md-dark-indigo/theme.css +41 -7
- package/resources/themes/md-light-deeppurple/theme.css +41 -7
- package/resources/themes/md-light-indigo/theme.css +41 -7
- package/resources/themes/mdc-dark-deeppurple/theme.css +41 -7
- package/resources/themes/mdc-dark-indigo/theme.css +41 -7
- package/resources/themes/mdc-light-deeppurple/theme.css +41 -7
- package/resources/themes/mdc-light-indigo/theme.css +41 -7
- package/resources/themes/nova/theme.css +41 -7
- package/resources/themes/nova-accent/theme.css +41 -7
- package/resources/themes/nova-alt/theme.css +41 -7
- package/resources/themes/rhea/theme.css +41 -7
- package/resources/themes/saga-blue/theme.css +41 -7
- package/resources/themes/saga-green/theme.css +41 -7
- package/resources/themes/saga-orange/theme.css +41 -7
- package/resources/themes/saga-purple/theme.css +41 -7
- package/resources/themes/tailwind-light/theme.css +41 -7
- package/resources/themes/vela-blue/theme.css +41 -7
- package/resources/themes/vela-green/theme.css +41 -7
- package/resources/themes/vela-orange/theme.css +41 -7
- package/resources/themes/vela-purple/theme.css +41 -7
- package/scrollpanel/scrollpanel.cjs.js +14 -1
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.d.ts +7 -5
- package/scrollpanel/scrollpanel.esm.js +14 -1
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +14 -1
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +8 -0
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.d.ts +3 -1
- package/scrolltop/scrolltop.esm.js +8 -0
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +8 -0
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +8 -0
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.d.ts +4 -5
- package/selectbutton/selectbutton.esm.js +8 -0
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +8 -0
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/sidebar.cjs.js +40 -0
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +6 -5
- package/sidebar/sidebar.esm.js +40 -0
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +40 -0
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +10 -0
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.d.ts +4 -4
- package/skeleton/skeleton.esm.js +10 -0
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +10 -0
- package/skeleton/skeleton.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +6 -1
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +2 -4
- package/slidemenu/slidemenu.esm.js +6 -1
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +6 -1
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +8 -0
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.d.ts +4 -6
- package/slider/slider.esm.js +8 -0
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +8 -0
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +5 -1
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.d.ts +2 -4
- package/speeddial/speeddial.esm.js +5 -1
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +5 -1
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +9 -1
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +4 -5
- package/splitbutton/splitbutton.esm.js +9 -1
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +9 -1
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +17 -5
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.d.ts +4 -5
- package/splitter/splitter.esm.js +18 -6
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +17 -5
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +12 -0
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.d.ts +4 -5
- package/steps/steps.esm.js +12 -0
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +12 -0
- package/steps/steps.min.js +1 -1
- package/styleclass/styleclass.cjs.js +12 -1
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.d.ts +5 -2
- package/styleclass/styleclass.esm.js +12 -1
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +12 -1
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +10 -0
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.d.ts +4 -5
- package/tabmenu/tabmenu.esm.js +10 -0
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +10 -0
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +7 -1
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +2 -4
- package/tabview/tabview.esm.js +7 -1
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +7 -1
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +10 -0
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.d.ts +5 -5
- package/tag/tag.esm.js +10 -0
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +10 -0
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +9 -1
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.d.ts +4 -5
- package/terminal/terminal.esm.js +10 -2
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +9 -1
- package/terminal/terminal.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +8 -2
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +2 -4
- package/tieredmenu/tieredmenu.esm.js +8 -2
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +8 -2
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +11 -0
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.d.ts +4 -5
- package/timeline/timeline.esm.js +11 -0
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +11 -0
- package/timeline/timeline.min.js +1 -1
- package/toast/toast.cjs.js +35 -36
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +4 -5
- package/toast/toast.esm.js +35 -36
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +35 -36
- package/toast/toast.min.css +1 -1
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +8 -0
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.d.ts +4 -6
- package/togglebutton/togglebutton.esm.js +8 -0
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +8 -0
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +10 -0
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.d.ts +4 -5
- package/toolbar/toolbar.esm.js +10 -0
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +10 -0
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +73 -52
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.d.ts +2 -0
- package/tooltip/tooltip.esm.js +73 -52
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +73 -52
- package/tooltip/tooltip.min.js +1 -1
- package/tree/tree.cjs.js +50 -7
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +10 -1
- package/tree/tree.esm.js +50 -7
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +50 -7
- package/tree/tree.min.js +1 -1
- package/treeselect/treeselect.cjs.js +36 -6
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +14 -6
- package/treeselect/treeselect.esm.js +36 -6
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +36 -6
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +7 -2
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +3 -2
- package/treetable/treetable.esm.js +7 -2
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +7 -2
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +8 -0
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.d.ts +3 -5
- package/tristatecheckbox/tristatecheckbox.esm.js +8 -0
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +8 -0
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +122 -8
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +1 -0
- package/utils/utils.esm.js +122 -8
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +122 -8
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +156 -66
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.d.ts +12 -0
- package/virtualscroller/virtualscroller.esm.js +158 -68
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +156 -66
- package/virtualscroller/virtualscroller.min.css +1 -1
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +304 -4
package/chart/chart.esm.js
CHANGED
|
@@ -20,30 +20,58 @@ function _extends() {
|
|
|
20
20
|
return _extends.apply(this, arguments);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var ChartJS = function () {
|
|
24
|
+
try {
|
|
25
|
+
return Chart;
|
|
26
|
+
} catch (_unused) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
}();
|
|
30
|
+
|
|
31
|
+
var PrimeReactChart = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
32
|
+
var elementRef = React.useRef(null);
|
|
24
33
|
var chartRef = React.useRef(null);
|
|
25
34
|
var canvasRef = React.useRef(null);
|
|
26
35
|
|
|
27
36
|
var initChart = function initChart() {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
37
|
+
destroyChart();
|
|
38
|
+
var configuration = {
|
|
39
|
+
type: props.type,
|
|
40
|
+
data: props.data,
|
|
41
|
+
options: props.options,
|
|
42
|
+
plugins: props.plugins
|
|
43
|
+
};
|
|
33
44
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
45
|
+
if (ChartJS) {
|
|
46
|
+
// GitHub #3059 loaded by script only
|
|
47
|
+
chartRef.current = new ChartJS(canvasRef.current, configuration);
|
|
48
|
+
} else {
|
|
49
|
+
import('chart.js/auto').then(function (module) {
|
|
50
|
+
destroyChart();
|
|
51
|
+
|
|
52
|
+
if (module) {
|
|
53
|
+
if (module["default"]) {
|
|
54
|
+
// WebPack
|
|
55
|
+
chartRef.current = new module["default"](canvasRef.current, configuration);
|
|
56
|
+
} else {
|
|
57
|
+
// ParcelJS
|
|
58
|
+
chartRef.current = new module(canvasRef.current, configuration);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
var destroyChart = function destroyChart() {
|
|
66
|
+
if (chartRef.current) {
|
|
67
|
+
chartRef.current.destroy();
|
|
68
|
+
chartRef.current = null;
|
|
69
|
+
}
|
|
43
70
|
};
|
|
44
71
|
|
|
45
72
|
React.useImperativeHandle(ref, function () {
|
|
46
73
|
return {
|
|
74
|
+
props: props,
|
|
47
75
|
getCanvas: function getCanvas() {
|
|
48
76
|
return canvasRef.current;
|
|
49
77
|
},
|
|
@@ -53,6 +81,9 @@ var Chart = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (pro
|
|
|
53
81
|
getBase64Image: function getBase64Image() {
|
|
54
82
|
return chartRef.current.toBase64Image();
|
|
55
83
|
},
|
|
84
|
+
getElement: function getElement() {
|
|
85
|
+
return elementRef.current;
|
|
86
|
+
},
|
|
56
87
|
generateLegend: function generateLegend() {
|
|
57
88
|
return chartRef.current && chartRef.current.generateLegend();
|
|
58
89
|
},
|
|
@@ -65,12 +96,9 @@ var Chart = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (pro
|
|
|
65
96
|
initChart();
|
|
66
97
|
});
|
|
67
98
|
useUnmountEffect(function () {
|
|
68
|
-
|
|
69
|
-
chartRef.current.destroy();
|
|
70
|
-
chartRef.current = null;
|
|
71
|
-
}
|
|
99
|
+
destroyChart();
|
|
72
100
|
});
|
|
73
|
-
var otherProps = ObjectUtils.findDiffKeys(props,
|
|
101
|
+
var otherProps = ObjectUtils.findDiffKeys(props, PrimeReactChart.defaultProps);
|
|
74
102
|
var className = classNames('p-chart', props.className);
|
|
75
103
|
var style = Object.assign({
|
|
76
104
|
width: props.width,
|
|
@@ -78,6 +106,7 @@ var Chart = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (pro
|
|
|
78
106
|
}, props.style);
|
|
79
107
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
80
108
|
id: props.id,
|
|
109
|
+
ref: elementRef,
|
|
81
110
|
style: style,
|
|
82
111
|
className: className
|
|
83
112
|
}, otherProps), /*#__PURE__*/React.createElement("canvas", {
|
|
@@ -88,8 +117,8 @@ var Chart = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (pro
|
|
|
88
117
|
}), function (prevProps, nextProps) {
|
|
89
118
|
return prevProps.data === nextProps.data && prevProps.options === nextProps.options && prevProps.type === nextProps.type;
|
|
90
119
|
});
|
|
91
|
-
|
|
92
|
-
|
|
120
|
+
PrimeReactChart.displayName = 'Chart';
|
|
121
|
+
PrimeReactChart.defaultProps = {
|
|
93
122
|
__TYPE: 'Chart',
|
|
94
123
|
id: null,
|
|
95
124
|
type: null,
|
|
@@ -102,4 +131,4 @@ Chart.defaultProps = {
|
|
|
102
131
|
className: null
|
|
103
132
|
};
|
|
104
133
|
|
|
105
|
-
export { Chart };
|
|
134
|
+
export { PrimeReactChart as Chart };
|
package/chart/chart.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as t from"react";import{useUnmountEffect as e}from"primereact/hooks";import{ObjectUtils as r,classNames as n}from"primereact/utils";function u(){return u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},u.apply(this,arguments)}var a=t.memo(t.forwardRef((function(
|
|
1
|
+
import*as t from"react";import{useUnmountEffect as e}from"primereact/hooks";import{ObjectUtils as r,classNames as n}from"primereact/utils";function u(){return u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},u.apply(this,arguments)}var a=function(){try{return Chart}catch(t){return null}}(),i=t.memo(t.forwardRef((function(c,l){var o=t.useRef(null),s=t.useRef(null),f=t.useRef(null),p=function(){h();var t={type:c.type,data:c.data,options:c.options,plugins:c.plugins};a?s.current=new a(f.current,t):import("chart.js/auto").then((function(e){h(),e&&(s.current=e.default?new e.default(f.current,t):new e(f.current,t))}))},h=function(){s.current&&(s.current.destroy(),s.current=null)};t.useImperativeHandle(l,(function(){return{props:c,getCanvas:function(){return f.current},getChart:function(){return s.current},getBase64Image:function(){return s.current.toBase64Image()},getElement:function(){return o.current},generateLegend:function(){return s.current&&s.current.generateLegend()},refresh:function(){return s.current&&s.current.update()}}})),t.useEffect((function(){p()})),e((function(){h()}));var d=r.findDiffKeys(c,i.defaultProps),g=n("p-chart",c.className),m=Object.assign({width:c.width,height:c.height},c.style);return t.createElement("div",u({id:c.id,ref:o,style:m,className:g},d),t.createElement("canvas",{ref:f,width:c.width,height:c.height}))})),(function(t,e){return t.data===e.data&&t.options===e.options&&t.type===e.type}));i.displayName="Chart",i.defaultProps={__TYPE:"Chart",id:null,type:null,data:null,options:null,plugins:null,width:null,height:null,style:null,className:null};export{i as Chart};
|
package/chart/chart.js
CHANGED
|
@@ -40,30 +40,58 @@ this.primereact.chart = (function (exports, React, hooks, utils) {
|
|
|
40
40
|
return _extends.apply(this, arguments);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
var
|
|
43
|
+
var ChartJS = function () {
|
|
44
|
+
try {
|
|
45
|
+
return Chart;
|
|
46
|
+
} catch (_unused) {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
}();
|
|
50
|
+
|
|
51
|
+
var PrimeReactChart = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
|
|
52
|
+
var elementRef = React__namespace.useRef(null);
|
|
44
53
|
var chartRef = React__namespace.useRef(null);
|
|
45
54
|
var canvasRef = React__namespace.useRef(null);
|
|
46
55
|
|
|
47
56
|
var initChart = function initChart() {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
57
|
+
destroyChart();
|
|
58
|
+
var configuration = {
|
|
59
|
+
type: props.type,
|
|
60
|
+
data: props.data,
|
|
61
|
+
options: props.options,
|
|
62
|
+
plugins: props.plugins
|
|
63
|
+
};
|
|
53
64
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
65
|
+
if (ChartJS) {
|
|
66
|
+
// GitHub #3059 loaded by script only
|
|
67
|
+
chartRef.current = new ChartJS(canvasRef.current, configuration);
|
|
68
|
+
} else {
|
|
69
|
+
import('chart.js/auto').then(function (module) {
|
|
70
|
+
destroyChart();
|
|
71
|
+
|
|
72
|
+
if (module) {
|
|
73
|
+
if (module["default"]) {
|
|
74
|
+
// WebPack
|
|
75
|
+
chartRef.current = new module["default"](canvasRef.current, configuration);
|
|
76
|
+
} else {
|
|
77
|
+
// ParcelJS
|
|
78
|
+
chartRef.current = new module(canvasRef.current, configuration);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
var destroyChart = function destroyChart() {
|
|
86
|
+
if (chartRef.current) {
|
|
87
|
+
chartRef.current.destroy();
|
|
88
|
+
chartRef.current = null;
|
|
89
|
+
}
|
|
63
90
|
};
|
|
64
91
|
|
|
65
92
|
React__namespace.useImperativeHandle(ref, function () {
|
|
66
93
|
return {
|
|
94
|
+
props: props,
|
|
67
95
|
getCanvas: function getCanvas() {
|
|
68
96
|
return canvasRef.current;
|
|
69
97
|
},
|
|
@@ -73,6 +101,9 @@ this.primereact.chart = (function (exports, React, hooks, utils) {
|
|
|
73
101
|
getBase64Image: function getBase64Image() {
|
|
74
102
|
return chartRef.current.toBase64Image();
|
|
75
103
|
},
|
|
104
|
+
getElement: function getElement() {
|
|
105
|
+
return elementRef.current;
|
|
106
|
+
},
|
|
76
107
|
generateLegend: function generateLegend() {
|
|
77
108
|
return chartRef.current && chartRef.current.generateLegend();
|
|
78
109
|
},
|
|
@@ -85,12 +116,9 @@ this.primereact.chart = (function (exports, React, hooks, utils) {
|
|
|
85
116
|
initChart();
|
|
86
117
|
});
|
|
87
118
|
hooks.useUnmountEffect(function () {
|
|
88
|
-
|
|
89
|
-
chartRef.current.destroy();
|
|
90
|
-
chartRef.current = null;
|
|
91
|
-
}
|
|
119
|
+
destroyChart();
|
|
92
120
|
});
|
|
93
|
-
var otherProps = utils.ObjectUtils.findDiffKeys(props,
|
|
121
|
+
var otherProps = utils.ObjectUtils.findDiffKeys(props, PrimeReactChart.defaultProps);
|
|
94
122
|
var className = utils.classNames('p-chart', props.className);
|
|
95
123
|
var style = Object.assign({
|
|
96
124
|
width: props.width,
|
|
@@ -98,6 +126,7 @@ this.primereact.chart = (function (exports, React, hooks, utils) {
|
|
|
98
126
|
}, props.style);
|
|
99
127
|
return /*#__PURE__*/React__namespace.createElement("div", _extends({
|
|
100
128
|
id: props.id,
|
|
129
|
+
ref: elementRef,
|
|
101
130
|
style: style,
|
|
102
131
|
className: className
|
|
103
132
|
}, otherProps), /*#__PURE__*/React__namespace.createElement("canvas", {
|
|
@@ -108,8 +137,8 @@ this.primereact.chart = (function (exports, React, hooks, utils) {
|
|
|
108
137
|
}), function (prevProps, nextProps) {
|
|
109
138
|
return prevProps.data === nextProps.data && prevProps.options === nextProps.options && prevProps.type === nextProps.type;
|
|
110
139
|
});
|
|
111
|
-
|
|
112
|
-
|
|
140
|
+
PrimeReactChart.displayName = 'Chart';
|
|
141
|
+
PrimeReactChart.defaultProps = {
|
|
113
142
|
__TYPE: 'Chart',
|
|
114
143
|
id: null,
|
|
115
144
|
type: null,
|
|
@@ -122,7 +151,7 @@ this.primereact.chart = (function (exports, React, hooks, utils) {
|
|
|
122
151
|
className: null
|
|
123
152
|
};
|
|
124
153
|
|
|
125
|
-
exports.Chart =
|
|
154
|
+
exports.Chart = PrimeReactChart;
|
|
126
155
|
|
|
127
156
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
128
157
|
|
package/chart/chart.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.chart=function(e,t,r,n){"use strict";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 a=u(t);function c(){return c=Object.assign||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},c.apply(this,arguments)}var i=a.memo(a.forwardRef((function(e,t){var u=a.useRef(null),
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.chart=function(e,t,r,n){"use strict";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 a=u(t);function c(){return c=Object.assign||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},c.apply(this,arguments)}var i=function(){try{return Chart}catch(e){return null}}(),l=a.memo(a.forwardRef((function(e,t){var u=a.useRef(null),s=a.useRef(null),o=a.useRef(null),f=function(){p();var t={type:e.type,data:e.data,options:e.options,plugins:e.plugins};i?s.current=new i(o.current,t):import("chart.js/auto").then((function(e){p(),e&&(s.current=e.default?new e.default(o.current,t):new e(o.current,t))}))},p=function(){s.current&&(s.current.destroy(),s.current=null)};a.useImperativeHandle(t,(function(){return{props:e,getCanvas:function(){return o.current},getChart:function(){return s.current},getBase64Image:function(){return s.current.toBase64Image()},getElement:function(){return u.current},generateLegend:function(){return s.current&&s.current.generateLegend()},refresh:function(){return s.current&&s.current.update()}}})),a.useEffect((function(){f()})),r.useUnmountEffect((function(){p()}));var h=n.ObjectUtils.findDiffKeys(e,l.defaultProps),d=n.classNames("p-chart",e.className),g=Object.assign({width:e.width,height:e.height},e.style);return a.createElement("div",c({id:e.id,ref:u,style:g,className:d},h),a.createElement("canvas",{ref:o,width:e.width,height:e.height}))})),(function(e,t){return e.data===t.data&&e.options===t.options&&e.type===t.type}));return l.displayName="Chart",l.defaultProps={__TYPE:"Chart",id:null,type:null,data:null,options:null,plugins:null,width:null,height:null,style:null,className:null},e.Chart=l,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.hooks,primereact.utils);
|
package/checkbox/checkbox.cjs.js
CHANGED
|
@@ -119,23 +119,27 @@ var Checkbox = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
119
119
|
if (!props.disabled && !props.readOnly && props.onChange) {
|
|
120
120
|
var _checked = isChecked();
|
|
121
121
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
checked: value,
|
|
127
|
-
stopPropagation: function stopPropagation() {},
|
|
128
|
-
preventDefault: function preventDefault() {},
|
|
129
|
-
target: {
|
|
130
|
-
type: 'checkbox',
|
|
131
|
-
name: props.name,
|
|
132
|
-
id: props.id,
|
|
122
|
+
if (inputRef.current.checked === _checked) {
|
|
123
|
+
var value = _checked ? props.falseValue : props.trueValue;
|
|
124
|
+
props.onChange({
|
|
125
|
+
originalEvent: event,
|
|
133
126
|
value: props.value,
|
|
134
|
-
checked: value
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
127
|
+
checked: value,
|
|
128
|
+
stopPropagation: function stopPropagation() {},
|
|
129
|
+
preventDefault: function preventDefault() {},
|
|
130
|
+
target: {
|
|
131
|
+
type: 'checkbox',
|
|
132
|
+
name: props.name,
|
|
133
|
+
id: props.id,
|
|
134
|
+
value: props.value,
|
|
135
|
+
checked: value
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
inputRef.current.checked = !_checked;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
utils.DomHandler.focus(inputRef.current);
|
|
142
|
+
event.preventDefault();
|
|
139
143
|
}
|
|
140
144
|
};
|
|
141
145
|
|
|
@@ -151,6 +155,17 @@ var Checkbox = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
151
155
|
return props.checked === props.trueValue;
|
|
152
156
|
};
|
|
153
157
|
|
|
158
|
+
React__namespace.useImperativeHandle(ref, function () {
|
|
159
|
+
return {
|
|
160
|
+
props: props,
|
|
161
|
+
getElement: function getElement() {
|
|
162
|
+
return elementRef.current;
|
|
163
|
+
},
|
|
164
|
+
getInput: function getInput() {
|
|
165
|
+
return inputRef.current;
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
});
|
|
154
169
|
React__namespace.useEffect(function () {
|
|
155
170
|
utils.ObjectUtils.combinedRefs(inputRef, props.inputRef);
|
|
156
171
|
}, [inputRef, props.inputRef]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/hooks"),n=require("primereact/tooltip"),r=require("primereact/utils");function l(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 a=l(e);function o(){return o=Object.assign||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},o.apply(this,arguments)}function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/hooks"),n=require("primereact/tooltip"),r=require("primereact/utils");function l(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 a=l(e);function o(){return o=Object.assign||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},o.apply(this,arguments)}function u(e){if(Array.isArray(e))return e}function c(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,l,a=[],o=!0,u=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){u=!0,l=e}finally{try{o||null==n.return||n.return()}finally{if(u)throw l}}return a}}function i(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 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 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.")}var f=a.memo(a.forwardRef((function(e,l){var i,p,b=a.useState(!1),h=(p=2,u(i=b)||c(i,p)||s(i,p)||d()),m=h[0],y=h[1],v=a.useRef(null),k=a.useRef(e.inputRef),g=function(){return e.checked===e.trueValue};a.useImperativeHandle(l,(function(){return{props:e,getElement:function(){return v.current},getInput:function(){return k.current}}})),a.useEffect((function(){r.ObjectUtils.combinedRefs(k,e.inputRef)}),[k,e.inputRef]),t.useUpdateEffect((function(){k.current.checked=g()}),[e.checked,e.trueValue]);var x=g(),O=r.ObjectUtils.isNotEmpty(e.tooltip),j=r.ObjectUtils.findDiffKeys(e,f.defaultProps),E=r.classNames("p-checkbox p-component",{"p-checkbox-checked":x,"p-checkbox-disabled":e.disabled,"p-checkbox-focused":m},e.className),C=r.classNames("p-checkbox-box",{"p-highlight":x,"p-disabled":e.disabled,"p-focus":m}),I=r.IconUtils.getJSXIcon(x?e.icon:"",{className:"p-checkbox-icon p-c"},{props:e,checked:x});return a.createElement(a.Fragment,null,a.createElement("div",o({ref:v,id:e.id,className:E,style:e.style},j,{onClick:function(t){if(!e.disabled&&!e.readOnly&&e.onChange){var n=g();if(k.current.checked===n){var l=n?e.falseValue:e.trueValue;e.onChange({originalEvent:t,value:e.value,checked:l,stopPropagation:function(){},preventDefault:function(){},target:{type:"checkbox",name:e.name,id:e.id,value:e.value,checked:l}}),k.current.checked=!n}r.DomHandler.focus(k.current),t.preventDefault()}},onContextMenu:e.onContextMenu,onMouseDown:e.onMouseDown}),a.createElement("div",{className:"p-hidden-accessible"},a.createElement("input",{ref:k,type:"checkbox",id:e.inputId,name:e.name,tabIndex:e.tabIndex,defaultChecked:x,"aria-labelledby":e["aria-labelledby"],"aria-label":e["aria-label"],onFocus:function(){y(!0)},onBlur:function(){y(!1)},disabled:e.disabled,readOnly:e.readOnly,required:e.required})),a.createElement("div",{className:C},I)),O&&a.createElement(n.Tooltip,o({target:v,content:e.tooltip},e.tooltipOptions)))})));f.displayName="Checkbox",f.defaultProps={__TYPE:"Checkbox",id:null,inputRef:null,inputId:null,value:null,name:null,checked:!1,trueValue:!0,falseValue:!1,style:null,className:null,disabled:!1,required:!1,readOnly:!1,tabIndex:null,icon:"pi pi-check",tooltip:null,tooltipOptions:null,"aria-label":null,"aria-labelledby":null,onChange:null,onMouseDown:null,onContextMenu:null},exports.Checkbox=f;
|
package/checkbox/checkbox.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import TooltipOptions from '../tooltip/tooltipoptions';
|
|
|
3
3
|
import { IconType } from '../utils';
|
|
4
4
|
|
|
5
5
|
interface CheckboxChangeTargetOptions {
|
|
6
|
-
type:
|
|
6
|
+
type: string;
|
|
7
7
|
name: string;
|
|
8
8
|
id: string;
|
|
9
9
|
value: any;
|
|
@@ -43,4 +43,7 @@ export interface CheckboxProps extends Omit<React.DetailedHTMLProps<React.InputH
|
|
|
43
43
|
children?: React.ReactNode;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
export declare class Checkbox extends React.Component<CheckboxProps, any> {
|
|
46
|
+
export declare class Checkbox extends React.Component<CheckboxProps, any> {
|
|
47
|
+
public getElement(): HTMLDivElement;
|
|
48
|
+
public getInput(): HTMLInputElement;
|
|
49
|
+
}
|
package/checkbox/checkbox.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useUpdateEffect } from 'primereact/hooks';
|
|
3
3
|
import { Tooltip } from 'primereact/tooltip';
|
|
4
|
-
import { ObjectUtils, classNames, IconUtils } from 'primereact/utils';
|
|
4
|
+
import { ObjectUtils, classNames, IconUtils, DomHandler } from 'primereact/utils';
|
|
5
5
|
|
|
6
6
|
function _extends() {
|
|
7
7
|
_extends = Object.assign || function (target) {
|
|
@@ -95,23 +95,27 @@ var Checkbox = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
95
95
|
if (!props.disabled && !props.readOnly && props.onChange) {
|
|
96
96
|
var _checked = isChecked();
|
|
97
97
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
checked: value,
|
|
103
|
-
stopPropagation: function stopPropagation() {},
|
|
104
|
-
preventDefault: function preventDefault() {},
|
|
105
|
-
target: {
|
|
106
|
-
type: 'checkbox',
|
|
107
|
-
name: props.name,
|
|
108
|
-
id: props.id,
|
|
98
|
+
if (inputRef.current.checked === _checked) {
|
|
99
|
+
var value = _checked ? props.falseValue : props.trueValue;
|
|
100
|
+
props.onChange({
|
|
101
|
+
originalEvent: event,
|
|
109
102
|
value: props.value,
|
|
110
|
-
checked: value
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
103
|
+
checked: value,
|
|
104
|
+
stopPropagation: function stopPropagation() {},
|
|
105
|
+
preventDefault: function preventDefault() {},
|
|
106
|
+
target: {
|
|
107
|
+
type: 'checkbox',
|
|
108
|
+
name: props.name,
|
|
109
|
+
id: props.id,
|
|
110
|
+
value: props.value,
|
|
111
|
+
checked: value
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
inputRef.current.checked = !_checked;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
DomHandler.focus(inputRef.current);
|
|
118
|
+
event.preventDefault();
|
|
115
119
|
}
|
|
116
120
|
};
|
|
117
121
|
|
|
@@ -127,6 +131,17 @@ var Checkbox = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
127
131
|
return props.checked === props.trueValue;
|
|
128
132
|
};
|
|
129
133
|
|
|
134
|
+
React.useImperativeHandle(ref, function () {
|
|
135
|
+
return {
|
|
136
|
+
props: props,
|
|
137
|
+
getElement: function getElement() {
|
|
138
|
+
return elementRef.current;
|
|
139
|
+
},
|
|
140
|
+
getInput: function getInput() {
|
|
141
|
+
return inputRef.current;
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
});
|
|
130
145
|
React.useEffect(function () {
|
|
131
146
|
ObjectUtils.combinedRefs(inputRef, props.inputRef);
|
|
132
147
|
}, [inputRef, props.inputRef]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{useUpdateEffect as t}from"primereact/hooks";import{Tooltip as n}from"primereact/tooltip";import{ObjectUtils as r,classNames as l,IconUtils as a}from"primereact/utils";function
|
|
1
|
+
import*as e from"react";import{useUpdateEffect as t}from"primereact/hooks";import{Tooltip as n}from"primereact/tooltip";import{ObjectUtils as r,classNames as l,IconUtils as a,DomHandler as o}from"primereact/utils";function u(){return u=Object.assign||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},u.apply(this,arguments)}function c(e){if(Array.isArray(e))return e}function i(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,l,a=[],o=!0,u=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){u=!0,l=e}finally{try{o||null==n.return||n.return()}finally{if(u)throw l}}return a}}function d(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 s(e,t){if(e){if("string"==typeof e)return d(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)?d(e,t):void 0}}function p(){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 f=e.memo(e.forwardRef((function(d,m){var b,h,y=e.useState(!1),v=(h=2,c(b=y)||i(b,h)||s(b,h)||p()),k=v[0],g=v[1],x=e.useRef(null),E=e.useRef(d.inputRef),C=function(){return d.checked===d.trueValue};e.useImperativeHandle(m,(function(){return{props:d,getElement:function(){return x.current},getInput:function(){return E.current}}})),e.useEffect((function(){r.combinedRefs(E,d.inputRef)}),[E,d.inputRef]),t((function(){E.current.checked=C()}),[d.checked,d.trueValue]);var I=C(),O=r.isNotEmpty(d.tooltip),w=r.findDiffKeys(d,f.defaultProps),N=l("p-checkbox p-component",{"p-checkbox-checked":I,"p-checkbox-disabled":d.disabled,"p-checkbox-focused":k},d.className),R=l("p-checkbox-box",{"p-highlight":I,"p-disabled":d.disabled,"p-focus":k}),M=a.getJSXIcon(I?d.icon:"",{className:"p-checkbox-icon p-c"},{props:d,checked:I});return e.createElement(e.Fragment,null,e.createElement("div",u({ref:x,id:d.id,className:N,style:d.style},w,{onClick:function(e){if(!d.disabled&&!d.readOnly&&d.onChange){var t=C();if(E.current.checked===t){var n=t?d.falseValue:d.trueValue;d.onChange({originalEvent:e,value:d.value,checked:n,stopPropagation:function(){},preventDefault:function(){},target:{type:"checkbox",name:d.name,id:d.id,value:d.value,checked:n}}),E.current.checked=!t}o.focus(E.current),e.preventDefault()}},onContextMenu:d.onContextMenu,onMouseDown:d.onMouseDown}),e.createElement("div",{className:"p-hidden-accessible"},e.createElement("input",{ref:E,type:"checkbox",id:d.inputId,name:d.name,tabIndex:d.tabIndex,defaultChecked:I,"aria-labelledby":d["aria-labelledby"],"aria-label":d["aria-label"],onFocus:function(){g(!0)},onBlur:function(){g(!1)},disabled:d.disabled,readOnly:d.readOnly,required:d.required})),e.createElement("div",{className:R},M)),O&&e.createElement(n,u({target:x,content:d.tooltip},d.tooltipOptions)))})));f.displayName="Checkbox",f.defaultProps={__TYPE:"Checkbox",id:null,inputRef:null,inputId:null,value:null,name:null,checked:!1,trueValue:!0,falseValue:!1,style:null,className:null,disabled:!1,required:!1,readOnly:!1,tabIndex:null,icon:"pi pi-check",tooltip:null,tooltipOptions:null,"aria-label":null,"aria-labelledby":null,onChange:null,onMouseDown:null,onContextMenu:null};export{f as Checkbox};
|
package/checkbox/checkbox.js
CHANGED
|
@@ -114,23 +114,27 @@ this.primereact.checkbox = (function (exports, React, hooks, tooltip, utils) {
|
|
|
114
114
|
if (!props.disabled && !props.readOnly && props.onChange) {
|
|
115
115
|
var _checked = isChecked();
|
|
116
116
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
checked: value,
|
|
122
|
-
stopPropagation: function stopPropagation() {},
|
|
123
|
-
preventDefault: function preventDefault() {},
|
|
124
|
-
target: {
|
|
125
|
-
type: 'checkbox',
|
|
126
|
-
name: props.name,
|
|
127
|
-
id: props.id,
|
|
117
|
+
if (inputRef.current.checked === _checked) {
|
|
118
|
+
var value = _checked ? props.falseValue : props.trueValue;
|
|
119
|
+
props.onChange({
|
|
120
|
+
originalEvent: event,
|
|
128
121
|
value: props.value,
|
|
129
|
-
checked: value
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
122
|
+
checked: value,
|
|
123
|
+
stopPropagation: function stopPropagation() {},
|
|
124
|
+
preventDefault: function preventDefault() {},
|
|
125
|
+
target: {
|
|
126
|
+
type: 'checkbox',
|
|
127
|
+
name: props.name,
|
|
128
|
+
id: props.id,
|
|
129
|
+
value: props.value,
|
|
130
|
+
checked: value
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
inputRef.current.checked = !_checked;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
utils.DomHandler.focus(inputRef.current);
|
|
137
|
+
event.preventDefault();
|
|
134
138
|
}
|
|
135
139
|
};
|
|
136
140
|
|
|
@@ -146,6 +150,17 @@ this.primereact.checkbox = (function (exports, React, hooks, tooltip, utils) {
|
|
|
146
150
|
return props.checked === props.trueValue;
|
|
147
151
|
};
|
|
148
152
|
|
|
153
|
+
React__namespace.useImperativeHandle(ref, function () {
|
|
154
|
+
return {
|
|
155
|
+
props: props,
|
|
156
|
+
getElement: function getElement() {
|
|
157
|
+
return elementRef.current;
|
|
158
|
+
},
|
|
159
|
+
getInput: function getInput() {
|
|
160
|
+
return inputRef.current;
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
});
|
|
149
164
|
React__namespace.useEffect(function () {
|
|
150
165
|
utils.ObjectUtils.combinedRefs(inputRef, props.inputRef);
|
|
151
166
|
}, [inputRef, props.inputRef]);
|
package/checkbox/checkbox.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.checkbox=function(e,t,n,r,l){"use strict";function a(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
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.checkbox=function(e,t,n,r,l){"use strict";function a(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=a(t);function o(){return o=Object.assign||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},o.apply(this,arguments)}function u(e){if(Array.isArray(e))return e}function i(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,l,a=[],c=!0,o=!1;try{for(n=n.call(e);!(c=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);c=!0);}catch(e){o=!0,l=e}finally{try{c||null==n.return||n.return()}finally{if(o)throw l}}return a}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t){if(e){if("string"==typeof e)return s(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)?s(e,t):void 0}}function f(){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 p=c.memo(c.forwardRef((function(e,t){var a,s,b=c.useState(!1),h=(s=2,u(a=b)||i(a,s)||d(a,s)||f()),m=h[0],y=h[1],v=c.useRef(null),k=c.useRef(e.inputRef),g=function(){return e.checked===e.trueValue};c.useImperativeHandle(t,(function(){return{props:e,getElement:function(){return v.current},getInput:function(){return k.current}}})),c.useEffect((function(){l.ObjectUtils.combinedRefs(k,e.inputRef)}),[k,e.inputRef]),n.useUpdateEffect((function(){k.current.checked=g()}),[e.checked,e.trueValue]);var O=g(),x=l.ObjectUtils.isNotEmpty(e.tooltip),j=l.ObjectUtils.findDiffKeys(e,p.defaultProps),E=l.classNames("p-checkbox p-component",{"p-checkbox-checked":O,"p-checkbox-disabled":e.disabled,"p-checkbox-focused":m},e.className),C=l.classNames("p-checkbox-box",{"p-highlight":O,"p-disabled":e.disabled,"p-focus":m}),I=l.IconUtils.getJSXIcon(O?e.icon:"",{className:"p-checkbox-icon p-c"},{props:e,checked:O});return c.createElement(c.Fragment,null,c.createElement("div",o({ref:v,id:e.id,className:E,style:e.style},j,{onClick:function(t){if(!e.disabled&&!e.readOnly&&e.onChange){var n=g();if(k.current.checked===n){var r=n?e.falseValue:e.trueValue;e.onChange({originalEvent:t,value:e.value,checked:r,stopPropagation:function(){},preventDefault:function(){},target:{type:"checkbox",name:e.name,id:e.id,value:e.value,checked:r}}),k.current.checked=!n}l.DomHandler.focus(k.current),t.preventDefault()}},onContextMenu:e.onContextMenu,onMouseDown:e.onMouseDown}),c.createElement("div",{className:"p-hidden-accessible"},c.createElement("input",{ref:k,type:"checkbox",id:e.inputId,name:e.name,tabIndex:e.tabIndex,defaultChecked:O,"aria-labelledby":e["aria-labelledby"],"aria-label":e["aria-label"],onFocus:function(){y(!0)},onBlur:function(){y(!1)},disabled:e.disabled,readOnly:e.readOnly,required:e.required})),c.createElement("div",{className:C},I)),x&&c.createElement(r.Tooltip,o({target:v,content:e.tooltip},e.tooltipOptions)))})));return p.displayName="Checkbox",p.defaultProps={__TYPE:"Checkbox",id:null,inputRef:null,inputId:null,value:null,name:null,checked:!1,trueValue:!0,falseValue:!1,style:null,className:null,disabled:!1,required:!1,readOnly:!1,tabIndex:null,icon:"pi pi-check",tooltip:null,tooltipOptions:null,"aria-label":null,"aria-labelledby":null,onChange:null,onMouseDown:null,onContextMenu:null},e.Checkbox=p,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.hooks,primereact.tooltip,primereact.utils);
|
package/chip/chip.cjs.js
CHANGED
|
@@ -105,6 +105,8 @@ function _slicedToArray(arr, i) {
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
var Chip = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
|
|
108
|
+
var elementRef = React__namespace.useRef(null);
|
|
109
|
+
|
|
108
110
|
var _React$useState = React__namespace.useState(true),
|
|
109
111
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
110
112
|
visibleState = _React$useState2[0],
|
|
@@ -173,11 +175,20 @@ var Chip = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.for
|
|
|
173
175
|
}, props.className);
|
|
174
176
|
var content = props.template ? utils.ObjectUtils.getJSXElement(props.template, props) : createContent();
|
|
175
177
|
return /*#__PURE__*/React__namespace.createElement("div", _extends({
|
|
178
|
+
ref: elementRef,
|
|
176
179
|
className: className,
|
|
177
180
|
style: props.style
|
|
178
181
|
}, otherProps), content);
|
|
179
182
|
};
|
|
180
183
|
|
|
184
|
+
React__namespace.useImperativeHandle(ref, function () {
|
|
185
|
+
return {
|
|
186
|
+
props: props,
|
|
187
|
+
getElement: function getElement() {
|
|
188
|
+
return elementRef.current;
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
});
|
|
181
192
|
return visibleState && createElement();
|
|
182
193
|
}));
|
|
183
194
|
Chip.displayName = 'Chip';
|
package/chip/chip.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/utils");function r(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 n=r(e);function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/utils");function r(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 n=r(e);function l(){return l=Object.assign||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},l.apply(this,arguments)}function o(e){if(Array.isArray(e))return e}function a(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,l,o=[],a=!0,i=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(e){i=!0,l=e}finally{try{a||null==r.return||r.return()}finally{if(i)throw l}}return o}}function i(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 c(e,t){if(e){if("string"==typeof e)return i(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)?i(e,t):void 0}}function u(){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 s=n.memo(n.forwardRef((function(e,r){var i,p,m,f,y,v=n.useRef(null),b=n.useState(!0),g=(p=2,o(i=b)||a(i,p)||c(i,p)||u()),h=g[0],d=g[1],I=function(e){13===e.keyCode&&O(e)},O=function(t){d(!1),e.onRemove&&e.onRemove(t)},j=function(){var r=[];return e.image?r.push(n.createElement("img",{key:"image",src:e.image,alt:e.imageAlt,onError:e.onImageError})):e.icon&&r.push(t.IconUtils.getJSXIcon(e.icon,{key:"icon",className:"p-chip-icon"},{props:e})),e.label&&r.push(n.createElement("span",{key:"label",className:"p-chip-text"},e.label)),e.removable&&r.push(t.IconUtils.getJSXIcon(e.removeIcon,{key:"removeIcon",tabIndex:0,className:"p-chip-remove-icon",onClick:O,onKeyDown:I},{props:e})),r};return n.useImperativeHandle(r,(function(){return{props:e,getElement:function(){return v.current}}})),h&&(m=t.ObjectUtils.findDiffKeys(e,s.defaultProps),f=t.classNames("p-chip p-component",{"p-chip-image":null!=e.image},e.className),y=e.template?t.ObjectUtils.getJSXElement(e.template,e):j(),n.createElement("div",l({ref:v,className:f,style:e.style},m),y))})));s.displayName="Chip",s.defaultProps={__TYPE:"Chip",label:null,icon:null,image:null,removable:!1,removeIcon:"pi pi-times-circle",className:null,style:null,template:null,imageAlt:"chip",onImageError:null,onRemove:null},exports.Chip=s;
|
package/chip/chip.d.ts
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IconType, TemplateType } from '../utils';
|
|
3
3
|
|
|
4
|
-
export interface ChipProps {
|
|
4
|
+
export interface ChipProps extends Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'ref'> {
|
|
5
5
|
label?: string;
|
|
6
6
|
icon?: IconType<ChipProps>;
|
|
7
7
|
image?: string;
|
|
8
8
|
removable?: boolean;
|
|
9
9
|
removeIcon?: string;
|
|
10
|
-
className?: string;
|
|
11
|
-
style?: object;
|
|
12
10
|
template?: TemplateType<ChipProps>;
|
|
13
11
|
imageAlt?: string;
|
|
14
12
|
onImageError?(event: React.SyntheticEvent): void;
|
|
@@ -16,4 +14,6 @@ export interface ChipProps {
|
|
|
16
14
|
children?: React.ReactNode;
|
|
17
15
|
}
|
|
18
16
|
|
|
19
|
-
export declare class Chip extends React.Component<ChipProps, any> {
|
|
17
|
+
export declare class Chip extends React.Component<ChipProps, any> {
|
|
18
|
+
public getElement(): HTMLDivElement;
|
|
19
|
+
}
|