@vibe/core 4.5.16 → 4.5.17
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/dist/components/Table/TableBody/TableBody.d.ts +1 -1
- package/dist/components/alert-banner/dist/AlertBanner/AlertBanner.module.scss.js +1 -1
- package/dist/components/alert-banner/dist/AlertBanner/AlertBannerButton/AlertBannerButton.module.scss.js +1 -1
- package/dist/components/alert-banner/dist/AlertBanner/AlertBannerLink/AlertBannerLink.module.scss.js +1 -1
- package/dist/components/alert-banner/dist/AlertBanner/AlertBannerText/AlertBannerText.module.scss.js +1 -1
- package/dist/components/avatar/dist/Avatar/Avatar.module.scss.js +1 -1
- package/dist/components/avatar/dist/Avatar/AvatarBadge.module.scss.js +1 -1
- package/dist/components/avatar/dist/Avatar/AvatarContent.module.scss.js +1 -1
- package/dist/components/button-group/dist/ButtonGroup/ButtonGroup.module.scss.js +1 -1
- package/dist/components/checkbox/dist/Checkbox/Checkbox.module.scss.js +1 -1
- package/dist/components/color-picker/dist/ColorPicker/ColorPicker.module.scss.js +1 -1
- package/dist/components/color-picker/dist/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.module.scss.js +1 -1
- package/dist/components/color-picker/dist/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.module.scss.js +1 -1
- package/dist/components/color-picker/dist/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.module.scss.js +1 -1
- package/dist/components/counter/dist/Counter/Counter.module.scss.js +1 -1
- package/dist/components/dialog/dist/Dialog/Dialog.module.scss.js +1 -1
- package/dist/components/dialog/dist/Dialog/components/DialogContent/DialogContent.module.scss.js +1 -1
- package/dist/components/dialog/dist/DialogContentContainer/DialogContentContainer.module.scss.js +1 -1
- package/dist/components/editable/dist/EditableHeading/EditableHeading.module.scss.js +1 -1
- package/dist/components/editable/dist/EditableText/EditableText.module.scss.js +1 -1
- package/dist/components/editable/dist/EditableTypography/EditableTypography.module.scss.js +1 -1
- package/dist/components/expand-collapse/dist/ExpandCollapse/ExpandCollapse.module.scss.js +1 -1
- package/dist/components/icon-button/dist/IconButton/IconButton.module.scss.js +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/label/dist/Label/Label.module.scss.js +1 -1
- package/dist/components/label/dist/Label/LabelCelebrationAnimation.module.scss.js +1 -1
- package/dist/components/radio-button/dist/RadioButton/RadioButton.module.scss.js +1 -1
- package/dist/components/tabs/dist/Tab/Tab.module.scss.js +1 -1
- package/dist/components/tabs/dist/TabList/TabList.module.scss.js +1 -1
- package/dist/components/tabs/dist/TabPanel/TabPanel.module.scss.js +1 -1
- package/dist/components/tabs/dist/TabPanels/TabPanels.module.scss.js +1 -1
- package/dist/components/text-with-highlight/dist/TextWithHighlight/TextWithHighlight.module.scss.js +1 -1
- package/dist/components/toggle/dist/Switch/Switch.module.scss.js +1 -1
- package/dist/components/toggle/dist/Toggle/MockToggle.module.scss.js +1 -1
- package/dist/components/toggle/dist/Toggle/Toggle.module.scss.js +1 -1
- package/dist/components/toggle/dist/Toggle/ToggleText.module.scss.js +1 -1
- package/dist/components/tooltip/dist/Tooltip/Tooltip.module.scss.js +1 -1
- package/dist/components/transitions/dist/SlideTransition/SlideTransition.module.scss.js +1 -1
- package/dist/components/transitions/dist/TransitionView/TransitionView.module.scss.js +1 -1
- package/dist/components/typography/dist/Heading/Heading.module.scss.js +1 -1
- package/dist/components/typography/dist/Text/Text.module.scss.js +1 -1
- package/dist/components/typography/dist/Typography/Typography.module.scss.js +1 -1
- package/dist/components/virtualized-grid/dist/VirtualizedGrid/VirtualizedGrid.js +2 -0
- package/dist/components/virtualized-grid/dist/VirtualizedGrid/VirtualizedGrid.js.map +1 -0
- package/dist/components/virtualized-grid/dist/VirtualizedGrid/VirtualizedGrid.module.scss.js +2 -0
- package/dist/components/virtualized-list/dist/VirtualizedList/VirtualizedList.js +2 -0
- package/dist/components/virtualized-list/dist/VirtualizedList/VirtualizedList.js.map +1 -0
- package/dist/components/virtualized-list/dist/VirtualizedList/VirtualizedList.module.scss.js +2 -0
- package/dist/hooks/dist/useThrottledCallback/index.js +2 -0
- package/dist/hooks/dist/useThrottledCallback/index.js.map +1 -0
- package/dist/metadata/components.json +2 -2
- package/dist/metadata.json +2 -2
- package/dist/mocked_classnames/components/Table/TableBody/TableBody.d.ts +1 -1
- package/dist/mocked_classnames/components/index.d.ts +2 -2
- package/dist/mocked_classnames/src/components/Accordion/Accordion/Accordion.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AttentionBox/AttentionBox.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AttentionBox/components/AttentionBoxCloseButton/AttentionBoxCloseButton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AttentionBox/components/AttentionBoxLeadingIcon/AttentionBoxLeadingIcon.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AttentionBox/components/AttentionBoxLink/AttentionBoxLink.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AttentionBox/layouts/AttentionBoxCompact/AttentionBoxCompact.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AttentionBox/layouts/AttentionBoxDefault/AttentionBoxDefault.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroup.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounter.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounterTooltipContent.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounterTooltipContentVirtualizedList.js +1 -1
- package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounterTooltipContentVirtualizedList.js.map +1 -1
- package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounterTooltipContentVirtualizedList.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Badge/Badge.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Badge/Indicator/Indicator.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/BaseItem/BaseItem.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/BaseList/BaseList.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbContent/BreadcrumbContent.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbItem.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/BreadcrumbsBar/BreadcrumbMenu/BreadcrumbsMenu.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/BreadcrumbsBar/BreadcrumbsBar.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Chips/Chips.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Combobox/Combobox.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Combobox/ComboboxHelpers/ComboboxHelpers.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Combobox/components/ComboboxCategory/ComboboxCategory.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Combobox/components/ComboboxItems/ComboboxItems.js +1 -1
- package/dist/mocked_classnames/src/components/Combobox/components/ComboboxItems/ComboboxItems.js.map +1 -1
- package/dist/mocked_classnames/src/components/Combobox/components/ComboboxItems/ComboboxItems.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Combobox/components/ComboboxOption/ComboboxOption.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Combobox/components/StickyCategoryHeader/StickyCategoryHeader.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/DatePicker/DatePicker.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/DatePicker/DatePickerHeader.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/components/DropdownBase/DropdownBase.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/components/DropdownBaseList/DropdownBaseList.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/components/DropdownBoxMode/DropdownBoxMode.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/components/Menu/Menu.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/components/MultiSelectedValues/MultiSelectedValues.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/components/Trigger/Trigger.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/EmptyState/EmptyState.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/FieldLabel/FieldLabel.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Info/components/InfoDialogContent/InfoDialogContent.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Info/components/InfoLink/InfoLink.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/InfoText/InfoText.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/List/List.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/List/VirtualizedListItems/VirtualizedListItems.js +1 -1
- package/dist/mocked_classnames/src/components/List/VirtualizedListItems/VirtualizedListItems.js.map +1 -1
- package/dist/mocked_classnames/src/components/List/VirtualizedListItems/VirtualizedListItems.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ListItem/ListItem.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ListItemAvatar/ListItemAvatar.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ListItemIcon/ListItemIcon.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ListTitle/ListTitle.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/Menu/Menu.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuDivider/MenuDivider.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuItem/MenuItem.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuItem/components/BaseMenuItem/BaseMenuItem.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuItem/components/MenuItemIcon/MenuItemIcon.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuItem/components/MenuItemSubMenuIcon/MenuItemSubMenuIcon.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuItemButton/MenuItemButton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuTitle/MenuTitle.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/MenuButton/MenuButton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/Modal/Modal.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/ModalHeader/ModalHeader.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/ModalMedia/ModalMedia.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/ModalTopActions/ModalTopActions.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/footers/ModalFooter/ModalFooter.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/footers/ModalFooterBase/ModalFooterBase.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/footers/ModalFooterWizard/ModalFooterWizard.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/layouts/ModalBasicLayout/ModalBasicLayout.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/layouts/ModalFooterShadow.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/layouts/ModalLayoutScrollableContent.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/layouts/ModalMediaLayout/ModalMediaLayout.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/layouts/ModalSideBySideLayout/ModalSideBySideLayout.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/MultiStepIndicator/MultiStepIndicator.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/NumberField/NumberField.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/NumberField/components/NumberFieldSpinButton/NumberFieldSpinButton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Search/Search.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/SelectionIndicator.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/Slider.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderBase.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderFilledTrack.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderRail.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderThumb.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderTrack.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/SliderInfix.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/SplitButton/SplitButton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Steps/Steps.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Steps/StepsCommand.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Steps/StepsDot.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Steps/StepsGalleryHeader.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Steps/StepsHeader.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Steps/StepsNumbersHeader.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/Table/Table.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableBody/TableBody.js.map +1 -1
- package/dist/mocked_classnames/src/components/Table/TableBody/TableBody.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableCell/TableCell.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableCellSkeleton/TableCellSkeleton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableContainer/TableContainer.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableHeader/TableHeader.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableHeaderCell/TableHeaderCell.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableRow/TableRow.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableRowMenu/TableRowMenu.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableVirtualizedBody/TableVirtualizedBody.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/TextArea/TextArea.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/TextField/TextField.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tipseen/Tipseen.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tipseen/TipseenBasicContent.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tipseen/TipseenContent.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tipseen/TipseenMedia/TipseenMedia.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tipseen/TipseenTitle.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tipseen/TipseenWizard.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Toast/Toast.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Toast/ToastLink/ToastLink.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/next/List/List.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/next/List/ListTitle/ListTitle.module.scss.js +1 -1
- package/dist/mocked_classnames/src/index.js +1 -1
- package/dist/shared/dist/utils/virtualized-service.js.map +1 -0
- package/dist/src/components/Accordion/Accordion/Accordion.module.scss.js +1 -1
- package/dist/src/components/AttentionBox/AttentionBox.module.scss.js +1 -1
- package/dist/src/components/AttentionBox/components/AttentionBoxCloseButton/AttentionBoxCloseButton.module.scss.js +1 -1
- package/dist/src/components/AttentionBox/components/AttentionBoxLeadingIcon/AttentionBoxLeadingIcon.module.scss.js +1 -1
- package/dist/src/components/AttentionBox/components/AttentionBoxLink/AttentionBoxLink.module.scss.js +1 -1
- package/dist/src/components/AttentionBox/layouts/AttentionBoxCompact/AttentionBoxCompact.module.scss.js +1 -1
- package/dist/src/components/AttentionBox/layouts/AttentionBoxDefault/AttentionBoxDefault.module.scss.js +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroup.module.scss.js +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroupCounter.module.scss.js +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroupCounterTooltipContent.module.scss.js +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroupCounterTooltipContentVirtualizedList.js +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroupCounterTooltipContentVirtualizedList.js.map +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroupCounterTooltipContentVirtualizedList.module.scss.js +1 -1
- package/dist/src/components/Badge/Badge.module.scss.js +1 -1
- package/dist/src/components/Badge/Indicator/Indicator.module.scss.js +1 -1
- package/dist/src/components/BaseItem/BaseItem.module.scss.js +1 -1
- package/dist/src/components/BaseList/BaseList.module.scss.js +1 -1
- package/dist/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbContent/BreadcrumbContent.module.scss.js +1 -1
- package/dist/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbItem.module.scss.js +1 -1
- package/dist/src/components/BreadcrumbsBar/BreadcrumbMenu/BreadcrumbsMenu.module.scss.js +1 -1
- package/dist/src/components/BreadcrumbsBar/BreadcrumbsBar.module.scss.js +1 -1
- package/dist/src/components/Chips/Chips.module.scss.js +1 -1
- package/dist/src/components/Combobox/Combobox.module.scss.js +1 -1
- package/dist/src/components/Combobox/ComboboxHelpers/ComboboxHelpers.module.scss.js +1 -1
- package/dist/src/components/Combobox/components/ComboboxCategory/ComboboxCategory.module.scss.js +1 -1
- package/dist/src/components/Combobox/components/ComboboxItems/ComboboxItems.js +1 -1
- package/dist/src/components/Combobox/components/ComboboxItems/ComboboxItems.js.map +1 -1
- package/dist/src/components/Combobox/components/ComboboxItems/ComboboxItems.module.scss.js +1 -1
- package/dist/src/components/Combobox/components/ComboboxOption/ComboboxOption.module.scss.js +1 -1
- package/dist/src/components/Combobox/components/StickyCategoryHeader/StickyCategoryHeader.module.scss.js +1 -1
- package/dist/src/components/DatePicker/DatePicker.module.scss.js +1 -1
- package/dist/src/components/DatePicker/DatePickerHeader.module.scss.js +1 -1
- package/dist/src/components/Dropdown/components/DropdownBase/DropdownBase.module.scss.js +1 -1
- package/dist/src/components/Dropdown/components/DropdownBaseList/DropdownBaseList.module.scss.js +1 -1
- package/dist/src/components/Dropdown/components/DropdownBoxMode/DropdownBoxMode.module.scss.js +1 -1
- package/dist/src/components/Dropdown/components/Menu/Menu.module.scss.js +1 -1
- package/dist/src/components/Dropdown/components/MultiSelectedValues/MultiSelectedValues.module.scss.js +1 -1
- package/dist/src/components/Dropdown/components/Trigger/Trigger.module.scss.js +1 -1
- package/dist/src/components/EmptyState/EmptyState.module.scss.js +1 -1
- package/dist/src/components/FieldLabel/FieldLabel.module.scss.js +1 -1
- package/dist/src/components/Info/components/InfoDialogContent/InfoDialogContent.module.scss.js +1 -1
- package/dist/src/components/Info/components/InfoLink/InfoLink.module.scss.js +1 -1
- package/dist/src/components/InfoText/InfoText.module.scss.js +1 -1
- package/dist/src/components/List/List.module.scss.js +1 -1
- package/dist/src/components/List/VirtualizedListItems/VirtualizedListItems.js +1 -1
- package/dist/src/components/List/VirtualizedListItems/VirtualizedListItems.js.map +1 -1
- package/dist/src/components/List/VirtualizedListItems/VirtualizedListItems.module.scss.js +1 -1
- package/dist/src/components/ListItem/ListItem.module.scss.js +1 -1
- package/dist/src/components/ListItemAvatar/ListItemAvatar.module.scss.js +1 -1
- package/dist/src/components/ListItemIcon/ListItemIcon.module.scss.js +1 -1
- package/dist/src/components/ListTitle/ListTitle.module.scss.js +1 -1
- package/dist/src/components/Menu/Menu/Menu.module.scss.js +1 -1
- package/dist/src/components/Menu/MenuDivider/MenuDivider.module.scss.js +1 -1
- package/dist/src/components/Menu/MenuItem/MenuItem.module.scss.js +1 -1
- package/dist/src/components/Menu/MenuItem/components/BaseMenuItem/BaseMenuItem.module.scss.js +1 -1
- package/dist/src/components/Menu/MenuItem/components/MenuItemIcon/MenuItemIcon.module.scss.js +1 -1
- package/dist/src/components/Menu/MenuItem/components/MenuItemSubMenuIcon/MenuItemSubMenuIcon.module.scss.js +1 -1
- package/dist/src/components/Menu/MenuItemButton/MenuItemButton.module.scss.js +1 -1
- package/dist/src/components/Menu/MenuTitle/MenuTitle.module.scss.js +1 -1
- package/dist/src/components/MenuButton/MenuButton.module.scss.js +1 -1
- package/dist/src/components/Modal/Modal/Modal.module.scss.js +1 -1
- package/dist/src/components/Modal/ModalHeader/ModalHeader.module.scss.js +1 -1
- package/dist/src/components/Modal/ModalMedia/ModalMedia.module.scss.js +1 -1
- package/dist/src/components/Modal/ModalTopActions/ModalTopActions.module.scss.js +1 -1
- package/dist/src/components/Modal/footers/ModalFooter/ModalFooter.module.scss.js +1 -1
- package/dist/src/components/Modal/footers/ModalFooterBase/ModalFooterBase.module.scss.js +1 -1
- package/dist/src/components/Modal/footers/ModalFooterWizard/ModalFooterWizard.module.scss.js +1 -1
- package/dist/src/components/Modal/layouts/ModalBasicLayout/ModalBasicLayout.module.scss.js +1 -1
- package/dist/src/components/Modal/layouts/ModalFooterShadow.module.scss.js +1 -1
- package/dist/src/components/Modal/layouts/ModalLayoutScrollableContent.module.scss.js +1 -1
- package/dist/src/components/Modal/layouts/ModalMediaLayout/ModalMediaLayout.module.scss.js +1 -1
- package/dist/src/components/Modal/layouts/ModalSideBySideLayout/ModalSideBySideLayout.module.scss.js +1 -1
- package/dist/src/components/MultiStepIndicator/MultiStepIndicator.module.scss.js +1 -1
- package/dist/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.module.scss.js +1 -1
- package/dist/src/components/NumberField/NumberField.module.scss.js +1 -1
- package/dist/src/components/NumberField/components/NumberFieldSpinButton/NumberFieldSpinButton.module.scss.js +1 -1
- package/dist/src/components/Search/Search.module.scss.js +1 -1
- package/dist/src/components/Slider/SelectionIndicator.module.scss.js +1 -1
- package/dist/src/components/Slider/Slider.module.scss.js +1 -1
- package/dist/src/components/Slider/SliderBase/SliderBase.module.scss.js +1 -1
- package/dist/src/components/Slider/SliderBase/SliderFilledTrack.module.scss.js +1 -1
- package/dist/src/components/Slider/SliderBase/SliderRail.module.scss.js +1 -1
- package/dist/src/components/Slider/SliderBase/SliderThumb.module.scss.js +1 -1
- package/dist/src/components/Slider/SliderBase/SliderTrack.module.scss.js +1 -1
- package/dist/src/components/Slider/SliderInfix.module.scss.js +1 -1
- package/dist/src/components/SplitButton/SplitButton.module.scss.js +1 -1
- package/dist/src/components/Steps/Steps.module.scss.js +1 -1
- package/dist/src/components/Steps/StepsCommand.module.scss.js +1 -1
- package/dist/src/components/Steps/StepsDot.module.scss.js +1 -1
- package/dist/src/components/Steps/StepsGalleryHeader.module.scss.js +1 -1
- package/dist/src/components/Steps/StepsHeader.module.scss.js +1 -1
- package/dist/src/components/Steps/StepsNumbersHeader.module.scss.js +1 -1
- package/dist/src/components/Table/Table/Table.module.scss.js +1 -1
- package/dist/src/components/Table/TableBody/TableBody.js.map +1 -1
- package/dist/src/components/Table/TableBody/TableBody.module.scss.js +1 -1
- package/dist/src/components/Table/TableCell/TableCell.module.scss.js +1 -1
- package/dist/src/components/Table/TableCellSkeleton/TableCellSkeleton.module.scss.js +1 -1
- package/dist/src/components/Table/TableContainer/TableContainer.module.scss.js +1 -1
- package/dist/src/components/Table/TableHeader/TableHeader.module.scss.js +1 -1
- package/dist/src/components/Table/TableHeaderCell/TableHeaderCell.module.scss.js +1 -1
- package/dist/src/components/Table/TableRow/TableRow.module.scss.js +1 -1
- package/dist/src/components/Table/TableRowMenu/TableRowMenu.module.scss.js +1 -1
- package/dist/src/components/Table/TableVirtualizedBody/TableVirtualizedBody.module.scss.js +1 -1
- package/dist/src/components/TextArea/TextArea.module.scss.js +1 -1
- package/dist/src/components/TextField/TextField.module.scss.js +1 -1
- package/dist/src/components/Tipseen/Tipseen.module.scss.js +1 -1
- package/dist/src/components/Tipseen/TipseenBasicContent.module.scss.js +1 -1
- package/dist/src/components/Tipseen/TipseenContent.module.scss.js +1 -1
- package/dist/src/components/Tipseen/TipseenMedia/TipseenMedia.module.scss.js +1 -1
- package/dist/src/components/Tipseen/TipseenTitle.module.scss.js +1 -1
- package/dist/src/components/Tipseen/TipseenWizard.module.scss.js +1 -1
- package/dist/src/components/Toast/Toast.module.scss.js +1 -1
- package/dist/src/components/Toast/ToastLink/ToastLink.module.scss.js +1 -1
- package/dist/src/components/next/List/List.module.scss.js +1 -1
- package/dist/src/components/next/List/ListTitle/ListTitle.module.scss.js +1 -1
- package/dist/src/index.js +1 -1
- package/dist/style/dist/index.min.css.js +1 -1
- package/package.json +38 -36
- package/dist/components/VirtualizedGrid/VirtualizedGrid.d.ts +0 -67
- package/dist/components/VirtualizedGrid/VirtualizedGrid.types.d.ts +0 -6
- package/dist/components/VirtualizedGrid/index.d.ts +0 -2
- package/dist/components/VirtualizedList/VirtualizedList.d.ts +0 -90
- package/dist/components/VirtualizedList/VirtualizedList.types.d.ts +0 -8
- package/dist/components/VirtualizedList/index.d.ts +0 -2
- package/dist/hooks/useThrottledCallback.d.ts +0 -4
- package/dist/mocked_classnames/components/VirtualizedGrid/VirtualizedGrid.d.ts +0 -67
- package/dist/mocked_classnames/components/VirtualizedGrid/VirtualizedGrid.types.d.ts +0 -6
- package/dist/mocked_classnames/components/VirtualizedGrid/index.d.ts +0 -2
- package/dist/mocked_classnames/components/VirtualizedList/VirtualizedList.d.ts +0 -90
- package/dist/mocked_classnames/components/VirtualizedList/VirtualizedList.types.d.ts +0 -8
- package/dist/mocked_classnames/components/VirtualizedList/index.d.ts +0 -2
- package/dist/mocked_classnames/hooks/useThrottledCallback.d.ts +0 -4
- package/dist/mocked_classnames/services/virtualized-service.d.ts +0 -27
- package/dist/mocked_classnames/src/components/VirtualizedGrid/VirtualizedGrid.js +0 -2
- package/dist/mocked_classnames/src/components/VirtualizedGrid/VirtualizedGrid.js.map +0 -1
- package/dist/mocked_classnames/src/components/VirtualizedGrid/VirtualizedGrid.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/VirtualizedList/VirtualizedList.js +0 -2
- package/dist/mocked_classnames/src/components/VirtualizedList/VirtualizedList.js.map +0 -1
- package/dist/mocked_classnames/src/components/VirtualizedList/VirtualizedList.module.scss.js +0 -2
- package/dist/mocked_classnames/src/hooks/useThrottledCallback.js +0 -2
- package/dist/mocked_classnames/src/hooks/useThrottledCallback.js.map +0 -1
- package/dist/mocked_classnames/src/services/virtualized-service.js.map +0 -1
- package/dist/services/virtualized-service.d.ts +0 -27
- package/dist/src/components/VirtualizedGrid/VirtualizedGrid.js +0 -2
- package/dist/src/components/VirtualizedGrid/VirtualizedGrid.js.map +0 -1
- package/dist/src/components/VirtualizedGrid/VirtualizedGrid.module.scss.js +0 -2
- package/dist/src/components/VirtualizedGrid/VirtualizedGrid.module.scss.js.map +0 -1
- package/dist/src/components/VirtualizedList/VirtualizedList.js +0 -2
- package/dist/src/components/VirtualizedList/VirtualizedList.js.map +0 -1
- package/dist/src/components/VirtualizedList/VirtualizedList.module.scss.js +0 -2
- package/dist/src/components/VirtualizedList/VirtualizedList.module.scss.js.map +0 -1
- package/dist/src/hooks/useThrottledCallback.js +0 -2
- package/dist/src/hooks/useThrottledCallback.js.map +0 -1
- package/dist/src/services/virtualized-service.js +0 -2
- package/dist/src/services/virtualized-service.js.map +0 -1
- /package/dist/{mocked_classnames/src/components → components/virtualized-grid/dist}/VirtualizedGrid/VirtualizedGrid.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components → components/virtualized-list/dist}/VirtualizedList/VirtualizedList.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/services → shared/dist/utils}/virtualized-service.js +0 -0
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import React, { type CSSProperties, type ReactElement } from "react";
|
|
2
|
-
import { type ScrollDirection } from "react-window";
|
|
3
|
-
import { type VibeComponentProps } from "../../types";
|
|
4
|
-
import { type VirtualizedGridItemType as ItemType } from "./VirtualizedGrid.types";
|
|
5
|
-
export interface VirtualizedGridProps extends VibeComponentProps {
|
|
6
|
-
/**
|
|
7
|
-
* The list of items to be rendered in the grid.
|
|
8
|
-
*/
|
|
9
|
-
items: ItemType[];
|
|
10
|
-
/**
|
|
11
|
-
* Function that renders each item in the grid.
|
|
12
|
-
*/
|
|
13
|
-
itemRenderer: (item: ItemType, index: number, style: CSSProperties) => ReactElement;
|
|
14
|
-
/**
|
|
15
|
-
* Function that returns the row height.
|
|
16
|
-
*/
|
|
17
|
-
getRowHeight: () => number;
|
|
18
|
-
/**
|
|
19
|
-
* Function that returns the column width.
|
|
20
|
-
*/
|
|
21
|
-
getColumnWidth: () => number;
|
|
22
|
-
/**
|
|
23
|
-
* Function that returns the unique ID of an item.
|
|
24
|
-
*/
|
|
25
|
-
getItemId?: (item: ItemType, index: number) => string;
|
|
26
|
-
/**
|
|
27
|
-
* The index of the item to scroll to.
|
|
28
|
-
*/
|
|
29
|
-
scrollToId?: number;
|
|
30
|
-
/**
|
|
31
|
-
* Callback fired when the grid is scrolled.
|
|
32
|
-
*/
|
|
33
|
-
onScroll?: (horizontalScrollDirection: ScrollDirection, scrollTop: number, scrollUpdateWasRequested: boolean) => void;
|
|
34
|
-
/**
|
|
35
|
-
* Callback fired when scrolling has finished.
|
|
36
|
-
*/
|
|
37
|
-
onScrollToFinished?: () => void;
|
|
38
|
-
/**
|
|
39
|
-
* Callback fired when items are rendered in the grid.
|
|
40
|
-
*/
|
|
41
|
-
onItemsRendered?: ({ firstItemId, secondItemId, lastItemId, centerItemId, firstItemOffsetEnd, currentOffsetTop }: {
|
|
42
|
-
firstItemId: string;
|
|
43
|
-
secondItemId: string;
|
|
44
|
-
lastItemId: string;
|
|
45
|
-
centerItemId: string;
|
|
46
|
-
firstItemOffsetEnd: number;
|
|
47
|
-
currentOffsetTop: number;
|
|
48
|
-
}) => void;
|
|
49
|
-
/**
|
|
50
|
-
* The delay (in ms) for throttling the `onItemsRendered` callback.
|
|
51
|
-
*/
|
|
52
|
-
onItemsRenderedThrottleMs?: number;
|
|
53
|
-
/**
|
|
54
|
-
* Callback fired when the grid size is updated.
|
|
55
|
-
*/
|
|
56
|
-
onSizeUpdate?: (width: number, height: number) => void;
|
|
57
|
-
/**
|
|
58
|
-
* Callback fired when the vertical scrollbar visibility changes.
|
|
59
|
-
*/
|
|
60
|
-
onVerticalScrollbarVisiblityChange?: (value: boolean) => void;
|
|
61
|
-
/**
|
|
62
|
-
* Class name applied to the scrollable container.
|
|
63
|
-
*/
|
|
64
|
-
scrollableClassName?: string;
|
|
65
|
-
}
|
|
66
|
-
declare const VirtualizedGrid: React.ForwardRefExoticComponent<VirtualizedGridProps & React.RefAttributes<HTMLElement>>;
|
|
67
|
-
export default VirtualizedGrid;
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import React, { type CSSProperties, type ForwardedRef, type ReactElement } from "react";
|
|
2
|
-
import { type VibeComponentProps } from "../../types";
|
|
3
|
-
import { type VirtualizedListItem, type VirtualizedListLayout, type VirtualizedListScrollDirection } from "./VirtualizedList.types";
|
|
4
|
-
export interface VirtualizedListProps extends VibeComponentProps {
|
|
5
|
-
/**
|
|
6
|
-
* Class name applied to the scrollable container.
|
|
7
|
-
*/
|
|
8
|
-
scrollableClassName?: string;
|
|
9
|
-
/**
|
|
10
|
-
* The orientation of the list.
|
|
11
|
-
*/
|
|
12
|
-
layout?: VirtualizedListLayout;
|
|
13
|
-
/**
|
|
14
|
-
* The list of items to be rendered.
|
|
15
|
-
*/
|
|
16
|
-
items: VirtualizedListItem[];
|
|
17
|
-
/**
|
|
18
|
-
* Function to render each item in the list.
|
|
19
|
-
*/
|
|
20
|
-
itemRenderer: (item: VirtualizedListItem, index: number, style: CSSProperties) => ReactElement | JSX.Element;
|
|
21
|
-
/**
|
|
22
|
-
* Function to get the size (height/width) of each item, based on layout.
|
|
23
|
-
*/
|
|
24
|
-
getItemSize?: (item: VirtualizedListItem, index: number) => number;
|
|
25
|
-
/**
|
|
26
|
-
* Function to get the unique ID of an item.
|
|
27
|
-
*/
|
|
28
|
-
getItemId?: (item: VirtualizedListItem, index: number) => string;
|
|
29
|
-
/**
|
|
30
|
-
* Callback fired when the scroll animation is finished.
|
|
31
|
-
*/
|
|
32
|
-
onScrollToFinished?: () => void;
|
|
33
|
-
/**
|
|
34
|
-
* Number of items to render above and below the visible portion.
|
|
35
|
-
*/
|
|
36
|
-
overscanCount?: number;
|
|
37
|
-
/**
|
|
38
|
-
* The duration of the scroll animation in milliseconds.
|
|
39
|
-
*/
|
|
40
|
-
scrollDuration?: number;
|
|
41
|
-
/**
|
|
42
|
-
* Callback fired when items are rendered.
|
|
43
|
-
*/
|
|
44
|
-
onItemsRendered?: ({ firstItemId, secondItemId, lastItemId, centerItemId, firstItemOffsetEnd, currentOffsetTop }: {
|
|
45
|
-
firstItemId: string;
|
|
46
|
-
secondItemId: string;
|
|
47
|
-
lastItemId: string;
|
|
48
|
-
centerItemId: string;
|
|
49
|
-
firstItemOffsetEnd: number;
|
|
50
|
-
currentOffsetTop: number;
|
|
51
|
-
}) => void;
|
|
52
|
-
/**
|
|
53
|
-
* The delay (in ms) for throttling the `onItemsRendered` callback.
|
|
54
|
-
*/
|
|
55
|
-
onItemsRenderedThrottleMs?: number;
|
|
56
|
-
/**
|
|
57
|
-
* Callback fired when the list size changes.
|
|
58
|
-
*/
|
|
59
|
-
onSizeUpdate?: (width: number, height: number) => void;
|
|
60
|
-
/**
|
|
61
|
-
* Callback fired when the vertical or horizontal scrollbar visibility changes.
|
|
62
|
-
*/
|
|
63
|
-
onLayoutDirectionScrollbarVisibilityChange?: (value: boolean) => void;
|
|
64
|
-
/**
|
|
65
|
-
* The ARIA role attribute applied to the list.
|
|
66
|
-
*/
|
|
67
|
-
role?: string;
|
|
68
|
-
/**
|
|
69
|
-
* The ARIA label for the list.
|
|
70
|
-
*/
|
|
71
|
-
"aria-label"?: string;
|
|
72
|
-
/**
|
|
73
|
-
* Custom inline styles applied to the list.
|
|
74
|
-
*/
|
|
75
|
-
style?: CSSProperties;
|
|
76
|
-
/**
|
|
77
|
-
* The ID of the item to scroll to.
|
|
78
|
-
*/
|
|
79
|
-
scrollToId?: string;
|
|
80
|
-
/**
|
|
81
|
-
* Reference to the virtualized list component.
|
|
82
|
-
*/
|
|
83
|
-
virtualListRef?: ForwardedRef<HTMLElement>;
|
|
84
|
-
/**
|
|
85
|
-
* Callback fired when the list is scrolled.
|
|
86
|
-
*/
|
|
87
|
-
onScroll?: (horizontalScrollDirection: VirtualizedListScrollDirection, scrollTop: number, scrollUpdateWasRequested: boolean) => void;
|
|
88
|
-
}
|
|
89
|
-
declare const VirtualizedList: React.ForwardRefExoticComponent<VirtualizedListProps & React.RefAttributes<HTMLElement>>;
|
|
90
|
-
export default VirtualizedList;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export type VirtualizedListItem = {
|
|
2
|
-
value?: string | Record<string, unknown>;
|
|
3
|
-
height?: number;
|
|
4
|
-
width?: number;
|
|
5
|
-
id?: string;
|
|
6
|
-
offsetTop?: number;
|
|
7
|
-
};
|
|
8
|
-
export { type Layout as VirtualizedListLayout, type ScrollDirection as VirtualizedListScrollDirection } from "react-window";
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import React, { type CSSProperties, type ReactElement } from "react";
|
|
2
|
-
import { type ScrollDirection } from "react-window";
|
|
3
|
-
import { type VibeComponentProps } from "../../types";
|
|
4
|
-
import { type VirtualizedGridItemType as ItemType } from "./VirtualizedGrid.types";
|
|
5
|
-
export interface VirtualizedGridProps extends VibeComponentProps {
|
|
6
|
-
/**
|
|
7
|
-
* The list of items to be rendered in the grid.
|
|
8
|
-
*/
|
|
9
|
-
items: ItemType[];
|
|
10
|
-
/**
|
|
11
|
-
* Function that renders each item in the grid.
|
|
12
|
-
*/
|
|
13
|
-
itemRenderer: (item: ItemType, index: number, style: CSSProperties) => ReactElement;
|
|
14
|
-
/**
|
|
15
|
-
* Function that returns the row height.
|
|
16
|
-
*/
|
|
17
|
-
getRowHeight: () => number;
|
|
18
|
-
/**
|
|
19
|
-
* Function that returns the column width.
|
|
20
|
-
*/
|
|
21
|
-
getColumnWidth: () => number;
|
|
22
|
-
/**
|
|
23
|
-
* Function that returns the unique ID of an item.
|
|
24
|
-
*/
|
|
25
|
-
getItemId?: (item: ItemType, index: number) => string;
|
|
26
|
-
/**
|
|
27
|
-
* The index of the item to scroll to.
|
|
28
|
-
*/
|
|
29
|
-
scrollToId?: number;
|
|
30
|
-
/**
|
|
31
|
-
* Callback fired when the grid is scrolled.
|
|
32
|
-
*/
|
|
33
|
-
onScroll?: (horizontalScrollDirection: ScrollDirection, scrollTop: number, scrollUpdateWasRequested: boolean) => void;
|
|
34
|
-
/**
|
|
35
|
-
* Callback fired when scrolling has finished.
|
|
36
|
-
*/
|
|
37
|
-
onScrollToFinished?: () => void;
|
|
38
|
-
/**
|
|
39
|
-
* Callback fired when items are rendered in the grid.
|
|
40
|
-
*/
|
|
41
|
-
onItemsRendered?: ({ firstItemId, secondItemId, lastItemId, centerItemId, firstItemOffsetEnd, currentOffsetTop }: {
|
|
42
|
-
firstItemId: string;
|
|
43
|
-
secondItemId: string;
|
|
44
|
-
lastItemId: string;
|
|
45
|
-
centerItemId: string;
|
|
46
|
-
firstItemOffsetEnd: number;
|
|
47
|
-
currentOffsetTop: number;
|
|
48
|
-
}) => void;
|
|
49
|
-
/**
|
|
50
|
-
* The delay (in ms) for throttling the `onItemsRendered` callback.
|
|
51
|
-
*/
|
|
52
|
-
onItemsRenderedThrottleMs?: number;
|
|
53
|
-
/**
|
|
54
|
-
* Callback fired when the grid size is updated.
|
|
55
|
-
*/
|
|
56
|
-
onSizeUpdate?: (width: number, height: number) => void;
|
|
57
|
-
/**
|
|
58
|
-
* Callback fired when the vertical scrollbar visibility changes.
|
|
59
|
-
*/
|
|
60
|
-
onVerticalScrollbarVisiblityChange?: (value: boolean) => void;
|
|
61
|
-
/**
|
|
62
|
-
* Class name applied to the scrollable container.
|
|
63
|
-
*/
|
|
64
|
-
scrollableClassName?: string;
|
|
65
|
-
}
|
|
66
|
-
declare const VirtualizedGrid: React.ForwardRefExoticComponent<VirtualizedGridProps & React.RefAttributes<HTMLElement>>;
|
|
67
|
-
export default VirtualizedGrid;
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import React, { type CSSProperties, type ForwardedRef, type ReactElement } from "react";
|
|
2
|
-
import { type VibeComponentProps } from "../../types";
|
|
3
|
-
import { type VirtualizedListItem, type VirtualizedListLayout, type VirtualizedListScrollDirection } from "./VirtualizedList.types";
|
|
4
|
-
export interface VirtualizedListProps extends VibeComponentProps {
|
|
5
|
-
/**
|
|
6
|
-
* Class name applied to the scrollable container.
|
|
7
|
-
*/
|
|
8
|
-
scrollableClassName?: string;
|
|
9
|
-
/**
|
|
10
|
-
* The orientation of the list.
|
|
11
|
-
*/
|
|
12
|
-
layout?: VirtualizedListLayout;
|
|
13
|
-
/**
|
|
14
|
-
* The list of items to be rendered.
|
|
15
|
-
*/
|
|
16
|
-
items: VirtualizedListItem[];
|
|
17
|
-
/**
|
|
18
|
-
* Function to render each item in the list.
|
|
19
|
-
*/
|
|
20
|
-
itemRenderer: (item: VirtualizedListItem, index: number, style: CSSProperties) => ReactElement | JSX.Element;
|
|
21
|
-
/**
|
|
22
|
-
* Function to get the size (height/width) of each item, based on layout.
|
|
23
|
-
*/
|
|
24
|
-
getItemSize?: (item: VirtualizedListItem, index: number) => number;
|
|
25
|
-
/**
|
|
26
|
-
* Function to get the unique ID of an item.
|
|
27
|
-
*/
|
|
28
|
-
getItemId?: (item: VirtualizedListItem, index: number) => string;
|
|
29
|
-
/**
|
|
30
|
-
* Callback fired when the scroll animation is finished.
|
|
31
|
-
*/
|
|
32
|
-
onScrollToFinished?: () => void;
|
|
33
|
-
/**
|
|
34
|
-
* Number of items to render above and below the visible portion.
|
|
35
|
-
*/
|
|
36
|
-
overscanCount?: number;
|
|
37
|
-
/**
|
|
38
|
-
* The duration of the scroll animation in milliseconds.
|
|
39
|
-
*/
|
|
40
|
-
scrollDuration?: number;
|
|
41
|
-
/**
|
|
42
|
-
* Callback fired when items are rendered.
|
|
43
|
-
*/
|
|
44
|
-
onItemsRendered?: ({ firstItemId, secondItemId, lastItemId, centerItemId, firstItemOffsetEnd, currentOffsetTop }: {
|
|
45
|
-
firstItemId: string;
|
|
46
|
-
secondItemId: string;
|
|
47
|
-
lastItemId: string;
|
|
48
|
-
centerItemId: string;
|
|
49
|
-
firstItemOffsetEnd: number;
|
|
50
|
-
currentOffsetTop: number;
|
|
51
|
-
}) => void;
|
|
52
|
-
/**
|
|
53
|
-
* The delay (in ms) for throttling the `onItemsRendered` callback.
|
|
54
|
-
*/
|
|
55
|
-
onItemsRenderedThrottleMs?: number;
|
|
56
|
-
/**
|
|
57
|
-
* Callback fired when the list size changes.
|
|
58
|
-
*/
|
|
59
|
-
onSizeUpdate?: (width: number, height: number) => void;
|
|
60
|
-
/**
|
|
61
|
-
* Callback fired when the vertical or horizontal scrollbar visibility changes.
|
|
62
|
-
*/
|
|
63
|
-
onLayoutDirectionScrollbarVisibilityChange?: (value: boolean) => void;
|
|
64
|
-
/**
|
|
65
|
-
* The ARIA role attribute applied to the list.
|
|
66
|
-
*/
|
|
67
|
-
role?: string;
|
|
68
|
-
/**
|
|
69
|
-
* The ARIA label for the list.
|
|
70
|
-
*/
|
|
71
|
-
"aria-label"?: string;
|
|
72
|
-
/**
|
|
73
|
-
* Custom inline styles applied to the list.
|
|
74
|
-
*/
|
|
75
|
-
style?: CSSProperties;
|
|
76
|
-
/**
|
|
77
|
-
* The ID of the item to scroll to.
|
|
78
|
-
*/
|
|
79
|
-
scrollToId?: string;
|
|
80
|
-
/**
|
|
81
|
-
* Reference to the virtualized list component.
|
|
82
|
-
*/
|
|
83
|
-
virtualListRef?: ForwardedRef<HTMLElement>;
|
|
84
|
-
/**
|
|
85
|
-
* Callback fired when the list is scrolled.
|
|
86
|
-
*/
|
|
87
|
-
onScroll?: (horizontalScrollDirection: VirtualizedListScrollDirection, scrollTop: number, scrollUpdateWasRequested: boolean) => void;
|
|
88
|
-
}
|
|
89
|
-
declare const VirtualizedList: React.ForwardRefExoticComponent<VirtualizedListProps & React.RefAttributes<HTMLElement>>;
|
|
90
|
-
export default VirtualizedList;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export type VirtualizedListItem = {
|
|
2
|
-
value?: string | Record<string, unknown>;
|
|
3
|
-
height?: number;
|
|
4
|
-
width?: number;
|
|
5
|
-
id?: string;
|
|
6
|
-
offsetTop?: number;
|
|
7
|
-
};
|
|
8
|
-
export { type Layout as VirtualizedListLayout, type ScrollDirection as VirtualizedListScrollDirection } from "react-window";
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
type NormalizedItem<T> = {
|
|
2
|
-
item: T;
|
|
3
|
-
index: number;
|
|
4
|
-
height: number;
|
|
5
|
-
size: number;
|
|
6
|
-
offsetTop: number;
|
|
7
|
-
offset: number;
|
|
8
|
-
};
|
|
9
|
-
type NormalizedItems<T> = Record<string, NormalizedItem<T>>;
|
|
10
|
-
type IdGetter<T> = (item: T, index: number) => string;
|
|
11
|
-
type SizeGetter<T> = (item: T, index: number) => number;
|
|
12
|
-
export declare const getNormalizedItems: <T>(items: T[], idGetter: IdGetter<T>, sizeGetter: SizeGetter<T>) => NormalizedItems<T>;
|
|
13
|
-
export declare const isItemInView: (item: {
|
|
14
|
-
offsetTop: number;
|
|
15
|
-
}, scrollTop: number, offsetHeight: number) => boolean;
|
|
16
|
-
export declare const getMaxOffset: <T>(offsetSize: number, normalizedItems: NormalizedItems<T>) => number;
|
|
17
|
-
export declare const easeInOutQuint: (time: number) => number;
|
|
18
|
-
export declare const isLayoutDirectionScrollbarVisible: <T>(items: T[], normalizedItems: NormalizedItems<T>, idGetter: IdGetter<T>, componentSize: number) => boolean;
|
|
19
|
-
export declare const getOnItemsRenderedData: <T>(items: T[], normalizedItems: NormalizedItems<T>, idGetter: IdGetter<T>, visibleStartIndex: number, visibleStopIndex: number, listSize: number, currentOffsetTop: number) => {
|
|
20
|
-
firstItemId: string;
|
|
21
|
-
secondItemId: string;
|
|
22
|
-
lastItemId: string;
|
|
23
|
-
centerItemId: string;
|
|
24
|
-
firstItemOffsetEnd: number;
|
|
25
|
-
currentOffsetTop: number;
|
|
26
|
-
};
|
|
27
|
-
export {};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{slicedToArray as r}from"../../../_virtual/_rollupPluginBabelHelpers.js";import e,{forwardRef as t,useState as o,useRef as n,useCallback as i,useMemo as l,useEffect as u}from"react";import c from"classnames";import{VariableSizeGrid as a}from"react-window";import s from"react-virtualized-auto-sizer";import{getNormalizedItems as d,getOnItemsRenderedData as m,isLayoutDirectionScrollbarVisible as f}from"../../services/virtualized-service.js";import{usePrevious as v}from"@vibe/hooks";import h from"../../hooks/useThrottledCallback.js";import{useMergeRef as I,NOOP as p}from"@vibe/shared";import{getTestId as g,ComponentDefaultTestId as w}from"../../tests/testIds.js";import b from"./VirtualizedGrid.module.scss.js";var R=t((function(t,R){var T=t.className,x=t.id,S=t.items,C=void 0===S?[]:S,z=t.itemRenderer,N=t.getRowHeight,j=void 0===N?function(){return 50}:N,M=t.getColumnWidth,E=void 0===M?function(){return 100}:M,V=t.getItemId,W=void 0===V?function(r,e){return r.id}:V,k=t.onScroll,y=t.scrollToId,A=void 0===y?null:y,D=t.onScrollToFinished,G=void 0===D?p:D,H=t.onItemsRendered,O=void 0===H?null:H,U=t.onItemsRenderedThrottleMs,_=void 0===U?200:U,F=t.onSizeUpdate,q=void 0===F?p:F,B=t.onVerticalScrollbarVisiblityChange,L=void 0===B?null:B,P=t.scrollableClassName,Z=t["data-testid"],J=o(0),K=r(J,2),Q=K[0],X=K[1],Y=o(0),$=r(Y,2),rr=$[0],er=$[1],tr=v(A),or=n(null),nr=n(null),ir=n(null),lr=n(0),ur=n({scrollOffsetInitial:0,scrollOffsetFinal:0,animationStartTime:0}),cr=I(R,or),ar=ur.current,sr=i((function(r){var e=j();return e&&!Number.isNaN(e)||console.error("Couldn't get height for item: ",r),e}),[j]),dr=i((function(r,e){var t=W(r,e);return void 0===t&&console.error("Couldn't get id for item: ",r),t}),[W]),mr=l((function(){return d(C,dr,sr)}),[C,dr,sr]),fr=l((function(){return Math.min(C.length,Math.floor(rr/E()))}),[C,rr,E]),vr=l((function(){return fr>0?Math.ceil(C.length/fr):0}),[C,fr]),hr=l((function(){return A%fr}),[A,fr]),Ir=l((function(){return Math.floor(A/fr)}),[A,fr]),pr=i((function(r){var e=r.horizontalScrollDirection,t=r.scrollTop,o=r.scrollUpdateWasRequested;lr.current=t,o||(ar.scrollOffsetInitial=t),k&&k(e,t,o)}),[k,lr,ar]),gr=i((function(r){var e=r.rowIndex*fr+r.columnIndex;return z(C[e],e,r.style)}),[C,z,fr]),wr=i((function(r,e){e===Q&&r===rr||setTimeout((function(){X(e),er(r),q(r,e)}),0)}),[Q,rr,q]),br=h((function(r){if(O){var e=m(C,mr,dr,r.visibleRowStartIndex,r.visibleRowStopIndex,Q,lr.current);O(e)}}),{wait:_,trailing:!0},[O,C,mr,dr,Q]);return u((function(){A&&tr!==A&&(ir.current.scrollToItem({align:"center",columnIndex:hr,rowIndex:Ir}),G())}),[A,tr,ir,hr,Ir,G]),u((function(){ir.current&&ir.current.resetAfterIndices({columnIndex:0,rowIndex:0})}),[mr]),u((function(){if(L){var r=f(C,mr,dr,Q);nr.current!==r&&(nr.current=r,L(r))}}),[L,C,mr,Q,dr]),e.createElement("div",{ref:cr,className:c(b.virtualizedGridWrapper,T),id:x,"data-testid":Z||g(w.VIRTUALIZED_GRID,x)},e.createElement(s,null,(function(r){var t=r.height,o=r.width;return wr(o,t),e.createElement(a,{ref:ir,height:t,width:o,columnWidth:E,columnCount:fr,rowHeight:j,rowCount:vr,onScroll:pr,onItemsRendered:br,className:P},gr)})))}));export{R as default};
|
|
2
|
-
//# sourceMappingURL=VirtualizedGrid.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualizedGrid.js","sources":["../../../../../src/components/VirtualizedGrid/VirtualizedGrid.tsx"],"sourcesContent":["import React, {\n type CSSProperties,\n type ReactElement,\n forwardRef,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState\n} from \"react\";\nimport cx from \"classnames\";\nimport {\n type GridChildComponentProps,\n type GridOnScrollProps,\n type ScrollDirection,\n VariableSizeGrid as Grid,\n type GridOnItemsRenderedProps\n} from \"react-window\";\nimport AutoSizer from \"react-virtualized-auto-sizer\";\nimport {\n getNormalizedItems,\n getOnItemsRenderedData,\n isLayoutDirectionScrollbarVisible\n} from \"../../services/virtualized-service\";\nimport { usePrevious } from \"@vibe/hooks\";\nimport useThrottledCallback from \"../../hooks/useThrottledCallback\";\nimport { useMergeRef, NOOP } from \"@vibe/shared\";\nimport { type VibeComponentProps } from \"../../types\";\n\nimport { ComponentDefaultTestId, getTestId } from \"../../tests/test-ids-utils\";\nimport styles from \"./VirtualizedGrid.module.scss\";\nimport { type VirtualizedGridItemType as ItemType } from \"./VirtualizedGrid.types\";\n\nexport interface VirtualizedGridProps extends VibeComponentProps {\n /**\n * The list of items to be rendered in the grid.\n */\n items: ItemType[];\n /**\n * Function that renders each item in the grid.\n */\n itemRenderer: (item: ItemType, index: number, style: CSSProperties) => ReactElement;\n /**\n * Function that returns the row height.\n */\n getRowHeight: () => number;\n /**\n * Function that returns the column width.\n */\n getColumnWidth: () => number;\n /**\n * Function that returns the unique ID of an item.\n */\n getItemId?: (item: ItemType, index: number) => string;\n /**\n * The index of the item to scroll to.\n */\n scrollToId?: number;\n /**\n * Callback fired when the grid is scrolled.\n */\n onScroll?: (horizontalScrollDirection: ScrollDirection, scrollTop: number, scrollUpdateWasRequested: boolean) => void;\n /**\n * Callback fired when scrolling has finished.\n */\n onScrollToFinished?: () => void;\n /**\n * Callback fired when items are rendered in the grid.\n */\n onItemsRendered?: ({\n firstItemId,\n secondItemId,\n lastItemId,\n centerItemId,\n firstItemOffsetEnd,\n currentOffsetTop\n }: {\n firstItemId: string;\n secondItemId: string;\n lastItemId: string;\n centerItemId: string;\n firstItemOffsetEnd: number;\n currentOffsetTop: number;\n }) => void;\n /**\n * The delay (in ms) for throttling the `onItemsRendered` callback.\n */\n onItemsRenderedThrottleMs?: number;\n /**\n * Callback fired when the grid size is updated.\n */\n onSizeUpdate?: (width: number, height: number) => void;\n /**\n * Callback fired when the vertical scrollbar visibility changes.\n */\n onVerticalScrollbarVisiblityChange?: (value: boolean) => void;\n /**\n * Class name applied to the scrollable container.\n */\n scrollableClassName?: string;\n}\n\nconst VirtualizedGrid = forwardRef(\n (\n {\n className,\n id,\n items = [],\n itemRenderer,\n getRowHeight = () => 50,\n getColumnWidth = () => 100,\n getItemId = (item: ItemType, _index: number) => item.id,\n onScroll,\n scrollToId = null,\n onScrollToFinished = NOOP,\n onItemsRendered = null,\n onItemsRenderedThrottleMs = 200,\n onSizeUpdate = NOOP,\n onVerticalScrollbarVisiblityChange = null,\n scrollableClassName,\n \"data-testid\": dataTestId\n }: VirtualizedGridProps,\n ref: React.ForwardedRef<HTMLElement>\n ) => {\n // states\n const [gridHeight, setGridHeight] = useState(0);\n const [gridWidth, setGridWidth] = useState(0);\n\n // prevs\n const prevScrollToId = usePrevious(scrollToId);\n\n // Refs\n const componentRef = useRef(null);\n const isVerticalScrollbarVisibleRef = useRef(null);\n const gridRef = useRef(null);\n const scrollTopRef = useRef(0);\n const animationDataRef = useRef({\n scrollOffsetInitial: 0,\n scrollOffsetFinal: 0,\n animationStartTime: 0\n });\n const mergedRef = useMergeRef(ref, componentRef);\n\n const animationData = animationDataRef.current;\n\n // Callbacks\n const heightGetter = useCallback(\n (item: ItemType) => {\n const height = getRowHeight();\n if (!height || Number.isNaN(height)) {\n console.error(\"Couldn't get height for item: \", item);\n }\n return height;\n },\n [getRowHeight]\n );\n\n const idGetter = useCallback(\n (item: ItemType, index: number) => {\n const itemId = getItemId(item, index);\n if (itemId === undefined) {\n console.error(\"Couldn't get id for item: \", item);\n }\n return itemId;\n },\n [getItemId]\n );\n\n // Memos\n // Creates object of itemId => { item, index, height, offsetTop}\n const normalizedItems = useMemo(() => {\n return getNormalizedItems(items, idGetter, heightGetter);\n }, [items, idGetter, heightGetter]);\n\n const calcColumnCount = useMemo(() => {\n return Math.min(items.length, Math.floor(gridWidth / getColumnWidth()));\n }, [items, gridWidth, getColumnWidth]);\n\n const calcRowCount = useMemo(() => {\n return calcColumnCount > 0 ? Math.ceil(items.length / calcColumnCount) : 0;\n }, [items, calcColumnCount]);\n\n const scrollToColumnIndex = useMemo(() => {\n return scrollToId % calcColumnCount;\n }, [scrollToId, calcColumnCount]);\n\n const scrollToRowIndex = useMemo(() => {\n return Math.floor(scrollToId / calcColumnCount);\n }, [scrollToId, calcColumnCount]);\n\n // Callbacks\n const onScrollCB = useCallback(\n ({ horizontalScrollDirection, scrollTop, scrollUpdateWasRequested }: GridOnScrollProps) => {\n scrollTopRef.current = scrollTop;\n if (!scrollUpdateWasRequested) {\n animationData.scrollOffsetInitial = scrollTop;\n }\n onScroll && onScroll(horizontalScrollDirection, scrollTop, scrollUpdateWasRequested);\n },\n [onScroll, scrollTopRef, animationData]\n );\n\n const cellRenderer = useCallback(\n ({ columnIndex, rowIndex, style }: { columnIndex: number; rowIndex: number; style: CSSProperties }) => {\n const index = rowIndex * calcColumnCount + columnIndex;\n const item = items[index];\n return itemRenderer(item, index, style);\n },\n [items, itemRenderer, calcColumnCount]\n );\n\n const updateGridSize = useCallback(\n (width: number, height: number) => {\n if (height !== gridHeight || width !== gridWidth) {\n setTimeout(() => {\n setGridHeight(height);\n setGridWidth(width);\n onSizeUpdate(width, height);\n }, 0);\n }\n },\n [gridHeight, gridWidth, onSizeUpdate]\n );\n\n const onItemsRenderedCB = useThrottledCallback(\n ({ visibleRowStartIndex, visibleRowStopIndex }: GridOnItemsRenderedProps) => {\n if (!onItemsRendered) return;\n const data = getOnItemsRenderedData(\n items,\n normalizedItems,\n idGetter,\n visibleRowStartIndex,\n visibleRowStopIndex,\n gridHeight,\n scrollTopRef.current\n );\n onItemsRendered(data);\n },\n { wait: onItemsRenderedThrottleMs, trailing: true },\n [onItemsRendered, items, normalizedItems, idGetter, gridHeight]\n );\n\n // Effects\n useEffect(() => {\n // scroll to specific item\n if (scrollToId && prevScrollToId !== scrollToId) {\n gridRef.current.scrollToItem({\n align: \"center\",\n columnIndex: scrollToColumnIndex,\n rowIndex: scrollToRowIndex\n });\n onScrollToFinished();\n }\n }, [scrollToId, prevScrollToId, gridRef, scrollToColumnIndex, scrollToRowIndex, onScrollToFinished]);\n\n useEffect(() => {\n // recalculate row heights\n if (gridRef.current) {\n gridRef.current.resetAfterIndices({ columnIndex: 0, rowIndex: 0 });\n }\n }, [normalizedItems]);\n\n useEffect(() => {\n // update vertical scrollbar visibility\n if (onVerticalScrollbarVisiblityChange) {\n const isVisible = isLayoutDirectionScrollbarVisible(items, normalizedItems, idGetter, gridHeight);\n if (isVerticalScrollbarVisibleRef.current !== isVisible) {\n isVerticalScrollbarVisibleRef.current = isVisible;\n onVerticalScrollbarVisiblityChange(isVisible);\n }\n }\n }, [onVerticalScrollbarVisiblityChange, items, normalizedItems, gridHeight, idGetter]);\n\n return (\n <div\n ref={mergedRef}\n className={cx(styles.virtualizedGridWrapper, className)}\n id={id}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.VIRTUALIZED_GRID, id)}\n >\n <AutoSizer>\n {({ height, width }: { height: number; width: number }) => {\n updateGridSize(width, height);\n return (\n <Grid\n ref={gridRef}\n height={height}\n width={width}\n columnWidth={getColumnWidth}\n columnCount={calcColumnCount}\n rowHeight={getRowHeight}\n rowCount={calcRowCount}\n onScroll={onScrollCB}\n onItemsRendered={onItemsRenderedCB}\n className={scrollableClassName}\n >\n {cellRenderer as unknown as React.ComponentType<GridChildComponentProps>}\n </Grid>\n );\n }}\n </AutoSizer>\n </div>\n );\n }\n);\n\nexport default VirtualizedGrid;\n"],"names":["VirtualizedGrid","forwardRef","_ref","ref","className","id","_ref$items","items","itemRenderer","_ref$getRowHeight","getRowHeight","_ref$getColumnWidth","getColumnWidth","_ref$getItemId","getItemId","item","_index","onScroll","_ref$scrollToId","scrollToId","_ref$onScrollToFinish","onScrollToFinished","NOOP","_ref$onItemsRendered","onItemsRendered","_ref$onItemsRenderedT","onItemsRenderedThrottleMs","_ref$onSizeUpdate","onSizeUpdate","_ref$onVerticalScroll","onVerticalScrollbarVisiblityChange","scrollableClassName","dataTestId","_useState","useState","_useState2","_slicedToArray","gridHeight","setGridHeight","_useState3","_useState4","gridWidth","setGridWidth","prevScrollToId","usePrevious","componentRef","useRef","isVerticalScrollbarVisibleRef","gridRef","scrollTopRef","animationDataRef","scrollOffsetInitial","scrollOffsetFinal","animationStartTime","mergedRef","useMergeRef","animationData","current","heightGetter","useCallback","height","Number","isNaN","console","error","idGetter","index","itemId","undefined","normalizedItems","useMemo","getNormalizedItems","calcColumnCount","Math","min","length","floor","calcRowCount","ceil","scrollToColumnIndex","scrollToRowIndex","onScrollCB","_ref2","horizontalScrollDirection","scrollTop","scrollUpdateWasRequested","cellRenderer","_ref3","rowIndex","columnIndex","style","updateGridSize","width","setTimeout","onItemsRenderedCB","useThrottledCallback","_ref4","data","getOnItemsRenderedData","visibleRowStartIndex","visibleRowStopIndex","wait","trailing","useEffect","scrollToItem","align","resetAfterIndices","isVisible","isLayoutDirectionScrollbarVisible","React","createElement","cx","styles","virtualizedGridWrapper","getTestId","ComponentDefaultTestId","VIRTUALIZED_GRID","AutoSizer","_ref5","Grid","columnWidth","columnCount","rowHeight","rowCount"],"mappings":"itBAsGMA,IAAAA,EAAkBC,GACtB,SAAAC,EAmBEC,GACE,IAlBAC,EAASF,EAATE,UACAC,EAAEH,EAAFG,GAAEC,EAAAJ,EACFK,MAAAA,OAAQ,IAAHD,EAAG,GAAEA,EACVE,EAAYN,EAAZM,aAAYC,EAAAP,EACZQ,aAAAA,OAAe,IAAHD,EAAG,WAAA,OAAM,EAAE,EAAAA,EAAAE,EAAAT,EACvBU,eAAAA,OAAiB,IAAHD,EAAG,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js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e={virtualizedGridWrapper:"virtualizedGridWrapper"};!function(e){const t="s_id-03a8eed790d8_4_5_15";if("undefined"!=typeof document){const d=document.head||document.getElementsByTagName("head")[0];if(d.querySelector("#"+t))return;const i=document.createElement("style");i.id=t,d.firstChild?d.insertBefore(i,d.firstChild):d.appendChild(i),i.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[t]=e)}("/* stylelint-disable */\n/* stylelint-enable */\n.virtualizedGridWrapper {\n height: 100%;\n width: 100%;\n}");export{e as default};
|
|
2
|
-
//# sourceMappingURL=VirtualizedGrid.module.scss.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{slicedToArray as t}from"../../../_virtual/_rollupPluginBabelHelpers.js";import i from"classnames";import e,{forwardRef as r,useState as o,useMemo as n,useRef as l,useCallback as a,useEffect as s}from"react";import{noop as c}from"es-toolkit";import{VariableSizeList as u}from"react-window";import f from"react-virtualized-auto-sizer";import{usePrevious as d}from"@vibe/hooks";import m from"../../hooks/useThrottledCallback.js";import{useMergeRef as v}from"@vibe/shared";import{getNormalizedItems as p,getMaxOffset as h,getOnItemsRenderedData as I,isLayoutDirectionScrollbarVisible as S,easeInOutQuint as T}from"../../services/virtualized-service.js";import{getTestId as O}from"../../tests/testIds.js";import{ComponentDefaultTestId as g}from"../../tests/constants.js";import z from"./VirtualizedList.module.scss.js";var b=r((function(r,b){var y=r.className,C=r.id,w=r.items,F=void 0===w?[]:w,R=r.itemRenderer,j=void 0===R?function(t,i,e){return t}:R,L=r.getItemSize,x=void 0===L?function(t,i){return t.height}:L,k=r.layout,A=void 0===k?"vertical":k,D=r.onScroll,E=r.overscanCount,N=void 0===E?0:E,M=r.getItemId,U=void 0===M?function(t,i){return t.id}:M,V=r.scrollToId,_=r.scrollDuration,q=void 0===_?200:_,W=r.onScrollToFinished,B=void 0===W?c:W,H=r.onItemsRendered,P=r.onItemsRenderedThrottleMs,Z=void 0===P?200:P,G=r.onSizeUpdate,J=void 0===G?c:G,K=r.onLayoutDirectionScrollbarVisibilityChange,Q=void 0===K?null:K,X=r.virtualListRef,Y=r.scrollableClassName,$=r.role,tt=r["aria-label"],it=r.style,et=r["data-testid"],rt=o(0),ot=t(rt,2),nt=ot[0],lt=ot[1],at=o(0),st=t(at,2),ct=st[0],ut=st[1],ft="horizontal"!==A,dt=n((function(){return ft?nt:ct}),[ft,nt,ct]),mt=d(V),vt=l(null),pt=l(null),ht=l(null),It=l(0),St=l({initialized:!1,scrollOffsetInitial:0,scrollOffsetFinal:0,animationStartTime:0}),Tt=v(b,vt),Ot=v(X,ht),gt=St.current;gt.initialized||(gt.initialized=!0,gt.scrollOffsetInitial=0,gt.scrollOffsetFinal=0,gt.animationStartTime=0);var zt=a((function(t,i){var e=x(t,i);return void 0===e&&console.error("Couldn't get height for item: ",t),e}),[x]),bt=a((function(t,i){var e=U(t,i);return void 0===e&&console.error("Couldn't get id for item: ",t),e}),[U]),yt=n((function(){return p(F,bt,zt)}),[F,bt,zt]),Ct=n((function(){return h(dt,yt)}),[dt,yt]),wt=a((function(t){var i=t.scrollDirection,e=t.scrollOffset,r=t.scrollUpdateWasRequested;It.current=e,r||(gt.scrollOffsetInitial=e),D&&D(i,e,r)}),[D,It,gt]),Ft=a((function(){requestAnimationFrame((function(){var t,i=performance.now()-gt.animationStartTime,e=gt.scrollOffsetFinal-gt.scrollOffsetInitial,r=T(Math.min(1,i/q)),o=Math.min(Ct,gt.scrollOffsetInitial+e*r);It.current=o,null===(t=ht.current)||void 0===t||t.scrollTo(o),q>i?Ft():(gt.animationStartTime=void 0,B&&B())}))}),[q,gt,ht,Ct,B]),Rt=a((function(t){var i,e,r,o,n=t.offsetTop;gt.animationStartTime?gt.scrollOffsetFinal=n:(null!==(null===(e=null===(i=ht.current)||void 0===i?void 0:i.state)||void 0===e?void 0:e.scrollOffset)&&(gt.scrollOffsetInitial=null===(o=null===(r=ht.current)||void 0===r?void 0:r.state)||void 0===o?void 0:o.scrollOffset),gt.scrollOffsetInitial!==n?(gt.scrollOffsetFinal=n,gt.animationStartTime=performance.now(),Ft()):B&&B())}),[gt,Ft,B]),jt=a((function(t){var i=t.index;return j(F[i],i,t.style)}),[F,j]),Lt=a((function(t){return zt(F[t],t)}),[F,zt]),xt=a((function(t,i){i===nt&&t===ct||setTimeout((function(){lt(i),ut(t),J(t,i)}),0)}),[nt,ct,J]),kt=m((function(t){if(H){var i=I(F,yt,bt,t.visibleStartIndex,t.visibleStopIndex,dt,It.current);H(i)}}),{wait:Z,trailing:!0},[H,F,yt,bt,dt]);return s((function(){if(V&&mt!==V){var t=S(F,yt,bt,dt),i=yt[V];t&&i&&Rt(i)}}),[mt,V,Rt,yt,F,bt,dt]),s((function(){ht.current&&ht.current.resetAfterIndex(0)}),[yt]),s((function(){if(Q){var t=S(F,yt,bt,dt);pt.current!==t&&(pt.current=t,Q(t))}}),[Q,F,yt,dt,bt]),e.createElement("div",{ref:Tt,className:i(z.virtualizedListWrapper,y),id:C,role:$,"aria-label":tt,"data-testid":et||O(g.VIRTUALIZED_LIST,C),style:it},e.createElement(f,null,(function(t){var i=t.height,r=t.width;return xt(r,i),e.createElement(u,{ref:Ot,height:i,width:r,itemCount:F.length,itemSize:Lt,onScroll:wt,layout:A,overscanCount:N,onItemsRendered:kt,className:Y},jt)})))}));export{b as default};
|
|
2
|
-
//# sourceMappingURL=VirtualizedList.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualizedList.js","sources":["../../../../../src/components/VirtualizedList/VirtualizedList.tsx"],"sourcesContent":["import cx from \"classnames\";\nimport React, {\n type CSSProperties,\n type ForwardedRef,\n forwardRef,\n type LegacyRef,\n type ReactElement,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState\n} from \"react\";\nimport { noop as NOOP } from \"es-toolkit\";\nimport {\n type ScrollDirection,\n VariableSizeList as List,\n type ListOnItemsRenderedProps,\n type ListChildComponentProps,\n type VariableSizeList\n} from \"react-window\";\nimport AutoSizer from \"react-virtualized-auto-sizer\";\nimport { usePrevious } from \"@vibe/hooks\";\nimport useThrottledCallback from \"../../hooks/useThrottledCallback\";\nimport { useMergeRef } from \"@vibe/shared\";\nimport {\n easeInOutQuint,\n getMaxOffset,\n getNormalizedItems,\n getOnItemsRenderedData,\n isLayoutDirectionScrollbarVisible\n} from \"../../services/virtualized-service\";\nimport { getTestId } from \"../../tests/test-ids-utils\";\nimport { ComponentDefaultTestId } from \"../../tests/constants\";\nimport { type VibeComponentProps } from \"../../types\";\nimport styles from \"./VirtualizedList.module.scss\";\nimport {\n type VirtualizedListItem,\n type VirtualizedListLayout,\n type VirtualizedListScrollDirection\n} from \"./VirtualizedList.types\";\n\nexport interface VirtualizedListProps extends VibeComponentProps {\n /**\n * Class name applied to the scrollable container.\n */\n scrollableClassName?: string;\n /**\n * The orientation of the list.\n */\n layout?: VirtualizedListLayout;\n /**\n * The list of items to be rendered.\n */\n items: VirtualizedListItem[];\n /**\n * Function to render each item in the list.\n */\n itemRenderer: (item: VirtualizedListItem, index: number, style: CSSProperties) => ReactElement | JSX.Element;\n /**\n * Function to get the size (height/width) of each item, based on layout.\n */\n getItemSize?: (item: VirtualizedListItem, index: number) => number;\n /**\n * Function to get the unique ID of an item.\n */\n getItemId?: (item: VirtualizedListItem, index: number) => string;\n /**\n * Callback fired when the scroll animation is finished.\n */\n onScrollToFinished?: () => void;\n /**\n * Number of items to render above and below the visible portion.\n */\n overscanCount?: number;\n /**\n * The duration of the scroll animation in milliseconds.\n */\n scrollDuration?: number;\n /**\n * Callback fired when items are rendered.\n */\n onItemsRendered?: ({\n firstItemId,\n secondItemId,\n lastItemId,\n centerItemId,\n firstItemOffsetEnd,\n currentOffsetTop\n }: {\n firstItemId: string;\n secondItemId: string;\n lastItemId: string;\n centerItemId: string;\n firstItemOffsetEnd: number;\n currentOffsetTop: number;\n }) => void;\n /**\n * The delay (in ms) for throttling the `onItemsRendered` callback.\n */\n onItemsRenderedThrottleMs?: number;\n /**\n * Callback fired when the list size changes.\n */\n onSizeUpdate?: (width: number, height: number) => void;\n /**\n * Callback fired when the vertical or horizontal scrollbar visibility changes.\n */\n onLayoutDirectionScrollbarVisibilityChange?: (value: boolean) => void;\n /**\n * The ARIA role attribute applied to the list.\n */\n role?: string;\n /**\n * The ARIA label for the list.\n */\n \"aria-label\"?: string;\n /**\n * Custom inline styles applied to the list.\n */\n style?: CSSProperties;\n /**\n * The ID of the item to scroll to.\n */\n scrollToId?: string;\n /**\n * Reference to the virtualized list component.\n */\n virtualListRef?: ForwardedRef<HTMLElement>;\n /**\n * Callback fired when the list is scrolled.\n */\n onScroll?: (\n horizontalScrollDirection: VirtualizedListScrollDirection,\n scrollTop: number,\n scrollUpdateWasRequested: boolean\n ) => void;\n}\n\nconst VirtualizedList = forwardRef(\n (\n {\n className,\n id,\n items = [],\n itemRenderer = (item: VirtualizedListItem, _index: number, _style: CSSProperties) => item as ReactElement,\n getItemSize = (item: VirtualizedListItem, _index: number) => item.height,\n layout = \"vertical\",\n onScroll,\n overscanCount = 0,\n getItemId = (item: VirtualizedListItem, _index: number) => item.id,\n scrollToId,\n scrollDuration = 200,\n onScrollToFinished = NOOP,\n onItemsRendered,\n onItemsRenderedThrottleMs = 200,\n onSizeUpdate = NOOP,\n onLayoutDirectionScrollbarVisibilityChange = null,\n virtualListRef,\n scrollableClassName,\n role,\n \"aria-label\": ariaLabel,\n style,\n \"data-testid\": dataTestId\n }: VirtualizedListProps,\n ref: React.ForwardedRef<HTMLElement>\n ) => {\n // states\n const [listHeight, setListHeight] = useState(0);\n const [listWidth, setListWidth] = useState(0);\n\n const isVerticalList = layout !== \"horizontal\";\n const listSizeByLayout = useMemo(() => {\n return isVerticalList ? listHeight : listWidth;\n }, [isVerticalList, listHeight, listWidth]);\n\n // prevs\n const prevScrollToId = usePrevious(scrollToId);\n\n // Refs\n const componentRef = useRef(null);\n const isVerticalScrollbarVisibleRef = useRef(null);\n const listRef = useRef(null);\n const scrollTopRef = useRef(0);\n const animationDataRef = useRef({\n initialized: false,\n scrollOffsetInitial: 0,\n scrollOffsetFinal: 0,\n animationStartTime: 0\n });\n const mergedRef = useMergeRef(ref, componentRef);\n const mergedListRef = useMergeRef(virtualListRef, listRef);\n\n const animationData = animationDataRef.current;\n if (!animationData.initialized) {\n animationData.initialized = true;\n animationData.scrollOffsetInitial = 0;\n animationData.scrollOffsetFinal = 0;\n animationData.animationStartTime = 0;\n }\n\n // Callbacks\n const sizeGetter = useCallback(\n (item: VirtualizedListItem, index: number) => {\n const height = getItemSize(item, index);\n if (height === undefined) {\n console.error(\"Couldn't get height for item: \", item);\n }\n return height;\n },\n [getItemSize]\n );\n\n const idGetter = useCallback(\n (item: VirtualizedListItem, index: number) => {\n const itemId = getItemId(item, index);\n if (itemId === undefined) {\n console.error(\"Couldn't get id for item: \", item);\n }\n return itemId;\n },\n [getItemId]\n );\n\n // Memos\n // Creates object of itemId => { item, index, size, offsetTop}\n const normalizedItems = useMemo(() => {\n return getNormalizedItems(items, idGetter, sizeGetter);\n }, [items, idGetter, sizeGetter]);\n\n const maxListOffset = useMemo(() => {\n return getMaxOffset(listSizeByLayout, normalizedItems);\n }, [listSizeByLayout, normalizedItems]);\n\n // Callbacks\n const onScrollCB = useCallback(\n ({\n scrollDirection,\n scrollOffset,\n scrollUpdateWasRequested\n }: {\n scrollDirection: ScrollDirection;\n scrollOffset: number;\n scrollUpdateWasRequested: boolean;\n }) => {\n scrollTopRef.current = scrollOffset;\n if (!scrollUpdateWasRequested) {\n animationData.scrollOffsetInitial = scrollOffset;\n }\n onScroll && onScroll(scrollDirection, scrollOffset, scrollUpdateWasRequested);\n },\n [onScroll, scrollTopRef, animationData]\n );\n\n const animateScroll = useCallback(() => {\n requestAnimationFrame(() => {\n const now = performance.now();\n const ellapsed = now - animationData.animationStartTime;\n const scrollDelta = animationData.scrollOffsetFinal - animationData.scrollOffsetInitial;\n const easedTime = easeInOutQuint(Math.min(1, ellapsed / scrollDuration));\n const scrollOffset = animationData.scrollOffsetInitial + scrollDelta * easedTime;\n const finalOffsetValue = Math.min(maxListOffset, scrollOffset);\n scrollTopRef.current = finalOffsetValue;\n listRef.current?.scrollTo(finalOffsetValue);\n\n if (ellapsed < scrollDuration) {\n animateScroll();\n } else {\n animationData.animationStartTime = undefined;\n onScrollToFinished && onScrollToFinished();\n }\n });\n }, [scrollDuration, animationData, listRef, maxListOffset, onScrollToFinished]);\n\n const startScrollAnimation = useCallback(\n (item: VirtualizedListItem) => {\n const { offsetTop } = item;\n\n if (animationData.animationStartTime) {\n // animation already in progress\n animationData.scrollOffsetFinal = offsetTop;\n return;\n }\n\n // Update the initial scroll offset with the current scroll position for react 18 batching behavior\n if (listRef.current?.state?.scrollOffset !== null) {\n animationData.scrollOffsetInitial = listRef.current?.state?.scrollOffset;\n }\n\n if (animationData.scrollOffsetInitial === offsetTop) {\n // offset already equals to item offset\n onScrollToFinished && onScrollToFinished();\n return;\n }\n\n animationData.scrollOffsetFinal = offsetTop;\n animationData.animationStartTime = performance.now();\n animateScroll();\n },\n [animationData, animateScroll, onScrollToFinished]\n );\n\n const rowRenderer = useCallback(\n ({ index, style }: { index: number; style: CSSProperties }) => {\n const item = items[index];\n return itemRenderer(item, index, style);\n },\n [items, itemRenderer]\n );\n\n const calcItemSize = useCallback(\n (index: number) => {\n const item = items[index];\n return sizeGetter(item, index);\n },\n [items, sizeGetter]\n );\n\n const updateListSize = useCallback(\n (width: number, height: number) => {\n if (height !== listHeight || width !== listWidth) {\n setTimeout(() => {\n setListHeight(height);\n setListWidth(width);\n onSizeUpdate(width, height);\n }, 0);\n }\n },\n [listHeight, listWidth, onSizeUpdate]\n );\n\n const onItemsRenderedCB = useThrottledCallback(\n ({ visibleStartIndex, visibleStopIndex }: ListOnItemsRenderedProps) => {\n if (!onItemsRendered) return;\n const data = getOnItemsRenderedData(\n items,\n normalizedItems,\n idGetter,\n visibleStartIndex,\n visibleStopIndex,\n listSizeByLayout,\n scrollTopRef.current\n );\n onItemsRendered(data);\n },\n { wait: onItemsRenderedThrottleMs, trailing: true },\n [onItemsRendered, items, normalizedItems, idGetter, listSizeByLayout]\n );\n\n // Effects\n useEffect(() => {\n // scroll to specific item\n if (scrollToId && prevScrollToId !== scrollToId) {\n const hasScrollbar = isLayoutDirectionScrollbarVisible(items, normalizedItems, idGetter, listSizeByLayout);\n const item = normalizedItems[scrollToId as keyof typeof normalizedItems];\n hasScrollbar && item && startScrollAnimation(item);\n }\n }, [prevScrollToId, scrollToId, startScrollAnimation, normalizedItems, items, idGetter, listSizeByLayout]);\n\n useEffect(() => {\n // recalculate row heights\n if (listRef.current) {\n listRef.current.resetAfterIndex(0);\n }\n }, [normalizedItems]);\n\n useEffect(() => {\n // update vertical scrollbar visibility\n if (onLayoutDirectionScrollbarVisibilityChange) {\n const isVisible = isLayoutDirectionScrollbarVisible(items, normalizedItems, idGetter, listSizeByLayout);\n if (isVerticalScrollbarVisibleRef.current !== isVisible) {\n isVerticalScrollbarVisibleRef.current = isVisible;\n onLayoutDirectionScrollbarVisibilityChange(isVisible);\n }\n }\n }, [onLayoutDirectionScrollbarVisibilityChange, items, normalizedItems, listSizeByLayout, idGetter]);\n\n return (\n <div\n ref={mergedRef}\n className={cx(styles.virtualizedListWrapper, className)}\n id={id}\n role={role}\n aria-label={ariaLabel}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.VIRTUALIZED_LIST, id)}\n style={style}\n >\n <AutoSizer>\n {({ height, width }: { height: number; width: number }) => {\n updateListSize(width, height);\n return (\n <List\n ref={mergedListRef as unknown as LegacyRef<VariableSizeList<unknown>>}\n height={height}\n width={width}\n itemCount={items.length}\n itemSize={calcItemSize}\n onScroll={onScrollCB}\n layout={layout}\n overscanCount={overscanCount}\n onItemsRendered={onItemsRenderedCB}\n className={scrollableClassName}\n >\n {rowRenderer as React.ComponentType<ListChildComponentProps>}\n </List>\n );\n }}\n </AutoSizer>\n </div>\n );\n }\n);\n\nexport default VirtualizedList;\n"],"names":["VirtualizedList","forwardRef","_ref","ref","className","id","_ref$items","items","_ref$itemRenderer","itemRenderer","item","_index","_style","_ref$getItemSize","getItemSize","height","_ref$layout","layout","onScroll","_ref$overscanCount","overscanCount","_ref$getItemId","getItemId","scrollToId","_ref$scrollDuration","scrollDuration","_ref$onScrollToFinish","onScrollToFinished","NOOP","onItemsRendered","_ref$onItemsRenderedT","onItemsRenderedThrottleMs","_ref$onSizeUpdate","onSizeUpdate","_ref$onLayoutDirectio","onLayoutDirectionScrollbarVisibilityChange","virtualListRef","scrollableClassName","role","ariaLabel","style","dataTestId","_useState","useState","_useState2","_slicedToArray","listHeight","setListHeight","_useState3","_useState4","listWidth","setListWidth","isVerticalList","listSizeByLayout","useMemo","prevScrollToId","usePrevious","componentRef","useRef","isVerticalScrollbarVisibleRef","listRef","scrollTopRef","animationDataRef","initialized","scrollOffsetInitial","scrollOffsetFinal","animationStartTime","mergedRef","useMergeRef","mergedListRef","animationData","current","sizeGetter","useCallback","index","undefined","console","error","idGetter","itemId","normalizedItems","getNormalizedItems","maxListOffset","getMaxOffset","onScrollCB","_ref2","scrollDirection","scrollOffset","scrollUpdateWasRequested","animateScroll","requestAnimationFrame","ellapsed","performance","now","scrollDelta","easedTime","easeInOutQuint","Math","min","finalOffsetValue","_a","scrollTo","startScrollAnimation","offsetTop","_b","state","_d","_c","rowRenderer","_ref3","calcItemSize","updateListSize","width","setTimeout","onItemsRenderedCB","useThrottledCallback","_ref4","data","getOnItemsRenderedData","visibleStartIndex","visibleStopIndex","wait","trailing","useEffect","hasScrollbar","isLayoutDirectionScrollbarVisible","resetAfterIndex","isVisible","React","createElement","cx","styles","virtualizedListWrapper","getTestId","ComponentDefaultTestId","VIRTUALIZED_LIST","AutoSizer","_ref5","List","itemCount","length","itemSize"],"mappings":"qzBA2IMA,IAAAA,EAAkBC,GACtB,SAAAC,EAyBEC,GACE,IAxBAC,EAASF,EAATE,UACAC,EAAEH,EAAFG,GAAEC,EAAAJ,EACFK,MAAAA,OAAQ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AKkE,GACLtD,OAAQA,EACRiG,MAAOA,EACP2B,UAAWpI,EAAMqI,OACjBC,SAAU/B,GACV5F,SAAUkE,GACVnE,OAAQA,EACRG,cAAeA,EACfS,gBAAiBqF,GACjB9G,UAAWiC,GAEVuE,GAGN,IAIT"}
|
package/dist/mocked_classnames/src/components/VirtualizedList/VirtualizedList.module.scss.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e={virtualizedListWrapper:"virtualizedListWrapper"};!function(e){const t="s_id-9250e4cf6c59_4_5_15";if("undefined"!=typeof document){const i=document.head||document.getElementsByTagName("head")[0];if(i.querySelector("#"+t))return;const n=document.createElement("style");n.id=t,i.firstChild?i.insertBefore(n,i.firstChild):i.appendChild(n),n.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[t]=e)}("/* stylelint-disable */\n/* stylelint-enable */\n.virtualizedListWrapper {\n height: 100%;\n width: 100%;\n}");export{e as default};
|
|
2
|
-
//# sourceMappingURL=VirtualizedList.module.scss.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{toConsumableArray as r}from"../../_virtual/_rollupPluginBabelHelpers.js";import{useMemo as t,useCallback as i}from"react";import{throttle as o}from"es-toolkit";function a(a,e,l){var n=e.wait,u=e.trailing,m=void 0===u||u,s=t((function(){return o(a,n,{edges:m?["leading","trailing"]:["leading"]})}),[n,m].concat(r(l)));return i(s,[s])}export{a as default};
|
|
2
|
-
//# sourceMappingURL=useThrottledCallback.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useThrottledCallback.js","sources":["../../../../src/hooks/useThrottledCallback.ts"],"sourcesContent":["import { useMemo, useCallback } from \"react\";\nimport { throttle } from \"es-toolkit\";\n\nexport default function useThrottledCallback(\n callback: (...args: Array<unknown>) => void,\n { wait, trailing = true }: { wait: number; trailing: boolean },\n dependencies: Array<unknown>\n) {\n const throttledFunction = useMemo(() => {\n const edges: (\"leading\" | \"trailing\")[] = trailing ? [\"leading\", \"trailing\"] : [\"leading\"];\n return throttle(callback, wait, { edges });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [wait, trailing, ...dependencies]);\n\n const throttledCallback = useCallback(throttledFunction, [throttledFunction]);\n\n return throttledCallback;\n}\n"],"names":["useThrottledCallback","callback","_ref","dependencies","wait","_ref$trailing","trailing","throttledFunction","useMemo","throttle","edges","concat","_toConsumableArray","useCallback"],"mappings":"uKAGwB,SAAAA,EACtBC,EAA2CC,EAE3CC,GAA4B,IAD1BC,EAAIF,EAAJE,KAAIC,EAAAH,EAAEI,SAAAA,OAAW,IAAHD,GAAOA,EAGjBE,EAAoBC,GAAQ,WAEhC,OAAOC,EAASR,EAAUG,EAAM,CAAEM,MADQJ,EAAW,CAAC,UAAW,YAAc,CAAC,eAGjF,CAAGF,EAAME,GAAQK,OAAAC,EAAKT,KAIvB,OAF0BU,EAAYN,EAAmB,CAACA,GAG5D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"virtualized-service.js","sources":["../../../../src/services/virtualized-service.ts"],"sourcesContent":["const LAST_ITEM_ID = \"~~~lastItem~~~\";\nconst EMPTY_OBJECT: Record<string, never> = {};\n\ntype NormalizedItem<T> = {\n item: T;\n index: number;\n height: number;\n size: number;\n offsetTop: number;\n offset: number;\n};\n\ntype NormalizedItems<T> = Record<string, NormalizedItem<T>>;\ntype IdGetter<T> = (item: T, index: number) => string;\ntype SizeGetter<T> = (item: T, index: number) => number;\n\nexport const getNormalizedItems = <T>(items: T[], idGetter: IdGetter<T>, sizeGetter: SizeGetter<T>) => {\n const normalizedItems: NormalizedItems<T> = {};\n let offset = 0;\n\n const lastIndex = items.length - 1;\n items.forEach((item, index) => {\n const size = sizeGetter(item, index);\n const uniqueId = idGetter(item, index);\n // keep height/offsetTop for backward compatibility\n normalizedItems[uniqueId] = { item, index, height: size, size, offsetTop: offset, offset };\n if (lastIndex === index) {\n normalizedItems[LAST_ITEM_ID] = normalizedItems[uniqueId];\n }\n offset += size;\n });\n\n return normalizedItems;\n};\n\nexport const isItemInView = (item: { offsetTop: number }, scrollTop: number, offsetHeight: number) => {\n const isItemUnderTheViewableArea = item.offsetTop > scrollTop + offsetHeight;\n const isItemAboveTheViewableArea = item.offsetTop < scrollTop;\n\n return !isItemUnderTheViewableArea && !isItemAboveTheViewableArea;\n};\n\nexport const getMaxOffset = <T>(offsetSize: number, normalizedItems: NormalizedItems<T>) => {\n const lastItem = normalizedItems[LAST_ITEM_ID];\n if (!lastItem) return 0;\n const { size, offset } = lastItem;\n return offset + size - offsetSize; // max offset\n};\n\nexport const easeInOutQuint = (time: number) => {\n let t = time;\n return t < 0.5 ? 16 * t * t * t * t * t : 1 + 16 * --t * t * t * t * t;\n};\n\nfunction findItemAtOffset<T>(\n items: T[],\n normalizedItems: NormalizedItems<T>,\n idGetter: IdGetter<T>,\n fromIndex: number,\n offset: number\n) {\n for (let i = fromIndex; i < items.length; i++) {\n const itemId = idGetter(items[i], i);\n const normalizedItem = normalizedItems[itemId];\n const { height, offsetTop } = normalizedItem || EMPTY_OBJECT;\n if (height + offsetTop > offset) {\n return itemId;\n }\n }\n return null;\n}\n\n// for vertical layout - this returns true when vertical scrollbar visible\n// for horizontal layout - this returns true when horizontal scrollbar visible\nexport const isLayoutDirectionScrollbarVisible = <T>(\n items: T[],\n normalizedItems: NormalizedItems<T>,\n idGetter: IdGetter<T>,\n componentSize: number\n) => {\n if (!componentSize) return false;\n const lastExistingItem = items[items.length - 1] || EMPTY_OBJECT;\n const lastExistingItemId = idGetter(lastExistingItem as T, items.length - 1);\n const normalizedItem = normalizedItems[lastExistingItemId];\n if (!normalizedItem) return false;\n const { offset: lastExistingItemIdOffset, size: lastExistingItemSize } = normalizedItems[lastExistingItemId];\n const maxOffset = lastExistingItemIdOffset + lastExistingItemSize;\n const isVisible = maxOffset > componentSize;\n return isVisible;\n};\n\nfunction isEmptyObject(obj: unknown) {\n return obj === EMPTY_OBJECT;\n}\n\nexport const getOnItemsRenderedData = <T>(\n items: T[],\n normalizedItems: NormalizedItems<T>,\n idGetter: IdGetter<T>,\n visibleStartIndex: number,\n visibleStopIndex: number,\n listSize: number,\n currentOffsetTop: number\n) => {\n const firstVisibleItem = items[visibleStartIndex] || EMPTY_OBJECT;\n const secondVisibleItem = items[visibleStartIndex + 1] || EMPTY_OBJECT;\n const lastVisibleItem = items[visibleStopIndex] || EMPTY_OBJECT;\n const firstItemId = isEmptyObject(firstVisibleItem) ? undefined : idGetter(firstVisibleItem as T, visibleStartIndex);\n const secondItemId = isEmptyObject(secondVisibleItem)\n ? undefined\n : idGetter(secondVisibleItem as T, visibleStartIndex + 1);\n const lastItemId = isEmptyObject(lastVisibleItem) ? undefined : idGetter(lastVisibleItem as T, visibleStopIndex);\n const centerOffset = currentOffsetTop + listSize / 2;\n const { offsetTop: firstItemOffsetTop, height: firstItemHeight } = normalizedItems[firstItemId!] || EMPTY_OBJECT;\n const firstItemOffsetEnd = firstItemOffsetTop + firstItemHeight;\n const centerItemId = findItemAtOffset(items, normalizedItems, idGetter, visibleStartIndex, centerOffset);\n\n return {\n firstItemId,\n secondItemId,\n lastItemId,\n centerItemId,\n firstItemOffsetEnd,\n currentOffsetTop\n };\n};\n"],"names":["LAST_ITEM_ID","EMPTY_OBJECT","getNormalizedItems","items","idGetter","sizeGetter","normalizedItems","offset","lastIndex","length","forEach","item","index","size","uniqueId","height","offsetTop","getMaxOffset","offsetSize","lastItem","easeInOutQuint","time","t","isLayoutDirectionScrollbarVisible","componentSize","lastExistingItemId","_normalizedItems$last","isEmptyObject","obj","getOnItemsRenderedData","visibleStartIndex","visibleStopIndex","listSize","currentOffsetTop","firstVisibleItem","secondVisibleItem","lastVisibleItem","firstItemId","undefined","secondItemId","lastItemId","_ref2","firstItemOffsetEnd","centerItemId","fromIndex","i","itemId","_ref","findItemAtOffset"],"mappings":"AAAA,IAAMA,EAAe,iBACfC,EAAsC,CAAA,EAe/BC,EAAqB,SAAIC,EAAYC,EAAuBC,GACv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,QAC/BG,EACAlC,EAAS+B,EAAwBL,EAAoB,GACnDU,EAAab,EAAcS,QAAmBE,EAAYlC,EAASgC,EAAsBL,GAE/FU,EAAmEnC,EAAgB+B,IAAiBpC,EAC9FyC,EAD+BD,EAA7BzB,UAAsDyB,EAAvB1B,OAEjC4B,EA7DR,SACExC,EACAG,EACAF,EACAwC,EACArC,GAEA,IAAK,IAAIsC,EAAID,EAAezC,EAAMM,OAAVoC,EAAkBA,IAAK,CAC7C,IAAMC,EAAS1C,EAASD,EAAM0C,GAAIA,GAElCE,EADuBzC,EAAgBwC,IACS7C,EAChD,GADc8C,EAANhC,OAAiBgC,EAAT/B,UACST,EACvB,OAAOuC,CAEX,CACA,OAAO,IACT,CA6CuBE,CAAiB7C,EAAOG,EAAiBF,EAAU0B,EAHnDG,EAAmBD,EAAW,GAKnD,MAAO,CACLK,YAAAA,EACAE,aAAAA,EACAC,WAAAA,EACAG,aAAAA,EACAD,mBAAAA,EACAT,iBAAAA,EAEJ"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
type NormalizedItem<T> = {
|
|
2
|
-
item: T;
|
|
3
|
-
index: number;
|
|
4
|
-
height: number;
|
|
5
|
-
size: number;
|
|
6
|
-
offsetTop: number;
|
|
7
|
-
offset: number;
|
|
8
|
-
};
|
|
9
|
-
type NormalizedItems<T> = Record<string, NormalizedItem<T>>;
|
|
10
|
-
type IdGetter<T> = (item: T, index: number) => string;
|
|
11
|
-
type SizeGetter<T> = (item: T, index: number) => number;
|
|
12
|
-
export declare const getNormalizedItems: <T>(items: T[], idGetter: IdGetter<T>, sizeGetter: SizeGetter<T>) => NormalizedItems<T>;
|
|
13
|
-
export declare const isItemInView: (item: {
|
|
14
|
-
offsetTop: number;
|
|
15
|
-
}, scrollTop: number, offsetHeight: number) => boolean;
|
|
16
|
-
export declare const getMaxOffset: <T>(offsetSize: number, normalizedItems: NormalizedItems<T>) => number;
|
|
17
|
-
export declare const easeInOutQuint: (time: number) => number;
|
|
18
|
-
export declare const isLayoutDirectionScrollbarVisible: <T>(items: T[], normalizedItems: NormalizedItems<T>, idGetter: IdGetter<T>, componentSize: number) => boolean;
|
|
19
|
-
export declare const getOnItemsRenderedData: <T>(items: T[], normalizedItems: NormalizedItems<T>, idGetter: IdGetter<T>, visibleStartIndex: number, visibleStopIndex: number, listSize: number, currentOffsetTop: number) => {
|
|
20
|
-
firstItemId: string;
|
|
21
|
-
secondItemId: string;
|
|
22
|
-
lastItemId: string;
|
|
23
|
-
centerItemId: string;
|
|
24
|
-
firstItemOffsetEnd: number;
|
|
25
|
-
currentOffsetTop: number;
|
|
26
|
-
};
|
|
27
|
-
export {};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{slicedToArray as r}from"../../../_virtual/_rollupPluginBabelHelpers.js";import e,{forwardRef as t,useState as o,useRef as n,useCallback as i,useMemo as l,useEffect as s}from"react";import u from"classnames";import{VariableSizeGrid as c}from"react-window";import a from"react-virtualized-auto-sizer";import{getNormalizedItems as d,getOnItemsRenderedData as m,isLayoutDirectionScrollbarVisible as f}from"../../services/virtualized-service.js";import v from"../../hooks/useThrottledCallback.js";import{getTestId as h,ComponentDefaultTestId as I}from"../../tests/testIds.js";import p from"./VirtualizedGrid.module.scss.js";import g from"../../../hooks/dist/usePrevious/index.js";import{useMergeRef as w}from"../../../shared/dist/hooks/useMergeRef.js";import{NOOP as R}from"../../../shared/dist/utils/function-utils.js";var x=t((function(t,x){var T=t.className,S=t.id,b=t.items,j=void 0===b?[]:b,C=t.itemRenderer,z=t.getRowHeight,N=void 0===z?function(){return 50}:z,M=t.getColumnWidth,k=void 0===M?function(){return 100}:M,E=t.getItemId,V=void 0===E?function(r,e){return r.id}:E,W=t.onScroll,y=t.scrollToId,A=void 0===y?null:y,D=t.onScrollToFinished,G=void 0===D?R:D,H=t.onItemsRendered,O=void 0===H?null:H,U=t.onItemsRenderedThrottleMs,_=void 0===U?200:U,F=t.onSizeUpdate,P=void 0===F?R:F,q=t.onVerticalScrollbarVisiblityChange,B=void 0===q?null:q,L=t.scrollableClassName,Z=t["data-testid"],J=o(0),K=r(J,2),Q=K[0],X=K[1],Y=o(0),$=r(Y,2),rr=$[0],er=$[1],tr=g(A),or=n(null),nr=n(null),ir=n(null),lr=n(0),sr=n({scrollOffsetInitial:0,scrollOffsetFinal:0,animationStartTime:0}),ur=w(x,or),cr=sr.current,ar=i((function(r){var e=N();return e&&!Number.isNaN(e)||console.error("Couldn't get height for item: ",r),e}),[N]),dr=i((function(r,e){var t=V(r,e);return void 0===t&&console.error("Couldn't get id for item: ",r),t}),[V]),mr=l((function(){return d(j,dr,ar)}),[j,dr,ar]),fr=l((function(){return Math.min(j.length,Math.floor(rr/k()))}),[j,rr,k]),vr=l((function(){return fr>0?Math.ceil(j.length/fr):0}),[j,fr]),hr=l((function(){return A%fr}),[A,fr]),Ir=l((function(){return Math.floor(A/fr)}),[A,fr]),pr=i((function(r){var e=r.horizontalScrollDirection,t=r.scrollTop,o=r.scrollUpdateWasRequested;lr.current=t,o||(cr.scrollOffsetInitial=t),W&&W(e,t,o)}),[W,lr,cr]),gr=i((function(r){var e=r.rowIndex*fr+r.columnIndex;return C(j[e],e,r.style)}),[j,C,fr]),wr=i((function(r,e){e===Q&&r===rr||setTimeout((function(){X(e),er(r),P(r,e)}),0)}),[Q,rr,P]),Rr=v((function(r){if(O){var e=m(j,mr,dr,r.visibleRowStartIndex,r.visibleRowStopIndex,Q,lr.current);O(e)}}),{wait:_,trailing:!0},[O,j,mr,dr,Q]);return s((function(){A&&tr!==A&&(ir.current.scrollToItem({align:"center",columnIndex:hr,rowIndex:Ir}),G())}),[A,tr,ir,hr,Ir,G]),s((function(){ir.current&&ir.current.resetAfterIndices({columnIndex:0,rowIndex:0})}),[mr]),s((function(){if(B){var r=f(j,mr,dr,Q);nr.current!==r&&(nr.current=r,B(r))}}),[B,j,mr,Q,dr]),e.createElement("div",{ref:ur,className:u(p.virtualizedGridWrapper,T),id:S,"data-testid":Z||h(I.VIRTUALIZED_GRID,S)},e.createElement(a,null,(function(r){var t=r.height,o=r.width;return wr(o,t),e.createElement(c,{ref:ir,height:t,width:o,columnWidth:k,columnCount:fr,rowHeight:N,rowCount:vr,onScroll:pr,onItemsRendered:Rr,className:L},gr)})))}));export{x as default};
|
|
2
|
-
//# sourceMappingURL=VirtualizedGrid.js.map
|