primereact 6.6.0 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -9
- package/accordion/accordion.cjs.js +32 -23
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +3 -2
- package/accordion/accordion.esm.js +17 -8
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +32 -24
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +374 -42
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +126 -32
- package/api/api.esm.js +371 -43
- package/api/api.esm.min.js +1 -1
- package/api/api.js +374 -44
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +79 -69
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +3 -1
- package/autocomplete/autocomplete.esm.js +15 -5
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +75 -70
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +12 -9
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.d.ts +2 -1
- package/avatar/avatar.esm.js +7 -4
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +13 -10
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.cjs.js +5 -3
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.esm.js +3 -1
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +6 -4
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/badge.cjs.js +5 -3
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +3 -1
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +6 -4
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +19 -13
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +7 -2
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +18 -14
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +18 -16
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +3 -1
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +19 -17
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +44 -53
- package/button/button.cjs.min.js +1 -1
- package/button/button.d.ts +4 -11
- package/button/button.esm.js +33 -42
- package/button/button.esm.min.js +1 -1
- package/button/button.js +43 -54
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +183 -153
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +5 -1
- package/calendar/calendar.esm.js +57 -27
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +179 -154
- package/calendar/calendar.min.css +1 -1
- package/calendar/calendar.min.js +1 -1
- package/captcha/captcha.cjs.js +3 -1
- package/captcha/captcha.cjs.min.js +1 -1
- package/captcha/captcha.esm.js +2 -0
- package/captcha/captcha.esm.min.js +1 -1
- package/captcha/captcha.js +4 -2
- package/captcha/captcha.min.js +1 -1
- package/card/card.cjs.js +15 -13
- package/card/card.cjs.min.js +1 -1
- package/card/card.esm.js +3 -1
- package/card/card.esm.min.js +1 -1
- package/card/card.js +16 -14
- package/card/card.min.js +1 -1
- package/carousel/carousel.cjs.js +39 -36
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +4 -1
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +39 -37
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +53 -47
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +8 -2
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +50 -48
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +8 -8
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +3 -1
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +7 -5
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +22 -15
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +2 -1
- package/checkbox/checkbox.esm.js +15 -8
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +22 -16
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +18 -14
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +3 -4
- package/chip/chip.esm.js +13 -9
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +19 -15
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +48 -20
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +10 -0
- package/chips/chips.esm.js +39 -11
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +48 -21
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +37 -31
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +1 -1
- package/colorpicker/colorpicker.esm.js +8 -2
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +34 -32
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.cjs.js +34 -9
- package/column/column.cjs.min.js +1 -1
- package/column/column.d.ts +168 -13
- package/column/column.esm.js +34 -9
- package/column/column.esm.min.js +1 -1
- package/column/column.js +35 -10
- package/column/column.min.js +1 -1
- package/columngroup/columngroup.cjs.js +2 -0
- package/columngroup/columngroup.cjs.min.js +1 -1
- package/columngroup/columngroup.esm.js +2 -0
- package/columngroup/columngroup.esm.min.js +1 -1
- package/columngroup/columngroup.js +3 -1
- package/columngroup/columngroup.min.js +1 -1
- package/common/common.min.css +1 -1
- package/confirmdialog/confirmdialog.cjs.js +24 -20
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +4 -3
- package/confirmdialog/confirmdialog.esm.js +8 -4
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +24 -21
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +47 -40
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.d.ts +4 -3
- package/confirmpopup/confirmpopup.esm.js +12 -6
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +44 -40
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +70 -63
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +37 -31
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +67 -64
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +11745 -1573
- package/core/core.min.js +40 -1
- package/csstransition/csstransition.cjs.js +3 -1
- package/csstransition/csstransition.cjs.min.js +1 -1
- package/csstransition/csstransition.esm.js +2 -0
- package/csstransition/csstransition.esm.min.js +1 -1
- package/csstransition/csstransition.js +4 -2
- package/csstransition/csstransition.min.js +1 -1
- package/datascroller/datascroller.cjs.js +14 -11
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.esm.js +6 -3
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +14 -12
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +4784 -3277
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +100 -29
- package/datatable/datatable.esm.js +4859 -3353
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +4777 -3278
- package/datatable/datatable.min.css +1 -1
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +34 -29
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +8 -3
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +33 -30
- package/dataview/dataview.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +3 -1
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.esm.js +2 -0
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +4 -2
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +68 -51
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +1 -0
- package/dialog/dialog.esm.js +22 -6
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +65 -52
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +6 -4
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +3 -1
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +7 -5
- package/divider/divider.min.js +1 -1
- package/dock/dock.cjs.js +53 -17
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.d.ts +13 -0
- package/dock/dock.esm.js +41 -5
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +53 -18
- package/dock/dock.min.css +1 -1
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +90 -76
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +28 -14
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +86 -77
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +40 -40
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +4 -2
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +39 -37
- package/editor/editor.min.js +1 -1
- package/fieldset/fieldset.cjs.js +19 -15
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +5 -1
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +18 -16
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +65 -56
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +2 -1
- package/fileupload/fileupload.esm.js +26 -17
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +65 -57
- package/fileupload/fileupload.min.js +1 -1
- package/fullcalendar/fullcalendar.cjs.js +8 -8
- package/fullcalendar/fullcalendar.cjs.min.js +1 -1
- package/fullcalendar/fullcalendar.esm.js +3 -1
- package/fullcalendar/fullcalendar.esm.min.js +1 -1
- package/fullcalendar/fullcalendar.js +7 -5
- package/fullcalendar/fullcalendar.min.js +1 -1
- package/galleria/galleria.cjs.js +72 -65
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +8 -2
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +69 -66
- package/galleria/galleria.min.js +1 -1
- package/gmap/gmap.cjs.js +3 -1
- package/gmap/gmap.cjs.min.js +1 -1
- package/gmap/gmap.esm.js +2 -0
- package/gmap/gmap.esm.min.js +1 -1
- package/gmap/gmap.js +4 -2
- package/gmap/gmap.min.js +1 -1
- package/image/image.cjs.js +33 -27
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +5 -5
- package/image/image.esm.js +7 -2
- package/image/image.esm.min.js +1 -1
- package/image/image.js +31 -28
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +10 -8
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +3 -1
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +11 -9
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +11 -8
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +4 -1
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +11 -9
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +50 -29
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +33 -12
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +49 -30
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +17 -12
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +10 -5
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +17 -13
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +14 -10
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.d.ts +1 -1
- package/inputtext/inputtext.esm.js +5 -1
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +13 -11
- package/inputtext/inputtext.min.css +1 -1
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +12 -9
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.d.ts +1 -1
- package/inputtextarea/inputtextarea.esm.js +4 -1
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +12 -10
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/keyfilter/keyfilter.cjs.js +5 -5
- package/keyfilter/keyfilter.cjs.min.js +1 -1
- package/keyfilter/keyfilter.esm.js +1 -1
- package/keyfilter/keyfilter.esm.min.js +1 -1
- package/keyfilter/keyfilter.js +6 -6
- package/keyfilter/keyfilter.min.js +1 -1
- package/knob/knob.cjs.js +9 -7
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +3 -1
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +10 -8
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +44 -39
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +9 -4
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +42 -40
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +38 -35
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +4 -1
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +38 -36
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +55 -46
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.esm.js +10 -2
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +50 -47
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +35 -28
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +2 -0
- package/menu/menu.esm.js +8 -2
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +32 -29
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +40 -35
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +6 -2
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +39 -36
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +11 -8
- package/message/message.cjs.min.js +1 -1
- package/message/message.d.ts +3 -1
- package/message/message.esm.js +5 -2
- package/message/message.esm.min.js +1 -1
- package/message/message.js +12 -9
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +21 -17
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.esm.js +5 -1
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +20 -18
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +132 -118
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +6 -2
- package/multiselect/multiselect.esm.js +47 -33
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +128 -119
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +16 -13
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +2 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +4 -1
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +16 -14
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +37 -34
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +4 -1
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +37 -35
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +28 -26
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +3 -1
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +29 -27
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +33 -24
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +1 -1
- package/overlaypanel/overlaypanel.esm.js +10 -2
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +29 -25
- 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 +10 -4
- package/paginator/paginator.cjs.js +51 -48
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +5 -2
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +51 -49
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +21 -17
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +5 -1
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +20 -18
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +42 -39
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +4 -1
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +42 -40
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/password.cjs.js +35 -29
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +1 -1
- package/password/password.esm.js +8 -2
- package/password/password.esm.min.js +1 -1
- package/password/password.js +32 -30
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +60 -54
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +16 -10
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +60 -55
- package/picklist/picklist.min.js +1 -1
- package/portal/portal.cjs.js +7 -3
- package/portal/portal.cjs.min.js +1 -1
- package/portal/portal.esm.js +6 -2
- package/portal/portal.esm.min.js +1 -1
- package/portal/portal.js +8 -4
- package/portal/portal.min.js +1 -1
- package/primereact.all.cjs.js +8041 -5835
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +6905 -4701
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +8040 -5832
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +11 -9
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +3 -1
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +12 -10
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/progressspinner.cjs.js +7 -5
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +3 -1
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +8 -6
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +12 -9
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +4 -1
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +12 -10
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +12 -9
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +6 -3
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +12 -10
- package/rating/rating.min.js +1 -1
- package/resources/primereact.css +430 -238
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +158 -27
- package/resources/themes/arya-green/theme.css +158 -27
- package/resources/themes/arya-orange/theme.css +158 -27
- package/resources/themes/arya-purple/theme.css +158 -27
- package/resources/themes/bootstrap4-dark-blue/theme.css +162 -31
- package/resources/themes/bootstrap4-dark-purple/theme.css +162 -31
- package/resources/themes/bootstrap4-light-blue/theme.css +162 -31
- package/resources/themes/bootstrap4-light-purple/theme.css +162 -31
- package/resources/themes/fluent-light/theme.css +158 -27
- 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 +5671 -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 +5671 -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 +5671 -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 +5671 -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 +5671 -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 +5671 -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 +5671 -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 +5671 -0
- package/resources/themes/luna-amber/theme.css +162 -31
- package/resources/themes/luna-blue/theme.css +162 -31
- package/resources/themes/luna-green/theme.css +162 -31
- package/resources/themes/luna-pink/theme.css +162 -31
- package/resources/themes/md-dark-deeppurple/theme.css +347 -56
- package/resources/themes/md-dark-indigo/theme.css +347 -56
- package/resources/themes/md-light-deeppurple/theme.css +347 -56
- package/resources/themes/md-light-indigo/theme.css +347 -56
- package/resources/themes/mdc-dark-deeppurple/theme.css +347 -56
- package/resources/themes/mdc-dark-indigo/theme.css +347 -56
- package/resources/themes/mdc-light-deeppurple/theme.css +347 -56
- package/resources/themes/mdc-light-indigo/theme.css +347 -56
- package/resources/themes/nova/theme.css +162 -31
- package/resources/themes/nova-accent/theme.css +162 -31
- package/resources/themes/nova-alt/theme.css +162 -31
- package/resources/themes/rhea/theme.css +162 -31
- package/resources/themes/saga-blue/theme.css +158 -27
- package/resources/themes/saga-green/theme.css +158 -27
- package/resources/themes/saga-orange/theme.css +158 -27
- package/resources/themes/saga-purple/theme.css +158 -27
- package/resources/themes/tailwind-light/theme.css +162 -31
- package/resources/themes/vela-blue/theme.css +158 -27
- package/resources/themes/vela-green/theme.css +158 -27
- package/resources/themes/vela-orange/theme.css +158 -27
- package/resources/themes/vela-purple/theme.css +158 -27
- package/ripple/ripple.cjs.js +13 -11
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +5 -3
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +14 -12
- package/ripple/ripple.min.js +1 -1
- package/row/row.cjs.js +3 -1
- package/row/row.cjs.min.js +1 -1
- package/row/row.esm.js +2 -0
- package/row/row.esm.min.js +1 -1
- package/row/row.js +4 -2
- package/row/row.min.js +1 -1
- package/scrollpanel/scrollpanel.cjs.js +21 -19
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +3 -1
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +22 -20
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +20 -13
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.d.ts +2 -1
- package/scrolltop/scrolltop.esm.js +11 -5
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +18 -14
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +19 -15
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +5 -1
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +18 -16
- package/selectbutton/selectbutton.min.js +1 -1
- package/selectitem/selectitem.d.ts +3 -1
- package/sidebar/sidebar.cjs.js +144 -116
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +2 -0
- package/sidebar/sidebar.esm.js +135 -108
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +141 -117
- package/sidebar/sidebar.min.css +1 -1
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +5 -3
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +3 -1
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +6 -4
- package/skeleton/skeleton.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +39 -32
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.esm.js +8 -2
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +36 -33
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +40 -23
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +32 -15
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +41 -24
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +22 -19
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.d.ts +3 -2
- package/speeddial/speeddial.esm.js +4 -1
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +22 -20
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +39 -33
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +4 -5
- package/splitbutton/splitbutton.esm.js +8 -2
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +36 -34
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +21 -19
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +4 -2
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +22 -20
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +12 -10
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +3 -1
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +13 -11
- package/steps/steps.min.js +1 -1
- package/styleclass/styleclass.cjs.js +35 -39
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.esm.js +20 -24
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +36 -40
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +18 -15
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +4 -1
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +18 -16
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +177 -54
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +4 -1
- package/tabview/tabview.esm.js +146 -23
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +177 -55
- package/tabview/tabview.min.css +1 -1
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +11 -8
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.d.ts +2 -1
- package/tag/tag.esm.js +7 -4
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +12 -9
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +14 -12
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +3 -1
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +15 -13
- 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 +44 -36
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +9 -2
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +40 -37
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +14 -12
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +3 -1
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +15 -13
- package/timeline/timeline.min.js +1 -1
- package/toast/toast.cjs.js +48 -40
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +22 -15
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +46 -41
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +16 -9
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.d.ts +3 -2
- package/togglebutton/togglebutton.esm.js +10 -3
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +15 -10
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +9 -7
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +3 -1
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +10 -8
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +36 -31
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +6 -2
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +35 -32
- package/tooltip/tooltip.min.css +1 -1
- package/tooltip/tooltip.min.js +1 -1
- package/tree/tree.cjs.js +54 -51
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +9 -2
- package/tree/tree.esm.js +4 -1
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +54 -52
- package/tree/tree.min.js +1 -1
- package/treenode/treenode.d.ts +3 -1
- package/treeselect/treeselect.cjs.js +52 -46
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +9 -2
- package/treeselect/treeselect.esm.js +11 -5
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +49 -47
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +1290 -272
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +9 -2
- package/treetable/treetable.esm.js +1213 -195
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +1288 -273
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +13 -10
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +4 -1
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +13 -11
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +502 -525
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +29 -20
- package/utils/utils.esm.js +501 -524
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +503 -526
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +285 -168
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.d.ts +21 -9
- package/virtualscroller/virtualscroller.esm.js +278 -161
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +286 -169
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +17 -27
- package/core/core.cjs.js +0 -3080
- package/core/core.cjs.min.js +0 -1
- package/core/core.esm.js +0 -3055
- package/core/core.esm.min.js +0 -1
- package/core/package.json +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function i(e,t){return i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},i(e,t)}function u(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}}),t&&i(e,t)}function c(e){return c="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},c(e)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function f(){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 d,p,y,h=function(t){u(h,e.Component);var i,c,l,d,p,y=(i=h,c=f(),function(){var e,t=s(i);if(c){var n=s(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return a(this,e)});function h(e){var t;return o(this,h),(t=y.call(this,e)).state={loaded:!1},t}return l=h,(d=[{key:"componentDidMount",value:function(){this.state.loaded||(this.shouldLoad()?this.load():this.bindScrollListener())}},{key:"bindScrollListener",value:function(){var e=this;this.documentScrollListener=function(){e.shouldLoad()&&(e.load(),e.unbindScrollListener())},window.addEventListener("scroll",this.documentScrollListener)}},{key:"unbindScrollListener",value:function(){this.documentScrollListener&&(window.removeEventListener("scroll",this.documentScrollListener),this.documentScrollListener=null)}},{key:"shouldLoad",value:function(){if(this.state.loaded)return!1;var e=this.container.getBoundingClientRect();return document.documentElement.clientHeight>=e.top}},{key:"load",value:function(e){this.setState({loaded:!0}),this.props.onLoad&&this.props.onLoad(e)}},{key:"componentWillUnmount",value:function(){this.unbindScrollListener()}},{key:"render",value:function(){var e=this;return n.default.createElement("div",{ref:function(t){return e.container=t}},this.state.loaded?this.props.children:null)}}])&&r(l.prototype,d),p&&r(l,p),h}();y={onload:null},(p="defaultProps")in(d=h)?Object.defineProperty(d,p,{value:y,enumerable:!0,configurable:!0,writable:!0}):d[p]=y,exports.DeferredContent=h;
|
|
@@ -73,6 +73,8 @@ function _assertThisInitialized(self) {
|
|
|
73
73
|
function _possibleConstructorReturn(self, call) {
|
|
74
74
|
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
75
75
|
return call;
|
|
76
|
+
} else if (call !== void 0) {
|
|
77
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
76
78
|
}
|
|
77
79
|
|
|
78
80
|
return _assertThisInitialized(self);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t,{Component as e}from"react";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function r(t,e){return
|
|
1
|
+
import t,{Component as e}from"react";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function r(t,e){return r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(t,e)}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)}function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function l(t,e){if(e&&("object"===u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return c(t)}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}function s(){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(t){return!1}}var f,d,p,y=function(r){i(h,e);var u,c,f,d,p,y=(u=h,c=s(),function(){var t,e=a(u);if(c){var n=a(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return l(this,t)});function h(t){var e;return n(this,h),(e=y.call(this,t)).state={loaded:!1},e}return f=h,(d=[{key:"componentDidMount",value:function(){this.state.loaded||(this.shouldLoad()?this.load():this.bindScrollListener())}},{key:"bindScrollListener",value:function(){var t=this;this.documentScrollListener=function(){t.shouldLoad()&&(t.load(),t.unbindScrollListener())},window.addEventListener("scroll",this.documentScrollListener)}},{key:"unbindScrollListener",value:function(){this.documentScrollListener&&(window.removeEventListener("scroll",this.documentScrollListener),this.documentScrollListener=null)}},{key:"shouldLoad",value:function(){if(this.state.loaded)return!1;var t=this.container.getBoundingClientRect();return document.documentElement.clientHeight>=t.top}},{key:"load",value:function(t){this.setState({loaded:!0}),this.props.onLoad&&this.props.onLoad(t)}},{key:"componentWillUnmount",value:function(){this.unbindScrollListener()}},{key:"render",value:function(){var e=this;return t.createElement("div",{ref:function(t){return e.container=t}},this.state.loaded?this.props.children:null)}}])&&o(f.prototype,d),p&&o(f,p),h}();p={onload:null},(d="defaultProps")in(f=y)?Object.defineProperty(f,d,{value:p,enumerable:!0,configurable:!0,writable:!0}):f[d]=p;export{y as DeferredContent};
|
|
@@ -79,6 +79,8 @@ this.primereact.deferredcontent = (function (exports, React) {
|
|
|
79
79
|
function _possibleConstructorReturn(self, call) {
|
|
80
80
|
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
81
81
|
return call;
|
|
82
|
+
} else if (call !== void 0) {
|
|
83
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
82
84
|
}
|
|
83
85
|
|
|
84
86
|
return _assertThisInitialized(self);
|
|
@@ -189,7 +191,7 @@ this.primereact.deferredcontent = (function (exports, React) {
|
|
|
189
191
|
value: function render() {
|
|
190
192
|
var _this3 = this;
|
|
191
193
|
|
|
192
|
-
return /*#__PURE__*/React__default[
|
|
194
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
193
195
|
ref: function ref(el) {
|
|
194
196
|
return _this3.container = el;
|
|
195
197
|
}
|
|
@@ -210,4 +212,4 @@ this.primereact.deferredcontent = (function (exports, React) {
|
|
|
210
212
|
|
|
211
213
|
return exports;
|
|
212
214
|
|
|
213
|
-
}({}, React)
|
|
215
|
+
})({}, React);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.deferredcontent=function(t
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.deferredcontent=function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(t);function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}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}}),t&&u(e,t)}function l(e){return l="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},l(e)}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e,t){if(t&&("object"===l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return a(e)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function d(){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 p,y,h,b=function(e){c(y,e);var t,n,u,l,a,p=(t=y,n=d(),function(){var e,o=s(t);if(n){var r=s(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return f(this,e)});function y(e){var t;return r(this,y),(t=p.call(this,e)).state={loaded:!1},t}return u=y,(l=[{key:"componentDidMount",value:function(){this.state.loaded||(this.shouldLoad()?this.load():this.bindScrollListener())}},{key:"bindScrollListener",value:function(){var e=this;this.documentScrollListener=function(){e.shouldLoad()&&(e.load(),e.unbindScrollListener())},window.addEventListener("scroll",this.documentScrollListener)}},{key:"unbindScrollListener",value:function(){this.documentScrollListener&&(window.removeEventListener("scroll",this.documentScrollListener),this.documentScrollListener=null)}},{key:"shouldLoad",value:function(){if(this.state.loaded)return!1;var e=this.container.getBoundingClientRect();return document.documentElement.clientHeight>=e.top}},{key:"load",value:function(e){this.setState({loaded:!0}),this.props.onLoad&&this.props.onLoad(e)}},{key:"componentWillUnmount",value:function(){this.unbindScrollListener()}},{key:"render",value:function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.container=t}},this.state.loaded?this.props.children:null)}}])&&i(u.prototype,l),a&&i(u,a),y}(t.Component);return h={onload:null},(y="defaultProps")in(p=b)?Object.defineProperty(p,y,{value:h,enumerable:!0,configurable:!0,writable:!0}):p[y]=h,e.DeferredContent=b,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React);
|
package/dialog/dialog.cjs.js
CHANGED
|
@@ -3,11 +3,16 @@
|
|
|
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
|
+
var csstransition = require('primereact/csstransition');
|
|
8
|
+
var ripple = require('primereact/ripple');
|
|
9
|
+
var portal = require('primereact/portal');
|
|
10
|
+
var PrimeReact = require('primereact/api');
|
|
7
11
|
|
|
8
12
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
13
|
|
|
10
14
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
15
|
+
var PrimeReact__default = /*#__PURE__*/_interopDefaultLegacy(PrimeReact);
|
|
11
16
|
|
|
12
17
|
function _arrayLikeToArray(arr, len) {
|
|
13
18
|
if (len == null || len > arr.length) len = arr.length;
|
|
@@ -117,6 +122,8 @@ function _typeof(obj) {
|
|
|
117
122
|
function _possibleConstructorReturn(self, call) {
|
|
118
123
|
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
119
124
|
return call;
|
|
125
|
+
} else if (call !== void 0) {
|
|
126
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
120
127
|
}
|
|
121
128
|
|
|
122
129
|
return _assertThisInitialized(self);
|
|
@@ -175,9 +182,10 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
175
182
|
_this.onMaskClick = _this.onMaskClick.bind(_assertThisInitialized(_this));
|
|
176
183
|
_this.onEnter = _this.onEnter.bind(_assertThisInitialized(_this));
|
|
177
184
|
_this.onEntered = _this.onEntered.bind(_assertThisInitialized(_this));
|
|
185
|
+
_this.onExiting = _this.onExiting.bind(_assertThisInitialized(_this));
|
|
178
186
|
_this.onExited = _this.onExited.bind(_assertThisInitialized(_this));
|
|
179
|
-
_this.attributeSelector =
|
|
180
|
-
_this.dialogRef = /*#__PURE__*/React__default[
|
|
187
|
+
_this.attributeSelector = utils.UniqueComponentId();
|
|
188
|
+
_this.dialogRef = /*#__PURE__*/React__default["default"].createRef();
|
|
181
189
|
return _this;
|
|
182
190
|
}
|
|
183
191
|
|
|
@@ -227,7 +235,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
227
235
|
}, {
|
|
228
236
|
key: "onDragStart",
|
|
229
237
|
value: function onDragStart(event) {
|
|
230
|
-
if (
|
|
238
|
+
if (utils.DomHandler.hasClass(event.target, 'p-dialog-header-icon') || utils.DomHandler.hasClass(event.target.parentElement, 'p-dialog-header-icon')) {
|
|
231
239
|
return;
|
|
232
240
|
}
|
|
233
241
|
|
|
@@ -236,7 +244,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
236
244
|
this.lastPageX = event.pageX;
|
|
237
245
|
this.lastPageY = event.pageY;
|
|
238
246
|
this.dialogEl.style.margin = '0';
|
|
239
|
-
|
|
247
|
+
utils.DomHandler.addClass(document.body, 'p-unselectable-text');
|
|
240
248
|
|
|
241
249
|
if (this.props.onDragStart) {
|
|
242
250
|
this.props.onDragStart(event);
|
|
@@ -247,14 +255,14 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
247
255
|
key: "onDrag",
|
|
248
256
|
value: function onDrag(event) {
|
|
249
257
|
if (this.dragging) {
|
|
250
|
-
var width =
|
|
251
|
-
var height =
|
|
258
|
+
var width = utils.DomHandler.getOuterWidth(this.dialogEl);
|
|
259
|
+
var height = utils.DomHandler.getOuterHeight(this.dialogEl);
|
|
252
260
|
var deltaX = event.pageX - this.lastPageX;
|
|
253
261
|
var deltaY = event.pageY - this.lastPageY;
|
|
254
262
|
var offset = this.dialogEl.getBoundingClientRect();
|
|
255
263
|
var leftPos = offset.left + deltaX;
|
|
256
264
|
var topPos = offset.top + deltaY;
|
|
257
|
-
var viewport =
|
|
265
|
+
var viewport = utils.DomHandler.getViewport();
|
|
258
266
|
this.dialogEl.style.position = 'fixed';
|
|
259
267
|
|
|
260
268
|
if (this.props.keepInViewport) {
|
|
@@ -284,7 +292,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
284
292
|
value: function onDragEnd(event) {
|
|
285
293
|
if (this.dragging) {
|
|
286
294
|
this.dragging = false;
|
|
287
|
-
|
|
295
|
+
utils.DomHandler.removeClass(document.body, 'p-unselectable-text');
|
|
288
296
|
|
|
289
297
|
if (this.props.onDragEnd) {
|
|
290
298
|
this.props.onDragEnd(event);
|
|
@@ -298,7 +306,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
298
306
|
this.resizing = true;
|
|
299
307
|
this.lastPageX = event.pageX;
|
|
300
308
|
this.lastPageY = event.pageY;
|
|
301
|
-
|
|
309
|
+
utils.DomHandler.addClass(document.body, 'p-unselectable-text');
|
|
302
310
|
|
|
303
311
|
if (this.props.onResizeStart) {
|
|
304
312
|
this.props.onResizeStart(event);
|
|
@@ -308,7 +316,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
308
316
|
}, {
|
|
309
317
|
key: "convertToPx",
|
|
310
318
|
value: function convertToPx(value, property, viewport) {
|
|
311
|
-
!viewport && (viewport =
|
|
319
|
+
!viewport && (viewport = utils.DomHandler.getViewport());
|
|
312
320
|
var val = parseInt(value);
|
|
313
321
|
|
|
314
322
|
if (/^(\d+|(\.\d+))(\.\d+)?%$/.test(value)) {
|
|
@@ -323,10 +331,10 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
323
331
|
if (this.resizing) {
|
|
324
332
|
var deltaX = event.pageX - this.lastPageX;
|
|
325
333
|
var deltaY = event.pageY - this.lastPageY;
|
|
326
|
-
var width =
|
|
327
|
-
var height =
|
|
334
|
+
var width = utils.DomHandler.getOuterWidth(this.dialogEl);
|
|
335
|
+
var height = utils.DomHandler.getOuterHeight(this.dialogEl);
|
|
328
336
|
var offset = this.dialogEl.getBoundingClientRect();
|
|
329
|
-
var viewport =
|
|
337
|
+
var viewport = utils.DomHandler.getViewport();
|
|
330
338
|
var newWidth = width + deltaX;
|
|
331
339
|
var newHeight = height + deltaY;
|
|
332
340
|
var minWidth = this.convertToPx(this.dialogEl.style.minWidth, 'width', viewport);
|
|
@@ -359,7 +367,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
359
367
|
value: function onResizeEnd(event) {
|
|
360
368
|
if (this.resizing) {
|
|
361
369
|
this.resizing = false;
|
|
362
|
-
|
|
370
|
+
utils.DomHandler.removeClass(document.body, 'p-unselectable-text');
|
|
363
371
|
|
|
364
372
|
if (this.props.onResizeEnd) {
|
|
365
373
|
this.props.onResizeEnd(event);
|
|
@@ -413,15 +421,21 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
413
421
|
|
|
414
422
|
this.enableDocumentSettings();
|
|
415
423
|
}
|
|
424
|
+
}, {
|
|
425
|
+
key: "onExiting",
|
|
426
|
+
value: function onExiting() {
|
|
427
|
+
if (this.props.modal) {
|
|
428
|
+
utils.DomHandler.addClass(this.mask, 'p-component-overlay-leave');
|
|
429
|
+
}
|
|
430
|
+
}
|
|
416
431
|
}, {
|
|
417
432
|
key: "onExited",
|
|
418
433
|
value: function onExited() {
|
|
419
434
|
this.dragging = false;
|
|
420
|
-
|
|
435
|
+
utils.ZIndexUtils.clear(this.mask);
|
|
421
436
|
this.setState({
|
|
422
437
|
maskVisible: false
|
|
423
438
|
});
|
|
424
|
-
core.DomHandler.addClass(this.mask, 'p-component-overlay-leave');
|
|
425
439
|
this.disableDocumentSettings();
|
|
426
440
|
}
|
|
427
441
|
}, {
|
|
@@ -430,7 +444,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
430
444
|
this.bindGlobalListeners();
|
|
431
445
|
|
|
432
446
|
if (this.props.blockScroll || this.props.maximizable && this.maximized) {
|
|
433
|
-
|
|
447
|
+
utils.DomHandler.addClass(document.body, 'p-overflow-hidden');
|
|
434
448
|
}
|
|
435
449
|
}
|
|
436
450
|
}, {
|
|
@@ -444,10 +458,10 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
444
458
|
});
|
|
445
459
|
|
|
446
460
|
if (!hasBlockScroll) {
|
|
447
|
-
|
|
461
|
+
utils.DomHandler.removeClass(document.body, 'p-overflow-hidden');
|
|
448
462
|
}
|
|
449
463
|
} else if (this.props.blockScroll || this.props.maximizable && this.maximized) {
|
|
450
|
-
|
|
464
|
+
utils.DomHandler.removeClass(document.body, 'p-overflow-hidden');
|
|
451
465
|
}
|
|
452
466
|
}
|
|
453
467
|
}, {
|
|
@@ -461,7 +475,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
461
475
|
this.bindDocumentResizeListeners();
|
|
462
476
|
}
|
|
463
477
|
|
|
464
|
-
if (this.props.
|
|
478
|
+
if (this.props.closable) {
|
|
465
479
|
this.bindDocumentKeyDownListener();
|
|
466
480
|
}
|
|
467
481
|
}
|
|
@@ -521,7 +535,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
521
535
|
var paramLength = params.length;
|
|
522
536
|
var dialogId = params[paramLength - 1] ? params[paramLength - 1].id : undefined;
|
|
523
537
|
|
|
524
|
-
if (dialogId === _this3.state.id) {
|
|
538
|
+
if (dialogId === _this3.state.id && _this3.props.closeOnEscape) {
|
|
525
539
|
var dialog = document.getElementById(dialogId);
|
|
526
540
|
|
|
527
541
|
if (event.which === 27) {
|
|
@@ -531,7 +545,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
531
545
|
params.splice(paramLength - 1, 1);
|
|
532
546
|
} else if (event.which === 9) {
|
|
533
547
|
event.preventDefault();
|
|
534
|
-
var focusableElements =
|
|
548
|
+
var focusableElements = utils.DomHandler.getFocusableElements(dialog);
|
|
535
549
|
|
|
536
550
|
if (focusableElements && focusableElements.length > 0) {
|
|
537
551
|
if (!document.activeElement) {
|
|
@@ -593,7 +607,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
593
607
|
|
|
594
608
|
if (!this.state.id) {
|
|
595
609
|
this.setState({
|
|
596
|
-
id:
|
|
610
|
+
id: utils.UniqueComponentId()
|
|
597
611
|
});
|
|
598
612
|
}
|
|
599
613
|
|
|
@@ -601,7 +615,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
601
615
|
this.setState({
|
|
602
616
|
visible: true
|
|
603
617
|
}, function () {
|
|
604
|
-
|
|
618
|
+
utils.ZIndexUtils.set('modal', _this5.mask, PrimeReact__default["default"].autoZIndex, _this5.props.baseZIndex || PrimeReact__default["default"].zIndex['modal']);
|
|
605
619
|
});
|
|
606
620
|
}
|
|
607
621
|
|
|
@@ -618,7 +632,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
618
632
|
this.setState({
|
|
619
633
|
maskVisible: true
|
|
620
634
|
}, function () {
|
|
621
|
-
|
|
635
|
+
utils.ZIndexUtils.set('modal', _this6.mask, PrimeReact__default["default"].autoZIndex, _this6.props.baseZIndex || PrimeReact__default["default"].zIndex['modal']);
|
|
622
636
|
});
|
|
623
637
|
}
|
|
624
638
|
|
|
@@ -637,7 +651,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
637
651
|
value: function changeScrollOnMaximizable() {
|
|
638
652
|
if (!this.props.blockScroll) {
|
|
639
653
|
var funcName = this.maximized ? 'addClass' : 'removeClass';
|
|
640
|
-
|
|
654
|
+
utils.DomHandler[funcName](document.body, 'p-overflow-hidden');
|
|
641
655
|
}
|
|
642
656
|
}
|
|
643
657
|
}, {
|
|
@@ -650,7 +664,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
650
664
|
this.styleElement = null;
|
|
651
665
|
}
|
|
652
666
|
|
|
653
|
-
|
|
667
|
+
utils.ZIndexUtils.clear(this.mask);
|
|
654
668
|
}
|
|
655
669
|
}, {
|
|
656
670
|
key: "renderCloseIcon",
|
|
@@ -658,7 +672,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
658
672
|
var _this7 = this;
|
|
659
673
|
|
|
660
674
|
if (this.props.closable) {
|
|
661
|
-
return /*#__PURE__*/React__default[
|
|
675
|
+
return /*#__PURE__*/React__default["default"].createElement("button", {
|
|
662
676
|
ref: function ref(el) {
|
|
663
677
|
return _this7.closeElement = el;
|
|
664
678
|
},
|
|
@@ -666,9 +680,9 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
666
680
|
className: "p-dialog-header-icon p-dialog-header-close p-link",
|
|
667
681
|
"aria-label": this.props.ariaCloseIconLabel,
|
|
668
682
|
onClick: this.onClose
|
|
669
|
-
}, /*#__PURE__*/React__default[
|
|
683
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
670
684
|
className: "p-dialog-header-close-icon pi pi-times"
|
|
671
|
-
}), /*#__PURE__*/React__default[
|
|
685
|
+
}), /*#__PURE__*/React__default["default"].createElement(ripple.Ripple, null));
|
|
672
686
|
}
|
|
673
687
|
|
|
674
688
|
return null;
|
|
@@ -676,19 +690,19 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
676
690
|
}, {
|
|
677
691
|
key: "renderMaximizeIcon",
|
|
678
692
|
value: function renderMaximizeIcon() {
|
|
679
|
-
var iconClassName =
|
|
693
|
+
var iconClassName = utils.classNames('p-dialog-header-maximize-icon pi', {
|
|
680
694
|
'pi-window-maximize': !this.maximized,
|
|
681
695
|
'pi-window-minimize': this.maximized
|
|
682
696
|
});
|
|
683
697
|
|
|
684
698
|
if (this.props.maximizable) {
|
|
685
|
-
return /*#__PURE__*/React__default[
|
|
699
|
+
return /*#__PURE__*/React__default["default"].createElement("button", {
|
|
686
700
|
type: "button",
|
|
687
701
|
className: "p-dialog-header-icon p-dialog-header-maximize p-link",
|
|
688
702
|
onClick: this.toggleMaximize
|
|
689
|
-
}, /*#__PURE__*/React__default[
|
|
703
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
690
704
|
className: iconClassName
|
|
691
|
-
}), /*#__PURE__*/React__default[
|
|
705
|
+
}), /*#__PURE__*/React__default["default"].createElement(ripple.Ripple, null));
|
|
692
706
|
}
|
|
693
707
|
|
|
694
708
|
return null;
|
|
@@ -701,18 +715,18 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
701
715
|
if (this.props.showHeader) {
|
|
702
716
|
var closeIcon = this.renderCloseIcon();
|
|
703
717
|
var maximizeIcon = this.renderMaximizeIcon();
|
|
704
|
-
var icons =
|
|
705
|
-
var header =
|
|
706
|
-
return /*#__PURE__*/React__default[
|
|
718
|
+
var icons = utils.ObjectUtils.getJSXElement(this.props.icons, this.props);
|
|
719
|
+
var header = utils.ObjectUtils.getJSXElement(this.props.header, this.props);
|
|
720
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
707
721
|
ref: function ref(el) {
|
|
708
722
|
return _this8.headerEl = el;
|
|
709
723
|
},
|
|
710
724
|
className: "p-dialog-header",
|
|
711
725
|
onMouseDown: this.onDragStart
|
|
712
|
-
}, /*#__PURE__*/React__default[
|
|
726
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
713
727
|
id: this.state.id + '_header',
|
|
714
728
|
className: "p-dialog-title"
|
|
715
|
-
}, header), /*#__PURE__*/React__default[
|
|
729
|
+
}, header), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
716
730
|
className: "p-dialog-header-icons"
|
|
717
731
|
}, icons, maximizeIcon, closeIcon));
|
|
718
732
|
}
|
|
@@ -724,8 +738,8 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
724
738
|
value: function renderContent() {
|
|
725
739
|
var _this9 = this;
|
|
726
740
|
|
|
727
|
-
var contentClassName =
|
|
728
|
-
return /*#__PURE__*/React__default[
|
|
741
|
+
var contentClassName = utils.classNames('p-dialog-content', this.props.contentClassName);
|
|
742
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
729
743
|
id: this.state.id + '_content',
|
|
730
744
|
ref: function ref(el) {
|
|
731
745
|
return _this9.contentEl = el;
|
|
@@ -739,8 +753,8 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
739
753
|
value: function renderFooter() {
|
|
740
754
|
var _this10 = this;
|
|
741
755
|
|
|
742
|
-
var footer =
|
|
743
|
-
return footer && /*#__PURE__*/React__default[
|
|
756
|
+
var footer = utils.ObjectUtils.getJSXElement(this.props.footer, this.props);
|
|
757
|
+
return footer && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
744
758
|
ref: function ref(el) {
|
|
745
759
|
return _this10.footerElement = el;
|
|
746
760
|
},
|
|
@@ -751,7 +765,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
751
765
|
key: "renderResizer",
|
|
752
766
|
value: function renderResizer() {
|
|
753
767
|
if (this.props.resizable) {
|
|
754
|
-
return /*#__PURE__*/React__default[
|
|
768
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
755
769
|
className: "p-resizable-handle",
|
|
756
770
|
style: {
|
|
757
771
|
zIndex: 90
|
|
@@ -767,11 +781,11 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
767
781
|
value: function renderElement() {
|
|
768
782
|
var _this11 = this;
|
|
769
783
|
|
|
770
|
-
var className =
|
|
784
|
+
var className = utils.classNames('p-dialog p-component', this.props.className, {
|
|
771
785
|
'p-dialog-rtl': this.props.rtl,
|
|
772
786
|
'p-dialog-maximized': this.maximized
|
|
773
787
|
});
|
|
774
|
-
var maskClassName =
|
|
788
|
+
var maskClassName = utils.classNames('p-dialog-mask', {
|
|
775
789
|
'p-component-overlay p-component-overlay-enter': this.props.modal,
|
|
776
790
|
'p-dialog-visible': this.state.maskVisible,
|
|
777
791
|
'p-dialog-draggable': this.props.draggable,
|
|
@@ -785,13 +799,14 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
785
799
|
enter: this.props.position === 'center' ? 150 : 300,
|
|
786
800
|
exit: this.props.position === 'center' ? 150 : 300
|
|
787
801
|
};
|
|
788
|
-
return /*#__PURE__*/React__default[
|
|
802
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
789
803
|
ref: function ref(el) {
|
|
790
804
|
return _this11.mask = el;
|
|
791
805
|
},
|
|
806
|
+
style: this.props.maskStyle,
|
|
792
807
|
className: maskClassName,
|
|
793
808
|
onClick: this.onMaskClick
|
|
794
|
-
}, /*#__PURE__*/React__default[
|
|
809
|
+
}, /*#__PURE__*/React__default["default"].createElement(csstransition.CSSTransition, {
|
|
795
810
|
nodeRef: this.dialogRef,
|
|
796
811
|
classNames: "p-dialog",
|
|
797
812
|
timeout: transitionTimeout,
|
|
@@ -800,8 +815,9 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
800
815
|
unmountOnExit: true,
|
|
801
816
|
onEnter: this.onEnter,
|
|
802
817
|
onEntered: this.onEntered,
|
|
818
|
+
onExiting: this.onExiting,
|
|
803
819
|
onExited: this.onExited
|
|
804
|
-
}, /*#__PURE__*/React__default[
|
|
820
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
805
821
|
ref: this.dialogRef,
|
|
806
822
|
id: this.state.id,
|
|
807
823
|
className: className,
|
|
@@ -818,7 +834,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
818
834
|
value: function render() {
|
|
819
835
|
if (this.state.maskVisible) {
|
|
820
836
|
var element = this.renderElement();
|
|
821
|
-
return /*#__PURE__*/React__default[
|
|
837
|
+
return /*#__PURE__*/React__default["default"].createElement(portal.Portal, {
|
|
822
838
|
element: element,
|
|
823
839
|
appendTo: this.props.appendTo,
|
|
824
840
|
visible: true
|
|
@@ -851,6 +867,7 @@ _defineProperty(Dialog, "defaultProps", {
|
|
|
851
867
|
closable: true,
|
|
852
868
|
style: null,
|
|
853
869
|
className: null,
|
|
870
|
+
maskStyle: null,
|
|
854
871
|
maskClassName: null,
|
|
855
872
|
showHeader: true,
|
|
856
873
|
appendTo: null,
|
package/dialog/dialog.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/core");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=i(e);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function o(e){if(Array.isArray(e))return s(e)}function a(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function r(e,t){if(e){if("string"==typeof e)return s(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?s(e,t):void 0}}function l(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(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 c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(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}}),t&&p(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})(e)}function g(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?c(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(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 y,v,E,k=function(i){m(k,e.Component);var s,p,h,y,v,E=(s=k,p=b(),function(){var e,t=f(s);if(p){var i=f(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return g(this,e)});function k(e){var i;return d(this,k),(i=E.call(this,e)).state={id:e.id,maskVisible:e.visible,visible:!1},i.props.onMaximize||(i.state.maximized=e.maximized),i.onClose=i.onClose.bind(c(i)),i.toggleMaximize=i.toggleMaximize.bind(c(i)),i.onDragStart=i.onDragStart.bind(c(i)),i.onResizeStart=i.onResizeStart.bind(c(i)),i.onMaskClick=i.onMaskClick.bind(c(i)),i.onEnter=i.onEnter.bind(c(i)),i.onEntered=i.onEntered.bind(c(i)),i.onExited=i.onExited.bind(c(i)),i.attributeSelector=t.UniqueComponentId(),i.dialogRef=n.default.createRef(),i}return h=k,(y=[{key:"onClose",value:function(e){this.props.onHide(),e.preventDefault()}},{key:"focus",value:function(){var e=document.activeElement;!(e&&this.dialogRef&&this.dialogRef.current.contains(e))&&this.props.closable&&this.props.showHeader&&this.closeElement.focus()}},{key:"onMaskClick",value:function(e){this.props.dismissableMask&&this.props.modal&&this.mask===e.target&&this.onClose(e),this.props.onMaskClick&&this.props.onMaskClick(e)}},{key:"toggleMaximize",value:function(e){var t=!this.maximized;this.props.onMaximize?this.props.onMaximize({originalEvent:e,maximized:t}):this.setState({maximized:t},this.changeScrollOnMaximizable),e.preventDefault()}},{key:"onDragStart",value:function(e){t.DomHandler.hasClass(e.target,"p-dialog-header-icon")||t.DomHandler.hasClass(e.target.parentElement,"p-dialog-header-icon")||this.props.draggable&&(this.dragging=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.dialogEl.style.margin="0",t.DomHandler.addClass(document.body,"p-unselectable-text"),this.props.onDragStart&&this.props.onDragStart(e))}},{key:"onDrag",value:function(e){if(this.dragging){var i=t.DomHandler.getOuterWidth(this.dialogEl),n=t.DomHandler.getOuterHeight(this.dialogEl),s=e.pageX-this.lastPageX,o=e.pageY-this.lastPageY,a=this.dialogEl.getBoundingClientRect(),r=a.left+s,l=a.top+o,d=t.DomHandler.getViewport();this.dialogEl.style.position="fixed",this.props.keepInViewport?(r>=this.props.minX&&r+i<d.width&&(this.lastPageX=e.pageX,this.dialogEl.style.left=r+"px"),l>=this.props.minY&&l+n<d.height&&(this.lastPageY=e.pageY,this.dialogEl.style.top=l+"px")):(this.lastPageX=e.pageX,this.dialogEl.style.left=r+"px",this.lastPageY=e.pageY,this.dialogEl.style.top=l+"px"),this.props.onDrag&&this.props.onDrag(e)}}},{key:"onDragEnd",value:function(e){this.dragging&&(this.dragging=!1,t.DomHandler.removeClass(document.body,"p-unselectable-text"),this.props.onDragEnd&&this.props.onDragEnd(e))}},{key:"onResizeStart",value:function(e){this.props.resizable&&(this.resizing=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,t.DomHandler.addClass(document.body,"p-unselectable-text"),this.props.onResizeStart&&this.props.onResizeStart(e))}},{key:"convertToPx",value:function(e,i,n){!n&&(n=t.DomHandler.getViewport());var s=parseInt(e);return/^(\d+|(\.\d+))(\.\d+)?%$/.test(e)?s*(n[i]/100):s}},{key:"onResize",value:function(e){if(this.resizing){var i=e.pageX-this.lastPageX,n=e.pageY-this.lastPageY,s=t.DomHandler.getOuterWidth(this.dialogEl),o=t.DomHandler.getOuterHeight(this.dialogEl),a=this.dialogEl.getBoundingClientRect(),r=t.DomHandler.getViewport(),l=s+i,d=o+n,u=this.convertToPx(this.dialogEl.style.minWidth,"width",r),c=this.convertToPx(this.dialogEl.style.minHeight,"height",r);(!parseInt(this.dialogEl.style.top)||!parseInt(this.dialogEl.style.left))&&(l+=i,d+=n),(!u||l>u)&&a.left+l<r.width&&(this.dialogEl.style.width=l+"px"),(!c||d>c)&&a.top+d<r.height&&(this.dialogEl.style.height=d+"px"),this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.props.onResize&&this.props.onResize(e)}}},{key:"onResizeEnd",value:function(e){this.resizing&&(this.resizing=!1,t.DomHandler.removeClass(document.body,"p-unselectable-text"),this.props.onResizeEnd&&this.props.onResizeEnd(e))}},{key:"resetPosition",value:function(){this.dialogEl.style.position="",this.dialogEl.style.left="",this.dialogEl.style.top="",this.dialogEl.style.margin=""}},{key:"getPositionClass",value:function(){var e=this,t=["center","left","right","top","top-left","top-right","bottom","bottom-left","bottom-right"].find((function(t){return t===e.props.position||t.replace("-","")===e.props.position}));return t?"p-dialog-".concat(t):""}},{key:"maximized",get:function(){return this.props.onMaximize?this.props.maximized:this.state.maximized}},{key:"dialogEl",get:function(){return this.dialogRef.current}},{key:"onEnter",value:function(){this.dialogEl.setAttribute(this.attributeSelector,"")}},{key:"onEntered",value:function(){this.props.onShow&&this.props.onShow(),this.props.focusOnShow&&this.focus(),this.enableDocumentSettings()}},{key:"onExited",value:function(){this.dragging=!1,t.ZIndexUtils.clear(this.mask),this.setState({maskVisible:!1}),t.DomHandler.addClass(this.mask,"p-component-overlay-leave"),this.disableDocumentSettings()}},{key:"enableDocumentSettings",value:function(){this.bindGlobalListeners(),(this.props.blockScroll||this.props.maximizable&&this.maximized)&&t.DomHandler.addClass(document.body,"p-overflow-hidden")}},{key:"disableDocumentSettings",value:function(){this.unbindGlobalListeners(),this.props.modal?document.primeDialogParams&&document.primeDialogParams.some((function(e){return e.hasBlockScroll}))||t.DomHandler.removeClass(document.body,"p-overflow-hidden"):(this.props.blockScroll||this.props.maximizable&&this.maximized)&&t.DomHandler.removeClass(document.body,"p-overflow-hidden")}},{key:"bindGlobalListeners",value:function(){this.props.draggable&&this.bindDocumentDragListener(),this.props.resizable&&this.bindDocumentResizeListeners(),this.props.closeOnEscape&&this.props.closable&&this.bindDocumentKeyDownListener()}},{key:"unbindGlobalListeners",value:function(){this.unbindDocumentDragListener(),this.unbindDocumentResizeListeners(),this.unbindDocumentKeyDownListener()}},{key:"bindDocumentDragListener",value:function(){this.documentDragListener=this.onDrag.bind(this),this.documentDragEndListener=this.onDragEnd.bind(this),window.document.addEventListener("mousemove",this.documentDragListener),window.document.addEventListener("mouseup",this.documentDragEndListener)}},{key:"unbindDocumentDragListener",value:function(){this.documentDragListener&&this.documentDragEndListener&&(window.document.removeEventListener("mousemove",this.documentDragListener),window.document.removeEventListener("mouseup",this.documentDragEndListener),this.documentDragListener=null,this.documentDragEndListener=null)}},{key:"bindDocumentResizeListeners",value:function(){this.documentResizeListener=this.onResize.bind(this),this.documentResizeEndListener=this.onResizeEnd.bind(this),window.document.addEventListener("mousemove",this.documentResizeListener),window.document.addEventListener("mouseup",this.documentResizeEndListener)}},{key:"unbindDocumentResizeListeners",value:function(){this.documentResizeListener&&this.documentResizeEndListener&&(window.document.removeEventListener("mousemove",this.documentResizeListener),window.document.removeEventListener("mouseup",this.documentResizeEndListener),this.documentResizeListener=null,this.documentResizeEndListener=null)}},{key:"bindDocumentKeyDownListener",value:function(){var e=this;this.documentKeyDownListener=function(i){var n=i.currentTarget;if(n&&n.primeDialogParams){var s=n.primeDialogParams,o=s.length,a=s[o-1]?s[o-1].id:void 0;if(a===e.state.id){var r=document.getElementById(a);if(27===i.which)e.onClose(i),i.stopImmediatePropagation(),s.splice(o-1,1);else if(9===i.which){i.preventDefault();var l=t.DomHandler.getFocusableElements(r);if(l&&l.length>0)if(document.activeElement){var d=l.indexOf(document.activeElement);i.shiftKey?-1===d||0===d?l[l.length-1].focus():l[d-1].focus():-1===d||d===l.length-1?l[0].focus():l[d+1].focus()}else l[0].focus()}}}};var i,n={id:this.state.id,hasBlockScroll:this.props.blockScroll};document.primeDialogParams=document.primeDialogParams?[].concat(o(i=document.primeDialogParams)||a(i)||r(i)||l(),[n]):[n],document.addEventListener("keydown",this.documentKeyDownListener)}},{key:"unbindDocumentKeyDownListener",value:function(){var e=this;this.documentKeyDownListener&&(document.removeEventListener("keydown",this.documentKeyDownListener),document.primeDialogParams=document.primeDialogParams&&document.primeDialogParams.filter((function(t){return t.id!==e.state.id})),this.documentKeyDownListener=null)}},{key:"createStyle",value:function(){if(!this.styleElement){this.styleElement=document.createElement("style"),document.head.appendChild(this.styleElement);var e="";for(var t in this.props.breakpoints)e+="\n @media screen and (max-width: ".concat(t,") {\n .p-dialog[").concat(this.attributeSelector,"] {\n width: ").concat(this.props.breakpoints[t]," !important;\n }\n }\n ");this.styleElement.innerHTML=e}}},{key:"componentDidMount",value:function(){var e=this;this.state.id||this.setState({id:t.UniqueComponentId()}),this.props.visible&&this.setState({visible:!0},(function(){t.ZIndexUtils.set("modal",e.mask,e.props.baseZIndex)})),this.props.breakpoints&&this.createStyle()}},{key:"componentDidUpdate",value:function(e){var i=this;this.props.visible&&!this.state.maskVisible&&this.setState({maskVisible:!0},(function(){t.ZIndexUtils.set("modal",i.mask,i.props.baseZIndex)})),this.props.visible!==this.state.visible&&this.state.maskVisible&&this.setState({visible:this.props.visible}),e.maximized!==this.props.maximized&&this.props.onMaximize&&this.changeScrollOnMaximizable()}},{key:"changeScrollOnMaximizable",value:function(){this.props.blockScroll||t.DomHandler[this.maximized?"addClass":"removeClass"](document.body,"p-overflow-hidden")}},{key:"componentWillUnmount",value:function(){this.disableDocumentSettings(),this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null),t.ZIndexUtils.clear(this.mask)}},{key:"renderCloseIcon",value:function(){var e=this;return this.props.closable?n.default.createElement("button",{ref:function(t){return e.closeElement=t},type:"button",className:"p-dialog-header-icon p-dialog-header-close p-link","aria-label":this.props.ariaCloseIconLabel,onClick:this.onClose},n.default.createElement("span",{className:"p-dialog-header-close-icon pi pi-times"}),n.default.createElement(t.Ripple,null)):null}},{key:"renderMaximizeIcon",value:function(){var e=t.classNames("p-dialog-header-maximize-icon pi",{"pi-window-maximize":!this.maximized,"pi-window-minimize":this.maximized});return this.props.maximizable?n.default.createElement("button",{type:"button",className:"p-dialog-header-icon p-dialog-header-maximize p-link",onClick:this.toggleMaximize},n.default.createElement("span",{className:e}),n.default.createElement(t.Ripple,null)):null}},{key:"renderHeader",value:function(){var e=this;if(this.props.showHeader){var i=this.renderCloseIcon(),s=this.renderMaximizeIcon(),o=t.ObjectUtils.getJSXElement(this.props.icons,this.props),a=t.ObjectUtils.getJSXElement(this.props.header,this.props);return n.default.createElement("div",{ref:function(t){return e.headerEl=t},className:"p-dialog-header",onMouseDown:this.onDragStart},n.default.createElement("div",{id:this.state.id+"_header",className:"p-dialog-title"},a),n.default.createElement("div",{className:"p-dialog-header-icons"},o,s,i))}return null}},{key:"renderContent",value:function(){var e=this,i=t.classNames("p-dialog-content",this.props.contentClassName);return n.default.createElement("div",{id:this.state.id+"_content",ref:function(t){return e.contentEl=t},className:i,style:this.props.contentStyle},this.props.children)}},{key:"renderFooter",value:function(){var e=this,i=t.ObjectUtils.getJSXElement(this.props.footer,this.props);return i&&n.default.createElement("div",{ref:function(t){return e.footerElement=t},className:"p-dialog-footer"},i)}},{key:"renderResizer",value:function(){return this.props.resizable?n.default.createElement("div",{className:"p-resizable-handle",style:{zIndex:90},onMouseDown:this.onResizeStart}):null}},{key:"renderElement",value:function(){var e=this,i=t.classNames("p-dialog p-component",this.props.className,{"p-dialog-rtl":this.props.rtl,"p-dialog-maximized":this.maximized}),s=t.classNames("p-dialog-mask",{"p-component-overlay p-component-overlay-enter":this.props.modal,"p-dialog-visible":this.state.maskVisible,"p-dialog-draggable":this.props.draggable,"p-dialog-resizable":this.props.resizable},this.props.maskClassName,this.getPositionClass()),o=this.renderHeader(),a=this.renderContent(),r=this.renderFooter(),l=this.renderResizer();return n.default.createElement("div",{ref:function(t){return e.mask=t},className:s,onClick:this.onMaskClick},n.default.createElement(t.CSSTransition,{nodeRef:this.dialogRef,classNames:"p-dialog",timeout:{enter:"center"===this.props.position?150:300,exit:"center"===this.props.position?150:300},in:this.state.visible,options:this.props.transitionOptions,unmountOnExit:!0,onEnter:this.onEnter,onEntered:this.onEntered,onExited:this.onExited},n.default.createElement("div",{ref:this.dialogRef,id:this.state.id,className:i,style:this.props.style,onClick:this.props.onClick,role:"dialog","aria-labelledby":this.state.id+"_header","aria-describedby":this.state.id+"_content","aria-modal":this.props.modal},o,a,r,l)))}},{key:"render",value:function(){if(this.state.maskVisible){var e=this.renderElement();return n.default.createElement(t.Portal,{element:e,appendTo:this.props.appendTo,visible:!0})}return null}}])&&u(h.prototype,y),v&&u(h,v),k}();E={id:null,header:null,footer:null,visible:!1,position:"center",draggable:!0,resizable:!0,modal:!0,onHide:null,onShow:null,contentStyle:null,contentClassName:null,closeOnEscape:!0,dismissableMask:!1,rtl:!1,closable:!0,style:null,className:null,maskClassName:null,showHeader:!0,appendTo:null,baseZIndex:0,maximizable:!1,blockScroll:!1,icons:null,ariaCloseIconLabel:"Close",focusOnShow:!0,minX:0,minY:0,keepInViewport:!0,maximized:!1,breakpoints:null,transitionOptions:null,onMaximize:null,onDragStart:null,onDrag:null,onDragEnd:null,onResizeStart:null,onResize:null,onResizeEnd:null,onClick:null,onMaskClick:null},(v="defaultProps")in(y=k)?Object.defineProperty(y,v,{value:E,enumerable:!0,configurable:!0,writable:!0}):y[v]=E,exports.Dialog=k;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/utils"),i=require("primereact/csstransition"),n=require("primereact/ripple"),o=require("primereact/portal"),s=require("primereact/api");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=a(e),l=a(s);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function u(e){if(Array.isArray(e))return d(e)}function c(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function p(e,t){if(e){if("string"==typeof e)return d(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?d(e,t):void 0}}function m(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(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 f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e,t){return b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},b(e,t)}function y(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}}),t&&b(e,t)}function v(e){return v="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},v(e)}function E(e,t){if(t&&("object"===v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return f(e)}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function D(){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 z,x,w,S=function(s){y(w,e.Component);var a,d,b,v,z,x=(a=w,d=D(),function(){var e,t=k(a);if(d){var i=k(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return E(this,e)});function w(e){var i;return h(this,w),(i=x.call(this,e)).state={id:e.id,maskVisible:e.visible,visible:!1},i.props.onMaximize||(i.state.maximized=e.maximized),i.onClose=i.onClose.bind(f(i)),i.toggleMaximize=i.toggleMaximize.bind(f(i)),i.onDragStart=i.onDragStart.bind(f(i)),i.onResizeStart=i.onResizeStart.bind(f(i)),i.onMaskClick=i.onMaskClick.bind(f(i)),i.onEnter=i.onEnter.bind(f(i)),i.onEntered=i.onEntered.bind(f(i)),i.onExiting=i.onExiting.bind(f(i)),i.onExited=i.onExited.bind(f(i)),i.attributeSelector=t.UniqueComponentId(),i.dialogRef=r.default.createRef(),i}return b=w,(v=[{key:"onClose",value:function(e){this.props.onHide(),e.preventDefault()}},{key:"focus",value:function(){var e=document.activeElement;!(e&&this.dialogRef&&this.dialogRef.current.contains(e))&&this.props.closable&&this.props.showHeader&&this.closeElement.focus()}},{key:"onMaskClick",value:function(e){this.props.dismissableMask&&this.props.modal&&this.mask===e.target&&this.onClose(e),this.props.onMaskClick&&this.props.onMaskClick(e)}},{key:"toggleMaximize",value:function(e){var t=!this.maximized;this.props.onMaximize?this.props.onMaximize({originalEvent:e,maximized:t}):this.setState({maximized:t},this.changeScrollOnMaximizable),e.preventDefault()}},{key:"onDragStart",value:function(e){t.DomHandler.hasClass(e.target,"p-dialog-header-icon")||t.DomHandler.hasClass(e.target.parentElement,"p-dialog-header-icon")||this.props.draggable&&(this.dragging=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.dialogEl.style.margin="0",t.DomHandler.addClass(document.body,"p-unselectable-text"),this.props.onDragStart&&this.props.onDragStart(e))}},{key:"onDrag",value:function(e){if(this.dragging){var i=t.DomHandler.getOuterWidth(this.dialogEl),n=t.DomHandler.getOuterHeight(this.dialogEl),o=e.pageX-this.lastPageX,s=e.pageY-this.lastPageY,a=this.dialogEl.getBoundingClientRect(),r=a.left+o,l=a.top+s,d=t.DomHandler.getViewport();this.dialogEl.style.position="fixed",this.props.keepInViewport?(r>=this.props.minX&&r+i<d.width&&(this.lastPageX=e.pageX,this.dialogEl.style.left=r+"px"),l>=this.props.minY&&l+n<d.height&&(this.lastPageY=e.pageY,this.dialogEl.style.top=l+"px")):(this.lastPageX=e.pageX,this.dialogEl.style.left=r+"px",this.lastPageY=e.pageY,this.dialogEl.style.top=l+"px"),this.props.onDrag&&this.props.onDrag(e)}}},{key:"onDragEnd",value:function(e){this.dragging&&(this.dragging=!1,t.DomHandler.removeClass(document.body,"p-unselectable-text"),this.props.onDragEnd&&this.props.onDragEnd(e))}},{key:"onResizeStart",value:function(e){this.props.resizable&&(this.resizing=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,t.DomHandler.addClass(document.body,"p-unselectable-text"),this.props.onResizeStart&&this.props.onResizeStart(e))}},{key:"convertToPx",value:function(e,i,n){!n&&(n=t.DomHandler.getViewport());var o=parseInt(e);return/^(\d+|(\.\d+))(\.\d+)?%$/.test(e)?o*(n[i]/100):o}},{key:"onResize",value:function(e){if(this.resizing){var i=e.pageX-this.lastPageX,n=e.pageY-this.lastPageY,o=t.DomHandler.getOuterWidth(this.dialogEl),s=t.DomHandler.getOuterHeight(this.dialogEl),a=this.dialogEl.getBoundingClientRect(),r=t.DomHandler.getViewport(),l=o+i,d=s+n,u=this.convertToPx(this.dialogEl.style.minWidth,"width",r),c=this.convertToPx(this.dialogEl.style.minHeight,"height",r);(!parseInt(this.dialogEl.style.top)||!parseInt(this.dialogEl.style.left))&&(l+=i,d+=n),(!u||l>u)&&a.left+l<r.width&&(this.dialogEl.style.width=l+"px"),(!c||d>c)&&a.top+d<r.height&&(this.dialogEl.style.height=d+"px"),this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.props.onResize&&this.props.onResize(e)}}},{key:"onResizeEnd",value:function(e){this.resizing&&(this.resizing=!1,t.DomHandler.removeClass(document.body,"p-unselectable-text"),this.props.onResizeEnd&&this.props.onResizeEnd(e))}},{key:"resetPosition",value:function(){this.dialogEl.style.position="",this.dialogEl.style.left="",this.dialogEl.style.top="",this.dialogEl.style.margin=""}},{key:"getPositionClass",value:function(){var e=this,t=["center","left","right","top","top-left","top-right","bottom","bottom-left","bottom-right"].find((function(t){return t===e.props.position||t.replace("-","")===e.props.position}));return t?"p-dialog-".concat(t):""}},{key:"maximized",get:function(){return this.props.onMaximize?this.props.maximized:this.state.maximized}},{key:"dialogEl",get:function(){return this.dialogRef.current}},{key:"onEnter",value:function(){this.dialogEl.setAttribute(this.attributeSelector,"")}},{key:"onEntered",value:function(){this.props.onShow&&this.props.onShow(),this.props.focusOnShow&&this.focus(),this.enableDocumentSettings()}},{key:"onExiting",value:function(){this.props.modal&&t.DomHandler.addClass(this.mask,"p-component-overlay-leave")}},{key:"onExited",value:function(){this.dragging=!1,t.ZIndexUtils.clear(this.mask),this.setState({maskVisible:!1}),this.disableDocumentSettings()}},{key:"enableDocumentSettings",value:function(){this.bindGlobalListeners(),(this.props.blockScroll||this.props.maximizable&&this.maximized)&&t.DomHandler.addClass(document.body,"p-overflow-hidden")}},{key:"disableDocumentSettings",value:function(){this.unbindGlobalListeners(),this.props.modal?document.primeDialogParams&&document.primeDialogParams.some((function(e){return e.hasBlockScroll}))||t.DomHandler.removeClass(document.body,"p-overflow-hidden"):(this.props.blockScroll||this.props.maximizable&&this.maximized)&&t.DomHandler.removeClass(document.body,"p-overflow-hidden")}},{key:"bindGlobalListeners",value:function(){this.props.draggable&&this.bindDocumentDragListener(),this.props.resizable&&this.bindDocumentResizeListeners(),this.props.closable&&this.bindDocumentKeyDownListener()}},{key:"unbindGlobalListeners",value:function(){this.unbindDocumentDragListener(),this.unbindDocumentResizeListeners(),this.unbindDocumentKeyDownListener()}},{key:"bindDocumentDragListener",value:function(){this.documentDragListener=this.onDrag.bind(this),this.documentDragEndListener=this.onDragEnd.bind(this),window.document.addEventListener("mousemove",this.documentDragListener),window.document.addEventListener("mouseup",this.documentDragEndListener)}},{key:"unbindDocumentDragListener",value:function(){this.documentDragListener&&this.documentDragEndListener&&(window.document.removeEventListener("mousemove",this.documentDragListener),window.document.removeEventListener("mouseup",this.documentDragEndListener),this.documentDragListener=null,this.documentDragEndListener=null)}},{key:"bindDocumentResizeListeners",value:function(){this.documentResizeListener=this.onResize.bind(this),this.documentResizeEndListener=this.onResizeEnd.bind(this),window.document.addEventListener("mousemove",this.documentResizeListener),window.document.addEventListener("mouseup",this.documentResizeEndListener)}},{key:"unbindDocumentResizeListeners",value:function(){this.documentResizeListener&&this.documentResizeEndListener&&(window.document.removeEventListener("mousemove",this.documentResizeListener),window.document.removeEventListener("mouseup",this.documentResizeEndListener),this.documentResizeListener=null,this.documentResizeEndListener=null)}},{key:"bindDocumentKeyDownListener",value:function(){var e=this;this.documentKeyDownListener=function(i){var n=i.currentTarget;if(n&&n.primeDialogParams){var o=n.primeDialogParams,s=o.length,a=o[s-1]?o[s-1].id:void 0;if(a===e.state.id&&e.props.closeOnEscape){var r=document.getElementById(a);if(27===i.which)e.onClose(i),i.stopImmediatePropagation(),o.splice(s-1,1);else if(9===i.which){i.preventDefault();var l=t.DomHandler.getFocusableElements(r);if(l&&l.length>0)if(document.activeElement){var d=l.indexOf(document.activeElement);i.shiftKey?-1===d||0===d?l[l.length-1].focus():l[d-1].focus():-1===d||d===l.length-1?l[0].focus():l[d+1].focus()}else l[0].focus()}}}};var i,n={id:this.state.id,hasBlockScroll:this.props.blockScroll};document.primeDialogParams=document.primeDialogParams?[].concat(u(i=document.primeDialogParams)||c(i)||p(i)||m(),[n]):[n],document.addEventListener("keydown",this.documentKeyDownListener)}},{key:"unbindDocumentKeyDownListener",value:function(){var e=this;this.documentKeyDownListener&&(document.removeEventListener("keydown",this.documentKeyDownListener),document.primeDialogParams=document.primeDialogParams&&document.primeDialogParams.filter((function(t){return t.id!==e.state.id})),this.documentKeyDownListener=null)}},{key:"createStyle",value:function(){if(!this.styleElement){this.styleElement=document.createElement("style"),document.head.appendChild(this.styleElement);var e="";for(var t in this.props.breakpoints)e+="\n @media screen and (max-width: ".concat(t,") {\n .p-dialog[").concat(this.attributeSelector,"] {\n width: ").concat(this.props.breakpoints[t]," !important;\n }\n }\n ");this.styleElement.innerHTML=e}}},{key:"componentDidMount",value:function(){var e=this;this.state.id||this.setState({id:t.UniqueComponentId()}),this.props.visible&&this.setState({visible:!0},(function(){t.ZIndexUtils.set("modal",e.mask,l.default.autoZIndex,e.props.baseZIndex||l.default.zIndex.modal)})),this.props.breakpoints&&this.createStyle()}},{key:"componentDidUpdate",value:function(e){var i=this;this.props.visible&&!this.state.maskVisible&&this.setState({maskVisible:!0},(function(){t.ZIndexUtils.set("modal",i.mask,l.default.autoZIndex,i.props.baseZIndex||l.default.zIndex.modal)})),this.props.visible!==this.state.visible&&this.state.maskVisible&&this.setState({visible:this.props.visible}),e.maximized!==this.props.maximized&&this.props.onMaximize&&this.changeScrollOnMaximizable()}},{key:"changeScrollOnMaximizable",value:function(){this.props.blockScroll||t.DomHandler[this.maximized?"addClass":"removeClass"](document.body,"p-overflow-hidden")}},{key:"componentWillUnmount",value:function(){this.disableDocumentSettings(),this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null),t.ZIndexUtils.clear(this.mask)}},{key:"renderCloseIcon",value:function(){var e=this;return this.props.closable?r.default.createElement("button",{ref:function(t){return e.closeElement=t},type:"button",className:"p-dialog-header-icon p-dialog-header-close p-link","aria-label":this.props.ariaCloseIconLabel,onClick:this.onClose},r.default.createElement("span",{className:"p-dialog-header-close-icon pi pi-times"}),r.default.createElement(n.Ripple,null)):null}},{key:"renderMaximizeIcon",value:function(){var e=t.classNames("p-dialog-header-maximize-icon pi",{"pi-window-maximize":!this.maximized,"pi-window-minimize":this.maximized});return this.props.maximizable?r.default.createElement("button",{type:"button",className:"p-dialog-header-icon p-dialog-header-maximize p-link",onClick:this.toggleMaximize},r.default.createElement("span",{className:e}),r.default.createElement(n.Ripple,null)):null}},{key:"renderHeader",value:function(){var e=this;if(this.props.showHeader){var i=this.renderCloseIcon(),n=this.renderMaximizeIcon(),o=t.ObjectUtils.getJSXElement(this.props.icons,this.props),s=t.ObjectUtils.getJSXElement(this.props.header,this.props);return r.default.createElement("div",{ref:function(t){return e.headerEl=t},className:"p-dialog-header",onMouseDown:this.onDragStart},r.default.createElement("div",{id:this.state.id+"_header",className:"p-dialog-title"},s),r.default.createElement("div",{className:"p-dialog-header-icons"},o,n,i))}return null}},{key:"renderContent",value:function(){var e=this,i=t.classNames("p-dialog-content",this.props.contentClassName);return r.default.createElement("div",{id:this.state.id+"_content",ref:function(t){return e.contentEl=t},className:i,style:this.props.contentStyle},this.props.children)}},{key:"renderFooter",value:function(){var e=this,i=t.ObjectUtils.getJSXElement(this.props.footer,this.props);return i&&r.default.createElement("div",{ref:function(t){return e.footerElement=t},className:"p-dialog-footer"},i)}},{key:"renderResizer",value:function(){return this.props.resizable?r.default.createElement("div",{className:"p-resizable-handle",style:{zIndex:90},onMouseDown:this.onResizeStart}):null}},{key:"renderElement",value:function(){var e=this,n=t.classNames("p-dialog p-component",this.props.className,{"p-dialog-rtl":this.props.rtl,"p-dialog-maximized":this.maximized}),o=t.classNames("p-dialog-mask",{"p-component-overlay p-component-overlay-enter":this.props.modal,"p-dialog-visible":this.state.maskVisible,"p-dialog-draggable":this.props.draggable,"p-dialog-resizable":this.props.resizable},this.props.maskClassName,this.getPositionClass()),s=this.renderHeader(),a=this.renderContent(),l=this.renderFooter(),d=this.renderResizer();return r.default.createElement("div",{ref:function(t){return e.mask=t},style:this.props.maskStyle,className:o,onClick:this.onMaskClick},r.default.createElement(i.CSSTransition,{nodeRef:this.dialogRef,classNames:"p-dialog",timeout:{enter:"center"===this.props.position?150:300,exit:"center"===this.props.position?150:300},in:this.state.visible,options:this.props.transitionOptions,unmountOnExit:!0,onEnter:this.onEnter,onEntered:this.onEntered,onExiting:this.onExiting,onExited:this.onExited},r.default.createElement("div",{ref:this.dialogRef,id:this.state.id,className:n,style:this.props.style,onClick:this.props.onClick,role:"dialog","aria-labelledby":this.state.id+"_header","aria-describedby":this.state.id+"_content","aria-modal":this.props.modal},s,a,l,d)))}},{key:"render",value:function(){if(this.state.maskVisible){var e=this.renderElement();return r.default.createElement(o.Portal,{element:e,appendTo:this.props.appendTo,visible:!0})}return null}}])&&g(b.prototype,v),z&&g(b,z),w}();w={id:null,header:null,footer:null,visible:!1,position:"center",draggable:!0,resizable:!0,modal:!0,onHide:null,onShow:null,contentStyle:null,contentClassName:null,closeOnEscape:!0,dismissableMask:!1,rtl:!1,closable:!0,style:null,className:null,maskStyle:null,maskClassName:null,showHeader:!0,appendTo:null,baseZIndex:0,maximizable:!1,blockScroll:!1,icons:null,ariaCloseIconLabel:"Close",focusOnShow:!0,minX:0,minY:0,keepInViewport:!0,maximized:!1,breakpoints:null,transitionOptions:null,onMaximize:null,onDragStart:null,onDrag:null,onDragEnd:null,onResizeStart:null,onResize:null,onResizeEnd:null,onClick:null,onMaskClick:null},(x="defaultProps")in(z=S)?Object.defineProperty(z,x,{value:w,enumerable:!0,configurable:!0,writable:!0}):z[x]=w,exports.Dialog=S;
|