@ringcentral/juno 2.40.1 → 2.41.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Accordion/Accordion.d.ts +1 -1
- package/components/Accordion/AccordionDetails/AccordionDetails.d.ts +1 -1
- package/components/Accordion/AccordionSummary/AccordionSummary.d.ts +1 -1
- package/components/Alert/Alert.d.ts +1 -1
- package/components/AppBar/AppBar.d.ts +2 -2
- package/components/Avatar/styles/StyledAvatarWrapper.d.ts +1 -1
- package/components/Backdrop/Backdrop.d.ts +1 -1
- package/components/Badge/Badge.d.ts +1 -1
- package/components/Box/Box.d.ts +1 -1
- package/components/Buttons/Button/Button.d.ts +2 -2
- package/components/Buttons/ButtonBase/ButtonBase.d.ts +1 -1
- package/components/Buttons/ButtonGroup/ButtonGroup.d.ts +1 -1
- package/components/Buttons/IconButton/IconButton.d.ts +2 -2
- package/components/Buttons/IconButtonGroup/IconButtonGroup.d.ts +1 -1
- package/components/Buttons/SplitButton/SplitButton.d.ts +1 -1
- package/components/Buttons/SplitButton/styles/StyledArrowIcon.d.ts +1 -1
- package/components/Buttons/ToggleButton/ToggleButton.d.ts +1 -1
- package/components/Buttons/ToggleButtonGroup/ToggleButtonGroup.d.ts +1 -1
- package/components/Card/Card/Card.d.ts +1 -1
- package/components/Card/CardActions/CardActions.d.ts +1 -1
- package/components/Card/CardContent/CardContent.d.ts +1 -1
- package/components/Card/CardHeader/CardHeader.d.ts +8 -8
- package/components/Card/CardHoverActions/CardHoverActions.d.ts +1 -1
- package/components/Card/CardMedia/CardMedia.d.ts +8 -8
- package/components/Card/CardSelectionArea/CardSelectionArea.d.ts +1 -1
- package/components/Dialer/DialDelete/DialDelete.d.ts +1 -0
- package/components/Dialer/DialDelete/DialDelete.js +1 -1
- package/components/Dialer/DialPad/DialPad.d.ts +4 -4
- package/components/Dialer/DialTextField/DialTextField.d.ts +1 -1
- package/components/Dialog/Dialog.d.ts +1 -1
- package/components/Dialog/DialogActions/DialogActions.d.ts +2 -2
- package/components/Dialog/DialogContent/DialogContent.d.ts +2 -2
- package/components/Dialog/DialogContentText/DialogContentText.d.ts +2 -2
- package/components/Dialog/DialogTitle/DialogTitle.d.ts +2 -2
- package/components/Divider/Divider.d.ts +1 -1
- package/components/Downshift/SuggestionList/SuggestionList.d.ts +3 -3
- package/components/Downshift/styles/DownshiftStyle.d.ts +2 -2
- package/components/Downshift/styles/StyledPopper.d.ts +1 -1
- package/components/Downshift/styles/StyledTextField.d.ts +1 -1
- package/components/Downshift/utils/useDownshift.d.ts +3 -3
- package/components/Downshift/utils/useDownshiftTag.d.ts +3 -3
- package/components/Drawer/Drawer.d.ts +1 -1
- package/components/Forms/Checkbox/Checkbox.d.ts +1 -1
- package/components/Forms/FormControl.d.ts +1 -1
- package/components/Forms/FormControlLabel/FormControlLabel.d.ts +1 -1
- package/components/Forms/FormGroup/FormGroup.d.ts +1 -1
- package/components/Forms/FormHelperText/FormHelperText.d.ts +1 -1
- package/components/Forms/FormHelperText/styles/StyledFormHelperText.d.ts +1 -1
- package/components/Forms/FormLabel.d.ts +1 -1
- package/components/Forms/InputLabel/InputLabel.d.ts +1 -1
- package/components/Forms/InputLabel/styles/StyledInputLabel.d.ts +1 -1
- package/components/Forms/Picker/DatePicker/DatePicker.d.ts +2 -2
- package/components/Forms/Picker/DatePicker/styles/StyledCalendar.d.ts +2 -2
- package/components/Forms/Picker/DatePicker/styles/StyledDatePickerHeader.d.ts +3 -3
- package/components/Forms/Picker/DatePicker/styles/StyledYear.d.ts +1 -1
- package/components/Forms/Picker/TimePicker/NumberPicker.d.ts +2 -2
- package/components/Forms/Picker/TimePicker/ToggleText.d.ts +2 -2
- package/components/Forms/Picker/TimePicker/styles/StyledSelectionItem.d.ts +1 -1
- package/components/Forms/Picker/TimePicker/styles/StyledTimeIconButton.d.ts +1 -1
- package/components/Forms/Picker/styles/PickerBaseIconButton.d.ts +1 -1
- package/components/Forms/Picker/styles/StyledPickerTextField.d.ts +1 -1
- package/components/Forms/Picker/styles/StyledPopover.d.ts +1 -1
- package/components/Forms/Picker/utils/PickerTextField/PickerTextField.d.ts +1 -1
- package/components/Forms/Radio/Radio.d.ts +1 -1
- package/components/Forms/RadioGroup/RadioGroup.d.ts +1 -1
- package/components/Forms/Select/PlainSelect/PlainSelect.d.ts +1 -1
- package/components/Forms/Select/Select.d.ts +1 -1
- package/components/Forms/Select/styles/SelectArrowDownIcon.d.ts +1 -1
- package/components/Forms/Select/utils/SelectInput/SelectInput.d.ts +1 -1
- package/components/Forms/Slider/Slider.d.ts +1 -1
- package/components/Forms/Switch/Switch.d.ts +1 -1
- package/components/Forms/TextField/TextField.d.ts +2 -2
- package/components/Forms/TextField/styles/ClearIconButton.d.ts +2 -2
- package/components/Forms/Textarea/Textarea.d.ts +1 -1
- package/components/Grid/Grid.d.ts +1 -1
- package/components/Icon/Icon.d.ts +2 -2
- package/components/Link/Link.d.ts +1 -1
- package/components/List/List/List.d.ts +1 -1
- package/components/List/ListItem/ListItem.d.ts +2 -2
- package/components/List/ListItemIcon/ListItemIcon.d.ts +1 -1
- package/components/List/ListItemSecondaryAction/ListItemSecondaryAction.d.ts +1 -1
- package/components/List/ListItemText/ListItemText.d.ts +1 -1
- package/components/List/ListSubheader/ListSubheader.d.ts +1 -1
- package/components/Menu/Menu/Menu.d.ts +1 -1
- package/components/Menu/MenuItem/MenuItem.d.ts +3 -3
- package/components/Menu/MenuItem/styles/MenuItemStyle.d.ts +2 -2
- package/components/Menu/MenuItemSubAction/MenuItemSubAction.d.ts +1 -1
- package/components/Menu/MenuItemSubAction/styles/StyledMenuItemSubAction.d.ts +1 -1
- package/components/Menu/MenuList/MenuList.d.ts +1 -1
- package/components/Menu/MenuOption/styles/StyledMenuOption.d.ts +1 -1
- package/components/Menu/SubMenu/SubMenu.d.ts +1 -1
- package/components/Menu/SubMenu/styles/SubMenuStyle.d.ts +1 -1
- package/components/Pagination/Pagination/Pagination.d.ts +1 -1
- package/components/Pagination/PaginationItem/PaginationItem.d.ts +8 -8
- package/components/Paper/Paper.d.ts +1 -1
- package/components/Popover/Popover.d.ts +1 -1
- package/components/Popper/Popper.d.ts +1 -1
- package/components/PopupBox/PopupBox.d.ts +1 -1
- package/components/Presence/Presence.d.ts +2 -2
- package/components/Progress/CircularProgress/CircularProgress.d.ts +1 -1
- package/components/Progress/LinearProgress/LinearProgress.d.ts +1 -1
- package/components/Progress/styles/StyledCircularProgress.d.ts +1 -1
- package/components/Rating/Rating.d.ts +1 -1
- package/components/Snackbar/Snackbar.d.ts +1 -1
- package/components/Snackbar/SnackbarAction/SnackbarAction.d.ts +1 -1
- package/components/Snackbar/SnackbarContent/SnackbarContent.d.ts +1 -1
- package/components/Stepper/Step/Step.d.ts +1 -1
- package/components/Stepper/StepButton/StepButton.d.ts +1 -1
- package/components/Stepper/StepConnector/StepConnector.d.ts +1 -1
- package/components/Stepper/StepContent/StepContent.d.ts +1 -1
- package/components/Stepper/StepIcon/StepIcon.d.ts +1 -1
- package/components/Stepper/StepIcon/styles/StyledCircleIcon.d.ts +1 -1
- package/components/Stepper/StepLabel/StepLabel.d.ts +1 -1
- package/components/Stepper/Stepper.d.ts +1 -1
- package/components/Table/Table.d.ts +1 -1
- package/components/Table/TableBody/TableBody.d.ts +1 -1
- package/components/Table/TableCell/TableCell.d.ts +2 -2
- package/components/Table/TableContainer/TableContainer.d.ts +1 -1
- package/components/Table/TableHead/TableHead.d.ts +1 -1
- package/components/Table/TableRow/TableRow.d.ts +1 -1
- package/components/TablePagination/TablePagination.d.ts +1 -1
- package/components/TablePagination/styles/TablePaginationStyle.d.ts +6 -6
- package/components/Tabs/Tab/Tab.d.ts +1 -1
- package/components/Tabs/TabList/TabList.d.ts +1 -1
- package/components/Tabs/TabPanel/TabPanel.d.ts +1 -1
- package/components/Tabs/Tabs/MoreMenuTab/MoreMenuTab.d.ts +1 -1
- package/components/Tabs/Tabs/MoreMenuTabs/MoreMenuTabs.d.ts +1 -1
- package/components/Tabs/Tabs/Tabs.d.ts +1 -1
- package/components/Tag/Tag.d.ts +2 -2
- package/components/Text/Text.d.ts +1 -1
- package/components/Thumbnail/Thumbnail.d.ts +1 -1
- package/components/Toolbar/Toolbar.d.ts +1 -1
- package/components/Tooltip/Tooltip.d.ts +1 -1
- package/components/Typography/Typography.d.ts +1 -1
- package/components/VirtualizedMenu/VirtualizedDivider/VirtualizedDivider.d.ts +1 -1
- package/components/VirtualizedMenu/VirtualizedMenu.d.ts +1 -1
- package/components/VirtualizedMenu/VirtualizedMenuList.d.ts +1 -1
- package/components/Virtuoso/index.d.ts +1 -1
- package/components/Virtuoso/index.js +1 -1
- package/components/Virtuoso/react-virtuoso/AATree.d.ts +1 -1
- package/components/Virtuoso/react-virtuoso/AATree.js +60 -48
- package/components/Virtuoso/react-virtuoso/TableVirtuoso.d.ts +5 -0
- package/components/Virtuoso/react-virtuoso/TableVirtuoso.js +217 -0
- package/components/Virtuoso/react-virtuoso/Virtuoso.d.ts +7696 -0
- package/components/Virtuoso/react-virtuoso/Virtuoso.js +317 -0
- package/components/Virtuoso/react-virtuoso/{Grid.d.ts → VirtuosoGrid.d.ts} +182 -84
- package/components/Virtuoso/react-virtuoso/VirtuosoGrid.js +199 -0
- package/components/Virtuoso/react-virtuoso/alignToBottomSystem.d.ts +119 -65
- package/components/Virtuoso/react-virtuoso/alignToBottomSystem.js +3 -3
- package/components/Virtuoso/react-virtuoso/comparators.d.ts +1 -1
- package/components/Virtuoso/react-virtuoso/comparators.js +1 -3
- package/components/Virtuoso/react-virtuoso/component-interfaces/TableVirtuoso.d.ts +194 -0
- package/components/Virtuoso/react-virtuoso/component-interfaces/TableVirtuoso.js +2 -0
- package/components/Virtuoso/react-virtuoso/component-interfaces/Virtuoso.d.ts +274 -0
- package/components/Virtuoso/react-virtuoso/component-interfaces/Virtuoso.js +2 -0
- package/components/Virtuoso/react-virtuoso/component-interfaces/VirtuosoGrid.d.ts +125 -0
- package/components/Virtuoso/react-virtuoso/component-interfaces/VirtuosoGrid.js +2 -0
- package/components/Virtuoso/react-virtuoso/domIOSystem.d.ts +3 -2
- package/components/Virtuoso/react-virtuoso/domIOSystem.js +5 -3
- package/components/Virtuoso/react-virtuoso/followOutputSystem.d.ts +80 -43
- package/components/Virtuoso/react-virtuoso/followOutputSystem.js +21 -19
- package/components/Virtuoso/react-virtuoso/gridSystem.d.ts +57 -31
- package/components/Virtuoso/react-virtuoso/gridSystem.js +173 -86
- package/components/Virtuoso/react-virtuoso/groupedListSystem.d.ts +76 -67
- package/components/Virtuoso/react-virtuoso/groupedListSystem.js +12 -12
- package/components/Virtuoso/react-virtuoso/hooks/useChangedChildSizes.d.ts +6 -3
- package/components/Virtuoso/react-virtuoso/hooks/useChangedChildSizes.js +36 -17
- package/components/Virtuoso/react-virtuoso/hooks/useIsomorphicLayoutEffect.d.ts +2 -2
- package/components/Virtuoso/react-virtuoso/hooks/useIsomorphicLayoutEffect.js +3 -2
- package/components/Virtuoso/react-virtuoso/hooks/useRcPortalWindowContext.d.ts +2 -0
- package/components/Virtuoso/react-virtuoso/hooks/useRcPortalWindowContext.js +5 -0
- package/components/Virtuoso/react-virtuoso/hooks/useScrollTop.d.ts +2 -3
- package/components/Virtuoso/react-virtuoso/hooks/useScrollTop.js +36 -51
- package/components/Virtuoso/react-virtuoso/hooks/useSize.d.ts +2 -3
- package/components/Virtuoso/react-virtuoso/hooks/useSize.js +13 -13
- package/components/Virtuoso/react-virtuoso/hooks/useWindowViewportRect.js +17 -15
- package/components/Virtuoso/react-virtuoso/index.d.ts +7 -1
- package/components/Virtuoso/react-virtuoso/index.js +8 -1
- package/components/Virtuoso/react-virtuoso/initialItemCountSystem.d.ts +304 -68
- package/components/Virtuoso/react-virtuoso/initialItemCountSystem.js +9 -31
- package/components/Virtuoso/react-virtuoso/initialScrollTopSystem.d.ts +127 -109
- package/components/Virtuoso/react-virtuoso/initialScrollTopSystem.js +7 -7
- package/components/Virtuoso/react-virtuoso/initialTopMostItemIndexSystem.d.ts +38 -22
- package/components/Virtuoso/react-virtuoso/initialTopMostItemIndexSystem.js +13 -20
- package/components/Virtuoso/react-virtuoso/interfaces.d.ts +150 -51
- package/components/Virtuoso/react-virtuoso/listStateSystem.d.ts +109 -59
- package/components/Virtuoso/react-virtuoso/listStateSystem.js +100 -52
- package/components/Virtuoso/react-virtuoso/listSystem.d.ts +1691 -693
- package/components/Virtuoso/react-virtuoso/listSystem.js +15 -16
- package/components/Virtuoso/react-virtuoso/loggerSystem.d.ts +1 -1
- package/components/Virtuoso/react-virtuoso/loggerSystem.js +2 -4
- package/components/Virtuoso/react-virtuoso/propsReadySystem.d.ts +1 -1
- package/components/Virtuoso/react-virtuoso/propsReadySystem.js +3 -4
- package/components/Virtuoso/react-virtuoso/react-urx/index.d.ts +110 -0
- package/components/Virtuoso/react-virtuoso/react-urx/index.js +200 -0
- package/components/Virtuoso/react-virtuoso/react-urx/package.json +5 -0
- package/components/Virtuoso/react-virtuoso/recalcSystem.d.ts +4 -0
- package/components/Virtuoso/react-virtuoso/recalcSystem.js +8 -0
- package/components/Virtuoso/react-virtuoso/scrollIntoViewSystem.d.ts +144 -78
- package/components/Virtuoso/react-virtuoso/scrollIntoViewSystem.js +33 -21
- package/components/Virtuoso/react-virtuoso/scrollSeekSystem.d.ts +12 -7
- package/components/Virtuoso/react-virtuoso/scrollSeekSystem.js +7 -10
- package/components/Virtuoso/react-virtuoso/scrollToIndexSystem.d.ts +19 -11
- package/components/Virtuoso/react-virtuoso/scrollToIndexSystem.js +11 -23
- package/components/Virtuoso/react-virtuoso/sizeRangeSystem.d.ts +7 -6
- package/components/Virtuoso/react-virtuoso/sizeRangeSystem.js +15 -27
- package/components/Virtuoso/react-virtuoso/sizeSystem.d.ts +20 -11
- package/components/Virtuoso/react-virtuoso/sizeSystem.js +182 -52
- package/components/Virtuoso/react-virtuoso/stateFlagsSystem.d.ts +8 -5
- package/components/Virtuoso/react-virtuoso/stateFlagsSystem.js +32 -23
- package/components/Virtuoso/react-virtuoso/stateLoadSystem.d.ts +318 -0
- package/components/Virtuoso/react-virtuoso/stateLoadSystem.js +41 -0
- package/components/Virtuoso/react-virtuoso/topItemCountSystem.d.ts +518 -467
- package/components/Virtuoso/react-virtuoso/topItemCountSystem.js +5 -5
- package/components/Virtuoso/react-virtuoso/totalListHeightSystem.d.ts +115 -63
- package/components/Virtuoso/react-virtuoso/totalListHeightSystem.js +6 -13
- package/components/Virtuoso/react-virtuoso/upwardScrollFixSystem.d.ts +139 -73
- package/components/Virtuoso/react-virtuoso/upwardScrollFixSystem.js +74 -31
- package/components/Virtuoso/react-virtuoso/urx/actions.d.ts +127 -0
- package/components/Virtuoso/react-virtuoso/urx/actions.js +98 -0
- package/components/Virtuoso/react-virtuoso/urx/constants.d.ts +8 -0
- package/components/Virtuoso/react-virtuoso/urx/constants.js +6 -0
- package/components/Virtuoso/react-virtuoso/urx/index.d.ts +6 -0
- package/components/Virtuoso/react-virtuoso/urx/index.js +9 -0
- package/components/Virtuoso/react-virtuoso/urx/package.json +5 -0
- package/components/Virtuoso/react-virtuoso/urx/pipe.d.ts +220 -0
- package/components/Virtuoso/react-virtuoso/urx/pipe.js +279 -0
- package/components/Virtuoso/react-virtuoso/urx/streams.d.ts +143 -0
- package/components/Virtuoso/react-virtuoso/urx/streams.js +227 -0
- package/components/Virtuoso/react-virtuoso/urx/system.d.ts +148 -0
- package/components/Virtuoso/react-virtuoso/urx/system.js +106 -0
- package/components/Virtuoso/react-virtuoso/urx/transformers.d.ts +71 -0
- package/components/Virtuoso/react-virtuoso/urx/transformers.js +106 -0
- package/components/Virtuoso/react-virtuoso/urx/utils.d.ts +57 -0
- package/components/Virtuoso/react-virtuoso/urx/utils.js +102 -0
- package/components/Virtuoso/react-virtuoso/utils/approximatelyEqual.d.ts +1 -0
- package/components/Virtuoso/react-virtuoso/utils/approximatelyEqual.js +6 -0
- package/components/Virtuoso/react-virtuoso/utils/context.d.ts +13 -0
- package/components/Virtuoso/react-virtuoso/utils/context.js +6 -0
- package/components/Virtuoso/react-virtuoso/utils/skipFrames.d.ts +1 -0
- package/components/Virtuoso/react-virtuoso/utils/skipFrames.js +11 -0
- package/components/Virtuoso/react-virtuoso/windowScrollerSystem.d.ts +6 -4
- package/components/Virtuoso/react-virtuoso/windowScrollerSystem.js +1 -1
- package/components/Virtuoso/utils/isOutOfRange.d.ts +1 -1
- package/components/Virtuoso/utils/useHighlightScroll.d.ts +2 -2
- package/es6/components/Dialer/DialDelete/DialDelete.js +1 -1
- package/es6/components/Virtuoso/index.js +1 -1
- package/es6/components/Virtuoso/react-virtuoso/AATree.js +60 -48
- package/es6/components/Virtuoso/react-virtuoso/{Table.js → TableVirtuoso.js} +73 -52
- package/es6/components/Virtuoso/react-virtuoso/{List.js → Virtuoso.js} +85 -161
- package/es6/components/Virtuoso/react-virtuoso/VirtuosoGrid.js +198 -0
- package/es6/components/Virtuoso/react-virtuoso/alignToBottomSystem.js +3 -3
- package/es6/components/Virtuoso/react-virtuoso/comparators.js +1 -3
- package/es6/components/Virtuoso/react-virtuoso/component-interfaces/TableVirtuoso.js +0 -0
- package/es6/components/Virtuoso/react-virtuoso/component-interfaces/Virtuoso.js +0 -0
- package/es6/components/Virtuoso/react-virtuoso/component-interfaces/VirtuosoGrid.js +0 -0
- package/es6/components/Virtuoso/react-virtuoso/domIOSystem.js +5 -3
- package/es6/components/Virtuoso/react-virtuoso/followOutputSystem.js +21 -19
- package/es6/components/Virtuoso/react-virtuoso/gridSystem.js +173 -87
- package/es6/components/Virtuoso/react-virtuoso/groupedListSystem.js +13 -13
- package/es6/components/Virtuoso/react-virtuoso/hooks/useChangedChildSizes.js +35 -16
- package/es6/components/Virtuoso/react-virtuoso/hooks/useIsomorphicLayoutEffect.js +2 -2
- package/es6/components/Virtuoso/react-virtuoso/hooks/useRcPortalWindowContext.js +2 -0
- package/es6/components/Virtuoso/react-virtuoso/hooks/useScrollTop.js +35 -50
- package/es6/components/Virtuoso/react-virtuoso/hooks/useSize.js +11 -12
- package/es6/components/Virtuoso/react-virtuoso/hooks/useWindowViewportRect.js +15 -14
- package/es6/components/Virtuoso/react-virtuoso/index.js +4 -1
- package/es6/components/Virtuoso/react-virtuoso/initialItemCountSystem.js +11 -33
- package/es6/components/Virtuoso/react-virtuoso/initialScrollTopSystem.js +7 -7
- package/es6/components/Virtuoso/react-virtuoso/initialTopMostItemIndexSystem.js +13 -20
- package/es6/components/Virtuoso/react-virtuoso/listStateSystem.js +101 -54
- package/es6/components/Virtuoso/react-virtuoso/listSystem.js +15 -16
- package/es6/components/Virtuoso/react-virtuoso/loggerSystem.js +2 -4
- package/es6/components/Virtuoso/react-virtuoso/propsReadySystem.js +3 -4
- package/es6/components/Virtuoso/react-virtuoso/react-urx/index.js +197 -0
- package/es6/components/Virtuoso/react-virtuoso/recalcSystem.js +5 -0
- package/es6/components/Virtuoso/react-virtuoso/scrollIntoViewSystem.js +34 -22
- package/es6/components/Virtuoso/react-virtuoso/scrollSeekSystem.js +7 -10
- package/es6/components/Virtuoso/react-virtuoso/scrollToIndexSystem.js +11 -23
- package/es6/components/Virtuoso/react-virtuoso/sizeRangeSystem.js +16 -28
- package/es6/components/Virtuoso/react-virtuoso/sizeSystem.js +180 -53
- package/es6/components/Virtuoso/react-virtuoso/stateFlagsSystem.js +32 -23
- package/es6/components/Virtuoso/react-virtuoso/stateLoadSystem.js +39 -0
- package/es6/components/Virtuoso/react-virtuoso/topItemCountSystem.js +5 -5
- package/es6/components/Virtuoso/react-virtuoso/totalListHeightSystem.js +6 -13
- package/es6/components/Virtuoso/react-virtuoso/upwardScrollFixSystem.js +75 -32
- package/es6/components/Virtuoso/react-virtuoso/urx/actions.js +90 -0
- package/es6/components/Virtuoso/react-virtuoso/urx/constants.js +4 -0
- package/es6/components/Virtuoso/react-virtuoso/urx/index.js +6 -0
- package/es6/components/Virtuoso/react-virtuoso/urx/pipe.js +266 -0
- package/es6/components/Virtuoso/react-virtuoso/urx/streams.js +220 -0
- package/es6/components/Virtuoso/react-virtuoso/urx/system.js +102 -0
- package/es6/components/Virtuoso/react-virtuoso/urx/transformers.js +101 -0
- package/es6/components/Virtuoso/react-virtuoso/urx/utils.js +88 -0
- package/es6/components/Virtuoso/react-virtuoso/utils/approximatelyEqual.js +3 -0
- package/es6/components/Virtuoso/react-virtuoso/utils/context.js +3 -0
- package/es6/components/Virtuoso/react-virtuoso/utils/skipFrames.js +8 -0
- package/es6/components/Virtuoso/react-virtuoso/windowScrollerSystem.js +1 -1
- package/foundation/hooks/useKeyboardMoveFocus/useOnlyOneFocusable.d.ts +1 -1
- package/package.json +2 -2
- package/components/Virtuoso/Virtuoso.d.ts +0 -1
- package/components/Virtuoso/Virtuoso.js +0 -4
- package/components/Virtuoso/react-virtuoso/Grid.js +0 -168
- package/components/Virtuoso/react-virtuoso/List.d.ts +0 -6749
- package/components/Virtuoso/react-virtuoso/List.js +0 -393
- package/components/Virtuoso/react-virtuoso/Table.d.ts +0 -6515
- package/components/Virtuoso/react-virtuoso/Table.js +0 -196
- package/components/Virtuoso/react-virtuoso/components.d.ts +0 -505
- package/components/Virtuoso/react-virtuoso/components.js +0 -9
- package/components/Virtuoso/react-virtuoso/utils/conditionalFlushSync.d.ts +0 -1
- package/components/Virtuoso/react-virtuoso/utils/conditionalFlushSync.js +0 -11
- package/es6/components/Virtuoso/Virtuoso.js +0 -1
- package/es6/components/Virtuoso/react-virtuoso/Grid.js +0 -166
- package/es6/components/Virtuoso/react-virtuoso/components.js +0 -7
- package/es6/components/Virtuoso/react-virtuoso/utils/conditionalFlushSync.js +0 -8
|
@@ -1,33 +1,31 @@
|
|
|
1
1
|
var _a;
|
|
2
2
|
import { __assign, __read, __rest } from "tslib";
|
|
3
|
-
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
6
|
-
import { systemToComponent } from '@virtuoso.dev/react-urx';
|
|
7
|
-
import { compose, connect, distinctUntilChanged, getValue, map, noop, pipe, publish, statefulStream, statefulStreamFromEmitter, stream, subscribe, system, tup, withLatestFrom, } from '@virtuoso.dev/urx';
|
|
8
|
-
import useChangedListContentsSizes from './hooks/useChangedChildSizes';
|
|
3
|
+
import { systemToComponent } from './react-urx';
|
|
4
|
+
import * as u from './urx';
|
|
5
|
+
import React from 'react';
|
|
9
6
|
import useIsomorphicLayoutEffect from './hooks/useIsomorphicLayoutEffect';
|
|
7
|
+
import useChangedListContentsSizes from './hooks/useChangedChildSizes';
|
|
10
8
|
import useScrollTop from './hooks/useScrollTop';
|
|
11
9
|
import useSize from './hooks/useSize';
|
|
12
|
-
import useWindowViewportRectRef from './hooks/useWindowViewportRect';
|
|
13
10
|
import { listSystem } from './listSystem';
|
|
14
|
-
import conditionalFlushSync from './utils/conditionalFlushSync';
|
|
15
|
-
import { correctItemSize } from './utils/correctItemSize';
|
|
16
11
|
import { positionStickyCssValue } from './utils/positionStickyCssValue';
|
|
12
|
+
import useWindowViewportRectRef from './hooks/useWindowViewportRect';
|
|
13
|
+
import { correctItemSize } from './utils/correctItemSize';
|
|
14
|
+
import { VirtuosoMockContext } from './utils/context';
|
|
17
15
|
export function identity(value) {
|
|
18
16
|
return value;
|
|
19
17
|
}
|
|
20
|
-
var listComponentPropsSystem = system(function () {
|
|
21
|
-
var itemContent = statefulStream(function (index) { return "Item " + index; });
|
|
22
|
-
var context = statefulStream(null);
|
|
23
|
-
var groupContent = statefulStream(function (index) { return "Group " + index; });
|
|
24
|
-
var components = statefulStream({});
|
|
25
|
-
var computeItemKey = statefulStream(identity);
|
|
26
|
-
var headerFooterTag = statefulStream('div');
|
|
27
|
-
var scrollerRef = statefulStream(noop);
|
|
18
|
+
var listComponentPropsSystem = /*#__PURE__*/ u.system(function () {
|
|
19
|
+
var itemContent = u.statefulStream(function (index) { return "Item " + index; });
|
|
20
|
+
var context = u.statefulStream(null);
|
|
21
|
+
var groupContent = u.statefulStream(function (index) { return "Group " + index; });
|
|
22
|
+
var components = u.statefulStream({});
|
|
23
|
+
var computeItemKey = u.statefulStream(identity);
|
|
24
|
+
var headerFooterTag = u.statefulStream('div');
|
|
25
|
+
var scrollerRef = u.statefulStream(u.noop);
|
|
28
26
|
var distinctProp = function (propName, defaultValue) {
|
|
29
27
|
if (defaultValue === void 0) { defaultValue = null; }
|
|
30
|
-
return statefulStreamFromEmitter(pipe(components, map(function (components) { return components[propName]; }), distinctUntilChanged()), defaultValue);
|
|
28
|
+
return u.statefulStreamFromEmitter(u.pipe(components, u.map(function (components) { return components[propName]; }), u.distinctUntilChanged()), defaultValue);
|
|
31
29
|
};
|
|
32
30
|
return {
|
|
33
31
|
context: context,
|
|
@@ -48,109 +46,40 @@ var listComponentPropsSystem = system(function () {
|
|
|
48
46
|
ScrollSeekPlaceholder: distinctProp('ScrollSeekPlaceholder'),
|
|
49
47
|
};
|
|
50
48
|
});
|
|
51
|
-
|
|
52
|
-
var alias = stream();
|
|
53
|
-
subscribe(alias, function () {
|
|
54
|
-
return console.warn("react-virtuoso: You are using a deprecated property. " + message, 'color: red;', 'color: inherit;', 'color: blue;');
|
|
55
|
-
});
|
|
56
|
-
connect(alias, prop);
|
|
57
|
-
return alias;
|
|
58
|
-
}
|
|
59
|
-
var combinedSystem = system(function (_a) {
|
|
49
|
+
var combinedSystem = /*#__PURE__*/ u.system(function (_a) {
|
|
60
50
|
var _b = __read(_a, 2), listSystem = _b[0], propsSystem = _b[1];
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
group: addDeprecatedAlias(propsSystem.groupContent, 'Rename the %cgroup%c prop to %cgroupContent.'),
|
|
64
|
-
topItems: addDeprecatedAlias(listSystem.topItemCount, 'Rename the %ctopItems%c prop to %ctopItemCount.'),
|
|
65
|
-
itemHeight: addDeprecatedAlias(listSystem.fixedItemHeight, 'Rename the %citemHeight%c prop to %cfixedItemHeight.'),
|
|
66
|
-
scrollingStateChange: addDeprecatedAlias(listSystem.isScrolling, 'Rename the %cscrollingStateChange%c prop to %cisScrolling.'),
|
|
67
|
-
adjustForPrependedItems: stream(),
|
|
68
|
-
maxHeightCacheSize: stream(),
|
|
69
|
-
footer: stream(),
|
|
70
|
-
header: stream(),
|
|
71
|
-
HeaderContainer: stream(),
|
|
72
|
-
FooterContainer: stream(),
|
|
73
|
-
ItemContainer: stream(),
|
|
74
|
-
ScrollContainer: stream(),
|
|
75
|
-
GroupContainer: stream(),
|
|
76
|
-
ListContainer: stream(),
|
|
77
|
-
emptyComponent: stream(),
|
|
78
|
-
scrollSeek: stream(),
|
|
79
|
-
};
|
|
80
|
-
subscribe(deprecatedProps.adjustForPrependedItems, function () {
|
|
81
|
-
console.warn("react-virtuoso: adjustForPrependedItems is no longer supported. Use the firstItemIndex property instead - https://virtuoso.dev/prepend-items.", 'color: red;', 'color: inherit;', 'color: blue;');
|
|
82
|
-
});
|
|
83
|
-
subscribe(deprecatedProps.maxHeightCacheSize, function () {
|
|
84
|
-
console.warn("react-virtuoso: maxHeightCacheSize is no longer necessary. Setting it has no effect - remove it from your code.");
|
|
85
|
-
});
|
|
86
|
-
subscribe(deprecatedProps.HeaderContainer, function () {
|
|
87
|
-
console.warn("react-virtuoso: HeaderContainer is deprecated. Use headerFooterTag if you want to change the wrapper of the header component and pass components.Header to change its contents.");
|
|
88
|
-
});
|
|
89
|
-
subscribe(deprecatedProps.FooterContainer, function () {
|
|
90
|
-
console.warn("react-virtuoso: FooterContainer is deprecated. Use headerFooterTag if you want to change the wrapper of the footer component and pass components.Footer to change its contents.");
|
|
91
|
-
});
|
|
92
|
-
function deprecateComponentProp(stream, componentName, propName) {
|
|
93
|
-
connect(pipe(stream, withLatestFrom(propsSystem.components), map(function (_a) {
|
|
94
|
-
var _b;
|
|
95
|
-
var _c = __read(_a, 2), comp = _c[0], components = _c[1];
|
|
96
|
-
console.warn("react-virtuoso: " + propName + " property is deprecated. Pass components." + componentName + " instead.");
|
|
97
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
98
|
-
return __assign(__assign({}, components), (_b = {}, _b[componentName] = comp, _b));
|
|
99
|
-
})), propsSystem.components);
|
|
100
|
-
}
|
|
101
|
-
subscribe(deprecatedProps.scrollSeek, function (_a) {
|
|
102
|
-
var placeholder = _a.placeholder, config = __rest(_a, ["placeholder"]);
|
|
103
|
-
console.warn("react-virtuoso: scrollSeek property is deprecated. Pass scrollSeekConfiguration and specify the placeholder in components.ScrollSeekPlaceholder instead.");
|
|
104
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
105
|
-
publish(propsSystem.components, __assign(__assign({}, getValue(propsSystem.components)), { ScrollSeekPlaceholder: placeholder }));
|
|
106
|
-
publish(listSystem.scrollSeekConfiguration, config);
|
|
107
|
-
});
|
|
108
|
-
deprecateComponentProp(deprecatedProps.footer, 'Footer', 'footer');
|
|
109
|
-
deprecateComponentProp(deprecatedProps.header, 'Header', 'header');
|
|
110
|
-
deprecateComponentProp(deprecatedProps.ItemContainer, 'Item', 'ItemContainer');
|
|
111
|
-
deprecateComponentProp(deprecatedProps.ListContainer, 'List', 'ListContainer');
|
|
112
|
-
deprecateComponentProp(deprecatedProps.ScrollContainer, 'Scroller', 'ScrollContainer');
|
|
113
|
-
deprecateComponentProp(deprecatedProps.emptyComponent, 'EmptyPlaceholder', 'emptyComponent');
|
|
114
|
-
deprecateComponentProp(deprecatedProps.GroupContainer, 'Group', 'GroupContainer');
|
|
115
|
-
return __assign(__assign(__assign({}, listSystem), propsSystem), deprecatedProps);
|
|
116
|
-
}, tup(listSystem, listComponentPropsSystem));
|
|
51
|
+
return __assign(__assign({}, listSystem), propsSystem);
|
|
52
|
+
}, u.tup(listSystem, listComponentPropsSystem));
|
|
117
53
|
var DefaultScrollSeekPlaceholder = function (_a) {
|
|
118
54
|
var height = _a.height;
|
|
119
|
-
return
|
|
120
|
-
};
|
|
121
|
-
var GROUP_STYLE = {
|
|
122
|
-
position: positionStickyCssValue(),
|
|
123
|
-
zIndex: 1,
|
|
124
|
-
overflowAnchor: 'none',
|
|
55
|
+
return React.createElement("div", { style: { height: height } });
|
|
125
56
|
};
|
|
57
|
+
var GROUP_STYLE = { position: positionStickyCssValue(), zIndex: 1, overflowAnchor: 'none' };
|
|
126
58
|
var ITEM_STYLE = { overflowAnchor: 'none' };
|
|
127
|
-
|
|
59
|
+
var Items = /*#__PURE__*/ React.memo(function VirtuosoItems(_a) {
|
|
128
60
|
var _b = _a.showTopList, showTopList = _b === void 0 ? false : _b;
|
|
129
61
|
var listState = useEmitterValue('listState');
|
|
130
|
-
var _c = __read(React.useState(0), 2), deviation = _c[0], setDeviation = _c[1];
|
|
131
|
-
var react18ConcurrentRendering = useEmitterValue('react18ConcurrentRendering');
|
|
132
|
-
useEmitter('deviation', function (value) {
|
|
133
|
-
if (deviation !== value) {
|
|
134
|
-
conditionalFlushSync(react18ConcurrentRendering)(function () {
|
|
135
|
-
return setDeviation(value);
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
});
|
|
139
62
|
var sizeRanges = usePublisher('sizeRanges');
|
|
140
63
|
var useWindowScroll = useEmitterValue('useWindowScroll');
|
|
141
64
|
var customScrollParent = useEmitterValue('customScrollParent');
|
|
142
65
|
var windowScrollContainerStateCallback = usePublisher('windowScrollContainerState');
|
|
143
66
|
var _scrollContainerStateCallback = usePublisher('scrollContainerState');
|
|
144
|
-
var scrollContainerStateCallback = customScrollParent || useWindowScroll
|
|
145
|
-
? windowScrollContainerStateCallback
|
|
146
|
-
: _scrollContainerStateCallback;
|
|
67
|
+
var scrollContainerStateCallback = customScrollParent || useWindowScroll ? windowScrollContainerStateCallback : _scrollContainerStateCallback;
|
|
147
68
|
var itemContent = useEmitterValue('itemContent');
|
|
148
69
|
var context = useEmitterValue('context');
|
|
149
70
|
var groupContent = useEmitterValue('groupContent');
|
|
150
71
|
var trackItemSizes = useEmitterValue('trackItemSizes');
|
|
151
72
|
var itemSize = useEmitterValue('itemSize');
|
|
152
73
|
var log = useEmitterValue('log');
|
|
153
|
-
var
|
|
74
|
+
var listGap = usePublisher('gap');
|
|
75
|
+
var callbackRef = useChangedListContentsSizes(sizeRanges, itemSize, trackItemSizes, showTopList ? u.noop : scrollContainerStateCallback, log, listGap, customScrollParent).callbackRef;
|
|
76
|
+
var _c = __read(React.useState(0), 2), deviation = _c[0], setDeviation = _c[1];
|
|
77
|
+
useEmitter('deviation', function (value) {
|
|
78
|
+
if (deviation !== value) {
|
|
79
|
+
// ref.current!.style.marginTop = `${value}px`
|
|
80
|
+
setDeviation(value);
|
|
81
|
+
}
|
|
82
|
+
});
|
|
154
83
|
var EmptyPlaceholder = useEmitterValue('EmptyPlaceholder');
|
|
155
84
|
var ScrollSeekPlaceholder = useEmitterValue('ScrollSeekPlaceholder') || DefaultScrollSeekPlaceholder;
|
|
156
85
|
var ListComponent = useEmitterValue('ListComponent');
|
|
@@ -160,33 +89,27 @@ export var Items = React.memo(function VirtuosoItems(_a) {
|
|
|
160
89
|
var isSeeking = useEmitterValue('isSeeking');
|
|
161
90
|
var hasGroups = useEmitterValue('groupIndices').length > 0;
|
|
162
91
|
var paddingTopAddition = useEmitterValue('paddingTopAddition');
|
|
163
|
-
var
|
|
164
|
-
var statefulTotalCount = useEmitterValue('statefulTotalCount');
|
|
92
|
+
var scrolledToInitialItem = useEmitterValue('scrolledToInitialItem');
|
|
165
93
|
var containerStyle = showTopList
|
|
166
94
|
? {}
|
|
167
|
-
: {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
paddingBottom: listState.offsetBottom,
|
|
171
|
-
marginTop: deviation,
|
|
172
|
-
};
|
|
173
|
-
if (!showTopList && statefulTotalCount === 0 && EmptyPlaceholder) {
|
|
174
|
-
return createElement(EmptyPlaceholder, contextPropIfNotDomElement(EmptyPlaceholder, context));
|
|
95
|
+
: __assign({ boxSizing: 'border-box', paddingTop: listState.offsetTop + paddingTopAddition, paddingBottom: listState.offsetBottom, marginTop: deviation }, (scrolledToInitialItem ? {} : { visibility: 'hidden' }));
|
|
96
|
+
if (!showTopList && listState.totalCount === 0 && EmptyPlaceholder) {
|
|
97
|
+
return React.createElement(EmptyPlaceholder, contextPropIfNotDomElement(EmptyPlaceholder, context));
|
|
175
98
|
}
|
|
176
|
-
return createElement(ListComponent, __assign(__assign({}, contextPropIfNotDomElement(ListComponent, context)), { ref:
|
|
177
|
-
? 'virtuoso-top-item-list'
|
|
178
|
-
: 'virtuoso-item-list' }), (showTopList ? listState.topItems : listState.items).map(function (item) {
|
|
99
|
+
return React.createElement(ListComponent, __assign(__assign({}, contextPropIfNotDomElement(ListComponent, context)), { ref: callbackRef, style: containerStyle, 'data-test-id': showTopList ? 'virtuoso-top-item-list' : 'virtuoso-item-list' }), (showTopList ? listState.topItems : listState.items).map(function (item) {
|
|
179
100
|
var index = item.originalIndex;
|
|
180
|
-
var key = computeItemKey(index + firstItemIndex, item.data, context);
|
|
101
|
+
var key = computeItemKey(index + listState.firstItemIndex, item.data, context);
|
|
181
102
|
if (isSeeking) {
|
|
182
|
-
return createElement(ScrollSeekPlaceholder, __assign(__assign(__assign({}, contextPropIfNotDomElement(ScrollSeekPlaceholder, context)), { key: key, index: item.index, height: item.size, type: item.type || 'item' }), (item.type === 'group' ? {} : { groupIndex: item.groupIndex })));
|
|
103
|
+
return React.createElement(ScrollSeekPlaceholder, __assign(__assign(__assign({}, contextPropIfNotDomElement(ScrollSeekPlaceholder, context)), { key: key, index: item.index, height: item.size, type: item.type || 'item' }), (item.type === 'group' ? {} : { groupIndex: item.groupIndex })));
|
|
183
104
|
}
|
|
184
105
|
if (item.type === 'group') {
|
|
185
|
-
return createElement(GroupComponent, __assign(__assign({}, contextPropIfNotDomElement(GroupComponent, context)), { key: key, 'data-index': index, 'data-known-size': item.size, 'data-item-index': item.index, style: GROUP_STYLE }), groupContent(item.index));
|
|
106
|
+
return React.createElement(GroupComponent, __assign(__assign({}, contextPropIfNotDomElement(GroupComponent, context)), { key: key, 'data-index': index, 'data-known-size': item.size, 'data-item-index': item.index, style: GROUP_STYLE }), groupContent(item.index, context));
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
return React.createElement(ItemComponent, __assign(__assign(__assign({}, contextPropIfNotDomElement(ItemComponent, context)), itemPropIfNotDomElement(ItemComponent, item.data)), { key: key, 'data-index': index, 'data-known-size': item.size, 'data-item-index': item.index, 'data-item-group-index': item.groupIndex, style: ITEM_STYLE }), hasGroups
|
|
110
|
+
? itemContent(item.index, item.groupIndex, item.data, context)
|
|
111
|
+
: itemContent(item.index, item.data, context));
|
|
186
112
|
}
|
|
187
|
-
return createElement(ItemComponent, __assign(__assign({}, contextPropIfNotDomElement(ItemComponent, context)), { key: key, 'data-index': index, 'data-known-size': item.size, 'data-item-index': item.index, 'data-item-group-index': item.groupIndex, style: ITEM_STYLE }), hasGroups
|
|
188
|
-
? itemContent(item.index, item.groupIndex, item.data, context)
|
|
189
|
-
: itemContent(item.index, item.data, context));
|
|
190
113
|
}));
|
|
191
114
|
});
|
|
192
115
|
export var scrollerStyle = {
|
|
@@ -206,6 +129,7 @@ var topItemListStyle = {
|
|
|
206
129
|
width: '100%',
|
|
207
130
|
position: positionStickyCssValue(),
|
|
208
131
|
top: 0,
|
|
132
|
+
zIndex: 1,
|
|
209
133
|
};
|
|
210
134
|
export function contextPropIfNotDomElement(element, context) {
|
|
211
135
|
if (typeof element === 'string') {
|
|
@@ -213,6 +137,9 @@ export function contextPropIfNotDomElement(element, context) {
|
|
|
213
137
|
}
|
|
214
138
|
return { context: context };
|
|
215
139
|
}
|
|
140
|
+
export function itemPropIfNotDomElement(element, item) {
|
|
141
|
+
return { item: typeof element === 'string' ? undefined : item };
|
|
142
|
+
}
|
|
216
143
|
var Header = React.memo(function VirtuosoHeader() {
|
|
217
144
|
var Header = useEmitterValue('HeaderComponent');
|
|
218
145
|
var headerHeight = usePublisher('headerHeight');
|
|
@@ -220,7 +147,7 @@ var Header = React.memo(function VirtuosoHeader() {
|
|
|
220
147
|
var ref = useSize(function (el) { return headerHeight(correctItemSize(el, 'height')); });
|
|
221
148
|
var context = useEmitterValue('context');
|
|
222
149
|
return Header
|
|
223
|
-
? createElement(headerFooterTag, { ref: ref }, createElement(Header, contextPropIfNotDomElement(Header, context)))
|
|
150
|
+
? React.createElement(headerFooterTag, { ref: ref }, React.createElement(Header, contextPropIfNotDomElement(Header, context)))
|
|
224
151
|
: null;
|
|
225
152
|
});
|
|
226
153
|
var Footer = React.memo(function VirtuosoFooter() {
|
|
@@ -230,7 +157,7 @@ var Footer = React.memo(function VirtuosoFooter() {
|
|
|
230
157
|
var ref = useSize(function (el) { return footerHeight(correctItemSize(el, 'height')); });
|
|
231
158
|
var context = useEmitterValue('context');
|
|
232
159
|
return Footer
|
|
233
|
-
? createElement(headerFooterTag, { ref: ref }, createElement(Footer, contextPropIfNotDomElement(Footer, context)))
|
|
160
|
+
? React.createElement(headerFooterTag, { ref: ref }, React.createElement(Footer, contextPropIfNotDomElement(Footer, context)))
|
|
234
161
|
: null;
|
|
235
162
|
});
|
|
236
163
|
export function buildScroller(_a) {
|
|
@@ -245,7 +172,7 @@ export function buildScroller(_a) {
|
|
|
245
172
|
var _b = useScrollTop(scrollContainerStateCallback, smoothScrollTargetReached, ScrollerComponent, scrollerRefCallback), scrollerRef = _b.scrollerRef, scrollByCallback = _b.scrollByCallback, scrollToCallback = _b.scrollToCallback;
|
|
246
173
|
useEmitter('scrollTo', scrollToCallback);
|
|
247
174
|
useEmitter('scrollBy', scrollByCallback);
|
|
248
|
-
return createElement(ScrollerComponent, __assign(__assign({ ref: scrollerRef, style: __assign(__assign({}, scrollerStyle), style), 'data-test-id': 'virtuoso-scroller', 'data-virtuoso-scroller': true, tabIndex: 0 }, props), contextPropIfNotDomElement(ScrollerComponent, context)), children);
|
|
175
|
+
return React.createElement(ScrollerComponent, __assign(__assign({ ref: scrollerRef, style: __assign(__assign({}, scrollerStyle), style), 'data-test-id': 'virtuoso-scroller', 'data-virtuoso-scroller': true, tabIndex: 0 }, props), contextPropIfNotDomElement(ScrollerComponent, context)), children);
|
|
249
176
|
});
|
|
250
177
|
return Scroller;
|
|
251
178
|
}
|
|
@@ -260,7 +187,7 @@ export function buildWindowScroller(_a) {
|
|
|
260
187
|
var deviation = useEmitterValue('deviation');
|
|
261
188
|
var customScrollParent = useEmitterValue('customScrollParent');
|
|
262
189
|
var context = useEmitterValue('context');
|
|
263
|
-
var _b = useScrollTop(scrollContainerStateCallback, smoothScrollTargetReached, ScrollerComponent, noop, customScrollParent), scrollerRef = _b.scrollerRef, scrollByCallback = _b.scrollByCallback, scrollToCallback = _b.scrollToCallback;
|
|
190
|
+
var _b = useScrollTop(scrollContainerStateCallback, smoothScrollTargetReached, ScrollerComponent, u.noop, customScrollParent), scrollerRef = _b.scrollerRef, scrollByCallback = _b.scrollByCallback, scrollToCallback = _b.scrollToCallback;
|
|
264
191
|
useIsomorphicLayoutEffect(function () {
|
|
265
192
|
scrollerRef.current = customScrollParent ? customScrollParent : window;
|
|
266
193
|
return function () {
|
|
@@ -269,23 +196,37 @@ export function buildWindowScroller(_a) {
|
|
|
269
196
|
}, [scrollerRef, customScrollParent]);
|
|
270
197
|
useEmitter('windowScrollTo', scrollToCallback);
|
|
271
198
|
useEmitter('scrollBy', scrollByCallback);
|
|
272
|
-
return createElement(ScrollerComponent, __assign(__assign({ style: __assign(__assign({ position: 'relative' }, style), (totalListHeight !== 0
|
|
273
|
-
? { height: totalListHeight + deviation }
|
|
274
|
-
: {})), 'data-virtuoso-scroller': true }, props), contextPropIfNotDomElement(ScrollerComponent, context)), children);
|
|
199
|
+
return React.createElement(ScrollerComponent, __assign(__assign({ style: __assign(__assign({ position: 'relative' }, style), (totalListHeight !== 0 ? { height: totalListHeight + deviation } : {})), 'data-virtuoso-scroller': true }, props), contextPropIfNotDomElement(ScrollerComponent, context)), children);
|
|
275
200
|
});
|
|
276
201
|
return Scroller;
|
|
277
202
|
}
|
|
278
203
|
var Viewport = function (_a) {
|
|
279
204
|
var children = _a.children;
|
|
205
|
+
var ctx = React.useContext(VirtuosoMockContext);
|
|
280
206
|
var viewportHeight = usePublisher('viewportHeight');
|
|
281
|
-
var
|
|
207
|
+
var fixedItemHeight = usePublisher('fixedItemHeight');
|
|
208
|
+
var viewportRef = useSize(u.compose(viewportHeight, function (el) { return correctItemSize(el, 'height'); }));
|
|
209
|
+
React.useEffect(function () {
|
|
210
|
+
if (ctx) {
|
|
211
|
+
viewportHeight(ctx.viewportHeight);
|
|
212
|
+
fixedItemHeight(ctx.itemHeight);
|
|
213
|
+
}
|
|
214
|
+
}, [ctx, viewportHeight, fixedItemHeight]);
|
|
282
215
|
return (React.createElement("div", { style: viewportStyle, ref: viewportRef, "data-viewport-type": "element" }, children));
|
|
283
216
|
};
|
|
284
217
|
var WindowViewport = function (_a) {
|
|
285
218
|
var children = _a.children;
|
|
219
|
+
var ctx = React.useContext(VirtuosoMockContext);
|
|
286
220
|
var windowViewportRect = usePublisher('windowViewportRect');
|
|
221
|
+
var fixedItemHeight = usePublisher('fixedItemHeight');
|
|
287
222
|
var customScrollParent = useEmitterValue('customScrollParent');
|
|
288
223
|
var viewportRef = useWindowViewportRectRef(windowViewportRect, customScrollParent);
|
|
224
|
+
React.useEffect(function () {
|
|
225
|
+
if (ctx) {
|
|
226
|
+
fixedItemHeight(ctx.itemHeight);
|
|
227
|
+
windowViewportRect({ offsetTop: 0, visibleHeight: ctx.viewportHeight, visibleWidth: 100 });
|
|
228
|
+
}
|
|
229
|
+
}, [ctx, windowViewportRect, fixedItemHeight]);
|
|
289
230
|
return (React.createElement("div", { ref: viewportRef, style: viewportStyle, "data-viewport-type": "window" }, children));
|
|
290
231
|
};
|
|
291
232
|
var TopItemListContainer = function (_a) {
|
|
@@ -294,7 +235,7 @@ var TopItemListContainer = function (_a) {
|
|
|
294
235
|
var headerHeight = useEmitterValue('headerHeight');
|
|
295
236
|
var style = __assign(__assign({}, topItemListStyle), { marginTop: headerHeight + "px" });
|
|
296
237
|
var context = useEmitterValue('context');
|
|
297
|
-
return createElement(TopItemList || 'div', { style: style, context: context }, children);
|
|
238
|
+
return React.createElement(TopItemList || 'div', { style: style, context: context }, children);
|
|
298
239
|
};
|
|
299
240
|
var ListRoot = React.memo(function VirtuosoRoot(props) {
|
|
300
241
|
var useWindowScroll = useEmitterValue('useWindowScroll');
|
|
@@ -303,29 +244,31 @@ var ListRoot = React.memo(function VirtuosoRoot(props) {
|
|
|
303
244
|
var TheScroller = customScrollParent || useWindowScroll ? WindowScroller : Scroller;
|
|
304
245
|
var TheViewport = customScrollParent || useWindowScroll ? WindowViewport : Viewport;
|
|
305
246
|
return (React.createElement(TheScroller, __assign({}, props),
|
|
247
|
+
showTopList && (React.createElement(TopItemListContainer, null,
|
|
248
|
+
React.createElement(Items, { showTopList: true }))),
|
|
306
249
|
React.createElement(TheViewport, null,
|
|
307
250
|
React.createElement(Header, null),
|
|
308
251
|
React.createElement(Items, null),
|
|
309
|
-
React.createElement(Footer, null))
|
|
310
|
-
showTopList && (React.createElement(TopItemListContainer, null,
|
|
311
|
-
React.createElement(Items, { showTopList: true })))));
|
|
252
|
+
React.createElement(Footer, null))));
|
|
312
253
|
});
|
|
313
254
|
export var List = (_a = systemToComponent(combinedSystem, {
|
|
314
255
|
required: {},
|
|
315
256
|
optional: {
|
|
257
|
+
restoreStateFrom: 'restoreStateFrom',
|
|
316
258
|
context: 'context',
|
|
317
259
|
followOutput: 'followOutput',
|
|
318
|
-
firstItemIndex: 'firstItemIndex',
|
|
319
260
|
itemContent: 'itemContent',
|
|
320
261
|
groupContent: 'groupContent',
|
|
321
262
|
overscan: 'overscan',
|
|
322
263
|
increaseViewportBy: 'increaseViewportBy',
|
|
323
264
|
totalCount: 'totalCount',
|
|
265
|
+
groupCounts: 'groupCounts',
|
|
324
266
|
topItemCount: 'topItemCount',
|
|
267
|
+
firstItemIndex: 'firstItemIndex',
|
|
325
268
|
initialTopMostItemIndex: 'initialTopMostItemIndex',
|
|
326
269
|
components: 'components',
|
|
327
|
-
groupCounts: 'groupCounts',
|
|
328
270
|
atBottomThreshold: 'atBottomThreshold',
|
|
271
|
+
atTopThreshold: 'atTopThreshold',
|
|
329
272
|
computeItemKey: 'computeItemKey',
|
|
330
273
|
defaultItemHeight: 'defaultItemHeight',
|
|
331
274
|
fixedItemHeight: 'fixedItemHeight',
|
|
@@ -340,31 +283,14 @@ export var List = (_a = systemToComponent(combinedSystem, {
|
|
|
340
283
|
customScrollParent: 'customScrollParent',
|
|
341
284
|
scrollerRef: 'scrollerRef',
|
|
342
285
|
logLevel: 'logLevel',
|
|
343
|
-
react18ConcurrentRendering: 'react18ConcurrentRendering',
|
|
344
|
-
// deprecated
|
|
345
|
-
item: 'item',
|
|
346
|
-
group: 'group',
|
|
347
|
-
topItems: 'topItems',
|
|
348
|
-
itemHeight: 'itemHeight',
|
|
349
|
-
scrollingStateChange: 'scrollingStateChange',
|
|
350
|
-
maxHeightCacheSize: 'maxHeightCacheSize',
|
|
351
|
-
footer: 'footer',
|
|
352
|
-
header: 'header',
|
|
353
|
-
ItemContainer: 'ItemContainer',
|
|
354
|
-
ScrollContainer: 'ScrollContainer',
|
|
355
|
-
ListContainer: 'ListContainer',
|
|
356
|
-
GroupContainer: 'GroupContainer',
|
|
357
|
-
emptyComponent: 'emptyComponent',
|
|
358
|
-
HeaderContainer: 'HeaderContainer',
|
|
359
|
-
FooterContainer: 'FooterContainer',
|
|
360
|
-
scrollSeek: 'scrollSeek',
|
|
361
286
|
},
|
|
362
287
|
methods: {
|
|
363
288
|
scrollToIndex: 'scrollToIndex',
|
|
364
289
|
scrollIntoView: 'scrollIntoView',
|
|
365
290
|
scrollTo: 'scrollTo',
|
|
366
291
|
scrollBy: 'scrollBy',
|
|
367
|
-
|
|
292
|
+
autoscrollToBottom: 'autoscrollToBottom',
|
|
293
|
+
getState: 'getState',
|
|
368
294
|
},
|
|
369
295
|
events: {
|
|
370
296
|
isScrolling: 'isScrolling',
|
|
@@ -378,9 +304,7 @@ export var List = (_a = systemToComponent(combinedSystem, {
|
|
|
378
304
|
groupIndices: 'groupIndices',
|
|
379
305
|
},
|
|
380
306
|
}, ListRoot), _a.Component), usePublisher = _a.usePublisher, useEmitterValue = _a.useEmitterValue, useEmitter = _a.useEmitter;
|
|
381
|
-
var Scroller = buildScroller({ usePublisher: usePublisher, useEmitterValue: useEmitterValue, useEmitter: useEmitter });
|
|
382
|
-
var WindowScroller = buildWindowScroller({
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
useEmitter: useEmitter,
|
|
386
|
-
});
|
|
307
|
+
var Scroller = /*#__PURE__*/ buildScroller({ usePublisher: usePublisher, useEmitterValue: useEmitterValue, useEmitter: useEmitter });
|
|
308
|
+
var WindowScroller = /*#__PURE__*/ buildWindowScroller({ usePublisher: usePublisher, useEmitterValue: useEmitterValue, useEmitter: useEmitter });
|
|
309
|
+
export var Virtuoso = List;
|
|
310
|
+
export var GroupedVirtuoso = List;
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { __assign, __read, __rest } from "tslib";
|
|
2
|
+
import { systemToComponent } from './react-urx';
|
|
3
|
+
import * as u from './urx';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { gridSystem } from './gridSystem';
|
|
6
|
+
import useSize from './hooks/useSize';
|
|
7
|
+
import useWindowViewportRectRef from './hooks/useWindowViewportRect';
|
|
8
|
+
import { buildScroller, buildWindowScroller, contextPropIfNotDomElement, identity, viewportStyle } from './Virtuoso';
|
|
9
|
+
import { LogLevel } from './loggerSystem';
|
|
10
|
+
import { correctItemSize } from './utils/correctItemSize';
|
|
11
|
+
import { VirtuosoGridMockContext } from './utils/context';
|
|
12
|
+
var gridComponentPropsSystem = /*#__PURE__*/ u.system(function () {
|
|
13
|
+
var itemContent = u.statefulStream(function (index) { return "Item " + index; });
|
|
14
|
+
var components = u.statefulStream({});
|
|
15
|
+
var context = u.statefulStream(null);
|
|
16
|
+
var itemClassName = u.statefulStream('virtuoso-grid-item');
|
|
17
|
+
var listClassName = u.statefulStream('virtuoso-grid-list');
|
|
18
|
+
var computeItemKey = u.statefulStream(identity);
|
|
19
|
+
var headerFooterTag = u.statefulStream('div');
|
|
20
|
+
var scrollerRef = u.statefulStream(u.noop);
|
|
21
|
+
var distinctProp = function (propName, defaultValue) {
|
|
22
|
+
if (defaultValue === void 0) { defaultValue = null; }
|
|
23
|
+
return u.statefulStreamFromEmitter(u.pipe(components, u.map(function (components) { return components[propName]; }), u.distinctUntilChanged()), defaultValue);
|
|
24
|
+
};
|
|
25
|
+
return {
|
|
26
|
+
context: context,
|
|
27
|
+
itemContent: itemContent,
|
|
28
|
+
components: components,
|
|
29
|
+
computeItemKey: computeItemKey,
|
|
30
|
+
itemClassName: itemClassName,
|
|
31
|
+
listClassName: listClassName,
|
|
32
|
+
headerFooterTag: headerFooterTag,
|
|
33
|
+
scrollerRef: scrollerRef,
|
|
34
|
+
FooterComponent: distinctProp('Footer'),
|
|
35
|
+
HeaderComponent: distinctProp('Header'),
|
|
36
|
+
ListComponent: distinctProp('List', 'div'),
|
|
37
|
+
ItemComponent: distinctProp('Item', 'div'),
|
|
38
|
+
ScrollerComponent: distinctProp('Scroller', 'div'),
|
|
39
|
+
ScrollSeekPlaceholder: distinctProp('ScrollSeekPlaceholder', 'div'),
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
var combinedSystem = /*#__PURE__*/ u.system(function (_a) {
|
|
43
|
+
var _b = __read(_a, 2), gridSystem = _b[0], gridComponentPropsSystem = _b[1];
|
|
44
|
+
return __assign(__assign({}, gridSystem), gridComponentPropsSystem);
|
|
45
|
+
}, u.tup(gridSystem, gridComponentPropsSystem));
|
|
46
|
+
var GridItems = React.memo(function GridItems() {
|
|
47
|
+
var gridState = useEmitterValue('gridState');
|
|
48
|
+
var listClassName = useEmitterValue('listClassName');
|
|
49
|
+
var itemClassName = useEmitterValue('itemClassName');
|
|
50
|
+
var itemContent = useEmitterValue('itemContent');
|
|
51
|
+
var computeItemKey = useEmitterValue('computeItemKey');
|
|
52
|
+
var isSeeking = useEmitterValue('isSeeking');
|
|
53
|
+
var scrollHeightCallback = usePublisher('scrollHeight');
|
|
54
|
+
var ItemComponent = useEmitterValue('ItemComponent');
|
|
55
|
+
var ListComponent = useEmitterValue('ListComponent');
|
|
56
|
+
var ScrollSeekPlaceholder = useEmitterValue('ScrollSeekPlaceholder');
|
|
57
|
+
var context = useEmitterValue('context');
|
|
58
|
+
var itemDimensions = usePublisher('itemDimensions');
|
|
59
|
+
var gridGap = usePublisher('gap');
|
|
60
|
+
var log = useEmitterValue('log');
|
|
61
|
+
var stateRestoreInProgress = useEmitterValue('stateRestoreInProgress');
|
|
62
|
+
var listRef = useSize(function (el) {
|
|
63
|
+
var scrollHeight = el.parentElement.parentElement.scrollHeight;
|
|
64
|
+
scrollHeightCallback(scrollHeight);
|
|
65
|
+
var firstItem = el.firstChild;
|
|
66
|
+
if (firstItem) {
|
|
67
|
+
var _a = firstItem.getBoundingClientRect(), width = _a.width, height = _a.height;
|
|
68
|
+
itemDimensions({ width: width, height: height });
|
|
69
|
+
}
|
|
70
|
+
gridGap({
|
|
71
|
+
row: resolveGapValue('row-gap', getComputedStyle(el).rowGap, log),
|
|
72
|
+
column: resolveGapValue('column-gap', getComputedStyle(el).columnGap, log),
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
if (stateRestoreInProgress) {
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
// console.log('rendering items', gridState.items)
|
|
79
|
+
return React.createElement(ListComponent, __assign(__assign({ ref: listRef, className: listClassName }, contextPropIfNotDomElement(ListComponent, context)), { style: { paddingTop: gridState.offsetTop, paddingBottom: gridState.offsetBottom }, 'data-test-id': 'virtuoso-item-list' }), gridState.items.map(function (item) {
|
|
80
|
+
var key = computeItemKey(item.index, item.data, context);
|
|
81
|
+
return isSeeking
|
|
82
|
+
? React.createElement(ScrollSeekPlaceholder, __assign(__assign({ key: key }, contextPropIfNotDomElement(ScrollSeekPlaceholder, context)), { index: item.index, height: gridState.itemHeight, width: gridState.itemWidth }))
|
|
83
|
+
: React.createElement(ItemComponent, __assign(__assign({}, contextPropIfNotDomElement(ItemComponent, context)), { className: itemClassName, 'data-index': item.index, key: key }), itemContent(item.index, item.data, context));
|
|
84
|
+
}));
|
|
85
|
+
});
|
|
86
|
+
var Header = React.memo(function VirtuosoHeader() {
|
|
87
|
+
var Header = useEmitterValue('HeaderComponent');
|
|
88
|
+
var headerHeight = usePublisher('headerHeight');
|
|
89
|
+
var headerFooterTag = useEmitterValue('headerFooterTag');
|
|
90
|
+
var ref = useSize(function (el) { return headerHeight(correctItemSize(el, 'height')); });
|
|
91
|
+
var context = useEmitterValue('context');
|
|
92
|
+
return Header
|
|
93
|
+
? React.createElement(headerFooterTag, { ref: ref }, React.createElement(Header, contextPropIfNotDomElement(Header, context)))
|
|
94
|
+
: null;
|
|
95
|
+
});
|
|
96
|
+
var Footer = React.memo(function VirtuosoGridFooter() {
|
|
97
|
+
var Footer = useEmitterValue('FooterComponent');
|
|
98
|
+
var footerHeight = usePublisher('footerHeight');
|
|
99
|
+
var headerFooterTag = useEmitterValue('headerFooterTag');
|
|
100
|
+
var ref = useSize(function (el) { return footerHeight(correctItemSize(el, 'height')); });
|
|
101
|
+
var context = useEmitterValue('context');
|
|
102
|
+
return Footer
|
|
103
|
+
? React.createElement(headerFooterTag, { ref: ref }, React.createElement(Footer, contextPropIfNotDomElement(Footer, context)))
|
|
104
|
+
: null;
|
|
105
|
+
});
|
|
106
|
+
var Viewport = function (_a) {
|
|
107
|
+
var children = _a.children;
|
|
108
|
+
var ctx = React.useContext(VirtuosoGridMockContext);
|
|
109
|
+
var itemDimensions = usePublisher('itemDimensions');
|
|
110
|
+
var viewportDimensions = usePublisher('viewportDimensions');
|
|
111
|
+
var viewportRef = useSize(function (el) {
|
|
112
|
+
viewportDimensions(el.getBoundingClientRect());
|
|
113
|
+
});
|
|
114
|
+
React.useEffect(function () {
|
|
115
|
+
if (ctx) {
|
|
116
|
+
viewportDimensions({ height: ctx.viewportHeight, width: ctx.viewportWidth });
|
|
117
|
+
itemDimensions({ height: ctx.itemHeight, width: ctx.itemWidth });
|
|
118
|
+
}
|
|
119
|
+
}, [ctx, viewportDimensions, itemDimensions]);
|
|
120
|
+
return (React.createElement("div", { style: viewportStyle, ref: viewportRef }, children));
|
|
121
|
+
};
|
|
122
|
+
var WindowViewport = function (_a) {
|
|
123
|
+
var children = _a.children;
|
|
124
|
+
var ctx = React.useContext(VirtuosoGridMockContext);
|
|
125
|
+
var windowViewportRect = usePublisher('windowViewportRect');
|
|
126
|
+
var itemDimensions = usePublisher('itemDimensions');
|
|
127
|
+
var customScrollParent = useEmitterValue('customScrollParent');
|
|
128
|
+
var viewportRef = useWindowViewportRectRef(windowViewportRect, customScrollParent);
|
|
129
|
+
React.useEffect(function () {
|
|
130
|
+
if (ctx) {
|
|
131
|
+
itemDimensions({ height: ctx.itemHeight, width: ctx.itemWidth });
|
|
132
|
+
windowViewportRect({ offsetTop: 0, visibleHeight: ctx.viewportHeight, visibleWidth: ctx.viewportWidth });
|
|
133
|
+
}
|
|
134
|
+
}, [ctx, windowViewportRect, itemDimensions]);
|
|
135
|
+
return (React.createElement("div", { ref: viewportRef, style: viewportStyle }, children));
|
|
136
|
+
};
|
|
137
|
+
var GridRoot = React.memo(function GridRoot(_a) {
|
|
138
|
+
var props = __rest(_a, []);
|
|
139
|
+
var useWindowScroll = useEmitterValue('useWindowScroll');
|
|
140
|
+
var customScrollParent = useEmitterValue('customScrollParent');
|
|
141
|
+
var TheScroller = customScrollParent || useWindowScroll ? WindowScroller : Scroller;
|
|
142
|
+
var TheViewport = customScrollParent || useWindowScroll ? WindowViewport : Viewport;
|
|
143
|
+
return (React.createElement(TheScroller, __assign({}, props),
|
|
144
|
+
React.createElement(TheViewport, null,
|
|
145
|
+
React.createElement(Header, null),
|
|
146
|
+
React.createElement(GridItems, null),
|
|
147
|
+
React.createElement(Footer, null))));
|
|
148
|
+
});
|
|
149
|
+
var _a = systemToComponent(combinedSystem, {
|
|
150
|
+
optional: {
|
|
151
|
+
context: 'context',
|
|
152
|
+
totalCount: 'totalCount',
|
|
153
|
+
overscan: 'overscan',
|
|
154
|
+
itemContent: 'itemContent',
|
|
155
|
+
components: 'components',
|
|
156
|
+
computeItemKey: 'computeItemKey',
|
|
157
|
+
data: 'data',
|
|
158
|
+
initialItemCount: 'initialItemCount',
|
|
159
|
+
scrollSeekConfiguration: 'scrollSeekConfiguration',
|
|
160
|
+
headerFooterTag: 'headerFooterTag',
|
|
161
|
+
listClassName: 'listClassName',
|
|
162
|
+
itemClassName: 'itemClassName',
|
|
163
|
+
useWindowScroll: 'useWindowScroll',
|
|
164
|
+
customScrollParent: 'customScrollParent',
|
|
165
|
+
scrollerRef: 'scrollerRef',
|
|
166
|
+
logLevel: 'logLevel',
|
|
167
|
+
restoreStateFrom: 'restoreStateFrom',
|
|
168
|
+
initialTopMostItemIndex: 'initialTopMostItemIndex',
|
|
169
|
+
},
|
|
170
|
+
methods: {
|
|
171
|
+
scrollTo: 'scrollTo',
|
|
172
|
+
scrollBy: 'scrollBy',
|
|
173
|
+
scrollToIndex: 'scrollToIndex',
|
|
174
|
+
},
|
|
175
|
+
events: {
|
|
176
|
+
isScrolling: 'isScrolling',
|
|
177
|
+
endReached: 'endReached',
|
|
178
|
+
startReached: 'startReached',
|
|
179
|
+
rangeChanged: 'rangeChanged',
|
|
180
|
+
atBottomStateChange: 'atBottomStateChange',
|
|
181
|
+
atTopStateChange: 'atTopStateChange',
|
|
182
|
+
stateChanged: 'stateChanged',
|
|
183
|
+
},
|
|
184
|
+
}, GridRoot), Grid = _a.Component, usePublisher = _a.usePublisher, useEmitterValue = _a.useEmitterValue, useEmitter = _a.useEmitter;
|
|
185
|
+
// Fix
|
|
186
|
+
export { Grid };
|
|
187
|
+
var Scroller = /*#__PURE__*/ buildScroller({ usePublisher: usePublisher, useEmitterValue: useEmitterValue, useEmitter: useEmitter });
|
|
188
|
+
var WindowScroller = /*#__PURE__*/ buildWindowScroller({ usePublisher: usePublisher, useEmitterValue: useEmitterValue, useEmitter: useEmitter });
|
|
189
|
+
function resolveGapValue(property, value, log) {
|
|
190
|
+
if (value !== 'normal' && !(value === null || value === void 0 ? void 0 : value.endsWith('px'))) {
|
|
191
|
+
log(property + " was not resolved to pixel value correctly", value, LogLevel.WARN);
|
|
192
|
+
}
|
|
193
|
+
if (value === 'normal') {
|
|
194
|
+
return 0;
|
|
195
|
+
}
|
|
196
|
+
return parseInt(value !== null && value !== void 0 ? value : '0', 10);
|
|
197
|
+
}
|
|
198
|
+
export var VirtuosoGrid = Grid;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __read } from "tslib";
|
|
2
|
-
import * as u from '
|
|
3
|
-
import { domIOSystem } from './domIOSystem';
|
|
2
|
+
import * as u from './urx';
|
|
4
3
|
import { totalListHeightSystem } from './totalListHeightSystem';
|
|
4
|
+
import { domIOSystem } from './domIOSystem';
|
|
5
5
|
export var alignToBottomSystem = u.system(function (_a) {
|
|
6
6
|
var _b = __read(_a, 2), viewportHeight = _b[0].viewportHeight, totalListHeight = _b[1].totalListHeight;
|
|
7
7
|
var alignToBottom = u.statefulStream(false);
|
|
@@ -11,6 +11,6 @@ export var alignToBottomSystem = u.system(function (_a) {
|
|
|
11
11
|
}), u.map(function (_a) {
|
|
12
12
|
var _b = __read(_a, 3), viewportHeight = _b[1], totalListHeight = _b[2];
|
|
13
13
|
return Math.max(0, viewportHeight - totalListHeight);
|
|
14
|
-
}), u.distinctUntilChanged()), 0);
|
|
14
|
+
}), u.throttleTime(0), u.distinctUntilChanged()), 0);
|
|
15
15
|
return { alignToBottom: alignToBottom, paddingTopAddition: paddingTopAddition };
|
|
16
16
|
}, u.tup(domIOSystem, totalListHeightSystem), { singleton: true });
|
|
@@ -2,7 +2,5 @@ export function tupleComparator(prev, current) {
|
|
|
2
2
|
return !!(prev && prev[0] === current[0] && prev[1] === current[1]);
|
|
3
3
|
}
|
|
4
4
|
export function rangeComparator(prev, next) {
|
|
5
|
-
return !!(prev &&
|
|
6
|
-
prev.startIndex === next.startIndex &&
|
|
7
|
-
prev.endIndex === next.endIndex);
|
|
5
|
+
return !!(prev && prev.startIndex === next.startIndex && prev.endIndex === next.endIndex);
|
|
8
6
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|