@elliemae/ds-shuttle-v2 3.70.0-next.7 → 3.70.0-next.71

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 (166) hide show
  1. package/dist/cjs/DSShuttleV2.js.map +2 -2
  2. package/dist/cjs/config/useAutoCalculated/index.js.map +2 -2
  3. package/dist/cjs/config/useAutoCalculated/useDataStructure.js.map +2 -2
  4. package/dist/cjs/config/useStore/useStore.js.map +1 -1
  5. package/dist/cjs/config/useValidateProps.js.map +2 -2
  6. package/dist/cjs/constants/index.js +3 -1
  7. package/dist/cjs/constants/index.js.map +2 -2
  8. package/dist/cjs/package.json +1 -4
  9. package/dist/cjs/parts/Dnd/DndHandle.js +47 -21
  10. package/dist/cjs/parts/Dnd/DndHandle.js.map +2 -2
  11. package/dist/cjs/parts/Dnd/DragOverlay.js +1 -1
  12. package/dist/cjs/parts/Dnd/DragOverlay.js.map +2 -2
  13. package/dist/cjs/parts/HoC/withConditionalDnDRowContext.js +16 -14
  14. package/dist/cjs/parts/HoC/withConditionalDnDRowContext.js.map +2 -2
  15. package/dist/cjs/parts/Item/Item.js +29 -68
  16. package/dist/cjs/parts/Item/Item.js.map +3 -3
  17. package/dist/cjs/parts/Item/ItemActions/ItemActions.js +19 -5
  18. package/dist/cjs/parts/Item/ItemActions/ItemActions.js.map +2 -2
  19. package/dist/cjs/parts/Item/ItemActions/{useInnerRefHandlers.js → useInnerRefActionHandlers.js} +6 -6
  20. package/dist/cjs/parts/Item/ItemActions/useInnerRefActionHandlers.js.map +7 -0
  21. package/dist/cjs/parts/Item/ItemMiddleSection.js +1 -0
  22. package/dist/cjs/parts/Item/ItemMiddleSection.js.map +2 -2
  23. package/dist/cjs/parts/Item/ItemSelectionUi/CheckboxSelectionUI.js +72 -0
  24. package/dist/cjs/parts/Item/ItemSelectionUi/CheckboxSelectionUI.js.map +7 -0
  25. package/dist/cjs/parts/Item/ItemSelectionUi/ItemSelectionUI.js +83 -0
  26. package/dist/cjs/parts/Item/ItemSelectionUi/ItemSelectionUI.js.map +7 -0
  27. package/dist/cjs/parts/{HoC/withConditionalUseSortable.js → Item/ItemSelectionUi/ItemSelectionUI.types.js} +3 -18
  28. package/dist/cjs/parts/Item/ItemSelectionUi/ItemSelectionUI.types.js.map +7 -0
  29. package/dist/cjs/parts/Item/{ItemSelection.js → ItemSelectionUi/VerticalBarSelectionUI.js} +14 -12
  30. package/dist/cjs/parts/Item/ItemSelectionUi/VerticalBarSelectionUI.js.map +7 -0
  31. package/dist/cjs/parts/Item/useItemInnerRefHandlers.js +73 -0
  32. package/dist/cjs/parts/Item/useItemInnerRefHandlers.js.map +7 -0
  33. package/dist/cjs/parts/Panel/bottom/LoadMoreBtn.js +2 -2
  34. package/dist/cjs/parts/Panel/bottom/LoadMoreBtn.js.map +2 -2
  35. package/dist/cjs/parts/Panel/bottom/{useInnerRefHandlers.js → useLoadMoreBtnInnerRefHandlers.js} +6 -6
  36. package/dist/cjs/parts/Panel/bottom/useLoadMoreBtnInnerRefHandlers.js.map +7 -0
  37. package/dist/cjs/parts/Panel/middle/MultipleSelectionAction.js +65 -33
  38. package/dist/cjs/parts/Panel/middle/MultipleSelectionAction.js.map +2 -2
  39. package/dist/cjs/parts/Panel/middle/PanelContentMiddleSection.js +2 -2
  40. package/dist/cjs/parts/Panel/middle/PanelContentMiddleSection.js.map +2 -2
  41. package/dist/cjs/parts/Panel/top/SelectionHeader.js.map +2 -2
  42. package/dist/cjs/react-desc-prop-types.js +8 -4
  43. package/dist/cjs/react-desc-prop-types.js.map +2 -2
  44. package/dist/cjs/typescript-testing/slot-props.js +181 -0
  45. package/dist/cjs/typescript-testing/slot-props.js.map +7 -0
  46. package/dist/cjs/typescript-testing/typescript-shuttle-v2-valid-with-datum.js +159 -0
  47. package/dist/cjs/typescript-testing/typescript-shuttle-v2-valid-with-datum.js.map +7 -0
  48. package/dist/cjs/typescript-testing/typescript-shuttle-v2-valid.js +0 -1
  49. package/dist/cjs/typescript-testing/typescript-shuttle-v2-valid.js.map +2 -2
  50. package/dist/esm/DSShuttleV2.js.map +2 -2
  51. package/dist/esm/config/useAutoCalculated/index.js.map +2 -2
  52. package/dist/esm/config/useAutoCalculated/useDataStructure.js.map +2 -2
  53. package/dist/esm/config/useStore/useStore.js.map +1 -1
  54. package/dist/esm/config/useValidateProps.js.map +2 -2
  55. package/dist/esm/constants/index.js +3 -1
  56. package/dist/esm/constants/index.js.map +2 -2
  57. package/dist/esm/package.json +1 -4
  58. package/dist/esm/parts/Dnd/DndHandle.js +48 -22
  59. package/dist/esm/parts/Dnd/DndHandle.js.map +2 -2
  60. package/dist/esm/parts/Dnd/DragOverlay.js +1 -1
  61. package/dist/esm/parts/Dnd/DragOverlay.js.map +2 -2
  62. package/dist/esm/parts/HoC/withConditionalDnDRowContext.js +16 -14
  63. package/dist/esm/parts/HoC/withConditionalDnDRowContext.js.map +2 -2
  64. package/dist/esm/parts/Item/Item.js +30 -69
  65. package/dist/esm/parts/Item/Item.js.map +2 -2
  66. package/dist/esm/parts/Item/ItemActions/ItemActions.js +19 -5
  67. package/dist/esm/parts/Item/ItemActions/ItemActions.js.map +2 -2
  68. package/dist/esm/parts/Item/ItemActions/{useInnerRefHandlers.js → useInnerRefActionHandlers.js} +3 -3
  69. package/dist/esm/parts/Item/ItemActions/useInnerRefActionHandlers.js.map +7 -0
  70. package/dist/esm/parts/Item/ItemMiddleSection.js +1 -0
  71. package/dist/esm/parts/Item/ItemMiddleSection.js.map +2 -2
  72. package/dist/esm/parts/Item/ItemSelectionUi/CheckboxSelectionUI.js +42 -0
  73. package/dist/esm/parts/Item/ItemSelectionUi/CheckboxSelectionUI.js.map +7 -0
  74. package/dist/esm/parts/Item/ItemSelectionUi/ItemSelectionUI.js +53 -0
  75. package/dist/esm/parts/Item/ItemSelectionUi/ItemSelectionUI.js.map +7 -0
  76. package/dist/esm/parts/Item/ItemSelectionUi/ItemSelectionUI.types.js +2 -0
  77. package/dist/esm/parts/Item/ItemSelectionUi/ItemSelectionUI.types.js.map +7 -0
  78. package/dist/esm/parts/Item/{ItemSelection.js → ItemSelectionUi/VerticalBarSelectionUI.js} +11 -9
  79. package/dist/esm/parts/Item/ItemSelectionUi/VerticalBarSelectionUI.js.map +7 -0
  80. package/dist/esm/parts/Item/useItemInnerRefHandlers.js +43 -0
  81. package/dist/esm/parts/Item/useItemInnerRefHandlers.js.map +7 -0
  82. package/dist/esm/parts/Panel/bottom/LoadMoreBtn.js +2 -2
  83. package/dist/esm/parts/Panel/bottom/LoadMoreBtn.js.map +2 -2
  84. package/dist/esm/parts/Panel/bottom/{useInnerRefHandlers.js → useLoadMoreBtnInnerRefHandlers.js} +3 -3
  85. package/dist/esm/parts/Panel/bottom/useLoadMoreBtnInnerRefHandlers.js.map +7 -0
  86. package/dist/esm/parts/Panel/middle/MultipleSelectionAction.js +66 -34
  87. package/dist/esm/parts/Panel/middle/MultipleSelectionAction.js.map +2 -2
  88. package/dist/esm/parts/Panel/middle/PanelContentMiddleSection.js +2 -2
  89. package/dist/esm/parts/Panel/middle/PanelContentMiddleSection.js.map +2 -2
  90. package/dist/esm/parts/Panel/top/SelectionHeader.js.map +2 -2
  91. package/dist/esm/react-desc-prop-types.js +8 -4
  92. package/dist/esm/react-desc-prop-types.js.map +2 -2
  93. package/dist/esm/typescript-testing/slot-props.js +158 -0
  94. package/dist/esm/typescript-testing/slot-props.js.map +7 -0
  95. package/dist/esm/typescript-testing/typescript-shuttle-v2-valid-with-datum.js +136 -0
  96. package/dist/esm/typescript-testing/typescript-shuttle-v2-valid-with-datum.js.map +7 -0
  97. package/dist/esm/typescript-testing/typescript-shuttle-v2-valid.js +0 -1
  98. package/dist/esm/typescript-testing/typescript-shuttle-v2-valid.js.map +2 -2
  99. package/dist/types/DSShuttleV2.d.ts +2 -2
  100. package/dist/types/config/useAutoCalculated/index.d.ts +7 -7
  101. package/dist/types/config/useAutoCalculated/useDataStructure.d.ts +7 -7
  102. package/dist/types/config/useStore/useStore.d.ts +64 -64
  103. package/dist/types/config/useValidateProps.d.ts +1 -1
  104. package/dist/types/constants/index.d.ts +6 -2
  105. package/dist/types/parts/Dnd/DndHandle.d.ts +3 -10
  106. package/dist/types/parts/Header.d.ts +1 -1
  107. package/dist/types/parts/Item/Item.d.ts +1 -4
  108. package/dist/types/parts/Item/ItemActions/ItemActions.d.ts +1 -1
  109. package/dist/types/parts/Item/ItemActions/{useInnerRefHandlers.d.ts → useInnerRefActionHandlers.d.ts} +1 -1
  110. package/dist/types/parts/Item/ItemMiddleSection.d.ts +1 -1
  111. package/dist/types/parts/Item/ItemOverlay.d.ts +1 -1
  112. package/dist/types/parts/Item/ItemSelectionUi/CheckboxSelectionUI.d.ts +3 -0
  113. package/dist/types/parts/Item/ItemSelectionUi/ItemSelectionUI.d.ts +3 -0
  114. package/dist/types/parts/Item/ItemSelectionUi/ItemSelectionUI.types.d.ts +11 -0
  115. package/dist/types/parts/Item/ItemSelectionUi/VerticalBarSelectionUI.d.ts +3 -0
  116. package/dist/types/parts/Item/TextSection.d.ts +1 -1
  117. package/dist/types/parts/Item/useItemInnerRefHandlers.d.ts +5 -0
  118. package/dist/types/parts/MainContent.d.ts +1 -1
  119. package/dist/types/parts/Panel/bottom/LoadMoreBtn.d.ts +2 -1
  120. package/dist/types/parts/Panel/bottom/LoadingMore.d.ts +2 -1
  121. package/dist/types/parts/Panel/bottom/PanelContentBottomSection.d.ts +1 -1
  122. package/dist/types/parts/Panel/bottom/{useInnerRefHandlers.d.ts → useLoadMoreBtnInnerRefHandlers.d.ts} +1 -1
  123. package/dist/types/parts/Panel/middle/EmptyItems.d.ts +2 -1
  124. package/dist/types/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.d.ts +2 -2
  125. package/dist/types/parts/Panel/middle/LoadingItems.d.ts +2 -1
  126. package/dist/types/parts/Panel/middle/MultipleSelectionAction.d.ts +1 -1
  127. package/dist/types/parts/Panel/middle/PanelContentMiddleSection.d.ts +1 -1
  128. package/dist/types/parts/Panel/middle/ShuttleLoadingAnnouncement.d.ts +1 -1
  129. package/dist/types/parts/Panel/top/AriaLivePanelCenter.d.ts +2 -1
  130. package/dist/types/parts/Panel/top/PanelContentTopSection.d.ts +2 -1
  131. package/dist/types/parts/Panel/top/PanelFilterSection.d.ts +2 -1
  132. package/dist/types/parts/Panel/top/SelectionHeader.d.ts +1 -1
  133. package/dist/types/parts/PanelWrapper.d.ts +1 -1
  134. package/dist/types/react-desc-prop-types.d.ts +111 -57
  135. package/package.json +29 -29
  136. package/dist/cjs/parts/HoC/withConditionalUseSortable.js.map +0 -7
  137. package/dist/cjs/parts/Item/ItemActions/useInnerRefHandlers.js.map +0 -7
  138. package/dist/cjs/parts/Item/ItemSelection.js.map +0 -7
  139. package/dist/cjs/parts/Panel/bottom/useInnerRefHandlers.js.map +0 -7
  140. package/dist/esm/parts/HoC/withConditionalUseSortable.js +0 -13
  141. package/dist/esm/parts/HoC/withConditionalUseSortable.js.map +0 -7
  142. package/dist/esm/parts/Item/ItemActions/useInnerRefHandlers.js.map +0 -7
  143. package/dist/esm/parts/Item/ItemSelection.js.map +0 -7
  144. package/dist/esm/parts/Panel/bottom/useInnerRefHandlers.js.map +0 -7
  145. package/dist/types/parts/HoC/withConditionalUseSortable.d.ts +0 -9
  146. package/dist/types/parts/Item/ItemSelection.d.ts +0 -3
  147. package/dist/types/tests/DSShuttlev2.PUI-16059.test.d.ts +0 -1
  148. package/dist/types/tests/configs/ControlledTestRender.d.ts +0 -1
  149. package/dist/types/tests/configs/basic.d.ts +0 -24
  150. package/dist/types/tests/configs/breadcrumb.d.ts +0 -1
  151. package/dist/types/tests/configs/dnd.d.ts +0 -1
  152. package/dist/types/tests/configs/filter.d.ts +0 -30
  153. package/dist/types/tests/configs/loadMore.d.ts +0 -28
  154. package/dist/types/tests/configs/soft-delete.d.ts +0 -1
  155. package/dist/types/tests/loadMore/ShuttleV2WithLoadMoreTestable.d.ts +0 -2
  156. package/dist/types/tests/loadMore/shuttle-v2.load-more.focus.test.d.ts +0 -1
  157. package/dist/types/tests/loadMore/shuttle-v2.load-more.test.d.ts +0 -1
  158. package/dist/types/tests/shuttle-v2.a11y.test.d.ts +0 -1
  159. package/dist/types/tests/shuttle-v2.data-testid.test.d.ts +0 -1
  160. package/dist/types/tests/shuttle-v2.dnd.test.d.ts +0 -1
  161. package/dist/types/tests/shuttle-v2.events.test.d.ts +0 -1
  162. package/dist/types/tests/shuttle-v2.exports.test.d.ts +0 -1
  163. package/dist/types/tests/shuttle-v2.get-owner-props.test.d.ts +0 -1
  164. package/dist/types/tests/shuttle-v2.keyboard.test.d.ts +0 -1
  165. package/dist/types/tests/shuttle-v2.soft-delete.test.d.ts +0 -1
  166. package/dist/types/typescript-testing/typescript-shuttle-v2-valid.d.ts +0 -1
@@ -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 { 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';\nimport type { DSShuttleV2T } from './react-desc-prop-types.js';\n\nconst DSShuttleV2WithZustand = withZustand(MainContent, config);\n\nconst DSShuttleV2 = <T extends object, H extends object, N extends object, K extends object>(\n props: DSShuttleV2T.Props<T, H, N, K>,\n): React.JSX.Element => <DSShuttleV2WithZustand {...props} />;\n\nDSShuttleV2.displayName = 'DSShuttlev2';\nconst DSShuttleV2WithSchema = describe(DSShuttleV2);\n\nDSShuttleV2WithSchema.propTypes = DSShuttleV2PropTypesSchema;\n\nexport { DSShuttleV2, DSShuttleV2WithSchema };\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACWC;AAXxB,SAAS,gBAAgB;AACzB,SAAS,mBAAmB;AAC5B,SAAS,mBAAmB;AAC5B,SAAS,cAAc;AACvB,SAAS,kCAAkC;AAG3C,MAAM,yBAAyB,YAAY,aAAa,MAAM;AAE9D,MAAM,cAAc,CAClB,UACsB,oBAAC,0BAAwB,GAAG,OAAO;AAE3D,YAAY,cAAc;AAC1B,MAAM,wBAAwB,SAAS,WAAW;AAElD,sBAAsB,YAAY;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { 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';\nimport type { DSShuttleV2T } from './react-desc-prop-types.js';\n\nconst DSShuttleV2WithZustand = withZustand(MainContent, config);\n\nconst DSShuttleV2 = <D extends Record<string, unknown> = Record<string, unknown>>(\n props: DSShuttleV2T.Props<D>,\n // The internal zustand-wrapped tree operates on the default (erased) datum shape; the public\n // surface stays generic over D so consumers get typed data. Bridge the two with a single cast.\n): React.JSX.Element => <DSShuttleV2WithZustand {...(props as DSShuttleV2T.Props)} />;\n\nDSShuttleV2.displayName = 'DSShuttlev2';\nconst DSShuttleV2WithSchema = describe(DSShuttleV2);\n\nDSShuttleV2WithSchema.propTypes = DSShuttleV2PropTypesSchema;\n\nexport { DSShuttleV2, DSShuttleV2WithSchema };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACaC;AAbxB,SAAS,gBAAgB;AACzB,SAAS,mBAAmB;AAC5B,SAAS,mBAAmB;AAC5B,SAAS,cAAc;AACvB,SAAS,kCAAkC;AAG3C,MAAM,yBAAyB,YAAY,aAAa,MAAM;AAE9D,MAAM,cAAc,CAClB,UAGsB,oBAAC,0BAAwB,GAAI,OAA8B;AAEnF,YAAY,cAAc;AAC1B,MAAM,wBAAwB,SAAS,WAAW;AAElD,sBAAsB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/config/useAutoCalculated/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useMemo } from 'react';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types.js';\nimport { useDataStructure } from './useDataStructure.js';\nimport { useShuttleVirtualized } from './useShuttleVirtualized.js';\n\nexport const useAutoCalculated = <T extends object, H extends object, N extends object, K extends object>(\n propsWithDefaults: DSShuttleV2T.InternalProps<T, H, N, K>,\n) => {\n const dataScructured = useDataStructure(propsWithDefaults);\n const virtualData = useShuttleVirtualized();\n\n return useMemo(() => ({ ...dataScructured, ...virtualData }), [dataScructured, virtualData]);\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,eAAe;AAExB,SAAS,wBAAwB;AACjC,SAAS,6BAA6B;AAE/B,MAAM,oBAAoB,CAC/B,sBACG;AACH,QAAM,iBAAiB,iBAAiB,iBAAiB;AACzD,QAAM,cAAc,sBAAsB;AAE1C,SAAO,QAAQ,OAAO,EAAE,GAAG,gBAAgB,GAAG,YAAY,IAAI,CAAC,gBAAgB,WAAW,CAAC;AAC7F;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useMemo } from 'react';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types.js';\nimport { useDataStructure } from './useDataStructure.js';\nimport { useShuttleVirtualized } from './useShuttleVirtualized.js';\n\nexport const useAutoCalculated = (propsWithDefaults: DSShuttleV2T.InternalProps) => {\n const dataScructured = useDataStructure(propsWithDefaults);\n const virtualData = useShuttleVirtualized();\n\n return useMemo(() => ({ ...dataScructured, ...virtualData }), [dataScructured, virtualData]);\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,eAAe;AAExB,SAAS,wBAAwB;AACjC,SAAS,6BAA6B;AAE/B,MAAM,oBAAoB,CAAC,sBAAkD;AAClF,QAAM,iBAAiB,iBAAiB,iBAAiB;AACzD,QAAM,cAAc,sBAAsB;AAE1C,SAAO,QAAQ,OAAO,EAAE,GAAG,gBAAgB,GAAG,YAAY,IAAI,CAAC,gBAAgB,WAAW,CAAC;AAC7F;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/config/useAutoCalculated/useDataStructure.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useMemo } from 'react';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types.js';\n\ntype ConfigureDestinationConfig = {\n destinationData: DSShuttleV2T.Datum[];\n destinationSelectedItems: DSShuttleV2T.SelectionMap;\n destinationSoftDeletedItems: DSShuttleV2T.SoftDeletedMap;\n getId: DSShuttleV2T.PrimaryKeyHydraters['getId'];\n getPreventMove: DSShuttleV2T.FunctionalHydraters['getPreventMove'];\n};\nconst configureDestination = ({\n destinationData,\n destinationSelectedItems,\n destinationSoftDeletedItems,\n getId,\n getPreventMove,\n}: ConfigureDestinationConfig) => {\n const destinationSelectedItemsMap: Record<string, { datum: DSShuttleV2T.Datum; index: number }> = {};\n const destinationSelectionArray: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n const destinationSelectionableDataIds: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n\n const destinationSelectionItemArray: DSShuttleV2T.Datum[] = [];\n const destinationConfiguredData: DSShuttleV2T.ConfiguredDatum[] = [];\n const destinationSelectionableData: DSShuttleV2T.ConfiguredDatum[] = [];\n\n destinationData.forEach((datum, i) => {\n const hydratedId = getId(datum);\n const hydratedPreventMove = getPreventMove?.(datum, { isDestinationPanel: true }) ?? false;\n let isSelected = false;\n if (destinationSelectedItems[hydratedId] === true) {\n destinationSelectionItemArray.push(datum);\n destinationSelectionArray.push(hydratedId);\n isSelected = true;\n }\n let softDeleted = false;\n if (destinationSoftDeletedItems[hydratedId] === true) {\n softDeleted = true;\n }\n destinationSelectedItemsMap[hydratedId] = { datum, index: i };\n const configuredItem = {\n hydratedId,\n hydratedPreventMove,\n isSelected,\n softDeleted,\n original: datum,\n localIndex: i,\n isFirst: i === 0,\n isLast: i === destinationData.length - 1,\n } as const;\n destinationConfiguredData.push(configuredItem);\n if (!hydratedPreventMove && !softDeleted) {\n destinationSelectionableData.push(configuredItem);\n destinationSelectionableDataIds.push(`${hydratedId}`);\n }\n });\n const destinationHasMultipleSelectedItems = destinationSelectionArray.length >= 1;\n const destinationSelectionableIds = destinationSelectionableDataIds.join(' ');\n\n return {\n destinationSelectedItemsMap,\n destinationSelectionItemArray,\n destinationSelectionArray,\n destinationHasMultipleSelectedItems,\n destinationConfiguredData,\n destinationSelectionableData,\n destinationSelectionableDataIds,\n destinationSelectionableIds,\n };\n};\ntype ConfigureSourceConfig = {\n sourceData: DSShuttleV2T.Datum[];\n sourceSelectedItems: DSShuttleV2T.SelectionMap;\n sourceSoftDeletedItems: DSShuttleV2T.SoftDeletedMap;\n getId: DSShuttleV2T.PrimaryKeyHydraters['getId'];\n getPreventMove: DSShuttleV2T.FunctionalHydraters['getPreventMove'];\n};\n\nconst configureSource = ({\n sourceData,\n sourceSelectedItems,\n sourceSoftDeletedItems,\n getId,\n getPreventMove,\n}: ConfigureSourceConfig) => {\n const sourceSelectedItemsMap: Record<string, { datum: DSShuttleV2T.Datum; index: number }> = {};\n const sourceSelectionArray: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n const sourceSelectionableDataIds: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n\n const sourceSelectionItemArray: DSShuttleV2T.Datum[] = [];\n const sourceConfiguredData: DSShuttleV2T.ConfiguredDatum[] = [];\n const sourceSelectionableData: DSShuttleV2T.ConfiguredDatum[] = [];\n sourceData.forEach((datum, i) => {\n const hydratedId = getId(datum);\n const hydratedPreventMove = getPreventMove?.(datum, { isDestinationPanel: false }) ?? false;\n let isSelected = false;\n if (sourceSelectedItems[hydratedId] === true) {\n sourceSelectionItemArray.push(datum);\n sourceSelectionArray.push(hydratedId);\n isSelected = true;\n }\n let softDeleted = false;\n if (sourceSoftDeletedItems[hydratedId] === true) {\n softDeleted = true;\n }\n\n sourceSelectedItemsMap[hydratedId] = { datum, index: i };\n const configuredItem = {\n hydratedId,\n hydratedPreventMove,\n isSelected,\n softDeleted,\n original: datum,\n localIndex: i,\n isFirst: i === 0,\n isLast: i === sourceData.length - 1,\n } as const;\n sourceConfiguredData.push(configuredItem);\n if (!hydratedPreventMove && !softDeleted) {\n sourceSelectionableData.push(configuredItem);\n sourceSelectionableDataIds.push(`${hydratedId}`);\n }\n });\n const sourceHasMultipleSelectedItems = sourceSelectionArray.length >= 1;\n const sourceSelectionableIds = sourceSelectionableDataIds.join(' ');\n return {\n sourceConfiguredData,\n sourceSelectedItemsMap,\n sourceSelectionItemArray,\n sourceSelectionArray,\n sourceHasMultipleSelectedItems,\n sourceSelectionableData,\n sourceSelectionableDataIds,\n sourceSelectionableIds,\n };\n};\n\nexport const useDataStructure = <T extends object, H extends object, N extends object, K extends object>(\n propsFromUser: DSShuttleV2T.InternalProps<T, H, N, K>,\n) => {\n const {\n sourceData,\n sourceSelectedItems,\n destinationData,\n destinationSelectedItems,\n getId,\n getPreventMove,\n sourceSoftDeletedItems,\n destinationSoftDeletedItems,\n } = propsFromUser;\n return useMemo(\n () => ({\n ...configureSource({ sourceData, sourceSelectedItems, sourceSoftDeletedItems, getId, getPreventMove }),\n ...configureDestination({\n destinationData,\n destinationSelectedItems,\n destinationSoftDeletedItems,\n getId,\n getPreventMove,\n }),\n }),\n [\n sourceData,\n sourceSelectedItems,\n sourceSoftDeletedItems,\n getId,\n getPreventMove,\n destinationData,\n destinationSelectedItems,\n destinationSoftDeletedItems,\n ],\n );\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,eAAe;AAUxB,MAAM,uBAAuB,CAAC;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAkC;AAChC,QAAM,8BAA4F,CAAC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B,wBAAwB,OAAO,eAAe,CAAC;AAAA,MACrG,GAAG,qBAAqB;AAAA,QACtB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC;AAAA,IACH;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useMemo } from 'react';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types.js';\n\ntype ConfigureDestinationConfig = {\n destinationData: DSShuttleV2T.Datum[];\n destinationSelectedItems: DSShuttleV2T.SelectionMap;\n destinationSoftDeletedItems: DSShuttleV2T.SoftDeletedMap;\n getId: DSShuttleV2T.PrimaryKeyHydraters['getId'];\n getPreventMove: DSShuttleV2T.FunctionalHydraters['getPreventMove'];\n};\nconst configureDestination = ({\n destinationData,\n destinationSelectedItems,\n destinationSoftDeletedItems,\n getId,\n getPreventMove,\n}: ConfigureDestinationConfig) => {\n const destinationSelectedItemsMap: Record<string, { datum: DSShuttleV2T.Datum; index: number }> = {};\n const destinationSelectionArray: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n const destinationSelectionableDataIds: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n\n const destinationSelectionItemArray: DSShuttleV2T.Datum[] = [];\n const destinationConfiguredData: DSShuttleV2T.ConfiguredDatum[] = [];\n const destinationSelectionableData: DSShuttleV2T.ConfiguredDatum[] = [];\n\n destinationData.forEach((datum, i) => {\n const hydratedId = getId(datum);\n const hydratedPreventMove = getPreventMove?.(datum, { isDestinationPanel: true }) ?? false;\n let isSelected = false;\n if (destinationSelectedItems[hydratedId] === true) {\n destinationSelectionItemArray.push(datum);\n destinationSelectionArray.push(hydratedId);\n isSelected = true;\n }\n let softDeleted = false;\n if (destinationSoftDeletedItems[hydratedId] === true) {\n softDeleted = true;\n }\n destinationSelectedItemsMap[hydratedId] = { datum, index: i };\n const configuredItem = {\n hydratedId,\n hydratedPreventMove,\n isSelected,\n softDeleted,\n original: datum,\n localIndex: i,\n isFirst: i === 0,\n isLast: i === destinationData.length - 1,\n } as const;\n destinationConfiguredData.push(configuredItem);\n if (!hydratedPreventMove && !softDeleted) {\n destinationSelectionableData.push(configuredItem);\n destinationSelectionableDataIds.push(`${hydratedId}`);\n }\n });\n const destinationHasMultipleSelectedItems = destinationSelectionArray.length >= 1;\n const destinationSelectionableIds = destinationSelectionableDataIds.join(' ');\n\n return {\n destinationSelectedItemsMap,\n destinationSelectionItemArray,\n destinationSelectionArray,\n destinationHasMultipleSelectedItems,\n destinationConfiguredData,\n destinationSelectionableData,\n destinationSelectionableDataIds,\n destinationSelectionableIds,\n };\n};\ntype ConfigureSourceConfig = {\n sourceData: DSShuttleV2T.Datum[];\n sourceSelectedItems: DSShuttleV2T.SelectionMap;\n sourceSoftDeletedItems: DSShuttleV2T.SoftDeletedMap;\n getId: DSShuttleV2T.PrimaryKeyHydraters['getId'];\n getPreventMove: DSShuttleV2T.FunctionalHydraters['getPreventMove'];\n};\n\nconst configureSource = ({\n sourceData,\n sourceSelectedItems,\n sourceSoftDeletedItems,\n getId,\n getPreventMove,\n}: ConfigureSourceConfig) => {\n const sourceSelectedItemsMap: Record<string, { datum: DSShuttleV2T.Datum; index: number }> = {};\n const sourceSelectionArray: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n const sourceSelectionableDataIds: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n\n const sourceSelectionItemArray: DSShuttleV2T.Datum[] = [];\n const sourceConfiguredData: DSShuttleV2T.ConfiguredDatum[] = [];\n const sourceSelectionableData: DSShuttleV2T.ConfiguredDatum[] = [];\n sourceData.forEach((datum, i) => {\n const hydratedId = getId(datum);\n const hydratedPreventMove = getPreventMove?.(datum, { isDestinationPanel: false }) ?? false;\n let isSelected = false;\n if (sourceSelectedItems[hydratedId] === true) {\n sourceSelectionItemArray.push(datum);\n sourceSelectionArray.push(hydratedId);\n isSelected = true;\n }\n let softDeleted = false;\n if (sourceSoftDeletedItems[hydratedId] === true) {\n softDeleted = true;\n }\n\n sourceSelectedItemsMap[hydratedId] = { datum, index: i };\n const configuredItem = {\n hydratedId,\n hydratedPreventMove,\n isSelected,\n softDeleted,\n original: datum,\n localIndex: i,\n isFirst: i === 0,\n isLast: i === sourceData.length - 1,\n } as const;\n sourceConfiguredData.push(configuredItem);\n if (!hydratedPreventMove && !softDeleted) {\n sourceSelectionableData.push(configuredItem);\n sourceSelectionableDataIds.push(`${hydratedId}`);\n }\n });\n const sourceHasMultipleSelectedItems = sourceSelectionArray.length >= 1;\n const sourceSelectionableIds = sourceSelectionableDataIds.join(' ');\n return {\n sourceConfiguredData,\n sourceSelectedItemsMap,\n sourceSelectionItemArray,\n sourceSelectionArray,\n sourceHasMultipleSelectedItems,\n sourceSelectionableData,\n sourceSelectionableDataIds,\n sourceSelectionableIds,\n };\n};\n\nexport const useDataStructure = (propsFromUser: DSShuttleV2T.InternalProps) => {\n const {\n sourceData,\n sourceSelectedItems,\n destinationData,\n destinationSelectedItems,\n getId,\n getPreventMove,\n sourceSoftDeletedItems,\n destinationSoftDeletedItems,\n } = propsFromUser;\n return useMemo(\n () => ({\n ...configureSource({ sourceData, sourceSelectedItems, sourceSoftDeletedItems, getId, getPreventMove }),\n ...configureDestination({\n destinationData,\n destinationSelectedItems,\n destinationSoftDeletedItems,\n getId,\n getPreventMove,\n }),\n }),\n [\n sourceData,\n sourceSelectedItems,\n sourceSoftDeletedItems,\n getId,\n getPreventMove,\n destinationData,\n destinationSelectedItems,\n destinationSoftDeletedItems,\n ],\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,eAAe;AAUxB,MAAM,uBAAuB,CAAC;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAkC;AAChC,QAAM,8BAA4F,CAAC;AACnG,QAAM,4B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AAO,eAAe,CAAC;AAAA,MACrG,GAAG,qBAAqB;AAAA,QACtB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC;AAAA,IACH;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/config/useStore/useStore.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { createInternalAndPropsContext, type ZustandT } from '@elliemae/ds-zustand-helpers';\nimport { uid } from 'uid';\nimport deepequal from 'fast-deep-equal/react.js';\nimport { defaultProps, type DSShuttleV2T } from '../../react-desc-prop-types.js';\nimport { REGIONS_FOCUSES, ACTIONS_FOCUSES, ITEMS_FOCUSES } from '../../constants/index.js';\nimport { useAutoCalculated } from '../useAutoCalculated/index.js';\nimport { focusAndTabIndexManager } from './focusAndTabIndexManager.js';\n\nconst internalAtomDefaultValues: DSShuttleV2T.InternalAtoms = {\n focusRegion: REGIONS_FOCUSES.RESET,\n focusItem: ITEMS_FOCUSES.RESET,\n focusItemAction: ACTIONS_FOCUSES.RESET,\n deferFocusUntilFirstRender: false,\n dropIndicatorPosition: 'none',\n overId: '',\n lastActiveId: '',\n dndDraggingItem: null,\n dndDraggingItemMeta: null,\n isDropValid: false,\n sourcePanelLastSelectedItem: null,\n destinationPanelLastSelectedItem: null,\n shuttleInternalId: uid(),\n};\n\nconst selectors: ZustandT.SelectorObject<DSShuttleV2T.ShuttleInternalStore, DSShuttleV2T.Selectors> = (get) => ({\n getIsDragAndDropHappening: () => Boolean(get()?.lastActiveId) && get()?.lastActiveId !== '',\n getPanelLastSelectedItem: (isDestinationPanel: boolean) =>\n isDestinationPanel ? get()?.destinationPanelLastSelectedItem : get()?.sourcePanelLastSelectedItem,\n});\n\nconst reducers: ZustandT.ReducerObject<DSShuttleV2T.ShuttleInternalStore, DSShuttleV2T.Reducers> = () => ({});\n\nconst subscribers: ZustandT.Subscribers<DSShuttleV2T.ShuttleInternalStore> = (api) => {\n api.subscribe(\n (state) => [state.focusRegion, state.focusItem, state.focusItemAction, state.get] as const,\n focusAndTabIndexManager,\n {\n equalityFn: deepequal,\n },\n );\n};\n\nexport const { PropsProvider, usePropsStore, InternalProvider, useInternalStore } = createInternalAndPropsContext<\n DSShuttleV2T.InternalProps<object, object, object, object>,\n DSShuttleV2T.InternalAtoms,\n DSShuttleV2T.UseAutoCalculatedT,\n DSShuttleV2T.Selectors,\n DSShuttleV2T.Reducers\n>();\n\nexport const config = {\n defaultProps: defaultProps as DSShuttleV2T.InternalProps<object, object, object, object>,\n internalAtomDefaultValues,\n useAutoCalculated,\n selectors,\n reducers,\n subscribers,\n PropsProvider,\n usePropsStore,\n InternalProvider,\n useInternalStore,\n};\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { createInternalAndPropsContext, type ZustandT } from '@elliemae/ds-zustand-helpers';\nimport { uid } from 'uid';\nimport deepequal from 'fast-deep-equal/react.js';\nimport { defaultProps, type DSShuttleV2T } from '../../react-desc-prop-types.js';\nimport { REGIONS_FOCUSES, ACTIONS_FOCUSES, ITEMS_FOCUSES } from '../../constants/index.js';\nimport { useAutoCalculated } from '../useAutoCalculated/index.js';\nimport { focusAndTabIndexManager } from './focusAndTabIndexManager.js';\n\nconst internalAtomDefaultValues: DSShuttleV2T.InternalAtoms = {\n focusRegion: REGIONS_FOCUSES.RESET,\n focusItem: ITEMS_FOCUSES.RESET,\n focusItemAction: ACTIONS_FOCUSES.RESET,\n deferFocusUntilFirstRender: false,\n dropIndicatorPosition: 'none',\n overId: '',\n lastActiveId: '',\n dndDraggingItem: null,\n dndDraggingItemMeta: null,\n isDropValid: false,\n sourcePanelLastSelectedItem: null,\n destinationPanelLastSelectedItem: null,\n shuttleInternalId: uid(),\n};\n\nconst selectors: ZustandT.SelectorObject<DSShuttleV2T.ShuttleInternalStore, DSShuttleV2T.Selectors> = (get) => ({\n getIsDragAndDropHappening: () => Boolean(get()?.lastActiveId) && get()?.lastActiveId !== '',\n getPanelLastSelectedItem: (isDestinationPanel: boolean) =>\n isDestinationPanel ? get()?.destinationPanelLastSelectedItem : get()?.sourcePanelLastSelectedItem,\n});\n\nconst reducers: ZustandT.ReducerObject<DSShuttleV2T.ShuttleInternalStore, DSShuttleV2T.Reducers> = () => ({});\n\nconst subscribers: ZustandT.Subscribers<DSShuttleV2T.ShuttleInternalStore> = (api) => {\n api.subscribe(\n (state) => [state.focusRegion, state.focusItem, state.focusItemAction, state.get] as const,\n focusAndTabIndexManager,\n {\n equalityFn: deepequal,\n },\n );\n};\n\nexport const { PropsProvider, usePropsStore, InternalProvider, useInternalStore } = createInternalAndPropsContext<\n DSShuttleV2T.InternalProps,\n DSShuttleV2T.InternalAtoms,\n DSShuttleV2T.UseAutoCalculatedT,\n DSShuttleV2T.Selectors,\n DSShuttleV2T.Reducers\n>();\n\nexport const config = {\n defaultProps: defaultProps as DSShuttleV2T.InternalProps,\n internalAtomDefaultValues,\n useAutoCalculated,\n selectors,\n reducers,\n subscribers,\n PropsProvider,\n usePropsStore,\n InternalProvider,\n useInternalStore,\n};\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,qCAAoD;AAC7D,SAAS,WAAW;AACpB,OAAO,eAAe;AACtB,SAAS,oBAAuC;AAChD,SAAS,iBAAiB,iBAAiB,qBAAqB;AAChE,SAAS,yBAAyB;AAClC,SAAS,+BAA+B;AAExC,MAAM,4BAAwD;AAAA,EAC5D,aAAa,gBAAgB;AAAA,EAC7B,WAAW,cAAc;AAAA,EACzB,iBAAiB,gBAAgB;AAAA,EACjC,4BAA4B;AAAA,EAC5B,uBAAuB;AAAA,EACvB,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,aAAa;AAAA,EACb,6BAA6B;AAAA,EAC7B,kCAAkC;AAAA,EAClC,mBAAmB,IAAI;AACzB;AAEA,MAAM,YAAgG,CAAC,SAAS;AAAA,EAC9G,2BAA2B,MAAM,QAAQ,IAAI,GAAG,YAAY,KAAK,IAAI,GAAG,iBAAiB;AAAA,EACzF,0BAA0B,CAAC,uBACzB,qBAAqB,IAAI,GAAG,mCAAmC,IAAI,GAAG;AAC1E;AAEA,MAAM,WAA6F,OAAO,CAAC;AAE3G,MAAM,cAAuE,CAAC,QAAQ;AACpF,MAAI;AAAA,IACF,CAAC,UAAU,CAAC,MAAM,aAAa,MAAM,WAAW,MAAM,iBAAiB,MAAM,GAAG;AAAA,IAChF;AAAA,IACA;AAAA,MACE,YAAY;AAAA,IACd;AAAA,EACF;AACF;AAEO,MAAM,EAAE,eAAe,eAAe,kBAAkB,iBAAiB,IAAI,8BAMlF;AAEK,MAAM,SAAS;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useValidateProps.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { WeakValidationMap } from 'react';\nimport { DSShuttleV2Name } from '../constants/index.js';\nimport type { DSShuttleV2T } from '../react-desc-prop-types.js';\n\nexport const useValidateProps = <T extends object, H extends object, N extends object, K extends object>(\n props: DSShuttleV2T.Props<T, H, N, K>,\n propTypes: WeakValidationMap<unknown>,\n): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSShuttleV2Name);\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,sCAAsC;AAE/C,SAAS,uBAAuB;AAGzB,MAAM,mBAAmB,CAC9B,OACA,cACS;AAET,iCAA+B,OAAO,WAAW,eAAe;AAClE;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { WeakValidationMap } from 'react';\nimport { DSShuttleV2Name } from '../constants/index.js';\nimport type { DSShuttleV2T } from '../react-desc-prop-types.js';\n\nexport const useValidateProps = (props: DSShuttleV2T.Props, propTypes: WeakValidationMap<unknown>): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSShuttleV2Name);\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,sCAAsC;AAE/C,SAAS,uBAAuB;AAGzB,MAAM,mBAAmB,CAAC,OAA2B,cAAgD;AAE1G,iCAA+B,OAAO,WAAW,eAAe;AAClE;",
6
6
  "names": []
7
7
  }
@@ -12,6 +12,7 @@ const DSShuttleV2Slots = {
12
12
  ITEM_LABEL_WRAPPER: "item-label-wrapper",
13
13
  ITEM_MIDSECTION_WRAPPER: "item-midsection-wrapper",
14
14
  ITEM_SELECTION: "item-selection",
15
+ ITEM_SELECTION_CHECKBOX_UI: "item-selection-checkbox-ui",
15
16
  ITEM_ACTIONS_WRAPPER: "item-actions-wrapper",
16
17
  ITEM_ACTION_WRAPPER: "item-action-wrapper",
17
18
  ITEM_ACTION_BTN: "item-action-btn",
@@ -26,13 +27,14 @@ const DSShuttleV2Slots = {
26
27
  LOADING_LIST_WRAPPER: "loading-list-wrapper",
27
28
  MOVE_MULTIPLE_WRAPPER: "move-multiple-wrapper",
28
29
  MOVE_MULTIPLE_BTN: "move-multiple-btn",
30
+ MOVE_MULTIPLE_LIVE_REGION: "move-multiple-live-region",
29
31
  LIST_WRAPPER_MID: "list-wrapper-mid",
30
- LIST_WRAPPER_MID_SCROLLER: "list-wrapper-mid-scroller",
31
32
  LIST_WRAPPER_TOP: "list-wrapper-top",
32
33
  AREA_SEARCH_WRAPPER: "area-search-wrapper",
33
34
  AREA_SEARCH_BAR: "area-search-bar",
34
35
  AREA_SELECTION_HEADER: "area-selection-header",
35
36
  AREA_SELECTION_HEADER_COUNT_LABEL: "area-selection-header-count-label",
37
+ DRAG_AND_DROP_HANDLE_WRAPPER: "drag-and-drop-handle-wrapper",
36
38
  DRAG_AND_DROP_HANDLE: "drag-and-drop-handle",
37
39
  ARIA_LIVE_PANEL_CENTER: "aria-live-panel-center"
38
40
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/constants/index.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSShuttleV2Name = 'DSShuttlev2';\n\nexport const DSShuttleV2Slots = {\n HEADER_SEARCH_ICON: 'header-search-icon',\n WRAPPER: 'wrapper',\n PANEL_WRAPPER: 'panel-wrapper',\n LIST_WRAPPER: 'list-wrapper',\n ITEM_WRAPPER: 'item-wrapper',\n ITEM_CHECKBOX: 'item-checkbox',\n ITEM_ICON_WRAPPER: 'item-icon-wrapper',\n ITEM_LABEL_WRAPPER: 'item-label-wrapper',\n ITEM_MIDSECTION_WRAPPER: 'item-midsection-wrapper',\n ITEM_SELECTION: 'item-selection',\n ITEM_ACTIONS_WRAPPER: 'item-actions-wrapper',\n ITEM_ACTION_WRAPPER: 'item-action-wrapper',\n ITEM_ACTION_BTN: 'item-action-btn',\n ITEM_ACTION_BTN_DRILLDOWN_ICON: 'item-action-btn-drilldown-icon',\n ITEM_ACTION_BTN_TO_SOURCE_ICON: 'item-action-btn-to-source-icon',\n ITEM_ACTION_BTN_TO_DESTINATION_ICON: 'item-action-btn-to-destination-icon',\n LIST_BOTTOM_LOADING_MORE: 'list-bottom-loading-more',\n LIST_BOTTOM_LOAD_MORE_BTN: 'list-bottom-load-more-btn',\n LIST_WRAPPER_BOTTOM: 'list-wrapper-bottom',\n EMPTY_LIST_WRAPPER: 'empty-list-wrapper',\n ITEMS_WRAPPER: 'items-wrapper',\n LOADING_LIST_WRAPPER: 'loading-list-wrapper',\n MOVE_MULTIPLE_WRAPPER: 'move-multiple-wrapper',\n MOVE_MULTIPLE_BTN: 'move-multiple-btn',\n LIST_WRAPPER_MID: 'list-wrapper-mid',\n LIST_WRAPPER_MID_SCROLLER: 'list-wrapper-mid-scroller',\n LIST_WRAPPER_TOP: 'list-wrapper-top',\n AREA_SEARCH_WRAPPER: 'area-search-wrapper',\n AREA_SEARCH_BAR: 'area-search-bar',\n AREA_SELECTION_HEADER: 'area-selection-header',\n AREA_SELECTION_HEADER_COUNT_LABEL: 'area-selection-header-count-label',\n DRAG_AND_DROP_HANDLE: 'drag-and-drop-handle',\n ARIA_LIVE_PANEL_CENTER: 'aria-live-panel-center',\n} as const;\n\nexport const SHUTTLE_IDS = {\n SOURCE_PANEL_SEARCH: 'ds-shuttle-v2-source-panel-search',\n DESTINATION_PANEL_SEARCH: 'ds-shuttle-v2-destination-panel-search',\n} as const;\n\nexport const DSShuttleV2DataTestIds = slotObjectToDataTestIds(DSShuttleV2Name, DSShuttleV2Slots);\n\nexport const REGIONS_FOCUSES = {\n SOURCE_HEADER: 'source-header',\n SOURCE_PANEL: 'source-panel',\n SOURCE_PANEL_ITEM: 'source-panel-item',\n SOURCE_PANEL_ITEM_MOVE_ALL: 'source-panel-move-all',\n SOURCE_BOTTOM: 'source-bottom',\n DESTINATION_HEADER: 'destination-header',\n DESTINATION_PANEL: 'destination-panel',\n DESTINATION_PANEL_ITEM: 'destination-panel-item',\n DESTINATION_PANEL_ITEM_MOVE_ALL: 'destination-panel-move-all',\n DESTINATION_BOTTOM: 'destination-bottom',\n RESET: '',\n} as const;\n\nexport const ACTIONS_FOCUSES = {\n MOVE_BTN: 'move-btn',\n DRILLDOWN_BTN: 'drilldown-btn',\n DRAG_N_DROP: 'drag-n-drop',\n PARENT: 'parent',\n RESET: '',\n} as const;\n\nexport const ITEMS_FOCUSES = {\n LOAD_MORE_BTN_SOURCE: 'load-more-btn-source',\n LOAD_MORE_BTN_DESTINATION: 'load-more-btn-destination',\n GET_SPECIFIC_ITEM: ({ hydratedId }: { hydratedId: string }) => hydratedId,\n RESET: '',\n} as const;\n\nexport const DATA_TESTID = {\n SHUTTLE_DRAG_HANDLE: 'shuttle-drag-handle',\n} as const;\n\nexport const DropIndicatorPosition = {\n None: 'none',\n Before: 'before',\n After: 'after',\n Inside: 'inside',\n} as const;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AAEjC,MAAM,kBAAkB;AAExB,MAAM,mBAAmB;AAAA,EAC9B,oBAAoB;AAAA,EACpB,SAAS;AAAA,EACT,eAAe;AAAA,EACf,cAAc;AAAA,EACd,cAAc;AAAA,EACd,eAAe;AAAA,EACf,mBAAmB;AAAA,EACnB,oBAAoB;AAAA,EACpB,yBAAyB;AAAA,EACzB,gBAAgB;AAAA,EAChB,sBAAsB;AAAA,EACtB,qBAAqB;AAAA,EACrB,iBAAiB;AAAA,EACjB,gCAAgC;AAAA,EAChC,gCAAgC;AAAA,EAChC,qCAAqC;AAAA,EACrC,0BAA0B;AAAA,EAC1B,2BAA2B;AAAA,EAC3B,qBAAqB;AAAA,EACrB,oBAAoB;AAAA,EACpB,eAAe;AAAA,EACf,sBAAsB;AAAA,EACtB,uBAAuB;AAAA,EACvB,mBAAmB;AAAA,EACnB,kBAAkB;AAAA,EAClB,2BAA2B;AAAA,EAC3B,kBAAkB;AAAA,EAClB,qBAAqB;AAAA,EACrB,iBAAiB;AAAA,EACjB,uBAAuB;AAAA,EACvB,mCAAmC;AAAA,EACnC,sBAAsB;AAAA,EACtB,wBAAwB;AAC1B;AAEO,MAAM,cAAc;AAAA,EACzB,qBAAqB;AAAA,EACrB,0BAA0B;AAC5B;AAEO,MAAM,yBAAyB,wBAAwB,iBAAiB,gBAAgB;AAExF,MAAM,kBAAkB;AAAA,EAC7B,eAAe;AAAA,EACf,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,4BAA4B;AAAA,EAC5B,eAAe;AAAA,EACf,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,wBAAwB;AAAA,EACxB,iCAAiC;AAAA,EACjC,oBAAoB;AAAA,EACpB,OAAO;AACT;AAEO,MAAM,kBAAkB;AAAA,EAC7B,UAAU;AAAA,EACV,eAAe;AAAA,EACf,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,OAAO;AACT;AAEO,MAAM,gBAAgB;AAAA,EAC3B,sBAAsB;AAAA,EACtB,2BAA2B;AAAA,EAC3B,mBAAmB,CAAC,EAAE,WAAW,MAA8B;AAAA,EAC/D,OAAO;AACT;AAEO,MAAM,cAAc;AAAA,EACzB,qBAAqB;AACvB;AAEO,MAAM,wBAAwB;AAAA,EACnC,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,QAAQ;AACV;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSShuttleV2Name = 'DSShuttlev2';\n\nexport const DSShuttleV2Slots = {\n HEADER_SEARCH_ICON: 'header-search-icon',\n WRAPPER: 'wrapper',\n PANEL_WRAPPER: 'panel-wrapper',\n LIST_WRAPPER: 'list-wrapper',\n ITEM_WRAPPER: 'item-wrapper',\n ITEM_CHECKBOX: 'item-checkbox',\n ITEM_ICON_WRAPPER: 'item-icon-wrapper',\n ITEM_LABEL_WRAPPER: 'item-label-wrapper',\n ITEM_MIDSECTION_WRAPPER: 'item-midsection-wrapper',\n ITEM_SELECTION: 'item-selection',\n ITEM_SELECTION_CHECKBOX_UI: 'item-selection-checkbox-ui',\n ITEM_ACTIONS_WRAPPER: 'item-actions-wrapper',\n ITEM_ACTION_WRAPPER: 'item-action-wrapper',\n ITEM_ACTION_BTN: 'item-action-btn',\n ITEM_ACTION_BTN_DRILLDOWN_ICON: 'item-action-btn-drilldown-icon',\n ITEM_ACTION_BTN_TO_SOURCE_ICON: 'item-action-btn-to-source-icon',\n ITEM_ACTION_BTN_TO_DESTINATION_ICON: 'item-action-btn-to-destination-icon',\n LIST_BOTTOM_LOADING_MORE: 'list-bottom-loading-more',\n LIST_BOTTOM_LOAD_MORE_BTN: 'list-bottom-load-more-btn',\n LIST_WRAPPER_BOTTOM: 'list-wrapper-bottom',\n EMPTY_LIST_WRAPPER: 'empty-list-wrapper',\n ITEMS_WRAPPER: 'items-wrapper',\n LOADING_LIST_WRAPPER: 'loading-list-wrapper',\n MOVE_MULTIPLE_WRAPPER: 'move-multiple-wrapper',\n MOVE_MULTIPLE_BTN: 'move-multiple-btn',\n MOVE_MULTIPLE_LIVE_REGION: 'move-multiple-live-region',\n LIST_WRAPPER_MID: 'list-wrapper-mid',\n LIST_WRAPPER_TOP: 'list-wrapper-top',\n AREA_SEARCH_WRAPPER: 'area-search-wrapper',\n AREA_SEARCH_BAR: 'area-search-bar',\n AREA_SELECTION_HEADER: 'area-selection-header',\n AREA_SELECTION_HEADER_COUNT_LABEL: 'area-selection-header-count-label',\n DRAG_AND_DROP_HANDLE_WRAPPER: 'drag-and-drop-handle-wrapper',\n DRAG_AND_DROP_HANDLE: 'drag-and-drop-handle',\n ARIA_LIVE_PANEL_CENTER: 'aria-live-panel-center',\n} as const;\n\nexport const SHUTTLE_IDS = {\n SOURCE_PANEL_SEARCH: 'ds-shuttle-v2-source-panel-search',\n DESTINATION_PANEL_SEARCH: 'ds-shuttle-v2-destination-panel-search',\n} as const;\n\nexport const DSShuttleV2DataTestIds = slotObjectToDataTestIds(DSShuttleV2Name, DSShuttleV2Slots);\n\nexport const REGIONS_FOCUSES = {\n SOURCE_HEADER: 'source-header',\n SOURCE_PANEL: 'source-panel',\n SOURCE_PANEL_ITEM: 'source-panel-item',\n SOURCE_PANEL_ITEM_MOVE_ALL: 'source-panel-move-all',\n SOURCE_BOTTOM: 'source-bottom',\n DESTINATION_HEADER: 'destination-header',\n DESTINATION_PANEL: 'destination-panel',\n DESTINATION_PANEL_ITEM: 'destination-panel-item',\n DESTINATION_PANEL_ITEM_MOVE_ALL: 'destination-panel-move-all',\n DESTINATION_BOTTOM: 'destination-bottom',\n RESET: '',\n} as const;\n\nexport const ACTIONS_FOCUSES = {\n MOVE_BTN: 'move-btn',\n DRILLDOWN_BTN: 'drilldown-btn',\n DRAG_N_DROP: 'drag-n-drop',\n PARENT: 'parent',\n RESET: '',\n} as const;\n\nexport const ITEMS_FOCUSES = {\n LOAD_MORE_BTN_SOURCE: 'load-more-btn-source',\n LOAD_MORE_BTN_DESTINATION: 'load-more-btn-destination',\n GET_SPECIFIC_ITEM: ({ hydratedId }: { hydratedId: string }) => hydratedId,\n RESET: '',\n} as const;\n\nexport const DATA_TESTID = {\n SHUTTLE_DRAG_HANDLE: 'shuttle-drag-handle',\n} as const;\n\nexport const DropIndicatorPosition = {\n None: 'none',\n Before: 'before',\n After: 'after',\n Inside: 'inside',\n} as const;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AAEjC,MAAM,kBAAkB;AAExB,MAAM,mBAAmB;AAAA,EAC9B,oBAAoB;AAAA,EACpB,SAAS;AAAA,EACT,eAAe;AAAA,EACf,cAAc;AAAA,EACd,cAAc;AAAA,EACd,eAAe;AAAA,EACf,mBAAmB;AAAA,EACnB,oBAAoB;AAAA,EACpB,yBAAyB;AAAA,EACzB,gBAAgB;AAAA,EAChB,4BAA4B;AAAA,EAC5B,sBAAsB;AAAA,EACtB,qBAAqB;AAAA,EACrB,iBAAiB;AAAA,EACjB,gCAAgC;AAAA,EAChC,gCAAgC;AAAA,EAChC,qCAAqC;AAAA,EACrC,0BAA0B;AAAA,EAC1B,2BAA2B;AAAA,EAC3B,qBAAqB;AAAA,EACrB,oBAAoB;AAAA,EACpB,eAAe;AAAA,EACf,sBAAsB;AAAA,EACtB,uBAAuB;AAAA,EACvB,mBAAmB;AAAA,EACnB,2BAA2B;AAAA,EAC3B,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,qBAAqB;AAAA,EACrB,iBAAiB;AAAA,EACjB,uBAAuB;AAAA,EACvB,mCAAmC;AAAA,EACnC,8BAA8B;AAAA,EAC9B,sBAAsB;AAAA,EACtB,wBAAwB;AAC1B;AAEO,MAAM,cAAc;AAAA,EACzB,qBAAqB;AAAA,EACrB,0BAA0B;AAC5B;AAEO,MAAM,yBAAyB,wBAAwB,iBAAiB,gBAAgB;AAExF,MAAM,kBAAkB;AAAA,EAC7B,eAAe;AAAA,EACf,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,4BAA4B;AAAA,EAC5B,eAAe;AAAA,EACf,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,wBAAwB;AAAA,EACxB,iCAAiC;AAAA,EACjC,oBAAoB;AAAA,EACpB,OAAO;AACT;AAEO,MAAM,kBAAkB;AAAA,EAC7B,UAAU;AAAA,EACV,eAAe;AAAA,EACf,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,OAAO;AACT;AAEO,MAAM,gBAAgB;AAAA,EAC3B,sBAAsB;AAAA,EACtB,2BAA2B;AAAA,EAC3B,mBAAmB,CAAC,EAAE,WAAW,MAA8B;AAAA,EAC/D,OAAO;AACT;AAEO,MAAM,cAAc;AAAA,EACzB,qBAAqB;AACvB;AAEO,MAAM,wBAAwB;AAAA,EACnC,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,QAAQ;AACV;",
6
6
  "names": []
7
7
  }
@@ -3,8 +3,5 @@
3
3
  "sideEffects": [
4
4
  "*.css",
5
5
  "*.scss"
6
- ],
7
- "publishConfig": {
8
- "access": "public"
9
- }
6
+ ]
10
7
  }
@@ -1,11 +1,11 @@
1
1
  import * as React from "react";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import { createElement } from "react";
4
- import React2 from "react";
5
4
  import { GripperVertical } from "@elliemae/ds-icons";
6
- import { styled, mergeRefs } from "@elliemae/ds-system";
7
- import { DATA_TESTID, DSShuttleV2Name, DSShuttleV2Slots } from "../../constants/index.js";
5
+ import { mergeRefs, styled } from "@elliemae/ds-system";
6
+ import React2 from "react";
8
7
  import { usePropsStore } from "../../config/useStore/useStore.js";
8
+ import { DATA_TESTID, DSShuttleV2Name, DSShuttleV2Slots } from "../../constants/index.js";
9
9
  const StyledGripperButtonOrOverlay = styled("div", {
10
10
  name: DSShuttleV2Name,
11
11
  slot: DSShuttleV2Slots.DRAG_AND_DROP_HANDLE
@@ -19,37 +19,63 @@ const StyledGripperButtonOrOverlay = styled("div", {
19
19
  display: flex;
20
20
  align-items: center;
21
21
  touch-action: none;
22
+ display: flex;
23
+ min-width: 24px;
24
+ justify-content: center;
22
25
  &:focus {
23
- outline: 1px solid brand-700;
26
+ .em-ds-icon {
27
+ outline: 2px solid brand-700;
28
+ }
24
29
  }
25
30
  `;
31
+ const StyledGripperWrapper = styled("div", {
32
+ name: DSShuttleV2Name,
33
+ slot: DSShuttleV2Slots.DRAG_AND_DROP_HANDLE_WRAPPER
34
+ })`
35
+ display: flex;
36
+ height: 100%;
37
+ position: relative;
38
+ `;
26
39
  const DragHandle = (props) => {
27
40
  const { id, isDndActive, isDragging, disabled = false, innerRef, useSortableHelpers, ariaLabelledby } = props;
28
41
  const getOwnerProps = usePropsStore((store) => store.get);
29
42
  const getOwnerPropsArguments = React2.useCallback(() => props, [props]);
30
- return /* @__PURE__ */ createElement(
31
- StyledGripperButtonOrOverlay,
43
+ const stopPropagation = React2.useCallback((event) => {
44
+ event.stopPropagation();
45
+ }, []);
46
+ return /* @__PURE__ */ jsx(
47
+ StyledGripperWrapper,
32
48
  {
33
- ...!disabled && useSortableHelpers ? {
34
- ...useSortableHelpers.listeners,
35
- ...useSortableHelpers.attributes
36
- } : {},
37
- "aria-labelledby": ariaLabelledby,
38
- isActive: isDndActive,
39
- innerRef: mergeRefs(innerRef, useSortableHelpers?.setActivatorNodeRef),
40
- tabIndex: -1,
41
- "data-testid": DATA_TESTID.SHUTTLE_DRAG_HANDLE,
42
- id: `${id}-drag-handle`,
43
- key: `${id}-drag-handle`,
44
- disabled,
49
+ onClick: stopPropagation,
50
+ onMouseDown: stopPropagation,
45
51
  getOwnerProps,
46
- getOwnerPropsArguments
47
- },
48
- /* @__PURE__ */ jsx(GripperVertical, { size: "s", color: isDragging || disabled ? ["neutral", "500"] : ["brand-primary", "800"] })
52
+ getOwnerPropsArguments,
53
+ children: /* @__PURE__ */ createElement(
54
+ StyledGripperButtonOrOverlay,
55
+ {
56
+ ...!disabled && useSortableHelpers ? {
57
+ ...useSortableHelpers.listeners,
58
+ ...useSortableHelpers.attributes
59
+ } : {},
60
+ "aria-labelledby": ariaLabelledby,
61
+ isActive: isDndActive,
62
+ innerRef: mergeRefs(innerRef, useSortableHelpers?.setActivatorNodeRef),
63
+ tabIndex: -1,
64
+ "data-testid": DATA_TESTID.SHUTTLE_DRAG_HANDLE,
65
+ id: `${id}-drag-handle`,
66
+ key: `${id}-drag-handle`,
67
+ disabled,
68
+ getOwnerProps,
69
+ getOwnerPropsArguments
70
+ },
71
+ /* @__PURE__ */ jsx(GripperVertical, { color: isDragging || disabled ? ["neutral", "500"] : ["brand-primary", "800"] })
72
+ )
73
+ }
49
74
  );
50
75
  };
51
76
  export {
52
77
  DragHandle,
53
- StyledGripperButtonOrOverlay
78
+ StyledGripperButtonOrOverlay,
79
+ StyledGripperWrapper
54
80
  };
55
81
  //# sourceMappingURL=DndHandle.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/Dnd/DndHandle.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\nimport React from 'react';\nimport { GripperVertical } from '@elliemae/ds-icons';\nimport type { useSortable } from '@elliemae/ds-drag-and-drop';\nimport { styled, mergeRefs } from '@elliemae/ds-system';\nimport { DATA_TESTID, DSShuttleV2Name, DSShuttleV2Slots } from '../../constants/index.js';\nimport { usePropsStore } from '../../config/useStore/useStore.js';\n\nexport const StyledGripperButtonOrOverlay = styled('div', {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.DRAG_AND_DROP_HANDLE,\n})<{\n isActive: boolean;\n isDragOverlay?: boolean;\n disabled?: boolean;\n}>`\n cursor: ${({ isActive, isDragOverlay, disabled }) => {\n if (isActive || isDragOverlay) return 'grabbing';\n if (disabled) return 'not-allowed';\n return 'grab';\n }};\n outline: none;\n display: flex;\n align-items: center;\n touch-action: none;\n &:focus {\n outline: 1px solid brand-700;\n }\n`;\n\nexport const DragHandle: React.ComponentType<{\n id: string;\n innerRef: React.RefObject<HTMLDivElement> | React.RefCallback<HTMLDivElement>;\n useSortableHelpers: ReturnType<typeof useSortable>;\n isDndActive: boolean;\n isDragging: boolean;\n disabled?: boolean;\n ariaLabelledby?: string;\n}> = (props) => {\n const { id, isDndActive, isDragging, disabled = false, innerRef, useSortableHelpers, ariaLabelledby } = props;\n\n const getOwnerProps = usePropsStore((store) => store.get);\n const getOwnerPropsArguments = React.useCallback(() => props, [props]);\n\n return (\n <StyledGripperButtonOrOverlay\n {...(!disabled && useSortableHelpers\n ? {\n ...useSortableHelpers.listeners,\n ...useSortableHelpers.attributes,\n }\n : {})}\n aria-labelledby={ariaLabelledby}\n isActive={isDndActive}\n innerRef={mergeRefs(innerRef, useSortableHelpers?.setActivatorNodeRef)}\n tabIndex={-1}\n data-testid={DATA_TESTID.SHUTTLE_DRAG_HANDLE}\n id={`${id}-drag-handle`}\n key={`${id}-drag-handle`}\n disabled={disabled}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <GripperVertical size=\"s\" color={isDragging || disabled ? ['neutral', '500'] : ['brand-primary', '800']} />\n </StyledGripperButtonOrOverlay>\n );\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;AC+DjB;AAlBF;AA5CJ,OAAOA,YAAW;AAClB,SAAS,uBAAuB;AAEhC,SAAS,QAAQ,iBAAiB;AAClC,SAAS,aAAa,iBAAiB,wBAAwB;AAC/D,SAAS,qBAAqB;AAEvB,MAAM,+BAA+B,OAAO,OAAO;AAAA,EACxD,MAAM;AAAA,EACN,MAAM,iBAAiB;AACzB,CAAC;AAAA,YAKW,CAAC,EAAE,UAAU,eAAe,SAAS,MAAM;AACnD,MAAI,YAAY,cAAe,QAAO;AACtC,MAAI,SAAU,QAAO;AACrB,SAAO;AACT,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUI,MAAM,aAQR,CAAC,UAAU;AACd,QAAM,EAAE,IAAI,aAAa,YAAY,WAAW,OAAO,UAAU,oBAAoB,eAAe,IAAI;AAExG,QAAM,gBAAgB,cAAc,CAAC,UAAU,MAAM,GAAG;AACxD,QAAM,yBAAyBA,OAAM,YAAY,MAAM,OAAO,CAAC,KAAK,CAAC;AAErE,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAI,CAAC,YAAY,qBACd;AAAA,QACE,GAAG,mBAAmB;AAAA,QACtB,GAAG,mBAAmB;AAAA,MACxB,IACA,CAAC;AAAA,MACL,mBAAiB;AAAA,MACjB,UAAU;AAAA,MACV,UAAU,UAAU,UAAU,oBAAoB,mBAAmB;AAAA,MACrE,UAAU;AAAA,MACV,eAAa,YAAY;AAAA,MACzB,IAAI,GAAG,EAAE;AAAA,MACT,KAAK,GAAG,EAAE;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEA,oBAAC,mBAAgB,MAAK,KAAI,OAAO,cAAc,WAAW,CAAC,WAAW,KAAK,IAAI,CAAC,iBAAiB,KAAK,GAAG;AAAA,EAC3G;AAEJ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\nimport { GripperVertical } from '@elliemae/ds-icons';\nimport { mergeRefs, styled } from '@elliemae/ds-system';\nimport React from 'react';\nimport { usePropsStore } from '../../config/useStore/useStore.js';\nimport { DATA_TESTID, DSShuttleV2Name, DSShuttleV2Slots } from '../../constants/index.js';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types.js';\n\nexport const StyledGripperButtonOrOverlay = styled('div', {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.DRAG_AND_DROP_HANDLE,\n})<{\n isActive: boolean;\n isDragOverlay?: boolean;\n disabled?: boolean;\n}>`\n cursor: ${({ isActive, isDragOverlay, disabled }) => {\n if (isActive || isDragOverlay) return 'grabbing';\n if (disabled) return 'not-allowed';\n return 'grab';\n }};\n outline: none;\n display: flex;\n align-items: center;\n touch-action: none;\n display: flex;\n min-width: 24px;\n justify-content: center;\n &:focus {\n .em-ds-icon {\n outline: 2px solid brand-700;\n }\n }\n`;\n\nexport const StyledGripperWrapper = styled('div', {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.DRAG_AND_DROP_HANDLE_WRAPPER,\n})`\n display: flex;\n height: 100%;\n position: relative;\n`;\n\nexport const DragHandle: React.ComponentType<DSShuttleV2T.DragHandleArguments> = (props) => {\n const { id, isDndActive, isDragging, disabled = false, innerRef, useSortableHelpers, ariaLabelledby } = props;\n\n const getOwnerProps = usePropsStore((store) => store.get);\n const getOwnerPropsArguments = React.useCallback(() => props, [props]);\n\n // Interacting with the drag handle must not bubble up to the row's onClick (selectItem) /\n // onMouseDown handlers \u2014 grabbing the handle should not toggle item selection.\n const stopPropagation = React.useCallback((event: React.SyntheticEvent) => {\n event.stopPropagation();\n }, []);\n\n return (\n <StyledGripperWrapper\n onClick={stopPropagation}\n onMouseDown={stopPropagation}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledGripperButtonOrOverlay\n {...(!disabled && useSortableHelpers\n ? {\n ...useSortableHelpers.listeners,\n ...useSortableHelpers.attributes,\n }\n : {})}\n aria-labelledby={ariaLabelledby}\n isActive={isDndActive}\n innerRef={mergeRefs(innerRef, useSortableHelpers?.setActivatorNodeRef)}\n tabIndex={-1}\n data-testid={DATA_TESTID.SHUTTLE_DRAG_HANDLE}\n id={`${id}-drag-handle`}\n key={`${id}-drag-handle`}\n disabled={disabled}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <GripperVertical color={isDragging || disabled ? ['neutral', '500'] : ['brand-primary', '800']} />\n </StyledGripperButtonOrOverlay>\n </StyledGripperWrapper>\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACiFf;AAlBF;AA9DN,SAAS,uBAAuB;AAChC,SAAS,WAAW,cAAc;AAClC,OAAOA,YAAW;AAClB,SAAS,qBAAqB;AAC9B,SAAS,aAAa,iBAAiB,wBAAwB;AAGxD,MAAM,+BAA+B,OAAO,OAAO;AAAA,EACxD,MAAM;AAAA,EACN,MAAM,iBAAiB;AACzB,CAAC;AAAA,YAKW,CAAC,EAAE,UAAU,eAAe,SAAS,MAAM;AACnD,MAAI,YAAY,cAAe,QAAO;AACtC,MAAI,SAAU,QAAO;AACrB,SAAO;AACT,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeI,MAAM,uBAAuB,OAAO,OAAO;AAAA,EAChD,MAAM;AAAA,EACN,MAAM,iBAAiB;AACzB,CAAC;AAAA;AAAA;AAAA;AAAA;AAMM,MAAM,aAAoE,CAAC,UAAU;AAC1F,QAAM,EAAE,IAAI,aAAa,YAAY,WAAW,OAAO,UAAU,oBAAoB,eAAe,IAAI;AAExG,QAAM,gBAAgB,cAAc,CAAC,UAAU,MAAM,GAAG;AACxD,QAAM,yBAAyBA,OAAM,YAAY,MAAM,OAAO,CAAC,KAAK,CAAC;AAIrE,QAAM,kBAAkBA,OAAM,YAAY,CAAC,UAAgC;AACzE,UAAM,gBAAgB;AAAA,EACxB,GAAG,CAAC,CAAC;AAEL,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAS;AAAA,MACT,aAAa;AAAA,MACb;AAAA,MACA;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACE,GAAI,CAAC,YAAY,qBACd;AAAA,YACE,GAAG,mBAAmB;AAAA,YACtB,GAAG,mBAAmB;AAAA,UACxB,IACA,CAAC;AAAA,UACL,mBAAiB;AAAA,UACjB,UAAU;AAAA,UACV,UAAU,UAAU,UAAU,oBAAoB,mBAAmB;AAAA,UACrE,UAAU;AAAA,UACV,eAAa,YAAY;AAAA,UACzB,IAAI,GAAG,EAAE;AAAA,UACT,KAAK,GAAG,EAAE;AAAA,UACV;AAAA,UACA;AAAA,UACA;AAAA;AAAA,QAEA,oBAAC,mBAAgB,OAAO,cAAc,WAAW,CAAC,WAAW,KAAK,IAAI,CAAC,iBAAiB,KAAK,GAAG;AAAA,MAClG;AAAA;AAAA,EACF;AAEJ;",
6
6
  "names": ["React"]
7
7
  }
@@ -11,7 +11,7 @@ const DragOverlay = ({ id, isDragging, isDndActive }) => /* @__PURE__ */ jsx(
11
11
  tabIndex: -1,
12
12
  "data-testid": DATA_TESTID.SHUTTLE_DRAG_HANDLE,
13
13
  id: `${id}-drag-overlay`,
14
- children: /* @__PURE__ */ jsx(GripperVertical, { size: "s", color: isDragging ? ["neutral", "500"] : ["brand-primary", "800"] })
14
+ children: /* @__PURE__ */ jsx(GripperVertical, { color: isDragging ? ["neutral", "500"] : ["brand-primary", "800"] })
15
15
  },
16
16
  `${id}-drag-overlay`
17
17
  );
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/Dnd/DragOverlay.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { GripperVertical } from '@elliemae/ds-icons';\nimport { DATA_TESTID } from '../../constants/index.js';\nimport { StyledGripperButtonOrOverlay } from './DndHandle.js';\n\nexport const DragOverlay: React.ComponentType<{\n id: string;\n isDndActive: boolean;\n isDragging: boolean;\n}> = ({ id, isDragging, isDndActive }) => (\n <StyledGripperButtonOrOverlay\n isDragOverlay\n isActive={isDndActive}\n tabIndex={-1}\n data-testid={DATA_TESTID.SHUTTLE_DRAG_HANDLE}\n id={`${id}-drag-overlay`}\n key={`${id}-drag-overlay`}\n >\n <GripperVertical size=\"s\" color={isDragging ? ['neutral', '500'] : ['brand-primary', '800']} />\n </StyledGripperButtonOrOverlay>\n);\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACkBnB;AAjBJ,SAAS,uBAAuB;AAChC,SAAS,mBAAmB;AAC5B,SAAS,oCAAoC;AAEtC,MAAM,cAIR,CAAC,EAAE,IAAI,YAAY,YAAY,MAClC;AAAA,EAAC;AAAA;AAAA,IACC,eAAa;AAAA,IACb,UAAU;AAAA,IACV,UAAU;AAAA,IACV,eAAa,YAAY;AAAA,IACzB,IAAI,GAAG,EAAE;AAAA,IAGT,8BAAC,mBAAgB,MAAK,KAAI,OAAO,aAAa,CAAC,WAAW,KAAK,IAAI,CAAC,iBAAiB,KAAK,GAAG;AAAA;AAAA,EAFxF,GAAG,EAAE;AAGZ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { GripperVertical } from '@elliemae/ds-icons';\nimport { DATA_TESTID } from '../../constants/index.js';\nimport { StyledGripperButtonOrOverlay } from './DndHandle.js';\n\nexport const DragOverlay: React.ComponentType<{\n id: string;\n isDndActive: boolean;\n isDragging: boolean;\n}> = ({ id, isDragging, isDndActive }) => (\n <StyledGripperButtonOrOverlay\n isDragOverlay\n isActive={isDndActive}\n tabIndex={-1}\n data-testid={DATA_TESTID.SHUTTLE_DRAG_HANDLE}\n id={`${id}-drag-overlay`}\n key={`${id}-drag-overlay`}\n >\n <GripperVertical color={isDragging ? ['neutral', '500'] : ['brand-primary', '800']} />\n </StyledGripperButtonOrOverlay>\n);\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACkBnB;AAjBJ,SAAS,uBAAuB;AAChC,SAAS,mBAAmB;AAC5B,SAAS,oCAAoC;AAEtC,MAAM,cAIR,CAAC,EAAE,IAAI,YAAY,YAAY,MAClC;AAAA,EAAC;AAAA;AAAA,IACC,eAAa;AAAA,IACb,UAAU;AAAA,IACV,UAAU;AAAA,IACV,eAAa,YAAY;AAAA,IACzB,IAAI,GAAG,EAAE;AAAA,IAGT,8BAAC,mBAAgB,OAAO,aAAa,CAAC,WAAW,KAAK,IAAI,CAAC,iBAAiB,KAAK,GAAG;AAAA;AAAA,EAF/E,GAAG,EAAE;AAGZ;",
6
6
  "names": []
7
7
  }
@@ -6,14 +6,11 @@ import { DndContext, DragOverlay, SortableContext, useTreeDndkitConfig } from "@
6
6
  import { createPortal } from "react-dom";
7
7
  import { useInternalStore, usePropsStore } from "../../config/useStore/index.js";
8
8
  import { ItemOverlay } from "../Item/ItemOverlay.js";
9
- const withConditionalDnDRowContext = (Component) => (props) => {
9
+ const DnDRowContext = ({ Component, ...props }) => {
10
10
  const { isDestinationPanel } = props;
11
11
  const itemList = usePropsStore(
12
12
  (state) => isDestinationPanel ? state.destinationConfiguredData : state.sourceConfiguredData
13
13
  );
14
- const withDragNDrop = usePropsStore(
15
- (state) => isDestinationPanel ? !state.removeDragAndDropFromDestination : state.addDragAndDropFromSource
16
- );
17
14
  const theme = useContext(ThemeContext);
18
15
  const setDndDraggingItemMeta = useInternalStore((state) => state.setDndDraggingItemMeta);
19
16
  const dndDraggingItemMeta = useInternalStore((state) => state.dndDraggingItemMeta);
@@ -37,7 +34,6 @@ const withConditionalDnDRowContext = (Component) => (props) => {
37
34
  );
38
35
  const treeConfig = React2.useMemo(() => {
39
36
  const configuredItemList = itemList.map((item, i) => ({
40
- // dnd
41
37
  uid: item.hydratedId,
42
38
  depth: 0,
43
39
  parentId: null,
@@ -78,15 +74,21 @@ const withConditionalDnDRowContext = (Component) => (props) => {
78
74
  setLastActiveId,
79
75
  setOverId
80
76
  ]);
81
- if (withDragNDrop)
82
- return /* @__PURE__ */ jsx(DndContext, { ...dndContextProps, children: /* @__PURE__ */ jsxs(SortableContext, { ...containerSortableContextProps, children: [
83
- /* @__PURE__ */ jsx(Component, { ...props }),
84
- createPortal(
85
- /* @__PURE__ */ jsx(DragOverlay, { style: { width: "auto" }, zIndex: theme.zIndex.tooltip, children: dndDraggingItemMeta ? /* @__PURE__ */ jsx(ItemOverlay, { ...dndDraggingItemMeta }) : null }),
86
- document.body
87
- )
88
- ] }) });
89
- return /* @__PURE__ */ jsx(Component, { ...props });
77
+ return /* @__PURE__ */ jsx(DndContext, { ...dndContextProps, children: /* @__PURE__ */ jsxs(SortableContext, { ...containerSortableContextProps, children: [
78
+ /* @__PURE__ */ jsx(Component, { ...props }),
79
+ createPortal(
80
+ /* @__PURE__ */ jsx(DragOverlay, { style: { width: "auto" }, zIndex: theme.zIndex.tooltip, children: dndDraggingItemMeta ? /* @__PURE__ */ jsx(ItemOverlay, { ...dndDraggingItemMeta }) : null }),
81
+ document.body
82
+ )
83
+ ] }) });
84
+ };
85
+ const withConditionalDnDRowContext = (Component) => (props) => {
86
+ const { isDestinationPanel } = props;
87
+ const withDragNDrop = usePropsStore(
88
+ (state) => isDestinationPanel ? !state.removeDragAndDropFromDestination : state.addDragAndDropFromSource
89
+ );
90
+ if (!withDragNDrop) return /* @__PURE__ */ jsx(Component, { ...props });
91
+ return /* @__PURE__ */ jsx(DnDRowContext, { Component, ...props });
90
92
  };
91
93
  export {
92
94
  withConditionalDnDRowContext
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/HoC/withConditionalDnDRowContext.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\n/* eslint-disable max-statements */\n/* eslint-disable max-params */\n/* eslint-disable react/function-component-definition */\nimport React, { useCallback, useContext, useEffect } from 'react';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { ThemeContext } from '@xstyled/styled-components';\nimport type { DnDKitTree } from '@elliemae/ds-drag-and-drop';\nimport { DndContext, DragOverlay, SortableContext, useTreeDndkitConfig } from '@elliemae/ds-drag-and-drop';\nimport { createPortal } from 'react-dom';\nimport { useInternalStore, usePropsStore } from '../../config/useStore/index.js';\nimport type { DSShuttleV2T } from '../../react-desc-prop-types.js';\nimport { ItemOverlay } from '../Item/ItemOverlay.js';\n\n// create a type omittting height from PanelMetaInfo\ntype HoCConfig = DSShuttleV2T.PanelMetaInfo;\ntype InternalHoCStates = {\n activeId?: DSShuttleV2T.HydratedId;\n overId?: DSShuttleV2T.HydratedId;\n isDropValid?: boolean;\n};\ntype ResultComponentProps = DSShuttleV2T.PanelMetaInfo & InternalHoCStates;\n\n// only wraps in \"DnDContext\" and \"DnDTreeContext\" if any Drag and Drop functionality is requested\nexport const withConditionalDnDRowContext: TypescriptHelpersT.ReactFunctionalHOCWithDifferentInterface<\n HoCConfig,\n ResultComponentProps\n> = (Component) => (props) => {\n const { isDestinationPanel } = props;\n const itemList = usePropsStore((state) =>\n isDestinationPanel ? state.destinationConfiguredData : state.sourceConfiguredData,\n );\n\n const withDragNDrop = usePropsStore((state) =>\n isDestinationPanel ? !state.removeDragAndDropFromDestination : state.addDragAndDropFromSource,\n );\n const theme = useContext(ThemeContext);\n\n const setDndDraggingItemMeta = useInternalStore((state) => state.setDndDraggingItemMeta);\n const dndDraggingItemMeta = useInternalStore((state) => state.dndDraggingItemMeta);\n const setOverId = useInternalStore((state) => state.setOverId);\n const setIsDropValid = useInternalStore((state) => state.setIsDropValid);\n const setDndDraggingItem = useInternalStore((state) => state.setDndDraggingItem);\n const setLastActiveId = useInternalStore((state) => state.setLastActiveId);\n const setDropIndicatorPosition = useInternalStore((state) => state.setDropIndicatorPosition);\n\n const onItemsReorder = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationReorder : state.onSourceReorder,\n );\n\n const onReorder: DnDKitTree.OnReorder<DSShuttleV2T.ConfiguredDatum> = useCallback(\n (dndActive, targetIndex, metadata) => {\n // eslint-disable-next-line no-unused-vars\n const { considerExpanding, over: dndOver, ...dndData } = metadata;\n const over = dndOver.original.original;\n const active = dndActive.original.original;\n const cleanedMetaData = { ...dndData, over, active, targetIndex };\n onItemsReorder(active, cleanedMetaData);\n },\n [onItemsReorder],\n );\n\n const treeConfig = React.useMemo(() => {\n const configuredItemList = itemList.map((item, i) => ({\n // dnd\n uid: item.hydratedId,\n depth: 0,\n parentId: null,\n realIndex: i,\n childrenCount: 0,\n original: item,\n subitems: [],\n index: i,\n }));\n return {\n flattenedItems: configuredItemList,\n isHorizontalDnD: false,\n isExpandable: false,\n onReorder,\n maxDragAndDropLevel: 0,\n getIsDropValid: () => true,\n };\n }, [itemList, onReorder]);\n\n const { dndContextProps, sortableContextProps, activeItem, active, over, dropIndicatorPosition, isDropValid } =\n useTreeDndkitConfig(treeConfig);\n\n const containerSortableContextProps = sortableContextProps.root;\n\n useEffect(() => {\n setLastActiveId(active?.id?.toString() ?? '');\n setOverId(over?.id?.toString() ?? '');\n setIsDropValid(isDropValid);\n setDndDraggingItem(activeItem?.original ?? null);\n setDropIndicatorPosition(dropIndicatorPosition);\n if (!active) setDndDraggingItemMeta(null);\n }, [\n active,\n activeItem,\n dropIndicatorPosition,\n isDropValid,\n over,\n setDndDraggingItem,\n setDndDraggingItemMeta,\n setDropIndicatorPosition,\n setIsDropValid,\n setLastActiveId,\n setOverId,\n ]);\n\n if (withDragNDrop)\n return (\n <DndContext {...dndContextProps}>\n <SortableContext {...containerSortableContextProps}>\n <Component {...props} />\n {createPortal(\n <DragOverlay style={{ width: 'auto' }} zIndex={theme.zIndex.tooltip}>\n {dndDraggingItemMeta ? <ItemOverlay {...dndDraggingItemMeta} /> : null}\n </DragOverlay>,\n document.body,\n )}\n </SortableContext>\n </DndContext>\n );\n return <Component {...props} />;\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACiHf,SACE,KADF;AA7GR,OAAOA,UAAS,aAAa,YAA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SAAO,oBAAC,aAAW,GAAG,OAAO;AAC/B;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\n/* eslint-disable max-statements */\n/* eslint-disable max-params */\n/* eslint-disable react/function-component-definition */\nimport React, { useCallback, useContext, useEffect } from 'react';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { ThemeContext } from '@xstyled/styled-components';\nimport type { DnDKitTree } from '@elliemae/ds-drag-and-drop';\nimport { DndContext, DragOverlay, SortableContext, useTreeDndkitConfig } from '@elliemae/ds-drag-and-drop';\nimport { createPortal } from 'react-dom';\nimport { useInternalStore, usePropsStore } from '../../config/useStore/index.js';\nimport type { DSShuttleV2T } from '../../react-desc-prop-types.js';\nimport { ItemOverlay } from '../Item/ItemOverlay.js';\n\ntype HoCConfig = DSShuttleV2T.PanelMetaInfo;\ntype InternalHoCStates = {\n activeId?: DSShuttleV2T.HydratedId;\n overId?: DSShuttleV2T.HydratedId;\n isDropValid?: boolean;\n};\ntype ResultComponentProps = DSShuttleV2T.PanelMetaInfo & InternalHoCStates;\n\ntype DnDRowContextProps = DSShuttleV2T.PanelMetaInfo & {\n Component: React.ComponentType<ResultComponentProps>;\n};\n\n// Only mounts when DnD is enabled \u2014 all DnD machinery is paid here and nowhere else\nconst DnDRowContext = ({ Component, ...props }: DnDRowContextProps) => {\n const { isDestinationPanel } = props;\n const itemList = usePropsStore((state) =>\n isDestinationPanel ? state.destinationConfiguredData : state.sourceConfiguredData,\n );\n\n const theme = useContext(ThemeContext);\n\n const setDndDraggingItemMeta = useInternalStore((state) => state.setDndDraggingItemMeta);\n const dndDraggingItemMeta = useInternalStore((state) => state.dndDraggingItemMeta);\n const setOverId = useInternalStore((state) => state.setOverId);\n const setIsDropValid = useInternalStore((state) => state.setIsDropValid);\n const setDndDraggingItem = useInternalStore((state) => state.setDndDraggingItem);\n const setLastActiveId = useInternalStore((state) => state.setLastActiveId);\n const setDropIndicatorPosition = useInternalStore((state) => state.setDropIndicatorPosition);\n\n const onItemsReorder = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationReorder : state.onSourceReorder,\n );\n\n const onReorder: DnDKitTree.OnReorder<DSShuttleV2T.ConfiguredDatum> = useCallback(\n (dndActive, targetIndex, metadata) => {\n // eslint-disable-next-line no-unused-vars\n const { considerExpanding, over: dndOver, ...dndData } = metadata;\n const over = dndOver.original.original;\n const active = dndActive.original.original;\n const cleanedMetaData = { ...dndData, over, active, targetIndex };\n onItemsReorder(active, cleanedMetaData);\n },\n [onItemsReorder],\n );\n\n const treeConfig = React.useMemo(() => {\n const configuredItemList = itemList.map((item, i) => ({\n uid: item.hydratedId,\n depth: 0,\n parentId: null,\n realIndex: i,\n childrenCount: 0,\n original: item,\n subitems: [],\n index: i,\n }));\n return {\n flattenedItems: configuredItemList,\n isHorizontalDnD: false,\n isExpandable: false,\n onReorder,\n maxDragAndDropLevel: 0,\n getIsDropValid: () => true,\n };\n }, [itemList, onReorder]);\n\n const { dndContextProps, sortableContextProps, activeItem, active, over, dropIndicatorPosition, isDropValid } =\n useTreeDndkitConfig(treeConfig);\n\n const containerSortableContextProps = sortableContextProps.root;\n\n useEffect(() => {\n setLastActiveId(active?.id?.toString() ?? '');\n setOverId(over?.id?.toString() ?? '');\n setIsDropValid(isDropValid);\n setDndDraggingItem(activeItem?.original ?? null);\n setDropIndicatorPosition(dropIndicatorPosition);\n if (!active) setDndDraggingItemMeta(null);\n }, [\n active,\n activeItem,\n dropIndicatorPosition,\n isDropValid,\n over,\n setDndDraggingItem,\n setDndDraggingItemMeta,\n setDropIndicatorPosition,\n setIsDropValid,\n setLastActiveId,\n setOverId,\n ]);\n\n return (\n <DndContext {...dndContextProps}>\n <SortableContext {...containerSortableContextProps}>\n <Component {...props} />\n {createPortal(\n <DragOverlay style={{ width: 'auto' }} zIndex={theme.zIndex.tooltip}>\n {dndDraggingItemMeta ? <ItemOverlay {...dndDraggingItemMeta} /> : null}\n </DragOverlay>,\n document.body,\n )}\n </SortableContext>\n </DndContext>\n );\n};\n\n// only wraps in \"DnDContext\" and \"DnDTreeContext\" if any Drag and Drop functionality is requested\nexport const withConditionalDnDRowContext: TypescriptHelpersT.ReactFunctionalHOCWithDifferentInterface<\n HoCConfig,\n ResultComponentProps\n> = (Component) => (props) => {\n const { isDestinationPanel } = props;\n const withDragNDrop = usePropsStore((state) =>\n isDestinationPanel ? !state.removeDragAndDropFromDestination : state.addDragAndDropFromSource,\n );\n\n if (!withDragNDrop) return <Component {...props} />;\n return <DnDRowContext Component={Component} {...props} />;\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC4GjB,SACE,KADF;AAxGN,OAAOA,UAAS,aAAa,YAAY,iBAAiB;AAE1D,SAAS,oBAAoB;AAE7B,SAAS,YAAY,aAAa,iBAAiB,2BAA2B;AAC9E,SAAS,oBAAoB;AAC7B,SAAS,kBAAkB,qBAAqB;AAEhD,SAAS,mBAAmB;AAe5B,MAAM,gBAAgB,CAAC,EAAE,WAAW,GAAG,MAAM,MAA0B;AACrE,QAAM,EAAE,mBAAmB,IAAI;AAC/B,QAAM,WAAW;AAAA,IAAc,CAAC,UAC9B,qBAAqB,MAAM,4BAA4B,MAAM;AAAA,EAC/D;AAEA,QAAM,QAAQ,WAAW,YAAY;AAErC,QAAM,yBAAyB,iBAAiB,CAAC,UAAU,MAAM,sBAAsB;AACvF,QAAM,sBAAsB,iBAAiB,CAAC,UAAU,MAAM,mBAAmB;AACjF,QAAM,YAAY,iBAAiB,CAAC,UAAU,MAAM,SAAS;AAC7D,QAAM,iBAAiB,iBAAiB,CAAC,UAAU,MAAM,cAAc;AACvE,QAAM,qBAAqB,iBAAiB,CAAC,UAAU,MAAM,kBAAkB;AAC/E,QAAM,kBAAkB,iBAAiB,CAAC,UAAU,MAAM,eAAe;AACzE,QAAM,2BAA2B,iBAAiB,CAAC,UAAU,MAAM,wBAAwB;AAE3F,QAAM,iBAAiB;AAAA,IAAc,CAAC,UACpC,qBAAqB,MAAM,uBAAuB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AA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,SACE,oBAAC,cAAY,GAAG,iBACd,+BAAC,mBAAiB,GAAG,+BACnB;AAAA,wBAAC,aAAW,GAAG,OAAO;AAAA,IACrB;AAAA,MACC,oBAAC,eAAY,OAAO,EAAE,OAAO,OAAO,GAAG,QAAQ,MAAM,OAAO,SACzD,gCAAsB,oBAAC,eAAa,GAAG,qBAAqB,IAAK,MACpE;AAAA,MACA,SAAS;AAAA,IACX;AAAA,KACF,GACF;AAEJ;AAGO,MAAM,+BAGT,CAAC,cAAc,CAAC,UAAU;AAC5B,QAAM,EAAE,mBAAmB,IAAI;AAC/B,QAAM,gBAAgB;AAAA,IAAc,CAAC,UACnC,qBAAqB,CAAC,MAAM,mCAAmC,MAAM;AAAA,EACvE;AAEA,MAAI,CAAC,cAAe,QAAO,oBAAC,aAAW,GAAG,OAAO;AACjD,SAAO,oBAAC,iBAAc,WAAuB,GAAG,OAAO;AACzD;",
6
6
  "names": ["React", "over", "active"]
7
7
  }
@@ -1,22 +1,22 @@
1
1
  import * as React from "react";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useSortable } from "@elliemae/ds-drag-and-drop";
3
4
  import { Grid } from "@elliemae/ds-grid";
4
5
  import { useHeadlessTooltip } from "@elliemae/ds-hooks-headless-tooltip";
5
6
  import { css, styled } from "@elliemae/ds-system";
6
- import React2, { useEffect, useMemo } from "react";
7
+ import React2, { useMemo } from "react";
7
8
  import { useInternalStore, usePropsStore } from "../../config/useStore/index.js";
8
- import { REGIONS_FOCUSES, DSShuttleV2Name, DSShuttleV2Slots } from "../../constants/index.js";
9
+ import { DSShuttleV2Name, DSShuttleV2Slots } from "../../constants/index.js";
9
10
  import { DragHandle } from "../Dnd/DndHandle.js";
10
11
  import { DropIndicator } from "../Dnd/DropIndicator.js";
11
- import { withConditionalUseSortable } from "../HoC/withConditionalUseSortable.js";
12
12
  import { ItemActions } from "./ItemActions/index.js";
13
- import { useInnerRefHandlers as useInnerRefActionHandlers } from "./ItemActions/useInnerRefHandlers.js";
13
+ import { useInnerRefActionHandlers } from "./ItemActions/useInnerRefActionHandlers.js";
14
14
  import { ItemMiddleSection } from "./ItemMiddleSection.js";
15
- import { ItemSelection } from "./ItemSelection.js";
15
+ import { ItemSelectionUI } from "./ItemSelectionUi/ItemSelectionUI.js";
16
16
  import { useItemArrowNavigation } from "./useItemArrowNavigation.js";
17
+ import { useItemInnerRefHandlers } from "./useItemInnerRefHandlers.js";
17
18
  import { useItemKeyboardSelection } from "./useItemKeyboardSelection.js";
18
19
  import { useSelectionLogic } from "./useSelectionLogic.js";
19
- import { useThisItemIsFocused } from "./useThisItemIsFocused.js";
20
20
  const cssDisabled = css`
21
21
  background-color: ${({ theme }) => theme.colors.neutral["100"]};
22
22
  color: ${({ theme }) => theme.colors.neutral["300"]};
@@ -50,53 +50,17 @@ const ItemWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots
50
50
 
51
51
  ${({ isDragging }) => isDragging && cssDisabled}
52
52
  `;
53
- const ItemSelectionWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_CHECKBOX })`
54
- height: 100%;
55
- &:focus {
56
- outline: none;
57
- }
58
- `;
59
- const useInnerRefHandlers = (itemMeta) => {
60
- const { datumInternalMeta, isDestinationPanel } = itemMeta;
61
- const { hydratedId } = datumInternalMeta;
62
- const setZustandRef = useInternalStore((state) => state.setZustandRef);
63
- const setDeferFocusUntilFirstRender = useInternalStore((state) => state.setDeferFocusUntilFirstRender);
64
- const deferedAfterFirstRender = useInternalStore((state) => state.getDeferFocusUntilFirstRender());
65
- const isLoadingMore = usePropsStore(
66
- (state) => isDestinationPanel ? state.destinationIsLoadingMore : state.sourceIsLoadingMore
67
- );
68
- const thisItemIsFocused = useThisItemIsFocused(itemMeta);
69
- const currRegion = isDestinationPanel ? REGIONS_FOCUSES.DESTINATION_PANEL_ITEM : REGIONS_FOCUSES.SOURCE_PANEL_ITEM;
70
- const currItemId = hydratedId;
71
- const innerRefHandlerParentItem = React2.useCallback(
72
- (node) => {
73
- setZustandRef([currRegion, currItemId, "parent"], node);
74
- if (deferedAfterFirstRender && thisItemIsFocused && node) {
75
- setDeferFocusUntilFirstRender(false);
76
- if (node.tabIndex === -1) node.tabIndex = 0;
77
- node.focus();
78
- }
79
- },
80
- [setZustandRef, currRegion, currItemId, thisItemIsFocused, deferedAfterFirstRender, setDeferFocusUntilFirstRender]
81
- );
82
- useEffect(
83
- () => () => {
84
- if (isLoadingMore) setDeferFocusUntilFirstRender(true);
85
- },
86
- [isLoadingMore, setDeferFocusUntilFirstRender]
87
- );
88
- return React2.useMemo(
89
- () => ({ innerRefHandlerParentItem, thisItemIsFocused }),
90
- [innerRefHandlerParentItem, thisItemIsFocused]
91
- );
92
- };
93
53
  const Item = React2.memo((itemMeta) => {
94
54
  const { datumInternalMeta, withDragNDrop, useSortableHelpers, hasMultipleSelection } = itemMeta;
95
- const { isSelected, hydratedId, softDeleted } = datumInternalMeta;
55
+ const { hydratedId, softDeleted } = datumInternalMeta;
56
+ const explicitSelectionUI = usePropsStore((store) => store.explicitSelectionUI);
96
57
  const cols = useMemo(() => {
97
- if (withDragNDrop) return ["5px", "auto", "1fr", "auto"];
98
- return ["5px", "1fr", "auto"];
99
- }, [withDragNDrop]);
58
+ const selectionUIWidth = explicitSelectionUI ? "auto" : "5px";
59
+ const finalCols = [selectionUIWidth];
60
+ if (withDragNDrop) finalCols.push("auto");
61
+ finalCols.push("1fr", "auto");
62
+ return finalCols;
63
+ }, [withDragNDrop, explicitSelectionUI]);
100
64
  const setDndDraggingItemMeta = useInternalStore((state) => state.setDndDraggingItemMeta);
101
65
  const getIsDragAndDropHappening = useInternalStore((state) => state.getIsDragAndDropHappening);
102
66
  const isDraggingThisItem = useInternalStore((state) => state.dndDraggingItem?.hydratedId === hydratedId);
@@ -118,7 +82,8 @@ const Item = React2.memo((itemMeta) => {
118
82
  },
119
83
  [onItemKeyDownSelection, onItemContainerKeyDown]
120
84
  );
121
- const { innerRefHandlerParentItem, thisItemIsFocused } = useInnerRefHandlers(itemMeta);
85
+ const itemInnerRefHandlers = useItemInnerRefHandlers(itemMeta);
86
+ const { thisItemIsFocused } = itemInnerRefHandlers;
122
87
  const { innerRefHandlerDnd } = useInnerRefActionHandlers(itemMeta);
123
88
  const overId = useInternalStore((state) => state.overId);
124
89
  const isDropValid = useInternalStore((state) => state.isDropValid);
@@ -128,7 +93,6 @@ const Item = React2.memo((itemMeta) => {
128
93
  });
129
94
  const config = React2.useMemo(() => ({ hasFocus: thisItemIsFocused }), [thisItemIsFocused]);
130
95
  const tooltipHelpers = useHeadlessTooltip(config);
131
- const idItem = useMemo(() => `${hydratedId}-wrapper${softDeleted ? "-soft-deleted" : ""}`, [hydratedId, softDeleted]);
132
96
  const getOwnerProps = usePropsStore((store) => store.get);
133
97
  const getOwnerPropsArguments = React2.useCallback(() => itemMeta, [itemMeta]);
134
98
  return /* @__PURE__ */ jsxs(
@@ -152,19 +116,11 @@ const Item = React2.memo((itemMeta) => {
152
116
  getOwnerPropsArguments,
153
117
  children: [
154
118
  /* @__PURE__ */ jsx(
155
- ItemSelectionWrapper,
119
+ ItemSelectionUI,
156
120
  {
157
- role: "checkbox",
158
- "aria-checked": isSelected,
159
- onFocus: tooltipHelpers.onFocus,
160
- onBlur: tooltipHelpers.onBlur,
161
- "aria-labelledby": `${hydratedId}-text-section${softDeleted ? "-soft-deleted" : ""}`,
162
- id: idItem,
163
- innerRef: innerRefHandlerParentItem,
164
- "aria-disabled": softDeleted,
165
- getOwnerProps,
166
- getOwnerPropsArguments,
167
- children: /* @__PURE__ */ jsx(ItemSelection, { ...itemMeta })
121
+ tooltipHelpers,
122
+ itemInnerRefHandlers,
123
+ itemMeta
168
124
  }
169
125
  ),
170
126
  withDragNDrop && useSortableHelpers ? /* @__PURE__ */ jsx(
@@ -186,11 +142,16 @@ const Item = React2.memo((itemMeta) => {
186
142
  }
187
143
  );
188
144
  });
189
- const ItemSortable = withConditionalUseSortable(Item);
190
- var Item_default = ItemSortable;
145
+ const ItemWithSortable = (props) => {
146
+ const {
147
+ datumInternalMeta: { hydratedId }
148
+ } = props;
149
+ const useSortableConfig = useMemo(() => ({ id: hydratedId }), [hydratedId]);
150
+ const useSortableHelpers = useSortable(useSortableConfig);
151
+ return /* @__PURE__ */ jsx(Item, { ...props, useSortableHelpers });
152
+ };
153
+ const ItemSortable = (props) => props.withDragNDrop ? /* @__PURE__ */ jsx(ItemWithSortable, { ...props }) : /* @__PURE__ */ jsx(Item, { ...props });
191
154
  export {
192
- Item,
193
- ItemSortable,
194
- Item_default as default
155
+ ItemSortable
195
156
  };
196
157
  //# sourceMappingURL=Item.js.map