@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
package/node/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContext.d.ts
CHANGED
|
@@ -1,7 +1,88 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
+
import type { EnterAnimationResult } from '../hooks';
|
|
3
|
+
import type { FlattenTree, InfiniteTreeChildrenPagination, InfiniteTreeListData } from '../types';
|
|
4
|
+
import type { TailRegistry } from '../utils';
|
|
5
|
+
export type NodePagination = {
|
|
6
|
+
/**
|
|
7
|
+
* ID последнего загруженного дочернего элемента узла
|
|
8
|
+
*/
|
|
9
|
+
lastChildId?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Все дочерние данные узла загружены
|
|
12
|
+
*/
|
|
13
|
+
isEndReached?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Дочерние элементы узла загружаются
|
|
16
|
+
*/
|
|
17
|
+
isChildrenLoading?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Загрузка дочерних элементов завершилась ошибкой
|
|
20
|
+
*/
|
|
21
|
+
isChildrenError?: boolean;
|
|
22
|
+
};
|
|
23
|
+
export type NodeChildrenCallbacks = {
|
|
24
|
+
/**
|
|
25
|
+
* Обработчик подгрузки данных
|
|
26
|
+
*/
|
|
27
|
+
onLoadMore?: () => void;
|
|
28
|
+
/**
|
|
29
|
+
* Функция обработки нажатия на кнопку "Повторить запрос"
|
|
30
|
+
*/
|
|
31
|
+
onRetry?: () => void;
|
|
32
|
+
};
|
|
2
33
|
export type InfiniteTreeListContextProps = {
|
|
34
|
+
/**
|
|
35
|
+
* Рендер-функция строки
|
|
36
|
+
*/
|
|
37
|
+
renderItem: (item: FlattenTree<InfiniteTreeListData>) => ReactNode;
|
|
38
|
+
/**
|
|
39
|
+
* Рендер-функция строки узла с подгружаемыми дочерними элементами
|
|
40
|
+
*/
|
|
41
|
+
renderParent: (item: FlattenTree<InfiniteTreeListData>) => ReactNode;
|
|
42
|
+
/**
|
|
43
|
+
* Переключает раскрытие узла
|
|
44
|
+
*/
|
|
45
|
+
onToggle: (item: InfiniteTreeListData) => void;
|
|
46
|
+
/**
|
|
47
|
+
* Строка в состоянии загрузки
|
|
48
|
+
*/
|
|
3
49
|
itemSkeleton: ReactNode;
|
|
50
|
+
/**
|
|
51
|
+
* Id заблокированных узлов
|
|
52
|
+
*/
|
|
4
53
|
disabledIdList: Set<string>;
|
|
54
|
+
/**
|
|
55
|
+
* Отмечает узел заблокированным или снимает отметку
|
|
56
|
+
*/
|
|
5
57
|
setDisabled: (itemId: string, disabled: boolean) => void;
|
|
58
|
+
/**
|
|
59
|
+
* Данные пагинации узлов по parentId
|
|
60
|
+
*/
|
|
61
|
+
nodePaginationMap: Record<string, NodePagination>;
|
|
62
|
+
/**
|
|
63
|
+
* Регистрирует callback-функции загрузки дочерних элементов узла
|
|
64
|
+
*/
|
|
65
|
+
registerChildrenCallbacks: (itemId: string, callbacks: NodeChildrenCallbacks) => void;
|
|
66
|
+
/**
|
|
67
|
+
* Передаёт состояние загрузки дочерних элементов в список. Список
|
|
68
|
+
* синхронизирует плоский список
|
|
69
|
+
*/
|
|
70
|
+
registerChildren: (itemId: string, childrenState: InfiniteTreeChildrenPagination) => void;
|
|
71
|
+
/**
|
|
72
|
+
* Оповещает список о раскрытии узла
|
|
73
|
+
*/
|
|
74
|
+
notifyExpand: (itemId: string, onOpen?: () => void) => void;
|
|
75
|
+
onLoadMore: (parentId: string) => void;
|
|
76
|
+
onRetry: (parentId: string) => void;
|
|
77
|
+
enterAnimation: EnterAnimationResult;
|
|
78
|
+
/**
|
|
79
|
+
* Реестр хвостов вложенных веток. Переживает размонтирование строки
|
|
80
|
+
*/
|
|
81
|
+
tailRegistry: TailRegistry;
|
|
82
|
+
/**
|
|
83
|
+
* Отдаёт постоянный DOM-контейнер строки узла: строка монтируется вне
|
|
84
|
+
* виртуализации, а её контейнер переносится в строку скролла
|
|
85
|
+
*/
|
|
86
|
+
acquireParentSlot: (itemId: string) => HTMLDivElement | null;
|
|
6
87
|
};
|
|
7
88
|
export declare const InfiniteTreeListContext: import("react").Context<InfiniteTreeListContextProps>;
|
|
@@ -3,7 +3,28 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.InfiniteTreeListContext = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
exports.InfiniteTreeListContext = (0, react_1.createContext)({
|
|
6
|
+
renderItem: () => null,
|
|
7
|
+
renderParent: () => null,
|
|
8
|
+
onToggle: () => undefined,
|
|
6
9
|
itemSkeleton: '',
|
|
7
10
|
disabledIdList: new Set(),
|
|
8
11
|
setDisabled: () => undefined,
|
|
12
|
+
nodePaginationMap: {},
|
|
13
|
+
registerChildrenCallbacks: () => undefined,
|
|
14
|
+
registerChildren: () => undefined,
|
|
15
|
+
notifyExpand: () => undefined,
|
|
16
|
+
onLoadMore: () => undefined,
|
|
17
|
+
onRetry: () => undefined,
|
|
18
|
+
enterAnimation: {
|
|
19
|
+
schedule: () => undefined,
|
|
20
|
+
read: () => ({ shouldAnimate: false }),
|
|
21
|
+
claim: () => undefined,
|
|
22
|
+
reset: () => undefined,
|
|
23
|
+
},
|
|
24
|
+
tailRegistry: {
|
|
25
|
+
register: () => undefined,
|
|
26
|
+
unregister: () => undefined,
|
|
27
|
+
checkRange: () => undefined,
|
|
28
|
+
},
|
|
29
|
+
acquireParentSlot: () => null,
|
|
9
30
|
});
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import { type InfiniteTreeListContextProps } from '../InfiniteTreeListContext';
|
|
3
|
-
type Props = Pick<InfiniteTreeListContextProps, 'itemSkeleton'> & {
|
|
3
|
+
type Props = Pick<InfiniteTreeListContextProps, 'itemSkeleton' | 'nodePaginationMap' | 'enterAnimation' | 'tailRegistry' | 'registerChildren' | 'notifyExpand' | 'renderItem' | 'renderParent' | 'onToggle' | 'acquireParentSlot'> & {
|
|
4
4
|
children: ReactNode;
|
|
5
|
+
onListRetry: () => void;
|
|
5
6
|
};
|
|
6
|
-
export declare const InfiniteTreeListContextProvider: ({ children, itemSkeleton, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const InfiniteTreeListContextProvider: ({ children, itemSkeleton, nodePaginationMap, onListRetry, registerChildren, notifyExpand, enterAnimation, tailRegistry, renderItem, renderParent, onToggle, acquireParentSlot, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
export {};
|
|
@@ -2,19 +2,75 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.InfiniteTreeListContextProvider = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const
|
|
5
|
+
const react_1 = require("react");
|
|
6
6
|
const InfiniteTreeListContext_1 = require("../InfiniteTreeListContext");
|
|
7
|
-
const InfiniteTreeListContextProvider = ({ children, itemSkeleton, }) => {
|
|
8
|
-
const [disabledIdList,
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
7
|
+
const InfiniteTreeListContextProvider = ({ children, itemSkeleton, nodePaginationMap, onListRetry, registerChildren, notifyExpand, enterAnimation, tailRegistry, renderItem, renderParent, onToggle, acquireParentSlot, }) => {
|
|
8
|
+
const [disabledIdList, setDisabledIdList] = (0, react_1.useState)(new Set());
|
|
9
|
+
const childrenCallbacksRef = (0, react_1.useRef)({});
|
|
10
|
+
const setDisabled = (0, react_1.useCallback)((itemId, disabled) => {
|
|
11
|
+
setDisabledIdList((prev) => {
|
|
12
|
+
// Сохранение ссылки на Set при отсутствии изменений предотвращает
|
|
13
|
+
// бесконечный ре-рендер потребителей контекста
|
|
14
|
+
if (prev.has(itemId) === disabled) {
|
|
15
|
+
return prev;
|
|
16
|
+
}
|
|
17
|
+
const next = new Set(prev);
|
|
18
|
+
if (disabled) {
|
|
19
|
+
next.add(itemId);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
next.delete(itemId);
|
|
23
|
+
}
|
|
24
|
+
return next;
|
|
25
|
+
});
|
|
26
|
+
}, []);
|
|
27
|
+
const registerChildrenCallbacks = (0, react_1.useCallback)((itemId, callbacks) => {
|
|
28
|
+
childrenCallbacksRef.current[itemId] = callbacks;
|
|
29
|
+
}, []);
|
|
30
|
+
const onLoadMore = (0, react_1.useCallback)((parentId) => {
|
|
31
|
+
childrenCallbacksRef.current[parentId]?.onLoadMore?.();
|
|
32
|
+
}, []);
|
|
33
|
+
const onRetry = (0, react_1.useCallback)((parentId) => {
|
|
34
|
+
const retryChildren = childrenCallbacksRef.current[parentId]?.onRetry;
|
|
35
|
+
if (retryChildren) {
|
|
36
|
+
retryChildren();
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
onListRetry();
|
|
40
|
+
}, [onListRetry]);
|
|
41
|
+
const value = (0, react_1.useMemo)(() => ({
|
|
42
|
+
renderItem,
|
|
43
|
+
renderParent,
|
|
44
|
+
onToggle,
|
|
45
|
+
itemSkeleton,
|
|
46
|
+
disabledIdList,
|
|
47
|
+
setDisabled,
|
|
48
|
+
nodePaginationMap,
|
|
49
|
+
registerChildrenCallbacks,
|
|
50
|
+
registerChildren,
|
|
51
|
+
notifyExpand,
|
|
52
|
+
onLoadMore,
|
|
53
|
+
onRetry,
|
|
54
|
+
enterAnimation,
|
|
55
|
+
tailRegistry,
|
|
56
|
+
acquireParentSlot,
|
|
57
|
+
}), [
|
|
58
|
+
renderItem,
|
|
59
|
+
renderParent,
|
|
60
|
+
onToggle,
|
|
61
|
+
itemSkeleton,
|
|
62
|
+
disabledIdList,
|
|
63
|
+
setDisabled,
|
|
64
|
+
nodePaginationMap,
|
|
65
|
+
registerChildrenCallbacks,
|
|
66
|
+
registerChildren,
|
|
67
|
+
notifyExpand,
|
|
68
|
+
onLoadMore,
|
|
69
|
+
onRetry,
|
|
70
|
+
enterAnimation,
|
|
71
|
+
tailRegistry,
|
|
72
|
+
acquireParentSlot,
|
|
73
|
+
]);
|
|
74
|
+
return ((0, jsx_runtime_1.jsx)(InfiniteTreeListContext_1.InfiniteTreeListContext.Provider, { value: value, children: children }));
|
|
19
75
|
};
|
|
20
76
|
exports.InfiniteTreeListContextProvider = InfiniteTreeListContextProvider;
|
package/node/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/ErrorPlaceholder.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ErrorPlaceholder = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const Button_1 = require("../../../Button");
|
|
6
|
+
const Typography_1 = require("../../../Typography");
|
|
7
|
+
const constants_1 = require("./constants");
|
|
8
|
+
const styles_1 = require("./styles");
|
|
9
|
+
const ErrorPlaceholder = ({ onRetry, errorMsg = constants_1.DEFAULT_ERROR_MESSAGE, }) => {
|
|
10
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { children: [(0, jsx_runtime_1.jsx)(Typography_1.Typography, { color: "grey", colorIntensity: "600", children: errorMsg }), (0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: onRetry, variant: "link", children: "\u041F\u043E\u043F\u0440\u043E\u0431\u043E\u0432\u0430\u0442\u044C \u0441\u043D\u043E\u0432\u0430" })] }));
|
|
11
|
+
};
|
|
12
|
+
exports.ErrorPlaceholder = ErrorPlaceholder;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DEFAULT_ERROR_MESSAGE = "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0434\u0430\u043D\u043D\u044B\u0435";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ErrorPlaceholder } from './ErrorPlaceholder';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ErrorPlaceholder = void 0;
|
|
4
|
+
var ErrorPlaceholder_1 = require("./ErrorPlaceholder");
|
|
5
|
+
Object.defineProperty(exports, "ErrorPlaceholder", { enumerable: true, get: function () { return ErrorPlaceholder_1.ErrorPlaceholder; } });
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Wrapper = void 0;
|
|
4
|
+
const styled_1 = require("../../../styled");
|
|
5
|
+
exports.Wrapper = styled_1.styled.div `
|
|
6
|
+
display: flex;
|
|
7
|
+
gap: ${({ theme }) => theme.spacing(5)};
|
|
8
|
+
align-items: center;
|
|
9
|
+
|
|
10
|
+
padding: ${({ theme }) => theme.spacing(0, 4)};
|
|
11
|
+
`;
|
|
@@ -4,16 +4,38 @@ exports.InfiniteTreeListItem = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const Chevron_1 = require("../../Chevron");
|
|
6
6
|
const ContentState_1 = require("../../ContentState");
|
|
7
|
+
const Loader_1 = require("../../Loader");
|
|
7
8
|
const Tooltip_1 = require("../../Tooltip");
|
|
9
|
+
const cn_1 = require("../../utils/cn");
|
|
10
|
+
const cva_1 = require("../../utils/cva");
|
|
8
11
|
const getInertProps_1 = require("../../utils/getInertProps");
|
|
12
|
+
const constants_1 = require("./constants");
|
|
13
|
+
const ErrorPlaceholder_1 = require("./ErrorPlaceholder");
|
|
9
14
|
const styles_1 = require("./styles");
|
|
10
15
|
const useLogic_1 = require("./useLogic");
|
|
16
|
+
const infiniteTreeListItemCva = (0, cva_1.cva)(constants_1.infiniteTreeListItemClassnames.root, {
|
|
17
|
+
variants: {
|
|
18
|
+
isDisabled: {
|
|
19
|
+
true: constants_1.infiniteTreeListItemClassnames.disabled,
|
|
20
|
+
},
|
|
21
|
+
isLoading: {
|
|
22
|
+
true: constants_1.infiniteTreeListItemClassnames.loading,
|
|
23
|
+
},
|
|
24
|
+
hasNested: {
|
|
25
|
+
true: constants_1.infiniteTreeListItemClassnames.hasNested,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
});
|
|
11
29
|
const InfiniteTreeListItem = (props) => {
|
|
12
|
-
const { itemSkeleton, item, handleClick, isDisabledByActions, tooltipProps, isChevronActive, } = (0, useLogic_1.useLogic)(props);
|
|
13
|
-
const { isDisabled, className, onRetry = () => undefined, actions, errorMsg,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
30
|
+
const { itemSkeleton, item, handleClick, isDisabledByActions, tooltipProps, isChevronActive, isRowLoading, isRowError, } = (0, useLogic_1.useLogic)(props);
|
|
31
|
+
const { isDisabled, className, onRetry = () => undefined, actions, errorMsg, children, } = props;
|
|
32
|
+
if (isRowError) {
|
|
33
|
+
return (0, jsx_runtime_1.jsx)(ErrorPlaceholder_1.ErrorPlaceholder, { onRetry: onRetry, errorMsg: errorMsg });
|
|
34
|
+
}
|
|
35
|
+
return ((0, jsx_runtime_1.jsx)(ContentState_1.ContentState, { isLoading: isRowLoading, isSmoothLoading: false, loadingContent: (0, jsx_runtime_1.jsx)(styles_1.Wrapper, { className: infiniteTreeListItemCva({ isLoading: true }), children: itemSkeleton || ((0, jsx_runtime_1.jsx)(styles_1.LoaderWrapper, { children: (0, jsx_runtime_1.jsx)(Loader_1.Loader, {}) })) }), children: (0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { ...tooltipProps, children: (0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { onClick: handleClick, className: (0, cn_1.cn)(infiniteTreeListItemCva({
|
|
36
|
+
isDisabled: Boolean(isDisabled || isDisabledByActions),
|
|
37
|
+
isLoading: isRowLoading,
|
|
38
|
+
hasNested: item.meta.hasNested,
|
|
39
|
+
}), className), ...(0, getInertProps_1.getInertProps)(isDisabled || isDisabledByActions), children: [item.meta.hasNested && (0, jsx_runtime_1.jsx)(Chevron_1.Chevron, { isActive: isChevronActive }), children, actions && (0, jsx_runtime_1.jsx)(styles_1.ActionsWrapper, { children: actions })] }, `infinite-tree-list-item-${item.id}`) }) }));
|
|
18
40
|
};
|
|
19
41
|
exports.InfiniteTreeListItem = InfiniteTreeListItem;
|
|
@@ -1,10 +1,29 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { FlattenTree, InfiniteTreeListData } from '../../types';
|
|
3
3
|
export type TreeListItemContextProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Строка плоского списка, для которой рендерится содержимое
|
|
6
|
+
*/
|
|
4
7
|
item: FlattenTree<InfiniteTreeListData>;
|
|
8
|
+
/**
|
|
9
|
+
* Переключает раскрытие узла строки
|
|
10
|
+
*/
|
|
5
11
|
onToggle: (item: InfiniteTreeListData) => void;
|
|
12
|
+
/**
|
|
13
|
+
* Строка заблокирована: своим действием или действием родителя
|
|
14
|
+
*/
|
|
6
15
|
isDisabled: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Причина блокировки. Показывается в tooltip строки
|
|
18
|
+
*/
|
|
7
19
|
disabledReason?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Записывает причину блокировки
|
|
22
|
+
*/
|
|
8
23
|
setDisabledReason: (disabledReason?: string) => void;
|
|
9
24
|
};
|
|
25
|
+
/**
|
|
26
|
+
* Контекст одной строки дерева: сама строка и её состояние блокировки.
|
|
27
|
+
* Отделён от контекста списка — значение у каждой строки своё
|
|
28
|
+
*/
|
|
10
29
|
export declare const TreeListItemContext: import("react").Context<TreeListItemContextProps>;
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TreeListItemContext = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
+
/**
|
|
6
|
+
* Контекст одной строки дерева: сама строка и её состояние блокировки.
|
|
7
|
+
* Отделён от контекста списка — значение у каждой строки своё
|
|
8
|
+
*/
|
|
5
9
|
exports.TreeListItemContext = (0, react_1.createContext)({
|
|
6
10
|
item: {},
|
|
7
11
|
onToggle: () => undefined,
|
|
@@ -3,5 +3,9 @@ import { type TreeListItemContextProps } from '../TreeListItemContext';
|
|
|
3
3
|
type Props = Pick<TreeListItemContextProps, 'item' | 'onToggle'> & {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
};
|
|
6
|
+
/**
|
|
7
|
+
* Ставит контекст строки: считает блокировку по пути узла и отдаёт вниз
|
|
8
|
+
* саму строку с её причиной блокировки
|
|
9
|
+
*/
|
|
6
10
|
export declare const TreeListItemContextProvider: ({ item, children, onToggle, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
7
11
|
export {};
|
|
@@ -5,18 +5,23 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const InfiniteTreeListContext_1 = require("../../../InfiniteTreeListContext");
|
|
7
7
|
const TreeListItemContext_1 = require("../TreeListItemContext");
|
|
8
|
+
/**
|
|
9
|
+
* Ставит контекст строки: считает блокировку по пути узла и отдаёт вниз
|
|
10
|
+
* саму строку с её причиной блокировки
|
|
11
|
+
*/
|
|
8
12
|
const TreeListItemContextProvider = ({ item, children, onToggle, }) => {
|
|
9
13
|
const [disabledReason, setDisabledReason] = (0, react_1.useState)();
|
|
10
14
|
const { disabledIdList } = (0, react_1.useContext)(InfiniteTreeListContext_1.InfiniteTreeListContext);
|
|
11
15
|
const isDisabled = (0, react_1.useMemo)(() => {
|
|
12
16
|
return item.meta.path.some((id) => disabledIdList.has(id));
|
|
13
|
-
}, [item.path, disabledIdList]);
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
}, [item.meta.path, disabledIdList]);
|
|
18
|
+
const value = (0, react_1.useMemo)(() => ({
|
|
19
|
+
item,
|
|
20
|
+
onToggle,
|
|
21
|
+
isDisabled,
|
|
22
|
+
disabledReason,
|
|
23
|
+
setDisabledReason,
|
|
24
|
+
}), [item, onToggle, isDisabled, disabledReason]);
|
|
25
|
+
return ((0, jsx_runtime_1.jsx)(TreeListItemContext_1.TreeListItemContext.Provider, { value: value, children: children }));
|
|
21
26
|
};
|
|
22
27
|
exports.TreeListItemContextProvider = TreeListItemContextProvider;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.infiniteTreeListItemClassnames = void 0;
|
|
4
|
+
const createUIKitClassname_1 = require("../../utils/createUIKitClassname");
|
|
5
|
+
exports.infiniteTreeListItemClassnames = {
|
|
6
|
+
root: (0, createUIKitClassname_1.createUIKitClassname)('infinite-tree-list__item'),
|
|
7
|
+
disabled: (0, createUIKitClassname_1.createUIKitClassname)('infinite-tree-list__item_disabled'),
|
|
8
|
+
loading: (0, createUIKitClassname_1.createUIKitClassname)('infinite-tree-list__item_loading'),
|
|
9
|
+
hasNested: (0, createUIKitClassname_1.createUIKitClassname)('infinite-tree-list__item_has-nested'),
|
|
10
|
+
};
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
export declare const Wrapper: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
3
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
4
|
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
5
|
-
} & {
|
|
6
|
-
$isDisabled?: boolean | undefined;
|
|
7
|
-
$isLoading?: boolean | undefined;
|
|
8
|
-
$hasNested?: boolean | undefined;
|
|
9
5
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
6
|
export declare const ActionsWrapper: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
11
7
|
theme?: import("@emotion/react").Theme | undefined;
|
|
12
8
|
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
13
9
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
|
+
export declare const LoaderWrapper: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
11
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
13
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ActionsWrapper = exports.Wrapper = void 0;
|
|
3
|
+
exports.LoaderWrapper = exports.ActionsWrapper = exports.Wrapper = void 0;
|
|
4
|
+
const constants_1 = require("../../constants");
|
|
4
5
|
const styled_1 = require("../../styled");
|
|
6
|
+
const constants_2 = require("./constants");
|
|
5
7
|
exports.Wrapper = styled_1.styled.div `
|
|
6
|
-
cursor:
|
|
8
|
+
cursor: default;
|
|
7
9
|
|
|
8
10
|
display: flex;
|
|
9
11
|
gap: ${({ theme }) => theme.spacing(3)};
|
|
@@ -13,7 +15,6 @@ exports.Wrapper = styled_1.styled.div `
|
|
|
13
15
|
min-height: 60px;
|
|
14
16
|
padding: ${({ theme }) => theme.spacing(3, 4)};
|
|
15
17
|
|
|
16
|
-
opacity: ${({ $isDisabled }) => ($isDisabled ? 0.5 : 1)};
|
|
17
18
|
background: ${({ theme }) => theme.palette.background.default};
|
|
18
19
|
|
|
19
20
|
transition: ${({ theme }) => theme.transitions.create('background-color', {
|
|
@@ -21,10 +22,29 @@ exports.Wrapper = styled_1.styled.div `
|
|
|
21
22
|
duration: theme.transitions.duration.shortest,
|
|
22
23
|
})};
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
${constants_1.HOVER_MEDIA} {
|
|
26
|
+
&:hover {
|
|
27
|
+
background-color: ${({ theme }) => theme.palette.background.elementHover};
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&.${constants_2.infiniteTreeListItemClassnames.hasNested} {
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&.${constants_2.infiniteTreeListItemClassnames.loading} {
|
|
36
|
+
cursor: default;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&.${constants_2.infiniteTreeListItemClassnames.disabled} {
|
|
40
|
+
cursor: default;
|
|
41
|
+
|
|
42
|
+
opacity: 0.5;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&.${constants_2.infiniteTreeListItemClassnames.loading}:hover,
|
|
46
|
+
&.${constants_2.infiniteTreeListItemClassnames.disabled}:hover {
|
|
47
|
+
background-color: ${({ theme }) => theme.palette.background.default};
|
|
28
48
|
}
|
|
29
49
|
`;
|
|
30
50
|
exports.ActionsWrapper = styled_1.styled.div `
|
|
@@ -32,3 +52,9 @@ exports.ActionsWrapper = styled_1.styled.div `
|
|
|
32
52
|
|
|
33
53
|
margin-left: auto;
|
|
34
54
|
`;
|
|
55
|
+
exports.LoaderWrapper = styled_1.styled.div `
|
|
56
|
+
display: flex;
|
|
57
|
+
justify-content: center;
|
|
58
|
+
|
|
59
|
+
width: 100%;
|
|
60
|
+
`;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
import type { InfiniteTreeListData } from '../types';
|
|
2
3
|
export type InfiniteTreeListItemProps = {
|
|
3
4
|
children: ReactNode;
|
|
4
5
|
/**
|
|
@@ -10,15 +11,23 @@ export type InfiniteTreeListItemProps = {
|
|
|
10
11
|
*/
|
|
11
12
|
actions?: ReactNode;
|
|
12
13
|
/**
|
|
13
|
-
*
|
|
14
|
+
* Загруженные дочерние элементы узла.
|
|
15
|
+
*/
|
|
16
|
+
childItems?: InfiniteTreeListData[];
|
|
17
|
+
/**
|
|
18
|
+
* Флаг достижения конца списка
|
|
19
|
+
*/
|
|
20
|
+
isEndReached?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Флаг ошибки загрузки дочерних элементов узла
|
|
14
23
|
*/
|
|
15
24
|
isError?: boolean;
|
|
16
25
|
/**
|
|
17
|
-
*
|
|
26
|
+
* Флаг загрузки дочерних элементов
|
|
18
27
|
*/
|
|
19
28
|
isLoading?: boolean;
|
|
20
29
|
/**
|
|
21
|
-
*
|
|
30
|
+
* Элемент заблокирован для взаимодействия
|
|
22
31
|
*/
|
|
23
32
|
isDisabled?: boolean;
|
|
24
33
|
/**
|
|
@@ -33,4 +42,12 @@ export type InfiniteTreeListItemProps = {
|
|
|
33
42
|
* Текст ошибки
|
|
34
43
|
*/
|
|
35
44
|
errorMsg?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Обработчик раскрытия узла
|
|
47
|
+
*/
|
|
48
|
+
onOpen?: () => void;
|
|
49
|
+
/**
|
|
50
|
+
* Обработчик подгрузки данных
|
|
51
|
+
*/
|
|
52
|
+
onLoadMore?: () => void;
|
|
36
53
|
};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { type MouseEvent } from 'react';
|
|
2
2
|
import { type TooltipProps } from '../../../Tooltip';
|
|
3
3
|
import { type InfiniteTreeListItemProps } from '../types';
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Логика строки: отдаёт списку данные дочерних элементов и callback-функции
|
|
6
|
+
* пагинации, сообщает о раскрытии узла и собирает состояние блокировки строки
|
|
7
|
+
*/
|
|
8
|
+
export declare const useLogic: ({ isDisabled, disabledReason, isLoading, isError, isEndReached, childItems, onOpen, onLoadMore, onRetry, }: InfiniteTreeListItemProps) => {
|
|
5
9
|
item: import("../../types").FlattenTree<import("../../types").InfiniteTreeListData>;
|
|
6
10
|
handleClick: (event: MouseEvent) => void;
|
|
7
11
|
itemSkeleton: import("react").ReactNode;
|
|
@@ -10,4 +14,6 @@ export declare const useLogic: ({ isDisabled, disabledReason, }: InfiniteTreeLis
|
|
|
10
14
|
tooltipProps: Omit<TooltipProps, "children" | "ref">;
|
|
11
15
|
isDisabledByActions: boolean;
|
|
12
16
|
isChevronActive: boolean;
|
|
17
|
+
isRowLoading: boolean;
|
|
18
|
+
isRowError: boolean;
|
|
13
19
|
};
|