@elliemae/ds-shuttle-v2 3.55.0-next.9 → 3.55.2

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/config/itemMovementHelpers.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable complexity */\n/* eslint-disable max-statements */\nimport React from 'react';\nimport { type DSButtonT } from '@elliemae/ds-button-v2';\nimport { type DSShuttleV2T } from '../react-desc-prop-types.js';\nimport { usePropsStore } from './useStore/index.js';\n\nexport const useHandleMoveSelection = ({ isDestinationPanel }: DSShuttleV2T.PanelMetaInfo) => {\n const currOnRemove = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationRemove : state.onSourceRemove,\n );\n const currSoftDeletedItems = usePropsStore((state) =>\n isDestinationPanel ? state.destinationSoftDeletedItems : state.sourceSoftDeletedItems,\n );\n const currOnSoftDelete = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationSoftDelete : state.onSourceSoftDelete,\n );\n const otherSoftDeletedItems = usePropsStore((state) =>\n isDestinationPanel ? state.sourceSoftDeletedItems : state.destinationSoftDeletedItems,\n );\n const otherOnSoftDelete = usePropsStore((state) =>\n isDestinationPanel ? state.onSourceSoftDelete : state.onDestinationSoftDelete,\n );\n const currSelectionMap = usePropsStore((store) =>\n isDestinationPanel ? store.destinationSelectionArray : store.sourceSelectionArray,\n );\n const currOnSelectionChange = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationSelectionChange : state.onSourceSelectionChange,\n );\n\n const otherPanelOnAdd = usePropsStore((state) => (isDestinationPanel ? state.onSourceAdd : state.onDestinationAdd));\n\n const destinationSelectionArray = usePropsStore((store) => store.destinationSelectionItemArray);\n const sourceSelectionArray = usePropsStore((store) => store.sourceSelectionItemArray);\n const selectedItems = isDestinationPanel ? destinationSelectionArray : sourceSelectionArray;\n\n const moveSelection = React.useCallback(\n (event: Parameters<Required<DSButtonT.Props>['onClick']>[0]) => {\n event.preventDefault();\n event.stopPropagation();\n // movement\n currOnRemove(selectedItems, { event });\n otherPanelOnAdd(selectedItems, { event });\n // soft delete\n const currSoftDeletedMap: DSShuttleV2T.SoftDeletedMap = {};\n const otherSoftDeletedMap: DSShuttleV2T.SoftDeletedMap = {};\n currSelectionMap.forEach((id) => {\n currSoftDeletedMap[id] = true;\n otherSoftDeletedMap[id] = false;\n });\n currOnSoftDelete({ ...currSoftDeletedItems, ...currSoftDeletedMap }, { event });\n otherOnSoftDelete({ ...otherSoftDeletedItems, ...otherSoftDeletedMap }, { event });\n // cleanup\n currOnSelectionChange({}, { event });\n },\n [\n currOnRemove,\n selectedItems,\n otherPanelOnAdd,\n currSelectionMap,\n currOnSoftDelete,\n currSoftDeletedItems,\n otherOnSoftDelete,\n otherSoftDeletedItems,\n currOnSelectionChange,\n ],\n );\n return React.useMemo(() => ({ moveSelection }), [moveSelection]);\n};\n\nexport const useHandleMoveItem = ({ datum, datumInternalMeta, isDestinationPanel }: DSShuttleV2T.ItemMeta) => {\n const currSoftDeletedItems = usePropsStore((state) =>\n isDestinationPanel ? state.destinationSoftDeletedItems : state.sourceSoftDeletedItems,\n );\n const otherSoftDeletedItems = usePropsStore((state) =>\n isDestinationPanel ? state.sourceSoftDeletedItems : state.destinationSoftDeletedItems,\n );\n const currOnSoftDelete = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationSoftDelete : state.onSourceSoftDelete,\n );\n const otherOnSoftDelete = usePropsStore((state) =>\n isDestinationPanel ? state.onSourceSoftDelete : state.onDestinationSoftDelete,\n );\n\n const currOnRemove = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationRemove : state.onSourceRemove,\n );\n const otherPanelOnAdd = usePropsStore((state) => (isDestinationPanel ? state.onSourceAdd : state.onDestinationAdd));\n\n const moveItem = React.useCallback(\n (event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => {\n event.preventDefault();\n event.stopPropagation();\n currOnRemove([datum], { event });\n otherPanelOnAdd([datum], { event });\n currOnSoftDelete({ ...currSoftDeletedItems, [datumInternalMeta.hydratedId]: true }, { event });\n otherOnSoftDelete({ ...otherSoftDeletedItems, [datumInternalMeta.hydratedId]: false }, { event });\n },\n [\n currOnRemove,\n currOnSoftDelete,\n currSoftDeletedItems,\n datum,\n datumInternalMeta.hydratedId,\n otherOnSoftDelete,\n otherPanelOnAdd,\n otherSoftDeletedItems,\n ],\n );\n return moveItem;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAAkB;AAGlB,sBAA8B;AAEvB,MAAM,yBAAyB,CAAC,EAAE,mBAAmB,MAAkC;AAC5F,QAAM,mBAAe;AAAA,IAAc,CAAC,UAClC,qBAAqB,MAAM,sBAAsB,MAAM;AAAA,EACzD;AACA,QAAM,2BAAuB;AAAA,IAAc,CAAC,UAC1C,qBAAqB,MAAM,8BAA8B,MAAM;AAAA,EACjE;AACA,QAAM,uBAAmB;AAAA,IAAc,CAAC,UACtC,qBAAqB,MAAM,0BAA0B,MAAM;AAAA,EAC7D;AACA,QAAM,4BAAwB;AAAA,IAAc,CAAC,UAC3C,qBAAqB,MAAM,yBAAyB,MAAM;AAAA,EAC5D;AACA,QAAM,wBAAoB;AAAA,IAAc,CAAC,UACvC,qBAAqB,MAAM,qBAAqB,MAAM;AAAA,EACxD;AACA,QAAM,uBAAmB;AAAA,IAAc,CAAC,UACtC,qBAAqB,MAAM,4BAA4B,MAAM;AAAA,EAC/D;AACA,QAAM,4BAAwB;AAAA,IAAc,CAAC,UAC3C,qBAAqB,MAAM,+BAA+B,MAAM;AAAA,EAClE;AAEA,QAAM,sBAAkB,+BAAc,CAAC,UAAW,qBAAqB,MAAM,cAAc,MAAM,gBAAiB;AAElH,QAAM,gCAA4B,+B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AAC,UACvC,qBAAqB,MAAM,qBAAqB,MAAM;AAAA,EACxD;AAEA,QAAM,mBAAe;AAAA,IAAc,CAAC,UAClC,qBAAqB,MAAM,sBAAsB,MAAM;AAAA,EACzD;AACA,QAAM,sBAAkB,+BAAc,CAAC,UAAW,qBAAqB,MAAM,cAAc,MAAM,gBAAiB;AAElH,QAAM,WAAW,aAAAA,QAAM;AAAA,IACrB,CAAC,UAAwF;AACvF,YAAM,eAAe;AACrB,YAAM,gBAAgB;AACtB,mBAAa,CAAC,KAAK,GAAG,EAAE,MAAM,CAAC;AAC/B,sBAAgB,CAAC,KAAK,GAAG,EAAE,MAAM,CAAC;AAClC,uBAAiB,EAAE,GAAG,sBAAsB,CAAC,kBAAkB,UAAU,GAAG,KAAK,GAAG,EAAE,MAAM,CAAC;AAC7F,wBAAkB,EAAE,GAAG,uBAAuB,CAAC,kBAAkB,UAAU,GAAG,MAAM,GAAG,EAAE,MAAM,CAAC;AAAA,IAClG;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,kBAAkB;AAAA,MAClB;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;",
4
+ "sourcesContent": ["/* eslint-disable complexity */\n/* eslint-disable max-statements */\nimport React from 'react';\nimport { type DSButtonT } from '@elliemae/ds-button-v2';\nimport { type DSShuttleV2T } from '../react-desc-prop-types.js';\nimport { usePropsStore } from './useStore/index.js';\n\nexport const useHandleMoveSelection = ({ isDestinationPanel }: DSShuttleV2T.PanelMetaInfo) => {\n const currOnRemove = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationRemove : state.onSourceRemove,\n );\n const currSoftDeletedItems = usePropsStore((state) =>\n isDestinationPanel ? state.destinationSoftDeletedItems : state.sourceSoftDeletedItems,\n );\n const currOnSoftDelete = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationSoftDelete : state.onSourceSoftDelete,\n );\n const otherSoftDeletedItems = usePropsStore((state) =>\n isDestinationPanel ? state.sourceSoftDeletedItems : state.destinationSoftDeletedItems,\n );\n const otherOnSoftDelete = usePropsStore((state) =>\n isDestinationPanel ? state.onSourceSoftDelete : state.onDestinationSoftDelete,\n );\n const currSelectionMap = usePropsStore((store) =>\n isDestinationPanel ? store.destinationSelectionArray : store.sourceSelectionArray,\n );\n const currOnSelectionChange = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationSelectionChange : state.onSourceSelectionChange,\n );\n\n const otherPanelOnAdd = usePropsStore((state) => (isDestinationPanel ? state.onSourceAdd : state.onDestinationAdd));\n\n const destinationSelectionArray = usePropsStore((store) => store.destinationSelectionItemArray);\n const sourceSelectionArray = usePropsStore((store) => store.sourceSelectionItemArray);\n const selectedItems = isDestinationPanel ? destinationSelectionArray : sourceSelectionArray;\n\n const moveSelection = React.useCallback(\n (event: Parameters<Required<DSButtonT.Props>['onClick']>[0]) => {\n event.preventDefault();\n event.stopPropagation();\n // movement\n currOnRemove(selectedItems, { event });\n otherPanelOnAdd(selectedItems, { event });\n // soft delete\n const currSoftDeletedMap: DSShuttleV2T.SoftDeletedMap = {};\n const otherSoftDeletedMap: DSShuttleV2T.SoftDeletedMap = {};\n currSelectionMap.forEach((id) => {\n currSoftDeletedMap[id] = true;\n otherSoftDeletedMap[id] = false;\n });\n currOnSoftDelete({ ...currSoftDeletedItems, ...currSoftDeletedMap }, { event });\n otherOnSoftDelete({ ...otherSoftDeletedItems, ...otherSoftDeletedMap }, { event });\n // cleanup\n currOnSelectionChange({}, { event });\n },\n [\n currOnRemove,\n selectedItems,\n otherPanelOnAdd,\n currSelectionMap,\n currOnSoftDelete,\n currSoftDeletedItems,\n otherOnSoftDelete,\n otherSoftDeletedItems,\n currOnSelectionChange,\n ],\n );\n return React.useMemo(() => ({ moveSelection: moveSelection }), [moveSelection]);\n};\n\nexport const useHandleMoveItem = ({ datum, datumInternalMeta, isDestinationPanel }: DSShuttleV2T.ItemMeta) => {\n const currSoftDeletedItems = usePropsStore((state) =>\n isDestinationPanel ? state.destinationSoftDeletedItems : state.sourceSoftDeletedItems,\n );\n const otherSoftDeletedItems = usePropsStore((state) =>\n isDestinationPanel ? state.sourceSoftDeletedItems : state.destinationSoftDeletedItems,\n );\n const currOnSoftDelete = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationSoftDelete : state.onSourceSoftDelete,\n );\n const otherOnSoftDelete = usePropsStore((state) =>\n isDestinationPanel ? state.onSourceSoftDelete : state.onDestinationSoftDelete,\n );\n\n const currOnRemove = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationRemove : state.onSourceRemove,\n );\n const otherPanelOnAdd = usePropsStore((state) => (isDestinationPanel ? state.onSourceAdd : state.onDestinationAdd));\n\n const moveItem = React.useCallback(\n (event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => {\n event.preventDefault();\n event.stopPropagation();\n currOnRemove([datum], { event });\n otherPanelOnAdd([datum], { event });\n currOnSoftDelete({ ...currSoftDeletedItems, [datumInternalMeta.hydratedId]: true }, { event });\n otherOnSoftDelete({ ...otherSoftDeletedItems, [datumInternalMeta.hydratedId]: false }, { event });\n },\n [\n currOnRemove,\n currOnSoftDelete,\n currSoftDeletedItems,\n datum,\n datumInternalMeta.hydratedId,\n otherOnSoftDelete,\n otherPanelOnAdd,\n otherSoftDeletedItems,\n ],\n );\n return moveItem;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAAkB;AAGlB,sBAA8B;AAEvB,MAAM,yBAAyB,CAAC,EAAE,mBAAmB,MAAkC;AAC5F,QAAM,mBAAe;AAAA,IAAc,CAAC,UAClC,qBAAqB,MAAM,sBAAsB,MAAM;AAAA,EACzD;AACA,QAAM,2BAAuB;AAAA,IAAc,CAAC,UAC1C,qBAAqB,MAAM,8BAA8B,MAAM;AAAA,EACjE;AACA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AAA,IACF;AAAA,EACF;AACA,SAAO;AACT;",
6
6
  "names": ["React"]
7
7
  }
@@ -79,6 +79,7 @@ const useItemArrowNavigation = (itemMeta) => {
79
79
  if (key === "ArrowDown") {
80
80
  trackFocusNextItem(itemMeta);
81
81
  trackFocusActionParent();
82
+ return;
82
83
  }
83
84
  },
84
85
  [
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/parts/Item/useItemArrowNavigation.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* 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 }\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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAAkB;AAClB,6BAIO;AAEP,sBAAiC;AAE1B,MAAM,yBAAyB,CAAC,aAAoC;AACzE,QAAM,EAAE,kCAAkC,QAAI,+CAAuB;AACrE,QAAM,EAAE,oBAAoB,oBAAoB,oBAAoB,QAAI,4CAAoB;AAC5F,QAAM,EAAE,sBAAsB,sBAAsB,wBAAwB,sBAAsB,QAChG,+CAAuB;AACzB,QAAM,EAAE,sBAAsB,mBAAmB,IAAI;AAErD,QAAM,gCAA4B,kCAAiB,CAAC,UAAU,MAAM,yBAAyB;AAE7F,QAAM,yBAAyB,aAAAA,QAAM;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,EAAG,GAAE,eAAe;AACxF,UAAI,CAAC,WAAW,aAAa,aAAa,YAAY,EAAE,SAAS,GAAG,EAAG,GAAE,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;AAAA,MACzB;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,SAAO,aAAAA,QAAM,QAAQ,OAAO,EAAE,uBAAuB,IAAI,CAAC,sBAAsB,CAAC;AACnF;",
4
+ "sourcesContent": ["/* 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(() => ({ onItemContain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vB,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,SAAO,aAAAA,QAAM,QAAQ,OAAO,EAAE,uBAAuB,IAAI,CAAC,sBAAsB,CAAC;AACnF;",
6
6
  "names": ["React"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/itemMovementHelpers.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable max-statements */\nimport React from 'react';\nimport { type DSButtonT } from '@elliemae/ds-button-v2';\nimport { type DSShuttleV2T } from '../react-desc-prop-types.js';\nimport { usePropsStore } from './useStore/index.js';\n\nexport const useHandleMoveSelection = ({ isDestinationPanel }: DSShuttleV2T.PanelMetaInfo) => {\n const currOnRemove = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationRemove : state.onSourceRemove,\n );\n const currSoftDeletedItems = usePropsStore((state) =>\n isDestinationPanel ? state.destinationSoftDeletedItems : state.sourceSoftDeletedItems,\n );\n const currOnSoftDelete = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationSoftDelete : state.onSourceSoftDelete,\n );\n const otherSoftDeletedItems = usePropsStore((state) =>\n isDestinationPanel ? state.sourceSoftDeletedItems : state.destinationSoftDeletedItems,\n );\n const otherOnSoftDelete = usePropsStore((state) =>\n isDestinationPanel ? state.onSourceSoftDelete : state.onDestinationSoftDelete,\n );\n const currSelectionMap = usePropsStore((store) =>\n isDestinationPanel ? store.destinationSelectionArray : store.sourceSelectionArray,\n );\n const currOnSelectionChange = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationSelectionChange : state.onSourceSelectionChange,\n );\n\n const otherPanelOnAdd = usePropsStore((state) => (isDestinationPanel ? state.onSourceAdd : state.onDestinationAdd));\n\n const destinationSelectionArray = usePropsStore((store) => store.destinationSelectionItemArray);\n const sourceSelectionArray = usePropsStore((store) => store.sourceSelectionItemArray);\n const selectedItems = isDestinationPanel ? destinationSelectionArray : sourceSelectionArray;\n\n const moveSelection = React.useCallback(\n (event: Parameters<Required<DSButtonT.Props>['onClick']>[0]) => {\n event.preventDefault();\n event.stopPropagation();\n // movement\n currOnRemove(selectedItems, { event });\n otherPanelOnAdd(selectedItems, { event });\n // soft delete\n const currSoftDeletedMap: DSShuttleV2T.SoftDeletedMap = {};\n const otherSoftDeletedMap: DSShuttleV2T.SoftDeletedMap = {};\n currSelectionMap.forEach((id) => {\n currSoftDeletedMap[id] = true;\n otherSoftDeletedMap[id] = false;\n });\n currOnSoftDelete({ ...currSoftDeletedItems, ...currSoftDeletedMap }, { event });\n otherOnSoftDelete({ ...otherSoftDeletedItems, ...otherSoftDeletedMap }, { event });\n // cleanup\n currOnSelectionChange({}, { event });\n },\n [\n currOnRemove,\n selectedItems,\n otherPanelOnAdd,\n currSelectionMap,\n currOnSoftDelete,\n currSoftDeletedItems,\n otherOnSoftDelete,\n otherSoftDeletedItems,\n currOnSelectionChange,\n ],\n );\n return React.useMemo(() => ({ moveSelection }), [moveSelection]);\n};\n\nexport const useHandleMoveItem = ({ datum, datumInternalMeta, isDestinationPanel }: DSShuttleV2T.ItemMeta) => {\n const currSoftDeletedItems = usePropsStore((state) =>\n isDestinationPanel ? state.destinationSoftDeletedItems : state.sourceSoftDeletedItems,\n );\n const otherSoftDeletedItems = usePropsStore((state) =>\n isDestinationPanel ? state.sourceSoftDeletedItems : state.destinationSoftDeletedItems,\n );\n const currOnSoftDelete = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationSoftDelete : state.onSourceSoftDelete,\n );\n const otherOnSoftDelete = usePropsStore((state) =>\n isDestinationPanel ? state.onSourceSoftDelete : state.onDestinationSoftDelete,\n );\n\n const currOnRemove = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationRemove : state.onSourceRemove,\n );\n const otherPanelOnAdd = usePropsStore((state) => (isDestinationPanel ? state.onSourceAdd : state.onDestinationAdd));\n\n const moveItem = React.useCallback(\n (event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => {\n event.preventDefault();\n event.stopPropagation();\n currOnRemove([datum], { event });\n otherPanelOnAdd([datum], { event });\n currOnSoftDelete({ ...currSoftDeletedItems, [datumInternalMeta.hydratedId]: true }, { event });\n otherOnSoftDelete({ ...otherSoftDeletedItems, [datumInternalMeta.hydratedId]: false }, { event });\n },\n [\n currOnRemove,\n currOnSoftDelete,\n currSoftDeletedItems,\n datum,\n datumInternalMeta.hydratedId,\n otherOnSoftDelete,\n otherPanelOnAdd,\n otherSoftDeletedItems,\n ],\n );\n return moveItem;\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACEvB,OAAOA,YAAW;AAGlB,SAAS,qBAAqB;AAEvB,MAAM,yBAAyB,CAAC,EAAE,mBAAmB,MAAkC;AAC5F,QAAM,eAAe;AAAA,IAAc,CAAC,UAClC,qBAAqB,MAAM,sBAAsB,MAAM;AAAA,EACzD;AACA,QAAM,uBAAuB;AAAA,IAAc,CAAC,UAC1C,qBAAqB,MAAM,8BAA8B,MAAM;AAAA,EACjE;AACA,QAAM,mBAAmB;AAAA,IAAc,CAAC,UACtC,qBAAqB,MAAM,0BAA0B,MAAM;AAAA,EAC7D;AACA,QAAM,wBAAwB;AAAA,IAAc,CAAC,UAC3C,qBAAqB,MAAM,yBAAyB,MAAM;AAAA,EAC5D;AACA,QAAM,oBAAoB;AAAA,IAAc,CAAC,UACvC,qBAAqB,MAAM,qBAAqB,MAAM;AAAA,EACxD;AACA,QAAM,mBAAmB;AAAA,IAAc,CAAC,UACtC,qBAAqB,MAAM,4BAA4B,MAAM;AAAA,EAC/D;AACA,QAAM,wBAAwB;AAAA,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AyB,MAAM;AAAA,EAC5D;AACA,QAAM,mBAAmB;AAAA,IAAc,CAAC,UACtC,qBAAqB,MAAM,0BAA0B,MAAM;AAAA,EAC7D;AACA,QAAM,oBAAoB;AAAA,IAAc,CAAC,UACvC,qBAAqB,MAAM,qBAAqB,MAAM;AAAA,EACxD;AAEA,QAAM,eAAe;AAAA,IAAc,CAAC,UAClC,qBAAqB,MAAM,sBAAsB,MAAM;AAAA,EACzD;AACA,QAAM,kBAAkB,cAAc,CAAC,UAAW,qBAAqB,MAAM,cAAc,MAAM,gBAAiB;AAElH,QAAM,WAAWA,OAAM;AAAA,IACrB,CAAC,UAAwF;AACvF,YAAM,eAAe;AACrB,YAAM,gBAAgB;AACtB,mBAAa,CAAC,KAAK,GAAG,EAAE,MAAM,CAAC;AAC/B,sBAAgB,CAAC,KAAK,GAAG,EAAE,MAAM,CAAC;AAClC,uBAAiB,EAAE,GAAG,sBAAsB,CAAC,kBAAkB,UAAU,GAAG,KAAK,GAAG,EAAE,MAAM,CAAC;AAC7F,wBAAkB,EAAE,GAAG,uBAAuB,CAAC,kBAAkB,UAAU,GAAG,MAAM,GAAG,EAAE,MAAM,CAAC;AAAA,IAClG;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,kBAAkB;AAAA,MAClB;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable max-statements */\nimport React from 'react';\nimport { type DSButtonT } from '@elliemae/ds-button-v2';\nimport { type DSShuttleV2T } from '../react-desc-prop-types.js';\nimport { usePropsStore } from './useStore/index.js';\n\nexport const useHandleMoveSelection = ({ isDestinationPanel }: DSShuttleV2T.PanelMetaInfo) => {\n const currOnRemove = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationRemove : state.onSourceRemove,\n );\n const currSoftDeletedItems = usePropsStore((state) =>\n isDestinationPanel ? state.destinationSoftDeletedItems : state.sourceSoftDeletedItems,\n );\n const currOnSoftDelete = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationSoftDelete : state.onSourceSoftDelete,\n );\n const otherSoftDeletedItems = usePropsStore((state) =>\n isDestinationPanel ? state.sourceSoftDeletedItems : state.destinationSoftDeletedItems,\n );\n const otherOnSoftDelete = usePropsStore((state) =>\n isDestinationPanel ? state.onSourceSoftDelete : state.onDestinationSoftDelete,\n );\n const currSelectionMap = usePropsStore((store) =>\n isDestinationPanel ? store.destinationSelectionArray : store.sourceSelectionArray,\n );\n const currOnSelectionChange = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationSelectionChange : state.onSourceSelectionChange,\n );\n\n const otherPanelOnAdd = usePropsStore((state) => (isDestinationPanel ? state.onSourceAdd : state.onDestinationAdd));\n\n const destinationSelectionArray = usePropsStore((store) => store.destinationSelectionItemArray);\n const sourceSelectionArray = usePropsStore((store) => store.sourceSelectionItemArray);\n const selectedItems = isDestinationPanel ? destinationSelectionArray : sourceSelectionArray;\n\n const moveSelection = React.useCallback(\n (event: Parameters<Required<DSButtonT.Props>['onClick']>[0]) => {\n event.preventDefault();\n event.stopPropagation();\n // movement\n currOnRemove(selectedItems, { event });\n otherPanelOnAdd(selectedItems, { event });\n // soft delete\n const currSoftDeletedMap: DSShuttleV2T.SoftDeletedMap = {};\n const otherSoftDeletedMap: DSShuttleV2T.SoftDeletedMap = {};\n currSelectionMap.forEach((id) => {\n currSoftDeletedMap[id] = true;\n otherSoftDeletedMap[id] = false;\n });\n currOnSoftDelete({ ...currSoftDeletedItems, ...currSoftDeletedMap }, { event });\n otherOnSoftDelete({ ...otherSoftDeletedItems, ...otherSoftDeletedMap }, { event });\n // cleanup\n currOnSelectionChange({}, { event });\n },\n [\n currOnRemove,\n selectedItems,\n otherPanelOnAdd,\n currSelectionMap,\n currOnSoftDelete,\n currSoftDeletedItems,\n otherOnSoftDelete,\n otherSoftDeletedItems,\n currOnSelectionChange,\n ],\n );\n return React.useMemo(() => ({ moveSelection: moveSelection }), [moveSelection]);\n};\n\nexport const useHandleMoveItem = ({ datum, datumInternalMeta, isDestinationPanel }: DSShuttleV2T.ItemMeta) => {\n const currSoftDeletedItems = usePropsStore((state) =>\n isDestinationPanel ? state.destinationSoftDeletedItems : state.sourceSoftDeletedItems,\n );\n const otherSoftDeletedItems = usePropsStore((state) =>\n isDestinationPanel ? state.sourceSoftDeletedItems : state.destinationSoftDeletedItems,\n );\n const currOnSoftDelete = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationSoftDelete : state.onSourceSoftDelete,\n );\n const otherOnSoftDelete = usePropsStore((state) =>\n isDestinationPanel ? state.onSourceSoftDelete : state.onDestinationSoftDelete,\n );\n\n const currOnRemove = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationRemove : state.onSourceRemove,\n );\n const otherPanelOnAdd = usePropsStore((state) => (isDestinationPanel ? state.onSourceAdd : state.onDestinationAdd));\n\n const moveItem = React.useCallback(\n (event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => {\n event.preventDefault();\n event.stopPropagation();\n currOnRemove([datum], { event });\n otherPanelOnAdd([datum], { event });\n currOnSoftDelete({ ...currSoftDeletedItems, [datumInternalMeta.hydratedId]: true }, { event });\n otherOnSoftDelete({ ...otherSoftDeletedItems, [datumInternalMeta.hydratedId]: false }, { event });\n },\n [\n currOnRemove,\n currOnSoftDelete,\n currSoftDeletedItems,\n datum,\n datumInternalMeta.hydratedId,\n otherOnSoftDelete,\n otherPanelOnAdd,\n otherSoftDeletedItems,\n ],\n );\n return moveItem;\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACEvB,OAAOA,YAAW;AAGlB,SAAS,qBAAqB;AAEvB,MAAM,yBAAyB,CAAC,EAAE,mBAAmB,MAAkC;AAC5F,QAAM,eAAe;AAAA,IAAc,CAAC,UAClC,qBAAqB,MAAM,sBAAsB,MAAM;AAAA,EACzD;AACA,QAAM,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AAAA,MACA,kBAAkB;AAAA,MAClB;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;",
6
6
  "names": ["React"]
7
7
  }
@@ -50,6 +50,7 @@ const useItemArrowNavigation = (itemMeta) => {
50
50
  if (key === "ArrowDown") {
51
51
  trackFocusNextItem(itemMeta);
52
52
  trackFocusActionParent();
53
+ return;
53
54
  }
54
55
  },
55
56
  [
@@ -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 {\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 }\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,EAAG,GAAE,eAAe;AACxF,UAAI,CAAC,WAAW,aAAa,aAAa,YAAY,EAAE,SAAS,GAAG,EAAG,GAAE,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;AAAA,MACzB;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;",
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,EAAG,GAAE,eAAe;AACxF,UAAI,CAAC,WAAW,aAAa,aAAa,YAAY,EAAE,SAAS,GAAG,EAAG,GAAE,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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-shuttle-v2",
3
- "version": "3.55.0-next.9",
3
+ "version": "3.55.2",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Shuttle v2",
6
6
  "files": [
@@ -38,34 +38,34 @@
38
38
  "dependencies": {
39
39
  "fast-deep-equal": "~3.1.3",
40
40
  "uid": "~2.0.1",
41
- "@elliemae/ds-button-v2": "3.55.0-next.9",
42
- "@elliemae/ds-drag-and-drop": "3.55.0-next.9",
43
- "@elliemae/ds-circular-progress-indicator": "3.55.0-next.9",
44
- "@elliemae/ds-fast-list": "3.55.0-next.9",
45
- "@elliemae/ds-form-checkbox": "3.55.0-next.9",
46
- "@elliemae/ds-form-input-text": "3.55.0-next.9",
47
- "@elliemae/ds-grid": "3.55.0-next.9",
48
- "@elliemae/ds-hooks-headless-tooltip": "3.55.0-next.9",
49
- "@elliemae/ds-hooks-on-blur-out": "3.55.0-next.9",
50
- "@elliemae/ds-hooks-fontsize-detector": "3.55.0-next.9",
51
- "@elliemae/ds-indeterminate-progress-indicator": "3.55.0-next.9",
52
- "@elliemae/ds-popperjs": "3.55.0-next.9",
53
- "@elliemae/ds-icons": "3.55.0-next.9",
54
- "@elliemae/ds-props-helpers": "3.55.0-next.9",
55
- "@elliemae/ds-typescript-helpers": "3.55.0-next.9",
56
- "@elliemae/ds-system": "3.55.0-next.9",
57
- "@elliemae/ds-typography": "3.55.0-next.9",
58
- "@elliemae/ds-zustand-helpers": "3.55.0-next.9"
41
+ "@elliemae/ds-button-v2": "3.55.2",
42
+ "@elliemae/ds-circular-progress-indicator": "3.55.2",
43
+ "@elliemae/ds-drag-and-drop": "3.55.2",
44
+ "@elliemae/ds-fast-list": "3.55.2",
45
+ "@elliemae/ds-form-checkbox": "3.55.2",
46
+ "@elliemae/ds-form-input-text": "3.55.2",
47
+ "@elliemae/ds-hooks-fontsize-detector": "3.55.2",
48
+ "@elliemae/ds-grid": "3.55.2",
49
+ "@elliemae/ds-hooks-headless-tooltip": "3.55.2",
50
+ "@elliemae/ds-hooks-on-blur-out": "3.55.2",
51
+ "@elliemae/ds-indeterminate-progress-indicator": "3.55.2",
52
+ "@elliemae/ds-icons": "3.55.2",
53
+ "@elliemae/ds-popperjs": "3.55.2",
54
+ "@elliemae/ds-props-helpers": "3.55.2",
55
+ "@elliemae/ds-system": "3.55.2",
56
+ "@elliemae/ds-typescript-helpers": "3.55.2",
57
+ "@elliemae/ds-typography": "3.55.2",
58
+ "@elliemae/ds-zustand-helpers": "3.55.2"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@elliemae/pui-cli": "9.0.0-next.65",
62
62
  "jest": "~29.7.0",
63
63
  "lodash-es": "^4.17.21",
64
64
  "styled-components": "~5.3.9",
65
- "@elliemae/ds-breadcrumb": "3.55.0-next.9",
66
- "@elliemae/ds-test-utils": "3.55.0-next.9",
67
- "@elliemae/ds-tree-model": "3.55.0-next.9",
68
- "@elliemae/ds-monorepo-devops": "3.55.0-next.9"
65
+ "@elliemae/ds-monorepo-devops": "3.55.2",
66
+ "@elliemae/ds-breadcrumb": "3.55.2",
67
+ "@elliemae/ds-test-utils": "3.55.2",
68
+ "@elliemae/ds-tree-model": "3.55.2"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "lodash-es": "^4.17.21",