primereact 10.9.3 → 10.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/accordion.cjs.js +43 -55
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +2 -2
- package/accordion/accordion.esm.js +43 -55
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +43 -55
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +44 -59
- package/api/api.cjs.min.js +1 -1
- package/api/api.esm.js +44 -59
- package/api/api.esm.min.js +1 -1
- package/api/api.js +44 -59
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +56 -56
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +27 -25
- package/autocomplete/autocomplete.esm.js +57 -57
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +56 -56
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +37 -49
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.d.ts +2 -2
- package/avatar/avatar.esm.js +37 -49
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +37 -49
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.d.ts +2 -2
- package/badge/badge.cjs.js +17 -23
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.d.ts +2 -2
- package/badge/badge.esm.js +17 -23
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +17 -23
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +37 -49
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.d.ts +2 -2
- package/blockui/blockui.esm.js +37 -49
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +37 -49
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +39 -50
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.d.ts +2 -2
- package/breadcrumb/breadcrumb.esm.js +39 -50
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +39 -50
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +23 -34
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +23 -34
- package/button/button.esm.min.js +1 -1
- package/button/button.js +23 -34
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +56 -60
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +6 -6
- package/calendar/calendar.esm.js +57 -61
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +56 -60
- package/calendar/calendar.min.js +1 -1
- package/carousel/carousel.cjs.js +43 -55
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.d.ts +2 -2
- package/carousel/carousel.esm.js +43 -55
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +43 -55
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +49 -54
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +17 -8
- package/cascadeselect/cascadeselect.esm.js +49 -54
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +49 -54
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.d.ts +2 -2
- package/checkbox/checkbox.cjs.js +38 -50
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +4 -4
- package/checkbox/checkbox.esm.js +38 -50
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +38 -50
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +52 -51
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +2 -2
- package/chip/chip.esm.js +54 -53
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +52 -51
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +44 -56
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +2 -2
- package/chips/chips.esm.js +44 -56
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +44 -56
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +47 -51
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +6 -6
- package/colorpicker/colorpicker.esm.js +47 -51
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +47 -51
- package/colorpicker/colorpicker.min.js +1 -1
- package/componentbase/componentbase.cjs.js +33 -40
- package/componentbase/componentbase.cjs.min.js +1 -1
- package/componentbase/componentbase.esm.js +33 -40
- package/componentbase/componentbase.esm.min.js +1 -1
- package/componentbase/componentbase.js +33 -40
- package/componentbase/componentbase.min.js +1 -1
- package/confirmdialog/confirmdialog.cjs.js +37 -49
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +37 -49
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +37 -49
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +47 -51
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +47 -51
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +47 -51
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +37 -49
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +2 -2
- package/contextmenu/contextmenu.esm.js +37 -49
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +37 -49
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +1151 -1449
- package/core/core.min.js +65 -65
- package/csstransition/csstransition.cjs.js +17 -23
- package/csstransition/csstransition.cjs.min.js +1 -1
- package/csstransition/csstransition.esm.js +17 -23
- package/csstransition/csstransition.esm.min.js +1 -1
- package/csstransition/csstransition.js +17 -23
- package/csstransition/csstransition.min.js +1 -1
- package/datascroller/datascroller.cjs.js +26 -32
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.d.ts +2 -2
- package/datascroller/datascroller.esm.js +26 -32
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +26 -32
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +411 -358
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +6 -5
- package/datatable/datatable.esm.js +412 -359
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +411 -358
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +46 -58
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.d.ts +2 -2
- package/dataview/dataview.esm.js +46 -58
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +46 -58
- package/dataview/dataview.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +14 -15
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.d.ts +2 -2
- package/deferredcontent/deferredcontent.esm.js +14 -15
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +14 -15
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +43 -55
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +12 -12
- package/dialog/dialog.esm.js +43 -55
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +43 -55
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.d.ts +2 -2
- package/dock/dock.cjs.js +43 -55
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.d.ts +2 -2
- package/dock/dock.esm.js +43 -55
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +43 -55
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +53 -57
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +14 -10
- package/dropdown/dropdown.esm.js +53 -57
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +53 -57
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +37 -49
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.d.ts +6 -6
- package/editor/editor.esm.js +37 -49
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +37 -49
- package/editor/editor.min.js +1 -1
- package/fieldset/fieldset.cjs.js +20 -26
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.d.ts +4 -4
- package/fieldset/fieldset.esm.js +20 -26
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +20 -26
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +48 -60
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +4 -4
- package/fileupload/fileupload.esm.js +48 -60
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +48 -60
- package/fileupload/fileupload.min.js +1 -1
- package/focustrap/focustrap.cjs.js +17 -23
- package/focustrap/focustrap.cjs.min.js +1 -1
- package/focustrap/focustrap.esm.js +17 -23
- package/focustrap/focustrap.esm.min.js +1 -1
- package/focustrap/focustrap.js +17 -23
- package/focustrap/focustrap.min.js +1 -1
- package/galleria/galleria.cjs.js +43 -55
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.d.ts +2 -2
- package/galleria/galleria.esm.js +43 -55
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +43 -55
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.cjs.js +53 -50
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.esm.js +53 -50
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +53 -50
- package/hooks/hooks.min.js +1 -1
- package/iconfield/iconfield.cjs.js +23 -34
- package/iconfield/iconfield.cjs.min.js +1 -1
- package/iconfield/iconfield.esm.js +23 -34
- package/iconfield/iconfield.esm.min.js +1 -1
- package/iconfield/iconfield.js +23 -34
- package/iconfield/iconfield.min.js +1 -1
- package/icons/angledoubledown/index.cjs.js +6 -11
- package/icons/angledoubledown/index.cjs.min.js +1 -1
- package/icons/angledoubledown/index.esm.js +6 -11
- package/icons/angledoubledown/index.esm.min.js +1 -1
- package/icons/angledoubledown/index.js +6 -11
- package/icons/angledoubledown/index.min.js +1 -1
- package/icons/angledoubleleft/index.cjs.js +6 -11
- package/icons/angledoubleleft/index.cjs.min.js +1 -1
- package/icons/angledoubleleft/index.esm.js +6 -11
- package/icons/angledoubleleft/index.esm.min.js +1 -1
- package/icons/angledoubleleft/index.js +6 -11
- package/icons/angledoubleleft/index.min.js +1 -1
- package/icons/angledoubleright/index.cjs.js +6 -11
- package/icons/angledoubleright/index.cjs.min.js +1 -1
- package/icons/angledoubleright/index.esm.js +6 -11
- package/icons/angledoubleright/index.esm.min.js +1 -1
- package/icons/angledoubleright/index.js +6 -11
- package/icons/angledoubleright/index.min.js +1 -1
- package/icons/angledoubleup/index.cjs.js +6 -11
- package/icons/angledoubleup/index.cjs.min.js +1 -1
- package/icons/angledoubleup/index.esm.js +6 -11
- package/icons/angledoubleup/index.esm.min.js +1 -1
- package/icons/angledoubleup/index.js +6 -11
- package/icons/angledoubleup/index.min.js +1 -1
- package/icons/angledown/index.cjs.js +6 -11
- package/icons/angledown/index.cjs.min.js +1 -1
- package/icons/angledown/index.esm.js +6 -11
- package/icons/angledown/index.esm.min.js +1 -1
- package/icons/angledown/index.js +6 -11
- package/icons/angledown/index.min.js +1 -1
- package/icons/angleleft/index.cjs.js +6 -11
- package/icons/angleleft/index.cjs.min.js +1 -1
- package/icons/angleleft/index.esm.js +6 -11
- package/icons/angleleft/index.esm.min.js +1 -1
- package/icons/angleleft/index.js +6 -11
- package/icons/angleleft/index.min.js +1 -1
- package/icons/angleright/index.cjs.js +6 -11
- package/icons/angleright/index.cjs.min.js +1 -1
- package/icons/angleright/index.esm.js +6 -11
- package/icons/angleright/index.esm.min.js +1 -1
- package/icons/angleright/index.js +6 -11
- package/icons/angleright/index.min.js +1 -1
- package/icons/angleup/index.cjs.js +6 -11
- package/icons/angleup/index.cjs.min.js +1 -1
- package/icons/angleup/index.esm.js +6 -11
- package/icons/angleup/index.esm.min.js +1 -1
- package/icons/angleup/index.js +6 -11
- package/icons/angleup/index.min.js +1 -1
- package/icons/arrowdown/index.cjs.js +6 -11
- package/icons/arrowdown/index.cjs.min.js +1 -1
- package/icons/arrowdown/index.esm.js +6 -11
- package/icons/arrowdown/index.esm.min.js +1 -1
- package/icons/arrowdown/index.js +6 -11
- package/icons/arrowdown/index.min.js +1 -1
- package/icons/arrowup/index.cjs.js +6 -11
- package/icons/arrowup/index.cjs.min.js +1 -1
- package/icons/arrowup/index.esm.js +6 -11
- package/icons/arrowup/index.esm.min.js +1 -1
- package/icons/arrowup/index.js +6 -11
- package/icons/arrowup/index.min.js +1 -1
- package/icons/ban/index.cjs.js +6 -11
- package/icons/ban/index.cjs.min.js +1 -1
- package/icons/ban/index.esm.js +6 -11
- package/icons/ban/index.esm.min.js +1 -1
- package/icons/ban/index.js +6 -11
- package/icons/ban/index.min.js +1 -1
- package/icons/bars/index.cjs.js +6 -11
- package/icons/bars/index.cjs.min.js +1 -1
- package/icons/bars/index.esm.js +6 -11
- package/icons/bars/index.esm.min.js +1 -1
- package/icons/bars/index.js +6 -11
- package/icons/bars/index.min.js +1 -1
- package/icons/blank/index.cjs.js +6 -11
- package/icons/blank/index.cjs.min.js +1 -1
- package/icons/blank/index.esm.js +6 -11
- package/icons/blank/index.esm.min.js +1 -1
- package/icons/blank/index.js +6 -11
- package/icons/blank/index.min.js +1 -1
- package/icons/calendar/index.cjs.js +6 -11
- package/icons/calendar/index.cjs.min.js +1 -1
- package/icons/calendar/index.esm.js +6 -11
- package/icons/calendar/index.esm.min.js +1 -1
- package/icons/calendar/index.js +6 -11
- package/icons/calendar/index.min.js +1 -1
- package/icons/check/index.cjs.js +6 -11
- package/icons/check/index.cjs.min.js +1 -1
- package/icons/check/index.esm.js +6 -11
- package/icons/check/index.esm.min.js +1 -1
- package/icons/check/index.js +6 -11
- package/icons/check/index.min.js +1 -1
- package/icons/chevrondown/index.cjs.js +6 -11
- package/icons/chevrondown/index.cjs.min.js +1 -1
- package/icons/chevrondown/index.esm.js +6 -11
- package/icons/chevrondown/index.esm.min.js +1 -1
- package/icons/chevrondown/index.js +6 -11
- package/icons/chevrondown/index.min.js +1 -1
- package/icons/chevronleft/index.cjs.js +6 -11
- package/icons/chevronleft/index.cjs.min.js +1 -1
- package/icons/chevronleft/index.esm.js +6 -11
- package/icons/chevronleft/index.esm.min.js +1 -1
- package/icons/chevronleft/index.js +6 -11
- package/icons/chevronleft/index.min.js +1 -1
- package/icons/chevronright/index.cjs.js +6 -11
- package/icons/chevronright/index.cjs.min.js +1 -1
- package/icons/chevronright/index.esm.js +6 -11
- package/icons/chevronright/index.esm.min.js +1 -1
- package/icons/chevronright/index.js +6 -11
- package/icons/chevronright/index.min.js +1 -1
- package/icons/chevronup/index.cjs.js +6 -11
- package/icons/chevronup/index.cjs.min.js +1 -1
- package/icons/chevronup/index.esm.js +6 -11
- package/icons/chevronup/index.esm.min.js +1 -1
- package/icons/chevronup/index.js +6 -11
- package/icons/chevronup/index.min.js +1 -1
- package/icons/download/index.cjs.js +6 -11
- package/icons/download/index.cjs.min.js +1 -1
- package/icons/download/index.esm.js +6 -11
- package/icons/download/index.esm.min.js +1 -1
- package/icons/download/index.js +6 -11
- package/icons/download/index.min.js +1 -1
- package/icons/exclamationtriangle/index.cjs.js +6 -11
- package/icons/exclamationtriangle/index.cjs.min.js +1 -1
- package/icons/exclamationtriangle/index.esm.js +6 -11
- package/icons/exclamationtriangle/index.esm.min.js +1 -1
- package/icons/exclamationtriangle/index.js +6 -11
- package/icons/exclamationtriangle/index.min.js +1 -1
- package/icons/eye/index.cjs.js +6 -11
- package/icons/eye/index.cjs.min.js +1 -1
- package/icons/eye/index.esm.js +6 -11
- package/icons/eye/index.esm.min.js +1 -1
- package/icons/eye/index.js +6 -11
- package/icons/eye/index.min.js +1 -1
- package/icons/eyeslash/index.cjs.js +6 -11
- package/icons/eyeslash/index.cjs.min.js +1 -1
- package/icons/eyeslash/index.esm.js +6 -11
- package/icons/eyeslash/index.esm.min.js +1 -1
- package/icons/eyeslash/index.js +6 -11
- package/icons/eyeslash/index.min.js +1 -1
- package/icons/filter/index.cjs.js +6 -11
- package/icons/filter/index.cjs.min.js +1 -1
- package/icons/filter/index.esm.js +6 -11
- package/icons/filter/index.esm.min.js +1 -1
- package/icons/filter/index.js +6 -11
- package/icons/filter/index.min.js +1 -1
- package/icons/filterslash/index.cjs.js +6 -11
- package/icons/filterslash/index.cjs.min.js +1 -1
- package/icons/filterslash/index.esm.js +6 -11
- package/icons/filterslash/index.esm.min.js +1 -1
- package/icons/filterslash/index.js +6 -11
- package/icons/filterslash/index.min.js +1 -1
- package/icons/infocircle/index.cjs.js +6 -11
- package/icons/infocircle/index.cjs.min.js +1 -1
- package/icons/infocircle/index.esm.js +6 -11
- package/icons/infocircle/index.esm.min.js +1 -1
- package/icons/infocircle/index.js +6 -11
- package/icons/infocircle/index.min.js +1 -1
- package/icons/minus/index.cjs.js +6 -11
- package/icons/minus/index.cjs.min.js +1 -1
- package/icons/minus/index.esm.js +6 -11
- package/icons/minus/index.esm.min.js +1 -1
- package/icons/minus/index.js +6 -11
- package/icons/minus/index.min.js +1 -1
- package/icons/pencil/index.cjs.js +6 -11
- package/icons/pencil/index.cjs.min.js +1 -1
- package/icons/pencil/index.esm.js +6 -11
- package/icons/pencil/index.esm.min.js +1 -1
- package/icons/pencil/index.js +6 -11
- package/icons/pencil/index.min.js +1 -1
- package/icons/plus/index.cjs.js +6 -11
- package/icons/plus/index.cjs.min.js +1 -1
- package/icons/plus/index.esm.js +6 -11
- package/icons/plus/index.esm.min.js +1 -1
- package/icons/plus/index.js +6 -11
- package/icons/plus/index.min.js +1 -1
- package/icons/refresh/index.cjs.js +6 -11
- package/icons/refresh/index.cjs.min.js +1 -1
- package/icons/refresh/index.esm.js +6 -11
- package/icons/refresh/index.esm.min.js +1 -1
- package/icons/refresh/index.js +6 -11
- package/icons/refresh/index.min.js +1 -1
- package/icons/search/index.cjs.js +6 -11
- package/icons/search/index.cjs.min.js +1 -1
- package/icons/search/index.esm.js +6 -11
- package/icons/search/index.esm.min.js +1 -1
- package/icons/search/index.js +6 -11
- package/icons/search/index.min.js +1 -1
- package/icons/searchminus/index.cjs.js +6 -11
- package/icons/searchminus/index.cjs.min.js +1 -1
- package/icons/searchminus/index.esm.js +6 -11
- package/icons/searchminus/index.esm.min.js +1 -1
- package/icons/searchminus/index.js +6 -11
- package/icons/searchminus/index.min.js +1 -1
- package/icons/searchplus/index.cjs.js +6 -11
- package/icons/searchplus/index.cjs.min.js +1 -1
- package/icons/searchplus/index.esm.js +6 -11
- package/icons/searchplus/index.esm.min.js +1 -1
- package/icons/searchplus/index.js +6 -11
- package/icons/searchplus/index.min.js +1 -1
- package/icons/sortalt/index.cjs.js +6 -11
- package/icons/sortalt/index.cjs.min.js +1 -1
- package/icons/sortalt/index.esm.js +6 -11
- package/icons/sortalt/index.esm.min.js +1 -1
- package/icons/sortalt/index.js +6 -11
- package/icons/sortalt/index.min.js +1 -1
- package/icons/sortamountdown/index.cjs.js +6 -11
- package/icons/sortamountdown/index.cjs.min.js +1 -1
- package/icons/sortamountdown/index.esm.js +6 -11
- package/icons/sortamountdown/index.esm.min.js +1 -1
- package/icons/sortamountdown/index.js +6 -11
- package/icons/sortamountdown/index.min.js +1 -1
- package/icons/sortamountupalt/index.cjs.js +6 -11
- package/icons/sortamountupalt/index.cjs.min.js +1 -1
- package/icons/sortamountupalt/index.esm.js +6 -11
- package/icons/sortamountupalt/index.esm.min.js +1 -1
- package/icons/sortamountupalt/index.js +6 -11
- package/icons/sortamountupalt/index.min.js +1 -1
- package/icons/spinner/index.cjs.js +6 -11
- package/icons/spinner/index.cjs.min.js +1 -1
- package/icons/spinner/index.esm.js +6 -11
- package/icons/spinner/index.esm.min.js +1 -1
- package/icons/spinner/index.js +6 -11
- package/icons/spinner/index.min.js +1 -1
- package/icons/star/index.cjs.js +6 -11
- package/icons/star/index.cjs.min.js +1 -1
- package/icons/star/index.esm.js +6 -11
- package/icons/star/index.esm.min.js +1 -1
- package/icons/star/index.js +6 -11
- package/icons/star/index.min.js +1 -1
- package/icons/starfill/index.cjs.js +6 -11
- package/icons/starfill/index.cjs.min.js +1 -1
- package/icons/starfill/index.esm.js +6 -11
- package/icons/starfill/index.esm.min.js +1 -1
- package/icons/starfill/index.js +6 -11
- package/icons/starfill/index.min.js +1 -1
- package/icons/thlarge/index.cjs.js +6 -11
- package/icons/thlarge/index.cjs.min.js +1 -1
- package/icons/thlarge/index.esm.js +6 -11
- package/icons/thlarge/index.esm.min.js +1 -1
- package/icons/thlarge/index.js +6 -11
- package/icons/thlarge/index.min.js +1 -1
- package/icons/times/index.cjs.js +6 -11
- package/icons/times/index.cjs.min.js +1 -1
- package/icons/times/index.esm.js +6 -11
- package/icons/times/index.esm.min.js +1 -1
- package/icons/times/index.js +6 -11
- package/icons/times/index.min.js +1 -1
- package/icons/timescircle/index.cjs.js +6 -11
- package/icons/timescircle/index.cjs.min.js +1 -1
- package/icons/timescircle/index.esm.js +6 -11
- package/icons/timescircle/index.esm.min.js +1 -1
- package/icons/timescircle/index.js +6 -11
- package/icons/timescircle/index.min.js +1 -1
- package/icons/trash/index.cjs.js +6 -11
- package/icons/trash/index.cjs.min.js +1 -1
- package/icons/trash/index.esm.js +6 -11
- package/icons/trash/index.esm.min.js +1 -1
- package/icons/trash/index.js +6 -11
- package/icons/trash/index.min.js +1 -1
- package/icons/undo/index.cjs.js +6 -11
- package/icons/undo/index.cjs.min.js +1 -1
- package/icons/undo/index.esm.js +6 -11
- package/icons/undo/index.esm.min.js +1 -1
- package/icons/undo/index.js +6 -11
- package/icons/undo/index.min.js +1 -1
- package/icons/upload/index.cjs.js +6 -11
- package/icons/upload/index.cjs.min.js +1 -1
- package/icons/upload/index.esm.js +6 -11
- package/icons/upload/index.esm.min.js +1 -1
- package/icons/upload/index.js +6 -11
- package/icons/upload/index.min.js +1 -1
- package/icons/windowmaximize/index.cjs.js +6 -11
- package/icons/windowmaximize/index.cjs.min.js +1 -1
- package/icons/windowmaximize/index.esm.js +6 -11
- package/icons/windowmaximize/index.esm.min.js +1 -1
- package/icons/windowmaximize/index.js +6 -11
- package/icons/windowmaximize/index.min.js +1 -1
- package/icons/windowminimize/index.cjs.js +6 -11
- package/icons/windowminimize/index.cjs.min.js +1 -1
- package/icons/windowminimize/index.esm.js +6 -11
- package/icons/windowminimize/index.esm.min.js +1 -1
- package/icons/windowminimize/index.js +6 -11
- package/icons/windowminimize/index.min.js +1 -1
- package/image/image.cjs.js +37 -49
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +4 -4
- package/image/image.esm.js +37 -49
- package/image/image.esm.min.js +1 -1
- package/image/image.js +37 -49
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +14 -15
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.d.ts +2 -2
- package/inplace/inplace.esm.js +14 -15
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +14 -15
- package/inplace/inplace.min.js +1 -1
- package/inputicon/inputicon.cjs.js +23 -34
- package/inputicon/inputicon.cjs.min.js +1 -1
- package/inputicon/inputicon.esm.js +23 -34
- package/inputicon/inputicon.esm.min.js +1 -1
- package/inputicon/inputicon.js +23 -34
- package/inputicon/inputicon.min.js +1 -1
- package/inputmask/inputmask.cjs.js +7 -12
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.d.ts +2 -2
- package/inputmask/inputmask.esm.js +7 -12
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +7 -12
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +49 -58
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +4 -4
- package/inputnumber/inputnumber.esm.js +49 -58
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +49 -58
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputotp/inputotp.cjs.js +65 -56
- package/inputotp/inputotp.cjs.min.js +1 -1
- package/inputotp/inputotp.esm.js +65 -56
- package/inputotp/inputotp.esm.min.js +1 -1
- package/inputotp/inputotp.js +65 -56
- package/inputotp/inputotp.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +23 -34
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.d.ts +4 -4
- package/inputswitch/inputswitch.esm.js +23 -34
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +23 -34
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +25 -35
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.d.ts +1 -1
- package/inputtext/inputtext.esm.js +25 -35
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +25 -35
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +23 -34
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.esm.js +23 -34
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +23 -34
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/keyfilter/keyfilter.cjs.js +16 -17
- package/keyfilter/keyfilter.cjs.min.js +1 -1
- package/keyfilter/keyfilter.esm.js +16 -17
- package/keyfilter/keyfilter.esm.min.js +1 -1
- package/keyfilter/keyfilter.js +16 -17
- package/keyfilter/keyfilter.min.js +1 -1
- package/knob/knob.cjs.js +15 -16
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.d.ts +2 -2
- package/knob/knob.esm.js +15 -16
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +15 -16
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +46 -58
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.d.ts +4 -4
- package/listbox/listbox.esm.js +46 -58
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +46 -58
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +37 -49
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.d.ts +2 -2
- package/megamenu/megamenu.esm.js +37 -49
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +37 -49
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +61 -64
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.d.ts +11 -6
- package/mention/mention.esm.js +61 -64
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +61 -64
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +57 -58
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +2 -2
- package/menu/menu.esm.js +58 -59
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +57 -58
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +43 -58
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.d.ts +8 -8
- package/menubar/menubar.esm.js +43 -58
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +43 -58
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +23 -34
- package/message/message.cjs.min.js +1 -1
- package/message/message.d.ts +2 -2
- package/message/message.esm.js +23 -34
- package/message/message.esm.min.js +1 -1
- package/message/message.js +23 -34
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +43 -55
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +2 -2
- package/messages/messages.esm.js +43 -55
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +43 -55
- package/messages/messages.min.js +1 -1
- package/metergroup/metergroup.cjs.js +23 -34
- package/metergroup/metergroup.cjs.min.js +1 -1
- package/metergroup/metergroup.esm.js +23 -34
- package/metergroup/metergroup.esm.min.js +1 -1
- package/metergroup/metergroup.js +23 -34
- package/metergroup/metergroup.min.js +1 -1
- package/multiselect/multiselect.cjs.js +70 -82
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +6 -6
- package/multiselect/multiselect.esm.js +70 -82
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +70 -82
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +38 -50
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +2 -2
- package/multistatecheckbox/multistatecheckbox.esm.js +38 -50
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +38 -50
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +77 -58
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.d.ts +2 -2
- package/orderlist/orderlist.esm.js +77 -58
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +77 -58
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +43 -55
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.d.ts +2 -2
- package/organizationchart/organizationchart.esm.js +43 -55
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +43 -55
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +46 -59
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +2 -2
- package/overlaypanel/overlaypanel.esm.js +46 -59
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +46 -59
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.cjs.js +41 -56
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.d.ts +2 -2
- package/paginator/paginator.esm.js +41 -56
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +41 -56
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +20 -26
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.d.ts +4 -4
- package/panel/panel.esm.js +20 -26
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +20 -26
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +37 -49
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +2 -2
- package/panelmenu/panelmenu.esm.js +37 -49
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +37 -49
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/index.cjs.js +17 -23
- package/passthrough/index.cjs.min.js +1 -1
- package/passthrough/index.esm.js +17 -23
- package/passthrough/index.esm.min.js +1 -1
- package/passthrough/index.js +17 -23
- package/passthrough/index.min.js +1 -1
- package/passthrough/tailwind/index.cjs.js +14 -15
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +14 -15
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +14 -15
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/password.cjs.js +46 -51
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +6 -6
- package/password/password.esm.js +47 -52
- package/password/password.esm.min.js +1 -1
- package/password/password.js +46 -51
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +50 -65
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.d.ts +2 -2
- package/picklist/picklist.esm.js +50 -65
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +50 -65
- package/picklist/picklist.min.js +1 -1
- package/portal/portal.cjs.js +14 -15
- package/portal/portal.cjs.min.js +1 -1
- package/portal/portal.esm.js +14 -15
- package/portal/portal.esm.min.js +1 -1
- package/portal/portal.js +14 -15
- package/portal/portal.min.js +1 -1
- package/primereact.all.cjs.js +858 -539
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +859 -540
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +858 -539
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +23 -34
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.d.ts +2 -2
- package/progressbar/progressbar.esm.js +23 -34
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +23 -34
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/progressspinner.d.ts +2 -2
- package/radiobutton/radiobutton.cjs.js +25 -36
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.d.ts +5 -5
- package/radiobutton/radiobutton.esm.js +25 -36
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +25 -36
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +37 -49
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.d.ts +2 -2
- package/rating/rating.esm.js +37 -49
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +37 -49
- package/rating/rating.min.js +1 -1
- package/ripple/ripple.cjs.js +37 -49
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +37 -49
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +37 -49
- package/ripple/ripple.min.js +1 -1
- package/scrollpanel/scrollpanel.cjs.js +20 -26
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.d.ts +8 -8
- package/scrollpanel/scrollpanel.esm.js +20 -26
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +20 -26
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +37 -49
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.d.ts +2 -2
- package/scrolltop/scrolltop.esm.js +37 -49
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +37 -49
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +26 -32
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.d.ts +2 -2
- package/selectbutton/selectbutton.esm.js +26 -32
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +26 -32
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/sidebar.cjs.js +37 -49
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +6 -6
- package/sidebar/sidebar.esm.js +37 -49
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +37 -49
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +17 -23
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.d.ts +2 -2
- package/skeleton/skeleton.esm.js +17 -23
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +17 -23
- package/skeleton/skeleton.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +46 -51
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +2 -2
- package/slidemenu/slidemenu.esm.js +47 -52
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +46 -51
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +43 -55
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.d.ts +3 -2
- package/slider/slider.esm.js +43 -55
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +43 -55
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +43 -55
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.d.ts +2 -2
- package/speeddial/speeddial.esm.js +43 -55
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +43 -55
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +37 -49
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +2 -2
- package/splitbutton/splitbutton.esm.js +37 -49
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +37 -49
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +43 -55
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.d.ts +2 -2
- package/splitter/splitter.esm.js +43 -55
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +43 -55
- package/splitter/splitter.min.js +1 -1
- package/stepper/stepper.cjs.js +39 -50
- package/stepper/stepper.cjs.min.js +1 -1
- package/stepper/stepper.d.ts +8 -3
- package/stepper/stepper.esm.js +39 -50
- package/stepper/stepper.esm.min.js +1 -1
- package/stepper/stepper.js +39 -50
- package/stepper/stepper.min.js +1 -1
- package/steps/steps.cjs.js +37 -49
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.d.ts +2 -2
- package/steps/steps.esm.js +37 -49
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +37 -49
- package/steps/steps.min.js +1 -1
- package/styleclass/styleclass.cjs.js +14 -15
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.d.ts +4 -4
- package/styleclass/styleclass.esm.js +14 -15
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +14 -15
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +37 -49
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.d.ts +2 -2
- package/tabmenu/tabmenu.esm.js +37 -49
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +37 -49
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +37 -44
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +2 -2
- package/tabview/tabview.esm.js +37 -44
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +37 -44
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +17 -23
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.d.ts +2 -2
- package/tag/tag.esm.js +17 -23
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +17 -23
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +20 -21
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.d.ts +2 -2
- package/terminal/terminal.esm.js +20 -21
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +20 -21
- package/terminal/terminal.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +37 -49
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +2 -2
- package/tieredmenu/tieredmenu.esm.js +37 -49
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +37 -49
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +23 -34
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.d.ts +4 -4
- package/timeline/timeline.esm.js +23 -34
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +23 -34
- package/timeline/timeline.min.js +1 -1
- package/toast/toast.cjs.js +43 -55
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +2 -2
- package/toast/toast.esm.js +43 -55
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +43 -55
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +23 -34
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.d.ts +2 -2
- package/togglebutton/togglebutton.esm.js +23 -34
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +23 -34
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.d.ts +2 -2
- package/tooltip/tooltip.cjs.js +43 -55
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.d.ts +3 -3
- package/tooltip/tooltip.esm.js +43 -55
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +43 -55
- package/tooltip/tooltip.min.js +1 -1
- package/tree/tree.cjs.js +52 -64
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +2 -2
- package/tree/tree.esm.js +52 -64
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +52 -64
- package/tree/tree.min.js +1 -1
- package/treeselect/treeselect.cjs.js +61 -66
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +2 -2
- package/treeselect/treeselect.esm.js +61 -66
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +61 -66
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +57 -69
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +2 -2
- package/treetable/treetable.esm.js +57 -69
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +57 -69
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +43 -55
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.d.ts +2 -2
- package/tristatecheckbox/tristatecheckbox.esm.js +43 -55
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +43 -55
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +197 -99
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +5 -1
- package/utils/utils.esm.js +197 -99
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +197 -99
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +37 -49
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +37 -49
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +37 -49
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +46 -10
package/hooks/hooks.cjs.js
CHANGED
|
@@ -30,8 +30,8 @@ function _interopNamespace(e) {
|
|
|
30
30
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
31
31
|
var PrimeReact__default = /*#__PURE__*/_interopDefaultLegacy(PrimeReact);
|
|
32
32
|
|
|
33
|
-
function _arrayWithHoles(
|
|
34
|
-
if (Array.isArray(
|
|
33
|
+
function _arrayWithHoles(r) {
|
|
34
|
+
if (Array.isArray(r)) return r;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
function _iterableToArrayLimit(r, l) {
|
|
@@ -62,27 +62,26 @@ function _iterableToArrayLimit(r, l) {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
function _arrayLikeToArray(
|
|
66
|
-
|
|
67
|
-
for (var
|
|
68
|
-
return
|
|
65
|
+
function _arrayLikeToArray(r, a) {
|
|
66
|
+
(null == a || a > r.length) && (a = r.length);
|
|
67
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
68
|
+
return n;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
function _unsupportedIterableToArray(
|
|
72
|
-
if (
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
71
|
+
function _unsupportedIterableToArray(r, a) {
|
|
72
|
+
if (r) {
|
|
73
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
74
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
75
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
76
|
+
}
|
|
78
77
|
}
|
|
79
78
|
|
|
80
79
|
function _nonIterableRest() {
|
|
81
80
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
82
81
|
}
|
|
83
82
|
|
|
84
|
-
function _slicedToArray(
|
|
85
|
-
return _arrayWithHoles(
|
|
83
|
+
function _slicedToArray(r, e) {
|
|
84
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
86
85
|
}
|
|
87
86
|
|
|
88
87
|
var usePrevious = function usePrevious(newValue) {
|
|
@@ -332,20 +331,20 @@ var useFavicon = function useFavicon() {
|
|
|
332
331
|
}, [newIcon, rel]);
|
|
333
332
|
};
|
|
334
333
|
|
|
335
|
-
function _arrayWithoutHoles(
|
|
336
|
-
if (Array.isArray(
|
|
334
|
+
function _arrayWithoutHoles(r) {
|
|
335
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
337
336
|
}
|
|
338
337
|
|
|
339
|
-
function _iterableToArray(
|
|
340
|
-
if (typeof Symbol
|
|
338
|
+
function _iterableToArray(r) {
|
|
339
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
341
340
|
}
|
|
342
341
|
|
|
343
342
|
function _nonIterableSpread() {
|
|
344
343
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
345
344
|
}
|
|
346
345
|
|
|
347
|
-
function _toConsumableArray(
|
|
348
|
-
return _arrayWithoutHoles(
|
|
346
|
+
function _toConsumableArray(r) {
|
|
347
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
349
348
|
}
|
|
350
349
|
|
|
351
350
|
/**
|
|
@@ -574,35 +573,29 @@ function _typeof(o) {
|
|
|
574
573
|
}, _typeof(o);
|
|
575
574
|
}
|
|
576
575
|
|
|
577
|
-
function
|
|
578
|
-
if (
|
|
579
|
-
var
|
|
580
|
-
if (
|
|
581
|
-
var
|
|
582
|
-
if (
|
|
576
|
+
function toPrimitive(t, r) {
|
|
577
|
+
if ("object" != _typeof(t) || !t) return t;
|
|
578
|
+
var e = t[Symbol.toPrimitive];
|
|
579
|
+
if (void 0 !== e) {
|
|
580
|
+
var i = e.call(t, r || "default");
|
|
581
|
+
if ("object" != _typeof(i)) return i;
|
|
583
582
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
584
583
|
}
|
|
585
|
-
return (
|
|
584
|
+
return ("string" === r ? String : Number)(t);
|
|
586
585
|
}
|
|
587
586
|
|
|
588
|
-
function
|
|
589
|
-
var
|
|
590
|
-
return _typeof(
|
|
587
|
+
function toPropertyKey(t) {
|
|
588
|
+
var i = toPrimitive(t, "string");
|
|
589
|
+
return "symbol" == _typeof(i) ? i : i + "";
|
|
591
590
|
}
|
|
592
591
|
|
|
593
|
-
function _defineProperty(
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
writable: true
|
|
601
|
-
});
|
|
602
|
-
} else {
|
|
603
|
-
obj[key] = value;
|
|
604
|
-
}
|
|
605
|
-
return obj;
|
|
592
|
+
function _defineProperty(e, r, t) {
|
|
593
|
+
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
594
|
+
value: t,
|
|
595
|
+
enumerable: !0,
|
|
596
|
+
configurable: !0,
|
|
597
|
+
writable: !0
|
|
598
|
+
}) : e[r] = t, e;
|
|
606
599
|
}
|
|
607
600
|
|
|
608
601
|
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; }
|
|
@@ -887,7 +880,14 @@ var useOverlayScrollListener = function useOverlayScrollListener(_ref) {
|
|
|
887
880
|
}
|
|
888
881
|
if (!listenerRef.current && targetRef.current) {
|
|
889
882
|
var hideOnScroll = context ? context.hideOverlaysOnDocumentScrolling : PrimeReact__default["default"].hideOverlaysOnDocumentScrolling;
|
|
890
|
-
var nodes = scrollableParentsRef.current = utils.DomHandler.getScrollableParents(targetRef.current
|
|
883
|
+
var nodes = scrollableParentsRef.current = utils.DomHandler.getScrollableParents(targetRef.current);
|
|
884
|
+
|
|
885
|
+
// Ensure window/body is always included as fallback
|
|
886
|
+
if (!nodes.some(function (node) {
|
|
887
|
+
return node === document.body || node === window;
|
|
888
|
+
})) {
|
|
889
|
+
nodes.push(hideOnScroll ? window : document.body);
|
|
890
|
+
}
|
|
891
891
|
listenerRef.current = function (event) {
|
|
892
892
|
return listener && listener(event);
|
|
893
893
|
};
|
|
@@ -979,19 +979,20 @@ var useOverlayListener = function useOverlayListener(_ref) {
|
|
|
979
979
|
type: 'outside',
|
|
980
980
|
valid: event.which !== 3 && isOutsideClicked(event)
|
|
981
981
|
});
|
|
982
|
-
}
|
|
982
|
+
},
|
|
983
|
+
when: when
|
|
983
984
|
}),
|
|
984
985
|
_useEventListener2 = _slicedToArray(_useEventListener, 2),
|
|
985
986
|
bindDocumentClickListener = _useEventListener2[0],
|
|
986
987
|
unbindDocumentClickListener = _useEventListener2[1];
|
|
987
988
|
var _useResizeListener = useResizeListener({
|
|
988
|
-
target: 'window',
|
|
989
989
|
listener: function listener(event) {
|
|
990
990
|
_listener && _listener(event, {
|
|
991
991
|
type: 'resize',
|
|
992
992
|
valid: !utils.DomHandler.isTouchDevice()
|
|
993
993
|
});
|
|
994
|
-
}
|
|
994
|
+
},
|
|
995
|
+
when: when
|
|
995
996
|
}),
|
|
996
997
|
_useResizeListener2 = _slicedToArray(_useResizeListener, 2),
|
|
997
998
|
bindWindowResizeListener = _useResizeListener2[0],
|
|
@@ -1004,7 +1005,8 @@ var useOverlayListener = function useOverlayListener(_ref) {
|
|
|
1004
1005
|
type: 'orientationchange',
|
|
1005
1006
|
valid: true
|
|
1006
1007
|
});
|
|
1007
|
-
}
|
|
1008
|
+
},
|
|
1009
|
+
when: when
|
|
1008
1010
|
}),
|
|
1009
1011
|
_useEventListener4 = _slicedToArray(_useEventListener3, 2),
|
|
1010
1012
|
bindWindowOrientationChangeListener = _useEventListener4[0],
|
|
@@ -1016,7 +1018,8 @@ var useOverlayListener = function useOverlayListener(_ref) {
|
|
|
1016
1018
|
type: 'scroll',
|
|
1017
1019
|
valid: true
|
|
1018
1020
|
});
|
|
1019
|
-
}
|
|
1021
|
+
},
|
|
1022
|
+
when: when
|
|
1020
1023
|
}),
|
|
1021
1024
|
_useOverlayScrollList2 = _slicedToArray(_useOverlayScrollList, 2),
|
|
1022
1025
|
bindOverlayScrollListener = _useOverlayScrollList2[0],
|
package/hooks/hooks.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/utils"),n=require("primereact/api");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function u(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 o=u(e),c=r(n);function i(e){if(Array.isArray(e))return e}function a(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 l(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 l(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)?l(e,t):void 0}}function f(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function d(e,t){return i(e)||a(e,t)||s(e,t)||f()}var p=function(e){var t=o.useRef(null);return o.useEffect((function(){return t.current=e,function(){t.current=null}}),[e]),t.current},v=function(e){return o.useEffect((function(){return e}),[])},y=function(e){var n=e.target,r=void 0===n?"document":n,u=e.type,c=e.listener,i=e.options,a=e.when,l=void 0===a||a,s=o.useRef(null),f=o.useRef(null),d=p(c),y=p(i),m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.target;t.ObjectUtils.isNotEmpty(n)&&(g(),(e.when||l)&&(s.current=t.DomHandler.getTargetElement(n))),!f.current&&s.current&&(f.current=function(e){return c&&c(e)},s.current.addEventListener(u,f.current,i))},g=function(){f.current&&(s.current.removeEventListener(u,f.current,i),f.current=null)},h=function(){g(),d=null,y=null},b=o.useCallback((function(){l?s.current=t.DomHandler.getTargetElement(r):(g(),s.current=null)}),[r,l]);return o.useEffect((function(){b()}),[b]),o.useEffect((function(){var e="".concat(d)!=="".concat(c),t=f.current;t&&(e||y!==i)?(g(),l&&m()):t||h()}),[c,i,l]),v((function(){h()})),[m,g]},m={},g={ico:"image/x-icon",png:"image/png",svg:"image/svg+xml",gif:"image/gif"};function h(e){if(Array.isArray(e))return l(e)}function b(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function w(){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 h(e)||b(e)||s(e)||w()}var O={escKeyListeners:new Map,onGlobalKeyDown:function(e){if("Escape"===e.code){var t=O.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=t.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=d(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()}}},S=function(e){var t=o.useRef(!1);return o.useEffect((function(){if(!t.current)return t.current=!0,e&&e()}),[])};function x(e){return x="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},x(e)}function D(e,t){if("object"!==x(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==x(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function j(e){var t=D(e,"string");return"symbol"===x(t)?t:String(t)}function P(e,t,n){return(t=j(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 R(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){P(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 C(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){P(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 A=function(e){var r=e.target,u=e.listener,i=e.options,a=e.when,l=void 0===a||a,s=o.useContext(n.PrimeReactContext),f=o.useRef(null),d=o.useRef(null),y=o.useRef([]),m=p(u),g=p(i),h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.ObjectUtils.isNotEmpty(e.target)&&(b(),(e.when||l)&&(f.current=t.DomHandler.getTargetElement(e.target))),!d.current&&f.current){var n=y.current=t.DomHandler.getScrollableParents(f.current,s?s.hideOverlaysOnDocumentScrolling:c.default.hideOverlaysOnDocumentScrolling);d.current=function(e){return u&&u(e)},n.forEach((function(e){return e.addEventListener("scroll",d.current,i)}))}},b=function(){d.current&&(y.current.forEach((function(e){return e.removeEventListener("scroll",d.current,i)})),d.current=null)},w=function(){b(),y.current=null,m=null,g=null},E=o.useCallback((function(){l?f.current=t.DomHandler.getTargetElement(r):(b(),f.current=null)}),[r,l]);return o.useEffect((function(){E()}),[E]),o.useEffect((function(){var e="".concat(m)!=="".concat(u),t=d.current;t&&(e||g!==i)?(b(),l&&h()):t||w()}),[u,i,l]),v((function(){w()})),[h,b]},T=function(e){var t=e.when;return y({target:"window",type:"resize",listener:e.listener,when:void 0===t||t})},M=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"local",r="undefined"!=typeof window,u=d(y({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),c=u[0],i=u[1],a=d(o.useState(e),2),l=a[0],s=a[1];return o.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 c(),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))}}]},k=0;exports.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,TOOLTIP:1200},exports.useClickOutside=function(e,t){var n=function(n){e.current&&!e.current.contains(n.target)&&t(n)},r=d(y({type:"mousedown",listener:n}),2),u=r[0],c=r[1],i=d(y({type:"touchstart",listener:n}),2),a=i[0],l=i[1];return o.useEffect((function(){if(e.current)return u(),a(),function(){c(),l()}})),[e,t]},exports.useCounter=function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{step:1},t=d(o.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)}}},exports.useDebounce=function(e,t){var n=d(o.useState(e),2),r=n[0],u=n[1],c=d(o.useState(e),2),i=c[0],a=c[1],l=o.useRef(!1),s=o.useRef(null),f=function(){return window.clearTimeout(s.current)};return S((function(){l.current=!0})),v((function(){f()})),o.useEffect((function(){l.current&&(f(),s.current=window.setTimeout((function(){a(r)}),t))}),[r,t]),[r,i,u]},exports.useDisplayOrder=function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=d(o.useState((function(){return t.UniqueComponentId()})),1)[0],u=d(o.useState(0),2),c=u[0],i=u[1];return o.useEffect((function(){if(n){m[e]||(m[e]=[]);var u=m[e].push(r);return i(u),function(){delete m[e][u-1];var n=m[e].length-1,r=t.ObjectUtils.findLastIndex(m[e],(function(e){return void 0!==e}));r!==n&&m[e].splice(r+1),i(void 0)}}}),[e,r,n]),c},exports.useEventListener=y,exports.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";o.useLayoutEffect((function(){if(e){document.querySelectorAll("link[rel*='icon']").forEach((function(e){document.head.removeChild(e)}));var n=document.createElement("link");n.setAttribute("type",g[e.split(".").pop()]),n.setAttribute("rel",t),n.setAttribute("href",e),document.head.appendChild(n)}}),[e,t])},exports.useGlobalOnEscapeKey=function(t){var n=t.callback,r=t.when,u=t.priority;e.useEffect((function(){if(r)return O.addListener(n,u)}),[n,r,u])},exports.useIntersectionObserver=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=d(o.useState(!1),2),r=n[0],u=n[1];return o.useEffect((function(){if(e.current){var n=new IntersectionObserver((function(e){var t=d(e,1);u(t[0].isIntersecting)}),t);return n.observe(e.current),function(){n.disconnect()}}}),[t,e]),r},exports.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=o.useRef(null),u=o.useRef(null),c=o.useCallback((function(){return clearInterval(r.current)}),[r.current]);return o.useEffect((function(){u.current=e})),o.useEffect((function(){if(n)return r.current=setInterval((function(){u.current()}),t),c;c()}),[t,n]),v((function(){c()})),[c]},exports.useLocalStorage=function(e,t){return M(e,t,"local")},exports.useMatchMedia=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=d(o.useState(!1),2),r=n[0],u=n[1],c=o.useRef(null),i=function(e){return u(e.matches)},a=function(){return c.current&&c.current.removeEventListener("change",i)&&(c.current=null)};return o.useEffect((function(){return t&&(c.current=window.matchMedia(e),u(c.current.matches),c.current&&c.current.addEventListener("change",i)),a}),[e,t]),r},exports.useMergeProps=function(){var r=e.useContext(n.PrimeReactContext);return function(){for(var e=arguments.length,n=new Array(e),u=0;u<e;u++)n[u]=arguments[u];return t.mergeProps(n,null==r?void 0:r.ptOptions)}},exports.useMountEffect=S,exports.useMouse=function(){var e=d(o.useState({x:0,y:0}),2),t=e[0],n=e[1],r=o.useRef(null),u=o.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))})}),[]),c=d(y({target:r,type:"mousemove",listener:u}),2),i=c[0],a=c[1],l=d(y({type:"mousemove",listener:u}),2),s=l[0],f=l[1];return o.useEffect((function(){return i(),r.current||s(),function(){a(),r.current||f()}}),[s,i,f,a]),R(R({ref:r},t),{},{reset:function(){return n({x:0,y:0})}})},exports.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,c=d(o.useState(u),2),i=c[0],a=c[1],l=d(o.useState(!1),2),s=l[0],f=l[1],p=o.useRef(!1),v=o.useRef(!1),m=o.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(){v.current&&p.current&&(v.current=!1,f(!1),G())},w=function(e){e.cancelable&&e.preventDefault(),z({x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY})},E=d(y({type:"mousemove",listener:g}),2),O=E[0],S=E[1],x=d(y({type:"mouseup",listener:b}),2),D=x[0],j=x[1],P=d(y({type:"touchmove",listener:w}),2),L=P[0],R=P[1],I=d(y({type:"touchend",listener:b}),2),A=I[0],T=I[1],M=d(y({target:m,type:"mousedown",listener:function(e){X(),e.preventDefault(),g(e)}}),2),k=M[0],N=M[1],H=d(y({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(),j(),R(),T()};o.useEffect((function(){p.current=!0}),[]);var X=function(){!v.current&&p.current&&(v.current=!0,f(!0),O(),D(),L(),A())},z=function(e){var t=e.x,n=e.y;if(v.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 o.useEffect((function(){return m.current&&(k(),_()),function(){m.current&&(N(),K())}}),[k,_,i,N,K]),C(C({ref:m},i),{},{active:s,reset:function(){a(u)}})},exports.useOverlayListener=function(e){var n=e.target,r=e.overlay,u=e.listener,c=e.when,i=void 0===c||c,a=e.type,l=void 0===a?"click":a,s=o.useRef(null),f=o.useRef(null),p=d(y({target:"window",type:l,listener:function(e){u&&u(e,{type:"outside",valid:3!==e.which&&P(e)})}}),2),m=p[0],g=p[1],h=d(T({target:"window",listener:function(e){u&&u(e,{type:"resize",valid:!t.DomHandler.isTouchDevice()})}}),2),b=h[0],w=h[1],E=d(y({target:"window",type:"orientationchange",listener:function(e){u&&u(e,{type:"orientationchange",valid:!0})}}),2),O=E[0],S=E[1],x=d(A({target:n,listener:function(e){u&&u(e,{type:"scroll",valid:!0})}}),2),D=x[0],j=x[1],P=function(e){return s.current&&!(s.current.isSameNode(e.target)||s.current.contains(e.target)||f.current&&f.current.contains(e.target))},L=function(){g(),w(),S(),j()};return o.useEffect((function(){i?(s.current=t.DomHandler.getTargetElement(n),f.current=t.DomHandler.getTargetElement(r)):(L(),s.current=f.current=null)}),[n,r,i]),v((function(){L()})),[function(){m(),b(),O(),D()},L]},exports.useOverlayScrollListener=A,exports.usePrevious=p,exports.useResizeListener=T,exports.useSessionStorage=function(e,t){return M(e,t,"session")},exports.useStorage=M,exports.useStyle=function(r){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=d(e.useState(!1),2),i=o[0],a=o[1],l=e.useRef(null),s=e.useContext(n.PrimeReactContext),f=t.DomHandler.isClient()?window.document:void 0,p=u.document,v=void 0===p?f:p,y=u.manual,m=void 0!==y&&y,g=u.name,h=void 0===g?"style_".concat(++k):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=v.getElementById(w);if(n)return n}return v.createElement("style")},x=function(){if(v&&!i){var e=(null==s?void 0:s.styleContainer)||v.head;l.current=S(e),l.current.isConnected||(l.current.type="text/css",w&&(l.current.id=w),O&&(l.current.media=O),t.DomHandler.addNonce(l.current,s&&s.nonce||c.default.nonce),e.appendChild(l.current),h&&l.current.setAttribute("data-primereact-style-id",h)),l.current.textContent=r,a(!0)}};return e.useEffect((function(){m||x()}),[m]),{id:w,name:h,update:function(e){i&&r!==e&&(l.current.textContent=e)},unload:function(){v&&l.current&&(t.DomHandler.removeInlineStyle(l.current),a(!1))},load:x,isLoaded:i}},exports.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=o.useRef(null),u=o.useRef(null),c=o.useCallback((function(){return clearTimeout(r.current)}),[r.current]);return o.useEffect((function(){u.current=e})),o.useEffect((function(){if(n)return r.current=setTimeout((function(){u.current()}),t),c;c()}),[t,n]),v((function(){c()})),[c]},exports.useUnmountEffect=v,exports.useUpdateEffect=function(e,t){var n=o.useRef(!1);return o.useEffect((function(){if(n.current)return e&&e();n.current=!0}),t)};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/utils"),n=require("primereact/api");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function u(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 o=u(e),c=r(n);function i(e){if(Array.isArray(e))return e}function a(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 l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){if(e){if("string"==typeof e)return l(e,t);var n={}.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)?l(e,t):void 0}}function f(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function d(e,t){return i(e)||a(e,t)||s(e,t)||f()}var p=function(e){var t=o.useRef(null);return o.useEffect((function(){return t.current=e,function(){t.current=null}}),[e]),t.current},v=function(e){return o.useEffect((function(){return e}),[])},y=function(e){var n=e.target,r=void 0===n?"document":n,u=e.type,c=e.listener,i=e.options,a=e.when,l=void 0===a||a,s=o.useRef(null),f=o.useRef(null),d=p(c),y=p(i),m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.target;t.ObjectUtils.isNotEmpty(n)&&(g(),(e.when||l)&&(s.current=t.DomHandler.getTargetElement(n))),!f.current&&s.current&&(f.current=function(e){return c&&c(e)},s.current.addEventListener(u,f.current,i))},g=function(){f.current&&(s.current.removeEventListener(u,f.current,i),f.current=null)},h=function(){g(),d=null,y=null},b=o.useCallback((function(){l?s.current=t.DomHandler.getTargetElement(r):(g(),s.current=null)}),[r,l]);return o.useEffect((function(){b()}),[b]),o.useEffect((function(){var e="".concat(d)!=="".concat(c),t=f.current;t&&(e||y!==i)?(g(),l&&m()):t||h()}),[c,i,l]),v((function(){h()})),[m,g]},m={},g={ico:"image/x-icon",png:"image/png",svg:"image/svg+xml",gif:"image/gif"};function h(e){if(Array.isArray(e))return l(e)}function b(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function w(){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 h(e)||b(e)||s(e)||w()}var O={escKeyListeners:new Map,onGlobalKeyDown:function(e){if("Escape"===e.code){var t=O.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=t.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=d(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()}}},S=function(e){var t=o.useRef(!1);return o.useEffect((function(){if(!t.current)return t.current=!0,e&&e()}),[])};function x(e){return x="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},x(e)}function D(e,t){if("object"!=x(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=x(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function j(e){var t=D(e,"string");return"symbol"==x(t)?t:t+""}function P(e,t,n){return(t=j(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 R(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){P(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 C(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){P(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 A=function(e){var r=e.target,u=e.listener,i=e.options,a=e.when,l=void 0===a||a,s=o.useContext(n.PrimeReactContext),f=o.useRef(null),d=o.useRef(null),y=o.useRef([]),m=p(u),g=p(i),h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.ObjectUtils.isNotEmpty(e.target)&&(b(),(e.when||l)&&(f.current=t.DomHandler.getTargetElement(e.target))),!d.current&&f.current){var n=s?s.hideOverlaysOnDocumentScrolling:c.default.hideOverlaysOnDocumentScrolling,r=y.current=t.DomHandler.getScrollableParents(f.current);r.some((function(e){return e===document.body||e===window}))||r.push(n?window:document.body),d.current=function(e){return u&&u(e)},r.forEach((function(e){return e.addEventListener("scroll",d.current,i)}))}},b=function(){d.current&&(y.current.forEach((function(e){return e.removeEventListener("scroll",d.current,i)})),d.current=null)},w=function(){b(),y.current=null,m=null,g=null},E=o.useCallback((function(){l?f.current=t.DomHandler.getTargetElement(r):(b(),f.current=null)}),[r,l]);return o.useEffect((function(){E()}),[E]),o.useEffect((function(){var e="".concat(m)!=="".concat(u),t=d.current;t&&(e||g!==i)?(b(),l&&h()):t||w()}),[u,i,l]),v((function(){w()})),[h,b]},T=function(e){var t=e.when;return y({target:"window",type:"resize",listener:e.listener,when:void 0===t||t})},M=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"local",r="undefined"!=typeof window,u=d(y({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),c=u[0],i=u[1],a=d(o.useState(e),2),l=a[0],s=a[1];return o.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 c(),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))}}]},k=0;exports.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,TOOLTIP:1200},exports.useClickOutside=function(e,t){var n=function(n){e.current&&!e.current.contains(n.target)&&t(n)},r=d(y({type:"mousedown",listener:n}),2),u=r[0],c=r[1],i=d(y({type:"touchstart",listener:n}),2),a=i[0],l=i[1];return o.useEffect((function(){if(e.current)return u(),a(),function(){c(),l()}})),[e,t]},exports.useCounter=function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{step:1},t=d(o.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)}}},exports.useDebounce=function(e,t){var n=d(o.useState(e),2),r=n[0],u=n[1],c=d(o.useState(e),2),i=c[0],a=c[1],l=o.useRef(!1),s=o.useRef(null),f=function(){return window.clearTimeout(s.current)};return S((function(){l.current=!0})),v((function(){f()})),o.useEffect((function(){l.current&&(f(),s.current=window.setTimeout((function(){a(r)}),t))}),[r,t]),[r,i,u]},exports.useDisplayOrder=function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=d(o.useState((function(){return t.UniqueComponentId()})),1)[0],u=d(o.useState(0),2),c=u[0],i=u[1];return o.useEffect((function(){if(n){m[e]||(m[e]=[]);var u=m[e].push(r);return i(u),function(){delete m[e][u-1];var n=m[e].length-1,r=t.ObjectUtils.findLastIndex(m[e],(function(e){return void 0!==e}));r!==n&&m[e].splice(r+1),i(void 0)}}}),[e,r,n]),c},exports.useEventListener=y,exports.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";o.useLayoutEffect((function(){if(e){document.querySelectorAll("link[rel*='icon']").forEach((function(e){document.head.removeChild(e)}));var n=document.createElement("link");n.setAttribute("type",g[e.split(".").pop()]),n.setAttribute("rel",t),n.setAttribute("href",e),document.head.appendChild(n)}}),[e,t])},exports.useGlobalOnEscapeKey=function(t){var n=t.callback,r=t.when,u=t.priority;e.useEffect((function(){if(r)return O.addListener(n,u)}),[n,r,u])},exports.useIntersectionObserver=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=d(o.useState(!1),2),r=n[0],u=n[1];return o.useEffect((function(){if(e.current){var n=new IntersectionObserver((function(e){var t=d(e,1);u(t[0].isIntersecting)}),t);return n.observe(e.current),function(){n.disconnect()}}}),[t,e]),r},exports.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=o.useRef(null),u=o.useRef(null),c=o.useCallback((function(){return clearInterval(r.current)}),[r.current]);return o.useEffect((function(){u.current=e})),o.useEffect((function(){if(n)return r.current=setInterval((function(){u.current()}),t),c;c()}),[t,n]),v((function(){c()})),[c]},exports.useLocalStorage=function(e,t){return M(e,t,"local")},exports.useMatchMedia=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=d(o.useState(!1),2),r=n[0],u=n[1],c=o.useRef(null),i=function(e){return u(e.matches)},a=function(){return c.current&&c.current.removeEventListener("change",i)&&(c.current=null)};return o.useEffect((function(){return t&&(c.current=window.matchMedia(e),u(c.current.matches),c.current&&c.current.addEventListener("change",i)),a}),[e,t]),r},exports.useMergeProps=function(){var r=e.useContext(n.PrimeReactContext);return function(){for(var e=arguments.length,n=new Array(e),u=0;u<e;u++)n[u]=arguments[u];return t.mergeProps(n,null==r?void 0:r.ptOptions)}},exports.useMountEffect=S,exports.useMouse=function(){var e=d(o.useState({x:0,y:0}),2),t=e[0],n=e[1],r=o.useRef(null),u=o.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))})}),[]),c=d(y({target:r,type:"mousemove",listener:u}),2),i=c[0],a=c[1],l=d(y({type:"mousemove",listener:u}),2),s=l[0],f=l[1];return o.useEffect((function(){return i(),r.current||s(),function(){a(),r.current||f()}}),[s,i,f,a]),R(R({ref:r},t),{},{reset:function(){return n({x:0,y:0})}})},exports.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,c=d(o.useState(u),2),i=c[0],a=c[1],l=d(o.useState(!1),2),s=l[0],f=l[1],p=o.useRef(!1),v=o.useRef(!1),m=o.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(){v.current&&p.current&&(v.current=!1,f(!1),G())},w=function(e){e.cancelable&&e.preventDefault(),z({x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY})},E=d(y({type:"mousemove",listener:g}),2),O=E[0],S=E[1],x=d(y({type:"mouseup",listener:b}),2),D=x[0],j=x[1],P=d(y({type:"touchmove",listener:w}),2),L=P[0],R=P[1],I=d(y({type:"touchend",listener:b}),2),A=I[0],T=I[1],M=d(y({target:m,type:"mousedown",listener:function(e){X(),e.preventDefault(),g(e)}}),2),k=M[0],N=M[1],H=d(y({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(),j(),R(),T()};o.useEffect((function(){p.current=!0}),[]);var X=function(){!v.current&&p.current&&(v.current=!0,f(!0),O(),D(),L(),A())},z=function(e){var t=e.x,n=e.y;if(v.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 o.useEffect((function(){return m.current&&(k(),_()),function(){m.current&&(N(),K())}}),[k,_,i,N,K]),C(C({ref:m},i),{},{active:s,reset:function(){a(u)}})},exports.useOverlayListener=function(e){var n=e.target,r=e.overlay,u=e.listener,c=e.when,i=void 0===c||c,a=e.type,l=void 0===a?"click":a,s=o.useRef(null),f=o.useRef(null),p=d(y({target:"window",type:l,listener:function(e){u&&u(e,{type:"outside",valid:3!==e.which&&P(e)})},when:i}),2),m=p[0],g=p[1],h=d(T({listener:function(e){u&&u(e,{type:"resize",valid:!t.DomHandler.isTouchDevice()})},when:i}),2),b=h[0],w=h[1],E=d(y({target:"window",type:"orientationchange",listener:function(e){u&&u(e,{type:"orientationchange",valid:!0})},when:i}),2),O=E[0],S=E[1],x=d(A({target:n,listener:function(e){u&&u(e,{type:"scroll",valid:!0})},when:i}),2),D=x[0],j=x[1],P=function(e){return s.current&&!(s.current.isSameNode(e.target)||s.current.contains(e.target)||f.current&&f.current.contains(e.target))},L=function(){g(),w(),S(),j()};return o.useEffect((function(){i?(s.current=t.DomHandler.getTargetElement(n),f.current=t.DomHandler.getTargetElement(r)):(L(),s.current=f.current=null)}),[n,r,i]),v((function(){L()})),[function(){m(),b(),O(),D()},L]},exports.useOverlayScrollListener=A,exports.usePrevious=p,exports.useResizeListener=T,exports.useSessionStorage=function(e,t){return M(e,t,"session")},exports.useStorage=M,exports.useStyle=function(r){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=d(e.useState(!1),2),i=o[0],a=o[1],l=e.useRef(null),s=e.useContext(n.PrimeReactContext),f=t.DomHandler.isClient()?window.document:void 0,p=u.document,v=void 0===p?f:p,y=u.manual,m=void 0!==y&&y,g=u.name,h=void 0===g?"style_".concat(++k):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=v.getElementById(w);if(n)return n}return v.createElement("style")},x=function(){if(v&&!i){var e=(null==s?void 0:s.styleContainer)||v.head;l.current=S(e),l.current.isConnected||(l.current.type="text/css",w&&(l.current.id=w),O&&(l.current.media=O),t.DomHandler.addNonce(l.current,s&&s.nonce||c.default.nonce),e.appendChild(l.current),h&&l.current.setAttribute("data-primereact-style-id",h)),l.current.textContent=r,a(!0)}};return e.useEffect((function(){m||x()}),[m]),{id:w,name:h,update:function(e){i&&r!==e&&(l.current.textContent=e)},unload:function(){v&&l.current&&(t.DomHandler.removeInlineStyle(l.current),a(!1))},load:x,isLoaded:i}},exports.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=o.useRef(null),u=o.useRef(null),c=o.useCallback((function(){return clearTimeout(r.current)}),[r.current]);return o.useEffect((function(){u.current=e})),o.useEffect((function(){if(n)return r.current=setTimeout((function(){u.current()}),t),c;c()}),[t,n]),v((function(){c()})),[c]},exports.useUnmountEffect=v,exports.useUpdateEffect=function(e,t){var n=o.useRef(!1);return o.useEffect((function(){if(n.current)return e&&e();n.current=!0}),t)};
|
package/hooks/hooks.esm.js
CHANGED
|
@@ -4,8 +4,8 @@ import { useEffect, useContext, useState, useRef } from 'react';
|
|
|
4
4
|
import { DomHandler, ObjectUtils, UniqueComponentId, mergeProps } from 'primereact/utils';
|
|
5
5
|
import PrimeReact, { PrimeReactContext } from 'primereact/api';
|
|
6
6
|
|
|
7
|
-
function _arrayWithHoles(
|
|
8
|
-
if (Array.isArray(
|
|
7
|
+
function _arrayWithHoles(r) {
|
|
8
|
+
if (Array.isArray(r)) return r;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
function _iterableToArrayLimit(r, l) {
|
|
@@ -36,27 +36,26 @@ function _iterableToArrayLimit(r, l) {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
function _arrayLikeToArray(
|
|
40
|
-
|
|
41
|
-
for (var
|
|
42
|
-
return
|
|
39
|
+
function _arrayLikeToArray(r, a) {
|
|
40
|
+
(null == a || a > r.length) && (a = r.length);
|
|
41
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
42
|
+
return n;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
function _unsupportedIterableToArray(
|
|
46
|
-
if (
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
45
|
+
function _unsupportedIterableToArray(r, a) {
|
|
46
|
+
if (r) {
|
|
47
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
48
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
49
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
50
|
+
}
|
|
52
51
|
}
|
|
53
52
|
|
|
54
53
|
function _nonIterableRest() {
|
|
55
54
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
56
55
|
}
|
|
57
56
|
|
|
58
|
-
function _slicedToArray(
|
|
59
|
-
return _arrayWithHoles(
|
|
57
|
+
function _slicedToArray(r, e) {
|
|
58
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
60
59
|
}
|
|
61
60
|
|
|
62
61
|
var usePrevious = function usePrevious(newValue) {
|
|
@@ -306,20 +305,20 @@ var useFavicon = function useFavicon() {
|
|
|
306
305
|
}, [newIcon, rel]);
|
|
307
306
|
};
|
|
308
307
|
|
|
309
|
-
function _arrayWithoutHoles(
|
|
310
|
-
if (Array.isArray(
|
|
308
|
+
function _arrayWithoutHoles(r) {
|
|
309
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
311
310
|
}
|
|
312
311
|
|
|
313
|
-
function _iterableToArray(
|
|
314
|
-
if (typeof Symbol
|
|
312
|
+
function _iterableToArray(r) {
|
|
313
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
315
314
|
}
|
|
316
315
|
|
|
317
316
|
function _nonIterableSpread() {
|
|
318
317
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
319
318
|
}
|
|
320
319
|
|
|
321
|
-
function _toConsumableArray(
|
|
322
|
-
return _arrayWithoutHoles(
|
|
320
|
+
function _toConsumableArray(r) {
|
|
321
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
323
322
|
}
|
|
324
323
|
|
|
325
324
|
/**
|
|
@@ -548,35 +547,29 @@ function _typeof(o) {
|
|
|
548
547
|
}, _typeof(o);
|
|
549
548
|
}
|
|
550
549
|
|
|
551
|
-
function
|
|
552
|
-
if (
|
|
553
|
-
var
|
|
554
|
-
if (
|
|
555
|
-
var
|
|
556
|
-
if (
|
|
550
|
+
function toPrimitive(t, r) {
|
|
551
|
+
if ("object" != _typeof(t) || !t) return t;
|
|
552
|
+
var e = t[Symbol.toPrimitive];
|
|
553
|
+
if (void 0 !== e) {
|
|
554
|
+
var i = e.call(t, r || "default");
|
|
555
|
+
if ("object" != _typeof(i)) return i;
|
|
557
556
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
558
557
|
}
|
|
559
|
-
return (
|
|
558
|
+
return ("string" === r ? String : Number)(t);
|
|
560
559
|
}
|
|
561
560
|
|
|
562
|
-
function
|
|
563
|
-
var
|
|
564
|
-
return _typeof(
|
|
561
|
+
function toPropertyKey(t) {
|
|
562
|
+
var i = toPrimitive(t, "string");
|
|
563
|
+
return "symbol" == _typeof(i) ? i : i + "";
|
|
565
564
|
}
|
|
566
565
|
|
|
567
|
-
function _defineProperty(
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
writable: true
|
|
575
|
-
});
|
|
576
|
-
} else {
|
|
577
|
-
obj[key] = value;
|
|
578
|
-
}
|
|
579
|
-
return obj;
|
|
566
|
+
function _defineProperty(e, r, t) {
|
|
567
|
+
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
568
|
+
value: t,
|
|
569
|
+
enumerable: !0,
|
|
570
|
+
configurable: !0,
|
|
571
|
+
writable: !0
|
|
572
|
+
}) : e[r] = t, e;
|
|
580
573
|
}
|
|
581
574
|
|
|
582
575
|
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; }
|
|
@@ -861,7 +854,14 @@ var useOverlayScrollListener = function useOverlayScrollListener(_ref) {
|
|
|
861
854
|
}
|
|
862
855
|
if (!listenerRef.current && targetRef.current) {
|
|
863
856
|
var hideOnScroll = context ? context.hideOverlaysOnDocumentScrolling : PrimeReact.hideOverlaysOnDocumentScrolling;
|
|
864
|
-
var nodes = scrollableParentsRef.current = DomHandler.getScrollableParents(targetRef.current
|
|
857
|
+
var nodes = scrollableParentsRef.current = DomHandler.getScrollableParents(targetRef.current);
|
|
858
|
+
|
|
859
|
+
// Ensure window/body is always included as fallback
|
|
860
|
+
if (!nodes.some(function (node) {
|
|
861
|
+
return node === document.body || node === window;
|
|
862
|
+
})) {
|
|
863
|
+
nodes.push(hideOnScroll ? window : document.body);
|
|
864
|
+
}
|
|
865
865
|
listenerRef.current = function (event) {
|
|
866
866
|
return listener && listener(event);
|
|
867
867
|
};
|
|
@@ -953,19 +953,20 @@ var useOverlayListener = function useOverlayListener(_ref) {
|
|
|
953
953
|
type: 'outside',
|
|
954
954
|
valid: event.which !== 3 && isOutsideClicked(event)
|
|
955
955
|
});
|
|
956
|
-
}
|
|
956
|
+
},
|
|
957
|
+
when: when
|
|
957
958
|
}),
|
|
958
959
|
_useEventListener2 = _slicedToArray(_useEventListener, 2),
|
|
959
960
|
bindDocumentClickListener = _useEventListener2[0],
|
|
960
961
|
unbindDocumentClickListener = _useEventListener2[1];
|
|
961
962
|
var _useResizeListener = useResizeListener({
|
|
962
|
-
target: 'window',
|
|
963
963
|
listener: function listener(event) {
|
|
964
964
|
_listener && _listener(event, {
|
|
965
965
|
type: 'resize',
|
|
966
966
|
valid: !DomHandler.isTouchDevice()
|
|
967
967
|
});
|
|
968
|
-
}
|
|
968
|
+
},
|
|
969
|
+
when: when
|
|
969
970
|
}),
|
|
970
971
|
_useResizeListener2 = _slicedToArray(_useResizeListener, 2),
|
|
971
972
|
bindWindowResizeListener = _useResizeListener2[0],
|
|
@@ -978,7 +979,8 @@ var useOverlayListener = function useOverlayListener(_ref) {
|
|
|
978
979
|
type: 'orientationchange',
|
|
979
980
|
valid: true
|
|
980
981
|
});
|
|
981
|
-
}
|
|
982
|
+
},
|
|
983
|
+
when: when
|
|
982
984
|
}),
|
|
983
985
|
_useEventListener4 = _slicedToArray(_useEventListener3, 2),
|
|
984
986
|
bindWindowOrientationChangeListener = _useEventListener4[0],
|
|
@@ -990,7 +992,8 @@ var useOverlayListener = function useOverlayListener(_ref) {
|
|
|
990
992
|
type: 'scroll',
|
|
991
993
|
valid: true
|
|
992
994
|
});
|
|
993
|
-
}
|
|
995
|
+
},
|
|
996
|
+
when: when
|
|
994
997
|
}),
|
|
995
998
|
_useOverlayScrollList2 = _slicedToArray(_useOverlayScrollList, 2),
|
|
996
999
|
bindOverlayScrollListener = _useOverlayScrollList2[0],
|
package/hooks/hooks.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{useEffect as t,useContext as n,useState as r,useRef as u}from"react";import{DomHandler as o,ObjectUtils as c,UniqueComponentId as i,mergeProps as a}from"primereact/utils";import l,{PrimeReactContext as f}from"primereact/api";function s(e){if(Array.isArray(e))return e}function d(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 v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t){if(e){if("string"==typeof e)return v(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)?v(e,t):void 0}}function p(){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 m(e,t){return s(e)||d(e,t)||y(e,t)||p()}var g=function(t){var n=e.useRef(null);return e.useEffect((function(){return n.current=t,function(){n.current=null}}),[t]),n.current},h=function(t){return e.useEffect((function(){return t}),[])},w=function(t){var n=t.target,r=void 0===n?"document":n,u=t.type,i=t.listener,a=t.options,l=t.when,f=void 0===l||l,s=e.useRef(null),d=e.useRef(null),v=g(i),y=g(a),p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.target;c.isNotEmpty(t)&&(m(),(e.when||f)&&(s.current=o.getTargetElement(t))),!d.current&&s.current&&(d.current=function(e){return i&&i(e)},s.current.addEventListener(u,d.current,a))},m=function(){d.current&&(s.current.removeEventListener(u,d.current,a),d.current=null)},w=function(){m(),v=null,y=null},b=e.useCallback((function(){f?s.current=o.getTargetElement(r):(m(),s.current=null)}),[r,f]);return e.useEffect((function(){b()}),[b]),e.useEffect((function(){var e="".concat(v)!=="".concat(i),t=d.current;t&&(e||y!==a)?(m(),f&&p()):t||w()}),[i,a,f]),h((function(){w()})),[p,m]},b=function(t,n){var r=function(e){t.current&&!t.current.contains(e.target)&&n(e)},u=m(w({type:"mousedown",listener:r}),2),o=u[0],c=u[1],i=m(w({type:"touchstart",listener:r}),2),a=i[0],l=i[1];return e.useEffect((function(){if(t.current)return o(),a(),function(){c(),l()}})),[t,n]},E=function(){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{step:1},n=m(e.useState(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0),2),r=n[0],u=n[1];return{count:r,increment:function(){t.max&&r>=t.max||u(r+t.step)},decrement:function(){if(t.min||0===t.min&&r<=t.min)return null;u(r-t.step)},reset:function(){u(0)}}},O=function(t,n){var r=m(e.useState(t),2),u=r[0],o=r[1],c=m(e.useState(t),2),i=c[0],a=c[1],l=e.useRef(!1),f=e.useRef(null),s=function(){return window.clearTimeout(f.current)};return K((function(){l.current=!0})),h((function(){s()})),e.useEffect((function(){l.current&&(s(),f.current=window.setTimeout((function(){a(u)}),n))}),[u,n]),[u,i,o]},S={},j=function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=m(e.useState((function(){return i()})),1)[0],u=m(e.useState(0),2),o=u[0],a=u[1];return e.useEffect((function(){if(n){S[t]||(S[t]=[]);var e=S[t].push(r);return a(e),function(){delete S[t][e-1];var n=S[t].length-1,r=c.findLastIndex(S[t],(function(e){return void 0!==e}));r!==n&&S[t].splice(r+1),a(void 0)}}}),[t,r,n]),o},x={ico:"image/x-icon",png:"image/png",svg:"image/svg+xml",gif:"image/gif"},L=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"shortcut icon";e.useLayoutEffect((function(){if(t){document.querySelectorAll("link[rel*='icon']").forEach((function(e){document.head.removeChild(e)}));var e=document.createElement("link");e.setAttribute("type",x[t.split(".").pop()]),e.setAttribute("rel",n),e.setAttribute("href",t),document.head.appendChild(e)}}),[t,n])};function D(e){if(Array.isArray(e))return v(e)}function R(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function P(){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 A(e){return D(e)||R(e)||y(e)||P()}var T={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,TOOLTIP:1200},I={escKeyListeners:new Map,onGlobalKeyDown:function(e){if("Escape"===e.code){var t=I.escKeyListeners,n=Math.max.apply(Math,A(t.keys())),r=t.get(n),u=Math.max.apply(Math,A(r.keys()));r.get(u)(e)}},refreshGlobalKeyDownListener:function(){var e=o.getTargetElement("document");this.escKeyListeners.size>0?e.addEventListener("keydown",this.onGlobalKeyDown):e.removeEventListener("keydown",this.onGlobalKeyDown)},addListener:function(e,t){var n=this,r=m(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()}}},C=function(e){var n=e.callback,r=e.when,u=e.priority;t((function(){if(r)return I.addListener(n,u)}),[n,r,u])},k=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=m(e.useState(!1),2),u=r[0],o=r[1];return e.useEffect((function(){if(t.current){var e=new IntersectionObserver((function(e){var t=m(e,1);o(t[0].isIntersecting)}),n);return e.observe(t.current),function(){e.disconnect()}}}),[n,t]),u},M=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],u=e.useRef(null),o=e.useRef(null),c=e.useCallback((function(){return clearInterval(u.current)}),[u.current]);return e.useEffect((function(){o.current=t})),e.useEffect((function(){if(r)return u.current=setInterval((function(){o.current()}),n),c;c()}),[n,r]),h((function(){c()})),[c]},N=function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=m(e.useState(!1),2),u=r[0],o=r[1],c=e.useRef(null),i=function(e){return o(e.matches)},a=function(){return c.current&&c.current.removeEventListener("change",i)&&(c.current=null)};return e.useEffect((function(){return n&&(c.current=window.matchMedia(t),o(c.current.matches),c.current&&c.current.addEventListener("change",i)),a}),[t,n]),u},Y=function(){var e=n(f);return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return a(n,null==e?void 0:e.ptOptions)}},K=function(t){var n=e.useRef(!1);return e.useEffect((function(){if(!n.current)return n.current=!0,t&&t()}),[])};function X(e){return X="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},X(e)}function G(e,t){if("object"!==X(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==X(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function z(e){var t=G(e,"string");return"symbol"===X(t)?t:String(t)}function _(e,t,n){return(t=z(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B(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 U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var V=function(){var t=m(e.useState({x:0,y:0}),2),n=t[0],r=t[1],u=e.useRef(null),o=e.useCallback((function(e){var t,n;if(u.current){var o=e.currentTarget.getBoundingClientRect();t=e.pageX-o.left-(window.pageXOffset||window.scrollX),n=e.pageY-o.top-(window.pageYOffset||window.scrollY)}else t=e.clientX,n=e.clientY;r({x:Math.max(0,Math.round(t)),y:Math.max(0,Math.round(n))})}),[]),c=m(w({target:u,type:"mousemove",listener:o}),2),i=c[0],a=c[1],l=m(w({type:"mousemove",listener:o}),2),f=l[0],s=l[1];return e.useEffect((function(){return i(),u.current||f(),function(){a(),u.current||s()}}),[f,i,s,a]),U(U({ref:u},n),{},{reset:function(){return r({x:0,y:0})}})};function J(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 q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach((function(t){_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function F(t){var n=t.mode,r=void 0===n?"both":n,u=t.initialValue,o=void 0===u?{x:0,y:0}:u,c=m(e.useState(o),2),i=c[0],a=c[1],l=m(e.useState(!1),2),f=l[0],s=l[1],d=e.useRef(!1),v=e.useRef(!1),y=e.useRef(null),p=function(e){return B({x:e.clientX,y:e.clientY})},g=function(e){var t=e.clampedX,n=e.clampedY;"vertical"===r?a({y:1-n}):"horizontal"===r?a({x:t}):"both"===r&&a({x:t,y:n})},h=function(){v.current&&d.current&&(v.current=!1,s(!1),z())},b=function(e){e.cancelable&&e.preventDefault(),B({x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY})},E=m(w({type:"mousemove",listener:p}),2),O=E[0],S=E[1],j=m(w({type:"mouseup",listener:h}),2),x=j[0],L=j[1],D=m(w({type:"touchmove",listener:b}),2),R=D[0],P=D[1],A=m(w({type:"touchend",listener:h}),2),T=A[0],I=A[1],C=m(w({target:y,type:"mousedown",listener:function(e){_(),e.preventDefault(),p(e)}}),2),k=C[0],M=C[1],N=m(w({target:y,type:"touchstart",listener:function(e){e.cancelable&&e.preventDefault(),_(),b(e)},options:{passive:!1}}),2),Y=N[0],K=N[1],X=function(e,t,n){return Math.min(Math.max(e,t),n)},G=function(e){var t=e.y;return{clampedX:X(e.x,0,1),clampedY:X(t,0,1)}},z=function(){S(),L(),P(),I()};e.useEffect((function(){d.current=!0}),[]);var _=function(){!v.current&&d.current&&(v.current=!0,s(!0),O(),x(),R(),T())},B=function(e){var t=e.x,n=e.y;if(v.current){var r=y.current.getBoundingClientRect(),u=G({x:(t-r.left)/r.width,y:(n-r.top)/r.height});g({clampedX:u.clampedX,clampedY:u.clampedY})}};return e.useEffect((function(){return y.current&&(k(),Y()),function(){y.current&&(M(),K())}}),[k,Y,i,M,K]),q(q({ref:y},i),{},{active:f,reset:function(){a(o)}})}var W=function(t){var n=t.target,r=t.listener,u=t.options,i=t.when,a=void 0===i||i,s=e.useContext(f),d=e.useRef(null),v=e.useRef(null),y=e.useRef([]),p=g(r),m=g(u),w=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(c.isNotEmpty(e.target)&&(b(),(e.when||a)&&(d.current=o.getTargetElement(e.target))),!v.current&&d.current){var t=y.current=o.getScrollableParents(d.current,s?s.hideOverlaysOnDocumentScrolling:l.hideOverlaysOnDocumentScrolling);v.current=function(e){return r&&r(e)},t.forEach((function(e){return e.addEventListener("scroll",v.current,u)}))}},b=function(){v.current&&(y.current.forEach((function(e){return e.removeEventListener("scroll",v.current,u)})),v.current=null)},E=function(){b(),y.current=null,p=null,m=null},O=e.useCallback((function(){a?d.current=o.getTargetElement(n):(b(),d.current=null)}),[n,a]);return e.useEffect((function(){O()}),[O]),e.useEffect((function(){var e="".concat(p)!=="".concat(r),t=v.current;t&&(e||m!==u)?(b(),a&&w()):t||E()}),[r,u,a]),h((function(){E()})),[w,b]},$=function(e){var t=e.when;return w({target:"window",type:"resize",listener:e.listener,when:void 0===t||t})},H=function(t){var n=t.target,r=t.overlay,u=t.listener,c=t.when,i=void 0===c||c,a=t.type,l=void 0===a?"click":a,f=e.useRef(null),s=e.useRef(null),d=m(w({target:"window",type:l,listener:function(e){u&&u(e,{type:"outside",valid:3!==e.which&&D(e)})}}),2),v=d[0],y=d[1],p=m($({target:"window",listener:function(e){u&&u(e,{type:"resize",valid:!o.isTouchDevice()})}}),2),g=p[0],b=p[1],E=m(w({target:"window",type:"orientationchange",listener:function(e){u&&u(e,{type:"orientationchange",valid:!0})}}),2),O=E[0],S=E[1],j=m(W({target:n,listener:function(e){u&&u(e,{type:"scroll",valid:!0})}}),2),x=j[0],L=j[1],D=function(e){return f.current&&!(f.current.isSameNode(e.target)||f.current.contains(e.target)||s.current&&s.current.contains(e.target))},R=function(){y(),b(),S(),L()};return e.useEffect((function(){i?(f.current=o.getTargetElement(n),s.current=o.getTargetElement(r)):(R(),f.current=s.current=null)}),[n,r,i]),h((function(){R()})),[function(){v(),g(),O(),x()},R]},Q=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"local",u="undefined"!=typeof window,o=m(w({target:"window",type:"storage",listener:function(e){var t="local"===r?window.localStorage:window.sessionStorage;if(e.storageArea===t&&e.key===n){var u=e.newValue?JSON.parse(e.newValue):void 0;f(u)}}}),2),c=o[0],i=o[1],a=m(e.useState(t),2),l=a[0],f=a[1];return e.useEffect((function(){u||f(t);try{var e="local"===r?window.localStorage.getItem(n):window.sessionStorage.getItem(n);f(e?JSON.parse(e):t)}catch(e){f(t)}return c(),function(){return i()}}),[]),[l,function(e){try{var t=e instanceof Function?e(l):e;if(f(t),u){var o=JSON.stringify(t);"local"===r?window.localStorage.setItem(n,o):window.sessionStorage.setItem(n,o)}}catch(e){throw new Error("PrimeReact useStorage: Failed to serialize the value at key: ".concat(n))}}]},Z=function(e,t){return Q(e,t,"local")},ee=function(e,t){return Q(e,t,"session")},te=0,ne=function(e){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=m(r(!1),2),a=i[0],s=i[1],d=u(null),v=n(f),y=o.isClient()?window.document:void 0,p=c.document,g=void 0===p?y:p,h=c.manual,w=void 0!==h&&h,b=c.name,E=void 0===b?"style_".concat(++te):b,O=c.id,S=void 0===O?void 0:O,j=c.media,x=void 0===j?void 0:j,L=function(e){var t=e.querySelector('style[data-primereact-style-id="'.concat(E,'"]'));if(t)return t;if(void 0!==S){var n=g.getElementById(S);if(n)return n}return g.createElement("style")},D=function(){if(g&&!a){var t=(null==v?void 0:v.styleContainer)||g.head;d.current=L(t),d.current.isConnected||(d.current.type="text/css",S&&(d.current.id=S),x&&(d.current.media=x),o.addNonce(d.current,v&&v.nonce||l.nonce),t.appendChild(d.current),E&&d.current.setAttribute("data-primereact-style-id",E)),d.current.textContent=e,s(!0)}};return t((function(){w||D()}),[w]),{id:S,name:E,update:function(t){a&&e!==t&&(d.current.textContent=t)},unload:function(){g&&d.current&&(o.removeInlineStyle(d.current),s(!1))},load:D,isLoaded:a}},re=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],u=e.useRef(null),o=e.useRef(null),c=e.useCallback((function(){return clearTimeout(u.current)}),[u.current]);return e.useEffect((function(){o.current=t})),e.useEffect((function(){if(r)return u.current=setTimeout((function(){o.current()}),n),c;c()}),[n,r]),h((function(){c()})),[c]},ue=function(t,n){var r=e.useRef(!1);return e.useEffect((function(){if(r.current)return t&&t();r.current=!0}),n)};export{T as ESC_KEY_HANDLING_PRIORITIES,b as useClickOutside,E as useCounter,O as useDebounce,j as useDisplayOrder,w as useEventListener,L as useFavicon,C as useGlobalOnEscapeKey,k as useIntersectionObserver,M as useInterval,Z as useLocalStorage,N as useMatchMedia,Y as useMergeProps,K as useMountEffect,V as useMouse,F as useMove,H as useOverlayListener,W as useOverlayScrollListener,g as usePrevious,$ as useResizeListener,ee as useSessionStorage,Q as useStorage,ne as useStyle,re as useTimeout,h as useUnmountEffect,ue as useUpdateEffect};
|
|
1
|
+
import*as e from"react";import{useEffect as t,useContext as n,useState as r,useRef as u}from"react";import{DomHandler as o,ObjectUtils as c,UniqueComponentId as i,mergeProps as a}from"primereact/utils";import l,{PrimeReactContext as f}from"primereact/api";function s(e){if(Array.isArray(e))return e}function d(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 v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t){if(e){if("string"==typeof e)return v(e,t);var n={}.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)?v(e,t):void 0}}function p(){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 m(e,t){return s(e)||d(e,t)||y(e,t)||p()}var g=function(t){var n=e.useRef(null);return e.useEffect((function(){return n.current=t,function(){n.current=null}}),[t]),n.current},h=function(t){return e.useEffect((function(){return t}),[])},w=function(t){var n=t.target,r=void 0===n?"document":n,u=t.type,i=t.listener,a=t.options,l=t.when,f=void 0===l||l,s=e.useRef(null),d=e.useRef(null),v=g(i),y=g(a),p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.target;c.isNotEmpty(t)&&(m(),(e.when||f)&&(s.current=o.getTargetElement(t))),!d.current&&s.current&&(d.current=function(e){return i&&i(e)},s.current.addEventListener(u,d.current,a))},m=function(){d.current&&(s.current.removeEventListener(u,d.current,a),d.current=null)},w=function(){m(),v=null,y=null},b=e.useCallback((function(){f?s.current=o.getTargetElement(r):(m(),s.current=null)}),[r,f]);return e.useEffect((function(){b()}),[b]),e.useEffect((function(){var e="".concat(v)!=="".concat(i),t=d.current;t&&(e||y!==a)?(m(),f&&p()):t||w()}),[i,a,f]),h((function(){w()})),[p,m]},b=function(t,n){var r=function(e){t.current&&!t.current.contains(e.target)&&n(e)},u=m(w({type:"mousedown",listener:r}),2),o=u[0],c=u[1],i=m(w({type:"touchstart",listener:r}),2),a=i[0],l=i[1];return e.useEffect((function(){if(t.current)return o(),a(),function(){c(),l()}})),[t,n]},E=function(){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{step:1},n=m(e.useState(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0),2),r=n[0],u=n[1];return{count:r,increment:function(){t.max&&r>=t.max||u(r+t.step)},decrement:function(){if(t.min||0===t.min&&r<=t.min)return null;u(r-t.step)},reset:function(){u(0)}}},O=function(t,n){var r=m(e.useState(t),2),u=r[0],o=r[1],c=m(e.useState(t),2),i=c[0],a=c[1],l=e.useRef(!1),f=e.useRef(null),s=function(){return window.clearTimeout(f.current)};return K((function(){l.current=!0})),h((function(){s()})),e.useEffect((function(){l.current&&(s(),f.current=window.setTimeout((function(){a(u)}),n))}),[u,n]),[u,i,o]},S={},j=function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=m(e.useState((function(){return i()})),1)[0],u=m(e.useState(0),2),o=u[0],a=u[1];return e.useEffect((function(){if(n){S[t]||(S[t]=[]);var e=S[t].push(r);return a(e),function(){delete S[t][e-1];var n=S[t].length-1,r=c.findLastIndex(S[t],(function(e){return void 0!==e}));r!==n&&S[t].splice(r+1),a(void 0)}}}),[t,r,n]),o},x={ico:"image/x-icon",png:"image/png",svg:"image/svg+xml",gif:"image/gif"},L=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"shortcut icon";e.useLayoutEffect((function(){if(t){document.querySelectorAll("link[rel*='icon']").forEach((function(e){document.head.removeChild(e)}));var e=document.createElement("link");e.setAttribute("type",x[t.split(".").pop()]),e.setAttribute("rel",n),e.setAttribute("href",t),document.head.appendChild(e)}}),[t,n])};function D(e){if(Array.isArray(e))return v(e)}function R(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function P(){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 A(e){return D(e)||R(e)||y(e)||P()}var T={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,TOOLTIP:1200},I={escKeyListeners:new Map,onGlobalKeyDown:function(e){if("Escape"===e.code){var t=I.escKeyListeners,n=Math.max.apply(Math,A(t.keys())),r=t.get(n),u=Math.max.apply(Math,A(r.keys()));r.get(u)(e)}},refreshGlobalKeyDownListener:function(){var e=o.getTargetElement("document");this.escKeyListeners.size>0?e.addEventListener("keydown",this.onGlobalKeyDown):e.removeEventListener("keydown",this.onGlobalKeyDown)},addListener:function(e,t){var n=this,r=m(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()}}},C=function(e){var n=e.callback,r=e.when,u=e.priority;t((function(){if(r)return I.addListener(n,u)}),[n,r,u])},k=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=m(e.useState(!1),2),u=r[0],o=r[1];return e.useEffect((function(){if(t.current){var e=new IntersectionObserver((function(e){var t=m(e,1);o(t[0].isIntersecting)}),n);return e.observe(t.current),function(){e.disconnect()}}}),[n,t]),u},M=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],u=e.useRef(null),o=e.useRef(null),c=e.useCallback((function(){return clearInterval(u.current)}),[u.current]);return e.useEffect((function(){o.current=t})),e.useEffect((function(){if(r)return u.current=setInterval((function(){o.current()}),n),c;c()}),[n,r]),h((function(){c()})),[c]},N=function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=m(e.useState(!1),2),u=r[0],o=r[1],c=e.useRef(null),i=function(e){return o(e.matches)},a=function(){return c.current&&c.current.removeEventListener("change",i)&&(c.current=null)};return e.useEffect((function(){return n&&(c.current=window.matchMedia(t),o(c.current.matches),c.current&&c.current.addEventListener("change",i)),a}),[t,n]),u},Y=function(){var e=n(f);return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return a(n,null==e?void 0:e.ptOptions)}},K=function(t){var n=e.useRef(!1);return e.useEffect((function(){if(!n.current)return n.current=!0,t&&t()}),[])};function X(e){return X="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},X(e)}function G(e,t){if("object"!=X(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=X(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function z(e){var t=G(e,"string");return"symbol"==X(t)?t:t+""}function _(e,t,n){return(t=z(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B(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 U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var V=function(){var t=m(e.useState({x:0,y:0}),2),n=t[0],r=t[1],u=e.useRef(null),o=e.useCallback((function(e){var t,n;if(u.current){var o=e.currentTarget.getBoundingClientRect();t=e.pageX-o.left-(window.pageXOffset||window.scrollX),n=e.pageY-o.top-(window.pageYOffset||window.scrollY)}else t=e.clientX,n=e.clientY;r({x:Math.max(0,Math.round(t)),y:Math.max(0,Math.round(n))})}),[]),c=m(w({target:u,type:"mousemove",listener:o}),2),i=c[0],a=c[1],l=m(w({type:"mousemove",listener:o}),2),f=l[0],s=l[1];return e.useEffect((function(){return i(),u.current||f(),function(){a(),u.current||s()}}),[f,i,s,a]),U(U({ref:u},n),{},{reset:function(){return r({x:0,y:0})}})};function J(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 q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach((function(t){_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function F(t){var n=t.mode,r=void 0===n?"both":n,u=t.initialValue,o=void 0===u?{x:0,y:0}:u,c=m(e.useState(o),2),i=c[0],a=c[1],l=m(e.useState(!1),2),f=l[0],s=l[1],d=e.useRef(!1),v=e.useRef(!1),y=e.useRef(null),p=function(e){return B({x:e.clientX,y:e.clientY})},g=function(e){var t=e.clampedX,n=e.clampedY;"vertical"===r?a({y:1-n}):"horizontal"===r?a({x:t}):"both"===r&&a({x:t,y:n})},h=function(){v.current&&d.current&&(v.current=!1,s(!1),z())},b=function(e){e.cancelable&&e.preventDefault(),B({x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY})},E=m(w({type:"mousemove",listener:p}),2),O=E[0],S=E[1],j=m(w({type:"mouseup",listener:h}),2),x=j[0],L=j[1],D=m(w({type:"touchmove",listener:b}),2),R=D[0],P=D[1],A=m(w({type:"touchend",listener:h}),2),T=A[0],I=A[1],C=m(w({target:y,type:"mousedown",listener:function(e){_(),e.preventDefault(),p(e)}}),2),k=C[0],M=C[1],N=m(w({target:y,type:"touchstart",listener:function(e){e.cancelable&&e.preventDefault(),_(),b(e)},options:{passive:!1}}),2),Y=N[0],K=N[1],X=function(e,t,n){return Math.min(Math.max(e,t),n)},G=function(e){var t=e.y;return{clampedX:X(e.x,0,1),clampedY:X(t,0,1)}},z=function(){S(),L(),P(),I()};e.useEffect((function(){d.current=!0}),[]);var _=function(){!v.current&&d.current&&(v.current=!0,s(!0),O(),x(),R(),T())},B=function(e){var t=e.x,n=e.y;if(v.current){var r=y.current.getBoundingClientRect(),u=G({x:(t-r.left)/r.width,y:(n-r.top)/r.height});g({clampedX:u.clampedX,clampedY:u.clampedY})}};return e.useEffect((function(){return y.current&&(k(),Y()),function(){y.current&&(M(),K())}}),[k,Y,i,M,K]),q(q({ref:y},i),{},{active:f,reset:function(){a(o)}})}var W=function(t){var n=t.target,r=t.listener,u=t.options,i=t.when,a=void 0===i||i,s=e.useContext(f),d=e.useRef(null),v=e.useRef(null),y=e.useRef([]),p=g(r),m=g(u),w=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(c.isNotEmpty(e.target)&&(b(),(e.when||a)&&(d.current=o.getTargetElement(e.target))),!v.current&&d.current){var t=s?s.hideOverlaysOnDocumentScrolling:l.hideOverlaysOnDocumentScrolling,n=y.current=o.getScrollableParents(d.current);n.some((function(e){return e===document.body||e===window}))||n.push(t?window:document.body),v.current=function(e){return r&&r(e)},n.forEach((function(e){return e.addEventListener("scroll",v.current,u)}))}},b=function(){v.current&&(y.current.forEach((function(e){return e.removeEventListener("scroll",v.current,u)})),v.current=null)},E=function(){b(),y.current=null,p=null,m=null},O=e.useCallback((function(){a?d.current=o.getTargetElement(n):(b(),d.current=null)}),[n,a]);return e.useEffect((function(){O()}),[O]),e.useEffect((function(){var e="".concat(p)!=="".concat(r),t=v.current;t&&(e||m!==u)?(b(),a&&w()):t||E()}),[r,u,a]),h((function(){E()})),[w,b]},$=function(e){var t=e.when;return w({target:"window",type:"resize",listener:e.listener,when:void 0===t||t})},H=function(t){var n=t.target,r=t.overlay,u=t.listener,c=t.when,i=void 0===c||c,a=t.type,l=void 0===a?"click":a,f=e.useRef(null),s=e.useRef(null),d=m(w({target:"window",type:l,listener:function(e){u&&u(e,{type:"outside",valid:3!==e.which&&D(e)})},when:i}),2),v=d[0],y=d[1],p=m($({listener:function(e){u&&u(e,{type:"resize",valid:!o.isTouchDevice()})},when:i}),2),g=p[0],b=p[1],E=m(w({target:"window",type:"orientationchange",listener:function(e){u&&u(e,{type:"orientationchange",valid:!0})},when:i}),2),O=E[0],S=E[1],j=m(W({target:n,listener:function(e){u&&u(e,{type:"scroll",valid:!0})},when:i}),2),x=j[0],L=j[1],D=function(e){return f.current&&!(f.current.isSameNode(e.target)||f.current.contains(e.target)||s.current&&s.current.contains(e.target))},R=function(){y(),b(),S(),L()};return e.useEffect((function(){i?(f.current=o.getTargetElement(n),s.current=o.getTargetElement(r)):(R(),f.current=s.current=null)}),[n,r,i]),h((function(){R()})),[function(){v(),g(),O(),x()},R]},Q=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"local",u="undefined"!=typeof window,o=m(w({target:"window",type:"storage",listener:function(e){var t="local"===r?window.localStorage:window.sessionStorage;if(e.storageArea===t&&e.key===n){var u=e.newValue?JSON.parse(e.newValue):void 0;f(u)}}}),2),c=o[0],i=o[1],a=m(e.useState(t),2),l=a[0],f=a[1];return e.useEffect((function(){u||f(t);try{var e="local"===r?window.localStorage.getItem(n):window.sessionStorage.getItem(n);f(e?JSON.parse(e):t)}catch(e){f(t)}return c(),function(){return i()}}),[]),[l,function(e){try{var t=e instanceof Function?e(l):e;if(f(t),u){var o=JSON.stringify(t);"local"===r?window.localStorage.setItem(n,o):window.sessionStorage.setItem(n,o)}}catch(e){throw new Error("PrimeReact useStorage: Failed to serialize the value at key: ".concat(n))}}]},Z=function(e,t){return Q(e,t,"local")},ee=function(e,t){return Q(e,t,"session")},te=0,ne=function(e){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=m(r(!1),2),a=i[0],s=i[1],d=u(null),v=n(f),y=o.isClient()?window.document:void 0,p=c.document,g=void 0===p?y:p,h=c.manual,w=void 0!==h&&h,b=c.name,E=void 0===b?"style_".concat(++te):b,O=c.id,S=void 0===O?void 0:O,j=c.media,x=void 0===j?void 0:j,L=function(e){var t=e.querySelector('style[data-primereact-style-id="'.concat(E,'"]'));if(t)return t;if(void 0!==S){var n=g.getElementById(S);if(n)return n}return g.createElement("style")},D=function(){if(g&&!a){var t=(null==v?void 0:v.styleContainer)||g.head;d.current=L(t),d.current.isConnected||(d.current.type="text/css",S&&(d.current.id=S),x&&(d.current.media=x),o.addNonce(d.current,v&&v.nonce||l.nonce),t.appendChild(d.current),E&&d.current.setAttribute("data-primereact-style-id",E)),d.current.textContent=e,s(!0)}};return t((function(){w||D()}),[w]),{id:S,name:E,update:function(t){a&&e!==t&&(d.current.textContent=t)},unload:function(){g&&d.current&&(o.removeInlineStyle(d.current),s(!1))},load:D,isLoaded:a}},re=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],u=e.useRef(null),o=e.useRef(null),c=e.useCallback((function(){return clearTimeout(u.current)}),[u.current]);return e.useEffect((function(){o.current=t})),e.useEffect((function(){if(r)return u.current=setTimeout((function(){o.current()}),n),c;c()}),[n,r]),h((function(){c()})),[c]},ue=function(t,n){var r=e.useRef(!1);return e.useEffect((function(){if(r.current)return t&&t();r.current=!0}),n)};export{T as ESC_KEY_HANDLING_PRIORITIES,b as useClickOutside,E as useCounter,O as useDebounce,j as useDisplayOrder,w as useEventListener,L as useFavicon,C as useGlobalOnEscapeKey,k as useIntersectionObserver,M as useInterval,Z as useLocalStorage,N as useMatchMedia,Y as useMergeProps,K as useMountEffect,V as useMouse,F as useMove,H as useOverlayListener,W as useOverlayScrollListener,g as usePrevious,$ as useResizeListener,ee as useSessionStorage,Q as useStorage,ne as useStyle,re as useTimeout,h as useUnmountEffect,ue as useUpdateEffect};
|