primereact 10.2.1 → 10.3.1
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 +83 -8
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +35 -0
- package/accordion/accordion.esm.js +85 -10
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +83 -8
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +63 -33
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +24 -246
- package/api/api.esm.js +63 -33
- package/api/api.esm.min.js +1 -1
- package/api/api.js +63 -33
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +3 -2
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +6 -1
- package/autocomplete/autocomplete.esm.js +3 -2
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +3 -2
- package/autocomplete/autocomplete.min.js +1 -1
- package/blockui/blockui.cjs.js +8 -5
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +8 -5
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +8 -5
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +12 -6
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +12 -6
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +12 -6
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/calendar/calendar.cjs.js +71 -37
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +3 -5
- package/calendar/calendar.esm.js +71 -37
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +71 -37
- package/calendar/calendar.min.js +1 -1
- package/carousel/carousel.cjs.js +103 -9
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +104 -10
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +103 -9
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +64 -23
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +27 -4
- package/cascadeselect/cascadeselect.esm.js +65 -24
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +65 -25
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/checkbox/checkbox.cjs.js +25 -25
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +25 -25
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +26 -26
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +5 -2
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +17 -2
- package/chip/chip.esm.js +5 -2
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +5 -2
- package/chip/chip.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +1 -1
- package/componentbase/componentbase.cjs.js +49 -8
- package/componentbase/componentbase.cjs.min.js +1 -1
- package/componentbase/componentbase.esm.js +50 -9
- package/componentbase/componentbase.esm.min.js +1 -1
- package/componentbase/componentbase.js +49 -8
- package/componentbase/componentbase.min.js +1 -1
- package/confirmdialog/confirmdialog.cjs.js +30 -22
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +19 -3
- package/confirmdialog/confirmdialog.esm.js +30 -22
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +30 -22
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +85 -152
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.d.ts +40 -1
- package/confirmpopup/confirmpopup.esm.js +88 -155
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +85 -152
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +641 -99
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +23 -1
- package/contextmenu/contextmenu.esm.js +641 -99
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +641 -99
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +1217 -484
- package/core/core.min.js +40 -40
- package/datatable/datatable.cjs.js +30 -26
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +5 -4
- package/datatable/datatable.esm.js +30 -26
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +30 -26
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.d.ts +1 -1
- package/dialog/dialog.cjs.js +108 -151
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +60 -1
- package/dialog/dialog.esm.js +115 -158
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +109 -152
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +1 -0
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +1 -0
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +1 -0
- package/divider/divider.min.js +1 -1
- package/dock/dock.cjs.js +169 -33
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.d.ts +15 -0
- package/dock/dock.esm.js +170 -34
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +169 -33
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +29 -4
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +1 -1
- package/dropdown/dropdown.esm.js +29 -4
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +30 -6
- package/dropdown/dropdown.min.js +1 -1
- package/fieldset/fieldset.cjs.js +12 -5
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +12 -5
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +12 -5
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +14 -6
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +17 -1
- package/fileupload/fileupload.esm.js +14 -6
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +14 -6
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/galleria.cjs.js +223 -43
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +225 -45
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +223 -43
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.cjs.js +219 -78
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.d.ts +8 -4
- package/hooks/hooks.esm.js +219 -80
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +219 -78
- package/hooks/hooks.min.js +1 -1
- package/icons/arrowdown/index.cjs.js +13 -2
- package/icons/arrowdown/index.cjs.min.js +1 -1
- package/icons/arrowdown/index.esm.js +13 -2
- package/icons/arrowdown/index.esm.min.js +1 -1
- package/icons/arrowdown/index.js +13 -2
- package/icons/arrowdown/index.min.js +1 -1
- package/icons/arrowup/index.cjs.js +13 -2
- package/icons/arrowup/index.cjs.min.js +1 -1
- package/icons/arrowup/index.esm.js +13 -2
- package/icons/arrowup/index.esm.min.js +1 -1
- package/icons/arrowup/index.js +13 -2
- package/icons/arrowup/index.min.js +1 -1
- package/icons/ban/index.cjs.js +13 -2
- package/icons/ban/index.cjs.min.js +1 -1
- package/icons/ban/index.esm.js +13 -2
- package/icons/ban/index.esm.min.js +1 -1
- package/icons/ban/index.js +13 -2
- package/icons/ban/index.min.js +1 -1
- package/icons/download/index.cjs.js +13 -2
- package/icons/download/index.cjs.min.js +1 -1
- package/icons/download/index.esm.js +13 -2
- package/icons/download/index.esm.min.js +1 -1
- package/icons/download/index.js +13 -2
- package/icons/download/index.min.js +1 -1
- package/icons/exclamationtriangle/index.cjs.js +13 -2
- package/icons/exclamationtriangle/index.cjs.min.js +1 -1
- package/icons/exclamationtriangle/index.esm.js +13 -2
- package/icons/exclamationtriangle/index.esm.min.js +1 -1
- package/icons/exclamationtriangle/index.js +13 -2
- package/icons/exclamationtriangle/index.min.js +1 -1
- package/icons/eyeslash/index.cjs.js +13 -2
- package/icons/eyeslash/index.cjs.min.js +1 -1
- package/icons/eyeslash/index.esm.js +13 -2
- package/icons/eyeslash/index.esm.min.js +1 -1
- package/icons/eyeslash/index.js +13 -2
- package/icons/eyeslash/index.min.js +1 -1
- package/icons/filter/index.cjs.js +13 -2
- package/icons/filter/index.cjs.min.js +1 -1
- package/icons/filter/index.esm.js +13 -2
- package/icons/filter/index.esm.min.js +1 -1
- package/icons/filter/index.js +13 -2
- package/icons/filter/index.min.js +1 -1
- package/icons/filterslash/index.cjs.js +13 -2
- package/icons/filterslash/index.cjs.min.js +1 -1
- package/icons/filterslash/index.esm.js +13 -2
- package/icons/filterslash/index.esm.min.js +1 -1
- package/icons/filterslash/index.js +13 -2
- package/icons/filterslash/index.min.js +1 -1
- package/icons/infocircle/index.cjs.js +13 -2
- package/icons/infocircle/index.cjs.min.js +1 -1
- package/icons/infocircle/index.esm.js +13 -2
- package/icons/infocircle/index.esm.min.js +1 -1
- package/icons/infocircle/index.js +13 -2
- package/icons/infocircle/index.min.js +1 -1
- package/icons/pencil/index.cjs.js +13 -2
- package/icons/pencil/index.cjs.min.js +1 -1
- package/icons/pencil/index.esm.js +13 -2
- package/icons/pencil/index.esm.min.js +1 -1
- package/icons/pencil/index.js +13 -2
- package/icons/pencil/index.min.js +1 -1
- package/icons/plus/index.cjs.js +13 -2
- package/icons/plus/index.cjs.min.js +1 -1
- package/icons/plus/index.esm.js +13 -2
- package/icons/plus/index.esm.min.js +1 -1
- package/icons/plus/index.js +13 -2
- package/icons/plus/index.min.js +1 -1
- package/icons/refresh/index.cjs.js +13 -2
- package/icons/refresh/index.cjs.min.js +1 -1
- package/icons/refresh/index.esm.js +13 -2
- package/icons/refresh/index.esm.min.js +1 -1
- package/icons/refresh/index.js +13 -2
- package/icons/refresh/index.min.js +1 -1
- package/icons/search/index.cjs.js +13 -2
- package/icons/search/index.cjs.min.js +1 -1
- package/icons/search/index.esm.js +13 -2
- package/icons/search/index.esm.min.js +1 -1
- package/icons/search/index.js +13 -2
- package/icons/search/index.min.js +1 -1
- package/icons/searchminus/index.cjs.js +13 -2
- package/icons/searchminus/index.cjs.min.js +1 -1
- package/icons/searchminus/index.esm.js +13 -2
- package/icons/searchminus/index.esm.min.js +1 -1
- package/icons/searchminus/index.js +13 -2
- package/icons/searchminus/index.min.js +1 -1
- package/icons/searchplus/index.cjs.js +13 -2
- package/icons/searchplus/index.cjs.min.js +1 -1
- package/icons/searchplus/index.esm.js +13 -2
- package/icons/searchplus/index.esm.min.js +1 -1
- package/icons/searchplus/index.js +13 -2
- package/icons/searchplus/index.min.js +1 -1
- package/icons/sortalt/index.cjs.js +13 -2
- package/icons/sortalt/index.cjs.min.js +1 -1
- package/icons/sortalt/index.esm.js +13 -2
- package/icons/sortalt/index.esm.min.js +1 -1
- package/icons/sortalt/index.js +13 -2
- package/icons/sortalt/index.min.js +1 -1
- package/icons/sortamountdown/index.cjs.js +13 -2
- package/icons/sortamountdown/index.cjs.min.js +1 -1
- package/icons/sortamountdown/index.esm.js +13 -2
- package/icons/sortamountdown/index.esm.min.js +1 -1
- package/icons/sortamountdown/index.js +13 -2
- package/icons/sortamountdown/index.min.js +1 -1
- package/icons/sortamountupalt/index.cjs.js +13 -2
- package/icons/sortamountupalt/index.cjs.min.js +1 -1
- package/icons/sortamountupalt/index.esm.js +13 -2
- package/icons/sortamountupalt/index.esm.min.js +1 -1
- package/icons/sortamountupalt/index.js +13 -2
- package/icons/sortamountupalt/index.min.js +1 -1
- package/icons/spinner/index.cjs.js +13 -2
- package/icons/spinner/index.cjs.min.js +1 -1
- package/icons/spinner/index.esm.js +13 -2
- package/icons/spinner/index.esm.min.js +1 -1
- package/icons/spinner/index.js +13 -2
- package/icons/spinner/index.min.js +1 -1
- package/icons/star/index.cjs.js +13 -2
- package/icons/star/index.cjs.min.js +1 -1
- package/icons/star/index.esm.js +13 -2
- package/icons/star/index.esm.min.js +1 -1
- package/icons/star/index.js +13 -2
- package/icons/star/index.min.js +1 -1
- package/icons/starfill/index.cjs.js +13 -2
- package/icons/starfill/index.cjs.min.js +1 -1
- package/icons/starfill/index.esm.js +13 -2
- package/icons/starfill/index.esm.min.js +1 -1
- package/icons/starfill/index.js +13 -2
- package/icons/starfill/index.min.js +1 -1
- package/icons/thlarge/index.cjs.js +13 -2
- package/icons/thlarge/index.cjs.min.js +1 -1
- package/icons/thlarge/index.esm.js +13 -2
- package/icons/thlarge/index.esm.min.js +1 -1
- package/icons/thlarge/index.js +13 -2
- package/icons/thlarge/index.min.js +1 -1
- package/icons/timescircle/index.cjs.js +13 -2
- package/icons/timescircle/index.cjs.min.js +1 -1
- package/icons/timescircle/index.esm.js +13 -2
- package/icons/timescircle/index.esm.min.js +1 -1
- package/icons/timescircle/index.js +13 -2
- package/icons/timescircle/index.min.js +1 -1
- package/icons/trash/index.cjs.js +13 -2
- package/icons/trash/index.cjs.min.js +1 -1
- package/icons/trash/index.esm.js +13 -2
- package/icons/trash/index.esm.min.js +1 -1
- package/icons/trash/index.js +13 -2
- package/icons/trash/index.min.js +1 -1
- package/icons/undo/index.cjs.js +13 -2
- package/icons/undo/index.cjs.min.js +1 -1
- package/icons/undo/index.esm.js +13 -2
- package/icons/undo/index.esm.min.js +1 -1
- package/icons/undo/index.js +13 -2
- package/icons/undo/index.min.js +1 -1
- package/icons/upload/index.cjs.js +13 -2
- package/icons/upload/index.cjs.min.js +1 -1
- package/icons/upload/index.esm.js +13 -2
- package/icons/upload/index.esm.min.js +1 -1
- package/icons/upload/index.js +13 -2
- package/icons/upload/index.min.js +1 -1
- package/icons/windowmaximize/index.cjs.js +13 -2
- package/icons/windowmaximize/index.cjs.min.js +1 -1
- package/icons/windowmaximize/index.esm.js +13 -2
- package/icons/windowmaximize/index.esm.min.js +1 -1
- package/icons/windowmaximize/index.js +13 -2
- package/icons/windowmaximize/index.min.js +1 -1
- package/icons/windowminimize/index.cjs.js +13 -2
- package/icons/windowminimize/index.cjs.min.js +1 -1
- package/icons/windowminimize/index.esm.js +13 -2
- package/icons/windowminimize/index.esm.min.js +1 -1
- package/icons/windowminimize/index.js +13 -2
- package/icons/windowminimize/index.min.js +1 -1
- package/image/image.cjs.js +85 -119
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +87 -121
- package/image/image.esm.min.js +1 -1
- package/image/image.js +86 -120
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +7 -0
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +7 -0
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +8 -2
- package/inplace/inplace.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +63 -19
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +7 -0
- package/inputnumber/inputnumber.esm.js +63 -19
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +63 -19
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +3 -3
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +3 -3
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +3 -3
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +7 -6
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +7 -6
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +7 -6
- package/inputtext/inputtext.min.js +1 -1
- package/listbox/listbox.cjs.js +14 -1
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.d.ts +8 -3
- package/listbox/listbox.esm.js +14 -1
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +14 -1
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +799 -179
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.d.ts +14 -0
- package/megamenu/megamenu.esm.js +801 -181
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +799 -179
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +7 -9
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.esm.js +7 -9
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +7 -9
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +217 -166
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +15 -1
- package/menu/menu.esm.js +220 -169
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +217 -166
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +714 -179
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.d.ts +18 -0
- package/menubar/menubar.esm.js +717 -182
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +714 -179
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +2 -1
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +2 -1
- package/message/message.esm.min.js +1 -1
- package/message/message.js +2 -1
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +5 -3
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.esm.js +5 -3
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +5 -3
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +58 -35
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +5 -1
- package/multiselect/multiselect.esm.js +58 -35
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +59 -37
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/orderlist.cjs.js +260 -105
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.d.ts +18 -0
- package/orderlist/orderlist.esm.js +261 -106
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +260 -105
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +10 -0
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +10 -0
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +10 -0
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +9 -102
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +1 -1
- package/overlaypanel/overlaypanel.esm.js +11 -104
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +10 -103
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.d.ts +2 -2
- package/panel/panel.cjs.js +22 -19
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +22 -19
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +22 -19
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +774 -195
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +15 -0
- package/panelmenu/panelmenu.esm.js +775 -196
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +774 -195
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/tailwind/index.cjs.js +163 -159
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +163 -159
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +163 -159
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/password.cjs.js +7 -2
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +1 -1
- package/password/password.esm.js +8 -3
- package/password/password.esm.min.js +1 -1
- package/password/password.js +7 -2
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +709 -181
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.d.ts +10 -0
- package/picklist/picklist.esm.js +708 -180
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +709 -181
- 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 +8352 -3145
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +8351 -3146
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +8352 -3145
- package/primereact.all.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +27 -26
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +27 -26
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +28 -27
- package/radiobutton/radiobutton.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +854 -790
- package/resources/themes/arya-green/theme.css +854 -790
- package/resources/themes/arya-orange/theme.css +854 -790
- package/resources/themes/arya-purple/theme.css +854 -790
- package/resources/themes/bootstrap4-dark-blue/theme.css +678 -615
- package/resources/themes/bootstrap4-dark-purple/theme.css +678 -615
- package/resources/themes/bootstrap4-light-blue/theme.css +679 -616
- package/resources/themes/bootstrap4-light-purple/theme.css +679 -616
- package/resources/themes/fluent-light/theme.css +686 -638
- package/resources/themes/lara-dark-amber/theme.css +679 -630
- package/resources/themes/lara-dark-blue/theme.css +679 -630
- package/resources/themes/lara-dark-cyan/theme.css +679 -630
- package/resources/themes/lara-dark-green/theme.css +679 -630
- package/resources/themes/lara-dark-indigo/theme.css +679 -630
- package/resources/themes/lara-dark-pink/theme.css +679 -630
- package/resources/themes/lara-dark-purple/theme.css +679 -630
- package/resources/themes/lara-dark-teal/theme.css +679 -630
- package/resources/themes/lara-light-amber/theme.css +776 -725
- package/resources/themes/lara-light-blue/theme.css +1011 -960
- package/resources/themes/lara-light-cyan/theme.css +776 -725
- package/resources/themes/lara-light-green/theme.css +820 -769
- package/resources/themes/lara-light-indigo/theme.css +1016 -965
- package/resources/themes/lara-light-pink/theme.css +776 -725
- package/resources/themes/lara-light-purple/theme.css +1016 -965
- package/resources/themes/lara-light-teal/theme.css +776 -725
- package/resources/themes/luna-amber/theme.css +950 -887
- package/resources/themes/luna-blue/theme.css +950 -887
- package/resources/themes/luna-green/theme.css +950 -887
- package/resources/themes/luna-pink/theme.css +950 -887
- package/resources/themes/md-dark-deeppurple/theme.css +918 -950
- package/resources/themes/md-dark-indigo/theme.css +918 -950
- package/resources/themes/md-light-deeppurple/theme.css +878 -910
- package/resources/themes/md-light-indigo/theme.css +878 -910
- package/resources/themes/mdc-dark-deeppurple/theme.css +918 -950
- package/resources/themes/mdc-dark-indigo/theme.css +918 -950
- package/resources/themes/mdc-light-deeppurple/theme.css +878 -910
- package/resources/themes/mdc-light-indigo/theme.css +878 -910
- package/resources/themes/mira/theme.css +1562 -1532
- package/resources/themes/nano/theme.css +707 -641
- package/resources/themes/nova/theme.css +705 -643
- package/resources/themes/nova-accent/theme.css +701 -636
- package/resources/themes/nova-alt/theme.css +705 -643
- package/resources/themes/rhea/theme.css +876 -811
- package/resources/themes/saga-blue/theme.css +896 -832
- package/resources/themes/saga-green/theme.css +896 -832
- package/resources/themes/saga-orange/theme.css +896 -832
- package/resources/themes/saga-purple/theme.css +896 -832
- package/resources/themes/soho-dark/theme.css +701 -643
- package/resources/themes/soho-light/theme.css +690 -634
- package/resources/themes/tailwind-light/theme.css +1370 -1306
- package/resources/themes/vela-blue/theme.css +862 -798
- package/resources/themes/vela-green/theme.css +862 -798
- package/resources/themes/vela-orange/theme.css +862 -798
- package/resources/themes/vela-purple/theme.css +862 -798
- package/resources/themes/viva-dark/theme.css +655 -612
- package/resources/themes/viva-light/theme.css +737 -694
- package/ripple/ripple.cjs.js +71 -5
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +71 -5
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +71 -5
- package/ripple/ripple.min.js +1 -1
- package/scrollpanel/scrollpanel.cjs.js +183 -3
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +184 -4
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +183 -3
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/sidebar/sidebar.cjs.js +62 -146
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +25 -3
- package/sidebar/sidebar.esm.js +65 -149
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +63 -147
- package/sidebar/sidebar.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +7 -100
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +1 -1
- package/slidemenu/slidemenu.esm.js +10 -103
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +7 -100
- package/slidemenu/slidemenu.min.js +1 -1
- package/speeddial/speeddial.cjs.js +275 -32
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +277 -34
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +275 -32
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +1098 -309
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +5 -5
- package/splitbutton/splitbutton.esm.js +1100 -311
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +1096 -309
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +103 -15
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.d.ts +5 -0
- package/splitter/splitter.esm.js +103 -15
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +103 -15
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +99 -13
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +100 -14
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +99 -13
- package/steps/steps.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +113 -17
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +113 -17
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +113 -17
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +128 -20
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +35 -0
- package/tabview/tabview.esm.js +128 -20
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +128 -20
- package/tabview/tabview.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +753 -275
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +11 -1
- package/tieredmenu/tieredmenu.esm.js +755 -277
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +753 -275
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/toast/toast.cjs.js +6 -1
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +36 -2
- package/toast/toast.esm.js +6 -1
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +6 -1
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +74 -4
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +74 -4
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +75 -5
- package/togglebutton/togglebutton.min.js +1 -1
- package/tooltip/tooltip.d.ts +27 -0
- package/tooltip/tooltipoptions.d.ts +1 -1
- package/tree/tree.cjs.js +198 -88
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +8 -0
- package/tree/tree.esm.js +199 -89
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +198 -88
- package/tree/tree.min.js +1 -1
- package/treeselect/treeselect.cjs.js +185 -49
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +26 -1
- package/treeselect/treeselect.esm.js +186 -50
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +186 -51
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +59 -53
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +3 -3
- package/treetable/treetable.esm.js +59 -53
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +59 -53
- package/treetable/treetable.min.js +1 -1
- package/utils/utils.cjs.js +19 -5
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +1 -1
- package/utils/utils.esm.js +19 -5
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +19 -5
- package/utils/utils.min.js +1 -1
- package/web-types.json +402 -33
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,22 +249,6 @@ 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) {
|
|
204
253
|
var ptm = props.ptm,
|
|
205
254
|
cx = props.cx,
|
|
@@ -317,6 +366,7 @@ var PickListControls = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
317
366
|
onClick: moveUp,
|
|
318
367
|
pt: ptm('moveUpButton'),
|
|
319
368
|
unstyled: unstyled,
|
|
369
|
+
"aria-label": PrimeReact$1.ariaLabel('moveUp'),
|
|
320
370
|
__parentMetadata: {
|
|
321
371
|
parent: props.metaData
|
|
322
372
|
}
|
|
@@ -327,6 +377,7 @@ var PickListControls = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
327
377
|
onClick: moveTop,
|
|
328
378
|
pt: ptm('moveTopButton'),
|
|
329
379
|
unstyled: unstyled,
|
|
380
|
+
"aria-label": PrimeReact$1.ariaLabel('moveTop'),
|
|
330
381
|
__parentMetadata: {
|
|
331
382
|
parent: props.metaData
|
|
332
383
|
}
|
|
@@ -337,6 +388,7 @@ var PickListControls = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
337
388
|
onClick: moveDown,
|
|
338
389
|
pt: ptm('moveDownButton'),
|
|
339
390
|
unstyled: unstyled,
|
|
391
|
+
"aria-label": PrimeReact$1.ariaLabel('moveDown'),
|
|
340
392
|
__parentMetadata: {
|
|
341
393
|
parent: props.metaData
|
|
342
394
|
}
|
|
@@ -347,6 +399,7 @@ var PickListControls = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
347
399
|
onClick: moveBottom,
|
|
348
400
|
pt: ptm('moveBottomButton'),
|
|
349
401
|
unstyled: unstyled,
|
|
402
|
+
"aria-label": PrimeReact$1.ariaLabel('moveBottom'),
|
|
350
403
|
__parentMetadata: {
|
|
351
404
|
parent: props.metaData
|
|
352
405
|
}
|
|
@@ -354,47 +407,6 @@ var PickListControls = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
354
407
|
});
|
|
355
408
|
PickListControls.displayName = 'PickListControls';
|
|
356
409
|
|
|
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
410
|
var PickListItem = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
399
411
|
var ptm = props.ptm,
|
|
400
412
|
cx = props.cx;
|
|
@@ -410,7 +422,8 @@ var PickListItem = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
410
422
|
if (props.onClick) {
|
|
411
423
|
props.onClick({
|
|
412
424
|
originalEvent: event,
|
|
413
|
-
value: props.value
|
|
425
|
+
value: props.value,
|
|
426
|
+
id: props.id
|
|
414
427
|
});
|
|
415
428
|
}
|
|
416
429
|
};
|
|
@@ -422,92 +435,47 @@ var PickListItem = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
422
435
|
});
|
|
423
436
|
}
|
|
424
437
|
};
|
|
438
|
+
var onMouseDown = function onMouseDown(event) {
|
|
439
|
+
if (props.onMouseDown) {
|
|
440
|
+
props.onMouseDown(event);
|
|
441
|
+
}
|
|
442
|
+
};
|
|
443
|
+
var onFocus = function onFocus(event) {
|
|
444
|
+
if (props.onFocus) {
|
|
445
|
+
props.onFocus(event);
|
|
446
|
+
}
|
|
447
|
+
};
|
|
425
448
|
var content = props.template ? props.template(props.value) : props.value;
|
|
426
449
|
var itemProps = utils.mergeProps({
|
|
427
450
|
className: utils.classNames(props.className, cx('item', {
|
|
428
|
-
|
|
451
|
+
selected: props.selected,
|
|
452
|
+
focused: props.focused
|
|
429
453
|
})),
|
|
454
|
+
id: props.id,
|
|
430
455
|
onClick: onClick,
|
|
431
456
|
onKeyDown: onKeyDown,
|
|
432
|
-
|
|
457
|
+
onFocus: onFocus,
|
|
458
|
+
onMouseDown: onMouseDown,
|
|
433
459
|
role: 'option',
|
|
434
|
-
'aria-selected': props.selected
|
|
460
|
+
'aria-selected': props.selected,
|
|
461
|
+
'data-p-highlight': props.selected,
|
|
462
|
+
'data-p-focused': props.focused
|
|
435
463
|
}, getPTOptions('item'));
|
|
436
464
|
return /*#__PURE__*/React__namespace.createElement("li", itemProps, content, /*#__PURE__*/React__namespace.createElement(ripple.Ripple, null));
|
|
437
465
|
});
|
|
438
466
|
PickListItem.displayName = 'PickListItem';
|
|
439
467
|
|
|
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; }
|
|
468
|
+
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; }
|
|
469
|
+
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
470
|
var PickListSubList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
|
|
443
471
|
var listElementRef = React__namespace.useRef(null);
|
|
444
472
|
var ptm = props.ptm,
|
|
445
473
|
cx = props.cx;
|
|
446
474
|
var getPTOptions = function getPTOptions(key, options) {
|
|
447
|
-
return ptm(key, _objectSpread({
|
|
475
|
+
return ptm(key, _objectSpread$1({
|
|
448
476
|
hostName: props.hostName
|
|
449
477
|
}, options));
|
|
450
478
|
};
|
|
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
479
|
var isSelected = function isSelected(item) {
|
|
512
480
|
return utils.ObjectUtils.findIndexInList(item, props.selection, props.dataKey) !== -1;
|
|
513
481
|
};
|
|
@@ -528,7 +496,9 @@ var PickListSubList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
|
|
|
528
496
|
};
|
|
529
497
|
React__namespace.useImperativeHandle(ref, function () {
|
|
530
498
|
return {
|
|
531
|
-
|
|
499
|
+
getElement: function getElement() {
|
|
500
|
+
return listElementRef.current;
|
|
501
|
+
}
|
|
532
502
|
};
|
|
533
503
|
});
|
|
534
504
|
var createHeader = function createHeader() {
|
|
@@ -542,18 +512,26 @@ var PickListSubList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
|
|
|
542
512
|
};
|
|
543
513
|
var createItems = function createItems() {
|
|
544
514
|
if (props.list) {
|
|
545
|
-
return props.list.map(function (item) {
|
|
546
|
-
var key =
|
|
515
|
+
return props.list.map(function (item, index) {
|
|
516
|
+
var key = props.parentId + '_' + index;
|
|
547
517
|
var selected = isSelected(item);
|
|
548
518
|
return /*#__PURE__*/React__namespace.createElement(PickListItem, {
|
|
549
519
|
hostName: props.hostName,
|
|
550
520
|
key: key,
|
|
521
|
+
id: key,
|
|
522
|
+
index: index,
|
|
523
|
+
focused: key === props.focusedOptionId,
|
|
551
524
|
value: item,
|
|
552
525
|
template: props.itemTemplate,
|
|
553
526
|
selected: selected,
|
|
554
|
-
onClick: onItemClick,
|
|
555
|
-
onKeyDown: onItemKeyDown,
|
|
556
|
-
|
|
527
|
+
onClick: props.onItemClick,
|
|
528
|
+
onKeyDown: props.onItemKeyDown,
|
|
529
|
+
onMouseDown: function onMouseDown(event) {
|
|
530
|
+
return props.onOptionMouseDown(_objectSpread$1(_objectSpread$1({}, event), {}, {
|
|
531
|
+
index: index,
|
|
532
|
+
type: props.type
|
|
533
|
+
}));
|
|
534
|
+
},
|
|
557
535
|
ptm: ptm,
|
|
558
536
|
cx: cx
|
|
559
537
|
});
|
|
@@ -567,7 +545,7 @@ var PickListSubList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
|
|
|
567
545
|
className: cx('filterIcon')
|
|
568
546
|
}, getPTOptions('filterIcon'));
|
|
569
547
|
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), {
|
|
548
|
+
var filterIcon = utils.IconUtils.getJSXIcon(icon, _objectSpread$1({}, filterIconProps), {
|
|
571
549
|
props: props
|
|
572
550
|
});
|
|
573
551
|
if (props.showFilter) {
|
|
@@ -607,9 +585,18 @@ var PickListSubList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
|
|
|
607
585
|
var createList = function createList() {
|
|
608
586
|
var items = createItems();
|
|
609
587
|
var listProps = utils.mergeProps({
|
|
588
|
+
ref: listElementRef,
|
|
610
589
|
className: utils.classNames(props.listClassName, cx('list')),
|
|
611
590
|
role: 'listbox',
|
|
591
|
+
id: props.parentId + '_' + props.type + '_list',
|
|
612
592
|
'aria-multiselectable': true,
|
|
593
|
+
'aria-activedescendant': props.ariaActivedescendant,
|
|
594
|
+
tabIndex: props.list && props.list.length > 0 ? props.tabIndex : -1,
|
|
595
|
+
onKeyDown: props.onListKeyDown,
|
|
596
|
+
onFocus: function onFocus(event) {
|
|
597
|
+
props.onListFocus(event, props.type);
|
|
598
|
+
},
|
|
599
|
+
onBlur: props.onListBlur,
|
|
613
600
|
style: props.style
|
|
614
601
|
}, getPTOptions('list'));
|
|
615
602
|
return /*#__PURE__*/React__namespace.createElement("ul", listProps, items);
|
|
@@ -618,13 +605,241 @@ var PickListSubList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
|
|
|
618
605
|
var filter = createFilter();
|
|
619
606
|
var list = createList();
|
|
620
607
|
var listWrapperProps = utils.mergeProps({
|
|
621
|
-
className: utils.classNames(props.className, cx('listWrapper'))
|
|
622
|
-
ref: listElementRef
|
|
608
|
+
className: utils.classNames(props.className, cx('listWrapper'))
|
|
623
609
|
}, getPTOptions('listWrapper'));
|
|
624
610
|
return /*#__PURE__*/React__namespace.createElement("div", listWrapperProps, header, filter, list);
|
|
625
611
|
}));
|
|
626
612
|
PickListSubList.displayName = 'PickListSubList';
|
|
627
613
|
|
|
614
|
+
function _defineProperties(target, props) {
|
|
615
|
+
for (var i = 0; i < props.length; i++) {
|
|
616
|
+
var descriptor = props[i];
|
|
617
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
618
|
+
descriptor.configurable = true;
|
|
619
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
620
|
+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
624
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
625
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
626
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
627
|
+
writable: false
|
|
628
|
+
});
|
|
629
|
+
return Constructor;
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
function _classCallCheck(instance, Constructor) {
|
|
633
|
+
if (!(instance instanceof Constructor)) {
|
|
634
|
+
throw new TypeError("Cannot call a class as a function");
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
var FilterMatchMode = Object.freeze({
|
|
639
|
+
STARTS_WITH: 'startsWith',
|
|
640
|
+
CONTAINS: 'contains',
|
|
641
|
+
NOT_CONTAINS: 'notContains',
|
|
642
|
+
ENDS_WITH: 'endsWith',
|
|
643
|
+
EQUALS: 'equals',
|
|
644
|
+
NOT_EQUALS: 'notEquals',
|
|
645
|
+
IN: 'in',
|
|
646
|
+
LESS_THAN: 'lt',
|
|
647
|
+
LESS_THAN_OR_EQUAL_TO: 'lte',
|
|
648
|
+
GREATER_THAN: 'gt',
|
|
649
|
+
GREATER_THAN_OR_EQUAL_TO: 'gte',
|
|
650
|
+
BETWEEN: 'between',
|
|
651
|
+
DATE_IS: 'dateIs',
|
|
652
|
+
DATE_IS_NOT: 'dateIsNot',
|
|
653
|
+
DATE_BEFORE: 'dateBefore',
|
|
654
|
+
DATE_AFTER: 'dateAfter',
|
|
655
|
+
CUSTOM: 'custom'
|
|
656
|
+
});
|
|
657
|
+
|
|
658
|
+
/**
|
|
659
|
+
* @deprecated please use PrimeReactContext
|
|
660
|
+
*/
|
|
661
|
+
var PrimeReact = /*#__PURE__*/_createClass(function PrimeReact() {
|
|
662
|
+
_classCallCheck(this, PrimeReact);
|
|
663
|
+
});
|
|
664
|
+
_defineProperty(PrimeReact, "ripple", false);
|
|
665
|
+
_defineProperty(PrimeReact, "inputStyle", 'outlined');
|
|
666
|
+
_defineProperty(PrimeReact, "locale", 'en');
|
|
667
|
+
_defineProperty(PrimeReact, "appendTo", null);
|
|
668
|
+
_defineProperty(PrimeReact, "cssTransition", true);
|
|
669
|
+
_defineProperty(PrimeReact, "autoZIndex", true);
|
|
670
|
+
_defineProperty(PrimeReact, "hideOverlaysOnDocumentScrolling", false);
|
|
671
|
+
_defineProperty(PrimeReact, "nonce", null);
|
|
672
|
+
_defineProperty(PrimeReact, "nullSortOrder", 1);
|
|
673
|
+
_defineProperty(PrimeReact, "zIndex", {
|
|
674
|
+
modal: 1100,
|
|
675
|
+
overlay: 1000,
|
|
676
|
+
menu: 1000,
|
|
677
|
+
tooltip: 1100,
|
|
678
|
+
toast: 1200
|
|
679
|
+
});
|
|
680
|
+
_defineProperty(PrimeReact, "pt", undefined);
|
|
681
|
+
_defineProperty(PrimeReact, "filterMatchModeOptions", {
|
|
682
|
+
text: [FilterMatchMode.STARTS_WITH, FilterMatchMode.CONTAINS, FilterMatchMode.NOT_CONTAINS, FilterMatchMode.ENDS_WITH, FilterMatchMode.EQUALS, FilterMatchMode.NOT_EQUALS],
|
|
683
|
+
numeric: [FilterMatchMode.EQUALS, FilterMatchMode.NOT_EQUALS, FilterMatchMode.LESS_THAN, FilterMatchMode.LESS_THAN_OR_EQUAL_TO, FilterMatchMode.GREATER_THAN, FilterMatchMode.GREATER_THAN_OR_EQUAL_TO],
|
|
684
|
+
date: [FilterMatchMode.DATE_IS, FilterMatchMode.DATE_IS_NOT, FilterMatchMode.DATE_BEFORE, FilterMatchMode.DATE_AFTER]
|
|
685
|
+
});
|
|
686
|
+
_defineProperty(PrimeReact, "changeTheme", function (currentTheme, newTheme, linkElementId, callback) {
|
|
687
|
+
var _linkElement$parentNo;
|
|
688
|
+
var linkElement = document.getElementById(linkElementId);
|
|
689
|
+
var cloneLinkElement = linkElement.cloneNode(true);
|
|
690
|
+
var newThemeUrl = linkElement.getAttribute('href').replace(currentTheme, newTheme);
|
|
691
|
+
cloneLinkElement.setAttribute('id', linkElementId + '-clone');
|
|
692
|
+
cloneLinkElement.setAttribute('href', newThemeUrl);
|
|
693
|
+
cloneLinkElement.addEventListener('load', function () {
|
|
694
|
+
linkElement.remove();
|
|
695
|
+
cloneLinkElement.setAttribute('id', linkElementId);
|
|
696
|
+
if (callback) {
|
|
697
|
+
callback();
|
|
698
|
+
}
|
|
699
|
+
});
|
|
700
|
+
(_linkElement$parentNo = linkElement.parentNode) === null || _linkElement$parentNo === void 0 || _linkElement$parentNo.insertBefore(cloneLinkElement, linkElement.nextSibling);
|
|
701
|
+
});
|
|
702
|
+
|
|
703
|
+
var locales = {
|
|
704
|
+
en: {
|
|
705
|
+
startsWith: 'Starts with',
|
|
706
|
+
contains: 'Contains',
|
|
707
|
+
notContains: 'Not contains',
|
|
708
|
+
endsWith: 'Ends with',
|
|
709
|
+
equals: 'Equals',
|
|
710
|
+
notEquals: 'Not equals',
|
|
711
|
+
noFilter: 'No Filter',
|
|
712
|
+
filter: 'Filter',
|
|
713
|
+
lt: 'Less than',
|
|
714
|
+
lte: 'Less than or equal to',
|
|
715
|
+
gt: 'Greater than',
|
|
716
|
+
gte: 'Greater than or equal to',
|
|
717
|
+
dateIs: 'Date is',
|
|
718
|
+
dateIsNot: 'Date is not',
|
|
719
|
+
dateBefore: 'Date is before',
|
|
720
|
+
dateAfter: 'Date is after',
|
|
721
|
+
custom: 'Custom',
|
|
722
|
+
clear: 'Clear',
|
|
723
|
+
close: 'Close',
|
|
724
|
+
apply: 'Apply',
|
|
725
|
+
matchAll: 'Match All',
|
|
726
|
+
matchAny: 'Match Any',
|
|
727
|
+
addRule: 'Add Rule',
|
|
728
|
+
removeRule: 'Remove Rule',
|
|
729
|
+
accept: 'Yes',
|
|
730
|
+
reject: 'No',
|
|
731
|
+
choose: 'Choose',
|
|
732
|
+
upload: 'Upload',
|
|
733
|
+
cancel: 'Cancel',
|
|
734
|
+
completed: 'Completed',
|
|
735
|
+
pending: 'Pending',
|
|
736
|
+
fileSizeTypes: ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],
|
|
737
|
+
dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
|
738
|
+
dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
739
|
+
dayNamesMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
|
740
|
+
monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
|
741
|
+
monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
742
|
+
today: 'Today',
|
|
743
|
+
weekHeader: 'Wk',
|
|
744
|
+
firstDayOfWeek: 0,
|
|
745
|
+
showMonthAfterYear: false,
|
|
746
|
+
dateFormat: 'mm/dd/yy',
|
|
747
|
+
weak: 'Weak',
|
|
748
|
+
medium: 'Medium',
|
|
749
|
+
strong: 'Strong',
|
|
750
|
+
passwordPrompt: 'Enter a password',
|
|
751
|
+
emptyFilterMessage: 'No available options',
|
|
752
|
+
emptyMessage: 'No results found',
|
|
753
|
+
aria: {
|
|
754
|
+
trueLabel: 'True',
|
|
755
|
+
falseLabel: 'False',
|
|
756
|
+
nullLabel: 'Not Selected',
|
|
757
|
+
star: '1 star',
|
|
758
|
+
stars: '{star} stars',
|
|
759
|
+
selectAll: 'All items selected',
|
|
760
|
+
unselectAll: 'All items unselected',
|
|
761
|
+
close: 'Close',
|
|
762
|
+
previous: 'Previous',
|
|
763
|
+
next: 'Next',
|
|
764
|
+
navigation: 'Navigation',
|
|
765
|
+
scrollTop: 'Scroll Top',
|
|
766
|
+
moveTop: 'Move Top',
|
|
767
|
+
moveUp: 'Move Up',
|
|
768
|
+
moveDown: 'Move Down',
|
|
769
|
+
moveBottom: 'Move Bottom',
|
|
770
|
+
moveToTarget: 'Move to Target',
|
|
771
|
+
moveToSource: 'Move to Source',
|
|
772
|
+
moveAllToTarget: 'Move All to Target',
|
|
773
|
+
moveAllToSource: 'Move All to Source',
|
|
774
|
+
pageLabel: 'Page {page}',
|
|
775
|
+
firstPageLabel: 'First Page',
|
|
776
|
+
lastPageLabel: 'Last Page',
|
|
777
|
+
nextPageLabel: 'Next Page',
|
|
778
|
+
previousPageLabel: 'Previous Page',
|
|
779
|
+
rowsPerPageLabel: 'Rows per page',
|
|
780
|
+
jumpToPageDropdownLabel: 'Jump to Page Dropdown',
|
|
781
|
+
jumpToPageInputLabel: 'Jump to Page Input',
|
|
782
|
+
selectRow: 'Row Selected',
|
|
783
|
+
unselectRow: 'Row Unselected',
|
|
784
|
+
expandRow: 'Row Expanded',
|
|
785
|
+
collapseRow: 'Row Collapsed',
|
|
786
|
+
showFilterMenu: 'Show Filter Menu',
|
|
787
|
+
hideFilterMenu: 'Hide Filter Menu',
|
|
788
|
+
filterOperator: 'Filter Operator',
|
|
789
|
+
filterConstraint: 'Filter Constraint',
|
|
790
|
+
editRow: 'Row Edit',
|
|
791
|
+
saveEdit: 'Save Edit',
|
|
792
|
+
cancelEdit: 'Cancel Edit',
|
|
793
|
+
listView: 'List View',
|
|
794
|
+
gridView: 'Grid View',
|
|
795
|
+
slide: 'Slide',
|
|
796
|
+
slideNumber: '{slideNumber}',
|
|
797
|
+
zoomImage: 'Zoom Image',
|
|
798
|
+
zoomIn: 'Zoom In',
|
|
799
|
+
zoomOut: 'Zoom Out',
|
|
800
|
+
rotateRight: 'Rotate Right',
|
|
801
|
+
rotateLeft: 'Rotate Left',
|
|
802
|
+
selectLabel: 'Select',
|
|
803
|
+
unselectLabel: 'Unselect',
|
|
804
|
+
expandLabel: 'Expand',
|
|
805
|
+
collapseLabel: 'Collapse'
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
};
|
|
809
|
+
|
|
810
|
+
/**
|
|
811
|
+
* Find an ARIA label in the locale by key. If options are passed it will replace all options:
|
|
812
|
+
* ```ts
|
|
813
|
+
* const ariaValue = "Page {page}, User {user}, Role {role}";
|
|
814
|
+
* const options = { page: 2, user: "John", role: "Admin" };
|
|
815
|
+
* const result = ariaLabel('yourLabel', { page: 2, user: "John", role: "Admin" })
|
|
816
|
+
* console.log(result); // Output: Page 2, User John, Role Admin
|
|
817
|
+
* ```
|
|
818
|
+
* @param {string} ariaKey key of the ARIA label to look up in locale.
|
|
819
|
+
* @param {any} options JSON options like { page: 2, user: "John", role: "Admin" }
|
|
820
|
+
* @returns the ARIA label with replaced values
|
|
821
|
+
*/
|
|
822
|
+
function ariaLabel(ariaKey, options) {
|
|
823
|
+
var _locale = PrimeReact.locale;
|
|
824
|
+
try {
|
|
825
|
+
var _ariaLabel = localeOptions(_locale)['aria'][ariaKey];
|
|
826
|
+
if (_ariaLabel) {
|
|
827
|
+
for (var key in options) {
|
|
828
|
+
if (options.hasOwnProperty(key)) {
|
|
829
|
+
_ariaLabel = _ariaLabel.replace("{".concat(key, "}"), options[key]);
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
return _ariaLabel;
|
|
834
|
+
} catch (error) {
|
|
835
|
+
throw new Error("The ".concat(ariaKey, " option is not found in the current locale('").concat(_locale, "')."));
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
function localeOptions(locale) {
|
|
839
|
+
var _locale = locale || PrimeReact.locale;
|
|
840
|
+
return locales[_locale];
|
|
841
|
+
}
|
|
842
|
+
|
|
628
843
|
var PickListTransferControls = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
629
844
|
var viewChanged = hooks.useMatchMedia("(max-width: ".concat(props.breakpoint, ")"), props.breakpoint);
|
|
630
845
|
var ptm = props.ptm,
|
|
@@ -754,6 +969,7 @@ var PickListTransferControls = /*#__PURE__*/React__namespace.memo(function (prop
|
|
|
754
969
|
onClick: moveRight,
|
|
755
970
|
pt: ptm('moveToTargetButton'),
|
|
756
971
|
unstyled: unstyled,
|
|
972
|
+
"aria-label": ariaLabel('moveToTarget'),
|
|
757
973
|
__parentMetadata: {
|
|
758
974
|
parent: props.metaData
|
|
759
975
|
}
|
|
@@ -764,6 +980,7 @@ var PickListTransferControls = /*#__PURE__*/React__namespace.memo(function (prop
|
|
|
764
980
|
onClick: moveAllRight,
|
|
765
981
|
pt: ptm('moveAllToTargetButton'),
|
|
766
982
|
unstyled: unstyled,
|
|
983
|
+
"aria-label": ariaLabel('moveAllToTarget'),
|
|
767
984
|
__parentMetadata: {
|
|
768
985
|
parent: props.metaData
|
|
769
986
|
}
|
|
@@ -774,6 +991,7 @@ var PickListTransferControls = /*#__PURE__*/React__namespace.memo(function (prop
|
|
|
774
991
|
onClick: moveLeft,
|
|
775
992
|
pt: ptm('moveToSourceButton'),
|
|
776
993
|
unstyled: unstyled,
|
|
994
|
+
"aria-label": ariaLabel('moveToSource'),
|
|
777
995
|
__parentMetadata: {
|
|
778
996
|
parent: props.metaData
|
|
779
997
|
}
|
|
@@ -784,6 +1002,7 @@ var PickListTransferControls = /*#__PURE__*/React__namespace.memo(function (prop
|
|
|
784
1002
|
onClick: moveAllLeft,
|
|
785
1003
|
pt: ptm('moveAllToSourceButton'),
|
|
786
1004
|
unstyled: unstyled,
|
|
1005
|
+
"aria-label": ariaLabel('moveAllToSource'),
|
|
787
1006
|
__parentMetadata: {
|
|
788
1007
|
parent: props.metaData
|
|
789
1008
|
}
|
|
@@ -791,8 +1010,10 @@ var PickListTransferControls = /*#__PURE__*/React__namespace.memo(function (prop
|
|
|
791
1010
|
});
|
|
792
1011
|
PickListTransferControls.displayName = 'PickListTransferControls';
|
|
793
1012
|
|
|
1013
|
+
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; }
|
|
1014
|
+
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
1015
|
var PickList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
795
|
-
var context = React__namespace.useContext(PrimeReact.PrimeReactContext);
|
|
1016
|
+
var context = React__namespace.useContext(PrimeReact$1.PrimeReactContext);
|
|
796
1017
|
var props = PickListBase.getProps(inProps, context);
|
|
797
1018
|
var _React$useState = React__namespace.useState([]),
|
|
798
1019
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -810,10 +1031,25 @@ var PickList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
810
1031
|
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
811
1032
|
targetFilterValueState = _React$useState8[0],
|
|
812
1033
|
setTargetFilterValueState = _React$useState8[1];
|
|
813
|
-
var _React$useState9 = React__namespace.useState(
|
|
1034
|
+
var _React$useState9 = React__namespace.useState(props.id),
|
|
814
1035
|
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
815
1036
|
attributeSelectorState = _React$useState10[0],
|
|
816
1037
|
setAttributeSelectorState = _React$useState10[1];
|
|
1038
|
+
var _React$useState11 = React__namespace.useState(-1),
|
|
1039
|
+
_React$useState12 = _slicedToArray(_React$useState11, 2),
|
|
1040
|
+
focusedOptionIndex = _React$useState12[0],
|
|
1041
|
+
setFocusedOptionIndex = _React$useState12[1];
|
|
1042
|
+
var _React$useState13 = React__namespace.useState(null),
|
|
1043
|
+
_React$useState14 = _slicedToArray(_React$useState13, 2),
|
|
1044
|
+
focusedOptionId = _React$useState14[0],
|
|
1045
|
+
setFocusedOptionId = _React$useState14[1];
|
|
1046
|
+
var _React$useState15 = React__namespace.useState({
|
|
1047
|
+
source: false,
|
|
1048
|
+
target: false
|
|
1049
|
+
}),
|
|
1050
|
+
_React$useState16 = _slicedToArray(_React$useState15, 2),
|
|
1051
|
+
focused = _React$useState16[0],
|
|
1052
|
+
setFocused = _React$useState16[1];
|
|
817
1053
|
var metaData = {
|
|
818
1054
|
props: props,
|
|
819
1055
|
state: {
|
|
@@ -846,31 +1082,30 @@ var PickList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
846
1082
|
var showTargetFilter = hasFilterBy && props.showTargetFilter;
|
|
847
1083
|
var onSourceReorder = function onSourceReorder(event) {
|
|
848
1084
|
handleChange(event, event.value, props.target);
|
|
849
|
-
reorderedListElementRef.current =
|
|
1085
|
+
reorderedListElementRef.current = getListElement('source');
|
|
850
1086
|
reorderDirection.current = event.direction;
|
|
851
1087
|
};
|
|
852
1088
|
var onTargetReorder = function onTargetReorder(event) {
|
|
853
1089
|
handleChange(event, props.source, event.value);
|
|
854
|
-
reorderedListElementRef.current =
|
|
1090
|
+
reorderedListElementRef.current = getListElement('target');
|
|
855
1091
|
reorderDirection.current = event.direction;
|
|
856
1092
|
};
|
|
857
1093
|
var handleScrollPosition = function handleScrollPosition(listElement, direction) {
|
|
858
1094
|
if (listElement) {
|
|
859
|
-
var list = utils.DomHandler.findSingle(listElement, '[data-pc-section="list"]');
|
|
860
1095
|
switch (direction) {
|
|
861
1096
|
case 'up':
|
|
862
|
-
scrollInView(
|
|
1097
|
+
scrollInView(listElement, -1);
|
|
863
1098
|
break;
|
|
864
1099
|
case 'top':
|
|
865
|
-
|
|
1100
|
+
listElement.scrollTop = 0;
|
|
866
1101
|
break;
|
|
867
1102
|
case 'down':
|
|
868
|
-
scrollInView(
|
|
1103
|
+
scrollInView(listElement, 1);
|
|
869
1104
|
break;
|
|
870
1105
|
case 'bottom':
|
|
871
1106
|
/* TODO: improve this code block */
|
|
872
1107
|
setTimeout(function () {
|
|
873
|
-
return
|
|
1108
|
+
return listElement.scrollTop = listElement.scrollHeight;
|
|
874
1109
|
}, 100);
|
|
875
1110
|
break;
|
|
876
1111
|
}
|
|
@@ -976,13 +1211,6 @@ var PickList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
976
1211
|
setFilterState(value);
|
|
977
1212
|
}
|
|
978
1213
|
};
|
|
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
1214
|
var filterSource = function filterSource() {
|
|
987
1215
|
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
988
1216
|
var filteredValue = value.trim().toLocaleLowerCase(props.filterLocale);
|
|
@@ -995,11 +1223,273 @@ var PickList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
995
1223
|
};
|
|
996
1224
|
var filter = function filter(list, filterValue) {
|
|
997
1225
|
var searchFields = hasFilterBy ? props.filterBy.split(',') : [];
|
|
998
|
-
return PrimeReact.FilterService.filter(list, searchFields, filterValue, props.filterMatchMode, props.filterLocale);
|
|
1226
|
+
return PrimeReact$1.FilterService.filter(list, searchFields, filterValue, props.filterMatchMode, props.filterLocale);
|
|
1227
|
+
};
|
|
1228
|
+
var getVisibleList = function getVisibleList(list, type) {
|
|
1229
|
+
var _ref3 = type === 'source' ? [sourceFilteredValue, filterSource] : [targetFilteredValue, filterTarget],
|
|
1230
|
+
_ref4 = _slicedToArray(_ref3, 2),
|
|
1231
|
+
filteredValue = _ref4[0],
|
|
1232
|
+
filterCallback = _ref4[1];
|
|
1233
|
+
return hasFilterBy && utils.ObjectUtils.isNotEmpty(filteredValue) ? filterCallback(filteredValue) : list;
|
|
1234
|
+
};
|
|
1235
|
+
var sourceList = getVisibleList(props.source, 'source');
|
|
1236
|
+
var targetList = getVisibleList(props.target, 'target');
|
|
1237
|
+
var _onListFocus = function onListFocus(event, type) {
|
|
1238
|
+
var listElement = getListElement(type);
|
|
1239
|
+
var selectedFirstItem = utils.DomHandler.findSingle(listElement, '[data-p-highlight="true"]') || utils.DomHandler.findSingle(listElement, '[data-pc-section="item"]');
|
|
1240
|
+
var itemList = listElement && listElement.children ? _toConsumableArray(listElement.children) : [];
|
|
1241
|
+
if (selectedFirstItem) {
|
|
1242
|
+
var findIndex = utils.ObjectUtils.findIndexInList(selectedFirstItem, itemList);
|
|
1243
|
+
setFocused(_objectSpread(_objectSpread({}, focused), {}, _defineProperty({}, type, true)));
|
|
1244
|
+
var index = focusedOptionIndex !== -1 ? focusedOptionIndex : selectedFirstItem ? findIndex : -1;
|
|
1245
|
+
changeFocusedOptionIndex(index, type);
|
|
1246
|
+
props.onFocus && props.onFocus(event);
|
|
1247
|
+
}
|
|
1248
|
+
};
|
|
1249
|
+
var _onListBlur = function onListBlur(event, type) {
|
|
1250
|
+
setFocused(_objectSpread(_objectSpread({}, focused), {}, _defineProperty({}, type, false)));
|
|
1251
|
+
setFocusedOptionIndex(-1);
|
|
1252
|
+
props.onBlur && props.onBlur(event);
|
|
1253
|
+
};
|
|
1254
|
+
var _onItemClick = function onItemClick(event, type) {
|
|
1255
|
+
var arrowKeyClick = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
1256
|
+
var originalEvent = event.originalEvent;
|
|
1257
|
+
var item = event.value;
|
|
1258
|
+
var selectedId = event.id;
|
|
1259
|
+
var isSource = type === 'source';
|
|
1260
|
+
var selection = _toConsumableArray(isSource ? sourceSelection : targetSelection);
|
|
1261
|
+
var index = utils.ObjectUtils.findIndexInList(item, selection, props.dataKey);
|
|
1262
|
+
var selected = index !== -1;
|
|
1263
|
+
var metaSelection = props.metaKeySelection;
|
|
1264
|
+
if (!arrowKeyClick) setFocusedOptionIndex(selectedId);
|
|
1265
|
+
if (metaSelection) {
|
|
1266
|
+
var metaKey = originalEvent.metaKey || originalEvent.ctrlKey || originalEvent.shiftKey;
|
|
1267
|
+
if (selected && metaKey) {
|
|
1268
|
+
selection.splice(index, 1);
|
|
1269
|
+
} else {
|
|
1270
|
+
if (!metaKey) {
|
|
1271
|
+
selection.length = 0;
|
|
1272
|
+
}
|
|
1273
|
+
selection.push(item);
|
|
1274
|
+
}
|
|
1275
|
+
} else {
|
|
1276
|
+
if (selected) selection.splice(index, 1);else selection.push(item);
|
|
1277
|
+
}
|
|
1278
|
+
if (isSource) {
|
|
1279
|
+
_onSelectionChange({
|
|
1280
|
+
originalEvent: originalEvent,
|
|
1281
|
+
value: selection
|
|
1282
|
+
}, 'sourceSelection', props.onSourceSelectionChange);
|
|
1283
|
+
} else {
|
|
1284
|
+
_onSelectionChange({
|
|
1285
|
+
originalEvent: originalEvent,
|
|
1286
|
+
value: selection
|
|
1287
|
+
}, 'targetSelection', props.onTargetSelectionChange);
|
|
1288
|
+
}
|
|
1289
|
+
};
|
|
1290
|
+
var _onOptionMouseDown = function onOptionMouseDown(_ref5) {
|
|
1291
|
+
var index = _ref5.index,
|
|
1292
|
+
type = _ref5.type;
|
|
1293
|
+
setFocused(_objectSpread(_objectSpread({}, focused), {}, _defineProperty({}, type, true)));
|
|
1294
|
+
setFocusedOptionIndex(index);
|
|
1295
|
+
};
|
|
1296
|
+
var _onListKeyDown = function onListKeyDown(event, type) {
|
|
1297
|
+
switch (event.code) {
|
|
1298
|
+
case 'ArrowDown':
|
|
1299
|
+
onArrowDownKey(event, type);
|
|
1300
|
+
break;
|
|
1301
|
+
case 'ArrowUp':
|
|
1302
|
+
onArrowUpKey(event, type);
|
|
1303
|
+
break;
|
|
1304
|
+
case 'Home':
|
|
1305
|
+
onHomeKey(event, type);
|
|
1306
|
+
break;
|
|
1307
|
+
case 'End':
|
|
1308
|
+
onEndKey(event, type);
|
|
1309
|
+
break;
|
|
1310
|
+
case 'Enter':
|
|
1311
|
+
case 'NumpadEnter':
|
|
1312
|
+
onEnterKey(event, type);
|
|
1313
|
+
break;
|
|
1314
|
+
case 'Space':
|
|
1315
|
+
onSpaceKey(event, type);
|
|
1316
|
+
break;
|
|
1317
|
+
case 'KeyA':
|
|
1318
|
+
if (event.ctrlKey) {
|
|
1319
|
+
var isSource = type === 'source';
|
|
1320
|
+
if (isSource) setSourceSelectionState(_toConsumableArray(sourceList));else setTargetSelectionState(_toConsumableArray(targetList));
|
|
1321
|
+
_onSelectionChange({
|
|
1322
|
+
originalEvent: event,
|
|
1323
|
+
value: _toConsumableArray(sourceList)
|
|
1324
|
+
}, isSource ? 'sourceSelection' : 'targetSelection', isSource ? props.onSourceSelectionChange : props.onTargetSelectionChange);
|
|
1325
|
+
event.preventDefault();
|
|
1326
|
+
}
|
|
1327
|
+
}
|
|
1328
|
+
};
|
|
1329
|
+
var onArrowDownKey = function onArrowDownKey(event, type) {
|
|
1330
|
+
var optionIndex = findNextOptionIndex(focusedOptionIndex, type);
|
|
1331
|
+
var visibleList = getVisibleList(type === 'source' ? props.source : props.target, type);
|
|
1332
|
+
changeFocusedOptionIndex(optionIndex, type);
|
|
1333
|
+
if (visibleList && visibleList.length > 0 && event.shiftKey) {
|
|
1334
|
+
_onItemClick({
|
|
1335
|
+
originalEvent: event,
|
|
1336
|
+
value: visibleList[optionIndex]
|
|
1337
|
+
}, type, true);
|
|
1338
|
+
}
|
|
1339
|
+
event.preventDefault();
|
|
1340
|
+
};
|
|
1341
|
+
var onArrowUpKey = function onArrowUpKey(event, type) {
|
|
1342
|
+
var optionIndex = findPrevOptionIndex(focusedOptionIndex, type);
|
|
1343
|
+
var visibleList = getVisibleList(type === 'source' ? props.source : props.target, type);
|
|
1344
|
+
changeFocusedOptionIndex(optionIndex, type);
|
|
1345
|
+
if (visibleList && visibleList.length > 0 && event.shiftKey) {
|
|
1346
|
+
_onItemClick({
|
|
1347
|
+
originalEvent: event,
|
|
1348
|
+
value: visibleList[optionIndex]
|
|
1349
|
+
}, type, true);
|
|
1350
|
+
}
|
|
1351
|
+
event.preventDefault();
|
|
1352
|
+
};
|
|
1353
|
+
var onEnterKey = function onEnterKey(event, type) {
|
|
1354
|
+
var listElement = getListElement(type);
|
|
1355
|
+
var visibleList = getVisibleList(type === 'source' ? props.source : props.target, type);
|
|
1356
|
+
var items = utils.DomHandler.find(listElement, '[data-pc-section="item"]');
|
|
1357
|
+
var focusedItem = utils.DomHandler.findSingle(listElement, "[data-pc-section=\"item\"][id=".concat(focusedOptionIndex, "]"));
|
|
1358
|
+
var id = focusedItem && focusedItem.getAttribute('id');
|
|
1359
|
+
var matchedOptionIndex = _toConsumableArray(items).findIndex(function (item) {
|
|
1360
|
+
return item === focusedItem;
|
|
1361
|
+
});
|
|
1362
|
+
if (visibleList && visibleList.length > 0) {
|
|
1363
|
+
_onItemClick({
|
|
1364
|
+
originalEvent: event,
|
|
1365
|
+
value: visibleList[matchedOptionIndex],
|
|
1366
|
+
id: id
|
|
1367
|
+
}, type);
|
|
1368
|
+
}
|
|
1369
|
+
event.preventDefault();
|
|
1370
|
+
};
|
|
1371
|
+
var onSpaceKey = function onSpaceKey(event, type) {
|
|
1372
|
+
event.preventDefault();
|
|
1373
|
+
var isSource = type === 'source';
|
|
1374
|
+
var selection = isSource ? sourceSelectionState : targetSelectionState;
|
|
1375
|
+
if (event.shiftKey && selection && selection.length > 0) {
|
|
1376
|
+
var listItems = isSource ? sourceList : targetList;
|
|
1377
|
+
var listElement = getListElement(type);
|
|
1378
|
+
var items = utils.DomHandler.find(listElement, '[data-pc-section="item"]');
|
|
1379
|
+
var selectedItemIndex = utils.ObjectUtils.findIndexInList(selection[0], _toConsumableArray(listItems));
|
|
1380
|
+
var focusedItem = utils.DomHandler.findSingle(listElement, "[data-pc-section=\"item\"][id=".concat(focusedOptionIndex, "]"));
|
|
1381
|
+
var matchedOptionIndex = _toConsumableArray(items).findIndex(function (item) {
|
|
1382
|
+
return item === focusedItem;
|
|
1383
|
+
});
|
|
1384
|
+
_toConsumableArray(listItems).slice(Math.min(selectedItemIndex, matchedOptionIndex), Math.max(selectedItemIndex, matchedOptionIndex) + 1), _readOnlyError("selection");
|
|
1385
|
+
if (isSource) {
|
|
1386
|
+
_onSelectionChange({
|
|
1387
|
+
originalEvent: event,
|
|
1388
|
+
value: selection
|
|
1389
|
+
}, 'sourceSelection', props.onSourceSelectionChange);
|
|
1390
|
+
} else {
|
|
1391
|
+
_onSelectionChange({
|
|
1392
|
+
originalEvent: event,
|
|
1393
|
+
value: selection
|
|
1394
|
+
}, 'targetSelection', props.onTargetSelectionChange);
|
|
1395
|
+
}
|
|
1396
|
+
} else {
|
|
1397
|
+
onEnterKey(event, type);
|
|
1398
|
+
}
|
|
1399
|
+
};
|
|
1400
|
+
var onHomeKey = function onHomeKey(event, type) {
|
|
1401
|
+
if (event.ctrlKey && event.shiftKey) {
|
|
1402
|
+
var isSource = type === 'source';
|
|
1403
|
+
var listItems = isSource ? sourceList : targetList;
|
|
1404
|
+
var listElement = getListElement(type);
|
|
1405
|
+
var items = utils.DomHandler.find(listElement, '[data-pc-section="item"]');
|
|
1406
|
+
var focusedItem = utils.DomHandler.findSingle(listElement, "[data-pc-section=\"item\"][id=".concat(focusedOptionIndex, "]"));
|
|
1407
|
+
var matchedOptionIndex = _toConsumableArray(items).findIndex(function (item) {
|
|
1408
|
+
return item === focusedItem;
|
|
1409
|
+
});
|
|
1410
|
+
var selection = _toConsumableArray(listItems).slice(0, matchedOptionIndex + 1);
|
|
1411
|
+
if (isSource) {
|
|
1412
|
+
_onSelectionChange({
|
|
1413
|
+
originalEvent: event,
|
|
1414
|
+
value: selection
|
|
1415
|
+
}, 'sourceSelection', props.onSourceSelectionChange);
|
|
1416
|
+
} else {
|
|
1417
|
+
_onSelectionChange({
|
|
1418
|
+
originalEvent: event,
|
|
1419
|
+
value: selection
|
|
1420
|
+
}, 'targetSelection', props.onTargetSelectionChange);
|
|
1421
|
+
}
|
|
1422
|
+
} else {
|
|
1423
|
+
changeFocusedOptionIndex(0, type);
|
|
1424
|
+
}
|
|
1425
|
+
event.preventDefault();
|
|
1426
|
+
};
|
|
1427
|
+
var onEndKey = function onEndKey(event, type) {
|
|
1428
|
+
var listElement = getListElement(type);
|
|
1429
|
+
var items = utils.DomHandler.find(listElement, '[data-pc-section="item"]');
|
|
1430
|
+
if (event.ctrlKey && event.shiftKey) {
|
|
1431
|
+
var isSource = type === 'source';
|
|
1432
|
+
var listItems = isSource ? sourceList : targetList;
|
|
1433
|
+
var focusedItem = utils.DomHandler.findSingle(listElement, "[data-pc-section=\"item\"][id=".concat(focusedOptionIndex, "]"));
|
|
1434
|
+
var matchedOptionIndex = _toConsumableArray(items).findIndex(function (item) {
|
|
1435
|
+
return item === focusedItem;
|
|
1436
|
+
});
|
|
1437
|
+
var selection = _toConsumableArray(listItems).slice(matchedOptionIndex, items.length);
|
|
1438
|
+
if (isSource) {
|
|
1439
|
+
_onSelectionChange({
|
|
1440
|
+
originalEvent: event,
|
|
1441
|
+
value: selection
|
|
1442
|
+
}, 'sourceSelection', props.onSourceSelectionChange);
|
|
1443
|
+
} else {
|
|
1444
|
+
_onSelectionChange({
|
|
1445
|
+
originalEvent: event,
|
|
1446
|
+
value: selection
|
|
1447
|
+
}, 'targetSelection', props.onTargetSelectionChange);
|
|
1448
|
+
}
|
|
1449
|
+
} else {
|
|
1450
|
+
changeFocusedOptionIndex(items.length - 1, type);
|
|
1451
|
+
}
|
|
1452
|
+
event.preventDefault();
|
|
1453
|
+
};
|
|
1454
|
+
var findNextOptionIndex = function findNextOptionIndex(index, type) {
|
|
1455
|
+
var listElement = getListElement(type);
|
|
1456
|
+
var items = utils.DomHandler.find(listElement, '[data-pc-section="item"]');
|
|
1457
|
+
var matchedOptionIndex = _toConsumableArray(items).findIndex(function (link) {
|
|
1458
|
+
return link.id === index;
|
|
1459
|
+
});
|
|
1460
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex + 1 : 0;
|
|
1461
|
+
};
|
|
1462
|
+
var findPrevOptionIndex = function findPrevOptionIndex(index, type) {
|
|
1463
|
+
var listElement = getListElement(type);
|
|
1464
|
+
var items = utils.DomHandler.find(listElement, '[data-pc-section="item"]');
|
|
1465
|
+
var matchedOptionIndex = _toConsumableArray(items).findIndex(function (link) {
|
|
1466
|
+
return link.id === index;
|
|
1467
|
+
});
|
|
1468
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex - 1 : 0;
|
|
1469
|
+
};
|
|
1470
|
+
var changeFocusedOptionIndex = function changeFocusedOptionIndex(index, type) {
|
|
1471
|
+
var listElement = getListElement(type);
|
|
1472
|
+
var items = utils.DomHandler.find(listElement, '[data-pc-section="item"]');
|
|
1473
|
+
var order = index >= items.length ? items.length - 1 : index < 0 ? 0 : index;
|
|
1474
|
+
setFocusedOptionIndex(items[order].getAttribute('id'));
|
|
1475
|
+
scrollInViewWithFocus(items[order].getAttribute('id'), type);
|
|
1476
|
+
};
|
|
1477
|
+
var scrollInViewWithFocus = function scrollInViewWithFocus(id, type) {
|
|
1478
|
+
var listElement = getListElement(type);
|
|
1479
|
+
var element = utils.DomHandler.findSingle(listElement, "[data-pc-section=\"item\"][id=\"".concat(id, "\"]"));
|
|
1480
|
+
if (element) {
|
|
1481
|
+
element.scrollIntoView && element.scrollIntoView({
|
|
1482
|
+
block: 'nearest',
|
|
1483
|
+
inline: 'start'
|
|
1484
|
+
});
|
|
1485
|
+
}
|
|
1486
|
+
};
|
|
1487
|
+
var getListElement = function getListElement(type) {
|
|
1488
|
+
return type === 'source' ? sourceListElementRef.current.getElement() : targetListElementRef.current.getElement();
|
|
999
1489
|
};
|
|
1000
1490
|
var createStyle = function createStyle() {
|
|
1001
1491
|
if (!styleElementRef.current) {
|
|
1002
|
-
styleElementRef.current = utils.DomHandler.createInlineStyle(context && context.nonce || PrimeReact__default["default"].nonce);
|
|
1492
|
+
styleElementRef.current = utils.DomHandler.createInlineStyle(context && context.nonce || PrimeReact__default["default"].nonce, context && context.styleContainer);
|
|
1003
1493
|
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
1494
|
styleElementRef.current.innerHTML = innerHTML;
|
|
1005
1495
|
}
|
|
@@ -1015,9 +1505,6 @@ var PickList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
1015
1505
|
}
|
|
1016
1506
|
};
|
|
1017
1507
|
});
|
|
1018
|
-
hooks.useMountEffect(function () {
|
|
1019
|
-
!attributeSelectorState && setAttributeSelectorState(utils.UniqueComponentId());
|
|
1020
|
-
});
|
|
1021
1508
|
hooks.useUpdateEffect(function () {
|
|
1022
1509
|
if (attributeSelectorState) {
|
|
1023
1510
|
elementRef.current.setAttribute(attributeSelectorState, '');
|
|
@@ -1028,18 +1515,23 @@ var PickList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
1028
1515
|
};
|
|
1029
1516
|
}, [attributeSelectorState, props.breakpoint]);
|
|
1030
1517
|
hooks.useUpdateEffect(function () {
|
|
1518
|
+
if (!props.id && !attributeSelectorState) {
|
|
1519
|
+
setAttributeSelectorState(utils.UniqueComponentId());
|
|
1520
|
+
}
|
|
1031
1521
|
if (reorderedListElementRef.current) {
|
|
1032
1522
|
handleScrollPosition(reorderedListElementRef.current, reorderDirection.current);
|
|
1033
1523
|
reorderedListElementRef.current = null;
|
|
1034
1524
|
reorderDirection.current = null;
|
|
1035
1525
|
}
|
|
1036
1526
|
});
|
|
1527
|
+
hooks.useUpdateEffect(function () {
|
|
1528
|
+
var _focusedOptionId = focusedOptionIndex !== -1 ? focusedOptionIndex : null;
|
|
1529
|
+
setFocusedOptionId(_focusedOptionId);
|
|
1530
|
+
}, [focusedOptionIndex]);
|
|
1037
1531
|
var sourceItemTemplate = props.sourceItemTemplate ? props.sourceItemTemplate : props.itemTemplate;
|
|
1038
1532
|
var targetItemTemplate = props.targetItemTemplate ? props.targetItemTemplate : props.itemTemplate;
|
|
1039
|
-
var sourceList = getVisibleList(props.source, 'source');
|
|
1040
|
-
var targetList = getVisibleList(props.target, 'target');
|
|
1041
1533
|
var rootProps = utils.mergeProps({
|
|
1042
|
-
id:
|
|
1534
|
+
id: attributeSelectorState,
|
|
1043
1535
|
ref: elementRef,
|
|
1044
1536
|
className: utils.classNames(props.className, cx('root')),
|
|
1045
1537
|
style: props.style
|
|
@@ -1064,10 +1556,28 @@ var PickList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
1064
1556
|
ref: sourceListElementRef,
|
|
1065
1557
|
type: "source",
|
|
1066
1558
|
list: sourceList,
|
|
1559
|
+
parentId: attributeSelectorState,
|
|
1067
1560
|
selection: sourceSelection,
|
|
1068
1561
|
onSelectionChange: function onSelectionChange(e) {
|
|
1069
1562
|
return _onSelectionChange(e, 'sourceSelection', props.onSourceSelectionChange);
|
|
1070
1563
|
},
|
|
1564
|
+
onListKeyDown: function onListKeyDown(e) {
|
|
1565
|
+
return _onListKeyDown(e, 'source');
|
|
1566
|
+
},
|
|
1567
|
+
onListFocus: function onListFocus(e) {
|
|
1568
|
+
return _onListFocus(e, 'source');
|
|
1569
|
+
},
|
|
1570
|
+
onListBlur: function onListBlur(e) {
|
|
1571
|
+
return _onListBlur(e, 'source');
|
|
1572
|
+
},
|
|
1573
|
+
onOptionMouseDown: function onOptionMouseDown(index) {
|
|
1574
|
+
return _onOptionMouseDown(index);
|
|
1575
|
+
},
|
|
1576
|
+
onItemClick: function onItemClick(e) {
|
|
1577
|
+
return _onItemClick(e, 'source');
|
|
1578
|
+
},
|
|
1579
|
+
focusedOptionId: focused['source'] ? focusedOptionId : null,
|
|
1580
|
+
ariaActivedescendant: focused['source'] ? focusedOptionId : null,
|
|
1071
1581
|
itemTemplate: sourceItemTemplate,
|
|
1072
1582
|
header: props.sourceHeader,
|
|
1073
1583
|
style: props.sourceStyle,
|
|
@@ -1109,9 +1619,27 @@ var PickList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
1109
1619
|
type: "target",
|
|
1110
1620
|
list: targetList,
|
|
1111
1621
|
selection: targetSelection,
|
|
1622
|
+
parentId: attributeSelectorState,
|
|
1112
1623
|
onSelectionChange: function onSelectionChange(e) {
|
|
1113
1624
|
return _onSelectionChange(e, 'targetSelection', props.onTargetSelectionChange);
|
|
1114
1625
|
},
|
|
1626
|
+
onListKeyDown: function onListKeyDown(e) {
|
|
1627
|
+
return _onListKeyDown(e, 'target');
|
|
1628
|
+
},
|
|
1629
|
+
onListFocus: function onListFocus(e) {
|
|
1630
|
+
return _onListFocus(e, 'target');
|
|
1631
|
+
},
|
|
1632
|
+
onListBlur: function onListBlur(e) {
|
|
1633
|
+
return _onListBlur(e, 'target');
|
|
1634
|
+
},
|
|
1635
|
+
onOptionMouseDown: function onOptionMouseDown(index) {
|
|
1636
|
+
return _onOptionMouseDown(index);
|
|
1637
|
+
},
|
|
1638
|
+
onItemClick: function onItemClick(e) {
|
|
1639
|
+
return _onItemClick(e, 'target');
|
|
1640
|
+
},
|
|
1641
|
+
focusedOptionId: focused['target'] ? focusedOptionId : null,
|
|
1642
|
+
ariaActivedescendant: focused['target'] ? focusedOptionId : null,
|
|
1115
1643
|
itemTemplate: targetItemTemplate,
|
|
1116
1644
|
header: props.targetHeader,
|
|
1117
1645
|
style: props.targetStyle,
|