primereact 9.4.0 → 9.6.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/accordion/accordion.cjs.js +2 -1
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +3 -2
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +2 -1
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +215 -3
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +882 -8
- package/api/api.esm.js +210 -4
- package/api/api.esm.min.js +1 -1
- package/api/api.js +216 -5
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +148 -89
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +138 -2
- package/autocomplete/autocomplete.esm.js +150 -91
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +149 -91
- package/autocomplete/autocomplete.min.css +1 -1
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +3 -1
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.d.ts +1 -1
- package/avatar/avatar.esm.js +3 -1
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +4 -3
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.cjs.js +3 -1
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.esm.js +3 -1
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +4 -3
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/badge.cjs.js +3 -1
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +3 -1
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +4 -3
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +4 -3
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +4 -3
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +5 -4
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +97 -52
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.d.ts +53 -1
- package/breadcrumb/breadcrumb.esm.js +97 -52
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +96 -53
- package/breadcrumb/breadcrumb.min.css +1 -1
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +6 -2
- package/button/button.cjs.min.js +1 -1
- package/button/button.d.ts +6 -0
- package/button/button.esm.js +6 -2
- package/button/button.esm.min.js +1 -1
- package/button/button.js +7 -4
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +322 -223
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +272 -3
- package/calendar/calendar.esm.js +324 -225
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +323 -225
- package/calendar/calendar.min.js +1 -1
- package/card/card.cjs.js +3 -1
- package/card/card.cjs.min.js +1 -1
- package/card/card.d.ts +5 -11
- package/card/card.esm.js +3 -1
- package/card/card.esm.min.js +1 -1
- package/card/card.js +4 -3
- package/card/card.min.js +1 -1
- package/carousel/carousel.cjs.js +154 -92
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.d.ts +121 -1
- package/carousel/carousel.esm.js +156 -94
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +155 -94
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +181 -108
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +100 -1
- package/cascadeselect/cascadeselect.esm.js +183 -110
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +180 -108
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +31 -44
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.d.ts +30 -0
- package/chart/chart.esm.js +18 -31
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +141 -156
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +113 -48
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +65 -1
- package/checkbox/checkbox.esm.js +115 -50
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +113 -50
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +3 -1
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +1 -1
- package/chip/chip.esm.js +3 -1
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +4 -3
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +84 -55
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +78 -6
- package/chips/chips.esm.js +85 -56
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +83 -57
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +123 -49
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +81 -0
- package/colorpicker/colorpicker.esm.js +125 -51
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +124 -51
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.cjs.js +2 -0
- package/column/column.d.ts +298 -1
- package/column/column.esm.js +2 -0
- package/column/column.js +2 -0
- package/columngroup/columngroup.d.ts +28 -0
- package/componentbase/componentbase.cjs.js +29 -5
- package/componentbase/componentbase.cjs.min.js +1 -1
- package/componentbase/componentbase.esm.js +25 -5
- package/componentbase/componentbase.esm.min.js +1 -1
- package/componentbase/componentbase.js +30 -7
- package/componentbase/componentbase.min.js +1 -1
- package/confirmdialog/confirmdialog.cjs.js +4 -3
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +5 -4
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +4 -3
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +5 -4
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +6 -5
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +5 -4
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +121 -69
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +92 -1
- package/contextmenu/contextmenu.esm.js +123 -71
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +122 -71
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +14005 -2381
- package/core/core.min.js +47 -47
- package/csstransition/csstransition.cjs.js +3 -2
- package/csstransition/csstransition.cjs.min.js +1 -1
- package/csstransition/csstransition.esm.js +3 -2
- package/csstransition/csstransition.esm.min.js +1 -1
- package/csstransition/csstransition.js +4 -3
- package/csstransition/csstransition.min.js +1 -1
- package/datascroller/datascroller.cjs.js +34 -43
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.d.ts +51 -1
- package/datascroller/datascroller.esm.js +36 -45
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +35 -45
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +1089 -649
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +191 -3
- package/datatable/datatable.esm.js +1091 -651
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +1090 -651
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +125 -109
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.d.ts +105 -2
- package/dataview/dataview.esm.js +127 -111
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +123 -108
- package/dataview/dataview.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +3 -1
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.esm.js +3 -1
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +4 -3
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +6 -5
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +7 -6
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +6 -5
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +3 -1
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +3 -1
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +4 -3
- package/divider/divider.min.js +1 -1
- package/dock/dock.cjs.js +85 -46
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.d.ts +66 -0
- package/dock/dock.esm.js +86 -47
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +85 -48
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +170 -120
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +154 -2
- package/dropdown/dropdown.esm.js +172 -122
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +170 -121
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +95 -116
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.d.ts +50 -0
- package/editor/editor.esm.js +96 -117
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +95 -118
- package/editor/editor.min.js +1 -1
- package/fieldset/fieldset.cjs.js +3 -1
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +3 -1
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +4 -3
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +234 -191
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +160 -1
- package/fileupload/fileupload.esm.js +235 -192
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +231 -188
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/galleria.cjs.js +139 -124
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.d.ts +156 -2
- package/galleria/galleria.esm.js +141 -126
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +138 -124
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.cjs.js +10 -3
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.esm.js +7 -3
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +11 -5
- package/hooks/hooks.min.js +1 -1
- package/icons/arrowdown/index.cjs.js +415 -2
- package/icons/arrowdown/index.cjs.min.js +1 -1
- package/icons/arrowdown/index.esm.js +415 -2
- package/icons/arrowdown/index.esm.min.js +1 -1
- package/icons/arrowdown/index.js +415 -2
- package/icons/arrowdown/index.min.js +1 -1
- package/icons/arrowup/index.cjs.js +415 -2
- package/icons/arrowup/index.cjs.min.js +1 -1
- package/icons/arrowup/index.esm.js +415 -2
- package/icons/arrowup/index.esm.min.js +1 -1
- package/icons/arrowup/index.js +415 -2
- package/icons/arrowup/index.min.js +1 -1
- package/icons/ban/index.cjs.js +415 -2
- package/icons/ban/index.cjs.min.js +1 -1
- package/icons/ban/index.esm.js +415 -2
- package/icons/ban/index.esm.min.js +1 -1
- package/icons/ban/index.js +415 -2
- package/icons/ban/index.min.js +1 -1
- package/icons/download/index.cjs.js +415 -2
- package/icons/download/index.cjs.min.js +1 -1
- package/icons/download/index.esm.js +415 -2
- package/icons/download/index.esm.min.js +1 -1
- package/icons/download/index.js +415 -2
- package/icons/download/index.min.js +1 -1
- package/icons/exclamationtriangle/index.cjs.js +415 -2
- package/icons/exclamationtriangle/index.cjs.min.js +1 -1
- package/icons/exclamationtriangle/index.esm.js +415 -2
- package/icons/exclamationtriangle/index.esm.min.js +1 -1
- package/icons/exclamationtriangle/index.js +415 -2
- package/icons/exclamationtriangle/index.min.js +1 -1
- package/icons/eyeslash/index.cjs.js +415 -2
- package/icons/eyeslash/index.cjs.min.js +1 -1
- package/icons/eyeslash/index.esm.js +415 -2
- package/icons/eyeslash/index.esm.min.js +1 -1
- package/icons/eyeslash/index.js +415 -2
- package/icons/eyeslash/index.min.js +1 -1
- package/icons/filter/index.cjs.js +415 -2
- package/icons/filter/index.cjs.min.js +1 -1
- package/icons/filter/index.esm.js +415 -2
- package/icons/filter/index.esm.min.js +1 -1
- package/icons/filter/index.js +415 -2
- package/icons/filter/index.min.js +1 -1
- package/icons/filterslash/index.cjs.js +415 -2
- package/icons/filterslash/index.cjs.min.js +1 -1
- package/icons/filterslash/index.esm.js +415 -2
- package/icons/filterslash/index.esm.min.js +1 -1
- package/icons/filterslash/index.js +415 -2
- package/icons/filterslash/index.min.js +1 -1
- package/icons/infocircle/index.cjs.js +415 -2
- package/icons/infocircle/index.cjs.min.js +1 -1
- package/icons/infocircle/index.esm.js +415 -2
- package/icons/infocircle/index.esm.min.js +1 -1
- package/icons/infocircle/index.js +415 -2
- package/icons/infocircle/index.min.js +1 -1
- package/icons/pencil/index.cjs.js +415 -2
- package/icons/pencil/index.cjs.min.js +1 -1
- package/icons/pencil/index.esm.js +415 -2
- package/icons/pencil/index.esm.min.js +1 -1
- package/icons/pencil/index.js +415 -2
- package/icons/pencil/index.min.js +1 -1
- package/icons/plus/index.cjs.js +415 -2
- package/icons/plus/index.cjs.min.js +1 -1
- package/icons/plus/index.esm.js +415 -2
- package/icons/plus/index.esm.min.js +1 -1
- package/icons/plus/index.js +415 -2
- package/icons/plus/index.min.js +1 -1
- package/icons/refresh/index.cjs.js +415 -2
- package/icons/refresh/index.cjs.min.js +1 -1
- package/icons/refresh/index.esm.js +415 -2
- package/icons/refresh/index.esm.min.js +1 -1
- package/icons/refresh/index.js +415 -2
- package/icons/refresh/index.min.js +1 -1
- package/icons/search/index.cjs.js +415 -2
- package/icons/search/index.cjs.min.js +1 -1
- package/icons/search/index.esm.js +415 -2
- package/icons/search/index.esm.min.js +1 -1
- package/icons/search/index.js +415 -2
- package/icons/search/index.min.js +1 -1
- package/icons/searchminus/index.cjs.js +415 -2
- package/icons/searchminus/index.cjs.min.js +1 -1
- package/icons/searchminus/index.esm.js +415 -2
- package/icons/searchminus/index.esm.min.js +1 -1
- package/icons/searchminus/index.js +415 -2
- package/icons/searchminus/index.min.js +1 -1
- package/icons/searchplus/index.cjs.js +415 -2
- package/icons/searchplus/index.cjs.min.js +1 -1
- package/icons/searchplus/index.esm.js +415 -2
- package/icons/searchplus/index.esm.min.js +1 -1
- package/icons/searchplus/index.js +415 -2
- package/icons/searchplus/index.min.js +1 -1
- package/icons/sortalt/index.cjs.js +415 -2
- package/icons/sortalt/index.cjs.min.js +1 -1
- package/icons/sortalt/index.esm.js +415 -2
- package/icons/sortalt/index.esm.min.js +1 -1
- package/icons/sortalt/index.js +415 -2
- package/icons/sortalt/index.min.js +1 -1
- package/icons/sortamountdown/index.cjs.js +415 -2
- package/icons/sortamountdown/index.cjs.min.js +1 -1
- package/icons/sortamountdown/index.esm.js +415 -2
- package/icons/sortamountdown/index.esm.min.js +1 -1
- package/icons/sortamountdown/index.js +415 -2
- package/icons/sortamountdown/index.min.js +1 -1
- package/icons/sortamountupalt/index.cjs.js +415 -2
- package/icons/sortamountupalt/index.cjs.min.js +1 -1
- package/icons/sortamountupalt/index.esm.js +415 -2
- package/icons/sortamountupalt/index.esm.min.js +1 -1
- package/icons/sortamountupalt/index.js +415 -2
- package/icons/sortamountupalt/index.min.js +1 -1
- package/icons/spinner/index.cjs.js +415 -2
- package/icons/spinner/index.cjs.min.js +1 -1
- package/icons/spinner/index.esm.js +415 -2
- package/icons/spinner/index.esm.min.js +1 -1
- package/icons/spinner/index.js +415 -2
- package/icons/spinner/index.min.js +1 -1
- package/icons/star/index.cjs.js +415 -2
- package/icons/star/index.cjs.min.js +1 -1
- package/icons/star/index.esm.js +415 -2
- package/icons/star/index.esm.min.js +1 -1
- package/icons/star/index.js +415 -2
- package/icons/star/index.min.js +1 -1
- package/icons/starfill/index.cjs.js +415 -2
- package/icons/starfill/index.cjs.min.js +1 -1
- package/icons/starfill/index.esm.js +415 -2
- package/icons/starfill/index.esm.min.js +1 -1
- package/icons/starfill/index.js +415 -2
- package/icons/starfill/index.min.js +1 -1
- package/icons/thlarge/index.cjs.js +415 -2
- package/icons/thlarge/index.cjs.min.js +1 -1
- package/icons/thlarge/index.esm.js +415 -2
- package/icons/thlarge/index.esm.min.js +1 -1
- package/icons/thlarge/index.js +415 -2
- package/icons/thlarge/index.min.js +1 -1
- package/icons/timescircle/index.cjs.js +415 -2
- package/icons/timescircle/index.cjs.min.js +1 -1
- package/icons/timescircle/index.esm.js +415 -2
- package/icons/timescircle/index.esm.min.js +1 -1
- package/icons/timescircle/index.js +415 -2
- package/icons/timescircle/index.min.js +1 -1
- package/icons/trash/index.cjs.js +415 -2
- package/icons/trash/index.cjs.min.js +1 -1
- package/icons/trash/index.esm.js +415 -2
- package/icons/trash/index.esm.min.js +1 -1
- package/icons/trash/index.js +415 -2
- package/icons/trash/index.min.js +1 -1
- package/icons/undo/index.cjs.js +415 -2
- package/icons/undo/index.cjs.min.js +1 -1
- package/icons/undo/index.esm.js +415 -2
- package/icons/undo/index.esm.min.js +1 -1
- package/icons/undo/index.js +415 -2
- package/icons/undo/index.min.js +1 -1
- package/icons/upload/index.cjs.js +415 -2
- package/icons/upload/index.cjs.min.js +1 -1
- package/icons/upload/index.esm.js +415 -2
- package/icons/upload/index.esm.min.js +1 -1
- package/icons/upload/index.js +415 -2
- package/icons/upload/index.min.js +1 -1
- package/icons/windowmaximize/index.cjs.js +415 -2
- package/icons/windowmaximize/index.cjs.min.js +1 -1
- package/icons/windowmaximize/index.esm.js +415 -2
- package/icons/windowmaximize/index.esm.min.js +1 -1
- package/icons/windowmaximize/index.js +415 -2
- package/icons/windowmaximize/index.min.js +1 -1
- package/icons/windowminimize/index.cjs.js +415 -2
- package/icons/windowminimize/index.cjs.min.js +1 -1
- package/icons/windowminimize/index.esm.js +415 -2
- package/icons/windowminimize/index.esm.min.js +1 -1
- package/icons/windowminimize/index.js +415 -2
- package/icons/windowminimize/index.min.js +1 -1
- package/image/image.cjs.js +480 -80
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +130 -3
- package/image/image.esm.js +483 -83
- package/image/image.esm.min.js +1 -1
- package/image/image.js +481 -82
- package/image/image.min.css +1 -1
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +2 -1
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +3 -2
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +2 -1
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +26 -26
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.d.ts +7 -2
- package/inputmask/inputmask.esm.js +27 -27
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +26 -28
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +68 -48
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +62 -1
- package/inputnumber/inputnumber.esm.js +66 -49
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +68 -50
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +84 -25
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.d.ts +61 -0
- package/inputswitch/inputswitch.esm.js +85 -26
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +83 -27
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +25 -15
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.d.ts +32 -0
- package/inputtext/inputtext.esm.js +26 -16
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +25 -17
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +25 -15
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.d.ts +33 -1
- package/inputtextarea/inputtextarea.esm.js +26 -16
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +25 -17
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/keyfilter/keyfilter.cjs.js +25 -9
- package/keyfilter/keyfilter.cjs.min.js +1 -1
- package/keyfilter/keyfilter.esm.js +25 -9
- package/keyfilter/keyfilter.esm.min.js +1 -1
- package/keyfilter/keyfilter.js +25 -11
- package/keyfilter/keyfilter.min.js +1 -1
- package/knob/knob.cjs.js +44 -43
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.d.ts +42 -0
- package/knob/knob.esm.js +45 -44
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +44 -45
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +86 -56
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.d.ts +103 -3
- package/listbox/listbox.esm.js +88 -58
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +86 -57
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +151 -99
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.d.ts +142 -2
- package/megamenu/megamenu.esm.js +152 -100
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +149 -98
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +87 -61
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.d.ts +80 -1
- package/mention/mention.esm.js +89 -63
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +88 -63
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +99 -59
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +71 -0
- package/menu/menu.esm.js +101 -61
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +100 -61
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +122 -114
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.d.ts +94 -1
- package/menubar/menubar.esm.js +124 -116
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +122 -115
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +69 -47
- package/message/message.cjs.min.js +1 -1
- package/message/message.d.ts +35 -2
- package/message/message.esm.js +70 -48
- package/message/message.esm.min.js +1 -1
- package/message/message.js +69 -49
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +65 -63
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +51 -2
- package/messages/messages.esm.js +66 -64
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +65 -64
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +249 -193
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +185 -3
- package/multiselect/multiselect.esm.js +252 -196
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +249 -194
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +47 -33
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +61 -2
- package/multistatecheckbox/multistatecheckbox.esm.js +49 -35
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +48 -35
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +188 -110
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.d.ts +118 -2
- package/orderlist/orderlist.esm.js +190 -112
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +186 -109
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +139 -73
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.d.ts +89 -2
- package/organizationchart/organizationchart.esm.js +140 -74
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +139 -75
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +7 -6
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +5 -0
- package/overlaypanel/overlaypanel.esm.js +8 -7
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +8 -7
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.cjs.js +172 -166
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.d.ts +111 -5
- package/paginator/paginator.esm.js +174 -168
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +172 -167
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +3 -1
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +3 -1
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +4 -3
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +148 -84
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +124 -2
- package/panelmenu/panelmenu.esm.js +148 -84
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +146 -84
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/password.cjs.js +89 -46
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +98 -2
- package/password/password.esm.js +91 -48
- package/password/password.esm.min.js +1 -1
- package/password/password.js +88 -46
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +146 -82
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.d.ts +133 -1
- package/picklist/picklist.esm.js +148 -84
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +143 -80
- package/picklist/picklist.min.js +1 -1
- package/portal/portal.cjs.js +3 -2
- package/portal/portal.cjs.min.js +1 -1
- package/portal/portal.esm.js +3 -2
- package/portal/portal.esm.min.js +1 -1
- package/portal/portal.js +4 -3
- package/portal/portal.min.js +1 -1
- package/primereact.all.cjs.js +6656 -4389
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +6655 -4390
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +6656 -4389
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +3 -1
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +3 -1
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +4 -3
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/progressspinner.cjs.js +3 -1
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +3 -1
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +4 -3
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +90 -30
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.d.ts +66 -1
- package/radiobutton/radiobutton.esm.js +91 -31
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +89 -32
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +47 -36
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.d.ts +64 -1
- package/rating/rating.esm.js +48 -37
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +47 -38
- package/rating/rating.min.js +1 -1
- package/resources/primereact.css +475 -465
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +33 -8
- package/resources/themes/arya-green/theme.css +33 -8
- package/resources/themes/arya-orange/theme.css +33 -8
- package/resources/themes/arya-purple/theme.css +33 -8
- package/resources/themes/bootstrap4-dark-blue/theme.css +33 -8
- package/resources/themes/bootstrap4-dark-purple/theme.css +33 -8
- package/resources/themes/bootstrap4-light-blue/theme.css +33 -8
- package/resources/themes/bootstrap4-light-purple/theme.css +33 -8
- package/resources/themes/fluent-light/theme.css +33 -8
- package/resources/themes/lara-dark-blue/theme.css +33 -8
- package/resources/themes/lara-dark-indigo/theme.css +33 -8
- package/resources/themes/lara-dark-purple/theme.css +33 -8
- package/resources/themes/lara-dark-teal/theme.css +33 -8
- package/resources/themes/lara-light-blue/theme.css +33 -8
- package/resources/themes/lara-light-indigo/theme.css +33 -8
- package/resources/themes/lara-light-purple/theme.css +33 -8
- package/resources/themes/lara-light-teal/theme.css +33 -8
- package/resources/themes/luna-amber/theme.css +33 -8
- package/resources/themes/luna-blue/theme.css +33 -8
- package/resources/themes/luna-green/theme.css +33 -8
- package/resources/themes/luna-pink/theme.css +33 -8
- package/resources/themes/md-dark-deeppurple/theme.css +33 -8
- package/resources/themes/md-dark-indigo/theme.css +33 -8
- package/resources/themes/md-light-deeppurple/theme.css +33 -8
- package/resources/themes/md-light-indigo/theme.css +33 -8
- package/resources/themes/mdc-dark-deeppurple/theme.css +33 -8
- package/resources/themes/mdc-dark-indigo/theme.css +33 -8
- package/resources/themes/mdc-light-deeppurple/theme.css +33 -8
- package/resources/themes/mdc-light-indigo/theme.css +33 -8
- package/resources/themes/mira/theme.css +33 -8
- package/resources/themes/nano/theme.css +33 -8
- package/resources/themes/nova/theme.css +33 -8
- package/resources/themes/nova-accent/theme.css +33 -8
- package/resources/themes/nova-alt/theme.css +33 -8
- package/resources/themes/rhea/theme.css +33 -8
- package/resources/themes/saga-blue/theme.css +33 -8
- package/resources/themes/saga-green/theme.css +33 -8
- package/resources/themes/saga-orange/theme.css +33 -8
- package/resources/themes/saga-purple/theme.css +33 -8
- package/resources/themes/soho-dark/theme.css +33 -8
- package/resources/themes/soho-light/theme.css +33 -8
- package/resources/themes/tailwind-light/theme.css +45 -20
- package/resources/themes/vela-blue/theme.css +33 -8
- package/resources/themes/vela-green/theme.css +33 -8
- package/resources/themes/vela-orange/theme.css +33 -8
- package/resources/themes/vela-purple/theme.css +33 -8
- package/resources/themes/viva-dark/theme.css +33 -8
- package/resources/themes/viva-light/theme.css +33 -8
- package/ripple/ripple.cjs.js +3 -2
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +3 -2
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +4 -3
- package/ripple/ripple.min.js +1 -1
- package/row/row.cjs.js +28 -41
- package/row/row.cjs.min.js +1 -1
- package/row/row.d.ts +28 -0
- package/row/row.esm.js +15 -28
- package/row/row.esm.min.js +1 -1
- package/row/row.js +49 -64
- package/row/row.min.js +1 -1
- package/scrollpanel/scrollpanel.cjs.js +3 -1
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +3 -1
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +4 -3
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +9 -7
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.esm.js +11 -9
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +10 -8
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +37 -25
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.d.ts +52 -1
- package/selectbutton/selectbutton.esm.js +38 -26
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +37 -27
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/sidebar.cjs.js +7 -6
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +8 -7
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +8 -7
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +4 -3
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +4 -3
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +5 -5
- package/skeleton/skeleton.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +125 -114
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +103 -1
- package/slidemenu/slidemenu.esm.js +127 -116
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +125 -115
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +71 -39
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.d.ts +34 -1
- package/slider/slider.esm.js +72 -40
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +71 -41
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +3 -1
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +3 -1
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +4 -3
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +74 -63
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +39 -11
- package/splitbutton/splitbutton.esm.js +76 -65
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +74 -63
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +3 -1
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.d.ts +10 -0
- package/splitter/splitter.esm.js +3 -1
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +4 -3
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +81 -46
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.d.ts +50 -0
- package/steps/steps.esm.js +82 -47
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +81 -48
- package/steps/steps.min.js +1 -1
- package/styleclass/styleclass.cjs.js +3 -1
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.esm.js +3 -1
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +4 -3
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +86 -48
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.d.ts +62 -0
- package/tabmenu/tabmenu.esm.js +87 -49
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +86 -50
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +8 -5
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +9 -6
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +7 -4
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +3 -1
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.esm.js +3 -1
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +4 -3
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +3 -1
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +3 -1
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +4 -3
- package/terminal/terminal.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +110 -64
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +83 -2
- package/tieredmenu/tieredmenu.esm.js +112 -66
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +111 -66
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +51 -43
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.d.ts +51 -1
- package/timeline/timeline.esm.js +52 -44
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +51 -45
- package/timeline/timeline.min.js +1 -1
- package/toast/toast.cjs.js +118 -75
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +122 -4
- package/toast/toast.esm.js +120 -77
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +116 -74
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +74 -21
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.d.ts +40 -2
- package/togglebutton/togglebutton.esm.js +75 -22
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +73 -23
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +3 -1
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.d.ts +5 -11
- package/toolbar/toolbar.esm.js +3 -1
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +4 -3
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +3 -2
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.d.ts +7 -7
- package/tooltip/tooltip.esm.js +4 -3
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +3 -2
- package/tooltip/tooltip.min.js +1 -1
- package/tree/tree.cjs.js +118 -88
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +139 -1
- package/tree/tree.esm.js +120 -90
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +116 -87
- package/tree/tree.min.js +1 -1
- package/treeselect/treeselect.cjs.js +135 -102
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +143 -2
- package/treeselect/treeselect.esm.js +137 -104
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +136 -104
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +385 -198
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +305 -2
- package/treetable/treetable.esm.js +387 -200
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +383 -197
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +97 -40
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.d.ts +64 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +99 -42
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +97 -42
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +31 -5
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +1 -1
- package/utils/utils.esm.js +28 -5
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +32 -7
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +43 -29
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.d.ts +78 -1
- package/virtualscroller/virtualscroller.esm.js +44 -30
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +43 -31
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +1 -1
package/mention/mention.esm.js
CHANGED
|
@@ -1,29 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import PrimeReact from 'primereact/api';
|
|
2
|
+
import PrimeReact, { PrimeReactContext } from 'primereact/api';
|
|
3
3
|
import { CSSTransition } from 'primereact/csstransition';
|
|
4
4
|
import { useOverlayListener, useUpdateEffect, useUnmountEffect } from 'primereact/hooks';
|
|
5
5
|
import { KeyFilter } from 'primereact/keyfilter';
|
|
6
6
|
import { Tooltip } from 'primereact/tooltip';
|
|
7
|
-
import { ObjectUtils, classNames, DomHandler, ZIndexUtils } from 'primereact/utils';
|
|
7
|
+
import { ObjectUtils, classNames, mergeProps, DomHandler, ZIndexUtils } from 'primereact/utils';
|
|
8
|
+
import { ComponentBase } from 'primereact/componentbase';
|
|
8
9
|
import { OverlayService } from 'primereact/overlayservice';
|
|
9
10
|
import { Portal } from 'primereact/portal';
|
|
10
11
|
import { Ripple } from 'primereact/ripple';
|
|
11
12
|
|
|
12
|
-
function _extends() {
|
|
13
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
14
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
15
|
-
var source = arguments[i];
|
|
16
|
-
for (var key in source) {
|
|
17
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
18
|
-
target[key] = source[key];
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
return target;
|
|
23
|
-
};
|
|
24
|
-
return _extends.apply(this, arguments);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
13
|
function _typeof(obj) {
|
|
28
14
|
"@babel/helpers - typeof";
|
|
29
15
|
|
|
@@ -120,13 +106,29 @@ function _slicedToArray(arr, i) {
|
|
|
120
106
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
121
107
|
}
|
|
122
108
|
|
|
123
|
-
|
|
109
|
+
function _extends() {
|
|
110
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
111
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
112
|
+
var source = arguments[i];
|
|
113
|
+
for (var key in source) {
|
|
114
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
115
|
+
target[key] = source[key];
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return target;
|
|
120
|
+
};
|
|
121
|
+
return _extends.apply(this, arguments);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
var InputTextareaBase = ComponentBase.extend({
|
|
124
125
|
defaultProps: {
|
|
125
126
|
__TYPE: 'InputTextarea',
|
|
126
127
|
autoResize: false,
|
|
127
128
|
keyfilter: null,
|
|
128
129
|
onBlur: null,
|
|
129
130
|
onFocus: null,
|
|
131
|
+
onBeforeInput: null,
|
|
130
132
|
onInput: null,
|
|
131
133
|
onKeyDown: null,
|
|
132
134
|
onKeyUp: null,
|
|
@@ -135,19 +137,18 @@ var InputTextareaBase = {
|
|
|
135
137
|
tooltipOptions: null,
|
|
136
138
|
validateOnly: false,
|
|
137
139
|
children: undefined
|
|
138
|
-
},
|
|
139
|
-
getProps: function getProps(props) {
|
|
140
|
-
return ObjectUtils.getMergedProps(props, InputTextareaBase.defaultProps);
|
|
141
|
-
},
|
|
142
|
-
getOtherProps: function getOtherProps(props) {
|
|
143
|
-
return ObjectUtils.getDiffProps(props, InputTextareaBase.defaultProps);
|
|
144
140
|
}
|
|
145
|
-
};
|
|
141
|
+
});
|
|
146
142
|
|
|
147
143
|
var InputTextarea = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
148
|
-
var
|
|
144
|
+
var context = React.useContext(PrimeReactContext);
|
|
145
|
+
var props = InputTextareaBase.getProps(inProps, context);
|
|
149
146
|
var elementRef = React.useRef(ref);
|
|
150
147
|
var cachedScrollHeight = React.useRef(0);
|
|
148
|
+
var _InputTextareaBase$se = InputTextareaBase.setMetaData({
|
|
149
|
+
props: props
|
|
150
|
+
}),
|
|
151
|
+
ptm = _InputTextareaBase$se.ptm;
|
|
151
152
|
var onFocus = function onFocus(event) {
|
|
152
153
|
if (props.autoResize) {
|
|
153
154
|
resize();
|
|
@@ -172,6 +173,12 @@ var InputTextarea = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(funct
|
|
|
172
173
|
KeyFilter.onKeyPress(event, props.keyfilter, props.validateOnly);
|
|
173
174
|
}
|
|
174
175
|
};
|
|
176
|
+
var onBeforeInput = function onBeforeInput(event) {
|
|
177
|
+
props.onBeforeInput && props.onBeforeInput(event);
|
|
178
|
+
if (props.keyfilter) {
|
|
179
|
+
KeyFilter.onBeforeInput(event, props.keyfilter, props.validateOnly);
|
|
180
|
+
}
|
|
181
|
+
};
|
|
175
182
|
var onPaste = function onPaste(event) {
|
|
176
183
|
props.onPaste && props.onPaste(event);
|
|
177
184
|
if (props.keyfilter) {
|
|
@@ -218,30 +225,32 @@ var InputTextarea = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(funct
|
|
|
218
225
|
return ObjectUtils.isNotEmpty(props.value) || ObjectUtils.isNotEmpty(props.defaultValue);
|
|
219
226
|
}, [props.value, props.defaultValue]);
|
|
220
227
|
var hasTooltip = ObjectUtils.isNotEmpty(props.tooltip);
|
|
221
|
-
var otherProps = InputTextareaBase.getOtherProps(props);
|
|
222
228
|
var className = classNames('p-inputtextarea p-inputtext p-component', {
|
|
223
229
|
'p-disabled': props.disabled,
|
|
224
230
|
'p-filled': isFilled,
|
|
225
231
|
'p-inputtextarea-resizable': props.autoResize
|
|
226
232
|
}, props.className);
|
|
227
|
-
|
|
228
|
-
ref: elementRef
|
|
229
|
-
}, otherProps, {
|
|
233
|
+
var rootProps = mergeProps({
|
|
234
|
+
ref: elementRef,
|
|
230
235
|
className: className,
|
|
231
236
|
onFocus: onFocus,
|
|
232
237
|
onBlur: onBlur,
|
|
233
238
|
onKeyUp: onKeyUp,
|
|
234
239
|
onKeyDown: onKeyDown,
|
|
240
|
+
onBeforeInput: onBeforeInput,
|
|
235
241
|
onInput: onInput,
|
|
236
242
|
onPaste: onPaste
|
|
237
|
-
}
|
|
243
|
+
}, InputTextareaBase.getOtherProps(props), ptm('root'));
|
|
244
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("textarea", rootProps), hasTooltip && /*#__PURE__*/React.createElement(Tooltip, _extends({
|
|
238
245
|
target: elementRef,
|
|
239
246
|
content: props.tooltip
|
|
240
|
-
}, props.tooltipOptions
|
|
247
|
+
}, props.tooltipOptions, {
|
|
248
|
+
pt: ptm('tooltip')
|
|
249
|
+
})));
|
|
241
250
|
}));
|
|
242
251
|
InputTextarea.displayName = 'InputTextarea';
|
|
243
252
|
|
|
244
|
-
var MentionBase = {
|
|
253
|
+
var MentionBase = ComponentBase.extend({
|
|
245
254
|
defaultProps: {
|
|
246
255
|
__TYPE: 'Mention',
|
|
247
256
|
autoHighlight: true,
|
|
@@ -272,19 +281,14 @@ var MentionBase = {
|
|
|
272
281
|
onSelect: null,
|
|
273
282
|
onShow: null,
|
|
274
283
|
children: undefined
|
|
275
|
-
},
|
|
276
|
-
getProps: function getProps(props) {
|
|
277
|
-
return ObjectUtils.getMergedProps(props, MentionBase.defaultProps);
|
|
278
|
-
},
|
|
279
|
-
getOtherProps: function getOtherProps(props) {
|
|
280
|
-
return ObjectUtils.getDiffProps(props, MentionBase.defaultProps);
|
|
281
284
|
}
|
|
282
|
-
};
|
|
285
|
+
});
|
|
283
286
|
|
|
284
287
|
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; }
|
|
285
288
|
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; }
|
|
286
289
|
var Mention = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
287
|
-
var
|
|
290
|
+
var context = React.useContext(PrimeReactContext);
|
|
291
|
+
var props = MentionBase.getProps(inProps, context);
|
|
288
292
|
var _React$useState = React.useState(false),
|
|
289
293
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
290
294
|
overlayVisibleState = _React$useState2[0],
|
|
@@ -306,6 +310,23 @@ var Mention = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (i
|
|
|
306
310
|
var inputRef = React.useRef(props.inputRef);
|
|
307
311
|
var listRef = React.useRef(null);
|
|
308
312
|
var timeout = React.useRef(null);
|
|
313
|
+
var _MentionBase$setMetaD = MentionBase.setMetaData({
|
|
314
|
+
props: props,
|
|
315
|
+
state: {
|
|
316
|
+
overlayVisible: overlayVisibleState,
|
|
317
|
+
focused: focusedState,
|
|
318
|
+
searching: searchingState,
|
|
319
|
+
trigger: triggerState
|
|
320
|
+
}
|
|
321
|
+
}),
|
|
322
|
+
ptm = _MentionBase$setMetaD.ptm;
|
|
323
|
+
var getPTOptions = function getPTOptions(item, suggestion) {
|
|
324
|
+
return ptm(suggestion, {
|
|
325
|
+
context: {
|
|
326
|
+
trigger: triggerState ? triggerState.key : ''
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
};
|
|
309
330
|
var _useOverlayListener = useOverlayListener({
|
|
310
331
|
target: elementRef,
|
|
311
332
|
overlay: overlayRef,
|
|
@@ -327,7 +348,7 @@ var Mention = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (i
|
|
|
327
348
|
setTriggerState(null);
|
|
328
349
|
};
|
|
329
350
|
var onOverlayEnter = function onOverlayEnter() {
|
|
330
|
-
ZIndexUtils.set('overlay', overlayRef.current, PrimeReact.autoZIndex, PrimeReact.zIndex['overlay']);
|
|
351
|
+
ZIndexUtils.set('overlay', overlayRef.current, context && context.autoZIndex || PrimeReact.autoZIndex, context && context.zIndex['overlay'] || PrimeReact.zIndex['overlay']);
|
|
331
352
|
alignOverlay();
|
|
332
353
|
};
|
|
333
354
|
var onOverlayEntering = function onOverlayEntering() {
|
|
@@ -595,21 +616,23 @@ var Mention = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (i
|
|
|
595
616
|
trigger: triggerState ? triggerState.key : '',
|
|
596
617
|
index: index
|
|
597
618
|
}) : formatValue(suggestion);
|
|
598
|
-
|
|
619
|
+
var itemProps = mergeProps({
|
|
599
620
|
key: key,
|
|
600
|
-
className:
|
|
621
|
+
className: 'p-mention-item',
|
|
601
622
|
onClick: function onClick(e) {
|
|
602
623
|
return onItemClick(e, suggestion);
|
|
603
624
|
}
|
|
604
|
-
},
|
|
625
|
+
}, getPTOptions(suggestion, 'item'));
|
|
626
|
+
return /*#__PURE__*/React.createElement("li", itemProps, content, /*#__PURE__*/React.createElement(Ripple, null));
|
|
605
627
|
};
|
|
606
628
|
var createList = function createList() {
|
|
629
|
+
var itemsProps = mergeProps({
|
|
630
|
+
ref: listRef,
|
|
631
|
+
className: 'p-mention-items'
|
|
632
|
+
}, ptm('items'));
|
|
607
633
|
if (props.suggestions) {
|
|
608
634
|
var items = props.suggestions.map(createItem);
|
|
609
|
-
return /*#__PURE__*/React.createElement("ul",
|
|
610
|
-
ref: listRef,
|
|
611
|
-
className: "p-mention-items"
|
|
612
|
-
}, items);
|
|
635
|
+
return /*#__PURE__*/React.createElement("ul", itemsProps, items);
|
|
613
636
|
}
|
|
614
637
|
return null;
|
|
615
638
|
};
|
|
@@ -621,6 +644,12 @@ var Mention = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (i
|
|
|
621
644
|
var header = ObjectUtils.getJSXElement(props.headerTemplate, props);
|
|
622
645
|
var footer = ObjectUtils.getJSXElement(props.footerTemplate, props);
|
|
623
646
|
var list = createList();
|
|
647
|
+
var panelProps = mergeProps({
|
|
648
|
+
ref: overlayRef,
|
|
649
|
+
className: panelClassName,
|
|
650
|
+
style: panelStyle,
|
|
651
|
+
onClick: onPanelClick
|
|
652
|
+
}, ptm('panel'));
|
|
624
653
|
var panel = /*#__PURE__*/React.createElement(CSSTransition, {
|
|
625
654
|
nodeRef: overlayRef,
|
|
626
655
|
classNames: "p-connected-overlay",
|
|
@@ -636,12 +665,7 @@ var Mention = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (i
|
|
|
636
665
|
onEntered: onOverlayEntered,
|
|
637
666
|
onExit: onOverlayExit,
|
|
638
667
|
onExited: onOverlayExited
|
|
639
|
-
}, /*#__PURE__*/React.createElement("div",
|
|
640
|
-
ref: overlayRef,
|
|
641
|
-
className: panelClassName,
|
|
642
|
-
style: panelStyle,
|
|
643
|
-
onClick: onPanelClick
|
|
644
|
-
}, header, list, footer));
|
|
668
|
+
}, /*#__PURE__*/React.createElement("div", panelProps, header, list, footer));
|
|
645
669
|
return /*#__PURE__*/React.createElement(Portal, {
|
|
646
670
|
element: panel,
|
|
647
671
|
appendTo: "self"
|
|
@@ -654,24 +678,26 @@ var Mention = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (i
|
|
|
654
678
|
var inputClassName = classNames('p-mention-input', props.inputClassName);
|
|
655
679
|
var inputProps = MentionBase.getOtherProps(props);
|
|
656
680
|
var panel = createPanel();
|
|
657
|
-
|
|
658
|
-
ref: elementRef,
|
|
659
|
-
id: props.id,
|
|
660
|
-
className: className,
|
|
661
|
-
style: props.style
|
|
662
|
-
}, /*#__PURE__*/React.createElement(InputTextarea, _extends({
|
|
681
|
+
var inputMentionProps = mergeProps(_objectSpread(_objectSpread({
|
|
663
682
|
ref: inputRef,
|
|
664
683
|
id: props.inputId,
|
|
665
684
|
className: inputClassName,
|
|
666
685
|
style: props.inputStyle
|
|
667
|
-
}, inputProps, {
|
|
686
|
+
}, inputProps), {}, {
|
|
668
687
|
onFocus: onFocus,
|
|
669
688
|
onBlur: onBlur,
|
|
670
689
|
onKeyDown: onKeyDown,
|
|
671
690
|
onInput: onInput,
|
|
672
691
|
onKeyUp: onKeyUp,
|
|
673
692
|
onChange: onChange
|
|
674
|
-
})
|
|
693
|
+
}), ptm('input'));
|
|
694
|
+
var rootProps = mergeProps({
|
|
695
|
+
ref: elementRef,
|
|
696
|
+
id: props.id,
|
|
697
|
+
className: className,
|
|
698
|
+
style: props.style
|
|
699
|
+
}, MentionBase.getOtherProps(props), ptm('root'));
|
|
700
|
+
return /*#__PURE__*/React.createElement("div", rootProps, /*#__PURE__*/React.createElement(InputTextarea, inputMentionProps), panel);
|
|
675
701
|
}));
|
|
676
702
|
Mention.displayName = 'Mention';
|
|
677
703
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import t from"primereact/api";import{CSSTransition as n}from"primereact/csstransition";import{useOverlayListener as r,useUpdateEffect as i,useUnmountEffect as o}from"primereact/hooks";import{KeyFilter as l}from"primereact/keyfilter";import{Tooltip as u}from"primereact/tooltip";import{ObjectUtils as a,classNames as s,DomHandler as c,ZIndexUtils as f}from"primereact/utils";import{OverlayService as p}from"primereact/overlayservice";import{Portal as g}from"primereact/portal";import{Ripple as m}from"primereact/ripple";function d(){return d=Object.assign?Object.assign.bind():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},d.apply(this,arguments)}function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function h(e,t){if("object"!==y(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function v(e){var t=h(e,"string");return"symbol"===y(t)?t:String(t)}function b(e,t,n){return(t=v(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(e){if(Array.isArray(e))return e}function E(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,l,u=[],a=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{if(!a&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(s)throw i}}return u}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function S(e,t){if(e){if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}function w(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function P(e,t){return O(e)||E(e,t)||S(e,t)||w()}var C={defaultProps:{__TYPE:"InputTextarea",autoResize:!1,keyfilter:null,onBlur:null,onFocus:null,onInput:null,onKeyDown:null,onKeyUp:null,onPaste:null,tooltip:null,tooltipOptions:null,validateOnly:!1,children:void 0},getProps:function(e){return a.getMergedProps(e,C.defaultProps)},getOtherProps:function(e){return a.getDiffProps(e,C.defaultProps)}},I=e.memo(e.forwardRef((function(t,n){var r=C.getProps(t),i=e.useRef(n),o=e.useRef(0),f=function(e){var t=i.current;t&&c.isVisible(t)&&(o.current||(o.current=t.scrollHeight,t.style.overflow="hidden"),(o.current!==t.scrollHeight||e)&&(t.style.height="",t.style.height=t.scrollHeight+"px",parseFloat(t.style.height)>=parseFloat(t.style.maxHeight)?(t.style.overflowY="scroll",t.style.height=t.style.maxHeight):t.style.overflow="hidden",o.current=t.scrollHeight))};e.useEffect((function(){a.combinedRefs(i,n)}),[i,n]),e.useEffect((function(){r.autoResize&&f(!0)}),[r.autoResize]);var p=e.useMemo((function(){return a.isNotEmpty(r.value)||a.isNotEmpty(r.defaultValue)}),[r.value,r.defaultValue]),g=a.isNotEmpty(r.tooltip),m=C.getOtherProps(r),y=s("p-inputtextarea p-inputtext p-component",{"p-disabled":r.disabled,"p-filled":p,"p-inputtextarea-resizable":r.autoResize},r.className);return e.createElement(e.Fragment,null,e.createElement("textarea",d({ref:i},m,{className:y,onFocus:function(e){r.autoResize&&f(),r.onFocus&&r.onFocus(e)},onBlur:function(e){r.autoResize&&f(),r.onBlur&&r.onBlur(e)},onKeyUp:function(e){r.autoResize&&f(),r.onKeyUp&&r.onKeyUp(e)},onKeyDown:function(e){r.onKeyDown&&r.onKeyDown(e),r.keyfilter&&l.onKeyPress(e,r.keyfilter,r.validateOnly)},onInput:function(e){var t=e.target;r.autoResize&&f(a.isEmpty(t.value)),r.onInput&&r.onInput(e),a.isNotEmpty(t.value)?c.addClass(t,"p-filled"):c.removeClass(t,"p-filled")},onPaste:function(e){r.onPaste&&r.onPaste(e),r.keyfilter&&l.onPaste(e,r.keyfilter,r.validateOnly)}})),g&&e.createElement(u,d({target:i,content:r.tooltip},r.tooltipOptions)))})));I.displayName="InputTextarea";var R={defaultProps:{__TYPE:"Mention",autoHighlight:!0,className:null,delay:0,field:null,footerTemplate:null,headerTemplate:null,id:null,inputClassName:null,inputId:null,inputRef:null,inputStyle:null,itemTemplate:null,panelClassName:null,panelStyle:null,scrollHeight:"200px",style:null,suggestions:null,transitionOptions:null,trigger:"@",onBlur:null,onChange:null,onFocus:null,onHide:null,onInput:null,onSearch:null,onSelect:null,onShow:null,children:void 0},getProps:function(e){return a.getMergedProps(e,R.defaultProps)},getOtherProps:function(e){return a.getDiffProps(e,R.defaultProps)}};function k(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 N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var j=e.memo(e.forwardRef((function(l,u){var y=R.getProps(l),h=P(e.useState(!1),2),v=h[0],b=h[1],O=P(e.useState(!1),2),E=O[0],x=O[1],S=P(e.useState(!1),2),w=S[0],C=S[1],k=P(e.useState(null),2),j=k[0],D=k[1],T=e.useRef(null),H=e.useRef(null),A=e.useRef(y.inputRef),F=e.useRef(null),K=e.useRef(null),z=P(r({target:T,overlay:H,listener:function(e,t){t.valid&&U()},when:v}),2),B=z[0],M=z[1],V=function(){b(!0)},U=function(){b(!1),C(!1),D(null)},_=function(){f.set("overlay",H.current,t.autoZIndex,t.zIndex.overlay),Z()},J=function(){y.autoHighlight&&y.suggestions&&y.suggestions.length&&c.addClass(F.current.firstChild,"p-highlight")},X=function(){B(),y.onShow&&y.onShow()},Y=function(){M()},q=function(){f.clear(H.current),y.onHide&&y.onHide()},Z=function(){var e=j.key,t=j.index,n=A.current.value,r=c.getCursorOffset(A.current,n.substring(0,t-1),n.substring(t),e);H.current.style.transformOrigin="top",H.current.style.left="calc(".concat(r.left,"px + 1rem)"),H.current.style.top="calc(".concat(r.top,"px + 1.2rem)")},$=function(e){p.emit("overlay-click",{originalEvent:e,target:T.current})},G=function(e,t,n){if(!j){var r=Array.isArray(y.trigger)?y.trigger.find((function(e){return e===t})):y.trigger===t?y.trigger:null;if(r)return{key:r,index:n};var i=e.substring(0,n).lastIndexOf(" "),o=L(e,n);if(o.index>i)return o}return j},L=function(e,t){if(Array.isArray(y.trigger)){var n={};return y.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(y.trigger);return{key:y.trigger,index:-1!==r?r+1:-1}},Q=function(e){K.current&&clearTimeout(K.current);var t=e.target,n=t.value,r=t.selectionStart,i=n.substring(r-1,r);if(" "!==i){var o=G(n,i,r);if(o&&o.index>-1){var l=n.substring(o.index,r);K.current=setTimeout((function(){W(e,l,o)}),y.delay)}}else U()},W=function(e,t,n){y.onSearch&&(C(!0),D(n),y.onSearch({originalEvent:e,trigger:n.key,query:t}))},ee=function(e,t){var n=A.current.value,r=e.target.selectionStart,i=n.indexOf(" ",j.index),o=n.substring(j.index,i>-1?i:r),l=te(t).replace(/\s+/g,"");if(o.trim()!==l){var u=n.substring(0,j.index),a=n.substring(j.index+o.length);A.current.value="".concat(u).concat(l," ").concat(a),e.target=A.current,y.onChange&&y.onChange(e)}var s=j.index+l.length+1;A.current.setSelectionRange(s,s),U(),y.onSelect&&y.onSelect({originalEvent:e,suggestion:t})},te=function(e){if(e){var t=Array.isArray(y.field)?y.field[y.trigger.findIndex((function(e){return e===j.key}))]:y.field;return t?a.resolveFieldData(e,t):e}return""},ne=function(e,t){c.focus(A.current),ee(e,t)},re=A.current&&A.current.value,ie=e.useMemo((function(){return a.isNotEmpty(y.value)||a.isNotEmpty(y.defaultValue)||a.isNotEmpty(re)}),[y.value,y.defaultValue,re]);e.useImperativeHandle(u,(function(){return{props:y,show:V,hide:U,focus:function(){return c.focus(A.current)},getElement:function(){return T.current},getOverlay:function(){return H.current},getInput:function(){return A.current}}})),e.useEffect((function(){a.combinedRefs(A,y.inputRef)}),[A,y.inputRef]),i((function(){w&&(y.suggestions&&y.suggestions.length?V():U(),v&&Z(),C(!1))}),[y.suggestions]),i((function(){!ie&&c.hasClass(T.current,"p-inputwrapper-filled")&&c.removeClass(T.current,"p-inputwrapper-filled")}),[ie]),o((function(){f.clear(H.current)}));var oe,le,ue,ae,se,ce=function(t,n){var r=n+"_item",i=y.itemTemplate?a.getJSXElement(y.itemTemplate,t,{trigger:j?j.key:"",index:n}):te(t);return e.createElement("li",{key:r,className:"p-mention-item",onClick:function(e){return ne(e,t)}},i,e.createElement(m,null))},fe=function(){if(y.suggestions){var t=y.suggestions.map(ce);return e.createElement("ul",{ref:F,className:"p-mention-items"},t)}return null},pe=s("p-mention p-component p-inputwrapper",{"p-inputwrapper-filled":ie,"p-inputwrapper-focus":E},y.className),ge=s("p-mention-input",y.inputClassName),me=R.getOtherProps(y),de=(oe=s("p-mention-panel p-component",y.panelClassName),le=N({maxHeight:y.scrollHeight},y.panelStyle),ue=a.getJSXElement(y.headerTemplate,y),ae=a.getJSXElement(y.footerTemplate,y),se=fe(),e.createElement(g,{element:e.createElement(n,{nodeRef:H,classNames:"p-connected-overlay",in:v,timeout:{enter:120,exit:100},options:y.transitionOptions,unmountOnExit:!0,onEnter:_,onEntering:J,onEntered:X,onExit:Y,onExited:q},e.createElement("div",{ref:H,className:oe,style:le,onClick:$},ue,se,ae)),appendTo:"self"}));return e.createElement("div",{ref:T,id:y.id,className:pe,style:y.style},e.createElement(I,d({ref:A,id:y.inputId,className:ge,style:y.inputStyle},me,{onFocus:function(e){x(!0),y.onFocus&&y.onFocus(e)},onBlur:function(e){x(!1),y.onBlur&&y.onBlur(e)},onKeyDown:function(e){if(v){var t=c.findSingle(H.current,"li.p-highlight");switch(e.which){case 40:if(t){var n=t.nextElementSibling;n&&(c.addClass(n,"p-highlight"),c.removeClass(t,"p-highlight"),c.scrollInView(H.current,n))}else(t=c.findSingle(H.current,"li"))&&c.addClass(t,"p-highlight");e.preventDefault();break;case 38:if(t){var r=t.previousElementSibling;r&&(c.addClass(r,"p-highlight"),c.removeClass(t,"p-highlight"),c.scrollInView(H.current,r))}e.preventDefault();break;case 8:var i=e.target,o=i.selectionStart;i.value.substring(o-1,o)===j.key&&U();break;case 13:t&&ee(e,y.suggestions[c.index(t)]),e.preventDefault();break;case 27:U(),e.preventDefault()}}},onInput:function(e){y.onInput&&y.onInput(e),e.target.value.length>0?c.addClass(T.current,"p-inputwrapper-filled"):c.removeClass(T.current,"p-inputwrapper-filled")},onKeyUp:function(e){37!==e.which&&39!==e.which||Q(e)},onChange:function(e){y.onChange&&y.onChange(e),Q(e)}})),de)})));j.displayName="Mention";export{j as Mention};
|
|
1
|
+
import*as e from"react";import t,{PrimeReactContext as n}from"primereact/api";import{CSSTransition as r}from"primereact/csstransition";import{useOverlayListener as i,useUpdateEffect as o,useUnmountEffect as l}from"primereact/hooks";import{KeyFilter as u}from"primereact/keyfilter";import{Tooltip as a}from"primereact/tooltip";import{ObjectUtils as s,classNames as c,mergeProps as p,DomHandler as f,ZIndexUtils as g}from"primereact/utils";import{ComponentBase as m}from"primereact/componentbase";import{OverlayService as y}from"primereact/overlayservice";import{Portal as d}from"primereact/portal";import{Ripple as v}from"primereact/ripple";function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function b(e,t){if("object"!==h(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function x(e){var t=b(e,"string");return"symbol"===h(t)?t:String(t)}function O(e,t,n){return(t=x(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E(e){if(Array.isArray(e))return e}function S(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,l,u=[],a=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{if(!a&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(s)throw i}}return u}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function I(e,t){if(e){if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(e,t):void 0}}function C(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function k(e,t){return E(e)||S(e,t)||I(e,t)||C()}function P(){return P=Object.assign?Object.assign.bind():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},P.apply(this,arguments)}var R=m.extend({defaultProps:{__TYPE:"InputTextarea",autoResize:!1,keyfilter:null,onBlur:null,onFocus:null,onBeforeInput:null,onInput:null,onKeyDown:null,onKeyUp:null,onPaste:null,tooltip:null,tooltipOptions:null,validateOnly:!1,children:void 0}}),N=e.memo(e.forwardRef((function(t,r){var i=e.useContext(n),o=R.getProps(t,i),l=e.useRef(r),g=e.useRef(0),m=R.setMetaData({props:o}).ptm,y=function(e){var t=l.current;t&&f.isVisible(t)&&(g.current||(g.current=t.scrollHeight,t.style.overflow="hidden"),(g.current!==t.scrollHeight||e)&&(t.style.height="",t.style.height=t.scrollHeight+"px",parseFloat(t.style.height)>=parseFloat(t.style.maxHeight)?(t.style.overflowY="scroll",t.style.height=t.style.maxHeight):t.style.overflow="hidden",g.current=t.scrollHeight))};e.useEffect((function(){s.combinedRefs(l,r)}),[l,r]),e.useEffect((function(){o.autoResize&&y(!0)}),[o.autoResize]);var d=e.useMemo((function(){return s.isNotEmpty(o.value)||s.isNotEmpty(o.defaultValue)}),[o.value,o.defaultValue]),v=s.isNotEmpty(o.tooltip),h=c("p-inputtextarea p-inputtext p-component",{"p-disabled":o.disabled,"p-filled":d,"p-inputtextarea-resizable":o.autoResize},o.className),b=p({ref:l,className:h,onFocus:function(e){o.autoResize&&y(),o.onFocus&&o.onFocus(e)},onBlur:function(e){o.autoResize&&y(),o.onBlur&&o.onBlur(e)},onKeyUp:function(e){o.autoResize&&y(),o.onKeyUp&&o.onKeyUp(e)},onKeyDown:function(e){o.onKeyDown&&o.onKeyDown(e),o.keyfilter&&u.onKeyPress(e,o.keyfilter,o.validateOnly)},onBeforeInput:function(e){o.onBeforeInput&&o.onBeforeInput(e),o.keyfilter&&u.onBeforeInput(e,o.keyfilter,o.validateOnly)},onInput:function(e){var t=e.target;o.autoResize&&y(s.isEmpty(t.value)),o.onInput&&o.onInput(e),s.isNotEmpty(t.value)?f.addClass(t,"p-filled"):f.removeClass(t,"p-filled")},onPaste:function(e){o.onPaste&&o.onPaste(e),o.keyfilter&&u.onPaste(e,o.keyfilter,o.validateOnly)}},R.getOtherProps(o),m("root"));return e.createElement(e.Fragment,null,e.createElement("textarea",b),v&&e.createElement(a,P({target:l,content:o.tooltip},o.tooltipOptions,{pt:m("tooltip")})))})));N.displayName="InputTextarea";var j=m.extend({defaultProps:{__TYPE:"Mention",autoHighlight:!0,className:null,delay:0,field:null,footerTemplate:null,headerTemplate:null,id:null,inputClassName:null,inputId:null,inputRef:null,inputStyle:null,itemTemplate:null,panelClassName:null,panelStyle:null,scrollHeight:"200px",style:null,suggestions:null,transitionOptions:null,trigger:"@",onBlur:null,onChange:null,onFocus:null,onHide:null,onInput:null,onSearch:null,onSelect:null,onShow:null,children:void 0}});function D(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 T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){O(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var H=e.memo(e.forwardRef((function(u,a){var m=e.useContext(n),h=j.getProps(u,m),b=k(e.useState(!1),2),x=b[0],O=b[1],E=k(e.useState(!1),2),S=E[0],w=E[1],I=k(e.useState(!1),2),C=I[0],P=I[1],R=k(e.useState(null),2),D=R[0],H=R[1],B=e.useRef(null),A=e.useRef(null),F=e.useRef(h.inputRef),z=e.useRef(null),K=e.useRef(null),V=j.setMetaData({props:h,state:{overlayVisible:x,focused:S,searching:C,trigger:D}}).ptm,M=function(e,t){return V(t,{context:{trigger:D?D.key:""}})},U=k(i({target:B,overlay:A,listener:function(e,t){t.valid&&Y()},when:x}),2),_=U[0],J=U[1],X=function(){O(!0)},Y=function(){O(!1),P(!1),H(null)},Z=function(){g.set("overlay",A.current,m&&m.autoZIndex||t.autoZIndex,m&&m.zIndex.overlay||t.zIndex.overlay),Q()},q=function(){h.autoHighlight&&h.suggestions&&h.suggestions.length&&f.addClass(z.current.firstChild,"p-highlight")},$=function(){_(),h.onShow&&h.onShow()},G=function(){J()},L=function(){g.clear(A.current),h.onHide&&h.onHide()},Q=function(){var e=D.key,t=D.index,n=F.current.value,r=f.getCursorOffset(F.current,n.substring(0,t-1),n.substring(t),e);A.current.style.transformOrigin="top",A.current.style.left="calc(".concat(r.left,"px + 1rem)"),A.current.style.top="calc(".concat(r.top,"px + 1.2rem)")},W=function(e){y.emit("overlay-click",{originalEvent:e,target:B.current})},ee=function(e,t,n){if(!D){var r=Array.isArray(h.trigger)?h.trigger.find((function(e){return e===t})):h.trigger===t?h.trigger:null;if(r)return{key:r,index:n};var i=e.substring(0,n).lastIndexOf(" "),o=te(e,n);if(o.index>i)return o}return D},te=function(e,t){if(Array.isArray(h.trigger)){var n={};return h.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(h.trigger);return{key:h.trigger,index:-1!==r?r+1:-1}},ne=function(e){K.current&&clearTimeout(K.current);var t=e.target,n=t.value,r=t.selectionStart,i=n.substring(r-1,r);if(" "!==i){var o=ee(n,i,r);if(o&&o.index>-1){var l=n.substring(o.index,r);K.current=setTimeout((function(){re(e,l,o)}),h.delay)}}else Y()},re=function(e,t,n){h.onSearch&&(P(!0),H(n),h.onSearch({originalEvent:e,trigger:n.key,query:t}))},ie=function(e,t){var n=F.current.value,r=e.target.selectionStart,i=n.indexOf(" ",D.index),o=n.substring(D.index,i>-1?i:r),l=oe(t).replace(/\s+/g,"");if(o.trim()!==l){var u=n.substring(0,D.index),a=n.substring(D.index+o.length);F.current.value="".concat(u).concat(l," ").concat(a),e.target=F.current,h.onChange&&h.onChange(e)}var s=D.index+l.length+1;F.current.setSelectionRange(s,s),Y(),h.onSelect&&h.onSelect({originalEvent:e,suggestion:t})},oe=function(e){if(e){var t=Array.isArray(h.field)?h.field[h.trigger.findIndex((function(e){return e===D.key}))]:h.field;return t?s.resolveFieldData(e,t):e}return""},le=function(e,t){f.focus(F.current),ie(e,t)},ue=F.current&&F.current.value,ae=e.useMemo((function(){return s.isNotEmpty(h.value)||s.isNotEmpty(h.defaultValue)||s.isNotEmpty(ue)}),[h.value,h.defaultValue,ue]);e.useImperativeHandle(a,(function(){return{props:h,show:X,hide:Y,focus:function(){return f.focus(F.current)},getElement:function(){return B.current},getOverlay:function(){return A.current},getInput:function(){return F.current}}})),e.useEffect((function(){s.combinedRefs(F,h.inputRef)}),[F,h.inputRef]),o((function(){C&&(h.suggestions&&h.suggestions.length?X():Y(),x&&Q(),P(!1))}),[h.suggestions]),o((function(){!ae&&f.hasClass(B.current,"p-inputwrapper-filled")&&f.removeClass(B.current,"p-inputwrapper-filled")}),[ae]),l((function(){g.clear(A.current)}));var se,ce,pe,fe,ge,me,ye=function(t,n){var r=n+"_item",i=h.itemTemplate?s.getJSXElement(h.itemTemplate,t,{trigger:D?D.key:"",index:n}):oe(t),o=p({key:r,className:"p-mention-item",onClick:function(e){return le(e,t)}},M(0,"item"));return e.createElement("li",o,i,e.createElement(v,null))},de=function(){var t=p({ref:z,className:"p-mention-items"},V("items"));if(h.suggestions){var n=h.suggestions.map(ye);return e.createElement("ul",t,n)}return null},ve=c("p-mention p-component p-inputwrapper",{"p-inputwrapper-filled":ae,"p-inputwrapper-focus":S},h.className),he=c("p-mention-input",h.inputClassName),be=j.getOtherProps(h),xe=(se=c("p-mention-panel p-component",h.panelClassName),ce=T({maxHeight:h.scrollHeight},h.panelStyle),pe=s.getJSXElement(h.headerTemplate,h),fe=s.getJSXElement(h.footerTemplate,h),ge=de(),me=p({ref:A,className:se,style:ce,onClick:W},V("panel")),e.createElement(d,{element:e.createElement(r,{nodeRef:A,classNames:"p-connected-overlay",in:x,timeout:{enter:120,exit:100},options:h.transitionOptions,unmountOnExit:!0,onEnter:Z,onEntering:q,onEntered:$,onExit:G,onExited:L},e.createElement("div",me,pe,ge,fe)),appendTo:"self"})),Oe=p(T(T({ref:F,id:h.inputId,className:he,style:h.inputStyle},be),{},{onFocus:function(e){w(!0),h.onFocus&&h.onFocus(e)},onBlur:function(e){w(!1),h.onBlur&&h.onBlur(e)},onKeyDown:function(e){if(x){var t=f.findSingle(A.current,"li.p-highlight");switch(e.which){case 40:if(t){var n=t.nextElementSibling;n&&(f.addClass(n,"p-highlight"),f.removeClass(t,"p-highlight"),f.scrollInView(A.current,n))}else(t=f.findSingle(A.current,"li"))&&f.addClass(t,"p-highlight");e.preventDefault();break;case 38:if(t){var r=t.previousElementSibling;r&&(f.addClass(r,"p-highlight"),f.removeClass(t,"p-highlight"),f.scrollInView(A.current,r))}e.preventDefault();break;case 8:var i=e.target,o=i.selectionStart;i.value.substring(o-1,o)===D.key&&Y();break;case 13:t&&ie(e,h.suggestions[f.index(t)]),e.preventDefault();break;case 27:Y(),e.preventDefault()}}},onInput:function(e){h.onInput&&h.onInput(e),e.target.value.length>0?f.addClass(B.current,"p-inputwrapper-filled"):f.removeClass(B.current,"p-inputwrapper-filled")},onKeyUp:function(e){37!==e.which&&39!==e.which||ne(e)},onChange:function(e){h.onChange&&h.onChange(e),ne(e)}}),V("input")),Ee=p({ref:B,id:h.id,className:ve,style:h.style},j.getOtherProps(h),V("root"));return e.createElement("div",Ee,e.createElement(N,Oe),xe)})));H.displayName="Mention";export{H as Mention};
|
package/mention/mention.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
this.primereact = this.primereact || {};
|
|
2
|
-
this.primereact.mention = (function (exports, React, PrimeReact, csstransition, hooks, keyfilter, tooltip, utils, overlayservice, portal, ripple) {
|
|
2
|
+
this.primereact.mention = (function (exports, React, PrimeReact, csstransition, hooks, keyfilter, tooltip, utils, componentbase, overlayservice, portal, ripple) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -25,21 +25,6 @@ this.primereact.mention = (function (exports, React, PrimeReact, csstransition,
|
|
|
25
25
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
26
26
|
var PrimeReact__default = /*#__PURE__*/_interopDefaultLegacy(PrimeReact);
|
|
27
27
|
|
|
28
|
-
function _extends() {
|
|
29
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
30
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
31
|
-
var source = arguments[i];
|
|
32
|
-
for (var key in source) {
|
|
33
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
34
|
-
target[key] = source[key];
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
return target;
|
|
39
|
-
};
|
|
40
|
-
return _extends.apply(this, arguments);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
28
|
function _typeof(obj) {
|
|
44
29
|
"@babel/helpers - typeof";
|
|
45
30
|
|
|
@@ -136,13 +121,29 @@ this.primereact.mention = (function (exports, React, PrimeReact, csstransition,
|
|
|
136
121
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
137
122
|
}
|
|
138
123
|
|
|
139
|
-
|
|
124
|
+
function _extends() {
|
|
125
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
126
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
127
|
+
var source = arguments[i];
|
|
128
|
+
for (var key in source) {
|
|
129
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
130
|
+
target[key] = source[key];
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return target;
|
|
135
|
+
};
|
|
136
|
+
return _extends.apply(this, arguments);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
var InputTextareaBase = componentbase.ComponentBase.extend({
|
|
140
140
|
defaultProps: {
|
|
141
141
|
__TYPE: 'InputTextarea',
|
|
142
142
|
autoResize: false,
|
|
143
143
|
keyfilter: null,
|
|
144
144
|
onBlur: null,
|
|
145
145
|
onFocus: null,
|
|
146
|
+
onBeforeInput: null,
|
|
146
147
|
onInput: null,
|
|
147
148
|
onKeyDown: null,
|
|
148
149
|
onKeyUp: null,
|
|
@@ -151,19 +152,18 @@ this.primereact.mention = (function (exports, React, PrimeReact, csstransition,
|
|
|
151
152
|
tooltipOptions: null,
|
|
152
153
|
validateOnly: false,
|
|
153
154
|
children: undefined
|
|
154
|
-
},
|
|
155
|
-
getProps: function getProps(props) {
|
|
156
|
-
return utils.ObjectUtils.getMergedProps(props, InputTextareaBase.defaultProps);
|
|
157
|
-
},
|
|
158
|
-
getOtherProps: function getOtherProps(props) {
|
|
159
|
-
return utils.ObjectUtils.getDiffProps(props, InputTextareaBase.defaultProps);
|
|
160
155
|
}
|
|
161
|
-
};
|
|
156
|
+
});
|
|
162
157
|
|
|
163
158
|
var InputTextarea = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
164
|
-
var
|
|
159
|
+
var context = React__namespace.useContext(PrimeReact.PrimeReactContext);
|
|
160
|
+
var props = InputTextareaBase.getProps(inProps, context);
|
|
165
161
|
var elementRef = React__namespace.useRef(ref);
|
|
166
162
|
var cachedScrollHeight = React__namespace.useRef(0);
|
|
163
|
+
var _InputTextareaBase$se = InputTextareaBase.setMetaData({
|
|
164
|
+
props: props
|
|
165
|
+
}),
|
|
166
|
+
ptm = _InputTextareaBase$se.ptm;
|
|
167
167
|
var onFocus = function onFocus(event) {
|
|
168
168
|
if (props.autoResize) {
|
|
169
169
|
resize();
|
|
@@ -188,6 +188,12 @@ this.primereact.mention = (function (exports, React, PrimeReact, csstransition,
|
|
|
188
188
|
keyfilter.KeyFilter.onKeyPress(event, props.keyfilter, props.validateOnly);
|
|
189
189
|
}
|
|
190
190
|
};
|
|
191
|
+
var onBeforeInput = function onBeforeInput(event) {
|
|
192
|
+
props.onBeforeInput && props.onBeforeInput(event);
|
|
193
|
+
if (props.keyfilter) {
|
|
194
|
+
keyfilter.KeyFilter.onBeforeInput(event, props.keyfilter, props.validateOnly);
|
|
195
|
+
}
|
|
196
|
+
};
|
|
191
197
|
var onPaste = function onPaste(event) {
|
|
192
198
|
props.onPaste && props.onPaste(event);
|
|
193
199
|
if (props.keyfilter) {
|
|
@@ -234,30 +240,32 @@ this.primereact.mention = (function (exports, React, PrimeReact, csstransition,
|
|
|
234
240
|
return utils.ObjectUtils.isNotEmpty(props.value) || utils.ObjectUtils.isNotEmpty(props.defaultValue);
|
|
235
241
|
}, [props.value, props.defaultValue]);
|
|
236
242
|
var hasTooltip = utils.ObjectUtils.isNotEmpty(props.tooltip);
|
|
237
|
-
var otherProps = InputTextareaBase.getOtherProps(props);
|
|
238
243
|
var className = utils.classNames('p-inputtextarea p-inputtext p-component', {
|
|
239
244
|
'p-disabled': props.disabled,
|
|
240
245
|
'p-filled': isFilled,
|
|
241
246
|
'p-inputtextarea-resizable': props.autoResize
|
|
242
247
|
}, props.className);
|
|
243
|
-
|
|
244
|
-
ref: elementRef
|
|
245
|
-
}, otherProps, {
|
|
248
|
+
var rootProps = utils.mergeProps({
|
|
249
|
+
ref: elementRef,
|
|
246
250
|
className: className,
|
|
247
251
|
onFocus: onFocus,
|
|
248
252
|
onBlur: onBlur,
|
|
249
253
|
onKeyUp: onKeyUp,
|
|
250
254
|
onKeyDown: onKeyDown,
|
|
255
|
+
onBeforeInput: onBeforeInput,
|
|
251
256
|
onInput: onInput,
|
|
252
257
|
onPaste: onPaste
|
|
253
|
-
}
|
|
258
|
+
}, InputTextareaBase.getOtherProps(props), ptm('root'));
|
|
259
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("textarea", rootProps), hasTooltip && /*#__PURE__*/React__namespace.createElement(tooltip.Tooltip, _extends({
|
|
254
260
|
target: elementRef,
|
|
255
261
|
content: props.tooltip
|
|
256
|
-
}, props.tooltipOptions
|
|
262
|
+
}, props.tooltipOptions, {
|
|
263
|
+
pt: ptm('tooltip')
|
|
264
|
+
})));
|
|
257
265
|
}));
|
|
258
266
|
InputTextarea.displayName = 'InputTextarea';
|
|
259
267
|
|
|
260
|
-
var MentionBase = {
|
|
268
|
+
var MentionBase = componentbase.ComponentBase.extend({
|
|
261
269
|
defaultProps: {
|
|
262
270
|
__TYPE: 'Mention',
|
|
263
271
|
autoHighlight: true,
|
|
@@ -288,19 +296,14 @@ this.primereact.mention = (function (exports, React, PrimeReact, csstransition,
|
|
|
288
296
|
onSelect: null,
|
|
289
297
|
onShow: null,
|
|
290
298
|
children: undefined
|
|
291
|
-
},
|
|
292
|
-
getProps: function getProps(props) {
|
|
293
|
-
return utils.ObjectUtils.getMergedProps(props, MentionBase.defaultProps);
|
|
294
|
-
},
|
|
295
|
-
getOtherProps: function getOtherProps(props) {
|
|
296
|
-
return utils.ObjectUtils.getDiffProps(props, MentionBase.defaultProps);
|
|
297
299
|
}
|
|
298
|
-
};
|
|
300
|
+
});
|
|
299
301
|
|
|
300
302
|
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; }
|
|
301
303
|
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; }
|
|
302
304
|
var Mention = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
303
|
-
var
|
|
305
|
+
var context = React__namespace.useContext(PrimeReact.PrimeReactContext);
|
|
306
|
+
var props = MentionBase.getProps(inProps, context);
|
|
304
307
|
var _React$useState = React__namespace.useState(false),
|
|
305
308
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
306
309
|
overlayVisibleState = _React$useState2[0],
|
|
@@ -322,6 +325,23 @@ this.primereact.mention = (function (exports, React, PrimeReact, csstransition,
|
|
|
322
325
|
var inputRef = React__namespace.useRef(props.inputRef);
|
|
323
326
|
var listRef = React__namespace.useRef(null);
|
|
324
327
|
var timeout = React__namespace.useRef(null);
|
|
328
|
+
var _MentionBase$setMetaD = MentionBase.setMetaData({
|
|
329
|
+
props: props,
|
|
330
|
+
state: {
|
|
331
|
+
overlayVisible: overlayVisibleState,
|
|
332
|
+
focused: focusedState,
|
|
333
|
+
searching: searchingState,
|
|
334
|
+
trigger: triggerState
|
|
335
|
+
}
|
|
336
|
+
}),
|
|
337
|
+
ptm = _MentionBase$setMetaD.ptm;
|
|
338
|
+
var getPTOptions = function getPTOptions(item, suggestion) {
|
|
339
|
+
return ptm(suggestion, {
|
|
340
|
+
context: {
|
|
341
|
+
trigger: triggerState ? triggerState.key : ''
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
};
|
|
325
345
|
var _useOverlayListener = hooks.useOverlayListener({
|
|
326
346
|
target: elementRef,
|
|
327
347
|
overlay: overlayRef,
|
|
@@ -343,7 +363,7 @@ this.primereact.mention = (function (exports, React, PrimeReact, csstransition,
|
|
|
343
363
|
setTriggerState(null);
|
|
344
364
|
};
|
|
345
365
|
var onOverlayEnter = function onOverlayEnter() {
|
|
346
|
-
utils.ZIndexUtils.set('overlay', overlayRef.current, PrimeReact__default["default"].autoZIndex, PrimeReact__default["default"].zIndex['overlay']);
|
|
366
|
+
utils.ZIndexUtils.set('overlay', overlayRef.current, context && context.autoZIndex || PrimeReact__default["default"].autoZIndex, context && context.zIndex['overlay'] || PrimeReact__default["default"].zIndex['overlay']);
|
|
347
367
|
alignOverlay();
|
|
348
368
|
};
|
|
349
369
|
var onOverlayEntering = function onOverlayEntering() {
|
|
@@ -611,21 +631,23 @@ this.primereact.mention = (function (exports, React, PrimeReact, csstransition,
|
|
|
611
631
|
trigger: triggerState ? triggerState.key : '',
|
|
612
632
|
index: index
|
|
613
633
|
}) : formatValue(suggestion);
|
|
614
|
-
|
|
634
|
+
var itemProps = utils.mergeProps({
|
|
615
635
|
key: key,
|
|
616
|
-
className:
|
|
636
|
+
className: 'p-mention-item',
|
|
617
637
|
onClick: function onClick(e) {
|
|
618
638
|
return onItemClick(e, suggestion);
|
|
619
639
|
}
|
|
620
|
-
},
|
|
640
|
+
}, getPTOptions(suggestion, 'item'));
|
|
641
|
+
return /*#__PURE__*/React__namespace.createElement("li", itemProps, content, /*#__PURE__*/React__namespace.createElement(ripple.Ripple, null));
|
|
621
642
|
};
|
|
622
643
|
var createList = function createList() {
|
|
644
|
+
var itemsProps = utils.mergeProps({
|
|
645
|
+
ref: listRef,
|
|
646
|
+
className: 'p-mention-items'
|
|
647
|
+
}, ptm('items'));
|
|
623
648
|
if (props.suggestions) {
|
|
624
649
|
var items = props.suggestions.map(createItem);
|
|
625
|
-
return /*#__PURE__*/React__namespace.createElement("ul",
|
|
626
|
-
ref: listRef,
|
|
627
|
-
className: "p-mention-items"
|
|
628
|
-
}, items);
|
|
650
|
+
return /*#__PURE__*/React__namespace.createElement("ul", itemsProps, items);
|
|
629
651
|
}
|
|
630
652
|
return null;
|
|
631
653
|
};
|
|
@@ -637,6 +659,12 @@ this.primereact.mention = (function (exports, React, PrimeReact, csstransition,
|
|
|
637
659
|
var header = utils.ObjectUtils.getJSXElement(props.headerTemplate, props);
|
|
638
660
|
var footer = utils.ObjectUtils.getJSXElement(props.footerTemplate, props);
|
|
639
661
|
var list = createList();
|
|
662
|
+
var panelProps = utils.mergeProps({
|
|
663
|
+
ref: overlayRef,
|
|
664
|
+
className: panelClassName,
|
|
665
|
+
style: panelStyle,
|
|
666
|
+
onClick: onPanelClick
|
|
667
|
+
}, ptm('panel'));
|
|
640
668
|
var panel = /*#__PURE__*/React__namespace.createElement(csstransition.CSSTransition, {
|
|
641
669
|
nodeRef: overlayRef,
|
|
642
670
|
classNames: "p-connected-overlay",
|
|
@@ -652,12 +680,7 @@ this.primereact.mention = (function (exports, React, PrimeReact, csstransition,
|
|
|
652
680
|
onEntered: onOverlayEntered,
|
|
653
681
|
onExit: onOverlayExit,
|
|
654
682
|
onExited: onOverlayExited
|
|
655
|
-
}, /*#__PURE__*/React__namespace.createElement("div",
|
|
656
|
-
ref: overlayRef,
|
|
657
|
-
className: panelClassName,
|
|
658
|
-
style: panelStyle,
|
|
659
|
-
onClick: onPanelClick
|
|
660
|
-
}, header, list, footer));
|
|
683
|
+
}, /*#__PURE__*/React__namespace.createElement("div", panelProps, header, list, footer));
|
|
661
684
|
return /*#__PURE__*/React__namespace.createElement(portal.Portal, {
|
|
662
685
|
element: panel,
|
|
663
686
|
appendTo: "self"
|
|
@@ -670,24 +693,26 @@ this.primereact.mention = (function (exports, React, PrimeReact, csstransition,
|
|
|
670
693
|
var inputClassName = utils.classNames('p-mention-input', props.inputClassName);
|
|
671
694
|
var inputProps = MentionBase.getOtherProps(props);
|
|
672
695
|
var panel = createPanel();
|
|
673
|
-
|
|
674
|
-
ref: elementRef,
|
|
675
|
-
id: props.id,
|
|
676
|
-
className: className,
|
|
677
|
-
style: props.style
|
|
678
|
-
}, /*#__PURE__*/React__namespace.createElement(InputTextarea, _extends({
|
|
696
|
+
var inputMentionProps = utils.mergeProps(_objectSpread(_objectSpread({
|
|
679
697
|
ref: inputRef,
|
|
680
698
|
id: props.inputId,
|
|
681
699
|
className: inputClassName,
|
|
682
700
|
style: props.inputStyle
|
|
683
|
-
}, inputProps, {
|
|
701
|
+
}, inputProps), {}, {
|
|
684
702
|
onFocus: onFocus,
|
|
685
703
|
onBlur: onBlur,
|
|
686
704
|
onKeyDown: onKeyDown,
|
|
687
705
|
onInput: onInput,
|
|
688
706
|
onKeyUp: onKeyUp,
|
|
689
707
|
onChange: onChange
|
|
690
|
-
})
|
|
708
|
+
}), ptm('input'));
|
|
709
|
+
var rootProps = utils.mergeProps({
|
|
710
|
+
ref: elementRef,
|
|
711
|
+
id: props.id,
|
|
712
|
+
className: className,
|
|
713
|
+
style: props.style
|
|
714
|
+
}, MentionBase.getOtherProps(props), ptm('root'));
|
|
715
|
+
return /*#__PURE__*/React__namespace.createElement("div", rootProps, /*#__PURE__*/React__namespace.createElement(InputTextarea, inputMentionProps), panel);
|
|
691
716
|
}));
|
|
692
717
|
Mention.displayName = 'Mention';
|
|
693
718
|
|
|
@@ -697,4 +722,4 @@ this.primereact.mention = (function (exports, React, PrimeReact, csstransition,
|
|
|
697
722
|
|
|
698
723
|
return exports;
|
|
699
724
|
|
|
700
|
-
})({}, React, primereact.api, primereact.csstransition, primereact.hooks, primereact.keyfilter, primereact.tooltip, primereact.utils, primereact.overlayservice, primereact.portal, primereact.ripple);
|
|
725
|
+
})({}, React, primereact.api, primereact.csstransition, primereact.hooks, primereact.keyfilter, primereact.tooltip, primereact.utils, primereact.componentbase, primereact.overlayservice, primereact.portal, primereact.ripple);
|