@elliemae/ds-shuttle-v2 3.14.0-next.6 → 3.14.0-next.7

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 (138) 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/useShuttleV2.js +2 -0
  13. package/dist/cjs/config/useShuttleV2.js.map +2 -2
  14. package/dist/cjs/config/useStore/createAtomInStore.bak +18 -0
  15. package/dist/cjs/config/useStore/useStore.js +8 -0
  16. package/dist/cjs/config/useStore/useStore.js.map +2 -2
  17. package/dist/cjs/config/{useStore/createAtomInStore.js → useValidateProps.js} +9 -13
  18. package/dist/cjs/config/useValidateProps.js.map +7 -0
  19. package/dist/cjs/constants/index.js +3 -1
  20. package/dist/cjs/constants/index.js.map +2 -2
  21. package/dist/cjs/parts/Dnd/DndHandle.js +5 -5
  22. package/dist/cjs/parts/Dnd/DndHandle.js.map +2 -2
  23. package/dist/cjs/parts/Dnd/DragOverlay.js +47 -0
  24. package/dist/cjs/parts/Dnd/DragOverlay.js.map +7 -0
  25. package/dist/cjs/parts/Header.js +3 -3
  26. package/dist/cjs/parts/Header.js.map +2 -2
  27. package/dist/cjs/parts/HoC/withConditionalDnDRowContext.js +42 -17
  28. package/dist/cjs/parts/HoC/withConditionalDnDRowContext.js.map +3 -3
  29. package/dist/cjs/parts/HoC/withConditionalUseSortable.js +4 -3
  30. package/dist/cjs/parts/HoC/withConditionalUseSortable.js.map +2 -2
  31. package/dist/cjs/parts/Item/Item.js +38 -22
  32. package/dist/cjs/parts/Item/Item.js.map +2 -2
  33. package/dist/cjs/parts/Item/ItemActions/ItemActions.js +7 -7
  34. package/dist/cjs/parts/Item/ItemActions/ItemActions.js.map +2 -2
  35. package/dist/cjs/parts/Item/ItemActions/useActionsLogicHandlers.js +6 -38
  36. package/dist/cjs/parts/Item/ItemActions/useActionsLogicHandlers.js.map +2 -2
  37. package/dist/cjs/parts/Item/ItemActions/useInnerRefHandlers.js +2 -2
  38. package/dist/cjs/parts/Item/ItemActions/useInnerRefHandlers.js.map +2 -2
  39. package/dist/cjs/parts/Item/ItemMiddleSection.js +20 -8
  40. package/dist/cjs/parts/Item/ItemMiddleSection.js.map +2 -2
  41. package/dist/cjs/parts/Item/ItemOverlay.js +15 -7
  42. package/dist/cjs/parts/Item/ItemOverlay.js.map +2 -2
  43. package/dist/cjs/parts/Item/ItemSelection.js +3 -1
  44. package/dist/cjs/parts/Item/ItemSelection.js.map +2 -2
  45. package/dist/cjs/parts/Item/useItemArrowNavigation.js +21 -17
  46. package/dist/cjs/parts/Item/useItemArrowNavigation.js.map +2 -2
  47. package/dist/cjs/parts/Item/useSelectionLogic.js +16 -9
  48. package/dist/cjs/parts/Item/useSelectionLogic.js.map +2 -2
  49. package/dist/cjs/parts/Panel/bottom/LoadingMore.js +1 -1
  50. package/dist/cjs/parts/Panel/bottom/LoadingMore.js.map +2 -2
  51. package/dist/cjs/parts/Panel/bottom/PanelContentBottomSection.js +1 -1
  52. package/dist/cjs/parts/Panel/bottom/PanelContentBottomSection.js.map +1 -1
  53. package/dist/cjs/parts/Panel/bottom/useLoadMoreBtnArrowNavigation.js +4 -3
  54. package/dist/cjs/parts/Panel/bottom/useLoadMoreBtnArrowNavigation.js.map +2 -2
  55. package/dist/cjs/parts/Panel/middle/{ItemListWrapper.js → ItemListWrapper/Index.js} +26 -19
  56. package/dist/cjs/parts/Panel/middle/ItemListWrapper/Index.js.map +7 -0
  57. package/dist/cjs/parts/Panel/middle/ItemListWrapper/getDatumFlags.js +37 -0
  58. package/dist/cjs/parts/Panel/middle/ItemListWrapper/getDatumFlags.js.map +7 -0
  59. package/dist/cjs/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.js +57 -0
  60. package/dist/cjs/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.js.map +7 -0
  61. package/dist/cjs/parts/Panel/middle/MultipleSelectionAction.js +2 -2
  62. package/dist/cjs/parts/Panel/middle/MultipleSelectionAction.js.map +2 -2
  63. package/dist/cjs/parts/Panel/middle/PanelContentMiddleSection.js +10 -9
  64. package/dist/cjs/parts/Panel/middle/PanelContentMiddleSection.js.map +2 -2
  65. package/dist/cjs/react-desc-prop-types.js +31 -14
  66. package/dist/cjs/react-desc-prop-types.js.map +2 -2
  67. package/dist/esm/DSShuttleV2.js.map +2 -2
  68. package/dist/esm/config/DSShuttleV2Definitions.js.map +1 -1
  69. package/dist/esm/config/itemMovementHelpers.js +99 -74
  70. package/dist/esm/config/itemMovementHelpers.js.map +2 -2
  71. package/dist/esm/config/useAutoCalculated/useDataStructure.js +55 -34
  72. package/dist/esm/config/useAutoCalculated/useDataStructure.js.map +2 -2
  73. package/dist/esm/config/useAutoCalculated/useShuttleVirtualized.js.map +2 -2
  74. package/dist/esm/config/useFocusTracker/useFocusActionTrackers.js +6 -6
  75. package/dist/esm/config/useFocusTracker/useFocusActionTrackers.js.map +2 -2
  76. package/dist/esm/config/useFocusTracker/useFocusItemTracker.js +5 -5
  77. package/dist/esm/config/useFocusTracker/useFocusItemTracker.js.map +2 -2
  78. package/dist/esm/config/useShuttleV2.js +3 -1
  79. package/dist/esm/config/useShuttleV2.js.map +2 -2
  80. package/dist/esm/config/useStore/createAtomInStore.bak +18 -0
  81. package/dist/esm/config/useStore/useStore.js +8 -0
  82. package/dist/esm/config/useStore/useStore.js.map +2 -2
  83. package/dist/esm/config/useValidateProps.js +10 -0
  84. package/dist/esm/config/useValidateProps.js.map +7 -0
  85. package/dist/esm/constants/index.js +3 -1
  86. package/dist/esm/constants/index.js.map +2 -2
  87. package/dist/esm/parts/Dnd/DndHandle.js +5 -5
  88. package/dist/esm/parts/Dnd/DndHandle.js.map +2 -2
  89. package/dist/esm/parts/Dnd/DragOverlay.js +21 -0
  90. package/dist/esm/parts/Dnd/DragOverlay.js.map +7 -0
  91. package/dist/esm/parts/Header.js +3 -3
  92. package/dist/esm/parts/Header.js.map +2 -2
  93. package/dist/esm/parts/HoC/withConditionalDnDRowContext.js +43 -18
  94. package/dist/esm/parts/HoC/withConditionalDnDRowContext.js.map +3 -3
  95. package/dist/esm/parts/HoC/withConditionalUseSortable.js +4 -3
  96. package/dist/esm/parts/HoC/withConditionalUseSortable.js.map +2 -2
  97. package/dist/esm/parts/Item/Item.js +38 -22
  98. package/dist/esm/parts/Item/Item.js.map +2 -2
  99. package/dist/esm/parts/Item/ItemActions/ItemActions.js +7 -7
  100. package/dist/esm/parts/Item/ItemActions/ItemActions.js.map +2 -2
  101. package/dist/esm/parts/Item/ItemActions/useActionsLogicHandlers.js +7 -39
  102. package/dist/esm/parts/Item/ItemActions/useActionsLogicHandlers.js.map +2 -2
  103. package/dist/esm/parts/Item/ItemActions/useInnerRefHandlers.js +2 -2
  104. package/dist/esm/parts/Item/ItemActions/useInnerRefHandlers.js.map +2 -2
  105. package/dist/esm/parts/Item/ItemMiddleSection.js +20 -8
  106. package/dist/esm/parts/Item/ItemMiddleSection.js.map +2 -2
  107. package/dist/esm/parts/Item/ItemOverlay.js +15 -7
  108. package/dist/esm/parts/Item/ItemOverlay.js.map +2 -2
  109. package/dist/esm/parts/Item/ItemSelection.js +3 -1
  110. package/dist/esm/parts/Item/ItemSelection.js.map +2 -2
  111. package/dist/esm/parts/Item/useItemArrowNavigation.js +21 -17
  112. package/dist/esm/parts/Item/useItemArrowNavigation.js.map +2 -2
  113. package/dist/esm/parts/Item/useSelectionLogic.js +16 -9
  114. package/dist/esm/parts/Item/useSelectionLogic.js.map +2 -2
  115. package/dist/esm/parts/Panel/bottom/LoadingMore.js +1 -1
  116. package/dist/esm/parts/Panel/bottom/LoadingMore.js.map +2 -2
  117. package/dist/esm/parts/Panel/bottom/PanelContentBottomSection.js +1 -1
  118. package/dist/esm/parts/Panel/bottom/PanelContentBottomSection.js.map +1 -1
  119. package/dist/esm/parts/Panel/bottom/useLoadMoreBtnArrowNavigation.js +4 -3
  120. package/dist/esm/parts/Panel/bottom/useLoadMoreBtnArrowNavigation.js.map +2 -2
  121. package/dist/esm/parts/Panel/middle/{ItemListWrapper.js → ItemListWrapper/Index.js} +23 -16
  122. package/dist/esm/parts/Panel/middle/ItemListWrapper/Index.js.map +7 -0
  123. package/dist/esm/parts/Panel/middle/ItemListWrapper/getDatumFlags.js +11 -0
  124. package/dist/esm/parts/Panel/middle/ItemListWrapper/getDatumFlags.js.map +7 -0
  125. package/dist/esm/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.js +31 -0
  126. package/dist/esm/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.js.map +7 -0
  127. package/dist/esm/parts/Panel/middle/MultipleSelectionAction.js +2 -2
  128. package/dist/esm/parts/Panel/middle/MultipleSelectionAction.js.map +2 -2
  129. package/dist/esm/parts/Panel/middle/PanelContentMiddleSection.js +9 -8
  130. package/dist/esm/parts/Panel/middle/PanelContentMiddleSection.js.map +2 -2
  131. package/dist/esm/react-desc-prop-types.js +32 -15
  132. package/dist/esm/react-desc-prop-types.js.map +2 -2
  133. package/package.json +12 -12
  134. package/dist/cjs/config/useStore/createAtomInStore.js.map +0 -7
  135. package/dist/cjs/parts/Panel/middle/ItemListWrapper.js.map +0 -7
  136. package/dist/esm/config/useStore/createAtomInStore.js +0 -14
  137. package/dist/esm/config/useStore/createAtomInStore.js.map +0 -7
  138. package/dist/esm/parts/Panel/middle/ItemListWrapper.js.map +0 -7
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/DSShuttleV2.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { useShuttleV2 } from './config/useShuttleV2';\nimport {\n InternalProvider,\n PropsProvider,\n useShuttleV2InternalStoreConfig,\n useShuttleV2PropsStoreConfig,\n // useInternalStore,\n} from './config/useStore';\nimport { type DSShuttleV2T } from './react-desc-prop-types';\nimport { MainContent } from './parts/MainContent';\n\nconst ConfiguredComponent = (props: { userProps: DSShuttleV2T.Props }) => {\n useShuttleV2(props.userProps);\n // const store = useInternalStore((state) => state);\n // React.useEffect(() => {\n // console.group('-----------------------------------------');\n // console.groupCollapsed('Full Store');\n // console.log(store);\n // console.groupEnd();\n // console.groupEnd();\n // }, [store]);\n\n return <MainContent />;\n};\n\nexport const DSShuttleV2 = (props: DSShuttleV2T.Props) => {\n const createInternalStore = useShuttleV2InternalStoreConfig(props);\n const createPropsStore = useShuttleV2PropsStoreConfig(props);\n\n return (\n <PropsProvider createStore={createPropsStore}>\n <InternalProvider createStore={createInternalStore}>\n <ConfiguredComponent userProps={props} />\n </InternalProvider>\n </PropsProvider>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADuBd;AAtBT,0BAA6B;AAC7B,sBAMO;AAEP,yBAA4B;AAE5B,MAAM,sBAAsB,CAAC,UAA6C;AACxE,wCAAa,MAAM,SAAS;AAU5B,SAAO,4CAAC,kCAAY;AACtB;AAEO,MAAM,cAAc,CAAC,UAA8B;AACxD,QAAM,0BAAsB,iDAAgC,KAAK;AACjE,QAAM,uBAAmB,8CAA6B,KAAK;AAE3D,SACE,4CAAC,iCAAc,aAAa,kBAC1B,sDAAC,oCAAiB,aAAa,qBAC7B,sDAAC,uBAAoB,WAAW,OAAO,GACzC,GACF;AAEJ;",
4
+ "sourcesContent": ["import React from 'react';\nimport { useShuttleV2 } from './config/useShuttleV2';\nimport {\n InternalProvider,\n PropsProvider,\n useShuttleV2InternalStoreConfig,\n useShuttleV2PropsStoreConfig,\n // useInternalStore,\n} from './config/useStore';\nimport { type DSShuttleV2T } from './react-desc-prop-types';\nimport { MainContent } from './parts/MainContent';\n\nconst ConfiguredComponent = (props: { userProps: DSShuttleV2T.Props }) => {\n useShuttleV2(props.userProps);\n // const store = useInternalStore((state) => state);\n // React.useEffect(() => {\n // console.group('-----------------------------------------');\n // console.groupCollapsed('Full Store');\n // // console.log(store);\n // console.log('focusItem', store.focusItem);\n // console.log('focusItemAction', store.focusItemAction);\n // console.log('focusRegion', store.focusRegion);\n // console.groupEnd();\n // console.groupEnd();\n // }, [store]);\n\n return <MainContent />;\n};\n\nexport const DSShuttleV2 = (props: DSShuttleV2T.Props) => {\n const createInternalStore = useShuttleV2InternalStoreConfig(props);\n const createPropsStore = useShuttleV2PropsStoreConfig(props);\n\n return (\n <PropsProvider createStore={createPropsStore}>\n <InternalProvider createStore={createInternalStore}>\n <ConfiguredComponent userProps={props} />\n </InternalProvider>\n </PropsProvider>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD0Bd;AAzBT,0BAA6B;AAC7B,sBAMO;AAEP,yBAA4B;AAE5B,MAAM,sBAAsB,CAAC,UAA6C;AACxE,wCAAa,MAAM,SAAS;AAa5B,SAAO,4CAAC,kCAAY;AACtB;AAEO,MAAM,cAAc,CAAC,UAA8B;AACxD,QAAM,0BAAsB,iDAAgC,KAAK;AACjE,QAAM,uBAAmB,8CAA6B,KAAK;AAE3D,SACE,4CAAC,iCAAc,aAAa,kBAC1B,sDAAC,oCAAiB,aAAa,qBAC7B,sDAAC,uBAAoB,WAAW,OAAO,GACzC,GACF;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/config/DSShuttleV2Definitions.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSShuttleV2Name = 'DSShuttleV2';\n\nexport const DSShuttleV2Slots = {\n HEADER_SEARCH_ICON: 'header-search-icon',\n WRAPPER: 'wrapper',\n PANEL_WRAPPER: 'panel-wrapper',\n LIST_WRAPPER: 'list-wrapper',\n ITEM_WRAPPER: 'item-wrapper',\n ITEM_ICON_WRAPPER: 'item-icon-wrapper',\n ITEM_LABEL_WRAPPER: 'item-label-wrapper',\n ITEM_MIDSECTION_WRAPPER: 'item-midsection-wrapper',\n ITEM_SELECTION: 'item-selection',\n ITEM_ACTIONS_WRAPPER: 'item-actions-wrapper',\n ITEM_ACTION_WRAPPER: 'item-action-wrapper',\n ITEM_ACTION_BTN: 'item-action-btn',\n ITEM_ACTION_BTN_DRILLDOWN_ICON: 'item-action-btn-drilldown-icon',\n ITEM_ACTION_BTN_TO_SOURCE_ICON: 'item-action-btn-to-source-icon',\n ITEM_ACTION_BTN_TO_DESTINATION_ICON: 'item-action-btn-to-destination-icon',\n LIST_BOTTOM_LOADING_MORE: 'list-bottom-loading-more',\n LIST_BOTTOM_LOAD_MORE_BTN: 'list-bottom-load-more-btn',\n LIST_WRAPPER_BOTTOM: 'list-wrapper-bottom',\n EMPTY_LIST_WRAPPER: 'empty-list-wrapper',\n ITEMS_WRAPPER: 'items-wrapper',\n LOADING_LIST_WRAPPER: 'loading-list-wrapper',\n MOVE_MULTIPLE_WRAPPER: 'move-multiple-wrapper',\n MOVE_MULTIPLE_BTN: 'move-multiple-btn',\n LIST_WRAPPER_MID: 'list-wrapper-mid',\n LIST_WRAPPER_TOP: 'list-wrapper-top',\n AREA_SEARCH_WRAPPER: 'area-search-wrapper',\n AREA_SEARCH_BAR: 'area-search-bar',\n AREA_SELECTION_HEADER: 'area-selection-header',\n AREA_SELECTION_HEADER_COUNT_LABEL: 'area-selection-header-count-label',\n};\n\nexport const DSShuttleV2DataTestIds = slotObjectToDataTestIds(DSShuttleV2Name, DSShuttleV2Slots);\n", "import * as React from 'react';\nexport { React };\n"],
4
+ "sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSShuttleV2Name = 'DSShuttleV2' as const;\n\nexport const DSShuttleV2Slots = {\n HEADER_SEARCH_ICON: 'header-search-icon',\n WRAPPER: 'wrapper',\n PANEL_WRAPPER: 'panel-wrapper',\n LIST_WRAPPER: 'list-wrapper',\n ITEM_WRAPPER: 'item-wrapper',\n ITEM_ICON_WRAPPER: 'item-icon-wrapper',\n ITEM_LABEL_WRAPPER: 'item-label-wrapper',\n ITEM_MIDSECTION_WRAPPER: 'item-midsection-wrapper',\n ITEM_SELECTION: 'item-selection',\n ITEM_ACTIONS_WRAPPER: 'item-actions-wrapper',\n ITEM_ACTION_WRAPPER: 'item-action-wrapper',\n ITEM_ACTION_BTN: 'item-action-btn',\n ITEM_ACTION_BTN_DRILLDOWN_ICON: 'item-action-btn-drilldown-icon',\n ITEM_ACTION_BTN_TO_SOURCE_ICON: 'item-action-btn-to-source-icon',\n ITEM_ACTION_BTN_TO_DESTINATION_ICON: 'item-action-btn-to-destination-icon',\n LIST_BOTTOM_LOADING_MORE: 'list-bottom-loading-more',\n LIST_BOTTOM_LOAD_MORE_BTN: 'list-bottom-load-more-btn',\n LIST_WRAPPER_BOTTOM: 'list-wrapper-bottom',\n EMPTY_LIST_WRAPPER: 'empty-list-wrapper',\n ITEMS_WRAPPER: 'items-wrapper',\n LOADING_LIST_WRAPPER: 'loading-list-wrapper',\n MOVE_MULTIPLE_WRAPPER: 'move-multiple-wrapper',\n MOVE_MULTIPLE_BTN: 'move-multiple-btn',\n LIST_WRAPPER_MID: 'list-wrapper-mid',\n LIST_WRAPPER_TOP: 'list-wrapper-top',\n AREA_SEARCH_WRAPPER: 'area-search-wrapper',\n AREA_SEARCH_BAR: 'area-search-bar',\n AREA_SELECTION_HEADER: 'area-selection-header',\n AREA_SELECTION_HEADER_COUNT_LABEL: 'area-selection-header-count-label',\n} as const;\n\nexport const DSShuttleV2DataTestIds = slotObjectToDataTestIds(DSShuttleV2Name, DSShuttleV2Slots);\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,kBAAkB;AAExB,MAAM,mBAAmB;AAAA,EAC9B,oBAAoB;AAAA,EACpB,SAAS;AAAA,EACT,eAAe;AAAA,EACf,cAAc;AAAA,EACd,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,oBAAoB;AAAA,EACpB,yBAAyB;AAAA,EACzB,gBAAgB;AAAA,EAChB,sBAAsB;AAAA,EACtB,qBAAqB;AAAA,EACrB,iBAAiB;AAAA,EACjB,gCAAgC;AAAA,EAChC,gCAAgC;AAAA,EAChC,qCAAqC;AAAA,EACrC,0BAA0B;AAAA,EAC1B,2BAA2B;AAAA,EAC3B,qBAAqB;AAAA,EACrB,oBAAoB;AAAA,EACpB,eAAe;AAAA,EACf,sBAAsB;AAAA,EACtB,uBAAuB;AAAA,EACvB,mBAAmB;AAAA,EACnB,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,qBAAqB;AAAA,EACrB,iBAAiB;AAAA,EACjB,uBAAuB;AAAA,EACvB,mCAAmC;AACrC;AAEO,MAAM,6BAAyB,0CAAwB,iBAAiB,gBAAgB;",
6
6
  "names": []
7
7
  }
@@ -24,104 +24,129 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
25
  var itemMovementHelpers_exports = {};
26
26
  __export(itemMovementHelpers_exports, {
27
- getNewDatasWithItemMoved: () => getNewDatasWithItemMoved,
27
+ useHandleMoveItem: () => useHandleMoveItem,
28
28
  useHandleMoveSelection: () => useHandleMoveSelection
29
29
  });
30
30
  module.exports = __toCommonJS(itemMovementHelpers_exports);
31
31
  var React = __toESM(require("react"));
32
32
  var import_react = __toESM(require("react"));
33
+ var import_ds_utilities = require("@elliemae/ds-utilities");
33
34
  var import_useStore = require("./useStore");
34
- const getNewDatasWithItemMoved = ({
35
- item,
36
- currData,
37
- currWithSoftDelete,
38
- otherData
39
- }) => {
40
- const { id, softDeleted } = item;
41
- const newCurrData = [...currData];
42
- const newOtherData = [...otherData];
43
- const currListIndex = newCurrData.findIndex((datum) => datum.id === id);
44
- const otherListIndex = newOtherData.findIndex((datum) => datum.id === id);
45
- const isCurrDataItemOriginalList = otherListIndex === -1 || otherListIndex !== -1 && softDeleted;
46
- let currRemoveAtIndex = -1;
47
- if (currListIndex !== -1) {
48
- if (isCurrDataItemOriginalList) {
49
- if (currWithSoftDelete)
50
- newCurrData[currListIndex].softDeleted = true;
51
- else
52
- currRemoveAtIndex = currListIndex;
53
- } else {
54
- currRemoveAtIndex = currListIndex;
55
- }
56
- }
57
- if (currRemoveAtIndex !== -1)
58
- newCurrData.splice(currRemoveAtIndex, 1);
59
- const shouldAppendToOtherData = otherListIndex === -1;
60
- if (shouldAppendToOtherData)
61
- newOtherData.push({ ...item, softDeleted: false });
62
- else
63
- newOtherData[otherListIndex].softDeleted = false;
64
- return {
65
- newCurrData,
66
- newOtherData
67
- };
68
- };
69
35
  const useHandleMoveSelection = ({ isDestinationPanel }) => {
70
- const currData = (0, import_useStore.usePropsStore)((state) => isDestinationPanel ? state.destinationData : state.sourceData);
71
- const currWithSoftDelete = (0, import_useStore.usePropsStore)(
72
- (state) => isDestinationPanel ? state.destinationWithSoftDelete : state.sourceWithSoftDelete
73
- );
74
- const currOnChange = (0, import_useStore.usePropsStore)(
75
- (state) => isDestinationPanel ? state.onDestinationChange : state.onSourceChange
76
- );
77
36
  const currOnRemove = (0, import_useStore.usePropsStore)(
78
37
  (state) => isDestinationPanel ? state.onDestinationRemove : state.onSourceRemove
79
38
  );
80
- const onSelectionChange = (0, import_useStore.usePropsStore)(
81
- (state) => isDestinationPanel ? state.onDestinationSelectionChange : state.onSourceSelectionChange
39
+ const currSoftDeletedItems = (0, import_useStore.usePropsStore)(
40
+ (state) => isDestinationPanel ? state.destinationSoftDeletedItems : state.sourceSoftDeletedItems
41
+ );
42
+ const currOnSoftDelete = (0, import_useStore.usePropsStore)(
43
+ (state) => isDestinationPanel ? state.onDestinationSoftDelete : state.onSourceSoftDelete
44
+ );
45
+ const otherSoftDeletedItems = (0, import_useStore.usePropsStore)(
46
+ (state) => isDestinationPanel ? state.sourceSoftDeletedItems : state.destinationSoftDeletedItems
82
47
  );
83
- const otherData = (0, import_useStore.usePropsStore)((state) => isDestinationPanel ? state.sourceData : state.destinationData);
84
- const otherPanelOnChange = (0, import_useStore.usePropsStore)(
85
- (state) => isDestinationPanel ? state.onSourceChange : state.onDestinationChange
48
+ const otherOnSoftDelete = (0, import_useStore.usePropsStore)(
49
+ (state) => isDestinationPanel ? state.onSourceSoftDelete : state.onDestinationSoftDelete
50
+ );
51
+ const currSelectionMap = (0, import_useStore.useInternalStore)(
52
+ (store) => isDestinationPanel ? store.destinationSelectionArray : store.sourceSelectionArray
53
+ );
54
+ const currOnSelectionChange = (0, import_useStore.usePropsStore)(
55
+ (state) => isDestinationPanel ? state.onDestinationSelectionChange : state.onSourceSelectionChange
86
56
  );
87
57
  const otherPanelOnAdd = (0, import_useStore.usePropsStore)((state) => isDestinationPanel ? state.onSourceAdd : state.onDestinationAdd);
88
58
  const destinationSelectionArray = (0, import_useStore.useInternalStore)((store) => store.destinationSelectionItemArray);
89
59
  const sourceSelectionArray = (0, import_useStore.useInternalStore)((store) => store.sourceSelectionItemArray);
90
60
  const selectedItems = isDestinationPanel ? destinationSelectionArray : sourceSelectionArray;
61
+ const mutableSelectedItems = (0, import_ds_utilities.useMakeMutable)(selectedItems);
62
+ const mutableCurrSelectionMap = (0, import_ds_utilities.useMakeMutable)(currSelectionMap);
63
+ const mutableCurrOnSelectionChange = (0, import_ds_utilities.useMakeMutable)(currOnSelectionChange);
64
+ const mutableCurrOnRemove = (0, import_ds_utilities.useMakeMutable)(currOnRemove);
65
+ const mutableOtherOnAdd = (0, import_ds_utilities.useMakeMutable)(otherPanelOnAdd);
66
+ const mutableCurrOnSoftDelete = (0, import_ds_utilities.useMakeMutable)(currOnSoftDelete);
67
+ const mutableOtherOnSoftDelete = (0, import_ds_utilities.useMakeMutable)(otherOnSoftDelete);
68
+ const mutableCurrSoftDeletedItems = (0, import_ds_utilities.useMakeMutable)(currSoftDeletedItems);
69
+ const mutableOtherSoftDeletedItems = (0, import_ds_utilities.useMakeMutable)(otherSoftDeletedItems);
91
70
  const moveSelection = import_react.default.useCallback(
92
71
  (event) => {
93
72
  event.preventDefault();
94
73
  event.stopPropagation();
95
- let iteratedNewCurrData = [...currData];
96
- let iteratedNewOtherData = [...otherData];
97
- selectedItems.forEach((datum) => {
98
- const { newCurrData, newOtherData } = getNewDatasWithItemMoved({
99
- item: datum,
100
- currData: iteratedNewCurrData,
101
- currWithSoftDelete,
102
- otherData: iteratedNewOtherData
103
- });
104
- iteratedNewCurrData = newCurrData;
105
- iteratedNewOtherData = newOtherData;
74
+ mutableCurrOnRemove.current(mutableSelectedItems.current, { event });
75
+ mutableOtherOnAdd.current(mutableSelectedItems.current, { event });
76
+ const currSoftDeletedMap = {};
77
+ const otherSoftDeletedMap = {};
78
+ mutableCurrSelectionMap.current.forEach((id) => {
79
+ currSoftDeletedMap[id] = true;
80
+ otherSoftDeletedMap[id] = false;
106
81
  });
107
- currOnChange(iteratedNewCurrData, { event, selectedItems });
108
- currOnRemove(selectedItems, { event });
109
- otherPanelOnChange(iteratedNewOtherData, { event, selectedItems });
110
- otherPanelOnAdd(selectedItems, { event });
111
- onSelectionChange({}, { event });
82
+ mutableCurrOnSoftDelete.current({ ...mutableCurrSoftDeletedItems.current, ...currSoftDeletedMap }, { event });
83
+ mutableOtherOnSoftDelete.current({ ...mutableOtherSoftDeletedItems.current, ...otherSoftDeletedMap }, { event });
84
+ mutableCurrOnSelectionChange.current({}, { event });
85
+ },
86
+ [
87
+ mutableCurrSelectionMap,
88
+ mutableCurrOnRemove,
89
+ mutableCurrOnSelectionChange,
90
+ mutableCurrOnSoftDelete,
91
+ mutableCurrSoftDeletedItems,
92
+ mutableOtherOnAdd,
93
+ mutableOtherOnSoftDelete,
94
+ mutableOtherSoftDeletedItems,
95
+ mutableSelectedItems
96
+ ]
97
+ );
98
+ const mutableMoveSelection = (0, import_ds_utilities.useMakeMutable)(moveSelection);
99
+ return import_react.default.useMemo(() => ({ moveSelection: mutableMoveSelection.current }), [mutableMoveSelection]);
100
+ };
101
+ const useHandleMoveItem = ({ datum, datumInternalMeta, isDestinationPanel }) => {
102
+ const currSoftDeletedItems = (0, import_useStore.usePropsStore)(
103
+ (state) => isDestinationPanel ? state.destinationSoftDeletedItems : state.sourceSoftDeletedItems
104
+ );
105
+ const otherSoftDeletedItems = (0, import_useStore.usePropsStore)(
106
+ (state) => isDestinationPanel ? state.sourceSoftDeletedItems : state.destinationSoftDeletedItems
107
+ );
108
+ const currOnSoftDelete = (0, import_useStore.usePropsStore)(
109
+ (state) => isDestinationPanel ? state.onDestinationSoftDelete : state.onSourceSoftDelete
110
+ );
111
+ const otherOnSoftDelete = (0, import_useStore.usePropsStore)(
112
+ (state) => isDestinationPanel ? state.onSourceSoftDelete : state.onDestinationSoftDelete
113
+ );
114
+ const currOnRemove = (0, import_useStore.usePropsStore)(
115
+ (state) => isDestinationPanel ? state.onDestinationRemove : state.onSourceRemove
116
+ );
117
+ const otherPanelOnAdd = (0, import_useStore.usePropsStore)((state) => isDestinationPanel ? state.onSourceAdd : state.onDestinationAdd);
118
+ const mutableCurrOnRemove = (0, import_ds_utilities.useMakeMutable)(currOnRemove);
119
+ const mutableOtherOnAdd = (0, import_ds_utilities.useMakeMutable)(otherPanelOnAdd);
120
+ const mutableCurrOnSoftDelete = (0, import_ds_utilities.useMakeMutable)(currOnSoftDelete);
121
+ const mutableOtherOnSoftDelete = (0, import_ds_utilities.useMakeMutable)(otherOnSoftDelete);
122
+ const mutableCurrSoftDeletedItems = (0, import_ds_utilities.useMakeMutable)(currSoftDeletedItems);
123
+ const mutableOtherSoftDeletedItems = (0, import_ds_utilities.useMakeMutable)(otherSoftDeletedItems);
124
+ const moveItem = import_react.default.useCallback(
125
+ (event) => {
126
+ event.preventDefault();
127
+ event.stopPropagation();
128
+ mutableCurrOnRemove.current([datum], { event });
129
+ mutableOtherOnAdd.current([datum], { event });
130
+ mutableCurrOnSoftDelete.current(
131
+ { ...mutableCurrSoftDeletedItems.current, [datumInternalMeta.hydratedId]: true },
132
+ { event }
133
+ );
134
+ mutableOtherOnSoftDelete.current(
135
+ { ...mutableOtherSoftDeletedItems.current, [datumInternalMeta.hydratedId]: false },
136
+ { event }
137
+ );
112
138
  },
113
139
  [
114
- currData,
115
- otherData,
116
- selectedItems,
117
- currOnChange,
118
- currOnRemove,
119
- otherPanelOnChange,
120
- otherPanelOnAdd,
121
- onSelectionChange,
122
- currWithSoftDelete
140
+ datum,
141
+ datumInternalMeta.hydratedId,
142
+ mutableCurrOnRemove,
143
+ mutableCurrOnSoftDelete,
144
+ mutableCurrSoftDeletedItems,
145
+ mutableOtherOnAdd,
146
+ mutableOtherOnSoftDelete,
147
+ mutableOtherSoftDeletedItems
123
148
  ]
124
149
  );
125
- return import_react.default.useMemo(() => ({ moveSelection }), [moveSelection]);
150
+ return moveItem;
126
151
  };
127
152
  //# sourceMappingURL=itemMovementHelpers.js.map
@@ -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';\nimport { type DSShuttleV2T } from '../react-desc-prop-types';\nimport { usePropsStore, useInternalStore } from './useStore';\n\nexport const getNewDatasWithItemMoved = ({\n item,\n currData,\n currWithSoftDelete,\n otherData,\n}: {\n item: DSShuttleV2T.Datum;\n currData: DSShuttleV2T.Datum[];\n currWithSoftDelete: boolean;\n otherData: DSShuttleV2T.Datum[];\n}) => {\n const { id, softDeleted } = item;\n const newCurrData = [...currData];\n const newOtherData = [...otherData];\n const currListIndex = newCurrData.findIndex((datum) => datum.id === id);\n const otherListIndex = newOtherData.findIndex((datum) => datum.id === id);\n const isCurrDataItemOriginalList = otherListIndex === -1 || (otherListIndex !== -1 && softDeleted);\n let currRemoveAtIndex = -1;\n /**\n * current data management\n * soft-deletion\n * if enabled\n * hard deletion\n * if not enabled\n * or\n * if we are \"moving back\" an item\n */\n if (currListIndex !== -1) {\n if (isCurrDataItemOriginalList) {\n // if curr data is the item's original list\n // soft-delete if users asks for soft-deletion\n if (currWithSoftDelete) newCurrData[currListIndex].softDeleted = true;\n // else hard delete\n else currRemoveAtIndex = currListIndex;\n } else {\n // else hard delete because we are moving back a soft-deleted element\n currRemoveAtIndex = currListIndex;\n }\n }\n // if hard-deletion was configured to be carried out -> hard delete in curr-data\n if (currRemoveAtIndex !== -1) newCurrData.splice(currRemoveAtIndex, 1);\n\n // we append to other data when it was not already present\n const shouldAppendToOtherData = otherListIndex === -1;\n // in the new list we don't treat the item as soft-deleted\n if (shouldAppendToOtherData) newOtherData.push({ ...item, softDeleted: false });\n // if it is already present we remove the soft-deleted status instead\n else newOtherData[otherListIndex].softDeleted = false;\n\n return {\n newCurrData,\n newOtherData,\n };\n};\nexport const useHandleMoveSelection = ({ isDestinationPanel }: { isDestinationPanel: boolean }) => {\n const currData = usePropsStore((state) => (isDestinationPanel ? state.destinationData : state.sourceData));\n const currWithSoftDelete = usePropsStore((state) =>\n isDestinationPanel ? state.destinationWithSoftDelete : state.sourceWithSoftDelete,\n );\n const currOnChange = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationChange : state.onSourceChange,\n );\n const currOnRemove = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationRemove : state.onSourceRemove,\n );\n\n const onSelectionChange = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationSelectionChange : state.onSourceSelectionChange,\n );\n\n const otherData = usePropsStore((state) => (isDestinationPanel ? state.sourceData : state.destinationData));\n const otherPanelOnChange = usePropsStore((state) =>\n isDestinationPanel ? state.onSourceChange : state.onDestinationChange,\n );\n const otherPanelOnAdd = usePropsStore((state) => (isDestinationPanel ? state.onSourceAdd : state.onDestinationAdd));\n const destinationSelectionArray = useInternalStore((store) => store.destinationSelectionItemArray);\n const sourceSelectionArray = useInternalStore((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 let iteratedNewCurrData = [...currData];\n let iteratedNewOtherData = [...otherData];\n selectedItems.forEach((datum) => {\n const { newCurrData, newOtherData } = getNewDatasWithItemMoved({\n item: datum,\n currData: iteratedNewCurrData,\n currWithSoftDelete,\n otherData: iteratedNewOtherData,\n });\n iteratedNewCurrData = newCurrData;\n iteratedNewOtherData = newOtherData;\n });\n currOnChange(iteratedNewCurrData, { event, selectedItems });\n currOnRemove(selectedItems, { event });\n\n otherPanelOnChange(iteratedNewOtherData, { event, selectedItems });\n otherPanelOnAdd(selectedItems, { event });\n onSelectionChange({}, { event });\n },\n [\n currData,\n otherData,\n selectedItems,\n currOnChange,\n currOnRemove,\n otherPanelOnChange,\n otherPanelOnAdd,\n onSelectionChange,\n currWithSoftDelete,\n ],\n );\n return React.useMemo(() => ({ moveSelection }), [moveSelection]);\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAA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,QAAQ,OAAO,EAAE,cAAc,IAAI,CAAC,aAAa,CAAC;AACjE;",
4
+ "sourcesContent": ["/* eslint-disable complexity */\n/* eslint-disable max-statements */\nimport React from 'react';\nimport { useMakeMutable } from '@elliemae/ds-utilities';\nimport { type DSButtonT } from '@elliemae/ds-button';\nimport { type DSShuttleV2T } from '../react-desc-prop-types';\nimport { usePropsStore, useInternalStore } from './useStore';\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 = useInternalStore((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 = useInternalStore((store) => store.destinationSelectionItemArray);\n const sourceSelectionArray = useInternalStore((store) => store.sourceSelectionItemArray);\n const selectedItems = isDestinationPanel ? destinationSelectionArray : sourceSelectionArray;\n\n const mutableSelectedItems = useMakeMutable(selectedItems);\n const mutableCurrSelectionMap = useMakeMutable(currSelectionMap);\n const mutableCurrOnSelectionChange = useMakeMutable(currOnSelectionChange);\n const mutableCurrOnRemove = useMakeMutable(currOnRemove);\n const mutableOtherOnAdd = useMakeMutable(otherPanelOnAdd);\n const mutableCurrOnSoftDelete = useMakeMutable(currOnSoftDelete);\n const mutableOtherOnSoftDelete = useMakeMutable(otherOnSoftDelete);\n const mutableCurrSoftDeletedItems = useMakeMutable(currSoftDeletedItems);\n const mutableOtherSoftDeletedItems = useMakeMutable(otherSoftDeletedItems);\n\n const moveSelection = React.useCallback(\n (event: Parameters<Required<DSButtonT.Props>['onClick']>[0]) => {\n event.preventDefault();\n event.stopPropagation();\n // movement\n mutableCurrOnRemove.current(mutableSelectedItems.current, { event });\n mutableOtherOnAdd.current(mutableSelectedItems.current, { event });\n // soft delete\n const currSoftDeletedMap: DSShuttleV2T.SoftDeletedMap = {};\n const otherSoftDeletedMap: DSShuttleV2T.SoftDeletedMap = {};\n mutableCurrSelectionMap.current.forEach((id) => {\n currSoftDeletedMap[id] = true;\n otherSoftDeletedMap[id] = false;\n });\n mutableCurrOnSoftDelete.current({ ...mutableCurrSoftDeletedItems.current, ...currSoftDeletedMap }, { event });\n mutableOtherOnSoftDelete.current({ ...mutableOtherSoftDeletedItems.current, ...otherSoftDeletedMap }, { event });\n // cleanup\n mutableCurrOnSelectionChange.current({}, { event });\n },\n [\n mutableCurrSelectionMap,\n mutableCurrOnRemove,\n mutableCurrOnSelectionChange,\n mutableCurrOnSoftDelete,\n mutableCurrSoftDeletedItems,\n mutableOtherOnAdd,\n mutableOtherOnSoftDelete,\n mutableOtherSoftDeletedItems,\n mutableSelectedItems,\n ],\n );\n // optimization ...\n const mutableMoveSelection = useMakeMutable(moveSelection);\n return React.useMemo(() => ({ moveSelection: mutableMoveSelection.current }), [mutableMoveSelection]);\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 mutableCurrOnRemove = useMakeMutable(currOnRemove);\n const mutableOtherOnAdd = useMakeMutable(otherPanelOnAdd);\n const mutableCurrOnSoftDelete = useMakeMutable(currOnSoftDelete);\n const mutableOtherOnSoftDelete = useMakeMutable(otherOnSoftDelete);\n const mutableCurrSoftDeletedItems = useMakeMutable(currSoftDeletedItems);\n const mutableOtherSoftDeletedItems = useMakeMutable(otherSoftDeletedItems);\n\n const moveItem = React.useCallback(\n (event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => {\n event.preventDefault();\n event.stopPropagation();\n mutableCurrOnRemove.current([datum], { event });\n mutableOtherOnAdd.current([datum], { event });\n mutableCurrOnSoftDelete.current(\n { ...mutableCurrSoftDeletedItems.current, [datumInternalMeta.hydratedId]: true },\n { event },\n );\n mutableOtherOnSoftDelete.current(\n { ...mutableOtherSoftDeletedItems.current, [datumInternalMeta.hydratedId]: false },\n { event },\n );\n },\n [\n datum,\n datumInternalMeta.hydratedId,\n mutableCurrOnRemove,\n mutableCurrOnSoftDelete,\n mutableCurrSoftDeletedItems,\n mutableOtherOnAdd,\n mutableOtherOnSoftDelete,\n mutableOtherSoftDeletedItems,\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;AAClB,0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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,0BAAsB,oCAAe,YAAY;AACvD,QAAM,wBAAoB,oCAAe,eAAe;AACxD,QAAM,8BAA0B,oCAAe,gBAAgB;AAC/D,QAAM,+BAA2B,oCAAe,iBAAiB;AACjE,QAAM,kCAA8B,oCAAe,oBAAoB;AACvE,QAAM,mCAA+B,oCAAe,qBAAqB;AAEzE,QAAM,WAAW,aAAAA,QAAM;AAAA,IACrB,CAAC,UAAwF;AACvF,YAAM,eAAe;AACrB,YAAM,gBAAgB;AACtB,0BAAoB,QAAQ,CAAC,KAAK,GAAG,EAAE,MAAM,CAAC;AAC9C,wBAAkB,QAAQ,CAAC,KAAK,GAAG,EAAE,MAAM,CAAC;AAC5C,8BAAwB;AAAA,QACtB,EAAE,GAAG,4BAA4B,SAAS,CAAC,kBAAkB,aAAa,KAAK;AAAA,QAC/E,EAAE,MAAM;AAAA,MACV;AACA,+BAAyB;AAAA,QACvB,EAAE,GAAG,6BAA6B,SAAS,CAAC,kBAAkB,aAAa,MAAM;AAAA,QACjF,EAAE,MAAM;AAAA,MACV;AAAA,IACF;AAAA,IACA;AAAA,MACE;AAAA,MACA,kBAAkB;AAAA,MAClB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;",
6
6
  "names": ["React"]
7
7
  }
@@ -29,42 +29,44 @@ __export(useDataStructure_exports, {
29
29
  module.exports = __toCommonJS(useDataStructure_exports);
30
30
  var React = __toESM(require("react"));
31
31
  var import_react = require("react");
32
- const getDatumFlags = (datum) => ({
33
- selectionPrevented: Boolean(datum.softDeleted || datum.preventMove),
34
- withActions: !datum.softDeleted,
35
- withMoveBtn: !datum.softDeleted && !datum.preventMove,
36
- withDrilldownBtn: !datum.softDeleted && !datum.preventDrilldown
37
- });
38
- const configureDestination = ({ destinationData, destinationSelectedItems }) => {
32
+ const configureDestination = ({
33
+ destinationData,
34
+ destinationSelectedItems,
35
+ destinationSoftDeletedItems,
36
+ getId
37
+ }) => {
39
38
  const destinationSelectedItemsMap = {};
40
- const destinationSelectionItemArray = [];
41
39
  const destinationSelectionArray = [];
40
+ const destinationSelectionableDataIds = [];
41
+ const destinationSelectionItemArray = [];
42
42
  const destinationConfiguredData = [];
43
43
  const destinationSelectionableData = [];
44
- const destinationSelectionableDataIds = [];
45
44
  destinationData.forEach((datum, i) => {
45
+ const hydratedId = getId(datum);
46
46
  let isSelected = false;
47
- if (destinationSelectedItems[datum.id] === true) {
47
+ if (destinationSelectedItems[hydratedId] === true) {
48
48
  destinationSelectionItemArray.push(datum);
49
- destinationSelectionArray.push(datum.id);
49
+ destinationSelectionArray.push(hydratedId);
50
50
  isSelected = true;
51
51
  }
52
- destinationSelectedItemsMap[datum.id] = { datum, index: i };
52
+ let softDeleted = false;
53
+ if (destinationSoftDeletedItems[hydratedId] === true) {
54
+ softDeleted = true;
55
+ }
56
+ destinationSelectedItemsMap[hydratedId] = { datum, index: i };
53
57
  const configuredItem = {
58
+ hydratedId,
54
59
  isSelected,
55
- ...getDatumFlags(datum),
60
+ softDeleted,
56
61
  original: datum,
57
62
  localIndex: i,
58
63
  isFirst: i === 0,
59
- isLast: i === destinationData.length - 1,
60
- uid: datum.id,
61
- depth: 0,
62
- realIndex: datum.id
64
+ isLast: i === destinationData.length - 1
63
65
  };
64
66
  destinationConfiguredData.push(configuredItem);
65
67
  if (!datum.preventMove) {
66
68
  destinationSelectionableData.push(configuredItem);
67
- destinationSelectionableDataIds.push(datum.id);
69
+ destinationSelectionableDataIds.push(hydratedId);
68
70
  }
69
71
  });
70
72
  const destinationHasMultipleSelectedItems = destinationSelectionArray.length >= 1;
@@ -80,36 +82,39 @@ const configureDestination = ({ destinationData, destinationSelectedItems }) =>
80
82
  destinationSelectionableIds
81
83
  };
82
84
  };
83
- const configureSource = ({ sourceData, sourceSelectedItems }) => {
85
+ const configureSource = ({ sourceData, sourceSelectedItems, sourceSoftDeletedItems, getId }) => {
84
86
  const sourceSelectedItemsMap = {};
85
- const sourceSelectionItemArray = [];
86
87
  const sourceSelectionArray = [];
88
+ const sourceSelectionableDataIds = [];
89
+ const sourceSelectionItemArray = [];
87
90
  const sourceConfiguredData = [];
88
91
  const sourceSelectionableData = [];
89
- const sourceSelectionableDataIds = [];
90
92
  sourceData.forEach((datum, i) => {
93
+ const hydratedId = getId(datum);
91
94
  let isSelected = false;
92
- if (sourceSelectedItems[datum.id] === true) {
95
+ if (sourceSelectedItems[hydratedId] === true) {
93
96
  sourceSelectionItemArray.push(datum);
94
- sourceSelectionArray.push(datum.id);
97
+ sourceSelectionArray.push(hydratedId);
95
98
  isSelected = true;
96
99
  }
97
- sourceSelectedItemsMap[datum.id] = { datum, index: i };
100
+ let softDeleted = false;
101
+ if (sourceSoftDeletedItems[hydratedId] === true) {
102
+ softDeleted = true;
103
+ }
104
+ sourceSelectedItemsMap[hydratedId] = { datum, index: i };
98
105
  const configuredItem = {
106
+ hydratedId,
99
107
  isSelected,
100
- ...getDatumFlags(datum),
108
+ softDeleted,
101
109
  original: datum,
102
110
  localIndex: i,
103
111
  isFirst: i === 0,
104
- isLast: i === sourceData.length - 1,
105
- uid: datum.id,
106
- depth: 0,
107
- realIndex: datum.id
112
+ isLast: i === sourceData.length - 1
108
113
  };
109
114
  sourceConfiguredData.push(configuredItem);
110
115
  if (!datum.preventMove) {
111
116
  sourceSelectionableData.push(configuredItem);
112
- sourceSelectionableDataIds.push(datum.id);
117
+ sourceSelectionableDataIds.push(hydratedId);
113
118
  }
114
119
  });
115
120
  const sourceHasMultipleSelectedItems = sourceSelectionArray.length >= 1;
@@ -126,13 +131,29 @@ const configureSource = ({ sourceData, sourceSelectedItems }) => {
126
131
  };
127
132
  };
128
133
  const useDataStructure = (propsFromUser) => {
129
- const { sourceData, sourceSelectedItems, destinationData, destinationSelectedItems } = propsFromUser;
134
+ const {
135
+ sourceData,
136
+ sourceSelectedItems,
137
+ destinationData,
138
+ destinationSelectedItems,
139
+ getId,
140
+ sourceSoftDeletedItems,
141
+ destinationSoftDeletedItems
142
+ } = propsFromUser;
130
143
  return (0, import_react.useMemo)(
131
144
  () => ({
132
- ...configureSource({ sourceData, sourceSelectedItems }),
133
- ...configureDestination({ destinationData, destinationSelectedItems })
145
+ ...configureSource({ sourceData, sourceSelectedItems, sourceSoftDeletedItems, getId }),
146
+ ...configureDestination({ destinationData, destinationSelectedItems, destinationSoftDeletedItems, getId })
134
147
  }),
135
- [destinationData, destinationSelectedItems, sourceData, sourceSelectedItems]
148
+ [
149
+ sourceData,
150
+ sourceSelectedItems,
151
+ sourceSoftDeletedItems,
152
+ getId,
153
+ destinationData,
154
+ destinationSelectedItems,
155
+ destinationSoftDeletedItems
156
+ ]
136
157
  );
137
158
  };
138
159
  //# sourceMappingURL=useDataStructure.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/config/useAutoCalculated/useDataStructure.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["// import { useRef } from 'react';\n// import { useVirtual } from 'react-virtual';\nimport { useMemo } from 'react';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types';\n\nconst getDatumFlags = (datum: DSShuttleV2T.Datum) => ({\n selectionPrevented: Boolean(datum.softDeleted || datum.preventMove),\n withActions: !datum.softDeleted,\n withMoveBtn: !datum.softDeleted && !datum.preventMove,\n withDrilldownBtn: !datum.softDeleted && !datum.preventDrilldown,\n});\n\ntype ConfigureDestinationConfig = {\n destinationData: DSShuttleV2T.Datum[];\n destinationSelectedItems: Record<DSShuttleV2T.Datum['id'], boolean>;\n};\nconst configureDestination = ({ destinationData, destinationSelectedItems }: ConfigureDestinationConfig) => {\n const destinationSelectedItemsMap: Record<string, { datum: DSShuttleV2T.Datum; index: number }> = {};\n const destinationSelectionItemArray: DSShuttleV2T.Datum[] = [];\n const destinationSelectionArray: DSShuttleV2T.Datum['id'][] = [];\n const destinationConfiguredData: DSShuttleV2T.ConfiguredDatum[] = [];\n const destinationSelectionableData: DSShuttleV2T.ConfiguredDatum[] = [];\n const destinationSelectionableDataIds: DSShuttleV2T.Datum['id'][] = [];\n destinationData.forEach((datum, i) => {\n let isSelected = false;\n if (destinationSelectedItems[datum.id] === true) {\n destinationSelectionItemArray.push(datum);\n destinationSelectionArray.push(datum.id);\n isSelected = true;\n }\n destinationSelectedItemsMap[datum.id] = { datum, index: i };\n const configuredItem = {\n isSelected,\n ...getDatumFlags(datum),\n original: datum,\n localIndex: i,\n isFirst: i === 0,\n isLast: i === destinationData.length - 1,\n uid: datum.id,\n depth: 0,\n realIndex: datum.id,\n };\n destinationConfiguredData.push(configuredItem);\n if (!datum.preventMove) {\n destinationSelectionableData.push(configuredItem);\n destinationSelectionableDataIds.push(datum.id);\n }\n });\n const destinationHasMultipleSelectedItems = destinationSelectionArray.length >= 1;\n const destinationSelectionableIds = destinationSelectionableDataIds.join(' ');\n\n return {\n destinationSelectedItemsMap,\n destinationSelectionItemArray,\n destinationSelectionArray,\n destinationHasMultipleSelectedItems,\n destinationConfiguredData,\n destinationSelectionableData,\n destinationSelectionableDataIds,\n destinationSelectionableIds,\n };\n};\ntype ConfigureSourceConfig = {\n sourceData: DSShuttleV2T.Datum[];\n sourceSelectedItems: Record<DSShuttleV2T.Datum['id'], boolean>;\n};\n\nconst configureSource = ({ sourceData, sourceSelectedItems }: ConfigureSourceConfig) => {\n const sourceSelectedItemsMap: Record<string, { datum: DSShuttleV2T.Datum; index: number }> = {};\n const sourceSelectionItemArray: DSShuttleV2T.Datum[] = [];\n const sourceSelectionArray: DSShuttleV2T.Datum['id'][] = [];\n const sourceConfiguredData: DSShuttleV2T.ConfiguredDatum[] = [];\n const sourceSelectionableData: DSShuttleV2T.ConfiguredDatum[] = [];\n const sourceSelectionableDataIds: DSShuttleV2T.Datum['id'][] = [];\n sourceData.forEach((datum, i) => {\n let isSelected = false;\n if (sourceSelectedItems[datum.id] === true) {\n sourceSelectionItemArray.push(datum);\n sourceSelectionArray.push(datum.id);\n isSelected = true;\n }\n\n sourceSelectedItemsMap[datum.id] = { datum, index: i };\n const configuredItem = {\n isSelected,\n ...getDatumFlags(datum),\n original: datum,\n localIndex: i,\n isFirst: i === 0,\n isLast: i === sourceData.length - 1,\n // dnd\n uid: datum.id,\n depth: 0,\n realIndex: datum.id,\n };\n sourceConfiguredData.push(configuredItem);\n if (!datum.preventMove) {\n sourceSelectionableData.push(configuredItem);\n sourceSelectionableDataIds.push(datum.id);\n }\n });\n const sourceHasMultipleSelectedItems = sourceSelectionArray.length >= 1;\n const sourceSelectionableIds = sourceSelectionableDataIds.join(' ');\n return {\n sourceConfiguredData,\n sourceSelectedItemsMap,\n sourceSelectionItemArray,\n sourceSelectionArray,\n sourceHasMultipleSelectedItems,\n sourceSelectionableData,\n sourceSelectionableDataIds,\n sourceSelectionableIds,\n };\n};\n\nexport const useDataStructure = (propsFromUser: DSShuttleV2T.InternalProps) => {\n const { sourceData, sourceSelectedItems, destinationData, destinationSelectedItems } = propsFromUser;\n return useMemo(\n () => ({\n ...configureSource({ sourceData, sourceSelectedItems }),\n ...configureDestination({ destinationData, destinationSelectedItems }),\n }),\n [destinationData, destinationSelectedItems, sourceData, sourceSelectedItems],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAAwB;AAGxB,MAAM,gBAAgB,CAAC,WAA+B;AAAA,EACpD,oBAAoB,QAAQ,MAAM,eAAe,MAAM,WAAW;AAAA,EAClE,aAAa,CAAC,MAAM;AAAA,EACpB,aAAa,CAAC,MAAM,eAAe,CAAC,MAAM;AAAA,EAC1C,kBAAkB,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,0BAA0D,CAAC;AACjE,QAAM,6BAAyD,CAAC;AAChE,aAAW,QAAQ,CAAC,OAAO,MAAM;AAC/B,QAAI,aAAa;AACjB,QAAI,oBAAoB,MAAM,QAAQ,MAAM;AAC1C,+BAAyB,KAAK,KAAK;AACnC,2BAAqB,KAAK,MAAM,EAAE;AAClC,mBAAa;AAAA,IACf;AAEA,2BAAuB,MAAM,MAAM,EAAE,OAAO,OAAO,EAAE;AACrD,UAAM,iBAAiB;AAAA,MACrB;AAAA,MACA,GAAG,cAAc,KAAK;AAAA,MACtB,UAAU;AAAA,MACV,YAAY;AAAA,MACZ,SAAS,MAAM;AAAA,MACf,QAAQ,MAAM,WAAW,SAAS;AAAA,MAElC,KAAK,MAAM;AAAA,MACX,OAAO;AAAA,MACP,WAAW,MAAM;AAAA,IACnB;AACA,yBAAqB,KAAK,cAAc;AACxC,QAAI,CAAC,MAAM,aAAa;AACtB,8BAAwB,KAAK,cAAc;AAC3C,iCAA2B,KAAK,MAAM,EAAE;AAAA,IAC1C;AAAA,EACF,CAAC;AACD,QAAM,iCAAiC,qBAAqB,UAAU;AACtE,QAAM,yBAAyB,2BAA2B,KAAK,GAAG;AAClE,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,MAAM,mBAAmB,CAAC,kBAA8C;AAC7E,QAAM,EAAE,YAAY,qBAAqB,iBAAiB,yBAAyB,IAAI;AACvF,aAAO;AAAA,IACL,OAAO;AAAA,MACL,GAAG,gBAAgB,EAAE,YAAY,oBAAoB,CAAC;AAAA,MACtD,GAAG,qBAAqB,EAAE,iBAAiB,yBAAyB,CAAC;AAAA,IACvE;AAAA,IACA,CAAC,iBAAiB,0BAA0B,YAAY,mBAAmB;AAAA,EAC7E;AACF;",
4
+ "sourcesContent": ["// import { useRef } from 'react';\n// import { useVirtual } from 'react-virtual';\nimport { useMemo } from 'react';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types';\n\ntype ConfigureDestinationConfig = {\n destinationData: DSShuttleV2T.Datum[];\n destinationSelectedItems: DSShuttleV2T.SelectionMap;\n destinationSoftDeletedItems: DSShuttleV2T.SoftDeletedMap;\n getId: DSShuttleV2T.PrimaryKeyHydraters['getId'];\n};\nconst configureDestination = ({\n destinationData,\n destinationSelectedItems,\n destinationSoftDeletedItems,\n getId,\n}: ConfigureDestinationConfig) => {\n const destinationSelectedItemsMap: Record<string, { datum: DSShuttleV2T.Datum; index: number }> = {};\n const destinationSelectionArray: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n const destinationSelectionableDataIds: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n\n const destinationSelectionItemArray: DSShuttleV2T.Datum[] = [];\n const destinationConfiguredData: DSShuttleV2T.ConfiguredDatum[] = [];\n const destinationSelectionableData: DSShuttleV2T.ConfiguredDatum[] = [];\n\n destinationData.forEach((datum, i) => {\n const hydratedId = getId(datum);\n let isSelected = false;\n if (destinationSelectedItems[hydratedId] === true) {\n destinationSelectionItemArray.push(datum);\n destinationSelectionArray.push(hydratedId);\n isSelected = true;\n }\n let softDeleted = false;\n if (destinationSoftDeletedItems[hydratedId] === true) {\n softDeleted = true;\n }\n destinationSelectedItemsMap[hydratedId] = { datum, index: i };\n const configuredItem = {\n hydratedId,\n isSelected,\n softDeleted,\n original: datum,\n localIndex: i,\n isFirst: i === 0,\n isLast: i === destinationData.length - 1,\n } as const;\n destinationConfiguredData.push(configuredItem);\n if (!datum.preventMove) {\n destinationSelectionableData.push(configuredItem);\n destinationSelectionableDataIds.push(hydratedId);\n }\n });\n const destinationHasMultipleSelectedItems = destinationSelectionArray.length >= 1;\n const destinationSelectionableIds = destinationSelectionableDataIds.join(' ');\n\n return {\n destinationSelectedItemsMap,\n destinationSelectionItemArray,\n destinationSelectionArray,\n destinationHasMultipleSelectedItems,\n destinationConfiguredData,\n destinationSelectionableData,\n destinationSelectionableDataIds,\n destinationSelectionableIds,\n };\n};\ntype ConfigureSourceConfig = {\n sourceData: DSShuttleV2T.Datum[];\n sourceSelectedItems: DSShuttleV2T.SelectionMap;\n sourceSoftDeletedItems: DSShuttleV2T.SoftDeletedMap;\n getId: DSShuttleV2T.PrimaryKeyHydraters['getId'];\n};\n\nconst configureSource = ({ sourceData, sourceSelectedItems, sourceSoftDeletedItems, getId }: ConfigureSourceConfig) => {\n const sourceSelectedItemsMap: Record<string, { datum: DSShuttleV2T.Datum; index: number }> = {};\n const sourceSelectionArray: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n const sourceSelectionableDataIds: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n\n const sourceSelectionItemArray: DSShuttleV2T.Datum[] = [];\n const sourceConfiguredData: DSShuttleV2T.ConfiguredDatum[] = [];\n const sourceSelectionableData: DSShuttleV2T.ConfiguredDatum[] = [];\n sourceData.forEach((datum, i) => {\n const hydratedId = getId(datum);\n let isSelected = false;\n if (sourceSelectedItems[hydratedId] === true) {\n sourceSelectionItemArray.push(datum);\n sourceSelectionArray.push(hydratedId);\n isSelected = true;\n }\n let softDeleted = false;\n if (sourceSoftDeletedItems[hydratedId] === true) {\n softDeleted = true;\n }\n\n sourceSelectedItemsMap[hydratedId] = { datum, index: i };\n const configuredItem = {\n hydratedId,\n isSelected,\n softDeleted,\n original: datum,\n localIndex: i,\n isFirst: i === 0,\n isLast: i === sourceData.length - 1,\n } as const;\n sourceConfiguredData.push(configuredItem);\n if (!datum.preventMove) {\n sourceSelectionableData.push(configuredItem);\n sourceSelectionableDataIds.push(hydratedId);\n }\n });\n const sourceHasMultipleSelectedItems = sourceSelectionArray.length >= 1;\n const sourceSelectionableIds = sourceSelectionableDataIds.join(' ');\n return {\n sourceConfiguredData,\n sourceSelectedItemsMap,\n sourceSelectionItemArray,\n sourceSelectionArray,\n sourceHasMultipleSelectedItems,\n sourceSelectionableData,\n sourceSelectionableDataIds,\n sourceSelectionableIds,\n };\n};\n\nexport const useDataStructure = (propsFromUser: DSShuttleV2T.InternalProps) => {\n const {\n sourceData,\n sourceSelectedItems,\n destinationData,\n destinationSelectedItems,\n getId,\n sourceSoftDeletedItems,\n destinationSoftDeletedItems,\n } = propsFromUser;\n return useMemo(\n () => ({\n ...configureSource({ sourceData, sourceSelectedItems, sourceSoftDeletedItems, getId }),\n ...configureDestination({ destinationData, destinationSelectedItems, destinationSoftDeletedItems, getId }),\n }),\n [\n sourceData,\n sourceSelectedItems,\n sourceSoftDeletedItems,\n getId,\n destinationData,\n destinationSelectedItems,\n destinationSoftDeletedItems,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAAwB;AASxB,MAAM,uBAAuB,CAAC;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAkC;AAChC,QAAM,8BAA4F,CAAC;AACnG,QAAM,4BAAwE,CAAC;AAC/E,QAAM,kCAA8E,CAAC;AAErF,QAAM,gCAAsD,CAAC;AAC7D,QAAM,4BAA4D,CAAC;AACnE,QAAM,+BAA+D,CAAC;AAEtE,kBAAgB,QAAQ,CAAC,OAAO,MAAM;AACpC,UAAM,aAAa,MAAM,KAAK;AAC9B,QAAI,aAAa;AACjB,QAAI,yBAAyB,gBAAgB,MAAM;AACjD,oCAA8B,KAAK,KAAK;AACxC,gCAA0B,KAAK,UAAU;AACzC,mBAAa;AAAA,IACf;AACA,QAAI,cAAc;AAClB,QAAI,4BAA4B,gBAAgB,MAAM;AACpD,oBAAc;AAAA,IAChB;AACA,gCAA4B,cAAc,EAAE,OAAO,OAAO,EAAE;AAC5D,UAAM,iBAAiB;AAAA,MACrB;AAAA,MACA;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MACV,YAAY;AAAA,MACZ,SAAS,MAAM;AAAA,MACf,QAAQ,MAAM,gBAAgB,SAAS;AAAA,IACzC;AACA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B,2BAA2B,KAAK,GAAG;AAClE,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,MAAM,mBAAmB,CAAC,kBAA8C;AAC7E,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AACJ,aAAO;AAAA,IACL,OAAO;AAAA,MACL,GAAG,gBAAgB,EAAE,YAAY,qBAAqB,wBAAwB,MAAM,CAAC;AAAA,MACrF,GAAG,qBAAqB,EAAE,iBAAiB,0BAA0B,6BAA6B,MAAM,CAAC;AAAA,IAC3G;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/config/useAutoCalculated/useShuttleVirtualized.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { useMemo, useCallback, useRef } from 'react';\nimport { useVirtual } from 'react-virtual';\n\nimport { type DSShuttleV2T } from '../../react-desc-prop-types';\n\ntype UseVirtualT = ReturnType<typeof useVirtual>;\ninterface UseVirtualizedT {\n destinationVirtualItems: UseVirtualT['virtualItems'];\n destinationMeasure: UseVirtualT['measure'];\n destinationScrollToIndex: UseVirtualT['scrollToIndex'];\n destinationScrollToOffset: UseVirtualT['scrollToOffset'];\n destinationTotalSize: UseVirtualT['totalSize'];\n destinationVirtualRef: React.Ref<HTMLDivElement>;\n sourceVirtualItems: UseVirtualT['virtualItems'];\n sourceMeasure: UseVirtualT['measure'];\n sourceScrollToIndex: UseVirtualT['scrollToIndex'];\n sourceScrollToOffset: UseVirtualT['scrollToOffset'];\n sourceTotalSize: UseVirtualT['totalSize'];\n sourceVirtualRef: React.Ref<HTMLDivElement>;\n}\nexport const useShuttleVirtualized = (propsWithDefaults: DSShuttleV2T.InternalProps): UseVirtualizedT => {\n const destinationVirtualRef = useRef<HTMLDivElement>(null);\n const sourceVirtualRef = useRef<HTMLDivElement>(null);\n\n const estimatedSize = useCallback(() => 36, []);\n\n const destinationVirtualConfig = useMemo(\n () => ({\n size: propsWithDefaults.destinationData.length,\n parentRef: destinationVirtualRef,\n overscan: 30,\n estimateSize: estimatedSize,\n }),\n [propsWithDefaults.destinationData.length, destinationVirtualRef, estimatedSize],\n );\n\n const {\n virtualItems: destinationVirtualItems,\n measure: destinationMeasure,\n scrollToIndex: destinationScrollToIndex,\n scrollToOffset: destinationScrollToOffset,\n totalSize: destinationTotalSize,\n }: ReturnType<typeof useVirtual> = useVirtual(destinationVirtualConfig);\n\n const sourceVirtualConfig = useMemo(\n () => ({\n size: propsWithDefaults.sourceData.length,\n parentRef: sourceVirtualRef,\n overscan: 30,\n estimateSize: estimatedSize,\n }),\n [propsWithDefaults.sourceData.length, sourceVirtualRef, estimatedSize],\n );\n\n const {\n virtualItems: sourceVirtualItems,\n measure: sourceMeasure,\n scrollToIndex: sourceScrollToIndex,\n scrollToOffset: sourceScrollToOffset,\n totalSize: sourceTotalSize,\n }: ReturnType<typeof useVirtual> = useVirtual(sourceVirtualConfig);\n\n return useMemo(\n () => ({\n destinationVirtualRef,\n destinationVirtualItems,\n destinationMeasure,\n destinationScrollToIndex,\n destinationScrollToOffset,\n destinationTotalSize,\n sourceVirtualRef,\n sourceVirtualItems,\n sourceMeasure,\n sourceScrollToIndex,\n sourceScrollToOffset,\n sourceTotalSize,\n }),\n [\n destinationVirtualItems,\n destinationMeasure,\n destinationScrollToIndex,\n destinationScrollToOffset,\n destinationTotalSize,\n sourceVirtualItems,\n sourceMeasure,\n sourceScrollToIndex,\n sourceScrollToOffset,\n sourceTotalSize,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;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F;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["import { useMemo, useCallback, useRef } from 'react';\nimport { useVirtual } from 'react-virtual';\n\nimport { type DSShuttleV2T } from '../../react-desc-prop-types';\n\ntype UseVirtualT = ReturnType<typeof useVirtual>;\ninterface UseVirtualizedT {\n destinationVirtualItems: UseVirtualT['virtualItems'];\n destinationMeasure: UseVirtualT['measure'];\n destinationScrollToIndex: UseVirtualT['scrollToIndex'];\n destinationScrollToOffset: UseVirtualT['scrollToOffset'];\n destinationTotalSize: UseVirtualT['totalSize'];\n destinationVirtualRef: React.Ref<HTMLDivElement>;\n sourceVirtualItems: UseVirtualT['virtualItems'];\n sourceMeasure: UseVirtualT['measure'];\n sourceScrollToIndex: UseVirtualT['scrollToIndex'];\n sourceScrollToOffset: UseVirtualT['scrollToOffset'];\n sourceTotalSize: UseVirtualT['totalSize'];\n sourceVirtualRef: React.Ref<HTMLDivElement>;\n}\n\nexport const useShuttleVirtualized = (propsWithDefaults: DSShuttleV2T.InternalProps): UseVirtualizedT => {\n const destinationVirtualRef = useRef<HTMLDivElement>(null);\n const sourceVirtualRef = useRef<HTMLDivElement>(null);\n\n const estimatedSize = useCallback(() => 36, []);\n\n const destinationVirtualConfig = useMemo(\n () => ({\n size: propsWithDefaults.destinationData.length,\n parentRef: destinationVirtualRef,\n overscan: 30,\n estimateSize: estimatedSize,\n }),\n [propsWithDefaults.destinationData.length, destinationVirtualRef, estimatedSize],\n );\n\n const {\n virtualItems: destinationVirtualItems,\n measure: destinationMeasure,\n scrollToIndex: destinationScrollToIndex,\n scrollToOffset: destinationScrollToOffset,\n totalSize: destinationTotalSize,\n }: ReturnType<typeof useVirtual> = useVirtual(destinationVirtualConfig);\n\n const sourceVirtualConfig = useMemo(\n () => ({\n size: propsWithDefaults.sourceData.length,\n parentRef: sourceVirtualRef,\n overscan: 30,\n estimateSize: estimatedSize,\n }),\n [propsWithDefaults.sourceData.length, sourceVirtualRef, estimatedSize],\n );\n\n const {\n virtualItems: sourceVirtualItems,\n measure: sourceMeasure,\n scrollToIndex: sourceScrollToIndex,\n scrollToOffset: sourceScrollToOffset,\n totalSize: sourceTotalSize,\n }: ReturnType<typeof useVirtual> = useVirtual(sourceVirtualConfig);\n\n return useMemo(\n () => ({\n destinationVirtualRef,\n destinationVirtualItems,\n destinationMeasure,\n destinationScrollToIndex,\n destinationScrollToOffset,\n destinationTotalSize,\n sourceVirtualRef,\n sourceVirtualItems,\n sourceMeasure,\n sourceScrollToIndex,\n sourceScrollToOffset,\n sourceTotalSize,\n }),\n [\n destinationVirtualItems,\n destinationMeasure,\n destinationScrollToIndex,\n destinationScrollToOffset,\n destinationTotalSize,\n sourceVirtualItems,\n sourceMeasure,\n sourceScrollToIndex,\n sourceScrollToOffset,\n sourceTotalSize,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA6C;AAC7C,2BAA2B;AAoBpB,MAAM,wBAAwB,CAAC,sBAAmE;AACvG,QAAM,4BAAwB,qBAAuB,IAAI;AACzD,QAAM,uBAAmB,qBAAuB,IAAI;AAEpD,QAAM,oBAAgB,0BAAY,MAAM,IAAI,CAAC,CAAC;AAE9C,QAAM,+BAA2B;AAAA,IAC/B,OAAO;AAAA,MACL,MAAM,kBAAkB,gBAAgB;AAAA,MACxC,WAAW;AAAA,MACX,UAAU;AAAA,MACV,cAAc;AAAA,IAChB;AAAA,IACA,CAAC,kBAAkB,gBAAgB,QAAQ,uBAAuB,aAAa;AAAA,EACjF;AAEA,QAAM;AAAA,IACJ,cAAc;AAAA,IACd,SAAS;AAAA,IACT,eAAe;AAAA,IACf,gBAAgB;AAAA,IAChB,WAAW;AAAA,EACb,QAAmC,iCAAW,wBAAwB;AAEtE,QAAM,0BAAsB;AAAA,IAC1B,OAAO;AAAA,MACL,MAAM,kBAAkB,WAAW;AAAA,MACnC,WAAW;AAAA,MACX,UAAU;AAAA,MACV,cAAc;AAAA,IAChB;AAAA,IACA,CAAC,kBAAkB,WAAW,QAAQ,kBAAkB,aAAa;AAAA,EACvE;AAEA,QAAM;AAAA,IACJ,cAAc;AAAA,IACd,SAAS;AAAA,IACT,eAAe;AAAA,IACf,gBAAgB;AAAA,IAChB,WAAW;AAAA,EACb,QAAmC,iCAAW,mBAAmB;AAEjE,aAAO;AAAA,IACL,OAAO;AAAA,MACL;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,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
6
6
  "names": []
7
7
  }
@@ -106,9 +106,9 @@ const useFocusActionTrackers = () => {
106
106
  const removeDragAndDropFromDestination = (0, import_useStore.usePropsStore)((state) => state.removeDragAndDropFromDestination);
107
107
  const addDragAndDropFromSource = (0, import_useStore.usePropsStore)((state) => state.addDragAndDropFromSource);
108
108
  const trackFocusPrevAction = (0, import_react.useCallback)(
109
- ({ isDestinationPanel, item }) => {
110
- const preventMove = Boolean(item.original.preventMove);
111
- const preventDrilldown = Boolean(item.original.preventDrilldown);
109
+ ({ isDestinationPanel, datumHydratables }) => {
110
+ const preventMove = Boolean(datumHydratables.preventMove);
111
+ const preventDrilldown = Boolean(datumHydratables.preventDrilldown);
112
112
  const withDragAndDrop = isDestinationPanel && !removeDragAndDropFromDestination || !isDestinationPanel && addDragAndDropFromSource;
113
113
  const { prevAction } = getActionByProxymity({
114
114
  flags: { preventMove, preventDrilldown, withDragAndDrop },
@@ -119,9 +119,9 @@ const useFocusActionTrackers = () => {
119
119
  [addDragAndDropFromSource, mutableFocusItemAction, removeDragAndDropFromDestination, setFocusItemAction]
120
120
  );
121
121
  const trackFocusNextAction = (0, import_react.useCallback)(
122
- ({ isDestinationPanel, item }) => {
123
- const preventMove = Boolean(item.original.preventMove);
124
- const preventDrilldown = Boolean(item.original.preventDrilldown);
122
+ ({ isDestinationPanel, datumHydratables }) => {
123
+ const preventMove = Boolean(datumHydratables.preventMove);
124
+ const preventDrilldown = Boolean(datumHydratables.preventDrilldown);
125
125
  const withDragAndDrop = isDestinationPanel && !removeDragAndDropFromDestination || !isDestinationPanel && addDragAndDropFromSource;
126
126
  const { nextAction } = getActionByProxymity({
127
127
  flags: { preventMove, preventDrilldown, withDragAndDrop },