@astral/ui 4.104.2 → 4.106.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/ActionCellBase/ActionCellBase.js +10 -1
- package/components/ActionCellBase/MainAction/MainAction.js +6 -0
- package/components/ActionCellBase/MainAction/MainIconButton/MainIconButton.js +7 -4
- package/components/ActionCellBase/MainAction/MainIconButton/constants.d.ts +3 -0
- package/components/ActionCellBase/MainAction/MainIconButton/constants.js +4 -0
- package/components/ActionCellBase/MainAction/MainIconButton/styles.d.ts +11 -0
- package/components/ActionCellBase/MainAction/MainIconButton/styles.js +9 -0
- package/components/ActionCellBase/MainAction/MobileMainButton/MobileMainButton.d.ts +14 -0
- package/components/ActionCellBase/MainAction/MobileMainButton/MobileMainButton.js +17 -0
- package/components/ActionCellBase/MainAction/MobileMainButton/index.d.ts +1 -0
- package/components/ActionCellBase/MainAction/MobileMainButton/index.js +1 -0
- package/components/ActionCellBase/MainAction/MobileMainButton/styles.d.ts +11 -0
- package/components/ActionCellBase/MainAction/MobileMainButton/styles.js +7 -0
- package/components/ActionCellBase/SecondaryAction/SecondaryAction.js +2 -2
- package/components/ActionCellBase/SecondaryAction/styles.d.ts +4 -0
- package/components/ActionCellBase/SecondaryAction/styles.js +9 -0
- package/components/ActionCellBase/constants.d.ts +4 -0
- package/components/ActionCellBase/constants.js +5 -0
- package/components/ActionCellBase/styles.js +11 -0
- package/components/ActionCellBase/types.d.ts +25 -0
- package/components/ActionGroup/MainActions/ActionNode/ActionNode.d.ts +9 -0
- package/components/ActionGroup/MainActions/ActionNode/ActionNode.js +30 -0
- package/components/ActionGroup/MainActions/ActionNode/index.d.ts +1 -0
- package/components/ActionGroup/MainActions/ActionNode/index.js +1 -0
- package/components/ActionGroup/MainActions/MainActions.d.ts +1 -1
- package/components/ActionGroup/MainActions/MainActions.js +3 -14
- package/components/ActionGroup/MainActions/hooks/useMainActions/useMainActions.d.ts +352 -3
- package/components/ActionGroup/MainActions/hooks/useMainActions/useMainActions.js +33 -6
- package/components/ActionGroup/MainActions/index.d.ts +1 -0
- package/components/ActionGroup/MainActions/index.js +1 -0
- package/components/ActionGroup/MainActions/styles.d.ts +5 -6
- package/components/ActionGroup/MainActions/styles.js +6 -7
- package/components/ActionGroup/SecondaryVisibleActions/ActionNode/ActionNode.d.ts +12 -0
- package/components/ActionGroup/SecondaryVisibleActions/ActionNode/ActionNode.js +30 -0
- package/components/ActionGroup/SecondaryVisibleActions/ActionNode/index.d.ts +1 -0
- package/components/ActionGroup/SecondaryVisibleActions/ActionNode/index.js +1 -0
- package/components/ActionGroup/SecondaryVisibleActions/SecondaryVisibleActions.d.ts +1 -1
- package/components/ActionGroup/SecondaryVisibleActions/SecondaryVisibleActions.js +3 -7
- package/components/ActionGroup/constants.d.ts +3 -0
- package/components/ActionGroup/constants.js +4 -0
- package/components/ActionGroup/index.d.ts +2 -1
- package/components/ActionGroup/index.js +1 -0
- package/components/ActionGroup/public.d.ts +2 -1
- package/components/ActionGroup/public.js +1 -0
- package/components/ActionGroup/styles.js +5 -0
- package/components/ActionGroup/types.d.ts +48 -6
- package/components/InfiniteTreeList/InfiniteTreeList.js +16 -2
- package/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContext.d.ts +4 -0
- package/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContext.js +1 -0
- package/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContextProvider/InfiniteTreeListContextProvider.d.ts +2 -2
- package/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContextProvider/InfiniteTreeListContextProvider.js +3 -1
- package/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/styles.js +8 -0
- package/components/InfiniteTreeList/InfiniteTreeListItem/InfiniteTreeListItem.js +7 -4
- package/components/InfiniteTreeList/InfiniteTreeListItem/constants.d.ts +2 -0
- package/components/InfiniteTreeList/InfiniteTreeListItem/constants.js +2 -0
- package/components/InfiniteTreeList/InfiniteTreeListItem/index.d.ts +1 -0
- package/components/InfiniteTreeList/InfiniteTreeListItem/index.js +1 -0
- package/components/InfiniteTreeList/InfiniteTreeListItem/styles.d.ts +14 -0
- package/components/InfiniteTreeList/InfiniteTreeListItem/styles.js +66 -2
- package/components/InfiniteTreeList/LevelHeader/LevelHeader.d.ts +5 -0
- package/components/InfiniteTreeList/LevelHeader/LevelHeader.js +17 -0
- package/components/InfiniteTreeList/LevelHeader/constants.d.ts +3 -0
- package/components/InfiniteTreeList/LevelHeader/constants.js +3 -0
- package/components/InfiniteTreeList/LevelHeader/index.d.ts +2 -0
- package/components/InfiniteTreeList/LevelHeader/index.js +2 -0
- package/components/InfiniteTreeList/LevelHeader/styles.d.ts +365 -0
- package/components/InfiniteTreeList/LevelHeader/styles.js +51 -0
- package/components/InfiniteTreeList/LevelHeader/types.d.ts +14 -0
- package/components/InfiniteTreeList/LevelHeader/types.js +1 -0
- package/components/InfiniteTreeList/ListFooter/styles.js +8 -0
- package/components/InfiniteTreeList/OnTopButton/styles.js +7 -0
- package/components/InfiniteTreeList/ParentItems/Item/Item.js +10 -2
- package/components/InfiniteTreeList/ParentItems/Item/useLogic/useLogic.d.ts +1 -0
- package/components/InfiniteTreeList/ParentItems/Item/useLogic/useLogic.js +10 -2
- package/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/NoDataRow.js +2 -2
- package/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/styles.d.ts +3 -0
- package/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/styles.js +11 -0
- package/components/InfiniteTreeList/TreeItem/TreeItem.js +6 -3
- package/components/InfiniteTreeList/TreeItem/styles.js +19 -0
- package/components/InfiniteTreeList/TreeItem/useLogic/useLogic.d.ts +2 -1
- package/components/InfiniteTreeList/TreeItem/useLogic/useLogic.js +5 -4
- package/components/InfiniteTreeList/constants.d.ts +21 -0
- package/components/InfiniteTreeList/constants.js +21 -0
- package/components/InfiniteTreeList/hooks/index.d.ts +2 -0
- package/components/InfiniteTreeList/hooks/index.js +2 -0
- package/components/InfiniteTreeList/hooks/useLevelNavigation/index.d.ts +2 -0
- package/components/InfiniteTreeList/hooks/useLevelNavigation/index.js +2 -0
- package/components/InfiniteTreeList/hooks/useLevelNavigation/types.d.ts +15 -0
- package/components/InfiniteTreeList/hooks/useLevelNavigation/types.js +1 -0
- package/components/InfiniteTreeList/hooks/useLevelNavigation/useLevelNavigation.d.ts +15 -0
- package/components/InfiniteTreeList/hooks/useLevelNavigation/useLevelNavigation.js +48 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/index.d.ts +3 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/index.js +3 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/index.d.ts +2 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/index.js +2 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/types.d.ts +16 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/types.js +1 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/useLevelSnapshots.d.ts +12 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/useLevelSnapshots.js +42 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/index.d.ts +2 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/index.js +2 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/types.d.ts +12 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/types.js +1 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/useScrollToTopButton.d.ts +15 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/useScrollToTopButton.js +27 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/index.d.ts +2 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/index.js +2 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/types.d.ts +11 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/types.js +1 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/useTailWatcher.d.ts +12 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/useTailWatcher.js +39 -0
- package/components/InfiniteTreeList/hooks/useListScroll/types.d.ts +14 -2
- package/components/InfiniteTreeList/hooks/useListScroll/useListScroll.d.ts +9 -6
- package/components/InfiniteTreeList/hooks/useListScroll/useListScroll.js +192 -28
- package/components/InfiniteTreeList/hooks/useListScroll/utils/getOffsetTop/getOffsetTop.d.ts +4 -0
- package/components/InfiniteTreeList/hooks/useListScroll/utils/getOffsetTop/getOffsetTop.js +6 -0
- package/components/InfiniteTreeList/hooks/useListScroll/utils/getOffsetTop/index.d.ts +1 -0
- package/components/InfiniteTreeList/hooks/useListScroll/utils/getOffsetTop/index.js +1 -0
- package/components/InfiniteTreeList/hooks/useListScroll/utils/index.d.ts +1 -0
- package/components/InfiniteTreeList/hooks/useListScroll/utils/index.js +1 -0
- package/components/InfiniteTreeList/hooks/useNodeTitleValidation/index.d.ts +2 -0
- package/components/InfiniteTreeList/hooks/useNodeTitleValidation/index.js +2 -0
- package/components/InfiniteTreeList/hooks/useNodeTitleValidation/types.d.ts +14 -0
- package/components/InfiniteTreeList/hooks/useNodeTitleValidation/types.js +1 -0
- package/components/InfiniteTreeList/hooks/useNodeTitleValidation/useNodeTitleValidation.d.ts +5 -0
- package/components/InfiniteTreeList/hooks/useNodeTitleValidation/useNodeTitleValidation.js +18 -0
- package/components/InfiniteTreeList/styles.d.ts +5 -0
- package/components/InfiniteTreeList/styles.js +41 -0
- package/components/InfiniteTreeList/types.d.ts +4 -0
- package/components/InfiniteTreeList/useLogic/useLogic.d.ts +13 -5
- package/components/InfiniteTreeList/useLogic/useLogic.js +165 -27
- package/components/InfiniteTreeList/utils/checkHasFooterContent/checkHasFooterContent.d.ts +5 -0
- package/components/InfiniteTreeList/utils/checkHasFooterContent/checkHasFooterContent.js +4 -0
- package/components/InfiniteTreeList/utils/checkHasFooterContent/index.d.ts +1 -0
- package/components/InfiniteTreeList/utils/checkHasFooterContent/index.js +1 -0
- package/components/InfiniteTreeList/utils/checkHasNested/checkHasNested.d.ts +6 -0
- package/components/InfiniteTreeList/utils/checkHasNested/checkHasNested.js +5 -0
- package/components/InfiniteTreeList/utils/checkHasNested/index.d.ts +1 -0
- package/components/InfiniteTreeList/utils/checkHasNested/index.js +1 -0
- package/components/InfiniteTreeList/utils/createTailRegistry/createTailRegistry.d.ts +8 -3
- package/components/InfiniteTreeList/utils/createTailRegistry/createTailRegistry.js +30 -12
- package/components/InfiniteTreeList/utils/flattenTree/flattenTree.js +2 -1
- package/components/InfiniteTreeList/utils/getLevelKey/getLevelKey.d.ts +4 -0
- package/components/InfiniteTreeList/utils/getLevelKey/getLevelKey.js +5 -0
- package/components/InfiniteTreeList/utils/getLevelKey/index.d.ts +1 -0
- package/components/InfiniteTreeList/utils/getLevelKey/index.js +1 -0
- package/components/InfiniteTreeList/utils/index.d.ts +3 -0
- package/components/InfiniteTreeList/utils/index.js +3 -0
- package/components/PageHeader/MobilePageActions/MobilePageActions.js +2 -2
- package/components/PageHeader/MobilePageActions/useLogic/useLogic.d.ts +1 -0
- package/components/PageHeader/MobilePageActions/useLogic/useLogic.js +3 -0
- package/components/PageHeader/PageActions/MainActions/MainActions.d.ts +1 -1
- package/components/PageHeader/PageActions/MainActions/MainActions.js +2 -2
- package/components/PageHeader/PageActions/MainActions/styles.js +5 -0
- package/components/PageHeader/PageActions/PageActions.js +2 -2
- package/components/PageHeader/PageActions/SecondaryVisibleActions/SecondaryVisibleActions.d.ts +1 -1
- package/components/PageHeader/PageActions/SecondaryVisibleActions/SecondaryVisibleActions.js +3 -3
- package/components/PageHeader/PageActions/SecondaryVisibleActions/styles.d.ts +7 -1
- package/components/PageHeader/PageActions/useLogic/useLogic.d.ts +1 -0
- package/components/PageHeader/PageActions/useLogic/useLogic.js +3 -0
- package/components/index.d.ts +1 -1
- package/components/useScrollManagement/useScrollManagement.js +7 -6
- package/node/components/ActionCellBase/ActionCellBase.js +10 -1
- package/node/components/ActionCellBase/MainAction/MainAction.js +6 -0
- package/node/components/ActionCellBase/MainAction/MainIconButton/MainIconButton.js +7 -4
- package/node/components/ActionCellBase/MainAction/MainIconButton/constants.d.ts +3 -0
- package/node/components/ActionCellBase/MainAction/MainIconButton/constants.js +7 -0
- package/node/components/ActionCellBase/MainAction/MainIconButton/styles.d.ts +11 -0
- package/node/components/ActionCellBase/MainAction/MainIconButton/styles.js +12 -0
- package/node/components/ActionCellBase/MainAction/MobileMainButton/MobileMainButton.d.ts +14 -0
- package/node/components/ActionCellBase/MainAction/MobileMainButton/MobileMainButton.js +21 -0
- package/node/components/ActionCellBase/MainAction/MobileMainButton/index.d.ts +1 -0
- package/node/components/ActionCellBase/MainAction/MobileMainButton/index.js +17 -0
- package/node/components/ActionCellBase/MainAction/MobileMainButton/styles.d.ts +11 -0
- package/node/components/ActionCellBase/MainAction/MobileMainButton/styles.js +10 -0
- package/node/components/ActionCellBase/SecondaryAction/SecondaryAction.js +2 -2
- package/node/components/ActionCellBase/SecondaryAction/styles.d.ts +4 -0
- package/node/components/ActionCellBase/SecondaryAction/styles.js +12 -0
- package/node/components/ActionCellBase/constants.d.ts +4 -0
- package/node/components/ActionCellBase/constants.js +8 -0
- package/node/components/ActionCellBase/styles.js +11 -0
- package/node/components/ActionCellBase/types.d.ts +25 -0
- package/node/components/ActionGroup/MainActions/ActionNode/ActionNode.d.ts +9 -0
- package/node/components/ActionGroup/MainActions/ActionNode/ActionNode.js +34 -0
- package/node/components/ActionGroup/MainActions/ActionNode/index.d.ts +1 -0
- package/node/components/ActionGroup/MainActions/ActionNode/index.js +17 -0
- package/node/components/ActionGroup/MainActions/MainActions.d.ts +1 -1
- package/node/components/ActionGroup/MainActions/MainActions.js +3 -14
- package/node/components/ActionGroup/MainActions/hooks/useMainActions/useMainActions.d.ts +352 -3
- package/node/components/ActionGroup/MainActions/hooks/useMainActions/useMainActions.js +33 -6
- package/node/components/ActionGroup/MainActions/index.d.ts +1 -0
- package/node/components/ActionGroup/MainActions/index.js +1 -0
- package/node/components/ActionGroup/MainActions/styles.d.ts +5 -6
- package/node/components/ActionGroup/MainActions/styles.js +7 -8
- package/node/components/ActionGroup/SecondaryVisibleActions/ActionNode/ActionNode.d.ts +12 -0
- package/node/components/ActionGroup/SecondaryVisibleActions/ActionNode/ActionNode.js +34 -0
- package/node/components/ActionGroup/SecondaryVisibleActions/ActionNode/index.d.ts +1 -0
- package/node/components/ActionGroup/SecondaryVisibleActions/ActionNode/index.js +17 -0
- package/node/components/ActionGroup/SecondaryVisibleActions/SecondaryVisibleActions.d.ts +1 -1
- package/node/components/ActionGroup/SecondaryVisibleActions/SecondaryVisibleActions.js +3 -7
- package/node/components/ActionGroup/constants.d.ts +3 -0
- package/node/components/ActionGroup/constants.js +7 -0
- package/node/components/ActionGroup/index.d.ts +2 -1
- package/node/components/ActionGroup/index.js +3 -1
- package/node/components/ActionGroup/public.d.ts +2 -1
- package/node/components/ActionGroup/public.js +3 -1
- package/node/components/ActionGroup/styles.js +5 -0
- package/node/components/ActionGroup/types.d.ts +48 -6
- package/node/components/InfiniteTreeList/InfiniteTreeList.js +16 -2
- package/node/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContext.d.ts +4 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContext.js +1 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContextProvider/InfiniteTreeListContextProvider.d.ts +2 -2
- package/node/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContextProvider/InfiniteTreeListContextProvider.js +3 -1
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/styles.js +8 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/InfiniteTreeListItem.js +6 -3
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/constants.d.ts +2 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/constants.js +2 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/index.js +3 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/styles.d.ts +14 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/styles.js +67 -3
- package/node/components/InfiniteTreeList/LevelHeader/LevelHeader.d.ts +5 -0
- package/node/components/InfiniteTreeList/LevelHeader/LevelHeader.js +21 -0
- package/node/components/InfiniteTreeList/LevelHeader/constants.d.ts +3 -0
- package/node/components/InfiniteTreeList/LevelHeader/constants.js +6 -0
- package/node/components/InfiniteTreeList/LevelHeader/index.d.ts +2 -0
- package/node/components/InfiniteTreeList/LevelHeader/index.js +18 -0
- package/node/components/InfiniteTreeList/LevelHeader/styles.d.ts +365 -0
- package/node/components/InfiniteTreeList/LevelHeader/styles.js +54 -0
- package/node/components/InfiniteTreeList/LevelHeader/types.d.ts +14 -0
- package/node/components/InfiniteTreeList/LevelHeader/types.js +2 -0
- package/node/components/InfiniteTreeList/ListFooter/styles.js +8 -0
- package/node/components/InfiniteTreeList/OnTopButton/styles.js +7 -0
- package/node/components/InfiniteTreeList/ParentItems/Item/Item.js +10 -2
- package/node/components/InfiniteTreeList/ParentItems/Item/useLogic/useLogic.d.ts +1 -0
- package/node/components/InfiniteTreeList/ParentItems/Item/useLogic/useLogic.js +10 -2
- package/node/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/NoDataRow.js +2 -2
- package/node/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/styles.d.ts +3 -0
- package/node/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/styles.js +14 -0
- package/node/components/InfiniteTreeList/TreeItem/TreeItem.js +6 -3
- package/node/components/InfiniteTreeList/TreeItem/styles.js +19 -0
- package/node/components/InfiniteTreeList/TreeItem/useLogic/useLogic.d.ts +2 -1
- package/node/components/InfiniteTreeList/TreeItem/useLogic/useLogic.js +4 -3
- package/node/components/InfiniteTreeList/constants.d.ts +21 -0
- package/node/components/InfiniteTreeList/constants.js +22 -1
- package/node/components/InfiniteTreeList/hooks/index.d.ts +2 -0
- package/node/components/InfiniteTreeList/hooks/index.js +2 -0
- package/node/components/InfiniteTreeList/hooks/useLevelNavigation/index.d.ts +2 -0
- package/node/components/InfiniteTreeList/hooks/useLevelNavigation/index.js +18 -0
- package/node/components/InfiniteTreeList/hooks/useLevelNavigation/types.d.ts +15 -0
- package/node/components/InfiniteTreeList/hooks/useLevelNavigation/types.js +2 -0
- package/node/components/InfiniteTreeList/hooks/useLevelNavigation/useLevelNavigation.d.ts +15 -0
- package/node/components/InfiniteTreeList/hooks/useLevelNavigation/useLevelNavigation.js +52 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/index.d.ts +3 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/index.js +19 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/index.d.ts +2 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/index.js +18 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/types.d.ts +16 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/types.js +2 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/useLevelSnapshots.d.ts +12 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/useLevelSnapshots.js +46 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/index.d.ts +2 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/index.js +18 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/types.d.ts +12 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/types.js +2 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/useScrollToTopButton.d.ts +15 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/useScrollToTopButton.js +31 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/index.d.ts +2 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/index.js +18 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/types.d.ts +11 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/types.js +2 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/useTailWatcher.d.ts +12 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/useTailWatcher.js +43 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/types.d.ts +14 -2
- package/node/components/InfiniteTreeList/hooks/useListScroll/useListScroll.d.ts +9 -6
- package/node/components/InfiniteTreeList/hooks/useListScroll/useListScroll.js +190 -26
- package/node/components/InfiniteTreeList/hooks/useListScroll/utils/getOffsetTop/getOffsetTop.d.ts +4 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/utils/getOffsetTop/getOffsetTop.js +10 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/utils/getOffsetTop/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/utils/getOffsetTop/index.js +17 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/utils/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/utils/index.js +17 -0
- package/node/components/InfiniteTreeList/hooks/useNodeTitleValidation/index.d.ts +2 -0
- package/node/components/InfiniteTreeList/hooks/useNodeTitleValidation/index.js +18 -0
- package/node/components/InfiniteTreeList/hooks/useNodeTitleValidation/types.d.ts +14 -0
- package/node/components/InfiniteTreeList/hooks/useNodeTitleValidation/types.js +2 -0
- package/node/components/InfiniteTreeList/hooks/useNodeTitleValidation/useNodeTitleValidation.d.ts +5 -0
- package/node/components/InfiniteTreeList/hooks/useNodeTitleValidation/useNodeTitleValidation.js +22 -0
- package/node/components/InfiniteTreeList/styles.d.ts +5 -0
- package/node/components/InfiniteTreeList/styles.js +44 -0
- package/node/components/InfiniteTreeList/types.d.ts +4 -0
- package/node/components/InfiniteTreeList/useLogic/useLogic.d.ts +13 -5
- package/node/components/InfiniteTreeList/useLogic/useLogic.js +162 -24
- package/node/components/InfiniteTreeList/utils/checkHasFooterContent/checkHasFooterContent.d.ts +5 -0
- package/node/components/InfiniteTreeList/utils/checkHasFooterContent/checkHasFooterContent.js +8 -0
- package/node/components/InfiniteTreeList/utils/checkHasFooterContent/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/utils/checkHasFooterContent/index.js +17 -0
- package/node/components/InfiniteTreeList/utils/checkHasNested/checkHasNested.d.ts +6 -0
- package/node/components/InfiniteTreeList/utils/checkHasNested/checkHasNested.js +9 -0
- package/node/components/InfiniteTreeList/utils/checkHasNested/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/utils/checkHasNested/index.js +17 -0
- package/node/components/InfiniteTreeList/utils/createTailRegistry/createTailRegistry.d.ts +8 -3
- package/node/components/InfiniteTreeList/utils/createTailRegistry/createTailRegistry.js +30 -12
- package/node/components/InfiniteTreeList/utils/flattenTree/flattenTree.js +2 -1
- package/node/components/InfiniteTreeList/utils/getLevelKey/getLevelKey.d.ts +4 -0
- package/node/components/InfiniteTreeList/utils/getLevelKey/getLevelKey.js +9 -0
- package/node/components/InfiniteTreeList/utils/getLevelKey/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/utils/getLevelKey/index.js +17 -0
- package/node/components/InfiniteTreeList/utils/index.d.ts +3 -0
- package/node/components/InfiniteTreeList/utils/index.js +3 -0
- package/node/components/PageHeader/MobilePageActions/MobilePageActions.js +2 -2
- package/node/components/PageHeader/MobilePageActions/useLogic/useLogic.d.ts +1 -0
- package/node/components/PageHeader/MobilePageActions/useLogic/useLogic.js +3 -0
- package/node/components/PageHeader/PageActions/MainActions/MainActions.d.ts +1 -1
- package/node/components/PageHeader/PageActions/MainActions/MainActions.js +2 -2
- package/node/components/PageHeader/PageActions/MainActions/styles.js +5 -0
- package/node/components/PageHeader/PageActions/PageActions.js +2 -2
- package/node/components/PageHeader/PageActions/SecondaryVisibleActions/SecondaryVisibleActions.d.ts +1 -1
- package/node/components/PageHeader/PageActions/SecondaryVisibleActions/SecondaryVisibleActions.js +3 -3
- package/node/components/PageHeader/PageActions/SecondaryVisibleActions/styles.d.ts +7 -1
- package/node/components/PageHeader/PageActions/useLogic/useLogic.d.ts +1 -0
- package/node/components/PageHeader/PageActions/useLogic/useLogic.js +3 -0
- package/node/components/index.d.ts +1 -1
- package/node/components/useScrollManagement/useScrollManagement.js +6 -5
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.useLogic = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const ConfigProvider_1 = require("../../ConfigProvider");
|
|
6
|
+
const useViewportType_1 = require("../../useViewportType");
|
|
6
7
|
const constants_1 = require("../constants");
|
|
7
8
|
const hooks_1 = require("../hooks");
|
|
8
9
|
const utils_1 = require("../utils");
|
|
@@ -12,6 +13,7 @@ const utils_1 = require("../utils");
|
|
|
12
13
|
*/
|
|
13
14
|
const useLogic = ({ initialExpandedLevel, items, onRetry, errorMsg, isError, isLoading, scrollRef, isEndReached, onLoadMore, renderItem, renderParent, itemSkeleton, endOfScrollMsg, noDataImgSrc, errorImgSrc, }) => {
|
|
14
15
|
const { imagesMap } = (0, react_1.useContext)(ConfigProvider_1.ConfigContext);
|
|
16
|
+
const { isMobile } = (0, useViewportType_1.useViewportType)();
|
|
15
17
|
const enterAnimation = (0, hooks_1.useEnterAnimation)();
|
|
16
18
|
const parentSlotsRef = (0, react_1.useRef)(null);
|
|
17
19
|
if (!parentSlotsRef.current) {
|
|
@@ -28,6 +30,7 @@ const useLogic = ({ initialExpandedLevel, items, onRetry, errorMsg, isError, isL
|
|
|
28
30
|
enterAnimation,
|
|
29
31
|
onCollapse: resetExpandNotification,
|
|
30
32
|
});
|
|
33
|
+
const skeletonCount = itemSkeleton ? constants_1.CHILDREN_SKELETON_COUNT : 1;
|
|
31
34
|
const { registerChildren, nodePaginationMap, parentItems } = (0, hooks_1.useChildrenState)({
|
|
32
35
|
items,
|
|
33
36
|
flatList,
|
|
@@ -37,49 +40,185 @@ const useLogic = ({ initialExpandedLevel, items, onRetry, errorMsg, isError, isL
|
|
|
37
40
|
enterAnimation,
|
|
38
41
|
insertChildren,
|
|
39
42
|
syncChildrenPlaceholders,
|
|
40
|
-
skeletonCount
|
|
43
|
+
skeletonCount,
|
|
41
44
|
releaseParentSlot,
|
|
42
45
|
});
|
|
43
|
-
const
|
|
46
|
+
const checkNodeExists = (0, react_1.useCallback)((nodeId) => flatList.some(({ id }) => id === nodeId), [flatList]);
|
|
47
|
+
const { currentNodeId, baseNodeId, activeLevelKeys, hasUpperLevel, isRootLevel, enterNode, leaveNode, } = (0, hooks_1.useLevelNavigation)({ items, isMobile, checkNodeExists });
|
|
48
|
+
const isBaseNodeExpanded = Boolean(baseNodeId && expandedIds.has(baseNodeId));
|
|
49
|
+
// Если корневой узел 1, то базовым уровнем становятся его дочерние элементы на
|
|
50
|
+
// мобильных устройствах
|
|
51
|
+
(0, react_1.useEffect)(() => {
|
|
52
|
+
if (!isMobile || !baseNodeId || isBaseNodeExpanded) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
onToggle({ id: baseNodeId });
|
|
56
|
+
}, [isMobile, baseNodeId, isBaseNodeExpanded, onToggle]);
|
|
57
|
+
const currentNode = (0, react_1.useMemo)(() => {
|
|
58
|
+
if (!currentNodeId) {
|
|
59
|
+
return undefined;
|
|
60
|
+
}
|
|
61
|
+
return flatList.find(({ id }) => id === currentNodeId);
|
|
62
|
+
}, [currentNodeId, flatList]);
|
|
63
|
+
const levelTitle = currentNode?.title;
|
|
64
|
+
(0, hooks_1.useNodeTitleValidation)({
|
|
65
|
+
isMobile,
|
|
66
|
+
currentNodeId: currentNode?.id,
|
|
67
|
+
title: levelTitle,
|
|
68
|
+
});
|
|
69
|
+
const displayedList = (0, react_1.useMemo)(() => {
|
|
70
|
+
if (!isMobile) {
|
|
71
|
+
return flatList;
|
|
72
|
+
}
|
|
73
|
+
if (!currentNodeId) {
|
|
74
|
+
return flatList.filter((item) => item.meta.level === 0);
|
|
75
|
+
}
|
|
76
|
+
return flatList.filter((item) => item.meta.parentId === currentNodeId);
|
|
77
|
+
}, [isMobile, flatList, currentNodeId]);
|
|
78
|
+
// Уровни живут только на мобильной ширине
|
|
79
|
+
const levelKey = (0, utils_1.getLevelKey)(isMobile ? currentNodeId : undefined);
|
|
80
|
+
const { scrollParent, listRef, tailRegistry, isEndReachedWithScroll, virtuosoProps, onTopButtonProps, saveLevelSnapshot, dropLevelSnapshot, } = (0, hooks_1.useListScroll)({
|
|
44
81
|
scrollRef,
|
|
45
82
|
isEndReached,
|
|
46
83
|
onLoadMore,
|
|
47
|
-
|
|
84
|
+
displayedList,
|
|
48
85
|
enterAnimation,
|
|
86
|
+
isRootLevel,
|
|
87
|
+
levelKey,
|
|
88
|
+
activeLevelKeys,
|
|
49
89
|
});
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
90
|
+
// Смена уровня — не появление строк, анимировать их не нужно
|
|
91
|
+
const prevLevelKeyRef = (0, react_1.useRef)(levelKey);
|
|
92
|
+
(0, react_1.useEffect)(() => {
|
|
93
|
+
if (prevLevelKeyRef.current === levelKey) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
prevLevelKeyRef.current = levelKey;
|
|
97
|
+
enterAnimation.reset();
|
|
98
|
+
}, [levelKey, enterAnimation]);
|
|
99
|
+
const prepareNodeChildren = (0, react_1.useCallback)((listItem) => {
|
|
100
|
+
if (!expandedIdsRef.current.has(listItem.id)) {
|
|
101
|
+
onToggle(listItem);
|
|
102
|
+
}
|
|
103
|
+
const hasChildrenInList = Boolean(listItem.children?.length) ||
|
|
104
|
+
(0, utils_1.countDirectChildren)(flatListRef.current, listItem.id) > 0;
|
|
105
|
+
if (!hasChildrenInList) {
|
|
106
|
+
syncChildrenPlaceholders(listItem.id, true, skeletonCount);
|
|
107
|
+
}
|
|
108
|
+
}, [
|
|
109
|
+
onToggle,
|
|
110
|
+
flatListRef,
|
|
111
|
+
expandedIdsRef,
|
|
112
|
+
syncChildrenPlaceholders,
|
|
113
|
+
skeletonCount,
|
|
114
|
+
]);
|
|
115
|
+
// На мобильной ширине дети узла открываются отдельным уровнем
|
|
116
|
+
const handleEnterNode = (0, react_1.useCallback)((item) => {
|
|
117
|
+
const listItem = flatListRef.current.find(({ id }) => id === item.id);
|
|
118
|
+
if (!listItem?.meta.hasNested) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
prepareNodeChildren(listItem);
|
|
122
|
+
// Открытие уровня — не появление строк, анимировать их не нужно
|
|
123
|
+
enterAnimation.reset();
|
|
124
|
+
saveLevelSnapshot();
|
|
125
|
+
// Переход внутрь узла показывает уровень с начала
|
|
126
|
+
dropLevelSnapshot((0, utils_1.getLevelKey)(item.id));
|
|
127
|
+
enterNode(item.id);
|
|
128
|
+
}, [
|
|
129
|
+
flatListRef,
|
|
130
|
+
prepareNodeChildren,
|
|
131
|
+
enterAnimation,
|
|
132
|
+
saveLevelSnapshot,
|
|
133
|
+
dropLevelSnapshot,
|
|
134
|
+
enterNode,
|
|
135
|
+
]);
|
|
136
|
+
const handleToggle = (0, react_1.useCallback)((item) => {
|
|
137
|
+
if (isMobile) {
|
|
138
|
+
handleEnterNode(item);
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
onToggle(item);
|
|
142
|
+
}, [isMobile, handleEnterNode, onToggle]);
|
|
143
|
+
const handleLeaveLevel = (0, react_1.useCallback)(() => {
|
|
144
|
+
enterAnimation.reset();
|
|
145
|
+
saveLevelSnapshot();
|
|
146
|
+
leaveNode();
|
|
147
|
+
}, [saveLevelSnapshot, leaveNode, enterAnimation]);
|
|
148
|
+
const isNoData = !items?.length;
|
|
149
|
+
const state = (0, react_1.useMemo)(() => {
|
|
150
|
+
if (!isNoData) {
|
|
151
|
+
return undefined;
|
|
152
|
+
}
|
|
153
|
+
if (isLoading) {
|
|
154
|
+
return 'loading';
|
|
155
|
+
}
|
|
156
|
+
if (isError) {
|
|
157
|
+
return 'error';
|
|
158
|
+
}
|
|
159
|
+
return 'noData';
|
|
160
|
+
}, [isNoData, isLoading, isError]);
|
|
161
|
+
const contentStateProps = (0, react_1.useMemo)(() => ({
|
|
162
|
+
isLoading: state === 'loading',
|
|
163
|
+
isError: state === 'error',
|
|
164
|
+
loadingTitle: 'Загрузка данных',
|
|
165
|
+
errorState: {
|
|
166
|
+
imgAlt: 'Что-то пошло не так',
|
|
167
|
+
errorList: [errorMsg || ''],
|
|
168
|
+
imgSrc: errorImgSrc ?? imagesMap.defaultErrorImgSrc,
|
|
169
|
+
onRetry,
|
|
170
|
+
},
|
|
171
|
+
}), [state, errorMsg, errorImgSrc, onRetry, imagesMap]);
|
|
172
|
+
// Футер отвечает за корневой список
|
|
66
173
|
const footerContext = (0, react_1.useMemo)(() => ({
|
|
174
|
+
isLoading: isRootLevel && isLoading,
|
|
175
|
+
isError: isRootLevel && isError,
|
|
176
|
+
isEndReached: isRootLevel && isEndReachedWithScroll,
|
|
177
|
+
endOfScrollMsg,
|
|
178
|
+
onRetry,
|
|
179
|
+
}), [
|
|
180
|
+
isRootLevel,
|
|
67
181
|
isLoading,
|
|
68
182
|
isError,
|
|
69
|
-
|
|
183
|
+
isEndReachedWithScroll,
|
|
70
184
|
endOfScrollMsg,
|
|
71
185
|
onRetry,
|
|
72
|
-
|
|
186
|
+
]);
|
|
187
|
+
const lastRowId = (0, react_1.useMemo)(() => {
|
|
188
|
+
if ((0, utils_1.checkHasFooterContent)(footerContext)) {
|
|
189
|
+
return undefined;
|
|
190
|
+
}
|
|
191
|
+
return displayedList[displayedList.length - 1]?.id;
|
|
192
|
+
}, [footerContext, displayedList]);
|
|
193
|
+
const levelHeaderProps = (0, react_1.useMemo)(() => {
|
|
194
|
+
if (!isMobile || !currentNodeId) {
|
|
195
|
+
return undefined;
|
|
196
|
+
}
|
|
197
|
+
if (!levelTitle && !hasUpperLevel) {
|
|
198
|
+
return undefined;
|
|
199
|
+
}
|
|
200
|
+
return {
|
|
201
|
+
title: levelTitle,
|
|
202
|
+
hasBackButton: hasUpperLevel,
|
|
203
|
+
onBack: handleLeaveLevel,
|
|
204
|
+
};
|
|
205
|
+
}, [isMobile, currentNodeId, levelTitle, hasUpperLevel, handleLeaveLevel]);
|
|
73
206
|
return {
|
|
74
|
-
|
|
75
|
-
|
|
207
|
+
displayedList,
|
|
208
|
+
levelKey,
|
|
209
|
+
lastRowId,
|
|
210
|
+
levelHeaderProps,
|
|
211
|
+
onToggle: handleToggle,
|
|
76
212
|
nodePaginationMap,
|
|
77
213
|
registerChildren,
|
|
78
214
|
notifyExpand,
|
|
79
215
|
parentItems,
|
|
80
216
|
acquireParentSlot,
|
|
81
217
|
contentStateProps,
|
|
218
|
+
isNoData,
|
|
219
|
+
state,
|
|
82
220
|
scrollParent,
|
|
221
|
+
listRef,
|
|
83
222
|
virtuosoProps,
|
|
84
223
|
footerContext,
|
|
85
224
|
onTopButtonProps,
|
|
@@ -88,7 +227,6 @@ const useLogic = ({ initialExpandedLevel, items, onRetry, errorMsg, isError, isL
|
|
|
88
227
|
// Fallback подставляется один раз: ниже по дереву строка выбирает функцию по
|
|
89
228
|
// типу узла, не проверяя, передал ли потребитель renderParent
|
|
90
229
|
renderParent: renderParent ?? renderItem,
|
|
91
|
-
items,
|
|
92
230
|
onRetry,
|
|
93
231
|
noDataImgSrc,
|
|
94
232
|
enterAnimation,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checkHasFooterContent = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Проверяет, покажет ли футер списка placeholder
|
|
6
|
+
*/
|
|
7
|
+
const checkHasFooterContent = ({ isLoading, isError, isEndReached, }) => Boolean(isLoading || isError || isEndReached);
|
|
8
|
+
exports.checkHasFooterContent = checkHasFooterContent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './checkHasFooterContent';
|
|
@@ -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("./checkHasFooterContent"), exports);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { InfiniteTreeListData } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Проверяет, есть ли у элемента вложенность: тем же признаком список решает,
|
|
4
|
+
* рисовать ли строке Chevron, а мобильный режим — уводит ли строка внутрь узла
|
|
5
|
+
*/
|
|
6
|
+
export declare const checkHasNested: <TData extends InfiniteTreeListData<TData>>(item: TData) => boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checkHasNested = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Проверяет, есть ли у элемента вложенность: тем же признаком список решает,
|
|
6
|
+
* рисовать ли строке Chevron, а мобильный режим — уводит ли строка внутрь узла
|
|
7
|
+
*/
|
|
8
|
+
const checkHasNested = (item) => Boolean(item.children) || item.hasChildren === true;
|
|
9
|
+
exports.checkHasNested = checkHasNested;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './checkHasNested';
|
|
@@ -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("./checkHasNested"), exports);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export type TailRegistry = {
|
|
2
2
|
/**
|
|
3
3
|
* Регистрирует хвост ветки. Тот же `parentId` и `itemId` — обновляет callback.
|
|
4
|
-
* Новый `itemId` сбрасывает `isLoadMoreRequested`
|
|
4
|
+
* Новый `itemId` сбрасывает `isLoadMoreRequested` и сразу проверяет хвост
|
|
5
|
+
* по последнему известному диапазону
|
|
5
6
|
*/
|
|
6
7
|
register: (parentId: string, itemId: string, endReached: () => void) => void;
|
|
7
8
|
/**
|
|
@@ -9,10 +10,14 @@ export type TailRegistry = {
|
|
|
9
10
|
*/
|
|
10
11
|
unregister: (parentId: string, itemId?: string) => void;
|
|
11
12
|
/**
|
|
12
|
-
*
|
|
13
|
-
* `getIndex === -1` пропускает запись
|
|
13
|
+
* Запоминает видимый диапазон и вызывает `endReached` для хвостов, чей индекс
|
|
14
|
+
* в него попадает. `getIndex === -1` пропускает запись
|
|
14
15
|
*/
|
|
15
16
|
checkRange: (endIndex: number, getIndex: (itemId: string) => number) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Забывает запомненный диапазон: он относится к прежнему набору строк
|
|
19
|
+
*/
|
|
20
|
+
forgetRange: () => void;
|
|
16
21
|
};
|
|
17
22
|
/**
|
|
18
23
|
* Реестр хвостов вложенных веток. Живёт на экземпляре списка и переживает
|
|
@@ -7,6 +7,22 @@ exports.createTailRegistry = void 0;
|
|
|
7
7
|
*/
|
|
8
8
|
const createTailRegistry = () => {
|
|
9
9
|
const entries = new Map();
|
|
10
|
+
// Диапазон приходит от виртуализации раньше, чем монтируется строка хвоста:
|
|
11
|
+
// без запоминания диапазона хвост, видимый с первого кадра уровня, не
|
|
12
|
+
// сработал бы вовсе
|
|
13
|
+
let lastEndIndex = null;
|
|
14
|
+
let lastGetIndex = null;
|
|
15
|
+
const checkEntry = (entry) => {
|
|
16
|
+
if (entry.isLoadMoreRequested || lastEndIndex === null || !lastGetIndex) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const index = lastGetIndex(entry.itemId);
|
|
20
|
+
if (index === -1 || lastEndIndex < index) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
entry.isLoadMoreRequested = true;
|
|
24
|
+
entry.endReached();
|
|
25
|
+
};
|
|
10
26
|
return {
|
|
11
27
|
register(parentId, itemId, endReached) {
|
|
12
28
|
const existing = entries.get(parentId);
|
|
@@ -14,7 +30,13 @@ const createTailRegistry = () => {
|
|
|
14
30
|
existing.endReached = endReached;
|
|
15
31
|
return;
|
|
16
32
|
}
|
|
17
|
-
|
|
33
|
+
const entry = {
|
|
34
|
+
itemId,
|
|
35
|
+
endReached,
|
|
36
|
+
isLoadMoreRequested: false,
|
|
37
|
+
};
|
|
38
|
+
entries.set(parentId, entry);
|
|
39
|
+
checkEntry(entry);
|
|
18
40
|
},
|
|
19
41
|
unregister(parentId, itemId) {
|
|
20
42
|
if (itemId === undefined) {
|
|
@@ -27,17 +49,13 @@ const createTailRegistry = () => {
|
|
|
27
49
|
}
|
|
28
50
|
},
|
|
29
51
|
checkRange(endIndex, getIndex) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
entry.isLoadMoreRequested = true;
|
|
39
|
-
entry.endReached();
|
|
40
|
-
});
|
|
52
|
+
lastEndIndex = endIndex;
|
|
53
|
+
lastGetIndex = getIndex;
|
|
54
|
+
entries.forEach(checkEntry);
|
|
55
|
+
},
|
|
56
|
+
forgetRange() {
|
|
57
|
+
lastEndIndex = null;
|
|
58
|
+
lastGetIndex = null;
|
|
41
59
|
},
|
|
42
60
|
};
|
|
43
61
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.flattenTree = void 0;
|
|
4
|
+
const checkHasNested_1 = require("../checkHasNested");
|
|
4
5
|
/**
|
|
5
6
|
* Проверяет, подгружаются ли дочерние элементы узла отдельно.
|
|
6
7
|
*/
|
|
@@ -18,7 +19,7 @@ const flattenTree = (items, expandedIds, parentPath = [], level = 0, parentId) =
|
|
|
18
19
|
const flattenedItem = {
|
|
19
20
|
...item,
|
|
20
21
|
meta: {
|
|
21
|
-
hasNested:
|
|
22
|
+
hasNested: (0, checkHasNested_1.checkHasNested)(item),
|
|
22
23
|
isChildrenAsync,
|
|
23
24
|
level,
|
|
24
25
|
path,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getLevelKey = void 0;
|
|
4
|
+
const constants_1 = require("../../constants");
|
|
5
|
+
/**
|
|
6
|
+
* Ключ уровня для снимков скролла и пересоздания списка
|
|
7
|
+
*/
|
|
8
|
+
const getLevelKey = (nodeId) => nodeId === undefined ? constants_1.ROOT_LEVEL_KEY : `${constants_1.NODE_LEVEL_KEY_PREFIX}${nodeId}`;
|
|
9
|
+
exports.getLevelKey = getLevelKey;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './getLevelKey';
|
|
@@ -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("./getLevelKey"), exports);
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export * from './checkHasFooterContent';
|
|
2
|
+
export * from './checkHasNested';
|
|
1
3
|
export * from './checkHasSkeletonPlaceholders';
|
|
2
4
|
export * from './checkIsChildrenPlaceholder';
|
|
3
5
|
export * from './checkIsChildrenPlaceholderOf';
|
|
@@ -12,6 +14,7 @@ export * from './flattenTree';
|
|
|
12
14
|
export * from './getEnteringChildren';
|
|
13
15
|
export * from './getIdsToKeep';
|
|
14
16
|
export * from './getInitialExpandedIds';
|
|
17
|
+
export * from './getLevelKey';
|
|
15
18
|
export * from './getNestedItems';
|
|
16
19
|
export * from './insertChildren';
|
|
17
20
|
export * from './removeChildren';
|
|
@@ -14,6 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./checkHasFooterContent"), exports);
|
|
18
|
+
__exportStar(require("./checkHasNested"), exports);
|
|
17
19
|
__exportStar(require("./checkHasSkeletonPlaceholders"), exports);
|
|
18
20
|
__exportStar(require("./checkIsChildrenPlaceholder"), exports);
|
|
19
21
|
__exportStar(require("./checkIsChildrenPlaceholderOf"), exports);
|
|
@@ -28,6 +30,7 @@ __exportStar(require("./flattenTree"), exports);
|
|
|
28
30
|
__exportStar(require("./getEnteringChildren"), exports);
|
|
29
31
|
__exportStar(require("./getIdsToKeep"), exports);
|
|
30
32
|
__exportStar(require("./getInitialExpandedIds"), exports);
|
|
33
|
+
__exportStar(require("./getLevelKey"), exports);
|
|
31
34
|
__exportStar(require("./getNestedItems"), exports);
|
|
32
35
|
__exportStar(require("./insertChildren"), exports);
|
|
33
36
|
__exportStar(require("./removeChildren"), exports);
|
|
@@ -6,11 +6,11 @@ const PageActions_1 = require("../PageActions");
|
|
|
6
6
|
const styles_1 = require("./styles");
|
|
7
7
|
const useLogic_1 = require("./useLogic");
|
|
8
8
|
const MobilePageActions = (props) => {
|
|
9
|
-
const { disabledAction, isActive, handleToggle, visibleMainActions, hiddenMainActions, isVisibleShowMoreButton, isLoading, } = (0, useLogic_1.useLogic)(props);
|
|
9
|
+
const { disabledAction, isRenderActionDisabled, isActive, handleToggle, visibleMainActions, hiddenMainActions, isVisibleShowMoreButton, isLoading, } = (0, useLogic_1.useLogic)(props);
|
|
10
10
|
const { secondary, secondaryVisible, className } = props;
|
|
11
11
|
if (isLoading) {
|
|
12
12
|
return null;
|
|
13
13
|
}
|
|
14
|
-
return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { className: className, role: "presentation", children: [(0, jsx_runtime_1.jsxs)(styles_1.ActionWrapper, { children: [(0, jsx_runtime_1.jsx)(styles_1.StyledMainActions, { actions: visibleMainActions, isDisabled: disabledAction, "$isVisibleShowMoreButton": isVisibleShowMoreButton, size: "large" }), (0, jsx_runtime_1.jsxs)(styles_1.StyledCollapse, { in: isActive, children: [(0, jsx_runtime_1.jsx)(PageActions_1.MainActions, { isDisabled: disabledAction, actions: hiddenMainActions, size: "large" }), (0, jsx_runtime_1.jsxs)(styles_1.SecondaryActionsWrapper, { children: [secondaryVisible && ((0, jsx_runtime_1.jsx)(PageActions_1.SecondaryVisibleActions, { actions: secondaryVisible, size: "large" })), secondary && ((0, jsx_runtime_1.jsx)(PageActions_1.SecondaryActions, { isDisabled: disabledAction, actions: secondary, size: "large" }))] })] })] }), isVisibleShowMoreButton && ((0, jsx_runtime_1.jsx)(styles_1.ShowMoreButton, { onClick: handleToggle, children: isActive ? 'Скрыть другие действия' : 'Показать другие действия' }))] }));
|
|
14
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { className: className, role: "presentation", children: [(0, jsx_runtime_1.jsxs)(styles_1.ActionWrapper, { children: [(0, jsx_runtime_1.jsx)(styles_1.StyledMainActions, { actions: visibleMainActions, isDisabled: disabledAction, "$isVisibleShowMoreButton": isVisibleShowMoreButton, size: "large", isRenderActionDisabled: isRenderActionDisabled }), (0, jsx_runtime_1.jsxs)(styles_1.StyledCollapse, { in: isActive, children: [(0, jsx_runtime_1.jsx)(PageActions_1.MainActions, { isDisabled: disabledAction, actions: hiddenMainActions, size: "large", isRenderActionDisabled: isRenderActionDisabled }), (0, jsx_runtime_1.jsxs)(styles_1.SecondaryActionsWrapper, { children: [secondaryVisible && ((0, jsx_runtime_1.jsx)(PageActions_1.SecondaryVisibleActions, { actions: secondaryVisible, size: "large", isRenderActionDisabled: true })), secondary && ((0, jsx_runtime_1.jsx)(PageActions_1.SecondaryActions, { isDisabled: disabledAction, actions: secondary, size: "large" }))] })] })] }), isVisibleShowMoreButton && ((0, jsx_runtime_1.jsx)(styles_1.ShowMoreButton, { onClick: handleToggle, children: isActive ? 'Скрыть другие действия' : 'Показать другие действия' }))] }));
|
|
15
15
|
};
|
|
16
16
|
exports.MobilePageActions = MobilePageActions;
|
|
@@ -3,6 +3,7 @@ import { type MobilePageActionsProps } from '../MobilePageActions';
|
|
|
3
3
|
type UseLogicParams<TMainActionComponent extends ElementType = ElementType, TSecondaryActionComponent extends ElementType = ElementType> = MobilePageActionsProps<TMainActionComponent, TSecondaryActionComponent>;
|
|
4
4
|
export declare const useLogic: <TMainActionComponent extends ElementType = ElementType, TSecondaryActionComponent extends ElementType = ElementType>({ main, secondary, secondaryVisible, isLoading, }: UseLogicParams<TMainActionComponent, TSecondaryActionComponent>) => {
|
|
5
5
|
disabledAction: boolean;
|
|
6
|
+
isRenderActionDisabled: boolean;
|
|
6
7
|
isActive: boolean;
|
|
7
8
|
handleToggle: () => void;
|
|
8
9
|
visibleMainActions: import("../../../ActionGroup").MainAction<TMainActionComponent>[] | undefined;
|
|
@@ -3,9 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.useLogic = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const ActionGroup_1 = require("../../../ActionGroup");
|
|
6
|
+
const useViewportType_1 = require("../../../useViewportType");
|
|
6
7
|
const useLogic = ({ main, secondary, secondaryVisible, isLoading, }) => {
|
|
7
8
|
const [isActive, setIsActive] = (0, react_1.useState)(false);
|
|
8
9
|
const { disabledAction } = (0, ActionGroup_1.useActionsState)({ main, secondary });
|
|
10
|
+
const { isMobile } = (0, useViewportType_1.useViewportType)();
|
|
9
11
|
const handleToggle = () => {
|
|
10
12
|
setIsActive(!isActive);
|
|
11
13
|
};
|
|
@@ -13,6 +15,7 @@ const useLogic = ({ main, secondary, secondaryVisible, isLoading, }) => {
|
|
|
13
15
|
const hiddenMainActions = main?.slice(2);
|
|
14
16
|
return {
|
|
15
17
|
disabledAction,
|
|
18
|
+
isRenderActionDisabled: !isMobile,
|
|
16
19
|
isActive,
|
|
17
20
|
handleToggle,
|
|
18
21
|
visibleMainActions,
|
|
@@ -13,5 +13,5 @@ type PageMainActionsProps<TMainActionComponent extends ElementType> = Omit<MainA
|
|
|
13
13
|
*/
|
|
14
14
|
spacing?: number;
|
|
15
15
|
};
|
|
16
|
-
export declare const MainActions: <TMainActionComponent extends ElementType = ElementType>({ actions, isDisabled, className, size, spacing, }: PageMainActionsProps<TMainActionComponent>) => import("react/jsx-runtime").JSX.Element | null;
|
|
16
|
+
export declare const MainActions: <TMainActionComponent extends ElementType = ElementType>({ actions, isDisabled, className, size, spacing, isRenderActionDisabled, }: PageMainActionsProps<TMainActionComponent>) => import("react/jsx-runtime").JSX.Element | null;
|
|
17
17
|
export {};
|
|
@@ -4,10 +4,10 @@ exports.MainActions = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const ActionGroup_1 = require("../../../ActionGroup");
|
|
6
6
|
const styles_1 = require("./styles");
|
|
7
|
-
const MainActions = ({ actions, isDisabled, className, size, spacing = 2, }) => {
|
|
7
|
+
const MainActions = ({ actions, isDisabled, className, size, spacing = 2, isRenderActionDisabled, }) => {
|
|
8
8
|
if (!actions || (actions && actions.length === 0)) {
|
|
9
9
|
return null;
|
|
10
10
|
}
|
|
11
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.Wrapper, { className: className, "$spacing": spacing, children: (0, jsx_runtime_1.jsx)(ActionGroup_1.MainActions, { actions: actions ?? [], isDisabled: isDisabled, size: size }) }));
|
|
11
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.Wrapper, { className: className, "$spacing": spacing, children: (0, jsx_runtime_1.jsx)(ActionGroup_1.MainActions, { actions: actions ?? [], isDisabled: isDisabled, size: size, isRenderActionDisabled: isRenderActionDisabled }) }));
|
|
12
12
|
};
|
|
13
13
|
exports.MainActions = MainActions;
|
|
@@ -2,12 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Wrapper = void 0;
|
|
4
4
|
const Button_1 = require("@mui/material/Button");
|
|
5
|
+
const ActionGroup_1 = require("../../../ActionGroup");
|
|
5
6
|
const styled_1 = require("../../../styled");
|
|
6
7
|
const Tooltip_1 = require("../../../Tooltip");
|
|
7
8
|
exports.Wrapper = styled_1.styled.div `
|
|
8
9
|
display: flex;
|
|
9
10
|
gap: ${({ theme, $spacing }) => theme.spacing($spacing)};
|
|
10
11
|
|
|
12
|
+
.${ActionGroup_1.actionGroupClassnames.action} {
|
|
13
|
+
flex-grow: 1;
|
|
14
|
+
}
|
|
15
|
+
|
|
11
16
|
${({ theme }) => theme.breakpoints.down('mobile')} {
|
|
12
17
|
flex-wrap: wrap;
|
|
13
18
|
gap: ${({ theme }) => theme.spacing(2)};
|
|
@@ -14,10 +14,10 @@ const styles_1 = require("./styles");
|
|
|
14
14
|
const useLogic_1 = require("./useLogic");
|
|
15
15
|
const PageActionsInner = (props, ref) => {
|
|
16
16
|
const { secondary, secondaryVisible, main, className, isLoading, size = 'medium', spacing = 2, } = props;
|
|
17
|
-
const { disabledAction, buttonClassnames, isFocusedMode, handleClick, tooltipTitle, collapsedActions, classnames, } = (0, useLogic_1.useLogic)(props);
|
|
17
|
+
const { disabledAction, isRenderActionDisabled, buttonClassnames, isFocusedMode, handleClick, tooltipTitle, collapsedActions, classnames, } = (0, useLogic_1.useLogic)(props);
|
|
18
18
|
if (isLoading) {
|
|
19
19
|
return ((0, jsx_runtime_1.jsx)(styles_1.Wrapper, { children: (0, jsx_runtime_1.jsx)(PageActionSkeleton_1.PageActionSkeleton, { size: size }) }));
|
|
20
20
|
}
|
|
21
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.Wrapper, { className: className, ref: ref, children: (0, jsx_runtime_1.jsxs)(styles_1.ActionWrapper, { "$spacing": spacing, children: [(0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { title: tooltipTitle, enterDelay: 400, enterNextDelay: 400, placement: "bottom-end", children: (0, jsx_runtime_1.jsx)(styles_1.FocusModeButton, { className: buttonClassnames, variant: "outlined", onClick: handleClick, "aria-label": tooltipTitle, color: "grey", children: isFocusedMode ? (0, jsx_runtime_1.jsx)(MinimizeOutlineMd_1.MinimizeOutlineMd, {}) : (0, jsx_runtime_1.jsx)(FullSizeOutlineMd_1.FullSizeOutlineMd, {}) }) }), (0, jsx_runtime_1.jsx)(styles_1.MainActionsWrapper, { "$spacing": spacing, className: classnames, children: (0, jsx_runtime_1.jsx)(MainActions_1.MainActions, { isDisabled: disabledAction, actions: main, size: size, spacing: spacing }) }), (secondaryVisible || secondary) && ((0, jsx_runtime_1.jsxs)(styles_1.SecondaryVisibleWrapper, { "$spacing": spacing, className: classnames, children: [secondaryVisible && ((0, jsx_runtime_1.jsx)(SecondaryVisibleActions_1.SecondaryVisibleActions, { actions: secondaryVisible, size: size })), secondary && ((0, jsx_runtime_1.jsx)(SecondaryActions_1.SecondaryActions, { isDisabled: disabledAction, actions: secondary, size: size }))] })), collapsedActions.length > 0 && ((0, jsx_runtime_1.jsx)(styles_1.CollapsedActionsWrapper, { className: classnames, children: (0, jsx_runtime_1.jsx)(SecondaryActions_1.SecondaryActions, { isDisabled: disabledAction, actions: collapsedActions, size: size }) }))] }) }));
|
|
21
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.Wrapper, { className: className, ref: ref, children: (0, jsx_runtime_1.jsxs)(styles_1.ActionWrapper, { "$spacing": spacing, children: [(0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { title: tooltipTitle, enterDelay: 400, enterNextDelay: 400, placement: "bottom-end", children: (0, jsx_runtime_1.jsx)(styles_1.FocusModeButton, { className: buttonClassnames, variant: "outlined", onClick: handleClick, "aria-label": tooltipTitle, color: "grey", children: isFocusedMode ? (0, jsx_runtime_1.jsx)(MinimizeOutlineMd_1.MinimizeOutlineMd, {}) : (0, jsx_runtime_1.jsx)(FullSizeOutlineMd_1.FullSizeOutlineMd, {}) }) }), (0, jsx_runtime_1.jsx)(styles_1.MainActionsWrapper, { "$spacing": spacing, className: classnames, children: (0, jsx_runtime_1.jsx)(MainActions_1.MainActions, { isDisabled: disabledAction, actions: main, size: size, spacing: spacing, isRenderActionDisabled: isRenderActionDisabled }) }), (secondaryVisible || secondary) && ((0, jsx_runtime_1.jsxs)(styles_1.SecondaryVisibleWrapper, { "$spacing": spacing, className: classnames, children: [secondaryVisible && ((0, jsx_runtime_1.jsx)(SecondaryVisibleActions_1.SecondaryVisibleActions, { actions: secondaryVisible, size: size, isRenderActionDisabled: isRenderActionDisabled })), secondary && ((0, jsx_runtime_1.jsx)(SecondaryActions_1.SecondaryActions, { isDisabled: disabledAction, actions: secondary, size: size }))] })), collapsedActions.length > 0 && ((0, jsx_runtime_1.jsx)(styles_1.CollapsedActionsWrapper, { className: classnames, children: (0, jsx_runtime_1.jsx)(SecondaryActions_1.SecondaryActions, { isDisabled: disabledAction, actions: collapsedActions, size: size }) }))] }) }));
|
|
22
22
|
};
|
|
23
23
|
exports.PageActions = (0, forwardRefWithGeneric_1.forwardRefWithGeneric)(PageActionsInner);
|
package/node/components/PageHeader/PageActions/SecondaryVisibleActions/SecondaryVisibleActions.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type SecondaryVisibleActionProps } from '../../../ActionGroup';
|
|
2
|
-
export declare const SecondaryVisibleActions: ({ actions, size, }: SecondaryVisibleActionProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const SecondaryVisibleActions: ({ actions, size, isRenderActionDisabled, }: SecondaryVisibleActionProps) => import("react/jsx-runtime").JSX.Element;
|
package/node/components/PageHeader/PageActions/SecondaryVisibleActions/SecondaryVisibleActions.js
CHANGED
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SecondaryVisibleActions = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const styles_1 = require("./styles");
|
|
6
|
-
const SecondaryVisibleActions = ({ actions, size = 'medium', }) => {
|
|
7
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [actions.map(({ disabledReason, isBlockingOperation, icon, name, ...restActionProps }) => {
|
|
6
|
+
const SecondaryVisibleActions = ({ actions, size = 'medium', isRenderActionDisabled, }) => {
|
|
7
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [actions.map(({ disabledReason, isBlockingOperation, icon, name, renderAction, ...restActionProps }) => {
|
|
8
8
|
return ((0, jsx_runtime_1.jsx)(styles_1.StyledMobileButton, { variant: "outlined", size: size, color: "grey", ...restActionProps, children: name }, name));
|
|
9
|
-
}), (0, jsx_runtime_1.jsx)(styles_1.StyledSecondaryVisibleActions, { actions: actions, size: size })] }));
|
|
9
|
+
}), (0, jsx_runtime_1.jsx)(styles_1.StyledSecondaryVisibleActions, { actions: actions, size: size, isRenderActionDisabled: isRenderActionDisabled })] }));
|
|
10
10
|
};
|
|
11
11
|
exports.SecondaryVisibleActions = SecondaryVisibleActions;
|