primereact 7.0.1 → 7.2.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/LICENSE.md +1 -1
- package/README.md +1 -1
- package/accordion/accordion.cjs.js +27 -21
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +5 -2
- package/accordion/accordion.esm.js +27 -21
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +27 -21
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +29 -6
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +31 -30
- package/api/api.esm.js +29 -6
- package/api/api.esm.min.js +1 -1
- package/api/api.js +29 -6
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +22 -22
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +9 -4
- package/autocomplete/autocomplete.esm.js +22 -22
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +22 -22
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +11 -11
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.d.ts +1 -1
- package/avatar/avatar.esm.js +11 -11
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +11 -11
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.cjs.js +11 -11
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.esm.js +11 -11
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +11 -11
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/badge.cjs.js +11 -11
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +11 -11
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +11 -11
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +23 -16
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +23 -16
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +23 -16
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +11 -11
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +11 -11
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +11 -11
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +13 -13
- package/button/button.cjs.min.js +1 -1
- package/button/button.d.ts +1 -1
- package/button/button.esm.js +13 -13
- package/button/button.esm.min.js +1 -1
- package/button/button.js +13 -13
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +39 -20
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +3 -2
- package/calendar/calendar.esm.js +39 -20
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +39 -20
- package/calendar/calendar.min.js +1 -1
- package/captcha/captcha.cjs.js +11 -11
- package/captcha/captcha.cjs.min.js +1 -1
- package/captcha/captcha.esm.js +11 -11
- package/captcha/captcha.esm.min.js +1 -1
- package/captcha/captcha.js +11 -11
- package/captcha/captcha.min.js +1 -1
- package/card/card.cjs.js +11 -11
- package/card/card.cjs.min.js +1 -1
- package/card/card.esm.js +11 -11
- package/card/card.esm.min.js +1 -1
- package/card/card.js +11 -11
- package/card/card.min.js +1 -1
- package/carousel/carousel.cjs.js +235 -27
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +234 -27
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +236 -29
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +15 -15
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +2 -1
- package/cascadeselect/cascadeselect.esm.js +15 -15
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +15 -15
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +13 -13
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +13 -13
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +13 -13
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +13 -13
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +1 -1
- package/checkbox/checkbox.esm.js +13 -13
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +13 -13
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +11 -11
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +1 -1
- package/chip/chip.esm.js +11 -11
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +11 -11
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +13 -13
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +13 -13
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +13 -13
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +16 -16
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +19 -5
- package/colorpicker/colorpicker.esm.js +16 -16
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +16 -16
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.cjs.js +31 -12
- package/column/column.cjs.min.js +1 -1
- package/column/column.d.ts +5 -1
- package/column/column.esm.js +31 -12
- package/column/column.esm.min.js +1 -1
- package/column/column.js +31 -12
- package/column/column.min.js +1 -1
- package/columngroup/columngroup.cjs.js +28 -12
- package/columngroup/columngroup.cjs.min.js +1 -1
- package/columngroup/columngroup.esm.js +28 -12
- package/columngroup/columngroup.esm.min.js +1 -1
- package/columngroup/columngroup.js +28 -12
- package/columngroup/columngroup.min.js +1 -1
- package/confirmdialog/confirmdialog.cjs.js +13 -13
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +1 -1
- package/confirmdialog/confirmdialog.esm.js +13 -13
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +13 -13
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +16 -16
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.d.ts +3 -2
- package/confirmpopup/confirmpopup.esm.js +16 -16
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +16 -16
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +14 -14
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +2 -1
- package/contextmenu/contextmenu.esm.js +14 -14
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +14 -14
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +521 -323
- package/core/core.min.js +18 -18
- package/csstransition/csstransition.cjs.js +62 -32
- package/csstransition/csstransition.cjs.min.js +1 -1
- package/csstransition/csstransition.d.ts +8 -0
- package/csstransition/csstransition.esm.js +61 -32
- package/csstransition/csstransition.esm.min.js +1 -1
- package/csstransition/csstransition.js +62 -34
- package/csstransition/csstransition.min.js +1 -1
- package/csstransition/package.json +2 -1
- package/datascroller/datascroller.cjs.js +11 -11
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.esm.js +11 -11
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +11 -11
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +518 -346
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +34 -11
- package/datatable/datatable.esm.js +520 -348
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +518 -346
- package/datatable/datatable.min.css +1 -1
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +12 -16
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +12 -16
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +12 -16
- package/dataview/dataview.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +11 -11
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.esm.js +11 -11
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +11 -11
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +20 -22
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +2 -1
- package/dialog/dialog.esm.js +20 -22
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +20 -22
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +11 -11
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +11 -11
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +11 -11
- package/divider/divider.min.js +1 -1
- package/dock/dock.cjs.js +11 -11
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +11 -11
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +11 -11
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +36 -26
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +2 -1
- package/dropdown/dropdown.esm.js +36 -26
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +36 -26
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +21 -17
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.d.ts +1 -0
- package/editor/editor.esm.js +21 -17
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +21 -17
- package/editor/editor.min.js +1 -1
- package/fieldset/fieldset.cjs.js +14 -14
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.d.ts +2 -1
- package/fieldset/fieldset.esm.js +14 -14
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +14 -14
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +16 -13
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +3 -1
- package/fileupload/fileupload.esm.js +16 -13
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +16 -13
- package/fileupload/fileupload.min.js +1 -1
- package/fullcalendar/fullcalendar.cjs.js +11 -11
- package/fullcalendar/fullcalendar.cjs.min.js +1 -1
- package/fullcalendar/fullcalendar.esm.js +11 -11
- package/fullcalendar/fullcalendar.esm.min.js +1 -1
- package/fullcalendar/fullcalendar.js +11 -11
- package/fullcalendar/fullcalendar.min.js +1 -1
- package/galleria/galleria.cjs.js +228 -22
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.d.ts +2 -1
- package/galleria/galleria.esm.js +228 -22
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +229 -23
- package/galleria/galleria.min.js +1 -1
- package/gmap/gmap.cjs.js +12 -12
- package/gmap/gmap.cjs.min.js +1 -1
- package/gmap/gmap.esm.js +12 -12
- package/gmap/gmap.esm.min.js +1 -1
- package/gmap/gmap.js +12 -12
- package/gmap/gmap.min.js +1 -1
- package/image/image.cjs.js +39 -18
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +1 -0
- package/image/image.esm.js +40 -19
- package/image/image.esm.min.js +1 -1
- package/image/image.js +39 -18
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +11 -11
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +11 -11
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +11 -11
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +15 -15
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.d.ts +1 -1
- package/inputmask/inputmask.esm.js +15 -15
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +15 -15
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +47 -35
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +4 -4
- package/inputnumber/inputnumber.esm.js +47 -35
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +47 -35
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +13 -13
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +13 -13
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +13 -13
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +13 -13
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +13 -13
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +13 -13
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +13 -13
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.esm.js +13 -13
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +13 -13
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/keyfilter/keyfilter.cjs.js +4 -1
- package/keyfilter/keyfilter.cjs.min.js +1 -1
- package/keyfilter/keyfilter.esm.js +4 -1
- package/keyfilter/keyfilter.esm.min.js +1 -1
- package/keyfilter/keyfilter.js +4 -1
- package/keyfilter/keyfilter.min.js +1 -1
- package/knob/knob.cjs.js +12 -12
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +12 -12
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +12 -12
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +14 -14
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +14 -14
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +14 -14
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +11 -11
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +11 -11
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +11 -11
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +17 -17
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.d.ts +2 -1
- package/mention/mention.esm.js +17 -17
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +17 -17
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +13 -13
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +2 -1
- package/menu/menu.esm.js +13 -13
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +13 -13
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +11 -11
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +11 -11
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +11 -11
- package/menubar/menubar.min.css +1 -1
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +11 -11
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +11 -11
- package/message/message.esm.min.js +1 -1
- package/message/message.js +11 -11
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +11 -11
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +2 -1
- package/messages/messages.esm.js +11 -11
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +11 -11
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +23 -23
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +3 -2
- package/multiselect/multiselect.esm.js +23 -23
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +23 -23
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +13 -13
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +1 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +13 -13
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +13 -13
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +11 -11
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +11 -11
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +11 -11
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +11 -11
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +11 -11
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +11 -11
- package/organizationchart/organizationchart.min.css +1 -1
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +15 -19
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +2 -1
- package/overlaypanel/overlaypanel.esm.js +15 -19
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +15 -19
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +3 -2
- package/paginator/paginator.cjs.js +13 -13
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +13 -13
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +13 -13
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +17 -16
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.d.ts +5 -3
- package/panel/panel.esm.js +18 -17
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +17 -16
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +13 -13
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +2 -1
- package/panelmenu/panelmenu.esm.js +13 -13
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +13 -13
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/password.cjs.js +15 -15
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +2 -1
- package/password/password.esm.js +15 -15
- package/password/password.esm.min.js +1 -1
- package/password/password.js +15 -15
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +11 -11
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +11 -11
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +11 -11
- package/picklist/picklist.min.js +1 -1
- package/portal/portal.cjs.js +15 -18
- package/portal/portal.cjs.min.js +1 -1
- package/portal/portal.esm.js +15 -18
- package/portal/portal.esm.min.js +1 -1
- package/portal/portal.js +16 -20
- package/portal/portal.min.js +1 -1
- package/primereact.all.cjs.js +1531 -1073
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +1531 -1073
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +1531 -1073
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +11 -11
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +11 -11
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +11 -11
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/progressspinner.cjs.js +11 -11
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +11 -11
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +11 -11
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +13 -13
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +13 -13
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +13 -13
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +13 -13
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +13 -13
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +13 -13
- package/rating/rating.min.js +1 -1
- package/resources/primereact.css +129 -99
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +314 -26
- package/resources/themes/arya-green/theme.css +314 -26
- package/resources/themes/arya-orange/theme.css +314 -26
- package/resources/themes/arya-purple/theme.css +314 -26
- package/resources/themes/bootstrap4-dark-blue/theme.css +291 -10
- package/resources/themes/bootstrap4-dark-purple/theme.css +291 -10
- package/resources/themes/bootstrap4-light-blue/theme.css +288 -7
- package/resources/themes/bootstrap4-light-purple/theme.css +288 -7
- package/resources/themes/fluent-light/theme.css +312 -24
- package/resources/themes/lara-dark-blue/theme.css +665 -412
- package/resources/themes/lara-dark-indigo/theme.css +665 -412
- package/resources/themes/lara-dark-purple/theme.css +665 -412
- package/resources/themes/lara-dark-teal/theme.css +665 -412
- package/resources/themes/lara-light-blue/theme.css +319 -66
- package/resources/themes/lara-light-indigo/theme.css +319 -66
- package/resources/themes/lara-light-purple/theme.css +319 -66
- package/resources/themes/lara-light-teal/theme.css +319 -66
- package/resources/themes/luna-amber/theme.css +305 -24
- package/resources/themes/luna-blue/theme.css +305 -24
- package/resources/themes/luna-green/theme.css +305 -24
- package/resources/themes/luna-pink/theme.css +305 -24
- package/resources/themes/md-dark-deeppurple/theme.css +370 -8
- package/resources/themes/md-dark-indigo/theme.css +370 -8
- package/resources/themes/md-light-deeppurple/theme.css +368 -6
- package/resources/themes/md-light-indigo/theme.css +368 -6
- package/resources/themes/mdc-dark-deeppurple/theme.css +370 -8
- package/resources/themes/mdc-dark-indigo/theme.css +370 -8
- package/resources/themes/mdc-light-deeppurple/theme.css +368 -6
- package/resources/themes/mdc-light-indigo/theme.css +368 -6
- package/resources/themes/nova/theme.css +305 -24
- package/resources/themes/nova-accent/theme.css +305 -24
- package/resources/themes/nova-alt/theme.css +305 -24
- package/resources/themes/rhea/theme.css +305 -24
- package/resources/themes/saga-blue/theme.css +295 -7
- package/resources/themes/saga-green/theme.css +295 -7
- package/resources/themes/saga-orange/theme.css +295 -7
- package/resources/themes/saga-purple/theme.css +295 -7
- package/resources/themes/tailwind-light/theme.css +315 -27
- package/resources/themes/vela-blue/theme.css +314 -26
- package/resources/themes/vela-green/theme.css +314 -26
- package/resources/themes/vela-orange/theme.css +314 -26
- package/resources/themes/vela-purple/theme.css +314 -26
- package/ripple/ripple.cjs.js +11 -11
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +11 -11
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +11 -11
- package/ripple/ripple.min.js +1 -1
- package/row/row.cjs.js +11 -11
- package/row/row.cjs.min.js +1 -1
- package/row/row.esm.js +11 -11
- package/row/row.esm.min.js +1 -1
- package/row/row.js +11 -11
- package/row/row.min.js +1 -1
- package/scrollpanel/scrollpanel.cjs.js +11 -11
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +11 -11
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +11 -11
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +12 -12
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.d.ts +3 -2
- package/scrolltop/scrolltop.esm.js +12 -12
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +12 -12
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +14 -14
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +14 -14
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +14 -14
- package/selectbutton/selectbutton.min.js +1 -1
- package/selectitem/selectitem.d.ts +1 -1
- package/sidebar/sidebar.cjs.js +14 -13
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +2 -1
- package/sidebar/sidebar.esm.js +14 -13
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +14 -13
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +11 -11
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +11 -11
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +11 -11
- package/skeleton/skeleton.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +13 -13
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +2 -1
- package/slidemenu/slidemenu.esm.js +13 -13
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +13 -13
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +11 -11
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +11 -11
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +11 -11
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +13 -13
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.d.ts +1 -1
- package/speeddial/speeddial.esm.js +13 -13
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +13 -13
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +22 -18
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +9 -3
- package/splitbutton/splitbutton.esm.js +22 -18
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +22 -18
- package/splitbutton/splitbutton.min.css +1 -1
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +12 -12
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +12 -12
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +12 -12
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +11 -11
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +11 -11
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +11 -11
- package/steps/steps.min.js +1 -1
- package/styleclass/styleclass.cjs.js +11 -11
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.esm.js +11 -11
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +11 -11
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +12 -12
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +12 -12
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +12 -12
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +57 -33
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +8 -0
- package/tabview/tabview.esm.js +57 -33
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +57 -33
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +11 -11
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.d.ts +1 -1
- package/tag/tag.esm.js +11 -11
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +11 -11
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +11 -11
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +11 -11
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +11 -11
- package/terminal/terminal.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +13 -13
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +2 -1
- package/tieredmenu/tieredmenu.esm.js +13 -13
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +13 -13
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +11 -11
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +11 -11
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +11 -11
- package/timeline/timeline.min.js +1 -1
- package/toast/toast.cjs.js +26 -15
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +5 -1
- package/toast/toast.esm.js +26 -15
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +27 -17
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +13 -13
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.d.ts +1 -1
- package/togglebutton/togglebutton.esm.js +13 -13
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +13 -13
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +11 -11
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +11 -11
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +11 -11
- package/toolbar/toolbar.min.css +1 -1
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +45 -19
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.d.ts +0 -1
- package/tooltip/tooltip.esm.js +45 -19
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +45 -19
- package/tooltip/tooltip.min.js +1 -1
- package/tooltip/tooltipoptions.d.ts +2 -0
- package/tree/tree.cjs.js +19 -18
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +8 -4
- package/tree/tree.esm.js +19 -18
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +19 -18
- package/tree/tree.min.js +1 -1
- package/treenode/treenode.d.ts +2 -1
- package/treeselect/treeselect.cjs.js +20 -20
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +2 -1
- package/treeselect/treeselect.esm.js +20 -20
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +20 -20
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +101 -40
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +2 -1
- package/treetable/treetable.esm.js +97 -37
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +101 -40
- package/treetable/treetable.min.css +1 -1
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +13 -13
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +13 -13
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +13 -13
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +98 -23
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +3 -0
- package/utils/utils.esm.js +98 -23
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +98 -23
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +62 -36
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +62 -36
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +62 -36
- package/virtualscroller/virtualscroller.min.css +1 -1
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +59 -10
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff2 +0 -0
- package/util.d.ts +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import { Paginator } from 'primereact/paginator';
|
|
3
3
|
import { classNames, ObjectUtils, DomHandler, ZIndexUtils, ConnectedOverlayScrollHandler, UniqueComponentId } from 'primereact/utils';
|
|
4
|
-
import PrimeReact, { localeOption,
|
|
4
|
+
import PrimeReact, { localeOption, FilterMatchMode, FilterOperator, FilterService } from 'primereact/api';
|
|
5
5
|
import { OverlayService } from 'primereact/overlayservice';
|
|
6
6
|
import { Ripple } from 'primereact/ripple';
|
|
7
7
|
import { CSSTransition } from 'primereact/csstransition';
|
|
@@ -125,6 +125,9 @@ function _defineProperties(target, props) {
|
|
|
125
125
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
126
126
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
127
127
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
128
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
129
|
+
writable: false
|
|
130
|
+
});
|
|
128
131
|
return Constructor;
|
|
129
132
|
}
|
|
130
133
|
|
|
@@ -157,23 +160,20 @@ function _inherits(subClass, superClass) {
|
|
|
157
160
|
configurable: true
|
|
158
161
|
}
|
|
159
162
|
});
|
|
163
|
+
Object.defineProperty(subClass, "prototype", {
|
|
164
|
+
writable: false
|
|
165
|
+
});
|
|
160
166
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
161
167
|
}
|
|
162
168
|
|
|
163
169
|
function _typeof(obj) {
|
|
164
170
|
"@babel/helpers - typeof";
|
|
165
171
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
}
|
|
171
|
-
_typeof = function _typeof(obj) {
|
|
172
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
return _typeof(obj);
|
|
172
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
173
|
+
return typeof obj;
|
|
174
|
+
} : function (obj) {
|
|
175
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
176
|
+
}, _typeof(obj);
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
function _possibleConstructorReturn(self, call) {
|
|
@@ -271,10 +271,7 @@ var RowRadioButton = /*#__PURE__*/function (_Component) {
|
|
|
271
271
|
key: "onClick",
|
|
272
272
|
value: function onClick(event) {
|
|
273
273
|
if (!this.props.disabled) {
|
|
274
|
-
this.props.onChange(
|
|
275
|
-
originalEvent: event,
|
|
276
|
-
data: this.props.value
|
|
277
|
-
});
|
|
274
|
+
this.props.onChange(event);
|
|
278
275
|
this.input.focus();
|
|
279
276
|
}
|
|
280
277
|
}
|
|
@@ -310,14 +307,17 @@ var RowRadioButton = /*#__PURE__*/function (_Component) {
|
|
|
310
307
|
value: function render() {
|
|
311
308
|
var _this2 = this;
|
|
312
309
|
|
|
313
|
-
var className = classNames('p-radiobutton
|
|
310
|
+
var className = classNames('p-radiobutton p-component', {
|
|
311
|
+
'p-radiobutton-focused': this.state.focused
|
|
312
|
+
});
|
|
313
|
+
var boxClassName = classNames('p-radiobutton-box p-component', {
|
|
314
314
|
'p-highlight': this.props.checked,
|
|
315
315
|
'p-focus': this.state.focused,
|
|
316
316
|
'p-disabled': this.props.disabled
|
|
317
317
|
});
|
|
318
318
|
var name = "".concat(this.props.tableSelector, "_dt_radio");
|
|
319
319
|
return /*#__PURE__*/React.createElement("div", {
|
|
320
|
-
className:
|
|
320
|
+
className: className
|
|
321
321
|
}, /*#__PURE__*/React.createElement("div", {
|
|
322
322
|
className: "p-hidden-accessible"
|
|
323
323
|
}, /*#__PURE__*/React.createElement("input", {
|
|
@@ -332,7 +332,7 @@ var RowRadioButton = /*#__PURE__*/function (_Component) {
|
|
|
332
332
|
onChange: this.onChange,
|
|
333
333
|
onKeyDown: this.onKeyDown
|
|
334
334
|
})), /*#__PURE__*/React.createElement("div", {
|
|
335
|
-
className:
|
|
335
|
+
className: boxClassName,
|
|
336
336
|
onClick: this.onClick,
|
|
337
337
|
role: "radio",
|
|
338
338
|
"aria-checked": this.props.checked
|
|
@@ -376,10 +376,7 @@ var RowCheckbox = /*#__PURE__*/function (_Component) {
|
|
|
376
376
|
this.setState({
|
|
377
377
|
focused: true
|
|
378
378
|
});
|
|
379
|
-
this.props.onChange(
|
|
380
|
-
originalEvent: event,
|
|
381
|
-
data: this.props.value
|
|
382
|
-
});
|
|
379
|
+
this.props.onChange(event);
|
|
383
380
|
}
|
|
384
381
|
}
|
|
385
382
|
}, {
|
|
@@ -407,7 +404,10 @@ var RowCheckbox = /*#__PURE__*/function (_Component) {
|
|
|
407
404
|
}, {
|
|
408
405
|
key: "render",
|
|
409
406
|
value: function render() {
|
|
410
|
-
var className = classNames('p-checkbox
|
|
407
|
+
var className = classNames('p-checkbox p-component', {
|
|
408
|
+
'p-checkbox-focused': this.state.focused
|
|
409
|
+
});
|
|
410
|
+
var boxClassName = classNames('p-checkbox-box p-component', {
|
|
411
411
|
'p-highlight': this.props.checked,
|
|
412
412
|
'p-disabled': this.props.disabled,
|
|
413
413
|
'p-focus': this.state.focused
|
|
@@ -417,10 +417,10 @@ var RowCheckbox = /*#__PURE__*/function (_Component) {
|
|
|
417
417
|
});
|
|
418
418
|
var tabIndex = this.props.disabled ? null : '0';
|
|
419
419
|
return /*#__PURE__*/React.createElement("div", {
|
|
420
|
-
className:
|
|
420
|
+
className: className,
|
|
421
421
|
onClick: this.onClick
|
|
422
422
|
}, /*#__PURE__*/React.createElement("div", {
|
|
423
|
-
className:
|
|
423
|
+
className: boxClassName,
|
|
424
424
|
role: "checkbox",
|
|
425
425
|
"aria-checked": this.props.checked,
|
|
426
426
|
tabIndex: tabIndex,
|
|
@@ -436,9 +436,9 @@ var RowCheckbox = /*#__PURE__*/function (_Component) {
|
|
|
436
436
|
return RowCheckbox;
|
|
437
437
|
}(Component);
|
|
438
438
|
|
|
439
|
-
function ownKeys$7(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
439
|
+
function ownKeys$7(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
440
440
|
|
|
441
|
-
function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
441
|
+
function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$7(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$7(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
442
442
|
|
|
443
443
|
function _createSuper$a(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$a(); 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); }; }
|
|
444
444
|
|
|
@@ -466,6 +466,8 @@ var BodyCell = /*#__PURE__*/function (_Component) {
|
|
|
466
466
|
_this.onBlur = _this.onBlur.bind(_assertThisInitialized(_this));
|
|
467
467
|
_this.onEditorFocus = _this.onEditorFocus.bind(_assertThisInitialized(_this));
|
|
468
468
|
_this.onRowToggle = _this.onRowToggle.bind(_assertThisInitialized(_this));
|
|
469
|
+
_this.onRadioChange = _this.onRadioChange.bind(_assertThisInitialized(_this));
|
|
470
|
+
_this.onCheckboxChange = _this.onCheckboxChange.bind(_assertThisInitialized(_this));
|
|
469
471
|
_this.onRowEditSave = _this.onRowEditSave.bind(_assertThisInitialized(_this));
|
|
470
472
|
_this.onRowEditCancel = _this.onRowEditCancel.bind(_assertThisInitialized(_this));
|
|
471
473
|
_this.onRowEditInit = _this.onRowEditInit.bind(_assertThisInitialized(_this));
|
|
@@ -521,10 +523,9 @@ var BodyCell = /*#__PURE__*/function (_Component) {
|
|
|
521
523
|
return this.getColumnProp('frozen') ? Object.assign({}, columnStyle, bodyStyle, this.state.styleObject) : Object.assign({}, columnStyle, bodyStyle);
|
|
522
524
|
}
|
|
523
525
|
}, {
|
|
524
|
-
key: "
|
|
525
|
-
value: function
|
|
526
|
+
key: "getCellParams",
|
|
527
|
+
value: function getCellParams() {
|
|
526
528
|
return {
|
|
527
|
-
originalEvent: event,
|
|
528
529
|
value: this.resolveFieldData(),
|
|
529
530
|
field: this.field,
|
|
530
531
|
rowData: this.props.rowData,
|
|
@@ -535,6 +536,14 @@ var BodyCell = /*#__PURE__*/function (_Component) {
|
|
|
535
536
|
props: this.props
|
|
536
537
|
};
|
|
537
538
|
}
|
|
539
|
+
}, {
|
|
540
|
+
key: "getCellCallbackParams",
|
|
541
|
+
value: function getCellCallbackParams(event) {
|
|
542
|
+
var params = this.getCellParams();
|
|
543
|
+
return _objectSpread$7({
|
|
544
|
+
originalEvent: event
|
|
545
|
+
}, params);
|
|
546
|
+
}
|
|
538
547
|
}, {
|
|
539
548
|
key: "resolveFieldData",
|
|
540
549
|
value: function resolveFieldData(data) {
|
|
@@ -624,30 +633,27 @@ var BodyCell = /*#__PURE__*/function (_Component) {
|
|
|
624
633
|
key: "findNextSelectableCell",
|
|
625
634
|
value: function findNextSelectableCell(cell) {
|
|
626
635
|
var nextCell = cell.nextElementSibling;
|
|
627
|
-
return nextCell ? DomHandler.hasClass(nextCell, 'p-selectable-cell') ? nextCell : this.
|
|
636
|
+
return nextCell ? DomHandler.hasClass(nextCell, 'p-selectable-cell') ? nextCell : this.findNextSelectableCell(nextCell) : null;
|
|
628
637
|
}
|
|
629
638
|
}, {
|
|
630
639
|
key: "findPrevSelectableCell",
|
|
631
640
|
value: function findPrevSelectableCell(cell) {
|
|
632
641
|
var prevCell = cell.previousElementSibling;
|
|
633
|
-
return prevCell ? DomHandler.hasClass(prevCell, 'p-selectable-cell') ? prevCell : this.
|
|
642
|
+
return prevCell ? DomHandler.hasClass(prevCell, 'p-selectable-cell') ? prevCell : this.findPrevSelectableCell(prevCell) : null;
|
|
634
643
|
}
|
|
635
644
|
}, {
|
|
636
|
-
key: "
|
|
637
|
-
value: function
|
|
638
|
-
var
|
|
639
|
-
|
|
645
|
+
key: "findDownSelectableCell",
|
|
646
|
+
value: function findDownSelectableCell(cell) {
|
|
647
|
+
var downRow = cell.parentElement.nextElementSibling;
|
|
648
|
+
var downCell = downRow ? downRow.children[this.props.index] : null;
|
|
649
|
+
return downRow && downCell ? DomHandler.hasClass(downRow, 'p-selectable-row') && DomHandler.hasClass(downCell, 'p-selectable-cell') ? downCell : this.findDownSelectableCell(downCell) : null;
|
|
640
650
|
}
|
|
641
651
|
}, {
|
|
642
|
-
key: "
|
|
643
|
-
value: function
|
|
644
|
-
var
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
return DomHandler.hasClass(prevRow, 'p-selectable-row') ? prevRow : this.findPrevSelectableRow(prevRow);
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
return null;
|
|
652
|
+
key: "findUpSelectableCell",
|
|
653
|
+
value: function findUpSelectableCell(cell) {
|
|
654
|
+
var upRow = cell.parentElement.previousElementSibling;
|
|
655
|
+
var upCell = upRow ? upRow.children[this.props.index] : null;
|
|
656
|
+
return upRow && upCell ? DomHandler.hasClass(upRow, 'p-selectable-row') && DomHandler.hasClass(upCell, 'p-selectable-cell') ? upCell : this.findUpSelectableCell(upCell) : null;
|
|
651
657
|
}
|
|
652
658
|
}, {
|
|
653
659
|
key: "changeTabIndex",
|
|
@@ -665,13 +671,24 @@ var BodyCell = /*#__PURE__*/function (_Component) {
|
|
|
665
671
|
clearTimeout(this.tabindexTimeout);
|
|
666
672
|
this.tabindexTimeout = setTimeout(function () {
|
|
667
673
|
if (_this4.state.editing) {
|
|
668
|
-
var focusableEl = DomHandler.getFirstFocusableElement(_this4.el, ':not(.p-cell-editor-key-helper)');
|
|
674
|
+
var focusableEl = _this4.props.editMode === 'cell' ? DomHandler.getFirstFocusableElement(_this4.el, ':not(.p-cell-editor-key-helper)') : DomHandler.findSingle(_this4.el, '.p-row-editor-save');
|
|
669
675
|
focusableEl && focusableEl.focus();
|
|
670
676
|
}
|
|
671
677
|
|
|
672
678
|
_this4.keyHelper && (_this4.keyHelper.tabIndex = _this4.state.editing ? -1 : 0);
|
|
673
679
|
}, 1);
|
|
674
680
|
}
|
|
681
|
+
}, {
|
|
682
|
+
key: "focusOnInit",
|
|
683
|
+
value: function focusOnInit() {
|
|
684
|
+
var _this5 = this;
|
|
685
|
+
|
|
686
|
+
clearTimeout(this.initFocusTimeout);
|
|
687
|
+
this.initFocusTimeout = setTimeout(function () {
|
|
688
|
+
var focusableEl = _this5.props.editMode === 'row' ? DomHandler.findSingle(_this5.el, '.p-row-editor-init') : null;
|
|
689
|
+
focusableEl && focusableEl.focus();
|
|
690
|
+
}, 1);
|
|
691
|
+
}
|
|
675
692
|
}, {
|
|
676
693
|
key: "updateStickyPosition",
|
|
677
694
|
value: function updateStickyPosition() {
|
|
@@ -721,7 +738,7 @@ var BodyCell = /*#__PURE__*/function (_Component) {
|
|
|
721
738
|
}, {
|
|
722
739
|
key: "onClick",
|
|
723
740
|
value: function onClick(event) {
|
|
724
|
-
var
|
|
741
|
+
var _this6 = this;
|
|
725
742
|
|
|
726
743
|
var params = this.getCellCallbackParams(event);
|
|
727
744
|
|
|
@@ -737,7 +754,7 @@ var BodyCell = /*#__PURE__*/function (_Component) {
|
|
|
737
754
|
|
|
738
755
|
|
|
739
756
|
setTimeout(function () {
|
|
740
|
-
|
|
757
|
+
_this6.setState({
|
|
741
758
|
editing: true
|
|
742
759
|
}, function () {
|
|
743
760
|
if (onCellEditInit) {
|
|
@@ -745,15 +762,15 @@ var BodyCell = /*#__PURE__*/function (_Component) {
|
|
|
745
762
|
}
|
|
746
763
|
|
|
747
764
|
if (cellEditValidatorEvent === 'click') {
|
|
748
|
-
|
|
765
|
+
_this6.bindDocumentEditListener();
|
|
749
766
|
|
|
750
|
-
|
|
751
|
-
if (!
|
|
752
|
-
|
|
767
|
+
_this6.overlayEventListener = function (e) {
|
|
768
|
+
if (!_this6.isOutsideClicked(e.target)) {
|
|
769
|
+
_this6.selfClick = true;
|
|
753
770
|
}
|
|
754
771
|
};
|
|
755
772
|
|
|
756
|
-
OverlayService.on('overlay-click',
|
|
773
|
+
OverlayService.on('overlay-click', _this6.overlayEventListener);
|
|
757
774
|
}
|
|
758
775
|
});
|
|
759
776
|
}, 1);
|
|
@@ -827,10 +844,9 @@ var BodyCell = /*#__PURE__*/function (_Component) {
|
|
|
827
844
|
//up arrow
|
|
828
845
|
|
|
829
846
|
case 38:
|
|
830
|
-
var
|
|
847
|
+
var upCell = this.findUpSelectableCell(cell);
|
|
831
848
|
|
|
832
|
-
if (
|
|
833
|
-
var upCell = prevRow.children[this.props.index];
|
|
849
|
+
if (upCell) {
|
|
834
850
|
this.changeTabIndex(cell, upCell);
|
|
835
851
|
upCell.focus();
|
|
836
852
|
}
|
|
@@ -840,10 +856,9 @@ var BodyCell = /*#__PURE__*/function (_Component) {
|
|
|
840
856
|
//down arrow
|
|
841
857
|
|
|
842
858
|
case 40:
|
|
843
|
-
var
|
|
859
|
+
var downCell = this.findDownSelectableCell(cell);
|
|
844
860
|
|
|
845
|
-
if (
|
|
846
|
-
var downCell = nextRow.children[this.props.index];
|
|
861
|
+
if (downCell) {
|
|
847
862
|
this.changeTabIndex(cell, downCell);
|
|
848
863
|
downCell.focus();
|
|
849
864
|
}
|
|
@@ -886,6 +901,24 @@ var BodyCell = /*#__PURE__*/function (_Component) {
|
|
|
886
901
|
value: function onEditorFocus(event) {
|
|
887
902
|
this.onClick(event);
|
|
888
903
|
}
|
|
904
|
+
}, {
|
|
905
|
+
key: "onRadioChange",
|
|
906
|
+
value: function onRadioChange(event) {
|
|
907
|
+
this.props.onRadioChange({
|
|
908
|
+
originalEvent: event,
|
|
909
|
+
data: this.props.rowData,
|
|
910
|
+
index: this.props.rowIndex
|
|
911
|
+
});
|
|
912
|
+
}
|
|
913
|
+
}, {
|
|
914
|
+
key: "onCheckboxChange",
|
|
915
|
+
value: function onCheckboxChange(event) {
|
|
916
|
+
this.props.onCheckboxChange({
|
|
917
|
+
originalEvent: event,
|
|
918
|
+
data: this.props.rowData,
|
|
919
|
+
index: this.props.rowIndex
|
|
920
|
+
});
|
|
921
|
+
}
|
|
889
922
|
}, {
|
|
890
923
|
key: "onRowToggle",
|
|
891
924
|
value: function onRowToggle(event) {
|
|
@@ -916,6 +949,7 @@ var BodyCell = /*#__PURE__*/function (_Component) {
|
|
|
916
949
|
field: this.field,
|
|
917
950
|
index: this.props.rowIndex
|
|
918
951
|
});
|
|
952
|
+
this.focusOnInit();
|
|
919
953
|
}
|
|
920
954
|
}, {
|
|
921
955
|
key: "onRowEditCancel",
|
|
@@ -927,19 +961,20 @@ var BodyCell = /*#__PURE__*/function (_Component) {
|
|
|
927
961
|
field: this.field,
|
|
928
962
|
index: this.props.rowIndex
|
|
929
963
|
});
|
|
964
|
+
this.focusOnInit();
|
|
930
965
|
}
|
|
931
966
|
}, {
|
|
932
967
|
key: "bindDocumentEditListener",
|
|
933
968
|
value: function bindDocumentEditListener() {
|
|
934
|
-
var
|
|
969
|
+
var _this7 = this;
|
|
935
970
|
|
|
936
971
|
if (!this.documentEditListener) {
|
|
937
972
|
this.documentEditListener = function (e) {
|
|
938
|
-
if (!
|
|
939
|
-
|
|
973
|
+
if (!_this7.selfClick && _this7.isOutsideClicked(e.target)) {
|
|
974
|
+
_this7.switchCellToViewMode(e, true);
|
|
940
975
|
}
|
|
941
976
|
|
|
942
|
-
|
|
977
|
+
_this7.selfClick = false;
|
|
943
978
|
};
|
|
944
979
|
|
|
945
980
|
document.addEventListener('click', this.documentEditListener, true);
|
|
@@ -1016,7 +1051,7 @@ var BodyCell = /*#__PURE__*/function (_Component) {
|
|
|
1016
1051
|
}, {
|
|
1017
1052
|
key: "renderElement",
|
|
1018
1053
|
value: function renderElement() {
|
|
1019
|
-
var
|
|
1054
|
+
var _this8 = this;
|
|
1020
1055
|
|
|
1021
1056
|
var content, editorKeyHelper;
|
|
1022
1057
|
var cellSelected = this.props.allowCellSelection && this.isSelected();
|
|
@@ -1030,19 +1065,24 @@ var BodyCell = /*#__PURE__*/function (_Component) {
|
|
|
1030
1065
|
var body = this.getColumnProp('body');
|
|
1031
1066
|
var editor = this.getColumnProp('editor');
|
|
1032
1067
|
var frozen = this.getColumnProp('frozen');
|
|
1068
|
+
var align = this.getColumnProp('align');
|
|
1033
1069
|
var value = this.resolveFieldData();
|
|
1034
1070
|
var cellClassName = ObjectUtils.getPropValue(this.props.cellClassName, value, {
|
|
1035
1071
|
props: this.props.tableProps,
|
|
1036
|
-
rowData: this.props.rowData
|
|
1072
|
+
rowData: this.props.rowData,
|
|
1073
|
+
column: this.props.column
|
|
1037
1074
|
});
|
|
1038
|
-
var className = classNames(this.getColumnProp('bodyClassName'), this.getColumnProp('
|
|
1075
|
+
var className = classNames(this.getColumnProp('bodyClassName'), this.getColumnProp('className'), cellClassName, _defineProperty({
|
|
1039
1076
|
'p-selection-column': selectionMode !== null,
|
|
1040
1077
|
'p-editable-column': editor,
|
|
1041
1078
|
'p-cell-editing': editor && this.state.editing,
|
|
1042
1079
|
'p-frozen-column': frozen,
|
|
1043
|
-
'p-selectable-cell': this.props.allowCellSelection
|
|
1080
|
+
'p-selectable-cell': this.props.allowCellSelection && this.props.isSelectable({
|
|
1081
|
+
data: this.getCellParams(),
|
|
1082
|
+
index: this.props.rowIndex
|
|
1083
|
+
}),
|
|
1044
1084
|
'p-highlight': cellSelected
|
|
1045
|
-
});
|
|
1085
|
+
}, "p-align-".concat(align), !!align));
|
|
1046
1086
|
var style = this.getStyle();
|
|
1047
1087
|
var title = this.props.responsiveLayout === 'stack' && /*#__PURE__*/React.createElement("span", {
|
|
1048
1088
|
className: "p-column-title"
|
|
@@ -1050,40 +1090,19 @@ var BodyCell = /*#__PURE__*/function (_Component) {
|
|
|
1050
1090
|
props: this.props.tableProps
|
|
1051
1091
|
}));
|
|
1052
1092
|
|
|
1053
|
-
if (
|
|
1054
|
-
content = body ? ObjectUtils.getJSXElement(body, this.props.rowData, {
|
|
1055
|
-
column: this.props.column,
|
|
1056
|
-
field: this.field,
|
|
1057
|
-
rowIndex: this.props.rowIndex,
|
|
1058
|
-
frozenRow: this.props.frozenRow,
|
|
1059
|
-
props: this.props.tableProps
|
|
1060
|
-
}) : value;
|
|
1061
|
-
} else if (editor && this.state.editing) {
|
|
1062
|
-
content = ObjectUtils.getJSXElement(editor, {
|
|
1063
|
-
rowData: this.state.editingRowData,
|
|
1064
|
-
value: this.resolveFieldData(this.state.editingRowData),
|
|
1065
|
-
column: this.props.column,
|
|
1066
|
-
field: this.field,
|
|
1067
|
-
rowIndex: this.props.rowIndex,
|
|
1068
|
-
frozenRow: this.props.frozenRow,
|
|
1069
|
-
props: this.props.tableProps,
|
|
1070
|
-
editorCallback: this.editorCallback
|
|
1071
|
-
});
|
|
1072
|
-
} else if (selectionMode) {
|
|
1093
|
+
if (selectionMode) {
|
|
1073
1094
|
var showSelection = this.props.showSelectionElement ? this.props.showSelectionElement(this.props.rowData, {
|
|
1074
1095
|
rowIndex: this.props.rowIndex,
|
|
1075
1096
|
props: this.props.tableProps
|
|
1076
1097
|
}) : true;
|
|
1077
1098
|
content = showSelection && /*#__PURE__*/React.createElement(React.Fragment, null, selectionMode === 'single' && /*#__PURE__*/React.createElement(RowRadioButton, {
|
|
1078
|
-
value: this.props.rowData,
|
|
1079
1099
|
checked: this.props.selected,
|
|
1080
|
-
onChange: this.
|
|
1100
|
+
onChange: this.onRadioChange,
|
|
1081
1101
|
tabIndex: this.props.tabIndex,
|
|
1082
1102
|
tableSelector: this.props.tableSelector
|
|
1083
1103
|
}), selectionMode === 'multiple' && /*#__PURE__*/React.createElement(RowCheckbox, {
|
|
1084
|
-
value: this.props.rowData,
|
|
1085
1104
|
checked: this.props.selected,
|
|
1086
|
-
onChange: this.
|
|
1105
|
+
onChange: this.onCheckboxChange,
|
|
1087
1106
|
tabIndex: this.props.tabIndex
|
|
1088
1107
|
}));
|
|
1089
1108
|
} else if (rowReorder) {
|
|
@@ -1180,6 +1199,25 @@ var BodyCell = /*#__PURE__*/function (_Component) {
|
|
|
1180
1199
|
rowEditor: rowEditorProps
|
|
1181
1200
|
});
|
|
1182
1201
|
}
|
|
1202
|
+
} else if (body && !this.state.editing) {
|
|
1203
|
+
content = body ? ObjectUtils.getJSXElement(body, this.props.rowData, {
|
|
1204
|
+
column: this.props.column,
|
|
1205
|
+
field: this.field,
|
|
1206
|
+
rowIndex: this.props.rowIndex,
|
|
1207
|
+
frozenRow: this.props.frozenRow,
|
|
1208
|
+
props: this.props.tableProps
|
|
1209
|
+
}) : value;
|
|
1210
|
+
} else if (editor && this.state.editing) {
|
|
1211
|
+
content = ObjectUtils.getJSXElement(editor, {
|
|
1212
|
+
rowData: this.state.editingRowData,
|
|
1213
|
+
value: this.resolveFieldData(this.state.editingRowData),
|
|
1214
|
+
column: this.props.column,
|
|
1215
|
+
field: this.field,
|
|
1216
|
+
rowIndex: this.props.rowIndex,
|
|
1217
|
+
frozenRow: this.props.frozenRow,
|
|
1218
|
+
props: this.props.tableProps,
|
|
1219
|
+
editorCallback: this.editorCallback
|
|
1220
|
+
});
|
|
1183
1221
|
} else {
|
|
1184
1222
|
content = value;
|
|
1185
1223
|
}
|
|
@@ -1189,7 +1227,7 @@ var BodyCell = /*#__PURE__*/function (_Component) {
|
|
|
1189
1227
|
editorKeyHelper = /*#__PURE__*/React.createElement("a", {
|
|
1190
1228
|
tabIndex: "0",
|
|
1191
1229
|
ref: function ref(el) {
|
|
1192
|
-
return
|
|
1230
|
+
return _this8.keyHelper = el;
|
|
1193
1231
|
},
|
|
1194
1232
|
className: "p-cell-editor-key-helper p-hidden-accessible",
|
|
1195
1233
|
onFocus: this.onEditorFocus
|
|
@@ -1199,7 +1237,7 @@ var BodyCell = /*#__PURE__*/function (_Component) {
|
|
|
1199
1237
|
|
|
1200
1238
|
return /*#__PURE__*/React.createElement("td", {
|
|
1201
1239
|
ref: function ref(el) {
|
|
1202
|
-
return
|
|
1240
|
+
return _this8.el = el;
|
|
1203
1241
|
},
|
|
1204
1242
|
style: style,
|
|
1205
1243
|
className: className,
|
|
@@ -1234,9 +1272,9 @@ var BodyCell = /*#__PURE__*/function (_Component) {
|
|
|
1234
1272
|
return BodyCell;
|
|
1235
1273
|
}(Component);
|
|
1236
1274
|
|
|
1237
|
-
function ownKeys$6(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
1275
|
+
function ownKeys$6(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1238
1276
|
|
|
1239
|
-
function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
1277
|
+
function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$6(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$6(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1240
1278
|
|
|
1241
1279
|
function _createSuper$9(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$9(); 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); }; }
|
|
1242
1280
|
|
|
@@ -1664,6 +1702,7 @@ var BodyRow = /*#__PURE__*/function (_Component) {
|
|
|
1664
1702
|
cellClassName: _this3.props.cellClassName,
|
|
1665
1703
|
responsiveLayout: _this3.props.responsiveLayout,
|
|
1666
1704
|
frozenRow: _this3.props.frozenRow,
|
|
1705
|
+
isSelectable: _this3.props.isSelectable,
|
|
1667
1706
|
showSelectionElement: _this3.props.showSelectionElement,
|
|
1668
1707
|
showRowReorderElement: _this3.props.showRowReorderElement,
|
|
1669
1708
|
onRadioChange: _this3.props.onRadioChange,
|
|
@@ -1689,7 +1728,10 @@ var BodyRow = /*#__PURE__*/function (_Component) {
|
|
|
1689
1728
|
var className = classNames(rowClassName, {
|
|
1690
1729
|
'p-highlight': !this.props.allowCellSelection && this.props.selected,
|
|
1691
1730
|
'p-highlight-contextmenu': this.props.contextMenuSelected,
|
|
1692
|
-
'p-selectable-row': this.props.allowRowSelection
|
|
1731
|
+
'p-selectable-row': this.props.allowRowSelection && this.props.isSelectable({
|
|
1732
|
+
data: this.props.rowData,
|
|
1733
|
+
index: this.props.index
|
|
1734
|
+
}),
|
|
1693
1735
|
'p-row-odd': this.props.index % 2 !== 0
|
|
1694
1736
|
});
|
|
1695
1737
|
var content = this.renderContent();
|
|
@@ -1766,9 +1808,9 @@ var RowTogglerButton = /*#__PURE__*/function (_Component) {
|
|
|
1766
1808
|
|
|
1767
1809
|
var _excluded = ["originalEvent"];
|
|
1768
1810
|
|
|
1769
|
-
function ownKeys$5(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
1811
|
+
function ownKeys$5(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1770
1812
|
|
|
1771
|
-
function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
1813
|
+
function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$5(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$5(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1772
1814
|
|
|
1773
1815
|
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); }; }
|
|
1774
1816
|
|
|
@@ -1805,7 +1847,8 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
1805
1847
|
_this.onRadioChange = _this.onRadioChange.bind(_assertThisInitialized(_this));
|
|
1806
1848
|
_this.onCheckboxChange = _this.onCheckboxChange.bind(_assertThisInitialized(_this));
|
|
1807
1849
|
_this.onDragSelectionMouseMove = _this.onDragSelectionMouseMove.bind(_assertThisInitialized(_this));
|
|
1808
|
-
_this.onDragSelectionMouseUp = _this.onDragSelectionMouseUp.bind(_assertThisInitialized(_this));
|
|
1850
|
+
_this.onDragSelectionMouseUp = _this.onDragSelectionMouseUp.bind(_assertThisInitialized(_this));
|
|
1851
|
+
_this.isSelectable = _this.isSelectable.bind(_assertThisInitialized(_this)); // cell
|
|
1809
1852
|
|
|
1810
1853
|
_this.onCellClick = _this.onCellClick.bind(_assertThisInitialized(_this));
|
|
1811
1854
|
_this.onCellMouseDown = _this.onCellMouseDown.bind(_assertThisInitialized(_this));
|
|
@@ -1823,7 +1866,7 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
1823
1866
|
}, {
|
|
1824
1867
|
key: "equals",
|
|
1825
1868
|
value: function equals(data1, data2) {
|
|
1826
|
-
if (this.allowCellSelection()) return (data1.rowIndex === data2.rowIndex || data1.rowData === data2.rowData) && (data1.field === data2.field || data1.cellIndex === data2.cellIndex);else return this.compareSelectionBy === 'equals' ? data1 === data2 : ObjectUtils.equals(data1, data2, this.props.dataKey);
|
|
1869
|
+
if (this.allowCellSelection()) return (data1.rowIndex === data2.rowIndex || data1.rowData === data2.rowData) && (data1.field === data2.field || data1.cellIndex === data2.cellIndex);else return this.props.compareSelectionBy === 'equals' ? data1 === data2 : ObjectUtils.equals(data1, data2, this.props.dataKey);
|
|
1827
1870
|
}
|
|
1828
1871
|
}, {
|
|
1829
1872
|
key: "isSubheaderGrouping",
|
|
@@ -1895,6 +1938,11 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
1895
1938
|
|
|
1896
1939
|
return false;
|
|
1897
1940
|
}
|
|
1941
|
+
}, {
|
|
1942
|
+
key: "isSelectable",
|
|
1943
|
+
value: function isSelectable(options) {
|
|
1944
|
+
return this.props.isDataSelectable ? this.props.isDataSelectable(options) : true;
|
|
1945
|
+
}
|
|
1898
1946
|
}, {
|
|
1899
1947
|
key: "isRowExpanded",
|
|
1900
1948
|
value: function isRowExpanded(rowData) {
|
|
@@ -2064,8 +2112,17 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2064
2112
|
value: function onSingleSelection(_ref) {
|
|
2065
2113
|
var originalEvent = _ref.originalEvent,
|
|
2066
2114
|
data = _ref.data,
|
|
2115
|
+
index = _ref.index,
|
|
2067
2116
|
toggleable = _ref.toggleable,
|
|
2068
2117
|
type = _ref.type;
|
|
2118
|
+
|
|
2119
|
+
if (!this.isSelectable({
|
|
2120
|
+
data: data,
|
|
2121
|
+
index: index
|
|
2122
|
+
})) {
|
|
2123
|
+
return;
|
|
2124
|
+
}
|
|
2125
|
+
|
|
2069
2126
|
var selected = this.isSelected(data);
|
|
2070
2127
|
var selection = this.props.selection;
|
|
2071
2128
|
|
|
@@ -2092,7 +2149,8 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2092
2149
|
if (this.props.onSelectionChange && selection !== this.props.selection) {
|
|
2093
2150
|
this.props.onSelectionChange({
|
|
2094
2151
|
originalEvent: originalEvent,
|
|
2095
|
-
value: selection
|
|
2152
|
+
value: selection,
|
|
2153
|
+
type: type
|
|
2096
2154
|
});
|
|
2097
2155
|
}
|
|
2098
2156
|
}
|
|
@@ -2103,8 +2161,17 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2103
2161
|
|
|
2104
2162
|
var originalEvent = _ref2.originalEvent,
|
|
2105
2163
|
data = _ref2.data,
|
|
2164
|
+
index = _ref2.index,
|
|
2106
2165
|
toggleable = _ref2.toggleable,
|
|
2107
2166
|
type = _ref2.type;
|
|
2167
|
+
|
|
2168
|
+
if (!this.isSelectable({
|
|
2169
|
+
data: data,
|
|
2170
|
+
index: index
|
|
2171
|
+
})) {
|
|
2172
|
+
return;
|
|
2173
|
+
}
|
|
2174
|
+
|
|
2108
2175
|
var selected = this.isSelected(data);
|
|
2109
2176
|
var selection = this.props.selection || [];
|
|
2110
2177
|
|
|
@@ -2148,13 +2215,14 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2148
2215
|
if (this.props.onSelectionChange && selection !== this.props.selection) {
|
|
2149
2216
|
this.props.onSelectionChange({
|
|
2150
2217
|
originalEvent: originalEvent,
|
|
2151
|
-
value: selection
|
|
2218
|
+
value: selection,
|
|
2219
|
+
type: type
|
|
2152
2220
|
});
|
|
2153
2221
|
}
|
|
2154
2222
|
}
|
|
2155
2223
|
}, {
|
|
2156
2224
|
key: "onRangeSelection",
|
|
2157
|
-
value: function onRangeSelection(event) {
|
|
2225
|
+
value: function onRangeSelection(event, type) {
|
|
2158
2226
|
DomHandler.clearSelection();
|
|
2159
2227
|
this.rangeRowIndex = this.allowCellSelection() ? event.rowIndex : event.index;
|
|
2160
2228
|
var selectionInRange = this.selectRange(event);
|
|
@@ -2163,7 +2231,8 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2163
2231
|
if (this.props.onSelectionChange && selection !== this.props.selection) {
|
|
2164
2232
|
this.props.onSelectionChange({
|
|
2165
2233
|
originalEvent: event.originalEvent,
|
|
2166
|
-
value: selection
|
|
2234
|
+
value: selection,
|
|
2235
|
+
type: type
|
|
2167
2236
|
});
|
|
2168
2237
|
}
|
|
2169
2238
|
|
|
@@ -2175,12 +2244,6 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2175
2244
|
key: "selectRange",
|
|
2176
2245
|
value: function selectRange(event) {
|
|
2177
2246
|
var rangeStart, rangeEnd;
|
|
2178
|
-
var isLazyAndPaginator = this.props.lazy && this.props.paginator;
|
|
2179
|
-
|
|
2180
|
-
if (isLazyAndPaginator) {
|
|
2181
|
-
this.anchorRowIndex += this.anchorRowFirst;
|
|
2182
|
-
this.rangeRowIndex += this.props.first;
|
|
2183
|
-
}
|
|
2184
2247
|
|
|
2185
2248
|
if (this.rangeRowIndex > this.anchorRowIndex) {
|
|
2186
2249
|
rangeStart = this.anchorRowIndex;
|
|
@@ -2192,7 +2255,7 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2192
2255
|
rangeStart = rangeEnd = this.rangeRowIndex;
|
|
2193
2256
|
}
|
|
2194
2257
|
|
|
2195
|
-
if (
|
|
2258
|
+
if (this.props.paginator) {
|
|
2196
2259
|
rangeStart = Math.max(rangeStart - this.props.first, 0);
|
|
2197
2260
|
rangeEnd -= this.props.first;
|
|
2198
2261
|
}
|
|
@@ -2207,6 +2270,14 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2207
2270
|
|
|
2208
2271
|
for (var i = rowRangeStart; i <= rowRangeEnd; i++) {
|
|
2209
2272
|
var rangeRowData = value[i];
|
|
2273
|
+
|
|
2274
|
+
if (!this.isSelectable({
|
|
2275
|
+
data: rangeRowData,
|
|
2276
|
+
index: i
|
|
2277
|
+
})) {
|
|
2278
|
+
continue;
|
|
2279
|
+
}
|
|
2280
|
+
|
|
2210
2281
|
selection.push(rangeRowData);
|
|
2211
2282
|
this.onSelect({
|
|
2212
2283
|
originalEvent: event.originalEvent,
|
|
@@ -2243,14 +2314,25 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2243
2314
|
|
|
2244
2315
|
for (var j = cellRangeStart; j <= cellRangeEnd; j++) {
|
|
2245
2316
|
var field = columns[j].props.field;
|
|
2317
|
+
|
|
2318
|
+
var _value = ObjectUtils.resolveFieldData(rowData, field);
|
|
2319
|
+
|
|
2246
2320
|
var rangeRowData = {
|
|
2247
|
-
value:
|
|
2321
|
+
value: _value,
|
|
2248
2322
|
field: field,
|
|
2249
2323
|
rowData: rowData,
|
|
2250
2324
|
rowIndex: i,
|
|
2251
2325
|
cellIndex: j,
|
|
2252
2326
|
selected: true
|
|
2253
2327
|
};
|
|
2328
|
+
|
|
2329
|
+
if (!this.isSelectable({
|
|
2330
|
+
data: rangeRowData,
|
|
2331
|
+
index: i
|
|
2332
|
+
})) {
|
|
2333
|
+
continue;
|
|
2334
|
+
}
|
|
2335
|
+
|
|
2254
2336
|
selection.push(rangeRowData);
|
|
2255
2337
|
this.onSelect({
|
|
2256
2338
|
originalEvent: event.originalEvent,
|
|
@@ -2300,7 +2382,7 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2300
2382
|
value: function focusOnElement(event, isFocused) {
|
|
2301
2383
|
var target = event.currentTarget;
|
|
2302
2384
|
|
|
2303
|
-
if (!this.allowCellSelection()) {
|
|
2385
|
+
if (!this.allowCellSelection() && this.props.selectionAutoFocus) {
|
|
2304
2386
|
if (this.isCheckboxSelectionModeInColumn()) {
|
|
2305
2387
|
var checkbox = DomHandler.findSingle(target, 'td.p-selection-column .p-checkbox-box');
|
|
2306
2388
|
checkbox && checkbox.focus();
|
|
@@ -2312,6 +2394,22 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2312
2394
|
|
|
2313
2395
|
!isFocused && target && target.focus();
|
|
2314
2396
|
}
|
|
2397
|
+
}, {
|
|
2398
|
+
key: "changeTabIndex",
|
|
2399
|
+
value: function changeTabIndex(event, type) {
|
|
2400
|
+
var target = event.currentTarget;
|
|
2401
|
+
var isSelectable = DomHandler.hasClass(target, type === 'cell' ? 'p-selectable-cell' : 'p-selectable-row');
|
|
2402
|
+
|
|
2403
|
+
if (isSelectable) {
|
|
2404
|
+
var selector = type === 'cell' ? 'tr > td' : 'tr';
|
|
2405
|
+
var tabbableEl = DomHandler.findSingle(this.el, "".concat(selector, "[tabindex=\"").concat(this.props.tabIndex, "\"]"));
|
|
2406
|
+
|
|
2407
|
+
if (tabbableEl && target) {
|
|
2408
|
+
tabbableEl.tabIndex = -1;
|
|
2409
|
+
target.tabIndex = this.props.tabIndex;
|
|
2410
|
+
}
|
|
2411
|
+
}
|
|
2412
|
+
}
|
|
2315
2413
|
}, {
|
|
2316
2414
|
key: "onRowClick",
|
|
2317
2415
|
value: function onRowClick(event) {
|
|
@@ -2323,7 +2421,7 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2323
2421
|
|
|
2324
2422
|
if (this.allowRowSelection()) {
|
|
2325
2423
|
if (this.allowRangeSelection(event)) {
|
|
2326
|
-
this.onRangeSelection(event);
|
|
2424
|
+
this.onRangeSelection(event, 'row');
|
|
2327
2425
|
} else {
|
|
2328
2426
|
var toggleable = this.isRadioSelectionModeInColumn() || this.isCheckboxSelectionModeInColumn() || this.allowMetaKeySelection(event);
|
|
2329
2427
|
this.anchorRowIndex = event.index;
|
|
@@ -2342,6 +2440,8 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2342
2440
|
}));
|
|
2343
2441
|
}
|
|
2344
2442
|
}
|
|
2443
|
+
|
|
2444
|
+
this.changeTabIndex(event.originalEvent, 'row');
|
|
2345
2445
|
} else {
|
|
2346
2446
|
this.focusOnElement(event.originalEvent);
|
|
2347
2447
|
}
|
|
@@ -2397,7 +2497,7 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2397
2497
|
if (DomHandler.hasClass(event.target, 'p-datatable-reorderablerow-handle')) event.currentTarget.draggable = true;else event.currentTarget.draggable = false;
|
|
2398
2498
|
|
|
2399
2499
|
if (this.allowRowDrag(e)) {
|
|
2400
|
-
this.enableDragSelection(event);
|
|
2500
|
+
this.enableDragSelection(event, 'row');
|
|
2401
2501
|
this.anchorRowIndex = e.index;
|
|
2402
2502
|
this.rangeRowIndex = e.index;
|
|
2403
2503
|
this.anchorRowFirst = this.props.first;
|
|
@@ -2409,7 +2509,7 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2409
2509
|
var isSameRow = event.index === this.anchorRowIndex;
|
|
2410
2510
|
|
|
2411
2511
|
if (this.allowRowDrag(event) && !isSameRow) {
|
|
2412
|
-
this.onRangeSelection(event);
|
|
2512
|
+
this.onRangeSelection(event, 'row');
|
|
2413
2513
|
}
|
|
2414
2514
|
}
|
|
2415
2515
|
}, {
|
|
@@ -2612,7 +2712,7 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2612
2712
|
|
|
2613
2713
|
if (this.allowCellSelection()) {
|
|
2614
2714
|
if (this.allowRangeSelection(event)) {
|
|
2615
|
-
this.onRangeSelection(event);
|
|
2715
|
+
this.onRangeSelection(event, 'cell');
|
|
2616
2716
|
} else {
|
|
2617
2717
|
var toggleable = this.allowMetaKeySelection(event);
|
|
2618
2718
|
|
|
@@ -2628,6 +2728,7 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2628
2728
|
this.onSingleSelection({
|
|
2629
2729
|
originalEvent: originalEvent,
|
|
2630
2730
|
data: data,
|
|
2731
|
+
index: event.rowIndex,
|
|
2631
2732
|
toggleable: toggleable,
|
|
2632
2733
|
type: 'cell'
|
|
2633
2734
|
});
|
|
@@ -2635,11 +2736,14 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2635
2736
|
this.onMultipleSelection({
|
|
2636
2737
|
originalEvent: originalEvent,
|
|
2637
2738
|
data: data,
|
|
2739
|
+
index: event.rowIndex,
|
|
2638
2740
|
toggleable: toggleable,
|
|
2639
2741
|
type: 'cell'
|
|
2640
2742
|
});
|
|
2641
2743
|
}
|
|
2642
2744
|
}
|
|
2745
|
+
|
|
2746
|
+
this.changeTabIndex(event.originalEvent, 'cell');
|
|
2643
2747
|
}
|
|
2644
2748
|
|
|
2645
2749
|
this.rowTouched = false;
|
|
@@ -2661,7 +2765,7 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2661
2765
|
var isSameCell = event.rowIndex === this.anchorRowIndex && event.cellIndex === this.anchorCellIndex;
|
|
2662
2766
|
|
|
2663
2767
|
if (this.allowCellDrag(event) && !isSameCell) {
|
|
2664
|
-
this.onRangeSelection(event);
|
|
2768
|
+
this.onRangeSelection(event, 'cell');
|
|
2665
2769
|
}
|
|
2666
2770
|
}
|
|
2667
2771
|
}, {
|
|
@@ -2705,6 +2809,10 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2705
2809
|
if (!this.props.isVirtualScrollerDisabled && this.getVirtualScrollerOption('vertical') && this.getVirtualScrollerOption('itemSize', prevProps.virtualScrollerOptions) !== this.getVirtualScrollerOption('itemSize')) {
|
|
2706
2810
|
this.updateVirtualScrollerPosition();
|
|
2707
2811
|
}
|
|
2812
|
+
|
|
2813
|
+
if (this.props.paginator && this.isMultipleSelection() && this.props.first !== prevProps.first) {
|
|
2814
|
+
this.anchorRowIndex = null;
|
|
2815
|
+
}
|
|
2708
2816
|
}
|
|
2709
2817
|
}, {
|
|
2710
2818
|
key: "componentWillUnmount",
|
|
@@ -2736,7 +2844,7 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2736
2844
|
}, {
|
|
2737
2845
|
key: "renderGroupHeader",
|
|
2738
2846
|
value: function renderGroupHeader(rowData, index, expanded, isSubheaderGrouping, colSpan) {
|
|
2739
|
-
if (isSubheaderGrouping && this.shouldRenderRowGroupHeader(this.props.value, rowData, index)) {
|
|
2847
|
+
if (isSubheaderGrouping && this.shouldRenderRowGroupHeader(this.props.value, rowData, index - this.props.first)) {
|
|
2740
2848
|
var style = this.rowGroupHeaderStyle();
|
|
2741
2849
|
var toggler = this.props.expandableRowGroups && /*#__PURE__*/React.createElement(RowTogglerButton, {
|
|
2742
2850
|
onClick: this.onRowToggle,
|
|
@@ -2784,6 +2892,7 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2784
2892
|
onRowDoubleClick: this.onRowDoubleClick,
|
|
2785
2893
|
onRowRightClick: this.onRowRightClick,
|
|
2786
2894
|
tabIndex: this.props.tabIndex,
|
|
2895
|
+
isSelectable: this.isSelectable,
|
|
2787
2896
|
onRowTouchEnd: this.onRowTouchEnd,
|
|
2788
2897
|
onRowMouseDown: this.onRowMouseDown,
|
|
2789
2898
|
onRowMouseUp: this.onRowMouseUp,
|
|
@@ -2855,7 +2964,7 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2855
2964
|
}, {
|
|
2856
2965
|
key: "renderGroupFooter",
|
|
2857
2966
|
value: function renderGroupFooter(rowData, index, expanded, isSubheaderGrouping, colSpan) {
|
|
2858
|
-
if (isSubheaderGrouping && this.shouldRenderRowGroupFooter(this.props.value, rowData, index, expanded)) {
|
|
2967
|
+
if (isSubheaderGrouping && this.shouldRenderRowGroupFooter(this.props.value, rowData, index - this.props.first, expanded)) {
|
|
2859
2968
|
var content = ObjectUtils.getJSXElement(this.props.rowGroupFooterTemplate, rowData, {
|
|
2860
2969
|
index: index,
|
|
2861
2970
|
colSpan: colSpan,
|
|
@@ -2913,9 +3022,9 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2913
3022
|
return TableBody;
|
|
2914
3023
|
}(Component);
|
|
2915
3024
|
|
|
2916
|
-
function ownKeys$4(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
3025
|
+
function ownKeys$4(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2917
3026
|
|
|
2918
|
-
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
3027
|
+
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$4(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$4(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2919
3028
|
|
|
2920
3029
|
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); }; }
|
|
2921
3030
|
|
|
@@ -3002,9 +3111,10 @@ var FooterCell = /*#__PURE__*/function (_Component) {
|
|
|
3002
3111
|
var _this2 = this;
|
|
3003
3112
|
|
|
3004
3113
|
var style = this.getStyle();
|
|
3005
|
-
var
|
|
3114
|
+
var align = this.getColumnProp('align');
|
|
3115
|
+
var className = classNames(this.getColumnProp('footerClassName'), this.getColumnProp('className'), _defineProperty({
|
|
3006
3116
|
'p-frozen-column': this.getColumnProp('frozen')
|
|
3007
|
-
});
|
|
3117
|
+
}, "p-align-".concat(align), !!align));
|
|
3008
3118
|
var colSpan = this.getColumnProp('colSpan');
|
|
3009
3119
|
var rowSpan = this.getColumnProp('rowSpan');
|
|
3010
3120
|
var content = ObjectUtils.getJSXElement(this.getColumnProp('footer'), {
|
|
@@ -3151,7 +3261,7 @@ var HeaderCheckbox = /*#__PURE__*/function (_Component) {
|
|
|
3151
3261
|
});
|
|
3152
3262
|
this.props.onChange({
|
|
3153
3263
|
originalEvent: event,
|
|
3154
|
-
checked: this.props.checked
|
|
3264
|
+
checked: !this.props.checked
|
|
3155
3265
|
});
|
|
3156
3266
|
}
|
|
3157
3267
|
}
|
|
@@ -3195,29 +3305,9 @@ var HeaderCheckbox = /*#__PURE__*/function (_Component) {
|
|
|
3195
3305
|
return HeaderCheckbox;
|
|
3196
3306
|
}(Component);
|
|
3197
3307
|
|
|
3198
|
-
var
|
|
3199
|
-
STARTS_WITH: 'startsWith',
|
|
3200
|
-
CONTAINS: 'contains',
|
|
3201
|
-
NOT_CONTAINS: 'notContains',
|
|
3202
|
-
ENDS_WITH: 'endsWith',
|
|
3203
|
-
EQUALS: 'equals',
|
|
3204
|
-
NOT_EQUALS: 'notEquals',
|
|
3205
|
-
IN: 'in',
|
|
3206
|
-
LESS_THAN: 'lt',
|
|
3207
|
-
LESS_THAN_OR_EQUAL_TO: 'lte',
|
|
3208
|
-
GREATER_THAN: 'gt',
|
|
3209
|
-
GREATER_THAN_OR_EQUAL_TO: 'gte',
|
|
3210
|
-
BETWEEN: 'between',
|
|
3211
|
-
DATE_IS: 'dateIs',
|
|
3212
|
-
DATE_IS_NOT: 'dateIsNot',
|
|
3213
|
-
DATE_BEFORE: 'dateBefore',
|
|
3214
|
-
DATE_AFTER: 'dateAfter',
|
|
3215
|
-
CUSTOM: 'custom'
|
|
3216
|
-
});
|
|
3217
|
-
|
|
3218
|
-
function ownKeys$3(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; }
|
|
3308
|
+
function ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3219
3309
|
|
|
3220
|
-
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
3310
|
+
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$3(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3221
3311
|
|
|
3222
3312
|
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); }; }
|
|
3223
3313
|
|
|
@@ -3297,7 +3387,7 @@ var ColumnFilter = /*#__PURE__*/function (_Component) {
|
|
|
3297
3387
|
}, {
|
|
3298
3388
|
key: "isRowMatchModeSelected",
|
|
3299
3389
|
value: function isRowMatchModeSelected(matchMode) {
|
|
3300
|
-
return this.filterModel.matchMode === matchMode;
|
|
3390
|
+
return this.filterModel && this.filterModel.matchMode === matchMode;
|
|
3301
3391
|
}
|
|
3302
3392
|
}, {
|
|
3303
3393
|
key: "showMenuButton",
|
|
@@ -3590,7 +3680,7 @@ var ColumnFilter = /*#__PURE__*/function (_Component) {
|
|
|
3590
3680
|
filters[this.field].constraints.push(newConstraint);
|
|
3591
3681
|
filterConstraintAddCallback && filterConstraintAddCallback({
|
|
3592
3682
|
field: this.field,
|
|
3593
|
-
|
|
3683
|
+
constraint: newConstraint
|
|
3594
3684
|
});
|
|
3595
3685
|
this.props.onFilterChange(filters);
|
|
3596
3686
|
|
|
@@ -3608,7 +3698,7 @@ var ColumnFilter = /*#__PURE__*/function (_Component) {
|
|
|
3608
3698
|
var removedConstraint = filters[this.field].constraints.splice(index, 1);
|
|
3609
3699
|
filterConstraintRemoveCallback && filterConstraintRemoveCallback({
|
|
3610
3700
|
field: this.field,
|
|
3611
|
-
|
|
3701
|
+
constraint: removedConstraint
|
|
3612
3702
|
});
|
|
3613
3703
|
this.props.onFilterChange(filters);
|
|
3614
3704
|
|
|
@@ -3742,7 +3832,7 @@ var ColumnFilter = /*#__PURE__*/function (_Component) {
|
|
|
3742
3832
|
|
|
3743
3833
|
if (!this.resizeListener) {
|
|
3744
3834
|
this.resizeListener = function () {
|
|
3745
|
-
if (_this5.state.overlayVisible) {
|
|
3835
|
+
if (_this5.state.overlayVisible && !DomHandler.isTouchDevice()) {
|
|
3746
3836
|
_this5.hide();
|
|
3747
3837
|
}
|
|
3748
3838
|
};
|
|
@@ -3850,16 +3940,17 @@ var ColumnFilter = /*#__PURE__*/function (_Component) {
|
|
|
3850
3940
|
value: function renderFilterElement(model, index) {
|
|
3851
3941
|
var _this6 = this;
|
|
3852
3942
|
|
|
3943
|
+
var value = model ? model.value : null;
|
|
3853
3944
|
return this.getColumnProp('filterElement') ? ObjectUtils.getJSXElement(this.getColumnProp('filterElement'), {
|
|
3854
3945
|
field: this.field,
|
|
3855
3946
|
index: index,
|
|
3856
3947
|
filterModel: model,
|
|
3857
|
-
value:
|
|
3948
|
+
value: value,
|
|
3858
3949
|
filterApplyCallback: this.filterApplyCallback,
|
|
3859
3950
|
filterCallback: this.filterCallback
|
|
3860
3951
|
}) : /*#__PURE__*/React.createElement(InputText, {
|
|
3861
3952
|
type: this.getColumnProp('filterType'),
|
|
3862
|
-
value:
|
|
3953
|
+
value: value || '',
|
|
3863
3954
|
onChange: function onChange(e) {
|
|
3864
3955
|
return _this6.onInputChange(e, index);
|
|
3865
3956
|
},
|
|
@@ -4158,7 +4249,7 @@ var ColumnFilter = /*#__PURE__*/function (_Component) {
|
|
|
4158
4249
|
return /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(CSSTransition, {
|
|
4159
4250
|
nodeRef: this.overlayRef,
|
|
4160
4251
|
classNames: "p-connected-overlay",
|
|
4161
|
-
in: this.state.overlayVisible,
|
|
4252
|
+
"in": this.state.overlayVisible,
|
|
4162
4253
|
timeout: {
|
|
4163
4254
|
enter: 120,
|
|
4164
4255
|
exit: 100
|
|
@@ -4196,9 +4287,9 @@ var ColumnFilter = /*#__PURE__*/function (_Component) {
|
|
|
4196
4287
|
return ColumnFilter;
|
|
4197
4288
|
}(Component);
|
|
4198
4289
|
|
|
4199
|
-
function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
4290
|
+
function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4200
4291
|
|
|
4201
|
-
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
4292
|
+
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4202
4293
|
|
|
4203
4294
|
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); }; }
|
|
4204
4295
|
|
|
@@ -4523,7 +4614,7 @@ var HeaderCell = /*#__PURE__*/function (_Component) {
|
|
|
4523
4614
|
}, {
|
|
4524
4615
|
key: "renderCheckbox",
|
|
4525
4616
|
value: function renderCheckbox() {
|
|
4526
|
-
if (this.getColumnProp('selectionMode') === 'multiple' && this.props.filterDisplay !== 'row') {
|
|
4617
|
+
if (this.props.showSelectAll && this.getColumnProp('selectionMode') === 'multiple' && this.props.filterDisplay !== 'row') {
|
|
4527
4618
|
var allRowsSelected = this.props.allRowsSelected(this.props.value);
|
|
4528
4619
|
return /*#__PURE__*/React.createElement(HeaderCheckbox, {
|
|
4529
4620
|
checked: allRowsSelected,
|
|
@@ -4570,7 +4661,8 @@ var HeaderCell = /*#__PURE__*/function (_Component) {
|
|
|
4570
4661
|
var isSortableDisabled = this.isSortableDisabled();
|
|
4571
4662
|
var sortMeta = this.getSortMeta();
|
|
4572
4663
|
var style = this.getStyle();
|
|
4573
|
-
var
|
|
4664
|
+
var align = this.getColumnProp('alignHeader') || this.getColumnProp('align');
|
|
4665
|
+
var className = classNames(this.getColumnProp('headerClassName'), this.getColumnProp('className'), _defineProperty({
|
|
4574
4666
|
'p-sortable-column': this.getColumnProp('sortable'),
|
|
4575
4667
|
'p-resizable-column': this.props.resizableColumns,
|
|
4576
4668
|
'p-highlight': sortMeta.sorted,
|
|
@@ -4578,7 +4670,7 @@ var HeaderCell = /*#__PURE__*/function (_Component) {
|
|
|
4578
4670
|
'p-selection-column': this.getColumnProp('selectionMode'),
|
|
4579
4671
|
'p-sortable-disabled': this.getColumnProp('sortable') && isSortableDisabled,
|
|
4580
4672
|
'p-reorderable-column': this.props.reorderableColumns && this.getColumnProp('reorderable')
|
|
4581
|
-
});
|
|
4673
|
+
}, "p-align-".concat(align), !!align));
|
|
4582
4674
|
var tabIndex = this.getColumnProp('sortable') && !isSortableDisabled ? this.props.tabIndex : null;
|
|
4583
4675
|
var colSpan = this.getColumnProp('colSpan');
|
|
4584
4676
|
var rowSpan = this.getColumnProp('rowSpan');
|
|
@@ -4615,9 +4707,9 @@ var HeaderCell = /*#__PURE__*/function (_Component) {
|
|
|
4615
4707
|
return HeaderCell;
|
|
4616
4708
|
}(Component);
|
|
4617
4709
|
|
|
4618
|
-
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
4710
|
+
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4619
4711
|
|
|
4620
|
-
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
4712
|
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4621
4713
|
|
|
4622
4714
|
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); }; }
|
|
4623
4715
|
|
|
@@ -4745,6 +4837,7 @@ var TableHeader = /*#__PURE__*/function (_Component) {
|
|
|
4745
4837
|
onColumnResizeStart: _this3.props.onColumnResizeStart,
|
|
4746
4838
|
onColumnResizerClick: _this3.props.onColumnResizerClick,
|
|
4747
4839
|
onColumnResizerDoubleClick: _this3.props.onColumnResizerDoubleClick,
|
|
4840
|
+
showSelectAll: _this3.props.showSelectAll,
|
|
4748
4841
|
allRowsSelected: _this3.props.allRowsSelected,
|
|
4749
4842
|
onColumnCheckboxChange: _this3.onCheckboxChange,
|
|
4750
4843
|
reorderableColumns: _this3.props.reorderableColumns,
|
|
@@ -4752,6 +4845,36 @@ var TableHeader = /*#__PURE__*/function (_Component) {
|
|
|
4752
4845
|
});
|
|
4753
4846
|
});
|
|
4754
4847
|
}
|
|
4848
|
+
}, {
|
|
4849
|
+
key: "renderCheckbox",
|
|
4850
|
+
value: function renderCheckbox(selectionMode) {
|
|
4851
|
+
if (this.props.showSelectAll && selectionMode === 'multiple') {
|
|
4852
|
+
var allRowsSelected = this.props.allRowsSelected(this.props.value);
|
|
4853
|
+
return /*#__PURE__*/React.createElement(HeaderCheckbox, {
|
|
4854
|
+
checked: allRowsSelected,
|
|
4855
|
+
onChange: this.onCheckboxChange,
|
|
4856
|
+
disabled: this.props.empty
|
|
4857
|
+
});
|
|
4858
|
+
}
|
|
4859
|
+
|
|
4860
|
+
return null;
|
|
4861
|
+
}
|
|
4862
|
+
}, {
|
|
4863
|
+
key: "renderFilter",
|
|
4864
|
+
value: function renderFilter(column, filter) {
|
|
4865
|
+
if (filter) {
|
|
4866
|
+
return /*#__PURE__*/React.createElement(ColumnFilter, {
|
|
4867
|
+
display: "row",
|
|
4868
|
+
column: column,
|
|
4869
|
+
filters: this.props.filters,
|
|
4870
|
+
filtersStore: this.props.filtersStore,
|
|
4871
|
+
onFilterChange: this.props.onFilterChange,
|
|
4872
|
+
onFilterApply: this.props.onFilterApply
|
|
4873
|
+
});
|
|
4874
|
+
}
|
|
4875
|
+
|
|
4876
|
+
return null;
|
|
4877
|
+
}
|
|
4755
4878
|
}, {
|
|
4756
4879
|
key: "renderFilterCells",
|
|
4757
4880
|
value: function renderFilterCells() {
|
|
@@ -4779,24 +4902,15 @@ var TableHeader = /*#__PURE__*/function (_Component) {
|
|
|
4779
4902
|
});
|
|
4780
4903
|
var colKey = columnKey || field || i;
|
|
4781
4904
|
|
|
4782
|
-
var
|
|
4905
|
+
var checkbox = _this4.renderCheckbox(selectionMode);
|
|
4906
|
+
|
|
4907
|
+
var filterRow = _this4.renderFilter(col, filter);
|
|
4783
4908
|
|
|
4784
4909
|
return /*#__PURE__*/React.createElement("th", {
|
|
4785
4910
|
key: colKey,
|
|
4786
4911
|
style: colStyle,
|
|
4787
4912
|
className: colClassName
|
|
4788
|
-
},
|
|
4789
|
-
checked: allRowsSelected,
|
|
4790
|
-
onChange: _this4.onCheckboxChange,
|
|
4791
|
-
disabled: _this4.props.empty
|
|
4792
|
-
}), filter && /*#__PURE__*/React.createElement(ColumnFilter, {
|
|
4793
|
-
display: "row",
|
|
4794
|
-
column: col,
|
|
4795
|
-
filters: _this4.props.filters,
|
|
4796
|
-
filtersStore: _this4.props.filtersStore,
|
|
4797
|
-
onFilterChange: _this4.props.onFilterChange,
|
|
4798
|
-
onFilterApply: _this4.props.onFilterApply
|
|
4799
|
-
}));
|
|
4913
|
+
}, checkbox, filterRow);
|
|
4800
4914
|
}
|
|
4801
4915
|
|
|
4802
4916
|
return null;
|
|
@@ -4838,9 +4952,9 @@ var TableHeader = /*#__PURE__*/function (_Component) {
|
|
|
4838
4952
|
return TableHeader;
|
|
4839
4953
|
}(Component);
|
|
4840
4954
|
|
|
4841
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
4955
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4842
4956
|
|
|
4843
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
4957
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4844
4958
|
|
|
4845
4959
|
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); }; }
|
|
4846
4960
|
|
|
@@ -4860,7 +4974,8 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
4860
4974
|
d_rows: props.rows,
|
|
4861
4975
|
columnOrder: [],
|
|
4862
4976
|
groupRowsSortMeta: null,
|
|
4863
|
-
editingMeta: {}
|
|
4977
|
+
editingMeta: {},
|
|
4978
|
+
attributeSelector: null
|
|
4864
4979
|
};
|
|
4865
4980
|
|
|
4866
4981
|
if (!_this.props.onPage) {
|
|
@@ -4878,13 +4993,8 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
4878
4993
|
|
|
4879
4994
|
if (!_this.props.onFilter) {
|
|
4880
4995
|
_this.state.filters = props.filters;
|
|
4881
|
-
}
|
|
4996
|
+
} // header
|
|
4882
4997
|
|
|
4883
|
-
if (_this.isStateful()) {
|
|
4884
|
-
_this.restoreState(_this.state);
|
|
4885
|
-
}
|
|
4886
|
-
|
|
4887
|
-
_this.attributeSelector = UniqueComponentId(); // header
|
|
4888
4998
|
|
|
4889
4999
|
_this.onSortChange = _this.onSortChange.bind(_assertThisInitialized(_this));
|
|
4890
5000
|
_this.onFilterChange = _this.onFilterChange.bind(_assertThisInitialized(_this));
|
|
@@ -4919,6 +5029,11 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
4919
5029
|
value: function isVirtualScrollerDisabled() {
|
|
4920
5030
|
return ObjectUtils.isEmpty(this.props.virtualScrollerOptions) || !this.props.scrollable;
|
|
4921
5031
|
}
|
|
5032
|
+
}, {
|
|
5033
|
+
key: "isEquals",
|
|
5034
|
+
value: function isEquals(data1, data2) {
|
|
5035
|
+
return this.props.compareSelectionBy === 'equals' ? data1 === data2 : ObjectUtils.equals(data1, data2, this.props.dataKey);
|
|
5036
|
+
}
|
|
4922
5037
|
}, {
|
|
4923
5038
|
key: "hasFilter",
|
|
4924
5039
|
value: function hasFilter() {
|
|
@@ -5126,7 +5241,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5126
5241
|
};
|
|
5127
5242
|
};
|
|
5128
5243
|
|
|
5129
|
-
this.props.onPage(getOnPageParams(restoredState.first, restoredState.rows));
|
|
5244
|
+
this.props.onPage(this.createEvent(getOnPageParams(restoredState.first, restoredState.rows)));
|
|
5130
5245
|
} else {
|
|
5131
5246
|
state.first = restoredState.first;
|
|
5132
5247
|
state.rows = restoredState.rows;
|
|
@@ -5135,10 +5250,10 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5135
5250
|
|
|
5136
5251
|
if (restoredState.sortField) {
|
|
5137
5252
|
if (this.props.onSort) {
|
|
5138
|
-
this.props.onSort({
|
|
5253
|
+
this.props.onSort(this.createEvent({
|
|
5139
5254
|
sortField: restoredState.sortField,
|
|
5140
5255
|
sortOrder: restoredState.sortOrder
|
|
5141
|
-
});
|
|
5256
|
+
}));
|
|
5142
5257
|
} else {
|
|
5143
5258
|
state.sortField = restoredState.sortField;
|
|
5144
5259
|
state.sortOrder = restoredState.sortOrder;
|
|
@@ -5147,9 +5262,9 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5147
5262
|
|
|
5148
5263
|
if (restoredState.multiSortMeta) {
|
|
5149
5264
|
if (this.props.onSort) {
|
|
5150
|
-
this.props.onSort({
|
|
5265
|
+
this.props.onSort(this.createEvent({
|
|
5151
5266
|
multiSortMeta: restoredState.multiSortMeta
|
|
5152
|
-
});
|
|
5267
|
+
}));
|
|
5153
5268
|
} else {
|
|
5154
5269
|
state.multiSortMeta = restoredState.multiSortMeta;
|
|
5155
5270
|
}
|
|
@@ -5159,9 +5274,9 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5159
5274
|
state.d_filters = this.cloneFilters(restoredState.filters);
|
|
5160
5275
|
|
|
5161
5276
|
if (this.props.onFilter) {
|
|
5162
|
-
this.props.onFilter({
|
|
5277
|
+
this.props.onFilter(this.createEvent({
|
|
5163
5278
|
filters: restoredState.filters
|
|
5164
|
-
});
|
|
5279
|
+
}));
|
|
5165
5280
|
} else {
|
|
5166
5281
|
state.filters = this.cloneFilters(restoredState.filters);
|
|
5167
5282
|
}
|
|
@@ -5223,18 +5338,14 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5223
5338
|
this.el.style.width = this.tableWidthState;
|
|
5224
5339
|
}
|
|
5225
5340
|
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
if (this.props.scrollable && widths && widths.length > 0) {
|
|
5341
|
+
if (ObjectUtils.isNotEmpty(widths)) {
|
|
5342
|
+
this.createStyleElement();
|
|
5229
5343
|
var innerHTML = '';
|
|
5230
5344
|
widths.forEach(function (width, index) {
|
|
5231
|
-
|
|
5345
|
+
var style = _this4.props.scrollable ? "flex: 1 1 ".concat(width, "px !important") : "width: ".concat(width, "px !important");
|
|
5346
|
+
innerHTML += "\n .p-datatable[".concat(_this4.state.attributeSelector, "] .p-datatable-thead > tr > th:nth-child(").concat(index + 1, "),\n .p-datatable[").concat(_this4.state.attributeSelector, "] .p-datatable-tbody > tr > td:nth-child(").concat(index + 1, "),\n .p-datatable[").concat(_this4.state.attributeSelector, "] .p-datatable-tfoot > tr > td:nth-child(").concat(index + 1, ") {\n ").concat(style, "\n }\n ");
|
|
5232
5347
|
});
|
|
5233
5348
|
this.styleElement.innerHTML = innerHTML;
|
|
5234
|
-
} else {
|
|
5235
|
-
DomHandler.find(this.table, '.p-datatable-thead > tr > th').forEach(function (header, index) {
|
|
5236
|
-
return header.style.width = widths[index] + 'px';
|
|
5237
|
-
});
|
|
5238
5349
|
}
|
|
5239
5350
|
}
|
|
5240
5351
|
}
|
|
@@ -5259,20 +5370,45 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5259
5370
|
value: function getGroupRowSortField() {
|
|
5260
5371
|
return this.props.sortMode === 'single' ? this.props.sortField : this.state.groupRowsSortMeta ? this.state.groupRowsSortMeta.field : null;
|
|
5261
5372
|
}
|
|
5373
|
+
}, {
|
|
5374
|
+
key: "getSelectableData",
|
|
5375
|
+
value: function getSelectableData(val) {
|
|
5376
|
+
var _this5 = this;
|
|
5377
|
+
|
|
5378
|
+
if (this.props.showSelectionElement || this.props.isDataSelectable) {
|
|
5379
|
+
return val.filter(function (data, index) {
|
|
5380
|
+
var isSelectable = true;
|
|
5381
|
+
if (_this5.props.showSelectionElement) isSelectable = _this5.props.showSelectionElement({
|
|
5382
|
+
rowIndex: index,
|
|
5383
|
+
props: _this5.props
|
|
5384
|
+
});
|
|
5385
|
+
if (_this5.props.isDataSelectable && isSelectable) isSelectable = _this5.props.isDataSelectable({
|
|
5386
|
+
data: data,
|
|
5387
|
+
index: index
|
|
5388
|
+
});
|
|
5389
|
+
return isSelectable;
|
|
5390
|
+
});
|
|
5391
|
+
}
|
|
5392
|
+
|
|
5393
|
+
return val;
|
|
5394
|
+
}
|
|
5262
5395
|
}, {
|
|
5263
5396
|
key: "allRowsSelected",
|
|
5264
5397
|
value: function allRowsSelected(processedData) {
|
|
5265
|
-
var
|
|
5398
|
+
var _this6 = this;
|
|
5266
5399
|
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5400
|
+
if (this.props.onSelectAllChange) {
|
|
5401
|
+
return this.props.selectAll;
|
|
5402
|
+
} else {
|
|
5403
|
+
var data = this.props.selectionPageOnly ? this.dataToRender(processedData) : processedData;
|
|
5404
|
+
var val = this.props.frozenValue ? [].concat(_toConsumableArray(this.props.frozenValue), _toConsumableArray(data)) : data;
|
|
5405
|
+
var selectableVal = this.getSelectableData(val);
|
|
5406
|
+
return selectableVal && this.props.selection && selectableVal.every(function (sv) {
|
|
5407
|
+
return _this6.props.selection.some(function (s) {
|
|
5408
|
+
return _this6.isEquals(s, sv);
|
|
5409
|
+
});
|
|
5272
5410
|
});
|
|
5273
|
-
}
|
|
5274
|
-
var length = this.props.lazy ? this.props.totalRecords : selectableVal ? selectableVal.length : 0;
|
|
5275
|
-
return selectableVal && length > 0 && this.props.selection && this.props.selection.length > 0 && this.props.selection.length === length;
|
|
5411
|
+
}
|
|
5276
5412
|
}
|
|
5277
5413
|
}, {
|
|
5278
5414
|
key: "getSelectionModeInColumn",
|
|
@@ -5403,7 +5539,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5403
5539
|
}, {
|
|
5404
5540
|
key: "resizeTableCells",
|
|
5405
5541
|
value: function resizeTableCells(newColumnWidth, nextColumnWidth) {
|
|
5406
|
-
var
|
|
5542
|
+
var _this7 = this;
|
|
5407
5543
|
|
|
5408
5544
|
var widths = [];
|
|
5409
5545
|
var colIndex = DomHandler.index(this.resizeColumnElement);
|
|
@@ -5416,30 +5552,30 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5416
5552
|
var innerHTML = '';
|
|
5417
5553
|
widths.forEach(function (width, index) {
|
|
5418
5554
|
var colWidth = index === colIndex ? newColumnWidth : nextColumnWidth && index === colIndex + 1 ? nextColumnWidth : width;
|
|
5419
|
-
var style =
|
|
5420
|
-
innerHTML += "\n .p-datatable[".concat(
|
|
5555
|
+
var style = _this7.props.scrollable ? "flex: 1 1 ".concat(colWidth, "px !important") : "width: ".concat(colWidth, "px !important");
|
|
5556
|
+
innerHTML += "\n .p-datatable[".concat(_this7.state.attributeSelector, "] .p-datatable-thead > tr > th:nth-child(").concat(index + 1, "),\n .p-datatable[").concat(_this7.state.attributeSelector, "] .p-datatable-tbody > tr > td:nth-child(").concat(index + 1, "),\n .p-datatable[").concat(_this7.state.attributeSelector, "] .p-datatable-tfoot > tr > td:nth-child(").concat(index + 1, ") {\n ").concat(style, "\n }\n ");
|
|
5421
5557
|
});
|
|
5422
5558
|
this.styleElement.innerHTML = innerHTML;
|
|
5423
5559
|
}
|
|
5424
5560
|
}, {
|
|
5425
5561
|
key: "bindColumnResizeEvents",
|
|
5426
5562
|
value: function bindColumnResizeEvents() {
|
|
5427
|
-
var
|
|
5563
|
+
var _this8 = this;
|
|
5428
5564
|
|
|
5429
5565
|
if (!this.documentColumnResizeListener) {
|
|
5430
5566
|
this.documentColumnResizeListener = document.addEventListener('mousemove', function (event) {
|
|
5431
|
-
if (
|
|
5432
|
-
|
|
5567
|
+
if (_this8.columnResizing) {
|
|
5568
|
+
_this8.onColumnResize(event);
|
|
5433
5569
|
}
|
|
5434
5570
|
});
|
|
5435
5571
|
}
|
|
5436
5572
|
|
|
5437
5573
|
if (!this.documentColumnResizeEndListener) {
|
|
5438
5574
|
this.documentColumnResizeEndListener = document.addEventListener('mouseup', function () {
|
|
5439
|
-
if (
|
|
5440
|
-
|
|
5575
|
+
if (_this8.columnResizing) {
|
|
5576
|
+
_this8.columnResizing = false;
|
|
5441
5577
|
|
|
5442
|
-
|
|
5578
|
+
_this8.onColumnResizeEnd();
|
|
5443
5579
|
}
|
|
5444
5580
|
});
|
|
5445
5581
|
}
|
|
@@ -5471,39 +5607,43 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5471
5607
|
}, {
|
|
5472
5608
|
key: "onColumnHeaderCheckboxChange",
|
|
5473
5609
|
value: function onColumnHeaderCheckboxChange(e, processedData) {
|
|
5474
|
-
var
|
|
5610
|
+
var _this9 = this;
|
|
5475
5611
|
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
|
|
5612
|
+
if (this.props.onSelectAllChange) {
|
|
5613
|
+
this.props.onSelectAllChange(e);
|
|
5614
|
+
} else {
|
|
5615
|
+
var originalEvent = e.originalEvent,
|
|
5616
|
+
checked = e.checked;
|
|
5617
|
+
var data = this.props.selectionPageOnly ? this.dataToRender(processedData) : processedData;
|
|
5618
|
+
var selection = this.props.selectionPageOnly && this.props.selection ? this.props.selection.filter(function (s) {
|
|
5619
|
+
return !data.some(function (d) {
|
|
5620
|
+
return _this9.isEquals(s, d);
|
|
5621
|
+
});
|
|
5622
|
+
}) : [];
|
|
5479
5623
|
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5624
|
+
if (checked) {
|
|
5625
|
+
selection = this.props.frozenValue ? [].concat(_toConsumableArray(selection), _toConsumableArray(this.props.frozenValue), _toConsumableArray(data)) : [].concat(_toConsumableArray(selection), _toConsumableArray(data));
|
|
5626
|
+
selection = this.getSelectableData(selection);
|
|
5627
|
+
this.props.onAllRowsSelect && this.props.onAllRowsSelect({
|
|
5628
|
+
originalEvent: originalEvent,
|
|
5629
|
+
data: selection,
|
|
5630
|
+
type: 'all'
|
|
5486
5631
|
});
|
|
5487
|
-
}
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
selection = [];
|
|
5495
|
-
this.props.onAllRowsUnselect && this.props.onAllRowsUnselect({
|
|
5496
|
-
originalEvent: originalEvent,
|
|
5497
|
-
data: selection,
|
|
5498
|
-
type: 'all'
|
|
5499
|
-
});
|
|
5500
|
-
}
|
|
5632
|
+
} else {
|
|
5633
|
+
this.props.onAllRowsUnselect && this.props.onAllRowsUnselect({
|
|
5634
|
+
originalEvent: originalEvent,
|
|
5635
|
+
data: selection,
|
|
5636
|
+
type: 'all'
|
|
5637
|
+
});
|
|
5638
|
+
}
|
|
5501
5639
|
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5640
|
+
if (this.props.onSelectionChange) {
|
|
5641
|
+
this.props.onSelectionChange({
|
|
5642
|
+
originalEvent: originalEvent,
|
|
5643
|
+
value: selection,
|
|
5644
|
+
type: 'all'
|
|
5645
|
+
});
|
|
5646
|
+
}
|
|
5507
5647
|
}
|
|
5508
5648
|
}
|
|
5509
5649
|
}, {
|
|
@@ -5569,7 +5709,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5569
5709
|
}, {
|
|
5570
5710
|
key: "onColumnHeaderDrop",
|
|
5571
5711
|
value: function onColumnHeaderDrop(e) {
|
|
5572
|
-
var
|
|
5712
|
+
var _this10 = this;
|
|
5573
5713
|
|
|
5574
5714
|
var event = e.originalEvent,
|
|
5575
5715
|
column = e.column;
|
|
@@ -5592,7 +5732,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5592
5732
|
};
|
|
5593
5733
|
|
|
5594
5734
|
var dragColIndex = columns.findIndex(function (child) {
|
|
5595
|
-
return isSameColumn(child,
|
|
5735
|
+
return isSameColumn(child, _this10.draggedColumn);
|
|
5596
5736
|
});
|
|
5597
5737
|
var dropColIndex = columns.findIndex(function (child) {
|
|
5598
5738
|
return isSameColumn(child, column);
|
|
@@ -5636,40 +5776,32 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5636
5776
|
}, {
|
|
5637
5777
|
key: "createStyleElement",
|
|
5638
5778
|
value: function createStyleElement() {
|
|
5639
|
-
this.styleElement =
|
|
5640
|
-
document.head.appendChild(this.styleElement);
|
|
5779
|
+
this.styleElement = DomHandler.createInlineStyle(PrimeReact.nonce);
|
|
5641
5780
|
}
|
|
5642
5781
|
}, {
|
|
5643
5782
|
key: "createResponsiveStyle",
|
|
5644
5783
|
value: function createResponsiveStyle() {
|
|
5645
5784
|
if (!this.responsiveStyleElement) {
|
|
5646
|
-
this.responsiveStyleElement =
|
|
5647
|
-
|
|
5648
|
-
var innerHTML = "\n@media screen and (max-width: ".concat(this.props.breakpoint, ") {\n .p-datatable[").concat(this.attributeSelector, "] .p-datatable-thead > tr > th,\n .p-datatable[").concat(this.attributeSelector, "] .p-datatable-tfoot > tr > td {\n display: none !important;\n }\n\n .p-datatable[").concat(this.attributeSelector, "] .p-datatable-tbody > tr > td {\n display: flex;\n width: 100% !important;\n align-items: center;\n justify-content: space-between;\n }\n\n .p-datatable[").concat(this.attributeSelector, "] .p-datatable-tbody > tr > td:not(:last-child) {\n border: 0 none;\n }\n\n .p-datatable[").concat(this.attributeSelector, "].p-datatable-gridlines .p-datatable-tbody > tr > td:last-child {\n border-top: 0;\n border-right: 0;\n border-left: 0;\n }\n\n .p-datatable[").concat(this.attributeSelector, "] .p-datatable-tbody > tr > td > .p-column-title {\n display: block;\n }\n}\n");
|
|
5785
|
+
this.responsiveStyleElement = DomHandler.createInlineStyle(PrimeReact.nonce);
|
|
5786
|
+
var innerHTML = "\n@media screen and (max-width: ".concat(this.props.breakpoint, ") {\n .p-datatable[").concat(this.state.attributeSelector, "] .p-datatable-thead > tr > th,\n .p-datatable[").concat(this.state.attributeSelector, "] .p-datatable-tfoot > tr > td {\n display: none !important;\n }\n\n .p-datatable[").concat(this.state.attributeSelector, "] .p-datatable-tbody > tr > td {\n display: flex;\n width: 100% !important;\n align-items: center;\n justify-content: space-between;\n }\n\n .p-datatable[").concat(this.state.attributeSelector, "] .p-datatable-tbody > tr > td:not(:last-child) {\n border: 0 none;\n }\n\n .p-datatable[").concat(this.state.attributeSelector, "].p-datatable-gridlines .p-datatable-tbody > tr > td:last-child {\n border-top: 0;\n border-right: 0;\n border-left: 0;\n }\n\n .p-datatable[").concat(this.state.attributeSelector, "] .p-datatable-tbody > tr > td > .p-column-title {\n display: block;\n }\n}\n");
|
|
5649
5787
|
this.responsiveStyleElement.innerHTML = innerHTML;
|
|
5650
5788
|
}
|
|
5651
5789
|
}
|
|
5652
5790
|
}, {
|
|
5653
5791
|
key: "destroyResponsiveStyle",
|
|
5654
5792
|
value: function destroyResponsiveStyle() {
|
|
5655
|
-
|
|
5656
|
-
document.head.removeChild(this.responsiveStyleElement);
|
|
5657
|
-
this.responsiveStyleElement = null;
|
|
5658
|
-
}
|
|
5793
|
+
this.responsiveStyleElement = DomHandler.removeInlineStyle(this.responsiveStyleElement);
|
|
5659
5794
|
}
|
|
5660
5795
|
}, {
|
|
5661
5796
|
key: "destroyStyleElement",
|
|
5662
5797
|
value: function destroyStyleElement() {
|
|
5663
|
-
|
|
5664
|
-
document.head.removeChild(this.styleElement);
|
|
5665
|
-
this.styleElement = null;
|
|
5666
|
-
}
|
|
5798
|
+
this.styleElement = DomHandler.removeInlineStyle(this.styleElement);
|
|
5667
5799
|
}
|
|
5668
5800
|
}, {
|
|
5669
5801
|
key: "onPageChange",
|
|
5670
5802
|
value: function onPageChange(e) {
|
|
5671
5803
|
this.clearEditingMetaData();
|
|
5672
|
-
if (this.props.onPage) this.props.onPage(e);else this.setState({
|
|
5804
|
+
if (this.props.onPage) this.props.onPage(this.createEvent(e));else this.setState({
|
|
5673
5805
|
first: e.first,
|
|
5674
5806
|
rows: e.rows
|
|
5675
5807
|
});
|
|
@@ -5733,7 +5865,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5733
5865
|
}
|
|
5734
5866
|
|
|
5735
5867
|
if (this.props.onSort) {
|
|
5736
|
-
this.props.onSort(eventMeta);
|
|
5868
|
+
this.props.onSort(this.createEvent(eventMeta));
|
|
5737
5869
|
} else {
|
|
5738
5870
|
eventMeta.first = 0;
|
|
5739
5871
|
this.setState(eventMeta);
|
|
@@ -5752,6 +5884,11 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5752
5884
|
value: function getCalculatedSortOrder(currentOrder) {
|
|
5753
5885
|
return this.props.removableSort ? this.props.defaultSortOrder === currentOrder ? currentOrder * -1 : 0 : currentOrder * -1;
|
|
5754
5886
|
}
|
|
5887
|
+
}, {
|
|
5888
|
+
key: "compareValuesOnSort",
|
|
5889
|
+
value: function compareValuesOnSort(value1, value2) {
|
|
5890
|
+
return ObjectUtils.sort(value1, value2, 1, PrimeReact.locale);
|
|
5891
|
+
}
|
|
5755
5892
|
}, {
|
|
5756
5893
|
key: "addSortMeta",
|
|
5757
5894
|
value: function addSortMeta(meta, multiSortMeta) {
|
|
@@ -5776,6 +5913,8 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5776
5913
|
}, {
|
|
5777
5914
|
key: "sortSingle",
|
|
5778
5915
|
value: function sortSingle(data, field, order) {
|
|
5916
|
+
var _this11 = this;
|
|
5917
|
+
|
|
5779
5918
|
if (this.props.groupRowsBy && this.props.groupRowsBy === this.props.sortField) {
|
|
5780
5919
|
var multiSortMeta = [{
|
|
5781
5920
|
field: this.props.sortField,
|
|
@@ -5799,10 +5938,9 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5799
5938
|
value.sort(function (data1, data2) {
|
|
5800
5939
|
var value1 = ObjectUtils.resolveFieldData(data1, field);
|
|
5801
5940
|
var value2 = ObjectUtils.resolveFieldData(data2, field);
|
|
5802
|
-
|
|
5803
|
-
|
|
5804
|
-
|
|
5805
|
-
});else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;
|
|
5941
|
+
|
|
5942
|
+
var result = _this11.compareValuesOnSort(value1, value2);
|
|
5943
|
+
|
|
5806
5944
|
return order * result;
|
|
5807
5945
|
});
|
|
5808
5946
|
}
|
|
@@ -5812,7 +5950,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5812
5950
|
}, {
|
|
5813
5951
|
key: "sortMultiple",
|
|
5814
5952
|
value: function sortMultiple(data) {
|
|
5815
|
-
var
|
|
5953
|
+
var _this12 = this;
|
|
5816
5954
|
|
|
5817
5955
|
var multiSortMeta = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
5818
5956
|
|
|
@@ -5829,7 +5967,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5829
5967
|
|
|
5830
5968
|
if (this.columnSortable && this.columnSortFunction) {
|
|
5831
5969
|
var meta = multiSortMeta.find(function (meta) {
|
|
5832
|
-
return meta.field ===
|
|
5970
|
+
return meta.field === _this12.columnField;
|
|
5833
5971
|
});
|
|
5834
5972
|
var field = this.columnField;
|
|
5835
5973
|
var order = meta ? meta.order : this.defaultSortOrder;
|
|
@@ -5839,7 +5977,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5839
5977
|
});
|
|
5840
5978
|
} else {
|
|
5841
5979
|
value.sort(function (data1, data2) {
|
|
5842
|
-
return
|
|
5980
|
+
return _this12.multisortField(data1, data2, multiSortMeta, 0);
|
|
5843
5981
|
});
|
|
5844
5982
|
}
|
|
5845
5983
|
|
|
@@ -5850,22 +5988,12 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5850
5988
|
value: function multisortField(data1, data2, multiSortMeta, index) {
|
|
5851
5989
|
var value1 = ObjectUtils.resolveFieldData(data1, multiSortMeta[index].field);
|
|
5852
5990
|
var value2 = ObjectUtils.resolveFieldData(data2, multiSortMeta[index].field);
|
|
5853
|
-
var result = null;
|
|
5854
|
-
|
|
5855
|
-
if (typeof value1 === 'string' || value1 instanceof String) {
|
|
5856
|
-
if (value1.localeCompare && value1 !== value2) {
|
|
5857
|
-
return multiSortMeta[index].order * value1.localeCompare(value2, undefined, {
|
|
5858
|
-
numeric: true
|
|
5859
|
-
});
|
|
5860
|
-
}
|
|
5861
|
-
} else {
|
|
5862
|
-
result = value1 < value2 ? -1 : 1;
|
|
5863
|
-
}
|
|
5864
5991
|
|
|
5865
5992
|
if (value1 === value2) {
|
|
5866
5993
|
return multiSortMeta.length - 1 > index ? this.multisortField(data1, data2, multiSortMeta, index + 1) : 0;
|
|
5867
5994
|
}
|
|
5868
5995
|
|
|
5996
|
+
var result = this.compareValuesOnSort(value1, value2);
|
|
5869
5997
|
return multiSortMeta[index].order * result;
|
|
5870
5998
|
}
|
|
5871
5999
|
}, {
|
|
@@ -5879,25 +6007,25 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5879
6007
|
}, {
|
|
5880
6008
|
key: "onFilterApply",
|
|
5881
6009
|
value: function onFilterApply() {
|
|
5882
|
-
var
|
|
6010
|
+
var _this13 = this;
|
|
5883
6011
|
|
|
5884
6012
|
clearTimeout(this.filterTimeout);
|
|
5885
6013
|
this.filterTimeout = setTimeout(function () {
|
|
5886
|
-
var filters =
|
|
6014
|
+
var filters = _this13.cloneFilters(_this13.state.d_filters);
|
|
5887
6015
|
|
|
5888
|
-
if (
|
|
5889
|
-
|
|
6016
|
+
if (_this13.props.onFilter) {
|
|
6017
|
+
_this13.props.onFilter(_this13.createEvent({
|
|
5890
6018
|
filters: filters
|
|
5891
|
-
});
|
|
6019
|
+
}));
|
|
5892
6020
|
} else {
|
|
5893
|
-
|
|
6021
|
+
_this13.setState({
|
|
5894
6022
|
first: 0,
|
|
5895
6023
|
filters: filters
|
|
5896
6024
|
});
|
|
5897
6025
|
}
|
|
5898
6026
|
|
|
5899
|
-
if (
|
|
5900
|
-
|
|
6027
|
+
if (_this13.props.onValueChange) {
|
|
6028
|
+
_this13.props.onValueChange(_this13.processedData({
|
|
5901
6029
|
filters: filters
|
|
5902
6030
|
}));
|
|
5903
6031
|
}
|
|
@@ -5954,7 +6082,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5954
6082
|
if (isGlobalFilter && !globalMatch && globalFilterFieldsArray) {
|
|
5955
6083
|
for (var _j = 0; _j < globalFilterFieldsArray.length; _j++) {
|
|
5956
6084
|
var globalFilterField = globalFilterFieldsArray[_j];
|
|
5957
|
-
var matchMode = filters['global'] ? filters['global'].matchMode : FilterMatchMode
|
|
6085
|
+
var matchMode = filters['global'] ? filters['global'].matchMode : FilterMatchMode.CONTAINS;
|
|
5958
6086
|
var value = filters['global'] ? filters['global'].value : this.props.globalFilter;
|
|
5959
6087
|
globalMatch = FilterService.filters[matchMode](ObjectUtils.resolveFieldData(data[i], globalFilterField), value, this.props.filterLocale);
|
|
5960
6088
|
|
|
@@ -5987,7 +6115,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5987
6115
|
key: "executeLocalFilter",
|
|
5988
6116
|
value: function executeLocalFilter(field, rowData, filterMeta, index) {
|
|
5989
6117
|
var filterValue = filterMeta.value;
|
|
5990
|
-
var filterMatchMode = filterMeta.matchMode === 'custom' ? "custom_".concat(field) : filterMeta.matchMode || FilterMatchMode
|
|
6118
|
+
var filterMatchMode = filterMeta.matchMode === 'custom' ? "custom_".concat(field) : filterMeta.matchMode || FilterMatchMode.STARTS_WITH;
|
|
5991
6119
|
var dataFieldValue = ObjectUtils.resolveFieldData(rowData, field);
|
|
5992
6120
|
var filterConstraint = FilterService.filters[filterMatchMode];
|
|
5993
6121
|
return filterConstraint(dataFieldValue, filterValue, this.props.filterLocale, index);
|
|
@@ -5995,7 +6123,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5995
6123
|
}, {
|
|
5996
6124
|
key: "cloneFilters",
|
|
5997
6125
|
value: function cloneFilters(filters) {
|
|
5998
|
-
var
|
|
6126
|
+
var _this14 = this;
|
|
5999
6127
|
|
|
6000
6128
|
filters = filters || this.props.filters;
|
|
6001
6129
|
var cloned = {};
|
|
@@ -6016,34 +6144,31 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6016
6144
|
} else {
|
|
6017
6145
|
var columns = this.getColumns();
|
|
6018
6146
|
cloned = columns.reduce(function (_filters, col) {
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6022
|
-
|
|
6023
|
-
|
|
6024
|
-
|
|
6025
|
-
|
|
6026
|
-
|
|
6027
|
-
};
|
|
6028
|
-
|
|
6029
|
-
if (filterFunction) {
|
|
6030
|
-
FilterService.register("custom_".concat(field), function () {
|
|
6031
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
6032
|
-
args[_key] = arguments[_key];
|
|
6033
|
-
}
|
|
6147
|
+
var field = col.props.filterField || col.props.field;
|
|
6148
|
+
var filterFunction = col.props.filterFunction;
|
|
6149
|
+
var dataType = col.props.dataType;
|
|
6150
|
+
var matchMode = col.props.filterMatchMode || (PrimeReact.filterMatchModeOptions[dataType] ? PrimeReact.filterMatchModeOptions[dataType][0] : FilterMatchMode.STARTS_WITH);
|
|
6151
|
+
var constraint = {
|
|
6152
|
+
value: null,
|
|
6153
|
+
matchMode: matchMode
|
|
6154
|
+
};
|
|
6034
6155
|
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
-
|
|
6156
|
+
if (filterFunction) {
|
|
6157
|
+
FilterService.register("custom_".concat(field), function () {
|
|
6158
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
6159
|
+
args[_key] = arguments[_key];
|
|
6160
|
+
}
|
|
6040
6161
|
|
|
6041
|
-
|
|
6042
|
-
|
|
6043
|
-
|
|
6044
|
-
}
|
|
6162
|
+
return filterFunction.apply(void 0, args.concat([{
|
|
6163
|
+
column: col
|
|
6164
|
+
}]));
|
|
6165
|
+
});
|
|
6045
6166
|
}
|
|
6046
6167
|
|
|
6168
|
+
_filters[field] = _this14.props.filterDisplay === 'menu' ? {
|
|
6169
|
+
operator: FilterOperator.AND,
|
|
6170
|
+
constraints: [constraint]
|
|
6171
|
+
} : constraint;
|
|
6047
6172
|
return _filters;
|
|
6048
6173
|
}, {});
|
|
6049
6174
|
}
|
|
@@ -6099,6 +6224,14 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6099
6224
|
this.resetColumnOrder();
|
|
6100
6225
|
this.setState(state);
|
|
6101
6226
|
}
|
|
6227
|
+
}, {
|
|
6228
|
+
key: "resetScroll",
|
|
6229
|
+
value: function resetScroll() {
|
|
6230
|
+
if (this.wrapper) {
|
|
6231
|
+
var scrollableContainer = !this.isVirtualScrollerDisabled() ? DomHandler.findSingle(this.wrapper, '.p-virtualscroller') : this.wrapper;
|
|
6232
|
+
scrollableContainer.scrollTo(0, 0);
|
|
6233
|
+
}
|
|
6234
|
+
}
|
|
6102
6235
|
}, {
|
|
6103
6236
|
key: "resetColumnOrder",
|
|
6104
6237
|
value: function resetColumnOrder() {
|
|
@@ -6119,7 +6252,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6119
6252
|
}, {
|
|
6120
6253
|
key: "exportCSV",
|
|
6121
6254
|
value: function exportCSV(options) {
|
|
6122
|
-
var
|
|
6255
|
+
var _this15 = this;
|
|
6123
6256
|
|
|
6124
6257
|
var data;
|
|
6125
6258
|
var csv = "\uFEFF";
|
|
@@ -6142,7 +6275,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6142
6275
|
csv += '"' + (header || field) + '"';
|
|
6143
6276
|
|
|
6144
6277
|
if (i < columns.length - 1) {
|
|
6145
|
-
csv +=
|
|
6278
|
+
csv += _this15.props.csvSeparator;
|
|
6146
6279
|
}
|
|
6147
6280
|
}
|
|
6148
6281
|
}); //body
|
|
@@ -6151,14 +6284,16 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6151
6284
|
csv += '\n';
|
|
6152
6285
|
columns.forEach(function (column, i) {
|
|
6153
6286
|
var _column$props2 = column.props,
|
|
6154
|
-
|
|
6287
|
+
columnField = _column$props2.field,
|
|
6288
|
+
exportField = _column$props2.exportField,
|
|
6155
6289
|
exportable = _column$props2.exportable;
|
|
6290
|
+
var field = exportField || columnField;
|
|
6156
6291
|
|
|
6157
6292
|
if (exportable && field) {
|
|
6158
6293
|
var cellData = ObjectUtils.resolveFieldData(record, field);
|
|
6159
6294
|
|
|
6160
6295
|
if (cellData != null) {
|
|
6161
|
-
cellData =
|
|
6296
|
+
cellData = _this15.props.exportFunction ? _this15.props.exportFunction({
|
|
6162
6297
|
data: cellData,
|
|
6163
6298
|
field: field,
|
|
6164
6299
|
rowData: record,
|
|
@@ -6169,7 +6304,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6169
6304
|
csv += '"' + cellData + '"';
|
|
6170
6305
|
|
|
6171
6306
|
if (i < columns.length - 1) {
|
|
6172
|
-
csv +=
|
|
6307
|
+
csv += _this15.props.csvSeparator;
|
|
6173
6308
|
}
|
|
6174
6309
|
}
|
|
6175
6310
|
});
|
|
@@ -6183,6 +6318,18 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6183
6318
|
document.body.click();
|
|
6184
6319
|
}
|
|
6185
6320
|
}
|
|
6321
|
+
}, {
|
|
6322
|
+
key: "createEvent",
|
|
6323
|
+
value: function createEvent(event) {
|
|
6324
|
+
return _objectSpread({
|
|
6325
|
+
first: this.getFirst(),
|
|
6326
|
+
rows: this.getRows(),
|
|
6327
|
+
sortField: this.getSortField(),
|
|
6328
|
+
sortOrder: this.getSortOrder(),
|
|
6329
|
+
multiSortMeta: this.getMultiSortMeta(),
|
|
6330
|
+
filters: this.getFilters()
|
|
6331
|
+
}, event);
|
|
6332
|
+
}
|
|
6186
6333
|
}, {
|
|
6187
6334
|
key: "processedData",
|
|
6188
6335
|
value: function processedData(localState) {
|
|
@@ -6220,14 +6367,24 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6220
6367
|
}, {
|
|
6221
6368
|
key: "componentDidMount",
|
|
6222
6369
|
value: function componentDidMount() {
|
|
6223
|
-
this
|
|
6370
|
+
var _this16 = this;
|
|
6224
6371
|
|
|
6225
|
-
|
|
6226
|
-
|
|
6227
|
-
}
|
|
6372
|
+
this.setState({
|
|
6373
|
+
attributeSelector: UniqueComponentId()
|
|
6374
|
+
}, function () {
|
|
6375
|
+
_this16.el.setAttribute(_this16.state.attributeSelector, '');
|
|
6376
|
+
|
|
6377
|
+
if (_this16.props.responsiveLayout === 'stack' && !_this16.props.scrollable) {
|
|
6378
|
+
_this16.createResponsiveStyle();
|
|
6379
|
+
}
|
|
6380
|
+
});
|
|
6228
6381
|
|
|
6229
|
-
if (this.isStateful()
|
|
6230
|
-
this.
|
|
6382
|
+
if (this.isStateful()) {
|
|
6383
|
+
this.setState(this.restoreState(this.state));
|
|
6384
|
+
|
|
6385
|
+
if (this.props.resizableColumns) {
|
|
6386
|
+
this.restoreColumnWidths();
|
|
6387
|
+
}
|
|
6231
6388
|
}
|
|
6232
6389
|
}
|
|
6233
6390
|
}, {
|
|
@@ -6327,6 +6484,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6327
6484
|
filtersStore: filtersStore,
|
|
6328
6485
|
onFilterChange: this.onFilterChange,
|
|
6329
6486
|
onFilterApply: this.onFilterApply,
|
|
6487
|
+
showSelectAll: this.props.showSelectAll,
|
|
6330
6488
|
allRowsSelected: this.allRowsSelected,
|
|
6331
6489
|
onColumnCheckboxChange: this.onColumnHeaderCheckboxChange,
|
|
6332
6490
|
onColumnMouseDown: this.onColumnHeaderMouseDown,
|
|
@@ -6341,7 +6499,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6341
6499
|
}, {
|
|
6342
6500
|
key: "renderTableBody",
|
|
6343
6501
|
value: function renderTableBody(options, selectionModeInColumn, empty, isVirtualScrollerDisabled) {
|
|
6344
|
-
var tableSelector = this.attributeSelector;
|
|
6502
|
+
var tableSelector = this.state.attributeSelector;
|
|
6345
6503
|
var first = this.getFirst();
|
|
6346
6504
|
var editingMeta = this.state.editingMeta;
|
|
6347
6505
|
var rows = options.rows,
|
|
@@ -6405,6 +6563,8 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6405
6563
|
onRowEditCancel: this.props.onRowEditCancel,
|
|
6406
6564
|
cellClassName: this.props.cellClassName,
|
|
6407
6565
|
responsiveLayout: this.props.responsiveLayout,
|
|
6566
|
+
selectionAutoFocus: this.props.selectionAutoFocus,
|
|
6567
|
+
isDataSelectable: this.props.isDataSelectable,
|
|
6408
6568
|
showSelectionElement: this.props.showSelectionElement,
|
|
6409
6569
|
showRowReorderElement: this.props.showRowReorderElement,
|
|
6410
6570
|
expandedRowIcon: this.props.expandedRowIcon,
|
|
@@ -6470,6 +6630,8 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6470
6630
|
onRowEditCancel: this.props.onRowEditCancel,
|
|
6471
6631
|
cellClassName: this.props.cellClassName,
|
|
6472
6632
|
responsiveLayout: this.props.responsiveLayout,
|
|
6633
|
+
selectionAutoFocus: this.props.selectionAutoFocus,
|
|
6634
|
+
isDataSelectable: this.props.isDataSelectable,
|
|
6473
6635
|
showSelectionElement: this.props.showSelectionElement,
|
|
6474
6636
|
showRowReorderElement: this.props.showRowReorderElement,
|
|
6475
6637
|
expandedRowIcon: this.props.expandedRowIcon,
|
|
@@ -6494,42 +6656,43 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6494
6656
|
}, {
|
|
6495
6657
|
key: "renderContent",
|
|
6496
6658
|
value: function renderContent(processedData, columns, selectionModeInColumn, empty) {
|
|
6497
|
-
var
|
|
6659
|
+
var _this17 = this;
|
|
6498
6660
|
|
|
6499
6661
|
if (!columns) return;
|
|
6500
6662
|
var isVirtualScrollerDisabled = this.isVirtualScrollerDisabled();
|
|
6501
6663
|
var virtualScrollerOptions = this.props.virtualScrollerOptions || {};
|
|
6502
6664
|
return /*#__PURE__*/React.createElement("div", {
|
|
6665
|
+
ref: function ref(el) {
|
|
6666
|
+
return _this17.wrapper = el;
|
|
6667
|
+
},
|
|
6503
6668
|
className: "p-datatable-wrapper",
|
|
6504
6669
|
style: {
|
|
6505
|
-
maxHeight: isVirtualScrollerDisabled ? this.props.scrollHeight :
|
|
6670
|
+
maxHeight: isVirtualScrollerDisabled ? this.props.scrollHeight : null
|
|
6506
6671
|
}
|
|
6507
6672
|
}, /*#__PURE__*/React.createElement(VirtualScroller, _extends({}, virtualScrollerOptions, {
|
|
6508
6673
|
items: processedData,
|
|
6509
6674
|
columns: columns,
|
|
6510
|
-
|
|
6511
|
-
height: this.props.scrollHeight
|
|
6512
|
-
},
|
|
6675
|
+
scrollHeight: this.props.scrollHeight,
|
|
6513
6676
|
disabled: isVirtualScrollerDisabled,
|
|
6514
6677
|
loaderDisabled: true,
|
|
6515
6678
|
showSpacer: false,
|
|
6516
6679
|
contentTemplate: function contentTemplate(options) {
|
|
6517
6680
|
var ref = function ref(el) {
|
|
6518
|
-
|
|
6681
|
+
_this17.table = el;
|
|
6519
6682
|
options.spacerRef && options.spacerRef(el);
|
|
6520
6683
|
};
|
|
6521
6684
|
|
|
6522
|
-
var tableClassName = classNames('p-datatable-table',
|
|
6685
|
+
var tableClassName = classNames('p-datatable-table', _this17.props.tableClassName);
|
|
6523
6686
|
|
|
6524
|
-
var tableHeader =
|
|
6687
|
+
var tableHeader = _this17.renderTableHeader(options, empty);
|
|
6525
6688
|
|
|
6526
|
-
var tableBody =
|
|
6689
|
+
var tableBody = _this17.renderTableBody(options, selectionModeInColumn, empty, isVirtualScrollerDisabled);
|
|
6527
6690
|
|
|
6528
|
-
var tableFooter =
|
|
6691
|
+
var tableFooter = _this17.renderTableFooter(options);
|
|
6529
6692
|
|
|
6530
6693
|
return /*#__PURE__*/React.createElement("table", {
|
|
6531
6694
|
ref: ref,
|
|
6532
|
-
style:
|
|
6695
|
+
style: _this17.props.tableStyle,
|
|
6533
6696
|
className: tableClassName,
|
|
6534
6697
|
role: "table"
|
|
6535
6698
|
}, tableHeader, tableBody, tableFooter);
|
|
@@ -6591,12 +6754,12 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6591
6754
|
}, {
|
|
6592
6755
|
key: "renderResizeHelper",
|
|
6593
6756
|
value: function renderResizeHelper() {
|
|
6594
|
-
var
|
|
6757
|
+
var _this18 = this;
|
|
6595
6758
|
|
|
6596
6759
|
if (this.props.resizableColumns) {
|
|
6597
6760
|
return /*#__PURE__*/React.createElement("div", {
|
|
6598
6761
|
ref: function ref(el) {
|
|
6599
|
-
return
|
|
6762
|
+
return _this18.resizeHelper = el;
|
|
6600
6763
|
},
|
|
6601
6764
|
className: "p-column-resizer-helper",
|
|
6602
6765
|
style: {
|
|
@@ -6610,7 +6773,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6610
6773
|
}, {
|
|
6611
6774
|
key: "renderReorderIndicators",
|
|
6612
6775
|
value: function renderReorderIndicators() {
|
|
6613
|
-
var
|
|
6776
|
+
var _this19 = this;
|
|
6614
6777
|
|
|
6615
6778
|
if (this.props.reorderableColumns) {
|
|
6616
6779
|
var style = {
|
|
@@ -6619,13 +6782,13 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6619
6782
|
};
|
|
6620
6783
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
6621
6784
|
ref: function ref(el) {
|
|
6622
|
-
return
|
|
6785
|
+
return _this19.reorderIndicatorUp = el;
|
|
6623
6786
|
},
|
|
6624
6787
|
className: "pi pi-arrow-down p-datatable-reorder-indicator-up",
|
|
6625
6788
|
style: style
|
|
6626
6789
|
}), /*#__PURE__*/React.createElement("span", {
|
|
6627
6790
|
ref: function ref(el) {
|
|
6628
|
-
return
|
|
6791
|
+
return _this19.reorderIndicatorDown = el;
|
|
6629
6792
|
},
|
|
6630
6793
|
className: "pi pi-arrow-up p-datatable-reorder-indicator-down",
|
|
6631
6794
|
style: style
|
|
@@ -6637,15 +6800,18 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6637
6800
|
}, {
|
|
6638
6801
|
key: "render",
|
|
6639
6802
|
value: function render() {
|
|
6640
|
-
var
|
|
6803
|
+
var _this20 = this;
|
|
6641
6804
|
|
|
6642
6805
|
var processedData = this.processedData();
|
|
6643
6806
|
var columns = this.getColumns();
|
|
6644
6807
|
var totalRecords = this.getTotalRecords(processedData);
|
|
6645
6808
|
var empty = ObjectUtils.isEmpty(processedData);
|
|
6646
6809
|
var selectionModeInColumn = this.getSelectionModeInColumn(columns);
|
|
6810
|
+
var selectable = this.props.selectionMode || selectionModeInColumn;
|
|
6647
6811
|
var className = classNames('p-datatable p-component', {
|
|
6648
|
-
'p-datatable-hoverable-rows': this.props.rowHover
|
|
6812
|
+
'p-datatable-hoverable-rows': this.props.rowHover,
|
|
6813
|
+
'p-datatable-selectable': selectable && !this.props.cellSelection,
|
|
6814
|
+
'p-datatable-selectable-cell': selectable && this.props.cellSelection,
|
|
6649
6815
|
'p-datatable-auto-layout': this.props.autoLayout,
|
|
6650
6816
|
'p-datatable-resizable': this.props.resizableColumns,
|
|
6651
6817
|
'p-datatable-resizable-fit': this.props.resizableColumns && this.props.columnResizeMode === 'fit',
|
|
@@ -6673,7 +6839,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6673
6839
|
var reorderIndicators = this.renderReorderIndicators();
|
|
6674
6840
|
return /*#__PURE__*/React.createElement("div", {
|
|
6675
6841
|
ref: function ref(el) {
|
|
6676
|
-
return
|
|
6842
|
+
return _this20.el = el;
|
|
6677
6843
|
},
|
|
6678
6844
|
id: this.props.id,
|
|
6679
6845
|
className: className,
|
|
@@ -6740,6 +6906,11 @@ _defineProperty(DataTable, "defaultProps", {
|
|
|
6740
6906
|
dataKey: null,
|
|
6741
6907
|
metaKeySelection: true,
|
|
6742
6908
|
selectOnEdit: true,
|
|
6909
|
+
selectionPageOnly: false,
|
|
6910
|
+
selectionAutoFocus: true,
|
|
6911
|
+
showSelectAll: true,
|
|
6912
|
+
selectAll: false,
|
|
6913
|
+
onSelectAllChange: null,
|
|
6743
6914
|
headerColumnGroup: null,
|
|
6744
6915
|
footerColumnGroup: null,
|
|
6745
6916
|
rowExpansionTemplate: null,
|
|
@@ -6788,6 +6959,7 @@ _defineProperty(DataTable, "defaultProps", {
|
|
|
6788
6959
|
globalFilterFields: null,
|
|
6789
6960
|
showSelectionElement: null,
|
|
6790
6961
|
showRowReorderElement: null,
|
|
6962
|
+
isDataSelectable: null,
|
|
6791
6963
|
onColumnResizeEnd: null,
|
|
6792
6964
|
onColumnResizerClick: null,
|
|
6793
6965
|
onColumnResizerDoubleClick: null,
|