@elliemae/ds-shuttle-v2 3.14.0-next.1 → 3.14.0-next.11
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.map +2 -2
- package/dist/cjs/config/DSShuttleV2Definitions.js.map +1 -1
- package/dist/cjs/config/itemMovementHelpers.js +99 -74
- package/dist/cjs/config/itemMovementHelpers.js.map +2 -2
- package/dist/cjs/config/useAutoCalculated/useDataStructure.js +55 -34
- package/dist/cjs/config/useAutoCalculated/useDataStructure.js.map +2 -2
- package/dist/cjs/config/useAutoCalculated/useShuttleVirtualized.js.map +2 -2
- package/dist/cjs/config/useFocusTracker/useFocusActionTrackers.js +6 -6
- package/dist/cjs/config/useFocusTracker/useFocusActionTrackers.js.map +2 -2
- package/dist/cjs/config/useFocusTracker/useFocusItemTracker.js +15 -10
- package/dist/cjs/config/useFocusTracker/useFocusItemTracker.js.map +2 -2
- package/dist/cjs/config/useFocusTracker/useFocusRegionTrackers.js +2 -2
- package/dist/cjs/config/useFocusTracker/useFocusRegionTrackers.js.map +2 -2
- package/dist/cjs/config/useShuttleV2.js +2 -0
- package/dist/cjs/config/useShuttleV2.js.map +2 -2
- package/dist/cjs/config/useStore/createAtomInStore.bak +18 -0
- package/dist/cjs/config/useStore/useStore.js +14 -1
- package/dist/cjs/config/useStore/useStore.js.map +2 -2
- package/dist/cjs/config/{useStore/createAtomInStore.js → useValidateProps.js} +9 -13
- package/dist/cjs/config/useValidateProps.js.map +7 -0
- package/dist/cjs/constants/index.js +5 -2
- package/dist/cjs/constants/index.js.map +2 -2
- package/dist/cjs/parts/Dnd/DndHandle.js +17 -10
- package/dist/cjs/parts/Dnd/DndHandle.js.map +2 -2
- package/dist/cjs/parts/Dnd/DragOverlay.js +47 -0
- package/dist/cjs/parts/Dnd/DragOverlay.js.map +7 -0
- package/dist/cjs/parts/Header.js +5 -5
- package/dist/cjs/parts/Header.js.map +2 -2
- package/dist/cjs/parts/HoC/withConditionalDnDRowContext.js +42 -17
- package/dist/cjs/parts/HoC/withConditionalDnDRowContext.js.map +3 -3
- package/dist/cjs/parts/HoC/withConditionalUseSortable.js +4 -3
- package/dist/cjs/parts/HoC/withConditionalUseSortable.js.map +2 -2
- package/dist/cjs/parts/Item/Item.js +42 -33
- package/dist/cjs/parts/Item/Item.js.map +2 -2
- package/dist/cjs/parts/Item/ItemActions/ItemActions.js +16 -14
- package/dist/cjs/parts/Item/ItemActions/ItemActions.js.map +2 -2
- package/dist/cjs/parts/Item/ItemActions/useActionsHandlers.js +8 -3
- package/dist/cjs/parts/Item/ItemActions/useActionsHandlers.js.map +2 -2
- package/dist/cjs/parts/Item/ItemActions/useActionsLogicHandlers.js +27 -39
- package/dist/cjs/parts/Item/ItemActions/useActionsLogicHandlers.js.map +2 -2
- package/dist/cjs/parts/Item/ItemActions/useInnerRefHandlers.js +2 -2
- package/dist/cjs/parts/Item/ItemActions/useInnerRefHandlers.js.map +2 -2
- package/dist/cjs/parts/Item/ItemMiddleSection.js +21 -22
- package/dist/cjs/parts/Item/ItemMiddleSection.js.map +2 -2
- package/dist/cjs/parts/Item/ItemOverlay.js +15 -7
- package/dist/cjs/parts/Item/ItemOverlay.js.map +2 -2
- package/dist/cjs/parts/Item/ItemSelection.js +3 -1
- package/dist/cjs/parts/Item/ItemSelection.js.map +2 -2
- package/dist/cjs/parts/Item/TextSection.js +50 -0
- package/dist/cjs/parts/Item/TextSection.js.map +7 -0
- package/dist/cjs/parts/Item/useItemArrowNavigation.js +46 -20
- package/dist/cjs/parts/Item/useItemArrowNavigation.js.map +2 -2
- package/dist/cjs/parts/Item/useItemKeyboardSelection.js +57 -0
- package/dist/cjs/parts/Item/useItemKeyboardSelection.js.map +7 -0
- package/dist/cjs/parts/Item/useSelectionLogic.js +64 -21
- package/dist/cjs/parts/Item/useSelectionLogic.js.map +2 -2
- package/dist/cjs/parts/MainContent.js +5 -2
- package/dist/cjs/parts/MainContent.js.map +2 -2
- package/dist/cjs/parts/Panel/bottom/LoadMoreBtn.js +3 -3
- package/dist/cjs/parts/Panel/bottom/LoadMoreBtn.js.map +2 -2
- package/dist/cjs/parts/Panel/bottom/LoadingMore.js +1 -1
- package/dist/cjs/parts/Panel/bottom/LoadingMore.js.map +2 -2
- package/dist/cjs/parts/Panel/bottom/PanelContentBottomSection.js +13 -4
- package/dist/cjs/parts/Panel/bottom/PanelContentBottomSection.js.map +2 -2
- package/dist/cjs/parts/Panel/bottom/useInnerRefHandlers.js +4 -1
- package/dist/cjs/parts/Panel/bottom/useInnerRefHandlers.js.map +2 -2
- package/dist/cjs/parts/Panel/bottom/useLoadMoreBtnArrowNavigation.js +4 -3
- package/dist/cjs/parts/Panel/bottom/useLoadMoreBtnArrowNavigation.js.map +2 -2
- package/dist/cjs/parts/Panel/middle/{ItemListWrapper.js → ItemListWrapper/Index.js} +25 -19
- package/dist/cjs/parts/Panel/middle/ItemListWrapper/Index.js.map +7 -0
- package/dist/cjs/parts/Panel/middle/ItemListWrapper/getDatumFlags.js +44 -0
- package/dist/cjs/parts/Panel/middle/ItemListWrapper/getDatumFlags.js.map +7 -0
- package/dist/cjs/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.js +57 -0
- package/dist/cjs/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.js.map +7 -0
- package/dist/cjs/parts/Panel/middle/MultipleSelectionAction.js +30 -7
- package/dist/cjs/parts/Panel/middle/MultipleSelectionAction.js.map +2 -2
- package/dist/cjs/parts/Panel/middle/PanelContentMiddleSection.js +20 -25
- package/dist/cjs/parts/Panel/middle/PanelContentMiddleSection.js.map +2 -2
- package/dist/cjs/parts/Panel/top/SelectionHeader.js +1 -1
- package/dist/cjs/parts/Panel/top/SelectionHeader.js.map +2 -2
- package/dist/cjs/parts/PanelWrapper.js +8 -11
- package/dist/cjs/parts/PanelWrapper.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +31 -14
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/esm/DSShuttleV2.js.map +2 -2
- package/dist/esm/config/DSShuttleV2Definitions.js.map +1 -1
- package/dist/esm/config/itemMovementHelpers.js +99 -74
- package/dist/esm/config/itemMovementHelpers.js.map +2 -2
- package/dist/esm/config/useAutoCalculated/useDataStructure.js +55 -34
- 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/useFocusActionTrackers.js +6 -6
- package/dist/esm/config/useFocusTracker/useFocusActionTrackers.js.map +2 -2
- package/dist/esm/config/useFocusTracker/useFocusItemTracker.js +15 -10
- 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 +2 -2
- package/dist/esm/config/useShuttleV2.js +3 -1
- package/dist/esm/config/useShuttleV2.js.map +2 -2
- package/dist/esm/config/useStore/createAtomInStore.bak +18 -0
- package/dist/esm/config/useStore/useStore.js +14 -1
- package/dist/esm/config/useStore/useStore.js.map +2 -2
- package/dist/esm/config/useValidateProps.js +10 -0
- package/dist/esm/config/useValidateProps.js.map +7 -0
- package/dist/esm/constants/index.js +5 -2
- package/dist/esm/constants/index.js.map +2 -2
- package/dist/esm/parts/Dnd/DndHandle.js +17 -10
- package/dist/esm/parts/Dnd/DndHandle.js.map +2 -2
- package/dist/esm/parts/Dnd/DragOverlay.js +21 -0
- package/dist/esm/parts/Dnd/DragOverlay.js.map +7 -0
- package/dist/esm/parts/Header.js +4 -4
- package/dist/esm/parts/Header.js.map +2 -2
- package/dist/esm/parts/HoC/withConditionalDnDRowContext.js +43 -18
- package/dist/esm/parts/HoC/withConditionalDnDRowContext.js.map +3 -3
- package/dist/esm/parts/HoC/withConditionalUseSortable.js +4 -3
- package/dist/esm/parts/HoC/withConditionalUseSortable.js.map +2 -2
- package/dist/esm/parts/Item/Item.js +42 -33
- package/dist/esm/parts/Item/Item.js.map +2 -2
- package/dist/esm/parts/Item/ItemActions/ItemActions.js +13 -11
- package/dist/esm/parts/Item/ItemActions/ItemActions.js.map +2 -2
- package/dist/esm/parts/Item/ItemActions/useActionsHandlers.js +8 -3
- package/dist/esm/parts/Item/ItemActions/useActionsHandlers.js.map +2 -2
- package/dist/esm/parts/Item/ItemActions/useActionsLogicHandlers.js +28 -40
- package/dist/esm/parts/Item/ItemActions/useActionsLogicHandlers.js.map +2 -2
- package/dist/esm/parts/Item/ItemActions/useInnerRefHandlers.js +2 -2
- package/dist/esm/parts/Item/ItemActions/useInnerRefHandlers.js.map +2 -2
- package/dist/esm/parts/Item/ItemMiddleSection.js +20 -21
- package/dist/esm/parts/Item/ItemMiddleSection.js.map +2 -2
- package/dist/esm/parts/Item/ItemOverlay.js +15 -7
- package/dist/esm/parts/Item/ItemOverlay.js.map +2 -2
- package/dist/esm/parts/Item/ItemSelection.js +3 -1
- package/dist/esm/parts/Item/ItemSelection.js.map +2 -2
- package/dist/esm/parts/Item/TextSection.js +24 -0
- package/dist/esm/parts/Item/TextSection.js.map +7 -0
- package/dist/esm/parts/Item/useItemArrowNavigation.js +47 -21
- package/dist/esm/parts/Item/useItemArrowNavigation.js.map +2 -2
- 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 +64 -21
- package/dist/esm/parts/Item/useSelectionLogic.js.map +2 -2
- package/dist/esm/parts/MainContent.js +5 -2
- package/dist/esm/parts/MainContent.js.map +2 -2
- package/dist/esm/parts/Panel/bottom/LoadMoreBtn.js +1 -1
- 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 +2 -2
- package/dist/esm/parts/Panel/bottom/PanelContentBottomSection.js +13 -4
- package/dist/esm/parts/Panel/bottom/PanelContentBottomSection.js.map +2 -2
- package/dist/esm/parts/Panel/bottom/useInnerRefHandlers.js +4 -1
- package/dist/esm/parts/Panel/bottom/useInnerRefHandlers.js.map +2 -2
- package/dist/esm/parts/Panel/bottom/useLoadMoreBtnArrowNavigation.js +4 -3
- package/dist/esm/parts/Panel/bottom/useLoadMoreBtnArrowNavigation.js.map +2 -2
- package/dist/esm/parts/Panel/middle/{ItemListWrapper.js → ItemListWrapper/Index.js} +22 -16
- 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 +31 -0
- package/dist/esm/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.js.map +7 -0
- package/dist/esm/parts/Panel/middle/MultipleSelectionAction.js +29 -6
- package/dist/esm/parts/Panel/middle/MultipleSelectionAction.js.map +2 -2
- package/dist/esm/parts/Panel/middle/PanelContentMiddleSection.js +19 -24
- package/dist/esm/parts/Panel/middle/PanelContentMiddleSection.js.map +2 -2
- package/dist/esm/parts/Panel/top/SelectionHeader.js +1 -1
- package/dist/esm/parts/Panel/top/SelectionHeader.js.map +2 -2
- package/dist/esm/parts/PanelWrapper.js +8 -11
- package/dist/esm/parts/PanelWrapper.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js +32 -15
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/package.json +13 -11
- package/dist/cjs/config/useStore/createAtomInStore.js.map +0 -7
- package/dist/cjs/parts/Panel/middle/ItemListWrapper.js.map +0 -7
- package/dist/esm/config/useStore/createAtomInStore.js +0 -14
- package/dist/esm/config/useStore/createAtomInStore.js.map +0 -7
- package/dist/esm/parts/Panel/middle/ItemListWrapper.js.map +0 -7
|
@@ -3,9 +3,11 @@ 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 { DSButtonV2 } from "@elliemae/ds-button";
|
|
6
|
+
import { DSButtonV2 } from "@elliemae/ds-button-v2";
|
|
7
7
|
import { ArrowShortRight, CloseMedium } from "@elliemae/ds-icons";
|
|
8
|
+
import { REGIONS_FOCUSES } from "../../../constants";
|
|
8
9
|
import { useHandleMoveSelection } from "../../../config/itemMovementHelpers";
|
|
10
|
+
import { useInternalStore } from "../../../config/useStore";
|
|
9
11
|
import { useFocusTracker } from "../../../config/useFocusTracker";
|
|
10
12
|
import { DSShuttleV2Name, DSShuttleV2Slots } from "../../../config/DSShuttleV2Definitions";
|
|
11
13
|
const StyledMoveMultipleWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.MOVE_MULTIPLE_WRAPPER })`
|
|
@@ -15,7 +17,7 @@ const StyledMoveMultipleWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DS
|
|
|
15
17
|
right: 0px;
|
|
16
18
|
transform: translateX(0);
|
|
17
19
|
height: 100%;
|
|
18
|
-
width:
|
|
20
|
+
width: 5rem;
|
|
19
21
|
:hover {
|
|
20
22
|
background-color: brand-200;
|
|
21
23
|
> svg {
|
|
@@ -53,7 +55,7 @@ const gridFullFraction = ["1fr"];
|
|
|
53
55
|
const MultipleSelectionAction = React2.memo((panelMeta) => {
|
|
54
56
|
const { isDestinationPanel } = panelMeta;
|
|
55
57
|
const { moveSelection } = useHandleMoveSelection(panelMeta);
|
|
56
|
-
const { trackFocusRegionPanel,
|
|
58
|
+
const { trackFocusRegionPanel, trackFocusRegionPanelFocusMoveAll, trackFocusItemReset, trackFocusActionReset } = useFocusTracker();
|
|
57
59
|
const handleMoveAllAction = React2.useCallback(
|
|
58
60
|
(event) => {
|
|
59
61
|
moveSelection(event);
|
|
@@ -66,8 +68,20 @@ const MultipleSelectionAction = React2.memo((panelMeta) => {
|
|
|
66
68
|
const handleMoveAllBtnFocus = React2.useCallback(() => {
|
|
67
69
|
trackFocusItemReset();
|
|
68
70
|
trackFocusActionReset();
|
|
69
|
-
|
|
70
|
-
}, [isDestinationPanel, trackFocusActionReset, trackFocusItemReset,
|
|
71
|
+
trackFocusRegionPanelFocusMoveAll(isDestinationPanel);
|
|
72
|
+
}, [isDestinationPanel, trackFocusActionReset, trackFocusItemReset, trackFocusRegionPanelFocusMoveAll]);
|
|
73
|
+
const focusRegion = useInternalStore((state) => state.focusRegion);
|
|
74
|
+
const focusItem = useInternalStore((state) => state.focusItem);
|
|
75
|
+
const focusItemAction = useInternalStore((state) => state.focusItemAction);
|
|
76
|
+
const currRegion = isDestinationPanel ? REGIONS_FOCUSES.DESTINATION_PANEL_ITEM_MOVE_ALL : REGIONS_FOCUSES.SOURCE_PANEL_ITEM_MOVE_ALL;
|
|
77
|
+
const shouldFocusMoveAll = focusItem === "" && focusItemAction === "" && focusRegion === currRegion;
|
|
78
|
+
const innerRefHandlerMoveAll = React2.useCallback(
|
|
79
|
+
(node) => {
|
|
80
|
+
if (shouldFocusMoveAll)
|
|
81
|
+
node?.focus();
|
|
82
|
+
},
|
|
83
|
+
[shouldFocusMoveAll]
|
|
84
|
+
);
|
|
71
85
|
return /* @__PURE__ */ jsx(
|
|
72
86
|
StyledMoveMultipleWrapper,
|
|
73
87
|
{
|
|
@@ -76,7 +90,16 @@ const MultipleSelectionAction = React2.memo((panelMeta) => {
|
|
|
76
90
|
justifyContent: "center",
|
|
77
91
|
cols: gridFullFraction,
|
|
78
92
|
rows: gridFullFraction,
|
|
79
|
-
children: /* @__PURE__ */ jsx(
|
|
93
|
+
children: /* @__PURE__ */ jsx(
|
|
94
|
+
StyledButton,
|
|
95
|
+
{
|
|
96
|
+
buttonType: "icon",
|
|
97
|
+
onClick: handleMoveAllAction,
|
|
98
|
+
onFocus: handleMoveAllBtnFocus,
|
|
99
|
+
innerRef: innerRefHandlerMoveAll,
|
|
100
|
+
children: isDestinationPanel ? /* @__PURE__ */ jsx(StyledCloseMediumIcon, { width: "1.538rem", height: "1.538rem" }) : /* @__PURE__ */ jsx(StyledArrowShortRightIcon, { width: "1.538", height: "1.538rem" })
|
|
101
|
+
}
|
|
102
|
+
)
|
|
80
103
|
}
|
|
81
104
|
);
|
|
82
105
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/Panel/middle/MultipleSelectionAction.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 { DSButtonV2, type DSButtonT } from '@elliemae/ds-button';\nimport { ArrowShortRight, CloseMedium } from '@elliemae/ds-icons';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types';\nimport { useHandleMoveSelection } from '../../../config/itemMovementHelpers';\nimport { useFocusTracker } from '../../../config/useFocusTracker';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../config/DSShuttleV2Definitions';\n\nconst StyledMoveMultipleWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.MOVE_MULTIPLE_WRAPPER })`\n position: absolute;\n background-color: neutral-000;\n top: 0px;\n right: 0px;\n transform: translateX(0);\n height: 100%;\n width:
|
|
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 { DSButtonV2, type DSButtonT } from '@elliemae/ds-button-v2';\nimport { ArrowShortRight, CloseMedium } from '@elliemae/ds-icons';\nimport { REGIONS_FOCUSES } from '../../../constants';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types';\nimport { useHandleMoveSelection } from '../../../config/itemMovementHelpers';\nimport { useInternalStore } from '../../../config/useStore';\nimport { useFocusTracker } from '../../../config/useFocusTracker';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../config/DSShuttleV2Definitions';\n\nconst StyledMoveMultipleWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.MOVE_MULTIPLE_WRAPPER })`\n position: absolute;\n background-color: neutral-000;\n top: 0px;\n right: 0px;\n transform: translateX(0);\n height: 100%;\n width: 5rem;\n :hover {\n background-color: brand-200;\n > svg {\n fill: brand-700;\n }\n }\n > svg {\n fill: brand-600;\n }\n`;\nconst StyledButton = styled(DSButtonV2, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.MOVE_MULTIPLE_BTN,\n})`\n width: 100%;\n height: 100%;\n`;\nconst StyledCloseMediumIcon = styled(CloseMedium, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.ITEM_ACTION_BTN_TO_SOURCE_ICON,\n})`\n > svg {\n fill: brand-600;\n }\n`;\nconst StyledArrowShortRightIcon = styled(ArrowShortRight, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.ITEM_ACTION_BTN_TO_DESTINATION_ICON,\n})`\n > svg {\n fill: brand-600;\n }\n`;\nconst gridFullFraction = ['1fr'];\n\nexport const MultipleSelectionAction = React.memo((panelMeta: DSShuttleV2T.PanelMetaInfo) => {\n const { isDestinationPanel } = panelMeta;\n const { moveSelection } = useHandleMoveSelection(panelMeta);\n const { trackFocusRegionPanel, trackFocusRegionPanelFocusMoveAll, trackFocusItemReset, trackFocusActionReset } =\n useFocusTracker();\n const handleMoveAllAction = React.useCallback<Required<DSButtonT.Props>['onClick']>(\n (event) => {\n moveSelection(event);\n trackFocusItemReset();\n trackFocusActionReset();\n trackFocusRegionPanel(isDestinationPanel);\n },\n [isDestinationPanel, moveSelection, trackFocusActionReset, trackFocusItemReset, trackFocusRegionPanel],\n );\n const handleMoveAllBtnFocus: React.FocusEventHandler<HTMLButtonElement> = React.useCallback(() => {\n trackFocusItemReset();\n trackFocusActionReset();\n trackFocusRegionPanelFocusMoveAll(isDestinationPanel);\n }, [isDestinationPanel, trackFocusActionReset, trackFocusItemReset, trackFocusRegionPanelFocusMoveAll]);\n const focusRegion = useInternalStore((state) => state.focusRegion);\n const focusItem = useInternalStore((state) => state.focusItem);\n const focusItemAction = useInternalStore((state) => state.focusItemAction);\n const currRegion = isDestinationPanel\n ? REGIONS_FOCUSES.DESTINATION_PANEL_ITEM_MOVE_ALL\n : REGIONS_FOCUSES.SOURCE_PANEL_ITEM_MOVE_ALL;\n const shouldFocusMoveAll = focusItem === '' && focusItemAction === '' && focusRegion === currRegion;\n const innerRefHandlerMoveAll = React.useCallback(\n (node: HTMLButtonElement | null) => {\n if (shouldFocusMoveAll) node?.focus();\n },\n [shouldFocusMoveAll],\n );\n\n return (\n <StyledMoveMultipleWrapper\n boxShadow=\"xs\"\n alignItems=\"center\"\n justifyContent=\"center\"\n cols={gridFullFraction}\n rows={gridFullFraction}\n >\n <StyledButton\n buttonType=\"icon\"\n onClick={handleMoveAllAction}\n onFocus={handleMoveAllBtnFocus}\n innerRef={innerRefHandlerMoveAll}\n >\n {isDestinationPanel ? (\n <StyledCloseMediumIcon width=\"1.538rem\" height=\"1.538rem\" />\n ) : (\n <StyledArrowShortRightIcon width=\"1.538\" height=\"1.538rem\" />\n )}\n </StyledButton>\n </StyledMoveMultipleWrapper>\n );\n});\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACuGb;AAvGV,OAAOA,YAAW;AAClB,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,kBAAkC;AAC3C,SAAS,iBAAiB,mBAAmB;AAC7C,SAAS,uBAAuB;AAEhC,SAAS,8BAA8B;AACvC,SAAS,wBAAwB;AACjC,SAAS,uBAAuB;AAChC,SAAS,iBAAiB,wBAAwB;AAElD,MAAM,4BAA4B,OAAO,MAAM,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,sBAAsB,CAAC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M,qBAAqB,cAAc,MAAM,oBAAoB,MAAM,gBAAgB;AACzF,QAAM,yBAAyBA,OAAM;AAAA,IACnC,CAAC,SAAmC;AAClC,UAAI;AAAoB,cAAM,MAAM;AAAA,IACtC;AAAA,IACA,CAAC,kBAAkB;AAAA,EACrB;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,YAAW;AAAA,MACX,gBAAe;AAAA,MACf,MAAM;AAAA,MACN,MAAM;AAAA,MAEN;AAAA,QAAC;AAAA;AAAA,UACC,YAAW;AAAA,UACX,SAAS;AAAA,UACT,SAAS;AAAA,UACT,UAAU;AAAA,UAET,+BACC,oBAAC,yBAAsB,OAAM,YAAW,QAAO,YAAW,IAE1D,oBAAC,6BAA0B,OAAM,SAAQ,QAAO,YAAW;AAAA;AAAA,MAE/D;AAAA;AAAA,EACF;AAEJ,CAAC;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -5,7 +5,7 @@ import { styled } from "@elliemae/ds-system";
|
|
|
5
5
|
import { Grid } from "@elliemae/ds-grid";
|
|
6
6
|
import { useOnSpecificFocus } from "@elliemae/ds-utilities";
|
|
7
7
|
import { usePropsStore, useInternalStore } from "../../../config/useStore";
|
|
8
|
-
import { ItemListWrapperWithContext } from "./ItemListWrapper";
|
|
8
|
+
import { ItemListWrapperWithContext } from "./ItemListWrapper/Index";
|
|
9
9
|
import { EmptyItems } from "./EmptyItems";
|
|
10
10
|
import { useFocusTracker } from "../../../config/useFocusTracker";
|
|
11
11
|
import { LoadingItems } from "./LoadingItems";
|
|
@@ -37,24 +37,16 @@ const StyledListWrapperMid = styled(Grid, { name: DSShuttleV2Name, slot: DSShutt
|
|
|
37
37
|
|
|
38
38
|
:focus,
|
|
39
39
|
:focus-visible {
|
|
40
|
-
outline: none;
|
|
41
|
-
|
|
42
|
-
&::after {
|
|
43
|
-
position: absolute;
|
|
44
|
-
content: ' ';
|
|
45
40
|
outline: 2px solid brand-700;
|
|
46
|
-
outline-offset: -2px;
|
|
47
|
-
width: 100%;
|
|
48
|
-
height: 100%;
|
|
49
41
|
}
|
|
50
42
|
}
|
|
51
43
|
`;
|
|
52
44
|
const StyledMidScroller = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.LIST_WRAPPER_MID })`
|
|
53
45
|
overflow: auto;
|
|
54
|
-
max-height:
|
|
46
|
+
max-height: 38.462rem;
|
|
55
47
|
`;
|
|
56
48
|
const PanelContentMiddleSection = React2.memo((panelMetaInfo) => {
|
|
57
|
-
const { isDestinationPanel = false } = panelMetaInfo;
|
|
49
|
+
const { isDestinationPanel = false, hasMultipleSelection } = panelMetaInfo;
|
|
58
50
|
const itemsLength = usePropsStore(
|
|
59
51
|
(state) => isDestinationPanel ? state.destinationData.length : state.sourceData.length
|
|
60
52
|
);
|
|
@@ -64,10 +56,7 @@ const PanelContentMiddleSection = React2.memo((panelMetaInfo) => {
|
|
|
64
56
|
const virtualRef = useInternalStore(
|
|
65
57
|
(state) => isDestinationPanel ? state.destinationVirtualRef : state.sourceVirtualRef
|
|
66
58
|
);
|
|
67
|
-
const
|
|
68
|
-
const sourceHasMultipleSelectedItems = useInternalStore((store) => store.sourceHasMultipleSelectedItems);
|
|
69
|
-
const hasMultipleSelection = isDestinationPanel ? destinationHasMultipleSelectedItems : sourceHasMultipleSelectedItems;
|
|
70
|
-
const isDragging = useInternalStore((state) => state.lastActiveId !== "");
|
|
59
|
+
const getIsDragAndDropHappening = useInternalStore((state) => state.getIsDragAndDropHappening);
|
|
71
60
|
const withLoadMore = usePropsStore(
|
|
72
61
|
(state) => isDestinationPanel ? state.destinationWithLoadMore : state.sourceWithLoadMore
|
|
73
62
|
);
|
|
@@ -78,6 +67,7 @@ const PanelContentMiddleSection = React2.memo((panelMetaInfo) => {
|
|
|
78
67
|
trackFocusItemLast,
|
|
79
68
|
trackFocusActionParent,
|
|
80
69
|
trackFocusRegionPanelItem,
|
|
70
|
+
trackFocusLoadMoreBtnDestination,
|
|
81
71
|
trackFocusLoadMoreBtn
|
|
82
72
|
} = useFocusTracker();
|
|
83
73
|
const config = React2.useMemo(
|
|
@@ -92,7 +82,8 @@ const PanelContentMiddleSection = React2.memo((panelMetaInfo) => {
|
|
|
92
82
|
const onPanelKeyDown = React2.useCallback(
|
|
93
83
|
(e) => {
|
|
94
84
|
const { key } = e;
|
|
95
|
-
|
|
85
|
+
const isDragAndDropHappening = getIsDragAndDropHappening();
|
|
86
|
+
if (isDragAndDropHappening) {
|
|
96
87
|
e.preventDefault();
|
|
97
88
|
return;
|
|
98
89
|
}
|
|
@@ -104,22 +95,26 @@ const PanelContentMiddleSection = React2.memo((panelMetaInfo) => {
|
|
|
104
95
|
if (key === "ArrowDown" || key === "Home")
|
|
105
96
|
trackFocusItemFirst();
|
|
106
97
|
if (key === "ArrowUp" || key === "End") {
|
|
107
|
-
if (withLoadMore)
|
|
108
|
-
|
|
109
|
-
|
|
98
|
+
if (withLoadMore) {
|
|
99
|
+
if (isDestinationPanel)
|
|
100
|
+
trackFocusLoadMoreBtnDestination();
|
|
101
|
+
else
|
|
102
|
+
trackFocusLoadMoreBtn();
|
|
103
|
+
} else
|
|
110
104
|
trackFocusItemLast();
|
|
111
105
|
}
|
|
112
106
|
}
|
|
113
107
|
},
|
|
114
108
|
[
|
|
115
|
-
|
|
109
|
+
getIsDragAndDropHappening,
|
|
110
|
+
trackFocusRegionPanelItem,
|
|
116
111
|
isDestinationPanel,
|
|
117
112
|
trackFocusActionParent,
|
|
118
113
|
trackFocusItemFirst,
|
|
114
|
+
withLoadMore,
|
|
119
115
|
trackFocusItemLast,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
withLoadMore
|
|
116
|
+
trackFocusLoadMoreBtnDestination,
|
|
117
|
+
trackFocusLoadMoreBtn
|
|
123
118
|
]
|
|
124
119
|
);
|
|
125
120
|
return /* @__PURE__ */ jsxs(
|
|
@@ -135,7 +130,7 @@ const PanelContentMiddleSection = React2.memo((panelMetaInfo) => {
|
|
|
135
130
|
showEmptyMessage ? /* @__PURE__ */ jsx(EmptyItems, { ...panelMetaInfo }) : null,
|
|
136
131
|
showItems ? /* @__PURE__ */ jsx(ItemListWrapperWithContext, { ...panelMetaInfo }) : null
|
|
137
132
|
] }),
|
|
138
|
-
hasMultipleSelection ? /* @__PURE__ */ jsx(MultipleSelectionAction, {
|
|
133
|
+
hasMultipleSelection ? /* @__PURE__ */ jsx(MultipleSelectionAction, { ...panelMetaInfo }) : null
|
|
139
134
|
]
|
|
140
135
|
}
|
|
141
136
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/Panel/middle/PanelContentMiddleSection.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 { useOnSpecificFocus } from '@elliemae/ds-utilities';\n\nimport { usePropsStore, useInternalStore } from '../../../config/useStore';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types';\nimport { ItemListWrapperWithContext } from './ItemListWrapper';\nimport { EmptyItems } from './EmptyItems';\nimport { useFocusTracker } from '../../../config/useFocusTracker';\n\nimport { LoadingItems } from './LoadingItems';\nimport { MultipleSelectionAction } from './MultipleSelectionAction';\nimport { REGIONS_FOCUSES } from '../../../constants';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../config/DSShuttleV2Definitions';\n\nconst useInnerRefHandlers = (isDestinationPanel: boolean) => {\n const focusRegion = useInternalStore((state) => state.focusRegion);\n const focusItem = useInternalStore((state) => state.focusItem);\n const focusItemAction = useInternalStore((state) => state.focusItemAction);\n const currRegion = isDestinationPanel ? REGIONS_FOCUSES.DESTINATION_PANEL : REGIONS_FOCUSES.SOURCE_PANEL;\n\n const shouldFocus = React.useMemo(\n () => focusRegion === currRegion && focusItem === '' && focusItemAction === '',\n [currRegion, focusItem, focusItemAction, focusRegion],\n );\n\n const innerRefHandlerParentItem = React.useCallback(\n (node: HTMLDivElement) => {\n if (shouldFocus) {\n node?.focus();\n }\n },\n [shouldFocus],\n );\n return React.useMemo(() => ({ shouldFocus, innerRefHandlerParentItem }), [shouldFocus, innerRefHandlerParentItem]);\n};\n\nconst StyledListWrapperMid = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.LIST_WRAPPER_MID })`\n overflow: hidden;\n position: relative;\n\n :focus,\n :focus-visible {\n
|
|
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 { useOnSpecificFocus } from '@elliemae/ds-utilities';\n\nimport { usePropsStore, useInternalStore } from '../../../config/useStore';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types';\nimport { ItemListWrapperWithContext } from './ItemListWrapper/Index';\nimport { EmptyItems } from './EmptyItems';\nimport { useFocusTracker } from '../../../config/useFocusTracker';\n\nimport { LoadingItems } from './LoadingItems';\nimport { MultipleSelectionAction } from './MultipleSelectionAction';\nimport { REGIONS_FOCUSES } from '../../../constants';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../config/DSShuttleV2Definitions';\n\nconst useInnerRefHandlers = (isDestinationPanel: boolean) => {\n const focusRegion = useInternalStore((state) => state.focusRegion);\n const focusItem = useInternalStore((state) => state.focusItem);\n const focusItemAction = useInternalStore((state) => state.focusItemAction);\n const currRegion = isDestinationPanel ? REGIONS_FOCUSES.DESTINATION_PANEL : REGIONS_FOCUSES.SOURCE_PANEL;\n\n const shouldFocus = React.useMemo(\n () => focusRegion === currRegion && focusItem === '' && focusItemAction === '',\n [currRegion, focusItem, focusItemAction, focusRegion],\n );\n\n const innerRefHandlerParentItem = React.useCallback(\n (node: HTMLDivElement) => {\n if (shouldFocus) {\n node?.focus();\n }\n },\n [shouldFocus],\n );\n return React.useMemo(() => ({ shouldFocus, innerRefHandlerParentItem }), [shouldFocus, innerRefHandlerParentItem]);\n};\n\nconst StyledListWrapperMid = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.LIST_WRAPPER_MID })`\n overflow: hidden;\n position: relative;\n\n :focus,\n :focus-visible {\n outline: 2px solid brand-700;\n }\n }\n`;\nconst StyledMidScroller = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.LIST_WRAPPER_MID })`\n overflow: auto;\n max-height: 38.462rem;\n`;\nexport const PanelContentMiddleSection = React.memo((panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => {\n const { isDestinationPanel = false, hasMultipleSelection } = panelMetaInfo;\n const itemsLength = usePropsStore((state) =>\n isDestinationPanel ? state.destinationData.length : state.sourceData.length,\n );\n const isLoading = usePropsStore((state) => (isDestinationPanel ? state.destinationIsLoading : state.sourceIsLoading));\n const showEmptyMessage = !isLoading && itemsLength === 0;\n const showItems = !isLoading && !showEmptyMessage;\n\n const virtualRef = useInternalStore((state) =>\n isDestinationPanel ? state.destinationVirtualRef : state.sourceVirtualRef,\n );\n\n const getIsDragAndDropHappening = useInternalStore((state) => state.getIsDragAndDropHappening);\n const withLoadMore = usePropsStore((state) =>\n isDestinationPanel ? state.destinationWithLoadMore : state.sourceWithLoadMore,\n );\n const { innerRefHandlerParentItem } = useInnerRefHandlers(isDestinationPanel);\n const {\n trackFocusRegionPanel,\n trackFocusItemFirst,\n trackFocusItemLast,\n trackFocusActionParent,\n trackFocusRegionPanelItem,\n trackFocusLoadMoreBtnDestination,\n trackFocusLoadMoreBtn,\n } = useFocusTracker();\n const config = React.useMemo(\n () => ({\n onFocus: () => {\n trackFocusRegionPanel(isDestinationPanel);\n },\n }),\n [trackFocusRegionPanel, isDestinationPanel],\n );\n const onPanelFocus = useOnSpecificFocus(config);\n\n const onPanelKeyDown = React.useCallback<React.KeyboardEventHandler<HTMLDivElement>>(\n (e) => {\n const { key } = e;\n // we need to invoke \"getIsDragAndDropHappening\" here to ensure we have the latest info at the moment of the event\n const isDragAndDropHappening = getIsDragAndDropHappening();\n if (isDragAndDropHappening) {\n e.preventDefault();\n return;\n }\n if (['Home', 'End', 'ArrowUp', 'ArrowDown'].includes(key)) {\n e.preventDefault();\n e.stopPropagation();\n trackFocusRegionPanelItem(isDestinationPanel);\n trackFocusActionParent();\n // we won't receive ArrowUp/ArrowDown if this happens in a child because children are stopping propagation\n if (key === 'ArrowDown' || key === 'Home') trackFocusItemFirst();\n if (key === 'ArrowUp' || key === 'End') {\n if (withLoadMore) {\n if (isDestinationPanel) trackFocusLoadMoreBtnDestination();\n else trackFocusLoadMoreBtn();\n } else trackFocusItemLast();\n }\n }\n },\n [\n getIsDragAndDropHappening,\n trackFocusRegionPanelItem,\n isDestinationPanel,\n trackFocusActionParent,\n trackFocusItemFirst,\n withLoadMore,\n trackFocusItemLast,\n trackFocusLoadMoreBtnDestination,\n trackFocusLoadMoreBtn,\n ],\n );\n\n return (\n <StyledListWrapperMid\n onFocus={onPanelFocus}\n onKeyDown={onPanelKeyDown}\n tabIndex={0}\n ref={innerRefHandlerParentItem}\n >\n <StyledMidScroller ref={virtualRef}>\n {isLoading ? <LoadingItems {...panelMetaInfo} /> : null}\n {showEmptyMessage ? <EmptyItems {...panelMetaInfo} /> : null}\n {showItems ? <ItemListWrapperWithContext {...panelMetaInfo} /> : null}\n </StyledMidScroller>\n {hasMultipleSelection ? <MultipleSelectionAction {...panelMetaInfo} /> : null}\n </StyledListWrapperMid>\n );\n});\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACqIjB,SACe,KADf;AArIN,OAAOA,YAAW;AAClB,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,0BAA0B;AAEnC,SAAS,eAAe,wBAAwB;AAEhD,SAAS,kCAAkC;AAC3C,SAAS,kBAAkB;AAC3B,SAAS,uBAAuB;AAEhC,SAAS,oBAAoB;AAC7B,SAAS,+BAA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AAAA,IACF;AAAA,EACF;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAS;AAAA,MACT,WAAW;AAAA,MACX,UAAU;AAAA,MACV,KAAK;AAAA,MAEL;AAAA,6BAAC,qBAAkB,KAAK,YACrB;AAAA,sBAAY,oBAAC,gBAAc,GAAG,eAAe,IAAK;AAAA,UAClD,mBAAmB,oBAAC,cAAY,GAAG,eAAe,IAAK;AAAA,UACvD,YAAY,oBAAC,8BAA4B,GAAG,eAAe,IAAK;AAAA,WACnE;AAAA,QACC,uBAAuB,oBAAC,2BAAyB,GAAG,eAAe,IAAK;AAAA;AAAA;AAAA,EAC3E;AAEJ,CAAC;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -52,7 +52,7 @@ const SelectionHeader = React2.memo(({ isDestinationPanel = false }) => {
|
|
|
52
52
|
} else {
|
|
53
53
|
const newSelection = {};
|
|
54
54
|
selectionableItems.forEach((selectableItem) => {
|
|
55
|
-
newSelection[selectableItem.
|
|
55
|
+
newSelection[selectableItem.hydratedId] = true;
|
|
56
56
|
});
|
|
57
57
|
onSelectionChange(newSelection, { event });
|
|
58
58
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/Panel/top/SelectionHeader.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { DSControlledCheckbox, type DSControlledCheckboxT } from '@elliemae/ds-form-checkbox';\nimport { Grid } from '@elliemae/ds-grid';\nimport { usePropsStore, useInternalStore } from '../../../config/useStore';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../config/DSShuttleV2Definitions';\n\nconst StyledSelectionHeaderWrapper = styled(Grid, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.AREA_SELECTION_HEADER,\n})`\n line-height: 1;\n font-size: 1rem;\n background-color: neutral-000;\n border-bottom: 1px solid neutral-400;\n`;\nconst StyledSelectionHeaderCountLabel = styled('div', {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.AREA_SELECTION_HEADER_COUNT_LABEL,\n})`\n text-align: end;\n color: neutral-500;\n`;\n\nconst wrapperCols = ['auto', '1fr'];\nexport const SelectionHeader = React.memo(({ isDestinationPanel = false }: DSShuttleV2T.PanelMetaInfo) => {\n const selectionableItems = useInternalStore((state) =>\n isDestinationPanel ? state.destinationSelectionableData : state.sourceSelectionableData,\n );\n const ariaControls = useInternalStore((state) =>\n isDestinationPanel ? state.destinationSelectionableIds : state.sourceSelectionableIds,\n );\n const onSelectionChange = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationSelectionChange : state.onSourceSelectionChange,\n );\n const selectionLength = useInternalStore((state) =>\n isDestinationPanel ? state.destinationSelectionItemArray.length : state.sourceSelectionItemArray.length,\n );\n const checkboxValue = React.useMemo(() => {\n let newVal: boolean | 'mixed' = false;\n if (selectionLength > 0)\n if (selectionLength === selectionableItems.length) newVal = true;\n else newVal = 'mixed';\n return newVal;\n }, [selectionableItems.length, selectionLength]);\n\n const handleSelectAll = React.useCallback<DSControlledCheckboxT.InternalProps['onChange']>(\n (_, event) => {\n if (checkboxValue === true) {\n onSelectionChange({}, { event });\n } else {\n const newSelection: DSShuttleV2T.InternalProps['sourceSelectedItems'] = {};\n selectionableItems.forEach((selectableItem) => {\n newSelection[selectableItem.
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACiEf,cAUF,YAVE;AAjER,OAAOA,YAAW;AAClB,SAAS,cAAc;AACvB,SAAS,4BAAwD;AACjE,SAAS,YAAY;AACrB,SAAS,eAAe,wBAAwB;AAEhD,SAAS,iBAAiB,wBAAwB;AAElD,MAAM,+BAA+B,OAAO,MAAM;AAAA,EAChD,MAAM;AAAA,EACN,MAAM,iBAAiB;AACzB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAMD,MAAM,kCAAkC,OAAO,OAAO;AAAA,EACpD,MAAM;AAAA,EACN,MAAM,iBAAiB;AACzB,CAAC;AAAA;AAAA;AAAA;AAKD,MAAM,cAAc,CAAC,QAAQ,KAAK;AAC3B,MAAM,kBAAkBA,OAAM,KAAK,CAAC,EAAE,qBAAqB,MAAM,MAAkC;AACxG,QAAM,qBAAqB;AAAA,IAAiB,CAAC,UAC3C,qBAAqB,MAAM,+BAA+B,MAAM;AAAA,EAClE;AACA,QAAM,eAAe;AAAA,IAAiB,CAAC,UACrC,qBAAqB,MAAM,8BAA8B,MAAM;AAAA,EACjE;AACA,QAAM,oBAAoB;AAAA,IAAc,CAAC,UACvC,qBAAqB,MAAM,+BAA+B,MAAM;AAAA,EAClE;AACA,QAAM,kBAAkB;AAAA,IAAiB,CAAC,UACxC,qBAAqB,MAAM,8BAA8B,SAAS,MAAM,yBAAyB;AAAA,EACnG;AACA,QAAM,gBAAgBA,OAAM,QAAQ,MAAM;AACxC,QAAI,SAA4B;AAChC,QAAI,kBAAkB;AACpB,UAAI,oBAAoB,mBAAmB;AAAQ,iBAAS;AAAA;AACvD,iBAAS;AAChB,WAAO;AAAA,EACT,GAAG,CAAC,mBAAmB,QAAQ,eAAe,CAAC;AAE/C,QAAM,kBAAkBA,OAAM;AAAA,IAC5B,CAAC,GAAG,UAAU;AACZ,UAAI,kBAAkB,MAAM;AAC1B,0BAAkB,CAAC,GAAG,EAAE,MAAM,CAAC;AAAA,MACjC,OAAO;AACL,cAAM,eAAkE,CAAC;AACzE,2BAAmB,QAAQ,CAAC,mBAAmB;AAC7C,uBAAa,eAAe,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { DSControlledCheckbox, type DSControlledCheckboxT } from '@elliemae/ds-form-checkbox';\nimport { Grid } from '@elliemae/ds-grid';\nimport { usePropsStore, useInternalStore } from '../../../config/useStore';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../config/DSShuttleV2Definitions';\n\nconst StyledSelectionHeaderWrapper = styled(Grid, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.AREA_SELECTION_HEADER,\n})`\n line-height: 1;\n font-size: 1rem;\n background-color: neutral-000;\n border-bottom: 1px solid neutral-400;\n`;\nconst StyledSelectionHeaderCountLabel = styled('div', {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.AREA_SELECTION_HEADER_COUNT_LABEL,\n})`\n text-align: end;\n color: neutral-500;\n`;\n\nconst wrapperCols = ['auto', '1fr'];\nexport const SelectionHeader = React.memo(({ isDestinationPanel = false }: DSShuttleV2T.PanelMetaInfo) => {\n const selectionableItems = useInternalStore((state) =>\n isDestinationPanel ? state.destinationSelectionableData : state.sourceSelectionableData,\n );\n const ariaControls = useInternalStore((state) =>\n isDestinationPanel ? state.destinationSelectionableIds : state.sourceSelectionableIds,\n );\n const onSelectionChange = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationSelectionChange : state.onSourceSelectionChange,\n );\n const selectionLength = useInternalStore((state) =>\n isDestinationPanel ? state.destinationSelectionItemArray.length : state.sourceSelectionItemArray.length,\n );\n const checkboxValue = React.useMemo(() => {\n let newVal: boolean | 'mixed' = false;\n if (selectionLength > 0)\n if (selectionLength === selectionableItems.length) newVal = true;\n else newVal = 'mixed';\n return newVal;\n }, [selectionableItems.length, selectionLength]);\n\n const handleSelectAll = React.useCallback<DSControlledCheckboxT.InternalProps['onChange']>(\n (_, event) => {\n if (checkboxValue === true) {\n onSelectionChange({}, { event });\n } else {\n const newSelection: DSShuttleV2T.InternalProps['sourceSelectedItems'] = {};\n selectionableItems.forEach((selectableItem) => {\n newSelection[selectableItem.hydratedId] = true;\n });\n onSelectionChange(newSelection, { event });\n }\n },\n [checkboxValue, onSelectionChange, selectionableItems],\n );\n\n return (\n <StyledSelectionHeaderWrapper cols={wrapperCols} justifyContent=\"center\" alignItems=\"center\" py=\"7px\" px=\"xxs2\">\n <Grid justifyContent=\"center\" alignItems=\"center\">\n <DSControlledCheckbox\n checked={checkboxValue}\n aria-label={`${checkboxValue === true ? 'Deselect' : 'Select'} all ${\n isDestinationPanel ? 'destination' : 'source'\n } items`}\n onChange={handleSelectAll}\n aria-controls={ariaControls}\n disabled={selectionableItems.length === 0}\n />\n </Grid>\n <StyledSelectionHeaderCountLabel>{selectionLength} selected</StyledSelectionHeaderCountLabel>\n </StyledSelectionHeaderWrapper>\n );\n});\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACiEf,cAUF,YAVE;AAjER,OAAOA,YAAW;AAClB,SAAS,cAAc;AACvB,SAAS,4BAAwD;AACjE,SAAS,YAAY;AACrB,SAAS,eAAe,wBAAwB;AAEhD,SAAS,iBAAiB,wBAAwB;AAElD,MAAM,+BAA+B,OAAO,MAAM;AAAA,EAChD,MAAM;AAAA,EACN,MAAM,iBAAiB;AACzB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAMD,MAAM,kCAAkC,OAAO,OAAO;AAAA,EACpD,MAAM;AAAA,EACN,MAAM,iBAAiB;AACzB,CAAC;AAAA;AAAA;AAAA;AAKD,MAAM,cAAc,CAAC,QAAQ,KAAK;AAC3B,MAAM,kBAAkBA,OAAM,KAAK,CAAC,EAAE,qBAAqB,MAAM,MAAkC;AACxG,QAAM,qBAAqB;AAAA,IAAiB,CAAC,UAC3C,qBAAqB,MAAM,+BAA+B,MAAM;AAAA,EAClE;AACA,QAAM,eAAe;AAAA,IAAiB,CAAC,UACrC,qBAAqB,MAAM,8BAA8B,MAAM;AAAA,EACjE;AACA,QAAM,oBAAoB;AAAA,IAAc,CAAC,UACvC,qBAAqB,MAAM,+BAA+B,MAAM;AAAA,EAClE;AACA,QAAM,kBAAkB;AAAA,IAAiB,CAAC,UACxC,qBAAqB,MAAM,8BAA8B,SAAS,MAAM,yBAAyB;AAAA,EACnG;AACA,QAAM,gBAAgBA,OAAM,QAAQ,MAAM;AACxC,QAAI,SAA4B;AAChC,QAAI,kBAAkB;AACpB,UAAI,oBAAoB,mBAAmB;AAAQ,iBAAS;AAAA;AACvD,iBAAS;AAChB,WAAO;AAAA,EACT,GAAG,CAAC,mBAAmB,QAAQ,eAAe,CAAC;AAE/C,QAAM,kBAAkBA,OAAM;AAAA,IAC5B,CAAC,GAAG,UAAU;AACZ,UAAI,kBAAkB,MAAM;AAC1B,0BAAkB,CAAC,GAAG,EAAE,MAAM,CAAC;AAAA,MACjC,OAAO;AACL,cAAM,eAAkE,CAAC;AACzE,2BAAmB,QAAQ,CAAC,mBAAmB;AAC7C,uBAAa,eAAe,cAAc;AAAA,QAC5C,CAAC;AACD,0BAAkB,cAAc,EAAE,MAAM,CAAC;AAAA,MAC3C;AAAA,IACF;AAAA,IACA,CAAC,eAAe,mBAAmB,kBAAkB;AAAA,EACvD;AAEA,SACE,qBAAC,gCAA6B,MAAM,aAAa,gBAAe,UAAS,YAAW,UAAS,IAAG,OAAM,IAAG,QACvG;AAAA,wBAAC,QAAK,gBAAe,UAAS,YAAW,UACvC;AAAA,MAAC;AAAA;AAAA,QACC,SAAS;AAAA,QACT,cAAY,GAAG,kBAAkB,OAAO,aAAa,gBACnD,qBAAqB,gBAAgB;AAAA,QAEvC,UAAU;AAAA,QACV,iBAAe;AAAA,QACf,UAAU,mBAAmB,WAAW;AAAA;AAAA,IAC1C,GACF;AAAA,IACA,qBAAC,mCAAiC;AAAA;AAAA,MAAgB;AAAA,OAAS;AAAA,KAC7D;AAEJ,CAAC;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -17,17 +17,14 @@ const StyledListWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV
|
|
|
17
17
|
`;
|
|
18
18
|
const panelWrapperRows = ["auto", "1fr"];
|
|
19
19
|
const listWrapperRows = ["auto", "1fr", "auto"];
|
|
20
|
-
const PanelWrapper = React2.memo((panelMetaInfo) => {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
/* @__PURE__ */ jsx(
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
] })
|
|
29
|
-
] });
|
|
30
|
-
});
|
|
20
|
+
const PanelWrapper = React2.memo((panelMetaInfo) => /* @__PURE__ */ jsxs(StyledPanelWrapper, { rows: panelWrapperRows, gutter: "xxxs", children: [
|
|
21
|
+
/* @__PURE__ */ jsx(Header, { ...panelMetaInfo }),
|
|
22
|
+
/* @__PURE__ */ jsxs(StyledListWrapper, { rows: listWrapperRows, children: [
|
|
23
|
+
/* @__PURE__ */ jsx(PanelContentTopSection, { ...panelMetaInfo }),
|
|
24
|
+
/* @__PURE__ */ jsx(PanelContentMiddleSection, { ...panelMetaInfo }),
|
|
25
|
+
/* @__PURE__ */ jsx(PanelContentBottomSection, { ...panelMetaInfo })
|
|
26
|
+
] })
|
|
27
|
+
] }));
|
|
31
28
|
export {
|
|
32
29
|
PanelWrapper
|
|
33
30
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/PanelWrapper.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 { Header } from './Header';\nimport { PanelContentTopSection } from './Panel/top/PanelContentTopSection';\nimport { PanelContentMiddleSection } from './Panel/middle/PanelContentMiddleSection';\nimport { PanelContentBottomSection } from './Panel/bottom/PanelContentBottomSection';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../config/DSShuttleV2Definitions';\n\nconst StyledPanelWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.PANEL_WRAPPER })`\n min-width: 300px;\n min-height: 264px;\n`;\nconst StyledListWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.LIST_WRAPPER })`\n border: 1px solid neutral-400;\n`;\nconst panelWrapperRows = ['auto', '1fr'];\nconst listWrapperRows = ['auto', '1fr', 'auto'];\n\nexport const PanelWrapper = React.memo((panelMetaInfo: DSShuttleV2T.PanelMetaInfo) =>
|
|
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';\nimport { Header } from './Header';\nimport { PanelContentTopSection } from './Panel/top/PanelContentTopSection';\nimport { PanelContentMiddleSection } from './Panel/middle/PanelContentMiddleSection';\nimport { PanelContentBottomSection } from './Panel/bottom/PanelContentBottomSection';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../config/DSShuttleV2Definitions';\n\nconst StyledPanelWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.PANEL_WRAPPER })`\n min-width: 300px;\n min-height: 264px;\n`;\nconst StyledListWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.LIST_WRAPPER })`\n border: 1px solid neutral-400;\n`;\nconst panelWrapperRows = ['auto', '1fr'];\nconst listWrapperRows = ['auto', '1fr', 'auto'];\n\nexport const PanelWrapper = React.memo((panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => (\n <StyledPanelWrapper rows={panelWrapperRows} gutter=\"xxxs\">\n <Header {...panelMetaInfo} />\n <StyledListWrapper rows={listWrapperRows}>\n <PanelContentTopSection {...panelMetaInfo} />\n <PanelContentMiddleSection {...panelMetaInfo} />\n <PanelContentBottomSection {...panelMetaInfo} />\n </StyledListWrapper>\n </StyledPanelWrapper>\n));\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACsBnB,cACA,YADA;AAtBJ,OAAOA,YAAW;AAClB,SAAS,cAAc;AACvB,SAAS,YAAY;AAErB,SAAS,cAAc;AACvB,SAAS,8BAA8B;AACvC,SAAS,iCAAiC;AAC1C,SAAS,iCAAiC;AAC1C,SAAS,iBAAiB,wBAAwB;AAElD,MAAM,qBAAqB,OAAO,MAAM,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,cAAc,CAAC;AAAA;AAAA;AAAA;AAIvG,MAAM,oBAAoB,OAAO,MAAM,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,aAAa,CAAC;AAAA;AAAA;AAGrG,MAAM,mBAAmB,CAAC,QAAQ,KAAK;AACvC,MAAM,kBAAkB,CAAC,QAAQ,OAAO,MAAM;AAEvC,MAAM,eAAeA,OAAM,KAAK,CAAC,kBACtC,qBAAC,sBAAmB,MAAM,kBAAkB,QAAO,QACjD;AAAA,sBAAC,UAAQ,GAAG,eAAe;AAAA,EAC3B,qBAAC,qBAAkB,MAAM,iBACvB;AAAA,wBAAC,0BAAwB,GAAG,eAAe;AAAA,IAC3C,oBAAC,6BAA2B,GAAG,eAAe;AAAA,IAC9C,oBAAC,6BAA2B,GAAG,eAAe;AAAA,KAChD;AAAA,GACF,CACD;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,39 +1,56 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { globalAttributesPropTypes, xstyledPropTypes } from "@elliemae/ds-utilities";
|
|
2
|
+
import { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from "@elliemae/ds-utilities";
|
|
3
3
|
const defaultProps = {
|
|
4
|
-
sourceWithSoftDelete: false,
|
|
5
4
|
addDragAndDropFromSource: false,
|
|
5
|
+
removeDragAndDropFromDestination: false,
|
|
6
6
|
sourceIsLoading: false,
|
|
7
|
+
destinationIsLoading: false,
|
|
7
8
|
sourceWithLoadMore: false,
|
|
9
|
+
destinationWithLoadMore: false,
|
|
8
10
|
sourceIsLoadingMore: false,
|
|
11
|
+
destinationIsLoadingMore: false,
|
|
9
12
|
onSourceLoadMore: () => {
|
|
10
13
|
},
|
|
11
|
-
|
|
14
|
+
onDestinationLoadMore: () => {
|
|
12
15
|
},
|
|
13
16
|
onSourceAdd: () => {
|
|
14
17
|
},
|
|
18
|
+
onDestinationAdd: () => {
|
|
19
|
+
},
|
|
15
20
|
onSourceRemove: () => {
|
|
16
21
|
},
|
|
17
|
-
|
|
18
|
-
removeDragAndDropFromDestination: false,
|
|
19
|
-
destinationIsLoading: false,
|
|
20
|
-
destinationWithLoadMore: false,
|
|
21
|
-
destinationIsLoadingMore: false,
|
|
22
|
-
onDestinationLoadMore: () => {
|
|
22
|
+
onDestinationRemove: () => {
|
|
23
23
|
},
|
|
24
|
-
|
|
24
|
+
onSourceReorder: () => {
|
|
25
25
|
},
|
|
26
|
-
|
|
26
|
+
onDestinationReorder: () => {
|
|
27
27
|
},
|
|
28
|
-
|
|
28
|
+
sourceSoftDeletedItems: {},
|
|
29
|
+
onSourceSoftDelete: () => {
|
|
30
|
+
},
|
|
31
|
+
destinationSoftDeletedItems: {},
|
|
32
|
+
onDestinationSoftDelete: () => {
|
|
29
33
|
}
|
|
30
34
|
};
|
|
31
|
-
const
|
|
35
|
+
const DSShuttleV2PropTypes = {
|
|
32
36
|
...globalAttributesPropTypes,
|
|
33
|
-
...xstyledPropTypes
|
|
37
|
+
...xstyledPropTypes,
|
|
38
|
+
sourceData: PropTypes.arrayOf(PropTypes.object).description("hello!").isRequired,
|
|
39
|
+
sourceSelectedItems: PropTypes.object.description("hello!").isRequired,
|
|
40
|
+
onSourceSelectionChange: PropTypes.func.description("hello!").isRequired,
|
|
41
|
+
SourceHeader: PropTypes.node.description("hello!").isRequired,
|
|
42
|
+
onSourceDrilldown: PropTypes.func.description("hello!").isRequired,
|
|
43
|
+
destinationData: PropTypes.arrayOf(PropTypes.object).description("hello!").isRequired,
|
|
44
|
+
destinationSelectedItems: PropTypes.object.description("hello!").isRequired,
|
|
45
|
+
onDestinationSelectionChange: PropTypes.func.description("hello!").isRequired,
|
|
46
|
+
DestinationHeader: PropTypes.node.description("hello!").isRequired,
|
|
47
|
+
onDestinationDrilldown: PropTypes.func.description("hello!").isRequired,
|
|
48
|
+
getId: PropTypes.func.description("hello!").isRequired,
|
|
49
|
+
getLabel: PropTypes.func.description("hello!").isRequired
|
|
34
50
|
};
|
|
51
|
+
const DSShuttleV2PropTypesSchema = DSShuttleV2PropTypes;
|
|
35
52
|
export {
|
|
36
|
-
|
|
53
|
+
DSShuttleV2PropTypesSchema,
|
|
37
54
|
defaultProps
|
|
38
55
|
};
|
|
39
56
|
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { WeakValidationMap } from 'react';\nimport type React from 'react';\nimport type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-utilities';\nimport { globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-utilities';\nimport { type DSControlledCheckboxT } from '@elliemae/ds-form-checkbox';\nimport { type DSButtonT } from '@elliemae/ds-button';\nimport { type useSortable } from '@elliemae/ds-drag-and-drop';\n\nexport declare namespace DSShuttleV2T {\n export type PanelMetaInfo = { isDestinationPanel: boolean };\n export interface ItemMeta extends PanelMetaInfo {\n item: DSShuttleV2T.ConfiguredDatum;\n withDragNDrop: boolean;\n useSortableHelpers?: ReturnType<typeof useSortable>;\n }\n\n export interface Datum extends Record<string, unknown> {\n id: string;\n label: string;\n subtitle?: string;\n Icon?: React.ComponentType<ItemMeta>;\n CustomRenderer?: React.ComponentType<ItemMeta>;\n softDeleted?: boolean;\n preventDrilldown?: boolean;\n preventMove?: boolean;\n }\n export interface ConfiguredDatum {\n isFirst: boolean;\n isLast: boolean;\n isSelected: boolean;\n selectionPrevented: boolean;\n withActions: boolean;\n withMoveBtn: boolean;\n withDrilldownBtn: boolean;\n original: Datum;\n localIndex: number;\n }\n\n type SelectionMap = Record<string, boolean>;\n type OnDataChange = (\n newData: Datum[],\n metainfo: {\n event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>;\n item?: Datum;\n selectedItems?: Datum[];\n },\n ) => void;\n\n type OnChangeEvent = (\n items: Datum[],\n metainfo: {\n event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>;\n },\n ) => void;\n\n type OnReorderEvent = (newData: Datum[], metadata: { active: Datum; targetIndex: number }) => void;\n\n type OnSelectionChange = (\n newSelection: SelectionMap,\n metainfo: {\n event:\n | Parameters<Required<DSButtonT.Props>['onClick']>[0]\n | Parameters<DSControlledCheckboxT.InternalProps['onChange']>[1]\n | React.MouseEvent<HTMLButtonElement | HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>\n | React.ChangeEvent<HTMLInputElement>;\n item?: Datum;\n },\n ) => void;\n type OnSelectionDrilldown = (\n item: Datum,\n metainfo: { event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement> },\n ) => void;\n\n type OnLoadMore = (e: Parameters<Required<DSButtonT.Props>['onClick']>[0]) => void;\n\n export interface RequiredProps {\n sourceData: Datum[];\n sourceSelectedItems: SelectionMap;\n onSourceSelectionChange: OnSelectionChange;\n SourceHeader: React.ComponentType<unknown>;\n onSourceDrilldown: OnSelectionDrilldown;\n\n destinationData: Datum[];\n destinationSelectedItems: SelectionMap;\n onDestinationSelectionChange: OnSelectionChange;\n DestinationHeader: React.ComponentType<unknown>;\n onDestinationDrilldown: OnSelectionDrilldown;\n }\n\n export interface DefaultProps {\n sourceIsLoading: boolean;\n sourceWithSoftDelete: boolean;\n sourceWithLoadMore: boolean;\n sourceIsLoadingMore: boolean;\n onSourceChange: OnDataChange;\n onSourceAdd: OnChangeEvent;\n onSourceRemove: OnChangeEvent;\n onSourceReorder: OnReorderEvent;\n onSourceLoadMore: OnLoadMore;\n addDragAndDropFromSource: boolean;\n removeDragAndDropFromDestination: boolean;\n destinationIsLoading: boolean;\n destinationWithSoftDelete: boolean;\n destinationWithLoadMore: boolean;\n destinationIsLoadingMore: boolean;\n onDestinationLoadMore: OnLoadMore;\n onDestinationChange: OnDataChange;\n onDestinationAdd: OnChangeEvent;\n onDestinationRemove: OnChangeEvent;\n onDestinationReorder: OnReorderEvent;\n }\n\n type OnFilterChange = (\n newfilter: string | null,\n metainfo: { event: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement> },\n ) => void;\n type OnSearchbarOpen = (\n newfilter: boolean,\n metainfo: { event: Parameters<Required<DSButtonT.Props>['onClick']>[0] },\n ) => void;\n export interface OptionalProps {\n sourceItemProps?: Record<string, unknown>;\n destinationItemProps?: Record<string, unknown>;\n sourceFilterValue?: string;\n\n onSourceFilterChange?: OnFilterChange;\n onSourceOpenSearchbar?: OnSearchbarOpen;\n sourceShowSearchbar?: boolean;\n destinationFilterValue?: string;\n onDestinationFilterChange?: OnFilterChange;\n onDesinationOpenSearchbar?: OnSearchbarOpen;\n destinationShowSearchbar?: boolean;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSShuttleV2T.DefaultProps = {\n sourceWithSoftDelete: false,\n addDragAndDropFromSource: false,\n sourceIsLoading: false,\n sourceWithLoadMore: false,\n sourceIsLoadingMore: false,\n onSourceLoadMore: () => {},\n onSourceChange: () => {},\n onSourceAdd: () => {},\n onSourceRemove: () => {},\n\n destinationWithSoftDelete: false,\n removeDragAndDropFromDestination: false,\n destinationIsLoading: false,\n destinationWithLoadMore: false,\n destinationIsLoadingMore: false,\n onDestinationLoadMore: () => {},\n onDestinationChange: () => {},\n onDestinationAdd: () => {},\n onDestinationRemove: () => {},\n};\n\nexport const DSSkeletonPropTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n} as WeakValidationMap<unknown>;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport type { WeakValidationMap } from 'react';\nimport type React from 'react';\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-utilities';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-utilities';\nimport { type DSControlledCheckboxT } from '@elliemae/ds-form-checkbox';\nimport { type DSButtonT } from '@elliemae/ds-button-v2';\nimport { type useSortable, type DnDKitTree } from '@elliemae/ds-drag-and-drop';\n\nexport declare namespace DSShuttleV2T {\n export type Datum = Record<string, unknown>;\n export type PanelMetaInfo = { isDestinationPanel: boolean; hasMultipleSelection: boolean };\n type HydratedId = string;\n\n export type DatumInternalMeta = {\n isFirst: boolean;\n isLast: boolean;\n isSelected: boolean;\n softDeleted: boolean;\n localIndex: number;\n hydratedId: HydratedId;\n };\n export type DatumRenderFlags = {\n selectionPrevented: boolean;\n withActions: boolean;\n withMoveBtn: boolean;\n withDrilldownBtn: boolean;\n internallyDisabledMove: boolean;\n internallyDisabledDrilldown: boolean;\n };\n\n // =============================================================================\n // Hydratables section\n // Component-less\n // =============================================================================\n export type PrimaryKeyHydratables = {\n id: HydratedId;\n };\n type RequiredDatumHydratablesWithoutComponents = {\n label: string;\n };\n type OptionalDatumHydratablesWithoutComponents = {\n subtitle?: string;\n preventDrilldown?: boolean;\n preventMove?: boolean;\n };\n type DatumHydratablesWithoutComponents = PrimaryKeyHydratables &\n RequiredDatumHydratablesWithoutComponents &\n OptionalDatumHydratablesWithoutComponents;\n // =============================================================================\n // Hydratables section\n // Component-only\n // =============================================================================\n export type ComponentProps = {\n datum: Datum;\n panelMetaInfo: PanelMetaInfo;\n datumInternalMeta: DatumInternalMeta;\n datumHydratables: DatumHydratablesWithoutComponents;\n };\n // eslint-disable-next-line @typescript-eslint/ban-types\n type RequiredDatumHydratablesComponents = {};\n type OptionalDatumHydratablesComponents = {\n Icon?: React.ComponentType<ComponentProps>;\n CustomRenderer?: React.ComponentType<ComponentProps>;\n };\n // =============================================================================\n // Hydratables section\n // Finals\n // =============================================================================\n type RequiredDatumHydratables = RequiredDatumHydratablesWithoutComponents & RequiredDatumHydratablesComponents;\n type OptionalDatumHydratables = OptionalDatumHydratablesWithoutComponents & OptionalDatumHydratablesComponents;\n export type DatumHydratables = RequiredDatumHydratables & OptionalDatumHydratables;\n\n // =============================================================================\n // Hydraters\n // =============================================================================\n export type PrimaryKeyHydraters = Hydraters<PrimaryKeyHydratables, [Datum]>;\n type HydratersMeta = { datumMeta: DatumInternalMeta; panelMetaInfo: PanelMetaInfo };\n type RequiredDatumHydraters = Hydraters<RequiredDatumHydratables, [Datum, HydratersMeta]>;\n type OptionalDatumHydraters = Hydraters<OptionalDatumHydratables, [Datum, HydratersMeta]>;\n\n type DatumHydraters = PrimaryKeyHydraters & RequiredDatumHydraters & OptionalDatumHydraters;\n\n // =============================================================================\n // Datum & Internals structures\n // =============================================================================\n export type ConfiguredDatum = DatumInternalMeta & { original: Datum };\n export interface ItemMeta extends PanelMetaInfo {\n datum: Datum;\n datumHydratables: DatumHydratables;\n datumInternalMeta: DatumInternalMeta;\n datumRenderFlags: DatumRenderFlags;\n withDragNDrop: boolean;\n useSortableHelpers?: ReturnType<typeof useSortable>;\n }\n\n // =============================================================================\n // Callbacks\n // =============================================================================\n type OnDataChange = (\n newData: Datum[],\n metainfo: {\n event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>;\n item?: Datum;\n selectedItems?: Datum[];\n },\n ) => void;\n\n type OnChangeEvent = (\n items: Datum[],\n metainfo: {\n event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>;\n },\n ) => void;\n\n type OnReorderEventMetadata = Omit<DnDKitTree.OnReorder<DSShuttleV2T.Datum>, 'considerExpanding'>;\n type OnReorderEvent = (movedItem: Datum, metadata: OnReorderEventMetadata) => void;\n\n export type SelectionMap = Record<string, boolean>;\n type OnSelectionChange = (\n newSelection: SelectionMap,\n metainfo: {\n event:\n | Parameters<Required<DSButtonT.Props>['onClick']>[0]\n | Parameters<DSControlledCheckboxT.InternalProps['onChange']>[1]\n | React.MouseEvent<HTMLButtonElement | HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>\n | React.ChangeEvent<HTMLInputElement>;\n item?: Datum;\n },\n ) => void;\n type OnSelectionDrilldown = (\n item: Datum,\n metainfo: { event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement> },\n ) => void;\n\n type OnLoadMore = (e: Parameters<Required<DSButtonT.Props>['onClick']>[0]) => void;\n type OnFilterChange = (\n newfilter: string | null,\n metainfo: { event: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement> },\n ) => void;\n type OnSearchbarOpen = (\n newfilter: boolean,\n metainfo: { event: Parameters<Required<DSButtonT.Props>['onClick']>[0] },\n ) => void;\n\n export type SoftDeletedMap = Record<string, boolean>;\n type OnSoftDeletedChange = (\n newSoftDeleted: SoftDeletedMap,\n metainfo: {\n event:\n | Parameters<Required<DSButtonT.Props>['onClick']>[0]\n | Parameters<DSControlledCheckboxT.InternalProps['onChange']>[1]\n | React.MouseEvent<HTMLButtonElement | HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>\n | React.ChangeEvent<HTMLInputElement>;\n item?: Datum;\n },\n ) => void;\n // =============================================================================\n // Final Props\n // =============================================================================\n export interface RequiredProps extends RequiredDatumHydraters, PrimaryKeyHydraters {\n sourceData: Datum[];\n sourceSelectedItems: SelectionMap;\n onSourceSelectionChange: OnSelectionChange;\n SourceHeader: React.ComponentType<unknown>;\n onSourceDrilldown: OnSelectionDrilldown;\n\n destinationData: Datum[];\n destinationSelectedItems: SelectionMap;\n onDestinationSelectionChange: OnSelectionChange;\n DestinationHeader: React.ComponentType<unknown>;\n onDestinationDrilldown: OnSelectionDrilldown;\n }\n\n export interface DefaultProps {\n // load-more and loaders\n sourceIsLoading: boolean;\n sourceWithLoadMore: boolean;\n sourceIsLoadingMore: boolean;\n onSourceLoadMore: OnLoadMore;\n destinationIsLoading: boolean;\n destinationWithLoadMore: boolean;\n destinationIsLoadingMore: boolean;\n onDestinationLoadMore: OnLoadMore;\n\n // switch side\n onSourceAdd: OnChangeEvent;\n onSourceRemove: OnChangeEvent;\n onDestinationAdd: OnChangeEvent;\n onDestinationRemove: OnChangeEvent;\n\n // dnd\n addDragAndDropFromSource: boolean;\n removeDragAndDropFromDestination: boolean;\n onSourceReorder: OnReorderEvent;\n onDestinationReorder: OnReorderEvent;\n\n // soft delete\n sourceSoftDeletedItems: SoftDeletedMap;\n onSourceSoftDelete: OnSoftDeletedChange;\n destinationSoftDeletedItems: SoftDeletedMap;\n onDestinationSoftDelete: OnSoftDeletedChange;\n }\n\n export interface OptionalProps extends OptionalDatumHydraters {\n sourceItemProps?: Record<string, unknown>;\n destinationItemProps?: Record<string, unknown>;\n\n // filtering\n sourceShowSearchbar?: boolean;\n destinationShowSearchbar?: boolean;\n onSourceOpenSearchbar?: OnSearchbarOpen;\n onDesinationOpenSearchbar?: OnSearchbarOpen;\n\n sourceFilterValue?: string;\n destinationFilterValue?: string;\n onSourceFilterChange?: OnFilterChange;\n onDestinationFilterChange?: OnFilterChange;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSShuttleV2T.DefaultProps = {\n addDragAndDropFromSource: false,\n removeDragAndDropFromDestination: false,\n\n sourceIsLoading: false,\n destinationIsLoading: false,\n sourceWithLoadMore: false,\n destinationWithLoadMore: false,\n sourceIsLoadingMore: false,\n destinationIsLoadingMore: false,\n onSourceLoadMore: () => {},\n onDestinationLoadMore: () => {},\n\n onSourceAdd: () => {},\n onDestinationAdd: () => {},\n onSourceRemove: () => {},\n onDestinationRemove: () => {},\n onSourceReorder: () => {},\n onDestinationReorder: () => {},\n\n sourceSoftDeletedItems: {},\n onSourceSoftDelete: () => {},\n destinationSoftDeletedItems: {},\n onDestinationSoftDelete: () => {},\n};\n\nconst DSShuttleV2PropTypes: DSPropTypesSchema<DSShuttleV2T.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n\n sourceData: PropTypes.arrayOf(PropTypes.object).description('hello!').isRequired,\n sourceSelectedItems: PropTypes.object.description('hello!').isRequired,\n onSourceSelectionChange: PropTypes.func.description('hello!').isRequired,\n SourceHeader: PropTypes.node.description('hello!').isRequired,\n onSourceDrilldown: PropTypes.func.description('hello!').isRequired,\n\n destinationData: PropTypes.arrayOf(PropTypes.object).description('hello!').isRequired,\n destinationSelectedItems: PropTypes.object.description('hello!').isRequired,\n onDestinationSelectionChange: PropTypes.func.description('hello!').isRequired,\n DestinationHeader: PropTypes.node.description('hello!').isRequired,\n onDestinationDrilldown: PropTypes.func.description('hello!').isRequired,\n\n getId: PropTypes.func.description('hello!').isRequired,\n getLabel: PropTypes.func.description('hello!').isRequired,\n};\nexport const DSShuttleV2PropTypesSchema = DSShuttleV2PropTypes as unknown as WeakValidationMap<DSShuttleV2T.Props>;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACIvB,SAAS,WAAW,2BAA2B,wBAAwB;AAyOhE,MAAM,eAA0C;AAA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,OAAO,UAAU,KAAK,YAAY,QAAQ,EAAE;AAAA,EAC5C,UAAU,UAAU,KAAK,YAAY,QAAQ,EAAE;AACjD;AACO,MAAM,6BAA6B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-shuttle-v2",
|
|
3
|
-
"version": "3.14.0-next.
|
|
3
|
+
"version": "3.14.0-next.11",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Shuttle v2",
|
|
6
6
|
"files": [
|
|
@@ -35,17 +35,19 @@
|
|
|
35
35
|
"indent": 4
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
+
"react-virtual": "~2.10.4",
|
|
38
39
|
"zustand": "4.1.4",
|
|
39
|
-
"@elliemae/ds-
|
|
40
|
-
"@elliemae/ds-
|
|
41
|
-
"@elliemae/ds-
|
|
42
|
-
"@elliemae/ds-
|
|
43
|
-
"@elliemae/ds-indeterminate-progress-indicator": "3.14.0-next.
|
|
44
|
-
"@elliemae/ds-icons": "3.14.0-next.
|
|
45
|
-
"@elliemae/ds-
|
|
46
|
-
"@elliemae/ds-
|
|
47
|
-
"@elliemae/ds-
|
|
48
|
-
"@elliemae/ds-
|
|
40
|
+
"@elliemae/ds-circular-progress-indicator": "3.14.0-next.11",
|
|
41
|
+
"@elliemae/ds-button-v2": "3.14.0-next.11",
|
|
42
|
+
"@elliemae/ds-grid": "3.14.0-next.11",
|
|
43
|
+
"@elliemae/ds-form-input-text": "3.14.0-next.11",
|
|
44
|
+
"@elliemae/ds-indeterminate-progress-indicator": "3.14.0-next.11",
|
|
45
|
+
"@elliemae/ds-icons": "3.14.0-next.11",
|
|
46
|
+
"@elliemae/ds-typography": "3.14.0-next.11",
|
|
47
|
+
"@elliemae/ds-form-checkbox": "3.14.0-next.11",
|
|
48
|
+
"@elliemae/ds-drag-and-drop": "3.14.0-next.11",
|
|
49
|
+
"@elliemae/ds-utilities": "3.14.0-next.11",
|
|
50
|
+
"@elliemae/ds-system": "3.14.0-next.11"
|
|
49
51
|
},
|
|
50
52
|
"devDependencies": {
|
|
51
53
|
"lodash": "^4.17.21",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/config/useStore/createAtomInStore.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { type StoreApi } from 'zustand';\nimport type { InternalAtoms, Store } from './useStore';\n\ntype StateSetterNewVal =\n | InternalAtoms[keyof InternalAtoms][0]\n | ((oldVal: InternalAtoms[keyof InternalAtoms][0]) => InternalAtoms[keyof InternalAtoms][0]);\nexport const createAtomInStore = (\n defaultVal: InternalAtoms[keyof InternalAtoms][0],\n stateKey: keyof InternalAtoms,\n set: StoreApi<Store>['setState'],\n get: StoreApi<Store>['getState'],\n) => {\n const stateSetter = (newVal: StateSetterNewVal) => {\n if (typeof newVal === 'function') set({ [stateKey]: [newVal(get()[stateKey][0]), stateSetter] });\n else set({ [stateKey]: [newVal, stateSetter] });\n };\n return [defaultVal, stateSetter] as const;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADMhB,MAAM,oBAAoB,CAC/B,YACA,UACA,KACA,QACG;AACH,QAAM,cAAc,CAAC,WAA8B;AACjD,QAAI,OAAO,WAAW;AAAY,UAAI,EAAE,CAAC,WAAW,CAAC,OAAO,IAAI,EAAE,UAAU,EAAE,GAAG,WAAW,EAAE,CAAC;AAAA;AAC1F,UAAI,EAAE,CAAC,WAAW,CAAC,QAAQ,WAAW,EAAE,CAAC;AAAA,EAChD;AACA,SAAO,CAAC,YAAY,WAAW;AACjC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/parts/Panel/middle/ItemListWrapper.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { styled } from '@elliemae/ds-system';\nimport { useInternalStore, usePropsStore } from '../../../config/useStore';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types';\nimport { ItemSortable } from '../../Item/Item';\nimport { withConditionalDnDRowContext } from '../../HoC/withConditionalDnDRowContext';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../config/DSShuttleV2Definitions';\n\nconst StyledItemsWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEMS_WRAPPER })`\n position: relative;\n\n // .ds-shuttle-v2-move-multiple-wrapper {\n // top: 2px;\n // right: 2px;\n // height: calc(100% - 4px);\n // width: calc(65px - 2px);\n // }\n`;\n\nconst ItemListWrapper = React.memo((panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => {\n const { isDestinationPanel } = panelMetaInfo;\n const itemList = useInternalStore((state) =>\n isDestinationPanel ? state.destinationConfiguredData : state.sourceConfiguredData,\n );\n\n const totalSize = useInternalStore((state) =>\n isDestinationPanel ? state.destinationTotalSize : state.sourceTotalSize,\n );\n\n const virtualItems = useInternalStore((state) =>\n isDestinationPanel ? state.destinationVirtualItems : state.sourceVirtualItems,\n );\n\n const withDragNDrop = usePropsStore((state) =>\n isDestinationPanel ? !state.removeDragAndDropFromDestination : state.addDragAndDropFromSource,\n );\n\n const rows = React.useMemo(\n () => [`repeat(${itemList?.length ? itemList?.length : '0'},min-content)`],\n [itemList.length],\n );\n\n return (\n <StyledItemsWrapper alignItems=\"flex-start\" rows={rows} style={{ height: `${totalSize}px` }}>\n {virtualItems?.map((virtualRow) => {\n const item = itemList[virtualRow.index];\n return (\n <div\n key={virtualRow.index}\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: `${virtualRow.size}px`,\n transform: `translateY(${virtualRow.start}px)`,\n }}\n >\n <ItemSortable\n key={item.original.id}\n item={item}\n isDestinationPanel={isDestinationPanel}\n withDragNDrop={withDragNDrop}\n />\n </div>\n );\n })}\n </StyledItemsWrapper>\n );\n});\n\nexport const ItemListWrapperWithContext = withConditionalDnDRowContext(ItemListWrapper);\nexport default ItemListWrapperWithContext;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD2DX;AA3DZ,mBAAkB;AAClB,qBAAqB;AACrB,uBAAuB;AACvB,sBAAgD;AAEhD,kBAA6B;AAC7B,0CAA6C;AAC7C,oCAAkD;AAElD,MAAM,yBAAqB,yBAAO,qBAAM,EAAE,MAAM,+CAAiB,MAAM,+CAAiB,cAAc,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWvG,MAAM,kBAAkB,aAAAA,QAAM,KAAK,CAAC,kBAA8C;AAChF,QAAM,EAAE,mBAAmB,IAAI;AAC/B,QAAM,eAAW;AAAA,IAAiB,CAAC,UACjC,qBAAqB,MAAM,4BAA4B,MAAM;AAAA,EAC/D;AAEA,QAAM,gBAAY;AAAA,IAAiB,CAAC,UAClC,qBAAqB,MAAM,uBAAuB,MAAM;AAAA,EAC1D;AAEA,QAAM,mBAAe;AAAA,IAAiB,CAAC,UACrC,qBAAqB,MAAM,0BAA0B,MAAM;AAAA,EAC7D;AAEA,QAAM,oBAAgB;AAAA,IAAc,CAAC,UACnC,qBAAqB,CAAC,MAAM,mCAAmC,MAAM;AAAA,EACvE;AAEA,QAAM,OAAO,aAAAA,QAAM;AAAA,IACjB,MAAM,CAAC,UAAU,UAAU,SAAS,UAAU,SAAS,kBAAkB;AAAA,IACzE,CAAC,SAAS,MAAM;AAAA,EAClB;AAEA,SACE,4CAAC,sBAAmB,YAAW,cAAa,MAAY,OAAO,EAAE,QAAQ,GAAG,cAAc,GACvF,wBAAc,IAAI,CAAC,eAAe;AACjC,UAAM,OAAO,SAAS,WAAW;AACjC,WACE;AAAA,MAAC;AAAA;AAAA,QAEC,OAAO;AAAA,UACL,UAAU;AAAA,UACV,KAAK;AAAA,UACL,MAAM;AAAA,UACN,OAAO;AAAA,UACP,QAAQ,GAAG,WAAW;AAAA,UACtB,WAAW,cAAc,WAAW;AAAA,QACtC;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YAEC;AAAA,YACA;AAAA,YACA;AAAA;AAAA,UAHK,KAAK,SAAS;AAAA,QAIrB;AAAA;AAAA,MAfK,WAAW;AAAA,IAgBlB;AAAA,EAEJ,CAAC,GACH;AAEJ,CAAC;AAEM,MAAM,iCAA6B,kEAA6B,eAAe;AACtF,IAAO,0BAAQ;",
|
|
6
|
-
"names": ["React"]
|
|
7
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
const createAtomInStore = (defaultVal, stateKey, set, get) => {
|
|
3
|
-
const stateSetter = (newVal) => {
|
|
4
|
-
if (typeof newVal === "function")
|
|
5
|
-
set({ [stateKey]: [newVal(get()[stateKey][0]), stateSetter] });
|
|
6
|
-
else
|
|
7
|
-
set({ [stateKey]: [newVal, stateSetter] });
|
|
8
|
-
};
|
|
9
|
-
return [defaultVal, stateSetter];
|
|
10
|
-
};
|
|
11
|
-
export {
|
|
12
|
-
createAtomInStore
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=createAtomInStore.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/config/useStore/createAtomInStore.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { type StoreApi } from 'zustand';\nimport type { InternalAtoms, Store } from './useStore';\n\ntype StateSetterNewVal =\n | InternalAtoms[keyof InternalAtoms][0]\n | ((oldVal: InternalAtoms[keyof InternalAtoms][0]) => InternalAtoms[keyof InternalAtoms][0]);\nexport const createAtomInStore = (\n defaultVal: InternalAtoms[keyof InternalAtoms][0],\n stateKey: keyof InternalAtoms,\n set: StoreApi<Store>['setState'],\n get: StoreApi<Store>['getState'],\n) => {\n const stateSetter = (newVal: StateSetterNewVal) => {\n if (typeof newVal === 'function') set({ [stateKey]: [newVal(get()[stateKey][0]), stateSetter] });\n else set({ [stateKey]: [newVal, stateSetter] });\n };\n return [defaultVal, stateSetter] as const;\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACMhB,MAAM,oBAAoB,CAC/B,YACA,UACA,KACA,QACG;AACH,QAAM,cAAc,CAAC,WAA8B;AACjD,QAAI,OAAO,WAAW;AAAY,UAAI,EAAE,CAAC,WAAW,CAAC,OAAO,IAAI,EAAE,UAAU,EAAE,GAAG,WAAW,EAAE,CAAC;AAAA;AAC1F,UAAI,EAAE,CAAC,WAAW,CAAC,QAAQ,WAAW,EAAE,CAAC;AAAA,EAChD;AACA,SAAO,CAAC,YAAY,WAAW;AACjC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/Panel/middle/ItemListWrapper.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 { useInternalStore, usePropsStore } from '../../../config/useStore';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types';\nimport { ItemSortable } from '../../Item/Item';\nimport { withConditionalDnDRowContext } from '../../HoC/withConditionalDnDRowContext';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../config/DSShuttleV2Definitions';\n\nconst StyledItemsWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEMS_WRAPPER })`\n position: relative;\n\n // .ds-shuttle-v2-move-multiple-wrapper {\n // top: 2px;\n // right: 2px;\n // height: calc(100% - 4px);\n // width: calc(65px - 2px);\n // }\n`;\n\nconst ItemListWrapper = React.memo((panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => {\n const { isDestinationPanel } = panelMetaInfo;\n const itemList = useInternalStore((state) =>\n isDestinationPanel ? state.destinationConfiguredData : state.sourceConfiguredData,\n );\n\n const totalSize = useInternalStore((state) =>\n isDestinationPanel ? state.destinationTotalSize : state.sourceTotalSize,\n );\n\n const virtualItems = useInternalStore((state) =>\n isDestinationPanel ? state.destinationVirtualItems : state.sourceVirtualItems,\n );\n\n const withDragNDrop = usePropsStore((state) =>\n isDestinationPanel ? !state.removeDragAndDropFromDestination : state.addDragAndDropFromSource,\n );\n\n const rows = React.useMemo(\n () => [`repeat(${itemList?.length ? itemList?.length : '0'},min-content)`],\n [itemList.length],\n );\n\n return (\n <StyledItemsWrapper alignItems=\"flex-start\" rows={rows} style={{ height: `${totalSize}px` }}>\n {virtualItems?.map((virtualRow) => {\n const item = itemList[virtualRow.index];\n return (\n <div\n key={virtualRow.index}\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: `${virtualRow.size}px`,\n transform: `translateY(${virtualRow.start}px)`,\n }}\n >\n <ItemSortable\n key={item.original.id}\n item={item}\n isDestinationPanel={isDestinationPanel}\n withDragNDrop={withDragNDrop}\n />\n </div>\n );\n })}\n </StyledItemsWrapper>\n );\n});\n\nexport const ItemListWrapperWithContext = withConditionalDnDRowContext(ItemListWrapper);\nexport default ItemListWrapperWithContext;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;AC2DX;AA3DZ,OAAOA,YAAW;AAClB,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,SAAS,kBAAkB,qBAAqB;AAEhD,SA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