@elliemae/ds-shuttle-v2 3.70.0-next.6 → 3.70.0-next.60

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 +28 -28
  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": ["../../src/DSShuttleV2.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADWC;AAXxB,8BAAyB;AACzB,gCAA4B;AAC5B,yBAA4B;AAC5B,sBAAuB;AACvB,mCAA2C;AAG3C,MAAM,6BAAyB,uCAAY,gCAAa,sBAAM;AAE9D,MAAM,cAAc,CAClB,UACsB,4CAAC,0BAAwB,GAAG,OAAO;AAE3D,YAAY,cAAc;AAC1B,MAAM,4BAAwB,kCAAS,WAAW;AAElD,sBAAsB,YAAY;",
4
+ "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADaC;AAbxB,8BAAyB;AACzB,gCAA4B;AAC5B,yBAA4B;AAC5B,sBAAuB;AACvB,mCAA2C;AAG3C,MAAM,6BAAyB,uCAAY,gCAAa,sBAAM;AAE9D,MAAM,cAAc,CAClB,UAGsB,4CAAC,0BAAwB,GAAI,OAA8B;AAEnF,YAAY,cAAc;AAC1B,MAAM,4BAAwB,kCAAS,WAAW;AAElD,sBAAsB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/config/useAutoCalculated/index.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAwB;AAExB,8BAAiC;AACjC,mCAAsC;AAE/B,MAAM,oBAAoB,CAC/B,sBACG;AACH,QAAM,qBAAiB,0CAAiB,iBAAiB;AACzD,QAAM,kBAAc,oDAAsB;AAE1C,aAAO,sBAAQ,OAAO,EAAE,GAAG,gBAAgB,GAAG,YAAY,IAAI,CAAC,gBAAgB,WAAW,CAAC;AAC7F;",
4
+ "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAwB;AAExB,8BAAiC;AACjC,mCAAsC;AAE/B,MAAM,oBAAoB,CAAC,sBAAkD;AAClF,QAAM,qBAAiB,0CAAiB,iBAAiB;AACzD,QAAM,kBAAc,oDAAsB;AAE1C,aAAO,sBAAQ,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": ["../../../../src/config/useAutoCalculated/useDataStructure.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["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", "import * as React from 'react';\nexport { React };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EACF;AACF;AAEO,MAAM,mBAAmB,CAC9B,kBACG;AACH,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AACJ,aAAO;AAAA,IACL,OAAO;AAAA,MACL,GAAG,gBAAgB,EAAE,YAAY,qBAAqB,wBAAwB,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 { 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 destinationSoftDeletedIt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;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,MAAM,mBAAmB,CAAC,kBAA8C;AAC7E,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AACJ,aAAO;AAAA,IACL,OAAO;AAAA,MACL,GAAG,gBAAgB,EAAE,YAAY,qBAAqB,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;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/config/useStore/useStore.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
4
+ "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,gCAA6D;AAC7D,iBAAoB;AACpB,mBAAsB;AACtB,mCAAgD;AAChD,uBAAgE;AAChE,+BAAkC;AAClC,qCAAwC;AAExC,MAAM,4BAAwD;AAAA,EAC5D,aAAa,iCAAgB;AAAA,EAC7B,WAAW,+BAAc;AAAA,EACzB,iBAAiB,iCAAgB;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,uBAAmB,gBAAI;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,aAAAA;AAAA,IACd;AAAA,EACF;AACF;AAEO,MAAM,EAAE,eAAe,eAAe,kBAAkB,iBAAiB,QAAI,yDAMlF;AAEK,MAAM,SAAS;AAAA,EACpB,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
6
6
  "names": ["deepequal"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/config/useValidateProps.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA+C;AAE/C,uBAAgC;AAGzB,MAAM,mBAAmB,CAC9B,OACA,cACS;AAET,8DAA+B,OAAO,WAAW,gCAAe;AAClE;",
4
+ "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA+C;AAE/C,uBAAgC;AAGzB,MAAM,mBAAmB,CAAC,OAA2B,cAAgD;AAE1G,8DAA+B,OAAO,WAAW,gCAAe;AAClE;",
6
6
  "names": []
7
7
  }
@@ -53,6 +53,7 @@ const DSShuttleV2Slots = {
53
53
  ITEM_LABEL_WRAPPER: "item-label-wrapper",
54
54
  ITEM_MIDSECTION_WRAPPER: "item-midsection-wrapper",
55
55
  ITEM_SELECTION: "item-selection",
56
+ ITEM_SELECTION_CHECKBOX_UI: "item-selection-checkbox-ui",
56
57
  ITEM_ACTIONS_WRAPPER: "item-actions-wrapper",
57
58
  ITEM_ACTION_WRAPPER: "item-action-wrapper",
58
59
  ITEM_ACTION_BTN: "item-action-btn",
@@ -67,13 +68,14 @@ const DSShuttleV2Slots = {
67
68
  LOADING_LIST_WRAPPER: "loading-list-wrapper",
68
69
  MOVE_MULTIPLE_WRAPPER: "move-multiple-wrapper",
69
70
  MOVE_MULTIPLE_BTN: "move-multiple-btn",
71
+ MOVE_MULTIPLE_LIVE_REGION: "move-multiple-live-region",
70
72
  LIST_WRAPPER_MID: "list-wrapper-mid",
71
- LIST_WRAPPER_MID_SCROLLER: "list-wrapper-mid-scroller",
72
73
  LIST_WRAPPER_TOP: "list-wrapper-top",
73
74
  AREA_SEARCH_WRAPPER: "area-search-wrapper",
74
75
  AREA_SEARCH_BAR: "area-search-bar",
75
76
  AREA_SELECTION_HEADER: "area-selection-header",
76
77
  AREA_SELECTION_HEADER_COUNT_LABEL: "area-selection-header-count-label",
78
+ DRAG_AND_DROP_HANDLE_WRAPPER: "drag-and-drop-handle-wrapper",
77
79
  DRAG_AND_DROP_HANDLE: "drag-and-drop-handle",
78
80
  ARIA_LIVE_PANEL_CENTER: "aria-live-panel-center"
79
81
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/constants/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSShuttleV2Name = 'DSShuttlev2';\n\nexport const DSShuttleV2Slots = {\n HEADER_SEARCH_ICON: 'header-search-icon',\n WRAPPER: 'wrapper',\n PANEL_WRAPPER: 'panel-wrapper',\n LIST_WRAPPER: 'list-wrapper',\n ITEM_WRAPPER: 'item-wrapper',\n ITEM_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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,kBAAkB;AAExB,MAAM,mBAAmB;AAAA,EAC9B,oBAAoB;AAAA,EACpB,SAAS;AAAA,EACT,eAAe;AAAA,EACf,cAAc;AAAA,EACd,cAAc;AAAA,EACd,eAAe;AAAA,EACf,mBAAmB;AAAA,EACnB,oBAAoB;AAAA,EACpB,yBAAyB;AAAA,EACzB,gBAAgB;AAAA,EAChB,sBAAsB;AAA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@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", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;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T;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
  }
@@ -29,17 +29,18 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
29
29
  var DndHandle_exports = {};
30
30
  __export(DndHandle_exports, {
31
31
  DragHandle: () => DragHandle,
32
- StyledGripperButtonOrOverlay: () => StyledGripperButtonOrOverlay
32
+ StyledGripperButtonOrOverlay: () => StyledGripperButtonOrOverlay,
33
+ StyledGripperWrapper: () => StyledGripperWrapper
33
34
  });
34
35
  module.exports = __toCommonJS(DndHandle_exports);
35
36
  var React = __toESM(require("react"));
36
37
  var import_jsx_runtime = require("react/jsx-runtime");
37
38
  var import_react = require("react");
38
- var import_react2 = __toESM(require("react"));
39
39
  var import_ds_icons = require("@elliemae/ds-icons");
40
40
  var import_ds_system = require("@elliemae/ds-system");
41
- var import_constants = require("../../constants/index.js");
41
+ var import_react2 = __toESM(require("react"));
42
42
  var import_useStore = require("../../config/useStore/useStore.js");
43
+ var import_constants = require("../../constants/index.js");
43
44
  const StyledGripperButtonOrOverlay = (0, import_ds_system.styled)("div", {
44
45
  name: import_constants.DSShuttleV2Name,
45
46
  slot: import_constants.DSShuttleV2Slots.DRAG_AND_DROP_HANDLE
@@ -53,33 +54,58 @@ const StyledGripperButtonOrOverlay = (0, import_ds_system.styled)("div", {
53
54
  display: flex;
54
55
  align-items: center;
55
56
  touch-action: none;
57
+ display: flex;
58
+ min-width: 24px;
59
+ justify-content: center;
56
60
  &:focus {
57
- outline: 1px solid brand-700;
61
+ .em-ds-icon {
62
+ outline: 2px solid brand-700;
63
+ }
58
64
  }
59
65
  `;
66
+ const StyledGripperWrapper = (0, import_ds_system.styled)("div", {
67
+ name: import_constants.DSShuttleV2Name,
68
+ slot: import_constants.DSShuttleV2Slots.DRAG_AND_DROP_HANDLE_WRAPPER
69
+ })`
70
+ display: flex;
71
+ height: 100%;
72
+ position: relative;
73
+ `;
60
74
  const DragHandle = (props) => {
61
75
  const { id, isDndActive, isDragging, disabled = false, innerRef, useSortableHelpers, ariaLabelledby } = props;
62
76
  const getOwnerProps = (0, import_useStore.usePropsStore)((store) => store.get);
63
77
  const getOwnerPropsArguments = import_react2.default.useCallback(() => props, [props]);
64
- return /* @__PURE__ */ (0, import_react.createElement)(
65
- StyledGripperButtonOrOverlay,
78
+ const stopPropagation = import_react2.default.useCallback((event) => {
79
+ event.stopPropagation();
80
+ }, []);
81
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
82
+ StyledGripperWrapper,
66
83
  {
67
- ...!disabled && useSortableHelpers ? {
68
- ...useSortableHelpers.listeners,
69
- ...useSortableHelpers.attributes
70
- } : {},
71
- "aria-labelledby": ariaLabelledby,
72
- isActive: isDndActive,
73
- innerRef: (0, import_ds_system.mergeRefs)(innerRef, useSortableHelpers?.setActivatorNodeRef),
74
- tabIndex: -1,
75
- "data-testid": import_constants.DATA_TESTID.SHUTTLE_DRAG_HANDLE,
76
- id: `${id}-drag-handle`,
77
- key: `${id}-drag-handle`,
78
- disabled,
84
+ onClick: stopPropagation,
85
+ onMouseDown: stopPropagation,
79
86
  getOwnerProps,
80
- getOwnerPropsArguments
81
- },
82
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.GripperVertical, { size: "s", color: isDragging || disabled ? ["neutral", "500"] : ["brand-primary", "800"] })
87
+ getOwnerPropsArguments,
88
+ children: /* @__PURE__ */ (0, import_react.createElement)(
89
+ StyledGripperButtonOrOverlay,
90
+ {
91
+ ...!disabled && useSortableHelpers ? {
92
+ ...useSortableHelpers.listeners,
93
+ ...useSortableHelpers.attributes
94
+ } : {},
95
+ "aria-labelledby": ariaLabelledby,
96
+ isActive: isDndActive,
97
+ innerRef: (0, import_ds_system.mergeRefs)(innerRef, useSortableHelpers?.setActivatorNodeRef),
98
+ tabIndex: -1,
99
+ "data-testid": import_constants.DATA_TESTID.SHUTTLE_DRAG_HANDLE,
100
+ id: `${id}-drag-handle`,
101
+ key: `${id}-drag-handle`,
102
+ disabled,
103
+ getOwnerProps,
104
+ getOwnerPropsArguments
105
+ },
106
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.GripperVertical, { color: isDragging || disabled ? ["neutral", "500"] : ["brand-primary", "800"] })
107
+ )
108
+ }
83
109
  );
84
110
  };
85
111
  //# sourceMappingURL=DndHandle.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/parts/Dnd/DndHandle.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* 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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+DjB;AAlBF;AA5CJ,IAAAA,gBAAkB;AAClB,sBAAgC;AAEhC,uBAAkC;AAClC,uBAA+D;AAC/D,sBAA8B;AAEvB,MAAM,mCAA+B,yBAAO,OAAO;AAAA,EACxD,MAAM;AAAA,EACN,MAAM,kCAAiB;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,oBAAgB,+BAAc,CAAC,UAAU,MAAM,GAAG;AACxD,QAAM,yBAAyB,cAAAC,QAAM,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,cAAU,4BAAU,UAAU,oBAAoB,mBAAmB;AAAA,MACrE,UAAU;AAAA,MACV,eAAa,6BAAY;AAAA,MACzB,IAAI,GAAG,EAAE;AAAA,MACT,KAAK,GAAG,EAAE;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEA,4CAAC,mCAAgB,MAAK,KAAI,OAAO,cAAc,WAAW,CAAC,WAAW,KAAK,IAAI,CAAC,iBAAiB,KAAK,GAAG;AAAA,EAC3G;AAEJ;",
4
+ "sourcesContent": ["/* 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 </StyledGripper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,UACL,mBAAiB;AAAA,UACjB,UAAU;AAAA,UACV,cAAU,4BAAU,UAAU,oBAAoB,mBAAmB;AAAA,UACrE,UAAU;AAAA,UACV,eAAa,6BAAY;AAAA,UACzB,IAAI,GAAG,EAAE;AAAA,UACT,KAAK,GAAG,EAAE;AAAA,UACV;AAAA,UACA;AAAA,UACA;AAAA;AAAA,QAEA,4CAAC,mCAAgB,OAAO,cAAc,WAAW,CAAC,WAAW,KAAK,IAAI,CAAC,iBAAiB,KAAK,GAAG;AAAA,MAClG;AAAA;AAAA,EACF;AAEJ;",
6
6
  "names": ["import_react", "React"]
7
7
  }
@@ -44,7 +44,7 @@ const DragOverlay = ({ id, isDragging, isDndActive }) => /* @__PURE__ */ (0, imp
44
44
  tabIndex: -1,
45
45
  "data-testid": import_constants.DATA_TESTID.SHUTTLE_DRAG_HANDLE,
46
46
  id: `${id}-drag-overlay`,
47
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.GripperVertical, { size: "s", color: isDragging ? ["neutral", "500"] : ["brand-primary", "800"] })
47
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.GripperVertical, { color: isDragging ? ["neutral", "500"] : ["brand-primary", "800"] })
48
48
  },
49
49
  `${id}-drag-overlay`
50
50
  );
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/parts/Dnd/DragOverlay.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkBnB;AAjBJ,sBAAgC;AAChC,uBAA4B;AAC5B,uBAA6C;AAEtC,MAAM,cAIR,CAAC,EAAE,IAAI,YAAY,YAAY,MAClC;AAAA,EAAC;AAAA;AAAA,IACC,eAAa;AAAA,IACb,UAAU;AAAA,IACV,UAAU;AAAA,IACV,eAAa,6BAAY;AAAA,IACzB,IAAI,GAAG,EAAE;AAAA,IAGT,sDAAC,mCAAgB,MAAK,KAAI,OAAO,aAAa,CAAC,WAAW,KAAK,IAAI,CAAC,iBAAiB,KAAK,GAAG;AAAA;AAAA,EAFxF,GAAG,EAAE;AAGZ;",
4
+ "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkBnB;AAjBJ,sBAAgC;AAChC,uBAA4B;AAC5B,uBAA6C;AAEtC,MAAM,cAIR,CAAC,EAAE,IAAI,YAAY,YAAY,MAClC;AAAA,EAAC;AAAA;AAAA,IACC,eAAa;AAAA,IACb,UAAU;AAAA,IACV,UAAU;AAAA,IACV,eAAa,6BAAY;AAAA,IACzB,IAAI,GAAG,EAAE;AAAA,IAGT,sDAAC,mCAAgB,OAAO,aAAa,CAAC,WAAW,KAAK,IAAI,CAAC,iBAAiB,KAAK,GAAG;AAAA;AAAA,EAF/E,GAAG,EAAE;AAGZ;",
6
6
  "names": []
7
7
  }
@@ -39,14 +39,11 @@ var import_ds_drag_and_drop = require("@elliemae/ds-drag-and-drop");
39
39
  var import_react_dom = require("react-dom");
40
40
  var import_useStore = require("../../config/useStore/index.js");
41
41
  var import_ItemOverlay = require("../Item/ItemOverlay.js");
42
- const withConditionalDnDRowContext = (Component) => (props) => {
42
+ const DnDRowContext = ({ Component, ...props }) => {
43
43
  const { isDestinationPanel } = props;
44
44
  const itemList = (0, import_useStore.usePropsStore)(
45
45
  (state) => isDestinationPanel ? state.destinationConfiguredData : state.sourceConfiguredData
46
46
  );
47
- const withDragNDrop = (0, import_useStore.usePropsStore)(
48
- (state) => isDestinationPanel ? !state.removeDragAndDropFromDestination : state.addDragAndDropFromSource
49
- );
50
47
  const theme = (0, import_react.useContext)(import_styled_components.ThemeContext);
51
48
  const setDndDraggingItemMeta = (0, import_useStore.useInternalStore)((state) => state.setDndDraggingItemMeta);
52
49
  const dndDraggingItemMeta = (0, import_useStore.useInternalStore)((state) => state.dndDraggingItemMeta);
@@ -70,7 +67,6 @@ const withConditionalDnDRowContext = (Component) => (props) => {
70
67
  );
71
68
  const treeConfig = import_react.default.useMemo(() => {
72
69
  const configuredItemList = itemList.map((item, i) => ({
73
- // dnd
74
70
  uid: item.hydratedId,
75
71
  depth: 0,
76
72
  parentId: null,
@@ -111,14 +107,20 @@ const withConditionalDnDRowContext = (Component) => (props) => {
111
107
  setLastActiveId,
112
108
  setOverId
113
109
  ]);
114
- if (withDragNDrop)
115
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_drag_and_drop.DndContext, { ...dndContextProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_drag_and_drop.SortableContext, { ...containerSortableContextProps, children: [
116
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { ...props }),
117
- (0, import_react_dom.createPortal)(
118
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_drag_and_drop.DragOverlay, { style: { width: "auto" }, zIndex: theme.zIndex.tooltip, children: dndDraggingItemMeta ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ItemOverlay.ItemOverlay, { ...dndDraggingItemMeta }) : null }),
119
- document.body
120
- )
121
- ] }) });
122
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { ...props });
110
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_drag_and_drop.DndContext, { ...dndContextProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_drag_and_drop.SortableContext, { ...containerSortableContextProps, children: [
111
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { ...props }),
112
+ (0, import_react_dom.createPortal)(
113
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_drag_and_drop.DragOverlay, { style: { width: "auto" }, zIndex: theme.zIndex.tooltip, children: dndDraggingItemMeta ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ItemOverlay.ItemOverlay, { ...dndDraggingItemMeta }) : null }),
114
+ document.body
115
+ )
116
+ ] }) });
117
+ };
118
+ const withConditionalDnDRowContext = (Component) => (props) => {
119
+ const { isDestinationPanel } = props;
120
+ const withDragNDrop = (0, import_useStore.usePropsStore)(
121
+ (state) => isDestinationPanel ? !state.removeDragAndDropFromDestination : state.addDragAndDropFromSource
122
+ );
123
+ if (!withDragNDrop) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { ...props });
124
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DnDRowContext, { Component, ...props });
123
125
  };
124
126
  //# sourceMappingURL=withConditionalDnDRowContext.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/parts/HoC/withConditionalDnDRowContext.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* 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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiHf;AA7GR,mBAA0D;AAE1D,+BAA6B;AAE7B,8BAA8E;AAC9E,uBAA6B;AAC7B,sBAAgD;AAEhD,yBAA4B;AAYrB,MAAM,+BAGT,CAAC,cAAc,CAAC,UAAU;AAC5B,QAAM,EAAE,mBAAmB,IAAI;AAC/B,QAAM,eAAW;AAAA,IAAc,CAAC,UAC9B,qBAAqB,MAAM,4BAA4B,MAAM;AAAA,EAC/D;AAEA,QAAM,oBAAgB;AAAA,IAAc,CAAC,UACnC,qBAAqB,CAAC,MAAM,mCAAmC,MAAM;AAAA,EACvE;AACA,QAAM,YAAQ,yBAAW,qCAAY;AAErC,QAAM,6BAAyB,kCAAiB,CAAC,UAAU,MAAM,sBAAsB;AACvF,QAAM,0BAAsB,kCAAiB,CAAC,UAAU,MAAM,mBAAmB;AACjF,QAAM,gBAAY,kCAAiB,CAAC,UAAU,MAAM,SAAS;AAC7D,QAAM,qBAAiB,kCAAiB,CAAC,UAAU,MAAM,cAAc;AACvE,QAAM,yBAAqB,kCAAiB,CAAC,UAAU,MAAM,kBAAkB;AAC/E,QAAM,sBAAkB,kCAAiB,CAAC,UAAU,MAAM,eAAe;AACzE,QAAM,+BAA2B,kCAAiB,CAAC,UAAU,MAAM,wBAAwB;AAE3F,QAAM,qBAAiB;AAAA,IAAc,CAAC,UACpC,q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;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,MAAI;AACF,WACE,4CAAC,sCAAY,GAAG,iBACd,uDAAC,2CAAiB,GAAG,+BACnB;AAAA,kDAAC,aAAW,GAAG,OAAO;AAAA,UACrB;AAAA,QACC,4CAAC,uCAAY,OAAO,EAAE,OAAO,OAAO,GAAG,QAAQ,MAAM,OAAO,SACzD,gCAAsB,4CAAC,kCAAa,GAAG,qBAAqB,IAAK,MACpE;AAAA,QACA,SAAS;AAAA,MACX;AAAA,OACF,GACF;AAEJ,SAAO,4CAAC,aAAW,GAAG,OAAO;AAC/B;",
4
+ "sourcesContent": ["/* 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", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD4GjB;AAxGN,mBAA0D;AAE1D,+BAA6B;AAE7B,8BAA8E;AAC9E,uBAA6B;AAC7B,sBAAgD;AAEhD,yBAA4B;AAe5B,MAAM,gBAAgB,CAAC,EAAE,WAAW,GAAG,MAAM,MAA0B;AACrE,QAAM,EAAE,mBAAmB,IAAI;AAC/B,QAAM,eAAW;AAAA,IAAc,CAAC,UAC9B,qBAAqB,MAAM,4BAA4B,MAAM;AAAA,EAC/D;AAEA,QAAM,YAAQ,yBAAW,qCAAY;AAErC,QAAM,6BAAyB,kCAAiB,CAAC,UAAU,MAAM,sBAAsB;AACvF,QAAM,0BAAsB,kCAAiB,CAAC,UAAU,M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C,QAAM,gCAAgC,qBAAqB;AAE3D,8BAAU,MAAM;AACd,oBAAgB,QAAQ,IAAI,SAAS,KAAK,EAAE;AAC5C,cAAU,MAAM,IAAI,SAAS,KAAK,EAAE;AACpC,mBAAe,WAAW;AAC1B,uBAAmB,YAAY,YAAY,IAAI;AAC/C,6BAAyB,qBAAqB;AAC9C,QAAI,CAAC,OAAQ,wBAAuB,IAAI;AAAA,EAC1C,GAAG;AAAA,IACD;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,SACE,4CAAC,sCAAY,GAAG,iBACd,uDAAC,2CAAiB,GAAG,+BACnB;AAAA,gDAAC,aAAW,GAAG,OAAO;AAAA,QACrB;AAAA,MACC,4CAAC,uCAAY,OAAO,EAAE,OAAO,OAAO,GAAG,QAAQ,MAAM,OAAO,SACzD,gCAAsB,4CAAC,kCAAa,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,oBAAgB;AAAA,IAAc,CAAC,UACnC,qBAAqB,CAAC,MAAM,mCAAmC,MAAM;AAAA,EACvE;AAEA,MAAI,CAAC,cAAe,QAAO,4CAAC,aAAW,GAAG,OAAO;AACjD,SAAO,4CAAC,iBAAc,WAAuB,GAAG,OAAO;AACzD;",
6
6
  "names": ["over", "active", "React"]
7
7
  }
@@ -28,13 +28,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
  var Item_exports = {};
30
30
  __export(Item_exports, {
31
- Item: () => Item,
32
- ItemSortable: () => ItemSortable,
33
- default: () => Item_default
31
+ ItemSortable: () => ItemSortable
34
32
  });
35
33
  module.exports = __toCommonJS(Item_exports);
36
34
  var React = __toESM(require("react"));
37
35
  var import_jsx_runtime = require("react/jsx-runtime");
36
+ var import_ds_drag_and_drop = require("@elliemae/ds-drag-and-drop");
38
37
  var import_ds_grid = require("@elliemae/ds-grid");
39
38
  var import_ds_hooks_headless_tooltip = require("@elliemae/ds-hooks-headless-tooltip");
40
39
  var import_ds_system = require("@elliemae/ds-system");
@@ -43,15 +42,14 @@ var import_useStore = require("../../config/useStore/index.js");
43
42
  var import_constants = require("../../constants/index.js");
44
43
  var import_DndHandle = require("../Dnd/DndHandle.js");
45
44
  var import_DropIndicator = require("../Dnd/DropIndicator.js");
46
- var import_withConditionalUseSortable = require("../HoC/withConditionalUseSortable.js");
47
45
  var import_ItemActions = require("./ItemActions/index.js");
48
- var import_useInnerRefHandlers = require("./ItemActions/useInnerRefHandlers.js");
46
+ var import_useInnerRefActionHandlers = require("./ItemActions/useInnerRefActionHandlers.js");
49
47
  var import_ItemMiddleSection = require("./ItemMiddleSection.js");
50
- var import_ItemSelection = require("./ItemSelection.js");
48
+ var import_ItemSelectionUI = require("./ItemSelectionUi/ItemSelectionUI.js");
51
49
  var import_useItemArrowNavigation = require("./useItemArrowNavigation.js");
50
+ var import_useItemInnerRefHandlers = require("./useItemInnerRefHandlers.js");
52
51
  var import_useItemKeyboardSelection = require("./useItemKeyboardSelection.js");
53
52
  var import_useSelectionLogic = require("./useSelectionLogic.js");
54
- var import_useThisItemIsFocused = require("./useThisItemIsFocused.js");
55
53
  const cssDisabled = import_ds_system.css`
56
54
  background-color: ${({ theme }) => theme.colors.neutral["100"]};
57
55
  color: ${({ theme }) => theme.colors.neutral["300"]};
@@ -85,53 +83,17 @@ const ItemWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid, { name: im
85
83
 
86
84
  ${({ isDragging }) => isDragging && cssDisabled}
87
85
  `;
88
- const ItemSelectionWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid, { name: import_constants.DSShuttleV2Name, slot: import_constants.DSShuttleV2Slots.ITEM_CHECKBOX })`
89
- height: 100%;
90
- &:focus {
91
- outline: none;
92
- }
93
- `;
94
- const useInnerRefHandlers = (itemMeta) => {
95
- const { datumInternalMeta, isDestinationPanel } = itemMeta;
96
- const { hydratedId } = datumInternalMeta;
97
- const setZustandRef = (0, import_useStore.useInternalStore)((state) => state.setZustandRef);
98
- const setDeferFocusUntilFirstRender = (0, import_useStore.useInternalStore)((state) => state.setDeferFocusUntilFirstRender);
99
- const deferedAfterFirstRender = (0, import_useStore.useInternalStore)((state) => state.getDeferFocusUntilFirstRender());
100
- const isLoadingMore = (0, import_useStore.usePropsStore)(
101
- (state) => isDestinationPanel ? state.destinationIsLoadingMore : state.sourceIsLoadingMore
102
- );
103
- const thisItemIsFocused = (0, import_useThisItemIsFocused.useThisItemIsFocused)(itemMeta);
104
- const currRegion = isDestinationPanel ? import_constants.REGIONS_FOCUSES.DESTINATION_PANEL_ITEM : import_constants.REGIONS_FOCUSES.SOURCE_PANEL_ITEM;
105
- const currItemId = hydratedId;
106
- const innerRefHandlerParentItem = import_react.default.useCallback(
107
- (node) => {
108
- setZustandRef([currRegion, currItemId, "parent"], node);
109
- if (deferedAfterFirstRender && thisItemIsFocused && node) {
110
- setDeferFocusUntilFirstRender(false);
111
- if (node.tabIndex === -1) node.tabIndex = 0;
112
- node.focus();
113
- }
114
- },
115
- [setZustandRef, currRegion, currItemId, thisItemIsFocused, deferedAfterFirstRender, setDeferFocusUntilFirstRender]
116
- );
117
- (0, import_react.useEffect)(
118
- () => () => {
119
- if (isLoadingMore) setDeferFocusUntilFirstRender(true);
120
- },
121
- [isLoadingMore, setDeferFocusUntilFirstRender]
122
- );
123
- return import_react.default.useMemo(
124
- () => ({ innerRefHandlerParentItem, thisItemIsFocused }),
125
- [innerRefHandlerParentItem, thisItemIsFocused]
126
- );
127
- };
128
86
  const Item = import_react.default.memo((itemMeta) => {
129
87
  const { datumInternalMeta, withDragNDrop, useSortableHelpers, hasMultipleSelection } = itemMeta;
130
- const { isSelected, hydratedId, softDeleted } = datumInternalMeta;
88
+ const { hydratedId, softDeleted } = datumInternalMeta;
89
+ const explicitSelectionUI = (0, import_useStore.usePropsStore)((store) => store.explicitSelectionUI);
131
90
  const cols = (0, import_react.useMemo)(() => {
132
- if (withDragNDrop) return ["5px", "auto", "1fr", "auto"];
133
- return ["5px", "1fr", "auto"];
134
- }, [withDragNDrop]);
91
+ const selectionUIWidth = explicitSelectionUI ? "auto" : "5px";
92
+ const finalCols = [selectionUIWidth];
93
+ if (withDragNDrop) finalCols.push("auto");
94
+ finalCols.push("1fr", "auto");
95
+ return finalCols;
96
+ }, [withDragNDrop, explicitSelectionUI]);
135
97
  const setDndDraggingItemMeta = (0, import_useStore.useInternalStore)((state) => state.setDndDraggingItemMeta);
136
98
  const getIsDragAndDropHappening = (0, import_useStore.useInternalStore)((state) => state.getIsDragAndDropHappening);
137
99
  const isDraggingThisItem = (0, import_useStore.useInternalStore)((state) => state.dndDraggingItem?.hydratedId === hydratedId);
@@ -153,8 +115,9 @@ const Item = import_react.default.memo((itemMeta) => {
153
115
  },
154
116
  [onItemKeyDownSelection, onItemContainerKeyDown]
155
117
  );
156
- const { innerRefHandlerParentItem, thisItemIsFocused } = useInnerRefHandlers(itemMeta);
157
- const { innerRefHandlerDnd } = (0, import_useInnerRefHandlers.useInnerRefHandlers)(itemMeta);
118
+ const itemInnerRefHandlers = (0, import_useItemInnerRefHandlers.useItemInnerRefHandlers)(itemMeta);
119
+ const { thisItemIsFocused } = itemInnerRefHandlers;
120
+ const { innerRefHandlerDnd } = (0, import_useInnerRefActionHandlers.useInnerRefActionHandlers)(itemMeta);
158
121
  const overId = (0, import_useStore.useInternalStore)((state) => state.overId);
159
122
  const isDropValid = (0, import_useStore.useInternalStore)((state) => state.isDropValid);
160
123
  const dropIndicatorPosition = (0, import_useStore.useInternalStore)((state) => state.dropIndicatorPosition);
@@ -163,7 +126,6 @@ const Item = import_react.default.memo((itemMeta) => {
163
126
  });
164
127
  const config = import_react.default.useMemo(() => ({ hasFocus: thisItemIsFocused }), [thisItemIsFocused]);
165
128
  const tooltipHelpers = (0, import_ds_hooks_headless_tooltip.useHeadlessTooltip)(config);
166
- const idItem = (0, import_react.useMemo)(() => `${hydratedId}-wrapper${softDeleted ? "-soft-deleted" : ""}`, [hydratedId, softDeleted]);
167
129
  const getOwnerProps = (0, import_useStore.usePropsStore)((store) => store.get);
168
130
  const getOwnerPropsArguments = import_react.default.useCallback(() => itemMeta, [itemMeta]);
169
131
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
@@ -187,19 +149,11 @@ const Item = import_react.default.memo((itemMeta) => {
187
149
  getOwnerPropsArguments,
188
150
  children: [
189
151
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
190
- ItemSelectionWrapper,
152
+ import_ItemSelectionUI.ItemSelectionUI,
191
153
  {
192
- role: "checkbox",
193
- "aria-checked": isSelected,
194
- onFocus: tooltipHelpers.onFocus,
195
- onBlur: tooltipHelpers.onBlur,
196
- "aria-labelledby": `${hydratedId}-text-section${softDeleted ? "-soft-deleted" : ""}`,
197
- id: idItem,
198
- innerRef: innerRefHandlerParentItem,
199
- "aria-disabled": softDeleted,
200
- getOwnerProps,
201
- getOwnerPropsArguments,
202
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ItemSelection.ItemSelection, { ...itemMeta })
154
+ tooltipHelpers,
155
+ itemInnerRefHandlers,
156
+ itemMeta
203
157
  }
204
158
  ),
205
159
  withDragNDrop && useSortableHelpers ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
@@ -221,6 +175,13 @@ const Item = import_react.default.memo((itemMeta) => {
221
175
  }
222
176
  );
223
177
  });
224
- const ItemSortable = (0, import_withConditionalUseSortable.withConditionalUseSortable)(Item);
225
- var Item_default = ItemSortable;
178
+ const ItemWithSortable = (props) => {
179
+ const {
180
+ datumInternalMeta: { hydratedId }
181
+ } = props;
182
+ const useSortableConfig = (0, import_react.useMemo)(() => ({ id: hydratedId }), [hydratedId]);
183
+ const useSortableHelpers = (0, import_ds_drag_and_drop.useSortable)(useSortableConfig);
184
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Item, { ...props, useSortableHelpers });
185
+ };
186
+ const ItemSortable = (props) => props.withDragNDrop ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ItemWithSortable, { ...props }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Item, { ...props });
226
187
  //# sourceMappingURL=Item.js.map