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.cjs.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var PrimeReact = require('primereact/api');
|
|
7
|
+
var PrimeReact$1 = require('primereact/api');
|
|
8
8
|
var componentbase = require('primereact/componentbase');
|
|
9
9
|
var hooks = require('primereact/hooks');
|
|
10
10
|
var utils = require('primereact/utils');
|
|
@@ -41,7 +41,83 @@ function _interopNamespace(e) {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
44
|
-
var PrimeReact__default = /*#__PURE__*/_interopDefaultLegacy(PrimeReact);
|
|
44
|
+
var PrimeReact__default = /*#__PURE__*/_interopDefaultLegacy(PrimeReact$1);
|
|
45
|
+
|
|
46
|
+
function _readOnlyError(name) {
|
|
47
|
+
throw new TypeError("\"" + name + "\" is read-only");
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function _typeof(o) {
|
|
51
|
+
"@babel/helpers - typeof";
|
|
52
|
+
|
|
53
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
54
|
+
return typeof o;
|
|
55
|
+
} : function (o) {
|
|
56
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
57
|
+
}, _typeof(o);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function _toPrimitive(input, hint) {
|
|
61
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
62
|
+
var prim = input[Symbol.toPrimitive];
|
|
63
|
+
if (prim !== undefined) {
|
|
64
|
+
var res = prim.call(input, hint || "default");
|
|
65
|
+
if (_typeof(res) !== "object") return res;
|
|
66
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
67
|
+
}
|
|
68
|
+
return (hint === "string" ? String : Number)(input);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function _toPropertyKey(arg) {
|
|
72
|
+
var key = _toPrimitive(arg, "string");
|
|
73
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function _defineProperty(obj, key, value) {
|
|
77
|
+
key = _toPropertyKey(key);
|
|
78
|
+
if (key in obj) {
|
|
79
|
+
Object.defineProperty(obj, key, {
|
|
80
|
+
value: value,
|
|
81
|
+
enumerable: true,
|
|
82
|
+
configurable: true,
|
|
83
|
+
writable: true
|
|
84
|
+
});
|
|
85
|
+
} else {
|
|
86
|
+
obj[key] = value;
|
|
87
|
+
}
|
|
88
|
+
return obj;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function _arrayLikeToArray(arr, len) {
|
|
92
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
93
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
94
|
+
return arr2;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function _arrayWithoutHoles(arr) {
|
|
98
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function _iterableToArray(iter) {
|
|
102
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
106
|
+
if (!o) return;
|
|
107
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
108
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
109
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
110
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
111
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function _nonIterableSpread() {
|
|
115
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function _toConsumableArray(arr) {
|
|
119
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
120
|
+
}
|
|
45
121
|
|
|
46
122
|
function _arrayWithHoles(arr) {
|
|
47
123
|
if (Array.isArray(arr)) return arr;
|
|
@@ -75,21 +151,6 @@ function _iterableToArrayLimit(r, l) {
|
|
|
75
151
|
}
|
|
76
152
|
}
|
|
77
153
|
|
|
78
|
-
function _arrayLikeToArray(arr, len) {
|
|
79
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
80
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
81
|
-
return arr2;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
85
|
-
if (!o) return;
|
|
86
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
87
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
88
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
89
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
90
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
154
|
function _nonIterableRest() {
|
|
94
155
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
95
156
|
}
|
|
@@ -108,20 +169,22 @@ var classes = {
|
|
|
108
169
|
filterContainer: 'p-picklist-filter-container',
|
|
109
170
|
list: 'p-picklist-list',
|
|
110
171
|
listWrapper: 'p-picklist-list-wrapper',
|
|
111
|
-
listSourceWrapper: 'p-picklist-source-wrapper',
|
|
112
|
-
listTargetWrapper: 'p-picklist-target-wrapper',
|
|
113
|
-
listSource: 'p-picklist-source',
|
|
114
|
-
listTarget: 'p-picklist-target',
|
|
172
|
+
listSourceWrapper: 'p-picklist-list-wrapper p-picklist-source-wrapper',
|
|
173
|
+
listTargetWrapper: 'p-picklist-list-wrapper p-picklist-target-wrapper',
|
|
174
|
+
listSource: 'p-picklist-list p-picklist-source',
|
|
175
|
+
listTarget: 'p-picklist-list p-picklist-target',
|
|
115
176
|
item: function item(_ref) {
|
|
116
|
-
var
|
|
177
|
+
var selected = _ref.selected,
|
|
178
|
+
focused = _ref.focused;
|
|
117
179
|
return utils.classNames('p-picklist-item', {
|
|
118
|
-
'p-highlight':
|
|
180
|
+
'p-highlight': selected,
|
|
181
|
+
'p-focus': focused
|
|
119
182
|
});
|
|
120
183
|
},
|
|
121
184
|
sourceControls: 'p-picklist-source-controls p-picklist-buttons',
|
|
122
185
|
targetControls: 'p-picklist-target-controls p-picklist-buttons'
|
|
123
186
|
};
|
|
124
|
-
var styles = "\n@layer primereact {\n .p-picklist {\n display: flex;\n }\n
|
|
187
|
+
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";
|
|
125
188
|
var PickListBase = componentbase.ComponentBase.extend({
|
|
126
189
|
defaultProps: {
|
|
127
190
|
__TYPE: 'PickList',
|
|
@@ -139,6 +202,8 @@ var PickListBase = componentbase.ComponentBase.extend({
|
|
|
139
202
|
showSourceControls: true,
|
|
140
203
|
showTargetControls: true,
|
|
141
204
|
metaKeySelection: true,
|
|
205
|
+
onFocus: null,
|
|
206
|
+
onBlur: null,
|
|
142
207
|
filter: false,
|
|
143
208
|
filterBy: null,
|
|
144
209
|
filterMatchMode: 'contains',
|
|
@@ -184,23 +249,8 @@ var PickListBase = componentbase.ComponentBase.extend({
|
|
|
184
249
|
}
|
|
185
250
|
});
|
|
186
251
|
|
|
187
|
-
function _arrayWithoutHoles(arr) {
|
|
188
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
function _iterableToArray(iter) {
|
|
192
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
function _nonIterableSpread() {
|
|
196
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
function _toConsumableArray(arr) {
|
|
200
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
201
|
-
}
|
|
202
|
-
|
|
203
252
|
var PickListControls = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
253
|
+
var mergeProps = hooks.useMergeProps();
|
|
204
254
|
var ptm = props.ptm,
|
|
205
255
|
cx = props.cx,
|
|
206
256
|
unstyled = props.unstyled;
|
|
@@ -305,7 +355,7 @@ var PickListControls = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
305
355
|
}
|
|
306
356
|
}
|
|
307
357
|
};
|
|
308
|
-
var controlsProps =
|
|
358
|
+
var controlsProps = mergeProps({
|
|
309
359
|
className: utils.classNames(props.className, cx('controls'))
|
|
310
360
|
}, ptm('controls', {
|
|
311
361
|
hostName: props.hostName
|
|
@@ -317,6 +367,7 @@ var PickListControls = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
317
367
|
onClick: moveUp,
|
|
318
368
|
pt: ptm('moveUpButton'),
|
|
319
369
|
unstyled: unstyled,
|
|
370
|
+
"aria-label": PrimeReact$1.ariaLabel('moveUp'),
|
|
320
371
|
__parentMetadata: {
|
|
321
372
|
parent: props.metaData
|
|
322
373
|
}
|
|
@@ -327,6 +378,7 @@ var PickListControls = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
327
378
|
onClick: moveTop,
|
|
328
379
|
pt: ptm('moveTopButton'),
|
|
329
380
|
unstyled: unstyled,
|
|
381
|
+
"aria-label": PrimeReact$1.ariaLabel('moveTop'),
|
|
330
382
|
__parentMetadata: {
|
|
331
383
|
parent: props.metaData
|
|
332
384
|
}
|
|
@@ -337,6 +389,7 @@ var PickListControls = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
337
389
|
onClick: moveDown,
|
|
338
390
|
pt: ptm('moveDownButton'),
|
|
339
391
|
unstyled: unstyled,
|
|
392
|
+
"aria-label": PrimeReact$1.ariaLabel('moveDown'),
|
|
340
393
|
__parentMetadata: {
|
|
341
394
|
parent: props.metaData
|
|
342
395
|
}
|
|
@@ -347,6 +400,7 @@ var PickListControls = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
347
400
|
onClick: moveBottom,
|
|
348
401
|
pt: ptm('moveBottomButton'),
|
|
349
402
|
unstyled: unstyled,
|
|
403
|
+
"aria-label": PrimeReact$1.ariaLabel('moveBottom'),
|
|
350
404
|
__parentMetadata: {
|
|
351
405
|
parent: props.metaData
|
|
352
406
|
}
|
|
@@ -354,48 +408,8 @@ var PickListControls = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
354
408
|
});
|
|
355
409
|
PickListControls.displayName = 'PickListControls';
|
|
356
410
|
|
|
357
|
-
function _typeof(o) {
|
|
358
|
-
"@babel/helpers - typeof";
|
|
359
|
-
|
|
360
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
361
|
-
return typeof o;
|
|
362
|
-
} : function (o) {
|
|
363
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
364
|
-
}, _typeof(o);
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
function _toPrimitive(input, hint) {
|
|
368
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
369
|
-
var prim = input[Symbol.toPrimitive];
|
|
370
|
-
if (prim !== undefined) {
|
|
371
|
-
var res = prim.call(input, hint || "default");
|
|
372
|
-
if (_typeof(res) !== "object") return res;
|
|
373
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
374
|
-
}
|
|
375
|
-
return (hint === "string" ? String : Number)(input);
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
function _toPropertyKey(arg) {
|
|
379
|
-
var key = _toPrimitive(arg, "string");
|
|
380
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
function _defineProperty(obj, key, value) {
|
|
384
|
-
key = _toPropertyKey(key);
|
|
385
|
-
if (key in obj) {
|
|
386
|
-
Object.defineProperty(obj, key, {
|
|
387
|
-
value: value,
|
|
388
|
-
enumerable: true,
|
|
389
|
-
configurable: true,
|
|
390
|
-
writable: true
|
|
391
|
-
});
|
|
392
|
-
} else {
|
|
393
|
-
obj[key] = value;
|
|
394
|
-
}
|
|
395
|
-
return obj;
|
|
396
|
-
}
|
|
397
|
-
|
|
398
411
|
var PickListItem = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
412
|
+
var mergeProps = hooks.useMergeProps();
|
|
399
413
|
var ptm = props.ptm,
|
|
400
414
|
cx = props.cx;
|
|
401
415
|
var getPTOptions = function getPTOptions(key) {
|
|
@@ -410,7 +424,8 @@ var PickListItem = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
410
424
|
if (props.onClick) {
|
|
411
425
|
props.onClick({
|
|
412
426
|
originalEvent: event,
|
|
413
|
-
value: props.value
|
|
427
|
+
value: props.value,
|
|
428
|
+
id: props.id
|
|
414
429
|
});
|
|
415
430
|
}
|
|
416
431
|
};
|
|
@@ -422,92 +437,48 @@ var PickListItem = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
422
437
|
});
|
|
423
438
|
}
|
|
424
439
|
};
|
|
440
|
+
var onMouseDown = function onMouseDown(event) {
|
|
441
|
+
if (props.onMouseDown) {
|
|
442
|
+
props.onMouseDown(event);
|
|
443
|
+
}
|
|
444
|
+
};
|
|
445
|
+
var onFocus = function onFocus(event) {
|
|
446
|
+
if (props.onFocus) {
|
|
447
|
+
props.onFocus(event);
|
|
448
|
+
}
|
|
449
|
+
};
|
|
425
450
|
var content = props.template ? props.template(props.value) : props.value;
|
|
426
|
-
var itemProps =
|
|
451
|
+
var itemProps = mergeProps({
|
|
427
452
|
className: utils.classNames(props.className, cx('item', {
|
|
428
|
-
|
|
453
|
+
selected: props.selected,
|
|
454
|
+
focused: props.focused
|
|
429
455
|
})),
|
|
456
|
+
id: props.id,
|
|
430
457
|
onClick: onClick,
|
|
431
458
|
onKeyDown: onKeyDown,
|
|
432
|
-
|
|
459
|
+
onFocus: onFocus,
|
|
460
|
+
onMouseDown: onMouseDown,
|
|
433
461
|
role: 'option',
|
|
434
|
-
'aria-selected': props.selected
|
|
462
|
+
'aria-selected': props.selected,
|
|
463
|
+
'data-p-highlight': props.selected,
|
|
464
|
+
'data-p-focused': props.focused
|
|
435
465
|
}, getPTOptions('item'));
|
|
436
466
|
return /*#__PURE__*/React__namespace.createElement("li", itemProps, content, /*#__PURE__*/React__namespace.createElement(ripple.Ripple, null));
|
|
437
467
|
});
|
|
438
468
|
PickListItem.displayName = 'PickListItem';
|
|
439
469
|
|
|
440
|
-
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; }
|
|
441
|
-
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; }
|
|
470
|
+
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; }
|
|
471
|
+
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; }
|
|
442
472
|
var PickListSubList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
|
|
473
|
+
var mergeProps = hooks.useMergeProps();
|
|
443
474
|
var listElementRef = React__namespace.useRef(null);
|
|
444
475
|
var ptm = props.ptm,
|
|
445
476
|
cx = props.cx;
|
|
446
477
|
var getPTOptions = function getPTOptions(key, options) {
|
|
447
|
-
return ptm(key, _objectSpread({
|
|
478
|
+
return ptm(key, _objectSpread$1({
|
|
448
479
|
hostName: props.hostName
|
|
449
480
|
}, options));
|
|
450
481
|
};
|
|
451
|
-
var onItemClick = function onItemClick(event) {
|
|
452
|
-
var originalEvent = event.originalEvent;
|
|
453
|
-
var item = event.value;
|
|
454
|
-
var selection = _toConsumableArray(props.selection);
|
|
455
|
-
var index = utils.ObjectUtils.findIndexInList(item, selection, props.dataKey);
|
|
456
|
-
var selected = index !== -1;
|
|
457
|
-
var metaSelection = props.metaKeySelection;
|
|
458
|
-
if (metaSelection) {
|
|
459
|
-
var metaKey = originalEvent.metaKey || originalEvent.ctrlKey;
|
|
460
|
-
if (selected && metaKey) {
|
|
461
|
-
selection.splice(index, 1);
|
|
462
|
-
} else {
|
|
463
|
-
if (!metaKey) {
|
|
464
|
-
selection.length = 0;
|
|
465
|
-
}
|
|
466
|
-
selection.push(item);
|
|
467
|
-
}
|
|
468
|
-
} else {
|
|
469
|
-
if (selected) selection.splice(index, 1);else selection.push(item);
|
|
470
|
-
}
|
|
471
|
-
if (props.onSelectionChange) {
|
|
472
|
-
props.onSelectionChange({
|
|
473
|
-
event: originalEvent,
|
|
474
|
-
value: selection
|
|
475
|
-
});
|
|
476
|
-
}
|
|
477
|
-
};
|
|
478
|
-
var onItemKeyDown = function onItemKeyDown(event) {
|
|
479
|
-
var originalEvent = event.originalEvent;
|
|
480
|
-
var listItem = originalEvent.currentTarget;
|
|
481
|
-
switch (originalEvent.which) {
|
|
482
|
-
//down
|
|
483
|
-
case 40:
|
|
484
|
-
var nextItem = findNextItem(listItem);
|
|
485
|
-
nextItem && nextItem.focus();
|
|
486
|
-
originalEvent.preventDefault();
|
|
487
|
-
break;
|
|
488
|
-
|
|
489
|
-
//up
|
|
490
|
-
case 38:
|
|
491
|
-
var prevItem = findPrevItem(listItem);
|
|
492
|
-
prevItem && prevItem.focus();
|
|
493
|
-
originalEvent.preventDefault();
|
|
494
|
-
break;
|
|
495
|
-
|
|
496
|
-
//enter
|
|
497
|
-
case 13:
|
|
498
|
-
onItemClick(event);
|
|
499
|
-
originalEvent.preventDefault();
|
|
500
|
-
break;
|
|
501
|
-
}
|
|
502
|
-
};
|
|
503
|
-
var findNextItem = function findNextItem(item) {
|
|
504
|
-
var nextItem = item.nextElementSibling;
|
|
505
|
-
return nextItem ? !utils.DomHandler.hasClass(nextItem, 'p-picklist-item') ? findNextItem(nextItem) : nextItem : null;
|
|
506
|
-
};
|
|
507
|
-
var findPrevItem = function findPrevItem(item) {
|
|
508
|
-
var prevItem = item.previousElementSibling;
|
|
509
|
-
return prevItem ? !utils.DomHandler.hasClass(prevItem, 'p-picklist-item') ? findPrevItem(prevItem) : prevItem : null;
|
|
510
|
-
};
|
|
511
482
|
var isSelected = function isSelected(item) {
|
|
512
483
|
return utils.ObjectUtils.findIndexInList(item, props.selection, props.dataKey) !== -1;
|
|
513
484
|
};
|
|
@@ -528,11 +499,13 @@ var PickListSubList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
|
|
|
528
499
|
};
|
|
529
500
|
React__namespace.useImperativeHandle(ref, function () {
|
|
530
501
|
return {
|
|
531
|
-
|
|
502
|
+
getElement: function getElement() {
|
|
503
|
+
return listElementRef.current;
|
|
504
|
+
}
|
|
532
505
|
};
|
|
533
506
|
});
|
|
534
507
|
var createHeader = function createHeader() {
|
|
535
|
-
var headerProps =
|
|
508
|
+
var headerProps = mergeProps({
|
|
536
509
|
className: cx('header')
|
|
537
510
|
}, getPTOptions('header'));
|
|
538
511
|
if (props.header) {
|
|
@@ -542,18 +515,26 @@ var PickListSubList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
|
|
|
542
515
|
};
|
|
543
516
|
var createItems = function createItems() {
|
|
544
517
|
if (props.list) {
|
|
545
|
-
return props.list.map(function (item) {
|
|
546
|
-
var key =
|
|
518
|
+
return props.list.map(function (item, index) {
|
|
519
|
+
var key = props.parentId + '_' + index;
|
|
547
520
|
var selected = isSelected(item);
|
|
548
521
|
return /*#__PURE__*/React__namespace.createElement(PickListItem, {
|
|
549
522
|
hostName: props.hostName,
|
|
550
523
|
key: key,
|
|
524
|
+
id: key,
|
|
525
|
+
index: index,
|
|
526
|
+
focused: key === props.focusedOptionId,
|
|
551
527
|
value: item,
|
|
552
528
|
template: props.itemTemplate,
|
|
553
529
|
selected: selected,
|
|
554
|
-
onClick: onItemClick,
|
|
555
|
-
onKeyDown: onItemKeyDown,
|
|
556
|
-
|
|
530
|
+
onClick: props.onItemClick,
|
|
531
|
+
onKeyDown: props.onItemKeyDown,
|
|
532
|
+
onMouseDown: function onMouseDown(event) {
|
|
533
|
+
return props.onOptionMouseDown(_objectSpread$1(_objectSpread$1({}, event), {}, {
|
|
534
|
+
index: index,
|
|
535
|
+
type: props.type
|
|
536
|
+
}));
|
|
537
|
+
},
|
|
557
538
|
ptm: ptm,
|
|
558
539
|
cx: cx
|
|
559
540
|
});
|
|
@@ -563,18 +544,18 @@ var PickListSubList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
|
|
|
563
544
|
};
|
|
564
545
|
var createFilter = function createFilter() {
|
|
565
546
|
var iconClassName = 'p-picklist-filter-icon';
|
|
566
|
-
var filterIconProps =
|
|
547
|
+
var filterIconProps = mergeProps({
|
|
567
548
|
className: cx('filterIcon')
|
|
568
549
|
}, getPTOptions('filterIcon'));
|
|
569
550
|
var icon = props.type === 'source' ? props.sourceFilterIcon || /*#__PURE__*/React__namespace.createElement(search.SearchIcon, filterIconProps) : props.targetFilterIcon || /*#__PURE__*/React__namespace.createElement(search.SearchIcon, filterIconProps);
|
|
570
|
-
var filterIcon = utils.IconUtils.getJSXIcon(icon, _objectSpread({}, filterIconProps), {
|
|
551
|
+
var filterIcon = utils.IconUtils.getJSXIcon(icon, _objectSpread$1({}, filterIconProps), {
|
|
571
552
|
props: props
|
|
572
553
|
});
|
|
573
554
|
if (props.showFilter) {
|
|
574
|
-
var filterProps =
|
|
555
|
+
var filterProps = mergeProps({
|
|
575
556
|
className: cx('filter')
|
|
576
557
|
}, getPTOptions('filter'));
|
|
577
|
-
var filterInputProps =
|
|
558
|
+
var filterInputProps = mergeProps({
|
|
578
559
|
type: 'text',
|
|
579
560
|
value: props.filterValue,
|
|
580
561
|
onChange: onFilter,
|
|
@@ -597,7 +578,7 @@ var PickListSubList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
|
|
|
597
578
|
};
|
|
598
579
|
content = utils.ObjectUtils.getJSXElement(props.filterTemplate, defaultContentOptions);
|
|
599
580
|
}
|
|
600
|
-
var filterContainerProps =
|
|
581
|
+
var filterContainerProps = mergeProps({
|
|
601
582
|
className: cx('filterContainer')
|
|
602
583
|
}, getPTOptions('filterContainer'));
|
|
603
584
|
return /*#__PURE__*/React__namespace.createElement("div", filterContainerProps, content);
|
|
@@ -606,10 +587,19 @@ var PickListSubList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
|
|
|
606
587
|
};
|
|
607
588
|
var createList = function createList() {
|
|
608
589
|
var items = createItems();
|
|
609
|
-
var listProps =
|
|
590
|
+
var listProps = mergeProps({
|
|
591
|
+
ref: listElementRef,
|
|
610
592
|
className: utils.classNames(props.listClassName, cx('list')),
|
|
611
593
|
role: 'listbox',
|
|
594
|
+
id: props.parentId + '_' + props.type + '_list',
|
|
612
595
|
'aria-multiselectable': true,
|
|
596
|
+
'aria-activedescendant': props.ariaActivedescendant,
|
|
597
|
+
tabIndex: props.list && props.list.length > 0 ? props.tabIndex : -1,
|
|
598
|
+
onKeyDown: props.onListKeyDown,
|
|
599
|
+
onFocus: function onFocus(event) {
|
|
600
|
+
props.onListFocus(event, props.type);
|
|
601
|
+
},
|
|
602
|
+
onBlur: props.onListBlur,
|
|
613
603
|
style: props.style
|
|
614
604
|
}, getPTOptions('list'));
|
|
615
605
|
return /*#__PURE__*/React__namespace.createElement("ul", listProps, items);
|
|
@@ -617,15 +607,244 @@ var PickListSubList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
|
|
|
617
607
|
var header = createHeader();
|
|
618
608
|
var filter = createFilter();
|
|
619
609
|
var list = createList();
|
|
620
|
-
var listWrapperProps =
|
|
621
|
-
className: utils.classNames(props.className, cx('listWrapper'))
|
|
622
|
-
ref: listElementRef
|
|
610
|
+
var listWrapperProps = mergeProps({
|
|
611
|
+
className: utils.classNames(props.className, cx('listWrapper'))
|
|
623
612
|
}, getPTOptions('listWrapper'));
|
|
624
613
|
return /*#__PURE__*/React__namespace.createElement("div", listWrapperProps, header, filter, list);
|
|
625
614
|
}));
|
|
626
615
|
PickListSubList.displayName = 'PickListSubList';
|
|
627
616
|
|
|
617
|
+
function _defineProperties(target, props) {
|
|
618
|
+
for (var i = 0; i < props.length; i++) {
|
|
619
|
+
var descriptor = props[i];
|
|
620
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
621
|
+
descriptor.configurable = true;
|
|
622
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
623
|
+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
627
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
628
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
629
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
630
|
+
writable: false
|
|
631
|
+
});
|
|
632
|
+
return Constructor;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
function _classCallCheck(instance, Constructor) {
|
|
636
|
+
if (!(instance instanceof Constructor)) {
|
|
637
|
+
throw new TypeError("Cannot call a class as a function");
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
var FilterMatchMode = Object.freeze({
|
|
642
|
+
STARTS_WITH: 'startsWith',
|
|
643
|
+
CONTAINS: 'contains',
|
|
644
|
+
NOT_CONTAINS: 'notContains',
|
|
645
|
+
ENDS_WITH: 'endsWith',
|
|
646
|
+
EQUALS: 'equals',
|
|
647
|
+
NOT_EQUALS: 'notEquals',
|
|
648
|
+
IN: 'in',
|
|
649
|
+
LESS_THAN: 'lt',
|
|
650
|
+
LESS_THAN_OR_EQUAL_TO: 'lte',
|
|
651
|
+
GREATER_THAN: 'gt',
|
|
652
|
+
GREATER_THAN_OR_EQUAL_TO: 'gte',
|
|
653
|
+
BETWEEN: 'between',
|
|
654
|
+
DATE_IS: 'dateIs',
|
|
655
|
+
DATE_IS_NOT: 'dateIsNot',
|
|
656
|
+
DATE_BEFORE: 'dateBefore',
|
|
657
|
+
DATE_AFTER: 'dateAfter',
|
|
658
|
+
CUSTOM: 'custom'
|
|
659
|
+
});
|
|
660
|
+
|
|
661
|
+
/**
|
|
662
|
+
* @deprecated please use PrimeReactContext
|
|
663
|
+
*/
|
|
664
|
+
var PrimeReact = /*#__PURE__*/_createClass(function PrimeReact() {
|
|
665
|
+
_classCallCheck(this, PrimeReact);
|
|
666
|
+
});
|
|
667
|
+
_defineProperty(PrimeReact, "ripple", false);
|
|
668
|
+
_defineProperty(PrimeReact, "inputStyle", 'outlined');
|
|
669
|
+
_defineProperty(PrimeReact, "locale", 'en');
|
|
670
|
+
_defineProperty(PrimeReact, "appendTo", null);
|
|
671
|
+
_defineProperty(PrimeReact, "cssTransition", true);
|
|
672
|
+
_defineProperty(PrimeReact, "autoZIndex", true);
|
|
673
|
+
_defineProperty(PrimeReact, "hideOverlaysOnDocumentScrolling", false);
|
|
674
|
+
_defineProperty(PrimeReact, "nonce", null);
|
|
675
|
+
_defineProperty(PrimeReact, "nullSortOrder", 1);
|
|
676
|
+
_defineProperty(PrimeReact, "zIndex", {
|
|
677
|
+
modal: 1100,
|
|
678
|
+
overlay: 1000,
|
|
679
|
+
menu: 1000,
|
|
680
|
+
tooltip: 1100,
|
|
681
|
+
toast: 1200
|
|
682
|
+
});
|
|
683
|
+
_defineProperty(PrimeReact, "pt", undefined);
|
|
684
|
+
_defineProperty(PrimeReact, "filterMatchModeOptions", {
|
|
685
|
+
text: [FilterMatchMode.STARTS_WITH, FilterMatchMode.CONTAINS, FilterMatchMode.NOT_CONTAINS, FilterMatchMode.ENDS_WITH, FilterMatchMode.EQUALS, FilterMatchMode.NOT_EQUALS],
|
|
686
|
+
numeric: [FilterMatchMode.EQUALS, FilterMatchMode.NOT_EQUALS, FilterMatchMode.LESS_THAN, FilterMatchMode.LESS_THAN_OR_EQUAL_TO, FilterMatchMode.GREATER_THAN, FilterMatchMode.GREATER_THAN_OR_EQUAL_TO],
|
|
687
|
+
date: [FilterMatchMode.DATE_IS, FilterMatchMode.DATE_IS_NOT, FilterMatchMode.DATE_BEFORE, FilterMatchMode.DATE_AFTER]
|
|
688
|
+
});
|
|
689
|
+
_defineProperty(PrimeReact, "changeTheme", function (currentTheme, newTheme, linkElementId, callback) {
|
|
690
|
+
var _linkElement$parentNo;
|
|
691
|
+
var linkElement = document.getElementById(linkElementId);
|
|
692
|
+
var cloneLinkElement = linkElement.cloneNode(true);
|
|
693
|
+
var newThemeUrl = linkElement.getAttribute('href').replace(currentTheme, newTheme);
|
|
694
|
+
cloneLinkElement.setAttribute('id', linkElementId + '-clone');
|
|
695
|
+
cloneLinkElement.setAttribute('href', newThemeUrl);
|
|
696
|
+
cloneLinkElement.addEventListener('load', function () {
|
|
697
|
+
linkElement.remove();
|
|
698
|
+
cloneLinkElement.setAttribute('id', linkElementId);
|
|
699
|
+
if (callback) {
|
|
700
|
+
callback();
|
|
701
|
+
}
|
|
702
|
+
});
|
|
703
|
+
(_linkElement$parentNo = linkElement.parentNode) === null || _linkElement$parentNo === void 0 || _linkElement$parentNo.insertBefore(cloneLinkElement, linkElement.nextSibling);
|
|
704
|
+
});
|
|
705
|
+
|
|
706
|
+
var locales = {
|
|
707
|
+
en: {
|
|
708
|
+
startsWith: 'Starts with',
|
|
709
|
+
contains: 'Contains',
|
|
710
|
+
notContains: 'Not contains',
|
|
711
|
+
endsWith: 'Ends with',
|
|
712
|
+
equals: 'Equals',
|
|
713
|
+
notEquals: 'Not equals',
|
|
714
|
+
noFilter: 'No Filter',
|
|
715
|
+
filter: 'Filter',
|
|
716
|
+
lt: 'Less than',
|
|
717
|
+
lte: 'Less than or equal to',
|
|
718
|
+
gt: 'Greater than',
|
|
719
|
+
gte: 'Greater than or equal to',
|
|
720
|
+
dateIs: 'Date is',
|
|
721
|
+
dateIsNot: 'Date is not',
|
|
722
|
+
dateBefore: 'Date is before',
|
|
723
|
+
dateAfter: 'Date is after',
|
|
724
|
+
custom: 'Custom',
|
|
725
|
+
clear: 'Clear',
|
|
726
|
+
close: 'Close',
|
|
727
|
+
apply: 'Apply',
|
|
728
|
+
matchAll: 'Match All',
|
|
729
|
+
matchAny: 'Match Any',
|
|
730
|
+
addRule: 'Add Rule',
|
|
731
|
+
removeRule: 'Remove Rule',
|
|
732
|
+
accept: 'Yes',
|
|
733
|
+
reject: 'No',
|
|
734
|
+
choose: 'Choose',
|
|
735
|
+
upload: 'Upload',
|
|
736
|
+
cancel: 'Cancel',
|
|
737
|
+
completed: 'Completed',
|
|
738
|
+
pending: 'Pending',
|
|
739
|
+
fileSizeTypes: ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],
|
|
740
|
+
dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
|
741
|
+
dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
742
|
+
dayNamesMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
|
743
|
+
monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
|
744
|
+
monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
745
|
+
today: 'Today',
|
|
746
|
+
weekHeader: 'Wk',
|
|
747
|
+
firstDayOfWeek: 0,
|
|
748
|
+
showMonthAfterYear: false,
|
|
749
|
+
dateFormat: 'mm/dd/yy',
|
|
750
|
+
weak: 'Weak',
|
|
751
|
+
medium: 'Medium',
|
|
752
|
+
strong: 'Strong',
|
|
753
|
+
passwordPrompt: 'Enter a password',
|
|
754
|
+
emptyFilterMessage: 'No available options',
|
|
755
|
+
emptyMessage: 'No results found',
|
|
756
|
+
aria: {
|
|
757
|
+
trueLabel: 'True',
|
|
758
|
+
falseLabel: 'False',
|
|
759
|
+
nullLabel: 'Not Selected',
|
|
760
|
+
star: '1 star',
|
|
761
|
+
stars: '{star} stars',
|
|
762
|
+
selectAll: 'All items selected',
|
|
763
|
+
unselectAll: 'All items unselected',
|
|
764
|
+
close: 'Close',
|
|
765
|
+
previous: 'Previous',
|
|
766
|
+
next: 'Next',
|
|
767
|
+
navigation: 'Navigation',
|
|
768
|
+
scrollTop: 'Scroll Top',
|
|
769
|
+
moveTop: 'Move Top',
|
|
770
|
+
moveUp: 'Move Up',
|
|
771
|
+
moveDown: 'Move Down',
|
|
772
|
+
moveBottom: 'Move Bottom',
|
|
773
|
+
moveToTarget: 'Move to Target',
|
|
774
|
+
moveToSource: 'Move to Source',
|
|
775
|
+
moveAllToTarget: 'Move All to Target',
|
|
776
|
+
moveAllToSource: 'Move All to Source',
|
|
777
|
+
pageLabel: 'Page {page}',
|
|
778
|
+
firstPageLabel: 'First Page',
|
|
779
|
+
lastPageLabel: 'Last Page',
|
|
780
|
+
nextPageLabel: 'Next Page',
|
|
781
|
+
previousPageLabel: 'Previous Page',
|
|
782
|
+
rowsPerPageLabel: 'Rows per page',
|
|
783
|
+
jumpToPageDropdownLabel: 'Jump to Page Dropdown',
|
|
784
|
+
jumpToPageInputLabel: 'Jump to Page Input',
|
|
785
|
+
selectRow: 'Row Selected',
|
|
786
|
+
unselectRow: 'Row Unselected',
|
|
787
|
+
expandRow: 'Row Expanded',
|
|
788
|
+
collapseRow: 'Row Collapsed',
|
|
789
|
+
showFilterMenu: 'Show Filter Menu',
|
|
790
|
+
hideFilterMenu: 'Hide Filter Menu',
|
|
791
|
+
filterOperator: 'Filter Operator',
|
|
792
|
+
filterConstraint: 'Filter Constraint',
|
|
793
|
+
editRow: 'Row Edit',
|
|
794
|
+
saveEdit: 'Save Edit',
|
|
795
|
+
cancelEdit: 'Cancel Edit',
|
|
796
|
+
listView: 'List View',
|
|
797
|
+
gridView: 'Grid View',
|
|
798
|
+
slide: 'Slide',
|
|
799
|
+
slideNumber: '{slideNumber}',
|
|
800
|
+
zoomImage: 'Zoom Image',
|
|
801
|
+
zoomIn: 'Zoom In',
|
|
802
|
+
zoomOut: 'Zoom Out',
|
|
803
|
+
rotateRight: 'Rotate Right',
|
|
804
|
+
rotateLeft: 'Rotate Left',
|
|
805
|
+
selectLabel: 'Select',
|
|
806
|
+
unselectLabel: 'Unselect',
|
|
807
|
+
expandLabel: 'Expand',
|
|
808
|
+
collapseLabel: 'Collapse'
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
};
|
|
812
|
+
|
|
813
|
+
/**
|
|
814
|
+
* Find an ARIA label in the locale by key. If options are passed it will replace all options:
|
|
815
|
+
* ```ts
|
|
816
|
+
* const ariaValue = "Page {page}, User {user}, Role {role}";
|
|
817
|
+
* const options = { page: 2, user: "John", role: "Admin" };
|
|
818
|
+
* const result = ariaLabel('yourLabel', { page: 2, user: "John", role: "Admin" })
|
|
819
|
+
* console.log(result); // Output: Page 2, User John, Role Admin
|
|
820
|
+
* ```
|
|
821
|
+
* @param {string} ariaKey key of the ARIA label to look up in locale.
|
|
822
|
+
* @param {any} options JSON options like { page: 2, user: "John", role: "Admin" }
|
|
823
|
+
* @returns the ARIA label with replaced values
|
|
824
|
+
*/
|
|
825
|
+
function ariaLabel(ariaKey, options) {
|
|
826
|
+
var _locale = PrimeReact.locale;
|
|
827
|
+
try {
|
|
828
|
+
var _ariaLabel = localeOptions(_locale)['aria'][ariaKey];
|
|
829
|
+
if (_ariaLabel) {
|
|
830
|
+
for (var key in options) {
|
|
831
|
+
if (options.hasOwnProperty(key)) {
|
|
832
|
+
_ariaLabel = _ariaLabel.replace("{".concat(key, "}"), options[key]);
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
return _ariaLabel;
|
|
837
|
+
} catch (error) {
|
|
838
|
+
throw new Error("The ".concat(ariaKey, " option is not found in the current locale('").concat(_locale, "')."));
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
function localeOptions(locale) {
|
|
842
|
+
var _locale = locale || PrimeReact.locale;
|
|
843
|
+
return locales[_locale];
|
|
844
|
+
}
|
|
845
|
+
|
|
628
846
|
var PickListTransferControls = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
847
|
+
var mergeProps = hooks.useMergeProps();
|
|
629
848
|
var viewChanged = hooks.useMatchMedia("(max-width: ".concat(props.breakpoint, ")"), props.breakpoint);
|
|
630
849
|
var ptm = props.ptm,
|
|
631
850
|
cx = props.cx,
|
|
@@ -742,7 +961,7 @@ var PickListTransferControls = /*#__PURE__*/React__namespace.memo(function (prop
|
|
|
742
961
|
}
|
|
743
962
|
}
|
|
744
963
|
};
|
|
745
|
-
var buttonsProps =
|
|
964
|
+
var buttonsProps = mergeProps({
|
|
746
965
|
className: utils.classNames(props.className, cx('buttons'))
|
|
747
966
|
}, ptm('buttons', {
|
|
748
967
|
hostName: props.hostName
|
|
@@ -754,6 +973,7 @@ var PickListTransferControls = /*#__PURE__*/React__namespace.memo(function (prop
|
|
|
754
973
|
onClick: moveRight,
|
|
755
974
|
pt: ptm('moveToTargetButton'),
|
|
756
975
|
unstyled: unstyled,
|
|
976
|
+
"aria-label": ariaLabel('moveToTarget'),
|
|
757
977
|
__parentMetadata: {
|
|
758
978
|
parent: props.metaData
|
|
759
979
|
}
|
|
@@ -764,6 +984,7 @@ var PickListTransferControls = /*#__PURE__*/React__namespace.memo(function (prop
|
|
|
764
984
|
onClick: moveAllRight,
|
|
765
985
|
pt: ptm('moveAllToTargetButton'),
|
|
766
986
|
unstyled: unstyled,
|
|
987
|
+
"aria-label": ariaLabel('moveAllToTarget'),
|
|
767
988
|
__parentMetadata: {
|
|
768
989
|
parent: props.metaData
|
|
769
990
|
}
|
|
@@ -774,6 +995,7 @@ var PickListTransferControls = /*#__PURE__*/React__namespace.memo(function (prop
|
|
|
774
995
|
onClick: moveLeft,
|
|
775
996
|
pt: ptm('moveToSourceButton'),
|
|
776
997
|
unstyled: unstyled,
|
|
998
|
+
"aria-label": ariaLabel('moveToSource'),
|
|
777
999
|
__parentMetadata: {
|
|
778
1000
|
parent: props.metaData
|
|
779
1001
|
}
|
|
@@ -784,6 +1006,7 @@ var PickListTransferControls = /*#__PURE__*/React__namespace.memo(function (prop
|
|
|
784
1006
|
onClick: moveAllLeft,
|
|
785
1007
|
pt: ptm('moveAllToSourceButton'),
|
|
786
1008
|
unstyled: unstyled,
|
|
1009
|
+
"aria-label": ariaLabel('moveAllToSource'),
|
|
787
1010
|
__parentMetadata: {
|
|
788
1011
|
parent: props.metaData
|
|
789
1012
|
}
|
|
@@ -791,8 +1014,11 @@ var PickListTransferControls = /*#__PURE__*/React__namespace.memo(function (prop
|
|
|
791
1014
|
});
|
|
792
1015
|
PickListTransferControls.displayName = 'PickListTransferControls';
|
|
793
1016
|
|
|
1017
|
+
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; }
|
|
1018
|
+
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; }
|
|
794
1019
|
var PickList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
795
|
-
var
|
|
1020
|
+
var mergeProps = hooks.useMergeProps();
|
|
1021
|
+
var context = React__namespace.useContext(PrimeReact$1.PrimeReactContext);
|
|
796
1022
|
var props = PickListBase.getProps(inProps, context);
|
|
797
1023
|
var _React$useState = React__namespace.useState([]),
|
|
798
1024
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -810,10 +1036,25 @@ var PickList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
810
1036
|
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
811
1037
|
targetFilterValueState = _React$useState8[0],
|
|
812
1038
|
setTargetFilterValueState = _React$useState8[1];
|
|
813
|
-
var _React$useState9 = React__namespace.useState(
|
|
1039
|
+
var _React$useState9 = React__namespace.useState(props.id),
|
|
814
1040
|
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
815
1041
|
attributeSelectorState = _React$useState10[0],
|
|
816
1042
|
setAttributeSelectorState = _React$useState10[1];
|
|
1043
|
+
var _React$useState11 = React__namespace.useState(-1),
|
|
1044
|
+
_React$useState12 = _slicedToArray(_React$useState11, 2),
|
|
1045
|
+
focusedOptionIndex = _React$useState12[0],
|
|
1046
|
+
setFocusedOptionIndex = _React$useState12[1];
|
|
1047
|
+
var _React$useState13 = React__namespace.useState(null),
|
|
1048
|
+
_React$useState14 = _slicedToArray(_React$useState13, 2),
|
|
1049
|
+
focusedOptionId = _React$useState14[0],
|
|
1050
|
+
setFocusedOptionId = _React$useState14[1];
|
|
1051
|
+
var _React$useState15 = React__namespace.useState({
|
|
1052
|
+
source: false,
|
|
1053
|
+
target: false
|
|
1054
|
+
}),
|
|
1055
|
+
_React$useState16 = _slicedToArray(_React$useState15, 2),
|
|
1056
|
+
focused = _React$useState16[0],
|
|
1057
|
+
setFocused = _React$useState16[1];
|
|
817
1058
|
var metaData = {
|
|
818
1059
|
props: props,
|
|
819
1060
|
state: {
|
|
@@ -846,31 +1087,30 @@ var PickList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
846
1087
|
var showTargetFilter = hasFilterBy && props.showTargetFilter;
|
|
847
1088
|
var onSourceReorder = function onSourceReorder(event) {
|
|
848
1089
|
handleChange(event, event.value, props.target);
|
|
849
|
-
reorderedListElementRef.current =
|
|
1090
|
+
reorderedListElementRef.current = getListElement('source');
|
|
850
1091
|
reorderDirection.current = event.direction;
|
|
851
1092
|
};
|
|
852
1093
|
var onTargetReorder = function onTargetReorder(event) {
|
|
853
1094
|
handleChange(event, props.source, event.value);
|
|
854
|
-
reorderedListElementRef.current =
|
|
1095
|
+
reorderedListElementRef.current = getListElement('target');
|
|
855
1096
|
reorderDirection.current = event.direction;
|
|
856
1097
|
};
|
|
857
1098
|
var handleScrollPosition = function handleScrollPosition(listElement, direction) {
|
|
858
1099
|
if (listElement) {
|
|
859
|
-
var list = utils.DomHandler.findSingle(listElement, '[data-pc-section="list"]');
|
|
860
1100
|
switch (direction) {
|
|
861
1101
|
case 'up':
|
|
862
|
-
scrollInView(
|
|
1102
|
+
scrollInView(listElement, -1);
|
|
863
1103
|
break;
|
|
864
1104
|
case 'top':
|
|
865
|
-
|
|
1105
|
+
listElement.scrollTop = 0;
|
|
866
1106
|
break;
|
|
867
1107
|
case 'down':
|
|
868
|
-
scrollInView(
|
|
1108
|
+
scrollInView(listElement, 1);
|
|
869
1109
|
break;
|
|
870
1110
|
case 'bottom':
|
|
871
1111
|
/* TODO: improve this code block */
|
|
872
1112
|
setTimeout(function () {
|
|
873
|
-
return
|
|
1113
|
+
return listElement.scrollTop = listElement.scrollHeight;
|
|
874
1114
|
}, 100);
|
|
875
1115
|
break;
|
|
876
1116
|
}
|
|
@@ -976,13 +1216,6 @@ var PickList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
976
1216
|
setFilterState(value);
|
|
977
1217
|
}
|
|
978
1218
|
};
|
|
979
|
-
var getVisibleList = function getVisibleList(list, type) {
|
|
980
|
-
var _ref3 = type === 'source' ? [sourceFilteredValue, filterSource] : [targetFilteredValue, filterTarget],
|
|
981
|
-
_ref4 = _slicedToArray(_ref3, 2),
|
|
982
|
-
filteredValue = _ref4[0],
|
|
983
|
-
filterCallback = _ref4[1];
|
|
984
|
-
return hasFilterBy && utils.ObjectUtils.isNotEmpty(filteredValue) ? filterCallback(filteredValue) : list;
|
|
985
|
-
};
|
|
986
1219
|
var filterSource = function filterSource() {
|
|
987
1220
|
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
988
1221
|
var filteredValue = value.trim().toLocaleLowerCase(props.filterLocale);
|
|
@@ -995,11 +1228,273 @@ var PickList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
995
1228
|
};
|
|
996
1229
|
var filter = function filter(list, filterValue) {
|
|
997
1230
|
var searchFields = hasFilterBy ? props.filterBy.split(',') : [];
|
|
998
|
-
return PrimeReact.FilterService.filter(list, searchFields, filterValue, props.filterMatchMode, props.filterLocale);
|
|
1231
|
+
return PrimeReact$1.FilterService.filter(list, searchFields, filterValue, props.filterMatchMode, props.filterLocale);
|
|
1232
|
+
};
|
|
1233
|
+
var getVisibleList = function getVisibleList(list, type) {
|
|
1234
|
+
var _ref3 = type === 'source' ? [sourceFilteredValue, filterSource] : [targetFilteredValue, filterTarget],
|
|
1235
|
+
_ref4 = _slicedToArray(_ref3, 2),
|
|
1236
|
+
filteredValue = _ref4[0],
|
|
1237
|
+
filterCallback = _ref4[1];
|
|
1238
|
+
return hasFilterBy && utils.ObjectUtils.isNotEmpty(filteredValue) ? filterCallback(filteredValue) : list;
|
|
1239
|
+
};
|
|
1240
|
+
var sourceList = getVisibleList(props.source, 'source');
|
|
1241
|
+
var targetList = getVisibleList(props.target, 'target');
|
|
1242
|
+
var _onListFocus = function onListFocus(event, type) {
|
|
1243
|
+
var listElement = getListElement(type);
|
|
1244
|
+
var selectedFirstItem = utils.DomHandler.findSingle(listElement, '[data-p-highlight="true"]') || utils.DomHandler.findSingle(listElement, '[data-pc-section="item"]');
|
|
1245
|
+
var itemList = listElement && listElement.children ? _toConsumableArray(listElement.children) : [];
|
|
1246
|
+
if (selectedFirstItem) {
|
|
1247
|
+
var findIndex = utils.ObjectUtils.findIndexInList(selectedFirstItem, itemList);
|
|
1248
|
+
setFocused(_objectSpread(_objectSpread({}, focused), {}, _defineProperty({}, type, true)));
|
|
1249
|
+
var index = focusedOptionIndex !== -1 ? focusedOptionIndex : selectedFirstItem ? findIndex : -1;
|
|
1250
|
+
changeFocusedOptionIndex(index, type);
|
|
1251
|
+
props.onFocus && props.onFocus(event);
|
|
1252
|
+
}
|
|
1253
|
+
};
|
|
1254
|
+
var _onListBlur = function onListBlur(event, type) {
|
|
1255
|
+
setFocused(_objectSpread(_objectSpread({}, focused), {}, _defineProperty({}, type, false)));
|
|
1256
|
+
setFocusedOptionIndex(-1);
|
|
1257
|
+
props.onBlur && props.onBlur(event);
|
|
1258
|
+
};
|
|
1259
|
+
var _onItemClick = function onItemClick(event, type) {
|
|
1260
|
+
var arrowKeyClick = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
1261
|
+
var originalEvent = event.originalEvent;
|
|
1262
|
+
var item = event.value;
|
|
1263
|
+
var selectedId = event.id;
|
|
1264
|
+
var isSource = type === 'source';
|
|
1265
|
+
var selection = _toConsumableArray(isSource ? sourceSelection : targetSelection);
|
|
1266
|
+
var index = utils.ObjectUtils.findIndexInList(item, selection, props.dataKey);
|
|
1267
|
+
var selected = index !== -1;
|
|
1268
|
+
var metaSelection = props.metaKeySelection;
|
|
1269
|
+
if (!arrowKeyClick) setFocusedOptionIndex(selectedId);
|
|
1270
|
+
if (metaSelection) {
|
|
1271
|
+
var metaKey = originalEvent.metaKey || originalEvent.ctrlKey || originalEvent.shiftKey;
|
|
1272
|
+
if (selected && metaKey) {
|
|
1273
|
+
selection.splice(index, 1);
|
|
1274
|
+
} else {
|
|
1275
|
+
if (!metaKey) {
|
|
1276
|
+
selection.length = 0;
|
|
1277
|
+
}
|
|
1278
|
+
selection.push(item);
|
|
1279
|
+
}
|
|
1280
|
+
} else {
|
|
1281
|
+
if (selected) selection.splice(index, 1);else selection.push(item);
|
|
1282
|
+
}
|
|
1283
|
+
if (isSource) {
|
|
1284
|
+
_onSelectionChange({
|
|
1285
|
+
originalEvent: originalEvent,
|
|
1286
|
+
value: selection
|
|
1287
|
+
}, 'sourceSelection', props.onSourceSelectionChange);
|
|
1288
|
+
} else {
|
|
1289
|
+
_onSelectionChange({
|
|
1290
|
+
originalEvent: originalEvent,
|
|
1291
|
+
value: selection
|
|
1292
|
+
}, 'targetSelection', props.onTargetSelectionChange);
|
|
1293
|
+
}
|
|
1294
|
+
};
|
|
1295
|
+
var _onOptionMouseDown = function onOptionMouseDown(_ref5) {
|
|
1296
|
+
var index = _ref5.index,
|
|
1297
|
+
type = _ref5.type;
|
|
1298
|
+
setFocused(_objectSpread(_objectSpread({}, focused), {}, _defineProperty({}, type, true)));
|
|
1299
|
+
setFocusedOptionIndex(index);
|
|
1300
|
+
};
|
|
1301
|
+
var _onListKeyDown = function onListKeyDown(event, type) {
|
|
1302
|
+
switch (event.code) {
|
|
1303
|
+
case 'ArrowDown':
|
|
1304
|
+
onArrowDownKey(event, type);
|
|
1305
|
+
break;
|
|
1306
|
+
case 'ArrowUp':
|
|
1307
|
+
onArrowUpKey(event, type);
|
|
1308
|
+
break;
|
|
1309
|
+
case 'Home':
|
|
1310
|
+
onHomeKey(event, type);
|
|
1311
|
+
break;
|
|
1312
|
+
case 'End':
|
|
1313
|
+
onEndKey(event, type);
|
|
1314
|
+
break;
|
|
1315
|
+
case 'Enter':
|
|
1316
|
+
case 'NumpadEnter':
|
|
1317
|
+
onEnterKey(event, type);
|
|
1318
|
+
break;
|
|
1319
|
+
case 'Space':
|
|
1320
|
+
onSpaceKey(event, type);
|
|
1321
|
+
break;
|
|
1322
|
+
case 'KeyA':
|
|
1323
|
+
if (event.ctrlKey) {
|
|
1324
|
+
var isSource = type === 'source';
|
|
1325
|
+
if (isSource) setSourceSelectionState(_toConsumableArray(sourceList));else setTargetSelectionState(_toConsumableArray(targetList));
|
|
1326
|
+
_onSelectionChange({
|
|
1327
|
+
originalEvent: event,
|
|
1328
|
+
value: _toConsumableArray(sourceList)
|
|
1329
|
+
}, isSource ? 'sourceSelection' : 'targetSelection', isSource ? props.onSourceSelectionChange : props.onTargetSelectionChange);
|
|
1330
|
+
event.preventDefault();
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
};
|
|
1334
|
+
var onArrowDownKey = function onArrowDownKey(event, type) {
|
|
1335
|
+
var optionIndex = findNextOptionIndex(focusedOptionIndex, type);
|
|
1336
|
+
var visibleList = getVisibleList(type === 'source' ? props.source : props.target, type);
|
|
1337
|
+
changeFocusedOptionIndex(optionIndex, type);
|
|
1338
|
+
if (visibleList && visibleList.length > 0 && event.shiftKey) {
|
|
1339
|
+
_onItemClick({
|
|
1340
|
+
originalEvent: event,
|
|
1341
|
+
value: visibleList[optionIndex]
|
|
1342
|
+
}, type, true);
|
|
1343
|
+
}
|
|
1344
|
+
event.preventDefault();
|
|
1345
|
+
};
|
|
1346
|
+
var onArrowUpKey = function onArrowUpKey(event, type) {
|
|
1347
|
+
var optionIndex = findPrevOptionIndex(focusedOptionIndex, type);
|
|
1348
|
+
var visibleList = getVisibleList(type === 'source' ? props.source : props.target, type);
|
|
1349
|
+
changeFocusedOptionIndex(optionIndex, type);
|
|
1350
|
+
if (visibleList && visibleList.length > 0 && event.shiftKey) {
|
|
1351
|
+
_onItemClick({
|
|
1352
|
+
originalEvent: event,
|
|
1353
|
+
value: visibleList[optionIndex]
|
|
1354
|
+
}, type, true);
|
|
1355
|
+
}
|
|
1356
|
+
event.preventDefault();
|
|
1357
|
+
};
|
|
1358
|
+
var onEnterKey = function onEnterKey(event, type) {
|
|
1359
|
+
var listElement = getListElement(type);
|
|
1360
|
+
var visibleList = getVisibleList(type === 'source' ? props.source : props.target, type);
|
|
1361
|
+
var items = utils.DomHandler.find(listElement, '[data-pc-section="item"]');
|
|
1362
|
+
var focusedItem = utils.DomHandler.findSingle(listElement, "[data-pc-section=\"item\"][id=".concat(focusedOptionIndex, "]"));
|
|
1363
|
+
var id = focusedItem && focusedItem.getAttribute('id');
|
|
1364
|
+
var matchedOptionIndex = _toConsumableArray(items).findIndex(function (item) {
|
|
1365
|
+
return item === focusedItem;
|
|
1366
|
+
});
|
|
1367
|
+
if (visibleList && visibleList.length > 0) {
|
|
1368
|
+
_onItemClick({
|
|
1369
|
+
originalEvent: event,
|
|
1370
|
+
value: visibleList[matchedOptionIndex],
|
|
1371
|
+
id: id
|
|
1372
|
+
}, type);
|
|
1373
|
+
}
|
|
1374
|
+
event.preventDefault();
|
|
1375
|
+
};
|
|
1376
|
+
var onSpaceKey = function onSpaceKey(event, type) {
|
|
1377
|
+
event.preventDefault();
|
|
1378
|
+
var isSource = type === 'source';
|
|
1379
|
+
var selection = isSource ? sourceSelectionState : targetSelectionState;
|
|
1380
|
+
if (event.shiftKey && selection && selection.length > 0) {
|
|
1381
|
+
var listItems = isSource ? sourceList : targetList;
|
|
1382
|
+
var listElement = getListElement(type);
|
|
1383
|
+
var items = utils.DomHandler.find(listElement, '[data-pc-section="item"]');
|
|
1384
|
+
var selectedItemIndex = utils.ObjectUtils.findIndexInList(selection[0], _toConsumableArray(listItems));
|
|
1385
|
+
var focusedItem = utils.DomHandler.findSingle(listElement, "[data-pc-section=\"item\"][id=".concat(focusedOptionIndex, "]"));
|
|
1386
|
+
var matchedOptionIndex = _toConsumableArray(items).findIndex(function (item) {
|
|
1387
|
+
return item === focusedItem;
|
|
1388
|
+
});
|
|
1389
|
+
_toConsumableArray(listItems).slice(Math.min(selectedItemIndex, matchedOptionIndex), Math.max(selectedItemIndex, matchedOptionIndex) + 1), _readOnlyError("selection");
|
|
1390
|
+
if (isSource) {
|
|
1391
|
+
_onSelectionChange({
|
|
1392
|
+
originalEvent: event,
|
|
1393
|
+
value: selection
|
|
1394
|
+
}, 'sourceSelection', props.onSourceSelectionChange);
|
|
1395
|
+
} else {
|
|
1396
|
+
_onSelectionChange({
|
|
1397
|
+
originalEvent: event,
|
|
1398
|
+
value: selection
|
|
1399
|
+
}, 'targetSelection', props.onTargetSelectionChange);
|
|
1400
|
+
}
|
|
1401
|
+
} else {
|
|
1402
|
+
onEnterKey(event, type);
|
|
1403
|
+
}
|
|
1404
|
+
};
|
|
1405
|
+
var onHomeKey = function onHomeKey(event, type) {
|
|
1406
|
+
if (event.ctrlKey && event.shiftKey) {
|
|
1407
|
+
var isSource = type === 'source';
|
|
1408
|
+
var listItems = isSource ? sourceList : targetList;
|
|
1409
|
+
var listElement = getListElement(type);
|
|
1410
|
+
var items = utils.DomHandler.find(listElement, '[data-pc-section="item"]');
|
|
1411
|
+
var focusedItem = utils.DomHandler.findSingle(listElement, "[data-pc-section=\"item\"][id=".concat(focusedOptionIndex, "]"));
|
|
1412
|
+
var matchedOptionIndex = _toConsumableArray(items).findIndex(function (item) {
|
|
1413
|
+
return item === focusedItem;
|
|
1414
|
+
});
|
|
1415
|
+
var selection = _toConsumableArray(listItems).slice(0, matchedOptionIndex + 1);
|
|
1416
|
+
if (isSource) {
|
|
1417
|
+
_onSelectionChange({
|
|
1418
|
+
originalEvent: event,
|
|
1419
|
+
value: selection
|
|
1420
|
+
}, 'sourceSelection', props.onSourceSelectionChange);
|
|
1421
|
+
} else {
|
|
1422
|
+
_onSelectionChange({
|
|
1423
|
+
originalEvent: event,
|
|
1424
|
+
value: selection
|
|
1425
|
+
}, 'targetSelection', props.onTargetSelectionChange);
|
|
1426
|
+
}
|
|
1427
|
+
} else {
|
|
1428
|
+
changeFocusedOptionIndex(0, type);
|
|
1429
|
+
}
|
|
1430
|
+
event.preventDefault();
|
|
1431
|
+
};
|
|
1432
|
+
var onEndKey = function onEndKey(event, type) {
|
|
1433
|
+
var listElement = getListElement(type);
|
|
1434
|
+
var items = utils.DomHandler.find(listElement, '[data-pc-section="item"]');
|
|
1435
|
+
if (event.ctrlKey && event.shiftKey) {
|
|
1436
|
+
var isSource = type === 'source';
|
|
1437
|
+
var listItems = isSource ? sourceList : targetList;
|
|
1438
|
+
var focusedItem = utils.DomHandler.findSingle(listElement, "[data-pc-section=\"item\"][id=".concat(focusedOptionIndex, "]"));
|
|
1439
|
+
var matchedOptionIndex = _toConsumableArray(items).findIndex(function (item) {
|
|
1440
|
+
return item === focusedItem;
|
|
1441
|
+
});
|
|
1442
|
+
var selection = _toConsumableArray(listItems).slice(matchedOptionIndex, items.length);
|
|
1443
|
+
if (isSource) {
|
|
1444
|
+
_onSelectionChange({
|
|
1445
|
+
originalEvent: event,
|
|
1446
|
+
value: selection
|
|
1447
|
+
}, 'sourceSelection', props.onSourceSelectionChange);
|
|
1448
|
+
} else {
|
|
1449
|
+
_onSelectionChange({
|
|
1450
|
+
originalEvent: event,
|
|
1451
|
+
value: selection
|
|
1452
|
+
}, 'targetSelection', props.onTargetSelectionChange);
|
|
1453
|
+
}
|
|
1454
|
+
} else {
|
|
1455
|
+
changeFocusedOptionIndex(items.length - 1, type);
|
|
1456
|
+
}
|
|
1457
|
+
event.preventDefault();
|
|
1458
|
+
};
|
|
1459
|
+
var findNextOptionIndex = function findNextOptionIndex(index, type) {
|
|
1460
|
+
var listElement = getListElement(type);
|
|
1461
|
+
var items = utils.DomHandler.find(listElement, '[data-pc-section="item"]');
|
|
1462
|
+
var matchedOptionIndex = _toConsumableArray(items).findIndex(function (link) {
|
|
1463
|
+
return link.id === index;
|
|
1464
|
+
});
|
|
1465
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex + 1 : 0;
|
|
1466
|
+
};
|
|
1467
|
+
var findPrevOptionIndex = function findPrevOptionIndex(index, type) {
|
|
1468
|
+
var listElement = getListElement(type);
|
|
1469
|
+
var items = utils.DomHandler.find(listElement, '[data-pc-section="item"]');
|
|
1470
|
+
var matchedOptionIndex = _toConsumableArray(items).findIndex(function (link) {
|
|
1471
|
+
return link.id === index;
|
|
1472
|
+
});
|
|
1473
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex - 1 : 0;
|
|
1474
|
+
};
|
|
1475
|
+
var changeFocusedOptionIndex = function changeFocusedOptionIndex(index, type) {
|
|
1476
|
+
var listElement = getListElement(type);
|
|
1477
|
+
var items = utils.DomHandler.find(listElement, '[data-pc-section="item"]');
|
|
1478
|
+
var order = index >= items.length ? items.length - 1 : index < 0 ? 0 : index;
|
|
1479
|
+
setFocusedOptionIndex(items[order].getAttribute('id'));
|
|
1480
|
+
scrollInViewWithFocus(items[order].getAttribute('id'), type);
|
|
1481
|
+
};
|
|
1482
|
+
var scrollInViewWithFocus = function scrollInViewWithFocus(id, type) {
|
|
1483
|
+
var listElement = getListElement(type);
|
|
1484
|
+
var element = utils.DomHandler.findSingle(listElement, "[data-pc-section=\"item\"][id=\"".concat(id, "\"]"));
|
|
1485
|
+
if (element) {
|
|
1486
|
+
element.scrollIntoView && element.scrollIntoView({
|
|
1487
|
+
block: 'nearest',
|
|
1488
|
+
inline: 'start'
|
|
1489
|
+
});
|
|
1490
|
+
}
|
|
1491
|
+
};
|
|
1492
|
+
var getListElement = function getListElement(type) {
|
|
1493
|
+
return type === 'source' ? sourceListElementRef.current.getElement() : targetListElementRef.current.getElement();
|
|
999
1494
|
};
|
|
1000
1495
|
var createStyle = function createStyle() {
|
|
1001
1496
|
if (!styleElementRef.current) {
|
|
1002
|
-
styleElementRef.current = utils.DomHandler.createInlineStyle(context && context.nonce || PrimeReact__default["default"].nonce);
|
|
1497
|
+
styleElementRef.current = utils.DomHandler.createInlineStyle(context && context.nonce || PrimeReact__default["default"].nonce, context && context.styleContainer);
|
|
1003
1498
|
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");
|
|
1004
1499
|
styleElementRef.current.innerHTML = innerHTML;
|
|
1005
1500
|
}
|
|
@@ -1015,9 +1510,6 @@ var PickList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
1015
1510
|
}
|
|
1016
1511
|
};
|
|
1017
1512
|
});
|
|
1018
|
-
hooks.useMountEffect(function () {
|
|
1019
|
-
!attributeSelectorState && setAttributeSelectorState(utils.UniqueComponentId());
|
|
1020
|
-
});
|
|
1021
1513
|
hooks.useUpdateEffect(function () {
|
|
1022
1514
|
if (attributeSelectorState) {
|
|
1023
1515
|
elementRef.current.setAttribute(attributeSelectorState, '');
|
|
@@ -1028,18 +1520,23 @@ var PickList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
1028
1520
|
};
|
|
1029
1521
|
}, [attributeSelectorState, props.breakpoint]);
|
|
1030
1522
|
hooks.useUpdateEffect(function () {
|
|
1523
|
+
if (!props.id && !attributeSelectorState) {
|
|
1524
|
+
setAttributeSelectorState(utils.UniqueComponentId());
|
|
1525
|
+
}
|
|
1031
1526
|
if (reorderedListElementRef.current) {
|
|
1032
1527
|
handleScrollPosition(reorderedListElementRef.current, reorderDirection.current);
|
|
1033
1528
|
reorderedListElementRef.current = null;
|
|
1034
1529
|
reorderDirection.current = null;
|
|
1035
1530
|
}
|
|
1036
1531
|
});
|
|
1532
|
+
hooks.useUpdateEffect(function () {
|
|
1533
|
+
var _focusedOptionId = focusedOptionIndex !== -1 ? focusedOptionIndex : null;
|
|
1534
|
+
setFocusedOptionId(_focusedOptionId);
|
|
1535
|
+
}, [focusedOptionIndex]);
|
|
1037
1536
|
var sourceItemTemplate = props.sourceItemTemplate ? props.sourceItemTemplate : props.itemTemplate;
|
|
1038
1537
|
var targetItemTemplate = props.targetItemTemplate ? props.targetItemTemplate : props.itemTemplate;
|
|
1039
|
-
var
|
|
1040
|
-
|
|
1041
|
-
var rootProps = utils.mergeProps({
|
|
1042
|
-
id: props.id,
|
|
1538
|
+
var rootProps = mergeProps({
|
|
1539
|
+
id: attributeSelectorState,
|
|
1043
1540
|
ref: elementRef,
|
|
1044
1541
|
className: utils.classNames(props.className, cx('root')),
|
|
1045
1542
|
style: props.style
|
|
@@ -1064,10 +1561,28 @@ var PickList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
1064
1561
|
ref: sourceListElementRef,
|
|
1065
1562
|
type: "source",
|
|
1066
1563
|
list: sourceList,
|
|
1564
|
+
parentId: attributeSelectorState,
|
|
1067
1565
|
selection: sourceSelection,
|
|
1068
1566
|
onSelectionChange: function onSelectionChange(e) {
|
|
1069
1567
|
return _onSelectionChange(e, 'sourceSelection', props.onSourceSelectionChange);
|
|
1070
1568
|
},
|
|
1569
|
+
onListKeyDown: function onListKeyDown(e) {
|
|
1570
|
+
return _onListKeyDown(e, 'source');
|
|
1571
|
+
},
|
|
1572
|
+
onListFocus: function onListFocus(e) {
|
|
1573
|
+
return _onListFocus(e, 'source');
|
|
1574
|
+
},
|
|
1575
|
+
onListBlur: function onListBlur(e) {
|
|
1576
|
+
return _onListBlur(e, 'source');
|
|
1577
|
+
},
|
|
1578
|
+
onOptionMouseDown: function onOptionMouseDown(index) {
|
|
1579
|
+
return _onOptionMouseDown(index);
|
|
1580
|
+
},
|
|
1581
|
+
onItemClick: function onItemClick(e) {
|
|
1582
|
+
return _onItemClick(e, 'source');
|
|
1583
|
+
},
|
|
1584
|
+
focusedOptionId: focused['source'] ? focusedOptionId : null,
|
|
1585
|
+
ariaActivedescendant: focused['source'] ? focusedOptionId : null,
|
|
1071
1586
|
itemTemplate: sourceItemTemplate,
|
|
1072
1587
|
header: props.sourceHeader,
|
|
1073
1588
|
style: props.sourceStyle,
|
|
@@ -1109,9 +1624,27 @@ var PickList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
1109
1624
|
type: "target",
|
|
1110
1625
|
list: targetList,
|
|
1111
1626
|
selection: targetSelection,
|
|
1627
|
+
parentId: attributeSelectorState,
|
|
1112
1628
|
onSelectionChange: function onSelectionChange(e) {
|
|
1113
1629
|
return _onSelectionChange(e, 'targetSelection', props.onTargetSelectionChange);
|
|
1114
1630
|
},
|
|
1631
|
+
onListKeyDown: function onListKeyDown(e) {
|
|
1632
|
+
return _onListKeyDown(e, 'target');
|
|
1633
|
+
},
|
|
1634
|
+
onListFocus: function onListFocus(e) {
|
|
1635
|
+
return _onListFocus(e, 'target');
|
|
1636
|
+
},
|
|
1637
|
+
onListBlur: function onListBlur(e) {
|
|
1638
|
+
return _onListBlur(e, 'target');
|
|
1639
|
+
},
|
|
1640
|
+
onOptionMouseDown: function onOptionMouseDown(index) {
|
|
1641
|
+
return _onOptionMouseDown(index);
|
|
1642
|
+
},
|
|
1643
|
+
onItemClick: function onItemClick(e) {
|
|
1644
|
+
return _onItemClick(e, 'target');
|
|
1645
|
+
},
|
|
1646
|
+
focusedOptionId: focused['target'] ? focusedOptionId : null,
|
|
1647
|
+
ariaActivedescendant: focused['target'] ? focusedOptionId : null,
|
|
1115
1648
|
itemTemplate: targetItemTemplate,
|
|
1116
1649
|
header: props.targetHeader,
|
|
1117
1650
|
style: props.targetStyle,
|