primereact 6.5.1 → 7.0.0-rc.2
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 +346 -434
- package/core/core.cjs.min.js +1 -1
- package/core/core.esm.js +347 -434
- package/core/core.esm.min.js +1 -1
- package/core/core.js +346 -434
- 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 +6 -1
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.esm.js +6 -1
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +6 -1
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +4821 -3348
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +97 -28
- package/datatable/datatable.esm.js +4821 -3349
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +4819 -3350
- 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 +14 -10
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +16 -12
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +14 -10
- 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.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 +12325 -9901
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +12321 -9901
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +12325 -9901
- 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 +405 -150
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +305 -880
- package/resources/themes/arya-green/theme.css +305 -880
- package/resources/themes/arya-orange/theme.css +305 -880
- package/resources/themes/arya-purple/theme.css +305 -880
- package/resources/themes/bootstrap4-dark-blue/theme.css +310 -885
- package/resources/themes/bootstrap4-dark-purple/theme.css +310 -885
- package/resources/themes/bootstrap4-light-blue/theme.css +310 -885
- package/resources/themes/bootstrap4-light-purple/theme.css +310 -885
- package/resources/themes/fluent-light/theme.css +314 -889
- package/resources/themes/luna-amber/theme.css +309 -884
- package/resources/themes/luna-blue/theme.css +309 -884
- package/resources/themes/luna-green/theme.css +309 -884
- package/resources/themes/luna-pink/theme.css +309 -884
- package/resources/themes/md-dark-deeppurple/theme.css +348 -1184
- package/resources/themes/md-dark-indigo/theme.css +348 -1184
- package/resources/themes/md-light-deeppurple/theme.css +351 -1187
- package/resources/themes/md-light-indigo/theme.css +351 -1187
- package/resources/themes/mdc-dark-deeppurple/theme.css +348 -1184
- package/resources/themes/mdc-dark-indigo/theme.css +348 -1184
- package/resources/themes/mdc-light-deeppurple/theme.css +351 -1187
- package/resources/themes/mdc-light-indigo/theme.css +351 -1187
- package/resources/themes/nova/theme.css +307 -882
- package/resources/themes/nova-accent/theme.css +307 -882
- package/resources/themes/nova-alt/theme.css +307 -882
- package/resources/themes/rhea/theme.css +306 -881
- package/resources/themes/saga-blue/theme.css +307 -882
- package/resources/themes/saga-green/theme.css +307 -882
- package/resources/themes/saga-orange/theme.css +307 -882
- package/resources/themes/saga-purple/theme.css +307 -882
- 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 +305 -880
- package/resources/themes/vela-green/theme.css +305 -880
- package/resources/themes/vela-orange/theme.css +305 -880
- package/resources/themes/vela-purple/theme.css +305 -880
- 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.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/styleclass.cjs.js +19 -23
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.esm.js +20 -24
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +19 -23
- package/styleclass/styleclass.min.js +1 -1
- 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.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 +2 -0
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +1 -1
- package/toast/toast.esm.js +2 -0
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +2 -0
- 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/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 +96 -29
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import { classNames, Ripple, ObjectUtils } from 'primereact/core';
|
|
3
3
|
import { Dropdown } from 'primereact/dropdown';
|
|
4
|
+
import { InputNumber } from 'primereact/inputnumber';
|
|
4
5
|
|
|
5
6
|
function _arrayWithHoles(arr) {
|
|
6
7
|
if (Array.isArray(arr)) return arr;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
function _iterableToArrayLimit(arr, i) {
|
|
10
|
-
var _i = arr
|
|
11
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
11
12
|
|
|
12
13
|
if (_i == null) return;
|
|
13
14
|
var _arr = [];
|
|
@@ -136,6 +137,8 @@ function _inherits(subClass, superClass) {
|
|
|
136
137
|
function _possibleConstructorReturn(self, call) {
|
|
137
138
|
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
138
139
|
return call;
|
|
140
|
+
} else if (call !== void 0) {
|
|
141
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
139
142
|
}
|
|
140
143
|
|
|
141
144
|
return _assertThisInitialized(self);
|
|
@@ -163,13 +166,13 @@ function _defineProperty(obj, key, value) {
|
|
|
163
166
|
return obj;
|
|
164
167
|
}
|
|
165
168
|
|
|
166
|
-
function _createSuper$
|
|
169
|
+
function _createSuper$8(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$8(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
167
170
|
|
|
168
|
-
function _isNativeReflectConstruct$
|
|
171
|
+
function _isNativeReflectConstruct$8() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
169
172
|
var FirstPageLink = /*#__PURE__*/function (_Component) {
|
|
170
173
|
_inherits(FirstPageLink, _Component);
|
|
171
174
|
|
|
172
|
-
var _super = _createSuper$
|
|
175
|
+
var _super = _createSuper$8(FirstPageLink);
|
|
173
176
|
|
|
174
177
|
function FirstPageLink() {
|
|
175
178
|
_classCallCheck(this, FirstPageLink);
|
|
@@ -218,13 +221,13 @@ _defineProperty(FirstPageLink, "defaultProps", {
|
|
|
218
221
|
template: null
|
|
219
222
|
});
|
|
220
223
|
|
|
221
|
-
function _createSuper$
|
|
224
|
+
function _createSuper$7(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$7(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
222
225
|
|
|
223
|
-
function _isNativeReflectConstruct$
|
|
226
|
+
function _isNativeReflectConstruct$7() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
224
227
|
var NextPageLink = /*#__PURE__*/function (_Component) {
|
|
225
228
|
_inherits(NextPageLink, _Component);
|
|
226
229
|
|
|
227
|
-
var _super = _createSuper$
|
|
230
|
+
var _super = _createSuper$7(NextPageLink);
|
|
228
231
|
|
|
229
232
|
function NextPageLink() {
|
|
230
233
|
_classCallCheck(this, NextPageLink);
|
|
@@ -273,13 +276,13 @@ _defineProperty(NextPageLink, "defaultProps", {
|
|
|
273
276
|
template: null
|
|
274
277
|
});
|
|
275
278
|
|
|
276
|
-
function _createSuper$
|
|
279
|
+
function _createSuper$6(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$6(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
277
280
|
|
|
278
|
-
function _isNativeReflectConstruct$
|
|
281
|
+
function _isNativeReflectConstruct$6() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
279
282
|
var PrevPageLink = /*#__PURE__*/function (_Component) {
|
|
280
283
|
_inherits(PrevPageLink, _Component);
|
|
281
284
|
|
|
282
|
-
var _super = _createSuper$
|
|
285
|
+
var _super = _createSuper$6(PrevPageLink);
|
|
283
286
|
|
|
284
287
|
function PrevPageLink() {
|
|
285
288
|
_classCallCheck(this, PrevPageLink);
|
|
@@ -328,13 +331,13 @@ _defineProperty(PrevPageLink, "defaultProps", {
|
|
|
328
331
|
template: null
|
|
329
332
|
});
|
|
330
333
|
|
|
331
|
-
function _createSuper$
|
|
334
|
+
function _createSuper$5(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$5(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
332
335
|
|
|
333
|
-
function _isNativeReflectConstruct$
|
|
336
|
+
function _isNativeReflectConstruct$5() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
334
337
|
var LastPageLink = /*#__PURE__*/function (_Component) {
|
|
335
338
|
_inherits(LastPageLink, _Component);
|
|
336
339
|
|
|
337
|
-
var _super = _createSuper$
|
|
340
|
+
var _super = _createSuper$5(LastPageLink);
|
|
338
341
|
|
|
339
342
|
function LastPageLink() {
|
|
340
343
|
_classCallCheck(this, LastPageLink);
|
|
@@ -383,13 +386,13 @@ _defineProperty(LastPageLink, "defaultProps", {
|
|
|
383
386
|
template: null
|
|
384
387
|
});
|
|
385
388
|
|
|
386
|
-
function _createSuper$
|
|
389
|
+
function _createSuper$4(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$4(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
387
390
|
|
|
388
|
-
function _isNativeReflectConstruct$
|
|
391
|
+
function _isNativeReflectConstruct$4() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
389
392
|
var PageLinks = /*#__PURE__*/function (_Component) {
|
|
390
393
|
_inherits(PageLinks, _Component);
|
|
391
394
|
|
|
392
|
-
var _super = _createSuper$
|
|
395
|
+
var _super = _createSuper$4(PageLinks);
|
|
393
396
|
|
|
394
397
|
function PageLinks() {
|
|
395
398
|
_classCallCheck(this, PageLinks);
|
|
@@ -476,13 +479,13 @@ _defineProperty(PageLinks, "defaultProps", {
|
|
|
476
479
|
template: null
|
|
477
480
|
});
|
|
478
481
|
|
|
479
|
-
function _createSuper$
|
|
482
|
+
function _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$3(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
480
483
|
|
|
481
|
-
function _isNativeReflectConstruct$
|
|
484
|
+
function _isNativeReflectConstruct$3() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
482
485
|
var RowsPerPageDropdown = /*#__PURE__*/function (_Component) {
|
|
483
486
|
_inherits(RowsPerPageDropdown, _Component);
|
|
484
487
|
|
|
485
|
-
var _super = _createSuper$
|
|
488
|
+
var _super = _createSuper$3(RowsPerPageDropdown);
|
|
486
489
|
|
|
487
490
|
function RowsPerPageDropdown() {
|
|
488
491
|
_classCallCheck(this, RowsPerPageDropdown);
|
|
@@ -509,7 +512,8 @@ var RowsPerPageDropdown = /*#__PURE__*/function (_Component) {
|
|
|
509
512
|
value: this.props.value,
|
|
510
513
|
options: options,
|
|
511
514
|
onChange: this.props.onChange,
|
|
512
|
-
appendTo: this.props.appendTo
|
|
515
|
+
appendTo: this.props.appendTo,
|
|
516
|
+
disabled: this.props.disabled
|
|
513
517
|
}) : null;
|
|
514
518
|
|
|
515
519
|
if (this.props.template) {
|
|
@@ -521,6 +525,7 @@ var RowsPerPageDropdown = /*#__PURE__*/function (_Component) {
|
|
|
521
525
|
currentPage: this.props.page,
|
|
522
526
|
totalPages: this.props.pageCount,
|
|
523
527
|
totalRecords: this.props.totalRecords,
|
|
528
|
+
disabled: this.props.disabled,
|
|
524
529
|
element: element,
|
|
525
530
|
props: this.props
|
|
526
531
|
};
|
|
@@ -542,20 +547,21 @@ _defineProperty(RowsPerPageDropdown, "defaultProps", {
|
|
|
542
547
|
totalRecords: 0,
|
|
543
548
|
appendTo: null,
|
|
544
549
|
onChange: null,
|
|
545
|
-
template: null
|
|
550
|
+
template: null,
|
|
551
|
+
disabled: false
|
|
546
552
|
});
|
|
547
553
|
|
|
548
554
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
549
555
|
|
|
550
556
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
551
557
|
|
|
552
|
-
function _createSuper$
|
|
558
|
+
function _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
553
559
|
|
|
554
|
-
function _isNativeReflectConstruct$
|
|
560
|
+
function _isNativeReflectConstruct$2() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
555
561
|
var CurrentPageReport = /*#__PURE__*/function (_Component) {
|
|
556
562
|
_inherits(CurrentPageReport, _Component);
|
|
557
563
|
|
|
558
|
-
var _super = _createSuper$
|
|
564
|
+
var _super = _createSuper$2(CurrentPageReport);
|
|
559
565
|
|
|
560
566
|
function CurrentPageReport() {
|
|
561
567
|
_classCallCheck(this, CurrentPageReport);
|
|
@@ -606,6 +612,70 @@ _defineProperty(CurrentPageReport, "defaultProps", {
|
|
|
606
612
|
template: null
|
|
607
613
|
});
|
|
608
614
|
|
|
615
|
+
function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
616
|
+
|
|
617
|
+
function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
618
|
+
var JumpToPageInput = /*#__PURE__*/function (_Component) {
|
|
619
|
+
_inherits(JumpToPageInput, _Component);
|
|
620
|
+
|
|
621
|
+
var _super = _createSuper$1(JumpToPageInput);
|
|
622
|
+
|
|
623
|
+
function JumpToPageInput(props) {
|
|
624
|
+
var _this;
|
|
625
|
+
|
|
626
|
+
_classCallCheck(this, JumpToPageInput);
|
|
627
|
+
|
|
628
|
+
_this = _super.call(this, props);
|
|
629
|
+
_this.onChange = _this.onChange.bind(_assertThisInitialized(_this));
|
|
630
|
+
return _this;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
_createClass(JumpToPageInput, [{
|
|
634
|
+
key: "onChange",
|
|
635
|
+
value: function onChange(event) {
|
|
636
|
+
if (this.props.onChange) {
|
|
637
|
+
this.props.onChange(this.props.rows * (event.value - 1), this.props.rows);
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
}, {
|
|
641
|
+
key: "render",
|
|
642
|
+
value: function render() {
|
|
643
|
+
var value = this.props.pageCount > 0 ? this.props.page + 1 : 0;
|
|
644
|
+
var element = /*#__PURE__*/React.createElement(InputNumber, {
|
|
645
|
+
value: value,
|
|
646
|
+
onChange: this.onChange,
|
|
647
|
+
className: "p-paginator-page-input",
|
|
648
|
+
disabled: this.props.disabled
|
|
649
|
+
});
|
|
650
|
+
|
|
651
|
+
if (this.props.template) {
|
|
652
|
+
var defaultOptions = {
|
|
653
|
+
value: value,
|
|
654
|
+
onChange: this.onChange,
|
|
655
|
+
disabled: this.props.disabled,
|
|
656
|
+
className: 'p-paginator-page-input',
|
|
657
|
+
element: element,
|
|
658
|
+
props: this.props
|
|
659
|
+
};
|
|
660
|
+
return ObjectUtils.getJSXElement(this.props.template, defaultOptions);
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
return element;
|
|
664
|
+
}
|
|
665
|
+
}]);
|
|
666
|
+
|
|
667
|
+
return JumpToPageInput;
|
|
668
|
+
}(Component);
|
|
669
|
+
|
|
670
|
+
_defineProperty(JumpToPageInput, "defaultProps", {
|
|
671
|
+
page: null,
|
|
672
|
+
rows: null,
|
|
673
|
+
pageCount: null,
|
|
674
|
+
disabled: false,
|
|
675
|
+
template: null,
|
|
676
|
+
onChange: null
|
|
677
|
+
});
|
|
678
|
+
|
|
609
679
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
610
680
|
|
|
611
681
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
@@ -625,6 +695,7 @@ var Paginator = /*#__PURE__*/function (_Component) {
|
|
|
625
695
|
_this.changePageToNext = _this.changePageToNext.bind(_assertThisInitialized(_this));
|
|
626
696
|
_this.changePageToLast = _this.changePageToLast.bind(_assertThisInitialized(_this));
|
|
627
697
|
_this.onRowsChange = _this.onRowsChange.bind(_assertThisInitialized(_this));
|
|
698
|
+
_this.changePage = _this.changePage.bind(_assertThisInitialized(_this));
|
|
628
699
|
_this.onPageLinkClick = _this.onPageLinkClick.bind(_assertThisInitialized(_this));
|
|
629
700
|
return _this;
|
|
630
701
|
}
|
|
@@ -642,7 +713,7 @@ var Paginator = /*#__PURE__*/function (_Component) {
|
|
|
642
713
|
}, {
|
|
643
714
|
key: "getPageCount",
|
|
644
715
|
value: function getPageCount() {
|
|
645
|
-
return Math.ceil(this.props.totalRecords / this.props.rows)
|
|
716
|
+
return Math.ceil(this.props.totalRecords / this.props.rows);
|
|
646
717
|
}
|
|
647
718
|
}, {
|
|
648
719
|
key: "calculatePageLinkBoundaries",
|
|
@@ -695,6 +766,12 @@ var Paginator = /*#__PURE__*/function (_Component) {
|
|
|
695
766
|
value: function getPage() {
|
|
696
767
|
return Math.floor(this.props.first / this.props.rows);
|
|
697
768
|
}
|
|
769
|
+
}, {
|
|
770
|
+
key: "empty",
|
|
771
|
+
value: function empty() {
|
|
772
|
+
var pageCount = this.getPageCount();
|
|
773
|
+
return pageCount === 0;
|
|
774
|
+
}
|
|
698
775
|
}, {
|
|
699
776
|
key: "changePageToFirst",
|
|
700
777
|
value: function changePageToFirst(event) {
|
|
@@ -752,7 +829,7 @@ var Paginator = /*#__PURE__*/function (_Component) {
|
|
|
752
829
|
element = /*#__PURE__*/React.createElement(FirstPageLink, {
|
|
753
830
|
key: key,
|
|
754
831
|
onClick: this.changePageToFirst,
|
|
755
|
-
disabled: this.isFirstPage(),
|
|
832
|
+
disabled: this.isFirstPage() || this.empty(),
|
|
756
833
|
template: template
|
|
757
834
|
});
|
|
758
835
|
break;
|
|
@@ -761,7 +838,7 @@ var Paginator = /*#__PURE__*/function (_Component) {
|
|
|
761
838
|
element = /*#__PURE__*/React.createElement(PrevPageLink, {
|
|
762
839
|
key: key,
|
|
763
840
|
onClick: this.changePageToPrev,
|
|
764
|
-
disabled: this.isFirstPage(),
|
|
841
|
+
disabled: this.isFirstPage() || this.empty(),
|
|
765
842
|
template: template
|
|
766
843
|
});
|
|
767
844
|
break;
|
|
@@ -770,7 +847,7 @@ var Paginator = /*#__PURE__*/function (_Component) {
|
|
|
770
847
|
element = /*#__PURE__*/React.createElement(NextPageLink, {
|
|
771
848
|
key: key,
|
|
772
849
|
onClick: this.changePageToNext,
|
|
773
|
-
disabled: this.isLastPage(),
|
|
850
|
+
disabled: this.isLastPage() || this.empty(),
|
|
774
851
|
template: template
|
|
775
852
|
});
|
|
776
853
|
break;
|
|
@@ -779,7 +856,7 @@ var Paginator = /*#__PURE__*/function (_Component) {
|
|
|
779
856
|
element = /*#__PURE__*/React.createElement(LastPageLink, {
|
|
780
857
|
key: key,
|
|
781
858
|
onClick: this.changePageToLast,
|
|
782
|
-
disabled: this.isLastPage(),
|
|
859
|
+
disabled: this.isLastPage() || this.empty(),
|
|
783
860
|
template: template
|
|
784
861
|
});
|
|
785
862
|
break;
|
|
@@ -806,7 +883,8 @@ var Paginator = /*#__PURE__*/function (_Component) {
|
|
|
806
883
|
options: this.props.rowsPerPageOptions,
|
|
807
884
|
onChange: this.onRowsChange,
|
|
808
885
|
appendTo: this.props.dropdownAppendTo,
|
|
809
|
-
template: template
|
|
886
|
+
template: template,
|
|
887
|
+
disabled: this.empty()
|
|
810
888
|
});
|
|
811
889
|
break;
|
|
812
890
|
|
|
@@ -823,6 +901,18 @@ var Paginator = /*#__PURE__*/function (_Component) {
|
|
|
823
901
|
});
|
|
824
902
|
break;
|
|
825
903
|
|
|
904
|
+
case 'JumpToPageInput':
|
|
905
|
+
element = /*#__PURE__*/React.createElement(JumpToPageInput, {
|
|
906
|
+
key: key,
|
|
907
|
+
rows: this.props.rows,
|
|
908
|
+
page: this.getPage(),
|
|
909
|
+
pageCount: this.getPageCount(),
|
|
910
|
+
onChange: this.changePage,
|
|
911
|
+
disabled: this.empty(),
|
|
912
|
+
template: template
|
|
913
|
+
});
|
|
914
|
+
break;
|
|
915
|
+
|
|
826
916
|
default:
|
|
827
917
|
element = null;
|
|
828
918
|
break;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{Component as t}from"react";import{classNames as r,Ripple as n,ObjectUtils as o}from"primereact/core";import{Dropdown as a}from"primereact/dropdown";function s(e){if(Array.isArray(e))return e}function i(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=r){var n,o,a=[],s=!0,i=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,o=e}finally{try{s||null==r.return||r.return()}finally{if(i)throw o}}return a}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){if(e){if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}function c(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e){return(u="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 f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function g(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),e}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}function v(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?d(e):t}function P(e){return(P=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}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(e){return!1}}var C=function(a){y(l,t);var s,i,p=(s=l,i=k(),function(){var e,t=P(s);if(i){var r=P(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return v(this,e)});function l(){return f(this,l),p.apply(this,arguments)}return g(l,[{key:"render",value:function(){var t=r("p-paginator-first p-paginator-element p-link",{"p-disabled":this.props.disabled}),a="p-paginator-icon pi pi-angle-double-left",s=e.createElement("button",{type:"button",className:t,onClick:this.props.onClick,disabled:this.props.disabled},e.createElement("span",{className:a}),e.createElement(n,null));return this.props.template?o.getJSXElement(this.props.template,{onClick:this.props.onClick,className:t,iconClassName:a,disabled:this.props.disabled,element:s,props:this.props}):s}}]),l}();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(e){return!1}}b(C,"defaultProps",{disabled:!1,onClick:null,template:null});var R=function(a){y(l,t);var s,i,p=(s=l,i=w(),function(){var e,t=P(s);if(i){var r=P(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return v(this,e)});function l(){return f(this,l),p.apply(this,arguments)}return g(l,[{key:"render",value:function(){var t=r("p-paginator-next p-paginator-element p-link",{"p-disabled":this.props.disabled}),a="p-paginator-icon pi pi-angle-right",s=e.createElement("button",{type:"button",className:t,onClick:this.props.onClick,disabled:this.props.disabled},e.createElement("span",{className:a}),e.createElement(n,null));return this.props.template?o.getJSXElement(this.props.template,{onClick:this.props.onClick,className:t,iconClassName:a,disabled:this.props.disabled,element:s,props:this.props}):s}}]),l}();function E(){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}}b(R,"defaultProps",{disabled:!1,onClick:null,template:null});var O=function(a){y(l,t);var s,i,p=(s=l,i=E(),function(){var e,t=P(s);if(i){var r=P(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return v(this,e)});function l(){return f(this,l),p.apply(this,arguments)}return g(l,[{key:"render",value:function(){var t=r("p-paginator-prev p-paginator-element p-link",{"p-disabled":this.props.disabled}),a="p-paginator-icon pi pi-angle-left",s=e.createElement("button",{type:"button",className:t,onClick:this.props.onClick,disabled:this.props.disabled},e.createElement("span",{className:a}),e.createElement(n,null));return this.props.template?o.getJSXElement(this.props.template,{onClick:this.props.onClick,className:t,iconClassName:a,disabled:this.props.disabled,element:s,props:this.props}):s}}]),l}();function L(){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}}b(O,"defaultProps",{disabled:!1,onClick:null,template:null});var N=function(a){y(l,t);var s,i,p=(s=l,i=L(),function(){var e,t=P(s);if(i){var r=P(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return v(this,e)});function l(){return f(this,l),p.apply(this,arguments)}return g(l,[{key:"render",value:function(){var t=r("p-paginator-last p-paginator-element p-link",{"p-disabled":this.props.disabled}),a="p-paginator-icon pi pi-angle-double-right",s=e.createElement("button",{type:"button",className:t,onClick:this.props.onClick,disabled:this.props.disabled},e.createElement("span",{className:a}),e.createElement(n,null));return this.props.template?o.getJSXElement(this.props.template,{onClick:this.props.onClick,className:t,iconClassName:a,disabled:this.props.disabled,element:s,props:this.props}):s}}]),l}();function T(){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}}b(N,"defaultProps",{disabled:!1,onClick:null,template:null});var S=function(a){y(l,t);var s,i,p=(s=l,i=T(),function(){var e,t=P(s);if(i){var r=P(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return v(this,e)});function l(){return f(this,l),p.apply(this,arguments)}return g(l,[{key:"onPageLinkClick",value:function(e,t){this.props.onClick&&this.props.onClick({originalEvent:e,value:t}),e.preventDefault()}},{key:"render",value:function(){var t,a=this;if(this.props.value){var s=this.props.value[0],i=this.props.value[this.props.value.length-1];t=this.props.value.map((function(t,p){var l=r("p-paginator-page p-paginator-element p-link",{"p-paginator-page-start":t===s,"p-paginator-page-end":t===i,"p-highlight":t-1===a.props.page}),c=e.createElement("button",{type:"button",className:l,onClick:function(e){return a.onPageLinkClick(e,t)}},t,e.createElement(n,null));if(a.props.template){var u={onClick:function(e){return a.onPageLinkClick(e,t)},className:l,view:{startPage:s-1,endPage:i-1},page:t-1,currentPage:a.props.page,totalPages:a.props.pageCount,element:c,props:a.props};c=o.getJSXElement(a.props.template,u)}return e.createElement(e.Fragment,{key:t},c)}))}return e.createElement("span",{className:"p-paginator-pages"},t)}}]),l}();function j(){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}}b(S,"defaultProps",{value:null,page:null,rows:null,pageCount:null,links:null,template:null});var x=function(r){y(p,t);var n,s,i=(n=p,s=j(),function(){var e,t=P(n);if(s){var r=P(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return v(this,e)});function p(){return f(this,p),i.apply(this,arguments)}return g(p,[{key:"hasOptions",value:function(){return this.props.options&&this.props.options.length>0}},{key:"render",value:function(){var t=this.hasOptions(),r=t?this.props.options.map((function(e){return{label:String(e),value:e}})):[],n=t?e.createElement(a,{value:this.props.value,options:r,onChange:this.props.onChange,appendTo:this.props.appendTo}):null;return this.props.template?o.getJSXElement(this.props.template,{value:this.props.value,options:r,onChange:this.props.onChange,appendTo:this.props.appendTo,currentPage:this.props.page,totalPages:this.props.pageCount,totalRecords:this.props.totalRecords,element:n,props:this.props}):n}}]),p}();function B(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function D(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?B(Object(r),!0).forEach((function(t){b(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):B(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function M(){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}}b(x,"defaultProps",{options:null,value:null,page:null,pageCount:null,totalRecords:0,appendTo:null,onChange:null,template:null});var F=function(r){y(i,t);var n,a,s=(n=i,a=M(),function(){var e,t=P(n);if(a){var r=P(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return v(this,e)});function i(){return f(this,i),s.apply(this,arguments)}return g(i,[{key:"render",value:function(){var t={currentPage:this.props.page+1,totalPages:this.props.pageCount,first:Math.min(this.props.first+1,this.props.totalRecords),last:Math.min(this.props.first+this.props.rows,this.props.totalRecords),rows:this.props.rows,totalRecords:this.props.totalRecords},r=this.props.reportTemplate.replace("{currentPage}",t.currentPage).replace("{totalPages}",t.totalPages).replace("{first}",t.first).replace("{last}",t.last).replace("{rows}",t.rows).replace("{totalRecords}",t.totalRecords),n=e.createElement("span",{className:"p-paginator-current"},r);if(this.props.template){var a=D(D({},t),{className:"p-paginator-current",element:n,props:this.props});return o.getJSXElement(this.props.template,a)}return n}}]),i}();function J(){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}}b(F,"defaultProps",{pageCount:null,page:null,first:null,rows:null,totalRecords:null,reportTemplate:"({currentPage} of {totalPages})",template:null});var X=function(n){y(m,t);var a,p,h=(a=m,p=J(),function(){var e,t=P(a);if(p){var r=P(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return v(this,e)});function m(e){var t;return f(this,m),(t=h.call(this,e)).changePageToFirst=t.changePageToFirst.bind(d(t)),t.changePageToPrev=t.changePageToPrev.bind(d(t)),t.changePageToNext=t.changePageToNext.bind(d(t)),t.changePageToLast=t.changePageToLast.bind(d(t)),t.onRowsChange=t.onRowsChange.bind(d(t)),t.onPageLinkClick=t.onPageLinkClick.bind(d(t)),t}return g(m,[{key:"isFirstPage",value:function(){return 0===this.getPage()}},{key:"isLastPage",value:function(){return this.getPage()===this.getPageCount()-1}},{key:"getPageCount",value:function(){return Math.ceil(this.props.totalRecords/this.props.rows)||1}},{key:"calculatePageLinkBoundaries",value:function(){var e=this.getPageCount(),t=Math.min(this.props.pageLinkSize,e),r=Math.max(0,Math.ceil(this.getPage()-t/2)),n=Math.min(e-1,r+t-1);return[r=Math.max(0,r-(this.props.pageLinkSize-(n-r+1))),n]}},{key:"updatePageLinks",value:function(){for(var e=[],t=this.calculatePageLinkBoundaries(),r=t[1],n=t[0];n<=r;n++)e.push(n+1);return e}},{key:"changePage",value:function(e,t){var r=this.getPageCount(),n=Math.floor(e/t);n>=0&&n<r&&(this.props.onPageChange&&this.props.onPageChange({first:e,rows:t,page:n,pageCount:r}))}},{key:"getPage",value:function(){return Math.floor(this.props.first/this.props.rows)}},{key:"changePageToFirst",value:function(e){this.changePage(0,this.props.rows),e.preventDefault()}},{key:"changePageToPrev",value:function(e){this.changePage(this.props.first-this.props.rows,this.props.rows),e.preventDefault()}},{key:"onPageLinkClick",value:function(e){this.changePage((e.value-1)*this.props.rows,this.props.rows)}},{key:"changePageToNext",value:function(e){this.changePage(this.props.first+this.props.rows,this.props.rows),e.preventDefault()}},{key:"changePageToLast",value:function(e){this.changePage((this.getPageCount()-1)*this.props.rows,this.props.rows),e.preventDefault()}},{key:"onRowsChange",value:function(e){var t=e.value;this.isRowChanged=t!==this.props.rows,this.changePage(0,t)}},{key:"componentDidUpdate",value:function(e,t){this.props.rows===e.rows||this.isRowChanged?this.getPage()>0&&e.totalRecords!==this.props.totalRecords&&this.props.first>=this.props.totalRecords&&this.changePage((this.getPageCount()-1)*this.props.rows,this.props.rows):this.changePage(0,this.props.rows),this.isRowChanged=!1}},{key:"renderElement",value:function(t,r){var n;switch(t){case"FirstPageLink":n=e.createElement(C,{key:t,onClick:this.changePageToFirst,disabled:this.isFirstPage(),template:r});break;case"PrevPageLink":n=e.createElement(O,{key:t,onClick:this.changePageToPrev,disabled:this.isFirstPage(),template:r});break;case"NextPageLink":n=e.createElement(R,{key:t,onClick:this.changePageToNext,disabled:this.isLastPage(),template:r});break;case"LastPageLink":n=e.createElement(N,{key:t,onClick:this.changePageToLast,disabled:this.isLastPage(),template:r});break;case"PageLinks":n=e.createElement(S,{key:t,value:this.updatePageLinks(),page:this.getPage(),rows:this.props.rows,pageCount:this.getPageCount(),onClick:this.onPageLinkClick,template:r});break;case"RowsPerPageDropdown":n=e.createElement(x,{key:t,value:this.props.rows,page:this.getPage(),pageCount:this.getPageCount(),totalRecords:this.props.totalRecords,options:this.props.rowsPerPageOptions,onChange:this.onRowsChange,appendTo:this.props.dropdownAppendTo,template:r});break;case"CurrentPageReport":n=e.createElement(F,{reportTemplate:this.props.currentPageReportTemplate,key:t,page:this.getPage(),pageCount:this.getPageCount(),first:this.props.first,rows:this.props.rows,totalRecords:this.props.totalRecords,template:r});break;default:n=null}return n}},{key:"renderElements",value:function(){var e=this,t=this.props.template;return t?"object"===u(t)?t.layout?t.layout.split(" ").map((function(r){var n=r.trim();return e.renderElement(n,t[n])})):Object.entries(t).map((function(t){var r,n,o=(n=2,s(r=t)||i(r,n)||l(r,n)||c());return e.renderElement(o[0],o[1])})):t.split(" ").map((function(t){return e.renderElement(t.trim())})):null}},{key:"render",value:function(){if(this.props.alwaysShow||1!==this.getPageCount()){var t=r("p-paginator p-component",this.props.className),n=o.getJSXElement(this.props.leftContent,this.props),a=o.getJSXElement(this.props.rightContent,this.props),s=this.renderElements();return e.createElement("div",{className:t,style:this.props.style},n&&e.createElement("div",{className:"p-paginator-left-content"},n),s,a&&e.createElement("div",{className:"p-paginator-right-content"},a))}return null}}]),m}();b(X,"defaultProps",{totalRecords:0,rows:0,first:0,pageLinkSize:5,rowsPerPageOptions:null,alwaysShow:!0,style:null,className:null,template:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown",onPageChange:null,leftContent:null,rightContent:null,dropdownAppendTo:null,currentPageReportTemplate:"({currentPage} of {totalPages})"});export{X as Paginator};
|
|
1
|
+
import e,{Component as t}from"react";import{classNames as n,Ripple as r,ObjectUtils as o}from"primereact/core";import{Dropdown as a}from"primereact/dropdown";import{InputNumber as s}from"primereact/inputnumber";function i(e){if(Array.isArray(e))return e}function p(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],s=!0,i=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);s=!0);}catch(e){i=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(i)throw o}}return a}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function u(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}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 f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t,n){return t&&g(e.prototype,t),n&&g(e,n),e}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(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&&y(e,t)}function P(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 m(e)}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(){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 w=function(a){v(l,t);var s,i,p=(s=l,i=C(),function(){var e,t=b(s);if(i){var n=b(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return P(this,e)});function l(){return f(this,l),p.apply(this,arguments)}return d(l,[{key:"render",value:function(){var t=n("p-paginator-first p-paginator-element p-link",{"p-disabled":this.props.disabled}),a="p-paginator-icon pi pi-angle-double-left",s=e.createElement("button",{type:"button",className:t,onClick:this.props.onClick,disabled:this.props.disabled},e.createElement("span",{className:a}),e.createElement(r,null));return this.props.template?o.getJSXElement(this.props.template,{onClick:this.props.onClick,className:t,iconClassName:a,disabled:this.props.disabled,element:s,props:this.props}):s}}]),l}();function R(){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}}k(w,"defaultProps",{disabled:!1,onClick:null,template:null});var E=function(a){v(l,t);var s,i,p=(s=l,i=R(),function(){var e,t=b(s);if(i){var n=b(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return P(this,e)});function l(){return f(this,l),p.apply(this,arguments)}return d(l,[{key:"render",value:function(){var t=n("p-paginator-next p-paginator-element p-link",{"p-disabled":this.props.disabled}),a="p-paginator-icon pi pi-angle-right",s=e.createElement("button",{type:"button",className:t,onClick:this.props.onClick,disabled:this.props.disabled},e.createElement("span",{className:a}),e.createElement(r,null));return this.props.template?o.getJSXElement(this.props.template,{onClick:this.props.onClick,className:t,iconClassName:a,disabled:this.props.disabled,element:s,props:this.props}):s}}]),l}();function O(){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}}k(E,"defaultProps",{disabled:!1,onClick:null,template:null});var N=function(a){v(l,t);var s,i,p=(s=l,i=O(),function(){var e,t=b(s);if(i){var n=b(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return P(this,e)});function l(){return f(this,l),p.apply(this,arguments)}return d(l,[{key:"render",value:function(){var t=n("p-paginator-prev p-paginator-element p-link",{"p-disabled":this.props.disabled}),a="p-paginator-icon pi pi-angle-left",s=e.createElement("button",{type:"button",className:t,onClick:this.props.onClick,disabled:this.props.disabled},e.createElement("span",{className:a}),e.createElement(r,null));return this.props.template?o.getJSXElement(this.props.template,{onClick:this.props.onClick,className:t,iconClassName:a,disabled:this.props.disabled,element:s,props:this.props}):s}}]),l}();function T(){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}}k(N,"defaultProps",{disabled:!1,onClick:null,template:null});var L=function(a){v(l,t);var s,i,p=(s=l,i=T(),function(){var e,t=b(s);if(i){var n=b(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return P(this,e)});function l(){return f(this,l),p.apply(this,arguments)}return d(l,[{key:"render",value:function(){var t=n("p-paginator-last p-paginator-element p-link",{"p-disabled":this.props.disabled}),a="p-paginator-icon pi pi-angle-double-right",s=e.createElement("button",{type:"button",className:t,onClick:this.props.onClick,disabled:this.props.disabled},e.createElement("span",{className:a}),e.createElement(r,null));return this.props.template?o.getJSXElement(this.props.template,{onClick:this.props.onClick,className:t,iconClassName:a,disabled:this.props.disabled,element:s,props:this.props}):s}}]),l}();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(e){return!1}}k(L,"defaultProps",{disabled:!1,onClick:null,template:null});var j=function(a){v(l,t);var s,i,p=(s=l,i=S(),function(){var e,t=b(s);if(i){var n=b(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return P(this,e)});function l(){return f(this,l),p.apply(this,arguments)}return d(l,[{key:"onPageLinkClick",value:function(e,t){this.props.onClick&&this.props.onClick({originalEvent:e,value:t}),e.preventDefault()}},{key:"render",value:function(){var t,a=this;if(this.props.value){var s=this.props.value[0],i=this.props.value[this.props.value.length-1];t=this.props.value.map((function(t,p){var l=n("p-paginator-page p-paginator-element p-link",{"p-paginator-page-start":t===s,"p-paginator-page-end":t===i,"p-highlight":t-1===a.props.page}),c=e.createElement("button",{type:"button",className:l,onClick:function(e){return a.onPageLinkClick(e,t)}},t,e.createElement(r,null));if(a.props.template){var u={onClick:function(e){return a.onPageLinkClick(e,t)},className:l,view:{startPage:s-1,endPage:i-1},page:t-1,currentPage:a.props.page,totalPages:a.props.pageCount,element:c,props:a.props};c=o.getJSXElement(a.props.template,u)}return e.createElement(e.Fragment,{key:t},c)}))}return e.createElement("span",{className:"p-paginator-pages"},t)}}]),l}();function x(){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}}k(j,"defaultProps",{value:null,page:null,rows:null,pageCount:null,links:null,template:null});var B=function(n){v(p,t);var r,s,i=(r=p,s=x(),function(){var e,t=b(r);if(s){var n=b(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return P(this,e)});function p(){return f(this,p),i.apply(this,arguments)}return d(p,[{key:"hasOptions",value:function(){return this.props.options&&this.props.options.length>0}},{key:"render",value:function(){var t=this.hasOptions(),n=t?this.props.options.map((function(e){return{label:String(e),value:e}})):[],r=t?e.createElement(a,{value:this.props.value,options:n,onChange:this.props.onChange,appendTo:this.props.appendTo,disabled:this.props.disabled}):null;return this.props.template?o.getJSXElement(this.props.template,{value:this.props.value,options:n,onChange:this.props.onChange,appendTo:this.props.appendTo,currentPage:this.props.page,totalPages:this.props.pageCount,totalRecords:this.props.totalRecords,disabled:this.props.disabled,element:r,props:this.props}):r}}]),p}();function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function M(){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}}k(B,"defaultProps",{options:null,value:null,page:null,pageCount:null,totalRecords:0,appendTo:null,onChange:null,template:null,disabled:!1});var F=function(n){v(i,t);var r,a,s=(r=i,a=M(),function(){var e,t=b(r);if(a){var n=b(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return P(this,e)});function i(){return f(this,i),s.apply(this,arguments)}return d(i,[{key:"render",value:function(){var t={currentPage:this.props.page+1,totalPages:this.props.pageCount,first:Math.min(this.props.first+1,this.props.totalRecords),last:Math.min(this.props.first+this.props.rows,this.props.totalRecords),rows:this.props.rows,totalRecords:this.props.totalRecords},n=this.props.reportTemplate.replace("{currentPage}",t.currentPage).replace("{totalPages}",t.totalPages).replace("{first}",t.first).replace("{last}",t.last).replace("{rows}",t.rows).replace("{totalRecords}",t.totalRecords),r=e.createElement("span",{className:"p-paginator-current"},n);if(this.props.template){var a=J(J({},t),{className:"p-paginator-current",element:r,props:this.props});return o.getJSXElement(this.props.template,a)}return r}}]),i}();function X(){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}}k(F,"defaultProps",{pageCount:null,page:null,first:null,rows:null,totalRecords:null,reportTemplate:"({currentPage} of {totalPages})",template:null});var A=function(n){v(p,t);var r,a,i=(r=p,a=X(),function(){var e,t=b(r);if(a){var n=b(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return P(this,e)});function p(e){var t;return f(this,p),(t=i.call(this,e)).onChange=t.onChange.bind(m(t)),t}return d(p,[{key:"onChange",value:function(e){this.props.onChange&&this.props.onChange(this.props.rows*(e.value-1),this.props.rows)}},{key:"render",value:function(){var t=this.props.pageCount>0?this.props.page+1:0,n=e.createElement(s,{value:t,onChange:this.onChange,className:"p-paginator-page-input",disabled:this.props.disabled});return this.props.template?o.getJSXElement(this.props.template,{value:t,onChange:this.onChange,disabled:this.props.disabled,className:"p-paginator-page-input",element:n,props:this.props}):n}}]),p}();function _(){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}}k(A,"defaultProps",{page:null,rows:null,pageCount:null,disabled:!1,template:null,onChange:null});var I=function(r){v(g,t);var a,s,l=(a=g,s=_(),function(){var e,t=b(a);if(s){var n=b(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return P(this,e)});function g(e){var t;return f(this,g),(t=l.call(this,e)).changePageToFirst=t.changePageToFirst.bind(m(t)),t.changePageToPrev=t.changePageToPrev.bind(m(t)),t.changePageToNext=t.changePageToNext.bind(m(t)),t.changePageToLast=t.changePageToLast.bind(m(t)),t.onRowsChange=t.onRowsChange.bind(m(t)),t.changePage=t.changePage.bind(m(t)),t.onPageLinkClick=t.onPageLinkClick.bind(m(t)),t}return d(g,[{key:"isFirstPage",value:function(){return 0===this.getPage()}},{key:"isLastPage",value:function(){return this.getPage()===this.getPageCount()-1}},{key:"getPageCount",value:function(){return Math.ceil(this.props.totalRecords/this.props.rows)}},{key:"calculatePageLinkBoundaries",value:function(){var e=this.getPageCount(),t=Math.min(this.props.pageLinkSize,e),n=Math.max(0,Math.ceil(this.getPage()-t/2)),r=Math.min(e-1,n+t-1);return[n=Math.max(0,n-(this.props.pageLinkSize-(r-n+1))),r]}},{key:"updatePageLinks",value:function(){for(var e=[],t=this.calculatePageLinkBoundaries(),n=t[1],r=t[0];r<=n;r++)e.push(r+1);return e}},{key:"changePage",value:function(e,t){var n=this.getPageCount(),r=Math.floor(e/t);r>=0&&r<n&&(this.props.onPageChange&&this.props.onPageChange({first:e,rows:t,page:r,pageCount:n}))}},{key:"getPage",value:function(){return Math.floor(this.props.first/this.props.rows)}},{key:"empty",value:function(){return 0===this.getPageCount()}},{key:"changePageToFirst",value:function(e){this.changePage(0,this.props.rows),e.preventDefault()}},{key:"changePageToPrev",value:function(e){this.changePage(this.props.first-this.props.rows,this.props.rows),e.preventDefault()}},{key:"onPageLinkClick",value:function(e){this.changePage((e.value-1)*this.props.rows,this.props.rows)}},{key:"changePageToNext",value:function(e){this.changePage(this.props.first+this.props.rows,this.props.rows),e.preventDefault()}},{key:"changePageToLast",value:function(e){this.changePage((this.getPageCount()-1)*this.props.rows,this.props.rows),e.preventDefault()}},{key:"onRowsChange",value:function(e){var t=e.value;this.isRowChanged=t!==this.props.rows,this.changePage(0,t)}},{key:"componentDidUpdate",value:function(e,t){this.props.rows===e.rows||this.isRowChanged?this.getPage()>0&&e.totalRecords!==this.props.totalRecords&&this.props.first>=this.props.totalRecords&&this.changePage((this.getPageCount()-1)*this.props.rows,this.props.rows):this.changePage(0,this.props.rows),this.isRowChanged=!1}},{key:"renderElement",value:function(t,n){var r;switch(t){case"FirstPageLink":r=e.createElement(w,{key:t,onClick:this.changePageToFirst,disabled:this.isFirstPage()||this.empty(),template:n});break;case"PrevPageLink":r=e.createElement(N,{key:t,onClick:this.changePageToPrev,disabled:this.isFirstPage()||this.empty(),template:n});break;case"NextPageLink":r=e.createElement(E,{key:t,onClick:this.changePageToNext,disabled:this.isLastPage()||this.empty(),template:n});break;case"LastPageLink":r=e.createElement(L,{key:t,onClick:this.changePageToLast,disabled:this.isLastPage()||this.empty(),template:n});break;case"PageLinks":r=e.createElement(j,{key:t,value:this.updatePageLinks(),page:this.getPage(),rows:this.props.rows,pageCount:this.getPageCount(),onClick:this.onPageLinkClick,template:n});break;case"RowsPerPageDropdown":r=e.createElement(B,{key:t,value:this.props.rows,page:this.getPage(),pageCount:this.getPageCount(),totalRecords:this.props.totalRecords,options:this.props.rowsPerPageOptions,onChange:this.onRowsChange,appendTo:this.props.dropdownAppendTo,template:n,disabled:this.empty()});break;case"CurrentPageReport":r=e.createElement(F,{reportTemplate:this.props.currentPageReportTemplate,key:t,page:this.getPage(),pageCount:this.getPageCount(),first:this.props.first,rows:this.props.rows,totalRecords:this.props.totalRecords,template:n});break;case"JumpToPageInput":r=e.createElement(A,{key:t,rows:this.props.rows,page:this.getPage(),pageCount:this.getPageCount(),onChange:this.changePage,disabled:this.empty(),template:n});break;default:r=null}return r}},{key:"renderElements",value:function(){var e=this,t=this.props.template;return t?"object"===h(t)?t.layout?t.layout.split(" ").map((function(n){var r=n.trim();return e.renderElement(r,t[r])})):Object.entries(t).map((function(t){var n,r,o=(r=2,i(n=t)||p(n,r)||c(n,r)||u());return e.renderElement(o[0],o[1])})):t.split(" ").map((function(t){return e.renderElement(t.trim())})):null}},{key:"render",value:function(){if(this.props.alwaysShow||1!==this.getPageCount()){var t=n("p-paginator p-component",this.props.className),r=o.getJSXElement(this.props.leftContent,this.props),a=o.getJSXElement(this.props.rightContent,this.props),s=this.renderElements();return e.createElement("div",{className:t,style:this.props.style},r&&e.createElement("div",{className:"p-paginator-left-content"},r),s,a&&e.createElement("div",{className:"p-paginator-right-content"},a))}return null}}]),g}();k(I,"defaultProps",{totalRecords:0,rows:0,first:0,pageLinkSize:5,rowsPerPageOptions:null,alwaysShow:!0,style:null,className:null,template:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown",onPageChange:null,leftContent:null,rightContent:null,dropdownAppendTo:null,currentPageReportTemplate:"({currentPage} of {totalPages})"});export{I as Paginator};
|