@elliemae/ds-legacy-shuttle-v2 1.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/DSShuttleV2.js +46 -0
- package/dist/cjs/DSShuttleV2.js.map +7 -0
- package/dist/cjs/config/DSShuttleV2Definitions.js +74 -0
- package/dist/cjs/config/DSShuttleV2Definitions.js.map +7 -0
- package/dist/cjs/config/itemMovementHelpers.js +133 -0
- package/dist/cjs/config/itemMovementHelpers.js.map +7 -0
- package/dist/cjs/config/useAutoCalculated/index.js +43 -0
- package/dist/cjs/config/useAutoCalculated/index.js.map +7 -0
- package/dist/cjs/config/useAutoCalculated/useDataStructure.js +182 -0
- package/dist/cjs/config/useAutoCalculated/useDataStructure.js.map +7 -0
- package/dist/cjs/config/useAutoCalculated/useShuttleVirtualized.js +51 -0
- package/dist/cjs/config/useAutoCalculated/useShuttleVirtualized.js.map +7 -0
- package/dist/cjs/config/useFocusTracker/index.js +42 -0
- package/dist/cjs/config/useFocusTracker/index.js.map +7 -0
- package/dist/cjs/config/useFocusTracker/useFocusActionTrackers.js +149 -0
- package/dist/cjs/config/useFocusTracker/useFocusActionTrackers.js.map +7 -0
- package/dist/cjs/config/useFocusTracker/useFocusItemTracker.js +103 -0
- package/dist/cjs/config/useFocusTracker/useFocusItemTracker.js.map +7 -0
- package/dist/cjs/config/useFocusTracker/useFocusRegionTrackers.js +87 -0
- package/dist/cjs/config/useFocusTracker/useFocusRegionTrackers.js.map +7 -0
- package/dist/cjs/config/useFocusTracker/useFocusTracker.js +52 -0
- package/dist/cjs/config/useFocusTracker/useFocusTracker.js.map +7 -0
- package/dist/cjs/config/useStore/focusAndTabIndexManager.js +77 -0
- package/dist/cjs/config/useStore/focusAndTabIndexManager.js.map +7 -0
- package/dist/cjs/config/useStore/index.js +30 -0
- package/dist/cjs/config/useStore/index.js.map +7 -0
- package/dist/cjs/config/useStore/useStore.js +86 -0
- package/dist/cjs/config/useStore/useStore.js.map +7 -0
- package/dist/cjs/config/useValidateProps.js +40 -0
- package/dist/cjs/config/useValidateProps.js.map +7 -0
- package/dist/cjs/constants/index.js +69 -0
- package/dist/cjs/constants/index.js.map +7 -0
- package/dist/cjs/exported-related/ShuttleItem.js +60 -0
- package/dist/cjs/exported-related/ShuttleItem.js.map +7 -0
- package/dist/cjs/exported-related/index.js +36 -0
- package/dist/cjs/exported-related/index.js.map +7 -0
- package/dist/cjs/index.js +43 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/package.json +7 -0
- package/dist/cjs/parts/Dnd/DndHandle.js +89 -0
- package/dist/cjs/parts/Dnd/DndHandle.js.map +7 -0
- package/dist/cjs/parts/Dnd/DragOverlay.js +51 -0
- package/dist/cjs/parts/Dnd/DragOverlay.js.map +7 -0
- package/dist/cjs/parts/Dnd/DropIndicator.js +92 -0
- package/dist/cjs/parts/Dnd/DropIndicator.js.map +7 -0
- package/dist/cjs/parts/Header.js +91 -0
- package/dist/cjs/parts/Header.js.map +7 -0
- package/dist/cjs/parts/HoC/withConditionalDnDRowContext.js +121 -0
- package/dist/cjs/parts/HoC/withConditionalDnDRowContext.js.map +7 -0
- package/dist/cjs/parts/HoC/withConditionalUseSortable.js +43 -0
- package/dist/cjs/parts/HoC/withConditionalUseSortable.js.map +7 -0
- package/dist/cjs/parts/Item/Item.js +222 -0
- package/dist/cjs/parts/Item/Item.js.map +7 -0
- package/dist/cjs/parts/Item/ItemActions/ItemActions.js +164 -0
- package/dist/cjs/parts/Item/ItemActions/ItemActions.js.map +7 -0
- package/dist/cjs/parts/Item/ItemActions/index.js +30 -0
- package/dist/cjs/parts/Item/ItemActions/index.js.map +7 -0
- package/dist/cjs/parts/Item/ItemActions/useActionsHandlers.js +54 -0
- package/dist/cjs/parts/Item/ItemActions/useActionsHandlers.js.map +7 -0
- package/dist/cjs/parts/Item/ItemActions/useActionsLogicHandlers.js +82 -0
- package/dist/cjs/parts/Item/ItemActions/useActionsLogicHandlers.js.map +7 -0
- package/dist/cjs/parts/Item/ItemActions/useInnerRefHandlers.js +69 -0
- package/dist/cjs/parts/Item/ItemActions/useInnerRefHandlers.js.map +7 -0
- package/dist/cjs/parts/Item/ItemMiddleSection.js +140 -0
- package/dist/cjs/parts/Item/ItemMiddleSection.js.map +7 -0
- package/dist/cjs/parts/Item/ItemOverlay.js +76 -0
- package/dist/cjs/parts/Item/ItemOverlay.js.map +7 -0
- package/dist/cjs/parts/Item/ItemSelection.js +70 -0
- package/dist/cjs/parts/Item/ItemSelection.js.map +7 -0
- package/dist/cjs/parts/Item/TextSection.js +56 -0
- package/dist/cjs/parts/Item/TextSection.js.map +7 -0
- package/dist/cjs/parts/Item/useItemArrowNavigation.js +104 -0
- package/dist/cjs/parts/Item/useItemArrowNavigation.js.map +7 -0
- package/dist/cjs/parts/Item/useItemKeyboardSelection.js +61 -0
- package/dist/cjs/parts/Item/useItemKeyboardSelection.js.map +7 -0
- package/dist/cjs/parts/Item/useSelectionLogic.js +128 -0
- package/dist/cjs/parts/Item/useSelectionLogic.js.map +7 -0
- package/dist/cjs/parts/Item/useThisItemIsFocused.js +47 -0
- package/dist/cjs/parts/Item/useThisItemIsFocused.js.map +7 -0
- package/dist/cjs/parts/MainContent.js +116 -0
- package/dist/cjs/parts/MainContent.js.map +7 -0
- package/dist/cjs/parts/Panel/bottom/LoadMoreBtn.js +81 -0
- package/dist/cjs/parts/Panel/bottom/LoadMoreBtn.js.map +7 -0
- package/dist/cjs/parts/Panel/bottom/LoadingMore.js +59 -0
- package/dist/cjs/parts/Panel/bottom/LoadingMore.js.map +7 -0
- package/dist/cjs/parts/Panel/bottom/PanelContentBottomSection.js +97 -0
- package/dist/cjs/parts/Panel/bottom/PanelContentBottomSection.js.map +7 -0
- package/dist/cjs/parts/Panel/bottom/useInnerRefHandlers.js +51 -0
- package/dist/cjs/parts/Panel/bottom/useInnerRefHandlers.js.map +7 -0
- package/dist/cjs/parts/Panel/bottom/useLoadMoreBtnArrowNavigation.js +77 -0
- package/dist/cjs/parts/Panel/bottom/useLoadMoreBtnArrowNavigation.js.map +7 -0
- package/dist/cjs/parts/Panel/middle/EmptyItems.js +58 -0
- package/dist/cjs/parts/Panel/middle/EmptyItems.js.map +7 -0
- package/dist/cjs/parts/Panel/middle/ItemListWrapper/Index.js +93 -0
- package/dist/cjs/parts/Panel/middle/ItemListWrapper/Index.js.map +7 -0
- package/dist/cjs/parts/Panel/middle/ItemListWrapper/getDatumFlags.js +48 -0
- package/dist/cjs/parts/Panel/middle/ItemListWrapper/getDatumFlags.js.map +7 -0
- package/dist/cjs/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.js +60 -0
- package/dist/cjs/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.js.map +7 -0
- package/dist/cjs/parts/Panel/middle/LoadingItems.js +68 -0
- package/dist/cjs/parts/Panel/middle/LoadingItems.js.map +7 -0
- package/dist/cjs/parts/Panel/middle/MultipleSelectionAction.js +186 -0
- package/dist/cjs/parts/Panel/middle/MultipleSelectionAction.js.map +7 -0
- package/dist/cjs/parts/Panel/middle/PanelContentMiddleSection.js +174 -0
- package/dist/cjs/parts/Panel/middle/PanelContentMiddleSection.js.map +7 -0
- package/dist/cjs/parts/Panel/top/PanelContentTopSection.js +71 -0
- package/dist/cjs/parts/Panel/top/PanelContentTopSection.js.map +7 -0
- package/dist/cjs/parts/Panel/top/PanelFilterSection.js +79 -0
- package/dist/cjs/parts/Panel/top/PanelFilterSection.js.map +7 -0
- package/dist/cjs/parts/Panel/top/SelectionHeader.js +137 -0
- package/dist/cjs/parts/Panel/top/SelectionHeader.js.map +7 -0
- package/dist/cjs/parts/PanelWrapper.js +83 -0
- package/dist/cjs/parts/PanelWrapper.js.map +7 -0
- package/dist/cjs/react-desc-prop-types.js +157 -0
- package/dist/cjs/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/tests/configs/basic.js +164 -0
- package/dist/cjs/tests/configs/basic.js.map +7 -0
- package/dist/cjs/tests/configs/filter.js +199 -0
- package/dist/cjs/tests/configs/filter.js.map +7 -0
- package/dist/cjs/tests/configs/loadMore.js +179 -0
- package/dist/cjs/tests/configs/loadMore.js.map +7 -0
- package/dist/esm/DSShuttleV2.js +16 -0
- package/dist/esm/DSShuttleV2.js.map +7 -0
- package/dist/esm/config/DSShuttleV2Definitions.js +44 -0
- package/dist/esm/config/DSShuttleV2Definitions.js.map +7 -0
- package/dist/esm/config/itemMovementHelpers.js +103 -0
- package/dist/esm/config/itemMovementHelpers.js.map +7 -0
- package/dist/esm/config/useAutoCalculated/index.js +13 -0
- package/dist/esm/config/useAutoCalculated/index.js.map +7 -0
- package/dist/esm/config/useAutoCalculated/useDataStructure.js +152 -0
- package/dist/esm/config/useAutoCalculated/useDataStructure.js.map +7 -0
- package/dist/esm/config/useAutoCalculated/useShuttleVirtualized.js +21 -0
- package/dist/esm/config/useAutoCalculated/useShuttleVirtualized.js.map +7 -0
- package/dist/esm/config/useFocusTracker/index.js +12 -0
- package/dist/esm/config/useFocusTracker/index.js.map +7 -0
- package/dist/esm/config/useFocusTracker/useFocusActionTrackers.js +119 -0
- package/dist/esm/config/useFocusTracker/useFocusActionTrackers.js.map +7 -0
- package/dist/esm/config/useFocusTracker/useFocusItemTracker.js +73 -0
- package/dist/esm/config/useFocusTracker/useFocusItemTracker.js.map +7 -0
- package/dist/esm/config/useFocusTracker/useFocusRegionTrackers.js +57 -0
- package/dist/esm/config/useFocusTracker/useFocusRegionTrackers.js.map +7 -0
- package/dist/esm/config/useFocusTracker/useFocusTracker.js +22 -0
- package/dist/esm/config/useFocusTracker/useFocusTracker.js.map +7 -0
- package/dist/esm/config/useStore/focusAndTabIndexManager.js +47 -0
- package/dist/esm/config/useStore/focusAndTabIndexManager.js.map +7 -0
- package/dist/esm/config/useStore/index.js +3 -0
- package/dist/esm/config/useStore/index.js.map +7 -0
- package/dist/esm/config/useStore/useStore.js +56 -0
- package/dist/esm/config/useStore/useStore.js.map +7 -0
- package/dist/esm/config/useValidateProps.js +10 -0
- package/dist/esm/config/useValidateProps.js.map +7 -0
- package/dist/esm/constants/index.js +39 -0
- package/dist/esm/constants/index.js.map +7 -0
- package/dist/esm/exported-related/ShuttleItem.js +30 -0
- package/dist/esm/exported-related/ShuttleItem.js.map +7 -0
- package/dist/esm/exported-related/index.js +6 -0
- package/dist/esm/exported-related/index.js.map +7 -0
- package/dist/esm/index.js +13 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/package.json +7 -0
- package/dist/esm/parts/Dnd/DndHandle.js +59 -0
- package/dist/esm/parts/Dnd/DndHandle.js.map +7 -0
- package/dist/esm/parts/Dnd/DragOverlay.js +21 -0
- package/dist/esm/parts/Dnd/DragOverlay.js.map +7 -0
- package/dist/esm/parts/Dnd/DropIndicator.js +62 -0
- package/dist/esm/parts/Dnd/DropIndicator.js.map +7 -0
- package/dist/esm/parts/Header.js +63 -0
- package/dist/esm/parts/Header.js.map +7 -0
- package/dist/esm/parts/HoC/withConditionalDnDRowContext.js +91 -0
- package/dist/esm/parts/HoC/withConditionalDnDRowContext.js.map +7 -0
- package/dist/esm/parts/HoC/withConditionalUseSortable.js +13 -0
- package/dist/esm/parts/HoC/withConditionalUseSortable.js.map +7 -0
- package/dist/esm/parts/Item/Item.js +192 -0
- package/dist/esm/parts/Item/Item.js.map +7 -0
- package/dist/esm/parts/Item/ItemActions/ItemActions.js +134 -0
- package/dist/esm/parts/Item/ItemActions/ItemActions.js.map +7 -0
- package/dist/esm/parts/Item/ItemActions/index.js +3 -0
- package/dist/esm/parts/Item/ItemActions/index.js.map +7 -0
- package/dist/esm/parts/Item/ItemActions/useActionsHandlers.js +24 -0
- package/dist/esm/parts/Item/ItemActions/useActionsHandlers.js.map +7 -0
- package/dist/esm/parts/Item/ItemActions/useActionsLogicHandlers.js +52 -0
- package/dist/esm/parts/Item/ItemActions/useActionsLogicHandlers.js.map +7 -0
- package/dist/esm/parts/Item/ItemActions/useInnerRefHandlers.js +39 -0
- package/dist/esm/parts/Item/ItemActions/useInnerRefHandlers.js.map +7 -0
- package/dist/esm/parts/Item/ItemMiddleSection.js +110 -0
- package/dist/esm/parts/Item/ItemMiddleSection.js.map +7 -0
- package/dist/esm/parts/Item/ItemOverlay.js +46 -0
- package/dist/esm/parts/Item/ItemOverlay.js.map +7 -0
- package/dist/esm/parts/Item/ItemSelection.js +40 -0
- package/dist/esm/parts/Item/ItemSelection.js.map +7 -0
- package/dist/esm/parts/Item/TextSection.js +26 -0
- package/dist/esm/parts/Item/TextSection.js.map +7 -0
- package/dist/esm/parts/Item/useItemArrowNavigation.js +78 -0
- package/dist/esm/parts/Item/useItemArrowNavigation.js.map +7 -0
- package/dist/esm/parts/Item/useItemKeyboardSelection.js +31 -0
- package/dist/esm/parts/Item/useItemKeyboardSelection.js.map +7 -0
- package/dist/esm/parts/Item/useSelectionLogic.js +98 -0
- package/dist/esm/parts/Item/useSelectionLogic.js.map +7 -0
- package/dist/esm/parts/Item/useThisItemIsFocused.js +17 -0
- package/dist/esm/parts/Item/useThisItemIsFocused.js.map +7 -0
- package/dist/esm/parts/MainContent.js +86 -0
- package/dist/esm/parts/MainContent.js.map +7 -0
- package/dist/esm/parts/Panel/bottom/LoadMoreBtn.js +51 -0
- package/dist/esm/parts/Panel/bottom/LoadMoreBtn.js.map +7 -0
- package/dist/esm/parts/Panel/bottom/LoadingMore.js +29 -0
- package/dist/esm/parts/Panel/bottom/LoadingMore.js.map +7 -0
- package/dist/esm/parts/Panel/bottom/PanelContentBottomSection.js +67 -0
- package/dist/esm/parts/Panel/bottom/PanelContentBottomSection.js.map +7 -0
- package/dist/esm/parts/Panel/bottom/useInnerRefHandlers.js +21 -0
- package/dist/esm/parts/Panel/bottom/useInnerRefHandlers.js.map +7 -0
- package/dist/esm/parts/Panel/bottom/useLoadMoreBtnArrowNavigation.js +51 -0
- package/dist/esm/parts/Panel/bottom/useLoadMoreBtnArrowNavigation.js.map +7 -0
- package/dist/esm/parts/Panel/middle/EmptyItems.js +28 -0
- package/dist/esm/parts/Panel/middle/EmptyItems.js.map +7 -0
- package/dist/esm/parts/Panel/middle/ItemListWrapper/Index.js +63 -0
- package/dist/esm/parts/Panel/middle/ItemListWrapper/Index.js.map +7 -0
- package/dist/esm/parts/Panel/middle/ItemListWrapper/getDatumFlags.js +18 -0
- package/dist/esm/parts/Panel/middle/ItemListWrapper/getDatumFlags.js.map +7 -0
- package/dist/esm/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.js +30 -0
- package/dist/esm/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.js.map +7 -0
- package/dist/esm/parts/Panel/middle/LoadingItems.js +38 -0
- package/dist/esm/parts/Panel/middle/LoadingItems.js.map +7 -0
- package/dist/esm/parts/Panel/middle/MultipleSelectionAction.js +156 -0
- package/dist/esm/parts/Panel/middle/MultipleSelectionAction.js.map +7 -0
- package/dist/esm/parts/Panel/middle/PanelContentMiddleSection.js +144 -0
- package/dist/esm/parts/Panel/middle/PanelContentMiddleSection.js.map +7 -0
- package/dist/esm/parts/Panel/top/PanelContentTopSection.js +41 -0
- package/dist/esm/parts/Panel/top/PanelContentTopSection.js.map +7 -0
- package/dist/esm/parts/Panel/top/PanelFilterSection.js +49 -0
- package/dist/esm/parts/Panel/top/PanelFilterSection.js.map +7 -0
- package/dist/esm/parts/Panel/top/SelectionHeader.js +107 -0
- package/dist/esm/parts/Panel/top/SelectionHeader.js.map +7 -0
- package/dist/esm/parts/PanelWrapper.js +53 -0
- package/dist/esm/parts/PanelWrapper.js.map +7 -0
- package/dist/esm/react-desc-prop-types.js +132 -0
- package/dist/esm/react-desc-prop-types.js.map +7 -0
- package/dist/esm/tests/configs/basic.js +134 -0
- package/dist/esm/tests/configs/basic.js.map +7 -0
- package/dist/esm/tests/configs/filter.js +169 -0
- package/dist/esm/tests/configs/filter.js.map +7 -0
- package/dist/esm/tests/configs/loadMore.js +149 -0
- package/dist/esm/tests/configs/loadMore.js.map +7 -0
- package/dist/types/DSShuttleV2.d.ts +4 -0
- package/dist/types/config/DSShuttleV2Definitions.d.ts +36 -0
- package/dist/types/config/itemMovementHelpers.d.ts +7 -0
- package/dist/types/config/useAutoCalculated/index.d.ts +32 -0
- package/dist/types/config/useAutoCalculated/useDataStructure.d.ts +25 -0
- package/dist/types/config/useAutoCalculated/useShuttleVirtualized.d.ts +9 -0
- package/dist/types/config/useFocusTracker/index.d.ts +4 -0
- package/dist/types/config/useFocusTracker/useFocusActionTrackers.d.ts +10 -0
- package/dist/types/config/useFocusTracker/useFocusItemTracker.d.ts +11 -0
- package/dist/types/config/useFocusTracker/useFocusRegionTrackers.d.ts +18 -0
- package/dist/types/config/useFocusTracker/useFocusTracker.d.ts +33 -0
- package/dist/types/config/useStore/focusAndTabIndexManager.d.ts +10 -0
- package/dist/types/config/useStore/index.d.ts +1 -0
- package/dist/types/config/useStore/useStore.d.ts +301 -0
- package/dist/types/config/useValidateProps.d.ts +3 -0
- package/dist/types/constants/index.d.ts +32 -0
- package/dist/types/exported-related/ShuttleItem.d.ts +8 -0
- package/dist/types/exported-related/index.d.ts +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/parts/Dnd/DndHandle.d.ts +15 -0
- package/dist/types/parts/Dnd/DragOverlay.d.ts +6 -0
- package/dist/types/parts/Dnd/DropIndicator.d.ts +15 -0
- package/dist/types/parts/Header.d.ts +3 -0
- package/dist/types/parts/HoC/withConditionalDnDRowContext.d.ts +10 -0
- package/dist/types/parts/HoC/withConditionalUseSortable.d.ts +8 -0
- package/dist/types/parts/Item/Item.d.ts +6 -0
- package/dist/types/parts/Item/ItemActions/ItemActions.d.ts +3 -0
- package/dist/types/parts/Item/ItemActions/index.d.ts +1 -0
- package/dist/types/parts/Item/ItemActions/useActionsHandlers.d.ts +7 -0
- package/dist/types/parts/Item/ItemActions/useActionsLogicHandlers.d.ts +7 -0
- package/dist/types/parts/Item/ItemActions/useInnerRefHandlers.d.ts +6 -0
- package/dist/types/parts/Item/ItemMiddleSection.d.ts +5 -0
- package/dist/types/parts/Item/ItemOverlay.d.ts +5 -0
- package/dist/types/parts/Item/ItemSelection.d.ts +3 -0
- package/dist/types/parts/Item/TextSection.d.ts +3 -0
- package/dist/types/parts/Item/useItemArrowNavigation.d.ts +5 -0
- package/dist/types/parts/Item/useItemKeyboardSelection.d.ts +5 -0
- package/dist/types/parts/Item/useSelectionLogic.d.ts +6 -0
- package/dist/types/parts/Item/useThisItemIsFocused.d.ts +4 -0
- package/dist/types/parts/MainContent.d.ts +2 -0
- package/dist/types/parts/Panel/bottom/LoadMoreBtn.d.ts +2 -0
- package/dist/types/parts/Panel/bottom/LoadingMore.d.ts +2 -0
- package/dist/types/parts/Panel/bottom/PanelContentBottomSection.d.ts +3 -0
- package/dist/types/parts/Panel/bottom/useInnerRefHandlers.d.ts +4 -0
- package/dist/types/parts/Panel/bottom/useLoadMoreBtnArrowNavigation.d.ts +5 -0
- package/dist/types/parts/Panel/middle/EmptyItems.d.ts +2 -0
- package/dist/types/parts/Panel/middle/ItemListWrapper/Index.d.ts +4 -0
- package/dist/types/parts/Panel/middle/ItemListWrapper/getDatumFlags.d.ts +15 -0
- package/dist/types/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.d.ts +11 -0
- package/dist/types/parts/Panel/middle/LoadingItems.d.ts +2 -0
- package/dist/types/parts/Panel/middle/MultipleSelectionAction.d.ts +3 -0
- package/dist/types/parts/Panel/middle/PanelContentMiddleSection.d.ts +3 -0
- package/dist/types/parts/Panel/top/PanelContentTopSection.d.ts +2 -0
- package/dist/types/parts/Panel/top/PanelFilterSection.d.ts +2 -0
- package/dist/types/parts/Panel/top/SelectionHeader.d.ts +3 -0
- package/dist/types/parts/PanelWrapper.d.ts +3 -0
- package/dist/types/react-desc-prop-types.d.ts +199 -0
- package/dist/types/tests/configs/basic.d.ts +25 -0
- package/dist/types/tests/configs/filter.d.ts +29 -0
- package/dist/types/tests/configs/loadMore.d.ts +29 -0
- package/dist/types/tests/shuttle-v2.basic.test.d.ts +1 -0
- package/dist/types/tests/shuttle-v2.filter.test.d.ts +1 -0
- package/dist/types/tests/shuttle-v2.load-more.test.d.ts +1 -0
- package/package.json +87 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var DSShuttleV2_exports = {};
|
|
30
|
+
__export(DSShuttleV2_exports, {
|
|
31
|
+
DSShuttleV2: () => DSShuttleV2,
|
|
32
|
+
DSShuttleV2WithSchema: () => DSShuttleV2WithSchema
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(DSShuttleV2_exports);
|
|
35
|
+
var React = __toESM(require("react"));
|
|
36
|
+
var import_ds_legacy_props_helpers = require("@elliemae/ds-legacy-props-helpers");
|
|
37
|
+
var import_ds_legacy_zustand_helpers = require("@elliemae/ds-legacy-zustand-helpers");
|
|
38
|
+
var import_MainContent = require("./parts/MainContent.js");
|
|
39
|
+
var import_useStore = require("./config/useStore/index.js");
|
|
40
|
+
var import_react_desc_prop_types = require("./react-desc-prop-types.js");
|
|
41
|
+
const DSShuttleV2 = (0, import_ds_legacy_zustand_helpers.withZustand)(import_MainContent.MainContent, import_useStore.config);
|
|
42
|
+
DSShuttleV2.propTypes = import_react_desc_prop_types.DSShuttleV2PropTypesSchema;
|
|
43
|
+
DSShuttleV2.displayName = "DSShuttleV2";
|
|
44
|
+
const DSShuttleV2WithSchema = (0, import_ds_legacy_props_helpers.describe)(DSShuttleV2);
|
|
45
|
+
DSShuttleV2WithSchema.propTypes = import_react_desc_prop_types.DSShuttleV2PropTypesSchema;
|
|
46
|
+
//# sourceMappingURL=DSShuttleV2.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/DSShuttleV2.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { describe } from '@elliemae/ds-legacy-props-helpers';\nimport { withZustand } from '@elliemae/ds-legacy-zustand-helpers';\nimport { MainContent } from './parts/MainContent.js';\nimport { config } from './config/useStore/index.js';\nimport { DSShuttleV2PropTypesSchema } from './react-desc-prop-types.js';\n\nconst DSShuttleV2 = withZustand(MainContent, config);\n\nDSShuttleV2.propTypes = DSShuttleV2PropTypesSchema;\nDSShuttleV2.displayName = 'DSShuttleV2';\nconst DSShuttleV2WithSchema = describe(DSShuttleV2);\n\nDSShuttleV2WithSchema.propTypes = DSShuttleV2PropTypesSchema;\n\nexport { DSShuttleV2, DSShuttleV2WithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,qCAAyB;AACzB,uCAA4B;AAC5B,yBAA4B;AAC5B,sBAAuB;AACvB,mCAA2C;AAE3C,MAAM,kBAAc,8CAAY,gCAAa,sBAAM;AAEnD,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,4BAAwB,yCAAS,WAAW;AAElD,sBAAsB,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var DSShuttleV2Definitions_exports = {};
|
|
30
|
+
__export(DSShuttleV2Definitions_exports, {
|
|
31
|
+
DSShuttleV2DataTestIds: () => DSShuttleV2DataTestIds,
|
|
32
|
+
DSShuttleV2Name: () => DSShuttleV2Name,
|
|
33
|
+
DSShuttleV2Slots: () => DSShuttleV2Slots
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(DSShuttleV2Definitions_exports);
|
|
36
|
+
var React = __toESM(require("react"));
|
|
37
|
+
var import_ds_legacy_system = require("@elliemae/ds-legacy-system");
|
|
38
|
+
const DSShuttleV2Name = "DSShuttleV2";
|
|
39
|
+
const DSShuttleV2Slots = {
|
|
40
|
+
HEADER_SEARCH_ICON: "header-search-icon",
|
|
41
|
+
WRAPPER: "wrapper",
|
|
42
|
+
PANEL_WRAPPER: "panel-wrapper",
|
|
43
|
+
LIST_WRAPPER: "list-wrapper",
|
|
44
|
+
ITEM_WRAPPER: "item-wrapper",
|
|
45
|
+
ITEM_CHECKBOX: "item-checkbox",
|
|
46
|
+
ITEM_ICON_WRAPPER: "item-icon-wrapper",
|
|
47
|
+
ITEM_LABEL_WRAPPER: "item-label-wrapper",
|
|
48
|
+
ITEM_MIDSECTION_WRAPPER: "item-midsection-wrapper",
|
|
49
|
+
ITEM_SELECTION: "item-selection",
|
|
50
|
+
ITEM_ACTIONS_WRAPPER: "item-actions-wrapper",
|
|
51
|
+
ITEM_ACTION_WRAPPER: "item-action-wrapper",
|
|
52
|
+
ITEM_ACTION_BTN: "item-action-btn",
|
|
53
|
+
ITEM_ACTION_BTN_DRILLDOWN_ICON: "item-action-btn-drilldown-icon",
|
|
54
|
+
ITEM_ACTION_BTN_TO_SOURCE_ICON: "item-action-btn-to-source-icon",
|
|
55
|
+
ITEM_ACTION_BTN_TO_DESTINATION_ICON: "item-action-btn-to-destination-icon",
|
|
56
|
+
LIST_BOTTOM_LOADING_MORE: "list-bottom-loading-more",
|
|
57
|
+
LIST_BOTTOM_LOAD_MORE_BTN: "list-bottom-load-more-btn",
|
|
58
|
+
LIST_WRAPPER_BOTTOM: "list-wrapper-bottom",
|
|
59
|
+
EMPTY_LIST_WRAPPER: "empty-list-wrapper",
|
|
60
|
+
ITEMS_WRAPPER: "items-wrapper",
|
|
61
|
+
LOADING_LIST_WRAPPER: "loading-list-wrapper",
|
|
62
|
+
MOVE_MULTIPLE_WRAPPER: "move-multiple-wrapper",
|
|
63
|
+
MOVE_MULTIPLE_BTN: "move-multiple-btn",
|
|
64
|
+
LIST_WRAPPER_MID: "list-wrapper-mid",
|
|
65
|
+
LIST_WRAPPER_MID_SCROLLER: "list-wrapper-mid-scroller",
|
|
66
|
+
LIST_WRAPPER_TOP: "list-wrapper-top",
|
|
67
|
+
AREA_SEARCH_WRAPPER: "area-search-wrapper",
|
|
68
|
+
AREA_SEARCH_BAR: "area-search-bar",
|
|
69
|
+
AREA_SELECTION_HEADER: "area-selection-header",
|
|
70
|
+
AREA_SELECTION_HEADER_COUNT_LABEL: "area-selection-header-count-label",
|
|
71
|
+
DRAG_AND_DROP_HANDLE: "drag-and-drop-handle"
|
|
72
|
+
};
|
|
73
|
+
const DSShuttleV2DataTestIds = (0, import_ds_legacy_system.slotObjectToDataTestIds)(DSShuttleV2Name, DSShuttleV2Slots);
|
|
74
|
+
//# sourceMappingURL=DSShuttleV2Definitions.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/config/DSShuttleV2Definitions.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-legacy-system';\n\nexport const DSShuttleV2Name = 'DSShuttleV2' as const;\n\nexport const DSShuttleV2Slots = {\n HEADER_SEARCH_ICON: 'header-search-icon',\n WRAPPER: 'wrapper',\n PANEL_WRAPPER: 'panel-wrapper',\n LIST_WRAPPER: 'list-wrapper',\n ITEM_WRAPPER: 'item-wrapper',\n ITEM_CHECKBOX: 'item-checkbox',\n ITEM_ICON_WRAPPER: 'item-icon-wrapper',\n ITEM_LABEL_WRAPPER: 'item-label-wrapper',\n ITEM_MIDSECTION_WRAPPER: 'item-midsection-wrapper',\n ITEM_SELECTION: 'item-selection',\n ITEM_ACTIONS_WRAPPER: 'item-actions-wrapper',\n ITEM_ACTION_WRAPPER: 'item-action-wrapper',\n ITEM_ACTION_BTN: 'item-action-btn',\n ITEM_ACTION_BTN_DRILLDOWN_ICON: 'item-action-btn-drilldown-icon',\n ITEM_ACTION_BTN_TO_SOURCE_ICON: 'item-action-btn-to-source-icon',\n ITEM_ACTION_BTN_TO_DESTINATION_ICON: 'item-action-btn-to-destination-icon',\n LIST_BOTTOM_LOADING_MORE: 'list-bottom-loading-more',\n LIST_BOTTOM_LOAD_MORE_BTN: 'list-bottom-load-more-btn',\n LIST_WRAPPER_BOTTOM: 'list-wrapper-bottom',\n EMPTY_LIST_WRAPPER: 'empty-list-wrapper',\n ITEMS_WRAPPER: 'items-wrapper',\n LOADING_LIST_WRAPPER: 'loading-list-wrapper',\n MOVE_MULTIPLE_WRAPPER: 'move-multiple-wrapper',\n MOVE_MULTIPLE_BTN: 'move-multiple-btn',\n LIST_WRAPPER_MID: 'list-wrapper-mid',\n LIST_WRAPPER_MID_SCROLLER: 'list-wrapper-mid-scroller',\n LIST_WRAPPER_TOP: 'list-wrapper-top',\n AREA_SEARCH_WRAPPER: 'area-search-wrapper',\n AREA_SEARCH_BAR: 'area-search-bar',\n AREA_SELECTION_HEADER: 'area-selection-header',\n AREA_SELECTION_HEADER_COUNT_LABEL: 'area-selection-header-count-label',\n DRAG_AND_DROP_HANDLE: 'drag-and-drop-handle',\n} as const;\n\nexport const DSShuttleV2DataTestIds = slotObjectToDataTestIds(DSShuttleV2Name, DSShuttleV2Slots);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAAwC;AAEjC,MAAM,kBAAkB;AAExB,MAAM,mBAAmB;AAAA,EAC9B,oBAAoB;AAAA,EACpB,SAAS;AAAA,EACT,eAAe;AAAA,EACf,cAAc;AAAA,EACd,cAAc;AAAA,EACd,eAAe;AAAA,EACf,mBAAmB;AAAA,EACnB,oBAAoB;AAAA,EACpB,yBAAyB;AAAA,EACzB,gBAAgB;AAAA,EAChB,sBAAsB;AAAA,EACtB,qBAAqB;AAAA,EACrB,iBAAiB;AAAA,EACjB,gCAAgC;AAAA,EAChC,gCAAgC;AAAA,EAChC,qCAAqC;AAAA,EACrC,0BAA0B;AAAA,EAC1B,2BAA2B;AAAA,EAC3B,qBAAqB;AAAA,EACrB,oBAAoB;AAAA,EACpB,eAAe;AAAA,EACf,sBAAsB;AAAA,EACtB,uBAAuB;AAAA,EACvB,mBAAmB;AAAA,EACnB,kBAAkB;AAAA,EAClB,2BAA2B;AAAA,EAC3B,kBAAkB;AAAA,EAClB,qBAAqB;AAAA,EACrB,iBAAiB;AAAA,EACjB,uBAAuB;AAAA,EACvB,mCAAmC;AAAA,EACnC,sBAAsB;AACxB;AAEO,MAAM,6BAAyB,iDAAwB,iBAAiB,gBAAgB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var itemMovementHelpers_exports = {};
|
|
30
|
+
__export(itemMovementHelpers_exports, {
|
|
31
|
+
useHandleMoveItem: () => useHandleMoveItem,
|
|
32
|
+
useHandleMoveSelection: () => useHandleMoveSelection
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(itemMovementHelpers_exports);
|
|
35
|
+
var React = __toESM(require("react"));
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_useStore = require("./useStore/index.js");
|
|
38
|
+
const useHandleMoveSelection = ({ isDestinationPanel }) => {
|
|
39
|
+
const currOnRemove = (0, import_useStore.usePropsStore)(
|
|
40
|
+
(state) => isDestinationPanel ? state.onDestinationRemove : state.onSourceRemove
|
|
41
|
+
);
|
|
42
|
+
const currSoftDeletedItems = (0, import_useStore.usePropsStore)(
|
|
43
|
+
(state) => isDestinationPanel ? state.destinationSoftDeletedItems : state.sourceSoftDeletedItems
|
|
44
|
+
);
|
|
45
|
+
const currOnSoftDelete = (0, import_useStore.usePropsStore)(
|
|
46
|
+
(state) => isDestinationPanel ? state.onDestinationSoftDelete : state.onSourceSoftDelete
|
|
47
|
+
);
|
|
48
|
+
const otherSoftDeletedItems = (0, import_useStore.usePropsStore)(
|
|
49
|
+
(state) => isDestinationPanel ? state.sourceSoftDeletedItems : state.destinationSoftDeletedItems
|
|
50
|
+
);
|
|
51
|
+
const otherOnSoftDelete = (0, import_useStore.usePropsStore)(
|
|
52
|
+
(state) => isDestinationPanel ? state.onSourceSoftDelete : state.onDestinationSoftDelete
|
|
53
|
+
);
|
|
54
|
+
const currSelectionMap = (0, import_useStore.usePropsStore)(
|
|
55
|
+
(store) => isDestinationPanel ? store.destinationSelectionArray : store.sourceSelectionArray
|
|
56
|
+
);
|
|
57
|
+
const currOnSelectionChange = (0, import_useStore.usePropsStore)(
|
|
58
|
+
(state) => isDestinationPanel ? state.onDestinationSelectionChange : state.onSourceSelectionChange
|
|
59
|
+
);
|
|
60
|
+
const otherPanelOnAdd = (0, import_useStore.usePropsStore)((state) => isDestinationPanel ? state.onSourceAdd : state.onDestinationAdd);
|
|
61
|
+
const destinationSelectionArray = (0, import_useStore.usePropsStore)((store) => store.destinationSelectionItemArray);
|
|
62
|
+
const sourceSelectionArray = (0, import_useStore.usePropsStore)((store) => store.sourceSelectionItemArray);
|
|
63
|
+
const selectedItems = isDestinationPanel ? destinationSelectionArray : sourceSelectionArray;
|
|
64
|
+
const moveSelection = import_react.default.useCallback(
|
|
65
|
+
(event) => {
|
|
66
|
+
event.preventDefault();
|
|
67
|
+
event.stopPropagation();
|
|
68
|
+
currOnRemove(selectedItems, { event });
|
|
69
|
+
otherPanelOnAdd(selectedItems, { event });
|
|
70
|
+
const currSoftDeletedMap = {};
|
|
71
|
+
const otherSoftDeletedMap = {};
|
|
72
|
+
currSelectionMap.forEach((id) => {
|
|
73
|
+
currSoftDeletedMap[id] = true;
|
|
74
|
+
otherSoftDeletedMap[id] = false;
|
|
75
|
+
});
|
|
76
|
+
currOnSoftDelete({ ...currSoftDeletedItems, ...currSoftDeletedMap }, { event });
|
|
77
|
+
otherOnSoftDelete({ ...otherSoftDeletedItems, ...otherSoftDeletedMap }, { event });
|
|
78
|
+
currOnSelectionChange({}, { event });
|
|
79
|
+
},
|
|
80
|
+
[
|
|
81
|
+
currOnRemove,
|
|
82
|
+
selectedItems,
|
|
83
|
+
otherPanelOnAdd,
|
|
84
|
+
currSelectionMap,
|
|
85
|
+
currOnSoftDelete,
|
|
86
|
+
currSoftDeletedItems,
|
|
87
|
+
otherOnSoftDelete,
|
|
88
|
+
otherSoftDeletedItems,
|
|
89
|
+
currOnSelectionChange
|
|
90
|
+
]
|
|
91
|
+
);
|
|
92
|
+
return import_react.default.useMemo(() => ({ moveSelection }), [moveSelection]);
|
|
93
|
+
};
|
|
94
|
+
const useHandleMoveItem = ({ datum, datumInternalMeta, isDestinationPanel }) => {
|
|
95
|
+
const currSoftDeletedItems = (0, import_useStore.usePropsStore)(
|
|
96
|
+
(state) => isDestinationPanel ? state.destinationSoftDeletedItems : state.sourceSoftDeletedItems
|
|
97
|
+
);
|
|
98
|
+
const otherSoftDeletedItems = (0, import_useStore.usePropsStore)(
|
|
99
|
+
(state) => isDestinationPanel ? state.sourceSoftDeletedItems : state.destinationSoftDeletedItems
|
|
100
|
+
);
|
|
101
|
+
const currOnSoftDelete = (0, import_useStore.usePropsStore)(
|
|
102
|
+
(state) => isDestinationPanel ? state.onDestinationSoftDelete : state.onSourceSoftDelete
|
|
103
|
+
);
|
|
104
|
+
const otherOnSoftDelete = (0, import_useStore.usePropsStore)(
|
|
105
|
+
(state) => isDestinationPanel ? state.onSourceSoftDelete : state.onDestinationSoftDelete
|
|
106
|
+
);
|
|
107
|
+
const currOnRemove = (0, import_useStore.usePropsStore)(
|
|
108
|
+
(state) => isDestinationPanel ? state.onDestinationRemove : state.onSourceRemove
|
|
109
|
+
);
|
|
110
|
+
const otherPanelOnAdd = (0, import_useStore.usePropsStore)((state) => isDestinationPanel ? state.onSourceAdd : state.onDestinationAdd);
|
|
111
|
+
const moveItem = import_react.default.useCallback(
|
|
112
|
+
(event) => {
|
|
113
|
+
event.preventDefault();
|
|
114
|
+
event.stopPropagation();
|
|
115
|
+
currOnRemove([datum], { event });
|
|
116
|
+
otherPanelOnAdd([datum], { event });
|
|
117
|
+
currOnSoftDelete({ ...currSoftDeletedItems, [datumInternalMeta.hydratedId]: true }, { event });
|
|
118
|
+
otherOnSoftDelete({ ...otherSoftDeletedItems, [datumInternalMeta.hydratedId]: false }, { event });
|
|
119
|
+
},
|
|
120
|
+
[
|
|
121
|
+
currOnRemove,
|
|
122
|
+
currOnSoftDelete,
|
|
123
|
+
currSoftDeletedItems,
|
|
124
|
+
datum,
|
|
125
|
+
datumInternalMeta.hydratedId,
|
|
126
|
+
otherOnSoftDelete,
|
|
127
|
+
otherPanelOnAdd,
|
|
128
|
+
otherSoftDeletedItems
|
|
129
|
+
]
|
|
130
|
+
);
|
|
131
|
+
return moveItem;
|
|
132
|
+
};
|
|
133
|
+
//# sourceMappingURL=itemMovementHelpers.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/config/itemMovementHelpers.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable complexity */\n/* eslint-disable max-statements */\nimport React from 'react';\nimport { type DSButtonT } from '@elliemae/ds-legacy-button-v2';\nimport { type DSShuttleV2T } from '../react-desc-prop-types.js';\nimport { usePropsStore } from './useStore/index.js';\n\nexport const useHandleMoveSelection = ({ isDestinationPanel }: DSShuttleV2T.PanelMetaInfo) => {\n const currOnRemove = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationRemove : state.onSourceRemove,\n );\n const currSoftDeletedItems = usePropsStore((state) =>\n isDestinationPanel ? state.destinationSoftDeletedItems : state.sourceSoftDeletedItems,\n );\n const currOnSoftDelete = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationSoftDelete : state.onSourceSoftDelete,\n );\n const otherSoftDeletedItems = usePropsStore((state) =>\n isDestinationPanel ? state.sourceSoftDeletedItems : state.destinationSoftDeletedItems,\n );\n const otherOnSoftDelete = usePropsStore((state) =>\n isDestinationPanel ? state.onSourceSoftDelete : state.onDestinationSoftDelete,\n );\n const currSelectionMap = usePropsStore((store) =>\n isDestinationPanel ? store.destinationSelectionArray : store.sourceSelectionArray,\n );\n const currOnSelectionChange = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationSelectionChange : state.onSourceSelectionChange,\n );\n\n const otherPanelOnAdd = usePropsStore((state) => (isDestinationPanel ? state.onSourceAdd : state.onDestinationAdd));\n\n const destinationSelectionArray = usePropsStore((store) => store.destinationSelectionItemArray);\n const sourceSelectionArray = usePropsStore((store) => store.sourceSelectionItemArray);\n const selectedItems = isDestinationPanel ? destinationSelectionArray : sourceSelectionArray;\n\n const moveSelection = React.useCallback(\n (event: Parameters<Required<DSButtonT.Props>['onClick']>[0]) => {\n event.preventDefault();\n event.stopPropagation();\n // movement\n currOnRemove(selectedItems, { event });\n otherPanelOnAdd(selectedItems, { event });\n // soft delete\n const currSoftDeletedMap: DSShuttleV2T.SoftDeletedMap = {};\n const otherSoftDeletedMap: DSShuttleV2T.SoftDeletedMap = {};\n currSelectionMap.forEach((id) => {\n currSoftDeletedMap[id] = true;\n otherSoftDeletedMap[id] = false;\n });\n currOnSoftDelete({ ...currSoftDeletedItems, ...currSoftDeletedMap }, { event });\n otherOnSoftDelete({ ...otherSoftDeletedItems, ...otherSoftDeletedMap }, { event });\n // cleanup\n currOnSelectionChange({}, { event });\n },\n [\n currOnRemove,\n selectedItems,\n otherPanelOnAdd,\n currSelectionMap,\n currOnSoftDelete,\n currSoftDeletedItems,\n otherOnSoftDelete,\n otherSoftDeletedItems,\n currOnSelectionChange,\n ],\n );\n return React.useMemo(() => ({ moveSelection: moveSelection }), [moveSelection]);\n};\n\nexport const useHandleMoveItem = ({ datum, datumInternalMeta, isDestinationPanel }: DSShuttleV2T.ItemMeta) => {\n const currSoftDeletedItems = usePropsStore((state) =>\n isDestinationPanel ? state.destinationSoftDeletedItems : state.sourceSoftDeletedItems,\n );\n const otherSoftDeletedItems = usePropsStore((state) =>\n isDestinationPanel ? state.sourceSoftDeletedItems : state.destinationSoftDeletedItems,\n );\n const currOnSoftDelete = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationSoftDelete : state.onSourceSoftDelete,\n );\n const otherOnSoftDelete = usePropsStore((state) =>\n isDestinationPanel ? state.onSourceSoftDelete : state.onDestinationSoftDelete,\n );\n\n const currOnRemove = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationRemove : state.onSourceRemove,\n );\n const otherPanelOnAdd = usePropsStore((state) => (isDestinationPanel ? state.onSourceAdd : state.onDestinationAdd));\n\n const moveItem = React.useCallback(\n (event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => {\n event.preventDefault();\n event.stopPropagation();\n currOnRemove([datum], { event });\n otherPanelOnAdd([datum], { event });\n currOnSoftDelete({ ...currSoftDeletedItems, [datumInternalMeta.hydratedId]: true }, { event });\n otherOnSoftDelete({ ...otherSoftDeletedItems, [datumInternalMeta.hydratedId]: false }, { event });\n },\n [\n currOnRemove,\n currOnSoftDelete,\n currSoftDeletedItems,\n datum,\n datumInternalMeta.hydratedId,\n otherOnSoftDelete,\n otherPanelOnAdd,\n otherSoftDeletedItems,\n ],\n );\n return moveItem;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var useAutoCalculated_exports = {};
|
|
30
|
+
__export(useAutoCalculated_exports, {
|
|
31
|
+
useAutoCalculated: () => useAutoCalculated
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(useAutoCalculated_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_react = require("react");
|
|
36
|
+
var import_useDataStructure = require("./useDataStructure.js");
|
|
37
|
+
var import_useShuttleVirtualized = require("./useShuttleVirtualized.js");
|
|
38
|
+
const useAutoCalculated = (propsWithDefaults) => {
|
|
39
|
+
const dataScructured = (0, import_useDataStructure.useDataStructure)(propsWithDefaults);
|
|
40
|
+
const virtualData = (0, import_useShuttleVirtualized.useShuttleVirtualized)();
|
|
41
|
+
return (0, import_react.useMemo)(() => ({ ...dataScructured, ...virtualData }), [dataScructured, virtualData]);
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/config/useAutoCalculated/index.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { useMemo } from 'react';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types.js';\nimport { useDataStructure } from './useDataStructure.js';\nimport { useShuttleVirtualized } from './useShuttleVirtualized.js';\nexport const useAutoCalculated = (propsWithDefaults: DSShuttleV2T.InternalProps) => {\n const dataScructured = useDataStructure(propsWithDefaults);\n const virtualData = useShuttleVirtualized();\n\n return useMemo(() => ({ ...dataScructured, ...virtualData }), [dataScructured, virtualData]);\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAwB;AAExB,8BAAiC;AACjC,mCAAsC;AAC/B,MAAM,oBAAoB,CAAC,sBAAkD;AAClF,QAAM,qBAAiB,0CAAiB,iBAAiB;AACzD,QAAM,kBAAc,oDAAsB;AAE1C,aAAO,sBAAQ,OAAO,EAAE,GAAG,gBAAgB,GAAG,YAAY,IAAI,CAAC,gBAAgB,WAAW,CAAC;AAC7F;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var useDataStructure_exports = {};
|
|
30
|
+
__export(useDataStructure_exports, {
|
|
31
|
+
useDataStructure: () => useDataStructure
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(useDataStructure_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_react = require("react");
|
|
36
|
+
const configureDestination = ({
|
|
37
|
+
destinationData,
|
|
38
|
+
destinationSelectedItems,
|
|
39
|
+
destinationSoftDeletedItems,
|
|
40
|
+
getId,
|
|
41
|
+
getPreventMove
|
|
42
|
+
}) => {
|
|
43
|
+
const destinationSelectedItemsMap = {};
|
|
44
|
+
const destinationSelectionArray = [];
|
|
45
|
+
const destinationSelectionableDataIds = [];
|
|
46
|
+
const destinationSelectionItemArray = [];
|
|
47
|
+
const destinationConfiguredData = [];
|
|
48
|
+
const destinationSelectionableData = [];
|
|
49
|
+
destinationData.forEach((datum, i) => {
|
|
50
|
+
const hydratedId = getId(datum);
|
|
51
|
+
const hydratedPreventMove = getPreventMove?.(datum) ?? false;
|
|
52
|
+
let isSelected = false;
|
|
53
|
+
if (destinationSelectedItems[hydratedId] === true) {
|
|
54
|
+
destinationSelectionItemArray.push(datum);
|
|
55
|
+
destinationSelectionArray.push(hydratedId);
|
|
56
|
+
isSelected = true;
|
|
57
|
+
}
|
|
58
|
+
let softDeleted = false;
|
|
59
|
+
if (destinationSoftDeletedItems[hydratedId] === true) {
|
|
60
|
+
softDeleted = true;
|
|
61
|
+
}
|
|
62
|
+
destinationSelectedItemsMap[hydratedId] = { datum, index: i };
|
|
63
|
+
const configuredItem = {
|
|
64
|
+
hydratedId,
|
|
65
|
+
hydratedPreventMove,
|
|
66
|
+
isSelected,
|
|
67
|
+
softDeleted,
|
|
68
|
+
original: datum,
|
|
69
|
+
localIndex: i,
|
|
70
|
+
isFirst: i === 0,
|
|
71
|
+
isLast: i === destinationData.length - 1
|
|
72
|
+
};
|
|
73
|
+
destinationConfiguredData.push(configuredItem);
|
|
74
|
+
if (!hydratedPreventMove && !softDeleted) {
|
|
75
|
+
destinationSelectionableData.push(configuredItem);
|
|
76
|
+
destinationSelectionableDataIds.push(`${hydratedId}`);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
const destinationHasMultipleSelectedItems = destinationSelectionArray.length >= 1;
|
|
80
|
+
const destinationSelectionableIds = destinationSelectionableDataIds.join(" ");
|
|
81
|
+
return {
|
|
82
|
+
destinationSelectedItemsMap,
|
|
83
|
+
destinationSelectionItemArray,
|
|
84
|
+
destinationSelectionArray,
|
|
85
|
+
destinationHasMultipleSelectedItems,
|
|
86
|
+
destinationConfiguredData,
|
|
87
|
+
destinationSelectionableData,
|
|
88
|
+
destinationSelectionableDataIds,
|
|
89
|
+
destinationSelectionableIds
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
const configureSource = ({
|
|
93
|
+
sourceData,
|
|
94
|
+
sourceSelectedItems,
|
|
95
|
+
sourceSoftDeletedItems,
|
|
96
|
+
getId,
|
|
97
|
+
getPreventMove
|
|
98
|
+
}) => {
|
|
99
|
+
const sourceSelectedItemsMap = {};
|
|
100
|
+
const sourceSelectionArray = [];
|
|
101
|
+
const sourceSelectionableDataIds = [];
|
|
102
|
+
const sourceSelectionItemArray = [];
|
|
103
|
+
const sourceConfiguredData = [];
|
|
104
|
+
const sourceSelectionableData = [];
|
|
105
|
+
sourceData.forEach((datum, i) => {
|
|
106
|
+
const hydratedId = getId(datum);
|
|
107
|
+
const hydratedPreventMove = getPreventMove?.(datum) ?? false;
|
|
108
|
+
let isSelected = false;
|
|
109
|
+
if (sourceSelectedItems[hydratedId] === true) {
|
|
110
|
+
sourceSelectionItemArray.push(datum);
|
|
111
|
+
sourceSelectionArray.push(hydratedId);
|
|
112
|
+
isSelected = true;
|
|
113
|
+
}
|
|
114
|
+
let softDeleted = false;
|
|
115
|
+
if (sourceSoftDeletedItems[hydratedId] === true) {
|
|
116
|
+
softDeleted = true;
|
|
117
|
+
}
|
|
118
|
+
sourceSelectedItemsMap[hydratedId] = { datum, index: i };
|
|
119
|
+
const configuredItem = {
|
|
120
|
+
hydratedId,
|
|
121
|
+
hydratedPreventMove,
|
|
122
|
+
isSelected,
|
|
123
|
+
softDeleted,
|
|
124
|
+
original: datum,
|
|
125
|
+
localIndex: i,
|
|
126
|
+
isFirst: i === 0,
|
|
127
|
+
isLast: i === sourceData.length - 1
|
|
128
|
+
};
|
|
129
|
+
sourceConfiguredData.push(configuredItem);
|
|
130
|
+
if (!hydratedPreventMove && !softDeleted) {
|
|
131
|
+
sourceSelectionableData.push(configuredItem);
|
|
132
|
+
sourceSelectionableDataIds.push(`${hydratedId}`);
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
const sourceHasMultipleSelectedItems = sourceSelectionArray.length >= 1;
|
|
136
|
+
const sourceSelectionableIds = sourceSelectionableDataIds.join(" ");
|
|
137
|
+
return {
|
|
138
|
+
sourceConfiguredData,
|
|
139
|
+
sourceSelectedItemsMap,
|
|
140
|
+
sourceSelectionItemArray,
|
|
141
|
+
sourceSelectionArray,
|
|
142
|
+
sourceHasMultipleSelectedItems,
|
|
143
|
+
sourceSelectionableData,
|
|
144
|
+
sourceSelectionableDataIds,
|
|
145
|
+
sourceSelectionableIds
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
const useDataStructure = (propsFromUser) => {
|
|
149
|
+
const {
|
|
150
|
+
sourceData,
|
|
151
|
+
sourceSelectedItems,
|
|
152
|
+
destinationData,
|
|
153
|
+
destinationSelectedItems,
|
|
154
|
+
getId,
|
|
155
|
+
getPreventMove,
|
|
156
|
+
sourceSoftDeletedItems,
|
|
157
|
+
destinationSoftDeletedItems
|
|
158
|
+
} = propsFromUser;
|
|
159
|
+
return (0, import_react.useMemo)(
|
|
160
|
+
() => ({
|
|
161
|
+
...configureSource({ sourceData, sourceSelectedItems, sourceSoftDeletedItems, getId, getPreventMove }),
|
|
162
|
+
...configureDestination({
|
|
163
|
+
destinationData,
|
|
164
|
+
destinationSelectedItems,
|
|
165
|
+
destinationSoftDeletedItems,
|
|
166
|
+
getId,
|
|
167
|
+
getPreventMove
|
|
168
|
+
})
|
|
169
|
+
}),
|
|
170
|
+
[
|
|
171
|
+
sourceData,
|
|
172
|
+
sourceSelectedItems,
|
|
173
|
+
sourceSoftDeletedItems,
|
|
174
|
+
getId,
|
|
175
|
+
getPreventMove,
|
|
176
|
+
destinationData,
|
|
177
|
+
destinationSelectedItems,
|
|
178
|
+
destinationSoftDeletedItems
|
|
179
|
+
]
|
|
180
|
+
);
|
|
181
|
+
};
|
|
182
|
+
//# sourceMappingURL=useDataStructure.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/config/useAutoCalculated/useDataStructure.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { useMemo } from 'react';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types.js';\n\ntype ConfigureDestinationConfig = {\n destinationData: DSShuttleV2T.Datum[];\n destinationSelectedItems: DSShuttleV2T.SelectionMap;\n destinationSoftDeletedItems: DSShuttleV2T.SoftDeletedMap;\n getId: DSShuttleV2T.PrimaryKeyHydraters['getId'];\n getPreventMove: DSShuttleV2T.FunctionalHydraters['getPreventMove'];\n};\nconst configureDestination = ({\n destinationData,\n destinationSelectedItems,\n destinationSoftDeletedItems,\n getId,\n getPreventMove,\n}: ConfigureDestinationConfig) => {\n const destinationSelectedItemsMap: Record<string, { datum: DSShuttleV2T.Datum; index: number }> = {};\n const destinationSelectionArray: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n const destinationSelectionableDataIds: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n\n const destinationSelectionItemArray: DSShuttleV2T.Datum[] = [];\n const destinationConfiguredData: DSShuttleV2T.ConfiguredDatum[] = [];\n const destinationSelectionableData: DSShuttleV2T.ConfiguredDatum[] = [];\n\n destinationData.forEach((datum, i) => {\n const hydratedId = getId(datum);\n const hydratedPreventMove = getPreventMove?.(datum) ?? false;\n let isSelected = false;\n if (destinationSelectedItems[hydratedId] === true) {\n destinationSelectionItemArray.push(datum);\n destinationSelectionArray.push(hydratedId);\n isSelected = true;\n }\n let softDeleted = false;\n if (destinationSoftDeletedItems[hydratedId] === true) {\n softDeleted = true;\n }\n destinationSelectedItemsMap[hydratedId] = { datum, index: i };\n const configuredItem = {\n hydratedId,\n hydratedPreventMove,\n isSelected,\n softDeleted,\n original: datum,\n localIndex: i,\n isFirst: i === 0,\n isLast: i === destinationData.length - 1,\n } as const;\n destinationConfiguredData.push(configuredItem);\n if (!hydratedPreventMove && !softDeleted) {\n destinationSelectionableData.push(configuredItem);\n destinationSelectionableDataIds.push(`${hydratedId}`);\n }\n });\n const destinationHasMultipleSelectedItems = destinationSelectionArray.length >= 1;\n const destinationSelectionableIds = destinationSelectionableDataIds.join(' ');\n\n return {\n destinationSelectedItemsMap,\n destinationSelectionItemArray,\n destinationSelectionArray,\n destinationHasMultipleSelectedItems,\n destinationConfiguredData,\n destinationSelectionableData,\n destinationSelectionableDataIds,\n destinationSelectionableIds,\n };\n};\ntype ConfigureSourceConfig = {\n sourceData: DSShuttleV2T.Datum[];\n sourceSelectedItems: DSShuttleV2T.SelectionMap;\n sourceSoftDeletedItems: DSShuttleV2T.SoftDeletedMap;\n getId: DSShuttleV2T.PrimaryKeyHydraters['getId'];\n getPreventMove: DSShuttleV2T.FunctionalHydraters['getPreventMove'];\n};\n\nconst configureSource = ({\n sourceData,\n sourceSelectedItems,\n sourceSoftDeletedItems,\n getId,\n getPreventMove,\n}: ConfigureSourceConfig) => {\n const sourceSelectedItemsMap: Record<string, { datum: DSShuttleV2T.Datum; index: number }> = {};\n const sourceSelectionArray: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n const sourceSelectionableDataIds: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n\n const sourceSelectionItemArray: DSShuttleV2T.Datum[] = [];\n const sourceConfiguredData: DSShuttleV2T.ConfiguredDatum[] = [];\n const sourceSelectionableData: DSShuttleV2T.ConfiguredDatum[] = [];\n sourceData.forEach((datum, i) => {\n const hydratedId = getId(datum);\n const hydratedPreventMove = getPreventMove?.(datum) ?? false;\n let isSelected = false;\n if (sourceSelectedItems[hydratedId] === true) {\n sourceSelectionItemArray.push(datum);\n sourceSelectionArray.push(hydratedId);\n isSelected = true;\n }\n let softDeleted = false;\n if (sourceSoftDeletedItems[hydratedId] === true) {\n softDeleted = true;\n }\n\n sourceSelectedItemsMap[hydratedId] = { datum, index: i };\n const configuredItem = {\n hydratedId,\n hydratedPreventMove,\n isSelected,\n softDeleted,\n original: datum,\n localIndex: i,\n isFirst: i === 0,\n isLast: i === sourceData.length - 1,\n } as const;\n sourceConfiguredData.push(configuredItem);\n if (!hydratedPreventMove && !softDeleted) {\n sourceSelectionableData.push(configuredItem);\n sourceSelectionableDataIds.push(`${hydratedId}`);\n }\n });\n const sourceHasMultipleSelectedItems = sourceSelectionArray.length >= 1;\n const sourceSelectionableIds = sourceSelectionableDataIds.join(' ');\n return {\n sourceConfiguredData,\n sourceSelectedItemsMap,\n sourceSelectionItemArray,\n sourceSelectionArray,\n sourceHasMultipleSelectedItems,\n sourceSelectionableData,\n sourceSelectionableDataIds,\n sourceSelectionableIds,\n };\n};\n\nexport const useDataStructure = (propsFromUser: DSShuttleV2T.InternalProps) => {\n const {\n sourceData,\n sourceSelectedItems,\n destinationData,\n destinationSelectedItems,\n getId,\n getPreventMove,\n sourceSoftDeletedItems,\n destinationSoftDeletedItems,\n } = propsFromUser;\n return useMemo(\n () => ({\n ...configureSource({ sourceData, sourceSelectedItems, sourceSoftDeletedItems, getId, getPreventMove }),\n ...configureDestination({\n destinationData,\n destinationSelectedItems,\n destinationSoftDeletedItems,\n getId,\n getPreventMove,\n }),\n }),\n [\n sourceData,\n sourceSelectedItems,\n sourceSoftDeletedItems,\n getId,\n getPreventMove,\n destinationData,\n destinationSelectedItems,\n destinationSoftDeletedItems,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var useShuttleVirtualized_exports = {};
|
|
30
|
+
__export(useShuttleVirtualized_exports, {
|
|
31
|
+
useShuttleVirtualized: () => useShuttleVirtualized
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(useShuttleVirtualized_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_react = require("react");
|
|
36
|
+
const useShuttleVirtualized = () => {
|
|
37
|
+
const actionRefObject = {
|
|
38
|
+
scrollTo: () => {
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
const destinationVirtualRef = (0, import_react.useRef)(actionRefObject);
|
|
42
|
+
const sourceVirtualRef = (0, import_react.useRef)(actionRefObject);
|
|
43
|
+
return (0, import_react.useMemo)(
|
|
44
|
+
() => ({
|
|
45
|
+
destinationVirtualRef,
|
|
46
|
+
sourceVirtualRef
|
|
47
|
+
}),
|
|
48
|
+
[]
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=useShuttleVirtualized.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/config/useAutoCalculated/useShuttleVirtualized.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { useMemo, useRef } from 'react';\n\ntype ActionRefVirtualized = {\n scrollTo: (index: number) => void;\n};\nexport const useShuttleVirtualized = () => {\n const actionRefObject: ActionRefVirtualized = {\n scrollTo: () => {},\n };\n const destinationVirtualRef = useRef(actionRefObject);\n const sourceVirtualRef = useRef(actionRefObject);\n\n return useMemo(\n () => ({\n destinationVirtualRef,\n sourceVirtualRef,\n }),\n [],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAgC;AAKzB,MAAM,wBAAwB,MAAM;AACzC,QAAM,kBAAwC;AAAA,IAC5C,UAAU,MAAM;AAAA,IAAC;AAAA,EACnB;AACA,QAAM,4BAAwB,qBAAO,eAAe;AACpD,QAAM,uBAAmB,qBAAO,eAAe;AAE/C,aAAO;AAAA,IACL,OAAO;AAAA,MACL;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC;AAAA,EACH;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|