primereact 10.5.3 → 10.6.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 +1 -0
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +1 -0
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +1 -0
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +41 -9
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +1 -0
- package/api/api.esm.js +41 -9
- package/api/api.esm.min.js +1 -1
- package/api/api.js +41 -9
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +51 -54
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +51 -54
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +51 -54
- package/autocomplete/autocomplete.min.js +1 -1
- package/buttongroup/buttongroup.cjs.js +66 -0
- package/buttongroup/buttongroup.cjs.min.js +1 -0
- package/buttongroup/buttongroup.d.ts +86 -0
- package/buttongroup/buttongroup.esm.js +42 -0
- package/buttongroup/buttongroup.esm.min.js +1 -0
- package/buttongroup/buttongroup.js +65 -0
- package/buttongroup/buttongroup.min.js +1 -0
- package/buttongroup/package.json +7 -0
- package/calendar/calendar.cjs.js +217 -162
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +217 -162
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +217 -162
- package/calendar/calendar.min.js +1 -1
- package/carousel/carousel.cjs.js +8 -8
- package/carousel/carousel.esm.js +8 -8
- package/carousel/carousel.js +8 -8
- package/cascadeselect/cascadeselect.cjs.js +6 -8
- package/cascadeselect/cascadeselect.esm.js +6 -8
- package/cascadeselect/cascadeselect.js +6 -8
- package/checkbox/checkbox.cjs.js +5 -6
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +1 -1
- package/checkbox/checkbox.esm.js +5 -6
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +5 -6
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +1 -1
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.esm.js +1 -1
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +1 -1
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +8 -6
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +8 -6
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +8 -6
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +8 -6
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +8 -6
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +8 -6
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.d.ts +8 -52
- package/componentbase/componentbase.cjs.js +23 -11
- package/componentbase/componentbase.cjs.min.js +1 -1
- package/componentbase/componentbase.esm.js +23 -11
- package/componentbase/componentbase.esm.min.js +1 -1
- package/componentbase/componentbase.js +23 -11
- package/componentbase/componentbase.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +1 -1
- package/confirmpopup/confirmpopup.js +1 -1
- package/contextmenu/contextmenu.cjs.js +8 -5
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +8 -5
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +8 -5
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +969 -522
- package/core/core.min.js +10 -10
- package/csstransition/csstransition.cjs.js +17 -18
- package/csstransition/csstransition.esm.js +17 -18
- package/csstransition/csstransition.js +17 -18
- package/datascroller/datascroller.cjs.js +18 -20
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.esm.js +18 -20
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +18 -20
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +645 -376
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +5 -5
- package/datatable/datatable.esm.js +648 -379
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +646 -377
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +1 -1
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +1 -1
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +1 -1
- package/dataview/dataview.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +3 -4
- package/deferredcontent/deferredcontent.esm.js +3 -4
- package/deferredcontent/deferredcontent.js +3 -4
- package/dialog/dialog.cjs.js +22 -17
- package/dialog/dialog.esm.js +22 -17
- package/dialog/dialog.js +22 -17
- package/dock/dock.cjs.js +13 -4
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +13 -4
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +13 -4
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +66 -60
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +6 -1
- package/dropdown/dropdown.esm.js +66 -60
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +66 -60
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +74 -75
- package/editor/editor.esm.js +74 -75
- package/editor/editor.js +74 -75
- package/fieldset/fieldset.cjs.js +1 -1
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +1 -1
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +1 -1
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +21 -11
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +21 -11
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +21 -11
- package/fileupload/fileupload.min.js +1 -1
- package/floatlabel/floatlabel.cjs.js +67 -0
- package/floatlabel/floatlabel.cjs.min.js +1 -0
- package/floatlabel/floatlabel.d.ts +81 -0
- package/floatlabel/floatlabel.esm.js +43 -0
- package/floatlabel/floatlabel.esm.min.js +1 -0
- package/floatlabel/floatlabel.js +66 -0
- package/floatlabel/floatlabel.min.js +1 -0
- package/floatlabel/package.json +7 -0
- package/focustrap/focustrap.cjs.js +1 -1
- package/focustrap/focustrap.esm.js +1 -1
- package/focustrap/focustrap.js +1 -1
- package/galleria/galleria.cjs.js +4 -3
- 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 +4 -3
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.cjs.js +32 -11
- package/hooks/hooks.esm.js +32 -11
- package/hooks/hooks.js +32 -11
- package/iconfield/iconfield.cjs.js +121 -0
- package/iconfield/iconfield.cjs.min.js +1 -0
- package/iconfield/iconfield.d.ts +95 -0
- package/iconfield/iconfield.esm.js +113 -0
- package/iconfield/iconfield.esm.min.js +1 -0
- package/iconfield/iconfield.js +120 -0
- package/iconfield/iconfield.min.js +1 -0
- package/image/image.cjs.js +7 -3
- package/image/image.esm.js +7 -3
- package/image/image.js +7 -3
- package/inplace/inplace.cjs.js +1 -1
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +1 -1
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +1 -1
- package/inplace/inplace.min.js +1 -1
- package/inputicon/inputicon.cjs.js +107 -0
- package/inputicon/inputicon.cjs.min.js +1 -0
- package/inputicon/inputicon.d.ts +78 -0
- package/inputicon/inputicon.esm.js +99 -0
- package/inputicon/inputicon.esm.min.js +1 -0
- package/inputicon/inputicon.js +106 -0
- package/inputicon/inputicon.min.js +1 -0
- package/inputmask/inputmask.cjs.js +56 -36
- package/inputmask/inputmask.esm.js +56 -36
- package/inputmask/inputmask.js +56 -36
- package/inputnumber/inputnumber.cjs.js +27 -17
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +27 -17
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +27 -17
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +2 -2
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +2 -2
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +2 -2
- package/inputswitch/inputswitch.min.js +1 -1
- package/keyfilter/keyfilter.cjs.js +2 -2
- package/keyfilter/keyfilter.esm.js +2 -2
- package/keyfilter/keyfilter.js +2 -2
- package/knob/knob.cjs.js +14 -2
- package/knob/knob.esm.js +14 -2
- package/knob/knob.js +14 -2
- package/listbox/listbox.cjs.js +189 -67
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.d.ts +17 -12
- package/listbox/listbox.esm.js +189 -67
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +189 -67
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +94 -96
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +94 -96
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +94 -96
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +4 -6
- package/mention/mention.esm.js +4 -6
- package/mention/mention.js +4 -6
- package/menu/menu.cjs.js +5 -2
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +5 -2
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +5 -2
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +24 -23
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +24 -23
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +24 -23
- package/menubar/menubar.min.js +1 -1
- package/metergroup/metergroup.cjs.js +4 -5
- package/metergroup/metergroup.esm.js +4 -5
- package/metergroup/metergroup.js +4 -5
- package/multiselect/multiselect.cjs.js +203 -169
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +6 -1
- package/multiselect/multiselect.esm.js +203 -169
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +203 -169
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +227 -28
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +228 -29
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +228 -30
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +75 -50
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.d.ts +7 -2
- package/orderlist/orderlist.esm.js +75 -50
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +75 -50
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +7 -3
- package/organizationchart/organizationchart.esm.js +7 -3
- package/organizationchart/organizationchart.js +7 -3
- package/overlaypanel/overlaypanel.cjs.js +2 -2
- package/overlaypanel/overlaypanel.esm.js +2 -2
- package/overlaypanel/overlaypanel.js +2 -2
- package/package.json +1 -1
- package/paginator/paginator.cjs.js +19 -20
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +19 -20
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +19 -20
- package/paginator/paginator.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +18 -9
- package/panelmenu/panelmenu.esm.js +18 -9
- package/panelmenu/panelmenu.js +18 -9
- package/passthrough/tailwind/index.cjs.js +4 -2
- package/passthrough/tailwind/index.esm.js +4 -2
- package/passthrough/tailwind/index.js +4 -2
- package/password/password.cjs.js +3 -5
- package/password/password.esm.js +3 -5
- package/password/password.js +3 -5
- package/picklist/picklist.cjs.js +40 -11
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.d.ts +7 -2
- package/picklist/picklist.esm.js +40 -11
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +40 -11
- package/picklist/picklist.min.js +1 -1
- package/primereact.all.cjs.js +3576 -2762
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +3576 -2762
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +3576 -2762
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +6 -1
- package/progressbar/progressbar.esm.js +6 -1
- package/progressbar/progressbar.js +6 -1
- package/radiobutton/radiobutton.cjs.js +10 -12
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +10 -12
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +10 -12
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +4 -4
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +4 -4
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +4 -4
- package/rating/rating.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +378 -63
- package/resources/themes/arya-green/theme.css +378 -63
- package/resources/themes/arya-orange/theme.css +378 -63
- package/resources/themes/bootstrap4-dark-blue/theme.css +388 -73
- package/resources/themes/bootstrap4-dark-purple/theme.css +966 -188
- package/resources/themes/bootstrap4-light-blue/theme.css +388 -73
- package/resources/themes/bootstrap4-light-purple/theme.css +966 -188
- package/resources/themes/fluent-light/theme.css +372 -63
- package/resources/themes/lara-dark-amber/theme.css +396 -151
- package/resources/themes/lara-dark-blue/theme.css +396 -151
- package/resources/themes/lara-dark-cyan/theme.css +396 -151
- package/resources/themes/lara-dark-green/theme.css +396 -151
- package/resources/themes/lara-dark-indigo/theme.css +396 -151
- package/resources/themes/lara-dark-pink/theme.css +396 -151
- package/resources/themes/lara-dark-teal/theme.css +396 -151
- package/resources/themes/lara-light-amber/theme.css +392 -151
- package/resources/themes/lara-light-blue/theme.css +392 -151
- package/resources/themes/lara-light-cyan/theme.css +392 -151
- package/resources/themes/lara-light-green/theme.css +392 -151
- package/resources/themes/lara-light-indigo/theme.css +392 -151
- package/resources/themes/lara-light-pink/theme.css +392 -151
- package/resources/themes/lara-light-teal/theme.css +392 -151
- package/resources/themes/luna-amber/theme.css +378 -63
- package/resources/themes/luna-blue/theme.css +378 -63
- package/resources/themes/luna-green/theme.css +378 -63
- package/resources/themes/luna-pink/theme.css +378 -63
- package/resources/themes/md-dark-deeppurple/theme.css +323 -202
- package/resources/themes/md-dark-indigo/theme.css +444 -189
- package/resources/themes/md-light-deeppurple/theme.css +323 -202
- package/resources/themes/md-light-indigo/theme.css +444 -202
- package/resources/themes/mdc-dark-deeppurple/theme.css +323 -202
- package/resources/themes/mdc-dark-indigo/theme.css +444 -202
- package/resources/themes/mdc-light-deeppurple/theme.css +323 -202
- package/resources/themes/mdc-light-indigo/theme.css +444 -202
- package/resources/themes/mira/theme.css +378 -63
- package/resources/themes/nano/theme.css +378 -63
- package/resources/themes/nova/theme.css +378 -63
- package/resources/themes/nova-accent/theme.css +378 -63
- package/resources/themes/nova-alt/theme.css +378 -63
- package/resources/themes/rhea/theme.css +378 -63
- package/resources/themes/saga-blue/theme.css +378 -63
- package/resources/themes/saga-green/theme.css +378 -63
- package/resources/themes/saga-orange/theme.css +378 -63
- package/resources/themes/soho-dark/theme.css +388 -73
- package/resources/themes/soho-light/theme.css +388 -73
- package/resources/themes/tailwind-light/theme.css +378 -63
- package/resources/themes/vela-blue/theme.css +378 -63
- package/resources/themes/vela-green/theme.css +378 -63
- package/resources/themes/vela-orange/theme.css +378 -63
- package/resources/themes/viva-dark/theme.css +389 -74
- package/resources/themes/viva-light/theme.css +389 -74
- package/ripple/ripple.cjs.js +3 -1
- package/ripple/ripple.esm.js +3 -1
- package/ripple/ripple.js +3 -1
- package/scrollpanel/scrollpanel.cjs.js +2 -2
- package/scrollpanel/scrollpanel.esm.js +2 -2
- package/scrollpanel/scrollpanel.js +2 -2
- package/scrolltop/scrolltop.cjs.js +6 -2
- package/scrolltop/scrolltop.esm.js +6 -2
- package/scrolltop/scrolltop.js +6 -2
- package/selectbutton/selectbutton.cjs.js +20 -11
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +20 -11
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +20 -11
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/sidebar.cjs.js +1 -1
- package/sidebar/sidebar.esm.js +1 -1
- package/sidebar/sidebar.js +1 -1
- package/slidemenu/slidemenu.cjs.js +1 -1
- package/slidemenu/slidemenu.esm.js +1 -1
- package/slidemenu/slidemenu.js +1 -1
- package/slider/slider.cjs.js +37 -10
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +37 -10
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +37 -10
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +1 -0
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +1 -0
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +1 -0
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +18 -17
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +18 -17
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +18 -17
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +24 -7
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +24 -7
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +24 -7
- package/splitter/splitter.min.js +1 -1
- package/stepper/package.json +7 -0
- package/stepper/stepper.cjs.js +567 -0
- package/stepper/stepper.cjs.min.js +1 -0
- package/stepper/stepper.d.ts +137 -0
- package/stepper/stepper.esm.js +541 -0
- package/stepper/stepper.esm.min.js +1 -0
- package/stepper/stepper.js +565 -0
- package/stepper/stepper.min.js +1 -0
- package/stepperpanel/package.json +7 -0
- package/stepperpanel/stepperpanel.cjs.js +56 -0
- package/stepperpanel/stepperpanel.cjs.min.js +1 -0
- package/stepperpanel/stepperpanel.d.ts +158 -0
- package/stepperpanel/stepperpanel.esm.js +32 -0
- package/stepperpanel/stepperpanel.esm.min.js +1 -0
- package/stepperpanel/stepperpanel.js +57 -0
- package/stepperpanel/stepperpanel.min.js +1 -0
- package/steps/steps.cjs.js +1 -0
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +1 -0
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +1 -0
- package/steps/steps.min.js +1 -1
- package/styleclass/styleclass.cjs.js +5 -1
- package/styleclass/styleclass.esm.js +5 -1
- package/styleclass/styleclass.js +5 -1
- package/tabmenu/tabmenu.cjs.js +1 -0
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +1 -0
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +1 -0
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +23 -18
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +23 -18
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +23 -18
- package/tabview/tabview.min.js +1 -1
- package/terminal/terminal.cjs.js +2 -1
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +2 -1
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +2 -1
- package/terminal/terminal.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +18 -17
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +18 -17
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +18 -17
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/toast/toast.cjs.js +1 -1
- package/toast/toast.esm.js +1 -1
- package/toast/toast.js +1 -1
- package/togglebutton/togglebutton.cjs.js +1 -1
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +1 -1
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +1 -1
- package/togglebutton/togglebutton.min.js +1 -1
- package/tooltip/tooltip.cjs.js +20 -17
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +20 -17
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +20 -17
- package/tooltip/tooltip.min.js +1 -1
- package/tree/tree.cjs.js +377 -148
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +378 -149
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +378 -150
- package/tree/tree.min.js +1 -1
- package/treeselect/treeselect.cjs.js +24 -17
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +2 -1
- package/treeselect/treeselect.esm.js +24 -17
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +24 -17
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +492 -295
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +4 -4
- package/treetable/treetable.esm.js +494 -297
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +493 -296
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +11 -5
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +11 -5
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +11 -5
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +262 -139
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +262 -139
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +262 -139
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +46 -43
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +46 -43
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +46 -43
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +502 -33
package/password/password.js
CHANGED
|
@@ -311,10 +311,8 @@ this.primereact.password = (function (exports, React, PrimeReact, componentbase,
|
|
|
311
311
|
if (label && infoTextState !== label) {
|
|
312
312
|
setInfoTextState(label);
|
|
313
313
|
}
|
|
314
|
-
} else {
|
|
315
|
-
|
|
316
|
-
setInfoTextState(promptLabel);
|
|
317
|
-
}
|
|
314
|
+
} else if (infoTextState !== promptLabel) {
|
|
315
|
+
setInfoTextState(promptLabel);
|
|
318
316
|
}
|
|
319
317
|
};
|
|
320
318
|
var updateFeedback = function updateFeedback(value) {
|
|
@@ -380,7 +378,7 @@ this.primereact.password = (function (exports, React, PrimeReact, componentbase,
|
|
|
380
378
|
}
|
|
381
379
|
};
|
|
382
380
|
var onOverlayEnter = function onOverlayEnter() {
|
|
383
|
-
utils.ZIndexUtils.set('overlay', overlayRef.current, context && context.autoZIndex || PrimeReact__default["default"].autoZIndex, context && context.zIndex
|
|
381
|
+
utils.ZIndexUtils.set('overlay', overlayRef.current, context && context.autoZIndex || PrimeReact__default["default"].autoZIndex, context && context.zIndex.overlay || PrimeReact__default["default"].zIndex.overlay);
|
|
384
382
|
utils.DomHandler.addStyles(overlayRef.current, {
|
|
385
383
|
position: 'absolute',
|
|
386
384
|
top: '0',
|
package/picklist/picklist.cjs.js
CHANGED
|
@@ -229,6 +229,7 @@ var PickListBase = componentbase.ComponentBase.extend({
|
|
|
229
229
|
tabIndex: 0,
|
|
230
230
|
dataKey: null,
|
|
231
231
|
autoOptionFocus: true,
|
|
232
|
+
focusOnHover: true,
|
|
232
233
|
breakpoint: '960px',
|
|
233
234
|
itemTemplate: null,
|
|
234
235
|
sourceItemTemplate: null,
|
|
@@ -459,6 +460,7 @@ var PickListItem = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
459
460
|
onKeyDown: onKeyDown,
|
|
460
461
|
onFocus: onFocus,
|
|
461
462
|
onMouseDown: onMouseDown,
|
|
463
|
+
onMouseMove: props.onMouseMove,
|
|
462
464
|
role: 'option',
|
|
463
465
|
'aria-selected': props.selected,
|
|
464
466
|
'data-p-highlight': props.selected,
|
|
@@ -514,6 +516,12 @@ var PickListSubList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
|
|
|
514
516
|
}
|
|
515
517
|
return null;
|
|
516
518
|
};
|
|
519
|
+
var changeFocusedItemOnHover = function changeFocusedItemOnHover(index) {
|
|
520
|
+
if (props.focusOnHover && props.focusedList[props.type]) {
|
|
521
|
+
var _props$changeFocusedO;
|
|
522
|
+
props === null || props === void 0 || (_props$changeFocusedO = props.changeFocusedOptionIndex) === null || _props$changeFocusedO === void 0 || _props$changeFocusedO.call(props, index, props.type);
|
|
523
|
+
}
|
|
524
|
+
};
|
|
517
525
|
var createItems = function createItems() {
|
|
518
526
|
if (props.list) {
|
|
519
527
|
return props.list.map(function (item, index) {
|
|
@@ -536,6 +544,9 @@ var PickListSubList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
|
|
|
536
544
|
type: props.type
|
|
537
545
|
}));
|
|
538
546
|
},
|
|
547
|
+
onMouseMove: function onMouseMove() {
|
|
548
|
+
return changeFocusedItemOnHover(index);
|
|
549
|
+
},
|
|
539
550
|
ptm: ptm,
|
|
540
551
|
cx: cx
|
|
541
552
|
});
|
|
@@ -846,7 +857,7 @@ var locales = {
|
|
|
846
857
|
function ariaLabel(ariaKey, options) {
|
|
847
858
|
var _locale = PrimeReact.locale;
|
|
848
859
|
try {
|
|
849
|
-
var _ariaLabel = localeOptions(_locale)
|
|
860
|
+
var _ariaLabel = localeOptions(_locale).aria[ariaKey];
|
|
850
861
|
if (_ariaLabel) {
|
|
851
862
|
for (var key in options) {
|
|
852
863
|
if (options.hasOwnProperty(key)) {
|
|
@@ -1210,7 +1221,11 @@ var PickList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
1210
1221
|
}
|
|
1211
1222
|
};
|
|
1212
1223
|
var _onSelectionChange = function onSelectionChange(e, stateKey, callback) {
|
|
1213
|
-
if (stateKey === 'sourceSelection')
|
|
1224
|
+
if (stateKey === 'sourceSelection') {
|
|
1225
|
+
setSourceSelectionState(e.value);
|
|
1226
|
+
} else {
|
|
1227
|
+
setTargetSelectionState(e.value);
|
|
1228
|
+
}
|
|
1214
1229
|
if (callback) {
|
|
1215
1230
|
callback(e);
|
|
1216
1231
|
}
|
|
@@ -1304,7 +1319,9 @@ var PickList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
1304
1319
|
var index = utils.ObjectUtils.findIndexInList(item, selection, props.dataKey);
|
|
1305
1320
|
var selected = index !== -1;
|
|
1306
1321
|
var metaSelection = props.metaKeySelection;
|
|
1307
|
-
if (!arrowKeyClick)
|
|
1322
|
+
if (!arrowKeyClick) {
|
|
1323
|
+
setFocusedOptionIndex(selectedId);
|
|
1324
|
+
}
|
|
1308
1325
|
if (metaSelection) {
|
|
1309
1326
|
var metaKey = originalEvent.metaKey || originalEvent.ctrlKey || originalEvent.shiftKey;
|
|
1310
1327
|
if (selected && metaKey) {
|
|
@@ -1315,8 +1332,10 @@ var PickList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
1315
1332
|
}
|
|
1316
1333
|
selection.push(item);
|
|
1317
1334
|
}
|
|
1335
|
+
} else if (selected) {
|
|
1336
|
+
selection.splice(index, 1);
|
|
1318
1337
|
} else {
|
|
1319
|
-
|
|
1338
|
+
selection.push(item);
|
|
1320
1339
|
}
|
|
1321
1340
|
if (isSource) {
|
|
1322
1341
|
_onSelectionChange({
|
|
@@ -1360,7 +1379,11 @@ var PickList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
1360
1379
|
case 'KeyA':
|
|
1361
1380
|
if (event.ctrlKey) {
|
|
1362
1381
|
var isSource = type === 'source';
|
|
1363
|
-
if (isSource)
|
|
1382
|
+
if (isSource) {
|
|
1383
|
+
setSourceSelectionState(_toConsumableArray(sourceList));
|
|
1384
|
+
} else {
|
|
1385
|
+
setTargetSelectionState(_toConsumableArray(targetList));
|
|
1386
|
+
}
|
|
1364
1387
|
_onSelectionChange({
|
|
1365
1388
|
originalEvent: event,
|
|
1366
1389
|
value: _toConsumableArray(sourceList)
|
|
@@ -1626,8 +1649,8 @@ var PickList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
1626
1649
|
onItemClick: function onItemClick(e) {
|
|
1627
1650
|
return _onItemClick(e, 'source');
|
|
1628
1651
|
},
|
|
1629
|
-
focusedOptionId: focused
|
|
1630
|
-
ariaActivedescendant: focused
|
|
1652
|
+
focusedOptionId: focused.source ? focusedOptionId : null,
|
|
1653
|
+
ariaActivedescendant: focused.source ? focusedOptionId : null,
|
|
1631
1654
|
itemTemplate: sourceItemTemplate,
|
|
1632
1655
|
header: props.sourceHeader,
|
|
1633
1656
|
style: props.sourceStyle,
|
|
@@ -1643,7 +1666,10 @@ var PickList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
1643
1666
|
filterTemplate: props.sourceFilterTemplate,
|
|
1644
1667
|
sourceFilterIcon: props.sourceFilterIcon,
|
|
1645
1668
|
ptm: ptm,
|
|
1646
|
-
cx: cx
|
|
1669
|
+
cx: cx,
|
|
1670
|
+
focusedList: focused,
|
|
1671
|
+
changeFocusedOptionIndex: changeFocusedOptionIndex,
|
|
1672
|
+
focusOnHover: props.focusOnHover
|
|
1647
1673
|
}), /*#__PURE__*/React__namespace.createElement(PickListTransferControls, {
|
|
1648
1674
|
hostName: "PickList",
|
|
1649
1675
|
onTransfer: onTransfer,
|
|
@@ -1688,8 +1714,8 @@ var PickList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
1688
1714
|
onItemClick: function onItemClick(e) {
|
|
1689
1715
|
return _onItemClick(e, 'target');
|
|
1690
1716
|
},
|
|
1691
|
-
focusedOptionId: focused
|
|
1692
|
-
ariaActivedescendant: focused
|
|
1717
|
+
focusedOptionId: focused.target ? focusedOptionId : null,
|
|
1718
|
+
ariaActivedescendant: focused.target ? focusedOptionId : null,
|
|
1693
1719
|
itemTemplate: targetItemTemplate,
|
|
1694
1720
|
header: props.targetHeader,
|
|
1695
1721
|
style: props.targetStyle,
|
|
@@ -1705,7 +1731,10 @@ var PickList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
1705
1731
|
filterTemplate: props.targetFilterTemplate,
|
|
1706
1732
|
targetFilterIcon: props.targetFilterIcon,
|
|
1707
1733
|
ptm: ptm,
|
|
1708
|
-
cx: cx
|
|
1734
|
+
cx: cx,
|
|
1735
|
+
focusedList: focused,
|
|
1736
|
+
changeFocusedOptionIndex: changeFocusedOptionIndex,
|
|
1737
|
+
focusOnHover: props.focusOnHover
|
|
1709
1738
|
}), props.showTargetControls && /*#__PURE__*/React__namespace.createElement(PickListControls, {
|
|
1710
1739
|
hostName: "PickList",
|
|
1711
1740
|
list: props.target,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/api"),n=require("primereact/componentbase"),o=require("primereact/hooks"),r=require("primereact/utils"),a=require("primereact/button"),l=require("primereact/icons/angledoubledown"),i=require("primereact/icons/angledoubleup"),c=require("primereact/icons/angledown"),s=require("primereact/icons/angleup"),u=require("primereact/icons/search"),p=require("primereact/ripple"),m=require("primereact/icons/angledoubleleft"),d=require("primereact/icons/angledoubleright"),f=require("primereact/icons/angleleft"),g=require("primereact/icons/angleright");function v(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function h(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var y=h(e),b=v(t);function T(e){throw new TypeError('"'+e+'" is read-only')}function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function I(e,t){if("object"!==S(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==S(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function E(e){var t=I(e,"string");return"symbol"===S(t)?t:String(t)}function w(e,t,n){return(t=E(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function A(e){if(Array.isArray(e))return N(e)}function O(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function D(e,t){if(e){if("string"==typeof e)return N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?N(e,t):void 0}}function k(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function C(e){return A(e)||O(e)||D(e)||k()}function L(e){if(Array.isArray(e))return e}function M(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,a,l,i=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=a.call(n)).done)&&(i.push(o.value),i.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(s)throw r}}return i}}function x(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function P(e,t){return L(e)||M(e,t)||D(e,t)||x()}var F=n.ComponentBase.extend({defaultProps:{__TYPE:"PickList",id:null,source:null,target:null,sourceHeader:null,targetHeader:null,style:null,className:null,sourceStyle:null,targetStyle:null,sourceSelection:null,targetSelection:null,showSourceControls:!0,showTargetControls:!0,metaKeySelection:!1,onFocus:null,onBlur:null,filter:!1,filterBy:null,filterMatchMode:"contains",targetFilterIcon:null,sourceFilterIcon:null,moveAllToSourceIcon:null,moveToSourceIcon:null,moveAllToTargetIcon:null,moveToTargetIcon:null,moveBottomIcon:null,moveUpIcon:null,moveTopIcon:null,moveDownIcon:null,filterLocale:void 0,sourceFilterValue:null,targetFilterValue:null,showSourceFilter:!0,showTargetFilter:!0,sourceFilterPlaceholder:null,targetFilterPlaceholder:null,sourceFilterTemplate:null,targetFilterTemplate:null,tabIndex:0,dataKey:null,autoOptionFocus:!0,breakpoint:"960px",itemTemplate:null,sourceItemTemplate:null,targetItemTemplate:null,onChange:null,onMoveToSource:null,onMoveAllToSource:null,onMoveToTarget:null,onMoveAllToTarget:null,onSourceSelectionChange:null,onTargetSelectionChange:null,onSourceFilterChange:null,onTargetFilterChange:null,children:void 0},css:{classes:{root:"p-picklist p-component",buttons:"p-picklist-buttons p-picklist-transfer-buttons",header:"p-picklist-header",filterIcon:"p-picklist-filter-icon",filter:"p-picklist-filter",filterInput:"p-picklist-filter-input p-inputtext p-component",filterContainer:"p-picklist-filter-container",list:"p-picklist-list",listWrapper:"p-picklist-list-wrapper",listSourceWrapper:"p-picklist-list-wrapper p-picklist-source-wrapper",listTargetWrapper:"p-picklist-list-wrapper p-picklist-target-wrapper",listSource:"p-picklist-list p-picklist-source",listTarget:"p-picklist-list p-picklist-target",item:function(e){return r.classNames("p-picklist-item",{"p-highlight":e.selected,"p-focus":e.focused})},sourceControls:"p-picklist-source-controls p-picklist-buttons",targetControls:"p-picklist-target-controls p-picklist-buttons"},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"}}),j=y.memo((function(e){var n=o.useMergeProps(),u=e.ptm,p=e.cx,m=e.unstyled,d=e.moveUpIcon||y.createElement(s.AngleUpIcon,null),f=e.moveTopIcon||y.createElement(i.AngleDoubleUpIcon,null),g=e.moveDownIcon||y.createElement(c.AngleDownIcon,null),v=e.moveBottomIcon||y.createElement(l.AngleDoubleDownIcon,null),h=!e.selection||!e.selection.length,b=n({className:r.classNames(e.className,p("controls"))},u("controls",{hostName:e.hostName}));return y.createElement("div",b,y.createElement(a.Button,{disabled:h,type:"button",icon:d,onClick:function(t){var n=e.selection;if(n&&n.length){for(var o=C(e.list),a=0;a<n.length;a++){var l=r.ObjectUtils.findIndexInList(n[a],o,e.dataKey);if(0===l)break;var i=o[l-1];o[l-1]=o[l],o[l]=i}e.onReorder&&e.onReorder({originalEvent:t,value:o,direction:"up"})}},pt:u("moveUpButton"),unstyled:m,"aria-label":t.ariaLabel("moveUp"),__parentMetadata:{parent:e.metaData}}),y.createElement(a.Button,{disabled:h,type:"button",icon:f,onClick:function(t){var n=e.selection;if(n&&n.length){for(var o=C(e.list),a=0;a<n.length;a++){var l=r.ObjectUtils.findIndexInList(n[a],o,e.dataKey);if(0===l)break;var i=o.splice(l,1)[0];o.unshift(i)}e.onReorder&&e.onReorder({originalEvent:t,value:o,direction:"top"})}},pt:u("moveTopButton"),unstyled:m,"aria-label":t.ariaLabel("moveTop"),__parentMetadata:{parent:e.metaData}}),y.createElement(a.Button,{disabled:h,type:"button",icon:g,onClick:function(t){var n=e.selection;if(n&&n.length){for(var o=C(e.list),a=n.length-1;a>=0;a--){var l=r.ObjectUtils.findIndexInList(n[a],o,e.dataKey);if(l===o.length-1)break;var i=o[l+1];o[l+1]=o[l],o[l]=i}e.onReorder&&e.onReorder({originalEvent:t,value:o,direction:"down"})}},pt:u("moveDownButton"),unstyled:m,"aria-label":t.ariaLabel("moveDown"),__parentMetadata:{parent:e.metaData}}),y.createElement(a.Button,{disabled:h,type:"button",icon:v,onClick:function(t){var n=e.selection;if(n&&n.length){for(var o=C(e.list),a=n.length-1;a>=0;a--){var l=r.ObjectUtils.findIndexInList(n[a],o,e.dataKey);if(l===o.length-1)break;var i=o.splice(l,1)[0];o.push(i)}e.onReorder&&e.onReorder({originalEvent:t,value:o,direction:"bottom"})}},pt:u("moveBottomButton"),unstyled:m,"aria-label":t.ariaLabel("moveBottom"),__parentMetadata:{parent:e.metaData}}))}));j.displayName="PickListControls";var U=y.memo((function(e){var t=o.useMergeProps(),n=e.ptm,a=e.cx,l=e.template?e.template(e.value):e.value,i=t({className:r.classNames(e.className,a("item",{selected:e.selected,focused:e.focused})),id:e.id,onClick:function(t){e.onClick&&e.onClick({originalEvent:t,value:e.value,id:e.id})},onKeyDown:function(t){e.onKeyDown&&e.onKeyDown({originalEvent:t,value:e.value})},onFocus:function(t){e.onFocus&&e.onFocus(t)},onMouseDown:function(t){e.onMouseDown&&e.onMouseDown(t)},role:"option","aria-selected":e.selected,"data-p-highlight":e.selected,"data-p-focused":e.focused},n("item",{hostName:e.hostName,context:{selected:e.selected}}));return y.createElement("li",i,l,y.createElement(p.Ripple,null))}));function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}U.displayName="PickListItem";var B=y.memo(y.forwardRef((function(e,t){var n=o.useMergeProps(),a=y.useRef(null),l=e.ptm,i=e.cx,c=function(t,n){return l(t,R({hostName:e.hostName},n))},s=function(t){return-1!==r.ObjectUtils.findIndexInList(t,e.selection,e.dataKey)},p=function(t){e.onFilter&&e.onFilter({originalEvent:t,value:t.target.value,type:e.type})},m=function(e){13===e.which&&e.preventDefault()};y.useImperativeHandle(t,(function(){return{getElement:function(){return a.current}}}));var d,f,g,v=(d=n({className:i("header")},c("header")),e.header?y.createElement("div",d,r.ObjectUtils.getJSXElement(e.header,e)):null),h=function(){var t=n({className:i("filterIcon")},c("filterIcon")),o=r.IconUtils.getJSXIcon("source"===e.type?e.sourceFilterIcon||y.createElement(u.SearchIcon,t):e.targetFilterIcon||y.createElement(u.SearchIcon,t),R({},t),{props:e});if(e.showFilter){var a=n({className:i("filter")},c("filter")),l=n({type:"text",value:e.filterValue,onChange:p,onKeyDown:m,placeholder:e.placeholder,className:i("filterInput")},c("filterInput")),s=y.createElement("div",a,y.createElement("input",l),y.createElement("span",null," ",o," "));if(e.filterTemplate)s=r.ObjectUtils.getJSXElement(e.filterTemplate,{className:"p-picklist-filter",inputProps:{className:"p-picklist-filter-input p-inputtext p-component",onChange:p,onKeyDown:m},iconClassName:"p-picklist-filter-icon",element:s,props:e});var d=n({className:i("filterContainer")},c("filterContainer"));return y.createElement("div",d,s)}return null}(),b=(f=e.list?e.list.map((function(t,n){var o=e.parentId+"_"+n,r=s(t);return y.createElement(U,{hostName:e.hostName,key:o,id:o,index:n,focused:o===e.focusedOptionId,value:t,template:e.itemTemplate,selected:r,onClick:e.onItemClick,onKeyDown:e.onItemKeyDown,onMouseDown:function(t){return e.onOptionMouseDown(R(R({},t),{},{index:n,type:e.type}))},ptm:l,cx:i})})):null,g=n({ref:a,className:r.classNames(e.listClassName,i("list")),role:"listbox",id:e.parentId+"_"+e.type+"_list","aria-multiselectable":!0,"aria-activedescendant":e.ariaActivedescendant,tabIndex:e.list&&e.list.length>0?e.tabIndex:-1,onKeyDown:e.onListKeyDown,onFocus:function(t){e.onListFocus(t,e.type)},onBlur:e.onListBlur,style:e.style},c("list")),y.createElement("ul",g,f)),T=n({className:r.classNames(e.className,i("listWrapper"))},c("listWrapper"));return y.createElement("div",T,v,h,b)})));function K(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,E(o.key),o)}}function H(e,t,n){return t&&K(e.prototype,t),n&&K(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}B.displayName="PickListSubList";var W=Object.freeze({STARTS_WITH:"startsWith",CONTAINS:"contains",NOT_CONTAINS:"notContains",ENDS_WITH:"endsWith",EQUALS:"equals",NOT_EQUALS:"notEquals",IN:"in",LESS_THAN:"lt",LESS_THAN_OR_EQUAL_TO:"lte",GREATER_THAN:"gt",GREATER_THAN_OR_EQUAL_TO:"gte",BETWEEN:"between",DATE_IS:"dateIs",DATE_IS_NOT:"dateIsNot",DATE_BEFORE:"dateBefore",DATE_AFTER:"dateAfter",CUSTOM:"custom"}),V=H((function e(){q(this,e)}));w(V,"ripple",!1),w(V,"inputStyle","outlined"),w(V,"locale","en"),w(V,"appendTo",null),w(V,"cssTransition",!0),w(V,"autoZIndex",!0),w(V,"hideOverlaysOnDocumentScrolling",!1),w(V,"nonce",null),w(V,"nullSortOrder",1),w(V,"zIndex",{modal:1100,overlay:1e3,menu:1e3,tooltip:1100,toast:1200}),w(V,"pt",void 0),w(V,"filterMatchModeOptions",{text:[W.STARTS_WITH,W.CONTAINS,W.NOT_CONTAINS,W.ENDS_WITH,W.EQUALS,W.NOT_EQUALS],numeric:[W.EQUALS,W.NOT_EQUALS,W.LESS_THAN,W.LESS_THAN_OR_EQUAL_TO,W.GREATER_THAN,W.GREATER_THAN_OR_EQUAL_TO],date:[W.DATE_IS,W.DATE_IS_NOT,W.DATE_BEFORE,W.DATE_AFTER]}),w(V,"changeTheme",(function(e,t,n,o){var r,a=document.getElementById(n),l=a.cloneNode(!0),i=a.getAttribute("href").replace(e,t);l.setAttribute("id",n+"-clone"),l.setAttribute("href",i),l.addEventListener("load",(function(){a.remove(),l.setAttribute("id",n),o&&o()})),null===(r=a.parentNode)||void 0===r||r.insertBefore(l,a.nextSibling)}));var J={en:{accept:"Yes",addRule:"Add Rule",am:"AM",apply:"Apply",cancel:"Cancel",choose:"Choose",chooseDate:"Choose Date",chooseMonth:"Choose Month",chooseYear:"Choose Year",clear:"Clear",completed:"Completed",contains:"Contains",custom:"Custom",dateAfter:"Date is after",dateBefore:"Date is before",dateFormat:"mm/dd/yy",dateIs:"Date is",dateIsNot:"Date is not",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],emptyFilterMessage:"No results found",emptyMessage:"No available options",emptySearchMessage:"No results found",emptySelectionMessage:"No selected item",endsWith:"Ends with",equals:"Equals",fileSizeTypes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"],filter:"Filter",firstDayOfWeek:0,gt:"Greater than",gte:"Greater than or equal to",lt:"Less than",lte:"Less than or equal to",matchAll:"Match All",matchAny:"Match Any",medium:"Medium",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],nextDecade:"Next Decade",nextHour:"Next Hour",nextMinute:"Next Minute",nextMonth:"Next Month",nextSecond:"Next Second",nextYear:"Next Year",noFilter:"No Filter",notContains:"Not contains",notEquals:"Not equals",now:"Now",passwordPrompt:"Enter a password",pending:"Pending",pm:"PM",prevDecade:"Previous Decade",prevHour:"Previous Hour",prevMinute:"Previous Minute",prevMonth:"Previous Month",prevSecond:"Previous Second",prevYear:"Previous Year",reject:"No",removeRule:"Remove Rule",searchMessage:"{0} results are available",selectionMessage:"{0} items selected",showMonthAfterYear:!1,startsWith:"Starts with",strong:"Strong",today:"Today",upload:"Upload",weak:"Weak",weekHeader:"Wk",aria:{cancelEdit:"Cancel Edit",close:"Close",collapseRow:"Row Collapsed",editRow:"Edit Row",expandRow:"Row Expanded",falseLabel:"False",filterConstraint:"Filter Constraint",filterOperator:"Filter Operator",firstPageLabel:"First Page",gridView:"Grid View",hideFilterMenu:"Hide Filter Menu",jumpToPageDropdownLabel:"Jump to Page Dropdown",jumpToPageInputLabel:"Jump to Page Input",lastPageLabel:"Last Page",listView:"List View",moveAllToSource:"Move All to Source",moveAllToTarget:"Move All to Target",moveBottom:"Move Bottom",moveDown:"Move Down",moveToSource:"Move to Source",moveToTarget:"Move to Target",moveTop:"Move Top",moveUp:"Move Up",navigation:"Navigation",next:"Next",nextPageLabel:"Next Page",nullLabel:"Not Selected",pageLabel:"Page {page}",otpLabel:"Please enter one time password character {0}",passwordHide:"Hide Password",passwordShow:"Show Password",previous:"Previous",previousPageLabel:"Previous Page",rotateLeft:"Rotate Left",rotateRight:"Rotate Right",rowsPerPageLabel:"Rows per page",saveEdit:"Save Edit",scrollTop:"Scroll Top",selectAll:"All items selected",selectRow:"Row Selected",showFilterMenu:"Show Filter Menu",slide:"Slide",slideNumber:"{slideNumber}",star:"1 star",stars:"{star} stars",trueLabel:"True",unselectAll:"All items unselected",unselectRow:"Row Unselected",zoomImage:"Zoom Image",zoomIn:"Zoom In",zoomOut:"Zoom Out"}}};function Q(e,t){var n=V.locale;try{var o=Y(n).aria[e];if(o)for(var r in t)t.hasOwnProperty(r)&&(o=o.replace("{".concat(r,"}"),t[r]));return o}catch(t){throw new Error("The ".concat(e," option is not found in the current locale('").concat(n,"')."))}}function Y(e){return J[e||V.locale]}var G=y.memo((function(e){var t=o.useMergeProps(),n=o.useMatchMedia("(max-width: ".concat(e.breakpoint,")"),e.breakpoint),u=e.ptm,p=e.cx,v=e.unstyled;function h(t){switch(t){case"moveToTargetIcon":return e.moveToTargetIcon||n?e.moveToTargetIcon||y.createElement(c.AngleDownIcon,null):e.moveToTargetIcon||y.createElement(g.AngleRightIcon,null);case"moveAllToTargetIcon":return e.moveAllToTargetIcon||n?e.moveAllToTargetIcon||y.createElement(l.AngleDoubleDownIcon,null):e.moveAllToTargetIcon||y.createElement(d.AngleDoubleRightIcon,null);case"moveToSourceIcon":return e.moveToSourceIcon||n?e.moveToSourceIcon||y.createElement(s.AngleUpIcon,null):e.moveToSourceIcon||y.createElement(f.AngleLeftIcon,null);case"moveAllToSourceIcon":return e.moveAllToSourceIcon||n?e.moveAllToSourceIcon||y.createElement(i.AngleDoubleUpIcon,null):e.moveAllToSourceIcon||y.createElement(m.AngleDoubleLeftIcon,null);default:return null}}var b=r.IconUtils.getJSXIcon(h("moveToTargetIcon"),void 0,{props:e,viewChanged:n}),T=r.IconUtils.getJSXIcon(h("moveAllToTargetIcon"),void 0,{props:e,viewChanged:n}),S=r.IconUtils.getJSXIcon(h("moveToSourceIcon"),void 0,{props:e,viewChanged:n}),I=r.IconUtils.getJSXIcon(h("moveAllToSourceIcon"),void 0,{props:e,viewChanged:n}),E=r.ObjectUtils.isEmpty(e.sourceSelection)||r.ObjectUtils.isEmpty(e.visibleSourceList),w=r.ObjectUtils.isEmpty(e.targetSelection)||r.ObjectUtils.isEmpty(e.visibleTargetList),N=r.ObjectUtils.isEmpty(e.visibleSourceList),A=r.ObjectUtils.isEmpty(e.visibleTargetList),O=t({className:r.classNames(e.className,p("buttons"))},u("buttons",{hostName:e.hostName}));return y.createElement("div",O,y.createElement(a.Button,{disabled:E,type:"button",icon:b,onClick:function(t){var n=e.sourceSelection;if(r.ObjectUtils.isNotEmpty(n)){for(var o=C(e.target),a=C(e.source),l=0;l<n.length;l++){var i=n[l];-1===r.ObjectUtils.findIndexInList(i,o,e.dataKey)&&o.push(a.splice(r.ObjectUtils.findIndexInList(i,a,e.dataKey),1)[0])}e.onTransfer&&e.onTransfer({originalEvent:t,source:a,target:o,direction:"toTarget"})}},pt:u("moveToTargetButton"),unstyled:v,"aria-label":Q("moveToTarget"),__parentMetadata:{parent:e.metaData}}),y.createElement(a.Button,{disabled:N,type:"button",icon:T,onClick:function(t){if(e.source){var n=[].concat(C(e.target),C(e.visibleSourceList)),o=e.source.filter((function(t){return!e.visibleSourceList.some((function(e){return e===t}))}));e.onTransfer&&e.onTransfer({originalEvent:t,source:o,target:n,direction:"allToTarget"})}},pt:u("moveAllToTargetButton"),unstyled:v,"aria-label":Q("moveAllToTarget"),__parentMetadata:{parent:e.metaData}}),y.createElement(a.Button,{disabled:w,type:"button",icon:S,onClick:function(t){var n=e.targetSelection;if(r.ObjectUtils.isNotEmpty(n)){for(var o=C(e.target),a=C(e.source),l=0;l<n.length;l++){var i=n[l];-1===r.ObjectUtils.findIndexInList(i,a,e.dataKey)&&a.push(o.splice(r.ObjectUtils.findIndexInList(i,o,e.dataKey),1)[0])}e.onTransfer&&e.onTransfer({originalEvent:t,source:a,target:o,direction:"toSource"})}},pt:u("moveToSourceButton"),unstyled:v,"aria-label":Q("moveToSource"),__parentMetadata:{parent:e.metaData}}),y.createElement(a.Button,{disabled:A,type:"button",icon:I,onClick:function(t){if(e.source){var n=[].concat(C(e.source),C(e.visibleTargetList)),o=e.target.filter((function(t){return!e.visibleTargetList.some((function(e){return e===t}))}));e.onTransfer&&e.onTransfer({originalEvent:t,source:n,target:o,direction:"allToSource"})}},pt:u("moveAllToSourceButton"),unstyled:v,"aria-label":Q("moveAllToSource"),__parentMetadata:{parent:e.metaData}}))}));function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}G.displayName="PickListTransferControls";var Z=y.memo(y.forwardRef((function(e,a){var l=o.useMergeProps(),i=y.useContext(t.PrimeReactContext),c=F.getProps(e,i),s=P(y.useState([]),2),u=s[0],p=s[1],m=P(y.useState([]),2),d=m[0],f=m[1],g=P(y.useState(""),2),v=g[0],h=g[1],S=P(y.useState(""),2),I=S[0],E=S[1],N=P(y.useState(c.id),2),A=N[0],O=N[1],D=P(y.useState(-1),2),k=D[0],L=D[1],M=P(y.useState(null),2),x=M[0],U=M[1],_=P(y.useState({source:!1,target:!1}),2),R=_[0],K=_[1],H={props:c,state:{sourceSelection:u,targetSelection:d,sourceFilterValue:v,targetFilterValue:I,attributeSelector:A}},q=F.setMetaData(H),W=q.ptm,V=q.cx;n.useHandleStyle(F.css.styles,q.isUnstyled,{name:"picklist"});var J=y.useRef(null),Q=y.useRef(null),Y=y.useRef(null),z=y.useRef(null),Z=y.useRef(null),$=y.useRef(null),ee=c.sourceSelection?c.sourceSelection:u,te=c.targetSelection?c.targetSelection:d,ne=c.onSourceFilterChange?c.sourceFilterValue:v,oe=c.onTargetFilterChange?c.targetFilterValue:I,re=r.ObjectUtils.isNotEmpty(c.filterBy),ae=re&&c.showSourceFilter,le=re&&c.showTargetFilter,ie=function(e,t){if(e)switch(t){case"up":se(e,-1);break;case"top":e.scrollTop=0;break;case"down":se(e,1);break;case"bottom":setTimeout((function(){return e.scrollTop=e.scrollHeight}),100)}},ce=function(e,t,n){c.onChange&&c.onChange({originalEvent:e.originalEvent,source:t,target:n})},se=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e.getElementsByClassName("p-highlight");r.ObjectUtils.isNotEmpty(n)&&r.DomHandler.scrollInView(e,-1===t?n[0]:n[n.length-1])},ue=function(e,t,n){"sourceSelection"===t?p(e.value):f(e.value),n&&n(e),r.ObjectUtils.isNotEmpty(ee)&&"targetSelection"===t?p([]):r.ObjectUtils.isNotEmpty(te)&&"sourceSelection"===t&&f([])},pe=function(e){var t=e.originalEvent,n=e.value,o=P("source"===e.type?[h,c.onSourceFilterChange]:[E,c.onTargetFilterChange],2),r=o[0],a=o[1];a?a({originalEvent:t,value:n}):r(n)},me=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").trim().toLocaleLowerCase(c.filterLocale);return fe(c.source,e)},de=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").trim().toLocaleLowerCase(c.filterLocale);return fe(c.target,e)},fe=function(e,n){var o=re?c.filterBy.split(","):[];return t.FilterService.filter(e,o,n,c.filterMatchMode,c.filterLocale)},ge=function(e,t){var n=P("source"===t?[ne,me]:[oe,de],2),o=n[0],a=n[1];return re&&r.ObjectUtils.isNotEmpty(o)?a(o):e},ve=ge(c.source,"source"),he=ge(c.target,"target"),ye=function(e){if(-1===k){var t=e&&e.children?C(e.children):[],n=be(e,t);return c.autoOptionFocus&&-1===n&&(n=Te(e,t)),n}return-1},be=function(e,t){if(u.length||d.length){var n=r.DomHandler.findSingle(e,'[data-p-highlight="true"]');return r.ObjectUtils.findIndexInList(n,t)}return-1},Te=function(e,t){var n=r.DomHandler.findSingle(e,'[data-pc-section="item"]');return r.ObjectUtils.findIndexInList(n,t)},Se=function(e,t){K(X(X({},R),{},w({},t,!0)));var n=je(t),o=ye(n);Pe(o,t),c.onFocus&&c.onFocus(e)},Ie=function(e,t){K(X(X({},R),{},w({},t,!1))),L(-1),c.onBlur&&c.onBlur(e)},Ee=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=e.originalEvent,a=e.value,l=e.id,i="source"===t,s=C(i?ee:te),u=r.ObjectUtils.findIndexInList(a,s,c.dataKey),p=-1!==u,m=c.metaKeySelection;if(n||L(l),m){var d=o.metaKey||o.ctrlKey||o.shiftKey;p&&d?s.splice(u,1):(d||(s.length=0),s.push(a))}else p?s.splice(u,1):s.push(a);i?ue({originalEvent:o,value:s},"sourceSelection",c.onSourceSelectionChange):ue({originalEvent:o,value:s},"targetSelection",c.onTargetSelectionChange)},we=function(e){var t=e.index,n=e.type;K(X(X({},R),{},w({},n,!0))),L(t)},Ne=function(e,t){switch(e.code){case"ArrowDown":Ae(e,t);break;case"ArrowUp":Oe(e,t);break;case"Home":Ce(e,t);break;case"End":Le(e,t);break;case"Enter":case"NumpadEnter":De(e,t);break;case"Space":ke(e,t);break;case"KeyA":if(e.ctrlKey){var n="source"===t;n?p(C(ve)):f(C(he)),ue({originalEvent:e,value:C(ve)},n?"sourceSelection":"targetSelection",n?c.onSourceSelectionChange:c.onTargetSelectionChange),e.preventDefault()}}},Ae=function(e,t){var n=Me(k,t),o=ge("source"===t?c.source:c.target,t);Pe(n,t),o&&o.length>0&&e.shiftKey&&Ee({originalEvent:e,value:o[n]},t,!0),e.preventDefault()},Oe=function(e,t){var n=xe(k,t),o=ge("source"===t?c.source:c.target,t);Pe(n,t),o&&o.length>0&&e.shiftKey&&Ee({originalEvent:e,value:o[n]},t,!0),e.preventDefault()},De=function(e,t){var n=je(t),o=ge("source"===t?c.source:c.target,t),a=r.DomHandler.find(n,'[data-pc-section="item"]'),l=r.DomHandler.findSingle(n,'[data-pc-section="item"][id='.concat(k,"]")),i=l&&l.getAttribute("id"),s=C(a).findIndex((function(e){return e===l}));o&&o.length>0&&Ee({originalEvent:e,value:o[s],id:i},t),e.preventDefault()},ke=function(e,t){e.preventDefault();var n="source"===t,o=n?u:d;if(e.shiftKey&&o&&o.length>0){var a=n?ve:he,l=je(t),i=r.DomHandler.find(l,'[data-pc-section="item"]'),s=r.ObjectUtils.findIndexInList(o[0],C(a)),p=r.DomHandler.findSingle(l,'[data-pc-section="item"][id='.concat(k,"]")),m=C(i).findIndex((function(e){return e===p}));C(a).slice(Math.min(s,m),Math.max(s,m)+1),T("selection"),n?ue({originalEvent:e,value:o},"sourceSelection",c.onSourceSelectionChange):ue({originalEvent:e,value:o},"targetSelection",c.onTargetSelectionChange)}else De(e,t)},Ce=function(e,t){if(e.ctrlKey&&e.shiftKey){var n="source"===t,o=n?ve:he,a=je(t),l=r.DomHandler.find(a,'[data-pc-section="item"]'),i=r.DomHandler.findSingle(a,'[data-pc-section="item"][id='.concat(k,"]")),s=C(l).findIndex((function(e){return e===i})),u=C(o).slice(0,s+1);n?ue({originalEvent:e,value:u},"sourceSelection",c.onSourceSelectionChange):ue({originalEvent:e,value:u},"targetSelection",c.onTargetSelectionChange)}else Pe(0,t);e.preventDefault()},Le=function(e,t){var n=je(t),o=r.DomHandler.find(n,'[data-pc-section="item"]');if(e.ctrlKey&&e.shiftKey){var a="source"===t,l=a?ve:he,i=r.DomHandler.findSingle(n,'[data-pc-section="item"][id='.concat(k,"]")),s=C(o).findIndex((function(e){return e===i})),u=C(l).slice(s,o.length);a?ue({originalEvent:e,value:u},"sourceSelection",c.onSourceSelectionChange):ue({originalEvent:e,value:u},"targetSelection",c.onTargetSelectionChange)}else Pe(o.length-1,t);e.preventDefault()},Me=function(e,t){var n=je(t),o=C(r.DomHandler.find(n,'[data-pc-section="item"]')).findIndex((function(t){return t.id===e}));return o>-1?o+1:0},xe=function(e,t){var n=je(t),o=C(r.DomHandler.find(n,'[data-pc-section="item"]')).findIndex((function(t){return t.id===e}));return o>-1?o-1:0},Pe=function(e,t){var n,o=je(t),a=r.DomHandler.find(o,'[data-pc-section="item"]');if(e>=a.length)n=a.length-1;else{if(e<0)return;n=e}L(a[n].getAttribute("id")),Fe(a[n].getAttribute("id"),t)},Fe=function(e,t){var n=je(t),o=r.DomHandler.findSingle(n,'[data-pc-section="item"][id="'.concat(e,'"]'));o&&o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"start"})},je=function(e){return"source"===e?Q.current.getElement():Y.current.getElement()},Ue=function(){if(!$.current){$.current=r.DomHandler.createInlineStyle(i&&i.nonce||b.default.nonce,i&&i.styleContainer);var e="\n@media screen and (max-width: ".concat(c.breakpoint,") {\n .p-picklist[").concat(A,"] {\n flex-direction: column;\n }\n\n .p-picklist[").concat(A,"] .p-picklist-buttons {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-picklist[").concat(A,"] .p-picklist-buttons .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-picklist[").concat(A,"] .p-picklist-buttons .p-button:last-child {\n margin-right: 0;\n }\n}\n");$.current.innerHTML=e}};y.useImperativeHandle(a,(function(){return{props:c,getElement:function(){return J.current}}})),o.useUpdateEffect((function(){return A&&(J.current.setAttribute(A,""),Ue()),function(){$.current=r.DomHandler.removeInlineStyle($.current)}}),[A,c.breakpoint]),o.useUpdateEffect((function(){c.id||A||O(r.UniqueComponentId()),z.current&&(ie(z.current,Z.current),z.current=null,Z.current=null)})),o.useUpdateEffect((function(){U(-1!==k?k:null)}),[k]);var _e=c.sourceItemTemplate?c.sourceItemTemplate:c.itemTemplate,Re=c.targetItemTemplate?c.targetItemTemplate:c.itemTemplate,Be=l({id:A,ref:J,className:r.classNames(c.className,V("root")),style:c.style},F.getOtherProps(c),W("root"));return y.createElement("div",Be,c.showSourceControls&&y.createElement(j,{hostName:"PickList",list:c.source,selection:ee,onReorder:function(e){ce(e,e.value,c.target),z.current=je("source"),Z.current=e.direction},className:V("sourceControls"),dataKey:c.dataKey,moveUpIcon:c.moveUpIcon,moveTopIcon:c.moveTopIcon,moveDownIcon:c.moveDownIcon,moveBottomIcon:c.moveBottomIcon,ptm:W,cx:V,unstyled:c.unstyled,metaData:H}),y.createElement(B,{hostName:"PickList",ref:Q,type:"source",list:ve,parentId:A,selection:ee,onSelectionChange:function(e){return ue(e,"sourceSelection",c.onSourceSelectionChange)},onListKeyDown:function(e){return Ne(e,"source")},onListFocus:function(e){return Se(e,"source")},onListBlur:function(e){return Ie(e,"source")},onOptionMouseDown:function(e){return we(e)},onItemClick:function(e){return Ee(e,"source")},focusedOptionId:R.source?x:null,ariaActivedescendant:R.source?x:null,itemTemplate:_e,header:c.sourceHeader,style:c.sourceStyle,className:V("listSourceWrapper"),listClassName:V("listSource"),metaKeySelection:c.metaKeySelection,tabIndex:c.tabIndex,dataKey:c.dataKey,filterValue:ne,onFilter:pe,showFilter:ae,placeholder:c.sourceFilterPlaceholder,filterTemplate:c.sourceFilterTemplate,sourceFilterIcon:c.sourceFilterIcon,ptm:W,cx:V}),y.createElement(G,{hostName:"PickList",onTransfer:function(e){var t=e.originalEvent,n=e.source,o=e.target,r=[];switch(e.direction){case"toTarget":r=ee,c.onMoveToTarget&&c.onMoveToTarget({originalEvent:t,value:r});break;case"allToTarget":r=c.source,c.onMoveAllToTarget&&c.onMoveAllToTarget({originalEvent:t,value:r}),r=[];break;case"toSource":r=te,c.onMoveToSource&&c.onMoveToSource({originalEvent:t,value:r});break;case"allToSource":r=c.target,c.onMoveAllToSource&&c.onMoveAllToSource({originalEvent:t,value:r}),r=[]}ue({originalEvent:t,value:r},"sourceSelection",c.onSourceSelectionChange),ue({originalEvent:t,value:r},"targetSelection",c.onTargetSelectionChange),ce(e,n,o)},source:c.source,visibleSourceList:ve,target:c.target,breakpoint:c.breakpoint,visibleTargetList:he,sourceSelection:ee,targetSelection:te,dataKey:c.dataKey,moveToTargetIcon:c.moveToTargetIcon,moveAllToTargetIcon:c.moveAllToTargetIcon,moveToSourceIcon:c.moveToSourceIcon,moveAllToSourceIcon:c.moveAllToSourceIcon,ptm:W,cx:V,unstyled:c.unstyled,metaData:H}),y.createElement(B,{hostName:"PickList",ref:Y,type:"target",list:he,selection:te,parentId:A,onSelectionChange:function(e){return ue(e,"targetSelection",c.onTargetSelectionChange)},onListKeyDown:function(e){return Ne(e,"target")},onListFocus:function(e){return Se(e,"target")},onListBlur:function(e){return Ie(e,"target")},onOptionMouseDown:function(e){return we(e)},onItemClick:function(e){return Ee(e,"target")},focusedOptionId:R.target?x:null,ariaActivedescendant:R.target?x:null,itemTemplate:Re,header:c.targetHeader,style:c.targetStyle,className:V("listTargetWrapper"),listClassName:V("listWrapper"),metaKeySelection:c.metaKeySelection,tabIndex:c.tabIndex,dataKey:c.dataKey,filterValue:oe,onFilter:pe,showFilter:le,placeholder:c.targetFilterPlaceholder,filterTemplate:c.targetFilterTemplate,targetFilterIcon:c.targetFilterIcon,ptm:W,cx:V}),c.showTargetControls&&y.createElement(j,{hostName:"PickList",list:c.target,selection:te,onReorder:function(e){ce(e,c.source,e.value),z.current=je("target"),Z.current=e.direction},className:V("targetControls"),dataKey:c.dataKey,moveUpIcon:c.moveUpIcon,moveTopIcon:c.moveTopIcon,moveDownIcon:c.moveDownIcon,moveBottomIcon:c.moveBottomIcon,ptm:W,cx:V,unstyled:c.unstyled,metaData:H}))})));Z.displayName="PickList",exports.PickList=Z;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/api"),n=require("primereact/componentbase"),o=require("primereact/hooks"),r=require("primereact/utils"),a=require("primereact/button"),l=require("primereact/icons/angledoubledown"),i=require("primereact/icons/angledoubleup"),c=require("primereact/icons/angledown"),s=require("primereact/icons/angleup"),u=require("primereact/icons/search"),p=require("primereact/ripple"),d=require("primereact/icons/angledoubleleft"),m=require("primereact/icons/angledoubleright"),f=require("primereact/icons/angleleft"),v=require("primereact/icons/angleright");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function h(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var y=h(e),b=g(t);function T(e){throw new TypeError('"'+e+'" is read-only')}function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function I(e,t){if("object"!==S(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==S(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function E(e){var t=I(e,"string");return"symbol"===S(t)?t:String(t)}function w(e,t,n){return(t=E(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function N(e){if(Array.isArray(e))return O(e)}function A(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function D(e,t){if(e){if("string"==typeof e)return O(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?O(e,t):void 0}}function k(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function M(e){return N(e)||A(e)||D(e)||k()}function C(e){if(Array.isArray(e))return e}function L(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,a,l,i=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=a.call(n)).done)&&(i.push(o.value),i.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(s)throw r}}return i}}function x(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function P(e,t){return C(e)||L(e,t)||D(e,t)||x()}var F=n.ComponentBase.extend({defaultProps:{__TYPE:"PickList",id:null,source:null,target:null,sourceHeader:null,targetHeader:null,style:null,className:null,sourceStyle:null,targetStyle:null,sourceSelection:null,targetSelection:null,showSourceControls:!0,showTargetControls:!0,metaKeySelection:!1,onFocus:null,onBlur:null,filter:!1,filterBy:null,filterMatchMode:"contains",targetFilterIcon:null,sourceFilterIcon:null,moveAllToSourceIcon:null,moveToSourceIcon:null,moveAllToTargetIcon:null,moveToTargetIcon:null,moveBottomIcon:null,moveUpIcon:null,moveTopIcon:null,moveDownIcon:null,filterLocale:void 0,sourceFilterValue:null,targetFilterValue:null,showSourceFilter:!0,showTargetFilter:!0,sourceFilterPlaceholder:null,targetFilterPlaceholder:null,sourceFilterTemplate:null,targetFilterTemplate:null,tabIndex:0,dataKey:null,autoOptionFocus:!0,focusOnHover:!0,breakpoint:"960px",itemTemplate:null,sourceItemTemplate:null,targetItemTemplate:null,onChange:null,onMoveToSource:null,onMoveAllToSource:null,onMoveToTarget:null,onMoveAllToTarget:null,onSourceSelectionChange:null,onTargetSelectionChange:null,onSourceFilterChange:null,onTargetFilterChange:null,children:void 0},css:{classes:{root:"p-picklist p-component",buttons:"p-picklist-buttons p-picklist-transfer-buttons",header:"p-picklist-header",filterIcon:"p-picklist-filter-icon",filter:"p-picklist-filter",filterInput:"p-picklist-filter-input p-inputtext p-component",filterContainer:"p-picklist-filter-container",list:"p-picklist-list",listWrapper:"p-picklist-list-wrapper",listSourceWrapper:"p-picklist-list-wrapper p-picklist-source-wrapper",listTargetWrapper:"p-picklist-list-wrapper p-picklist-target-wrapper",listSource:"p-picklist-list p-picklist-source",listTarget:"p-picklist-list p-picklist-target",item:function(e){return r.classNames("p-picklist-item",{"p-highlight":e.selected,"p-focus":e.focused})},sourceControls:"p-picklist-source-controls p-picklist-buttons",targetControls:"p-picklist-target-controls p-picklist-buttons"},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"}}),j=y.memo((function(e){var n=o.useMergeProps(),u=e.ptm,p=e.cx,d=e.unstyled,m=e.moveUpIcon||y.createElement(s.AngleUpIcon,null),f=e.moveTopIcon||y.createElement(i.AngleDoubleUpIcon,null),v=e.moveDownIcon||y.createElement(c.AngleDownIcon,null),g=e.moveBottomIcon||y.createElement(l.AngleDoubleDownIcon,null),h=!e.selection||!e.selection.length,b=n({className:r.classNames(e.className,p("controls"))},u("controls",{hostName:e.hostName}));return y.createElement("div",b,y.createElement(a.Button,{disabled:h,type:"button",icon:m,onClick:function(t){var n=e.selection;if(n&&n.length){for(var o=M(e.list),a=0;a<n.length;a++){var l=r.ObjectUtils.findIndexInList(n[a],o,e.dataKey);if(0===l)break;var i=o[l-1];o[l-1]=o[l],o[l]=i}e.onReorder&&e.onReorder({originalEvent:t,value:o,direction:"up"})}},pt:u("moveUpButton"),unstyled:d,"aria-label":t.ariaLabel("moveUp"),__parentMetadata:{parent:e.metaData}}),y.createElement(a.Button,{disabled:h,type:"button",icon:f,onClick:function(t){var n=e.selection;if(n&&n.length){for(var o=M(e.list),a=0;a<n.length;a++){var l=r.ObjectUtils.findIndexInList(n[a],o,e.dataKey);if(0===l)break;var i=o.splice(l,1)[0];o.unshift(i)}e.onReorder&&e.onReorder({originalEvent:t,value:o,direction:"top"})}},pt:u("moveTopButton"),unstyled:d,"aria-label":t.ariaLabel("moveTop"),__parentMetadata:{parent:e.metaData}}),y.createElement(a.Button,{disabled:h,type:"button",icon:v,onClick:function(t){var n=e.selection;if(n&&n.length){for(var o=M(e.list),a=n.length-1;a>=0;a--){var l=r.ObjectUtils.findIndexInList(n[a],o,e.dataKey);if(l===o.length-1)break;var i=o[l+1];o[l+1]=o[l],o[l]=i}e.onReorder&&e.onReorder({originalEvent:t,value:o,direction:"down"})}},pt:u("moveDownButton"),unstyled:d,"aria-label":t.ariaLabel("moveDown"),__parentMetadata:{parent:e.metaData}}),y.createElement(a.Button,{disabled:h,type:"button",icon:g,onClick:function(t){var n=e.selection;if(n&&n.length){for(var o=M(e.list),a=n.length-1;a>=0;a--){var l=r.ObjectUtils.findIndexInList(n[a],o,e.dataKey);if(l===o.length-1)break;var i=o.splice(l,1)[0];o.push(i)}e.onReorder&&e.onReorder({originalEvent:t,value:o,direction:"bottom"})}},pt:u("moveBottomButton"),unstyled:d,"aria-label":t.ariaLabel("moveBottom"),__parentMetadata:{parent:e.metaData}}))}));j.displayName="PickListControls";var U=y.memo((function(e){var t=o.useMergeProps(),n=e.ptm,a=e.cx,l=e.template?e.template(e.value):e.value,i=t({className:r.classNames(e.className,a("item",{selected:e.selected,focused:e.focused})),id:e.id,onClick:function(t){e.onClick&&e.onClick({originalEvent:t,value:e.value,id:e.id})},onKeyDown:function(t){e.onKeyDown&&e.onKeyDown({originalEvent:t,value:e.value})},onFocus:function(t){e.onFocus&&e.onFocus(t)},onMouseDown:function(t){e.onMouseDown&&e.onMouseDown(t)},onMouseMove:e.onMouseMove,role:"option","aria-selected":e.selected,"data-p-highlight":e.selected,"data-p-focused":e.focused},n("item",{hostName:e.hostName,context:{selected:e.selected}}));return y.createElement("li",i,l,y.createElement(p.Ripple,null))}));function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}U.displayName="PickListItem";var B=y.memo(y.forwardRef((function(e,t){var n=o.useMergeProps(),a=y.useRef(null),l=e.ptm,i=e.cx,c=function(t,n){return l(t,R({hostName:e.hostName},n))},s=function(t){return-1!==r.ObjectUtils.findIndexInList(t,e.selection,e.dataKey)},p=function(t){e.onFilter&&e.onFilter({originalEvent:t,value:t.target.value,type:e.type})},d=function(e){13===e.which&&e.preventDefault()};y.useImperativeHandle(t,(function(){return{getElement:function(){return a.current}}}));var m,f,v,g=function(t){var n;e.focusOnHover&&e.focusedList[e.type]&&(null==e||null===(n=e.changeFocusedOptionIndex)||void 0===n||n.call(e,t,e.type))},h=(m=n({className:i("header")},c("header")),e.header?y.createElement("div",m,r.ObjectUtils.getJSXElement(e.header,e)):null),b=function(){var t=n({className:i("filterIcon")},c("filterIcon")),o=r.IconUtils.getJSXIcon("source"===e.type?e.sourceFilterIcon||y.createElement(u.SearchIcon,t):e.targetFilterIcon||y.createElement(u.SearchIcon,t),R({},t),{props:e});if(e.showFilter){var a=n({className:i("filter")},c("filter")),l=n({type:"text",value:e.filterValue,onChange:p,onKeyDown:d,placeholder:e.placeholder,className:i("filterInput")},c("filterInput")),s=y.createElement("div",a,y.createElement("input",l),y.createElement("span",null," ",o," "));if(e.filterTemplate)s=r.ObjectUtils.getJSXElement(e.filterTemplate,{className:"p-picklist-filter",inputProps:{className:"p-picklist-filter-input p-inputtext p-component",onChange:p,onKeyDown:d},iconClassName:"p-picklist-filter-icon",element:s,props:e});var m=n({className:i("filterContainer")},c("filterContainer"));return y.createElement("div",m,s)}return null}(),T=(f=e.list?e.list.map((function(t,n){var o=e.parentId+"_"+n,r=s(t);return y.createElement(U,{hostName:e.hostName,key:o,id:o,index:n,focused:o===e.focusedOptionId,value:t,template:e.itemTemplate,selected:r,onClick:e.onItemClick,onKeyDown:e.onItemKeyDown,onMouseDown:function(t){return e.onOptionMouseDown(R(R({},t),{},{index:n,type:e.type}))},onMouseMove:function(){return g(n)},ptm:l,cx:i})})):null,v=n({ref:a,className:r.classNames(e.listClassName,i("list")),role:"listbox",id:e.parentId+"_"+e.type+"_list","aria-multiselectable":!0,"aria-activedescendant":e.ariaActivedescendant,tabIndex:e.list&&e.list.length>0?e.tabIndex:-1,onKeyDown:e.onListKeyDown,onFocus:function(t){e.onListFocus(t,e.type)},onBlur:e.onListBlur,style:e.style},c("list")),y.createElement("ul",v,f)),S=n({className:r.classNames(e.className,i("listWrapper"))},c("listWrapper"));return y.createElement("div",S,h,b,T)})));function H(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,E(o.key),o)}}function K(e,t,n){return t&&H(e.prototype,t),n&&H(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}B.displayName="PickListSubList";var W=Object.freeze({STARTS_WITH:"startsWith",CONTAINS:"contains",NOT_CONTAINS:"notContains",ENDS_WITH:"endsWith",EQUALS:"equals",NOT_EQUALS:"notEquals",IN:"in",LESS_THAN:"lt",LESS_THAN_OR_EQUAL_TO:"lte",GREATER_THAN:"gt",GREATER_THAN_OR_EQUAL_TO:"gte",BETWEEN:"between",DATE_IS:"dateIs",DATE_IS_NOT:"dateIsNot",DATE_BEFORE:"dateBefore",DATE_AFTER:"dateAfter",CUSTOM:"custom"}),V=K((function e(){q(this,e)}));w(V,"ripple",!1),w(V,"inputStyle","outlined"),w(V,"locale","en"),w(V,"appendTo",null),w(V,"cssTransition",!0),w(V,"autoZIndex",!0),w(V,"hideOverlaysOnDocumentScrolling",!1),w(V,"nonce",null),w(V,"nullSortOrder",1),w(V,"zIndex",{modal:1100,overlay:1e3,menu:1e3,tooltip:1100,toast:1200}),w(V,"pt",void 0),w(V,"filterMatchModeOptions",{text:[W.STARTS_WITH,W.CONTAINS,W.NOT_CONTAINS,W.ENDS_WITH,W.EQUALS,W.NOT_EQUALS],numeric:[W.EQUALS,W.NOT_EQUALS,W.LESS_THAN,W.LESS_THAN_OR_EQUAL_TO,W.GREATER_THAN,W.GREATER_THAN_OR_EQUAL_TO],date:[W.DATE_IS,W.DATE_IS_NOT,W.DATE_BEFORE,W.DATE_AFTER]}),w(V,"changeTheme",(function(e,t,n,o){var r,a=document.getElementById(n),l=a.cloneNode(!0),i=a.getAttribute("href").replace(e,t);l.setAttribute("id",n+"-clone"),l.setAttribute("href",i),l.addEventListener("load",(function(){a.remove(),l.setAttribute("id",n),o&&o()})),null===(r=a.parentNode)||void 0===r||r.insertBefore(l,a.nextSibling)}));var J={en:{accept:"Yes",addRule:"Add Rule",am:"AM",apply:"Apply",cancel:"Cancel",choose:"Choose",chooseDate:"Choose Date",chooseMonth:"Choose Month",chooseYear:"Choose Year",clear:"Clear",completed:"Completed",contains:"Contains",custom:"Custom",dateAfter:"Date is after",dateBefore:"Date is before",dateFormat:"mm/dd/yy",dateIs:"Date is",dateIsNot:"Date is not",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],emptyFilterMessage:"No results found",emptyMessage:"No available options",emptySearchMessage:"No results found",emptySelectionMessage:"No selected item",endsWith:"Ends with",equals:"Equals",fileSizeTypes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"],filter:"Filter",firstDayOfWeek:0,gt:"Greater than",gte:"Greater than or equal to",lt:"Less than",lte:"Less than or equal to",matchAll:"Match All",matchAny:"Match Any",medium:"Medium",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],nextDecade:"Next Decade",nextHour:"Next Hour",nextMinute:"Next Minute",nextMonth:"Next Month",nextSecond:"Next Second",nextYear:"Next Year",noFilter:"No Filter",notContains:"Not contains",notEquals:"Not equals",now:"Now",passwordPrompt:"Enter a password",pending:"Pending",pm:"PM",prevDecade:"Previous Decade",prevHour:"Previous Hour",prevMinute:"Previous Minute",prevMonth:"Previous Month",prevSecond:"Previous Second",prevYear:"Previous Year",reject:"No",removeRule:"Remove Rule",searchMessage:"{0} results are available",selectionMessage:"{0} items selected",showMonthAfterYear:!1,startsWith:"Starts with",strong:"Strong",today:"Today",upload:"Upload",weak:"Weak",weekHeader:"Wk",aria:{cancelEdit:"Cancel Edit",close:"Close",collapseRow:"Row Collapsed",editRow:"Edit Row",expandRow:"Row Expanded",falseLabel:"False",filterConstraint:"Filter Constraint",filterOperator:"Filter Operator",firstPageLabel:"First Page",gridView:"Grid View",hideFilterMenu:"Hide Filter Menu",jumpToPageDropdownLabel:"Jump to Page Dropdown",jumpToPageInputLabel:"Jump to Page Input",lastPageLabel:"Last Page",listView:"List View",moveAllToSource:"Move All to Source",moveAllToTarget:"Move All to Target",moveBottom:"Move Bottom",moveDown:"Move Down",moveToSource:"Move to Source",moveToTarget:"Move to Target",moveTop:"Move Top",moveUp:"Move Up",navigation:"Navigation",next:"Next",nextPageLabel:"Next Page",nullLabel:"Not Selected",pageLabel:"Page {page}",otpLabel:"Please enter one time password character {0}",passwordHide:"Hide Password",passwordShow:"Show Password",previous:"Previous",previousPageLabel:"Previous Page",rotateLeft:"Rotate Left",rotateRight:"Rotate Right",rowsPerPageLabel:"Rows per page",saveEdit:"Save Edit",scrollTop:"Scroll Top",selectAll:"All items selected",selectRow:"Row Selected",showFilterMenu:"Show Filter Menu",slide:"Slide",slideNumber:"{slideNumber}",star:"1 star",stars:"{star} stars",trueLabel:"True",unselectAll:"All items unselected",unselectRow:"Row Unselected",zoomImage:"Zoom Image",zoomIn:"Zoom In",zoomOut:"Zoom Out"}}};function Q(e,t){var n=V.locale;try{var o=Y(n).aria[e];if(o)for(var r in t)t.hasOwnProperty(r)&&(o=o.replace("{".concat(r,"}"),t[r]));return o}catch(t){throw new Error("The ".concat(e," option is not found in the current locale('").concat(n,"')."))}}function Y(e){return J[e||V.locale]}var G=y.memo((function(e){var t=o.useMergeProps(),n=o.useMatchMedia("(max-width: ".concat(e.breakpoint,")"),e.breakpoint),u=e.ptm,p=e.cx,g=e.unstyled;function h(t){switch(t){case"moveToTargetIcon":return e.moveToTargetIcon||n?e.moveToTargetIcon||y.createElement(c.AngleDownIcon,null):e.moveToTargetIcon||y.createElement(v.AngleRightIcon,null);case"moveAllToTargetIcon":return e.moveAllToTargetIcon||n?e.moveAllToTargetIcon||y.createElement(l.AngleDoubleDownIcon,null):e.moveAllToTargetIcon||y.createElement(m.AngleDoubleRightIcon,null);case"moveToSourceIcon":return e.moveToSourceIcon||n?e.moveToSourceIcon||y.createElement(s.AngleUpIcon,null):e.moveToSourceIcon||y.createElement(f.AngleLeftIcon,null);case"moveAllToSourceIcon":return e.moveAllToSourceIcon||n?e.moveAllToSourceIcon||y.createElement(i.AngleDoubleUpIcon,null):e.moveAllToSourceIcon||y.createElement(d.AngleDoubleLeftIcon,null);default:return null}}var b=r.IconUtils.getJSXIcon(h("moveToTargetIcon"),void 0,{props:e,viewChanged:n}),T=r.IconUtils.getJSXIcon(h("moveAllToTargetIcon"),void 0,{props:e,viewChanged:n}),S=r.IconUtils.getJSXIcon(h("moveToSourceIcon"),void 0,{props:e,viewChanged:n}),I=r.IconUtils.getJSXIcon(h("moveAllToSourceIcon"),void 0,{props:e,viewChanged:n}),E=r.ObjectUtils.isEmpty(e.sourceSelection)||r.ObjectUtils.isEmpty(e.visibleSourceList),w=r.ObjectUtils.isEmpty(e.targetSelection)||r.ObjectUtils.isEmpty(e.visibleTargetList),O=r.ObjectUtils.isEmpty(e.visibleSourceList),N=r.ObjectUtils.isEmpty(e.visibleTargetList),A=t({className:r.classNames(e.className,p("buttons"))},u("buttons",{hostName:e.hostName}));return y.createElement("div",A,y.createElement(a.Button,{disabled:E,type:"button",icon:b,onClick:function(t){var n=e.sourceSelection;if(r.ObjectUtils.isNotEmpty(n)){for(var o=M(e.target),a=M(e.source),l=0;l<n.length;l++){var i=n[l];-1===r.ObjectUtils.findIndexInList(i,o,e.dataKey)&&o.push(a.splice(r.ObjectUtils.findIndexInList(i,a,e.dataKey),1)[0])}e.onTransfer&&e.onTransfer({originalEvent:t,source:a,target:o,direction:"toTarget"})}},pt:u("moveToTargetButton"),unstyled:g,"aria-label":Q("moveToTarget"),__parentMetadata:{parent:e.metaData}}),y.createElement(a.Button,{disabled:O,type:"button",icon:T,onClick:function(t){if(e.source){var n=[].concat(M(e.target),M(e.visibleSourceList)),o=e.source.filter((function(t){return!e.visibleSourceList.some((function(e){return e===t}))}));e.onTransfer&&e.onTransfer({originalEvent:t,source:o,target:n,direction:"allToTarget"})}},pt:u("moveAllToTargetButton"),unstyled:g,"aria-label":Q("moveAllToTarget"),__parentMetadata:{parent:e.metaData}}),y.createElement(a.Button,{disabled:w,type:"button",icon:S,onClick:function(t){var n=e.targetSelection;if(r.ObjectUtils.isNotEmpty(n)){for(var o=M(e.target),a=M(e.source),l=0;l<n.length;l++){var i=n[l];-1===r.ObjectUtils.findIndexInList(i,a,e.dataKey)&&a.push(o.splice(r.ObjectUtils.findIndexInList(i,o,e.dataKey),1)[0])}e.onTransfer&&e.onTransfer({originalEvent:t,source:a,target:o,direction:"toSource"})}},pt:u("moveToSourceButton"),unstyled:g,"aria-label":Q("moveToSource"),__parentMetadata:{parent:e.metaData}}),y.createElement(a.Button,{disabled:N,type:"button",icon:I,onClick:function(t){if(e.source){var n=[].concat(M(e.source),M(e.visibleTargetList)),o=e.target.filter((function(t){return!e.visibleTargetList.some((function(e){return e===t}))}));e.onTransfer&&e.onTransfer({originalEvent:t,source:n,target:o,direction:"allToSource"})}},pt:u("moveAllToSourceButton"),unstyled:g,"aria-label":Q("moveAllToSource"),__parentMetadata:{parent:e.metaData}}))}));function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}G.displayName="PickListTransferControls";var Z=y.memo(y.forwardRef((function(e,a){var l=o.useMergeProps(),i=y.useContext(t.PrimeReactContext),c=F.getProps(e,i),s=P(y.useState([]),2),u=s[0],p=s[1],d=P(y.useState([]),2),m=d[0],f=d[1],v=P(y.useState(""),2),g=v[0],h=v[1],S=P(y.useState(""),2),I=S[0],E=S[1],O=P(y.useState(c.id),2),N=O[0],A=O[1],D=P(y.useState(-1),2),k=D[0],C=D[1],L=P(y.useState(null),2),x=L[0],U=L[1],_=P(y.useState({source:!1,target:!1}),2),R=_[0],H=_[1],K={props:c,state:{sourceSelection:u,targetSelection:m,sourceFilterValue:g,targetFilterValue:I,attributeSelector:N}},q=F.setMetaData(K),W=q.ptm,V=q.cx;n.useHandleStyle(F.css.styles,q.isUnstyled,{name:"picklist"});var J=y.useRef(null),Q=y.useRef(null),Y=y.useRef(null),z=y.useRef(null),Z=y.useRef(null),$=y.useRef(null),ee=c.sourceSelection?c.sourceSelection:u,te=c.targetSelection?c.targetSelection:m,ne=c.onSourceFilterChange?c.sourceFilterValue:g,oe=c.onTargetFilterChange?c.targetFilterValue:I,re=r.ObjectUtils.isNotEmpty(c.filterBy),ae=re&&c.showSourceFilter,le=re&&c.showTargetFilter,ie=function(e,t){if(e)switch(t){case"up":se(e,-1);break;case"top":e.scrollTop=0;break;case"down":se(e,1);break;case"bottom":setTimeout((function(){return e.scrollTop=e.scrollHeight}),100)}},ce=function(e,t,n){c.onChange&&c.onChange({originalEvent:e.originalEvent,source:t,target:n})},se=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e.getElementsByClassName("p-highlight");r.ObjectUtils.isNotEmpty(n)&&r.DomHandler.scrollInView(e,-1===t?n[0]:n[n.length-1])},ue=function(e,t,n){"sourceSelection"===t?p(e.value):f(e.value),n&&n(e),r.ObjectUtils.isNotEmpty(ee)&&"targetSelection"===t?p([]):r.ObjectUtils.isNotEmpty(te)&&"sourceSelection"===t&&f([])},pe=function(e){var t=e.originalEvent,n=e.value,o=P("source"===e.type?[h,c.onSourceFilterChange]:[E,c.onTargetFilterChange],2),r=o[0],a=o[1];a?a({originalEvent:t,value:n}):r(n)},de=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").trim().toLocaleLowerCase(c.filterLocale);return fe(c.source,e)},me=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").trim().toLocaleLowerCase(c.filterLocale);return fe(c.target,e)},fe=function(e,n){var o=re?c.filterBy.split(","):[];return t.FilterService.filter(e,o,n,c.filterMatchMode,c.filterLocale)},ve=function(e,t){var n=P("source"===t?[ne,de]:[oe,me],2),o=n[0],a=n[1];return re&&r.ObjectUtils.isNotEmpty(o)?a(o):e},ge=ve(c.source,"source"),he=ve(c.target,"target"),ye=function(e){if(-1===k){var t=e&&e.children?M(e.children):[],n=be(e,t);return c.autoOptionFocus&&-1===n&&(n=Te(e,t)),n}return-1},be=function(e,t){if(u.length||m.length){var n=r.DomHandler.findSingle(e,'[data-p-highlight="true"]');return r.ObjectUtils.findIndexInList(n,t)}return-1},Te=function(e,t){var n=r.DomHandler.findSingle(e,'[data-pc-section="item"]');return r.ObjectUtils.findIndexInList(n,t)},Se=function(e,t){H(X(X({},R),{},w({},t,!0)));var n=je(t),o=ye(n);Pe(o,t),c.onFocus&&c.onFocus(e)},Ie=function(e,t){H(X(X({},R),{},w({},t,!1))),C(-1),c.onBlur&&c.onBlur(e)},Ee=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=e.originalEvent,a=e.value,l=e.id,i="source"===t,s=M(i?ee:te),u=r.ObjectUtils.findIndexInList(a,s,c.dataKey),p=-1!==u,d=c.metaKeySelection;if(n||C(l),d){var m=o.metaKey||o.ctrlKey||o.shiftKey;p&&m?s.splice(u,1):(m||(s.length=0),s.push(a))}else p?s.splice(u,1):s.push(a);i?ue({originalEvent:o,value:s},"sourceSelection",c.onSourceSelectionChange):ue({originalEvent:o,value:s},"targetSelection",c.onTargetSelectionChange)},we=function(e){var t=e.index,n=e.type;H(X(X({},R),{},w({},n,!0))),C(t)},Oe=function(e,t){switch(e.code){case"ArrowDown":Ne(e,t);break;case"ArrowUp":Ae(e,t);break;case"Home":Me(e,t);break;case"End":Ce(e,t);break;case"Enter":case"NumpadEnter":De(e,t);break;case"Space":ke(e,t);break;case"KeyA":if(e.ctrlKey){var n="source"===t;n?p(M(ge)):f(M(he)),ue({originalEvent:e,value:M(ge)},n?"sourceSelection":"targetSelection",n?c.onSourceSelectionChange:c.onTargetSelectionChange),e.preventDefault()}}},Ne=function(e,t){var n=Le(k,t),o=ve("source"===t?c.source:c.target,t);Pe(n,t),o&&o.length>0&&e.shiftKey&&Ee({originalEvent:e,value:o[n]},t,!0),e.preventDefault()},Ae=function(e,t){var n=xe(k,t),o=ve("source"===t?c.source:c.target,t);Pe(n,t),o&&o.length>0&&e.shiftKey&&Ee({originalEvent:e,value:o[n]},t,!0),e.preventDefault()},De=function(e,t){var n=je(t),o=ve("source"===t?c.source:c.target,t),a=r.DomHandler.find(n,'[data-pc-section="item"]'),l=r.DomHandler.findSingle(n,'[data-pc-section="item"][id='.concat(k,"]")),i=l&&l.getAttribute("id"),s=M(a).findIndex((function(e){return e===l}));o&&o.length>0&&Ee({originalEvent:e,value:o[s],id:i},t),e.preventDefault()},ke=function(e,t){e.preventDefault();var n="source"===t,o=n?u:m;if(e.shiftKey&&o&&o.length>0){var a=n?ge:he,l=je(t),i=r.DomHandler.find(l,'[data-pc-section="item"]'),s=r.ObjectUtils.findIndexInList(o[0],M(a)),p=r.DomHandler.findSingle(l,'[data-pc-section="item"][id='.concat(k,"]")),d=M(i).findIndex((function(e){return e===p}));M(a).slice(Math.min(s,d),Math.max(s,d)+1),T("selection"),n?ue({originalEvent:e,value:o},"sourceSelection",c.onSourceSelectionChange):ue({originalEvent:e,value:o},"targetSelection",c.onTargetSelectionChange)}else De(e,t)},Me=function(e,t){if(e.ctrlKey&&e.shiftKey){var n="source"===t,o=n?ge:he,a=je(t),l=r.DomHandler.find(a,'[data-pc-section="item"]'),i=r.DomHandler.findSingle(a,'[data-pc-section="item"][id='.concat(k,"]")),s=M(l).findIndex((function(e){return e===i})),u=M(o).slice(0,s+1);n?ue({originalEvent:e,value:u},"sourceSelection",c.onSourceSelectionChange):ue({originalEvent:e,value:u},"targetSelection",c.onTargetSelectionChange)}else Pe(0,t);e.preventDefault()},Ce=function(e,t){var n=je(t),o=r.DomHandler.find(n,'[data-pc-section="item"]');if(e.ctrlKey&&e.shiftKey){var a="source"===t,l=a?ge:he,i=r.DomHandler.findSingle(n,'[data-pc-section="item"][id='.concat(k,"]")),s=M(o).findIndex((function(e){return e===i})),u=M(l).slice(s,o.length);a?ue({originalEvent:e,value:u},"sourceSelection",c.onSourceSelectionChange):ue({originalEvent:e,value:u},"targetSelection",c.onTargetSelectionChange)}else Pe(o.length-1,t);e.preventDefault()},Le=function(e,t){var n=je(t),o=M(r.DomHandler.find(n,'[data-pc-section="item"]')).findIndex((function(t){return t.id===e}));return o>-1?o+1:0},xe=function(e,t){var n=je(t),o=M(r.DomHandler.find(n,'[data-pc-section="item"]')).findIndex((function(t){return t.id===e}));return o>-1?o-1:0},Pe=function(e,t){var n,o=je(t),a=r.DomHandler.find(o,'[data-pc-section="item"]');if(e>=a.length)n=a.length-1;else{if(e<0)return;n=e}C(a[n].getAttribute("id")),Fe(a[n].getAttribute("id"),t)},Fe=function(e,t){var n=je(t),o=r.DomHandler.findSingle(n,'[data-pc-section="item"][id="'.concat(e,'"]'));o&&o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"start"})},je=function(e){return"source"===e?Q.current.getElement():Y.current.getElement()},Ue=function(){if(!$.current){$.current=r.DomHandler.createInlineStyle(i&&i.nonce||b.default.nonce,i&&i.styleContainer);var e="\n@media screen and (max-width: ".concat(c.breakpoint,") {\n .p-picklist[").concat(N,"] {\n flex-direction: column;\n }\n\n .p-picklist[").concat(N,"] .p-picklist-buttons {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-picklist[").concat(N,"] .p-picklist-buttons .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-picklist[").concat(N,"] .p-picklist-buttons .p-button:last-child {\n margin-right: 0;\n }\n}\n");$.current.innerHTML=e}};y.useImperativeHandle(a,(function(){return{props:c,getElement:function(){return J.current}}})),o.useUpdateEffect((function(){return N&&(J.current.setAttribute(N,""),Ue()),function(){$.current=r.DomHandler.removeInlineStyle($.current)}}),[N,c.breakpoint]),o.useUpdateEffect((function(){c.id||N||A(r.UniqueComponentId()),z.current&&(ie(z.current,Z.current),z.current=null,Z.current=null)})),o.useUpdateEffect((function(){U(-1!==k?k:null)}),[k]);var _e=c.sourceItemTemplate?c.sourceItemTemplate:c.itemTemplate,Re=c.targetItemTemplate?c.targetItemTemplate:c.itemTemplate,Be=l({id:N,ref:J,className:r.classNames(c.className,V("root")),style:c.style},F.getOtherProps(c),W("root"));return y.createElement("div",Be,c.showSourceControls&&y.createElement(j,{hostName:"PickList",list:c.source,selection:ee,onReorder:function(e){ce(e,e.value,c.target),z.current=je("source"),Z.current=e.direction},className:V("sourceControls"),dataKey:c.dataKey,moveUpIcon:c.moveUpIcon,moveTopIcon:c.moveTopIcon,moveDownIcon:c.moveDownIcon,moveBottomIcon:c.moveBottomIcon,ptm:W,cx:V,unstyled:c.unstyled,metaData:K}),y.createElement(B,{hostName:"PickList",ref:Q,type:"source",list:ge,parentId:N,selection:ee,onSelectionChange:function(e){return ue(e,"sourceSelection",c.onSourceSelectionChange)},onListKeyDown:function(e){return Oe(e,"source")},onListFocus:function(e){return Se(e,"source")},onListBlur:function(e){return Ie(e,"source")},onOptionMouseDown:function(e){return we(e)},onItemClick:function(e){return Ee(e,"source")},focusedOptionId:R.source?x:null,ariaActivedescendant:R.source?x:null,itemTemplate:_e,header:c.sourceHeader,style:c.sourceStyle,className:V("listSourceWrapper"),listClassName:V("listSource"),metaKeySelection:c.metaKeySelection,tabIndex:c.tabIndex,dataKey:c.dataKey,filterValue:ne,onFilter:pe,showFilter:ae,placeholder:c.sourceFilterPlaceholder,filterTemplate:c.sourceFilterTemplate,sourceFilterIcon:c.sourceFilterIcon,ptm:W,cx:V,focusedList:R,changeFocusedOptionIndex:Pe,focusOnHover:c.focusOnHover}),y.createElement(G,{hostName:"PickList",onTransfer:function(e){var t=e.originalEvent,n=e.source,o=e.target,r=[];switch(e.direction){case"toTarget":r=ee,c.onMoveToTarget&&c.onMoveToTarget({originalEvent:t,value:r});break;case"allToTarget":r=c.source,c.onMoveAllToTarget&&c.onMoveAllToTarget({originalEvent:t,value:r}),r=[];break;case"toSource":r=te,c.onMoveToSource&&c.onMoveToSource({originalEvent:t,value:r});break;case"allToSource":r=c.target,c.onMoveAllToSource&&c.onMoveAllToSource({originalEvent:t,value:r}),r=[]}ue({originalEvent:t,value:r},"sourceSelection",c.onSourceSelectionChange),ue({originalEvent:t,value:r},"targetSelection",c.onTargetSelectionChange),ce(e,n,o)},source:c.source,visibleSourceList:ge,target:c.target,breakpoint:c.breakpoint,visibleTargetList:he,sourceSelection:ee,targetSelection:te,dataKey:c.dataKey,moveToTargetIcon:c.moveToTargetIcon,moveAllToTargetIcon:c.moveAllToTargetIcon,moveToSourceIcon:c.moveToSourceIcon,moveAllToSourceIcon:c.moveAllToSourceIcon,ptm:W,cx:V,unstyled:c.unstyled,metaData:K}),y.createElement(B,{hostName:"PickList",ref:Y,type:"target",list:he,selection:te,parentId:N,onSelectionChange:function(e){return ue(e,"targetSelection",c.onTargetSelectionChange)},onListKeyDown:function(e){return Oe(e,"target")},onListFocus:function(e){return Se(e,"target")},onListBlur:function(e){return Ie(e,"target")},onOptionMouseDown:function(e){return we(e)},onItemClick:function(e){return Ee(e,"target")},focusedOptionId:R.target?x:null,ariaActivedescendant:R.target?x:null,itemTemplate:Re,header:c.targetHeader,style:c.targetStyle,className:V("listTargetWrapper"),listClassName:V("listWrapper"),metaKeySelection:c.metaKeySelection,tabIndex:c.tabIndex,dataKey:c.dataKey,filterValue:oe,onFilter:pe,showFilter:le,placeholder:c.targetFilterPlaceholder,filterTemplate:c.targetFilterTemplate,targetFilterIcon:c.targetFilterIcon,ptm:W,cx:V,focusedList:R,changeFocusedOptionIndex:Pe,focusOnHover:c.focusOnHover}),c.showTargetControls&&y.createElement(j,{hostName:"PickList",list:c.target,selection:te,onReorder:function(e){ce(e,c.source,e.value),z.current=je("target"),Z.current=e.direction},className:V("targetControls"),dataKey:c.dataKey,moveUpIcon:c.moveUpIcon,moveTopIcon:c.moveTopIcon,moveDownIcon:c.moveDownIcon,moveBottomIcon:c.moveBottomIcon,ptm:W,cx:V,unstyled:c.unstyled,metaData:K}))})));Z.displayName="PickList",exports.PickList=Z;
|
package/picklist/picklist.d.ts
CHANGED
|
@@ -264,6 +264,11 @@ export interface PickListProps {
|
|
|
264
264
|
* @defaultValue true
|
|
265
265
|
*/
|
|
266
266
|
autoOptionFocus?: boolean | undefined;
|
|
267
|
+
/**
|
|
268
|
+
* When enabled, the focus is placed on the hovered option.
|
|
269
|
+
* @defaultValue true
|
|
270
|
+
*/
|
|
271
|
+
focusOnHover?: boolean | undefined;
|
|
267
272
|
/**
|
|
268
273
|
* Inline style of the element.
|
|
269
274
|
*/
|
|
@@ -363,10 +368,10 @@ export interface PickListProps {
|
|
|
363
368
|
*/
|
|
364
369
|
filterBy?: string | undefined;
|
|
365
370
|
/**
|
|
366
|
-
*
|
|
371
|
+
* Defines how the items are filtered, valid values are "contains", (default) "startsWith", "endsWith", "equals" and "notEquals".
|
|
367
372
|
* @defaultValue contains
|
|
368
373
|
*/
|
|
369
|
-
filterMatchMode?:
|
|
374
|
+
filterMatchMode?: 'contains' | 'startsWith' | 'endsWith' | 'equals' | 'notEquals' | undefined;
|
|
370
375
|
/**
|
|
371
376
|
* Locale to use in filtering. The default locale is the host environment's current locale.
|
|
372
377
|
* @defaultValue undefined
|
package/picklist/picklist.esm.js
CHANGED
|
@@ -202,6 +202,7 @@ var PickListBase = ComponentBase.extend({
|
|
|
202
202
|
tabIndex: 0,
|
|
203
203
|
dataKey: null,
|
|
204
204
|
autoOptionFocus: true,
|
|
205
|
+
focusOnHover: true,
|
|
205
206
|
breakpoint: '960px',
|
|
206
207
|
itemTemplate: null,
|
|
207
208
|
sourceItemTemplate: null,
|
|
@@ -432,6 +433,7 @@ var PickListItem = /*#__PURE__*/React.memo(function (props) {
|
|
|
432
433
|
onKeyDown: onKeyDown,
|
|
433
434
|
onFocus: onFocus,
|
|
434
435
|
onMouseDown: onMouseDown,
|
|
436
|
+
onMouseMove: props.onMouseMove,
|
|
435
437
|
role: 'option',
|
|
436
438
|
'aria-selected': props.selected,
|
|
437
439
|
'data-p-highlight': props.selected,
|
|
@@ -487,6 +489,12 @@ var PickListSubList = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fun
|
|
|
487
489
|
}
|
|
488
490
|
return null;
|
|
489
491
|
};
|
|
492
|
+
var changeFocusedItemOnHover = function changeFocusedItemOnHover(index) {
|
|
493
|
+
if (props.focusOnHover && props.focusedList[props.type]) {
|
|
494
|
+
var _props$changeFocusedO;
|
|
495
|
+
props === null || props === void 0 || (_props$changeFocusedO = props.changeFocusedOptionIndex) === null || _props$changeFocusedO === void 0 || _props$changeFocusedO.call(props, index, props.type);
|
|
496
|
+
}
|
|
497
|
+
};
|
|
490
498
|
var createItems = function createItems() {
|
|
491
499
|
if (props.list) {
|
|
492
500
|
return props.list.map(function (item, index) {
|
|
@@ -509,6 +517,9 @@ var PickListSubList = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fun
|
|
|
509
517
|
type: props.type
|
|
510
518
|
}));
|
|
511
519
|
},
|
|
520
|
+
onMouseMove: function onMouseMove() {
|
|
521
|
+
return changeFocusedItemOnHover(index);
|
|
522
|
+
},
|
|
512
523
|
ptm: ptm,
|
|
513
524
|
cx: cx
|
|
514
525
|
});
|
|
@@ -819,7 +830,7 @@ var locales = {
|
|
|
819
830
|
function ariaLabel(ariaKey, options) {
|
|
820
831
|
var _locale = PrimeReact.locale;
|
|
821
832
|
try {
|
|
822
|
-
var _ariaLabel = localeOptions(_locale)
|
|
833
|
+
var _ariaLabel = localeOptions(_locale).aria[ariaKey];
|
|
823
834
|
if (_ariaLabel) {
|
|
824
835
|
for (var key in options) {
|
|
825
836
|
if (options.hasOwnProperty(key)) {
|
|
@@ -1183,7 +1194,11 @@ var PickList = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
1183
1194
|
}
|
|
1184
1195
|
};
|
|
1185
1196
|
var _onSelectionChange = function onSelectionChange(e, stateKey, callback) {
|
|
1186
|
-
if (stateKey === 'sourceSelection')
|
|
1197
|
+
if (stateKey === 'sourceSelection') {
|
|
1198
|
+
setSourceSelectionState(e.value);
|
|
1199
|
+
} else {
|
|
1200
|
+
setTargetSelectionState(e.value);
|
|
1201
|
+
}
|
|
1187
1202
|
if (callback) {
|
|
1188
1203
|
callback(e);
|
|
1189
1204
|
}
|
|
@@ -1277,7 +1292,9 @@ var PickList = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
1277
1292
|
var index = ObjectUtils.findIndexInList(item, selection, props.dataKey);
|
|
1278
1293
|
var selected = index !== -1;
|
|
1279
1294
|
var metaSelection = props.metaKeySelection;
|
|
1280
|
-
if (!arrowKeyClick)
|
|
1295
|
+
if (!arrowKeyClick) {
|
|
1296
|
+
setFocusedOptionIndex(selectedId);
|
|
1297
|
+
}
|
|
1281
1298
|
if (metaSelection) {
|
|
1282
1299
|
var metaKey = originalEvent.metaKey || originalEvent.ctrlKey || originalEvent.shiftKey;
|
|
1283
1300
|
if (selected && metaKey) {
|
|
@@ -1288,8 +1305,10 @@ var PickList = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
1288
1305
|
}
|
|
1289
1306
|
selection.push(item);
|
|
1290
1307
|
}
|
|
1308
|
+
} else if (selected) {
|
|
1309
|
+
selection.splice(index, 1);
|
|
1291
1310
|
} else {
|
|
1292
|
-
|
|
1311
|
+
selection.push(item);
|
|
1293
1312
|
}
|
|
1294
1313
|
if (isSource) {
|
|
1295
1314
|
_onSelectionChange({
|
|
@@ -1333,7 +1352,11 @@ var PickList = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
1333
1352
|
case 'KeyA':
|
|
1334
1353
|
if (event.ctrlKey) {
|
|
1335
1354
|
var isSource = type === 'source';
|
|
1336
|
-
if (isSource)
|
|
1355
|
+
if (isSource) {
|
|
1356
|
+
setSourceSelectionState(_toConsumableArray(sourceList));
|
|
1357
|
+
} else {
|
|
1358
|
+
setTargetSelectionState(_toConsumableArray(targetList));
|
|
1359
|
+
}
|
|
1337
1360
|
_onSelectionChange({
|
|
1338
1361
|
originalEvent: event,
|
|
1339
1362
|
value: _toConsumableArray(sourceList)
|
|
@@ -1599,8 +1622,8 @@ var PickList = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
1599
1622
|
onItemClick: function onItemClick(e) {
|
|
1600
1623
|
return _onItemClick(e, 'source');
|
|
1601
1624
|
},
|
|
1602
|
-
focusedOptionId: focused
|
|
1603
|
-
ariaActivedescendant: focused
|
|
1625
|
+
focusedOptionId: focused.source ? focusedOptionId : null,
|
|
1626
|
+
ariaActivedescendant: focused.source ? focusedOptionId : null,
|
|
1604
1627
|
itemTemplate: sourceItemTemplate,
|
|
1605
1628
|
header: props.sourceHeader,
|
|
1606
1629
|
style: props.sourceStyle,
|
|
@@ -1616,7 +1639,10 @@ var PickList = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
1616
1639
|
filterTemplate: props.sourceFilterTemplate,
|
|
1617
1640
|
sourceFilterIcon: props.sourceFilterIcon,
|
|
1618
1641
|
ptm: ptm,
|
|
1619
|
-
cx: cx
|
|
1642
|
+
cx: cx,
|
|
1643
|
+
focusedList: focused,
|
|
1644
|
+
changeFocusedOptionIndex: changeFocusedOptionIndex,
|
|
1645
|
+
focusOnHover: props.focusOnHover
|
|
1620
1646
|
}), /*#__PURE__*/React.createElement(PickListTransferControls, {
|
|
1621
1647
|
hostName: "PickList",
|
|
1622
1648
|
onTransfer: onTransfer,
|
|
@@ -1661,8 +1687,8 @@ var PickList = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
1661
1687
|
onItemClick: function onItemClick(e) {
|
|
1662
1688
|
return _onItemClick(e, 'target');
|
|
1663
1689
|
},
|
|
1664
|
-
focusedOptionId: focused
|
|
1665
|
-
ariaActivedescendant: focused
|
|
1690
|
+
focusedOptionId: focused.target ? focusedOptionId : null,
|
|
1691
|
+
ariaActivedescendant: focused.target ? focusedOptionId : null,
|
|
1666
1692
|
itemTemplate: targetItemTemplate,
|
|
1667
1693
|
header: props.targetHeader,
|
|
1668
1694
|
style: props.targetStyle,
|
|
@@ -1678,7 +1704,10 @@ var PickList = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
1678
1704
|
filterTemplate: props.targetFilterTemplate,
|
|
1679
1705
|
targetFilterIcon: props.targetFilterIcon,
|
|
1680
1706
|
ptm: ptm,
|
|
1681
|
-
cx: cx
|
|
1707
|
+
cx: cx,
|
|
1708
|
+
focusedList: focused,
|
|
1709
|
+
changeFocusedOptionIndex: changeFocusedOptionIndex,
|
|
1710
|
+
focusOnHover: props.focusOnHover
|
|
1682
1711
|
}), props.showTargetControls && /*#__PURE__*/React.createElement(PickListControls, {
|
|
1683
1712
|
hostName: "PickList",
|
|
1684
1713
|
list: props.target,
|