primereact 7.0.0-rc.2 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/README.md +35 -10
- package/accordion/accordion.cjs.js +55 -42
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +7 -3
- package/accordion/accordion.esm.js +42 -29
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +55 -43
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +109 -52
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +96 -61
- package/api/api.esm.js +96 -39
- package/api/api.esm.min.js +1 -1
- package/api/api.js +110 -53
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +97 -89
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +11 -4
- package/autocomplete/autocomplete.esm.js +34 -26
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +93 -90
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +21 -20
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.d.ts +2 -1
- package/avatar/avatar.esm.js +16 -15
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +22 -21
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.cjs.js +14 -14
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.esm.js +12 -12
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +15 -15
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/badge.cjs.js +14 -14
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +12 -12
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +15 -15
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +38 -27
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +28 -18
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +37 -28
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +27 -27
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +12 -12
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +28 -28
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +44 -55
- package/button/button.cjs.min.js +1 -1
- package/button/button.d.ts +4 -11
- package/button/button.esm.js +33 -44
- package/button/button.esm.min.js +1 -1
- package/button/button.js +43 -56
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +209 -170
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +7 -2
- package/calendar/calendar.esm.js +84 -45
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +205 -171
- package/calendar/calendar.min.css +1 -1
- package/calendar/calendar.min.js +1 -1
- package/captcha/captcha.cjs.js +12 -12
- package/captcha/captcha.cjs.min.js +1 -1
- package/captcha/captcha.esm.js +11 -11
- package/captcha/captcha.esm.min.js +1 -1
- package/captcha/captcha.js +13 -13
- package/captcha/captcha.min.js +1 -1
- package/card/card.cjs.js +24 -24
- package/card/card.cjs.min.js +1 -1
- package/card/card.esm.js +12 -12
- package/card/card.esm.min.js +1 -1
- package/card/card.js +25 -25
- package/card/card.min.js +1 -1
- package/carousel/carousel.cjs.js +60 -58
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +24 -23
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +59 -59
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +65 -61
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +2 -1
- package/cascadeselect/cascadeselect.esm.js +21 -17
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +62 -62
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +19 -21
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +14 -14
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +18 -18
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +33 -28
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +2 -1
- package/checkbox/checkbox.esm.js +26 -21
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +33 -29
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +27 -25
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +3 -4
- package/chip/chip.esm.js +22 -20
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +28 -26
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +59 -33
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +10 -0
- package/chips/chips.esm.js +50 -24
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +59 -34
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +50 -46
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +20 -6
- package/colorpicker/colorpicker.esm.js +22 -18
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +47 -47
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.cjs.js +31 -12
- package/column/column.cjs.min.js +1 -1
- package/column/column.d.ts +28 -2
- package/column/column.esm.js +31 -12
- package/column/column.esm.min.js +1 -1
- package/column/column.js +32 -13
- package/column/column.min.js +1 -1
- package/columngroup/columngroup.cjs.js +28 -12
- package/columngroup/columngroup.cjs.min.js +1 -1
- package/columngroup/columngroup.esm.js +28 -12
- package/columngroup/columngroup.esm.min.js +1 -1
- package/columngroup/columngroup.js +29 -13
- package/columngroup/columngroup.min.js +1 -1
- package/confirmdialog/confirmdialog.cjs.js +35 -33
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +4 -3
- package/confirmdialog/confirmdialog.esm.js +19 -17
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +35 -34
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +60 -55
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.d.ts +6 -4
- package/confirmpopup/confirmpopup.esm.js +26 -22
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +57 -55
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +81 -76
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +2 -1
- package/contextmenu/contextmenu.esm.js +48 -44
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +78 -77
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +11284 -852
- package/core/core.min.js +40 -1
- package/csstransition/csstransition.cjs.js +62 -32
- package/csstransition/csstransition.cjs.min.js +1 -1
- package/csstransition/csstransition.d.ts +8 -0
- package/csstransition/csstransition.esm.js +61 -32
- package/csstransition/csstransition.esm.min.js +1 -1
- package/csstransition/csstransition.js +62 -34
- package/csstransition/csstransition.min.js +1 -1
- package/csstransition/package.json +2 -1
- package/datascroller/datascroller.cjs.js +23 -22
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.esm.js +15 -14
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +23 -23
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +838 -632
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +38 -14
- package/datatable/datatable.esm.js +575 -369
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +835 -633
- package/datatable/datatable.min.css +1 -1
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +43 -40
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +17 -14
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +42 -41
- package/dataview/dataview.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +12 -12
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.esm.js +11 -11
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +13 -13
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +78 -73
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +3 -1
- package/dialog/dialog.esm.js +31 -27
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +75 -74
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +15 -15
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +12 -12
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +16 -16
- package/divider/divider.min.js +1 -1
- package/dock/dock.cjs.js +62 -28
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.d.ts +13 -0
- package/dock/dock.esm.js +50 -16
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +62 -29
- package/dock/dock.min.css +1 -1
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +120 -98
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +2 -1
- package/dropdown/dropdown.esm.js +58 -36
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +116 -99
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +58 -56
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.d.ts +1 -0
- package/editor/editor.esm.js +22 -18
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +57 -53
- package/editor/editor.min.js +1 -1
- package/fieldset/fieldset.cjs.js +31 -29
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.d.ts +2 -1
- package/fieldset/fieldset.esm.js +17 -15
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +30 -30
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +79 -69
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +4 -1
- package/fileupload/fileupload.esm.js +40 -30
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +79 -70
- package/fileupload/fileupload.min.js +1 -1
- package/fullcalendar/fullcalendar.cjs.js +17 -19
- package/fullcalendar/fullcalendar.cjs.min.js +1 -1
- package/fullcalendar/fullcalendar.esm.js +12 -12
- package/fullcalendar/fullcalendar.esm.min.js +1 -1
- package/fullcalendar/fullcalendar.js +16 -16
- package/fullcalendar/fullcalendar.min.js +1 -1
- package/galleria/galleria.cjs.js +85 -81
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.d.ts +2 -1
- package/galleria/galleria.esm.js +21 -18
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +82 -82
- package/galleria/galleria.min.js +1 -1
- package/gmap/gmap.cjs.js +13 -13
- package/gmap/gmap.cjs.min.js +1 -1
- package/gmap/gmap.esm.js +12 -12
- package/gmap/gmap.esm.min.js +1 -1
- package/gmap/gmap.js +14 -14
- package/gmap/gmap.min.js +1 -1
- package/image/image.cjs.js +69 -44
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +6 -5
- package/image/image.esm.js +44 -20
- package/image/image.esm.min.js +1 -1
- package/image/image.js +67 -45
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +19 -19
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +12 -12
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +20 -20
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +24 -23
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.d.ts +1 -1
- package/inputmask/inputmask.esm.js +17 -16
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +24 -24
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +90 -63
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +4 -4
- package/inputnumber/inputnumber.esm.js +73 -46
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +89 -64
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +28 -25
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +21 -18
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +28 -26
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +25 -23
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.d.ts +1 -1
- package/inputtext/inputtext.esm.js +16 -14
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +24 -24
- package/inputtext/inputtext.min.css +1 -1
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +23 -22
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.d.ts +1 -1
- package/inputtextarea/inputtextarea.esm.js +15 -14
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +23 -23
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/keyfilter/keyfilter.cjs.js +9 -6
- package/keyfilter/keyfilter.cjs.min.js +1 -1
- package/keyfilter/keyfilter.esm.js +5 -2
- package/keyfilter/keyfilter.esm.min.js +1 -1
- package/keyfilter/keyfilter.js +10 -7
- package/keyfilter/keyfilter.min.js +1 -1
- package/knob/knob.cjs.js +18 -18
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +12 -12
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +19 -19
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +52 -50
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +17 -15
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +51 -51
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +47 -46
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +13 -12
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +47 -47
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +69 -62
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.d.ts +2 -1
- package/mention/mention.esm.js +25 -19
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +64 -63
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +45 -40
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +4 -1
- package/menu/menu.esm.js +19 -15
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +42 -41
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +49 -46
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +15 -13
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +48 -47
- package/menubar/menubar.min.css +1 -1
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +20 -19
- package/message/message.cjs.min.js +1 -1
- package/message/message.d.ts +3 -1
- package/message/message.esm.js +14 -13
- package/message/message.esm.min.js +1 -1
- package/message/message.js +21 -20
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +30 -28
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +2 -1
- package/messages/messages.esm.js +14 -12
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +29 -29
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +148 -136
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +5 -2
- package/multiselect/multiselect.esm.js +64 -52
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +144 -137
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +27 -26
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +2 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +15 -14
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +27 -27
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +46 -45
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +13 -12
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +46 -46
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +37 -37
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +12 -12
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +38 -38
- package/organizationchart/organizationchart.min.css +1 -1
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +45 -42
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +3 -2
- package/overlaypanel/overlaypanel.esm.js +23 -21
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +41 -43
- 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 +61 -60
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +15 -14
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +61 -61
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +35 -32
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.d.ts +5 -3
- package/panel/panel.esm.js +20 -17
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +34 -33
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +53 -52
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +2 -1
- package/panelmenu/panelmenu.esm.js +15 -14
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +53 -53
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/password.cjs.js +47 -43
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +3 -2
- package/password/password.esm.js +21 -17
- package/password/password.esm.min.js +1 -1
- package/password/password.js +44 -44
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +69 -65
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +25 -21
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +69 -66
- package/picklist/picklist.min.js +1 -1
- package/portal/portal.cjs.js +17 -20
- package/portal/portal.cjs.min.js +1 -1
- package/portal/portal.esm.js +15 -18
- package/portal/portal.esm.min.js +1 -1
- package/portal/portal.js +18 -22
- package/portal/portal.min.js +1 -1
- package/primereact.all.cjs.js +3793 -2921
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +2567 -1694
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +3792 -2918
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +20 -20
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +12 -12
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +21 -21
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/progressspinner.cjs.js +16 -16
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +12 -12
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +17 -17
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +23 -22
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +15 -14
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +23 -23
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +23 -22
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +17 -16
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +23 -23
- package/rating/rating.min.js +1 -1
- package/resources/primereact.css +216 -140
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +94 -42
- package/resources/themes/arya-green/theme.css +94 -42
- package/resources/themes/arya-orange/theme.css +94 -42
- package/resources/themes/arya-purple/theme.css +94 -42
- package/resources/themes/bootstrap4-dark-blue/theme.css +75 -30
- package/resources/themes/bootstrap4-dark-purple/theme.css +75 -30
- package/resources/themes/bootstrap4-light-blue/theme.css +74 -29
- package/resources/themes/bootstrap4-light-purple/theme.css +74 -29
- package/resources/themes/fluent-light/theme.css +94 -42
- 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 +5707 -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 +5707 -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 +5707 -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 +5707 -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 +5707 -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 +5707 -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 +5707 -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 +5707 -0
- package/resources/themes/luna-amber/theme.css +91 -46
- package/resources/themes/luna-blue/theme.css +91 -46
- package/resources/themes/luna-green/theme.css +91 -46
- package/resources/themes/luna-pink/theme.css +91 -46
- package/resources/themes/md-dark-deeppurple/theme.css +265 -53
- package/resources/themes/md-dark-indigo/theme.css +265 -53
- package/resources/themes/md-light-deeppurple/theme.css +265 -53
- package/resources/themes/md-light-indigo/theme.css +265 -53
- package/resources/themes/mdc-dark-deeppurple/theme.css +265 -53
- package/resources/themes/mdc-dark-indigo/theme.css +265 -53
- package/resources/themes/mdc-light-deeppurple/theme.css +265 -53
- package/resources/themes/mdc-light-indigo/theme.css +265 -53
- package/resources/themes/nova/theme.css +91 -46
- package/resources/themes/nova-accent/theme.css +91 -46
- package/resources/themes/nova-alt/theme.css +91 -46
- package/resources/themes/rhea/theme.css +91 -46
- package/resources/themes/saga-blue/theme.css +77 -25
- package/resources/themes/saga-green/theme.css +77 -25
- package/resources/themes/saga-orange/theme.css +77 -25
- package/resources/themes/saga-purple/theme.css +77 -25
- package/resources/themes/tailwind-light/theme.css +101 -49
- package/resources/themes/vela-blue/theme.css +94 -42
- package/resources/themes/vela-green/theme.css +94 -42
- package/resources/themes/vela-orange/theme.css +94 -42
- package/resources/themes/vela-purple/theme.css +94 -42
- package/ripple/ripple.cjs.js +22 -22
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +14 -14
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +23 -23
- package/ripple/ripple.min.js +1 -1
- package/row/row.cjs.js +12 -12
- package/row/row.cjs.min.js +1 -1
- package/row/row.esm.js +11 -11
- package/row/row.esm.min.js +1 -1
- package/row/row.js +13 -13
- package/row/row.min.js +1 -1
- package/scrollpanel/scrollpanel.cjs.js +30 -30
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +12 -12
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +31 -31
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +30 -25
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.d.ts +4 -2
- package/scrolltop/scrolltop.esm.js +21 -17
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +28 -26
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +31 -29
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +17 -15
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +30 -30
- package/selectbutton/selectbutton.min.js +1 -1
- package/selectitem/selectitem.d.ts +3 -1
- package/sidebar/sidebar.cjs.js +154 -127
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +4 -1
- package/sidebar/sidebar.esm.js +145 -119
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +151 -128
- package/sidebar/sidebar.min.css +1 -1
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +14 -14
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +12 -12
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +15 -15
- package/skeleton/skeleton.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +49 -44
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +2 -1
- package/slidemenu/slidemenu.esm.js +19 -15
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +46 -45
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +40 -30
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +32 -22
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +41 -31
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +33 -32
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.d.ts +3 -2
- package/speeddial/speeddial.esm.js +15 -14
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +33 -33
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +58 -50
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +8 -6
- package/splitbutton/splitbutton.esm.js +28 -20
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +55 -51
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +31 -31
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +14 -14
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +32 -32
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +21 -21
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +12 -12
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +22 -22
- package/steps/steps.min.js +1 -1
- package/styleclass/styleclass.cjs.js +28 -28
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.esm.js +12 -12
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +29 -29
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +27 -26
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +13 -12
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +27 -27
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +224 -79
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +12 -1
- package/tabview/tabview.esm.js +194 -49
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +224 -80
- package/tabview/tabview.min.css +1 -1
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +20 -19
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.d.ts +2 -1
- package/tag/tag.esm.js +16 -15
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +21 -20
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +23 -23
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +12 -12
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +24 -24
- 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 +54 -48
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +2 -1
- package/tieredmenu/tieredmenu.esm.js +20 -15
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +50 -49
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +23 -23
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +12 -12
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +24 -24
- package/timeline/timeline.min.js +1 -1
- package/toast/toast.cjs.js +72 -55
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +5 -1
- package/toast/toast.esm.js +46 -30
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +69 -56
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +27 -22
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.d.ts +3 -2
- package/togglebutton/togglebutton.esm.js +21 -16
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +26 -23
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +18 -18
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +12 -12
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +19 -19
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +78 -49
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.d.ts +0 -1
- package/tooltip/tooltip.esm.js +49 -21
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +77 -50
- 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 +69 -68
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +14 -3
- package/tree/tree.esm.js +19 -18
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +69 -69
- package/tree/tree.min.js +1 -1
- package/treenode/treenode.d.ts +4 -1
- package/treeselect/treeselect.cjs.js +66 -62
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +11 -3
- package/treeselect/treeselect.esm.js +26 -22
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +63 -63
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +1393 -330
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +11 -3
- package/treetable/treetable.esm.js +1303 -240
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +1392 -331
- package/treetable/treetable.min.css +1 -1
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +24 -23
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +15 -14
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +24 -24
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +174 -51
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +18 -0
- package/utils/utils.esm.js +173 -51
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +175 -52
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +79 -53
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +64 -38
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +80 -54
- package/virtualscroller/virtualscroller.min.css +1 -1
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +45 -8
- 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
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var
|
|
6
|
+
var utils = require('primereact/utils');
|
|
7
|
+
var csstransition = require('primereact/csstransition');
|
|
8
|
+
var ripple = require('primereact/ripple');
|
|
9
|
+
var overlayservice = require('primereact/overlayservice');
|
|
10
|
+
var portal = require('primereact/portal');
|
|
7
11
|
var PrimeReact = require('primereact/api');
|
|
8
12
|
|
|
9
13
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -30,6 +34,9 @@ function _defineProperties(target, props) {
|
|
|
30
34
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
31
35
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
32
36
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
37
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
38
|
+
writable: false
|
|
39
|
+
});
|
|
33
40
|
return Constructor;
|
|
34
41
|
}
|
|
35
42
|
|
|
@@ -62,23 +69,20 @@ function _inherits(subClass, superClass) {
|
|
|
62
69
|
configurable: true
|
|
63
70
|
}
|
|
64
71
|
});
|
|
72
|
+
Object.defineProperty(subClass, "prototype", {
|
|
73
|
+
writable: false
|
|
74
|
+
});
|
|
65
75
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
66
76
|
}
|
|
67
77
|
|
|
68
78
|
function _typeof(obj) {
|
|
69
79
|
"@babel/helpers - typeof";
|
|
70
80
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
_typeof = function _typeof(obj) {
|
|
77
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
return _typeof(obj);
|
|
81
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
82
|
+
return typeof obj;
|
|
83
|
+
} : function (obj) {
|
|
84
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
85
|
+
}, _typeof(obj);
|
|
82
86
|
}
|
|
83
87
|
|
|
84
88
|
function _possibleConstructorReturn(self, call) {
|
|
@@ -113,7 +117,7 @@ function _defineProperty(obj, key, value) {
|
|
|
113
117
|
return obj;
|
|
114
118
|
}
|
|
115
119
|
|
|
116
|
-
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
|
|
120
|
+
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; } } }; }
|
|
117
121
|
|
|
118
122
|
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); }
|
|
119
123
|
|
|
@@ -183,12 +187,12 @@ var CascadeSelectSub = /*#__PURE__*/function (_Component) {
|
|
|
183
187
|
key: "position",
|
|
184
188
|
value: function position() {
|
|
185
189
|
var parentItem = this.element.parentElement;
|
|
186
|
-
var containerOffset =
|
|
187
|
-
var viewport =
|
|
188
|
-
var sublistWidth = this.element.offsetParent ? this.element.offsetWidth :
|
|
189
|
-
var itemOuterWidth =
|
|
190
|
+
var containerOffset = utils.DomHandler.getOffset(parentItem);
|
|
191
|
+
var viewport = utils.DomHandler.getViewport();
|
|
192
|
+
var sublistWidth = this.element.offsetParent ? this.element.offsetWidth : utils.DomHandler.getHiddenElementOuterWidth(this.element);
|
|
193
|
+
var itemOuterWidth = utils.DomHandler.getOuterWidth(parentItem.children[0]);
|
|
190
194
|
|
|
191
|
-
if (parseInt(containerOffset.left, 10) + itemOuterWidth + sublistWidth > viewport.width -
|
|
195
|
+
if (parseInt(containerOffset.left, 10) + itemOuterWidth + sublistWidth > viewport.width - utils.DomHandler.calculateScrollbarWidth()) {
|
|
192
196
|
this.element.style.left = '-100%';
|
|
193
197
|
}
|
|
194
198
|
}
|
|
@@ -272,13 +276,13 @@ var CascadeSelectSub = /*#__PURE__*/function (_Component) {
|
|
|
272
276
|
key: "findNextItem",
|
|
273
277
|
value: function findNextItem(item) {
|
|
274
278
|
var nextItem = item.nextElementSibling;
|
|
275
|
-
if (nextItem) return
|
|
279
|
+
if (nextItem) return utils.DomHandler.hasClass(nextItem, 'p-disabled') || !utils.DomHandler.hasClass(nextItem, 'p-cascadeselect-item') ? this.findNextItem(nextItem) : nextItem;else return null;
|
|
276
280
|
}
|
|
277
281
|
}, {
|
|
278
282
|
key: "findPrevItem",
|
|
279
283
|
value: function findPrevItem(item) {
|
|
280
284
|
var prevItem = item.previousElementSibling;
|
|
281
|
-
if (prevItem) return
|
|
285
|
+
if (prevItem) return utils.DomHandler.hasClass(prevItem, 'p-disabled') || !utils.DomHandler.hasClass(prevItem, 'p-cascadeselect-item') ? this.findPrevItem(prevItem) : prevItem;else return null;
|
|
282
286
|
}
|
|
283
287
|
}, {
|
|
284
288
|
key: "onOptionClick",
|
|
@@ -313,22 +317,22 @@ var CascadeSelectSub = /*#__PURE__*/function (_Component) {
|
|
|
313
317
|
}, {
|
|
314
318
|
key: "getOptionLabel",
|
|
315
319
|
value: function getOptionLabel(option) {
|
|
316
|
-
return this.props.optionLabel ?
|
|
320
|
+
return this.props.optionLabel ? utils.ObjectUtils.resolveFieldData(option, this.props.optionLabel) : option;
|
|
317
321
|
}
|
|
318
322
|
}, {
|
|
319
323
|
key: "getOptionValue",
|
|
320
324
|
value: function getOptionValue(option) {
|
|
321
|
-
return this.props.optionValue ?
|
|
325
|
+
return this.props.optionValue ? utils.ObjectUtils.resolveFieldData(option, this.props.optionValue) : option;
|
|
322
326
|
}
|
|
323
327
|
}, {
|
|
324
328
|
key: "getOptionGroupLabel",
|
|
325
329
|
value: function getOptionGroupLabel(optionGroup) {
|
|
326
|
-
return this.props.optionGroupLabel ?
|
|
330
|
+
return this.props.optionGroupLabel ? utils.ObjectUtils.resolveFieldData(optionGroup, this.props.optionGroupLabel) : null;
|
|
327
331
|
}
|
|
328
332
|
}, {
|
|
329
333
|
key: "getOptionGroupChildren",
|
|
330
334
|
value: function getOptionGroupChildren(optionGroup) {
|
|
331
|
-
return
|
|
335
|
+
return utils.ObjectUtils.resolveFieldData(optionGroup, this.props.optionGroupChildren[this.props.level]);
|
|
332
336
|
}
|
|
333
337
|
}, {
|
|
334
338
|
key: "isOptionGroup",
|
|
@@ -344,7 +348,7 @@ var CascadeSelectSub = /*#__PURE__*/function (_Component) {
|
|
|
344
348
|
key: "renderSubmenu",
|
|
345
349
|
value: function renderSubmenu(option) {
|
|
346
350
|
if (this.isOptionGroup(option) && this.state.activeOption === option) {
|
|
347
|
-
return /*#__PURE__*/React__default[
|
|
351
|
+
return /*#__PURE__*/React__default["default"].createElement(CascadeSelectSub, {
|
|
348
352
|
options: this.getOptionGroupChildren(option),
|
|
349
353
|
className: "p-cascadeselect-sublist",
|
|
350
354
|
selectionPath: this.props.selectionPath,
|
|
@@ -369,23 +373,23 @@ var CascadeSelectSub = /*#__PURE__*/function (_Component) {
|
|
|
369
373
|
value: function renderOption(option, index) {
|
|
370
374
|
var _this2 = this;
|
|
371
375
|
|
|
372
|
-
var className =
|
|
376
|
+
var className = utils.classNames('p-cascadeselect-item', {
|
|
373
377
|
'p-cascadeselect-item-group': this.isOptionGroup(option),
|
|
374
378
|
'p-cascadeselect-item-active p-highlight': this.state.activeOption === option
|
|
375
379
|
}, option.className);
|
|
376
380
|
var submenu = this.renderSubmenu(option);
|
|
377
|
-
var content = this.props.template ?
|
|
381
|
+
var content = this.props.template ? utils.ObjectUtils.getJSXElement(this.props.template, this.getOptionValue(option)) : /*#__PURE__*/React__default["default"].createElement("span", {
|
|
378
382
|
className: "p-cascadeselect-item-text"
|
|
379
383
|
}, this.getOptionLabelToRender(option));
|
|
380
|
-
var optionGroup = this.isOptionGroup(option) && /*#__PURE__*/React__default[
|
|
384
|
+
var optionGroup = this.isOptionGroup(option) && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
381
385
|
className: "p-cascadeselect-group-icon pi pi-angle-right"
|
|
382
386
|
});
|
|
383
|
-
return /*#__PURE__*/React__default[
|
|
387
|
+
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
384
388
|
key: this.getOptionLabelToRender(option) + '_' + index,
|
|
385
389
|
className: className,
|
|
386
390
|
style: option.style,
|
|
387
391
|
role: "none"
|
|
388
|
-
}, /*#__PURE__*/React__default[
|
|
392
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
389
393
|
className: "p-cascadeselect-item-content",
|
|
390
394
|
onClick: function onClick(event) {
|
|
391
395
|
return _this2.onOptionClick(event, option);
|
|
@@ -394,7 +398,7 @@ var CascadeSelectSub = /*#__PURE__*/function (_Component) {
|
|
|
394
398
|
onKeyDown: function onKeyDown(event) {
|
|
395
399
|
return _this2.onKeyDown(event, option);
|
|
396
400
|
}
|
|
397
|
-
}, content, optionGroup, /*#__PURE__*/React__default[
|
|
401
|
+
}, content, optionGroup, /*#__PURE__*/React__default["default"].createElement(ripple.Ripple, null)), submenu);
|
|
398
402
|
}
|
|
399
403
|
}, {
|
|
400
404
|
key: "renderMenu",
|
|
@@ -414,9 +418,9 @@ var CascadeSelectSub = /*#__PURE__*/function (_Component) {
|
|
|
414
418
|
value: function render() {
|
|
415
419
|
var _this4 = this;
|
|
416
420
|
|
|
417
|
-
var className =
|
|
421
|
+
var className = utils.classNames('p-cascadeselect-panel p-cascadeselect-items', this.props.className);
|
|
418
422
|
var submenu = this.renderMenu();
|
|
419
|
-
return /*#__PURE__*/React__default[
|
|
423
|
+
return /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
420
424
|
ref: function ref(el) {
|
|
421
425
|
return _this4.element = el;
|
|
422
426
|
},
|
|
@@ -447,7 +451,7 @@ _defineProperty(CascadeSelectSub, "defaultProps", {
|
|
|
447
451
|
onOptionGroupSelect: null
|
|
448
452
|
});
|
|
449
453
|
|
|
450
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(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
|
|
454
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(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; } } }; }
|
|
451
455
|
|
|
452
456
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(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(o, minLen); }
|
|
453
457
|
|
|
@@ -516,17 +520,17 @@ var CascadeSelect = /*#__PURE__*/function (_Component) {
|
|
|
516
520
|
}, {
|
|
517
521
|
key: "getOptionLabel",
|
|
518
522
|
value: function getOptionLabel(option) {
|
|
519
|
-
return this.props.optionLabel ?
|
|
523
|
+
return this.props.optionLabel ? utils.ObjectUtils.resolveFieldData(option, this.props.optionLabel) : option;
|
|
520
524
|
}
|
|
521
525
|
}, {
|
|
522
526
|
key: "getOptionValue",
|
|
523
527
|
value: function getOptionValue(option) {
|
|
524
|
-
return this.props.optionValue ?
|
|
528
|
+
return this.props.optionValue ? utils.ObjectUtils.resolveFieldData(option, this.props.optionValue) : option;
|
|
525
529
|
}
|
|
526
530
|
}, {
|
|
527
531
|
key: "getOptionGroupChildren",
|
|
528
532
|
value: function getOptionGroupChildren(optionGroup, level) {
|
|
529
|
-
return
|
|
533
|
+
return utils.ObjectUtils.resolveFieldData(optionGroup, this.props.optionGroupChildren[level]);
|
|
530
534
|
}
|
|
531
535
|
}, {
|
|
532
536
|
key: "isOptionGroup",
|
|
@@ -584,7 +588,7 @@ var CascadeSelect = /*#__PURE__*/function (_Component) {
|
|
|
584
588
|
} finally {
|
|
585
589
|
_iterator2.f();
|
|
586
590
|
}
|
|
587
|
-
} else if (
|
|
591
|
+
} else if (utils.ObjectUtils.equals(this.props.value, this.getOptionValue(option), this.props.dataKey)) {
|
|
588
592
|
return [option];
|
|
589
593
|
}
|
|
590
594
|
|
|
@@ -630,7 +634,7 @@ var CascadeSelect = /*#__PURE__*/function (_Component) {
|
|
|
630
634
|
//down
|
|
631
635
|
case 40:
|
|
632
636
|
if (this.state.overlayVisible) {
|
|
633
|
-
|
|
637
|
+
utils.DomHandler.findSingle(this.overlayRef.current, '.p-cascadeselect-item').children[0].focus();
|
|
634
638
|
} else if (event.altKey && this.props.options && this.props.options.length) {
|
|
635
639
|
this.show();
|
|
636
640
|
}
|
|
@@ -653,7 +657,7 @@ var CascadeSelect = /*#__PURE__*/function (_Component) {
|
|
|
653
657
|
}, {
|
|
654
658
|
key: "onPanelClick",
|
|
655
659
|
value: function onPanelClick(event) {
|
|
656
|
-
|
|
660
|
+
overlayservice.OverlayService.emit('overlay-click', {
|
|
657
661
|
originalEvent: event,
|
|
658
662
|
target: this.container
|
|
659
663
|
});
|
|
@@ -687,7 +691,7 @@ var CascadeSelect = /*#__PURE__*/function (_Component) {
|
|
|
687
691
|
}, {
|
|
688
692
|
key: "onOverlayEnter",
|
|
689
693
|
value: function onOverlayEnter() {
|
|
690
|
-
|
|
694
|
+
utils.ZIndexUtils.set('overlay', this.overlayRef.current, PrimeReact__default["default"].autoZIndex, PrimeReact__default["default"].zIndex['overlay']);
|
|
691
695
|
this.alignOverlay();
|
|
692
696
|
}
|
|
693
697
|
}, {
|
|
@@ -709,13 +713,13 @@ var CascadeSelect = /*#__PURE__*/function (_Component) {
|
|
|
709
713
|
}, {
|
|
710
714
|
key: "onOverlayExited",
|
|
711
715
|
value: function onOverlayExited() {
|
|
712
|
-
|
|
716
|
+
utils.ZIndexUtils.clear(this.overlayRef.current);
|
|
713
717
|
this.props.onHide && this.props.onHide();
|
|
714
718
|
}
|
|
715
719
|
}, {
|
|
716
720
|
key: "alignOverlay",
|
|
717
721
|
value: function alignOverlay() {
|
|
718
|
-
|
|
722
|
+
utils.DomHandler.alignOverlay(this.overlayRef.current, this.label.parentElement, this.props.appendTo || PrimeReact__default["default"].appendTo);
|
|
719
723
|
}
|
|
720
724
|
}, {
|
|
721
725
|
key: "bindOutsideClickListener",
|
|
@@ -746,7 +750,7 @@ var CascadeSelect = /*#__PURE__*/function (_Component) {
|
|
|
746
750
|
var _this4 = this;
|
|
747
751
|
|
|
748
752
|
if (!this.scrollHandler) {
|
|
749
|
-
this.scrollHandler = new
|
|
753
|
+
this.scrollHandler = new utils.ConnectedOverlayScrollHandler(this.container, function () {
|
|
750
754
|
if (_this4.state.overlayVisible) {
|
|
751
755
|
_this4.hide();
|
|
752
756
|
}
|
|
@@ -769,7 +773,7 @@ var CascadeSelect = /*#__PURE__*/function (_Component) {
|
|
|
769
773
|
|
|
770
774
|
if (!this.resizeListener) {
|
|
771
775
|
this.resizeListener = function () {
|
|
772
|
-
if (_this5.state.overlayVisible && !
|
|
776
|
+
if (_this5.state.overlayVisible && !utils.DomHandler.isTouchDevice()) {
|
|
773
777
|
_this5.hide();
|
|
774
778
|
}
|
|
775
779
|
};
|
|
@@ -820,7 +824,7 @@ var CascadeSelect = /*#__PURE__*/function (_Component) {
|
|
|
820
824
|
this.scrollHandler = null;
|
|
821
825
|
}
|
|
822
826
|
|
|
823
|
-
|
|
827
|
+
utils.ZIndexUtils.clear(this.overlayRef.current);
|
|
824
828
|
}
|
|
825
829
|
}, {
|
|
826
830
|
key: "componentDidUpdate",
|
|
@@ -833,9 +837,9 @@ var CascadeSelect = /*#__PURE__*/function (_Component) {
|
|
|
833
837
|
key: "renderKeyboardHelper",
|
|
834
838
|
value: function renderKeyboardHelper() {
|
|
835
839
|
var value = this.props.value ? this.getOptionLabel(this.props.value) : null;
|
|
836
|
-
return /*#__PURE__*/React__default[
|
|
840
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
837
841
|
className: "p-hidden-accessible"
|
|
838
|
-
}, /*#__PURE__*/React__default[
|
|
842
|
+
}, /*#__PURE__*/React__default["default"].createElement("input", {
|
|
839
843
|
ref: this.inputRef,
|
|
840
844
|
type: "text",
|
|
841
845
|
id: this.props.inputId,
|
|
@@ -857,11 +861,11 @@ var CascadeSelect = /*#__PURE__*/function (_Component) {
|
|
|
857
861
|
var _this6 = this;
|
|
858
862
|
|
|
859
863
|
var label = this.props.value ? this.getOptionLabel(this.props.value) : this.props.placeholder || 'p-emptylabel';
|
|
860
|
-
var labelClassName =
|
|
864
|
+
var labelClassName = utils.classNames('p-cascadeselect-label ', {
|
|
861
865
|
'p-placeholder': label === this.props.placeholder,
|
|
862
866
|
'p-cascadeselect-label-empty': !this.props.value && label === 'p-emptylabel'
|
|
863
867
|
});
|
|
864
|
-
return /*#__PURE__*/React__default[
|
|
868
|
+
return /*#__PURE__*/React__default["default"].createElement("span", {
|
|
865
869
|
ref: function ref(el) {
|
|
866
870
|
return _this6.label = el;
|
|
867
871
|
},
|
|
@@ -871,23 +875,23 @@ var CascadeSelect = /*#__PURE__*/function (_Component) {
|
|
|
871
875
|
}, {
|
|
872
876
|
key: "renderDropdownIcon",
|
|
873
877
|
value: function renderDropdownIcon() {
|
|
874
|
-
var iconClassName =
|
|
875
|
-
return /*#__PURE__*/React__default[
|
|
878
|
+
var iconClassName = utils.classNames('p-cascadeselect-trigger-icon', this.props.dropdownIcon);
|
|
879
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
876
880
|
className: "p-cascadeselect-trigger",
|
|
877
881
|
role: "button",
|
|
878
882
|
"aria-haspopup": "listbox",
|
|
879
883
|
"aria-expanded": this.state.overlayVisible
|
|
880
|
-
}, /*#__PURE__*/React__default[
|
|
884
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
881
885
|
className: iconClassName
|
|
882
886
|
}));
|
|
883
887
|
}
|
|
884
888
|
}, {
|
|
885
889
|
key: "renderOverlay",
|
|
886
890
|
value: function renderOverlay() {
|
|
887
|
-
var overlay = /*#__PURE__*/React__default[
|
|
891
|
+
var overlay = /*#__PURE__*/React__default["default"].createElement(csstransition.CSSTransition, {
|
|
888
892
|
nodeRef: this.overlayRef,
|
|
889
893
|
classNames: "p-connected-overlay",
|
|
890
|
-
in: this.state.overlayVisible,
|
|
894
|
+
"in": this.state.overlayVisible,
|
|
891
895
|
timeout: {
|
|
892
896
|
enter: 120,
|
|
893
897
|
exit: 100
|
|
@@ -898,13 +902,13 @@ var CascadeSelect = /*#__PURE__*/function (_Component) {
|
|
|
898
902
|
onEntered: this.onOverlayEntered,
|
|
899
903
|
onExit: this.onOverlayExit,
|
|
900
904
|
onExited: this.onOverlayExited
|
|
901
|
-
}, /*#__PURE__*/React__default[
|
|
905
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
902
906
|
ref: this.overlayRef,
|
|
903
907
|
className: "p-cascadeselect-panel p-component",
|
|
904
908
|
onClick: this.onPanelClick
|
|
905
|
-
}, /*#__PURE__*/React__default[
|
|
909
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
906
910
|
className: "p-cascadeselect-items-wrapper"
|
|
907
|
-
}, /*#__PURE__*/React__default[
|
|
911
|
+
}, /*#__PURE__*/React__default["default"].createElement(CascadeSelectSub, {
|
|
908
912
|
options: this.props.options,
|
|
909
913
|
selectionPath: this.selectionPath,
|
|
910
914
|
className: "p-cascadeselect-items",
|
|
@@ -919,7 +923,7 @@ var CascadeSelect = /*#__PURE__*/function (_Component) {
|
|
|
919
923
|
template: this.props.itemTemplate,
|
|
920
924
|
onPanelHide: this.hide
|
|
921
925
|
}))));
|
|
922
|
-
return /*#__PURE__*/React__default[
|
|
926
|
+
return /*#__PURE__*/React__default["default"].createElement(portal.Portal, {
|
|
923
927
|
element: overlay,
|
|
924
928
|
appendTo: this.props.appendTo
|
|
925
929
|
});
|
|
@@ -929,7 +933,7 @@ var CascadeSelect = /*#__PURE__*/function (_Component) {
|
|
|
929
933
|
value: function renderElement() {
|
|
930
934
|
var _this7 = this;
|
|
931
935
|
|
|
932
|
-
var className =
|
|
936
|
+
var className = utils.classNames('p-cascadeselect p-component p-inputwrapper', this.props.className, {
|
|
933
937
|
'p-disabled': this.props.disabled,
|
|
934
938
|
'p-focus': this.state.focused,
|
|
935
939
|
'p-inputwrapper-filled': this.props.value,
|
|
@@ -939,7 +943,7 @@ var CascadeSelect = /*#__PURE__*/function (_Component) {
|
|
|
939
943
|
var labelElement = this.renderLabel();
|
|
940
944
|
var dropdownIcon = this.renderDropdownIcon();
|
|
941
945
|
var overlay = this.renderOverlay();
|
|
942
|
-
return /*#__PURE__*/React__default[
|
|
946
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
943
947
|
id: this.props.id,
|
|
944
948
|
ref: function ref(el) {
|
|
945
949
|
return _this7.container = el;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/core"),n=require("primereact/api");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=i(e),r=i(n);function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function a(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),e}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return p(e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=b(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}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 r,l=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){s=!0,r=e},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw r}}}}function b(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function O(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var k=function(n){c(u,e.Component);var i,r,s=(i=u,r=O(),function(){var e,t=f(i);if(r){var n=f(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return d(this,e)});function u(e){var t;return l(this,u),(t=s.call(this,e)).state={activeOption:null},t.onOptionSelect=t.onOptionSelect.bind(p(t)),t.onOptionGroupSelect=t.onOptionGroupSelect.bind(p(t)),t}return a(u,[{key:"componentDidMount",value:function(){if(this.props.selectionPath&&this.props.options&&!this.props.dirty){var e,t=y(this.props.options);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(this.props.selectionPath.includes(n)){this.setState({activeOption:n});break}}}catch(e){t.e(e)}finally{t.f()}}this.props.root||this.position()}},{key:"componentDidUpdate",value:function(e){e.parentActive!==this.props.parentActive&&this.setState({activeOption:null})}},{key:"position",value:function(){var e=this.element.parentElement,n=t.DomHandler.getOffset(e),i=t.DomHandler.getViewport(),o=this.element.offsetParent?this.element.offsetWidth:t.DomHandler.getHiddenElementOuterWidth(this.element),r=t.DomHandler.getOuterWidth(e.children[0]);parseInt(n.left,10)+r+o>i.width-t.DomHandler.calculateScrollbarWidth()&&(this.element.style.left="-100%")}},{key:"onOptionSelect",value:function(e){this.props.onOptionSelect&&this.props.onOptionSelect(e)}},{key:"onKeyDown",value:function(e,t){var n=e.currentTarget.parentElement;switch(e.key){case"Down":case"ArrowDown":var i=this.findNextItem(n);i&&i.children[0].focus();break;case"Up":case"ArrowUp":var o=this.findPrevItem(n);o&&o.children[0].focus();break;case"Right":case"ArrowRight":this.isOptionGroup(t)&&(this.state.activeOption===t?n.children[1].children[0].children[0].focus():this.setState({activeOption:t}));break;case"Left":case"ArrowLeft":this.setState({activeOption:null});var r=e.currentTarget.parentElement.parentElement.previousElementSibling;r&&r.focus();break;case"Enter":this.onOptionClick(e,t);break;case"Tab":case"Escape":this.props.onPanelHide&&(this.props.onPanelHide(),e.preventDefault())}e.preventDefault()}},{key:"findNextItem",value:function(e){var n=e.nextElementSibling;return n?t.DomHandler.hasClass(n,"p-disabled")||!t.DomHandler.hasClass(n,"p-cascadeselect-item")?this.findNextItem(n):n:null}},{key:"findPrevItem",value:function(e){var n=e.previousElementSibling;return n?t.DomHandler.hasClass(n,"p-disabled")||!t.DomHandler.hasClass(n,"p-cascadeselect-item")?this.findPrevItem(n):n:null}},{key:"onOptionClick",value:function(e,t){this.isOptionGroup(t)?(this.setState({activeOption:this.state.activeOption===t?null:t}),this.props.onOptionGroupSelect&&this.props.onOptionGroupSelect({originalEvent:e,value:t})):this.props.onOptionSelect&&this.props.onOptionSelect({originalEvent:e,value:this.getOptionValue(t)})}},{key:"onOptionGroupSelect",value:function(e){this.props.onOptionGroupSelect&&this.props.onOptionGroupSelect(e)}},{key:"getOptionLabel",value:function(e){return this.props.optionLabel?t.ObjectUtils.resolveFieldData(e,this.props.optionLabel):e}},{key:"getOptionValue",value:function(e){return this.props.optionValue?t.ObjectUtils.resolveFieldData(e,this.props.optionValue):e}},{key:"getOptionGroupLabel",value:function(e){return this.props.optionGroupLabel?t.ObjectUtils.resolveFieldData(e,this.props.optionGroupLabel):null}},{key:"getOptionGroupChildren",value:function(e){return t.ObjectUtils.resolveFieldData(e,this.props.optionGroupChildren[this.props.level])}},{key:"isOptionGroup",value:function(e){return Object.prototype.hasOwnProperty.call(e,this.props.optionGroupChildren[this.props.level])}},{key:"getOptionLabelToRender",value:function(e){return this.isOptionGroup(e)?this.getOptionGroupLabel(e):this.getOptionLabel(e)}},{key:"renderSubmenu",value:function(e){return this.isOptionGroup(e)&&this.state.activeOption===e?o.default.createElement(u,{options:this.getOptionGroupChildren(e),className:"p-cascadeselect-sublist",selectionPath:this.props.selectionPath,optionLabel:this.props.optionLabel,optionValue:this.props.optionValue,level:this.props.level+1,onOptionSelect:this.onOptionSelect,onOptionGroupSelect:this.onOptionGroupSelect,parentActive:this.state.activeOption===e,optionGroupLabel:this.props.optionGroupLabel,optionGroupChildren:this.props.optionGroupChildren,dirty:this.props.dirty,template:this.props.template,onPanelHide:this.props.onPanelHide}):null}},{key:"renderOption",value:function(e,n){var i=this,r=t.classNames("p-cascadeselect-item",{"p-cascadeselect-item-group":this.isOptionGroup(e),"p-cascadeselect-item-active p-highlight":this.state.activeOption===e},e.className),l=this.renderSubmenu(e),s=this.props.template?t.ObjectUtils.getJSXElement(this.props.template,this.getOptionValue(e)):o.default.createElement("span",{className:"p-cascadeselect-item-text"},this.getOptionLabelToRender(e)),a=this.isOptionGroup(e)&&o.default.createElement("span",{className:"p-cascadeselect-group-icon pi pi-angle-right"});return o.default.createElement("li",{key:this.getOptionLabelToRender(e)+"_"+n,className:r,style:e.style,role:"none"},o.default.createElement("div",{className:"p-cascadeselect-item-content",onClick:function(t){return i.onOptionClick(t,e)},tabIndex:0,onKeyDown:function(t){return i.onKeyDown(t,e)}},s,a,o.default.createElement(t.Ripple,null)),l)}},{key:"renderMenu",value:function(){var e=this;return this.props.options?this.props.options.map((function(t,n){return e.renderOption(t,n)})):null}},{key:"render",value:function(){var e=this,n=t.classNames("p-cascadeselect-panel p-cascadeselect-items",this.props.className),i=this.renderMenu();return o.default.createElement("ul",{ref:function(t){return e.element=t},className:n,role:"listbox","aria-orientation":"horizontal"},i)}}]),u}();function S(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=g(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}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 r,l=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){s=!0,r=e},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw r}}}}function g(e,t){if(e){if("string"==typeof e)return E(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(e,t):void 0}}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function w(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}v(k,"defaultProps",{options:null,selectionPath:!1,className:null,optionLabel:null,optionValue:null,level:null,optionGroupLabel:null,optionGroupChildren:null,parentActive:null,dirty:null,root:null,template:null,onOptionSelect:null,onOptionGroupSelect:null});var L=function(n){c(h,e.Component);var i,s,u=(i=h,s=w(),function(){var e,t=f(i);if(s){var n=f(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return d(this,e)});function h(t){var n;return l(this,h),(n=u.call(this,t)).state={focused:!1,overlayVisible:!1},n.dirty=!1,n.selectionPath=null,n.overlayRef=e.createRef(),n.inputRef=e.createRef(n.props.inputRef),n.hide=n.hide.bind(p(n)),n.onClick=n.onClick.bind(p(n)),n.onInputFocus=n.onInputFocus.bind(p(n)),n.onInputBlur=n.onInputBlur.bind(p(n)),n.onInputKeyDown=n.onInputKeyDown.bind(p(n)),n.onOverlayEnter=n.onOverlayEnter.bind(p(n)),n.onOverlayEntered=n.onOverlayEntered.bind(p(n)),n.onOverlayExit=n.onOverlayExit.bind(p(n)),n.onOverlayExited=n.onOverlayExited.bind(p(n)),n.onOptionSelect=n.onOptionSelect.bind(p(n)),n.onOptionGroupSelect=n.onOptionGroupSelect.bind(p(n)),n.onPanelClick=n.onPanelClick.bind(p(n)),n}return a(h,[{key:"onOptionSelect",value:function(e){this.props.onChange&&this.props.onChange({originalEvent:e,value:e.value}),this.updateSelectionPath(),this.hide(),this.inputRef.current.focus()}},{key:"onOptionGroupSelect",value:function(e){this.dirty=!0,this.props.onGroupChange&&this.props.onGroupChange(e)}},{key:"getOptionLabel",value:function(e){return this.props.optionLabel?t.ObjectUtils.resolveFieldData(e,this.props.optionLabel):e}},{key:"getOptionValue",value:function(e){return this.props.optionValue?t.ObjectUtils.resolveFieldData(e,this.props.optionValue):e}},{key:"getOptionGroupChildren",value:function(e,n){return t.ObjectUtils.resolveFieldData(e,this.props.optionGroupChildren[n])}},{key:"isOptionGroup",value:function(e,t){return Object.prototype.hasOwnProperty.call(e,this.props.optionGroupChildren[t])}},{key:"updateSelectionPath",value:function(){var e;if(null!=this.props.value&&this.props.options){var t,n=S(this.props.options);try{for(n.s();!(t=n.n()).done;){if(e=this.findModelOptionInGroup(t.value,0))break}}catch(e){n.e(e)}finally{n.f()}}this.selectionPath=e}},{key:"findModelOptionInGroup",value:function(e,n){if(this.isOptionGroup(e,n)){var i,o,r=S(this.getOptionGroupChildren(e,n));try{for(r.s();!(o=r.n()).done;){if(i=this.findModelOptionInGroup(o.value,n+1))return i.unshift(e),i}}catch(e){r.e(e)}finally{r.f()}}else if(t.ObjectUtils.equals(this.props.value,this.getOptionValue(e),this.props.dataKey))return[e];return null}},{key:"onClick",value:function(e){if(!this.props.disabled){var t=this.overlayRef?this.overlayRef.current:null;t&&t.contains(e.target)||(this.inputRef.current.focus(),this.state.overlayVisible?this.hide():this.show())}}},{key:"onInputFocus",value:function(){this.setState({focused:!0})}},{key:"onInputBlur",value:function(){this.setState({focused:!1})}},{key:"onInputKeyDown",value:function(e){switch(e.which){case 40:this.state.overlayVisible?t.DomHandler.findSingle(this.overlayRef.current,".p-cascadeselect-item").children[0].focus():e.altKey&&this.props.options&&this.props.options.length&&this.show(),e.preventDefault();break;case 32:this.state.overlayVisible?this.hide():this.show(),e.preventDefault();break;case 9:this.hide()}}},{key:"onPanelClick",value:function(e){t.OverlayService.emit("overlay-click",{originalEvent:e,target:this.container})}},{key:"show",value:function(){this.props.onBeforeShow&&this.props.onBeforeShow(),this.setState({overlayVisible:!0})}},{key:"hide",value:function(){var e=this;this.props.onBeforeHide&&this.props.onBeforeHide(),this.setState({overlayVisible:!1},(function(){e.inputRef.current.focus()}))}},{key:"onOverlayEnter",value:function(){t.ZIndexUtils.set("overlay",this.overlayRef.current),this.alignOverlay()}},{key:"onOverlayEntered",value:function(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.props.onShow&&this.props.onShow()}},{key:"onOverlayExit",value:function(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.dirty=!1}},{key:"onOverlayExited",value:function(){t.ZIndexUtils.clear(this.overlayRef.current),this.props.onHide&&this.props.onHide()}},{key:"alignOverlay",value:function(){t.DomHandler.alignOverlay(this.overlayRef.current,this.label.parentElement,this.props.appendTo||r.default.appendTo)}},{key:"bindOutsideClickListener",value:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){e.state.overlayVisible&&e.isOutsideClicked(t)&&e.hide()},document.addEventListener("click",this.outsideClickListener))}},{key:"unbindOutsideClickListener",value:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)}},{key:"bindScrollListener",value:function(){var e=this;this.scrollHandler||(this.scrollHandler=new t.ConnectedOverlayScrollHandler(this.container,(function(){e.state.overlayVisible&&e.hide()}))),this.scrollHandler.bindScrollListener()}},{key:"unbindScrollListener",value:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}},{key:"bindResizeListener",value:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.state.overlayVisible&&!t.DomHandler.isAndroid()&&e.hide()},window.addEventListener("resize",this.resizeListener))}},{key:"unbindResizeListener",value:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)}},{key:"isOutsideClicked",value:function(e){return this.container&&!(this.container.isSameNode(e.target)||this.container.contains(e.target)||this.overlayRef&&this.overlayRef.current.contains(e.target))}},{key:"updateInputRef",value:function(){var e=this.props.inputRef;e&&("function"==typeof e?e(this.inputRef.current):e.current=this.inputRef.current)}},{key:"componentDidMount",value:function(){this.updateInputRef(),this.updateSelectionPath()}},{key:"componentWillUnmount",value:function(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),t.ZIndexUtils.clear(this.overlayRef.current)}},{key:"componentDidUpdate",value:function(e){e.value!==this.props.value&&this.updateSelectionPath()}},{key:"renderKeyboardHelper",value:function(){var e=this.props.value?this.getOptionLabel(this.props.value):null;return o.default.createElement("div",{className:"p-hidden-accessible"},o.default.createElement("input",{ref:this.inputRef,type:"text",id:this.props.inputId,name:this.props.name,defaultValue:e,readOnly:!0,disabled:this.props.disabled,onFocus:this.onInputFocus,onBlur:this.onInputBlur,onKeyDown:this.onInputKeyDown,tabIndex:this.props.tabIndex,"aria-haspopup":"listbox","aria-labelledby":this.props.ariaLabelledBy}))}},{key:"renderLabel",value:function(){var e=this,n=this.props.value?this.getOptionLabel(this.props.value):this.props.placeholder||"p-emptylabel",i=t.classNames("p-cascadeselect-label ",{"p-placeholder":n===this.props.placeholder,"p-cascadeselect-label-empty":!this.props.value&&"p-emptylabel"===n});return o.default.createElement("span",{ref:function(t){return e.label=t},className:i},n)}},{key:"renderDropdownIcon",value:function(){var e=t.classNames("p-cascadeselect-trigger-icon",this.props.dropdownIcon);return o.default.createElement("div",{className:"p-cascadeselect-trigger",role:"button","aria-haspopup":"listbox","aria-expanded":this.state.overlayVisible},o.default.createElement("span",{className:e}))}},{key:"renderOverlay",value:function(){return o.default.createElement(t.Portal,{element:o.default.createElement(t.CSSTransition,{nodeRef:this.overlayRef,classNames:"p-connected-overlay",in:this.state.overlayVisible,timeout:{enter:120,exit:100},options:this.props.transitionOptions,unmountOnExit:!0,onEnter:this.onOverlayEnter,onEntered:this.onOverlayEntered,onExit:this.onOverlayExit,onExited:this.onOverlayExited},o.default.createElement("div",{ref:this.overlayRef,className:"p-cascadeselect-panel p-component",onClick:this.onPanelClick},o.default.createElement("div",{className:"p-cascadeselect-items-wrapper"},o.default.createElement(k,{options:this.props.options,selectionPath:this.selectionPath,className:"p-cascadeselect-items",optionLabel:this.props.optionLabel,optionValue:this.props.optionValue,level:0,optionGroupLabel:this.props.optionGroupLabel,optionGroupChildren:this.props.optionGroupChildren,onOptionSelect:this.onOptionSelect,onOptionGroupSelect:this.onOptionGroupSelect,root:!0,template:this.props.itemTemplate,onPanelHide:this.hide})))),appendTo:this.props.appendTo})}},{key:"renderElement",value:function(){var e=this,n=t.classNames("p-cascadeselect p-component p-inputwrapper",this.props.className,{"p-disabled":this.props.disabled,"p-focus":this.state.focused,"p-inputwrapper-filled":this.props.value,"p-inputwrapper-focus":this.state.focused||this.state.overlayVisible}),i=this.renderKeyboardHelper(),r=this.renderLabel(),l=this.renderDropdownIcon(),s=this.renderOverlay();return o.default.createElement("div",{id:this.props.id,ref:function(t){return e.container=t},className:n,style:this.props.style,onClick:this.onClick},i,r,l,s)}},{key:"render",value:function(){return this.renderElement()}}]),h}();v(L,"defaultProps",{id:null,inputRef:null,style:null,className:null,value:null,name:null,options:null,optionLabel:null,optionValue:null,optionGroupLabel:null,optionGroupChildren:null,placeholder:null,itemTemplate:null,disabled:!1,dataKey:null,inputId:null,tabIndex:null,ariaLabelledBy:null,appendTo:null,transitionOptions:null,dropdownIcon:"pi pi-chevron-down",onChange:null,onGroupChange:null,onBeforeShow:null,onBeforeHide:null,onShow:null,onHide:null}),exports.CascadeSelect=L;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/utils"),n=require("primereact/csstransition"),i=require("primereact/ripple"),o=require("primereact/overlayservice"),r=require("primereact/portal"),l=require("primereact/api");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=s(e),p=s(l);function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function h(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function b(e,t){if(t&&("object"===y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=S(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}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 r,l=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){s=!0,r=e},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw r}}}}function S(e,t){if(e){if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function w(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var E=function(n){v(s,e.Component);var o,r,l=(o=s,r=w(),function(){var e,t=m(o);if(r){var n=m(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return b(this,e)});function s(e){var t;return u(this,s),(t=l.call(this,e)).state={activeOption:null},t.onOptionSelect=t.onOptionSelect.bind(d(t)),t.onOptionGroupSelect=t.onOptionGroupSelect.bind(d(t)),t}return h(s,[{key:"componentDidMount",value:function(){if(this.props.selectionPath&&this.props.options&&!this.props.dirty){var e,t=k(this.props.options);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(this.props.selectionPath.includes(n)){this.setState({activeOption:n});break}}}catch(e){t.e(e)}finally{t.f()}}this.props.root||this.position()}},{key:"componentDidUpdate",value:function(e){e.parentActive!==this.props.parentActive&&this.setState({activeOption:null})}},{key:"position",value:function(){var e=this.element.parentElement,n=t.DomHandler.getOffset(e),i=t.DomHandler.getViewport(),o=this.element.offsetParent?this.element.offsetWidth:t.DomHandler.getHiddenElementOuterWidth(this.element),r=t.DomHandler.getOuterWidth(e.children[0]);parseInt(n.left,10)+r+o>i.width-t.DomHandler.calculateScrollbarWidth()&&(this.element.style.left="-100%")}},{key:"onOptionSelect",value:function(e){this.props.onOptionSelect&&this.props.onOptionSelect(e)}},{key:"onKeyDown",value:function(e,t){var n=e.currentTarget.parentElement;switch(e.key){case"Down":case"ArrowDown":var i=this.findNextItem(n);i&&i.children[0].focus();break;case"Up":case"ArrowUp":var o=this.findPrevItem(n);o&&o.children[0].focus();break;case"Right":case"ArrowRight":this.isOptionGroup(t)&&(this.state.activeOption===t?n.children[1].children[0].children[0].focus():this.setState({activeOption:t}));break;case"Left":case"ArrowLeft":this.setState({activeOption:null});var r=e.currentTarget.parentElement.parentElement.previousElementSibling;r&&r.focus();break;case"Enter":this.onOptionClick(e,t);break;case"Tab":case"Escape":this.props.onPanelHide&&(this.props.onPanelHide(),e.preventDefault())}e.preventDefault()}},{key:"findNextItem",value:function(e){var n=e.nextElementSibling;return n?t.DomHandler.hasClass(n,"p-disabled")||!t.DomHandler.hasClass(n,"p-cascadeselect-item")?this.findNextItem(n):n:null}},{key:"findPrevItem",value:function(e){var n=e.previousElementSibling;return n?t.DomHandler.hasClass(n,"p-disabled")||!t.DomHandler.hasClass(n,"p-cascadeselect-item")?this.findPrevItem(n):n:null}},{key:"onOptionClick",value:function(e,t){this.isOptionGroup(t)?(this.setState({activeOption:this.state.activeOption===t?null:t}),this.props.onOptionGroupSelect&&this.props.onOptionGroupSelect({originalEvent:e,value:t})):this.props.onOptionSelect&&this.props.onOptionSelect({originalEvent:e,value:this.getOptionValue(t)})}},{key:"onOptionGroupSelect",value:function(e){this.props.onOptionGroupSelect&&this.props.onOptionGroupSelect(e)}},{key:"getOptionLabel",value:function(e){return this.props.optionLabel?t.ObjectUtils.resolveFieldData(e,this.props.optionLabel):e}},{key:"getOptionValue",value:function(e){return this.props.optionValue?t.ObjectUtils.resolveFieldData(e,this.props.optionValue):e}},{key:"getOptionGroupLabel",value:function(e){return this.props.optionGroupLabel?t.ObjectUtils.resolveFieldData(e,this.props.optionGroupLabel):null}},{key:"getOptionGroupChildren",value:function(e){return t.ObjectUtils.resolveFieldData(e,this.props.optionGroupChildren[this.props.level])}},{key:"isOptionGroup",value:function(e){return Object.prototype.hasOwnProperty.call(e,this.props.optionGroupChildren[this.props.level])}},{key:"getOptionLabelToRender",value:function(e){return this.isOptionGroup(e)?this.getOptionGroupLabel(e):this.getOptionLabel(e)}},{key:"renderSubmenu",value:function(e){return this.isOptionGroup(e)&&this.state.activeOption===e?a.default.createElement(s,{options:this.getOptionGroupChildren(e),className:"p-cascadeselect-sublist",selectionPath:this.props.selectionPath,optionLabel:this.props.optionLabel,optionValue:this.props.optionValue,level:this.props.level+1,onOptionSelect:this.onOptionSelect,onOptionGroupSelect:this.onOptionGroupSelect,parentActive:this.state.activeOption===e,optionGroupLabel:this.props.optionGroupLabel,optionGroupChildren:this.props.optionGroupChildren,dirty:this.props.dirty,template:this.props.template,onPanelHide:this.props.onPanelHide}):null}},{key:"renderOption",value:function(e,n){var o=this,r=t.classNames("p-cascadeselect-item",{"p-cascadeselect-item-group":this.isOptionGroup(e),"p-cascadeselect-item-active p-highlight":this.state.activeOption===e},e.className),l=this.renderSubmenu(e),s=this.props.template?t.ObjectUtils.getJSXElement(this.props.template,this.getOptionValue(e)):a.default.createElement("span",{className:"p-cascadeselect-item-text"},this.getOptionLabelToRender(e)),p=this.isOptionGroup(e)&&a.default.createElement("span",{className:"p-cascadeselect-group-icon pi pi-angle-right"});return a.default.createElement("li",{key:this.getOptionLabelToRender(e)+"_"+n,className:r,style:e.style,role:"none"},a.default.createElement("div",{className:"p-cascadeselect-item-content",onClick:function(t){return o.onOptionClick(t,e)},tabIndex:0,onKeyDown:function(t){return o.onKeyDown(t,e)}},s,p,a.default.createElement(i.Ripple,null)),l)}},{key:"renderMenu",value:function(){var e=this;return this.props.options?this.props.options.map((function(t,n){return e.renderOption(t,n)})):null}},{key:"render",value:function(){var e=this,n=t.classNames("p-cascadeselect-panel p-cascadeselect-items",this.props.className),i=this.renderMenu();return a.default.createElement("ul",{ref:function(t){return e.element=t},className:n,role:"listbox","aria-orientation":"horizontal"},i)}}]),s}();function L(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=C(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}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 r,l=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){s=!0,r=e},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw r}}}}function C(e,t){if(e){if("string"==typeof e)return G(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?G(e,t):void 0}}function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function R(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}O(E,"defaultProps",{options:null,selectionPath:!1,className:null,optionLabel:null,optionValue:null,level:null,optionGroupLabel:null,optionGroupChildren:null,parentActive:null,dirty:null,root:null,template:null,onOptionSelect:null,onOptionGroupSelect:null});var I=function(i){v(f,e.Component);var l,s,c=(l=f,s=R(),function(){var e,t=m(l);if(s){var n=m(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return b(this,e)});function f(t){var n;return u(this,f),(n=c.call(this,t)).state={focused:!1,overlayVisible:!1},n.dirty=!1,n.selectionPath=null,n.overlayRef=e.createRef(),n.inputRef=e.createRef(n.props.inputRef),n.hide=n.hide.bind(d(n)),n.onClick=n.onClick.bind(d(n)),n.onInputFocus=n.onInputFocus.bind(d(n)),n.onInputBlur=n.onInputBlur.bind(d(n)),n.onInputKeyDown=n.onInputKeyDown.bind(d(n)),n.onOverlayEnter=n.onOverlayEnter.bind(d(n)),n.onOverlayEntered=n.onOverlayEntered.bind(d(n)),n.onOverlayExit=n.onOverlayExit.bind(d(n)),n.onOverlayExited=n.onOverlayExited.bind(d(n)),n.onOptionSelect=n.onOptionSelect.bind(d(n)),n.onOptionGroupSelect=n.onOptionGroupSelect.bind(d(n)),n.onPanelClick=n.onPanelClick.bind(d(n)),n}return h(f,[{key:"onOptionSelect",value:function(e){this.props.onChange&&this.props.onChange({originalEvent:e,value:e.value}),this.updateSelectionPath(),this.hide(),this.inputRef.current.focus()}},{key:"onOptionGroupSelect",value:function(e){this.dirty=!0,this.props.onGroupChange&&this.props.onGroupChange(e)}},{key:"getOptionLabel",value:function(e){return this.props.optionLabel?t.ObjectUtils.resolveFieldData(e,this.props.optionLabel):e}},{key:"getOptionValue",value:function(e){return this.props.optionValue?t.ObjectUtils.resolveFieldData(e,this.props.optionValue):e}},{key:"getOptionGroupChildren",value:function(e,n){return t.ObjectUtils.resolveFieldData(e,this.props.optionGroupChildren[n])}},{key:"isOptionGroup",value:function(e,t){return Object.prototype.hasOwnProperty.call(e,this.props.optionGroupChildren[t])}},{key:"updateSelectionPath",value:function(){var e;if(null!=this.props.value&&this.props.options){var t,n=L(this.props.options);try{for(n.s();!(t=n.n()).done;){if(e=this.findModelOptionInGroup(t.value,0))break}}catch(e){n.e(e)}finally{n.f()}}this.selectionPath=e}},{key:"findModelOptionInGroup",value:function(e,n){if(this.isOptionGroup(e,n)){var i,o,r=L(this.getOptionGroupChildren(e,n));try{for(r.s();!(o=r.n()).done;){if(i=this.findModelOptionInGroup(o.value,n+1))return i.unshift(e),i}}catch(e){r.e(e)}finally{r.f()}}else if(t.ObjectUtils.equals(this.props.value,this.getOptionValue(e),this.props.dataKey))return[e];return null}},{key:"onClick",value:function(e){if(!this.props.disabled){var t=this.overlayRef?this.overlayRef.current:null;t&&t.contains(e.target)||(this.inputRef.current.focus(),this.state.overlayVisible?this.hide():this.show())}}},{key:"onInputFocus",value:function(){this.setState({focused:!0})}},{key:"onInputBlur",value:function(){this.setState({focused:!1})}},{key:"onInputKeyDown",value:function(e){switch(e.which){case 40:this.state.overlayVisible?t.DomHandler.findSingle(this.overlayRef.current,".p-cascadeselect-item").children[0].focus():e.altKey&&this.props.options&&this.props.options.length&&this.show(),e.preventDefault();break;case 32:this.state.overlayVisible?this.hide():this.show(),e.preventDefault();break;case 9:this.hide()}}},{key:"onPanelClick",value:function(e){o.OverlayService.emit("overlay-click",{originalEvent:e,target:this.container})}},{key:"show",value:function(){this.props.onBeforeShow&&this.props.onBeforeShow(),this.setState({overlayVisible:!0})}},{key:"hide",value:function(){var e=this;this.props.onBeforeHide&&this.props.onBeforeHide(),this.setState({overlayVisible:!1},(function(){e.inputRef.current.focus()}))}},{key:"onOverlayEnter",value:function(){t.ZIndexUtils.set("overlay",this.overlayRef.current,p.default.autoZIndex,p.default.zIndex.overlay),this.alignOverlay()}},{key:"onOverlayEntered",value:function(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.props.onShow&&this.props.onShow()}},{key:"onOverlayExit",value:function(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.dirty=!1}},{key:"onOverlayExited",value:function(){t.ZIndexUtils.clear(this.overlayRef.current),this.props.onHide&&this.props.onHide()}},{key:"alignOverlay",value:function(){t.DomHandler.alignOverlay(this.overlayRef.current,this.label.parentElement,this.props.appendTo||p.default.appendTo)}},{key:"bindOutsideClickListener",value:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){e.state.overlayVisible&&e.isOutsideClicked(t)&&e.hide()},document.addEventListener("click",this.outsideClickListener))}},{key:"unbindOutsideClickListener",value:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)}},{key:"bindScrollListener",value:function(){var e=this;this.scrollHandler||(this.scrollHandler=new t.ConnectedOverlayScrollHandler(this.container,(function(){e.state.overlayVisible&&e.hide()}))),this.scrollHandler.bindScrollListener()}},{key:"unbindScrollListener",value:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}},{key:"bindResizeListener",value:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.state.overlayVisible&&!t.DomHandler.isTouchDevice()&&e.hide()},window.addEventListener("resize",this.resizeListener))}},{key:"unbindResizeListener",value:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)}},{key:"isOutsideClicked",value:function(e){return this.container&&!(this.container.isSameNode(e.target)||this.container.contains(e.target)||this.overlayRef&&this.overlayRef.current.contains(e.target))}},{key:"updateInputRef",value:function(){var e=this.props.inputRef;e&&("function"==typeof e?e(this.inputRef.current):e.current=this.inputRef.current)}},{key:"componentDidMount",value:function(){this.updateInputRef(),this.updateSelectionPath()}},{key:"componentWillUnmount",value:function(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),t.ZIndexUtils.clear(this.overlayRef.current)}},{key:"componentDidUpdate",value:function(e){e.value!==this.props.value&&this.updateSelectionPath()}},{key:"renderKeyboardHelper",value:function(){var e=this.props.value?this.getOptionLabel(this.props.value):null;return a.default.createElement("div",{className:"p-hidden-accessible"},a.default.createElement("input",{ref:this.inputRef,type:"text",id:this.props.inputId,name:this.props.name,defaultValue:e,readOnly:!0,disabled:this.props.disabled,onFocus:this.onInputFocus,onBlur:this.onInputBlur,onKeyDown:this.onInputKeyDown,tabIndex:this.props.tabIndex,"aria-haspopup":"listbox","aria-labelledby":this.props.ariaLabelledBy}))}},{key:"renderLabel",value:function(){var e=this,n=this.props.value?this.getOptionLabel(this.props.value):this.props.placeholder||"p-emptylabel",i=t.classNames("p-cascadeselect-label ",{"p-placeholder":n===this.props.placeholder,"p-cascadeselect-label-empty":!this.props.value&&"p-emptylabel"===n});return a.default.createElement("span",{ref:function(t){return e.label=t},className:i},n)}},{key:"renderDropdownIcon",value:function(){var e=t.classNames("p-cascadeselect-trigger-icon",this.props.dropdownIcon);return a.default.createElement("div",{className:"p-cascadeselect-trigger",role:"button","aria-haspopup":"listbox","aria-expanded":this.state.overlayVisible},a.default.createElement("span",{className:e}))}},{key:"renderOverlay",value:function(){return a.default.createElement(r.Portal,{element:a.default.createElement(n.CSSTransition,{nodeRef:this.overlayRef,classNames:"p-connected-overlay",in:this.state.overlayVisible,timeout:{enter:120,exit:100},options:this.props.transitionOptions,unmountOnExit:!0,onEnter:this.onOverlayEnter,onEntered:this.onOverlayEntered,onExit:this.onOverlayExit,onExited:this.onOverlayExited},a.default.createElement("div",{ref:this.overlayRef,className:"p-cascadeselect-panel p-component",onClick:this.onPanelClick},a.default.createElement("div",{className:"p-cascadeselect-items-wrapper"},a.default.createElement(E,{options:this.props.options,selectionPath:this.selectionPath,className:"p-cascadeselect-items",optionLabel:this.props.optionLabel,optionValue:this.props.optionValue,level:0,optionGroupLabel:this.props.optionGroupLabel,optionGroupChildren:this.props.optionGroupChildren,onOptionSelect:this.onOptionSelect,onOptionGroupSelect:this.onOptionGroupSelect,root:!0,template:this.props.itemTemplate,onPanelHide:this.hide})))),appendTo:this.props.appendTo})}},{key:"renderElement",value:function(){var e=this,n=t.classNames("p-cascadeselect p-component p-inputwrapper",this.props.className,{"p-disabled":this.props.disabled,"p-focus":this.state.focused,"p-inputwrapper-filled":this.props.value,"p-inputwrapper-focus":this.state.focused||this.state.overlayVisible}),i=this.renderKeyboardHelper(),o=this.renderLabel(),r=this.renderDropdownIcon(),l=this.renderOverlay();return a.default.createElement("div",{id:this.props.id,ref:function(t){return e.container=t},className:n,style:this.props.style,onClick:this.onClick},i,o,r,l)}},{key:"render",value:function(){return this.renderElement()}}]),f}();O(I,"defaultProps",{id:null,inputRef:null,style:null,className:null,value:null,name:null,options:null,optionLabel:null,optionValue:null,optionGroupLabel:null,optionGroupChildren:null,placeholder:null,itemTemplate:null,disabled:!1,dataKey:null,inputId:null,tabIndex:null,ariaLabelledBy:null,appendTo:null,transitionOptions:null,dropdownIcon:"pi pi-chevron-down",onChange:null,onGroupChange:null,onBeforeShow:null,onBeforeHide:null,onShow:null,onHide:null}),exports.CascadeSelect=I;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { CSSTransitionProps } from '../csstransition';
|
|
2
3
|
|
|
3
4
|
type CascadeSelectItemTemplateType = React.ReactNode | ((option: any) => React.ReactNode);
|
|
4
5
|
|
|
@@ -31,7 +32,7 @@ export interface CascadeSelectProps {
|
|
|
31
32
|
tabIndex?: number;
|
|
32
33
|
ariaLabelledBy?: string;
|
|
33
34
|
appendTo?: CascadeSelectAppendToType;
|
|
34
|
-
transitionOptions?:
|
|
35
|
+
transitionOptions?: CSSTransitionProps;
|
|
35
36
|
dropdownIcon?: string;
|
|
36
37
|
onChange?(e: CascadeSelectChangeParams): void;
|
|
37
38
|
onGroupChange?(e: CascadeSelectGroupChangeParams): void;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import React, { Component, createRef } from 'react';
|
|
2
|
-
import { DomHandler, ObjectUtils, classNames,
|
|
2
|
+
import { DomHandler, ObjectUtils, classNames, ZIndexUtils, ConnectedOverlayScrollHandler } from 'primereact/utils';
|
|
3
|
+
import { CSSTransition } from 'primereact/csstransition';
|
|
4
|
+
import { Ripple } from 'primereact/ripple';
|
|
5
|
+
import { OverlayService } from 'primereact/overlayservice';
|
|
6
|
+
import { Portal } from 'primereact/portal';
|
|
3
7
|
import PrimeReact from 'primereact/api';
|
|
4
8
|
|
|
5
9
|
function _classCallCheck(instance, Constructor) {
|
|
@@ -21,6 +25,9 @@ function _defineProperties(target, props) {
|
|
|
21
25
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
22
26
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
23
27
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
28
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
29
|
+
writable: false
|
|
30
|
+
});
|
|
24
31
|
return Constructor;
|
|
25
32
|
}
|
|
26
33
|
|
|
@@ -53,23 +60,20 @@ function _inherits(subClass, superClass) {
|
|
|
53
60
|
configurable: true
|
|
54
61
|
}
|
|
55
62
|
});
|
|
63
|
+
Object.defineProperty(subClass, "prototype", {
|
|
64
|
+
writable: false
|
|
65
|
+
});
|
|
56
66
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
57
67
|
}
|
|
58
68
|
|
|
59
69
|
function _typeof(obj) {
|
|
60
70
|
"@babel/helpers - typeof";
|
|
61
71
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
_typeof = function _typeof(obj) {
|
|
68
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
return _typeof(obj);
|
|
72
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
73
|
+
return typeof obj;
|
|
74
|
+
} : function (obj) {
|
|
75
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
76
|
+
}, _typeof(obj);
|
|
73
77
|
}
|
|
74
78
|
|
|
75
79
|
function _possibleConstructorReturn(self, call) {
|
|
@@ -104,7 +108,7 @@ function _defineProperty(obj, key, value) {
|
|
|
104
108
|
return obj;
|
|
105
109
|
}
|
|
106
110
|
|
|
107
|
-
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
|
|
111
|
+
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; } } }; }
|
|
108
112
|
|
|
109
113
|
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); }
|
|
110
114
|
|
|
@@ -438,7 +442,7 @@ _defineProperty(CascadeSelectSub, "defaultProps", {
|
|
|
438
442
|
onOptionGroupSelect: null
|
|
439
443
|
});
|
|
440
444
|
|
|
441
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(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
|
|
445
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(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; } } }; }
|
|
442
446
|
|
|
443
447
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(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(o, minLen); }
|
|
444
448
|
|
|
@@ -678,7 +682,7 @@ var CascadeSelect = /*#__PURE__*/function (_Component) {
|
|
|
678
682
|
}, {
|
|
679
683
|
key: "onOverlayEnter",
|
|
680
684
|
value: function onOverlayEnter() {
|
|
681
|
-
ZIndexUtils.set('overlay', this.overlayRef.current);
|
|
685
|
+
ZIndexUtils.set('overlay', this.overlayRef.current, PrimeReact.autoZIndex, PrimeReact.zIndex['overlay']);
|
|
682
686
|
this.alignOverlay();
|
|
683
687
|
}
|
|
684
688
|
}, {
|
|
@@ -760,7 +764,7 @@ var CascadeSelect = /*#__PURE__*/function (_Component) {
|
|
|
760
764
|
|
|
761
765
|
if (!this.resizeListener) {
|
|
762
766
|
this.resizeListener = function () {
|
|
763
|
-
if (_this5.state.overlayVisible && !DomHandler.
|
|
767
|
+
if (_this5.state.overlayVisible && !DomHandler.isTouchDevice()) {
|
|
764
768
|
_this5.hide();
|
|
765
769
|
}
|
|
766
770
|
};
|
|
@@ -878,7 +882,7 @@ var CascadeSelect = /*#__PURE__*/function (_Component) {
|
|
|
878
882
|
var overlay = /*#__PURE__*/React.createElement(CSSTransition, {
|
|
879
883
|
nodeRef: this.overlayRef,
|
|
880
884
|
classNames: "p-connected-overlay",
|
|
881
|
-
in: this.state.overlayVisible,
|
|
885
|
+
"in": this.state.overlayVisible,
|
|
882
886
|
timeout: {
|
|
883
887
|
enter: 120,
|
|
884
888
|
exit: 100
|