primereact 9.2.2 → 9.3.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/accordion/accordion.cjs.js +13 -5
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +0 -2
- package/accordion/accordion.esm.js +13 -5
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +13 -7
- package/accordion/accordion.min.js +1 -1
- package/api/api.d.ts +1 -0
- package/autocomplete/autocomplete.cjs.js +75 -59
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +6 -4
- package/autocomplete/autocomplete.esm.js +75 -59
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +74 -61
- package/autocomplete/autocomplete.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +11 -2
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.d.ts +5 -0
- package/breadcrumb/breadcrumb.esm.js +11 -2
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +12 -4
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +6 -2
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +6 -2
- package/button/button.esm.min.js +1 -1
- package/button/button.js +7 -4
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +47 -38
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +16 -1
- package/calendar/calendar.esm.js +48 -39
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +44 -40
- package/calendar/calendar.min.js +1 -1
- package/carousel/carousel.cjs.js +28 -12
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.d.ts +9 -0
- package/carousel/carousel.esm.js +29 -13
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +26 -14
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +23 -7
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +7 -3
- package/cascadeselect/cascadeselect.esm.js +24 -8
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +23 -9
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/checkbox/checkbox.cjs.js +10 -5
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +1 -2
- package/checkbox/checkbox.esm.js +10 -5
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +11 -7
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +54 -8
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +1 -7
- package/chip/chip.esm.js +54 -8
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +55 -10
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +56 -6
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +5 -0
- package/chips/chips.esm.js +57 -7
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +57 -8
- package/chips/chips.min.js +1 -1
- package/column/column.d.ts +2 -2
- package/contextmenu/contextmenu.cjs.js +16 -23
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +5 -0
- package/contextmenu/contextmenu.esm.js +16 -23
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +17 -25
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +3581 -120
- package/core/core.min.js +101 -9
- package/datatable/datatable.cjs.js +186 -85
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +32 -6
- package/datatable/datatable.esm.js +187 -86
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +172 -87
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +25 -11
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.d.ts +10 -1
- package/dataview/dataview.esm.js +26 -12
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +24 -13
- package/dataview/dataview.min.js +1 -1
- package/dialog/dialog.cjs.js +74 -10
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +13 -0
- package/dialog/dialog.esm.js +75 -11
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +73 -12
- package/dialog/dialog.min.js +1 -1
- package/dropdown/dropdown.cjs.js +37 -12
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +12 -4
- package/dropdown/dropdown.esm.js +38 -13
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +36 -14
- package/dropdown/dropdown.min.js +1 -1
- package/fieldset/fieldset.cjs.js +14 -5
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.d.ts +9 -0
- package/fieldset/fieldset.esm.js +15 -6
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +14 -7
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +54 -18
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +4 -0
- package/fileupload/fileupload.esm.js +49 -13
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +53 -20
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/galleria.cjs.js +113 -27
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.d.ts +21 -0
- package/galleria/galleria.esm.js +114 -28
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +110 -29
- package/galleria/galleria.min.js +1 -1
- package/iconbase/iconbase.cjs.js +35 -0
- package/iconbase/iconbase.cjs.min.js +1 -0
- package/iconbase/iconbase.d.ts +9 -0
- package/iconbase/iconbase.esm.js +31 -0
- package/iconbase/iconbase.esm.min.js +1 -0
- package/iconbase/iconbase.js +39 -0
- package/iconbase/iconbase.min.css +1 -0
- package/iconbase/iconbase.min.js +1 -0
- package/iconbase/package.json +7 -0
- package/icons/angledoubledown/index.cjs.js +61 -0
- package/icons/angledoubledown/index.cjs.min.js +1 -0
- package/icons/angledoubledown/index.d.ts +19 -0
- package/icons/angledoubledown/index.esm.js +37 -0
- package/icons/angledoubledown/index.esm.min.js +1 -0
- package/icons/angledoubledown/index.js +65 -0
- package/icons/angledoubledown/index.min.js +1 -0
- package/icons/angledoubledown/package.json +7 -0
- package/icons/angledoubleleft/index.cjs.js +61 -0
- package/icons/angledoubleleft/index.cjs.min.js +1 -0
- package/icons/angledoubleleft/index.d.ts +19 -0
- package/icons/angledoubleleft/index.esm.js +37 -0
- package/icons/angledoubleleft/index.esm.min.js +1 -0
- package/icons/angledoubleleft/index.js +65 -0
- package/icons/angledoubleleft/index.min.js +1 -0
- package/icons/angledoubleleft/package.json +7 -0
- package/icons/angledoubleright/index.cjs.js +61 -0
- package/icons/angledoubleright/index.cjs.min.js +1 -0
- package/icons/angledoubleright/index.d.ts +19 -0
- package/icons/angledoubleright/index.esm.js +37 -0
- package/icons/angledoubleright/index.esm.min.js +1 -0
- package/icons/angledoubleright/index.js +65 -0
- package/icons/angledoubleright/index.min.js +1 -0
- package/icons/angledoubleright/package.json +7 -0
- package/icons/angledoubleup/index.cjs.js +61 -0
- package/icons/angledoubleup/index.cjs.min.js +1 -0
- package/icons/angledoubleup/index.d.ts +19 -0
- package/icons/angledoubleup/index.esm.js +37 -0
- package/icons/angledoubleup/index.esm.min.js +1 -0
- package/icons/angledoubleup/index.js +65 -0
- package/icons/angledoubleup/index.min.js +1 -0
- package/icons/angledoubleup/package.json +7 -0
- package/icons/angledown/index.cjs.js +59 -0
- package/icons/angledown/index.cjs.min.js +1 -0
- package/icons/angledown/index.d.ts +19 -0
- package/icons/angledown/index.esm.js +35 -0
- package/icons/angledown/index.esm.min.js +1 -0
- package/icons/angledown/index.js +63 -0
- package/icons/angledown/index.min.js +1 -0
- package/icons/angledown/package.json +7 -0
- package/icons/angleleft/index.cjs.js +59 -0
- package/icons/angleleft/index.cjs.min.js +1 -0
- package/icons/angleleft/index.d.ts +19 -0
- package/icons/angleleft/index.esm.js +35 -0
- package/icons/angleleft/index.esm.min.js +1 -0
- package/icons/angleleft/index.js +63 -0
- package/icons/angleleft/index.min.js +1 -0
- package/icons/angleleft/package.json +7 -0
- package/icons/angleright/index.cjs.js +59 -0
- package/icons/angleright/index.cjs.min.js +1 -0
- package/icons/angleright/index.d.ts +19 -0
- package/icons/angleright/index.esm.js +35 -0
- package/icons/angleright/index.esm.min.js +1 -0
- package/icons/angleright/index.js +63 -0
- package/icons/angleright/index.min.js +1 -0
- package/icons/angleright/package.json +7 -0
- package/icons/angleup/index.cjs.js +59 -0
- package/icons/angleup/index.cjs.min.js +1 -0
- package/icons/angleup/index.d.ts +19 -0
- package/icons/angleup/index.esm.js +35 -0
- package/icons/angleup/index.esm.min.js +1 -0
- package/icons/angleup/index.js +63 -0
- package/icons/angleup/index.min.js +1 -0
- package/icons/angleup/package.json +7 -0
- package/icons/arrowdown/index.cjs.js +69 -0
- package/icons/arrowdown/index.cjs.min.js +1 -0
- package/icons/arrowdown/index.d.ts +19 -0
- package/icons/arrowdown/index.esm.js +45 -0
- package/icons/arrowdown/index.esm.min.js +1 -0
- package/icons/arrowdown/index.js +73 -0
- package/icons/arrowdown/index.min.js +1 -0
- package/icons/arrowdown/package.json +7 -0
- package/icons/arrowup/index.cjs.js +69 -0
- package/icons/arrowup/index.cjs.min.js +1 -0
- package/icons/arrowup/index.d.ts +19 -0
- package/icons/arrowup/index.esm.js +45 -0
- package/icons/arrowup/index.esm.min.js +1 -0
- package/icons/arrowup/index.js +73 -0
- package/icons/arrowup/index.min.js +1 -0
- package/icons/arrowup/package.json +7 -0
- package/icons/ban/index.cjs.js +67 -0
- package/icons/ban/index.cjs.min.js +1 -0
- package/icons/ban/index.d.ts +19 -0
- package/icons/ban/index.esm.js +43 -0
- package/icons/ban/index.esm.min.js +1 -0
- package/icons/ban/index.js +71 -0
- package/icons/ban/index.min.js +1 -0
- package/icons/ban/package.json +7 -0
- package/icons/bars/index.cjs.js +61 -0
- package/icons/bars/index.cjs.min.js +1 -0
- package/icons/bars/index.d.ts +19 -0
- package/icons/bars/index.esm.js +37 -0
- package/icons/bars/index.esm.min.js +1 -0
- package/icons/bars/index.js +65 -0
- package/icons/bars/index.min.js +1 -0
- package/icons/bars/package.json +7 -0
- package/icons/calendar/index.cjs.js +59 -0
- package/icons/calendar/index.cjs.min.js +1 -0
- package/icons/calendar/index.d.ts +19 -0
- package/icons/calendar/index.esm.js +35 -0
- package/icons/calendar/index.esm.min.js +1 -0
- package/icons/calendar/index.js +63 -0
- package/icons/calendar/index.min.js +1 -0
- package/icons/calendar/package.json +7 -0
- package/icons/check/index.cjs.js +59 -0
- package/icons/check/index.cjs.min.js +1 -0
- package/icons/check/index.d.ts +19 -0
- package/icons/check/index.esm.js +35 -0
- package/icons/check/index.esm.min.js +1 -0
- package/icons/check/index.js +63 -0
- package/icons/check/index.min.js +1 -0
- package/icons/check/package.json +7 -0
- package/icons/chevrondown/index.cjs.js +59 -0
- package/icons/chevrondown/index.cjs.min.js +1 -0
- package/icons/chevrondown/index.d.ts +19 -0
- package/icons/chevrondown/index.esm.js +35 -0
- package/icons/chevrondown/index.esm.min.js +1 -0
- package/icons/chevrondown/index.js +63 -0
- package/icons/chevrondown/index.min.js +1 -0
- package/icons/chevrondown/package.json +7 -0
- package/icons/chevronleft/index.cjs.js +59 -0
- package/icons/chevronleft/index.cjs.min.js +1 -0
- package/icons/chevronleft/index.d.ts +19 -0
- package/icons/chevronleft/index.esm.js +35 -0
- package/icons/chevronleft/index.esm.min.js +1 -0
- package/icons/chevronleft/index.js +63 -0
- package/icons/chevronleft/index.min.js +1 -0
- package/icons/chevronleft/package.json +7 -0
- package/icons/chevronright/index.cjs.js +59 -0
- package/icons/chevronright/index.cjs.min.js +1 -0
- package/icons/chevronright/index.d.ts +19 -0
- package/icons/chevronright/index.esm.js +35 -0
- package/icons/chevronright/index.esm.min.js +1 -0
- package/icons/chevronright/index.js +63 -0
- package/icons/chevronright/index.min.js +1 -0
- package/icons/chevronright/package.json +7 -0
- package/icons/chevronup/index.cjs.js +59 -0
- package/icons/chevronup/index.cjs.min.js +1 -0
- package/icons/chevronup/index.d.ts +19 -0
- package/icons/chevronup/index.esm.js +35 -0
- package/icons/chevronup/index.esm.min.js +1 -0
- package/icons/chevronup/index.js +63 -0
- package/icons/chevronup/index.min.js +1 -0
- package/icons/chevronup/package.json +7 -0
- package/icons/download/index.cjs.js +69 -0
- package/icons/download/index.cjs.min.js +1 -0
- package/icons/download/index.d.ts +19 -0
- package/icons/download/index.esm.js +45 -0
- package/icons/download/index.esm.min.js +1 -0
- package/icons/download/index.js +73 -0
- package/icons/download/index.min.js +1 -0
- package/icons/download/package.json +7 -0
- package/icons/exclamationtriangle/index.cjs.js +73 -0
- package/icons/exclamationtriangle/index.cjs.min.js +1 -0
- package/icons/exclamationtriangle/index.d.ts +19 -0
- package/icons/exclamationtriangle/index.esm.js +49 -0
- package/icons/exclamationtriangle/index.esm.min.js +1 -0
- package/icons/exclamationtriangle/index.js +77 -0
- package/icons/exclamationtriangle/index.min.js +1 -0
- package/icons/exclamationtriangle/package.json +7 -0
- package/icons/eye/index.cjs.js +61 -0
- package/icons/eye/index.cjs.min.js +1 -0
- package/icons/eye/index.d.ts +19 -0
- package/icons/eye/index.esm.js +37 -0
- package/icons/eye/index.esm.min.js +1 -0
- package/icons/eye/index.js +65 -0
- package/icons/eye/index.min.js +1 -0
- package/icons/eye/package.json +7 -0
- package/icons/eyeslash/index.cjs.js +69 -0
- package/icons/eyeslash/index.cjs.min.js +1 -0
- package/icons/eyeslash/index.d.ts +19 -0
- package/icons/eyeslash/index.esm.js +45 -0
- package/icons/eyeslash/index.esm.min.js +1 -0
- package/icons/eyeslash/index.js +73 -0
- package/icons/eyeslash/index.min.js +1 -0
- package/icons/eyeslash/package.json +7 -0
- package/icons/filter/index.cjs.js +67 -0
- package/icons/filter/index.cjs.min.js +1 -0
- package/icons/filter/index.d.ts +19 -0
- package/icons/filter/index.esm.js +43 -0
- package/icons/filter/index.esm.min.js +1 -0
- package/icons/filter/index.js +71 -0
- package/icons/filter/index.min.js +1 -0
- package/icons/filter/package.json +7 -0
- package/icons/filterslash/index.cjs.js +69 -0
- package/icons/filterslash/index.cjs.min.js +1 -0
- package/icons/filterslash/index.d.ts +19 -0
- package/icons/filterslash/index.esm.js +45 -0
- package/icons/filterslash/index.esm.min.js +1 -0
- package/icons/filterslash/index.js +73 -0
- package/icons/filterslash/index.min.js +1 -0
- package/icons/filterslash/package.json +7 -0
- package/icons/infocircle/index.cjs.js +69 -0
- package/icons/infocircle/index.cjs.min.js +1 -0
- package/icons/infocircle/index.d.ts +19 -0
- package/icons/infocircle/index.esm.js +45 -0
- package/icons/infocircle/index.esm.min.js +1 -0
- package/icons/infocircle/index.js +73 -0
- package/icons/infocircle/index.min.js +1 -0
- package/icons/infocircle/package.json +7 -0
- package/icons/minus/index.cjs.js +59 -0
- package/icons/minus/index.cjs.min.js +1 -0
- package/icons/minus/index.d.ts +19 -0
- package/icons/minus/index.esm.js +35 -0
- package/icons/minus/index.esm.min.js +1 -0
- package/icons/minus/index.js +63 -0
- package/icons/minus/index.min.js +1 -0
- package/icons/minus/package.json +7 -0
- package/icons/pencil/index.cjs.js +67 -0
- package/icons/pencil/index.cjs.min.js +1 -0
- package/icons/pencil/index.d.ts +19 -0
- package/icons/pencil/index.esm.js +43 -0
- package/icons/pencil/index.esm.min.js +1 -0
- package/icons/pencil/index.js +71 -0
- package/icons/pencil/index.min.js +1 -0
- package/icons/pencil/package.json +7 -0
- package/icons/plus/index.cjs.js +67 -0
- package/icons/plus/index.cjs.min.js +1 -0
- package/icons/plus/index.d.ts +19 -0
- package/icons/plus/index.esm.js +43 -0
- package/icons/plus/index.esm.min.js +1 -0
- package/icons/plus/index.js +71 -0
- package/icons/plus/index.min.js +1 -0
- package/icons/plus/package.json +7 -0
- package/icons/refresh/index.cjs.js +69 -0
- package/icons/refresh/index.cjs.min.js +1 -0
- package/icons/refresh/index.d.ts +19 -0
- package/icons/refresh/index.esm.js +45 -0
- package/icons/refresh/index.esm.min.js +1 -0
- package/icons/refresh/index.js +73 -0
- package/icons/refresh/index.min.js +1 -0
- package/icons/refresh/package.json +7 -0
- package/icons/search/index.cjs.js +69 -0
- package/icons/search/index.cjs.min.js +1 -0
- package/icons/search/index.d.ts +19 -0
- package/icons/search/index.esm.js +45 -0
- package/icons/search/index.esm.min.js +1 -0
- package/icons/search/index.js +73 -0
- package/icons/search/index.min.js +1 -0
- package/icons/search/package.json +7 -0
- package/icons/searchminus/index.cjs.js +69 -0
- package/icons/searchminus/index.cjs.min.js +1 -0
- package/icons/searchminus/index.d.ts +19 -0
- package/icons/searchminus/index.esm.js +45 -0
- package/icons/searchminus/index.esm.min.js +1 -0
- package/icons/searchminus/index.js +73 -0
- package/icons/searchminus/index.min.js +1 -0
- package/icons/searchminus/package.json +7 -0
- package/icons/searchplus/index.cjs.js +69 -0
- package/icons/searchplus/index.cjs.min.js +1 -0
- package/icons/searchplus/index.d.ts +19 -0
- package/icons/searchplus/index.esm.js +45 -0
- package/icons/searchplus/index.esm.min.js +1 -0
- package/icons/searchplus/index.js +73 -0
- package/icons/searchplus/index.min.js +1 -0
- package/icons/searchplus/package.json +7 -0
- package/icons/sortalt/index.cjs.js +76 -0
- package/icons/sortalt/index.cjs.min.js +1 -0
- package/icons/sortalt/index.d.ts +19 -0
- package/icons/sortalt/index.esm.js +52 -0
- package/icons/sortalt/index.esm.min.js +1 -0
- package/icons/sortalt/index.js +80 -0
- package/icons/sortalt/index.min.js +1 -0
- package/icons/sortalt/package.json +7 -0
- package/icons/sortamountdown/index.cjs.js +82 -0
- package/icons/sortamountdown/index.cjs.min.js +1 -0
- package/icons/sortamountdown/index.d.ts +19 -0
- package/icons/sortamountdown/index.esm.js +58 -0
- package/icons/sortamountdown/index.esm.min.js +1 -0
- package/icons/sortamountdown/index.js +86 -0
- package/icons/sortamountdown/index.min.js +1 -0
- package/icons/sortamountdown/package.json +7 -0
- package/icons/sortamountupalt/index.cjs.js +82 -0
- package/icons/sortamountupalt/index.cjs.min.js +1 -0
- package/icons/sortamountupalt/index.d.ts +19 -0
- package/icons/sortamountupalt/index.esm.js +58 -0
- package/icons/sortamountupalt/index.esm.min.js +1 -0
- package/icons/sortamountupalt/index.js +86 -0
- package/icons/sortamountupalt/index.min.js +1 -0
- package/icons/sortamountupalt/package.json +7 -0
- package/icons/spinner/index.cjs.js +67 -0
- package/icons/spinner/index.cjs.min.js +1 -0
- package/icons/spinner/index.d.ts +19 -0
- package/icons/spinner/index.esm.js +43 -0
- package/icons/spinner/index.esm.min.js +1 -0
- package/icons/spinner/index.js +71 -0
- package/icons/spinner/index.min.js +1 -0
- package/icons/spinner/package.json +7 -0
- package/icons/star/index.cjs.js +67 -0
- package/icons/star/index.cjs.min.js +1 -0
- package/icons/star/index.d.ts +19 -0
- package/icons/star/index.esm.js +43 -0
- package/icons/star/index.esm.min.js +1 -0
- package/icons/star/index.js +71 -0
- package/icons/star/index.min.js +1 -0
- package/icons/star/package.json +7 -0
- package/icons/starfill/index.cjs.js +67 -0
- package/icons/starfill/index.cjs.min.js +1 -0
- package/icons/starfill/index.d.ts +19 -0
- package/icons/starfill/index.esm.js +43 -0
- package/icons/starfill/index.esm.min.js +1 -0
- package/icons/starfill/index.js +71 -0
- package/icons/starfill/index.min.js +1 -0
- package/icons/starfill/package.json +7 -0
- package/icons/thlarge/index.cjs.js +69 -0
- package/icons/thlarge/index.cjs.min.js +1 -0
- package/icons/thlarge/index.d.ts +19 -0
- package/icons/thlarge/index.esm.js +45 -0
- package/icons/thlarge/index.esm.min.js +1 -0
- package/icons/thlarge/index.js +73 -0
- package/icons/thlarge/index.min.js +1 -0
- package/icons/thlarge/package.json +7 -0
- package/icons/times/index.cjs.js +59 -0
- package/icons/times/index.cjs.min.js +1 -0
- package/icons/times/index.d.ts +19 -0
- package/icons/times/index.esm.js +35 -0
- package/icons/times/index.esm.min.js +1 -0
- package/icons/times/index.js +63 -0
- package/icons/times/index.min.js +1 -0
- package/icons/times/package.json +7 -0
- package/icons/timescircle/index.cjs.js +69 -0
- package/icons/timescircle/index.cjs.min.js +1 -0
- package/icons/timescircle/index.d.ts +19 -0
- package/icons/timescircle/index.esm.js +45 -0
- package/icons/timescircle/index.esm.min.js +1 -0
- package/icons/timescircle/index.js +73 -0
- package/icons/timescircle/index.min.js +1 -0
- package/icons/timescircle/package.json +7 -0
- package/icons/trash/index.cjs.js +69 -0
- package/icons/trash/index.cjs.min.js +1 -0
- package/icons/trash/index.d.ts +19 -0
- package/icons/trash/index.esm.js +45 -0
- package/icons/trash/index.esm.min.js +1 -0
- package/icons/trash/index.js +73 -0
- package/icons/trash/index.min.js +1 -0
- package/icons/trash/package.json +7 -0
- package/icons/undo/index.cjs.js +69 -0
- package/icons/undo/index.cjs.min.js +1 -0
- package/icons/undo/index.d.ts +19 -0
- package/icons/undo/index.esm.js +45 -0
- package/icons/undo/index.esm.min.js +1 -0
- package/icons/undo/index.js +73 -0
- package/icons/undo/index.min.js +1 -0
- package/icons/undo/package.json +7 -0
- package/icons/upload/index.cjs.js +69 -0
- package/icons/upload/index.cjs.min.js +1 -0
- package/icons/upload/index.d.ts +19 -0
- package/icons/upload/index.esm.js +45 -0
- package/icons/upload/index.esm.min.js +1 -0
- package/icons/upload/index.js +73 -0
- package/icons/upload/index.min.js +1 -0
- package/icons/upload/package.json +7 -0
- package/icons/windowmaximize/index.cjs.js +69 -0
- package/icons/windowmaximize/index.cjs.min.js +1 -0
- package/icons/windowmaximize/index.d.ts +19 -0
- package/icons/windowmaximize/index.esm.js +45 -0
- package/icons/windowmaximize/index.esm.min.js +1 -0
- package/icons/windowmaximize/index.js +73 -0
- package/icons/windowmaximize/index.min.js +1 -0
- package/icons/windowmaximize/package.json +7 -0
- package/icons/windowminimize/index.cjs.js +69 -0
- package/icons/windowminimize/index.cjs.min.js +1 -0
- package/icons/windowminimize/index.d.ts +19 -0
- package/icons/windowminimize/index.esm.js +45 -0
- package/icons/windowminimize/index.esm.min.js +1 -0
- package/icons/windowminimize/index.js +73 -0
- package/icons/windowminimize/index.min.js +1 -0
- package/icons/windowminimize/package.json +7 -0
- package/image/image.cjs.js +73 -21
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +30 -0
- package/image/image.esm.js +74 -22
- package/image/image.esm.min.js +1 -1
- package/image/image.js +68 -23
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +9 -2
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.d.ts +5 -0
- package/inplace/inplace.esm.js +10 -3
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +10 -4
- package/inplace/inplace.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +24 -10
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +0 -2
- package/inputnumber/inputnumber.esm.js +25 -11
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +24 -12
- package/inputnumber/inputnumber.min.js +1 -1
- package/listbox/listbox.cjs.js +14 -4
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.d.ts +5 -0
- package/listbox/listbox.esm.js +15 -5
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +15 -6
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +22 -10
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.d.ts +9 -0
- package/megamenu/megamenu.esm.js +22 -10
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +21 -12
- package/megamenu/megamenu.min.js +1 -1
- package/menubar/menubar.cjs.js +67 -10
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.d.ts +9 -0
- package/menubar/menubar.esm.js +67 -10
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +66 -12
- package/menubar/menubar.min.js +1 -1
- package/menuitem/menuitem.d.ts +2 -0
- package/message/message.cjs.js +32 -11
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +32 -11
- package/message/message.esm.min.js +1 -1
- package/message/message.js +30 -13
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +86 -15
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +5 -1
- package/messages/messages.esm.js +86 -15
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +83 -17
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +100 -36
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +16 -2
- package/multiselect/multiselect.esm.js +100 -36
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +97 -38
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/orderlist.cjs.js +37 -9
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.d.ts +23 -2
- package/orderlist/orderlist.esm.js +38 -10
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +34 -11
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +23 -8
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.d.ts +5 -0
- package/organizationchart/organizationchart.esm.js +24 -9
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +23 -10
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +55 -5
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +5 -0
- package/overlaypanel/overlaypanel.esm.js +56 -6
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +56 -7
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +2 -3
- package/paginator/paginator.cjs.js +57 -20
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.d.ts +17 -0
- package/paginator/paginator.esm.js +58 -21
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +55 -22
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +10 -8
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.d.ts +0 -2
- package/panel/panel.esm.js +10 -8
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +10 -10
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +17 -14
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +5 -0
- package/panelmenu/panelmenu.esm.js +17 -14
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +17 -16
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/password.cjs.js +22 -5
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +9 -0
- package/password/password.esm.js +23 -6
- package/password/password.esm.min.js +1 -1
- package/password/password.js +22 -7
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +96 -18
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.d.ts +41 -0
- package/picklist/picklist.esm.js +98 -20
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +89 -20
- package/picklist/picklist.min.js +1 -1
- package/primereact.all.cjs.js +2713 -765
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +2668 -766
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +2713 -765
- package/primereact.all.min.js +1 -1
- package/rating/rating.cjs.js +22 -10
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.d.ts +5 -8
- package/rating/rating.esm.js +22 -10
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +21 -12
- package/rating/rating.min.js +1 -1
- package/resources/primereact.css +505 -474
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +123 -17
- package/resources/themes/arya-green/theme.css +123 -17
- package/resources/themes/arya-orange/theme.css +123 -17
- package/resources/themes/arya-purple/theme.css +123 -17
- package/resources/themes/bootstrap4-dark-blue/theme.css +123 -17
- package/resources/themes/bootstrap4-dark-purple/theme.css +123 -17
- package/resources/themes/bootstrap4-light-blue/theme.css +123 -17
- package/resources/themes/bootstrap4-light-purple/theme.css +123 -17
- package/resources/themes/fluent-light/theme.css +123 -17
- package/resources/themes/lara-dark-blue/theme.css +123 -17
- package/resources/themes/lara-dark-indigo/theme.css +123 -17
- package/resources/themes/lara-dark-purple/theme.css +123 -17
- package/resources/themes/lara-dark-teal/theme.css +123 -17
- package/resources/themes/lara-light-blue/theme.css +130 -24
- package/resources/themes/lara-light-indigo/theme.css +130 -24
- package/resources/themes/lara-light-purple/theme.css +130 -24
- package/resources/themes/lara-light-teal/theme.css +130 -24
- package/resources/themes/luna-amber/theme.css +137 -31
- package/resources/themes/luna-blue/theme.css +137 -31
- package/resources/themes/luna-green/theme.css +137 -31
- package/resources/themes/luna-pink/theme.css +137 -31
- package/resources/themes/md-dark-deeppurple/theme.css +247 -144
- package/resources/themes/md-dark-indigo/theme.css +247 -144
- package/resources/themes/md-light-deeppurple/theme.css +127 -24
- package/resources/themes/md-light-indigo/theme.css +127 -24
- package/resources/themes/mdc-dark-deeppurple/theme.css +247 -144
- package/resources/themes/mdc-dark-indigo/theme.css +247 -144
- package/resources/themes/mdc-light-deeppurple/theme.css +127 -24
- package/resources/themes/mdc-light-indigo/theme.css +127 -24
- package/resources/themes/mira/theme.css +127 -25
- package/resources/themes/nano/theme.css +123 -17
- package/resources/themes/nova/theme.css +123 -17
- package/resources/themes/nova-accent/theme.css +123 -17
- package/resources/themes/nova-alt/theme.css +123 -17
- package/resources/themes/rhea/theme.css +123 -17
- package/resources/themes/saga-blue/theme.css +123 -17
- package/resources/themes/saga-green/theme.css +123 -17
- package/resources/themes/saga-orange/theme.css +123 -17
- package/resources/themes/saga-purple/theme.css +123 -17
- package/resources/themes/soho-dark/theme.css +165 -62
- package/resources/themes/soho-light/theme.css +126 -23
- package/resources/themes/tailwind-light/theme.css +153 -52
- package/resources/themes/vela-blue/theme.css +123 -17
- package/resources/themes/vela-green/theme.css +123 -17
- package/resources/themes/vela-orange/theme.css +123 -17
- package/resources/themes/vela-purple/theme.css +123 -17
- package/resources/themes/viva-dark/theme.css +127 -25
- package/resources/themes/viva-light/theme.css +127 -25
- package/scrolltop/scrolltop.cjs.js +12 -6
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.d.ts +1 -2
- package/scrolltop/scrolltop.esm.js +12 -6
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +13 -8
- package/scrolltop/scrolltop.min.js +1 -1
- package/sidebar/sidebar.cjs.js +13 -5
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +5 -0
- package/sidebar/sidebar.esm.js +14 -6
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +14 -7
- package/sidebar/sidebar.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +26 -9
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +9 -0
- package/slidemenu/slidemenu.esm.js +26 -9
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +26 -11
- package/slidemenu/slidemenu.min.js +1 -1
- package/speeddial/speeddial.cjs.js +16 -15
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.d.ts +2 -3
- package/speeddial/speeddial.esm.js +16 -15
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +16 -17
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +16 -3
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +1 -2
- package/splitbutton/splitbutton.esm.js +16 -3
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +17 -5
- package/splitbutton/splitbutton.min.js +1 -1
- package/tabview/tabview.cjs.js +34 -16
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +15 -2
- package/tabview/tabview.esm.js +35 -17
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +33 -18
- package/tabview/tabview.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +12 -4
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +5 -0
- package/tieredmenu/tieredmenu.esm.js +12 -4
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +13 -6
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/toast/toast.cjs.js +53 -15
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +9 -0
- package/toast/toast.esm.js +54 -16
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +50 -17
- package/toast/toast.min.js +1 -1
- package/tree/tree.cjs.js +56 -24
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +18 -2
- package/tree/tree.esm.js +57 -25
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +52 -26
- package/tree/tree.min.js +1 -1
- package/treeselect/treeselect.cjs.js +37 -14
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +11 -3
- package/treeselect/treeselect.esm.js +38 -15
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +36 -16
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +90 -39
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +18 -2
- package/treetable/treetable.esm.js +91 -40
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +82 -41
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +20 -6
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.d.ts +9 -0
- package/tristatecheckbox/tristatecheckbox.esm.js +21 -7
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +20 -8
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +14 -4
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.d.ts +6 -0
- package/virtualscroller/virtualscroller.esm.js +15 -5
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +15 -6
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +1 -1
package/picklist/picklist.esm.js
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import PrimeReact, { FilterService } from 'primereact/api';
|
|
3
|
-
import { useMountEffect, useUpdateEffect } from 'primereact/hooks';
|
|
4
|
-
import { ObjectUtils, classNames, DomHandler, UniqueComponentId } from 'primereact/utils';
|
|
3
|
+
import { useMatchMedia, useMountEffect, useUpdateEffect } from 'primereact/hooks';
|
|
4
|
+
import { ObjectUtils, classNames, IconUtils, DomHandler, UniqueComponentId } from 'primereact/utils';
|
|
5
5
|
import { Button } from 'primereact/button';
|
|
6
|
+
import { AngleDownIcon } from 'primereact/icons/angledown';
|
|
7
|
+
import { AngleDoubleUpIcon } from 'primereact/icons/angledoubleup';
|
|
8
|
+
import { AngleUpIcon } from 'primereact/icons/angleup';
|
|
9
|
+
import { AngleDoubleDownIcon } from 'primereact/icons/angledoubledown';
|
|
6
10
|
import { Ripple } from 'primereact/ripple';
|
|
11
|
+
import { SearchIcon } from 'primereact/icons/search';
|
|
12
|
+
import { AngleLeftIcon } from 'primereact/icons/angleleft';
|
|
13
|
+
import { AngleDoubleLeftIcon } from 'primereact/icons/angledoubleleft';
|
|
14
|
+
import { AngleDoubleRightIcon } from 'primereact/icons/angledoubleright';
|
|
15
|
+
import { AngleRightIcon } from 'primereact/icons/angleright';
|
|
7
16
|
|
|
8
17
|
function _extends() {
|
|
9
18
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
@@ -95,6 +104,16 @@ var PickListBase = {
|
|
|
95
104
|
filter: false,
|
|
96
105
|
filterBy: null,
|
|
97
106
|
filterMatchMode: 'contains',
|
|
107
|
+
targetFilterIcon: null,
|
|
108
|
+
sourceFilterIcon: null,
|
|
109
|
+
moveAllToSourceIcon: null,
|
|
110
|
+
moveToSourceIcon: null,
|
|
111
|
+
moveAllToTargetIcon: null,
|
|
112
|
+
moveToTargetIcon: null,
|
|
113
|
+
moveBottomIcon: null,
|
|
114
|
+
moveUpIcon: null,
|
|
115
|
+
moveTopIcon: null,
|
|
116
|
+
moveDownIcon: null,
|
|
98
117
|
filterLocale: undefined,
|
|
99
118
|
sourceFilterValue: null,
|
|
100
119
|
targetFilterValue: null,
|
|
@@ -146,6 +165,10 @@ function _toConsumableArray(arr) {
|
|
|
146
165
|
}
|
|
147
166
|
|
|
148
167
|
var PickListControls = /*#__PURE__*/React.memo(function (props) {
|
|
168
|
+
var moveUpIcon = props.moveUpIcon || /*#__PURE__*/React.createElement(AngleUpIcon, null);
|
|
169
|
+
var moveTopIcon = props.moveTopIcon || /*#__PURE__*/React.createElement(AngleDoubleUpIcon, null);
|
|
170
|
+
var moveDownIcon = props.moveDownIcon || /*#__PURE__*/React.createElement(AngleDownIcon, null);
|
|
171
|
+
var moveBottomIcon = props.moveBottomIcon || /*#__PURE__*/React.createElement(AngleDoubleDownIcon, null);
|
|
149
172
|
var moveDisabled = !props.selection || !props.selection.length;
|
|
150
173
|
var moveUp = function moveUp(event) {
|
|
151
174
|
var selectedItems = props.selection;
|
|
@@ -249,22 +272,22 @@ var PickListControls = /*#__PURE__*/React.memo(function (props) {
|
|
|
249
272
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
250
273
|
disabled: moveDisabled,
|
|
251
274
|
type: "button",
|
|
252
|
-
icon:
|
|
275
|
+
icon: moveUpIcon,
|
|
253
276
|
onClick: moveUp
|
|
254
277
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
255
278
|
disabled: moveDisabled,
|
|
256
279
|
type: "button",
|
|
257
|
-
icon:
|
|
280
|
+
icon: moveTopIcon,
|
|
258
281
|
onClick: moveTop
|
|
259
282
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
260
283
|
disabled: moveDisabled,
|
|
261
284
|
type: "button",
|
|
262
|
-
icon:
|
|
285
|
+
icon: moveDownIcon,
|
|
263
286
|
onClick: moveDown
|
|
264
287
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
265
288
|
disabled: moveDisabled,
|
|
266
289
|
type: "button",
|
|
267
|
-
icon:
|
|
290
|
+
icon: moveBottomIcon,
|
|
268
291
|
onClick: moveBottom
|
|
269
292
|
}));
|
|
270
293
|
});
|
|
@@ -414,6 +437,17 @@ var PickListSubList = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fun
|
|
|
414
437
|
return null;
|
|
415
438
|
};
|
|
416
439
|
var createFilter = function createFilter() {
|
|
440
|
+
var iconClassName = 'p-picklist-filter-icon';
|
|
441
|
+
var icon = props.type === 'source' ? props.sourceFilterIcon || /*#__PURE__*/React.createElement(SearchIcon, {
|
|
442
|
+
className: iconClassName
|
|
443
|
+
}) : props.targetFilterIcon || /*#__PURE__*/React.createElement(SearchIcon, {
|
|
444
|
+
className: iconClassName
|
|
445
|
+
});
|
|
446
|
+
var filterIcon = IconUtils.getJSXIcon(icon, {
|
|
447
|
+
className: iconClassName
|
|
448
|
+
}, {
|
|
449
|
+
props: props
|
|
450
|
+
});
|
|
417
451
|
if (props.showFilter) {
|
|
418
452
|
var content = /*#__PURE__*/React.createElement("div", {
|
|
419
453
|
className: "p-picklist-filter"
|
|
@@ -424,9 +458,7 @@ var PickListSubList = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fun
|
|
|
424
458
|
onKeyDown: onFilterInputKeyDown,
|
|
425
459
|
placeholder: props.placeholder,
|
|
426
460
|
className: "p-picklist-filter-input p-inputtext p-component"
|
|
427
|
-
}), /*#__PURE__*/React.createElement("span",
|
|
428
|
-
className: "p-picklist-filter-icon pi pi-search"
|
|
429
|
-
}));
|
|
461
|
+
}), /*#__PURE__*/React.createElement("span", null, " ", filterIcon, " "));
|
|
430
462
|
if (props.filterTemplate) {
|
|
431
463
|
var defaultContentOptions = {
|
|
432
464
|
className: 'p-picklist-filter',
|
|
@@ -435,7 +467,7 @@ var PickListSubList = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fun
|
|
|
435
467
|
onChange: onFilter,
|
|
436
468
|
onKeyDown: onFilterInputKeyDown
|
|
437
469
|
},
|
|
438
|
-
iconClassName:
|
|
470
|
+
iconClassName: iconClassName,
|
|
439
471
|
element: content,
|
|
440
472
|
props: props
|
|
441
473
|
};
|
|
@@ -469,6 +501,37 @@ var PickListSubList = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fun
|
|
|
469
501
|
PickListSubList.displayName = 'PickListSubList';
|
|
470
502
|
|
|
471
503
|
var PickListTransferControls = /*#__PURE__*/React.memo(function (props) {
|
|
504
|
+
var viewChanged = useMatchMedia("(max-width: ".concat(props.breakpoint, ")"), props.breakpoint);
|
|
505
|
+
function getIconComponent(iconType) {
|
|
506
|
+
switch (iconType) {
|
|
507
|
+
case 'moveToTargetIcon':
|
|
508
|
+
return props.moveToTargetIcon || viewChanged ? /*#__PURE__*/React.createElement(AngleDownIcon, null) : /*#__PURE__*/React.createElement(AngleRightIcon, null);
|
|
509
|
+
case 'moveAllToTargetIcon':
|
|
510
|
+
return props.moveAllToTargetIcon || viewChanged ? /*#__PURE__*/React.createElement(AngleDoubleDownIcon, null) : /*#__PURE__*/React.createElement(AngleDoubleRightIcon, null);
|
|
511
|
+
case 'moveToSourceIcon':
|
|
512
|
+
return props.moveToSourceIcon || viewChanged ? /*#__PURE__*/React.createElement(AngleUpIcon, null) : /*#__PURE__*/React.createElement(AngleLeftIcon, null);
|
|
513
|
+
case 'moveAllToSourceIcon':
|
|
514
|
+
return props.moveAllToSourceIcon || viewChanged ? /*#__PURE__*/React.createElement(AngleDoubleUpIcon, null) : /*#__PURE__*/React.createElement(AngleDoubleLeftIcon, null);
|
|
515
|
+
default:
|
|
516
|
+
return null;
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
var moveToTargetIcon = IconUtils.getJSXIcon(getIconComponent('moveToTargetIcon'), undefined, {
|
|
520
|
+
props: props,
|
|
521
|
+
viewChanged: viewChanged
|
|
522
|
+
});
|
|
523
|
+
var moveAllToTargetIcon = IconUtils.getJSXIcon(getIconComponent('moveAllToTargetIcon'), undefined, {
|
|
524
|
+
props: props,
|
|
525
|
+
viewChanged: viewChanged
|
|
526
|
+
});
|
|
527
|
+
var moveToSourceIcon = IconUtils.getJSXIcon(getIconComponent('moveToSourceIcon'), undefined, {
|
|
528
|
+
props: props,
|
|
529
|
+
viewChanged: viewChanged
|
|
530
|
+
});
|
|
531
|
+
var moveAllToSourceIcon = IconUtils.getJSXIcon(getIconComponent('moveAllToSourceIcon'), undefined, {
|
|
532
|
+
props: props,
|
|
533
|
+
viewChanged: viewChanged
|
|
534
|
+
});
|
|
472
535
|
var moveRightDisabled = ObjectUtils.isEmpty(props.sourceSelection) || ObjectUtils.isEmpty(props.visibleSourceList);
|
|
473
536
|
var moveLeftDisabled = ObjectUtils.isEmpty(props.targetSelection) || ObjectUtils.isEmpty(props.visibleTargetList);
|
|
474
537
|
var moveAllRightDisabled = ObjectUtils.isEmpty(props.visibleSourceList);
|
|
@@ -557,22 +620,22 @@ var PickListTransferControls = /*#__PURE__*/React.memo(function (props) {
|
|
|
557
620
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
558
621
|
disabled: moveRightDisabled,
|
|
559
622
|
type: "button",
|
|
560
|
-
icon:
|
|
623
|
+
icon: moveToTargetIcon,
|
|
561
624
|
onClick: moveRight
|
|
562
625
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
563
626
|
disabled: moveAllRightDisabled,
|
|
564
627
|
type: "button",
|
|
565
|
-
icon:
|
|
628
|
+
icon: moveAllToTargetIcon,
|
|
566
629
|
onClick: moveAllRight
|
|
567
630
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
568
631
|
disabled: moveLeftDisabled,
|
|
569
632
|
type: "button",
|
|
570
|
-
icon:
|
|
633
|
+
icon: moveToSourceIcon,
|
|
571
634
|
onClick: moveLeft
|
|
572
635
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
573
636
|
disabled: moveAllLeftDisabled,
|
|
574
637
|
type: "button",
|
|
575
|
-
icon:
|
|
638
|
+
icon: moveAllToSourceIcon,
|
|
576
639
|
onClick: moveAllLeft
|
|
577
640
|
}));
|
|
578
641
|
});
|
|
@@ -767,7 +830,7 @@ var PickList = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
767
830
|
var createStyle = function createStyle() {
|
|
768
831
|
if (!styleElementRef.current) {
|
|
769
832
|
styleElementRef.current = DomHandler.createInlineStyle(PrimeReact.nonce);
|
|
770
|
-
var innerHTML = "\n@media screen and (max-width: ".concat(props.breakpoint, ") {\n .p-picklist[").concat(attributeSelectorState, "] {\n flex-direction: column;\n }\n\n .p-picklist[").concat(attributeSelectorState, "] .p-picklist-buttons {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-picklist[").concat(attributeSelectorState, "] .p-picklist-buttons .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-picklist[").concat(attributeSelectorState, "] .p-picklist-buttons .p-button:last-child {\n margin-right: 0;\n }\n
|
|
833
|
+
var innerHTML = "\n@media screen and (max-width: ".concat(props.breakpoint, ") {\n .p-picklist[").concat(attributeSelectorState, "] {\n flex-direction: column;\n }\n\n .p-picklist[").concat(attributeSelectorState, "] .p-picklist-buttons {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-picklist[").concat(attributeSelectorState, "] .p-picklist-buttons .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-picklist[").concat(attributeSelectorState, "] .p-picklist-buttons .p-button:last-child {\n margin-right: 0;\n }\n}\n");
|
|
771
834
|
styleElementRef.current.innerHTML = innerHTML;
|
|
772
835
|
}
|
|
773
836
|
};
|
|
@@ -817,7 +880,11 @@ var PickList = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
817
880
|
selection: sourceSelection,
|
|
818
881
|
onReorder: onSourceReorder,
|
|
819
882
|
className: "p-picklist-source-controls",
|
|
820
|
-
dataKey: props.dataKey
|
|
883
|
+
dataKey: props.dataKey,
|
|
884
|
+
moveUpIcon: props.moveUpIcon,
|
|
885
|
+
moveTopIcon: props.moveTopIcon,
|
|
886
|
+
moveDownIcon: props.moveDownIcon,
|
|
887
|
+
moveBottomIcon: props.moveBottomIcon
|
|
821
888
|
}), /*#__PURE__*/React.createElement(PickListSubList, {
|
|
822
889
|
ref: sourceListElementRef,
|
|
823
890
|
type: "source",
|
|
@@ -838,16 +905,22 @@ var PickList = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
838
905
|
onFilter: onFilter,
|
|
839
906
|
showFilter: showSourceFilter,
|
|
840
907
|
placeholder: props.sourceFilterPlaceholder,
|
|
841
|
-
template: props.sourceFilterTemplate
|
|
908
|
+
template: props.sourceFilterTemplate,
|
|
909
|
+
sourceFilterIcon: props.sourceFilterIcon
|
|
842
910
|
}), /*#__PURE__*/React.createElement(PickListTransferControls, {
|
|
843
911
|
onTransfer: onTransfer,
|
|
844
912
|
source: props.source,
|
|
845
913
|
visibleSourceList: sourceList,
|
|
846
914
|
target: props.target,
|
|
915
|
+
breakpoint: props.breakpoint,
|
|
847
916
|
visibleTargetList: targetList,
|
|
848
917
|
sourceSelection: sourceSelection,
|
|
849
918
|
targetSelection: targetSelection,
|
|
850
|
-
dataKey: props.dataKey
|
|
919
|
+
dataKey: props.dataKey,
|
|
920
|
+
moveToTargetIcon: props.moveToTargetIcon,
|
|
921
|
+
moveAllToTargetIcon: props.moveAllToTargetIcon,
|
|
922
|
+
moveToSourceIcon: props.moveToSourceIcon,
|
|
923
|
+
moveAllToSourceIcon: props.moveAllToSourceIcon
|
|
851
924
|
}), /*#__PURE__*/React.createElement(PickListSubList, {
|
|
852
925
|
ref: targetListElementRef,
|
|
853
926
|
type: "target",
|
|
@@ -868,13 +941,18 @@ var PickList = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
868
941
|
onFilter: onFilter,
|
|
869
942
|
showFilter: showTargetFilter,
|
|
870
943
|
placeholder: props.targetFilterPlaceholder,
|
|
871
|
-
template: props.targetFilterTemplate
|
|
944
|
+
template: props.targetFilterTemplate,
|
|
945
|
+
targetFilterIcon: props.targetFilterIcon
|
|
872
946
|
}), props.showTargetControls && /*#__PURE__*/React.createElement(PickListControls, {
|
|
873
947
|
list: props.target,
|
|
874
948
|
selection: targetSelection,
|
|
875
949
|
onReorder: onTargetReorder,
|
|
876
950
|
className: "p-picklist-target-controls",
|
|
877
|
-
dataKey: props.dataKey
|
|
951
|
+
dataKey: props.dataKey,
|
|
952
|
+
moveUpIcon: props.moveUpIcon,
|
|
953
|
+
moveTopIcon: props.moveTopIcon,
|
|
954
|
+
moveDownIcon: props.moveDownIcon,
|
|
955
|
+
moveBottomIcon: props.moveBottomIcon
|
|
878
956
|
}));
|
|
879
957
|
}));
|
|
880
958
|
PickList.displayName = 'PickList';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import t,{FilterService as n}from"primereact/api";import{useMountEffect as r,useUpdateEffect as l}from"primereact/hooks";import{ObjectUtils as i,classNames as o,DomHandler as a,UniqueComponentId as c}from"primereact/utils";import{Button as s}from"primereact/button";import{Ripple as u}from"primereact/ripple";function p(){return p=Object.assign?Object.assign.bind():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},p.apply(this,arguments)}function f(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 r,l,i,o,a=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(e){s=!0,l=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw l}}return a}}function g(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 d(e,t){if(e){if("string"==typeof e)return g(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)?g(e,t):void 0}}function v(){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 h(e,t){return f(e)||m(e,t)||d(e,t)||v()}var y={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,filter:!1,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,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},getProps:function(e){return i.getMergedProps(e,y.defaultProps)},getOtherProps:function(e){return i.getDiffProps(e,y.defaultProps)}};function b(e){if(Array.isArray(e))return g(e)}function S(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function T(){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 E(e){return b(e)||S(e)||d(e)||T()}var k=e.memo((function(t){var n=!t.selection||!t.selection.length,r=o("p-picklist-buttons",t.className);return e.createElement("div",{className:r},e.createElement(s,{disabled:n,type:"button",icon:"pi pi-angle-up",onClick:function(e){var n=t.selection;if(n&&n.length){for(var r=E(t.list),l=0;l<n.length;l++){var o=i.findIndexInList(n[l],r,t.dataKey);if(0===o)break;var a=r[o-1];r[o-1]=r[o],r[o]=a}t.onReorder&&t.onReorder({originalEvent:e,value:r,direction:"up"})}}}),e.createElement(s,{disabled:n,type:"button",icon:"pi pi-angle-double-up",onClick:function(e){var n=t.selection;if(n&&n.length){for(var r=E(t.list),l=0;l<n.length;l++){var o=i.findIndexInList(n[l],r,t.dataKey);if(0===o)break;var a=r.splice(o,1)[0];r.unshift(a)}t.onReorder&&t.onReorder({originalEvent:e,value:r,direction:"top"})}}}),e.createElement(s,{disabled:n,type:"button",icon:"pi pi-angle-down",onClick:function(e){var n=t.selection;if(n&&n.length){for(var r=E(t.list),l=n.length-1;l>=0;l--){var o=i.findIndexInList(n[l],r,t.dataKey);if(o===r.length-1)break;var a=r[o+1];r[o+1]=r[o],r[o]=a}t.onReorder&&t.onReorder({originalEvent:e,value:r,direction:"down"})}}}),e.createElement(s,{disabled:n,type:"button",icon:"pi pi-angle-double-down",onClick:function(e){var n=t.selection;if(n&&n.length){for(var r=E(t.list),l=n.length-1;l>=0;l--){var o=i.findIndexInList(n[l],r,t.dataKey);if(o===r.length-1)break;var a=r.splice(o,1)[0];r.push(a)}t.onReorder&&t.onReorder({originalEvent:e,value:r,direction:"bottom"})}}}))}));k.displayName="PickListControls";var C=e.memo((function(t){var n=t.template?t.template(t.value):t.value,r=o("p-picklist-item",{"p-highlight":t.selected},t.className);return e.createElement("li",{className:r,onClick:function(e){t.onClick&&t.onClick({originalEvent:e,value:t.value})},onKeyDown:function(e){t.onKeyDown&&t.onKeyDown({originalEvent:e,value:t.value})},tabIndex:t.tabIndex,role:"option","aria-selected":t.selected},n,e.createElement(u,null))}));C.displayName="PickListItem";var I=e.memo(e.forwardRef((function(t,n){var r=e.useRef(null),l=function(e){var n=e.originalEvent,r=e.value,l=E(t.selection),o=i.findIndexInList(r,l,t.dataKey),a=-1!==o;if(t.metaKeySelection){var c=n.metaKey||n.ctrlKey;a&&c?l.splice(o,1):(c||(l.length=0),l.push(r))}else a?l.splice(o,1):l.push(r);t.onSelectionChange&&t.onSelectionChange({event:n,value:l})},c=function(e){var t=e.originalEvent,n=t.currentTarget;switch(t.which){case 40:var r=s(n);r&&r.focus(),t.preventDefault();break;case 38:var i=u(n);i&&i.focus(),t.preventDefault();break;case 13:l(e),t.preventDefault()}},s=function e(t){var n=t.nextElementSibling;return n?a.hasClass(n,"p-picklist-item")?n:e(n):null},u=function e(t){var n=t.previousElementSibling;return n?a.hasClass(n,"p-picklist-item")?n:e(n):null},p=function(e){return-1!==i.findIndexInList(e,t.selection,t.dataKey)},f=function(e){t.onFilter&&t.onFilter({originalEvent:e,value:e.target.value,type:t.type})},m=function(e){13===e.which&&e.preventDefault()};e.useImperativeHandle(n,(function(){return{listElementRef:r}}));var g=o("p-picklist-list-wrapper",t.className),d=t.header?e.createElement("div",{className:"p-picklist-header"},i.getJSXElement(t.header,t)):null,v=function(){if(t.showFilter){var n=e.createElement("div",{className:"p-picklist-filter"},e.createElement("input",{type:"text",value:t.filterValue,onChange:f,onKeyDown:m,placeholder:t.placeholder,className:"p-picklist-filter-input p-inputtext p-component"}),e.createElement("span",{className:"p-picklist-filter-icon pi pi-search"}));if(t.filterTemplate)n=i.getJSXElement(t.filterTemplate,{className:"p-picklist-filter",inputProps:{className:"p-picklist-filter-input p-inputtext p-component",onChange:f,onKeyDown:m},iconClassName:"p-picklist-filter-icon pi pi-search",element:n,props:t});return e.createElement("div",{className:"p-picklist-filter-container"},n)}return null}(),h=function(){var n=t.list?t.list.map((function(n){var r=JSON.stringify(n),i=p(n);return e.createElement(C,{key:r,value:n,template:t.itemTemplate,selected:i,onClick:l,onKeyDown:c,tabIndex:t.tabIndex})})):null,r=o("p-picklist-list",t.listClassName);return e.createElement("ul",{className:r,style:t.style,role:"listbox","aria-multiselectable":!0},n)}();return e.createElement("div",{ref:r,className:g},d,v,h)})));I.displayName="PickListSubList";var w=e.memo((function(t){var n=i.isEmpty(t.sourceSelection)||i.isEmpty(t.visibleSourceList),r=i.isEmpty(t.targetSelection)||i.isEmpty(t.visibleTargetList),l=i.isEmpty(t.visibleSourceList),a=i.isEmpty(t.visibleTargetList),c=o("p-picklist-buttons p-picklist-transfer-buttons",t.className);return e.createElement("div",{className:c},e.createElement(s,{disabled:n,type:"button",icon:"pi pi-angle-right",onClick:function(e){var n=t.sourceSelection;if(i.isNotEmpty(n)){for(var r=E(t.target),l=E(t.source),o=0;o<n.length;o++){var a=n[o];-1===i.findIndexInList(a,r,t.dataKey)&&r.push(l.splice(i.findIndexInList(a,l,t.dataKey),1)[0])}t.onTransfer&&t.onTransfer({originalEvent:e,source:l,target:r,direction:"toTarget"})}}}),e.createElement(s,{disabled:l,type:"button",icon:"pi pi-angle-double-right",onClick:function(e){if(t.source){var n=[].concat(E(t.target),E(t.visibleSourceList)),r=t.source.filter((function(e){return!t.visibleSourceList.some((function(t){return t===e}))}));t.onTransfer&&t.onTransfer({originalEvent:e,source:r,target:n,direction:"allToTarget"})}}}),e.createElement(s,{disabled:r,type:"button",icon:"pi pi-angle-left",onClick:function(e){var n=t.targetSelection;if(i.isNotEmpty(n)){for(var r=E(t.target),l=E(t.source),o=0;o<n.length;o++){var a=n[o];-1===i.findIndexInList(a,l,t.dataKey)&&l.push(r.splice(i.findIndexInList(a,r,t.dataKey),1)[0])}t.onTransfer&&t.onTransfer({originalEvent:e,source:l,target:r,direction:"toSource"})}}}),e.createElement(s,{disabled:a,type:"button",icon:"pi pi-angle-double-left",onClick:function(e){if(t.source){var n=[].concat(E(t.source),E(t.visibleTargetList)),r=t.target.filter((function(e){return!t.visibleTargetList.some((function(t){return t===e}))}));t.onTransfer&&t.onTransfer({originalEvent:e,source:n,target:r,direction:"allToSource"})}}}))}));w.displayName="PickListTransferControls";var N=e.memo(e.forwardRef((function(s,u){var f=y.getProps(s),m=h(e.useState([]),2),g=m[0],d=m[1],v=h(e.useState([]),2),b=v[0],S=v[1],T=h(e.useState(""),2),E=T[0],C=T[1],N=h(e.useState(""),2),L=N[0],K=N[1],x=h(e.useState(null),2),F=x[0],P=x[1],R=e.useRef(null),M=e.useRef(null),A=e.useRef(null),D=e.useRef(null),O=e.useRef(null),j=e.useRef(null),H=f.sourceSelection?f.sourceSelection:g,V=f.targetSelection?f.targetSelection:b,B=f.onSourceFilterChange?f.sourceFilterValue:E,J=f.onTargetFilterChange?f.targetFilterValue:L,X=i.isNotEmpty(f.filterBy),_=X&&f.showSourceFilter,U=X&&f.showTargetFilter,Y=function(e,t){if(e){var n=a.findSingle(e,".p-picklist-list");switch(t){case"up":q(n,-1);break;case"top":n.scrollTop=0;break;case"down":q(n,1);break;case"bottom":setTimeout((function(){return n.scrollTop=n.scrollHeight}),100)}}},$=function(e,t,n){f.onChange&&f.onChange({originalEvent:e.originalEvent,source:t,target:n})},q=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e.getElementsByClassName("p-highlight");i.isNotEmpty(n)&&a.scrollInView(e,-1===t?n[0]:n[n.length-1])},z=function(e,t,n){"sourceSelection"===t?d(e.value):S(e.value),n&&n(e),i.isNotEmpty(H)&&"targetSelection"===t?d([]):i.isNotEmpty(V)&&"sourceSelection"===t&&S([])},G=function(e){var t=e.originalEvent,n=e.value,r=h("source"===e.type?[C,f.onSourceFilterChange]:[K,f.onTargetFilterChange],2),l=r[0],i=r[1];i?i({originalEvent:t,value:n}):l(n)},Q=function(e,t){var n=h("source"===t?[B,W]:[J,Z],2),r=n[0],l=n[1];return X&&i.isNotEmpty(r)?l(r):e},W=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").trim().toLocaleLowerCase(f.filterLocale);return ee(f.source,e)},Z=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").trim().toLocaleLowerCase(f.filterLocale);return ee(f.target,e)},ee=function(e,t){var r=X?f.filterBy.split(","):[];return n.filter(e,r,t,f.filterMatchMode,f.filterLocale)},te=function(){if(!j.current){j.current=a.createInlineStyle(t.nonce);var e="\n@media screen and (max-width: ".concat(f.breakpoint,") {\n .p-picklist[").concat(F,"] {\n flex-direction: column;\n }\n\n .p-picklist[").concat(F,"] .p-picklist-buttons {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-picklist[").concat(F,"] .p-picklist-buttons .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-picklist[").concat(F,"] .p-picklist-buttons .p-button:last-child {\n margin-right: 0;\n }\n\n .p-picklist[").concat(F,'] .pi-angle-right:before {\n content: "\\e930"\n }\n\n .p-picklist[').concat(F,'] .pi-angle-double-right:before {\n content: "\\e92c"\n }\n\n .p-picklist[').concat(F,'] .pi-angle-left:before {\n content: "\\e933"\n }\n\n .p-picklist[').concat(F,'] .pi-angle-double-left:before {\n content: "\\e92f"\n }\n}\n');j.current.innerHTML=e}};e.useImperativeHandle(u,(function(){return{props:f,getElement:function(){return R.current}}})),r((function(){!F&&P(c())})),l((function(){return F&&(R.current.setAttribute(F,""),te()),function(){j.current=a.removeInlineStyle(j.current)}}),[F,f.breakpoint]),l((function(){D.current&&(Y(D.current,O.current),D.current=null,O.current=null)}));var ne=y.getOtherProps(f),re=o("p-picklist p-component",f.className),le=f.sourceItemTemplate?f.sourceItemTemplate:f.itemTemplate,ie=f.targetItemTemplate?f.targetItemTemplate:f.itemTemplate,oe=Q(f.source,"source"),ae=Q(f.target,"target");return e.createElement("div",p({id:f.id,ref:R,className:re,style:f.style},ne),f.showSourceControls&&e.createElement(k,{list:f.source,selection:H,onReorder:function(e){$(e,e.value,f.target),D.current=M.current.listElementRef.current,O.current=e.direction},className:"p-picklist-source-controls",dataKey:f.dataKey}),e.createElement(I,{ref:M,type:"source",list:oe,selection:H,onSelectionChange:function(e){return z(e,"sourceSelection",f.onSourceSelectionChange)},itemTemplate:le,header:f.sourceHeader,style:f.sourceStyle,className:"p-picklist-source-wrapper",listClassName:"p-picklist-source",metaKeySelection:f.metaKeySelection,tabIndex:f.tabIndex,dataKey:f.dataKey,filterValue:B,onFilter:G,showFilter:_,placeholder:f.sourceFilterPlaceholder,template:f.sourceFilterTemplate}),e.createElement(w,{onTransfer:function(e){var t=e.originalEvent,n=e.source,r=e.target,l=[];switch(e.direction){case"toTarget":l=H,f.onMoveToTarget&&f.onMoveToTarget({originalEvent:t,value:l});break;case"allToTarget":l=f.source,f.onMoveAllToTarget&&f.onMoveAllToTarget({originalEvent:t,value:l});break;case"toSource":l=V,f.onMoveToSource&&f.onMoveToSource({originalEvent:t,value:l});break;case"allToSource":l=f.target,f.onMoveAllToSource&&f.onMoveAllToSource({originalEvent:t,value:l})}z({originalEvent:t,value:l},"sourceSelection",f.onSourceSelectionChange),z({originalEvent:t,value:l},"targetSelection",f.onTargetSelectionChange),$(e,n,r)},source:f.source,visibleSourceList:oe,target:f.target,visibleTargetList:ae,sourceSelection:H,targetSelection:V,dataKey:f.dataKey}),e.createElement(I,{ref:A,type:"target",list:ae,selection:V,onSelectionChange:function(e){return z(e,"targetSelection",f.onTargetSelectionChange)},itemTemplate:ie,header:f.targetHeader,style:f.targetStyle,className:"p-picklist-target-wrapper",listClassName:"p-picklist-target",metaKeySelection:f.metaKeySelection,tabIndex:f.tabIndex,dataKey:f.dataKey,filterValue:J,onFilter:G,showFilter:U,placeholder:f.targetFilterPlaceholder,template:f.targetFilterTemplate}),f.showTargetControls&&e.createElement(k,{list:f.target,selection:V,onReorder:function(e){$(e,f.source,e.value),D.current=A.current.listElementRef.current,O.current=e.direction},className:"p-picklist-target-controls",dataKey:f.dataKey}))})));N.displayName="PickList";export{N as PickList};
|
|
1
|
+
import*as e from"react";import t,{FilterService as n}from"primereact/api";import{useMatchMedia as r,useMountEffect as o,useUpdateEffect as l}from"primereact/hooks";import{ObjectUtils as i,classNames as a,IconUtils as c,DomHandler as u,UniqueComponentId as s}from"primereact/utils";import{Button as m}from"primereact/button";import{AngleDownIcon as p}from"primereact/icons/angledown";import{AngleDoubleUpIcon as v}from"primereact/icons/angledoubleup";import{AngleUpIcon as f}from"primereact/icons/angleup";import{AngleDoubleDownIcon as g}from"primereact/icons/angledoubledown";import{Ripple as d}from"primereact/ripple";import{SearchIcon as h}from"primereact/icons/search";import{AngleLeftIcon as T}from"primereact/icons/angleleft";import{AngleDoubleLeftIcon as y}from"primereact/icons/angledoubleleft";import{AngleDoubleRightIcon as I}from"primereact/icons/angledoubleright";import{AngleRightIcon as S}from"primereact/icons/angleright";function b(){return b=Object.assign?Object.assign.bind():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},b.apply(this,arguments)}function E(e){if(Array.isArray(e))return e}function k(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,l,i,a=[],c=!0,u=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=l.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return a}}function w(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 C(e,t){if(e){if("string"==typeof e)return w(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)?w(e,t):void 0}}function N(){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 F(e,t){return E(e)||k(e,t)||C(e,t)||N()}var L={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,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,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},getProps:function(e){return i.getMergedProps(e,L.defaultProps)},getOtherProps:function(e){return i.getDiffProps(e,L.defaultProps)}};function K(e){if(Array.isArray(e))return w(e)}function x(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function A(){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 P(e){return K(e)||x(e)||C(e)||A()}var R=e.memo((function(t){var n=t.moveUpIcon||e.createElement(f,null),r=t.moveTopIcon||e.createElement(v,null),o=t.moveDownIcon||e.createElement(p,null),l=t.moveBottomIcon||e.createElement(g,null),c=!t.selection||!t.selection.length,u=a("p-picklist-buttons",t.className);return e.createElement("div",{className:u},e.createElement(m,{disabled:c,type:"button",icon:n,onClick:function(e){var n=t.selection;if(n&&n.length){for(var r=P(t.list),o=0;o<n.length;o++){var l=i.findIndexInList(n[o],r,t.dataKey);if(0===l)break;var a=r[l-1];r[l-1]=r[l],r[l]=a}t.onReorder&&t.onReorder({originalEvent:e,value:r,direction:"up"})}}}),e.createElement(m,{disabled:c,type:"button",icon:r,onClick:function(e){var n=t.selection;if(n&&n.length){for(var r=P(t.list),o=0;o<n.length;o++){var l=i.findIndexInList(n[o],r,t.dataKey);if(0===l)break;var a=r.splice(l,1)[0];r.unshift(a)}t.onReorder&&t.onReorder({originalEvent:e,value:r,direction:"top"})}}}),e.createElement(m,{disabled:c,type:"button",icon:o,onClick:function(e){var n=t.selection;if(n&&n.length){for(var r=P(t.list),o=n.length-1;o>=0;o--){var l=i.findIndexInList(n[o],r,t.dataKey);if(l===r.length-1)break;var a=r[l+1];r[l+1]=r[l],r[l]=a}t.onReorder&&t.onReorder({originalEvent:e,value:r,direction:"down"})}}}),e.createElement(m,{disabled:c,type:"button",icon:l,onClick:function(e){var n=t.selection;if(n&&n.length){for(var r=P(t.list),o=n.length-1;o>=0;o--){var l=i.findIndexInList(n[o],r,t.dataKey);if(l===r.length-1)break;var a=r.splice(l,1)[0];r.push(a)}t.onReorder&&t.onReorder({originalEvent:e,value:r,direction:"bottom"})}}}))}));R.displayName="PickListControls";var M=e.memo((function(t){var n=t.template?t.template(t.value):t.value,r=a("p-picklist-item",{"p-highlight":t.selected},t.className);return e.createElement("li",{className:r,onClick:function(e){t.onClick&&t.onClick({originalEvent:e,value:t.value})},onKeyDown:function(e){t.onKeyDown&&t.onKeyDown({originalEvent:e,value:t.value})},tabIndex:t.tabIndex,role:"option","aria-selected":t.selected},n,e.createElement(d,null))}));M.displayName="PickListItem";var D=e.memo(e.forwardRef((function(t,n){var r=e.useRef(null),o=function(e){var n=e.originalEvent,r=e.value,o=P(t.selection),l=i.findIndexInList(r,o,t.dataKey),a=-1!==l;if(t.metaKeySelection){var c=n.metaKey||n.ctrlKey;a&&c?o.splice(l,1):(c||(o.length=0),o.push(r))}else a?o.splice(l,1):o.push(r);t.onSelectionChange&&t.onSelectionChange({event:n,value:o})},l=function(e){var t=e.originalEvent,n=t.currentTarget;switch(t.which){case 40:var r=s(n);r&&r.focus(),t.preventDefault();break;case 38:var l=m(n);l&&l.focus(),t.preventDefault();break;case 13:o(e),t.preventDefault()}},s=function e(t){var n=t.nextElementSibling;return n?u.hasClass(n,"p-picklist-item")?n:e(n):null},m=function e(t){var n=t.previousElementSibling;return n?u.hasClass(n,"p-picklist-item")?n:e(n):null},p=function(e){return-1!==i.findIndexInList(e,t.selection,t.dataKey)},v=function(e){t.onFilter&&t.onFilter({originalEvent:e,value:e.target.value,type:t.type})},f=function(e){13===e.which&&e.preventDefault()};e.useImperativeHandle(n,(function(){return{listElementRef:r}}));var g=a("p-picklist-list-wrapper",t.className),d=t.header?e.createElement("div",{className:"p-picklist-header"},i.getJSXElement(t.header,t)):null,T=function(){var n="p-picklist-filter-icon",r=c.getJSXIcon("source"===t.type?t.sourceFilterIcon||e.createElement(h,{className:n}):t.targetFilterIcon||e.createElement(h,{className:n}),{className:n},{props:t});if(t.showFilter){var o=e.createElement("div",{className:"p-picklist-filter"},e.createElement("input",{type:"text",value:t.filterValue,onChange:v,onKeyDown:f,placeholder:t.placeholder,className:"p-picklist-filter-input p-inputtext p-component"}),e.createElement("span",null," ",r," "));if(t.filterTemplate)o=i.getJSXElement(t.filterTemplate,{className:"p-picklist-filter",inputProps:{className:"p-picklist-filter-input p-inputtext p-component",onChange:v,onKeyDown:f},iconClassName:n,element:o,props:t});return e.createElement("div",{className:"p-picklist-filter-container"},o)}return null}(),y=function(){var n=t.list?t.list.map((function(n){var r=JSON.stringify(n),i=p(n);return e.createElement(M,{key:r,value:n,template:t.itemTemplate,selected:i,onClick:o,onKeyDown:l,tabIndex:t.tabIndex})})):null,r=a("p-picklist-list",t.listClassName);return e.createElement("ul",{className:r,style:t.style,role:"listbox","aria-multiselectable":!0},n)}();return e.createElement("div",{ref:r,className:g},d,T,y)})));D.displayName="PickListSubList";var O=e.memo((function(t){var n=r("(max-width: ".concat(t.breakpoint,")"),t.breakpoint);function o(r){switch(r){case"moveToTargetIcon":return e.createElement(t.moveToTargetIcon||n?p:S,null);case"moveAllToTargetIcon":return e.createElement(t.moveAllToTargetIcon||n?g:I,null);case"moveToSourceIcon":return e.createElement(t.moveToSourceIcon||n?f:T,null);case"moveAllToSourceIcon":return e.createElement(t.moveAllToSourceIcon||n?v:y,null);default:return null}}var l=c.getJSXIcon(o("moveToTargetIcon"),void 0,{props:t,viewChanged:n}),u=c.getJSXIcon(o("moveAllToTargetIcon"),void 0,{props:t,viewChanged:n}),s=c.getJSXIcon(o("moveToSourceIcon"),void 0,{props:t,viewChanged:n}),d=c.getJSXIcon(o("moveAllToSourceIcon"),void 0,{props:t,viewChanged:n}),h=i.isEmpty(t.sourceSelection)||i.isEmpty(t.visibleSourceList),b=i.isEmpty(t.targetSelection)||i.isEmpty(t.visibleTargetList),E=i.isEmpty(t.visibleSourceList),k=i.isEmpty(t.visibleTargetList),w=a("p-picklist-buttons p-picklist-transfer-buttons",t.className);return e.createElement("div",{className:w},e.createElement(m,{disabled:h,type:"button",icon:l,onClick:function(e){var n=t.sourceSelection;if(i.isNotEmpty(n)){for(var r=P(t.target),o=P(t.source),l=0;l<n.length;l++){var a=n[l];-1===i.findIndexInList(a,r,t.dataKey)&&r.push(o.splice(i.findIndexInList(a,o,t.dataKey),1)[0])}t.onTransfer&&t.onTransfer({originalEvent:e,source:o,target:r,direction:"toTarget"})}}}),e.createElement(m,{disabled:E,type:"button",icon:u,onClick:function(e){if(t.source){var n=[].concat(P(t.target),P(t.visibleSourceList)),r=t.source.filter((function(e){return!t.visibleSourceList.some((function(t){return t===e}))}));t.onTransfer&&t.onTransfer({originalEvent:e,source:r,target:n,direction:"allToTarget"})}}}),e.createElement(m,{disabled:b,type:"button",icon:s,onClick:function(e){var n=t.targetSelection;if(i.isNotEmpty(n)){for(var r=P(t.target),o=P(t.source),l=0;l<n.length;l++){var a=n[l];-1===i.findIndexInList(a,o,t.dataKey)&&o.push(r.splice(i.findIndexInList(a,r,t.dataKey),1)[0])}t.onTransfer&&t.onTransfer({originalEvent:e,source:o,target:r,direction:"toSource"})}}}),e.createElement(m,{disabled:k,type:"button",icon:d,onClick:function(e){if(t.source){var n=[].concat(P(t.source),P(t.visibleTargetList)),r=t.target.filter((function(e){return!t.visibleTargetList.some((function(t){return t===e}))}));t.onTransfer&&t.onTransfer({originalEvent:e,source:n,target:r,direction:"allToSource"})}}}))}));O.displayName="PickListTransferControls";var B=e.memo(e.forwardRef((function(r,c){var m=L.getProps(r),p=F(e.useState([]),2),v=p[0],f=p[1],g=F(e.useState([]),2),d=g[0],h=g[1],T=F(e.useState(""),2),y=T[0],I=T[1],S=F(e.useState(""),2),E=S[0],k=S[1],w=F(e.useState(null),2),C=w[0],N=w[1],K=e.useRef(null),x=e.useRef(null),A=e.useRef(null),P=e.useRef(null),M=e.useRef(null),B=e.useRef(null),j=m.sourceSelection?m.sourceSelection:v,H=m.targetSelection?m.targetSelection:d,J=m.onSourceFilterChange?m.sourceFilterValue:y,V=m.onTargetFilterChange?m.targetFilterValue:E,U=i.isNotEmpty(m.filterBy),X=U&&m.showSourceFilter,_=U&&m.showTargetFilter,Y=function(e,t){if(e){var n=u.findSingle(e,".p-picklist-list");switch(t){case"up":q(n,-1);break;case"top":n.scrollTop=0;break;case"down":q(n,1);break;case"bottom":setTimeout((function(){return n.scrollTop=n.scrollHeight}),100)}}},$=function(e,t,n){m.onChange&&m.onChange({originalEvent:e.originalEvent,source:t,target:n})},q=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e.getElementsByClassName("p-highlight");i.isNotEmpty(n)&&u.scrollInView(e,-1===t?n[0]:n[n.length-1])},z=function(e,t,n){"sourceSelection"===t?f(e.value):h(e.value),n&&n(e),i.isNotEmpty(j)&&"targetSelection"===t?f([]):i.isNotEmpty(H)&&"sourceSelection"===t&&h([])},G=function(e){var t=e.originalEvent,n=e.value,r=F("source"===e.type?[I,m.onSourceFilterChange]:[k,m.onTargetFilterChange],2),o=r[0],l=r[1];l?l({originalEvent:t,value:n}):o(n)},Q=function(e,t){var n=F("source"===t?[J,W]:[V,Z],2),r=n[0],o=n[1];return U&&i.isNotEmpty(r)?o(r):e},W=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").trim().toLocaleLowerCase(m.filterLocale);return ee(m.source,e)},Z=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").trim().toLocaleLowerCase(m.filterLocale);return ee(m.target,e)},ee=function(e,t){var r=U?m.filterBy.split(","):[];return n.filter(e,r,t,m.filterMatchMode,m.filterLocale)},te=function(){if(!B.current){B.current=u.createInlineStyle(t.nonce);var e="\n@media screen and (max-width: ".concat(m.breakpoint,") {\n .p-picklist[").concat(C,"] {\n flex-direction: column;\n }\n\n .p-picklist[").concat(C,"] .p-picklist-buttons {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-picklist[").concat(C,"] .p-picklist-buttons .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-picklist[").concat(C,"] .p-picklist-buttons .p-button:last-child {\n margin-right: 0;\n }\n}\n");B.current.innerHTML=e}};e.useImperativeHandle(c,(function(){return{props:m,getElement:function(){return K.current}}})),o((function(){!C&&N(s())})),l((function(){return C&&(K.current.setAttribute(C,""),te()),function(){B.current=u.removeInlineStyle(B.current)}}),[C,m.breakpoint]),l((function(){P.current&&(Y(P.current,M.current),P.current=null,M.current=null)}));var ne=L.getOtherProps(m),re=a("p-picklist p-component",m.className),oe=m.sourceItemTemplate?m.sourceItemTemplate:m.itemTemplate,le=m.targetItemTemplate?m.targetItemTemplate:m.itemTemplate,ie=Q(m.source,"source"),ae=Q(m.target,"target");return e.createElement("div",b({id:m.id,ref:K,className:re,style:m.style},ne),m.showSourceControls&&e.createElement(R,{list:m.source,selection:j,onReorder:function(e){$(e,e.value,m.target),P.current=x.current.listElementRef.current,M.current=e.direction},className:"p-picklist-source-controls",dataKey:m.dataKey,moveUpIcon:m.moveUpIcon,moveTopIcon:m.moveTopIcon,moveDownIcon:m.moveDownIcon,moveBottomIcon:m.moveBottomIcon}),e.createElement(D,{ref:x,type:"source",list:ie,selection:j,onSelectionChange:function(e){return z(e,"sourceSelection",m.onSourceSelectionChange)},itemTemplate:oe,header:m.sourceHeader,style:m.sourceStyle,className:"p-picklist-source-wrapper",listClassName:"p-picklist-source",metaKeySelection:m.metaKeySelection,tabIndex:m.tabIndex,dataKey:m.dataKey,filterValue:J,onFilter:G,showFilter:X,placeholder:m.sourceFilterPlaceholder,template:m.sourceFilterTemplate,sourceFilterIcon:m.sourceFilterIcon}),e.createElement(O,{onTransfer:function(e){var t=e.originalEvent,n=e.source,r=e.target,o=[];switch(e.direction){case"toTarget":o=j,m.onMoveToTarget&&m.onMoveToTarget({originalEvent:t,value:o});break;case"allToTarget":o=m.source,m.onMoveAllToTarget&&m.onMoveAllToTarget({originalEvent:t,value:o});break;case"toSource":o=H,m.onMoveToSource&&m.onMoveToSource({originalEvent:t,value:o});break;case"allToSource":o=m.target,m.onMoveAllToSource&&m.onMoveAllToSource({originalEvent:t,value:o})}z({originalEvent:t,value:o},"sourceSelection",m.onSourceSelectionChange),z({originalEvent:t,value:o},"targetSelection",m.onTargetSelectionChange),$(e,n,r)},source:m.source,visibleSourceList:ie,target:m.target,breakpoint:m.breakpoint,visibleTargetList:ae,sourceSelection:j,targetSelection:H,dataKey:m.dataKey,moveToTargetIcon:m.moveToTargetIcon,moveAllToTargetIcon:m.moveAllToTargetIcon,moveToSourceIcon:m.moveToSourceIcon,moveAllToSourceIcon:m.moveAllToSourceIcon}),e.createElement(D,{ref:A,type:"target",list:ae,selection:H,onSelectionChange:function(e){return z(e,"targetSelection",m.onTargetSelectionChange)},itemTemplate:le,header:m.targetHeader,style:m.targetStyle,className:"p-picklist-target-wrapper",listClassName:"p-picklist-target",metaKeySelection:m.metaKeySelection,tabIndex:m.tabIndex,dataKey:m.dataKey,filterValue:V,onFilter:G,showFilter:_,placeholder:m.targetFilterPlaceholder,template:m.targetFilterTemplate,targetFilterIcon:m.targetFilterIcon}),m.showTargetControls&&e.createElement(R,{list:m.target,selection:H,onReorder:function(e){$(e,m.source,e.value),P.current=A.current.listElementRef.current,M.current=e.direction},className:"p-picklist-target-controls",dataKey:m.dataKey,moveUpIcon:m.moveUpIcon,moveTopIcon:m.moveTopIcon,moveDownIcon:m.moveDownIcon,moveBottomIcon:m.moveBottomIcon}))})));B.displayName="PickList";export{B as PickList};
|
package/picklist/picklist.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
this.primereact = this.primereact || {};
|
|
2
|
-
this.primereact.picklist = (function (exports, React, PrimeReact, hooks, utils, button, ripple) {
|
|
2
|
+
this.primereact.picklist = (function (exports, React, PrimeReact, hooks, utils, button, angledown, angledoubleup, angleup, angledoubledown, ripple, search, angleleft, angledoubleleft, angledoubleright, angleright) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -115,6 +115,16 @@ this.primereact.picklist = (function (exports, React, PrimeReact, hooks, utils,
|
|
|
115
115
|
filter: false,
|
|
116
116
|
filterBy: null,
|
|
117
117
|
filterMatchMode: 'contains',
|
|
118
|
+
targetFilterIcon: null,
|
|
119
|
+
sourceFilterIcon: null,
|
|
120
|
+
moveAllToSourceIcon: null,
|
|
121
|
+
moveToSourceIcon: null,
|
|
122
|
+
moveAllToTargetIcon: null,
|
|
123
|
+
moveToTargetIcon: null,
|
|
124
|
+
moveBottomIcon: null,
|
|
125
|
+
moveUpIcon: null,
|
|
126
|
+
moveTopIcon: null,
|
|
127
|
+
moveDownIcon: null,
|
|
118
128
|
filterLocale: undefined,
|
|
119
129
|
sourceFilterValue: null,
|
|
120
130
|
targetFilterValue: null,
|
|
@@ -166,6 +176,10 @@ this.primereact.picklist = (function (exports, React, PrimeReact, hooks, utils,
|
|
|
166
176
|
}
|
|
167
177
|
|
|
168
178
|
var PickListControls = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
179
|
+
var moveUpIcon = props.moveUpIcon || /*#__PURE__*/React__namespace.createElement(angleup.AngleUpIcon, null);
|
|
180
|
+
var moveTopIcon = props.moveTopIcon || /*#__PURE__*/React__namespace.createElement(angledoubleup.AngleDoubleUpIcon, null);
|
|
181
|
+
var moveDownIcon = props.moveDownIcon || /*#__PURE__*/React__namespace.createElement(angledown.AngleDownIcon, null);
|
|
182
|
+
var moveBottomIcon = props.moveBottomIcon || /*#__PURE__*/React__namespace.createElement(angledoubledown.AngleDoubleDownIcon, null);
|
|
169
183
|
var moveDisabled = !props.selection || !props.selection.length;
|
|
170
184
|
var moveUp = function moveUp(event) {
|
|
171
185
|
var selectedItems = props.selection;
|
|
@@ -269,22 +283,22 @@ this.primereact.picklist = (function (exports, React, PrimeReact, hooks, utils,
|
|
|
269
283
|
}, /*#__PURE__*/React__namespace.createElement(button.Button, {
|
|
270
284
|
disabled: moveDisabled,
|
|
271
285
|
type: "button",
|
|
272
|
-
icon:
|
|
286
|
+
icon: moveUpIcon,
|
|
273
287
|
onClick: moveUp
|
|
274
288
|
}), /*#__PURE__*/React__namespace.createElement(button.Button, {
|
|
275
289
|
disabled: moveDisabled,
|
|
276
290
|
type: "button",
|
|
277
|
-
icon:
|
|
291
|
+
icon: moveTopIcon,
|
|
278
292
|
onClick: moveTop
|
|
279
293
|
}), /*#__PURE__*/React__namespace.createElement(button.Button, {
|
|
280
294
|
disabled: moveDisabled,
|
|
281
295
|
type: "button",
|
|
282
|
-
icon:
|
|
296
|
+
icon: moveDownIcon,
|
|
283
297
|
onClick: moveDown
|
|
284
298
|
}), /*#__PURE__*/React__namespace.createElement(button.Button, {
|
|
285
299
|
disabled: moveDisabled,
|
|
286
300
|
type: "button",
|
|
287
|
-
icon:
|
|
301
|
+
icon: moveBottomIcon,
|
|
288
302
|
onClick: moveBottom
|
|
289
303
|
}));
|
|
290
304
|
});
|
|
@@ -434,6 +448,17 @@ this.primereact.picklist = (function (exports, React, PrimeReact, hooks, utils,
|
|
|
434
448
|
return null;
|
|
435
449
|
};
|
|
436
450
|
var createFilter = function createFilter() {
|
|
451
|
+
var iconClassName = 'p-picklist-filter-icon';
|
|
452
|
+
var icon = props.type === 'source' ? props.sourceFilterIcon || /*#__PURE__*/React__namespace.createElement(search.SearchIcon, {
|
|
453
|
+
className: iconClassName
|
|
454
|
+
}) : props.targetFilterIcon || /*#__PURE__*/React__namespace.createElement(search.SearchIcon, {
|
|
455
|
+
className: iconClassName
|
|
456
|
+
});
|
|
457
|
+
var filterIcon = utils.IconUtils.getJSXIcon(icon, {
|
|
458
|
+
className: iconClassName
|
|
459
|
+
}, {
|
|
460
|
+
props: props
|
|
461
|
+
});
|
|
437
462
|
if (props.showFilter) {
|
|
438
463
|
var content = /*#__PURE__*/React__namespace.createElement("div", {
|
|
439
464
|
className: "p-picklist-filter"
|
|
@@ -444,9 +469,7 @@ this.primereact.picklist = (function (exports, React, PrimeReact, hooks, utils,
|
|
|
444
469
|
onKeyDown: onFilterInputKeyDown,
|
|
445
470
|
placeholder: props.placeholder,
|
|
446
471
|
className: "p-picklist-filter-input p-inputtext p-component"
|
|
447
|
-
}), /*#__PURE__*/React__namespace.createElement("span",
|
|
448
|
-
className: "p-picklist-filter-icon pi pi-search"
|
|
449
|
-
}));
|
|
472
|
+
}), /*#__PURE__*/React__namespace.createElement("span", null, " ", filterIcon, " "));
|
|
450
473
|
if (props.filterTemplate) {
|
|
451
474
|
var defaultContentOptions = {
|
|
452
475
|
className: 'p-picklist-filter',
|
|
@@ -455,7 +478,7 @@ this.primereact.picklist = (function (exports, React, PrimeReact, hooks, utils,
|
|
|
455
478
|
onChange: onFilter,
|
|
456
479
|
onKeyDown: onFilterInputKeyDown
|
|
457
480
|
},
|
|
458
|
-
iconClassName:
|
|
481
|
+
iconClassName: iconClassName,
|
|
459
482
|
element: content,
|
|
460
483
|
props: props
|
|
461
484
|
};
|
|
@@ -489,6 +512,37 @@ this.primereact.picklist = (function (exports, React, PrimeReact, hooks, utils,
|
|
|
489
512
|
PickListSubList.displayName = 'PickListSubList';
|
|
490
513
|
|
|
491
514
|
var PickListTransferControls = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
515
|
+
var viewChanged = hooks.useMatchMedia("(max-width: ".concat(props.breakpoint, ")"), props.breakpoint);
|
|
516
|
+
function getIconComponent(iconType) {
|
|
517
|
+
switch (iconType) {
|
|
518
|
+
case 'moveToTargetIcon':
|
|
519
|
+
return props.moveToTargetIcon || viewChanged ? /*#__PURE__*/React__namespace.createElement(angledown.AngleDownIcon, null) : /*#__PURE__*/React__namespace.createElement(angleright.AngleRightIcon, null);
|
|
520
|
+
case 'moveAllToTargetIcon':
|
|
521
|
+
return props.moveAllToTargetIcon || viewChanged ? /*#__PURE__*/React__namespace.createElement(angledoubledown.AngleDoubleDownIcon, null) : /*#__PURE__*/React__namespace.createElement(angledoubleright.AngleDoubleRightIcon, null);
|
|
522
|
+
case 'moveToSourceIcon':
|
|
523
|
+
return props.moveToSourceIcon || viewChanged ? /*#__PURE__*/React__namespace.createElement(angleup.AngleUpIcon, null) : /*#__PURE__*/React__namespace.createElement(angleleft.AngleLeftIcon, null);
|
|
524
|
+
case 'moveAllToSourceIcon':
|
|
525
|
+
return props.moveAllToSourceIcon || viewChanged ? /*#__PURE__*/React__namespace.createElement(angledoubleup.AngleDoubleUpIcon, null) : /*#__PURE__*/React__namespace.createElement(angledoubleleft.AngleDoubleLeftIcon, null);
|
|
526
|
+
default:
|
|
527
|
+
return null;
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
var moveToTargetIcon = utils.IconUtils.getJSXIcon(getIconComponent('moveToTargetIcon'), undefined, {
|
|
531
|
+
props: props,
|
|
532
|
+
viewChanged: viewChanged
|
|
533
|
+
});
|
|
534
|
+
var moveAllToTargetIcon = utils.IconUtils.getJSXIcon(getIconComponent('moveAllToTargetIcon'), undefined, {
|
|
535
|
+
props: props,
|
|
536
|
+
viewChanged: viewChanged
|
|
537
|
+
});
|
|
538
|
+
var moveToSourceIcon = utils.IconUtils.getJSXIcon(getIconComponent('moveToSourceIcon'), undefined, {
|
|
539
|
+
props: props,
|
|
540
|
+
viewChanged: viewChanged
|
|
541
|
+
});
|
|
542
|
+
var moveAllToSourceIcon = utils.IconUtils.getJSXIcon(getIconComponent('moveAllToSourceIcon'), undefined, {
|
|
543
|
+
props: props,
|
|
544
|
+
viewChanged: viewChanged
|
|
545
|
+
});
|
|
492
546
|
var moveRightDisabled = utils.ObjectUtils.isEmpty(props.sourceSelection) || utils.ObjectUtils.isEmpty(props.visibleSourceList);
|
|
493
547
|
var moveLeftDisabled = utils.ObjectUtils.isEmpty(props.targetSelection) || utils.ObjectUtils.isEmpty(props.visibleTargetList);
|
|
494
548
|
var moveAllRightDisabled = utils.ObjectUtils.isEmpty(props.visibleSourceList);
|
|
@@ -577,22 +631,22 @@ this.primereact.picklist = (function (exports, React, PrimeReact, hooks, utils,
|
|
|
577
631
|
}, /*#__PURE__*/React__namespace.createElement(button.Button, {
|
|
578
632
|
disabled: moveRightDisabled,
|
|
579
633
|
type: "button",
|
|
580
|
-
icon:
|
|
634
|
+
icon: moveToTargetIcon,
|
|
581
635
|
onClick: moveRight
|
|
582
636
|
}), /*#__PURE__*/React__namespace.createElement(button.Button, {
|
|
583
637
|
disabled: moveAllRightDisabled,
|
|
584
638
|
type: "button",
|
|
585
|
-
icon:
|
|
639
|
+
icon: moveAllToTargetIcon,
|
|
586
640
|
onClick: moveAllRight
|
|
587
641
|
}), /*#__PURE__*/React__namespace.createElement(button.Button, {
|
|
588
642
|
disabled: moveLeftDisabled,
|
|
589
643
|
type: "button",
|
|
590
|
-
icon:
|
|
644
|
+
icon: moveToSourceIcon,
|
|
591
645
|
onClick: moveLeft
|
|
592
646
|
}), /*#__PURE__*/React__namespace.createElement(button.Button, {
|
|
593
647
|
disabled: moveAllLeftDisabled,
|
|
594
648
|
type: "button",
|
|
595
|
-
icon:
|
|
649
|
+
icon: moveAllToSourceIcon,
|
|
596
650
|
onClick: moveAllLeft
|
|
597
651
|
}));
|
|
598
652
|
});
|
|
@@ -787,7 +841,7 @@ this.primereact.picklist = (function (exports, React, PrimeReact, hooks, utils,
|
|
|
787
841
|
var createStyle = function createStyle() {
|
|
788
842
|
if (!styleElementRef.current) {
|
|
789
843
|
styleElementRef.current = utils.DomHandler.createInlineStyle(PrimeReact__default["default"].nonce);
|
|
790
|
-
var innerHTML = "\n@media screen and (max-width: ".concat(props.breakpoint, ") {\n .p-picklist[").concat(attributeSelectorState, "] {\n flex-direction: column;\n }\n\n .p-picklist[").concat(attributeSelectorState, "] .p-picklist-buttons {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-picklist[").concat(attributeSelectorState, "] .p-picklist-buttons .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-picklist[").concat(attributeSelectorState, "] .p-picklist-buttons .p-button:last-child {\n margin-right: 0;\n }\n
|
|
844
|
+
var innerHTML = "\n@media screen and (max-width: ".concat(props.breakpoint, ") {\n .p-picklist[").concat(attributeSelectorState, "] {\n flex-direction: column;\n }\n\n .p-picklist[").concat(attributeSelectorState, "] .p-picklist-buttons {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-picklist[").concat(attributeSelectorState, "] .p-picklist-buttons .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-picklist[").concat(attributeSelectorState, "] .p-picklist-buttons .p-button:last-child {\n margin-right: 0;\n }\n}\n");
|
|
791
845
|
styleElementRef.current.innerHTML = innerHTML;
|
|
792
846
|
}
|
|
793
847
|
};
|
|
@@ -837,7 +891,11 @@ this.primereact.picklist = (function (exports, React, PrimeReact, hooks, utils,
|
|
|
837
891
|
selection: sourceSelection,
|
|
838
892
|
onReorder: onSourceReorder,
|
|
839
893
|
className: "p-picklist-source-controls",
|
|
840
|
-
dataKey: props.dataKey
|
|
894
|
+
dataKey: props.dataKey,
|
|
895
|
+
moveUpIcon: props.moveUpIcon,
|
|
896
|
+
moveTopIcon: props.moveTopIcon,
|
|
897
|
+
moveDownIcon: props.moveDownIcon,
|
|
898
|
+
moveBottomIcon: props.moveBottomIcon
|
|
841
899
|
}), /*#__PURE__*/React__namespace.createElement(PickListSubList, {
|
|
842
900
|
ref: sourceListElementRef,
|
|
843
901
|
type: "source",
|
|
@@ -858,16 +916,22 @@ this.primereact.picklist = (function (exports, React, PrimeReact, hooks, utils,
|
|
|
858
916
|
onFilter: onFilter,
|
|
859
917
|
showFilter: showSourceFilter,
|
|
860
918
|
placeholder: props.sourceFilterPlaceholder,
|
|
861
|
-
template: props.sourceFilterTemplate
|
|
919
|
+
template: props.sourceFilterTemplate,
|
|
920
|
+
sourceFilterIcon: props.sourceFilterIcon
|
|
862
921
|
}), /*#__PURE__*/React__namespace.createElement(PickListTransferControls, {
|
|
863
922
|
onTransfer: onTransfer,
|
|
864
923
|
source: props.source,
|
|
865
924
|
visibleSourceList: sourceList,
|
|
866
925
|
target: props.target,
|
|
926
|
+
breakpoint: props.breakpoint,
|
|
867
927
|
visibleTargetList: targetList,
|
|
868
928
|
sourceSelection: sourceSelection,
|
|
869
929
|
targetSelection: targetSelection,
|
|
870
|
-
dataKey: props.dataKey
|
|
930
|
+
dataKey: props.dataKey,
|
|
931
|
+
moveToTargetIcon: props.moveToTargetIcon,
|
|
932
|
+
moveAllToTargetIcon: props.moveAllToTargetIcon,
|
|
933
|
+
moveToSourceIcon: props.moveToSourceIcon,
|
|
934
|
+
moveAllToSourceIcon: props.moveAllToSourceIcon
|
|
871
935
|
}), /*#__PURE__*/React__namespace.createElement(PickListSubList, {
|
|
872
936
|
ref: targetListElementRef,
|
|
873
937
|
type: "target",
|
|
@@ -888,13 +952,18 @@ this.primereact.picklist = (function (exports, React, PrimeReact, hooks, utils,
|
|
|
888
952
|
onFilter: onFilter,
|
|
889
953
|
showFilter: showTargetFilter,
|
|
890
954
|
placeholder: props.targetFilterPlaceholder,
|
|
891
|
-
template: props.targetFilterTemplate
|
|
955
|
+
template: props.targetFilterTemplate,
|
|
956
|
+
targetFilterIcon: props.targetFilterIcon
|
|
892
957
|
}), props.showTargetControls && /*#__PURE__*/React__namespace.createElement(PickListControls, {
|
|
893
958
|
list: props.target,
|
|
894
959
|
selection: targetSelection,
|
|
895
960
|
onReorder: onTargetReorder,
|
|
896
961
|
className: "p-picklist-target-controls",
|
|
897
|
-
dataKey: props.dataKey
|
|
962
|
+
dataKey: props.dataKey,
|
|
963
|
+
moveUpIcon: props.moveUpIcon,
|
|
964
|
+
moveTopIcon: props.moveTopIcon,
|
|
965
|
+
moveDownIcon: props.moveDownIcon,
|
|
966
|
+
moveBottomIcon: props.moveBottomIcon
|
|
898
967
|
}));
|
|
899
968
|
}));
|
|
900
969
|
PickList.displayName = 'PickList';
|
|
@@ -905,4 +974,4 @@ this.primereact.picklist = (function (exports, React, PrimeReact, hooks, utils,
|
|
|
905
974
|
|
|
906
975
|
return exports;
|
|
907
976
|
|
|
908
|
-
})({}, React, primereact.api, primereact.hooks, primereact.utils, primereact.button, primereact.ripple);
|
|
977
|
+
})({}, React, primereact.api, primereact.hooks, primereact.utils, primereact.button, primereact.icons/angledown, primereact.icons/angledoubleup, primereact.icons/angleup, primereact.icons/angledoubledown, primereact.ripple, primereact.icons/search, primereact.icons/angleleft, primereact.icons/angledoubleleft, primereact.icons/angledoubleright, primereact.icons/angleright);
|