primereact 7.1.0 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/accordion/accordion.cjs.js +15 -15
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +15 -15
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +15 -15
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +27 -6
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +1 -0
- package/api/api.esm.js +27 -6
- package/api/api.esm.min.js +1 -1
- package/api/api.js +27 -6
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +18 -18
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +18 -18
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +18 -18
- 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.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 +11 -11
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +11 -11
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +11 -11
- 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.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 +17 -17
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +17 -17
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +17 -17
- 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 +16 -14
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +15 -14
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +17 -16
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +14 -14
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +14 -14
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +14 -14
- 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.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.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 +15 -15
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +15 -15
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +15 -15
- 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 +4 -0
- 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.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 +14 -14
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +14 -14
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +14 -14
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +13 -13
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +13 -13
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +13 -13
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +326 -276
- package/core/core.min.js +18 -18
- package/csstransition/csstransition.cjs.js +17 -17
- package/csstransition/csstransition.cjs.min.js +1 -1
- package/csstransition/csstransition.esm.js +17 -17
- package/csstransition/csstransition.esm.min.js +1 -1
- package/csstransition/csstransition.js +17 -17
- package/csstransition/csstransition.min.js +1 -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 +315 -200
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +8 -0
- package/datatable/datatable.esm.js +318 -203
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +315 -200
- package/datatable/datatable.min.css +1 -1
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +11 -11
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +11 -11
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +11 -11
- 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 +19 -15
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +19 -15
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +19 -15
- 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 +21 -21
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +21 -21
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +21 -21
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +15 -15
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +15 -15
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +15 -15
- 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.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 +2 -0
- 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 +16 -16
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +16 -16
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +17 -17
- 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 +13 -13
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +13 -13
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +13 -13
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +32 -29
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +32 -29
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +32 -29
- 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 +11 -11
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +11 -11
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +11 -11
- 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 +16 -16
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.esm.js +16 -16
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +16 -16
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +12 -12
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +12 -12
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +12 -12
- 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.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.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 +20 -20
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +20 -20
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +20 -20
- 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.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.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +13 -13
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +13 -13
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +13 -13
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- 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 +14 -14
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +14 -14
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +14 -14
- 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.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 +14 -14
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +14 -14
- package/password/password.esm.min.js +1 -1
- package/password/password.js +14 -14
- 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 +13 -12
- package/portal/portal.cjs.min.js +1 -1
- package/portal/portal.esm.js +13 -12
- package/portal/portal.esm.min.js +1 -1
- package/portal/portal.js +13 -12
- package/portal/portal.min.js +1 -1
- package/primereact.all.cjs.js +642 -424
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +642 -424
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +642 -424
- 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 +328 -305
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +56 -24
- package/resources/themes/arya-green/theme.css +56 -24
- package/resources/themes/arya-orange/theme.css +56 -24
- package/resources/themes/arya-purple/theme.css +56 -24
- package/resources/themes/bootstrap4-dark-blue/theme.css +33 -8
- package/resources/themes/bootstrap4-dark-purple/theme.css +33 -8
- package/resources/themes/bootstrap4-light-blue/theme.css +32 -7
- package/resources/themes/bootstrap4-light-purple/theme.css +32 -7
- package/resources/themes/fluent-light/theme.css +56 -24
- package/resources/themes/lara-dark-blue/theme.css +400 -368
- package/resources/themes/lara-dark-indigo/theme.css +400 -368
- package/resources/themes/lara-dark-purple/theme.css +400 -368
- package/resources/themes/lara-dark-teal/theme.css +400 -368
- package/resources/themes/lara-light-blue/theme.css +56 -24
- package/resources/themes/lara-light-indigo/theme.css +56 -24
- package/resources/themes/lara-light-purple/theme.css +56 -24
- package/resources/themes/lara-light-teal/theme.css +56 -24
- package/resources/themes/luna-amber/theme.css +49 -24
- package/resources/themes/luna-blue/theme.css +49 -24
- package/resources/themes/luna-green/theme.css +49 -24
- package/resources/themes/luna-pink/theme.css +49 -24
- package/resources/themes/md-dark-deeppurple/theme.css +38 -6
- package/resources/themes/md-dark-indigo/theme.css +38 -6
- package/resources/themes/md-light-deeppurple/theme.css +38 -6
- package/resources/themes/md-light-indigo/theme.css +38 -6
- package/resources/themes/mdc-dark-deeppurple/theme.css +38 -6
- package/resources/themes/mdc-dark-indigo/theme.css +38 -6
- package/resources/themes/mdc-light-deeppurple/theme.css +38 -6
- package/resources/themes/mdc-light-indigo/theme.css +38 -6
- package/resources/themes/nova/theme.css +49 -24
- package/resources/themes/nova-accent/theme.css +49 -24
- package/resources/themes/nova-alt/theme.css +49 -24
- package/resources/themes/rhea/theme.css +49 -24
- package/resources/themes/saga-blue/theme.css +39 -7
- package/resources/themes/saga-green/theme.css +39 -7
- package/resources/themes/saga-orange/theme.css +39 -7
- package/resources/themes/saga-purple/theme.css +39 -7
- package/resources/themes/tailwind-light/theme.css +59 -27
- package/resources/themes/vela-blue/theme.css +56 -24
- package/resources/themes/vela-green/theme.css +56 -24
- package/resources/themes/vela-orange/theme.css +56 -24
- package/resources/themes/vela-purple/theme.css +56 -24
- 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.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/sidebar/sidebar.cjs.js +14 -13
- package/sidebar/sidebar.cjs.min.js +1 -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 +12 -12
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.esm.js +12 -12
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +12 -12
- 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.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 +15 -15
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +15 -15
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +15 -15
- 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 +11 -11
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +11 -11
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +11 -11
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +35 -28
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +35 -28
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +35 -28
- 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.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 +12 -12
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +12 -12
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +12 -12
- 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 +3 -0
- 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.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.js +1 -1
- package/tooltip/tooltip.cjs.js +13 -13
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +13 -13
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +13 -13
- package/tooltip/tooltip.min.js +1 -1
- package/tree/tree.cjs.js +17 -17
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +17 -17
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +17 -17
- package/tree/tree.min.js +1 -1
- package/treenode/treenode.d.ts +1 -0
- package/treeselect/treeselect.cjs.js +16 -16
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +16 -16
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +16 -16
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +60 -48
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +1 -0
- package/treetable/treetable.esm.js +60 -48
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +60 -48
- 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 +43 -41
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +1 -0
- package/utils/utils.esm.js +43 -41
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +43 -41
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +35 -19
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +35 -19
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +35 -19
- package/virtualscroller/virtualscroller.min.css +1 -1
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +44 -7
|
@@ -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"
|
|
@@ -1056,15 +1096,13 @@ var BodyCell = /*#__PURE__*/function (_Component) {
|
|
|
1056
1096
|
props: this.props.tableProps
|
|
1057
1097
|
}) : true;
|
|
1058
1098
|
content = showSelection && /*#__PURE__*/React.createElement(React.Fragment, null, selectionMode === 'single' && /*#__PURE__*/React.createElement(RowRadioButton, {
|
|
1059
|
-
value: this.props.rowData,
|
|
1060
1099
|
checked: this.props.selected,
|
|
1061
|
-
onChange: this.
|
|
1100
|
+
onChange: this.onRadioChange,
|
|
1062
1101
|
tabIndex: this.props.tabIndex,
|
|
1063
1102
|
tableSelector: this.props.tableSelector
|
|
1064
1103
|
}), selectionMode === 'multiple' && /*#__PURE__*/React.createElement(RowCheckbox, {
|
|
1065
|
-
value: this.props.rowData,
|
|
1066
1104
|
checked: this.props.selected,
|
|
1067
|
-
onChange: this.
|
|
1105
|
+
onChange: this.onCheckboxChange,
|
|
1068
1106
|
tabIndex: this.props.tabIndex
|
|
1069
1107
|
}));
|
|
1070
1108
|
} else if (rowReorder) {
|
|
@@ -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));
|
|
@@ -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
|
|
|
@@ -2104,8 +2161,17 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2104
2161
|
|
|
2105
2162
|
var originalEvent = _ref2.originalEvent,
|
|
2106
2163
|
data = _ref2.data,
|
|
2164
|
+
index = _ref2.index,
|
|
2107
2165
|
toggleable = _ref2.toggleable,
|
|
2108
2166
|
type = _ref2.type;
|
|
2167
|
+
|
|
2168
|
+
if (!this.isSelectable({
|
|
2169
|
+
data: data,
|
|
2170
|
+
index: index
|
|
2171
|
+
})) {
|
|
2172
|
+
return;
|
|
2173
|
+
}
|
|
2174
|
+
|
|
2109
2175
|
var selected = this.isSelected(data);
|
|
2110
2176
|
var selection = this.props.selection || [];
|
|
2111
2177
|
|
|
@@ -2210,6 +2276,14 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2210
2276
|
|
|
2211
2277
|
for (var i = rowRangeStart; i <= rowRangeEnd; i++) {
|
|
2212
2278
|
var rangeRowData = value[i];
|
|
2279
|
+
|
|
2280
|
+
if (!this.isSelectable({
|
|
2281
|
+
data: rangeRowData,
|
|
2282
|
+
index: i
|
|
2283
|
+
})) {
|
|
2284
|
+
continue;
|
|
2285
|
+
}
|
|
2286
|
+
|
|
2213
2287
|
selection.push(rangeRowData);
|
|
2214
2288
|
this.onSelect({
|
|
2215
2289
|
originalEvent: event.originalEvent,
|
|
@@ -2246,14 +2320,25 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2246
2320
|
|
|
2247
2321
|
for (var j = cellRangeStart; j <= cellRangeEnd; j++) {
|
|
2248
2322
|
var field = columns[j].props.field;
|
|
2323
|
+
|
|
2324
|
+
var _value = ObjectUtils.resolveFieldData(rowData, field);
|
|
2325
|
+
|
|
2249
2326
|
var rangeRowData = {
|
|
2250
|
-
value:
|
|
2327
|
+
value: _value,
|
|
2251
2328
|
field: field,
|
|
2252
2329
|
rowData: rowData,
|
|
2253
2330
|
rowIndex: i,
|
|
2254
2331
|
cellIndex: j,
|
|
2255
2332
|
selected: true
|
|
2256
2333
|
};
|
|
2334
|
+
|
|
2335
|
+
if (!this.isSelectable({
|
|
2336
|
+
data: rangeRowData,
|
|
2337
|
+
index: i
|
|
2338
|
+
})) {
|
|
2339
|
+
continue;
|
|
2340
|
+
}
|
|
2341
|
+
|
|
2257
2342
|
selection.push(rangeRowData);
|
|
2258
2343
|
this.onSelect({
|
|
2259
2344
|
originalEvent: event.originalEvent,
|
|
@@ -2303,7 +2388,7 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2303
2388
|
value: function focusOnElement(event, isFocused) {
|
|
2304
2389
|
var target = event.currentTarget;
|
|
2305
2390
|
|
|
2306
|
-
if (!this.allowCellSelection()) {
|
|
2391
|
+
if (!this.allowCellSelection() && this.props.selectionAutoFocus) {
|
|
2307
2392
|
if (this.isCheckboxSelectionModeInColumn()) {
|
|
2308
2393
|
var checkbox = DomHandler.findSingle(target, 'td.p-selection-column .p-checkbox-box');
|
|
2309
2394
|
checkbox && checkbox.focus();
|
|
@@ -2315,6 +2400,22 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2315
2400
|
|
|
2316
2401
|
!isFocused && target && target.focus();
|
|
2317
2402
|
}
|
|
2403
|
+
}, {
|
|
2404
|
+
key: "changeTabIndex",
|
|
2405
|
+
value: function changeTabIndex(event, type) {
|
|
2406
|
+
var target = event.currentTarget;
|
|
2407
|
+
var isSelectable = DomHandler.hasClass(target, type === 'cell' ? 'p-selectable-cell' : 'p-selectable-row');
|
|
2408
|
+
|
|
2409
|
+
if (isSelectable) {
|
|
2410
|
+
var selector = type === 'cell' ? 'tr > td' : 'tr';
|
|
2411
|
+
var tabbableEl = DomHandler.findSingle(this.el, "".concat(selector, "[tabindex=\"").concat(this.props.tabIndex, "\"]"));
|
|
2412
|
+
|
|
2413
|
+
if (tabbableEl && target) {
|
|
2414
|
+
tabbableEl.tabIndex = -1;
|
|
2415
|
+
target.tabIndex = this.props.tabIndex;
|
|
2416
|
+
}
|
|
2417
|
+
}
|
|
2418
|
+
}
|
|
2318
2419
|
}, {
|
|
2319
2420
|
key: "onRowClick",
|
|
2320
2421
|
value: function onRowClick(event) {
|
|
@@ -2345,6 +2446,8 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2345
2446
|
}));
|
|
2346
2447
|
}
|
|
2347
2448
|
}
|
|
2449
|
+
|
|
2450
|
+
this.changeTabIndex(event.originalEvent, 'row');
|
|
2348
2451
|
} else {
|
|
2349
2452
|
this.focusOnElement(event.originalEvent);
|
|
2350
2453
|
}
|
|
@@ -2400,7 +2503,7 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2400
2503
|
if (DomHandler.hasClass(event.target, 'p-datatable-reorderablerow-handle')) event.currentTarget.draggable = true;else event.currentTarget.draggable = false;
|
|
2401
2504
|
|
|
2402
2505
|
if (this.allowRowDrag(e)) {
|
|
2403
|
-
this.enableDragSelection(event);
|
|
2506
|
+
this.enableDragSelection(event, 'row');
|
|
2404
2507
|
this.anchorRowIndex = e.index;
|
|
2405
2508
|
this.rangeRowIndex = e.index;
|
|
2406
2509
|
this.anchorRowFirst = this.props.first;
|
|
@@ -2631,6 +2734,7 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2631
2734
|
this.onSingleSelection({
|
|
2632
2735
|
originalEvent: originalEvent,
|
|
2633
2736
|
data: data,
|
|
2737
|
+
index: event.rowIndex,
|
|
2634
2738
|
toggleable: toggleable,
|
|
2635
2739
|
type: 'cell'
|
|
2636
2740
|
});
|
|
@@ -2638,11 +2742,14 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2638
2742
|
this.onMultipleSelection({
|
|
2639
2743
|
originalEvent: originalEvent,
|
|
2640
2744
|
data: data,
|
|
2745
|
+
index: event.rowIndex,
|
|
2641
2746
|
toggleable: toggleable,
|
|
2642
2747
|
type: 'cell'
|
|
2643
2748
|
});
|
|
2644
2749
|
}
|
|
2645
2750
|
}
|
|
2751
|
+
|
|
2752
|
+
this.changeTabIndex(event.originalEvent, 'cell');
|
|
2646
2753
|
}
|
|
2647
2754
|
|
|
2648
2755
|
this.rowTouched = false;
|
|
@@ -2739,7 +2846,7 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2739
2846
|
}, {
|
|
2740
2847
|
key: "renderGroupHeader",
|
|
2741
2848
|
value: function renderGroupHeader(rowData, index, expanded, isSubheaderGrouping, colSpan) {
|
|
2742
|
-
if (isSubheaderGrouping && this.shouldRenderRowGroupHeader(this.props.value, rowData, index)) {
|
|
2849
|
+
if (isSubheaderGrouping && this.shouldRenderRowGroupHeader(this.props.value, rowData, index - this.props.first)) {
|
|
2743
2850
|
var style = this.rowGroupHeaderStyle();
|
|
2744
2851
|
var toggler = this.props.expandableRowGroups && /*#__PURE__*/React.createElement(RowTogglerButton, {
|
|
2745
2852
|
onClick: this.onRowToggle,
|
|
@@ -2787,6 +2894,7 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2787
2894
|
onRowDoubleClick: this.onRowDoubleClick,
|
|
2788
2895
|
onRowRightClick: this.onRowRightClick,
|
|
2789
2896
|
tabIndex: this.props.tabIndex,
|
|
2897
|
+
isSelectable: this.isSelectable,
|
|
2790
2898
|
onRowTouchEnd: this.onRowTouchEnd,
|
|
2791
2899
|
onRowMouseDown: this.onRowMouseDown,
|
|
2792
2900
|
onRowMouseUp: this.onRowMouseUp,
|
|
@@ -2858,7 +2966,7 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2858
2966
|
}, {
|
|
2859
2967
|
key: "renderGroupFooter",
|
|
2860
2968
|
value: function renderGroupFooter(rowData, index, expanded, isSubheaderGrouping, colSpan) {
|
|
2861
|
-
if (isSubheaderGrouping && this.shouldRenderRowGroupFooter(this.props.value, rowData, index, expanded)) {
|
|
2969
|
+
if (isSubheaderGrouping && this.shouldRenderRowGroupFooter(this.props.value, rowData, index - this.props.first, expanded)) {
|
|
2862
2970
|
var content = ObjectUtils.getJSXElement(this.props.rowGroupFooterTemplate, rowData, {
|
|
2863
2971
|
index: index,
|
|
2864
2972
|
colSpan: colSpan,
|
|
@@ -2916,9 +3024,9 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
2916
3024
|
return TableBody;
|
|
2917
3025
|
}(Component);
|
|
2918
3026
|
|
|
2919
|
-
function ownKeys$4(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
3027
|
+
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; }
|
|
2920
3028
|
|
|
2921
|
-
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
3029
|
+
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; }
|
|
2922
3030
|
|
|
2923
3031
|
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); }; }
|
|
2924
3032
|
|
|
@@ -3005,9 +3113,10 @@ var FooterCell = /*#__PURE__*/function (_Component) {
|
|
|
3005
3113
|
var _this2 = this;
|
|
3006
3114
|
|
|
3007
3115
|
var style = this.getStyle();
|
|
3008
|
-
var
|
|
3116
|
+
var align = this.getColumnProp('align');
|
|
3117
|
+
var className = classNames(this.getColumnProp('footerClassName'), this.getColumnProp('className'), _defineProperty({
|
|
3009
3118
|
'p-frozen-column': this.getColumnProp('frozen')
|
|
3010
|
-
});
|
|
3119
|
+
}, "p-align-".concat(align), !!align));
|
|
3011
3120
|
var colSpan = this.getColumnProp('colSpan');
|
|
3012
3121
|
var rowSpan = this.getColumnProp('rowSpan');
|
|
3013
3122
|
var content = ObjectUtils.getJSXElement(this.getColumnProp('footer'), {
|
|
@@ -3198,29 +3307,9 @@ var HeaderCheckbox = /*#__PURE__*/function (_Component) {
|
|
|
3198
3307
|
return HeaderCheckbox;
|
|
3199
3308
|
}(Component);
|
|
3200
3309
|
|
|
3201
|
-
var
|
|
3202
|
-
STARTS_WITH: 'startsWith',
|
|
3203
|
-
CONTAINS: 'contains',
|
|
3204
|
-
NOT_CONTAINS: 'notContains',
|
|
3205
|
-
ENDS_WITH: 'endsWith',
|
|
3206
|
-
EQUALS: 'equals',
|
|
3207
|
-
NOT_EQUALS: 'notEquals',
|
|
3208
|
-
IN: 'in',
|
|
3209
|
-
LESS_THAN: 'lt',
|
|
3210
|
-
LESS_THAN_OR_EQUAL_TO: 'lte',
|
|
3211
|
-
GREATER_THAN: 'gt',
|
|
3212
|
-
GREATER_THAN_OR_EQUAL_TO: 'gte',
|
|
3213
|
-
BETWEEN: 'between',
|
|
3214
|
-
DATE_IS: 'dateIs',
|
|
3215
|
-
DATE_IS_NOT: 'dateIsNot',
|
|
3216
|
-
DATE_BEFORE: 'dateBefore',
|
|
3217
|
-
DATE_AFTER: 'dateAfter',
|
|
3218
|
-
CUSTOM: 'custom'
|
|
3219
|
-
});
|
|
3220
|
-
|
|
3221
|
-
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; }
|
|
3310
|
+
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; }
|
|
3222
3311
|
|
|
3223
|
-
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
3312
|
+
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; }
|
|
3224
3313
|
|
|
3225
3314
|
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); }; }
|
|
3226
3315
|
|
|
@@ -4162,7 +4251,7 @@ var ColumnFilter = /*#__PURE__*/function (_Component) {
|
|
|
4162
4251
|
return /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(CSSTransition, {
|
|
4163
4252
|
nodeRef: this.overlayRef,
|
|
4164
4253
|
classNames: "p-connected-overlay",
|
|
4165
|
-
in: this.state.overlayVisible,
|
|
4254
|
+
"in": this.state.overlayVisible,
|
|
4166
4255
|
timeout: {
|
|
4167
4256
|
enter: 120,
|
|
4168
4257
|
exit: 100
|
|
@@ -4200,9 +4289,9 @@ var ColumnFilter = /*#__PURE__*/function (_Component) {
|
|
|
4200
4289
|
return ColumnFilter;
|
|
4201
4290
|
}(Component);
|
|
4202
4291
|
|
|
4203
|
-
function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
4292
|
+
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; }
|
|
4204
4293
|
|
|
4205
|
-
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
4294
|
+
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; }
|
|
4206
4295
|
|
|
4207
4296
|
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); }; }
|
|
4208
4297
|
|
|
@@ -4574,7 +4663,8 @@ var HeaderCell = /*#__PURE__*/function (_Component) {
|
|
|
4574
4663
|
var isSortableDisabled = this.isSortableDisabled();
|
|
4575
4664
|
var sortMeta = this.getSortMeta();
|
|
4576
4665
|
var style = this.getStyle();
|
|
4577
|
-
var
|
|
4666
|
+
var align = this.getColumnProp('alignHeader') || this.getColumnProp('align');
|
|
4667
|
+
var className = classNames(this.getColumnProp('headerClassName'), this.getColumnProp('className'), _defineProperty({
|
|
4578
4668
|
'p-sortable-column': this.getColumnProp('sortable'),
|
|
4579
4669
|
'p-resizable-column': this.props.resizableColumns,
|
|
4580
4670
|
'p-highlight': sortMeta.sorted,
|
|
@@ -4582,7 +4672,7 @@ var HeaderCell = /*#__PURE__*/function (_Component) {
|
|
|
4582
4672
|
'p-selection-column': this.getColumnProp('selectionMode'),
|
|
4583
4673
|
'p-sortable-disabled': this.getColumnProp('sortable') && isSortableDisabled,
|
|
4584
4674
|
'p-reorderable-column': this.props.reorderableColumns && this.getColumnProp('reorderable')
|
|
4585
|
-
});
|
|
4675
|
+
}, "p-align-".concat(align), !!align));
|
|
4586
4676
|
var tabIndex = this.getColumnProp('sortable') && !isSortableDisabled ? this.props.tabIndex : null;
|
|
4587
4677
|
var colSpan = this.getColumnProp('colSpan');
|
|
4588
4678
|
var rowSpan = this.getColumnProp('rowSpan');
|
|
@@ -4619,9 +4709,9 @@ var HeaderCell = /*#__PURE__*/function (_Component) {
|
|
|
4619
4709
|
return HeaderCell;
|
|
4620
4710
|
}(Component);
|
|
4621
4711
|
|
|
4622
|
-
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
4712
|
+
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; }
|
|
4623
4713
|
|
|
4624
|
-
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
4714
|
+
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; }
|
|
4625
4715
|
|
|
4626
4716
|
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); }; }
|
|
4627
4717
|
|
|
@@ -4864,9 +4954,9 @@ var TableHeader = /*#__PURE__*/function (_Component) {
|
|
|
4864
4954
|
return TableHeader;
|
|
4865
4955
|
}(Component);
|
|
4866
4956
|
|
|
4867
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
4957
|
+
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; }
|
|
4868
4958
|
|
|
4869
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
4959
|
+
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; }
|
|
4870
4960
|
|
|
4871
4961
|
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); }; }
|
|
4872
4962
|
|
|
@@ -4886,7 +4976,8 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
4886
4976
|
d_rows: props.rows,
|
|
4887
4977
|
columnOrder: [],
|
|
4888
4978
|
groupRowsSortMeta: null,
|
|
4889
|
-
editingMeta: {}
|
|
4979
|
+
editingMeta: {},
|
|
4980
|
+
attributeSelector: null
|
|
4890
4981
|
};
|
|
4891
4982
|
|
|
4892
4983
|
if (!_this.props.onPage) {
|
|
@@ -4904,9 +4995,8 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
4904
4995
|
|
|
4905
4996
|
if (!_this.props.onFilter) {
|
|
4906
4997
|
_this.state.filters = props.filters;
|
|
4907
|
-
}
|
|
4998
|
+
} // header
|
|
4908
4999
|
|
|
4909
|
-
_this.attributeSelector = UniqueComponentId(); // header
|
|
4910
5000
|
|
|
4911
5001
|
_this.onSortChange = _this.onSortChange.bind(_assertThisInitialized(_this));
|
|
4912
5002
|
_this.onFilterChange = _this.onFilterChange.bind(_assertThisInitialized(_this));
|
|
@@ -5250,18 +5340,14 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5250
5340
|
this.el.style.width = this.tableWidthState;
|
|
5251
5341
|
}
|
|
5252
5342
|
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
if (this.props.scrollable && widths && widths.length > 0) {
|
|
5343
|
+
if (ObjectUtils.isNotEmpty(widths)) {
|
|
5344
|
+
this.createStyleElement();
|
|
5256
5345
|
var innerHTML = '';
|
|
5257
5346
|
widths.forEach(function (width, index) {
|
|
5258
|
-
|
|
5347
|
+
var style = _this4.props.scrollable ? "flex: 1 1 ".concat(width, "px !important") : "width: ".concat(width, "px !important");
|
|
5348
|
+
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 ");
|
|
5259
5349
|
});
|
|
5260
5350
|
this.styleElement.innerHTML = innerHTML;
|
|
5261
|
-
} else {
|
|
5262
|
-
DomHandler.find(this.table, '.p-datatable-thead > tr > th').forEach(function (header, index) {
|
|
5263
|
-
return header.style.width = widths[index] + 'px';
|
|
5264
|
-
});
|
|
5265
5351
|
}
|
|
5266
5352
|
}
|
|
5267
5353
|
}
|
|
@@ -5286,25 +5372,42 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5286
5372
|
value: function getGroupRowSortField() {
|
|
5287
5373
|
return this.props.sortMode === 'single' ? this.props.sortField : this.state.groupRowsSortMeta ? this.state.groupRowsSortMeta.field : null;
|
|
5288
5374
|
}
|
|
5375
|
+
}, {
|
|
5376
|
+
key: "getSelectableData",
|
|
5377
|
+
value: function getSelectableData(val) {
|
|
5378
|
+
var _this5 = this;
|
|
5379
|
+
|
|
5380
|
+
if (this.props.showSelectionElement || this.props.isDataSelectable) {
|
|
5381
|
+
return val.filter(function (data, index) {
|
|
5382
|
+
var isSelectable = true;
|
|
5383
|
+
if (_this5.props.showSelectionElement) isSelectable = _this5.props.showSelectionElement({
|
|
5384
|
+
rowIndex: index,
|
|
5385
|
+
props: _this5.props
|
|
5386
|
+
});
|
|
5387
|
+
if (_this5.props.isDataSelectable && isSelectable) isSelectable = _this5.props.isDataSelectable({
|
|
5388
|
+
data: data,
|
|
5389
|
+
index: index
|
|
5390
|
+
});
|
|
5391
|
+
return isSelectable;
|
|
5392
|
+
});
|
|
5393
|
+
}
|
|
5394
|
+
|
|
5395
|
+
return val;
|
|
5396
|
+
}
|
|
5289
5397
|
}, {
|
|
5290
5398
|
key: "allRowsSelected",
|
|
5291
5399
|
value: function allRowsSelected(processedData) {
|
|
5292
|
-
var
|
|
5400
|
+
var _this6 = this;
|
|
5293
5401
|
|
|
5294
5402
|
if (this.props.onSelectAllChange) {
|
|
5295
5403
|
return this.props.selectAll;
|
|
5296
5404
|
} else {
|
|
5297
5405
|
var data = this.props.selectionPageOnly ? this.dataToRender(processedData) : processedData;
|
|
5298
5406
|
var val = this.props.frozenValue ? [].concat(_toConsumableArray(this.props.frozenValue), _toConsumableArray(data)) : data;
|
|
5299
|
-
var selectableVal = this.
|
|
5300
|
-
return _this5.props.showSelectionElement(data, {
|
|
5301
|
-
rowIndex: index,
|
|
5302
|
-
props: _this5.props
|
|
5303
|
-
});
|
|
5304
|
-
}) : val;
|
|
5407
|
+
var selectableVal = this.getSelectableData(val);
|
|
5305
5408
|
return selectableVal && this.props.selection && selectableVal.every(function (sv) {
|
|
5306
|
-
return
|
|
5307
|
-
return
|
|
5409
|
+
return _this6.props.selection.some(function (s) {
|
|
5410
|
+
return _this6.isEquals(s, sv);
|
|
5308
5411
|
});
|
|
5309
5412
|
});
|
|
5310
5413
|
}
|
|
@@ -5438,7 +5541,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5438
5541
|
}, {
|
|
5439
5542
|
key: "resizeTableCells",
|
|
5440
5543
|
value: function resizeTableCells(newColumnWidth, nextColumnWidth) {
|
|
5441
|
-
var
|
|
5544
|
+
var _this7 = this;
|
|
5442
5545
|
|
|
5443
5546
|
var widths = [];
|
|
5444
5547
|
var colIndex = DomHandler.index(this.resizeColumnElement);
|
|
@@ -5451,30 +5554,30 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5451
5554
|
var innerHTML = '';
|
|
5452
5555
|
widths.forEach(function (width, index) {
|
|
5453
5556
|
var colWidth = index === colIndex ? newColumnWidth : nextColumnWidth && index === colIndex + 1 ? nextColumnWidth : width;
|
|
5454
|
-
var style =
|
|
5455
|
-
innerHTML += "\n .p-datatable[".concat(
|
|
5557
|
+
var style = _this7.props.scrollable ? "flex: 1 1 ".concat(colWidth, "px !important") : "width: ".concat(colWidth, "px !important");
|
|
5558
|
+
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 ");
|
|
5456
5559
|
});
|
|
5457
5560
|
this.styleElement.innerHTML = innerHTML;
|
|
5458
5561
|
}
|
|
5459
5562
|
}, {
|
|
5460
5563
|
key: "bindColumnResizeEvents",
|
|
5461
5564
|
value: function bindColumnResizeEvents() {
|
|
5462
|
-
var
|
|
5565
|
+
var _this8 = this;
|
|
5463
5566
|
|
|
5464
5567
|
if (!this.documentColumnResizeListener) {
|
|
5465
5568
|
this.documentColumnResizeListener = document.addEventListener('mousemove', function (event) {
|
|
5466
|
-
if (
|
|
5467
|
-
|
|
5569
|
+
if (_this8.columnResizing) {
|
|
5570
|
+
_this8.onColumnResize(event);
|
|
5468
5571
|
}
|
|
5469
5572
|
});
|
|
5470
5573
|
}
|
|
5471
5574
|
|
|
5472
5575
|
if (!this.documentColumnResizeEndListener) {
|
|
5473
5576
|
this.documentColumnResizeEndListener = document.addEventListener('mouseup', function () {
|
|
5474
|
-
if (
|
|
5475
|
-
|
|
5577
|
+
if (_this8.columnResizing) {
|
|
5578
|
+
_this8.columnResizing = false;
|
|
5476
5579
|
|
|
5477
|
-
|
|
5580
|
+
_this8.onColumnResizeEnd();
|
|
5478
5581
|
}
|
|
5479
5582
|
});
|
|
5480
5583
|
}
|
|
@@ -5506,7 +5609,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5506
5609
|
}, {
|
|
5507
5610
|
key: "onColumnHeaderCheckboxChange",
|
|
5508
5611
|
value: function onColumnHeaderCheckboxChange(e, processedData) {
|
|
5509
|
-
var
|
|
5612
|
+
var _this9 = this;
|
|
5510
5613
|
|
|
5511
5614
|
if (this.props.onSelectAllChange) {
|
|
5512
5615
|
this.props.onSelectAllChange(e);
|
|
@@ -5516,18 +5619,13 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5516
5619
|
var data = this.props.selectionPageOnly ? this.dataToRender(processedData) : processedData;
|
|
5517
5620
|
var selection = this.props.selectionPageOnly && this.props.selection ? this.props.selection.filter(function (s) {
|
|
5518
5621
|
return !data.some(function (d) {
|
|
5519
|
-
return
|
|
5622
|
+
return _this9.isEquals(s, d);
|
|
5520
5623
|
});
|
|
5521
5624
|
}) : [];
|
|
5522
5625
|
|
|
5523
5626
|
if (checked) {
|
|
5524
5627
|
selection = this.props.frozenValue ? [].concat(_toConsumableArray(selection), _toConsumableArray(this.props.frozenValue), _toConsumableArray(data)) : [].concat(_toConsumableArray(selection), _toConsumableArray(data));
|
|
5525
|
-
selection = this.
|
|
5526
|
-
return _this8.props.showSelectionElement(data, {
|
|
5527
|
-
rowIndex: index,
|
|
5528
|
-
props: _this8.props
|
|
5529
|
-
});
|
|
5530
|
-
}) : selection;
|
|
5628
|
+
selection = this.getSelectableData(selection);
|
|
5531
5629
|
this.props.onAllRowsSelect && this.props.onAllRowsSelect({
|
|
5532
5630
|
originalEvent: originalEvent,
|
|
5533
5631
|
data: selection,
|
|
@@ -5613,7 +5711,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5613
5711
|
}, {
|
|
5614
5712
|
key: "onColumnHeaderDrop",
|
|
5615
5713
|
value: function onColumnHeaderDrop(e) {
|
|
5616
|
-
var
|
|
5714
|
+
var _this10 = this;
|
|
5617
5715
|
|
|
5618
5716
|
var event = e.originalEvent,
|
|
5619
5717
|
column = e.column;
|
|
@@ -5636,7 +5734,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5636
5734
|
};
|
|
5637
5735
|
|
|
5638
5736
|
var dragColIndex = columns.findIndex(function (child) {
|
|
5639
|
-
return isSameColumn(child,
|
|
5737
|
+
return isSameColumn(child, _this10.draggedColumn);
|
|
5640
5738
|
});
|
|
5641
5739
|
var dropColIndex = columns.findIndex(function (child) {
|
|
5642
5740
|
return isSameColumn(child, column);
|
|
@@ -5680,14 +5778,14 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5680
5778
|
}, {
|
|
5681
5779
|
key: "createStyleElement",
|
|
5682
5780
|
value: function createStyleElement() {
|
|
5683
|
-
this.styleElement = DomHandler.createInlineStyle();
|
|
5781
|
+
this.styleElement = DomHandler.createInlineStyle(PrimeReact.nonce);
|
|
5684
5782
|
}
|
|
5685
5783
|
}, {
|
|
5686
5784
|
key: "createResponsiveStyle",
|
|
5687
5785
|
value: function createResponsiveStyle() {
|
|
5688
5786
|
if (!this.responsiveStyleElement) {
|
|
5689
|
-
this.responsiveStyleElement = DomHandler.createInlineStyle();
|
|
5690
|
-
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");
|
|
5787
|
+
this.responsiveStyleElement = DomHandler.createInlineStyle(PrimeReact.nonce);
|
|
5788
|
+
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");
|
|
5691
5789
|
this.responsiveStyleElement.innerHTML = innerHTML;
|
|
5692
5790
|
}
|
|
5693
5791
|
}
|
|
@@ -5821,7 +5919,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5821
5919
|
}, {
|
|
5822
5920
|
key: "sortSingle",
|
|
5823
5921
|
value: function sortSingle(data, field, order) {
|
|
5824
|
-
var
|
|
5922
|
+
var _this11 = this;
|
|
5825
5923
|
|
|
5826
5924
|
if (this.props.groupRowsBy && this.props.groupRowsBy === this.props.sortField) {
|
|
5827
5925
|
var multiSortMeta = [{
|
|
@@ -5847,7 +5945,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5847
5945
|
var value1 = ObjectUtils.resolveFieldData(data1, field);
|
|
5848
5946
|
var value2 = ObjectUtils.resolveFieldData(data2, field);
|
|
5849
5947
|
|
|
5850
|
-
var result =
|
|
5948
|
+
var result = _this11.compareValuesOnSort(value1, value2);
|
|
5851
5949
|
|
|
5852
5950
|
return order * result;
|
|
5853
5951
|
});
|
|
@@ -5858,7 +5956,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5858
5956
|
}, {
|
|
5859
5957
|
key: "sortMultiple",
|
|
5860
5958
|
value: function sortMultiple(data) {
|
|
5861
|
-
var
|
|
5959
|
+
var _this12 = this;
|
|
5862
5960
|
|
|
5863
5961
|
var multiSortMeta = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
5864
5962
|
|
|
@@ -5875,7 +5973,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5875
5973
|
|
|
5876
5974
|
if (this.columnSortable && this.columnSortFunction) {
|
|
5877
5975
|
var meta = multiSortMeta.find(function (meta) {
|
|
5878
|
-
return meta.field ===
|
|
5976
|
+
return meta.field === _this12.columnField;
|
|
5879
5977
|
});
|
|
5880
5978
|
var field = this.columnField;
|
|
5881
5979
|
var order = meta ? meta.order : this.defaultSortOrder;
|
|
@@ -5885,7 +5983,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5885
5983
|
});
|
|
5886
5984
|
} else {
|
|
5887
5985
|
value.sort(function (data1, data2) {
|
|
5888
|
-
return
|
|
5986
|
+
return _this12.multisortField(data1, data2, multiSortMeta, 0);
|
|
5889
5987
|
});
|
|
5890
5988
|
}
|
|
5891
5989
|
|
|
@@ -5915,25 +6013,25 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5915
6013
|
}, {
|
|
5916
6014
|
key: "onFilterApply",
|
|
5917
6015
|
value: function onFilterApply() {
|
|
5918
|
-
var
|
|
6016
|
+
var _this13 = this;
|
|
5919
6017
|
|
|
5920
6018
|
clearTimeout(this.filterTimeout);
|
|
5921
6019
|
this.filterTimeout = setTimeout(function () {
|
|
5922
|
-
var filters =
|
|
6020
|
+
var filters = _this13.cloneFilters(_this13.state.d_filters);
|
|
5923
6021
|
|
|
5924
|
-
if (
|
|
5925
|
-
|
|
6022
|
+
if (_this13.props.onFilter) {
|
|
6023
|
+
_this13.props.onFilter(_this13.createEvent({
|
|
5926
6024
|
filters: filters
|
|
5927
6025
|
}));
|
|
5928
6026
|
} else {
|
|
5929
|
-
|
|
6027
|
+
_this13.setState({
|
|
5930
6028
|
first: 0,
|
|
5931
6029
|
filters: filters
|
|
5932
6030
|
});
|
|
5933
6031
|
}
|
|
5934
6032
|
|
|
5935
|
-
if (
|
|
5936
|
-
|
|
6033
|
+
if (_this13.props.onValueChange) {
|
|
6034
|
+
_this13.props.onValueChange(_this13.processedData({
|
|
5937
6035
|
filters: filters
|
|
5938
6036
|
}));
|
|
5939
6037
|
}
|
|
@@ -5990,7 +6088,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
5990
6088
|
if (isGlobalFilter && !globalMatch && globalFilterFieldsArray) {
|
|
5991
6089
|
for (var _j = 0; _j < globalFilterFieldsArray.length; _j++) {
|
|
5992
6090
|
var globalFilterField = globalFilterFieldsArray[_j];
|
|
5993
|
-
var matchMode = filters['global'] ? filters['global'].matchMode : FilterMatchMode
|
|
6091
|
+
var matchMode = filters['global'] ? filters['global'].matchMode : FilterMatchMode.CONTAINS;
|
|
5994
6092
|
var value = filters['global'] ? filters['global'].value : this.props.globalFilter;
|
|
5995
6093
|
globalMatch = FilterService.filters[matchMode](ObjectUtils.resolveFieldData(data[i], globalFilterField), value, this.props.filterLocale);
|
|
5996
6094
|
|
|
@@ -6023,7 +6121,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6023
6121
|
key: "executeLocalFilter",
|
|
6024
6122
|
value: function executeLocalFilter(field, rowData, filterMeta, index) {
|
|
6025
6123
|
var filterValue = filterMeta.value;
|
|
6026
|
-
var filterMatchMode = filterMeta.matchMode === 'custom' ? "custom_".concat(field) : filterMeta.matchMode || FilterMatchMode
|
|
6124
|
+
var filterMatchMode = filterMeta.matchMode === 'custom' ? "custom_".concat(field) : filterMeta.matchMode || FilterMatchMode.STARTS_WITH;
|
|
6027
6125
|
var dataFieldValue = ObjectUtils.resolveFieldData(rowData, field);
|
|
6028
6126
|
var filterConstraint = FilterService.filters[filterMatchMode];
|
|
6029
6127
|
return filterConstraint(dataFieldValue, filterValue, this.props.filterLocale, index);
|
|
@@ -6031,7 +6129,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6031
6129
|
}, {
|
|
6032
6130
|
key: "cloneFilters",
|
|
6033
6131
|
value: function cloneFilters(filters) {
|
|
6034
|
-
var
|
|
6132
|
+
var _this14 = this;
|
|
6035
6133
|
|
|
6036
6134
|
filters = filters || this.props.filters;
|
|
6037
6135
|
var cloned = {};
|
|
@@ -6055,7 +6153,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6055
6153
|
var field = col.props.filterField || col.props.field;
|
|
6056
6154
|
var filterFunction = col.props.filterFunction;
|
|
6057
6155
|
var dataType = col.props.dataType;
|
|
6058
|
-
var matchMode = col.props.filterMatchMode || (PrimeReact.filterMatchModeOptions[dataType] ? PrimeReact.filterMatchModeOptions[dataType][0] : FilterMatchMode
|
|
6156
|
+
var matchMode = col.props.filterMatchMode || (PrimeReact.filterMatchModeOptions[dataType] ? PrimeReact.filterMatchModeOptions[dataType][0] : FilterMatchMode.STARTS_WITH);
|
|
6059
6157
|
var constraint = {
|
|
6060
6158
|
value: null,
|
|
6061
6159
|
matchMode: matchMode
|
|
@@ -6073,7 +6171,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6073
6171
|
});
|
|
6074
6172
|
}
|
|
6075
6173
|
|
|
6076
|
-
_filters[field] =
|
|
6174
|
+
_filters[field] = _this14.props.filterDisplay === 'menu' ? {
|
|
6077
6175
|
operator: FilterOperator.AND,
|
|
6078
6176
|
constraints: [constraint]
|
|
6079
6177
|
} : constraint;
|
|
@@ -6152,7 +6250,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6152
6250
|
}, {
|
|
6153
6251
|
key: "exportCSV",
|
|
6154
6252
|
value: function exportCSV(options) {
|
|
6155
|
-
var
|
|
6253
|
+
var _this15 = this;
|
|
6156
6254
|
|
|
6157
6255
|
var data;
|
|
6158
6256
|
var csv = "\uFEFF";
|
|
@@ -6175,7 +6273,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6175
6273
|
csv += '"' + (header || field) + '"';
|
|
6176
6274
|
|
|
6177
6275
|
if (i < columns.length - 1) {
|
|
6178
|
-
csv +=
|
|
6276
|
+
csv += _this15.props.csvSeparator;
|
|
6179
6277
|
}
|
|
6180
6278
|
}
|
|
6181
6279
|
}); //body
|
|
@@ -6184,14 +6282,16 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6184
6282
|
csv += '\n';
|
|
6185
6283
|
columns.forEach(function (column, i) {
|
|
6186
6284
|
var _column$props2 = column.props,
|
|
6187
|
-
|
|
6285
|
+
columnField = _column$props2.field,
|
|
6286
|
+
exportField = _column$props2.exportField,
|
|
6188
6287
|
exportable = _column$props2.exportable;
|
|
6288
|
+
var field = exportField || columnField;
|
|
6189
6289
|
|
|
6190
6290
|
if (exportable && field) {
|
|
6191
6291
|
var cellData = ObjectUtils.resolveFieldData(record, field);
|
|
6192
6292
|
|
|
6193
6293
|
if (cellData != null) {
|
|
6194
|
-
cellData =
|
|
6294
|
+
cellData = _this15.props.exportFunction ? _this15.props.exportFunction({
|
|
6195
6295
|
data: cellData,
|
|
6196
6296
|
field: field,
|
|
6197
6297
|
rowData: record,
|
|
@@ -6202,7 +6302,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6202
6302
|
csv += '"' + cellData + '"';
|
|
6203
6303
|
|
|
6204
6304
|
if (i < columns.length - 1) {
|
|
6205
|
-
csv +=
|
|
6305
|
+
csv += _this15.props.csvSeparator;
|
|
6206
6306
|
}
|
|
6207
6307
|
}
|
|
6208
6308
|
});
|
|
@@ -6265,7 +6365,13 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6265
6365
|
}, {
|
|
6266
6366
|
key: "componentDidMount",
|
|
6267
6367
|
value: function componentDidMount() {
|
|
6268
|
-
this
|
|
6368
|
+
var _this16 = this;
|
|
6369
|
+
|
|
6370
|
+
this.setState({
|
|
6371
|
+
attributeSelector: UniqueComponentId()
|
|
6372
|
+
}, function () {
|
|
6373
|
+
_this16.el.setAttribute(_this16.state.attributeSelector, '');
|
|
6374
|
+
});
|
|
6269
6375
|
|
|
6270
6376
|
if (this.props.responsiveLayout === 'stack' && !this.props.scrollable) {
|
|
6271
6377
|
this.createResponsiveStyle();
|
|
@@ -6391,7 +6497,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6391
6497
|
}, {
|
|
6392
6498
|
key: "renderTableBody",
|
|
6393
6499
|
value: function renderTableBody(options, selectionModeInColumn, empty, isVirtualScrollerDisabled) {
|
|
6394
|
-
var tableSelector = this.attributeSelector;
|
|
6500
|
+
var tableSelector = this.state.attributeSelector;
|
|
6395
6501
|
var first = this.getFirst();
|
|
6396
6502
|
var editingMeta = this.state.editingMeta;
|
|
6397
6503
|
var rows = options.rows,
|
|
@@ -6455,6 +6561,8 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6455
6561
|
onRowEditCancel: this.props.onRowEditCancel,
|
|
6456
6562
|
cellClassName: this.props.cellClassName,
|
|
6457
6563
|
responsiveLayout: this.props.responsiveLayout,
|
|
6564
|
+
selectionAutoFocus: this.props.selectionAutoFocus,
|
|
6565
|
+
isDataSelectable: this.props.isDataSelectable,
|
|
6458
6566
|
showSelectionElement: this.props.showSelectionElement,
|
|
6459
6567
|
showRowReorderElement: this.props.showRowReorderElement,
|
|
6460
6568
|
expandedRowIcon: this.props.expandedRowIcon,
|
|
@@ -6520,6 +6628,8 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6520
6628
|
onRowEditCancel: this.props.onRowEditCancel,
|
|
6521
6629
|
cellClassName: this.props.cellClassName,
|
|
6522
6630
|
responsiveLayout: this.props.responsiveLayout,
|
|
6631
|
+
selectionAutoFocus: this.props.selectionAutoFocus,
|
|
6632
|
+
isDataSelectable: this.props.isDataSelectable,
|
|
6523
6633
|
showSelectionElement: this.props.showSelectionElement,
|
|
6524
6634
|
showRowReorderElement: this.props.showRowReorderElement,
|
|
6525
6635
|
expandedRowIcon: this.props.expandedRowIcon,
|
|
@@ -6544,7 +6654,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6544
6654
|
}, {
|
|
6545
6655
|
key: "renderContent",
|
|
6546
6656
|
value: function renderContent(processedData, columns, selectionModeInColumn, empty) {
|
|
6547
|
-
var
|
|
6657
|
+
var _this17 = this;
|
|
6548
6658
|
|
|
6549
6659
|
if (!columns) return;
|
|
6550
6660
|
var isVirtualScrollerDisabled = this.isVirtualScrollerDisabled();
|
|
@@ -6552,7 +6662,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6552
6662
|
return /*#__PURE__*/React.createElement("div", {
|
|
6553
6663
|
className: "p-datatable-wrapper",
|
|
6554
6664
|
style: {
|
|
6555
|
-
maxHeight: isVirtualScrollerDisabled ? this.props.scrollHeight :
|
|
6665
|
+
maxHeight: isVirtualScrollerDisabled ? this.props.scrollHeight : null
|
|
6556
6666
|
}
|
|
6557
6667
|
}, /*#__PURE__*/React.createElement(VirtualScroller, _extends({}, virtualScrollerOptions, {
|
|
6558
6668
|
items: processedData,
|
|
@@ -6563,21 +6673,21 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6563
6673
|
showSpacer: false,
|
|
6564
6674
|
contentTemplate: function contentTemplate(options) {
|
|
6565
6675
|
var ref = function ref(el) {
|
|
6566
|
-
|
|
6676
|
+
_this17.table = el;
|
|
6567
6677
|
options.spacerRef && options.spacerRef(el);
|
|
6568
6678
|
};
|
|
6569
6679
|
|
|
6570
|
-
var tableClassName = classNames('p-datatable-table',
|
|
6680
|
+
var tableClassName = classNames('p-datatable-table', _this17.props.tableClassName);
|
|
6571
6681
|
|
|
6572
|
-
var tableHeader =
|
|
6682
|
+
var tableHeader = _this17.renderTableHeader(options, empty);
|
|
6573
6683
|
|
|
6574
|
-
var tableBody =
|
|
6684
|
+
var tableBody = _this17.renderTableBody(options, selectionModeInColumn, empty, isVirtualScrollerDisabled);
|
|
6575
6685
|
|
|
6576
|
-
var tableFooter =
|
|
6686
|
+
var tableFooter = _this17.renderTableFooter(options);
|
|
6577
6687
|
|
|
6578
6688
|
return /*#__PURE__*/React.createElement("table", {
|
|
6579
6689
|
ref: ref,
|
|
6580
|
-
style:
|
|
6690
|
+
style: _this17.props.tableStyle,
|
|
6581
6691
|
className: tableClassName,
|
|
6582
6692
|
role: "table"
|
|
6583
6693
|
}, tableHeader, tableBody, tableFooter);
|
|
@@ -6639,12 +6749,12 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6639
6749
|
}, {
|
|
6640
6750
|
key: "renderResizeHelper",
|
|
6641
6751
|
value: function renderResizeHelper() {
|
|
6642
|
-
var
|
|
6752
|
+
var _this18 = this;
|
|
6643
6753
|
|
|
6644
6754
|
if (this.props.resizableColumns) {
|
|
6645
6755
|
return /*#__PURE__*/React.createElement("div", {
|
|
6646
6756
|
ref: function ref(el) {
|
|
6647
|
-
return
|
|
6757
|
+
return _this18.resizeHelper = el;
|
|
6648
6758
|
},
|
|
6649
6759
|
className: "p-column-resizer-helper",
|
|
6650
6760
|
style: {
|
|
@@ -6658,7 +6768,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6658
6768
|
}, {
|
|
6659
6769
|
key: "renderReorderIndicators",
|
|
6660
6770
|
value: function renderReorderIndicators() {
|
|
6661
|
-
var
|
|
6771
|
+
var _this19 = this;
|
|
6662
6772
|
|
|
6663
6773
|
if (this.props.reorderableColumns) {
|
|
6664
6774
|
var style = {
|
|
@@ -6667,13 +6777,13 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6667
6777
|
};
|
|
6668
6778
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
6669
6779
|
ref: function ref(el) {
|
|
6670
|
-
return
|
|
6780
|
+
return _this19.reorderIndicatorUp = el;
|
|
6671
6781
|
},
|
|
6672
6782
|
className: "pi pi-arrow-down p-datatable-reorder-indicator-up",
|
|
6673
6783
|
style: style
|
|
6674
6784
|
}), /*#__PURE__*/React.createElement("span", {
|
|
6675
6785
|
ref: function ref(el) {
|
|
6676
|
-
return
|
|
6786
|
+
return _this19.reorderIndicatorDown = el;
|
|
6677
6787
|
},
|
|
6678
6788
|
className: "pi pi-arrow-up p-datatable-reorder-indicator-down",
|
|
6679
6789
|
style: style
|
|
@@ -6685,15 +6795,18 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6685
6795
|
}, {
|
|
6686
6796
|
key: "render",
|
|
6687
6797
|
value: function render() {
|
|
6688
|
-
var
|
|
6798
|
+
var _this20 = this;
|
|
6689
6799
|
|
|
6690
6800
|
var processedData = this.processedData();
|
|
6691
6801
|
var columns = this.getColumns();
|
|
6692
6802
|
var totalRecords = this.getTotalRecords(processedData);
|
|
6693
6803
|
var empty = ObjectUtils.isEmpty(processedData);
|
|
6694
6804
|
var selectionModeInColumn = this.getSelectionModeInColumn(columns);
|
|
6805
|
+
var selectable = this.props.selectionMode || selectionModeInColumn;
|
|
6695
6806
|
var className = classNames('p-datatable p-component', {
|
|
6696
|
-
'p-datatable-hoverable-rows': this.props.rowHover
|
|
6807
|
+
'p-datatable-hoverable-rows': this.props.rowHover,
|
|
6808
|
+
'p-datatable-selectable': selectable && !this.props.cellSelection,
|
|
6809
|
+
'p-datatable-selectable-cell': selectable && this.props.cellSelection,
|
|
6697
6810
|
'p-datatable-auto-layout': this.props.autoLayout,
|
|
6698
6811
|
'p-datatable-resizable': this.props.resizableColumns,
|
|
6699
6812
|
'p-datatable-resizable-fit': this.props.resizableColumns && this.props.columnResizeMode === 'fit',
|
|
@@ -6721,7 +6834,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
6721
6834
|
var reorderIndicators = this.renderReorderIndicators();
|
|
6722
6835
|
return /*#__PURE__*/React.createElement("div", {
|
|
6723
6836
|
ref: function ref(el) {
|
|
6724
|
-
return
|
|
6837
|
+
return _this20.el = el;
|
|
6725
6838
|
},
|
|
6726
6839
|
id: this.props.id,
|
|
6727
6840
|
className: className,
|
|
@@ -6789,6 +6902,7 @@ _defineProperty(DataTable, "defaultProps", {
|
|
|
6789
6902
|
metaKeySelection: true,
|
|
6790
6903
|
selectOnEdit: true,
|
|
6791
6904
|
selectionPageOnly: false,
|
|
6905
|
+
selectionAutoFocus: true,
|
|
6792
6906
|
showSelectAll: true,
|
|
6793
6907
|
selectAll: false,
|
|
6794
6908
|
onSelectAllChange: null,
|
|
@@ -6840,6 +6954,7 @@ _defineProperty(DataTable, "defaultProps", {
|
|
|
6840
6954
|
globalFilterFields: null,
|
|
6841
6955
|
showSelectionElement: null,
|
|
6842
6956
|
showRowReorderElement: null,
|
|
6957
|
+
isDataSelectable: null,
|
|
6843
6958
|
onColumnResizeEnd: null,
|
|
6844
6959
|
onColumnResizerClick: null,
|
|
6845
6960
|
onColumnResizerDoubleClick: null,
|