primevue 3.22.4 → 3.24.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/LICENSE.md +1 -1
- package/README.md +13 -13
- package/accordion/Accordion.d.ts +53 -21
- package/accordiontab/AccordionTab.d.ts +33 -12
- package/autocomplete/AutoComplete.d.ts +111 -84
- package/avatar/Avatar.d.ts +38 -25
- package/avatar/Avatar.vue +1 -1
- package/avatar/avatar.cjs.js +2 -1
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.esm.js +2 -1
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +2 -1
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/AvatarGroup.d.ts +30 -14
- package/badge/Badge.d.ts +34 -20
- package/badge/Badge.vue +16 -5
- package/badge/badge.cjs.js +15 -5
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +15 -5
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +16 -7
- package/badge/badge.min.js +1 -1
- package/badgedirective/BadgeDirective.d.ts +60 -1
- package/blockui/BlockUI.d.ts +36 -16
- package/breadcrumb/Breadcrumb.d.ts +37 -20
- package/breadcrumb/Breadcrumb.vue +1 -1
- package/breadcrumb/breadcrumb.cjs.js +2 -1
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +2 -1
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +2 -1
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/Button.d.ts +74 -17
- package/button/Button.vue +51 -8
- package/button/button.cjs.js +51 -8
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +51 -8
- package/button/button.esm.min.js +1 -1
- package/button/button.js +51 -8
- package/button/button.min.js +1 -1
- package/calendar/Calendar.d.ts +112 -77
- package/calendar/Calendar.vue +4 -4
- package/calendar/calendar.cjs.js +4 -4
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +4 -4
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +4 -4
- package/calendar/calendar.min.js +1 -1
- package/card/Card.d.ts +35 -15
- package/carousel/Carousel.d.ts +47 -29
- package/cascadeselect/CascadeSelect.d.ts +70 -59
- package/chart/Chart.d.ts +41 -23
- package/checkbox/Checkbox.d.ts +39 -15
- package/checkbox/Checkbox.vue +1 -1
- package/checkbox/checkbox.cjs.js +1 -1
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +1 -1
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +1 -1
- package/checkbox/checkbox.min.js +1 -1
- package/chip/Chip.d.ts +35 -14
- package/chips/Chips.d.ts +45 -20
- package/colorpicker/ColorPicker.d.ts +46 -28
- package/column/Column.d.ts +81 -65
- package/columngroup/ColumnGroup.d.ts +29 -13
- package/config/PrimeVue.d.ts +1 -2
- package/config/config.cjs.js +20 -2
- package/config/config.cjs.min.js +1 -1
- package/config/config.esm.js +20 -2
- package/config/config.esm.min.js +1 -1
- package/config/config.js +20 -2
- package/config/config.min.js +1 -1
- package/confirmationoptions/ConfirmationOptions.d.ts +15 -6
- package/confirmationservice/ConfirmationService.d.ts +11 -0
- package/confirmdialog/ConfirmDialog.d.ts +35 -17
- package/confirmpopup/ConfirmPopup.d.ts +32 -17
- package/contextmenu/ContextMenu.d.ts +51 -35
- package/core/core.js +368 -121
- package/core/core.min.js +8 -8
- package/datatable/DataTable.d.ts +248 -205
- package/datatable/DataTable.vue +78 -117
- package/datatable/TableBody.vue +3 -17
- package/datatable/datatable.cjs.js +73 -67
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +73 -67
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +73 -67
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.d.ts +65 -47
- package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +33 -13
- package/deferredcontent/DeferredContent.d.ts +30 -13
- package/dialog/Dialog.d.ts +67 -46
- package/dialog/Dialog.vue +1 -1
- package/dialog/dialog.cjs.js +1 -1
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +1 -1
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +1 -1
- package/dialog/dialog.min.js +1 -1
- package/dialogservice/DialogService.d.ts +13 -2
- package/divider/Divider.d.ts +35 -30
- package/dock/Dock.d.ts +49 -36
- package/dropdown/Dropdown.d.ts +90 -82
- package/dropdown/Dropdown.vue +1 -1
- package/dropdown/dropdown.cjs.js +1 -1
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +1 -1
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +1 -1
- package/dropdown/dropdown.min.js +1 -1
- package/dynamicdialog/DynamicDialog.d.ts +30 -10
- package/dynamicdialog/DynamicDialog.vue +2 -2
- package/dynamicdialog/dynamicdialog.cjs.js +3 -3
- package/dynamicdialog/dynamicdialog.cjs.min.js +1 -1
- package/dynamicdialog/dynamicdialog.esm.js +2 -2
- package/dynamicdialog/dynamicdialog.esm.min.js +1 -1
- package/dynamicdialog/dynamicdialog.js +3 -3
- package/dynamicdialog/dynamicdialog.min.js +1 -1
- package/dynamicdialogoptions/DynamicDialogOptions.d.ts +28 -8
- package/editor/Editor.d.ts +48 -17
- package/fieldset/Fieldset.d.ts +43 -16
- package/fileupload/FileUpload.d.ts +101 -47
- package/focustrap/FocusTrap.d.ts +42 -3
- package/fullcalendar/FullCalendar.d.ts +1 -1
- package/galleria/Galleria.d.ts +64 -40
- package/image/Image.d.ts +33 -14
- package/inlinemessage/InlineMessage.d.ts +31 -17
- package/inplace/Inplace.d.ts +41 -18
- package/inputmask/InputMask.d.ts +41 -17
- package/inputnumber/InputNumber.d.ts +60 -41
- package/inputswitch/InputSwitch.d.ts +35 -15
- package/inputswitch/InputSwitch.vue +1 -0
- package/inputswitch/inputswitch.cjs.js +1 -1
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +1 -1
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +1 -1
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/InputText.d.ts +32 -12
- package/knob/Knob.d.ts +47 -21
- package/listbox/Listbox.d.ts +81 -60
- package/megamenu/MegaMenu.d.ts +42 -27
- package/megamenu/MegaMenu.vue +17 -0
- package/megamenu/megamenu.cjs.js +1 -1
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +1 -1
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +1 -1
- package/megamenu/megamenu.min.js +1 -1
- package/menu/Menu.d.ts +57 -28
- package/menu/Menu.vue +6 -0
- package/menu/menu.cjs.js +26 -8
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +27 -9
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +26 -8
- package/menu/menu.min.js +1 -1
- package/menubar/Menubar.d.ts +36 -19
- package/menuitem/MenuItem.d.ts +22 -10
- package/message/Message.d.ts +40 -21
- package/multiselect/MultiSelect.d.ts +111 -90
- package/orderlist/OrderList.d.ts +51 -23
- package/organizationchart/OrganizationChart.d.ts +43 -26
- package/overlaypanel/OverlayPanel.d.ts +46 -26
- package/package.json +2 -2
- package/paginator/Paginator.d.ts +49 -24
- package/panel/Panel.d.ts +39 -14
- package/panelmenu/PanelMenu.d.ts +49 -21
- package/password/Password.d.ts +47 -28
- package/picklist/PickList.d.ts +74 -33
- package/progressbar/ProgressBar.d.ts +34 -17
- package/progressspinner/ProgressSpinner.d.ts +32 -13
- package/radiobutton/RadioButton.d.ts +32 -14
- package/rating/Rating.d.ts +51 -25
- package/resources/themes/arya-blue/theme.css +34 -11
- package/resources/themes/arya-green/theme.css +34 -11
- package/resources/themes/arya-orange/theme.css +34 -11
- package/resources/themes/arya-purple/theme.css +34 -11
- package/resources/themes/bootstrap4-dark-blue/theme.css +34 -11
- package/resources/themes/bootstrap4-dark-purple/theme.css +34 -11
- package/resources/themes/bootstrap4-light-blue/theme.css +34 -11
- package/resources/themes/bootstrap4-light-purple/theme.css +34 -11
- package/resources/themes/fluent-light/theme.css +34 -11
- package/resources/themes/lara-dark-blue/theme.css +34 -11
- package/resources/themes/lara-dark-indigo/theme.css +34 -11
- package/resources/themes/lara-dark-purple/theme.css +34 -11
- package/resources/themes/lara-dark-teal/theme.css +34 -11
- package/resources/themes/lara-light-blue/theme.css +34 -11
- package/resources/themes/lara-light-indigo/theme.css +34 -11
- package/resources/themes/lara-light-purple/theme.css +34 -11
- package/resources/themes/lara-light-teal/theme.css +34 -11
- package/resources/themes/luna-amber/theme.css +34 -11
- package/resources/themes/luna-blue/theme.css +34 -11
- package/resources/themes/luna-green/theme.css +34 -11
- package/resources/themes/luna-pink/theme.css +34 -11
- package/resources/themes/md-dark-deeppurple/theme.css +34 -11
- package/resources/themes/md-dark-indigo/theme.css +34 -11
- package/resources/themes/md-light-deeppurple/theme.css +34 -11
- package/resources/themes/md-light-indigo/theme.css +34 -11
- package/resources/themes/mdc-dark-deeppurple/theme.css +34 -11
- package/resources/themes/mdc-dark-indigo/theme.css +34 -11
- package/resources/themes/mdc-light-deeppurple/theme.css +34 -11
- package/resources/themes/mdc-light-indigo/theme.css +34 -11
- package/resources/themes/mira/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/mira/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/mira/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/mira/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/mira/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/mira/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/mira/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/mira/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/mira/theme.css +6089 -0
- package/resources/themes/nano/theme.css +5861 -0
- package/resources/themes/nova/theme.css +34 -11
- package/resources/themes/nova-accent/theme.css +34 -11
- package/resources/themes/nova-alt/theme.css +34 -11
- package/resources/themes/nova-vue/theme.css +34 -11
- package/resources/themes/rhea/theme.css +34 -11
- package/resources/themes/saga-blue/theme.css +34 -11
- package/resources/themes/saga-green/theme.css +34 -11
- package/resources/themes/saga-orange/theme.css +34 -11
- package/resources/themes/saga-purple/theme.css +34 -11
- package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-300.woff +0 -0
- package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-300.woff2 +0 -0
- package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-700.woff +0 -0
- package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-700.woff2 +0 -0
- package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-regular.woff +0 -0
- package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-regular.woff2 +0 -0
- package/resources/themes/soho-dark/theme.css +5854 -0
- package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-300.woff +0 -0
- package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-300.woff2 +0 -0
- package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-700.woff +0 -0
- package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-700.woff2 +0 -0
- package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-regular.woff +0 -0
- package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-regular.woff2 +0 -0
- package/resources/themes/soho-light/theme.css +5908 -0
- package/resources/themes/tailwind-light/theme.css +34 -11
- package/resources/themes/vela-blue/theme.css +34 -11
- package/resources/themes/vela-green/theme.css +34 -11
- package/resources/themes/vela-orange/theme.css +34 -11
- package/resources/themes/vela-purple/theme.css +34 -11
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-300.woff +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-300.woff2 +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-600.woff +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-600.woff2 +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-700.woff +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-700.woff2 +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-regular.woff +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-regular.woff2 +0 -0
- package/resources/themes/viva-dark/theme.css +6016 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-300.woff +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-300.woff2 +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-600.woff +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-600.woff2 +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-700.woff +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-700.woff2 +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-regular.woff +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-regular.woff2 +0 -0
- package/resources/themes/viva-light/theme.css +6016 -0
- package/ripple/Ripple.d.ts +24 -1
- package/row/Row.d.ts +28 -10
- package/scrollpanel/ScrollPanel.d.ts +29 -11
- package/scrolltop/ScrollTop.d.ts +35 -18
- package/selectbutton/SelectButton.d.ts +47 -27
- package/sidebar/Sidebar.d.ts +46 -27
- package/skeleton/Skeleton.d.ts +36 -22
- package/slider/Slider.d.ts +46 -23
- package/speeddial/SpeedDial.d.ts +64 -51
- package/splitbutton/SplitButton.d.ts +73 -24
- package/splitbutton/SplitButton.vue +41 -1
- package/splitbutton/splitbutton.cjs.js +43 -3
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +43 -3
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +43 -3
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/Splitter.d.ts +49 -30
- package/splitterpanel/SplitterPanel.d.ts +28 -10
- package/steps/Steps.d.ts +36 -15
- package/styleclass/StyleClass.d.ts +72 -1
- package/tabmenu/TabMenu.d.ts +41 -16
- package/tabmenu/TabMenu.vue +1 -1
- package/tabmenu/tabmenu.cjs.js +1 -0
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +1 -0
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +1 -0
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabpanel/TabPanel.d.ts +29 -11
- package/tabview/TabView.d.ts +47 -19
- package/tag/Tag.d.ts +33 -15
- package/tag/Tag.vue +1 -1
- package/tag/tag.cjs.js +4 -2
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.esm.js +5 -3
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +4 -2
- package/tag/tag.min.js +1 -1
- package/terminal/Terminal.d.ts +30 -14
- package/terminalservice/TerminalService.d.ts +24 -5
- package/textarea/Textarea.d.ts +33 -11
- package/tieredmenu/TieredMenu.d.ts +45 -31
- package/timeline/Timeline.d.ts +41 -32
- package/toast/Toast.d.ts +63 -35
- package/toast/Toast.vue +4 -2
- package/toast/ToastMessage.vue +4 -4
- package/toast/toast.cjs.js +8 -6
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +8 -6
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +8 -6
- package/toast/toast.min.js +1 -1
- package/toastservice/ToastService.d.ts +16 -3
- package/togglebutton/ToggleButton.d.ts +42 -22
- package/toolbar/Toolbar.d.ts +34 -14
- package/tooltip/Tooltip.d.ts +99 -1
- package/tree/Tree.d.ts +55 -36
- package/treeselect/TreeSelect.d.ts +63 -55
- package/treetable/TreeTable.d.ts +121 -107
- package/tristatecheckbox/TriStateCheckbox.d.ts +35 -12
- package/ts-helpers.d.ts +2 -2
- package/utils/utils.cjs.js +20 -22
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +20 -22
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +20 -22
- package/utils/utils.min.js +1 -1
- package/vetur-attributes.json +62 -2
- package/vetur-tags.json +17 -2
- package/virtualscroller/VirtualScroller.d.ts +99 -43
- package/virtualscroller/VirtualScroller.vue +248 -72
- package/virtualscroller/virtualscroller.cjs.js +234 -72
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +234 -72
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +235 -74
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +1930 -1742
|
@@ -1,14 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* VirtualScroller is a performant approach to handle huge data efficiently.
|
|
4
|
+
*
|
|
5
|
+
* [Live Demo](https://www.primevue.org/virtualscroller/)
|
|
6
|
+
*
|
|
7
|
+
* @module virtualscroller
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
1
10
|
import { VNode } from 'vue';
|
|
2
11
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
3
12
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
type VirtualScrollerOrientationType = 'vertical' | 'horizontal' | 'both' | undefined;
|
|
9
|
-
|
|
10
|
-
type VirtualScrollerToType = 'to-start' | 'to-end' | undefined;
|
|
11
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Custom scroll index change event.
|
|
15
|
+
* @see {@link VirtualScrollerEmits['scroll-index-change']}
|
|
16
|
+
*/
|
|
12
17
|
export interface VirtualScrollerScrollIndexChangeEvent {
|
|
13
18
|
/**
|
|
14
19
|
* First index of the new data range to be loaded.
|
|
@@ -21,15 +26,22 @@ export interface VirtualScrollerScrollIndexChangeEvent {
|
|
|
21
26
|
}
|
|
22
27
|
|
|
23
28
|
/**
|
|
29
|
+
* Custom lazy event.
|
|
30
|
+
* @see {@link VirtualScrollerEmits['scroll-index-change']}
|
|
24
31
|
* @extends VirtualScrollerScrollIndexChangeEvent
|
|
25
32
|
*/
|
|
26
33
|
export interface VirtualScrollerLazyEvent extends VirtualScrollerScrollIndexChangeEvent {}
|
|
27
34
|
|
|
28
35
|
/**
|
|
36
|
+
* Custom virtualscroller viewport metadata.
|
|
37
|
+
* @see {@link VirtualScrollerEmits['scroll-index-change']}
|
|
29
38
|
* @extends VirtualScrollerScrollIndexChangeEvent
|
|
30
39
|
*/
|
|
31
40
|
export interface VirtualScrollerViewport extends VirtualScrollerScrollIndexChangeEvent {}
|
|
32
41
|
|
|
42
|
+
/**
|
|
43
|
+
* Virtual scroller rendered range.
|
|
44
|
+
*/
|
|
33
45
|
export interface VirtualScrollerRangeMethod {
|
|
34
46
|
/**
|
|
35
47
|
* Whether the item is first.
|
|
@@ -46,6 +58,9 @@ export interface VirtualScrollerRangeMethod {
|
|
|
46
58
|
viewport: VirtualScrollerViewport;
|
|
47
59
|
}
|
|
48
60
|
|
|
61
|
+
/**
|
|
62
|
+
* Custom item options.
|
|
63
|
+
*/
|
|
49
64
|
export interface VirtualScrollerItemOptions {
|
|
50
65
|
/**
|
|
51
66
|
* Item index
|
|
@@ -78,10 +93,15 @@ export interface VirtualScrollerItemOptions {
|
|
|
78
93
|
}
|
|
79
94
|
|
|
80
95
|
/**
|
|
96
|
+
* Custom virtualscroller loader options
|
|
97
|
+
* @see VirtualScrollerItemOptions
|
|
81
98
|
* @extends VirtualScrollerItemOptions
|
|
82
99
|
*/
|
|
83
100
|
export interface VirtualScrollerLoaderOptions extends VirtualScrollerItemOptions {}
|
|
84
101
|
|
|
102
|
+
/**
|
|
103
|
+
* Defines valid properties in VirtualScroller component.
|
|
104
|
+
*/
|
|
85
105
|
export interface VirtualScrollerProps {
|
|
86
106
|
/**
|
|
87
107
|
* Unique identifier of the element.
|
|
@@ -98,11 +118,11 @@ export interface VirtualScrollerProps {
|
|
|
98
118
|
/**
|
|
99
119
|
* An array of objects to display.
|
|
100
120
|
*/
|
|
101
|
-
items?:
|
|
121
|
+
items?: any[] | any[][] | undefined | null;
|
|
102
122
|
/**
|
|
103
123
|
* The height/width of item according to orientation.
|
|
104
124
|
*/
|
|
105
|
-
itemSize?:
|
|
125
|
+
itemSize?: number | number[] | undefined;
|
|
106
126
|
/**
|
|
107
127
|
* Height of the scroll viewport.
|
|
108
128
|
*/
|
|
@@ -113,31 +133,38 @@ export interface VirtualScrollerProps {
|
|
|
113
133
|
scrollWidth?: string | undefined;
|
|
114
134
|
/**
|
|
115
135
|
* The orientation of scrollbar.
|
|
116
|
-
* @
|
|
117
|
-
* Default value is 'vertical'.
|
|
136
|
+
* @defaultValue vertical
|
|
118
137
|
*/
|
|
119
|
-
orientation?:
|
|
138
|
+
orientation?: 'vertical' | 'horizontal' | 'both' | undefined;
|
|
120
139
|
/**
|
|
121
140
|
* Determines how many additional elements to add to the DOM outside of the view.
|
|
122
141
|
* According to the scrolls made up and down, extra items are added in a certain algorithm in the form of multiples of this number.
|
|
123
|
-
*
|
|
142
|
+
* @defaultValue half the number of items shown in the view.
|
|
124
143
|
*/
|
|
125
144
|
numToleratedItems?: number | undefined;
|
|
126
145
|
/**
|
|
127
146
|
* Delay in scroll before new data is loaded.
|
|
128
|
-
*
|
|
147
|
+
* @defaultValue 0
|
|
129
148
|
*/
|
|
130
149
|
delay?: number | undefined;
|
|
150
|
+
/**
|
|
151
|
+
* Delay after window's resize finishes.
|
|
152
|
+
* @defaultValue 10
|
|
153
|
+
*/
|
|
154
|
+
resizeDelay?: number | undefined;
|
|
131
155
|
/**
|
|
132
156
|
* Defines if data is loaded and interacted with in lazy manner.
|
|
157
|
+
* @defaultValue false
|
|
133
158
|
*/
|
|
134
159
|
lazy?: boolean | undefined;
|
|
135
160
|
/**
|
|
136
161
|
* If disabled, the VirtualScroller feature is eliminated and the content is displayed directly.
|
|
162
|
+
* @defaultValue false
|
|
137
163
|
*/
|
|
138
164
|
disabled?: boolean | undefined;
|
|
139
165
|
/**
|
|
140
166
|
* Used to implement a custom loader instead of using the loader feature in the VirtualScroller.
|
|
167
|
+
* @defaultValue false
|
|
141
168
|
*/
|
|
142
169
|
loaderDisabled?: boolean | undefined;
|
|
143
170
|
/**
|
|
@@ -146,31 +173,55 @@ export interface VirtualScrollerProps {
|
|
|
146
173
|
showLoader?: boolean | undefined;
|
|
147
174
|
/**
|
|
148
175
|
* Used to implement a custom spacer instead of using the spacer feature in the VirtualScroller.
|
|
149
|
-
*
|
|
176
|
+
* @defaultValue true
|
|
150
177
|
*/
|
|
151
178
|
showSpacer?: boolean | undefined;
|
|
152
179
|
/**
|
|
153
180
|
* Whether to load items.
|
|
181
|
+
* @defaultValue false
|
|
154
182
|
*/
|
|
155
183
|
loading?: boolean | undefined;
|
|
156
184
|
/**
|
|
157
185
|
* Callback to invoke in lazy mode to load new data.
|
|
158
186
|
* @param {VirtualScrollerLazyEvent} event - Custom lazy event.
|
|
159
187
|
*/
|
|
160
|
-
onLazyLoad
|
|
188
|
+
onLazyLoad?(event: VirtualScrollerLazyEvent): void;
|
|
161
189
|
/**
|
|
162
190
|
* Index of the element in tabbing order.
|
|
163
|
-
*
|
|
191
|
+
* @defaultValue 0
|
|
164
192
|
*/
|
|
165
193
|
tabindex?: number | string | undefined;
|
|
194
|
+
/**
|
|
195
|
+
* When enabled, positions the content as inline.
|
|
196
|
+
* @defaultValue false
|
|
197
|
+
*/
|
|
198
|
+
inline?: boolean | undefined;
|
|
199
|
+
/**
|
|
200
|
+
* Used to specify how many items to load in each load method in lazy mode.
|
|
201
|
+
* @defaultValue 0
|
|
202
|
+
*/
|
|
203
|
+
step?: number | undefined;
|
|
204
|
+
/**
|
|
205
|
+
* Used to append each loaded item to top without removing any items from the DOM. Using very large data may cause the browser to crash.
|
|
206
|
+
* @defaultValue false
|
|
207
|
+
*/
|
|
208
|
+
appendOnly?: boolean | undefined;
|
|
209
|
+
/**
|
|
210
|
+
* Whether to dynamically change the height or width of scrollable container.
|
|
211
|
+
* @defaultValue false
|
|
212
|
+
*/
|
|
213
|
+
autoSize?: boolean | undefined;
|
|
166
214
|
}
|
|
167
215
|
|
|
216
|
+
/**
|
|
217
|
+
* Defines valid slots in VirtualScroller component.
|
|
218
|
+
*/
|
|
168
219
|
export interface VirtualScrollerSlots {
|
|
169
220
|
/**
|
|
170
221
|
* Custom content template.
|
|
171
222
|
* @param {Object} scope - content slot's params.
|
|
172
223
|
*/
|
|
173
|
-
content
|
|
224
|
+
content(scope: {
|
|
174
225
|
/**
|
|
175
226
|
* An array of objects to display for virtualscroller
|
|
176
227
|
*/
|
|
@@ -203,7 +254,7 @@ export interface VirtualScrollerSlots {
|
|
|
203
254
|
/**
|
|
204
255
|
* The height/width of item according to orientation.
|
|
205
256
|
*/
|
|
206
|
-
itemSize:
|
|
257
|
+
itemSize: number | number[] | undefined;
|
|
207
258
|
/**
|
|
208
259
|
* The number of the rendered rows.
|
|
209
260
|
*/
|
|
@@ -232,12 +283,12 @@ export interface VirtualScrollerSlots {
|
|
|
232
283
|
* Whether the orientation is both.
|
|
233
284
|
*/
|
|
234
285
|
both: boolean;
|
|
235
|
-
})
|
|
286
|
+
}): VNode[];
|
|
236
287
|
/**
|
|
237
288
|
* Custom item template.
|
|
238
289
|
* @param {Object} scope - item slot's params.
|
|
239
290
|
*/
|
|
240
|
-
item
|
|
291
|
+
item(scope: {
|
|
241
292
|
/**
|
|
242
293
|
* Item data.
|
|
243
294
|
*/
|
|
@@ -246,42 +297,56 @@ export interface VirtualScrollerSlots {
|
|
|
246
297
|
* Item options.
|
|
247
298
|
*/
|
|
248
299
|
options: VirtualScrollerItemOptions;
|
|
249
|
-
})
|
|
300
|
+
}): VNode[];
|
|
250
301
|
/**
|
|
251
302
|
* Custom loader template.
|
|
252
303
|
* @param {Object} scope - header slot's params.
|
|
253
304
|
*/
|
|
254
|
-
loader
|
|
305
|
+
loader(scope: {
|
|
255
306
|
/**
|
|
256
307
|
* Loader options.
|
|
257
308
|
*/
|
|
258
309
|
options: VirtualScrollerLoaderOptions;
|
|
259
|
-
})
|
|
310
|
+
}): VNode[];
|
|
260
311
|
}
|
|
261
312
|
|
|
262
|
-
|
|
313
|
+
/**
|
|
314
|
+
* Defines valid emits in VirtualScroller component.
|
|
315
|
+
*/
|
|
316
|
+
export interface VirtualScrollerEmits {
|
|
263
317
|
/**
|
|
264
318
|
* Emitted when the numToleratedItems changes.
|
|
265
319
|
* @param {number} value - New number tolerated items
|
|
266
320
|
*/
|
|
267
|
-
'update:numToleratedItems'
|
|
321
|
+
'update:numToleratedItems'(value: number): void;
|
|
268
322
|
/**
|
|
269
323
|
* Callback to invoke when scroll position changes.
|
|
270
324
|
* @param {Event} event - Browser event.
|
|
271
325
|
*/
|
|
272
|
-
scroll
|
|
326
|
+
scroll(event: Event): void;
|
|
273
327
|
/**
|
|
274
328
|
* Callback to invoke when scroll position and item's range in view changes.
|
|
275
|
-
* @param {
|
|
329
|
+
* @param {VirtualScrollerScrollIndexChangeEvent} event - Custom tab open event.
|
|
276
330
|
*/
|
|
277
|
-
'scroll-index-change'
|
|
331
|
+
'scroll-index-change'(event: VirtualScrollerScrollIndexChangeEvent): void;
|
|
278
332
|
/**
|
|
279
333
|
* Callback to invoke in lazy mode to load new data.
|
|
280
334
|
* @param {VirtualScrollerLazyEvent} event - Custom lazy event.
|
|
281
335
|
*/
|
|
282
|
-
'lazy-load'
|
|
283
|
-
}
|
|
336
|
+
'lazy-load'(event: VirtualScrollerLazyEvent): void;
|
|
337
|
+
}
|
|
284
338
|
|
|
339
|
+
/**
|
|
340
|
+
* **PrimeVue - VirtualScroller**
|
|
341
|
+
*
|
|
342
|
+
* _VirtualScroller is a performant approach to handle huge data efficiently._
|
|
343
|
+
*
|
|
344
|
+
* [Live Demo](https://www.primevue.org/virtualscroller/)
|
|
345
|
+
* --- ---
|
|
346
|
+
* 
|
|
347
|
+
*
|
|
348
|
+
* @group Component
|
|
349
|
+
*/
|
|
285
350
|
declare class VirtualScroller extends ClassComponent<VirtualScrollerProps, VirtualScrollerSlots, VirtualScrollerEmits> {
|
|
286
351
|
/**
|
|
287
352
|
* Scroll to move to a specific position.
|
|
@@ -297,10 +362,10 @@ declare class VirtualScroller extends ClassComponent<VirtualScrollerProps, Virtu
|
|
|
297
362
|
/**
|
|
298
363
|
* It is used to move the specified index into the view. It is a method that will usually be needed when keyboard support is added to the virtualScroller component.
|
|
299
364
|
* @param {number} index - Index of item according to orientation mode.
|
|
300
|
-
* @param {
|
|
365
|
+
* @param {'to-start' | 'to-end' } to - Defines the location of the item in view,
|
|
301
366
|
* @param {ScrollBehavior} [behavior] Behavior of scroll
|
|
302
367
|
*/
|
|
303
|
-
scrollInView(index: number, to:
|
|
368
|
+
scrollInView(index: number, to: 'to-start' | 'to-end', behavior?: ScrollBehavior): void;
|
|
304
369
|
/**
|
|
305
370
|
* Returns the range of items added to the DOM.
|
|
306
371
|
*/
|
|
@@ -313,13 +378,4 @@ declare module '@vue/runtime-core' {
|
|
|
313
378
|
}
|
|
314
379
|
}
|
|
315
380
|
|
|
316
|
-
/**
|
|
317
|
-
*
|
|
318
|
-
* VirtualScroller is a performant approach to handle huge data efficiently.
|
|
319
|
-
*
|
|
320
|
-
* Demos:
|
|
321
|
-
*
|
|
322
|
-
* - [VirtualScroller](https://www.primefaces.org/primevue/virtualscroller)
|
|
323
|
-
*
|
|
324
|
-
*/
|
|
325
381
|
export default VirtualScroller;
|