primereact 7.0.0-rc.2 → 7.2.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/LICENSE.md +1 -1
- package/README.md +35 -10
- package/accordion/accordion.cjs.js +55 -42
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +7 -3
- package/accordion/accordion.esm.js +42 -29
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +55 -43
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +109 -52
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +96 -61
- package/api/api.esm.js +96 -39
- package/api/api.esm.min.js +1 -1
- package/api/api.js +110 -53
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +97 -89
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +11 -4
- package/autocomplete/autocomplete.esm.js +34 -26
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +93 -90
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +21 -20
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.d.ts +2 -1
- package/avatar/avatar.esm.js +16 -15
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +22 -21
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.cjs.js +14 -14
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.esm.js +12 -12
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +15 -15
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/badge.cjs.js +14 -14
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +12 -12
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +15 -15
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +38 -27
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +28 -18
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +37 -28
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +27 -27
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +12 -12
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +28 -28
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +44 -55
- package/button/button.cjs.min.js +1 -1
- package/button/button.d.ts +4 -11
- package/button/button.esm.js +33 -44
- package/button/button.esm.min.js +1 -1
- package/button/button.js +43 -56
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +209 -170
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +7 -2
- package/calendar/calendar.esm.js +84 -45
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +205 -171
- package/calendar/calendar.min.css +1 -1
- package/calendar/calendar.min.js +1 -1
- package/captcha/captcha.cjs.js +12 -12
- package/captcha/captcha.cjs.min.js +1 -1
- package/captcha/captcha.esm.js +11 -11
- package/captcha/captcha.esm.min.js +1 -1
- package/captcha/captcha.js +13 -13
- package/captcha/captcha.min.js +1 -1
- package/card/card.cjs.js +24 -24
- package/card/card.cjs.min.js +1 -1
- package/card/card.esm.js +12 -12
- package/card/card.esm.min.js +1 -1
- package/card/card.js +25 -25
- package/card/card.min.js +1 -1
- package/carousel/carousel.cjs.js +60 -58
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +24 -23
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +59 -59
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +65 -61
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +2 -1
- package/cascadeselect/cascadeselect.esm.js +21 -17
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +62 -62
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +19 -21
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +14 -14
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +18 -18
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +33 -28
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +2 -1
- package/checkbox/checkbox.esm.js +26 -21
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +33 -29
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +27 -25
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +3 -4
- package/chip/chip.esm.js +22 -20
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +28 -26
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +59 -33
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +10 -0
- package/chips/chips.esm.js +50 -24
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +59 -34
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +50 -46
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +20 -6
- package/colorpicker/colorpicker.esm.js +22 -18
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +47 -47
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.cjs.js +31 -12
- package/column/column.cjs.min.js +1 -1
- package/column/column.d.ts +28 -2
- package/column/column.esm.js +31 -12
- package/column/column.esm.min.js +1 -1
- package/column/column.js +32 -13
- package/column/column.min.js +1 -1
- package/columngroup/columngroup.cjs.js +28 -12
- package/columngroup/columngroup.cjs.min.js +1 -1
- package/columngroup/columngroup.esm.js +28 -12
- package/columngroup/columngroup.esm.min.js +1 -1
- package/columngroup/columngroup.js +29 -13
- package/columngroup/columngroup.min.js +1 -1
- package/confirmdialog/confirmdialog.cjs.js +35 -33
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +4 -3
- package/confirmdialog/confirmdialog.esm.js +19 -17
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +35 -34
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +60 -55
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.d.ts +6 -4
- package/confirmpopup/confirmpopup.esm.js +26 -22
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +57 -55
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +81 -76
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +2 -1
- package/contextmenu/contextmenu.esm.js +48 -44
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +78 -77
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +11284 -852
- package/core/core.min.js +40 -1
- package/csstransition/csstransition.cjs.js +62 -32
- package/csstransition/csstransition.cjs.min.js +1 -1
- package/csstransition/csstransition.d.ts +8 -0
- package/csstransition/csstransition.esm.js +61 -32
- package/csstransition/csstransition.esm.min.js +1 -1
- package/csstransition/csstransition.js +62 -34
- package/csstransition/csstransition.min.js +1 -1
- package/csstransition/package.json +2 -1
- package/datascroller/datascroller.cjs.js +23 -22
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.esm.js +15 -14
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +23 -23
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +838 -632
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +38 -14
- package/datatable/datatable.esm.js +575 -369
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +835 -633
- package/datatable/datatable.min.css +1 -1
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +43 -40
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +17 -14
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +42 -41
- package/dataview/dataview.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +12 -12
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.esm.js +11 -11
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +13 -13
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +78 -73
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +3 -1
- package/dialog/dialog.esm.js +31 -27
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +75 -74
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +15 -15
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +12 -12
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +16 -16
- package/divider/divider.min.js +1 -1
- package/dock/dock.cjs.js +62 -28
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.d.ts +13 -0
- package/dock/dock.esm.js +50 -16
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +62 -29
- package/dock/dock.min.css +1 -1
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +120 -98
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +2 -1
- package/dropdown/dropdown.esm.js +58 -36
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +116 -99
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +58 -56
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.d.ts +1 -0
- package/editor/editor.esm.js +22 -18
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +57 -53
- package/editor/editor.min.js +1 -1
- package/fieldset/fieldset.cjs.js +31 -29
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.d.ts +2 -1
- package/fieldset/fieldset.esm.js +17 -15
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +30 -30
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +79 -69
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +4 -1
- package/fileupload/fileupload.esm.js +40 -30
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +79 -70
- package/fileupload/fileupload.min.js +1 -1
- package/fullcalendar/fullcalendar.cjs.js +17 -19
- package/fullcalendar/fullcalendar.cjs.min.js +1 -1
- package/fullcalendar/fullcalendar.esm.js +12 -12
- package/fullcalendar/fullcalendar.esm.min.js +1 -1
- package/fullcalendar/fullcalendar.js +16 -16
- package/fullcalendar/fullcalendar.min.js +1 -1
- package/galleria/galleria.cjs.js +85 -81
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.d.ts +2 -1
- package/galleria/galleria.esm.js +21 -18
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +82 -82
- package/galleria/galleria.min.js +1 -1
- package/gmap/gmap.cjs.js +13 -13
- package/gmap/gmap.cjs.min.js +1 -1
- package/gmap/gmap.esm.js +12 -12
- package/gmap/gmap.esm.min.js +1 -1
- package/gmap/gmap.js +14 -14
- package/gmap/gmap.min.js +1 -1
- package/image/image.cjs.js +69 -44
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +6 -5
- package/image/image.esm.js +44 -20
- package/image/image.esm.min.js +1 -1
- package/image/image.js +67 -45
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +19 -19
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +12 -12
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +20 -20
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +24 -23
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.d.ts +1 -1
- package/inputmask/inputmask.esm.js +17 -16
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +24 -24
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +90 -63
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +4 -4
- package/inputnumber/inputnumber.esm.js +73 -46
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +89 -64
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +28 -25
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +21 -18
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +28 -26
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +25 -23
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.d.ts +1 -1
- package/inputtext/inputtext.esm.js +16 -14
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +24 -24
- package/inputtext/inputtext.min.css +1 -1
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +23 -22
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.d.ts +1 -1
- package/inputtextarea/inputtextarea.esm.js +15 -14
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +23 -23
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/keyfilter/keyfilter.cjs.js +9 -6
- package/keyfilter/keyfilter.cjs.min.js +1 -1
- package/keyfilter/keyfilter.esm.js +5 -2
- package/keyfilter/keyfilter.esm.min.js +1 -1
- package/keyfilter/keyfilter.js +10 -7
- package/keyfilter/keyfilter.min.js +1 -1
- package/knob/knob.cjs.js +18 -18
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +12 -12
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +19 -19
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +52 -50
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +17 -15
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +51 -51
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +47 -46
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +13 -12
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +47 -47
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +69 -62
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.d.ts +2 -1
- package/mention/mention.esm.js +25 -19
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +64 -63
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +45 -40
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +4 -1
- package/menu/menu.esm.js +19 -15
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +42 -41
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +49 -46
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +15 -13
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +48 -47
- package/menubar/menubar.min.css +1 -1
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +20 -19
- package/message/message.cjs.min.js +1 -1
- package/message/message.d.ts +3 -1
- package/message/message.esm.js +14 -13
- package/message/message.esm.min.js +1 -1
- package/message/message.js +21 -20
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +30 -28
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +2 -1
- package/messages/messages.esm.js +14 -12
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +29 -29
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +148 -136
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +5 -2
- package/multiselect/multiselect.esm.js +64 -52
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +144 -137
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +27 -26
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +2 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +15 -14
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +27 -27
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +46 -45
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +13 -12
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +46 -46
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +37 -37
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +12 -12
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +38 -38
- package/organizationchart/organizationchart.min.css +1 -1
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +45 -42
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +3 -2
- package/overlaypanel/overlaypanel.esm.js +23 -21
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +41 -43
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/overlayservice/overlayservice.cjs.js +2 -2
- package/overlayservice/overlayservice.cjs.min.js +1 -1
- package/overlayservice/overlayservice.esm.js +1 -1
- package/overlayservice/overlayservice.esm.min.js +1 -1
- package/overlayservice/overlayservice.js +3 -3
- package/overlayservice/overlayservice.min.js +1 -1
- package/package.json +11 -4
- package/paginator/paginator.cjs.js +61 -60
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +15 -14
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +61 -61
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +35 -32
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.d.ts +5 -3
- package/panel/panel.esm.js +20 -17
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +34 -33
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +53 -52
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +2 -1
- package/panelmenu/panelmenu.esm.js +15 -14
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +53 -53
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/password.cjs.js +47 -43
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +3 -2
- package/password/password.esm.js +21 -17
- package/password/password.esm.min.js +1 -1
- package/password/password.js +44 -44
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +69 -65
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +25 -21
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +69 -66
- package/picklist/picklist.min.js +1 -1
- package/portal/portal.cjs.js +17 -20
- package/portal/portal.cjs.min.js +1 -1
- package/portal/portal.esm.js +15 -18
- package/portal/portal.esm.min.js +1 -1
- package/portal/portal.js +18 -22
- package/portal/portal.min.js +1 -1
- package/primereact.all.cjs.js +3793 -2921
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +2567 -1694
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +3792 -2918
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +20 -20
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +12 -12
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +21 -21
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/progressspinner.cjs.js +16 -16
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +12 -12
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +17 -17
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +23 -22
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +15 -14
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +23 -23
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +23 -22
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +17 -16
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +23 -23
- package/rating/rating.min.js +1 -1
- package/resources/primereact.css +216 -140
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +94 -42
- package/resources/themes/arya-green/theme.css +94 -42
- package/resources/themes/arya-orange/theme.css +94 -42
- package/resources/themes/arya-purple/theme.css +94 -42
- package/resources/themes/bootstrap4-dark-blue/theme.css +75 -30
- package/resources/themes/bootstrap4-dark-purple/theme.css +75 -30
- package/resources/themes/bootstrap4-light-blue/theme.css +74 -29
- package/resources/themes/bootstrap4-light-purple/theme.css +74 -29
- package/resources/themes/fluent-light/theme.css +94 -42
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-blue/theme.css +5707 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/theme.css +5707 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-purple/theme.css +5707 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/theme.css +5707 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-blue/theme.css +5707 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-indigo/theme.css +5707 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-purple/theme.css +5707 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-teal/theme.css +5707 -0
- package/resources/themes/luna-amber/theme.css +91 -46
- package/resources/themes/luna-blue/theme.css +91 -46
- package/resources/themes/luna-green/theme.css +91 -46
- package/resources/themes/luna-pink/theme.css +91 -46
- package/resources/themes/md-dark-deeppurple/theme.css +265 -53
- package/resources/themes/md-dark-indigo/theme.css +265 -53
- package/resources/themes/md-light-deeppurple/theme.css +265 -53
- package/resources/themes/md-light-indigo/theme.css +265 -53
- package/resources/themes/mdc-dark-deeppurple/theme.css +265 -53
- package/resources/themes/mdc-dark-indigo/theme.css +265 -53
- package/resources/themes/mdc-light-deeppurple/theme.css +265 -53
- package/resources/themes/mdc-light-indigo/theme.css +265 -53
- package/resources/themes/nova/theme.css +91 -46
- package/resources/themes/nova-accent/theme.css +91 -46
- package/resources/themes/nova-alt/theme.css +91 -46
- package/resources/themes/rhea/theme.css +91 -46
- package/resources/themes/saga-blue/theme.css +77 -25
- package/resources/themes/saga-green/theme.css +77 -25
- package/resources/themes/saga-orange/theme.css +77 -25
- package/resources/themes/saga-purple/theme.css +77 -25
- package/resources/themes/tailwind-light/theme.css +101 -49
- package/resources/themes/vela-blue/theme.css +94 -42
- package/resources/themes/vela-green/theme.css +94 -42
- package/resources/themes/vela-orange/theme.css +94 -42
- package/resources/themes/vela-purple/theme.css +94 -42
- package/ripple/ripple.cjs.js +22 -22
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +14 -14
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +23 -23
- package/ripple/ripple.min.js +1 -1
- package/row/row.cjs.js +12 -12
- package/row/row.cjs.min.js +1 -1
- package/row/row.esm.js +11 -11
- package/row/row.esm.min.js +1 -1
- package/row/row.js +13 -13
- package/row/row.min.js +1 -1
- package/scrollpanel/scrollpanel.cjs.js +30 -30
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +12 -12
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +31 -31
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +30 -25
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.d.ts +4 -2
- package/scrolltop/scrolltop.esm.js +21 -17
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +28 -26
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +31 -29
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +17 -15
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +30 -30
- package/selectbutton/selectbutton.min.js +1 -1
- package/selectitem/selectitem.d.ts +3 -1
- package/sidebar/sidebar.cjs.js +154 -127
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +4 -1
- package/sidebar/sidebar.esm.js +145 -119
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +151 -128
- package/sidebar/sidebar.min.css +1 -1
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +14 -14
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +12 -12
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +15 -15
- package/skeleton/skeleton.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +49 -44
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +2 -1
- package/slidemenu/slidemenu.esm.js +19 -15
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +46 -45
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +40 -30
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +32 -22
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +41 -31
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +33 -32
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.d.ts +3 -2
- package/speeddial/speeddial.esm.js +15 -14
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +33 -33
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +58 -50
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +8 -6
- package/splitbutton/splitbutton.esm.js +28 -20
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +55 -51
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +31 -31
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +14 -14
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +32 -32
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +21 -21
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +12 -12
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +22 -22
- package/steps/steps.min.js +1 -1
- package/styleclass/styleclass.cjs.js +28 -28
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.esm.js +12 -12
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +29 -29
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +27 -26
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +13 -12
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +27 -27
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +224 -79
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +12 -1
- package/tabview/tabview.esm.js +194 -49
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +224 -80
- package/tabview/tabview.min.css +1 -1
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +20 -19
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.d.ts +2 -1
- package/tag/tag.esm.js +16 -15
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +21 -20
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +23 -23
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +12 -12
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +24 -24
- package/terminal/terminal.min.js +1 -1
- package/terminalservice/terminalservice.cjs.js +2 -2
- package/terminalservice/terminalservice.cjs.min.js +1 -1
- package/terminalservice/terminalservice.esm.js +1 -1
- package/terminalservice/terminalservice.esm.min.js +1 -1
- package/terminalservice/terminalservice.js +3 -3
- package/terminalservice/terminalservice.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +54 -48
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +2 -1
- package/tieredmenu/tieredmenu.esm.js +20 -15
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +50 -49
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +23 -23
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +12 -12
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +24 -24
- package/timeline/timeline.min.js +1 -1
- package/toast/toast.cjs.js +72 -55
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +5 -1
- package/toast/toast.esm.js +46 -30
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +69 -56
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +27 -22
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.d.ts +3 -2
- package/togglebutton/togglebutton.esm.js +21 -16
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +26 -23
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +18 -18
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +12 -12
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +19 -19
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +78 -49
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.d.ts +0 -1
- package/tooltip/tooltip.esm.js +49 -21
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +77 -50
- package/tooltip/tooltip.min.css +1 -1
- package/tooltip/tooltip.min.js +1 -1
- package/tooltip/tooltipoptions.d.ts +2 -0
- package/tree/tree.cjs.js +69 -68
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +14 -3
- package/tree/tree.esm.js +19 -18
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +69 -69
- package/tree/tree.min.js +1 -1
- package/treenode/treenode.d.ts +4 -1
- package/treeselect/treeselect.cjs.js +66 -62
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +11 -3
- package/treeselect/treeselect.esm.js +26 -22
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +63 -63
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +1393 -330
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +11 -3
- package/treetable/treetable.esm.js +1303 -240
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +1392 -331
- package/treetable/treetable.min.css +1 -1
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +24 -23
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +15 -14
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +24 -24
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +174 -51
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +18 -0
- package/utils/utils.esm.js +173 -51
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +175 -52
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +79 -53
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +64 -38
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +80 -54
- package/virtualscroller/virtualscroller.min.css +1 -1
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +45 -8
- package/core/core.cjs.js +0 -2987
- package/core/core.cjs.min.js +0 -1
- package/core/core.esm.js +0 -2963
- package/core/core.esm.min.js +0 -1
- package/core/package.json +0 -5
- package/util.d.ts +0 -1
package/image/image.esm.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { CSSTransition } from 'primereact/csstransition';
|
|
3
|
+
import { DomHandler, ZIndexUtils, classNames, ObjectUtils } from 'primereact/utils';
|
|
4
|
+
import { Portal } from 'primereact/portal';
|
|
5
|
+
import PrimeReact from 'primereact/api';
|
|
3
6
|
|
|
4
7
|
function _classCallCheck(instance, Constructor) {
|
|
5
8
|
if (!(instance instanceof Constructor)) {
|
|
@@ -20,6 +23,9 @@ function _defineProperties(target, props) {
|
|
|
20
23
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
21
24
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
22
25
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
26
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
27
|
+
writable: false
|
|
28
|
+
});
|
|
23
29
|
return Constructor;
|
|
24
30
|
}
|
|
25
31
|
|
|
@@ -52,23 +58,20 @@ function _inherits(subClass, superClass) {
|
|
|
52
58
|
configurable: true
|
|
53
59
|
}
|
|
54
60
|
});
|
|
61
|
+
Object.defineProperty(subClass, "prototype", {
|
|
62
|
+
writable: false
|
|
63
|
+
});
|
|
55
64
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
56
65
|
}
|
|
57
66
|
|
|
58
67
|
function _typeof(obj) {
|
|
59
68
|
"@babel/helpers - typeof";
|
|
60
69
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
_typeof = function _typeof(obj) {
|
|
67
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
return _typeof(obj);
|
|
70
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
71
|
+
return typeof obj;
|
|
72
|
+
} : function (obj) {
|
|
73
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
74
|
+
}, _typeof(obj);
|
|
72
75
|
}
|
|
73
76
|
|
|
74
77
|
function _possibleConstructorReturn(self, call) {
|
|
@@ -125,6 +128,7 @@ var Image = /*#__PURE__*/function (_Component) {
|
|
|
125
128
|
};
|
|
126
129
|
_this.onImageClick = _this.onImageClick.bind(_assertThisInitialized(_this));
|
|
127
130
|
_this.onMaskClick = _this.onMaskClick.bind(_assertThisInitialized(_this));
|
|
131
|
+
_this.onDownload = _this.onDownload.bind(_assertThisInitialized(_this));
|
|
128
132
|
_this.rotateRight = _this.rotateRight.bind(_assertThisInitialized(_this));
|
|
129
133
|
_this.rotateLeft = _this.rotateLeft.bind(_assertThisInitialized(_this));
|
|
130
134
|
_this.zoomIn = _this.zoomIn.bind(_assertThisInitialized(_this));
|
|
@@ -177,6 +181,18 @@ var Image = /*#__PURE__*/function (_Component) {
|
|
|
177
181
|
|
|
178
182
|
this.previewClick = false;
|
|
179
183
|
}
|
|
184
|
+
}, {
|
|
185
|
+
key: "onDownload",
|
|
186
|
+
value: function onDownload() {
|
|
187
|
+
var _this$props = this.props,
|
|
188
|
+
name = _this$props.alt,
|
|
189
|
+
src = _this$props.src;
|
|
190
|
+
DomHandler.saveAs({
|
|
191
|
+
name: name,
|
|
192
|
+
src: src
|
|
193
|
+
});
|
|
194
|
+
this.previewClick = true;
|
|
195
|
+
}
|
|
180
196
|
}, {
|
|
181
197
|
key: "rotateRight",
|
|
182
198
|
value: function rotateRight() {
|
|
@@ -220,7 +236,7 @@ var Image = /*#__PURE__*/function (_Component) {
|
|
|
220
236
|
}, {
|
|
221
237
|
key: "onEntering",
|
|
222
238
|
value: function onEntering() {
|
|
223
|
-
ZIndexUtils.set('modal', this.mask);
|
|
239
|
+
ZIndexUtils.set('modal', this.mask, PrimeReact.autoZIndex, PrimeReact.zIndex['modal']);
|
|
224
240
|
}
|
|
225
241
|
}, {
|
|
226
242
|
key: "onEntered",
|
|
@@ -261,6 +277,7 @@ var Image = /*#__PURE__*/function (_Component) {
|
|
|
261
277
|
value: function renderElement() {
|
|
262
278
|
var _this3 = this;
|
|
263
279
|
|
|
280
|
+
var downloadable = this.props.downloadable;
|
|
264
281
|
var imagePreviewStyle = {
|
|
265
282
|
transform: 'rotate(' + this.state.rotate + 'deg) scale(' + this.state.scale + ')'
|
|
266
283
|
};
|
|
@@ -274,7 +291,13 @@ var Image = /*#__PURE__*/function (_Component) {
|
|
|
274
291
|
onClick: this.onMaskClick
|
|
275
292
|
}, /*#__PURE__*/React.createElement("div", {
|
|
276
293
|
className: "p-image-toolbar"
|
|
277
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
294
|
+
}, downloadable && /*#__PURE__*/React.createElement("button", {
|
|
295
|
+
className: "p-image-action p-link",
|
|
296
|
+
onClick: this.onDownload,
|
|
297
|
+
type: "button"
|
|
298
|
+
}, /*#__PURE__*/React.createElement("i", {
|
|
299
|
+
className: "pi pi-download"
|
|
300
|
+
})), /*#__PURE__*/React.createElement("button", {
|
|
278
301
|
className: "p-image-action p-link",
|
|
279
302
|
onClick: this.rotateRight,
|
|
280
303
|
type: "button"
|
|
@@ -309,7 +332,7 @@ var Image = /*#__PURE__*/function (_Component) {
|
|
|
309
332
|
}))), /*#__PURE__*/React.createElement(CSSTransition, {
|
|
310
333
|
nodeRef: this.previewRef,
|
|
311
334
|
classNames: "p-image-preview",
|
|
312
|
-
in: this.state.previewVisible,
|
|
335
|
+
"in": this.state.previewVisible,
|
|
313
336
|
timeout: {
|
|
314
337
|
enter: 150,
|
|
315
338
|
exit: 150
|
|
@@ -342,11 +365,11 @@ var Image = /*#__PURE__*/function (_Component) {
|
|
|
342
365
|
var content = this.props.template ? ObjectUtils.getJSXElement(this.props.template, this.props) : /*#__PURE__*/React.createElement("i", {
|
|
343
366
|
className: "p-image-preview-icon pi pi-eye"
|
|
344
367
|
});
|
|
345
|
-
var _this$
|
|
346
|
-
src = _this$
|
|
347
|
-
alt = _this$
|
|
348
|
-
width = _this$
|
|
349
|
-
height = _this$
|
|
368
|
+
var _this$props2 = this.props,
|
|
369
|
+
src = _this$props2.src,
|
|
370
|
+
alt = _this$props2.alt,
|
|
371
|
+
width = _this$props2.width,
|
|
372
|
+
height = _this$props2.height;
|
|
350
373
|
return /*#__PURE__*/React.createElement("span", {
|
|
351
374
|
ref: function ref(el) {
|
|
352
375
|
return _this4.container = el;
|
|
@@ -376,6 +399,7 @@ var Image = /*#__PURE__*/function (_Component) {
|
|
|
376
399
|
_defineProperty(Image, "defaultProps", {
|
|
377
400
|
preview: false,
|
|
378
401
|
className: null,
|
|
402
|
+
downloadable: false,
|
|
379
403
|
style: null,
|
|
380
404
|
imageStyle: null,
|
|
381
405
|
imageClassName: null,
|
package/image/image.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{Component as t}from"react";import{
|
|
1
|
+
import e,{Component as t}from"react";import{CSSTransition as i}from"primereact/csstransition";import{DomHandler as n,ZIndexUtils as o,classNames as r,ObjectUtils as a}from"primereact/utils";import{Portal as s}from"primereact/portal";import l from"primereact/api";function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e,t){return m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},m(e,t)}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function d(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return u(e)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function v(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var b,k,E,w=function(m){f(C,t);var h,b,k,E,w,g=(h=C,b=v(),function(){var e,t=y(h);if(b){var i=y(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return d(this,e)});function C(t){var i;return c(this,C),(i=g.call(this,t)).state={maskVisible:!1,previewVisible:!1,rotate:0,scale:1},i.onImageClick=i.onImageClick.bind(u(i)),i.onMaskClick=i.onMaskClick.bind(u(i)),i.onDownload=i.onDownload.bind(u(i)),i.rotateRight=i.rotateRight.bind(u(i)),i.rotateLeft=i.rotateLeft.bind(u(i)),i.zoomIn=i.zoomIn.bind(u(i)),i.zoomOut=i.zoomOut.bind(u(i)),i.onEntering=i.onEntering.bind(u(i)),i.onEntered=i.onEntered.bind(u(i)),i.onPreviewImageClick=i.onPreviewImageClick.bind(u(i)),i.onExit=i.onExit.bind(u(i)),i.onExiting=i.onExiting.bind(u(i)),i.onExited=i.onExited.bind(u(i)),i.previewRef=e.createRef(),i}return k=C,(E=[{key:"onImageClick",value:function(){var e=this;this.props.preview&&(this.setState({maskVisible:!0}),setTimeout((function(){e.setState({previewVisible:!0})}),25))}},{key:"onPreviewImageClick",value:function(){this.previewClick=!0}},{key:"onMaskClick",value:function(){this.previewClick||(this.setState({previewVisible:!1}),this.setState({rotate:0}),this.setState({scale:1})),this.previewClick=!1}},{key:"onDownload",value:function(){var e=this.props;n.saveAs({name:e.alt,src:e.src}),this.previewClick=!0}},{key:"rotateRight",value:function(){this.setState((function(e){return{rotate:e.rotate+90}})),this.previewClick=!0}},{key:"rotateLeft",value:function(){this.setState((function(e){return{rotate:e.rotate-90}})),this.previewClick=!0}},{key:"zoomIn",value:function(){this.setState((function(e){return{scale:e.scale+.1}})),this.previewClick=!0}},{key:"zoomOut",value:function(){this.setState((function(e){return{scale:e.scale-.1}})),this.previewClick=!0}},{key:"onEntering",value:function(){o.set("modal",this.mask,l.autoZIndex,l.zIndex.modal)}},{key:"onEntered",value:function(){this.props.onShow&&this.props.onShow()}},{key:"onExit",value:function(){n.addClass(this.mask,"p-component-overlay-leave")}},{key:"onExiting",value:function(){this.props.onHide&&this.props.onHide()}},{key:"onExited",value:function(e){o.clear(e),this.setState({maskVisible:!1})}},{key:"componentWillUnmount",value:function(){this.mask&&o.clear(this.container)}},{key:"renderElement",value:function(){var t=this,n={transform:"rotate("+this.state.rotate+"deg) scale("+this.state.scale+")"},o=this.state.scale<=.5||this.state.scale>=1.5;return e.createElement("div",{ref:function(e){return t.mask=e},className:"p-image-mask p-component-overlay p-component-overlay-enter",onClick:this.onMaskClick},e.createElement("div",{className:"p-image-toolbar"},this.props.downloadable&&e.createElement("button",{className:"p-image-action p-link",onClick:this.onDownload,type:"button"},e.createElement("i",{className:"pi pi-download"})),e.createElement("button",{className:"p-image-action p-link",onClick:this.rotateRight,type:"button"},e.createElement("i",{className:"pi pi-refresh"})),e.createElement("button",{className:"p-image-action p-link",onClick:this.rotateLeft,type:"button"},e.createElement("i",{className:"pi pi-undo"})),e.createElement("button",{className:"p-image-action p-link",onClick:this.zoomOut,type:"button",disabled:o},e.createElement("i",{className:"pi pi-search-minus"})),e.createElement("button",{className:"p-image-action p-link",onClick:this.zoomIn,type:"button",disabled:o},e.createElement("i",{className:"pi pi-search-plus"})),e.createElement("button",{className:"p-image-action p-link",type:"button",onClick:this.hidePreview},e.createElement("i",{className:"pi pi-times"}))),e.createElement(i,{nodeRef:this.previewRef,classNames:"p-image-preview",in:this.state.previewVisible,timeout:{enter:150,exit:150},unmountOnExit:!0,onEntering:this.onEntering,onEntered:this.onEntered,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited},e.createElement("div",{ref:this.previewRef},e.createElement("img",{src:this.props.src,className:"p-image-preview",style:n,onClick:this.onPreviewImageClick,alt:this.props.alt}))))}},{key:"render",value:function(){var t=this,i=r("p-image p-component",this.props.className,{"p-image-preview-container":this.props.preview}),n=this.renderElement(),o=this.props.template?a.getJSXElement(this.props.template,this.props):e.createElement("i",{className:"p-image-preview-icon pi pi-eye"}),l=this.props;return e.createElement("span",{ref:function(e){return t.container=e},className:i,style:this.props.style},e.createElement("img",{src:l.src,className:this.props.imageClassName,width:l.width,height:l.height,style:this.props.imageStyle,alt:l.alt}),this.props.preview&&e.createElement("div",{className:"p-image-preview-indicator",onClick:this.onImageClick},o),this.state.maskVisible&&e.createElement(s,{element:n,appendTo:document.body}))}}])&&p(k.prototype,E),w&&p(k,w),Object.defineProperty(k,"prototype",{writable:!1}),C}();E={preview:!1,className:null,downloadable:!1,style:null,imageStyle:null,imageClassName:null,template:null,src:null,alt:null,width:null,height:null},(k="defaultProps")in(b=w)?Object.defineProperty(b,k,{value:E,enumerable:!0,configurable:!0,writable:!0}):b[k]=E;export{w as Image};
|
package/image/image.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
this.primereact = this.primereact || {};
|
|
2
|
-
this.primereact.image = (function (exports, React,
|
|
2
|
+
this.primereact.image = (function (exports, React, csstransition, utils, portal, PrimeReact) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
6
6
|
|
|
7
7
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
8
|
+
var PrimeReact__default = /*#__PURE__*/_interopDefaultLegacy(PrimeReact);
|
|
8
9
|
|
|
9
10
|
function _classCallCheck(instance, Constructor) {
|
|
10
11
|
if (!(instance instanceof Constructor)) {
|
|
@@ -25,6 +26,9 @@ this.primereact.image = (function (exports, React, core) {
|
|
|
25
26
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
26
27
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
27
28
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
29
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
30
|
+
writable: false
|
|
31
|
+
});
|
|
28
32
|
return Constructor;
|
|
29
33
|
}
|
|
30
34
|
|
|
@@ -57,23 +61,20 @@ this.primereact.image = (function (exports, React, core) {
|
|
|
57
61
|
configurable: true
|
|
58
62
|
}
|
|
59
63
|
});
|
|
64
|
+
Object.defineProperty(subClass, "prototype", {
|
|
65
|
+
writable: false
|
|
66
|
+
});
|
|
60
67
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
61
68
|
}
|
|
62
69
|
|
|
63
70
|
function _typeof(obj) {
|
|
64
71
|
"@babel/helpers - typeof";
|
|
65
72
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
_typeof = function _typeof(obj) {
|
|
72
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
return _typeof(obj);
|
|
73
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
74
|
+
return typeof obj;
|
|
75
|
+
} : function (obj) {
|
|
76
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
77
|
+
}, _typeof(obj);
|
|
77
78
|
}
|
|
78
79
|
|
|
79
80
|
function _possibleConstructorReturn(self, call) {
|
|
@@ -130,6 +131,7 @@ this.primereact.image = (function (exports, React, core) {
|
|
|
130
131
|
};
|
|
131
132
|
_this.onImageClick = _this.onImageClick.bind(_assertThisInitialized(_this));
|
|
132
133
|
_this.onMaskClick = _this.onMaskClick.bind(_assertThisInitialized(_this));
|
|
134
|
+
_this.onDownload = _this.onDownload.bind(_assertThisInitialized(_this));
|
|
133
135
|
_this.rotateRight = _this.rotateRight.bind(_assertThisInitialized(_this));
|
|
134
136
|
_this.rotateLeft = _this.rotateLeft.bind(_assertThisInitialized(_this));
|
|
135
137
|
_this.zoomIn = _this.zoomIn.bind(_assertThisInitialized(_this));
|
|
@@ -140,7 +142,7 @@ this.primereact.image = (function (exports, React, core) {
|
|
|
140
142
|
_this.onExit = _this.onExit.bind(_assertThisInitialized(_this));
|
|
141
143
|
_this.onExiting = _this.onExiting.bind(_assertThisInitialized(_this));
|
|
142
144
|
_this.onExited = _this.onExited.bind(_assertThisInitialized(_this));
|
|
143
|
-
_this.previewRef = /*#__PURE__*/React__default[
|
|
145
|
+
_this.previewRef = /*#__PURE__*/React__default["default"].createRef();
|
|
144
146
|
return _this;
|
|
145
147
|
}
|
|
146
148
|
|
|
@@ -182,6 +184,18 @@ this.primereact.image = (function (exports, React, core) {
|
|
|
182
184
|
|
|
183
185
|
this.previewClick = false;
|
|
184
186
|
}
|
|
187
|
+
}, {
|
|
188
|
+
key: "onDownload",
|
|
189
|
+
value: function onDownload() {
|
|
190
|
+
var _this$props = this.props,
|
|
191
|
+
name = _this$props.alt,
|
|
192
|
+
src = _this$props.src;
|
|
193
|
+
utils.DomHandler.saveAs({
|
|
194
|
+
name: name,
|
|
195
|
+
src: src
|
|
196
|
+
});
|
|
197
|
+
this.previewClick = true;
|
|
198
|
+
}
|
|
185
199
|
}, {
|
|
186
200
|
key: "rotateRight",
|
|
187
201
|
value: function rotateRight() {
|
|
@@ -225,7 +239,7 @@ this.primereact.image = (function (exports, React, core) {
|
|
|
225
239
|
}, {
|
|
226
240
|
key: "onEntering",
|
|
227
241
|
value: function onEntering() {
|
|
228
|
-
|
|
242
|
+
utils.ZIndexUtils.set('modal', this.mask, PrimeReact__default["default"].autoZIndex, PrimeReact__default["default"].zIndex['modal']);
|
|
229
243
|
}
|
|
230
244
|
}, {
|
|
231
245
|
key: "onEntered",
|
|
@@ -237,7 +251,7 @@ this.primereact.image = (function (exports, React, core) {
|
|
|
237
251
|
}, {
|
|
238
252
|
key: "onExit",
|
|
239
253
|
value: function onExit() {
|
|
240
|
-
|
|
254
|
+
utils.DomHandler.addClass(this.mask, 'p-component-overlay-leave');
|
|
241
255
|
}
|
|
242
256
|
}, {
|
|
243
257
|
key: "onExiting",
|
|
@@ -249,7 +263,7 @@ this.primereact.image = (function (exports, React, core) {
|
|
|
249
263
|
}, {
|
|
250
264
|
key: "onExited",
|
|
251
265
|
value: function onExited(el) {
|
|
252
|
-
|
|
266
|
+
utils.ZIndexUtils.clear(el);
|
|
253
267
|
this.setState({
|
|
254
268
|
maskVisible: false
|
|
255
269
|
});
|
|
@@ -258,7 +272,7 @@ this.primereact.image = (function (exports, React, core) {
|
|
|
258
272
|
key: "componentWillUnmount",
|
|
259
273
|
value: function componentWillUnmount() {
|
|
260
274
|
if (this.mask) {
|
|
261
|
-
|
|
275
|
+
utils.ZIndexUtils.clear(this.container);
|
|
262
276
|
}
|
|
263
277
|
}
|
|
264
278
|
}, {
|
|
@@ -266,55 +280,62 @@ this.primereact.image = (function (exports, React, core) {
|
|
|
266
280
|
value: function renderElement() {
|
|
267
281
|
var _this3 = this;
|
|
268
282
|
|
|
283
|
+
var downloadable = this.props.downloadable;
|
|
269
284
|
var imagePreviewStyle = {
|
|
270
285
|
transform: 'rotate(' + this.state.rotate + 'deg) scale(' + this.state.scale + ')'
|
|
271
286
|
};
|
|
272
287
|
var zoomDisabled = this.state.scale <= 0.5 || this.state.scale >= 1.5; // const rotateClassName = 'p-image-preview-rotate-' + this.state.rotate;
|
|
273
288
|
|
|
274
|
-
return /*#__PURE__*/React__default[
|
|
289
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
275
290
|
ref: function ref(el) {
|
|
276
291
|
return _this3.mask = el;
|
|
277
292
|
},
|
|
278
293
|
className: "p-image-mask p-component-overlay p-component-overlay-enter",
|
|
279
294
|
onClick: this.onMaskClick
|
|
280
|
-
}, /*#__PURE__*/React__default[
|
|
295
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
281
296
|
className: "p-image-toolbar"
|
|
282
|
-
}, /*#__PURE__*/React__default[
|
|
297
|
+
}, downloadable && /*#__PURE__*/React__default["default"].createElement("button", {
|
|
298
|
+
className: "p-image-action p-link",
|
|
299
|
+
onClick: this.onDownload,
|
|
300
|
+
type: "button"
|
|
301
|
+
}, /*#__PURE__*/React__default["default"].createElement("i", {
|
|
302
|
+
className: "pi pi-download"
|
|
303
|
+
})), /*#__PURE__*/React__default["default"].createElement("button", {
|
|
283
304
|
className: "p-image-action p-link",
|
|
284
305
|
onClick: this.rotateRight,
|
|
285
306
|
type: "button"
|
|
286
|
-
}, /*#__PURE__*/React__default[
|
|
307
|
+
}, /*#__PURE__*/React__default["default"].createElement("i", {
|
|
287
308
|
className: "pi pi-refresh"
|
|
288
|
-
})), /*#__PURE__*/React__default[
|
|
309
|
+
})), /*#__PURE__*/React__default["default"].createElement("button", {
|
|
289
310
|
className: "p-image-action p-link",
|
|
290
311
|
onClick: this.rotateLeft,
|
|
291
312
|
type: "button"
|
|
292
|
-
}, /*#__PURE__*/React__default[
|
|
313
|
+
}, /*#__PURE__*/React__default["default"].createElement("i", {
|
|
293
314
|
className: "pi pi-undo"
|
|
294
|
-
})), /*#__PURE__*/React__default[
|
|
315
|
+
})), /*#__PURE__*/React__default["default"].createElement("button", {
|
|
295
316
|
className: "p-image-action p-link",
|
|
296
317
|
onClick: this.zoomOut,
|
|
297
318
|
type: "button",
|
|
298
319
|
disabled: zoomDisabled
|
|
299
|
-
}, /*#__PURE__*/React__default[
|
|
320
|
+
}, /*#__PURE__*/React__default["default"].createElement("i", {
|
|
300
321
|
className: "pi pi-search-minus"
|
|
301
|
-
})), /*#__PURE__*/React__default[
|
|
322
|
+
})), /*#__PURE__*/React__default["default"].createElement("button", {
|
|
302
323
|
className: "p-image-action p-link",
|
|
303
324
|
onClick: this.zoomIn,
|
|
304
325
|
type: "button",
|
|
305
326
|
disabled: zoomDisabled
|
|
306
|
-
}, /*#__PURE__*/React__default[
|
|
327
|
+
}, /*#__PURE__*/React__default["default"].createElement("i", {
|
|
307
328
|
className: "pi pi-search-plus"
|
|
308
|
-
})), /*#__PURE__*/React__default[
|
|
329
|
+
})), /*#__PURE__*/React__default["default"].createElement("button", {
|
|
309
330
|
className: "p-image-action p-link",
|
|
310
331
|
type: "button",
|
|
311
332
|
onClick: this.hidePreview
|
|
312
|
-
}, /*#__PURE__*/React__default[
|
|
333
|
+
}, /*#__PURE__*/React__default["default"].createElement("i", {
|
|
313
334
|
className: "pi pi-times"
|
|
314
|
-
}))), /*#__PURE__*/React__default[
|
|
335
|
+
}))), /*#__PURE__*/React__default["default"].createElement(csstransition.CSSTransition, {
|
|
315
336
|
nodeRef: this.previewRef,
|
|
316
337
|
classNames: "p-image-preview",
|
|
317
|
-
in: this.state.previewVisible,
|
|
338
|
+
"in": this.state.previewVisible,
|
|
318
339
|
timeout: {
|
|
319
340
|
enter: 150,
|
|
320
341
|
exit: 150
|
|
@@ -325,9 +346,9 @@ this.primereact.image = (function (exports, React, core) {
|
|
|
325
346
|
onExit: this.onExit,
|
|
326
347
|
onExiting: this.onExiting,
|
|
327
348
|
onExited: this.onExited
|
|
328
|
-
}, /*#__PURE__*/React__default[
|
|
349
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
329
350
|
ref: this.previewRef
|
|
330
|
-
}, /*#__PURE__*/React__default[
|
|
351
|
+
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
331
352
|
src: this.props.src,
|
|
332
353
|
className: "p-image-preview",
|
|
333
354
|
style: imagePreviewStyle,
|
|
@@ -340,35 +361,35 @@ this.primereact.image = (function (exports, React, core) {
|
|
|
340
361
|
value: function render() {
|
|
341
362
|
var _this4 = this;
|
|
342
363
|
|
|
343
|
-
var containerClassName =
|
|
364
|
+
var containerClassName = utils.classNames('p-image p-component', this.props.className, {
|
|
344
365
|
'p-image-preview-container': this.props.preview
|
|
345
366
|
});
|
|
346
367
|
var element = this.renderElement();
|
|
347
|
-
var content = this.props.template ?
|
|
368
|
+
var content = this.props.template ? utils.ObjectUtils.getJSXElement(this.props.template, this.props) : /*#__PURE__*/React__default["default"].createElement("i", {
|
|
348
369
|
className: "p-image-preview-icon pi pi-eye"
|
|
349
370
|
});
|
|
350
|
-
var _this$
|
|
351
|
-
src = _this$
|
|
352
|
-
alt = _this$
|
|
353
|
-
width = _this$
|
|
354
|
-
height = _this$
|
|
355
|
-
return /*#__PURE__*/React__default[
|
|
371
|
+
var _this$props2 = this.props,
|
|
372
|
+
src = _this$props2.src,
|
|
373
|
+
alt = _this$props2.alt,
|
|
374
|
+
width = _this$props2.width,
|
|
375
|
+
height = _this$props2.height;
|
|
376
|
+
return /*#__PURE__*/React__default["default"].createElement("span", {
|
|
356
377
|
ref: function ref(el) {
|
|
357
378
|
return _this4.container = el;
|
|
358
379
|
},
|
|
359
380
|
className: containerClassName,
|
|
360
381
|
style: this.props.style
|
|
361
|
-
}, /*#__PURE__*/React__default[
|
|
382
|
+
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
362
383
|
src: src,
|
|
363
384
|
className: this.props.imageClassName,
|
|
364
385
|
width: width,
|
|
365
386
|
height: height,
|
|
366
387
|
style: this.props.imageStyle,
|
|
367
388
|
alt: alt
|
|
368
|
-
}), this.props.preview && /*#__PURE__*/React__default[
|
|
389
|
+
}), this.props.preview && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
369
390
|
className: "p-image-preview-indicator",
|
|
370
391
|
onClick: this.onImageClick
|
|
371
|
-
}, content), this.state.maskVisible && /*#__PURE__*/React__default[
|
|
392
|
+
}, content), this.state.maskVisible && /*#__PURE__*/React__default["default"].createElement(portal.Portal, {
|
|
372
393
|
element: element,
|
|
373
394
|
appendTo: document.body
|
|
374
395
|
}));
|
|
@@ -381,6 +402,7 @@ this.primereact.image = (function (exports, React, core) {
|
|
|
381
402
|
_defineProperty(Image, "defaultProps", {
|
|
382
403
|
preview: false,
|
|
383
404
|
className: null,
|
|
405
|
+
downloadable: false,
|
|
384
406
|
style: null,
|
|
385
407
|
imageStyle: null,
|
|
386
408
|
imageClassName: null,
|
|
@@ -397,4 +419,4 @@ this.primereact.image = (function (exports, React, core) {
|
|
|
397
419
|
|
|
398
420
|
return exports;
|
|
399
421
|
|
|
400
|
-
}({}, React, primereact.
|
|
422
|
+
})({}, React, primereact.csstransition, primereact.utils, primereact.portal, primereact.api);
|
package/image/image.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.image=function(e,t,i){"use strict";function
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.image=function(e,t,n,i,o,a){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=r(t),s=r(a);function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e,t){return m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},m(e,t)}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function h(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return p(e)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function b(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var v,k,g,E=function(e){f(k,e);var t,a,r,m,d,v=(t=k,a=b(),function(){var e,n=y(t);if(a){var i=y(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return h(this,e)});function k(e){var t;return c(this,k),(t=v.call(this,e)).state={maskVisible:!1,previewVisible:!1,rotate:0,scale:1},t.onImageClick=t.onImageClick.bind(p(t)),t.onMaskClick=t.onMaskClick.bind(p(t)),t.onDownload=t.onDownload.bind(p(t)),t.rotateRight=t.rotateRight.bind(p(t)),t.rotateLeft=t.rotateLeft.bind(p(t)),t.zoomIn=t.zoomIn.bind(p(t)),t.zoomOut=t.zoomOut.bind(p(t)),t.onEntering=t.onEntering.bind(p(t)),t.onEntered=t.onEntered.bind(p(t)),t.onPreviewImageClick=t.onPreviewImageClick.bind(p(t)),t.onExit=t.onExit.bind(p(t)),t.onExiting=t.onExiting.bind(p(t)),t.onExited=t.onExited.bind(p(t)),t.previewRef=l.default.createRef(),t}return r=k,(m=[{key:"onImageClick",value:function(){var e=this;this.props.preview&&(this.setState({maskVisible:!0}),setTimeout((function(){e.setState({previewVisible:!0})}),25))}},{key:"onPreviewImageClick",value:function(){this.previewClick=!0}},{key:"onMaskClick",value:function(){this.previewClick||(this.setState({previewVisible:!1}),this.setState({rotate:0}),this.setState({scale:1})),this.previewClick=!1}},{key:"onDownload",value:function(){var e=this.props;i.DomHandler.saveAs({name:e.alt,src:e.src}),this.previewClick=!0}},{key:"rotateRight",value:function(){this.setState((function(e){return{rotate:e.rotate+90}})),this.previewClick=!0}},{key:"rotateLeft",value:function(){this.setState((function(e){return{rotate:e.rotate-90}})),this.previewClick=!0}},{key:"zoomIn",value:function(){this.setState((function(e){return{scale:e.scale+.1}})),this.previewClick=!0}},{key:"zoomOut",value:function(){this.setState((function(e){return{scale:e.scale-.1}})),this.previewClick=!0}},{key:"onEntering",value:function(){i.ZIndexUtils.set("modal",this.mask,s.default.autoZIndex,s.default.zIndex.modal)}},{key:"onEntered",value:function(){this.props.onShow&&this.props.onShow()}},{key:"onExit",value:function(){i.DomHandler.addClass(this.mask,"p-component-overlay-leave")}},{key:"onExiting",value:function(){this.props.onHide&&this.props.onHide()}},{key:"onExited",value:function(e){i.ZIndexUtils.clear(e),this.setState({maskVisible:!1})}},{key:"componentWillUnmount",value:function(){this.mask&&i.ZIndexUtils.clear(this.container)}},{key:"renderElement",value:function(){var e=this,t={transform:"rotate("+this.state.rotate+"deg) scale("+this.state.scale+")"},i=this.state.scale<=.5||this.state.scale>=1.5;return l.default.createElement("div",{ref:function(t){return e.mask=t},className:"p-image-mask p-component-overlay p-component-overlay-enter",onClick:this.onMaskClick},l.default.createElement("div",{className:"p-image-toolbar"},this.props.downloadable&&l.default.createElement("button",{className:"p-image-action p-link",onClick:this.onDownload,type:"button"},l.default.createElement("i",{className:"pi pi-download"})),l.default.createElement("button",{className:"p-image-action p-link",onClick:this.rotateRight,type:"button"},l.default.createElement("i",{className:"pi pi-refresh"})),l.default.createElement("button",{className:"p-image-action p-link",onClick:this.rotateLeft,type:"button"},l.default.createElement("i",{className:"pi pi-undo"})),l.default.createElement("button",{className:"p-image-action p-link",onClick:this.zoomOut,type:"button",disabled:i},l.default.createElement("i",{className:"pi pi-search-minus"})),l.default.createElement("button",{className:"p-image-action p-link",onClick:this.zoomIn,type:"button",disabled:i},l.default.createElement("i",{className:"pi pi-search-plus"})),l.default.createElement("button",{className:"p-image-action p-link",type:"button",onClick:this.hidePreview},l.default.createElement("i",{className:"pi pi-times"}))),l.default.createElement(n.CSSTransition,{nodeRef:this.previewRef,classNames:"p-image-preview",in:this.state.previewVisible,timeout:{enter:150,exit:150},unmountOnExit:!0,onEntering:this.onEntering,onEntered:this.onEntered,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited},l.default.createElement("div",{ref:this.previewRef},l.default.createElement("img",{src:this.props.src,className:"p-image-preview",style:t,onClick:this.onPreviewImageClick,alt:this.props.alt}))))}},{key:"render",value:function(){var e=this,t=i.classNames("p-image p-component",this.props.className,{"p-image-preview-container":this.props.preview}),n=this.renderElement(),a=this.props.template?i.ObjectUtils.getJSXElement(this.props.template,this.props):l.default.createElement("i",{className:"p-image-preview-icon pi pi-eye"}),r=this.props;return l.default.createElement("span",{ref:function(t){return e.container=t},className:t,style:this.props.style},l.default.createElement("img",{src:r.src,className:this.props.imageClassName,width:r.width,height:r.height,style:this.props.imageStyle,alt:r.alt}),this.props.preview&&l.default.createElement("div",{className:"p-image-preview-indicator",onClick:this.onImageClick},a),this.state.maskVisible&&l.default.createElement(o.Portal,{element:n,appendTo:document.body}))}}])&&u(r.prototype,m),d&&u(r,d),Object.defineProperty(r,"prototype",{writable:!1}),k}(t.Component);return g={preview:!1,className:null,downloadable:!1,style:null,imageStyle:null,imageClassName:null,template:null,src:null,alt:null,width:null,height:null},(k="defaultProps")in(v=E)?Object.defineProperty(v,k,{value:g,enumerable:!0,configurable:!0,writable:!0}):v[k]=g,e.Image=E,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.csstransition,primereact.utils,primereact.portal,primereact.api);
|
package/inplace/inplace.cjs.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var
|
|
6
|
+
var utils = require('primereact/utils');
|
|
7
7
|
var button = require('primereact/button');
|
|
8
8
|
|
|
9
9
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -52,6 +52,9 @@ function _defineProperties(target, props) {
|
|
|
52
52
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
53
53
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
54
54
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
55
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
56
|
+
writable: false
|
|
57
|
+
});
|
|
55
58
|
return Constructor;
|
|
56
59
|
}
|
|
57
60
|
|
|
@@ -76,23 +79,20 @@ function _inherits(subClass, superClass) {
|
|
|
76
79
|
configurable: true
|
|
77
80
|
}
|
|
78
81
|
});
|
|
82
|
+
Object.defineProperty(subClass, "prototype", {
|
|
83
|
+
writable: false
|
|
84
|
+
});
|
|
79
85
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
80
86
|
}
|
|
81
87
|
|
|
82
88
|
function _typeof(obj) {
|
|
83
89
|
"@babel/helpers - typeof";
|
|
84
90
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
90
|
-
_typeof = function _typeof(obj) {
|
|
91
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
return _typeof(obj);
|
|
91
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
92
|
+
return typeof obj;
|
|
93
|
+
} : function (obj) {
|
|
94
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
95
|
+
}, _typeof(obj);
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
function _possibleConstructorReturn(self, call) {
|
|
@@ -235,10 +235,10 @@ var Inplace = /*#__PURE__*/function (_Component3) {
|
|
|
235
235
|
}, {
|
|
236
236
|
key: "renderDisplay",
|
|
237
237
|
value: function renderDisplay(content) {
|
|
238
|
-
var className =
|
|
238
|
+
var className = utils.classNames('p-inplace-display', {
|
|
239
239
|
'p-disabled': this.props.disabled
|
|
240
240
|
});
|
|
241
|
-
return /*#__PURE__*/React__default[
|
|
241
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
242
242
|
className: className,
|
|
243
243
|
onClick: this.open,
|
|
244
244
|
onKeyDown: this.onDisplayKeyDown,
|
|
@@ -250,7 +250,7 @@ var Inplace = /*#__PURE__*/function (_Component3) {
|
|
|
250
250
|
key: "renderCloseButton",
|
|
251
251
|
value: function renderCloseButton() {
|
|
252
252
|
if (this.props.closable) {
|
|
253
|
-
return /*#__PURE__*/React__default[
|
|
253
|
+
return /*#__PURE__*/React__default["default"].createElement(button.Button, {
|
|
254
254
|
type: "button",
|
|
255
255
|
className: "p-inplace-content-close",
|
|
256
256
|
icon: "pi pi-times",
|
|
@@ -264,7 +264,7 @@ var Inplace = /*#__PURE__*/function (_Component3) {
|
|
|
264
264
|
key: "renderContent",
|
|
265
265
|
value: function renderContent(content) {
|
|
266
266
|
var closeButton = this.renderCloseButton();
|
|
267
|
-
return /*#__PURE__*/React__default[
|
|
267
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
268
268
|
className: "p-inplace-content"
|
|
269
269
|
}, content, closeButton);
|
|
270
270
|
}
|
|
@@ -274,7 +274,7 @@ var Inplace = /*#__PURE__*/function (_Component3) {
|
|
|
274
274
|
var _this2 = this;
|
|
275
275
|
|
|
276
276
|
var active = this.isActive();
|
|
277
|
-
return React__default[
|
|
277
|
+
return React__default["default"].Children.map(this.props.children, function (child, i) {
|
|
278
278
|
if (active && child.type === InplaceContent) {
|
|
279
279
|
return _this2.renderContent(child);
|
|
280
280
|
} else if (!active && child.type === InplaceDisplay) {
|
|
@@ -285,10 +285,10 @@ var Inplace = /*#__PURE__*/function (_Component3) {
|
|
|
285
285
|
}, {
|
|
286
286
|
key: "render",
|
|
287
287
|
value: function render() {
|
|
288
|
-
var className =
|
|
288
|
+
var className = utils.classNames('p-inplace p-component', {
|
|
289
289
|
'p-inplace-closable': this.props.closable
|
|
290
290
|
}, this.props.className);
|
|
291
|
-
return /*#__PURE__*/React__default[
|
|
291
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
292
292
|
className: className
|
|
293
293
|
}, this.renderChildren());
|
|
294
294
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/utils"),n=require("primereact/button");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=r(e);function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t){return u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},u(e,t)}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function f(e,t){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function d(e){var t=h();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function h(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var b,v,m,g=function(t){c(r,e.Component);var n=d(r);function r(){return l(this,r),n.apply(this,arguments)}return s(r,[{key:"render",value:function(){return this.props.children}}]),r}(),w=function(t){c(r,e.Component);var n=d(r);function r(){return l(this,r),n.apply(this,arguments)}return s(r,[{key:"render",value:function(){return this.props.children}}]),r}(),O=function(r){c(u,e.Component);var a=d(u);function u(e){var t;return l(this,u),(t=a.call(this,e)).props.onToggle||(t.state={active:!1}),t.open=t.open.bind(i(t)),t.close=t.close.bind(i(t)),t.onDisplayKeyDown=t.onDisplayKeyDown.bind(i(t)),t}return s(u,[{key:"open",value:function(e){this.props.disabled||(this.props.onOpen&&this.props.onOpen(e),this.props.onToggle?this.props.onToggle({originalEvent:e,value:!0}):this.setState({active:!0}))}},{key:"close",value:function(e){this.props.onClose&&this.props.onClose(e),this.props.onToggle?this.props.onToggle({originalEvent:e,value:!1}):this.setState({active:!1})}},{key:"onDisplayKeyDown",value:function(e){"Enter"===e.key&&(this.open(e),e.preventDefault())}},{key:"isActive",value:function(){return this.props.onToggle?this.props.active:this.state.active}},{key:"renderDisplay",value:function(e){var n=t.classNames("p-inplace-display",{"p-disabled":this.props.disabled});return o.default.createElement("div",{className:n,onClick:this.open,onKeyDown:this.onDisplayKeyDown,tabIndex:this.props.tabIndex,"aria-label":this.props.ariaLabel},e)}},{key:"renderCloseButton",value:function(){return this.props.closable?o.default.createElement(n.Button,{type:"button",className:"p-inplace-content-close",icon:"pi pi-times",onClick:this.close}):null}},{key:"renderContent",value:function(e){var t=this.renderCloseButton();return o.default.createElement("div",{className:"p-inplace-content"},e,t)}},{key:"renderChildren",value:function(){var e=this,t=this.isActive();return o.default.Children.map(this.props.children,(function(n,r){return t&&n.type===w?e.renderContent(n):t||n.type!==g?void 0:e.renderDisplay(n)}))}},{key:"render",value:function(){var e=t.classNames("p-inplace p-component",{"p-inplace-closable":this.props.closable},this.props.className);return o.default.createElement("div",{className:e},this.renderChildren())}}]),u}();m={style:null,className:null,active:!1,closable:!1,disabled:!1,tabIndex:0,ariaLabel:null,onOpen:null,onClose:null,onToggle:null},(v="defaultProps")in(b=O)?Object.defineProperty(b,v,{value:m,enumerable:!0,configurable:!0,writable:!0}):b[v]=m,exports.Inplace=O,exports.InplaceContent=w,exports.InplaceDisplay=g;
|