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/image/image.d.ts
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
10
|
import * as React from 'react';
|
|
11
|
+
import { IconType } from '../utils/utils';
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Defines valid properties in Image component. In addition to these, all properties of HTMLSpanElement can be used in this component.
|
|
@@ -28,6 +29,30 @@ export interface ImageProps extends Omit<React.DetailedHTMLProps<React.HTMLAttri
|
|
|
28
29
|
* @default false
|
|
29
30
|
*/
|
|
30
31
|
downloadable?: boolean | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Icon of the download button.
|
|
34
|
+
*/
|
|
35
|
+
downloadIcon: IconType<ImageProps> | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Icon of the rotate right button.
|
|
38
|
+
*/
|
|
39
|
+
rotateRightIcon: IconType<ImageProps> | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Icon of the rotate left button.
|
|
42
|
+
*/
|
|
43
|
+
rotateLeftIcon: IconType<ImageProps> | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Icon of the zoom out button.
|
|
46
|
+
*/
|
|
47
|
+
zoomOutIcon: IconType<ImageProps> | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Icon of the zoom in button.
|
|
50
|
+
*/
|
|
51
|
+
zoomInIcon: IconType<ImageProps> | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Icon of the close button.
|
|
54
|
+
*/
|
|
55
|
+
closeIcon: IconType<ImageProps> | undefined;
|
|
31
56
|
/**
|
|
32
57
|
* Height of the image element.
|
|
33
58
|
*/
|
|
@@ -45,12 +70,17 @@ export interface ImageProps extends Omit<React.DetailedHTMLProps<React.HTMLAttri
|
|
|
45
70
|
* @default false
|
|
46
71
|
*/
|
|
47
72
|
preview?: boolean | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* Changing the default icon when the image is hovered in preview mode.
|
|
75
|
+
*/
|
|
76
|
+
indicatorIcon?: IconType<ImageProps> | undefined;
|
|
48
77
|
/**
|
|
49
78
|
* Specifies the path to the image.
|
|
50
79
|
*/
|
|
51
80
|
src?: string | undefined;
|
|
52
81
|
/**
|
|
53
82
|
* Changing the default icon when the image is hovered in preview mode.
|
|
83
|
+
* @deprecated Since v9, use `indicatorIcon` instead.
|
|
54
84
|
*/
|
|
55
85
|
template?: any | undefined;
|
|
56
86
|
/**
|
package/image/image.esm.js
CHANGED
|
@@ -3,7 +3,14 @@ import PrimeReact, { localeOption } from 'primereact/api';
|
|
|
3
3
|
import { CSSTransition } from 'primereact/csstransition';
|
|
4
4
|
import { useUnmountEffect } from 'primereact/hooks';
|
|
5
5
|
import { Portal } from 'primereact/portal';
|
|
6
|
-
import { ObjectUtils, ZIndexUtils, classNames, DomHandler } from 'primereact/utils';
|
|
6
|
+
import { ObjectUtils, ZIndexUtils, classNames, IconUtils, DomHandler } from 'primereact/utils';
|
|
7
|
+
import { IconBase } from 'primereact/iconbase';
|
|
8
|
+
import { RefreshIcon } from 'primereact/icons/refresh';
|
|
9
|
+
import { EyeIcon } from 'primereact/icons/eye';
|
|
10
|
+
import { UndoIcon } from 'primereact/icons/undo';
|
|
11
|
+
import { SearchMinusIcon } from 'primereact/icons/searchminus';
|
|
12
|
+
import { SearchPlusIcon } from 'primereact/icons/searchplus';
|
|
13
|
+
import { TimesIcon } from 'primereact/icons/times';
|
|
7
14
|
|
|
8
15
|
function _extends() {
|
|
9
16
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
@@ -81,6 +88,12 @@ var ImageBase = {
|
|
|
81
88
|
alt: null,
|
|
82
89
|
className: null,
|
|
83
90
|
downloadable: false,
|
|
91
|
+
downloadIcon: null,
|
|
92
|
+
rotateRightIcon: null,
|
|
93
|
+
rotateLeftIcon: null,
|
|
94
|
+
zoomOutIcon: null,
|
|
95
|
+
zoomInIcon: null,
|
|
96
|
+
closeIcon: null,
|
|
84
97
|
height: null,
|
|
85
98
|
imageClassName: null,
|
|
86
99
|
imageStyle: null,
|
|
@@ -88,6 +101,7 @@ var ImageBase = {
|
|
|
88
101
|
onHide: null,
|
|
89
102
|
onShow: null,
|
|
90
103
|
preview: false,
|
|
104
|
+
indicatorIcon: null,
|
|
91
105
|
src: null,
|
|
92
106
|
template: null,
|
|
93
107
|
width: null,
|
|
@@ -102,6 +116,32 @@ var ImageBase = {
|
|
|
102
116
|
}
|
|
103
117
|
};
|
|
104
118
|
|
|
119
|
+
var DownloadIcon = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
120
|
+
var pti = IconBase.getPTI(inProps);
|
|
121
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
122
|
+
ref: ref,
|
|
123
|
+
width: "14",
|
|
124
|
+
height: "14",
|
|
125
|
+
viewBox: "0 0 14 14",
|
|
126
|
+
fill: "none",
|
|
127
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
128
|
+
}, pti), /*#__PURE__*/React.createElement("g", {
|
|
129
|
+
clipPath: "url(#clip0_407_20832)"
|
|
130
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
131
|
+
fillRule: "evenodd",
|
|
132
|
+
clipRule: "evenodd",
|
|
133
|
+
d: "M7.0118 10C6.93296 10.0003 6.85484 9.98495 6.78202 9.95477C6.7091 9.92454 6.64297 9.88008 6.58749 9.82399L3.38288 6.62399C3.27675 6.51025 3.21897 6.35982 3.22171 6.20438C3.22446 6.04893 3.28752 5.90063 3.39761 5.7907C3.5077 5.68077 3.65622 5.6178 3.81188 5.61505C3.96755 5.61231 4.1182 5.67001 4.23211 5.77599L6.41125 7.95201V0.6C6.41125 0.44087 6.47456 0.288258 6.58724 0.175736C6.69993 0.063214 6.85276 0 7.01212 0C7.17148 0 7.32431 0.063214 7.43699 0.175736C7.54968 0.288258 7.61298 0.44087 7.61298 0.6V7.95198L9.7921 5.77599C9.90601 5.67001 10.0567 5.61231 10.2123 5.61505C10.368 5.6178 10.5165 5.68077 10.6266 5.7907C10.7367 5.90063 10.7997 6.04893 10.8025 6.20438C10.8052 6.35982 10.7475 6.51025 10.6413 6.62399L7.43671 9.82399C7.38124 9.88008 7.3151 9.92454 7.24219 9.95477C7.16938 9.98495 7.09127 10.0003 7.01244 10C7.01233 10 7.01223 10 7.01212 10C7.01201 10 7.0119 10 7.0118 10ZM13.45 13.3115C13.0749 13.7235 12.5521 13.971 11.9952 14H2.02889C1.75106 13.9887 1.47819 13.9228 1.2259 13.806C0.973606 13.6893 0.74684 13.524 0.558578 13.3197C0.370316 13.1153 0.224251 12.8759 0.128742 12.6152C0.0332333 12.3544 -0.00984502 12.0774 0.00197194 11.8V9.39999C0.00197194 9.24086 0.065277 9.08825 0.177961 8.97572C0.290645 8.8632 0.443477 8.79999 0.602836 8.79999C0.762195 8.79999 0.915027 8.8632 1.02771 8.97572C1.1404 9.08825 1.2037 9.24086 1.2037 9.39999V11.8C1.18301 12.0375 1.25469 12.2739 1.40385 12.4601C1.55302 12.6463 1.76823 12.768 2.00485 12.8H11.9952C12.2318 12.768 12.4471 12.6463 12.5962 12.4601C12.7454 12.2739 12.8171 12.0375 12.7964 11.8V9.39999C12.7964 9.24086 12.8597 9.08825 12.9724 8.97572C13.085 8.8632 13.2379 8.79999 13.3972 8.79999C13.5566 8.79999 13.7094 8.8632 13.8221 8.97572C13.9348 9.08825 13.9981 9.24086 13.9981 9.39999V11.8C14.0221 12.3563 13.8251 12.8995 13.45 13.3115Z",
|
|
134
|
+
fill: "currentColor"
|
|
135
|
+
})), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
|
|
136
|
+
id: "clip0_407_20832"
|
|
137
|
+
}, /*#__PURE__*/React.createElement("rect", {
|
|
138
|
+
width: "14",
|
|
139
|
+
height: "14",
|
|
140
|
+
fill: "white"
|
|
141
|
+
}))));
|
|
142
|
+
}));
|
|
143
|
+
DownloadIcon.displayName = 'DownloadIcon';
|
|
144
|
+
|
|
105
145
|
var Image = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
106
146
|
var props = ImageBase.getProps(inProps);
|
|
107
147
|
var _React$useState = React.useState(false),
|
|
@@ -212,7 +252,24 @@ var Image = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inP
|
|
|
212
252
|
};
|
|
213
253
|
var zoomDisabled = scaleState <= 0.5 || scaleState >= 1.5;
|
|
214
254
|
// const rotateClassName = 'p-image-preview-rotate-' + rotateScale;
|
|
215
|
-
|
|
255
|
+
var downloadIcon = IconUtils.getJSXIcon(props.downloadIcon || /*#__PURE__*/React.createElement(DownloadIcon, null), undefined, {
|
|
256
|
+
props: props
|
|
257
|
+
});
|
|
258
|
+
var rotateRightIcon = IconUtils.getJSXIcon(props.rotateRightIcon || /*#__PURE__*/React.createElement(RefreshIcon, null), undefined, {
|
|
259
|
+
props: props
|
|
260
|
+
});
|
|
261
|
+
var rotateLeftIcon = IconUtils.getJSXIcon(props.rotateLeftIcon || /*#__PURE__*/React.createElement(UndoIcon, null), undefined, {
|
|
262
|
+
props: props
|
|
263
|
+
});
|
|
264
|
+
var zoomOutIcon = IconUtils.getJSXIcon(props.zoomOutIcon || /*#__PURE__*/React.createElement(SearchMinusIcon, null), undefined, {
|
|
265
|
+
props: props
|
|
266
|
+
});
|
|
267
|
+
var zoomInIcon = IconUtils.getJSXIcon(props.zoomInIcon || /*#__PURE__*/React.createElement(SearchPlusIcon, null), undefined, {
|
|
268
|
+
props: props
|
|
269
|
+
});
|
|
270
|
+
var closeIcon = IconUtils.getJSXIcon(props.closeIcon || /*#__PURE__*/React.createElement(TimesIcon, null), undefined, {
|
|
271
|
+
props: props
|
|
272
|
+
});
|
|
216
273
|
return /*#__PURE__*/React.createElement("div", {
|
|
217
274
|
ref: maskRef,
|
|
218
275
|
className: "p-image-mask p-component-overlay p-component-overlay-enter",
|
|
@@ -223,41 +280,29 @@ var Image = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inP
|
|
|
223
280
|
className: "p-image-action p-link",
|
|
224
281
|
onClick: onDownload,
|
|
225
282
|
type: "button"
|
|
226
|
-
}, /*#__PURE__*/React.createElement("
|
|
227
|
-
className: "pi pi-download"
|
|
228
|
-
})), /*#__PURE__*/React.createElement("button", {
|
|
283
|
+
}, downloadIcon), /*#__PURE__*/React.createElement("button", {
|
|
229
284
|
className: "p-image-action p-link",
|
|
230
285
|
onClick: rotateRight,
|
|
231
286
|
type: "button"
|
|
232
|
-
}, /*#__PURE__*/React.createElement("
|
|
233
|
-
className: "pi pi-refresh"
|
|
234
|
-
})), /*#__PURE__*/React.createElement("button", {
|
|
287
|
+
}, rotateRightIcon), /*#__PURE__*/React.createElement("button", {
|
|
235
288
|
className: "p-image-action p-link",
|
|
236
289
|
onClick: rotateLeft,
|
|
237
290
|
type: "button"
|
|
238
|
-
}, /*#__PURE__*/React.createElement("
|
|
239
|
-
className: "pi pi-undo"
|
|
240
|
-
})), /*#__PURE__*/React.createElement("button", {
|
|
291
|
+
}, rotateLeftIcon), /*#__PURE__*/React.createElement("button", {
|
|
241
292
|
className: "p-image-action p-link",
|
|
242
293
|
onClick: zoomOut,
|
|
243
294
|
type: "button",
|
|
244
295
|
disabled: zoomDisabled
|
|
245
|
-
}, /*#__PURE__*/React.createElement("
|
|
246
|
-
className: "pi pi-search-minus"
|
|
247
|
-
})), /*#__PURE__*/React.createElement("button", {
|
|
296
|
+
}, zoomOutIcon), /*#__PURE__*/React.createElement("button", {
|
|
248
297
|
className: "p-image-action p-link",
|
|
249
298
|
onClick: zoomIn,
|
|
250
299
|
type: "button",
|
|
251
300
|
disabled: zoomDisabled
|
|
252
|
-
}, /*#__PURE__*/React.createElement("
|
|
253
|
-
className: "pi pi-search-plus"
|
|
254
|
-
})), /*#__PURE__*/React.createElement("button", {
|
|
301
|
+
}, zoomInIcon), /*#__PURE__*/React.createElement("button", {
|
|
255
302
|
className: "p-image-action p-link",
|
|
256
303
|
type: "button",
|
|
257
304
|
"aria-label": localeOption('close')
|
|
258
|
-
}, /*#__PURE__*/React.createElement(
|
|
259
|
-
className: "pi pi-times"
|
|
260
|
-
}))), /*#__PURE__*/React.createElement(CSSTransition, {
|
|
305
|
+
}, closeIcon)), /*#__PURE__*/React.createElement(CSSTransition, {
|
|
261
306
|
nodeRef: previewRef,
|
|
262
307
|
classNames: "p-image-preview",
|
|
263
308
|
"in": previewVisibleState,
|
|
@@ -303,9 +348,16 @@ var Image = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inP
|
|
|
303
348
|
'p-image-preview-container': props.preview
|
|
304
349
|
});
|
|
305
350
|
var element = createElement();
|
|
306
|
-
var
|
|
307
|
-
|
|
351
|
+
var iconClassName = 'p-image-preview-icon';
|
|
352
|
+
var icon = props.indicatorIcon || /*#__PURE__*/React.createElement(EyeIcon, {
|
|
353
|
+
className: iconClassName
|
|
354
|
+
});
|
|
355
|
+
var indicatorIcon = IconUtils.getJSXIcon(icon, {
|
|
356
|
+
className: iconClassName
|
|
357
|
+
}, {
|
|
358
|
+
props: props
|
|
308
359
|
});
|
|
360
|
+
var content = props.template ? ObjectUtils.getJSXElement(props.template, props) : indicatorIcon;
|
|
309
361
|
var preview = createPreview();
|
|
310
362
|
var image = props.src && /*#__PURE__*/React.createElement("img", {
|
|
311
363
|
ref: imageRef,
|
package/image/image.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import t,{localeOption as n}from"primereact/api";import{CSSTransition as r}from"primereact/csstransition";import{useUnmountEffect as
|
|
1
|
+
import*as e from"react";import t,{localeOption as n}from"primereact/api";import{CSSTransition as r}from"primereact/csstransition";import{useUnmountEffect as o}from"primereact/hooks";import{Portal as l}from"primereact/portal";import{ObjectUtils as a,ZIndexUtils as i,classNames as c,IconUtils as u,DomHandler as m}from"primereact/utils";import{IconBase as s}from"primereact/iconbase";import{RefreshIcon as p}from"primereact/icons/refresh";import{EyeIcon as f}from"primereact/icons/eye";import{UndoIcon as d}from"primereact/icons/undo";import{SearchMinusIcon as g}from"primereact/icons/searchminus";import{SearchPlusIcon as C}from"primereact/icons/searchplus";import{TimesIcon as v}from"primereact/icons/times";function h(){return h=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},h.apply(this,arguments)}function E(e){if(Array.isArray(e))return e}function y(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,l,a,i=[],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)&&(i.push(r.value),i.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return i}}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 b(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 I(){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 S(e,t){return E(e)||y(e,t)||b(e,t)||I()}var N={defaultProps:{__TYPE:"Image",alt:null,className:null,downloadable:!1,downloadIcon:null,rotateRightIcon:null,rotateLeftIcon:null,zoomOutIcon:null,zoomInIcon:null,closeIcon:null,height:null,imageClassName:null,imageStyle:null,onError:null,onHide:null,onShow:null,preview:!1,indicatorIcon:null,src:null,template:null,width:null,zoomSrc:null,children:void 0},getProps:function(e){return a.getMergedProps(e,N.defaultProps)},getOtherProps:function(e){return a.getDiffProps(e,N.defaultProps)}},k=e.memo(e.forwardRef((function(t,n){var r=s.getPTI(t);return e.createElement("svg",h({ref:n,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),e.createElement("g",{clipPath:"url(#clip0_407_20832)"},e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.0118 10C6.93296 10.0003 6.85484 9.98495 6.78202 9.95477C6.7091 9.92454 6.64297 9.88008 6.58749 9.82399L3.38288 6.62399C3.27675 6.51025 3.21897 6.35982 3.22171 6.20438C3.22446 6.04893 3.28752 5.90063 3.39761 5.7907C3.5077 5.68077 3.65622 5.6178 3.81188 5.61505C3.96755 5.61231 4.1182 5.67001 4.23211 5.77599L6.41125 7.95201V0.6C6.41125 0.44087 6.47456 0.288258 6.58724 0.175736C6.69993 0.063214 6.85276 0 7.01212 0C7.17148 0 7.32431 0.063214 7.43699 0.175736C7.54968 0.288258 7.61298 0.44087 7.61298 0.6V7.95198L9.7921 5.77599C9.90601 5.67001 10.0567 5.61231 10.2123 5.61505C10.368 5.6178 10.5165 5.68077 10.6266 5.7907C10.7367 5.90063 10.7997 6.04893 10.8025 6.20438C10.8052 6.35982 10.7475 6.51025 10.6413 6.62399L7.43671 9.82399C7.38124 9.88008 7.3151 9.92454 7.24219 9.95477C7.16938 9.98495 7.09127 10.0003 7.01244 10C7.01233 10 7.01223 10 7.01212 10C7.01201 10 7.0119 10 7.0118 10ZM13.45 13.3115C13.0749 13.7235 12.5521 13.971 11.9952 14H2.02889C1.75106 13.9887 1.47819 13.9228 1.2259 13.806C0.973606 13.6893 0.74684 13.524 0.558578 13.3197C0.370316 13.1153 0.224251 12.8759 0.128742 12.6152C0.0332333 12.3544 -0.00984502 12.0774 0.00197194 11.8V9.39999C0.00197194 9.24086 0.065277 9.08825 0.177961 8.97572C0.290645 8.8632 0.443477 8.79999 0.602836 8.79999C0.762195 8.79999 0.915027 8.8632 1.02771 8.97572C1.1404 9.08825 1.2037 9.24086 1.2037 9.39999V11.8C1.18301 12.0375 1.25469 12.2739 1.40385 12.4601C1.55302 12.6463 1.76823 12.768 2.00485 12.8H11.9952C12.2318 12.768 12.4471 12.6463 12.5962 12.4601C12.7454 12.2739 12.8171 12.0375 12.7964 11.8V9.39999C12.7964 9.24086 12.8597 9.08825 12.9724 8.97572C13.085 8.8632 13.2379 8.79999 13.3972 8.79999C13.5566 8.79999 13.7094 8.8632 13.8221 8.97572C13.9348 9.08825 13.9981 9.24086 13.9981 9.39999V11.8C14.0221 12.3563 13.8251 12.8995 13.45 13.3115Z",fill:"currentColor"})),e.createElement("defs",null,e.createElement("clipPath",{id:"clip0_407_20832"},e.createElement("rect",{width:"14",height:"14",fill:"white"}))))})));k.displayName="DownloadIcon";var P=e.memo(e.forwardRef((function(s,E){var y=N.getProps(s),w=S(e.useState(!1),2),b=w[0],I=w[1],P=S(e.useState(!1),2),O=P[0],R=P[1],x=S(e.useState(0),2),j=x[0],J=x[1],X=S(e.useState(1),2),z=X[0],A=X[1],H=e.useRef(null),L=e.useRef(null),V=e.useRef(null),_=e.useRef(null),T=e.useRef(!1),M=function(){y.preview&&(I(!0),setTimeout((function(){R(!0)}),25))},Z=function(){T.current||(R(!1),J(0),A(1)),T.current=!1},D=function(){T.current=!0},B=function(){m.saveAs({name:y.alt,src:y.src}),T.current=!0},U=function(){J((function(e){return e+90})),T.current=!0},Y=function(){J((function(e){return e-90})),T.current=!0},$=function(){A((function(e){return e+.1})),T.current=!0},q=function(){A((function(e){return e-.1})),T.current=!0},F=function(){i.set("modal",V.current,t.autoZIndex,t.zIndex.modal)},G=function(){y.onShow&&y.onShow()},K=function(){m.addClass(V.current,"p-component-overlay-leave")},Q=function(){y.onHide&&y.onHide()},W=function(){i.clear(V.current),I(!1)};o((function(){V.current&&i.clear(V.current)}));e.useImperativeHandle(E,(function(){return{props:y,show:M,hide:Z,getElement:function(){return H.current},getImage:function(){return L.current}}}));var ee,te,ne,re,oe,le,ae,ie,ce,ue=y.src,me=y.alt,se=y.width,pe=y.height,fe=N.getOtherProps(y),de=c("p-image p-component",y.className,{"p-image-preview-container":y.preview}),ge=(ee=y.downloadable,te={transform:"rotate("+j+"deg) scale("+z+")"},ne=z<=.5||z>=1.5,re=u.getJSXIcon(y.downloadIcon||e.createElement(k,null),void 0,{props:y}),oe=u.getJSXIcon(y.rotateRightIcon||e.createElement(p,null),void 0,{props:y}),le=u.getJSXIcon(y.rotateLeftIcon||e.createElement(d,null),void 0,{props:y}),ae=u.getJSXIcon(y.zoomOutIcon||e.createElement(g,null),void 0,{props:y}),ie=u.getJSXIcon(y.zoomInIcon||e.createElement(C,null),void 0,{props:y}),ce=u.getJSXIcon(y.closeIcon||e.createElement(v,null),void 0,{props:y}),e.createElement("div",{ref:V,className:"p-image-mask p-component-overlay p-component-overlay-enter",onClick:Z},e.createElement("div",{className:"p-image-toolbar"},ee&&e.createElement("button",{className:"p-image-action p-link",onClick:B,type:"button"},re),e.createElement("button",{className:"p-image-action p-link",onClick:U,type:"button"},oe),e.createElement("button",{className:"p-image-action p-link",onClick:Y,type:"button"},le),e.createElement("button",{className:"p-image-action p-link",onClick:q,type:"button",disabled:ne},ae),e.createElement("button",{className:"p-image-action p-link",onClick:$,type:"button",disabled:ne},ie),e.createElement("button",{className:"p-image-action p-link",type:"button","aria-label":n("close")},ce)),e.createElement(r,{nodeRef:_,classNames:"p-image-preview",in:O,timeout:{enter:150,exit:150},unmountOnExit:!0,onEntering:F,onEntered:G,onExit:K,onExiting:Q,onExited:W},e.createElement("div",{ref:_},e.createElement("img",{src:y.zoomSrc||y.src,className:"p-image-preview",style:te,onClick:D,alt:y.alt}))))),Ce="p-image-preview-icon",ve=u.getJSXIcon(y.indicatorIcon||e.createElement(f,{className:Ce}),{className:Ce},{props:y}),he=y.template?a.getJSXElement(y.template,y):ve,Ee=y.preview?e.createElement("div",{className:"p-image-preview-indicator",onClick:M},he):null,ye=y.src&&e.createElement("img",{ref:L,src:ue,className:y.imageClassName,width:se,height:pe,style:y.imageStyle,alt:me,onError:y.onError});return e.createElement("span",h({ref:H,className:de},fe),ye,Ee,b&&e.createElement(l,{element:ge,appendTo:document.body}))})));P.displayName="Image";export{P as Image};
|
package/image/image.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
this.primereact = this.primereact || {};
|
|
2
|
-
this.primereact.image = (function (exports, React, PrimeReact, csstransition, hooks, portal, utils) {
|
|
2
|
+
this.primereact.image = (function (exports, React, PrimeReact, csstransition, hooks, portal, utils, iconbase, refresh, eye, undo, searchminus, searchplus, times) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -101,6 +101,12 @@ this.primereact.image = (function (exports, React, PrimeReact, csstransition, ho
|
|
|
101
101
|
alt: null,
|
|
102
102
|
className: null,
|
|
103
103
|
downloadable: false,
|
|
104
|
+
downloadIcon: null,
|
|
105
|
+
rotateRightIcon: null,
|
|
106
|
+
rotateLeftIcon: null,
|
|
107
|
+
zoomOutIcon: null,
|
|
108
|
+
zoomInIcon: null,
|
|
109
|
+
closeIcon: null,
|
|
104
110
|
height: null,
|
|
105
111
|
imageClassName: null,
|
|
106
112
|
imageStyle: null,
|
|
@@ -108,6 +114,7 @@ this.primereact.image = (function (exports, React, PrimeReact, csstransition, ho
|
|
|
108
114
|
onHide: null,
|
|
109
115
|
onShow: null,
|
|
110
116
|
preview: false,
|
|
117
|
+
indicatorIcon: null,
|
|
111
118
|
src: null,
|
|
112
119
|
template: null,
|
|
113
120
|
width: null,
|
|
@@ -122,6 +129,32 @@ this.primereact.image = (function (exports, React, PrimeReact, csstransition, ho
|
|
|
122
129
|
}
|
|
123
130
|
};
|
|
124
131
|
|
|
132
|
+
var DownloadIcon = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
133
|
+
var pti = iconbase.IconBase.getPTI(inProps);
|
|
134
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
135
|
+
ref: ref,
|
|
136
|
+
width: "14",
|
|
137
|
+
height: "14",
|
|
138
|
+
viewBox: "0 0 14 14",
|
|
139
|
+
fill: "none",
|
|
140
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
141
|
+
}, pti), /*#__PURE__*/React__namespace.createElement("g", {
|
|
142
|
+
clipPath: "url(#clip0_407_20832)"
|
|
143
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
144
|
+
fillRule: "evenodd",
|
|
145
|
+
clipRule: "evenodd",
|
|
146
|
+
d: "M7.0118 10C6.93296 10.0003 6.85484 9.98495 6.78202 9.95477C6.7091 9.92454 6.64297 9.88008 6.58749 9.82399L3.38288 6.62399C3.27675 6.51025 3.21897 6.35982 3.22171 6.20438C3.22446 6.04893 3.28752 5.90063 3.39761 5.7907C3.5077 5.68077 3.65622 5.6178 3.81188 5.61505C3.96755 5.61231 4.1182 5.67001 4.23211 5.77599L6.41125 7.95201V0.6C6.41125 0.44087 6.47456 0.288258 6.58724 0.175736C6.69993 0.063214 6.85276 0 7.01212 0C7.17148 0 7.32431 0.063214 7.43699 0.175736C7.54968 0.288258 7.61298 0.44087 7.61298 0.6V7.95198L9.7921 5.77599C9.90601 5.67001 10.0567 5.61231 10.2123 5.61505C10.368 5.6178 10.5165 5.68077 10.6266 5.7907C10.7367 5.90063 10.7997 6.04893 10.8025 6.20438C10.8052 6.35982 10.7475 6.51025 10.6413 6.62399L7.43671 9.82399C7.38124 9.88008 7.3151 9.92454 7.24219 9.95477C7.16938 9.98495 7.09127 10.0003 7.01244 10C7.01233 10 7.01223 10 7.01212 10C7.01201 10 7.0119 10 7.0118 10ZM13.45 13.3115C13.0749 13.7235 12.5521 13.971 11.9952 14H2.02889C1.75106 13.9887 1.47819 13.9228 1.2259 13.806C0.973606 13.6893 0.74684 13.524 0.558578 13.3197C0.370316 13.1153 0.224251 12.8759 0.128742 12.6152C0.0332333 12.3544 -0.00984502 12.0774 0.00197194 11.8V9.39999C0.00197194 9.24086 0.065277 9.08825 0.177961 8.97572C0.290645 8.8632 0.443477 8.79999 0.602836 8.79999C0.762195 8.79999 0.915027 8.8632 1.02771 8.97572C1.1404 9.08825 1.2037 9.24086 1.2037 9.39999V11.8C1.18301 12.0375 1.25469 12.2739 1.40385 12.4601C1.55302 12.6463 1.76823 12.768 2.00485 12.8H11.9952C12.2318 12.768 12.4471 12.6463 12.5962 12.4601C12.7454 12.2739 12.8171 12.0375 12.7964 11.8V9.39999C12.7964 9.24086 12.8597 9.08825 12.9724 8.97572C13.085 8.8632 13.2379 8.79999 13.3972 8.79999C13.5566 8.79999 13.7094 8.8632 13.8221 8.97572C13.9348 9.08825 13.9981 9.24086 13.9981 9.39999V11.8C14.0221 12.3563 13.8251 12.8995 13.45 13.3115Z",
|
|
147
|
+
fill: "currentColor"
|
|
148
|
+
})), /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("clipPath", {
|
|
149
|
+
id: "clip0_407_20832"
|
|
150
|
+
}, /*#__PURE__*/React__namespace.createElement("rect", {
|
|
151
|
+
width: "14",
|
|
152
|
+
height: "14",
|
|
153
|
+
fill: "white"
|
|
154
|
+
}))));
|
|
155
|
+
}));
|
|
156
|
+
DownloadIcon.displayName = 'DownloadIcon';
|
|
157
|
+
|
|
125
158
|
var Image = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
126
159
|
var props = ImageBase.getProps(inProps);
|
|
127
160
|
var _React$useState = React__namespace.useState(false),
|
|
@@ -232,7 +265,24 @@ this.primereact.image = (function (exports, React, PrimeReact, csstransition, ho
|
|
|
232
265
|
};
|
|
233
266
|
var zoomDisabled = scaleState <= 0.5 || scaleState >= 1.5;
|
|
234
267
|
// const rotateClassName = 'p-image-preview-rotate-' + rotateScale;
|
|
235
|
-
|
|
268
|
+
var downloadIcon = utils.IconUtils.getJSXIcon(props.downloadIcon || /*#__PURE__*/React__namespace.createElement(DownloadIcon, null), undefined, {
|
|
269
|
+
props: props
|
|
270
|
+
});
|
|
271
|
+
var rotateRightIcon = utils.IconUtils.getJSXIcon(props.rotateRightIcon || /*#__PURE__*/React__namespace.createElement(refresh.RefreshIcon, null), undefined, {
|
|
272
|
+
props: props
|
|
273
|
+
});
|
|
274
|
+
var rotateLeftIcon = utils.IconUtils.getJSXIcon(props.rotateLeftIcon || /*#__PURE__*/React__namespace.createElement(undo.UndoIcon, null), undefined, {
|
|
275
|
+
props: props
|
|
276
|
+
});
|
|
277
|
+
var zoomOutIcon = utils.IconUtils.getJSXIcon(props.zoomOutIcon || /*#__PURE__*/React__namespace.createElement(searchminus.SearchMinusIcon, null), undefined, {
|
|
278
|
+
props: props
|
|
279
|
+
});
|
|
280
|
+
var zoomInIcon = utils.IconUtils.getJSXIcon(props.zoomInIcon || /*#__PURE__*/React__namespace.createElement(searchplus.SearchPlusIcon, null), undefined, {
|
|
281
|
+
props: props
|
|
282
|
+
});
|
|
283
|
+
var closeIcon = utils.IconUtils.getJSXIcon(props.closeIcon || /*#__PURE__*/React__namespace.createElement(times.TimesIcon, null), undefined, {
|
|
284
|
+
props: props
|
|
285
|
+
});
|
|
236
286
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
237
287
|
ref: maskRef,
|
|
238
288
|
className: "p-image-mask p-component-overlay p-component-overlay-enter",
|
|
@@ -243,41 +293,29 @@ this.primereact.image = (function (exports, React, PrimeReact, csstransition, ho
|
|
|
243
293
|
className: "p-image-action p-link",
|
|
244
294
|
onClick: onDownload,
|
|
245
295
|
type: "button"
|
|
246
|
-
}, /*#__PURE__*/React__namespace.createElement("
|
|
247
|
-
className: "pi pi-download"
|
|
248
|
-
})), /*#__PURE__*/React__namespace.createElement("button", {
|
|
296
|
+
}, downloadIcon), /*#__PURE__*/React__namespace.createElement("button", {
|
|
249
297
|
className: "p-image-action p-link",
|
|
250
298
|
onClick: rotateRight,
|
|
251
299
|
type: "button"
|
|
252
|
-
}, /*#__PURE__*/React__namespace.createElement("
|
|
253
|
-
className: "pi pi-refresh"
|
|
254
|
-
})), /*#__PURE__*/React__namespace.createElement("button", {
|
|
300
|
+
}, rotateRightIcon), /*#__PURE__*/React__namespace.createElement("button", {
|
|
255
301
|
className: "p-image-action p-link",
|
|
256
302
|
onClick: rotateLeft,
|
|
257
303
|
type: "button"
|
|
258
|
-
}, /*#__PURE__*/React__namespace.createElement("
|
|
259
|
-
className: "pi pi-undo"
|
|
260
|
-
})), /*#__PURE__*/React__namespace.createElement("button", {
|
|
304
|
+
}, rotateLeftIcon), /*#__PURE__*/React__namespace.createElement("button", {
|
|
261
305
|
className: "p-image-action p-link",
|
|
262
306
|
onClick: zoomOut,
|
|
263
307
|
type: "button",
|
|
264
308
|
disabled: zoomDisabled
|
|
265
|
-
}, /*#__PURE__*/React__namespace.createElement("
|
|
266
|
-
className: "pi pi-search-minus"
|
|
267
|
-
})), /*#__PURE__*/React__namespace.createElement("button", {
|
|
309
|
+
}, zoomOutIcon), /*#__PURE__*/React__namespace.createElement("button", {
|
|
268
310
|
className: "p-image-action p-link",
|
|
269
311
|
onClick: zoomIn,
|
|
270
312
|
type: "button",
|
|
271
313
|
disabled: zoomDisabled
|
|
272
|
-
}, /*#__PURE__*/React__namespace.createElement("
|
|
273
|
-
className: "pi pi-search-plus"
|
|
274
|
-
})), /*#__PURE__*/React__namespace.createElement("button", {
|
|
314
|
+
}, zoomInIcon), /*#__PURE__*/React__namespace.createElement("button", {
|
|
275
315
|
className: "p-image-action p-link",
|
|
276
316
|
type: "button",
|
|
277
317
|
"aria-label": PrimeReact.localeOption('close')
|
|
278
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
279
|
-
className: "pi pi-times"
|
|
280
|
-
}))), /*#__PURE__*/React__namespace.createElement(csstransition.CSSTransition, {
|
|
318
|
+
}, closeIcon)), /*#__PURE__*/React__namespace.createElement(csstransition.CSSTransition, {
|
|
281
319
|
nodeRef: previewRef,
|
|
282
320
|
classNames: "p-image-preview",
|
|
283
321
|
"in": previewVisibleState,
|
|
@@ -323,9 +361,16 @@ this.primereact.image = (function (exports, React, PrimeReact, csstransition, ho
|
|
|
323
361
|
'p-image-preview-container': props.preview
|
|
324
362
|
});
|
|
325
363
|
var element = createElement();
|
|
326
|
-
var
|
|
327
|
-
|
|
364
|
+
var iconClassName = 'p-image-preview-icon';
|
|
365
|
+
var icon = props.indicatorIcon || /*#__PURE__*/React__namespace.createElement(eye.EyeIcon, {
|
|
366
|
+
className: iconClassName
|
|
367
|
+
});
|
|
368
|
+
var indicatorIcon = utils.IconUtils.getJSXIcon(icon, {
|
|
369
|
+
className: iconClassName
|
|
370
|
+
}, {
|
|
371
|
+
props: props
|
|
328
372
|
});
|
|
373
|
+
var content = props.template ? utils.ObjectUtils.getJSXElement(props.template, props) : indicatorIcon;
|
|
329
374
|
var preview = createPreview();
|
|
330
375
|
var image = props.src && /*#__PURE__*/React__namespace.createElement("img", {
|
|
331
376
|
ref: imageRef,
|
|
@@ -353,4 +398,4 @@ this.primereact.image = (function (exports, React, PrimeReact, csstransition, ho
|
|
|
353
398
|
|
|
354
399
|
return exports;
|
|
355
400
|
|
|
356
|
-
})({}, React, primereact.api, primereact.csstransition, primereact.hooks, primereact.portal, primereact.utils);
|
|
401
|
+
})({}, React, primereact.api, primereact.csstransition, primereact.hooks, primereact.portal, primereact.utils, primereact.iconbase, primereact.icons/refresh, primereact.icons/eye, primereact.icons/undo, primereact.icons/searchminus, primereact.icons/searchplus, primereact.icons/times);
|
package/image/image.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.image=function(e,t,n,r,a,i,
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.image=function(e,t,n,r,o,l,a,c,i,u,s,m,p,f){"use strict";function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function g(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 h=g(t),I=d(n);function v(){return v=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},v.apply(this,arguments)}function C(e){if(Array.isArray(e))return e}function b(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,l,a,c=[],i=!0,u=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;i=!1}else for(;!(i=(r=l.call(n)).done)&&(c.push(r.value),c.length!==t);i=!0);}catch(e){u=!0,o=e}finally{try{if(!i&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}function E(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 y(e,t){if(e){if("string"==typeof e)return E(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)?E(e,t):void 0}}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.")}function S(e,t){return C(e)||b(e,t)||y(e,t)||w()}var O={defaultProps:{__TYPE:"Image",alt:null,className:null,downloadable:!1,downloadIcon:null,rotateRightIcon:null,rotateLeftIcon:null,zoomOutIcon:null,zoomInIcon:null,closeIcon:null,height:null,imageClassName:null,imageStyle:null,onError:null,onHide:null,onShow:null,preview:!1,indicatorIcon:null,src:null,template:null,width:null,zoomSrc:null,children:void 0},getProps:function(e){return a.ObjectUtils.getMergedProps(e,O.defaultProps)},getOtherProps:function(e){return a.ObjectUtils.getDiffProps(e,O.defaultProps)}},N=h.memo(h.forwardRef((function(e,t){var n=c.IconBase.getPTI(e);return h.createElement("svg",v({ref:t,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),h.createElement("g",{clipPath:"url(#clip0_407_20832)"},h.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.0118 10C6.93296 10.0003 6.85484 9.98495 6.78202 9.95477C6.7091 9.92454 6.64297 9.88008 6.58749 9.82399L3.38288 6.62399C3.27675 6.51025 3.21897 6.35982 3.22171 6.20438C3.22446 6.04893 3.28752 5.90063 3.39761 5.7907C3.5077 5.68077 3.65622 5.6178 3.81188 5.61505C3.96755 5.61231 4.1182 5.67001 4.23211 5.77599L6.41125 7.95201V0.6C6.41125 0.44087 6.47456 0.288258 6.58724 0.175736C6.69993 0.063214 6.85276 0 7.01212 0C7.17148 0 7.32431 0.063214 7.43699 0.175736C7.54968 0.288258 7.61298 0.44087 7.61298 0.6V7.95198L9.7921 5.77599C9.90601 5.67001 10.0567 5.61231 10.2123 5.61505C10.368 5.6178 10.5165 5.68077 10.6266 5.7907C10.7367 5.90063 10.7997 6.04893 10.8025 6.20438C10.8052 6.35982 10.7475 6.51025 10.6413 6.62399L7.43671 9.82399C7.38124 9.88008 7.3151 9.92454 7.24219 9.95477C7.16938 9.98495 7.09127 10.0003 7.01244 10C7.01233 10 7.01223 10 7.01212 10C7.01201 10 7.0119 10 7.0118 10ZM13.45 13.3115C13.0749 13.7235 12.5521 13.971 11.9952 14H2.02889C1.75106 13.9887 1.47819 13.9228 1.2259 13.806C0.973606 13.6893 0.74684 13.524 0.558578 13.3197C0.370316 13.1153 0.224251 12.8759 0.128742 12.6152C0.0332333 12.3544 -0.00984502 12.0774 0.00197194 11.8V9.39999C0.00197194 9.24086 0.065277 9.08825 0.177961 8.97572C0.290645 8.8632 0.443477 8.79999 0.602836 8.79999C0.762195 8.79999 0.915027 8.8632 1.02771 8.97572C1.1404 9.08825 1.2037 9.24086 1.2037 9.39999V11.8C1.18301 12.0375 1.25469 12.2739 1.40385 12.4601C1.55302 12.6463 1.76823 12.768 2.00485 12.8H11.9952C12.2318 12.768 12.4471 12.6463 12.5962 12.4601C12.7454 12.2739 12.8171 12.0375 12.7964 11.8V9.39999C12.7964 9.24086 12.8597 9.08825 12.9724 8.97572C13.085 8.8632 13.2379 8.79999 13.3972 8.79999C13.5566 8.79999 13.7094 8.8632 13.8221 8.97572C13.9348 9.08825 13.9981 9.24086 13.9981 9.39999V11.8C14.0221 12.3563 13.8251 12.8995 13.45 13.3115Z",fill:"currentColor"})),h.createElement("defs",null,h.createElement("clipPath",{id:"clip0_407_20832"},h.createElement("rect",{width:"14",height:"14",fill:"white"}))))})));N.displayName="DownloadIcon";var P=h.memo(h.forwardRef((function(e,t){var c=O.getProps(e),d=S(h.useState(!1),2),g=d[0],C=d[1],b=S(h.useState(!1),2),E=b[0],y=b[1],w=S(h.useState(0),2),P=w[0],j=w[1],k=S(h.useState(1),2),U=k[0],R=k[1],x=h.useRef(null),_=h.useRef(null),z=h.useRef(null),H=h.useRef(null),J=h.useRef(!1),X=function(){c.preview&&(C(!0),setTimeout((function(){y(!0)}),25))},A=function(){J.current||(y(!1),j(0),R(1)),J.current=!1},M=function(){J.current=!0},T=function(){a.DomHandler.saveAs({name:c.alt,src:c.src}),J.current=!0},L=function(){j((function(e){return e+90})),J.current=!0},V=function(){j((function(e){return e-90})),J.current=!0},Z=function(){R((function(e){return e+.1})),J.current=!0},D=function(){R((function(e){return e-.1})),J.current=!0},B=function(){a.ZIndexUtils.set("modal",z.current,I.default.autoZIndex,I.default.zIndex.modal)},Y=function(){c.onShow&&c.onShow()},$=function(){a.DomHandler.addClass(z.current,"p-component-overlay-leave")},q=function(){c.onHide&&c.onHide()},F=function(){a.ZIndexUtils.clear(z.current),C(!1)};o.useUnmountEffect((function(){z.current&&a.ZIndexUtils.clear(z.current)}));h.useImperativeHandle(t,(function(){return{props:c,show:X,hide:A,getElement:function(){return x.current},getImage:function(){return _.current}}}));var G,K,Q,W,ee,te,ne,re,oe,le=c.src,ae=c.alt,ce=c.width,ie=c.height,ue=O.getOtherProps(c),se=a.classNames("p-image p-component",c.className,{"p-image-preview-container":c.preview}),me=(G=c.downloadable,K={transform:"rotate("+P+"deg) scale("+U+")"},Q=U<=.5||U>=1.5,W=a.IconUtils.getJSXIcon(c.downloadIcon||h.createElement(N,null),void 0,{props:c}),ee=a.IconUtils.getJSXIcon(c.rotateRightIcon||h.createElement(i.RefreshIcon,null),void 0,{props:c}),te=a.IconUtils.getJSXIcon(c.rotateLeftIcon||h.createElement(s.UndoIcon,null),void 0,{props:c}),ne=a.IconUtils.getJSXIcon(c.zoomOutIcon||h.createElement(m.SearchMinusIcon,null),void 0,{props:c}),re=a.IconUtils.getJSXIcon(c.zoomInIcon||h.createElement(p.SearchPlusIcon,null),void 0,{props:c}),oe=a.IconUtils.getJSXIcon(c.closeIcon||h.createElement(f.TimesIcon,null),void 0,{props:c}),h.createElement("div",{ref:z,className:"p-image-mask p-component-overlay p-component-overlay-enter",onClick:A},h.createElement("div",{className:"p-image-toolbar"},G&&h.createElement("button",{className:"p-image-action p-link",onClick:T,type:"button"},W),h.createElement("button",{className:"p-image-action p-link",onClick:L,type:"button"},ee),h.createElement("button",{className:"p-image-action p-link",onClick:V,type:"button"},te),h.createElement("button",{className:"p-image-action p-link",onClick:D,type:"button",disabled:Q},ne),h.createElement("button",{className:"p-image-action p-link",onClick:Z,type:"button",disabled:Q},re),h.createElement("button",{className:"p-image-action p-link",type:"button","aria-label":n.localeOption("close")},oe)),h.createElement(r.CSSTransition,{nodeRef:H,classNames:"p-image-preview",in:E,timeout:{enter:150,exit:150},unmountOnExit:!0,onEntering:B,onEntered:Y,onExit:$,onExiting:q,onExited:F},h.createElement("div",{ref:H},h.createElement("img",{src:c.zoomSrc||c.src,className:"p-image-preview",style:K,onClick:M,alt:c.alt}))))),pe="p-image-preview-icon",fe=a.IconUtils.getJSXIcon(c.indicatorIcon||h.createElement(u.EyeIcon,{className:pe}),{className:pe},{props:c}),de=c.template?a.ObjectUtils.getJSXElement(c.template,c):fe,ge=c.preview?h.createElement("div",{className:"p-image-preview-indicator",onClick:X},de):null,he=c.src&&h.createElement("img",{ref:_,src:le,className:c.imageClassName,width:ce,height:ie,style:c.imageStyle,alt:ae,onError:c.onError});return h.createElement("span",v({ref:x,className:se},ue),he,ge,g&&h.createElement(l.Portal,{element:me,appendTo:document.body}))})));return P.displayName="Image",e.Image=P,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.api,primereact.csstransition,primereact.hooks,primereact.portal,primereact.utils,primereact.iconbase,primereact.icons/refresh,primereact.icons/eye,primereact.icons/undo,primereact.icons/searchminus,primereact.icons/searchplus,primereact.icons/times);
|
package/inplace/inplace.cjs.js
CHANGED
|
@@ -6,6 +6,7 @@ var React = require('react');
|
|
|
6
6
|
var api = require('primereact/api');
|
|
7
7
|
var button = require('primereact/button');
|
|
8
8
|
var utils = require('primereact/utils');
|
|
9
|
+
var times = require('primereact/icons/times');
|
|
9
10
|
|
|
10
11
|
function _interopNamespace(e) {
|
|
11
12
|
if (e && e.__esModule) return e;
|
|
@@ -122,6 +123,7 @@ var InplaceBase = {
|
|
|
122
123
|
className: null,
|
|
123
124
|
active: false,
|
|
124
125
|
closable: false,
|
|
126
|
+
closeIcon: null,
|
|
125
127
|
disabled: false,
|
|
126
128
|
tabIndex: 0,
|
|
127
129
|
ariaLabel: null,
|
|
@@ -198,13 +200,18 @@ var Inplace = /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
|
198
200
|
}), content);
|
|
199
201
|
};
|
|
200
202
|
var createCloseButton = function createCloseButton() {
|
|
203
|
+
var icon = props.closeIcon || /*#__PURE__*/React__namespace.createElement(times.TimesIcon, null);
|
|
204
|
+
var closeIcon = utils.IconUtils.getJSXIcon(icon, undefined, {
|
|
205
|
+
props: props
|
|
206
|
+
});
|
|
207
|
+
var ariaLabel = api.localeOption('close');
|
|
201
208
|
if (props.closable) {
|
|
202
209
|
return /*#__PURE__*/React__namespace.createElement(button.Button, {
|
|
203
210
|
type: "button",
|
|
204
211
|
className: "p-inplace-content-close",
|
|
205
|
-
icon:
|
|
212
|
+
icon: closeIcon,
|
|
206
213
|
onClick: close,
|
|
207
|
-
"aria-label":
|
|
214
|
+
"aria-label": ariaLabel
|
|
208
215
|
});
|
|
209
216
|
}
|
|
210
217
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/api"),n=require("primereact/button"),r=require("primereact/utils");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/api"),n=require("primereact/button"),r=require("primereact/utils"),l=require("primereact/icons/times");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 c(e){if(Array.isArray(e))return e}function s(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,l,o,a,i=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(i.push(r.value),i.length!==t);c=!0);}catch(e){s=!0,l=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw l}}return i}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(e,t){if(e){if("string"==typeof e)return u(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)?u(e,t):void 0}}function f(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var d={defaultProps:{__TYPE:"InplaceDisplay",children:void 0},getOtherProps:function(e){return r.ObjectUtils.getComponentDiffProps(e,d.defaultProps)}},b={defaultProps:{__TYPE:"InplaceContent",children:void 0},getOtherProps:function(e){return r.ObjectUtils.getComponentDiffProps(e,b.defaultProps)}},g={defaultProps:{__TYPE:"Inplace",style:null,className:null,active:!1,closable:!1,closeIcon:null,disabled:!1,tabIndex:0,ariaLabel:null,onOpen:null,onClose:null,onToggle:null,children:void 0},getProps:function(e){return r.ObjectUtils.getMergedProps(e,g.defaultProps)},getOtherProps:function(e){return r.ObjectUtils.getDiffProps(e,g.defaultProps)}},m=function(e){return e.children},v=function(e){return e.children},y=a.forwardRef((function(e,o){var u,m,v=g.getProps(e),y=a.useState(v.active),O=(m=2,c(u=y)||s(u,m)||p(u,m)||f()),h=O[0],P=O[1],I=a.useRef(null),j=v.onToggle?v.active:h,C=function(e){v.disabled||(v.onOpen&&v.onOpen(e),v.onToggle?v.onToggle({originalEvent:e,value:!0}):P(!0))},E=function(e){v.onClose&&v.onClose(e),v.onToggle?v.onToggle({originalEvent:e,value:!1}):P(!1)},D=function(e){"Enter"===e.key&&(C(e),e.preventDefault())},N=function(e){var t=d.getOtherProps(e),n=r.classNames("p-inplace-display",{"p-disabled":v.disabled});return a.createElement("div",i({className:n},t,{onClick:C,onKeyDown:D,tabIndex:v.tabIndex,"aria-label":v.ariaLabel}),e)},T=function(e){var o,c,s=b.getOtherProps(e),u=(o=r.IconUtils.getJSXIcon(v.closeIcon||a.createElement(l.TimesIcon,null),void 0,{props:v}),c=t.localeOption("close"),v.closable?a.createElement(n.Button,{type:"button",className:"p-inplace-content-close",icon:o,onClick:E,"aria-label":c}):null);return a.createElement("div",i({className:"p-inplace-content"},s),e,u)};a.useImperativeHandle(o,(function(){return{props:v,getElement:function(){return I.current}}}));var _,w=g.getOtherProps(v),x=(_=["InplaceContent","InplaceDisplay"],a.Children.map(v.children,(function(e){return j&&r.ObjectUtils.isValidChild(e,"InplaceContent",_)?T(e):!j&&r.ObjectUtils.isValidChild(e,"InplaceDisplay",_)?N(e):void 0}))),U=r.classNames("p-inplace p-component",{"p-inplace-closable":v.closable},v.className);return a.createElement("div",i({ref:I,className:U},w),x)}));m.displayName="InplaceDisplay",v.displayName="InplaceContent",y.displayName="Inplace",exports.Inplace=y,exports.InplaceContent=v,exports.InplaceDisplay=m;
|
package/inplace/inplace.d.ts
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
*/
|
|
16
16
|
import * as React from 'react';
|
|
17
|
+
import { IconType } from '../utils/utils';
|
|
17
18
|
|
|
18
19
|
/**
|
|
19
20
|
* Custom toggle event.
|
|
@@ -55,6 +56,10 @@ export interface InplaceProps extends Omit<React.DetailedHTMLProps<React.HTMLAtt
|
|
|
55
56
|
* Used to define a string that labels the component.
|
|
56
57
|
*/
|
|
57
58
|
ariaLabel?: string | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* Icon of the close button.
|
|
61
|
+
*/
|
|
62
|
+
closeIcon?: IconType<InplaceProps> | undefined;
|
|
58
63
|
/**
|
|
59
64
|
* Callback to invoke when inplace is opened.
|
|
60
65
|
* @param {React.MouseEvent} event - Browser event.
|
package/inplace/inplace.esm.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { localeOption } from 'primereact/api';
|
|
3
3
|
import { Button } from 'primereact/button';
|
|
4
|
-
import { ObjectUtils, classNames } from 'primereact/utils';
|
|
4
|
+
import { ObjectUtils, classNames, IconUtils } from 'primereact/utils';
|
|
5
|
+
import { TimesIcon } from 'primereact/icons/times';
|
|
5
6
|
|
|
6
7
|
function _extends() {
|
|
7
8
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
@@ -98,6 +99,7 @@ var InplaceBase = {
|
|
|
98
99
|
className: null,
|
|
99
100
|
active: false,
|
|
100
101
|
closable: false,
|
|
102
|
+
closeIcon: null,
|
|
101
103
|
disabled: false,
|
|
102
104
|
tabIndex: 0,
|
|
103
105
|
ariaLabel: null,
|
|
@@ -174,13 +176,18 @@ var Inplace = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
174
176
|
}), content);
|
|
175
177
|
};
|
|
176
178
|
var createCloseButton = function createCloseButton() {
|
|
179
|
+
var icon = props.closeIcon || /*#__PURE__*/React.createElement(TimesIcon, null);
|
|
180
|
+
var closeIcon = IconUtils.getJSXIcon(icon, undefined, {
|
|
181
|
+
props: props
|
|
182
|
+
});
|
|
183
|
+
var ariaLabel = localeOption('close');
|
|
177
184
|
if (props.closable) {
|
|
178
185
|
return /*#__PURE__*/React.createElement(Button, {
|
|
179
186
|
type: "button",
|
|
180
187
|
className: "p-inplace-content-close",
|
|
181
|
-
icon:
|
|
188
|
+
icon: closeIcon,
|
|
182
189
|
onClick: close,
|
|
183
|
-
"aria-label":
|
|
190
|
+
"aria-label": ariaLabel
|
|
184
191
|
});
|
|
185
192
|
}
|
|
186
193
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{localeOption as n}from"primereact/api";import{Button as t}from"primereact/button";import{ObjectUtils as r,classNames as l}from"primereact/utils";function
|
|
1
|
+
import*as e from"react";import{localeOption as n}from"primereact/api";import{Button as t}from"primereact/button";import{ObjectUtils as r,classNames as l,IconUtils as o}from"primereact/utils";import{TimesIcon as a}from"primereact/icons/times";function i(){return i=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},i.apply(this,arguments)}function c(e){if(Array.isArray(e))return e}function p(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,l,o,a,i=[],c=!0,p=!1;try{if(o=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;c=!1}else for(;!(c=(r=o.call(t)).done)&&(i.push(r.value),i.length!==n);c=!0);}catch(e){p=!0,l=e}finally{try{if(!c&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(p)throw l}}return i}}function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function s(e,n){if(e){if("string"==typeof e)return u(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?u(e,n):void 0}}function f(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var d={defaultProps:{__TYPE:"InplaceDisplay",children:void 0},getOtherProps:function(e){return r.getComponentDiffProps(e,d.defaultProps)}},m={defaultProps:{__TYPE:"InplaceContent",children:void 0},getOtherProps:function(e){return r.getComponentDiffProps(e,m.defaultProps)}},g={defaultProps:{__TYPE:"Inplace",style:null,className:null,active:!1,closable:!1,closeIcon:null,disabled:!1,tabIndex:0,ariaLabel:null,onOpen:null,onClose:null,onToggle:null,children:void 0},getProps:function(e){return r.getMergedProps(e,g.defaultProps)},getOtherProps:function(e){return r.getDiffProps(e,g.defaultProps)}},v=function(e){return e.children},b=function(e){return e.children},y=e.forwardRef((function(u,v){var b,y,h=g.getProps(u),P=e.useState(h.active),I=(y=2,c(b=P)||p(b,y)||s(b,y)||f()),O=I[0],C=I[1],E=e.useRef(null),T=h.onToggle?h.active:O,D=function(e){h.disabled||(h.onOpen&&h.onOpen(e),h.onToggle?h.onToggle({originalEvent:e,value:!0}):C(!0))},N=function(e){h.onClose&&h.onClose(e),h.onToggle?h.onToggle({originalEvent:e,value:!1}):C(!1)},j=function(e){"Enter"===e.key&&(D(e),e.preventDefault())},w=function(n){var t=d.getOtherProps(n),r=l("p-inplace-display",{"p-disabled":h.disabled});return e.createElement("div",i({className:r},t,{onClick:D,onKeyDown:j,tabIndex:h.tabIndex,"aria-label":h.ariaLabel}),n)},S=function(r){var l,c,p=m.getOtherProps(r),u=(l=o.getJSXIcon(h.closeIcon||e.createElement(a,null),void 0,{props:h}),c=n("close"),h.closable?e.createElement(t,{type:"button",className:"p-inplace-content-close",icon:l,onClick:N,"aria-label":c}):null);return e.createElement("div",i({className:"p-inplace-content"},p),r,u)};e.useImperativeHandle(v,(function(){return{props:h,getElement:function(){return E.current}}}));var A,_=g.getOtherProps(h),x=(A=["InplaceContent","InplaceDisplay"],e.Children.map(h.children,(function(e){return T&&r.isValidChild(e,"InplaceContent",A)?S(e):!T&&r.isValidChild(e,"InplaceDisplay",A)?w(e):void 0}))),k=l("p-inplace p-component",{"p-inplace-closable":h.closable},h.className);return e.createElement("div",i({ref:E,className:k},_),x)}));v.displayName="InplaceDisplay",b.displayName="InplaceContent",y.displayName="Inplace";export{y as Inplace,b as InplaceContent,v as InplaceDisplay};
|