primereact 10.5.0 → 10.5.2
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 +94 -92
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +231 -13
- package/api/api.esm.js +94 -92
- package/api/api.esm.min.js +1 -1
- package/api/api.js +94 -92
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +91 -48
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +6 -1
- package/autocomplete/autocomplete.esm.js +91 -48
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +91 -48
- package/autocomplete/autocomplete.min.js +1 -1
- package/blockui/blockui.cjs.js +13 -13
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +13 -13
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +13 -13
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +4 -3
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +4 -3
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +4 -3
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +2 -3
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +2 -3
- package/button/button.esm.min.js +1 -1
- package/button/button.js +2 -3
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +30 -11
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +9 -0
- package/calendar/calendar.esm.js +30 -11
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +30 -11
- package/calendar/calendar.min.js +1 -1
- package/carousel/carousel.cjs.js +17 -15
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +4 -2
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +17 -15
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +28 -14
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +5 -0
- package/cascadeselect/cascadeselect.esm.js +28 -14
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +28 -14
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/checkbox/checkbox.cjs.js +72 -156
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +10 -34
- package/checkbox/checkbox.esm.js +72 -156
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +72 -156
- package/checkbox/checkbox.min.js +1 -1
- package/chips/chips.cjs.js +25 -12
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +6 -1
- package/chips/chips.esm.js +25 -12
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +25 -12
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +5 -5
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +4 -4
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +5 -5
- package/colorpicker/colorpicker.min.js +1 -1
- package/componentbase/componentbase.cjs.js +4 -6
- package/componentbase/componentbase.cjs.min.js +1 -1
- package/componentbase/componentbase.esm.js +5 -7
- package/componentbase/componentbase.esm.min.js +1 -1
- package/componentbase/componentbase.js +4 -6
- package/componentbase/componentbase.min.js +1 -1
- package/confirmdialog/confirmdialog.cjs.js +7 -2
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +7 -2
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +8 -3
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +5 -5
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +5 -5
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +5 -5
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +4 -3
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +4 -3
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +4 -3
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +2773 -20019
- package/core/core.min.js +41 -41
- package/datatable/datatable.cjs.js +134 -115
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +11 -3
- package/datatable/datatable.esm.js +134 -115
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +134 -115
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +16 -13
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +4 -1
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +17 -15
- package/dataview/dataview.min.js +1 -1
- package/dialog/dialog.cjs.js +6 -6
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +6 -6
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +6 -6
- package/dialog/dialog.min.js +1 -1
- package/dropdown/dropdown.cjs.js +123 -53
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +41 -0
- package/dropdown/dropdown.esm.js +123 -53
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +123 -55
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +125 -54
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +125 -54
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +125 -54
- package/editor/editor.min.js +1 -1
- package/galleria/galleria.cjs.js +22 -19
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +4 -1
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +23 -20
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.cjs.js +115 -72
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.esm.js +116 -73
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +115 -72
- package/hooks/hooks.min.js +1 -1
- package/icons/arrowdown/index.cjs.js +2 -642
- package/icons/arrowdown/index.cjs.min.js +1 -1
- package/icons/arrowdown/index.esm.js +2 -642
- package/icons/arrowdown/index.esm.min.js +1 -1
- package/icons/arrowdown/index.js +2 -642
- package/icons/arrowdown/index.min.js +1 -1
- package/icons/arrowup/index.cjs.js +2 -642
- package/icons/arrowup/index.cjs.min.js +1 -1
- package/icons/arrowup/index.esm.js +2 -642
- package/icons/arrowup/index.esm.min.js +1 -1
- package/icons/arrowup/index.js +2 -642
- package/icons/arrowup/index.min.js +1 -1
- package/icons/ban/index.cjs.js +2 -642
- package/icons/ban/index.cjs.min.js +1 -1
- package/icons/ban/index.esm.js +2 -642
- package/icons/ban/index.esm.min.js +1 -1
- package/icons/ban/index.js +2 -642
- package/icons/ban/index.min.js +1 -1
- package/icons/blank/index.cjs.js +62 -0
- package/icons/blank/index.cjs.min.js +1 -0
- package/icons/blank/index.d.ts +19 -0
- package/icons/blank/index.esm.js +38 -0
- package/icons/blank/index.esm.min.js +1 -0
- package/icons/blank/index.js +65 -0
- package/icons/blank/index.min.js +1 -0
- package/icons/blank/package.json +7 -0
- package/icons/download/index.cjs.js +2 -642
- package/icons/download/index.cjs.min.js +1 -1
- package/icons/download/index.esm.js +2 -642
- package/icons/download/index.esm.min.js +1 -1
- package/icons/download/index.js +2 -642
- package/icons/download/index.min.js +1 -1
- package/icons/exclamationtriangle/index.cjs.js +2 -642
- package/icons/exclamationtriangle/index.cjs.min.js +1 -1
- package/icons/exclamationtriangle/index.esm.js +2 -642
- package/icons/exclamationtriangle/index.esm.min.js +1 -1
- package/icons/exclamationtriangle/index.js +2 -642
- package/icons/exclamationtriangle/index.min.js +1 -1
- package/icons/eyeslash/index.cjs.js +2 -642
- package/icons/eyeslash/index.cjs.min.js +1 -1
- package/icons/eyeslash/index.esm.js +2 -642
- package/icons/eyeslash/index.esm.min.js +1 -1
- package/icons/eyeslash/index.js +2 -642
- package/icons/eyeslash/index.min.js +1 -1
- package/icons/filter/index.cjs.js +2 -642
- package/icons/filter/index.cjs.min.js +1 -1
- package/icons/filter/index.esm.js +2 -642
- package/icons/filter/index.esm.min.js +1 -1
- package/icons/filter/index.js +2 -642
- package/icons/filter/index.min.js +1 -1
- package/icons/filterslash/index.cjs.js +2 -642
- package/icons/filterslash/index.cjs.min.js +1 -1
- package/icons/filterslash/index.esm.js +2 -642
- package/icons/filterslash/index.esm.min.js +1 -1
- package/icons/filterslash/index.js +2 -642
- package/icons/filterslash/index.min.js +1 -1
- package/icons/infocircle/index.cjs.js +2 -642
- package/icons/infocircle/index.cjs.min.js +1 -1
- package/icons/infocircle/index.esm.js +2 -642
- package/icons/infocircle/index.esm.min.js +1 -1
- package/icons/infocircle/index.js +2 -642
- package/icons/infocircle/index.min.js +1 -1
- package/icons/pencil/index.cjs.js +2 -642
- package/icons/pencil/index.cjs.min.js +1 -1
- package/icons/pencil/index.esm.js +2 -642
- package/icons/pencil/index.esm.min.js +1 -1
- package/icons/pencil/index.js +2 -642
- package/icons/pencil/index.min.js +1 -1
- package/icons/plus/index.cjs.js +2 -642
- package/icons/plus/index.cjs.min.js +1 -1
- package/icons/plus/index.esm.js +2 -642
- package/icons/plus/index.esm.min.js +1 -1
- package/icons/plus/index.js +2 -642
- package/icons/plus/index.min.js +1 -1
- package/icons/refresh/index.cjs.js +2 -642
- package/icons/refresh/index.cjs.min.js +1 -1
- package/icons/refresh/index.esm.js +2 -642
- package/icons/refresh/index.esm.min.js +1 -1
- package/icons/refresh/index.js +2 -642
- package/icons/refresh/index.min.js +1 -1
- package/icons/search/index.cjs.js +2 -642
- package/icons/search/index.cjs.min.js +1 -1
- package/icons/search/index.esm.js +2 -642
- package/icons/search/index.esm.min.js +1 -1
- package/icons/search/index.js +2 -642
- package/icons/search/index.min.js +1 -1
- package/icons/searchminus/index.cjs.js +2 -642
- package/icons/searchminus/index.cjs.min.js +1 -1
- package/icons/searchminus/index.esm.js +2 -642
- package/icons/searchminus/index.esm.min.js +1 -1
- package/icons/searchminus/index.js +2 -642
- package/icons/searchminus/index.min.js +1 -1
- package/icons/searchplus/index.cjs.js +2 -642
- package/icons/searchplus/index.cjs.min.js +1 -1
- package/icons/searchplus/index.esm.js +2 -642
- package/icons/searchplus/index.esm.min.js +1 -1
- package/icons/searchplus/index.js +2 -642
- package/icons/searchplus/index.min.js +1 -1
- package/icons/sortalt/index.cjs.js +2 -642
- package/icons/sortalt/index.cjs.min.js +1 -1
- package/icons/sortalt/index.esm.js +2 -642
- package/icons/sortalt/index.esm.min.js +1 -1
- package/icons/sortalt/index.js +2 -642
- package/icons/sortalt/index.min.js +1 -1
- package/icons/sortamountdown/index.cjs.js +2 -642
- package/icons/sortamountdown/index.cjs.min.js +1 -1
- package/icons/sortamountdown/index.esm.js +2 -642
- package/icons/sortamountdown/index.esm.min.js +1 -1
- package/icons/sortamountdown/index.js +2 -642
- package/icons/sortamountdown/index.min.js +1 -1
- package/icons/sortamountupalt/index.cjs.js +2 -642
- package/icons/sortamountupalt/index.cjs.min.js +1 -1
- package/icons/sortamountupalt/index.esm.js +2 -642
- package/icons/sortamountupalt/index.esm.min.js +1 -1
- package/icons/sortamountupalt/index.js +2 -642
- package/icons/sortamountupalt/index.min.js +1 -1
- package/icons/spinner/index.cjs.js +2 -642
- package/icons/spinner/index.cjs.min.js +1 -1
- package/icons/spinner/index.esm.js +2 -642
- package/icons/spinner/index.esm.min.js +1 -1
- package/icons/spinner/index.js +2 -642
- package/icons/spinner/index.min.js +1 -1
- package/icons/star/index.cjs.js +2 -642
- package/icons/star/index.cjs.min.js +1 -1
- package/icons/star/index.esm.js +2 -642
- package/icons/star/index.esm.min.js +1 -1
- package/icons/star/index.js +2 -642
- package/icons/star/index.min.js +1 -1
- package/icons/starfill/index.cjs.js +2 -642
- package/icons/starfill/index.cjs.min.js +1 -1
- package/icons/starfill/index.esm.js +2 -642
- package/icons/starfill/index.esm.min.js +1 -1
- package/icons/starfill/index.js +2 -642
- package/icons/starfill/index.min.js +1 -1
- package/icons/thlarge/index.cjs.js +2 -642
- package/icons/thlarge/index.cjs.min.js +1 -1
- package/icons/thlarge/index.esm.js +2 -642
- package/icons/thlarge/index.esm.min.js +1 -1
- package/icons/thlarge/index.js +2 -642
- package/icons/thlarge/index.min.js +1 -1
- package/icons/timescircle/index.cjs.js +2 -642
- package/icons/timescircle/index.cjs.min.js +1 -1
- package/icons/timescircle/index.esm.js +2 -642
- package/icons/timescircle/index.esm.min.js +1 -1
- package/icons/timescircle/index.js +2 -642
- package/icons/timescircle/index.min.js +1 -1
- package/icons/trash/index.cjs.js +2 -642
- package/icons/trash/index.cjs.min.js +1 -1
- package/icons/trash/index.esm.js +2 -642
- package/icons/trash/index.esm.min.js +1 -1
- package/icons/trash/index.js +2 -642
- package/icons/trash/index.min.js +1 -1
- package/icons/undo/index.cjs.js +2 -642
- package/icons/undo/index.cjs.min.js +1 -1
- package/icons/undo/index.esm.js +2 -642
- package/icons/undo/index.esm.min.js +1 -1
- package/icons/undo/index.js +2 -642
- package/icons/undo/index.min.js +1 -1
- package/icons/upload/index.cjs.js +2 -642
- package/icons/upload/index.cjs.min.js +1 -1
- package/icons/upload/index.esm.js +2 -642
- package/icons/upload/index.esm.min.js +1 -1
- package/icons/upload/index.js +2 -642
- package/icons/upload/index.min.js +1 -1
- package/icons/windowmaximize/index.cjs.js +2 -642
- package/icons/windowmaximize/index.cjs.min.js +1 -1
- package/icons/windowmaximize/index.esm.js +2 -642
- package/icons/windowmaximize/index.esm.min.js +1 -1
- package/icons/windowmaximize/index.js +2 -642
- package/icons/windowmaximize/index.min.js +1 -1
- package/icons/windowminimize/index.cjs.js +2 -642
- package/icons/windowminimize/index.cjs.min.js +1 -1
- package/icons/windowminimize/index.esm.js +2 -642
- package/icons/windowminimize/index.esm.min.js +1 -1
- package/icons/windowminimize/index.js +2 -642
- package/icons/windowminimize/index.min.js +1 -1
- package/image/image.cjs.js +18 -575
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +20 -577
- package/image/image.esm.min.js +1 -1
- package/image/image.js +18 -575
- package/image/image.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +22 -39
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +5 -5
- package/inputnumber/inputnumber.esm.js +22 -39
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +22 -39
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +20 -96
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.d.ts +9 -20
- package/inputswitch/inputswitch.esm.js +20 -96
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +20 -96
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +7 -6
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.d.ts +5 -0
- package/inputtext/inputtext.esm.js +7 -6
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +7 -6
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +5 -4
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.d.ts +5 -0
- package/inputtextarea/inputtextarea.esm.js +5 -4
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +5 -4
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/listbox/listbox.cjs.js +17 -14
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.d.ts +15 -0
- package/listbox/listbox.esm.js +18 -15
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +17 -14
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +3 -3
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +3 -3
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +3 -3
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +5 -4
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.esm.js +5 -4
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +5 -4
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +3 -2
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +3 -2
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +3 -2
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +18 -14
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +18 -14
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +18 -14
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +2 -8
- package/message/message.cjs.min.js +1 -1
- package/message/message.d.ts +1 -1
- package/message/message.esm.js +2 -8
- package/message/message.esm.min.js +1 -1
- package/message/message.js +2 -8
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +1 -1
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +1 -1
- package/messages/messages.esm.js +1 -1
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +1 -1
- package/messages/messages.min.js +1 -1
- package/metergroup/metergroup.cjs.js +237 -0
- package/metergroup/metergroup.cjs.min.js +1 -0
- package/metergroup/metergroup.d.ts +183 -0
- package/metergroup/metergroup.esm.js +233 -0
- package/metergroup/metergroup.esm.min.js +1 -0
- package/metergroup/metergroup.js +236 -0
- package/metergroup/metergroup.min.js +1 -0
- package/multiselect/multiselect.cjs.js +157 -160
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +25 -1
- package/multiselect/multiselect.esm.js +157 -160
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +157 -160
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +3 -4
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +3 -4
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +3 -4
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +35 -11
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.d.ts +5 -0
- package/orderlist/orderlist.esm.js +35 -11
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +35 -11
- package/orderlist/orderlist.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +3 -2
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +3 -2
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +3 -2
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.cjs.js +125 -108
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.d.ts +88 -0
- package/paginator/paginator.esm.js +125 -108
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +125 -108
- package/paginator/paginator.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +19 -14
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +18 -0
- package/panelmenu/panelmenu.esm.js +19 -14
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +19 -14
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/index.d.ts +12 -0
- package/passthrough/tailwind/index.cjs.js +279 -173
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +279 -173
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +279 -173
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/password.cjs.js +98 -57
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +5 -0
- package/password/password.esm.js +100 -59
- package/password/password.esm.min.js +1 -1
- package/password/password.js +98 -57
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +127 -102
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.d.ts +5 -0
- package/picklist/picklist.esm.js +127 -102
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +127 -102
- package/picklist/picklist.min.js +1 -1
- package/primereact.all.cjs.js +2075 -2180
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +2076 -2180
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +2075 -2180
- package/primereact.all.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +69 -146
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.d.ts +17 -35
- package/radiobutton/radiobutton.esm.js +70 -147
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +69 -146
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +2 -3
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +2 -3
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +2 -3
- package/rating/rating.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +344 -67
- package/resources/themes/arya-green/theme.css +344 -67
- package/resources/themes/arya-orange/theme.css +344 -67
- package/resources/themes/bootstrap4-dark-blue/theme.css +389 -64
- package/resources/themes/bootstrap4-light-blue/theme.css +389 -64
- package/resources/themes/fluent-light/theme.css +341 -64
- package/resources/themes/lara-dark-amber/theme.css +470 -67
- package/resources/themes/lara-dark-blue/theme.css +470 -67
- package/resources/themes/lara-dark-cyan/theme.css +470 -67
- package/resources/themes/lara-dark-green/theme.css +470 -67
- package/resources/themes/lara-dark-indigo/theme.css +470 -67
- package/resources/themes/lara-dark-pink/theme.css +470 -67
- package/resources/themes/lara-dark-teal/theme.css +470 -67
- package/resources/themes/lara-light-amber/theme.css +470 -67
- package/resources/themes/lara-light-blue/theme.css +470 -67
- package/resources/themes/lara-light-cyan/theme.css +470 -67
- package/resources/themes/lara-light-green/theme.css +470 -67
- package/resources/themes/lara-light-indigo/theme.css +470 -67
- package/resources/themes/lara-light-pink/theme.css +470 -67
- package/resources/themes/lara-light-teal/theme.css +470 -67
- package/resources/themes/luna-amber/theme.css +344 -67
- package/resources/themes/luna-blue/theme.css +344 -67
- package/resources/themes/luna-green/theme.css +344 -67
- package/resources/themes/luna-pink/theme.css +344 -67
- package/resources/themes/md-dark-deeppurple/theme.css +995 -289
- package/resources/themes/md-dark-indigo/theme.css +684 -232
- package/resources/themes/md-light-deeppurple/theme.css +868 -162
- package/resources/themes/md-light-indigo/theme.css +566 -101
- package/resources/themes/mdc-dark-deeppurple/theme.css +995 -289
- package/resources/themes/mdc-dark-indigo/theme.css +697 -232
- package/resources/themes/mdc-light-deeppurple/theme.css +868 -162
- package/resources/themes/mdc-light-indigo/theme.css +566 -101
- package/resources/themes/mira/theme.css +344 -67
- package/resources/themes/nano/theme.css +344 -67
- package/resources/themes/nova/theme.css +344 -67
- package/resources/themes/nova-accent/theme.css +344 -67
- package/resources/themes/nova-alt/theme.css +344 -67
- package/resources/themes/rhea/theme.css +343 -66
- package/resources/themes/saga-blue/theme.css +344 -67
- package/resources/themes/saga-green/theme.css +344 -67
- package/resources/themes/saga-orange/theme.css +344 -67
- package/resources/themes/soho-dark/theme.css +413 -88
- package/resources/themes/soho-light/theme.css +392 -67
- package/resources/themes/tailwind-light/theme.css +344 -67
- package/resources/themes/vela-blue/theme.css +344 -67
- package/resources/themes/vela-green/theme.css +344 -67
- package/resources/themes/vela-orange/theme.css +344 -67
- package/resources/themes/viva-dark/theme.css +392 -67
- package/resources/themes/viva-light/theme.css +392 -67
- package/selectbutton/selectbutton.cjs.js +15 -8
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.d.ts +5 -0
- package/selectbutton/selectbutton.esm.js +15 -8
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +16 -9
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/sidebar.cjs.js +4 -3
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +4 -4
- package/sidebar/sidebar.esm.js +4 -3
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +4 -3
- package/sidebar/sidebar.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +7 -5
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.esm.js +7 -5
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +7 -5
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +18 -2
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +18 -2
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +18 -2
- package/slider/slider.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +9 -12
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +2 -2
- package/splitbutton/splitbutton.esm.js +9 -12
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +9 -12
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +16 -21
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.d.ts +5 -5
- package/splitter/splitter.esm.js +16 -21
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +16 -21
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +4 -3
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +4 -3
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +4 -3
- package/steps/steps.min.js +1 -1
- package/styleclass/styleclass.cjs.js +21 -1
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.d.ts +10 -0
- package/styleclass/styleclass.esm.js +21 -1
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +22 -2
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +5 -4
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +5 -4
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +5 -4
- package/tabmenu/tabmenu.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +6 -8
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +6 -8
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +6 -8
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/toast/toast.cjs.js +93 -92
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +1 -1
- package/toast/toast.esm.js +93 -92
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +93 -92
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +56 -95
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.d.ts +24 -0
- package/togglebutton/togglebutton.esm.js +55 -94
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +56 -95
- package/togglebutton/togglebutton.min.js +1 -1
- package/tooltip/tooltip.d.ts +3 -3
- package/tooltip/tooltipoptions.d.ts +5 -0
- package/tree/tree.cjs.js +52 -39
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +5 -0
- package/tree/tree.esm.js +52 -39
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +52 -39
- package/tree/tree.min.js +1 -1
- package/treeselect/treeselect.cjs.js +5 -4
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +5 -0
- package/treeselect/treeselect.esm.js +5 -4
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +5 -4
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +18 -15
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +18 -15
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +18 -15
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +36 -94
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.d.ts +12 -13
- package/tristatecheckbox/tristatecheckbox.esm.js +37 -95
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +36 -94
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +64 -72
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +11 -2
- package/utils/utils.esm.js +65 -72
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +64 -72
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +17 -15
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +14 -12
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +17 -15
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +519 -39
package/hooks/hooks.js
CHANGED
|
@@ -81,10 +81,13 @@ this.primereact.hooks = (function (exports, React, utils, PrimeReact) {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
var usePrevious = function usePrevious(newValue) {
|
|
84
|
-
var ref = React__namespace.useRef(
|
|
84
|
+
var ref = React__namespace.useRef(null);
|
|
85
85
|
React__namespace.useEffect(function () {
|
|
86
86
|
ref.current = newValue;
|
|
87
|
-
|
|
87
|
+
return function () {
|
|
88
|
+
ref.current = null;
|
|
89
|
+
};
|
|
90
|
+
}, [newValue]);
|
|
88
91
|
return ref.current;
|
|
89
92
|
};
|
|
90
93
|
|
|
@@ -96,7 +99,6 @@ this.primereact.hooks = (function (exports, React, utils, PrimeReact) {
|
|
|
96
99
|
};
|
|
97
100
|
/* eslint-enable */
|
|
98
101
|
|
|
99
|
-
/* eslint-disable */
|
|
100
102
|
var useEventListener = function useEventListener(_ref) {
|
|
101
103
|
var _ref$target = _ref.target,
|
|
102
104
|
target = _ref$target === void 0 ? 'document' : _ref$target,
|
|
@@ -111,9 +113,10 @@ this.primereact.hooks = (function (exports, React, utils, PrimeReact) {
|
|
|
111
113
|
var prevOptions = usePrevious(options);
|
|
112
114
|
var bind = function bind() {
|
|
113
115
|
var bindOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
114
|
-
|
|
116
|
+
var bindTarget = bindOptions.target;
|
|
117
|
+
if (utils.ObjectUtils.isNotEmpty(bindTarget)) {
|
|
115
118
|
unbind();
|
|
116
|
-
(bindOptions.when || when) && (targetRef.current = utils.DomHandler.getTargetElement(
|
|
119
|
+
(bindOptions.when || when) && (targetRef.current = utils.DomHandler.getTargetElement(bindTarget));
|
|
117
120
|
}
|
|
118
121
|
if (!listenerRef.current && targetRef.current) {
|
|
119
122
|
listenerRef.current = function (event) {
|
|
@@ -128,27 +131,41 @@ this.primereact.hooks = (function (exports, React, utils, PrimeReact) {
|
|
|
128
131
|
listenerRef.current = null;
|
|
129
132
|
}
|
|
130
133
|
};
|
|
131
|
-
|
|
134
|
+
var dispose = function dispose() {
|
|
135
|
+
unbind();
|
|
136
|
+
// Prevent memory leak by releasing
|
|
137
|
+
prevListener = null;
|
|
138
|
+
prevOptions = null;
|
|
139
|
+
};
|
|
140
|
+
var updateTarget = React__namespace.useCallback(function () {
|
|
132
141
|
if (when) {
|
|
133
142
|
targetRef.current = utils.DomHandler.getTargetElement(target);
|
|
134
143
|
} else {
|
|
135
144
|
unbind();
|
|
136
145
|
targetRef.current = null;
|
|
137
146
|
}
|
|
147
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
138
148
|
}, [target, when]);
|
|
139
149
|
React__namespace.useEffect(function () {
|
|
140
|
-
|
|
141
|
-
|
|
150
|
+
updateTarget();
|
|
151
|
+
}, [updateTarget]);
|
|
152
|
+
React__namespace.useEffect(function () {
|
|
153
|
+
var listenerChanged = "".concat(prevListener) !== "".concat(listener);
|
|
154
|
+
var optionsChanged = prevOptions !== options;
|
|
155
|
+
var listenerExists = listenerRef.current;
|
|
156
|
+
if (listenerExists && (listenerChanged || optionsChanged)) {
|
|
142
157
|
unbind();
|
|
143
158
|
when && bind();
|
|
159
|
+
} else if (!listenerExists) {
|
|
160
|
+
dispose();
|
|
144
161
|
}
|
|
162
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
145
163
|
}, [listener, options, when]);
|
|
146
164
|
useUnmountEffect(function () {
|
|
147
|
-
|
|
165
|
+
dispose();
|
|
148
166
|
});
|
|
149
167
|
return [bind, unbind];
|
|
150
168
|
};
|
|
151
|
-
/* eslint-enable */
|
|
152
169
|
|
|
153
170
|
var useClickOutside = function useClickOutside(ref, callback) {
|
|
154
171
|
var isOutsideClicked = function isOutsideClicked(event) {
|
|
@@ -263,20 +280,20 @@ this.primereact.hooks = (function (exports, React, utils, PrimeReact) {
|
|
|
263
280
|
setDisplayOrder = _React$useState4[1];
|
|
264
281
|
React__namespace.useEffect(function () {
|
|
265
282
|
if (isVisible) {
|
|
266
|
-
if (!
|
|
283
|
+
if (!groupToDisplayedElements[group]) {
|
|
267
284
|
groupToDisplayedElements[group] = [];
|
|
268
285
|
}
|
|
269
|
-
var newDisplayOrder = groupToDisplayedElements[group].
|
|
270
|
-
groupToDisplayedElements[group].push(uid);
|
|
286
|
+
var newDisplayOrder = groupToDisplayedElements[group].push(uid);
|
|
271
287
|
setDisplayOrder(newDisplayOrder);
|
|
272
288
|
return function () {
|
|
273
|
-
delete groupToDisplayedElements[group][newDisplayOrder];
|
|
274
|
-
var lastOrder = groupToDisplayedElements[group].findLastIndex(function (el) {
|
|
275
|
-
return el !== undefined;
|
|
276
|
-
});
|
|
289
|
+
delete groupToDisplayedElements[group][newDisplayOrder - 1];
|
|
277
290
|
|
|
278
291
|
// Reduce array length, by removing undefined elements at the end of array:
|
|
279
|
-
groupToDisplayedElements[group].
|
|
292
|
+
var lastIndex = groupToDisplayedElements[group].length - 1;
|
|
293
|
+
var lastOrder = utils.ObjectUtils.findLastIndex(groupToDisplayedElements[group], function (el) {
|
|
294
|
+
return el !== undefined;
|
|
295
|
+
});
|
|
296
|
+
if (lastOrder !== lastIndex) groupToDisplayedElements[group].splice(lastOrder + 1);
|
|
280
297
|
setDisplayOrder(undefined);
|
|
281
298
|
};
|
|
282
299
|
}
|
|
@@ -502,6 +519,37 @@ this.primereact.hooks = (function (exports, React, utils, PrimeReact) {
|
|
|
502
519
|
};
|
|
503
520
|
/* eslint-enable */
|
|
504
521
|
|
|
522
|
+
/**
|
|
523
|
+
* Hook to merge properties including custom merge function for things like Tailwind merge.
|
|
524
|
+
*/
|
|
525
|
+
var useMergeProps = function useMergeProps() {
|
|
526
|
+
var context = React.useContext(PrimeReact.PrimeReactContext);
|
|
527
|
+
return function () {
|
|
528
|
+
for (var _len = arguments.length, props = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
529
|
+
props[_key] = arguments[_key];
|
|
530
|
+
}
|
|
531
|
+
return utils.mergeProps(props, context === null || context === void 0 ? void 0 : context.ptOptions);
|
|
532
|
+
};
|
|
533
|
+
};
|
|
534
|
+
|
|
535
|
+
/* eslint-disable */
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* Custom hook to run a mount effect only once.
|
|
539
|
+
* @param {*} fn the callback function
|
|
540
|
+
* @returns the hook
|
|
541
|
+
*/
|
|
542
|
+
var useMountEffect = function useMountEffect(fn) {
|
|
543
|
+
var mounted = React__namespace.useRef(false);
|
|
544
|
+
return React__namespace.useEffect(function () {
|
|
545
|
+
if (!mounted.current) {
|
|
546
|
+
mounted.current = true;
|
|
547
|
+
return fn && fn();
|
|
548
|
+
}
|
|
549
|
+
}, []);
|
|
550
|
+
};
|
|
551
|
+
/* eslint-enable */
|
|
552
|
+
|
|
505
553
|
function _typeof(o) {
|
|
506
554
|
"@babel/helpers - typeof";
|
|
507
555
|
|
|
@@ -543,44 +591,6 @@ this.primereact.hooks = (function (exports, React, utils, PrimeReact) {
|
|
|
543
591
|
return obj;
|
|
544
592
|
}
|
|
545
593
|
|
|
546
|
-
function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
547
|
-
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
548
|
-
|
|
549
|
-
/**
|
|
550
|
-
* Hook to merge properties including custom merge function for things like Tailwind merge.
|
|
551
|
-
*/
|
|
552
|
-
var useMergeProps = function useMergeProps() {
|
|
553
|
-
var context = React.useContext(PrimeReact.PrimeReactContext);
|
|
554
|
-
return function () {
|
|
555
|
-
var _context$ptOptions;
|
|
556
|
-
var options = _objectSpread$2({}, (context === null || context === void 0 || (_context$ptOptions = context.ptOptions) === null || _context$ptOptions === void 0 ? void 0 : _context$ptOptions.classNameMergeFunction) && {
|
|
557
|
-
classNameMergeFunction: context.classNameMergeFunction
|
|
558
|
-
});
|
|
559
|
-
for (var _len = arguments.length, props = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
560
|
-
props[_key] = arguments[_key];
|
|
561
|
-
}
|
|
562
|
-
return utils._mergeProps(props, options);
|
|
563
|
-
};
|
|
564
|
-
};
|
|
565
|
-
|
|
566
|
-
/* eslint-disable */
|
|
567
|
-
|
|
568
|
-
/**
|
|
569
|
-
* Custom hook to run a mount effect only once.
|
|
570
|
-
* @param {*} fn the callback function
|
|
571
|
-
* @returns the hook
|
|
572
|
-
*/
|
|
573
|
-
var useMountEffect = function useMountEffect(fn) {
|
|
574
|
-
var mounted = React__namespace.useRef(false);
|
|
575
|
-
return React__namespace.useEffect(function () {
|
|
576
|
-
if (!mounted.current) {
|
|
577
|
-
mounted.current = true;
|
|
578
|
-
return fn && fn();
|
|
579
|
-
}
|
|
580
|
-
}, []);
|
|
581
|
-
};
|
|
582
|
-
/* eslint-enable */
|
|
583
|
-
|
|
584
594
|
function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
585
595
|
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
586
596
|
var useMouse = function useMouse() {
|
|
@@ -842,18 +852,18 @@ this.primereact.hooks = (function (exports, React, utils, PrimeReact) {
|
|
|
842
852
|
});
|
|
843
853
|
}
|
|
844
854
|
|
|
845
|
-
/* eslint-disable */
|
|
846
855
|
var useOverlayScrollListener = function useOverlayScrollListener(_ref) {
|
|
847
856
|
var target = _ref.target,
|
|
848
857
|
listener = _ref.listener,
|
|
849
858
|
options = _ref.options,
|
|
850
859
|
_ref$when = _ref.when,
|
|
851
860
|
when = _ref$when === void 0 ? true : _ref$when;
|
|
861
|
+
var context = React__namespace.useContext(PrimeReact.PrimeReactContext);
|
|
852
862
|
var targetRef = React__namespace.useRef(null);
|
|
853
863
|
var listenerRef = React__namespace.useRef(null);
|
|
854
|
-
var
|
|
864
|
+
var scrollableParentsRef = React__namespace.useRef([]);
|
|
865
|
+
var prevListener = usePrevious(listener);
|
|
855
866
|
var prevOptions = usePrevious(options);
|
|
856
|
-
var context = React__namespace.useContext(PrimeReact.PrimeReactContext);
|
|
857
867
|
var bind = function bind() {
|
|
858
868
|
var bindOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
859
869
|
if (utils.ObjectUtils.isNotEmpty(bindOptions.target)) {
|
|
@@ -862,7 +872,7 @@ this.primereact.hooks = (function (exports, React, utils, PrimeReact) {
|
|
|
862
872
|
}
|
|
863
873
|
if (!listenerRef.current && targetRef.current) {
|
|
864
874
|
var hideOnScroll = context ? context.hideOverlaysOnDocumentScrolling : PrimeReact__default["default"].hideOverlaysOnDocumentScrolling;
|
|
865
|
-
var nodes =
|
|
875
|
+
var nodes = scrollableParentsRef.current = utils.DomHandler.getScrollableParents(targetRef.current, hideOnScroll);
|
|
866
876
|
listenerRef.current = function (event) {
|
|
867
877
|
return listener && listener(event);
|
|
868
878
|
};
|
|
@@ -873,33 +883,49 @@ this.primereact.hooks = (function (exports, React, utils, PrimeReact) {
|
|
|
873
883
|
};
|
|
874
884
|
var unbind = function unbind() {
|
|
875
885
|
if (listenerRef.current) {
|
|
876
|
-
var nodes =
|
|
886
|
+
var nodes = scrollableParentsRef.current;
|
|
877
887
|
nodes.forEach(function (node) {
|
|
878
888
|
return node.removeEventListener('scroll', listenerRef.current, options);
|
|
879
889
|
});
|
|
880
890
|
listenerRef.current = null;
|
|
881
891
|
}
|
|
882
892
|
};
|
|
883
|
-
|
|
893
|
+
var dispose = function dispose() {
|
|
894
|
+
unbind();
|
|
895
|
+
// #5927 prevent memory leak by releasing
|
|
896
|
+
scrollableParentsRef.current = null;
|
|
897
|
+
prevListener = null;
|
|
898
|
+
prevOptions = null;
|
|
899
|
+
};
|
|
900
|
+
var updateTarget = React__namespace.useCallback(function () {
|
|
884
901
|
if (when) {
|
|
885
902
|
targetRef.current = utils.DomHandler.getTargetElement(target);
|
|
886
903
|
} else {
|
|
887
904
|
unbind();
|
|
888
905
|
targetRef.current = null;
|
|
889
906
|
}
|
|
907
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
890
908
|
}, [target, when]);
|
|
891
909
|
React__namespace.useEffect(function () {
|
|
892
|
-
|
|
910
|
+
updateTarget();
|
|
911
|
+
}, [updateTarget]);
|
|
912
|
+
React__namespace.useEffect(function () {
|
|
913
|
+
var listenerChanged = "".concat(prevListener) !== "".concat(listener);
|
|
914
|
+
var optionsChanged = prevOptions !== options;
|
|
915
|
+
var listenerExists = listenerRef.current;
|
|
916
|
+
if (listenerExists && (listenerChanged || optionsChanged)) {
|
|
893
917
|
unbind();
|
|
894
918
|
when && bind();
|
|
919
|
+
} else if (!listenerExists) {
|
|
920
|
+
dispose();
|
|
895
921
|
}
|
|
896
|
-
|
|
922
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
923
|
+
}, [listener, options, when]);
|
|
897
924
|
useUnmountEffect(function () {
|
|
898
|
-
|
|
925
|
+
dispose();
|
|
899
926
|
});
|
|
900
927
|
return [bind, unbind];
|
|
901
928
|
};
|
|
902
|
-
/* eslint-enable */
|
|
903
929
|
|
|
904
930
|
var useResizeListener = function useResizeListener(_ref) {
|
|
905
931
|
var listener = _ref.listener,
|
|
@@ -918,7 +944,9 @@ this.primereact.hooks = (function (exports, React, utils, PrimeReact) {
|
|
|
918
944
|
overlay = _ref.overlay,
|
|
919
945
|
_listener = _ref.listener,
|
|
920
946
|
_ref$when = _ref.when,
|
|
921
|
-
when = _ref$when === void 0 ? true : _ref$when
|
|
947
|
+
when = _ref$when === void 0 ? true : _ref$when,
|
|
948
|
+
_ref$type = _ref.type,
|
|
949
|
+
type = _ref$type === void 0 ? 'click' : _ref$type;
|
|
922
950
|
var targetRef = React__namespace.useRef(null);
|
|
923
951
|
var overlayRef = React__namespace.useRef(null);
|
|
924
952
|
|
|
@@ -930,7 +958,7 @@ this.primereact.hooks = (function (exports, React, utils, PrimeReact) {
|
|
|
930
958
|
*/
|
|
931
959
|
var _useEventListener = useEventListener({
|
|
932
960
|
target: 'window',
|
|
933
|
-
type:
|
|
961
|
+
type: type,
|
|
934
962
|
listener: function listener(event) {
|
|
935
963
|
_listener && _listener(event, {
|
|
936
964
|
type: 'outside',
|
|
@@ -1121,20 +1149,35 @@ this.primereact.hooks = (function (exports, React, utils, PrimeReact) {
|
|
|
1121
1149
|
id = _options$id === void 0 ? undefined : _options$id,
|
|
1122
1150
|
_options$media = options.media,
|
|
1123
1151
|
media = _options$media === void 0 ? undefined : _options$media;
|
|
1152
|
+
var getCurrentStyleRef = function getCurrentStyleRef(styleContainer) {
|
|
1153
|
+
var existingStyle = styleContainer.querySelector("style[data-primereact-style-id=\"".concat(name, "\"]"));
|
|
1154
|
+
if (existingStyle) {
|
|
1155
|
+
return existingStyle;
|
|
1156
|
+
}
|
|
1157
|
+
if (id !== undefined) {
|
|
1158
|
+
var existingElement = document.getElementById(id);
|
|
1159
|
+
if (existingElement) {
|
|
1160
|
+
return existingElement;
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
// finally if not found create the new style
|
|
1165
|
+
return document.createElement('style');
|
|
1166
|
+
};
|
|
1124
1167
|
var update = function update(newCSS) {
|
|
1125
1168
|
isLoaded && css !== newCSS && (styleRef.current.textContent = newCSS);
|
|
1126
1169
|
};
|
|
1127
1170
|
var load = function load() {
|
|
1128
1171
|
if (!document || isLoaded) return;
|
|
1129
1172
|
var styleContainer = (context === null || context === void 0 ? void 0 : context.styleContainer) || document.head;
|
|
1130
|
-
styleRef.current = styleContainer
|
|
1173
|
+
styleRef.current = getCurrentStyleRef(styleContainer);
|
|
1131
1174
|
if (!styleRef.current.isConnected) {
|
|
1132
1175
|
styleRef.current.type = 'text/css';
|
|
1133
|
-
id
|
|
1134
|
-
media
|
|
1176
|
+
if (id) styleRef.current.id = id;
|
|
1177
|
+
if (media) styleRef.current.media = media;
|
|
1135
1178
|
utils.DomHandler.addNonce(styleRef.current, context && context.nonce || PrimeReact__default["default"].nonce);
|
|
1136
1179
|
styleContainer.appendChild(styleRef.current);
|
|
1137
|
-
name
|
|
1180
|
+
if (name) styleRef.current.setAttribute('data-primereact-style-id', name);
|
|
1138
1181
|
}
|
|
1139
1182
|
styleRef.current.textContent = css;
|
|
1140
1183
|
setIsLoaded(true);
|
package/hooks/hooks.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.hooks=function(e,t,n,r){"use strict";function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function o(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var c=o(t),i=u(r);function a(e){if(Array.isArray(e))return e}function l(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,u,o,c,i=[],a=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=o.call(n)).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(e){l=!0,u=e}finally{try{if(!a&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(l)throw u}}return i}}function s(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 f(e,t){if(e){if("string"==typeof e)return s(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)?s(e,t):void 0}}function d(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function v(e,t){return a(e)||l(e,t)||f(e,t)||d()}var p=function(e){var t=c.useRef(void 0);return c.useEffect((function(){t.current=e})),t.current},y=function(e){return c.useEffect((function(){return e}),[])},m=function(e){var t=e.target,r=void 0===t?"document":t,u=e.type,o=e.listener,i=e.options,a=e.when,l=void 0===a||a,s=c.useRef(null),f=c.useRef(null),d=p(o),v=p(i),m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n.ObjectUtils.isNotEmpty(e.target)&&(g(),(e.when||l)&&(s.current=n.DomHandler.getTargetElement(e.target))),!f.current&&s.current&&(f.current=function(e){return o&&o(e)},s.current.addEventListener(u,f.current,i))},g=function(){f.current&&(s.current.removeEventListener(u,f.current,i),f.current=null)};return c.useEffect((function(){l?s.current=n.DomHandler.getTargetElement(r):(g(),s.current=null)}),[r,l]),c.useEffect((function(){!f.current||""+d==""+o&&v===i||(g(),l&&m())}),[o,i,l]),y((function(){g()})),[m,g]},g={},h={ico:"image/x-icon",png:"image/png",svg:"image/svg+xml",gif:"image/gif"};function b(e){if(Array.isArray(e))return s(e)}function w(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function O(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function E(e){return b(e)||w(e)||f(e)||O()}var S={escKeyListeners:new Map,onGlobalKeyDown:function(e){if("Escape"===e.code){var t=S.escKeyListeners,n=Math.max.apply(Math,E(t.keys())),r=t.get(n),u=Math.max.apply(Math,E(r.keys()));r.get(u)(e)}},refreshGlobalKeyDownListener:function(){var e=n.DomHandler.getTargetElement("document");this.escKeyListeners.size>0?e.addEventListener("keydown",this.onGlobalKeyDown):e.removeEventListener("keydown",this.onGlobalKeyDown)},addListener:function(e,t){var n=this,r=v(t,2),u=r[0],o=r[1],c=this.escKeyListeners;c.has(u)||c.set(u,new Map);var i=c.get(u);if(i.has(o))throw new Error("Unexpected: global esc key listener with priority [".concat(u,", ").concat(o,"] already exists."));return i.set(o,e),this.refreshGlobalKeyDownListener(),function(){i.delete(o),0===i.size&&c.delete(u),n.refreshGlobalKeyDownListener()}}};function j(e){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j(e)}function D(e,t){if("object"!==j(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==j(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function P(e){var t=D(e,"string");return"symbol"===j(t)?t:String(t)}function R(e,t,n){return(t=P(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){R(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var I=function(e){var t=c.useRef(!1);return c.useEffect((function(){if(!t.current)return t.current=!0,e&&e()}),[])};function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){R(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){R(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var k=function(e){var t=e.target,u=e.listener,o=e.options,a=e.when,l=void 0===a||a,s=c.useRef(null),f=c.useRef(null),d=c.useRef([]),v=p(o),m=c.useContext(r.PrimeReactContext),g=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(n.ObjectUtils.isNotEmpty(e.target)&&(h(),(e.when||l)&&(s.current=n.DomHandler.getTargetElement(e.target))),!f.current&&s.current){var t=d.current=n.DomHandler.getScrollableParents(s.current,m?m.hideOverlaysOnDocumentScrolling:i.default.hideOverlaysOnDocumentScrolling);f.current=function(e){return u&&u(e)},t.forEach((function(e){return e.addEventListener("scroll",f.current,o)}))}},h=function(){f.current&&(d.current.forEach((function(e){return e.removeEventListener("scroll",f.current,o)})),f.current=null)};return c.useEffect((function(){l?s.current=n.DomHandler.getTargetElement(t):(h(),s.current=null)}),[t,l]),c.useEffect((function(){!f.current||f.current===u&&v===o||(h(),l&&g())}),[u,o]),y((function(){h()})),[g,h]},N=function(e){var t=e.when;return m({target:"window",type:"resize",listener:e.listener,when:void 0===t||t})},_=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"local",r="undefined"!=typeof window,u=v(m({target:"window",type:"storage",listener:function(e){var r="local"===n?window.localStorage:window.sessionStorage;if(e.storageArea===r&&e.key===t){var u=e.newValue?JSON.parse(e.newValue):void 0;s(u)}}}),2),o=u[0],i=u[1],a=v(c.useState(e),2),l=a[0],s=a[1];return c.useEffect((function(){r||s(e);try{var u="local"===n?window.localStorage.getItem(t):window.sessionStorage.getItem(t);s(u?JSON.parse(u):e)}catch(t){s(e)}return o(),function(){return i()}}),[]),[l,function(e){try{var u=e instanceof Function?e(l):e;if(s(u),r){var o=JSON.stringify(u);"local"===n?window.localStorage.setItem(t,o):window.sessionStorage.setItem(t,o)}}catch(e){throw new Error("PrimeReact useStorage: Failed to serialize the value at key: ".concat(t))}}]},H=0;return e.ESC_KEY_HANDLING_PRIORITIES={SIDEBAR:100,SLIDE_MENU:200,DIALOG:300,IMAGE:400,MENU:500,OVERLAY_PANEL:600,PASSWORD:700,CASCADE_SELECT:800,SPLIT_BUTTON:900,SPEED_DIAL:1e3},e.useClickOutside=function(e,t){var n=function(n){e.current&&!e.current.contains(n.target)&&t(n)},r=v(m({type:"mousedown",listener:n}),2),u=r[0],o=r[1],i=v(m({type:"touchstart",listener:n}),2),a=i[0],l=i[1];return c.useEffect((function(){if(e.current)return u(),a(),function(){o(),l()}})),[e,t]},e.useCounter=function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{step:1},t=v(c.useState(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0),2),n=t[0],r=t[1];return{count:n,increment:function(){e.max&&n>=e.max||r(n+e.step)},decrement:function(){if(e.min||0===e.min&&n<=e.min)return null;r(n-e.step)},reset:function(){r(0)}}},e.useDebounce=function(e,t){var n=v(c.useState(e),2),r=n[0],u=n[1],o=v(c.useState(e),2),i=o[0],a=o[1],l=c.useRef(!1),s=c.useRef(null),f=function(){return window.clearTimeout(s.current)};return I((function(){l.current=!0})),y((function(){f()})),c.useEffect((function(){l.current&&(f(),s.current=window.setTimeout((function(){a(r)}),t))}),[r,t]),[r,i,u]},e.useDisplayOrder=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=v(c.useState((function(){return n.UniqueComponentId()})),1)[0],u=v(c.useState(0),2),o=u[0],i=u[1];return c.useEffect((function(){if(t){e in g||(g[e]=[]);var n=g[e].length+1;return g[e].push(r),i(n),function(){delete g[e][n];var t=g[e].findLastIndex((function(e){return void 0!==e}));g[e].splice(t+1),i(void 0)}}}),[e,r,t]),o},e.useEventListener=m,e.useFavicon=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"shortcut icon";c.useLayoutEffect((function(){if(e){document.querySelectorAll("link[rel*='icon']").forEach((function(e){document.head.removeChild(e)}));var n=document.createElement("link");n.setAttribute("type",h[e.split(".").pop()]),n.setAttribute("rel",t),n.setAttribute("href",e),document.head.appendChild(n)}}),[e,t])},e.useGlobalOnEscapeKey=function(e){var n=e.callback,r=e.when,u=e.priority;t.useEffect((function(){if(r)return S.addListener(n,u)}),[n,r,u])},e.useIntersectionObserver=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=v(c.useState(!1),2),r=n[0],u=n[1];return c.useEffect((function(){if(e.current){var n=new IntersectionObserver((function(e){var t=v(e,1);u(t[0].isIntersecting)}),t);return n.observe(e.current),function(){n.disconnect()}}}),[t,e]),r},e.useInterval=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=c.useRef(null),u=c.useRef(null),o=c.useCallback((function(){return clearInterval(r.current)}),[r.current]);return c.useEffect((function(){u.current=e})),c.useEffect((function(){if(n)return r.current=setInterval((function(){u.current()}),t),o;o()}),[t,n]),y((function(){o()})),[o]},e.useLocalStorage=function(e,t){return _(e,t,"local")},e.useMatchMedia=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=v(c.useState(!1),2),r=n[0],u=n[1],o=c.useRef(null),i=function(e){return u(e.matches)},a=function(){return o.current&&o.current.removeEventListener("change",i)&&(o.current=null)};return c.useEffect((function(){return t&&(o.current=window.matchMedia(e),u(o.current.matches),o.current&&o.current.addEventListener("change",i)),a}),[e,t]),r},e.useMergeProps=function(){var e=t.useContext(r.PrimeReactContext);return function(){for(var t,r=L({},(null==e||null===(t=e.ptOptions)||void 0===t?void 0:t.classNameMergeFunction)&&{classNameMergeFunction:e.classNameMergeFunction}),u=arguments.length,o=new Array(u),c=0;c<u;c++)o[c]=arguments[c];return n._mergeProps(o,r)}},e.useMountEffect=I,e.useMouse=function(){var e=v(c.useState({x:0,y:0}),2),t=e[0],n=e[1],r=c.useRef(null),u=c.useCallback((function(e){var t,u;if(r.current){var o=e.currentTarget.getBoundingClientRect();t=e.pageX-o.left-(window.pageXOffset||window.scrollX),u=e.pageY-o.top-(window.pageYOffset||window.scrollY)}else t=e.clientX,u=e.clientY;n({x:Math.max(0,Math.round(t)),y:Math.max(0,Math.round(u))})}),[]),o=v(m({target:r,type:"mousemove",listener:u}),2),i=o[0],a=o[1],l=v(m({type:"mousemove",listener:u}),2),s=l[0],f=l[1];return c.useEffect((function(){return i(),r.current||s(),function(){a(),r.current||f()}}),[s,i,f,a]),C(C({ref:r},t),{},{reset:function(){return n({x:0,y:0})}})},e.useMove=function(e){var t=e.mode,n=void 0===t?"both":t,r=e.initialValue,u=void 0===r?{x:0,y:0}:r,o=v(c.useState(u),2),i=o[0],a=o[1],l=v(c.useState(!1),2),s=l[0],f=l[1],d=c.useRef(!1),p=c.useRef(!1),y=c.useRef(null),g=function(e){return z({x:e.clientX,y:e.clientY})},h=function(e){var t=e.clampedX,r=e.clampedY;"vertical"===n?a({y:1-r}):"horizontal"===n?a({x:t}):"both"===n&&a({x:t,y:r})},b=function(){p.current&&d.current&&(p.current=!1,f(!1),U())},w=function(e){e.cancelable&&e.preventDefault(),z({x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY})},O=v(m({type:"mousemove",listener:g}),2),E=O[0],S=O[1],j=v(m({type:"mouseup",listener:b}),2),D=j[0],P=j[1],R=v(m({type:"touchmove",listener:w}),2),x=R[0],L=R[1],I=v(m({type:"touchend",listener:b}),2),M=I[0],C=I[1],A=v(m({target:y,type:"mousedown",listener:function(e){X(),e.preventDefault(),g(e)}}),2),k=A[0],N=A[1],_=v(m({target:y,type:"touchstart",listener:function(e){e.cancelable&&e.preventDefault(),X(),w(e)},options:{passive:!1}}),2),H=_[0],K=_[1],Y=function(e,t,n){return Math.min(Math.max(e,t),n)},G=function(e){var t=e.y;return{clampedX:Y(e.x,0,1),clampedY:Y(t,0,1)}},U=function(){S(),P(),L(),C()};c.useEffect((function(){d.current=!0}),[]);var X=function(){!p.current&&d.current&&(p.current=!0,f(!0),E(),D(),x(),M())},z=function(e){var t=e.x,n=e.y;if(p.current){var r=y.current.getBoundingClientRect(),u=G({x:(t-r.left)/r.width,y:(n-r.top)/r.height});h({clampedX:u.clampedX,clampedY:u.clampedY})}};return c.useEffect((function(){return y.current&&(k(),H()),function(){y.current&&(N(),K())}}),[k,H,i,N,K]),T(T({ref:y},i),{},{active:s,reset:function(){a(u)}})},e.useOverlayListener=function(e){var t=e.target,r=e.overlay,u=e.listener,o=e.when,i=void 0===o||o,a=c.useRef(null),l=c.useRef(null),s=v(m({target:"window",type:"click",listener:function(e){u&&u(e,{type:"outside",valid:3!==e.which&&D(e)})}}),2),f=s[0],d=s[1],p=v(N({target:"window",listener:function(e){u&&u(e,{type:"resize",valid:!n.DomHandler.isTouchDevice()})}}),2),g=p[0],h=p[1],b=v(m({target:"window",type:"orientationchange",listener:function(e){u&&u(e,{type:"orientationchange",valid:!0})}}),2),w=b[0],O=b[1],E=v(k({target:t,listener:function(e){u&&u(e,{type:"scroll",valid:!0})}}),2),S=E[0],j=E[1],D=function(e){return a.current&&!(a.current.isSameNode(e.target)||a.current.contains(e.target)||l.current&&l.current.contains(e.target))},P=function(){d(),h(),O(),j()};return c.useEffect((function(){i?(a.current=n.DomHandler.getTargetElement(t),l.current=n.DomHandler.getTargetElement(r)):(P(),a.current=l.current=null)}),[t,r,i]),c.useEffect((function(){P()}),[i]),y((function(){P()})),[function(){f(),g(),w(),S()},P]},e.useOverlayScrollListener=k,e.usePrevious=p,e.useResizeListener=N,e.useSessionStorage=function(e,t){return _(e,t,"session")},e.useStorage=_,e.useStyle=function(e){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=v(t.useState(!1),2),c=o[0],a=o[1],l=t.useRef(null),s=t.useContext(r.PrimeReactContext),f=n.DomHandler.isClient()?window.document:void 0,d=u.document,p=void 0===d?f:d,y=u.manual,m=void 0!==y&&y,g=u.name,h=void 0===g?"style_".concat(++H):g,b=u.id,w=void 0===b?void 0:b,O=u.media,E=void 0===O?void 0:O,S=function(){if(p&&!c){var t=(null==s?void 0:s.styleContainer)||p.head;l.current=t.querySelector('style[data-primereact-style-id="'.concat(h,'"]'))||p.getElementById(w)||p.createElement("style"),l.current.isConnected||(l.current.type="text/css",w&&(l.current.id=w),E&&(l.current.media=E),n.DomHandler.addNonce(l.current,s&&s.nonce||i.default.nonce),t.appendChild(l.current),h&&l.current.setAttribute("data-primereact-style-id",h)),l.current.textContent=e,a(!0)}};return t.useEffect((function(){m||S()}),[m]),{id:w,name:h,update:function(t){c&&e!==t&&(l.current.textContent=t)},unload:function(){p&&l.current&&(n.DomHandler.removeInlineStyle(l.current),a(!1))},load:S,isLoaded:c}},e.useTimeout=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=c.useRef(null),u=c.useRef(null),o=c.useCallback((function(){return clearTimeout(r.current)}),[r.current]);return c.useEffect((function(){u.current=e})),c.useEffect((function(){if(n)return r.current=setTimeout((function(){u.current()}),t),o;o()}),[t,n]),y((function(){o()})),[o]},e.useUnmountEffect=y,e.useUpdateEffect=function(e,t){var n=c.useRef(!1);return c.useEffect((function(){if(n.current)return e&&e();n.current=!0}),t)},Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.utils,primereact.api);
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.hooks=function(e,t,n,r){"use strict";function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function o(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var c=o(t),i=u(r);function a(e){if(Array.isArray(e))return e}function l(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,u,o,c,i=[],a=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=o.call(n)).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(e){l=!0,u=e}finally{try{if(!a&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(l)throw u}}return i}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}function d(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function v(e,t){return a(e)||l(e,t)||s(e,t)||d()}var y=function(e){var t=c.useRef(null);return c.useEffect((function(){return t.current=e,function(){t.current=null}}),[e]),t.current},m=function(e){return c.useEffect((function(){return e}),[])},p=function(e){var t=e.target,r=void 0===t?"document":t,u=e.type,o=e.listener,i=e.options,a=e.when,l=void 0===a||a,f=c.useRef(null),s=c.useRef(null),d=y(o),v=y(i),p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.target;n.ObjectUtils.isNotEmpty(t)&&(g(),(e.when||l)&&(f.current=n.DomHandler.getTargetElement(t))),!s.current&&f.current&&(s.current=function(e){return o&&o(e)},f.current.addEventListener(u,s.current,i))},g=function(){s.current&&(f.current.removeEventListener(u,s.current,i),s.current=null)},h=function(){g(),d=null,v=null},b=c.useCallback((function(){l?f.current=n.DomHandler.getTargetElement(r):(g(),f.current=null)}),[r,l]);return c.useEffect((function(){b()}),[b]),c.useEffect((function(){var e="".concat(d)!=="".concat(o),t=s.current;t&&(e||v!==i)?(g(),l&&p()):t||h()}),[o,i,l]),m((function(){h()})),[p,g]},g={},h={ico:"image/x-icon",png:"image/png",svg:"image/svg+xml",gif:"image/gif"};function b(e){if(Array.isArray(e))return f(e)}function w(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function E(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function O(e){return b(e)||w(e)||s(e)||E()}var S={escKeyListeners:new Map,onGlobalKeyDown:function(e){if("Escape"===e.code){var t=S.escKeyListeners,n=Math.max.apply(Math,O(t.keys())),r=t.get(n),u=Math.max.apply(Math,O(r.keys()));r.get(u)(e)}},refreshGlobalKeyDownListener:function(){var e=n.DomHandler.getTargetElement("document");this.escKeyListeners.size>0?e.addEventListener("keydown",this.onGlobalKeyDown):e.removeEventListener("keydown",this.onGlobalKeyDown)},addListener:function(e,t){var n=this,r=v(t,2),u=r[0],o=r[1],c=this.escKeyListeners;c.has(u)||c.set(u,new Map);var i=c.get(u);if(i.has(o))throw new Error("Unexpected: global esc key listener with priority [".concat(u,", ").concat(o,"] already exists."));return i.set(o,e),this.refreshGlobalKeyDownListener(),function(){i.delete(o),0===i.size&&c.delete(u),n.refreshGlobalKeyDownListener()}}},D=function(e){var t=c.useRef(!1);return c.useEffect((function(){if(!t.current)return t.current=!0,e&&e()}),[])};function j(e){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j(e)}function P(e,t){if("object"!==j(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==j(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function R(e){var t=P(e,"string");return"symbol"===j(t)?t:String(t)}function x(e,t,n){return(t=R(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L(Object(n),!0).forEach((function(t){x(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach((function(t){x(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var M=function(e){var t=e.target,u=e.listener,o=e.options,a=e.when,l=void 0===a||a,f=c.useContext(r.PrimeReactContext),s=c.useRef(null),d=c.useRef(null),v=c.useRef([]),p=y(u),g=y(o),h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(n.ObjectUtils.isNotEmpty(e.target)&&(b(),(e.when||l)&&(s.current=n.DomHandler.getTargetElement(e.target))),!d.current&&s.current){var t=v.current=n.DomHandler.getScrollableParents(s.current,f?f.hideOverlaysOnDocumentScrolling:i.default.hideOverlaysOnDocumentScrolling);d.current=function(e){return u&&u(e)},t.forEach((function(e){return e.addEventListener("scroll",d.current,o)}))}},b=function(){d.current&&(v.current.forEach((function(e){return e.removeEventListener("scroll",d.current,o)})),d.current=null)},w=function(){b(),v.current=null,p=null,g=null},E=c.useCallback((function(){l?s.current=n.DomHandler.getTargetElement(t):(b(),s.current=null)}),[t,l]);return c.useEffect((function(){E()}),[E]),c.useEffect((function(){var e="".concat(p)!=="".concat(u),t=d.current;t&&(e||g!==o)?(b(),l&&h()):t||w()}),[u,o,l]),m((function(){w()})),[h,b]},T=function(e){var t=e.when;return p({target:"window",type:"resize",listener:e.listener,when:void 0===t||t})},k=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"local",r="undefined"!=typeof window,u=v(p({target:"window",type:"storage",listener:function(e){var r="local"===n?window.localStorage:window.sessionStorage;if(e.storageArea===r&&e.key===t){var u=e.newValue?JSON.parse(e.newValue):void 0;f(u)}}}),2),o=u[0],i=u[1],a=v(c.useState(e),2),l=a[0],f=a[1];return c.useEffect((function(){r||f(e);try{var u="local"===n?window.localStorage.getItem(t):window.sessionStorage.getItem(t);f(u?JSON.parse(u):e)}catch(t){f(e)}return o(),function(){return i()}}),[]),[l,function(e){try{var u=e instanceof Function?e(l):e;if(f(u),r){var o=JSON.stringify(u);"local"===n?window.localStorage.setItem(t,o):window.sessionStorage.setItem(t,o)}}catch(e){throw new Error("PrimeReact useStorage: Failed to serialize the value at key: ".concat(t))}}]},N=0;return e.ESC_KEY_HANDLING_PRIORITIES={SIDEBAR:100,SLIDE_MENU:200,DIALOG:300,IMAGE:400,MENU:500,OVERLAY_PANEL:600,PASSWORD:700,CASCADE_SELECT:800,SPLIT_BUTTON:900,SPEED_DIAL:1e3},e.useClickOutside=function(e,t){var n=function(n){e.current&&!e.current.contains(n.target)&&t(n)},r=v(p({type:"mousedown",listener:n}),2),u=r[0],o=r[1],i=v(p({type:"touchstart",listener:n}),2),a=i[0],l=i[1];return c.useEffect((function(){if(e.current)return u(),a(),function(){o(),l()}})),[e,t]},e.useCounter=function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{step:1},t=v(c.useState(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0),2),n=t[0],r=t[1];return{count:n,increment:function(){e.max&&n>=e.max||r(n+e.step)},decrement:function(){if(e.min||0===e.min&&n<=e.min)return null;r(n-e.step)},reset:function(){r(0)}}},e.useDebounce=function(e,t){var n=v(c.useState(e),2),r=n[0],u=n[1],o=v(c.useState(e),2),i=o[0],a=o[1],l=c.useRef(!1),f=c.useRef(null),s=function(){return window.clearTimeout(f.current)};return D((function(){l.current=!0})),m((function(){s()})),c.useEffect((function(){l.current&&(s(),f.current=window.setTimeout((function(){a(r)}),t))}),[r,t]),[r,i,u]},e.useDisplayOrder=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=v(c.useState((function(){return n.UniqueComponentId()})),1)[0],u=v(c.useState(0),2),o=u[0],i=u[1];return c.useEffect((function(){if(t){g[e]||(g[e]=[]);var u=g[e].push(r);return i(u),function(){delete g[e][u-1];var t=g[e].length-1,r=n.ObjectUtils.findLastIndex(g[e],(function(e){return void 0!==e}));r!==t&&g[e].splice(r+1),i(void 0)}}}),[e,r,t]),o},e.useEventListener=p,e.useFavicon=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"shortcut icon";c.useLayoutEffect((function(){if(e){document.querySelectorAll("link[rel*='icon']").forEach((function(e){document.head.removeChild(e)}));var n=document.createElement("link");n.setAttribute("type",h[e.split(".").pop()]),n.setAttribute("rel",t),n.setAttribute("href",e),document.head.appendChild(n)}}),[e,t])},e.useGlobalOnEscapeKey=function(e){var n=e.callback,r=e.when,u=e.priority;t.useEffect((function(){if(r)return S.addListener(n,u)}),[n,r,u])},e.useIntersectionObserver=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=v(c.useState(!1),2),r=n[0],u=n[1];return c.useEffect((function(){if(e.current){var n=new IntersectionObserver((function(e){var t=v(e,1);u(t[0].isIntersecting)}),t);return n.observe(e.current),function(){n.disconnect()}}}),[t,e]),r},e.useInterval=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=c.useRef(null),u=c.useRef(null),o=c.useCallback((function(){return clearInterval(r.current)}),[r.current]);return c.useEffect((function(){u.current=e})),c.useEffect((function(){if(n)return r.current=setInterval((function(){u.current()}),t),o;o()}),[t,n]),m((function(){o()})),[o]},e.useLocalStorage=function(e,t){return k(e,t,"local")},e.useMatchMedia=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=v(c.useState(!1),2),r=n[0],u=n[1],o=c.useRef(null),i=function(e){return u(e.matches)},a=function(){return o.current&&o.current.removeEventListener("change",i)&&(o.current=null)};return c.useEffect((function(){return t&&(o.current=window.matchMedia(e),u(o.current.matches),o.current&&o.current.addEventListener("change",i)),a}),[e,t]),r},e.useMergeProps=function(){var e=t.useContext(r.PrimeReactContext);return function(){for(var t=arguments.length,r=new Array(t),u=0;u<t;u++)r[u]=arguments[u];return n.mergeProps(r,null==e?void 0:e.ptOptions)}},e.useMountEffect=D,e.useMouse=function(){var e=v(c.useState({x:0,y:0}),2),t=e[0],n=e[1],r=c.useRef(null),u=c.useCallback((function(e){var t,u;if(r.current){var o=e.currentTarget.getBoundingClientRect();t=e.pageX-o.left-(window.pageXOffset||window.scrollX),u=e.pageY-o.top-(window.pageYOffset||window.scrollY)}else t=e.clientX,u=e.clientY;n({x:Math.max(0,Math.round(t)),y:Math.max(0,Math.round(u))})}),[]),o=v(p({target:r,type:"mousemove",listener:u}),2),i=o[0],a=o[1],l=v(p({type:"mousemove",listener:u}),2),f=l[0],s=l[1];return c.useEffect((function(){return i(),r.current||f(),function(){a(),r.current||s()}}),[f,i,s,a]),C(C({ref:r},t),{},{reset:function(){return n({x:0,y:0})}})},e.useMove=function(e){var t=e.mode,n=void 0===t?"both":t,r=e.initialValue,u=void 0===r?{x:0,y:0}:r,o=v(c.useState(u),2),i=o[0],a=o[1],l=v(c.useState(!1),2),f=l[0],s=l[1],d=c.useRef(!1),y=c.useRef(!1),m=c.useRef(null),g=function(e){return z({x:e.clientX,y:e.clientY})},h=function(e){var t=e.clampedX,r=e.clampedY;"vertical"===n?a({y:1-r}):"horizontal"===n?a({x:t}):"both"===n&&a({x:t,y:r})},b=function(){y.current&&d.current&&(y.current=!1,s(!1),G())},w=function(e){e.cancelable&&e.preventDefault(),z({x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY})},E=v(p({type:"mousemove",listener:g}),2),O=E[0],S=E[1],D=v(p({type:"mouseup",listener:b}),2),j=D[0],P=D[1],R=v(p({type:"touchmove",listener:w}),2),x=R[0],L=R[1],C=v(p({type:"touchend",listener:b}),2),I=C[0],M=C[1],T=v(p({target:m,type:"mousedown",listener:function(e){X(),e.preventDefault(),g(e)}}),2),k=T[0],N=T[1],H=v(p({target:m,type:"touchstart",listener:function(e){e.cancelable&&e.preventDefault(),X(),w(e)},options:{passive:!1}}),2),_=H[0],K=H[1],Y=function(e,t,n){return Math.min(Math.max(e,t),n)},U=function(e){var t=e.y;return{clampedX:Y(e.x,0,1),clampedY:Y(t,0,1)}},G=function(){S(),P(),L(),M()};c.useEffect((function(){d.current=!0}),[]);var X=function(){!y.current&&d.current&&(y.current=!0,s(!0),O(),j(),x(),I())},z=function(e){var t=e.x,n=e.y;if(y.current){var r=m.current.getBoundingClientRect(),u=U({x:(t-r.left)/r.width,y:(n-r.top)/r.height});h({clampedX:u.clampedX,clampedY:u.clampedY})}};return c.useEffect((function(){return m.current&&(k(),_()),function(){m.current&&(N(),K())}}),[k,_,i,N,K]),A(A({ref:m},i),{},{active:f,reset:function(){a(u)}})},e.useOverlayListener=function(e){var t=e.target,r=e.overlay,u=e.listener,o=e.when,i=void 0===o||o,a=e.type,l=void 0===a?"click":a,f=c.useRef(null),s=c.useRef(null),d=v(p({target:"window",type:l,listener:function(e){u&&u(e,{type:"outside",valid:3!==e.which&&R(e)})}}),2),y=d[0],g=d[1],h=v(T({target:"window",listener:function(e){u&&u(e,{type:"resize",valid:!n.DomHandler.isTouchDevice()})}}),2),b=h[0],w=h[1],E=v(p({target:"window",type:"orientationchange",listener:function(e){u&&u(e,{type:"orientationchange",valid:!0})}}),2),O=E[0],S=E[1],D=v(M({target:t,listener:function(e){u&&u(e,{type:"scroll",valid:!0})}}),2),j=D[0],P=D[1],R=function(e){return f.current&&!(f.current.isSameNode(e.target)||f.current.contains(e.target)||s.current&&s.current.contains(e.target))},x=function(){g(),w(),S(),P()};return c.useEffect((function(){i?(f.current=n.DomHandler.getTargetElement(t),s.current=n.DomHandler.getTargetElement(r)):(x(),f.current=s.current=null)}),[t,r,i]),c.useEffect((function(){x()}),[i]),m((function(){x()})),[function(){y(),b(),O(),j()},x]},e.useOverlayScrollListener=M,e.usePrevious=y,e.useResizeListener=T,e.useSessionStorage=function(e,t){return k(e,t,"session")},e.useStorage=k,e.useStyle=function(e){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=v(t.useState(!1),2),c=o[0],a=o[1],l=t.useRef(null),f=t.useContext(r.PrimeReactContext),s=n.DomHandler.isClient()?window.document:void 0,d=u.document,y=void 0===d?s:d,m=u.manual,p=void 0!==m&&m,g=u.name,h=void 0===g?"style_".concat(++N):g,b=u.id,w=void 0===b?void 0:b,E=u.media,O=void 0===E?void 0:E,S=function(e){var t=e.querySelector('style[data-primereact-style-id="'.concat(h,'"]'));if(t)return t;if(void 0!==w){var n=y.getElementById(w);if(n)return n}return y.createElement("style")},D=function(){if(y&&!c){var t=(null==f?void 0:f.styleContainer)||y.head;l.current=S(t),l.current.isConnected||(l.current.type="text/css",w&&(l.current.id=w),O&&(l.current.media=O),n.DomHandler.addNonce(l.current,f&&f.nonce||i.default.nonce),t.appendChild(l.current),h&&l.current.setAttribute("data-primereact-style-id",h)),l.current.textContent=e,a(!0)}};return t.useEffect((function(){p||D()}),[p]),{id:w,name:h,update:function(t){c&&e!==t&&(l.current.textContent=t)},unload:function(){y&&l.current&&(n.DomHandler.removeInlineStyle(l.current),a(!1))},load:D,isLoaded:c}},e.useTimeout=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=c.useRef(null),u=c.useRef(null),o=c.useCallback((function(){return clearTimeout(r.current)}),[r.current]);return c.useEffect((function(){u.current=e})),c.useEffect((function(){if(n)return r.current=setTimeout((function(){u.current()}),t),o;o()}),[t,n]),m((function(){o()})),[o]},e.useUnmountEffect=m,e.useUpdateEffect=function(e,t){var n=c.useRef(!1);return c.useEffect((function(){if(n.current)return e&&e();n.current=!0}),t)},Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.utils,primereact.api);
|