primereact 7.0.0-rc.1 → 7.1.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/README.md +35 -10
- package/accordion/accordion.cjs.js +40 -27
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +7 -3
- package/accordion/accordion.esm.js +27 -14
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +40 -28
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +82 -46
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +95 -61
- package/api/api.esm.js +69 -33
- package/api/api.esm.min.js +1 -1
- package/api/api.js +83 -47
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +79 -71
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +11 -4
- package/autocomplete/autocomplete.esm.js +16 -8
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +75 -72
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +10 -9
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.d.ts +2 -1
- package/avatar/avatar.esm.js +5 -4
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +11 -10
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.cjs.js +3 -3
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.esm.js +1 -1
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +4 -4
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/badge.cjs.js +3 -3
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +1 -1
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +4 -4
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +27 -16
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +17 -7
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +26 -17
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +16 -16
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +1 -1
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +17 -17
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +42 -53
- package/button/button.cjs.min.js +1 -1
- package/button/button.d.ts +4 -11
- package/button/button.esm.js +31 -42
- package/button/button.esm.min.js +1 -1
- package/button/button.js +41 -54
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +193 -154
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +7 -2
- package/calendar/calendar.esm.js +68 -29
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +189 -155
- package/calendar/calendar.min.css +1 -1
- package/calendar/calendar.min.js +1 -1
- package/captcha/captcha.cjs.js +1 -1
- package/captcha/captcha.cjs.min.js +1 -1
- package/captcha/captcha.esm.min.js +1 -1
- package/captcha/captcha.js +2 -2
- package/captcha/captcha.min.js +1 -1
- package/card/card.cjs.js +13 -13
- package/card/card.cjs.min.js +1 -1
- package/card/card.esm.js +1 -1
- package/card/card.esm.min.js +1 -1
- package/card/card.js +14 -14
- package/card/card.min.js +1 -1
- package/carousel/carousel.cjs.js +45 -45
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +10 -10
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +45 -46
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +51 -47
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +2 -1
- package/cascadeselect/cascadeselect.esm.js +7 -3
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +48 -48
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +6 -8
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +1 -1
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +5 -5
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +20 -15
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +2 -1
- package/checkbox/checkbox.esm.js +13 -8
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +20 -16
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +16 -14
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +3 -4
- package/chip/chip.esm.js +11 -9
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +17 -15
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +46 -20
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +10 -0
- package/chips/chips.esm.js +37 -11
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +46 -21
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +35 -31
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +20 -6
- package/colorpicker/colorpicker.esm.js +7 -3
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +32 -32
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.cjs.min.js +1 -1
- package/column/column.d.ts +24 -2
- package/column/column.esm.min.js +1 -1
- package/column/column.js +1 -1
- package/column/column.min.js +1 -1
- package/columngroup/columngroup.cjs.min.js +1 -1
- package/columngroup/columngroup.esm.min.js +1 -1
- package/columngroup/columngroup.js +1 -1
- package/columngroup/columngroup.min.js +1 -1
- package/confirmdialog/confirmdialog.cjs.js +22 -20
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +4 -3
- package/confirmdialog/confirmdialog.esm.js +6 -4
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +22 -21
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +46 -41
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.d.ts +6 -4
- package/confirmpopup/confirmpopup.esm.js +12 -8
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +43 -41
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +68 -63
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +2 -1
- package/contextmenu/contextmenu.esm.js +35 -31
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +65 -64
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +11228 -846
- package/core/core.min.js +40 -1
- package/csstransition/csstransition.cjs.js +49 -19
- package/csstransition/csstransition.cjs.min.js +1 -1
- package/csstransition/csstransition.d.ts +8 -0
- package/csstransition/csstransition.esm.js +48 -19
- package/csstransition/csstransition.esm.min.js +1 -1
- package/csstransition/csstransition.js +49 -21
- package/csstransition/csstransition.min.js +1 -1
- package/csstransition/package.json +2 -1
- package/datascroller/datascroller.cjs.js +12 -11
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.esm.js +4 -3
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +12 -12
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +600 -519
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +30 -14
- package/datatable/datatable.esm.js +321 -240
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +597 -520
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +32 -29
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +6 -3
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +31 -30
- package/dataview/dataview.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +1 -1
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +2 -2
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +60 -59
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +3 -1
- package/dialog/dialog.esm.js +13 -13
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +57 -60
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +4 -4
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +1 -1
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +5 -5
- package/divider/divider.min.js +1 -1
- package/dock/dock.cjs.js +51 -17
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.d.ts +13 -0
- package/dock/dock.esm.js +39 -5
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +51 -18
- package/dock/dock.min.css +1 -1
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +99 -77
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +2 -1
- package/dropdown/dropdown.esm.js +37 -15
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +95 -78
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +44 -42
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.d.ts +1 -0
- package/editor/editor.esm.js +8 -4
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +43 -39
- package/editor/editor.min.js +1 -1
- package/fieldset/fieldset.cjs.js +17 -15
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.d.ts +2 -1
- package/fieldset/fieldset.esm.js +3 -1
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +16 -16
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +63 -56
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +2 -1
- package/fileupload/fileupload.esm.js +24 -17
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +63 -57
- package/fileupload/fileupload.min.js +1 -1
- package/fullcalendar/fullcalendar.cjs.js +6 -8
- package/fullcalendar/fullcalendar.cjs.min.js +1 -1
- package/fullcalendar/fullcalendar.esm.js +1 -1
- package/fullcalendar/fullcalendar.esm.min.js +1 -1
- package/fullcalendar/fullcalendar.js +5 -5
- package/fullcalendar/fullcalendar.min.js +1 -1
- package/galleria/galleria.cjs.js +71 -67
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.d.ts +2 -1
- package/galleria/galleria.esm.js +7 -4
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +68 -68
- package/galleria/galleria.min.js +1 -1
- package/gmap/gmap.cjs.js +1 -1
- package/gmap/gmap.cjs.min.js +1 -1
- package/gmap/gmap.esm.min.js +1 -1
- package/gmap/gmap.js +2 -2
- package/gmap/gmap.min.js +1 -1
- package/image/image.cjs.js +31 -27
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +5 -5
- package/image/image.esm.js +5 -2
- package/image/image.esm.min.js +1 -1
- package/image/image.js +29 -28
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +8 -8
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +1 -1
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +9 -9
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +11 -10
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.d.ts +1 -1
- package/inputmask/inputmask.esm.js +4 -3
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +11 -11
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +58 -34
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +4 -4
- package/inputnumber/inputnumber.esm.js +41 -17
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +57 -35
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +15 -12
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +8 -5
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +15 -13
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +12 -10
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.d.ts +1 -1
- package/inputtext/inputtext.esm.js +3 -1
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +11 -11
- package/inputtext/inputtext.min.css +1 -1
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +10 -9
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.d.ts +1 -1
- package/inputtextarea/inputtextarea.esm.js +2 -1
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +10 -10
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/keyfilter/keyfilter.cjs.js +5 -5
- package/keyfilter/keyfilter.cjs.min.js +1 -1
- package/keyfilter/keyfilter.esm.js +1 -1
- package/keyfilter/keyfilter.esm.min.js +1 -1
- package/keyfilter/keyfilter.js +6 -6
- package/keyfilter/keyfilter.min.js +1 -1
- package/knob/knob.cjs.js +7 -7
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +1 -1
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +8 -8
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +38 -36
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +3 -1
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +37 -37
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +36 -35
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +2 -1
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +36 -36
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +53 -46
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.d.ts +2 -1
- package/mention/mention.esm.js +9 -3
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +48 -47
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +33 -28
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +4 -1
- package/menu/menu.esm.js +7 -3
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +30 -29
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +38 -35
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +4 -2
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +37 -36
- package/menubar/menubar.min.css +1 -1
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +9 -8
- package/message/message.cjs.min.js +1 -1
- package/message/message.d.ts +3 -1
- package/message/message.esm.js +3 -2
- package/message/message.esm.min.js +1 -1
- package/message/message.js +10 -9
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +19 -17
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +2 -1
- package/messages/messages.esm.js +3 -1
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +18 -18
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +128 -116
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +5 -2
- package/multiselect/multiselect.esm.js +44 -32
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +124 -117
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +14 -13
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +2 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +2 -1
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +14 -14
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +35 -34
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +2 -1
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +35 -35
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +26 -26
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +1 -1
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +27 -27
- package/organizationchart/organizationchart.min.css +1 -1
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +33 -30
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +3 -2
- package/overlaypanel/overlaypanel.esm.js +11 -9
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +29 -31
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/overlayservice/overlayservice.cjs.js +2 -2
- package/overlayservice/overlayservice.cjs.min.js +1 -1
- package/overlayservice/overlayservice.esm.js +1 -1
- package/overlayservice/overlayservice.esm.min.js +1 -1
- package/overlayservice/overlayservice.js +3 -3
- package/overlayservice/overlayservice.min.js +1 -1
- package/package.json +11 -4
- package/paginator/paginator.cjs.js +48 -47
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +2 -1
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +48 -48
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +21 -18
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.d.ts +5 -3
- package/panel/panel.esm.js +6 -3
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +20 -19
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +40 -39
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +2 -1
- package/panelmenu/panelmenu.esm.js +2 -1
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +40 -40
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/password.cjs.js +33 -29
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +3 -2
- package/password/password.esm.js +7 -3
- package/password/password.esm.min.js +1 -1
- package/password/password.js +30 -30
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +58 -54
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +14 -10
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +58 -55
- package/picklist/picklist.min.js +1 -1
- package/portal/portal.cjs.js +4 -8
- package/portal/portal.cjs.min.js +1 -1
- package/portal/portal.esm.js +2 -6
- package/portal/portal.esm.min.js +1 -1
- package/portal/portal.js +5 -10
- package/portal/portal.min.js +1 -1
- package/primereact.all.cjs.js +3168 -2524
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +1939 -1294
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +3167 -2521
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +9 -9
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +1 -1
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +10 -10
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/progressspinner.cjs.js +5 -5
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +1 -1
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +6 -6
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +10 -9
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +2 -1
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +10 -10
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +10 -9
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +4 -3
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +10 -10
- package/rating/rating.min.js +1 -1
- package/resources/primereact.css +484 -431
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +38 -18
- package/resources/themes/arya-green/theme.css +38 -18
- package/resources/themes/arya-orange/theme.css +38 -18
- package/resources/themes/arya-purple/theme.css +38 -18
- package/resources/themes/bootstrap4-dark-blue/theme.css +42 -22
- package/resources/themes/bootstrap4-dark-purple/theme.css +42 -22
- package/resources/themes/bootstrap4-light-blue/theme.css +42 -22
- package/resources/themes/bootstrap4-light-purple/theme.css +42 -22
- package/resources/themes/fluent-light/theme.css +38 -18
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-blue/theme.css +5675 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/theme.css +5675 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-purple/theme.css +5675 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/theme.css +5675 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-blue/theme.css +5675 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-indigo/theme.css +5675 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-purple/theme.css +5675 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-teal/theme.css +5675 -0
- package/resources/themes/luna-amber/theme.css +42 -22
- package/resources/themes/luna-blue/theme.css +42 -22
- package/resources/themes/luna-green/theme.css +42 -22
- package/resources/themes/luna-pink/theme.css +42 -22
- package/resources/themes/md-dark-deeppurple/theme.css +227 -47
- package/resources/themes/md-dark-indigo/theme.css +227 -47
- package/resources/themes/md-light-deeppurple/theme.css +227 -47
- package/resources/themes/md-light-indigo/theme.css +227 -47
- package/resources/themes/mdc-dark-deeppurple/theme.css +227 -47
- package/resources/themes/mdc-dark-indigo/theme.css +227 -47
- package/resources/themes/mdc-light-deeppurple/theme.css +227 -47
- package/resources/themes/mdc-light-indigo/theme.css +227 -47
- package/resources/themes/nova/theme.css +42 -22
- package/resources/themes/nova-accent/theme.css +42 -22
- package/resources/themes/nova-alt/theme.css +42 -22
- package/resources/themes/rhea/theme.css +42 -22
- package/resources/themes/saga-blue/theme.css +38 -18
- package/resources/themes/saga-green/theme.css +38 -18
- package/resources/themes/saga-orange/theme.css +38 -18
- package/resources/themes/saga-purple/theme.css +38 -18
- package/resources/themes/tailwind-light/theme.css +42 -22
- package/resources/themes/vela-blue/theme.css +38 -18
- package/resources/themes/vela-green/theme.css +38 -18
- package/resources/themes/vela-orange/theme.css +38 -18
- package/resources/themes/vela-purple/theme.css +38 -18
- package/ripple/ripple.cjs.js +11 -11
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +3 -3
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +12 -12
- package/ripple/ripple.min.js +1 -1
- package/row/row.cjs.js +1 -1
- package/row/row.cjs.min.js +1 -1
- package/row/row.esm.min.js +1 -1
- package/row/row.js +2 -2
- package/row/row.min.js +1 -1
- package/scrollpanel/scrollpanel.cjs.js +19 -19
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +1 -1
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +20 -20
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +18 -13
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.d.ts +4 -2
- package/scrolltop/scrolltop.esm.js +9 -5
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +16 -14
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +17 -15
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +3 -1
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +16 -16
- package/selectbutton/selectbutton.min.js +1 -1
- package/selectitem/selectitem.d.ts +3 -1
- package/sidebar/sidebar.cjs.js +142 -116
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +4 -1
- package/sidebar/sidebar.esm.js +133 -108
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +139 -117
- package/sidebar/sidebar.min.css +1 -1
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +3 -3
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +1 -1
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +4 -4
- package/skeleton/skeleton.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +37 -32
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +2 -1
- package/slidemenu/slidemenu.esm.js +7 -3
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +34 -33
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +29 -19
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +21 -11
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +30 -20
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +20 -19
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.d.ts +3 -2
- package/speeddial/speeddial.esm.js +2 -1
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +20 -20
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +43 -35
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +8 -6
- package/splitbutton/splitbutton.esm.js +13 -5
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +40 -36
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +19 -19
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +2 -2
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +20 -20
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +10 -10
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +1 -1
- 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 +17 -17
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.esm.js +1 -1
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +18 -18
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +16 -15
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +2 -1
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +16 -16
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +195 -57
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +12 -1
- package/tabview/tabview.esm.js +165 -27
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +195 -58
- package/tabview/tabview.min.css +1 -1
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +9 -8
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.d.ts +2 -1
- package/tag/tag.esm.js +5 -4
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +10 -9
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +12 -12
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +1 -1
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +13 -13
- package/terminal/terminal.min.js +1 -1
- package/terminalservice/terminalservice.cjs.js +2 -2
- package/terminalservice/terminalservice.cjs.min.js +1 -1
- package/terminalservice/terminalservice.esm.js +1 -1
- package/terminalservice/terminalservice.esm.min.js +1 -1
- package/terminalservice/terminalservice.js +3 -3
- package/terminalservice/terminalservice.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +42 -36
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +2 -1
- package/tieredmenu/tieredmenu.esm.js +8 -3
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +38 -37
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +12 -12
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +1 -1
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +13 -13
- package/timeline/timeline.min.js +1 -1
- package/toast/toast.cjs.js +46 -40
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +2 -1
- package/toast/toast.esm.js +20 -15
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +44 -41
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +14 -9
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.d.ts +3 -2
- package/togglebutton/togglebutton.esm.js +8 -3
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +13 -10
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +7 -7
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +1 -1
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +8 -8
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +65 -36
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.d.ts +0 -1
- package/tooltip/tooltip.esm.js +36 -8
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +64 -37
- package/tooltip/tooltip.min.css +1 -1
- package/tooltip/tooltip.min.js +1 -1
- package/tooltip/tooltipoptions.d.ts +2 -0
- package/tree/tree.cjs.js +52 -51
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +14 -3
- package/tree/tree.esm.js +2 -1
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +52 -52
- package/tree/tree.min.js +1 -1
- package/treenode/treenode.d.ts +3 -1
- package/treeselect/treeselect.cjs.js +50 -46
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +11 -3
- package/treeselect/treeselect.esm.js +10 -6
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +47 -47
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +1363 -312
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +10 -3
- package/treetable/treetable.esm.js +1267 -216
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +1362 -313
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +11 -10
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +2 -1
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +11 -11
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +154 -33
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +17 -0
- package/utils/utils.esm.js +153 -33
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +155 -34
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +44 -34
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +29 -19
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +45 -35
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +2 -2
- package/core/core.cjs.js +0 -2987
- package/core/core.cjs.min.js +0 -1
- package/core/core.esm.js +0 -2963
- package/core/core.esm.min.js +0 -1
- package/core/package.json +0 -5
- package/util.d.ts +0 -1
package/treetable/treetable.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
this.primereact = this.primereact || {};
|
|
2
|
-
this.primereact.treetable = (function (exports, React, api,
|
|
2
|
+
this.primereact.treetable = (function (exports, React, api, utils, paginator, inputtext, overlayservice, ripple) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
6
6
|
|
|
7
7
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
8
8
|
|
|
9
|
-
function _arrayLikeToArray$
|
|
9
|
+
function _arrayLikeToArray$5(arr, len) {
|
|
10
10
|
if (len == null || len > arr.length) len = arr.length;
|
|
11
11
|
|
|
12
12
|
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
@@ -17,20 +17,20 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
function _arrayWithoutHoles(arr) {
|
|
20
|
-
if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
20
|
+
if (Array.isArray(arr)) return _arrayLikeToArray$5(arr);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
function _iterableToArray(iter) {
|
|
24
24
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
function _unsupportedIterableToArray$
|
|
27
|
+
function _unsupportedIterableToArray$5(o, minLen) {
|
|
28
28
|
if (!o) return;
|
|
29
|
-
if (typeof o === "string") return _arrayLikeToArray$
|
|
29
|
+
if (typeof o === "string") return _arrayLikeToArray$5(o, minLen);
|
|
30
30
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
31
31
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
32
32
|
if (n === "Map" || n === "Set") return Array.from(o);
|
|
33
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$
|
|
33
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$5(o, minLen);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
function _nonIterableSpread() {
|
|
@@ -38,7 +38,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
function _toConsumableArray(arr) {
|
|
41
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray$
|
|
41
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray$5(arr) || _nonIterableSpread();
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
function _classCallCheck(instance, Constructor) {
|
|
@@ -143,11 +143,11 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
143
143
|
return obj;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
function _createForOfIteratorHelper$
|
|
146
|
+
function _createForOfIteratorHelper$4(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$4(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
147
147
|
|
|
148
|
-
function _unsupportedIterableToArray$
|
|
148
|
+
function _unsupportedIterableToArray$4(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$4(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$4(o, minLen); }
|
|
149
149
|
|
|
150
|
-
function _arrayLikeToArray$
|
|
150
|
+
function _arrayLikeToArray$4(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
151
151
|
|
|
152
152
|
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); }; }
|
|
153
153
|
|
|
@@ -176,14 +176,14 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
176
176
|
if (column.props.sortable) {
|
|
177
177
|
var targetNode = event.target;
|
|
178
178
|
|
|
179
|
-
if (
|
|
179
|
+
if (utils.DomHandler.hasClass(targetNode, 'p-sortable-column') || utils.DomHandler.hasClass(targetNode, 'p-column-title') || utils.DomHandler.hasClass(targetNode, 'p-sortable-column-icon') || utils.DomHandler.hasClass(targetNode.parentElement, 'p-sortable-column-icon')) {
|
|
180
180
|
this.props.onSort({
|
|
181
181
|
originalEvent: event,
|
|
182
182
|
sortField: column.props.sortField || column.props.field,
|
|
183
183
|
sortFunction: column.props.sortFunction,
|
|
184
184
|
sortable: column.props.sortable
|
|
185
185
|
});
|
|
186
|
-
|
|
186
|
+
utils.DomHandler.clearSelection();
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
189
|
}
|
|
@@ -292,7 +292,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
292
292
|
key: "hasColumnFilter",
|
|
293
293
|
value: function hasColumnFilter(columns) {
|
|
294
294
|
if (columns) {
|
|
295
|
-
var _iterator = _createForOfIteratorHelper$
|
|
295
|
+
var _iterator = _createForOfIteratorHelper$4(columns),
|
|
296
296
|
_step;
|
|
297
297
|
|
|
298
298
|
try {
|
|
@@ -317,8 +317,8 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
317
317
|
value: function renderSortIcon(column, sorted, sortOrder) {
|
|
318
318
|
if (column.props.sortable) {
|
|
319
319
|
var sortIcon = sorted ? sortOrder < 0 ? 'pi-sort-amount-down' : 'pi-sort-amount-up-alt' : 'pi-sort-alt';
|
|
320
|
-
var sortIconClassName =
|
|
321
|
-
return /*#__PURE__*/React__default[
|
|
320
|
+
var sortIconClassName = utils.classNames('p-sortable-column-icon', 'pi pi-fw', sortIcon);
|
|
321
|
+
return /*#__PURE__*/React__default["default"].createElement("span", {
|
|
322
322
|
className: sortIconClassName
|
|
323
323
|
});
|
|
324
324
|
} else {
|
|
@@ -331,7 +331,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
331
331
|
var _this3 = this;
|
|
332
332
|
|
|
333
333
|
if (this.props.resizableColumns) {
|
|
334
|
-
return /*#__PURE__*/React__default[
|
|
334
|
+
return /*#__PURE__*/React__default["default"].createElement("span", {
|
|
335
335
|
className: "p-column-resizer p-clickable",
|
|
336
336
|
onMouseDown: function onMouseDown(e) {
|
|
337
337
|
return _this3.onResizerMouseDown(e, column);
|
|
@@ -355,7 +355,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
355
355
|
key: "renderSortBadge",
|
|
356
356
|
value: function renderSortBadge(sortMetaDataIndex) {
|
|
357
357
|
if (sortMetaDataIndex !== -1 && this.state.badgeVisible) {
|
|
358
|
-
return /*#__PURE__*/React__default[
|
|
358
|
+
return /*#__PURE__*/React__default["default"].createElement("span", {
|
|
359
359
|
className: "p-sortable-column-badge"
|
|
360
360
|
}, sortMetaDataIndex + 1);
|
|
361
361
|
}
|
|
@@ -370,7 +370,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
370
370
|
var filterElement;
|
|
371
371
|
|
|
372
372
|
if (column.props.filter && options.renderFilter) {
|
|
373
|
-
filterElement = column.props.filterElement || /*#__PURE__*/React__default[
|
|
373
|
+
filterElement = column.props.filterElement || /*#__PURE__*/React__default["default"].createElement(inputtext.InputText, {
|
|
374
374
|
onInput: function onInput(e) {
|
|
375
375
|
return _this4.onFilterInput(e, column);
|
|
376
376
|
},
|
|
@@ -383,9 +383,9 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
383
383
|
}
|
|
384
384
|
|
|
385
385
|
if (options.filterOnly) {
|
|
386
|
-
return /*#__PURE__*/React__default[
|
|
386
|
+
return /*#__PURE__*/React__default["default"].createElement("th", {
|
|
387
387
|
key: column.props.columnKey || column.props.field || options.index,
|
|
388
|
-
className:
|
|
388
|
+
className: utils.classNames('p-filter-column', column.props.filterHeaderClassName),
|
|
389
389
|
style: column.props.filterHeaderStyle || column.props.style,
|
|
390
390
|
rowSpan: column.props.rowSpan,
|
|
391
391
|
colSpan: column.props.colSpan
|
|
@@ -401,13 +401,13 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
401
401
|
var sortIconElement = this.renderSortIcon(column, sorted, sortOrder);
|
|
402
402
|
var ariaSortData = this.getAriaSort(column, sorted, sortOrder);
|
|
403
403
|
var sortBadge = this.renderSortBadge(sortMetaDataIndex);
|
|
404
|
-
var className =
|
|
404
|
+
var className = utils.classNames(column.props.headerClassName || column.props.className, {
|
|
405
405
|
'p-sortable-column': column.props.sortable,
|
|
406
406
|
'p-highlight': sorted,
|
|
407
407
|
'p-resizable-column': this.props.resizableColumns
|
|
408
408
|
});
|
|
409
409
|
var resizer = this.renderResizer(column);
|
|
410
|
-
return /*#__PURE__*/React__default[
|
|
410
|
+
return /*#__PURE__*/React__default["default"].createElement("th", {
|
|
411
411
|
key: column.columnKey || column.field || options.index,
|
|
412
412
|
className: className,
|
|
413
413
|
style: column.props.headerStyle || column.props.style,
|
|
@@ -436,7 +436,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
436
436
|
onDrop: function onDrop(e) {
|
|
437
437
|
return _this4.onDrop(e, column);
|
|
438
438
|
}
|
|
439
|
-
}, resizer, /*#__PURE__*/React__default[
|
|
439
|
+
}, resizer, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
440
440
|
className: "p-column-title"
|
|
441
441
|
}, column.props.header), sortIconElement, sortBadge, filterElement);
|
|
442
442
|
}
|
|
@@ -446,7 +446,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
446
446
|
value: function renderHeaderRow(row, index) {
|
|
447
447
|
var _this5 = this;
|
|
448
448
|
|
|
449
|
-
var rowColumns = React__default[
|
|
449
|
+
var rowColumns = React__default["default"].Children.toArray(row.props.children);
|
|
450
450
|
var rowHeaderCells = rowColumns.map(function (col, i) {
|
|
451
451
|
return _this5.renderHeaderCell(col, {
|
|
452
452
|
index: i,
|
|
@@ -454,72 +454,1039 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
454
454
|
renderFilter: true
|
|
455
455
|
});
|
|
456
456
|
});
|
|
457
|
-
return /*#__PURE__*/React__default[
|
|
457
|
+
return /*#__PURE__*/React__default["default"].createElement("tr", {
|
|
458
458
|
key: index
|
|
459
459
|
}, rowHeaderCells);
|
|
460
460
|
}
|
|
461
461
|
}, {
|
|
462
|
-
key: "renderColumnGroup",
|
|
463
|
-
value: function renderColumnGroup() {
|
|
464
|
-
var _this6 = this;
|
|
465
|
-
|
|
466
|
-
var rows = React__default[
|
|
467
|
-
return rows.map(function (row, i) {
|
|
468
|
-
return _this6.renderHeaderRow(row, i);
|
|
469
|
-
});
|
|
462
|
+
key: "renderColumnGroup",
|
|
463
|
+
value: function renderColumnGroup() {
|
|
464
|
+
var _this6 = this;
|
|
465
|
+
|
|
466
|
+
var rows = React__default["default"].Children.toArray(this.props.columnGroup.props.children);
|
|
467
|
+
return rows.map(function (row, i) {
|
|
468
|
+
return _this6.renderHeaderRow(row, i);
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
}, {
|
|
472
|
+
key: "renderColumns",
|
|
473
|
+
value: function renderColumns(columns) {
|
|
474
|
+
var _this7 = this;
|
|
475
|
+
|
|
476
|
+
if (columns) {
|
|
477
|
+
if (this.hasColumnFilter(columns)) {
|
|
478
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("tr", null, columns.map(function (col, i) {
|
|
479
|
+
return _this7.renderHeaderCell(col, {
|
|
480
|
+
index: i,
|
|
481
|
+
filterOnly: false,
|
|
482
|
+
renderFilter: false
|
|
483
|
+
});
|
|
484
|
+
})), /*#__PURE__*/React__default["default"].createElement("tr", null, columns.map(function (col, i) {
|
|
485
|
+
return _this7.renderHeaderCell(col, {
|
|
486
|
+
index: i,
|
|
487
|
+
filterOnly: true,
|
|
488
|
+
renderFilter: true
|
|
489
|
+
});
|
|
490
|
+
})));
|
|
491
|
+
} else {
|
|
492
|
+
return /*#__PURE__*/React__default["default"].createElement("tr", null, columns.map(function (col, i) {
|
|
493
|
+
return _this7.renderHeaderCell(col, {
|
|
494
|
+
index: i,
|
|
495
|
+
filterOnly: false,
|
|
496
|
+
renderFilter: false
|
|
497
|
+
});
|
|
498
|
+
}));
|
|
499
|
+
}
|
|
500
|
+
} else {
|
|
501
|
+
return null;
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
}, {
|
|
505
|
+
key: "render",
|
|
506
|
+
value: function render() {
|
|
507
|
+
var content = this.props.columnGroup ? this.renderColumnGroup() : this.renderColumns(this.props.columns);
|
|
508
|
+
return /*#__PURE__*/React__default["default"].createElement("thead", {
|
|
509
|
+
className: "p-treetable-thead"
|
|
510
|
+
}, content);
|
|
511
|
+
}
|
|
512
|
+
}], [{
|
|
513
|
+
key: "getDerivedStateFromProps",
|
|
514
|
+
value: function getDerivedStateFromProps(nextProps, prevState) {
|
|
515
|
+
return {
|
|
516
|
+
badgeVisible: nextProps.multiSortMeta && nextProps.multiSortMeta.length > 1
|
|
517
|
+
};
|
|
518
|
+
}
|
|
519
|
+
}]);
|
|
520
|
+
|
|
521
|
+
return TreeTableHeader;
|
|
522
|
+
}(React.Component);
|
|
523
|
+
|
|
524
|
+
function _createForOfIteratorHelper$3(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$3(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
525
|
+
|
|
526
|
+
function _unsupportedIterableToArray$3(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$3(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$3(o, minLen); }
|
|
527
|
+
|
|
528
|
+
function _arrayLikeToArray$3(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
529
|
+
|
|
530
|
+
var DomHandler = /*#__PURE__*/function () {
|
|
531
|
+
function DomHandler() {
|
|
532
|
+
_classCallCheck(this, DomHandler);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
_createClass(DomHandler, null, [{
|
|
536
|
+
key: "innerWidth",
|
|
537
|
+
value: function innerWidth(el) {
|
|
538
|
+
if (el) {
|
|
539
|
+
var width = el.offsetWidth;
|
|
540
|
+
var style = getComputedStyle(el);
|
|
541
|
+
width += parseFloat(style.paddingLeft) + parseFloat(style.paddingRight);
|
|
542
|
+
return width;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
return 0;
|
|
546
|
+
}
|
|
547
|
+
}, {
|
|
548
|
+
key: "width",
|
|
549
|
+
value: function width(el) {
|
|
550
|
+
if (el) {
|
|
551
|
+
var width = el.offsetWidth;
|
|
552
|
+
var style = getComputedStyle(el);
|
|
553
|
+
width -= parseFloat(style.paddingLeft) + parseFloat(style.paddingRight);
|
|
554
|
+
return width;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
return 0;
|
|
558
|
+
}
|
|
559
|
+
}, {
|
|
560
|
+
key: "getWindowScrollTop",
|
|
561
|
+
value: function getWindowScrollTop() {
|
|
562
|
+
var doc = document.documentElement;
|
|
563
|
+
return (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0);
|
|
564
|
+
}
|
|
565
|
+
}, {
|
|
566
|
+
key: "getWindowScrollLeft",
|
|
567
|
+
value: function getWindowScrollLeft() {
|
|
568
|
+
var doc = document.documentElement;
|
|
569
|
+
return (window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0);
|
|
570
|
+
}
|
|
571
|
+
}, {
|
|
572
|
+
key: "getOuterWidth",
|
|
573
|
+
value: function getOuterWidth(el, margin) {
|
|
574
|
+
if (el) {
|
|
575
|
+
var width = el.offsetWidth || el.getBoundingClientRect().width;
|
|
576
|
+
|
|
577
|
+
if (margin) {
|
|
578
|
+
var style = getComputedStyle(el);
|
|
579
|
+
width += parseFloat(style.marginLeft) + parseFloat(style.marginRight);
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
return width;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
return 0;
|
|
586
|
+
}
|
|
587
|
+
}, {
|
|
588
|
+
key: "getOuterHeight",
|
|
589
|
+
value: function getOuterHeight(el, margin) {
|
|
590
|
+
if (el) {
|
|
591
|
+
var height = el.offsetHeight || el.getBoundingClientRect().height;
|
|
592
|
+
|
|
593
|
+
if (margin) {
|
|
594
|
+
var style = getComputedStyle(el);
|
|
595
|
+
height += parseFloat(style.marginTop) + parseFloat(style.marginBottom);
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
return height;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
return 0;
|
|
602
|
+
}
|
|
603
|
+
}, {
|
|
604
|
+
key: "getClientHeight",
|
|
605
|
+
value: function getClientHeight(el, margin) {
|
|
606
|
+
if (el) {
|
|
607
|
+
var height = el.clientHeight;
|
|
608
|
+
|
|
609
|
+
if (margin) {
|
|
610
|
+
var style = getComputedStyle(el);
|
|
611
|
+
height += parseFloat(style.marginTop) + parseFloat(style.marginBottom);
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
return height;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
return 0;
|
|
618
|
+
}
|
|
619
|
+
}, {
|
|
620
|
+
key: "getClientWidth",
|
|
621
|
+
value: function getClientWidth(el, margin) {
|
|
622
|
+
if (el) {
|
|
623
|
+
var width = el.clientWidth;
|
|
624
|
+
|
|
625
|
+
if (margin) {
|
|
626
|
+
var style = getComputedStyle(el);
|
|
627
|
+
width += parseFloat(style.marginLeft) + parseFloat(style.marginRight);
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
return width;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
return 0;
|
|
634
|
+
}
|
|
635
|
+
}, {
|
|
636
|
+
key: "getViewport",
|
|
637
|
+
value: function getViewport() {
|
|
638
|
+
var win = window,
|
|
639
|
+
d = document,
|
|
640
|
+
e = d.documentElement,
|
|
641
|
+
g = d.getElementsByTagName('body')[0],
|
|
642
|
+
w = win.innerWidth || e.clientWidth || g.clientWidth,
|
|
643
|
+
h = win.innerHeight || e.clientHeight || g.clientHeight;
|
|
644
|
+
return {
|
|
645
|
+
width: w,
|
|
646
|
+
height: h
|
|
647
|
+
};
|
|
648
|
+
}
|
|
649
|
+
}, {
|
|
650
|
+
key: "getOffset",
|
|
651
|
+
value: function getOffset(el) {
|
|
652
|
+
if (el) {
|
|
653
|
+
var rect = el.getBoundingClientRect();
|
|
654
|
+
return {
|
|
655
|
+
top: rect.top + (window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0),
|
|
656
|
+
left: rect.left + (window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0)
|
|
657
|
+
};
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
return {
|
|
661
|
+
top: 'auto',
|
|
662
|
+
left: 'auto'
|
|
663
|
+
};
|
|
664
|
+
}
|
|
665
|
+
}, {
|
|
666
|
+
key: "index",
|
|
667
|
+
value: function index(element) {
|
|
668
|
+
if (element) {
|
|
669
|
+
var children = element.parentNode.childNodes;
|
|
670
|
+
var num = 0;
|
|
671
|
+
|
|
672
|
+
for (var i = 0; i < children.length; i++) {
|
|
673
|
+
if (children[i] === element) return num;
|
|
674
|
+
if (children[i].nodeType === 1) num++;
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
return -1;
|
|
679
|
+
}
|
|
680
|
+
}, {
|
|
681
|
+
key: "addMultipleClasses",
|
|
682
|
+
value: function addMultipleClasses(element, className) {
|
|
683
|
+
if (element && className) {
|
|
684
|
+
if (element.classList) {
|
|
685
|
+
var styles = className.split(' ');
|
|
686
|
+
|
|
687
|
+
for (var i = 0; i < styles.length; i++) {
|
|
688
|
+
element.classList.add(styles[i]);
|
|
689
|
+
}
|
|
690
|
+
} else {
|
|
691
|
+
var _styles = className.split(' ');
|
|
692
|
+
|
|
693
|
+
for (var _i = 0; _i < _styles.length; _i++) {
|
|
694
|
+
element.className += ' ' + _styles[_i];
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
}, {
|
|
700
|
+
key: "removeMultipleClasses",
|
|
701
|
+
value: function removeMultipleClasses(element, className) {
|
|
702
|
+
if (element && className) {
|
|
703
|
+
if (element.classList) {
|
|
704
|
+
var styles = className.split(' ');
|
|
705
|
+
|
|
706
|
+
for (var i = 0; i < styles.length; i++) {
|
|
707
|
+
element.classList.remove(styles[i]);
|
|
708
|
+
}
|
|
709
|
+
} else {
|
|
710
|
+
var _styles2 = className.split(' ');
|
|
711
|
+
|
|
712
|
+
for (var _i2 = 0; _i2 < _styles2.length; _i2++) {
|
|
713
|
+
element.className = element.className.replace(new RegExp('(^|\\b)' + _styles2[_i2].split(' ').join('|') + '(\\b|$)', 'gi'), ' ');
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
}, {
|
|
719
|
+
key: "addClass",
|
|
720
|
+
value: function addClass(element, className) {
|
|
721
|
+
if (element && className) {
|
|
722
|
+
if (element.classList) element.classList.add(className);else element.className += ' ' + className;
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
}, {
|
|
726
|
+
key: "removeClass",
|
|
727
|
+
value: function removeClass(element, className) {
|
|
728
|
+
if (element && className) {
|
|
729
|
+
if (element.classList) element.classList.remove(className);else element.className = element.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' ');
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
}, {
|
|
733
|
+
key: "hasClass",
|
|
734
|
+
value: function hasClass(element, className) {
|
|
735
|
+
if (element) {
|
|
736
|
+
if (element.classList) return element.classList.contains(className);else return new RegExp('(^| )' + className + '( |$)', 'gi').test(element.className);
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
}, {
|
|
740
|
+
key: "find",
|
|
741
|
+
value: function find(element, selector) {
|
|
742
|
+
return element ? Array.from(element.querySelectorAll(selector)) : [];
|
|
743
|
+
}
|
|
744
|
+
}, {
|
|
745
|
+
key: "findSingle",
|
|
746
|
+
value: function findSingle(element, selector) {
|
|
747
|
+
if (element) {
|
|
748
|
+
return element.querySelector(selector);
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
return null;
|
|
752
|
+
}
|
|
753
|
+
}, {
|
|
754
|
+
key: "getHeight",
|
|
755
|
+
value: function getHeight(el) {
|
|
756
|
+
if (el) {
|
|
757
|
+
var height = el.offsetHeight;
|
|
758
|
+
var style = getComputedStyle(el);
|
|
759
|
+
height -= parseFloat(style.paddingTop) + parseFloat(style.paddingBottom) + parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);
|
|
760
|
+
return height;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
return 0;
|
|
764
|
+
}
|
|
765
|
+
}, {
|
|
766
|
+
key: "getWidth",
|
|
767
|
+
value: function getWidth(el) {
|
|
768
|
+
if (el) {
|
|
769
|
+
var width = el.offsetWidth;
|
|
770
|
+
var style = getComputedStyle(el);
|
|
771
|
+
width -= parseFloat(style.paddingLeft) + parseFloat(style.paddingRight) + parseFloat(style.borderLeftWidth) + parseFloat(style.borderRightWidth);
|
|
772
|
+
return width;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
return 0;
|
|
776
|
+
}
|
|
777
|
+
}, {
|
|
778
|
+
key: "alignOverlay",
|
|
779
|
+
value: function alignOverlay(overlay, target, appendTo) {
|
|
780
|
+
var calculateMinWidth = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
781
|
+
|
|
782
|
+
if (overlay && target) {
|
|
783
|
+
if (appendTo === 'self') {
|
|
784
|
+
this.relativePosition(overlay, target);
|
|
785
|
+
} else {
|
|
786
|
+
calculateMinWidth && (overlay.style.minWidth = DomHandler.getOuterWidth(target) + 'px');
|
|
787
|
+
this.absolutePosition(overlay, target);
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
}, {
|
|
792
|
+
key: "absolutePosition",
|
|
793
|
+
value: function absolutePosition(element, target) {
|
|
794
|
+
if (element) {
|
|
795
|
+
var elementDimensions = element.offsetParent ? {
|
|
796
|
+
width: element.offsetWidth,
|
|
797
|
+
height: element.offsetHeight
|
|
798
|
+
} : this.getHiddenElementDimensions(element);
|
|
799
|
+
var elementOuterHeight = elementDimensions.height;
|
|
800
|
+
var elementOuterWidth = elementDimensions.width;
|
|
801
|
+
var targetOuterHeight = target.offsetHeight;
|
|
802
|
+
var targetOuterWidth = target.offsetWidth;
|
|
803
|
+
var targetOffset = target.getBoundingClientRect();
|
|
804
|
+
var windowScrollTop = this.getWindowScrollTop();
|
|
805
|
+
var windowScrollLeft = this.getWindowScrollLeft();
|
|
806
|
+
var viewport = this.getViewport();
|
|
807
|
+
var top, left;
|
|
808
|
+
|
|
809
|
+
if (targetOffset.top + targetOuterHeight + elementOuterHeight > viewport.height) {
|
|
810
|
+
top = targetOffset.top + windowScrollTop - elementOuterHeight;
|
|
811
|
+
|
|
812
|
+
if (top < 0) {
|
|
813
|
+
top = windowScrollTop;
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
element.style.transformOrigin = 'bottom';
|
|
817
|
+
} else {
|
|
818
|
+
top = targetOuterHeight + targetOffset.top + windowScrollTop;
|
|
819
|
+
element.style.transformOrigin = 'top';
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
if (targetOffset.left + targetOuterWidth + elementOuterWidth > viewport.width) left = Math.max(0, targetOffset.left + windowScrollLeft + targetOuterWidth - elementOuterWidth);else left = targetOffset.left + windowScrollLeft;
|
|
823
|
+
element.style.top = top + 'px';
|
|
824
|
+
element.style.left = left + 'px';
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
}, {
|
|
828
|
+
key: "relativePosition",
|
|
829
|
+
value: function relativePosition(element, target) {
|
|
830
|
+
if (element) {
|
|
831
|
+
var elementDimensions = element.offsetParent ? {
|
|
832
|
+
width: element.offsetWidth,
|
|
833
|
+
height: element.offsetHeight
|
|
834
|
+
} : this.getHiddenElementDimensions(element);
|
|
835
|
+
var targetHeight = target.offsetHeight;
|
|
836
|
+
var targetOffset = target.getBoundingClientRect();
|
|
837
|
+
var viewport = this.getViewport();
|
|
838
|
+
var top, left;
|
|
839
|
+
|
|
840
|
+
if (targetOffset.top + targetHeight + elementDimensions.height > viewport.height) {
|
|
841
|
+
top = -1 * elementDimensions.height;
|
|
842
|
+
|
|
843
|
+
if (targetOffset.top + top < 0) {
|
|
844
|
+
top = -1 * targetOffset.top;
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
element.style.transformOrigin = 'bottom';
|
|
848
|
+
} else {
|
|
849
|
+
top = targetHeight;
|
|
850
|
+
element.style.transformOrigin = 'top';
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
if (elementDimensions.width > viewport.width) {
|
|
854
|
+
// element wider then viewport and cannot fit on screen (align at left side of viewport)
|
|
855
|
+
left = targetOffset.left * -1;
|
|
856
|
+
} else if (targetOffset.left + elementDimensions.width > viewport.width) {
|
|
857
|
+
// element wider then viewport but can be fit on screen (align at right side of viewport)
|
|
858
|
+
left = (targetOffset.left + elementDimensions.width - viewport.width) * -1;
|
|
859
|
+
} else {
|
|
860
|
+
// element fits on screen (align with target)
|
|
861
|
+
left = 0;
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
element.style.top = top + 'px';
|
|
865
|
+
element.style.left = left + 'px';
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
}, {
|
|
869
|
+
key: "flipfitCollision",
|
|
870
|
+
value: function flipfitCollision(element, target) {
|
|
871
|
+
var _this = this;
|
|
872
|
+
|
|
873
|
+
var my = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'left top';
|
|
874
|
+
var at = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'left bottom';
|
|
875
|
+
var callback = arguments.length > 4 ? arguments[4] : undefined;
|
|
876
|
+
var targetOffset = target.getBoundingClientRect();
|
|
877
|
+
var viewport = this.getViewport();
|
|
878
|
+
var myArr = my.split(' ');
|
|
879
|
+
var atArr = at.split(' ');
|
|
880
|
+
|
|
881
|
+
var getPositionValue = function getPositionValue(arr, isOffset) {
|
|
882
|
+
return isOffset ? +arr.substring(arr.search(/(\+|-)/g)) || 0 : arr.substring(0, arr.search(/(\+|-)/g)) || arr;
|
|
883
|
+
};
|
|
884
|
+
|
|
885
|
+
var position = {
|
|
886
|
+
my: {
|
|
887
|
+
x: getPositionValue(myArr[0]),
|
|
888
|
+
y: getPositionValue(myArr[1] || myArr[0]),
|
|
889
|
+
offsetX: getPositionValue(myArr[0], true),
|
|
890
|
+
offsetY: getPositionValue(myArr[1] || myArr[0], true)
|
|
891
|
+
},
|
|
892
|
+
at: {
|
|
893
|
+
x: getPositionValue(atArr[0]),
|
|
894
|
+
y: getPositionValue(atArr[1] || atArr[0]),
|
|
895
|
+
offsetX: getPositionValue(atArr[0], true),
|
|
896
|
+
offsetY: getPositionValue(atArr[1] || atArr[0], true)
|
|
897
|
+
}
|
|
898
|
+
};
|
|
899
|
+
var myOffset = {
|
|
900
|
+
left: function left() {
|
|
901
|
+
var totalOffset = position.my.offsetX + position.at.offsetX;
|
|
902
|
+
return totalOffset + targetOffset.left + (position.my.x === 'left' ? 0 : -1 * (position.my.x === 'center' ? _this.getOuterWidth(element) / 2 : _this.getOuterWidth(element)));
|
|
903
|
+
},
|
|
904
|
+
top: function top() {
|
|
905
|
+
var totalOffset = position.my.offsetY + position.at.offsetY;
|
|
906
|
+
return totalOffset + targetOffset.top + (position.my.y === 'top' ? 0 : -1 * (position.my.y === 'center' ? _this.getOuterHeight(element) / 2 : _this.getOuterHeight(element)));
|
|
907
|
+
}
|
|
908
|
+
};
|
|
909
|
+
var alignWithAt = {
|
|
910
|
+
count: {
|
|
911
|
+
x: 0,
|
|
912
|
+
y: 0
|
|
913
|
+
},
|
|
914
|
+
left: function left() {
|
|
915
|
+
var left = myOffset.left();
|
|
916
|
+
var scrollLeft = DomHandler.getWindowScrollLeft();
|
|
917
|
+
element.style.left = left + scrollLeft + 'px';
|
|
918
|
+
|
|
919
|
+
if (this.count.x === 2) {
|
|
920
|
+
element.style.left = scrollLeft + 'px';
|
|
921
|
+
this.count.x = 0;
|
|
922
|
+
} else if (left < 0) {
|
|
923
|
+
this.count.x++;
|
|
924
|
+
position.my.x = 'left';
|
|
925
|
+
position.at.x = 'right';
|
|
926
|
+
position.my.offsetX *= -1;
|
|
927
|
+
position.at.offsetX *= -1;
|
|
928
|
+
this.right();
|
|
929
|
+
}
|
|
930
|
+
},
|
|
931
|
+
right: function right() {
|
|
932
|
+
var left = myOffset.left() + DomHandler.getOuterWidth(target);
|
|
933
|
+
var scrollLeft = DomHandler.getWindowScrollLeft();
|
|
934
|
+
element.style.left = left + scrollLeft + 'px';
|
|
935
|
+
|
|
936
|
+
if (this.count.x === 2) {
|
|
937
|
+
element.style.left = viewport.width - DomHandler.getOuterWidth(element) + scrollLeft + 'px';
|
|
938
|
+
this.count.x = 0;
|
|
939
|
+
} else if (left + DomHandler.getOuterWidth(element) > viewport.width) {
|
|
940
|
+
this.count.x++;
|
|
941
|
+
position.my.x = 'right';
|
|
942
|
+
position.at.x = 'left';
|
|
943
|
+
position.my.offsetX *= -1;
|
|
944
|
+
position.at.offsetX *= -1;
|
|
945
|
+
this.left();
|
|
946
|
+
}
|
|
947
|
+
},
|
|
948
|
+
top: function top() {
|
|
949
|
+
var top = myOffset.top();
|
|
950
|
+
var scrollTop = DomHandler.getWindowScrollTop();
|
|
951
|
+
element.style.top = top + scrollTop + 'px';
|
|
952
|
+
|
|
953
|
+
if (this.count.y === 2) {
|
|
954
|
+
element.style.left = scrollTop + 'px';
|
|
955
|
+
this.count.y = 0;
|
|
956
|
+
} else if (top < 0) {
|
|
957
|
+
this.count.y++;
|
|
958
|
+
position.my.y = 'top';
|
|
959
|
+
position.at.y = 'bottom';
|
|
960
|
+
position.my.offsetY *= -1;
|
|
961
|
+
position.at.offsetY *= -1;
|
|
962
|
+
this.bottom();
|
|
963
|
+
}
|
|
964
|
+
},
|
|
965
|
+
bottom: function bottom() {
|
|
966
|
+
var top = myOffset.top() + DomHandler.getOuterHeight(target);
|
|
967
|
+
var scrollTop = DomHandler.getWindowScrollTop();
|
|
968
|
+
element.style.top = top + scrollTop + 'px';
|
|
969
|
+
|
|
970
|
+
if (this.count.y === 2) {
|
|
971
|
+
element.style.left = viewport.height - DomHandler.getOuterHeight(element) + scrollTop + 'px';
|
|
972
|
+
this.count.y = 0;
|
|
973
|
+
} else if (top + DomHandler.getOuterHeight(target) > viewport.height) {
|
|
974
|
+
this.count.y++;
|
|
975
|
+
position.my.y = 'bottom';
|
|
976
|
+
position.at.y = 'top';
|
|
977
|
+
position.my.offsetY *= -1;
|
|
978
|
+
position.at.offsetY *= -1;
|
|
979
|
+
this.top();
|
|
980
|
+
}
|
|
981
|
+
},
|
|
982
|
+
center: function center(axis) {
|
|
983
|
+
if (axis === 'y') {
|
|
984
|
+
var top = myOffset.top() + DomHandler.getOuterHeight(target) / 2;
|
|
985
|
+
element.style.top = top + DomHandler.getWindowScrollTop() + 'px';
|
|
986
|
+
|
|
987
|
+
if (top < 0) {
|
|
988
|
+
this.bottom();
|
|
989
|
+
} else if (top + DomHandler.getOuterHeight(target) > viewport.height) {
|
|
990
|
+
this.top();
|
|
991
|
+
}
|
|
992
|
+
} else {
|
|
993
|
+
var left = myOffset.left() + DomHandler.getOuterWidth(target) / 2;
|
|
994
|
+
element.style.left = left + DomHandler.getWindowScrollLeft() + 'px';
|
|
995
|
+
|
|
996
|
+
if (left < 0) {
|
|
997
|
+
this.left();
|
|
998
|
+
} else if (left + DomHandler.getOuterWidth(element) > viewport.width) {
|
|
999
|
+
this.right();
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
};
|
|
1004
|
+
alignWithAt[position.at.x]('x');
|
|
1005
|
+
alignWithAt[position.at.y]('y');
|
|
1006
|
+
|
|
1007
|
+
if (this.isFunction(callback)) {
|
|
1008
|
+
callback(position);
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
}, {
|
|
1012
|
+
key: "findCollisionPosition",
|
|
1013
|
+
value: function findCollisionPosition(position) {
|
|
1014
|
+
if (position) {
|
|
1015
|
+
var isAxisY = position === 'top' || position === 'bottom';
|
|
1016
|
+
var myXPosition = position === 'left' ? 'right' : 'left';
|
|
1017
|
+
var myYPosition = position === 'top' ? 'bottom' : 'top';
|
|
1018
|
+
|
|
1019
|
+
if (isAxisY) {
|
|
1020
|
+
return {
|
|
1021
|
+
axis: 'y',
|
|
1022
|
+
my: "center ".concat(myYPosition),
|
|
1023
|
+
at: "center ".concat(position)
|
|
1024
|
+
};
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
return {
|
|
1028
|
+
axis: 'x',
|
|
1029
|
+
my: "".concat(myXPosition, " center"),
|
|
1030
|
+
at: "".concat(position, " center")
|
|
1031
|
+
};
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
}, {
|
|
1035
|
+
key: "getParents",
|
|
1036
|
+
value: function getParents(element) {
|
|
1037
|
+
var parents = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
1038
|
+
return element['parentNode'] === null ? parents : this.getParents(element.parentNode, parents.concat([element.parentNode]));
|
|
1039
|
+
}
|
|
1040
|
+
}, {
|
|
1041
|
+
key: "getScrollableParents",
|
|
1042
|
+
value: function getScrollableParents(element) {
|
|
1043
|
+
var scrollableParents = [];
|
|
1044
|
+
|
|
1045
|
+
if (element) {
|
|
1046
|
+
var parents = this.getParents(element);
|
|
1047
|
+
var overflowRegex = /(auto|scroll)/;
|
|
1048
|
+
|
|
1049
|
+
var overflowCheck = function overflowCheck(node) {
|
|
1050
|
+
var styleDeclaration = node ? getComputedStyle(node) : null;
|
|
1051
|
+
return styleDeclaration && (overflowRegex.test(styleDeclaration.getPropertyValue('overflow')) || overflowRegex.test(styleDeclaration.getPropertyValue('overflowX')) || overflowRegex.test(styleDeclaration.getPropertyValue('overflowY')));
|
|
1052
|
+
};
|
|
1053
|
+
|
|
1054
|
+
var _iterator = _createForOfIteratorHelper$3(parents),
|
|
1055
|
+
_step;
|
|
1056
|
+
|
|
1057
|
+
try {
|
|
1058
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
1059
|
+
var parent = _step.value;
|
|
1060
|
+
var scrollSelectors = parent.nodeType === 1 && parent.dataset['scrollselectors'];
|
|
1061
|
+
|
|
1062
|
+
if (scrollSelectors) {
|
|
1063
|
+
var selectors = scrollSelectors.split(',');
|
|
1064
|
+
|
|
1065
|
+
var _iterator2 = _createForOfIteratorHelper$3(selectors),
|
|
1066
|
+
_step2;
|
|
1067
|
+
|
|
1068
|
+
try {
|
|
1069
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
1070
|
+
var selector = _step2.value;
|
|
1071
|
+
var el = this.findSingle(parent, selector);
|
|
1072
|
+
|
|
1073
|
+
if (el && overflowCheck(el)) {
|
|
1074
|
+
scrollableParents.push(el);
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
} catch (err) {
|
|
1078
|
+
_iterator2.e(err);
|
|
1079
|
+
} finally {
|
|
1080
|
+
_iterator2.f();
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
if (parent.nodeType !== 9 && overflowCheck(parent)) {
|
|
1085
|
+
scrollableParents.push(parent);
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
} catch (err) {
|
|
1089
|
+
_iterator.e(err);
|
|
1090
|
+
} finally {
|
|
1091
|
+
_iterator.f();
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
return scrollableParents;
|
|
1096
|
+
}
|
|
1097
|
+
}, {
|
|
1098
|
+
key: "getHiddenElementOuterHeight",
|
|
1099
|
+
value: function getHiddenElementOuterHeight(element) {
|
|
1100
|
+
if (element) {
|
|
1101
|
+
element.style.visibility = 'hidden';
|
|
1102
|
+
element.style.display = 'block';
|
|
1103
|
+
var elementHeight = element.offsetHeight;
|
|
1104
|
+
element.style.display = 'none';
|
|
1105
|
+
element.style.visibility = 'visible';
|
|
1106
|
+
return elementHeight;
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
return 0;
|
|
1110
|
+
}
|
|
1111
|
+
}, {
|
|
1112
|
+
key: "getHiddenElementOuterWidth",
|
|
1113
|
+
value: function getHiddenElementOuterWidth(element) {
|
|
1114
|
+
if (element) {
|
|
1115
|
+
element.style.visibility = 'hidden';
|
|
1116
|
+
element.style.display = 'block';
|
|
1117
|
+
var elementWidth = element.offsetWidth;
|
|
1118
|
+
element.style.display = 'none';
|
|
1119
|
+
element.style.visibility = 'visible';
|
|
1120
|
+
return elementWidth;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
return 0;
|
|
1124
|
+
}
|
|
1125
|
+
}, {
|
|
1126
|
+
key: "getHiddenElementDimensions",
|
|
1127
|
+
value: function getHiddenElementDimensions(element) {
|
|
1128
|
+
var dimensions = {};
|
|
1129
|
+
|
|
1130
|
+
if (element) {
|
|
1131
|
+
element.style.visibility = 'hidden';
|
|
1132
|
+
element.style.display = 'block';
|
|
1133
|
+
dimensions.width = element.offsetWidth;
|
|
1134
|
+
dimensions.height = element.offsetHeight;
|
|
1135
|
+
element.style.display = 'none';
|
|
1136
|
+
element.style.visibility = 'visible';
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
return dimensions;
|
|
1140
|
+
}
|
|
1141
|
+
}, {
|
|
1142
|
+
key: "fadeIn",
|
|
1143
|
+
value: function fadeIn(element, duration) {
|
|
1144
|
+
if (element) {
|
|
1145
|
+
element.style.opacity = 0;
|
|
1146
|
+
var last = +new Date();
|
|
1147
|
+
var opacity = 0;
|
|
1148
|
+
|
|
1149
|
+
var tick = function tick() {
|
|
1150
|
+
opacity = +element.style.opacity + (new Date().getTime() - last) / duration;
|
|
1151
|
+
element.style.opacity = opacity;
|
|
1152
|
+
last = +new Date();
|
|
1153
|
+
|
|
1154
|
+
if (+opacity < 1) {
|
|
1155
|
+
window.requestAnimationFrame && requestAnimationFrame(tick) || setTimeout(tick, 16);
|
|
1156
|
+
}
|
|
1157
|
+
};
|
|
1158
|
+
|
|
1159
|
+
tick();
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
}, {
|
|
1163
|
+
key: "fadeOut",
|
|
1164
|
+
value: function fadeOut(element, duration) {
|
|
1165
|
+
if (element) {
|
|
1166
|
+
var opacity = 1,
|
|
1167
|
+
interval = 50,
|
|
1168
|
+
gap = interval / duration;
|
|
1169
|
+
var fading = setInterval(function () {
|
|
1170
|
+
opacity -= gap;
|
|
1171
|
+
|
|
1172
|
+
if (opacity <= 0) {
|
|
1173
|
+
opacity = 0;
|
|
1174
|
+
clearInterval(fading);
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
element.style.opacity = opacity;
|
|
1178
|
+
}, interval);
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
}, {
|
|
1182
|
+
key: "getUserAgent",
|
|
1183
|
+
value: function getUserAgent() {
|
|
1184
|
+
return navigator.userAgent;
|
|
1185
|
+
}
|
|
1186
|
+
}, {
|
|
1187
|
+
key: "isIOS",
|
|
1188
|
+
value: function isIOS() {
|
|
1189
|
+
return /iPad|iPhone|iPod/.test(navigator.userAgent) && !window['MSStream'];
|
|
1190
|
+
}
|
|
1191
|
+
}, {
|
|
1192
|
+
key: "isAndroid",
|
|
1193
|
+
value: function isAndroid() {
|
|
1194
|
+
return /(android)/i.test(navigator.userAgent);
|
|
1195
|
+
}
|
|
1196
|
+
}, {
|
|
1197
|
+
key: "isTouchDevice",
|
|
1198
|
+
value: function isTouchDevice() {
|
|
1199
|
+
return 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
|
|
1200
|
+
}
|
|
1201
|
+
}, {
|
|
1202
|
+
key: "isFunction",
|
|
1203
|
+
value: function isFunction(obj) {
|
|
1204
|
+
return !!(obj && obj.constructor && obj.call && obj.apply);
|
|
1205
|
+
}
|
|
1206
|
+
}, {
|
|
1207
|
+
key: "appendChild",
|
|
1208
|
+
value: function appendChild(element, target) {
|
|
1209
|
+
if (this.isElement(target)) target.appendChild(element);else if (target.el && target.el.nativeElement) target.el.nativeElement.appendChild(element);else throw new Error('Cannot append ' + target + ' to ' + element);
|
|
1210
|
+
}
|
|
1211
|
+
}, {
|
|
1212
|
+
key: "removeChild",
|
|
1213
|
+
value: function removeChild(element, target) {
|
|
1214
|
+
if (this.isElement(target)) target.removeChild(element);else if (target.el && target.el.nativeElement) target.el.nativeElement.removeChild(element);else throw new Error('Cannot remove ' + element + ' from ' + target);
|
|
1215
|
+
}
|
|
1216
|
+
}, {
|
|
1217
|
+
key: "isElement",
|
|
1218
|
+
value: function isElement(obj) {
|
|
1219
|
+
return (typeof HTMLElement === "undefined" ? "undefined" : _typeof(HTMLElement)) === "object" ? obj instanceof HTMLElement : obj && _typeof(obj) === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string";
|
|
1220
|
+
}
|
|
1221
|
+
}, {
|
|
1222
|
+
key: "scrollInView",
|
|
1223
|
+
value: function scrollInView(container, item) {
|
|
1224
|
+
var borderTopValue = getComputedStyle(container).getPropertyValue('borderTopWidth');
|
|
1225
|
+
var borderTop = borderTopValue ? parseFloat(borderTopValue) : 0;
|
|
1226
|
+
var paddingTopValue = getComputedStyle(container).getPropertyValue('paddingTop');
|
|
1227
|
+
var paddingTop = paddingTopValue ? parseFloat(paddingTopValue) : 0;
|
|
1228
|
+
var containerRect = container.getBoundingClientRect();
|
|
1229
|
+
var itemRect = item.getBoundingClientRect();
|
|
1230
|
+
var offset = itemRect.top + document.body.scrollTop - (containerRect.top + document.body.scrollTop) - borderTop - paddingTop;
|
|
1231
|
+
var scroll = container.scrollTop;
|
|
1232
|
+
var elementHeight = container.clientHeight;
|
|
1233
|
+
var itemHeight = this.getOuterHeight(item);
|
|
1234
|
+
|
|
1235
|
+
if (offset < 0) {
|
|
1236
|
+
container.scrollTop = scroll + offset;
|
|
1237
|
+
} else if (offset + itemHeight > elementHeight) {
|
|
1238
|
+
container.scrollTop = scroll + offset - elementHeight + itemHeight;
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
}, {
|
|
1242
|
+
key: "clearSelection",
|
|
1243
|
+
value: function clearSelection() {
|
|
1244
|
+
if (window.getSelection) {
|
|
1245
|
+
if (window.getSelection().empty) {
|
|
1246
|
+
window.getSelection().empty();
|
|
1247
|
+
} else if (window.getSelection().removeAllRanges && window.getSelection().rangeCount > 0 && window.getSelection().getRangeAt(0).getClientRects().length > 0) {
|
|
1248
|
+
window.getSelection().removeAllRanges();
|
|
1249
|
+
}
|
|
1250
|
+
} else if (document['selection'] && document['selection'].empty) {
|
|
1251
|
+
try {
|
|
1252
|
+
document['selection'].empty();
|
|
1253
|
+
} catch (error) {//ignore IE bug
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
}, {
|
|
1258
|
+
key: "calculateScrollbarWidth",
|
|
1259
|
+
value: function calculateScrollbarWidth(el) {
|
|
1260
|
+
if (el) {
|
|
1261
|
+
var style = getComputedStyle(el);
|
|
1262
|
+
return el.offsetWidth - el.clientWidth - parseFloat(style.borderLeftWidth) - parseFloat(style.borderRightWidth);
|
|
1263
|
+
} else {
|
|
1264
|
+
if (this.calculatedScrollbarWidth != null) return this.calculatedScrollbarWidth;
|
|
1265
|
+
var scrollDiv = document.createElement("div");
|
|
1266
|
+
scrollDiv.className = "p-scrollbar-measure";
|
|
1267
|
+
document.body.appendChild(scrollDiv);
|
|
1268
|
+
var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
|
|
1269
|
+
document.body.removeChild(scrollDiv);
|
|
1270
|
+
this.calculatedScrollbarWidth = scrollbarWidth;
|
|
1271
|
+
return scrollbarWidth;
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
}, {
|
|
1275
|
+
key: "getBrowser",
|
|
1276
|
+
value: function getBrowser() {
|
|
1277
|
+
if (!this.browser) {
|
|
1278
|
+
var matched = this.resolveUserAgent();
|
|
1279
|
+
this.browser = {};
|
|
1280
|
+
|
|
1281
|
+
if (matched.browser) {
|
|
1282
|
+
this.browser[matched.browser] = true;
|
|
1283
|
+
this.browser['version'] = matched.version;
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
if (this.browser['chrome']) {
|
|
1287
|
+
this.browser['webkit'] = true;
|
|
1288
|
+
} else if (this.browser['webkit']) {
|
|
1289
|
+
this.browser['safari'] = true;
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
return this.browser;
|
|
1294
|
+
}
|
|
1295
|
+
}, {
|
|
1296
|
+
key: "resolveUserAgent",
|
|
1297
|
+
value: function resolveUserAgent() {
|
|
1298
|
+
var ua = navigator.userAgent.toLowerCase();
|
|
1299
|
+
var match = /(chrome)[ ]([\w.]+)/.exec(ua) || /(webkit)[ ]([\w.]+)/.exec(ua) || /(opera)(?:.*version|)[ ]([\w.]+)/.exec(ua) || /(msie) ([\w.]+)/.exec(ua) || ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || [];
|
|
1300
|
+
return {
|
|
1301
|
+
browser: match[1] || "",
|
|
1302
|
+
version: match[2] || "0"
|
|
1303
|
+
};
|
|
1304
|
+
}
|
|
1305
|
+
}, {
|
|
1306
|
+
key: "isVisible",
|
|
1307
|
+
value: function isVisible(element) {
|
|
1308
|
+
return element && element.offsetParent != null;
|
|
1309
|
+
}
|
|
1310
|
+
}, {
|
|
1311
|
+
key: "isExist",
|
|
1312
|
+
value: function isExist(element) {
|
|
1313
|
+
return element !== null && typeof element !== 'undefined' && element.nodeName && element.parentNode;
|
|
1314
|
+
}
|
|
1315
|
+
}, {
|
|
1316
|
+
key: "hasDOM",
|
|
1317
|
+
value: function hasDOM() {
|
|
1318
|
+
return !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
1319
|
+
}
|
|
1320
|
+
}, {
|
|
1321
|
+
key: "getFocusableElements",
|
|
1322
|
+
value: function getFocusableElements(element) {
|
|
1323
|
+
var selector = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
1324
|
+
var focusableElements = DomHandler.find(element, "button:not([tabindex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden])".concat(selector, ",\n [href][clientHeight][clientWidth]:not([tabindex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden])").concat(selector, ",\n input:not([tabindex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden])").concat(selector, ",\n select:not([tabindex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden])").concat(selector, ",\n textarea:not([tabindex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden])").concat(selector, ",\n [tabIndex]:not([tabIndex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden])").concat(selector, ",\n [contenteditable]:not([tabIndex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden])").concat(selector));
|
|
1325
|
+
var visibleFocusableElements = [];
|
|
1326
|
+
|
|
1327
|
+
var _iterator3 = _createForOfIteratorHelper$3(focusableElements),
|
|
1328
|
+
_step3;
|
|
1329
|
+
|
|
1330
|
+
try {
|
|
1331
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
1332
|
+
var focusableElement = _step3.value;
|
|
1333
|
+
if (getComputedStyle(focusableElement).display !== "none" && getComputedStyle(focusableElement).visibility !== "hidden") visibleFocusableElements.push(focusableElement);
|
|
1334
|
+
}
|
|
1335
|
+
} catch (err) {
|
|
1336
|
+
_iterator3.e(err);
|
|
1337
|
+
} finally {
|
|
1338
|
+
_iterator3.f();
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
return visibleFocusableElements;
|
|
1342
|
+
}
|
|
1343
|
+
}, {
|
|
1344
|
+
key: "getFirstFocusableElement",
|
|
1345
|
+
value: function getFirstFocusableElement(element, selector) {
|
|
1346
|
+
var focusableElements = DomHandler.getFocusableElements(element, selector);
|
|
1347
|
+
return focusableElements.length > 0 ? focusableElements[0] : null;
|
|
1348
|
+
}
|
|
1349
|
+
}, {
|
|
1350
|
+
key: "getLastFocusableElement",
|
|
1351
|
+
value: function getLastFocusableElement(element, selector) {
|
|
1352
|
+
var focusableElements = DomHandler.getFocusableElements(element, selector);
|
|
1353
|
+
return focusableElements.length > 0 ? focusableElements[focusableElements.length - 1] : null;
|
|
1354
|
+
}
|
|
1355
|
+
}, {
|
|
1356
|
+
key: "getCursorOffset",
|
|
1357
|
+
value: function getCursorOffset(el, prevText, nextText, currentText) {
|
|
1358
|
+
if (el) {
|
|
1359
|
+
var style = getComputedStyle(el);
|
|
1360
|
+
var ghostDiv = document.createElement('div');
|
|
1361
|
+
ghostDiv.style.position = 'absolute';
|
|
1362
|
+
ghostDiv.style.top = '0px';
|
|
1363
|
+
ghostDiv.style.left = '0px';
|
|
1364
|
+
ghostDiv.style.visibility = 'hidden';
|
|
1365
|
+
ghostDiv.style.pointerEvents = 'none';
|
|
1366
|
+
ghostDiv.style.overflow = style.overflow;
|
|
1367
|
+
ghostDiv.style.width = style.width;
|
|
1368
|
+
ghostDiv.style.height = style.height;
|
|
1369
|
+
ghostDiv.style.padding = style.padding;
|
|
1370
|
+
ghostDiv.style.border = style.border;
|
|
1371
|
+
ghostDiv.style.overflowWrap = style.overflowWrap;
|
|
1372
|
+
ghostDiv.style.whiteSpace = style.whiteSpace;
|
|
1373
|
+
ghostDiv.style.lineHeight = style.lineHeight;
|
|
1374
|
+
ghostDiv.innerHTML = prevText.replace(/\r\n|\r|\n/g, '<br />');
|
|
1375
|
+
var ghostSpan = document.createElement('span');
|
|
1376
|
+
ghostSpan.textContent = currentText;
|
|
1377
|
+
ghostDiv.appendChild(ghostSpan);
|
|
1378
|
+
var text = document.createTextNode(nextText);
|
|
1379
|
+
ghostDiv.appendChild(text);
|
|
1380
|
+
document.body.appendChild(ghostDiv);
|
|
1381
|
+
var offsetLeft = ghostSpan.offsetLeft,
|
|
1382
|
+
offsetTop = ghostSpan.offsetTop,
|
|
1383
|
+
clientHeight = ghostSpan.clientHeight;
|
|
1384
|
+
document.body.removeChild(ghostDiv);
|
|
1385
|
+
return {
|
|
1386
|
+
left: Math.abs(offsetLeft - el.scrollLeft),
|
|
1387
|
+
top: Math.abs(offsetTop - el.scrollTop) + clientHeight
|
|
1388
|
+
};
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
return {
|
|
1392
|
+
top: 'auto',
|
|
1393
|
+
left: 'auto'
|
|
1394
|
+
};
|
|
1395
|
+
}
|
|
1396
|
+
}, {
|
|
1397
|
+
key: "invokeElementMethod",
|
|
1398
|
+
value: function invokeElementMethod(element, methodName, args) {
|
|
1399
|
+
element[methodName].apply(element, args);
|
|
1400
|
+
}
|
|
1401
|
+
}, {
|
|
1402
|
+
key: "isClickable",
|
|
1403
|
+
value: function isClickable(element) {
|
|
1404
|
+
var targetNode = element.nodeName;
|
|
1405
|
+
var parentNode = element.parentElement && element.parentElement.nodeName;
|
|
1406
|
+
return targetNode === 'INPUT' || targetNode === 'TEXTAREA' || targetNode === 'BUTTON' || targetNode === 'A' || parentNode === 'INPUT' || parentNode === 'TEXTAREA' || parentNode === 'BUTTON' || parentNode === 'A' || this.hasClass(element, 'p-button') || this.hasClass(element.parentElement, 'p-button') || this.hasClass(element.parentElement, 'p-checkbox') || this.hasClass(element.parentElement, 'p-radiobutton');
|
|
470
1407
|
}
|
|
471
1408
|
}, {
|
|
472
|
-
key: "
|
|
473
|
-
value: function
|
|
474
|
-
|
|
1409
|
+
key: "applyStyle",
|
|
1410
|
+
value: function applyStyle(element, style) {
|
|
1411
|
+
if (typeof style === 'string') {
|
|
1412
|
+
element.style.cssText = this.style;
|
|
1413
|
+
} else {
|
|
1414
|
+
for (var prop in this.style) {
|
|
1415
|
+
element.style[prop] = style[prop];
|
|
1416
|
+
}
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
}, {
|
|
1420
|
+
key: "exportCSV",
|
|
1421
|
+
value: function exportCSV(csv, filename) {
|
|
1422
|
+
var blob = new Blob([csv], {
|
|
1423
|
+
type: 'application/csv;charset=utf-8;'
|
|
1424
|
+
});
|
|
475
1425
|
|
|
476
|
-
if (
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
renderFilter: true
|
|
489
|
-
});
|
|
490
|
-
})));
|
|
1426
|
+
if (window.navigator.msSaveOrOpenBlob) {
|
|
1427
|
+
navigator.msSaveOrOpenBlob(blob, filename + '.csv');
|
|
1428
|
+
} else {
|
|
1429
|
+
var link = document.createElement("a");
|
|
1430
|
+
|
|
1431
|
+
if (link.download !== undefined) {
|
|
1432
|
+
link.setAttribute('href', URL.createObjectURL(blob));
|
|
1433
|
+
link.setAttribute('download', filename + '.csv');
|
|
1434
|
+
link.style.display = 'none';
|
|
1435
|
+
document.body.appendChild(link);
|
|
1436
|
+
link.click();
|
|
1437
|
+
document.body.removeChild(link);
|
|
491
1438
|
} else {
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
index: i,
|
|
495
|
-
filterOnly: false,
|
|
496
|
-
renderFilter: false
|
|
497
|
-
});
|
|
498
|
-
}));
|
|
1439
|
+
csv = 'data:text/csv;charset=utf-8,' + csv;
|
|
1440
|
+
window.open(encodeURI(csv));
|
|
499
1441
|
}
|
|
500
|
-
} else {
|
|
501
|
-
return null;
|
|
502
1442
|
}
|
|
503
1443
|
}
|
|
1444
|
+
/**
|
|
1445
|
+
* Anytime an inline style is created check environment variable 'process.env.REACT_APP_CSS_NONCE'
|
|
1446
|
+
* to set a CSP NONCE.
|
|
1447
|
+
*
|
|
1448
|
+
* @see https://github.com/primefaces/primereact/issues/2423
|
|
1449
|
+
* @return HtmlStyleElement
|
|
1450
|
+
*/
|
|
1451
|
+
|
|
504
1452
|
}, {
|
|
505
|
-
key: "
|
|
506
|
-
value: function
|
|
507
|
-
var
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
1453
|
+
key: "createInlineStyle",
|
|
1454
|
+
value: function createInlineStyle() {
|
|
1455
|
+
var styleElement = document.createElement('style');
|
|
1456
|
+
var nonce = process.env.REACT_APP_CSS_NONCE;
|
|
1457
|
+
|
|
1458
|
+
if (nonce) {
|
|
1459
|
+
styleElement.setAttribute('nonce', nonce);
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
document.head.appendChild(styleElement);
|
|
1463
|
+
return styleElement;
|
|
511
1464
|
}
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
1465
|
+
/**
|
|
1466
|
+
* Remove a style element from the head and attempt to prevent DOM Exception on fast refresh.
|
|
1467
|
+
*
|
|
1468
|
+
* @see https://github.com/primefaces/primereact/issues/2469
|
|
1469
|
+
* @param {HtmlStyleElement} styleElement the element to remove from head
|
|
1470
|
+
*/
|
|
1471
|
+
|
|
1472
|
+
}, {
|
|
1473
|
+
key: "removeInlineStyle",
|
|
1474
|
+
value: function removeInlineStyle(styleElement) {
|
|
1475
|
+
if (this.isExist(styleElement)) {
|
|
1476
|
+
try {
|
|
1477
|
+
document.head.removeChild(styleElement);
|
|
1478
|
+
} catch (error) {// style element may have already been removed in a fast refresh
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
styleElement = null;
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1484
|
+
return styleElement;
|
|
518
1485
|
}
|
|
519
1486
|
}]);
|
|
520
1487
|
|
|
521
|
-
return
|
|
522
|
-
}(
|
|
1488
|
+
return DomHandler;
|
|
1489
|
+
}();
|
|
523
1490
|
|
|
524
1491
|
function _extends() {
|
|
525
1492
|
_extends = Object.assign || function (target) {
|
|
@@ -582,7 +1549,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
582
1549
|
}
|
|
583
1550
|
};
|
|
584
1551
|
|
|
585
|
-
|
|
1552
|
+
overlayservice.OverlayService.on('overlay-click', _this2.overlayEventListener);
|
|
586
1553
|
});
|
|
587
1554
|
}
|
|
588
1555
|
}
|
|
@@ -636,7 +1603,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
636
1603
|
}, function () {
|
|
637
1604
|
_this4.unbindDocumentEditListener();
|
|
638
1605
|
|
|
639
|
-
|
|
1606
|
+
overlayservice.OverlayService.off('overlay-click', _this4.overlayEventListener);
|
|
640
1607
|
_this4.overlayEventListener = null;
|
|
641
1608
|
});
|
|
642
1609
|
}, 1);
|
|
@@ -671,7 +1638,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
671
1638
|
clearTimeout(this.tabindexTimeout);
|
|
672
1639
|
|
|
673
1640
|
if (this.state && this.state.editing) {
|
|
674
|
-
var focusable =
|
|
1641
|
+
var focusable = utils.DomHandler.findSingle(this.container, 'input');
|
|
675
1642
|
|
|
676
1643
|
if (focusable && document.activeElement !== focusable && !focusable.hasAttribute('data-isCellEditing')) {
|
|
677
1644
|
focusable.setAttribute('data-isCellEditing', true);
|
|
@@ -694,7 +1661,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
694
1661
|
this.unbindDocumentEditListener();
|
|
695
1662
|
|
|
696
1663
|
if (this.overlayEventListener) {
|
|
697
|
-
|
|
1664
|
+
overlayservice.OverlayService.off('overlay-click', this.overlayEventListener);
|
|
698
1665
|
this.overlayEventListener = null;
|
|
699
1666
|
}
|
|
700
1667
|
}
|
|
@@ -703,7 +1670,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
703
1670
|
value: function render() {
|
|
704
1671
|
var _this6 = this;
|
|
705
1672
|
|
|
706
|
-
var className =
|
|
1673
|
+
var className = utils.classNames(this.props.bodyClassName || this.props.className, {
|
|
707
1674
|
'p-editable-column': this.props.editor,
|
|
708
1675
|
'p-cell-editing': this.props.editor ? this.state.editing : false
|
|
709
1676
|
});
|
|
@@ -711,35 +1678,35 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
711
1678
|
var content;
|
|
712
1679
|
|
|
713
1680
|
if (this.state && this.state.editing) {
|
|
714
|
-
if (this.props.editor) content =
|
|
1681
|
+
if (this.props.editor) content = utils.ObjectUtils.getJSXElement(this.props.editor, {
|
|
715
1682
|
node: this.props.node,
|
|
716
1683
|
rowData: this.props.node.data,
|
|
717
|
-
value:
|
|
1684
|
+
value: utils.ObjectUtils.resolveFieldData(this.props.node.data, this.props.field),
|
|
718
1685
|
field: this.props.field,
|
|
719
1686
|
rowIndex: this.props.rowIndex,
|
|
720
1687
|
props: this.props
|
|
721
1688
|
});else throw new Error("Editor is not found on column.");
|
|
722
1689
|
} else {
|
|
723
|
-
if (this.props.body) content =
|
|
1690
|
+
if (this.props.body) content = utils.ObjectUtils.getJSXElement(this.props.body, this.props.node, {
|
|
724
1691
|
field: this.props.field,
|
|
725
1692
|
rowIndex: this.props.rowIndex,
|
|
726
1693
|
props: this.props
|
|
727
|
-
});else content =
|
|
1694
|
+
});else content = utils.ObjectUtils.resolveFieldData(this.props.node.data, this.props.field);
|
|
728
1695
|
}
|
|
729
1696
|
/* eslint-disable */
|
|
730
1697
|
|
|
731
1698
|
|
|
732
|
-
var editorKeyHelper = this.props.editor && /*#__PURE__*/React__default[
|
|
1699
|
+
var editorKeyHelper = this.props.editor && /*#__PURE__*/React__default["default"].createElement("a", {
|
|
733
1700
|
tabIndex: 0,
|
|
734
1701
|
ref: function ref(el) {
|
|
735
1702
|
_this6.keyHelper = el;
|
|
736
1703
|
},
|
|
737
1704
|
className: "p-cell-editor-key-helper p-hidden-accessible",
|
|
738
1705
|
onFocus: this.onEditorFocus
|
|
739
|
-
}, /*#__PURE__*/React__default[
|
|
1706
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", null));
|
|
740
1707
|
/* eslint-enable */
|
|
741
1708
|
|
|
742
|
-
return /*#__PURE__*/React__default[
|
|
1709
|
+
return /*#__PURE__*/React__default["default"].createElement("td", {
|
|
743
1710
|
ref: function ref(el) {
|
|
744
1711
|
return _this6.container = el;
|
|
745
1712
|
},
|
|
@@ -754,15 +1721,15 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
754
1721
|
return TreeTableBodyCell;
|
|
755
1722
|
}(React.Component);
|
|
756
1723
|
|
|
757
|
-
function _createForOfIteratorHelper$
|
|
1724
|
+
function _createForOfIteratorHelper$2(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$2(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
758
1725
|
|
|
759
|
-
function _unsupportedIterableToArray$
|
|
1726
|
+
function _unsupportedIterableToArray$2(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$2(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$2(o, minLen); }
|
|
760
1727
|
|
|
761
|
-
function _arrayLikeToArray$
|
|
1728
|
+
function _arrayLikeToArray$2(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
762
1729
|
|
|
763
|
-
function ownKeys$
|
|
1730
|
+
function ownKeys$2(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; }
|
|
764
1731
|
|
|
765
|
-
function _objectSpread$
|
|
1732
|
+
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$2(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
766
1733
|
|
|
767
1734
|
function _createSuper$4(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$4(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
768
1735
|
|
|
@@ -805,7 +1772,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
805
1772
|
}, {
|
|
806
1773
|
key: "expand",
|
|
807
1774
|
value: function expand(event) {
|
|
808
|
-
var expandedKeys = this.props.expandedKeys ? _objectSpread$
|
|
1775
|
+
var expandedKeys = this.props.expandedKeys ? _objectSpread$2({}, this.props.expandedKeys) : {};
|
|
809
1776
|
expandedKeys[this.props.node.key] = true;
|
|
810
1777
|
this.props.onToggle({
|
|
811
1778
|
originalEvent: event,
|
|
@@ -816,7 +1783,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
816
1783
|
}, {
|
|
817
1784
|
key: "collapse",
|
|
818
1785
|
value: function collapse(event) {
|
|
819
|
-
var expandedKeys = _objectSpread$
|
|
1786
|
+
var expandedKeys = _objectSpread$2({}, this.props.expandedKeys);
|
|
820
1787
|
|
|
821
1788
|
delete expandedKeys[this.props.node.key];
|
|
822
1789
|
this.props.onToggle({
|
|
@@ -848,107 +1815,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
848
1815
|
key: "onClick",
|
|
849
1816
|
value: function onClick(event) {
|
|
850
1817
|
if (this.props.onRowClick) {
|
|
851
|
-
this.props.onRowClick(
|
|
852
|
-
originalEvent: event,
|
|
853
|
-
node: this.props.node
|
|
854
|
-
});
|
|
855
|
-
}
|
|
856
|
-
|
|
857
|
-
var targetNode = event.target.nodeName;
|
|
858
|
-
|
|
859
|
-
if (targetNode === 'INPUT' || targetNode === 'BUTTON' || targetNode === 'A' || core.DomHandler.hasClass(event.target, 'p-clickable') || core.DomHandler.hasClass(event.target, 'p-treetable-toggler') || core.DomHandler.hasClass(event.target.parentElement, 'p-treetable-toggler')) {
|
|
860
|
-
return;
|
|
861
|
-
}
|
|
862
|
-
|
|
863
|
-
if ((this.isSingleSelectionMode() || this.isMultipleSelectionMode()) && this.props.node.selectable !== false) {
|
|
864
|
-
var selectionKeys;
|
|
865
|
-
var selected = this.isSelected();
|
|
866
|
-
var metaSelection = this.nodeTouched ? false : this.props.metaKeySelection;
|
|
867
|
-
|
|
868
|
-
if (metaSelection) {
|
|
869
|
-
var metaKey = event.metaKey || event.ctrlKey;
|
|
870
|
-
|
|
871
|
-
if (selected && metaKey) {
|
|
872
|
-
if (this.isSingleSelectionMode()) {
|
|
873
|
-
selectionKeys = null;
|
|
874
|
-
} else {
|
|
875
|
-
selectionKeys = _objectSpread$1({}, this.props.selectionKeys);
|
|
876
|
-
delete selectionKeys[this.props.node.key];
|
|
877
|
-
}
|
|
878
|
-
|
|
879
|
-
if (this.props.onUnselect) {
|
|
880
|
-
this.props.onUnselect({
|
|
881
|
-
originalEvent: event,
|
|
882
|
-
node: this.props.node
|
|
883
|
-
});
|
|
884
|
-
}
|
|
885
|
-
} else {
|
|
886
|
-
if (this.isSingleSelectionMode()) {
|
|
887
|
-
selectionKeys = this.props.node.key;
|
|
888
|
-
} else if (this.isMultipleSelectionMode()) {
|
|
889
|
-
selectionKeys = !metaKey ? {} : this.props.selectionKeys ? _objectSpread$1({}, this.props.selectionKeys) : {};
|
|
890
|
-
selectionKeys[this.props.node.key] = true;
|
|
891
|
-
}
|
|
892
|
-
|
|
893
|
-
if (this.props.onSelect) {
|
|
894
|
-
this.props.onSelect({
|
|
895
|
-
originalEvent: event,
|
|
896
|
-
node: this.props.node
|
|
897
|
-
});
|
|
898
|
-
}
|
|
899
|
-
}
|
|
900
|
-
} else {
|
|
901
|
-
if (this.isSingleSelectionMode()) {
|
|
902
|
-
if (selected) {
|
|
903
|
-
selectionKeys = null;
|
|
904
|
-
|
|
905
|
-
if (this.props.onUnselect) {
|
|
906
|
-
this.props.onUnselect({
|
|
907
|
-
originalEvent: event,
|
|
908
|
-
node: this.props.node
|
|
909
|
-
});
|
|
910
|
-
}
|
|
911
|
-
} else {
|
|
912
|
-
selectionKeys = this.props.node.key;
|
|
913
|
-
|
|
914
|
-
if (this.props.onSelect) {
|
|
915
|
-
this.props.onSelect({
|
|
916
|
-
originalEvent: event,
|
|
917
|
-
node: this.props.node
|
|
918
|
-
});
|
|
919
|
-
}
|
|
920
|
-
}
|
|
921
|
-
} else {
|
|
922
|
-
if (selected) {
|
|
923
|
-
selectionKeys = _objectSpread$1({}, this.props.selectionKeys);
|
|
924
|
-
delete selectionKeys[this.props.node.key];
|
|
925
|
-
|
|
926
|
-
if (this.props.onUnselect) {
|
|
927
|
-
this.props.onUnselect({
|
|
928
|
-
originalEvent: event,
|
|
929
|
-
node: this.props.node
|
|
930
|
-
});
|
|
931
|
-
}
|
|
932
|
-
} else {
|
|
933
|
-
selectionKeys = this.props.selectionKeys ? _objectSpread$1({}, this.props.selectionKeys) : {};
|
|
934
|
-
selectionKeys[this.props.node.key] = true;
|
|
935
|
-
|
|
936
|
-
if (this.props.onSelect) {
|
|
937
|
-
this.props.onSelect({
|
|
938
|
-
originalEvent: event,
|
|
939
|
-
node: this.props.node
|
|
940
|
-
});
|
|
941
|
-
}
|
|
942
|
-
}
|
|
943
|
-
}
|
|
944
|
-
}
|
|
945
|
-
|
|
946
|
-
if (this.props.onSelectionChange) {
|
|
947
|
-
this.props.onSelectionChange({
|
|
948
|
-
originalEvent: event,
|
|
949
|
-
value: selectionKeys
|
|
950
|
-
});
|
|
951
|
-
}
|
|
1818
|
+
this.props.onRowClick(event, this.props.node);
|
|
952
1819
|
}
|
|
953
1820
|
|
|
954
1821
|
this.nodeTouched = false;
|
|
@@ -962,7 +1829,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
962
1829
|
key: "onCheckboxChange",
|
|
963
1830
|
value: function onCheckboxChange(event) {
|
|
964
1831
|
var checked = this.isChecked();
|
|
965
|
-
var selectionKeys = this.props.selectionKeys ? _objectSpread$
|
|
1832
|
+
var selectionKeys = this.props.selectionKeys ? _objectSpread$2({}, this.props.selectionKeys) : {};
|
|
966
1833
|
|
|
967
1834
|
if (checked) {
|
|
968
1835
|
if (this.props.propagateSelectionDown) this.propagateDown(this.props.node, false, selectionKeys);else delete selectionKeys[this.props.node.key];
|
|
@@ -1009,17 +1876,17 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1009
1876
|
});
|
|
1010
1877
|
}
|
|
1011
1878
|
|
|
1012
|
-
|
|
1879
|
+
utils.DomHandler.clearSelection();
|
|
1013
1880
|
}
|
|
1014
1881
|
}, {
|
|
1015
1882
|
key: "onCheckboxFocus",
|
|
1016
1883
|
value: function onCheckboxFocus() {
|
|
1017
|
-
|
|
1884
|
+
utils.DomHandler.addClass(this.checkboxBox, 'p-focus');
|
|
1018
1885
|
}
|
|
1019
1886
|
}, {
|
|
1020
1887
|
key: "onCheckboxBlur",
|
|
1021
1888
|
value: function onCheckboxBlur() {
|
|
1022
|
-
|
|
1889
|
+
utils.DomHandler.removeClass(this.checkboxBox, 'p-focus');
|
|
1023
1890
|
}
|
|
1024
1891
|
}, {
|
|
1025
1892
|
key: "propagateUp",
|
|
@@ -1029,7 +1896,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1029
1896
|
var checkedChildCount = 0;
|
|
1030
1897
|
var childPartialSelected = false;
|
|
1031
1898
|
|
|
1032
|
-
var _iterator = _createForOfIteratorHelper$
|
|
1899
|
+
var _iterator = _createForOfIteratorHelper$2(this.props.node.children),
|
|
1033
1900
|
_step;
|
|
1034
1901
|
|
|
1035
1902
|
try {
|
|
@@ -1083,7 +1950,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1083
1950
|
}, {
|
|
1084
1951
|
key: "onRightClick",
|
|
1085
1952
|
value: function onRightClick(event) {
|
|
1086
|
-
|
|
1953
|
+
utils.DomHandler.clearSelection();
|
|
1087
1954
|
|
|
1088
1955
|
if (this.props.onContextMenuSelectionChange) {
|
|
1089
1956
|
this.props.onContextMenuSelectionChange({
|
|
@@ -1154,16 +2021,6 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1154
2021
|
}
|
|
1155
2022
|
}
|
|
1156
2023
|
}
|
|
1157
|
-
}, {
|
|
1158
|
-
key: "isSingleSelectionMode",
|
|
1159
|
-
value: function isSingleSelectionMode() {
|
|
1160
|
-
return this.props.selectionMode && this.props.selectionMode === 'single';
|
|
1161
|
-
}
|
|
1162
|
-
}, {
|
|
1163
|
-
key: "isMultipleSelectionMode",
|
|
1164
|
-
value: function isMultipleSelectionMode() {
|
|
1165
|
-
return this.props.selectionMode && this.props.selectionMode === 'multiple';
|
|
1166
|
-
}
|
|
1167
2024
|
}, {
|
|
1168
2025
|
key: "isExpanded",
|
|
1169
2026
|
value: function isExpanded() {
|
|
@@ -1188,7 +2045,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1188
2045
|
key: "renderToggler",
|
|
1189
2046
|
value: function renderToggler() {
|
|
1190
2047
|
var expanded = this.isExpanded();
|
|
1191
|
-
var iconClassName =
|
|
2048
|
+
var iconClassName = utils.classNames('"p-treetable-toggler-icon pi pi-fw', {
|
|
1192
2049
|
'pi-chevron-right': !expanded,
|
|
1193
2050
|
'pi-chevron-down': expanded
|
|
1194
2051
|
});
|
|
@@ -1196,15 +2053,15 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1196
2053
|
marginLeft: this.props.level * 16 + 'px',
|
|
1197
2054
|
visibility: this.props.node.leaf === false || this.props.node.children && this.props.node.children.length ? 'visible' : 'hidden'
|
|
1198
2055
|
};
|
|
1199
|
-
return /*#__PURE__*/React__default[
|
|
2056
|
+
return /*#__PURE__*/React__default["default"].createElement("button", {
|
|
1200
2057
|
type: "button",
|
|
1201
2058
|
className: "p-treetable-toggler p-link p-unselectable-text",
|
|
1202
2059
|
onClick: this.onTogglerClick,
|
|
1203
2060
|
tabIndex: -1,
|
|
1204
2061
|
style: style
|
|
1205
|
-
}, /*#__PURE__*/React__default[
|
|
2062
|
+
}, /*#__PURE__*/React__default["default"].createElement("i", {
|
|
1206
2063
|
className: iconClassName
|
|
1207
|
-
}), /*#__PURE__*/React__default[
|
|
2064
|
+
}), /*#__PURE__*/React__default["default"].createElement(ripple.Ripple, null));
|
|
1208
2065
|
}
|
|
1209
2066
|
}, {
|
|
1210
2067
|
key: "renderCheckbox",
|
|
@@ -1214,31 +2071,31 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1214
2071
|
if (this.props.selectionMode === 'checkbox' && this.props.node.selectable !== false) {
|
|
1215
2072
|
var checked = this.isChecked();
|
|
1216
2073
|
var partialChecked = this.isPartialChecked();
|
|
1217
|
-
var className =
|
|
2074
|
+
var className = utils.classNames('p-checkbox-box', {
|
|
1218
2075
|
'p-highlight': checked,
|
|
1219
2076
|
'p-indeterminate': partialChecked
|
|
1220
2077
|
});
|
|
1221
|
-
var icon =
|
|
2078
|
+
var icon = utils.classNames('p-checkbox-icon p-c', {
|
|
1222
2079
|
'pi pi-check': checked,
|
|
1223
2080
|
'pi pi-minus': partialChecked
|
|
1224
2081
|
});
|
|
1225
|
-
return /*#__PURE__*/React__default[
|
|
2082
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1226
2083
|
className: "p-checkbox p-treetable-checkbox p-component",
|
|
1227
2084
|
onClick: this.onCheckboxChange,
|
|
1228
2085
|
role: "checkbox",
|
|
1229
2086
|
"aria-checked": checked
|
|
1230
|
-
}, /*#__PURE__*/React__default[
|
|
2087
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1231
2088
|
className: "p-hidden-accessible"
|
|
1232
|
-
}, /*#__PURE__*/React__default[
|
|
2089
|
+
}, /*#__PURE__*/React__default["default"].createElement("input", {
|
|
1233
2090
|
type: "checkbox",
|
|
1234
2091
|
onFocus: this.onCheckboxFocus,
|
|
1235
2092
|
onBlur: this.onCheckboxBlur
|
|
1236
|
-
})), /*#__PURE__*/React__default[
|
|
2093
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1237
2094
|
className: className,
|
|
1238
2095
|
ref: function ref(el) {
|
|
1239
2096
|
return _this2.checkboxBox = el;
|
|
1240
2097
|
}
|
|
1241
|
-
}, /*#__PURE__*/React__default[
|
|
2098
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
1242
2099
|
className: icon
|
|
1243
2100
|
})));
|
|
1244
2101
|
} else {
|
|
@@ -1255,7 +2112,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1255
2112
|
checkbox = this.renderCheckbox();
|
|
1256
2113
|
}
|
|
1257
2114
|
|
|
1258
|
-
return /*#__PURE__*/React__default[
|
|
2115
|
+
return /*#__PURE__*/React__default["default"].createElement(TreeTableBodyCell, _extends({
|
|
1259
2116
|
key: column.props.columnKey || column.props.field
|
|
1260
2117
|
}, column.props, {
|
|
1261
2118
|
selectOnEdit: this.props.selectOnEdit,
|
|
@@ -1271,7 +2128,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1271
2128
|
|
|
1272
2129
|
if (this.isExpanded() && this.props.node.children) {
|
|
1273
2130
|
return this.props.node.children.map(function (childNode, index) {
|
|
1274
|
-
return /*#__PURE__*/React__default[
|
|
2131
|
+
return /*#__PURE__*/React__default["default"].createElement(TreeTableRow, {
|
|
1275
2132
|
key: childNode.key || JSON.stringify(childNode.data),
|
|
1276
2133
|
level: _this3.props.level + 1,
|
|
1277
2134
|
rowIndex: _this3.props.rowIndex + '_' + index,
|
|
@@ -1318,11 +2175,11 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1318
2175
|
|
|
1319
2176
|
if (this.props.rowClassName) {
|
|
1320
2177
|
var rowClassName = this.props.rowClassName(this.props.node);
|
|
1321
|
-
className = _objectSpread$
|
|
2178
|
+
className = _objectSpread$2(_objectSpread$2({}, className), rowClassName);
|
|
1322
2179
|
}
|
|
1323
2180
|
|
|
1324
|
-
className =
|
|
1325
|
-
return /*#__PURE__*/React__default[
|
|
2181
|
+
className = utils.classNames(className, this.props.node.className);
|
|
2182
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("tr", {
|
|
1326
2183
|
ref: function ref(el) {
|
|
1327
2184
|
return _this4.container = el;
|
|
1328
2185
|
},
|
|
@@ -1364,6 +2221,16 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1364
2221
|
onContextMenu: null
|
|
1365
2222
|
});
|
|
1366
2223
|
|
|
2224
|
+
function ownKeys$1(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; }
|
|
2225
|
+
|
|
2226
|
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
2227
|
+
|
|
2228
|
+
function _createForOfIteratorHelper$1(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$1(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
2229
|
+
|
|
2230
|
+
function _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); }
|
|
2231
|
+
|
|
2232
|
+
function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
2233
|
+
|
|
1367
2234
|
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); }; }
|
|
1368
2235
|
|
|
1369
2236
|
function _isNativeReflectConstruct$3() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
@@ -1372,16 +2239,20 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1372
2239
|
|
|
1373
2240
|
var _super = _createSuper$3(TreeTableBody);
|
|
1374
2241
|
|
|
1375
|
-
function TreeTableBody() {
|
|
2242
|
+
function TreeTableBody(props) {
|
|
2243
|
+
var _this;
|
|
2244
|
+
|
|
1376
2245
|
_classCallCheck(this, TreeTableBody);
|
|
1377
2246
|
|
|
1378
|
-
|
|
2247
|
+
_this = _super.call(this, props);
|
|
2248
|
+
_this.onRowClick = _this.onRowClick.bind(_assertThisInitialized(_this));
|
|
2249
|
+
return _this;
|
|
1379
2250
|
}
|
|
1380
2251
|
|
|
1381
2252
|
_createClass(TreeTableBody, [{
|
|
1382
2253
|
key: "createRow",
|
|
1383
2254
|
value: function createRow(node, index) {
|
|
1384
|
-
return /*#__PURE__*/React__default[
|
|
2255
|
+
return /*#__PURE__*/React__default["default"].createElement(TreeTableRow, {
|
|
1385
2256
|
key: node.key || JSON.stringify(node.data),
|
|
1386
2257
|
level: 0,
|
|
1387
2258
|
rowIndex: index,
|
|
@@ -1396,7 +2267,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1396
2267
|
selectionKeys: this.props.selectionKeys,
|
|
1397
2268
|
onSelectionChange: this.props.onSelectionChange,
|
|
1398
2269
|
metaKeySelection: this.props.metaKeySelection,
|
|
1399
|
-
onRowClick: this.
|
|
2270
|
+
onRowClick: this.onRowClick,
|
|
1400
2271
|
onSelect: this.props.onSelect,
|
|
1401
2272
|
onUnselect: this.props.onUnselect,
|
|
1402
2273
|
propagateSelectionUp: this.props.propagateSelectionUp,
|
|
@@ -1407,10 +2278,187 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1407
2278
|
onContextMenu: this.props.onContextMenu
|
|
1408
2279
|
});
|
|
1409
2280
|
}
|
|
2281
|
+
}, {
|
|
2282
|
+
key: "flattenizeTree",
|
|
2283
|
+
value: function flattenizeTree(nodes) {
|
|
2284
|
+
var rows = [];
|
|
2285
|
+
nodes = nodes || this.props.value;
|
|
2286
|
+
|
|
2287
|
+
var _iterator = _createForOfIteratorHelper$1(nodes),
|
|
2288
|
+
_step;
|
|
2289
|
+
|
|
2290
|
+
try {
|
|
2291
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
2292
|
+
var node = _step.value;
|
|
2293
|
+
rows.push(node.key);
|
|
2294
|
+
|
|
2295
|
+
if (this.isExpandedKey(node.key)) {
|
|
2296
|
+
rows = rows.concat(this.flattenizeTree(node.children));
|
|
2297
|
+
}
|
|
2298
|
+
}
|
|
2299
|
+
} catch (err) {
|
|
2300
|
+
_iterator.e(err);
|
|
2301
|
+
} finally {
|
|
2302
|
+
_iterator.f();
|
|
2303
|
+
}
|
|
2304
|
+
|
|
2305
|
+
return rows;
|
|
2306
|
+
}
|
|
2307
|
+
}, {
|
|
2308
|
+
key: "isExpandedKey",
|
|
2309
|
+
value: function isExpandedKey(key) {
|
|
2310
|
+
return this.props.expandedKeys && !!this.props.expandedKeys[key];
|
|
2311
|
+
}
|
|
2312
|
+
}, {
|
|
2313
|
+
key: "onRowClick",
|
|
2314
|
+
value: function onRowClick(event, node) {
|
|
2315
|
+
var _this2 = this;
|
|
2316
|
+
|
|
2317
|
+
if (this.props.onRowClick) {
|
|
2318
|
+
this.props.onRowClick({
|
|
2319
|
+
originalEvent: event,
|
|
2320
|
+
node: node
|
|
2321
|
+
});
|
|
2322
|
+
}
|
|
2323
|
+
|
|
2324
|
+
var targetNode = event.target.nodeName;
|
|
2325
|
+
|
|
2326
|
+
if (targetNode === 'INPUT' || targetNode === 'BUTTON' || targetNode === 'A' || DomHandler.hasClass(event.target, 'p-clickable') || DomHandler.hasClass(event.target, 'p-treetable-toggler') || DomHandler.hasClass(event.target.parentElement, 'p-treetable-toggler')) {
|
|
2327
|
+
return;
|
|
2328
|
+
}
|
|
2329
|
+
|
|
2330
|
+
if ((this.isSingleSelectionMode() || this.isMultipleSelectionMode()) && node.selectable !== false) {
|
|
2331
|
+
var selectionKeys;
|
|
2332
|
+
var selected = this.isSelected(node);
|
|
2333
|
+
var metaSelection = this.nodeTouched ? false : this.props.metaKeySelection;
|
|
2334
|
+
var flatKeys = this.flattenizeTree();
|
|
2335
|
+
var rowIndex = flatKeys.findIndex(function (key) {
|
|
2336
|
+
return key === node.key;
|
|
2337
|
+
});
|
|
2338
|
+
|
|
2339
|
+
if (this.isMultipleSelectionMode() && event.shiftKey) {
|
|
2340
|
+
DomHandler.clearSelection(); // find first selected row
|
|
2341
|
+
|
|
2342
|
+
var anchorRowIndex = flatKeys.findIndex(function (key) {
|
|
2343
|
+
return _this2.props.selectionKeys[key];
|
|
2344
|
+
});
|
|
2345
|
+
var rangeStart = Math.min(rowIndex, anchorRowIndex);
|
|
2346
|
+
var rangeEnd = Math.max(rowIndex, anchorRowIndex);
|
|
2347
|
+
selectionKeys = _objectSpread$1({}, this.props.selectionKeys);
|
|
2348
|
+
|
|
2349
|
+
for (var i = rangeStart; i <= rangeEnd; i++) {
|
|
2350
|
+
var rowKey = flatKeys[i];
|
|
2351
|
+
selectionKeys[rowKey] = true;
|
|
2352
|
+
}
|
|
2353
|
+
} else {
|
|
2354
|
+
this.anchorRowIndex = rowIndex;
|
|
2355
|
+
|
|
2356
|
+
if (metaSelection) {
|
|
2357
|
+
var metaKey = event.metaKey || event.ctrlKey;
|
|
2358
|
+
|
|
2359
|
+
if (selected && metaKey) {
|
|
2360
|
+
if (this.isSingleSelectionMode()) {
|
|
2361
|
+
selectionKeys = null;
|
|
2362
|
+
} else {
|
|
2363
|
+
selectionKeys = _objectSpread$1({}, this.props.selectionKeys);
|
|
2364
|
+
delete selectionKeys[node.key];
|
|
2365
|
+
}
|
|
2366
|
+
|
|
2367
|
+
if (this.props.onUnselect) {
|
|
2368
|
+
this.props.onUnselect({
|
|
2369
|
+
originalEvent: event,
|
|
2370
|
+
node: node
|
|
2371
|
+
});
|
|
2372
|
+
}
|
|
2373
|
+
} else {
|
|
2374
|
+
if (this.isSingleSelectionMode()) {
|
|
2375
|
+
selectionKeys = node.key;
|
|
2376
|
+
} else if (this.isMultipleSelectionMode()) {
|
|
2377
|
+
selectionKeys = !metaKey ? {} : this.props.selectionKeys ? _objectSpread$1({}, this.props.selectionKeys) : {};
|
|
2378
|
+
selectionKeys[node.key] = true;
|
|
2379
|
+
}
|
|
2380
|
+
|
|
2381
|
+
if (this.props.onSelect) {
|
|
2382
|
+
this.props.onSelect({
|
|
2383
|
+
originalEvent: event,
|
|
2384
|
+
node: node
|
|
2385
|
+
});
|
|
2386
|
+
}
|
|
2387
|
+
}
|
|
2388
|
+
} else {
|
|
2389
|
+
if (this.isSingleSelectionMode()) {
|
|
2390
|
+
if (selected) {
|
|
2391
|
+
selectionKeys = null;
|
|
2392
|
+
|
|
2393
|
+
if (this.props.onUnselect) {
|
|
2394
|
+
this.props.onUnselect({
|
|
2395
|
+
originalEvent: event,
|
|
2396
|
+
node: node
|
|
2397
|
+
});
|
|
2398
|
+
}
|
|
2399
|
+
} else {
|
|
2400
|
+
selectionKeys = node.key;
|
|
2401
|
+
|
|
2402
|
+
if (this.props.onSelect) {
|
|
2403
|
+
this.props.onSelect({
|
|
2404
|
+
originalEvent: event,
|
|
2405
|
+
node: node
|
|
2406
|
+
});
|
|
2407
|
+
}
|
|
2408
|
+
}
|
|
2409
|
+
} else {
|
|
2410
|
+
if (selected) {
|
|
2411
|
+
selectionKeys = _objectSpread$1({}, this.props.selectionKeys);
|
|
2412
|
+
delete selectionKeys[node.key];
|
|
2413
|
+
|
|
2414
|
+
if (this.props.onUnselect) {
|
|
2415
|
+
this.props.onUnselect({
|
|
2416
|
+
originalEvent: event,
|
|
2417
|
+
node: node
|
|
2418
|
+
});
|
|
2419
|
+
}
|
|
2420
|
+
} else {
|
|
2421
|
+
selectionKeys = this.props.selectionKeys ? _objectSpread$1({}, this.props.selectionKeys) : {};
|
|
2422
|
+
selectionKeys[node.key] = true;
|
|
2423
|
+
|
|
2424
|
+
if (this.props.onSelect) {
|
|
2425
|
+
this.props.onSelect({
|
|
2426
|
+
originalEvent: event,
|
|
2427
|
+
node: node
|
|
2428
|
+
});
|
|
2429
|
+
}
|
|
2430
|
+
}
|
|
2431
|
+
}
|
|
2432
|
+
}
|
|
2433
|
+
}
|
|
2434
|
+
|
|
2435
|
+
if (this.props.onSelectionChange) {
|
|
2436
|
+
this.props.onSelectionChange({
|
|
2437
|
+
originalEvent: event,
|
|
2438
|
+
value: selectionKeys
|
|
2439
|
+
});
|
|
2440
|
+
}
|
|
2441
|
+
}
|
|
2442
|
+
}
|
|
2443
|
+
}, {
|
|
2444
|
+
key: "isSingleSelectionMode",
|
|
2445
|
+
value: function isSingleSelectionMode() {
|
|
2446
|
+
return this.props.selectionMode && this.props.selectionMode === 'single';
|
|
2447
|
+
}
|
|
2448
|
+
}, {
|
|
2449
|
+
key: "isMultipleSelectionMode",
|
|
2450
|
+
value: function isMultipleSelectionMode() {
|
|
2451
|
+
return this.props.selectionMode && this.props.selectionMode === 'multiple';
|
|
2452
|
+
}
|
|
2453
|
+
}, {
|
|
2454
|
+
key: "isSelected",
|
|
2455
|
+
value: function isSelected(node) {
|
|
2456
|
+
if ((this.props.selectionMode === 'single' || this.props.selectionMode === 'multiple') && this.props.selectionKeys) return this.props.selectionMode === 'single' ? this.props.selectionKeys === node.key : this.props.selectionKeys[node.key] !== undefined;else return false;
|
|
2457
|
+
}
|
|
1410
2458
|
}, {
|
|
1411
2459
|
key: "renderRows",
|
|
1412
2460
|
value: function renderRows() {
|
|
1413
|
-
var
|
|
2461
|
+
var _this3 = this;
|
|
1414
2462
|
|
|
1415
2463
|
if (this.props.paginator && !this.props.lazy) {
|
|
1416
2464
|
var rpp = this.props.rows || 0;
|
|
@@ -1426,7 +2474,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1426
2474
|
return rows;
|
|
1427
2475
|
} else {
|
|
1428
2476
|
return this.props.value.map(function (node, index) {
|
|
1429
|
-
return
|
|
2477
|
+
return _this3.createRow(node, index);
|
|
1430
2478
|
});
|
|
1431
2479
|
}
|
|
1432
2480
|
}
|
|
@@ -1437,17 +2485,18 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1437
2485
|
return null;
|
|
1438
2486
|
} else {
|
|
1439
2487
|
var colSpan = this.props.columns ? this.props.columns.length : null;
|
|
1440
|
-
|
|
2488
|
+
var content = this.props.emptyMessage || api.localeOption('emptyMessage');
|
|
2489
|
+
return /*#__PURE__*/React__default["default"].createElement("tr", null, /*#__PURE__*/React__default["default"].createElement("td", {
|
|
1441
2490
|
className: "p-treetable-emptymessage",
|
|
1442
2491
|
colSpan: colSpan
|
|
1443
|
-
},
|
|
2492
|
+
}, content));
|
|
1444
2493
|
}
|
|
1445
2494
|
}
|
|
1446
2495
|
}, {
|
|
1447
2496
|
key: "render",
|
|
1448
2497
|
value: function render() {
|
|
1449
2498
|
var content = this.props.value && this.props.value.length ? this.renderRows() : this.renderEmptyMessage();
|
|
1450
|
-
return /*#__PURE__*/React__default[
|
|
2499
|
+
return /*#__PURE__*/React__default["default"].createElement("tbody", {
|
|
1451
2500
|
className: "p-treetable-tbody"
|
|
1452
2501
|
}, content);
|
|
1453
2502
|
}
|
|
@@ -1471,7 +2520,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1471
2520
|
propagateSelectionDown: true,
|
|
1472
2521
|
lazy: false,
|
|
1473
2522
|
rowClassName: null,
|
|
1474
|
-
emptyMessage:
|
|
2523
|
+
emptyMessage: null,
|
|
1475
2524
|
loading: false,
|
|
1476
2525
|
onExpand: null,
|
|
1477
2526
|
onCollapse: null,
|
|
@@ -1501,7 +2550,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1501
2550
|
_createClass(TreeTableFooter, [{
|
|
1502
2551
|
key: "renderFooterCell",
|
|
1503
2552
|
value: function renderFooterCell(column, index) {
|
|
1504
|
-
return /*#__PURE__*/React__default[
|
|
2553
|
+
return /*#__PURE__*/React__default["default"].createElement("td", {
|
|
1505
2554
|
key: column.field || index,
|
|
1506
2555
|
className: column.props.footerClassName || column.props.className,
|
|
1507
2556
|
style: column.props.footerStyle || column.props.style,
|
|
@@ -1514,11 +2563,11 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1514
2563
|
value: function renderFooterRow(row, index) {
|
|
1515
2564
|
var _this = this;
|
|
1516
2565
|
|
|
1517
|
-
var rowColumns = React__default[
|
|
2566
|
+
var rowColumns = React__default["default"].Children.toArray(row.props.children);
|
|
1518
2567
|
var rowFooterCells = rowColumns.map(function (col, index) {
|
|
1519
2568
|
return _this.renderFooterCell(col, index);
|
|
1520
2569
|
});
|
|
1521
|
-
return /*#__PURE__*/React__default[
|
|
2570
|
+
return /*#__PURE__*/React__default["default"].createElement("tr", {
|
|
1522
2571
|
key: index
|
|
1523
2572
|
}, rowFooterCells);
|
|
1524
2573
|
}
|
|
@@ -1527,7 +2576,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1527
2576
|
value: function renderColumnGroup() {
|
|
1528
2577
|
var _this2 = this;
|
|
1529
2578
|
|
|
1530
|
-
var rows = React__default[
|
|
2579
|
+
var rows = React__default["default"].Children.toArray(this.props.columnGroup.props.children);
|
|
1531
2580
|
return rows.map(function (row, i) {
|
|
1532
2581
|
return _this2.renderFooterRow(row, i);
|
|
1533
2582
|
});
|
|
@@ -1541,7 +2590,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1541
2590
|
var headerCells = columns.map(function (col, index) {
|
|
1542
2591
|
return _this3.renderFooterCell(col, index);
|
|
1543
2592
|
});
|
|
1544
|
-
return /*#__PURE__*/React__default[
|
|
2593
|
+
return /*#__PURE__*/React__default["default"].createElement("tr", null, headerCells);
|
|
1545
2594
|
} else {
|
|
1546
2595
|
return null;
|
|
1547
2596
|
}
|
|
@@ -1567,7 +2616,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1567
2616
|
var content = this.props.columnGroup ? this.renderColumnGroup() : this.renderColumns(this.props.columns);
|
|
1568
2617
|
|
|
1569
2618
|
if (this.hasFooter()) {
|
|
1570
|
-
return /*#__PURE__*/React__default[
|
|
2619
|
+
return /*#__PURE__*/React__default["default"].createElement("tfoot", {
|
|
1571
2620
|
className: "p-treetable-tfoot"
|
|
1572
2621
|
}, content);
|
|
1573
2622
|
} else {
|
|
@@ -1609,14 +2658,14 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1609
2658
|
this.setScrollHeight();
|
|
1610
2659
|
|
|
1611
2660
|
if (!this.props.frozen) {
|
|
1612
|
-
var scrollBarWidth =
|
|
2661
|
+
var scrollBarWidth = utils.DomHandler.calculateScrollbarWidth();
|
|
1613
2662
|
this.scrollHeaderBox.style.marginRight = scrollBarWidth + 'px';
|
|
1614
2663
|
|
|
1615
2664
|
if (this.scrollFooterBox) {
|
|
1616
2665
|
this.scrollFooterBox.style.marginRight = scrollBarWidth + 'px';
|
|
1617
2666
|
}
|
|
1618
2667
|
} else {
|
|
1619
|
-
this.scrollBody.style.paddingBottom =
|
|
2668
|
+
this.scrollBody.style.paddingBottom = utils.DomHandler.calculateScrollbarWidth() + 'px';
|
|
1620
2669
|
}
|
|
1621
2670
|
}
|
|
1622
2671
|
}, {
|
|
@@ -1633,8 +2682,8 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1633
2682
|
this.scrollBody.style.visibility = 'hidden';
|
|
1634
2683
|
this.scrollBody.style.height = '100px'; //temporary height to calculate static height
|
|
1635
2684
|
|
|
1636
|
-
var containerHeight =
|
|
1637
|
-
var relativeHeight =
|
|
2685
|
+
var containerHeight = utils.DomHandler.getOuterHeight(datatableContainer);
|
|
2686
|
+
var relativeHeight = utils.DomHandler.getOuterHeight(datatableContainer.parentElement) * parseInt(this.props.scrollHeight, 10) / 100;
|
|
1638
2687
|
var staticHeight = containerHeight - 100; //total height of headers, footers, paginators
|
|
1639
2688
|
|
|
1640
2689
|
var scrollBodyHeight = relativeHeight - staticHeight;
|
|
@@ -1652,7 +2701,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1652
2701
|
if (element) {
|
|
1653
2702
|
var el = element;
|
|
1654
2703
|
|
|
1655
|
-
while (el && !
|
|
2704
|
+
while (el && !utils.DomHandler.hasClass(el, 'p-treetable')) {
|
|
1656
2705
|
el = el.parentElement;
|
|
1657
2706
|
}
|
|
1658
2707
|
|
|
@@ -1673,7 +2722,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1673
2722
|
var frozenScrollBody;
|
|
1674
2723
|
|
|
1675
2724
|
if (frozenView) {
|
|
1676
|
-
frozenScrollBody =
|
|
2725
|
+
frozenScrollBody = utils.DomHandler.findSingle(frozenView, '.p-treetable-scrollable-body');
|
|
1677
2726
|
}
|
|
1678
2727
|
|
|
1679
2728
|
this.scrollHeaderBox.style.marginLeft = -1 * this.scrollBody.scrollLeft + 'px';
|
|
@@ -1689,20 +2738,20 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1689
2738
|
}, {
|
|
1690
2739
|
key: "calculateRowHeight",
|
|
1691
2740
|
value: function calculateRowHeight() {
|
|
1692
|
-
var row =
|
|
2741
|
+
var row = utils.DomHandler.findSingle(this.scrollTable, 'tr:not(.p-treetable-emptymessage-row)');
|
|
1693
2742
|
|
|
1694
2743
|
if (row) {
|
|
1695
|
-
this.rowHeight =
|
|
2744
|
+
this.rowHeight = utils.DomHandler.getOuterHeight(row);
|
|
1696
2745
|
}
|
|
1697
2746
|
}
|
|
1698
2747
|
}, {
|
|
1699
2748
|
key: "renderColGroup",
|
|
1700
2749
|
value: function renderColGroup() {
|
|
1701
2750
|
if (this.props.columns && this.props.columns.length) {
|
|
1702
|
-
return /*#__PURE__*/React__default[
|
|
2751
|
+
return /*#__PURE__*/React__default["default"].createElement("colgroup", {
|
|
1703
2752
|
className: "p-treetable-scrollable-colgroup"
|
|
1704
2753
|
}, this.props.columns.map(function (col, i) {
|
|
1705
|
-
return /*#__PURE__*/React__default[
|
|
2754
|
+
return /*#__PURE__*/React__default["default"].createElement("col", {
|
|
1706
2755
|
key: col.field + '_' + i
|
|
1707
2756
|
});
|
|
1708
2757
|
}));
|
|
@@ -1715,7 +2764,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1715
2764
|
value: function render() {
|
|
1716
2765
|
var _this2 = this;
|
|
1717
2766
|
|
|
1718
|
-
var className =
|
|
2767
|
+
var className = utils.classNames('p-treetable-scrollable-view', {
|
|
1719
2768
|
'p-treetable-frozen-view': this.props.frozen,
|
|
1720
2769
|
'p-treetable-unfrozen-view': !this.props.frozen && this.props.frozenWidth
|
|
1721
2770
|
});
|
|
@@ -1725,7 +2774,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1725
2774
|
var scrollableBodyStyle = !this.props.frozen && this.props.scrollHeight ? {
|
|
1726
2775
|
overflowY: 'scroll'
|
|
1727
2776
|
} : null;
|
|
1728
|
-
return /*#__PURE__*/React__default[
|
|
2777
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1729
2778
|
className: className,
|
|
1730
2779
|
style: {
|
|
1731
2780
|
width: width,
|
|
@@ -1734,27 +2783,27 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1734
2783
|
ref: function ref(el) {
|
|
1735
2784
|
_this2.container = el;
|
|
1736
2785
|
}
|
|
1737
|
-
}, /*#__PURE__*/React__default[
|
|
2786
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1738
2787
|
className: "p-treetable-scrollable-header",
|
|
1739
2788
|
ref: function ref(el) {
|
|
1740
2789
|
_this2.scrollHeader = el;
|
|
1741
2790
|
},
|
|
1742
2791
|
onScroll: this.onHeaderScroll
|
|
1743
|
-
}, /*#__PURE__*/React__default[
|
|
2792
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1744
2793
|
className: "p-treetable-scrollable-header-box",
|
|
1745
2794
|
ref: function ref(el) {
|
|
1746
2795
|
_this2.scrollHeaderBox = el;
|
|
1747
2796
|
}
|
|
1748
|
-
}, /*#__PURE__*/React__default[
|
|
2797
|
+
}, /*#__PURE__*/React__default["default"].createElement("table", {
|
|
1749
2798
|
className: "p-treetable-scrollable-header-table"
|
|
1750
|
-
}, colGroup, this.props.header))), /*#__PURE__*/React__default[
|
|
2799
|
+
}, colGroup, this.props.header))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1751
2800
|
className: "p-treetable-scrollable-body",
|
|
1752
2801
|
ref: function ref(el) {
|
|
1753
2802
|
_this2.scrollBody = el;
|
|
1754
2803
|
},
|
|
1755
2804
|
style: scrollableBodyStyle,
|
|
1756
2805
|
onScroll: this.onBodyScroll
|
|
1757
|
-
}, /*#__PURE__*/React__default[
|
|
2806
|
+
}, /*#__PURE__*/React__default["default"].createElement("table", {
|
|
1758
2807
|
ref: function ref(el) {
|
|
1759
2808
|
_this2.scrollTable = el;
|
|
1760
2809
|
},
|
|
@@ -1762,17 +2811,17 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1762
2811
|
top: '0'
|
|
1763
2812
|
},
|
|
1764
2813
|
className: "p-treetable-scrollable-body-table"
|
|
1765
|
-
}, colGroup, this.props.body)), /*#__PURE__*/React__default[
|
|
2814
|
+
}, colGroup, this.props.body)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1766
2815
|
className: "p-treetable-scrollable-footer",
|
|
1767
2816
|
ref: function ref(el) {
|
|
1768
2817
|
_this2.scrollFooter = el;
|
|
1769
2818
|
}
|
|
1770
|
-
}, /*#__PURE__*/React__default[
|
|
2819
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1771
2820
|
className: "p-treetable-scrollable-footer-box",
|
|
1772
2821
|
ref: function ref(el) {
|
|
1773
2822
|
_this2.scrollFooterBox = el;
|
|
1774
2823
|
}
|
|
1775
|
-
}, /*#__PURE__*/React__default[
|
|
2824
|
+
}, /*#__PURE__*/React__default["default"].createElement("table", {
|
|
1776
2825
|
className: "p-treetable-scrollable-footer-table"
|
|
1777
2826
|
}, colGroup, this.props.footer))));
|
|
1778
2827
|
}
|
|
@@ -1991,8 +3040,8 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
1991
3040
|
value.sort(function (node1, node2) {
|
|
1992
3041
|
var sortField = _this2.getSortField();
|
|
1993
3042
|
|
|
1994
|
-
var value1 =
|
|
1995
|
-
var value2 =
|
|
3043
|
+
var value1 = utils.ObjectUtils.resolveFieldData(node1.data, sortField);
|
|
3044
|
+
var value2 = utils.ObjectUtils.resolveFieldData(node2.data, sortField);
|
|
1996
3045
|
var result = null;
|
|
1997
3046
|
if (value1 == null && value2 != null) result = -1;else if (value1 != null && value2 == null) result = 1;else if (value1 == null && value2 == null) result = 0;else if (typeof value1 === 'string' && typeof value2 === 'string') result = value1.localeCompare(value2, undefined, {
|
|
1998
3047
|
numeric: true
|
|
@@ -2037,8 +3086,8 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
2037
3086
|
}, {
|
|
2038
3087
|
key: "multisortField",
|
|
2039
3088
|
value: function multisortField(node1, node2, multiSortMeta, index) {
|
|
2040
|
-
var value1 =
|
|
2041
|
-
var value2 =
|
|
3089
|
+
var value1 = utils.ObjectUtils.resolveFieldData(node1.data, multiSortMeta[index].field);
|
|
3090
|
+
var value2 = utils.ObjectUtils.resolveFieldData(node2.data, multiSortMeta[index].field);
|
|
2042
3091
|
var result = null;
|
|
2043
3092
|
if (value1 == null && value2 != null) result = -1;else if (value1 != null && value2 == null) result = 1;else if (value1 == null && value2 == null) result = 0;else {
|
|
2044
3093
|
if (value1 === value2) {
|
|
@@ -2099,7 +3148,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
2099
3148
|
}, {
|
|
2100
3149
|
key: "onColumnResizeStart",
|
|
2101
3150
|
value: function onColumnResizeStart(event) {
|
|
2102
|
-
var containerLeft =
|
|
3151
|
+
var containerLeft = utils.DomHandler.getOffset(this.container).left;
|
|
2103
3152
|
this.resizeColumn = event.columnEl;
|
|
2104
3153
|
this.resizeColumnProps = event.column;
|
|
2105
3154
|
this.columnResizing = true;
|
|
@@ -2109,8 +3158,8 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
2109
3158
|
}, {
|
|
2110
3159
|
key: "onColumnResize",
|
|
2111
3160
|
value: function onColumnResize(event) {
|
|
2112
|
-
var containerLeft =
|
|
2113
|
-
|
|
3161
|
+
var containerLeft = utils.DomHandler.getOffset(this.container).left;
|
|
3162
|
+
utils.DomHandler.addClass(this.container, 'p-unselectable-text');
|
|
2114
3163
|
this.resizerHelper.style.height = this.container.offsetHeight + 'px';
|
|
2115
3164
|
this.resizerHelper.style.top = 0 + 'px';
|
|
2116
3165
|
this.resizerHelper.style.left = event.pageX - containerLeft + this.container.scrollLeft + 'px';
|
|
@@ -2132,10 +3181,10 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
2132
3181
|
if (newColumnWidth > 15 && nextColumnWidth > 15) {
|
|
2133
3182
|
if (this.props.scrollable) {
|
|
2134
3183
|
var scrollableView = this.findParentScrollableView(this.resizeColumn);
|
|
2135
|
-
var scrollableBodyTable =
|
|
2136
|
-
var scrollableHeaderTable =
|
|
2137
|
-
var scrollableFooterTable =
|
|
2138
|
-
var resizeColumnIndex =
|
|
3184
|
+
var scrollableBodyTable = utils.DomHandler.findSingle(scrollableView, 'table.p-treetable-scrollable-body-table');
|
|
3185
|
+
var scrollableHeaderTable = utils.DomHandler.findSingle(scrollableView, 'table.p-treetable-scrollable-header-table');
|
|
3186
|
+
var scrollableFooterTable = utils.DomHandler.findSingle(scrollableView, 'table.p-treetable-scrollable-footer-table');
|
|
3187
|
+
var resizeColumnIndex = utils.DomHandler.index(this.resizeColumn);
|
|
2139
3188
|
this.resizeColGroup(scrollableHeaderTable, resizeColumnIndex, newColumnWidth, nextColumnWidth);
|
|
2140
3189
|
this.resizeColGroup(scrollableBodyTable, resizeColumnIndex, newColumnWidth, nextColumnWidth);
|
|
2141
3190
|
this.resizeColGroup(scrollableFooterTable, resizeColumnIndex, newColumnWidth, nextColumnWidth);
|
|
@@ -2151,11 +3200,11 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
2151
3200
|
if (this.props.scrollable) {
|
|
2152
3201
|
var _scrollableView = this.findParentScrollableView(this.resizeColumn);
|
|
2153
3202
|
|
|
2154
|
-
var _scrollableBodyTable =
|
|
3203
|
+
var _scrollableBodyTable = utils.DomHandler.findSingle(_scrollableView, 'table.p-treetable-scrollable-body-table');
|
|
2155
3204
|
|
|
2156
|
-
var _scrollableHeaderTable =
|
|
3205
|
+
var _scrollableHeaderTable = utils.DomHandler.findSingle(_scrollableView, 'table.p-treetable-scrollable-header-table');
|
|
2157
3206
|
|
|
2158
|
-
var _scrollableFooterTable =
|
|
3207
|
+
var _scrollableFooterTable = utils.DomHandler.findSingle(_scrollableView, 'table.p-treetable-scrollable-footer-table');
|
|
2159
3208
|
|
|
2160
3209
|
_scrollableBodyTable.style.width = _scrollableBodyTable.offsetWidth + delta + 'px';
|
|
2161
3210
|
_scrollableHeaderTable.style.width = _scrollableHeaderTable.offsetWidth + delta + 'px';
|
|
@@ -2164,7 +3213,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
2164
3213
|
_scrollableFooterTable.style.width = _scrollableHeaderTable.offsetWidth + delta + 'px';
|
|
2165
3214
|
}
|
|
2166
3215
|
|
|
2167
|
-
var _resizeColumnIndex =
|
|
3216
|
+
var _resizeColumnIndex = utils.DomHandler.index(this.resizeColumn);
|
|
2168
3217
|
|
|
2169
3218
|
this.resizeColGroup(_scrollableHeaderTable, _resizeColumnIndex, newColumnWidth, null);
|
|
2170
3219
|
this.resizeColGroup(_scrollableBodyTable, _resizeColumnIndex, newColumnWidth, null);
|
|
@@ -2187,7 +3236,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
2187
3236
|
this.resizerHelper.style.display = 'none';
|
|
2188
3237
|
this.resizeColumn = null;
|
|
2189
3238
|
this.resizeColumnProps = null;
|
|
2190
|
-
|
|
3239
|
+
utils.DomHandler.removeClass(this.container, 'p-unselectable-text');
|
|
2191
3240
|
this.unbindColumnResizeEvents();
|
|
2192
3241
|
}
|
|
2193
3242
|
}, {
|
|
@@ -2196,7 +3245,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
2196
3245
|
if (column) {
|
|
2197
3246
|
var parent = column.parentElement;
|
|
2198
3247
|
|
|
2199
|
-
while (parent && !
|
|
3248
|
+
while (parent && !utils.DomHandler.hasClass(parent, 'p-treetable-scrollable-view')) {
|
|
2200
3249
|
parent = parent.parentElement;
|
|
2201
3250
|
}
|
|
2202
3251
|
|
|
@@ -2259,8 +3308,8 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
2259
3308
|
return;
|
|
2260
3309
|
}
|
|
2261
3310
|
|
|
2262
|
-
this.iconWidth =
|
|
2263
|
-
this.iconHeight =
|
|
3311
|
+
this.iconWidth = utils.DomHandler.getHiddenElementOuterWidth(this.reorderIndicatorUp);
|
|
3312
|
+
this.iconHeight = utils.DomHandler.getHiddenElementOuterHeight(this.reorderIndicatorUp);
|
|
2264
3313
|
this.draggedColumnEl = this.findParentHeader(event.currentTarget);
|
|
2265
3314
|
this.draggedColumn = column;
|
|
2266
3315
|
event.dataTransfer.setData('text', 'b'); // Firefox requires this to make dragging possible
|
|
@@ -2273,8 +3322,8 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
2273
3322
|
|
|
2274
3323
|
if (this.props.reorderableColumns && this.draggedColumnEl && dropHeader) {
|
|
2275
3324
|
event.preventDefault();
|
|
2276
|
-
var containerOffset =
|
|
2277
|
-
var dropHeaderOffset =
|
|
3325
|
+
var containerOffset = utils.DomHandler.getOffset(this.container);
|
|
3326
|
+
var dropHeaderOffset = utils.DomHandler.getOffset(dropHeader);
|
|
2278
3327
|
|
|
2279
3328
|
if (this.draggedColumnEl !== dropHeader) {
|
|
2280
3329
|
var targetLeft = dropHeaderOffset.left - containerOffset.left; //let targetTop = containerOffset.top - dropHeaderOffset.top;
|
|
@@ -2319,8 +3368,8 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
2319
3368
|
event.preventDefault();
|
|
2320
3369
|
|
|
2321
3370
|
if (this.draggedColumnEl) {
|
|
2322
|
-
var dragIndex =
|
|
2323
|
-
var dropIndex =
|
|
3371
|
+
var dragIndex = utils.DomHandler.index(this.draggedColumnEl);
|
|
3372
|
+
var dropIndex = utils.DomHandler.index(this.findParentHeader(event.currentTarget));
|
|
2324
3373
|
var allowDrop = dragIndex !== dropIndex;
|
|
2325
3374
|
|
|
2326
3375
|
if (allowDrop && (dropIndex - dragIndex === 1 && this.dropPosition === -1 || dragIndex - dropIndex === 1 && this.dropPosition === 1)) {
|
|
@@ -2328,10 +3377,10 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
2328
3377
|
}
|
|
2329
3378
|
|
|
2330
3379
|
if (allowDrop) {
|
|
2331
|
-
var columns = this.state.columnOrder ? this.getColumns() : React__default[
|
|
3380
|
+
var columns = this.state.columnOrder ? this.getColumns() : React__default["default"].Children.toArray(this.props.children);
|
|
2332
3381
|
|
|
2333
3382
|
var isSameColumn = function isSameColumn(col1, col2) {
|
|
2334
|
-
return col1.props.columnKey || col2.props.columnKey ?
|
|
3383
|
+
return col1.props.columnKey || col2.props.columnKey ? utils.ObjectUtils.equals(col1, col2, 'props.columnKey') : utils.ObjectUtils.equals(col1, col2, 'props.field');
|
|
2335
3384
|
};
|
|
2336
3385
|
|
|
2337
3386
|
var dragColIndex = columns.findIndex(function (child) {
|
|
@@ -2349,7 +3398,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
2349
3398
|
dropColIndex--;
|
|
2350
3399
|
}
|
|
2351
3400
|
|
|
2352
|
-
|
|
3401
|
+
utils.ObjectUtils.reorderArray(columns, dragColIndex, dropColIndex);
|
|
2353
3402
|
var columnOrder = [];
|
|
2354
3403
|
|
|
2355
3404
|
var _iterator = _createForOfIteratorHelper(columns),
|
|
@@ -2455,7 +3504,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
2455
3504
|
}, {
|
|
2456
3505
|
key: "getColumns",
|
|
2457
3506
|
value: function getColumns() {
|
|
2458
|
-
var columns = React__default[
|
|
3507
|
+
var columns = React__default["default"].Children.toArray(this.props.children);
|
|
2459
3508
|
|
|
2460
3509
|
if (columns && columns.length) {
|
|
2461
3510
|
if (this.props.reorderableColumns && this.state.columnOrder) {
|
|
@@ -2564,7 +3613,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
2564
3613
|
value: function filterLocal(value) {
|
|
2565
3614
|
var filteredNodes = [];
|
|
2566
3615
|
var filters = this.getFilters();
|
|
2567
|
-
var columns = React__default[
|
|
3616
|
+
var columns = React__default["default"].Children.toArray(this.props.children);
|
|
2568
3617
|
var isStrictMode = this.props.filterMode === 'strict';
|
|
2569
3618
|
|
|
2570
3619
|
var _iterator5 = _createForOfIteratorHelper(value),
|
|
@@ -2703,7 +3752,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
2703
3752
|
isStrictMode = _ref.isStrictMode,
|
|
2704
3753
|
options = _ref.options;
|
|
2705
3754
|
var matched = false;
|
|
2706
|
-
var dataFieldValue =
|
|
3755
|
+
var dataFieldValue = utils.ObjectUtils.resolveFieldData(node.data, filterField);
|
|
2707
3756
|
|
|
2708
3757
|
if (filterConstraint(dataFieldValue, filterValue, this.props.filterLocale, options)) {
|
|
2709
3758
|
matched = true;
|
|
@@ -2749,7 +3798,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
2749
3798
|
}, {
|
|
2750
3799
|
key: "createTableHeader",
|
|
2751
3800
|
value: function createTableHeader(columns, columnGroup) {
|
|
2752
|
-
return /*#__PURE__*/React__default[
|
|
3801
|
+
return /*#__PURE__*/React__default["default"].createElement(TreeTableHeader, {
|
|
2753
3802
|
columns: columns,
|
|
2754
3803
|
columnGroup: columnGroup,
|
|
2755
3804
|
tabIndex: this.props.tabIndex,
|
|
@@ -2772,7 +3821,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
2772
3821
|
}, {
|
|
2773
3822
|
key: "createTableFooter",
|
|
2774
3823
|
value: function createTableFooter(columns, columnGroup) {
|
|
2775
|
-
return /*#__PURE__*/React__default[
|
|
3824
|
+
return /*#__PURE__*/React__default["default"].createElement(TreeTableFooter, {
|
|
2776
3825
|
columns: columns,
|
|
2777
3826
|
columnGroup: columnGroup
|
|
2778
3827
|
});
|
|
@@ -2780,7 +3829,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
2780
3829
|
}, {
|
|
2781
3830
|
key: "createTableBody",
|
|
2782
3831
|
value: function createTableBody(value, columns) {
|
|
2783
|
-
return /*#__PURE__*/React__default[
|
|
3832
|
+
return /*#__PURE__*/React__default["default"].createElement(TreeTableBody, {
|
|
2784
3833
|
value: value,
|
|
2785
3834
|
columns: columns,
|
|
2786
3835
|
expandedKeys: this.getExpandedKeys(),
|
|
@@ -2812,8 +3861,8 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
2812
3861
|
}, {
|
|
2813
3862
|
key: "createPaginator",
|
|
2814
3863
|
value: function createPaginator(position, totalRecords) {
|
|
2815
|
-
var className =
|
|
2816
|
-
return /*#__PURE__*/React__default[
|
|
3864
|
+
var className = utils.classNames('p-paginator-' + position, this.props.paginatorClassName);
|
|
3865
|
+
return /*#__PURE__*/React__default["default"].createElement(paginator.Paginator, {
|
|
2817
3866
|
first: this.getFirst(),
|
|
2818
3867
|
rows: this.getRows(),
|
|
2819
3868
|
pageLinkSize: this.props.pageLinkSize,
|
|
@@ -2835,7 +3884,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
2835
3884
|
var header = this.createTableHeader(columns, headerColumnGroup);
|
|
2836
3885
|
var footer = this.createTableFooter(columns, footerColumnGroup);
|
|
2837
3886
|
var body = this.createTableBody(value, columns);
|
|
2838
|
-
return /*#__PURE__*/React__default[
|
|
3887
|
+
return /*#__PURE__*/React__default["default"].createElement(TreeTableScrollableView, {
|
|
2839
3888
|
columns: columns,
|
|
2840
3889
|
header: header,
|
|
2841
3890
|
body: body,
|
|
@@ -2858,7 +3907,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
2858
3907
|
}
|
|
2859
3908
|
|
|
2860
3909
|
scrollableView = this.createScrollableView(value, scrollableColumns, false, this.props.headerColumnGroup, this.props.footerColumnGroup);
|
|
2861
|
-
return /*#__PURE__*/React__default[
|
|
3910
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2862
3911
|
className: "p-treetable-scrollable-wrapper"
|
|
2863
3912
|
}, frozenView, scrollableView);
|
|
2864
3913
|
}
|
|
@@ -2871,9 +3920,9 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
2871
3920
|
var header = this.createTableHeader(columns, this.props.headerColumnGroup);
|
|
2872
3921
|
var footer = this.createTableFooter(columns, this.props.footerColumnGroup);
|
|
2873
3922
|
var body = this.createTableBody(value, columns);
|
|
2874
|
-
return /*#__PURE__*/React__default[
|
|
3923
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2875
3924
|
className: "p-treetable-wrapper"
|
|
2876
|
-
}, /*#__PURE__*/React__default[
|
|
3925
|
+
}, /*#__PURE__*/React__default["default"].createElement("table", {
|
|
2877
3926
|
style: this.props.tableStyle,
|
|
2878
3927
|
className: this.props.tableClassName,
|
|
2879
3928
|
ref: function ref(el) {
|
|
@@ -2890,12 +3939,12 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
2890
3939
|
key: "renderLoader",
|
|
2891
3940
|
value: function renderLoader() {
|
|
2892
3941
|
if (this.props.loading) {
|
|
2893
|
-
var iconClassName =
|
|
2894
|
-
return /*#__PURE__*/React__default[
|
|
3942
|
+
var iconClassName = utils.classNames('p-treetable-loading-icon pi-spin', this.props.loadingIcon);
|
|
3943
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2895
3944
|
className: "p-treetable-loading"
|
|
2896
|
-
}, /*#__PURE__*/React__default[
|
|
3945
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2897
3946
|
className: "p-treetable-loading-overlay p-component-overlay"
|
|
2898
|
-
}, /*#__PURE__*/React__default[
|
|
3947
|
+
}, /*#__PURE__*/React__default["default"].createElement("i", {
|
|
2899
3948
|
className: iconClassName
|
|
2900
3949
|
})));
|
|
2901
3950
|
}
|
|
@@ -2908,7 +3957,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
2908
3957
|
var _this7 = this;
|
|
2909
3958
|
|
|
2910
3959
|
var value = this.processValue();
|
|
2911
|
-
var className =
|
|
3960
|
+
var className = utils.classNames('p-treetable p-component', {
|
|
2912
3961
|
'p-treetable-hoverable-rows': this.isRowSelectionMode(),
|
|
2913
3962
|
'p-treetable-resizable': this.props.resizableColumns,
|
|
2914
3963
|
'p-treetable-resizable-fit': this.props.resizableColumns && this.props.columnResizeMode === 'fit',
|
|
@@ -2918,16 +3967,16 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
2918
3967
|
}, this.props.className);
|
|
2919
3968
|
var table = this.renderTable(value);
|
|
2920
3969
|
var totalRecords = this.getTotalRecords(value);
|
|
2921
|
-
var headerFacet = this.props.header && /*#__PURE__*/React__default[
|
|
3970
|
+
var headerFacet = this.props.header && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2922
3971
|
className: "p-treetable-header"
|
|
2923
3972
|
}, this.props.header);
|
|
2924
|
-
var footerFacet = this.props.footer && /*#__PURE__*/React__default[
|
|
3973
|
+
var footerFacet = this.props.footer && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2925
3974
|
className: "p-treetable-footer"
|
|
2926
3975
|
}, this.props.footer);
|
|
2927
3976
|
var paginatorTop = this.props.paginator && this.props.paginatorPosition !== 'bottom' && this.createPaginator('top', totalRecords);
|
|
2928
3977
|
var paginatorBottom = this.props.paginator && this.props.paginatorPosition !== 'top' && this.createPaginator('bottom', totalRecords);
|
|
2929
3978
|
var loader = this.renderLoader();
|
|
2930
|
-
var resizeHelper = this.props.resizableColumns && /*#__PURE__*/React__default[
|
|
3979
|
+
var resizeHelper = this.props.resizableColumns && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2931
3980
|
ref: function ref(el) {
|
|
2932
3981
|
_this7.resizerHelper = el;
|
|
2933
3982
|
},
|
|
@@ -2936,7 +3985,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
2936
3985
|
display: 'none'
|
|
2937
3986
|
}
|
|
2938
3987
|
});
|
|
2939
|
-
var reorderIndicatorUp = this.props.reorderableColumns && /*#__PURE__*/React__default[
|
|
3988
|
+
var reorderIndicatorUp = this.props.reorderableColumns && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2940
3989
|
ref: function ref(el) {
|
|
2941
3990
|
return _this7.reorderIndicatorUp = el;
|
|
2942
3991
|
},
|
|
@@ -2946,7 +3995,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
2946
3995
|
display: 'none'
|
|
2947
3996
|
}
|
|
2948
3997
|
});
|
|
2949
|
-
var reorderIndicatorDown = this.props.reorderableColumns && /*#__PURE__*/React__default[
|
|
3998
|
+
var reorderIndicatorDown = this.props.reorderableColumns && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2950
3999
|
ref: function ref(el) {
|
|
2951
4000
|
return _this7.reorderIndicatorDown = el;
|
|
2952
4001
|
},
|
|
@@ -2956,7 +4005,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
2956
4005
|
display: 'none'
|
|
2957
4006
|
}
|
|
2958
4007
|
});
|
|
2959
|
-
return /*#__PURE__*/React__default[
|
|
4008
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2960
4009
|
id: this.props.id,
|
|
2961
4010
|
className: className,
|
|
2962
4011
|
style: this.props.style,
|
|
@@ -3024,7 +4073,7 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
3024
4073
|
frozenWidth: null,
|
|
3025
4074
|
resizableColumns: false,
|
|
3026
4075
|
columnResizeMode: 'fit',
|
|
3027
|
-
emptyMessage:
|
|
4076
|
+
emptyMessage: null,
|
|
3028
4077
|
filters: null,
|
|
3029
4078
|
globalFilter: null,
|
|
3030
4079
|
filterMode: 'lenient',
|
|
@@ -3054,4 +4103,4 @@ this.primereact.treetable = (function (exports, React, api, core, paginator, inp
|
|
|
3054
4103
|
|
|
3055
4104
|
return exports;
|
|
3056
4105
|
|
|
3057
|
-
}({}, React, primereact.api, primereact.
|
|
4106
|
+
})({}, React, primereact.api, primereact.utils, primereact.paginator, primereact.inputtext, primereact.overlayservice, primereact.ripple);
|