@astral/ui 4.100.0 → 4.102.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Alert/styles.js +12 -2
- package/components/Autocomplete/styles.js +5 -2
- package/components/Breadcrumbs/styles.js +18 -13
- package/components/CheckableTag/styles.js +6 -3
- package/components/Checkbox/styles.js +10 -7
- package/components/Chip/styles.js +11 -6
- package/components/CodeField/styles.js +5 -2
- package/components/CopyTypography/styles.js +19 -5
- package/components/DashboardLayout/Header/styles.js +5 -2
- package/components/DashboardSidebarPopover/SidebarPopoverItem/styles.js +5 -2
- package/components/DataGrid/Row/styles.js +14 -19
- package/components/DataGrid/RowBase/styles.js +10 -17
- package/components/DataGridCollapsibleRow/styles.js +5 -2
- package/components/Description/Value/styles.js +5 -2
- package/components/ExpansionPanel/Summary/styles.js +5 -2
- package/components/Fab/styles.js +12 -3
- package/components/InfiniteDataList/styles.js +5 -2
- package/components/InfiniteTreeList/InfiniteTreeList.d.ts +18 -0
- package/components/InfiniteTreeList/InfiniteTreeList.js +26 -19
- package/components/InfiniteTreeList/InfiniteTreeListActions/InfiniteTreeListActions.d.ts +9 -0
- package/components/InfiniteTreeList/InfiniteTreeListActions/InfiniteTreeListActions.js +9 -0
- package/components/InfiniteTreeList/InfiniteTreeListActions/types.d.ts +5 -0
- package/components/InfiniteTreeList/InfiniteTreeListActions/useLogic/useLogic.js +5 -6
- package/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContext.d.ts +81 -0
- package/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContext.js +21 -0
- package/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContextProvider/InfiniteTreeListContextProvider.d.ts +3 -2
- package/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContextProvider/InfiniteTreeListContextProvider.js +69 -13
- package/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/ErrorPlaceholder.d.ts +6 -0
- package/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/ErrorPlaceholder.js +8 -0
- package/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/constants.d.ts +1 -0
- package/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/constants.js +1 -0
- package/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/index.d.ts +1 -0
- package/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/index.js +1 -0
- package/components/InfiniteTreeList/{ErrorMessage → InfiniteTreeListItem/ErrorPlaceholder}/styles.d.ts +1 -1
- package/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/styles.js +8 -0
- package/components/InfiniteTreeList/InfiniteTreeListItem/InfiniteTreeListItem.js +29 -7
- package/components/InfiniteTreeList/InfiniteTreeListItem/TreeListItemContext/TreeListItemContext.d.ts +19 -0
- package/components/InfiniteTreeList/InfiniteTreeListItem/TreeListItemContext/TreeListItemContext.js +4 -0
- package/components/InfiniteTreeList/InfiniteTreeListItem/TreeListItemContext/TreeListItemContextProvider/TreeListItemContextProvider.d.ts +4 -0
- package/components/InfiniteTreeList/InfiniteTreeListItem/TreeListItemContext/TreeListItemContextProvider/TreeListItemContextProvider.js +13 -8
- package/components/InfiniteTreeList/InfiniteTreeListItem/constants.d.ts +6 -0
- package/components/InfiniteTreeList/InfiniteTreeListItem/constants.js +7 -0
- package/components/InfiniteTreeList/InfiniteTreeListItem/styles.d.ts +4 -4
- package/components/InfiniteTreeList/InfiniteTreeListItem/styles.js +32 -6
- package/components/InfiniteTreeList/InfiniteTreeListItem/types.d.ts +20 -3
- package/components/InfiniteTreeList/InfiniteTreeListItem/useLogic/useLogic.d.ts +7 -1
- package/components/InfiniteTreeList/InfiniteTreeListItem/useLogic/useLogic.js +57 -5
- package/components/InfiniteTreeList/{EndData → ListFooter/EndData}/EndData.js +1 -1
- package/components/InfiniteTreeList/{ErrorMessage → ListFooter/ErrorMessage}/ErrorMessage.js +2 -2
- package/components/InfiniteTreeList/ListFooter/ErrorMessage/styles.d.ts +5 -0
- package/components/InfiniteTreeList/{ErrorMessage → ListFooter/ErrorMessage}/styles.js +1 -1
- package/components/InfiniteTreeList/ListFooter/ListFooter.d.ts +10 -0
- package/components/InfiniteTreeList/ListFooter/ListFooter.js +25 -0
- package/components/InfiniteTreeList/ListFooter/index.d.ts +2 -0
- package/components/InfiniteTreeList/ListFooter/index.js +1 -0
- package/components/InfiniteTreeList/{styles.d.ts → ListFooter/styles.d.ts} +2 -2
- package/components/InfiniteTreeList/{styles.js → ListFooter/styles.js} +1 -1
- package/components/InfiniteTreeList/ListFooter/types.d.ts +22 -0
- package/components/InfiniteTreeList/ListFooter/types.js +1 -0
- package/components/InfiniteTreeList/OnTopButton/OnTopButton.d.ts +8 -2
- package/components/InfiniteTreeList/OnTopButton/OnTopButton.js +6 -5
- package/components/InfiniteTreeList/OnTopButton/styles.d.ts +4 -0
- package/components/InfiniteTreeList/OnTopButton/styles.js +10 -0
- package/components/InfiniteTreeList/ParentItems/Item/CustomParentWrapper/CustomParentWrapper.d.ts +23 -0
- package/components/InfiniteTreeList/ParentItems/Item/CustomParentWrapper/CustomParentWrapper.js +12 -0
- package/components/InfiniteTreeList/ParentItems/Item/CustomParentWrapper/index.d.ts +1 -0
- package/components/InfiniteTreeList/ParentItems/Item/CustomParentWrapper/index.js +1 -0
- package/components/InfiniteTreeList/ParentItems/Item/Item.d.ts +10 -0
- package/components/InfiniteTreeList/ParentItems/Item/Item.js +22 -0
- package/components/InfiniteTreeList/ParentItems/Item/index.d.ts +2 -0
- package/components/InfiniteTreeList/ParentItems/Item/index.js +2 -0
- package/components/InfiniteTreeList/ParentItems/Item/types.d.ts +8 -0
- package/components/InfiniteTreeList/ParentItems/Item/types.js +1 -0
- package/components/InfiniteTreeList/ParentItems/Item/useLogic/index.d.ts +1 -0
- package/components/InfiniteTreeList/ParentItems/Item/useLogic/index.js +1 -0
- package/components/InfiniteTreeList/ParentItems/Item/useLogic/useLogic.d.ts +12 -0
- package/components/InfiniteTreeList/ParentItems/Item/useLogic/useLogic.js +12 -0
- package/components/InfiniteTreeList/ParentItems/ParentItems.d.ts +11 -0
- package/components/InfiniteTreeList/ParentItems/ParentItems.js +11 -0
- package/components/InfiniteTreeList/ParentItems/index.d.ts +3 -0
- package/components/InfiniteTreeList/ParentItems/index.js +3 -0
- package/components/InfiniteTreeList/ParentItems/types.d.ts +8 -0
- package/components/InfiniteTreeList/ParentItems/types.js +1 -0
- package/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/ChildrenPlaceholder.d.ts +9 -0
- package/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/ChildrenPlaceholder.js +22 -0
- package/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/NoDataRow.d.ts +1 -0
- package/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/NoDataRow.js +5 -0
- package/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/index.d.ts +1 -0
- package/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/index.js +1 -0
- package/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/index.d.ts +1 -0
- package/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/index.js +1 -0
- package/components/InfiniteTreeList/TreeItem/CustomItemWrapper/CustomItemWrapper.d.ts +20 -0
- package/components/InfiniteTreeList/TreeItem/CustomItemWrapper/CustomItemWrapper.js +10 -0
- package/components/InfiniteTreeList/TreeItem/CustomItemWrapper/index.d.ts +1 -0
- package/components/InfiniteTreeList/TreeItem/CustomItemWrapper/index.js +1 -0
- package/components/InfiniteTreeList/TreeItem/ParentSlot/ParentSlot.d.ts +5 -0
- package/components/InfiniteTreeList/TreeItem/ParentSlot/ParentSlot.js +38 -0
- package/components/InfiniteTreeList/TreeItem/ParentSlot/index.d.ts +2 -0
- package/components/InfiniteTreeList/TreeItem/ParentSlot/index.js +2 -0
- package/components/InfiniteTreeList/TreeItem/ParentSlot/styles.d.ts +9 -0
- package/components/InfiniteTreeList/TreeItem/ParentSlot/styles.js +8 -0
- package/components/InfiniteTreeList/TreeItem/ParentSlot/types.d.ts +6 -0
- package/components/InfiniteTreeList/TreeItem/ParentSlot/types.js +1 -0
- package/components/InfiniteTreeList/TreeItem/TreeItem.d.ts +5 -2
- package/components/InfiniteTreeList/TreeItem/TreeItem.js +31 -4
- package/components/InfiniteTreeList/TreeItem/constants.d.ts +3 -0
- package/components/InfiniteTreeList/TreeItem/constants.js +3 -1
- package/components/InfiniteTreeList/TreeItem/styles.d.ts +0 -3
- package/components/InfiniteTreeList/TreeItem/styles.js +23 -8
- package/components/InfiniteTreeList/TreeItem/types.d.ts +4 -9
- package/components/InfiniteTreeList/TreeItem/useLogic/useLogic.d.ts +29 -9
- package/components/InfiniteTreeList/TreeItem/useLogic/useLogic.js +61 -19
- package/components/InfiniteTreeList/constants.d.ts +14 -2
- package/components/InfiniteTreeList/constants.js +14 -2
- package/components/InfiniteTreeList/hooks/index.d.ts +5 -0
- package/components/InfiniteTreeList/hooks/index.js +5 -0
- package/components/InfiniteTreeList/hooks/useChildrenState/index.d.ts +2 -0
- package/components/InfiniteTreeList/hooks/useChildrenState/index.js +2 -0
- package/components/InfiniteTreeList/hooks/useChildrenState/types.d.ts +43 -0
- package/components/InfiniteTreeList/hooks/useChildrenState/types.js +1 -0
- package/components/InfiniteTreeList/hooks/useChildrenState/useChildrenState.d.ts +20 -0
- package/components/InfiniteTreeList/hooks/useChildrenState/useChildrenState.js +115 -0
- package/components/InfiniteTreeList/hooks/useEnterAnimation/index.d.ts +2 -0
- package/components/InfiniteTreeList/hooks/useEnterAnimation/index.js +2 -0
- package/components/InfiniteTreeList/hooks/useEnterAnimation/types.d.ts +29 -0
- package/components/InfiniteTreeList/hooks/useEnterAnimation/types.js +1 -0
- package/components/InfiniteTreeList/hooks/useEnterAnimation/useEnterAnimation.d.ts +6 -0
- package/components/InfiniteTreeList/hooks/useEnterAnimation/useEnterAnimation.js +35 -0
- package/components/InfiniteTreeList/hooks/useExpandNotifier/index.d.ts +1 -0
- package/components/InfiniteTreeList/hooks/useExpandNotifier/index.js +1 -0
- package/components/InfiniteTreeList/hooks/useExpandNotifier/useExpandNotifier.d.ts +8 -0
- package/components/InfiniteTreeList/hooks/useExpandNotifier/useExpandNotifier.js +19 -0
- package/components/InfiniteTreeList/hooks/useFlatTree/index.d.ts +2 -0
- package/components/InfiniteTreeList/hooks/useFlatTree/index.js +2 -0
- package/components/InfiniteTreeList/hooks/useFlatTree/types.d.ts +20 -0
- package/components/InfiniteTreeList/hooks/useFlatTree/types.js +1 -0
- package/components/InfiniteTreeList/hooks/useFlatTree/useFlatTree.d.ts +15 -0
- package/components/InfiniteTreeList/hooks/useFlatTree/useFlatTree.js +88 -0
- package/components/InfiniteTreeList/hooks/useListScroll/index.d.ts +2 -0
- package/components/InfiniteTreeList/hooks/useListScroll/index.js +2 -0
- package/components/InfiniteTreeList/hooks/useListScroll/types.d.ts +25 -0
- package/components/InfiniteTreeList/hooks/useListScroll/types.js +1 -0
- package/components/InfiniteTreeList/hooks/useListScroll/useListScroll.d.ts +29 -0
- package/components/InfiniteTreeList/hooks/useListScroll/useListScroll.js +59 -0
- package/components/InfiniteTreeList/index.d.ts +1 -1
- package/components/InfiniteTreeList/public.d.ts +1 -1
- package/components/InfiniteTreeList/types.d.ts +83 -17
- package/components/InfiniteTreeList/useLogic/useLogic.d.ts +22 -12
- package/components/InfiniteTreeList/useLogic/useLogic.js +66 -71
- package/components/InfiniteTreeList/utils/checkHasSkeletonPlaceholders/checkHasSkeletonPlaceholders.d.ts +5 -0
- package/components/InfiniteTreeList/utils/checkHasSkeletonPlaceholders/checkHasSkeletonPlaceholders.js +6 -0
- package/components/InfiniteTreeList/utils/checkHasSkeletonPlaceholders/index.d.ts +1 -0
- package/components/InfiniteTreeList/utils/checkHasSkeletonPlaceholders/index.js +1 -0
- package/components/InfiniteTreeList/utils/checkIsChildrenPlaceholder/checkIsChildrenPlaceholder.d.ts +5 -0
- package/components/InfiniteTreeList/utils/checkIsChildrenPlaceholder/checkIsChildrenPlaceholder.js +4 -0
- package/components/InfiniteTreeList/utils/checkIsChildrenPlaceholder/index.d.ts +1 -0
- package/components/InfiniteTreeList/utils/checkIsChildrenPlaceholder/index.js +1 -0
- package/components/InfiniteTreeList/utils/checkIsChildrenPlaceholderOf/checkIsChildrenPlaceholderOf.d.ts +5 -0
- package/components/InfiniteTreeList/utils/checkIsChildrenPlaceholderOf/checkIsChildrenPlaceholderOf.js +5 -0
- package/components/InfiniteTreeList/utils/checkIsChildrenPlaceholderOf/index.d.ts +1 -0
- package/components/InfiniteTreeList/utils/checkIsChildrenPlaceholderOf/index.js +1 -0
- package/components/InfiniteTreeList/utils/checkIsDirectChild/checkIsDirectChild.d.ts +6 -0
- package/components/InfiniteTreeList/utils/checkIsDirectChild/checkIsDirectChild.js +6 -0
- package/components/InfiniteTreeList/utils/checkIsDirectChild/index.d.ts +1 -0
- package/components/InfiniteTreeList/utils/checkIsDirectChild/index.js +1 -0
- package/components/InfiniteTreeList/utils/checkIsNoDataChildren/checkIsNoDataChildren.d.ts +12 -0
- package/components/InfiniteTreeList/utils/checkIsNoDataChildren/checkIsNoDataChildren.js +14 -0
- package/components/InfiniteTreeList/utils/checkIsNoDataChildren/index.d.ts +1 -0
- package/components/InfiniteTreeList/utils/checkIsNoDataChildren/index.js +1 -0
- package/components/InfiniteTreeList/utils/checkIsSameChildren/checkIsSameChildren.d.ts +5 -0
- package/components/InfiniteTreeList/utils/checkIsSameChildren/checkIsSameChildren.js +16 -0
- package/components/InfiniteTreeList/utils/checkIsSameChildren/index.d.ts +1 -0
- package/components/InfiniteTreeList/utils/checkIsSameChildren/index.js +1 -0
- package/components/InfiniteTreeList/utils/countDirectChildren/countDirectChildren.d.ts +5 -0
- package/components/InfiniteTreeList/utils/countDirectChildren/countDirectChildren.js +5 -0
- package/components/InfiniteTreeList/utils/countDirectChildren/index.d.ts +1 -0
- package/components/InfiniteTreeList/utils/countDirectChildren/index.js +1 -0
- package/components/InfiniteTreeList/utils/createParentSlots/createParentSlots.d.ts +24 -0
- package/components/InfiniteTreeList/utils/createParentSlots/createParentSlots.js +35 -0
- package/components/InfiniteTreeList/utils/createParentSlots/index.d.ts +1 -0
- package/components/InfiniteTreeList/utils/createParentSlots/index.js +1 -0
- package/components/InfiniteTreeList/utils/createTailRegistry/createTailRegistry.d.ts +21 -0
- package/components/InfiniteTreeList/utils/createTailRegistry/createTailRegistry.js +40 -0
- package/components/InfiniteTreeList/utils/createTailRegistry/index.d.ts +1 -0
- package/components/InfiniteTreeList/utils/createTailRegistry/index.js +1 -0
- package/components/InfiniteTreeList/utils/flattenChildren/flattenChildren.d.ts +5 -0
- package/components/InfiniteTreeList/utils/flattenChildren/flattenChildren.js +5 -0
- package/components/InfiniteTreeList/utils/flattenChildren/index.d.ts +1 -0
- package/components/InfiniteTreeList/utils/flattenChildren/index.js +1 -0
- package/components/InfiniteTreeList/utils/flattenTree/flattenTree.d.ts +6 -0
- package/components/InfiniteTreeList/{useLogic/utils → utils}/flattenTree/flattenTree.js +9 -4
- package/components/InfiniteTreeList/utils/getEnteringChildren/getEnteringChildren.d.ts +17 -0
- package/components/InfiniteTreeList/utils/getEnteringChildren/getEnteringChildren.js +14 -0
- package/components/InfiniteTreeList/utils/getEnteringChildren/index.d.ts +1 -0
- package/components/InfiniteTreeList/utils/getEnteringChildren/index.js +1 -0
- package/components/InfiniteTreeList/utils/getIdsToKeep/getIdsToKeep.d.ts +10 -0
- package/components/InfiniteTreeList/utils/getIdsToKeep/getIdsToKeep.js +27 -0
- package/components/InfiniteTreeList/utils/getIdsToKeep/index.d.ts +1 -0
- package/components/InfiniteTreeList/utils/getIdsToKeep/index.js +1 -0
- package/components/InfiniteTreeList/{useLogic/utils → utils}/getInitialExpandedIds/getInitialExpandedIds.d.ts +4 -2
- package/components/InfiniteTreeList/{useLogic/utils → utils}/getInitialExpandedIds/getInitialExpandedIds.js +5 -4
- package/components/InfiniteTreeList/utils/getNestedItems/getNestedItems.d.ts +6 -0
- package/components/InfiniteTreeList/utils/getNestedItems/getNestedItems.js +18 -0
- package/components/InfiniteTreeList/utils/getNestedItems/index.d.ts +1 -0
- package/components/InfiniteTreeList/utils/getNestedItems/index.js +1 -0
- package/components/InfiniteTreeList/utils/index.d.ts +20 -0
- package/components/InfiniteTreeList/utils/index.js +20 -0
- package/components/InfiniteTreeList/utils/insertChildren/index.d.ts +1 -0
- package/components/InfiniteTreeList/utils/insertChildren/index.js +1 -0
- package/components/InfiniteTreeList/utils/insertChildren/insertChildren.d.ts +5 -0
- package/components/InfiniteTreeList/utils/insertChildren/insertChildren.js +41 -0
- package/components/InfiniteTreeList/utils/removeChildren/index.d.ts +1 -0
- package/components/InfiniteTreeList/utils/removeChildren/index.js +1 -0
- package/components/InfiniteTreeList/utils/removeChildren/removeChildren.d.ts +5 -0
- package/components/InfiniteTreeList/utils/removeChildren/removeChildren.js +12 -0
- package/components/InfiniteTreeList/utils/sortCollapsed/sortCollapsed.d.ts +5 -0
- package/components/InfiniteTreeList/{useLogic/utils → utils}/sortCollapsed/sortCollapsed.js +1 -6
- package/components/InfiniteTreeList/utils/startRemoveAnimation/index.d.ts +1 -0
- package/components/InfiniteTreeList/utils/startRemoveAnimation/index.js +1 -0
- package/components/InfiniteTreeList/utils/startRemoveAnimation/startRemoveAnimation.d.ts +1 -0
- package/components/InfiniteTreeList/utils/startRemoveAnimation/startRemoveAnimation.js +5 -0
- package/components/InfiniteTreeList/utils/syncChildrenPlaceholders/index.d.ts +1 -0
- package/components/InfiniteTreeList/utils/syncChildrenPlaceholders/index.js +1 -0
- package/components/InfiniteTreeList/utils/syncChildrenPlaceholders/syncChildrenPlaceholders.d.ts +11 -0
- package/components/InfiniteTreeList/utils/syncChildrenPlaceholders/syncChildrenPlaceholders.js +99 -0
- package/components/InputGroup/styles.js +8 -5
- package/components/JsonViewer/JsonNode/styles.js +5 -2
- package/components/Link/styles.js +11 -6
- package/components/ListItem/styles.js +5 -2
- package/components/MenuOrganization/OrganizationButton/styles.js +5 -6
- package/components/NavMenu/Item/ItemButton/styles.js +14 -7
- package/components/NewStepper/Step/styles.js +18 -15
- package/components/Notification/NotificationStackContainer/styles.js +5 -2
- package/components/PageAsideNavigation/PageAsideNavigationItem/styles.js +5 -6
- package/components/PageHeader/MobilePageActions/styles.js +0 -4
- package/components/Radio/styles.js +7 -4
- package/components/RadioCard/styles.js +5 -2
- package/components/StaticCalendar/StaticCalendarGridButton/styles.js +8 -5
- package/components/Tabs/Tab/styles.js +5 -2
- package/components/ToggleButton/styles.js +25 -10
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/styles.js +3 -3
- package/components/Tree/TreeItem/styles.js +23 -10
- package/components/constants/index.d.ts +1 -0
- package/components/constants/index.js +1 -0
- package/components/constants/media.d.ts +8 -0
- package/components/constants/media.js +8 -0
- package/components/theme/components/MuiButton.js +46 -23
- package/components/theme/components/MuiListItemButton.js +10 -2
- package/components/theme/components/MuiMenuItem.js +5 -2
- package/components/theme/components/MuiOutlinedInput.js +15 -12
- package/components/theme/components/MuiSwitch.js +14 -9
- package/components/theme/components/MuiTableRow.js +11 -3
- package/node/components/Alert/styles.js +24 -14
- package/node/components/Autocomplete/styles.js +8 -5
- package/node/components/Breadcrumbs/styles.js +18 -13
- package/node/components/CheckableTag/styles.js +6 -3
- package/node/components/Checkbox/styles.js +26 -23
- package/node/components/Chip/styles.js +36 -31
- package/node/components/CodeField/styles.js +5 -2
- package/node/components/CopyTypography/styles.js +22 -8
- package/node/components/DashboardLayout/Header/styles.js +35 -32
- package/node/components/DashboardSidebarPopover/SidebarPopoverItem/styles.js +7 -4
- package/node/components/DataGrid/Row/styles.js +41 -46
- package/node/components/DataGrid/RowBase/styles.js +16 -23
- package/node/components/DataGridCollapsibleRow/styles.js +11 -8
- package/node/components/Description/Value/styles.js +5 -2
- package/node/components/ExpansionPanel/Summary/styles.js +5 -2
- package/node/components/Fab/styles.js +12 -3
- package/node/components/InfiniteDataList/styles.js +7 -4
- package/node/components/InfiniteTreeList/InfiniteTreeList.d.ts +18 -0
- package/node/components/InfiniteTreeList/InfiniteTreeList.js +24 -17
- package/node/components/InfiniteTreeList/InfiniteTreeListActions/InfiniteTreeListActions.d.ts +9 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListActions/InfiniteTreeListActions.js +9 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListActions/types.d.ts +5 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListActions/useLogic/useLogic.js +5 -6
- package/node/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContext.d.ts +81 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContext.js +21 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContextProvider/InfiniteTreeListContextProvider.d.ts +3 -2
- package/node/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContextProvider/InfiniteTreeListContextProvider.js +69 -13
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/ErrorPlaceholder.d.ts +6 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/ErrorPlaceholder.js +12 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/constants.d.ts +1 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/constants.js +4 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/index.js +5 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/styles.js +11 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/InfiniteTreeListItem.js +28 -6
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/TreeListItemContext/TreeListItemContext.d.ts +19 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/TreeListItemContext/TreeListItemContext.js +4 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/TreeListItemContext/TreeListItemContextProvider/TreeListItemContextProvider.d.ts +4 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/TreeListItemContext/TreeListItemContextProvider/TreeListItemContextProvider.js +13 -8
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/constants.d.ts +6 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/constants.js +10 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/styles.d.ts +4 -4
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/styles.js +33 -7
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/types.d.ts +20 -3
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/useLogic/useLogic.d.ts +7 -1
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/useLogic/useLogic.js +56 -4
- package/node/components/InfiniteTreeList/{EndData → ListFooter/EndData}/EndData.js +1 -1
- package/node/components/InfiniteTreeList/{ErrorMessage → ListFooter/ErrorMessage}/ErrorMessage.js +2 -2
- package/node/components/InfiniteTreeList/ListFooter/ErrorMessage/styles.d.ts +5 -0
- package/node/components/InfiniteTreeList/{ErrorMessage → ListFooter/ErrorMessage}/styles.js +1 -1
- package/node/components/InfiniteTreeList/ListFooter/ListFooter.d.ts +10 -0
- package/node/components/InfiniteTreeList/ListFooter/ListFooter.js +29 -0
- package/node/components/InfiniteTreeList/ListFooter/index.d.ts +2 -0
- package/node/components/InfiniteTreeList/ListFooter/index.js +17 -0
- package/node/components/InfiniteTreeList/{styles.js → ListFooter/styles.js} +1 -1
- package/node/components/InfiniteTreeList/ListFooter/types.d.ts +22 -0
- package/node/components/InfiniteTreeList/ListFooter/types.js +2 -0
- package/node/components/InfiniteTreeList/OnTopButton/OnTopButton.d.ts +8 -2
- package/node/components/InfiniteTreeList/OnTopButton/OnTopButton.js +6 -5
- package/node/components/InfiniteTreeList/OnTopButton/styles.d.ts +4 -0
- package/node/components/InfiniteTreeList/OnTopButton/styles.js +13 -0
- package/node/components/InfiniteTreeList/ParentItems/Item/CustomParentWrapper/CustomParentWrapper.d.ts +23 -0
- package/node/components/InfiniteTreeList/ParentItems/Item/CustomParentWrapper/CustomParentWrapper.js +15 -0
- package/node/components/InfiniteTreeList/ParentItems/Item/CustomParentWrapper/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/ParentItems/Item/CustomParentWrapper/index.js +17 -0
- package/node/components/InfiniteTreeList/ParentItems/Item/Item.d.ts +10 -0
- package/node/components/InfiniteTreeList/ParentItems/Item/Item.js +25 -0
- package/node/components/InfiniteTreeList/ParentItems/Item/index.d.ts +2 -0
- package/node/components/InfiniteTreeList/ParentItems/Item/index.js +18 -0
- package/node/components/InfiniteTreeList/ParentItems/Item/types.d.ts +8 -0
- package/node/components/InfiniteTreeList/ParentItems/Item/types.js +2 -0
- package/node/components/InfiniteTreeList/ParentItems/Item/useLogic/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/ParentItems/Item/useLogic/index.js +17 -0
- package/node/components/InfiniteTreeList/ParentItems/Item/useLogic/useLogic.d.ts +12 -0
- package/node/components/InfiniteTreeList/ParentItems/Item/useLogic/useLogic.js +16 -0
- package/node/components/InfiniteTreeList/ParentItems/ParentItems.d.ts +11 -0
- package/node/components/InfiniteTreeList/ParentItems/ParentItems.js +15 -0
- package/node/components/InfiniteTreeList/ParentItems/index.d.ts +3 -0
- package/node/components/InfiniteTreeList/ParentItems/index.js +19 -0
- package/node/components/InfiniteTreeList/ParentItems/types.d.ts +8 -0
- package/node/components/InfiniteTreeList/ParentItems/types.js +2 -0
- package/node/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/ChildrenPlaceholder.d.ts +9 -0
- package/node/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/ChildrenPlaceholder.js +26 -0
- package/node/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/NoDataRow.d.ts +1 -0
- package/node/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/NoDataRow.js +9 -0
- package/node/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/index.js +17 -0
- package/node/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/index.js +17 -0
- package/node/components/InfiniteTreeList/TreeItem/CustomItemWrapper/CustomItemWrapper.d.ts +20 -0
- package/node/components/InfiniteTreeList/TreeItem/CustomItemWrapper/CustomItemWrapper.js +13 -0
- package/node/components/InfiniteTreeList/TreeItem/CustomItemWrapper/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/TreeItem/CustomItemWrapper/index.js +17 -0
- package/node/components/InfiniteTreeList/TreeItem/ParentSlot/ParentSlot.d.ts +5 -0
- package/node/components/InfiniteTreeList/TreeItem/ParentSlot/ParentSlot.js +42 -0
- package/node/components/InfiniteTreeList/TreeItem/ParentSlot/index.d.ts +2 -0
- package/node/components/InfiniteTreeList/TreeItem/ParentSlot/index.js +18 -0
- package/node/components/InfiniteTreeList/TreeItem/ParentSlot/styles.d.ts +9 -0
- package/node/components/InfiniteTreeList/TreeItem/ParentSlot/styles.js +11 -0
- package/node/components/InfiniteTreeList/TreeItem/ParentSlot/types.d.ts +6 -0
- package/node/components/InfiniteTreeList/TreeItem/ParentSlot/types.js +2 -0
- package/node/components/InfiniteTreeList/TreeItem/TreeItem.d.ts +5 -2
- package/node/components/InfiniteTreeList/TreeItem/TreeItem.js +31 -4
- package/node/components/InfiniteTreeList/TreeItem/constants.d.ts +3 -0
- package/node/components/InfiniteTreeList/TreeItem/constants.js +3 -1
- package/node/components/InfiniteTreeList/TreeItem/styles.d.ts +0 -3
- package/node/components/InfiniteTreeList/TreeItem/styles.js +23 -8
- package/node/components/InfiniteTreeList/TreeItem/types.d.ts +4 -9
- package/node/components/InfiniteTreeList/TreeItem/useLogic/useLogic.d.ts +29 -9
- package/node/components/InfiniteTreeList/TreeItem/useLogic/useLogic.js +60 -18
- package/node/components/InfiniteTreeList/constants.d.ts +14 -2
- package/node/components/InfiniteTreeList/constants.js +15 -3
- package/node/components/InfiniteTreeList/hooks/index.d.ts +5 -0
- package/node/components/InfiniteTreeList/hooks/index.js +21 -0
- package/node/components/InfiniteTreeList/hooks/useChildrenState/index.d.ts +2 -0
- package/node/components/InfiniteTreeList/hooks/useChildrenState/index.js +18 -0
- package/node/components/InfiniteTreeList/hooks/useChildrenState/types.d.ts +43 -0
- package/node/components/InfiniteTreeList/hooks/useChildrenState/types.js +2 -0
- package/node/components/InfiniteTreeList/hooks/useChildrenState/useChildrenState.d.ts +20 -0
- package/node/components/InfiniteTreeList/hooks/useChildrenState/useChildrenState.js +119 -0
- package/node/components/InfiniteTreeList/hooks/useEnterAnimation/index.d.ts +2 -0
- package/node/components/InfiniteTreeList/hooks/useEnterAnimation/index.js +18 -0
- package/node/components/InfiniteTreeList/hooks/useEnterAnimation/types.d.ts +29 -0
- package/node/components/InfiniteTreeList/hooks/useEnterAnimation/types.js +2 -0
- package/node/components/InfiniteTreeList/hooks/useEnterAnimation/useEnterAnimation.d.ts +6 -0
- package/node/components/InfiniteTreeList/hooks/useEnterAnimation/useEnterAnimation.js +39 -0
- package/node/components/InfiniteTreeList/hooks/useExpandNotifier/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/hooks/useExpandNotifier/index.js +17 -0
- package/node/components/InfiniteTreeList/hooks/useExpandNotifier/useExpandNotifier.d.ts +8 -0
- package/node/components/InfiniteTreeList/hooks/useExpandNotifier/useExpandNotifier.js +23 -0
- package/node/components/InfiniteTreeList/hooks/useFlatTree/index.d.ts +2 -0
- package/node/components/InfiniteTreeList/hooks/useFlatTree/index.js +18 -0
- package/node/components/InfiniteTreeList/hooks/useFlatTree/types.d.ts +20 -0
- package/node/components/InfiniteTreeList/hooks/useFlatTree/types.js +2 -0
- package/node/components/InfiniteTreeList/hooks/useFlatTree/useFlatTree.d.ts +15 -0
- package/node/components/InfiniteTreeList/hooks/useFlatTree/useFlatTree.js +92 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/index.d.ts +2 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/index.js +18 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/types.d.ts +25 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/types.js +2 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/useListScroll.d.ts +29 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/useListScroll.js +63 -0
- package/node/components/InfiniteTreeList/index.d.ts +1 -1
- package/node/components/InfiniteTreeList/public.d.ts +1 -1
- package/node/components/InfiniteTreeList/types.d.ts +83 -17
- package/node/components/InfiniteTreeList/useLogic/useLogic.d.ts +22 -12
- package/node/components/InfiniteTreeList/useLogic/useLogic.js +64 -69
- package/node/components/InfiniteTreeList/utils/checkHasSkeletonPlaceholders/checkHasSkeletonPlaceholders.d.ts +5 -0
- package/node/components/InfiniteTreeList/utils/checkHasSkeletonPlaceholders/checkHasSkeletonPlaceholders.js +10 -0
- package/node/components/InfiniteTreeList/utils/checkHasSkeletonPlaceholders/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/utils/checkHasSkeletonPlaceholders/index.js +17 -0
- package/node/components/InfiniteTreeList/utils/checkIsChildrenPlaceholder/checkIsChildrenPlaceholder.d.ts +5 -0
- package/node/components/InfiniteTreeList/utils/checkIsChildrenPlaceholder/checkIsChildrenPlaceholder.js +8 -0
- package/node/components/InfiniteTreeList/utils/checkIsChildrenPlaceholder/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/utils/checkIsChildrenPlaceholder/index.js +17 -0
- package/node/components/InfiniteTreeList/utils/checkIsChildrenPlaceholderOf/checkIsChildrenPlaceholderOf.d.ts +5 -0
- package/node/components/InfiniteTreeList/utils/checkIsChildrenPlaceholderOf/checkIsChildrenPlaceholderOf.js +9 -0
- package/node/components/InfiniteTreeList/utils/checkIsChildrenPlaceholderOf/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/utils/checkIsChildrenPlaceholderOf/index.js +17 -0
- package/node/components/InfiniteTreeList/utils/checkIsDirectChild/checkIsDirectChild.d.ts +6 -0
- package/node/components/InfiniteTreeList/utils/checkIsDirectChild/checkIsDirectChild.js +10 -0
- package/node/components/InfiniteTreeList/utils/checkIsDirectChild/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/utils/checkIsDirectChild/index.js +17 -0
- package/node/components/InfiniteTreeList/utils/checkIsNoDataChildren/checkIsNoDataChildren.d.ts +12 -0
- package/node/components/InfiniteTreeList/utils/checkIsNoDataChildren/checkIsNoDataChildren.js +18 -0
- package/node/components/InfiniteTreeList/utils/checkIsNoDataChildren/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/utils/checkIsNoDataChildren/index.js +17 -0
- package/node/components/InfiniteTreeList/utils/checkIsSameChildren/checkIsSameChildren.d.ts +5 -0
- package/node/components/InfiniteTreeList/utils/checkIsSameChildren/checkIsSameChildren.js +20 -0
- package/node/components/InfiniteTreeList/utils/checkIsSameChildren/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/utils/checkIsSameChildren/index.js +17 -0
- package/node/components/InfiniteTreeList/utils/countDirectChildren/countDirectChildren.d.ts +5 -0
- package/node/components/InfiniteTreeList/utils/countDirectChildren/countDirectChildren.js +9 -0
- package/node/components/InfiniteTreeList/utils/countDirectChildren/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/utils/countDirectChildren/index.js +17 -0
- package/node/components/InfiniteTreeList/utils/createParentSlots/createParentSlots.d.ts +24 -0
- package/node/components/InfiniteTreeList/utils/createParentSlots/createParentSlots.js +39 -0
- package/node/components/InfiniteTreeList/utils/createParentSlots/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/utils/createParentSlots/index.js +17 -0
- package/node/components/InfiniteTreeList/utils/createTailRegistry/createTailRegistry.d.ts +21 -0
- package/node/components/InfiniteTreeList/utils/createTailRegistry/createTailRegistry.js +44 -0
- package/node/components/InfiniteTreeList/utils/createTailRegistry/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/utils/createTailRegistry/index.js +5 -0
- package/node/components/InfiniteTreeList/utils/flattenChildren/flattenChildren.d.ts +5 -0
- package/node/components/InfiniteTreeList/utils/flattenChildren/flattenChildren.js +9 -0
- package/node/components/InfiniteTreeList/utils/flattenChildren/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/utils/flattenChildren/index.js +17 -0
- package/node/components/InfiniteTreeList/utils/flattenTree/flattenTree.d.ts +6 -0
- package/node/components/InfiniteTreeList/{useLogic/utils → utils}/flattenTree/flattenTree.js +9 -4
- package/node/components/InfiniteTreeList/utils/getEnteringChildren/getEnteringChildren.d.ts +17 -0
- package/node/components/InfiniteTreeList/utils/getEnteringChildren/getEnteringChildren.js +18 -0
- package/node/components/InfiniteTreeList/utils/getEnteringChildren/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/utils/getEnteringChildren/index.js +17 -0
- package/node/components/InfiniteTreeList/utils/getIdsToKeep/getIdsToKeep.d.ts +10 -0
- package/node/components/InfiniteTreeList/utils/getIdsToKeep/getIdsToKeep.js +31 -0
- package/node/components/InfiniteTreeList/utils/getIdsToKeep/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/utils/getIdsToKeep/index.js +17 -0
- package/node/components/InfiniteTreeList/{useLogic/utils → utils}/getInitialExpandedIds/getInitialExpandedIds.d.ts +4 -2
- package/node/components/InfiniteTreeList/{useLogic/utils → utils}/getInitialExpandedIds/getInitialExpandedIds.js +5 -4
- package/node/components/InfiniteTreeList/utils/getNestedItems/getNestedItems.d.ts +6 -0
- package/node/components/InfiniteTreeList/utils/getNestedItems/getNestedItems.js +22 -0
- package/node/components/InfiniteTreeList/utils/getNestedItems/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/{useLogic/utils/getDescendants → utils/getNestedItems}/index.js +1 -1
- package/node/components/InfiniteTreeList/utils/index.d.ts +20 -0
- package/node/components/InfiniteTreeList/utils/index.js +36 -0
- package/node/components/InfiniteTreeList/utils/insertChildren/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/utils/insertChildren/index.js +17 -0
- package/node/components/InfiniteTreeList/utils/insertChildren/insertChildren.d.ts +5 -0
- package/node/components/InfiniteTreeList/utils/insertChildren/insertChildren.js +45 -0
- package/node/components/InfiniteTreeList/utils/removeChildren/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/utils/removeChildren/index.js +17 -0
- package/node/components/InfiniteTreeList/utils/removeChildren/removeChildren.d.ts +5 -0
- package/node/components/InfiniteTreeList/utils/removeChildren/removeChildren.js +16 -0
- package/node/components/InfiniteTreeList/utils/sortCollapsed/sortCollapsed.d.ts +5 -0
- package/node/components/InfiniteTreeList/{useLogic/utils → utils}/sortCollapsed/sortCollapsed.js +1 -6
- package/node/components/InfiniteTreeList/utils/startRemoveAnimation/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/utils/startRemoveAnimation/index.js +17 -0
- package/node/components/InfiniteTreeList/utils/startRemoveAnimation/startRemoveAnimation.d.ts +1 -0
- package/node/components/InfiniteTreeList/utils/startRemoveAnimation/startRemoveAnimation.js +9 -0
- package/node/components/InfiniteTreeList/utils/syncChildrenPlaceholders/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/utils/syncChildrenPlaceholders/index.js +17 -0
- package/node/components/InfiniteTreeList/utils/syncChildrenPlaceholders/syncChildrenPlaceholders.d.ts +11 -0
- package/node/components/InfiniteTreeList/utils/syncChildrenPlaceholders/syncChildrenPlaceholders.js +104 -0
- package/node/components/InputGroup/styles.js +8 -5
- package/node/components/JsonViewer/JsonNode/styles.js +5 -2
- package/node/components/Link/styles.js +13 -8
- package/node/components/ListItem/styles.js +10 -7
- package/node/components/MenuOrganization/OrganizationButton/styles.js +5 -6
- package/node/components/NavMenu/Item/ItemButton/styles.js +16 -9
- package/node/components/NewStepper/Step/styles.js +68 -65
- package/node/components/Notification/NotificationStackContainer/styles.js +57 -54
- package/node/components/PageAsideNavigation/PageAsideNavigationItem/styles.js +12 -13
- package/node/components/PageHeader/MobilePageActions/styles.js +0 -4
- package/node/components/Radio/styles.js +20 -17
- package/node/components/RadioCard/styles.js +7 -4
- package/node/components/StaticCalendar/StaticCalendarGridButton/styles.js +8 -5
- package/node/components/Tabs/Tab/styles.js +5 -2
- package/node/components/ToggleButton/styles.js +27 -12
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/styles.js +3 -3
- package/node/components/Tree/TreeItem/styles.js +44 -31
- package/node/components/constants/index.d.ts +1 -0
- package/node/components/constants/index.js +1 -0
- package/node/components/constants/media.d.ts +8 -0
- package/node/components/constants/media.js +11 -0
- package/node/components/theme/components/MuiButton.js +46 -23
- package/node/components/theme/components/MuiListItemButton.js +10 -2
- package/node/components/theme/components/MuiMenuItem.js +5 -2
- package/node/components/theme/components/MuiOutlinedInput.js +15 -12
- package/node/components/theme/components/MuiSwitch.js +14 -9
- package/node/components/theme/components/MuiTableRow.js +11 -3
- package/package.json +1 -1
- package/components/InfiniteTreeList/useLogic/utils/flattenTree/flattenTree.d.ts +0 -5
- package/components/InfiniteTreeList/useLogic/utils/getDescendants/getDescendants.d.ts +0 -10
- package/components/InfiniteTreeList/useLogic/utils/getDescendants/getDescendants.js +0 -22
- package/components/InfiniteTreeList/useLogic/utils/getDescendants/index.d.ts +0 -1
- package/components/InfiniteTreeList/useLogic/utils/getDescendants/index.js +0 -1
- package/components/InfiniteTreeList/useLogic/utils/index.d.ts +0 -4
- package/components/InfiniteTreeList/useLogic/utils/index.js +0 -4
- package/components/InfiniteTreeList/useLogic/utils/sortCollapsed/sortCollapsed.d.ts +0 -10
- package/node/components/InfiniteTreeList/useLogic/utils/flattenTree/flattenTree.d.ts +0 -5
- package/node/components/InfiniteTreeList/useLogic/utils/getDescendants/getDescendants.d.ts +0 -10
- package/node/components/InfiniteTreeList/useLogic/utils/getDescendants/getDescendants.js +0 -26
- package/node/components/InfiniteTreeList/useLogic/utils/getDescendants/index.d.ts +0 -1
- package/node/components/InfiniteTreeList/useLogic/utils/index.d.ts +0 -4
- package/node/components/InfiniteTreeList/useLogic/utils/index.js +0 -20
- package/node/components/InfiniteTreeList/useLogic/utils/sortCollapsed/sortCollapsed.d.ts +0 -10
- /package/components/InfiniteTreeList/{EndData → ListFooter/EndData}/EndData.d.ts +0 -0
- /package/components/InfiniteTreeList/{EndData → ListFooter/EndData}/constants.d.ts +0 -0
- /package/components/InfiniteTreeList/{EndData → ListFooter/EndData}/constants.js +0 -0
- /package/components/InfiniteTreeList/{EndData → ListFooter/EndData}/index.d.ts +0 -0
- /package/components/InfiniteTreeList/{EndData → ListFooter/EndData}/index.js +0 -0
- /package/components/InfiniteTreeList/{ErrorMessage → ListFooter/ErrorMessage}/ErrorMessage.d.ts +0 -0
- /package/components/InfiniteTreeList/{ErrorMessage → ListFooter/ErrorMessage}/constants.d.ts +0 -0
- /package/components/InfiniteTreeList/{ErrorMessage → ListFooter/ErrorMessage}/constants.js +0 -0
- /package/components/InfiniteTreeList/{ErrorMessage → ListFooter/ErrorMessage}/index.d.ts +0 -0
- /package/components/InfiniteTreeList/{ErrorMessage → ListFooter/ErrorMessage}/index.js +0 -0
- /package/components/InfiniteTreeList/{useLogic/utils → utils}/flattenTree/index.d.ts +0 -0
- /package/components/InfiniteTreeList/{useLogic/utils → utils}/flattenTree/index.js +0 -0
- /package/components/InfiniteTreeList/{useLogic/utils → utils}/getInitialExpandedIds/index.d.ts +0 -0
- /package/components/InfiniteTreeList/{useLogic/utils → utils}/getInitialExpandedIds/index.js +0 -0
- /package/components/InfiniteTreeList/{useLogic/utils → utils}/sortCollapsed/index.d.ts +0 -0
- /package/components/InfiniteTreeList/{useLogic/utils → utils}/sortCollapsed/index.js +0 -0
- /package/node/components/InfiniteTreeList/{ErrorMessage → InfiniteTreeListItem/ErrorPlaceholder}/styles.d.ts +0 -0
- /package/node/components/InfiniteTreeList/{EndData → ListFooter/EndData}/EndData.d.ts +0 -0
- /package/node/components/InfiniteTreeList/{EndData → ListFooter/EndData}/constants.d.ts +0 -0
- /package/node/components/InfiniteTreeList/{EndData → ListFooter/EndData}/constants.js +0 -0
- /package/node/components/InfiniteTreeList/{EndData → ListFooter/EndData}/index.d.ts +0 -0
- /package/node/components/InfiniteTreeList/{EndData → ListFooter/EndData}/index.js +0 -0
- /package/node/components/InfiniteTreeList/{ErrorMessage → ListFooter/ErrorMessage}/ErrorMessage.d.ts +0 -0
- /package/node/components/InfiniteTreeList/{ErrorMessage → ListFooter/ErrorMessage}/constants.d.ts +0 -0
- /package/node/components/InfiniteTreeList/{ErrorMessage → ListFooter/ErrorMessage}/constants.js +0 -0
- /package/node/components/InfiniteTreeList/{ErrorMessage → ListFooter/ErrorMessage}/index.d.ts +0 -0
- /package/node/components/InfiniteTreeList/{ErrorMessage → ListFooter/ErrorMessage}/index.js +0 -0
- /package/node/components/InfiniteTreeList/{styles.d.ts → ListFooter/styles.d.ts} +0 -0
- /package/node/components/InfiniteTreeList/{useLogic/utils → utils}/flattenTree/index.d.ts +0 -0
- /package/node/components/InfiniteTreeList/{useLogic/utils → utils}/flattenTree/index.js +0 -0
- /package/node/components/InfiniteTreeList/{useLogic/utils → utils}/getInitialExpandedIds/index.d.ts +0 -0
- /package/node/components/InfiniteTreeList/{useLogic/utils → utils}/getInitialExpandedIds/index.js +0 -0
- /package/node/components/InfiniteTreeList/{useLogic/utils → utils}/sortCollapsed/index.d.ts +0 -0
- /package/node/components/InfiniteTreeList/{useLogic/utils → utils}/sortCollapsed/index.js +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { NodePagination } from '../../InfiniteTreeListContext';
|
|
2
|
+
import type { FlattenTree, InfiniteTreeChildrenPagination, InfiniteTreeListData } from '../../types';
|
|
3
|
+
import type { UseChildrenStateParams } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Сводит данные дочерних элементов раскрытых узлов в плоский список:
|
|
6
|
+
* вставляет их, ставит заглушки ветки, собирает пагинацию узлов и метит новые
|
|
7
|
+
* строки для enter-анимации. Дочерние элементы отдаёт строка узла
|
|
8
|
+
* (`childItems`, `isLoading`, `isError`), не props списка.
|
|
9
|
+
*
|
|
10
|
+
* Дочерние элементы смонтированными хук не держит — их строки живут
|
|
11
|
+
* по правилам виртуализации. Строки узлов с подгружаемыми дочерними
|
|
12
|
+
* элементами, наоборот, монтируются один раз и живут, пока жив список:
|
|
13
|
+
* их состояние не должно умирать ни от ухода строки со скролла,
|
|
14
|
+
* ни от сворачивания ветки
|
|
15
|
+
*/
|
|
16
|
+
export declare const useChildrenState: <TData extends InfiniteTreeListData<TData>>({ items, flatList, flatListRef, expandedIds, expandedIdsRef, enterAnimation, insertChildren, syncChildrenPlaceholders, skeletonCount, releaseParentSlot, }: UseChildrenStateParams<TData>) => {
|
|
17
|
+
registerChildren: (itemId: string, childrenState: InfiniteTreeChildrenPagination) => void;
|
|
18
|
+
nodePaginationMap: Record<string, NodePagination>;
|
|
19
|
+
parentItems: FlattenTree<TData>[];
|
|
20
|
+
};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useChildrenState = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const utils_1 = require("../../utils");
|
|
6
|
+
/**
|
|
7
|
+
* Сводит данные дочерних элементов раскрытых узлов в плоский список:
|
|
8
|
+
* вставляет их, ставит заглушки ветки, собирает пагинацию узлов и метит новые
|
|
9
|
+
* строки для enter-анимации. Дочерние элементы отдаёт строка узла
|
|
10
|
+
* (`childItems`, `isLoading`, `isError`), не props списка.
|
|
11
|
+
*
|
|
12
|
+
* Дочерние элементы смонтированными хук не держит — их строки живут
|
|
13
|
+
* по правилам виртуализации. Строки узлов с подгружаемыми дочерними
|
|
14
|
+
* элементами, наоборот, монтируются один раз и живут, пока жив список:
|
|
15
|
+
* их состояние не должно умирать ни от ухода строки со скролла,
|
|
16
|
+
* ни от сворачивания ветки
|
|
17
|
+
*/
|
|
18
|
+
const useChildrenState = ({ items, flatList, flatListRef, expandedIds, expandedIdsRef, enterAnimation, insertChildren, syncChildrenPlaceholders, skeletonCount, releaseParentSlot, }) => {
|
|
19
|
+
const [childrenStateMap, setChildrenStateMap] = (0, react_1.useState)({});
|
|
20
|
+
const childrenStateMapRef = (0, react_1.useRef)(childrenStateMap);
|
|
21
|
+
// Синхронизация после коммита: запись в ref во время рендера — side effect,
|
|
22
|
+
// отброшенный рендер оставил бы в ref значение из дерева, которое
|
|
23
|
+
// не попало в коммит
|
|
24
|
+
(0, react_1.useEffect)(() => {
|
|
25
|
+
childrenStateMapRef.current = childrenStateMap;
|
|
26
|
+
});
|
|
27
|
+
const loadedOnceIdsRef = (0, react_1.useRef)(new Set());
|
|
28
|
+
const registerChildren = (0, react_1.useCallback)((itemId, childrenState) => {
|
|
29
|
+
const nextChildren = childrenState;
|
|
30
|
+
setChildrenStateMap((prev) => {
|
|
31
|
+
if ((0, utils_1.checkIsSameChildren)(prev[itemId], nextChildren)) {
|
|
32
|
+
return prev;
|
|
33
|
+
}
|
|
34
|
+
return { ...prev, [itemId]: nextChildren };
|
|
35
|
+
});
|
|
36
|
+
}, []);
|
|
37
|
+
const resolveNoData = (0, react_1.useCallback)((parentId, childrenState) => {
|
|
38
|
+
const hasLoadedOnce = loadedOnceIdsRef.current.has(parentId);
|
|
39
|
+
if (childrenState.isLoading) {
|
|
40
|
+
loadedOnceIdsRef.current.add(parentId);
|
|
41
|
+
}
|
|
42
|
+
return (0, utils_1.checkIsNoDataChildren)(childrenState, hasLoadedOnce);
|
|
43
|
+
}, []);
|
|
44
|
+
const syncChildren = (0, react_1.useCallback)((parentId, childrenState) => {
|
|
45
|
+
const existingDirectCount = (0, utils_1.countDirectChildren)(flatListRef.current, parentId);
|
|
46
|
+
const hasSkeletons = (0, utils_1.checkHasSkeletonPlaceholders)(flatListRef.current, parentId);
|
|
47
|
+
insertChildren(parentId, childrenState.data);
|
|
48
|
+
syncChildrenPlaceholders(parentId, Boolean(childrenState.isLoading), skeletonCount, childrenState.isError, resolveNoData(parentId, childrenState));
|
|
49
|
+
if (childrenState.isLoading) {
|
|
50
|
+
// Первая загрузка необходима для skeleton-элементов
|
|
51
|
+
const firstLoading = existingDirectCount === 0 && !hasSkeletons;
|
|
52
|
+
if (firstLoading) {
|
|
53
|
+
enterAnimation.schedule((0, utils_1.getChildrenPlaceholderIds)(parentId, skeletonCount));
|
|
54
|
+
}
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if (childrenState.isError ||
|
|
58
|
+
childrenState.data.length <= existingDirectCount) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
const { itemIds, startDelayIndex } = (0, utils_1.getEnteringChildren)(childrenState.data.map((item) => item.id), existingDirectCount, hasSkeletons ? skeletonCount : 0);
|
|
62
|
+
enterAnimation.schedule(itemIds, startDelayIndex);
|
|
63
|
+
}, [
|
|
64
|
+
enterAnimation,
|
|
65
|
+
flatListRef,
|
|
66
|
+
insertChildren,
|
|
67
|
+
resolveNoData,
|
|
68
|
+
skeletonCount,
|
|
69
|
+
syncChildrenPlaceholders,
|
|
70
|
+
]);
|
|
71
|
+
(0, react_1.useEffect)(() => {
|
|
72
|
+
Object.entries(childrenStateMap).forEach(([parentId, childrenState]) => {
|
|
73
|
+
if (expandedIdsRef.current.has(parentId)) {
|
|
74
|
+
syncChildren(parentId, childrenState);
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}, [childrenStateMap, expandedIds]);
|
|
78
|
+
const nodePaginationMap = (0, react_1.useMemo)(() => Object.entries(childrenStateMap).reduce((acc, [parentId, childrenState]) => {
|
|
79
|
+
acc[parentId] = {
|
|
80
|
+
lastChildId: childrenState.data[childrenState.data.length - 1]?.id,
|
|
81
|
+
isEndReached: childrenState.isEndReached,
|
|
82
|
+
isChildrenLoading: childrenState.isLoading,
|
|
83
|
+
isChildrenError: childrenState.isError,
|
|
84
|
+
};
|
|
85
|
+
return acc;
|
|
86
|
+
}, {}), [childrenStateMap]);
|
|
87
|
+
const parentItemsRef = (0, react_1.useRef)(new Map());
|
|
88
|
+
const parentItems = (0, react_1.useMemo)(() => {
|
|
89
|
+
flatList.forEach((item) => {
|
|
90
|
+
if (item.meta.isChildrenAsync) {
|
|
91
|
+
parentItemsRef.current.set(item.id, item);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
return [...parentItemsRef.current.values()];
|
|
95
|
+
}, [flatList]);
|
|
96
|
+
(0, react_1.useEffect)(() => {
|
|
97
|
+
const idsToKeep = (0, utils_1.getIdsToKeep)(items, childrenStateMapRef.current);
|
|
98
|
+
parentItemsRef.current.forEach((_, itemId) => {
|
|
99
|
+
if (!idsToKeep.has(itemId)) {
|
|
100
|
+
parentItemsRef.current.delete(itemId);
|
|
101
|
+
releaseParentSlot(itemId);
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
loadedOnceIdsRef.current.forEach((itemId) => {
|
|
105
|
+
if (!idsToKeep.has(itemId)) {
|
|
106
|
+
loadedOnceIdsRef.current.delete(itemId);
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
setChildrenStateMap((prev) => {
|
|
110
|
+
const entriesToKeep = Object.entries(prev).filter(([itemId]) => idsToKeep.has(itemId));
|
|
111
|
+
if (entriesToKeep.length === Object.keys(prev).length) {
|
|
112
|
+
return prev;
|
|
113
|
+
}
|
|
114
|
+
return Object.fromEntries(entriesToKeep);
|
|
115
|
+
});
|
|
116
|
+
}, [items, releaseParentSlot]);
|
|
117
|
+
return { registerChildren, nodePaginationMap, parentItems };
|
|
118
|
+
};
|
|
119
|
+
exports.useChildrenState = useChildrenState;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types"), exports);
|
|
18
|
+
__exportStar(require("./useEnterAnimation"), exports);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type EnterAnimationState = {
|
|
2
|
+
/**
|
|
3
|
+
* Строка должна появиться с enter-анимацией
|
|
4
|
+
*/
|
|
5
|
+
shouldAnimate: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Индекс каскадной задержки анимации
|
|
8
|
+
*/
|
|
9
|
+
delayIndex?: number;
|
|
10
|
+
};
|
|
11
|
+
export type EnterAnimationResult = {
|
|
12
|
+
/**
|
|
13
|
+
* Планирует появление элементов с enter-анимацией.
|
|
14
|
+
* Порядок id задаёт каскад, `startDelayIndex` сдвигает его начало
|
|
15
|
+
*/
|
|
16
|
+
schedule: (itemIds: string[], startDelayIndex?: number) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Возвращает состояние анимации, не изменяя метку. Безопасно для рендера
|
|
19
|
+
*/
|
|
20
|
+
read: (itemId: string) => EnterAnimationState;
|
|
21
|
+
/**
|
|
22
|
+
* Забирает метку элемента: повторный mount при скролле анимации не получит
|
|
23
|
+
*/
|
|
24
|
+
claim: (itemId: string) => void;
|
|
25
|
+
/**
|
|
26
|
+
* Сбрасывает все метки
|
|
27
|
+
*/
|
|
28
|
+
reset: () => void;
|
|
29
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useEnterAnimation = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
const NO_ANIMATION = { shouldAnimate: false };
|
|
7
|
+
/**
|
|
8
|
+
* Управляет enter-анимацией строк дерева: метка живёт до первого mount строки
|
|
9
|
+
* и потребляется им
|
|
10
|
+
*/
|
|
11
|
+
const useEnterAnimation = () => {
|
|
12
|
+
const delayIndexes = (0, react_1.useRef)(new Map());
|
|
13
|
+
const resetTimer = (0, react_1.useRef)(undefined);
|
|
14
|
+
const reset = (0, react_1.useCallback)(() => {
|
|
15
|
+
clearTimeout(resetTimer.current);
|
|
16
|
+
delayIndexes.current.clear();
|
|
17
|
+
}, []);
|
|
18
|
+
const schedule = (0, react_1.useCallback)((itemIds, startDelayIndex = 0) => {
|
|
19
|
+
if (!itemIds.length) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
itemIds.forEach((itemId, index) => delayIndexes.current.set(itemId, startDelayIndex + index));
|
|
23
|
+
clearTimeout(resetTimer.current);
|
|
24
|
+
resetTimer.current = setTimeout(reset, constants_1.ENTER_ANIMATION_MOUNT_WINDOW_MS);
|
|
25
|
+
}, [reset]);
|
|
26
|
+
const read = (0, react_1.useCallback)((itemId) => {
|
|
27
|
+
const delayIndex = delayIndexes.current.get(itemId);
|
|
28
|
+
if (delayIndex === undefined) {
|
|
29
|
+
return NO_ANIMATION;
|
|
30
|
+
}
|
|
31
|
+
return { shouldAnimate: true, delayIndex };
|
|
32
|
+
}, []);
|
|
33
|
+
const claim = (0, react_1.useCallback)((itemId) => {
|
|
34
|
+
delayIndexes.current.delete(itemId);
|
|
35
|
+
}, []);
|
|
36
|
+
(0, react_1.useEffect)(() => () => clearTimeout(resetTimer.current), []);
|
|
37
|
+
return (0, react_1.useMemo)(() => ({ schedule, read, claim, reset }), [schedule, read, claim, reset]);
|
|
38
|
+
};
|
|
39
|
+
exports.useEnterAnimation = useEnterAnimation;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useExpandNotifier';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./useExpandNotifier"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Блокирует повторные вызовы `onOpen`: узел сообщает о раскрытии один
|
|
3
|
+
* раз, пока ветка не свёрнута
|
|
4
|
+
*/
|
|
5
|
+
export declare const useExpandNotifier: () => {
|
|
6
|
+
notifyExpand: (itemId: string, onOpen?: () => void) => void;
|
|
7
|
+
resetExpandNotification: (itemIds: string[]) => void;
|
|
8
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useExpandNotifier = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
/**
|
|
6
|
+
* Блокирует повторные вызовы `onOpen`: узел сообщает о раскрытии один
|
|
7
|
+
* раз, пока ветка не свёрнута
|
|
8
|
+
*/
|
|
9
|
+
const useExpandNotifier = () => {
|
|
10
|
+
const notifiedIdsRef = (0, react_1.useRef)(new Set());
|
|
11
|
+
const notifyExpand = (0, react_1.useCallback)((itemId, onOpen) => {
|
|
12
|
+
if (notifiedIdsRef.current.has(itemId)) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
notifiedIdsRef.current.add(itemId);
|
|
16
|
+
onOpen?.();
|
|
17
|
+
}, []);
|
|
18
|
+
const resetExpandNotification = (0, react_1.useCallback)((itemIds) => {
|
|
19
|
+
itemIds.forEach((itemId) => notifiedIdsRef.current.delete(itemId));
|
|
20
|
+
}, []);
|
|
21
|
+
return { notifyExpand, resetExpandNotification };
|
|
22
|
+
};
|
|
23
|
+
exports.useExpandNotifier = useExpandNotifier;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types"), exports);
|
|
18
|
+
__exportStar(require("./useFlatTree"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { InfiniteTreeListData } from '../../types';
|
|
2
|
+
import type { EnterAnimationResult } from '../useEnterAnimation';
|
|
3
|
+
export type UseFlatTreeParams<TData extends InfiniteTreeListData<TData>> = {
|
|
4
|
+
/**
|
|
5
|
+
* Дерево элементов из props списка
|
|
6
|
+
*/
|
|
7
|
+
items: TData[];
|
|
8
|
+
/**
|
|
9
|
+
* Уровень раскрытия дерева по умолчанию
|
|
10
|
+
*/
|
|
11
|
+
initialExpandedLevel?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Контроллер enter-анимации: раскрытие узла помечает новые строки
|
|
14
|
+
*/
|
|
15
|
+
enterAnimation: EnterAnimationResult;
|
|
16
|
+
/**
|
|
17
|
+
* Вызывается со списком свёрнутых узлов после анимации закрытия ветки
|
|
18
|
+
*/
|
|
19
|
+
onCollapse: (itemIds: string[]) => void;
|
|
20
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { FlattenTree, InfiniteTreeListData } from '../../types';
|
|
3
|
+
import type { UseFlatTreeParams } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Управляет плоским списком строк и набором раскрытых узлов
|
|
6
|
+
*/
|
|
7
|
+
export declare const useFlatTree: <TData extends InfiniteTreeListData<TData>>({ items, initialExpandedLevel, enterAnimation, onCollapse, }: UseFlatTreeParams<TData>) => {
|
|
8
|
+
flatList: FlattenTree<TData>[];
|
|
9
|
+
flatListRef: import("react").RefObject<FlattenTree<TData>[]>;
|
|
10
|
+
expandedIds: Set<string>;
|
|
11
|
+
expandedIdsRef: import("react").RefObject<Set<string>>;
|
|
12
|
+
insertChildren: (parentId: string, childrenData: TData[]) => void;
|
|
13
|
+
syncChildrenPlaceholders: (parentId: string, isChildrenLoading: boolean, skeletonCount: number, isChildrenError?: boolean, isChildrenNoData?: boolean) => void;
|
|
14
|
+
onToggle: ({ id: itemId }: InfiniteTreeListData) => void;
|
|
15
|
+
};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useFlatTree = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const hooks_1 = require("../../../theme/hooks");
|
|
6
|
+
const useSet_1 = require("../../../useSet");
|
|
7
|
+
const utils_1 = require("../../utils");
|
|
8
|
+
/**
|
|
9
|
+
* Управляет плоским списком строк и набором раскрытых узлов
|
|
10
|
+
*/
|
|
11
|
+
const useFlatTree = ({ items, initialExpandedLevel, enterAnimation, onCollapse, }) => {
|
|
12
|
+
const theme = (0, hooks_1.useTheme)();
|
|
13
|
+
const [expandedIds, { add: addExpandedId, remove: removeExpandedId }] = (0, useSet_1.useSet)(new Set());
|
|
14
|
+
const [flatList, setFlatList] = (0, react_1.useState)(() => (0, utils_1.flattenTree)(items, new Set()));
|
|
15
|
+
const expandedIdsRef = (0, react_1.useRef)(expandedIds);
|
|
16
|
+
const flatListRef = (0, react_1.useRef)(flatList);
|
|
17
|
+
// Синхронизация после коммита: запись в ref во время рендера — side effect,
|
|
18
|
+
// отброшенный рендер оставил бы в ref значение из дерева, которое
|
|
19
|
+
// не попало в коммит.
|
|
20
|
+
// Эффект объявлен первым, поэтому эффекты ниже по списку хуков читают из ref
|
|
21
|
+
// актуальные значения
|
|
22
|
+
(0, react_1.useEffect)(() => {
|
|
23
|
+
expandedIdsRef.current = expandedIds;
|
|
24
|
+
flatListRef.current = flatList;
|
|
25
|
+
});
|
|
26
|
+
const collapseTimersRef = (0, react_1.useRef)([]);
|
|
27
|
+
(0, react_1.useEffect)(() => () => {
|
|
28
|
+
collapseTimersRef.current.forEach(clearTimeout);
|
|
29
|
+
}, []);
|
|
30
|
+
(0, react_1.useEffect)(() => {
|
|
31
|
+
const next = (0, utils_1.getInitialExpandedIds)(expandedIdsRef.current, items, initialExpandedLevel);
|
|
32
|
+
next.forEach(addExpandedId);
|
|
33
|
+
expandedIdsRef.current = next;
|
|
34
|
+
setFlatList((0, utils_1.flattenTree)(items, next));
|
|
35
|
+
}, [items]);
|
|
36
|
+
const insertChildren = (0, react_1.useCallback)((parentId, childrenData) => {
|
|
37
|
+
setFlatList((prev) => (0, utils_1.insertChildren)(prev, parentId, childrenData, expandedIdsRef.current));
|
|
38
|
+
}, []);
|
|
39
|
+
const syncChildrenPlaceholders = (0, react_1.useCallback)((parentId, isChildrenLoading, skeletonCount, isChildrenError, isChildrenNoData) => {
|
|
40
|
+
setFlatList((prev) => (0, utils_1.syncChildrenPlaceholders)(prev, parentId, isChildrenLoading, skeletonCount, isChildrenError, isChildrenNoData));
|
|
41
|
+
}, []);
|
|
42
|
+
const expandNode = (0, react_1.useCallback)((itemId) => {
|
|
43
|
+
const staticChildren = flatListRef.current.find((item) => item.id === itemId)?.children;
|
|
44
|
+
enterAnimation.schedule(staticChildren?.map((child) => child.id) ?? []);
|
|
45
|
+
addExpandedId(itemId);
|
|
46
|
+
expandedIdsRef.current = new Set(expandedIdsRef.current).add(itemId);
|
|
47
|
+
setFlatList((prev) => {
|
|
48
|
+
const withExpanded = prev.map((item) => item.id === itemId
|
|
49
|
+
? { ...item, meta: { ...item.meta, isExpanded: true } }
|
|
50
|
+
: item);
|
|
51
|
+
if (!staticChildren?.length) {
|
|
52
|
+
return withExpanded;
|
|
53
|
+
}
|
|
54
|
+
return (0, utils_1.insertChildren)(withExpanded, itemId, staticChildren, expandedIdsRef.current);
|
|
55
|
+
});
|
|
56
|
+
}, [addExpandedId, enterAnimation]);
|
|
57
|
+
const collapseNode = (0, react_1.useCallback)((itemId) => {
|
|
58
|
+
const nestedItems = (0, utils_1.sortCollapsed)((0, utils_1.getNestedItems)(flatListRef.current, itemId));
|
|
59
|
+
nestedItems.forEach(({ meta }) => (0, utils_1.startRemoveAnimation)(meta.nodeId));
|
|
60
|
+
// Ветка уходит из данных только после анимации закрытия
|
|
61
|
+
const timerId = setTimeout(() => {
|
|
62
|
+
collapseTimersRef.current = collapseTimersRef.current.filter((id) => id !== timerId);
|
|
63
|
+
const collapsedIds = [itemId, ...nestedItems.map(({ id }) => id)];
|
|
64
|
+
const nextExpanded = new Set(expandedIdsRef.current);
|
|
65
|
+
collapsedIds.forEach((collapsedId) => {
|
|
66
|
+
removeExpandedId(collapsedId);
|
|
67
|
+
nextExpanded.delete(collapsedId);
|
|
68
|
+
});
|
|
69
|
+
expandedIdsRef.current = nextExpanded;
|
|
70
|
+
onCollapse(collapsedIds);
|
|
71
|
+
setFlatList((prev) => (0, utils_1.removeChildren)(prev, itemId));
|
|
72
|
+
}, theme.transitions.duration.shorter);
|
|
73
|
+
collapseTimersRef.current.push(timerId);
|
|
74
|
+
}, [onCollapse, removeExpandedId, theme]);
|
|
75
|
+
const onToggle = (0, react_1.useCallback)(({ id: itemId }) => {
|
|
76
|
+
if (expandedIdsRef.current.has(itemId)) {
|
|
77
|
+
collapseNode(itemId);
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
expandNode(itemId);
|
|
81
|
+
}, [collapseNode, expandNode]);
|
|
82
|
+
return {
|
|
83
|
+
flatList,
|
|
84
|
+
flatListRef,
|
|
85
|
+
expandedIds,
|
|
86
|
+
expandedIdsRef,
|
|
87
|
+
insertChildren,
|
|
88
|
+
syncChildrenPlaceholders,
|
|
89
|
+
onToggle,
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
exports.useFlatTree = useFlatTree;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types"), exports);
|
|
18
|
+
__exportStar(require("./useListScroll"), exports);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
|
+
import type { FlattenTree, InfiniteTreeListData } from '../../types';
|
|
3
|
+
import type { EnterAnimationResult } from '../useEnterAnimation';
|
|
4
|
+
export type UseListScrollParams<TData extends InfiniteTreeListData<TData>> = {
|
|
5
|
+
/**
|
|
6
|
+
* Ref на контейнер, в котором должен быть скролл
|
|
7
|
+
*/
|
|
8
|
+
scrollRef: RefObject<HTMLElement | null>;
|
|
9
|
+
/**
|
|
10
|
+
* Флаг достижения конца списка
|
|
11
|
+
*/
|
|
12
|
+
isEndReached?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Обработчик подгрузки данных
|
|
15
|
+
*/
|
|
16
|
+
onLoadMore?: () => void;
|
|
17
|
+
/**
|
|
18
|
+
* Плоский список: реестр хвостов ищет в нём позицию строки
|
|
19
|
+
*/
|
|
20
|
+
flatListRef: RefObject<FlattenTree<TData>[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Контроллер enter-анимации: скролл снимает метки со строк
|
|
23
|
+
*/
|
|
24
|
+
enterAnimation: EnterAnimationResult;
|
|
25
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ListRange, VirtuosoHandle } from 'react-virtuoso';
|
|
3
|
+
import type { InfiniteTreeListData } from '../../types';
|
|
4
|
+
import { type TailRegistry } from '../../utils';
|
|
5
|
+
import type { UseListScrollParams } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* Скролл-обвязка списка: props для `Virtuoso`, кнопка «наверх» и реестр хвостов
|
|
8
|
+
* вложенных веток. Хвосты регистрируют сами строки, хук создаёт реестр и на
|
|
9
|
+
* смене видимого диапазона проверяет, попал ли хвост в кадр
|
|
10
|
+
*/
|
|
11
|
+
export declare const useListScroll: <TData extends InfiniteTreeListData<TData>>({ scrollRef, isEndReached, onLoadMore, flatListRef, enterAnimation, }: UseListScrollParams<TData>) => {
|
|
12
|
+
scrollParent: HTMLElement | null;
|
|
13
|
+
tailRegistry: TailRegistry;
|
|
14
|
+
isEndReachedWithScroll: boolean | undefined;
|
|
15
|
+
virtuosoProps: {
|
|
16
|
+
id: string;
|
|
17
|
+
ref: import("react").RefObject<VirtuosoHandle | null>;
|
|
18
|
+
overscan: number;
|
|
19
|
+
rangeChanged: (range: ListRange) => void;
|
|
20
|
+
endReached: () => void;
|
|
21
|
+
totalListHeightChanged: () => void;
|
|
22
|
+
isScrolling: (isScrolling: boolean) => void;
|
|
23
|
+
};
|
|
24
|
+
onTopButtonProps: {
|
|
25
|
+
buttonRef: import("react").RefObject<HTMLButtonElement | null>;
|
|
26
|
+
handleScrollToTop: () => void;
|
|
27
|
+
scrollRef: import("react").RefObject<HTMLElement | null>;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useListScroll = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const useScrollManagement_1 = require("../../../useScrollManagement");
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
const utils_1 = require("../../utils");
|
|
8
|
+
/**
|
|
9
|
+
* Скролл-обвязка списка: props для `Virtuoso`, кнопка «наверх» и реестр хвостов
|
|
10
|
+
* вложенных веток. Хвосты регистрируют сами строки, хук создаёт реестр и на
|
|
11
|
+
* смене видимого диапазона проверяет, попал ли хвост в кадр
|
|
12
|
+
*/
|
|
13
|
+
const useListScroll = ({ scrollRef, isEndReached, onLoadMore, flatListRef, enterAnimation, }) => {
|
|
14
|
+
const virtuosoRef = (0, react_1.useRef)(null);
|
|
15
|
+
const scrollToTopButtonRef = (0, react_1.useRef)(null);
|
|
16
|
+
const tailRegistryRef = (0, react_1.useRef)(null);
|
|
17
|
+
if (!tailRegistryRef.current) {
|
|
18
|
+
tailRegistryRef.current = (0, utils_1.createTailRegistry)();
|
|
19
|
+
}
|
|
20
|
+
const tailRegistry = tailRegistryRef.current;
|
|
21
|
+
const { scrollParent, recalculateVerticalScroll, handleEndReach, isEndReachedWithScroll, } = (0, useScrollManagement_1.useScrollManagement)({
|
|
22
|
+
scrollRef,
|
|
23
|
+
isEndReached,
|
|
24
|
+
onLoadMore,
|
|
25
|
+
virtuosoId: constants_1.VIRTUOSO_CONTAINER_ID,
|
|
26
|
+
});
|
|
27
|
+
// Скролл виртуализации монтирует строки, которые появлением не считаются
|
|
28
|
+
const handleScrollingChange = (0, react_1.useCallback)((isScrolling) => {
|
|
29
|
+
if (isScrolling) {
|
|
30
|
+
enterAnimation.reset();
|
|
31
|
+
}
|
|
32
|
+
}, [enterAnimation]);
|
|
33
|
+
const handleRangeChanged = (0, react_1.useCallback)((range) => {
|
|
34
|
+
scrollToTopButtonRef.current?.classList.toggle(constants_1.infiniteTreeListClassnames.visibleScrollToTopButton, range.startIndex > 2);
|
|
35
|
+
tailRegistry.checkRange(range.endIndex, (itemId) => flatListRef.current.findIndex((item) => item.id === itemId));
|
|
36
|
+
}, [flatListRef, tailRegistry]);
|
|
37
|
+
const handleScrollToTop = (0, react_1.useCallback)(() => {
|
|
38
|
+
if (scrollRef.current) {
|
|
39
|
+
scrollRef.current.style.scrollBehavior = 'auto';
|
|
40
|
+
}
|
|
41
|
+
virtuosoRef.current?.scrollToIndex(0);
|
|
42
|
+
}, [scrollRef]);
|
|
43
|
+
return {
|
|
44
|
+
scrollParent,
|
|
45
|
+
tailRegistry,
|
|
46
|
+
isEndReachedWithScroll,
|
|
47
|
+
virtuosoProps: {
|
|
48
|
+
id: constants_1.VIRTUOSO_CONTAINER_ID,
|
|
49
|
+
ref: virtuosoRef,
|
|
50
|
+
overscan: constants_1.OVERSCAN,
|
|
51
|
+
rangeChanged: handleRangeChanged,
|
|
52
|
+
endReached: handleEndReach,
|
|
53
|
+
totalListHeightChanged: recalculateVerticalScroll,
|
|
54
|
+
isScrolling: handleScrollingChange,
|
|
55
|
+
},
|
|
56
|
+
onTopButtonProps: {
|
|
57
|
+
buttonRef: scrollToTopButtonRef,
|
|
58
|
+
handleScrollToTop,
|
|
59
|
+
scrollRef,
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
exports.useListScroll = useListScroll;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { InfiniteTreeList } from './InfiniteTreeList';
|
|
2
|
-
export type { InfiniteTreeListProps } from './types';
|
|
2
|
+
export type { InfiniteTreeChildrenPagination, InfiniteTreeItemMeta, InfiniteTreeListProps, } from './types';
|
|
3
3
|
export { InfiniteTreeListItem, type InfiniteTreeListItemProps, } from './InfiniteTreeListItem';
|
|
4
4
|
export { type InfiniteTreeListActionProps, InfiniteTreeListActions, } from './InfiniteTreeListActions';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { InfiniteTreeList } from './InfiniteTreeList';
|
|
2
2
|
export { type InfiniteTreeListActionProps, InfiniteTreeListActions, } from './InfiniteTreeListActions';
|
|
3
3
|
export { InfiniteTreeListItem, type InfiniteTreeListItemProps, } from './InfiniteTreeListItem';
|
|
4
|
-
export type { InfiniteTreeListProps } from './types';
|
|
4
|
+
export type { InfiniteTreeChildrenPagination, InfiniteTreeItemMeta, InfiniteTreeListProps, } from './types';
|