primevue 3.43.0 → 3.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/Accordion.d.ts +4 -0
- package/accordion/accordion.cjs.js +2 -2
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +2 -2
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +2 -2
- package/accordion/accordion.min.js +1 -1
- package/accordiontab/AccordionTab.d.ts +4 -0
- package/animateonscroll/animateonscroll.cjs.js +2 -2
- package/animateonscroll/animateonscroll.cjs.min.js +1 -1
- package/animateonscroll/animateonscroll.esm.js +2 -2
- package/animateonscroll/animateonscroll.esm.min.js +1 -1
- package/animateonscroll/animateonscroll.js +2 -2
- package/animateonscroll/animateonscroll.min.js +1 -1
- package/autocomplete/AutoComplete.d.ts +4 -0
- package/autocomplete/AutoComplete.vue +2 -1
- package/autocomplete/autocomplete.cjs.js +5 -3
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +5 -3
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +5 -3
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/Avatar.d.ts +4 -0
- package/badgedirective/BadgeDirective.d.ts +4 -0
- package/badgedirective/badgedirective.cjs.js +2 -2
- package/badgedirective/badgedirective.cjs.min.js +1 -1
- package/badgedirective/badgedirective.esm.js +2 -2
- package/badgedirective/badgedirective.esm.min.js +1 -1
- package/badgedirective/badgedirective.js +2 -2
- package/badgedirective/badgedirective.min.js +1 -1
- package/base/style/basestyle.cjs.js +2 -2
- package/base/style/basestyle.cjs.min.js +1 -1
- package/base/style/basestyle.esm.js +2 -2
- package/base/style/basestyle.esm.min.js +1 -1
- package/base/style/basestyle.js +2 -2
- package/base/style/basestyle.min.js +1 -1
- package/basecomponent/BaseComponent.vue +3 -1
- package/basecomponent/basecomponent.cjs.js +7 -5
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +7 -5
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +7 -5
- package/basecomponent/basecomponent.min.js +1 -1
- package/basecomponent/style/basecomponentstyle.cjs.js +2 -2
- package/basecomponent/style/basecomponentstyle.cjs.min.js +1 -1
- package/basecomponent/style/basecomponentstyle.esm.js +2 -2
- package/basecomponent/style/basecomponentstyle.esm.min.js +1 -1
- package/basecomponent/style/basecomponentstyle.js +2 -2
- package/basecomponent/style/basecomponentstyle.min.js +1 -1
- package/basedirective/basedirective.cjs.js +2 -3
- package/basedirective/basedirective.cjs.min.js +1 -1
- package/basedirective/basedirective.esm.js +2 -3
- package/basedirective/basedirective.esm.min.js +1 -1
- package/basedirective/basedirective.js +2 -3
- package/basedirective/basedirective.min.js +1 -1
- package/blockui/BlockUI.d.ts +4 -0
- package/breadcrumb/Breadcrumb.d.ts +4 -0
- package/button/style/buttonstyle.cjs.js +2 -2
- package/button/style/buttonstyle.cjs.min.js +1 -1
- package/button/style/buttonstyle.esm.js +2 -2
- package/button/style/buttonstyle.esm.min.js +1 -1
- package/button/style/buttonstyle.js +2 -2
- package/button/style/buttonstyle.min.js +1 -1
- package/calendar/Calendar.d.ts +8 -0
- package/calendar/Calendar.vue +26 -13
- package/calendar/calendar.cjs.js +26 -15
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +26 -15
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +26 -15
- package/calendar/calendar.min.js +1 -1
- package/carousel/Carousel.d.ts +4 -0
- package/carousel/carousel.cjs.js +2 -2
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +2 -2
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +2 -2
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +4 -0
- package/cascadeselect/CascadeSelect.vue +1 -1
- package/cascadeselect/CascadeSelectSub.vue +4 -1
- package/cascadeselect/cascadeselect.cjs.js +7 -4
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +7 -4
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +7 -4
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/Chart.d.ts +4 -0
- package/chart/chart.cjs.js +2 -2
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +2 -2
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +2 -2
- package/chart/chart.min.js +1 -1
- package/checkbox/Checkbox.d.ts +4 -0
- package/checkbox/checkbox.cjs.js +2 -2
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +2 -2
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +2 -2
- package/checkbox/checkbox.min.js +1 -1
- package/chip/Chip.d.ts +4 -0
- package/chips/Chips.d.ts +4 -0
- package/chips/chips.cjs.js +2 -2
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +2 -2
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +2 -2
- package/chips/chips.min.js +1 -1
- package/colorpicker/ColorPicker.d.ts +4 -0
- package/column/Column.d.ts +4 -0
- package/columngroup/ColumnGroup.d.ts +4 -0
- package/config/config.cjs.js +2 -2
- package/config/config.cjs.min.js +1 -1
- package/config/config.esm.js +2 -2
- package/config/config.esm.min.js +1 -1
- package/config/config.js +2 -2
- package/config/config.min.js +1 -1
- package/confirmdialog/ConfirmDialog.d.ts +4 -0
- package/confirmpopup/ConfirmPopup.d.ts +4 -0
- package/confirmpopup/confirmpopup.cjs.js +2 -2
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +2 -2
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +2 -2
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/ContextMenu.d.ts +4 -0
- package/contextmenu/contextmenu.cjs.js +2 -2
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +2 -2
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +2 -2
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +84 -127
- package/core/core.min.js +23 -23
- package/datatable/DataTable.d.ts +4 -0
- package/datatable/RowCheckbox.vue +1 -0
- package/datatable/datatable.cjs.js +21 -20
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +21 -20
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +21 -20
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.d.ts +4 -0
- package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +4 -0
- package/deferredcontent/DeferredContent.d.ts +4 -0
- package/dialog/dialog.cjs.js +2 -2
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +2 -2
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +2 -2
- package/dialog/dialog.min.js +1 -1
- package/divider/Divider.d.ts +4 -0
- package/dock/Dock.d.ts +4 -0
- package/dropdown/Dropdown.vue +3 -1
- package/dropdown/dropdown.cjs.js +6 -5
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +6 -5
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +6 -5
- package/dropdown/dropdown.min.js +1 -1
- package/dropdown/style/dropdownstyle.cjs.js +1 -1
- package/dropdown/style/dropdownstyle.cjs.min.js +1 -1
- package/dropdown/style/dropdownstyle.esm.js +1 -1
- package/dropdown/style/dropdownstyle.esm.min.js +1 -1
- package/dropdown/style/dropdownstyle.js +1 -1
- package/dropdown/style/dropdownstyle.min.js +1 -1
- package/dynamicdialog/DynamicDialog.vue +1 -1
- package/dynamicdialog/dynamicdialog.cjs.js +1 -3
- package/dynamicdialog/dynamicdialog.cjs.min.js +1 -1
- package/dynamicdialog/dynamicdialog.esm.js +1 -3
- package/dynamicdialog/dynamicdialog.esm.min.js +1 -1
- package/dynamicdialog/dynamicdialog.js +1 -3
- package/dynamicdialog/dynamicdialog.min.js +1 -1
- package/editor/Editor.d.ts +4 -0
- package/editor/editor.cjs.js +2 -2
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +2 -2
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +2 -2
- package/editor/editor.min.js +1 -1
- package/fieldset/Fieldset.d.ts +4 -0
- package/fieldset/fieldset.cjs.js +2 -2
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +2 -2
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +2 -2
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/FileUpload.d.ts +4 -0
- package/galleria/Galleria.d.ts +4 -0
- package/galleria/galleria.cjs.js +6 -6
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +6 -6
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +6 -6
- package/galleria/galleria.min.js +1 -1
- package/image/Image.d.ts +4 -0
- package/image/image.cjs.js +2 -2
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +2 -2
- package/image/image.esm.min.js +1 -1
- package/image/image.js +2 -2
- package/image/image.min.js +1 -1
- package/inlinemessage/InlineMessage.d.ts +4 -0
- package/inplace/Inplace.d.ts +4 -0
- package/inplace/inplace.cjs.js +2 -2
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +2 -2
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +2 -2
- package/inplace/inplace.min.js +1 -1
- package/inputgroup/InputGroup.d.ts +4 -0
- package/inputgroupaddon/InputGroupAddon.d.ts +4 -0
- package/inputmask/InputMask.d.ts +4 -0
- package/inputnumber/inputnumber.cjs.js +2 -2
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +2 -2
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +2 -2
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/InputSwitch.d.ts +4 -0
- package/inputswitch/inputswitch.cjs.js +2 -2
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +2 -2
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +2 -2
- package/inputswitch/inputswitch.min.js +1 -1
- package/knob/Knob.d.ts +4 -0
- package/listbox/Listbox.d.ts +4 -0
- package/listbox/listbox.cjs.js +2 -2
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +2 -2
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +2 -2
- package/listbox/listbox.min.js +1 -1
- package/megamenu/MegaMenu.d.ts +4 -0
- package/menu/Menu.d.ts +4 -0
- package/menu/menu.cjs.js +2 -2
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +2 -2
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +2 -2
- package/menu/menu.min.js +1 -1
- package/menubar/Menubar.d.ts +4 -0
- package/menubar/menubar.cjs.js +2 -2
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +2 -2
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +2 -2
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +2 -2
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +2 -2
- package/message/message.esm.min.js +1 -1
- package/message/message.js +2 -2
- package/message/message.min.js +1 -1
- package/multiselect/MultiSelect.d.ts +4 -0
- package/multiselect/multiselect.cjs.js +4 -4
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +4 -4
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +4 -4
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/OrderList.d.ts +4 -0
- package/orderlist/orderlist.cjs.js +2 -2
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +2 -2
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +2 -2
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/OrganizationChart.d.ts +4 -0
- package/organizationchart/organizationchart.cjs.js +2 -2
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +2 -2
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +2 -2
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/OverlayPanel.d.ts +4 -0
- package/overlaypanel/overlaypanel.cjs.js +2 -2
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +2 -2
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +2 -2
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/style/paginatorstyle.cjs.js +2 -2
- package/paginator/style/paginatorstyle.cjs.min.js +1 -1
- package/paginator/style/paginatorstyle.esm.js +2 -2
- package/paginator/style/paginatorstyle.esm.min.js +1 -1
- package/paginator/style/paginatorstyle.js +2 -2
- package/paginator/style/paginatorstyle.min.js +1 -1
- package/panel/Panel.d.ts +4 -0
- package/panel/panel.cjs.js +2 -2
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +2 -2
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +2 -2
- package/panel/panel.min.js +1 -1
- package/panelmenu/PanelMenu.d.ts +4 -0
- package/panelmenu/panelmenu.cjs.js +2 -2
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +2 -2
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +2 -2
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/index.cjs.js +2 -2
- package/passthrough/index.cjs.min.js +1 -1
- package/passthrough/index.esm.js +2 -2
- package/passthrough/index.esm.min.js +1 -1
- package/passthrough/index.js +2 -2
- package/passthrough/index.min.js +1 -1
- package/passthrough/tailwind/index.cjs.js +2 -71
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +2 -71
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +2 -71
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/Password.d.ts +4 -0
- package/password/password.cjs.js +2 -4
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +2 -4
- package/password/password.esm.min.js +1 -1
- package/password/password.js +2 -4
- package/password/password.min.js +1 -1
- package/picklist/PickList.d.ts +4 -0
- package/picklist/picklist.cjs.js +2 -2
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +2 -2
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +2 -2
- package/picklist/picklist.min.js +1 -1
- package/progressspinner/ProgressSpinner.d.ts +4 -0
- package/radiobutton/RadioButton.d.ts +4 -0
- package/radiobutton/radiobutton.cjs.js +2 -2
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +2 -2
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +2 -2
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/Rating.d.ts +4 -0
- package/row/Row.d.ts +4 -0
- package/scrollpanel/ScrollPanel.d.ts +4 -0
- package/scrollpanel/ScrollPanel.vue +8 -1
- package/scrollpanel/scrollpanel.cjs.js +14 -5
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +14 -5
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +14 -5
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/ScrollTop.d.ts +4 -0
- package/selectbutton/SelectButton.d.ts +4 -0
- package/sidebar/Sidebar.d.ts +4 -0
- package/sidebar/sidebar.cjs.js +2 -2
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +2 -2
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +2 -2
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/Skeleton.d.ts +4 -0
- package/slider/Slider.d.ts +4 -0
- package/speeddial/SpeedDial.d.ts +4 -0
- package/speeddial/speeddial.cjs.js +2 -2
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +2 -2
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +2 -2
- package/speeddial/speeddial.min.js +1 -1
- package/speeddial/style/speeddialstyle.cjs.js +2 -2
- package/speeddial/style/speeddialstyle.cjs.min.js +1 -1
- package/speeddial/style/speeddialstyle.esm.js +2 -2
- package/speeddial/style/speeddialstyle.esm.min.js +1 -1
- package/speeddial/style/speeddialstyle.js +2 -2
- package/speeddial/style/speeddialstyle.min.js +1 -1
- package/splitbutton/SplitButton.d.ts +4 -0
- package/splitbutton/style/splitbuttonstyle.cjs.js +2 -2
- package/splitbutton/style/splitbuttonstyle.cjs.min.js +1 -1
- package/splitbutton/style/splitbuttonstyle.esm.js +2 -2
- package/splitbutton/style/splitbuttonstyle.esm.min.js +1 -1
- package/splitbutton/style/splitbuttonstyle.js +2 -2
- package/splitbutton/style/splitbuttonstyle.min.js +1 -1
- package/splitter/Splitter.d.ts +4 -0
- package/splitterpanel/SplitterPanel.d.ts +4 -0
- package/steps/Steps.d.ts +4 -0
- package/tabmenu/TabMenu.d.ts +4 -0
- package/tabpanel/TabPanel.d.ts +4 -0
- package/tabview/tabview.cjs.js +2 -2
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +2 -2
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +2 -2
- package/tabview/tabview.min.js +1 -1
- package/tag/Tag.d.ts +4 -0
- package/terminal/Terminal.d.ts +4 -0
- package/textarea/Textarea.d.ts +4 -0
- package/tieredmenu/tieredmenu.cjs.js +2 -2
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +2 -2
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +2 -2
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/Timeline.d.ts +4 -0
- package/toast/Toast.d.ts +4 -0
- package/toast/style/toaststyle.cjs.js +2 -2
- package/toast/style/toaststyle.cjs.min.js +1 -1
- package/toast/style/toaststyle.esm.js +2 -2
- package/toast/style/toaststyle.esm.min.js +1 -1
- package/toast/style/toaststyle.js +2 -2
- package/toast/style/toaststyle.min.js +1 -1
- package/toast/toast.cjs.js +4 -4
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +4 -4
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +4 -4
- package/toast/toast.min.js +1 -1
- package/togglebutton/ToggleButton.d.ts +4 -0
- package/togglebutton/togglebutton.cjs.js +2 -2
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +2 -2
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +2 -2
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/Toolbar.d.ts +4 -0
- package/tooltip/Tooltip.d.ts +4 -0
- package/tree/tree.cjs.js +4 -4
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +4 -4
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +4 -4
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.d.ts +4 -0
- package/treeselect/treeselect.cjs.js +4 -4
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +4 -4
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +4 -4
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/TreeTable.d.ts +4 -0
- package/treetable/treetable.cjs.js +12 -12
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +12 -12
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +12 -12
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.d.ts +4 -0
- package/tristatecheckbox/tristatecheckbox.cjs.js +2 -2
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +2 -2
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +2 -2
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/usestyle/usestyle.cjs.js +2 -2
- package/usestyle/usestyle.cjs.min.js +1 -1
- package/usestyle/usestyle.esm.js +2 -2
- package/usestyle/usestyle.esm.min.js +1 -1
- package/usestyle/usestyle.js +2 -2
- package/usestyle/usestyle.min.js +1 -1
- package/utils/Utils.d.ts +1 -0
- package/utils/utils.cjs.js +27 -3
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +27 -3
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +27 -3
- package/utils/utils.min.js +1 -1
- package/virtualscroller/VirtualScroller.d.ts +4 -0
- package/virtualscroller/VirtualScroller.vue +1 -1
- package/virtualscroller/virtualscroller.cjs.js +5 -5
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +5 -5
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +5 -5
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +1 -1
package/utils/utils.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.utils=function(t){"use strict";function e(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=s(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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(t)},n:function(){var t=n.next();return l=t.done,t},e:function(t){a=!0,o=t},f:function(){try{l||null==n.return||n.return()}finally{if(a)throw o}}}}function n(){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 r(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function i(t){if(Array.isArray(t))return u(t)}function o(t){return o="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},o(t)}function l(t,e){return f(t)||c(t,e)||s(t,e)||a()}function a(){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(t,e){if(t){if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function c(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,l,a=[],s=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(a.push(r.value),a.length!==e);s=!0);}catch(t){u=!0,i=t}finally{try{if(!s&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw i}}return a}}function f(t){if(Array.isArray(t))return t}var d={innerWidth:function(t){if(t){var e=t.offsetWidth,n=getComputedStyle(t);return e+=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)}return 0},width:function(t){if(t){var e=t.offsetWidth,n=getComputedStyle(t);return e-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),e}return 0},getWindowScrollTop:function(){var t=document.documentElement;return(window.pageYOffset||t.scrollTop)-(t.clientTop||0)},getWindowScrollLeft:function(){var t=document.documentElement;return(window.pageXOffset||t.scrollLeft)-(t.clientLeft||0)},getOuterWidth:function(t,e){if(t){var n=t.offsetWidth;if(e){var r=getComputedStyle(t);n+=parseFloat(r.marginLeft)+parseFloat(r.marginRight)}return n}return 0},getOuterHeight:function(t,e){if(t){var n=t.offsetHeight;if(e){var r=getComputedStyle(t);n+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return n}return 0},getClientHeight:function(t,e){if(t){var n=t.clientHeight;if(e){var r=getComputedStyle(t);n+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return n}return 0},getViewport:function(){var t=window,e=document,n=e.documentElement,r=e.getElementsByTagName("body")[0];return{width:t.innerWidth||n.clientWidth||r.clientWidth,height:t.innerHeight||n.clientHeight||r.clientHeight}},getOffset:function(t){if(t){var e=t.getBoundingClientRect();return{top:e.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:e.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}return{top:"auto",left:"auto"}},index:function(t){if(t)for(var e=t.parentNode.childNodes,n=0,r=0;r<e.length;r++){if(e[r]===t)return n;1===e[r].nodeType&&n++}return-1},addMultipleClasses:function(t,e){var n=this;t&&e&&[e].flat().filter(Boolean).forEach((function(e){return e.split(" ").forEach((function(e){return n.addClass(t,e)}))}))},removeMultipleClasses:function(t,e){var n=this;t&&e&&[e].flat().filter(Boolean).forEach((function(e){return e.split(" ").forEach((function(e){return n.removeClass(t,e)}))}))},addClass:function(t,e){t&&e&&!this.hasClass(t,e)&&(t.classList?t.classList.add(e):t.className+=" "+e)},removeClass:function(t,e){t&&e&&(t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," "))},hasClass:function(t,e){return!!t&&(t.classList?t.classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(t.className))},addStyles:function(t){t&&Object.entries(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).forEach((function(e){var n=l(e,2);return t.style[n[0]]=n[1]}))},find:function(t,e){return this.isElement(t)?t.querySelectorAll(e):[]},findSingle:function(t,e){return this.isElement(t)?t.querySelector(e):null},createElement:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t){var n=document.createElement(t);this.setAttributes(n,e);for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return n.append.apply(n,i),n}},setAttribute:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0;this.isElement(t)&&null!=n&&t.setAttribute(e,n)},setAttributes:function(t){var e=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.isElement(t)){var u=function e(n,r){var i,a,s=null!=t&&null!==(i=t.$attrs)&&void 0!==i&&i[n]?[null==t||null===(a=t.$attrs)||void 0===a?void 0:a[n]]:[];return[r].flat().reduce((function(t,r){if(null!=r){var i=o(r);if("string"===i||"number"===i)t.push(r);else if("object"===i){var a=Array.isArray(r)?e(n,r):Object.entries(r).map((function(t){var e=l(t,2),r=e[0],i=e[1];return"style"!==n||!i&&0!==i?i?r:void 0:"".concat(r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),":").concat(i)}));t=a.length?t.concat(a.filter((function(t){return!!t}))):t}}return t}),s)};Object.entries(a).forEach((function(o){var a,c=l(o,2),f=c[0],d=c[1];if(null!=d){var h=f.match(/^on(.+)/);h?t.addEventListener(h[1].toLowerCase(),d):"p-bind"===f?e.setAttributes(t,d):(d="class"===f?(a=new Set(u("class",d)),i(a)||r(a)||s(a)||n()).join(" ").trim():"style"===f?u("style",d).join(";").trim():d,(t.$attrs=t.$attrs||{})&&(t.$attrs[f]=d),t.setAttribute(f,d))}}))}},getAttribute:function(t,e){if(this.isElement(t)){var n=t.getAttribute(e);return isNaN(n)?"true"===n||"false"===n?"true"===n:n:+n}},isAttributeEquals:function(t,e,n){return!!this.isElement(t)&&this.getAttribute(t,e)===n},isAttributeNotEquals:function(t,e,n){return!this.isAttributeEquals(t,e,n)},getHeight:function(t){if(t){var e=t.offsetHeight,n=getComputedStyle(t);return e-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth)}return 0},getWidth:function(t){if(t){var e=t.offsetWidth,n=getComputedStyle(t);return e-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)+parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth)}return 0},absolutePosition:function(t,e){if(t){var n,r,i=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:this.getHiddenElementDimensions(t),o=i.height,l=i.width,a=e.offsetHeight,s=e.offsetWidth,u=e.getBoundingClientRect(),c=this.getWindowScrollTop(),f=this.getWindowScrollLeft(),d=this.getViewport();u.top+a+o>d.height?(n=u.top+c-o,t.style.transformOrigin="bottom",n<0&&(n=c)):(n=a+u.top+c,t.style.transformOrigin="top"),r=u.left+l>d.width?Math.max(0,u.left+f+s-l):u.left+f,t.style.top=n+"px",t.style.left=r+"px"}},relativePosition:function(t,e){if(t){var n,r,i=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:this.getHiddenElementDimensions(t),o=e.offsetHeight,l=e.getBoundingClientRect(),a=this.getViewport();l.top+o+i.height>a.height?(n=-1*i.height,t.style.transformOrigin="bottom",l.top+n<0&&(n=-1*l.top)):(n=o,t.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,t.style.top=n+"px",t.style.left=r+"px"}},nestedPosition:function(t,e){if(t){var n,r=t.parentElement,i=this.getOffset(r),o=this.getViewport(),l=t.offsetParent?t.offsetWidth:this.getHiddenElementOuterWidth(t),a=this.getOuterWidth(r.children[0]);parseInt(i.left,10)+a+l>o.width-this.calculateScrollbarWidth()?parseInt(i.left,10)<l?e%2==1?n=parseInt(i.left,10)?"-"+parseInt(i.left,10)+"px":"100%":e%2==0&&(n=o.width-l-this.calculateScrollbarWidth()+"px"):n="-100%":n="100%",t.style.top="0px",t.style.left=n}},getParents:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return null===t.parentNode?e:this.getParents(t.parentNode,e.concat([t.parentNode]))},getScrollableParents:function(t){var n=[];if(t){var r,i=this.getParents(t),o=/(auto|scroll)/,l=function(t){try{var e=window.getComputedStyle(t,null);return o.test(e.getPropertyValue("overflow"))||o.test(e.getPropertyValue("overflowX"))||o.test(e.getPropertyValue("overflowY"))}catch(t){return!1}},a=e(i);try{for(a.s();!(r=a.n()).done;){var s=r.value,u=1===s.nodeType&&s.dataset.scrollselectors;if(u){var c,f=e(u.split(","));try{for(f.s();!(c=f.n()).done;){var d=this.findSingle(s,c.value);d&&l(d)&&n.push(d)}}catch(t){f.e(t)}finally{f.f()}}9!==s.nodeType&&l(s)&&n.push(s)}}catch(t){a.e(t)}finally{a.f()}}return n},getHiddenElementOuterHeight:function(t){if(t){t.style.visibility="hidden",t.style.display="block";var e=t.offsetHeight;return t.style.display="none",t.style.visibility="visible",e}return 0},getHiddenElementOuterWidth:function(t){if(t){t.style.visibility="hidden",t.style.display="block";var e=t.offsetWidth;return t.style.display="none",t.style.visibility="visible",e}return 0},getHiddenElementDimensions:function(t){if(t){var e={};return t.style.visibility="hidden",t.style.display="block",e.width=t.offsetWidth,e.height=t.offsetHeight,t.style.display="none",t.style.visibility="visible",e}return 0},fadeIn:function(t,e){if(t){t.style.opacity=0;var n=+new Date,r=0;!function i(){r=+t.style.opacity+((new Date).getTime()-n)/e,t.style.opacity=r,n=+new Date,+r<1&&(window.requestAnimationFrame&&requestAnimationFrame(i)||setTimeout(i,16))}()}},fadeOut:function(t,e){if(t)var n=1,r=50/e,i=setInterval((function(){(n-=r)<=0&&(n=0,clearInterval(i)),t.style.opacity=n}),50)},getUserAgent:function(){return navigator.userAgent},appendChild:function(t,e){if(this.isElement(e))e.appendChild(t);else{if(!e.el||!e.elElement)throw new Error("Cannot append "+e+" to "+t);e.elElement.appendChild(t)}},isElement:function(t){return"object"===("undefined"==typeof HTMLElement?"undefined":o(HTMLElement))?t instanceof HTMLElement:t&&"object"===o(t)&&null!==t&&1===t.nodeType&&"string"==typeof t.nodeName},scrollInView:function(t,e){var n=getComputedStyle(t).getPropertyValue("borderTopWidth"),r=n?parseFloat(n):0,i=getComputedStyle(t).getPropertyValue("paddingTop"),o=i?parseFloat(i):0,l=t.getBoundingClientRect(),a=e.getBoundingClientRect().top+document.body.scrollTop-(l.top+document.body.scrollTop)-r-o,s=t.scrollTop,u=t.clientHeight,c=this.getOuterHeight(e);a<0?t.scrollTop=s+a:a+c>u&&(t.scrollTop=s+a-u+c)},clearSelection: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(t){}},getSelection:function(){return window.getSelection?window.getSelection().toString():document.getSelection?document.getSelection().toString():document.selection?document.selection.createRange().text:null},calculateScrollbarWidth:function(){if(null!=this.calculatedScrollbarWidth)return this.calculatedScrollbarWidth;var t=document.createElement("div");this.addStyles(t,{width:"100px",height:"100px",overflow:"scroll",position:"absolute",top:"-9999px"}),document.body.appendChild(t);var e=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),this.calculatedScrollbarWidth=e,e},calculateBodyScrollbarWidth:function(){return window.innerWidth-document.documentElement.offsetWidth},getBrowser:function(){if(!this.browser){var t=this.resolveUserAgent();this.browser={},t.browser&&(this.browser[t.browser]=!0,this.browser.version=t.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser},resolveUserAgent:function(){var t=navigator.userAgent.toLowerCase(),e=/(chrome)[ ]([\w.]+)/.exec(t)||/(webkit)[ ]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ ]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[];return{browser:e[1]||"",version:e[2]||"0"}},isVisible:function(t){return t&&null!=t.offsetParent},invokeElementMethod:function(t,e,n){t[e].apply(t,n)},isExist:function(t){return!(null==t||!t.nodeName||!t.parentNode)},isClient:function(){return!("undefined"==typeof window||!window.document||!window.document.createElement)},focus:function(t,e){t&&document.activeElement!==t&&t.focus(e)},isFocusableElement:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return!!this.isElement(t)&&t.matches('button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])'.concat(e,',\n [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(e,',\n input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(e,',\n select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(e,',\n textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(e,',\n [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(e,',\n [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(e))},getFocusableElements:function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=[],o=e(this.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)));try{for(o.s();!(n=o.n()).done;){var l=n.value;"none"!=getComputedStyle(l).display&&"hidden"!=getComputedStyle(l).visibility&&i.push(l)}}catch(t){o.e(t)}finally{o.f()}return i},getFirstFocusableElement:function(t,e){var n=this.getFocusableElements(t,e);return n.length>0?n[0]:null},getLastFocusableElement:function(t,e){var n=this.getFocusableElements(t,e);return n.length>0?n[n.length-1]:null},getNextFocusableElement:function(t,e,n){var r=this.getFocusableElements(t,n),i=r.length>0?r.findIndex((function(t){return t===e})):-1,o=i>-1&&r.length>=i+1?i+1:-1;return o>-1?r[o]:null},getPreviousElementSibling:function(t,e){for(var n=t.previousElementSibling;n;){if(n.matches(e))return n;n=n.previousElementSibling}return null},getNextElementSibling:function(t,e){for(var n=t.nextElementSibling;n;){if(n.matches(e))return n;n=n.nextElementSibling}return null},isClickable:function(t){if(t){var e=t.nodeName,n=t.parentElement&&t.parentElement.nodeName;return"INPUT"===e||"TEXTAREA"===e||"BUTTON"===e||"A"===e||"INPUT"===n||"TEXTAREA"===n||"BUTTON"===n||"A"===n||!!t.closest(".p-button, .p-checkbox, .p-radiobutton")}return!1},applyStyle:function(t,e){if("string"==typeof e)t.style.cssText=e;else for(var n in e)t.style[n]=e[n]},isIOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream},isAndroid:function(){return/(android)/i.test(navigator.userAgent)},isTouchDevice:function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0},hasCSSAnimation:function(t){if(t){var e=getComputedStyle(t);return parseFloat(e.getPropertyValue("animation-duration")||"0")>0}return!1},hasCSSTransition:function(t){if(t){var e=getComputedStyle(t);return parseFloat(e.getPropertyValue("transition-duration")||"0")>0}return!1},exportCSV:function(t,e){var n=new Blob([t],{type:"application/csv;charset=utf-8;"});if(window.navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(n,e+".csv");else{var r=document.createElement("a");void 0!==r.download?(r.setAttribute("href",URL.createObjectURL(n)),r.setAttribute("download",e+".csv"),r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r)):(t="data:text/csv;charset=utf-8,"+t,window.open(encodeURI(t)))}},blockBodyScroll:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"p-overflow-hidden";document.body.style.setProperty("--scrollbar-width",this.calculateBodyScrollbarWidth()+"px"),this.addClass(document.body,t)},unblockBodyScroll:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"p-overflow-hidden";document.body.style.removeProperty("--scrollbar-width"),this.removeClass(document.body,t)}};function h(t){return h="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},h(t)}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(i=void 0,"symbol"===h(i=g(r.key,"string"))?i:String(i)),r)}var i}function g(t,e){if("object"!==h(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var m=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};p(this,t),this.element=e,this.listener=n}var e,n,r;return e=t,(n=[{key:"bindScrollListener",value:function(){this.scrollableParents=d.getScrollableParents(this.element);for(var t=0;t<this.scrollableParents.length;t++)this.scrollableParents[t].addEventListener("scroll",this.listener)}},{key:"unbindScrollListener",value:function(){if(this.scrollableParents)for(var t=0;t<this.scrollableParents.length;t++)this.scrollableParents[t].removeEventListener("scroll",this.listener)}},{key:"destroy",value:function(){this.unbindScrollListener(),this.element=null,this.listener=null,this.scrollableParents=null}}])&&y(e.prototype,n),r&&y(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function v(){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 b(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,l,a=[],s=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(a.push(r.value),a.length!==e);s=!0);}catch(t){u=!0,i=t}finally{try{if(!s&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw i}}return a}}function w(t){if(Array.isArray(t))return t}function S(t){return A(t)||x(t)||O(t)||E()}function E(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function x(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function A(t){if(Array.isArray(t))return F(t)}function C(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=O(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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(t)},n:function(){var t=n.next();return l=t.done,t},e:function(t){a=!0,o=t},f:function(){try{l||null==n.return||n.return()}finally{if(a)throw o}}}}function O(t,e){if(t){if("string"==typeof t)return F(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?F(t,e):void 0}}function F(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function I(t){return I="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},I(t)}var T={equals:function(t,e,n){return n?this.resolveFieldData(t,n)===this.resolveFieldData(e,n):this.deepEquals(t,e)},deepEquals:function(t,e){if(t===e)return!0;if(t&&e&&"object"==I(t)&&"object"==I(e)){var n,r,i,o=Array.isArray(t),l=Array.isArray(e);if(o&&l){if((r=t.length)!=e.length)return!1;for(n=r;0!=n--;)if(!this.deepEquals(t[n],e[n]))return!1;return!0}if(o!=l)return!1;var a=t instanceof Date,s=e instanceof Date;if(a!=s)return!1;if(a&&s)return t.getTime()==e.getTime();var u=t instanceof RegExp,c=e instanceof RegExp;if(u!=c)return!1;if(u&&c)return t.toString()==e.toString();var f=Object.keys(t);if((r=f.length)!==Object.keys(e).length)return!1;for(n=r;0!=n--;)if(!Object.prototype.hasOwnProperty.call(e,f[n]))return!1;for(n=r;0!=n--;)if(!this.deepEquals(t[i=f[n]],e[i]))return!1;return!0}return t!=t&&e!=e},resolveFieldData:function(t,e){if(!t||!e)return null;try{var n=t[e];if(this.isNotEmpty(n))return n}catch(t){}if(Object.keys(t).length){if(this.isFunction(e))return e(t);if(-1===e.indexOf("."))return t[e];for(var r=e.split("."),i=t,o=0,l=r.length;o<l;++o){if(null==i)return null;i=i[r[o]]}return i}return null},getItemValue:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return this.isFunction(t)?t.apply(void 0,n):t},filter:function(t,e,n){var r=[];if(t){var i,o=C(t);try{for(o.s();!(i=o.n()).done;){var l,a=i.value,s=C(e);try{for(s.s();!(l=s.n()).done;){if(String(this.resolveFieldData(a,l.value)).toLowerCase().indexOf(n.toLowerCase())>-1){r.push(a);break}}}catch(t){s.e(t)}finally{s.f()}}}catch(t){o.e(t)}finally{o.f()}}return r},reorderArray:function(t,e,n){t&&e!==n&&(n>=t.length&&(n%=t.length,e%=t.length),t.splice(n,0,t.splice(e,1)[0]))},findIndexInList:function(t,e){var n=-1;if(e)for(var r=0;r<e.length;r++)if(e[r]===t){n=r;break}return n},contains:function(t,e){if(null!=t&&e&&e.length){var n,r=C(e);try{for(r.s();!(n=r.n()).done;){if(this.equals(t,n.value))return!0}}catch(t){r.e(t)}finally{r.f()}}return!1},insertIntoOrderedArray:function(t,e,n,r){if(n.length>0){for(var i=!1,o=0;o<n.length;o++){if(this.findIndexInList(n[o],r)>e){n.splice(o,0,t),i=!0;break}}i||n.push(t)}else n.push(t)},removeAccents:function(t){return t&&t.search(/[\xC0-\xFF]/g)>-1&&(t=t.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")),t},getVNodeProp:function(t,e){var n=t.props;if(n){var r=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=Object.prototype.hasOwnProperty.call(n,r)?r:e;return t.type.extends.props[e].type===Boolean&&""===n[i]||n[i]}return null},toFlatCase:function(t){return this.isString(t)?t.replace(/(-|_)/g,"").toLowerCase():t},toKebabCase:function(t){return this.isString(t)?t.replace(/(_)/g,"-").replace(/[A-Z]/g,(function(t,e){return 0===e?t:"-"+t.toLowerCase()})).toLowerCase():t},toCapitalCase:function(t){return this.isString(t,{empty:!1})?t[0].toUpperCase()+t.slice(1):t},isEmpty:function(t){return null==t||""===t||Array.isArray(t)&&0===t.length||!(t instanceof Date)&&"object"===I(t)&&0===Object.keys(t).length},isNotEmpty:function(t){return!this.isEmpty(t)},isFunction:function(t){return!!(t&&t.constructor&&t.call&&t.apply)},isObject:function(t){return t instanceof Object&&t.constructor===Object&&(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]||0!==Object.keys(t).length)},isDate:function(t){return t instanceof Date&&t.constructor===Date},isArray:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Array.isArray(t)&&(e||0!==t.length)},isString:function(t){return"string"==typeof t&&(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]||""!==t)},isPrintableCharacter:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.isNotEmpty(t)&&1===t.length&&t.match(/\S| /)},findLast:function(t,e){var n;if(this.isNotEmpty(t))try{n=t.findLast(e)}catch(r){n=S(t).reverse().find(e)}return n},findLastIndex:function(t,e){var n=-1;if(this.isNotEmpty(t))try{n=t.findLastIndex(e)}catch(r){n=t.lastIndexOf(S(t).reverse().find(e))}return n},sort:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,i=this.compare(t,e,arguments.length>3?arguments[3]:void 0,n),o=n;return(this.isEmpty(t)||this.isEmpty(e))&&(o=1===r?n:r),o*i},compare:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=this.isEmpty(t),o=this.isEmpty(e);return i&&o?0:i?r:o?-r:"string"==typeof t&&"string"==typeof e?n(t,e):t<e?-1:t>e?1:0},localeComparator:function(){return new Intl.Collator(void 0,{numeric:!0}).compare},nestedKeys:function(){var t=this,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object.entries(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).reduce((function(n,r){var i,o,l=(o=2,w(i=r)||b(i,o)||O(i,o)||v()),a=l[0],s=l[1],u=e?"".concat(e,".").concat(a):a;return t.isObject(s)?n=n.concat(t.nestedKeys(s,u)):n.push(u),n}),[])}},j=0;function P(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function L(t,e){if(t){if("string"==typeof t)return H(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?H(t,e):void 0}}function W(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function N(t){if(Array.isArray(t))return H(t)}function H(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var D,k,B,R,U,V=(D=[],k=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:999,r=R(t,e,n),i=r.value+(r.key===t?0:n)+1;return D.push({key:t,value:i}),i},B=function(t,e){return R(t,e).value},R=function(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return(n=D,N(n)||W(n)||L(n)||P()).reverse().find((function(n){return!!e||n.key===t}))||{key:t,value:r}},{get:U=function(t){return t&&parseInt(t.style.zIndex,10)||0},set:function(t,e,n){e&&(e.style.zIndex=String(k(t,!0,n)))},clear:function(t){var e;t&&(e=U(t),D=D.filter((function(t){return t.value!==e})),t.style.zIndex="")},getCurrent:function(t){return B(t,!0)}});return t.ConnectedOverlayScrollHandler=m,t.DomHandler=d,t.EventBus=function(){var t=new Map;return{on:function(e,n){var r=t.get(e);r?r.push(n):r=[n],t.set(e,r)},off:function(e,n){var r=t.get(e);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(e,n){var r=t.get(e);r&&r.slice().map((function(t){t(n)}))}}},t.ObjectUtils=T,t.UniqueComponentId=function(){return j++,"".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"pv_id_").concat(j)},t.ZIndexUtils=V,Object.defineProperty(t,"__esModule",{value:!0}),t}({});
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.utils=function(t){"use strict";function e(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=s(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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(t)},n:function(){var t=n.next();return l=t.done,t},e:function(t){a=!0,o=t},f:function(){try{l||null==n.return||n.return()}finally{if(a)throw o}}}}function n(){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 r(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function i(t){if(Array.isArray(t))return u(t)}function o(t){return o="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},o(t)}function l(t,e){return f(t)||c(t,e)||s(t,e)||a()}function a(){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(t,e){if(t){if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function c(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,l,a=[],s=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(a.push(r.value),a.length!==e);s=!0);}catch(t){u=!0,i=t}finally{try{if(!s&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw i}}return a}}function f(t){if(Array.isArray(t))return t}var d={innerWidth:function(t){if(t){var e=t.offsetWidth,n=getComputedStyle(t);return e+=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)}return 0},width:function(t){if(t){var e=t.offsetWidth,n=getComputedStyle(t);return e-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),e}return 0},getWindowScrollTop:function(){var t=document.documentElement;return(window.pageYOffset||t.scrollTop)-(t.clientTop||0)},getWindowScrollLeft:function(){var t=document.documentElement;return(window.pageXOffset||t.scrollLeft)-(t.clientLeft||0)},getOuterWidth:function(t,e){if(t){var n=t.offsetWidth;if(e){var r=getComputedStyle(t);n+=parseFloat(r.marginLeft)+parseFloat(r.marginRight)}return n}return 0},getOuterHeight:function(t,e){if(t){var n=t.offsetHeight;if(e){var r=getComputedStyle(t);n+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return n}return 0},getClientHeight:function(t,e){if(t){var n=t.clientHeight;if(e){var r=getComputedStyle(t);n+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return n}return 0},getViewport:function(){var t=window,e=document,n=e.documentElement,r=e.getElementsByTagName("body")[0];return{width:t.innerWidth||n.clientWidth||r.clientWidth,height:t.innerHeight||n.clientHeight||r.clientHeight}},getOffset:function(t){if(t){var e=t.getBoundingClientRect();return{top:e.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:e.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}return{top:"auto",left:"auto"}},index:function(t){if(t)for(var e=t.parentNode.childNodes,n=0,r=0;r<e.length;r++){if(e[r]===t)return n;1===e[r].nodeType&&n++}return-1},addMultipleClasses:function(t,e){var n=this;t&&e&&[e].flat().filter(Boolean).forEach((function(e){return e.split(" ").forEach((function(e){return n.addClass(t,e)}))}))},removeMultipleClasses:function(t,e){var n=this;t&&e&&[e].flat().filter(Boolean).forEach((function(e){return e.split(" ").forEach((function(e){return n.removeClass(t,e)}))}))},addClass:function(t,e){t&&e&&!this.hasClass(t,e)&&(t.classList?t.classList.add(e):t.className+=" "+e)},removeClass:function(t,e){t&&e&&(t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," "))},hasClass:function(t,e){return!!t&&(t.classList?t.classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(t.className))},addStyles:function(t){t&&Object.entries(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).forEach((function(e){var n=l(e,2);return t.style[n[0]]=n[1]}))},find:function(t,e){return this.isElement(t)?t.querySelectorAll(e):[]},findSingle:function(t,e){return this.isElement(t)?t.querySelector(e):null},createElement:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t){var n=document.createElement(t);this.setAttributes(n,e);for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return n.append.apply(n,i),n}},setAttribute:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0;this.isElement(t)&&null!=n&&t.setAttribute(e,n)},setAttributes:function(t){var e=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.isElement(t)){var u=function e(n,r){var i,a,s=null!=t&&null!==(i=t.$attrs)&&void 0!==i&&i[n]?[null==t||null===(a=t.$attrs)||void 0===a?void 0:a[n]]:[];return[r].flat().reduce((function(t,r){if(null!=r){var i=o(r);if("string"===i||"number"===i)t.push(r);else if("object"===i){var a=Array.isArray(r)?e(n,r):Object.entries(r).map((function(t){var e=l(t,2),r=e[0],i=e[1];return"style"!==n||!i&&0!==i?i?r:void 0:"".concat(r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),":").concat(i)}));t=a.length?t.concat(a.filter((function(t){return!!t}))):t}}return t}),s)};Object.entries(a).forEach((function(o){var a,c=l(o,2),f=c[0],d=c[1];if(null!=d){var h=f.match(/^on(.+)/);h?t.addEventListener(h[1].toLowerCase(),d):"p-bind"===f?e.setAttributes(t,d):(d="class"===f?(a=new Set(u("class",d)),i(a)||r(a)||s(a)||n()).join(" ").trim():"style"===f?u("style",d).join(";").trim():d,(t.$attrs=t.$attrs||{})&&(t.$attrs[f]=d),t.setAttribute(f,d))}}))}},getAttribute:function(t,e){if(this.isElement(t)){var n=t.getAttribute(e);return isNaN(n)?"true"===n||"false"===n?"true"===n:n:+n}},isAttributeEquals:function(t,e,n){return!!this.isElement(t)&&this.getAttribute(t,e)===n},isAttributeNotEquals:function(t,e,n){return!this.isAttributeEquals(t,e,n)},getHeight:function(t){if(t){var e=t.offsetHeight,n=getComputedStyle(t);return e-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth)}return 0},getWidth:function(t){if(t){var e=t.offsetWidth,n=getComputedStyle(t);return e-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)+parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth)}return 0},absolutePosition:function(t,e){if(t){var n,r,i=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:this.getHiddenElementDimensions(t),o=i.height,l=i.width,a=e.offsetHeight,s=e.offsetWidth,u=e.getBoundingClientRect(),c=this.getWindowScrollTop(),f=this.getWindowScrollLeft(),d=this.getViewport();u.top+a+o>d.height?(n=u.top+c-o,t.style.transformOrigin="bottom",n<0&&(n=c)):(n=a+u.top+c,t.style.transformOrigin="top"),r=u.left+l>d.width?Math.max(0,u.left+f+s-l):u.left+f,t.style.top=n+"px",t.style.left=r+"px"}},relativePosition:function(t,e){if(t){var n,r,i=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:this.getHiddenElementDimensions(t),o=e.offsetHeight,l=e.getBoundingClientRect(),a=this.getViewport();l.top+o+i.height>a.height?(n=-1*i.height,t.style.transformOrigin="bottom",l.top+n<0&&(n=-1*l.top)):(n=o,t.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,t.style.top=n+"px",t.style.left=r+"px"}},nestedPosition:function(t,e){if(t){var n,r=t.parentElement,i=this.getOffset(r),o=this.getViewport(),l=t.offsetParent?t.offsetWidth:this.getHiddenElementOuterWidth(t),a=this.getOuterWidth(r.children[0]);parseInt(i.left,10)+a+l>o.width-this.calculateScrollbarWidth()?parseInt(i.left,10)<l?e%2==1?n=parseInt(i.left,10)?"-"+parseInt(i.left,10)+"px":"100%":e%2==0&&(n=o.width-l-this.calculateScrollbarWidth()+"px"):n="-100%":n="100%",t.style.top="0px",t.style.left=n}},getParents:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return null===t.parentNode?e:this.getParents(t.parentNode,e.concat([t.parentNode]))},getScrollableParents:function(t){var n=[];if(t){var r,i=this.getParents(t),o=/(auto|scroll)/,l=function(t){try{var e=window.getComputedStyle(t,null);return o.test(e.getPropertyValue("overflow"))||o.test(e.getPropertyValue("overflowX"))||o.test(e.getPropertyValue("overflowY"))}catch(t){return!1}},a=e(i);try{for(a.s();!(r=a.n()).done;){var s=r.value,u=1===s.nodeType&&s.dataset.scrollselectors;if(u){var c,f=e(u.split(","));try{for(f.s();!(c=f.n()).done;){var d=this.findSingle(s,c.value);d&&l(d)&&n.push(d)}}catch(t){f.e(t)}finally{f.f()}}9!==s.nodeType&&l(s)&&n.push(s)}}catch(t){a.e(t)}finally{a.f()}}return n},getHiddenElementOuterHeight:function(t){if(t){t.style.visibility="hidden",t.style.display="block";var e=t.offsetHeight;return t.style.display="none",t.style.visibility="visible",e}return 0},getHiddenElementOuterWidth:function(t){if(t){t.style.visibility="hidden",t.style.display="block";var e=t.offsetWidth;return t.style.display="none",t.style.visibility="visible",e}return 0},getHiddenElementDimensions:function(t){if(t){var e={};return t.style.visibility="hidden",t.style.display="block",e.width=t.offsetWidth,e.height=t.offsetHeight,t.style.display="none",t.style.visibility="visible",e}return 0},fadeIn:function(t,e){if(t){t.style.opacity=0;var n=+new Date,r=0;!function i(){r=+t.style.opacity+((new Date).getTime()-n)/e,t.style.opacity=r,n=+new Date,+r<1&&(window.requestAnimationFrame&&requestAnimationFrame(i)||setTimeout(i,16))}()}},fadeOut:function(t,e){if(t)var n=1,r=50/e,i=setInterval((function(){(n-=r)<=0&&(n=0,clearInterval(i)),t.style.opacity=n}),50)},getUserAgent:function(){return navigator.userAgent},appendChild:function(t,e){if(this.isElement(e))e.appendChild(t);else{if(!e.el||!e.elElement)throw new Error("Cannot append "+e+" to "+t);e.elElement.appendChild(t)}},isElement:function(t){return"object"===("undefined"==typeof HTMLElement?"undefined":o(HTMLElement))?t instanceof HTMLElement:t&&"object"===o(t)&&null!==t&&1===t.nodeType&&"string"==typeof t.nodeName},scrollInView:function(t,e){var n=getComputedStyle(t).getPropertyValue("borderTopWidth"),r=n?parseFloat(n):0,i=getComputedStyle(t).getPropertyValue("paddingTop"),o=i?parseFloat(i):0,l=t.getBoundingClientRect(),a=e.getBoundingClientRect().top+document.body.scrollTop-(l.top+document.body.scrollTop)-r-o,s=t.scrollTop,u=t.clientHeight,c=this.getOuterHeight(e);a<0?t.scrollTop=s+a:a+c>u&&(t.scrollTop=s+a-u+c)},clearSelection: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(t){}},getSelection:function(){return window.getSelection?window.getSelection().toString():document.getSelection?document.getSelection().toString():document.selection?document.selection.createRange().text:null},calculateScrollbarWidth:function(){if(null!=this.calculatedScrollbarWidth)return this.calculatedScrollbarWidth;var t=document.createElement("div");this.addStyles(t,{width:"100px",height:"100px",overflow:"scroll",position:"absolute",top:"-9999px"}),document.body.appendChild(t);var e=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),this.calculatedScrollbarWidth=e,e},calculateBodyScrollbarWidth:function(){return window.innerWidth-document.documentElement.offsetWidth},getBrowser:function(){if(!this.browser){var t=this.resolveUserAgent();this.browser={},t.browser&&(this.browser[t.browser]=!0,this.browser.version=t.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser},resolveUserAgent:function(){var t=navigator.userAgent.toLowerCase(),e=/(chrome)[ ]([\w.]+)/.exec(t)||/(webkit)[ ]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ ]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[];return{browser:e[1]||"",version:e[2]||"0"}},isVisible:function(t){return t&&null!=t.offsetParent},invokeElementMethod:function(t,e,n){t[e].apply(t,n)},isExist:function(t){return!(null==t||!t.nodeName||!t.parentNode)},isClient:function(){return!("undefined"==typeof window||!window.document||!window.document.createElement)},focus:function(t,e){t&&document.activeElement!==t&&t.focus(e)},isFocusableElement:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return!!this.isElement(t)&&t.matches('button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])'.concat(e,',\n [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(e,',\n input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(e,',\n select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(e,',\n textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(e,',\n [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(e,',\n [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(e))},getFocusableElements:function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=[],o=e(this.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)));try{for(o.s();!(n=o.n()).done;){var l=n.value;"none"!=getComputedStyle(l).display&&"hidden"!=getComputedStyle(l).visibility&&i.push(l)}}catch(t){o.e(t)}finally{o.f()}return i},getFirstFocusableElement:function(t,e){var n=this.getFocusableElements(t,e);return n.length>0?n[0]:null},getLastFocusableElement:function(t,e){var n=this.getFocusableElements(t,e);return n.length>0?n[n.length-1]:null},getNextFocusableElement:function(t,e,n){var r=this.getFocusableElements(t,n),i=r.length>0?r.findIndex((function(t){return t===e})):-1,o=i>-1&&r.length>=i+1?i+1:-1;return o>-1?r[o]:null},getPreviousElementSibling:function(t,e){for(var n=t.previousElementSibling;n;){if(n.matches(e))return n;n=n.previousElementSibling}return null},getNextElementSibling:function(t,e){for(var n=t.nextElementSibling;n;){if(n.matches(e))return n;n=n.nextElementSibling}return null},isClickable:function(t){if(t){var e=t.nodeName,n=t.parentElement&&t.parentElement.nodeName;return"INPUT"===e||"TEXTAREA"===e||"BUTTON"===e||"A"===e||"INPUT"===n||"TEXTAREA"===n||"BUTTON"===n||"A"===n||!!t.closest(".p-button, .p-checkbox, .p-radiobutton")}return!1},applyStyle:function(t,e){if("string"==typeof e)t.style.cssText=e;else for(var n in e)t.style[n]=e[n]},isIOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream},isAndroid:function(){return/(android)/i.test(navigator.userAgent)},isTouchDevice:function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0},hasCSSAnimation:function(t){if(t){var e=getComputedStyle(t);return parseFloat(e.getPropertyValue("animation-duration")||"0")>0}return!1},hasCSSTransition:function(t){if(t){var e=getComputedStyle(t);return parseFloat(e.getPropertyValue("transition-duration")||"0")>0}return!1},exportCSV:function(t,e){var n=new Blob([t],{type:"application/csv;charset=utf-8;"});if(window.navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(n,e+".csv");else{var r=document.createElement("a");void 0!==r.download?(r.setAttribute("href",URL.createObjectURL(n)),r.setAttribute("download",e+".csv"),r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r)):(t="data:text/csv;charset=utf-8,"+t,window.open(encodeURI(t)))}},blockBodyScroll:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"p-overflow-hidden";document.body.style.setProperty("--scrollbar-width",this.calculateBodyScrollbarWidth()+"px"),this.addClass(document.body,t)},unblockBodyScroll:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"p-overflow-hidden";document.body.style.removeProperty("--scrollbar-width"),this.removeClass(document.body,t)}};function h(t){return h="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},h(t)}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,g(r.key),r)}}function g(t){var e=m(t,"string");return"symbol"==h(e)?e:String(e)}function m(t,e){if("object"!=h(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var v=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};p(this,t),this.element=e,this.listener=n}var e,n,r;return e=t,(n=[{key:"bindScrollListener",value:function(){this.scrollableParents=d.getScrollableParents(this.element);for(var t=0;t<this.scrollableParents.length;t++)this.scrollableParents[t].addEventListener("scroll",this.listener)}},{key:"unbindScrollListener",value:function(){if(this.scrollableParents)for(var t=0;t<this.scrollableParents.length;t++)this.scrollableParents[t].removeEventListener("scroll",this.listener)}},{key:"destroy",value:function(){this.unbindScrollListener(),this.element=null,this.listener=null,this.scrollableParents=null}}])&&y(e.prototype,n),r&&y(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function b(t,e){return E(t)||S(t,e)||I(t,e)||w()}function w(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function S(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,l,a=[],s=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(a.push(r.value),a.length!==e);s=!0);}catch(t){u=!0,i=t}finally{try{if(!s&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw i}}return a}}function E(t){if(Array.isArray(t))return t}function x(t){return O(t)||C(t)||I(t)||A()}function A(){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 C(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function O(t){if(Array.isArray(t))return T(t)}function F(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=I(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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(t)},n:function(){var t=n.next();return l=t.done,t},e:function(t){a=!0,o=t},f:function(){try{l||null==n.return||n.return()}finally{if(a)throw o}}}}function I(t,e){if(t){if("string"==typeof t)return T(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(t,e):void 0}}function T(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function j(t){return j="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},j(t)}var P={equals:function(t,e,n){return n?this.resolveFieldData(t,n)===this.resolveFieldData(e,n):this.deepEquals(t,e)},deepEquals:function(t,e){if(t===e)return!0;if(t&&e&&"object"==j(t)&&"object"==j(e)){var n,r,i,o=Array.isArray(t),l=Array.isArray(e);if(o&&l){if((r=t.length)!=e.length)return!1;for(n=r;0!=n--;)if(!this.deepEquals(t[n],e[n]))return!1;return!0}if(o!=l)return!1;var a=t instanceof Date,s=e instanceof Date;if(a!=s)return!1;if(a&&s)return t.getTime()==e.getTime();var u=t instanceof RegExp,c=e instanceof RegExp;if(u!=c)return!1;if(u&&c)return t.toString()==e.toString();var f=Object.keys(t);if((r=f.length)!==Object.keys(e).length)return!1;for(n=r;0!=n--;)if(!Object.prototype.hasOwnProperty.call(e,f[n]))return!1;for(n=r;0!=n--;)if(!this.deepEquals(t[i=f[n]],e[i]))return!1;return!0}return t!=t&&e!=e},resolveFieldData:function(t,e){if(!t||!e)return null;try{var n=t[e];if(this.isNotEmpty(n))return n}catch(t){}if(Object.keys(t).length){if(this.isFunction(e))return e(t);if(-1===e.indexOf("."))return t[e];for(var r=e.split("."),i=t,o=0,l=r.length;o<l;++o){if(null==i)return null;i=i[r[o]]}return i}return null},getItemValue:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return this.isFunction(t)?t.apply(void 0,n):t},filter:function(t,e,n){var r=[];if(t){var i,o=F(t);try{for(o.s();!(i=o.n()).done;){var l,a=i.value,s=F(e);try{for(s.s();!(l=s.n()).done;){if(String(this.resolveFieldData(a,l.value)).toLowerCase().indexOf(n.toLowerCase())>-1){r.push(a);break}}}catch(t){s.e(t)}finally{s.f()}}}catch(t){o.e(t)}finally{o.f()}}return r},reorderArray:function(t,e,n){t&&e!==n&&(n>=t.length&&(n%=t.length,e%=t.length),t.splice(n,0,t.splice(e,1)[0]))},findIndexInList:function(t,e){var n=-1;if(e)for(var r=0;r<e.length;r++)if(e[r]===t){n=r;break}return n},contains:function(t,e){if(null!=t&&e&&e.length){var n,r=F(e);try{for(r.s();!(n=r.n()).done;){if(this.equals(t,n.value))return!0}}catch(t){r.e(t)}finally{r.f()}}return!1},insertIntoOrderedArray:function(t,e,n,r){if(n.length>0){for(var i=!1,o=0;o<n.length;o++){if(this.findIndexInList(n[o],r)>e){n.splice(o,0,t),i=!0;break}}i||n.push(t)}else n.push(t)},removeAccents:function(t){return t&&t.search(/[\xC0-\xFF]/g)>-1&&(t=t.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")),t},getVNodeProp:function(t,e){var n=t.props;if(n){var r=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=Object.prototype.hasOwnProperty.call(n,r)?r:e;return t.type.extends.props[e].type===Boolean&&""===n[i]||n[i]}return null},toFlatCase:function(t){return this.isString(t)?t.replace(/(-|_)/g,"").toLowerCase():t},toKebabCase:function(t){return this.isString(t)?t.replace(/(_)/g,"-").replace(/[A-Z]/g,(function(t,e){return 0===e?t:"-"+t.toLowerCase()})).toLowerCase():t},toCapitalCase:function(t){return this.isString(t,{empty:!1})?t[0].toUpperCase()+t.slice(1):t},isEmpty:function(t){return null==t||""===t||Array.isArray(t)&&0===t.length||!(t instanceof Date)&&"object"===j(t)&&0===Object.keys(t).length},isNotEmpty:function(t){return!this.isEmpty(t)},isFunction:function(t){return!!(t&&t.constructor&&t.call&&t.apply)},isObject:function(t){return t instanceof Object&&t.constructor===Object&&(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]||0!==Object.keys(t).length)},isDate:function(t){return t instanceof Date&&t.constructor===Date},isArray:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Array.isArray(t)&&(e||0!==t.length)},isString:function(t){return"string"==typeof t&&(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]||""!==t)},isPrintableCharacter:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.isNotEmpty(t)&&1===t.length&&t.match(/\S| /)},findLast:function(t,e){var n;if(this.isNotEmpty(t))try{n=t.findLast(e)}catch(r){n=x(t).reverse().find(e)}return n},findLastIndex:function(t,e){var n=-1;if(this.isNotEmpty(t))try{n=t.findLastIndex(e)}catch(r){n=t.lastIndexOf(x(t).reverse().find(e))}return n},sort:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,i=this.compare(t,e,arguments.length>3?arguments[3]:void 0,n),o=n;return(this.isEmpty(t)||this.isEmpty(e))&&(o=1===r?n:r),o*i},compare:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=this.isEmpty(t),o=this.isEmpty(e);return i&&o?0:i?r:o?-r:"string"==typeof t&&"string"==typeof e?n(t,e):t<e?-1:t>e?1:0},localeComparator:function(){return new Intl.Collator(void 0,{numeric:!0}).compare},nestedKeys:function(){var t=this,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object.entries(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).reduce((function(n,r){var i=b(r,2),o=i[0],l=i[1],a=e?"".concat(e,".").concat(o):o;return t.isObject(l)?n=n.concat(t.nestedKeys(l,a)):n.push(a),n}),[])},stringify:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=" ".repeat(r),o=" ".repeat(r+n);return this.isArray(t)?"["+t.map((function(t){return e.stringify(t,n,r+n)})).join(", ")+"]":this.isDate(t)?t.toISOString():this.isFunction(t)?t.toString():this.isObject(t)?"{\n"+Object.entries(t).map((function(t){var i=b(t,2),l=i[0],a=i[1];return"".concat(o).concat(l,": ").concat(e.stringify(a,n,r+n))})).join(",\n")+"\n".concat(i)+"}":JSON.stringify(t)}},L=0;function W(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function N(t,e){if(t){if("string"==typeof t)return k(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(t,e):void 0}}function D(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function H(t){if(Array.isArray(t))return k(t)}function k(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var B,R,U,V,q,M=(B=[],R=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:999,r=V(t,e,n),i=r.value+(r.key===t?0:n)+1;return B.push({key:t,value:i}),i},U=function(t,e){return V(t,e).value},V=function(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return(n=B,H(n)||D(n)||N(n)||W()).reverse().find((function(n){return!!e||n.key===t}))||{key:t,value:r}},{get:q=function(t){return t&&parseInt(t.style.zIndex,10)||0},set:function(t,e,n){e&&(e.style.zIndex=String(R(t,!0,n)))},clear:function(t){var e;t&&(e=q(t),B=B.filter((function(t){return t.value!==e})),t.style.zIndex="")},getCurrent:function(t){return U(t,!0)}});return t.ConnectedOverlayScrollHandler=v,t.DomHandler=d,t.EventBus=function(){var t=new Map;return{on:function(e,n){var r=t.get(e);r?r.push(n):r=[n],t.set(e,r)},off:function(e,n){var r=t.get(e);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(e,n){var r=t.get(e);r&&r.slice().map((function(t){t(n)}))}}},t.ObjectUtils=P,t.UniqueComponentId=function(){return L++,"".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"pv_id_").concat(L)},t.ZIndexUtils=M,Object.defineProperty(t,"__esModule",{value:!0}),t}({});
|
|
@@ -233,7 +233,7 @@ export default {
|
|
|
233
233
|
if (this.element) {
|
|
234
234
|
const both = this.isBoth();
|
|
235
235
|
const horizontal = this.isHorizontal();
|
|
236
|
-
const { scrollTop, scrollLeft } = this.element
|
|
236
|
+
const { scrollTop, scrollLeft } = this.element;
|
|
237
237
|
|
|
238
238
|
if (both) {
|
|
239
239
|
firstInViewport = { rows: calculateFirstInViewport(scrollTop, this.itemSize[0]), cols: calculateFirstInViewport(scrollLeft, this.itemSize[1]) };
|
|
@@ -112,8 +112,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
112
112
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
113
113
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
114
114
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
115
|
-
function _toPropertyKey(
|
|
116
|
-
function _toPrimitive(
|
|
115
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
116
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
117
117
|
var script = {
|
|
118
118
|
name: 'VirtualScroller',
|
|
119
119
|
"extends": script$1,
|
|
@@ -350,9 +350,9 @@ var script = {
|
|
|
350
350
|
if (this.element) {
|
|
351
351
|
var both = this.isBoth();
|
|
352
352
|
var horizontal = this.isHorizontal();
|
|
353
|
-
var _this$element
|
|
354
|
-
scrollTop = _this$element
|
|
355
|
-
scrollLeft = _this$element
|
|
353
|
+
var _this$element = this.element,
|
|
354
|
+
scrollTop = _this$element.scrollTop,
|
|
355
|
+
scrollLeft = _this$element.scrollLeft;
|
|
356
356
|
if (both) {
|
|
357
357
|
firstInViewport = {
|
|
358
358
|
rows: calculateFirstInViewport(scrollTop, this.itemSize[0]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var t=require("primevue/icons/spinner"),e=require("primevue/utils"),i=require("primevue/basecomponent"),s=require("primevue/virtualscroller/style"),o=require("vue");function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var l=n(t),r=n(i),a=n(s);function h(t){return h="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},h(t)}function c(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,s)}return i}function u(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?c(Object(i),!0).forEach((function(e){d(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):c(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function d(t,e,i){return(e=m(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function m(t){var e=f(t,"string");return"symbol"===h(e)?e:String(e)}function f(t,e){if("object"!==h(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,e||"default");if("object"!==h(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var p={name:"VirtualScroller",extends:{name:"BaseVirtualScroller",extends:r.default,props:{id:{type:String,default:null},style:null,class:null,items:{type:Array,default:null},itemSize:{type:[Number,Array],default:0},scrollHeight:null,scrollWidth:null,orientation:{type:String,default:"vertical"},numToleratedItems:{type:Number,default:null},delay:{type:Number,default:0},resizeDelay:{type:Number,default:10},lazy:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loaderDisabled:{type:Boolean,default:!1},columns:{type:Array,default:null},loading:{type:Boolean,default:!1},showSpacer:{type:Boolean,default:!0},showLoader:{type:Boolean,default:!1},tabindex:{type:Number,default:0},inline:{type:Boolean,default:!1},step:{type:Number,default:0},appendOnly:{type:Boolean,default:!1},autoSize:{type:Boolean,default:!1}},style:a.default,provide:function(){return{$parentInstance:this}},beforeMount:function(){a.default.loadStyle()}},emits:["update:numToleratedItems","scroll","scroll-index-change","lazy-load"],data:function(){return{first:this.isBoth()?{rows:0,cols:0}:0,last:this.isBoth()?{rows:0,cols:0}:0,page:this.isBoth()?{rows:0,cols:0}:0,numItemsInViewport:this.isBoth()?{rows:0,cols:0}:0,lastScrollPos:this.isBoth()?{top:0,left:0}:0,d_numToleratedItems:this.numToleratedItems,d_loading:this.loading,loaderArr:[],spacerStyle:{},contentStyle:{}}},element:null,content:null,lastScrollPos:null,scrollTimeout:null,resizeTimeout:null,defaultWidth:0,defaultHeight:0,defaultContentWidth:0,defaultContentHeight:0,isRangeChanged:!1,lazyLoadState:{},resizeListener:null,initialized:!1,watch:{numToleratedItems:function(t){this.d_numToleratedItems=t},loading:function(t){this.d_loading=t},items:function(t,e){e&&e.length===(t||[]).length||(this.init(),this.calculateAutoSize())},itemSize:function(){this.init(),this.calculateAutoSize()},orientation:function(){this.lastScrollPos=this.isBoth()?{top:0,left:0}:0},scrollHeight:function(){this.init(),this.calculateAutoSize()},scrollWidth:function(){this.init(),this.calculateAutoSize()}},mounted:function(){this.viewInit(),this.lastScrollPos=this.isBoth()?{top:0,left:0}:0,this.lazyLoadState=this.lazyLoadState||{}},updated:function(){!this.initialized&&this.viewInit()},unmounted:function(){this.unbindResizeListener(),this.initialized=!1},methods:{viewInit:function(){e.DomHandler.isVisible(this.element)&&(this.setContentEl(this.content),this.init(),this.bindResizeListener(),this.defaultWidth=e.DomHandler.getWidth(this.element),this.defaultHeight=e.DomHandler.getHeight(this.element),this.defaultContentWidth=e.DomHandler.getWidth(this.content),this.defaultContentHeight=e.DomHandler.getHeight(this.content),this.initialized=!0)},init:function(){this.disabled||(this.setSize(),this.calculateOptions(),this.setSpacerSize())},isVertical:function(){return"vertical"===this.orientation},isHorizontal:function(){return"horizontal"===this.orientation},isBoth:function(){return"both"===this.orientation},scrollTo:function(t){this.lastScrollPos=this.both?{top:0,left:0}:0,this.element&&this.element.scrollTo(t)},scrollToIndex:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto",s=this.isBoth(),o=this.isHorizontal(),n=this.first,l=this.calculateNumItems().numToleratedItems,r=this.getContentPosition(),a=this.itemSize,h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t<=(arguments.length>1?arguments[1]:void 0)?0:t},c=function(t,e,i){return t*e+i},u=function(){return e.scrollTo({left:arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,top:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,behavior:i})},d=s?{rows:0,cols:0}:0,m=!1;s?(u(c((d={rows:h(t[0],l[0]),cols:h(t[1],l[1])}).cols,a[1],r.left),c(d.rows,a[0],r.top)),m=d.rows!==n.rows||d.cols!==n.cols):(d=h(t,l),o?u(c(d,a,r.left),0):u(0,c(d,a,r.top)),m=d!==n),this.isRangeChanged=m,this.first=d},scrollInView:function(t,e){var i=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"auto";if(e){var o=this.isBoth(),n=this.isHorizontal(),l=this.getRenderedRange(),r=l.first,a=l.viewport,h=function(){return i.scrollTo({left:arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,top:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,behavior:s})},c="to-end"===e;if("to-start"===e){if(o)a.first.rows-r.rows>t[0]?h(a.first.cols*this.itemSize[1],(a.first.rows-1)*this.itemSize[0]):a.first.cols-r.cols>t[1]&&h((a.first.cols-1)*this.itemSize[1],a.first.rows*this.itemSize[0]);else if(a.first-r>t){var u=(a.first-1)*this.itemSize;n?h(u,0):h(0,u)}}else if(c)if(o)a.last.rows-r.rows<=t[0]+1?h(a.first.cols*this.itemSize[1],(a.first.rows+1)*this.itemSize[0]):a.last.cols-r.cols<=t[1]+1&&h((a.first.cols+1)*this.itemSize[1],a.first.rows*this.itemSize[0]);else if(a.last-r<=t+1){var d=(a.first+1)*this.itemSize;n?h(d,0):h(0,d)}}else this.scrollToIndex(t,s)},getRenderedRange:function(){var t=function(t,e){return Math.floor(t/(e||t))},e=this.first,i=0;if(this.element){var s=this.isBoth(),o=this.isHorizontal(),n=this.element.scrollTop,l=n.scrollTop,r=n.scrollLeft;if(s)i={rows:(e={rows:t(l,this.itemSize[0]),cols:t(r,this.itemSize[1])}).rows+this.numItemsInViewport.rows,cols:e.cols+this.numItemsInViewport.cols};else i=(e=t(o?r:l,this.itemSize))+this.numItemsInViewport}return{first:this.first,last:this.last,viewport:{first:e,last:i}}},calculateNumItems:function(){var t=this.isBoth(),e=this.isHorizontal(),i=this.itemSize,s=this.getContentPosition(),o=this.element?this.element.offsetWidth-s.left:0,n=this.element?this.element.offsetHeight-s.top:0,l=function(t,e){return Math.ceil(t/(e||t))},r=function(t){return Math.ceil(t/2)},a=t?{rows:l(n,i[0]),cols:l(o,i[1])}:l(e?o:n,i);return{numItemsInViewport:a,numToleratedItems:this.d_numToleratedItems||(t?[r(a.rows),r(a.cols)]:r(a))}},calculateOptions:function(){var t=this,e=this.isBoth(),i=this.first,s=this.calculateNumItems(),o=s.numItemsInViewport,n=s.numToleratedItems,l=function(e,i,s){return t.getLast(e+i+(e<s?2:3)*s,arguments.length>3&&void 0!==arguments[3]&&arguments[3])},r=e?{rows:l(i.rows,o.rows,n[0]),cols:l(i.cols,o.cols,n[1],!0)}:l(i,o,n);this.last=r,this.numItemsInViewport=o,this.d_numToleratedItems=n,this.$emit("update:numToleratedItems",this.d_numToleratedItems),this.showLoader&&(this.loaderArr=e?Array.from({length:o.rows}).map((function(){return Array.from({length:o.cols})})):Array.from({length:o})),this.lazy&&Promise.resolve().then((function(){t.lazyLoadState={first:t.step?e?{rows:0,cols:i.cols}:0:i,last:Math.min(t.step?t.step:r,t.items.length)},t.$emit("lazy-load",t.lazyLoadState)}))},calculateAutoSize:function(){var t=this;this.autoSize&&!this.d_loading&&Promise.resolve().then((function(){if(t.content){var i=t.isBoth(),s=t.isHorizontal(),o=t.isVertical();t.content.style.minHeight=t.content.style.minWidth="auto",t.content.style.position="relative",t.element.style.contain="none";var n=[e.DomHandler.getWidth(t.content),e.DomHandler.getHeight(t.content)],l=n[1];n[0]!==t.defaultContentWidth&&(t.element.style.width=""),l!==t.defaultContentHeight&&(t.element.style.height="");var r=[e.DomHandler.getWidth(t.element),e.DomHandler.getHeight(t.element)],a=r[0],h=r[1];(i||s)&&(t.element.style.width=a<t.defaultWidth?a+"px":t.scrollWidth||t.defaultWidth+"px"),(i||o)&&(t.element.style.height=h<t.defaultHeight?h+"px":t.scrollHeight||t.defaultHeight+"px"),t.content.style.minHeight=t.content.style.minWidth="",t.content.style.position="",t.element.style.contain=""}}))},getLast:function(){return this.items?Math.min((arguments.length>1?arguments[1]:void 0)?(this.columns||this.items[0]).length:this.items.length,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0):0},getContentPosition:function(){if(this.content){var t=getComputedStyle(this.content),e=parseFloat(t.paddingLeft)+Math.max(parseFloat(t.left)||0,0),i=parseFloat(t.paddingRight)+Math.max(parseFloat(t.right)||0,0),s=parseFloat(t.paddingTop)+Math.max(parseFloat(t.top)||0,0),o=parseFloat(t.paddingBottom)+Math.max(parseFloat(t.bottom)||0,0);return{left:e,right:i,top:s,bottom:o,x:e+i,y:s+o}}return{left:0,right:0,top:0,bottom:0,x:0,y:0}},setSize:function(){var t=this;if(this.element){var e=this.isBoth(),i=this.isHorizontal(),s=this.element.parentElement,o=this.scrollWidth||"".concat(this.element.offsetWidth||s.offsetWidth,"px"),n=this.scrollHeight||"".concat(this.element.offsetHeight||s.offsetHeight,"px"),l=function(e,i){return t.element.style[e]=i};e||i?(l("height",n),l("width",o)):l("height",n)}},setSpacerSize:function(){var t=this,e=this.items;if(e){var i=this.isBoth(),s=this.isHorizontal(),o=this.getContentPosition(),n=function(e,i,s){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return t.spacerStyle=u(u({},t.spacerStyle),d({},"".concat(e),(i||[]).length*s+o+"px"))};i?(n("height",e,this.itemSize[0],o.y),n("width",this.columns||e[1],this.itemSize[1],o.x)):s?n("width",this.columns||e,this.itemSize,o.x):n("height",e,this.itemSize,o.y)}},setContentPosition:function(t){var e=this;if(this.content&&!this.appendOnly){var i=this.isBoth(),s=this.isHorizontal(),o=t?t.first:this.first,n=function(t,e){return t*e},l=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.contentStyle=u(u({},e.contentStyle),{transform:"translate3d(".concat(t,"px, ").concat(i,"px, 0)")})};if(i)l(n(o.cols,this.itemSize[1]),n(o.rows,this.itemSize[0]));else{var r=n(o,this.itemSize);s?l(r,0):l(0,r)}}},onScrollPositionChange:function(t){var e=this,i=t.target,s=this.isBoth(),o=this.isHorizontal(),n=this.getContentPosition(),l=function(t,e){return t?t>e?t-e:t:0},r=function(t,e){return Math.floor(t/(e||t))},a=function(t,e,i,s,o,n){return t<=o?o:n?i-s-o:e+o-1},h=function(t,e,i,s,o,n,l){return t<=n?0:Math.max(0,l?t<e?i:t-n:t>e?i:t-2*n)},c=function(t,i,s,o,n,l){var r=i+o+2*n;return t>=n&&(r+=n+1),e.getLast(r,l)},u=l(i.scrollTop,n.top),d=l(i.scrollLeft,n.left),m=s?{rows:0,cols:0}:0,f=this.last,p=!1,g=this.lastScrollPos;if(s){var y=this.lastScrollPos.top<=u,v=this.lastScrollPos.left<=d;if(!this.appendOnly||this.appendOnly&&(y||v)){var S={rows:r(u,this.itemSize[0]),cols:r(d,this.itemSize[1])},w={rows:a(S.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],y),cols:a(S.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],v)};m={rows:h(S.rows,w.rows,this.first.rows,0,0,this.d_numToleratedItems[0],y),cols:h(S.cols,w.cols,this.first.cols,0,0,this.d_numToleratedItems[1],v)},f={rows:c(S.rows,m.rows,0,this.numItemsInViewport.rows,this.d_numToleratedItems[0]),cols:c(S.cols,m.cols,0,this.numItemsInViewport.cols,this.d_numToleratedItems[1],!0)},p=m.rows!==this.first.rows||f.rows!==this.last.rows||m.cols!==this.first.cols||f.cols!==this.last.cols||this.isRangeChanged,g={top:u,left:d}}}else{var z=o?d:u,I=this.lastScrollPos<=z;if(!this.appendOnly||this.appendOnly&&I){var b=r(z,this.itemSize);f=c(b,m=h(b,a(b,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,I),this.first,0,0,this.d_numToleratedItems,I),0,this.numItemsInViewport,this.d_numToleratedItems),p=m!==this.first||f!==this.last||this.isRangeChanged,g=z}}return{first:m,last:f,isRangeChanged:p,scrollPos:g}},onScrollChange:function(t){var e=this.onScrollPositionChange(t),i=e.first,s=e.last,o=e.scrollPos;if(e.isRangeChanged){var n={first:i,last:s};if(this.setContentPosition(n),this.first=i,this.last=s,this.lastScrollPos=o,this.$emit("scroll-index-change",n),this.lazy&&this.isPageChanged(i)){var l={first:this.step?Math.min(this.getPageByFirst(i)*this.step,this.items.length-this.step):i,last:Math.min(this.step?(this.getPageByFirst(i)+1)*this.step:s,this.items.length)};(this.lazyLoadState.first!==l.first||this.lazyLoadState.last!==l.last)&&this.$emit("lazy-load",l),this.lazyLoadState=l}}},onScroll:function(t){var e=this;if(this.$emit("scroll",t),this.delay&&this.isPageChanged()){if(this.scrollTimeout&&clearTimeout(this.scrollTimeout),!this.d_loading&&this.showLoader)(this.onScrollPositionChange(t).isRangeChanged||!!this.step&&this.isPageChanged())&&(this.d_loading=!0);this.scrollTimeout=setTimeout((function(){e.onScrollChange(t),!e.d_loading||!e.showLoader||e.lazy&&void 0!==e.loading||(e.d_loading=!1,e.page=e.getPageByFirst())}),this.delay)}else this.onScrollChange(t)},onResize:function(){var t=this;this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((function(){if(e.DomHandler.isVisible(t.element)){var i=t.isBoth(),s=t.isVertical(),o=t.isHorizontal(),n=[e.DomHandler.getWidth(t.element),e.DomHandler.getHeight(t.element)],l=n[0],r=n[1],a=l!==t.defaultWidth,h=r!==t.defaultHeight;(i?a||h:o?a:!!s&&h)&&(t.d_numToleratedItems=t.numToleratedItems,t.defaultWidth=l,t.defaultHeight=r,t.defaultContentWidth=e.DomHandler.getWidth(t.content),t.defaultContentHeight=e.DomHandler.getHeight(t.content),t.init())}}),this.resizeDelay)},bindResizeListener:function(){this.resizeListener||(this.resizeListener=this.onResize.bind(this),window.addEventListener("resize",this.resizeListener),window.addEventListener("orientationchange",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),window.removeEventListener("orientationchange",this.resizeListener),this.resizeListener=null)},getOptions:function(t){var e=(this.items||[]).length,i=this.isBoth()?this.first.rows+t:this.first+t;return{index:i,count:e,first:0===i,last:i===e-1,even:i%2==0,odd:i%2!=0}},getLoaderOptions:function(t,e){var i=this.loaderArr.length;return u({index:t,count:i,first:0===t,last:t===i-1,even:t%2==0,odd:t%2!=0},e)},getPageByFirst:function(t){return Math.floor(((null!=t?t:this.first)+4*this.d_numToleratedItems)/(this.step||1))},isPageChanged:function(t){return!this.step||this.page!==this.getPageByFirst(null!=t?t:this.first)},setContentEl:function(t){this.content=t||this.content||e.DomHandler.findSingle(this.element,'[data-pc-section="content"]')},elementRef:function(t){this.element=t},contentRef:function(t){this.content=t}},computed:{containerClass:function(){return["p-virtualscroller",this.class,{"p-virtualscroller-inline":this.inline,"p-virtualscroller-both p-both-scroll":this.isBoth(),"p-virtualscroller-horizontal p-horizontal-scroll":this.isHorizontal()}]},contentClass:function(){return["p-virtualscroller-content",{"p-virtualscroller-loading":this.d_loading}]},loaderClass:function(){return["p-virtualscroller-loader",{"p-component-overlay":!this.$slots.loader}]},loadedItems:function(){var t=this;return this.items&&!this.d_loading?this.isBoth()?this.items.slice(this.appendOnly?0:this.first.rows,this.last.rows).map((function(e){return t.columns?e:e.slice(t.appendOnly?0:t.first.cols,t.last.cols)})):this.isHorizontal()&&this.columns?this.items:this.items.slice(this.appendOnly?0:this.first,this.last):[]},loadedRows:function(){return this.d_loading?this.loaderDisabled?this.loaderArr:[]:this.loadedItems},loadedColumns:function(){if(this.columns){var t=this.isBoth(),e=this.isHorizontal();if(t||e)return this.d_loading&&this.loaderDisabled?t?this.loaderArr[0]:this.loaderArr:this.columns.slice(t?this.first.cols:this.first,t?this.last.cols:this.last)}return this.columns}},components:{SpinnerIcon:l.default}},g=["tabindex"];p.render=function(t,e,i,s,n,l){var r=o.resolveComponent("SpinnerIcon");return t.disabled?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.renderSlot(t.$slots,"default"),o.renderSlot(t.$slots,"content",{items:t.items,rows:t.items,columns:l.loadedColumns})],64)):(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0,ref:l.elementRef,class:l.containerClass,tabindex:t.tabindex,style:t.style,onScroll:e[0]||(e[0]=function(){return l.onScroll&&l.onScroll.apply(l,arguments)})},t.ptm("root"),{"data-pc-name":"virtualscroller"}),[o.renderSlot(t.$slots,"content",{styleClass:l.contentClass,items:l.loadedItems,getItemOptions:l.getOptions,loading:n.d_loading,getLoaderOptions:l.getLoaderOptions,itemSize:t.itemSize,rows:l.loadedRows,columns:l.loadedColumns,contentRef:l.contentRef,spacerStyle:n.spacerStyle,contentStyle:n.contentStyle,vertical:l.isVertical(),horizontal:l.isHorizontal(),both:l.isBoth()},(function(){return[o.createElementVNode("div",o.mergeProps({ref:l.contentRef,class:l.contentClass,style:n.contentStyle},t.ptm("content")),[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l.loadedItems,(function(e,i){return o.renderSlot(t.$slots,"item",{key:i,item:e,options:l.getOptions(i)})})),128))],16)]})),t.showSpacer?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0,class:"p-virtualscroller-spacer",style:n.spacerStyle},t.ptm("spacer")),null,16)):o.createCommentVNode("",!0),!t.loaderDisabled&&t.showLoader&&n.d_loading?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:1,class:l.loaderClass},t.ptm("loader")),[t.$slots&&t.$slots.loader?(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:0},o.renderList(n.loaderArr,(function(e,i){return o.renderSlot(t.$slots,"loader",{key:i,options:l.getLoaderOptions(i,l.isBoth()&&{numCols:t.d_numItemsInViewport.cols})})})),128)):o.createCommentVNode("",!0),o.renderSlot(t.$slots,"loadingicon",{},(function(){return[o.createVNode(r,o.mergeProps({spin:"",class:"p-virtualscroller-loading-icon"},t.ptm("loadingIcon")),null,16)]}))],16)):o.createCommentVNode("",!0)],16,g))},module.exports=p;
|
|
1
|
+
"use strict";var t=require("primevue/icons/spinner"),e=require("primevue/utils"),i=require("primevue/basecomponent"),s=require("primevue/virtualscroller/style"),o=require("vue");function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var l=n(t),r=n(i),a=n(s);function h(t){return h="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},h(t)}function c(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,s)}return i}function u(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?c(Object(i),!0).forEach((function(e){d(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):c(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function d(t,e,i){var s;return(e="symbol"==h(s=m(e,"string"))?s:String(s))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function m(t,e){if("object"!=h(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,e||"default");if("object"!=h(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var f={name:"VirtualScroller",extends:{name:"BaseVirtualScroller",extends:r.default,props:{id:{type:String,default:null},style:null,class:null,items:{type:Array,default:null},itemSize:{type:[Number,Array],default:0},scrollHeight:null,scrollWidth:null,orientation:{type:String,default:"vertical"},numToleratedItems:{type:Number,default:null},delay:{type:Number,default:0},resizeDelay:{type:Number,default:10},lazy:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loaderDisabled:{type:Boolean,default:!1},columns:{type:Array,default:null},loading:{type:Boolean,default:!1},showSpacer:{type:Boolean,default:!0},showLoader:{type:Boolean,default:!1},tabindex:{type:Number,default:0},inline:{type:Boolean,default:!1},step:{type:Number,default:0},appendOnly:{type:Boolean,default:!1},autoSize:{type:Boolean,default:!1}},style:a.default,provide:function(){return{$parentInstance:this}},beforeMount:function(){a.default.loadStyle()}},emits:["update:numToleratedItems","scroll","scroll-index-change","lazy-load"],data:function(){return{first:this.isBoth()?{rows:0,cols:0}:0,last:this.isBoth()?{rows:0,cols:0}:0,page:this.isBoth()?{rows:0,cols:0}:0,numItemsInViewport:this.isBoth()?{rows:0,cols:0}:0,lastScrollPos:this.isBoth()?{top:0,left:0}:0,d_numToleratedItems:this.numToleratedItems,d_loading:this.loading,loaderArr:[],spacerStyle:{},contentStyle:{}}},element:null,content:null,lastScrollPos:null,scrollTimeout:null,resizeTimeout:null,defaultWidth:0,defaultHeight:0,defaultContentWidth:0,defaultContentHeight:0,isRangeChanged:!1,lazyLoadState:{},resizeListener:null,initialized:!1,watch:{numToleratedItems:function(t){this.d_numToleratedItems=t},loading:function(t){this.d_loading=t},items:function(t,e){e&&e.length===(t||[]).length||(this.init(),this.calculateAutoSize())},itemSize:function(){this.init(),this.calculateAutoSize()},orientation:function(){this.lastScrollPos=this.isBoth()?{top:0,left:0}:0},scrollHeight:function(){this.init(),this.calculateAutoSize()},scrollWidth:function(){this.init(),this.calculateAutoSize()}},mounted:function(){this.viewInit(),this.lastScrollPos=this.isBoth()?{top:0,left:0}:0,this.lazyLoadState=this.lazyLoadState||{}},updated:function(){!this.initialized&&this.viewInit()},unmounted:function(){this.unbindResizeListener(),this.initialized=!1},methods:{viewInit:function(){e.DomHandler.isVisible(this.element)&&(this.setContentEl(this.content),this.init(),this.bindResizeListener(),this.defaultWidth=e.DomHandler.getWidth(this.element),this.defaultHeight=e.DomHandler.getHeight(this.element),this.defaultContentWidth=e.DomHandler.getWidth(this.content),this.defaultContentHeight=e.DomHandler.getHeight(this.content),this.initialized=!0)},init:function(){this.disabled||(this.setSize(),this.calculateOptions(),this.setSpacerSize())},isVertical:function(){return"vertical"===this.orientation},isHorizontal:function(){return"horizontal"===this.orientation},isBoth:function(){return"both"===this.orientation},scrollTo:function(t){this.lastScrollPos=this.both?{top:0,left:0}:0,this.element&&this.element.scrollTo(t)},scrollToIndex:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto",s=this.isBoth(),o=this.isHorizontal(),n=this.first,l=this.calculateNumItems().numToleratedItems,r=this.getContentPosition(),a=this.itemSize,h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t<=(arguments.length>1?arguments[1]:void 0)?0:t},c=function(t,e,i){return t*e+i},u=function(){return e.scrollTo({left:arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,top:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,behavior:i})},d=s?{rows:0,cols:0}:0,m=!1;s?(u(c((d={rows:h(t[0],l[0]),cols:h(t[1],l[1])}).cols,a[1],r.left),c(d.rows,a[0],r.top)),m=d.rows!==n.rows||d.cols!==n.cols):(d=h(t,l),o?u(c(d,a,r.left),0):u(0,c(d,a,r.top)),m=d!==n),this.isRangeChanged=m,this.first=d},scrollInView:function(t,e){var i=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"auto";if(e){var o=this.isBoth(),n=this.isHorizontal(),l=this.getRenderedRange(),r=l.first,a=l.viewport,h=function(){return i.scrollTo({left:arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,top:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,behavior:s})},c="to-end"===e;if("to-start"===e){if(o)a.first.rows-r.rows>t[0]?h(a.first.cols*this.itemSize[1],(a.first.rows-1)*this.itemSize[0]):a.first.cols-r.cols>t[1]&&h((a.first.cols-1)*this.itemSize[1],a.first.rows*this.itemSize[0]);else if(a.first-r>t){var u=(a.first-1)*this.itemSize;n?h(u,0):h(0,u)}}else if(c)if(o)a.last.rows-r.rows<=t[0]+1?h(a.first.cols*this.itemSize[1],(a.first.rows+1)*this.itemSize[0]):a.last.cols-r.cols<=t[1]+1&&h((a.first.cols+1)*this.itemSize[1],a.first.rows*this.itemSize[0]);else if(a.last-r<=t+1){var d=(a.first+1)*this.itemSize;n?h(d,0):h(0,d)}}else this.scrollToIndex(t,s)},getRenderedRange:function(){var t=function(t,e){return Math.floor(t/(e||t))},e=this.first,i=0;if(this.element){var s=this.isBoth(),o=this.isHorizontal(),n=this.element,l=n.scrollTop,r=n.scrollLeft;if(s)i={rows:(e={rows:t(l,this.itemSize[0]),cols:t(r,this.itemSize[1])}).rows+this.numItemsInViewport.rows,cols:e.cols+this.numItemsInViewport.cols};else i=(e=t(o?r:l,this.itemSize))+this.numItemsInViewport}return{first:this.first,last:this.last,viewport:{first:e,last:i}}},calculateNumItems:function(){var t=this.isBoth(),e=this.isHorizontal(),i=this.itemSize,s=this.getContentPosition(),o=this.element?this.element.offsetWidth-s.left:0,n=this.element?this.element.offsetHeight-s.top:0,l=function(t,e){return Math.ceil(t/(e||t))},r=function(t){return Math.ceil(t/2)},a=t?{rows:l(n,i[0]),cols:l(o,i[1])}:l(e?o:n,i);return{numItemsInViewport:a,numToleratedItems:this.d_numToleratedItems||(t?[r(a.rows),r(a.cols)]:r(a))}},calculateOptions:function(){var t=this,e=this.isBoth(),i=this.first,s=this.calculateNumItems(),o=s.numItemsInViewport,n=s.numToleratedItems,l=function(e,i,s){return t.getLast(e+i+(e<s?2:3)*s,arguments.length>3&&void 0!==arguments[3]&&arguments[3])},r=e?{rows:l(i.rows,o.rows,n[0]),cols:l(i.cols,o.cols,n[1],!0)}:l(i,o,n);this.last=r,this.numItemsInViewport=o,this.d_numToleratedItems=n,this.$emit("update:numToleratedItems",this.d_numToleratedItems),this.showLoader&&(this.loaderArr=e?Array.from({length:o.rows}).map((function(){return Array.from({length:o.cols})})):Array.from({length:o})),this.lazy&&Promise.resolve().then((function(){t.lazyLoadState={first:t.step?e?{rows:0,cols:i.cols}:0:i,last:Math.min(t.step?t.step:r,t.items.length)},t.$emit("lazy-load",t.lazyLoadState)}))},calculateAutoSize:function(){var t=this;this.autoSize&&!this.d_loading&&Promise.resolve().then((function(){if(t.content){var i=t.isBoth(),s=t.isHorizontal(),o=t.isVertical();t.content.style.minHeight=t.content.style.minWidth="auto",t.content.style.position="relative",t.element.style.contain="none";var n=[e.DomHandler.getWidth(t.content),e.DomHandler.getHeight(t.content)],l=n[1];n[0]!==t.defaultContentWidth&&(t.element.style.width=""),l!==t.defaultContentHeight&&(t.element.style.height="");var r=[e.DomHandler.getWidth(t.element),e.DomHandler.getHeight(t.element)],a=r[0],h=r[1];(i||s)&&(t.element.style.width=a<t.defaultWidth?a+"px":t.scrollWidth||t.defaultWidth+"px"),(i||o)&&(t.element.style.height=h<t.defaultHeight?h+"px":t.scrollHeight||t.defaultHeight+"px"),t.content.style.minHeight=t.content.style.minWidth="",t.content.style.position="",t.element.style.contain=""}}))},getLast:function(){return this.items?Math.min((arguments.length>1?arguments[1]:void 0)?(this.columns||this.items[0]).length:this.items.length,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0):0},getContentPosition:function(){if(this.content){var t=getComputedStyle(this.content),e=parseFloat(t.paddingLeft)+Math.max(parseFloat(t.left)||0,0),i=parseFloat(t.paddingRight)+Math.max(parseFloat(t.right)||0,0),s=parseFloat(t.paddingTop)+Math.max(parseFloat(t.top)||0,0),o=parseFloat(t.paddingBottom)+Math.max(parseFloat(t.bottom)||0,0);return{left:e,right:i,top:s,bottom:o,x:e+i,y:s+o}}return{left:0,right:0,top:0,bottom:0,x:0,y:0}},setSize:function(){var t=this;if(this.element){var e=this.isBoth(),i=this.isHorizontal(),s=this.element.parentElement,o=this.scrollWidth||"".concat(this.element.offsetWidth||s.offsetWidth,"px"),n=this.scrollHeight||"".concat(this.element.offsetHeight||s.offsetHeight,"px"),l=function(e,i){return t.element.style[e]=i};e||i?(l("height",n),l("width",o)):l("height",n)}},setSpacerSize:function(){var t=this,e=this.items;if(e){var i=this.isBoth(),s=this.isHorizontal(),o=this.getContentPosition(),n=function(e,i,s){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return t.spacerStyle=u(u({},t.spacerStyle),d({},"".concat(e),(i||[]).length*s+o+"px"))};i?(n("height",e,this.itemSize[0],o.y),n("width",this.columns||e[1],this.itemSize[1],o.x)):s?n("width",this.columns||e,this.itemSize,o.x):n("height",e,this.itemSize,o.y)}},setContentPosition:function(t){var e=this;if(this.content&&!this.appendOnly){var i=this.isBoth(),s=this.isHorizontal(),o=t?t.first:this.first,n=function(t,e){return t*e},l=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.contentStyle=u(u({},e.contentStyle),{transform:"translate3d(".concat(t,"px, ").concat(i,"px, 0)")})};if(i)l(n(o.cols,this.itemSize[1]),n(o.rows,this.itemSize[0]));else{var r=n(o,this.itemSize);s?l(r,0):l(0,r)}}},onScrollPositionChange:function(t){var e=this,i=t.target,s=this.isBoth(),o=this.isHorizontal(),n=this.getContentPosition(),l=function(t,e){return t?t>e?t-e:t:0},r=function(t,e){return Math.floor(t/(e||t))},a=function(t,e,i,s,o,n){return t<=o?o:n?i-s-o:e+o-1},h=function(t,e,i,s,o,n,l){return t<=n?0:Math.max(0,l?t<e?i:t-n:t>e?i:t-2*n)},c=function(t,i,s,o,n,l){var r=i+o+2*n;return t>=n&&(r+=n+1),e.getLast(r,l)},u=l(i.scrollTop,n.top),d=l(i.scrollLeft,n.left),m=s?{rows:0,cols:0}:0,f=this.last,p=!1,g=this.lastScrollPos;if(s){var y=this.lastScrollPos.top<=u,v=this.lastScrollPos.left<=d;if(!this.appendOnly||this.appendOnly&&(y||v)){var S={rows:r(u,this.itemSize[0]),cols:r(d,this.itemSize[1])},w={rows:a(S.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],y),cols:a(S.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],v)};m={rows:h(S.rows,w.rows,this.first.rows,0,0,this.d_numToleratedItems[0],y),cols:h(S.cols,w.cols,this.first.cols,0,0,this.d_numToleratedItems[1],v)},f={rows:c(S.rows,m.rows,0,this.numItemsInViewport.rows,this.d_numToleratedItems[0]),cols:c(S.cols,m.cols,0,this.numItemsInViewport.cols,this.d_numToleratedItems[1],!0)},p=m.rows!==this.first.rows||f.rows!==this.last.rows||m.cols!==this.first.cols||f.cols!==this.last.cols||this.isRangeChanged,g={top:u,left:d}}}else{var z=o?d:u,I=this.lastScrollPos<=z;if(!this.appendOnly||this.appendOnly&&I){var b=r(z,this.itemSize);f=c(b,m=h(b,a(b,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,I),this.first,0,0,this.d_numToleratedItems,I),0,this.numItemsInViewport,this.d_numToleratedItems),p=m!==this.first||f!==this.last||this.isRangeChanged,g=z}}return{first:m,last:f,isRangeChanged:p,scrollPos:g}},onScrollChange:function(t){var e=this.onScrollPositionChange(t),i=e.first,s=e.last,o=e.scrollPos;if(e.isRangeChanged){var n={first:i,last:s};if(this.setContentPosition(n),this.first=i,this.last=s,this.lastScrollPos=o,this.$emit("scroll-index-change",n),this.lazy&&this.isPageChanged(i)){var l={first:this.step?Math.min(this.getPageByFirst(i)*this.step,this.items.length-this.step):i,last:Math.min(this.step?(this.getPageByFirst(i)+1)*this.step:s,this.items.length)};(this.lazyLoadState.first!==l.first||this.lazyLoadState.last!==l.last)&&this.$emit("lazy-load",l),this.lazyLoadState=l}}},onScroll:function(t){var e=this;if(this.$emit("scroll",t),this.delay&&this.isPageChanged()){if(this.scrollTimeout&&clearTimeout(this.scrollTimeout),!this.d_loading&&this.showLoader)(this.onScrollPositionChange(t).isRangeChanged||!!this.step&&this.isPageChanged())&&(this.d_loading=!0);this.scrollTimeout=setTimeout((function(){e.onScrollChange(t),!e.d_loading||!e.showLoader||e.lazy&&void 0!==e.loading||(e.d_loading=!1,e.page=e.getPageByFirst())}),this.delay)}else this.onScrollChange(t)},onResize:function(){var t=this;this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((function(){if(e.DomHandler.isVisible(t.element)){var i=t.isBoth(),s=t.isVertical(),o=t.isHorizontal(),n=[e.DomHandler.getWidth(t.element),e.DomHandler.getHeight(t.element)],l=n[0],r=n[1],a=l!==t.defaultWidth,h=r!==t.defaultHeight;(i?a||h:o?a:!!s&&h)&&(t.d_numToleratedItems=t.numToleratedItems,t.defaultWidth=l,t.defaultHeight=r,t.defaultContentWidth=e.DomHandler.getWidth(t.content),t.defaultContentHeight=e.DomHandler.getHeight(t.content),t.init())}}),this.resizeDelay)},bindResizeListener:function(){this.resizeListener||(this.resizeListener=this.onResize.bind(this),window.addEventListener("resize",this.resizeListener),window.addEventListener("orientationchange",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),window.removeEventListener("orientationchange",this.resizeListener),this.resizeListener=null)},getOptions:function(t){var e=(this.items||[]).length,i=this.isBoth()?this.first.rows+t:this.first+t;return{index:i,count:e,first:0===i,last:i===e-1,even:i%2==0,odd:i%2!=0}},getLoaderOptions:function(t,e){var i=this.loaderArr.length;return u({index:t,count:i,first:0===t,last:t===i-1,even:t%2==0,odd:t%2!=0},e)},getPageByFirst:function(t){return Math.floor(((null!=t?t:this.first)+4*this.d_numToleratedItems)/(this.step||1))},isPageChanged:function(t){return!this.step||this.page!==this.getPageByFirst(null!=t?t:this.first)},setContentEl:function(t){this.content=t||this.content||e.DomHandler.findSingle(this.element,'[data-pc-section="content"]')},elementRef:function(t){this.element=t},contentRef:function(t){this.content=t}},computed:{containerClass:function(){return["p-virtualscroller",this.class,{"p-virtualscroller-inline":this.inline,"p-virtualscroller-both p-both-scroll":this.isBoth(),"p-virtualscroller-horizontal p-horizontal-scroll":this.isHorizontal()}]},contentClass:function(){return["p-virtualscroller-content",{"p-virtualscroller-loading":this.d_loading}]},loaderClass:function(){return["p-virtualscroller-loader",{"p-component-overlay":!this.$slots.loader}]},loadedItems:function(){var t=this;return this.items&&!this.d_loading?this.isBoth()?this.items.slice(this.appendOnly?0:this.first.rows,this.last.rows).map((function(e){return t.columns?e:e.slice(t.appendOnly?0:t.first.cols,t.last.cols)})):this.isHorizontal()&&this.columns?this.items:this.items.slice(this.appendOnly?0:this.first,this.last):[]},loadedRows:function(){return this.d_loading?this.loaderDisabled?this.loaderArr:[]:this.loadedItems},loadedColumns:function(){if(this.columns){var t=this.isBoth(),e=this.isHorizontal();if(t||e)return this.d_loading&&this.loaderDisabled?t?this.loaderArr[0]:this.loaderArr:this.columns.slice(t?this.first.cols:this.first,t?this.last.cols:this.last)}return this.columns}},components:{SpinnerIcon:l.default}},p=["tabindex"];f.render=function(t,e,i,s,n,l){var r=o.resolveComponent("SpinnerIcon");return t.disabled?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.renderSlot(t.$slots,"default"),o.renderSlot(t.$slots,"content",{items:t.items,rows:t.items,columns:l.loadedColumns})],64)):(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0,ref:l.elementRef,class:l.containerClass,tabindex:t.tabindex,style:t.style,onScroll:e[0]||(e[0]=function(){return l.onScroll&&l.onScroll.apply(l,arguments)})},t.ptm("root"),{"data-pc-name":"virtualscroller"}),[o.renderSlot(t.$slots,"content",{styleClass:l.contentClass,items:l.loadedItems,getItemOptions:l.getOptions,loading:n.d_loading,getLoaderOptions:l.getLoaderOptions,itemSize:t.itemSize,rows:l.loadedRows,columns:l.loadedColumns,contentRef:l.contentRef,spacerStyle:n.spacerStyle,contentStyle:n.contentStyle,vertical:l.isVertical(),horizontal:l.isHorizontal(),both:l.isBoth()},(function(){return[o.createElementVNode("div",o.mergeProps({ref:l.contentRef,class:l.contentClass,style:n.contentStyle},t.ptm("content")),[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l.loadedItems,(function(e,i){return o.renderSlot(t.$slots,"item",{key:i,item:e,options:l.getOptions(i)})})),128))],16)]})),t.showSpacer?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0,class:"p-virtualscroller-spacer",style:n.spacerStyle},t.ptm("spacer")),null,16)):o.createCommentVNode("",!0),!t.loaderDisabled&&t.showLoader&&n.d_loading?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:1,class:l.loaderClass},t.ptm("loader")),[t.$slots&&t.$slots.loader?(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:0},o.renderList(n.loaderArr,(function(e,i){return o.renderSlot(t.$slots,"loader",{key:i,options:l.getLoaderOptions(i,l.isBoth()&&{numCols:t.d_numItemsInViewport.cols})})})),128)):o.createCommentVNode("",!0),o.renderSlot(t.$slots,"loadingicon",{},(function(){return[o.createVNode(r,o.mergeProps({spin:"",class:"p-virtualscroller-loading-icon"},t.ptm("loadingIcon")),null,16)]}))],16)):o.createCommentVNode("",!0)],16,p))},module.exports=f;
|
|
@@ -104,8 +104,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
104
104
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
105
105
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
106
106
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
107
|
-
function _toPropertyKey(
|
|
108
|
-
function _toPrimitive(
|
|
107
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
108
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
109
109
|
var script = {
|
|
110
110
|
name: 'VirtualScroller',
|
|
111
111
|
"extends": script$1,
|
|
@@ -342,9 +342,9 @@ var script = {
|
|
|
342
342
|
if (this.element) {
|
|
343
343
|
var both = this.isBoth();
|
|
344
344
|
var horizontal = this.isHorizontal();
|
|
345
|
-
var _this$element
|
|
346
|
-
scrollTop = _this$element
|
|
347
|
-
scrollLeft = _this$element
|
|
345
|
+
var _this$element = this.element,
|
|
346
|
+
scrollTop = _this$element.scrollTop,
|
|
347
|
+
scrollLeft = _this$element.scrollLeft;
|
|
348
348
|
if (both) {
|
|
349
349
|
firstInViewport = {
|
|
350
350
|
rows: calculateFirstInViewport(scrollTop, this.itemSize[0]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"primevue/icons/spinner";import{DomHandler as e}from"primevue/utils";import i from"primevue/basecomponent";import s from"primevue/virtualscroller/style";import{resolveComponent as o,openBlock as n,createElementBlock as l,mergeProps as r,renderSlot as a,createElementVNode as h,Fragment as c,renderList as u,createCommentVNode as d,createVNode as m}from"vue";function f(t){return f="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},f(t)}function p(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,s)}return i}function g(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?p(Object(i),!0).forEach((function(e){y(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):p(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function y(t,e,i){return(e=v(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function v(t){var e=w(t,"string");return"symbol"===f(e)?e:String(e)}function w(t,e){if("object"!==f(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,e||"default");if("object"!==f(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var S={name:"VirtualScroller",extends:{name:"BaseVirtualScroller",extends:i,props:{id:{type:String,default:null},style:null,class:null,items:{type:Array,default:null},itemSize:{type:[Number,Array],default:0},scrollHeight:null,scrollWidth:null,orientation:{type:String,default:"vertical"},numToleratedItems:{type:Number,default:null},delay:{type:Number,default:0},resizeDelay:{type:Number,default:10},lazy:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loaderDisabled:{type:Boolean,default:!1},columns:{type:Array,default:null},loading:{type:Boolean,default:!1},showSpacer:{type:Boolean,default:!0},showLoader:{type:Boolean,default:!1},tabindex:{type:Number,default:0},inline:{type:Boolean,default:!1},step:{type:Number,default:0},appendOnly:{type:Boolean,default:!1},autoSize:{type:Boolean,default:!1}},style:s,provide:function(){return{$parentInstance:this}},beforeMount:function(){s.loadStyle()}},emits:["update:numToleratedItems","scroll","scroll-index-change","lazy-load"],data:function(){return{first:this.isBoth()?{rows:0,cols:0}:0,last:this.isBoth()?{rows:0,cols:0}:0,page:this.isBoth()?{rows:0,cols:0}:0,numItemsInViewport:this.isBoth()?{rows:0,cols:0}:0,lastScrollPos:this.isBoth()?{top:0,left:0}:0,d_numToleratedItems:this.numToleratedItems,d_loading:this.loading,loaderArr:[],spacerStyle:{},contentStyle:{}}},element:null,content:null,lastScrollPos:null,scrollTimeout:null,resizeTimeout:null,defaultWidth:0,defaultHeight:0,defaultContentWidth:0,defaultContentHeight:0,isRangeChanged:!1,lazyLoadState:{},resizeListener:null,initialized:!1,watch:{numToleratedItems:function(t){this.d_numToleratedItems=t},loading:function(t){this.d_loading=t},items:function(t,e){e&&e.length===(t||[]).length||(this.init(),this.calculateAutoSize())},itemSize:function(){this.init(),this.calculateAutoSize()},orientation:function(){this.lastScrollPos=this.isBoth()?{top:0,left:0}:0},scrollHeight:function(){this.init(),this.calculateAutoSize()},scrollWidth:function(){this.init(),this.calculateAutoSize()}},mounted:function(){this.viewInit(),this.lastScrollPos=this.isBoth()?{top:0,left:0}:0,this.lazyLoadState=this.lazyLoadState||{}},updated:function(){!this.initialized&&this.viewInit()},unmounted:function(){this.unbindResizeListener(),this.initialized=!1},methods:{viewInit:function(){e.isVisible(this.element)&&(this.setContentEl(this.content),this.init(),this.bindResizeListener(),this.defaultWidth=e.getWidth(this.element),this.defaultHeight=e.getHeight(this.element),this.defaultContentWidth=e.getWidth(this.content),this.defaultContentHeight=e.getHeight(this.content),this.initialized=!0)},init:function(){this.disabled||(this.setSize(),this.calculateOptions(),this.setSpacerSize())},isVertical:function(){return"vertical"===this.orientation},isHorizontal:function(){return"horizontal"===this.orientation},isBoth:function(){return"both"===this.orientation},scrollTo:function(t){this.lastScrollPos=this.both?{top:0,left:0}:0,this.element&&this.element.scrollTo(t)},scrollToIndex:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto",s=this.isBoth(),o=this.isHorizontal(),n=this.first,l=this.calculateNumItems().numToleratedItems,r=this.getContentPosition(),a=this.itemSize,h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t<=(arguments.length>1?arguments[1]:void 0)?0:t},c=function(t,e,i){return t*e+i},u=function(){return e.scrollTo({left:arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,top:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,behavior:i})},d=s?{rows:0,cols:0}:0,m=!1;s?(u(c((d={rows:h(t[0],l[0]),cols:h(t[1],l[1])}).cols,a[1],r.left),c(d.rows,a[0],r.top)),m=d.rows!==n.rows||d.cols!==n.cols):(d=h(t,l),o?u(c(d,a,r.left),0):u(0,c(d,a,r.top)),m=d!==n),this.isRangeChanged=m,this.first=d},scrollInView:function(t,e){var i=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"auto";if(e){var o=this.isBoth(),n=this.isHorizontal(),l=this.getRenderedRange(),r=l.first,a=l.viewport,h=function(){return i.scrollTo({left:arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,top:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,behavior:s})},c="to-end"===e;if("to-start"===e){if(o)a.first.rows-r.rows>t[0]?h(a.first.cols*this.itemSize[1],(a.first.rows-1)*this.itemSize[0]):a.first.cols-r.cols>t[1]&&h((a.first.cols-1)*this.itemSize[1],a.first.rows*this.itemSize[0]);else if(a.first-r>t){var u=(a.first-1)*this.itemSize;n?h(u,0):h(0,u)}}else if(c)if(o)a.last.rows-r.rows<=t[0]+1?h(a.first.cols*this.itemSize[1],(a.first.rows+1)*this.itemSize[0]):a.last.cols-r.cols<=t[1]+1&&h((a.first.cols+1)*this.itemSize[1],a.first.rows*this.itemSize[0]);else if(a.last-r<=t+1){var d=(a.first+1)*this.itemSize;n?h(d,0):h(0,d)}}else this.scrollToIndex(t,s)},getRenderedRange:function(){var t=function(t,e){return Math.floor(t/(e||t))},e=this.first,i=0;if(this.element){var s=this.isBoth(),o=this.isHorizontal(),n=this.element.scrollTop,l=n.scrollTop,r=n.scrollLeft;if(s)i={rows:(e={rows:t(l,this.itemSize[0]),cols:t(r,this.itemSize[1])}).rows+this.numItemsInViewport.rows,cols:e.cols+this.numItemsInViewport.cols};else i=(e=t(o?r:l,this.itemSize))+this.numItemsInViewport}return{first:this.first,last:this.last,viewport:{first:e,last:i}}},calculateNumItems:function(){var t=this.isBoth(),e=this.isHorizontal(),i=this.itemSize,s=this.getContentPosition(),o=this.element?this.element.offsetWidth-s.left:0,n=this.element?this.element.offsetHeight-s.top:0,l=function(t,e){return Math.ceil(t/(e||t))},r=function(t){return Math.ceil(t/2)},a=t?{rows:l(n,i[0]),cols:l(o,i[1])}:l(e?o:n,i);return{numItemsInViewport:a,numToleratedItems:this.d_numToleratedItems||(t?[r(a.rows),r(a.cols)]:r(a))}},calculateOptions:function(){var t=this,e=this.isBoth(),i=this.first,s=this.calculateNumItems(),o=s.numItemsInViewport,n=s.numToleratedItems,l=function(e,i,s){return t.getLast(e+i+(e<s?2:3)*s,arguments.length>3&&void 0!==arguments[3]&&arguments[3])},r=e?{rows:l(i.rows,o.rows,n[0]),cols:l(i.cols,o.cols,n[1],!0)}:l(i,o,n);this.last=r,this.numItemsInViewport=o,this.d_numToleratedItems=n,this.$emit("update:numToleratedItems",this.d_numToleratedItems),this.showLoader&&(this.loaderArr=e?Array.from({length:o.rows}).map((function(){return Array.from({length:o.cols})})):Array.from({length:o})),this.lazy&&Promise.resolve().then((function(){t.lazyLoadState={first:t.step?e?{rows:0,cols:i.cols}:0:i,last:Math.min(t.step?t.step:r,t.items.length)},t.$emit("lazy-load",t.lazyLoadState)}))},calculateAutoSize:function(){var t=this;this.autoSize&&!this.d_loading&&Promise.resolve().then((function(){if(t.content){var i=t.isBoth(),s=t.isHorizontal(),o=t.isVertical();t.content.style.minHeight=t.content.style.minWidth="auto",t.content.style.position="relative",t.element.style.contain="none";var n=[e.getWidth(t.content),e.getHeight(t.content)],l=n[1];n[0]!==t.defaultContentWidth&&(t.element.style.width=""),l!==t.defaultContentHeight&&(t.element.style.height="");var r=[e.getWidth(t.element),e.getHeight(t.element)],a=r[0],h=r[1];(i||s)&&(t.element.style.width=a<t.defaultWidth?a+"px":t.scrollWidth||t.defaultWidth+"px"),(i||o)&&(t.element.style.height=h<t.defaultHeight?h+"px":t.scrollHeight||t.defaultHeight+"px"),t.content.style.minHeight=t.content.style.minWidth="",t.content.style.position="",t.element.style.contain=""}}))},getLast:function(){return this.items?Math.min((arguments.length>1?arguments[1]:void 0)?(this.columns||this.items[0]).length:this.items.length,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0):0},getContentPosition:function(){if(this.content){var t=getComputedStyle(this.content),e=parseFloat(t.paddingLeft)+Math.max(parseFloat(t.left)||0,0),i=parseFloat(t.paddingRight)+Math.max(parseFloat(t.right)||0,0),s=parseFloat(t.paddingTop)+Math.max(parseFloat(t.top)||0,0),o=parseFloat(t.paddingBottom)+Math.max(parseFloat(t.bottom)||0,0);return{left:e,right:i,top:s,bottom:o,x:e+i,y:s+o}}return{left:0,right:0,top:0,bottom:0,x:0,y:0}},setSize:function(){var t=this;if(this.element){var e=this.isBoth(),i=this.isHorizontal(),s=this.element.parentElement,o=this.scrollWidth||"".concat(this.element.offsetWidth||s.offsetWidth,"px"),n=this.scrollHeight||"".concat(this.element.offsetHeight||s.offsetHeight,"px"),l=function(e,i){return t.element.style[e]=i};e||i?(l("height",n),l("width",o)):l("height",n)}},setSpacerSize:function(){var t=this,e=this.items;if(e){var i=this.isBoth(),s=this.isHorizontal(),o=this.getContentPosition(),n=function(e,i,s){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return t.spacerStyle=g(g({},t.spacerStyle),y({},"".concat(e),(i||[]).length*s+o+"px"))};i?(n("height",e,this.itemSize[0],o.y),n("width",this.columns||e[1],this.itemSize[1],o.x)):s?n("width",this.columns||e,this.itemSize,o.x):n("height",e,this.itemSize,o.y)}},setContentPosition:function(t){var e=this;if(this.content&&!this.appendOnly){var i=this.isBoth(),s=this.isHorizontal(),o=t?t.first:this.first,n=function(t,e){return t*e},l=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.contentStyle=g(g({},e.contentStyle),{transform:"translate3d(".concat(t,"px, ").concat(i,"px, 0)")})};if(i)l(n(o.cols,this.itemSize[1]),n(o.rows,this.itemSize[0]));else{var r=n(o,this.itemSize);s?l(r,0):l(0,r)}}},onScrollPositionChange:function(t){var e=this,i=t.target,s=this.isBoth(),o=this.isHorizontal(),n=this.getContentPosition(),l=function(t,e){return t?t>e?t-e:t:0},r=function(t,e){return Math.floor(t/(e||t))},a=function(t,e,i,s,o,n){return t<=o?o:n?i-s-o:e+o-1},h=function(t,e,i,s,o,n,l){return t<=n?0:Math.max(0,l?t<e?i:t-n:t>e?i:t-2*n)},c=function(t,i,s,o,n,l){var r=i+o+2*n;return t>=n&&(r+=n+1),e.getLast(r,l)},u=l(i.scrollTop,n.top),d=l(i.scrollLeft,n.left),m=s?{rows:0,cols:0}:0,f=this.last,p=!1,g=this.lastScrollPos;if(s){var y=this.lastScrollPos.top<=u,v=this.lastScrollPos.left<=d;if(!this.appendOnly||this.appendOnly&&(y||v)){var w={rows:r(u,this.itemSize[0]),cols:r(d,this.itemSize[1])},S={rows:a(w.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],y),cols:a(w.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],v)};m={rows:h(w.rows,S.rows,this.first.rows,0,0,this.d_numToleratedItems[0],y),cols:h(w.cols,S.cols,this.first.cols,0,0,this.d_numToleratedItems[1],v)},f={rows:c(w.rows,m.rows,0,this.numItemsInViewport.rows,this.d_numToleratedItems[0]),cols:c(w.cols,m.cols,0,this.numItemsInViewport.cols,this.d_numToleratedItems[1],!0)},p=m.rows!==this.first.rows||f.rows!==this.last.rows||m.cols!==this.first.cols||f.cols!==this.last.cols||this.isRangeChanged,g={top:u,left:d}}}else{var z=o?d:u,I=this.lastScrollPos<=z;if(!this.appendOnly||this.appendOnly&&I){var b=r(z,this.itemSize);f=c(b,m=h(b,a(b,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,I),this.first,0,0,this.d_numToleratedItems,I),0,this.numItemsInViewport,this.d_numToleratedItems),p=m!==this.first||f!==this.last||this.isRangeChanged,g=z}}return{first:m,last:f,isRangeChanged:p,scrollPos:g}},onScrollChange:function(t){var e=this.onScrollPositionChange(t),i=e.first,s=e.last,o=e.scrollPos;if(e.isRangeChanged){var n={first:i,last:s};if(this.setContentPosition(n),this.first=i,this.last=s,this.lastScrollPos=o,this.$emit("scroll-index-change",n),this.lazy&&this.isPageChanged(i)){var l={first:this.step?Math.min(this.getPageByFirst(i)*this.step,this.items.length-this.step):i,last:Math.min(this.step?(this.getPageByFirst(i)+1)*this.step:s,this.items.length)};(this.lazyLoadState.first!==l.first||this.lazyLoadState.last!==l.last)&&this.$emit("lazy-load",l),this.lazyLoadState=l}}},onScroll:function(t){var e=this;if(this.$emit("scroll",t),this.delay&&this.isPageChanged()){if(this.scrollTimeout&&clearTimeout(this.scrollTimeout),!this.d_loading&&this.showLoader)(this.onScrollPositionChange(t).isRangeChanged||!!this.step&&this.isPageChanged())&&(this.d_loading=!0);this.scrollTimeout=setTimeout((function(){e.onScrollChange(t),!e.d_loading||!e.showLoader||e.lazy&&void 0!==e.loading||(e.d_loading=!1,e.page=e.getPageByFirst())}),this.delay)}else this.onScrollChange(t)},onResize:function(){var t=this;this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((function(){if(e.isVisible(t.element)){var i=t.isBoth(),s=t.isVertical(),o=t.isHorizontal(),n=[e.getWidth(t.element),e.getHeight(t.element)],l=n[0],r=n[1],a=l!==t.defaultWidth,h=r!==t.defaultHeight;(i?a||h:o?a:!!s&&h)&&(t.d_numToleratedItems=t.numToleratedItems,t.defaultWidth=l,t.defaultHeight=r,t.defaultContentWidth=e.getWidth(t.content),t.defaultContentHeight=e.getHeight(t.content),t.init())}}),this.resizeDelay)},bindResizeListener:function(){this.resizeListener||(this.resizeListener=this.onResize.bind(this),window.addEventListener("resize",this.resizeListener),window.addEventListener("orientationchange",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),window.removeEventListener("orientationchange",this.resizeListener),this.resizeListener=null)},getOptions:function(t){var e=(this.items||[]).length,i=this.isBoth()?this.first.rows+t:this.first+t;return{index:i,count:e,first:0===i,last:i===e-1,even:i%2==0,odd:i%2!=0}},getLoaderOptions:function(t,e){var i=this.loaderArr.length;return g({index:t,count:i,first:0===t,last:t===i-1,even:t%2==0,odd:t%2!=0},e)},getPageByFirst:function(t){return Math.floor(((null!=t?t:this.first)+4*this.d_numToleratedItems)/(this.step||1))},isPageChanged:function(t){return!this.step||this.page!==this.getPageByFirst(null!=t?t:this.first)},setContentEl:function(t){this.content=t||this.content||e.findSingle(this.element,'[data-pc-section="content"]')},elementRef:function(t){this.element=t},contentRef:function(t){this.content=t}},computed:{containerClass:function(){return["p-virtualscroller",this.class,{"p-virtualscroller-inline":this.inline,"p-virtualscroller-both p-both-scroll":this.isBoth(),"p-virtualscroller-horizontal p-horizontal-scroll":this.isHorizontal()}]},contentClass:function(){return["p-virtualscroller-content",{"p-virtualscroller-loading":this.d_loading}]},loaderClass:function(){return["p-virtualscroller-loader",{"p-component-overlay":!this.$slots.loader}]},loadedItems:function(){var t=this;return this.items&&!this.d_loading?this.isBoth()?this.items.slice(this.appendOnly?0:this.first.rows,this.last.rows).map((function(e){return t.columns?e:e.slice(t.appendOnly?0:t.first.cols,t.last.cols)})):this.isHorizontal()&&this.columns?this.items:this.items.slice(this.appendOnly?0:this.first,this.last):[]},loadedRows:function(){return this.d_loading?this.loaderDisabled?this.loaderArr:[]:this.loadedItems},loadedColumns:function(){if(this.columns){var t=this.isBoth(),e=this.isHorizontal();if(t||e)return this.d_loading&&this.loaderDisabled?t?this.loaderArr[0]:this.loaderArr:this.columns.slice(t?this.first.cols:this.first,t?this.last.cols:this.last)}return this.columns}},components:{SpinnerIcon:t}},z=["tabindex"];S.render=function(t,e,i,s,f,p){var g=o("SpinnerIcon");return t.disabled?(n(),l(c,{key:1},[a(t.$slots,"default"),a(t.$slots,"content",{items:t.items,rows:t.items,columns:p.loadedColumns})],64)):(n(),l("div",r({key:0,ref:p.elementRef,class:p.containerClass,tabindex:t.tabindex,style:t.style,onScroll:e[0]||(e[0]=function(){return p.onScroll&&p.onScroll.apply(p,arguments)})},t.ptm("root"),{"data-pc-name":"virtualscroller"}),[a(t.$slots,"content",{styleClass:p.contentClass,items:p.loadedItems,getItemOptions:p.getOptions,loading:f.d_loading,getLoaderOptions:p.getLoaderOptions,itemSize:t.itemSize,rows:p.loadedRows,columns:p.loadedColumns,contentRef:p.contentRef,spacerStyle:f.spacerStyle,contentStyle:f.contentStyle,vertical:p.isVertical(),horizontal:p.isHorizontal(),both:p.isBoth()},(function(){return[h("div",r({ref:p.contentRef,class:p.contentClass,style:f.contentStyle},t.ptm("content")),[(n(!0),l(c,null,u(p.loadedItems,(function(e,i){return a(t.$slots,"item",{key:i,item:e,options:p.getOptions(i)})})),128))],16)]})),t.showSpacer?(n(),l("div",r({key:0,class:"p-virtualscroller-spacer",style:f.spacerStyle},t.ptm("spacer")),null,16)):d("",!0),!t.loaderDisabled&&t.showLoader&&f.d_loading?(n(),l("div",r({key:1,class:p.loaderClass},t.ptm("loader")),[t.$slots&&t.$slots.loader?(n(!0),l(c,{key:0},u(f.loaderArr,(function(e,i){return a(t.$slots,"loader",{key:i,options:p.getLoaderOptions(i,p.isBoth()&&{numCols:t.d_numItemsInViewport.cols})})})),128)):d("",!0),a(t.$slots,"loadingicon",{},(function(){return[m(g,r({spin:"",class:"p-virtualscroller-loading-icon"},t.ptm("loadingIcon")),null,16)]}))],16)):d("",!0)],16,z))};export{S as default};
|
|
1
|
+
import t from"primevue/icons/spinner";import{DomHandler as e}from"primevue/utils";import i from"primevue/basecomponent";import s from"primevue/virtualscroller/style";import{resolveComponent as o,openBlock as n,createElementBlock as l,mergeProps as r,renderSlot as a,createElementVNode as h,Fragment as c,renderList as u,createCommentVNode as d,createVNode as m}from"vue";function f(t){return f="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},f(t)}function p(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,s)}return i}function g(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?p(Object(i),!0).forEach((function(e){y(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):p(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function y(t,e,i){var s;return(e="symbol"==f(s=v(e,"string"))?s:String(s))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function v(t,e){if("object"!=f(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,e||"default");if("object"!=f(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var w={name:"VirtualScroller",extends:{name:"BaseVirtualScroller",extends:i,props:{id:{type:String,default:null},style:null,class:null,items:{type:Array,default:null},itemSize:{type:[Number,Array],default:0},scrollHeight:null,scrollWidth:null,orientation:{type:String,default:"vertical"},numToleratedItems:{type:Number,default:null},delay:{type:Number,default:0},resizeDelay:{type:Number,default:10},lazy:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loaderDisabled:{type:Boolean,default:!1},columns:{type:Array,default:null},loading:{type:Boolean,default:!1},showSpacer:{type:Boolean,default:!0},showLoader:{type:Boolean,default:!1},tabindex:{type:Number,default:0},inline:{type:Boolean,default:!1},step:{type:Number,default:0},appendOnly:{type:Boolean,default:!1},autoSize:{type:Boolean,default:!1}},style:s,provide:function(){return{$parentInstance:this}},beforeMount:function(){s.loadStyle()}},emits:["update:numToleratedItems","scroll","scroll-index-change","lazy-load"],data:function(){return{first:this.isBoth()?{rows:0,cols:0}:0,last:this.isBoth()?{rows:0,cols:0}:0,page:this.isBoth()?{rows:0,cols:0}:0,numItemsInViewport:this.isBoth()?{rows:0,cols:0}:0,lastScrollPos:this.isBoth()?{top:0,left:0}:0,d_numToleratedItems:this.numToleratedItems,d_loading:this.loading,loaderArr:[],spacerStyle:{},contentStyle:{}}},element:null,content:null,lastScrollPos:null,scrollTimeout:null,resizeTimeout:null,defaultWidth:0,defaultHeight:0,defaultContentWidth:0,defaultContentHeight:0,isRangeChanged:!1,lazyLoadState:{},resizeListener:null,initialized:!1,watch:{numToleratedItems:function(t){this.d_numToleratedItems=t},loading:function(t){this.d_loading=t},items:function(t,e){e&&e.length===(t||[]).length||(this.init(),this.calculateAutoSize())},itemSize:function(){this.init(),this.calculateAutoSize()},orientation:function(){this.lastScrollPos=this.isBoth()?{top:0,left:0}:0},scrollHeight:function(){this.init(),this.calculateAutoSize()},scrollWidth:function(){this.init(),this.calculateAutoSize()}},mounted:function(){this.viewInit(),this.lastScrollPos=this.isBoth()?{top:0,left:0}:0,this.lazyLoadState=this.lazyLoadState||{}},updated:function(){!this.initialized&&this.viewInit()},unmounted:function(){this.unbindResizeListener(),this.initialized=!1},methods:{viewInit:function(){e.isVisible(this.element)&&(this.setContentEl(this.content),this.init(),this.bindResizeListener(),this.defaultWidth=e.getWidth(this.element),this.defaultHeight=e.getHeight(this.element),this.defaultContentWidth=e.getWidth(this.content),this.defaultContentHeight=e.getHeight(this.content),this.initialized=!0)},init:function(){this.disabled||(this.setSize(),this.calculateOptions(),this.setSpacerSize())},isVertical:function(){return"vertical"===this.orientation},isHorizontal:function(){return"horizontal"===this.orientation},isBoth:function(){return"both"===this.orientation},scrollTo:function(t){this.lastScrollPos=this.both?{top:0,left:0}:0,this.element&&this.element.scrollTo(t)},scrollToIndex:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto",s=this.isBoth(),o=this.isHorizontal(),n=this.first,l=this.calculateNumItems().numToleratedItems,r=this.getContentPosition(),a=this.itemSize,h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t<=(arguments.length>1?arguments[1]:void 0)?0:t},c=function(t,e,i){return t*e+i},u=function(){return e.scrollTo({left:arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,top:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,behavior:i})},d=s?{rows:0,cols:0}:0,m=!1;s?(u(c((d={rows:h(t[0],l[0]),cols:h(t[1],l[1])}).cols,a[1],r.left),c(d.rows,a[0],r.top)),m=d.rows!==n.rows||d.cols!==n.cols):(d=h(t,l),o?u(c(d,a,r.left),0):u(0,c(d,a,r.top)),m=d!==n),this.isRangeChanged=m,this.first=d},scrollInView:function(t,e){var i=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"auto";if(e){var o=this.isBoth(),n=this.isHorizontal(),l=this.getRenderedRange(),r=l.first,a=l.viewport,h=function(){return i.scrollTo({left:arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,top:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,behavior:s})},c="to-end"===e;if("to-start"===e){if(o)a.first.rows-r.rows>t[0]?h(a.first.cols*this.itemSize[1],(a.first.rows-1)*this.itemSize[0]):a.first.cols-r.cols>t[1]&&h((a.first.cols-1)*this.itemSize[1],a.first.rows*this.itemSize[0]);else if(a.first-r>t){var u=(a.first-1)*this.itemSize;n?h(u,0):h(0,u)}}else if(c)if(o)a.last.rows-r.rows<=t[0]+1?h(a.first.cols*this.itemSize[1],(a.first.rows+1)*this.itemSize[0]):a.last.cols-r.cols<=t[1]+1&&h((a.first.cols+1)*this.itemSize[1],a.first.rows*this.itemSize[0]);else if(a.last-r<=t+1){var d=(a.first+1)*this.itemSize;n?h(d,0):h(0,d)}}else this.scrollToIndex(t,s)},getRenderedRange:function(){var t=function(t,e){return Math.floor(t/(e||t))},e=this.first,i=0;if(this.element){var s=this.isBoth(),o=this.isHorizontal(),n=this.element,l=n.scrollTop,r=n.scrollLeft;if(s)i={rows:(e={rows:t(l,this.itemSize[0]),cols:t(r,this.itemSize[1])}).rows+this.numItemsInViewport.rows,cols:e.cols+this.numItemsInViewport.cols};else i=(e=t(o?r:l,this.itemSize))+this.numItemsInViewport}return{first:this.first,last:this.last,viewport:{first:e,last:i}}},calculateNumItems:function(){var t=this.isBoth(),e=this.isHorizontal(),i=this.itemSize,s=this.getContentPosition(),o=this.element?this.element.offsetWidth-s.left:0,n=this.element?this.element.offsetHeight-s.top:0,l=function(t,e){return Math.ceil(t/(e||t))},r=function(t){return Math.ceil(t/2)},a=t?{rows:l(n,i[0]),cols:l(o,i[1])}:l(e?o:n,i);return{numItemsInViewport:a,numToleratedItems:this.d_numToleratedItems||(t?[r(a.rows),r(a.cols)]:r(a))}},calculateOptions:function(){var t=this,e=this.isBoth(),i=this.first,s=this.calculateNumItems(),o=s.numItemsInViewport,n=s.numToleratedItems,l=function(e,i,s){return t.getLast(e+i+(e<s?2:3)*s,arguments.length>3&&void 0!==arguments[3]&&arguments[3])},r=e?{rows:l(i.rows,o.rows,n[0]),cols:l(i.cols,o.cols,n[1],!0)}:l(i,o,n);this.last=r,this.numItemsInViewport=o,this.d_numToleratedItems=n,this.$emit("update:numToleratedItems",this.d_numToleratedItems),this.showLoader&&(this.loaderArr=e?Array.from({length:o.rows}).map((function(){return Array.from({length:o.cols})})):Array.from({length:o})),this.lazy&&Promise.resolve().then((function(){t.lazyLoadState={first:t.step?e?{rows:0,cols:i.cols}:0:i,last:Math.min(t.step?t.step:r,t.items.length)},t.$emit("lazy-load",t.lazyLoadState)}))},calculateAutoSize:function(){var t=this;this.autoSize&&!this.d_loading&&Promise.resolve().then((function(){if(t.content){var i=t.isBoth(),s=t.isHorizontal(),o=t.isVertical();t.content.style.minHeight=t.content.style.minWidth="auto",t.content.style.position="relative",t.element.style.contain="none";var n=[e.getWidth(t.content),e.getHeight(t.content)],l=n[1];n[0]!==t.defaultContentWidth&&(t.element.style.width=""),l!==t.defaultContentHeight&&(t.element.style.height="");var r=[e.getWidth(t.element),e.getHeight(t.element)],a=r[0],h=r[1];(i||s)&&(t.element.style.width=a<t.defaultWidth?a+"px":t.scrollWidth||t.defaultWidth+"px"),(i||o)&&(t.element.style.height=h<t.defaultHeight?h+"px":t.scrollHeight||t.defaultHeight+"px"),t.content.style.minHeight=t.content.style.minWidth="",t.content.style.position="",t.element.style.contain=""}}))},getLast:function(){return this.items?Math.min((arguments.length>1?arguments[1]:void 0)?(this.columns||this.items[0]).length:this.items.length,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0):0},getContentPosition:function(){if(this.content){var t=getComputedStyle(this.content),e=parseFloat(t.paddingLeft)+Math.max(parseFloat(t.left)||0,0),i=parseFloat(t.paddingRight)+Math.max(parseFloat(t.right)||0,0),s=parseFloat(t.paddingTop)+Math.max(parseFloat(t.top)||0,0),o=parseFloat(t.paddingBottom)+Math.max(parseFloat(t.bottom)||0,0);return{left:e,right:i,top:s,bottom:o,x:e+i,y:s+o}}return{left:0,right:0,top:0,bottom:0,x:0,y:0}},setSize:function(){var t=this;if(this.element){var e=this.isBoth(),i=this.isHorizontal(),s=this.element.parentElement,o=this.scrollWidth||"".concat(this.element.offsetWidth||s.offsetWidth,"px"),n=this.scrollHeight||"".concat(this.element.offsetHeight||s.offsetHeight,"px"),l=function(e,i){return t.element.style[e]=i};e||i?(l("height",n),l("width",o)):l("height",n)}},setSpacerSize:function(){var t=this,e=this.items;if(e){var i=this.isBoth(),s=this.isHorizontal(),o=this.getContentPosition(),n=function(e,i,s){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return t.spacerStyle=g(g({},t.spacerStyle),y({},"".concat(e),(i||[]).length*s+o+"px"))};i?(n("height",e,this.itemSize[0],o.y),n("width",this.columns||e[1],this.itemSize[1],o.x)):s?n("width",this.columns||e,this.itemSize,o.x):n("height",e,this.itemSize,o.y)}},setContentPosition:function(t){var e=this;if(this.content&&!this.appendOnly){var i=this.isBoth(),s=this.isHorizontal(),o=t?t.first:this.first,n=function(t,e){return t*e},l=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.contentStyle=g(g({},e.contentStyle),{transform:"translate3d(".concat(t,"px, ").concat(i,"px, 0)")})};if(i)l(n(o.cols,this.itemSize[1]),n(o.rows,this.itemSize[0]));else{var r=n(o,this.itemSize);s?l(r,0):l(0,r)}}},onScrollPositionChange:function(t){var e=this,i=t.target,s=this.isBoth(),o=this.isHorizontal(),n=this.getContentPosition(),l=function(t,e){return t?t>e?t-e:t:0},r=function(t,e){return Math.floor(t/(e||t))},a=function(t,e,i,s,o,n){return t<=o?o:n?i-s-o:e+o-1},h=function(t,e,i,s,o,n,l){return t<=n?0:Math.max(0,l?t<e?i:t-n:t>e?i:t-2*n)},c=function(t,i,s,o,n,l){var r=i+o+2*n;return t>=n&&(r+=n+1),e.getLast(r,l)},u=l(i.scrollTop,n.top),d=l(i.scrollLeft,n.left),m=s?{rows:0,cols:0}:0,f=this.last,p=!1,g=this.lastScrollPos;if(s){var y=this.lastScrollPos.top<=u,v=this.lastScrollPos.left<=d;if(!this.appendOnly||this.appendOnly&&(y||v)){var w={rows:r(u,this.itemSize[0]),cols:r(d,this.itemSize[1])},S={rows:a(w.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],y),cols:a(w.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],v)};m={rows:h(w.rows,S.rows,this.first.rows,0,0,this.d_numToleratedItems[0],y),cols:h(w.cols,S.cols,this.first.cols,0,0,this.d_numToleratedItems[1],v)},f={rows:c(w.rows,m.rows,0,this.numItemsInViewport.rows,this.d_numToleratedItems[0]),cols:c(w.cols,m.cols,0,this.numItemsInViewport.cols,this.d_numToleratedItems[1],!0)},p=m.rows!==this.first.rows||f.rows!==this.last.rows||m.cols!==this.first.cols||f.cols!==this.last.cols||this.isRangeChanged,g={top:u,left:d}}}else{var z=o?d:u,I=this.lastScrollPos<=z;if(!this.appendOnly||this.appendOnly&&I){var b=r(z,this.itemSize);f=c(b,m=h(b,a(b,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,I),this.first,0,0,this.d_numToleratedItems,I),0,this.numItemsInViewport,this.d_numToleratedItems),p=m!==this.first||f!==this.last||this.isRangeChanged,g=z}}return{first:m,last:f,isRangeChanged:p,scrollPos:g}},onScrollChange:function(t){var e=this.onScrollPositionChange(t),i=e.first,s=e.last,o=e.scrollPos;if(e.isRangeChanged){var n={first:i,last:s};if(this.setContentPosition(n),this.first=i,this.last=s,this.lastScrollPos=o,this.$emit("scroll-index-change",n),this.lazy&&this.isPageChanged(i)){var l={first:this.step?Math.min(this.getPageByFirst(i)*this.step,this.items.length-this.step):i,last:Math.min(this.step?(this.getPageByFirst(i)+1)*this.step:s,this.items.length)};(this.lazyLoadState.first!==l.first||this.lazyLoadState.last!==l.last)&&this.$emit("lazy-load",l),this.lazyLoadState=l}}},onScroll:function(t){var e=this;if(this.$emit("scroll",t),this.delay&&this.isPageChanged()){if(this.scrollTimeout&&clearTimeout(this.scrollTimeout),!this.d_loading&&this.showLoader)(this.onScrollPositionChange(t).isRangeChanged||!!this.step&&this.isPageChanged())&&(this.d_loading=!0);this.scrollTimeout=setTimeout((function(){e.onScrollChange(t),!e.d_loading||!e.showLoader||e.lazy&&void 0!==e.loading||(e.d_loading=!1,e.page=e.getPageByFirst())}),this.delay)}else this.onScrollChange(t)},onResize:function(){var t=this;this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((function(){if(e.isVisible(t.element)){var i=t.isBoth(),s=t.isVertical(),o=t.isHorizontal(),n=[e.getWidth(t.element),e.getHeight(t.element)],l=n[0],r=n[1],a=l!==t.defaultWidth,h=r!==t.defaultHeight;(i?a||h:o?a:!!s&&h)&&(t.d_numToleratedItems=t.numToleratedItems,t.defaultWidth=l,t.defaultHeight=r,t.defaultContentWidth=e.getWidth(t.content),t.defaultContentHeight=e.getHeight(t.content),t.init())}}),this.resizeDelay)},bindResizeListener:function(){this.resizeListener||(this.resizeListener=this.onResize.bind(this),window.addEventListener("resize",this.resizeListener),window.addEventListener("orientationchange",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),window.removeEventListener("orientationchange",this.resizeListener),this.resizeListener=null)},getOptions:function(t){var e=(this.items||[]).length,i=this.isBoth()?this.first.rows+t:this.first+t;return{index:i,count:e,first:0===i,last:i===e-1,even:i%2==0,odd:i%2!=0}},getLoaderOptions:function(t,e){var i=this.loaderArr.length;return g({index:t,count:i,first:0===t,last:t===i-1,even:t%2==0,odd:t%2!=0},e)},getPageByFirst:function(t){return Math.floor(((null!=t?t:this.first)+4*this.d_numToleratedItems)/(this.step||1))},isPageChanged:function(t){return!this.step||this.page!==this.getPageByFirst(null!=t?t:this.first)},setContentEl:function(t){this.content=t||this.content||e.findSingle(this.element,'[data-pc-section="content"]')},elementRef:function(t){this.element=t},contentRef:function(t){this.content=t}},computed:{containerClass:function(){return["p-virtualscroller",this.class,{"p-virtualscroller-inline":this.inline,"p-virtualscroller-both p-both-scroll":this.isBoth(),"p-virtualscroller-horizontal p-horizontal-scroll":this.isHorizontal()}]},contentClass:function(){return["p-virtualscroller-content",{"p-virtualscroller-loading":this.d_loading}]},loaderClass:function(){return["p-virtualscroller-loader",{"p-component-overlay":!this.$slots.loader}]},loadedItems:function(){var t=this;return this.items&&!this.d_loading?this.isBoth()?this.items.slice(this.appendOnly?0:this.first.rows,this.last.rows).map((function(e){return t.columns?e:e.slice(t.appendOnly?0:t.first.cols,t.last.cols)})):this.isHorizontal()&&this.columns?this.items:this.items.slice(this.appendOnly?0:this.first,this.last):[]},loadedRows:function(){return this.d_loading?this.loaderDisabled?this.loaderArr:[]:this.loadedItems},loadedColumns:function(){if(this.columns){var t=this.isBoth(),e=this.isHorizontal();if(t||e)return this.d_loading&&this.loaderDisabled?t?this.loaderArr[0]:this.loaderArr:this.columns.slice(t?this.first.cols:this.first,t?this.last.cols:this.last)}return this.columns}},components:{SpinnerIcon:t}},S=["tabindex"];w.render=function(t,e,i,s,f,p){var g=o("SpinnerIcon");return t.disabled?(n(),l(c,{key:1},[a(t.$slots,"default"),a(t.$slots,"content",{items:t.items,rows:t.items,columns:p.loadedColumns})],64)):(n(),l("div",r({key:0,ref:p.elementRef,class:p.containerClass,tabindex:t.tabindex,style:t.style,onScroll:e[0]||(e[0]=function(){return p.onScroll&&p.onScroll.apply(p,arguments)})},t.ptm("root"),{"data-pc-name":"virtualscroller"}),[a(t.$slots,"content",{styleClass:p.contentClass,items:p.loadedItems,getItemOptions:p.getOptions,loading:f.d_loading,getLoaderOptions:p.getLoaderOptions,itemSize:t.itemSize,rows:p.loadedRows,columns:p.loadedColumns,contentRef:p.contentRef,spacerStyle:f.spacerStyle,contentStyle:f.contentStyle,vertical:p.isVertical(),horizontal:p.isHorizontal(),both:p.isBoth()},(function(){return[h("div",r({ref:p.contentRef,class:p.contentClass,style:f.contentStyle},t.ptm("content")),[(n(!0),l(c,null,u(p.loadedItems,(function(e,i){return a(t.$slots,"item",{key:i,item:e,options:p.getOptions(i)})})),128))],16)]})),t.showSpacer?(n(),l("div",r({key:0,class:"p-virtualscroller-spacer",style:f.spacerStyle},t.ptm("spacer")),null,16)):d("",!0),!t.loaderDisabled&&t.showLoader&&f.d_loading?(n(),l("div",r({key:1,class:p.loaderClass},t.ptm("loader")),[t.$slots&&t.$slots.loader?(n(!0),l(c,{key:0},u(f.loaderArr,(function(e,i){return a(t.$slots,"loader",{key:i,options:p.getLoaderOptions(i,p.isBoth()&&{numCols:t.d_numItemsInViewport.cols})})})),128)):d("",!0),a(t.$slots,"loadingicon",{},(function(){return[m(g,r({spin:"",class:"p-virtualscroller-loading-icon"},t.ptm("loadingIcon")),null,16)]}))],16)):d("",!0)],16,S))};export{w as default};
|
|
@@ -108,8 +108,8 @@ this.primevue.virtualscroller = (function (SpinnerIcon, utils, BaseComponent, Vi
|
|
|
108
108
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
109
109
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
110
110
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
111
|
-
function _toPropertyKey(
|
|
112
|
-
function _toPrimitive(
|
|
111
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
112
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
113
113
|
var script = {
|
|
114
114
|
name: 'VirtualScroller',
|
|
115
115
|
"extends": script$1,
|
|
@@ -346,9 +346,9 @@ this.primevue.virtualscroller = (function (SpinnerIcon, utils, BaseComponent, Vi
|
|
|
346
346
|
if (this.element) {
|
|
347
347
|
var both = this.isBoth();
|
|
348
348
|
var horizontal = this.isHorizontal();
|
|
349
|
-
var _this$element
|
|
350
|
-
scrollTop = _this$element
|
|
351
|
-
scrollLeft = _this$element
|
|
349
|
+
var _this$element = this.element,
|
|
350
|
+
scrollTop = _this$element.scrollTop,
|
|
351
|
+
scrollLeft = _this$element.scrollLeft;
|
|
352
352
|
if (both) {
|
|
353
353
|
firstInViewport = {
|
|
354
354
|
rows: calculateFirstInViewport(scrollTop, this.itemSize[0]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.virtualscroller=function(t,e,i,s,o){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var l=n(t),r=n(i),a=n(s);function h(t){return h="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},h(t)}function c(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,s)}return i}function u(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?c(Object(i),!0).forEach((function(e){d(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):c(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function d(t,e,i){return(e=m(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function m(t){var e=f(t,"string");return"symbol"===h(e)?e:String(e)}function f(t,e){if("object"!==h(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,e||"default");if("object"!==h(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var p={name:"VirtualScroller",extends:{name:"BaseVirtualScroller",extends:r.default,props:{id:{type:String,default:null},style:null,class:null,items:{type:Array,default:null},itemSize:{type:[Number,Array],default:0},scrollHeight:null,scrollWidth:null,orientation:{type:String,default:"vertical"},numToleratedItems:{type:Number,default:null},delay:{type:Number,default:0},resizeDelay:{type:Number,default:10},lazy:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loaderDisabled:{type:Boolean,default:!1},columns:{type:Array,default:null},loading:{type:Boolean,default:!1},showSpacer:{type:Boolean,default:!0},showLoader:{type:Boolean,default:!1},tabindex:{type:Number,default:0},inline:{type:Boolean,default:!1},step:{type:Number,default:0},appendOnly:{type:Boolean,default:!1},autoSize:{type:Boolean,default:!1}},style:a.default,provide:function(){return{$parentInstance:this}},beforeMount:function(){a.default.loadStyle()}},emits:["update:numToleratedItems","scroll","scroll-index-change","lazy-load"],data:function(){return{first:this.isBoth()?{rows:0,cols:0}:0,last:this.isBoth()?{rows:0,cols:0}:0,page:this.isBoth()?{rows:0,cols:0}:0,numItemsInViewport:this.isBoth()?{rows:0,cols:0}:0,lastScrollPos:this.isBoth()?{top:0,left:0}:0,d_numToleratedItems:this.numToleratedItems,d_loading:this.loading,loaderArr:[],spacerStyle:{},contentStyle:{}}},element:null,content:null,lastScrollPos:null,scrollTimeout:null,resizeTimeout:null,defaultWidth:0,defaultHeight:0,defaultContentWidth:0,defaultContentHeight:0,isRangeChanged:!1,lazyLoadState:{},resizeListener:null,initialized:!1,watch:{numToleratedItems:function(t){this.d_numToleratedItems=t},loading:function(t){this.d_loading=t},items:function(t,e){e&&e.length===(t||[]).length||(this.init(),this.calculateAutoSize())},itemSize:function(){this.init(),this.calculateAutoSize()},orientation:function(){this.lastScrollPos=this.isBoth()?{top:0,left:0}:0},scrollHeight:function(){this.init(),this.calculateAutoSize()},scrollWidth:function(){this.init(),this.calculateAutoSize()}},mounted:function(){this.viewInit(),this.lastScrollPos=this.isBoth()?{top:0,left:0}:0,this.lazyLoadState=this.lazyLoadState||{}},updated:function(){!this.initialized&&this.viewInit()},unmounted:function(){this.unbindResizeListener(),this.initialized=!1},methods:{viewInit:function(){e.DomHandler.isVisible(this.element)&&(this.setContentEl(this.content),this.init(),this.bindResizeListener(),this.defaultWidth=e.DomHandler.getWidth(this.element),this.defaultHeight=e.DomHandler.getHeight(this.element),this.defaultContentWidth=e.DomHandler.getWidth(this.content),this.defaultContentHeight=e.DomHandler.getHeight(this.content),this.initialized=!0)},init:function(){this.disabled||(this.setSize(),this.calculateOptions(),this.setSpacerSize())},isVertical:function(){return"vertical"===this.orientation},isHorizontal:function(){return"horizontal"===this.orientation},isBoth:function(){return"both"===this.orientation},scrollTo:function(t){this.lastScrollPos=this.both?{top:0,left:0}:0,this.element&&this.element.scrollTo(t)},scrollToIndex:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto",s=this.isBoth(),o=this.isHorizontal(),n=this.first,l=this.calculateNumItems().numToleratedItems,r=this.getContentPosition(),a=this.itemSize,h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t<=(arguments.length>1?arguments[1]:void 0)?0:t},c=function(t,e,i){return t*e+i},u=function(){return e.scrollTo({left:arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,top:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,behavior:i})},d=s?{rows:0,cols:0}:0,m=!1;s?(u(c((d={rows:h(t[0],l[0]),cols:h(t[1],l[1])}).cols,a[1],r.left),c(d.rows,a[0],r.top)),m=d.rows!==n.rows||d.cols!==n.cols):(d=h(t,l),o?u(c(d,a,r.left),0):u(0,c(d,a,r.top)),m=d!==n),this.isRangeChanged=m,this.first=d},scrollInView:function(t,e){var i=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"auto";if(e){var o=this.isBoth(),n=this.isHorizontal(),l=this.getRenderedRange(),r=l.first,a=l.viewport,h=function(){return i.scrollTo({left:arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,top:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,behavior:s})},c="to-end"===e;if("to-start"===e){if(o)a.first.rows-r.rows>t[0]?h(a.first.cols*this.itemSize[1],(a.first.rows-1)*this.itemSize[0]):a.first.cols-r.cols>t[1]&&h((a.first.cols-1)*this.itemSize[1],a.first.rows*this.itemSize[0]);else if(a.first-r>t){var u=(a.first-1)*this.itemSize;n?h(u,0):h(0,u)}}else if(c)if(o)a.last.rows-r.rows<=t[0]+1?h(a.first.cols*this.itemSize[1],(a.first.rows+1)*this.itemSize[0]):a.last.cols-r.cols<=t[1]+1&&h((a.first.cols+1)*this.itemSize[1],a.first.rows*this.itemSize[0]);else if(a.last-r<=t+1){var d=(a.first+1)*this.itemSize;n?h(d,0):h(0,d)}}else this.scrollToIndex(t,s)},getRenderedRange:function(){var t=function(t,e){return Math.floor(t/(e||t))},e=this.first,i=0;if(this.element){var s=this.isBoth(),o=this.isHorizontal(),n=this.element.scrollTop,l=n.scrollTop,r=n.scrollLeft;if(s)i={rows:(e={rows:t(l,this.itemSize[0]),cols:t(r,this.itemSize[1])}).rows+this.numItemsInViewport.rows,cols:e.cols+this.numItemsInViewport.cols};else i=(e=t(o?r:l,this.itemSize))+this.numItemsInViewport}return{first:this.first,last:this.last,viewport:{first:e,last:i}}},calculateNumItems:function(){var t=this.isBoth(),e=this.isHorizontal(),i=this.itemSize,s=this.getContentPosition(),o=this.element?this.element.offsetWidth-s.left:0,n=this.element?this.element.offsetHeight-s.top:0,l=function(t,e){return Math.ceil(t/(e||t))},r=function(t){return Math.ceil(t/2)},a=t?{rows:l(n,i[0]),cols:l(o,i[1])}:l(e?o:n,i);return{numItemsInViewport:a,numToleratedItems:this.d_numToleratedItems||(t?[r(a.rows),r(a.cols)]:r(a))}},calculateOptions:function(){var t=this,e=this.isBoth(),i=this.first,s=this.calculateNumItems(),o=s.numItemsInViewport,n=s.numToleratedItems,l=function(e,i,s){return t.getLast(e+i+(e<s?2:3)*s,arguments.length>3&&void 0!==arguments[3]&&arguments[3])},r=e?{rows:l(i.rows,o.rows,n[0]),cols:l(i.cols,o.cols,n[1],!0)}:l(i,o,n);this.last=r,this.numItemsInViewport=o,this.d_numToleratedItems=n,this.$emit("update:numToleratedItems",this.d_numToleratedItems),this.showLoader&&(this.loaderArr=e?Array.from({length:o.rows}).map((function(){return Array.from({length:o.cols})})):Array.from({length:o})),this.lazy&&Promise.resolve().then((function(){t.lazyLoadState={first:t.step?e?{rows:0,cols:i.cols}:0:i,last:Math.min(t.step?t.step:r,t.items.length)},t.$emit("lazy-load",t.lazyLoadState)}))},calculateAutoSize:function(){var t=this;this.autoSize&&!this.d_loading&&Promise.resolve().then((function(){if(t.content){var i=t.isBoth(),s=t.isHorizontal(),o=t.isVertical();t.content.style.minHeight=t.content.style.minWidth="auto",t.content.style.position="relative",t.element.style.contain="none";var n=[e.DomHandler.getWidth(t.content),e.DomHandler.getHeight(t.content)],l=n[1];n[0]!==t.defaultContentWidth&&(t.element.style.width=""),l!==t.defaultContentHeight&&(t.element.style.height="");var r=[e.DomHandler.getWidth(t.element),e.DomHandler.getHeight(t.element)],a=r[0],h=r[1];(i||s)&&(t.element.style.width=a<t.defaultWidth?a+"px":t.scrollWidth||t.defaultWidth+"px"),(i||o)&&(t.element.style.height=h<t.defaultHeight?h+"px":t.scrollHeight||t.defaultHeight+"px"),t.content.style.minHeight=t.content.style.minWidth="",t.content.style.position="",t.element.style.contain=""}}))},getLast:function(){return this.items?Math.min((arguments.length>1?arguments[1]:void 0)?(this.columns||this.items[0]).length:this.items.length,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0):0},getContentPosition:function(){if(this.content){var t=getComputedStyle(this.content),e=parseFloat(t.paddingLeft)+Math.max(parseFloat(t.left)||0,0),i=parseFloat(t.paddingRight)+Math.max(parseFloat(t.right)||0,0),s=parseFloat(t.paddingTop)+Math.max(parseFloat(t.top)||0,0),o=parseFloat(t.paddingBottom)+Math.max(parseFloat(t.bottom)||0,0);return{left:e,right:i,top:s,bottom:o,x:e+i,y:s+o}}return{left:0,right:0,top:0,bottom:0,x:0,y:0}},setSize:function(){var t=this;if(this.element){var e=this.isBoth(),i=this.isHorizontal(),s=this.element.parentElement,o=this.scrollWidth||"".concat(this.element.offsetWidth||s.offsetWidth,"px"),n=this.scrollHeight||"".concat(this.element.offsetHeight||s.offsetHeight,"px"),l=function(e,i){return t.element.style[e]=i};e||i?(l("height",n),l("width",o)):l("height",n)}},setSpacerSize:function(){var t=this,e=this.items;if(e){var i=this.isBoth(),s=this.isHorizontal(),o=this.getContentPosition(),n=function(e,i,s){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return t.spacerStyle=u(u({},t.spacerStyle),d({},"".concat(e),(i||[]).length*s+o+"px"))};i?(n("height",e,this.itemSize[0],o.y),n("width",this.columns||e[1],this.itemSize[1],o.x)):s?n("width",this.columns||e,this.itemSize,o.x):n("height",e,this.itemSize,o.y)}},setContentPosition:function(t){var e=this;if(this.content&&!this.appendOnly){var i=this.isBoth(),s=this.isHorizontal(),o=t?t.first:this.first,n=function(t,e){return t*e},l=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.contentStyle=u(u({},e.contentStyle),{transform:"translate3d(".concat(t,"px, ").concat(i,"px, 0)")})};if(i)l(n(o.cols,this.itemSize[1]),n(o.rows,this.itemSize[0]));else{var r=n(o,this.itemSize);s?l(r,0):l(0,r)}}},onScrollPositionChange:function(t){var e=this,i=t.target,s=this.isBoth(),o=this.isHorizontal(),n=this.getContentPosition(),l=function(t,e){return t?t>e?t-e:t:0},r=function(t,e){return Math.floor(t/(e||t))},a=function(t,e,i,s,o,n){return t<=o?o:n?i-s-o:e+o-1},h=function(t,e,i,s,o,n,l){return t<=n?0:Math.max(0,l?t<e?i:t-n:t>e?i:t-2*n)},c=function(t,i,s,o,n,l){var r=i+o+2*n;return t>=n&&(r+=n+1),e.getLast(r,l)},u=l(i.scrollTop,n.top),d=l(i.scrollLeft,n.left),m=s?{rows:0,cols:0}:0,f=this.last,p=!1,g=this.lastScrollPos;if(s){var y=this.lastScrollPos.top<=u,v=this.lastScrollPos.left<=d;if(!this.appendOnly||this.appendOnly&&(y||v)){var S={rows:r(u,this.itemSize[0]),cols:r(d,this.itemSize[1])},w={rows:a(S.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],y),cols:a(S.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],v)};m={rows:h(S.rows,w.rows,this.first.rows,0,0,this.d_numToleratedItems[0],y),cols:h(S.cols,w.cols,this.first.cols,0,0,this.d_numToleratedItems[1],v)},f={rows:c(S.rows,m.rows,0,this.numItemsInViewport.rows,this.d_numToleratedItems[0]),cols:c(S.cols,m.cols,0,this.numItemsInViewport.cols,this.d_numToleratedItems[1],!0)},p=m.rows!==this.first.rows||f.rows!==this.last.rows||m.cols!==this.first.cols||f.cols!==this.last.cols||this.isRangeChanged,g={top:u,left:d}}}else{var z=o?d:u,I=this.lastScrollPos<=z;if(!this.appendOnly||this.appendOnly&&I){var b=r(z,this.itemSize);f=c(b,m=h(b,a(b,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,I),this.first,0,0,this.d_numToleratedItems,I),0,this.numItemsInViewport,this.d_numToleratedItems),p=m!==this.first||f!==this.last||this.isRangeChanged,g=z}}return{first:m,last:f,isRangeChanged:p,scrollPos:g}},onScrollChange:function(t){var e=this.onScrollPositionChange(t),i=e.first,s=e.last,o=e.scrollPos;if(e.isRangeChanged){var n={first:i,last:s};if(this.setContentPosition(n),this.first=i,this.last=s,this.lastScrollPos=o,this.$emit("scroll-index-change",n),this.lazy&&this.isPageChanged(i)){var l={first:this.step?Math.min(this.getPageByFirst(i)*this.step,this.items.length-this.step):i,last:Math.min(this.step?(this.getPageByFirst(i)+1)*this.step:s,this.items.length)};(this.lazyLoadState.first!==l.first||this.lazyLoadState.last!==l.last)&&this.$emit("lazy-load",l),this.lazyLoadState=l}}},onScroll:function(t){var e=this;if(this.$emit("scroll",t),this.delay&&this.isPageChanged()){if(this.scrollTimeout&&clearTimeout(this.scrollTimeout),!this.d_loading&&this.showLoader)(this.onScrollPositionChange(t).isRangeChanged||!!this.step&&this.isPageChanged())&&(this.d_loading=!0);this.scrollTimeout=setTimeout((function(){e.onScrollChange(t),!e.d_loading||!e.showLoader||e.lazy&&void 0!==e.loading||(e.d_loading=!1,e.page=e.getPageByFirst())}),this.delay)}else this.onScrollChange(t)},onResize:function(){var t=this;this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((function(){if(e.DomHandler.isVisible(t.element)){var i=t.isBoth(),s=t.isVertical(),o=t.isHorizontal(),n=[e.DomHandler.getWidth(t.element),e.DomHandler.getHeight(t.element)],l=n[0],r=n[1],a=l!==t.defaultWidth,h=r!==t.defaultHeight;(i?a||h:o?a:!!s&&h)&&(t.d_numToleratedItems=t.numToleratedItems,t.defaultWidth=l,t.defaultHeight=r,t.defaultContentWidth=e.DomHandler.getWidth(t.content),t.defaultContentHeight=e.DomHandler.getHeight(t.content),t.init())}}),this.resizeDelay)},bindResizeListener:function(){this.resizeListener||(this.resizeListener=this.onResize.bind(this),window.addEventListener("resize",this.resizeListener),window.addEventListener("orientationchange",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),window.removeEventListener("orientationchange",this.resizeListener),this.resizeListener=null)},getOptions:function(t){var e=(this.items||[]).length,i=this.isBoth()?this.first.rows+t:this.first+t;return{index:i,count:e,first:0===i,last:i===e-1,even:i%2==0,odd:i%2!=0}},getLoaderOptions:function(t,e){var i=this.loaderArr.length;return u({index:t,count:i,first:0===t,last:t===i-1,even:t%2==0,odd:t%2!=0},e)},getPageByFirst:function(t){return Math.floor(((null!=t?t:this.first)+4*this.d_numToleratedItems)/(this.step||1))},isPageChanged:function(t){return!this.step||this.page!==this.getPageByFirst(null!=t?t:this.first)},setContentEl:function(t){this.content=t||this.content||e.DomHandler.findSingle(this.element,'[data-pc-section="content"]')},elementRef:function(t){this.element=t},contentRef:function(t){this.content=t}},computed:{containerClass:function(){return["p-virtualscroller",this.class,{"p-virtualscroller-inline":this.inline,"p-virtualscroller-both p-both-scroll":this.isBoth(),"p-virtualscroller-horizontal p-horizontal-scroll":this.isHorizontal()}]},contentClass:function(){return["p-virtualscroller-content",{"p-virtualscroller-loading":this.d_loading}]},loaderClass:function(){return["p-virtualscroller-loader",{"p-component-overlay":!this.$slots.loader}]},loadedItems:function(){var t=this;return this.items&&!this.d_loading?this.isBoth()?this.items.slice(this.appendOnly?0:this.first.rows,this.last.rows).map((function(e){return t.columns?e:e.slice(t.appendOnly?0:t.first.cols,t.last.cols)})):this.isHorizontal()&&this.columns?this.items:this.items.slice(this.appendOnly?0:this.first,this.last):[]},loadedRows:function(){return this.d_loading?this.loaderDisabled?this.loaderArr:[]:this.loadedItems},loadedColumns:function(){if(this.columns){var t=this.isBoth(),e=this.isHorizontal();if(t||e)return this.d_loading&&this.loaderDisabled?t?this.loaderArr[0]:this.loaderArr:this.columns.slice(t?this.first.cols:this.first,t?this.last.cols:this.last)}return this.columns}},components:{SpinnerIcon:l.default}},g=["tabindex"];return p.render=function(t,e,i,s,n,l){var r=o.resolveComponent("SpinnerIcon");return t.disabled?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.renderSlot(t.$slots,"default"),o.renderSlot(t.$slots,"content",{items:t.items,rows:t.items,columns:l.loadedColumns})],64)):(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0,ref:l.elementRef,class:l.containerClass,tabindex:t.tabindex,style:t.style,onScroll:e[0]||(e[0]=function(){return l.onScroll&&l.onScroll.apply(l,arguments)})},t.ptm("root"),{"data-pc-name":"virtualscroller"}),[o.renderSlot(t.$slots,"content",{styleClass:l.contentClass,items:l.loadedItems,getItemOptions:l.getOptions,loading:n.d_loading,getLoaderOptions:l.getLoaderOptions,itemSize:t.itemSize,rows:l.loadedRows,columns:l.loadedColumns,contentRef:l.contentRef,spacerStyle:n.spacerStyle,contentStyle:n.contentStyle,vertical:l.isVertical(),horizontal:l.isHorizontal(),both:l.isBoth()},(function(){return[o.createElementVNode("div",o.mergeProps({ref:l.contentRef,class:l.contentClass,style:n.contentStyle},t.ptm("content")),[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l.loadedItems,(function(e,i){return o.renderSlot(t.$slots,"item",{key:i,item:e,options:l.getOptions(i)})})),128))],16)]})),t.showSpacer?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0,class:"p-virtualscroller-spacer",style:n.spacerStyle},t.ptm("spacer")),null,16)):o.createCommentVNode("",!0),!t.loaderDisabled&&t.showLoader&&n.d_loading?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:1,class:l.loaderClass},t.ptm("loader")),[t.$slots&&t.$slots.loader?(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:0},o.renderList(n.loaderArr,(function(e,i){return o.renderSlot(t.$slots,"loader",{key:i,options:l.getLoaderOptions(i,l.isBoth()&&{numCols:t.d_numItemsInViewport.cols})})})),128)):o.createCommentVNode("",!0),o.renderSlot(t.$slots,"loadingicon",{},(function(){return[o.createVNode(r,o.mergeProps({spin:"",class:"p-virtualscroller-loading-icon"},t.ptm("loadingIcon")),null,16)]}))],16)):o.createCommentVNode("",!0)],16,g))},p}(primevue.icons.spinner,primevue.utils,primevue.basecomponent,primevue.virtualscroller.style,Vue);
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.virtualscroller=function(t,e,i,s,o){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var l=n(t),r=n(i),a=n(s);function h(t){return h="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},h(t)}function c(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,s)}return i}function u(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?c(Object(i),!0).forEach((function(e){d(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):c(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function d(t,e,i){var s;return(e="symbol"==h(s=m(e,"string"))?s:String(s))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function m(t,e){if("object"!=h(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,e||"default");if("object"!=h(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var f={name:"VirtualScroller",extends:{name:"BaseVirtualScroller",extends:r.default,props:{id:{type:String,default:null},style:null,class:null,items:{type:Array,default:null},itemSize:{type:[Number,Array],default:0},scrollHeight:null,scrollWidth:null,orientation:{type:String,default:"vertical"},numToleratedItems:{type:Number,default:null},delay:{type:Number,default:0},resizeDelay:{type:Number,default:10},lazy:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loaderDisabled:{type:Boolean,default:!1},columns:{type:Array,default:null},loading:{type:Boolean,default:!1},showSpacer:{type:Boolean,default:!0},showLoader:{type:Boolean,default:!1},tabindex:{type:Number,default:0},inline:{type:Boolean,default:!1},step:{type:Number,default:0},appendOnly:{type:Boolean,default:!1},autoSize:{type:Boolean,default:!1}},style:a.default,provide:function(){return{$parentInstance:this}},beforeMount:function(){a.default.loadStyle()}},emits:["update:numToleratedItems","scroll","scroll-index-change","lazy-load"],data:function(){return{first:this.isBoth()?{rows:0,cols:0}:0,last:this.isBoth()?{rows:0,cols:0}:0,page:this.isBoth()?{rows:0,cols:0}:0,numItemsInViewport:this.isBoth()?{rows:0,cols:0}:0,lastScrollPos:this.isBoth()?{top:0,left:0}:0,d_numToleratedItems:this.numToleratedItems,d_loading:this.loading,loaderArr:[],spacerStyle:{},contentStyle:{}}},element:null,content:null,lastScrollPos:null,scrollTimeout:null,resizeTimeout:null,defaultWidth:0,defaultHeight:0,defaultContentWidth:0,defaultContentHeight:0,isRangeChanged:!1,lazyLoadState:{},resizeListener:null,initialized:!1,watch:{numToleratedItems:function(t){this.d_numToleratedItems=t},loading:function(t){this.d_loading=t},items:function(t,e){e&&e.length===(t||[]).length||(this.init(),this.calculateAutoSize())},itemSize:function(){this.init(),this.calculateAutoSize()},orientation:function(){this.lastScrollPos=this.isBoth()?{top:0,left:0}:0},scrollHeight:function(){this.init(),this.calculateAutoSize()},scrollWidth:function(){this.init(),this.calculateAutoSize()}},mounted:function(){this.viewInit(),this.lastScrollPos=this.isBoth()?{top:0,left:0}:0,this.lazyLoadState=this.lazyLoadState||{}},updated:function(){!this.initialized&&this.viewInit()},unmounted:function(){this.unbindResizeListener(),this.initialized=!1},methods:{viewInit:function(){e.DomHandler.isVisible(this.element)&&(this.setContentEl(this.content),this.init(),this.bindResizeListener(),this.defaultWidth=e.DomHandler.getWidth(this.element),this.defaultHeight=e.DomHandler.getHeight(this.element),this.defaultContentWidth=e.DomHandler.getWidth(this.content),this.defaultContentHeight=e.DomHandler.getHeight(this.content),this.initialized=!0)},init:function(){this.disabled||(this.setSize(),this.calculateOptions(),this.setSpacerSize())},isVertical:function(){return"vertical"===this.orientation},isHorizontal:function(){return"horizontal"===this.orientation},isBoth:function(){return"both"===this.orientation},scrollTo:function(t){this.lastScrollPos=this.both?{top:0,left:0}:0,this.element&&this.element.scrollTo(t)},scrollToIndex:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto",s=this.isBoth(),o=this.isHorizontal(),n=this.first,l=this.calculateNumItems().numToleratedItems,r=this.getContentPosition(),a=this.itemSize,h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t<=(arguments.length>1?arguments[1]:void 0)?0:t},c=function(t,e,i){return t*e+i},u=function(){return e.scrollTo({left:arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,top:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,behavior:i})},d=s?{rows:0,cols:0}:0,m=!1;s?(u(c((d={rows:h(t[0],l[0]),cols:h(t[1],l[1])}).cols,a[1],r.left),c(d.rows,a[0],r.top)),m=d.rows!==n.rows||d.cols!==n.cols):(d=h(t,l),o?u(c(d,a,r.left),0):u(0,c(d,a,r.top)),m=d!==n),this.isRangeChanged=m,this.first=d},scrollInView:function(t,e){var i=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"auto";if(e){var o=this.isBoth(),n=this.isHorizontal(),l=this.getRenderedRange(),r=l.first,a=l.viewport,h=function(){return i.scrollTo({left:arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,top:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,behavior:s})},c="to-end"===e;if("to-start"===e){if(o)a.first.rows-r.rows>t[0]?h(a.first.cols*this.itemSize[1],(a.first.rows-1)*this.itemSize[0]):a.first.cols-r.cols>t[1]&&h((a.first.cols-1)*this.itemSize[1],a.first.rows*this.itemSize[0]);else if(a.first-r>t){var u=(a.first-1)*this.itemSize;n?h(u,0):h(0,u)}}else if(c)if(o)a.last.rows-r.rows<=t[0]+1?h(a.first.cols*this.itemSize[1],(a.first.rows+1)*this.itemSize[0]):a.last.cols-r.cols<=t[1]+1&&h((a.first.cols+1)*this.itemSize[1],a.first.rows*this.itemSize[0]);else if(a.last-r<=t+1){var d=(a.first+1)*this.itemSize;n?h(d,0):h(0,d)}}else this.scrollToIndex(t,s)},getRenderedRange:function(){var t=function(t,e){return Math.floor(t/(e||t))},e=this.first,i=0;if(this.element){var s=this.isBoth(),o=this.isHorizontal(),n=this.element,l=n.scrollTop,r=n.scrollLeft;if(s)i={rows:(e={rows:t(l,this.itemSize[0]),cols:t(r,this.itemSize[1])}).rows+this.numItemsInViewport.rows,cols:e.cols+this.numItemsInViewport.cols};else i=(e=t(o?r:l,this.itemSize))+this.numItemsInViewport}return{first:this.first,last:this.last,viewport:{first:e,last:i}}},calculateNumItems:function(){var t=this.isBoth(),e=this.isHorizontal(),i=this.itemSize,s=this.getContentPosition(),o=this.element?this.element.offsetWidth-s.left:0,n=this.element?this.element.offsetHeight-s.top:0,l=function(t,e){return Math.ceil(t/(e||t))},r=function(t){return Math.ceil(t/2)},a=t?{rows:l(n,i[0]),cols:l(o,i[1])}:l(e?o:n,i);return{numItemsInViewport:a,numToleratedItems:this.d_numToleratedItems||(t?[r(a.rows),r(a.cols)]:r(a))}},calculateOptions:function(){var t=this,e=this.isBoth(),i=this.first,s=this.calculateNumItems(),o=s.numItemsInViewport,n=s.numToleratedItems,l=function(e,i,s){return t.getLast(e+i+(e<s?2:3)*s,arguments.length>3&&void 0!==arguments[3]&&arguments[3])},r=e?{rows:l(i.rows,o.rows,n[0]),cols:l(i.cols,o.cols,n[1],!0)}:l(i,o,n);this.last=r,this.numItemsInViewport=o,this.d_numToleratedItems=n,this.$emit("update:numToleratedItems",this.d_numToleratedItems),this.showLoader&&(this.loaderArr=e?Array.from({length:o.rows}).map((function(){return Array.from({length:o.cols})})):Array.from({length:o})),this.lazy&&Promise.resolve().then((function(){t.lazyLoadState={first:t.step?e?{rows:0,cols:i.cols}:0:i,last:Math.min(t.step?t.step:r,t.items.length)},t.$emit("lazy-load",t.lazyLoadState)}))},calculateAutoSize:function(){var t=this;this.autoSize&&!this.d_loading&&Promise.resolve().then((function(){if(t.content){var i=t.isBoth(),s=t.isHorizontal(),o=t.isVertical();t.content.style.minHeight=t.content.style.minWidth="auto",t.content.style.position="relative",t.element.style.contain="none";var n=[e.DomHandler.getWidth(t.content),e.DomHandler.getHeight(t.content)],l=n[1];n[0]!==t.defaultContentWidth&&(t.element.style.width=""),l!==t.defaultContentHeight&&(t.element.style.height="");var r=[e.DomHandler.getWidth(t.element),e.DomHandler.getHeight(t.element)],a=r[0],h=r[1];(i||s)&&(t.element.style.width=a<t.defaultWidth?a+"px":t.scrollWidth||t.defaultWidth+"px"),(i||o)&&(t.element.style.height=h<t.defaultHeight?h+"px":t.scrollHeight||t.defaultHeight+"px"),t.content.style.minHeight=t.content.style.minWidth="",t.content.style.position="",t.element.style.contain=""}}))},getLast:function(){return this.items?Math.min((arguments.length>1?arguments[1]:void 0)?(this.columns||this.items[0]).length:this.items.length,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0):0},getContentPosition:function(){if(this.content){var t=getComputedStyle(this.content),e=parseFloat(t.paddingLeft)+Math.max(parseFloat(t.left)||0,0),i=parseFloat(t.paddingRight)+Math.max(parseFloat(t.right)||0,0),s=parseFloat(t.paddingTop)+Math.max(parseFloat(t.top)||0,0),o=parseFloat(t.paddingBottom)+Math.max(parseFloat(t.bottom)||0,0);return{left:e,right:i,top:s,bottom:o,x:e+i,y:s+o}}return{left:0,right:0,top:0,bottom:0,x:0,y:0}},setSize:function(){var t=this;if(this.element){var e=this.isBoth(),i=this.isHorizontal(),s=this.element.parentElement,o=this.scrollWidth||"".concat(this.element.offsetWidth||s.offsetWidth,"px"),n=this.scrollHeight||"".concat(this.element.offsetHeight||s.offsetHeight,"px"),l=function(e,i){return t.element.style[e]=i};e||i?(l("height",n),l("width",o)):l("height",n)}},setSpacerSize:function(){var t=this,e=this.items;if(e){var i=this.isBoth(),s=this.isHorizontal(),o=this.getContentPosition(),n=function(e,i,s){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return t.spacerStyle=u(u({},t.spacerStyle),d({},"".concat(e),(i||[]).length*s+o+"px"))};i?(n("height",e,this.itemSize[0],o.y),n("width",this.columns||e[1],this.itemSize[1],o.x)):s?n("width",this.columns||e,this.itemSize,o.x):n("height",e,this.itemSize,o.y)}},setContentPosition:function(t){var e=this;if(this.content&&!this.appendOnly){var i=this.isBoth(),s=this.isHorizontal(),o=t?t.first:this.first,n=function(t,e){return t*e},l=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.contentStyle=u(u({},e.contentStyle),{transform:"translate3d(".concat(t,"px, ").concat(i,"px, 0)")})};if(i)l(n(o.cols,this.itemSize[1]),n(o.rows,this.itemSize[0]));else{var r=n(o,this.itemSize);s?l(r,0):l(0,r)}}},onScrollPositionChange:function(t){var e=this,i=t.target,s=this.isBoth(),o=this.isHorizontal(),n=this.getContentPosition(),l=function(t,e){return t?t>e?t-e:t:0},r=function(t,e){return Math.floor(t/(e||t))},a=function(t,e,i,s,o,n){return t<=o?o:n?i-s-o:e+o-1},h=function(t,e,i,s,o,n,l){return t<=n?0:Math.max(0,l?t<e?i:t-n:t>e?i:t-2*n)},c=function(t,i,s,o,n,l){var r=i+o+2*n;return t>=n&&(r+=n+1),e.getLast(r,l)},u=l(i.scrollTop,n.top),d=l(i.scrollLeft,n.left),m=s?{rows:0,cols:0}:0,f=this.last,p=!1,g=this.lastScrollPos;if(s){var y=this.lastScrollPos.top<=u,v=this.lastScrollPos.left<=d;if(!this.appendOnly||this.appendOnly&&(y||v)){var S={rows:r(u,this.itemSize[0]),cols:r(d,this.itemSize[1])},w={rows:a(S.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],y),cols:a(S.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],v)};m={rows:h(S.rows,w.rows,this.first.rows,0,0,this.d_numToleratedItems[0],y),cols:h(S.cols,w.cols,this.first.cols,0,0,this.d_numToleratedItems[1],v)},f={rows:c(S.rows,m.rows,0,this.numItemsInViewport.rows,this.d_numToleratedItems[0]),cols:c(S.cols,m.cols,0,this.numItemsInViewport.cols,this.d_numToleratedItems[1],!0)},p=m.rows!==this.first.rows||f.rows!==this.last.rows||m.cols!==this.first.cols||f.cols!==this.last.cols||this.isRangeChanged,g={top:u,left:d}}}else{var z=o?d:u,I=this.lastScrollPos<=z;if(!this.appendOnly||this.appendOnly&&I){var b=r(z,this.itemSize);f=c(b,m=h(b,a(b,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,I),this.first,0,0,this.d_numToleratedItems,I),0,this.numItemsInViewport,this.d_numToleratedItems),p=m!==this.first||f!==this.last||this.isRangeChanged,g=z}}return{first:m,last:f,isRangeChanged:p,scrollPos:g}},onScrollChange:function(t){var e=this.onScrollPositionChange(t),i=e.first,s=e.last,o=e.scrollPos;if(e.isRangeChanged){var n={first:i,last:s};if(this.setContentPosition(n),this.first=i,this.last=s,this.lastScrollPos=o,this.$emit("scroll-index-change",n),this.lazy&&this.isPageChanged(i)){var l={first:this.step?Math.min(this.getPageByFirst(i)*this.step,this.items.length-this.step):i,last:Math.min(this.step?(this.getPageByFirst(i)+1)*this.step:s,this.items.length)};(this.lazyLoadState.first!==l.first||this.lazyLoadState.last!==l.last)&&this.$emit("lazy-load",l),this.lazyLoadState=l}}},onScroll:function(t){var e=this;if(this.$emit("scroll",t),this.delay&&this.isPageChanged()){if(this.scrollTimeout&&clearTimeout(this.scrollTimeout),!this.d_loading&&this.showLoader)(this.onScrollPositionChange(t).isRangeChanged||!!this.step&&this.isPageChanged())&&(this.d_loading=!0);this.scrollTimeout=setTimeout((function(){e.onScrollChange(t),!e.d_loading||!e.showLoader||e.lazy&&void 0!==e.loading||(e.d_loading=!1,e.page=e.getPageByFirst())}),this.delay)}else this.onScrollChange(t)},onResize:function(){var t=this;this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((function(){if(e.DomHandler.isVisible(t.element)){var i=t.isBoth(),s=t.isVertical(),o=t.isHorizontal(),n=[e.DomHandler.getWidth(t.element),e.DomHandler.getHeight(t.element)],l=n[0],r=n[1],a=l!==t.defaultWidth,h=r!==t.defaultHeight;(i?a||h:o?a:!!s&&h)&&(t.d_numToleratedItems=t.numToleratedItems,t.defaultWidth=l,t.defaultHeight=r,t.defaultContentWidth=e.DomHandler.getWidth(t.content),t.defaultContentHeight=e.DomHandler.getHeight(t.content),t.init())}}),this.resizeDelay)},bindResizeListener:function(){this.resizeListener||(this.resizeListener=this.onResize.bind(this),window.addEventListener("resize",this.resizeListener),window.addEventListener("orientationchange",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),window.removeEventListener("orientationchange",this.resizeListener),this.resizeListener=null)},getOptions:function(t){var e=(this.items||[]).length,i=this.isBoth()?this.first.rows+t:this.first+t;return{index:i,count:e,first:0===i,last:i===e-1,even:i%2==0,odd:i%2!=0}},getLoaderOptions:function(t,e){var i=this.loaderArr.length;return u({index:t,count:i,first:0===t,last:t===i-1,even:t%2==0,odd:t%2!=0},e)},getPageByFirst:function(t){return Math.floor(((null!=t?t:this.first)+4*this.d_numToleratedItems)/(this.step||1))},isPageChanged:function(t){return!this.step||this.page!==this.getPageByFirst(null!=t?t:this.first)},setContentEl:function(t){this.content=t||this.content||e.DomHandler.findSingle(this.element,'[data-pc-section="content"]')},elementRef:function(t){this.element=t},contentRef:function(t){this.content=t}},computed:{containerClass:function(){return["p-virtualscroller",this.class,{"p-virtualscroller-inline":this.inline,"p-virtualscroller-both p-both-scroll":this.isBoth(),"p-virtualscroller-horizontal p-horizontal-scroll":this.isHorizontal()}]},contentClass:function(){return["p-virtualscroller-content",{"p-virtualscroller-loading":this.d_loading}]},loaderClass:function(){return["p-virtualscroller-loader",{"p-component-overlay":!this.$slots.loader}]},loadedItems:function(){var t=this;return this.items&&!this.d_loading?this.isBoth()?this.items.slice(this.appendOnly?0:this.first.rows,this.last.rows).map((function(e){return t.columns?e:e.slice(t.appendOnly?0:t.first.cols,t.last.cols)})):this.isHorizontal()&&this.columns?this.items:this.items.slice(this.appendOnly?0:this.first,this.last):[]},loadedRows:function(){return this.d_loading?this.loaderDisabled?this.loaderArr:[]:this.loadedItems},loadedColumns:function(){if(this.columns){var t=this.isBoth(),e=this.isHorizontal();if(t||e)return this.d_loading&&this.loaderDisabled?t?this.loaderArr[0]:this.loaderArr:this.columns.slice(t?this.first.cols:this.first,t?this.last.cols:this.last)}return this.columns}},components:{SpinnerIcon:l.default}},p=["tabindex"];return f.render=function(t,e,i,s,n,l){var r=o.resolveComponent("SpinnerIcon");return t.disabled?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.renderSlot(t.$slots,"default"),o.renderSlot(t.$slots,"content",{items:t.items,rows:t.items,columns:l.loadedColumns})],64)):(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0,ref:l.elementRef,class:l.containerClass,tabindex:t.tabindex,style:t.style,onScroll:e[0]||(e[0]=function(){return l.onScroll&&l.onScroll.apply(l,arguments)})},t.ptm("root"),{"data-pc-name":"virtualscroller"}),[o.renderSlot(t.$slots,"content",{styleClass:l.contentClass,items:l.loadedItems,getItemOptions:l.getOptions,loading:n.d_loading,getLoaderOptions:l.getLoaderOptions,itemSize:t.itemSize,rows:l.loadedRows,columns:l.loadedColumns,contentRef:l.contentRef,spacerStyle:n.spacerStyle,contentStyle:n.contentStyle,vertical:l.isVertical(),horizontal:l.isHorizontal(),both:l.isBoth()},(function(){return[o.createElementVNode("div",o.mergeProps({ref:l.contentRef,class:l.contentClass,style:n.contentStyle},t.ptm("content")),[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l.loadedItems,(function(e,i){return o.renderSlot(t.$slots,"item",{key:i,item:e,options:l.getOptions(i)})})),128))],16)]})),t.showSpacer?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0,class:"p-virtualscroller-spacer",style:n.spacerStyle},t.ptm("spacer")),null,16)):o.createCommentVNode("",!0),!t.loaderDisabled&&t.showLoader&&n.d_loading?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:1,class:l.loaderClass},t.ptm("loader")),[t.$slots&&t.$slots.loader?(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:0},o.renderList(n.loaderArr,(function(e,i){return o.renderSlot(t.$slots,"loader",{key:i,options:l.getLoaderOptions(i,l.isBoth()&&{numCols:t.d_numItemsInViewport.cols})})})),128)):o.createCommentVNode("",!0),o.renderSlot(t.$slots,"loadingicon",{},(function(){return[o.createVNode(r,o.mergeProps({spin:"",class:"p-virtualscroller-loading-icon"},t.ptm("loadingIcon")),null,16)]}))],16)):o.createCommentVNode("",!0)],16,p))},f}(primevue.icons.spinner,primevue.utils,primevue.basecomponent,primevue.virtualscroller.style,Vue);
|
package/web-types.json
CHANGED