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.cjs.js
CHANGED
|
@@ -9,6 +9,7 @@ var hooks = require('primereact/hooks');
|
|
|
9
9
|
var keyfilter = require('primereact/keyfilter');
|
|
10
10
|
var tooltip = require('primereact/tooltip');
|
|
11
11
|
var utils = require('primereact/utils');
|
|
12
|
+
var componentbase = require('primereact/componentbase');
|
|
12
13
|
var overlayservice = require('primereact/overlayservice');
|
|
13
14
|
var portal = require('primereact/portal');
|
|
14
15
|
var ripple = require('primereact/ripple');
|
|
@@ -36,21 +37,6 @@ function _interopNamespace(e) {
|
|
|
36
37
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
37
38
|
var PrimeReact__default = /*#__PURE__*/_interopDefaultLegacy(PrimeReact);
|
|
38
39
|
|
|
39
|
-
function _extends() {
|
|
40
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
41
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
42
|
-
var source = arguments[i];
|
|
43
|
-
for (var key in source) {
|
|
44
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
45
|
-
target[key] = source[key];
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
return target;
|
|
50
|
-
};
|
|
51
|
-
return _extends.apply(this, arguments);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
40
|
function _typeof(obj) {
|
|
55
41
|
"@babel/helpers - typeof";
|
|
56
42
|
|
|
@@ -147,13 +133,29 @@ function _slicedToArray(arr, i) {
|
|
|
147
133
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
148
134
|
}
|
|
149
135
|
|
|
150
|
-
|
|
136
|
+
function _extends() {
|
|
137
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
138
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
139
|
+
var source = arguments[i];
|
|
140
|
+
for (var key in source) {
|
|
141
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
142
|
+
target[key] = source[key];
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return target;
|
|
147
|
+
};
|
|
148
|
+
return _extends.apply(this, arguments);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
var InputTextareaBase = componentbase.ComponentBase.extend({
|
|
151
152
|
defaultProps: {
|
|
152
153
|
__TYPE: 'InputTextarea',
|
|
153
154
|
autoResize: false,
|
|
154
155
|
keyfilter: null,
|
|
155
156
|
onBlur: null,
|
|
156
157
|
onFocus: null,
|
|
158
|
+
onBeforeInput: null,
|
|
157
159
|
onInput: null,
|
|
158
160
|
onKeyDown: null,
|
|
159
161
|
onKeyUp: null,
|
|
@@ -162,19 +164,18 @@ var InputTextareaBase = {
|
|
|
162
164
|
tooltipOptions: null,
|
|
163
165
|
validateOnly: false,
|
|
164
166
|
children: undefined
|
|
165
|
-
},
|
|
166
|
-
getProps: function getProps(props) {
|
|
167
|
-
return utils.ObjectUtils.getMergedProps(props, InputTextareaBase.defaultProps);
|
|
168
|
-
},
|
|
169
|
-
getOtherProps: function getOtherProps(props) {
|
|
170
|
-
return utils.ObjectUtils.getDiffProps(props, InputTextareaBase.defaultProps);
|
|
171
167
|
}
|
|
172
|
-
};
|
|
168
|
+
});
|
|
173
169
|
|
|
174
170
|
var InputTextarea = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
175
|
-
var
|
|
171
|
+
var context = React__namespace.useContext(PrimeReact.PrimeReactContext);
|
|
172
|
+
var props = InputTextareaBase.getProps(inProps, context);
|
|
176
173
|
var elementRef = React__namespace.useRef(ref);
|
|
177
174
|
var cachedScrollHeight = React__namespace.useRef(0);
|
|
175
|
+
var _InputTextareaBase$se = InputTextareaBase.setMetaData({
|
|
176
|
+
props: props
|
|
177
|
+
}),
|
|
178
|
+
ptm = _InputTextareaBase$se.ptm;
|
|
178
179
|
var onFocus = function onFocus(event) {
|
|
179
180
|
if (props.autoResize) {
|
|
180
181
|
resize();
|
|
@@ -199,6 +200,12 @@ var InputTextarea = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__name
|
|
|
199
200
|
keyfilter.KeyFilter.onKeyPress(event, props.keyfilter, props.validateOnly);
|
|
200
201
|
}
|
|
201
202
|
};
|
|
203
|
+
var onBeforeInput = function onBeforeInput(event) {
|
|
204
|
+
props.onBeforeInput && props.onBeforeInput(event);
|
|
205
|
+
if (props.keyfilter) {
|
|
206
|
+
keyfilter.KeyFilter.onBeforeInput(event, props.keyfilter, props.validateOnly);
|
|
207
|
+
}
|
|
208
|
+
};
|
|
202
209
|
var onPaste = function onPaste(event) {
|
|
203
210
|
props.onPaste && props.onPaste(event);
|
|
204
211
|
if (props.keyfilter) {
|
|
@@ -245,30 +252,32 @@ var InputTextarea = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__name
|
|
|
245
252
|
return utils.ObjectUtils.isNotEmpty(props.value) || utils.ObjectUtils.isNotEmpty(props.defaultValue);
|
|
246
253
|
}, [props.value, props.defaultValue]);
|
|
247
254
|
var hasTooltip = utils.ObjectUtils.isNotEmpty(props.tooltip);
|
|
248
|
-
var otherProps = InputTextareaBase.getOtherProps(props);
|
|
249
255
|
var className = utils.classNames('p-inputtextarea p-inputtext p-component', {
|
|
250
256
|
'p-disabled': props.disabled,
|
|
251
257
|
'p-filled': isFilled,
|
|
252
258
|
'p-inputtextarea-resizable': props.autoResize
|
|
253
259
|
}, props.className);
|
|
254
|
-
|
|
255
|
-
ref: elementRef
|
|
256
|
-
}, otherProps, {
|
|
260
|
+
var rootProps = utils.mergeProps({
|
|
261
|
+
ref: elementRef,
|
|
257
262
|
className: className,
|
|
258
263
|
onFocus: onFocus,
|
|
259
264
|
onBlur: onBlur,
|
|
260
265
|
onKeyUp: onKeyUp,
|
|
261
266
|
onKeyDown: onKeyDown,
|
|
267
|
+
onBeforeInput: onBeforeInput,
|
|
262
268
|
onInput: onInput,
|
|
263
269
|
onPaste: onPaste
|
|
264
|
-
}
|
|
270
|
+
}, InputTextareaBase.getOtherProps(props), ptm('root'));
|
|
271
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("textarea", rootProps), hasTooltip && /*#__PURE__*/React__namespace.createElement(tooltip.Tooltip, _extends({
|
|
265
272
|
target: elementRef,
|
|
266
273
|
content: props.tooltip
|
|
267
|
-
}, props.tooltipOptions
|
|
274
|
+
}, props.tooltipOptions, {
|
|
275
|
+
pt: ptm('tooltip')
|
|
276
|
+
})));
|
|
268
277
|
}));
|
|
269
278
|
InputTextarea.displayName = 'InputTextarea';
|
|
270
279
|
|
|
271
|
-
var MentionBase = {
|
|
280
|
+
var MentionBase = componentbase.ComponentBase.extend({
|
|
272
281
|
defaultProps: {
|
|
273
282
|
__TYPE: 'Mention',
|
|
274
283
|
autoHighlight: true,
|
|
@@ -299,19 +308,14 @@ var MentionBase = {
|
|
|
299
308
|
onSelect: null,
|
|
300
309
|
onShow: null,
|
|
301
310
|
children: undefined
|
|
302
|
-
},
|
|
303
|
-
getProps: function getProps(props) {
|
|
304
|
-
return utils.ObjectUtils.getMergedProps(props, MentionBase.defaultProps);
|
|
305
|
-
},
|
|
306
|
-
getOtherProps: function getOtherProps(props) {
|
|
307
|
-
return utils.ObjectUtils.getDiffProps(props, MentionBase.defaultProps);
|
|
308
311
|
}
|
|
309
|
-
};
|
|
312
|
+
});
|
|
310
313
|
|
|
311
314
|
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; }
|
|
312
315
|
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; }
|
|
313
316
|
var Mention = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
314
|
-
var
|
|
317
|
+
var context = React__namespace.useContext(PrimeReact.PrimeReactContext);
|
|
318
|
+
var props = MentionBase.getProps(inProps, context);
|
|
315
319
|
var _React$useState = React__namespace.useState(false),
|
|
316
320
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
317
321
|
overlayVisibleState = _React$useState2[0],
|
|
@@ -333,6 +337,23 @@ var Mention = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
|
|
|
333
337
|
var inputRef = React__namespace.useRef(props.inputRef);
|
|
334
338
|
var listRef = React__namespace.useRef(null);
|
|
335
339
|
var timeout = React__namespace.useRef(null);
|
|
340
|
+
var _MentionBase$setMetaD = MentionBase.setMetaData({
|
|
341
|
+
props: props,
|
|
342
|
+
state: {
|
|
343
|
+
overlayVisible: overlayVisibleState,
|
|
344
|
+
focused: focusedState,
|
|
345
|
+
searching: searchingState,
|
|
346
|
+
trigger: triggerState
|
|
347
|
+
}
|
|
348
|
+
}),
|
|
349
|
+
ptm = _MentionBase$setMetaD.ptm;
|
|
350
|
+
var getPTOptions = function getPTOptions(item, suggestion) {
|
|
351
|
+
return ptm(suggestion, {
|
|
352
|
+
context: {
|
|
353
|
+
trigger: triggerState ? triggerState.key : ''
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
};
|
|
336
357
|
var _useOverlayListener = hooks.useOverlayListener({
|
|
337
358
|
target: elementRef,
|
|
338
359
|
overlay: overlayRef,
|
|
@@ -354,7 +375,7 @@ var Mention = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
|
|
|
354
375
|
setTriggerState(null);
|
|
355
376
|
};
|
|
356
377
|
var onOverlayEnter = function onOverlayEnter() {
|
|
357
|
-
utils.ZIndexUtils.set('overlay', overlayRef.current, PrimeReact__default["default"].autoZIndex, PrimeReact__default["default"].zIndex['overlay']);
|
|
378
|
+
utils.ZIndexUtils.set('overlay', overlayRef.current, context && context.autoZIndex || PrimeReact__default["default"].autoZIndex, context && context.zIndex['overlay'] || PrimeReact__default["default"].zIndex['overlay']);
|
|
358
379
|
alignOverlay();
|
|
359
380
|
};
|
|
360
381
|
var onOverlayEntering = function onOverlayEntering() {
|
|
@@ -622,21 +643,23 @@ var Mention = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
|
|
|
622
643
|
trigger: triggerState ? triggerState.key : '',
|
|
623
644
|
index: index
|
|
624
645
|
}) : formatValue(suggestion);
|
|
625
|
-
|
|
646
|
+
var itemProps = utils.mergeProps({
|
|
626
647
|
key: key,
|
|
627
|
-
className:
|
|
648
|
+
className: 'p-mention-item',
|
|
628
649
|
onClick: function onClick(e) {
|
|
629
650
|
return onItemClick(e, suggestion);
|
|
630
651
|
}
|
|
631
|
-
},
|
|
652
|
+
}, getPTOptions(suggestion, 'item'));
|
|
653
|
+
return /*#__PURE__*/React__namespace.createElement("li", itemProps, content, /*#__PURE__*/React__namespace.createElement(ripple.Ripple, null));
|
|
632
654
|
};
|
|
633
655
|
var createList = function createList() {
|
|
656
|
+
var itemsProps = utils.mergeProps({
|
|
657
|
+
ref: listRef,
|
|
658
|
+
className: 'p-mention-items'
|
|
659
|
+
}, ptm('items'));
|
|
634
660
|
if (props.suggestions) {
|
|
635
661
|
var items = props.suggestions.map(createItem);
|
|
636
|
-
return /*#__PURE__*/React__namespace.createElement("ul",
|
|
637
|
-
ref: listRef,
|
|
638
|
-
className: "p-mention-items"
|
|
639
|
-
}, items);
|
|
662
|
+
return /*#__PURE__*/React__namespace.createElement("ul", itemsProps, items);
|
|
640
663
|
}
|
|
641
664
|
return null;
|
|
642
665
|
};
|
|
@@ -648,6 +671,12 @@ var Mention = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
|
|
|
648
671
|
var header = utils.ObjectUtils.getJSXElement(props.headerTemplate, props);
|
|
649
672
|
var footer = utils.ObjectUtils.getJSXElement(props.footerTemplate, props);
|
|
650
673
|
var list = createList();
|
|
674
|
+
var panelProps = utils.mergeProps({
|
|
675
|
+
ref: overlayRef,
|
|
676
|
+
className: panelClassName,
|
|
677
|
+
style: panelStyle,
|
|
678
|
+
onClick: onPanelClick
|
|
679
|
+
}, ptm('panel'));
|
|
651
680
|
var panel = /*#__PURE__*/React__namespace.createElement(csstransition.CSSTransition, {
|
|
652
681
|
nodeRef: overlayRef,
|
|
653
682
|
classNames: "p-connected-overlay",
|
|
@@ -663,12 +692,7 @@ var Mention = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
|
|
|
663
692
|
onEntered: onOverlayEntered,
|
|
664
693
|
onExit: onOverlayExit,
|
|
665
694
|
onExited: onOverlayExited
|
|
666
|
-
}, /*#__PURE__*/React__namespace.createElement("div",
|
|
667
|
-
ref: overlayRef,
|
|
668
|
-
className: panelClassName,
|
|
669
|
-
style: panelStyle,
|
|
670
|
-
onClick: onPanelClick
|
|
671
|
-
}, header, list, footer));
|
|
695
|
+
}, /*#__PURE__*/React__namespace.createElement("div", panelProps, header, list, footer));
|
|
672
696
|
return /*#__PURE__*/React__namespace.createElement(portal.Portal, {
|
|
673
697
|
element: panel,
|
|
674
698
|
appendTo: "self"
|
|
@@ -681,24 +705,26 @@ var Mention = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
|
|
|
681
705
|
var inputClassName = utils.classNames('p-mention-input', props.inputClassName);
|
|
682
706
|
var inputProps = MentionBase.getOtherProps(props);
|
|
683
707
|
var panel = createPanel();
|
|
684
|
-
|
|
685
|
-
ref: elementRef,
|
|
686
|
-
id: props.id,
|
|
687
|
-
className: className,
|
|
688
|
-
style: props.style
|
|
689
|
-
}, /*#__PURE__*/React__namespace.createElement(InputTextarea, _extends({
|
|
708
|
+
var inputMentionProps = utils.mergeProps(_objectSpread(_objectSpread({
|
|
690
709
|
ref: inputRef,
|
|
691
710
|
id: props.inputId,
|
|
692
711
|
className: inputClassName,
|
|
693
712
|
style: props.inputStyle
|
|
694
|
-
}, inputProps, {
|
|
713
|
+
}, inputProps), {}, {
|
|
695
714
|
onFocus: onFocus,
|
|
696
715
|
onBlur: onBlur,
|
|
697
716
|
onKeyDown: onKeyDown,
|
|
698
717
|
onInput: onInput,
|
|
699
718
|
onKeyUp: onKeyUp,
|
|
700
719
|
onChange: onChange
|
|
701
|
-
})
|
|
720
|
+
}), ptm('input'));
|
|
721
|
+
var rootProps = utils.mergeProps({
|
|
722
|
+
ref: elementRef,
|
|
723
|
+
id: props.id,
|
|
724
|
+
className: className,
|
|
725
|
+
style: props.style
|
|
726
|
+
}, MentionBase.getOtherProps(props), ptm('root'));
|
|
727
|
+
return /*#__PURE__*/React__namespace.createElement("div", rootProps, /*#__PURE__*/React__namespace.createElement(InputTextarea, inputMentionProps), panel);
|
|
702
728
|
}));
|
|
703
729
|
Mention.displayName = 'Mention';
|
|
704
730
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/api"),n=require("primereact/csstransition"),r=require("primereact/hooks"),i=require("primereact/keyfilter"),l=require("primereact/tooltip"),o=require("primereact/utils"),u=require("primereact/overlayservice"),a=require("primereact/portal"),s=require("primereact/ripple");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function f(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var p=f(e),g=c(t);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 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 y(e,t){if("object"!==m(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==m(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function v(e){var t=y(e,"string");return"symbol"===m(t)?t:String(t)}function h(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 b(e){if(Array.isArray(e))return e}function O(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,l,o,u=[],a=!0,s=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=l.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&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return u}}function E(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 j(e,t){if(e){if("string"==typeof e)return E(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(e,t):void 0}}function x(){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 S(e,t){return b(e)||O(e,t)||j(e,t)||x()}var w={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 o.ObjectUtils.getMergedProps(e,w.defaultProps)},getOtherProps:function(e){return o.ObjectUtils.getDiffProps(e,w.defaultProps)}},P=p.memo(p.forwardRef((function(e,t){var n=w.getProps(e),r=p.useRef(t),u=p.useRef(0),a=function(e){var t=r.current;t&&o.DomHandler.isVisible(t)&&(u.current||(u.current=t.scrollHeight,t.style.overflow="hidden"),(u.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",u.current=t.scrollHeight))};p.useEffect((function(){o.ObjectUtils.combinedRefs(r,t)}),[r,t]),p.useEffect((function(){n.autoResize&&a(!0)}),[n.autoResize]);var s=p.useMemo((function(){return o.ObjectUtils.isNotEmpty(n.value)||o.ObjectUtils.isNotEmpty(n.defaultValue)}),[n.value,n.defaultValue]),c=o.ObjectUtils.isNotEmpty(n.tooltip),f=w.getOtherProps(n),g=o.classNames("p-inputtextarea p-inputtext p-component",{"p-disabled":n.disabled,"p-filled":s,"p-inputtextarea-resizable":n.autoResize},n.className);return p.createElement(p.Fragment,null,p.createElement("textarea",d({ref:r},f,{className:g,onFocus:function(e){n.autoResize&&a(),n.onFocus&&n.onFocus(e)},onBlur:function(e){n.autoResize&&a(),n.onBlur&&n.onBlur(e)},onKeyUp:function(e){n.autoResize&&a(),n.onKeyUp&&n.onKeyUp(e)},onKeyDown:function(e){n.onKeyDown&&n.onKeyDown(e),n.keyfilter&&i.KeyFilter.onKeyPress(e,n.keyfilter,n.validateOnly)},onInput:function(e){var t=e.target;n.autoResize&&a(o.ObjectUtils.isEmpty(t.value)),n.onInput&&n.onInput(e),o.ObjectUtils.isNotEmpty(t.value)?o.DomHandler.addClass(t,"p-filled"):o.DomHandler.removeClass(t,"p-filled")},onPaste:function(e){n.onPaste&&n.onPaste(e),n.keyfilter&&i.KeyFilter.onPaste(e,n.keyfilter,n.validateOnly)}})),c&&p.createElement(l.Tooltip,d({target:r,content:n.tooltip},n.tooltipOptions)))})));P.displayName="InputTextarea";var D={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 o.ObjectUtils.getMergedProps(e,D.defaultProps)},getOtherProps:function(e){return o.ObjectUtils.getDiffProps(e,D.defaultProps)}};function H(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 U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var C=p.memo(p.forwardRef((function(e,t){var i=D.getProps(e),l=S(p.useState(!1),2),c=l[0],f=l[1],m=S(p.useState(!1),2),y=m[0],v=m[1],h=S(p.useState(!1),2),b=h[0],O=h[1],E=S(p.useState(null),2),j=E[0],x=E[1],w=p.useRef(null),H=p.useRef(null),C=p.useRef(i.inputRef),I=p.useRef(null),N=p.useRef(null),R=S(r.useOverlayListener({target:w,overlay:H,listener:function(e,t){t.valid&&K()},when:c}),2),k=R[0],T=R[1],F=function(){f(!0)},K=function(){f(!1),O(!1),x(null)},A=function(){o.ZIndexUtils.set("overlay",H.current,g.default.autoZIndex,g.default.zIndex.overlay),B()},q=function(){i.autoHighlight&&i.suggestions&&i.suggestions.length&&o.DomHandler.addClass(I.current.firstChild,"p-highlight")},z=function(){k(),i.onShow&&i.onShow()},M=function(){T()},_=function(){o.ZIndexUtils.clear(H.current),i.onHide&&i.onHide()},B=function(){var e=j.key,t=j.index,n=C.current.value,r=o.DomHandler.getCursorOffset(C.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)")},V=function(e){u.OverlayService.emit("overlay-click",{originalEvent:e,target:w.current})},Z=function(e,t,n){if(!j){var r=Array.isArray(i.trigger)?i.trigger.find((function(e){return e===t})):i.trigger===t?i.trigger:null;if(r)return{key:r,index:n};var l=e.substring(0,n).lastIndexOf(" "),o=J(e,n);if(o.index>l)return o}return j},J=function(e,t){if(Array.isArray(i.trigger)){var n={};return i.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(i.trigger);return{key:i.trigger,index:-1!==r?r+1:-1}},X=function(e){N.current&&clearTimeout(N.current);var t=e.target,n=t.value,r=t.selectionStart,l=n.substring(r-1,r);if(" "!==l){var o=Z(n,l,r);if(o&&o.index>-1){var u=n.substring(o.index,r);N.current=setTimeout((function(){Y(e,u,o)}),i.delay)}}else K()},Y=function(e,t,n){i.onSearch&&(O(!0),x(n),i.onSearch({originalEvent:e,trigger:n.key,query:t}))},L=function(e,t){var n=C.current.value,r=e.target.selectionStart,l=n.indexOf(" ",j.index),o=n.substring(j.index,l>-1?l:r),u=$(t).replace(/\s+/g,"");if(o.trim()!==u){var a=n.substring(0,j.index),s=n.substring(j.index+o.length);C.current.value="".concat(a).concat(u," ").concat(s),e.target=C.current,i.onChange&&i.onChange(e)}var c=j.index+u.length+1;C.current.setSelectionRange(c,c),K(),i.onSelect&&i.onSelect({originalEvent:e,suggestion:t})},$=function(e){if(e){var t=Array.isArray(i.field)?i.field[i.trigger.findIndex((function(e){return e===j.key}))]:i.field;return t?o.ObjectUtils.resolveFieldData(e,t):e}return""},G=function(e,t){o.DomHandler.focus(C.current),L(e,t)},Q=C.current&&C.current.value,W=p.useMemo((function(){return o.ObjectUtils.isNotEmpty(i.value)||o.ObjectUtils.isNotEmpty(i.defaultValue)||o.ObjectUtils.isNotEmpty(Q)}),[i.value,i.defaultValue,Q]);p.useImperativeHandle(t,(function(){return{props:i,show:F,hide:K,focus:function(){return o.DomHandler.focus(C.current)},getElement:function(){return w.current},getOverlay:function(){return H.current},getInput:function(){return C.current}}})),p.useEffect((function(){o.ObjectUtils.combinedRefs(C,i.inputRef)}),[C,i.inputRef]),r.useUpdateEffect((function(){b&&(i.suggestions&&i.suggestions.length?F():K(),c&&B(),O(!1))}),[i.suggestions]),r.useUpdateEffect((function(){!W&&o.DomHandler.hasClass(w.current,"p-inputwrapper-filled")&&o.DomHandler.removeClass(w.current,"p-inputwrapper-filled")}),[W]),r.useUnmountEffect((function(){o.ZIndexUtils.clear(H.current)}));var ee,te,ne,re,ie,le=function(e,t){var n=t+"_item",r=i.itemTemplate?o.ObjectUtils.getJSXElement(i.itemTemplate,e,{trigger:j?j.key:"",index:t}):$(e);return p.createElement("li",{key:n,className:"p-mention-item",onClick:function(t){return G(t,e)}},r,p.createElement(s.Ripple,null))},oe=function(){if(i.suggestions){var e=i.suggestions.map(le);return p.createElement("ul",{ref:I,className:"p-mention-items"},e)}return null},ue=o.classNames("p-mention p-component p-inputwrapper",{"p-inputwrapper-filled":W,"p-inputwrapper-focus":y},i.className),ae=o.classNames("p-mention-input",i.inputClassName),se=D.getOtherProps(i),ce=(ee=o.classNames("p-mention-panel p-component",i.panelClassName),te=U({maxHeight:i.scrollHeight},i.panelStyle),ne=o.ObjectUtils.getJSXElement(i.headerTemplate,i),re=o.ObjectUtils.getJSXElement(i.footerTemplate,i),ie=oe(),p.createElement(a.Portal,{element:p.createElement(n.CSSTransition,{nodeRef:H,classNames:"p-connected-overlay",in:c,timeout:{enter:120,exit:100},options:i.transitionOptions,unmountOnExit:!0,onEnter:A,onEntering:q,onEntered:z,onExit:M,onExited:_},p.createElement("div",{ref:H,className:ee,style:te,onClick:V},ne,ie,re)),appendTo:"self"}));return p.createElement("div",{ref:w,id:i.id,className:ue,style:i.style},p.createElement(P,d({ref:C,id:i.inputId,className:ae,style:i.inputStyle},se,{onFocus:function(e){v(!0),i.onFocus&&i.onFocus(e)},onBlur:function(e){v(!1),i.onBlur&&i.onBlur(e)},onKeyDown:function(e){if(c){var t=o.DomHandler.findSingle(H.current,"li.p-highlight");switch(e.which){case 40:if(t){var n=t.nextElementSibling;n&&(o.DomHandler.addClass(n,"p-highlight"),o.DomHandler.removeClass(t,"p-highlight"),o.DomHandler.scrollInView(H.current,n))}else(t=o.DomHandler.findSingle(H.current,"li"))&&o.DomHandler.addClass(t,"p-highlight");e.preventDefault();break;case 38:if(t){var r=t.previousElementSibling;r&&(o.DomHandler.addClass(r,"p-highlight"),o.DomHandler.removeClass(t,"p-highlight"),o.DomHandler.scrollInView(H.current,r))}e.preventDefault();break;case 8:var l=e.target,u=l.selectionStart;l.value.substring(u-1,u)===j.key&&K();break;case 13:t&&L(e,i.suggestions[o.DomHandler.index(t)]),e.preventDefault();break;case 27:K(),e.preventDefault()}}},onInput:function(e){i.onInput&&i.onInput(e),e.target.value.length>0?o.DomHandler.addClass(w.current,"p-inputwrapper-filled"):o.DomHandler.removeClass(w.current,"p-inputwrapper-filled")},onKeyUp:function(e){37!==e.which&&39!==e.which||X(e)},onChange:function(e){i.onChange&&i.onChange(e),X(e)}})),ce)})));C.displayName="Mention",exports.Mention=C;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/api"),n=require("primereact/csstransition"),r=require("primereact/hooks"),i=require("primereact/keyfilter"),l=require("primereact/tooltip"),o=require("primereact/utils"),u=require("primereact/componentbase"),a=require("primereact/overlayservice"),s=require("primereact/portal"),c=require("primereact/ripple");function f(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function p(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var m=p(e),g=f(t);function d(e){return d="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},d(e)}function y(e,t){if("object"!==d(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function v(e){var t=y(e,"string");return"symbol"===d(t)?t:String(t)}function h(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 b(e){if(Array.isArray(e))return e}function O(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,l,o,u=[],a=!0,s=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=l.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&&(o=n.return(),Object(o)!==o))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 E(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 S(){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 j(e,t){return b(e)||O(e,t)||E(e,t)||S()}function w(){return w=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},w.apply(this,arguments)}var P=u.ComponentBase.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}}),D=m.memo(m.forwardRef((function(e,n){var r=m.useContext(t.PrimeReactContext),u=P.getProps(e,r),a=m.useRef(n),s=m.useRef(0),c=P.setMetaData({props:u}).ptm,f=function(e){var t=a.current;t&&o.DomHandler.isVisible(t)&&(s.current||(s.current=t.scrollHeight,t.style.overflow="hidden"),(s.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",s.current=t.scrollHeight))};m.useEffect((function(){o.ObjectUtils.combinedRefs(a,n)}),[a,n]),m.useEffect((function(){u.autoResize&&f(!0)}),[u.autoResize]);var p=m.useMemo((function(){return o.ObjectUtils.isNotEmpty(u.value)||o.ObjectUtils.isNotEmpty(u.defaultValue)}),[u.value,u.defaultValue]),g=o.ObjectUtils.isNotEmpty(u.tooltip),d=o.classNames("p-inputtextarea p-inputtext p-component",{"p-disabled":u.disabled,"p-filled":p,"p-inputtextarea-resizable":u.autoResize},u.className),y=o.mergeProps({ref:a,className:d,onFocus:function(e){u.autoResize&&f(),u.onFocus&&u.onFocus(e)},onBlur:function(e){u.autoResize&&f(),u.onBlur&&u.onBlur(e)},onKeyUp:function(e){u.autoResize&&f(),u.onKeyUp&&u.onKeyUp(e)},onKeyDown:function(e){u.onKeyDown&&u.onKeyDown(e),u.keyfilter&&i.KeyFilter.onKeyPress(e,u.keyfilter,u.validateOnly)},onBeforeInput:function(e){u.onBeforeInput&&u.onBeforeInput(e),u.keyfilter&&i.KeyFilter.onBeforeInput(e,u.keyfilter,u.validateOnly)},onInput:function(e){var t=e.target;u.autoResize&&f(o.ObjectUtils.isEmpty(t.value)),u.onInput&&u.onInput(e),o.ObjectUtils.isNotEmpty(t.value)?o.DomHandler.addClass(t,"p-filled"):o.DomHandler.removeClass(t,"p-filled")},onPaste:function(e){u.onPaste&&u.onPaste(e),u.keyfilter&&i.KeyFilter.onPaste(e,u.keyfilter,u.validateOnly)}},P.getOtherProps(u),c("root"));return m.createElement(m.Fragment,null,m.createElement("textarea",y),g&&m.createElement(l.Tooltip,w({target:a,content:u.tooltip},u.tooltipOptions,{pt:c("tooltip")})))})));D.displayName="InputTextarea";var H=u.ComponentBase.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 I(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 C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var k=m.memo(m.forwardRef((function(e,i){var l=m.useContext(t.PrimeReactContext),u=H.getProps(e,l),f=j(m.useState(!1),2),p=f[0],d=f[1],y=j(m.useState(!1),2),v=y[0],h=y[1],b=j(m.useState(!1),2),O=b[0],x=b[1],E=j(m.useState(null),2),S=E[0],w=E[1],P=m.useRef(null),I=m.useRef(null),k=m.useRef(u.inputRef),N=m.useRef(null),R=m.useRef(null),U=H.setMetaData({props:u,state:{overlayVisible:p,focused:v,searching:O,trigger:S}}).ptm,T=function(e,t){return U(t,{context:{trigger:S?S.key:""}})},B=j(r.useOverlayListener({target:P,overlay:I,listener:function(e,t){t.valid&&z()},when:p}),2),F=B[0],K=B[1],q=function(){d(!0)},z=function(){d(!1),x(!1),w(null)},A=function(){o.ZIndexUtils.set("overlay",I.current,l&&l.autoZIndex||g.default.autoZIndex,l&&l.zIndex.overlay||g.default.zIndex.overlay),J()},M=function(){u.autoHighlight&&u.suggestions&&u.suggestions.length&&o.DomHandler.addClass(N.current.firstChild,"p-highlight")},_=function(){F(),u.onShow&&u.onShow()},V=function(){K()},Z=function(){o.ZIndexUtils.clear(I.current),u.onHide&&u.onHide()},J=function(){var e=S.key,t=S.index,n=k.current.value,r=o.DomHandler.getCursorOffset(k.current,n.substring(0,t-1),n.substring(t),e);I.current.style.transformOrigin="top",I.current.style.left="calc(".concat(r.left,"px + 1rem)"),I.current.style.top="calc(".concat(r.top,"px + 1.2rem)")},X=function(e){a.OverlayService.emit("overlay-click",{originalEvent:e,target:P.current})},Y=function(e,t,n){if(!S){var r=Array.isArray(u.trigger)?u.trigger.find((function(e){return e===t})):u.trigger===t?u.trigger:null;if(r)return{key:r,index:n};var i=e.substring(0,n).lastIndexOf(" "),l=L(e,n);if(l.index>i)return l}return S},L=function(e,t){if(Array.isArray(u.trigger)){var n={};return u.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(u.trigger);return{key:u.trigger,index:-1!==r?r+1:-1}},$=function(e){R.current&&clearTimeout(R.current);var t=e.target,n=t.value,r=t.selectionStart,i=n.substring(r-1,r);if(" "!==i){var l=Y(n,i,r);if(l&&l.index>-1){var o=n.substring(l.index,r);R.current=setTimeout((function(){G(e,o,l)}),u.delay)}}else z()},G=function(e,t,n){u.onSearch&&(x(!0),w(n),u.onSearch({originalEvent:e,trigger:n.key,query:t}))},Q=function(e,t){var n=k.current.value,r=e.target.selectionStart,i=n.indexOf(" ",S.index),l=n.substring(S.index,i>-1?i:r),o=W(t).replace(/\s+/g,"");if(l.trim()!==o){var a=n.substring(0,S.index),s=n.substring(S.index+l.length);k.current.value="".concat(a).concat(o," ").concat(s),e.target=k.current,u.onChange&&u.onChange(e)}var c=S.index+o.length+1;k.current.setSelectionRange(c,c),z(),u.onSelect&&u.onSelect({originalEvent:e,suggestion:t})},W=function(e){if(e){var t=Array.isArray(u.field)?u.field[u.trigger.findIndex((function(e){return e===S.key}))]:u.field;return t?o.ObjectUtils.resolveFieldData(e,t):e}return""},ee=function(e,t){o.DomHandler.focus(k.current),Q(e,t)},te=k.current&&k.current.value,ne=m.useMemo((function(){return o.ObjectUtils.isNotEmpty(u.value)||o.ObjectUtils.isNotEmpty(u.defaultValue)||o.ObjectUtils.isNotEmpty(te)}),[u.value,u.defaultValue,te]);m.useImperativeHandle(i,(function(){return{props:u,show:q,hide:z,focus:function(){return o.DomHandler.focus(k.current)},getElement:function(){return P.current},getOverlay:function(){return I.current},getInput:function(){return k.current}}})),m.useEffect((function(){o.ObjectUtils.combinedRefs(k,u.inputRef)}),[k,u.inputRef]),r.useUpdateEffect((function(){O&&(u.suggestions&&u.suggestions.length?q():z(),p&&J(),x(!1))}),[u.suggestions]),r.useUpdateEffect((function(){!ne&&o.DomHandler.hasClass(P.current,"p-inputwrapper-filled")&&o.DomHandler.removeClass(P.current,"p-inputwrapper-filled")}),[ne]),r.useUnmountEffect((function(){o.ZIndexUtils.clear(I.current)}));var re,ie,le,oe,ue,ae,se=function(e,t){var n=t+"_item",r=u.itemTemplate?o.ObjectUtils.getJSXElement(u.itemTemplate,e,{trigger:S?S.key:"",index:t}):W(e),i=o.mergeProps({key:n,className:"p-mention-item",onClick:function(t){return ee(t,e)}},T(0,"item"));return m.createElement("li",i,r,m.createElement(c.Ripple,null))},ce=function(){var e=o.mergeProps({ref:N,className:"p-mention-items"},U("items"));if(u.suggestions){var t=u.suggestions.map(se);return m.createElement("ul",e,t)}return null},fe=o.classNames("p-mention p-component p-inputwrapper",{"p-inputwrapper-filled":ne,"p-inputwrapper-focus":v},u.className),pe=o.classNames("p-mention-input",u.inputClassName),me=H.getOtherProps(u),ge=(re=o.classNames("p-mention-panel p-component",u.panelClassName),ie=C({maxHeight:u.scrollHeight},u.panelStyle),le=o.ObjectUtils.getJSXElement(u.headerTemplate,u),oe=o.ObjectUtils.getJSXElement(u.footerTemplate,u),ue=ce(),ae=o.mergeProps({ref:I,className:re,style:ie,onClick:X},U("panel")),m.createElement(s.Portal,{element:m.createElement(n.CSSTransition,{nodeRef:I,classNames:"p-connected-overlay",in:p,timeout:{enter:120,exit:100},options:u.transitionOptions,unmountOnExit:!0,onEnter:A,onEntering:M,onEntered:_,onExit:V,onExited:Z},m.createElement("div",ae,le,ue,oe)),appendTo:"self"})),de=o.mergeProps(C(C({ref:k,id:u.inputId,className:pe,style:u.inputStyle},me),{},{onFocus:function(e){h(!0),u.onFocus&&u.onFocus(e)},onBlur:function(e){h(!1),u.onBlur&&u.onBlur(e)},onKeyDown:function(e){if(p){var t=o.DomHandler.findSingle(I.current,"li.p-highlight");switch(e.which){case 40:if(t){var n=t.nextElementSibling;n&&(o.DomHandler.addClass(n,"p-highlight"),o.DomHandler.removeClass(t,"p-highlight"),o.DomHandler.scrollInView(I.current,n))}else(t=o.DomHandler.findSingle(I.current,"li"))&&o.DomHandler.addClass(t,"p-highlight");e.preventDefault();break;case 38:if(t){var r=t.previousElementSibling;r&&(o.DomHandler.addClass(r,"p-highlight"),o.DomHandler.removeClass(t,"p-highlight"),o.DomHandler.scrollInView(I.current,r))}e.preventDefault();break;case 8:var i=e.target,l=i.selectionStart;i.value.substring(l-1,l)===S.key&&z();break;case 13:t&&Q(e,u.suggestions[o.DomHandler.index(t)]),e.preventDefault();break;case 27:z(),e.preventDefault()}}},onInput:function(e){u.onInput&&u.onInput(e),e.target.value.length>0?o.DomHandler.addClass(P.current,"p-inputwrapper-filled"):o.DomHandler.removeClass(P.current,"p-inputwrapper-filled")},onKeyUp:function(e){37!==e.which&&39!==e.which||$(e)},onChange:function(e){u.onChange&&u.onChange(e),$(e)}}),U("input")),ye=o.mergeProps({ref:P,id:u.id,className:fe,style:u.style},H.getOtherProps(u),U("root"));return m.createElement("div",ye,m.createElement(D,de),ge)})));k.displayName="Mention",exports.Mention=k;
|
package/mention/mention.d.ts
CHANGED
|
@@ -10,6 +10,80 @@
|
|
|
10
10
|
import * as React from 'react';
|
|
11
11
|
import { CSSTransitionProps } from '../csstransition';
|
|
12
12
|
import { InputTextarea } from '../inputtextarea';
|
|
13
|
+
import { PassThroughType } from '../utils/utils';
|
|
14
|
+
|
|
15
|
+
export declare type MentionPassThroughType<T> = PassThroughType<T, MentionPassThroughMethodOptions>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Custom passthrough(pt) option method.
|
|
19
|
+
*/
|
|
20
|
+
export interface MentionPassThroughMethodOptions {
|
|
21
|
+
props: MentionProps;
|
|
22
|
+
state: MentionState;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Custom passthrough(pt) options.
|
|
27
|
+
* @see {@link MentionProps.pt}
|
|
28
|
+
*/
|
|
29
|
+
export interface MentionPassThroughOptions {
|
|
30
|
+
/**
|
|
31
|
+
* Uses to pass attributes to the root's DOM element.
|
|
32
|
+
*/
|
|
33
|
+
root?: MentionPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
34
|
+
/**
|
|
35
|
+
* Uses to pass attributes to the InputTextarea component.
|
|
36
|
+
* @see {@link InputTextareaPassThroughType}
|
|
37
|
+
*/
|
|
38
|
+
input?: MentionPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
39
|
+
/**
|
|
40
|
+
* Uses to pass attributes to the panel's DOM element.
|
|
41
|
+
*/
|
|
42
|
+
panel?: MentionPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
43
|
+
/**
|
|
44
|
+
* Uses to pass attributes to the item's DOM element.
|
|
45
|
+
*/
|
|
46
|
+
item?: MentionPassThroughType<React.HTMLAttributes<HTMLLIElement>>;
|
|
47
|
+
/**
|
|
48
|
+
* Uses to pass attributes to the items' DOM element.
|
|
49
|
+
*/
|
|
50
|
+
items?: MentionPassThroughType<React.HTMLAttributes<HTMLUListElement>>;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Defines current inline state in Mention component.
|
|
55
|
+
*/
|
|
56
|
+
export interface MentionState {
|
|
57
|
+
/**
|
|
58
|
+
* Current overlay visible state as a boolean.
|
|
59
|
+
* @defaultValue false
|
|
60
|
+
*/
|
|
61
|
+
overlayVisible: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Current search state as a boolean.
|
|
64
|
+
* @defaultValue false
|
|
65
|
+
*/
|
|
66
|
+
searching: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Current focused state as a boolean.
|
|
69
|
+
* @defaultValue false
|
|
70
|
+
*/
|
|
71
|
+
focused: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Current trigger state.
|
|
74
|
+
*/
|
|
75
|
+
trigger: any;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Defines current options in Mention component.
|
|
80
|
+
*/
|
|
81
|
+
export interface MentionContext {
|
|
82
|
+
/**
|
|
83
|
+
* Current trigger state.
|
|
84
|
+
*/
|
|
85
|
+
trigger: any;
|
|
86
|
+
}
|
|
13
87
|
|
|
14
88
|
/**
|
|
15
89
|
*/
|
|
@@ -64,7 +138,7 @@ interface MentionSelectEvent {
|
|
|
64
138
|
* Defines valid properties in Mention component. In addition to these, all properties of HTMLTextAreaElement can be used in this component.
|
|
65
139
|
* @group Properties
|
|
66
140
|
*/
|
|
67
|
-
export interface MentionProps extends Omit<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, 'onSelect' | 'onChange' | 'onInput' | 'onFocus' | 'onBlur' | 'ref'> {
|
|
141
|
+
export interface MentionProps extends Omit<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, 'onSelect' | 'onChange' | 'onInput' | 'onFocus' | 'onBlur' | 'ref' | 'pt'> {
|
|
68
142
|
/**
|
|
69
143
|
* When enabled, highlights the first item in the list by default.
|
|
70
144
|
* @defaultValue true
|
|
@@ -143,6 +217,11 @@ export interface MentionProps extends Omit<React.DetailedHTMLProps<React.Textare
|
|
|
143
217
|
* @defaultValue "@"
|
|
144
218
|
*/
|
|
145
219
|
trigger?: string | string[] | undefined;
|
|
220
|
+
/**
|
|
221
|
+
* Uses to pass attributes to DOM elements inside the component.
|
|
222
|
+
* @type {MentionPassThroughOptions}
|
|
223
|
+
*/
|
|
224
|
+
pt?: MentionPassThroughOptions;
|
|
146
225
|
/**
|
|
147
226
|
* Callback to invoke when the element loses focus.
|
|
148
227
|
* @param {React.FocusEvent<HTMLInputElement>} event Browser event
|