primereact 9.4.0 → 9.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/api.cjs.js +1 -0
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +7 -6
- package/api/api.esm.js +1 -0
- package/api/api.esm.min.js +1 -1
- package/api/api.js +1 -0
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +24 -6
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +4 -0
- package/autocomplete/autocomplete.esm.js +24 -6
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +24 -6
- package/autocomplete/autocomplete.min.css +1 -1
- package/autocomplete/autocomplete.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +87 -49
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.d.ts +53 -1
- package/breadcrumb/breadcrumb.esm.js +88 -50
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +88 -51
- package/breadcrumb/breadcrumb.min.css +1 -1
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/calendar/calendar.cjs.js +8 -1
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +5 -2
- package/calendar/calendar.esm.js +8 -1
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +8 -1
- package/calendar/calendar.min.js +1 -1
- package/carousel/carousel.cjs.js +135 -82
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.d.ts +113 -1
- package/carousel/carousel.esm.js +136 -83
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +136 -84
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +27 -23
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +5 -0
- package/cascadeselect/cascadeselect.esm.js +27 -23
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +28 -24
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +28 -43
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.d.ts +30 -0
- package/chart/chart.esm.js +15 -30
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +140 -156
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +21 -15
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +5 -0
- package/checkbox/checkbox.esm.js +22 -16
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +21 -15
- package/checkbox/checkbox.min.js +1 -1
- package/chips/chips.cjs.js +24 -17
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +5 -0
- package/chips/chips.esm.js +24 -17
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +25 -19
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +4 -0
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +5 -0
- package/colorpicker/colorpicker.esm.js +4 -0
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +4 -0
- package/colorpicker/colorpicker.min.js +1 -1
- package/confirmdialog/confirmdialog.cjs.js +2 -2
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +2 -2
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +2 -2
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +111 -61
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +92 -1
- package/contextmenu/contextmenu.esm.js +112 -62
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +112 -63
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +12873 -1829
- package/core/core.min.js +34 -34
- package/datatable/datatable.cjs.js +181 -175
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +181 -175
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +181 -175
- package/datatable/datatable.min.js +1 -1
- package/dock/dock.cjs.js +82 -45
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.d.ts +66 -0
- package/dock/dock.esm.js +83 -46
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +83 -47
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +2 -2
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +2 -2
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +3 -3
- package/dropdown/dropdown.min.js +1 -1
- package/fileupload/fileupload.cjs.js +168 -137
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +150 -1
- package/fileupload/fileupload.esm.js +169 -138
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +168 -137
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/galleria.cjs.js +131 -118
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.d.ts +156 -2
- package/galleria/galleria.esm.js +132 -119
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +130 -118
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.cjs.js +5 -1
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.esm.js +2 -1
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +6 -3
- package/hooks/hooks.min.js +1 -1
- package/icons/arrowdown/index.cjs.js +410 -2
- package/icons/arrowdown/index.cjs.min.js +1 -1
- package/icons/arrowdown/index.esm.js +410 -2
- package/icons/arrowdown/index.esm.min.js +1 -1
- package/icons/arrowdown/index.js +410 -2
- package/icons/arrowdown/index.min.js +1 -1
- package/icons/arrowup/index.cjs.js +410 -2
- package/icons/arrowup/index.cjs.min.js +1 -1
- package/icons/arrowup/index.esm.js +410 -2
- package/icons/arrowup/index.esm.min.js +1 -1
- package/icons/arrowup/index.js +410 -2
- package/icons/arrowup/index.min.js +1 -1
- package/icons/ban/index.cjs.js +410 -2
- package/icons/ban/index.cjs.min.js +1 -1
- package/icons/ban/index.esm.js +410 -2
- package/icons/ban/index.esm.min.js +1 -1
- package/icons/ban/index.js +410 -2
- package/icons/ban/index.min.js +1 -1
- package/icons/download/index.cjs.js +410 -2
- package/icons/download/index.cjs.min.js +1 -1
- package/icons/download/index.esm.js +410 -2
- package/icons/download/index.esm.min.js +1 -1
- package/icons/download/index.js +410 -2
- package/icons/download/index.min.js +1 -1
- package/icons/exclamationtriangle/index.cjs.js +410 -2
- package/icons/exclamationtriangle/index.cjs.min.js +1 -1
- package/icons/exclamationtriangle/index.esm.js +410 -2
- package/icons/exclamationtriangle/index.esm.min.js +1 -1
- package/icons/exclamationtriangle/index.js +410 -2
- package/icons/exclamationtriangle/index.min.js +1 -1
- package/icons/eyeslash/index.cjs.js +410 -2
- package/icons/eyeslash/index.cjs.min.js +1 -1
- package/icons/eyeslash/index.esm.js +410 -2
- package/icons/eyeslash/index.esm.min.js +1 -1
- package/icons/eyeslash/index.js +410 -2
- package/icons/eyeslash/index.min.js +1 -1
- package/icons/filter/index.cjs.js +410 -2
- package/icons/filter/index.cjs.min.js +1 -1
- package/icons/filter/index.esm.js +410 -2
- package/icons/filter/index.esm.min.js +1 -1
- package/icons/filter/index.js +410 -2
- package/icons/filter/index.min.js +1 -1
- package/icons/filterslash/index.cjs.js +410 -2
- package/icons/filterslash/index.cjs.min.js +1 -1
- package/icons/filterslash/index.esm.js +410 -2
- package/icons/filterslash/index.esm.min.js +1 -1
- package/icons/filterslash/index.js +410 -2
- package/icons/filterslash/index.min.js +1 -1
- package/icons/infocircle/index.cjs.js +410 -2
- package/icons/infocircle/index.cjs.min.js +1 -1
- package/icons/infocircle/index.esm.js +410 -2
- package/icons/infocircle/index.esm.min.js +1 -1
- package/icons/infocircle/index.js +410 -2
- package/icons/infocircle/index.min.js +1 -1
- package/icons/pencil/index.cjs.js +410 -2
- package/icons/pencil/index.cjs.min.js +1 -1
- package/icons/pencil/index.esm.js +410 -2
- package/icons/pencil/index.esm.min.js +1 -1
- package/icons/pencil/index.js +410 -2
- package/icons/pencil/index.min.js +1 -1
- package/icons/plus/index.cjs.js +410 -2
- package/icons/plus/index.cjs.min.js +1 -1
- package/icons/plus/index.esm.js +410 -2
- package/icons/plus/index.esm.min.js +1 -1
- package/icons/plus/index.js +410 -2
- package/icons/plus/index.min.js +1 -1
- package/icons/refresh/index.cjs.js +410 -2
- package/icons/refresh/index.cjs.min.js +1 -1
- package/icons/refresh/index.esm.js +410 -2
- package/icons/refresh/index.esm.min.js +1 -1
- package/icons/refresh/index.js +410 -2
- package/icons/refresh/index.min.js +1 -1
- package/icons/search/index.cjs.js +410 -2
- package/icons/search/index.cjs.min.js +1 -1
- package/icons/search/index.esm.js +410 -2
- package/icons/search/index.esm.min.js +1 -1
- package/icons/search/index.js +410 -2
- package/icons/search/index.min.js +1 -1
- package/icons/searchminus/index.cjs.js +410 -2
- package/icons/searchminus/index.cjs.min.js +1 -1
- package/icons/searchminus/index.esm.js +410 -2
- package/icons/searchminus/index.esm.min.js +1 -1
- package/icons/searchminus/index.js +410 -2
- package/icons/searchminus/index.min.js +1 -1
- package/icons/searchplus/index.cjs.js +410 -2
- package/icons/searchplus/index.cjs.min.js +1 -1
- package/icons/searchplus/index.esm.js +410 -2
- package/icons/searchplus/index.esm.min.js +1 -1
- package/icons/searchplus/index.js +410 -2
- package/icons/searchplus/index.min.js +1 -1
- package/icons/sortalt/index.cjs.js +410 -2
- package/icons/sortalt/index.cjs.min.js +1 -1
- package/icons/sortalt/index.esm.js +410 -2
- package/icons/sortalt/index.esm.min.js +1 -1
- package/icons/sortalt/index.js +410 -2
- package/icons/sortalt/index.min.js +1 -1
- package/icons/sortamountdown/index.cjs.js +410 -2
- package/icons/sortamountdown/index.cjs.min.js +1 -1
- package/icons/sortamountdown/index.esm.js +410 -2
- package/icons/sortamountdown/index.esm.min.js +1 -1
- package/icons/sortamountdown/index.js +410 -2
- package/icons/sortamountdown/index.min.js +1 -1
- package/icons/sortamountupalt/index.cjs.js +410 -2
- package/icons/sortamountupalt/index.cjs.min.js +1 -1
- package/icons/sortamountupalt/index.esm.js +410 -2
- package/icons/sortamountupalt/index.esm.min.js +1 -1
- package/icons/sortamountupalt/index.js +410 -2
- package/icons/sortamountupalt/index.min.js +1 -1
- package/icons/spinner/index.cjs.js +410 -2
- package/icons/spinner/index.cjs.min.js +1 -1
- package/icons/spinner/index.esm.js +410 -2
- package/icons/spinner/index.esm.min.js +1 -1
- package/icons/spinner/index.js +410 -2
- package/icons/spinner/index.min.js +1 -1
- package/icons/star/index.cjs.js +410 -2
- package/icons/star/index.cjs.min.js +1 -1
- package/icons/star/index.esm.js +410 -2
- package/icons/star/index.esm.min.js +1 -1
- package/icons/star/index.js +410 -2
- package/icons/star/index.min.js +1 -1
- package/icons/starfill/index.cjs.js +410 -2
- package/icons/starfill/index.cjs.min.js +1 -1
- package/icons/starfill/index.esm.js +410 -2
- package/icons/starfill/index.esm.min.js +1 -1
- package/icons/starfill/index.js +410 -2
- package/icons/starfill/index.min.js +1 -1
- package/icons/thlarge/index.cjs.js +410 -2
- package/icons/thlarge/index.cjs.min.js +1 -1
- package/icons/thlarge/index.esm.js +410 -2
- package/icons/thlarge/index.esm.min.js +1 -1
- package/icons/thlarge/index.js +410 -2
- package/icons/thlarge/index.min.js +1 -1
- package/icons/timescircle/index.cjs.js +410 -2
- package/icons/timescircle/index.cjs.min.js +1 -1
- package/icons/timescircle/index.esm.js +410 -2
- package/icons/timescircle/index.esm.min.js +1 -1
- package/icons/timescircle/index.js +410 -2
- package/icons/timescircle/index.min.js +1 -1
- package/icons/trash/index.cjs.js +410 -2
- package/icons/trash/index.cjs.min.js +1 -1
- package/icons/trash/index.esm.js +410 -2
- package/icons/trash/index.esm.min.js +1 -1
- package/icons/trash/index.js +410 -2
- package/icons/trash/index.min.js +1 -1
- package/icons/undo/index.cjs.js +410 -2
- package/icons/undo/index.cjs.min.js +1 -1
- package/icons/undo/index.esm.js +410 -2
- package/icons/undo/index.esm.min.js +1 -1
- package/icons/undo/index.js +410 -2
- package/icons/undo/index.min.js +1 -1
- package/icons/upload/index.cjs.js +410 -2
- package/icons/upload/index.cjs.min.js +1 -1
- package/icons/upload/index.esm.js +410 -2
- package/icons/upload/index.esm.min.js +1 -1
- package/icons/upload/index.js +410 -2
- package/icons/upload/index.min.js +1 -1
- package/icons/windowmaximize/index.cjs.js +410 -2
- package/icons/windowmaximize/index.cjs.min.js +1 -1
- package/icons/windowmaximize/index.esm.js +410 -2
- package/icons/windowmaximize/index.esm.min.js +1 -1
- package/icons/windowmaximize/index.js +410 -2
- package/icons/windowmaximize/index.min.js +1 -1
- package/icons/windowminimize/index.cjs.js +410 -2
- package/icons/windowminimize/index.cjs.min.js +1 -1
- package/icons/windowminimize/index.esm.js +410 -2
- package/icons/windowminimize/index.esm.min.js +1 -1
- package/icons/windowminimize/index.js +410 -2
- package/icons/windowminimize/index.min.js +1 -1
- package/image/image.cjs.js +472 -78
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +130 -3
- package/image/image.esm.js +474 -80
- package/image/image.esm.min.js +1 -1
- package/image/image.js +473 -80
- package/image/image.min.js +1 -1
- package/inputmask/inputmask.cjs.js +18 -16
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +18 -16
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +18 -16
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +0 -2
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +0 -2
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +0 -2
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +7 -0
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.d.ts +5 -0
- package/inputswitch/inputswitch.esm.js +7 -0
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +8 -2
- package/inputswitch/inputswitch.min.js +1 -1
- package/megamenu/megamenu.cjs.js +147 -96
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.d.ts +142 -2
- package/megamenu/megamenu.esm.js +147 -96
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +145 -95
- package/megamenu/megamenu.min.js +1 -1
- package/menu/menu.cjs.js +94 -55
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +71 -0
- package/menu/menu.esm.js +95 -56
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +95 -57
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +118 -110
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.d.ts +94 -1
- package/menubar/menubar.esm.js +119 -111
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +119 -112
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +66 -46
- package/message/message.cjs.min.js +1 -1
- package/message/message.d.ts +35 -2
- package/message/message.esm.js +67 -47
- package/message/message.esm.min.js +1 -1
- package/message/message.js +67 -48
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +63 -62
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +51 -2
- package/messages/messages.esm.js +63 -62
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +63 -63
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +32 -29
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +5 -0
- package/multiselect/multiselect.esm.js +33 -30
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +32 -29
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +15 -11
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +5 -0
- package/multistatecheckbox/multistatecheckbox.esm.js +15 -11
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +15 -11
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.d.ts +3 -3
- package/panelmenu/panelmenu.cjs.js +145 -83
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +124 -2
- package/panelmenu/panelmenu.esm.js +145 -83
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +144 -83
- package/panelmenu/panelmenu.min.js +1 -1
- package/primereact.all.cjs.js +2250 -1578
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +2250 -1578
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +2250 -1578
- package/primereact.all.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +16 -9
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.d.ts +5 -0
- package/radiobutton/radiobutton.esm.js +16 -9
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +17 -11
- package/radiobutton/radiobutton.min.js +1 -1
- package/resources/primereact.css +275 -267
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +13 -7
- package/resources/themes/arya-green/theme.css +13 -7
- package/resources/themes/arya-orange/theme.css +13 -7
- package/resources/themes/arya-purple/theme.css +13 -7
- package/resources/themes/bootstrap4-dark-blue/theme.css +13 -7
- package/resources/themes/bootstrap4-dark-purple/theme.css +13 -7
- package/resources/themes/bootstrap4-light-blue/theme.css +13 -7
- package/resources/themes/bootstrap4-light-purple/theme.css +13 -7
- package/resources/themes/fluent-light/theme.css +13 -7
- package/resources/themes/lara-dark-blue/theme.css +13 -7
- package/resources/themes/lara-dark-indigo/theme.css +13 -7
- package/resources/themes/lara-dark-purple/theme.css +13 -7
- package/resources/themes/lara-dark-teal/theme.css +13 -7
- package/resources/themes/lara-light-blue/theme.css +13 -7
- package/resources/themes/lara-light-indigo/theme.css +13 -7
- package/resources/themes/lara-light-purple/theme.css +13 -7
- package/resources/themes/lara-light-teal/theme.css +13 -7
- package/resources/themes/luna-amber/theme.css +13 -7
- package/resources/themes/luna-blue/theme.css +13 -7
- package/resources/themes/luna-green/theme.css +13 -7
- package/resources/themes/luna-pink/theme.css +13 -7
- package/resources/themes/md-dark-deeppurple/theme.css +13 -7
- package/resources/themes/md-dark-indigo/theme.css +13 -7
- package/resources/themes/md-light-deeppurple/theme.css +13 -7
- package/resources/themes/md-light-indigo/theme.css +13 -7
- package/resources/themes/mdc-dark-deeppurple/theme.css +13 -7
- package/resources/themes/mdc-dark-indigo/theme.css +13 -7
- package/resources/themes/mdc-light-deeppurple/theme.css +13 -7
- package/resources/themes/mdc-light-indigo/theme.css +13 -7
- package/resources/themes/mira/theme.css +13 -7
- package/resources/themes/nano/theme.css +13 -7
- package/resources/themes/nova/theme.css +13 -7
- package/resources/themes/nova-accent/theme.css +13 -7
- package/resources/themes/nova-alt/theme.css +13 -7
- package/resources/themes/rhea/theme.css +13 -7
- package/resources/themes/saga-blue/theme.css +13 -7
- package/resources/themes/saga-green/theme.css +13 -7
- package/resources/themes/saga-orange/theme.css +13 -7
- package/resources/themes/saga-purple/theme.css +13 -7
- package/resources/themes/soho-dark/theme.css +13 -7
- package/resources/themes/soho-light/theme.css +13 -7
- package/resources/themes/tailwind-light/theme.css +13 -7
- package/resources/themes/vela-blue/theme.css +13 -7
- package/resources/themes/vela-green/theme.css +13 -7
- package/resources/themes/vela-orange/theme.css +13 -7
- package/resources/themes/vela-purple/theme.css +13 -7
- package/resources/themes/viva-dark/theme.css +13 -7
- package/resources/themes/viva-light/theme.css +13 -7
- package/slidemenu/slidemenu.cjs.js +121 -111
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +98 -1
- package/slidemenu/slidemenu.esm.js +122 -112
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +122 -113
- package/slidemenu/slidemenu.min.js +1 -1
- package/steps/steps.cjs.js +78 -45
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.d.ts +50 -0
- package/steps/steps.esm.js +79 -46
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +79 -47
- package/steps/steps.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +83 -47
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.d.ts +62 -0
- package/tabmenu/tabmenu.esm.js +84 -48
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +84 -49
- package/tabmenu/tabmenu.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +104 -59
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +83 -2
- package/tieredmenu/tieredmenu.esm.js +105 -60
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +105 -61
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/toast/toast.cjs.js +72 -71
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +120 -2
- package/toast/toast.esm.js +73 -72
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +70 -70
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +6 -0
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +6 -0
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +7 -2
- package/togglebutton/togglebutton.min.js +1 -1
- package/treeselect/treeselect.cjs.js +3 -0
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +5 -0
- package/treeselect/treeselect.esm.js +3 -0
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +3 -0
- package/treeselect/treeselect.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +14 -7
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.d.ts +5 -0
- package/tristatecheckbox/tristatecheckbox.esm.js +14 -7
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +15 -9
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +25 -4
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +1 -1
- package/utils/utils.esm.js +22 -4
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +26 -6
- package/utils/utils.min.js +1 -1
- package/web-types.json +1 -1
package/image/image.esm.js
CHANGED
|
@@ -10,7 +10,8 @@ import { SearchPlusIcon } from 'primereact/icons/searchplus';
|
|
|
10
10
|
import { TimesIcon } from 'primereact/icons/times';
|
|
11
11
|
import { UndoIcon } from 'primereact/icons/undo';
|
|
12
12
|
import { Portal } from 'primereact/portal';
|
|
13
|
-
import {
|
|
13
|
+
import { ZIndexUtils, classNames, mergeProps, IconUtils, ObjectUtils as ObjectUtils$1, DomHandler } from 'primereact/utils';
|
|
14
|
+
import { ComponentBase } from 'primereact/componentbase';
|
|
14
15
|
|
|
15
16
|
function _extends() {
|
|
16
17
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
@@ -27,6 +28,47 @@ function _extends() {
|
|
|
27
28
|
return _extends.apply(this, arguments);
|
|
28
29
|
}
|
|
29
30
|
|
|
31
|
+
function _typeof(obj) {
|
|
32
|
+
"@babel/helpers - typeof";
|
|
33
|
+
|
|
34
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
35
|
+
return typeof obj;
|
|
36
|
+
} : function (obj) {
|
|
37
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
38
|
+
}, _typeof(obj);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function _toPrimitive(input, hint) {
|
|
42
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
43
|
+
var prim = input[Symbol.toPrimitive];
|
|
44
|
+
if (prim !== undefined) {
|
|
45
|
+
var res = prim.call(input, hint || "default");
|
|
46
|
+
if (_typeof(res) !== "object") return res;
|
|
47
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
48
|
+
}
|
|
49
|
+
return (hint === "string" ? String : Number)(input);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function _toPropertyKey(arg) {
|
|
53
|
+
var key = _toPrimitive(arg, "string");
|
|
54
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function _defineProperty(obj, key, value) {
|
|
58
|
+
key = _toPropertyKey(key);
|
|
59
|
+
if (key in obj) {
|
|
60
|
+
Object.defineProperty(obj, key, {
|
|
61
|
+
value: value,
|
|
62
|
+
enumerable: true,
|
|
63
|
+
configurable: true,
|
|
64
|
+
writable: true
|
|
65
|
+
});
|
|
66
|
+
} else {
|
|
67
|
+
obj[key] = value;
|
|
68
|
+
}
|
|
69
|
+
return obj;
|
|
70
|
+
}
|
|
71
|
+
|
|
30
72
|
function _arrayWithHoles(arr) {
|
|
31
73
|
if (Array.isArray(arr)) return arr;
|
|
32
74
|
}
|
|
@@ -82,8 +124,335 @@ function _slicedToArray(arr, i) {
|
|
|
82
124
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
83
125
|
}
|
|
84
126
|
|
|
127
|
+
function _classCallCheck(instance, Constructor) {
|
|
128
|
+
if (!(instance instanceof Constructor)) {
|
|
129
|
+
throw new TypeError("Cannot call a class as a function");
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function _defineProperties(target, props) {
|
|
134
|
+
for (var i = 0; i < props.length; i++) {
|
|
135
|
+
var descriptor = props[i];
|
|
136
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
137
|
+
descriptor.configurable = true;
|
|
138
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
139
|
+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
143
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
144
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
145
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
146
|
+
writable: false
|
|
147
|
+
});
|
|
148
|
+
return Constructor;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
var ObjectUtils = /*#__PURE__*/function () {
|
|
152
|
+
function ObjectUtils() {
|
|
153
|
+
_classCallCheck(this, ObjectUtils);
|
|
154
|
+
}
|
|
155
|
+
_createClass(ObjectUtils, null, [{
|
|
156
|
+
key: "equals",
|
|
157
|
+
value: function equals(obj1, obj2, field) {
|
|
158
|
+
if (field && obj1 && _typeof(obj1) === 'object' && obj2 && _typeof(obj2) === 'object') return this.resolveFieldData(obj1, field) === this.resolveFieldData(obj2, field);else return this.deepEquals(obj1, obj2);
|
|
159
|
+
}
|
|
160
|
+
}, {
|
|
161
|
+
key: "deepEquals",
|
|
162
|
+
value: function deepEquals(a, b) {
|
|
163
|
+
if (a === b) return true;
|
|
164
|
+
if (a && b && _typeof(a) == 'object' && _typeof(b) == 'object') {
|
|
165
|
+
var arrA = Array.isArray(a),
|
|
166
|
+
arrB = Array.isArray(b),
|
|
167
|
+
i,
|
|
168
|
+
length,
|
|
169
|
+
key;
|
|
170
|
+
if (arrA && arrB) {
|
|
171
|
+
length = a.length;
|
|
172
|
+
if (length !== b.length) return false;
|
|
173
|
+
for (i = length; i-- !== 0;) if (!this.deepEquals(a[i], b[i])) return false;
|
|
174
|
+
return true;
|
|
175
|
+
}
|
|
176
|
+
if (arrA !== arrB) return false;
|
|
177
|
+
var dateA = a instanceof Date,
|
|
178
|
+
dateB = b instanceof Date;
|
|
179
|
+
if (dateA !== dateB) return false;
|
|
180
|
+
if (dateA && dateB) return a.getTime() === b.getTime();
|
|
181
|
+
var regexpA = a instanceof RegExp,
|
|
182
|
+
regexpB = b instanceof RegExp;
|
|
183
|
+
if (regexpA !== regexpB) return false;
|
|
184
|
+
if (regexpA && regexpB) return a.toString() === b.toString();
|
|
185
|
+
var keys = Object.keys(a);
|
|
186
|
+
length = keys.length;
|
|
187
|
+
if (length !== Object.keys(b).length) return false;
|
|
188
|
+
for (i = length; i-- !== 0;) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
189
|
+
for (i = length; i-- !== 0;) {
|
|
190
|
+
key = keys[i];
|
|
191
|
+
if (!this.deepEquals(a[key], b[key])) return false;
|
|
192
|
+
}
|
|
193
|
+
return true;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/*eslint no-self-compare: "off"*/
|
|
197
|
+
return a !== a && b !== b;
|
|
198
|
+
}
|
|
199
|
+
}, {
|
|
200
|
+
key: "resolveFieldData",
|
|
201
|
+
value: function resolveFieldData(data, field) {
|
|
202
|
+
if (data && Object.keys(data).length && field) {
|
|
203
|
+
if (this.isFunction(field)) {
|
|
204
|
+
return field(data);
|
|
205
|
+
} else if (ObjectUtils.isNotEmpty(data[field])) {
|
|
206
|
+
return data[field];
|
|
207
|
+
} else if (field.indexOf('.') === -1) {
|
|
208
|
+
return data[field];
|
|
209
|
+
} else {
|
|
210
|
+
var fields = field.split('.');
|
|
211
|
+
var value = data;
|
|
212
|
+
for (var i = 0, len = fields.length; i < len; ++i) {
|
|
213
|
+
if (value == null) {
|
|
214
|
+
return null;
|
|
215
|
+
}
|
|
216
|
+
value = value[fields[i]];
|
|
217
|
+
}
|
|
218
|
+
return value;
|
|
219
|
+
}
|
|
220
|
+
} else {
|
|
221
|
+
return null;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}, {
|
|
225
|
+
key: "isFunction",
|
|
226
|
+
value: function isFunction(obj) {
|
|
227
|
+
return !!(obj && obj.constructor && obj.call && obj.apply);
|
|
228
|
+
}
|
|
229
|
+
}, {
|
|
230
|
+
key: "isLetter",
|
|
231
|
+
value: function isLetter(_char) {
|
|
232
|
+
return _char && (_char.toUpperCase() != _char.toLowerCase() || _char.codePointAt(0) > 127);
|
|
233
|
+
}
|
|
234
|
+
}, {
|
|
235
|
+
key: "findDiffKeys",
|
|
236
|
+
value: function findDiffKeys(obj1, obj2) {
|
|
237
|
+
if (!obj1 || !obj2) {
|
|
238
|
+
return {};
|
|
239
|
+
}
|
|
240
|
+
return Object.keys(obj1).filter(function (key) {
|
|
241
|
+
return !obj2.hasOwnProperty(key);
|
|
242
|
+
}).reduce(function (result, current) {
|
|
243
|
+
result[current] = obj1[current];
|
|
244
|
+
return result;
|
|
245
|
+
}, {});
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Removes keys from a JSON object that start with a string such as "data" to get all "data-id" type properties.
|
|
250
|
+
*
|
|
251
|
+
* @param {any} obj the JSON object to reduce
|
|
252
|
+
* @param {string[]} startsWiths the string(s) to check if the property starts with this key
|
|
253
|
+
* @returns the JSON object containing only the key/values that match the startsWith string
|
|
254
|
+
*/
|
|
255
|
+
}, {
|
|
256
|
+
key: "reduceKeys",
|
|
257
|
+
value: function reduceKeys(obj, startsWiths) {
|
|
258
|
+
var result = {};
|
|
259
|
+
if (!obj || !startsWiths || startsWiths.length === 0) {
|
|
260
|
+
return result;
|
|
261
|
+
}
|
|
262
|
+
Object.keys(obj).filter(function (key) {
|
|
263
|
+
return startsWiths.some(function (value) {
|
|
264
|
+
return key.startsWith(value);
|
|
265
|
+
});
|
|
266
|
+
}).forEach(function (key) {
|
|
267
|
+
result[key] = obj[key];
|
|
268
|
+
delete obj[key];
|
|
269
|
+
});
|
|
270
|
+
return result;
|
|
271
|
+
}
|
|
272
|
+
}, {
|
|
273
|
+
key: "reorderArray",
|
|
274
|
+
value: function reorderArray(value, from, to) {
|
|
275
|
+
if (value && from !== to) {
|
|
276
|
+
if (to >= value.length) {
|
|
277
|
+
to %= value.length;
|
|
278
|
+
from %= value.length;
|
|
279
|
+
}
|
|
280
|
+
value.splice(to, 0, value.splice(from, 1)[0]);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}, {
|
|
284
|
+
key: "findIndexInList",
|
|
285
|
+
value: function findIndexInList(value, list, dataKey) {
|
|
286
|
+
var _this = this;
|
|
287
|
+
if (list) {
|
|
288
|
+
return dataKey ? list.findIndex(function (item) {
|
|
289
|
+
return _this.equals(item, value, dataKey);
|
|
290
|
+
}) : list.findIndex(function (item) {
|
|
291
|
+
return item === value;
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
return -1;
|
|
295
|
+
}
|
|
296
|
+
}, {
|
|
297
|
+
key: "getJSXElement",
|
|
298
|
+
value: function getJSXElement(obj) {
|
|
299
|
+
for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
300
|
+
params[_key - 1] = arguments[_key];
|
|
301
|
+
}
|
|
302
|
+
return this.isFunction(obj) ? obj.apply(void 0, params) : obj;
|
|
303
|
+
}
|
|
304
|
+
}, {
|
|
305
|
+
key: "getProp",
|
|
306
|
+
value: function getProp(props) {
|
|
307
|
+
var prop = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
308
|
+
var defaultProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
309
|
+
var value = props ? props[prop] : undefined;
|
|
310
|
+
return value === undefined ? defaultProps[prop] : value;
|
|
311
|
+
}
|
|
312
|
+
}, {
|
|
313
|
+
key: "getMergedProps",
|
|
314
|
+
value: function getMergedProps(props, defaultProps) {
|
|
315
|
+
return Object.assign({}, defaultProps, props);
|
|
316
|
+
}
|
|
317
|
+
}, {
|
|
318
|
+
key: "getDiffProps",
|
|
319
|
+
value: function getDiffProps(props, defaultProps) {
|
|
320
|
+
return this.findDiffKeys(props, defaultProps);
|
|
321
|
+
}
|
|
322
|
+
}, {
|
|
323
|
+
key: "getPropValue",
|
|
324
|
+
value: function getPropValue(obj) {
|
|
325
|
+
for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
326
|
+
params[_key2 - 1] = arguments[_key2];
|
|
327
|
+
}
|
|
328
|
+
return this.isFunction(obj) ? obj.apply(void 0, params) : obj;
|
|
329
|
+
}
|
|
330
|
+
}, {
|
|
331
|
+
key: "getComponentProp",
|
|
332
|
+
value: function getComponentProp(component) {
|
|
333
|
+
var prop = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
334
|
+
var defaultProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
335
|
+
return this.isNotEmpty(component) ? this.getProp(component.props, prop, defaultProps) : undefined;
|
|
336
|
+
}
|
|
337
|
+
}, {
|
|
338
|
+
key: "getComponentProps",
|
|
339
|
+
value: function getComponentProps(component, defaultProps) {
|
|
340
|
+
return this.isNotEmpty(component) ? this.getMergedProps(component.props, defaultProps) : undefined;
|
|
341
|
+
}
|
|
342
|
+
}, {
|
|
343
|
+
key: "getComponentDiffProps",
|
|
344
|
+
value: function getComponentDiffProps(component, defaultProps) {
|
|
345
|
+
return this.isNotEmpty(component) ? this.getDiffProps(component.props, defaultProps) : undefined;
|
|
346
|
+
}
|
|
347
|
+
}, {
|
|
348
|
+
key: "isValidChild",
|
|
349
|
+
value: function isValidChild(child, type, validTypes) {
|
|
350
|
+
/* eslint-disable */
|
|
351
|
+
if (child) {
|
|
352
|
+
var childType = this.getComponentProp(child, '__TYPE') || (child.type ? child.type.displayName : undefined);
|
|
353
|
+
var isValid = childType === type;
|
|
354
|
+
try {
|
|
355
|
+
var messageTypes; if ("production" !== 'production' && !isValid) ;
|
|
356
|
+
} catch (error) {
|
|
357
|
+
// NOOP
|
|
358
|
+
}
|
|
359
|
+
return isValid;
|
|
360
|
+
}
|
|
361
|
+
return false;
|
|
362
|
+
/* eslint-enable */
|
|
363
|
+
}
|
|
364
|
+
}, {
|
|
365
|
+
key: "getRefElement",
|
|
366
|
+
value: function getRefElement(ref) {
|
|
367
|
+
if (ref) {
|
|
368
|
+
return _typeof(ref) === 'object' && ref.hasOwnProperty('current') ? ref.current : ref;
|
|
369
|
+
}
|
|
370
|
+
return null;
|
|
371
|
+
}
|
|
372
|
+
}, {
|
|
373
|
+
key: "combinedRefs",
|
|
374
|
+
value: function combinedRefs(innerRef, forwardRef) {
|
|
375
|
+
if (innerRef && forwardRef) {
|
|
376
|
+
if (typeof forwardRef === 'function') {
|
|
377
|
+
forwardRef(innerRef.current);
|
|
378
|
+
} else {
|
|
379
|
+
forwardRef.current = innerRef.current;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}, {
|
|
384
|
+
key: "removeAccents",
|
|
385
|
+
value: function removeAccents(str) {
|
|
386
|
+
if (str && str.search(/[\xC0-\xFF]/g) > -1) {
|
|
387
|
+
str = str.replace(/[\xC0-\xC5]/g, 'A').replace(/[\xC6]/g, 'AE').replace(/[\xC7]/g, 'C').replace(/[\xC8-\xCB]/g, 'E').replace(/[\xCC-\xCF]/g, 'I').replace(/[\xD0]/g, 'D').replace(/[\xD1]/g, 'N').replace(/[\xD2-\xD6\xD8]/g, 'O').replace(/[\xD9-\xDC]/g, 'U').replace(/[\xDD]/g, 'Y').replace(/[\xDE]/g, 'P').replace(/[\xE0-\xE5]/g, 'a').replace(/[\xE6]/g, 'ae').replace(/[\xE7]/g, 'c').replace(/[\xE8-\xEB]/g, 'e').replace(/[\xEC-\xEF]/g, 'i').replace(/[\xF1]/g, 'n').replace(/[\xF2-\xF6\xF8]/g, 'o').replace(/[\xF9-\xFC]/g, 'u').replace(/[\xFE]/g, 'p').replace(/[\xFD\xFF]/g, 'y');
|
|
388
|
+
}
|
|
389
|
+
return str;
|
|
390
|
+
}
|
|
391
|
+
}, {
|
|
392
|
+
key: "convertToFlatCase",
|
|
393
|
+
value: function convertToFlatCase(str) {
|
|
394
|
+
// convert snake, kebab, camel and pascal cases to flat case
|
|
395
|
+
return this.isNotEmpty(str) ? str.replace(/(-|_)/g, '').toLowerCase() : str;
|
|
396
|
+
}
|
|
397
|
+
}, {
|
|
398
|
+
key: "isEmpty",
|
|
399
|
+
value: function isEmpty(value) {
|
|
400
|
+
return value === null || value === undefined || value === '' || Array.isArray(value) && value.length === 0 || !(value instanceof Date) && _typeof(value) === 'object' && Object.keys(value).length === 0;
|
|
401
|
+
}
|
|
402
|
+
}, {
|
|
403
|
+
key: "isNotEmpty",
|
|
404
|
+
value: function isNotEmpty(value) {
|
|
405
|
+
return !this.isEmpty(value);
|
|
406
|
+
}
|
|
407
|
+
}, {
|
|
408
|
+
key: "sort",
|
|
409
|
+
value: function sort(value1, value2) {
|
|
410
|
+
var order = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
411
|
+
var locale = arguments.length > 3 ? arguments[3] : undefined;
|
|
412
|
+
var nullSortOrder = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
|
|
413
|
+
var result = ObjectUtils.compare(value1, value2, locale, order);
|
|
414
|
+
var finalSortOrder = order;
|
|
415
|
+
|
|
416
|
+
// nullSortOrder == 1 means Excel like sort nulls at bottom
|
|
417
|
+
if (ObjectUtils.isEmpty(value1) || ObjectUtils.isEmpty(value2)) {
|
|
418
|
+
finalSortOrder = nullSortOrder === 1 ? order : nullSortOrder;
|
|
419
|
+
}
|
|
420
|
+
return finalSortOrder * result;
|
|
421
|
+
}
|
|
422
|
+
}, {
|
|
423
|
+
key: "compare",
|
|
424
|
+
value: function compare(value1, value2, locale) {
|
|
425
|
+
var order = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
|
|
426
|
+
var result = -1;
|
|
427
|
+
var emptyValue1 = ObjectUtils.isEmpty(value1);
|
|
428
|
+
var emptyValue2 = ObjectUtils.isEmpty(value2);
|
|
429
|
+
if (emptyValue1 && emptyValue2) result = 0;else if (emptyValue1) result = order;else if (emptyValue2) result = -order;else if (typeof value1 === 'string' && typeof value2 === 'string') result = value1.localeCompare(value2, locale, {
|
|
430
|
+
numeric: true
|
|
431
|
+
});else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;
|
|
432
|
+
return result;
|
|
433
|
+
}
|
|
434
|
+
}]);
|
|
435
|
+
return ObjectUtils;
|
|
436
|
+
}();
|
|
437
|
+
|
|
438
|
+
var lastId = 0;
|
|
439
|
+
function UniqueComponentId() {
|
|
440
|
+
var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'pr_id_';
|
|
441
|
+
lastId++;
|
|
442
|
+
return "".concat(prefix).concat(lastId);
|
|
443
|
+
}
|
|
444
|
+
|
|
85
445
|
var DownloadIcon = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
86
446
|
var pti = IconBase.getPTI(inProps);
|
|
447
|
+
var _React$useState = React.useState(inProps.id),
|
|
448
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
449
|
+
pathId = _React$useState2[0],
|
|
450
|
+
setPathId = _React$useState2[1];
|
|
451
|
+
React.useEffect(function () {
|
|
452
|
+
if (ObjectUtils.isEmpty(pathId)) {
|
|
453
|
+
setPathId(UniqueComponentId('pr_icon_clip_'));
|
|
454
|
+
}
|
|
455
|
+
}, [pathId]);
|
|
87
456
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
88
457
|
ref: ref,
|
|
89
458
|
width: "14",
|
|
@@ -92,14 +461,14 @@ var DownloadIcon = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functi
|
|
|
92
461
|
fill: "none",
|
|
93
462
|
xmlns: "http://www.w3.org/2000/svg"
|
|
94
463
|
}, pti), /*#__PURE__*/React.createElement("g", {
|
|
95
|
-
clipPath: "url(#
|
|
464
|
+
clipPath: "url(#".concat(pathId, ")")
|
|
96
465
|
}, /*#__PURE__*/React.createElement("path", {
|
|
97
466
|
fillRule: "evenodd",
|
|
98
467
|
clipRule: "evenodd",
|
|
99
468
|
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",
|
|
100
469
|
fill: "currentColor"
|
|
101
470
|
})), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
|
|
102
|
-
id:
|
|
471
|
+
id: pathId
|
|
103
472
|
}, /*#__PURE__*/React.createElement("rect", {
|
|
104
473
|
width: "14",
|
|
105
474
|
height: "14",
|
|
@@ -108,7 +477,7 @@ var DownloadIcon = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functi
|
|
|
108
477
|
}));
|
|
109
478
|
DownloadIcon.displayName = 'DownloadIcon';
|
|
110
479
|
|
|
111
|
-
var ImageBase = {
|
|
480
|
+
var ImageBase = ComponentBase.extend({
|
|
112
481
|
defaultProps: {
|
|
113
482
|
__TYPE: 'Image',
|
|
114
483
|
alt: null,
|
|
@@ -138,15 +507,11 @@ var ImageBase = {
|
|
|
138
507
|
zoomOutIcon: null,
|
|
139
508
|
zoomSrc: null,
|
|
140
509
|
children: undefined
|
|
141
|
-
},
|
|
142
|
-
getProps: function getProps(props) {
|
|
143
|
-
return ObjectUtils.getMergedProps(props, ImageBase.defaultProps);
|
|
144
|
-
},
|
|
145
|
-
getOtherProps: function getOtherProps(props) {
|
|
146
|
-
return ObjectUtils.getDiffProps(props, ImageBase.defaultProps);
|
|
147
510
|
}
|
|
148
|
-
};
|
|
511
|
+
});
|
|
149
512
|
|
|
513
|
+
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; }
|
|
514
|
+
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
515
|
var Image = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
151
516
|
var props = ImageBase.getProps(inProps);
|
|
152
517
|
var _React$useState = React.useState(false),
|
|
@@ -170,6 +535,16 @@ var Image = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inP
|
|
|
170
535
|
var maskRef = React.useRef(null);
|
|
171
536
|
var previewRef = React.useRef(null);
|
|
172
537
|
var previewClick = React.useRef(false);
|
|
538
|
+
var _ImageBase$setMetaDat = ImageBase.setMetaData({
|
|
539
|
+
props: props,
|
|
540
|
+
state: {
|
|
541
|
+
maskVisible: maskVisibleState,
|
|
542
|
+
previewVisible: previewVisibleState,
|
|
543
|
+
rotate: rotateState,
|
|
544
|
+
scale: scaleState
|
|
545
|
+
}
|
|
546
|
+
}),
|
|
547
|
+
ptm = _ImageBase$setMetaDat.ptm;
|
|
173
548
|
var show = function show() {
|
|
174
549
|
if (props.preview) {
|
|
175
550
|
setMaskVisibleState(true);
|
|
@@ -242,11 +617,12 @@ var Image = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inP
|
|
|
242
617
|
maskRef.current && ZIndexUtils.clear(maskRef.current);
|
|
243
618
|
});
|
|
244
619
|
var createPreview = function createPreview() {
|
|
620
|
+
var buttonProps = mergeProps({
|
|
621
|
+
className: 'p-image-preview-indicator',
|
|
622
|
+
onClick: show
|
|
623
|
+
}, ptm('button'));
|
|
245
624
|
if (props.preview) {
|
|
246
|
-
return /*#__PURE__*/React.createElement("div",
|
|
247
|
-
className: "p-image-preview-indicator",
|
|
248
|
-
onClick: show
|
|
249
|
-
}, content);
|
|
625
|
+
return /*#__PURE__*/React.createElement("div", buttonProps, content);
|
|
250
626
|
}
|
|
251
627
|
return null;
|
|
252
628
|
};
|
|
@@ -260,59 +636,86 @@ var Image = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inP
|
|
|
260
636
|
var imagePreviewStyle = {
|
|
261
637
|
transform: 'rotate(' + rotateState + 'deg) scale(' + scaleState + ')'
|
|
262
638
|
};
|
|
263
|
-
var
|
|
264
|
-
|
|
265
|
-
var
|
|
639
|
+
var zoomOutDisabled = scaleState <= 0.5;
|
|
640
|
+
var zoomInDisabled = scaleState >= 1.5;
|
|
641
|
+
var downloadIconProps = mergeProps(ptm('downloadIcon'));
|
|
642
|
+
var rotateRightIconProps = mergeProps(ptm('rotateRightIcon'));
|
|
643
|
+
var rotateLeftIconProps = mergeProps(ptm('rotateLeftIcon'));
|
|
644
|
+
var zoomOutIconProps = mergeProps(ptm('zoomOutIcon'));
|
|
645
|
+
var zoomInIconProps = mergeProps(ptm('zoomInIcon'));
|
|
646
|
+
var closeIconProps = mergeProps(ptm('closeIcon'));
|
|
647
|
+
var downloadIcon = IconUtils.getJSXIcon(props.downloadIcon || /*#__PURE__*/React.createElement(DownloadIcon, null), _objectSpread({}, downloadIconProps), {
|
|
266
648
|
props: props
|
|
267
649
|
});
|
|
268
|
-
var rotateRightIcon = IconUtils.getJSXIcon(props.rotateRightIcon || /*#__PURE__*/React.createElement(RefreshIcon, null),
|
|
650
|
+
var rotateRightIcon = IconUtils.getJSXIcon(props.rotateRightIcon || /*#__PURE__*/React.createElement(RefreshIcon, null), _objectSpread({}, rotateRightIconProps), {
|
|
269
651
|
props: props
|
|
270
652
|
});
|
|
271
|
-
var rotateLeftIcon = IconUtils.getJSXIcon(props.rotateLeftIcon || /*#__PURE__*/React.createElement(UndoIcon, null),
|
|
653
|
+
var rotateLeftIcon = IconUtils.getJSXIcon(props.rotateLeftIcon || /*#__PURE__*/React.createElement(UndoIcon, null), _objectSpread({}, rotateLeftIconProps), {
|
|
272
654
|
props: props
|
|
273
655
|
});
|
|
274
|
-
var zoomOutIcon = IconUtils.getJSXIcon(props.zoomOutIcon || /*#__PURE__*/React.createElement(SearchMinusIcon, null),
|
|
656
|
+
var zoomOutIcon = IconUtils.getJSXIcon(props.zoomOutIcon || /*#__PURE__*/React.createElement(SearchMinusIcon, null), _objectSpread({}, zoomOutIconProps), {
|
|
275
657
|
props: props
|
|
276
658
|
});
|
|
277
|
-
var zoomInIcon = IconUtils.getJSXIcon(props.zoomInIcon || /*#__PURE__*/React.createElement(SearchPlusIcon, null),
|
|
659
|
+
var zoomInIcon = IconUtils.getJSXIcon(props.zoomInIcon || /*#__PURE__*/React.createElement(SearchPlusIcon, null), _objectSpread({}, zoomInIconProps), {
|
|
278
660
|
props: props
|
|
279
661
|
});
|
|
280
|
-
var closeIcon = IconUtils.getJSXIcon(props.closeIcon || /*#__PURE__*/React.createElement(TimesIcon, null),
|
|
662
|
+
var closeIcon = IconUtils.getJSXIcon(props.closeIcon || /*#__PURE__*/React.createElement(TimesIcon, null), _objectSpread({}, closeIconProps), {
|
|
281
663
|
props: props
|
|
282
664
|
});
|
|
283
|
-
|
|
665
|
+
var maskProps = mergeProps({
|
|
284
666
|
ref: maskRef,
|
|
285
|
-
className:
|
|
286
|
-
|
|
287
|
-
},
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
className:
|
|
303
|
-
|
|
304
|
-
type:
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
className:
|
|
308
|
-
|
|
309
|
-
type:
|
|
310
|
-
disabled:
|
|
311
|
-
},
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
667
|
+
className: 'p-image-mask p-component-overlay p-component-overlay-enter',
|
|
668
|
+
onPointerUp: hide
|
|
669
|
+
}, ptm('mask'));
|
|
670
|
+
var toolbarProps = mergeProps({
|
|
671
|
+
className: 'p-image-toolbar'
|
|
672
|
+
}, ptm('toolbar'));
|
|
673
|
+
var downloadButtonProps = mergeProps({
|
|
674
|
+
className: 'p-image-action p-link',
|
|
675
|
+
onPointerUp: onDownload,
|
|
676
|
+
type: 'button'
|
|
677
|
+
}, ptm('downloadButton'));
|
|
678
|
+
var rotateRightButtonProps = mergeProps({
|
|
679
|
+
className: 'p-image-action p-link',
|
|
680
|
+
onPointerUp: rotateRight,
|
|
681
|
+
type: 'button'
|
|
682
|
+
}, ptm('rotateRightButton'));
|
|
683
|
+
var rotateLeftButtonProps = mergeProps({
|
|
684
|
+
className: 'p-image-action p-link',
|
|
685
|
+
onPointerUp: rotateLeft,
|
|
686
|
+
type: 'button'
|
|
687
|
+
}, ptm('rotateLeftButton'));
|
|
688
|
+
var zoomOutButtonProps = mergeProps({
|
|
689
|
+
className: 'p-image-action p-link',
|
|
690
|
+
onPointerUp: zoomOut,
|
|
691
|
+
type: 'button',
|
|
692
|
+
disabled: zoomOutDisabled
|
|
693
|
+
}, ptm('zoomOutButton'));
|
|
694
|
+
var zoomInButtonProps = mergeProps({
|
|
695
|
+
className: 'p-image-action p-link',
|
|
696
|
+
onPointerUp: zoomIn,
|
|
697
|
+
type: 'button',
|
|
698
|
+
disabled: zoomInDisabled
|
|
699
|
+
}, ptm('zoomInButton'));
|
|
700
|
+
var closeButtonProps = mergeProps({
|
|
701
|
+
className: 'p-image-action p-link',
|
|
702
|
+
type: 'button',
|
|
703
|
+
'aria-label': localeOption('close')
|
|
704
|
+
}, ptm('closeButton'));
|
|
705
|
+
var previewProps = mergeProps({
|
|
706
|
+
src: props.zoomSrc || props.src,
|
|
707
|
+
className: 'p-image-preview',
|
|
708
|
+
style: imagePreviewStyle,
|
|
709
|
+
onPointerUp: onPreviewImageClick,
|
|
710
|
+
crossOrigin: crossOrigin,
|
|
711
|
+
referrerPolicy: referrerPolicy,
|
|
712
|
+
useMap: useMap,
|
|
713
|
+
loading: loading
|
|
714
|
+
}, ptm('preview'));
|
|
715
|
+
var previewContainerProps = mergeProps({
|
|
716
|
+
ref: previewRef
|
|
717
|
+
}, ptm('previewContainer'));
|
|
718
|
+
return /*#__PURE__*/React.createElement("div", maskProps, /*#__PURE__*/React.createElement("div", toolbarProps, downloadable && /*#__PURE__*/React.createElement("button", downloadButtonProps, downloadIcon), /*#__PURE__*/React.createElement("button", rotateRightButtonProps, rotateRightIcon), /*#__PURE__*/React.createElement("button", rotateLeftButtonProps, rotateLeftIcon), /*#__PURE__*/React.createElement("button", zoomOutButtonProps, zoomOutIcon), /*#__PURE__*/React.createElement("button", zoomInButtonProps, zoomInIcon), /*#__PURE__*/React.createElement("button", closeButtonProps, closeIcon)), /*#__PURE__*/React.createElement(CSSTransition, {
|
|
316
719
|
nodeRef: previewRef,
|
|
317
720
|
classNames: "p-image-preview",
|
|
318
721
|
"in": previewVisibleState,
|
|
@@ -326,19 +729,9 @@ var Image = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inP
|
|
|
326
729
|
onExit: onExit,
|
|
327
730
|
onExiting: onExiting,
|
|
328
731
|
onExited: onExited
|
|
329
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
330
|
-
|
|
331
|
-
},
|
|
332
|
-
src: props.zoomSrc || props.src,
|
|
333
|
-
className: "p-image-preview",
|
|
334
|
-
style: imagePreviewStyle,
|
|
335
|
-
onClick: onPreviewImageClick,
|
|
336
|
-
alt: alt,
|
|
337
|
-
crossOrigin: crossOrigin,
|
|
338
|
-
referrerPolicy: referrerPolicy,
|
|
339
|
-
useMap: useMap,
|
|
340
|
-
loading: loading
|
|
341
|
-
}))));
|
|
732
|
+
}, /*#__PURE__*/React.createElement("div", previewContainerProps, /*#__PURE__*/React.createElement("img", _extends({
|
|
733
|
+
alt: alt
|
|
734
|
+
}, previewProps)))));
|
|
342
735
|
};
|
|
343
736
|
React.useImperativeHandle(ref, function () {
|
|
344
737
|
return {
|
|
@@ -361,23 +754,21 @@ var Image = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inP
|
|
|
361
754
|
referrerPolicy = props.referrerPolicy,
|
|
362
755
|
useMap = props.useMap,
|
|
363
756
|
loading = props.loading;
|
|
364
|
-
var otherProps = ImageBase.getOtherProps(props);
|
|
365
757
|
var containerClassName = classNames('p-image p-component', props.className, {
|
|
366
758
|
'p-image-preview-container': props.preview
|
|
367
759
|
});
|
|
368
760
|
var element = createElement();
|
|
369
761
|
var iconClassName = 'p-image-preview-icon';
|
|
370
|
-
var
|
|
371
|
-
className: iconClassName
|
|
372
|
-
});
|
|
373
|
-
var indicatorIcon = IconUtils.getJSXIcon(icon, {
|
|
762
|
+
var iconProp = mergeProps({
|
|
374
763
|
className: iconClassName
|
|
375
|
-
},
|
|
764
|
+
}, ptm('icon'));
|
|
765
|
+
var icon = props.indicatorIcon || /*#__PURE__*/React.createElement(EyeIcon, iconProp);
|
|
766
|
+
var indicatorIcon = IconUtils.getJSXIcon(icon, _objectSpread({}, iconProp), {
|
|
376
767
|
props: props
|
|
377
768
|
});
|
|
378
|
-
var content = props.template ? ObjectUtils.getJSXElement(props.template, props) : indicatorIcon;
|
|
769
|
+
var content = props.template ? ObjectUtils$1.getJSXElement(props.template, props) : indicatorIcon;
|
|
379
770
|
var preview = createPreview();
|
|
380
|
-
var
|
|
771
|
+
var imageProp = mergeProps({
|
|
381
772
|
ref: imageRef,
|
|
382
773
|
src: src,
|
|
383
774
|
className: props.imageClassName,
|
|
@@ -387,14 +778,17 @@ var Image = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inP
|
|
|
387
778
|
referrerPolicy: referrerPolicy,
|
|
388
779
|
useMap: useMap,
|
|
389
780
|
loading: loading,
|
|
390
|
-
alt: alt,
|
|
391
781
|
style: props.imageStyle,
|
|
392
782
|
onError: props.onError
|
|
393
|
-
});
|
|
394
|
-
|
|
783
|
+
}, ptm('image'));
|
|
784
|
+
var image = props.src && /*#__PURE__*/React.createElement("img", _extends({}, imageProp, {
|
|
785
|
+
alt: alt
|
|
786
|
+
}));
|
|
787
|
+
var rootProps = mergeProps({
|
|
395
788
|
ref: elementRef,
|
|
396
789
|
className: containerClassName
|
|
397
|
-
},
|
|
790
|
+
}, ImageBase.getOtherProps(props), ptm('root'));
|
|
791
|
+
return /*#__PURE__*/React.createElement("span", rootProps, image, preview, maskVisibleState && /*#__PURE__*/React.createElement(Portal, {
|
|
398
792
|
element: element,
|
|
399
793
|
appendTo: document.body
|
|
400
794
|
}));
|