@elliemae/ds-shuttle-v2 3.16.0-next.2 → 3.16.0-next.21
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 +14 -3
- package/dist/cjs/DSShuttleV2.js.map +2 -2
- package/dist/cjs/config/DSShuttleV2Definitions.js +4 -0
- package/dist/cjs/config/DSShuttleV2Definitions.js.map +1 -1
- package/dist/cjs/config/itemMovementHelpers.js +5 -1
- package/dist/cjs/config/itemMovementHelpers.js.map +2 -2
- package/dist/cjs/config/useAutoCalculated/index.js +6 -2
- package/dist/cjs/config/useAutoCalculated/index.js.map +2 -2
- package/dist/cjs/config/useAutoCalculated/useDataStructure.js +4 -0
- package/dist/cjs/config/useAutoCalculated/useDataStructure.js.map +2 -2
- package/dist/cjs/config/useAutoCalculated/useShuttleVirtualized.js +4 -0
- package/dist/cjs/config/useAutoCalculated/useShuttleVirtualized.js.map +2 -2
- package/dist/cjs/config/useFocusTracker/index.js +8 -4
- package/dist/cjs/config/useFocusTracker/index.js.map +2 -2
- package/dist/cjs/config/useFocusTracker/useFocusActionTrackers.js +6 -2
- package/dist/cjs/config/useFocusTracker/useFocusActionTrackers.js.map +2 -2
- package/dist/cjs/config/useFocusTracker/useFocusItemTracker.js +6 -2
- package/dist/cjs/config/useFocusTracker/useFocusItemTracker.js.map +2 -2
- package/dist/cjs/config/useFocusTracker/useFocusRegionTrackers.js +6 -2
- package/dist/cjs/config/useFocusTracker/useFocusRegionTrackers.js.map +2 -2
- package/dist/cjs/config/useFocusTracker/useFocusTracker.js +7 -3
- package/dist/cjs/config/useFocusTracker/useFocusTracker.js.map +2 -2
- package/dist/cjs/config/useStore/focusAndTabIndexManager.js +8 -4
- package/dist/cjs/config/useStore/focusAndTabIndexManager.js.map +2 -2
- package/dist/cjs/config/useStore/index.js +5 -1
- package/dist/cjs/config/useStore/index.js.map +2 -2
- package/dist/cjs/config/useStore/useStore.js +10 -6
- package/dist/cjs/config/useStore/useStore.js.map +2 -2
- package/dist/cjs/config/useValidateProps.js +7 -3
- package/dist/cjs/config/useValidateProps.js.map +2 -2
- package/dist/cjs/constants/index.js +4 -0
- package/dist/cjs/constants/index.js.map +1 -1
- 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 +10 -3
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/package.json +7 -0
- package/dist/cjs/parts/Dnd/DndHandle.js +6 -2
- package/dist/cjs/parts/Dnd/DndHandle.js.map +2 -2
- package/dist/cjs/parts/Dnd/DragOverlay.js +6 -2
- package/dist/cjs/parts/Dnd/DragOverlay.js.map +2 -2
- package/dist/cjs/parts/Dnd/DropIndicator.js +4 -0
- package/dist/cjs/parts/Dnd/DropIndicator.js.map +1 -1
- package/dist/cjs/parts/Header.js +7 -3
- package/dist/cjs/parts/Header.js.map +2 -2
- package/dist/cjs/parts/HoC/withConditionalDnDRowContext.js +7 -2
- package/dist/cjs/parts/HoC/withConditionalDnDRowContext.js.map +2 -2
- package/dist/cjs/parts/HoC/withConditionalUseSortable.js +4 -0
- package/dist/cjs/parts/HoC/withConditionalUseSortable.js.map +2 -2
- package/dist/cjs/parts/Item/Item.js +41 -31
- package/dist/cjs/parts/Item/Item.js.map +2 -2
- package/dist/cjs/parts/Item/ItemActions/ItemActions.js +14 -7
- package/dist/cjs/parts/Item/ItemActions/ItemActions.js.map +2 -2
- package/dist/cjs/parts/Item/ItemActions/index.js +5 -1
- package/dist/cjs/parts/Item/ItemActions/index.js.map +2 -2
- package/dist/cjs/parts/Item/ItemActions/useActionsHandlers.js +5 -1
- package/dist/cjs/parts/Item/ItemActions/useActionsHandlers.js.map +2 -2
- package/dist/cjs/parts/Item/ItemActions/useActionsLogicHandlers.js +7 -3
- package/dist/cjs/parts/Item/ItemActions/useActionsLogicHandlers.js.map +2 -2
- package/dist/cjs/parts/Item/ItemActions/useInnerRefHandlers.js +6 -2
- package/dist/cjs/parts/Item/ItemActions/useInnerRefHandlers.js.map +2 -2
- package/dist/cjs/parts/Item/ItemMiddleSection.js +50 -30
- package/dist/cjs/parts/Item/ItemMiddleSection.js.map +2 -2
- package/dist/cjs/parts/Item/ItemOverlay.js +8 -4
- package/dist/cjs/parts/Item/ItemOverlay.js.map +2 -2
- package/dist/cjs/parts/Item/ItemSelection.js +5 -1
- package/dist/cjs/parts/Item/ItemSelection.js.map +2 -2
- package/dist/cjs/parts/Item/TextSection.js +5 -1
- package/dist/cjs/parts/Item/TextSection.js.map +2 -2
- package/dist/cjs/parts/Item/useItemArrowNavigation.js +6 -2
- package/dist/cjs/parts/Item/useItemArrowNavigation.js.map +2 -2
- package/dist/cjs/parts/Item/useItemKeyboardSelection.js +6 -2
- package/dist/cjs/parts/Item/useItemKeyboardSelection.js.map +2 -2
- package/dist/cjs/parts/Item/useSelectionLogic.js +6 -2
- package/dist/cjs/parts/Item/useSelectionLogic.js.map +2 -2
- 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 +8 -4
- package/dist/cjs/parts/MainContent.js.map +2 -2
- package/dist/cjs/parts/Panel/bottom/LoadMoreBtn.js +8 -4
- package/dist/cjs/parts/Panel/bottom/LoadMoreBtn.js.map +2 -2
- package/dist/cjs/parts/Panel/bottom/LoadingMore.js +5 -1
- package/dist/cjs/parts/Panel/bottom/LoadingMore.js.map +2 -2
- package/dist/cjs/parts/Panel/bottom/PanelContentBottomSection.js +10 -6
- package/dist/cjs/parts/Panel/bottom/PanelContentBottomSection.js.map +2 -2
- package/dist/cjs/parts/Panel/bottom/useInnerRefHandlers.js +6 -2
- package/dist/cjs/parts/Panel/bottom/useInnerRefHandlers.js.map +2 -2
- package/dist/cjs/parts/Panel/bottom/useLoadMoreBtnArrowNavigation.js +6 -2
- package/dist/cjs/parts/Panel/bottom/useLoadMoreBtnArrowNavigation.js.map +2 -2
- package/dist/cjs/parts/Panel/middle/EmptyItems.js +5 -1
- package/dist/cjs/parts/Panel/middle/EmptyItems.js.map +2 -2
- package/dist/cjs/parts/Panel/middle/ItemListWrapper/Index.js +10 -6
- package/dist/cjs/parts/Panel/middle/ItemListWrapper/Index.js.map +2 -2
- package/dist/cjs/parts/Panel/middle/ItemListWrapper/getDatumFlags.js +4 -0
- package/dist/cjs/parts/Panel/middle/ItemListWrapper/getDatumFlags.js.map +1 -1
- package/dist/cjs/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.js +5 -1
- package/dist/cjs/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.js.map +2 -2
- package/dist/cjs/parts/Panel/middle/LoadingItems.js +5 -1
- package/dist/cjs/parts/Panel/middle/LoadingItems.js.map +2 -2
- package/dist/cjs/parts/Panel/middle/MultipleSelectionAction.js +21 -5
- package/dist/cjs/parts/Panel/middle/MultipleSelectionAction.js.map +2 -2
- package/dist/cjs/parts/Panel/middle/PanelContentMiddleSection.js +12 -8
- package/dist/cjs/parts/Panel/middle/PanelContentMiddleSection.js.map +2 -2
- package/dist/cjs/parts/Panel/top/PanelContentTopSection.js +8 -4
- package/dist/cjs/parts/Panel/top/PanelContentTopSection.js.map +2 -2
- package/dist/cjs/parts/Panel/top/PanelFilterSection.js +6 -2
- package/dist/cjs/parts/Panel/top/PanelFilterSection.js.map +2 -2
- package/dist/cjs/parts/Panel/top/SelectionHeader.js +6 -2
- package/dist/cjs/parts/Panel/top/SelectionHeader.js.map +2 -2
- package/dist/cjs/parts/PanelWrapper.js +9 -5
- package/dist/cjs/parts/PanelWrapper.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +69 -47
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/tests/configs/basic.js +5 -0
- package/dist/cjs/tests/configs/basic.js.map +1 -1
- package/dist/cjs/tests/configs/filter.js +5 -0
- package/dist/cjs/tests/configs/filter.js.map +1 -1
- package/dist/cjs/tests/configs/loadMore.js +5 -0
- package/dist/cjs/tests/configs/loadMore.js.map +1 -1
- package/dist/esm/DSShuttleV2.js +10 -3
- package/dist/esm/DSShuttleV2.js.map +2 -2
- package/dist/esm/config/itemMovementHelpers.js +1 -1
- package/dist/esm/config/itemMovementHelpers.js.map +2 -2
- package/dist/esm/config/useAutoCalculated/index.js +2 -2
- package/dist/esm/config/useAutoCalculated/index.js.map +2 -2
- package/dist/esm/config/useAutoCalculated/useDataStructure.js.map +2 -2
- package/dist/esm/config/useAutoCalculated/useShuttleVirtualized.js.map +2 -2
- package/dist/esm/config/useFocusTracker/index.js +4 -4
- package/dist/esm/config/useFocusTracker/index.js.map +1 -1
- package/dist/esm/config/useFocusTracker/useFocusActionTrackers.js +2 -2
- package/dist/esm/config/useFocusTracker/useFocusActionTrackers.js.map +1 -1
- package/dist/esm/config/useFocusTracker/useFocusItemTracker.js +2 -2
- package/dist/esm/config/useFocusTracker/useFocusItemTracker.js.map +2 -2
- package/dist/esm/config/useFocusTracker/useFocusRegionTrackers.js +2 -2
- package/dist/esm/config/useFocusTracker/useFocusRegionTrackers.js.map +1 -1
- package/dist/esm/config/useFocusTracker/useFocusTracker.js +3 -3
- package/dist/esm/config/useFocusTracker/useFocusTracker.js.map +1 -1
- package/dist/esm/config/useStore/focusAndTabIndexManager.js +4 -4
- package/dist/esm/config/useStore/focusAndTabIndexManager.js.map +2 -2
- package/dist/esm/config/useStore/index.js +1 -1
- package/dist/esm/config/useStore/index.js.map +1 -1
- package/dist/esm/config/useStore/useStore.js +6 -6
- package/dist/esm/config/useStore/useStore.js.map +2 -2
- package/dist/esm/config/useValidateProps.js +2 -2
- package/dist/esm/config/useValidateProps.js.map +1 -1
- 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 +6 -3
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/package.json +7 -0
- package/dist/esm/parts/Dnd/DndHandle.js +2 -2
- package/dist/esm/parts/Dnd/DndHandle.js.map +2 -2
- package/dist/esm/parts/Dnd/DragOverlay.js +2 -2
- package/dist/esm/parts/Dnd/DragOverlay.js.map +1 -1
- package/dist/esm/parts/Dnd/DropIndicator.js.map +1 -1
- package/dist/esm/parts/Header.js +3 -3
- package/dist/esm/parts/Header.js.map +1 -1
- package/dist/esm/parts/HoC/withConditionalDnDRowContext.js +3 -2
- package/dist/esm/parts/HoC/withConditionalDnDRowContext.js.map +2 -2
- package/dist/esm/parts/HoC/withConditionalUseSortable.js.map +1 -1
- package/dist/esm/parts/Item/Item.js +37 -31
- package/dist/esm/parts/Item/Item.js.map +2 -2
- package/dist/esm/parts/Item/ItemActions/ItemActions.js +10 -7
- package/dist/esm/parts/Item/ItemActions/ItemActions.js.map +2 -2
- package/dist/esm/parts/Item/ItemActions/index.js +1 -1
- package/dist/esm/parts/Item/ItemActions/index.js.map +1 -1
- package/dist/esm/parts/Item/ItemActions/useActionsHandlers.js +1 -1
- package/dist/esm/parts/Item/ItemActions/useActionsHandlers.js.map +1 -1
- package/dist/esm/parts/Item/ItemActions/useActionsLogicHandlers.js +3 -3
- package/dist/esm/parts/Item/ItemActions/useActionsLogicHandlers.js.map +1 -1
- package/dist/esm/parts/Item/ItemActions/useInnerRefHandlers.js +2 -2
- package/dist/esm/parts/Item/ItemActions/useInnerRefHandlers.js.map +1 -1
- package/dist/esm/parts/Item/ItemMiddleSection.js +46 -30
- package/dist/esm/parts/Item/ItemMiddleSection.js.map +2 -2
- package/dist/esm/parts/Item/ItemOverlay.js +4 -4
- package/dist/esm/parts/Item/ItemOverlay.js.map +2 -2
- package/dist/esm/parts/Item/ItemSelection.js +1 -1
- package/dist/esm/parts/Item/ItemSelection.js.map +2 -2
- package/dist/esm/parts/Item/TextSection.js +1 -1
- package/dist/esm/parts/Item/TextSection.js.map +1 -1
- package/dist/esm/parts/Item/useItemArrowNavigation.js +6 -2
- package/dist/esm/parts/Item/useItemArrowNavigation.js.map +2 -2
- package/dist/esm/parts/Item/useItemKeyboardSelection.js +2 -2
- package/dist/esm/parts/Item/useItemKeyboardSelection.js.map +1 -1
- package/dist/esm/parts/Item/useSelectionLogic.js +2 -2
- package/dist/esm/parts/Item/useSelectionLogic.js.map +2 -2
- 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 +4 -4
- package/dist/esm/parts/MainContent.js.map +1 -1
- package/dist/esm/parts/Panel/bottom/LoadMoreBtn.js +4 -4
- package/dist/esm/parts/Panel/bottom/LoadMoreBtn.js.map +1 -1
- package/dist/esm/parts/Panel/bottom/LoadingMore.js +1 -1
- package/dist/esm/parts/Panel/bottom/LoadingMore.js.map +1 -1
- package/dist/esm/parts/Panel/bottom/PanelContentBottomSection.js +6 -6
- package/dist/esm/parts/Panel/bottom/PanelContentBottomSection.js.map +1 -1
- package/dist/esm/parts/Panel/bottom/useInnerRefHandlers.js +2 -2
- package/dist/esm/parts/Panel/bottom/useInnerRefHandlers.js.map +1 -1
- package/dist/esm/parts/Panel/bottom/useLoadMoreBtnArrowNavigation.js +6 -2
- package/dist/esm/parts/Panel/bottom/useLoadMoreBtnArrowNavigation.js.map +2 -2
- package/dist/esm/parts/Panel/middle/EmptyItems.js +1 -1
- package/dist/esm/parts/Panel/middle/EmptyItems.js.map +1 -1
- package/dist/esm/parts/Panel/middle/ItemListWrapper/Index.js +6 -6
- package/dist/esm/parts/Panel/middle/ItemListWrapper/Index.js.map +2 -2
- package/dist/esm/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.js +1 -1
- package/dist/esm/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.js.map +2 -2
- package/dist/esm/parts/Panel/middle/LoadingItems.js +1 -1
- package/dist/esm/parts/Panel/middle/LoadingItems.js.map +1 -1
- package/dist/esm/parts/Panel/middle/MultipleSelectionAction.js +17 -5
- package/dist/esm/parts/Panel/middle/MultipleSelectionAction.js.map +2 -2
- package/dist/esm/parts/Panel/middle/PanelContentMiddleSection.js +8 -8
- package/dist/esm/parts/Panel/middle/PanelContentMiddleSection.js.map +2 -2
- package/dist/esm/parts/Panel/top/PanelContentTopSection.js +4 -4
- package/dist/esm/parts/Panel/top/PanelContentTopSection.js.map +1 -1
- package/dist/esm/parts/Panel/top/PanelFilterSection.js +2 -2
- package/dist/esm/parts/Panel/top/PanelFilterSection.js.map +1 -1
- package/dist/esm/parts/Panel/top/SelectionHeader.js +2 -2
- package/dist/esm/parts/Panel/top/SelectionHeader.js.map +2 -2
- package/dist/esm/parts/PanelWrapper.js +5 -5
- package/dist/esm/parts/PanelWrapper.js.map +1 -1
- package/dist/esm/react-desc-prop-types.js +65 -47
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/tests/configs/basic.js +1 -0
- package/dist/esm/tests/configs/basic.js.map +1 -1
- package/dist/esm/tests/configs/filter.js +1 -0
- package/dist/esm/tests/configs/filter.js.map +1 -1
- package/dist/esm/tests/configs/loadMore.js +1 -0
- package/dist/esm/tests/configs/loadMore.js.map +1 -1
- package/dist/types/DSShuttleV2.d.ts +3 -1
- package/dist/types/config/itemMovementHelpers.d.ts +1 -1
- package/dist/types/config/useAutoCalculated/index.d.ts +1 -1
- package/dist/types/config/useAutoCalculated/useDataStructure.d.ts +1 -1
- package/dist/types/config/useAutoCalculated/useShuttleVirtualized.d.ts +1 -1
- package/dist/types/config/useFocusTracker/index.d.ts +4 -4
- package/dist/types/config/useFocusTracker/useFocusActionTrackers.d.ts +1 -1
- package/dist/types/config/useFocusTracker/useFocusItemTracker.d.ts +1 -1
- package/dist/types/config/useFocusTracker/useFocusTracker.d.ts +7 -7
- package/dist/types/config/useStore/focusAndTabIndexManager.d.ts +1 -1
- package/dist/types/config/useStore/index.d.ts +1 -1
- package/dist/types/config/useStore/useStore.d.ts +1 -1
- package/dist/types/config/useValidateProps.d.ts +1 -1
- 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 -2
- package/dist/types/parts/Header.d.ts +1 -1
- package/dist/types/parts/HoC/withConditionalDnDRowContext.d.ts +1 -1
- package/dist/types/parts/HoC/withConditionalUseSortable.d.ts +1 -1
- package/dist/types/parts/Item/Item.d.ts +1 -1
- package/dist/types/parts/Item/ItemActions/ItemActions.d.ts +1 -1
- package/dist/types/parts/Item/ItemActions/index.d.ts +1 -1
- package/dist/types/parts/Item/ItemActions/useActionsHandlers.d.ts +1 -1
- package/dist/types/parts/Item/ItemActions/useActionsLogicHandlers.d.ts +1 -1
- package/dist/types/parts/Item/ItemActions/useInnerRefHandlers.d.ts +1 -1
- package/dist/types/parts/Item/ItemMiddleSection.d.ts +4 -2
- package/dist/types/parts/Item/ItemOverlay.d.ts +1 -1
- package/dist/types/parts/Item/ItemSelection.d.ts +1 -1
- package/dist/types/parts/Item/TextSection.d.ts +1 -1
- package/dist/types/parts/Item/useItemArrowNavigation.d.ts +1 -1
- package/dist/types/parts/Item/useItemKeyboardSelection.d.ts +1 -1
- package/dist/types/parts/Item/useSelectionLogic.d.ts +1 -1
- package/dist/types/parts/Item/useThisItemIsFocused.d.ts +4 -0
- package/dist/types/parts/Panel/bottom/LoadMoreBtn.d.ts +1 -1
- package/dist/types/parts/Panel/bottom/LoadingMore.d.ts +1 -1
- package/dist/types/parts/Panel/bottom/PanelContentBottomSection.d.ts +1 -1
- package/dist/types/parts/Panel/bottom/useInnerRefHandlers.d.ts +1 -1
- package/dist/types/parts/Panel/bottom/useLoadMoreBtnArrowNavigation.d.ts +1 -1
- package/dist/types/parts/Panel/middle/EmptyItems.d.ts +1 -1
- package/dist/types/parts/Panel/middle/ItemListWrapper/Index.d.ts +1 -1
- package/dist/types/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.d.ts +1 -1
- package/dist/types/parts/Panel/middle/LoadingItems.d.ts +1 -1
- package/dist/types/parts/Panel/middle/MultipleSelectionAction.d.ts +1 -1
- package/dist/types/parts/Panel/middle/PanelContentMiddleSection.d.ts +1 -1
- package/dist/types/parts/Panel/top/PanelContentTopSection.d.ts +1 -1
- package/dist/types/parts/Panel/top/PanelFilterSection.d.ts +1 -1
- package/dist/types/parts/Panel/top/SelectionHeader.d.ts +1 -1
- package/dist/types/parts/PanelWrapper.d.ts +1 -1
- package/dist/types/react-desc-prop-types.d.ts +6 -4
- package/package.json +20 -18
|
@@ -3,8 +3,9 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import React2 from "react";
|
|
4
4
|
import { styled } from "@elliemae/ds-system";
|
|
5
5
|
import { Grid } from "@elliemae/ds-grid";
|
|
6
|
-
import { DSShuttleV2Name, DSShuttleV2Slots } from "../../config/DSShuttleV2Definitions";
|
|
7
|
-
import { TextSection } from "./TextSection";
|
|
6
|
+
import { DSShuttleV2Name, DSShuttleV2Slots } from "../../config/DSShuttleV2Definitions.js";
|
|
7
|
+
import { TextSection } from "./TextSection.js";
|
|
8
|
+
import { useThisItemIsFocused } from "./useThisItemIsFocused.js";
|
|
8
9
|
const IconWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_ICON_WRAPPER })`
|
|
9
10
|
min-height: 1rem;
|
|
10
11
|
`;
|
|
@@ -26,35 +27,50 @@ const MidSection = styled(Grid, {
|
|
|
26
27
|
`;
|
|
27
28
|
const customMidSectionCols = ["1fr"];
|
|
28
29
|
const customMidSectionRows = ["1fr"];
|
|
29
|
-
const ItemMiddleSection = React2.memo(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
30
|
+
const ItemMiddleSection = React2.memo(
|
|
31
|
+
(props) => {
|
|
32
|
+
const { tooltipHelpers, ...itemMeta } = props;
|
|
33
|
+
const { datum, datumHydratables, datumInternalMeta, isDestinationPanel, hasMultipleSelection } = itemMeta;
|
|
34
|
+
const { Icon, CustomRenderer, ...componentlessHydratables } = datumHydratables;
|
|
35
|
+
const { softDeleted, hydratedId } = datumInternalMeta;
|
|
36
|
+
const thisItemIsFocused = useThisItemIsFocused(itemMeta);
|
|
37
|
+
const customComponentProps = React2.useMemo(
|
|
38
|
+
() => ({
|
|
39
|
+
datum,
|
|
40
|
+
tooltipHelpers,
|
|
41
|
+
thisItemIsFocused,
|
|
42
|
+
panelMetaInfo: { isDestinationPanel, hasMultipleSelection },
|
|
43
|
+
datumInternalMeta,
|
|
44
|
+
datumHydratables: { ...componentlessHydratables, id: hydratedId }
|
|
45
|
+
}),
|
|
46
|
+
[
|
|
47
|
+
componentlessHydratables,
|
|
48
|
+
datum,
|
|
49
|
+
datumInternalMeta,
|
|
50
|
+
hasMultipleSelection,
|
|
51
|
+
hydratedId,
|
|
52
|
+
isDestinationPanel,
|
|
53
|
+
thisItemIsFocused,
|
|
54
|
+
tooltipHelpers
|
|
55
|
+
]
|
|
56
|
+
);
|
|
57
|
+
const cols = React2.useMemo(() => {
|
|
58
|
+
if (CustomRenderer)
|
|
59
|
+
return [];
|
|
60
|
+
const dynamicCols = [];
|
|
61
|
+
if (Icon)
|
|
62
|
+
dynamicCols.push("auto");
|
|
63
|
+
dynamicCols.push("1fr");
|
|
64
|
+
return dynamicCols;
|
|
65
|
+
}, [CustomRenderer, Icon]);
|
|
43
66
|
if (CustomRenderer)
|
|
44
|
-
return
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
if (CustomRenderer)
|
|
52
|
-
return /* @__PURE__ */ jsx(MidSection, { cols: customMidSectionCols, rows: customMidSectionRows, $softDeleted: Boolean(softDeleted), children: /* @__PURE__ */ jsx(CustomRenderer, { ...customComponentProps }) });
|
|
53
|
-
return /* @__PURE__ */ jsxs(MidSection, { cols, alignItems: "center", ml: "xxs", $softDeleted: Boolean(softDeleted), children: [
|
|
54
|
-
Icon ? /* @__PURE__ */ jsx(IconWrapper, { alignItems: "center", mr: "xxs", children: /* @__PURE__ */ jsx(Icon, { ...customComponentProps }) }) : null,
|
|
55
|
-
/* @__PURE__ */ jsx(TextSection, { ...itemMeta })
|
|
56
|
-
] });
|
|
57
|
-
});
|
|
67
|
+
return /* @__PURE__ */ jsx(MidSection, { cols: customMidSectionCols, rows: customMidSectionRows, $softDeleted: Boolean(softDeleted), children: /* @__PURE__ */ jsx(CustomRenderer, { ...customComponentProps }) });
|
|
68
|
+
return /* @__PURE__ */ jsxs(MidSection, { cols, alignItems: "center", ml: "xxs", $softDeleted: Boolean(softDeleted), children: [
|
|
69
|
+
Icon ? /* @__PURE__ */ jsx(IconWrapper, { alignItems: "center", mr: "xxs", children: /* @__PURE__ */ jsx(Icon, { ...customComponentProps }) }) : null,
|
|
70
|
+
/* @__PURE__ */ jsx(TextSection, { ...itemMeta })
|
|
71
|
+
] });
|
|
72
|
+
}
|
|
73
|
+
);
|
|
58
74
|
export {
|
|
59
75
|
ItemMiddleSection
|
|
60
76
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/Item/ItemMiddleSection.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../config/DSShuttleV2Definitions';\nimport { TextSection } from './TextSection';\n\nconst IconWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_ICON_WRAPPER })`\n min-height: 1rem;\n`;\n\nconst MidSection = styled(Grid, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.ITEM_MIDSECTION_WRAPPER,\n})<{ $softDeleted: boolean }>`\n min-height: 1rem;\n ${(props) => {\n if (props.$softDeleted)\n return `\n color: ${props.theme.colors.neutral[500]};\n svg {\n fill: ${props.theme.colors.neutral[400]};\n }\n `;\n return '';\n }};\n`;\nconst customMidSectionCols = ['1fr'];\nconst customMidSectionRows = ['1fr'];\n\nexport const ItemMiddleSection = React.memo((
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../config/DSShuttleV2Definitions.js';\nimport { TextSection } from './TextSection.js';\nimport { useThisItemIsFocused } from './useThisItemIsFocused.js';\n\nconst IconWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_ICON_WRAPPER })`\n min-height: 1rem;\n`;\n\nconst MidSection = styled(Grid, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.ITEM_MIDSECTION_WRAPPER,\n})<{ $softDeleted: boolean }>`\n min-height: 1rem;\n ${(props) => {\n if (props.$softDeleted)\n return `\n color: ${props.theme.colors.neutral[500]};\n svg {\n fill: ${props.theme.colors.neutral[400]};\n }\n `;\n return '';\n }};\n`;\nconst customMidSectionCols = ['1fr'];\nconst customMidSectionRows = ['1fr'];\n\nexport const ItemMiddleSection = React.memo(\n (props: DSShuttleV2T.ItemMeta & { tooltipHelpers: DSShuttleV2T.ComponentProps['tooltipHelpers'] }) => {\n const { tooltipHelpers, ...itemMeta } = props;\n const { datum, datumHydratables, datumInternalMeta, isDestinationPanel, hasMultipleSelection } = itemMeta;\n const { Icon, CustomRenderer, ...componentlessHydratables } = datumHydratables;\n const { softDeleted, hydratedId } = datumInternalMeta;\n const thisItemIsFocused = useThisItemIsFocused(itemMeta);\n const customComponentProps = React.useMemo<DSShuttleV2T.ComponentProps>(\n () => ({\n datum,\n tooltipHelpers,\n thisItemIsFocused,\n panelMetaInfo: { isDestinationPanel, hasMultipleSelection },\n datumInternalMeta,\n datumHydratables: { ...componentlessHydratables, id: hydratedId },\n }),\n [\n componentlessHydratables,\n datum,\n datumInternalMeta,\n hasMultipleSelection,\n hydratedId,\n isDestinationPanel,\n thisItemIsFocused,\n tooltipHelpers,\n ],\n );\n const cols = React.useMemo(() => {\n // if CustomRenderer is defined, shortcircuit\n if (CustomRenderer) return [];\n const dynamicCols = [];\n if (Icon) dynamicCols.push('auto');\n dynamicCols.push('1fr');\n return dynamicCols;\n }, [CustomRenderer, Icon]);\n\n if (CustomRenderer)\n return (\n <MidSection cols={customMidSectionCols} rows={customMidSectionRows} $softDeleted={Boolean(softDeleted)}>\n <CustomRenderer {...customComponentProps} />\n </MidSection>\n );\n\n // if we ever need to do something for truncation and showing a tooltip in the future,\n // check out what has been done in exported-related/ShuttleItem.tsx\n // also, be aware that we have the headless logic alread inside tooltipHelpers\n // when this comment has been written, the logic was working with keyboard and mouse as per tooltip-v3\n // integrated with all the shuttle-v2 custom focus navigation\n return (\n <MidSection cols={cols} alignItems=\"center\" ml=\"xxs\" $softDeleted={Boolean(softDeleted)}>\n {Icon ? (\n <IconWrapper alignItems=\"center\" mr=\"xxs\">\n <Icon {...customComponentProps} />\n </IconWrapper>\n ) : null}\n <TextSection {...itemMeta} />\n </MidSection>\n );\n },\n);\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACsEb,cAUJ,YAVI;AAtEV,OAAOA,YAAW;AAClB,SAAS,cAAc;AACvB,SAAS,YAAY;AAErB,SAAS,iBAAiB,wBAAwB;AAClD,SAAS,mBAAmB;AAC5B,SAAS,4BAA4B;AAErC,MAAM,cAAc,OAAO,MAAM,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,kBAAkB,CAAC;AAAA;AAAA;AAIpG,MAAM,aAAa,OAAO,MAAM;AAAA,EAC9B,MAAM;AAAA,EACN,MAAM,iBAAiB;AACzB,CAAC;AAAA;AAAA,IAEG,CAAC,UAAU;AACX,MAAI,MAAM;AACR,WAAO;AAAA,eACE,MAAM,MAAM,OAAO,QAAQ,GAAG;AAAA;AAAA,gBAE7B,MAAM,MAAM,OAAO,QAAQ,GAAG;AAAA;AAAA;AAG1C,SAAO;AACT;AAAA;AAEF,MAAM,uBAAuB,CAAC,KAAK;AACnC,MAAM,uBAAuB,CAAC,KAAK;AAE5B,MAAM,oBAAoBA,OAAM;AAAA,EACrC,CAAC,UAAqG;AACpG,UAAM,EAAE,gBAAgB,GAAG,SAAS,IAAI;AACxC,UAAM,EAAE,OAAO,kBAAkB,mBAAmB,oBAAoB,qBAAqB,IAAI;AACjG,UAAM,EAAE,MAAM,gBAAgB,GAAG,yBAAyB,IAAI;AAC9D,UAAM,EAAE,aAAa,WAAW,IAAI;AACpC,UAAM,oBAAoB,qBAAqB,QAAQ;AACvD,UAAM,uBAAuBA,OAAM;AAAA,MACjC,OAAO;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,QACA,eAAe,EAAE,oBAAoB,qBAAqB;AAAA,QAC1D;AAAA,QACA,kBAAkB,EAAE,GAAG,0BAA0B,IAAI,WAAW;AAAA,MAClE;AAAA,MACA;AAAA,QACE;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AACA,UAAM,OAAOA,OAAM,QAAQ,MAAM;AAE/B,UAAI;AAAgB,eAAO,CAAC;AAC5B,YAAM,cAAc,CAAC;AACrB,UAAI;AAAM,oBAAY,KAAK,MAAM;AACjC,kBAAY,KAAK,KAAK;AACtB,aAAO;AAAA,IACT,GAAG,CAAC,gBAAgB,IAAI,CAAC;AAEzB,QAAI;AACF,aACE,oBAAC,cAAW,MAAM,sBAAsB,MAAM,sBAAsB,cAAc,QAAQ,WAAW,GACnG,8BAAC,kBAAgB,GAAG,sBAAsB,GAC5C;AAQJ,WACE,qBAAC,cAAW,MAAY,YAAW,UAAS,IAAG,OAAM,cAAc,QAAQ,WAAW,GACnF;AAAA,aACC,oBAAC,eAAY,YAAW,UAAS,IAAG,OAClC,8BAAC,QAAM,GAAG,sBAAsB,GAClC,IACE;AAAA,MACJ,oBAAC,eAAa,GAAG,UAAU;AAAA,OAC7B;AAAA,EAEJ;AACF;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -3,10 +3,10 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import React2 from "react";
|
|
4
4
|
import { styled } from "@elliemae/ds-system";
|
|
5
5
|
import { Grid } from "@elliemae/ds-grid";
|
|
6
|
-
import { useInternalStore } from "../../config/useStore";
|
|
7
|
-
import { ItemMiddleSection } from "./ItemMiddleSection";
|
|
8
|
-
import { DragOverlay } from "../Dnd/DragOverlay";
|
|
9
|
-
import { DSShuttleV2Name } from "../../config/DSShuttleV2Definitions";
|
|
6
|
+
import { useInternalStore } from "../../config/useStore/index.js";
|
|
7
|
+
import { ItemMiddleSection } from "./ItemMiddleSection.js";
|
|
8
|
+
import { DragOverlay } from "../Dnd/DragOverlay.js";
|
|
9
|
+
import { DSShuttleV2Name } from "../../config/DSShuttleV2Definitions.js";
|
|
10
10
|
const ItemWrapper = styled(Grid, { name: DSShuttleV2Name, slot: "item-wrapper-overlay" })`
|
|
11
11
|
min-height: 2.769rem;
|
|
12
12
|
position: relative;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/Item/ItemOverlay.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types.js';\nimport { useInternalStore } from '../../config/useStore/index.js';\nimport { ItemMiddleSection } from './ItemMiddleSection.js';\nimport { DragOverlay } from '../Dnd/DragOverlay.js';\nimport { DSShuttleV2Name } from '../../config/DSShuttleV2Definitions.js';\n\n// we are using the class-name added via slot for the children `:hover` styling of icon colors\n\nconst ItemWrapper = styled(Grid, { name: DSShuttleV2Name, slot: 'item-wrapper-overlay' })`\n min-height: 2.769rem;\n position: relative;\n background-color: white;\n box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.5);\n padding-right: 5px;\n\n &:focus {\n outline: 2px solid brand-700;\n outline-offset: -2px;\n }\n border-bottom: 1px solid neutral-100;\n`;\n\nexport const ItemOverlay = React.memo((itemMeta: DSShuttleV2T.ItemMeta) => {\n const { datumInternalMeta } = itemMeta;\n const { isSelected, hydratedId } = datumInternalMeta;\n\n const getIsDragAndDropHappening = useInternalStore((state) => state.getIsDragAndDropHappening);\n const isDragAndDropHappening = getIsDragAndDropHappening();\n const dndDraggingItem = useInternalStore((state) => state.dndDraggingItem);\n\n return (\n <ItemWrapper cols={['auto', 'auto']} alignItems=\"center\" role=\"checkbox\" aria-checked={isSelected}>\n <DragOverlay\n id={`${hydratedId}-overlay`}\n isDndActive={isDragAndDropHappening}\n isDragging={dndDraggingItem?.hydratedId === hydratedId}\n />\n <ItemMiddleSection {...itemMeta} />\n </ItemWrapper>\n );\n});\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACkCnB,SACE,KADF;AAlCJ,OAAOA,YAAW;AAClB,SAAS,cAAc;AACvB,SAAS,YAAY;AAErB,SAAS,wBAAwB;AACjC,SAAS,yBAAyB;AAClC,SAAS,mBAAmB;AAC5B,SAAS,uBAAuB;AAIhC,MAAM,cAAc,OAAO,MAAM,EAAE,MAAM,iBAAiB,MAAM,uBAAuB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcjF,MAAM,cAAcA,OAAM,KAAK,CAAC,aAAoC;AACzE,QAAM,EAAE,kBAAkB,IAAI;AAC9B,QAAM,EAAE,YAAY,WAAW,IAAI;AAEnC,QAAM,4BAA4B,iBAAiB,CAAC,UAAU,MAAM,yBAAyB;AAC7F,QAAM,yBAAyB,0BAA0B;AACzD,QAAM,kBAAkB,iBAAiB,CAAC,UAAU,MAAM,eAAe;AAEzE,SACE,qBAAC,eAAY,MAAM,CAAC,QAAQ,MAAM,GAAG,YAAW,UAAS,MAAK,YAAW,gBAAc,YACrF;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,IAAI,GAAG;AAAA,QACP,aAAa;AAAA,QACb,YAAY,iBAAiB,eAAe;AAAA;AAAA,IAC9C;AAAA,IACA,oBAAC,qBAAmB,GAAG,UAAU;AAAA,KACnC;AAEJ,CAAC;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -3,7 +3,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import React2 from "react";
|
|
4
4
|
import { styled } from "@elliemae/ds-system";
|
|
5
5
|
import { Grid } from "@elliemae/ds-grid";
|
|
6
|
-
import { DSShuttleV2Name, DSShuttleV2Slots } from "../../config/DSShuttleV2Definitions";
|
|
6
|
+
import { DSShuttleV2Name, DSShuttleV2Slots } from "../../config/DSShuttleV2Definitions.js";
|
|
7
7
|
const StyledItemSelection = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_SELECTION })`
|
|
8
8
|
width: 5px;
|
|
9
9
|
height: 100%;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/Item/ItemSelection.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../config/DSShuttleV2Definitions';\n\n// border-right: ${(props) => {\n// if (props.$selectionPrevented === true) return `1px solid ${props.theme.colors.neutral['200']}`;\n// return '';\n// }};\n// border-bottom: ${(props) => {\n// if (props.$selectionPrevented === true) return `1px solid ${props.theme.colors.neutral['200']}`;\n// return '';\n// }};\n\nconst StyledItemSelection = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_SELECTION })<{\n $isSelected: boolean;\n $selectionPrevented?: boolean;\n}>`\n width: 5px;\n height: 100%;\n box-sizing: border-box;\n background-color: ${(props) => {\n if (props.$isSelected) return props.theme.colors.brand[600];\n if (props.$selectionPrevented === true) return props.theme.colors.neutral['080'];\n return props.theme.colors.brand[300];\n }};\n`;\n\nexport const ItemSelection = React.memo(\n ({ datumInternalMeta: { isSelected }, datumRenderFlags: { selectionPrevented } }: DSShuttleV2T.ItemMeta) => (\n <StyledItemSelection $isSelected={isSelected} $selectionPrevented={selectionPrevented} />\n ),\n);\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;AC+BnB;AA/BJ,OAAOA,YAAW;AAClB,SAAS,cAAc;AACvB,SAAS,YAAY;AAErB,SAAS,iBAAiB,wBAAwB;AAWlD,MAAM,sBAAsB,OAAO,MAAM,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,eAAe,CAAC;AAAA;AAAA;AAAA;AAAA,sBAOnF,CAAC,UAAU;AAC7B,MAAI,MAAM;AAAa,WAAO,MAAM,MAAM,OAAO,MAAM;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../config/DSShuttleV2Definitions.js';\n\n// border-right: ${(props) => {\n// if (props.$selectionPrevented === true) return `1px solid ${props.theme.colors.neutral['200']}`;\n// return '';\n// }};\n// border-bottom: ${(props) => {\n// if (props.$selectionPrevented === true) return `1px solid ${props.theme.colors.neutral['200']}`;\n// return '';\n// }};\n\nconst StyledItemSelection = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_SELECTION })<{\n $isSelected: boolean;\n $selectionPrevented?: boolean;\n}>`\n width: 5px;\n height: 100%;\n box-sizing: border-box;\n background-color: ${(props) => {\n if (props.$isSelected) return props.theme.colors.brand[600];\n if (props.$selectionPrevented === true) return props.theme.colors.neutral['080'];\n return props.theme.colors.brand[300];\n }};\n`;\n\nexport const ItemSelection = React.memo(\n ({ datumInternalMeta: { isSelected }, datumRenderFlags: { selectionPrevented } }: DSShuttleV2T.ItemMeta) => (\n <StyledItemSelection $isSelected={isSelected} $selectionPrevented={selectionPrevented} />\n ),\n);\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC+BnB;AA/BJ,OAAOA,YAAW;AAClB,SAAS,cAAc;AACvB,SAAS,YAAY;AAErB,SAAS,iBAAiB,wBAAwB;AAWlD,MAAM,sBAAsB,OAAO,MAAM,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,eAAe,CAAC;AAAA;AAAA;AAAA;AAAA,sBAOnF,CAAC,UAAU;AAC7B,MAAI,MAAM;AAAa,WAAO,MAAM,MAAM,OAAO,MAAM,GAAG;AAC1D,MAAI,MAAM,wBAAwB;AAAM,WAAO,MAAM,MAAM,OAAO,QAAQ,KAAK;AAC/E,SAAO,MAAM,MAAM,OAAO,MAAM,GAAG;AACrC;AAAA;AAGK,MAAM,gBAAgBA,OAAM;AAAA,EACjC,CAAC,EAAE,mBAAmB,EAAE,WAAW,GAAG,kBAAkB,EAAE,mBAAmB,EAAE,MAC7E,oBAAC,uBAAoB,aAAa,YAAY,qBAAqB,oBAAoB;AAE3F;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -4,7 +4,7 @@ import React2 from "react";
|
|
|
4
4
|
import { Grid } from "@elliemae/ds-grid";
|
|
5
5
|
import { styled } from "@elliemae/ds-system";
|
|
6
6
|
import { DSTypography } from "@elliemae/ds-typography";
|
|
7
|
-
import { DSShuttleV2Name, DSShuttleV2Slots } from "../../config/DSShuttleV2Definitions";
|
|
7
|
+
import { DSShuttleV2Name, DSShuttleV2Slots } from "../../config/DSShuttleV2Definitions.js";
|
|
8
8
|
const withSubtitleRows = ["auto", "auto"];
|
|
9
9
|
const LabelWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_LABEL_WRAPPER })`
|
|
10
10
|
min-height: 1rem;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/Item/TextSection.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { styled } from '@elliemae/ds-system';\nimport { DSTypography } from '@elliemae/ds-typography';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../config/DSShuttleV2Definitions';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types';\n\nconst withSubtitleRows = ['auto', 'auto'];\nconst LabelWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_LABEL_WRAPPER })`\n min-height: 1rem;\n`;\nexport const TextSection = React.memo((props: DSShuttleV2T.ItemMeta) => {\n const { label, subtitle } = props.datumHydratables;\n if (subtitle === undefined)\n return (\n <LabelWrapper alignItems=\"center\">\n <DSTypography variant=\"b1\">{label}</DSTypography>\n </LabelWrapper>\n );\n return (\n <Grid alignItems=\"center\" rows={withSubtitleRows} gutter=\"1px\">\n <DSTypography variant=\"b1\">{label}</DSTypography>\n <DSTypography variant=\"b4\">{subtitle}</DSTypography>\n </Grid>\n );\n});\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { styled } from '@elliemae/ds-system';\nimport { DSTypography } from '@elliemae/ds-typography';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../config/DSShuttleV2Definitions.js';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types.js';\n\nconst withSubtitleRows = ['auto', 'auto'];\nconst LabelWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_LABEL_WRAPPER })`\n min-height: 1rem;\n`;\nexport const TextSection = React.memo((props: DSShuttleV2T.ItemMeta) => {\n const { label, subtitle } = props.datumHydratables;\n if (subtitle === undefined)\n return (\n <LabelWrapper alignItems=\"center\">\n <DSTypography variant=\"b1\">{label}</DSTypography>\n </LabelWrapper>\n );\n return (\n <Grid alignItems=\"center\" rows={withSubtitleRows} gutter=\"1px\">\n <DSTypography variant=\"b1\">{label}</DSTypography>\n <DSTypography variant=\"b4\">{subtitle}</DSTypography>\n </Grid>\n );\n});\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACgBf,cAIJ,YAJI;AAhBR,OAAOA,YAAW;AAClB,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,SAAS,oBAAoB;AAC7B,SAAS,iBAAiB,wBAAwB;AAGlD,MAAM,mBAAmB,CAAC,QAAQ,MAAM;AACxC,MAAM,eAAe,OAAO,MAAM,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,mBAAmB,CAAC;AAAA;AAAA;AAG/F,MAAM,cAAcA,OAAM,KAAK,CAAC,UAAiC;AACtE,QAAM,EAAE,OAAO,SAAS,IAAI,MAAM;AAClC,MAAI,aAAa;AACf,WACE,oBAAC,gBAAa,YAAW,UACvB,8BAAC,gBAAa,SAAQ,MAAM,iBAAM,GACpC;AAEJ,SACE,qBAAC,QAAK,YAAW,UAAS,MAAM,kBAAkB,QAAO,OACvD;AAAA,wBAAC,gBAAa,SAAQ,MAAM,iBAAM;AAAA,IAClC,oBAAC,gBAAa,SAAQ,MAAM,oBAAS;AAAA,KACvC;AAEJ,CAAC;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import React2 from "react";
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
useFocusItemTracker,
|
|
5
|
+
useFocusActionTrackers,
|
|
6
|
+
useFocusRegionTrackers
|
|
7
|
+
} from "../../config/useFocusTracker/index.js";
|
|
8
|
+
import { useInternalStore } from "../../config/useStore/index.js";
|
|
5
9
|
const useItemArrowNavigation = (itemMeta) => {
|
|
6
10
|
const { trackFocusRegionPanelFocusMoveAll } = useFocusRegionTrackers();
|
|
7
11
|
const { trackFocusPrevItem, trackFocusNextItem, trackFocusItemReset } = useFocusItemTracker();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/Item/useItemArrowNavigation.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-statements */\n/* eslint-disable complexity */\nimport React from 'react';\nimport {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACEvB,OAAOA,YAAW;AAClB,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-statements */\n/* eslint-disable complexity */\nimport React from 'react';\nimport {\n useFocusItemTracker,\n useFocusActionTrackers,\n useFocusRegionTrackers,\n} from '../../config/useFocusTracker/index.js';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types.js';\nimport { useInternalStore } from '../../config/useStore/index.js';\n\nexport const useItemArrowNavigation = (itemMeta: DSShuttleV2T.ItemMeta) => {\n const { trackFocusRegionPanelFocusMoveAll } = useFocusRegionTrackers();\n const { trackFocusPrevItem, trackFocusNextItem, trackFocusItemReset } = useFocusItemTracker();\n const { trackFocusNextAction, trackFocusPrevAction, trackFocusActionParent, trackFocusActionReset } =\n useFocusActionTrackers();\n const { hasMultipleSelection, isDestinationPanel } = itemMeta;\n\n const getIsDragAndDropHappening = useInternalStore((state) => state.getIsDragAndDropHappening);\n\n const onItemContainerKeyDown = React.useCallback<React.KeyboardEventHandler<HTMLDivElement>>(\n (e) => {\n const { key } = e;\n const isDragAndDropHappening = getIsDragAndDropHappening();\n if (isDragAndDropHappening) {\n e.preventDefault();\n return;\n }\n // stopping prepagation it's required to avoid \"ArrowUp/ArrowDown\" to trigger parents logic\n // preventDefault it's just me thinking it's good idea when stopping propagation\n if (['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(key)) e.preventDefault();\n if (['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(key)) e.stopPropagation();\n if (key === 'ArrowLeft') {\n if (hasMultipleSelection) {\n trackFocusRegionPanelFocusMoveAll(isDestinationPanel);\n trackFocusItemReset();\n trackFocusActionReset();\n return;\n }\n\n trackFocusPrevAction(itemMeta);\n return;\n }\n if (key === 'ArrowRight') {\n if (hasMultipleSelection) {\n trackFocusRegionPanelFocusMoveAll(isDestinationPanel);\n trackFocusItemReset();\n trackFocusActionReset();\n return;\n }\n trackFocusNextAction(itemMeta);\n return;\n }\n if (key === 'ArrowUp') {\n trackFocusPrevItem(itemMeta);\n trackFocusActionParent();\n return;\n }\n if (key === 'ArrowDown') {\n trackFocusNextItem(itemMeta);\n trackFocusActionParent();\n return;\n }\n },\n [\n getIsDragAndDropHappening,\n hasMultipleSelection,\n trackFocusPrevAction,\n itemMeta,\n trackFocusRegionPanelFocusMoveAll,\n isDestinationPanel,\n trackFocusItemReset,\n trackFocusActionReset,\n trackFocusNextAction,\n trackFocusPrevItem,\n trackFocusActionParent,\n trackFocusNextItem,\n ],\n );\n\n return React.useMemo(() => ({ onItemContainerKeyDown }), [onItemContainerKeyDown]);\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACEvB,OAAOA,YAAW;AAClB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,wBAAwB;AAE1B,MAAM,yBAAyB,CAAC,aAAoC;AACzE,QAAM,EAAE,kCAAkC,IAAI,uBAAuB;AACrE,QAAM,EAAE,oBAAoB,oBAAoB,oBAAoB,IAAI,oBAAoB;AAC5F,QAAM,EAAE,sBAAsB,sBAAsB,wBAAwB,sBAAsB,IAChG,uBAAuB;AACzB,QAAM,EAAE,sBAAsB,mBAAmB,IAAI;AAErD,QAAM,4BAA4B,iBAAiB,CAAC,UAAU,MAAM,yBAAyB;AAE7F,QAAM,yBAAyBA,OAAM;AAAA,IACnC,CAAC,MAAM;AACL,YAAM,EAAE,IAAI,IAAI;AAChB,YAAM,yBAAyB,0BAA0B;AACzD,UAAI,wBAAwB;AAC1B,UAAE,eAAe;AACjB;AAAA,MACF;AAGA,UAAI,CAAC,WAAW,aAAa,aAAa,YAAY,EAAE,SAAS,GAAG;AAAG,UAAE,eAAe;AACxF,UAAI,CAAC,WAAW,aAAa,aAAa,YAAY,EAAE,SAAS,GAAG;AAAG,UAAE,gBAAgB;AACzF,UAAI,QAAQ,aAAa;AACvB,YAAI,sBAAsB;AACxB,4CAAkC,kBAAkB;AACpD,8BAAoB;AACpB,gCAAsB;AACtB;AAAA,QACF;AAEA,6BAAqB,QAAQ;AAC7B;AAAA,MACF;AACA,UAAI,QAAQ,cAAc;AACxB,YAAI,sBAAsB;AACxB,4CAAkC,kBAAkB;AACpD,8BAAoB;AACpB,gCAAsB;AACtB;AAAA,QACF;AACA,6BAAqB,QAAQ;AAC7B;AAAA,MACF;AACA,UAAI,QAAQ,WAAW;AACrB,2BAAmB,QAAQ;AAC3B,+BAAuB;AACvB;AAAA,MACF;AACA,UAAI,QAAQ,aAAa;AACvB,2BAAmB,QAAQ;AAC3B,+BAAuB;AACvB;AAAA,MACF;AAAA,IACF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,SAAOA,OAAM,QAAQ,OAAO,EAAE,uBAAuB,IAAI,CAAC,sBAAsB,CAAC;AACnF;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import React2 from "react";
|
|
3
|
-
import { useInternalStore } from "../../config/useStore";
|
|
4
|
-
import { useSelectionLogic } from "./useSelectionLogic";
|
|
3
|
+
import { useInternalStore } from "../../config/useStore/index.js";
|
|
4
|
+
import { useSelectionLogic } from "./useSelectionLogic.js";
|
|
5
5
|
const useItemKeyboardSelection = (itemMeta) => {
|
|
6
6
|
const { datumInternalMeta } = itemMeta;
|
|
7
7
|
const { hydratedId } = datumInternalMeta;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/Item/useItemKeyboardSelection.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types';\nimport { useInternalStore } from '../../config/useStore';\nimport { useSelectionLogic } from './useSelectionLogic';\n\nexport const useItemKeyboardSelection = (itemMeta: DSShuttleV2T.ItemMeta) => {\n const { datumInternalMeta } = itemMeta;\n const { hydratedId } = datumInternalMeta;\n const { selectItem } = useSelectionLogic(itemMeta);\n const getIsDragAndDropHappening = useInternalStore((state) => state.getIsDragAndDropHappening);\n const onItemKeyDownSelection = React.useCallback<React.KeyboardEventHandler<HTMLDivElement>>(\n (event) => {\n const { key } = event;\n\n // Spacebar AND ' ' are cross-browser compatibility thing\n if (['Spacebar', ' ', 'Enter'].includes(key)) {\n // we need to invoke \"getIsDragAndDropHappening\" here to ensure we have the latest info at the moment of the event\n const isDragNDroping = getIsDragAndDropHappening();\n if (isDragNDroping || (event.target as HTMLElement).id === `${hydratedId}-drag-handle`) {\n event.preventDefault();\n return;\n }\n event.preventDefault();\n event.stopPropagation();\n selectItem(event);\n }\n },\n [getIsDragAndDropHappening, hydratedId, selectItem],\n );\n return React.useMemo(() => ({ onItemKeyDownSelection }), [onItemKeyDownSelection]);\n};\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types.js';\nimport { useInternalStore } from '../../config/useStore/index.js';\nimport { useSelectionLogic } from './useSelectionLogic.js';\n\nexport const useItemKeyboardSelection = (itemMeta: DSShuttleV2T.ItemMeta) => {\n const { datumInternalMeta } = itemMeta;\n const { hydratedId } = datumInternalMeta;\n const { selectItem } = useSelectionLogic(itemMeta);\n const getIsDragAndDropHappening = useInternalStore((state) => state.getIsDragAndDropHappening);\n const onItemKeyDownSelection = React.useCallback<React.KeyboardEventHandler<HTMLDivElement>>(\n (event) => {\n const { key } = event;\n\n // Spacebar AND ' ' are cross-browser compatibility thing\n if (['Spacebar', ' ', 'Enter'].includes(key)) {\n // we need to invoke \"getIsDragAndDropHappening\" here to ensure we have the latest info at the moment of the event\n const isDragNDroping = getIsDragAndDropHappening();\n if (isDragNDroping || (event.target as HTMLElement).id === `${hydratedId}-drag-handle`) {\n event.preventDefault();\n return;\n }\n event.preventDefault();\n event.stopPropagation();\n selectItem(event);\n }\n },\n [getIsDragAndDropHappening, hydratedId, selectItem],\n );\n return React.useMemo(() => ({ onItemKeyDownSelection }), [onItemKeyDownSelection]);\n};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAElB,SAAS,wBAAwB;AACjC,SAAS,yBAAyB;AAE3B,MAAM,2BAA2B,CAAC,aAAoC;AAC3E,QAAM,EAAE,kBAAkB,IAAI;AAC9B,QAAM,EAAE,WAAW,IAAI;AACvB,QAAM,EAAE,WAAW,IAAI,kBAAkB,QAAQ;AACjD,QAAM,4BAA4B,iBAAiB,CAAC,UAAU,MAAM,yBAAyB;AAC7F,QAAM,yBAAyBA,OAAM;AAAA,IACnC,CAAC,UAAU;AACT,YAAM,EAAE,IAAI,IAAI;AAGhB,UAAI,CAAC,YAAY,KAAK,OAAO,EAAE,SAAS,GAAG,GAAG;AAE5C,cAAM,iBAAiB,0BAA0B;AACjD,YAAI,kBAAmB,MAAM,OAAuB,OAAO,GAAG,0BAA0B;AACtF,gBAAM,eAAe;AACrB;AAAA,QACF;AACA,cAAM,eAAe;AACrB,cAAM,gBAAgB;AACtB,mBAAW,KAAK;AAAA,MAClB;AAAA,IACF;AAAA,IACA,CAAC,2BAA2B,YAAY,UAAU;AAAA,EACpD;AACA,SAAOA,OAAM,QAAQ,OAAO,EAAE,uBAAuB,IAAI,CAAC,sBAAsB,CAAC;AACnF;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import React2 from "react";
|
|
3
|
-
import { useInternalStore, usePropsStore } from "../../config/useStore";
|
|
4
|
-
import { useFocusItemTracker, useFocusActionTrackers, useFocusTracker } from "../../config/useFocusTracker";
|
|
3
|
+
import { useInternalStore, usePropsStore } from "../../config/useStore/index.js";
|
|
4
|
+
import { useFocusItemTracker, useFocusActionTrackers, useFocusTracker } from "../../config/useFocusTracker/index.js";
|
|
5
5
|
const useSelectionLogic = ({
|
|
6
6
|
isDestinationPanel,
|
|
7
7
|
datumInternalMeta,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/Item/useSelectionLogic.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-statements */\nimport React from 'react';\nimport { useInternalStore, usePropsStore } from '../../config/useStore';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types';\nimport { useFocusItemTracker, useFocusActionTrackers, useFocusTracker } from '../../config/useFocusTracker';\nexport const useSelectionLogic = ({\n isDestinationPanel,\n datumInternalMeta,\n datum,\n datumRenderFlags,\n}: DSShuttleV2T.ItemMeta) => {\n const { trackFocusItem } = useFocusItemTracker();\n const { trackFocusActionParent } = useFocusActionTrackers();\n const { trackFocusRegionPanelItem } = useFocusTracker();\n\n const getPanelLastSelectedItem = useInternalStore((store) => store.getPanelLastSelectedItem);\n const setPanelLastSelectedItem = useInternalStore((store) =>\n isDestinationPanel ? store.setDestinationPanelLastSelectedItem : store.setSourcePanelLastSelectedItem,\n );\n\n const panelSelectionableDataIds = usePropsStore((store) =>\n isDestinationPanel ? store.destinationSelectionableDataIds : store.sourceSelectionableDataIds,\n );\n\n const onSelectionChange = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationSelectionChange : state.onSourceSelectionChange,\n );\n const panelSelectedItems = usePropsStore((state) =>\n isDestinationPanel ? state.destinationSelectedItems : state.sourceSelectedItems,\n );\n const selectItem = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement> | React.MouseEvent<HTMLDivElement | HTMLButtonElement>) => {\n const { selectionPrevented } = datumRenderFlags;\n const { hydratedId } = datumInternalMeta;\n const { shiftKey } = event;\n const lastSelectedItem = getPanelLastSelectedItem(isDestinationPanel);\n if (!selectionPrevented) {\n let newSelection: Record<string, boolean> = {};\n // shift select logic\n if (shiftKey && lastSelectedItem) {\n const startSelIndx = panelSelectionableDataIds.findIndex((id) => id === lastSelectedItem);\n const endSelIndx = panelSelectionableDataIds.findIndex((id) => id === hydratedId);\n if (startSelIndx !== -1 && endSelIndx !== -1) {\n const ordererIndexes = [startSelIndx, endSelIndx].sort();\n const shiftSelectedIdsArray = panelSelectionableDataIds.slice(ordererIndexes[0], ordererIndexes[1] + 1);\n let shouldShiftDeSelect = true;\n // I track both \"all Select\"/\"all unselect\" so I can \".forEach\" only once and apply either version after\n const allSelected: Record<string, boolean> = {};\n const allDeSelected: Record<string, boolean> = {};\n shiftSelectedIdsArray.forEach((id) => {\n allSelected[id] = true;\n allDeSelected[id] = false;\n // if anything inside the shift-select was not selected, shift-select will \"select\"\n if (panelSelectedItems[id] !== true) shouldShiftDeSelect = false;\n });\n if (shouldShiftDeSelect) newSelection = { ...panelSelectedItems, ...allDeSelected };\n else newSelection = { ...panelSelectedItems, ...allSelected };\n }\n } else {\n // single selection logic\n newSelection = { ...panelSelectedItems };\n const isAddition = newSelection[hydratedId] !== true;\n if (isAddition) {\n newSelection[hydratedId] = true;\n } else delete newSelection[hydratedId];\n }\n // we track the item for \"shift select\" purposes\n // this must happen AFTER shift select logic!\n setPanelLastSelectedItem(hydratedId);\n onSelectionChange(newSelection, { event, item: datum });\n }\n // focus tracking logic\n trackFocusRegionPanelItem(isDestinationPanel);\n trackFocusItem({ original: datum, ...datumInternalMeta });\n trackFocusActionParent();\n },\n [\n datum,\n datumInternalMeta,\n datumRenderFlags,\n getPanelLastSelectedItem,\n isDestinationPanel,\n onSelectionChange,\n panelSelectedItems,\n panelSelectionableDataIds,\n setPanelLastSelectedItem,\n trackFocusActionParent,\n trackFocusItem,\n trackFocusRegionPanelItem,\n ],\n );\n\n const onShiftMouseDownPreventTextSelection = React.useCallback((event: React.MouseEvent<HTMLDivElement>) => {\n const { shiftKey } = event;\n if (shiftKey) event.preventDefault();\n }, []);\n return React.useMemo(\n () => ({ selectItem, onShiftMouseDownPreventTextSelection }),\n [selectItem, onShiftMouseDownPreventTextSelection],\n );\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACCvB,OAAOA,YAAW;AAClB,SAAS,kBAAkB,qBAAqB;AAEhD,SAAS,qBAAqB,wBAAwB,uBAAuB;AACtE,MAAM,oBAAoB,CAAC;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAA6B;AAC3B,QAAM,EAAE,eAAe,IAAI,oBAAoB;AAC/C,QAAM,EAAE,uBAAuB,IAAI,uBAAuB;AAC1D,QAAM,EAAE,0BAA0B,IAAI,gBAAgB;AAEtD,QAAM,2BAA2B,iBAAiB,CAAC,UAAU,MAAM,wBAAwB;AAC3F,QAAM,2BAA2B;AAAA,IAAiB,CAAC,UACjD,qBAAqB,MAAM,sCAAsC,MAAM;AAAA,EACzE;AAEA,QAAM,4BAA4B;AAAA,IAAc,CAAC,UAC/C,qBAAqB,MAAM,kCAAkC,MAAM;AAAA,EACrE;AAEA,QAAM,oBAAoB;AAAA,IAAc,CAAC,UACvC,qBAAqB,MAAM,+BAA+B,MAAM;AAAA,EAClE;AACA,QAAM,qBAAqB;AAAA,IAAc,CAAC,UACxC,qBAAqB,MAAM,2BAA2B,MAAM;AAAA,EAC9D;AACA,QAAM,aAAaA,OAAM;AAAA,IACvB,CAAC,UAAsG;AACrG,YAAM,EAAE,mBAAmB,IAAI;AAC/B,YAAM,EAAE,WAAW,IAAI;AACvB,YAAM,EAAE,SAAS,IAAI;AACrB,YAAM,mBAAmB,yBAAyB,kBAAkB;AACpE,UAAI,CAAC,oBAAoB;AACvB,YAAI,eAAwC,CAAC;AAE7C,YAAI,YAAY,kBAAkB;AAChC,gBAAM,eAAe,0BAA0B,UAAU,CAAC,OAAO,OAAO,gBAAgB;AACxF,gBAAM,aAAa,0BAA0B,UAAU,CAAC,OAAO,OAAO,UAAU;AAChF,cAAI,iBAAiB,MAAM,eAAe,IAAI;AAC5C,kBAAM,iBAAiB,CAAC,cAAc,UAAU,EAAE,KAAK;AACvD,kBAAM,wBAAwB,0BAA0B,MAAM,eAAe,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-statements */\nimport React from 'react';\nimport { useInternalStore, usePropsStore } from '../../config/useStore/index.js';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types.js';\nimport { useFocusItemTracker, useFocusActionTrackers, useFocusTracker } from '../../config/useFocusTracker/index.js';\nexport const useSelectionLogic = ({\n isDestinationPanel,\n datumInternalMeta,\n datum,\n datumRenderFlags,\n}: DSShuttleV2T.ItemMeta) => {\n const { trackFocusItem } = useFocusItemTracker();\n const { trackFocusActionParent } = useFocusActionTrackers();\n const { trackFocusRegionPanelItem } = useFocusTracker();\n\n const getPanelLastSelectedItem = useInternalStore((store) => store.getPanelLastSelectedItem);\n const setPanelLastSelectedItem = useInternalStore((store) =>\n isDestinationPanel ? store.setDestinationPanelLastSelectedItem : store.setSourcePanelLastSelectedItem,\n );\n\n const panelSelectionableDataIds = usePropsStore((store) =>\n isDestinationPanel ? store.destinationSelectionableDataIds : store.sourceSelectionableDataIds,\n );\n\n const onSelectionChange = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationSelectionChange : state.onSourceSelectionChange,\n );\n const panelSelectedItems = usePropsStore((state) =>\n isDestinationPanel ? state.destinationSelectedItems : state.sourceSelectedItems,\n );\n const selectItem = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement> | React.MouseEvent<HTMLDivElement | HTMLButtonElement>) => {\n const { selectionPrevented } = datumRenderFlags;\n const { hydratedId } = datumInternalMeta;\n const { shiftKey } = event;\n const lastSelectedItem = getPanelLastSelectedItem(isDestinationPanel);\n if (!selectionPrevented) {\n let newSelection: Record<string, boolean> = {};\n // shift select logic\n if (shiftKey && lastSelectedItem) {\n const startSelIndx = panelSelectionableDataIds.findIndex((id) => id === lastSelectedItem);\n const endSelIndx = panelSelectionableDataIds.findIndex((id) => id === hydratedId);\n if (startSelIndx !== -1 && endSelIndx !== -1) {\n const ordererIndexes = [startSelIndx, endSelIndx].sort();\n const shiftSelectedIdsArray = panelSelectionableDataIds.slice(ordererIndexes[0], ordererIndexes[1] + 1);\n let shouldShiftDeSelect = true;\n // I track both \"all Select\"/\"all unselect\" so I can \".forEach\" only once and apply either version after\n const allSelected: Record<string, boolean> = {};\n const allDeSelected: Record<string, boolean> = {};\n shiftSelectedIdsArray.forEach((id) => {\n allSelected[id] = true;\n allDeSelected[id] = false;\n // if anything inside the shift-select was not selected, shift-select will \"select\"\n if (panelSelectedItems[id] !== true) shouldShiftDeSelect = false;\n });\n if (shouldShiftDeSelect) newSelection = { ...panelSelectedItems, ...allDeSelected };\n else newSelection = { ...panelSelectedItems, ...allSelected };\n }\n } else {\n // single selection logic\n newSelection = { ...panelSelectedItems };\n const isAddition = newSelection[hydratedId] !== true;\n if (isAddition) {\n newSelection[hydratedId] = true;\n } else delete newSelection[hydratedId];\n }\n // we track the item for \"shift select\" purposes\n // this must happen AFTER shift select logic!\n setPanelLastSelectedItem(hydratedId);\n onSelectionChange(newSelection, { event, item: datum });\n }\n // focus tracking logic\n trackFocusRegionPanelItem(isDestinationPanel);\n trackFocusItem({ original: datum, ...datumInternalMeta });\n trackFocusActionParent();\n },\n [\n datum,\n datumInternalMeta,\n datumRenderFlags,\n getPanelLastSelectedItem,\n isDestinationPanel,\n onSelectionChange,\n panelSelectedItems,\n panelSelectionableDataIds,\n setPanelLastSelectedItem,\n trackFocusActionParent,\n trackFocusItem,\n trackFocusRegionPanelItem,\n ],\n );\n\n const onShiftMouseDownPreventTextSelection = React.useCallback((event: React.MouseEvent<HTMLDivElement>) => {\n const { shiftKey } = event;\n if (shiftKey) event.preventDefault();\n }, []);\n return React.useMemo(\n () => ({ selectItem, onShiftMouseDownPreventTextSelection }),\n [selectItem, onShiftMouseDownPreventTextSelection],\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACCvB,OAAOA,YAAW;AAClB,SAAS,kBAAkB,qBAAqB;AAEhD,SAAS,qBAAqB,wBAAwB,uBAAuB;AACtE,MAAM,oBAAoB,CAAC;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAA6B;AAC3B,QAAM,EAAE,eAAe,IAAI,oBAAoB;AAC/C,QAAM,EAAE,uBAAuB,IAAI,uBAAuB;AAC1D,QAAM,EAAE,0BAA0B,IAAI,gBAAgB;AAEtD,QAAM,2BAA2B,iBAAiB,CAAC,UAAU,MAAM,wBAAwB;AAC3F,QAAM,2BAA2B;AAAA,IAAiB,CAAC,UACjD,qBAAqB,MAAM,sCAAsC,MAAM;AAAA,EACzE;AAEA,QAAM,4BAA4B;AAAA,IAAc,CAAC,UAC/C,qBAAqB,MAAM,kCAAkC,MAAM;AAAA,EACrE;AAEA,QAAM,oBAAoB;AAAA,IAAc,CAAC,UACvC,qBAAqB,MAAM,+BAA+B,MAAM;AAAA,EAClE;AACA,QAAM,qBAAqB;AAAA,IAAc,CAAC,UACxC,qBAAqB,MAAM,2BAA2B,MAAM;AAAA,EAC9D;AACA,QAAM,aAAaA,OAAM;AAAA,IACvB,CAAC,UAAsG;AACrG,YAAM,EAAE,mBAAmB,IAAI;AAC/B,YAAM,EAAE,WAAW,IAAI;AACvB,YAAM,EAAE,SAAS,IAAI;AACrB,YAAM,mBAAmB,yBAAyB,kBAAkB;AACpE,UAAI,CAAC,oBAAoB;AACvB,YAAI,eAAwC,CAAC;AAE7C,YAAI,YAAY,kBAAkB;AAChC,gBAAM,eAAe,0BAA0B,UAAU,CAAC,OAAO,OAAO,gBAAgB;AACxF,gBAAM,aAAa,0BAA0B,UAAU,CAAC,OAAO,OAAO,UAAU;AAChF,cAAI,iBAAiB,MAAM,eAAe,IAAI;AAC5C,kBAAM,iBAAiB,CAAC,cAAc,UAAU,EAAE,KAAK;AACvD,kBAAM,wBAAwB,0BAA0B,MAAM,eAAe,CAAC,GAAG,eAAe,CAAC,IAAI,CAAC;AACtG,gBAAI,sBAAsB;AAE1B,kBAAM,cAAuC,CAAC;AAC9C,kBAAM,gBAAyC,CAAC;AAChD,kCAAsB,QAAQ,CAAC,OAAO;AACpC,0BAAY,EAAE,IAAI;AAClB,4BAAc,EAAE,IAAI;AAEpB,kBAAI,mBAAmB,EAAE,MAAM;AAAM,sCAAsB;AAAA,YAC7D,CAAC;AACD,gBAAI;AAAqB,6BAAe,EAAE,GAAG,oBAAoB,GAAG,cAAc;AAAA;AAC7E,6BAAe,EAAE,GAAG,oBAAoB,GAAG,YAAY;AAAA,UAC9D;AAAA,QACF,OAAO;AAEL,yBAAe,EAAE,GAAG,mBAAmB;AACvC,gBAAM,aAAa,aAAa,UAAU,MAAM;AAChD,cAAI,YAAY;AACd,yBAAa,UAAU,IAAI;AAAA,UAC7B;AAAO,mBAAO,aAAa,UAAU;AAAA,QACvC;AAGA,iCAAyB,UAAU;AACnC,0BAAkB,cAAc,EAAE,OAAO,MAAM,MAAM,CAAC;AAAA,MACxD;AAEA,gCAA0B,kBAAkB;AAC5C,qBAAe,EAAE,UAAU,OAAO,GAAG,kBAAkB,CAAC;AACxD,6BAAuB;AAAA,IACzB;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,QAAM,uCAAuCA,OAAM,YAAY,CAAC,UAA4C;AAC1G,UAAM,EAAE,SAAS,IAAI;AACrB,QAAI;AAAU,YAAM,eAAe;AAAA,EACrC,GAAG,CAAC,CAAC;AACL,SAAOA,OAAM;AAAA,IACX,OAAO,EAAE,YAAY,qCAAqC;AAAA,IAC1D,CAAC,YAAY,oCAAoC;AAAA,EACnD;AACF;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useInternalStore } from "../../config/useStore/index.js";
|
|
3
|
+
import { REGIONS_FOCUSES } from "../../constants/index.js";
|
|
4
|
+
const useThisItemIsFocused = (itemMeta) => {
|
|
5
|
+
const { datumInternalMeta, isDestinationPanel } = itemMeta;
|
|
6
|
+
const { hydratedId } = datumInternalMeta;
|
|
7
|
+
const currRegion = isDestinationPanel ? REGIONS_FOCUSES.DESTINATION_PANEL_ITEM : REGIONS_FOCUSES.SOURCE_PANEL_ITEM;
|
|
8
|
+
const currItemId = hydratedId;
|
|
9
|
+
const thisItemIsFocused = useInternalStore(
|
|
10
|
+
(state) => currRegion === state.focusRegion && currItemId === state.focusItem && "parent" === state.focusItemAction
|
|
11
|
+
);
|
|
12
|
+
return thisItemIsFocused;
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
useThisItemIsFocused
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=useThisItemIsFocused.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/Item/useThisItemIsFocused.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { type DSShuttleV2T } from '../../react-desc-prop-types.js';\nimport { useInternalStore } from '../../config/useStore/index.js';\nimport { REGIONS_FOCUSES } from '../../constants/index.js';\n\n// Define a generic type for the useThisItemIsFocused hook to ensure type safety\ntype UseThisItemIsFocused = (itemMeta: DSShuttleV2T.ItemMeta) => boolean;\n\nexport const useThisItemIsFocused: UseThisItemIsFocused = (itemMeta) => {\n const { datumInternalMeta, isDestinationPanel } = itemMeta;\n const { hydratedId } = datumInternalMeta;\n\n const currRegion = isDestinationPanel ? REGIONS_FOCUSES.DESTINATION_PANEL_ITEM : REGIONS_FOCUSES.SOURCE_PANEL_ITEM;\n const currItemId = hydratedId;\n const thisItemIsFocused = useInternalStore(\n (state) => currRegion === state.focusRegion && currItemId === state.focusItem && 'parent' === state.focusItemAction,\n );\n\n return thisItemIsFocused;\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,wBAAwB;AACjC,SAAS,uBAAuB;AAKzB,MAAM,uBAA6C,CAAC,aAAa;AACtE,QAAM,EAAE,mBAAmB,mBAAmB,IAAI;AAClD,QAAM,EAAE,WAAW,IAAI;AAEvB,QAAM,aAAa,qBAAqB,gBAAgB,yBAAyB,gBAAgB;AACjG,QAAM,aAAa;AACnB,QAAM,oBAAoB;AAAA,IACxB,CAAC,UAAU,eAAe,MAAM,eAAe,eAAe,MAAM,aAAa,aAAa,MAAM;AAAA,EACtG;AAEA,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -4,10 +4,10 @@ import React2 from "react";
|
|
|
4
4
|
import { styled } from "@elliemae/ds-system";
|
|
5
5
|
import { Grid } from "@elliemae/ds-grid";
|
|
6
6
|
import { useOnBlurOut } from "@elliemae/ds-utilities";
|
|
7
|
-
import { PanelWrapper } from "./PanelWrapper";
|
|
8
|
-
import { usePropsStore } from "../config/useStore";
|
|
9
|
-
import { DSShuttleV2Name, DSShuttleV2Slots } from "../config/DSShuttleV2Definitions";
|
|
10
|
-
import { useFocusTracker } from "../config/useFocusTracker";
|
|
7
|
+
import { PanelWrapper } from "./PanelWrapper.js";
|
|
8
|
+
import { usePropsStore } from "../config/useStore/index.js";
|
|
9
|
+
import { DSShuttleV2Name, DSShuttleV2Slots } from "../config/DSShuttleV2Definitions.js";
|
|
10
|
+
import { useFocusTracker } from "../config/useFocusTracker/index.js";
|
|
11
11
|
const StyledWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.WRAPPER })`
|
|
12
12
|
min-width: 648px;
|
|
13
13
|
min-height: 296px;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/MainContent.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { useOnBlurOut } from '@elliemae/ds-utilities';\nimport { PanelWrapper } from './PanelWrapper';\nimport { usePropsStore } from '../config/useStore';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../config/DSShuttleV2Definitions';\nimport { useFocusTracker } from '../config/useFocusTracker';\n\nconst StyledWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.WRAPPER })`\n min-width: 648px;\n min-height: 296px;\n`;\nconst mainContentCols = ['1fr', '1fr'];\n\nexport const MainContent = React.memo(() => {\n const { trackFocusRegionReset, trackFocusItemReset, trackFocusActionReset } = useFocusTracker();\n const config = React.useMemo(\n () => ({\n onBlur: () => {\n trackFocusRegionReset();\n trackFocusItemReset();\n trackFocusActionReset();\n },\n }),\n [trackFocusActionReset, trackFocusItemReset, trackFocusRegionReset],\n );\n const handleOnBlurOut = useOnBlurOut(config);\n const destinationHasMultipleSelectedItems = usePropsStore((store) => store.destinationHasMultipleSelectedItems);\n const sourceHasMultipleSelectedItems = usePropsStore((store) => store.sourceHasMultipleSelectedItems);\n\n return (\n <StyledWrapper cols={mainContentCols} gutter=\"xs\" p=\"xs\" onBlur={handleOnBlurOut}>\n <PanelWrapper isDestinationPanel={false} hasMultipleSelection={sourceHasMultipleSelectedItems} />\n <PanelWrapper isDestinationPanel hasMultipleSelection={destinationHasMultipleSelectedItems} />\n </StyledWrapper>\n );\n});\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { useOnBlurOut } from '@elliemae/ds-utilities';\nimport { PanelWrapper } from './PanelWrapper.js';\nimport { usePropsStore } from '../config/useStore/index.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../config/DSShuttleV2Definitions.js';\nimport { useFocusTracker } from '../config/useFocusTracker/index.js';\n\nconst StyledWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.WRAPPER })`\n min-width: 648px;\n min-height: 296px;\n`;\nconst mainContentCols = ['1fr', '1fr'];\n\nexport const MainContent = React.memo(() => {\n const { trackFocusRegionReset, trackFocusItemReset, trackFocusActionReset } = useFocusTracker();\n const config = React.useMemo(\n () => ({\n onBlur: () => {\n trackFocusRegionReset();\n trackFocusItemReset();\n trackFocusActionReset();\n },\n }),\n [trackFocusActionReset, trackFocusItemReset, trackFocusRegionReset],\n );\n const handleOnBlurOut = useOnBlurOut(config);\n const destinationHasMultipleSelectedItems = usePropsStore((store) => store.destinationHasMultipleSelectedItems);\n const sourceHasMultipleSelectedItems = usePropsStore((store) => store.sourceHasMultipleSelectedItems);\n\n return (\n <StyledWrapper cols={mainContentCols} gutter=\"xs\" p=\"xs\" onBlur={handleOnBlurOut}>\n <PanelWrapper isDestinationPanel={false} hasMultipleSelection={sourceHasMultipleSelectedItems} />\n <PanelWrapper isDestinationPanel hasMultipleSelection={destinationHasMultipleSelectedItems} />\n </StyledWrapper>\n );\n});\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACgCnB,SACE,KADF;AAhCJ,OAAOA,YAAW;AAClB,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,oBAAoB;AAC7B,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAC9B,SAAS,iBAAiB,wBAAwB;AAClD,SAAS,uBAAuB;AAEhC,MAAM,gBAAgB,OAAO,MAAM,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,QAAQ,CAAC;AAAA;AAAA;AAAA;AAI5F,MAAM,kBAAkB,CAAC,OAAO,KAAK;AAE9B,MAAM,cAAcA,OAAM,KAAK,MAAM;AAC1C,QAAM,EAAE,uBAAuB,qBAAqB,sBAAsB,IAAI,gBAAgB;AAC9F,QAAM,SAASA,OAAM;AAAA,IACnB,OAAO;AAAA,MACL,QAAQ,MAAM;AACZ,8BAAsB;AACtB,4BAAoB;AACpB,8BAAsB;AAAA,MACxB;AAAA,IACF;AAAA,IACA,CAAC,uBAAuB,qBAAqB,qBAAqB;AAAA,EACpE;AACA,QAAM,kBAAkB,aAAa,MAAM;AAC3C,QAAM,sCAAsC,cAAc,CAAC,UAAU,MAAM,mCAAmC;AAC9G,QAAM,iCAAiC,cAAc,CAAC,UAAU,MAAM,8BAA8B;AAEpG,SACE,qBAAC,iBAAc,MAAM,iBAAiB,QAAO,MAAK,GAAE,MAAK,QAAQ,iBAC/D;AAAA,wBAAC,gBAAa,oBAAoB,OAAO,sBAAsB,gCAAgC;AAAA,IAC/F,oBAAC,gBAAa,oBAAkB,MAAC,sBAAsB,qCAAqC;AAAA,KAC9F;AAEJ,CAAC;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -3,10 +3,10 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import React2 from "react";
|
|
4
4
|
import { styled } from "@elliemae/ds-system";
|
|
5
5
|
import { DSButtonV2, BUTTON_SIZES } from "@elliemae/ds-button-v2";
|
|
6
|
-
import { usePropsStore } from "../../../config/useStore";
|
|
7
|
-
import { useInnerRefHandlers } from "./useInnerRefHandlers";
|
|
8
|
-
import { useFocusTracker } from "../../../config/useFocusTracker";
|
|
9
|
-
import { DSShuttleV2Name, DSShuttleV2Slots } from "../../../config/DSShuttleV2Definitions";
|
|
6
|
+
import { usePropsStore } from "../../../config/useStore/index.js";
|
|
7
|
+
import { useInnerRefHandlers } from "./useInnerRefHandlers.js";
|
|
8
|
+
import { useFocusTracker } from "../../../config/useFocusTracker/index.js";
|
|
9
|
+
import { DSShuttleV2Name, DSShuttleV2Slots } from "../../../config/DSShuttleV2Definitions.js";
|
|
10
10
|
const StyledLoadMoreBtn = styled(DSButtonV2, {
|
|
11
11
|
name: DSShuttleV2Name,
|
|
12
12
|
slot: DSShuttleV2Slots.LIST_BOTTOM_LOAD_MORE_BTN
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/Panel/bottom/LoadMoreBtn.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { DSButtonV2, BUTTON_SIZES, type DSButtonT } from '@elliemae/ds-button-v2';\nimport { usePropsStore } from '../../../config/useStore';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types';\nimport { useInnerRefHandlers } from './useInnerRefHandlers';\nimport { useFocusTracker } from '../../../config/useFocusTracker';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../config/DSShuttleV2Definitions';\n\nconst StyledLoadMoreBtn = styled(DSButtonV2, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.LIST_BOTTOM_LOAD_MORE_BTN,\n})`\n width: 100%;\n height: 100%;\n`;\n\nexport const LoadMoreBtn = (panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => {\n const { isDestinationPanel = false } = panelMetaInfo;\n const { trackFocusItemLast, trackFocusActionParent, trackFocusRegionPanelItem } = useFocusTracker();\n const onLoadMore = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationLoadMore : state.onSourceLoadMore,\n );\n const handleOnClick = React.useCallback(\n (e: Parameters<Required<DSButtonT.Props>['onClick']>[0]) => {\n onLoadMore(e);\n trackFocusItemLast(panelMetaInfo);\n trackFocusRegionPanelItem(panelMetaInfo.isDestinationPanel);\n trackFocusActionParent();\n },\n [onLoadMore, panelMetaInfo, trackFocusActionParent, trackFocusItemLast, trackFocusRegionPanelItem],\n );\n const { innerRefHandlerLoadMoreBtn } = useInnerRefHandlers(panelMetaInfo);\n return (\n <StyledLoadMoreBtn\n buttonType=\"text\"\n onClick={handleOnClick}\n size={BUTTON_SIZES.S}\n innerRef={innerRefHandlerLoadMoreBtn}\n >\n Load More...\n </StyledLoadMoreBtn>\n );\n};\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { DSButtonV2, BUTTON_SIZES, type DSButtonT } from '@elliemae/ds-button-v2';\nimport { usePropsStore } from '../../../config/useStore/index.js';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types.js';\nimport { useInnerRefHandlers } from './useInnerRefHandlers.js';\nimport { useFocusTracker } from '../../../config/useFocusTracker/index.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../config/DSShuttleV2Definitions.js';\n\nconst StyledLoadMoreBtn = styled(DSButtonV2, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.LIST_BOTTOM_LOAD_MORE_BTN,\n})`\n width: 100%;\n height: 100%;\n`;\n\nexport const LoadMoreBtn = (panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => {\n const { isDestinationPanel = false } = panelMetaInfo;\n const { trackFocusItemLast, trackFocusActionParent, trackFocusRegionPanelItem } = useFocusTracker();\n const onLoadMore = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationLoadMore : state.onSourceLoadMore,\n );\n const handleOnClick = React.useCallback(\n (e: Parameters<Required<DSButtonT.Props>['onClick']>[0]) => {\n onLoadMore(e);\n trackFocusItemLast(panelMetaInfo);\n trackFocusRegionPanelItem(panelMetaInfo.isDestinationPanel);\n trackFocusActionParent();\n },\n [onLoadMore, panelMetaInfo, trackFocusActionParent, trackFocusItemLast, trackFocusRegionPanelItem],\n );\n const { innerRefHandlerLoadMoreBtn } = useInnerRefHandlers(panelMetaInfo);\n return (\n <StyledLoadMoreBtn\n buttonType=\"text\"\n onClick={handleOnClick}\n size={BUTTON_SIZES.S}\n innerRef={innerRefHandlerLoadMoreBtn}\n >\n Load More...\n </StyledLoadMoreBtn>\n );\n};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACkCnB;AAlCJ,OAAOA,YAAW;AAClB,SAAS,cAAc;AACvB,SAAS,YAAY,oBAAoC;AACzD,SAAS,qBAAqB;AAE9B,SAAS,2BAA2B;AACpC,SAAS,uBAAuB;AAChC,SAAS,iBAAiB,wBAAwB;AAElD,MAAM,oBAAoB,OAAO,YAAY;AAAA,EAC3C,MAAM;AAAA,EACN,MAAM,iBAAiB;AACzB,CAAC;AAAA;AAAA;AAAA;AAKM,MAAM,cAAc,CAAC,kBAA8C;AACxE,QAAM,EAAE,qBAAqB,MAAM,IAAI;AACvC,QAAM,EAAE,oBAAoB,wBAAwB,0BAA0B,IAAI,gBAAgB;AAClG,QAAM,aAAa;AAAA,IAAc,CAAC,UAChC,qBAAqB,MAAM,wBAAwB,MAAM;AAAA,EAC3D;AACA,QAAM,gBAAgBA,OAAM;AAAA,IAC1B,CAAC,MAA2D;AAC1D,iBAAW,CAAC;AACZ,yBAAmB,aAAa;AAChC,gCAA0B,cAAc,kBAAkB;AAC1D,6BAAuB;AAAA,IACzB;AAAA,IACA,CAAC,YAAY,eAAe,wBAAwB,oBAAoB,yBAAyB;AAAA,EACnG;AACA,QAAM,EAAE,2BAA2B,IAAI,oBAAoB,aAAa;AACxE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,YAAW;AAAA,MACX,SAAS;AAAA,MACT,MAAM,aAAa;AAAA,MACnB,UAAU;AAAA,MACX;AAAA;AAAA,EAED;AAEJ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -3,7 +3,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { styled } from "@elliemae/ds-system";
|
|
4
4
|
import { Grid } from "@elliemae/ds-grid";
|
|
5
5
|
import { DSIndeterminateProgressIndicator } from "@elliemae/ds-indeterminate-progress-indicator";
|
|
6
|
-
import { DSShuttleV2Name, DSShuttleV2Slots } from "../../../config/DSShuttleV2Definitions";
|
|
6
|
+
import { DSShuttleV2Name, DSShuttleV2Slots } from "../../../config/DSShuttleV2Definitions.js";
|
|
7
7
|
const StyledBottomLoadingMore = styled(Grid, {
|
|
8
8
|
name: DSShuttleV2Name,
|
|
9
9
|
slot: DSShuttleV2Slots.LIST_BOTTOM_LOADING_MORE
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/Panel/bottom/LoadingMore.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-unused-vars */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSIndeterminateProgressIndicator } from '@elliemae/ds-indeterminate-progress-indicator';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../config/DSShuttleV2Definitions';\n\nconst StyledBottomLoadingMore = styled(Grid, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.LIST_BOTTOM_LOADING_MORE,\n})``;\nexport const LoadingMore = (panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => (\n <StyledBottomLoadingMore px=\"1.846rem\">\n <DSIndeterminateProgressIndicator processing title=\"Loading\" />\n </StyledBottomLoadingMore>\n);\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-unused-vars */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSIndeterminateProgressIndicator } from '@elliemae/ds-indeterminate-progress-indicator';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../config/DSShuttleV2Definitions.js';\n\nconst StyledBottomLoadingMore = styled(Grid, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.LIST_BOTTOM_LOADING_MORE,\n})``;\nexport const LoadingMore = (panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => (\n <StyledBottomLoadingMore px=\"1.846rem\">\n <DSIndeterminateProgressIndicator processing title=\"Loading\" />\n </StyledBottomLoadingMore>\n);\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACcnB;AAZJ,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,wCAAwC;AAEjD,SAAS,iBAAiB,wBAAwB;AAElD,MAAM,0BAA0B,OAAO,MAAM;AAAA,EAC3C,MAAM;AAAA,EACN,MAAM,iBAAiB;AACzB,CAAC;AACM,MAAM,cAAc,CAAC,kBAC1B,oBAAC,2BAAwB,IAAG,YAC1B,8BAAC,oCAAiC,YAAU,MAAC,OAAM,WAAU,GAC/D;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -3,12 +3,12 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import React2 from "react";
|
|
4
4
|
import { styled } from "@elliemae/ds-system";
|
|
5
5
|
import { Grid } from "@elliemae/ds-grid";
|
|
6
|
-
import { useFocusTracker } from "../../../config/useFocusTracker";
|
|
7
|
-
import { usePropsStore } from "../../../config/useStore";
|
|
8
|
-
import { LoadMoreBtn } from "./LoadMoreBtn";
|
|
9
|
-
import { LoadingMore } from "./LoadingMore";
|
|
10
|
-
import { useLoadMoreBtnArrowNavigation } from "./useLoadMoreBtnArrowNavigation";
|
|
11
|
-
import { DSShuttleV2Name, DSShuttleV2Slots } from "../../../config/DSShuttleV2Definitions";
|
|
6
|
+
import { useFocusTracker } from "../../../config/useFocusTracker/index.js";
|
|
7
|
+
import { usePropsStore } from "../../../config/useStore/index.js";
|
|
8
|
+
import { LoadMoreBtn } from "./LoadMoreBtn.js";
|
|
9
|
+
import { LoadingMore } from "./LoadingMore.js";
|
|
10
|
+
import { useLoadMoreBtnArrowNavigation } from "./useLoadMoreBtnArrowNavigation.js";
|
|
11
|
+
import { DSShuttleV2Name, DSShuttleV2Slots } from "../../../config/DSShuttleV2Definitions.js";
|
|
12
12
|
const StyledListWrapperBottom = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.LIST_WRAPPER_BOTTOM })`
|
|
13
13
|
min-height: 2.769rem;
|
|
14
14
|
border-top: 1px solid neutral-400;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/Panel/bottom/PanelContentBottomSection.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-unused-vars */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { useFocusTracker } from '../../../config/useFocusTracker';\nimport { usePropsStore } from '../../../config/useStore';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types';\nimport { LoadMoreBtn } from './LoadMoreBtn';\nimport { LoadingMore } from './LoadingMore';\nimport { useLoadMoreBtnArrowNavigation } from './useLoadMoreBtnArrowNavigation';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../config/DSShuttleV2Definitions';\n\nconst StyledListWrapperBottom = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.LIST_WRAPPER_BOTTOM })`\n min-height: 2.769rem;\n border-top: 1px solid neutral-400;\n`;\nconst wrapperColsRows = ['1fr'];\n\nexport const PanelContentBottomSection = React.memo((panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => {\n const { isDestinationPanel = false } = panelMetaInfo;\n\n const withLoadMore = usePropsStore((state) =>\n isDestinationPanel ? state.destinationWithLoadMore : state.sourceWithLoadMore,\n );\n const isLoadingMore = usePropsStore((state) =>\n isDestinationPanel ? state.destinationIsLoadingMore : state.sourceIsLoadingMore,\n );\n const { trackFocusRegionBottom, trackFocusLoadMoreBtn, trackFocusLoadMoreBtnDestination, trackFocusActionReset } =\n useFocusTracker();\n const onBottomSectionFocus = React.useCallback(() => {\n trackFocusRegionBottom(isDestinationPanel);\n if (isDestinationPanel) trackFocusLoadMoreBtnDestination();\n else trackFocusLoadMoreBtn();\n trackFocusActionReset();\n }, [\n isDestinationPanel,\n trackFocusActionReset,\n trackFocusLoadMoreBtn,\n trackFocusLoadMoreBtnDestination,\n trackFocusRegionBottom,\n ]);\n\n // this 3 booleans MUST be auto-exclusives with each other\n const shouldDisplayLoadingMore = isLoadingMore;\n const shouldDisplayLoadMoreBtn = withLoadMore && !isLoadingMore;\n const shouldNotTakeSpace = !withLoadMore && !isLoadingMore;\n const { onLoadMoreButtonKeyDown } = useLoadMoreBtnArrowNavigation(panelMetaInfo);\n\n if (shouldNotTakeSpace) return <div />;\n return (\n <StyledListWrapperBottom\n cols={wrapperColsRows}\n rows={wrapperColsRows}\n onFocus={onBottomSectionFocus}\n onKeyDown={onLoadMoreButtonKeyDown}\n >\n {shouldDisplayLoadingMore ? <LoadingMore {...panelMetaInfo} /> : null}\n {shouldDisplayLoadMoreBtn ? <LoadMoreBtn {...panelMetaInfo} /> : null}\n </StyledListWrapperBottom>\n );\n});\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-unused-vars */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { useFocusTracker } from '../../../config/useFocusTracker/index.js';\nimport { usePropsStore } from '../../../config/useStore/index.js';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types.js';\nimport { LoadMoreBtn } from './LoadMoreBtn.js';\nimport { LoadingMore } from './LoadingMore.js';\nimport { useLoadMoreBtnArrowNavigation } from './useLoadMoreBtnArrowNavigation.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../config/DSShuttleV2Definitions.js';\n\nconst StyledListWrapperBottom = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.LIST_WRAPPER_BOTTOM })`\n min-height: 2.769rem;\n border-top: 1px solid neutral-400;\n`;\nconst wrapperColsRows = ['1fr'];\n\nexport const PanelContentBottomSection = React.memo((panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => {\n const { isDestinationPanel = false } = panelMetaInfo;\n\n const withLoadMore = usePropsStore((state) =>\n isDestinationPanel ? state.destinationWithLoadMore : state.sourceWithLoadMore,\n );\n const isLoadingMore = usePropsStore((state) =>\n isDestinationPanel ? state.destinationIsLoadingMore : state.sourceIsLoadingMore,\n );\n const { trackFocusRegionBottom, trackFocusLoadMoreBtn, trackFocusLoadMoreBtnDestination, trackFocusActionReset } =\n useFocusTracker();\n const onBottomSectionFocus = React.useCallback(() => {\n trackFocusRegionBottom(isDestinationPanel);\n if (isDestinationPanel) trackFocusLoadMoreBtnDestination();\n else trackFocusLoadMoreBtn();\n trackFocusActionReset();\n }, [\n isDestinationPanel,\n trackFocusActionReset,\n trackFocusLoadMoreBtn,\n trackFocusLoadMoreBtnDestination,\n trackFocusRegionBottom,\n ]);\n\n // this 3 booleans MUST be auto-exclusives with each other\n const shouldDisplayLoadingMore = isLoadingMore;\n const shouldDisplayLoadMoreBtn = withLoadMore && !isLoadingMore;\n const shouldNotTakeSpace = !withLoadMore && !isLoadingMore;\n const { onLoadMoreButtonKeyDown } = useLoadMoreBtnArrowNavigation(panelMetaInfo);\n\n if (shouldNotTakeSpace) return <div />;\n return (\n <StyledListWrapperBottom\n cols={wrapperColsRows}\n rows={wrapperColsRows}\n onFocus={onBottomSectionFocus}\n onKeyDown={onLoadMoreButtonKeyDown}\n >\n {shouldDisplayLoadingMore ? <LoadingMore {...panelMetaInfo} /> : null}\n {shouldDisplayLoadMoreBtn ? <LoadMoreBtn {...panelMetaInfo} /> : null}\n </StyledListWrapperBottom>\n );\n});\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACiDU,cAE7B,YAF6B;AA/CjC,OAAOA,YAAW;AAClB,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,uBAAuB;AAChC,SAAS,qBAAqB;AAE9B,SAAS,mBAAmB;AAC5B,SAAS,mBAAmB;AAC5B,SAAS,qCAAqC;AAC9C,SAAS,iBAAiB,wBAAwB;AAElD,MAAM,0BAA0B,OAAO,MAAM,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,oBAAoB,CAAC;AAAA;AAAA;AAAA;AAIlH,MAAM,kBAAkB,CAAC,KAAK;AAEvB,MAAM,4BAA4BA,OAAM,KAAK,CAAC,kBAA8C;AACjG,QAAM,EAAE,qBAAqB,MAAM,IAAI;AAEvC,QAAM,eAAe;AAAA,IAAc,CAAC,UAClC,qBAAqB,MAAM,0BAA0B,MAAM;AAAA,EAC7D;AACA,QAAM,gBAAgB;AAAA,IAAc,CAAC,UACnC,qBAAqB,MAAM,2BAA2B,MAAM;AAAA,EAC9D;AACA,QAAM,EAAE,wBAAwB,uBAAuB,kCAAkC,sBAAsB,IAC7G,gBAAgB;AAClB,QAAM,uBAAuBA,OAAM,YAAY,MAAM;AACnD,2BAAuB,kBAAkB;AACzC,QAAI;AAAoB,uCAAiC;AAAA;AACpD,4BAAsB;AAC3B,0BAAsB;AAAA,EACxB,GAAG;AAAA,IACD;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAGD,QAAM,2BAA2B;AACjC,QAAM,2BAA2B,gBAAgB,CAAC;AAClD,QAAM,qBAAqB,CAAC,gBAAgB,CAAC;AAC7C,QAAM,EAAE,wBAAwB,IAAI,8BAA8B,aAAa;AAE/E,MAAI;AAAoB,WAAO,oBAAC,SAAI;AACpC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW;AAAA,MAEV;AAAA,mCAA2B,oBAAC,eAAa,GAAG,eAAe,IAAK;AAAA,QAChE,2BAA2B,oBAAC,eAAa,GAAG,eAAe,IAAK;AAAA;AAAA;AAAA,EACnE;AAEJ,CAAC;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import React2 from "react";
|
|
3
|
-
import { useInternalStore } from "../../../config/useStore";
|
|
4
|
-
import { ITEMS_FOCUSES } from "../../../constants";
|
|
3
|
+
import { useInternalStore } from "../../../config/useStore/index.js";
|
|
4
|
+
import { ITEMS_FOCUSES } from "../../../constants/index.js";
|
|
5
5
|
const useInnerRefHandlers = ({ isDestinationPanel }) => {
|
|
6
6
|
const setZustandRef = useInternalStore((state) => state.setZustandRef);
|
|
7
7
|
const innerRefHandlerLoadMoreBtn = React2.useCallback(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/Panel/bottom/useInnerRefHandlers.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable no-unused-vars */\nimport React from 'react';\nimport { useInternalStore } from '../../../config/useStore';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types';\nimport { ITEMS_FOCUSES } from '../../../constants';\n\nexport const useInnerRefHandlers = ({ isDestinationPanel }: DSShuttleV2T.PanelMetaInfo) => {\n const setZustandRef = useInternalStore((state) => state.setZustandRef);\n\n const innerRefHandlerLoadMoreBtn = React.useCallback(\n (node: HTMLButtonElement) => {\n setZustandRef(\n [isDestinationPanel ? ITEMS_FOCUSES.LOAD_MORE_BTN_DESTINATION : ITEMS_FOCUSES.LOAD_MORE_BTN_SOURCE],\n node,\n );\n },\n [isDestinationPanel, setZustandRef],\n );\n return React.useMemo(() => ({ innerRefHandlerLoadMoreBtn }), [innerRefHandlerLoadMoreBtn]);\n};\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable no-unused-vars */\nimport React from 'react';\nimport { useInternalStore } from '../../../config/useStore/index.js';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types.js';\nimport { ITEMS_FOCUSES } from '../../../constants/index.js';\n\nexport const useInnerRefHandlers = ({ isDestinationPanel }: DSShuttleV2T.PanelMetaInfo) => {\n const setZustandRef = useInternalStore((state) => state.setZustandRef);\n\n const innerRefHandlerLoadMoreBtn = React.useCallback(\n (node: HTMLButtonElement) => {\n setZustandRef(\n [isDestinationPanel ? ITEMS_FOCUSES.LOAD_MORE_BTN_DESTINATION : ITEMS_FOCUSES.LOAD_MORE_BTN_SOURCE],\n node,\n );\n },\n [isDestinationPanel, setZustandRef],\n );\n return React.useMemo(() => ({ innerRefHandlerLoadMoreBtn }), [innerRefHandlerLoadMoreBtn]);\n};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACEvB,OAAOA,YAAW;AAClB,SAAS,wBAAwB;AAEjC,SAAS,qBAAqB;AAEvB,MAAM,sBAAsB,CAAC,EAAE,mBAAmB,MAAkC;AACzF,QAAM,gBAAgB,iBAAiB,CAAC,UAAU,MAAM,aAAa;AAErE,QAAM,6BAA6BA,OAAM;AAAA,IACvC,CAAC,SAA4B;AAC3B;AAAA,QACE,CAAC,qBAAqB,cAAc,4BAA4B,cAAc,oBAAoB;AAAA,QAClG;AAAA,MACF;AAAA,IACF;AAAA,IACA,CAAC,oBAAoB,aAAa;AAAA,EACpC;AACA,SAAOA,OAAM,QAAQ,OAAO,EAAE,2BAA2B,IAAI,CAAC,0BAA0B,CAAC;AAC3F;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import React2 from "react";
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
useFocusItemTracker,
|
|
5
|
+
useFocusActionTrackers,
|
|
6
|
+
useFocusRegionTrackers
|
|
7
|
+
} from "../../../config/useFocusTracker/index.js";
|
|
8
|
+
import { useInternalStore } from "../../../config/useStore/index.js";
|
|
5
9
|
const useLoadMoreBtnArrowNavigation = (panelMetaInfo) => {
|
|
6
10
|
const { trackFocusPrevItem, trackFocusNextItem } = useFocusItemTracker();
|
|
7
11
|
const { trackFocusActionParent } = useFocusActionTrackers();
|