primereact 10.3.0 → 10.3.2
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 +24 -20
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +36 -1
- package/accordion/accordion.esm.js +16 -12
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +22 -18
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +39 -33
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +14 -3
- package/api/api.esm.js +39 -33
- package/api/api.esm.min.js +1 -1
- package/api/api.js +39 -33
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +24 -21
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +6 -1
- package/autocomplete/autocomplete.esm.js +7 -4
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +24 -21
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +6 -4
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.esm.js +3 -1
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +7 -6
- 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 +11 -7
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +11 -7
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +11 -7
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +12 -11
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +3 -2
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +12 -11
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +9 -6
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +4 -1
- package/button/button.esm.min.js +1 -1
- package/button/button.js +10 -8
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +158 -113
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +3 -5
- package/calendar/calendar.esm.js +92 -47
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +158 -113
- package/calendar/calendar.min.js +1 -1
- package/card/card.cjs.js +11 -9
- package/card/card.cjs.min.js +1 -1
- package/card/card.esm.js +4 -2
- package/card/card.esm.min.js +1 -1
- package/card/card.js +10 -9
- package/card/card.min.js +1 -1
- package/carousel/carousel.cjs.js +1 -1
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +1 -1
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +1 -1
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +60 -36
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +27 -4
- package/cascadeselect/cascadeselect.esm.js +46 -22
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +61 -37
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +4 -3
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +3 -2
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +5 -4
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +31 -30
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +28 -27
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +32 -31
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +13 -7
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +17 -2
- package/chip/chip.esm.js +9 -3
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +14 -9
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +10 -8
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +5 -3
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +10 -8
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +9 -8
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +1 -1
- package/colorpicker/colorpicker.esm.js +2 -1
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +9 -8
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.d.ts +1 -1
- package/componentbase/componentbase.cjs.js +62 -50
- package/componentbase/componentbase.cjs.min.js +1 -1
- package/componentbase/componentbase.esm.js +63 -51
- package/componentbase/componentbase.esm.min.js +1 -1
- package/componentbase/componentbase.js +62 -50
- package/componentbase/componentbase.min.js +1 -1
- package/confirmdialog/confirmdialog.cjs.js +32 -22
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +19 -3
- package/confirmdialog/confirmdialog.esm.js +30 -20
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +32 -22
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +41 -128
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.d.ts +12 -2
- package/confirmpopup/confirmpopup.esm.js +36 -123
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +41 -128
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +14 -12
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +1 -1
- package/contextmenu/contextmenu.esm.js +5 -3
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +14 -12
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +1232 -649
- package/core/core.min.js +44 -44
- package/datascroller/datascroller.cjs.js +8 -7
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.esm.js +3 -2
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +8 -7
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +166 -146
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +4 -3
- package/datatable/datatable.esm.js +72 -52
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +166 -146
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.d.ts +1 -1
- package/deferredcontent/deferredcontent.cjs.js +3 -3
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.esm.js +3 -3
- 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 +40 -130
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +2 -2
- package/dialog/dialog.esm.js +35 -125
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +41 -131
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +6 -4
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +4 -2
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +5 -4
- package/divider/divider.min.js +1 -1
- package/dock/dock.cjs.js +10 -9
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +3 -2
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +10 -9
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +46 -36
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +1 -1
- package/dropdown/dropdown.esm.js +21 -11
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +47 -37
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +8 -7
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +4 -3
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +8 -7
- package/editor/editor.min.js +1 -1
- package/fieldset/fieldset.cjs.js +9 -8
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +3 -2
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +9 -8
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +25 -24
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +5 -4
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +26 -26
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/galleria.cjs.js +13 -12
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +4 -3
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +14 -13
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.cjs.js +254 -94
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.d.ts +12 -4
- package/hooks/hooks.esm.js +253 -96
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +254 -94
- package/hooks/hooks.min.js +1 -1
- package/icons/arrowdown/index.cjs.js +1 -1
- package/icons/arrowdown/index.cjs.min.js +1 -1
- package/icons/arrowdown/index.esm.js +1 -1
- package/icons/arrowdown/index.esm.min.js +1 -1
- package/icons/arrowdown/index.js +1 -1
- package/icons/arrowdown/index.min.js +1 -1
- package/icons/arrowup/index.cjs.js +1 -1
- package/icons/arrowup/index.cjs.min.js +1 -1
- package/icons/arrowup/index.esm.js +1 -1
- package/icons/arrowup/index.esm.min.js +1 -1
- package/icons/arrowup/index.js +1 -1
- package/icons/arrowup/index.min.js +1 -1
- package/icons/ban/index.cjs.js +1 -1
- package/icons/ban/index.cjs.min.js +1 -1
- package/icons/ban/index.esm.js +1 -1
- package/icons/ban/index.esm.min.js +1 -1
- package/icons/ban/index.js +1 -1
- package/icons/ban/index.min.js +1 -1
- package/icons/download/index.cjs.js +1 -1
- package/icons/download/index.cjs.min.js +1 -1
- package/icons/download/index.esm.js +1 -1
- package/icons/download/index.esm.min.js +1 -1
- package/icons/download/index.js +1 -1
- package/icons/download/index.min.js +1 -1
- package/icons/exclamationtriangle/index.cjs.js +1 -1
- package/icons/exclamationtriangle/index.cjs.min.js +1 -1
- package/icons/exclamationtriangle/index.esm.js +1 -1
- package/icons/exclamationtriangle/index.esm.min.js +1 -1
- package/icons/exclamationtriangle/index.js +1 -1
- package/icons/exclamationtriangle/index.min.js +1 -1
- package/icons/eyeslash/index.cjs.js +1 -1
- package/icons/eyeslash/index.cjs.min.js +1 -1
- package/icons/eyeslash/index.esm.js +1 -1
- package/icons/eyeslash/index.esm.min.js +1 -1
- package/icons/eyeslash/index.js +1 -1
- package/icons/eyeslash/index.min.js +1 -1
- package/icons/filter/index.cjs.js +1 -1
- package/icons/filter/index.cjs.min.js +1 -1
- package/icons/filter/index.esm.js +1 -1
- package/icons/filter/index.esm.min.js +1 -1
- package/icons/filter/index.js +1 -1
- package/icons/filter/index.min.js +1 -1
- package/icons/filterslash/index.cjs.js +1 -1
- package/icons/filterslash/index.cjs.min.js +1 -1
- package/icons/filterslash/index.esm.js +1 -1
- package/icons/filterslash/index.esm.min.js +1 -1
- package/icons/filterslash/index.js +1 -1
- package/icons/filterslash/index.min.js +1 -1
- package/icons/infocircle/index.cjs.js +1 -1
- package/icons/infocircle/index.cjs.min.js +1 -1
- package/icons/infocircle/index.esm.js +1 -1
- package/icons/infocircle/index.esm.min.js +1 -1
- package/icons/infocircle/index.js +1 -1
- package/icons/infocircle/index.min.js +1 -1
- package/icons/pencil/index.cjs.js +1 -1
- package/icons/pencil/index.cjs.min.js +1 -1
- package/icons/pencil/index.esm.js +1 -1
- package/icons/pencil/index.esm.min.js +1 -1
- package/icons/pencil/index.js +1 -1
- package/icons/pencil/index.min.js +1 -1
- package/icons/plus/index.cjs.js +1 -1
- package/icons/plus/index.cjs.min.js +1 -1
- package/icons/plus/index.esm.js +1 -1
- package/icons/plus/index.esm.min.js +1 -1
- package/icons/plus/index.js +1 -1
- package/icons/plus/index.min.js +1 -1
- package/icons/refresh/index.cjs.js +1 -1
- package/icons/refresh/index.cjs.min.js +1 -1
- package/icons/refresh/index.esm.js +1 -1
- package/icons/refresh/index.esm.min.js +1 -1
- package/icons/refresh/index.js +1 -1
- package/icons/refresh/index.min.js +1 -1
- package/icons/search/index.cjs.js +1 -1
- package/icons/search/index.cjs.min.js +1 -1
- package/icons/search/index.esm.js +1 -1
- package/icons/search/index.esm.min.js +1 -1
- package/icons/search/index.js +1 -1
- package/icons/search/index.min.js +1 -1
- package/icons/searchminus/index.cjs.js +1 -1
- package/icons/searchminus/index.cjs.min.js +1 -1
- package/icons/searchminus/index.esm.js +1 -1
- package/icons/searchminus/index.esm.min.js +1 -1
- package/icons/searchminus/index.js +1 -1
- package/icons/searchminus/index.min.js +1 -1
- package/icons/searchplus/index.cjs.js +1 -1
- package/icons/searchplus/index.cjs.min.js +1 -1
- package/icons/searchplus/index.esm.js +1 -1
- package/icons/searchplus/index.esm.min.js +1 -1
- package/icons/searchplus/index.js +1 -1
- package/icons/searchplus/index.min.js +1 -1
- package/icons/sortalt/index.cjs.js +1 -1
- package/icons/sortalt/index.cjs.min.js +1 -1
- package/icons/sortalt/index.esm.js +1 -1
- package/icons/sortalt/index.esm.min.js +1 -1
- package/icons/sortalt/index.js +1 -1
- package/icons/sortalt/index.min.js +1 -1
- package/icons/sortamountdown/index.cjs.js +1 -1
- package/icons/sortamountdown/index.cjs.min.js +1 -1
- package/icons/sortamountdown/index.esm.js +1 -1
- package/icons/sortamountdown/index.esm.min.js +1 -1
- package/icons/sortamountdown/index.js +1 -1
- package/icons/sortamountdown/index.min.js +1 -1
- package/icons/sortamountupalt/index.cjs.js +1 -1
- package/icons/sortamountupalt/index.cjs.min.js +1 -1
- package/icons/sortamountupalt/index.esm.js +1 -1
- package/icons/sortamountupalt/index.esm.min.js +1 -1
- package/icons/sortamountupalt/index.js +1 -1
- package/icons/sortamountupalt/index.min.js +1 -1
- package/icons/spinner/index.cjs.js +1 -1
- package/icons/spinner/index.cjs.min.js +1 -1
- package/icons/spinner/index.esm.js +1 -1
- package/icons/spinner/index.esm.min.js +1 -1
- package/icons/spinner/index.js +1 -1
- package/icons/spinner/index.min.js +1 -1
- package/icons/star/index.cjs.js +1 -1
- package/icons/star/index.cjs.min.js +1 -1
- package/icons/star/index.esm.js +1 -1
- package/icons/star/index.esm.min.js +1 -1
- package/icons/star/index.js +1 -1
- package/icons/star/index.min.js +1 -1
- package/icons/starfill/index.cjs.js +1 -1
- package/icons/starfill/index.cjs.min.js +1 -1
- package/icons/starfill/index.esm.js +1 -1
- package/icons/starfill/index.esm.min.js +1 -1
- package/icons/starfill/index.js +1 -1
- package/icons/starfill/index.min.js +1 -1
- package/icons/thlarge/index.cjs.js +1 -1
- package/icons/thlarge/index.cjs.min.js +1 -1
- package/icons/thlarge/index.esm.js +1 -1
- package/icons/thlarge/index.esm.min.js +1 -1
- package/icons/thlarge/index.js +1 -1
- package/icons/thlarge/index.min.js +1 -1
- package/icons/timescircle/index.cjs.js +1 -1
- package/icons/timescircle/index.cjs.min.js +1 -1
- package/icons/timescircle/index.esm.js +1 -1
- package/icons/timescircle/index.esm.min.js +1 -1
- package/icons/timescircle/index.js +1 -1
- package/icons/timescircle/index.min.js +1 -1
- package/icons/trash/index.cjs.js +1 -1
- package/icons/trash/index.cjs.min.js +1 -1
- package/icons/trash/index.esm.js +1 -1
- package/icons/trash/index.esm.min.js +1 -1
- package/icons/trash/index.js +1 -1
- package/icons/trash/index.min.js +1 -1
- package/icons/undo/index.cjs.js +1 -1
- package/icons/undo/index.cjs.min.js +1 -1
- package/icons/undo/index.esm.js +1 -1
- package/icons/undo/index.esm.min.js +1 -1
- package/icons/undo/index.js +1 -1
- package/icons/undo/index.min.js +1 -1
- package/icons/upload/index.cjs.js +1 -1
- package/icons/upload/index.cjs.min.js +1 -1
- package/icons/upload/index.esm.js +1 -1
- package/icons/upload/index.esm.min.js +1 -1
- package/icons/upload/index.js +1 -1
- package/icons/upload/index.min.js +1 -1
- package/icons/windowmaximize/index.cjs.js +1 -1
- package/icons/windowmaximize/index.cjs.min.js +1 -1
- package/icons/windowmaximize/index.esm.js +1 -1
- package/icons/windowmaximize/index.esm.min.js +1 -1
- package/icons/windowmaximize/index.js +1 -1
- package/icons/windowmaximize/index.min.js +1 -1
- package/icons/windowminimize/index.cjs.js +1 -1
- package/icons/windowminimize/index.cjs.min.js +1 -1
- package/icons/windowminimize/index.esm.js +1 -1
- package/icons/windowminimize/index.esm.min.js +1 -1
- package/icons/windowminimize/index.js +1 -1
- package/icons/windowminimize/index.min.js +1 -1
- package/image/image.cjs.js +45 -151
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +26 -132
- package/image/image.esm.min.js +1 -1
- package/image/image.js +46 -152
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +12 -4
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +9 -1
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +13 -6
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +15 -6
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +15 -6
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +15 -6
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +84 -26
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +7 -0
- package/inputnumber/inputnumber.esm.js +80 -22
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +84 -26
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +8 -7
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +6 -5
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +8 -7
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +10 -7
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +10 -7
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +11 -9
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +3 -1
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.esm.js +3 -1
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +4 -3
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/knob/knob.cjs.js +7 -6
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +3 -2
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +8 -7
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +31 -14
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.d.ts +8 -3
- package/listbox/listbox.esm.js +23 -6
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +31 -14
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +94 -92
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +73 -71
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +94 -92
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +133 -57
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.d.ts +4 -0
- package/mention/mention.esm.js +128 -52
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +133 -57
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +22 -117
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +1 -1
- package/menu/menu.esm.js +15 -110
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +22 -117
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +15 -13
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +4 -2
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +15 -13
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +5 -3
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +3 -1
- package/message/message.esm.min.js +1 -1
- package/message/message.js +6 -5
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +5 -4
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.esm.js +3 -2
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +6 -5
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +89 -67
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +5 -1
- package/multiselect/multiselect.esm.js +56 -34
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +90 -68
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +5 -4
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +3 -2
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +5 -4
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +21 -18
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.d.ts +11 -1
- package/orderlist/orderlist.esm.js +6 -3
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +21 -18
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +32 -19
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +15 -2
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +31 -19
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +15 -109
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +1 -1
- package/overlaypanel/overlaypanel.esm.js +12 -106
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +16 -110
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.cjs.js +271 -21
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.d.ts +2 -2
- package/paginator/paginator.esm.js +265 -15
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +271 -21
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +11 -10
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +3 -2
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +11 -10
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +39 -34
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +20 -15
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +39 -34
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/index.cjs.js +5 -3
- package/passthrough/index.cjs.min.js +1 -1
- package/passthrough/index.d.ts +1 -0
- package/passthrough/index.esm.js +5 -3
- package/passthrough/index.esm.min.js +1 -1
- package/passthrough/index.js +5 -3
- package/passthrough/index.min.js +1 -1
- package/passthrough/tailwind/index.cjs.js +401 -391
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +401 -391
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +401 -391
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/password.cjs.js +18 -12
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +1 -1
- package/password/password.esm.js +11 -5
- package/password/password.esm.min.js +1 -1
- package/password/password.js +18 -12
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +725 -192
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.d.ts +11 -1
- package/picklist/picklist.esm.js +713 -180
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +725 -192
- package/picklist/picklist.min.js +1 -1
- package/portal/portal.cjs.js +7 -1
- package/portal/portal.cjs.min.js +1 -1
- package/portal/portal.esm.js +7 -1
- package/portal/portal.esm.min.js +1 -1
- package/portal/portal.js +7 -1
- package/portal/portal.min.js +1 -1
- package/primereact.all.cjs.js +3715 -2447
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +3711 -2447
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +3715 -2447
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +8 -6
- 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 +9 -8
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/progressspinner.cjs.js +5 -3
- 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 +6 -5
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +32 -31
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +29 -28
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +33 -32
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +9 -7
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +4 -2
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +9 -8
- package/rating/rating.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +18 -9
- package/resources/themes/arya-green/theme.css +18 -9
- package/resources/themes/arya-orange/theme.css +18 -9
- package/resources/themes/arya-purple/theme.css +18 -9
- package/resources/themes/bootstrap4-dark-blue/theme.css +18 -9
- package/resources/themes/bootstrap4-dark-purple/theme.css +18 -9
- package/resources/themes/bootstrap4-light-blue/theme.css +18 -9
- package/resources/themes/bootstrap4-light-purple/theme.css +18 -9
- package/resources/themes/fluent-light/theme.css +18 -9
- package/resources/themes/lara-dark-amber/theme.css +18 -9
- package/resources/themes/lara-dark-blue/theme.css +18 -9
- package/resources/themes/lara-dark-cyan/theme.css +18 -9
- package/resources/themes/lara-dark-green/theme.css +18 -9
- package/resources/themes/lara-dark-indigo/theme.css +18 -9
- package/resources/themes/lara-dark-pink/theme.css +18 -9
- package/resources/themes/lara-dark-purple/theme.css +18 -9
- package/resources/themes/lara-dark-teal/theme.css +18 -9
- package/resources/themes/lara-light-amber/theme.css +18 -9
- package/resources/themes/lara-light-blue/theme.css +18 -9
- package/resources/themes/lara-light-cyan/theme.css +18 -9
- package/resources/themes/lara-light-green/theme.css +18 -9
- package/resources/themes/lara-light-indigo/theme.css +18 -9
- package/resources/themes/lara-light-pink/theme.css +18 -9
- package/resources/themes/lara-light-purple/theme.css +18 -9
- package/resources/themes/lara-light-teal/theme.css +18 -9
- package/resources/themes/luna-amber/theme.css +18 -9
- package/resources/themes/luna-blue/theme.css +18 -9
- package/resources/themes/luna-green/theme.css +18 -9
- package/resources/themes/luna-pink/theme.css +18 -9
- package/resources/themes/md-dark-deeppurple/theme.css +18 -9
- package/resources/themes/md-dark-indigo/theme.css +18 -9
- package/resources/themes/md-light-deeppurple/theme.css +18 -9
- package/resources/themes/md-light-indigo/theme.css +18 -9
- package/resources/themes/mdc-dark-deeppurple/theme.css +18 -9
- package/resources/themes/mdc-dark-indigo/theme.css +18 -9
- package/resources/themes/mdc-light-deeppurple/theme.css +18 -9
- package/resources/themes/mdc-light-indigo/theme.css +18 -9
- package/resources/themes/mira/theme.css +18 -9
- package/resources/themes/nano/theme.css +18 -9
- package/resources/themes/nova/theme.css +18 -9
- package/resources/themes/nova-accent/theme.css +18 -9
- package/resources/themes/nova-alt/theme.css +18 -9
- package/resources/themes/rhea/theme.css +18 -9
- package/resources/themes/saga-blue/theme.css +18 -9
- package/resources/themes/saga-green/theme.css +18 -9
- package/resources/themes/saga-orange/theme.css +18 -9
- package/resources/themes/saga-purple/theme.css +18 -9
- package/resources/themes/soho-dark/theme.css +18 -9
- package/resources/themes/soho-light/theme.css +18 -9
- package/resources/themes/tailwind-light/theme.css +18 -9
- package/resources/themes/vela-blue/theme.css +18 -9
- package/resources/themes/vela-green/theme.css +18 -9
- package/resources/themes/vela-orange/theme.css +18 -9
- package/resources/themes/vela-purple/theme.css +18 -9
- package/resources/themes/viva-dark/theme.css +18 -9
- package/resources/themes/viva-light/theme.css +18 -9
- package/ripple/ripple.cjs.js +8 -4
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +9 -5
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +8 -4
- package/ripple/ripple.min.js +1 -1
- package/row/row.cjs.js +4 -2
- package/row/row.cjs.min.js +1 -1
- package/row/row.esm.js +4 -2
- package/row/row.esm.min.js +1 -1
- package/row/row.js +4 -3
- package/row/row.min.js +1 -1
- package/scrollpanel/scrollpanel.cjs.js +7 -6
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +3 -2
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +8 -7
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +4 -3
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.esm.js +3 -2
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +4 -3
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +6 -3
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +4 -1
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +7 -5
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/sidebar.cjs.js +17 -113
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +3 -3
- package/sidebar/sidebar.esm.js +12 -108
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +18 -114
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +3 -1
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +3 -1
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +4 -3
- package/skeleton/skeleton.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +23 -116
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +1 -1
- package/slidemenu/slidemenu.esm.js +12 -105
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +23 -116
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +6 -5
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +4 -3
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +6 -5
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +19 -10
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +14 -5
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +19 -10
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +105 -94
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +1 -1
- package/splitbutton/splitbutton.esm.js +94 -83
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +105 -94
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +5 -4
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +3 -2
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +5 -4
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +8 -7
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +3 -2
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +8 -7
- package/steps/steps.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +17 -14
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +12 -9
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +17 -14
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +38 -22
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +35 -0
- package/tabview/tabview.esm.js +26 -10
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +38 -22
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +5 -3
- 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 +6 -5
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +11 -9
- 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 +12 -11
- package/terminal/terminal.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +14 -12
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +1 -1
- package/tieredmenu/tieredmenu.esm.js +6 -4
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +14 -12
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +10 -8
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +3 -1
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +10 -9
- package/timeline/timeline.min.js +1 -1
- package/toast/toast.cjs.js +12 -10
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +2 -2
- package/toast/toast.esm.js +4 -2
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +12 -10
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +78 -7
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +77 -6
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +79 -8
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +7 -5
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +3 -1
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +7 -6
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +4 -3
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.d.ts +27 -0
- package/tooltip/tooltip.esm.js +3 -2
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +4 -3
- package/tooltip/tooltip.min.js +1 -1
- package/tooltip/tooltipoptions.d.ts +1 -1
- package/tree/tree.cjs.js +267 -150
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +8 -0
- package/tree/tree.esm.js +250 -133
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +268 -152
- package/tree/tree.min.js +1 -1
- package/treeselect/treeselect.cjs.js +209 -71
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +26 -1
- package/treeselect/treeselect.esm.js +191 -53
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +210 -73
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +139 -107
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +3 -3
- package/treetable/treetable.esm.js +86 -54
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +139 -107
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +6 -5
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +3 -2
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +6 -5
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +52 -9
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +3 -2
- package/utils/utils.esm.js +52 -10
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +52 -9
- package/utils/utils.min.js +1 -1
- package/web-types.json +137 -30
package/picklist/picklist.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
this.primereact = this.primereact || {};
|
|
2
|
-
this.primereact.picklist = (function (exports, React, PrimeReact, componentbase, hooks, utils, button, angledoubledown, angledoubleup, angledown, angleup, search, ripple, angledoubleleft, angledoubleright, angleleft, angleright) {
|
|
2
|
+
this.primereact.picklist = (function (exports, React, PrimeReact$1, componentbase, hooks, utils, button, angledoubledown, angledoubleup, angledown, angleup, search, ripple, angledoubleleft, angledoubleright, angleleft, angleright) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -23,7 +23,83 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
26
|
-
var PrimeReact__default = /*#__PURE__*/_interopDefaultLegacy(PrimeReact);
|
|
26
|
+
var PrimeReact__default = /*#__PURE__*/_interopDefaultLegacy(PrimeReact$1);
|
|
27
|
+
|
|
28
|
+
function _readOnlyError(name) {
|
|
29
|
+
throw new TypeError("\"" + name + "\" is read-only");
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function _typeof(o) {
|
|
33
|
+
"@babel/helpers - typeof";
|
|
34
|
+
|
|
35
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
36
|
+
return typeof o;
|
|
37
|
+
} : function (o) {
|
|
38
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
39
|
+
}, _typeof(o);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function _toPrimitive(input, hint) {
|
|
43
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
44
|
+
var prim = input[Symbol.toPrimitive];
|
|
45
|
+
if (prim !== undefined) {
|
|
46
|
+
var res = prim.call(input, hint || "default");
|
|
47
|
+
if (_typeof(res) !== "object") return res;
|
|
48
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
49
|
+
}
|
|
50
|
+
return (hint === "string" ? String : Number)(input);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function _toPropertyKey(arg) {
|
|
54
|
+
var key = _toPrimitive(arg, "string");
|
|
55
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function _defineProperty(obj, key, value) {
|
|
59
|
+
key = _toPropertyKey(key);
|
|
60
|
+
if (key in obj) {
|
|
61
|
+
Object.defineProperty(obj, key, {
|
|
62
|
+
value: value,
|
|
63
|
+
enumerable: true,
|
|
64
|
+
configurable: true,
|
|
65
|
+
writable: true
|
|
66
|
+
});
|
|
67
|
+
} else {
|
|
68
|
+
obj[key] = value;
|
|
69
|
+
}
|
|
70
|
+
return obj;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function _arrayLikeToArray(arr, len) {
|
|
74
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
75
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
76
|
+
return arr2;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function _arrayWithoutHoles(arr) {
|
|
80
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function _iterableToArray(iter) {
|
|
84
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
88
|
+
if (!o) return;
|
|
89
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
90
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
91
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
92
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
93
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function _nonIterableSpread() {
|
|
97
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function _toConsumableArray(arr) {
|
|
101
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
102
|
+
}
|
|
27
103
|
|
|
28
104
|
function _arrayWithHoles(arr) {
|
|
29
105
|
if (Array.isArray(arr)) return arr;
|
|
@@ -57,21 +133,6 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
57
133
|
}
|
|
58
134
|
}
|
|
59
135
|
|
|
60
|
-
function _arrayLikeToArray(arr, len) {
|
|
61
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
62
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
63
|
-
return arr2;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
67
|
-
if (!o) return;
|
|
68
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
69
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
70
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
71
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
72
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
136
|
function _nonIterableRest() {
|
|
76
137
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
77
138
|
}
|
|
@@ -90,20 +151,22 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
90
151
|
filterContainer: 'p-picklist-filter-container',
|
|
91
152
|
list: 'p-picklist-list',
|
|
92
153
|
listWrapper: 'p-picklist-list-wrapper',
|
|
93
|
-
listSourceWrapper: 'p-picklist-source-wrapper',
|
|
94
|
-
listTargetWrapper: 'p-picklist-target-wrapper',
|
|
95
|
-
listSource: 'p-picklist-source',
|
|
96
|
-
listTarget: 'p-picklist-target',
|
|
154
|
+
listSourceWrapper: 'p-picklist-list-wrapper p-picklist-source-wrapper',
|
|
155
|
+
listTargetWrapper: 'p-picklist-list-wrapper p-picklist-target-wrapper',
|
|
156
|
+
listSource: 'p-picklist-list p-picklist-source',
|
|
157
|
+
listTarget: 'p-picklist-list p-picklist-target',
|
|
97
158
|
item: function item(_ref) {
|
|
98
|
-
var
|
|
159
|
+
var selected = _ref.selected,
|
|
160
|
+
focused = _ref.focused;
|
|
99
161
|
return utils.classNames('p-picklist-item', {
|
|
100
|
-
'p-highlight':
|
|
162
|
+
'p-highlight': selected,
|
|
163
|
+
'p-focus': focused
|
|
101
164
|
});
|
|
102
165
|
},
|
|
103
166
|
sourceControls: 'p-picklist-source-controls p-picklist-buttons',
|
|
104
167
|
targetControls: 'p-picklist-target-controls p-picklist-buttons'
|
|
105
168
|
};
|
|
106
|
-
var styles = "\n@layer primereact {\n .p-picklist {\n display: flex;\n }\n
|
|
169
|
+
var styles = "\n@layer primereact {\n .p-picklist {\n display: flex;\n }\n\n .p-picklist-buttons {\n display: flex;\n flex-direction: column;\n justify-content: center;\n }\n\n .p-picklist-list-wrapper {\n flex: 1 1 50%;\n }\n\n .p-picklist-list {\n list-style-type: none;\n margin: 0;\n padding: 0;\n overflow: auto;\n min-height: 12rem;\n max-height: 24rem;\n }\n\n .p-picklist-item {\n cursor: pointer;\n overflow: hidden;\n position: relative;\n }\n\n .p-picklist-filter {\n position: relative;\n }\n\n .p-picklist-filter-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n }\n\n .p-picklist-filter-input {\n width: 100%;\n }\n}\n";
|
|
107
170
|
var PickListBase = componentbase.ComponentBase.extend({
|
|
108
171
|
defaultProps: {
|
|
109
172
|
__TYPE: 'PickList',
|
|
@@ -121,6 +184,8 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
121
184
|
showSourceControls: true,
|
|
122
185
|
showTargetControls: true,
|
|
123
186
|
metaKeySelection: true,
|
|
187
|
+
onFocus: null,
|
|
188
|
+
onBlur: null,
|
|
124
189
|
filter: false,
|
|
125
190
|
filterBy: null,
|
|
126
191
|
filterMatchMode: 'contains',
|
|
@@ -166,23 +231,8 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
166
231
|
}
|
|
167
232
|
});
|
|
168
233
|
|
|
169
|
-
function _arrayWithoutHoles(arr) {
|
|
170
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
function _iterableToArray(iter) {
|
|
174
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
function _nonIterableSpread() {
|
|
178
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
function _toConsumableArray(arr) {
|
|
182
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
183
|
-
}
|
|
184
|
-
|
|
185
234
|
var PickListControls = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
235
|
+
var mergeProps = hooks.useMergeProps();
|
|
186
236
|
var ptm = props.ptm,
|
|
187
237
|
cx = props.cx,
|
|
188
238
|
unstyled = props.unstyled;
|
|
@@ -287,7 +337,7 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
287
337
|
}
|
|
288
338
|
}
|
|
289
339
|
};
|
|
290
|
-
var controlsProps =
|
|
340
|
+
var controlsProps = mergeProps({
|
|
291
341
|
className: utils.classNames(props.className, cx('controls'))
|
|
292
342
|
}, ptm('controls', {
|
|
293
343
|
hostName: props.hostName
|
|
@@ -299,6 +349,7 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
299
349
|
onClick: moveUp,
|
|
300
350
|
pt: ptm('moveUpButton'),
|
|
301
351
|
unstyled: unstyled,
|
|
352
|
+
"aria-label": PrimeReact$1.ariaLabel('moveUp'),
|
|
302
353
|
__parentMetadata: {
|
|
303
354
|
parent: props.metaData
|
|
304
355
|
}
|
|
@@ -309,6 +360,7 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
309
360
|
onClick: moveTop,
|
|
310
361
|
pt: ptm('moveTopButton'),
|
|
311
362
|
unstyled: unstyled,
|
|
363
|
+
"aria-label": PrimeReact$1.ariaLabel('moveTop'),
|
|
312
364
|
__parentMetadata: {
|
|
313
365
|
parent: props.metaData
|
|
314
366
|
}
|
|
@@ -319,6 +371,7 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
319
371
|
onClick: moveDown,
|
|
320
372
|
pt: ptm('moveDownButton'),
|
|
321
373
|
unstyled: unstyled,
|
|
374
|
+
"aria-label": PrimeReact$1.ariaLabel('moveDown'),
|
|
322
375
|
__parentMetadata: {
|
|
323
376
|
parent: props.metaData
|
|
324
377
|
}
|
|
@@ -329,6 +382,7 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
329
382
|
onClick: moveBottom,
|
|
330
383
|
pt: ptm('moveBottomButton'),
|
|
331
384
|
unstyled: unstyled,
|
|
385
|
+
"aria-label": PrimeReact$1.ariaLabel('moveBottom'),
|
|
332
386
|
__parentMetadata: {
|
|
333
387
|
parent: props.metaData
|
|
334
388
|
}
|
|
@@ -336,48 +390,8 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
336
390
|
});
|
|
337
391
|
PickListControls.displayName = 'PickListControls';
|
|
338
392
|
|
|
339
|
-
function _typeof(o) {
|
|
340
|
-
"@babel/helpers - typeof";
|
|
341
|
-
|
|
342
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
343
|
-
return typeof o;
|
|
344
|
-
} : function (o) {
|
|
345
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
346
|
-
}, _typeof(o);
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
function _toPrimitive(input, hint) {
|
|
350
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
351
|
-
var prim = input[Symbol.toPrimitive];
|
|
352
|
-
if (prim !== undefined) {
|
|
353
|
-
var res = prim.call(input, hint || "default");
|
|
354
|
-
if (_typeof(res) !== "object") return res;
|
|
355
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
356
|
-
}
|
|
357
|
-
return (hint === "string" ? String : Number)(input);
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
function _toPropertyKey(arg) {
|
|
361
|
-
var key = _toPrimitive(arg, "string");
|
|
362
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
function _defineProperty(obj, key, value) {
|
|
366
|
-
key = _toPropertyKey(key);
|
|
367
|
-
if (key in obj) {
|
|
368
|
-
Object.defineProperty(obj, key, {
|
|
369
|
-
value: value,
|
|
370
|
-
enumerable: true,
|
|
371
|
-
configurable: true,
|
|
372
|
-
writable: true
|
|
373
|
-
});
|
|
374
|
-
} else {
|
|
375
|
-
obj[key] = value;
|
|
376
|
-
}
|
|
377
|
-
return obj;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
393
|
var PickListItem = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
394
|
+
var mergeProps = hooks.useMergeProps();
|
|
381
395
|
var ptm = props.ptm,
|
|
382
396
|
cx = props.cx;
|
|
383
397
|
var getPTOptions = function getPTOptions(key) {
|
|
@@ -392,7 +406,8 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
392
406
|
if (props.onClick) {
|
|
393
407
|
props.onClick({
|
|
394
408
|
originalEvent: event,
|
|
395
|
-
value: props.value
|
|
409
|
+
value: props.value,
|
|
410
|
+
id: props.id
|
|
396
411
|
});
|
|
397
412
|
}
|
|
398
413
|
};
|
|
@@ -404,92 +419,48 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
404
419
|
});
|
|
405
420
|
}
|
|
406
421
|
};
|
|
422
|
+
var onMouseDown = function onMouseDown(event) {
|
|
423
|
+
if (props.onMouseDown) {
|
|
424
|
+
props.onMouseDown(event);
|
|
425
|
+
}
|
|
426
|
+
};
|
|
427
|
+
var onFocus = function onFocus(event) {
|
|
428
|
+
if (props.onFocus) {
|
|
429
|
+
props.onFocus(event);
|
|
430
|
+
}
|
|
431
|
+
};
|
|
407
432
|
var content = props.template ? props.template(props.value) : props.value;
|
|
408
|
-
var itemProps =
|
|
433
|
+
var itemProps = mergeProps({
|
|
409
434
|
className: utils.classNames(props.className, cx('item', {
|
|
410
|
-
|
|
435
|
+
selected: props.selected,
|
|
436
|
+
focused: props.focused
|
|
411
437
|
})),
|
|
438
|
+
id: props.id,
|
|
412
439
|
onClick: onClick,
|
|
413
440
|
onKeyDown: onKeyDown,
|
|
414
|
-
|
|
441
|
+
onFocus: onFocus,
|
|
442
|
+
onMouseDown: onMouseDown,
|
|
415
443
|
role: 'option',
|
|
416
|
-
'aria-selected': props.selected
|
|
444
|
+
'aria-selected': props.selected,
|
|
445
|
+
'data-p-highlight': props.selected,
|
|
446
|
+
'data-p-focused': props.focused
|
|
417
447
|
}, getPTOptions('item'));
|
|
418
448
|
return /*#__PURE__*/React__namespace.createElement("li", itemProps, content, /*#__PURE__*/React__namespace.createElement(ripple.Ripple, null));
|
|
419
449
|
});
|
|
420
450
|
PickListItem.displayName = 'PickListItem';
|
|
421
451
|
|
|
422
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
423
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
452
|
+
function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
453
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
424
454
|
var PickListSubList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
|
|
455
|
+
var mergeProps = hooks.useMergeProps();
|
|
425
456
|
var listElementRef = React__namespace.useRef(null);
|
|
426
457
|
var ptm = props.ptm,
|
|
427
458
|
cx = props.cx;
|
|
428
459
|
var getPTOptions = function getPTOptions(key, options) {
|
|
429
|
-
return ptm(key, _objectSpread({
|
|
460
|
+
return ptm(key, _objectSpread$1({
|
|
430
461
|
hostName: props.hostName
|
|
431
462
|
}, options));
|
|
432
463
|
};
|
|
433
|
-
var onItemClick = function onItemClick(event) {
|
|
434
|
-
var originalEvent = event.originalEvent;
|
|
435
|
-
var item = event.value;
|
|
436
|
-
var selection = _toConsumableArray(props.selection);
|
|
437
|
-
var index = utils.ObjectUtils.findIndexInList(item, selection, props.dataKey);
|
|
438
|
-
var selected = index !== -1;
|
|
439
|
-
var metaSelection = props.metaKeySelection;
|
|
440
|
-
if (metaSelection) {
|
|
441
|
-
var metaKey = originalEvent.metaKey || originalEvent.ctrlKey;
|
|
442
|
-
if (selected && metaKey) {
|
|
443
|
-
selection.splice(index, 1);
|
|
444
|
-
} else {
|
|
445
|
-
if (!metaKey) {
|
|
446
|
-
selection.length = 0;
|
|
447
|
-
}
|
|
448
|
-
selection.push(item);
|
|
449
|
-
}
|
|
450
|
-
} else {
|
|
451
|
-
if (selected) selection.splice(index, 1);else selection.push(item);
|
|
452
|
-
}
|
|
453
|
-
if (props.onSelectionChange) {
|
|
454
|
-
props.onSelectionChange({
|
|
455
|
-
event: originalEvent,
|
|
456
|
-
value: selection
|
|
457
|
-
});
|
|
458
|
-
}
|
|
459
|
-
};
|
|
460
|
-
var onItemKeyDown = function onItemKeyDown(event) {
|
|
461
|
-
var originalEvent = event.originalEvent;
|
|
462
|
-
var listItem = originalEvent.currentTarget;
|
|
463
|
-
switch (originalEvent.which) {
|
|
464
|
-
//down
|
|
465
|
-
case 40:
|
|
466
|
-
var nextItem = findNextItem(listItem);
|
|
467
|
-
nextItem && nextItem.focus();
|
|
468
|
-
originalEvent.preventDefault();
|
|
469
|
-
break;
|
|
470
|
-
|
|
471
|
-
//up
|
|
472
|
-
case 38:
|
|
473
|
-
var prevItem = findPrevItem(listItem);
|
|
474
|
-
prevItem && prevItem.focus();
|
|
475
|
-
originalEvent.preventDefault();
|
|
476
|
-
break;
|
|
477
|
-
|
|
478
|
-
//enter
|
|
479
|
-
case 13:
|
|
480
|
-
onItemClick(event);
|
|
481
|
-
originalEvent.preventDefault();
|
|
482
|
-
break;
|
|
483
|
-
}
|
|
484
|
-
};
|
|
485
|
-
var findNextItem = function findNextItem(item) {
|
|
486
|
-
var nextItem = item.nextElementSibling;
|
|
487
|
-
return nextItem ? !utils.DomHandler.hasClass(nextItem, 'p-picklist-item') ? findNextItem(nextItem) : nextItem : null;
|
|
488
|
-
};
|
|
489
|
-
var findPrevItem = function findPrevItem(item) {
|
|
490
|
-
var prevItem = item.previousElementSibling;
|
|
491
|
-
return prevItem ? !utils.DomHandler.hasClass(prevItem, 'p-picklist-item') ? findPrevItem(prevItem) : prevItem : null;
|
|
492
|
-
};
|
|
493
464
|
var isSelected = function isSelected(item) {
|
|
494
465
|
return utils.ObjectUtils.findIndexInList(item, props.selection, props.dataKey) !== -1;
|
|
495
466
|
};
|
|
@@ -510,11 +481,13 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
510
481
|
};
|
|
511
482
|
React__namespace.useImperativeHandle(ref, function () {
|
|
512
483
|
return {
|
|
513
|
-
|
|
484
|
+
getElement: function getElement() {
|
|
485
|
+
return listElementRef.current;
|
|
486
|
+
}
|
|
514
487
|
};
|
|
515
488
|
});
|
|
516
489
|
var createHeader = function createHeader() {
|
|
517
|
-
var headerProps =
|
|
490
|
+
var headerProps = mergeProps({
|
|
518
491
|
className: cx('header')
|
|
519
492
|
}, getPTOptions('header'));
|
|
520
493
|
if (props.header) {
|
|
@@ -524,18 +497,26 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
524
497
|
};
|
|
525
498
|
var createItems = function createItems() {
|
|
526
499
|
if (props.list) {
|
|
527
|
-
return props.list.map(function (item) {
|
|
528
|
-
var key =
|
|
500
|
+
return props.list.map(function (item, index) {
|
|
501
|
+
var key = props.parentId + '_' + index;
|
|
529
502
|
var selected = isSelected(item);
|
|
530
503
|
return /*#__PURE__*/React__namespace.createElement(PickListItem, {
|
|
531
504
|
hostName: props.hostName,
|
|
532
505
|
key: key,
|
|
506
|
+
id: key,
|
|
507
|
+
index: index,
|
|
508
|
+
focused: key === props.focusedOptionId,
|
|
533
509
|
value: item,
|
|
534
510
|
template: props.itemTemplate,
|
|
535
511
|
selected: selected,
|
|
536
|
-
onClick: onItemClick,
|
|
537
|
-
onKeyDown: onItemKeyDown,
|
|
538
|
-
|
|
512
|
+
onClick: props.onItemClick,
|
|
513
|
+
onKeyDown: props.onItemKeyDown,
|
|
514
|
+
onMouseDown: function onMouseDown(event) {
|
|
515
|
+
return props.onOptionMouseDown(_objectSpread$1(_objectSpread$1({}, event), {}, {
|
|
516
|
+
index: index,
|
|
517
|
+
type: props.type
|
|
518
|
+
}));
|
|
519
|
+
},
|
|
539
520
|
ptm: ptm,
|
|
540
521
|
cx: cx
|
|
541
522
|
});
|
|
@@ -545,18 +526,18 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
545
526
|
};
|
|
546
527
|
var createFilter = function createFilter() {
|
|
547
528
|
var iconClassName = 'p-picklist-filter-icon';
|
|
548
|
-
var filterIconProps =
|
|
529
|
+
var filterIconProps = mergeProps({
|
|
549
530
|
className: cx('filterIcon')
|
|
550
531
|
}, getPTOptions('filterIcon'));
|
|
551
532
|
var icon = props.type === 'source' ? props.sourceFilterIcon || /*#__PURE__*/React__namespace.createElement(search.SearchIcon, filterIconProps) : props.targetFilterIcon || /*#__PURE__*/React__namespace.createElement(search.SearchIcon, filterIconProps);
|
|
552
|
-
var filterIcon = utils.IconUtils.getJSXIcon(icon, _objectSpread({}, filterIconProps), {
|
|
533
|
+
var filterIcon = utils.IconUtils.getJSXIcon(icon, _objectSpread$1({}, filterIconProps), {
|
|
553
534
|
props: props
|
|
554
535
|
});
|
|
555
536
|
if (props.showFilter) {
|
|
556
|
-
var filterProps =
|
|
537
|
+
var filterProps = mergeProps({
|
|
557
538
|
className: cx('filter')
|
|
558
539
|
}, getPTOptions('filter'));
|
|
559
|
-
var filterInputProps =
|
|
540
|
+
var filterInputProps = mergeProps({
|
|
560
541
|
type: 'text',
|
|
561
542
|
value: props.filterValue,
|
|
562
543
|
onChange: onFilter,
|
|
@@ -579,7 +560,7 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
579
560
|
};
|
|
580
561
|
content = utils.ObjectUtils.getJSXElement(props.filterTemplate, defaultContentOptions);
|
|
581
562
|
}
|
|
582
|
-
var filterContainerProps =
|
|
563
|
+
var filterContainerProps = mergeProps({
|
|
583
564
|
className: cx('filterContainer')
|
|
584
565
|
}, getPTOptions('filterContainer'));
|
|
585
566
|
return /*#__PURE__*/React__namespace.createElement("div", filterContainerProps, content);
|
|
@@ -588,10 +569,19 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
588
569
|
};
|
|
589
570
|
var createList = function createList() {
|
|
590
571
|
var items = createItems();
|
|
591
|
-
var listProps =
|
|
572
|
+
var listProps = mergeProps({
|
|
573
|
+
ref: listElementRef,
|
|
592
574
|
className: utils.classNames(props.listClassName, cx('list')),
|
|
593
575
|
role: 'listbox',
|
|
576
|
+
id: props.parentId + '_' + props.type + '_list',
|
|
594
577
|
'aria-multiselectable': true,
|
|
578
|
+
'aria-activedescendant': props.ariaActivedescendant,
|
|
579
|
+
tabIndex: props.list && props.list.length > 0 ? props.tabIndex : -1,
|
|
580
|
+
onKeyDown: props.onListKeyDown,
|
|
581
|
+
onFocus: function onFocus(event) {
|
|
582
|
+
props.onListFocus(event, props.type);
|
|
583
|
+
},
|
|
584
|
+
onBlur: props.onListBlur,
|
|
595
585
|
style: props.style
|
|
596
586
|
}, getPTOptions('list'));
|
|
597
587
|
return /*#__PURE__*/React__namespace.createElement("ul", listProps, items);
|
|
@@ -599,15 +589,244 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
599
589
|
var header = createHeader();
|
|
600
590
|
var filter = createFilter();
|
|
601
591
|
var list = createList();
|
|
602
|
-
var listWrapperProps =
|
|
603
|
-
className: utils.classNames(props.className, cx('listWrapper'))
|
|
604
|
-
ref: listElementRef
|
|
592
|
+
var listWrapperProps = mergeProps({
|
|
593
|
+
className: utils.classNames(props.className, cx('listWrapper'))
|
|
605
594
|
}, getPTOptions('listWrapper'));
|
|
606
595
|
return /*#__PURE__*/React__namespace.createElement("div", listWrapperProps, header, filter, list);
|
|
607
596
|
}));
|
|
608
597
|
PickListSubList.displayName = 'PickListSubList';
|
|
609
598
|
|
|
599
|
+
function _defineProperties(target, props) {
|
|
600
|
+
for (var i = 0; i < props.length; i++) {
|
|
601
|
+
var descriptor = props[i];
|
|
602
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
603
|
+
descriptor.configurable = true;
|
|
604
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
605
|
+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
609
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
610
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
611
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
612
|
+
writable: false
|
|
613
|
+
});
|
|
614
|
+
return Constructor;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
function _classCallCheck(instance, Constructor) {
|
|
618
|
+
if (!(instance instanceof Constructor)) {
|
|
619
|
+
throw new TypeError("Cannot call a class as a function");
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
var FilterMatchMode = Object.freeze({
|
|
624
|
+
STARTS_WITH: 'startsWith',
|
|
625
|
+
CONTAINS: 'contains',
|
|
626
|
+
NOT_CONTAINS: 'notContains',
|
|
627
|
+
ENDS_WITH: 'endsWith',
|
|
628
|
+
EQUALS: 'equals',
|
|
629
|
+
NOT_EQUALS: 'notEquals',
|
|
630
|
+
IN: 'in',
|
|
631
|
+
LESS_THAN: 'lt',
|
|
632
|
+
LESS_THAN_OR_EQUAL_TO: 'lte',
|
|
633
|
+
GREATER_THAN: 'gt',
|
|
634
|
+
GREATER_THAN_OR_EQUAL_TO: 'gte',
|
|
635
|
+
BETWEEN: 'between',
|
|
636
|
+
DATE_IS: 'dateIs',
|
|
637
|
+
DATE_IS_NOT: 'dateIsNot',
|
|
638
|
+
DATE_BEFORE: 'dateBefore',
|
|
639
|
+
DATE_AFTER: 'dateAfter',
|
|
640
|
+
CUSTOM: 'custom'
|
|
641
|
+
});
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* @deprecated please use PrimeReactContext
|
|
645
|
+
*/
|
|
646
|
+
var PrimeReact = /*#__PURE__*/_createClass(function PrimeReact() {
|
|
647
|
+
_classCallCheck(this, PrimeReact);
|
|
648
|
+
});
|
|
649
|
+
_defineProperty(PrimeReact, "ripple", false);
|
|
650
|
+
_defineProperty(PrimeReact, "inputStyle", 'outlined');
|
|
651
|
+
_defineProperty(PrimeReact, "locale", 'en');
|
|
652
|
+
_defineProperty(PrimeReact, "appendTo", null);
|
|
653
|
+
_defineProperty(PrimeReact, "cssTransition", true);
|
|
654
|
+
_defineProperty(PrimeReact, "autoZIndex", true);
|
|
655
|
+
_defineProperty(PrimeReact, "hideOverlaysOnDocumentScrolling", false);
|
|
656
|
+
_defineProperty(PrimeReact, "nonce", null);
|
|
657
|
+
_defineProperty(PrimeReact, "nullSortOrder", 1);
|
|
658
|
+
_defineProperty(PrimeReact, "zIndex", {
|
|
659
|
+
modal: 1100,
|
|
660
|
+
overlay: 1000,
|
|
661
|
+
menu: 1000,
|
|
662
|
+
tooltip: 1100,
|
|
663
|
+
toast: 1200
|
|
664
|
+
});
|
|
665
|
+
_defineProperty(PrimeReact, "pt", undefined);
|
|
666
|
+
_defineProperty(PrimeReact, "filterMatchModeOptions", {
|
|
667
|
+
text: [FilterMatchMode.STARTS_WITH, FilterMatchMode.CONTAINS, FilterMatchMode.NOT_CONTAINS, FilterMatchMode.ENDS_WITH, FilterMatchMode.EQUALS, FilterMatchMode.NOT_EQUALS],
|
|
668
|
+
numeric: [FilterMatchMode.EQUALS, FilterMatchMode.NOT_EQUALS, FilterMatchMode.LESS_THAN, FilterMatchMode.LESS_THAN_OR_EQUAL_TO, FilterMatchMode.GREATER_THAN, FilterMatchMode.GREATER_THAN_OR_EQUAL_TO],
|
|
669
|
+
date: [FilterMatchMode.DATE_IS, FilterMatchMode.DATE_IS_NOT, FilterMatchMode.DATE_BEFORE, FilterMatchMode.DATE_AFTER]
|
|
670
|
+
});
|
|
671
|
+
_defineProperty(PrimeReact, "changeTheme", function (currentTheme, newTheme, linkElementId, callback) {
|
|
672
|
+
var _linkElement$parentNo;
|
|
673
|
+
var linkElement = document.getElementById(linkElementId);
|
|
674
|
+
var cloneLinkElement = linkElement.cloneNode(true);
|
|
675
|
+
var newThemeUrl = linkElement.getAttribute('href').replace(currentTheme, newTheme);
|
|
676
|
+
cloneLinkElement.setAttribute('id', linkElementId + '-clone');
|
|
677
|
+
cloneLinkElement.setAttribute('href', newThemeUrl);
|
|
678
|
+
cloneLinkElement.addEventListener('load', function () {
|
|
679
|
+
linkElement.remove();
|
|
680
|
+
cloneLinkElement.setAttribute('id', linkElementId);
|
|
681
|
+
if (callback) {
|
|
682
|
+
callback();
|
|
683
|
+
}
|
|
684
|
+
});
|
|
685
|
+
(_linkElement$parentNo = linkElement.parentNode) === null || _linkElement$parentNo === void 0 || _linkElement$parentNo.insertBefore(cloneLinkElement, linkElement.nextSibling);
|
|
686
|
+
});
|
|
687
|
+
|
|
688
|
+
var locales = {
|
|
689
|
+
en: {
|
|
690
|
+
startsWith: 'Starts with',
|
|
691
|
+
contains: 'Contains',
|
|
692
|
+
notContains: 'Not contains',
|
|
693
|
+
endsWith: 'Ends with',
|
|
694
|
+
equals: 'Equals',
|
|
695
|
+
notEquals: 'Not equals',
|
|
696
|
+
noFilter: 'No Filter',
|
|
697
|
+
filter: 'Filter',
|
|
698
|
+
lt: 'Less than',
|
|
699
|
+
lte: 'Less than or equal to',
|
|
700
|
+
gt: 'Greater than',
|
|
701
|
+
gte: 'Greater than or equal to',
|
|
702
|
+
dateIs: 'Date is',
|
|
703
|
+
dateIsNot: 'Date is not',
|
|
704
|
+
dateBefore: 'Date is before',
|
|
705
|
+
dateAfter: 'Date is after',
|
|
706
|
+
custom: 'Custom',
|
|
707
|
+
clear: 'Clear',
|
|
708
|
+
close: 'Close',
|
|
709
|
+
apply: 'Apply',
|
|
710
|
+
matchAll: 'Match All',
|
|
711
|
+
matchAny: 'Match Any',
|
|
712
|
+
addRule: 'Add Rule',
|
|
713
|
+
removeRule: 'Remove Rule',
|
|
714
|
+
accept: 'Yes',
|
|
715
|
+
reject: 'No',
|
|
716
|
+
choose: 'Choose',
|
|
717
|
+
upload: 'Upload',
|
|
718
|
+
cancel: 'Cancel',
|
|
719
|
+
completed: 'Completed',
|
|
720
|
+
pending: 'Pending',
|
|
721
|
+
fileSizeTypes: ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],
|
|
722
|
+
dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
|
723
|
+
dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
724
|
+
dayNamesMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
|
725
|
+
monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
|
726
|
+
monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
727
|
+
today: 'Today',
|
|
728
|
+
weekHeader: 'Wk',
|
|
729
|
+
firstDayOfWeek: 0,
|
|
730
|
+
showMonthAfterYear: false,
|
|
731
|
+
dateFormat: 'mm/dd/yy',
|
|
732
|
+
weak: 'Weak',
|
|
733
|
+
medium: 'Medium',
|
|
734
|
+
strong: 'Strong',
|
|
735
|
+
passwordPrompt: 'Enter a password',
|
|
736
|
+
emptyFilterMessage: 'No available options',
|
|
737
|
+
emptyMessage: 'No results found',
|
|
738
|
+
aria: {
|
|
739
|
+
trueLabel: 'True',
|
|
740
|
+
falseLabel: 'False',
|
|
741
|
+
nullLabel: 'Not Selected',
|
|
742
|
+
star: '1 star',
|
|
743
|
+
stars: '{star} stars',
|
|
744
|
+
selectAll: 'All items selected',
|
|
745
|
+
unselectAll: 'All items unselected',
|
|
746
|
+
close: 'Close',
|
|
747
|
+
previous: 'Previous',
|
|
748
|
+
next: 'Next',
|
|
749
|
+
navigation: 'Navigation',
|
|
750
|
+
scrollTop: 'Scroll Top',
|
|
751
|
+
moveTop: 'Move Top',
|
|
752
|
+
moveUp: 'Move Up',
|
|
753
|
+
moveDown: 'Move Down',
|
|
754
|
+
moveBottom: 'Move Bottom',
|
|
755
|
+
moveToTarget: 'Move to Target',
|
|
756
|
+
moveToSource: 'Move to Source',
|
|
757
|
+
moveAllToTarget: 'Move All to Target',
|
|
758
|
+
moveAllToSource: 'Move All to Source',
|
|
759
|
+
pageLabel: 'Page {page}',
|
|
760
|
+
firstPageLabel: 'First Page',
|
|
761
|
+
lastPageLabel: 'Last Page',
|
|
762
|
+
nextPageLabel: 'Next Page',
|
|
763
|
+
previousPageLabel: 'Previous Page',
|
|
764
|
+
rowsPerPageLabel: 'Rows per page',
|
|
765
|
+
jumpToPageDropdownLabel: 'Jump to Page Dropdown',
|
|
766
|
+
jumpToPageInputLabel: 'Jump to Page Input',
|
|
767
|
+
selectRow: 'Row Selected',
|
|
768
|
+
unselectRow: 'Row Unselected',
|
|
769
|
+
expandRow: 'Row Expanded',
|
|
770
|
+
collapseRow: 'Row Collapsed',
|
|
771
|
+
showFilterMenu: 'Show Filter Menu',
|
|
772
|
+
hideFilterMenu: 'Hide Filter Menu',
|
|
773
|
+
filterOperator: 'Filter Operator',
|
|
774
|
+
filterConstraint: 'Filter Constraint',
|
|
775
|
+
editRow: 'Row Edit',
|
|
776
|
+
saveEdit: 'Save Edit',
|
|
777
|
+
cancelEdit: 'Cancel Edit',
|
|
778
|
+
listView: 'List View',
|
|
779
|
+
gridView: 'Grid View',
|
|
780
|
+
slide: 'Slide',
|
|
781
|
+
slideNumber: '{slideNumber}',
|
|
782
|
+
zoomImage: 'Zoom Image',
|
|
783
|
+
zoomIn: 'Zoom In',
|
|
784
|
+
zoomOut: 'Zoom Out',
|
|
785
|
+
rotateRight: 'Rotate Right',
|
|
786
|
+
rotateLeft: 'Rotate Left',
|
|
787
|
+
selectLabel: 'Select',
|
|
788
|
+
unselectLabel: 'Unselect',
|
|
789
|
+
expandLabel: 'Expand',
|
|
790
|
+
collapseLabel: 'Collapse'
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
};
|
|
794
|
+
|
|
795
|
+
/**
|
|
796
|
+
* Find an ARIA label in the locale by key. If options are passed it will replace all options:
|
|
797
|
+
* ```ts
|
|
798
|
+
* const ariaValue = "Page {page}, User {user}, Role {role}";
|
|
799
|
+
* const options = { page: 2, user: "John", role: "Admin" };
|
|
800
|
+
* const result = ariaLabel('yourLabel', { page: 2, user: "John", role: "Admin" })
|
|
801
|
+
* console.log(result); // Output: Page 2, User John, Role Admin
|
|
802
|
+
* ```
|
|
803
|
+
* @param {string} ariaKey key of the ARIA label to look up in locale.
|
|
804
|
+
* @param {any} options JSON options like { page: 2, user: "John", role: "Admin" }
|
|
805
|
+
* @returns the ARIA label with replaced values
|
|
806
|
+
*/
|
|
807
|
+
function ariaLabel(ariaKey, options) {
|
|
808
|
+
var _locale = PrimeReact.locale;
|
|
809
|
+
try {
|
|
810
|
+
var _ariaLabel = localeOptions(_locale)['aria'][ariaKey];
|
|
811
|
+
if (_ariaLabel) {
|
|
812
|
+
for (var key in options) {
|
|
813
|
+
if (options.hasOwnProperty(key)) {
|
|
814
|
+
_ariaLabel = _ariaLabel.replace("{".concat(key, "}"), options[key]);
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
return _ariaLabel;
|
|
819
|
+
} catch (error) {
|
|
820
|
+
throw new Error("The ".concat(ariaKey, " option is not found in the current locale('").concat(_locale, "')."));
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
function localeOptions(locale) {
|
|
824
|
+
var _locale = locale || PrimeReact.locale;
|
|
825
|
+
return locales[_locale];
|
|
826
|
+
}
|
|
827
|
+
|
|
610
828
|
var PickListTransferControls = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
829
|
+
var mergeProps = hooks.useMergeProps();
|
|
611
830
|
var viewChanged = hooks.useMatchMedia("(max-width: ".concat(props.breakpoint, ")"), props.breakpoint);
|
|
612
831
|
var ptm = props.ptm,
|
|
613
832
|
cx = props.cx,
|
|
@@ -724,7 +943,7 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
724
943
|
}
|
|
725
944
|
}
|
|
726
945
|
};
|
|
727
|
-
var buttonsProps =
|
|
946
|
+
var buttonsProps = mergeProps({
|
|
728
947
|
className: utils.classNames(props.className, cx('buttons'))
|
|
729
948
|
}, ptm('buttons', {
|
|
730
949
|
hostName: props.hostName
|
|
@@ -736,6 +955,7 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
736
955
|
onClick: moveRight,
|
|
737
956
|
pt: ptm('moveToTargetButton'),
|
|
738
957
|
unstyled: unstyled,
|
|
958
|
+
"aria-label": ariaLabel('moveToTarget'),
|
|
739
959
|
__parentMetadata: {
|
|
740
960
|
parent: props.metaData
|
|
741
961
|
}
|
|
@@ -746,6 +966,7 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
746
966
|
onClick: moveAllRight,
|
|
747
967
|
pt: ptm('moveAllToTargetButton'),
|
|
748
968
|
unstyled: unstyled,
|
|
969
|
+
"aria-label": ariaLabel('moveAllToTarget'),
|
|
749
970
|
__parentMetadata: {
|
|
750
971
|
parent: props.metaData
|
|
751
972
|
}
|
|
@@ -756,6 +977,7 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
756
977
|
onClick: moveLeft,
|
|
757
978
|
pt: ptm('moveToSourceButton'),
|
|
758
979
|
unstyled: unstyled,
|
|
980
|
+
"aria-label": ariaLabel('moveToSource'),
|
|
759
981
|
__parentMetadata: {
|
|
760
982
|
parent: props.metaData
|
|
761
983
|
}
|
|
@@ -766,6 +988,7 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
766
988
|
onClick: moveAllLeft,
|
|
767
989
|
pt: ptm('moveAllToSourceButton'),
|
|
768
990
|
unstyled: unstyled,
|
|
991
|
+
"aria-label": ariaLabel('moveAllToSource'),
|
|
769
992
|
__parentMetadata: {
|
|
770
993
|
parent: props.metaData
|
|
771
994
|
}
|
|
@@ -773,8 +996,11 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
773
996
|
});
|
|
774
997
|
PickListTransferControls.displayName = 'PickListTransferControls';
|
|
775
998
|
|
|
999
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1000
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
776
1001
|
var PickList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
777
|
-
var
|
|
1002
|
+
var mergeProps = hooks.useMergeProps();
|
|
1003
|
+
var context = React__namespace.useContext(PrimeReact$1.PrimeReactContext);
|
|
778
1004
|
var props = PickListBase.getProps(inProps, context);
|
|
779
1005
|
var _React$useState = React__namespace.useState([]),
|
|
780
1006
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -792,10 +1018,25 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
792
1018
|
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
793
1019
|
targetFilterValueState = _React$useState8[0],
|
|
794
1020
|
setTargetFilterValueState = _React$useState8[1];
|
|
795
|
-
var _React$useState9 = React__namespace.useState(
|
|
1021
|
+
var _React$useState9 = React__namespace.useState(props.id),
|
|
796
1022
|
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
797
1023
|
attributeSelectorState = _React$useState10[0],
|
|
798
1024
|
setAttributeSelectorState = _React$useState10[1];
|
|
1025
|
+
var _React$useState11 = React__namespace.useState(-1),
|
|
1026
|
+
_React$useState12 = _slicedToArray(_React$useState11, 2),
|
|
1027
|
+
focusedOptionIndex = _React$useState12[0],
|
|
1028
|
+
setFocusedOptionIndex = _React$useState12[1];
|
|
1029
|
+
var _React$useState13 = React__namespace.useState(null),
|
|
1030
|
+
_React$useState14 = _slicedToArray(_React$useState13, 2),
|
|
1031
|
+
focusedOptionId = _React$useState14[0],
|
|
1032
|
+
setFocusedOptionId = _React$useState14[1];
|
|
1033
|
+
var _React$useState15 = React__namespace.useState({
|
|
1034
|
+
source: false,
|
|
1035
|
+
target: false
|
|
1036
|
+
}),
|
|
1037
|
+
_React$useState16 = _slicedToArray(_React$useState15, 2),
|
|
1038
|
+
focused = _React$useState16[0],
|
|
1039
|
+
setFocused = _React$useState16[1];
|
|
799
1040
|
var metaData = {
|
|
800
1041
|
props: props,
|
|
801
1042
|
state: {
|
|
@@ -828,31 +1069,30 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
828
1069
|
var showTargetFilter = hasFilterBy && props.showTargetFilter;
|
|
829
1070
|
var onSourceReorder = function onSourceReorder(event) {
|
|
830
1071
|
handleChange(event, event.value, props.target);
|
|
831
|
-
reorderedListElementRef.current =
|
|
1072
|
+
reorderedListElementRef.current = getListElement('source');
|
|
832
1073
|
reorderDirection.current = event.direction;
|
|
833
1074
|
};
|
|
834
1075
|
var onTargetReorder = function onTargetReorder(event) {
|
|
835
1076
|
handleChange(event, props.source, event.value);
|
|
836
|
-
reorderedListElementRef.current =
|
|
1077
|
+
reorderedListElementRef.current = getListElement('target');
|
|
837
1078
|
reorderDirection.current = event.direction;
|
|
838
1079
|
};
|
|
839
1080
|
var handleScrollPosition = function handleScrollPosition(listElement, direction) {
|
|
840
1081
|
if (listElement) {
|
|
841
|
-
var list = utils.DomHandler.findSingle(listElement, '[data-pc-section="list"]');
|
|
842
1082
|
switch (direction) {
|
|
843
1083
|
case 'up':
|
|
844
|
-
scrollInView(
|
|
1084
|
+
scrollInView(listElement, -1);
|
|
845
1085
|
break;
|
|
846
1086
|
case 'top':
|
|
847
|
-
|
|
1087
|
+
listElement.scrollTop = 0;
|
|
848
1088
|
break;
|
|
849
1089
|
case 'down':
|
|
850
|
-
scrollInView(
|
|
1090
|
+
scrollInView(listElement, 1);
|
|
851
1091
|
break;
|
|
852
1092
|
case 'bottom':
|
|
853
1093
|
/* TODO: improve this code block */
|
|
854
1094
|
setTimeout(function () {
|
|
855
|
-
return
|
|
1095
|
+
return listElement.scrollTop = listElement.scrollHeight;
|
|
856
1096
|
}, 100);
|
|
857
1097
|
break;
|
|
858
1098
|
}
|
|
@@ -958,13 +1198,6 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
958
1198
|
setFilterState(value);
|
|
959
1199
|
}
|
|
960
1200
|
};
|
|
961
|
-
var getVisibleList = function getVisibleList(list, type) {
|
|
962
|
-
var _ref3 = type === 'source' ? [sourceFilteredValue, filterSource] : [targetFilteredValue, filterTarget],
|
|
963
|
-
_ref4 = _slicedToArray(_ref3, 2),
|
|
964
|
-
filteredValue = _ref4[0],
|
|
965
|
-
filterCallback = _ref4[1];
|
|
966
|
-
return hasFilterBy && utils.ObjectUtils.isNotEmpty(filteredValue) ? filterCallback(filteredValue) : list;
|
|
967
|
-
};
|
|
968
1201
|
var filterSource = function filterSource() {
|
|
969
1202
|
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
970
1203
|
var filteredValue = value.trim().toLocaleLowerCase(props.filterLocale);
|
|
@@ -977,11 +1210,273 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
977
1210
|
};
|
|
978
1211
|
var filter = function filter(list, filterValue) {
|
|
979
1212
|
var searchFields = hasFilterBy ? props.filterBy.split(',') : [];
|
|
980
|
-
return PrimeReact.FilterService.filter(list, searchFields, filterValue, props.filterMatchMode, props.filterLocale);
|
|
1213
|
+
return PrimeReact$1.FilterService.filter(list, searchFields, filterValue, props.filterMatchMode, props.filterLocale);
|
|
1214
|
+
};
|
|
1215
|
+
var getVisibleList = function getVisibleList(list, type) {
|
|
1216
|
+
var _ref3 = type === 'source' ? [sourceFilteredValue, filterSource] : [targetFilteredValue, filterTarget],
|
|
1217
|
+
_ref4 = _slicedToArray(_ref3, 2),
|
|
1218
|
+
filteredValue = _ref4[0],
|
|
1219
|
+
filterCallback = _ref4[1];
|
|
1220
|
+
return hasFilterBy && utils.ObjectUtils.isNotEmpty(filteredValue) ? filterCallback(filteredValue) : list;
|
|
1221
|
+
};
|
|
1222
|
+
var sourceList = getVisibleList(props.source, 'source');
|
|
1223
|
+
var targetList = getVisibleList(props.target, 'target');
|
|
1224
|
+
var _onListFocus = function onListFocus(event, type) {
|
|
1225
|
+
var listElement = getListElement(type);
|
|
1226
|
+
var selectedFirstItem = utils.DomHandler.findSingle(listElement, '[data-p-highlight="true"]') || utils.DomHandler.findSingle(listElement, '[data-pc-section="item"]');
|
|
1227
|
+
var itemList = listElement && listElement.children ? _toConsumableArray(listElement.children) : [];
|
|
1228
|
+
if (selectedFirstItem) {
|
|
1229
|
+
var findIndex = utils.ObjectUtils.findIndexInList(selectedFirstItem, itemList);
|
|
1230
|
+
setFocused(_objectSpread(_objectSpread({}, focused), {}, _defineProperty({}, type, true)));
|
|
1231
|
+
var index = focusedOptionIndex !== -1 ? focusedOptionIndex : selectedFirstItem ? findIndex : -1;
|
|
1232
|
+
changeFocusedOptionIndex(index, type);
|
|
1233
|
+
props.onFocus && props.onFocus(event);
|
|
1234
|
+
}
|
|
1235
|
+
};
|
|
1236
|
+
var _onListBlur = function onListBlur(event, type) {
|
|
1237
|
+
setFocused(_objectSpread(_objectSpread({}, focused), {}, _defineProperty({}, type, false)));
|
|
1238
|
+
setFocusedOptionIndex(-1);
|
|
1239
|
+
props.onBlur && props.onBlur(event);
|
|
1240
|
+
};
|
|
1241
|
+
var _onItemClick = function onItemClick(event, type) {
|
|
1242
|
+
var arrowKeyClick = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
1243
|
+
var originalEvent = event.originalEvent;
|
|
1244
|
+
var item = event.value;
|
|
1245
|
+
var selectedId = event.id;
|
|
1246
|
+
var isSource = type === 'source';
|
|
1247
|
+
var selection = _toConsumableArray(isSource ? sourceSelection : targetSelection);
|
|
1248
|
+
var index = utils.ObjectUtils.findIndexInList(item, selection, props.dataKey);
|
|
1249
|
+
var selected = index !== -1;
|
|
1250
|
+
var metaSelection = props.metaKeySelection;
|
|
1251
|
+
if (!arrowKeyClick) setFocusedOptionIndex(selectedId);
|
|
1252
|
+
if (metaSelection) {
|
|
1253
|
+
var metaKey = originalEvent.metaKey || originalEvent.ctrlKey || originalEvent.shiftKey;
|
|
1254
|
+
if (selected && metaKey) {
|
|
1255
|
+
selection.splice(index, 1);
|
|
1256
|
+
} else {
|
|
1257
|
+
if (!metaKey) {
|
|
1258
|
+
selection.length = 0;
|
|
1259
|
+
}
|
|
1260
|
+
selection.push(item);
|
|
1261
|
+
}
|
|
1262
|
+
} else {
|
|
1263
|
+
if (selected) selection.splice(index, 1);else selection.push(item);
|
|
1264
|
+
}
|
|
1265
|
+
if (isSource) {
|
|
1266
|
+
_onSelectionChange({
|
|
1267
|
+
originalEvent: originalEvent,
|
|
1268
|
+
value: selection
|
|
1269
|
+
}, 'sourceSelection', props.onSourceSelectionChange);
|
|
1270
|
+
} else {
|
|
1271
|
+
_onSelectionChange({
|
|
1272
|
+
originalEvent: originalEvent,
|
|
1273
|
+
value: selection
|
|
1274
|
+
}, 'targetSelection', props.onTargetSelectionChange);
|
|
1275
|
+
}
|
|
1276
|
+
};
|
|
1277
|
+
var _onOptionMouseDown = function onOptionMouseDown(_ref5) {
|
|
1278
|
+
var index = _ref5.index,
|
|
1279
|
+
type = _ref5.type;
|
|
1280
|
+
setFocused(_objectSpread(_objectSpread({}, focused), {}, _defineProperty({}, type, true)));
|
|
1281
|
+
setFocusedOptionIndex(index);
|
|
1282
|
+
};
|
|
1283
|
+
var _onListKeyDown = function onListKeyDown(event, type) {
|
|
1284
|
+
switch (event.code) {
|
|
1285
|
+
case 'ArrowDown':
|
|
1286
|
+
onArrowDownKey(event, type);
|
|
1287
|
+
break;
|
|
1288
|
+
case 'ArrowUp':
|
|
1289
|
+
onArrowUpKey(event, type);
|
|
1290
|
+
break;
|
|
1291
|
+
case 'Home':
|
|
1292
|
+
onHomeKey(event, type);
|
|
1293
|
+
break;
|
|
1294
|
+
case 'End':
|
|
1295
|
+
onEndKey(event, type);
|
|
1296
|
+
break;
|
|
1297
|
+
case 'Enter':
|
|
1298
|
+
case 'NumpadEnter':
|
|
1299
|
+
onEnterKey(event, type);
|
|
1300
|
+
break;
|
|
1301
|
+
case 'Space':
|
|
1302
|
+
onSpaceKey(event, type);
|
|
1303
|
+
break;
|
|
1304
|
+
case 'KeyA':
|
|
1305
|
+
if (event.ctrlKey) {
|
|
1306
|
+
var isSource = type === 'source';
|
|
1307
|
+
if (isSource) setSourceSelectionState(_toConsumableArray(sourceList));else setTargetSelectionState(_toConsumableArray(targetList));
|
|
1308
|
+
_onSelectionChange({
|
|
1309
|
+
originalEvent: event,
|
|
1310
|
+
value: _toConsumableArray(sourceList)
|
|
1311
|
+
}, isSource ? 'sourceSelection' : 'targetSelection', isSource ? props.onSourceSelectionChange : props.onTargetSelectionChange);
|
|
1312
|
+
event.preventDefault();
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
};
|
|
1316
|
+
var onArrowDownKey = function onArrowDownKey(event, type) {
|
|
1317
|
+
var optionIndex = findNextOptionIndex(focusedOptionIndex, type);
|
|
1318
|
+
var visibleList = getVisibleList(type === 'source' ? props.source : props.target, type);
|
|
1319
|
+
changeFocusedOptionIndex(optionIndex, type);
|
|
1320
|
+
if (visibleList && visibleList.length > 0 && event.shiftKey) {
|
|
1321
|
+
_onItemClick({
|
|
1322
|
+
originalEvent: event,
|
|
1323
|
+
value: visibleList[optionIndex]
|
|
1324
|
+
}, type, true);
|
|
1325
|
+
}
|
|
1326
|
+
event.preventDefault();
|
|
1327
|
+
};
|
|
1328
|
+
var onArrowUpKey = function onArrowUpKey(event, type) {
|
|
1329
|
+
var optionIndex = findPrevOptionIndex(focusedOptionIndex, type);
|
|
1330
|
+
var visibleList = getVisibleList(type === 'source' ? props.source : props.target, type);
|
|
1331
|
+
changeFocusedOptionIndex(optionIndex, type);
|
|
1332
|
+
if (visibleList && visibleList.length > 0 && event.shiftKey) {
|
|
1333
|
+
_onItemClick({
|
|
1334
|
+
originalEvent: event,
|
|
1335
|
+
value: visibleList[optionIndex]
|
|
1336
|
+
}, type, true);
|
|
1337
|
+
}
|
|
1338
|
+
event.preventDefault();
|
|
1339
|
+
};
|
|
1340
|
+
var onEnterKey = function onEnterKey(event, type) {
|
|
1341
|
+
var listElement = getListElement(type);
|
|
1342
|
+
var visibleList = getVisibleList(type === 'source' ? props.source : props.target, type);
|
|
1343
|
+
var items = utils.DomHandler.find(listElement, '[data-pc-section="item"]');
|
|
1344
|
+
var focusedItem = utils.DomHandler.findSingle(listElement, "[data-pc-section=\"item\"][id=".concat(focusedOptionIndex, "]"));
|
|
1345
|
+
var id = focusedItem && focusedItem.getAttribute('id');
|
|
1346
|
+
var matchedOptionIndex = _toConsumableArray(items).findIndex(function (item) {
|
|
1347
|
+
return item === focusedItem;
|
|
1348
|
+
});
|
|
1349
|
+
if (visibleList && visibleList.length > 0) {
|
|
1350
|
+
_onItemClick({
|
|
1351
|
+
originalEvent: event,
|
|
1352
|
+
value: visibleList[matchedOptionIndex],
|
|
1353
|
+
id: id
|
|
1354
|
+
}, type);
|
|
1355
|
+
}
|
|
1356
|
+
event.preventDefault();
|
|
1357
|
+
};
|
|
1358
|
+
var onSpaceKey = function onSpaceKey(event, type) {
|
|
1359
|
+
event.preventDefault();
|
|
1360
|
+
var isSource = type === 'source';
|
|
1361
|
+
var selection = isSource ? sourceSelectionState : targetSelectionState;
|
|
1362
|
+
if (event.shiftKey && selection && selection.length > 0) {
|
|
1363
|
+
var listItems = isSource ? sourceList : targetList;
|
|
1364
|
+
var listElement = getListElement(type);
|
|
1365
|
+
var items = utils.DomHandler.find(listElement, '[data-pc-section="item"]');
|
|
1366
|
+
var selectedItemIndex = utils.ObjectUtils.findIndexInList(selection[0], _toConsumableArray(listItems));
|
|
1367
|
+
var focusedItem = utils.DomHandler.findSingle(listElement, "[data-pc-section=\"item\"][id=".concat(focusedOptionIndex, "]"));
|
|
1368
|
+
var matchedOptionIndex = _toConsumableArray(items).findIndex(function (item) {
|
|
1369
|
+
return item === focusedItem;
|
|
1370
|
+
});
|
|
1371
|
+
_toConsumableArray(listItems).slice(Math.min(selectedItemIndex, matchedOptionIndex), Math.max(selectedItemIndex, matchedOptionIndex) + 1), _readOnlyError("selection");
|
|
1372
|
+
if (isSource) {
|
|
1373
|
+
_onSelectionChange({
|
|
1374
|
+
originalEvent: event,
|
|
1375
|
+
value: selection
|
|
1376
|
+
}, 'sourceSelection', props.onSourceSelectionChange);
|
|
1377
|
+
} else {
|
|
1378
|
+
_onSelectionChange({
|
|
1379
|
+
originalEvent: event,
|
|
1380
|
+
value: selection
|
|
1381
|
+
}, 'targetSelection', props.onTargetSelectionChange);
|
|
1382
|
+
}
|
|
1383
|
+
} else {
|
|
1384
|
+
onEnterKey(event, type);
|
|
1385
|
+
}
|
|
1386
|
+
};
|
|
1387
|
+
var onHomeKey = function onHomeKey(event, type) {
|
|
1388
|
+
if (event.ctrlKey && event.shiftKey) {
|
|
1389
|
+
var isSource = type === 'source';
|
|
1390
|
+
var listItems = isSource ? sourceList : targetList;
|
|
1391
|
+
var listElement = getListElement(type);
|
|
1392
|
+
var items = utils.DomHandler.find(listElement, '[data-pc-section="item"]');
|
|
1393
|
+
var focusedItem = utils.DomHandler.findSingle(listElement, "[data-pc-section=\"item\"][id=".concat(focusedOptionIndex, "]"));
|
|
1394
|
+
var matchedOptionIndex = _toConsumableArray(items).findIndex(function (item) {
|
|
1395
|
+
return item === focusedItem;
|
|
1396
|
+
});
|
|
1397
|
+
var selection = _toConsumableArray(listItems).slice(0, matchedOptionIndex + 1);
|
|
1398
|
+
if (isSource) {
|
|
1399
|
+
_onSelectionChange({
|
|
1400
|
+
originalEvent: event,
|
|
1401
|
+
value: selection
|
|
1402
|
+
}, 'sourceSelection', props.onSourceSelectionChange);
|
|
1403
|
+
} else {
|
|
1404
|
+
_onSelectionChange({
|
|
1405
|
+
originalEvent: event,
|
|
1406
|
+
value: selection
|
|
1407
|
+
}, 'targetSelection', props.onTargetSelectionChange);
|
|
1408
|
+
}
|
|
1409
|
+
} else {
|
|
1410
|
+
changeFocusedOptionIndex(0, type);
|
|
1411
|
+
}
|
|
1412
|
+
event.preventDefault();
|
|
1413
|
+
};
|
|
1414
|
+
var onEndKey = function onEndKey(event, type) {
|
|
1415
|
+
var listElement = getListElement(type);
|
|
1416
|
+
var items = utils.DomHandler.find(listElement, '[data-pc-section="item"]');
|
|
1417
|
+
if (event.ctrlKey && event.shiftKey) {
|
|
1418
|
+
var isSource = type === 'source';
|
|
1419
|
+
var listItems = isSource ? sourceList : targetList;
|
|
1420
|
+
var focusedItem = utils.DomHandler.findSingle(listElement, "[data-pc-section=\"item\"][id=".concat(focusedOptionIndex, "]"));
|
|
1421
|
+
var matchedOptionIndex = _toConsumableArray(items).findIndex(function (item) {
|
|
1422
|
+
return item === focusedItem;
|
|
1423
|
+
});
|
|
1424
|
+
var selection = _toConsumableArray(listItems).slice(matchedOptionIndex, items.length);
|
|
1425
|
+
if (isSource) {
|
|
1426
|
+
_onSelectionChange({
|
|
1427
|
+
originalEvent: event,
|
|
1428
|
+
value: selection
|
|
1429
|
+
}, 'sourceSelection', props.onSourceSelectionChange);
|
|
1430
|
+
} else {
|
|
1431
|
+
_onSelectionChange({
|
|
1432
|
+
originalEvent: event,
|
|
1433
|
+
value: selection
|
|
1434
|
+
}, 'targetSelection', props.onTargetSelectionChange);
|
|
1435
|
+
}
|
|
1436
|
+
} else {
|
|
1437
|
+
changeFocusedOptionIndex(items.length - 1, type);
|
|
1438
|
+
}
|
|
1439
|
+
event.preventDefault();
|
|
1440
|
+
};
|
|
1441
|
+
var findNextOptionIndex = function findNextOptionIndex(index, type) {
|
|
1442
|
+
var listElement = getListElement(type);
|
|
1443
|
+
var items = utils.DomHandler.find(listElement, '[data-pc-section="item"]');
|
|
1444
|
+
var matchedOptionIndex = _toConsumableArray(items).findIndex(function (link) {
|
|
1445
|
+
return link.id === index;
|
|
1446
|
+
});
|
|
1447
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex + 1 : 0;
|
|
1448
|
+
};
|
|
1449
|
+
var findPrevOptionIndex = function findPrevOptionIndex(index, type) {
|
|
1450
|
+
var listElement = getListElement(type);
|
|
1451
|
+
var items = utils.DomHandler.find(listElement, '[data-pc-section="item"]');
|
|
1452
|
+
var matchedOptionIndex = _toConsumableArray(items).findIndex(function (link) {
|
|
1453
|
+
return link.id === index;
|
|
1454
|
+
});
|
|
1455
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex - 1 : 0;
|
|
1456
|
+
};
|
|
1457
|
+
var changeFocusedOptionIndex = function changeFocusedOptionIndex(index, type) {
|
|
1458
|
+
var listElement = getListElement(type);
|
|
1459
|
+
var items = utils.DomHandler.find(listElement, '[data-pc-section="item"]');
|
|
1460
|
+
var order = index >= items.length ? items.length - 1 : index < 0 ? 0 : index;
|
|
1461
|
+
setFocusedOptionIndex(items[order].getAttribute('id'));
|
|
1462
|
+
scrollInViewWithFocus(items[order].getAttribute('id'), type);
|
|
1463
|
+
};
|
|
1464
|
+
var scrollInViewWithFocus = function scrollInViewWithFocus(id, type) {
|
|
1465
|
+
var listElement = getListElement(type);
|
|
1466
|
+
var element = utils.DomHandler.findSingle(listElement, "[data-pc-section=\"item\"][id=\"".concat(id, "\"]"));
|
|
1467
|
+
if (element) {
|
|
1468
|
+
element.scrollIntoView && element.scrollIntoView({
|
|
1469
|
+
block: 'nearest',
|
|
1470
|
+
inline: 'start'
|
|
1471
|
+
});
|
|
1472
|
+
}
|
|
1473
|
+
};
|
|
1474
|
+
var getListElement = function getListElement(type) {
|
|
1475
|
+
return type === 'source' ? sourceListElementRef.current.getElement() : targetListElementRef.current.getElement();
|
|
981
1476
|
};
|
|
982
1477
|
var createStyle = function createStyle() {
|
|
983
1478
|
if (!styleElementRef.current) {
|
|
984
|
-
styleElementRef.current = utils.DomHandler.createInlineStyle(context && context.nonce || PrimeReact__default["default"].nonce);
|
|
1479
|
+
styleElementRef.current = utils.DomHandler.createInlineStyle(context && context.nonce || PrimeReact__default["default"].nonce, context && context.styleContainer);
|
|
985
1480
|
var innerHTML = "\n@media screen and (max-width: ".concat(props.breakpoint, ") {\n .p-picklist[").concat(attributeSelectorState, "] {\n flex-direction: column;\n }\n\n .p-picklist[").concat(attributeSelectorState, "] .p-picklist-buttons {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-picklist[").concat(attributeSelectorState, "] .p-picklist-buttons .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-picklist[").concat(attributeSelectorState, "] .p-picklist-buttons .p-button:last-child {\n margin-right: 0;\n }\n}\n");
|
|
986
1481
|
styleElementRef.current.innerHTML = innerHTML;
|
|
987
1482
|
}
|
|
@@ -997,9 +1492,6 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
997
1492
|
}
|
|
998
1493
|
};
|
|
999
1494
|
});
|
|
1000
|
-
hooks.useMountEffect(function () {
|
|
1001
|
-
!attributeSelectorState && setAttributeSelectorState(utils.UniqueComponentId());
|
|
1002
|
-
});
|
|
1003
1495
|
hooks.useUpdateEffect(function () {
|
|
1004
1496
|
if (attributeSelectorState) {
|
|
1005
1497
|
elementRef.current.setAttribute(attributeSelectorState, '');
|
|
@@ -1010,18 +1502,23 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
1010
1502
|
};
|
|
1011
1503
|
}, [attributeSelectorState, props.breakpoint]);
|
|
1012
1504
|
hooks.useUpdateEffect(function () {
|
|
1505
|
+
if (!props.id && !attributeSelectorState) {
|
|
1506
|
+
setAttributeSelectorState(utils.UniqueComponentId());
|
|
1507
|
+
}
|
|
1013
1508
|
if (reorderedListElementRef.current) {
|
|
1014
1509
|
handleScrollPosition(reorderedListElementRef.current, reorderDirection.current);
|
|
1015
1510
|
reorderedListElementRef.current = null;
|
|
1016
1511
|
reorderDirection.current = null;
|
|
1017
1512
|
}
|
|
1018
1513
|
});
|
|
1514
|
+
hooks.useUpdateEffect(function () {
|
|
1515
|
+
var _focusedOptionId = focusedOptionIndex !== -1 ? focusedOptionIndex : null;
|
|
1516
|
+
setFocusedOptionId(_focusedOptionId);
|
|
1517
|
+
}, [focusedOptionIndex]);
|
|
1019
1518
|
var sourceItemTemplate = props.sourceItemTemplate ? props.sourceItemTemplate : props.itemTemplate;
|
|
1020
1519
|
var targetItemTemplate = props.targetItemTemplate ? props.targetItemTemplate : props.itemTemplate;
|
|
1021
|
-
var
|
|
1022
|
-
|
|
1023
|
-
var rootProps = utils.mergeProps({
|
|
1024
|
-
id: props.id,
|
|
1520
|
+
var rootProps = mergeProps({
|
|
1521
|
+
id: attributeSelectorState,
|
|
1025
1522
|
ref: elementRef,
|
|
1026
1523
|
className: utils.classNames(props.className, cx('root')),
|
|
1027
1524
|
style: props.style
|
|
@@ -1046,10 +1543,28 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
1046
1543
|
ref: sourceListElementRef,
|
|
1047
1544
|
type: "source",
|
|
1048
1545
|
list: sourceList,
|
|
1546
|
+
parentId: attributeSelectorState,
|
|
1049
1547
|
selection: sourceSelection,
|
|
1050
1548
|
onSelectionChange: function onSelectionChange(e) {
|
|
1051
1549
|
return _onSelectionChange(e, 'sourceSelection', props.onSourceSelectionChange);
|
|
1052
1550
|
},
|
|
1551
|
+
onListKeyDown: function onListKeyDown(e) {
|
|
1552
|
+
return _onListKeyDown(e, 'source');
|
|
1553
|
+
},
|
|
1554
|
+
onListFocus: function onListFocus(e) {
|
|
1555
|
+
return _onListFocus(e, 'source');
|
|
1556
|
+
},
|
|
1557
|
+
onListBlur: function onListBlur(e) {
|
|
1558
|
+
return _onListBlur(e, 'source');
|
|
1559
|
+
},
|
|
1560
|
+
onOptionMouseDown: function onOptionMouseDown(index) {
|
|
1561
|
+
return _onOptionMouseDown(index);
|
|
1562
|
+
},
|
|
1563
|
+
onItemClick: function onItemClick(e) {
|
|
1564
|
+
return _onItemClick(e, 'source');
|
|
1565
|
+
},
|
|
1566
|
+
focusedOptionId: focused['source'] ? focusedOptionId : null,
|
|
1567
|
+
ariaActivedescendant: focused['source'] ? focusedOptionId : null,
|
|
1053
1568
|
itemTemplate: sourceItemTemplate,
|
|
1054
1569
|
header: props.sourceHeader,
|
|
1055
1570
|
style: props.sourceStyle,
|
|
@@ -1091,9 +1606,27 @@ this.primereact.picklist = (function (exports, React, PrimeReact, componentbase,
|
|
|
1091
1606
|
type: "target",
|
|
1092
1607
|
list: targetList,
|
|
1093
1608
|
selection: targetSelection,
|
|
1609
|
+
parentId: attributeSelectorState,
|
|
1094
1610
|
onSelectionChange: function onSelectionChange(e) {
|
|
1095
1611
|
return _onSelectionChange(e, 'targetSelection', props.onTargetSelectionChange);
|
|
1096
1612
|
},
|
|
1613
|
+
onListKeyDown: function onListKeyDown(e) {
|
|
1614
|
+
return _onListKeyDown(e, 'target');
|
|
1615
|
+
},
|
|
1616
|
+
onListFocus: function onListFocus(e) {
|
|
1617
|
+
return _onListFocus(e, 'target');
|
|
1618
|
+
},
|
|
1619
|
+
onListBlur: function onListBlur(e) {
|
|
1620
|
+
return _onListBlur(e, 'target');
|
|
1621
|
+
},
|
|
1622
|
+
onOptionMouseDown: function onOptionMouseDown(index) {
|
|
1623
|
+
return _onOptionMouseDown(index);
|
|
1624
|
+
},
|
|
1625
|
+
onItemClick: function onItemClick(e) {
|
|
1626
|
+
return _onItemClick(e, 'target');
|
|
1627
|
+
},
|
|
1628
|
+
focusedOptionId: focused['target'] ? focusedOptionId : null,
|
|
1629
|
+
ariaActivedescendant: focused['target'] ? focusedOptionId : null,
|
|
1097
1630
|
itemTemplate: targetItemTemplate,
|
|
1098
1631
|
header: props.targetHeader,
|
|
1099
1632
|
style: props.targetStyle,
|