@elliemae/ds-shuttle-v2 3.16.0 → 3.16.1

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 (282) hide show
  1. package/dist/cjs/DSShuttleV2.js +14 -3
  2. package/dist/cjs/DSShuttleV2.js.map +2 -2
  3. package/dist/cjs/config/DSShuttleV2Definitions.js +4 -0
  4. package/dist/cjs/config/DSShuttleV2Definitions.js.map +1 -1
  5. package/dist/cjs/config/itemMovementHelpers.js +5 -1
  6. package/dist/cjs/config/itemMovementHelpers.js.map +2 -2
  7. package/dist/cjs/config/useAutoCalculated/index.js +6 -2
  8. package/dist/cjs/config/useAutoCalculated/index.js.map +2 -2
  9. package/dist/cjs/config/useAutoCalculated/useDataStructure.js +4 -0
  10. package/dist/cjs/config/useAutoCalculated/useDataStructure.js.map +2 -2
  11. package/dist/cjs/config/useAutoCalculated/useShuttleVirtualized.js +4 -0
  12. package/dist/cjs/config/useAutoCalculated/useShuttleVirtualized.js.map +2 -2
  13. package/dist/cjs/config/useFocusTracker/index.js +8 -4
  14. package/dist/cjs/config/useFocusTracker/index.js.map +2 -2
  15. package/dist/cjs/config/useFocusTracker/useFocusActionTrackers.js +6 -2
  16. package/dist/cjs/config/useFocusTracker/useFocusActionTrackers.js.map +2 -2
  17. package/dist/cjs/config/useFocusTracker/useFocusItemTracker.js +6 -2
  18. package/dist/cjs/config/useFocusTracker/useFocusItemTracker.js.map +2 -2
  19. package/dist/cjs/config/useFocusTracker/useFocusRegionTrackers.js +6 -2
  20. package/dist/cjs/config/useFocusTracker/useFocusRegionTrackers.js.map +2 -2
  21. package/dist/cjs/config/useFocusTracker/useFocusTracker.js +7 -3
  22. package/dist/cjs/config/useFocusTracker/useFocusTracker.js.map +2 -2
  23. package/dist/cjs/config/useStore/focusAndTabIndexManager.js +8 -4
  24. package/dist/cjs/config/useStore/focusAndTabIndexManager.js.map +2 -2
  25. package/dist/cjs/config/useStore/index.js +5 -1
  26. package/dist/cjs/config/useStore/index.js.map +2 -2
  27. package/dist/cjs/config/useStore/useStore.js +10 -6
  28. package/dist/cjs/config/useStore/useStore.js.map +2 -2
  29. package/dist/cjs/config/useValidateProps.js +5 -1
  30. package/dist/cjs/config/useValidateProps.js.map +2 -2
  31. package/dist/cjs/constants/index.js +4 -0
  32. package/dist/cjs/constants/index.js.map +1 -1
  33. package/dist/cjs/exported-related/ShuttleItem.js +60 -0
  34. package/dist/cjs/exported-related/ShuttleItem.js.map +7 -0
  35. package/dist/cjs/exported-related/index.js +36 -0
  36. package/dist/cjs/exported-related/index.js.map +7 -0
  37. package/dist/cjs/index.js +10 -3
  38. package/dist/cjs/index.js.map +2 -2
  39. package/dist/cjs/package.json +7 -0
  40. package/dist/cjs/parts/Dnd/DndHandle.js +6 -2
  41. package/dist/cjs/parts/Dnd/DndHandle.js.map +2 -2
  42. package/dist/cjs/parts/Dnd/DragOverlay.js +6 -2
  43. package/dist/cjs/parts/Dnd/DragOverlay.js.map +2 -2
  44. package/dist/cjs/parts/Dnd/DropIndicator.js +4 -0
  45. package/dist/cjs/parts/Dnd/DropIndicator.js.map +1 -1
  46. package/dist/cjs/parts/Header.js +7 -3
  47. package/dist/cjs/parts/Header.js.map +2 -2
  48. package/dist/cjs/parts/HoC/withConditionalDnDRowContext.js +7 -2
  49. package/dist/cjs/parts/HoC/withConditionalDnDRowContext.js.map +2 -2
  50. package/dist/cjs/parts/HoC/withConditionalUseSortable.js +4 -0
  51. package/dist/cjs/parts/HoC/withConditionalUseSortable.js.map +2 -2
  52. package/dist/cjs/parts/Item/Item.js +41 -31
  53. package/dist/cjs/parts/Item/Item.js.map +2 -2
  54. package/dist/cjs/parts/Item/ItemActions/ItemActions.js +14 -7
  55. package/dist/cjs/parts/Item/ItemActions/ItemActions.js.map +2 -2
  56. package/dist/cjs/parts/Item/ItemActions/index.js +5 -1
  57. package/dist/cjs/parts/Item/ItemActions/index.js.map +2 -2
  58. package/dist/cjs/parts/Item/ItemActions/useActionsHandlers.js +5 -1
  59. package/dist/cjs/parts/Item/ItemActions/useActionsHandlers.js.map +2 -2
  60. package/dist/cjs/parts/Item/ItemActions/useActionsLogicHandlers.js +7 -3
  61. package/dist/cjs/parts/Item/ItemActions/useActionsLogicHandlers.js.map +2 -2
  62. package/dist/cjs/parts/Item/ItemActions/useInnerRefHandlers.js +6 -2
  63. package/dist/cjs/parts/Item/ItemActions/useInnerRefHandlers.js.map +2 -2
  64. package/dist/cjs/parts/Item/ItemMiddleSection.js +50 -30
  65. package/dist/cjs/parts/Item/ItemMiddleSection.js.map +2 -2
  66. package/dist/cjs/parts/Item/ItemOverlay.js +8 -4
  67. package/dist/cjs/parts/Item/ItemOverlay.js.map +2 -2
  68. package/dist/cjs/parts/Item/ItemSelection.js +5 -1
  69. package/dist/cjs/parts/Item/ItemSelection.js.map +2 -2
  70. package/dist/cjs/parts/Item/TextSection.js +5 -1
  71. package/dist/cjs/parts/Item/TextSection.js.map +2 -2
  72. package/dist/cjs/parts/Item/useItemArrowNavigation.js +6 -2
  73. package/dist/cjs/parts/Item/useItemArrowNavigation.js.map +2 -2
  74. package/dist/cjs/parts/Item/useItemKeyboardSelection.js +6 -2
  75. package/dist/cjs/parts/Item/useItemKeyboardSelection.js.map +2 -2
  76. package/dist/cjs/parts/Item/useSelectionLogic.js +6 -2
  77. package/dist/cjs/parts/Item/useSelectionLogic.js.map +2 -2
  78. package/dist/cjs/parts/Item/useThisItemIsFocused.js +47 -0
  79. package/dist/cjs/parts/Item/useThisItemIsFocused.js.map +7 -0
  80. package/dist/cjs/parts/MainContent.js +8 -4
  81. package/dist/cjs/parts/MainContent.js.map +2 -2
  82. package/dist/cjs/parts/Panel/bottom/LoadMoreBtn.js +8 -4
  83. package/dist/cjs/parts/Panel/bottom/LoadMoreBtn.js.map +2 -2
  84. package/dist/cjs/parts/Panel/bottom/LoadingMore.js +5 -1
  85. package/dist/cjs/parts/Panel/bottom/LoadingMore.js.map +2 -2
  86. package/dist/cjs/parts/Panel/bottom/PanelContentBottomSection.js +10 -6
  87. package/dist/cjs/parts/Panel/bottom/PanelContentBottomSection.js.map +2 -2
  88. package/dist/cjs/parts/Panel/bottom/useInnerRefHandlers.js +6 -2
  89. package/dist/cjs/parts/Panel/bottom/useInnerRefHandlers.js.map +2 -2
  90. package/dist/cjs/parts/Panel/bottom/useLoadMoreBtnArrowNavigation.js +6 -2
  91. package/dist/cjs/parts/Panel/bottom/useLoadMoreBtnArrowNavigation.js.map +2 -2
  92. package/dist/cjs/parts/Panel/middle/EmptyItems.js +5 -1
  93. package/dist/cjs/parts/Panel/middle/EmptyItems.js.map +2 -2
  94. package/dist/cjs/parts/Panel/middle/ItemListWrapper/Index.js +10 -6
  95. package/dist/cjs/parts/Panel/middle/ItemListWrapper/Index.js.map +2 -2
  96. package/dist/cjs/parts/Panel/middle/ItemListWrapper/getDatumFlags.js +4 -0
  97. package/dist/cjs/parts/Panel/middle/ItemListWrapper/getDatumFlags.js.map +1 -1
  98. package/dist/cjs/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.js +5 -1
  99. package/dist/cjs/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.js.map +2 -2
  100. package/dist/cjs/parts/Panel/middle/LoadingItems.js +5 -1
  101. package/dist/cjs/parts/Panel/middle/LoadingItems.js.map +2 -2
  102. package/dist/cjs/parts/Panel/middle/MultipleSelectionAction.js +21 -5
  103. package/dist/cjs/parts/Panel/middle/MultipleSelectionAction.js.map +2 -2
  104. package/dist/cjs/parts/Panel/middle/PanelContentMiddleSection.js +12 -8
  105. package/dist/cjs/parts/Panel/middle/PanelContentMiddleSection.js.map +2 -2
  106. package/dist/cjs/parts/Panel/top/PanelContentTopSection.js +8 -4
  107. package/dist/cjs/parts/Panel/top/PanelContentTopSection.js.map +2 -2
  108. package/dist/cjs/parts/Panel/top/PanelFilterSection.js +6 -2
  109. package/dist/cjs/parts/Panel/top/PanelFilterSection.js.map +2 -2
  110. package/dist/cjs/parts/Panel/top/SelectionHeader.js +6 -2
  111. package/dist/cjs/parts/Panel/top/SelectionHeader.js.map +2 -2
  112. package/dist/cjs/parts/PanelWrapper.js +9 -5
  113. package/dist/cjs/parts/PanelWrapper.js.map +2 -2
  114. package/dist/cjs/react-desc-prop-types.js +72 -50
  115. package/dist/cjs/react-desc-prop-types.js.map +2 -2
  116. package/dist/cjs/tests/configs/basic.js +5 -0
  117. package/dist/cjs/tests/configs/basic.js.map +1 -1
  118. package/dist/cjs/tests/configs/filter.js +5 -0
  119. package/dist/cjs/tests/configs/filter.js.map +1 -1
  120. package/dist/cjs/tests/configs/loadMore.js +5 -0
  121. package/dist/cjs/tests/configs/loadMore.js.map +1 -1
  122. package/dist/esm/DSShuttleV2.js +10 -3
  123. package/dist/esm/DSShuttleV2.js.map +2 -2
  124. package/dist/esm/config/itemMovementHelpers.js +1 -1
  125. package/dist/esm/config/itemMovementHelpers.js.map +2 -2
  126. package/dist/esm/config/useAutoCalculated/index.js +2 -2
  127. package/dist/esm/config/useAutoCalculated/index.js.map +1 -1
  128. package/dist/esm/config/useAutoCalculated/useDataStructure.js.map +2 -2
  129. package/dist/esm/config/useAutoCalculated/useShuttleVirtualized.js.map +1 -1
  130. package/dist/esm/config/useFocusTracker/index.js +4 -4
  131. package/dist/esm/config/useFocusTracker/index.js.map +1 -1
  132. package/dist/esm/config/useFocusTracker/useFocusActionTrackers.js +2 -2
  133. package/dist/esm/config/useFocusTracker/useFocusActionTrackers.js.map +1 -1
  134. package/dist/esm/config/useFocusTracker/useFocusItemTracker.js +2 -2
  135. package/dist/esm/config/useFocusTracker/useFocusItemTracker.js.map +2 -2
  136. package/dist/esm/config/useFocusTracker/useFocusRegionTrackers.js +2 -2
  137. package/dist/esm/config/useFocusTracker/useFocusRegionTrackers.js.map +1 -1
  138. package/dist/esm/config/useFocusTracker/useFocusTracker.js +3 -3
  139. package/dist/esm/config/useFocusTracker/useFocusTracker.js.map +1 -1
  140. package/dist/esm/config/useStore/focusAndTabIndexManager.js +4 -4
  141. package/dist/esm/config/useStore/focusAndTabIndexManager.js.map +2 -2
  142. package/dist/esm/config/useStore/index.js +1 -1
  143. package/dist/esm/config/useStore/index.js.map +1 -1
  144. package/dist/esm/config/useStore/useStore.js +6 -6
  145. package/dist/esm/config/useStore/useStore.js.map +2 -2
  146. package/dist/esm/config/useValidateProps.js +1 -1
  147. package/dist/esm/config/useValidateProps.js.map +1 -1
  148. package/dist/esm/exported-related/ShuttleItem.js +30 -0
  149. package/dist/esm/exported-related/ShuttleItem.js.map +7 -0
  150. package/dist/esm/exported-related/index.js +6 -0
  151. package/dist/esm/exported-related/index.js.map +7 -0
  152. package/dist/esm/index.js +6 -3
  153. package/dist/esm/index.js.map +2 -2
  154. package/dist/esm/package.json +7 -0
  155. package/dist/esm/parts/Dnd/DndHandle.js +2 -2
  156. package/dist/esm/parts/Dnd/DndHandle.js.map +1 -1
  157. package/dist/esm/parts/Dnd/DragOverlay.js +2 -2
  158. package/dist/esm/parts/Dnd/DragOverlay.js.map +1 -1
  159. package/dist/esm/parts/Dnd/DropIndicator.js.map +1 -1
  160. package/dist/esm/parts/Header.js +3 -3
  161. package/dist/esm/parts/Header.js.map +1 -1
  162. package/dist/esm/parts/HoC/withConditionalDnDRowContext.js +3 -2
  163. package/dist/esm/parts/HoC/withConditionalDnDRowContext.js.map +2 -2
  164. package/dist/esm/parts/HoC/withConditionalUseSortable.js.map +1 -1
  165. package/dist/esm/parts/Item/Item.js +37 -31
  166. package/dist/esm/parts/Item/Item.js.map +2 -2
  167. package/dist/esm/parts/Item/ItemActions/ItemActions.js +10 -7
  168. package/dist/esm/parts/Item/ItemActions/ItemActions.js.map +2 -2
  169. package/dist/esm/parts/Item/ItemActions/index.js +1 -1
  170. package/dist/esm/parts/Item/ItemActions/index.js.map +1 -1
  171. package/dist/esm/parts/Item/ItemActions/useActionsHandlers.js +1 -1
  172. package/dist/esm/parts/Item/ItemActions/useActionsHandlers.js.map +1 -1
  173. package/dist/esm/parts/Item/ItemActions/useActionsLogicHandlers.js +3 -3
  174. package/dist/esm/parts/Item/ItemActions/useActionsLogicHandlers.js.map +1 -1
  175. package/dist/esm/parts/Item/ItemActions/useInnerRefHandlers.js +2 -2
  176. package/dist/esm/parts/Item/ItemActions/useInnerRefHandlers.js.map +1 -1
  177. package/dist/esm/parts/Item/ItemMiddleSection.js +46 -30
  178. package/dist/esm/parts/Item/ItemMiddleSection.js.map +2 -2
  179. package/dist/esm/parts/Item/ItemOverlay.js +4 -4
  180. package/dist/esm/parts/Item/ItemOverlay.js.map +1 -1
  181. package/dist/esm/parts/Item/ItemSelection.js +1 -1
  182. package/dist/esm/parts/Item/ItemSelection.js.map +2 -2
  183. package/dist/esm/parts/Item/TextSection.js +1 -1
  184. package/dist/esm/parts/Item/TextSection.js.map +1 -1
  185. package/dist/esm/parts/Item/useItemArrowNavigation.js +6 -2
  186. package/dist/esm/parts/Item/useItemArrowNavigation.js.map +2 -2
  187. package/dist/esm/parts/Item/useItemKeyboardSelection.js +2 -2
  188. package/dist/esm/parts/Item/useItemKeyboardSelection.js.map +1 -1
  189. package/dist/esm/parts/Item/useSelectionLogic.js +2 -2
  190. package/dist/esm/parts/Item/useSelectionLogic.js.map +2 -2
  191. package/dist/esm/parts/Item/useThisItemIsFocused.js +17 -0
  192. package/dist/esm/parts/Item/useThisItemIsFocused.js.map +7 -0
  193. package/dist/esm/parts/MainContent.js +4 -4
  194. package/dist/esm/parts/MainContent.js.map +1 -1
  195. package/dist/esm/parts/Panel/bottom/LoadMoreBtn.js +4 -4
  196. package/dist/esm/parts/Panel/bottom/LoadMoreBtn.js.map +1 -1
  197. package/dist/esm/parts/Panel/bottom/LoadingMore.js +1 -1
  198. package/dist/esm/parts/Panel/bottom/LoadingMore.js.map +1 -1
  199. package/dist/esm/parts/Panel/bottom/PanelContentBottomSection.js +6 -6
  200. package/dist/esm/parts/Panel/bottom/PanelContentBottomSection.js.map +1 -1
  201. package/dist/esm/parts/Panel/bottom/useInnerRefHandlers.js +2 -2
  202. package/dist/esm/parts/Panel/bottom/useInnerRefHandlers.js.map +1 -1
  203. package/dist/esm/parts/Panel/bottom/useLoadMoreBtnArrowNavigation.js +6 -2
  204. package/dist/esm/parts/Panel/bottom/useLoadMoreBtnArrowNavigation.js.map +2 -2
  205. package/dist/esm/parts/Panel/middle/EmptyItems.js +1 -1
  206. package/dist/esm/parts/Panel/middle/EmptyItems.js.map +1 -1
  207. package/dist/esm/parts/Panel/middle/ItemListWrapper/Index.js +6 -6
  208. package/dist/esm/parts/Panel/middle/ItemListWrapper/Index.js.map +2 -2
  209. package/dist/esm/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.js +1 -1
  210. package/dist/esm/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.js.map +2 -2
  211. package/dist/esm/parts/Panel/middle/LoadingItems.js +1 -1
  212. package/dist/esm/parts/Panel/middle/LoadingItems.js.map +1 -1
  213. package/dist/esm/parts/Panel/middle/MultipleSelectionAction.js +17 -5
  214. package/dist/esm/parts/Panel/middle/MultipleSelectionAction.js.map +2 -2
  215. package/dist/esm/parts/Panel/middle/PanelContentMiddleSection.js +8 -8
  216. package/dist/esm/parts/Panel/middle/PanelContentMiddleSection.js.map +1 -1
  217. package/dist/esm/parts/Panel/top/PanelContentTopSection.js +4 -4
  218. package/dist/esm/parts/Panel/top/PanelContentTopSection.js.map +1 -1
  219. package/dist/esm/parts/Panel/top/PanelFilterSection.js +2 -2
  220. package/dist/esm/parts/Panel/top/PanelFilterSection.js.map +1 -1
  221. package/dist/esm/parts/Panel/top/SelectionHeader.js +2 -2
  222. package/dist/esm/parts/Panel/top/SelectionHeader.js.map +2 -2
  223. package/dist/esm/parts/PanelWrapper.js +5 -5
  224. package/dist/esm/parts/PanelWrapper.js.map +1 -1
  225. package/dist/esm/react-desc-prop-types.js +66 -48
  226. package/dist/esm/react-desc-prop-types.js.map +2 -2
  227. package/dist/esm/tests/configs/basic.js +1 -0
  228. package/dist/esm/tests/configs/basic.js.map +1 -1
  229. package/dist/esm/tests/configs/filter.js +1 -0
  230. package/dist/esm/tests/configs/filter.js.map +1 -1
  231. package/dist/esm/tests/configs/loadMore.js +1 -0
  232. package/dist/esm/tests/configs/loadMore.js.map +1 -1
  233. package/dist/types/DSShuttleV2.d.ts +3 -1
  234. package/dist/types/config/itemMovementHelpers.d.ts +1 -1
  235. package/dist/types/config/useAutoCalculated/index.d.ts +1 -1
  236. package/dist/types/config/useAutoCalculated/useDataStructure.d.ts +1 -1
  237. package/dist/types/config/useAutoCalculated/useShuttleVirtualized.d.ts +1 -1
  238. package/dist/types/config/useFocusTracker/index.d.ts +4 -4
  239. package/dist/types/config/useFocusTracker/useFocusActionTrackers.d.ts +1 -1
  240. package/dist/types/config/useFocusTracker/useFocusItemTracker.d.ts +1 -1
  241. package/dist/types/config/useFocusTracker/useFocusTracker.d.ts +7 -7
  242. package/dist/types/config/useStore/focusAndTabIndexManager.d.ts +1 -1
  243. package/dist/types/config/useStore/index.d.ts +1 -1
  244. package/dist/types/config/useStore/useStore.d.ts +1 -1
  245. package/dist/types/config/useValidateProps.d.ts +1 -1
  246. package/dist/types/exported-related/ShuttleItem.d.ts +8 -0
  247. package/dist/types/exported-related/index.d.ts +1 -0
  248. package/dist/types/index.d.ts +3 -2
  249. package/dist/types/parts/Header.d.ts +1 -1
  250. package/dist/types/parts/HoC/withConditionalDnDRowContext.d.ts +1 -1
  251. package/dist/types/parts/HoC/withConditionalUseSortable.d.ts +1 -1
  252. package/dist/types/parts/Item/Item.d.ts +1 -1
  253. package/dist/types/parts/Item/ItemActions/ItemActions.d.ts +1 -1
  254. package/dist/types/parts/Item/ItemActions/index.d.ts +1 -1
  255. package/dist/types/parts/Item/ItemActions/useActionsHandlers.d.ts +1 -1
  256. package/dist/types/parts/Item/ItemActions/useActionsLogicHandlers.d.ts +1 -1
  257. package/dist/types/parts/Item/ItemActions/useInnerRefHandlers.d.ts +1 -1
  258. package/dist/types/parts/Item/ItemMiddleSection.d.ts +4 -2
  259. package/dist/types/parts/Item/ItemOverlay.d.ts +1 -1
  260. package/dist/types/parts/Item/ItemSelection.d.ts +1 -1
  261. package/dist/types/parts/Item/TextSection.d.ts +1 -1
  262. package/dist/types/parts/Item/useItemArrowNavigation.d.ts +1 -1
  263. package/dist/types/parts/Item/useItemKeyboardSelection.d.ts +1 -1
  264. package/dist/types/parts/Item/useSelectionLogic.d.ts +1 -1
  265. package/dist/types/parts/Item/useThisItemIsFocused.d.ts +4 -0
  266. package/dist/types/parts/Panel/bottom/LoadMoreBtn.d.ts +1 -1
  267. package/dist/types/parts/Panel/bottom/LoadingMore.d.ts +1 -1
  268. package/dist/types/parts/Panel/bottom/PanelContentBottomSection.d.ts +1 -1
  269. package/dist/types/parts/Panel/bottom/useInnerRefHandlers.d.ts +1 -1
  270. package/dist/types/parts/Panel/bottom/useLoadMoreBtnArrowNavigation.d.ts +1 -1
  271. package/dist/types/parts/Panel/middle/EmptyItems.d.ts +1 -1
  272. package/dist/types/parts/Panel/middle/ItemListWrapper/Index.d.ts +1 -1
  273. package/dist/types/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.d.ts +1 -1
  274. package/dist/types/parts/Panel/middle/LoadingItems.d.ts +1 -1
  275. package/dist/types/parts/Panel/middle/MultipleSelectionAction.d.ts +1 -1
  276. package/dist/types/parts/Panel/middle/PanelContentMiddleSection.d.ts +1 -1
  277. package/dist/types/parts/Panel/top/PanelContentTopSection.d.ts +1 -1
  278. package/dist/types/parts/Panel/top/PanelFilterSection.d.ts +1 -1
  279. package/dist/types/parts/Panel/top/SelectionHeader.d.ts +1 -1
  280. package/dist/types/parts/PanelWrapper.d.ts +1 -1
  281. package/dist/types/react-desc-prop-types.d.ts +190 -0
  282. package/package.json +19 -18
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -32,11 +36,11 @@ var import_jsx_runtime = require("react/jsx-runtime");
32
36
  var import_react = __toESM(require("react"));
33
37
  var import_ds_system = require("@elliemae/ds-system");
34
38
  var import_ds_grid = require("@elliemae/ds-grid");
35
- var import_Header = require("./Header");
36
- var import_PanelContentTopSection = require("./Panel/top/PanelContentTopSection");
37
- var import_PanelContentMiddleSection = require("./Panel/middle/PanelContentMiddleSection");
38
- var import_PanelContentBottomSection = require("./Panel/bottom/PanelContentBottomSection");
39
- var import_DSShuttleV2Definitions = require("../config/DSShuttleV2Definitions");
39
+ var import_Header = require("./Header.js");
40
+ var import_PanelContentTopSection = require("./Panel/top/PanelContentTopSection.js");
41
+ var import_PanelContentMiddleSection = require("./Panel/middle/PanelContentMiddleSection.js");
42
+ var import_PanelContentBottomSection = require("./Panel/bottom/PanelContentBottomSection.js");
43
+ var import_DSShuttleV2Definitions = require("../config/DSShuttleV2Definitions.js");
40
44
  const StyledPanelWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid, { name: import_DSShuttleV2Definitions.DSShuttleV2Name, slot: import_DSShuttleV2Definitions.DSShuttleV2Slots.PANEL_WRAPPER })`
41
45
  min-width: 300px;
42
46
  min-height: 264px;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/parts/PanelWrapper.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { type DSShuttleV2T } from '../react-desc-prop-types';\nimport { Header } from './Header';\nimport { PanelContentTopSection } from './Panel/top/PanelContentTopSection';\nimport { PanelContentMiddleSection } from './Panel/middle/PanelContentMiddleSection';\nimport { PanelContentBottomSection } from './Panel/bottom/PanelContentBottomSection';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../config/DSShuttleV2Definitions';\n\nconst StyledPanelWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.PANEL_WRAPPER })`\n min-width: 300px;\n min-height: 264px;\n`;\nconst StyledListWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.LIST_WRAPPER })`\n border: 1px solid neutral-400;\n`;\nconst panelWrapperRows = ['auto', '1fr'];\nconst listWrapperRows = ['auto', '1fr', 'auto'];\n\nexport const PanelWrapper = React.memo((panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => (\n <StyledPanelWrapper rows={panelWrapperRows} gutter=\"xxxs\">\n <Header {...panelMetaInfo} />\n <StyledListWrapper rows={listWrapperRows}>\n <PanelContentTopSection {...panelMetaInfo} />\n <PanelContentMiddleSection {...panelMetaInfo} />\n <PanelContentBottomSection {...panelMetaInfo} />\n </StyledListWrapper>\n </StyledPanelWrapper>\n));\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADsBnB;AAtBJ,mBAAkB;AAClB,uBAAuB;AACvB,qBAAqB;AAErB,oBAAuB;AACvB,oCAAuC;AACvC,uCAA0C;AAC1C,uCAA0C;AAC1C,oCAAkD;AAElD,MAAM,yBAAqB,yBAAO,qBAAM,EAAE,MAAM,+CAAiB,MAAM,+CAAiB,cAAc,CAAC;AAAA;AAAA;AAAA;AAIvG,MAAM,wBAAoB,yBAAO,qBAAM,EAAE,MAAM,+CAAiB,MAAM,+CAAiB,aAAa,CAAC;AAAA;AAAA;AAGrG,MAAM,mBAAmB,CAAC,QAAQ,KAAK;AACvC,MAAM,kBAAkB,CAAC,QAAQ,OAAO,MAAM;AAEvC,MAAM,eAAe,aAAAA,QAAM,KAAK,CAAC,kBACtC,6CAAC,sBAAmB,MAAM,kBAAkB,QAAO,QACjD;AAAA,8CAAC,wBAAQ,GAAG,eAAe;AAAA,EAC3B,6CAAC,qBAAkB,MAAM,iBACvB;AAAA,gDAAC,wDAAwB,GAAG,eAAe;AAAA,IAC3C,4CAAC,8DAA2B,GAAG,eAAe;AAAA,IAC9C,4CAAC,8DAA2B,GAAG,eAAe;AAAA,KAChD;AAAA,GACF,CACD;",
4
+ "sourcesContent": ["import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { type DSShuttleV2T } from '../react-desc-prop-types.js';\nimport { Header } from './Header.js';\nimport { PanelContentTopSection } from './Panel/top/PanelContentTopSection.js';\nimport { PanelContentMiddleSection } from './Panel/middle/PanelContentMiddleSection.js';\nimport { PanelContentBottomSection } from './Panel/bottom/PanelContentBottomSection.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../config/DSShuttleV2Definitions.js';\n\nconst StyledPanelWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.PANEL_WRAPPER })`\n min-width: 300px;\n min-height: 264px;\n`;\nconst StyledListWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.LIST_WRAPPER })`\n border: 1px solid neutral-400;\n`;\nconst panelWrapperRows = ['auto', '1fr'];\nconst listWrapperRows = ['auto', '1fr', 'auto'];\n\nexport const PanelWrapper = React.memo((panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => (\n <StyledPanelWrapper rows={panelWrapperRows} gutter=\"xxxs\">\n <Header {...panelMetaInfo} />\n <StyledListWrapper rows={listWrapperRows}>\n <PanelContentTopSection {...panelMetaInfo} />\n <PanelContentMiddleSection {...panelMetaInfo} />\n <PanelContentBottomSection {...panelMetaInfo} />\n </StyledListWrapper>\n </StyledPanelWrapper>\n));\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADsBnB;AAtBJ,mBAAkB;AAClB,uBAAuB;AACvB,qBAAqB;AAErB,oBAAuB;AACvB,oCAAuC;AACvC,uCAA0C;AAC1C,uCAA0C;AAC1C,oCAAkD;AAElD,MAAM,yBAAqB,yBAAO,qBAAM,EAAE,MAAM,+CAAiB,MAAM,+CAAiB,cAAc,CAAC;AAAA;AAAA;AAAA;AAIvG,MAAM,wBAAoB,yBAAO,qBAAM,EAAE,MAAM,+CAAiB,MAAM,+CAAiB,aAAa,CAAC;AAAA;AAAA;AAGrG,MAAM,mBAAmB,CAAC,QAAQ,KAAK;AACvC,MAAM,kBAAkB,CAAC,QAAQ,OAAO,MAAM;AAEvC,MAAM,eAAe,aAAAA,QAAM,KAAK,CAAC,kBACtC,6CAAC,sBAAmB,MAAM,kBAAkB,QAAO,QACjD;AAAA,8CAAC,wBAAQ,GAAG,eAAe;AAAA,EAC3B,6CAAC,qBAAkB,MAAM,iBACvB;AAAA,gDAAC,wDAAwB,GAAG,eAAe;AAAA,IAC3C,4CAAC,8DAA2B,GAAG,eAAe;AAAA,IAC9C,4CAAC,8DAA2B,GAAG,eAAe;AAAA,KAChD;AAAA,GACF,CACD;",
6
6
  "names": ["React"]
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -29,7 +33,7 @@ __export(react_desc_prop_types_exports, {
29
33
  });
30
34
  module.exports = __toCommonJS(react_desc_prop_types_exports);
31
35
  var React = __toESM(require("react"));
32
- var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
36
+ var import_ds_utilities = require("@elliemae/ds-utilities");
33
37
  const defaultProps = {
34
38
  addDragAndDropFromSource: false,
35
39
  removeDragAndDropFromDestination: false,
@@ -64,69 +68,87 @@ const defaultProps = {
64
68
  getPreventMove: () => false
65
69
  };
66
70
  const DSShuttleV2PropTypes = {
67
- ...import_ds_props_helpers.globalAttributesPropTypes,
68
- ...import_ds_props_helpers.xstyledPropTypes,
69
- sourceData: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.object).description("hello!").isRequired,
70
- sourceSelectedItems: import_ds_props_helpers.PropTypes.object.description("hello!").isRequired,
71
- onSourceSelectionChange: import_ds_props_helpers.PropTypes.func.description("hello!").isRequired,
72
- SourceHeader: import_ds_props_helpers.PropTypes.node.description("hello!").isRequired,
73
- onSourceDrilldown: import_ds_props_helpers.PropTypes.func.description("hello!").isRequired,
74
- destinationData: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.object).description("hello!").isRequired,
75
- destinationSelectedItems: import_ds_props_helpers.PropTypes.object.description("hello!").isRequired,
76
- onDestinationSelectionChange: import_ds_props_helpers.PropTypes.func.description("hello!").isRequired,
77
- DestinationHeader: import_ds_props_helpers.PropTypes.node.description("hello!").isRequired,
78
- onDestinationDrilldown: import_ds_props_helpers.PropTypes.func.description("hello!").isRequired,
79
- getId: import_ds_props_helpers.PropTypes.func.description("hello!").isRequired,
80
- getLabel: import_ds_props_helpers.PropTypes.func.description("hello!").isRequired,
81
- sourceIsLoading: import_ds_props_helpers.PropTypes.bool.description("hello!").defaultValue(false),
82
- destinationIsLoading: import_ds_props_helpers.PropTypes.bool.description("hello!").defaultValue(false),
83
- sourceWithLoadMore: import_ds_props_helpers.PropTypes.bool.description("hello!").defaultValue(false),
84
- destinationWithLoadMore: import_ds_props_helpers.PropTypes.bool.description("hello!").defaultValue(false),
85
- sourceIsLoadingMore: import_ds_props_helpers.PropTypes.bool.description("hello!").defaultValue(false),
86
- destinationIsLoadingMore: import_ds_props_helpers.PropTypes.bool.description("hello!").defaultValue(false),
87
- onSourceLoadMore: import_ds_props_helpers.PropTypes.func.description("hello!").defaultValue(() => {
71
+ ...import_ds_utilities.globalAttributesPropTypes,
72
+ ...import_ds_utilities.xstyledPropTypes,
73
+ sourceData: import_ds_utilities.PropTypes.arrayOf(import_ds_utilities.PropTypes.object).description(
74
+ "An array of objects representing the items in the source list"
75
+ ).isRequired,
76
+ sourceSelectedItems: import_ds_utilities.PropTypes.object.description("An object representing the selected items in the source list").isRequired,
77
+ onSourceSelectionChange: import_ds_utilities.PropTypes.func.description("A function called when the selection in the source list changes").isRequired,
78
+ SourceHeader: import_ds_utilities.PropTypes.node.description("The header component for the source list").isRequired,
79
+ onSourceDrilldown: import_ds_utilities.PropTypes.func.description("A function called when an item in the source list is clicked").isRequired,
80
+ destinationData: import_ds_utilities.PropTypes.arrayOf(import_ds_utilities.PropTypes.object).description(
81
+ "An array of objects representing the items in the destination list"
82
+ ).isRequired,
83
+ destinationSelectedItems: import_ds_utilities.PropTypes.object.description(
84
+ "An object representing the selected items in the destination list"
85
+ ).isRequired,
86
+ onDestinationSelectionChange: import_ds_utilities.PropTypes.func.description(
87
+ "A function called when the selection in the destination list changes"
88
+ ).isRequired,
89
+ DestinationHeader: import_ds_utilities.PropTypes.node.description("The header component for the destination list").isRequired,
90
+ onDestinationDrilldown: import_ds_utilities.PropTypes.func.description(
91
+ "A function called when an item in the destination list is clicked"
92
+ ).isRequired,
93
+ getId: import_ds_utilities.PropTypes.func.description(
94
+ "A function that takes an item from the source/destination list and returns its unique identifier"
95
+ ).isRequired,
96
+ getLabel: import_ds_utilities.PropTypes.func.description(
97
+ "A function that takes an item from the source/destination list and returns its display label"
98
+ ).isRequired,
99
+ sourceIsLoading: import_ds_utilities.PropTypes.bool.description("A boolean indicating whether the source list is currently loading data").defaultValue(false),
100
+ destinationIsLoading: import_ds_utilities.PropTypes.bool.description("A boolean indicating whether the destination list is currently loading data").defaultValue(false),
101
+ sourceWithLoadMore: import_ds_utilities.PropTypes.bool.description('A boolean indicating whether the source list supports "load more" functionality').defaultValue(false),
102
+ destinationWithLoadMore: import_ds_utilities.PropTypes.bool.description('A boolean indicating whether the destination list supports "load more" functionality').defaultValue(false),
103
+ sourceIsLoadingMore: import_ds_utilities.PropTypes.bool.description("A boolean indicating whether the source list is currently loading more data").defaultValue(false),
104
+ destinationIsLoadingMore: import_ds_utilities.PropTypes.bool.description("A boolean indicating whether the destination list is currently loading more data").defaultValue(false),
105
+ onSourceLoadMore: import_ds_utilities.PropTypes.func.description('A function called when the "load more" button in the source list is clicked').defaultValue(() => {
88
106
  }),
89
- onDestinationLoadMore: import_ds_props_helpers.PropTypes.func.description("hello!").defaultValue(() => {
107
+ onDestinationLoadMore: import_ds_utilities.PropTypes.func.description('A function called when the "load more" button in the destination list is clicked').defaultValue(() => {
90
108
  }),
91
- onSourceAdd: import_ds_props_helpers.PropTypes.func.description("hello!").defaultValue(() => {
109
+ onSourceAdd: import_ds_utilities.PropTypes.func.description("A function called when an item is added from the source list to the destination list").defaultValue(() => {
92
110
  }),
93
- onDestinationAdd: import_ds_props_helpers.PropTypes.func.description("hello!").defaultValue(() => {
111
+ onDestinationAdd: import_ds_utilities.PropTypes.func.description("A function called when an item is added from the destination list to the source list").defaultValue(() => {
94
112
  }),
95
- onSourceRemove: import_ds_props_helpers.PropTypes.func.description("hello!").defaultValue(() => {
113
+ onSourceRemove: import_ds_utilities.PropTypes.func.description("A function called when an item is removed from the destination list").defaultValue(() => {
96
114
  }),
97
- onDestinationRemove: import_ds_props_helpers.PropTypes.func.description("hello!").defaultValue(() => {
115
+ onDestinationRemove: import_ds_utilities.PropTypes.func.description("Callback function to handle when an item is removed from the destination shuttle list. ").defaultValue(() => {
98
116
  }),
99
- onSourceReorder: import_ds_props_helpers.PropTypes.func.description("hello!").defaultValue(() => {
117
+ onSourceReorder: import_ds_utilities.PropTypes.func.description("Callback function to handle when items are reordered in the source shuttle list.").defaultValue(() => {
100
118
  }),
101
- onDestinationReorder: import_ds_props_helpers.PropTypes.func.description("hello!").defaultValue(() => {
119
+ onDestinationReorder: import_ds_utilities.PropTypes.func.description("Callback function to handle when items are reordered in the destination shuttle list. ").defaultValue(() => {
102
120
  }),
103
- sourceSoftDeletedItems: import_ds_props_helpers.PropTypes.object.description("hello!").defaultValue({}),
104
- onSourceSoftDelete: import_ds_props_helpers.PropTypes.func.description("hello!").defaultValue(() => {
121
+ sourceSoftDeletedItems: import_ds_utilities.PropTypes.object.description(
122
+ "Object containing the soft deleted items in the source shuttle list, where the key is the item ID and the value is the deleted item."
123
+ ).defaultValue({}),
124
+ onSourceSoftDelete: import_ds_utilities.PropTypes.func.description("Callback function to handle when an item is soft deleted in the source shuttle list. ").defaultValue(() => {
105
125
  }),
106
- destinationSoftDeletedItems: import_ds_props_helpers.PropTypes.object.description("hello!").defaultValue({}),
107
- onDestinationSoftDelete: import_ds_props_helpers.PropTypes.func.description("hello!").defaultValue(() => {
126
+ destinationSoftDeletedItems: import_ds_utilities.PropTypes.object.description(
127
+ "Object containing the soft deleted items in the destination shuttle list, where the key is the item ID and the value is the deleted item."
128
+ ).defaultValue({}),
129
+ onDestinationSoftDelete: import_ds_utilities.PropTypes.func.description("Callback function to handle when an item is soft deleted in the destination shuttle list.").defaultValue(() => {
108
130
  }),
109
- getPreventMove: import_ds_props_helpers.PropTypes.func.description("hello!").defaultValue(() => false),
110
- addDragAndDropFromSource: import_ds_props_helpers.PropTypes.bool.description("hello!").defaultValue(false),
111
- removeDragAndDropFromDestination: import_ds_props_helpers.PropTypes.bool.description("hello!").defaultValue(false),
112
- sourceItemProps: import_ds_props_helpers.PropTypes.object.description("hello!").defaultValue({}),
113
- destinationItemProps: import_ds_props_helpers.PropTypes.object.description("hello!").defaultValue({}),
114
- sourceShowSearchbar: import_ds_props_helpers.PropTypes.bool.description("hello!").defaultValue(false),
115
- destinationShowSearchbar: import_ds_props_helpers.PropTypes.bool.description("hello!").defaultValue(false),
116
- onSourceOpenSearchbar: import_ds_props_helpers.PropTypes.func.description("hello!").defaultValue(() => {
131
+ getPreventMove: import_ds_utilities.PropTypes.func.description("Function that determines whether a specific item can be moved to the destination shuttle list. ").defaultValue(() => false),
132
+ addDragAndDropFromSource: import_ds_utilities.PropTypes.bool.description("Specifies whether items can be dragged from the source list and dropped into the destination list.").defaultValue(false),
133
+ removeDragAndDropFromDestination: import_ds_utilities.PropTypes.bool.description("Specifies whether items can be removed from the destination list by dragging them out of the list.").defaultValue(false),
134
+ sourceItemProps: import_ds_utilities.PropTypes.object.description("Specifies additional props to be applied to each item in the source list.").defaultValue({}),
135
+ destinationItemProps: import_ds_utilities.PropTypes.object.description("Specifies additional props to be applied to each item in the destination list.").defaultValue({}),
136
+ sourceShowSearchbar: import_ds_utilities.PropTypes.bool.description("Specifies whether the search bar should be shown in the source list.").defaultValue(false),
137
+ destinationShowSearchbar: import_ds_utilities.PropTypes.bool.description("Specifies whether the search bar should be shown in the destination list.").defaultValue(false),
138
+ onSourceOpenSearchbar: import_ds_utilities.PropTypes.func.description("Callback function that is called when the search bar in the source list is opened.").defaultValue(() => {
117
139
  }),
118
- onDesinationOpenSearchbar: import_ds_props_helpers.PropTypes.func.description("hello!").defaultValue(() => {
140
+ onDesinationOpenSearchbar: import_ds_utilities.PropTypes.func.description("Callback function that is called when the search bar in the destination list is opened.").defaultValue(() => {
119
141
  }),
120
- sourceFilterValue: import_ds_props_helpers.PropTypes.string.description("hello!").defaultValue(""),
121
- destinationFilterValue: import_ds_props_helpers.PropTypes.string.description("hello!").defaultValue(""),
122
- onSourceFilterChange: import_ds_props_helpers.PropTypes.func.description("hello!").defaultValue(() => {
142
+ sourceFilterValue: import_ds_utilities.PropTypes.string.description("Specifies the current value of the search filter in the source list.").defaultValue(""),
143
+ destinationFilterValue: import_ds_utilities.PropTypes.string.description("Specifies the current value of the search filter in the destination list.").defaultValue(""),
144
+ onSourceFilterChange: import_ds_utilities.PropTypes.func.description("Callback function that is called when the search filter in the source list is changed.").defaultValue(() => {
123
145
  }),
124
- onDestinationFilterChange: import_ds_props_helpers.PropTypes.func.description("hello!").defaultValue(() => {
146
+ onDestinationFilterChange: import_ds_utilities.PropTypes.func.description("Callback function that is called when the search filter in the destination list is changed.").defaultValue(() => {
125
147
  }),
126
- getSubtitle: import_ds_props_helpers.PropTypes.func.description("hello!").defaultValue(() => ""),
127
- getIcon: import_ds_props_helpers.PropTypes.func.description("hello!").defaultValue(() => ""),
128
- getPreventDrilldown: import_ds_props_helpers.PropTypes.func.description("hello!").defaultValue(() => false),
129
- getCustomRenderer: import_ds_props_helpers.PropTypes.func.description("hello!").defaultValue(() => void 0)
148
+ getSubtitle: import_ds_utilities.PropTypes.func.description("Callback function that returns the subtitle to be displayed for each item in the list.").defaultValue(() => ""),
149
+ getIcon: import_ds_utilities.PropTypes.func.description("Callback function that returns the icon to be displayed for each item in the list.").defaultValue(() => ""),
150
+ getPreventDrilldown: import_ds_utilities.PropTypes.func.description("Callback function that determines whether drilldown should be prevented for a particular item.").defaultValue(() => false),
151
+ getCustomRenderer: import_ds_utilities.PropTypes.func.description("Callback function that returns a custom renderer for each item in the list.").defaultValue(() => void 0)
130
152
  };
131
153
  const DSShuttleV2PropTypesSchema = DSShuttleV2PropTypes;
132
154
  //# sourceMappingURL=react-desc-prop-types.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/react-desc-prop-types.ts", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable max-lines */\nimport type { WeakValidationMap } from 'react';\nimport type React from 'react';\nimport type {} from '@elliemae/ds-utilities';\nimport type { GlobalAttributesT, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport { type DSControlledCheckboxT } from '@elliemae/ds-form-checkbox';\nimport { type DSButtonT } from '@elliemae/ds-button-v2';\nimport { type useSortable, type DnDKitTree } from '@elliemae/ds-drag-and-drop';\nimport type { ZustandT } from '@elliemae/ds-zustand-helpers';\n\nimport type { REGIONS_FOCUSES, ACTIONS_FOCUSES, ITEMS_FOCUSES } from './constants';\nimport type { useAutoCalculated } from './config/useAutoCalculated';\n\nexport declare namespace DSShuttleV2T {\n export type Datum = Record<string, unknown>;\n export type PanelMetaInfo = { isDestinationPanel: boolean; hasMultipleSelection: boolean };\n type HydratedId = string;\n\n export type DatumInternalMeta = {\n isFirst: boolean;\n isLast: boolean;\n isSelected: boolean;\n softDeleted: boolean;\n localIndex: number;\n hydratedId: HydratedId;\n hydratedPreventMove: boolean;\n };\n export type DatumRenderFlags = {\n selectionPrevented: boolean;\n withActions: boolean;\n withMoveBtn: boolean;\n withDrilldownBtn: boolean;\n internallyDisabledMove: boolean;\n internallyDisabledDrilldown: boolean;\n };\n\n // =============================================================================\n // Hydratables section\n // Component-less\n // =============================================================================\n export type PrimaryKeyHydratables = {\n id: HydratedId;\n };\n type FunctionalHydratables = {\n preventMove?: boolean;\n };\n type RequiredDatumHydratablesWithoutComponents = {\n label: string;\n };\n type OptionalDatumHydratablesWithoutComponents = {\n subtitle?: string;\n preventDrilldown?: boolean;\n };\n type DatumHydratablesWithoutComponents = PrimaryKeyHydratables &\n FunctionalHydratables &\n RequiredDatumHydratablesWithoutComponents &\n OptionalDatumHydratablesWithoutComponents;\n // =============================================================================\n // Hydratables section\n // Component-only\n // =============================================================================\n export type ComponentProps = {\n datum: Datum;\n panelMetaInfo: PanelMetaInfo;\n datumInternalMeta: DatumInternalMeta;\n datumHydratables: DatumHydratablesWithoutComponents;\n };\n // eslint-disable-next-line @typescript-eslint/ban-types\n type RequiredDatumHydratablesComponents = {};\n type OptionalDatumHydratablesComponents = {\n Icon?: React.ComponentType<ComponentProps>;\n CustomRenderer?: React.ComponentType<ComponentProps>;\n };\n // =============================================================================\n // Hydratables section\n // Finals\n // =============================================================================\n type RequiredDatumHydratables = RequiredDatumHydratablesWithoutComponents & RequiredDatumHydratablesComponents;\n type OptionalDatumHydratables = OptionalDatumHydratablesWithoutComponents & OptionalDatumHydratablesComponents;\n export type DatumHydratables = RequiredDatumHydratables & OptionalDatumHydratables;\n\n // =============================================================================\n // Hydraters\n // =============================================================================\n export type PrimaryKeyHydraters = Hydraters<PrimaryKeyHydratables, [Datum]>;\n export type FunctionalHydraters = Hydraters<FunctionalHydratables, [Datum]>;\n type HydratersMeta = { datumMeta: DatumInternalMeta; panelMetaInfo: PanelMetaInfo };\n type RequiredDatumHydraters = Hydraters<RequiredDatumHydratables, [Datum, HydratersMeta]>;\n type OptionalDatumHydraters = Hydraters<OptionalDatumHydratables, [Datum, HydratersMeta]>;\n\n type DatumHydraters = PrimaryKeyHydraters & FunctionalHydraters & RequiredDatumHydraters & OptionalDatumHydraters;\n\n // =============================================================================\n // Datum & Internals structures\n // =============================================================================\n export type ConfiguredDatum = DatumInternalMeta & { original: Datum };\n export interface ItemMeta extends PanelMetaInfo {\n datum: Datum;\n datumHydratables: DatumHydratables;\n datumInternalMeta: DatumInternalMeta;\n datumRenderFlags: DatumRenderFlags;\n withDragNDrop: boolean;\n useSortableHelpers?: ReturnType<typeof useSortable>;\n }\n\n // =============================================================================\n // Callbacks\n // =============================================================================\n type OnDataChange = (\n newData: Datum[],\n metainfo: {\n event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>;\n item?: Datum;\n selectedItems?: Datum[];\n },\n ) => void;\n\n type OnChangeEvent = (\n items: Datum[],\n metainfo: {\n event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>;\n },\n ) => void;\n\n type OnReorderEventMetadata = Omit<DnDKitTree.OnReorder<DSShuttleV2T.Datum>, 'considerExpanding'>;\n type OnReorderEvent = (movedItem: Datum, metadata: OnReorderEventMetadata) => void;\n\n export type SelectionMap = Record<string, boolean>;\n type OnSelectionChange = (\n newSelection: SelectionMap,\n metainfo: {\n event:\n | Parameters<Required<DSButtonT.Props>['onClick']>[0]\n | Parameters<DSControlledCheckboxT.InternalProps['onChange']>[1]\n | React.MouseEvent<HTMLButtonElement | HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>\n | React.ChangeEvent<HTMLInputElement>;\n item?: Datum;\n },\n ) => void;\n type OnSelectionDrilldown = (\n item: Datum,\n metainfo: { event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement> },\n ) => void;\n\n type OnLoadMore = (e: Parameters<Required<DSButtonT.Props>['onClick']>[0]) => void;\n type OnFilterChange = (\n newfilter: string | null,\n metainfo: { event: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement> },\n ) => void;\n type OnSearchbarOpen = (\n newfilter: boolean,\n metainfo: { event: Parameters<Required<DSButtonT.Props>['onClick']>[0] },\n ) => void;\n\n export type SoftDeletedMap = Record<string, boolean>;\n type OnSoftDeletedChange = (\n newSoftDeleted: SoftDeletedMap,\n metainfo: {\n event:\n | Parameters<Required<DSButtonT.Props>['onClick']>[0]\n | Parameters<DSControlledCheckboxT.InternalProps['onChange']>[1]\n | React.MouseEvent<HTMLButtonElement | HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>\n | React.ChangeEvent<HTMLInputElement>;\n item?: Datum;\n },\n ) => void;\n // =============================================================================\n // Zustand Store\n // =============================================================================\n export type FocusRegion = (typeof REGIONS_FOCUSES)[keyof typeof REGIONS_FOCUSES];\n export type FocusItem = Omit<(typeof ITEMS_FOCUSES)[keyof typeof ITEMS_FOCUSES], 'GET_SPECIFIC_ITEM'> & string;\n export type FocusItemAction = (typeof ACTIONS_FOCUSES)[keyof typeof ACTIONS_FOCUSES];\n export type InternalAtoms = {\n focusRegion: FocusRegion;\n focusItem: FocusItem;\n focusItemAction: FocusItemAction;\n shouldFocusItemOnRender: boolean;\n dropIndicatorPosition: number;\n overId: string;\n dndDraggingItem: ConfiguredDatum | null;\n dndDraggingItemMeta: ItemMeta | null;\n lastActiveId: string;\n isDropValid: boolean;\n sourcePanelLastSelectedItem: string | null | undefined;\n destinationPanelLastSelectedItem: string | null | undefined;\n };\n export type UseAutoCalculatedT = ReturnType<typeof useAutoCalculated>;\n export type Selectors = {\n getIsDragAndDropHappening: () => boolean;\n getPanelLastSelectedItem: (isDestinationPanel: boolean) => string | null | undefined;\n };\n export type Reducers = Record<string, never>;\n export type ShuttleInternalStore = ZustandT.InternalStore<InternalAtoms, Selectors, Reducers>;\n // =============================================================================\n // Final Props\n // =============================================================================\n export interface RequiredProps extends RequiredDatumHydraters, PrimaryKeyHydraters {\n sourceData: Datum[];\n sourceSelectedItems: SelectionMap;\n onSourceSelectionChange: OnSelectionChange;\n SourceHeader: React.ComponentType<unknown>;\n onSourceDrilldown: OnSelectionDrilldown;\n\n destinationData: Datum[];\n destinationSelectedItems: SelectionMap;\n onDestinationSelectionChange: OnSelectionChange;\n DestinationHeader: React.ComponentType<unknown>;\n onDestinationDrilldown: OnSelectionDrilldown;\n }\n\n export interface DefaultProps extends Required<FunctionalHydraters> {\n // load-more and loaders\n sourceIsLoading: boolean;\n sourceWithLoadMore: boolean;\n sourceIsLoadingMore: boolean;\n onSourceLoadMore: OnLoadMore;\n destinationIsLoading: boolean;\n destinationWithLoadMore: boolean;\n destinationIsLoadingMore: boolean;\n onDestinationLoadMore: OnLoadMore;\n\n // switch side\n onSourceAdd: OnChangeEvent;\n onSourceRemove: OnChangeEvent;\n onDestinationAdd: OnChangeEvent;\n onDestinationRemove: OnChangeEvent;\n\n // dnd\n addDragAndDropFromSource: boolean;\n removeDragAndDropFromDestination: boolean;\n onSourceReorder: OnReorderEvent;\n onDestinationReorder: OnReorderEvent;\n\n // soft delete\n sourceSoftDeletedItems: SoftDeletedMap;\n onSourceSoftDelete: OnSoftDeletedChange;\n destinationSoftDeletedItems: SoftDeletedMap;\n onDestinationSoftDelete: OnSoftDeletedChange;\n }\n\n export interface OptionalProps extends OptionalDatumHydraters {\n sourceItemProps?: Record<string, unknown>;\n destinationItemProps?: Record<string, unknown>;\n\n // filtering\n sourceShowSearchbar?: boolean;\n destinationShowSearchbar?: boolean;\n onSourceOpenSearchbar?: OnSearchbarOpen;\n onDesinationOpenSearchbar?: OnSearchbarOpen;\n\n sourceFilterValue?: string;\n destinationFilterValue?: string;\n onSourceFilterChange?: OnFilterChange;\n onDestinationFilterChange?: OnFilterChange;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSShuttleV2T.DefaultProps = {\n addDragAndDropFromSource: false,\n removeDragAndDropFromDestination: false,\n\n sourceIsLoading: false,\n destinationIsLoading: false,\n sourceWithLoadMore: false,\n destinationWithLoadMore: false,\n sourceIsLoadingMore: false,\n destinationIsLoadingMore: false,\n onSourceLoadMore: () => {},\n onDestinationLoadMore: () => {},\n\n onSourceAdd: () => {},\n onDestinationAdd: () => {},\n onSourceRemove: () => {},\n onDestinationRemove: () => {},\n onSourceReorder: () => {},\n onDestinationReorder: () => {},\n\n sourceSoftDeletedItems: {},\n onSourceSoftDelete: () => {},\n destinationSoftDeletedItems: {},\n onDestinationSoftDelete: () => {},\n\n getPreventMove: () => false,\n};\n\nconst DSShuttleV2PropTypes: DSPropTypesSchema<DSShuttleV2T.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n\n sourceData: PropTypes.arrayOf(PropTypes.object).description('hello!').isRequired,\n sourceSelectedItems: PropTypes.object.description('hello!').isRequired,\n onSourceSelectionChange: PropTypes.func.description('hello!').isRequired,\n SourceHeader: PropTypes.node.description('hello!').isRequired,\n onSourceDrilldown: PropTypes.func.description('hello!').isRequired,\n\n destinationData: PropTypes.arrayOf(PropTypes.object).description('hello!').isRequired,\n destinationSelectedItems: PropTypes.object.description('hello!').isRequired,\n onDestinationSelectionChange: PropTypes.func.description('hello!').isRequired,\n DestinationHeader: PropTypes.node.description('hello!').isRequired,\n onDestinationDrilldown: PropTypes.func.description('hello!').isRequired,\n\n getId: PropTypes.func.description('hello!').isRequired,\n getLabel: PropTypes.func.description('hello!').isRequired,\n\n sourceIsLoading: PropTypes.bool.description('hello!').defaultValue(false),\n destinationIsLoading: PropTypes.bool.description('hello!').defaultValue(false),\n sourceWithLoadMore: PropTypes.bool.description('hello!').defaultValue(false),\n destinationWithLoadMore: PropTypes.bool.description('hello!').defaultValue(false),\n sourceIsLoadingMore: PropTypes.bool.description('hello!').defaultValue(false),\n destinationIsLoadingMore: PropTypes.bool.description('hello!').defaultValue(false),\n onSourceLoadMore: PropTypes.func.description('hello!').defaultValue(() => {}),\n onDestinationLoadMore: PropTypes.func.description('hello!').defaultValue(() => {}),\n onSourceAdd: PropTypes.func.description('hello!').defaultValue(() => {}),\n onDestinationAdd: PropTypes.func.description('hello!').defaultValue(() => {}),\n onSourceRemove: PropTypes.func.description('hello!').defaultValue(() => {}),\n onDestinationRemove: PropTypes.func.description('hello!').defaultValue(() => {}),\n onSourceReorder: PropTypes.func.description('hello!').defaultValue(() => {}),\n onDestinationReorder: PropTypes.func.description('hello!').defaultValue(() => {}),\n sourceSoftDeletedItems: PropTypes.object.description('hello!').defaultValue({}),\n onSourceSoftDelete: PropTypes.func.description('hello!').defaultValue(() => {}),\n destinationSoftDeletedItems: PropTypes.object.description('hello!').defaultValue({}),\n onDestinationSoftDelete: PropTypes.func.description('hello!').defaultValue(() => {}),\n getPreventMove: PropTypes.func.description('hello!').defaultValue(() => false),\n\n addDragAndDropFromSource: PropTypes.bool.description('hello!').defaultValue(false),\n removeDragAndDropFromDestination: PropTypes.bool.description('hello!').defaultValue(false),\n\n sourceItemProps: PropTypes.object.description('hello!').defaultValue({}),\n destinationItemProps: PropTypes.object.description('hello!').defaultValue({}),\n\n sourceShowSearchbar: PropTypes.bool.description('hello!').defaultValue(false),\n destinationShowSearchbar: PropTypes.bool.description('hello!').defaultValue(false),\n onSourceOpenSearchbar: PropTypes.func.description('hello!').defaultValue(() => {}),\n onDesinationOpenSearchbar: PropTypes.func.description('hello!').defaultValue(() => {}),\n sourceFilterValue: PropTypes.string.description('hello!').defaultValue(''),\n destinationFilterValue: PropTypes.string.description('hello!').defaultValue(''),\n onSourceFilterChange: PropTypes.func.description('hello!').defaultValue(() => {}),\n onDestinationFilterChange: PropTypes.func.description('hello!').defaultValue(() => {}),\n\n getSubtitle: PropTypes.func.description('hello!').defaultValue(() => ''),\n getIcon: PropTypes.func.description('hello!').defaultValue(() => ''),\n getPreventDrilldown: PropTypes.func.description('hello!').defaultValue(() => false),\n\n getCustomRenderer: PropTypes.func.description('hello!').defaultValue(() => undefined),\n};\n\nexport const DSShuttleV2PropTypesSchema = DSShuttleV2PropTypes as unknown as WeakValidationMap<DSShuttleV2T.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADKvB,8BAAuE;AA6QhE,MAAM,eAA0C;AAAA,EACrD,0BAA0B;AAAA,EAC1B,kCAAkC;AAAA,EAElC,iBAAiB;AAAA,EACjB,sBAAsB;AAAA,EACtB,oBAAoB;AAAA,EACpB,yBAAyB;AAAA,EACzB,qBAAqB;AAAA,EACrB,0BAA0B;AAAA,EAC1B,kBAAkB,MAAM;AAAA,EAAC;AAAA,EACzB,uBAAuB,MAAM;AAAA,EAAC;AAAA,EAE9B,aAAa,MAAM;AAAA,EAAC;AAAA,EACpB,kBAAkB,MAAM;AAAA,EAAC;AAAA,EACzB,gBAAgB,MAAM;AAAA,EAAC;AAAA,EACvB,qBAAqB,MAAM;AAAA,EAAC;AAAA,EAC5B,iBAAiB,MAAM;AAAA,EAAC;AAAA,EACxB,sBAAsB,MAAM;AA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AE,aAAa,KAAK;AAAA,EAEzF,iBAAiB,kCAAU,OAAO,YAAY,QAAQ,EAAE,aAAa,CAAC,CAAC;AAAA,EACvE,sBAAsB,kCAAU,OAAO,YAAY,QAAQ,EAAE,aAAa,CAAC,CAAC;AAAA,EAE5E,qBAAqB,kCAAU,KAAK,YAAY,QAAQ,EAAE,aAAa,KAAK;AAAA,EAC5E,0BAA0B,kCAAU,KAAK,YAAY,QAAQ,EAAE,aAAa,KAAK;AAAA,EACjF,uBAAuB,kCAAU,KAAK,YAAY,QAAQ,EAAE,aAAa,MAAM;AAAA,EAAC,CAAC;AAAA,EACjF,2BAA2B,kCAAU,KAAK,YAAY,QAAQ,EAAE,aAAa,MAAM;AAAA,EAAC,CAAC;AAAA,EACrF,mBAAmB,kCAAU,OAAO,YAAY,QAAQ,EAAE,aAAa,EAAE;AAAA,EACzE,wBAAwB,kCAAU,OAAO,YAAY,QAAQ,EAAE,aAAa,EAAE;AAAA,EAC9E,sBAAsB,kCAAU,KAAK,YAAY,QAAQ,EAAE,aAAa,MAAM;AAAA,EAAC,CAAC;AAAA,EAChF,2BAA2B,kCAAU,KAAK,YAAY,QAAQ,EAAE,aAAa,MAAM;AAAA,EAAC,CAAC;AAAA,EAErF,aAAa,kCAAU,KAAK,YAAY,QAAQ,EAAE,aAAa,MAAM,EAAE;AAAA,EACvE,SAAS,kCAAU,KAAK,YAAY,QAAQ,EAAE,aAAa,MAAM,EAAE;AAAA,EACnE,qBAAqB,kCAAU,KAAK,YAAY,QAAQ,EAAE,aAAa,MAAM,KAAK;AAAA,EAElF,mBAAmB,kCAAU,KAAK,YAAY,QAAQ,EAAE,aAAa,MAAM,MAAS;AACtF;AAEO,MAAM,6BAA6B;",
4
+ "sourcesContent": ["/* eslint-disable max-lines */\nimport type { WeakValidationMap } from 'react';\nimport type React from 'react';\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema, useHeadlessTooltip } from '@elliemae/ds-utilities';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-utilities';\nimport { type DSControlledCheckboxT } from '@elliemae/ds-form-checkbox';\nimport { type DSButtonT } from '@elliemae/ds-button-v2';\nimport { type useSortable, type DnDKitTree } from '@elliemae/ds-drag-and-drop';\nimport type { ZustandT } from '@elliemae/ds-zustand-helpers';\n\nimport type { REGIONS_FOCUSES, ACTIONS_FOCUSES, ITEMS_FOCUSES } from './constants/index.js';\nimport type { useAutoCalculated } from './config/useAutoCalculated/index.js';\n\nexport declare namespace DSShuttleV2T {\n export type Datum = Record<string, unknown>;\n export type PanelMetaInfo = { isDestinationPanel: boolean; hasMultipleSelection: boolean };\n type HydratedId = string;\n\n export type DatumInternalMeta = {\n isFirst: boolean;\n isLast: boolean;\n isSelected: boolean;\n softDeleted: boolean;\n localIndex: number;\n hydratedId: HydratedId;\n hydratedPreventMove: boolean;\n };\n export type DatumRenderFlags = {\n selectionPrevented: boolean;\n withActions: boolean;\n withMoveBtn: boolean;\n withDrilldownBtn: boolean;\n internallyDisabledMove: boolean;\n internallyDisabledDrilldown: boolean;\n };\n\n // =============================================================================\n // Hydratables section\n // Component-less\n // =============================================================================\n export type PrimaryKeyHydratables = {\n id: HydratedId;\n };\n type FunctionalHydratables = {\n preventMove?: boolean;\n };\n type RequiredDatumHydratablesWithoutComponents = {\n label: string;\n };\n type OptionalDatumHydratablesWithoutComponents = {\n subtitle?: string;\n preventDrilldown?: boolean;\n };\n type DatumHydratablesWithoutComponents = PrimaryKeyHydratables &\n FunctionalHydratables &\n RequiredDatumHydratablesWithoutComponents &\n OptionalDatumHydratablesWithoutComponents;\n // =============================================================================\n // Hydratables section\n // Component-only\n // =============================================================================\n export type ComponentProps = {\n datum: Datum;\n thisItemIsFocused: boolean;\n panelMetaInfo: PanelMetaInfo;\n datumInternalMeta: DatumInternalMeta;\n datumHydratables: DatumHydratablesWithoutComponents;\n tooltipHelpers: ReturnType<typeof useHeadlessTooltip>;\n };\n // eslint-disable-next-line @typescript-eslint/ban-types\n type RequiredDatumHydratablesComponents = {};\n type OptionalDatumHydratablesComponents = {\n Icon?: React.ComponentType<ComponentProps>;\n CustomRenderer?: React.ComponentType<ComponentProps>;\n };\n // =============================================================================\n // Hydratables section\n // Finals\n // =============================================================================\n type RequiredDatumHydratables = RequiredDatumHydratablesWithoutComponents & RequiredDatumHydratablesComponents;\n type OptionalDatumHydratables = OptionalDatumHydratablesWithoutComponents & OptionalDatumHydratablesComponents;\n export type DatumHydratables = RequiredDatumHydratables & OptionalDatumHydratables;\n\n // =============================================================================\n // Hydraters\n // =============================================================================\n export type PrimaryKeyHydraters = Hydraters<PrimaryKeyHydratables, [Datum]>;\n export type FunctionalHydraters = Hydraters<FunctionalHydratables, [Datum]>;\n type HydratersMeta = { datumMeta: DatumInternalMeta; panelMetaInfo: PanelMetaInfo };\n type RequiredDatumHydraters = Hydraters<RequiredDatumHydratables, [Datum, HydratersMeta]>;\n type OptionalDatumHydraters = Hydraters<OptionalDatumHydratables, [Datum, HydratersMeta]>;\n\n type DatumHydraters = PrimaryKeyHydraters & FunctionalHydraters & RequiredDatumHydraters & OptionalDatumHydraters;\n\n // =============================================================================\n // Datum & Internals structures\n // =============================================================================\n export type ConfiguredDatum = DatumInternalMeta & { original: Datum };\n export interface ItemMeta extends PanelMetaInfo {\n datum: Datum;\n datumHydratables: DatumHydratables;\n datumInternalMeta: DatumInternalMeta;\n datumRenderFlags: DatumRenderFlags;\n withDragNDrop: boolean;\n useSortableHelpers?: ReturnType<typeof useSortable>;\n }\n\n // =============================================================================\n // Callbacks\n // =============================================================================\n type OnDataChange = (\n newData: Datum[],\n metainfo: {\n event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>;\n item?: Datum;\n selectedItems?: Datum[];\n },\n ) => void;\n\n type OnChangeEvent = (\n items: Datum[],\n metainfo: {\n event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>;\n },\n ) => void;\n\n type OnReorderEventMetadata = Omit<DnDKitTree.OnReorder<DSShuttleV2T.Datum>, 'considerExpanding'>;\n type OnReorderEvent = (movedItem: Datum, metadata: OnReorderEventMetadata) => void;\n\n export type SelectionMap = Record<string, boolean>;\n type OnSelectionChange = (\n newSelection: SelectionMap,\n metainfo: {\n event:\n | Parameters<Required<DSButtonT.Props>['onClick']>[0]\n | Parameters<DSControlledCheckboxT.InternalProps['onChange']>[1]\n | React.MouseEvent<HTMLButtonElement | HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>\n | React.ChangeEvent<HTMLInputElement>;\n item?: Datum;\n },\n ) => void;\n type OnSelectionDrilldown = (\n item: Datum,\n metainfo: { event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement> },\n ) => void;\n\n type OnLoadMore = (e: Parameters<Required<DSButtonT.Props>['onClick']>[0]) => void;\n type OnFilterChange = (\n newfilter: string | null,\n metainfo: { event: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement> },\n ) => void;\n type OnSearchbarOpen = (\n newfilter: boolean,\n metainfo: { event: Parameters<Required<DSButtonT.Props>['onClick']>[0] },\n ) => void;\n\n export type SoftDeletedMap = Record<string, boolean>;\n type OnSoftDeletedChange = (\n newSoftDeleted: SoftDeletedMap,\n metainfo: {\n event:\n | Parameters<Required<DSButtonT.Props>['onClick']>[0]\n | Parameters<DSControlledCheckboxT.InternalProps['onChange']>[1]\n | React.MouseEvent<HTMLButtonElement | HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>\n | React.ChangeEvent<HTMLInputElement>;\n item?: Datum;\n },\n ) => void;\n // =============================================================================\n // Zustand Store\n // =============================================================================\n export type FocusRegion = (typeof REGIONS_FOCUSES)[keyof typeof REGIONS_FOCUSES];\n export type FocusItem = Omit<(typeof ITEMS_FOCUSES)[keyof typeof ITEMS_FOCUSES], 'GET_SPECIFIC_ITEM'> & string;\n export type FocusItemAction = (typeof ACTIONS_FOCUSES)[keyof typeof ACTIONS_FOCUSES];\n export type InternalAtoms = {\n focusRegion: FocusRegion;\n focusItem: FocusItem;\n focusItemAction: FocusItemAction;\n deferFocusUntilFirstRender: boolean;\n dropIndicatorPosition: number;\n overId: string;\n dndDraggingItem: ConfiguredDatum | null;\n dndDraggingItemMeta: ItemMeta | null;\n lastActiveId: string;\n isDropValid: boolean;\n sourcePanelLastSelectedItem: string | null | undefined;\n destinationPanelLastSelectedItem: string | null | undefined;\n };\n export type UseAutoCalculatedT = ReturnType<typeof useAutoCalculated>;\n export type Selectors = {\n getIsDragAndDropHappening: () => boolean;\n getPanelLastSelectedItem: (isDestinationPanel: boolean) => string | null | undefined;\n };\n export type Reducers = Record<string, never>;\n export type ShuttleInternalStore = ZustandT.InternalStore<InternalAtoms, Selectors, Reducers>;\n // =============================================================================\n // Final Props\n // =============================================================================\n export interface RequiredProps extends RequiredDatumHydraters, PrimaryKeyHydraters {\n sourceData: Datum[];\n sourceSelectedItems: SelectionMap;\n onSourceSelectionChange: OnSelectionChange;\n SourceHeader: React.ComponentType<unknown>;\n onSourceDrilldown: OnSelectionDrilldown;\n\n destinationData: Datum[];\n destinationSelectedItems: SelectionMap;\n onDestinationSelectionChange: OnSelectionChange;\n DestinationHeader: React.ComponentType<unknown>;\n onDestinationDrilldown: OnSelectionDrilldown;\n }\n\n export interface DefaultProps extends Required<FunctionalHydraters> {\n // load-more and loaders\n sourceIsLoading: boolean;\n sourceWithLoadMore: boolean;\n sourceIsLoadingMore: boolean;\n onSourceLoadMore: OnLoadMore;\n destinationIsLoading: boolean;\n destinationWithLoadMore: boolean;\n destinationIsLoadingMore: boolean;\n onDestinationLoadMore: OnLoadMore;\n\n // switch side\n onSourceAdd: OnChangeEvent;\n onSourceRemove: OnChangeEvent;\n onDestinationAdd: OnChangeEvent;\n onDestinationRemove: OnChangeEvent;\n\n // dnd\n addDragAndDropFromSource: boolean;\n removeDragAndDropFromDestination: boolean;\n onSourceReorder: OnReorderEvent;\n onDestinationReorder: OnReorderEvent;\n\n // soft delete\n sourceSoftDeletedItems: SoftDeletedMap;\n onSourceSoftDelete: OnSoftDeletedChange;\n destinationSoftDeletedItems: SoftDeletedMap;\n onDestinationSoftDelete: OnSoftDeletedChange;\n }\n\n export interface OptionalProps extends OptionalDatumHydraters {\n sourceItemProps?: Record<string, unknown>;\n destinationItemProps?: Record<string, unknown>;\n\n // filtering\n sourceShowSearchbar?: boolean;\n destinationShowSearchbar?: boolean;\n onSourceOpenSearchbar?: OnSearchbarOpen;\n onDesinationOpenSearchbar?: OnSearchbarOpen;\n\n sourceFilterValue?: string;\n destinationFilterValue?: string;\n onSourceFilterChange?: OnFilterChange;\n onDestinationFilterChange?: OnFilterChange;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSShuttleV2T.DefaultProps = {\n addDragAndDropFromSource: false,\n removeDragAndDropFromDestination: false,\n\n sourceIsLoading: false,\n destinationIsLoading: false,\n sourceWithLoadMore: false,\n destinationWithLoadMore: false,\n sourceIsLoadingMore: false,\n destinationIsLoadingMore: false,\n onSourceLoadMore: () => {},\n onDestinationLoadMore: () => {},\n\n onSourceAdd: () => {},\n onDestinationAdd: () => {},\n onSourceRemove: () => {},\n onDestinationRemove: () => {},\n onSourceReorder: () => {},\n onDestinationReorder: () => {},\n\n sourceSoftDeletedItems: {},\n onSourceSoftDelete: () => {},\n destinationSoftDeletedItems: {},\n onDestinationSoftDelete: () => {},\n\n getPreventMove: () => false,\n};\n\nconst DSShuttleV2PropTypes: DSPropTypesSchema<DSShuttleV2T.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n\n sourceData: PropTypes.arrayOf(PropTypes.object).description(\n 'An array of objects representing the items in the source list',\n ).isRequired,\n sourceSelectedItems: PropTypes.object.description('An object representing the selected items in the source list')\n .isRequired,\n onSourceSelectionChange: PropTypes.func.description('A function called when the selection in the source list changes')\n .isRequired,\n SourceHeader: PropTypes.node.description('The header component for the source list').isRequired,\n onSourceDrilldown: PropTypes.func.description('A function called when an item in the source list is clicked')\n .isRequired,\n destinationData: PropTypes.arrayOf(PropTypes.object).description(\n 'An array of objects representing the items in the destination list',\n ).isRequired,\n destinationSelectedItems: PropTypes.object.description(\n 'An object representing the selected items in the destination list',\n ).isRequired,\n onDestinationSelectionChange: PropTypes.func.description(\n 'A function called when the selection in the destination list changes',\n ).isRequired,\n DestinationHeader: PropTypes.node.description('The header component for the destination list').isRequired,\n onDestinationDrilldown: PropTypes.func.description(\n 'A function called when an item in the destination list is clicked',\n ).isRequired,\n getId: PropTypes.func.description(\n 'A function that takes an item from the source/destination list and returns its unique identifier',\n ).isRequired,\n getLabel: PropTypes.func.description(\n 'A function that takes an item from the source/destination list and returns its display label',\n ).isRequired,\n sourceIsLoading: PropTypes.bool\n .description('A boolean indicating whether the source list is currently loading data')\n .defaultValue(false),\n destinationIsLoading: PropTypes.bool\n .description('A boolean indicating whether the destination list is currently loading data')\n .defaultValue(false),\n sourceWithLoadMore: PropTypes.bool\n .description('A boolean indicating whether the source list supports \"load more\" functionality')\n .defaultValue(false),\n destinationWithLoadMore: PropTypes.bool\n .description('A boolean indicating whether the destination list supports \"load more\" functionality')\n .defaultValue(false),\n sourceIsLoadingMore: PropTypes.bool\n .description('A boolean indicating whether the source list is currently loading more data')\n .defaultValue(false),\n destinationIsLoadingMore: PropTypes.bool\n .description('A boolean indicating whether the destination list is currently loading more data')\n .defaultValue(false),\n onSourceLoadMore: PropTypes.func\n .description('A function called when the \"load more\" button in the source list is clicked')\n .defaultValue(() => {}),\n onDestinationLoadMore: PropTypes.func\n .description('A function called when the \"load more\" button in the destination list is clicked')\n .defaultValue(() => {}),\n onSourceAdd: PropTypes.func\n .description('A function called when an item is added from the source list to the destination list')\n .defaultValue(() => {}),\n onDestinationAdd: PropTypes.func\n .description('A function called when an item is added from the destination list to the source list')\n .defaultValue(() => {}),\n onSourceRemove: PropTypes.func\n .description('A function called when an item is removed from the destination list')\n .defaultValue(() => {}),\n onDestinationRemove: PropTypes.func\n .description('Callback function to handle when an item is removed from the destination shuttle list. ')\n .defaultValue(() => {}),\n onSourceReorder: PropTypes.func\n .description('Callback function to handle when items are reordered in the source shuttle list.')\n .defaultValue(() => {}),\n onDestinationReorder: PropTypes.func\n .description('Callback function to handle when items are reordered in the destination shuttle list. ')\n .defaultValue(() => {}),\n sourceSoftDeletedItems: PropTypes.object\n .description(\n 'Object containing the soft deleted items in the source shuttle list, where the key is the item ID and the value is the deleted item.',\n )\n .defaultValue({}),\n onSourceSoftDelete: PropTypes.func\n .description('Callback function to handle when an item is soft deleted in the source shuttle list. ')\n .defaultValue(() => {}),\n destinationSoftDeletedItems: PropTypes.object\n .description(\n 'Object containing the soft deleted items in the destination shuttle list, where the key is the item ID and the value is the deleted item.',\n )\n .defaultValue({}),\n onDestinationSoftDelete: PropTypes.func\n .description('Callback function to handle when an item is soft deleted in the destination shuttle list.')\n .defaultValue(() => {}),\n getPreventMove: PropTypes.func\n .description('Function that determines whether a specific item can be moved to the destination shuttle list. ')\n .defaultValue(() => false),\n addDragAndDropFromSource: PropTypes.bool\n .description('Specifies whether items can be dragged from the source list and dropped into the destination list.')\n .defaultValue(false),\n removeDragAndDropFromDestination: PropTypes.bool\n .description('Specifies whether items can be removed from the destination list by dragging them out of the list.')\n .defaultValue(false),\n sourceItemProps: PropTypes.object\n .description('Specifies additional props to be applied to each item in the source list.')\n .defaultValue({}),\n destinationItemProps: PropTypes.object\n .description('Specifies additional props to be applied to each item in the destination list.')\n .defaultValue({}),\n sourceShowSearchbar: PropTypes.bool\n .description('Specifies whether the search bar should be shown in the source list.')\n .defaultValue(false),\n destinationShowSearchbar: PropTypes.bool\n .description('Specifies whether the search bar should be shown in the destination list.')\n .defaultValue(false),\n onSourceOpenSearchbar: PropTypes.func\n .description('Callback function that is called when the search bar in the source list is opened.')\n .defaultValue(() => {}),\n onDesinationOpenSearchbar: PropTypes.func\n .description('Callback function that is called when the search bar in the destination list is opened.')\n .defaultValue(() => {}),\n sourceFilterValue: PropTypes.string\n .description('Specifies the current value of the search filter in the source list.')\n .defaultValue(''),\n destinationFilterValue: PropTypes.string\n .description('Specifies the current value of the search filter in the destination list.')\n .defaultValue(''),\n onSourceFilterChange: PropTypes.func\n .description('Callback function that is called when the search filter in the source list is changed.')\n .defaultValue(() => {}),\n onDestinationFilterChange: PropTypes.func\n .description('Callback function that is called when the search filter in the destination list is changed.')\n .defaultValue(() => {}),\n getSubtitle: PropTypes.func\n .description('Callback function that returns the subtitle to be displayed for each item in the list.')\n .defaultValue(() => ''),\n getIcon: PropTypes.func\n .description('Callback function that returns the icon to be displayed for each item in the list.')\n .defaultValue(() => ''),\n getPreventDrilldown: PropTypes.func\n .description('Callback function that determines whether drilldown should be prevented for a particular item.')\n .defaultValue(() => false),\n getCustomRenderer: PropTypes.func\n .description('Callback function that returns a custom renderer for each item in the list.')\n .defaultValue(() => undefined),\n};\n\nexport const DSShuttleV2PropTypesSchema = DSShuttleV2PropTypes as unknown as WeakValidationMap<DSShuttleV2T.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADIvB,0BAAuE;AA+QhE,MAAM,eAA0C;AAAA,EACrD,0BAA0B;AAAA,EAC1B,kCAAkC;AAAA,EAElC,iBAAiB;AAAA,EACjB,sBAAsB;AAAA,EACtB,oBAAoB;AAAA,EACpB,yBAAyB;AAAA,EACzB,qBAAqB;AAAA,EACrB,0BAA0B;AAAA,EAC1B,kBAAkB,MAAM;AAAA,EAAC;AAAA,EACzB,uBAAuB,MAAM;AAAA,EAAC;AAAA,EAE9B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BAAqB,8BAAU,KAC5B,YAAY,gGAAgG,EAC5G,aAAa,MAAM,KAAK;AAAA,EAC3B,mBAAmB,8BAAU,KAC1B,YAAY,6EAA6E,EACzF,aAAa,MAAM,MAAS;AACjC;AAEO,MAAM,6BAA6B;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -76,6 +80,7 @@ const useListData = (startingData) => {
76
80
  const breadcrumbPath = (0, import_react.useMemo)(() => getPath(currentNode.dsId), [currentNode, getPath]);
77
81
  const displayedData = (0, import_react.useMemo)(
78
82
  () => currentNode.children.map((node) => node.getJson()),
83
+ // eslint-disable-next-line react-hooks/exhaustive-deps
79
84
  [currentNode, hash]
80
85
  );
81
86
  const onDrilldown = (0, import_react.useCallback)((item) => setCurrentNode(getNode(item.id)), [getNode]);
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/tests/configs/basic.js", "../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable max-lines */\nimport React, { useMemo, useState, useCallback } from 'react';\nimport { DSBreadcrumb } from '@elliemae/ds-breadcrumb';\nimport { useDSTree } from '@elliemae/ds-tree-model';\nimport { uid } from 'uid';\n\nconst genTreeOfData = ({ prefix, depth = 0, parent = null, childIndex = 0, finalDepth = 2 }) => {\n const node = {\n id: uid(),\n label: parent ? `${parent.label}.${childIndex}` : `${prefix} 0`,\n parent: parent ? parent.id : null,\n };\n\n if (depth <= finalDepth) {\n node.subitems = Array.from({ length: 2 }, (_, i) =>\n genTreeOfData({ prefix, depth: depth + 1, parent: node, childIndex: i, finalDepth }),\n );\n }\n return node;\n};\n\nconst options = {\n getUniqueId: (item) => item.id,\n};\n\nconst startingSourceData = genTreeOfData({ prefix: 'Source' });\nconst startingDestinationData = genTreeOfData({ prefix: 'Destination' });\n\nconst BreadCrumb = (props) => {\n const { breadCrumbPath, setCurrentNode, ...rest } = props;\n\n return (\n <DSBreadcrumb isTitle {...rest}>\n {breadCrumbPath.map((node) => (\n <DSBreadcrumb.Item\n key={`${node.dsId}`}\n label={node.plainItem.label}\n onClick={() => setCurrentNode(node)}\n dataTestId=\"amigo\"\n />\n ))}\n </DSBreadcrumb>\n );\n};\n\nexport const BreadCrumbHoc = ({ path, setCurrentNode }) => {\n const WrappedBreadCrumb = (props) => <BreadCrumb {...props} breadCrumbPath={path} setCurrentNode={setCurrentNode} />;\n return WrappedBreadCrumb;\n};\n\nconst useListData = (startingData) => {\n const { hash, getRoot, getNode, getPath, addNode, replaceNode, removeNode } = useDSTree(startingData, options);\n const [currentNode, setCurrentNode] = useState(getRoot());\n const [selection, setSelection] = useState({});\n\n const breadcrumbPath = useMemo(() => getPath(currentNode.dsId), [currentNode, getPath]);\n\n const displayedData = useMemo(\n () => currentNode.children.map((node) => node.getJson()),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [currentNode, hash],\n );\n\n const onDrilldown = useCallback((item) => setCurrentNode(getNode(item.id)), [getNode]);\n\n return useMemo(\n () => ({\n getNode,\n addNode,\n replaceNode,\n removeNode,\n currentNode,\n setCurrentNode,\n selection,\n setSelection,\n\n breadcrumbPath,\n displayedData,\n onDrilldown,\n }),\n [addNode, breadcrumbPath, currentNode, displayedData, getNode, onDrilldown, removeNode, replaceNode, selection],\n );\n};\n\nexport const useShuttle = () => {\n const {\n currentNode: currentSourceNode,\n setCurrentNode: setCurrentSourceNode,\n selection: sourceSelection,\n setSelection: setSourceSelection,\n breadcrumbPath: sourceBreadCrumbPath,\n displayedData: sourceDisplayedData,\n onDrilldown: onSourceDrilldown,\n addNode: addSourceNode,\n removeNode: removeSourceNode,\n } = useListData(startingSourceData);\n\n const {\n currentNode: currentDestinationNode,\n setCurrentNode: setCurrentDestinationNode,\n selection: destinationSelection,\n setSelection: setDestinationSelection,\n breadcrumbPath: destinationBreadCrumbPath,\n displayedData: destinationDisplayedData,\n onDrilldown: onDestinationDrilldown,\n addNode: addDestinationNode,\n removeNode: removeDestinationNode,\n } = useListData(startingDestinationData);\n\n const onSourceAdd = useCallback(\n (items) => items.forEach((item) => addSourceNode(item, { parent: currentSourceNode })),\n [addSourceNode, currentSourceNode],\n );\n\n const onSourceRemove = useCallback(\n (items) => items.forEach((item) => removeSourceNode(item.id, item)),\n [removeSourceNode],\n );\n\n const onDestinationAdd = useCallback(\n (items) => items.forEach((item) => addDestinationNode(item, { parent: currentDestinationNode })),\n [addDestinationNode, currentDestinationNode],\n );\n\n const onDestinationRemove = useCallback(\n (items) => items.forEach((item) => removeDestinationNode(item.id)),\n [removeDestinationNode],\n );\n\n return {\n setCurrentSourceNode,\n setCurrentDestinationNode,\n sourceDisplayedData,\n destinationDisplayedData,\n sourceSelection,\n destinationSelection,\n setSourceSelection,\n setDestinationSelection,\n onSourceDrilldown,\n onDestinationDrilldown,\n onSourceAdd,\n onSourceRemove,\n onDestinationAdd,\n onDestinationRemove,\n sourceBreadCrumbPath,\n destinationBreadCrumbPath,\n\n currentSourceNode,\n currentDestinationNode,\n };\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkCf;AAjCR,mBAAsD;AACtD,2BAA6B;AAC7B,2BAA0B;AAC1B,iBAAoB;AAEpB,MAAM,gBAAgB,CAAC,EAAE,QAAQ,QAAQ,GAAG,SAAS,MAAM,aAAa,GAAG,aAAa,EAAE,MAAM;AAC9F,QAA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;AAAA,EACxB;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IAEA;AAAA,IACA;AAAA,EACF;AACF;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -74,6 +78,7 @@ const useListData = (startingData) => {
74
78
  const breadcrumbPath = (0, import_react.useMemo)(() => getPath(currentNode.dsId), [currentNode, getPath]);
75
79
  const displayedData = (0, import_react.useMemo)(
76
80
  () => currentNode.children.map((node) => node.getJson()).filter((item) => matcheslenientStringSearch(filterValue, item.label)),
81
+ // eslint-disable-next-line react-hooks/exhaustive-deps
77
82
  [currentNode, hash, filterValue]
78
83
  );
79
84
  const onDrilldown = (0, import_react.useCallback)((item) => setCurrentNode(getNode(item.id)), [getNode]);
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/tests/configs/filter.js", "../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable max-lines */\nimport React, { useMemo, useState, useCallback } from 'react';\nimport { DSBreadcrumb } from '@elliemae/ds-breadcrumb';\nimport { useDSTree } from '@elliemae/ds-tree-model';\nimport { uid } from 'uid';\n\nconst genTreeOfData = ({ prefix, depth = 0, parent = null, childIndex = 0, finalDepth = 2 }) => {\n const node = {\n id: uid(),\n label: parent ? `${parent.label}.${childIndex}` : `${prefix} 0`,\n parent: parent ? parent.id : null,\n };\n\n if (depth <= finalDepth) {\n node.subitems = Array.from({ length: 2 }, (_, i) =>\n genTreeOfData({ prefix, depth: depth + 1, parent: node, childIndex: i, finalDepth }),\n );\n }\n return node;\n};\n\nconst options = {\n getUniqueId: (item) => item.id,\n};\n\nconst startingSourceData = genTreeOfData({ prefix: 'Source' });\nconst startingDestinationData = genTreeOfData({ prefix: 'Destination' });\n\nconst matcheslenientStringSearch = (filter, str) => {\n const regexpString = `[\\\\s\\\\S]*${filter.replace(/\\s/g, '').split('').join('[\\\\s\\\\S]*')}[\\\\s\\\\S]*`;\n const regexpFilter = new RegExp(regexpString);\n return regexpFilter.test(str);\n};\n\nconst BreadCrumb = (props) => {\n const { breadCrumbPath, setCurrentNode, ...rest } = props;\n\n return (\n <DSBreadcrumb isTitle {...rest}>\n {breadCrumbPath.map((node) => (\n <DSBreadcrumb.Item key={`${node.dsId}`} label={node.plainItem.label} onClick={() => setCurrentNode(node)} />\n ))}\n </DSBreadcrumb>\n );\n};\n\nexport const BreadCrumbHoc = ({ path, setCurrentNode }) => {\n const WrappedBreadCrumb = (props) => <BreadCrumb {...props} breadCrumbPath={path} setCurrentNode={setCurrentNode} />;\n return WrappedBreadCrumb;\n};\n\nconst useListData = (startingData) => {\n const { hash, getRoot, getNode, getPath, addNode, replaceNode, removeNode } = useDSTree(startingData, options);\n const [currentNode, setCurrentNode] = useState(getRoot());\n const [filterValue, setFilterValue] = useState('');\n\n const [selection, setSelection] = useState({});\n\n const breadcrumbPath = useMemo(() => getPath(currentNode.dsId), [currentNode, getPath]);\n\n const displayedData = useMemo(\n () =>\n currentNode.children\n .map((node) => node.getJson())\n .filter((item) => matcheslenientStringSearch(filterValue, item.label)),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [currentNode, hash, filterValue],\n );\n\n const onDrilldown = useCallback((item) => setCurrentNode(getNode(item.id)), [getNode]);\n\n return {\n getNode,\n addNode,\n replaceNode,\n removeNode,\n currentNode,\n setCurrentNode,\n selection,\n setSelection,\n filterValue,\n setFilterValue,\n breadcrumbPath,\n displayedData,\n onDrilldown,\n };\n};\n\nexport const useShuttle = () => {\n const {\n currentNode: currentSourceNode,\n setCurrentNode: setCurrentSourceNode,\n selection: sourceSelection,\n setSelection: setSourceSelection,\n breadcrumbPath: sourceBreadCrumbPath,\n displayedData: sourceDisplayedData,\n filterValue: sourceFilterValue,\n setFilterValue: setSourceFilterValue,\n onDrilldown: onSourceDrilldown,\n getNode: getSourceNode,\n addNode: addSourceNode,\n removeNode: removeSourceNode,\n } = useListData(startingSourceData);\n\n const {\n currentNode: currentDestinationNode,\n setCurrentNode: setCurrentDestinationNode,\n selection: destinationSelection,\n setSelection: setDestinationSelection,\n breadcrumbPath: destinationBreadCrumbPath,\n displayedData: destinationDisplayedData,\n filterValue: destinationFilterValue,\n setFilterValue: setDestinationFilterValue,\n onDrilldown: onDestinationDrilldown,\n getNode: getDestinationNode,\n addNode: addDestinationNode,\n removeNode: removeDestinationNode,\n } = useListData(startingDestinationData);\n\n const onSourceAdd = useCallback(\n (items) =>\n items.forEach((item) => addSourceNode(item, { parent: getSourceNode(item.parent) ?? currentSourceNode })),\n [addSourceNode, currentSourceNode, getSourceNode],\n );\n\n const onSourceRemove = useCallback(\n (items) => items.forEach((item) => removeSourceNode(item.id, item)),\n [removeSourceNode],\n );\n\n const onDestinationAdd = useCallback(\n (items) =>\n items.forEach((item) =>\n addDestinationNode(item, { parent: getDestinationNode(item.parent) ?? currentDestinationNode }),\n ),\n [addDestinationNode, currentDestinationNode, getDestinationNode],\n );\n\n const onDestinationRemove = useCallback(\n (items) => items.forEach((item) => removeDestinationNode(item.id)),\n [removeDestinationNode],\n );\n\n return useMemo(\n () => ({\n setCurrentSourceNode,\n setCurrentDestinationNode,\n sourceDisplayedData,\n destinationDisplayedData,\n sourceSelection,\n destinationSelection,\n setSourceSelection,\n setDestinationSelection,\n sourceFilterValue,\n destinationFilterValue,\n setSourceFilterValue,\n setDestinationFilterValue,\n onSourceDrilldown,\n onDestinationDrilldown,\n onSourceAdd,\n onSourceRemove,\n onDestinationAdd,\n onDestinationRemove,\n sourceBreadCrumbPath,\n destinationBreadCrumbPath,\n\n currentSourceNode,\n currentDestinationNode,\n }),\n [\n setCurrentSourceNode,\n setCurrentDestinationNode,\n sourceDisplayedData,\n destinationDisplayedData,\n sourceSelection,\n destinationSelection,\n setSourceSelection,\n setDestinationSelection,\n sourceFilterValue,\n destinationFilterValue,\n setSourceFilterValue,\n setDestinationFilterValue,\n onSourceDrilldown,\n onDestinationDrilldown,\n onSourceAdd,\n onSourceRemove,\n onDestinationAdd,\n onDestinationRemove,\n sourceBreadCrumbPath,\n destinationBreadCrumbPath,\n\n currentSourceNode,\n currentDestinationNode,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADwCf;AAvCR,mBAAsD;AACtD,2BAA6B;AAC7B,2BAA0B;AAC1B,iBAAoB;AAEpB,MAAM,gBAAgB,CAAC,EAAE,QAAQ,QAAQ,GAAG,SAAS,MAAM,aAAa,GAAG,aAAa,EAAE,MAAM;AAC9F,QAAM,OAAO;AAAA,IACX,QAAI,gBAAI;AAAA,IACR,OAAO,SAAS,GAAG,OAAO,SAAS,eAAe,GAAG;AAAA,IACrD,QAAQ,SAAS,OAAO,KAAK;AAAA,EAC/B;AAEA,MAAI,SAAS,YAAY;AACvB,SAAK,WAAW,MAAM;AAAA,MAAK,EAAE,QAAQ,EAAE;AAAA,MAAG,CAAC,GAAG,MAC5C,cAAc,EAAE,QAAQ,OAAO,QAAQ,GAAG,QAAQ,MAAM,YAAY,GAAG,WAAW,CAAC;AAAA,IACrF;AAAA,EACF;AACA,SAAO;AACT;AAEA,MAAM,UAAU;AAAA,E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6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -69,6 +73,7 @@ const useListData = (startingData) => {
69
73
  const breadcrumbPath = (0, import_react.useMemo)(() => getPath(currentNode.dsId), [currentNode, getPath]);
70
74
  const displayedData = (0, import_react.useMemo)(
71
75
  () => currentNode.children.map((node) => node.getJson()),
76
+ // eslint-disable-next-line react-hooks/exhaustive-deps
72
77
  [currentNode, hash]
73
78
  );
74
79
  const onDrilldown = (0, import_react.useCallback)((item) => setCurrentNode(getNode(item.id)), [getNode]);
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/tests/configs/loadMore.js", "../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable max-lines */\nimport React, { useMemo, useState, useCallback } from 'react';\nimport { DSBreadcrumb } from '@elliemae/ds-breadcrumb';\nimport { useDSTree } from '@elliemae/ds-tree-model';\nimport { uid } from 'uid';\n\nconst genTreeOfData = ({ prefix, depth = 0, parent = null, childIndex = 0, finalDepth = 2 }) => {\n const node = {\n id: uid(),\n label: parent ? `${parent.label}.${childIndex}` : `${prefix} 0`,\n parent: parent ? parent.id : null,\n };\n\n if (depth <= finalDepth) {\n node.subitems = Array.from({ length: 2 }, (_, i) =>\n genTreeOfData({ prefix, depth: depth + 1, parent: node, childIndex: i, finalDepth }),\n );\n }\n return node;\n};\n\nconst options = {\n getUniqueId: (item) => item.id,\n};\n\nconst startingSourceData = genTreeOfData({ prefix: 'Source' });\nconst startingDestinationData = genTreeOfData({ prefix: 'Destination' });\n\nconst BreadCrumb = (props) => {\n const { breadCrumbPath, setCurrentNode, ...rest } = props;\n\n return (\n <DSBreadcrumb isTitle {...rest}>\n {breadCrumbPath.map((node) => (\n <DSBreadcrumb.Item key={`${node.dsId}`} label={node.plainItem.label} onClick={() => setCurrentNode(node)} />\n ))}\n </DSBreadcrumb>\n );\n};\n\nexport const BreadCrumbHoc = ({ path, setCurrentNode }) => {\n const WrappedBreadCrumb = (props) => <BreadCrumb {...props} breadCrumbPath={path} setCurrentNode={setCurrentNode} />;\n return WrappedBreadCrumb;\n};\n\nconst useListData = (startingData) => {\n const { hash, getRoot, getNode, getPath, addNode, replaceNode, removeNode } = useDSTree(startingData, options);\n const [currentNode, setCurrentNode] = useState(getRoot());\n const [selection, setSelection] = useState({});\n const [isLoadingMore, setIsLoadingMore] = useState(false);\n\n const breadcrumbPath = useMemo(() => getPath(currentNode.dsId), [currentNode, getPath]);\n\n const displayedData = useMemo(\n () => currentNode.children.map((node) => node.getJson()),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [currentNode, hash],\n );\n\n const onDrilldown = useCallback((item) => setCurrentNode(getNode(item.id)), [getNode]);\n\n const onLoadMore = useCallback(() => {\n setIsLoadingMore(true);\n setTimeout(() => {\n const newChildren = Array.from({ length: 1 }, (_, i) =>\n genTreeOfData({ parent: currentNode.plainItem, childIndex: currentNode.children.length + i }),\n );\n newChildren.forEach((child) => addNode(child, { parent: currentNode }));\n setIsLoadingMore(false);\n }, 1000);\n }, [addNode, currentNode]);\n\n return {\n getNode,\n addNode,\n replaceNode,\n removeNode,\n currentNode,\n setCurrentNode,\n selection,\n setSelection,\n isLoadingMore,\n onLoadMore,\n breadcrumbPath,\n displayedData,\n onDrilldown,\n };\n};\n\nexport const useShuttle = () => {\n const {\n currentNode: currentSourceNode,\n setCurrentNode: setCurrentSourceNode,\n selection: sourceSelection,\n setSelection: setSourceSelection,\n breadcrumbPath: sourceBreadCrumbPath,\n displayedData: sourceDisplayedData,\n onDrilldown: onSourceDrilldown,\n getNode: getSourceNode,\n addNode: addSourceNode,\n removeNode: removeSourceNode,\n isLoadingMore: isSourceLoadingMore,\n onLoadMore: onLoadMoreSource,\n } = useListData(startingSourceData, 'S');\n\n const {\n currentNode: currentDestinationNode,\n setCurrentNode: setCurrentDestinationNode,\n selection: destinationSelection,\n setSelection: setDestinationSelection,\n breadcrumbPath: destinationBreadCrumbPath,\n displayedData: destinationDisplayedData,\n onDrilldown: onDestinationDrilldown,\n getNode: getDestinationNode,\n addNode: addDestinationNode,\n removeNode: removeDestinationNode,\n isLoadingMore: isDestinationLoadingMore,\n onLoadMore: onLoadMoreDestination,\n } = useListData(startingDestinationData, 'D');\n\n const onSourceAdd = useCallback(\n (items) =>\n items.forEach((item) => addSourceNode(item, { parent: getSourceNode(item.parent) ?? currentSourceNode })),\n [addSourceNode, currentSourceNode, getSourceNode],\n );\n\n const onSourceRemove = useCallback(\n (items) => items.forEach((item) => removeSourceNode(item.id, item)),\n [removeSourceNode],\n );\n\n const onDestinationAdd = useCallback(\n (items) =>\n items.forEach((item) =>\n addDestinationNode(item, { parent: getDestinationNode(item.parent) ?? currentDestinationNode }),\n ),\n [addDestinationNode, currentDestinationNode, getDestinationNode],\n );\n\n const onDestinationRemove = useCallback(\n (items) => items.forEach((item) => removeDestinationNode(item.id)),\n [removeDestinationNode],\n );\n\n return {\n setCurrentSourceNode,\n setCurrentDestinationNode,\n sourceDisplayedData,\n destinationDisplayedData,\n sourceSelection,\n destinationSelection,\n setSourceSelection,\n setDestinationSelection,\n onSourceDrilldown,\n onDestinationDrilldown,\n onSourceAdd,\n onSourceRemove,\n onDestinationAdd,\n onDestinationRemove,\n sourceBreadCrumbPath,\n destinationBreadCrumbPath,\n isSourceLoadingMore,\n onLoadMoreSource,\n isDestinationLoadingMore,\n onLoadMoreDestination,\n\n currentSourceNode,\n currentDestinationNode,\n };\n};\n", "import * as React from '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A,IAC1B,CAAC,UAAU,MAAM,QAAQ,CAAC,SAAS,sBAAsB,KAAK,EAAE,CAAC;AAAA,IACjE,CAAC,qBAAqB;AAAA,EACxB;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IAEA;AAAA,IACA;AAAA,EACF;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,9 +1,16 @@
1
1
  import * as React from "react";
2
+ import { describe } from "@elliemae/ds-props-helpers";
2
3
  import { withZustand } from "@elliemae/ds-zustand-helpers";
3
- import { MainContent } from "./parts/MainContent";
4
- import { config } from "./config/useStore";
4
+ import { MainContent } from "./parts/MainContent.js";
5
+ import { config } from "./config/useStore/index.js";
6
+ import { DSShuttleV2PropTypesSchema } from "./react-desc-prop-types.js";
5
7
  const DSShuttleV2 = withZustand(MainContent, config);
8
+ DSShuttleV2.propTypes = DSShuttleV2PropTypesSchema;
9
+ DSShuttleV2.displayName = "DSShuttleV2";
10
+ const DSShuttleV2WithSchema = describe(DSShuttleV2);
11
+ DSShuttleV2WithSchema.propTypes = DSShuttleV2PropTypesSchema;
6
12
  export {
7
- DSShuttleV2
13
+ DSShuttleV2,
14
+ DSShuttleV2WithSchema
8
15
  };
9
16
  //# sourceMappingURL=DSShuttleV2.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSShuttleV2.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { withZustand } from '@elliemae/ds-zustand-helpers';\nimport { MainContent } from './parts/MainContent';\nimport { config } from './config/useStore';\n\nexport const DSShuttleV2 = withZustand(MainContent, config);\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,mBAAmB;AAC5B,SAAS,mBAAmB;AAC5B,SAAS,cAAc;AAEhB,MAAM,cAAc,YAAY,aAAa,MAAM;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { withZustand } from '@elliemae/ds-zustand-helpers';\nimport { MainContent } from './parts/MainContent.js';\nimport { config } from './config/useStore/index.js';\nimport { DSShuttleV2PropTypesSchema } from './react-desc-prop-types.js';\n\nconst DSShuttleV2 = withZustand(MainContent, config);\n\nDSShuttleV2.propTypes = DSShuttleV2PropTypesSchema;\nDSShuttleV2.displayName = 'DSShuttleV2';\nconst DSShuttleV2WithSchema = describe(DSShuttleV2);\n\nDSShuttleV2WithSchema.propTypes = DSShuttleV2PropTypesSchema;\n\nexport { DSShuttleV2, DSShuttleV2WithSchema };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,gBAAgB;AACzB,SAAS,mBAAmB;AAC5B,SAAS,mBAAmB;AAC5B,SAAS,cAAc;AACvB,SAAS,kCAAkC;AAE3C,MAAM,cAAc,YAAY,aAAa,MAAM;AAEnD,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,wBAAwB,SAAS,WAAW;AAElD,sBAAsB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import React2 from "react";
3
- import { usePropsStore } from "./useStore";
3
+ import { usePropsStore } from "./useStore/index.js";
4
4
  const useHandleMoveSelection = ({ isDestinationPanel }) => {
5
5
  const currOnRemove = usePropsStore(
6
6
  (state) => isDestinationPanel ? state.onDestinationRemove : state.onSourceRemove
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/itemMovementHelpers.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable max-statements */\nimport React from 'react';\nimport { type DSButtonT } from '@elliemae/ds-button-v2';\nimport { type DSShuttleV2T } from '../react-desc-prop-types';\nimport { usePropsStore } 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 = usePropsStore((store) =>\n isDestinationPanel ? store.destinationSelectionArray : store.sourceSelectionArray,\n );\n const currOnSelectionChange = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationSelectionChange : state.onSourceSelectionChange,\n );\n\n const otherPanelOnAdd = usePropsStore((state) => (isDestinationPanel ? state.onSourceAdd : state.onDestinationAdd));\n\n const destinationSelectionArray = usePropsStore((store) => store.destinationSelectionItemArray);\n const sourceSelectionArray = usePropsStore((store) => store.sourceSelectionItemArray);\n const selectedItems = isDestinationPanel ? destinationSelectionArray : sourceSelectionArray;\n\n const moveSelection = React.useCallback(\n (event: Parameters<Required<DSButtonT.Props>['onClick']>[0]) => {\n event.preventDefault();\n event.stopPropagation();\n // movement\n currOnRemove(selectedItems, { event });\n otherPanelOnAdd(selectedItems, { event });\n // soft delete\n const currSoftDeletedMap: DSShuttleV2T.SoftDeletedMap = {};\n const otherSoftDeletedMap: DSShuttleV2T.SoftDeletedMap = {};\n currSelectionMap.forEach((id) => {\n currSoftDeletedMap[id] = true;\n otherSoftDeletedMap[id] = false;\n });\n currOnSoftDelete({ ...currSoftDeletedItems, ...currSoftDeletedMap }, { event });\n otherOnSoftDelete({ ...otherSoftDeletedItems, ...otherSoftDeletedMap }, { event });\n // cleanup\n currOnSelectionChange({}, { event });\n },\n [\n currOnRemove,\n selectedItems,\n otherPanelOnAdd,\n currSelectionMap,\n currOnSoftDelete,\n currSoftDeletedItems,\n otherOnSoftDelete,\n otherSoftDeletedItems,\n currOnSelectionChange,\n ],\n );\n return React.useMemo(() => ({ moveSelection: moveSelection }), [moveSelection]);\n};\n\nexport const useHandleMoveItem = ({ datum, datumInternalMeta, isDestinationPanel }: DSShuttleV2T.ItemMeta) => {\n const currSoftDeletedItems = usePropsStore((state) =>\n isDestinationPanel ? state.destinationSoftDeletedItems : state.sourceSoftDeletedItems,\n );\n const otherSoftDeletedItems = usePropsStore((state) =>\n isDestinationPanel ? state.sourceSoftDeletedItems : state.destinationSoftDeletedItems,\n );\n const currOnSoftDelete = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationSoftDelete : state.onSourceSoftDelete,\n );\n const otherOnSoftDelete = usePropsStore((state) =>\n isDestinationPanel ? state.onSourceSoftDelete : state.onDestinationSoftDelete,\n );\n\n const currOnRemove = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationRemove : state.onSourceRemove,\n );\n const otherPanelOnAdd = usePropsStore((state) => (isDestinationPanel ? state.onSourceAdd : state.onDestinationAdd));\n\n const moveItem = React.useCallback(\n (event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => {\n event.preventDefault();\n event.stopPropagation();\n currOnRemove([datum], { event });\n otherPanelOnAdd([datum], { event });\n currOnSoftDelete({ ...currSoftDeletedItems, [datumInternalMeta.hydratedId]: true }, { event });\n otherOnSoftDelete({ ...otherSoftDeletedItems, [datumInternalMeta.hydratedId]: false }, { event });\n },\n [\n currOnRemove,\n currOnSoftDelete,\n currSoftDeletedItems,\n datum,\n datumInternalMeta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,CAAC,KAAK,GAAG,EAAE,MAAM,CAAC;AAClC,uBAAiB,EAAE,GAAG,sBAAsB,CAAC,kBAAkB,aAAa,KAAK,GAAG,EAAE,MAAM,CAAC;AAC7F,wBAAkB,EAAE,GAAG,uBAAuB,CAAC,kBAAkB,aAAa,MAAM,GAAG,EAAE,MAAM,CAAC;AAAA,IAClG;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,kBAAkB;AAAA,MAClB;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable max-statements */\nimport React from 'react';\nimport { type DSButtonT } from '@elliemae/ds-button-v2';\nimport { type DSShuttleV2T } from '../react-desc-prop-types.js';\nimport { usePropsStore } from './useStore/index.js';\n\nexport const useHandleMoveSelection = ({ isDestinationPanel }: DSShuttleV2T.PanelMetaInfo) => {\n const currOnRemove = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationRemove : state.onSourceRemove,\n );\n const currSoftDeletedItems = usePropsStore((state) =>\n isDestinationPanel ? state.destinationSoftDeletedItems : state.sourceSoftDeletedItems,\n );\n const currOnSoftDelete = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationSoftDelete : state.onSourceSoftDelete,\n );\n const otherSoftDeletedItems = usePropsStore((state) =>\n isDestinationPanel ? state.sourceSoftDeletedItems : state.destinationSoftDeletedItems,\n );\n const otherOnSoftDelete = usePropsStore((state) =>\n isDestinationPanel ? state.onSourceSoftDelete : state.onDestinationSoftDelete,\n );\n const currSelectionMap = usePropsStore((store) =>\n isDestinationPanel ? store.destinationSelectionArray : store.sourceSelectionArray,\n );\n const currOnSelectionChange = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationSelectionChange : state.onSourceSelectionChange,\n );\n\n const otherPanelOnAdd = usePropsStore((state) => (isDestinationPanel ? state.onSourceAdd : state.onDestinationAdd));\n\n const destinationSelectionArray = usePropsStore((store) => store.destinationSelectionItemArray);\n const sourceSelectionArray = usePropsStore((store) => store.sourceSelectionItemArray);\n const selectedItems = isDestinationPanel ? destinationSelectionArray : sourceSelectionArray;\n\n const moveSelection = React.useCallback(\n (event: Parameters<Required<DSButtonT.Props>['onClick']>[0]) => {\n event.preventDefault();\n event.stopPropagation();\n // movement\n currOnRemove(selectedItems, { event });\n otherPanelOnAdd(selectedItems, { event });\n // soft delete\n const currSoftDeletedMap: DSShuttleV2T.SoftDeletedMap = {};\n const otherSoftDeletedMap: DSShuttleV2T.SoftDeletedMap = {};\n currSelectionMap.forEach((id) => {\n currSoftDeletedMap[id] = true;\n otherSoftDeletedMap[id] = false;\n });\n currOnSoftDelete({ ...currSoftDeletedItems, ...currSoftDeletedMap }, { event });\n otherOnSoftDelete({ ...otherSoftDeletedItems, ...otherSoftDeletedMap }, { event });\n // cleanup\n currOnSelectionChange({}, { event });\n },\n [\n currOnRemove,\n selectedItems,\n otherPanelOnAdd,\n currSelectionMap,\n currOnSoftDelete,\n currSoftDeletedItems,\n otherOnSoftDelete,\n otherSoftDeletedItems,\n currOnSelectionChange,\n ],\n );\n return React.useMemo(() => ({ moveSelection: moveSelection }), [moveSelection]);\n};\n\nexport const useHandleMoveItem = ({ datum, datumInternalMeta, isDestinationPanel }: DSShuttleV2T.ItemMeta) => {\n const currSoftDeletedItems = usePropsStore((state) =>\n isDestinationPanel ? state.destinationSoftDeletedItems : state.sourceSoftDeletedItems,\n );\n const otherSoftDeletedItems = usePropsStore((state) =>\n isDestinationPanel ? state.sourceSoftDeletedItems : state.destinationSoftDeletedItems,\n );\n const currOnSoftDelete = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationSoftDelete : state.onSourceSoftDelete,\n );\n const otherOnSoftDelete = usePropsStore((state) =>\n isDestinationPanel ? state.onSourceSoftDelete : state.onDestinationSoftDelete,\n );\n\n const currOnRemove = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationRemove : state.onSourceRemove,\n );\n const otherPanelOnAdd = usePropsStore((state) => (isDestinationPanel ? state.onSourceAdd : state.onDestinationAdd));\n\n const moveItem = React.useCallback(\n (event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => {\n event.preventDefault();\n event.stopPropagation();\n currOnRemove([datum], { event });\n otherPanelOnAdd([datum], { event });\n currOnSoftDelete({ ...currSoftDeletedItems, [datumInternalMeta.hydratedId]: true }, { event });\n otherOnSoftDelete({ ...otherSoftDeletedItems, [datumInternalMeta.hydratedId]: false }, { event });\n },\n [\n currOnRemove,\n currOnSoftDelete,\n currSoftDeletedItems,\n datum,\n datumInternalMeta.hydratedId,\n otherOnSoftDelete,\n otherPanelOnAdd,\n otherSoftDeletedItems,\n ],\n );\n return moveItem;\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACEvB,OAAOA,YAAW;AAGlB,SAAS,qBAAqB;AAEvB,MAAM,yBAAyB,CAAC,EAAE,mBAAmB,MAAkC;AAC5F,QAAM,eAAe;AAAA,IAAc,CAAC,UAClC,qBAAqB,MAAM,sBAAsB,MAAM;AAAA,EACzD;AACA,QAAM,uBAAuB;AAAA,IAAc,CAAC,UAC1C,qBAAqB,MAAM,8BAA8B,MAAM;AAAA,EACjE;AACA,QAAM,mBAAmB;AAAA,IAAc,CAAC,UACtC,qBAAqB,MAAM,0BAA0B,MAAM;AAAA,EAC7D;AACA,QAAM,wBAAwB;AAAA,IAAc,CAAC,UAC3C,qBAAqB,MAAM,yBAAyB,MAAM;AAAA,EAC5D;AACA,QAAM,oBAAoB;AAAA,IAAc,CAAC,UACvC,qBAAqB,MAAM,qBAAqB,MAAM;AAAA,EACxD;AACA,QAAM,mBAAmB;AAAA,IAAc,CAAC,UACtC,qBAAqB,MAAM,4BAA4B,MAAM;AAAA,EAC/D;AACA,QAAM,wBAAwB;AAAA,IAAc,CAAC,UAC3C,qBAAqB,MAAM,+BAA+B,MAAM;AAAA,EAClE;AAEA,QAAM,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