primereact 9.2.3 → 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/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 +596 -565
- 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/chip/chip.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
this.primereact = this.primereact || {};
|
|
2
|
-
this.primereact.chip = (function (exports, React, utils) {
|
|
2
|
+
this.primereact.chip = (function (exports, React, utils, timescircle) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopNamespace(e) {
|
|
@@ -37,6 +37,47 @@ this.primereact.chip = (function (exports, React, utils) {
|
|
|
37
37
|
return _extends.apply(this, arguments);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
function _typeof(obj) {
|
|
41
|
+
"@babel/helpers - typeof";
|
|
42
|
+
|
|
43
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
44
|
+
return typeof obj;
|
|
45
|
+
} : function (obj) {
|
|
46
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
47
|
+
}, _typeof(obj);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function _toPrimitive(input, hint) {
|
|
51
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
52
|
+
var prim = input[Symbol.toPrimitive];
|
|
53
|
+
if (prim !== undefined) {
|
|
54
|
+
var res = prim.call(input, hint || "default");
|
|
55
|
+
if (_typeof(res) !== "object") return res;
|
|
56
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
57
|
+
}
|
|
58
|
+
return (hint === "string" ? String : Number)(input);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function _toPropertyKey(arg) {
|
|
62
|
+
var key = _toPrimitive(arg, "string");
|
|
63
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function _defineProperty(obj, key, value) {
|
|
67
|
+
key = _toPropertyKey(key);
|
|
68
|
+
if (key in obj) {
|
|
69
|
+
Object.defineProperty(obj, key, {
|
|
70
|
+
value: value,
|
|
71
|
+
enumerable: true,
|
|
72
|
+
configurable: true,
|
|
73
|
+
writable: true
|
|
74
|
+
});
|
|
75
|
+
} else {
|
|
76
|
+
obj[key] = value;
|
|
77
|
+
}
|
|
78
|
+
return obj;
|
|
79
|
+
}
|
|
80
|
+
|
|
40
81
|
function _arrayWithHoles(arr) {
|
|
41
82
|
if (Array.isArray(arr)) return arr;
|
|
42
83
|
}
|
|
@@ -99,7 +140,7 @@ this.primereact.chip = (function (exports, React, utils) {
|
|
|
99
140
|
icon: null,
|
|
100
141
|
image: null,
|
|
101
142
|
removable: false,
|
|
102
|
-
removeIcon:
|
|
143
|
+
removeIcon: null,
|
|
103
144
|
className: null,
|
|
104
145
|
style: null,
|
|
105
146
|
template: null,
|
|
@@ -116,6 +157,8 @@ this.primereact.chip = (function (exports, React, utils) {
|
|
|
116
157
|
}
|
|
117
158
|
};
|
|
118
159
|
|
|
160
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
161
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
119
162
|
var Chip = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
120
163
|
var props = ChipBase.getProps(inProps);
|
|
121
164
|
var elementRef = React__namespace.useRef(null);
|
|
@@ -137,6 +180,14 @@ this.primereact.chip = (function (exports, React, utils) {
|
|
|
137
180
|
};
|
|
138
181
|
var createContent = function createContent() {
|
|
139
182
|
var content = [];
|
|
183
|
+
var iconProps = {
|
|
184
|
+
key: 'removeIcon',
|
|
185
|
+
tabIndex: 0,
|
|
186
|
+
className: 'p-chip-remove-icon',
|
|
187
|
+
onClick: close,
|
|
188
|
+
onKeyDown: onKeyDown
|
|
189
|
+
};
|
|
190
|
+
var icon = props.removeIcon || /*#__PURE__*/React__namespace.createElement(timescircle.TimesCircleIcon, iconProps);
|
|
140
191
|
if (props.image) {
|
|
141
192
|
content.push( /*#__PURE__*/React__namespace.createElement("img", {
|
|
142
193
|
key: "image",
|
|
@@ -159,13 +210,7 @@ this.primereact.chip = (function (exports, React, utils) {
|
|
|
159
210
|
}, props.label));
|
|
160
211
|
}
|
|
161
212
|
if (props.removable) {
|
|
162
|
-
content.push(utils.IconUtils.getJSXIcon(
|
|
163
|
-
key: 'removeIcon',
|
|
164
|
-
tabIndex: 0,
|
|
165
|
-
className: 'p-chip-remove-icon',
|
|
166
|
-
onClick: close,
|
|
167
|
-
onKeyDown: onKeyDown
|
|
168
|
-
}, {
|
|
213
|
+
content.push(utils.IconUtils.getJSXIcon(icon, _objectSpread({}, iconProps), {
|
|
169
214
|
props: props
|
|
170
215
|
}));
|
|
171
216
|
}
|
|
@@ -201,4 +246,4 @@ this.primereact.chip = (function (exports, React, utils) {
|
|
|
201
246
|
|
|
202
247
|
return exports;
|
|
203
248
|
|
|
204
|
-
})({}, React, primereact.utils);
|
|
249
|
+
})({}, React, primereact.utils, primereact.icons/timescircle);
|
package/chip/chip.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.chip=function(e,t,r){"use strict";function
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.chip=function(e,t,r,n){"use strict";function o(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var i=o(t);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l.apply(this,arguments)}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function a(e,t){if("object"!==c(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function u(e){var t=a(e,"string");return"symbol"===c(t)?t:String(t)}function s(e,t,r){return(t=u(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e){if(Array.isArray(e))return e}function f(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,l,c=[],a=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;a=!1}else for(;!(a=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{if(!a&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(u)throw o}}return c}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function b(e,t){if(e){if("string"==typeof e)return m(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(e,t):void 0}}function y(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var g={defaultProps:{__TYPE:"Chip",label:null,icon:null,image:null,removable:!1,removeIcon:null,className:null,style:null,template:null,imageAlt:"chip",onImageError:null,onRemove:null,children:void 0},getProps:function(e){return r.ObjectUtils.getMergedProps(e,g.defaultProps)},getOtherProps:function(e){return r.ObjectUtils.getDiffProps(e,g.defaultProps)}};function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var O=i.memo(i.forwardRef((function(e,t){var o,c,a,u,s,m=g.getProps(e),v=i.useRef(null),O=i.useState(!0),d=(c=2,p(o=O)||f(o,c)||b(o,c)||y()),j=d[0],P=d[1],S=function(e){13===e.keyCode&&w(e)},w=function(e){P(!1),m.onRemove&&m.onRemove(e)},E=function(){var e=[],t={key:"removeIcon",tabIndex:0,className:"p-chip-remove-icon",onClick:w,onKeyDown:S},o=m.removeIcon||i.createElement(n.TimesCircleIcon,t);return m.image?e.push(i.createElement("img",{key:"image",src:m.image,alt:m.imageAlt,onError:m.onImageError})):m.icon&&e.push(r.IconUtils.getJSXIcon(m.icon,{key:"icon",className:"p-chip-icon"},{props:m})),m.label&&e.push(i.createElement("span",{key:"label",className:"p-chip-text"},m.label)),m.removable&&e.push(r.IconUtils.getJSXIcon(o,h({},t),{props:m})),e};return i.useImperativeHandle(t,(function(){return{props:m,getElement:function(){return v.current}}})),j&&(a=g.getOtherProps(m),u=r.classNames("p-chip p-component",{"p-chip-image":null!=m.image},m.className),s=m.template?r.ObjectUtils.getJSXElement(m.template,m):E(),i.createElement("div",l({ref:v,className:u,style:m.style},a),s))})));return O.displayName="Chip",e.Chip=O,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.utils,primereact.icons/timescircle);
|
package/chips/chips.cjs.js
CHANGED
|
@@ -6,6 +6,7 @@ var React = require('react');
|
|
|
6
6
|
var keyfilter = require('primereact/keyfilter');
|
|
7
7
|
var tooltip = require('primereact/tooltip');
|
|
8
8
|
var utils = require('primereact/utils');
|
|
9
|
+
var timescircle = require('primereact/icons/timescircle');
|
|
9
10
|
|
|
10
11
|
function _interopNamespace(e) {
|
|
11
12
|
if (e && e.__esModule) return e;
|
|
@@ -42,6 +43,47 @@ function _extends() {
|
|
|
42
43
|
return _extends.apply(this, arguments);
|
|
43
44
|
}
|
|
44
45
|
|
|
46
|
+
function _typeof(obj) {
|
|
47
|
+
"@babel/helpers - typeof";
|
|
48
|
+
|
|
49
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
50
|
+
return typeof obj;
|
|
51
|
+
} : function (obj) {
|
|
52
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
53
|
+
}, _typeof(obj);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function _toPrimitive(input, hint) {
|
|
57
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
58
|
+
var prim = input[Symbol.toPrimitive];
|
|
59
|
+
if (prim !== undefined) {
|
|
60
|
+
var res = prim.call(input, hint || "default");
|
|
61
|
+
if (_typeof(res) !== "object") return res;
|
|
62
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
63
|
+
}
|
|
64
|
+
return (hint === "string" ? String : Number)(input);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function _toPropertyKey(arg) {
|
|
68
|
+
var key = _toPrimitive(arg, "string");
|
|
69
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function _defineProperty(obj, key, value) {
|
|
73
|
+
key = _toPropertyKey(key);
|
|
74
|
+
if (key in obj) {
|
|
75
|
+
Object.defineProperty(obj, key, {
|
|
76
|
+
value: value,
|
|
77
|
+
enumerable: true,
|
|
78
|
+
configurable: true,
|
|
79
|
+
writable: true
|
|
80
|
+
});
|
|
81
|
+
} else {
|
|
82
|
+
obj[key] = value;
|
|
83
|
+
}
|
|
84
|
+
return obj;
|
|
85
|
+
}
|
|
86
|
+
|
|
45
87
|
function _arrayLikeToArray(arr, len) {
|
|
46
88
|
if (len == null || len > arr.length) len = arr.length;
|
|
47
89
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -126,6 +168,7 @@ var ChipsBase = {
|
|
|
126
168
|
disabled: null,
|
|
127
169
|
readOnly: false,
|
|
128
170
|
removable: true,
|
|
171
|
+
removeIcon: null,
|
|
129
172
|
style: null,
|
|
130
173
|
className: null,
|
|
131
174
|
tooltip: null,
|
|
@@ -152,6 +195,8 @@ var ChipsBase = {
|
|
|
152
195
|
}
|
|
153
196
|
};
|
|
154
197
|
|
|
198
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
199
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
155
200
|
var Chips = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
156
201
|
var props = ChipsBase.getProps(inProps);
|
|
157
202
|
var _React$useState = React__namespace.useState(false),
|
|
@@ -327,13 +372,18 @@ var Chips = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
|
|
|
327
372
|
utils.ObjectUtils.combinedRefs(inputRef, props.inputRef);
|
|
328
373
|
}, [inputRef, props.inputRef]);
|
|
329
374
|
var createRemoveIcon = function createRemoveIcon(value, index) {
|
|
375
|
+
var iconProps = {
|
|
376
|
+
className: 'p-chips-token-icon',
|
|
377
|
+
onClick: function onClick(event) {
|
|
378
|
+
return removeItem(event, index);
|
|
379
|
+
}
|
|
380
|
+
};
|
|
381
|
+
var icon = props.removeIcon || /*#__PURE__*/React__namespace.createElement(timescircle.TimesCircleIcon, iconProps);
|
|
382
|
+
var removeIcon = utils.IconUtils.getJSXIcon(icon, _objectSpread({}, iconProps), {
|
|
383
|
+
props: props
|
|
384
|
+
});
|
|
330
385
|
if (!props.disabled && !props.readOnly && isRemovable(value, index)) {
|
|
331
|
-
return
|
|
332
|
-
className: "p-chips-token-icon pi pi-times-circle",
|
|
333
|
-
onClick: function onClick(event) {
|
|
334
|
-
return removeItem(event, index);
|
|
335
|
-
}
|
|
336
|
-
});
|
|
386
|
+
return removeIcon;
|
|
337
387
|
}
|
|
338
388
|
return null;
|
|
339
389
|
};
|
package/chips/chips.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/keyfilter"),n=require("primereact/tooltip"),r=require("primereact/utils");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/keyfilter"),n=require("primereact/tooltip"),r=require("primereact/utils"),l=require("primereact/icons/timescircle");function o(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var a=o(e);function i(){return i=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},i.apply(this,arguments)}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e,t){if("object"!==u(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function s(e){var t=c(e,"string");return"symbol"===u(t)?t:String(t)}function p(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e){if(Array.isArray(e))return f(e)}function d(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function y(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}function v(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(e){return m(e)||d(e)||y(e)||v()}function g(e){if(Array.isArray(e))return e}function h(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,l,o,a,i=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(i.push(r.value),i.length!==t);u=!0);}catch(e){c=!0,l=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw l}}return i}}function O(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var j={defaultProps:{__TYPE:"Chips",id:null,inputRef:null,inputId:null,name:null,placeholder:null,value:null,max:null,disabled:null,readOnly:!1,removable:!0,removeIcon:null,style:null,className:null,tooltip:null,tooltipOptions:null,ariaLabelledBy:null,separator:null,allowDuplicate:!0,itemTemplate:null,keyfilter:null,addOnBlur:null,onAdd:null,onRemove:null,onChange:null,onFocus:null,onBlur:null,onKeyDown:null,children:void 0},getProps:function(e){return r.ObjectUtils.getMergedProps(e,j.defaultProps)},getOtherProps:function(e){return r.ObjectUtils.getDiffProps(e,j.defaultProps)}};function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var E=a.memo(a.forwardRef((function(e,o){var u,c,s=j.getProps(e),p=a.useState(!1),f=(c=2,g(u=p)||h(u,c)||y(u,c)||O()),m=f[0],d=f[1],v=a.useRef(null),P=a.useRef(null),E=a.useRef(s.inputRef),D=function(e,t){if(!s.disabled||!s.readOnly){var n=b(s.value),r=n.splice(t,1);B(r,t)&&(s.onRemove&&s.onRemove({originalEvent:e,value:r}),s.onChange&&s.onChange({originalEvent:e,value:n,stopPropagation:function(){},preventDefault:function(){},target:{name:s.name,id:s.id,value:n}}))}},S=function(e,t,n){if(t&&t.trim().length){var r=s.value?b(s.value):[];if(s.allowDuplicate||-1===r.indexOf(t)){var l=!0;s.onAdd&&(l=s.onAdd({originalEvent:e,value:t})),!1!==l&&r.push(t)}A(e,r,n)}},k=function(){r.DomHandler.focus(E.current)},x=function(e){var n=e.target.value,l=s.value||[];if(s.onKeyDown&&s.onKeyDown(e),!e.defaultPrevented)switch(e.key){case"Backspace":0===E.current.value.length&&l.length>0&&D(e,l.length-1);break;case"Enter":n&&n.trim().length&&(!s.max||s.max>l.length)&&S(e,n,!0);break;default:s.keyfilter&&t.KeyFilter.onKeyPress(e,s.keyfilter),C()?e.preventDefault():","===s.separator&&(e.key===s.separator||r.DomHandler.isAndroid()&&229===e.which)&&S(e,n,!0)}},A=function(e,t,n){s.onChange&&s.onChange({originalEvent:e,value:t,stopPropagation:function(){},preventDefault:function(){},target:{name:s.name,id:s.id,value:t}}),E.current.value="",n&&e.preventDefault()},I=function(e){if(s.separator){var n=(e.clipboardData||window.clipboardData).getData("Text");if(s.keyfilter&&t.KeyFilter.onPaste(e,s.keyfilter),n){var r=s.value||[],l=n.split(s.separator);l=l.filter((function(e){return(s.allowDuplicate||-1===r.indexOf(e))&&e.trim().length})),r=[].concat(b(r),b(l)),A(e,r,!0)}}},N=function(e){d(!0),s.onFocus&&s.onFocus(e)},R=function(e){if(s.addOnBlur){var t=e.target.value,n=s.value||[];t&&t.trim().length&&(!s.max||s.max>n.length)&&S(e,t,!0)}d(!1),s.onBlur&&s.onBlur(e)},C=function(){return s.max&&s.value&&s.max===s.value.length},T=E.current&&E.current.value,U=a.useMemo((function(){return r.ObjectUtils.isNotEmpty(s.value)||r.ObjectUtils.isNotEmpty(T)}),[s.value,T]),B=function(e,t){return r.ObjectUtils.getPropValue(s.removable,{value:e,index:t,props:s})};a.useImperativeHandle(o,(function(){return{props:s,focus:function(){return r.DomHandler.focus(E.current)},getElement:function(){return v.current},getInput:function(){return E.current}}})),a.useEffect((function(){r.ObjectUtils.combinedRefs(E,s.inputRef)}),[E,s.inputRef]);var K=function(e,t){var n={className:"p-chips-token-icon",onClick:function(e){return D(e,t)}},o=r.IconUtils.getJSXIcon(s.removeIcon||a.createElement(l.TimesCircleIcon,n),w({},n),{props:s});return s.disabled||s.readOnly||!B(e,t)?null:o},F=function(e,t){var n=s.itemTemplate?s.itemTemplate(e):e,r=a.createElement("span",{className:"p-chips-token-label"},n),l=K(e,t);return a.createElement("li",{key:t,className:"p-chips-token p-highlight"},r,l)},_=r.ObjectUtils.isNotEmpty(s.tooltip),q=j.getOtherProps(s),H=r.ObjectUtils.reduceKeys(q,r.DomHandler.ARIA_PROPS),M=r.classNames("p-chips p-component p-inputwrapper",{"p-inputwrapper-filled":U,"p-inputwrapper-focus":m},s.className),z=function(){var e=r.classNames("p-inputtext p-chips-multiple-container",{"p-disabled":s.disabled,"p-focus":m}),t=s.value?s.value.map(F):null,n=a.createElement("li",{className:"p-chips-input-token"},a.createElement("input",i({ref:E,id:s.inputId,placeholder:s.placeholder,type:"text",name:s.name,disabled:s.disabled||C(),onKeyDown:x,onPaste:I,onFocus:N,onBlur:R,readOnly:s.readOnly},H)));return a.createElement("ul",{ref:P,className:e,onClick:k},t,n)}();return a.createElement(a.Fragment,null,a.createElement("div",i({ref:v,id:s.id,className:M,style:s.style},q),z),_&&a.createElement(n.Tooltip,i({target:E,content:s.tooltip},s.tooltipOptions)))})));E.displayName="Chips",exports.Chips=E;
|
package/chips/chips.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import * as React from 'react';
|
|
|
11
11
|
import { KeyFilterType } from '../keyfilter';
|
|
12
12
|
import { TooltipOptions } from '../tooltip/tooltipoptions';
|
|
13
13
|
import { FormEvent } from '../ts-helpers';
|
|
14
|
+
import { IconType } from '../utils/utils';
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* @group Others
|
|
@@ -113,6 +114,10 @@ export interface ChipsProps extends Omit<React.DetailedHTMLProps<React.InputHTML
|
|
|
113
114
|
* @defaultValue true
|
|
114
115
|
*/
|
|
115
116
|
removable?: boolean | ((options: ChipsRemovableOptions) => boolean);
|
|
117
|
+
/**
|
|
118
|
+
* Icon of the remove element.
|
|
119
|
+
*/
|
|
120
|
+
removeIcon?: IconType<ChipsProps> | undefined;
|
|
116
121
|
/**
|
|
117
122
|
* Content of the tooltip.
|
|
118
123
|
*/
|
package/chips/chips.esm.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { KeyFilter } from 'primereact/keyfilter';
|
|
3
3
|
import { Tooltip } from 'primereact/tooltip';
|
|
4
|
-
import { ObjectUtils, DomHandler, classNames } from 'primereact/utils';
|
|
4
|
+
import { ObjectUtils, DomHandler, classNames, IconUtils } from 'primereact/utils';
|
|
5
|
+
import { TimesCircleIcon } from 'primereact/icons/timescircle';
|
|
5
6
|
|
|
6
7
|
function _extends() {
|
|
7
8
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
@@ -18,6 +19,47 @@ function _extends() {
|
|
|
18
19
|
return _extends.apply(this, arguments);
|
|
19
20
|
}
|
|
20
21
|
|
|
22
|
+
function _typeof(obj) {
|
|
23
|
+
"@babel/helpers - typeof";
|
|
24
|
+
|
|
25
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
26
|
+
return typeof obj;
|
|
27
|
+
} : function (obj) {
|
|
28
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
29
|
+
}, _typeof(obj);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function _toPrimitive(input, hint) {
|
|
33
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
34
|
+
var prim = input[Symbol.toPrimitive];
|
|
35
|
+
if (prim !== undefined) {
|
|
36
|
+
var res = prim.call(input, hint || "default");
|
|
37
|
+
if (_typeof(res) !== "object") return res;
|
|
38
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
39
|
+
}
|
|
40
|
+
return (hint === "string" ? String : Number)(input);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function _toPropertyKey(arg) {
|
|
44
|
+
var key = _toPrimitive(arg, "string");
|
|
45
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function _defineProperty(obj, key, value) {
|
|
49
|
+
key = _toPropertyKey(key);
|
|
50
|
+
if (key in obj) {
|
|
51
|
+
Object.defineProperty(obj, key, {
|
|
52
|
+
value: value,
|
|
53
|
+
enumerable: true,
|
|
54
|
+
configurable: true,
|
|
55
|
+
writable: true
|
|
56
|
+
});
|
|
57
|
+
} else {
|
|
58
|
+
obj[key] = value;
|
|
59
|
+
}
|
|
60
|
+
return obj;
|
|
61
|
+
}
|
|
62
|
+
|
|
21
63
|
function _arrayLikeToArray(arr, len) {
|
|
22
64
|
if (len == null || len > arr.length) len = arr.length;
|
|
23
65
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -102,6 +144,7 @@ var ChipsBase = {
|
|
|
102
144
|
disabled: null,
|
|
103
145
|
readOnly: false,
|
|
104
146
|
removable: true,
|
|
147
|
+
removeIcon: null,
|
|
105
148
|
style: null,
|
|
106
149
|
className: null,
|
|
107
150
|
tooltip: null,
|
|
@@ -128,6 +171,8 @@ var ChipsBase = {
|
|
|
128
171
|
}
|
|
129
172
|
};
|
|
130
173
|
|
|
174
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
175
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
131
176
|
var Chips = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
132
177
|
var props = ChipsBase.getProps(inProps);
|
|
133
178
|
var _React$useState = React.useState(false),
|
|
@@ -303,13 +348,18 @@ var Chips = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inP
|
|
|
303
348
|
ObjectUtils.combinedRefs(inputRef, props.inputRef);
|
|
304
349
|
}, [inputRef, props.inputRef]);
|
|
305
350
|
var createRemoveIcon = function createRemoveIcon(value, index) {
|
|
351
|
+
var iconProps = {
|
|
352
|
+
className: 'p-chips-token-icon',
|
|
353
|
+
onClick: function onClick(event) {
|
|
354
|
+
return removeItem(event, index);
|
|
355
|
+
}
|
|
356
|
+
};
|
|
357
|
+
var icon = props.removeIcon || /*#__PURE__*/React.createElement(TimesCircleIcon, iconProps);
|
|
358
|
+
var removeIcon = IconUtils.getJSXIcon(icon, _objectSpread({}, iconProps), {
|
|
359
|
+
props: props
|
|
360
|
+
});
|
|
306
361
|
if (!props.disabled && !props.readOnly && isRemovable(value, index)) {
|
|
307
|
-
return
|
|
308
|
-
className: "p-chips-token-icon pi pi-times-circle",
|
|
309
|
-
onClick: function onClick(event) {
|
|
310
|
-
return removeItem(event, index);
|
|
311
|
-
}
|
|
312
|
-
});
|
|
362
|
+
return removeIcon;
|
|
313
363
|
}
|
|
314
364
|
return null;
|
|
315
365
|
};
|
package/chips/chips.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{KeyFilter as t}from"primereact/keyfilter";import{Tooltip as n}from"primereact/tooltip";import{ObjectUtils as r,DomHandler as
|
|
1
|
+
import*as e from"react";import{KeyFilter as t}from"primereact/keyfilter";import{Tooltip as n}from"primereact/tooltip";import{ObjectUtils as r,DomHandler as o,classNames as l,IconUtils as a}from"primereact/utils";import{TimesCircleIcon as i}from"primereact/icons/timescircle";function u(){return u=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},u.apply(this,arguments)}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function p(e,t){if("object"!==c(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function f(e){var t=p(e,"string");return"symbol"===c(t)?t:String(t)}function s(e,t,n){return(t=f(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(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){if(Array.isArray(e))return m(e)}function y(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function v(e,t){if(e){if("string"==typeof e)return m(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)?m(e,t):void 0}}function b(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function g(e){return d(e)||y(e)||v(e)||b()}function h(e){if(Array.isArray(e))return e}function O(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,l,a,i=[],u=!0,c=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=l.call(n)).done)&&(i.push(r.value),i.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return i}}function w(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var P={defaultProps:{__TYPE:"Chips",id:null,inputRef:null,inputId:null,name:null,placeholder:null,value:null,max:null,disabled:null,readOnly:!1,removable:!0,removeIcon:null,style:null,className:null,tooltip:null,tooltipOptions:null,ariaLabelledBy:null,separator:null,allowDuplicate:!0,itemTemplate:null,keyfilter:null,addOnBlur:null,onAdd:null,onRemove:null,onChange:null,onFocus:null,onBlur:null,onKeyDown:null,children:void 0},getProps:function(e){return r.getMergedProps(e,P.defaultProps)},getOtherProps:function(e){return r.getDiffProps(e,P.defaultProps)}};function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var S=e.memo(e.forwardRef((function(c,p){var f,s,m=P.getProps(c),d=e.useState(!1),y=(s=2,h(f=d)||O(f,s)||v(f,s)||w()),b=y[0],E=y[1],S=e.useRef(null),k=e.useRef(null),D=e.useRef(m.inputRef),x=function(e,t){if(!m.disabled||!m.readOnly){var n=g(m.value),r=n.splice(t,1);_(r,t)&&(m.onRemove&&m.onRemove({originalEvent:e,value:r}),m.onChange&&m.onChange({originalEvent:e,value:n,stopPropagation:function(){},preventDefault:function(){},target:{name:m.name,id:m.id,value:n}}))}},A=function(e,t,n){if(t&&t.trim().length){var r=m.value?g(m.value):[];if(m.allowDuplicate||-1===r.indexOf(t)){var o=!0;m.onAdd&&(o=m.onAdd({originalEvent:e,value:t})),!1!==o&&r.push(t)}N(e,r,n)}},R=function(){o.focus(D.current)},I=function(e){var n=e.target.value,r=m.value||[];if(m.onKeyDown&&m.onKeyDown(e),!e.defaultPrevented)switch(e.key){case"Backspace":0===D.current.value.length&&r.length>0&&x(e,r.length-1);break;case"Enter":n&&n.trim().length&&(!m.max||m.max>r.length)&&A(e,n,!0);break;default:m.keyfilter&&t.onKeyPress(e,m.keyfilter),K()?e.preventDefault():","===m.separator&&(e.key===m.separator||o.isAndroid()&&229===e.which)&&A(e,n,!0)}},N=function(e,t,n){m.onChange&&m.onChange({originalEvent:e,value:t,stopPropagation:function(){},preventDefault:function(){},target:{name:m.name,id:m.id,value:t}}),D.current.value="",n&&e.preventDefault()},C=function(e){if(m.separator){var n=(e.clipboardData||window.clipboardData).getData("Text");if(m.keyfilter&&t.onPaste(e,m.keyfilter),n){var r=m.value||[],o=n.split(m.separator);o=o.filter((function(e){return(m.allowDuplicate||-1===r.indexOf(e))&&e.trim().length})),r=[].concat(g(r),g(o)),N(e,r,!0)}}},B=function(e){E(!0),m.onFocus&&m.onFocus(e)},T=function(e){if(m.addOnBlur){var t=e.target.value,n=m.value||[];t&&t.trim().length&&(!m.max||m.max>n.length)&&A(e,t,!0)}E(!1),m.onBlur&&m.onBlur(e)},K=function(){return m.max&&m.value&&m.max===m.value.length},F=D.current&&D.current.value,M=e.useMemo((function(){return r.isNotEmpty(m.value)||r.isNotEmpty(F)}),[m.value,F]),_=function(e,t){return r.getPropValue(m.removable,{value:e,index:t,props:m})};e.useImperativeHandle(p,(function(){return{props:m,focus:function(){return o.focus(D.current)},getElement:function(){return S.current},getInput:function(){return D.current}}})),e.useEffect((function(){r.combinedRefs(D,m.inputRef)}),[D,m.inputRef]);var H=function(t,n){var r={className:"p-chips-token-icon",onClick:function(e){return x(e,n)}},o=a.getJSXIcon(m.removeIcon||e.createElement(i,r),j({},r),{props:m});return m.disabled||m.readOnly||!_(t,n)?null:o},J=function(t,n){var r=m.itemTemplate?m.itemTemplate(t):t,o=e.createElement("span",{className:"p-chips-token-label"},r),l=H(t,n);return e.createElement("li",{key:n,className:"p-chips-token p-highlight"},o,l)},L=r.isNotEmpty(m.tooltip),U=P.getOtherProps(m),V=r.reduceKeys(U,o.ARIA_PROPS),X=l("p-chips p-component p-inputwrapper",{"p-inputwrapper-filled":M,"p-inputwrapper-focus":b},m.className),Y=function(){var t=l("p-inputtext p-chips-multiple-container",{"p-disabled":m.disabled,"p-focus":b}),n=m.value?m.value.map(J):null,r=e.createElement("li",{className:"p-chips-input-token"},e.createElement("input",u({ref:D,id:m.inputId,placeholder:m.placeholder,type:"text",name:m.name,disabled:m.disabled||K(),onKeyDown:I,onPaste:C,onFocus:B,onBlur:T,readOnly:m.readOnly},V)));return e.createElement("ul",{ref:k,className:t,onClick:R},n,r)}();return e.createElement(e.Fragment,null,e.createElement("div",u({ref:S,id:m.id,className:X,style:m.style},U),Y),L&&e.createElement(n,u({target:D,content:m.tooltip},m.tooltipOptions)))})));S.displayName="Chips";export{S as Chips};
|
package/chips/chips.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
this.primereact = this.primereact || {};
|
|
2
|
-
this.primereact.chips = (function (exports, React, keyfilter, tooltip, utils) {
|
|
2
|
+
this.primereact.chips = (function (exports, React, keyfilter, tooltip, utils, timescircle) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopNamespace(e) {
|
|
@@ -37,6 +37,47 @@ this.primereact.chips = (function (exports, React, keyfilter, tooltip, utils) {
|
|
|
37
37
|
return _extends.apply(this, arguments);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
function _typeof(obj) {
|
|
41
|
+
"@babel/helpers - typeof";
|
|
42
|
+
|
|
43
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
44
|
+
return typeof obj;
|
|
45
|
+
} : function (obj) {
|
|
46
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
47
|
+
}, _typeof(obj);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function _toPrimitive(input, hint) {
|
|
51
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
52
|
+
var prim = input[Symbol.toPrimitive];
|
|
53
|
+
if (prim !== undefined) {
|
|
54
|
+
var res = prim.call(input, hint || "default");
|
|
55
|
+
if (_typeof(res) !== "object") return res;
|
|
56
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
57
|
+
}
|
|
58
|
+
return (hint === "string" ? String : Number)(input);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function _toPropertyKey(arg) {
|
|
62
|
+
var key = _toPrimitive(arg, "string");
|
|
63
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function _defineProperty(obj, key, value) {
|
|
67
|
+
key = _toPropertyKey(key);
|
|
68
|
+
if (key in obj) {
|
|
69
|
+
Object.defineProperty(obj, key, {
|
|
70
|
+
value: value,
|
|
71
|
+
enumerable: true,
|
|
72
|
+
configurable: true,
|
|
73
|
+
writable: true
|
|
74
|
+
});
|
|
75
|
+
} else {
|
|
76
|
+
obj[key] = value;
|
|
77
|
+
}
|
|
78
|
+
return obj;
|
|
79
|
+
}
|
|
80
|
+
|
|
40
81
|
function _arrayLikeToArray(arr, len) {
|
|
41
82
|
if (len == null || len > arr.length) len = arr.length;
|
|
42
83
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -121,6 +162,7 @@ this.primereact.chips = (function (exports, React, keyfilter, tooltip, utils) {
|
|
|
121
162
|
disabled: null,
|
|
122
163
|
readOnly: false,
|
|
123
164
|
removable: true,
|
|
165
|
+
removeIcon: null,
|
|
124
166
|
style: null,
|
|
125
167
|
className: null,
|
|
126
168
|
tooltip: null,
|
|
@@ -147,6 +189,8 @@ this.primereact.chips = (function (exports, React, keyfilter, tooltip, utils) {
|
|
|
147
189
|
}
|
|
148
190
|
};
|
|
149
191
|
|
|
192
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
193
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
150
194
|
var Chips = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
151
195
|
var props = ChipsBase.getProps(inProps);
|
|
152
196
|
var _React$useState = React__namespace.useState(false),
|
|
@@ -322,13 +366,18 @@ this.primereact.chips = (function (exports, React, keyfilter, tooltip, utils) {
|
|
|
322
366
|
utils.ObjectUtils.combinedRefs(inputRef, props.inputRef);
|
|
323
367
|
}, [inputRef, props.inputRef]);
|
|
324
368
|
var createRemoveIcon = function createRemoveIcon(value, index) {
|
|
369
|
+
var iconProps = {
|
|
370
|
+
className: 'p-chips-token-icon',
|
|
371
|
+
onClick: function onClick(event) {
|
|
372
|
+
return removeItem(event, index);
|
|
373
|
+
}
|
|
374
|
+
};
|
|
375
|
+
var icon = props.removeIcon || /*#__PURE__*/React__namespace.createElement(timescircle.TimesCircleIcon, iconProps);
|
|
376
|
+
var removeIcon = utils.IconUtils.getJSXIcon(icon, _objectSpread({}, iconProps), {
|
|
377
|
+
props: props
|
|
378
|
+
});
|
|
325
379
|
if (!props.disabled && !props.readOnly && isRemovable(value, index)) {
|
|
326
|
-
return
|
|
327
|
-
className: "p-chips-token-icon pi pi-times-circle",
|
|
328
|
-
onClick: function onClick(event) {
|
|
329
|
-
return removeItem(event, index);
|
|
330
|
-
}
|
|
331
|
-
});
|
|
380
|
+
return removeIcon;
|
|
332
381
|
}
|
|
333
382
|
return null;
|
|
334
383
|
};
|
|
@@ -402,4 +451,4 @@ this.primereact.chips = (function (exports, React, keyfilter, tooltip, utils) {
|
|
|
402
451
|
|
|
403
452
|
return exports;
|
|
404
453
|
|
|
405
|
-
})({}, React, primereact.keyfilter, primereact.tooltip, primereact.utils);
|
|
454
|
+
})({}, React, primereact.keyfilter, primereact.tooltip, primereact.utils, primereact.icons/timescircle);
|
package/chips/chips.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.chips=function(e,t,n,r,l){"use strict";function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var i=a(t);function
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.chips=function(e,t,n,r,l,o){"use strict";function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var i=a(t);function u(){return u=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},u.apply(this,arguments)}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function s(e,t){if("object"!==c(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function p(e){var t=s(e,"string");return"symbol"===c(t)?t:String(t)}function f(e,t,n){return(t=p(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(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){if(Array.isArray(e))return m(e)}function y(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function v(e,t){if(e){if("string"==typeof e)return m(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)?m(e,t):void 0}}function b(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function g(e){return d(e)||y(e)||v(e)||b()}function h(e){if(Array.isArray(e))return e}function O(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,l,o,a,i=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(i.push(r.value),i.length!==t);u=!0);}catch(e){c=!0,l=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw l}}return i}}function j(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var P={defaultProps:{__TYPE:"Chips",id:null,inputRef:null,inputId:null,name:null,placeholder:null,value:null,max:null,disabled:null,readOnly:!1,removable:!0,removeIcon:null,style:null,className:null,tooltip:null,tooltipOptions:null,ariaLabelledBy:null,separator:null,allowDuplicate:!0,itemTemplate:null,keyfilter:null,addOnBlur:null,onAdd:null,onRemove:null,onChange:null,onFocus:null,onBlur:null,onKeyDown:null,children:void 0},getProps:function(e){return l.ObjectUtils.getMergedProps(e,P.defaultProps)},getOtherProps:function(e){return l.ObjectUtils.getDiffProps(e,P.defaultProps)}};function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){f(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var D=i.memo(i.forwardRef((function(e,t){var a,c,s=P.getProps(e),p=i.useState(!1),f=(c=2,h(a=p)||O(a,c)||v(a,c)||j()),m=f[0],d=f[1],y=i.useRef(null),b=i.useRef(null),w=i.useRef(s.inputRef),D=function(e,t){if(!s.disabled||!s.readOnly){var n=g(s.value),r=n.splice(t,1);B(r,t)&&(s.onRemove&&s.onRemove({originalEvent:e,value:r}),s.onChange&&s.onChange({originalEvent:e,value:n,stopPropagation:function(){},preventDefault:function(){},target:{name:s.name,id:s.id,value:n}}))}},S=function(e,t,n){if(t&&t.trim().length){var r=s.value?g(s.value):[];if(s.allowDuplicate||-1===r.indexOf(t)){var l=!0;s.onAdd&&(l=s.onAdd({originalEvent:e,value:t})),!1!==l&&r.push(t)}I(e,r,n)}},k=function(){l.DomHandler.focus(w.current)},A=function(e){var t=e.target.value,r=s.value||[];if(s.onKeyDown&&s.onKeyDown(e),!e.defaultPrevented)switch(e.key){case"Backspace":0===w.current.value.length&&r.length>0&&D(e,r.length-1);break;case"Enter":t&&t.trim().length&&(!s.max||s.max>r.length)&&S(e,t,!0);break;default:s.keyfilter&&n.KeyFilter.onKeyPress(e,s.keyfilter),C()?e.preventDefault():","===s.separator&&(e.key===s.separator||l.DomHandler.isAndroid()&&229===e.which)&&S(e,t,!0)}},I=function(e,t,n){s.onChange&&s.onChange({originalEvent:e,value:t,stopPropagation:function(){},preventDefault:function(){},target:{name:s.name,id:s.id,value:t}}),w.current.value="",n&&e.preventDefault()},N=function(e){if(s.separator){var t=(e.clipboardData||window.clipboardData).getData("Text");if(s.keyfilter&&n.KeyFilter.onPaste(e,s.keyfilter),t){var r=s.value||[],l=t.split(s.separator);l=l.filter((function(e){return(s.allowDuplicate||-1===r.indexOf(e))&&e.trim().length})),r=[].concat(g(r),g(l)),I(e,r,!0)}}},R=function(e){d(!0),s.onFocus&&s.onFocus(e)},x=function(e){if(s.addOnBlur){var t=e.target.value,n=s.value||[];t&&t.trim().length&&(!s.max||s.max>n.length)&&S(e,t,!0)}d(!1),s.onBlur&&s.onBlur(e)},C=function(){return s.max&&s.value&&s.max===s.value.length},T=w.current&&w.current.value,U=i.useMemo((function(){return l.ObjectUtils.isNotEmpty(s.value)||l.ObjectUtils.isNotEmpty(T)}),[s.value,T]),B=function(e,t){return l.ObjectUtils.getPropValue(s.removable,{value:e,index:t,props:s})};i.useImperativeHandle(t,(function(){return{props:s,focus:function(){return l.DomHandler.focus(w.current)},getElement:function(){return y.current},getInput:function(){return w.current}}})),i.useEffect((function(){l.ObjectUtils.combinedRefs(w,s.inputRef)}),[w,s.inputRef]);var K=function(e,t){var n={className:"p-chips-token-icon",onClick:function(e){return D(e,t)}},r=l.IconUtils.getJSXIcon(s.removeIcon||i.createElement(o.TimesCircleIcon,n),E({},n),{props:s});return s.disabled||s.readOnly||!B(e,t)?null:r},F=function(e,t){var n=s.itemTemplate?s.itemTemplate(e):e,r=i.createElement("span",{className:"p-chips-token-label"},n),l=K(e,t);return i.createElement("li",{key:t,className:"p-chips-token p-highlight"},r,l)},_=l.ObjectUtils.isNotEmpty(s.tooltip),H=P.getOtherProps(s),M=l.ObjectUtils.reduceKeys(H,l.DomHandler.ARIA_PROPS),z=l.classNames("p-chips p-component p-inputwrapper",{"p-inputwrapper-filled":U,"p-inputwrapper-focus":m},s.className),J=function(){var e=l.classNames("p-inputtext p-chips-multiple-container",{"p-disabled":s.disabled,"p-focus":m}),t=s.value?s.value.map(F):null,n=i.createElement("li",{className:"p-chips-input-token"},i.createElement("input",u({ref:w,id:s.inputId,placeholder:s.placeholder,type:"text",name:s.name,disabled:s.disabled||C(),onKeyDown:A,onPaste:N,onFocus:R,onBlur:x,readOnly:s.readOnly},M)));return i.createElement("ul",{ref:b,className:e,onClick:k},t,n)}();return i.createElement(i.Fragment,null,i.createElement("div",u({ref:y,id:s.id,className:z,style:s.style},H),J),_&&i.createElement(r.Tooltip,u({target:w,content:s.tooltip},s.tooltipOptions)))})));return D.displayName="Chips",e.Chips=D,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.keyfilter,primereact.tooltip,primereact.utils,primereact.icons/timescircle);
|
package/column/column.d.ts
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import * as React from 'react';
|
|
12
12
|
import { TooltipOptions } from '../tooltip/tooltipoptions';
|
|
13
|
+
import { IconType } from '../utils/utils';
|
|
13
14
|
|
|
14
15
|
interface ColumnHeaderOptions {
|
|
15
16
|
/**
|
|
@@ -682,9 +683,8 @@ export interface ColumnProps {
|
|
|
682
683
|
rowReorder?: boolean | undefined;
|
|
683
684
|
/**
|
|
684
685
|
* Icon of the drag handle to reorder rows.
|
|
685
|
-
* @defaultValue pi pi-bars
|
|
686
686
|
*/
|
|
687
|
-
rowReorderIcon?:
|
|
687
|
+
rowReorderIcon?: IconType<ColumnProps> | undefined;
|
|
688
688
|
/**
|
|
689
689
|
* Number of rows to span for grouping.
|
|
690
690
|
*/
|