@elliemae/ds-shuttle-v2 3.14.0-next.1 → 3.14.0-next.10

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.
Files changed (170) hide show
  1. package/dist/cjs/DSShuttleV2.js.map +2 -2
  2. package/dist/cjs/config/DSShuttleV2Definitions.js.map +1 -1
  3. package/dist/cjs/config/itemMovementHelpers.js +99 -74
  4. package/dist/cjs/config/itemMovementHelpers.js.map +2 -2
  5. package/dist/cjs/config/useAutoCalculated/useDataStructure.js +55 -34
  6. package/dist/cjs/config/useAutoCalculated/useDataStructure.js.map +2 -2
  7. package/dist/cjs/config/useAutoCalculated/useShuttleVirtualized.js.map +2 -2
  8. package/dist/cjs/config/useFocusTracker/useFocusActionTrackers.js +6 -6
  9. package/dist/cjs/config/useFocusTracker/useFocusActionTrackers.js.map +2 -2
  10. package/dist/cjs/config/useFocusTracker/useFocusItemTracker.js +5 -5
  11. package/dist/cjs/config/useFocusTracker/useFocusItemTracker.js.map +2 -2
  12. package/dist/cjs/config/useFocusTracker/useFocusRegionTrackers.js +2 -2
  13. package/dist/cjs/config/useFocusTracker/useFocusRegionTrackers.js.map +2 -2
  14. package/dist/cjs/config/useShuttleV2.js +2 -0
  15. package/dist/cjs/config/useShuttleV2.js.map +2 -2
  16. package/dist/cjs/config/useStore/createAtomInStore.bak +18 -0
  17. package/dist/cjs/config/useStore/useStore.js +14 -1
  18. package/dist/cjs/config/useStore/useStore.js.map +2 -2
  19. package/dist/cjs/config/{useStore/createAtomInStore.js → useValidateProps.js} +9 -13
  20. package/dist/cjs/config/useValidateProps.js.map +7 -0
  21. package/dist/cjs/constants/index.js +3 -1
  22. package/dist/cjs/constants/index.js.map +2 -2
  23. package/dist/cjs/parts/Dnd/DndHandle.js +17 -10
  24. package/dist/cjs/parts/Dnd/DndHandle.js.map +2 -2
  25. package/dist/cjs/parts/Dnd/DragOverlay.js +47 -0
  26. package/dist/cjs/parts/Dnd/DragOverlay.js.map +7 -0
  27. package/dist/cjs/parts/Header.js +5 -5
  28. package/dist/cjs/parts/Header.js.map +2 -2
  29. package/dist/cjs/parts/HoC/withConditionalDnDRowContext.js +42 -17
  30. package/dist/cjs/parts/HoC/withConditionalDnDRowContext.js.map +3 -3
  31. package/dist/cjs/parts/HoC/withConditionalUseSortable.js +4 -3
  32. package/dist/cjs/parts/HoC/withConditionalUseSortable.js.map +2 -2
  33. package/dist/cjs/parts/Item/Item.js +42 -33
  34. package/dist/cjs/parts/Item/Item.js.map +2 -2
  35. package/dist/cjs/parts/Item/ItemActions/ItemActions.js +16 -14
  36. package/dist/cjs/parts/Item/ItemActions/ItemActions.js.map +2 -2
  37. package/dist/cjs/parts/Item/ItemActions/useActionsHandlers.js +8 -3
  38. package/dist/cjs/parts/Item/ItemActions/useActionsHandlers.js.map +2 -2
  39. package/dist/cjs/parts/Item/ItemActions/useActionsLogicHandlers.js +27 -39
  40. package/dist/cjs/parts/Item/ItemActions/useActionsLogicHandlers.js.map +2 -2
  41. package/dist/cjs/parts/Item/ItemActions/useInnerRefHandlers.js +2 -2
  42. package/dist/cjs/parts/Item/ItemActions/useInnerRefHandlers.js.map +2 -2
  43. package/dist/cjs/parts/Item/ItemMiddleSection.js +21 -22
  44. package/dist/cjs/parts/Item/ItemMiddleSection.js.map +2 -2
  45. package/dist/cjs/parts/Item/ItemOverlay.js +15 -7
  46. package/dist/cjs/parts/Item/ItemOverlay.js.map +2 -2
  47. package/dist/cjs/parts/Item/ItemSelection.js +3 -1
  48. package/dist/cjs/parts/Item/ItemSelection.js.map +2 -2
  49. package/dist/cjs/parts/Item/TextSection.js +50 -0
  50. package/dist/cjs/parts/Item/TextSection.js.map +7 -0
  51. package/dist/cjs/parts/Item/useItemArrowNavigation.js +46 -20
  52. package/dist/cjs/parts/Item/useItemArrowNavigation.js.map +2 -2
  53. package/dist/cjs/parts/Item/useItemKeyboardSelection.js +57 -0
  54. package/dist/cjs/parts/Item/useItemKeyboardSelection.js.map +7 -0
  55. package/dist/cjs/parts/Item/useSelectionLogic.js +64 -21
  56. package/dist/cjs/parts/Item/useSelectionLogic.js.map +2 -2
  57. package/dist/cjs/parts/MainContent.js +5 -2
  58. package/dist/cjs/parts/MainContent.js.map +2 -2
  59. package/dist/cjs/parts/Panel/bottom/LoadMoreBtn.js +3 -3
  60. package/dist/cjs/parts/Panel/bottom/LoadMoreBtn.js.map +2 -2
  61. package/dist/cjs/parts/Panel/bottom/LoadingMore.js +1 -1
  62. package/dist/cjs/parts/Panel/bottom/LoadingMore.js.map +2 -2
  63. package/dist/cjs/parts/Panel/bottom/PanelContentBottomSection.js +1 -1
  64. package/dist/cjs/parts/Panel/bottom/PanelContentBottomSection.js.map +1 -1
  65. package/dist/cjs/parts/Panel/bottom/useLoadMoreBtnArrowNavigation.js +4 -3
  66. package/dist/cjs/parts/Panel/bottom/useLoadMoreBtnArrowNavigation.js.map +2 -2
  67. package/dist/cjs/parts/Panel/middle/{ItemListWrapper.js → ItemListWrapper/Index.js} +25 -19
  68. package/dist/cjs/parts/Panel/middle/ItemListWrapper/Index.js.map +7 -0
  69. package/dist/cjs/parts/Panel/middle/ItemListWrapper/getDatumFlags.js +44 -0
  70. package/dist/cjs/parts/Panel/middle/ItemListWrapper/getDatumFlags.js.map +7 -0
  71. package/dist/cjs/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.js +57 -0
  72. package/dist/cjs/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.js.map +7 -0
  73. package/dist/cjs/parts/Panel/middle/MultipleSelectionAction.js +30 -7
  74. package/dist/cjs/parts/Panel/middle/MultipleSelectionAction.js.map +2 -2
  75. package/dist/cjs/parts/Panel/middle/PanelContentMiddleSection.js +12 -22
  76. package/dist/cjs/parts/Panel/middle/PanelContentMiddleSection.js.map +2 -2
  77. package/dist/cjs/parts/Panel/top/SelectionHeader.js +1 -1
  78. package/dist/cjs/parts/Panel/top/SelectionHeader.js.map +2 -2
  79. package/dist/cjs/parts/PanelWrapper.js +8 -11
  80. package/dist/cjs/parts/PanelWrapper.js.map +2 -2
  81. package/dist/cjs/react-desc-prop-types.js +31 -14
  82. package/dist/cjs/react-desc-prop-types.js.map +2 -2
  83. package/dist/esm/DSShuttleV2.js.map +2 -2
  84. package/dist/esm/config/DSShuttleV2Definitions.js.map +1 -1
  85. package/dist/esm/config/itemMovementHelpers.js +99 -74
  86. package/dist/esm/config/itemMovementHelpers.js.map +2 -2
  87. package/dist/esm/config/useAutoCalculated/useDataStructure.js +55 -34
  88. package/dist/esm/config/useAutoCalculated/useDataStructure.js.map +2 -2
  89. package/dist/esm/config/useAutoCalculated/useShuttleVirtualized.js.map +2 -2
  90. package/dist/esm/config/useFocusTracker/useFocusActionTrackers.js +6 -6
  91. package/dist/esm/config/useFocusTracker/useFocusActionTrackers.js.map +2 -2
  92. package/dist/esm/config/useFocusTracker/useFocusItemTracker.js +5 -5
  93. package/dist/esm/config/useFocusTracker/useFocusItemTracker.js.map +2 -2
  94. package/dist/esm/config/useFocusTracker/useFocusRegionTrackers.js +2 -2
  95. package/dist/esm/config/useFocusTracker/useFocusRegionTrackers.js.map +2 -2
  96. package/dist/esm/config/useShuttleV2.js +3 -1
  97. package/dist/esm/config/useShuttleV2.js.map +2 -2
  98. package/dist/esm/config/useStore/createAtomInStore.bak +18 -0
  99. package/dist/esm/config/useStore/useStore.js +14 -1
  100. package/dist/esm/config/useStore/useStore.js.map +2 -2
  101. package/dist/esm/config/useValidateProps.js +10 -0
  102. package/dist/esm/config/useValidateProps.js.map +7 -0
  103. package/dist/esm/constants/index.js +3 -1
  104. package/dist/esm/constants/index.js.map +2 -2
  105. package/dist/esm/parts/Dnd/DndHandle.js +17 -10
  106. package/dist/esm/parts/Dnd/DndHandle.js.map +2 -2
  107. package/dist/esm/parts/Dnd/DragOverlay.js +21 -0
  108. package/dist/esm/parts/Dnd/DragOverlay.js.map +7 -0
  109. package/dist/esm/parts/Header.js +4 -4
  110. package/dist/esm/parts/Header.js.map +2 -2
  111. package/dist/esm/parts/HoC/withConditionalDnDRowContext.js +43 -18
  112. package/dist/esm/parts/HoC/withConditionalDnDRowContext.js.map +3 -3
  113. package/dist/esm/parts/HoC/withConditionalUseSortable.js +4 -3
  114. package/dist/esm/parts/HoC/withConditionalUseSortable.js.map +2 -2
  115. package/dist/esm/parts/Item/Item.js +42 -33
  116. package/dist/esm/parts/Item/Item.js.map +2 -2
  117. package/dist/esm/parts/Item/ItemActions/ItemActions.js +13 -11
  118. package/dist/esm/parts/Item/ItemActions/ItemActions.js.map +2 -2
  119. package/dist/esm/parts/Item/ItemActions/useActionsHandlers.js +8 -3
  120. package/dist/esm/parts/Item/ItemActions/useActionsHandlers.js.map +2 -2
  121. package/dist/esm/parts/Item/ItemActions/useActionsLogicHandlers.js +28 -40
  122. package/dist/esm/parts/Item/ItemActions/useActionsLogicHandlers.js.map +2 -2
  123. package/dist/esm/parts/Item/ItemActions/useInnerRefHandlers.js +2 -2
  124. package/dist/esm/parts/Item/ItemActions/useInnerRefHandlers.js.map +2 -2
  125. package/dist/esm/parts/Item/ItemMiddleSection.js +20 -21
  126. package/dist/esm/parts/Item/ItemMiddleSection.js.map +2 -2
  127. package/dist/esm/parts/Item/ItemOverlay.js +15 -7
  128. package/dist/esm/parts/Item/ItemOverlay.js.map +2 -2
  129. package/dist/esm/parts/Item/ItemSelection.js +3 -1
  130. package/dist/esm/parts/Item/ItemSelection.js.map +2 -2
  131. package/dist/esm/parts/Item/TextSection.js +24 -0
  132. package/dist/esm/parts/Item/TextSection.js.map +7 -0
  133. package/dist/esm/parts/Item/useItemArrowNavigation.js +47 -21
  134. package/dist/esm/parts/Item/useItemArrowNavigation.js.map +2 -2
  135. package/dist/esm/parts/Item/useItemKeyboardSelection.js +31 -0
  136. package/dist/esm/parts/Item/useItemKeyboardSelection.js.map +7 -0
  137. package/dist/esm/parts/Item/useSelectionLogic.js +64 -21
  138. package/dist/esm/parts/Item/useSelectionLogic.js.map +2 -2
  139. package/dist/esm/parts/MainContent.js +5 -2
  140. package/dist/esm/parts/MainContent.js.map +2 -2
  141. package/dist/esm/parts/Panel/bottom/LoadMoreBtn.js +1 -1
  142. package/dist/esm/parts/Panel/bottom/LoadMoreBtn.js.map +1 -1
  143. package/dist/esm/parts/Panel/bottom/LoadingMore.js +1 -1
  144. package/dist/esm/parts/Panel/bottom/LoadingMore.js.map +2 -2
  145. package/dist/esm/parts/Panel/bottom/PanelContentBottomSection.js +1 -1
  146. package/dist/esm/parts/Panel/bottom/PanelContentBottomSection.js.map +1 -1
  147. package/dist/esm/parts/Panel/bottom/useLoadMoreBtnArrowNavigation.js +4 -3
  148. package/dist/esm/parts/Panel/bottom/useLoadMoreBtnArrowNavigation.js.map +2 -2
  149. package/dist/esm/parts/Panel/middle/{ItemListWrapper.js → ItemListWrapper/Index.js} +22 -16
  150. package/dist/esm/parts/Panel/middle/ItemListWrapper/Index.js.map +7 -0
  151. package/dist/esm/parts/Panel/middle/ItemListWrapper/getDatumFlags.js +18 -0
  152. package/dist/esm/parts/Panel/middle/ItemListWrapper/getDatumFlags.js.map +7 -0
  153. package/dist/esm/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.js +31 -0
  154. package/dist/esm/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.js.map +7 -0
  155. package/dist/esm/parts/Panel/middle/MultipleSelectionAction.js +29 -6
  156. package/dist/esm/parts/Panel/middle/MultipleSelectionAction.js.map +2 -2
  157. package/dist/esm/parts/Panel/middle/PanelContentMiddleSection.js +11 -21
  158. package/dist/esm/parts/Panel/middle/PanelContentMiddleSection.js.map +2 -2
  159. package/dist/esm/parts/Panel/top/SelectionHeader.js +1 -1
  160. package/dist/esm/parts/Panel/top/SelectionHeader.js.map +2 -2
  161. package/dist/esm/parts/PanelWrapper.js +8 -11
  162. package/dist/esm/parts/PanelWrapper.js.map +2 -2
  163. package/dist/esm/react-desc-prop-types.js +32 -15
  164. package/dist/esm/react-desc-prop-types.js.map +2 -2
  165. package/package.json +13 -11
  166. package/dist/cjs/config/useStore/createAtomInStore.js.map +0 -7
  167. package/dist/cjs/parts/Panel/middle/ItemListWrapper.js.map +0 -7
  168. package/dist/esm/config/useStore/createAtomInStore.js +0 -14
  169. package/dist/esm/config/useStore/createAtomInStore.js.map +0 -7
  170. package/dist/esm/parts/Panel/middle/ItemListWrapper.js.map +0 -7
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import React2 from "react";
4
4
  import { styled } from "@elliemae/ds-system";
5
- import { DSButtonV2, BUTTON_SIZES } from "@elliemae/ds-button";
5
+ import { DSButtonV2, BUTTON_SIZES } from "@elliemae/ds-button-v2";
6
6
  import { usePropsStore } from "../../../config/useStore";
7
7
  import { useInnerRefHandlers } from "./useInnerRefHandlers";
8
8
  import { useFocusTracker } from "../../../config/useFocusTracker";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/Panel/bottom/LoadMoreBtn.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { DSButtonV2, BUTTON_SIZES, type DSButtonT } from '@elliemae/ds-button';\nimport { usePropsStore } from '../../../config/useStore';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types';\nimport { useInnerRefHandlers } from './useInnerRefHandlers';\nimport { useFocusTracker } from '../../../config/useFocusTracker';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../config/DSShuttleV2Definitions';\n\nconst StyledLoadMoreBtn = styled(DSButtonV2, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.LIST_BOTTOM_LOAD_MORE_BTN,\n})`\n width: 100%;\n height: 100%;\n`;\n\nexport const LoadMoreBtn = (panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => {\n const { isDestinationPanel = false } = panelMetaInfo;\n const { trackFocusItemLast, trackFocusActionParent, trackFocusRegionPanelItem } = useFocusTracker();\n const onLoadMore = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationLoadMore : state.onSourceLoadMore,\n );\n const handleOnClick = React.useCallback(\n (e: Parameters<Required<DSButtonT.Props>['onClick']>[0]) => {\n onLoadMore(e);\n trackFocusItemLast();\n trackFocusRegionPanelItem(panelMetaInfo.isDestinationPanel);\n trackFocusActionParent();\n },\n [\n onLoadMore,\n panelMetaInfo.isDestinationPanel,\n trackFocusActionParent,\n trackFocusItemLast,\n trackFocusRegionPanelItem,\n ],\n );\n const { innerRefHandlerLoadMoreBtn } = useInnerRefHandlers(panelMetaInfo);\n return (\n <StyledLoadMoreBtn\n buttonType=\"text\"\n onClick={handleOnClick}\n size={BUTTON_SIZES.S}\n innerRef={innerRefHandlerLoadMoreBtn}\n >\n Load More...\n </StyledLoadMoreBtn>\n );\n};\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { DSButtonV2, BUTTON_SIZES, type DSButtonT } from '@elliemae/ds-button-v2';\nimport { usePropsStore } from '../../../config/useStore';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types';\nimport { useInnerRefHandlers } from './useInnerRefHandlers';\nimport { useFocusTracker } from '../../../config/useFocusTracker';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../config/DSShuttleV2Definitions';\n\nconst StyledLoadMoreBtn = styled(DSButtonV2, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.LIST_BOTTOM_LOAD_MORE_BTN,\n})`\n width: 100%;\n height: 100%;\n`;\n\nexport const LoadMoreBtn = (panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => {\n const { isDestinationPanel = false } = panelMetaInfo;\n const { trackFocusItemLast, trackFocusActionParent, trackFocusRegionPanelItem } = useFocusTracker();\n const onLoadMore = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationLoadMore : state.onSourceLoadMore,\n );\n const handleOnClick = React.useCallback(\n (e: Parameters<Required<DSButtonT.Props>['onClick']>[0]) => {\n onLoadMore(e);\n trackFocusItemLast();\n trackFocusRegionPanelItem(panelMetaInfo.isDestinationPanel);\n trackFocusActionParent();\n },\n [\n onLoadMore,\n panelMetaInfo.isDestinationPanel,\n trackFocusActionParent,\n trackFocusItemLast,\n trackFocusRegionPanelItem,\n ],\n );\n const { innerRefHandlerLoadMoreBtn } = useInnerRefHandlers(panelMetaInfo);\n return (\n <StyledLoadMoreBtn\n buttonType=\"text\"\n onClick={handleOnClick}\n size={BUTTON_SIZES.S}\n innerRef={innerRefHandlerLoadMoreBtn}\n >\n Load More...\n </StyledLoadMoreBtn>\n );\n};\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACwCnB;AAxCJ,OAAOA,YAAW;AAClB,SAAS,cAAc;AACvB,SAAS,YAAY,oBAAoC;AACzD,SAAS,qBAAqB;AAE9B,SAAS,2BAA2B;AACpC,SAAS,uBAAuB;AAChC,SAAS,iBAAiB,wBAAwB;AAElD,MAAM,oBAAoB,OAAO,YAAY;AAAA,EAC3C,MAAM;AAAA,EACN,MAAM,iBAAiB;AACzB,CAAC;AAAA;AAAA;AAAA;AAKM,MAAM,cAAc,CAAC,kBAA8C;AACxE,QAAM,EAAE,qBAAqB,MAAM,IAAI;AACvC,QAAM,EAAE,oBAAoB,wBAAwB,0BAA0B,IAAI,gBAAgB;AAClG,QAAM,aAAa;AAAA,IAAc,CAAC,UAChC,qBAAqB,MAAM,wBAAwB,MAAM;AAAA,EAC3D;AACA,QAAM,gBAAgBA,OAAM;AAAA,IAC1B,CAAC,MAA2D;AAC1D,iBAAW,CAAC;AACZ,yBAAmB;AACnB,gCAA0B,cAAc,kBAAkB;AAC1D,6BAAuB;AAAA,IACzB;AAAA,IACA;AAAA,MACE;AAAA,MACA,cAAc;AAAA,MACd;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACA,QAAM,EAAE,2BAA2B,IAAI,oBAAoB,aAAa;AACxE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,YAAW;AAAA,MACX,SAAS;AAAA,MACT,MAAM,aAAa;AAAA,MACnB,UAAU;AAAA,MACX;AAAA;AAAA,EAED;AAEJ;",
6
6
  "names": ["React"]
7
7
  }
@@ -8,7 +8,7 @@ const StyledBottomLoadingMore = styled(Grid, {
8
8
  name: DSShuttleV2Name,
9
9
  slot: DSShuttleV2Slots.LIST_BOTTOM_LOADING_MORE
10
10
  })``;
11
- const LoadingMore = (panelMetaInfo) => /* @__PURE__ */ jsx(StyledBottomLoadingMore, { px: "24px", children: /* @__PURE__ */ jsx(DSIndeterminateProgressIndicator, { processing: true, title: "Loading" }) });
11
+ const LoadingMore = (panelMetaInfo) => /* @__PURE__ */ jsx(StyledBottomLoadingMore, { px: "1.846rem", children: /* @__PURE__ */ jsx(DSIndeterminateProgressIndicator, { processing: true, title: "Loading" }) });
12
12
  export {
13
13
  LoadingMore
14
14
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/Panel/bottom/LoadingMore.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-unused-vars */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSIndeterminateProgressIndicator } from '@elliemae/ds-indeterminate-progress-indicator';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../config/DSShuttleV2Definitions';\n\nconst StyledBottomLoadingMore = styled(Grid, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.LIST_BOTTOM_LOADING_MORE,\n})``;\nexport const LoadingMore = (panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => (\n <StyledBottomLoadingMore px=\"24px\">\n <DSIndeterminateProgressIndicator processing title=\"Loading\" />\n </StyledBottomLoadingMore>\n);\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACcnB;AAZJ,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,wCAAwC;AAEjD,SAAS,iBAAiB,wBAAwB;AAElD,MAAM,0BAA0B,OAAO,MAAM;AAAA,EAC3C,MAAM;AAAA,EACN,MAAM,iBAAiB;AACzB,CAAC;AACM,MAAM,cAAc,CAAC,kBAC1B,oBAAC,2BAAwB,IAAG,QAC1B,8BAAC,oCAAiC,YAAU,MAAC,OAAM,WAAU,GAC/D;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-unused-vars */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSIndeterminateProgressIndicator } from '@elliemae/ds-indeterminate-progress-indicator';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../config/DSShuttleV2Definitions';\n\nconst StyledBottomLoadingMore = styled(Grid, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.LIST_BOTTOM_LOADING_MORE,\n})``;\nexport const LoadingMore = (panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => (\n <StyledBottomLoadingMore px=\"1.846rem\">\n <DSIndeterminateProgressIndicator processing title=\"Loading\" />\n </StyledBottomLoadingMore>\n);\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACcnB;AAZJ,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,wCAAwC;AAEjD,SAAS,iBAAiB,wBAAwB;AAElD,MAAM,0BAA0B,OAAO,MAAM;AAAA,EAC3C,MAAM;AAAA,EACN,MAAM,iBAAiB;AACzB,CAAC;AACM,MAAM,cAAc,CAAC,kBAC1B,oBAAC,2BAAwB,IAAG,YAC1B,8BAAC,oCAAiC,YAAU,MAAC,OAAM,WAAU,GAC/D;",
6
6
  "names": []
7
7
  }
@@ -10,7 +10,7 @@ import { LoadingMore } from "./LoadingMore";
10
10
  import { useLoadMoreBtnArrowNavigation } from "./useLoadMoreBtnArrowNavigation";
11
11
  import { DSShuttleV2Name, DSShuttleV2Slots } from "../../../config/DSShuttleV2Definitions";
12
12
  const StyledListWrapperBottom = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.LIST_WRAPPER_BOTTOM })`
13
- min-height: 36px;
13
+ min-height: 2.769rem;
14
14
  border-top: 1px solid neutral-400;
15
15
  `;
16
16
  const wrapperColsRows = ["1fr"];
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/Panel/bottom/PanelContentBottomSection.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-unused-vars */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { useFocusTracker } from '../../../config/useFocusTracker';\nimport { usePropsStore } from '../../../config/useStore';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types';\nimport { LoadMoreBtn } from './LoadMoreBtn';\nimport { LoadingMore } from './LoadingMore';\nimport { useLoadMoreBtnArrowNavigation } from './useLoadMoreBtnArrowNavigation';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../config/DSShuttleV2Definitions';\n\nconst StyledListWrapperBottom = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.LIST_WRAPPER_BOTTOM })`\n min-height: 36px;\n border-top: 1px solid neutral-400;\n`;\nconst wrapperColsRows = ['1fr'];\n\nexport const PanelContentBottomSection = React.memo((panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => {\n const { isDestinationPanel = false } = panelMetaInfo;\n const withLoadMore = usePropsStore((state) =>\n isDestinationPanel ? state.destinationWithLoadMore : state.sourceWithLoadMore,\n );\n const isLoadingMore = usePropsStore((state) =>\n isDestinationPanel ? state.destinationIsLoadingMore : state.sourceIsLoadingMore,\n );\n const { trackFocusRegionBottom, trackFocusLoadMoreBtn, trackFocusActionReset } = useFocusTracker();\n const onBottomSectionFocus = React.useCallback(() => {\n trackFocusRegionBottom(isDestinationPanel);\n trackFocusLoadMoreBtn();\n trackFocusActionReset();\n }, [isDestinationPanel, trackFocusActionReset, trackFocusLoadMoreBtn, trackFocusRegionBottom]);\n\n // this 3 booleans MUST be auto-exclusives with each other\n const shouldDisplayLoadingMore = isLoadingMore;\n const shouldDisplayLoadMoreBtn = withLoadMore && !isLoadingMore;\n const shouldNotTakeSpace = !withLoadMore && !isLoadingMore;\n const { onLoadMoreButtonKeyDown } = useLoadMoreBtnArrowNavigation(panelMetaInfo);\n\n if (shouldNotTakeSpace) return <div />;\n return (\n <StyledListWrapperBottom\n cols={wrapperColsRows}\n rows={wrapperColsRows}\n onFocus={onBottomSectionFocus}\n onKeyDown={onLoadMoreButtonKeyDown}\n >\n {shouldDisplayLoadingMore ? <LoadingMore {...panelMetaInfo} /> : null}\n {shouldDisplayLoadMoreBtn ? <LoadMoreBtn {...panelMetaInfo} /> : null}\n </StyledListWrapperBottom>\n );\n});\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-unused-vars */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { useFocusTracker } from '../../../config/useFocusTracker';\nimport { usePropsStore } from '../../../config/useStore';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types';\nimport { LoadMoreBtn } from './LoadMoreBtn';\nimport { LoadingMore } from './LoadingMore';\nimport { useLoadMoreBtnArrowNavigation } from './useLoadMoreBtnArrowNavigation';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../config/DSShuttleV2Definitions';\n\nconst StyledListWrapperBottom = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.LIST_WRAPPER_BOTTOM })`\n min-height: 2.769rem;\n border-top: 1px solid neutral-400;\n`;\nconst wrapperColsRows = ['1fr'];\n\nexport const PanelContentBottomSection = React.memo((panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => {\n const { isDestinationPanel = false } = panelMetaInfo;\n const withLoadMore = usePropsStore((state) =>\n isDestinationPanel ? state.destinationWithLoadMore : state.sourceWithLoadMore,\n );\n const isLoadingMore = usePropsStore((state) =>\n isDestinationPanel ? state.destinationIsLoadingMore : state.sourceIsLoadingMore,\n );\n const { trackFocusRegionBottom, trackFocusLoadMoreBtn, trackFocusActionReset } = useFocusTracker();\n const onBottomSectionFocus = React.useCallback(() => {\n trackFocusRegionBottom(isDestinationPanel);\n trackFocusLoadMoreBtn();\n trackFocusActionReset();\n }, [isDestinationPanel, trackFocusActionReset, trackFocusLoadMoreBtn, trackFocusRegionBottom]);\n\n // this 3 booleans MUST be auto-exclusives with each other\n const shouldDisplayLoadingMore = isLoadingMore;\n const shouldDisplayLoadMoreBtn = withLoadMore && !isLoadingMore;\n const shouldNotTakeSpace = !withLoadMore && !isLoadingMore;\n const { onLoadMoreButtonKeyDown } = useLoadMoreBtnArrowNavigation(panelMetaInfo);\n\n if (shouldNotTakeSpace) return <div />;\n return (\n <StyledListWrapperBottom\n cols={wrapperColsRows}\n rows={wrapperColsRows}\n onFocus={onBottomSectionFocus}\n onKeyDown={onLoadMoreButtonKeyDown}\n >\n {shouldDisplayLoadingMore ? <LoadingMore {...panelMetaInfo} /> : null}\n {shouldDisplayLoadMoreBtn ? <LoadMoreBtn {...panelMetaInfo} /> : null}\n </StyledListWrapperBottom>\n );\n});\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACwCU,cAE7B,YAF6B;AAtCjC,OAAOA,YAAW;AAClB,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,uBAAuB;AAChC,SAAS,qBAAqB;AAE9B,SAAS,mBAAmB;AAC5B,SAAS,mBAAmB;AAC5B,SAAS,qCAAqC;AAC9C,SAAS,iBAAiB,wBAAwB;AAElD,MAAM,0BAA0B,OAAO,MAAM,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,oBAAoB,CAAC;AAAA;AAAA;AAAA;AAIlH,MAAM,kBAAkB,CAAC,KAAK;AAEvB,MAAM,4BAA4BA,OAAM,KAAK,CAAC,kBAA8C;AACjG,QAAM,EAAE,qBAAqB,MAAM,IAAI;AACvC,QAAM,eAAe;AAAA,IAAc,CAAC,UAClC,qBAAqB,MAAM,0BAA0B,MAAM;AAAA,EAC7D;AACA,QAAM,gBAAgB;AAAA,IAAc,CAAC,UACnC,qBAAqB,MAAM,2BAA2B,MAAM;AAAA,EAC9D;AACA,QAAM,EAAE,wBAAwB,uBAAuB,sBAAsB,IAAI,gBAAgB;AACjG,QAAM,uBAAuBA,OAAM,YAAY,MAAM;AACnD,2BAAuB,kBAAkB;AACzC,0BAAsB;AACtB,0BAAsB;AAAA,EACxB,GAAG,CAAC,oBAAoB,uBAAuB,uBAAuB,sBAAsB,CAAC;AAG7F,QAAM,2BAA2B;AACjC,QAAM,2BAA2B,gBAAgB,CAAC;AAClD,QAAM,qBAAqB,CAAC,gBAAgB,CAAC;AAC7C,QAAM,EAAE,wBAAwB,IAAI,8BAA8B,aAAa;AAE/E,MAAI;AAAoB,WAAO,oBAAC,SAAI;AACpC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW;AAAA,MAEV;AAAA,mCAA2B,oBAAC,eAAa,GAAG,eAAe,IAAK;AAAA,QAChE,2BAA2B,oBAAC,eAAa,GAAG,eAAe,IAAK;AAAA;AAAA;AAAA,EACnE;AAEJ,CAAC;",
6
6
  "names": ["React"]
7
7
  }
@@ -6,11 +6,12 @@ const useLoadMoreBtnArrowNavigation = (panelMetaInfo) => {
6
6
  const { trackFocusPrevItem, trackFocusNextItem } = useFocusItemTracker();
7
7
  const { trackFocusActionParent } = useFocusActionTrackers();
8
8
  const { trackFocusRegionPanelItem } = useFocusRegionTrackers();
9
- const isActive = useInternalStore((state) => state.lastActiveId);
9
+ const getIsDragAndDropHappening = useInternalStore((state) => state.getIsDragAndDropHappening);
10
10
  const onLoadMoreButtonKeyDown = React2.useCallback(
11
11
  (e) => {
12
12
  const { key } = e;
13
- if (isActive) {
13
+ const isDragAndDropHappening = getIsDragAndDropHappening();
14
+ if (isDragAndDropHappening) {
14
15
  e.preventDefault();
15
16
  return;
16
17
  }
@@ -30,7 +31,7 @@ const useLoadMoreBtnArrowNavigation = (panelMetaInfo) => {
30
31
  }
31
32
  },
32
33
  [
33
- isActive,
34
+ getIsDragAndDropHappening,
34
35
  trackFocusRegionPanelItem,
35
36
  panelMetaInfo,
36
37
  trackFocusNextItem,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/Panel/bottom/useLoadMoreBtnArrowNavigation.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { useFocusItemTracker, useFocusActionTrackers, useFocusRegionTrackers } from '../../../config/useFocusTracker';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types';\nimport { useInternalStore } from '../../../config/useStore';\n\nexport const useLoadMoreBtnArrowNavigation = (panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => {\n const { trackFocusPrevItem, trackFocusNextItem } = useFocusItemTracker();\n const { trackFocusActionParent } = useFocusActionTrackers();\n const { trackFocusRegionPanelItem } = useFocusRegionTrackers();\n const isActive = useInternalStore((state) => state.lastActiveId);\n\n const onLoadMoreButtonKeyDown = React.useCallback<React.KeyboardEventHandler<HTMLDivElement>>(\n (e) => {\n const { key } = e;\n if (isActive) {\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'].includes(key)) e.preventDefault();\n if (['ArrowUp', 'ArrowDown'].includes(key)) e.stopPropagation();\n\n // =============================================================================\n // THIS IS NOT LIKE /src/parts/Item/useItemArrowNavigation.tsx\n // THIS IS INVERTED BY DESIGN AND DESIRED TO BE INVERTED\n // =============================================================================\n // load-more-btn -> last element\n if (key === 'ArrowUp') {\n trackFocusRegionPanelItem(panelMetaInfo.isDestinationPanel);\n trackFocusNextItem(panelMetaInfo); // this results in \"Last\" element of the list\n trackFocusActionParent();\n }\n // load-more-btn -> first element\n if (key === 'ArrowDown') {\n trackFocusRegionPanelItem(panelMetaInfo.isDestinationPanel);\n trackFocusPrevItem(panelMetaInfo); // this results in \"First\" element of the list\n trackFocusActionParent();\n }\n },\n [\n isActive,\n trackFocusRegionPanelItem,\n panelMetaInfo,\n trackFocusNextItem,\n trackFocusActionParent,\n trackFocusPrevItem,\n ],\n );\n\n return React.useMemo(() => ({ onLoadMoreButtonKeyDown }), [onLoadMoreButtonKeyDown]);\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAClB,SAAS,qBAAqB,wBAAwB,8BAA8B;AAEpF,SAAS,wBAAwB;AAE1B,MAAM,gCAAgC,CAAC,kBAA8C;AAC1F,QAAM,EAAE,oBAAoB,mBAAmB,IAAI,oBAAoB;AACvE,QAAM,EAAE,uBAAuB,IAAI,uBAAuB;AAC1D,QAAM,EAAE,0BAA0B,IAAI,uBAAuB;AAC7D,QAAM,WAAW,iBAAiB,CAAC,UAAU,MAAM,YAAY;AAE/D,QAAM,0BAA0BA,OAAM;AAAA,IACpC,CAAC,MAAM;AACL,YAAM,EAAE,IAAI,IAAI;AAChB,UAAI,UAAU;AACZ,UAAE,eAAe;AACjB;AAAA,MACF;AAGA,UAAI,CAAC,WAAW,WAAW,EAAE,SAAS,GAAG;AAAG,UAAE,eAAe;AAC7D,UAAI,CAAC,WAAW,WAAW,EAAE,SAAS,GAAG;AAAG,UAAE,gBAAgB;AAO9D,UAAI,QAAQ,WAAW;AACrB,kCAA0B,cAAc,kBAAkB;AAC1D,2BAAmB,aAAa;AAChC,+BAAuB;AAAA,MACzB;AAEA,UAAI,QAAQ,aAAa;AACvB,kCAA0B,cAAc,kBAAkB;AAC1D,2BAAmB,aAAa;AAChC,+BAAuB;AAAA,MACzB;AAAA,IACF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,SAAOA,OAAM,QAAQ,OAAO,EAAE,wBAAwB,IAAI,CAAC,uBAAuB,CAAC;AACrF;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { useFocusItemTracker, useFocusActionTrackers, useFocusRegionTrackers } from '../../../config/useFocusTracker';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types';\nimport { useInternalStore } from '../../../config/useStore';\n\nexport const useLoadMoreBtnArrowNavigation = (panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => {\n const { trackFocusPrevItem, trackFocusNextItem } = useFocusItemTracker();\n const { trackFocusActionParent } = useFocusActionTrackers();\n const { trackFocusRegionPanelItem } = useFocusRegionTrackers();\n const getIsDragAndDropHappening = useInternalStore((state) => state.getIsDragAndDropHappening);\n\n const onLoadMoreButtonKeyDown = 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 // 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'].includes(key)) e.preventDefault();\n if (['ArrowUp', 'ArrowDown'].includes(key)) e.stopPropagation();\n\n // =============================================================================\n // THIS IS NOT LIKE /src/parts/Item/useItemArrowNavigation.tsx\n // THIS IS INVERTED BY DESIGN AND DESIRED TO BE INVERTED\n // =============================================================================\n // load-more-btn -> last element\n if (key === 'ArrowUp') {\n trackFocusRegionPanelItem(panelMetaInfo.isDestinationPanel);\n trackFocusNextItem(panelMetaInfo); // this results in \"Last\" element of the list\n trackFocusActionParent();\n }\n // load-more-btn -> first element\n if (key === 'ArrowDown') {\n trackFocusRegionPanelItem(panelMetaInfo.isDestinationPanel);\n trackFocusPrevItem(panelMetaInfo); // this results in \"First\" element of the list\n trackFocusActionParent();\n }\n },\n [\n getIsDragAndDropHappening,\n trackFocusRegionPanelItem,\n panelMetaInfo,\n trackFocusNextItem,\n trackFocusActionParent,\n trackFocusPrevItem,\n ],\n );\n\n return React.useMemo(() => ({ onLoadMoreButtonKeyDown }), [onLoadMoreButtonKeyDown]);\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAClB,SAAS,qBAAqB,wBAAwB,8BAA8B;AAEpF,SAAS,wBAAwB;AAE1B,MAAM,gCAAgC,CAAC,kBAA8C;AAC1F,QAAM,EAAE,oBAAoB,mBAAmB,IAAI,oBAAoB;AACvE,QAAM,EAAE,uBAAuB,IAAI,uBAAuB;AAC1D,QAAM,EAAE,0BAA0B,IAAI,uBAAuB;AAC7D,QAAM,4BAA4B,iBAAiB,CAAC,UAAU,MAAM,yBAAyB;AAE7F,QAAM,0BAA0BA,OAAM;AAAA,IACpC,CAAC,MAAM;AACL,YAAM,EAAE,IAAI,IAAI;AAEhB,YAAM,yBAAyB,0BAA0B;AACzD,UAAI,wBAAwB;AAC1B,UAAE,eAAe;AACjB;AAAA,MACF;AAGA,UAAI,CAAC,WAAW,WAAW,EAAE,SAAS,GAAG;AAAG,UAAE,eAAe;AAC7D,UAAI,CAAC,WAAW,WAAW,EAAE,SAAS,GAAG;AAAG,UAAE,gBAAgB;AAO9D,UAAI,QAAQ,WAAW;AACrB,kCAA0B,cAAc,kBAAkB;AAC1D,2BAAmB,aAAa;AAChC,+BAAuB;AAAA,MACzB;AAEA,UAAI,QAAQ,aAAa;AACvB,kCAA0B,cAAc,kBAAkB;AAC1D,2BAAmB,aAAa;AAChC,+BAAuB;AAAA,MACzB;AAAA,IACF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,SAAOA,OAAM,QAAQ,OAAO,EAAE,wBAAwB,IAAI,CAAC,uBAAuB,CAAC;AACrF;",
6
6
  "names": ["React"]
7
7
  }
@@ -3,10 +3,12 @@ import { jsx } from "react/jsx-runtime";
3
3
  import React2 from "react";
4
4
  import { Grid } from "@elliemae/ds-grid";
5
5
  import { styled } from "@elliemae/ds-system";
6
- import { useInternalStore, usePropsStore } from "../../../config/useStore";
7
- import { ItemSortable } from "../../Item/Item";
8
- import { withConditionalDnDRowContext } from "../../HoC/withConditionalDnDRowContext";
9
- import { DSShuttleV2Name, DSShuttleV2Slots } from "../../../config/DSShuttleV2Definitions";
6
+ import { useInternalStore, usePropsStore } from "../../../../config/useStore";
7
+ import { DSShuttleV2Name, DSShuttleV2Slots } from "../../../../config/DSShuttleV2Definitions";
8
+ import { ItemSortable } from "../../../Item/Item";
9
+ import { withConditionalDnDRowContext } from "../../../HoC/withConditionalDnDRowContext";
10
+ import { useGetDatumHydratables } from "./useGetDatumHydratables";
11
+ import { getDatumFlags } from "./getDatumFlags";
10
12
  const StyledItemsWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEMS_WRAPPER })`
11
13
  position: relative;
12
14
 
@@ -35,8 +37,20 @@ const ItemListWrapper = React2.memo((panelMetaInfo) => {
35
37
  () => [`repeat(${itemList?.length ? itemList?.length : "0"},min-content)`],
36
38
  [itemList.length]
37
39
  );
40
+ const getDatumHydratables = useGetDatumHydratables(panelMetaInfo);
38
41
  return /* @__PURE__ */ jsx(StyledItemsWrapper, { alignItems: "flex-start", rows, style: { height: `${totalSize}px` }, children: virtualItems?.map((virtualRow) => {
39
42
  const item = itemList[virtualRow.index];
43
+ const { original: datum, ...datumInternalMeta } = item;
44
+ const datumHydratables = getDatumHydratables(item);
45
+ const datumRenderFlags = getDatumFlags({ ...datumInternalMeta, ...datumHydratables, ...panelMetaInfo });
46
+ const itemMeta = {
47
+ datum,
48
+ datumHydratables,
49
+ datumInternalMeta,
50
+ datumRenderFlags,
51
+ ...panelMetaInfo,
52
+ withDragNDrop
53
+ };
40
54
  return /* @__PURE__ */ jsx(
41
55
  "div",
42
56
  {
@@ -48,24 +62,16 @@ const ItemListWrapper = React2.memo((panelMetaInfo) => {
48
62
  height: `${virtualRow.size}px`,
49
63
  transform: `translateY(${virtualRow.start}px)`
50
64
  },
51
- children: /* @__PURE__ */ jsx(
52
- ItemSortable,
53
- {
54
- item,
55
- isDestinationPanel,
56
- withDragNDrop
57
- },
58
- item.original.id
59
- )
65
+ children: /* @__PURE__ */ jsx("div", { ref: virtualRow.measureRef, children: /* @__PURE__ */ jsx(ItemSortable, { ...itemMeta }, datumHydratables.id) })
60
66
  },
61
67
  virtualRow.index
62
68
  );
63
69
  }) });
64
70
  });
65
71
  const ItemListWrapperWithContext = withConditionalDnDRowContext(ItemListWrapper);
66
- var ItemListWrapper_default = ItemListWrapperWithContext;
72
+ var Index_default = ItemListWrapperWithContext;
67
73
  export {
68
74
  ItemListWrapperWithContext,
69
- ItemListWrapper_default as default
75
+ Index_default as default
70
76
  };
71
- //# sourceMappingURL=ItemListWrapper.js.map
77
+ //# sourceMappingURL=Index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../../src/parts/Panel/middle/ItemListWrapper/Index.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\nimport 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 { DSShuttleV2Name, DSShuttleV2Slots } from '../../../../config/DSShuttleV2Definitions';\nimport { ItemSortable } from '../../../Item/Item';\nimport { withConditionalDnDRowContext } from '../../../HoC/withConditionalDnDRowContext';\nimport { useGetDatumHydratables } from './useGetDatumHydratables';\nimport { getDatumFlags } from './getDatumFlags';\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 const getDatumHydratables = useGetDatumHydratables(panelMetaInfo);\n return (\n <StyledItemsWrapper alignItems=\"flex-start\" rows={rows} style={{ height: `${totalSize}px` }}>\n {virtualItems?.map((virtualRow) => {\n const item = itemList[virtualRow.index];\n const { original: datum, ...datumInternalMeta } = item;\n const datumHydratables = getDatumHydratables(item);\n const datumRenderFlags = getDatumFlags({ ...datumInternalMeta, ...datumHydratables, ...panelMetaInfo });\n const itemMeta = {\n datum,\n datumHydratables,\n datumInternalMeta,\n datumRenderFlags,\n ...panelMetaInfo,\n withDragNDrop,\n };\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 // height: `${(getCurrentFont()/13) * virtualRow.size}px`,\n // transform: `translateY(${(getCurrentFont()/13) * virtualRow.start}px)`,\n }}\n >\n <div ref={virtualRow.measureRef}>\n <ItemSortable key={datumHydratables.id} {...itemMeta} />\n </div>\n </div>\n );\n })}\n </StyledItemsWrapper>\n );\n});\n\nexport const ItemListWrapperWithContext = withConditionalDnDRowContext(ItemListWrapper);\nexport default ItemListWrapperWithContext;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC4ET;AA3Ed,OAAOA,YAAW;AAClB,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,SAAS,kBAAkB,qBAAqB;AAEhD,SAAS,iBAAiB,wBAAwB;AAClD,SAAS,oBAAoB;AAC7B,SAAS,oCAAoC;AAC7C,SAAS,8BAA8B;AACvC,SAAS,qBAAqB;AAE9B,MAAM,qBAAqB,OAAO,MAAM,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,cAAc,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWvG,MAAM,kBAAkBA,OAAM,KAAK,CAAC,kBAA8C;AAChF,QAAM,EAAE,mBAAmB,IAAI;AAC/B,QAAM,WAAW;AAAA,IAAiB,CAAC,UACjC,qBAAqB,MAAM,4BAA4B,MAAM;AAAA,EAC/D;AAEA,QAAM,YAAY;AAAA,IAAiB,CAAC,UAClC,qBAAqB,MAAM,uBAAuB,MAAM;AAAA,EAC1D;AAEA,QAAM,eAAe;AAAA,IAAiB,CAAC,UACrC,qBAAqB,MAAM,0BAA0B,MAAM;AAAA,EAC7D;AAEA,QAAM,gBAAgB;AAAA,IAAc,CAAC,UACnC,qBAAqB,CAAC,MAAM,mCAAmC,MAAM;AAAA,EACvE;AAEA,QAAM,OAAOA,OAAM;AAAA,IACjB,MAAM,CAAC,UAAU,UAAU,SAAS,UAAU,SAAS,kBAAkB;AAAA,IACzE,CAAC,SAAS,MAAM;AAAA,EAClB;AACA,QAAM,sBAAsB,uBAAuB,aAAa;AAChE,SACE,oBAAC,sBAAmB,YAAW,cAAa,MAAY,OAAO,EAAE,QAAQ,GAAG,cAAc,GACvF,wBAAc,IAAI,CAAC,eAAe;AACjC,UAAM,OAAO,SAAS,WAAW;AACjC,UAAM,EAAE,UAAU,UAAU,kBAAkB,IAAI;AAClD,UAAM,mBAAmB,oBAAoB,IAAI;AACjD,UAAM,mBAAmB,cAAc,EAAE,GAAG,mBAAmB,GAAG,kBAAkB,GAAG,cAAc,CAAC;AACtG,UAAM,WAAW;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAG;AAAA,MACH;AAAA,IACF;AACA,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,QAGtC;AAAA,QAEA,8BAAC,SAAI,KAAK,WAAW,YACnB,8BAAC,gBAAwC,GAAG,YAAzB,iBAAiB,EAAkB,GACxD;AAAA;AAAA,MAdK,WAAW;AAAA,IAelB;AAAA,EAEJ,CAAC,GACH;AAEJ,CAAC;AAEM,MAAM,6BAA6B,6BAA6B,eAAe;AACtF,IAAO,gBAAQ;",
6
+ "names": ["React"]
7
+ }
@@ -0,0 +1,18 @@
1
+ import * as React from "react";
2
+ const getDatumFlags = ({
3
+ softDeleted,
4
+ preventMove = false,
5
+ preventDrilldown = false,
6
+ hasMultipleSelection = false
7
+ }) => ({
8
+ selectionPrevented: Boolean(softDeleted || preventMove),
9
+ withActions: !softDeleted,
10
+ withMoveBtn: !softDeleted && !preventMove,
11
+ withDrilldownBtn: !softDeleted && !preventDrilldown,
12
+ internallyDisabledMove: hasMultipleSelection,
13
+ internallyDisabledDrilldown: hasMultipleSelection
14
+ });
15
+ export {
16
+ getDatumFlags
17
+ };
18
+ //# sourceMappingURL=getDatumFlags.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../../src/parts/Panel/middle/ItemListWrapper/getDatumFlags.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "type GetDatumFlagsConfig = {\n softDeleted: boolean;\n preventMove?: boolean;\n preventDrilldown?: boolean;\n hasMultipleSelection?: boolean;\n};\nexport const getDatumFlags = ({\n softDeleted,\n preventMove = false,\n preventDrilldown = false,\n hasMultipleSelection = false,\n}: GetDatumFlagsConfig) => ({\n selectionPrevented: Boolean(softDeleted || preventMove),\n withActions: !softDeleted,\n withMoveBtn: !softDeleted && !preventMove,\n withDrilldownBtn: !softDeleted && !preventDrilldown,\n internallyDisabledMove: hasMultipleSelection,\n internallyDisabledDrilldown: hasMultipleSelection,\n});\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACMhB,MAAM,gBAAgB,CAAC;AAAA,EAC5B;AAAA,EACA,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,uBAAuB;AACzB,OAA4B;AAAA,EAC1B,oBAAoB,QAAQ,eAAe,WAAW;AAAA,EACtD,aAAa,CAAC;AAAA,EACd,aAAa,CAAC,eAAe,CAAC;AAAA,EAC9B,kBAAkB,CAAC,eAAe,CAAC;AAAA,EACnC,wBAAwB;AAAA,EACxB,6BAA6B;AAC/B;",
6
+ "names": []
7
+ }
@@ -0,0 +1,31 @@
1
+ import * as React from "react";
2
+ import React2 from "react";
3
+ import { usePropsStore } from "../../../../config/useStore";
4
+ const useGetDatumHydratables = (panelMetaInfo) => {
5
+ const getLabel = usePropsStore((state) => state.getLabel);
6
+ const getSubtitle = usePropsStore((state) => state.getSubtitle);
7
+ const getIcon = usePropsStore((state) => state.getIcon);
8
+ const getCustomRenderer = usePropsStore((state) => state.getCustomRenderer);
9
+ const getPreventDrilldown = usePropsStore((state) => state.getPreventDrilldown);
10
+ const getPreventMove = usePropsStore((state) => state.getPreventMove);
11
+ const getDatumHydratables = React2.useCallback(
12
+ (item) => {
13
+ const { original, ...datumMeta } = item;
14
+ return {
15
+ id: datumMeta.hydratedId,
16
+ label: getLabel(original, { datumMeta, panelMetaInfo }),
17
+ ...getSubtitle !== void 0 ? { subtitle: getSubtitle(original, { datumMeta, panelMetaInfo }) } : {},
18
+ ...getIcon !== void 0 ? { Icon: getIcon(original, { datumMeta, panelMetaInfo }) } : {},
19
+ ...getCustomRenderer !== void 0 ? { CustomRenderer: getCustomRenderer(original, { datumMeta, panelMetaInfo }) } : {},
20
+ ...getPreventDrilldown !== void 0 ? { preventDrilldown: getPreventDrilldown(original, { datumMeta, panelMetaInfo }) } : {},
21
+ ...getPreventMove !== void 0 ? { preventMove: getPreventMove(original, { datumMeta, panelMetaInfo }) } : {}
22
+ };
23
+ },
24
+ [getCustomRenderer, getIcon, getLabel, getPreventDrilldown, getPreventMove, getSubtitle, panelMetaInfo]
25
+ );
26
+ return getDatumHydratables;
27
+ };
28
+ export {
29
+ useGetDatumHydratables
30
+ };
31
+ //# sourceMappingURL=useGetDatumHydratables.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../../src/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { usePropsStore } from '../../../../config/useStore';\nimport { type DSShuttleV2T } from '../../../../react-desc-prop-types';\n\nexport const useGetDatumHydratables = (panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => {\n const getLabel = usePropsStore((state) => state.getLabel);\n const getSubtitle = usePropsStore((state) => state.getSubtitle);\n const getIcon = usePropsStore((state) => state.getIcon);\n const getCustomRenderer = usePropsStore((state) => state.getCustomRenderer);\n const getPreventDrilldown = usePropsStore((state) => state.getPreventDrilldown);\n const getPreventMove = usePropsStore((state) => state.getPreventMove);\n\n const getDatumHydratables = React.useCallback(\n (item: DSShuttleV2T.ConfiguredDatum) => {\n const { original, ...datumMeta } = item;\n\n return {\n id: datumMeta.hydratedId,\n label: getLabel(original, { datumMeta, panelMetaInfo }),\n ...(getSubtitle !== undefined ? { subtitle: getSubtitle(original, { datumMeta, panelMetaInfo }) } : {}),\n ...(getIcon !== undefined ? { Icon: getIcon(original, { datumMeta, panelMetaInfo }) } : {}),\n ...(getCustomRenderer !== undefined\n ? { CustomRenderer: getCustomRenderer(original, { datumMeta, panelMetaInfo }) }\n : {}),\n ...(getPreventDrilldown !== undefined\n ? { preventDrilldown: getPreventDrilldown(original, { datumMeta, panelMetaInfo }) }\n : {}),\n ...(getPreventMove !== undefined\n ? { preventMove: getPreventMove(original, { datumMeta, panelMetaInfo }) }\n : {}),\n };\n },\n [getCustomRenderer, getIcon, getLabel, getPreventDrilldown, getPreventMove, getSubtitle, panelMetaInfo],\n );\n return getDatumHydratables;\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAClB,SAAS,qBAAqB;AAGvB,MAAM,yBAAyB,CAAC,kBAA8C;AACnF,QAAM,WAAW,cAAc,CAAC,UAAU,MAAM,QAAQ;AACxD,QAAM,cAAc,cAAc,CAAC,UAAU,MAAM,WAAW;AAC9D,QAAM,UAAU,cAAc,CAAC,UAAU,MAAM,OAAO;AACtD,QAAM,oBAAoB,cAAc,CAAC,UAAU,MAAM,iBAAiB;AAC1E,QAAM,sBAAsB,cAAc,CAAC,UAAU,MAAM,mBAAmB;AAC9E,QAAM,iBAAiB,cAAc,CAAC,UAAU,MAAM,cAAc;AAEpE,QAAM,sBAAsBA,OAAM;AAAA,IAChC,CAAC,SAAuC;AACtC,YAAM,EAAE,aAAa,UAAU,IAAI;AAEnC,aAAO;AAAA,QACL,IAAI,UAAU;AAAA,QACd,OAAO,SAAS,UAAU,EAAE,WAAW,cAAc,CAAC;AAAA,QACtD,GAAI,gBAAgB,SAAY,EAAE,UAAU,YAAY,UAAU,EAAE,WAAW,cAAc,CAAC,EAAE,IAAI,CAAC;AAAA,QACrG,GAAI,YAAY,SAAY,EAAE,MAAM,QAAQ,UAAU,EAAE,WAAW,cAAc,CAAC,EAAE,IAAI,CAAC;AAAA,QACzF,GAAI,sBAAsB,SACtB,EAAE,gBAAgB,kBAAkB,UAAU,EAAE,WAAW,cAAc,CAAC,EAAE,IAC5E,CAAC;AAAA,QACL,GAAI,wBAAwB,SACxB,EAAE,kBAAkB,oBAAoB,UAAU,EAAE,WAAW,cAAc,CAAC,EAAE,IAChF,CAAC;AAAA,QACL,GAAI,mBAAmB,SACnB,EAAE,aAAa,eAAe,UAAU,EAAE,WAAW,cAAc,CAAC,EAAE,IACtE,CAAC;AAAA,MACP;AAAA,IACF;AAAA,IACA,CAAC,mBAAmB,SAAS,UAAU,qBAAqB,gBAAgB,aAAa,aAAa;AAAA,EACxG;AACA,SAAO;AACT;",
6
+ "names": ["React"]
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: 65px;
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, trackFocusRegionPanelFocusAll, trackFocusItemReset, trackFocusActionReset } = useFocusTracker();
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
- trackFocusRegionPanelFocusAll(isDestinationPanel);
70
- }, [isDestinationPanel, trackFocusActionReset, trackFocusItemReset, trackFocusRegionPanelFocusAll]);
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(StyledButton, { buttonType: "icon", onClick: handleMoveAllAction, onFocus: handleMoveAllBtnFocus, children: isDestinationPanel ? /* @__PURE__ */ jsx(StyledCloseMediumIcon, { width: "20px", height: "20px" }) : /* @__PURE__ */ jsx(StyledArrowShortRightIcon, { width: "20px", height: "20px" }) })
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: 65px;\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, trackFocusRegionPanelFocusAll, 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 trackFocusRegionPanelFocusAll(isDestinationPanel);\n }, [isDestinationPanel, trackFocusActionReset, trackFocusItemReset, trackFocusRegionPanelFocusAll]);\n\n return (\n <StyledMoveMultipleWrapper\n boxShadow=\"xs\"\n alignItems=\"center\"\n justifyContent=\"center\"\n cols={gridFullFraction}\n rows={gridFullFraction}\n >\n <StyledButton buttonType=\"icon\" onClick={handleMoveAllAction} onFocus={handleMoveAllBtnFocus}>\n {isDestinationPanel ? (\n <StyledCloseMediumIcon width=\"20px\" height=\"20px\" />\n ) : (\n <StyledArrowShortRightIcon width=\"20px\" height=\"20px\" />\n )}\n </StyledButton>\n </StyledMoveMultipleWrapper>\n );\n});\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACmFb;AAnFV,OAAOA,YAAW;AAClB,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,kBAAkC;AAC3C,SAAS,iBAAiB,mBAAmB;AAE7C,SAAS,8BAA8B;AACvC,SAAS,uBAAuB;AAChC,SAAS,iBAAiB,wBAAwB;AAElD,MAAM,4BAA4B,OAAO,MAAM,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,sBAAsB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBtH,MAAM,eAAe,OAAO,YAAY;AAAA,EACtC,MAAM;AAAA,EACN,MAAM,iBAAiB;AACzB,CAAC;AAAA;AAAA;AAAA;AAID,MAAM,wBAAwB,OAAO,aAAa;AAAA,EAChD,MAAM;AAAA,EACN,MAAM,iBAAiB;AACzB,CAAC;AAAA;AAAA;AAAA;AAAA;AAKD,MAAM,4BAA4B,OAAO,iBAAiB;AAAA,EACxD,MAAM;AAAA,EACN,MAAM,iBAAiB;AACzB,CAAC;AAAA;AAAA;AAAA;AAAA;AAKD,MAAM,mBAAmB,CAAC,KAAK;AAExB,MAAM,0BAA0BA,OAAM,KAAK,CAAC,cAA0C;AAC3F,QAAM,EAAE,mBAAmB,IAAI;AAC/B,QAAM,EAAE,cAAc,IAAI,uBAAuB,SAAS;AAC1D,QAAM,EAAE,uBAAuB,+BAA+B,qBAAqB,sBAAsB,IACvG,gBAAgB;AAClB,QAAM,sBAAsBA,OAAM;AAAA,IAChC,CAAC,UAAU;AACT,oBAAc,KAAK;AACnB,0BAAoB;AACpB,4BAAsB;AACtB,4BAAsB,kBAAkB;AAAA,IAC1C;AAAA,IACA,CAAC,oBAAoB,eAAe,uBAAuB,qBAAqB,qBAAqB;AAAA,EACvG;AACA,QAAM,wBAAoEA,OAAM,YAAY,MAAM;AAChG,wBAAoB;AACpB,0BAAsB;AACtB,kCAA8B,kBAAkB;AAAA,EAClD,GAAG,CAAC,oBAAoB,uBAAuB,qBAAqB,6BAA6B,CAAC;AAElG,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,YAAW;AAAA,MACX,gBAAe;AAAA,MACf,MAAM;AAAA,MACN,MAAM;AAAA,MAEN,8BAAC,gBAAa,YAAW,QAAO,SAAS,qBAAqB,SAAS,uBACpE,+BACC,oBAAC,yBAAsB,OAAM,QAAO,QAAO,QAAO,IAElD,oBAAC,6BAA0B,OAAM,QAAO,QAAO,QAAO,GAE1D;AAAA;AAAA,EACF;AAEJ,CAAC;",
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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBtH,MAAM,eAAe,OAAO,YAAY;AAAA,EACtC,MAAM;AAAA,EACN,MAAM,iBAAiB;AACzB,CAAC;AAAA;AAAA;AAAA;AAID,MAAM,wBAAwB,OAAO,aAAa;AAAA,EAChD,MAAM;AAAA,EACN,M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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: '500px';
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 destinationHasMultipleSelectedItems = useInternalStore((store) => store.destinationHasMultipleSelectedItems);
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
  );
@@ -92,7 +81,8 @@ const PanelContentMiddleSection = React2.memo((panelMetaInfo) => {
92
81
  const onPanelKeyDown = React2.useCallback(
93
82
  (e) => {
94
83
  const { key } = e;
95
- if (isDragging) {
84
+ const isDragAndDropHappening = getIsDragAndDropHappening();
85
+ if (isDragAndDropHappening) {
96
86
  e.preventDefault();
97
87
  return;
98
88
  }
@@ -112,14 +102,14 @@ const PanelContentMiddleSection = React2.memo((panelMetaInfo) => {
112
102
  }
113
103
  },
114
104
  [
115
- isDragging,
105
+ getIsDragAndDropHappening,
106
+ trackFocusRegionPanelItem,
116
107
  isDestinationPanel,
117
108
  trackFocusActionParent,
118
109
  trackFocusItemFirst,
119
- trackFocusItemLast,
110
+ withLoadMore,
120
111
  trackFocusLoadMoreBtn,
121
- trackFocusRegionPanelItem,
122
- withLoadMore
112
+ trackFocusItemLast
123
113
  ]
124
114
  );
125
115
  return /* @__PURE__ */ jsxs(
@@ -135,7 +125,7 @@ const PanelContentMiddleSection = React2.memo((panelMetaInfo) => {
135
125
  showEmptyMessage ? /* @__PURE__ */ jsx(EmptyItems, { ...panelMetaInfo }) : null,
136
126
  showItems ? /* @__PURE__ */ jsx(ItemListWrapperWithContext, { ...panelMetaInfo }) : null
137
127
  ] }),
138
- hasMultipleSelection ? /* @__PURE__ */ jsx(MultipleSelectionAction, { isDestinationPanel }) : null
128
+ hasMultipleSelection ? /* @__PURE__ */ jsx(MultipleSelectionAction, { ...panelMetaInfo }) : null
139
129
  ]
140
130
  }
141
131
  );
@@ -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 outline: none;\n\n &::after {\n position: absolute;\n content: ' ';\n outline: 2px solid brand-700;\n outline-offset: -2px;\n width: 100%;\n height: 100%;\n }\n }\n`;\nconst StyledMidScroller = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.LIST_WRAPPER_MID })`\n overflow: auto;\n max-height: '500px';\n`;\nexport const PanelContentMiddleSection = React.memo((panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => {\n const { isDestinationPanel = false } = 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 destinationHasMultipleSelectedItems = useInternalStore((store) => store.destinationHasMultipleSelectedItems);\n const sourceHasMultipleSelectedItems = useInternalStore((store) => store.sourceHasMultipleSelectedItems);\n const hasMultipleSelection = isDestinationPanel\n ? destinationHasMultipleSelectedItems\n : sourceHasMultipleSelectedItems;\n const isDragging = useInternalStore((state) => state.lastActiveId !== '');\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 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\n if (isDragging) {\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) trackFocusLoadMoreBtn();\n else trackFocusItemLast();\n }\n }\n },\n [\n isDragging,\n isDestinationPanel,\n trackFocusActionParent,\n trackFocusItemFirst,\n trackFocusItemLast,\n trackFocusLoadMoreBtn,\n trackFocusRegionPanelItem,\n withLoadMore,\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 isDestinationPanel={isDestinationPanel} /> : null}\n </StyledListWrapperMid>\n );\n});\n"],
5
- "mappings": "AAAA,YAAY,WAAW;AC6IjB,SACe,KADf;AA7IN,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+B;AACxC,SAAS,uBAAuB;AA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A;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;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,2BAAwB,oBAAwC,IAAK;AAAA;AAAA;AAAA,EAChG;AAEJ,CAAC;",
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 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) trackFocusLoadMoreBtn();\n else trackFocusItemLast();\n }\n }\n },\n [\n getIsDragAndDropHappening,\n trackFocusRegionPanelItem,\n isDestinationPanel,\n trackFocusActionParent,\n trackFocusItemFirst,\n withLoadMore,\n trackFocusLoadMoreBtn,\n trackFocusItemLast,\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;ACiIjB,SACe,KADf;AAjIN,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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A,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.original.id] = true;
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.original.id] = 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 </StyledSelection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MACjC,OAAO;AACL,cAAM,eAAkE,CAAC;AACzE,2BAAmB,QAAQ,CAAC,mBAAmB;AAC7C,uBAAa,eAAe,SAAS,MAAM;AAAA,QAC7C,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;",
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;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