primereact 7.0.1 → 7.2.1
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/LICENSE.md +1 -1
- package/README.md +1 -1
- package/accordion/accordion.cjs.js +27 -21
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +5 -2
- package/accordion/accordion.esm.js +27 -21
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +27 -21
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +29 -6
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +31 -30
- package/api/api.esm.js +29 -6
- package/api/api.esm.min.js +1 -1
- package/api/api.js +29 -6
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +22 -22
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +9 -4
- package/autocomplete/autocomplete.esm.js +22 -22
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +22 -22
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +11 -11
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.d.ts +1 -1
- package/avatar/avatar.esm.js +11 -11
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +11 -11
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.cjs.js +11 -11
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.esm.js +11 -11
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +11 -11
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/badge.cjs.js +11 -11
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +11 -11
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +11 -11
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +23 -16
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +23 -16
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +23 -16
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +11 -11
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +11 -11
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +11 -11
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +13 -13
- package/button/button.cjs.min.js +1 -1
- package/button/button.d.ts +1 -1
- package/button/button.esm.js +13 -13
- package/button/button.esm.min.js +1 -1
- package/button/button.js +13 -13
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +39 -20
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +3 -2
- package/calendar/calendar.esm.js +39 -20
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +39 -20
- package/calendar/calendar.min.js +1 -1
- package/captcha/captcha.cjs.js +11 -11
- package/captcha/captcha.cjs.min.js +1 -1
- package/captcha/captcha.esm.js +11 -11
- package/captcha/captcha.esm.min.js +1 -1
- package/captcha/captcha.js +11 -11
- package/captcha/captcha.min.js +1 -1
- package/card/card.cjs.js +11 -11
- package/card/card.cjs.min.js +1 -1
- package/card/card.esm.js +11 -11
- package/card/card.esm.min.js +1 -1
- package/card/card.js +11 -11
- package/card/card.min.js +1 -1
- package/carousel/carousel.cjs.js +235 -27
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +234 -27
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +236 -29
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +15 -15
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +2 -1
- package/cascadeselect/cascadeselect.esm.js +15 -15
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +15 -15
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +13 -13
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +13 -13
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +13 -13
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +13 -13
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +1 -1
- package/checkbox/checkbox.esm.js +13 -13
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +13 -13
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +11 -11
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +1 -1
- package/chip/chip.esm.js +11 -11
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +11 -11
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +13 -13
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +13 -13
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +13 -13
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +16 -16
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +19 -5
- package/colorpicker/colorpicker.esm.js +16 -16
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +16 -16
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.cjs.js +31 -12
- package/column/column.cjs.min.js +1 -1
- package/column/column.d.ts +5 -1
- package/column/column.esm.js +31 -12
- package/column/column.esm.min.js +1 -1
- package/column/column.js +31 -12
- package/column/column.min.js +1 -1
- package/columngroup/columngroup.cjs.js +28 -12
- package/columngroup/columngroup.cjs.min.js +1 -1
- package/columngroup/columngroup.esm.js +28 -12
- package/columngroup/columngroup.esm.min.js +1 -1
- package/columngroup/columngroup.js +28 -12
- package/columngroup/columngroup.min.js +1 -1
- package/confirmdialog/confirmdialog.cjs.js +13 -13
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +1 -1
- package/confirmdialog/confirmdialog.esm.js +13 -13
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +13 -13
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +16 -16
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.d.ts +3 -2
- package/confirmpopup/confirmpopup.esm.js +16 -16
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +16 -16
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +14 -14
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +2 -1
- package/contextmenu/contextmenu.esm.js +14 -14
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +14 -14
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +521 -323
- package/core/core.min.js +18 -18
- package/csstransition/csstransition.cjs.js +62 -32
- package/csstransition/csstransition.cjs.min.js +1 -1
- package/csstransition/csstransition.d.ts +8 -0
- package/csstransition/csstransition.esm.js +61 -32
- package/csstransition/csstransition.esm.min.js +1 -1
- package/csstransition/csstransition.js +62 -34
- package/csstransition/csstransition.min.js +1 -1
- package/csstransition/package.json +2 -1
- package/datascroller/datascroller.cjs.js +11 -11
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.esm.js +11 -11
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +11 -11
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +518 -346
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +34 -11
- package/datatable/datatable.esm.js +520 -348
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +518 -346
- package/datatable/datatable.min.css +1 -1
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +12 -16
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +12 -16
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +12 -16
- package/dataview/dataview.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +11 -11
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.esm.js +11 -11
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +11 -11
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +20 -22
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +2 -1
- package/dialog/dialog.esm.js +20 -22
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +20 -22
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +11 -11
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +11 -11
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +11 -11
- package/divider/divider.min.js +1 -1
- package/dock/dock.cjs.js +11 -11
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +11 -11
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +11 -11
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +36 -26
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +2 -1
- package/dropdown/dropdown.esm.js +36 -26
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +36 -26
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +21 -17
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.d.ts +1 -0
- package/editor/editor.esm.js +21 -17
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +21 -17
- package/editor/editor.min.js +1 -1
- package/fieldset/fieldset.cjs.js +14 -14
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.d.ts +2 -1
- package/fieldset/fieldset.esm.js +14 -14
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +14 -14
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +16 -13
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +3 -1
- package/fileupload/fileupload.esm.js +16 -13
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +16 -13
- package/fileupload/fileupload.min.js +1 -1
- package/fullcalendar/fullcalendar.cjs.js +11 -11
- package/fullcalendar/fullcalendar.cjs.min.js +1 -1
- package/fullcalendar/fullcalendar.esm.js +11 -11
- package/fullcalendar/fullcalendar.esm.min.js +1 -1
- package/fullcalendar/fullcalendar.js +11 -11
- package/fullcalendar/fullcalendar.min.js +1 -1
- package/galleria/galleria.cjs.js +228 -22
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.d.ts +2 -1
- package/galleria/galleria.esm.js +228 -22
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +229 -23
- package/galleria/galleria.min.js +1 -1
- package/gmap/gmap.cjs.js +12 -12
- package/gmap/gmap.cjs.min.js +1 -1
- package/gmap/gmap.esm.js +12 -12
- package/gmap/gmap.esm.min.js +1 -1
- package/gmap/gmap.js +12 -12
- package/gmap/gmap.min.js +1 -1
- package/image/image.cjs.js +39 -18
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +1 -0
- package/image/image.esm.js +40 -19
- package/image/image.esm.min.js +1 -1
- package/image/image.js +39 -18
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +11 -11
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +11 -11
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +11 -11
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +15 -15
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.d.ts +1 -1
- package/inputmask/inputmask.esm.js +15 -15
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +15 -15
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +47 -35
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +4 -4
- package/inputnumber/inputnumber.esm.js +47 -35
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +47 -35
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +13 -13
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +13 -13
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +13 -13
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +13 -13
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +13 -13
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +13 -13
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +13 -13
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.esm.js +13 -13
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +13 -13
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/keyfilter/keyfilter.cjs.js +4 -1
- package/keyfilter/keyfilter.cjs.min.js +1 -1
- package/keyfilter/keyfilter.esm.js +4 -1
- package/keyfilter/keyfilter.esm.min.js +1 -1
- package/keyfilter/keyfilter.js +4 -1
- package/keyfilter/keyfilter.min.js +1 -1
- package/knob/knob.cjs.js +12 -12
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +12 -12
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +12 -12
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +14 -14
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +14 -14
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +14 -14
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +11 -11
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +11 -11
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +11 -11
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +17 -17
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.d.ts +2 -1
- package/mention/mention.esm.js +17 -17
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +17 -17
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +13 -13
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +2 -1
- package/menu/menu.esm.js +13 -13
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +13 -13
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +11 -11
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +11 -11
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +11 -11
- package/menubar/menubar.min.css +1 -1
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +11 -11
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +11 -11
- package/message/message.esm.min.js +1 -1
- package/message/message.js +11 -11
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +11 -11
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +2 -1
- package/messages/messages.esm.js +11 -11
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +11 -11
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +23 -23
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +3 -2
- package/multiselect/multiselect.esm.js +23 -23
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +23 -23
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +13 -13
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +1 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +13 -13
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +13 -13
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +11 -11
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +11 -11
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +11 -11
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +11 -11
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +11 -11
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +11 -11
- package/organizationchart/organizationchart.min.css +1 -1
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +15 -19
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +2 -1
- package/overlaypanel/overlaypanel.esm.js +15 -19
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +15 -19
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +3 -2
- package/paginator/paginator.cjs.js +13 -13
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +13 -13
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +13 -13
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +17 -16
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.d.ts +5 -3
- package/panel/panel.esm.js +18 -17
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +17 -16
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +13 -13
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +2 -1
- package/panelmenu/panelmenu.esm.js +13 -13
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +13 -13
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/password.cjs.js +15 -15
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +2 -1
- package/password/password.esm.js +15 -15
- package/password/password.esm.min.js +1 -1
- package/password/password.js +15 -15
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +11 -11
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +11 -11
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +11 -11
- package/picklist/picklist.min.js +1 -1
- package/portal/portal.cjs.js +15 -18
- package/portal/portal.cjs.min.js +1 -1
- package/portal/portal.esm.js +15 -18
- package/portal/portal.esm.min.js +1 -1
- package/portal/portal.js +16 -20
- package/portal/portal.min.js +1 -1
- package/primereact.all.cjs.js +1531 -1073
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +1531 -1073
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +1531 -1073
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +11 -11
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +11 -11
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +11 -11
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/progressspinner.cjs.js +11 -11
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +11 -11
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +11 -11
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +13 -13
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +13 -13
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +13 -13
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +13 -13
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +13 -13
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +13 -13
- package/rating/rating.min.js +1 -1
- package/resources/primereact.css +129 -99
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +314 -26
- package/resources/themes/arya-green/theme.css +314 -26
- package/resources/themes/arya-orange/theme.css +314 -26
- package/resources/themes/arya-purple/theme.css +314 -26
- package/resources/themes/bootstrap4-dark-blue/theme.css +291 -10
- package/resources/themes/bootstrap4-dark-purple/theme.css +291 -10
- package/resources/themes/bootstrap4-light-blue/theme.css +288 -7
- package/resources/themes/bootstrap4-light-purple/theme.css +288 -7
- package/resources/themes/fluent-light/theme.css +312 -24
- package/resources/themes/lara-dark-blue/theme.css +665 -412
- package/resources/themes/lara-dark-indigo/theme.css +665 -412
- package/resources/themes/lara-dark-purple/theme.css +665 -412
- package/resources/themes/lara-dark-teal/theme.css +665 -412
- package/resources/themes/lara-light-blue/theme.css +319 -66
- package/resources/themes/lara-light-indigo/theme.css +319 -66
- package/resources/themes/lara-light-purple/theme.css +319 -66
- package/resources/themes/lara-light-teal/theme.css +319 -66
- package/resources/themes/luna-amber/theme.css +305 -24
- package/resources/themes/luna-blue/theme.css +305 -24
- package/resources/themes/luna-green/theme.css +305 -24
- package/resources/themes/luna-pink/theme.css +305 -24
- package/resources/themes/md-dark-deeppurple/theme.css +370 -8
- package/resources/themes/md-dark-indigo/theme.css +370 -8
- package/resources/themes/md-light-deeppurple/theme.css +368 -6
- package/resources/themes/md-light-indigo/theme.css +368 -6
- package/resources/themes/mdc-dark-deeppurple/theme.css +370 -8
- package/resources/themes/mdc-dark-indigo/theme.css +370 -8
- package/resources/themes/mdc-light-deeppurple/theme.css +368 -6
- package/resources/themes/mdc-light-indigo/theme.css +368 -6
- package/resources/themes/nova/theme.css +305 -24
- package/resources/themes/nova-accent/theme.css +305 -24
- package/resources/themes/nova-alt/theme.css +305 -24
- package/resources/themes/rhea/theme.css +305 -24
- package/resources/themes/saga-blue/theme.css +295 -7
- package/resources/themes/saga-green/theme.css +295 -7
- package/resources/themes/saga-orange/theme.css +295 -7
- package/resources/themes/saga-purple/theme.css +295 -7
- package/resources/themes/tailwind-light/theme.css +315 -27
- package/resources/themes/vela-blue/theme.css +314 -26
- package/resources/themes/vela-green/theme.css +314 -26
- package/resources/themes/vela-orange/theme.css +314 -26
- package/resources/themes/vela-purple/theme.css +314 -26
- package/ripple/ripple.cjs.js +11 -11
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +11 -11
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +11 -11
- package/ripple/ripple.min.js +1 -1
- package/row/row.cjs.js +11 -11
- package/row/row.cjs.min.js +1 -1
- package/row/row.esm.js +11 -11
- package/row/row.esm.min.js +1 -1
- package/row/row.js +11 -11
- package/row/row.min.js +1 -1
- package/scrollpanel/scrollpanel.cjs.js +11 -11
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +11 -11
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +11 -11
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +12 -12
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.d.ts +3 -2
- package/scrolltop/scrolltop.esm.js +12 -12
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +12 -12
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +14 -14
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +14 -14
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +14 -14
- package/selectbutton/selectbutton.min.js +1 -1
- package/selectitem/selectitem.d.ts +1 -1
- package/sidebar/sidebar.cjs.js +14 -13
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +2 -1
- package/sidebar/sidebar.esm.js +14 -13
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +14 -13
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +11 -11
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +11 -11
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +11 -11
- package/skeleton/skeleton.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +13 -13
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +2 -1
- package/slidemenu/slidemenu.esm.js +13 -13
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +13 -13
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +11 -11
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +11 -11
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +11 -11
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +13 -13
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.d.ts +1 -1
- package/speeddial/speeddial.esm.js +13 -13
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +13 -13
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +22 -18
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +9 -3
- package/splitbutton/splitbutton.esm.js +22 -18
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +22 -18
- package/splitbutton/splitbutton.min.css +1 -1
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +12 -12
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +12 -12
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +12 -12
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +11 -11
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +11 -11
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +11 -11
- package/steps/steps.min.js +1 -1
- package/styleclass/styleclass.cjs.js +11 -11
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.esm.js +11 -11
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +11 -11
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +12 -12
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +12 -12
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +12 -12
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +57 -33
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +8 -0
- package/tabview/tabview.esm.js +57 -33
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +57 -33
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +11 -11
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.d.ts +1 -1
- package/tag/tag.esm.js +11 -11
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +11 -11
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +11 -11
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +11 -11
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +11 -11
- package/terminal/terminal.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +13 -13
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +2 -1
- package/tieredmenu/tieredmenu.esm.js +13 -13
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +13 -13
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +11 -11
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +11 -11
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +11 -11
- package/timeline/timeline.min.js +1 -1
- package/toast/toast.cjs.js +26 -15
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +5 -1
- package/toast/toast.esm.js +26 -15
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +27 -17
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +13 -13
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.d.ts +1 -1
- package/togglebutton/togglebutton.esm.js +13 -13
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +13 -13
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +11 -11
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +11 -11
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +11 -11
- package/toolbar/toolbar.min.css +1 -1
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +45 -19
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.d.ts +0 -1
- package/tooltip/tooltip.esm.js +45 -19
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +45 -19
- package/tooltip/tooltip.min.js +1 -1
- package/tooltip/tooltipoptions.d.ts +2 -0
- package/tree/tree.cjs.js +19 -18
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +8 -4
- package/tree/tree.esm.js +19 -18
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +19 -18
- package/tree/tree.min.js +1 -1
- package/treenode/treenode.d.ts +2 -1
- package/treeselect/treeselect.cjs.js +20 -20
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +2 -1
- package/treeselect/treeselect.esm.js +20 -20
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +20 -20
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +101 -40
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +2 -1
- package/treetable/treetable.esm.js +97 -37
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +101 -40
- package/treetable/treetable.min.css +1 -1
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +13 -13
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +13 -13
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +13 -13
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +98 -23
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +3 -0
- package/utils/utils.esm.js +98 -23
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +98 -23
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +62 -36
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +62 -36
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +62 -36
- package/virtualscroller/virtualscroller.min.css +1 -1
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +59 -10
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff2 +0 -0
- package/util.d.ts +0 -1
package/utils/utils.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.utils=function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(t);function i(e){if(Array.isArray(e))return e}function o(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);l=!0);}catch(e){a=!0,i=e}finally{try{l||null==n.return||n.return()}finally{if(a)throw i}}return o}}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 a(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 s(){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 u(e,t){return i(e)||o(e,t)||a(e,t)||s()}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function f(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t){for(var r=[],i=0;i<t.length;i++){var o=t[i];if(o){var l=c(o);if("string"===l||"number"===l)r.push(o);else if("object"===l){var a=Array.isArray(o)?o:Object.entries(o).map((function(e){var t=u(e,2);return t[1]?t[0]:null}));r=a.length?r.concat(a.filter((function(e){return!!e}))):r}}}return r.join(" ")}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),e}function y(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=g(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){a=!0,o=e},f:function(){try{l||null==n.return||n.return()}finally{if(a)throw o}}}}function g(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 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}var m=function(){function e(){d(this,e)}return h(e,null,[{key:"innerWidth",value:function(e){if(e){var t=e.offsetWidth,n=getComputedStyle(e);return t+=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)}return 0}},{key:"width",value:function(e){if(e){var t=e.offsetWidth,n=getComputedStyle(e);return t-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),t}return 0}},{key:"getWindowScrollTop",value:function(){var e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}},{key:"getWindowScrollLeft",value:function(){var e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}},{key:"getOuterWidth",value:function(e,t){if(e){var n=e.offsetWidth||e.getBoundingClientRect().width;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginLeft)+parseFloat(r.marginRight)}return n}return 0}},{key:"getOuterHeight",value:function(e,t){if(e){var n=e.offsetHeight||e.getBoundingClientRect().height;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return n}return 0}},{key:"getClientHeight",value:function(e,t){if(e){var n=e.clientHeight;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return n}return 0}},{key:"getClientWidth",value:function(e,t){if(e){var n=e.clientWidth;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginLeft)+parseFloat(r.marginRight)}return n}return 0}},{key:"getViewport",value:function(){var e=window,t=document,n=t.documentElement,r=t.getElementsByTagName("body")[0];return{width:e.innerWidth||n.clientWidth||r.clientWidth,height:e.innerHeight||n.clientHeight||r.clientHeight}}},{key:"getOffset",value:function(e){if(e){var t=e.getBoundingClientRect();return{top:t.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:t.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}return{top:"auto",left:"auto"}}},{key:"index",value:function(e){if(e)for(var t=e.parentNode.childNodes,n=0,r=0;r<t.length;r++){if(t[r]===e)return n;1===t[r].nodeType&&n++}return-1}},{key:"addMultipleClasses",value:function(e,t){if(e&&t)if(e.classList)for(var n=t.split(" "),r=0;r<n.length;r++)e.classList.add(n[r]);else for(var i=t.split(" "),o=0;o<i.length;o++)e.className+=" "+i[o]}},{key:"removeMultipleClasses",value:function(e,t){if(e&&t)if(e.classList)for(var n=t.split(" "),r=0;r<n.length;r++)e.classList.remove(n[r]);else for(var i=t.split(" "),o=0;o<i.length;o++)e.className=e.className.replace(new RegExp("(^|\\b)"+i[o].split(" ").join("|")+"(\\b|$)","gi")," ")}},{key:"addClass",value:function(e,t){e&&t&&(e.classList?e.classList.add(t):e.className+=" "+t)}},{key:"removeClass",value:function(e,t){e&&t&&(e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," "))}},{key:"hasClass",value:function(e,t){if(e)return e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className)}},{key:"find",value:function(e,t){return e?Array.from(e.querySelectorAll(t)):[]}},{key:"findSingle",value:function(e,t){return e?e.querySelector(t):null}},{key:"getHeight",value:function(e){if(e){var t=e.offsetHeight,n=getComputedStyle(e);return t-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth)}return 0}},{key:"getWidth",value:function(e){if(e){var t=e.offsetWidth,n=getComputedStyle(e);return t-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)+parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth)}return 0}},{key:"alignOverlay",value:function(t,n,r){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];t&&n&&("self"===r?this.relativePosition(t,n):(i&&(t.style.minWidth=e.getOuterWidth(n)+"px"),this.absolutePosition(t,n)))}},{key:"absolutePosition",value:function(e,t){if(e){var n,r,i=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),o=i.height,l=i.width,a=t.offsetHeight,s=t.offsetWidth,u=t.getBoundingClientRect(),c=this.getWindowScrollTop(),f=this.getWindowScrollLeft(),d=this.getViewport();u.top+a+o>d.height?((n=u.top+c-o)<0&&(n=c),e.style.transformOrigin="bottom"):(n=a+u.top+c,e.style.transformOrigin="top"),r=u.left+s+l>d.width?Math.max(0,u.left+f+s-l):u.left+f,e.style.top=n+"px",e.style.left=r+"px"}}},{key:"relativePosition",value:function(e,t){if(e){var n,r,i=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),o=t.offsetHeight,l=t.getBoundingClientRect(),a=this.getViewport();l.top+o+i.height>a.height?(l.top+(n=-1*i.height)<0&&(n=-1*l.top),e.style.transformOrigin="bottom"):(n=o,e.style.transformOrigin="top"),r=i.width>a.width?-1*l.left:l.left+i.width>a.width?-1*(l.left+i.width-a.width):0,e.style.top=n+"px",e.style.left=r+"px"}}},{key:"flipfitCollision",value:function(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left top",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"left bottom",l=arguments.length>4?arguments[4]:void 0,a=n.getBoundingClientRect(),s=this.getViewport(),u=i.split(" "),c=o.split(" "),f=function(e,t){return t?+e.substring(e.search(/(\+|-)/g))||0:e.substring(0,e.search(/(\+|-)/g))||e},d={my:{x:f(u[0]),y:f(u[1]||u[0]),offsetX:f(u[0],!0),offsetY:f(u[1]||u[0],!0)},at:{x:f(c[0]),y:f(c[1]||c[0]),offsetX:f(c[0],!0),offsetY:f(c[1]||c[0],!0)}},p={left:function(){return d.my.offsetX+d.at.offsetX+a.left+("left"===d.my.x?0:-1*("center"===d.my.x?r.getOuterWidth(t)/2:r.getOuterWidth(t)))},top:function(){return d.my.offsetY+d.at.offsetY+a.top+("top"===d.my.y?0:-1*("center"===d.my.y?r.getOuterHeight(t)/2:r.getOuterHeight(t)))}},h={count:{x:0,y:0},left:function(){var n=p.left(),r=e.getWindowScrollLeft();t.style.left=n+r+"px",2===this.count.x?(t.style.left=r+"px",this.count.x=0):n<0&&(this.count.x++,d.my.x="left",d.at.x="right",d.my.offsetX*=-1,d.at.offsetX*=-1,this.right())},right:function(){var r=p.left()+e.getOuterWidth(n),i=e.getWindowScrollLeft();t.style.left=r+i+"px",2===this.count.x?(t.style.left=s.width-e.getOuterWidth(t)+i+"px",this.count.x=0):r+e.getOuterWidth(t)>s.width&&(this.count.x++,d.my.x="right",d.at.x="left",d.my.offsetX*=-1,d.at.offsetX*=-1,this.left())},top:function(){var n=p.top(),r=e.getWindowScrollTop();t.style.top=n+r+"px",2===this.count.y?(t.style.left=r+"px",this.count.y=0):n<0&&(this.count.y++,d.my.y="top",d.at.y="bottom",d.my.offsetY*=-1,d.at.offsetY*=-1,this.bottom())},bottom:function(){var r=p.top()+e.getOuterHeight(n),i=e.getWindowScrollTop();t.style.top=r+i+"px",2===this.count.y?(t.style.left=s.height-e.getOuterHeight(t)+i+"px",this.count.y=0):r+e.getOuterHeight(n)>s.height&&(this.count.y++,d.my.y="bottom",d.at.y="top",d.my.offsetY*=-1,d.at.offsetY*=-1,this.top())},center:function(r){if("y"===r){var i=p.top()+e.getOuterHeight(n)/2;t.style.top=i+e.getWindowScrollTop()+"px",i<0?this.bottom():i+e.getOuterHeight(n)>s.height&&this.top()}else{var o=p.left()+e.getOuterWidth(n)/2;t.style.left=o+e.getWindowScrollLeft()+"px",o<0?this.left():o+e.getOuterWidth(t)>s.width&&this.right()}}};h[d.at.x]("x"),h[d.at.y]("y"),this.isFunction(l)&&l(d)}},{key:"findCollisionPosition",value:function(e){if(e){var t="left"===e?"right":"left";return"top"===e||"bottom"===e?{axis:"y",my:"center ".concat("top"===e?"bottom":"top"),at:"center ".concat(e)}:{axis:"x",my:"".concat(t," center"),at:"".concat(e," center")}}}},{key:"getParents",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return null===e.parentNode?t:this.getParents(e.parentNode,t.concat([e.parentNode]))}},{key:"getScrollableParents",value:function(e){var t=[];if(e){var n,r=this.getParents(e),i=/(auto|scroll)/,o=function(e){var t=e?getComputedStyle(e):null;return t&&(i.test(t.getPropertyValue("overflow"))||i.test(t.getPropertyValue("overflowX"))||i.test(t.getPropertyValue("overflowY")))},l=y(r);try{for(l.s();!(n=l.n()).done;){var a=n.value,s=1===a.nodeType&&a.dataset.scrollselectors;if(s){var u,c=y(s.split(","));try{for(c.s();!(u=c.n()).done;){var f=this.findSingle(a,u.value);f&&o(f)&&t.push(f)}}catch(e){c.e(e)}finally{c.f()}}9!==a.nodeType&&o(a)&&t.push(a)}}catch(e){l.e(e)}finally{l.f()}}return t}},{key:"getHiddenElementOuterHeight",value:function(e){if(e){e.style.visibility="hidden",e.style.display="block";var t=e.offsetHeight;return e.style.display="none",e.style.visibility="visible",t}return 0}},{key:"getHiddenElementOuterWidth",value:function(e){if(e){e.style.visibility="hidden",e.style.display="block";var t=e.offsetWidth;return e.style.display="none",e.style.visibility="visible",t}return 0}},{key:"getHiddenElementDimensions",value:function(e){var t={};return e&&(e.style.visibility="hidden",e.style.display="block",t.width=e.offsetWidth,t.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible"),t}},{key:"fadeIn",value:function(e,t){if(e){e.style.opacity=0;var n=+new Date,r=0;!function i(){r=+e.style.opacity+((new Date).getTime()-n)/t,e.style.opacity=r,n=+new Date,+r<1&&(window.requestAnimationFrame&&requestAnimationFrame(i)||setTimeout(i,16))}()}}},{key:"fadeOut",value:function(e,t){if(e)var n=1,r=50/t,i=setInterval((function(){(n-=r)<=0&&(n=0,clearInterval(i)),e.style.opacity=n}),50)}},{key:"getUserAgent",value:function(){return navigator.userAgent}},{key:"isIOS",value:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}},{key:"isAndroid",value:function(){return/(android)/i.test(navigator.userAgent)}},{key:"isTouchDevice",value:function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}},{key:"isFunction",value:function(e){return!!(e&&e.constructor&&e.call&&e.apply)}},{key:"appendChild",value:function(e,t){if(this.isElement(t))t.appendChild(e);else{if(!t.el||!t.el.nativeElement)throw new Error("Cannot append "+t+" to "+e);t.el.nativeElement.appendChild(e)}}},{key:"removeChild",value:function(e,t){if(this.isElement(t))t.removeChild(e);else{if(!t.el||!t.el.nativeElement)throw new Error("Cannot remove "+e+" from "+t);t.el.nativeElement.removeChild(e)}}},{key:"isElement",value:function(e){return"object"===("undefined"==typeof HTMLElement?"undefined":c(HTMLElement))?e instanceof HTMLElement:e&&"object"===c(e)&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}},{key:"scrollInView",value:function(e,t){var n=getComputedStyle(e).getPropertyValue("borderTopWidth"),r=n?parseFloat(n):0,i=getComputedStyle(e).getPropertyValue("paddingTop"),o=i?parseFloat(i):0,l=e.getBoundingClientRect(),a=t.getBoundingClientRect().top+document.body.scrollTop-(l.top+document.body.scrollTop)-r-o,s=e.scrollTop,u=e.clientHeight,c=this.getOuterHeight(t);a<0?e.scrollTop=s+a:a+c>u&&(e.scrollTop=s+a-u+c)}},{key:"clearSelection",value:function(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch(e){}}},{key:"calculateScrollbarWidth",value:function(e){if(e){var t=getComputedStyle(e);return e.offsetWidth-e.clientWidth-parseFloat(t.borderLeftWidth)-parseFloat(t.borderRightWidth)}if(null!=this.calculatedScrollbarWidth)return this.calculatedScrollbarWidth;var n=document.createElement("div");n.className="p-scrollbar-measure",document.body.appendChild(n);var r=n.offsetWidth-n.clientWidth;return document.body.removeChild(n),this.calculatedScrollbarWidth=r,r}},{key:"getBrowser",value:function(){if(!this.browser){var e=this.resolveUserAgent();this.browser={},e.browser&&(this.browser[e.browser]=!0,this.browser.version=e.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}},{key:"resolveUserAgent",value:function(){var e=navigator.userAgent.toLowerCase(),t=/(chrome)[ ]([\w.]+)/.exec(e)||/(webkit)[ ]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ ]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}}},{key:"isVisible",value:function(e){return e&&null!=e.offsetParent}},{key:"isExist",value:function(e){return null!=e&&e.nodeName}},{key:"getFocusableElements",value:function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=e.find(t,'button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])'.concat(r,',\n [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(r,',\n input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(r,',\n select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(r,',\n textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(r,',\n [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(r,',\n [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(r)),o=[],l=y(i);try{for(l.s();!(n=l.n()).done;){var a=n.value;"none"!==getComputedStyle(a).display&&"hidden"!==getComputedStyle(a).visibility&&o.push(a)}}catch(e){l.e(e)}finally{l.f()}return o}},{key:"getFirstFocusableElement",value:function(t,n){var r=e.getFocusableElements(t,n);return r.length>0?r[0]:null}},{key:"getLastFocusableElement",value:function(t,n){var r=e.getFocusableElements(t,n);return r.length>0?r[r.length-1]:null}},{key:"getCursorOffset",value:function(e,t,n,r){if(e){var i=getComputedStyle(e),o=document.createElement("div");o.style.position="absolute",o.style.top="0px",o.style.left="0px",o.style.visibility="hidden",o.style.pointerEvents="none",o.style.overflow=i.overflow,o.style.width=i.width,o.style.height=i.height,o.style.padding=i.padding,o.style.border=i.border,o.style.overflowWrap=i.overflowWrap,o.style.whiteSpace=i.whiteSpace,o.style.lineHeight=i.lineHeight,o.innerHTML=t.replace(/\r\n|\r|\n/g,"<br />");var l=document.createElement("span");l.textContent=r,o.appendChild(l);var a=document.createTextNode(n);o.appendChild(a),document.body.appendChild(o);var s=l.offsetLeft,u=l.offsetTop,c=l.clientHeight;return document.body.removeChild(o),{left:Math.abs(s-e.scrollLeft),top:Math.abs(u-e.scrollTop)+c}}return{top:"auto",left:"auto"}}},{key:"invokeElementMethod",value:function(e,t,n){e[t].apply(e,n)}},{key:"isClickable",value:function(e){var t=e.nodeName,n=e.parentElement&&e.parentElement.nodeName;return"INPUT"===t||"TEXTAREA"===t||"BUTTON"===t||"A"===t||"INPUT"===n||"TEXTAREA"===n||"BUTTON"===n||"A"===n||this.hasClass(e,"p-button")||this.hasClass(e.parentElement,"p-button")||this.hasClass(e.parentElement,"p-checkbox")||this.hasClass(e.parentElement,"p-radiobutton")}},{key:"applyStyle",value:function(e,t){if("string"==typeof t)e.style.cssText=this.style;else for(var n in this.style)e.style[n]=t[n]}},{key:"exportCSV",value:function(e,t){var n=new Blob([e],{type:"application/csv;charset=utf-8;"});if(window.navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(n,t+".csv");else{var r=document.createElement("a");void 0!==r.download?(r.setAttribute("href",URL.createObjectURL(n)),r.setAttribute("download",t+".csv"),r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r)):(e="data:text/csv;charset=utf-8,"+e,window.open(encodeURI(e)))}}}]),e}(),b=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};d(this,e),this.element=t,this.listener=n}return h(e,[{key:"bindScrollListener",value:function(){this.scrollableParents=m.getScrollableParents(this.element);for(var e=0;e<this.scrollableParents.length;e++)this.scrollableParents[e].addEventListener("scroll",this.listener)}},{key:"unbindScrollListener",value:function(){if(this.scrollableParents)for(var e=0;e<this.scrollableParents.length;e++)this.scrollableParents[e].removeEventListener("scroll",this.listener)}},{key:"destroy",value:function(){this.unbindScrollListener(),this.element=null,this.listener=null,this.scrollableParents=null}}]),e}();function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var E=function(){function e(){d(this,e)}return h(e,null,[{key:"equals",value:function(e,t,n){return n&&e&&"object"===c(e)&&t&&"object"===c(t)?this.resolveFieldData(e,n)===this.resolveFieldData(t,n):this.deepEquals(e,t)}},{key:"deepEquals",value:function(e,t){if(e===t)return!0;if(e&&t&&"object"==c(e)&&"object"==c(t)){var n,r,i,o=Array.isArray(e),l=Array.isArray(t);if(o&&l){if((r=e.length)!==t.length)return!1;for(n=r;0!=n--;)if(!this.deepEquals(e[n],t[n]))return!1;return!0}if(o!==l)return!1;var a=e instanceof Date,s=t instanceof Date;if(a!==s)return!1;if(a&&s)return e.getTime()===t.getTime();var u=e instanceof RegExp,f=t instanceof RegExp;if(u!==f)return!1;if(u&&f)return e.toString()===t.toString();var d=Object.keys(e);if((r=d.length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!Object.prototype.hasOwnProperty.call(t,d[n]))return!1;for(n=r;0!=n--;)if(!this.deepEquals(e[i=d[n]],t[i]))return!1;return!0}return e!=e&&t!=t}},{key:"resolveFieldData",value:function(e,t){if(e&&Object.keys(e).length&&t){if(this.isFunction(t))return t(e);if(-1===t.indexOf("."))return e[t];for(var n=t.split("."),r=e,i=0,o=n.length;i<o;++i){if(null==r)return null;r=r[n[i]]}return r}return null}},{key:"isFunction",value:function(e){return!!(e&&e.constructor&&e.call&&e.apply)}},{key:"findDiffKeys",value:function(e,t){return e&&t?Object.keys(e).filter((function(e){return!t.hasOwnProperty(e)})).reduce((function(t,n){return t[n]=e[n],t}),{}):{}}},{key:"reorderArray",value:function(e,t,n){var r;if(e&&t!==n){if(n>=e.length)for(r=n-e.length;1+r--;)e.push(void 0);e.splice(n,0,e.splice(t,1)[0])}}},{key:"findIndexInList",value:function(e,t,n){var r=this;return t?t.findIndex(n?function(t){return r.equals(t,e,n)}:function(t){return t===e}):-1}},{key:"getJSXElement",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return this.isFunction(e)?e.apply(void 0,n):e}},{key:"getPropValue",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return this.isFunction(e)?e.apply(void 0,n):e}},{key:"getRefElement",value:function(e){return e?"object"===c(e)&&e.hasOwnProperty("current")?e.current:e:null}},{key:"removeAccents",value:function(e){return e&&e.search(/[\xC0-\xFF]/g)>-1&&(e=e.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),e}},{key:"isEmpty",value:function(e){return null==e||""===e||Array.isArray(e)&&0===e.length||!(e instanceof Date)&&"object"===c(e)&&0===Object.keys(e).length}},{key:"isNotEmpty",value:function(e){return!this.isEmpty(e)}}]),e}();function O(){return O=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},O.apply(this,arguments)}function C(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 S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var A=function(){function e(){d(this,e)}return h(e,null,[{key:"getJSXIcon",value:function(e,t,n){var i=null;if(e){var o=c(e),l=f(t.className,"string"===o&&e);if(i=r.default.createElement("span",O({},t,{className:l})),"string"!==o){var a=S({iconProps:t,element:i},n);return E.getJSXElement(e,a)}}return i}}]),e}(),j=0;function T(e){if(Array.isArray(e))return l(e)}function P(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function F(){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 L(e){return T(e)||P(e)||a(e)||F()}var W,H,R,D,I=(W=[],H=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:999,r=D(e,t,n),i=r.value+(r.key===e?0:n)+1;return W.push({key:e,value:i}),i},R=function(e,t){return D(e,t).value},D=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return L(W).reverse().find((function(n){return!!t||n.key===e}))||{key:e,value:n}},{get:function(e){return e&&parseInt(e.style.zIndex,10)||0},set:function(e,t,n,r){t&&(t.style.zIndex=String(H(e,n,r)))},clear:function(e){var t;e&&(t=I.get(e),W=W.filter((function(e){return e.value!==t})),e.style.zIndex="")},getCurrent:function(e,t){return R(e,t)}});return e.ConnectedOverlayScrollHandler=b,e.DomHandler=m,e.EventBus=function(){var e=new Map;return{on:function(t,n){var r=e.get(t);r?r.push(n):r=[n],e.set(t,r)},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){var r=e.get(t);r&&r.slice().forEach((function(e){return e(n)}))}}},e.IconUtils=A,e.ObjectUtils=E,e.UniqueComponentId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"pr_id_";return j++,"".concat(e).concat(j)},e.ZIndexUtils=I,e.classNames=f,e.mask=function(e,t){var n,r,i,o,l,a,s,u,c,f,d,p;t=k(k({},{mask:null,slotChar:"_",autoClear:!0,unmask:!1,readOnly:!1,onComplete:null,onChange:null,onFocus:null,onBlur:null}),t);var h=function(t,n){var r,i,o;if(e.offsetParent&&e===document.activeElement)return"number"!=typeof t?(e.setSelectionRange?(i=e.selectionStart,o=e.selectionEnd):document.selection&&document.selection.createRange&&(o=(i=0-(r=document.selection.createRange()).duplicate().moveStart("character",-1e5))+r.text.length),{begin:i,end:o}):(i=t,o="number"==typeof n?n:i,void(e.setSelectionRange?e.setSelectionRange(i,o):e.createTextRange&&((r=e.createTextRange()).collapse(!0),r.moveEnd("character",o),r.moveStart("character",i),r.select())))},y=function(){for(var e=o;e<=s;e++)if(n[e]&&d[e]===g(e))return!1;return!0},g=function(e){return t.slotChar.charAt(e<t.slotChar.length?e:0)},v=function(){return t.unmask?H():e&&e.value},b=function(e){for(;++e<i&&!n[e];);return e},w=function(e){for(;--e>=0&&!n[e];);return e},x=function(e,t){var r,l;if(!(e<0)){for(r=e,l=b(t);r<i;r++)if(n[r]){if(!(l<i&&n[r].test(d[l])))break;d[r]=d[l],d[l]=g(l),l=b(l)}T(),h(Math.max(o,e))}},E=function(e){var t,r,o,l;for(t=e,r=g(e);t<i;t++)if(n[t]){if(o=b(t),l=d[t],d[t]=r,!(o<i&&n[o].test(l)))break;r=l}},O=function(r){var l=e.value,a=h();if(u&&u.length&&u.length>l.length){for(P(!0);a.begin>0&&!n[a.begin-1];)a.begin--;if(0===a.begin)for(;a.begin<o&&!n[a.begin];)a.begin++;h(a.begin,a.begin)}else{for(P(!0);a.begin<i&&!n[a.begin];)a.begin++;h(a.begin,a.begin)}t.onComplete&&y()&&t.onComplete({originalEvent:r,value:v()})},C=function(n){if(P(),R(n),t.onBlur&&t.onBlur(n),e.value!==c){var r=document.createEvent("HTMLEvents");r.initEvent("change",!0,!1),e.dispatchEvent(r)}},S=function(n){if(!t.readOnly){var r,i,o,l=n.which||n.keyCode,a=/iphone/i.test(m.getUserAgent());u=e.value,8===l||46===l||a&&127===l?((o=(r=h()).end)-(i=r.begin)==0&&(i=46!==l?w(i):o=b(i-1),o=46===l?b(o):o),j(i,o),x(i,o-1),R(n),n.preventDefault()):13===l?(C(n),R(n)):27===l&&(e.value=c,h(0,P()),R(n),n.preventDefault())}},A=function(e){if(!t.readOnly){var r,o,l,a,u=e.which||e.keyCode,c=h();if(!(e.ctrlKey||e.altKey||e.metaKey||u<32)){if(u&&13!==u){if(c.end-c.begin!=0&&(j(c.begin,c.end),x(c.begin,c.end-1)),(r=b(c.begin-1))<i&&(o=String.fromCharCode(u),n[r].test(o))){if(E(r),d[r]=o,T(),l=b(r),/android/i.test(m.getUserAgent())){setTimeout((function(){h(l)}),0)}else h(l);c.begin<=s&&(a=y())}e.preventDefault()}R(e),t.onComplete&&a&&t.onComplete({originalEvent:e,value:v()})}}},j=function(e,t){var r;for(r=e;r<t&&r<i;r++)n[r]&&(d[r]=g(r))},T=function(){e.value=d.join("")},P=function(l){var a,s,u,c=e.value,f=-1;for(a=0,u=0;a<i;a++)if(n[a]){for(d[a]=g(a);u++<c.length;)if(s=c.charAt(u-1),n[a].test(s)){d[a]=s,f=a;break}if(u>c.length){j(a+1,i);break}}else d[a]===c.charAt(u)&&u++,a<r&&(f=a);return l?T():f+1<r?t.autoClear||d.join("")===p?(e.value&&(e.value=""),j(0,i)):T():(T(),e.value=e.value.substring(0,f+1)),r?a:o},F=function(n){var r;t.readOnly||(clearTimeout(f),c=e.value,r=P(),f=setTimeout((function(){e===document.activeElement&&(T(),r===t.mask.replace("?","").length?h(0,r):h(r))}),10),t.onFocus&&t.onFocus(n))},L=function(e){a?O(e):W(e)},W=function(e){if(!t.readOnly){var n=P(!0);h(n),R(e),t.onComplete&&y()&&t.onComplete({originalEvent:e,value:v()})}},H=function(){for(var e=[],t=0;t<d.length;t++){var r=d[t];n[t]&&r!==g(t)&&e.push(r)}return e.join("")},R=function(e){if(t.onChange){var n=v().replace(t.slotChar,"");t.onChange({originalEvent:e,value:p!==n?n:""})}},D=function(){e.addEventListener("focus",F),e.addEventListener("blur",C),e.addEventListener("keydown",S),e.addEventListener("keypress",A),e.addEventListener("input",L),e.addEventListener("paste",W)},I=function(){n=[],r=t.mask.length,i=t.mask.length,o=null,l={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"};var e=m.getUserAgent();a=/chrome/i.test(e)&&/android/i.test(e);for(var u=t.mask.split(""),c=0;c<u.length;c++){var f=u[c];"?"===f?(i--,r=c):l[f]?(n.push(new RegExp(l[f])),null===o&&(o=n.length-1),c<r&&(s=n.length-1)):n.push(null)}d=[];for(var h=0;h<u.length;h++){var y=u[h];"?"!==y&&d.push(l[y]?g(h):y)}p=d.join("")};return e&&t.mask&&(I(),D()),{init:I,bindEvents:D,unbindEvents:function(){e.removeEventListener("focus",F),e.removeEventListener("blur",C),e.removeEventListener("keydown",S),e.removeEventListener("keypress",A),e.removeEventListener("input",L),e.removeEventListener("paste",W)},updateModel:R,getValue:v}},Object.defineProperty(e,"__esModule",{value:!0}),e}({},React);
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.utils=function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(t);function i(e){if(Array.isArray(e))return e}function o(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);l=!0);}catch(e){a=!0,i=e}finally{try{l||null==n.return||n.return()}finally{if(a)throw i}}return o}}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 a(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 u(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){return i(e)||o(e,t)||a(e,t)||u()}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function f(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t){for(var r=[],i=0;i<t.length;i++){var o=t[i];if(o){var l=c(o);if("string"===l||"number"===l)r.push(o);else if("object"===l){var a=Array.isArray(o)?o:Object.entries(o).map((function(e){var t=s(e,2);return t[1]?t[0]:null}));r=a.length?r.concat(a.filter((function(e){return!!e}))):r}}}return r.join(" ")}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t,n){return t&&g(e.prototype,t),n&&g(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=y(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){a=!0,o=e},f:function(){try{l||null==n.return||n.return()}finally{if(a)throw o}}}}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 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}var m=function(){function e(){d(this,e)}return p(e,null,[{key:"innerWidth",value:function(e){if(e){var t=e.offsetWidth,n=getComputedStyle(e);return t+=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)}return 0}},{key:"width",value:function(e){if(e){var t=e.offsetWidth,n=getComputedStyle(e);return t-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),t}return 0}},{key:"getBrowserLanguage",value:function(){return navigator.userLanguage||navigator.languages&&navigator.languages.length&&navigator.languages[0]||navigator.language||navigator.browserLanguage||navigator.systemLanguage||"en"}},{key:"getWindowScrollTop",value:function(){var e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}},{key:"getWindowScrollLeft",value:function(){var e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}},{key:"getOuterWidth",value:function(e,t){if(e){var n=e.offsetWidth||e.getBoundingClientRect().width;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginLeft)+parseFloat(r.marginRight)}return n}return 0}},{key:"getOuterHeight",value:function(e,t){if(e){var n=e.offsetHeight||e.getBoundingClientRect().height;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return n}return 0}},{key:"getClientHeight",value:function(e,t){if(e){var n=e.clientHeight;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return n}return 0}},{key:"getClientWidth",value:function(e,t){if(e){var n=e.clientWidth;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginLeft)+parseFloat(r.marginRight)}return n}return 0}},{key:"getViewport",value:function(){var e=window,t=document,n=t.documentElement,r=t.getElementsByTagName("body")[0];return{width:e.innerWidth||n.clientWidth||r.clientWidth,height:e.innerHeight||n.clientHeight||r.clientHeight}}},{key:"getOffset",value:function(e){if(e){var t=e.getBoundingClientRect();return{top:t.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:t.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}return{top:"auto",left:"auto"}}},{key:"index",value:function(e){if(e)for(var t=e.parentNode.childNodes,n=0,r=0;r<t.length;r++){if(t[r]===e)return n;1===t[r].nodeType&&n++}return-1}},{key:"addMultipleClasses",value:function(e,t){if(e&&t)if(e.classList)for(var n=t.split(" "),r=0;r<n.length;r++)e.classList.add(n[r]);else for(var i=t.split(" "),o=0;o<i.length;o++)e.className+=" "+i[o]}},{key:"removeMultipleClasses",value:function(e,t){if(e&&t)if(e.classList)for(var n=t.split(" "),r=0;r<n.length;r++)e.classList.remove(n[r]);else for(var i=t.split(" "),o=0;o<i.length;o++)e.className=e.className.replace(new RegExp("(^|\\b)"+i[o].split(" ").join("|")+"(\\b|$)","gi")," ")}},{key:"addClass",value:function(e,t){e&&t&&(e.classList?e.classList.add(t):e.className+=" "+t)}},{key:"removeClass",value:function(e,t){e&&t&&(e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," "))}},{key:"hasClass",value:function(e,t){if(e)return e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className)}},{key:"find",value:function(e,t){return e?Array.from(e.querySelectorAll(t)):[]}},{key:"findSingle",value:function(e,t){return e?e.querySelector(t):null}},{key:"getHeight",value:function(e){if(e){var t=e.offsetHeight,n=getComputedStyle(e);return t-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth)}return 0}},{key:"getWidth",value:function(e){if(e){var t=e.offsetWidth,n=getComputedStyle(e);return t-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)+parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth)}return 0}},{key:"alignOverlay",value:function(t,n,r){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];t&&n&&("self"===r?this.relativePosition(t,n):(i&&(t.style.minWidth=e.getOuterWidth(n)+"px"),this.absolutePosition(t,n)))}},{key:"absolutePosition",value:function(e,t){if(e){var n,r,i=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),o=i.height,l=i.width,a=t.offsetHeight,u=t.offsetWidth,s=t.getBoundingClientRect(),c=this.getWindowScrollTop(),f=this.getWindowScrollLeft(),d=this.getViewport();s.top+a+o>d.height?((n=s.top+c-o)<0&&(n=c),e.style.transformOrigin="bottom"):(n=a+s.top+c,e.style.transformOrigin="top"),r=s.left+u+l>d.width?Math.max(0,s.left+f+u-l):s.left+f,e.style.top=n+"px",e.style.left=r+"px"}}},{key:"relativePosition",value:function(e,t){if(e){var n,r,i=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),o=t.offsetHeight,l=t.getBoundingClientRect(),a=this.getViewport();l.top+o+i.height>a.height?(l.top+(n=-1*i.height)<0&&(n=-1*l.top),e.style.transformOrigin="bottom"):(n=o,e.style.transformOrigin="top"),r=i.width>a.width?-1*l.left:l.left+i.width>a.width?-1*(l.left+i.width-a.width):0,e.style.top=n+"px",e.style.left=r+"px"}}},{key:"flipfitCollision",value:function(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left top",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"left bottom",l=arguments.length>4?arguments[4]:void 0,a=n.getBoundingClientRect(),u=this.getViewport(),s=i.split(" "),c=o.split(" "),f=function(e,t){return t?+e.substring(e.search(/(\+|-)/g))||0:e.substring(0,e.search(/(\+|-)/g))||e},d={my:{x:f(s[0]),y:f(s[1]||s[0]),offsetX:f(s[0],!0),offsetY:f(s[1]||s[0],!0)},at:{x:f(c[0]),y:f(c[1]||c[0]),offsetX:f(c[0],!0),offsetY:f(c[1]||c[0],!0)}},g={left:function(){return d.my.offsetX+d.at.offsetX+a.left+("left"===d.my.x?0:-1*("center"===d.my.x?r.getOuterWidth(t)/2:r.getOuterWidth(t)))},top:function(){return d.my.offsetY+d.at.offsetY+a.top+("top"===d.my.y?0:-1*("center"===d.my.y?r.getOuterHeight(t)/2:r.getOuterHeight(t)))}},p={count:{x:0,y:0},left:function(){var n=g.left(),r=e.getWindowScrollLeft();t.style.left=n+r+"px",2===this.count.x?(t.style.left=r+"px",this.count.x=0):n<0&&(this.count.x++,d.my.x="left",d.at.x="right",d.my.offsetX*=-1,d.at.offsetX*=-1,this.right())},right:function(){var r=g.left()+e.getOuterWidth(n),i=e.getWindowScrollLeft();t.style.left=r+i+"px",2===this.count.x?(t.style.left=u.width-e.getOuterWidth(t)+i+"px",this.count.x=0):r+e.getOuterWidth(t)>u.width&&(this.count.x++,d.my.x="right",d.at.x="left",d.my.offsetX*=-1,d.at.offsetX*=-1,this.left())},top:function(){var n=g.top(),r=e.getWindowScrollTop();t.style.top=n+r+"px",2===this.count.y?(t.style.left=r+"px",this.count.y=0):n<0&&(this.count.y++,d.my.y="top",d.at.y="bottom",d.my.offsetY*=-1,d.at.offsetY*=-1,this.bottom())},bottom:function(){var r=g.top()+e.getOuterHeight(n),i=e.getWindowScrollTop();t.style.top=r+i+"px",2===this.count.y?(t.style.left=u.height-e.getOuterHeight(t)+i+"px",this.count.y=0):r+e.getOuterHeight(n)>u.height&&(this.count.y++,d.my.y="bottom",d.at.y="top",d.my.offsetY*=-1,d.at.offsetY*=-1,this.top())},center:function(r){if("y"===r){var i=g.top()+e.getOuterHeight(n)/2;t.style.top=i+e.getWindowScrollTop()+"px",i<0?this.bottom():i+e.getOuterHeight(n)>u.height&&this.top()}else{var o=g.left()+e.getOuterWidth(n)/2;t.style.left=o+e.getWindowScrollLeft()+"px",o<0?this.left():o+e.getOuterWidth(t)>u.width&&this.right()}}};p[d.at.x]("x"),p[d.at.y]("y"),this.isFunction(l)&&l(d)}},{key:"findCollisionPosition",value:function(e){if(e){var t="left"===e?"right":"left";return"top"===e||"bottom"===e?{axis:"y",my:"center ".concat("top"===e?"bottom":"top"),at:"center ".concat(e)}:{axis:"x",my:"".concat(t," center"),at:"".concat(e," center")}}}},{key:"getParents",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return null===e.parentNode?t:this.getParents(e.parentNode,t.concat([e.parentNode]))}},{key:"getScrollableParents",value:function(e){var t=[];if(e){var n,r=this.getParents(e),i=/(auto|scroll)/,o=function(e){var t=e?getComputedStyle(e):null;return t&&(i.test(t.getPropertyValue("overflow"))||i.test(t.getPropertyValue("overflowX"))||i.test(t.getPropertyValue("overflowY")))},l=h(r);try{for(l.s();!(n=l.n()).done;){var a=n.value,u=1===a.nodeType&&a.dataset.scrollselectors;if(u){var s,c=h(u.split(","));try{for(c.s();!(s=c.n()).done;){var f=this.findSingle(a,s.value);f&&o(f)&&t.push(f)}}catch(e){c.e(e)}finally{c.f()}}9!==a.nodeType&&o(a)&&t.push(a)}}catch(e){l.e(e)}finally{l.f()}}return t}},{key:"getHiddenElementOuterHeight",value:function(e){if(e){e.style.visibility="hidden",e.style.display="block";var t=e.offsetHeight;return e.style.display="none",e.style.visibility="visible",t}return 0}},{key:"getHiddenElementOuterWidth",value:function(e){if(e){e.style.visibility="hidden",e.style.display="block";var t=e.offsetWidth;return e.style.display="none",e.style.visibility="visible",t}return 0}},{key:"getHiddenElementDimensions",value:function(e){var t={};return e&&(e.style.visibility="hidden",e.style.display="block",t.width=e.offsetWidth,t.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible"),t}},{key:"fadeIn",value:function(e,t){if(e){e.style.opacity=0;var n=+new Date,r=0;!function i(){r=+e.style.opacity+((new Date).getTime()-n)/t,e.style.opacity=r,n=+new Date,+r<1&&(window.requestAnimationFrame&&requestAnimationFrame(i)||setTimeout(i,16))}()}}},{key:"fadeOut",value:function(e,t){if(e)var n=1,r=50/t,i=setInterval((function(){(n-=r)<=0&&(n=0,clearInterval(i)),e.style.opacity=n}),50)}},{key:"getUserAgent",value:function(){return navigator.userAgent}},{key:"isIOS",value:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}},{key:"isAndroid",value:function(){return/(android)/i.test(navigator.userAgent)}},{key:"isTouchDevice",value:function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}},{key:"isFunction",value:function(e){return!!(e&&e.constructor&&e.call&&e.apply)}},{key:"appendChild",value:function(e,t){if(this.isElement(t))t.appendChild(e);else{if(!t.el||!t.el.nativeElement)throw new Error("Cannot append "+t+" to "+e);t.el.nativeElement.appendChild(e)}}},{key:"removeChild",value:function(e,t){if(this.isElement(t))t.removeChild(e);else{if(!t.el||!t.el.nativeElement)throw new Error("Cannot remove "+e+" from "+t);t.el.nativeElement.removeChild(e)}}},{key:"isElement",value:function(e){return"object"===("undefined"==typeof HTMLElement?"undefined":c(HTMLElement))?e instanceof HTMLElement:e&&"object"===c(e)&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}},{key:"scrollInView",value:function(e,t){var n=getComputedStyle(e).getPropertyValue("borderTopWidth"),r=n?parseFloat(n):0,i=getComputedStyle(e).getPropertyValue("paddingTop"),o=i?parseFloat(i):0,l=e.getBoundingClientRect(),a=t.getBoundingClientRect().top+document.body.scrollTop-(l.top+document.body.scrollTop)-r-o,u=e.scrollTop,s=e.clientHeight,c=this.getOuterHeight(t);a<0?e.scrollTop=u+a:a+c>s&&(e.scrollTop=u+a-s+c)}},{key:"clearSelection",value:function(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch(e){}}},{key:"calculateScrollbarWidth",value:function(e){if(e){var t=getComputedStyle(e);return e.offsetWidth-e.clientWidth-parseFloat(t.borderLeftWidth)-parseFloat(t.borderRightWidth)}if(null!=this.calculatedScrollbarWidth)return this.calculatedScrollbarWidth;var n=document.createElement("div");n.className="p-scrollbar-measure",document.body.appendChild(n);var r=n.offsetWidth-n.clientWidth;return document.body.removeChild(n),this.calculatedScrollbarWidth=r,r}},{key:"getBrowser",value:function(){if(!this.browser){var e=this.resolveUserAgent();this.browser={},e.browser&&(this.browser[e.browser]=!0,this.browser.version=e.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}},{key:"resolveUserAgent",value:function(){var e=navigator.userAgent.toLowerCase(),t=/(chrome)[ ]([\w.]+)/.exec(e)||/(webkit)[ ]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ ]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}}},{key:"isVisible",value:function(e){return e&&null!=e.offsetParent}},{key:"isExist",value:function(e){return null!=e&&e.nodeName&&e.parentNode}},{key:"hasDOM",value:function(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}},{key:"getFocusableElements",value:function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=e.find(t,'button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])'.concat(r,',\n [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(r,',\n input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(r,',\n select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(r,',\n textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(r,',\n [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(r,',\n [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(r)),o=[],l=h(i);try{for(l.s();!(n=l.n()).done;){var a=n.value;"none"!==getComputedStyle(a).display&&"hidden"!==getComputedStyle(a).visibility&&o.push(a)}}catch(e){l.e(e)}finally{l.f()}return o}},{key:"getFirstFocusableElement",value:function(t,n){var r=e.getFocusableElements(t,n);return r.length>0?r[0]:null}},{key:"getLastFocusableElement",value:function(t,n){var r=e.getFocusableElements(t,n);return r.length>0?r[r.length-1]:null}},{key:"getCursorOffset",value:function(e,t,n,r){if(e){var i=getComputedStyle(e),o=document.createElement("div");o.style.position="absolute",o.style.top="0px",o.style.left="0px",o.style.visibility="hidden",o.style.pointerEvents="none",o.style.overflow=i.overflow,o.style.width=i.width,o.style.height=i.height,o.style.padding=i.padding,o.style.border=i.border,o.style.overflowWrap=i.overflowWrap,o.style.whiteSpace=i.whiteSpace,o.style.lineHeight=i.lineHeight,o.innerHTML=t.replace(/\r\n|\r|\n/g,"<br />");var l=document.createElement("span");l.textContent=r,o.appendChild(l);var a=document.createTextNode(n);o.appendChild(a),document.body.appendChild(o);var u=l.offsetLeft,s=l.offsetTop,c=l.clientHeight;return document.body.removeChild(o),{left:Math.abs(u-e.scrollLeft),top:Math.abs(s-e.scrollTop)+c}}return{top:"auto",left:"auto"}}},{key:"invokeElementMethod",value:function(e,t,n){e[t].apply(e,n)}},{key:"isClickable",value:function(e){var t=e.nodeName,n=e.parentElement&&e.parentElement.nodeName;return"INPUT"===t||"TEXTAREA"===t||"BUTTON"===t||"A"===t||"INPUT"===n||"TEXTAREA"===n||"BUTTON"===n||"A"===n||this.hasClass(e,"p-button")||this.hasClass(e.parentElement,"p-button")||this.hasClass(e.parentElement,"p-checkbox")||this.hasClass(e.parentElement,"p-radiobutton")}},{key:"applyStyle",value:function(e,t){if("string"==typeof t)e.style.cssText=this.style;else for(var n in this.style)e.style[n]=t[n]}},{key:"exportCSV",value:function(t,n){var r=new Blob([t],{type:"application/csv;charset=utf-8;"});window.navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(r,n+".csv"):e.saveAs({name:n+".csv",src:URL.createObjectURL(r)})||(t="data:text/csv;charset=utf-8,"+t,window.open(encodeURI(t)))}},{key:"saveAs",value:function(e){if(e){var t=document.createElement("a");if(void 0!==t.download){var n=e.name;return t.setAttribute("href",e.src),t.setAttribute("download",n),t.style.display="none",document.body.appendChild(t),t.click(),document.body.removeChild(t),!0}}return!1}},{key:"createInlineStyle",value:function(e){var t=document.createElement("style");try{e||(e=process.env.REACT_APP_CSS_NONCE)}catch(e){}return e&&t.setAttribute("nonce",e),document.head.appendChild(t),t}},{key:"removeInlineStyle",value:function(e){if(this.isExist(e)){try{document.head.removeChild(e)}catch(e){}e=null}return e}}]),e}(),b=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};d(this,e),this.element=t,this.listener=n}return p(e,[{key:"bindScrollListener",value:function(){this.scrollableParents=m.getScrollableParents(this.element);for(var e=0;e<this.scrollableParents.length;e++)this.scrollableParents[e].addEventListener("scroll",this.listener)}},{key:"unbindScrollListener",value:function(){if(this.scrollableParents)for(var e=0;e<this.scrollableParents.length;e++)this.scrollableParents[e].removeEventListener("scroll",this.listener)}},{key:"destroy",value:function(){this.unbindScrollListener(),this.element=null,this.listener=null,this.scrollableParents=null}}]),e}();function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var E=function(){function e(){d(this,e)}return p(e,null,[{key:"equals",value:function(e,t,n){return n&&e&&"object"===c(e)&&t&&"object"===c(t)?this.resolveFieldData(e,n)===this.resolveFieldData(t,n):this.deepEquals(e,t)}},{key:"deepEquals",value:function(e,t){if(e===t)return!0;if(e&&t&&"object"==c(e)&&"object"==c(t)){var n,r,i,o=Array.isArray(e),l=Array.isArray(t);if(o&&l){if((r=e.length)!==t.length)return!1;for(n=r;0!=n--;)if(!this.deepEquals(e[n],t[n]))return!1;return!0}if(o!==l)return!1;var a=e instanceof Date,u=t instanceof Date;if(a!==u)return!1;if(a&&u)return e.getTime()===t.getTime();var s=e instanceof RegExp,f=t instanceof RegExp;if(s!==f)return!1;if(s&&f)return e.toString()===t.toString();var d=Object.keys(e);if((r=d.length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!Object.prototype.hasOwnProperty.call(t,d[n]))return!1;for(n=r;0!=n--;)if(!this.deepEquals(e[i=d[n]],t[i]))return!1;return!0}return e!=e&&t!=t}},{key:"resolveFieldData",value:function(e,t){if(e&&Object.keys(e).length&&t){if(this.isFunction(t))return t(e);if(-1===t.indexOf("."))return e[t];for(var n=t.split("."),r=e,i=0,o=n.length;i<o;++i){if(null==r)return null;r=r[n[i]]}return r}return null}},{key:"isFunction",value:function(e){return!!(e&&e.constructor&&e.call&&e.apply)}},{key:"findDiffKeys",value:function(e,t){return e&&t?Object.keys(e).filter((function(e){return!t.hasOwnProperty(e)})).reduce((function(t,n){return t[n]=e[n],t}),{}):{}}},{key:"reorderArray",value:function(e,t,n){var r;if(e&&t!==n){if(n>=e.length)for(r=n-e.length;1+r--;)e.push(void 0);e.splice(n,0,e.splice(t,1)[0])}}},{key:"findIndexInList",value:function(e,t,n){var r=this;return t?t.findIndex(n?function(t){return r.equals(t,e,n)}:function(t){return t===e}):-1}},{key:"getJSXElement",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return this.isFunction(e)?e.apply(void 0,n):e}},{key:"getPropValue",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return this.isFunction(e)?e.apply(void 0,n):e}},{key:"getRefElement",value:function(e){return e?"object"===c(e)&&e.hasOwnProperty("current")?e.current:e:null}},{key:"removeAccents",value:function(e){return e&&e.search(/[\xC0-\xFF]/g)>-1&&(e=e.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),e}},{key:"isEmpty",value:function(e){return null==e||""===e||Array.isArray(e)&&0===e.length||!(e instanceof Date)&&"object"===c(e)&&0===Object.keys(e).length}},{key:"isNotEmpty",value:function(e){return!this.isEmpty(e)}},{key:"sort",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0;return n*(null==e&&null!=t?-1:null!=e&&null==t?1:null==e&&null==t?0:"string"==typeof e&&"string"==typeof t?e.localeCompare(t,r,{numeric:!0}):e<t?-1:e>t?1:0)}}]),e}();function O(){return O=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},O.apply(this,arguments)}function C(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 S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var A=function(){function e(){d(this,e)}return p(e,null,[{key:"getJSXIcon",value:function(e,t,n){var i=null;if(e){var o=c(e),l=f(t.className,"string"===o&&e);if(i=r.default.createElement("span",O({},t,{className:l})),"string"!==o){var a=S({iconProps:t,element:i},n);return E.getJSXElement(e,a)}}return i}}]),e}(),P=0;function j(e){if(Array.isArray(e))return l(e)}function T(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function L(){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 F(e){return j(e)||T(e)||a(e)||L()}var W,H,R,D,I=(W=[],H=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:999,r=D(e,t,n),i=r.value+(r.key===e?0:n)+1;return W.push({key:e,value:i}),i},R=function(e,t){return D(e,t).value},D=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return F(W).reverse().find((function(n){return!!t||n.key===e}))||{key:e,value:n}},{get:function(e){return e&&parseInt(e.style.zIndex,10)||0},set:function(e,t,n,r){t&&(t.style.zIndex=String(H(e,n,r)))},clear:function(e){var t;e&&(t=I.get(e),W=W.filter((function(e){return e.value!==t})),e.style.zIndex="")},getCurrent:function(e,t){return R(e,t)}});return e.ConnectedOverlayScrollHandler=b,e.DomHandler=m,e.EventBus=function(){var e=new Map;return{on:function(t,n){var r=e.get(t);r?r.push(n):r=[n],e.set(t,r)},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){var r=e.get(t);r&&r.slice().forEach((function(e){return e(n)}))}}},e.IconUtils=A,e.ObjectUtils=E,e.UniqueComponentId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"pr_id_";return P++,"".concat(e).concat(P)},e.ZIndexUtils=I,e.classNames=f,e.mask=function(e,t){var n,r,i,o,l,a,u,s,c,f,d,g;t=k(k({},{mask:null,slotChar:"_",autoClear:!0,unmask:!1,readOnly:!1,onComplete:null,onChange:null,onFocus:null,onBlur:null}),t);var p=function(t,n){var r,i,o;if(e.offsetParent&&e===document.activeElement)return"number"!=typeof t?(e.setSelectionRange?(i=e.selectionStart,o=e.selectionEnd):document.selection&&document.selection.createRange&&(o=(i=0-(r=document.selection.createRange()).duplicate().moveStart("character",-1e5))+r.text.length),{begin:i,end:o}):(i=t,o="number"==typeof n?n:i,void(e.setSelectionRange?e.setSelectionRange(i,o):e.createTextRange&&((r=e.createTextRange()).collapse(!0),r.moveEnd("character",o),r.moveStart("character",i),r.select())))},h=function(){for(var e=o;e<=u;e++)if(n[e]&&d[e]===y(e))return!1;return!0},y=function(e){return t.slotChar.charAt(e<t.slotChar.length?e:0)},v=function(){return t.unmask?H():e&&e.value},b=function(e){for(;++e<i&&!n[e];);return e},w=function(e){for(;--e>=0&&!n[e];);return e},x=function(e,t){var r,l;if(!(e<0)){for(r=e,l=b(t);r<i;r++)if(n[r]){if(!(l<i&&n[r].test(d[l])))break;d[r]=d[l],d[l]=y(l),l=b(l)}j(),p(Math.max(o,e))}},E=function(e){var t,r,o,l;for(t=e,r=y(e);t<i;t++)if(n[t]){if(o=b(t),l=d[t],d[t]=r,!(o<i&&n[o].test(l)))break;r=l}},O=function(r){var l=e.value,a=p();if(s&&s.length&&s.length>l.length){for(T(!0);a.begin>0&&!n[a.begin-1];)a.begin--;if(0===a.begin)for(;a.begin<o&&!n[a.begin];)a.begin++;p(a.begin,a.begin)}else{for(T(!0);a.begin<i&&!n[a.begin];)a.begin++;p(a.begin,a.begin)}t.onComplete&&h()&&t.onComplete({originalEvent:r,value:v()})},C=function(n){if(T(),R(n),t.onBlur&&t.onBlur(n),e.value!==c){var r=document.createEvent("HTMLEvents");r.initEvent("change",!0,!1),e.dispatchEvent(r)}},S=function(n){if(!t.readOnly){var r,i,o,l=n.which||n.keyCode,a=/iphone/i.test(m.getUserAgent());s=e.value,8===l||46===l||a&&127===l?((o=(r=p()).end)-(i=r.begin)==0&&(i=46!==l?w(i):o=b(i-1),o=46===l?b(o):o),P(i,o),x(i,o-1),R(n),n.preventDefault()):13===l?(C(n),R(n)):27===l&&(e.value=c,p(0,T()),R(n),n.preventDefault())}},A=function(e){if(!t.readOnly){var r,o,l,a,s=e.which||e.keyCode,c=p();if(!(e.ctrlKey||e.altKey||e.metaKey||s<32)){if(s&&13!==s){if(c.end-c.begin!=0&&(P(c.begin,c.end),x(c.begin,c.end-1)),(r=b(c.begin-1))<i&&(o=String.fromCharCode(s),n[r].test(o))){if(E(r),d[r]=o,j(),l=b(r),/android/i.test(m.getUserAgent())){setTimeout((function(){p(l)}),0)}else p(l);c.begin<=u&&(a=h())}e.preventDefault()}R(e),t.onComplete&&a&&t.onComplete({originalEvent:e,value:v()})}}},P=function(e,t){var r;for(r=e;r<t&&r<i;r++)n[r]&&(d[r]=y(r))},j=function(){e.value=d.join("")},T=function(l){var a,u,s,c=e.value,f=-1;for(a=0,s=0;a<i;a++)if(n[a]){for(d[a]=y(a);s++<c.length;)if(u=c.charAt(s-1),n[a].test(u)){d[a]=u,f=a;break}if(s>c.length){P(a+1,i);break}}else d[a]===c.charAt(s)&&s++,a<r&&(f=a);return l?j():f+1<r?t.autoClear||d.join("")===g?(e.value&&(e.value=""),P(0,i)):j():(j(),e.value=e.value.substring(0,f+1)),r?a:o},L=function(n){var r;t.readOnly||(clearTimeout(f),c=e.value,r=T(),f=setTimeout((function(){e===document.activeElement&&(j(),r===t.mask.replace("?","").length?p(0,r):p(r))}),10),t.onFocus&&t.onFocus(n))},F=function(e){a?O(e):W(e)},W=function(e){if(!t.readOnly){var n=T(!0);p(n),R(e),t.onComplete&&h()&&t.onComplete({originalEvent:e,value:v()})}},H=function(){for(var e=[],t=0;t<d.length;t++){var r=d[t];n[t]&&r!==y(t)&&e.push(r)}return e.join("")},R=function(e){if(t.onChange){var n=v().replace(t.slotChar,"");t.onChange({originalEvent:e,value:g!==n?n:""})}},D=function(){e.addEventListener("focus",L),e.addEventListener("blur",C),e.addEventListener("keydown",S),e.addEventListener("keypress",A),e.addEventListener("input",F),e.addEventListener("paste",W)},I=function(){n=[],r=t.mask.length,i=t.mask.length,o=null,l={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"};var e=m.getUserAgent();a=/chrome/i.test(e)&&/android/i.test(e);for(var s=t.mask.split(""),c=0;c<s.length;c++){var f=s[c];"?"===f?(i--,r=c):l[f]?(n.push(new RegExp(l[f])),null===o&&(o=n.length-1),c<r&&(u=n.length-1)):n.push(null)}d=[];for(var p=0;p<s.length;p++){var h=s[p];"?"!==h&&d.push(l[h]?y(p):h)}g=d.join("")};return e&&t.mask&&(I(),D()),{init:I,bindEvents:D,unbindEvents:function(){e.removeEventListener("focus",L),e.removeEventListener("blur",C),e.removeEventListener("keydown",S),e.removeEventListener("keypress",A),e.removeEventListener("input",F),e.removeEventListener("paste",W)},updateModel:R,getValue:v}},Object.defineProperty(e,"__esModule",{value:!0}),e}({},React);
|
|
@@ -28,6 +28,9 @@ function _defineProperties(target, props) {
|
|
|
28
28
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
29
29
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
30
30
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
31
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
32
|
+
writable: false
|
|
33
|
+
});
|
|
31
34
|
return Constructor;
|
|
32
35
|
}
|
|
33
36
|
|
|
@@ -60,23 +63,20 @@ function _inherits(subClass, superClass) {
|
|
|
60
63
|
configurable: true
|
|
61
64
|
}
|
|
62
65
|
});
|
|
66
|
+
Object.defineProperty(subClass, "prototype", {
|
|
67
|
+
writable: false
|
|
68
|
+
});
|
|
63
69
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
64
70
|
}
|
|
65
71
|
|
|
66
72
|
function _typeof(obj) {
|
|
67
73
|
"@babel/helpers - typeof";
|
|
68
74
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
_typeof = function _typeof(obj) {
|
|
75
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
return _typeof(obj);
|
|
75
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
76
|
+
return typeof obj;
|
|
77
|
+
} : function (obj) {
|
|
78
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
79
|
+
}, _typeof(obj);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
function _possibleConstructorReturn(self, call) {
|
|
@@ -111,9 +111,9 @@ function _defineProperty(obj, key, value) {
|
|
|
111
111
|
return obj;
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
114
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
115
115
|
|
|
116
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
116
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
117
117
|
|
|
118
118
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
119
119
|
|
|
@@ -171,7 +171,10 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
171
171
|
var isBoth = this.isBoth();
|
|
172
172
|
var isHorizontal = this.isHorizontal();
|
|
173
173
|
var first = this.state.first;
|
|
174
|
-
|
|
174
|
+
|
|
175
|
+
var _this$calculateNumIte = this.calculateNumItems(),
|
|
176
|
+
numToleratedItems = _this$calculateNumIte.numToleratedItems;
|
|
177
|
+
|
|
175
178
|
var itemSize = this.props.itemSize;
|
|
176
179
|
var contentPos = this.getContentPosition();
|
|
177
180
|
|
|
@@ -364,13 +367,10 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
364
367
|
return this.props.orientation === 'both';
|
|
365
368
|
}
|
|
366
369
|
}, {
|
|
367
|
-
key: "
|
|
368
|
-
value: function
|
|
369
|
-
var _this4 = this;
|
|
370
|
-
|
|
370
|
+
key: "calculateNumItems",
|
|
371
|
+
value: function calculateNumItems() {
|
|
371
372
|
var isBoth = this.isBoth();
|
|
372
373
|
var isHorizontal = this.isHorizontal();
|
|
373
|
-
var first = this.state.first;
|
|
374
374
|
var itemSize = this.props.itemSize;
|
|
375
375
|
var contentPos = this.getContentPosition();
|
|
376
376
|
var contentWidth = this.el ? this.el.offsetWidth - contentPos.left : 0;
|
|
@@ -389,6 +389,22 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
389
389
|
cols: calculateNumItemsInViewport(contentWidth, itemSize[1])
|
|
390
390
|
} : calculateNumItemsInViewport(isHorizontal ? contentWidth : contentHeight, itemSize);
|
|
391
391
|
var numToleratedItems = this.state.numToleratedItems || (isBoth ? [calculateNumToleratedItems(numItemsInViewport.rows), calculateNumToleratedItems(numItemsInViewport.cols)] : calculateNumToleratedItems(numItemsInViewport));
|
|
392
|
+
return {
|
|
393
|
+
numItemsInViewport: numItemsInViewport,
|
|
394
|
+
numToleratedItems: numToleratedItems
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
}, {
|
|
398
|
+
key: "calculateOptions",
|
|
399
|
+
value: function calculateOptions() {
|
|
400
|
+
var _this4 = this;
|
|
401
|
+
|
|
402
|
+
var isBoth = this.isBoth();
|
|
403
|
+
var first = this.state.first;
|
|
404
|
+
|
|
405
|
+
var _this$calculateNumIte2 = this.calculateNumItems(),
|
|
406
|
+
numItemsInViewport = _this$calculateNumIte2.numItemsInViewport,
|
|
407
|
+
numToleratedItems = _this$calculateNumIte2.numToleratedItems;
|
|
392
408
|
|
|
393
409
|
var calculateLast = function calculateLast(_first, _num, _numT, _isCols) {
|
|
394
410
|
return _this4.getLast(_first + _num + (_first < _numT ? 2 : 3) * _numT, _isCols);
|
|
@@ -577,7 +593,7 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
577
593
|
};
|
|
578
594
|
|
|
579
595
|
var calculateFirst = function calculateFirst(_currentIndex, _triggerIndex, _first, _last, _num, _numT, _isScrollDownOrRight) {
|
|
580
|
-
if (_currentIndex <= _numT) return 0;else return _isScrollDownOrRight ? _currentIndex < _triggerIndex ? _first : _currentIndex - _numT : _currentIndex > _triggerIndex ? _first : _currentIndex - 2 * _numT;
|
|
596
|
+
if (_currentIndex <= _numT) return 0;else return Math.max(0, _isScrollDownOrRight ? _currentIndex < _triggerIndex ? _first : _currentIndex - _numT : _currentIndex > _triggerIndex ? _first : _currentIndex - 2 * _numT);
|
|
581
597
|
};
|
|
582
598
|
|
|
583
599
|
var calculateLast = function calculateLast(_currentIndex, _first, _last, _num, _numT, _isCols) {
|
|
@@ -749,6 +765,16 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
749
765
|
|
|
750
766
|
return [];
|
|
751
767
|
}
|
|
768
|
+
}, {
|
|
769
|
+
key: "isPropChanged",
|
|
770
|
+
value: function isPropChanged(prevProps) {
|
|
771
|
+
var _this12 = this;
|
|
772
|
+
|
|
773
|
+
var props = ['itemSize', 'scrollHeight'];
|
|
774
|
+
return props.some(function (p) {
|
|
775
|
+
return !utils.ObjectUtils.equals(prevProps[p], _this12.props[p]);
|
|
776
|
+
});
|
|
777
|
+
}
|
|
752
778
|
}, {
|
|
753
779
|
key: "init",
|
|
754
780
|
value: function init() {
|
|
@@ -764,7 +790,7 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
764
790
|
}, {
|
|
765
791
|
key: "componentDidUpdate",
|
|
766
792
|
value: function componentDidUpdate(prevProps, prevState) {
|
|
767
|
-
if (!
|
|
793
|
+
if (!prevProps.items || prevProps.items.length !== (this.props.items || []).length || this.isPropChanged(prevProps)) {
|
|
768
794
|
this.init();
|
|
769
795
|
}
|
|
770
796
|
|
|
@@ -794,7 +820,7 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
794
820
|
}, {
|
|
795
821
|
key: "renderLoader",
|
|
796
822
|
value: function renderLoader() {
|
|
797
|
-
var
|
|
823
|
+
var _this13 = this;
|
|
798
824
|
|
|
799
825
|
if (!this.props.loaderDisabled && this.props.showLoader && this.state.loading) {
|
|
800
826
|
var className = utils.classNames('p-virtualscroller-loader', {
|
|
@@ -808,7 +834,7 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
808
834
|
var isBoth = this.isBoth();
|
|
809
835
|
var numItemsInViewport = this.state.numItemsInViewport;
|
|
810
836
|
content = this.state.loaderArr.map(function (_, index) {
|
|
811
|
-
return
|
|
837
|
+
return _this13.renderLoaderItem(index, isBoth && {
|
|
812
838
|
numCols: numItemsInViewport.cols
|
|
813
839
|
});
|
|
814
840
|
});
|
|
@@ -824,12 +850,12 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
824
850
|
}, {
|
|
825
851
|
key: "renderSpacer",
|
|
826
852
|
value: function renderSpacer() {
|
|
827
|
-
var
|
|
853
|
+
var _this14 = this;
|
|
828
854
|
|
|
829
855
|
if (this.props.showSpacer) {
|
|
830
856
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
831
857
|
ref: function ref(el) {
|
|
832
|
-
return
|
|
858
|
+
return _this14.spacer = el;
|
|
833
859
|
},
|
|
834
860
|
className: "p-virtualscroller-spacer"
|
|
835
861
|
});
|
|
@@ -849,16 +875,16 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
849
875
|
}, {
|
|
850
876
|
key: "renderItems",
|
|
851
877
|
value: function renderItems(loadedItems) {
|
|
852
|
-
var
|
|
878
|
+
var _this15 = this;
|
|
853
879
|
|
|
854
880
|
return loadedItems.map(function (item, index) {
|
|
855
|
-
return
|
|
881
|
+
return _this15.renderItem(item, index);
|
|
856
882
|
});
|
|
857
883
|
}
|
|
858
884
|
}, {
|
|
859
885
|
key: "renderContent",
|
|
860
886
|
value: function renderContent() {
|
|
861
|
-
var
|
|
887
|
+
var _this16 = this;
|
|
862
888
|
|
|
863
889
|
var loadedItems = this.loadedItems();
|
|
864
890
|
var items = this.renderItems(loadedItems);
|
|
@@ -868,7 +894,7 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
868
894
|
var content = /*#__PURE__*/React__default["default"].createElement("div", {
|
|
869
895
|
className: className,
|
|
870
896
|
ref: function ref(el) {
|
|
871
|
-
return
|
|
897
|
+
return _this16.content = el;
|
|
872
898
|
}
|
|
873
899
|
}, items);
|
|
874
900
|
|
|
@@ -876,24 +902,24 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
876
902
|
var defaultOptions = {
|
|
877
903
|
className: className,
|
|
878
904
|
contentRef: function contentRef(el) {
|
|
879
|
-
return
|
|
905
|
+
return _this16.content = el;
|
|
880
906
|
},
|
|
881
907
|
spacerRef: function spacerRef(el) {
|
|
882
|
-
return
|
|
908
|
+
return _this16.spacer = el;
|
|
883
909
|
},
|
|
884
910
|
stickyRef: function stickyRef(el) {
|
|
885
|
-
return
|
|
911
|
+
return _this16.sticky = el;
|
|
886
912
|
},
|
|
887
913
|
items: loadedItems,
|
|
888
914
|
getItemOptions: function getItemOptions(index) {
|
|
889
|
-
return
|
|
915
|
+
return _this16.getOptions(index);
|
|
890
916
|
},
|
|
891
917
|
children: items,
|
|
892
918
|
element: content,
|
|
893
919
|
props: this.props,
|
|
894
920
|
loading: this.state.loading,
|
|
895
921
|
getLoaderOptions: function getLoaderOptions(index, ext) {
|
|
896
|
-
return
|
|
922
|
+
return _this16.loaderOptions(index, ext);
|
|
897
923
|
},
|
|
898
924
|
loadingTemplate: this.props.loadingTemplate,
|
|
899
925
|
itemSize: this.props.itemSize,
|
|
@@ -911,7 +937,7 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
911
937
|
}, {
|
|
912
938
|
key: "render",
|
|
913
939
|
value: function render() {
|
|
914
|
-
var
|
|
940
|
+
var _this17 = this;
|
|
915
941
|
|
|
916
942
|
if (this.props.disabled) {
|
|
917
943
|
var content = utils.ObjectUtils.getJSXElement(this.props.contentTemplate, {
|
|
@@ -934,7 +960,7 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
934
960
|
var spacer = this.renderSpacer();
|
|
935
961
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
936
962
|
ref: function ref(el) {
|
|
937
|
-
return
|
|
963
|
+
return _this17.el = el;
|
|
938
964
|
},
|
|
939
965
|
className: className,
|
|
940
966
|
tabIndex: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("primereact/utils");function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var s=o(t);function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var o=0;o<e.length;o++){var s=e[o];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}function n(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function l(t,e){return l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},l(t,e)}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function u(t,e){if(e&&("object"===c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return n(t)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function f(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,s)}return o}function d(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?f(Object(o),!0).forEach((function(e){p(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):f(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function m(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}var v=function(o){a(y,t.Component);var l,c,p,f,v,g=(l=y,c=m(),function(){var t,e=h(l);if(c){var o=h(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return u(this,t)});function y(t){var e;r(this,y);var o=(e=g.call(this,t)).isBoth();return e.state={first:o?{rows:0,cols:0}:0,last:o?{rows:0,cols:0}:0,numItemsInViewport:o?{rows:0,cols:0}:0,numToleratedItems:t.numToleratedItems,loading:t.loading,loaderArr:[]},e.onScroll=e.onScroll.bind(n(e)),e.lastScrollPos=o?{top:0,left:0}:0,e}return p=y,f=[{key:"scrollTo",value:function(t){this.el&&this.el.scrollTo(t)}},{key:"scrollToIndex",value:function(t){var e=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto",s=this.isBoth(),r=this.isHorizontal(),i=this.state.first,n=this.state.numToleratedItems,l=this.props.itemSize,a=this.getContentPosition(),c=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;return t<=e?0:t},u=function(t,e,o){return t*e+o},h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.scrollTo({left:t,top:s,behavior:o})};if(s){var p={rows:c(t[0],n[0]),cols:c(t[1],n[1])};p.rows===i.rows&&p.cols===i.cols||(h(u(p.cols,l[1],a.left),u(p.rows,l[0],a.top)),this.setState({first:p}))}else{var f=c(t,n);f!==i&&(r?h(u(f,l,a.left),0):h(0,u(f,l,a.top)),this.setState({first:f}))}}},{key:"scrollInView",value:function(t,e){var o=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"auto";if(e){var r=this.isBoth(),i=this.isHorizontal(),n=this.getRenderedRange(),l=n.first,a=n.viewport,c=this.props.itemSize,u=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return o.scrollTo({left:t,top:e,behavior:s})},h="to-start"===e,p="to-end"===e;if(h){if(r)a.first.rows-l.rows>t[0]?u(a.first.cols*c,(a.first.rows-1)*c):a.first.cols-l.cols>t[1]&&u((a.first.cols-1)*c,a.first.rows*c);else if(a.first-l>t){var f=(a.first-1)*c;i?u(f,0):u(0,f)}}else if(p)if(r)a.last.rows-l.rows<=t[0]+1?u(a.first.cols*c,(a.first.rows+1)*c):a.last.cols-l.cols<=t[1]+1&&u((a.first.cols+1)*c,a.first.rows*c);else if(a.last-l<=t+1){var d=(a.first+1)*c;i?u(d,0):u(0,d)}}else this.scrollToIndex(t,s)}},{key:"getRows",value:function(){return this.state.loading?this.props.loaderDisabled?this.state.loaderArr:[]:this.loadedItems()}},{key:"getColumns",value:function(){if(this.props.columns){var t=this.isBoth(),e=this.isHorizontal();if(t||e)return this.state.loading&&this.props.loaderDisabled?t?this.state.loaderArr[0]:this.state.loaderArr:this.props.columns.slice(t?this.state.first.cols:this.state.first,t?this.state.last.cols:this.state.last)}return this.props.columns}},{key:"getRenderedRange",value:function(){var t=this.isBoth(),e=this.isHorizontal(),o=this.state,s=o.first,r=o.last,i=o.numItemsInViewport,n=this.props.itemSize,l=function(t,e){return Math.floor(t/(e||t))},a=s,c=0;if(this.el){var u=this.el.scrollTop,h=this.el.scrollLeft;c=t?{rows:(a={rows:l(u,n[0]),cols:l(h,n[1])}).rows+i.rows,cols:a.cols+i.cols}:(a=l(e?h:u,n))+i}return{first:s,last:r,viewport:{first:a,last:c}}}},{key:"isVertical",value:function(){return"vertical"===this.props.orientation}},{key:"isHorizontal",value:function(){return"horizontal"===this.props.orientation}},{key:"isBoth",value:function(){return"both"===this.props.orientation}},{key:"calculateOptions",value:function(){var t=this,e=this.isBoth(),o=this.isHorizontal(),s=this.state.first,r=this.props.itemSize,i=this.getContentPosition(),n=this.el?this.el.offsetWidth-i.left:0,l=this.el?this.el.offsetHeight-i.top:0,a=function(t,e){return Math.ceil(t/(e||t))},c=function(t){return Math.ceil(t/2)},u=e?{rows:a(l,r[0]),cols:a(n,r[1])}:a(o?n:l,r),h=this.state.numToleratedItems||(e?[c(u.rows),c(u.cols)]:c(u)),p=function(e,o,s,r){return t.getLast(e+o+(e<s?2:3)*s,r)},f=e?{rows:p(s.rows,u.rows,h[0]),cols:p(s.cols,u.cols,h[1],!0)}:p(s,u,h),d={numItemsInViewport:u,last:f,numToleratedItems:h};this.props.showLoader&&(d.loaderArr=e?Array.from({length:u.rows}).map((function(){return Array.from({length:u.cols})})):Array.from({length:u})),this.setState(d,(function(){t.props.lazy&&t.props.onLazyLoad&&t.props.onLazyLoad({first:t.state.first,last:t.state.last})}))}},{key:"getLast",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;return this.props.items?Math.min(e?(this.props.columns||this.props.items[0]).length:this.props.items.length,t):0}},{key:"getContentPosition",value:function(){if(this.content){var t=getComputedStyle(this.content),e=parseInt(t.paddingLeft,10)+Math.max(parseInt(t.left,10),0),o=parseInt(t.paddingRight,10)+Math.max(parseInt(t.right,10),0),s=parseInt(t.paddingTop,10)+Math.max(parseInt(t.top,10),0),r=parseInt(t.paddingBottom,10)+Math.max(parseInt(t.bottom,10),0);return{left:e,right:o,top:s,bottom:r,x:e+o,y:s+r}}return{left:0,right:0,top:0,bottom:0,x:0,y:0}}},{key:"setSize",value:function(){var t=this;if(this.el){var e=this.isBoth(),o=this.isHorizontal(),s=this.el.parentElement,r=this.props.scrollWidth||"".concat(this.el.offsetWidth||s.offsetWidth,"px"),i=this.props.scrollHeight||"".concat(this.el.offsetHeight||s.offsetHeight,"px"),n=function(e,o){return t.el.style[e]=o};e||o?(n("height",i),n("width",r)):n("height",i)}}},{key:"setSpacerSize",value:function(){var t=this,e=this.props.items;if(this.spacer&&e){var o=this.isBoth(),s=this.isHorizontal(),r=this.props.itemSize,i=this.getContentPosition(),n=function(e,o,s){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return t.spacer.style[e]=(o||[]).length*s+r+"px"};o?(n("height",e,r[0],i.y),n("width",this.props.columns||e[1],r[1],i.x)):s?n("width",this.props.columns||e,r,i.x):n("height",e,r,i.y)}}},{key:"setContentPosition",value:function(t){var e=this;if(this.content){var o=this.isBoth(),s=this.isHorizontal(),r=t?t.first:this.state.first,i=this.props.itemSize,n=function(t,e){return t*e},l=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;e.sticky&&(e.sticky.style.top="-".concat(o,"px")),e.content.style.transform="translate3d(".concat(t,"px, ").concat(o,"px, 0)")};if(o)l(n(r.cols,i[1]),n(r.rows,i[0]));else{var a=n(r,i);s?l(a,0):l(0,a)}}}},{key:"onScrollPositionChange",value:function(t){var e=this,o=t.target,s=this.isBoth(),r=this.isHorizontal(),i=this.state,n=i.first,l=i.last,a=i.numItemsInViewport,c=i.numToleratedItems,u=this.props.itemSize,h=this.getContentPosition(),p=function(t,e){return t?t>e?t-e:t:0},f=function(t,e){return Math.floor(t/(e||t))},d=function(t,e,o,s,r,i){return t<=r?r:i?o-s-r:e+r-1},m=function(t,e,o,s,r,i,n){return t<=i?0:n?t<e?o:t-i:t>e?o:t-2*i},v=function(t,o,s,r,i,n){var l=o+r+2*i;return t>=i&&(l+=i+1),e.getLast(l,n)},g=p(o.scrollTop,h.top),y=p(o.scrollLeft,h.left),w=0,S=l,b=!1;if(s){var O=this.lastScrollPos.top<=g,z=this.lastScrollPos.left<=y,I={rows:f(g,u[0]),cols:f(y,u[1])},k={rows:d(I.rows,n.rows,l.rows,a.rows,c[0],O),cols:d(I.cols,n.cols,l.cols,a.cols,c[1],z)};w={rows:m(I.rows,k.rows,n.rows,0,0,c[0],O),cols:m(I.cols,k.cols,n.cols,0,0,c[1],z)},S={rows:v(I.rows,w.rows,0,a.rows,c[0]),cols:v(I.cols,w.cols,0,a.cols,c[1],!0)},b=w.rows!==n.rows&&S.rows!==l.rows||w.cols!==n.cols&&S.cols!==l.cols,this.lastScrollPos={top:g,left:y}}else{var T=r?y:g,P=this.lastScrollPos<=T,j=f(T,u);S=v(j,w=m(j,d(j,n,l,a,c,P),n,0,0,c,P),0,a,c),b=w!==n&&S!==l,this.lastScrollPos=T}return{first:w,last:S,isRangeChanged:b}}},{key:"onScrollChange",value:function(t){var e=this,o=this.onScrollPositionChange(t);if(o.isRangeChanged){var s={first:o.first,last:o.last};this.setContentPosition(s),this.setState(s,(function(){e.props.onScrollIndexChange&&e.props.onScrollIndexChange(s),e.props.lazy&&e.props.onLazyLoad&&e.props.onLazyLoad(s)}))}}},{key:"onScroll",value:function(t){var e=this;this.props.onScroll&&this.props.onScroll(t),this.props.delay?(this.scrollTimeout&&clearTimeout(this.scrollTimeout),!this.state.loading&&this.props.showLoader&&this.onScrollPositionChange(t).isRangeChanged&&this.setState({loading:!0}),this.scrollTimeout=setTimeout((function(){e.onScrollChange(t),e.state.loading&&e.props.showLoader&&!e.props.lazy&&e.setState({loading:!1})}),this.props.delay)):this.onScrollChange(t)}},{key:"getOptions",value:function(t){var e=this.state.first,o=(this.props.items||[]).length,s=this.isBoth()?e.rows+t:e+t;return{index:s,count:o,first:0===s,last:s===o-1,even:s%2==0,odd:s%2!=0,props:this.props}}},{key:"loaderOptions",value:function(t,e){var o=this.state.loaderArr.length;return d({index:t,count:o,first:0===t,last:t===o-1,even:t%2==0,odd:t%2!=0,props:this.props},e)}},{key:"loadedItems",value:function(){var t=this,e=this.props.items;if(e&&!this.state.loading){var o=this.isBoth(),s=this.isHorizontal(),r=this.state,i=r.first,n=r.last;return o?e.slice(i.rows,n.rows).map((function(e){return t.props.columns?e:e.slice(i.cols,n.cols)})):s&&this.props.columns?e:e.slice(i,n)}return[]}},{key:"init",value:function(){this.setSize(),this.calculateOptions(),this.setSpacerSize()}},{key:"componentDidMount",value:function(){this.init()}},{key:"componentDidUpdate",value:function(t,o){e.ObjectUtils.equals(t.itemSize,this.props.itemSize)&&t.items&&t.items.length===(this.props.items||[]).length||this.init(),this.props.lazy&&t.loading!==this.props.loading&&this.state.loading!==this.props.loading&&this.setState({loading:this.props.loading}),t.orientation!==this.props.orientation&&(this.lastScrollPos=this.isBoth()?{top:0,left:0}:0)}},{key:"renderLoaderItem",value:function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.loaderOptions(t,o),i=e.ObjectUtils.getJSXElement(this.props.loadingTemplate,r);return s.default.createElement(s.default.Fragment,{key:t},i)}},{key:"renderLoader",value:function(){var t=this;if(!this.props.loaderDisabled&&this.props.showLoader&&this.state.loading){var o=e.classNames("p-virtualscroller-loader",{"p-component-overlay":!this.props.loadingTemplate}),r=s.default.createElement("i",{className:"p-virtualscroller-loading-icon pi pi-spinner pi-spin"});if(this.props.loadingTemplate){var i=this.isBoth(),n=this.state.numItemsInViewport;r=this.state.loaderArr.map((function(e,o){return t.renderLoaderItem(o,i&&{numCols:n.cols})}))}return s.default.createElement("div",{className:o},r)}return null}},{key:"renderSpacer",value:function(){var t=this;return this.props.showSpacer?s.default.createElement("div",{ref:function(e){return t.spacer=e},className:"p-virtualscroller-spacer"}):null}},{key:"renderItem",value:function(t,o){var r=this.getOptions(o),i=e.ObjectUtils.getJSXElement(this.props.itemTemplate,t,r);return s.default.createElement(s.default.Fragment,{key:r.index},i)}},{key:"renderItems",value:function(t){var e=this;return t.map((function(t,o){return e.renderItem(t,o)}))}},{key:"renderContent",value:function(){var t=this,o=this.loadedItems(),r=this.renderItems(o),i=e.classNames("p-virtualscroller-content",{"p-virtualscroller-loading":this.state.loading}),n=s.default.createElement("div",{className:i,ref:function(e){return t.content=e}},r);if(this.props.contentTemplate){var l={className:i,contentRef:function(e){return t.content=e},spacerRef:function(e){return t.spacer=e},stickyRef:function(e){return t.sticky=e},items:o,getItemOptions:function(e){return t.getOptions(e)},children:r,element:n,props:this.props,loading:this.state.loading,getLoaderOptions:function(e,o){return t.loaderOptions(e,o)},loadingTemplate:this.props.loadingTemplate,itemSize:this.props.itemSize,rows:this.getRows(),columns:this.getColumns(),vertical:this.isVertical(),horizontal:this.isHorizontal(),both:this.isBoth()};return e.ObjectUtils.getJSXElement(this.props.contentTemplate,l)}return n}},{key:"render",value:function(){var t=this;if(this.props.disabled){var o=e.ObjectUtils.getJSXElement(this.props.contentTemplate,{items:this.props.items,rows:this.props.items,columns:this.props.columns});return s.default.createElement(s.default.Fragment,null,this.props.children,o)}var r=this.isBoth(),i=this.isHorizontal(),n=e.classNames("p-virtualscroller",{"p-both-scroll":r,"p-horizontal-scroll":i},this.props.className),l=this.renderLoader(),a=this.renderContent(),c=this.renderSpacer();return s.default.createElement("div",{ref:function(e){return t.el=e},className:n,tabIndex:0,style:this.props.style,onScroll:this.onScroll},a,c,l)}}],f&&i(p.prototype,f),v&&i(p,v),y}();p(v,"defaultProps",{id:null,style:null,className:null,items:null,itemSize:0,scrollHeight:null,scrollWidth:null,orientation:"vertical",numToleratedItems:null,delay:0,lazy:!1,disabled:!1,loaderDisabled:!1,columns:null,loading:!1,showSpacer:!0,showLoader:!1,loadingTemplate:null,itemTemplate:null,contentTemplate:null,onScroll:null,onScrollIndexChange:null,onLazyLoad:null}),exports.VirtualScroller=v;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("primereact/utils");function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var s=o(t);function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var o=0;o<e.length;o++){var s=e[o];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}function n(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function l(t,e){return l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},l(t,e)}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function u(t,e){if(e&&("object"===c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return n(t)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function f(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,s)}return o}function d(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?f(Object(o),!0).forEach((function(e){p(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):f(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function m(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}var v=function(o){a(y,t.Component);var l,c,p,f,v,g=(l=y,c=m(),function(){var t,e=h(l);if(c){var o=h(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return u(this,t)});function y(t){var e;r(this,y);var o=(e=g.call(this,t)).isBoth();return e.state={first:o?{rows:0,cols:0}:0,last:o?{rows:0,cols:0}:0,numItemsInViewport:o?{rows:0,cols:0}:0,numToleratedItems:t.numToleratedItems,loading:t.loading,loaderArr:[]},e.onScroll=e.onScroll.bind(n(e)),e.lastScrollPos=o?{top:0,left:0}:0,e}return p=y,f=[{key:"scrollTo",value:function(t){this.el&&this.el.scrollTo(t)}},{key:"scrollToIndex",value:function(t){var e=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto",s=this.isBoth(),r=this.isHorizontal(),i=this.state.first,n=this.calculateNumItems(),l=n.numToleratedItems,a=this.props.itemSize,c=this.getContentPosition(),u=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;return t<=e?0:t},h=function(t,e,o){return t*e+o},p=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.scrollTo({left:t,top:s,behavior:o})};if(s){var f={rows:u(t[0],l[0]),cols:u(t[1],l[1])};f.rows===i.rows&&f.cols===i.cols||(p(h(f.cols,a[1],c.left),h(f.rows,a[0],c.top)),this.setState({first:f}))}else{var d=u(t,l);d!==i&&(r?p(h(d,a,c.left),0):p(0,h(d,a,c.top)),this.setState({first:d}))}}},{key:"scrollInView",value:function(t,e){var o=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"auto";if(e){var r=this.isBoth(),i=this.isHorizontal(),n=this.getRenderedRange(),l=n.first,a=n.viewport,c=this.props.itemSize,u=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return o.scrollTo({left:t,top:e,behavior:s})},h="to-start"===e,p="to-end"===e;if(h){if(r)a.first.rows-l.rows>t[0]?u(a.first.cols*c,(a.first.rows-1)*c):a.first.cols-l.cols>t[1]&&u((a.first.cols-1)*c,a.first.rows*c);else if(a.first-l>t){var f=(a.first-1)*c;i?u(f,0):u(0,f)}}else if(p)if(r)a.last.rows-l.rows<=t[0]+1?u(a.first.cols*c,(a.first.rows+1)*c):a.last.cols-l.cols<=t[1]+1&&u((a.first.cols+1)*c,a.first.rows*c);else if(a.last-l<=t+1){var d=(a.first+1)*c;i?u(d,0):u(0,d)}}else this.scrollToIndex(t,s)}},{key:"getRows",value:function(){return this.state.loading?this.props.loaderDisabled?this.state.loaderArr:[]:this.loadedItems()}},{key:"getColumns",value:function(){if(this.props.columns){var t=this.isBoth(),e=this.isHorizontal();if(t||e)return this.state.loading&&this.props.loaderDisabled?t?this.state.loaderArr[0]:this.state.loaderArr:this.props.columns.slice(t?this.state.first.cols:this.state.first,t?this.state.last.cols:this.state.last)}return this.props.columns}},{key:"getRenderedRange",value:function(){var t=this.isBoth(),e=this.isHorizontal(),o=this.state,s=o.first,r=o.last,i=o.numItemsInViewport,n=this.props.itemSize,l=function(t,e){return Math.floor(t/(e||t))},a=s,c=0;if(this.el){var u=this.el.scrollTop,h=this.el.scrollLeft;c=t?{rows:(a={rows:l(u,n[0]),cols:l(h,n[1])}).rows+i.rows,cols:a.cols+i.cols}:(a=l(e?h:u,n))+i}return{first:s,last:r,viewport:{first:a,last:c}}}},{key:"isVertical",value:function(){return"vertical"===this.props.orientation}},{key:"isHorizontal",value:function(){return"horizontal"===this.props.orientation}},{key:"isBoth",value:function(){return"both"===this.props.orientation}},{key:"calculateNumItems",value:function(){var t=this.isBoth(),e=this.isHorizontal(),o=this.props.itemSize,s=this.getContentPosition(),r=this.el?this.el.offsetWidth-s.left:0,i=this.el?this.el.offsetHeight-s.top:0,n=function(t,e){return Math.ceil(t/(e||t))},l=function(t){return Math.ceil(t/2)},a=t?{rows:n(i,o[0]),cols:n(r,o[1])}:n(e?r:i,o);return{numItemsInViewport:a,numToleratedItems:this.state.numToleratedItems||(t?[l(a.rows),l(a.cols)]:l(a))}}},{key:"calculateOptions",value:function(){var t=this,e=this.isBoth(),o=this.state.first,s=this.calculateNumItems(),r=s.numItemsInViewport,i=s.numToleratedItems,n=function(e,o,s,r){return t.getLast(e+o+(e<s?2:3)*s,r)},l=e?{rows:n(o.rows,r.rows,i[0]),cols:n(o.cols,r.cols,i[1],!0)}:n(o,r,i),a={numItemsInViewport:r,last:l,numToleratedItems:i};this.props.showLoader&&(a.loaderArr=e?Array.from({length:r.rows}).map((function(){return Array.from({length:r.cols})})):Array.from({length:r})),this.setState(a,(function(){t.props.lazy&&t.props.onLazyLoad&&t.props.onLazyLoad({first:t.state.first,last:t.state.last})}))}},{key:"getLast",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;return this.props.items?Math.min(e?(this.props.columns||this.props.items[0]).length:this.props.items.length,t):0}},{key:"getContentPosition",value:function(){if(this.content){var t=getComputedStyle(this.content),e=parseInt(t.paddingLeft,10)+Math.max(parseInt(t.left,10),0),o=parseInt(t.paddingRight,10)+Math.max(parseInt(t.right,10),0),s=parseInt(t.paddingTop,10)+Math.max(parseInt(t.top,10),0),r=parseInt(t.paddingBottom,10)+Math.max(parseInt(t.bottom,10),0);return{left:e,right:o,top:s,bottom:r,x:e+o,y:s+r}}return{left:0,right:0,top:0,bottom:0,x:0,y:0}}},{key:"setSize",value:function(){var t=this;if(this.el){var e=this.isBoth(),o=this.isHorizontal(),s=this.el.parentElement,r=this.props.scrollWidth||"".concat(this.el.offsetWidth||s.offsetWidth,"px"),i=this.props.scrollHeight||"".concat(this.el.offsetHeight||s.offsetHeight,"px"),n=function(e,o){return t.el.style[e]=o};e||o?(n("height",i),n("width",r)):n("height",i)}}},{key:"setSpacerSize",value:function(){var t=this,e=this.props.items;if(this.spacer&&e){var o=this.isBoth(),s=this.isHorizontal(),r=this.props.itemSize,i=this.getContentPosition(),n=function(e,o,s){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return t.spacer.style[e]=(o||[]).length*s+r+"px"};o?(n("height",e,r[0],i.y),n("width",this.props.columns||e[1],r[1],i.x)):s?n("width",this.props.columns||e,r,i.x):n("height",e,r,i.y)}}},{key:"setContentPosition",value:function(t){var e=this;if(this.content){var o=this.isBoth(),s=this.isHorizontal(),r=t?t.first:this.state.first,i=this.props.itemSize,n=function(t,e){return t*e},l=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;e.sticky&&(e.sticky.style.top="-".concat(o,"px")),e.content.style.transform="translate3d(".concat(t,"px, ").concat(o,"px, 0)")};if(o)l(n(r.cols,i[1]),n(r.rows,i[0]));else{var a=n(r,i);s?l(a,0):l(0,a)}}}},{key:"onScrollPositionChange",value:function(t){var e=this,o=t.target,s=this.isBoth(),r=this.isHorizontal(),i=this.state,n=i.first,l=i.last,a=i.numItemsInViewport,c=i.numToleratedItems,u=this.props.itemSize,h=this.getContentPosition(),p=function(t,e){return t?t>e?t-e:t:0},f=function(t,e){return Math.floor(t/(e||t))},d=function(t,e,o,s,r,i){return t<=r?r:i?o-s-r:e+r-1},m=function(t,e,o,s,r,i,n){return t<=i?0:Math.max(0,n?t<e?o:t-i:t>e?o:t-2*i)},v=function(t,o,s,r,i,n){var l=o+r+2*i;return t>=i&&(l+=i+1),e.getLast(l,n)},g=p(o.scrollTop,h.top),y=p(o.scrollLeft,h.left),w=0,b=l,S=!1;if(s){var I=this.lastScrollPos.top<=g,O=this.lastScrollPos.left<=y,k={rows:f(g,u[0]),cols:f(y,u[1])},z={rows:d(k.rows,n.rows,l.rows,a.rows,c[0],I),cols:d(k.cols,n.cols,l.cols,a.cols,c[1],O)};w={rows:m(k.rows,z.rows,n.rows,0,0,c[0],I),cols:m(k.cols,z.cols,n.cols,0,0,c[1],O)},b={rows:v(k.rows,w.rows,0,a.rows,c[0]),cols:v(k.cols,w.cols,0,a.cols,c[1],!0)},S=w.rows!==n.rows&&b.rows!==l.rows||w.cols!==n.cols&&b.cols!==l.cols,this.lastScrollPos={top:g,left:y}}else{var P=r?y:g,T=this.lastScrollPos<=P,j=f(P,u);b=v(j,w=m(j,d(j,n,l,a,c,T),n,0,0,c,T),0,a,c),S=w!==n&&b!==l,this.lastScrollPos=P}return{first:w,last:b,isRangeChanged:S}}},{key:"onScrollChange",value:function(t){var e=this,o=this.onScrollPositionChange(t);if(o.isRangeChanged){var s={first:o.first,last:o.last};this.setContentPosition(s),this.setState(s,(function(){e.props.onScrollIndexChange&&e.props.onScrollIndexChange(s),e.props.lazy&&e.props.onLazyLoad&&e.props.onLazyLoad(s)}))}}},{key:"onScroll",value:function(t){var e=this;this.props.onScroll&&this.props.onScroll(t),this.props.delay?(this.scrollTimeout&&clearTimeout(this.scrollTimeout),!this.state.loading&&this.props.showLoader&&this.onScrollPositionChange(t).isRangeChanged&&this.setState({loading:!0}),this.scrollTimeout=setTimeout((function(){e.onScrollChange(t),e.state.loading&&e.props.showLoader&&!e.props.lazy&&e.setState({loading:!1})}),this.props.delay)):this.onScrollChange(t)}},{key:"getOptions",value:function(t){var e=this.state.first,o=(this.props.items||[]).length,s=this.isBoth()?e.rows+t:e+t;return{index:s,count:o,first:0===s,last:s===o-1,even:s%2==0,odd:s%2!=0,props:this.props}}},{key:"loaderOptions",value:function(t,e){var o=this.state.loaderArr.length;return d({index:t,count:o,first:0===t,last:t===o-1,even:t%2==0,odd:t%2!=0,props:this.props},e)}},{key:"loadedItems",value:function(){var t=this,e=this.props.items;if(e&&!this.state.loading){var o=this.isBoth(),s=this.isHorizontal(),r=this.state,i=r.first,n=r.last;return o?e.slice(i.rows,n.rows).map((function(e){return t.props.columns?e:e.slice(i.cols,n.cols)})):s&&this.props.columns?e:e.slice(i,n)}return[]}},{key:"isPropChanged",value:function(t){var o=this;return["itemSize","scrollHeight"].some((function(s){return!e.ObjectUtils.equals(t[s],o.props[s])}))}},{key:"init",value:function(){this.setSize(),this.calculateOptions(),this.setSpacerSize()}},{key:"componentDidMount",value:function(){this.init()}},{key:"componentDidUpdate",value:function(t,e){t.items&&t.items.length===(this.props.items||[]).length&&!this.isPropChanged(t)||this.init(),this.props.lazy&&t.loading!==this.props.loading&&this.state.loading!==this.props.loading&&this.setState({loading:this.props.loading}),t.orientation!==this.props.orientation&&(this.lastScrollPos=this.isBoth()?{top:0,left:0}:0)}},{key:"renderLoaderItem",value:function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.loaderOptions(t,o),i=e.ObjectUtils.getJSXElement(this.props.loadingTemplate,r);return s.default.createElement(s.default.Fragment,{key:t},i)}},{key:"renderLoader",value:function(){var t=this;if(!this.props.loaderDisabled&&this.props.showLoader&&this.state.loading){var o=e.classNames("p-virtualscroller-loader",{"p-component-overlay":!this.props.loadingTemplate}),r=s.default.createElement("i",{className:"p-virtualscroller-loading-icon pi pi-spinner pi-spin"});if(this.props.loadingTemplate){var i=this.isBoth(),n=this.state.numItemsInViewport;r=this.state.loaderArr.map((function(e,o){return t.renderLoaderItem(o,i&&{numCols:n.cols})}))}return s.default.createElement("div",{className:o},r)}return null}},{key:"renderSpacer",value:function(){var t=this;return this.props.showSpacer?s.default.createElement("div",{ref:function(e){return t.spacer=e},className:"p-virtualscroller-spacer"}):null}},{key:"renderItem",value:function(t,o){var r=this.getOptions(o),i=e.ObjectUtils.getJSXElement(this.props.itemTemplate,t,r);return s.default.createElement(s.default.Fragment,{key:r.index},i)}},{key:"renderItems",value:function(t){var e=this;return t.map((function(t,o){return e.renderItem(t,o)}))}},{key:"renderContent",value:function(){var t=this,o=this.loadedItems(),r=this.renderItems(o),i=e.classNames("p-virtualscroller-content",{"p-virtualscroller-loading":this.state.loading}),n=s.default.createElement("div",{className:i,ref:function(e){return t.content=e}},r);if(this.props.contentTemplate){var l={className:i,contentRef:function(e){return t.content=e},spacerRef:function(e){return t.spacer=e},stickyRef:function(e){return t.sticky=e},items:o,getItemOptions:function(e){return t.getOptions(e)},children:r,element:n,props:this.props,loading:this.state.loading,getLoaderOptions:function(e,o){return t.loaderOptions(e,o)},loadingTemplate:this.props.loadingTemplate,itemSize:this.props.itemSize,rows:this.getRows(),columns:this.getColumns(),vertical:this.isVertical(),horizontal:this.isHorizontal(),both:this.isBoth()};return e.ObjectUtils.getJSXElement(this.props.contentTemplate,l)}return n}},{key:"render",value:function(){var t=this;if(this.props.disabled){var o=e.ObjectUtils.getJSXElement(this.props.contentTemplate,{items:this.props.items,rows:this.props.items,columns:this.props.columns});return s.default.createElement(s.default.Fragment,null,this.props.children,o)}var r=this.isBoth(),i=this.isHorizontal(),n=e.classNames("p-virtualscroller",{"p-both-scroll":r,"p-horizontal-scroll":i},this.props.className),l=this.renderLoader(),a=this.renderContent(),c=this.renderSpacer();return s.default.createElement("div",{ref:function(e){return t.el=e},className:n,tabIndex:0,style:this.props.style,onScroll:this.onScroll},a,c,l)}}],f&&i(p.prototype,f),v&&i(p,v),Object.defineProperty(p,"prototype",{writable:!1}),y}();p(v,"defaultProps",{id:null,style:null,className:null,items:null,itemSize:0,scrollHeight:null,scrollWidth:null,orientation:"vertical",numToleratedItems:null,delay:0,lazy:!1,disabled:!1,loaderDisabled:!1,columns:null,loading:!1,showSpacer:!0,showLoader:!1,loadingTemplate:null,itemTemplate:null,contentTemplate:null,onScroll:null,onScrollIndexChange:null,onLazyLoad:null}),exports.VirtualScroller=v;
|