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
package/mention/mention.cjs.js
CHANGED
|
@@ -3,11 +3,18 @@
|
|
|
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 ripple = require('primereact/ripple');
|
|
8
|
+
var overlayservice = require('primereact/overlayservice');
|
|
9
|
+
var csstransition = require('primereact/csstransition');
|
|
10
|
+
var portal = require('primereact/portal');
|
|
11
|
+
var tooltip = require('primereact/tooltip');
|
|
12
|
+
var PrimeReact = require('primereact/api');
|
|
7
13
|
|
|
8
14
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
15
|
|
|
10
16
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
17
|
+
var PrimeReact__default = /*#__PURE__*/_interopDefaultLegacy(PrimeReact);
|
|
11
18
|
|
|
12
19
|
function _extends() {
|
|
13
20
|
_extends = Object.assign || function (target) {
|
|
@@ -46,6 +53,9 @@ function _defineProperties(target, props) {
|
|
|
46
53
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
47
54
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
48
55
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
56
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
57
|
+
writable: false
|
|
58
|
+
});
|
|
49
59
|
return Constructor;
|
|
50
60
|
}
|
|
51
61
|
|
|
@@ -78,23 +88,20 @@ function _inherits(subClass, superClass) {
|
|
|
78
88
|
configurable: true
|
|
79
89
|
}
|
|
80
90
|
});
|
|
91
|
+
Object.defineProperty(subClass, "prototype", {
|
|
92
|
+
writable: false
|
|
93
|
+
});
|
|
81
94
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
82
95
|
}
|
|
83
96
|
|
|
84
97
|
function _typeof(obj) {
|
|
85
98
|
"@babel/helpers - typeof";
|
|
86
99
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
_typeof = function _typeof(obj) {
|
|
93
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
return _typeof(obj);
|
|
100
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
101
|
+
return typeof obj;
|
|
102
|
+
} : function (obj) {
|
|
103
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
104
|
+
}, _typeof(obj);
|
|
98
105
|
}
|
|
99
106
|
|
|
100
107
|
function _possibleConstructorReturn(self, call) {
|
|
@@ -129,9 +136,9 @@ function _defineProperty(obj, key, value) {
|
|
|
129
136
|
return obj;
|
|
130
137
|
}
|
|
131
138
|
|
|
132
|
-
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
139
|
+
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
133
140
|
|
|
134
|
-
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
141
|
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
135
142
|
|
|
136
143
|
function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
137
144
|
|
|
@@ -196,7 +203,7 @@ var InputTextareaComponent = /*#__PURE__*/function (_Component) {
|
|
|
196
203
|
this.resize();
|
|
197
204
|
}
|
|
198
205
|
|
|
199
|
-
if (e.target.value.length > 0)
|
|
206
|
+
if (e.target.value.length > 0) utils.DomHandler.addClass(e.target, 'p-filled');else utils.DomHandler.removeClass(e.target, 'p-filled');
|
|
200
207
|
|
|
201
208
|
if (this.props.onInput) {
|
|
202
209
|
this.props.onInput(e);
|
|
@@ -207,7 +214,7 @@ var InputTextareaComponent = /*#__PURE__*/function (_Component) {
|
|
|
207
214
|
value: function resize(initial) {
|
|
208
215
|
var inputEl = this.elementRef && this.elementRef.current;
|
|
209
216
|
|
|
210
|
-
if (inputEl &&
|
|
217
|
+
if (inputEl && utils.DomHandler.isVisible(inputEl)) {
|
|
211
218
|
if (!this.cachedScrollHeight) {
|
|
212
219
|
this.cachedScrollHeight = inputEl.scrollHeight;
|
|
213
220
|
inputEl.style.overflow = "hidden";
|
|
@@ -283,7 +290,7 @@ var InputTextareaComponent = /*#__PURE__*/function (_Component) {
|
|
|
283
290
|
}, {
|
|
284
291
|
key: "renderTooltip",
|
|
285
292
|
value: function renderTooltip() {
|
|
286
|
-
this.tooltip =
|
|
293
|
+
this.tooltip = tooltip.tip({
|
|
287
294
|
target: this.elementRef.current,
|
|
288
295
|
content: this.props.tooltip,
|
|
289
296
|
options: this.props.tooltipOptions
|
|
@@ -292,13 +299,13 @@ var InputTextareaComponent = /*#__PURE__*/function (_Component) {
|
|
|
292
299
|
}, {
|
|
293
300
|
key: "render",
|
|
294
301
|
value: function render() {
|
|
295
|
-
var className =
|
|
302
|
+
var className = utils.classNames('p-inputtextarea p-inputtext p-component', {
|
|
296
303
|
'p-disabled': this.props.disabled,
|
|
297
304
|
'p-filled': this.isFilled(),
|
|
298
305
|
'p-inputtextarea-resizable': this.props.autoResize
|
|
299
306
|
}, this.props.className);
|
|
300
|
-
var textareaProps =
|
|
301
|
-
return /*#__PURE__*/React__default[
|
|
307
|
+
var textareaProps = utils.ObjectUtils.findDiffKeys(this.props, InputTextareaComponent.defaultProps);
|
|
308
|
+
return /*#__PURE__*/React__default["default"].createElement("textarea", _extends({
|
|
302
309
|
ref: this.elementRef
|
|
303
310
|
}, textareaProps, {
|
|
304
311
|
className: className,
|
|
@@ -321,15 +328,15 @@ _defineProperty(InputTextareaComponent, "defaultProps", {
|
|
|
321
328
|
forwardRef: null
|
|
322
329
|
});
|
|
323
330
|
|
|
324
|
-
var InputTextarea = /*#__PURE__*/React__default[
|
|
325
|
-
return /*#__PURE__*/React__default[
|
|
331
|
+
var InputTextarea = /*#__PURE__*/React__default["default"].forwardRef(function (props, ref) {
|
|
332
|
+
return /*#__PURE__*/React__default["default"].createElement(InputTextareaComponent, _extends({
|
|
326
333
|
forwardRef: ref
|
|
327
334
|
}, props));
|
|
328
335
|
});
|
|
329
336
|
|
|
330
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
337
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
331
338
|
|
|
332
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
339
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
333
340
|
|
|
334
341
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
335
342
|
|
|
@@ -387,14 +394,14 @@ var Mention = /*#__PURE__*/function (_Component) {
|
|
|
387
394
|
}, {
|
|
388
395
|
key: "onOverlayEnter",
|
|
389
396
|
value: function onOverlayEnter() {
|
|
390
|
-
|
|
397
|
+
utils.ZIndexUtils.set('overlay', this.overlayRef.current, PrimeReact__default["default"].autoZIndex, PrimeReact__default["default"].zIndex['overlay']);
|
|
391
398
|
this.alignOverlay();
|
|
392
399
|
}
|
|
393
400
|
}, {
|
|
394
401
|
key: "onOverlayEntering",
|
|
395
402
|
value: function onOverlayEntering() {
|
|
396
403
|
if (this.props.autoHighlight && this.props.suggestions && this.props.suggestions.length) {
|
|
397
|
-
|
|
404
|
+
utils.DomHandler.addClass(this.list.firstChild, 'p-highlight');
|
|
398
405
|
}
|
|
399
406
|
}
|
|
400
407
|
}, {
|
|
@@ -415,7 +422,7 @@ var Mention = /*#__PURE__*/function (_Component) {
|
|
|
415
422
|
}, {
|
|
416
423
|
key: "onOverlayExited",
|
|
417
424
|
value: function onOverlayExited() {
|
|
418
|
-
|
|
425
|
+
utils.ZIndexUtils.clear(this.overlayRef.current);
|
|
419
426
|
this.props.onHide && this.props.onHide();
|
|
420
427
|
}
|
|
421
428
|
}, {
|
|
@@ -425,7 +432,7 @@ var Mention = /*#__PURE__*/function (_Component) {
|
|
|
425
432
|
key = _this$state$trigger.key,
|
|
426
433
|
index = _this$state$trigger.index;
|
|
427
434
|
var value = this.inputRef.current.value;
|
|
428
|
-
var position =
|
|
435
|
+
var position = utils.DomHandler.getCursorOffset(this.inputRef.current, value.substring(0, index - 1), value.substring(index), key);
|
|
429
436
|
this.overlayRef.current.style.transformOrigin = 'top';
|
|
430
437
|
this.overlayRef.current.style.left = "calc(".concat(position.left, "px + 1rem)");
|
|
431
438
|
this.overlayRef.current.style.top = "calc(".concat(position.top, "px + 1.2rem)");
|
|
@@ -433,7 +440,7 @@ var Mention = /*#__PURE__*/function (_Component) {
|
|
|
433
440
|
}, {
|
|
434
441
|
key: "onPanelClick",
|
|
435
442
|
value: function onPanelClick(event) {
|
|
436
|
-
|
|
443
|
+
overlayservice.OverlayService.emit('overlay-click', {
|
|
437
444
|
originalEvent: event,
|
|
438
445
|
target: this.container
|
|
439
446
|
});
|
|
@@ -572,7 +579,7 @@ var Mention = /*#__PURE__*/function (_Component) {
|
|
|
572
579
|
var field = Array.isArray(this.props.field) ? this.props.field[this.props.trigger.findIndex(function (f) {
|
|
573
580
|
return f === _this3.state.trigger.key;
|
|
574
581
|
})] : this.props.field;
|
|
575
|
-
return field ?
|
|
582
|
+
return field ? utils.ObjectUtils.resolveFieldData(value, field) : value;
|
|
576
583
|
}
|
|
577
584
|
|
|
578
585
|
return '';
|
|
@@ -611,7 +618,7 @@ var Mention = /*#__PURE__*/function (_Component) {
|
|
|
611
618
|
key: "onInput",
|
|
612
619
|
value: function onInput(event) {
|
|
613
620
|
this.props.onInput && this.props.onInput(event);
|
|
614
|
-
if (event.target.value.length > 0)
|
|
621
|
+
if (event.target.value.length > 0) utils.DomHandler.addClass(this.container, 'p-inputwrapper-filled');else utils.DomHandler.removeClass(this.container, 'p-inputwrapper-filled');
|
|
615
622
|
}
|
|
616
623
|
}, {
|
|
617
624
|
key: "onKeyUp",
|
|
@@ -630,7 +637,7 @@ var Mention = /*#__PURE__*/function (_Component) {
|
|
|
630
637
|
key: "onKeyDown",
|
|
631
638
|
value: function onKeyDown(event) {
|
|
632
639
|
if (this.state.overlayVisible) {
|
|
633
|
-
var highlightItem =
|
|
640
|
+
var highlightItem = utils.DomHandler.findSingle(this.overlayRef.current, 'li.p-highlight');
|
|
634
641
|
|
|
635
642
|
switch (event.which) {
|
|
636
643
|
//down
|
|
@@ -639,15 +646,15 @@ var Mention = /*#__PURE__*/function (_Component) {
|
|
|
639
646
|
var nextElement = highlightItem.nextElementSibling;
|
|
640
647
|
|
|
641
648
|
if (nextElement) {
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
649
|
+
utils.DomHandler.addClass(nextElement, 'p-highlight');
|
|
650
|
+
utils.DomHandler.removeClass(highlightItem, 'p-highlight');
|
|
651
|
+
utils.DomHandler.scrollInView(this.overlayRef.current, nextElement);
|
|
645
652
|
}
|
|
646
653
|
} else {
|
|
647
|
-
highlightItem =
|
|
654
|
+
highlightItem = utils.DomHandler.findSingle(this.overlayRef.current, 'li');
|
|
648
655
|
|
|
649
656
|
if (highlightItem) {
|
|
650
|
-
|
|
657
|
+
utils.DomHandler.addClass(highlightItem, 'p-highlight');
|
|
651
658
|
}
|
|
652
659
|
}
|
|
653
660
|
|
|
@@ -660,9 +667,9 @@ var Mention = /*#__PURE__*/function (_Component) {
|
|
|
660
667
|
var previousElement = highlightItem.previousElementSibling;
|
|
661
668
|
|
|
662
669
|
if (previousElement) {
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
670
|
+
utils.DomHandler.addClass(previousElement, 'p-highlight');
|
|
671
|
+
utils.DomHandler.removeClass(highlightItem, 'p-highlight');
|
|
672
|
+
utils.DomHandler.scrollInView(this.overlayRef.current, previousElement);
|
|
666
673
|
}
|
|
667
674
|
}
|
|
668
675
|
|
|
@@ -685,7 +692,7 @@ var Mention = /*#__PURE__*/function (_Component) {
|
|
|
685
692
|
|
|
686
693
|
case 13:
|
|
687
694
|
if (highlightItem) {
|
|
688
|
-
this.selectItem(event, this.props.suggestions[
|
|
695
|
+
this.selectItem(event, this.props.suggestions[utils.DomHandler.index(highlightItem)]);
|
|
689
696
|
}
|
|
690
697
|
|
|
691
698
|
event.preventDefault();
|
|
@@ -733,7 +740,7 @@ var Mention = /*#__PURE__*/function (_Component) {
|
|
|
733
740
|
var _this7 = this;
|
|
734
741
|
|
|
735
742
|
if (!this.scrollHandler) {
|
|
736
|
-
this.scrollHandler = new
|
|
743
|
+
this.scrollHandler = new utils.ConnectedOverlayScrollHandler(this.container, function () {
|
|
737
744
|
if (_this7.state.overlayVisible) {
|
|
738
745
|
_this7.hideOverlay();
|
|
739
746
|
}
|
|
@@ -756,7 +763,7 @@ var Mention = /*#__PURE__*/function (_Component) {
|
|
|
756
763
|
|
|
757
764
|
if (!this.resizeListener) {
|
|
758
765
|
this.resizeListener = function () {
|
|
759
|
-
if (_this8.state.overlayVisible && !
|
|
766
|
+
if (_this8.state.overlayVisible && !utils.DomHandler.isTouchDevice()) {
|
|
760
767
|
_this8.hideOverlay();
|
|
761
768
|
}
|
|
762
769
|
};
|
|
@@ -815,8 +822,8 @@ var Mention = /*#__PURE__*/function (_Component) {
|
|
|
815
822
|
});
|
|
816
823
|
}
|
|
817
824
|
|
|
818
|
-
if (!this.isFilled() &&
|
|
819
|
-
|
|
825
|
+
if (!this.isFilled() && utils.DomHandler.hasClass(this.container, 'p-inputwrapper-filled')) {
|
|
826
|
+
utils.DomHandler.removeClass(this.container, 'p-inputwrapper-filled');
|
|
820
827
|
}
|
|
821
828
|
}
|
|
822
829
|
}, {
|
|
@@ -830,24 +837,24 @@ var Mention = /*#__PURE__*/function (_Component) {
|
|
|
830
837
|
this.scrollHandler = null;
|
|
831
838
|
}
|
|
832
839
|
|
|
833
|
-
|
|
840
|
+
utils.ZIndexUtils.clear(this.overlayRef.current);
|
|
834
841
|
}
|
|
835
842
|
}, {
|
|
836
843
|
key: "renderItem",
|
|
837
844
|
value: function renderItem(suggestion, index) {
|
|
838
845
|
var _this9 = this;
|
|
839
846
|
|
|
840
|
-
var content = this.props.itemTemplate ?
|
|
847
|
+
var content = this.props.itemTemplate ? utils.ObjectUtils.getJSXElement(this.props.itemTemplate, suggestion, {
|
|
841
848
|
trigger: this.state.trigger ? this.state.trigger.key : '',
|
|
842
849
|
index: index
|
|
843
850
|
}) : this.formatValue(suggestion);
|
|
844
|
-
return /*#__PURE__*/React__default[
|
|
851
|
+
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
845
852
|
key: index + '_item',
|
|
846
853
|
className: "p-mention-item",
|
|
847
854
|
onClick: function onClick(e) {
|
|
848
855
|
return _this9.onItemClick(e, suggestion);
|
|
849
856
|
}
|
|
850
|
-
}, content, /*#__PURE__*/React__default[
|
|
857
|
+
}, content, /*#__PURE__*/React__default["default"].createElement(ripple.Ripple, null));
|
|
851
858
|
}
|
|
852
859
|
}, {
|
|
853
860
|
key: "renderList",
|
|
@@ -858,7 +865,7 @@ var Mention = /*#__PURE__*/function (_Component) {
|
|
|
858
865
|
var items = this.props.suggestions.map(function (suggestion, index) {
|
|
859
866
|
return _this10.renderItem(suggestion, index);
|
|
860
867
|
});
|
|
861
|
-
return /*#__PURE__*/React__default[
|
|
868
|
+
return /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
862
869
|
ref: function ref(el) {
|
|
863
870
|
return _this10.list = el;
|
|
864
871
|
},
|
|
@@ -871,19 +878,19 @@ var Mention = /*#__PURE__*/function (_Component) {
|
|
|
871
878
|
}, {
|
|
872
879
|
key: "renderPanel",
|
|
873
880
|
value: function renderPanel() {
|
|
874
|
-
var panelClassName =
|
|
881
|
+
var panelClassName = utils.classNames('p-mention-panel p-component', this.props.panelClassName);
|
|
875
882
|
|
|
876
883
|
var panelStyle = _objectSpread({
|
|
877
884
|
maxHeight: this.props.scrollHeight
|
|
878
885
|
}, this.props.panelStyle);
|
|
879
886
|
|
|
880
|
-
var header =
|
|
881
|
-
var footer =
|
|
887
|
+
var header = utils.ObjectUtils.getJSXElement(this.props.headerTemplate, this.props);
|
|
888
|
+
var footer = utils.ObjectUtils.getJSXElement(this.props.footerTemplate, this.props);
|
|
882
889
|
var list = this.renderList();
|
|
883
|
-
var panel = /*#__PURE__*/React__default[
|
|
890
|
+
var panel = /*#__PURE__*/React__default["default"].createElement(csstransition.CSSTransition, {
|
|
884
891
|
nodeRef: this.overlayRef,
|
|
885
892
|
classNames: "p-connected-overlay",
|
|
886
|
-
in: this.state.overlayVisible,
|
|
893
|
+
"in": this.state.overlayVisible,
|
|
887
894
|
timeout: {
|
|
888
895
|
enter: 120,
|
|
889
896
|
exit: 100
|
|
@@ -895,13 +902,13 @@ var Mention = /*#__PURE__*/function (_Component) {
|
|
|
895
902
|
onEntered: this.onOverlayEntered,
|
|
896
903
|
onExit: this.onOverlayExit,
|
|
897
904
|
onExited: this.onOverlayExited
|
|
898
|
-
}, /*#__PURE__*/React__default[
|
|
905
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
899
906
|
ref: this.overlayRef,
|
|
900
907
|
className: panelClassName,
|
|
901
908
|
style: panelStyle,
|
|
902
909
|
onClick: this.onPanelClick
|
|
903
910
|
}, header, list, footer));
|
|
904
|
-
return /*#__PURE__*/React__default[
|
|
911
|
+
return /*#__PURE__*/React__default["default"].createElement(portal.Portal, {
|
|
905
912
|
element: panel,
|
|
906
913
|
appendTo: "self"
|
|
907
914
|
});
|
|
@@ -911,21 +918,21 @@ var Mention = /*#__PURE__*/function (_Component) {
|
|
|
911
918
|
value: function render() {
|
|
912
919
|
var _this11 = this;
|
|
913
920
|
|
|
914
|
-
var containerClassName =
|
|
921
|
+
var containerClassName = utils.classNames('p-mention p-component p-inputwrapper', {
|
|
915
922
|
'p-inputwrapper-filled': this.isFilled(),
|
|
916
923
|
'p-inputwrapper-focus': this.state.focused
|
|
917
924
|
}, this.props.className);
|
|
918
|
-
var inputClassName =
|
|
919
|
-
var inputProps =
|
|
925
|
+
var inputClassName = utils.classNames('p-mention-input', this.props.inputClassName);
|
|
926
|
+
var inputProps = utils.ObjectUtils.findDiffKeys(this.props, Mention.defaultProps);
|
|
920
927
|
var panel = this.renderPanel();
|
|
921
|
-
return /*#__PURE__*/React__default[
|
|
928
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
922
929
|
ref: function ref(el) {
|
|
923
930
|
return _this11.container = el;
|
|
924
931
|
},
|
|
925
932
|
id: this.props.id,
|
|
926
933
|
className: containerClassName,
|
|
927
934
|
style: this.props.style
|
|
928
|
-
}, /*#__PURE__*/React__default[
|
|
935
|
+
}, /*#__PURE__*/React__default["default"].createElement(InputTextarea, _extends({
|
|
929
936
|
ref: this.inputRef,
|
|
930
937
|
id: this.props.inputId
|
|
931
938
|
}, inputProps, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/core");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(e);function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function o(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 r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),e}function a(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 p(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 c(e){return(c="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 h(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return a(e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(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=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(){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 m=function(n){p(d,e.Component);var s,u,c=(s=d,u=g(),function(){var e,t=f(s);if(u){var n=f(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return h(this,e)});function d(t){var n;return o(this,d),(n=c.call(this,t)).onFocus=n.onFocus.bind(a(n)),n.onBlur=n.onBlur.bind(a(n)),n.onKeyUp=n.onKeyUp.bind(a(n)),n.onInput=n.onInput.bind(a(n)),n.elementRef=e.createRef(n.props.forwardRef),n}return l(d,[{key:"onFocus",value:function(e){this.props.autoResize&&this.resize(),this.props.onFocus&&this.props.onFocus(e)}},{key:"onBlur",value:function(e){this.props.autoResize&&this.resize(),this.props.onBlur&&this.props.onBlur(e)}},{key:"onKeyUp",value:function(e){this.props.autoResize&&this.resize(),this.props.onKeyUp&&this.props.onKeyUp(e)}},{key:"onInput",value:function(e){this.props.autoResize&&this.resize(),e.target.value.length>0?t.DomHandler.addClass(e.target,"p-filled"):t.DomHandler.removeClass(e.target,"p-filled"),this.props.onInput&&this.props.onInput(e)}},{key:"resize",value:function(e){var n=this.elementRef&&this.elementRef.current;n&&t.DomHandler.isVisible(n)&&(this.cachedScrollHeight||(this.cachedScrollHeight=n.scrollHeight,n.style.overflow="hidden"),(this.cachedScrollHeight!==n.scrollHeight||e)&&(n.style.height="",n.style.height=n.scrollHeight+"px",parseFloat(n.style.height)>=parseFloat(n.style.maxHeight)?(n.style.overflowY="scroll",n.style.height=n.style.maxHeight):n.style.overflow="hidden",this.cachedScrollHeight=n.scrollHeight))}},{key:"isFilled",value:function(){return null!=this.props.value&&this.props.value.toString().length>0||null!=this.props.defaultValue&&this.props.defaultValue.toString().length>0||this.elementRef&&this.elementRef.current&&this.elementRef.current.value.toString().length>0}},{key:"updateForwardRef",value:function(){var e=this.props.forwardRef;e&&("function"==typeof e?e(this.elementRef.current):e.current=this.elementRef.current)}},{key:"componentDidMount",value:function(){this.updateForwardRef(),this.props.tooltip&&this.renderTooltip(),this.props.autoResize&&this.resize(!0)}},{key:"componentDidUpdate",value:function(e){e.tooltip===this.props.tooltip&&e.tooltipOptions===this.props.tooltipOptions||(this.tooltip?this.tooltip.update(v({content:this.props.tooltip},this.props.tooltipOptions||{})):this.renderTooltip()),this.props.autoResize&&this.resize(!0)}},{key:"componentWillUnmount",value:function(){this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)}},{key:"renderTooltip",value:function(){this.tooltip=t.tip({target:this.elementRef.current,content:this.props.tooltip,options:this.props.tooltipOptions})}},{key:"render",value:function(){var e=t.classNames("p-inputtextarea p-inputtext p-component",{"p-disabled":this.props.disabled,"p-filled":this.isFilled(),"p-inputtextarea-resizable":this.props.autoResize},this.props.className),n=t.ObjectUtils.findDiffKeys(this.props,d.defaultProps);return r.default.createElement("textarea",i({ref:this.elementRef},n,{className:e,onFocus:this.onFocus,onBlur:this.onBlur,onKeyUp:this.onKeyUp,onInput:this.onInput}))}}]),d}();d(m,"defaultProps",{autoResize:!1,tooltip:null,tooltipOptions:null,onInput:null,forwardRef:null});var b=r.default.forwardRef((function(e,t){return r.default.createElement(m,i({forwardRef:t},e))}));function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}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}}var w=function(n){p(d,e.Component);var s,u,c=(s=d,u=R(),function(){var e,t=f(s);if(u){var n=f(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return h(this,e)});function d(t){var n;return o(this,d),(n=c.call(this,t)).state={overlayVisible:!1,focused:!1,searching:!1,trigger:null},n.onOverlayEnter=n.onOverlayEnter.bind(a(n)),n.onOverlayEntering=n.onOverlayEntering.bind(a(n)),n.onOverlayEntered=n.onOverlayEntered.bind(a(n)),n.onOverlayExit=n.onOverlayExit.bind(a(n)),n.onOverlayExited=n.onOverlayExited.bind(a(n)),n.onFocus=n.onFocus.bind(a(n)),n.onBlur=n.onBlur.bind(a(n)),n.onKeyDown=n.onKeyDown.bind(a(n)),n.onChange=n.onChange.bind(a(n)),n.onInput=n.onInput.bind(a(n)),n.onKeyUp=n.onKeyUp.bind(a(n)),n.onPanelClick=n.onPanelClick.bind(a(n)),n.overlayRef=e.createRef(),n.inputRef=e.createRef(n.props.inputRef),n}return l(d,[{key:"showOverlay",value:function(){this.setState({overlayVisible:!0})}},{key:"hideOverlay",value:function(){this.setState({overlayVisible:!1,searching:!1,trigger:null})}},{key:"onOverlayEnter",value:function(){t.ZIndexUtils.set("overlay",this.overlayRef.current),this.alignOverlay()}},{key:"onOverlayEntering",value:function(){this.props.autoHighlight&&this.props.suggestions&&this.props.suggestions.length&&t.DomHandler.addClass(this.list.firstChild,"p-highlight")}},{key:"onOverlayEntered",value:function(){this.bindDocumentClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.props.onShow&&this.props.onShow()}},{key:"onOverlayExit",value:function(){this.unbindDocumentClickListener(),this.unbindScrollListener(),this.unbindResizeListener()}},{key:"onOverlayExited",value:function(){t.ZIndexUtils.clear(this.overlayRef.current),this.props.onHide&&this.props.onHide()}},{key:"alignOverlay",value:function(){var e=this.state.trigger,n=e.key,r=e.index,i=this.inputRef.current.value,o=t.DomHandler.getCursorOffset(this.inputRef.current,i.substring(0,r-1),i.substring(r),n);this.overlayRef.current.style.transformOrigin="top",this.overlayRef.current.style.left="calc(".concat(o.left,"px + 1rem)"),this.overlayRef.current.style.top="calc(".concat(o.top,"px + 1.2rem)")}},{key:"onPanelClick",value:function(e){t.OverlayService.emit("overlay-click",{originalEvent:e,target:this.container})}},{key:"getTrigger",value:function(e,t,n){if(!this.state.trigger){var r=Array.isArray(this.props.trigger)?this.props.trigger.find((function(e){return e===t})):this.props.trigger===t?this.props.trigger:null;if(r)return{key:r,index:n};var i=e.substring(0,n).lastIndexOf(" "),o=this.getLatestTrigger(e,n);if(o.index>i)return o}return this.state.trigger}},{key:"getLatestTrigger",value:function(e,t){if(Array.isArray(this.props.trigger)){var n={};return this.props.trigger.forEach((function(r){var i=e.substring(0,t).lastIndexOf(r);-1!==i&&(i>n.index||!n.index)&&(n={key:r,index:-1!==i?i+1:-1})})),n}var r=e.substring(0,t).lastIndexOf(this.props.trigger);return{key:this.props.trigger,index:-1!==r?r+1:-1}}},{key:"onSearch",value:function(e){var t=this;this.timeout&&clearTimeout(this.timeout);var n=e.target,r=n.value,i=n.selectionStart,o=r.substring(i-1,i);if(" "!==o){var s=this.getTrigger(r,o,i);if(s&&s.index>-1){var l=r.substring(s.index,i);this.timeout=setTimeout((function(){t.search(e,l,s)}),this.props.delay)}}else this.hideOverlay()}},{key:"search",value:function(e,t,n){this.props.onSearch&&(this.setState({searching:!0,trigger:n}),this.props.onSearch({originalEvent:e,trigger:n.key,query:t}))}},{key:"selectItem",value:function(e,t){var n=this.inputRef.current.value,r=e.target.selectionStart,i=this.state.trigger,o=n.indexOf(" ",i.index),s=n.substring(i.index,o>-1?o:r),l=this.formatValue(t).replace(/\s+/g,"");if(s.trim()!==l){for(var a=0;a<l.length;){var u=l.charAt(a),p=s.charAt(a);if(u!==p&&" "!==p)break;a++}var c=n.substring(0,i.index),h=n.substring(i.index+a);this.inputRef.current.value="".concat(c).concat(l," ").concat(h),this.props.onChange&&this.props.onChange(e)}var f=i.index+l.length+1;this.inputRef.current.setSelectionRange(f,f),this.hideOverlay(),this.props.onSelect&&this.props.onSelect({originalEvent:e,suggestion:t})}},{key:"formatValue",value:function(e){var n=this;if(e){var r=Array.isArray(this.props.field)?this.props.field[this.props.trigger.findIndex((function(e){return e===n.state.trigger.key}))]:this.props.field;return r?t.ObjectUtils.resolveFieldData(e,r):e}return""}},{key:"onItemClick",value:function(e,t){this.inputRef.current.focus(),this.selectItem(e,t)}},{key:"onFocus",value:function(e){var t=this;e.persist(),this.setState({focused:!0},(function(){t.props.onFocus&&t.props.onFocus(e)}))}},{key:"onBlur",value:function(e){var t=this;e.persist(),this.setState({focused:!1},(function(){t.props.onBlur&&t.props.onBlur(e)}))}},{key:"onInput",value:function(e){this.props.onInput&&this.props.onInput(e),e.target.value.length>0?t.DomHandler.addClass(this.container,"p-inputwrapper-filled"):t.DomHandler.removeClass(this.container,"p-inputwrapper-filled")}},{key:"onKeyUp",value:function(e){37!==e.which&&39!==e.which||this.onSearch(e)}},{key:"onChange",value:function(e){this.props.onChange&&this.props.onChange(e),this.onSearch(e)}},{key:"onKeyDown",value:function(e){if(this.state.overlayVisible){var n=t.DomHandler.findSingle(this.overlayRef.current,"li.p-highlight");switch(e.which){case 40:if(n){var r=n.nextElementSibling;r&&(t.DomHandler.addClass(r,"p-highlight"),t.DomHandler.removeClass(n,"p-highlight"),t.DomHandler.scrollInView(this.overlayRef.current,r))}else(n=t.DomHandler.findSingle(this.overlayRef.current,"li"))&&t.DomHandler.addClass(n,"p-highlight");e.preventDefault();break;case 38:if(n){var i=n.previousElementSibling;i&&(t.DomHandler.addClass(i,"p-highlight"),t.DomHandler.removeClass(n,"p-highlight"),t.DomHandler.scrollInView(this.overlayRef.current,i))}e.preventDefault();break;case 8:var o=e.target,s=o.selectionStart;o.value.substring(s-1,s)===this.state.trigger.key&&this.hideOverlay();break;case 13:n&&this.selectItem(e,this.props.suggestions[t.DomHandler.index(n)]),e.preventDefault();break;case 27:this.hideOverlay(),e.preventDefault()}}}},{key:"bindDocumentClickListener",value:function(){var e=this;this.documentClickListener||(this.documentClickListener=function(t){3!==t.which&&e.state.overlayVisible&&e.isOutsideClicked(t)&&e.hideOverlay()},document.addEventListener("click",this.documentClickListener))}},{key:"unbindDocumentClickListener",value:function(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)}},{key:"bindScrollListener",value:function(){var e=this;this.scrollHandler||(this.scrollHandler=new t.ConnectedOverlayScrollHandler(this.container,(function(){e.state.overlayVisible&&e.hideOverlay()}))),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.hideOverlay()},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.overlayRef&&this.overlayRef.current&&!this.overlayRef.current.contains(e.target)}},{key:"isFilled",value:function(){return null!=this.props.value&&this.props.value.toString().length>0||null!=this.props.defaultValue&&this.props.defaultValue.toString().length>0||this.inputRef&&this.inputRef.current&&this.inputRef.current.value.toString().length>0}},{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()}},{key:"componentDidUpdate",value:function(e){e.suggestions!==this.props.suggestions&&this.state.searching&&(this.props.suggestions&&this.props.suggestions.length?this.showOverlay():this.hideOverlay(),this.state.overlayVisible&&this.alignOverlay(),this.setState({searching:!1})),!this.isFilled()&&t.DomHandler.hasClass(this.container,"p-inputwrapper-filled")&&t.DomHandler.removeClass(this.container,"p-inputwrapper-filled")}},{key:"componentWillUnmount",value:function(){this.unbindDocumentClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),t.ZIndexUtils.clear(this.overlayRef.current)}},{key:"renderItem",value:function(e,n){var i=this,o=this.props.itemTemplate?t.ObjectUtils.getJSXElement(this.props.itemTemplate,e,{trigger:this.state.trigger?this.state.trigger.key:"",index:n}):this.formatValue(e);return r.default.createElement("li",{key:n+"_item",className:"p-mention-item",onClick:function(t){return i.onItemClick(t,e)}},o,r.default.createElement(t.Ripple,null))}},{key:"renderList",value:function(){var e=this;if(this.props.suggestions){var t=this.props.suggestions.map((function(t,n){return e.renderItem(t,n)}));return r.default.createElement("ul",{ref:function(t){return e.list=t},className:"p-mention-items"},t)}return null}},{key:"renderPanel",value:function(){var e=t.classNames("p-mention-panel p-component",this.props.panelClassName),n=k({maxHeight:this.props.scrollHeight},this.props.panelStyle),i=t.ObjectUtils.getJSXElement(this.props.headerTemplate,this.props),o=t.ObjectUtils.getJSXElement(this.props.footerTemplate,this.props),s=this.renderList();return r.default.createElement(t.Portal,{element:r.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,onEntering:this.onOverlayEntering,onEntered:this.onOverlayEntered,onExit:this.onOverlayExit,onExited:this.onOverlayExited},r.default.createElement("div",{ref:this.overlayRef,className:e,style:n,onClick:this.onPanelClick},i,s,o)),appendTo:"self"})}},{key:"render",value:function(){var e=this,n=t.classNames("p-mention p-component p-inputwrapper",{"p-inputwrapper-filled":this.isFilled(),"p-inputwrapper-focus":this.state.focused},this.props.className),o=t.classNames("p-mention-input",this.props.inputClassName),s=t.ObjectUtils.findDiffKeys(this.props,d.defaultProps),l=this.renderPanel();return r.default.createElement("div",{ref:function(t){return e.container=t},id:this.props.id,className:n,style:this.props.style},r.default.createElement(b,i({ref:this.inputRef,id:this.props.inputId},s,{className:o,style:this.props.inputStyle,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onInput:this.onInput,onKeyUp:this.onKeyUp,onChange:this.onChange})),l)}}]),d}();d(w,"defaultProps",{id:null,inputId:null,inputRef:null,style:null,className:null,trigger:"@",suggestions:null,field:null,inputStyle:null,inputClassName:null,panelClassName:null,panelStyle:null,scrollHeight:"200px",autoHighlight:!0,delay:0,headerTemplate:null,footerTemplate:null,itemTemplate:null,transitionOptions:null,onChange:null,onInput:null,onSearch:null,onSelect:null,onFocus:null,onBlur:null,onShow:null,onHide:null}),exports.Mention=w;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/utils"),n=require("primereact/ripple"),r=require("primereact/overlayservice"),i=require("primereact/csstransition"),o=require("primereact/portal"),s=require("primereact/tooltip"),l=require("primereact/api");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=a(e),p=a(l);function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e,t){return v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},v(e,t)}function g(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&&v(e,t)}function m(e){return m="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},m(e)}function b(e,t){if(t&&("object"===m(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return y(e)}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var E=function(n){g(l,e.Component);var r,i,o=(r=l,i=S(),function(){var e,t=O(r);if(i){var n=O(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return b(this,e)});function l(t){var n;return h(this,l),(n=o.call(this,t)).onFocus=n.onFocus.bind(y(n)),n.onBlur=n.onBlur.bind(y(n)),n.onKeyUp=n.onKeyUp.bind(y(n)),n.onInput=n.onInput.bind(y(n)),n.elementRef=e.createRef(n.props.forwardRef),n}return d(l,[{key:"onFocus",value:function(e){this.props.autoResize&&this.resize(),this.props.onFocus&&this.props.onFocus(e)}},{key:"onBlur",value:function(e){this.props.autoResize&&this.resize(),this.props.onBlur&&this.props.onBlur(e)}},{key:"onKeyUp",value:function(e){this.props.autoResize&&this.resize(),this.props.onKeyUp&&this.props.onKeyUp(e)}},{key:"onInput",value:function(e){this.props.autoResize&&this.resize(),e.target.value.length>0?t.DomHandler.addClass(e.target,"p-filled"):t.DomHandler.removeClass(e.target,"p-filled"),this.props.onInput&&this.props.onInput(e)}},{key:"resize",value:function(e){var n=this.elementRef&&this.elementRef.current;n&&t.DomHandler.isVisible(n)&&(this.cachedScrollHeight||(this.cachedScrollHeight=n.scrollHeight,n.style.overflow="hidden"),(this.cachedScrollHeight!==n.scrollHeight||e)&&(n.style.height="",n.style.height=n.scrollHeight+"px",parseFloat(n.style.height)>=parseFloat(n.style.maxHeight)?(n.style.overflowY="scroll",n.style.height=n.style.maxHeight):n.style.overflow="hidden",this.cachedScrollHeight=n.scrollHeight))}},{key:"isFilled",value:function(){return null!=this.props.value&&this.props.value.toString().length>0||null!=this.props.defaultValue&&this.props.defaultValue.toString().length>0||this.elementRef&&this.elementRef.current&&this.elementRef.current.value.toString().length>0}},{key:"updateForwardRef",value:function(){var e=this.props.forwardRef;e&&("function"==typeof e?e(this.elementRef.current):e.current=this.elementRef.current)}},{key:"componentDidMount",value:function(){this.updateForwardRef(),this.props.tooltip&&this.renderTooltip(),this.props.autoResize&&this.resize(!0)}},{key:"componentDidUpdate",value:function(e){e.tooltip===this.props.tooltip&&e.tooltipOptions===this.props.tooltipOptions||(this.tooltip?this.tooltip.update(w({content:this.props.tooltip},this.props.tooltipOptions||{})):this.renderTooltip()),this.props.autoResize&&this.resize(!0)}},{key:"componentWillUnmount",value:function(){this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)}},{key:"renderTooltip",value:function(){this.tooltip=s.tip({target:this.elementRef.current,content:this.props.tooltip,options:this.props.tooltipOptions})}},{key:"render",value:function(){var e=t.classNames("p-inputtextarea p-inputtext p-component",{"p-disabled":this.props.disabled,"p-filled":this.isFilled(),"p-inputtextarea-resizable":this.props.autoResize},this.props.className),n=t.ObjectUtils.findDiffKeys(this.props,l.defaultProps);return u.default.createElement("textarea",c({ref:this.elementRef},n,{className:e,onFocus:this.onFocus,onBlur:this.onBlur,onKeyUp:this.onKeyUp,onInput:this.onInput}))}}]),l}();k(E,"defaultProps",{autoResize:!1,tooltip:null,tooltipOptions:null,onInput:null,forwardRef:null});var x=u.default.forwardRef((function(e,t){return u.default.createElement(E,c({forwardRef:t},e))}));function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function H(){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 j=function(s){g(v,e.Component);var l,a,f=(l=v,a=H(),function(){var e,t=O(l);if(a){var n=O(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return b(this,e)});function v(t){var n;return h(this,v),(n=f.call(this,t)).state={overlayVisible:!1,focused:!1,searching:!1,trigger:null},n.onOverlayEnter=n.onOverlayEnter.bind(y(n)),n.onOverlayEntering=n.onOverlayEntering.bind(y(n)),n.onOverlayEntered=n.onOverlayEntered.bind(y(n)),n.onOverlayExit=n.onOverlayExit.bind(y(n)),n.onOverlayExited=n.onOverlayExited.bind(y(n)),n.onFocus=n.onFocus.bind(y(n)),n.onBlur=n.onBlur.bind(y(n)),n.onKeyDown=n.onKeyDown.bind(y(n)),n.onChange=n.onChange.bind(y(n)),n.onInput=n.onInput.bind(y(n)),n.onKeyUp=n.onKeyUp.bind(y(n)),n.onPanelClick=n.onPanelClick.bind(y(n)),n.overlayRef=e.createRef(),n.inputRef=e.createRef(n.props.inputRef),n}return d(v,[{key:"showOverlay",value:function(){this.setState({overlayVisible:!0})}},{key:"hideOverlay",value:function(){this.setState({overlayVisible:!1,searching:!1,trigger:null})}},{key:"onOverlayEnter",value:function(){t.ZIndexUtils.set("overlay",this.overlayRef.current,p.default.autoZIndex,p.default.zIndex.overlay),this.alignOverlay()}},{key:"onOverlayEntering",value:function(){this.props.autoHighlight&&this.props.suggestions&&this.props.suggestions.length&&t.DomHandler.addClass(this.list.firstChild,"p-highlight")}},{key:"onOverlayEntered",value:function(){this.bindDocumentClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.props.onShow&&this.props.onShow()}},{key:"onOverlayExit",value:function(){this.unbindDocumentClickListener(),this.unbindScrollListener(),this.unbindResizeListener()}},{key:"onOverlayExited",value:function(){t.ZIndexUtils.clear(this.overlayRef.current),this.props.onHide&&this.props.onHide()}},{key:"alignOverlay",value:function(){var e=this.state.trigger,n=e.key,r=e.index,i=this.inputRef.current.value,o=t.DomHandler.getCursorOffset(this.inputRef.current,i.substring(0,r-1),i.substring(r),n);this.overlayRef.current.style.transformOrigin="top",this.overlayRef.current.style.left="calc(".concat(o.left,"px + 1rem)"),this.overlayRef.current.style.top="calc(".concat(o.top,"px + 1.2rem)")}},{key:"onPanelClick",value:function(e){r.OverlayService.emit("overlay-click",{originalEvent:e,target:this.container})}},{key:"getTrigger",value:function(e,t,n){if(!this.state.trigger){var r=Array.isArray(this.props.trigger)?this.props.trigger.find((function(e){return e===t})):this.props.trigger===t?this.props.trigger:null;if(r)return{key:r,index:n};var i=e.substring(0,n).lastIndexOf(" "),o=this.getLatestTrigger(e,n);if(o.index>i)return o}return this.state.trigger}},{key:"getLatestTrigger",value:function(e,t){if(Array.isArray(this.props.trigger)){var n={};return this.props.trigger.forEach((function(r){var i=e.substring(0,t).lastIndexOf(r);-1!==i&&(i>n.index||!n.index)&&(n={key:r,index:-1!==i?i+1:-1})})),n}var r=e.substring(0,t).lastIndexOf(this.props.trigger);return{key:this.props.trigger,index:-1!==r?r+1:-1}}},{key:"onSearch",value:function(e){var t=this;this.timeout&&clearTimeout(this.timeout);var n=e.target,r=n.value,i=n.selectionStart,o=r.substring(i-1,i);if(" "!==o){var s=this.getTrigger(r,o,i);if(s&&s.index>-1){var l=r.substring(s.index,i);this.timeout=setTimeout((function(){t.search(e,l,s)}),this.props.delay)}}else this.hideOverlay()}},{key:"search",value:function(e,t,n){this.props.onSearch&&(this.setState({searching:!0,trigger:n}),this.props.onSearch({originalEvent:e,trigger:n.key,query:t}))}},{key:"selectItem",value:function(e,t){var n=this.inputRef.current.value,r=e.target.selectionStart,i=this.state.trigger,o=n.indexOf(" ",i.index),s=n.substring(i.index,o>-1?o:r),l=this.formatValue(t).replace(/\s+/g,"");if(s.trim()!==l){for(var a=0;a<l.length;){var u=l.charAt(a),p=s.charAt(a);if(u!==p&&" "!==p)break;a++}var c=n.substring(0,i.index),h=n.substring(i.index+a);this.inputRef.current.value="".concat(c).concat(l," ").concat(h),this.props.onChange&&this.props.onChange(e)}var f=i.index+l.length+1;this.inputRef.current.setSelectionRange(f,f),this.hideOverlay(),this.props.onSelect&&this.props.onSelect({originalEvent:e,suggestion:t})}},{key:"formatValue",value:function(e){var n=this;if(e){var r=Array.isArray(this.props.field)?this.props.field[this.props.trigger.findIndex((function(e){return e===n.state.trigger.key}))]:this.props.field;return r?t.ObjectUtils.resolveFieldData(e,r):e}return""}},{key:"onItemClick",value:function(e,t){this.inputRef.current.focus(),this.selectItem(e,t)}},{key:"onFocus",value:function(e){var t=this;e.persist(),this.setState({focused:!0},(function(){t.props.onFocus&&t.props.onFocus(e)}))}},{key:"onBlur",value:function(e){var t=this;e.persist(),this.setState({focused:!1},(function(){t.props.onBlur&&t.props.onBlur(e)}))}},{key:"onInput",value:function(e){this.props.onInput&&this.props.onInput(e),e.target.value.length>0?t.DomHandler.addClass(this.container,"p-inputwrapper-filled"):t.DomHandler.removeClass(this.container,"p-inputwrapper-filled")}},{key:"onKeyUp",value:function(e){37!==e.which&&39!==e.which||this.onSearch(e)}},{key:"onChange",value:function(e){this.props.onChange&&this.props.onChange(e),this.onSearch(e)}},{key:"onKeyDown",value:function(e){if(this.state.overlayVisible){var n=t.DomHandler.findSingle(this.overlayRef.current,"li.p-highlight");switch(e.which){case 40:if(n){var r=n.nextElementSibling;r&&(t.DomHandler.addClass(r,"p-highlight"),t.DomHandler.removeClass(n,"p-highlight"),t.DomHandler.scrollInView(this.overlayRef.current,r))}else(n=t.DomHandler.findSingle(this.overlayRef.current,"li"))&&t.DomHandler.addClass(n,"p-highlight");e.preventDefault();break;case 38:if(n){var i=n.previousElementSibling;i&&(t.DomHandler.addClass(i,"p-highlight"),t.DomHandler.removeClass(n,"p-highlight"),t.DomHandler.scrollInView(this.overlayRef.current,i))}e.preventDefault();break;case 8:var o=e.target,s=o.selectionStart;o.value.substring(s-1,s)===this.state.trigger.key&&this.hideOverlay();break;case 13:n&&this.selectItem(e,this.props.suggestions[t.DomHandler.index(n)]),e.preventDefault();break;case 27:this.hideOverlay(),e.preventDefault()}}}},{key:"bindDocumentClickListener",value:function(){var e=this;this.documentClickListener||(this.documentClickListener=function(t){3!==t.which&&e.state.overlayVisible&&e.isOutsideClicked(t)&&e.hideOverlay()},document.addEventListener("click",this.documentClickListener))}},{key:"unbindDocumentClickListener",value:function(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)}},{key:"bindScrollListener",value:function(){var e=this;this.scrollHandler||(this.scrollHandler=new t.ConnectedOverlayScrollHandler(this.container,(function(){e.state.overlayVisible&&e.hideOverlay()}))),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.hideOverlay()},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.overlayRef&&this.overlayRef.current&&!this.overlayRef.current.contains(e.target)}},{key:"isFilled",value:function(){return null!=this.props.value&&this.props.value.toString().length>0||null!=this.props.defaultValue&&this.props.defaultValue.toString().length>0||this.inputRef&&this.inputRef.current&&this.inputRef.current.value.toString().length>0}},{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()}},{key:"componentDidUpdate",value:function(e){e.suggestions!==this.props.suggestions&&this.state.searching&&(this.props.suggestions&&this.props.suggestions.length?this.showOverlay():this.hideOverlay(),this.state.overlayVisible&&this.alignOverlay(),this.setState({searching:!1})),!this.isFilled()&&t.DomHandler.hasClass(this.container,"p-inputwrapper-filled")&&t.DomHandler.removeClass(this.container,"p-inputwrapper-filled")}},{key:"componentWillUnmount",value:function(){this.unbindDocumentClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),t.ZIndexUtils.clear(this.overlayRef.current)}},{key:"renderItem",value:function(e,r){var i=this,o=this.props.itemTemplate?t.ObjectUtils.getJSXElement(this.props.itemTemplate,e,{trigger:this.state.trigger?this.state.trigger.key:"",index:r}):this.formatValue(e);return u.default.createElement("li",{key:r+"_item",className:"p-mention-item",onClick:function(t){return i.onItemClick(t,e)}},o,u.default.createElement(n.Ripple,null))}},{key:"renderList",value:function(){var e=this;if(this.props.suggestions){var t=this.props.suggestions.map((function(t,n){return e.renderItem(t,n)}));return u.default.createElement("ul",{ref:function(t){return e.list=t},className:"p-mention-items"},t)}return null}},{key:"renderPanel",value:function(){var e=t.classNames("p-mention-panel p-component",this.props.panelClassName),n=D({maxHeight:this.props.scrollHeight},this.props.panelStyle),r=t.ObjectUtils.getJSXElement(this.props.headerTemplate,this.props),s=t.ObjectUtils.getJSXElement(this.props.footerTemplate,this.props),l=this.renderList();return u.default.createElement(o.Portal,{element:u.default.createElement(i.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,onEntering:this.onOverlayEntering,onEntered:this.onOverlayEntered,onExit:this.onOverlayExit,onExited:this.onOverlayExited},u.default.createElement("div",{ref:this.overlayRef,className:e,style:n,onClick:this.onPanelClick},r,l,s)),appendTo:"self"})}},{key:"render",value:function(){var e=this,n=t.classNames("p-mention p-component p-inputwrapper",{"p-inputwrapper-filled":this.isFilled(),"p-inputwrapper-focus":this.state.focused},this.props.className),r=t.classNames("p-mention-input",this.props.inputClassName),i=t.ObjectUtils.findDiffKeys(this.props,v.defaultProps),o=this.renderPanel();return u.default.createElement("div",{ref:function(t){return e.container=t},id:this.props.id,className:n,style:this.props.style},u.default.createElement(x,c({ref:this.inputRef,id:this.props.inputId},i,{className:r,style:this.props.inputStyle,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onInput:this.onInput,onKeyUp:this.onKeyUp,onChange:this.onChange})),o)}}]),v}();k(j,"defaultProps",{id:null,inputId:null,inputRef:null,style:null,className:null,trigger:"@",suggestions:null,field:null,inputStyle:null,inputClassName:null,panelClassName:null,panelStyle:null,scrollHeight:"200px",autoHighlight:!0,delay:0,headerTemplate:null,footerTemplate:null,itemTemplate:null,transitionOptions:null,onChange:null,onInput:null,onSearch:null,onSelect:null,onFocus:null,onBlur:null,onShow:null,onHide:null}),exports.Mention=j;
|
package/mention/mention.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { CSSTransitionProps } from '../csstransition';
|
|
2
3
|
|
|
3
4
|
type MentionTriggerType = string | string[];
|
|
4
5
|
|
|
@@ -45,7 +46,7 @@ export interface MentionProps {
|
|
|
45
46
|
headerTemplate?: MentionHeaderTemplateType;
|
|
46
47
|
footerTemplate?: MentionFooterTemplateType;
|
|
47
48
|
itemTemplate?: MentionItemTemplateType;
|
|
48
|
-
transitionOptions?:
|
|
49
|
+
transitionOptions?: CSSTransitionProps;
|
|
49
50
|
onChange?(event: React.FormEvent<HTMLInputElement>): void;
|
|
50
51
|
onInput?(event: React.FormEvent<HTMLInputElement>): void;
|
|
51
52
|
onSearch?(e: MentionSearchParams): void;
|
package/mention/mention.esm.js
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import React, { createRef, Component } from 'react';
|
|
2
|
-
import { DomHandler,
|
|
2
|
+
import { DomHandler, classNames, ObjectUtils, ZIndexUtils, ConnectedOverlayScrollHandler } from 'primereact/utils';
|
|
3
|
+
import { Ripple } from 'primereact/ripple';
|
|
4
|
+
import { OverlayService } from 'primereact/overlayservice';
|
|
5
|
+
import { CSSTransition } from 'primereact/csstransition';
|
|
6
|
+
import { Portal } from 'primereact/portal';
|
|
7
|
+
import { tip } from 'primereact/tooltip';
|
|
8
|
+
import PrimeReact from 'primereact/api';
|
|
3
9
|
|
|
4
10
|
function _extends() {
|
|
5
11
|
_extends = Object.assign || function (target) {
|
|
@@ -38,6 +44,9 @@ function _defineProperties(target, props) {
|
|
|
38
44
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
39
45
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
40
46
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
47
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
48
|
+
writable: false
|
|
49
|
+
});
|
|
41
50
|
return Constructor;
|
|
42
51
|
}
|
|
43
52
|
|
|
@@ -70,23 +79,20 @@ function _inherits(subClass, superClass) {
|
|
|
70
79
|
configurable: true
|
|
71
80
|
}
|
|
72
81
|
});
|
|
82
|
+
Object.defineProperty(subClass, "prototype", {
|
|
83
|
+
writable: false
|
|
84
|
+
});
|
|
73
85
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
74
86
|
}
|
|
75
87
|
|
|
76
88
|
function _typeof(obj) {
|
|
77
89
|
"@babel/helpers - typeof";
|
|
78
90
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
_typeof = function _typeof(obj) {
|
|
85
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
return _typeof(obj);
|
|
91
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
92
|
+
return typeof obj;
|
|
93
|
+
} : function (obj) {
|
|
94
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
95
|
+
}, _typeof(obj);
|
|
90
96
|
}
|
|
91
97
|
|
|
92
98
|
function _possibleConstructorReturn(self, call) {
|
|
@@ -121,9 +127,9 @@ function _defineProperty(obj, key, value) {
|
|
|
121
127
|
return obj;
|
|
122
128
|
}
|
|
123
129
|
|
|
124
|
-
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
130
|
+
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
125
131
|
|
|
126
|
-
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
132
|
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
127
133
|
|
|
128
134
|
function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
129
135
|
|
|
@@ -319,9 +325,9 @@ var InputTextarea = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
319
325
|
}, props));
|
|
320
326
|
});
|
|
321
327
|
|
|
322
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
328
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
323
329
|
|
|
324
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
330
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
325
331
|
|
|
326
332
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
327
333
|
|
|
@@ -379,7 +385,7 @@ var Mention = /*#__PURE__*/function (_Component) {
|
|
|
379
385
|
}, {
|
|
380
386
|
key: "onOverlayEnter",
|
|
381
387
|
value: function onOverlayEnter() {
|
|
382
|
-
ZIndexUtils.set('overlay', this.overlayRef.current);
|
|
388
|
+
ZIndexUtils.set('overlay', this.overlayRef.current, PrimeReact.autoZIndex, PrimeReact.zIndex['overlay']);
|
|
383
389
|
this.alignOverlay();
|
|
384
390
|
}
|
|
385
391
|
}, {
|
|
@@ -748,7 +754,7 @@ var Mention = /*#__PURE__*/function (_Component) {
|
|
|
748
754
|
|
|
749
755
|
if (!this.resizeListener) {
|
|
750
756
|
this.resizeListener = function () {
|
|
751
|
-
if (_this8.state.overlayVisible && !DomHandler.
|
|
757
|
+
if (_this8.state.overlayVisible && !DomHandler.isTouchDevice()) {
|
|
752
758
|
_this8.hideOverlay();
|
|
753
759
|
}
|
|
754
760
|
};
|
|
@@ -875,7 +881,7 @@ var Mention = /*#__PURE__*/function (_Component) {
|
|
|
875
881
|
var panel = /*#__PURE__*/React.createElement(CSSTransition, {
|
|
876
882
|
nodeRef: this.overlayRef,
|
|
877
883
|
classNames: "p-connected-overlay",
|
|
878
|
-
in: this.state.overlayVisible,
|
|
884
|
+
"in": this.state.overlayVisible,
|
|
879
885
|
timeout: {
|
|
880
886
|
enter: 120,
|
|
881
887
|
exit: 100
|