primereact 8.0.1 → 8.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/api.cjs.js +22 -1
- package/api/api.cjs.min.js +1 -1
- package/api/api.esm.js +22 -2
- package/api/api.esm.min.js +1 -1
- package/api/api.js +22 -1
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +42 -24
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +0 -1
- package/autocomplete/autocomplete.esm.js +43 -25
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +42 -24
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +7 -7
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.d.ts +1 -3
- package/avatar/avatar.esm.js +7 -7
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +7 -7
- package/avatar/avatar.min.js +1 -1
- package/badge/badge.cjs.js +2 -2
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.d.ts +2 -4
- package/badge/badge.esm.js +2 -2
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +2 -2
- package/badge/badge.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +22 -6
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +22 -6
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +22 -6
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +1 -1
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +1 -1
- package/button/button.esm.min.js +1 -1
- package/button/button.js +1 -1
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +80 -7
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +7 -5
- package/calendar/calendar.esm.js +80 -7
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +80 -7
- package/calendar/calendar.min.js +1 -1
- package/captcha/captcha.cjs.js +1 -0
- package/captcha/captcha.esm.js +1 -0
- package/captcha/captcha.js +1 -0
- package/card/card.d.ts +1 -4
- package/carousel/carousel.cjs.js +18 -17
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +19 -18
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +19 -18
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +5 -4
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +1 -1
- package/cascadeselect/cascadeselect.esm.js +5 -4
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +5 -4
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +13 -7
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +13 -7
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +13 -7
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +1 -2
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +2 -3
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +1 -2
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.d.ts +1 -3
- package/chips/chips.cjs.js +18 -2
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +3 -0
- package/chips/chips.esm.js +19 -3
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +19 -4
- package/chips/chips.min.js +1 -1
- package/column/column.cjs.js +2 -1
- package/column/column.cjs.min.js +1 -1
- package/column/column.d.ts +2 -0
- package/column/column.esm.js +2 -1
- package/column/column.esm.min.js +1 -1
- package/column/column.js +2 -1
- package/column/column.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +1 -6
- package/contextmenu/contextmenu.cjs.js +1 -0
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +1 -0
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +1 -0
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +390 -160
- package/core/core.min.js +14 -14
- package/datatable/datatable.cjs.js +68 -27
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +69 -28
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +68 -27
- package/datatable/datatable.min.css +1 -1
- package/datatable/datatable.min.js +1 -1
- package/dialog/dialog.cjs.js +7 -3
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +2 -0
- package/dialog/dialog.esm.js +7 -3
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +7 -3
- package/dialog/dialog.min.js +1 -1
- package/dropdown/dropdown.cjs.js +32 -25
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +1 -1
- package/dropdown/dropdown.esm.js +32 -25
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +32 -25
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +11 -3
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +11 -3
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +11 -3
- package/editor/editor.min.js +1 -1
- package/fileupload/fileupload.cjs.js +46 -19
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +1 -0
- package/fileupload/fileupload.esm.js +46 -19
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +46 -19
- package/fileupload/fileupload.min.js +1 -1
- package/fullcalendar/fullcalendar.cjs.js +1 -0
- package/fullcalendar/fullcalendar.esm.js +1 -0
- package/fullcalendar/fullcalendar.js +1 -0
- package/hooks/hooks.cjs.js +48 -2
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.d.ts +3 -1
- package/hooks/hooks.esm.js +47 -3
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +48 -2
- package/hooks/hooks.min.js +1 -1
- package/image/image.cjs.js +5 -5
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +1 -3
- package/image/image.esm.js +5 -5
- package/image/image.esm.min.js +1 -1
- package/image/image.js +5 -5
- package/image/image.min.css +1 -1
- package/image/image.min.js +1 -1
- 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/inputmask/inputmask.cjs.js +7 -5
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.d.ts +0 -1
- package/inputmask/inputmask.esm.js +7 -5
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +7 -5
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +37 -4
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +38 -5
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +37 -4
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +1 -1
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.d.ts +1 -1
- package/inputswitch/inputswitch.esm.js +2 -2
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +1 -1
- package/inputswitch/inputswitch.min.css +1 -1
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.min.css +1 -1
- package/listbox/listbox.cjs.js +84 -15
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.d.ts +2 -1
- package/listbox/listbox.esm.js +84 -15
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +85 -17
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +32 -12
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.d.ts +7 -0
- package/megamenu/megamenu.esm.js +32 -12
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +32 -12
- package/megamenu/megamenu.min.css +1 -1
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +8 -4
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.esm.js +8 -4
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +8 -4
- package/mention/mention.min.js +1 -1
- package/menubar/menubar.cjs.js +1 -0
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +1 -0
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +1 -0
- package/menubar/menubar.min.js +1 -1
- package/menuitem/menuitem.d.ts +2 -0
- package/message/message.d.ts +1 -1
- package/messages/messages.cjs.js +3 -2
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +1 -1
- package/messages/messages.esm.js +3 -2
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +3 -2
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +22 -15
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +1 -1
- package/multiselect/multiselect.esm.js +22 -15
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +22 -15
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +30 -24
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +2 -4
- package/multistatecheckbox/multistatecheckbox.esm.js +30 -24
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +31 -26
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +2 -2
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +2 -2
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +2 -2
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +4 -2
- package/paginator/paginator.cjs.js +26 -24
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +26 -24
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +26 -25
- package/paginator/paginator.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +16 -0
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +17 -1
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +16 -0
- package/panelmenu/panelmenu.min.js +1 -1
- package/picklist/picklist.cjs.js +175 -16
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.d.ts +34 -1
- package/picklist/picklist.esm.js +175 -16
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +176 -18
- package/picklist/picklist.min.css +1 -1
- package/picklist/picklist.min.js +1 -1
- package/primereact.all.cjs.js +1262 -495
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +1260 -496
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +1262 -495
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +1 -2
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +1 -2
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +1 -2
- package/progressbar/progressbar.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +6 -6
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.d.ts +0 -1
- package/radiobutton/radiobutton.esm.js +7 -7
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +6 -6
- package/radiobutton/radiobutton.min.js +1 -1
- package/resources/primereact.css +266 -208
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +20 -7
- package/resources/themes/arya-green/theme.css +20 -7
- package/resources/themes/arya-orange/theme.css +20 -7
- package/resources/themes/arya-purple/theme.css +20 -7
- package/resources/themes/bootstrap4-dark-blue/theme.css +20 -7
- package/resources/themes/bootstrap4-dark-purple/theme.css +20 -7
- package/resources/themes/bootstrap4-light-blue/theme.css +19 -6
- package/resources/themes/bootstrap4-light-purple/theme.css +19 -6
- package/resources/themes/fluent-light/theme.css +20 -7
- package/resources/themes/lara-dark-blue/theme.css +20 -7
- package/resources/themes/lara-dark-indigo/theme.css +20 -7
- package/resources/themes/lara-dark-purple/theme.css +20 -7
- package/resources/themes/lara-dark-teal/theme.css +20 -7
- package/resources/themes/lara-light-blue/theme.css +20 -7
- package/resources/themes/lara-light-indigo/theme.css +20 -7
- package/resources/themes/lara-light-purple/theme.css +20 -7
- package/resources/themes/lara-light-teal/theme.css +20 -7
- package/resources/themes/luna-amber/theme.css +20 -7
- package/resources/themes/luna-blue/theme.css +20 -7
- package/resources/themes/luna-green/theme.css +20 -7
- package/resources/themes/luna-pink/theme.css +20 -7
- package/resources/themes/md-dark-deeppurple/theme.css +20 -7
- package/resources/themes/md-dark-indigo/theme.css +20 -7
- package/resources/themes/md-light-deeppurple/theme.css +20 -7
- package/resources/themes/md-light-indigo/theme.css +20 -7
- package/resources/themes/mdc-dark-deeppurple/theme.css +20 -7
- package/resources/themes/mdc-dark-indigo/theme.css +20 -7
- package/resources/themes/mdc-light-deeppurple/theme.css +20 -7
- package/resources/themes/mdc-light-indigo/theme.css +20 -7
- package/resources/themes/nova/theme.css +20 -7
- package/resources/themes/nova-accent/theme.css +20 -7
- package/resources/themes/nova-alt/theme.css +20 -7
- package/resources/themes/rhea/theme.css +20 -7
- package/resources/themes/saga-blue/theme.css +20 -7
- package/resources/themes/saga-green/theme.css +20 -7
- package/resources/themes/saga-orange/theme.css +20 -7
- package/resources/themes/saga-purple/theme.css +20 -7
- package/resources/themes/tailwind-light/theme.css +20 -7
- package/resources/themes/vela-blue/theme.css +20 -7
- package/resources/themes/vela-green/theme.css +20 -7
- package/resources/themes/vela-orange/theme.css +20 -7
- package/resources/themes/vela-purple/theme.css +20 -7
- package/selectbutton/selectbutton.cjs.js +2 -6
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.d.ts +1 -1
- package/selectbutton/selectbutton.esm.js +2 -6
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +2 -6
- package/selectbutton/selectbutton.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +39 -7
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.esm.js +39 -7
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +39 -7
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +6 -3
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.d.ts +1 -1
- package/slider/slider.esm.js +6 -3
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +6 -3
- package/slider/slider.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +16 -9
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +4 -0
- package/splitbutton/splitbutton.esm.js +16 -9
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +16 -9
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +15 -7
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +16 -8
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +15 -7
- package/splitter/splitter.min.js +1 -1
- 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 +26 -21
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.d.ts +1 -1
- package/styleclass/styleclass.esm.js +26 -21
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +26 -21
- package/styleclass/styleclass.min.js +1 -1
- package/tag/tag.d.ts +1 -1
- package/terminal/terminal.cjs.js +1 -1
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +2 -2
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +1 -1
- package/terminal/terminal.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +3 -1
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +3 -1
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +3 -1
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/toast/toast.cjs.js +30 -35
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +2 -1
- package/toast/toast.esm.js +30 -35
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +30 -35
- package/toast/toast.min.css +1 -1
- package/toast/toast.min.js +1 -1
- package/tooltip/tooltip.cjs.js +28 -22
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +28 -22
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +28 -22
- package/tooltip/tooltip.min.js +1 -1
- package/tree/tree.cjs.js +9 -1
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +9 -1
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +9 -1
- package/tree/tree.min.js +1 -1
- package/treeselect/treeselect.cjs.js +2 -2
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +2 -2
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +2 -2
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +11 -1
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +3 -3
- package/treetable/treetable.esm.js +11 -1
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +11 -1
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +25 -23
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.d.ts +2 -4
- package/tristatecheckbox/tristatecheckbox.esm.js +25 -23
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +26 -25
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +21 -5
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +1 -0
- package/utils/utils.esm.js +21 -5
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +21 -5
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +154 -65
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.d.ts +12 -0
- package/virtualscroller/virtualscroller.esm.js +156 -67
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +154 -65
- package/virtualscroller/virtualscroller.min.css +1 -1
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +252 -66
package/picklist/picklist.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
this.primereact = this.primereact || {};
|
|
2
|
-
this.primereact.picklist = (function (exports, React, hooks, utils, button, ripple) {
|
|
2
|
+
this.primereact.picklist = (function (exports, React, api, hooks, utils, button, ripple) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopNamespace(e) {
|
|
@@ -375,6 +375,23 @@ this.primereact.picklist = (function (exports, React, hooks, utils, button, ripp
|
|
|
375
375
|
return utils.ObjectUtils.findIndexInList(item, props.selection, props.dataKey) !== -1;
|
|
376
376
|
};
|
|
377
377
|
|
|
378
|
+
var onFilter = function onFilter(event) {
|
|
379
|
+
if (props.onFilter) {
|
|
380
|
+
props.onFilter({
|
|
381
|
+
originalEvent: event,
|
|
382
|
+
value: event.target.value,
|
|
383
|
+
type: props.type
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
var onFilterInputKeyDown = function onFilterInputKeyDown(event) {
|
|
389
|
+
//enter
|
|
390
|
+
if (event.which === 13) {
|
|
391
|
+
event.preventDefault();
|
|
392
|
+
}
|
|
393
|
+
};
|
|
394
|
+
|
|
378
395
|
React__namespace.useImperativeHandle(ref, function () {
|
|
379
396
|
return {
|
|
380
397
|
listElementRef: listElementRef
|
|
@@ -411,6 +428,44 @@ this.primereact.picklist = (function (exports, React, hooks, utils, button, ripp
|
|
|
411
428
|
return null;
|
|
412
429
|
};
|
|
413
430
|
|
|
431
|
+
var createFilter = function createFilter() {
|
|
432
|
+
if (props.showFilter) {
|
|
433
|
+
var content = /*#__PURE__*/React__namespace.createElement("div", {
|
|
434
|
+
className: "p-picklist-filter"
|
|
435
|
+
}, /*#__PURE__*/React__namespace.createElement("input", {
|
|
436
|
+
type: "text",
|
|
437
|
+
value: props.filterValue,
|
|
438
|
+
onChange: onFilter,
|
|
439
|
+
onKeyDown: onFilterInputKeyDown,
|
|
440
|
+
placeholder: props.placeholder,
|
|
441
|
+
className: "p-picklist-filter-input p-inputtext p-component"
|
|
442
|
+
}), /*#__PURE__*/React__namespace.createElement("span", {
|
|
443
|
+
className: "p-picklist-filter-icon pi pi-search"
|
|
444
|
+
}));
|
|
445
|
+
|
|
446
|
+
if (props.filterTemplate) {
|
|
447
|
+
var defaultContentOptions = {
|
|
448
|
+
className: 'p-picklist-filter',
|
|
449
|
+
inputProps: {
|
|
450
|
+
className: 'p-picklist-filter-input p-inputtext p-component',
|
|
451
|
+
onChange: onFilter,
|
|
452
|
+
onKeyDown: onFilterInputKeyDown
|
|
453
|
+
},
|
|
454
|
+
iconClassName: 'p-picklist-filter-icon pi pi-search',
|
|
455
|
+
element: content,
|
|
456
|
+
props: props
|
|
457
|
+
};
|
|
458
|
+
content = utils.ObjectUtils.getJSXElement(props.filterTemplate, defaultContentOptions);
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
462
|
+
className: "p-picklist-filter-container"
|
|
463
|
+
}, content);
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
return null;
|
|
467
|
+
};
|
|
468
|
+
|
|
414
469
|
var createList = function createList() {
|
|
415
470
|
var items = createItems();
|
|
416
471
|
var className = utils.classNames('p-picklist-list', props.listClassName);
|
|
@@ -424,19 +479,20 @@ this.primereact.picklist = (function (exports, React, hooks, utils, button, ripp
|
|
|
424
479
|
|
|
425
480
|
var className = utils.classNames('p-picklist-list-wrapper', props.className);
|
|
426
481
|
var header = createHeader();
|
|
482
|
+
var filter = createFilter();
|
|
427
483
|
var list = createList();
|
|
428
484
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
429
485
|
ref: listElementRef,
|
|
430
486
|
className: className
|
|
431
|
-
}, header, list);
|
|
487
|
+
}, header, filter, list);
|
|
432
488
|
}));
|
|
433
489
|
PickListSubList.displayName = 'PickListSubList';
|
|
434
490
|
|
|
435
491
|
var PickListTransferControls = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
436
|
-
var moveRightDisabled = utils.ObjectUtils.isEmpty(props.sourceSelection);
|
|
437
|
-
var moveLeftDisabled = utils.ObjectUtils.isEmpty(props.targetSelection);
|
|
438
|
-
var moveAllRightDisabled = utils.ObjectUtils.isEmpty(props.
|
|
439
|
-
var moveAllLeftDisabled = utils.ObjectUtils.isEmpty(props.
|
|
492
|
+
var moveRightDisabled = utils.ObjectUtils.isEmpty(props.sourceSelection) || utils.ObjectUtils.isEmpty(props.visibleSourceList);
|
|
493
|
+
var moveLeftDisabled = utils.ObjectUtils.isEmpty(props.targetSelection) || utils.ObjectUtils.isEmpty(props.visibleTargetList);
|
|
494
|
+
var moveAllRightDisabled = utils.ObjectUtils.isEmpty(props.visibleSourceList);
|
|
495
|
+
var moveAllLeftDisabled = utils.ObjectUtils.isEmpty(props.visibleTargetList);
|
|
440
496
|
|
|
441
497
|
var moveRight = function moveRight(event) {
|
|
442
498
|
var selection = props.sourceSelection;
|
|
@@ -467,8 +523,12 @@ this.primereact.picklist = (function (exports, React, hooks, utils, button, ripp
|
|
|
467
523
|
|
|
468
524
|
var moveAllRight = function moveAllRight(event) {
|
|
469
525
|
if (props.source) {
|
|
470
|
-
var targetList = [].concat(_toConsumableArray(props.target), _toConsumableArray(props.
|
|
471
|
-
var sourceList =
|
|
526
|
+
var targetList = [].concat(_toConsumableArray(props.target), _toConsumableArray(props.visibleSourceList));
|
|
527
|
+
var sourceList = props.source.filter(function (s) {
|
|
528
|
+
return !props.visibleSourceList.some(function (vs) {
|
|
529
|
+
return vs === s;
|
|
530
|
+
});
|
|
531
|
+
});
|
|
472
532
|
|
|
473
533
|
if (props.onTransfer) {
|
|
474
534
|
props.onTransfer({
|
|
@@ -510,8 +570,12 @@ this.primereact.picklist = (function (exports, React, hooks, utils, button, ripp
|
|
|
510
570
|
|
|
511
571
|
var moveAllLeft = function moveAllLeft(event) {
|
|
512
572
|
if (props.source) {
|
|
513
|
-
var sourceList = [].concat(_toConsumableArray(props.source), _toConsumableArray(props.
|
|
514
|
-
var targetList =
|
|
573
|
+
var sourceList = [].concat(_toConsumableArray(props.source), _toConsumableArray(props.visibleTargetList));
|
|
574
|
+
var targetList = props.target.filter(function (t) {
|
|
575
|
+
return !props.visibleTargetList.some(function (vt) {
|
|
576
|
+
return vt === t;
|
|
577
|
+
});
|
|
578
|
+
});
|
|
515
579
|
|
|
516
580
|
if (props.onTransfer) {
|
|
517
581
|
props.onTransfer({
|
|
@@ -562,12 +626,27 @@ this.primereact.picklist = (function (exports, React, hooks, utils, button, ripp
|
|
|
562
626
|
targetSelectionState = _React$useState4[0],
|
|
563
627
|
setTargetSelectionState = _React$useState4[1];
|
|
564
628
|
|
|
629
|
+
var _React$useState5 = React__namespace.useState(''),
|
|
630
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
631
|
+
sourceFilterValueState = _React$useState6[0],
|
|
632
|
+
setSourceFilterValueState = _React$useState6[1];
|
|
633
|
+
|
|
634
|
+
var _React$useState7 = React__namespace.useState(''),
|
|
635
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
636
|
+
targetFilterValueState = _React$useState8[0],
|
|
637
|
+
setTargetFilterValueState = _React$useState8[1];
|
|
638
|
+
|
|
565
639
|
var sourceListElementRef = React__namespace.useRef(null);
|
|
566
640
|
var targetListElementRef = React__namespace.useRef(null);
|
|
567
641
|
var reorderedListElementRef = React__namespace.useRef(null);
|
|
568
642
|
var reorderDirection = React__namespace.useRef(null);
|
|
569
643
|
var sourceSelection = props.onSourceSelectionChange ? props.sourceSelection : sourceSelectionState;
|
|
570
644
|
var targetSelection = props.onTargetSelectionChange ? props.targetSelection : targetSelectionState;
|
|
645
|
+
var sourceFilteredValue = props.onSourceFilterChange ? props.sourceFilterValue : sourceFilterValueState;
|
|
646
|
+
var targetFilteredValue = props.onTargetFilterChange ? props.targetFilterValue : targetFilterValueState;
|
|
647
|
+
var hasFilterBy = utils.ObjectUtils.isNotEmpty(props.filterBy);
|
|
648
|
+
var showSourceFilter = hasFilterBy && props.showSourceFilter;
|
|
649
|
+
var showTargetFilter = hasFilterBy && props.showTargetFilter;
|
|
571
650
|
|
|
572
651
|
var onSourceReorder = function onSourceReorder(event) {
|
|
573
652
|
handleChange(event, event.value, props.target);
|
|
@@ -702,6 +781,52 @@ this.primereact.picklist = (function (exports, React, hooks, utils, button, ripp
|
|
|
702
781
|
}
|
|
703
782
|
};
|
|
704
783
|
|
|
784
|
+
var onFilter = function onFilter(event) {
|
|
785
|
+
var originalEvent = event.originalEvent,
|
|
786
|
+
value = event.value,
|
|
787
|
+
type = event.type;
|
|
788
|
+
|
|
789
|
+
var _ref = type === 'source' ? [setSourceFilterValueState, props.onSourceFilterChange] : [setTargetFilterValueState, props.onTargetFilterChange],
|
|
790
|
+
_ref2 = _slicedToArray(_ref, 2),
|
|
791
|
+
setFilterState = _ref2[0],
|
|
792
|
+
onFilterChange = _ref2[1];
|
|
793
|
+
|
|
794
|
+
if (onFilterChange) {
|
|
795
|
+
onFilterChange({
|
|
796
|
+
originalEvent: originalEvent,
|
|
797
|
+
value: value
|
|
798
|
+
});
|
|
799
|
+
} else {
|
|
800
|
+
setFilterState(value);
|
|
801
|
+
}
|
|
802
|
+
};
|
|
803
|
+
|
|
804
|
+
var getVisibleList = function getVisibleList(list, type) {
|
|
805
|
+
var _ref3 = type === 'source' ? [sourceFilteredValue, filterSource] : [targetFilteredValue, filterTarget],
|
|
806
|
+
_ref4 = _slicedToArray(_ref3, 2),
|
|
807
|
+
filteredValue = _ref4[0],
|
|
808
|
+
filterCallback = _ref4[1];
|
|
809
|
+
|
|
810
|
+
return hasFilterBy && utils.ObjectUtils.isNotEmpty(filteredValue) ? filterCallback(filteredValue) : list;
|
|
811
|
+
};
|
|
812
|
+
|
|
813
|
+
var filterSource = function filterSource() {
|
|
814
|
+
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
815
|
+
var filteredValue = value.trim().toLocaleLowerCase(props.filterLocale);
|
|
816
|
+
return filter(props.source, filteredValue);
|
|
817
|
+
};
|
|
818
|
+
|
|
819
|
+
var filterTarget = function filterTarget() {
|
|
820
|
+
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
821
|
+
var filteredValue = value.trim().toLocaleLowerCase(props.filterLocale);
|
|
822
|
+
return filter(props.target, filteredValue);
|
|
823
|
+
};
|
|
824
|
+
|
|
825
|
+
var filter = function filter(list, filterValue) {
|
|
826
|
+
var searchFields = hasFilterBy ? props.filterBy.split(',') : [];
|
|
827
|
+
return api.FilterService.filter(list, searchFields, filterValue, props.filterMatchMode, props.filterLocale);
|
|
828
|
+
};
|
|
829
|
+
|
|
705
830
|
hooks.useUpdateEffect(function () {
|
|
706
831
|
if (reorderedListElementRef.current) {
|
|
707
832
|
handleScrollPosition(reorderedListElementRef.current, reorderDirection.current);
|
|
@@ -711,6 +836,10 @@ this.primereact.picklist = (function (exports, React, hooks, utils, button, ripp
|
|
|
711
836
|
});
|
|
712
837
|
var otherProps = utils.ObjectUtils.findDiffKeys(props, PickList.defaultProps);
|
|
713
838
|
var className = utils.classNames('p-picklist p-component', props.className);
|
|
839
|
+
var sourceItemTemplate = props.sourceItemTemplate ? props.sourceItemTemplate : props.itemTemplate;
|
|
840
|
+
var targetItemTemplate = props.targetItemTemplate ? props.targetItemTemplate : props.itemTemplate;
|
|
841
|
+
var sourceList = getVisibleList(props.source, 'source');
|
|
842
|
+
var targetList = getVisibleList(props.target, 'target');
|
|
714
843
|
return /*#__PURE__*/React__namespace.createElement("div", _extends({
|
|
715
844
|
id: props.id,
|
|
716
845
|
className: className,
|
|
@@ -723,41 +852,55 @@ this.primereact.picklist = (function (exports, React, hooks, utils, button, ripp
|
|
|
723
852
|
dataKey: props.dataKey
|
|
724
853
|
}), /*#__PURE__*/React__namespace.createElement(PickListSubList, {
|
|
725
854
|
ref: sourceListElementRef,
|
|
726
|
-
|
|
855
|
+
type: "source",
|
|
856
|
+
list: sourceList,
|
|
727
857
|
selection: sourceSelection,
|
|
728
858
|
onSelectionChange: function onSelectionChange(e) {
|
|
729
859
|
return _onSelectionChange(e, 'sourceSelection', props.onSourceSelectionChange);
|
|
730
860
|
},
|
|
731
|
-
itemTemplate:
|
|
861
|
+
itemTemplate: sourceItemTemplate,
|
|
732
862
|
header: props.sourceHeader,
|
|
733
863
|
style: props.sourceStyle,
|
|
734
864
|
className: "p-picklist-source-wrapper",
|
|
735
865
|
listClassName: "p-picklist-source",
|
|
736
866
|
metaKeySelection: props.metaKeySelection,
|
|
737
867
|
tabIndex: props.tabIndex,
|
|
738
|
-
dataKey: props.dataKey
|
|
868
|
+
dataKey: props.dataKey,
|
|
869
|
+
filterValue: sourceFilteredValue,
|
|
870
|
+
onFilter: onFilter,
|
|
871
|
+
showFilter: showSourceFilter,
|
|
872
|
+
placeholder: props.sourceFilterPlaceholder,
|
|
873
|
+
template: props.sourceFilterTemplate
|
|
739
874
|
}), /*#__PURE__*/React__namespace.createElement(PickListTransferControls, {
|
|
740
875
|
onTransfer: onTransfer,
|
|
741
876
|
source: props.source,
|
|
877
|
+
visibleSourceList: sourceList,
|
|
742
878
|
target: props.target,
|
|
879
|
+
visibleTargetList: targetList,
|
|
743
880
|
sourceSelection: sourceSelection,
|
|
744
881
|
targetSelection: targetSelection,
|
|
745
882
|
dataKey: props.dataKey
|
|
746
883
|
}), /*#__PURE__*/React__namespace.createElement(PickListSubList, {
|
|
747
884
|
ref: targetListElementRef,
|
|
748
|
-
|
|
885
|
+
type: "target",
|
|
886
|
+
list: targetList,
|
|
749
887
|
selection: targetSelection,
|
|
750
888
|
onSelectionChange: function onSelectionChange(e) {
|
|
751
889
|
return _onSelectionChange(e, 'targetSelection', props.onTargetSelectionChange);
|
|
752
890
|
},
|
|
753
|
-
itemTemplate:
|
|
891
|
+
itemTemplate: targetItemTemplate,
|
|
754
892
|
header: props.targetHeader,
|
|
755
893
|
style: props.targetStyle,
|
|
756
894
|
className: "p-picklist-target-wrapper",
|
|
757
895
|
listClassName: "p-picklist-target",
|
|
758
896
|
metaKeySelection: props.metaKeySelection,
|
|
759
897
|
tabIndex: props.tabIndex,
|
|
760
|
-
dataKey: props.dataKey
|
|
898
|
+
dataKey: props.dataKey,
|
|
899
|
+
filterValue: targetFilteredValue,
|
|
900
|
+
onFilter: onFilter,
|
|
901
|
+
showFilter: showTargetFilter,
|
|
902
|
+
placeholder: props.targetFilterPlaceholder,
|
|
903
|
+
template: props.targetFilterTemplate
|
|
761
904
|
}), props.showTargetControls && /*#__PURE__*/React__namespace.createElement(PickListControls, {
|
|
762
905
|
list: props.target,
|
|
763
906
|
selection: targetSelection,
|
|
@@ -783,16 +926,31 @@ this.primereact.picklist = (function (exports, React, hooks, utils, button, ripp
|
|
|
783
926
|
showSourceControls: true,
|
|
784
927
|
showTargetControls: true,
|
|
785
928
|
metaKeySelection: true,
|
|
929
|
+
filterBy: null,
|
|
930
|
+
filterMatchMode: 'contains',
|
|
931
|
+
filterLocale: undefined,
|
|
932
|
+
sourceFilterValue: null,
|
|
933
|
+
targetFilterValue: null,
|
|
934
|
+
showSourceFilter: true,
|
|
935
|
+
showTargetFilter: true,
|
|
936
|
+
sourceFilterPlaceholder: null,
|
|
937
|
+
targetFilterPlaceholder: null,
|
|
938
|
+
sourceFilterTemplate: null,
|
|
939
|
+
targetFilterTemplate: null,
|
|
786
940
|
tabIndex: 0,
|
|
787
941
|
dataKey: null,
|
|
788
942
|
itemTemplate: null,
|
|
943
|
+
sourceItemTemplate: null,
|
|
944
|
+
targetItemTemplate: null,
|
|
789
945
|
onChange: null,
|
|
790
946
|
onMoveToSource: null,
|
|
791
947
|
onMoveAllToSource: null,
|
|
792
948
|
onMoveToTarget: null,
|
|
793
949
|
onMoveAllToTarget: null,
|
|
794
950
|
onSourceSelectionChange: null,
|
|
795
|
-
onTargetSelectionChange: null
|
|
951
|
+
onTargetSelectionChange: null,
|
|
952
|
+
onSourceFilterChange: null,
|
|
953
|
+
onTargetFilterChange: null
|
|
796
954
|
};
|
|
797
955
|
|
|
798
956
|
exports.PickList = PickList;
|
|
@@ -801,4 +959,4 @@ this.primereact.picklist = (function (exports, React, hooks, utils, button, ripp
|
|
|
801
959
|
|
|
802
960
|
return exports;
|
|
803
961
|
|
|
804
|
-
})({}, React, primereact.hooks, primereact.utils, primereact.button, primereact.ripple);
|
|
962
|
+
})({}, React, primereact.api, primereact.hooks, primereact.utils, primereact.button, primereact.ripple);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.p-picklist{display:flex}.p-picklist-buttons{display:flex;flex-direction:column;justify-content:center}.p-picklist-list-wrapper{flex:1 1 50%}.p-picklist-list{list-style-type:none;margin:0;padding:0;overflow:auto;min-height:12rem;max-height:24rem}.p-picklist-item{cursor:pointer;overflow:hidden;position:relative}
|
|
1
|
+
.p-picklist{display:flex}.p-picklist-buttons{display:flex;flex-direction:column;justify-content:center}.p-picklist-list-wrapper{flex:1 1 50%}.p-picklist-list{list-style-type:none;margin:0;padding:0;overflow:auto;min-height:12rem;max-height:24rem}.p-picklist-item{cursor:pointer;overflow:hidden;position:relative}.p-picklist-filter{position:relative}.p-picklist-filter-icon{position:absolute;top:50%;margin-top:-.5rem}.p-picklist-filter-input{width:100%}
|
package/picklist/picklist.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.picklist=function(e,t,n,r,a,l){"use strict";function o(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var i=o(t);function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}function s(e){if(Array.isArray(e))return e}function u(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,l=[],o=!0,i=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(l.push(r.value),!t||l.length!==t);o=!0);}catch(e){i=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(i)throw a}}return l}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(e,t){if(e){if("string"==typeof e)return d(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)?d(e,t):void 0}}function f(){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 m(e,t){return s(e)||u(e,t)||p(e,t)||f()}function g(e){if(Array.isArray(e))return d(e)}function v(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function y(){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 b(e){return g(e)||v(e)||p(e)||y()}var h=i.memo((function(e){var t=!e.selection.length,n=r.classNames("p-picklist-buttons",e.className);return i.createElement("div",{className:n},i.createElement(a.Button,{disabled:t,type:"button",icon:"pi pi-angle-up",onClick:function(t){var n=e.selection;if(n&&n.length){for(var a=b(e.list),l=0;l<n.length;l++){var o=r.ObjectUtils.findIndexInList(n[l],a,e.dataKey);if(0===o)break;var i=a[o-1];a[o-1]=a[o],a[o]=i}e.onReorder&&e.onReorder({originalEvent:t,value:a,direction:"up"})}}}),i.createElement(a.Button,{disabled:t,type:"button",icon:"pi pi-angle-double-up",onClick:function(t){var n=e.selection;if(n&&n.length){for(var a=b(e.list),l=0;l<n.length;l++){var o=r.ObjectUtils.findIndexInList(n[l],a,e.dataKey);if(0===o)break;var i=a.splice(o,1)[0];a.unshift(i)}e.onReorder&&e.onReorder({originalEvent:t,value:a,direction:"top"})}}}),i.createElement(a.Button,{disabled:t,type:"button",icon:"pi pi-angle-down",onClick:function(t){var n=e.selection;if(n&&n.length){for(var a=b(e.list),l=n.length-1;l>=0;l--){var o=r.ObjectUtils.findIndexInList(n[l],a,e.dataKey);if(o===a.length-1)break;var i=a[o+1];a[o+1]=a[o],a[o]=i}e.onReorder&&e.onReorder({originalEvent:t,value:a,direction:"down"})}}}),i.createElement(a.Button,{disabled:t,type:"button",icon:"pi pi-angle-double-down",onClick:function(t){var n=e.selection;if(n&&n.length){for(var a=b(e.list),l=n.length-1;l>=0;l--){var o=r.ObjectUtils.findIndexInList(n[l],a,e.dataKey);if(o===a.length-1)break;var i=a.splice(o,1)[0];a.push(i)}e.onReorder&&e.onReorder({originalEvent:t,value:a,direction:"bottom"})}}}))}));h.displayName="PickListControls";var S=i.memo((function(e){var t=e.template?e.template(e.value):e.value,n=r.classNames("p-picklist-item",{"p-highlight":e.selected},e.className);return i.createElement("li",{className:n,onClick:function(t){e.onClick&&e.onClick({originalEvent:t,value:e.value})},onKeyDown:function(t){e.onKeyDown&&e.onKeyDown({originalEvent:t,value:e.value})},tabIndex:e.tabIndex,role:"option","aria-selected":e.selected},t,i.createElement(l.Ripple,null))}));S.displayName="PickListItem";var E=i.memo(i.forwardRef((function(e,t){var n=i.useRef(null),a=function(t){var n=t.originalEvent,a=t.value,l=b(e.selection),o=r.ObjectUtils.findIndexInList(a,l,e.dataKey),i=-1!==o;if(e.metaKeySelection){var c=n.metaKey||n.ctrlKey;i&&c?l.splice(o,1):(c||(l.length=0),l.push(a))}else i?l.splice(o,1):l.push(a);e.onSelectionChange&&e.onSelectionChange({event:n,value:l})},l=function(e){var t=e.originalEvent,n=t.currentTarget;switch(t.which){case 40:var r=o(n);r&&r.focus(),t.preventDefault();break;case 38:var l=c(n);l&&l.focus(),t.preventDefault();break;case 13:a(e),t.preventDefault()}},o=function e(t){var n=t.nextElementSibling;return n?r.DomHandler.hasClass(n,"p-picklist-item")?n:e(n):null},c=function e(t){var n=t.previousElementSibling;return n?r.DomHandler.hasClass(n,"p-picklist-item")?n:e(n):null},s=function(t){return-1!==r.ObjectUtils.findIndexInList(t,e.selection,e.dataKey)};i.useImperativeHandle(t,(function(){return{listElementRef:n}}));var u=r.classNames("p-picklist-list-wrapper",e.className),d=e.header?i.createElement("div",{className:"p-picklist-header"},r.ObjectUtils.getJSXElement(e.header,e)):null,p=function(){var t=e.list?e.list.map((function(t){var n=JSON.stringify(t),r=s(t);return i.createElement(S,{key:n,value:t,template:e.itemTemplate,selected:r,onClick:a,onKeyDown:l,tabIndex:e.tabIndex})})):null,n=r.classNames("p-picklist-list",e.listClassName);return i.createElement("ul",{className:n,style:e.style,role:"listbox","aria-multiselectable":!0},t)}();return i.createElement("div",{ref:n,className:u},d,p)})));E.displayName="PickListSubList";var T=i.memo((function(e){var t=r.ObjectUtils.isEmpty(e.sourceSelection),n=r.ObjectUtils.isEmpty(e.targetSelection),l=r.ObjectUtils.isEmpty(e.source),o=r.ObjectUtils.isEmpty(e.target),c=r.classNames("p-picklist-buttons p-picklist-transfer-buttons",e.className);return i.createElement("div",{className:c},i.createElement(a.Button,{disabled:t,type:"button",icon:"pi pi-angle-right",onClick:function(t){var n=e.sourceSelection;if(r.ObjectUtils.isNotEmpty(n)){for(var a=b(e.target),l=b(e.source),o=0;o<n.length;o++){var i=n[o];-1===r.ObjectUtils.findIndexInList(i,a,e.dataKey)&&a.push(l.splice(r.ObjectUtils.findIndexInList(i,l,e.dataKey),1)[0])}e.onTransfer&&e.onTransfer({originalEvent:t,source:l,target:a,direction:"toTarget"})}}}),i.createElement(a.Button,{disabled:l,type:"button",icon:"pi pi-angle-double-right",onClick:function(t){if(e.source){var n=[].concat(b(e.target),b(e.source));e.onTransfer&&e.onTransfer({originalEvent:t,source:[],target:n,direction:"allToTarget"})}}}),i.createElement(a.Button,{disabled:n,type:"button",icon:"pi pi-angle-left",onClick:function(t){var n=e.targetSelection;if(r.ObjectUtils.isNotEmpty(n)){for(var a=b(e.target),l=b(e.source),o=0;o<n.length;o++){var i=n[o];-1===r.ObjectUtils.findIndexInList(i,l,e.dataKey)&&l.push(a.splice(r.ObjectUtils.findIndexInList(i,a,e.dataKey),1)[0])}e.onTransfer&&e.onTransfer({originalEvent:t,source:l,target:a,direction:"toSource"})}}}),i.createElement(a.Button,{disabled:o,type:"button",icon:"pi pi-angle-double-left",onClick:function(t){if(e.source){var n=[].concat(b(e.source),b(e.target));e.onTransfer&&e.onTransfer({originalEvent:t,source:n,target:[],direction:"allToSource"})}}}))}));T.displayName="PickListTransferControls";var k=i.memo(i.forwardRef((function(e,t){var a=m(i.useState([]),2),l=a[0],o=a[1],s=m(i.useState([]),2),u=s[0],d=s[1],p=i.useRef(null),f=i.useRef(null),g=i.useRef(null),v=i.useRef(null),y=e.onSourceSelectionChange?e.sourceSelection:l,b=e.onTargetSelectionChange?e.targetSelection:u,S=function(e,t){if(e){var n=r.DomHandler.findSingle(e,".p-picklist-list");switch(t){case"up":N(n,-1);break;case"top":n.scrollTop=0;break;case"down":N(n,1);break;case"bottom":setTimeout((function(){return n.scrollTop=n.scrollHeight}),100)}}},C=function(t,n,r){e.onChange&&e.onChange({originalEvent:t.originalEvent,source:n,target:r})},N=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])},I=function(e,t,n){n?n(e):"sourceSelection"===t?o(e.value):d(e.value),r.ObjectUtils.isNotEmpty(y)&&"targetSelection"===t?o([]):r.ObjectUtils.isNotEmpty(b)&&"sourceSelection"===t&&d([])};n.useUpdateEffect((function(){g.current&&(S(g.current,v.current),g.current=null,v.current=null)}));var K=r.ObjectUtils.findDiffKeys(e,k.defaultProps),O=r.classNames("p-picklist p-component",e.className);return i.createElement("div",c({id:e.id,className:O,style:e.style},K),e.showSourceControls&&i.createElement(h,{list:e.source,selection:y,onReorder:function(t){C(t,t.value,e.target),g.current=p.current.listElementRef.current,v.current=t.direction},className:"p-picklist-source-controls",dataKey:e.dataKey}),i.createElement(E,{ref:p,list:e.source,selection:y,onSelectionChange:function(t){return I(t,"sourceSelection",e.onSourceSelectionChange)},itemTemplate:e.itemTemplate,header:e.sourceHeader,style:e.sourceStyle,className:"p-picklist-source-wrapper",listClassName:"p-picklist-source",metaKeySelection:e.metaKeySelection,tabIndex:e.tabIndex,dataKey:e.dataKey}),i.createElement(T,{onTransfer:function(t){var n=t.originalEvent,r=t.source,a=t.target;switch(t.direction){case"toTarget":e.onMoveToTarget&&e.onMoveToTarget({originalEvent:n,value:y});break;case"allToTarget":e.onMoveAllToTarget&&e.onMoveAllToTarget({originalEvent:n,value:e.source});break;case"toSource":e.onMoveToSource&&e.onMoveToSource({originalEvent:n,value:b});break;case"allToSource":e.onMoveAllToSource&&e.onMoveAllToSource({originalEvent:n,value:e.target})}I({originalEvent:n,value:[]},"sourceSelection",e.onSourceSelectionChange),I({originalEvent:n,value:[]},"targetSelection",e.onTargetSelectionChange),C(t,r,a)},source:e.source,target:e.target,sourceSelection:y,targetSelection:b,dataKey:e.dataKey}),i.createElement(E,{ref:f,list:e.target,selection:b,onSelectionChange:function(t){return I(t,"targetSelection",e.onTargetSelectionChange)},itemTemplate:e.itemTemplate,header:e.targetHeader,style:e.targetStyle,className:"p-picklist-target-wrapper",listClassName:"p-picklist-target",metaKeySelection:e.metaKeySelection,tabIndex:e.tabIndex,dataKey:e.dataKey}),e.showTargetControls&&i.createElement(h,{list:e.target,selection:b,onReorder:function(t){C(t,e.source,t.value),g.current=f.current.listElementRef.current,v.current=t.direction},className:"p-picklist-target-controls",dataKey:e.dataKey}))})));return k.displayName="PickList",k.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:!0,tabIndex:0,dataKey:null,itemTemplate:null,onChange:null,onMoveToSource:null,onMoveAllToSource:null,onMoveToTarget:null,onMoveAllToTarget:null,onSourceSelectionChange:null,onTargetSelectionChange:null},e.PickList=k,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.hooks,primereact.utils,primereact.button,primereact.ripple);
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.picklist=function(e,t,n,r,l,i,a){"use strict";function o(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var c=o(t);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}function u(e){if(Array.isArray(e))return e}function p(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,l,i=[],a=!0,o=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){o=!0,l=e}finally{try{a||null==n.return||n.return()}finally{if(o)throw l}}return i}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){if(e){if("string"==typeof e)return f(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)?f(e,t):void 0}}function d(){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 g(e,t){return u(e)||p(e,t)||m(e,t)||d()}function v(e){if(Array.isArray(e))return f(e)}function y(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function b(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function h(e){return v(e)||y(e)||m(e)||b()}var S=c.memo((function(e){var t=!e.selection.length,n=l.classNames("p-picklist-buttons",e.className);return c.createElement("div",{className:n},c.createElement(i.Button,{disabled:t,type:"button",icon:"pi pi-angle-up",onClick:function(t){var n=e.selection;if(n&&n.length){for(var r=h(e.list),i=0;i<n.length;i++){var a=l.ObjectUtils.findIndexInList(n[i],r,e.dataKey);if(0===a)break;var o=r[a-1];r[a-1]=r[a],r[a]=o}e.onReorder&&e.onReorder({originalEvent:t,value:r,direction:"up"})}}}),c.createElement(i.Button,{disabled:t,type:"button",icon:"pi pi-angle-double-up",onClick:function(t){var n=e.selection;if(n&&n.length){for(var r=h(e.list),i=0;i<n.length;i++){var a=l.ObjectUtils.findIndexInList(n[i],r,e.dataKey);if(0===a)break;var o=r.splice(a,1)[0];r.unshift(o)}e.onReorder&&e.onReorder({originalEvent:t,value:r,direction:"top"})}}}),c.createElement(i.Button,{disabled:t,type:"button",icon:"pi pi-angle-down",onClick:function(t){var n=e.selection;if(n&&n.length){for(var r=h(e.list),i=n.length-1;i>=0;i--){var a=l.ObjectUtils.findIndexInList(n[i],r,e.dataKey);if(a===r.length-1)break;var o=r[a+1];r[a+1]=r[a],r[a]=o}e.onReorder&&e.onReorder({originalEvent:t,value:r,direction:"down"})}}}),c.createElement(i.Button,{disabled:t,type:"button",icon:"pi pi-angle-double-down",onClick:function(t){var n=e.selection;if(n&&n.length){for(var r=h(e.list),i=n.length-1;i>=0;i--){var a=l.ObjectUtils.findIndexInList(n[i],r,e.dataKey);if(a===r.length-1)break;var o=r.splice(a,1)[0];r.push(o)}e.onReorder&&e.onReorder({originalEvent:t,value:r,direction:"bottom"})}}}))}));S.displayName="PickListControls";var T=c.memo((function(e){var t=e.template?e.template(e.value):e.value,n=l.classNames("p-picklist-item",{"p-highlight":e.selected},e.className);return c.createElement("li",{className:n,onClick:function(t){e.onClick&&e.onClick({originalEvent:t,value:e.value})},onKeyDown:function(t){e.onKeyDown&&e.onKeyDown({originalEvent:t,value:e.value})},tabIndex:e.tabIndex,role:"option","aria-selected":e.selected},t,c.createElement(a.Ripple,null))}));T.displayName="PickListItem";var E=c.memo(c.forwardRef((function(e,t){var n=c.useRef(null),r=function(t){var n=t.originalEvent,r=t.value,i=h(e.selection),a=l.ObjectUtils.findIndexInList(r,i,e.dataKey),o=-1!==a;if(e.metaKeySelection){var c=n.metaKey||n.ctrlKey;o&&c?i.splice(a,1):(c||(i.length=0),i.push(r))}else o?i.splice(a,1):i.push(r);e.onSelectionChange&&e.onSelectionChange({event:n,value:i})},i=function(e){var t=e.originalEvent,n=t.currentTarget;switch(t.which){case 40:var l=a(n);l&&l.focus(),t.preventDefault();break;case 38:var i=o(n);i&&i.focus(),t.preventDefault();break;case 13:r(e),t.preventDefault()}},a=function e(t){var n=t.nextElementSibling;return n?l.DomHandler.hasClass(n,"p-picklist-item")?n:e(n):null},o=function e(t){var n=t.previousElementSibling;return n?l.DomHandler.hasClass(n,"p-picklist-item")?n:e(n):null},s=function(t){return-1!==l.ObjectUtils.findIndexInList(t,e.selection,e.dataKey)},u=function(t){e.onFilter&&e.onFilter({originalEvent:t,value:t.target.value,type:e.type})},p=function(e){13===e.which&&e.preventDefault()};c.useImperativeHandle(t,(function(){return{listElementRef:n}}));var f=l.classNames("p-picklist-list-wrapper",e.className),m=e.header?c.createElement("div",{className:"p-picklist-header"},l.ObjectUtils.getJSXElement(e.header,e)):null,d=function(){if(e.showFilter){var t=c.createElement("div",{className:"p-picklist-filter"},c.createElement("input",{type:"text",value:e.filterValue,onChange:u,onKeyDown:p,placeholder:e.placeholder,className:"p-picklist-filter-input p-inputtext p-component"}),c.createElement("span",{className:"p-picklist-filter-icon pi pi-search"}));if(e.filterTemplate)t=l.ObjectUtils.getJSXElement(e.filterTemplate,{className:"p-picklist-filter",inputProps:{className:"p-picklist-filter-input p-inputtext p-component",onChange:u,onKeyDown:p},iconClassName:"p-picklist-filter-icon pi pi-search",element:t,props:e});return c.createElement("div",{className:"p-picklist-filter-container"},t)}return null}(),g=function(){var t=e.list?e.list.map((function(t){var n=JSON.stringify(t),l=s(t);return c.createElement(T,{key:n,value:t,template:e.itemTemplate,selected:l,onClick:r,onKeyDown:i,tabIndex:e.tabIndex})})):null,n=l.classNames("p-picklist-list",e.listClassName);return c.createElement("ul",{className:n,style:e.style,role:"listbox","aria-multiselectable":!0},t)}();return c.createElement("div",{ref:n,className:f},m,d,g)})));E.displayName="PickListSubList";var k=c.memo((function(e){var t=l.ObjectUtils.isEmpty(e.sourceSelection)||l.ObjectUtils.isEmpty(e.visibleSourceList),n=l.ObjectUtils.isEmpty(e.targetSelection)||l.ObjectUtils.isEmpty(e.visibleTargetList),r=l.ObjectUtils.isEmpty(e.visibleSourceList),a=l.ObjectUtils.isEmpty(e.visibleTargetList),o=l.classNames("p-picklist-buttons p-picklist-transfer-buttons",e.className);return c.createElement("div",{className:o},c.createElement(i.Button,{disabled:t,type:"button",icon:"pi pi-angle-right",onClick:function(t){var n=e.sourceSelection;if(l.ObjectUtils.isNotEmpty(n)){for(var r=h(e.target),i=h(e.source),a=0;a<n.length;a++){var o=n[a];-1===l.ObjectUtils.findIndexInList(o,r,e.dataKey)&&r.push(i.splice(l.ObjectUtils.findIndexInList(o,i,e.dataKey),1)[0])}e.onTransfer&&e.onTransfer({originalEvent:t,source:i,target:r,direction:"toTarget"})}}}),c.createElement(i.Button,{disabled:r,type:"button",icon:"pi pi-angle-double-right",onClick:function(t){if(e.source){var n=[].concat(h(e.target),h(e.visibleSourceList)),r=e.source.filter((function(t){return!e.visibleSourceList.some((function(e){return e===t}))}));e.onTransfer&&e.onTransfer({originalEvent:t,source:r,target:n,direction:"allToTarget"})}}}),c.createElement(i.Button,{disabled:n,type:"button",icon:"pi pi-angle-left",onClick:function(t){var n=e.targetSelection;if(l.ObjectUtils.isNotEmpty(n)){for(var r=h(e.target),i=h(e.source),a=0;a<n.length;a++){var o=n[a];-1===l.ObjectUtils.findIndexInList(o,i,e.dataKey)&&i.push(r.splice(l.ObjectUtils.findIndexInList(o,r,e.dataKey),1)[0])}e.onTransfer&&e.onTransfer({originalEvent:t,source:i,target:r,direction:"toSource"})}}}),c.createElement(i.Button,{disabled:a,type:"button",icon:"pi pi-angle-double-left",onClick:function(t){if(e.source){var n=[].concat(h(e.source),h(e.visibleTargetList)),r=e.target.filter((function(t){return!e.visibleTargetList.some((function(e){return e===t}))}));e.onTransfer&&e.onTransfer({originalEvent:t,source:n,target:r,direction:"allToSource"})}}}))}));k.displayName="PickListTransferControls";var C=c.memo(c.forwardRef((function(e,t){var i=g(c.useState([]),2),a=i[0],o=i[1],u=g(c.useState([]),2),p=u[0],f=u[1],m=g(c.useState(""),2),d=m[0],v=m[1],y=g(c.useState(""),2),b=y[0],h=y[1],T=c.useRef(null),N=c.useRef(null),I=c.useRef(null),w=c.useRef(null),O=e.onSourceSelectionChange?e.sourceSelection:a,j=e.onTargetSelectionChange?e.targetSelection:p,K=e.onSourceFilterChange?e.sourceFilterValue:d,L=e.onTargetFilterChange?e.targetFilterValue:b,F=l.ObjectUtils.isNotEmpty(e.filterBy),U=F&&e.showSourceFilter,x=F&&e.showTargetFilter,R=function(e,t){if(e){var n=l.DomHandler.findSingle(e,".p-picklist-list");switch(t){case"up":P(n,-1);break;case"top":n.scrollTop=0;break;case"down":P(n,1);break;case"bottom":setTimeout((function(){return n.scrollTop=n.scrollHeight}),100)}}},M=function(t,n,r){e.onChange&&e.onChange({originalEvent:t.originalEvent,source:n,target:r})},P=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e.getElementsByClassName("p-highlight");l.ObjectUtils.isNotEmpty(n)&&l.DomHandler.scrollInView(e,-1===t?n[0]:n[n.length-1])},D=function(e,t,n){n?n(e):"sourceSelection"===t?o(e.value):f(e.value),l.ObjectUtils.isNotEmpty(O)&&"targetSelection"===t?o([]):l.ObjectUtils.isNotEmpty(j)&&"sourceSelection"===t&&f([])},A=function(t){var n=t.originalEvent,r=t.value,l=g("source"===t.type?[v,e.onSourceFilterChange]:[h,e.onTargetFilterChange],2),i=l[0],a=l[1];a?a({originalEvent:n,value:r}):i(r)},B=function(e,t){var n=g("source"===t?[K,H]:[L,V],2),r=n[0],i=n[1];return F&&l.ObjectUtils.isNotEmpty(r)?i(r):e},H=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=t.trim().toLocaleLowerCase(e.filterLocale);return _(e.source,n)},V=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=t.trim().toLocaleLowerCase(e.filterLocale);return _(e.target,n)},_=function(t,r){var l=F?e.filterBy.split(","):[];return n.FilterService.filter(t,l,r,e.filterMatchMode,e.filterLocale)};r.useUpdateEffect((function(){I.current&&(R(I.current,w.current),I.current=null,w.current=null)}));var J=l.ObjectUtils.findDiffKeys(e,C.defaultProps),X=l.classNames("p-picklist p-component",e.className),z=e.sourceItemTemplate?e.sourceItemTemplate:e.itemTemplate,Y=e.targetItemTemplate?e.targetItemTemplate:e.itemTemplate,$=B(e.source,"source"),q=B(e.target,"target");return c.createElement("div",s({id:e.id,className:X,style:e.style},J),e.showSourceControls&&c.createElement(S,{list:e.source,selection:O,onReorder:function(t){M(t,t.value,e.target),I.current=T.current.listElementRef.current,w.current=t.direction},className:"p-picklist-source-controls",dataKey:e.dataKey}),c.createElement(E,{ref:T,type:"source",list:$,selection:O,onSelectionChange:function(t){return D(t,"sourceSelection",e.onSourceSelectionChange)},itemTemplate:z,header:e.sourceHeader,style:e.sourceStyle,className:"p-picklist-source-wrapper",listClassName:"p-picklist-source",metaKeySelection:e.metaKeySelection,tabIndex:e.tabIndex,dataKey:e.dataKey,filterValue:K,onFilter:A,showFilter:U,placeholder:e.sourceFilterPlaceholder,template:e.sourceFilterTemplate}),c.createElement(k,{onTransfer:function(t){var n=t.originalEvent,r=t.source,l=t.target;switch(t.direction){case"toTarget":e.onMoveToTarget&&e.onMoveToTarget({originalEvent:n,value:O});break;case"allToTarget":e.onMoveAllToTarget&&e.onMoveAllToTarget({originalEvent:n,value:e.source});break;case"toSource":e.onMoveToSource&&e.onMoveToSource({originalEvent:n,value:j});break;case"allToSource":e.onMoveAllToSource&&e.onMoveAllToSource({originalEvent:n,value:e.target})}D({originalEvent:n,value:[]},"sourceSelection",e.onSourceSelectionChange),D({originalEvent:n,value:[]},"targetSelection",e.onTargetSelectionChange),M(t,r,l)},source:e.source,visibleSourceList:$,target:e.target,visibleTargetList:q,sourceSelection:O,targetSelection:j,dataKey:e.dataKey}),c.createElement(E,{ref:N,type:"target",list:q,selection:j,onSelectionChange:function(t){return D(t,"targetSelection",e.onTargetSelectionChange)},itemTemplate:Y,header:e.targetHeader,style:e.targetStyle,className:"p-picklist-target-wrapper",listClassName:"p-picklist-target",metaKeySelection:e.metaKeySelection,tabIndex:e.tabIndex,dataKey:e.dataKey,filterValue:L,onFilter:A,showFilter:x,placeholder:e.targetFilterPlaceholder,template:e.targetFilterTemplate}),e.showTargetControls&&c.createElement(S,{list:e.target,selection:j,onReorder:function(t){M(t,e.source,t.value),I.current=N.current.listElementRef.current,w.current=t.direction},className:"p-picklist-target-controls",dataKey:e.dataKey}))})));return C.displayName="PickList",C.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:!0,filterBy:null,filterMatchMode:"contains",filterLocale:void 0,sourceFilterValue:null,targetFilterValue:null,showSourceFilter:!0,showTargetFilter:!0,sourceFilterPlaceholder:null,targetFilterPlaceholder:null,sourceFilterTemplate:null,targetFilterTemplate:null,tabIndex:0,dataKey:null,itemTemplate:null,sourceItemTemplate:null,targetItemTemplate:null,onChange:null,onMoveToSource:null,onMoveAllToSource:null,onMoveToTarget:null,onMoveAllToTarget:null,onSourceSelectionChange:null,onTargetSelectionChange:null,onSourceFilterChange:null,onTargetFilterChange:null},e.PickList=C,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.api,primereact.hooks,primereact.utils,primereact.button,primereact.ripple);
|