@astral/ui 4.4.1 → 4.5.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/Tree/MultipleTreeList/MultipleTreeList.d.ts +2 -2
- package/components/Tree/MultipleTreeList/MultipleTreeList.js +1 -1
- package/components/Tree/MultipleTreeList/TreeItem/TreeItem.d.ts +10 -6
- package/components/Tree/MultipleTreeList/TreeItem/TreeItem.js +3 -2
- package/components/Tree/MultipleTreeList/TreeItem/useLogic/useLogic.d.ts +3 -2
- package/components/Tree/MultipleTreeList/TreeItem/useLogic/useLogic.js +24 -18
- package/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/checkIsIndeterminate/checkIsIndeterminate.d.ts +2 -1
- package/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/checkIsIndeterminate/checkIsIndeterminate.js +2 -1
- package/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/checkIsSelected/checkIsSelected.d.ts +2 -1
- package/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/checkIsSelected/checkIsSelected.js +2 -1
- package/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/findObjectsByIds/findObjectsByIds.d.ts +5 -0
- package/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/findObjectsByIds/findObjectsByIds.js +22 -0
- package/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/findObjectsByIds/index.d.ts +1 -0
- package/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/findObjectsByIds/index.js +1 -0
- package/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/getIdFromValue/getIdFromValue.d.ts +5 -0
- package/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/getIdFromValue/getIdFromValue.js +6 -0
- package/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/getIdFromValue/index.d.ts +1 -0
- package/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/getIdFromValue/index.js +1 -0
- package/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/getItemsToAdd/getItemsToAdd.d.ts +5 -0
- package/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/getItemsToAdd/getItemsToAdd.js +14 -0
- package/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/getItemsToAdd/index.d.ts +1 -0
- package/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/getItemsToAdd/index.js +1 -0
- package/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/index.d.ts +3 -0
- package/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/index.js +3 -0
- package/components/Tree/MultipleTreeList/types.d.ts +8 -4
- package/components/TreeAsyncAutocomplete/types.d.ts +14 -2
- package/components/TreeLikeAsyncAutocomplete/Input/Input.d.ts +3 -0
- package/components/TreeLikeAsyncAutocomplete/Input/Input.js +20 -0
- package/components/TreeLikeAsyncAutocomplete/Input/constants.d.ts +1 -0
- package/components/TreeLikeAsyncAutocomplete/Input/constants.js +1 -0
- package/components/TreeLikeAsyncAutocomplete/Input/index.d.ts +1 -0
- package/components/TreeLikeAsyncAutocomplete/Input/index.js +1 -0
- package/components/TreeLikeAsyncAutocomplete/Input/styles.d.ts +11 -0
- package/components/TreeLikeAsyncAutocomplete/Input/styles.js +27 -0
- package/components/TreeLikeAsyncAutocomplete/Input/types.d.ts +7 -0
- package/components/TreeLikeAsyncAutocomplete/Input/types.js +1 -0
- package/components/TreeLikeAsyncAutocomplete/Input/useLogic/index.d.ts +1 -0
- package/components/TreeLikeAsyncAutocomplete/Input/useLogic/index.js +1 -0
- package/components/TreeLikeAsyncAutocomplete/Input/useLogic/useLogic.d.ts +18 -0
- package/components/TreeLikeAsyncAutocomplete/Input/useLogic/useLogic.js +50 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/ErrorMessage/ErrorMessage.d.ts +13 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/ErrorMessage/ErrorMessage.js +6 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/ErrorMessage/index.d.ts +1 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/ErrorMessage/index.js +1 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/ErrorMessage/styles.d.ts +5 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/ErrorMessage/styles.js +10 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/Loader/Loader.d.ts +2 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/Loader/Loader.js +4 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/Loader/index.d.ts +1 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/Loader/index.js +1 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/Loader/styles.d.ts +5 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/Loader/styles.js +8 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/NoData/NoData.d.ts +2 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/NoData/NoData.js +6 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/NoData/index.d.ts +1 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/NoData/index.js +1 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/NoData/styles.d.ts +5 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/NoData/styles.js +8 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/OptionsModal.d.ts +3 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/OptionsModal.js +33 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/SearchSuggestion/SearchSuggestion.d.ts +2 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/SearchSuggestion/SearchSuggestion.js +6 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/SearchSuggestion/index.d.ts +1 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/SearchSuggestion/index.js +1 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/SearchSuggestion/styles.d.ts +5 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/SearchSuggestion/styles.js +8 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/constants.d.ts +1 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/constants.js +1 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/index.d.ts +1 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/index.js +1 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/styles.d.ts +19 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/styles.js +48 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/types.d.ts +69 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/types.js +1 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/useLogic/index.d.ts +1 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/useLogic/index.js +1 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/useLogic/useLogic.d.ts +27 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/useLogic/useLogic.js +92 -0
- package/components/TreeLikeAsyncAutocomplete/TreeLikeAsyncAutocomplete.d.ts +3 -0
- package/components/TreeLikeAsyncAutocomplete/TreeLikeAsyncAutocomplete.js +9 -0
- package/components/TreeLikeAsyncAutocomplete/constants.d.ts +2 -0
- package/components/TreeLikeAsyncAutocomplete/constants.js +2 -0
- package/components/TreeLikeAsyncAutocomplete/index.d.ts +2 -0
- package/components/TreeLikeAsyncAutocomplete/index.js +1 -0
- package/components/TreeLikeAsyncAutocomplete/types.d.ts +69 -0
- package/components/TreeLikeAsyncAutocomplete/types.js +1 -0
- package/components/TreeLikeAsyncAutocomplete/useLogic/index.d.ts +1 -0
- package/components/TreeLikeAsyncAutocomplete/useLogic/index.js +1 -0
- package/components/TreeLikeAsyncAutocomplete/useLogic/useLogic.d.ts +626 -0
- package/components/TreeLikeAsyncAutocomplete/useLogic/useLogic.js +82 -0
- package/components/TreeLikeAsyncAutocomplete/useLogic/utils/deepMultipleFind/deepMultipleFind.d.ts +3 -0
- package/components/TreeLikeAsyncAutocomplete/useLogic/utils/deepMultipleFind/deepMultipleFind.js +12 -0
- package/components/TreeLikeAsyncAutocomplete/useLogic/utils/deepMultipleFind/index.d.ts +1 -0
- package/components/TreeLikeAsyncAutocomplete/useLogic/utils/deepMultipleFind/index.js +1 -0
- package/components/TreeLikeAsyncAutocomplete/useLogic/utils/index.d.ts +1 -0
- package/components/TreeLikeAsyncAutocomplete/useLogic/utils/index.js +1 -0
- package/components/TreeLikeList/TreeItem/TreeItem.d.ts +3 -51
- package/components/TreeLikeList/TreeItem/TreeItem.js +3 -2
- package/components/TreeLikeList/TreeItem/types.d.ts +56 -0
- package/components/TreeLikeList/TreeItem/types.js +1 -0
- package/components/TreeLikeList/TreeItem/useLogic/useLogic.d.ts +4 -3
- package/components/TreeLikeList/TreeItem/useLogic/useLogic.js +22 -13
- package/components/TreeLikeList/TreeItem/useLogic/utils/addItem/addItem.d.ts +6 -0
- package/components/TreeLikeList/TreeItem/useLogic/utils/addItem/addItem.js +8 -0
- package/components/TreeLikeList/TreeItem/useLogic/utils/addItem/index.d.ts +1 -0
- package/components/TreeLikeList/TreeItem/useLogic/utils/addItem/index.js +1 -0
- package/components/TreeLikeList/TreeItem/useLogic/utils/addItemsByIds/addItemsByIds.d.ts +6 -0
- package/components/TreeLikeList/TreeItem/useLogic/utils/addItemsByIds/addItemsByIds.js +15 -0
- package/components/TreeLikeList/TreeItem/useLogic/utils/addItemsByIds/index.d.ts +1 -0
- package/components/TreeLikeList/TreeItem/useLogic/utils/addItemsByIds/index.js +1 -0
- package/components/TreeLikeList/TreeItem/useLogic/utils/checkIsSelected/checkIsSelected.d.ts +2 -1
- package/components/TreeLikeList/TreeItem/useLogic/utils/checkIsSelected/checkIsSelected.js +2 -1
- package/components/TreeLikeList/TreeItem/useLogic/utils/findObjectsByIds/findObjectsByIds.d.ts +5 -0
- package/components/TreeLikeList/TreeItem/useLogic/utils/findObjectsByIds/findObjectsByIds.js +22 -0
- package/components/TreeLikeList/TreeItem/useLogic/utils/findObjectsByIds/index.d.ts +1 -0
- package/components/TreeLikeList/TreeItem/useLogic/utils/findObjectsByIds/index.js +1 -0
- package/components/TreeLikeList/TreeItem/useLogic/utils/getCurrentValueIds/getCurrentValueIds.d.ts +5 -0
- package/components/TreeLikeList/TreeItem/useLogic/utils/getCurrentValueIds/getCurrentValueIds.js +10 -0
- package/components/TreeLikeList/TreeItem/useLogic/utils/getCurrentValueIds/index.d.ts +1 -0
- package/components/TreeLikeList/TreeItem/useLogic/utils/getCurrentValueIds/index.js +1 -0
- package/components/TreeLikeList/TreeItem/useLogic/utils/getIdFromValue/getIdFromValue.d.ts +5 -0
- package/components/TreeLikeList/TreeItem/useLogic/utils/getIdFromValue/getIdFromValue.js +6 -0
- package/components/TreeLikeList/TreeItem/useLogic/utils/getIdFromValue/index.d.ts +1 -0
- package/components/TreeLikeList/TreeItem/useLogic/utils/getIdFromValue/index.js +1 -0
- package/components/TreeLikeList/TreeItem/useLogic/utils/index.d.ts +7 -0
- package/components/TreeLikeList/TreeItem/useLogic/utils/index.js +7 -0
- package/components/TreeLikeList/TreeItem/useLogic/utils/removeItem/index.d.ts +1 -0
- package/components/TreeLikeList/TreeItem/useLogic/utils/removeItem/index.js +1 -0
- package/components/TreeLikeList/TreeItem/useLogic/utils/removeItem/removeItem.d.ts +5 -0
- package/components/TreeLikeList/TreeItem/useLogic/utils/removeItem/removeItem.js +10 -0
- package/components/TreeLikeList/TreeItem/useLogic/utils/removeItemsByIds/index.d.ts +1 -0
- package/components/TreeLikeList/TreeItem/useLogic/utils/removeItemsByIds/index.js +1 -0
- package/components/TreeLikeList/TreeItem/useLogic/utils/removeItemsByIds/removeItemsByIds.d.ts +5 -0
- package/components/TreeLikeList/TreeItem/useLogic/utils/removeItemsByIds/removeItemsByIds.js +11 -0
- package/components/TreeLikeList/TreeLikeList.d.ts +2 -3
- package/components/TreeLikeList/TreeLikeList.js +1 -1
- package/components/TreeLikeList/index.d.ts +1 -0
- package/components/TreeLikeList/types.d.ts +8 -4
- package/components/TreeLikeList/useLogic/useLogic.d.ts +3 -3
- package/components/TreeLikeList/useLogic/useLogic.js +3 -2
- package/components/TreeLikeList/useLogic/utils/getChainsId/getChainsId.js +17 -10
- package/hook-form/FormTreeLikeAsyncAutocomplete/FormTreeLikeAsyncAutocomplete.d.ts +13 -0
- package/hook-form/FormTreeLikeAsyncAutocomplete/FormTreeLikeAsyncAutocomplete.js +13 -0
- package/hook-form/FormTreeLikeAsyncAutocomplete/index.d.ts +0 -0
- package/hook-form/FormTreeLikeAsyncAutocomplete/index.js +1 -0
- package/node/components/Tree/MultipleTreeList/MultipleTreeList.d.ts +2 -2
- package/node/components/Tree/MultipleTreeList/MultipleTreeList.js +1 -1
- package/node/components/Tree/MultipleTreeList/TreeItem/TreeItem.d.ts +10 -6
- package/node/components/Tree/MultipleTreeList/TreeItem/TreeItem.js +3 -2
- package/node/components/Tree/MultipleTreeList/TreeItem/useLogic/useLogic.d.ts +3 -2
- package/node/components/Tree/MultipleTreeList/TreeItem/useLogic/useLogic.js +23 -17
- package/node/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/checkIsIndeterminate/checkIsIndeterminate.d.ts +2 -1
- package/node/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/checkIsIndeterminate/checkIsIndeterminate.js +2 -1
- package/node/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/checkIsSelected/checkIsSelected.d.ts +2 -1
- package/node/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/checkIsSelected/checkIsSelected.js +2 -1
- package/node/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/findObjectsByIds/findObjectsByIds.d.ts +5 -0
- package/node/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/findObjectsByIds/findObjectsByIds.js +26 -0
- package/node/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/findObjectsByIds/index.d.ts +1 -0
- package/node/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/findObjectsByIds/index.js +17 -0
- package/node/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/getIdFromValue/getIdFromValue.d.ts +5 -0
- package/node/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/getIdFromValue/getIdFromValue.js +10 -0
- package/node/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/getIdFromValue/index.d.ts +1 -0
- package/node/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/getIdFromValue/index.js +17 -0
- package/node/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/getItemsToAdd/getItemsToAdd.d.ts +5 -0
- package/node/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/getItemsToAdd/getItemsToAdd.js +18 -0
- package/node/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/getItemsToAdd/index.d.ts +1 -0
- package/node/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/getItemsToAdd/index.js +17 -0
- package/node/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/index.d.ts +3 -0
- package/node/components/Tree/MultipleTreeList/TreeItem/useLogic/utils/index.js +7 -1
- package/node/components/Tree/MultipleTreeList/types.d.ts +8 -4
- package/node/components/TreeAsyncAutocomplete/types.d.ts +14 -2
- package/node/components/TreeLikeAsyncAutocomplete/Input/Input.d.ts +3 -0
- package/node/components/TreeLikeAsyncAutocomplete/Input/Input.js +23 -0
- package/node/components/TreeLikeAsyncAutocomplete/Input/constants.d.ts +1 -0
- package/node/components/TreeLikeAsyncAutocomplete/Input/constants.js +4 -0
- package/node/components/TreeLikeAsyncAutocomplete/Input/index.d.ts +1 -0
- package/node/components/TreeLikeAsyncAutocomplete/Input/index.js +17 -0
- package/node/components/TreeLikeAsyncAutocomplete/Input/styles.d.ts +11 -0
- package/node/components/TreeLikeAsyncAutocomplete/Input/styles.js +30 -0
- package/node/components/TreeLikeAsyncAutocomplete/Input/types.d.ts +7 -0
- package/node/components/TreeLikeAsyncAutocomplete/Input/types.js +2 -0
- package/node/components/TreeLikeAsyncAutocomplete/Input/useLogic/index.d.ts +1 -0
- package/node/components/TreeLikeAsyncAutocomplete/Input/useLogic/index.js +17 -0
- package/node/components/TreeLikeAsyncAutocomplete/Input/useLogic/useLogic.d.ts +18 -0
- package/node/components/TreeLikeAsyncAutocomplete/Input/useLogic/useLogic.js +54 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/ErrorMessage/ErrorMessage.d.ts +13 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/ErrorMessage/ErrorMessage.js +10 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/ErrorMessage/index.d.ts +1 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/ErrorMessage/index.js +17 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/ErrorMessage/styles.d.ts +5 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/ErrorMessage/styles.js +13 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/Loader/Loader.d.ts +2 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/Loader/Loader.js +8 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/Loader/index.d.ts +1 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/Loader/index.js +17 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/Loader/styles.d.ts +5 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/Loader/styles.js +11 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/NoData/NoData.d.ts +2 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/NoData/NoData.js +10 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/NoData/index.d.ts +1 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/NoData/index.js +17 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/NoData/styles.d.ts +5 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/NoData/styles.js +11 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/OptionsModal.d.ts +3 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/OptionsModal.js +37 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/SearchSuggestion/SearchSuggestion.d.ts +2 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/SearchSuggestion/SearchSuggestion.js +10 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/SearchSuggestion/index.d.ts +1 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/SearchSuggestion/index.js +17 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/SearchSuggestion/styles.d.ts +5 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/SearchSuggestion/styles.js +11 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/constants.d.ts +1 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/constants.js +4 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/index.d.ts +1 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/index.js +17 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/styles.d.ts +19 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/styles.js +51 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/types.d.ts +69 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/types.js +2 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/useLogic/index.d.ts +1 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/useLogic/index.js +17 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/useLogic/useLogic.d.ts +27 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/useLogic/useLogic.js +96 -0
- package/node/components/TreeLikeAsyncAutocomplete/TreeLikeAsyncAutocomplete.d.ts +3 -0
- package/node/components/TreeLikeAsyncAutocomplete/TreeLikeAsyncAutocomplete.js +12 -0
- package/node/components/TreeLikeAsyncAutocomplete/constants.d.ts +2 -0
- package/node/components/TreeLikeAsyncAutocomplete/constants.js +5 -0
- package/node/components/TreeLikeAsyncAutocomplete/index.d.ts +2 -0
- package/node/components/TreeLikeAsyncAutocomplete/index.js +17 -0
- package/node/components/TreeLikeAsyncAutocomplete/types.d.ts +69 -0
- package/node/components/TreeLikeAsyncAutocomplete/types.js +2 -0
- package/node/components/TreeLikeAsyncAutocomplete/useLogic/index.d.ts +1 -0
- package/node/components/TreeLikeAsyncAutocomplete/useLogic/index.js +17 -0
- package/node/components/TreeLikeAsyncAutocomplete/useLogic/useLogic.d.ts +626 -0
- package/node/components/TreeLikeAsyncAutocomplete/useLogic/useLogic.js +86 -0
- package/node/components/TreeLikeAsyncAutocomplete/useLogic/utils/deepMultipleFind/deepMultipleFind.d.ts +3 -0
- package/node/components/TreeLikeAsyncAutocomplete/useLogic/utils/deepMultipleFind/deepMultipleFind.js +16 -0
- package/node/components/TreeLikeAsyncAutocomplete/useLogic/utils/deepMultipleFind/index.d.ts +1 -0
- package/node/components/TreeLikeAsyncAutocomplete/useLogic/utils/deepMultipleFind/index.js +17 -0
- package/node/components/TreeLikeAsyncAutocomplete/useLogic/utils/index.d.ts +1 -0
- package/node/components/TreeLikeAsyncAutocomplete/useLogic/utils/index.js +5 -0
- package/node/components/TreeLikeList/TreeItem/TreeItem.d.ts +3 -51
- package/node/components/TreeLikeList/TreeItem/TreeItem.js +3 -2
- package/node/components/TreeLikeList/TreeItem/types.d.ts +56 -0
- package/node/components/TreeLikeList/TreeItem/types.js +2 -0
- package/node/components/TreeLikeList/TreeItem/useLogic/useLogic.d.ts +4 -3
- package/node/components/TreeLikeList/TreeItem/useLogic/useLogic.js +21 -12
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/addItem/addItem.d.ts +6 -0
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/addItem/addItem.js +12 -0
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/addItem/index.d.ts +1 -0
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/addItem/index.js +5 -0
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/addItemsByIds/addItemsByIds.d.ts +6 -0
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/addItemsByIds/addItemsByIds.js +19 -0
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/addItemsByIds/index.d.ts +1 -0
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/addItemsByIds/index.js +5 -0
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/checkIsSelected/checkIsSelected.d.ts +2 -1
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/checkIsSelected/checkIsSelected.js +2 -1
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/findObjectsByIds/findObjectsByIds.d.ts +5 -0
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/findObjectsByIds/findObjectsByIds.js +26 -0
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/findObjectsByIds/index.d.ts +1 -0
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/findObjectsByIds/index.js +5 -0
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/getCurrentValueIds/getCurrentValueIds.d.ts +5 -0
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/getCurrentValueIds/getCurrentValueIds.js +14 -0
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/getCurrentValueIds/index.d.ts +1 -0
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/getCurrentValueIds/index.js +5 -0
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/getIdFromValue/getIdFromValue.d.ts +5 -0
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/getIdFromValue/getIdFromValue.js +10 -0
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/getIdFromValue/index.d.ts +1 -0
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/getIdFromValue/index.js +17 -0
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/index.d.ts +7 -0
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/index.js +15 -1
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/removeItem/index.d.ts +1 -0
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/removeItem/index.js +5 -0
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/removeItem/removeItem.d.ts +5 -0
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/removeItem/removeItem.js +14 -0
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/removeItemsByIds/index.d.ts +1 -0
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/removeItemsByIds/index.js +5 -0
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/removeItemsByIds/removeItemsByIds.d.ts +5 -0
- package/node/components/TreeLikeList/TreeItem/useLogic/utils/removeItemsByIds/removeItemsByIds.js +15 -0
- package/node/components/TreeLikeList/TreeLikeList.d.ts +2 -3
- package/node/components/TreeLikeList/TreeLikeList.js +1 -1
- package/node/components/TreeLikeList/index.d.ts +1 -0
- package/node/components/TreeLikeList/types.d.ts +8 -4
- package/node/components/TreeLikeList/useLogic/useLogic.d.ts +3 -3
- package/node/components/TreeLikeList/useLogic/useLogic.js +3 -2
- package/node/components/TreeLikeList/useLogic/utils/getChainsId/getChainsId.js +17 -10
- package/node/hook-form/FormTreeLikeAsyncAutocomplete/FormTreeLikeAsyncAutocomplete.d.ts +13 -0
- package/node/hook-form/FormTreeLikeAsyncAutocomplete/FormTreeLikeAsyncAutocomplete.js +17 -0
- package/node/hook-form/FormTreeLikeAsyncAutocomplete/index.d.ts +0 -0
- package/node/hook-form/FormTreeLikeAsyncAutocomplete/index.js +1 -0
- package/package.json +15 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.removeItem = void 0;
|
|
4
|
+
const getIdFromValue_1 = require("../getIdFromValue");
|
|
5
|
+
/**
|
|
6
|
+
* Удаляет элемент из value по id
|
|
7
|
+
*/
|
|
8
|
+
const removeItem = (value, idToRemove) => {
|
|
9
|
+
if (!value) {
|
|
10
|
+
return value;
|
|
11
|
+
}
|
|
12
|
+
return value.filter((treeItem) => (0, getIdFromValue_1.getIdFromValue)(treeItem) !== idToRemove);
|
|
13
|
+
};
|
|
14
|
+
exports.removeItem = removeItem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { removeItemsByIds } from './removeItemsByIds';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.removeItemsByIds = void 0;
|
|
4
|
+
var removeItemsByIds_1 = require("./removeItemsByIds");
|
|
5
|
+
Object.defineProperty(exports, "removeItemsByIds", { enumerable: true, get: function () { return removeItemsByIds_1.removeItemsByIds; } });
|
package/node/components/TreeLikeList/TreeItem/useLogic/utils/removeItemsByIds/removeItemsByIds.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.removeItemsByIds = void 0;
|
|
4
|
+
const getIdFromValue_1 = require("../getIdFromValue");
|
|
5
|
+
/**
|
|
6
|
+
* Удаляет элементы из value по массиву id
|
|
7
|
+
*/
|
|
8
|
+
const removeItemsByIds = (value, idsToRemove) => {
|
|
9
|
+
if (!value || idsToRemove.length === 0) {
|
|
10
|
+
return value;
|
|
11
|
+
}
|
|
12
|
+
const idsSet = new Set(idsToRemove);
|
|
13
|
+
return value.filter((treeItem) => !idsSet.has((0, getIdFromValue_1.getIdFromValue)(treeItem)));
|
|
14
|
+
};
|
|
15
|
+
exports.removeItemsByIds = removeItemsByIds;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
4
|
-
export declare const TreeLikeList: (props: TreeLikeListProps) => JSX.Element;
|
|
2
|
+
import type { MultipleValue, TreeLikeListProps } from './types';
|
|
3
|
+
export declare const TreeLikeList: <TValue extends MultipleValue = string[]>(props: TreeLikeListProps<TValue>) => JSX.Element;
|
|
@@ -9,6 +9,6 @@ const INITIAL_LEVEL = 0;
|
|
|
9
9
|
const TreeLikeList = (props) => {
|
|
10
10
|
const { listProps, itemProps } = (0, useLogic_1.useLogic)(props);
|
|
11
11
|
const { data, className, expandedLevel = 10, disabledItems, ...restProps } = props;
|
|
12
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.List, { className: className, ...listProps, children: data.map((item) => ((0, jsx_runtime_1.jsx)(TreeItem_1.TreeItem, {
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.List, { className: className, ...listProps, children: data.map((item) => ((0, jsx_runtime_1.jsx)(TreeItem_1.TreeItem, { item: item, level: INITIAL_LEVEL, expandedLevel: expandedLevel, ...itemProps, ...restProps }, item.id))) }));
|
|
13
13
|
};
|
|
14
14
|
exports.TreeLikeList = TreeLikeList;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { type FunctionComponent } from 'react';
|
|
2
2
|
import type { TreeListData } from '../Tree';
|
|
3
|
-
export type MultipleValue = string[] | undefined;
|
|
3
|
+
export type MultipleValue = TreeListData[] | string[] | undefined;
|
|
4
4
|
export type DisabledItemValue = string | {
|
|
5
5
|
id: string;
|
|
6
6
|
disabledReason?: string;
|
|
7
7
|
};
|
|
8
|
-
export type TreeLikeListProps = {
|
|
8
|
+
export type TreeLikeListProps<TValue extends MultipleValue = string[]> = {
|
|
9
9
|
/**
|
|
10
10
|
* Выбранные значения
|
|
11
11
|
*/
|
|
12
|
-
value?:
|
|
12
|
+
value?: TValue;
|
|
13
13
|
/**
|
|
14
14
|
* Данные, которые необходимо отобразить в виде дерева.
|
|
15
15
|
*/
|
|
@@ -43,5 +43,9 @@ export type TreeLikeListProps = {
|
|
|
43
43
|
/**
|
|
44
44
|
* Функция, которая запускается при изменении состояния.
|
|
45
45
|
*/
|
|
46
|
-
onChange: (value:
|
|
46
|
+
onChange: (value: TValue) => void;
|
|
47
|
+
/**
|
|
48
|
+
* Переключает компонент в режим работы с объектами а не с id элементов
|
|
49
|
+
*/
|
|
50
|
+
isObjectMode?: boolean;
|
|
47
51
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
type UseLogicParams = TreeLikeListProps
|
|
4
|
-
export declare const useLogic: ({ data, value, disabledItems }: UseLogicParams) => {
|
|
2
|
+
import type { MultipleValue, TreeLikeListProps } from '../types';
|
|
3
|
+
type UseLogicParams<TValue extends MultipleValue = string[]> = TreeLikeListProps<TValue>;
|
|
4
|
+
export declare const useLogic: <TValue extends MultipleValue = string[]>({ data, value, disabledItems, }: UseLogicParams<TValue>) => {
|
|
5
5
|
listProps: {
|
|
6
6
|
ref: import("react").RefObject<HTMLUListElement>;
|
|
7
7
|
};
|
|
@@ -5,14 +5,15 @@ const react_1 = require("react");
|
|
|
5
5
|
const useId_1 = require("../../hooks/useId");
|
|
6
6
|
const utils_1 = require("../../Tree/utils");
|
|
7
7
|
const utils_2 = require("./utils");
|
|
8
|
-
const useLogic = ({ data, value, disabledItems }) => {
|
|
8
|
+
const useLogic = ({ data, value, disabledItems, }) => {
|
|
9
9
|
const prefixId = (0, useId_1.useId)();
|
|
10
10
|
const listRef = (0, react_1.useRef)(null);
|
|
11
11
|
(0, react_1.useEffect)(() => {
|
|
12
12
|
if (listRef.current && value?.length) {
|
|
13
13
|
// Выбираем первый элемент из списка value
|
|
14
|
+
const firstItemId = typeof value[0] === 'string' ? value[0] : value[0].id;
|
|
14
15
|
const targetItem = listRef.current.querySelector(`
|
|
15
|
-
li[id="${prefixId}${
|
|
16
|
+
li[id="${prefixId}${firstItemId}"]`);
|
|
16
17
|
if (targetItem) {
|
|
17
18
|
targetItem.scrollIntoView({ block: 'center' });
|
|
18
19
|
}
|
|
@@ -1,21 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getChainsId = void 0;
|
|
4
|
+
/*
|
|
5
|
+
* Возвращает цепочки идентификаторов до целевых элементов
|
|
6
|
+
*/
|
|
4
7
|
const getChainsId = (tree, targetId) => {
|
|
5
8
|
const chainIds = [];
|
|
9
|
+
if (!targetId || targetId.length === 0) {
|
|
10
|
+
return [];
|
|
11
|
+
}
|
|
12
|
+
// Создаем набор идентификаторов для быстрого поиска
|
|
13
|
+
const targetIdsSet = new Set(targetId.map((item) => (typeof item === 'string' ? item : item.id)));
|
|
6
14
|
const findChain = (node, chainId) => {
|
|
7
|
-
chainId
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
if (node.children) {
|
|
13
|
-
for (const child of node.children) {
|
|
14
|
-
findChain(child, [...chainId]);
|
|
15
|
-
}
|
|
15
|
+
const currentChain = [...chainId, node.id];
|
|
16
|
+
// Проверяем по набору идентификаторов
|
|
17
|
+
if (targetIdsSet.has(node.id)) {
|
|
18
|
+
chainIds.push(currentChain);
|
|
19
|
+
// Не делаем return, так как элемент может иметь дочерние элементы с целевыми id
|
|
16
20
|
}
|
|
21
|
+
node.children?.forEach((child) => findChain(child, currentChain));
|
|
17
22
|
};
|
|
18
|
-
|
|
23
|
+
for (const node of tree) {
|
|
24
|
+
findChain(node, []);
|
|
25
|
+
}
|
|
19
26
|
return chainIds;
|
|
20
27
|
};
|
|
21
28
|
exports.getChainsId = getChainsId;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type FetchOptionsResult, type TreeLikeAsyncAutocompleteProps, type TreeLikeAsyncAutocompleteValue } from '../../components/TreeLikeAsyncAutocomplete';
|
|
3
|
+
import { type WithFormFieldProps } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* Тип значения, которое сетится в state формы
|
|
6
|
+
*/
|
|
7
|
+
export type FormTreeLikeAsyncAutocompleteValue = TreeLikeAsyncAutocompleteValue;
|
|
8
|
+
export type FormFetchOptionsResult = FetchOptionsResult;
|
|
9
|
+
export type FormTreeLikeAutocompleteProps<TFieldValues extends object> = WithFormFieldProps<TreeLikeAsyncAutocompleteProps, TFieldValues>;
|
|
10
|
+
/**
|
|
11
|
+
* Обертка TreeLikeAsyncAutocomplete для формы
|
|
12
|
+
*/
|
|
13
|
+
export declare const FormTreeLikeAsyncAutocomplete: <TFieldValues extends object>(props: FormTreeLikeAutocompleteProps<TFieldValues>) => JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FormTreeLikeAsyncAutocomplete = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const TreeLikeAsyncAutocomplete_1 = require("../../components/TreeLikeAsyncAutocomplete");
|
|
6
|
+
const hooks_1 = require("../hooks");
|
|
7
|
+
/**
|
|
8
|
+
* Обертка TreeLikeAsyncAutocomplete для формы
|
|
9
|
+
*/
|
|
10
|
+
const FormTreeLikeAsyncAutocomplete = (props) => {
|
|
11
|
+
const { error, ...fieldProps } = (0, hooks_1.useFormFieldProps)({
|
|
12
|
+
...props,
|
|
13
|
+
defaultValue: props.defaultValue || '',
|
|
14
|
+
});
|
|
15
|
+
return (0, jsx_runtime_1.jsx)(TreeLikeAsyncAutocomplete_1.TreeLikeAsyncAutocomplete, { isError: error, ...fieldProps });
|
|
16
|
+
};
|
|
17
|
+
exports.FormTreeLikeAsyncAutocomplete = FormTreeLikeAsyncAutocomplete;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astral/ui",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"browser": "./index.js",
|
|
5
5
|
"main": "./node/index.js",
|
|
6
6
|
"dependencies": {
|
|
@@ -127,6 +127,20 @@
|
|
|
127
127
|
"types": "./hook-form/FormTreeAsyncAutocomplete/index.d.ts",
|
|
128
128
|
"default": "./hook-form/FormTreeAsyncAutocomplete/index.js",
|
|
129
129
|
"import": "./hook-form/FormTreeAsyncAutocomplete/index.js"
|
|
130
|
+
},
|
|
131
|
+
"./components/TreeLikeAsyncAutocomplete": {
|
|
132
|
+
"module": "./components/TreeLikeAsyncAutocomplete/index.js",
|
|
133
|
+
"require": "./node/components/TreeLikeAsyncAutocomplete/index.js",
|
|
134
|
+
"types": "./components/TreeLikeAsyncAutocomplete/index.d.ts",
|
|
135
|
+
"default": "./components/TreeLikeAsyncAutocomplete/index.js",
|
|
136
|
+
"import": "./components/TreeLikeAsyncAutocomplete/index.js"
|
|
137
|
+
},
|
|
138
|
+
"./hook-form/FormTreeLikeAsyncAutocomplete": {
|
|
139
|
+
"module": "./hook-form/FormTreeLikeAsyncAutocomplete/index.js",
|
|
140
|
+
"require": "./node/hook-form/FormTreeLikeAsyncAutocomplete/index.js",
|
|
141
|
+
"types": "./hook-form/FormTreeLikeAsyncAutocomplete/index.d.ts",
|
|
142
|
+
"default": "./hook-form/FormTreeLikeAsyncAutocomplete/index.js",
|
|
143
|
+
"import": "./hook-form/FormTreeLikeAsyncAutocomplete/index.js"
|
|
130
144
|
}
|
|
131
145
|
},
|
|
132
146
|
"author": "Astral.Soft",
|