primereact 6.5.0 → 7.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/accordion.cjs.js +2 -0
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +2 -0
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +2 -0
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +308 -10
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +61 -1
- package/api/api.esm.js +305 -11
- package/api/api.esm.min.js +1 -1
- package/api/api.js +308 -12
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +3 -1
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +3 -1
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +3 -1
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +2 -0
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.esm.js +2 -0
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +2 -0
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.cjs.js +2 -0
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.esm.js +2 -0
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +2 -0
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/badge.cjs.js +2 -0
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +2 -0
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +2 -0
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +9 -15
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +9 -15
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +9 -15
- package/blockui/blockui.min.css +1 -1
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +2 -0
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +2 -0
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +2 -0
- package/breadcrumb/breadcrumb.min.css +1 -1
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +2 -0
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +2 -0
- package/button/button.esm.min.js +1 -1
- package/button/button.js +2 -0
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +85 -67
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +85 -67
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +85 -67
- package/calendar/calendar.min.js +1 -1
- package/captcha/captcha.cjs.js +2 -0
- 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 +2 -0
- package/captcha/captcha.min.js +1 -1
- package/card/card.cjs.js +2 -0
- package/card/card.cjs.min.js +1 -1
- package/card/card.esm.js +2 -0
- package/card/card.esm.min.js +1 -1
- package/card/card.js +2 -0
- package/card/card.min.js +1 -1
- package/carousel/carousel.cjs.js +2 -0
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +3 -1
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +2 -0
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +2 -0
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +2 -0
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +2 -0
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +2 -0
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +2 -0
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +2 -0
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +19 -9
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +3 -1
- package/checkbox/checkbox.esm.js +19 -9
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +19 -9
- package/checkbox/checkbox.min.css +1 -1
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +2 -0
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.esm.js +2 -0
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +2 -0
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +2 -0
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +2 -0
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +2 -0
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +2 -0
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +2 -0
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +2 -0
- 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 +146 -13
- package/column/column.esm.js +34 -9
- package/column/column.esm.min.js +1 -1
- package/column/column.js +34 -9
- 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 +2 -0
- package/columngroup/columngroup.min.js +1 -1
- package/common/common.min.css +1 -1
- package/confirmdialog/confirmdialog.cjs.js +2 -0
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +2 -0
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +2 -0
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +2 -0
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +2 -0
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +2 -0
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +2 -0
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +3 -1
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +2 -0
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.cjs.js +351 -669
- package/core/core.cjs.min.js +1 -1
- package/core/core.esm.js +347 -665
- package/core/core.esm.min.js +1 -1
- package/core/core.js +352 -671
- package/core/core.min.js +1 -1
- package/csstransition/csstransition.cjs.js +2 -0
- 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 +2 -0
- package/csstransition/csstransition.min.js +1 -1
- package/datascroller/datascroller.cjs.js +8 -1
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.esm.js +8 -1
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +8 -1
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +4803 -3320
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +97 -28
- package/datatable/datatable.esm.js +4803 -3321
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +4801 -3322
- package/datatable/datatable.min.css +1 -1
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +4 -2
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +4 -2
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +4 -2
- package/dataview/dataview.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +2 -0
- 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 +2 -0
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +12 -1
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +12 -1
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +12 -1
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +2 -0
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +2 -0
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +2 -0
- package/divider/divider.min.js +1 -1
- package/dock/dock.cjs.js +5 -1
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +5 -1
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +5 -1
- package/dock/dock.min.css +1 -1
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +15 -11
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +17 -13
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +15 -11
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +2 -0
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +2 -0
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +2 -0
- package/editor/editor.min.js +1 -1
- package/fieldset/fieldset.cjs.js +2 -0
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +2 -0
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +2 -0
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +2 -0
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +2 -0
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +2 -0
- package/fileupload/fileupload.min.js +1 -1
- package/fullcalendar/fullcalendar.cjs.js +2 -0
- package/fullcalendar/fullcalendar.cjs.min.js +1 -1
- package/fullcalendar/fullcalendar.esm.js +2 -0
- package/fullcalendar/fullcalendar.esm.min.js +1 -1
- package/fullcalendar/fullcalendar.js +2 -0
- package/fullcalendar/fullcalendar.min.js +1 -1
- package/galleria/galleria.cjs.js +25 -5
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +25 -5
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +25 -5
- package/galleria/galleria.min.css +1 -1
- package/galleria/galleria.min.js +1 -1
- package/gmap/gmap.cjs.js +2 -0
- 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 +2 -0
- package/gmap/gmap.min.js +1 -1
- package/image/image.cjs.js +397 -0
- package/image/image.cjs.min.js +1 -0
- package/image/image.d.ts +18 -0
- package/image/image.esm.js +389 -0
- package/image/image.esm.min.js +1 -0
- package/image/image.js +400 -0
- package/image/image.min.css +1 -0
- package/image/image.min.js +1 -0
- package/image/package.json +6 -0
- package/inplace/inplace.cjs.js +2 -0
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +2 -0
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +2 -0
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +2 -0
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +2 -0
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +2 -0
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +177 -62
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +1 -0
- package/inputnumber/inputnumber.esm.js +177 -62
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +177 -62
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +16 -6
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.d.ts +3 -1
- package/inputswitch/inputswitch.esm.js +16 -6
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +16 -6
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +2 -0
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +2 -0
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +2 -0
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +2 -0
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.esm.js +2 -0
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +2 -0
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/knob/knob.cjs.js +2 -0
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +2 -0
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +2 -0
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +6 -3
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +7 -4
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +7 -5
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +2 -0
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +2 -0
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +2 -0
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +2 -0
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.esm.js +2 -0
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +2 -0
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +2 -0
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +1 -1
- package/menu/menu.esm.js +2 -0
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +2 -0
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +2 -0
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +2 -0
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +2 -0
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +2 -0
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +2 -0
- package/message/message.esm.min.js +1 -1
- package/message/message.js +2 -0
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +2 -0
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.esm.js +2 -0
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +2 -0
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +22 -12
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +3 -1
- package/multiselect/multiselect.esm.js +24 -14
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +22 -12
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +2 -0
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +2 -0
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +2 -0
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +2 -0
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +2 -0
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +2 -0
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +2 -0
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +2 -0
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +2 -0
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +10 -1
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +10 -1
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +10 -1
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.cjs.js +120 -30
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.d.ts +13 -0
- package/paginator/paginator.esm.js +120 -30
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +121 -32
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +2 -0
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +2 -0
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +2 -0
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +2 -0
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +3 -1
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +2 -0
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/password.cjs.js +2 -0
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +2 -0
- package/password/password.esm.min.js +1 -1
- package/password/password.js +2 -0
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +2 -0
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +2 -0
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +2 -0
- package/picklist/picklist.min.js +1 -1
- package/portal/portal.cjs.js +6 -2
- 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 +6 -2
- package/portal/portal.min.js +1 -1
- package/primereact.all.cjs.js +12344 -9903
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +12340 -9903
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +12344 -9903
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +2 -0
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +2 -0
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +2 -0
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/progressspinner.cjs.js +2 -0
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +2 -0
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +2 -0
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +2 -0
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +2 -0
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +2 -0
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +2 -0
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +2 -0
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +2 -0
- package/rating/rating.min.js +1 -1
- package/resources/primereact.css +340 -84
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +4600 -3838
- package/resources/themes/arya-green/theme.css +4600 -3838
- package/resources/themes/arya-orange/theme.css +4600 -3838
- package/resources/themes/arya-purple/theme.css +4600 -3838
- package/resources/themes/bootstrap4-dark-blue/theme.css +4601 -3837
- package/resources/themes/bootstrap4-dark-purple/theme.css +4601 -3837
- package/resources/themes/bootstrap4-light-blue/theme.css +4579 -3815
- package/resources/themes/bootstrap4-light-purple/theme.css +4579 -3815
- package/resources/themes/fluent-light/theme.css +4690 -3897
- package/resources/themes/luna-amber/theme.css +4555 -3807
- package/resources/themes/luna-blue/theme.css +4551 -3803
- package/resources/themes/luna-green/theme.css +4551 -3803
- package/resources/themes/luna-pink/theme.css +4555 -3807
- package/resources/themes/md-dark-deeppurple/theme.css +5580 -4689
- package/resources/themes/md-dark-indigo/theme.css +5578 -4687
- package/resources/themes/md-light-deeppurple/theme.css +5569 -4678
- package/resources/themes/md-light-indigo/theme.css +5569 -4678
- package/resources/themes/mdc-dark-deeppurple/theme.css +5575 -4684
- package/resources/themes/mdc-dark-indigo/theme.css +5583 -4692
- package/resources/themes/mdc-light-deeppurple/theme.css +5579 -4688
- package/resources/themes/mdc-light-indigo/theme.css +5579 -4688
- package/resources/themes/nova/theme.css +4554 -3802
- package/resources/themes/nova-accent/theme.css +4571 -3818
- package/resources/themes/nova-alt/theme.css +4560 -3806
- package/resources/themes/rhea/theme.css +4562 -3813
- package/resources/themes/saga-blue/theme.css +4608 -3847
- package/resources/themes/saga-green/theme.css +4608 -3847
- package/resources/themes/saga-orange/theme.css +4608 -3847
- package/resources/themes/saga-purple/theme.css +4607 -3846
- package/resources/themes/tailwind-light/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-Light.woff +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/tailwind-light/theme.css +5722 -0
- package/resources/themes/vela-blue/theme.css +4602 -3840
- package/resources/themes/vela-green/theme.css +4602 -3840
- package/resources/themes/vela-orange/theme.css +4602 -3840
- package/resources/themes/vela-purple/theme.css +4602 -3840
- package/ripple/ripple.cjs.js +2 -0
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +2 -0
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +2 -0
- package/ripple/ripple.min.js +1 -1
- package/row/row.cjs.js +2 -0
- 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 +2 -0
- package/row/row.min.js +1 -1
- package/scrollpanel/scrollpanel.cjs.js +2 -0
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +2 -0
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +2 -0
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +2 -0
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.esm.js +2 -0
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +2 -0
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +2 -0
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +2 -0
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +2 -0
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/sidebar.cjs.js +23 -27
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +23 -27
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +23 -27
- package/sidebar/sidebar.min.css +1 -1
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +2 -0
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +2 -0
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +2 -0
- package/skeleton/skeleton.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +2 -0
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.esm.js +2 -0
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +2 -0
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +14 -7
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +14 -7
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +14 -7
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +2 -0
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +2 -0
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +2 -0
- package/speeddial/speeddial.min.css +1 -1
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +2 -0
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +2 -0
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +2 -0
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +2 -0
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +2 -0
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +2 -0
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +2 -0
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +2 -0
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +2 -0
- package/steps/steps.min.js +1 -1
- package/styleclass/package.json +6 -0
- package/styleclass/styleclass.cjs.js +355 -0
- package/styleclass/styleclass.cjs.min.js +1 -0
- package/styleclass/styleclass.d.ts +18 -0
- package/styleclass/styleclass.esm.js +351 -0
- package/styleclass/styleclass.esm.min.js +1 -0
- package/styleclass/styleclass.js +358 -0
- package/styleclass/styleclass.min.js +1 -0
- package/tabmenu/tabmenu.cjs.js +2 -0
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +2 -0
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +2 -0
- package/tabmenu/tabmenu.min.css +1 -1
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +135 -18
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +1 -0
- package/tabview/tabview.esm.js +135 -18
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +135 -18
- package/tabview/tabview.min.css +1 -1
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +2 -0
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.esm.js +2 -0
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +2 -0
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +2 -0
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +2 -0
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +2 -0
- package/terminal/terminal.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +2 -0
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +1 -1
- package/tieredmenu/tieredmenu.esm.js +2 -0
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +2 -0
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +2 -0
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +2 -0
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +2 -0
- package/timeline/timeline.min.js +1 -1
- package/toast/toast.cjs.js +9 -2
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +4 -0
- package/toast/toast.esm.js +9 -2
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +9 -2
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +2 -0
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +2 -0
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +2 -0
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +2 -0
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +2 -0
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +2 -0
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +2 -0
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +2 -0
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +2 -0
- package/tooltip/tooltip.min.css +1 -1
- package/tooltip/tooltip.min.js +1 -1
- package/tree/tree.cjs.js +2 -0
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +2 -0
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +2 -0
- package/tree/tree.min.js +1 -1
- package/treenode/treenode.d.ts +1 -1
- package/treeselect/treeselect.cjs.js +2 -0
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +2 -0
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +2 -0
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +22 -8
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +23 -9
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +23 -10
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +2 -0
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +2 -0
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +2 -0
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +404 -496
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +20 -26
- package/utils/utils.esm.js +405 -496
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +404 -496
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +277 -160
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.d.ts +21 -9
- package/virtualscroller/virtualscroller.esm.js +277 -160
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +277 -160
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +168 -29
package/dataview/dataview.cjs.js
CHANGED
|
@@ -118,6 +118,8 @@ function _typeof(obj) {
|
|
|
118
118
|
function _possibleConstructorReturn(self, call) {
|
|
119
119
|
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
120
120
|
return call;
|
|
121
|
+
} else if (call !== void 0) {
|
|
122
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
121
123
|
}
|
|
122
124
|
|
|
123
125
|
return _assertThisInitialized(self);
|
|
@@ -379,7 +381,7 @@ var DataView = /*#__PURE__*/function (_Component3) {
|
|
|
379
381
|
value: function renderEmptyMessage() {
|
|
380
382
|
if (!this.props.loading) {
|
|
381
383
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
382
|
-
className: "p-col-12 p-dataview-emptymessage"
|
|
384
|
+
className: "p-col-12 col-12 p-dataview-emptymessage"
|
|
383
385
|
}, this.props.emptyMessage);
|
|
384
386
|
}
|
|
385
387
|
|
|
@@ -452,7 +454,7 @@ var DataView = /*#__PURE__*/function (_Component3) {
|
|
|
452
454
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
453
455
|
className: "p-dataview-content"
|
|
454
456
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
455
|
-
className: "p-grid p-nogutter"
|
|
457
|
+
className: "p-grid p-nogutter grid grid-nogutter"
|
|
456
458
|
}, items));
|
|
457
459
|
}
|
|
458
460
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("primereact/paginator"),r=require("primereact/core");function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=n(t);function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function i(t){if(Array.isArray(t))return a(t)}function s(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function l(t,e){if(t){if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}function p(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t,e,r){return e&&c(t.prototype,e),r&&c(t,r),t}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function g(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&&d(t,e)}function y(t){return(y="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})(t)}function m(t,e){
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("primereact/paginator"),r=require("primereact/core");function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=n(t);function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function i(t){if(Array.isArray(t))return a(t)}function s(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function l(t,e){if(t){if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}function p(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t,e,r){return e&&c(t.prototype,e),r&&c(t,r),t}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function g(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&&d(t,e)}function y(t){return(y="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})(t)}function m(t,e){if(e&&("object"===y(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return h(t)}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function b(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function P(t){var e=w();return function(){var r,n=v(t);if(e){var o=v(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return m(this,r)}}function w(){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 k=function(e){g(a,t.Component);var n=P(a);function a(t){var e;return u(this,a),(e=n.call(this,t)).changeLayout=e.changeLayout.bind(h(e)),e}return f(a,[{key:"changeLayout",value:function(t,e){this.props.onChange({originalEvent:t,value:e}),t.preventDefault()}},{key:"render",value:function(){var t=this,e=r.classNames("p-dataview-layout-options p-selectbutton p-buttonset",this.props.className),n=r.classNames("p-button p-button-icon-only",{"p-highlight":"list"===this.props.layout}),a=r.classNames("p-button p-button-icon-only",{"p-highlight":"grid"===this.props.layout});return o.default.createElement("div",{id:this.props.id,style:this.props.style,className:e},o.default.createElement("button",{type:"button",className:n,onClick:function(e){return t.changeLayout(e,"list")}},o.default.createElement("i",{className:"pi pi-bars"}),o.default.createElement(r.Ripple,null)),o.default.createElement("button",{type:"button",className:a,onClick:function(e){return t.changeLayout(e,"grid")}},o.default.createElement("i",{className:"pi pi-th-large"}),o.default.createElement(r.Ripple,null)))}}]),a}();b(k,"defaultProps",{id:null,style:null,className:null,layout:null,onChange:null});var N=function(e){g(n,t.Component);var r=P(n);function n(){return u(this,n),r.apply(this,arguments)}return f(n,[{key:"render",value:function(){return this.props.template(this.props.item,this.props.layout)}}]),n}();b(N,"defaultProps",{template:null,item:null,layout:null});var E=function(n){g(c,t.Component);var a=P(c);function c(t){var e;return u(this,c),(e=a.call(this,t)).props.onPage||(e.state={first:e.props.first,rows:e.props.rows}),e.sortChange=!1,e.onPageChange=e.onPageChange.bind(h(e)),e}return f(c,[{key:"getItemRenderKey",value:function(t){return this.props.dataKey?r.ObjectUtils.resolveFieldData(t,this.props.dataKey):null}},{key:"getTotalRecords",value:function(){return this.props.totalRecords?this.props.totalRecords:this.props.value?this.props.value.length:0}},{key:"createPaginator",value:function(t){var n=r.classNames("p-paginator-"+t,this.props.paginatorClassName),a=this.props.onPage?this.props.first:this.state.first,i=this.props.onPage?this.props.rows:this.state.rows,s=this.getTotalRecords();return o.default.createElement(e.Paginator,{first:a,rows:i,pageLinkSize:this.props.pageLinkSize,className:n,onPageChange:this.onPageChange,template:this.props.paginatorTemplate,totalRecords:s,rowsPerPageOptions:this.props.rowsPerPageOptions,currentPageReportTemplate:this.props.currentPageReportTemplate,leftContent:this.props.paginatorLeft,rightContent:this.props.paginatorRight,alwaysShow:this.props.alwaysShowPaginator,dropdownAppendTo:this.props.paginatorDropdownAppendTo})}},{key:"onPageChange",value:function(t){this.props.onPage?this.props.onPage(t):this.setState({first:t.first,rows:t.rows})}},{key:"isEmpty",value:function(){return!this.props.value||0===this.props.value.length}},{key:"sort",value:function(){var t,e=this;if(this.props.value){var n=i(t=this.props.value)||s(t)||l(t)||p();return n.sort((function(t,n){var o=r.ObjectUtils.resolveFieldData(t,e.props.sortField),a=r.ObjectUtils.resolveFieldData(n,e.props.sortField),i=null;return i=null==o&&null!=a?-1:null!=o&&null==a?1:null==o&&null==a?0:"string"==typeof o&&"string"==typeof a?o.localeCompare(a,void 0,{numeric:!0}):o<a?-1:o>a?1:0,e.props.sortOrder*i})),n}return null}},{key:"renderLoader",value:function(){if(this.props.loading){var t=r.classNames("p-dataview-loading-icon pi-spin",this.props.loadingIcon);return o.default.createElement("div",{className:"p-dataview-loading-overlay p-component-overlay"},o.default.createElement("i",{className:t}))}return null}},{key:"renderTopPaginator",value:function(){return!this.props.paginator||"bottom"===this.props.paginatorPosition&&"both"!==this.props.paginatorPosition?null:this.createPaginator("top")}},{key:"renderBottomPaginator",value:function(){return!this.props.paginator||"top"===this.props.paginatorPosition&&"both"!==this.props.paginatorPosition?null:this.createPaginator("bottom")}},{key:"renderEmptyMessage",value:function(){return this.props.loading?null:o.default.createElement("div",{className:"p-col-12 col-12 p-dataview-emptymessage"},this.props.emptyMessage)}},{key:"renderHeader",value:function(){return this.props.header?o.default.createElement("div",{className:"p-dataview-header"},this.props.header):null}},{key:"renderFooter",value:function(){return this.props.footer?o.default.createElement("div",{className:"p-dataview-footer"}," ",this.props.footer):null}},{key:"renderItems",value:function(t){var e=this;if(t&&t.length){if(this.props.paginator){for(var r=this.props.onPage?this.props.rows:this.state.rows,n=this.props.lazy?0:this.props.onPage?this.props.first:this.state.first,a=this.getTotalRecords(),i=Math.min(r+n,a),s=[],l=n;l<i;l++){var p=t[l];p&&s.push(o.default.createElement(N,{key:this.getItemRenderKey(t)||l,template:this.props.itemTemplate,layout:this.props.layout,item:p}))}return s}return t.map((function(t,r){return o.default.createElement(N,{key:e.getItemRenderKey(t)||r,template:e.props.itemTemplate,layout:e.props.layout,item:t})}))}return this.renderEmptyMessage()}},{key:"renderContent",value:function(t){var e=this.renderItems(t);return o.default.createElement("div",{className:"p-dataview-content"},o.default.createElement("div",{className:"p-grid p-nogutter grid grid-nogutter"},e))}},{key:"processData",value:function(){var t=this.props.value;return t&&t.length&&this.props.sortField&&(t=this.sort()),t}},{key:"render",value:function(){var t=this.processData(),e=r.classNames("p-dataview p-component",{"p-dataview-list":"list"===this.props.layout,"p-dataview-grid":"grid"===this.props.layout,"p-dataview-loading":this.props.loading},this.props.className),n=this.renderLoader(),a=this.renderTopPaginator(),i=this.renderBottomPaginator(),s=this.renderHeader(),l=this.renderFooter(),p=this.renderContent(t);return o.default.createElement("div",{id:this.props.id,style:this.props.style,className:e},n,s,a,p,i,l)}}]),c}();b(E,"defaultProps",{id:null,header:null,footer:null,value:null,layout:"list",dataKey:null,rows:null,first:0,totalRecords:null,paginator:!1,paginatorPosition:"bottom",alwaysShowPaginator:!0,paginatorClassName:null,paginatorTemplate:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown",paginatorLeft:null,paginatorRight:null,paginatorDropdownAppendTo:null,pageLinkSize:5,rowsPerPageOptions:null,currentPageReportTemplate:"({currentPage} of {totalPages})",emptyMessage:"No records found",sortField:null,sortOrder:null,style:null,className:null,lazy:!1,loading:!1,loadingIcon:"pi pi-spinner",itemTemplate:null,onPage:null}),exports.DataView=E,exports.DataViewLayoutOptions=k;
|
package/dataview/dataview.esm.js
CHANGED
|
@@ -110,6 +110,8 @@ function _typeof(obj) {
|
|
|
110
110
|
function _possibleConstructorReturn(self, call) {
|
|
111
111
|
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
112
112
|
return call;
|
|
113
|
+
} else if (call !== void 0) {
|
|
114
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
113
115
|
}
|
|
114
116
|
|
|
115
117
|
return _assertThisInitialized(self);
|
|
@@ -371,7 +373,7 @@ var DataView = /*#__PURE__*/function (_Component3) {
|
|
|
371
373
|
value: function renderEmptyMessage() {
|
|
372
374
|
if (!this.props.loading) {
|
|
373
375
|
return /*#__PURE__*/React.createElement("div", {
|
|
374
|
-
className: "p-col-12 p-dataview-emptymessage"
|
|
376
|
+
className: "p-col-12 col-12 p-dataview-emptymessage"
|
|
375
377
|
}, this.props.emptyMessage);
|
|
376
378
|
}
|
|
377
379
|
|
|
@@ -444,7 +446,7 @@ var DataView = /*#__PURE__*/function (_Component3) {
|
|
|
444
446
|
return /*#__PURE__*/React.createElement("div", {
|
|
445
447
|
className: "p-dataview-content"
|
|
446
448
|
}, /*#__PURE__*/React.createElement("div", {
|
|
447
|
-
className: "p-grid p-nogutter"
|
|
449
|
+
className: "p-grid p-nogutter grid grid-nogutter"
|
|
448
450
|
}, items));
|
|
449
451
|
}
|
|
450
452
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t,{Component as e}from"react";import{Paginator as r}from"primereact/paginator";import{classNames as
|
|
1
|
+
import t,{Component as e}from"react";import{Paginator as r}from"primereact/paginator";import{classNames as o,Ripple as n,ObjectUtils as a}from"primereact/core";function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,o=new Array(e);r<e;r++)o[r]=t[r];return o}function s(t){if(Array.isArray(t))return i(t)}function l(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function p(t,e){if(t){if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}function u(){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 c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function f(t,e,r){return e&&h(t.prototype,e),r&&h(t,r),t}function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function y(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&&d(t,e)}function m(t){return(m="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})(t)}function v(t,e){if(e&&("object"===m(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return g(t)}function P(t){return(P=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function b(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function w(t){var e=k();return function(){var r,o=P(t);if(e){var n=P(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return v(this,r)}}function k(){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 E=function(r){y(i,e);var a=w(i);function i(t){var e;return c(this,i),(e=a.call(this,t)).changeLayout=e.changeLayout.bind(g(e)),e}return f(i,[{key:"changeLayout",value:function(t,e){this.props.onChange({originalEvent:t,value:e}),t.preventDefault()}},{key:"render",value:function(){var e=this,r=o("p-dataview-layout-options p-selectbutton p-buttonset",this.props.className),a=o("p-button p-button-icon-only",{"p-highlight":"list"===this.props.layout}),i=o("p-button p-button-icon-only",{"p-highlight":"grid"===this.props.layout});return t.createElement("div",{id:this.props.id,style:this.props.style,className:r},t.createElement("button",{type:"button",className:a,onClick:function(t){return e.changeLayout(t,"list")}},t.createElement("i",{className:"pi pi-bars"}),t.createElement(n,null)),t.createElement("button",{type:"button",className:i,onClick:function(t){return e.changeLayout(t,"grid")}},t.createElement("i",{className:"pi pi-th-large"}),t.createElement(n,null)))}}]),i}();b(E,"defaultProps",{id:null,style:null,className:null,layout:null,onChange:null});var N=function(t){y(o,e);var r=w(o);function o(){return c(this,o),r.apply(this,arguments)}return f(o,[{key:"render",value:function(){return this.props.template(this.props.item,this.props.layout)}}]),o}();b(N,"defaultProps",{template:null,item:null,layout:null});var R=function(n){y(h,e);var i=w(h);function h(t){var e;return c(this,h),(e=i.call(this,t)).props.onPage||(e.state={first:e.props.first,rows:e.props.rows}),e.sortChange=!1,e.onPageChange=e.onPageChange.bind(g(e)),e}return f(h,[{key:"getItemRenderKey",value:function(t){return this.props.dataKey?a.resolveFieldData(t,this.props.dataKey):null}},{key:"getTotalRecords",value:function(){return this.props.totalRecords?this.props.totalRecords:this.props.value?this.props.value.length:0}},{key:"createPaginator",value:function(e){var n=o("p-paginator-"+e,this.props.paginatorClassName),a=this.props.onPage?this.props.first:this.state.first,i=this.props.onPage?this.props.rows:this.state.rows,s=this.getTotalRecords();return t.createElement(r,{first:a,rows:i,pageLinkSize:this.props.pageLinkSize,className:n,onPageChange:this.onPageChange,template:this.props.paginatorTemplate,totalRecords:s,rowsPerPageOptions:this.props.rowsPerPageOptions,currentPageReportTemplate:this.props.currentPageReportTemplate,leftContent:this.props.paginatorLeft,rightContent:this.props.paginatorRight,alwaysShow:this.props.alwaysShowPaginator,dropdownAppendTo:this.props.paginatorDropdownAppendTo})}},{key:"onPageChange",value:function(t){this.props.onPage?this.props.onPage(t):this.setState({first:t.first,rows:t.rows})}},{key:"isEmpty",value:function(){return!this.props.value||0===this.props.value.length}},{key:"sort",value:function(){var t,e=this;if(this.props.value){var r=s(t=this.props.value)||l(t)||p(t)||u();return r.sort((function(t,r){var o=a.resolveFieldData(t,e.props.sortField),n=a.resolveFieldData(r,e.props.sortField),i=null;return i=null==o&&null!=n?-1:null!=o&&null==n?1:null==o&&null==n?0:"string"==typeof o&&"string"==typeof n?o.localeCompare(n,void 0,{numeric:!0}):o<n?-1:o>n?1:0,e.props.sortOrder*i})),r}return null}},{key:"renderLoader",value:function(){if(this.props.loading){var e=o("p-dataview-loading-icon pi-spin",this.props.loadingIcon);return t.createElement("div",{className:"p-dataview-loading-overlay p-component-overlay"},t.createElement("i",{className:e}))}return null}},{key:"renderTopPaginator",value:function(){return!this.props.paginator||"bottom"===this.props.paginatorPosition&&"both"!==this.props.paginatorPosition?null:this.createPaginator("top")}},{key:"renderBottomPaginator",value:function(){return!this.props.paginator||"top"===this.props.paginatorPosition&&"both"!==this.props.paginatorPosition?null:this.createPaginator("bottom")}},{key:"renderEmptyMessage",value:function(){return this.props.loading?null:t.createElement("div",{className:"p-col-12 col-12 p-dataview-emptymessage"},this.props.emptyMessage)}},{key:"renderHeader",value:function(){return this.props.header?t.createElement("div",{className:"p-dataview-header"},this.props.header):null}},{key:"renderFooter",value:function(){return this.props.footer?t.createElement("div",{className:"p-dataview-footer"}," ",this.props.footer):null}},{key:"renderItems",value:function(e){var r=this;if(e&&e.length){if(this.props.paginator){for(var o=this.props.onPage?this.props.rows:this.state.rows,n=this.props.lazy?0:this.props.onPage?this.props.first:this.state.first,a=this.getTotalRecords(),i=Math.min(o+n,a),s=[],l=n;l<i;l++){var p=e[l];p&&s.push(t.createElement(N,{key:this.getItemRenderKey(e)||l,template:this.props.itemTemplate,layout:this.props.layout,item:p}))}return s}return e.map((function(e,o){return t.createElement(N,{key:r.getItemRenderKey(e)||o,template:r.props.itemTemplate,layout:r.props.layout,item:e})}))}return this.renderEmptyMessage()}},{key:"renderContent",value:function(e){var r=this.renderItems(e);return t.createElement("div",{className:"p-dataview-content"},t.createElement("div",{className:"p-grid p-nogutter grid grid-nogutter"},r))}},{key:"processData",value:function(){var t=this.props.value;return t&&t.length&&this.props.sortField&&(t=this.sort()),t}},{key:"render",value:function(){var e=this.processData(),r=o("p-dataview p-component",{"p-dataview-list":"list"===this.props.layout,"p-dataview-grid":"grid"===this.props.layout,"p-dataview-loading":this.props.loading},this.props.className),n=this.renderLoader(),a=this.renderTopPaginator(),i=this.renderBottomPaginator(),s=this.renderHeader(),l=this.renderFooter(),p=this.renderContent(e);return t.createElement("div",{id:this.props.id,style:this.props.style,className:r},n,s,a,p,i,l)}}]),h}();b(R,"defaultProps",{id:null,header:null,footer:null,value:null,layout:"list",dataKey:null,rows:null,first:0,totalRecords:null,paginator:!1,paginatorPosition:"bottom",alwaysShowPaginator:!0,paginatorClassName:null,paginatorTemplate:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown",paginatorLeft:null,paginatorRight:null,paginatorDropdownAppendTo:null,pageLinkSize:5,rowsPerPageOptions:null,currentPageReportTemplate:"({currentPage} of {totalPages})",emptyMessage:"No records found",sortField:null,sortOrder:null,style:null,className:null,lazy:!1,loading:!1,loadingIcon:"pi pi-spinner",itemTemplate:null,onPage:null});export{R as DataView,E as DataViewLayoutOptions};
|
package/dataview/dataview.js
CHANGED
|
@@ -114,6 +114,8 @@ this.primereact.dataview = (function (exports, React, paginator, core) {
|
|
|
114
114
|
function _possibleConstructorReturn(self, call) {
|
|
115
115
|
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
116
116
|
return call;
|
|
117
|
+
} else if (call !== void 0) {
|
|
118
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
117
119
|
}
|
|
118
120
|
|
|
119
121
|
return _assertThisInitialized(self);
|
|
@@ -375,7 +377,7 @@ this.primereact.dataview = (function (exports, React, paginator, core) {
|
|
|
375
377
|
value: function renderEmptyMessage() {
|
|
376
378
|
if (!this.props.loading) {
|
|
377
379
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
378
|
-
className: "p-col-12 p-dataview-emptymessage"
|
|
380
|
+
className: "p-col-12 col-12 p-dataview-emptymessage"
|
|
379
381
|
}, this.props.emptyMessage);
|
|
380
382
|
}
|
|
381
383
|
|
|
@@ -448,7 +450,7 @@ this.primereact.dataview = (function (exports, React, paginator, core) {
|
|
|
448
450
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
449
451
|
className: "p-dataview-content"
|
|
450
452
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
451
|
-
className: "p-grid p-nogutter"
|
|
453
|
+
className: "p-grid p-nogutter grid grid-nogutter"
|
|
452
454
|
}, items));
|
|
453
455
|
}
|
|
454
456
|
}, {
|
package/dataview/dataview.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.dataview=function(t,e,r,n){"use strict";function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var a=o(e);function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function s(t){if(Array.isArray(t))return i(t)}function l(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function p(t,e){if(t){if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}function u(){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 c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function h(t,e,r){return e&&f(t.prototype,e),r&&f(t,r),t}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function g(t,e){return(g=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function y(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&&g(t,e)}function m(t){return(m="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})(t)}function v(t,e){
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.dataview=function(t,e,r,n){"use strict";function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var a=o(e);function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function s(t){if(Array.isArray(t))return i(t)}function l(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function p(t,e){if(t){if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}function u(){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 c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function h(t,e,r){return e&&f(t.prototype,e),r&&f(t,r),t}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function g(t,e){return(g=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function y(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&&g(t,e)}function m(t){return(m="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})(t)}function v(t,e){if(e&&("object"===m(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return d(t)}function b(t){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function P(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function w(t){var e=k();return function(){var r,n=b(t);if(e){var o=b(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return v(this,r)}}function k(){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 N=function(t){y(r,t);var e=w(r);function r(t){var n;return c(this,r),(n=e.call(this,t)).changeLayout=n.changeLayout.bind(d(n)),n}return h(r,[{key:"changeLayout",value:function(t,e){this.props.onChange({originalEvent:t,value:e}),t.preventDefault()}},{key:"render",value:function(){var t=this,e=n.classNames("p-dataview-layout-options p-selectbutton p-buttonset",this.props.className),r=n.classNames("p-button p-button-icon-only",{"p-highlight":"list"===this.props.layout}),o=n.classNames("p-button p-button-icon-only",{"p-highlight":"grid"===this.props.layout});return a.default.createElement("div",{id:this.props.id,style:this.props.style,className:e},a.default.createElement("button",{type:"button",className:r,onClick:function(e){return t.changeLayout(e,"list")}},a.default.createElement("i",{className:"pi pi-bars"}),a.default.createElement(n.Ripple,null)),a.default.createElement("button",{type:"button",className:o,onClick:function(e){return t.changeLayout(e,"grid")}},a.default.createElement("i",{className:"pi pi-th-large"}),a.default.createElement(n.Ripple,null)))}}]),r}(e.Component);P(N,"defaultProps",{id:null,style:null,className:null,layout:null,onChange:null});var E=function(t){y(r,t);var e=w(r);function r(){return c(this,r),e.apply(this,arguments)}return h(r,[{key:"render",value:function(){return this.props.template(this.props.item,this.props.layout)}}]),r}(e.Component);P(E,"defaultProps",{template:null,item:null,layout:null});var R=function(t){y(o,t);var e=w(o);function o(t){var r;return c(this,o),(r=e.call(this,t)).props.onPage||(r.state={first:r.props.first,rows:r.props.rows}),r.sortChange=!1,r.onPageChange=r.onPageChange.bind(d(r)),r}return h(o,[{key:"getItemRenderKey",value:function(t){return this.props.dataKey?n.ObjectUtils.resolveFieldData(t,this.props.dataKey):null}},{key:"getTotalRecords",value:function(){return this.props.totalRecords?this.props.totalRecords:this.props.value?this.props.value.length:0}},{key:"createPaginator",value:function(t){var e=n.classNames("p-paginator-"+t,this.props.paginatorClassName),o=this.props.onPage?this.props.first:this.state.first,i=this.props.onPage?this.props.rows:this.state.rows,s=this.getTotalRecords();return a.default.createElement(r.Paginator,{first:o,rows:i,pageLinkSize:this.props.pageLinkSize,className:e,onPageChange:this.onPageChange,template:this.props.paginatorTemplate,totalRecords:s,rowsPerPageOptions:this.props.rowsPerPageOptions,currentPageReportTemplate:this.props.currentPageReportTemplate,leftContent:this.props.paginatorLeft,rightContent:this.props.paginatorRight,alwaysShow:this.props.alwaysShowPaginator,dropdownAppendTo:this.props.paginatorDropdownAppendTo})}},{key:"onPageChange",value:function(t){this.props.onPage?this.props.onPage(t):this.setState({first:t.first,rows:t.rows})}},{key:"isEmpty",value:function(){return!this.props.value||0===this.props.value.length}},{key:"sort",value:function(){var t,e=this;if(this.props.value){var r=s(t=this.props.value)||l(t)||p(t)||u();return r.sort((function(t,r){var o=n.ObjectUtils.resolveFieldData(t,e.props.sortField),a=n.ObjectUtils.resolveFieldData(r,e.props.sortField),i=null;return i=null==o&&null!=a?-1:null!=o&&null==a?1:null==o&&null==a?0:"string"==typeof o&&"string"==typeof a?o.localeCompare(a,void 0,{numeric:!0}):o<a?-1:o>a?1:0,e.props.sortOrder*i})),r}return null}},{key:"renderLoader",value:function(){if(this.props.loading){var t=n.classNames("p-dataview-loading-icon pi-spin",this.props.loadingIcon);return a.default.createElement("div",{className:"p-dataview-loading-overlay p-component-overlay"},a.default.createElement("i",{className:t}))}return null}},{key:"renderTopPaginator",value:function(){return!this.props.paginator||"bottom"===this.props.paginatorPosition&&"both"!==this.props.paginatorPosition?null:this.createPaginator("top")}},{key:"renderBottomPaginator",value:function(){return!this.props.paginator||"top"===this.props.paginatorPosition&&"both"!==this.props.paginatorPosition?null:this.createPaginator("bottom")}},{key:"renderEmptyMessage",value:function(){return this.props.loading?null:a.default.createElement("div",{className:"p-col-12 col-12 p-dataview-emptymessage"},this.props.emptyMessage)}},{key:"renderHeader",value:function(){return this.props.header?a.default.createElement("div",{className:"p-dataview-header"},this.props.header):null}},{key:"renderFooter",value:function(){return this.props.footer?a.default.createElement("div",{className:"p-dataview-footer"}," ",this.props.footer):null}},{key:"renderItems",value:function(t){var e=this;if(t&&t.length){if(this.props.paginator){for(var r=this.props.onPage?this.props.rows:this.state.rows,n=this.props.lazy?0:this.props.onPage?this.props.first:this.state.first,o=this.getTotalRecords(),i=Math.min(r+n,o),s=[],l=n;l<i;l++){var p=t[l];p&&s.push(a.default.createElement(E,{key:this.getItemRenderKey(t)||l,template:this.props.itemTemplate,layout:this.props.layout,item:p}))}return s}return t.map((function(t,r){return a.default.createElement(E,{key:e.getItemRenderKey(t)||r,template:e.props.itemTemplate,layout:e.props.layout,item:t})}))}return this.renderEmptyMessage()}},{key:"renderContent",value:function(t){var e=this.renderItems(t);return a.default.createElement("div",{className:"p-dataview-content"},a.default.createElement("div",{className:"p-grid p-nogutter grid grid-nogutter"},e))}},{key:"processData",value:function(){var t=this.props.value;return t&&t.length&&this.props.sortField&&(t=this.sort()),t}},{key:"render",value:function(){var t=this.processData(),e=n.classNames("p-dataview p-component",{"p-dataview-list":"list"===this.props.layout,"p-dataview-grid":"grid"===this.props.layout,"p-dataview-loading":this.props.loading},this.props.className),r=this.renderLoader(),o=this.renderTopPaginator(),i=this.renderBottomPaginator(),s=this.renderHeader(),l=this.renderFooter(),p=this.renderContent(t);return a.default.createElement("div",{id:this.props.id,style:this.props.style,className:e},r,s,o,p,i,l)}}]),o}(e.Component);return P(R,"defaultProps",{id:null,header:null,footer:null,value:null,layout:"list",dataKey:null,rows:null,first:0,totalRecords:null,paginator:!1,paginatorPosition:"bottom",alwaysShowPaginator:!0,paginatorClassName:null,paginatorTemplate:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown",paginatorLeft:null,paginatorRight:null,paginatorDropdownAppendTo:null,pageLinkSize:5,rowsPerPageOptions:null,currentPageReportTemplate:"({currentPage} of {totalPages})",emptyMessage:"No records found",sortField:null,sortOrder:null,style:null,className:null,lazy:!1,loading:!1,loadingIcon:"pi pi-spinner",itemTemplate:null,onPage:null}),t.DataView=R,t.DataViewLayoutOptions=N,Object.defineProperty(t,"__esModule",{value:!0}),t}({},React,primereact.paginator,primereact.core);
|
|
@@ -81,6 +81,8 @@ function _assertThisInitialized(self) {
|
|
|
81
81
|
function _possibleConstructorReturn(self, call) {
|
|
82
82
|
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
83
83
|
return call;
|
|
84
|
+
} else if (call !== void 0) {
|
|
85
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
84
86
|
}
|
|
85
87
|
|
|
86
88
|
return _assertThisInitialized(self);
|
|
@@ -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})(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})(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)})(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(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(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})(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){
|
|
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})(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})(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)})(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);
|
|
@@ -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})(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})(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)})(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
|
@@ -117,6 +117,8 @@ function _typeof(obj) {
|
|
|
117
117
|
function _possibleConstructorReturn(self, call) {
|
|
118
118
|
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
119
119
|
return call;
|
|
120
|
+
} else if (call !== void 0) {
|
|
121
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
120
122
|
}
|
|
121
123
|
|
|
122
124
|
return _assertThisInitialized(self);
|
|
@@ -175,6 +177,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
175
177
|
_this.onMaskClick = _this.onMaskClick.bind(_assertThisInitialized(_this));
|
|
176
178
|
_this.onEnter = _this.onEnter.bind(_assertThisInitialized(_this));
|
|
177
179
|
_this.onEntered = _this.onEntered.bind(_assertThisInitialized(_this));
|
|
180
|
+
_this.onExiting = _this.onExiting.bind(_assertThisInitialized(_this));
|
|
178
181
|
_this.onExited = _this.onExited.bind(_assertThisInitialized(_this));
|
|
179
182
|
_this.attributeSelector = core.UniqueComponentId();
|
|
180
183
|
_this.dialogRef = /*#__PURE__*/React__default['default'].createRef();
|
|
@@ -413,6 +416,13 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
413
416
|
|
|
414
417
|
this.enableDocumentSettings();
|
|
415
418
|
}
|
|
419
|
+
}, {
|
|
420
|
+
key: "onExiting",
|
|
421
|
+
value: function onExiting() {
|
|
422
|
+
if (this.props.modal) {
|
|
423
|
+
core.DomHandler.addClass(this.mask, 'p-component-overlay-leave');
|
|
424
|
+
}
|
|
425
|
+
}
|
|
416
426
|
}, {
|
|
417
427
|
key: "onExited",
|
|
418
428
|
value: function onExited() {
|
|
@@ -771,7 +781,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
771
781
|
'p-dialog-maximized': this.maximized
|
|
772
782
|
});
|
|
773
783
|
var maskClassName = core.classNames('p-dialog-mask', {
|
|
774
|
-
'p-component-overlay': this.props.modal,
|
|
784
|
+
'p-component-overlay p-component-overlay-enter': this.props.modal,
|
|
775
785
|
'p-dialog-visible': this.state.maskVisible,
|
|
776
786
|
'p-dialog-draggable': this.props.draggable,
|
|
777
787
|
'p-dialog-resizable': this.props.resizable
|
|
@@ -799,6 +809,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
799
809
|
unmountOnExit: true,
|
|
800
810
|
onEnter: this.onEnter,
|
|
801
811
|
onEntered: this.onEntered,
|
|
812
|
+
onExiting: this.onExiting,
|
|
802
813
|
onExited: this.onExited
|
|
803
814
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
804
815
|
ref: this.dialogRef,
|
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}),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":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/core");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=i(e);function o(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 s(e){if(Array.isArray(e))return o(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 o(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)?o(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){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return c(e)}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 o,p,h,y,v,E=(o=k,p=b(),function(){var e,t=f(o);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.onExiting=i.onExiting.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),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.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 o=n.primeDialogParams,s=o.length,a=o[s-1]?o[s-1].id:void 0;if(a===e.state.id){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(s(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(),o=this.renderMaximizeIcon(),s=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"},s,o,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}),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(),r=this.renderFooter(),l=this.renderResizer();return n.default.createElement("div",{ref:function(t){return e.mask=t},className:o,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,onExiting:this.onExiting,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},s,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;
|
package/dialog/dialog.esm.js
CHANGED
|
@@ -109,6 +109,8 @@ function _typeof(obj) {
|
|
|
109
109
|
function _possibleConstructorReturn(self, call) {
|
|
110
110
|
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
111
111
|
return call;
|
|
112
|
+
} else if (call !== void 0) {
|
|
113
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
112
114
|
}
|
|
113
115
|
|
|
114
116
|
return _assertThisInitialized(self);
|
|
@@ -167,6 +169,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
167
169
|
_this.onMaskClick = _this.onMaskClick.bind(_assertThisInitialized(_this));
|
|
168
170
|
_this.onEnter = _this.onEnter.bind(_assertThisInitialized(_this));
|
|
169
171
|
_this.onEntered = _this.onEntered.bind(_assertThisInitialized(_this));
|
|
172
|
+
_this.onExiting = _this.onExiting.bind(_assertThisInitialized(_this));
|
|
170
173
|
_this.onExited = _this.onExited.bind(_assertThisInitialized(_this));
|
|
171
174
|
_this.attributeSelector = UniqueComponentId();
|
|
172
175
|
_this.dialogRef = /*#__PURE__*/React.createRef();
|
|
@@ -405,6 +408,13 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
405
408
|
|
|
406
409
|
this.enableDocumentSettings();
|
|
407
410
|
}
|
|
411
|
+
}, {
|
|
412
|
+
key: "onExiting",
|
|
413
|
+
value: function onExiting() {
|
|
414
|
+
if (this.props.modal) {
|
|
415
|
+
DomHandler.addClass(this.mask, 'p-component-overlay-leave');
|
|
416
|
+
}
|
|
417
|
+
}
|
|
408
418
|
}, {
|
|
409
419
|
key: "onExited",
|
|
410
420
|
value: function onExited() {
|
|
@@ -763,7 +773,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
763
773
|
'p-dialog-maximized': this.maximized
|
|
764
774
|
});
|
|
765
775
|
var maskClassName = classNames('p-dialog-mask', {
|
|
766
|
-
'p-component-overlay': this.props.modal,
|
|
776
|
+
'p-component-overlay p-component-overlay-enter': this.props.modal,
|
|
767
777
|
'p-dialog-visible': this.state.maskVisible,
|
|
768
778
|
'p-dialog-draggable': this.props.draggable,
|
|
769
779
|
'p-dialog-resizable': this.props.resizable
|
|
@@ -791,6 +801,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
791
801
|
unmountOnExit: true,
|
|
792
802
|
onEnter: this.onEnter,
|
|
793
803
|
onEntered: this.onEntered,
|
|
804
|
+
onExiting: this.onExiting,
|
|
794
805
|
onExited: this.onExited
|
|
795
806
|
}, /*#__PURE__*/React.createElement("div", {
|
|
796
807
|
ref: this.dialogRef,
|