primereact 9.3.1 → 9.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -31
- package/accordion/accordion.cjs.js +88 -90
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +90 -1
- package/accordion/accordion.esm.js +89 -91
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +89 -92
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +1 -0
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +7 -6
- package/api/api.esm.js +1 -0
- package/api/api.esm.min.js +1 -1
- package/api/api.js +1 -0
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +33 -11
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +4 -0
- package/autocomplete/autocomplete.esm.js +33 -11
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +32 -10
- package/autocomplete/autocomplete.min.css +1 -1
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +71 -22
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.d.ts +37 -1
- package/avatar/avatar.esm.js +72 -23
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +72 -24
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.cjs.js +26 -42
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.d.ts +24 -0
- package/avatargroup/avatargroup.esm.js +13 -29
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +52 -69
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/badge.cjs.js +12 -28
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.d.ts +26 -0
- package/badge/badge.esm.js +13 -29
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +13 -30
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +12 -28
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.d.ts +38 -0
- package/blockui/blockui.esm.js +13 -29
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +13 -30
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +87 -49
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.d.ts +53 -1
- package/breadcrumb/breadcrumb.esm.js +88 -50
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +88 -51
- package/breadcrumb/breadcrumb.min.css +1 -1
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +49 -42
- package/button/button.cjs.min.js +1 -1
- package/button/button.d.ts +42 -1
- package/button/button.esm.js +50 -43
- package/button/button.esm.min.js +1 -1
- package/button/button.js +49 -43
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +37 -23
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +5 -2
- package/calendar/calendar.esm.js +37 -23
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +34 -20
- package/calendar/calendar.min.js +1 -1
- package/card/card.cjs.js +52 -63
- package/card/card.cjs.min.js +1 -1
- package/card/card.d.ts +56 -0
- package/card/card.esm.js +39 -50
- package/card/card.esm.min.js +1 -1
- package/card/card.js +86 -98
- package/card/card.min.js +1 -1
- package/carousel/carousel.cjs.js +151 -110
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.d.ts +113 -1
- package/carousel/carousel.esm.js +151 -110
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +148 -108
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +27 -23
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +5 -0
- package/cascadeselect/cascadeselect.esm.js +27 -23
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +28 -24
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +31 -42
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.d.ts +35 -0
- package/chart/chart.esm.js +18 -29
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +140 -152
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +40 -19
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +19 -1
- package/checkbox/checkbox.esm.js +41 -20
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +41 -20
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +45 -42
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +53 -1
- package/chip/chip.esm.js +46 -43
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +46 -44
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +37 -22
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +5 -0
- package/chips/chips.esm.js +37 -22
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +37 -23
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +11 -4
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +13 -0
- package/colorpicker/colorpicker.esm.js +11 -4
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +11 -4
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.d.ts +6 -2
- package/componentbase/componentbase.cjs.js +105 -0
- package/componentbase/componentbase.cjs.min.js +1 -0
- package/componentbase/componentbase.esm.js +101 -0
- package/componentbase/componentbase.esm.min.js +1 -0
- package/componentbase/componentbase.js +109 -0
- package/componentbase/componentbase.min.js +1 -0
- package/componentbase/package.json +6 -0
- package/confirmdialog/confirmdialog.cjs.js +44 -27
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +90 -2
- package/confirmdialog/confirmdialog.esm.js +45 -28
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +45 -29
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +53 -50
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.d.ts +70 -1
- package/confirmpopup/confirmpopup.esm.js +54 -51
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +54 -52
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +111 -61
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +92 -1
- package/contextmenu/contextmenu.esm.js +112 -62
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +112 -63
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +16510 -5273
- package/core/core.min.js +41 -39
- package/datatable/datatable.cjs.js +253 -210
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +20 -7
- package/datatable/datatable.esm.js +253 -210
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +246 -203
- package/datatable/datatable.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +13 -26
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.d.ts +38 -0
- package/deferredcontent/deferredcontent.esm.js +14 -27
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +14 -28
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +83 -83
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +85 -3
- package/dialog/dialog.esm.js +83 -83
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +81 -82
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +35 -51
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.d.ts +30 -0
- package/divider/divider.esm.js +22 -38
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +66 -83
- package/divider/divider.min.js +1 -1
- package/dock/dock.cjs.js +82 -45
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.d.ts +66 -0
- package/dock/dock.esm.js +83 -46
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +83 -47
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +46 -20
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +6 -1
- package/dropdown/dropdown.esm.js +46 -20
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +45 -19
- package/dropdown/dropdown.min.js +1 -1
- package/fieldset/fieldset.cjs.js +55 -54
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.d.ts +77 -1
- package/fieldset/fieldset.esm.js +56 -55
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +56 -56
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +181 -151
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +150 -1
- package/fileupload/fileupload.esm.js +182 -152
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +182 -153
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/galleria.cjs.js +136 -118
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.d.ts +156 -2
- package/galleria/galleria.esm.js +137 -119
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +135 -118
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.cjs.js +20 -3
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.esm.js +17 -3
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +21 -5
- package/hooks/hooks.min.js +1 -1
- package/icons/arrowdown/index.cjs.js +410 -2
- package/icons/arrowdown/index.cjs.min.js +1 -1
- package/icons/arrowdown/index.esm.js +410 -2
- package/icons/arrowdown/index.esm.min.js +1 -1
- package/icons/arrowdown/index.js +410 -2
- package/icons/arrowdown/index.min.js +1 -1
- package/icons/arrowup/index.cjs.js +410 -2
- package/icons/arrowup/index.cjs.min.js +1 -1
- package/icons/arrowup/index.esm.js +410 -2
- package/icons/arrowup/index.esm.min.js +1 -1
- package/icons/arrowup/index.js +410 -2
- package/icons/arrowup/index.min.js +1 -1
- package/icons/ban/index.cjs.js +410 -2
- package/icons/ban/index.cjs.min.js +1 -1
- package/icons/ban/index.esm.js +410 -2
- package/icons/ban/index.esm.min.js +1 -1
- package/icons/ban/index.js +410 -2
- package/icons/ban/index.min.js +1 -1
- package/icons/download/index.cjs.js +410 -2
- package/icons/download/index.cjs.min.js +1 -1
- package/icons/download/index.esm.js +410 -2
- package/icons/download/index.esm.min.js +1 -1
- package/icons/download/index.js +410 -2
- package/icons/download/index.min.js +1 -1
- package/icons/exclamationtriangle/index.cjs.js +410 -2
- package/icons/exclamationtriangle/index.cjs.min.js +1 -1
- package/icons/exclamationtriangle/index.esm.js +410 -2
- package/icons/exclamationtriangle/index.esm.min.js +1 -1
- package/icons/exclamationtriangle/index.js +410 -2
- package/icons/exclamationtriangle/index.min.js +1 -1
- package/icons/eyeslash/index.cjs.js +410 -2
- package/icons/eyeslash/index.cjs.min.js +1 -1
- package/icons/eyeslash/index.esm.js +410 -2
- package/icons/eyeslash/index.esm.min.js +1 -1
- package/icons/eyeslash/index.js +410 -2
- package/icons/eyeslash/index.min.js +1 -1
- package/icons/filter/index.cjs.js +410 -2
- package/icons/filter/index.cjs.min.js +1 -1
- package/icons/filter/index.esm.js +410 -2
- package/icons/filter/index.esm.min.js +1 -1
- package/icons/filter/index.js +410 -2
- package/icons/filter/index.min.js +1 -1
- package/icons/filterslash/index.cjs.js +410 -2
- package/icons/filterslash/index.cjs.min.js +1 -1
- package/icons/filterslash/index.esm.js +410 -2
- package/icons/filterslash/index.esm.min.js +1 -1
- package/icons/filterslash/index.js +410 -2
- package/icons/filterslash/index.min.js +1 -1
- package/icons/infocircle/index.cjs.js +410 -2
- package/icons/infocircle/index.cjs.min.js +1 -1
- package/icons/infocircle/index.esm.js +410 -2
- package/icons/infocircle/index.esm.min.js +1 -1
- package/icons/infocircle/index.js +410 -2
- package/icons/infocircle/index.min.js +1 -1
- package/icons/pencil/index.cjs.js +410 -2
- package/icons/pencil/index.cjs.min.js +1 -1
- package/icons/pencil/index.esm.js +410 -2
- package/icons/pencil/index.esm.min.js +1 -1
- package/icons/pencil/index.js +410 -2
- package/icons/pencil/index.min.js +1 -1
- package/icons/plus/index.cjs.js +410 -2
- package/icons/plus/index.cjs.min.js +1 -1
- package/icons/plus/index.esm.js +410 -2
- package/icons/plus/index.esm.min.js +1 -1
- package/icons/plus/index.js +410 -2
- package/icons/plus/index.min.js +1 -1
- package/icons/refresh/index.cjs.js +410 -2
- package/icons/refresh/index.cjs.min.js +1 -1
- package/icons/refresh/index.esm.js +410 -2
- package/icons/refresh/index.esm.min.js +1 -1
- package/icons/refresh/index.js +410 -2
- package/icons/refresh/index.min.js +1 -1
- package/icons/search/index.cjs.js +410 -2
- package/icons/search/index.cjs.min.js +1 -1
- package/icons/search/index.esm.js +410 -2
- package/icons/search/index.esm.min.js +1 -1
- package/icons/search/index.js +410 -2
- package/icons/search/index.min.js +1 -1
- package/icons/searchminus/index.cjs.js +410 -2
- package/icons/searchminus/index.cjs.min.js +1 -1
- package/icons/searchminus/index.esm.js +410 -2
- package/icons/searchminus/index.esm.min.js +1 -1
- package/icons/searchminus/index.js +410 -2
- package/icons/searchminus/index.min.js +1 -1
- package/icons/searchplus/index.cjs.js +410 -2
- package/icons/searchplus/index.cjs.min.js +1 -1
- package/icons/searchplus/index.esm.js +410 -2
- package/icons/searchplus/index.esm.min.js +1 -1
- package/icons/searchplus/index.js +410 -2
- package/icons/searchplus/index.min.js +1 -1
- package/icons/sortalt/index.cjs.js +410 -2
- package/icons/sortalt/index.cjs.min.js +1 -1
- package/icons/sortalt/index.esm.js +410 -2
- package/icons/sortalt/index.esm.min.js +1 -1
- package/icons/sortalt/index.js +410 -2
- package/icons/sortalt/index.min.js +1 -1
- package/icons/sortamountdown/index.cjs.js +410 -2
- package/icons/sortamountdown/index.cjs.min.js +1 -1
- package/icons/sortamountdown/index.esm.js +410 -2
- package/icons/sortamountdown/index.esm.min.js +1 -1
- package/icons/sortamountdown/index.js +410 -2
- package/icons/sortamountdown/index.min.js +1 -1
- package/icons/sortamountupalt/index.cjs.js +410 -2
- package/icons/sortamountupalt/index.cjs.min.js +1 -1
- package/icons/sortamountupalt/index.esm.js +410 -2
- package/icons/sortamountupalt/index.esm.min.js +1 -1
- package/icons/sortamountupalt/index.js +410 -2
- package/icons/sortamountupalt/index.min.js +1 -1
- package/icons/spinner/index.cjs.js +410 -2
- package/icons/spinner/index.cjs.min.js +1 -1
- package/icons/spinner/index.esm.js +410 -2
- package/icons/spinner/index.esm.min.js +1 -1
- package/icons/spinner/index.js +410 -2
- package/icons/spinner/index.min.js +1 -1
- package/icons/star/index.cjs.js +410 -2
- package/icons/star/index.cjs.min.js +1 -1
- package/icons/star/index.esm.js +410 -2
- package/icons/star/index.esm.min.js +1 -1
- package/icons/star/index.js +410 -2
- package/icons/star/index.min.js +1 -1
- package/icons/starfill/index.cjs.js +410 -2
- package/icons/starfill/index.cjs.min.js +1 -1
- package/icons/starfill/index.esm.js +410 -2
- package/icons/starfill/index.esm.min.js +1 -1
- package/icons/starfill/index.js +410 -2
- package/icons/starfill/index.min.js +1 -1
- package/icons/thlarge/index.cjs.js +410 -2
- package/icons/thlarge/index.cjs.min.js +1 -1
- package/icons/thlarge/index.esm.js +410 -2
- package/icons/thlarge/index.esm.min.js +1 -1
- package/icons/thlarge/index.js +410 -2
- package/icons/thlarge/index.min.js +1 -1
- package/icons/timescircle/index.cjs.js +410 -2
- package/icons/timescircle/index.cjs.min.js +1 -1
- package/icons/timescircle/index.esm.js +410 -2
- package/icons/timescircle/index.esm.min.js +1 -1
- package/icons/timescircle/index.js +410 -2
- package/icons/timescircle/index.min.js +1 -1
- package/icons/trash/index.cjs.js +410 -2
- package/icons/trash/index.cjs.min.js +1 -1
- package/icons/trash/index.esm.js +410 -2
- package/icons/trash/index.esm.min.js +1 -1
- package/icons/trash/index.js +410 -2
- package/icons/trash/index.min.js +1 -1
- package/icons/undo/index.cjs.js +410 -2
- package/icons/undo/index.cjs.min.js +1 -1
- package/icons/undo/index.esm.js +410 -2
- package/icons/undo/index.esm.min.js +1 -1
- package/icons/undo/index.js +410 -2
- package/icons/undo/index.min.js +1 -1
- package/icons/upload/index.cjs.js +410 -2
- package/icons/upload/index.cjs.min.js +1 -1
- package/icons/upload/index.esm.js +410 -2
- package/icons/upload/index.esm.min.js +1 -1
- package/icons/upload/index.js +410 -2
- package/icons/upload/index.min.js +1 -1
- package/icons/windowmaximize/index.cjs.js +410 -2
- package/icons/windowmaximize/index.cjs.min.js +1 -1
- package/icons/windowmaximize/index.esm.js +410 -2
- package/icons/windowmaximize/index.esm.min.js +1 -1
- package/icons/windowmaximize/index.js +410 -2
- package/icons/windowmaximize/index.min.js +1 -1
- package/icons/windowminimize/index.cjs.js +410 -2
- package/icons/windowminimize/index.cjs.min.js +1 -1
- package/icons/windowminimize/index.esm.js +410 -2
- package/icons/windowminimize/index.esm.min.js +1 -1
- package/icons/windowminimize/index.js +410 -2
- package/icons/windowminimize/index.min.js +1 -1
- package/image/image.cjs.js +506 -103
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +130 -3
- package/image/image.esm.js +507 -104
- package/image/image.esm.min.js +1 -1
- package/image/image.js +503 -101
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +33 -51
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.d.ts +51 -1
- package/inplace/inplace.esm.js +33 -51
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +33 -52
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +24 -18
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +24 -18
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +24 -18
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +8 -6
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +8 -6
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +8 -6
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +13 -2
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.d.ts +5 -0
- package/inputswitch/inputswitch.esm.js +13 -2
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +14 -4
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +7 -8
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +7 -8
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +7 -8
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +3 -4
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.esm.js +3 -4
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +3 -4
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/listbox/listbox.cjs.js +12 -4
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +12 -4
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +12 -4
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +147 -96
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.d.ts +142 -2
- package/megamenu/megamenu.esm.js +147 -96
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +145 -95
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +3 -4
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.esm.js +3 -4
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +3 -4
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +94 -55
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +71 -0
- package/menu/menu.esm.js +95 -56
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +95 -57
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +118 -110
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.d.ts +94 -1
- package/menubar/menubar.esm.js +119 -111
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +119 -112
- package/menubar/menubar.min.js +1 -1
- package/menuitem/menuitem.d.ts +0 -2
- package/message/message.cjs.js +66 -46
- package/message/message.cjs.min.js +1 -1
- package/message/message.d.ts +35 -2
- package/message/message.esm.js +67 -47
- package/message/message.esm.min.js +1 -1
- package/message/message.js +67 -48
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +78 -74
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +51 -2
- package/messages/messages.esm.js +78 -74
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +78 -75
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +74 -47
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +9 -0
- package/multiselect/multiselect.esm.js +75 -48
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +73 -46
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +21 -13
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +5 -0
- package/multistatecheckbox/multistatecheckbox.esm.js +21 -13
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +21 -13
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/organizationchart/organizationchart.d.ts +18 -2
- package/overlaypanel/overlaypanel.cjs.js +40 -46
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +45 -1
- package/overlaypanel/overlaypanel.esm.js +41 -47
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +41 -48
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.d.ts +3 -3
- package/panel/panel.cjs.js +78 -63
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.d.ts +100 -1
- package/panel/panel.esm.js +79 -64
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +79 -65
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +145 -83
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +124 -2
- package/panelmenu/panelmenu.esm.js +145 -83
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +144 -83
- package/panelmenu/panelmenu.min.js +1 -1
- package/primereact.all.cjs.js +4240 -3058
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +4240 -3059
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +4240 -3058
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +45 -57
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.d.ts +38 -0
- package/progressbar/progressbar.esm.js +32 -44
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +105 -118
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/progressspinner.cjs.js +37 -51
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.d.ts +34 -0
- package/progressspinner/progressspinner.esm.js +24 -38
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +75 -90
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +42 -20
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.d.ts +19 -1
- package/radiobutton/radiobutton.esm.js +42 -20
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +43 -22
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +15 -7
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +15 -7
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +14 -6
- package/rating/rating.min.js +1 -1
- package/resources/primereact.css +195 -187
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +16 -7
- package/resources/themes/arya-green/theme.css +16 -7
- package/resources/themes/arya-orange/theme.css +16 -7
- package/resources/themes/arya-purple/theme.css +16 -7
- package/resources/themes/bootstrap4-dark-blue/theme.css +16 -7
- package/resources/themes/bootstrap4-dark-purple/theme.css +16 -7
- package/resources/themes/bootstrap4-light-blue/theme.css +16 -7
- package/resources/themes/bootstrap4-light-purple/theme.css +16 -7
- package/resources/themes/fluent-light/theme.css +16 -7
- package/resources/themes/lara-dark-blue/theme.css +16 -7
- package/resources/themes/lara-dark-indigo/theme.css +16 -7
- package/resources/themes/lara-dark-purple/theme.css +16 -7
- package/resources/themes/lara-dark-teal/theme.css +16 -7
- package/resources/themes/lara-light-blue/theme.css +16 -7
- package/resources/themes/lara-light-indigo/theme.css +16 -7
- package/resources/themes/lara-light-purple/theme.css +16 -7
- package/resources/themes/lara-light-teal/theme.css +16 -7
- package/resources/themes/luna-amber/theme.css +16 -7
- package/resources/themes/luna-blue/theme.css +16 -7
- package/resources/themes/luna-green/theme.css +16 -7
- package/resources/themes/luna-pink/theme.css +16 -7
- package/resources/themes/md-dark-deeppurple/theme.css +16 -7
- package/resources/themes/md-dark-indigo/theme.css +16 -7
- package/resources/themes/md-light-deeppurple/theme.css +16 -7
- package/resources/themes/md-light-indigo/theme.css +16 -7
- package/resources/themes/mdc-dark-deeppurple/theme.css +16 -7
- package/resources/themes/mdc-dark-indigo/theme.css +16 -7
- package/resources/themes/mdc-light-deeppurple/theme.css +16 -7
- package/resources/themes/mdc-light-indigo/theme.css +16 -7
- package/resources/themes/mira/theme.css +16 -7
- package/resources/themes/nano/theme.css +16 -7
- package/resources/themes/nova/theme.css +16 -7
- package/resources/themes/nova-accent/theme.css +16 -7
- package/resources/themes/nova-alt/theme.css +16 -7
- package/resources/themes/rhea/theme.css +16 -7
- package/resources/themes/saga-blue/theme.css +16 -7
- package/resources/themes/saga-green/theme.css +16 -7
- package/resources/themes/saga-orange/theme.css +16 -7
- package/resources/themes/saga-purple/theme.css +16 -7
- package/resources/themes/soho-dark/theme.css +16 -7
- package/resources/themes/soho-light/theme.css +16 -7
- package/resources/themes/tailwind-light/theme.css +16 -7
- package/resources/themes/vela-blue/theme.css +16 -7
- package/resources/themes/vela-green/theme.css +16 -7
- package/resources/themes/vela-orange/theme.css +16 -7
- package/resources/themes/vela-purple/theme.css +16 -7
- package/resources/themes/viva-dark/theme.css +16 -7
- package/resources/themes/viva-light/theme.css +16 -7
- package/scrollpanel/scrollpanel.cjs.js +39 -52
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.d.ts +42 -0
- package/scrollpanel/scrollpanel.esm.js +26 -39
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +193 -207
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +64 -36
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.d.ts +42 -1
- package/scrolltop/scrolltop.esm.js +65 -37
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +65 -38
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +6 -2
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +6 -2
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +6 -2
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/sidebar.cjs.js +88 -52
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +58 -1
- package/sidebar/sidebar.esm.js +89 -53
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +89 -54
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +26 -42
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.d.ts +26 -0
- package/skeleton/skeleton.esm.js +13 -29
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +70 -87
- package/skeleton/skeleton.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +121 -111
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +98 -1
- package/slidemenu/slidemenu.esm.js +122 -112
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +122 -113
- package/slidemenu/slidemenu.min.js +1 -1
- package/speeddial/speeddial.cjs.js +63 -56
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.d.ts +64 -1
- package/speeddial/speeddial.esm.js +64 -57
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +62 -56
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +50 -40
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +59 -1
- package/splitbutton/splitbutton.esm.js +51 -41
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +50 -41
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +68 -70
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.d.ts +60 -0
- package/splitter/splitter.esm.js +69 -71
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +69 -72
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +78 -45
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.d.ts +50 -0
- package/steps/steps.esm.js +79 -46
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +79 -47
- package/steps/steps.min.js +1 -1
- package/styleclass/styleclass.cjs.js +9 -7
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.esm.js +9 -7
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +9 -7
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +83 -47
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.d.ts +62 -0
- package/tabmenu/tabmenu.esm.js +84 -48
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +84 -49
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +142 -122
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +132 -1
- package/tabview/tabview.esm.js +143 -123
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +143 -124
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +18 -30
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.d.ts +34 -1
- package/tag/tag.esm.js +19 -31
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +19 -32
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +49 -52
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.d.ts +73 -0
- package/terminal/terminal.esm.js +50 -53
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +50 -54
- package/terminal/terminal.min.js +1 -1
- package/terminalservice/terminalservice.d.ts +1 -1
- package/tieredmenu/tieredmenu.cjs.js +104 -59
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +83 -2
- package/tieredmenu/tieredmenu.esm.js +105 -60
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +105 -61
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.d.ts +1 -1
- package/toast/toast.cjs.js +85 -81
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +124 -2
- package/toast/toast.esm.js +86 -82
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +83 -80
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +12 -2
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +12 -2
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +13 -4
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +35 -49
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.d.ts +44 -0
- package/toolbar/toolbar.esm.js +22 -36
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +72 -87
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +31 -37
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.d.ts +55 -0
- package/tooltip/tooltip.esm.js +32 -38
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +32 -39
- package/tooltip/tooltip.min.js +1 -1
- package/tooltip/tooltipoptions.d.ts +5 -0
- package/tree/tree.d.ts +1 -1
- package/treenode/treenode.d.ts +5 -1
- package/treeselect/treeselect.cjs.js +12 -5
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +6 -1
- package/treeselect/treeselect.esm.js +12 -5
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +11 -4
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +10 -3
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +1 -1
- package/treetable/treetable.esm.js +10 -3
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +10 -3
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +22 -11
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.d.ts +5 -0
- package/tristatecheckbox/tristatecheckbox.esm.js +22 -11
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +21 -11
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +735 -676
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +5 -1
- package/utils/utils.esm.js +732 -677
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +736 -678
- package/utils/utils.min.js +1 -1
- package/web-types.json +13 -1
package/chip/chip.esm.js
CHANGED
|
@@ -1,22 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ObjectUtils,
|
|
2
|
+
import { classNames, ObjectUtils, mergeProps, IconUtils } from 'primereact/utils';
|
|
3
|
+
import { ComponentBase } from 'primereact/componentbase';
|
|
3
4
|
import { TimesCircleIcon } from 'primereact/icons/timescircle';
|
|
4
5
|
|
|
5
|
-
function _extends() {
|
|
6
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
7
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
8
|
-
var source = arguments[i];
|
|
9
|
-
for (var key in source) {
|
|
10
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
11
|
-
target[key] = source[key];
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
return target;
|
|
16
|
-
};
|
|
17
|
-
return _extends.apply(this, arguments);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
6
|
function _typeof(obj) {
|
|
21
7
|
"@babel/helpers - typeof";
|
|
22
8
|
|
|
@@ -58,6 +44,21 @@ function _defineProperty(obj, key, value) {
|
|
|
58
44
|
return obj;
|
|
59
45
|
}
|
|
60
46
|
|
|
47
|
+
function _extends() {
|
|
48
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
49
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
50
|
+
var source = arguments[i];
|
|
51
|
+
for (var key in source) {
|
|
52
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
53
|
+
target[key] = source[key];
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return target;
|
|
58
|
+
};
|
|
59
|
+
return _extends.apply(this, arguments);
|
|
60
|
+
}
|
|
61
|
+
|
|
61
62
|
function _arrayWithHoles(arr) {
|
|
62
63
|
if (Array.isArray(arr)) return arr;
|
|
63
64
|
}
|
|
@@ -113,7 +114,7 @@ function _slicedToArray(arr, i) {
|
|
|
113
114
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
114
115
|
}
|
|
115
116
|
|
|
116
|
-
var ChipBase = {
|
|
117
|
+
var ChipBase = ComponentBase.extend({
|
|
117
118
|
defaultProps: {
|
|
118
119
|
__TYPE: 'Chip',
|
|
119
120
|
label: null,
|
|
@@ -128,14 +129,8 @@ var ChipBase = {
|
|
|
128
129
|
onImageError: null,
|
|
129
130
|
onRemove: null,
|
|
130
131
|
children: undefined
|
|
131
|
-
},
|
|
132
|
-
getProps: function getProps(props) {
|
|
133
|
-
return ObjectUtils.getMergedProps(props, ChipBase.defaultProps);
|
|
134
|
-
},
|
|
135
|
-
getOtherProps: function getOtherProps(props) {
|
|
136
|
-
return ObjectUtils.getDiffProps(props, ChipBase.defaultProps);
|
|
137
132
|
}
|
|
138
|
-
};
|
|
133
|
+
});
|
|
139
134
|
|
|
140
135
|
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; }
|
|
141
136
|
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; }
|
|
@@ -146,6 +141,10 @@ var Chip = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inPr
|
|
|
146
141
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
147
142
|
visibleState = _React$useState2[0],
|
|
148
143
|
setVisibleState = _React$useState2[1];
|
|
144
|
+
var _ChipBase$setMetaData = ChipBase.setMetaData({
|
|
145
|
+
props: props
|
|
146
|
+
}),
|
|
147
|
+
ptm = _ChipBase$setMetaData.ptm;
|
|
149
148
|
var onKeyDown = function onKeyDown(event) {
|
|
150
149
|
if (event.keyCode === 13) {
|
|
151
150
|
// enter
|
|
@@ -160,53 +159,57 @@ var Chip = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inPr
|
|
|
160
159
|
};
|
|
161
160
|
var createContent = function createContent() {
|
|
162
161
|
var content = [];
|
|
163
|
-
var
|
|
162
|
+
var removeIconProps = mergeProps({
|
|
164
163
|
key: 'removeIcon',
|
|
165
164
|
tabIndex: 0,
|
|
166
165
|
className: 'p-chip-remove-icon',
|
|
167
166
|
onClick: close,
|
|
168
167
|
onKeyDown: onKeyDown
|
|
169
|
-
};
|
|
170
|
-
var icon = props.removeIcon || /*#__PURE__*/React.createElement(TimesCircleIcon,
|
|
168
|
+
}, ptm('removeIcon'));
|
|
169
|
+
var icon = props.removeIcon || /*#__PURE__*/React.createElement(TimesCircleIcon, removeIconProps);
|
|
171
170
|
if (props.image) {
|
|
172
|
-
|
|
173
|
-
key:
|
|
171
|
+
var imageProps = mergeProps({
|
|
172
|
+
key: 'image',
|
|
174
173
|
src: props.image,
|
|
175
|
-
alt: props.imageAlt,
|
|
176
174
|
onError: props.onImageError
|
|
177
|
-
}));
|
|
175
|
+
}, ptm('image'));
|
|
176
|
+
content.push( /*#__PURE__*/React.createElement("img", _extends({
|
|
177
|
+
alt: props.imageAlt
|
|
178
|
+
}, imageProps)));
|
|
178
179
|
} else if (props.icon) {
|
|
179
|
-
|
|
180
|
+
var chipIconProps = mergeProps({
|
|
180
181
|
key: 'icon',
|
|
181
182
|
className: 'p-chip-icon'
|
|
182
|
-
},
|
|
183
|
+
}, ptm('icon'));
|
|
184
|
+
content.push(IconUtils.getJSXIcon(props.icon, _objectSpread({}, chipIconProps), {
|
|
183
185
|
props: props
|
|
184
186
|
}));
|
|
185
187
|
}
|
|
186
188
|
if (props.label) {
|
|
187
|
-
|
|
188
|
-
key:
|
|
189
|
-
className:
|
|
190
|
-
},
|
|
189
|
+
var labelProps = mergeProps({
|
|
190
|
+
key: 'label',
|
|
191
|
+
className: 'p-chip-text'
|
|
192
|
+
}, ptm('label'));
|
|
193
|
+
content.push( /*#__PURE__*/React.createElement("span", labelProps, props.label));
|
|
191
194
|
}
|
|
192
195
|
if (props.removable) {
|
|
193
|
-
content.push(IconUtils.getJSXIcon(icon, _objectSpread({},
|
|
196
|
+
content.push(IconUtils.getJSXIcon(icon, _objectSpread({}, removeIconProps), {
|
|
194
197
|
props: props
|
|
195
198
|
}));
|
|
196
199
|
}
|
|
197
200
|
return content;
|
|
198
201
|
};
|
|
199
202
|
var createElement = function createElement() {
|
|
200
|
-
var otherProps = ChipBase.getOtherProps(props);
|
|
201
203
|
var className = classNames('p-chip p-component', {
|
|
202
204
|
'p-chip-image': props.image != null
|
|
203
205
|
}, props.className);
|
|
204
206
|
var content = props.template ? ObjectUtils.getJSXElement(props.template, props) : createContent();
|
|
205
|
-
|
|
207
|
+
var rootProps = mergeProps({
|
|
206
208
|
ref: elementRef,
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
},
|
|
209
|
+
style: props.style,
|
|
210
|
+
className: className
|
|
211
|
+
}, ChipBase.getOtherProps(props), ptm('root'));
|
|
212
|
+
return /*#__PURE__*/React.createElement("div", rootProps, content);
|
|
210
213
|
};
|
|
211
214
|
React.useImperativeHandle(ref, function () {
|
|
212
215
|
return {
|
package/chip/chip.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{
|
|
1
|
+
import*as e from"react";import{classNames as r,ObjectUtils as t,mergeProps as n,IconUtils as o}from"primereact/utils";import{ComponentBase as i}from"primereact/componentbase";import{TimesCircleIcon as l}from"primereact/icons/timescircle";function a(e){return a="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},a(e)}function c(e,r){if("object"!==a(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}function u(e){var r=c(e,"string");return"symbol"===a(r)?r:String(r)}function p(e,r,t){return(r=u(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function m(){return m=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},m.apply(this,arguments)}function s(e){if(Array.isArray(e))return e}function f(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,i,l,a=[],c=!0,u=!1;try{if(i=(t=t.call(e)).next,0===r){if(Object(t)!==t)return;c=!1}else for(;!(c=(n=i.call(t)).done)&&(a.push(n.value),a.length!==r);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(u)throw o}}return a}}function y(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function b(e,r){if(e){if("string"==typeof e)return y(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?y(e,r):void 0}}function v(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var g=i.extend({defaultProps:{__TYPE:"Chip",label:null,icon:null,image:null,removable:!1,removeIcon:null,className:null,style:null,template:null,imageAlt:"chip",onImageError:null,onRemove:null,children:void 0}});function h(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?h(Object(t),!0).forEach((function(r){p(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):h(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var d=e.memo(e.forwardRef((function(i,a){var c,u,p,y,h,d=g.getProps(i),j=e.useRef(null),S=e.useState(!0),w=(u=2,s(c=S)||f(c,u)||b(c,u)||v()),P=w[0],E=w[1],I=g.setMetaData({props:d}).ptm,A=function(e){13===e.keyCode&&N(e)},N=function(e){E(!1),d.onRemove&&d.onRemove(e)},k=function(){var r=[],t=n({key:"removeIcon",tabIndex:0,className:"p-chip-remove-icon",onClick:N,onKeyDown:A},I("removeIcon")),i=d.removeIcon||e.createElement(l,t);if(d.image){var a=n({key:"image",src:d.image,onError:d.onImageError},I("image"));r.push(e.createElement("img",m({alt:d.imageAlt},a)))}else if(d.icon){var c=n({key:"icon",className:"p-chip-icon"},I("icon"));r.push(o.getJSXIcon(d.icon,O({},c),{props:d}))}if(d.label){var u=n({key:"label",className:"p-chip-text"},I("label"));r.push(e.createElement("span",u,d.label))}return d.removable&&r.push(o.getJSXIcon(i,O({},t),{props:d})),r};return e.useImperativeHandle(a,(function(){return{props:d,getElement:function(){return j.current}}})),P&&(p=r("p-chip p-component",{"p-chip-image":null!=d.image},d.className),y=d.template?t.getJSXElement(d.template,d):k(),h=n({ref:j,style:d.style,className:p},g.getOtherProps(d),I("root")),e.createElement("div",h,y))})));d.displayName="Chip";export{d as Chip};
|
package/chip/chip.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
this.primereact = this.primereact || {};
|
|
2
|
-
this.primereact.chip = (function (exports, React, utils, timescircle) {
|
|
2
|
+
this.primereact.chip = (function (exports, React, utils, componentbase, timescircle) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopNamespace(e) {
|
|
@@ -22,21 +22,6 @@ this.primereact.chip = (function (exports, React, utils, timescircle) {
|
|
|
22
22
|
|
|
23
23
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
24
24
|
|
|
25
|
-
function _extends() {
|
|
26
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
27
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
28
|
-
var source = arguments[i];
|
|
29
|
-
for (var key in source) {
|
|
30
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
31
|
-
target[key] = source[key];
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return target;
|
|
36
|
-
};
|
|
37
|
-
return _extends.apply(this, arguments);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
25
|
function _typeof(obj) {
|
|
41
26
|
"@babel/helpers - typeof";
|
|
42
27
|
|
|
@@ -78,6 +63,21 @@ this.primereact.chip = (function (exports, React, utils, timescircle) {
|
|
|
78
63
|
return obj;
|
|
79
64
|
}
|
|
80
65
|
|
|
66
|
+
function _extends() {
|
|
67
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
68
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
69
|
+
var source = arguments[i];
|
|
70
|
+
for (var key in source) {
|
|
71
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
72
|
+
target[key] = source[key];
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return target;
|
|
77
|
+
};
|
|
78
|
+
return _extends.apply(this, arguments);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
81
|
function _arrayWithHoles(arr) {
|
|
82
82
|
if (Array.isArray(arr)) return arr;
|
|
83
83
|
}
|
|
@@ -133,7 +133,7 @@ this.primereact.chip = (function (exports, React, utils, timescircle) {
|
|
|
133
133
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
var ChipBase = {
|
|
136
|
+
var ChipBase = componentbase.ComponentBase.extend({
|
|
137
137
|
defaultProps: {
|
|
138
138
|
__TYPE: 'Chip',
|
|
139
139
|
label: null,
|
|
@@ -148,14 +148,8 @@ this.primereact.chip = (function (exports, React, utils, timescircle) {
|
|
|
148
148
|
onImageError: null,
|
|
149
149
|
onRemove: null,
|
|
150
150
|
children: undefined
|
|
151
|
-
},
|
|
152
|
-
getProps: function getProps(props) {
|
|
153
|
-
return utils.ObjectUtils.getMergedProps(props, ChipBase.defaultProps);
|
|
154
|
-
},
|
|
155
|
-
getOtherProps: function getOtherProps(props) {
|
|
156
|
-
return utils.ObjectUtils.getDiffProps(props, ChipBase.defaultProps);
|
|
157
151
|
}
|
|
158
|
-
};
|
|
152
|
+
});
|
|
159
153
|
|
|
160
154
|
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; }
|
|
161
155
|
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; }
|
|
@@ -166,6 +160,10 @@ this.primereact.chip = (function (exports, React, utils, timescircle) {
|
|
|
166
160
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
167
161
|
visibleState = _React$useState2[0],
|
|
168
162
|
setVisibleState = _React$useState2[1];
|
|
163
|
+
var _ChipBase$setMetaData = ChipBase.setMetaData({
|
|
164
|
+
props: props
|
|
165
|
+
}),
|
|
166
|
+
ptm = _ChipBase$setMetaData.ptm;
|
|
169
167
|
var onKeyDown = function onKeyDown(event) {
|
|
170
168
|
if (event.keyCode === 13) {
|
|
171
169
|
// enter
|
|
@@ -180,53 +178,57 @@ this.primereact.chip = (function (exports, React, utils, timescircle) {
|
|
|
180
178
|
};
|
|
181
179
|
var createContent = function createContent() {
|
|
182
180
|
var content = [];
|
|
183
|
-
var
|
|
181
|
+
var removeIconProps = utils.mergeProps({
|
|
184
182
|
key: 'removeIcon',
|
|
185
183
|
tabIndex: 0,
|
|
186
184
|
className: 'p-chip-remove-icon',
|
|
187
185
|
onClick: close,
|
|
188
186
|
onKeyDown: onKeyDown
|
|
189
|
-
};
|
|
190
|
-
var icon = props.removeIcon || /*#__PURE__*/React__namespace.createElement(timescircle.TimesCircleIcon,
|
|
187
|
+
}, ptm('removeIcon'));
|
|
188
|
+
var icon = props.removeIcon || /*#__PURE__*/React__namespace.createElement(timescircle.TimesCircleIcon, removeIconProps);
|
|
191
189
|
if (props.image) {
|
|
192
|
-
|
|
193
|
-
key:
|
|
190
|
+
var imageProps = utils.mergeProps({
|
|
191
|
+
key: 'image',
|
|
194
192
|
src: props.image,
|
|
195
|
-
alt: props.imageAlt,
|
|
196
193
|
onError: props.onImageError
|
|
197
|
-
}));
|
|
194
|
+
}, ptm('image'));
|
|
195
|
+
content.push( /*#__PURE__*/React__namespace.createElement("img", _extends({
|
|
196
|
+
alt: props.imageAlt
|
|
197
|
+
}, imageProps)));
|
|
198
198
|
} else if (props.icon) {
|
|
199
|
-
|
|
199
|
+
var chipIconProps = utils.mergeProps({
|
|
200
200
|
key: 'icon',
|
|
201
201
|
className: 'p-chip-icon'
|
|
202
|
-
},
|
|
202
|
+
}, ptm('icon'));
|
|
203
|
+
content.push(utils.IconUtils.getJSXIcon(props.icon, _objectSpread({}, chipIconProps), {
|
|
203
204
|
props: props
|
|
204
205
|
}));
|
|
205
206
|
}
|
|
206
207
|
if (props.label) {
|
|
207
|
-
|
|
208
|
-
key:
|
|
209
|
-
className:
|
|
210
|
-
},
|
|
208
|
+
var labelProps = utils.mergeProps({
|
|
209
|
+
key: 'label',
|
|
210
|
+
className: 'p-chip-text'
|
|
211
|
+
}, ptm('label'));
|
|
212
|
+
content.push( /*#__PURE__*/React__namespace.createElement("span", labelProps, props.label));
|
|
211
213
|
}
|
|
212
214
|
if (props.removable) {
|
|
213
|
-
content.push(utils.IconUtils.getJSXIcon(icon, _objectSpread({},
|
|
215
|
+
content.push(utils.IconUtils.getJSXIcon(icon, _objectSpread({}, removeIconProps), {
|
|
214
216
|
props: props
|
|
215
217
|
}));
|
|
216
218
|
}
|
|
217
219
|
return content;
|
|
218
220
|
};
|
|
219
221
|
var createElement = function createElement() {
|
|
220
|
-
var otherProps = ChipBase.getOtherProps(props);
|
|
221
222
|
var className = utils.classNames('p-chip p-component', {
|
|
222
223
|
'p-chip-image': props.image != null
|
|
223
224
|
}, props.className);
|
|
224
225
|
var content = props.template ? utils.ObjectUtils.getJSXElement(props.template, props) : createContent();
|
|
225
|
-
|
|
226
|
+
var rootProps = utils.mergeProps({
|
|
226
227
|
ref: elementRef,
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
},
|
|
228
|
+
style: props.style,
|
|
229
|
+
className: className
|
|
230
|
+
}, ChipBase.getOtherProps(props), ptm('root'));
|
|
231
|
+
return /*#__PURE__*/React__namespace.createElement("div", rootProps, content);
|
|
230
232
|
};
|
|
231
233
|
React__namespace.useImperativeHandle(ref, function () {
|
|
232
234
|
return {
|
|
@@ -246,4 +248,4 @@ this.primereact.chip = (function (exports, React, utils, timescircle) {
|
|
|
246
248
|
|
|
247
249
|
return exports;
|
|
248
250
|
|
|
249
|
-
})({}, React, primereact.utils, primereact.icons.timescircle);
|
|
251
|
+
})({}, React, primereact.utils, primereact.componentbase, primereact.icons.timescircle);
|
package/chip/chip.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.chip=function(e,t,
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.chip=function(e,r,t,n,o){"use strict";function i(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}})),r.default=e,Object.freeze(r)}var l=i(r);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function a(e,r){if("object"!==c(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}function u(e){var r=a(e,"string");return"symbol"===c(r)?r:String(r)}function s(e,r,t){return(r=u(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},p.apply(this,arguments)}function m(e){if(Array.isArray(e))return e}function f(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,i,l,c=[],a=!0,u=!1;try{if(i=(t=t.call(e)).next,0===r){if(Object(t)!==t)return;a=!1}else for(;!(a=(n=i.call(t)).done)&&(c.push(n.value),c.length!==r);a=!0);}catch(e){u=!0,o=e}finally{try{if(!a&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(u)throw o}}return c}}function b(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function y(e,r){if(e){if("string"==typeof e)return b(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?b(e,r):void 0}}function v(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var g=n.ComponentBase.extend({defaultProps:{__TYPE:"Chip",label:null,icon:null,image:null,removable:!1,removeIcon:null,className:null,style:null,template:null,imageAlt:"chip",onImageError:null,onRemove:null,children:void 0}});function h(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?h(Object(t),!0).forEach((function(r){s(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):h(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var d=l.memo(l.forwardRef((function(e,r){var n,i,c,a,u,s=g.getProps(e),b=l.useRef(null),h=l.useState(!0),d=(i=2,m(n=h)||f(n,i)||y(n,i)||v()),j=d[0],P=d[1],S=g.setMetaData({props:s}).ptm,w=function(e){13===e.keyCode&&I(e)},I=function(e){P(!1),s.onRemove&&s.onRemove(e)},E=function(){var e=[],r=t.mergeProps({key:"removeIcon",tabIndex:0,className:"p-chip-remove-icon",onClick:I,onKeyDown:w},S("removeIcon")),n=s.removeIcon||l.createElement(o.TimesCircleIcon,r);if(s.image){var i=t.mergeProps({key:"image",src:s.image,onError:s.onImageError},S("image"));e.push(l.createElement("img",p({alt:s.imageAlt},i)))}else if(s.icon){var c=t.mergeProps({key:"icon",className:"p-chip-icon"},S("icon"));e.push(t.IconUtils.getJSXIcon(s.icon,O({},c),{props:s}))}if(s.label){var a=t.mergeProps({key:"label",className:"p-chip-text"},S("label"));e.push(l.createElement("span",a,s.label))}return s.removable&&e.push(t.IconUtils.getJSXIcon(n,O({},r),{props:s})),e};return l.useImperativeHandle(r,(function(){return{props:s,getElement:function(){return b.current}}})),j&&(c=t.classNames("p-chip p-component",{"p-chip-image":null!=s.image},s.className),a=s.template?t.ObjectUtils.getJSXElement(s.template,s):E(),u=t.mergeProps({ref:b,style:s.style,className:c},g.getOtherProps(s),S("root")),l.createElement("div",u,a))})));return d.displayName="Chip",e.Chip=d,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.utils,primereact.componentbase,primereact.icons.timescircle);
|
package/chips/chips.cjs.js
CHANGED
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
+
var hooks = require('primereact/hooks');
|
|
7
|
+
var timescircle = require('primereact/icons/timescircle');
|
|
6
8
|
var keyfilter = require('primereact/keyfilter');
|
|
7
9
|
var tooltip = require('primereact/tooltip');
|
|
8
10
|
var utils = require('primereact/utils');
|
|
9
|
-
var timescircle = require('primereact/icons/timescircle');
|
|
10
11
|
|
|
11
12
|
function _interopNamespace(e) {
|
|
12
13
|
if (e && e.__esModule) return e;
|
|
@@ -158,33 +159,34 @@ function _slicedToArray(arr, i) {
|
|
|
158
159
|
var ChipsBase = {
|
|
159
160
|
defaultProps: {
|
|
160
161
|
__TYPE: 'Chips',
|
|
162
|
+
addOnBlur: null,
|
|
163
|
+
allowDuplicate: true,
|
|
164
|
+
ariaLabelledBy: null,
|
|
165
|
+
autoFocus: false,
|
|
166
|
+
className: null,
|
|
167
|
+
disabled: null,
|
|
161
168
|
id: null,
|
|
162
|
-
inputRef: null,
|
|
163
169
|
inputId: null,
|
|
170
|
+
inputRef: null,
|
|
171
|
+
itemTemplate: null,
|
|
172
|
+
keyfilter: null,
|
|
173
|
+
max: null,
|
|
164
174
|
name: null,
|
|
175
|
+
onAdd: null,
|
|
176
|
+
onBlur: null,
|
|
177
|
+
onChange: null,
|
|
178
|
+
onFocus: null,
|
|
179
|
+
onKeyDown: null,
|
|
180
|
+
onRemove: null,
|
|
165
181
|
placeholder: null,
|
|
166
|
-
value: null,
|
|
167
|
-
max: null,
|
|
168
|
-
disabled: null,
|
|
169
182
|
readOnly: false,
|
|
170
183
|
removable: true,
|
|
171
184
|
removeIcon: null,
|
|
185
|
+
separator: null,
|
|
172
186
|
style: null,
|
|
173
|
-
className: null,
|
|
174
187
|
tooltip: null,
|
|
175
188
|
tooltipOptions: null,
|
|
176
|
-
|
|
177
|
-
separator: null,
|
|
178
|
-
allowDuplicate: true,
|
|
179
|
-
itemTemplate: null,
|
|
180
|
-
keyfilter: null,
|
|
181
|
-
addOnBlur: null,
|
|
182
|
-
onAdd: null,
|
|
183
|
-
onRemove: null,
|
|
184
|
-
onChange: null,
|
|
185
|
-
onFocus: null,
|
|
186
|
-
onBlur: null,
|
|
187
|
-
onKeyDown: null,
|
|
189
|
+
value: null,
|
|
188
190
|
children: undefined
|
|
189
191
|
},
|
|
190
192
|
getProps: function getProps(props) {
|
|
@@ -225,8 +227,12 @@ var Chips = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
|
|
|
225
227
|
props.onChange({
|
|
226
228
|
originalEvent: event,
|
|
227
229
|
value: values,
|
|
228
|
-
stopPropagation: function stopPropagation() {
|
|
229
|
-
|
|
230
|
+
stopPropagation: function stopPropagation() {
|
|
231
|
+
event.stopPropagation();
|
|
232
|
+
},
|
|
233
|
+
preventDefault: function preventDefault() {
|
|
234
|
+
event.preventDefault();
|
|
235
|
+
},
|
|
230
236
|
target: {
|
|
231
237
|
name: props.name,
|
|
232
238
|
id: props.id,
|
|
@@ -296,8 +302,12 @@ var Chips = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
|
|
|
296
302
|
props.onChange({
|
|
297
303
|
originalEvent: event,
|
|
298
304
|
value: items,
|
|
299
|
-
stopPropagation: function stopPropagation() {
|
|
300
|
-
|
|
305
|
+
stopPropagation: function stopPropagation() {
|
|
306
|
+
event.stopPropagation();
|
|
307
|
+
},
|
|
308
|
+
preventDefault: function preventDefault() {
|
|
309
|
+
event.preventDefault();
|
|
310
|
+
},
|
|
301
311
|
target: {
|
|
302
312
|
name: props.name,
|
|
303
313
|
id: props.id,
|
|
@@ -371,6 +381,11 @@ var Chips = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
|
|
|
371
381
|
React__namespace.useEffect(function () {
|
|
372
382
|
utils.ObjectUtils.combinedRefs(inputRef, props.inputRef);
|
|
373
383
|
}, [inputRef, props.inputRef]);
|
|
384
|
+
hooks.useMountEffect(function () {
|
|
385
|
+
if (props.autoFocus) {
|
|
386
|
+
utils.DomHandler.focus(inputRef.current, props.autoFocus);
|
|
387
|
+
}
|
|
388
|
+
});
|
|
374
389
|
var createRemoveIcon = function createRemoveIcon(value, index) {
|
|
375
390
|
var iconProps = {
|
|
376
391
|
className: 'p-chips-token-icon',
|
package/chips/chips.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/hooks"),r=require("primereact/icons/timescircle"),n=require("primereact/keyfilter"),o=require("primereact/tooltip"),l=require("primereact/utils");function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var i=a(e);function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u.apply(this,arguments)}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function s(e,t){if("object"!==c(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function p(e){var t=s(e,"string");return"symbol"===c(t)?t:String(t)}function f(e,t,r){return(t=p(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function d(e){if(Array.isArray(e))return m(e)}function y(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function v(e,t){if(e){if("string"==typeof e)return m(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(e,t):void 0}}function b(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function g(e){return d(e)||y(e)||v(e)||b()}function h(e){if(Array.isArray(e))return e}function O(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,l,a,i=[],u=!0,c=!1;try{if(l=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=l.call(r)).done)&&(i.push(n.value),i.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return i}}function j(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var P={defaultProps:{__TYPE:"Chips",addOnBlur:null,allowDuplicate:!0,ariaLabelledBy:null,autoFocus:!1,className:null,disabled:null,id:null,inputId:null,inputRef:null,itemTemplate:null,keyfilter:null,max:null,name:null,onAdd:null,onBlur:null,onChange:null,onFocus:null,onKeyDown:null,onRemove:null,placeholder:null,readOnly:!1,removable:!0,removeIcon:null,separator:null,style:null,tooltip:null,tooltipOptions:null,value:null,children:void 0},getProps:function(e){return l.ObjectUtils.getMergedProps(e,P.defaultProps)},getOtherProps:function(e){return l.ObjectUtils.getDiffProps(e,P.defaultProps)}};function w(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function D(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?w(Object(r),!0).forEach((function(t){f(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var E=i.memo(i.forwardRef((function(e,a){var c,s,p=P.getProps(e),f=i.useState(!1),m=(s=2,h(c=f)||O(c,s)||v(c,s)||j()),d=m[0],y=m[1],b=i.useRef(null),w=i.useRef(null),E=i.useRef(p.inputRef),k=function(e,t){if(!p.disabled||!p.readOnly){var r=g(p.value),n=r.splice(t,1);B(n,t)&&(p.onRemove&&p.onRemove({originalEvent:e,value:n}),p.onChange&&p.onChange({originalEvent:e,value:r,stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},target:{name:p.name,id:p.id,value:r}}))}},S=function(e,t,r){if(t&&t.trim().length){var n=p.value?g(p.value):[];if(p.allowDuplicate||-1===n.indexOf(t)){var o=!0;p.onAdd&&(o=p.onAdd({originalEvent:e,value:t})),!1!==o&&n.push(t)}I(e,n,r)}},x=function(){l.DomHandler.focus(E.current)},A=function(e){var t=e.target.value,r=p.value||[];if(p.onKeyDown&&p.onKeyDown(e),!e.defaultPrevented)switch(e.key){case"Backspace":0===E.current.value.length&&r.length>0&&k(e,r.length-1);break;case"Enter":t&&t.trim().length&&(!p.max||p.max>r.length)&&S(e,t,!0);break;default:p.keyfilter&&n.KeyFilter.onKeyPress(e,p.keyfilter),F()?e.preventDefault():","===p.separator&&(e.key===p.separator||l.DomHandler.isAndroid()&&229===e.which)&&S(e,t,!0)}},I=function(e,t,r){p.onChange&&p.onChange({originalEvent:e,value:t,stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},target:{name:p.name,id:p.id,value:t}}),E.current.value="",r&&e.preventDefault()},N=function(e){if(p.separator){var t=(e.clipboardData||window.clipboardData).getData("Text");if(p.keyfilter&&n.KeyFilter.onPaste(e,p.keyfilter),t){var r=p.value||[],o=t.split(p.separator);o=o.filter((function(e){return(p.allowDuplicate||-1===r.indexOf(e))&&e.trim().length})),r=[].concat(g(r),g(o)),I(e,r,!0)}}},R=function(e){y(!0),p.onFocus&&p.onFocus(e)},C=function(e){if(p.addOnBlur){var t=e.target.value,r=p.value||[];t&&t.trim().length&&(!p.max||p.max>r.length)&&S(e,t,!0)}y(!1),p.onBlur&&p.onBlur(e)},F=function(){return p.max&&p.value&&p.max===p.value.length},T=E.current&&E.current.value,U=i.useMemo((function(){return l.ObjectUtils.isNotEmpty(p.value)||l.ObjectUtils.isNotEmpty(T)}),[p.value,T]),B=function(e,t){return l.ObjectUtils.getPropValue(p.removable,{value:e,index:t,props:p})};i.useImperativeHandle(a,(function(){return{props:p,focus:function(){return l.DomHandler.focus(E.current)},getElement:function(){return b.current},getInput:function(){return E.current}}})),i.useEffect((function(){l.ObjectUtils.combinedRefs(E,p.inputRef)}),[E,p.inputRef]),t.useMountEffect((function(){p.autoFocus&&l.DomHandler.focus(E.current,p.autoFocus)}));var K=function(e,t){var n={className:"p-chips-token-icon",onClick:function(e){return k(e,t)}},o=l.IconUtils.getJSXIcon(p.removeIcon||i.createElement(r.TimesCircleIcon,n),D({},n),{props:p});return p.disabled||p.readOnly||!B(e,t)?null:o},_=function(e,t){var r=p.itemTemplate?p.itemTemplate(e):e,n=i.createElement("span",{className:"p-chips-token-label"},r),o=K(e,t);return i.createElement("li",{key:t,className:"p-chips-token p-highlight"},n,o)},q=l.ObjectUtils.isNotEmpty(p.tooltip),H=P.getOtherProps(p),M=l.ObjectUtils.reduceKeys(H,l.DomHandler.ARIA_PROPS),z=l.classNames("p-chips p-component p-inputwrapper",{"p-inputwrapper-filled":U,"p-inputwrapper-focus":d},p.className),J=function(){var e=l.classNames("p-inputtext p-chips-multiple-container",{"p-disabled":p.disabled,"p-focus":d}),t=p.value?p.value.map(_):null,r=i.createElement("li",{className:"p-chips-input-token"},i.createElement("input",u({ref:E,id:p.inputId,placeholder:p.placeholder,type:"text",name:p.name,disabled:p.disabled||F(),onKeyDown:A,onPaste:N,onFocus:R,onBlur:C,readOnly:p.readOnly},M)));return i.createElement("ul",{ref:w,className:e,onClick:x},t,r)}();return i.createElement(i.Fragment,null,i.createElement("div",u({ref:b,id:p.id,className:z,style:p.style},H),J),q&&i.createElement(o.Tooltip,u({target:E,content:p.tooltip},p.tooltipOptions)))})));E.displayName="Chips",exports.Chips=E;
|
package/chips/chips.d.ts
CHANGED
|
@@ -75,6 +75,11 @@ interface ChipsChangeEvent extends FormEvent<any[]> {}
|
|
|
75
75
|
* @group Properties
|
|
76
76
|
*/
|
|
77
77
|
export interface ChipsProps extends Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'onChange' | 'onFocus' | 'onBlur' | 'onKeyDown' | 'ref'> {
|
|
78
|
+
/**
|
|
79
|
+
* When present, it specifies that the component should automatically get focus on load.
|
|
80
|
+
* @defaultValue false
|
|
81
|
+
*/
|
|
82
|
+
autoFocus?: boolean | undefined;
|
|
78
83
|
/**
|
|
79
84
|
* Reference of the input element.
|
|
80
85
|
*/
|