@elliemae/ds-shuttle-v2 3.70.0-next.35 → 3.70.0-next.37

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 (90) hide show
  1. package/dist/cjs/constants/index.js +1 -2
  2. package/dist/cjs/constants/index.js.map +2 -2
  3. package/dist/cjs/parts/Dnd/DndHandle.js +7 -6
  4. package/dist/cjs/parts/Dnd/DndHandle.js.map +2 -2
  5. package/dist/cjs/parts/Dnd/DragOverlay.js +1 -1
  6. package/dist/cjs/parts/Dnd/DragOverlay.js.map +2 -2
  7. package/dist/cjs/parts/HoC/withConditionalDnDRowContext.js +16 -14
  8. package/dist/cjs/parts/HoC/withConditionalDnDRowContext.js.map +2 -2
  9. package/dist/cjs/parts/Item/Item.js +29 -68
  10. package/dist/cjs/parts/Item/Item.js.map +3 -3
  11. package/dist/cjs/parts/Item/ItemActions/ItemActions.js +2 -2
  12. package/dist/cjs/parts/Item/ItemActions/ItemActions.js.map +2 -2
  13. package/dist/cjs/parts/Item/ItemActions/{useInnerRefHandlers.js → useInnerRefActionHandlers.js} +6 -6
  14. package/dist/cjs/parts/Item/ItemActions/useInnerRefActionHandlers.js.map +7 -0
  15. package/dist/cjs/parts/Item/ItemSelectionUi/CheckboxSelectionUI.js +72 -0
  16. package/dist/cjs/parts/Item/ItemSelectionUi/CheckboxSelectionUI.js.map +7 -0
  17. package/dist/cjs/parts/Item/ItemSelectionUi/ItemSelectionUI.js +83 -0
  18. package/dist/cjs/parts/Item/ItemSelectionUi/ItemSelectionUI.js.map +7 -0
  19. package/dist/cjs/parts/{HoC/withConditionalUseSortable.js → Item/ItemSelectionUi/ItemSelectionUI.types.js} +3 -18
  20. package/dist/cjs/parts/Item/ItemSelectionUi/ItemSelectionUI.types.js.map +7 -0
  21. package/dist/cjs/parts/Item/{ItemSelection.js → ItemSelectionUi/VerticalBarSelectionUI.js} +14 -13
  22. package/dist/cjs/parts/Item/ItemSelectionUi/VerticalBarSelectionUI.js.map +7 -0
  23. package/dist/cjs/parts/Item/useItemInnerRefHandlers.js +73 -0
  24. package/dist/cjs/parts/Item/useItemInnerRefHandlers.js.map +7 -0
  25. package/dist/cjs/parts/Panel/bottom/LoadMoreBtn.js +2 -2
  26. package/dist/cjs/parts/Panel/bottom/LoadMoreBtn.js.map +2 -2
  27. package/dist/cjs/parts/Panel/bottom/{useInnerRefHandlers.js → useLoadMoreBtnInnerRefHandlers.js} +6 -6
  28. package/dist/cjs/parts/Panel/bottom/useLoadMoreBtnInnerRefHandlers.js.map +7 -0
  29. package/dist/cjs/parts/Panel/middle/PanelContentMiddleSection.js +2 -2
  30. package/dist/cjs/parts/Panel/middle/PanelContentMiddleSection.js.map +2 -2
  31. package/dist/cjs/react-desc-prop-types.js +7 -2
  32. package/dist/cjs/react-desc-prop-types.js.map +2 -2
  33. package/dist/cjs/typescript-testing/slot-props.js +1 -0
  34. package/dist/cjs/typescript-testing/slot-props.js.map +2 -2
  35. package/dist/esm/constants/index.js +1 -2
  36. package/dist/esm/constants/index.js.map +2 -2
  37. package/dist/esm/parts/Dnd/DndHandle.js +8 -7
  38. package/dist/esm/parts/Dnd/DndHandle.js.map +2 -2
  39. package/dist/esm/parts/Dnd/DragOverlay.js +1 -1
  40. package/dist/esm/parts/Dnd/DragOverlay.js.map +2 -2
  41. package/dist/esm/parts/HoC/withConditionalDnDRowContext.js +16 -14
  42. package/dist/esm/parts/HoC/withConditionalDnDRowContext.js.map +2 -2
  43. package/dist/esm/parts/Item/Item.js +30 -69
  44. package/dist/esm/parts/Item/Item.js.map +2 -2
  45. package/dist/esm/parts/Item/ItemActions/ItemActions.js +2 -2
  46. package/dist/esm/parts/Item/ItemActions/ItemActions.js.map +2 -2
  47. package/dist/esm/parts/Item/ItemActions/{useInnerRefHandlers.js → useInnerRefActionHandlers.js} +3 -3
  48. package/dist/esm/parts/Item/ItemActions/useInnerRefActionHandlers.js.map +7 -0
  49. package/dist/esm/parts/Item/ItemSelectionUi/CheckboxSelectionUI.js +42 -0
  50. package/dist/esm/parts/Item/ItemSelectionUi/CheckboxSelectionUI.js.map +7 -0
  51. package/dist/esm/parts/Item/ItemSelectionUi/ItemSelectionUI.js +53 -0
  52. package/dist/esm/parts/Item/ItemSelectionUi/ItemSelectionUI.js.map +7 -0
  53. package/dist/esm/parts/Item/ItemSelectionUi/ItemSelectionUI.types.js +2 -0
  54. package/dist/esm/parts/Item/ItemSelectionUi/ItemSelectionUI.types.js.map +7 -0
  55. package/dist/esm/parts/Item/{ItemSelection.js → ItemSelectionUi/VerticalBarSelectionUI.js} +11 -10
  56. package/dist/esm/parts/Item/ItemSelectionUi/VerticalBarSelectionUI.js.map +7 -0
  57. package/dist/esm/parts/Item/useItemInnerRefHandlers.js +43 -0
  58. package/dist/esm/parts/Item/useItemInnerRefHandlers.js.map +7 -0
  59. package/dist/esm/parts/Panel/bottom/LoadMoreBtn.js +2 -2
  60. package/dist/esm/parts/Panel/bottom/LoadMoreBtn.js.map +2 -2
  61. package/dist/esm/parts/Panel/bottom/{useInnerRefHandlers.js → useLoadMoreBtnInnerRefHandlers.js} +3 -3
  62. package/dist/esm/parts/Panel/bottom/useLoadMoreBtnInnerRefHandlers.js.map +7 -0
  63. package/dist/esm/parts/Panel/middle/PanelContentMiddleSection.js +2 -2
  64. package/dist/esm/parts/Panel/middle/PanelContentMiddleSection.js.map +2 -2
  65. package/dist/esm/react-desc-prop-types.js +7 -2
  66. package/dist/esm/react-desc-prop-types.js.map +2 -2
  67. package/dist/esm/typescript-testing/slot-props.js +1 -0
  68. package/dist/esm/typescript-testing/slot-props.js.map +2 -2
  69. package/dist/types/constants/index.d.ts +2 -1
  70. package/dist/types/parts/Item/Item.d.ts +1 -5
  71. package/dist/types/parts/Item/ItemActions/{useInnerRefHandlers.d.ts → useInnerRefActionHandlers.d.ts} +1 -1
  72. package/dist/types/parts/Item/ItemSelectionUi/CheckboxSelectionUI.d.ts +2 -0
  73. package/dist/types/parts/Item/ItemSelectionUi/ItemSelectionUI.d.ts +2 -0
  74. package/dist/types/parts/Item/ItemSelectionUi/ItemSelectionUI.types.d.ts +11 -0
  75. package/dist/types/parts/Item/ItemSelectionUi/VerticalBarSelectionUI.d.ts +2 -0
  76. package/dist/types/parts/Item/useItemInnerRefHandlers.d.ts +5 -0
  77. package/dist/types/parts/Panel/bottom/{useInnerRefHandlers.d.ts → useLoadMoreBtnInnerRefHandlers.d.ts} +1 -1
  78. package/dist/types/react-desc-prop-types.d.ts +2 -0
  79. package/package.json +23 -23
  80. package/dist/cjs/parts/HoC/withConditionalUseSortable.js.map +0 -7
  81. package/dist/cjs/parts/Item/ItemActions/useInnerRefHandlers.js.map +0 -7
  82. package/dist/cjs/parts/Item/ItemSelection.js.map +0 -7
  83. package/dist/cjs/parts/Panel/bottom/useInnerRefHandlers.js.map +0 -7
  84. package/dist/esm/parts/HoC/withConditionalUseSortable.js +0 -13
  85. package/dist/esm/parts/HoC/withConditionalUseSortable.js.map +0 -7
  86. package/dist/esm/parts/Item/ItemActions/useInnerRefHandlers.js.map +0 -7
  87. package/dist/esm/parts/Item/ItemSelection.js.map +0 -7
  88. package/dist/esm/parts/Panel/bottom/useInnerRefHandlers.js.map +0 -7
  89. package/dist/types/parts/HoC/withConditionalUseSortable.d.ts +0 -9
  90. package/dist/types/parts/Item/ItemSelection.d.ts +0 -3
@@ -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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/Item/Item.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable max-statements */\nimport { Grid } from '@elliemae/ds-grid';\nimport { useHeadlessTooltip } from '@elliemae/ds-hooks-headless-tooltip';\nimport { css, styled } from '@elliemae/ds-system';\nimport React, { useEffect, useMemo } from 'react';\nimport { useInternalStore, usePropsStore } from '../../config/useStore/index.js';\nimport { REGIONS_FOCUSES, DSShuttleV2Name, DSShuttleV2Slots } from '../../constants/index.js';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types.js';\nimport { DragHandle } from '../Dnd/DndHandle.js';\nimport { DropIndicator } from '../Dnd/DropIndicator.js';\nimport { withConditionalUseSortable } from '../HoC/withConditionalUseSortable.js';\nimport { ItemActions } from './ItemActions/index.js';\nimport { useInnerRefHandlers as useInnerRefActionHandlers } from './ItemActions/useInnerRefHandlers.js';\nimport { ItemMiddleSection } from './ItemMiddleSection.js';\nimport { ItemSelection } from './ItemSelection.js';\nimport { useItemArrowNavigation } from './useItemArrowNavigation.js';\nimport { useItemKeyboardSelection } from './useItemKeyboardSelection.js';\nimport { useSelectionLogic } from './useSelectionLogic.js';\nimport { useThisItemIsFocused } from './useThisItemIsFocused.js';\n\n// we are using the class-name added via slot for the children `:hover` styling of icon colors\nconst cssDisabled = css`\n background-color: ${({ theme }) => theme.colors.neutral['100']};\n color: ${({ theme }) => theme.colors.neutral['300']};\n .DSShuttleV2-item-action-btn-to-source-icon > svg,\n .DSShuttleV2-item-action-btn-to-destination-icon > svg,\n .DSShuttleV2-item-action-btn-drilldown-icon > svg {\n fill: ${({ theme }) => theme.colors.neutral['300']};\n }\n`;\n\nconst focusRing = css`\n outline: 2px solid ${({ theme }) => theme.colors.brand['700']};\n outline-offset: -2px;\n`;\ninterface ItemWrapperT {\n isDragging: boolean;\n isDndActive: boolean;\n hasFocusRing: boolean;\n}\n\nconst ItemWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_WRAPPER })<ItemWrapperT>`\n min-height: 2.769rem;\n position: relative;\n background-color: white;\n &:hover {\n background-color: ${({ isDndActive, theme }) => (!isDndActive ? theme.colors.brand['200'] : 'white')};\n .DSShuttleV2-item-action-btn-to-source-icon > svg,\n .DSShuttleV2-item-action-btn-to-destination-icon > svg,\n .DSShuttleV2-item-action-btn-drilldown-icon > svg {\n fill: brand-700;\n }\n ${({ isDragging }) => isDragging && cssDisabled}\n }\n\n ${({ hasFocusRing }) => hasFocusRing && focusRing}\n\n border-bottom: 1px solid neutral-100;\n\n ${({ isDragging }) => isDragging && cssDisabled}\n`;\n\nconst ItemSelectionWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_CHECKBOX })`\n height: 100%;\n &:focus {\n outline: none;\n }\n`;\n\nconst useInnerRefHandlers = (itemMeta: DSShuttleV2T.ItemMeta) => {\n const { datumInternalMeta, isDestinationPanel } = itemMeta;\n const { hydratedId } = datumInternalMeta;\n const setZustandRef = useInternalStore((state) => state.setZustandRef);\n\n const setDeferFocusUntilFirstRender = useInternalStore((state) => state.setDeferFocusUntilFirstRender);\n const deferedAfterFirstRender = useInternalStore((state) => state.getDeferFocusUntilFirstRender());\n const isLoadingMore = usePropsStore((state) =>\n isDestinationPanel ? state.destinationIsLoadingMore : state.sourceIsLoadingMore,\n );\n\n const thisItemIsFocused = useThisItemIsFocused(itemMeta);\n\n const currRegion = isDestinationPanel ? REGIONS_FOCUSES.DESTINATION_PANEL_ITEM : REGIONS_FOCUSES.SOURCE_PANEL_ITEM;\n const currItemId = hydratedId;\n\n const innerRefHandlerParentItem = React.useCallback(\n (node: HTMLDivElement | null) => {\n setZustandRef([currRegion, currItemId, 'parent'], node);\n if (deferedAfterFirstRender && thisItemIsFocused && node) {\n setDeferFocusUntilFirstRender(false);\n if (node.tabIndex === -1) node.tabIndex = 0;\n node.focus();\n }\n },\n [setZustandRef, currRegion, currItemId, thisItemIsFocused, deferedAfterFirstRender, setDeferFocusUntilFirstRender],\n );\n\n useEffect(\n () => () => {\n if (isLoadingMore) setDeferFocusUntilFirstRender(true);\n },\n [isLoadingMore, setDeferFocusUntilFirstRender],\n );\n\n return React.useMemo(\n () => ({ innerRefHandlerParentItem, thisItemIsFocused }),\n [innerRefHandlerParentItem, thisItemIsFocused],\n );\n};\n\nexport const Item = React.memo((itemMeta: DSShuttleV2T.ItemMeta) => {\n const { datumInternalMeta, withDragNDrop, useSortableHelpers, hasMultipleSelection } = itemMeta;\n const { isSelected, hydratedId, softDeleted } = datumInternalMeta;\n\n const cols = useMemo(() => {\n if (withDragNDrop) return ['5px', 'auto', '1fr', 'auto'];\n return ['5px', '1fr', 'auto'];\n }, [withDragNDrop]);\n\n const setDndDraggingItemMeta = useInternalStore((state) => state.setDndDraggingItemMeta);\n const getIsDragAndDropHappening = useInternalStore((state) => state.getIsDragAndDropHappening);\n const isDraggingThisItem = useInternalStore((state) => state.dndDraggingItem?.hydratedId === hydratedId);\n\n React.useEffect(() => {\n if (isDraggingThisItem) {\n setDndDraggingItemMeta((prevItemMeta) => {\n if (prevItemMeta?.datumInternalMeta.hydratedId === hydratedId) return prevItemMeta;\n return itemMeta;\n });\n }\n }, [hydratedId, isDraggingThisItem, itemMeta, setDndDraggingItemMeta]);\n\n const { selectItem, onShiftMouseDownPreventTextSelection } = useSelectionLogic(itemMeta);\n const { onItemContainerKeyDown } = useItemArrowNavigation(itemMeta);\n const { onItemKeyDownSelection } = useItemKeyboardSelection(itemMeta);\n\n const handleItemKeyDown: React.KeyboardEventHandler<HTMLDivElement> = React.useCallback(\n (event) => {\n onItemKeyDownSelection(event);\n onItemContainerKeyDown(event);\n },\n [onItemKeyDownSelection, onItemContainerKeyDown],\n );\n const { innerRefHandlerParentItem, thisItemIsFocused } = useInnerRefHandlers(itemMeta);\n const { innerRefHandlerDnd } = useInnerRefActionHandlers(itemMeta);\n const overId = useInternalStore((state) => state.overId);\n const isDropValid = useInternalStore((state) => state.isDropValid);\n const dropIndicatorPosition = useInternalStore((state) => state.dropIndicatorPosition);\n\n const showDropIndicatorPosition = hydratedId === overId && dropIndicatorPosition;\n const sortableRef = useSortableHelpers?.setNodeRef ?? (() => {});\n\n // const thisItemIsFocused = useThisItemIsFocused(itemMeta);\n const config = React.useMemo(() => ({ hasFocus: thisItemIsFocused }), [thisItemIsFocused]);\n\n const tooltipHelpers = useHeadlessTooltip(config);\n\n const idItem = useMemo(() => `${hydratedId}-wrapper${softDeleted ? '-soft-deleted' : ''}`, [hydratedId, softDeleted]);\n\n const getOwnerProps = usePropsStore((store) => store.get);\n const getOwnerPropsArguments = React.useCallback(() => itemMeta, [itemMeta]);\n\n return (\n <ItemWrapper\n isDragging={isDraggingThisItem}\n isDndActive={getIsDragAndDropHappening()}\n cols={cols}\n alignItems=\"center\"\n onClick={selectItem}\n innerRef={sortableRef}\n onKeyDown={handleItemKeyDown}\n onMouseDown={onShiftMouseDownPreventTextSelection}\n onMouseEnter={tooltipHelpers.onMouseEnter}\n onMouseLeave={tooltipHelpers.onMouseLeave}\n onPointerEnter={tooltipHelpers.onMouseEnter}\n onPointerLeave={tooltipHelpers.onMouseLeave}\n hasFocusRing={thisItemIsFocused}\n tabIndex={-1}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <ItemSelectionWrapper\n role=\"checkbox\"\n aria-checked={isSelected}\n onFocus={tooltipHelpers.onFocus}\n onBlur={tooltipHelpers.onBlur}\n aria-labelledby={`${hydratedId}-text-section${softDeleted ? '-soft-deleted' : ''}`}\n id={idItem}\n innerRef={innerRefHandlerParentItem}\n aria-disabled={softDeleted}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <ItemSelection {...itemMeta} />\n </ItemSelectionWrapper>\n {withDragNDrop && useSortableHelpers ? (\n <DragHandle\n id={hydratedId}\n useSortableHelpers={useSortableHelpers}\n isDndActive={getIsDragAndDropHappening()}\n isDragging={isDraggingThisItem}\n innerRef={innerRefHandlerDnd}\n disabled={hasMultipleSelection}\n ariaLabelledby={`${hydratedId}-text-section${softDeleted ? '-soft-deleted' : ''}`}\n />\n ) : null}\n <ItemMiddleSection {...itemMeta} tooltipHelpers={tooltipHelpers} />\n {!hasMultipleSelection ? <ItemActions {...itemMeta} /> : null}\n <DropIndicator vertical={false} dropIndicatorPosition={showDropIndicatorPosition} isDropValid={isDropValid} />\n </ItemWrapper>\n );\n});\n\nconst ItemSortable = withConditionalUseSortable(Item);\nexport { ItemSortable };\nexport default ItemSortable;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACoKnB,SA8BI,KA9BJ;AAlKJ,SAAS,YAAY;AACrB,SAAS,0BAA0B;AACnC,SAAS,KAAK,cAAc;AAC5B,OAAOA,UAAS,WAAW,eAAe;AAC1C,SAAS,kBAAkB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;AAAA,EAC9G;AAEJ,CAAC;AAED,MAAM,eAAe,2BAA2B,IAAI;AAEpD,IAAO,eAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable max-statements */\nimport { useSortable } from '@elliemae/ds-drag-and-drop';\nimport { Grid } from '@elliemae/ds-grid';\nimport { useHeadlessTooltip } from '@elliemae/ds-hooks-headless-tooltip';\nimport { css, styled } from '@elliemae/ds-system';\nimport React, { useMemo } from 'react';\nimport { useInternalStore, usePropsStore } from '../../config/useStore/index.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../constants/index.js';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types.js';\nimport { DragHandle } from '../Dnd/DndHandle.js';\nimport { DropIndicator } from '../Dnd/DropIndicator.js';\nimport { ItemActions } from './ItemActions/index.js';\nimport { useInnerRefActionHandlers } from './ItemActions/useInnerRefActionHandlers.js';\nimport { ItemMiddleSection } from './ItemMiddleSection.js';\nimport { ItemSelectionUI } from './ItemSelectionUi/ItemSelectionUI.js';\nimport { useItemArrowNavigation } from './useItemArrowNavigation.js';\nimport { useItemInnerRefHandlers } from './useItemInnerRefHandlers.js';\nimport { useItemKeyboardSelection } from './useItemKeyboardSelection.js';\nimport { useSelectionLogic } from './useSelectionLogic.js';\n\n// we are using the class-name added via slot for the children `:hover` styling of icon colors\nconst cssDisabled = css`\n background-color: ${({ theme }) => theme.colors.neutral['100']};\n color: ${({ theme }) => theme.colors.neutral['300']};\n .DSShuttleV2-item-action-btn-to-source-icon > svg,\n .DSShuttleV2-item-action-btn-to-destination-icon > svg,\n .DSShuttleV2-item-action-btn-drilldown-icon > svg {\n fill: ${({ theme }) => theme.colors.neutral['300']};\n }\n`;\n\nconst focusRing = css`\n outline: 2px solid ${({ theme }) => theme.colors.brand['700']};\n outline-offset: -2px;\n`;\ninterface ItemWrapperT {\n isDragging: boolean;\n isDndActive: boolean;\n hasFocusRing: boolean;\n}\n\nconst ItemWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_WRAPPER })<ItemWrapperT>`\n min-height: 2.769rem;\n position: relative;\n background-color: white;\n &:hover {\n background-color: ${({ isDndActive, theme }) => (!isDndActive ? theme.colors.brand['200'] : 'white')};\n .DSShuttleV2-item-action-btn-to-source-icon > svg,\n .DSShuttleV2-item-action-btn-to-destination-icon > svg,\n .DSShuttleV2-item-action-btn-drilldown-icon > svg {\n fill: brand-700;\n }\n ${({ isDragging }) => isDragging && cssDisabled}\n }\n\n ${({ hasFocusRing }) => hasFocusRing && focusRing}\n\n border-bottom: 1px solid neutral-100;\n\n ${({ isDragging }) => isDragging && cssDisabled}\n`;\nconst Item = React.memo((itemMeta: DSShuttleV2T.ItemMeta) => {\n const { datumInternalMeta, withDragNDrop, useSortableHelpers, hasMultipleSelection } = itemMeta;\n const { hydratedId, softDeleted } = datumInternalMeta;\n\n const explicitSelectionUI = usePropsStore((store) => store.explicitSelectionUI);\n const cols = useMemo(() => {\n const selectionUIWidth = explicitSelectionUI ? 'auto' : '5px';\n const finalCols = [selectionUIWidth];\n if (withDragNDrop) finalCols.push('auto');\n finalCols.push('1fr', 'auto');\n return finalCols;\n }, [withDragNDrop, explicitSelectionUI]);\n\n const setDndDraggingItemMeta = useInternalStore((state) => state.setDndDraggingItemMeta);\n const getIsDragAndDropHappening = useInternalStore((state) => state.getIsDragAndDropHappening);\n const isDraggingThisItem = useInternalStore((state) => state.dndDraggingItem?.hydratedId === hydratedId);\n\n React.useEffect(() => {\n if (isDraggingThisItem) {\n setDndDraggingItemMeta((prevItemMeta) => {\n if (prevItemMeta?.datumInternalMeta.hydratedId === hydratedId) return prevItemMeta;\n return itemMeta;\n });\n }\n }, [hydratedId, isDraggingThisItem, itemMeta, setDndDraggingItemMeta]);\n\n const { selectItem, onShiftMouseDownPreventTextSelection } = useSelectionLogic(itemMeta);\n const { onItemContainerKeyDown } = useItemArrowNavigation(itemMeta);\n const { onItemKeyDownSelection } = useItemKeyboardSelection(itemMeta);\n\n const handleItemKeyDown: React.KeyboardEventHandler<HTMLDivElement> = React.useCallback(\n (event) => {\n onItemKeyDownSelection(event);\n onItemContainerKeyDown(event);\n },\n [onItemKeyDownSelection, onItemContainerKeyDown],\n );\n const itemInnerRefHandlers = useItemInnerRefHandlers(itemMeta);\n const { thisItemIsFocused } = itemInnerRefHandlers;\n const { innerRefHandlerDnd } = useInnerRefActionHandlers(itemMeta);\n const overId = useInternalStore((state) => state.overId);\n const isDropValid = useInternalStore((state) => state.isDropValid);\n const dropIndicatorPosition = useInternalStore((state) => state.dropIndicatorPosition);\n\n const showDropIndicatorPosition = hydratedId === overId && dropIndicatorPosition;\n const sortableRef = useSortableHelpers?.setNodeRef ?? (() => {});\n\n // const thisItemIsFocused = useThisItemIsFocused(itemMeta);\n const config = React.useMemo(() => ({ hasFocus: thisItemIsFocused }), [thisItemIsFocused]);\n\n const tooltipHelpers = useHeadlessTooltip(config);\n\n const getOwnerProps = usePropsStore((store) => store.get);\n const getOwnerPropsArguments = React.useCallback(() => itemMeta, [itemMeta]);\n\n return (\n <ItemWrapper\n isDragging={isDraggingThisItem}\n isDndActive={getIsDragAndDropHappening()}\n cols={cols}\n alignItems=\"center\"\n onClick={selectItem}\n innerRef={sortableRef}\n onKeyDown={handleItemKeyDown}\n onMouseDown={onShiftMouseDownPreventTextSelection}\n onMouseEnter={tooltipHelpers.onMouseEnter}\n onMouseLeave={tooltipHelpers.onMouseLeave}\n onPointerEnter={tooltipHelpers.onMouseEnter}\n onPointerLeave={tooltipHelpers.onMouseLeave}\n hasFocusRing={thisItemIsFocused}\n tabIndex={-1}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <ItemSelectionUI\n tooltipHelpers={tooltipHelpers}\n itemInnerRefHandlers={itemInnerRefHandlers}\n itemMeta={itemMeta}\n />\n {withDragNDrop && useSortableHelpers ? (\n <DragHandle\n id={hydratedId}\n useSortableHelpers={useSortableHelpers}\n isDndActive={getIsDragAndDropHappening()}\n isDragging={isDraggingThisItem}\n innerRef={innerRefHandlerDnd}\n disabled={hasMultipleSelection}\n ariaLabelledby={`${hydratedId}-text-section${softDeleted ? '-soft-deleted' : ''}`}\n />\n ) : null}\n <ItemMiddleSection {...itemMeta} tooltipHelpers={tooltipHelpers} />\n {!hasMultipleSelection ? <ItemActions {...itemMeta} /> : null}\n <DropIndicator vertical={false} dropIndicatorPosition={showDropIndicatorPosition} isDropValid={isDropValid} />\n </ItemWrapper>\n );\n});\n\nconst ItemWithSortable = (props: DSShuttleV2T.ItemMeta) => {\n const {\n datumInternalMeta: { hydratedId },\n } = props;\n const useSortableConfig = useMemo(() => ({ id: hydratedId }), [hydratedId]);\n const useSortableHelpers = useSortable(useSortableConfig);\n return <Item {...props} useSortableHelpers={useSortableHelpers} />;\n};\n\nexport const ItemSortable = (props: DSShuttleV2T.ItemMeta) =>\n props.withDragNDrop ? <ItemWithSortable {...props} /> : <Item {...props} />;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACsHnB,SAkBE,KAlBF;AApHJ,SAAS,mBAAmB;AAC5B,SAAS,YAAY;AACrB,SAAS,0BAA0B;AACnC,SAAS,KAAK,cAAc;AAC5B,OAAOA,UAAS,eAAe;AAC/B,SAAS,kBAAkB,qBAAqB;AAChD,SAAS,iBAAiB,wBAAwB;AAElD,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAC9B,SAAS,mBAAmB;AAC5B,SAAS,iCAAiC;AAC1C,SAAS,yBAAyB;AAClC,SAAS,uBAAuB;AAChC,SAAS,8BAA8B;AACvC,SAAS,+BAA+B;AACxC,SAAS,gCAAgC;AACzC,SAAS,yBAAyB;AAGlC,MAAM,cAAc;AAAA,sBACE,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,WACrD,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA,YAIzC,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a;AAAA,MACb,cAAc,eAAe;AAAA,MAC7B,cAAc,eAAe;AAAA,MAC7B,gBAAgB,eAAe;AAAA,MAC/B,gBAAgB,eAAe;AAAA,MAC/B,cAAc;AAAA,MACd,UAAU;AAAA,MACV;AAAA,MACA;AAAA,MAEA;AAAA;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA;AAAA;AAAA,QACF;AAAA,QACC,iBAAiB,qBAChB;AAAA,UAAC;AAAA;AAAA,YACC,IAAI;AAAA,YACJ;AAAA,YACA,aAAa,0BAA0B;AAAA,YACvC,YAAY;AAAA,YACZ,UAAU;AAAA,YACV,UAAU;AAAA,YACV,gBAAgB,GAAG,UAAU,gBAAgB,cAAc,kBAAkB,EAAE;AAAA;AAAA,QACjF,IACE;AAAA,QACJ,oBAAC,qBAAmB,GAAG,UAAU,gBAAgC;AAAA,QAChE,CAAC,uBAAuB,oBAAC,eAAa,GAAG,UAAU,IAAK;AAAA,QACzD,oBAAC,iBAAc,UAAU,OAAO,uBAAuB,2BAA2B,aAA0B;AAAA;AAAA;AAAA,EAC9G;AAEJ,CAAC;AAED,MAAM,mBAAmB,CAAC,UAAiC;AACzD,QAAM;AAAA,IACJ,mBAAmB,EAAE,WAAW;AAAA,EAClC,IAAI;AACJ,QAAM,oBAAoB,QAAQ,OAAO,EAAE,IAAI,WAAW,IAAI,CAAC,UAAU,CAAC;AAC1E,QAAM,qBAAqB,YAAY,iBAAiB;AACxD,SAAO,oBAAC,QAAM,GAAG,OAAO,oBAAwC;AAClE;AAEO,MAAM,eAAe,CAAC,UAC3B,MAAM,gBAAgB,oBAAC,oBAAkB,GAAG,OAAO,IAAK,oBAAC,QAAM,GAAG,OAAO;",
6
6
  "names": ["React"]
7
7
  }
@@ -6,7 +6,7 @@ import { Grid } from "@elliemae/ds-grid";
6
6
  import { DSButtonV3, BUTTON_SIZES } from "@elliemae/ds-button-v2";
7
7
  import { ArrowShortReturn, ArrowShortRight, CloseMedium } from "@elliemae/ds-icons";
8
8
  import { useActionsHandlers } from "./useActionsHandlers.js";
9
- import { useInnerRefHandlers } from "./useInnerRefHandlers.js";
9
+ import { useInnerRefActionHandlers } from "./useInnerRefActionHandlers.js";
10
10
  import { DSShuttleV2Name, DSShuttleV2Slots } from "../../../constants/index.js";
11
11
  import { useInternalStore, usePropsStore } from "../../../config/useStore/useStore.js";
12
12
  const StyledItemActions = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_ACTIONS_WRAPPER })`
@@ -44,7 +44,7 @@ const ItemActions = React2.memo((itemMeta) => {
44
44
  } = itemMeta;
45
45
  const { withActions, internallyDisabledDrilldown, internallyDisabledMove } = datumRenderFlags;
46
46
  const { preventDrilldown, label } = datumHydratables;
47
- const { innerRefHandlerDrilldown, innerRefHandlerMove } = useInnerRefHandlers(itemMeta);
47
+ const { innerRefHandlerDrilldown, innerRefHandlerMove } = useInnerRefActionHandlers(itemMeta);
48
48
  const { handleClickDrilldown, handleClickSingleMove, handleKeyDownSelectionBubbleUp } = useActionsHandlers(itemMeta);
49
49
  const drillDownAriaLabel = useMemo(() => `Drilldown into ${label} option`, [label]);
50
50
  const moveAriaLabel = useMemo(
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/Item/ItemActions/ItemActions.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useMemo } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSButtonV3, BUTTON_SIZES } from '@elliemae/ds-button-v2';\nimport { ArrowShortReturn, ArrowShortRight, CloseMedium } from '@elliemae/ds-icons';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types.js';\nimport { useActionsHandlers } from './useActionsHandlers.js';\nimport { useInnerRefHandlers } from './useInnerRefHandlers.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../constants/index.js';\nimport { useInternalStore, usePropsStore } from '../../../config/useStore/useStore.js';\n\nconst StyledItemActions = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_ACTIONS_WRAPPER })`\n height: 100%;\n`;\nconst StyledItemActionWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_ACTION_WRAPPER })``;\nconst StyledButton = styled(DSButtonV3, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_ACTION_BTN })`\n height: 1.692rem !important;\n svg {\n fill: brand-600;\n }\n :disabled svg {\n fill: neutral-200 !important;\n }\n`;\nconst StyledDrilldownIcon = styled(ArrowShortReturn, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.ITEM_ACTION_BTN_DRILLDOWN_ICON,\n})``;\nconst StyledCloseMediumIcon = styled(CloseMedium, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.ITEM_ACTION_BTN_TO_SOURCE_ICON,\n})``;\nconst StyledArrowShortRightIcon = styled(ArrowShortRight, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.ITEM_ACTION_BTN_TO_DESTINATION_ICON,\n})``;\n\nconst actionsCols = ['1.538rem', '1.538rem'];\n\nexport const ItemActions = React.memo((itemMeta: DSShuttleV2T.ItemMeta) => {\n const {\n datumHydratables,\n isDestinationPanel,\n datumRenderFlags,\n datumInternalMeta: { hydratedPreventMove, hydratedId },\n } = itemMeta;\n // withActions is calculated in /src/config/configureAutoCalculated.ts\n const { withActions, internallyDisabledDrilldown, internallyDisabledMove } = datumRenderFlags;\n const { preventDrilldown, label } = datumHydratables;\n const { innerRefHandlerDrilldown, innerRefHandlerMove } = useInnerRefHandlers(itemMeta);\n const { handleClickDrilldown, handleClickSingleMove, handleKeyDownSelectionBubbleUp } = useActionsHandlers(itemMeta);\n const drillDownAriaLabel = useMemo(() => `Drilldown into ${label} option`, [label]);\n const moveAriaLabel = useMemo(\n () => `Move option ${label} into ${isDestinationPanel ? 'source' : 'destination'} panel`,\n [label, isDestinationPanel],\n );\n\n const isDraggingThisItem = useInternalStore((state) => state.dndDraggingItem?.hydratedId === hydratedId);\n\n const moveButtonProps = usePropsStore((state) => state.moveButtonProps);\n\n const getOwnerProps = usePropsStore((store) => store.get);\n const getOwnerPropsArguments = React.useCallback(() => itemMeta, [itemMeta]);\n // The to-source / to-destination icon slots share a unified argument shape with the bulk-action\n // button (see MultipleSelectionAction). Here the per-item itemMeta is available via extraMetaInfo.\n const getOwnerPropsArgumentsIcons = React.useCallback(\n (): DSShuttleV2T.ItemActionIconArguments => ({\n panelMetaInfo: itemMeta,\n extraMetaInfo: { itemMeta },\n }),\n [itemMeta],\n );\n\n // Clicking an action button (drilldown / move) must not bubble up to the row's onClick\n // (selectItem) / onMouseDown handlers \u2014 using an action should not toggle item selection.\n const stopPropagation = React.useCallback((event: React.SyntheticEvent) => {\n event.stopPropagation();\n }, []);\n\n return (\n <StyledItemActions\n cols={actionsCols}\n gutter=\"xxs\"\n pl=\"xs\"\n pr=\"xxs\"\n alignItems=\"center\"\n onClick={stopPropagation}\n onMouseDown={stopPropagation}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {withActions ? (\n <>\n <StyledItemActionWrapper getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <StyledButton\n buttonType=\"icon\"\n aria-label={drillDownAriaLabel}\n onClick={handleClickDrilldown}\n onKeyDown={handleKeyDownSelectionBubbleUp}\n size={BUTTON_SIZES.S}\n innerRef={innerRefHandlerDrilldown}\n tabIndex={-1} // We overwrite it via vanilla js on the focus manager\n disabled={internallyDisabledDrilldown || preventDrilldown === true || isDraggingThisItem}\n >\n <StyledDrilldownIcon\n width=\"1.538rem\"\n height=\"1.538rem\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n </StyledButton>\n </StyledItemActionWrapper>\n <StyledItemActionWrapper getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <StyledButton\n buttonType=\"icon\"\n aria-label={moveAriaLabel}\n onClick={handleClickSingleMove}\n onKeyDown={handleKeyDownSelectionBubbleUp}\n size={BUTTON_SIZES.S}\n innerRef={innerRefHandlerMove}\n tabIndex={-1} // We overwrite it via vanilla js on the focus manager\n disabled={internallyDisabledMove || hydratedPreventMove === true || isDraggingThisItem}\n {...(moveButtonProps && moveButtonProps({ itemMeta, isDestinationPanel }))}\n >\n {isDestinationPanel ? (\n <StyledCloseMediumIcon\n width=\"1.538rem\"\n height=\"1.538rem\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArgumentsIcons}\n />\n ) : (\n <StyledArrowShortRightIcon\n width=\"1.538rem\"\n height=\"1.538rem\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArgumentsIcons}\n />\n )}\n </StyledButton>\n </StyledItemActionWrapper>\n </>\n ) : (\n // this is a place-holder used for mantainting the grid spacing when item has no actions (so when item is soft-deleted)\n <>\n <div />\n <div />\n </>\n )}\n </StyledItemActions>\n );\n});\n"],
5
- "mappings": "AAAA,YAAY,WAAW;AC4Ff,mBAYM,KAZN;AA5FR,OAAOA,UAAS,eAAe;AAC/B,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,YAAY,oBAAoB;AACzC,SAAS,kBAAkB,iBAAiB,mBAAmB;AAE/D,SAAS,0BAA0B;AACnC,SAAS,2BAA2B;AACpC,SAAS,iBAAiB,wBAAwB;AAClD,SAAS,kBAAkB,qBAAqB;AAEhD,MAAM,oBAAoB,OAAO,MAAM,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,qBAAqB,CAAC;AAAA;AAAA;AAG7G,MAAM,0BAA0B,OAAO,MAAM,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,oBAAoB,CAAC;AAClH,MAAM,eAAe,OAAO,YAAY,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,gBAAgB,CAAC;AAAA;AAAA;A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,SACF;AAAA;AAAA,QAGA,iCACE;AAAA,8BAAC,SAAI;AAAA,UACL,oBAAC,SAAI;AAAA,WACP;AAAA;AAAA;AAAA,EAEJ;AAEJ,CAAC;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useMemo } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSButtonV3, BUTTON_SIZES } from '@elliemae/ds-button-v2';\nimport { ArrowShortReturn, ArrowShortRight, CloseMedium } from '@elliemae/ds-icons';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types.js';\nimport { useActionsHandlers } from './useActionsHandlers.js';\nimport { useInnerRefActionHandlers } from './useInnerRefActionHandlers.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../constants/index.js';\nimport { useInternalStore, usePropsStore } from '../../../config/useStore/useStore.js';\n\nconst StyledItemActions = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_ACTIONS_WRAPPER })`\n height: 100%;\n`;\nconst StyledItemActionWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_ACTION_WRAPPER })``;\nconst StyledButton = styled(DSButtonV3, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_ACTION_BTN })`\n height: 1.692rem !important;\n svg {\n fill: brand-600;\n }\n :disabled svg {\n fill: neutral-200 !important;\n }\n`;\nconst StyledDrilldownIcon = styled(ArrowShortReturn, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.ITEM_ACTION_BTN_DRILLDOWN_ICON,\n})``;\nconst StyledCloseMediumIcon = styled(CloseMedium, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.ITEM_ACTION_BTN_TO_SOURCE_ICON,\n})``;\nconst StyledArrowShortRightIcon = styled(ArrowShortRight, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.ITEM_ACTION_BTN_TO_DESTINATION_ICON,\n})``;\n\nconst actionsCols = ['1.538rem', '1.538rem'];\n\nexport const ItemActions = React.memo((itemMeta: DSShuttleV2T.ItemMeta) => {\n const {\n datumHydratables,\n isDestinationPanel,\n datumRenderFlags,\n datumInternalMeta: { hydratedPreventMove, hydratedId },\n } = itemMeta;\n // withActions is calculated in /src/config/configureAutoCalculated.ts\n const { withActions, internallyDisabledDrilldown, internallyDisabledMove } = datumRenderFlags;\n const { preventDrilldown, label } = datumHydratables;\n const { innerRefHandlerDrilldown, innerRefHandlerMove } = useInnerRefActionHandlers(itemMeta);\n const { handleClickDrilldown, handleClickSingleMove, handleKeyDownSelectionBubbleUp } = useActionsHandlers(itemMeta);\n const drillDownAriaLabel = useMemo(() => `Drilldown into ${label} option`, [label]);\n const moveAriaLabel = useMemo(\n () => `Move option ${label} into ${isDestinationPanel ? 'source' : 'destination'} panel`,\n [label, isDestinationPanel],\n );\n\n const isDraggingThisItem = useInternalStore((state) => state.dndDraggingItem?.hydratedId === hydratedId);\n\n const moveButtonProps = usePropsStore((state) => state.moveButtonProps);\n\n const getOwnerProps = usePropsStore((store) => store.get);\n const getOwnerPropsArguments = React.useCallback(() => itemMeta, [itemMeta]);\n // The to-source / to-destination icon slots share a unified argument shape with the bulk-action\n // button (see MultipleSelectionAction). Here the per-item itemMeta is available via extraMetaInfo.\n const getOwnerPropsArgumentsIcons = React.useCallback(\n (): DSShuttleV2T.ItemActionIconArguments => ({\n panelMetaInfo: itemMeta,\n extraMetaInfo: { itemMeta },\n }),\n [itemMeta],\n );\n\n // Clicking an action button (drilldown / move) must not bubble up to the row's onClick\n // (selectItem) / onMouseDown handlers \u2014 using an action should not toggle item selection.\n const stopPropagation = React.useCallback((event: React.SyntheticEvent) => {\n event.stopPropagation();\n }, []);\n\n return (\n <StyledItemActions\n cols={actionsCols}\n gutter=\"xxs\"\n pl=\"xs\"\n pr=\"xxs\"\n alignItems=\"center\"\n onClick={stopPropagation}\n onMouseDown={stopPropagation}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {withActions ? (\n <>\n <StyledItemActionWrapper getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <StyledButton\n buttonType=\"icon\"\n aria-label={drillDownAriaLabel}\n onClick={handleClickDrilldown}\n onKeyDown={handleKeyDownSelectionBubbleUp}\n size={BUTTON_SIZES.S}\n innerRef={innerRefHandlerDrilldown}\n tabIndex={-1} // We overwrite it via vanilla js on the focus manager\n disabled={internallyDisabledDrilldown || preventDrilldown === true || isDraggingThisItem}\n >\n <StyledDrilldownIcon\n width=\"1.538rem\"\n height=\"1.538rem\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n </StyledButton>\n </StyledItemActionWrapper>\n <StyledItemActionWrapper getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <StyledButton\n buttonType=\"icon\"\n aria-label={moveAriaLabel}\n onClick={handleClickSingleMove}\n onKeyDown={handleKeyDownSelectionBubbleUp}\n size={BUTTON_SIZES.S}\n innerRef={innerRefHandlerMove}\n tabIndex={-1} // We overwrite it via vanilla js on the focus manager\n disabled={internallyDisabledMove || hydratedPreventMove === true || isDraggingThisItem}\n {...(moveButtonProps && moveButtonProps({ itemMeta, isDestinationPanel }))}\n >\n {isDestinationPanel ? (\n <StyledCloseMediumIcon\n width=\"1.538rem\"\n height=\"1.538rem\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArgumentsIcons}\n />\n ) : (\n <StyledArrowShortRightIcon\n width=\"1.538rem\"\n height=\"1.538rem\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArgumentsIcons}\n />\n )}\n </StyledButton>\n </StyledItemActionWrapper>\n </>\n ) : (\n // this is a place-holder used for mantainting the grid spacing when item has no actions (so when item is soft-deleted)\n <>\n <div />\n <div />\n </>\n )}\n </StyledItemActions>\n );\n});\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC4Ff,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;AAAA,UAAC;AAAA;AAAA,YACC,YAAW;AAAA,YACX,cAAY;AAAA,YACZ,SAAS;AAAA,YACT,WAAW;AAAA,YACX,MAAM,aAAa;AAAA,YACnB,UAAU;AAAA,YACV,UAAU;AAAA,YACV,UAAU,0BAA0B,wBAAwB,QAAQ;AAAA,YACnE,GAAI,mBAAmB,gBAAgB,EAAE,UAAU,mBAAmB,CAAC;AAAA,YAEvE,+BACC;AAAA,cAAC;AAAA;AAAA,gBACC,OAAM;AAAA,gBACN,QAAO;AAAA,gBACP;AAAA,gBACA,wBAAwB;AAAA;AAAA,YAC1B,IAEA;AAAA,cAAC;AAAA;AAAA,gBACC,OAAM;AAAA,gBACN,QAAO;AAAA,gBACP;AAAA,gBACA,wBAAwB;AAAA;AAAA,YAC1B;AAAA;AAAA,QAEJ,GACF;AAAA,SACF;AAAA;AAAA,QAGA,iCACE;AAAA,8BAAC,SAAI;AAAA,UACL,oBAAC,SAAI;AAAA,WACP;AAAA;AAAA;AAAA,EAEJ;AAEJ,CAAC;",
6
6
  "names": ["React"]
7
7
  }
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import React2 from "react";
3
3
  import { useInternalStore } from "../../../config/useStore/index.js";
4
4
  import { REGIONS_FOCUSES, ACTIONS_FOCUSES } from "../../../constants/index.js";
5
- const useInnerRefHandlers = ({ datumInternalMeta, isDestinationPanel }) => {
5
+ const useInnerRefActionHandlers = ({ datumInternalMeta, isDestinationPanel }) => {
6
6
  const setZustandRef = useInternalStore((state) => state.setZustandRef);
7
7
  const currRegion = isDestinationPanel ? REGIONS_FOCUSES.DESTINATION_PANEL_ITEM : REGIONS_FOCUSES.SOURCE_PANEL_ITEM;
8
8
  const currItemId = datumInternalMeta.hydratedId;
@@ -34,6 +34,6 @@ const useInnerRefHandlers = ({ datumInternalMeta, isDestinationPanel }) => {
34
34
  );
35
35
  };
36
36
  export {
37
- useInnerRefHandlers
37
+ useInnerRefActionHandlers
38
38
  };
39
- //# sourceMappingURL=useInnerRefHandlers.js.map
39
+ //# sourceMappingURL=useInnerRefActionHandlers.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/Item/ItemActions/useInnerRefActionHandlers.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types.js';\nimport { useInternalStore } from '../../../config/useStore/index.js';\nimport { REGIONS_FOCUSES, ACTIONS_FOCUSES } from '../../../constants/index.js';\n\nexport const useInnerRefActionHandlers = ({ datumInternalMeta, isDestinationPanel }: DSShuttleV2T.ItemMeta) => {\n const setZustandRef = useInternalStore((state) => state.setZustandRef);\n const currRegion = isDestinationPanel ? REGIONS_FOCUSES.DESTINATION_PANEL_ITEM : REGIONS_FOCUSES.SOURCE_PANEL_ITEM;\n const currItemId = datumInternalMeta.hydratedId;\n const innerRefHandlerDrilldown = React.useCallback(\n (node: HTMLButtonElement) => {\n setZustandRef([currRegion, currItemId, ACTIONS_FOCUSES.DRILLDOWN_BTN], node);\n },\n [currItemId, currRegion, setZustandRef],\n );\n const innerRefHandlerMove = React.useCallback(\n (node: HTMLButtonElement) => {\n setZustandRef([currRegion, currItemId, ACTIONS_FOCUSES.MOVE_BTN], node);\n },\n [currItemId, currRegion, setZustandRef],\n );\n const innerRefHandlerDnd = React.useCallback(\n (node: HTMLDivElement | null) => {\n setZustandRef([currRegion, currItemId, ACTIONS_FOCUSES.DRAG_N_DROP], node);\n },\n [currItemId, currRegion, setZustandRef],\n );\n return React.useMemo(\n () => ({\n innerRefHandlerDnd,\n innerRefHandlerDrilldown,\n innerRefHandlerMove,\n }),\n [innerRefHandlerDrilldown, innerRefHandlerDnd, innerRefHandlerMove],\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAElB,SAAS,wBAAwB;AACjC,SAAS,iBAAiB,uBAAuB;AAE1C,MAAM,4BAA4B,CAAC,EAAE,mBAAmB,mBAAmB,MAA6B;AAC7G,QAAM,gBAAgB,iBAAiB,CAAC,UAAU,MAAM,aAAa;AACrE,QAAM,aAAa,qBAAqB,gBAAgB,yBAAyB,gBAAgB;AACjG,QAAM,aAAa,kBAAkB;AACrC,QAAM,2BAA2BA,OAAM;AAAA,IACrC,CAAC,SAA4B;AAC3B,oBAAc,CAAC,YAAY,YAAY,gBAAgB,aAAa,GAAG,IAAI;AAAA,IAC7E;AAAA,IACA,CAAC,YAAY,YAAY,aAAa;AAAA,EACxC;AACA,QAAM,sBAAsBA,OAAM;AAAA,IAChC,CAAC,SAA4B;AAC3B,oBAAc,CAAC,YAAY,YAAY,gBAAgB,QAAQ,GAAG,IAAI;AAAA,IACxE;AAAA,IACA,CAAC,YAAY,YAAY,aAAa;AAAA,EACxC;AACA,QAAM,qBAAqBA,OAAM;AAAA,IAC/B,CAAC,SAAgC;AAC/B,oBAAc,CAAC,YAAY,YAAY,gBAAgB,WAAW,GAAG,IAAI;AAAA,IAC3E;AAAA,IACA,CAAC,YAAY,YAAY,aAAa;AAAA,EACxC;AACA,SAAOA,OAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,0BAA0B,oBAAoB,mBAAmB;AAAA,EACpE;AACF;",
6
+ "names": ["React"]
7
+ }
@@ -0,0 +1,42 @@
1
+ import * as React from "react";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { DSControlledCheckbox } from "@elliemae/ds-form-checkbox";
4
+ import { styled } from "@elliemae/ds-system";
5
+ import React2 from "react";
6
+ import { usePropsStore } from "../../../config/useStore/useStore.js";
7
+ import { DSShuttleV2Name, DSShuttleV2Slots } from "../../../constants/index.js";
8
+ const StyledItemSelection = styled(DSControlledCheckbox, {
9
+ name: DSShuttleV2Name,
10
+ slot: DSShuttleV2Slots.ITEM_SELECTION_CHECKBOX_UI
11
+ })`
12
+ margin-left: xxs2;
13
+ margin-right: xxs;
14
+ `;
15
+ const noOp = () => {
16
+ };
17
+ const CheckboxSelectionUI = (props) => {
18
+ const { itemMeta } = props;
19
+ const {
20
+ datumInternalMeta,
21
+ datumRenderFlags: { selectionPrevented }
22
+ } = itemMeta;
23
+ const { isSelected } = datumInternalMeta;
24
+ const getOwnerProps = usePropsStore((store) => store.get);
25
+ const getOwnerPropsArguments = React2.useCallback(() => itemMeta, [itemMeta]);
26
+ return /* @__PURE__ */ jsx(
27
+ StyledItemSelection,
28
+ {
29
+ applyAriaDisabled: selectionPrevented,
30
+ getOwnerProps,
31
+ getOwnerPropsArguments,
32
+ "aria-hidden": "true",
33
+ tabIndex: -1,
34
+ checked: isSelected,
35
+ onChange: noOp
36
+ }
37
+ );
38
+ };
39
+ export {
40
+ CheckboxSelectionUI
41
+ };
42
+ //# sourceMappingURL=CheckboxSelectionUI.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/Item/ItemSelectionUi/CheckboxSelectionUI.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { DSControlledCheckbox } from '@elliemae/ds-form-checkbox';\nimport { styled } from '@elliemae/ds-system';\nimport React from 'react';\nimport { usePropsStore } from '../../../config/useStore/useStore.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../constants/index.js';\nimport type { SelectionUIProps } from './ItemSelectionUI.types.js';\n\nconst StyledItemSelection = styled(DSControlledCheckbox, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.ITEM_SELECTION_CHECKBOX_UI,\n})`\n margin-left: xxs2;\n margin-right: xxs;\n`;\nconst noOp = () => {};\n\nexport const CheckboxSelectionUI = (props: SelectionUIProps) => {\n const { itemMeta } = props;\n const {\n datumInternalMeta,\n datumRenderFlags: { selectionPrevented },\n } = itemMeta;\n const { isSelected } = datumInternalMeta;\n const getOwnerProps = usePropsStore((store) => store.get);\n const getOwnerPropsArguments = React.useCallback(() => itemMeta, [itemMeta]);\n\n return (\n <StyledItemSelection\n applyAriaDisabled={selectionPrevented}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n // the semantic is already conveyed by the wrapper's aria-checked and aria-disabled, so we hide this from assistive technologies to avoid redundancy\n // we are effectively treating this as a presentational element that only provides a visual cue, so it doesn't need to be announced on its own\n // this is also why we don't tab-index it and we don't onChange it directly, all of that is already handled by the wrapper.\n aria-hidden=\"true\"\n tabIndex={-1}\n checked={isSelected}\n onChange={noOp}\n />\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC2BnB;AA3BJ,SAAS,4BAA4B;AACrC,SAAS,cAAc;AACvB,OAAOA,YAAW;AAClB,SAAS,qBAAqB;AAC9B,SAAS,iBAAiB,wBAAwB;AAGlD,MAAM,sBAAsB,OAAO,sBAAsB;AAAA,EACvD,MAAM;AAAA,EACN,MAAM,iBAAiB;AACzB,CAAC;AAAA;AAAA;AAAA;AAID,MAAM,OAAO,MAAM;AAAC;AAEb,MAAM,sBAAsB,CAAC,UAA4B;AAC9D,QAAM,EAAE,SAAS,IAAI;AACrB,QAAM;AAAA,IACJ;AAAA,IACA,kBAAkB,EAAE,mBAAmB;AAAA,EACzC,IAAI;AACJ,QAAM,EAAE,WAAW,IAAI;AACvB,QAAM,gBAAgB,cAAc,CAAC,UAAU,MAAM,GAAG;AACxD,QAAM,yBAAyBA,OAAM,YAAY,MAAM,UAAU,CAAC,QAAQ,CAAC;AAE3E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,mBAAmB;AAAA,MACnB;AAAA,MACA;AAAA,MAIA,eAAY;AAAA,MACZ,UAAU;AAAA,MACV,SAAS;AAAA,MACT,UAAU;AAAA;AAAA,EACZ;AAEJ;",
6
+ "names": ["React"]
7
+ }
@@ -0,0 +1,53 @@
1
+ import * as React from "react";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { Grid } from "@elliemae/ds-grid";
4
+ import { styled } from "@elliemae/ds-system";
5
+ import React2 from "react";
6
+ import { usePropsStore } from "../../../config/useStore/useStore.js";
7
+ import { DSShuttleV2Name, DSShuttleV2Slots } from "../../../constants/index.js";
8
+ import { CheckboxSelectionUI } from "./CheckboxSelectionUI.js";
9
+ import { VerticalBarSelectionUI } from "./VerticalBarSelectionUI.js";
10
+ const ItemSelectionWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_CHECKBOX })`
11
+ height: 100%;
12
+ &:focus {
13
+ outline: none;
14
+ }
15
+ `;
16
+ const ItemSelectionUI = (props) => {
17
+ const { tooltipHelpers, itemInnerRefHandlers, itemMeta } = props;
18
+ const {
19
+ datumInternalMeta,
20
+ datumRenderFlags: { selectionPrevented }
21
+ } = itemMeta;
22
+ const { isSelected, hydratedId, softDeleted } = datumInternalMeta;
23
+ const { innerRefHandlerParentItem } = itemInnerRefHandlers;
24
+ const getOwnerProps = usePropsStore((store) => store.get);
25
+ const explicitSelectionUI = usePropsStore((store) => store.explicitSelectionUI);
26
+ const getOwnerPropsArguments = React2.useCallback(() => itemMeta, [itemMeta]);
27
+ const idItem = React2.useMemo(
28
+ () => `${hydratedId}-wrapper${softDeleted ? "-soft-deleted" : ""}`,
29
+ [hydratedId, softDeleted]
30
+ );
31
+ const shouldDisable = softDeleted || selectionPrevented;
32
+ return /* @__PURE__ */ jsx(
33
+ ItemSelectionWrapper,
34
+ {
35
+ role: "checkbox",
36
+ "aria-checked": isSelected,
37
+ onFocus: tooltipHelpers.onFocus,
38
+ onBlur: tooltipHelpers.onBlur,
39
+ "aria-labelledby": `${hydratedId}-text-section${softDeleted ? "-soft-deleted" : ""}`,
40
+ id: idItem,
41
+ innerRef: innerRefHandlerParentItem,
42
+ "aria-disabled": shouldDisable,
43
+ getOwnerProps,
44
+ getOwnerPropsArguments,
45
+ alignItems: "center",
46
+ children: explicitSelectionUI ? /* @__PURE__ */ jsx(CheckboxSelectionUI, { ...props }) : /* @__PURE__ */ jsx(VerticalBarSelectionUI, { ...props })
47
+ }
48
+ );
49
+ };
50
+ export {
51
+ ItemSelectionUI
52
+ };
53
+ //# sourceMappingURL=ItemSelectionUI.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/Item/ItemSelectionUi/ItemSelectionUI.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { Grid } from '@elliemae/ds-grid';\nimport { styled } from '@elliemae/ds-system';\nimport React from 'react';\nimport { usePropsStore } from '../../../config/useStore/useStore.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../constants/index.js';\nimport { CheckboxSelectionUI } from './CheckboxSelectionUI.js';\nimport type { SelectionUIProps } from './ItemSelectionUI.types.js';\nimport { VerticalBarSelectionUI } from './VerticalBarSelectionUI.js';\n\nconst ItemSelectionWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_CHECKBOX })`\n height: 100%;\n &:focus {\n outline: none;\n }\n`;\n\nexport const ItemSelectionUI = (props: SelectionUIProps) => {\n const { tooltipHelpers, itemInnerRefHandlers, itemMeta } = props;\n const {\n datumInternalMeta,\n datumRenderFlags: { selectionPrevented },\n } = itemMeta;\n const { isSelected, hydratedId, softDeleted } = datumInternalMeta;\n const { innerRefHandlerParentItem } = itemInnerRefHandlers;\n const getOwnerProps = usePropsStore((store) => store.get);\n const explicitSelectionUI = usePropsStore((store) => store.explicitSelectionUI);\n const getOwnerPropsArguments = React.useCallback(() => itemMeta, [itemMeta]);\n const idItem = React.useMemo(\n () => `${hydratedId}-wrapper${softDeleted ? '-soft-deleted' : ''}`,\n [hydratedId, softDeleted],\n );\n const shouldDisable = softDeleted || selectionPrevented;\n return (\n <ItemSelectionWrapper\n role=\"checkbox\"\n aria-checked={isSelected}\n onFocus={tooltipHelpers.onFocus}\n onBlur={tooltipHelpers.onBlur}\n aria-labelledby={`${hydratedId}-text-section${softDeleted ? '-soft-deleted' : ''}`}\n id={idItem}\n innerRef={innerRefHandlerParentItem}\n aria-disabled={shouldDisable}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n alignItems=\"center\"\n >\n {explicitSelectionUI ? <CheckboxSelectionUI {...props} /> : <VerticalBarSelectionUI {...props} />}\n </ItemSelectionWrapper>\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC8CM;AA9C7B,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,OAAOA,YAAW;AAClB,SAAS,qBAAqB;AAC9B,SAAS,iBAAiB,wBAAwB;AAClD,SAAS,2BAA2B;AAEpC,SAAS,8BAA8B;AAEvC,MAAM,uBAAuB,OAAO,MAAM,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,cAAc,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAOlG,MAAM,kBAAkB,CAAC,UAA4B;AAC1D,QAAM,EAAE,gBAAgB,sBAAsB,SAAS,IAAI;AAC3D,QAAM;AAAA,IACJ;AAAA,IACA,kBAAkB,EAAE,mBAAmB;AAAA,EACzC,IAAI;AACJ,QAAM,EAAE,YAAY,YAAY,YAAY,IAAI;AAChD,QAAM,EAAE,0BAA0B,IAAI;AACtC,QAAM,gBAAgB,cAAc,CAAC,UAAU,MAAM,GAAG;AACxD,QAAM,sBAAsB,cAAc,CAAC,UAAU,MAAM,mBAAmB;AAC9E,QAAM,yBAAyBA,OAAM,YAAY,MAAM,UAAU,CAAC,QAAQ,CAAC;AAC3E,QAAM,SAASA,OAAM;AAAA,IACnB,MAAM,GAAG,UAAU,WAAW,cAAc,kBAAkB,EAAE;AAAA,IAChE,CAAC,YAAY,WAAW;AAAA,EAC1B;AACA,QAAM,gBAAgB,eAAe;AACrC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,gBAAc;AAAA,MACd,SAAS,eAAe;AAAA,MACxB,QAAQ,eAAe;AAAA,MACvB,mBAAiB,GAAG,UAAU,gBAAgB,cAAc,kBAAkB,EAAE;AAAA,MAChF,IAAI;AAAA,MACJ,UAAU;AAAA,MACV,iBAAe;AAAA,MACf;AAAA,MACA;AAAA,MACA,YAAW;AAAA,MAEV,gCAAsB,oBAAC,uBAAqB,GAAG,OAAO,IAAK,oBAAC,0BAAwB,GAAG,OAAO;AAAA;AAAA,EACjG;AAEJ;",
6
+ "names": ["React"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import * as React from "react";
2
+ //# sourceMappingURL=ItemSelectionUI.types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;",
6
+ "names": []
7
+ }
@@ -1,22 +1,23 @@
1
1
  import * as React from "react";
2
2
  import { jsx } from "react/jsx-runtime";
3
- import React2 from "react";
4
- import { styled } from "@elliemae/ds-system";
5
3
  import { Grid } from "@elliemae/ds-grid";
6
- import { DSShuttleV2Name, DSShuttleV2Slots, ITEM_SELECTION_WIDTH } from "../../constants/index.js";
7
- import { usePropsStore } from "../../config/useStore/useStore.js";
4
+ import { styled } from "@elliemae/ds-system";
5
+ import React2 from "react";
6
+ import { usePropsStore } from "../../../config/useStore/useStore.js";
7
+ import { DSShuttleV2Name, DSShuttleV2Slots } from "../../../constants/index.js";
8
8
  const StyledItemSelection = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_SELECTION })`
9
- width: ${ITEM_SELECTION_WIDTH}px;
9
+ width: 5px;
10
10
  height: 100%;
11
11
  box-sizing: border-box;
12
12
  pointer-events: none;
13
13
  background-color: ${(props) => {
14
- if (props.$isSelected) return props.theme.colors.brand[700];
14
+ if (props.$isSelected) return props.theme.colors.brand[800];
15
15
  if (props.$selectionPrevented === true) return props.theme.colors.neutral["080"];
16
16
  return props.theme.colors.brand[300];
17
17
  }};
18
18
  `;
19
- const ItemSelection = React2.memo((itemMeta) => {
19
+ const VerticalBarSelectionUI = (props) => {
20
+ const { itemMeta } = props;
20
21
  const {
21
22
  datumInternalMeta: { isSelected },
22
23
  datumRenderFlags: { selectionPrevented }
@@ -32,8 +33,8 @@ const ItemSelection = React2.memo((itemMeta) => {
32
33
  getOwnerPropsArguments
33
34
  }
34
35
  );
35
- });
36
+ };
36
37
  export {
37
- ItemSelection
38
+ VerticalBarSelectionUI
38
39
  };
39
- //# sourceMappingURL=ItemSelection.js.map
40
+ //# sourceMappingURL=VerticalBarSelectionUI.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/Item/ItemSelectionUi/VerticalBarSelectionUI.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { Grid } from '@elliemae/ds-grid';\nimport { styled } from '@elliemae/ds-system';\nimport React from 'react';\nimport { usePropsStore } from '../../../config/useStore/useStore.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../constants/index.js';\nimport type { SelectionUIProps } from './ItemSelectionUI.types.js';\n\nconst StyledItemSelection = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_SELECTION })<{\n $isSelected: boolean;\n $selectionPrevented?: boolean;\n}>`\n width: 5px;\n height: 100%;\n box-sizing: border-box;\n pointer-events: none;\n background-color: ${(props) => {\n // brand[800] (not brand[700]) so selected vs unselected (brand[300]) meets the\n // WCAG 1.4.1 3:1 contrast exception (3.75:1) \u2014 the lightness delta is the non-color cue. PUI-15539\n if (props.$isSelected) return props.theme.colors.brand[800];\n if (props.$selectionPrevented === true) return props.theme.colors.neutral['080'];\n return props.theme.colors.brand[300];\n }};\n`;\n\nexport const VerticalBarSelectionUI = (props: SelectionUIProps) => {\n const { itemMeta } = props;\n const {\n datumInternalMeta: { isSelected },\n datumRenderFlags: { selectionPrevented },\n } = itemMeta;\n const getOwnerProps = usePropsStore((store) => store.get);\n const getOwnerPropsArguments = React.useCallback(() => itemMeta, [itemMeta]);\n\n return (\n <StyledItemSelection\n $isSelected={isSelected}\n $selectionPrevented={selectionPrevented}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACkCnB;AAlCJ,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,OAAOA,YAAW;AAClB,SAAS,qBAAqB;AAC9B,SAAS,iBAAiB,wBAAwB;AAGlD,MAAM,sBAAsB,OAAO,MAAM,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,eAAe,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,sBAQnF,CAAC,UAAU;AAG7B,MAAI,MAAM,YAAa,QAAO,MAAM,MAAM,OAAO,MAAM,GAAG;AAC1D,MAAI,MAAM,wBAAwB,KAAM,QAAO,MAAM,MAAM,OAAO,QAAQ,KAAK;AAC/E,SAAO,MAAM,MAAM,OAAO,MAAM,GAAG;AACrC,CAAC;AAAA;AAGI,MAAM,yBAAyB,CAAC,UAA4B;AACjE,QAAM,EAAE,SAAS,IAAI;AACrB,QAAM;AAAA,IACJ,mBAAmB,EAAE,WAAW;AAAA,IAChC,kBAAkB,EAAE,mBAAmB;AAAA,EACzC,IAAI;AACJ,QAAM,gBAAgB,cAAc,CAAC,UAAU,MAAM,GAAG;AACxD,QAAM,yBAAyBA,OAAM,YAAY,MAAM,UAAU,CAAC,QAAQ,CAAC;AAE3E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAa;AAAA,MACb,qBAAqB;AAAA,MACrB;AAAA,MACA;AAAA;AAAA,EACF;AAEJ;",
6
+ "names": ["React"]
7
+ }
@@ -0,0 +1,43 @@
1
+ import * as React from "react";
2
+ import React2, { useEffect } from "react";
3
+ import { useInternalStore, usePropsStore } from "../../config/useStore/index.js";
4
+ import { REGIONS_FOCUSES } from "../../constants/index.js";
5
+ import { useThisItemIsFocused } from "./useThisItemIsFocused.js";
6
+ const useItemInnerRefHandlers = (itemMeta) => {
7
+ const { datumInternalMeta, isDestinationPanel } = itemMeta;
8
+ const { hydratedId } = datumInternalMeta;
9
+ const setZustandRef = useInternalStore((state) => state.setZustandRef);
10
+ const setDeferFocusUntilFirstRender = useInternalStore((state) => state.setDeferFocusUntilFirstRender);
11
+ const deferedAfterFirstRender = useInternalStore((state) => state.getDeferFocusUntilFirstRender());
12
+ const isLoadingMore = usePropsStore(
13
+ (state) => isDestinationPanel ? state.destinationIsLoadingMore : state.sourceIsLoadingMore
14
+ );
15
+ const thisItemIsFocused = useThisItemIsFocused(itemMeta);
16
+ const currRegion = isDestinationPanel ? REGIONS_FOCUSES.DESTINATION_PANEL_ITEM : REGIONS_FOCUSES.SOURCE_PANEL_ITEM;
17
+ const currItemId = hydratedId;
18
+ const innerRefHandlerParentItem = React2.useCallback(
19
+ (node) => {
20
+ setZustandRef([currRegion, currItemId, "parent"], node);
21
+ if (deferedAfterFirstRender && thisItemIsFocused && node) {
22
+ setDeferFocusUntilFirstRender(false);
23
+ if (node.tabIndex === -1) node.tabIndex = 0;
24
+ node.focus();
25
+ }
26
+ },
27
+ [setZustandRef, currRegion, currItemId, thisItemIsFocused, deferedAfterFirstRender, setDeferFocusUntilFirstRender]
28
+ );
29
+ useEffect(
30
+ () => () => {
31
+ if (isLoadingMore) setDeferFocusUntilFirstRender(true);
32
+ },
33
+ [isLoadingMore, setDeferFocusUntilFirstRender]
34
+ );
35
+ return React2.useMemo(
36
+ () => ({ innerRefHandlerParentItem, thisItemIsFocused }),
37
+ [innerRefHandlerParentItem, thisItemIsFocused]
38
+ );
39
+ };
40
+ export {
41
+ useItemInnerRefHandlers
42
+ };
43
+ //# sourceMappingURL=useItemInnerRefHandlers.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/Item/useItemInnerRefHandlers.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useEffect } from 'react';\nimport { useInternalStore, usePropsStore } from '../../config/useStore/index.js';\nimport { REGIONS_FOCUSES } from '../../constants/index.js';\nimport type { DSShuttleV2T } from '../../react-desc-prop-types.js';\nimport { useThisItemIsFocused } from './useThisItemIsFocused.js';\n\nexport const useItemInnerRefHandlers = (itemMeta: DSShuttleV2T.ItemMeta) => {\n const { datumInternalMeta, isDestinationPanel } = itemMeta;\n const { hydratedId } = datumInternalMeta;\n const setZustandRef = useInternalStore((state) => state.setZustandRef);\n\n const setDeferFocusUntilFirstRender = useInternalStore((state) => state.setDeferFocusUntilFirstRender);\n const deferedAfterFirstRender = useInternalStore((state) => state.getDeferFocusUntilFirstRender());\n const isLoadingMore = usePropsStore((state) =>\n isDestinationPanel ? state.destinationIsLoadingMore : state.sourceIsLoadingMore,\n );\n\n const thisItemIsFocused = useThisItemIsFocused(itemMeta);\n\n const currRegion = isDestinationPanel ? REGIONS_FOCUSES.DESTINATION_PANEL_ITEM : REGIONS_FOCUSES.SOURCE_PANEL_ITEM;\n const currItemId = hydratedId;\n\n const innerRefHandlerParentItem = React.useCallback(\n (node: HTMLDivElement | null) => {\n setZustandRef([currRegion, currItemId, 'parent'], node);\n if (deferedAfterFirstRender && thisItemIsFocused && node) {\n setDeferFocusUntilFirstRender(false);\n if (node.tabIndex === -1) node.tabIndex = 0;\n node.focus();\n }\n },\n [setZustandRef, currRegion, currItemId, thisItemIsFocused, deferedAfterFirstRender, setDeferFocusUntilFirstRender],\n );\n\n useEffect(\n () => () => {\n if (isLoadingMore) setDeferFocusUntilFirstRender(true);\n },\n [isLoadingMore, setDeferFocusUntilFirstRender],\n );\n\n return React.useMemo(\n () => ({ innerRefHandlerParentItem, thisItemIsFocused }),\n [innerRefHandlerParentItem, thisItemIsFocused],\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,UAAS,iBAAiB;AACjC,SAAS,kBAAkB,qBAAqB;AAChD,SAAS,uBAAuB;AAEhC,SAAS,4BAA4B;AAE9B,MAAM,0BAA0B,CAAC,aAAoC;AAC1E,QAAM,EAAE,mBAAmB,mBAAmB,IAAI;AAClD,QAAM,EAAE,WAAW,IAAI;AACvB,QAAM,gBAAgB,iBAAiB,CAAC,UAAU,MAAM,aAAa;AAErE,QAAM,gCAAgC,iBAAiB,CAAC,UAAU,MAAM,6BAA6B;AACrG,QAAM,0BAA0B,iBAAiB,CAAC,UAAU,MAAM,8BAA8B,CAAC;AACjG,QAAM,gBAAgB;AAAA,IAAc,CAAC,UACnC,qBAAqB,MAAM,2BAA2B,MAAM;AAAA,EAC9D;AAEA,QAAM,oBAAoB,qBAAqB,QAAQ;AAEvD,QAAM,aAAa,qBAAqB,gBAAgB,yBAAyB,gBAAgB;AACjG,QAAM,aAAa;AAEnB,QAAM,4BAA4BA,OAAM;AAAA,IACtC,CAAC,SAAgC;AAC/B,oBAAc,CAAC,YAAY,YAAY,QAAQ,GAAG,IAAI;AACtD,UAAI,2BAA2B,qBAAqB,MAAM;AACxD,sCAA8B,KAAK;AACnC,YAAI,KAAK,aAAa,GAAI,MAAK,WAAW;AAC1C,aAAK,MAAM;AAAA,MACb;AAAA,IACF;AAAA,IACA,CAAC,eAAe,YAAY,YAAY,mBAAmB,yBAAyB,6BAA6B;AAAA,EACnH;AAEA;AAAA,IACE,MAAM,MAAM;AACV,UAAI,cAAe,+BAA8B,IAAI;AAAA,IACvD;AAAA,IACA,CAAC,eAAe,6BAA6B;AAAA,EAC/C;AAEA,SAAOA,OAAM;AAAA,IACX,OAAO,EAAE,2BAA2B,kBAAkB;AAAA,IACtD,CAAC,2BAA2B,iBAAiB;AAAA,EAC/C;AACF;",
6
+ "names": ["React"]
7
+ }
@@ -4,7 +4,7 @@ import React2 from "react";
4
4
  import { styled } from "@elliemae/ds-system";
5
5
  import { DSButtonV2, BUTTON_SIZES } from "@elliemae/ds-button-v2";
6
6
  import { usePropsStore } from "../../../config/useStore/index.js";
7
- import { useInnerRefHandlers } from "./useInnerRefHandlers.js";
7
+ import { useLoadMoreBtnInnerRefHandlers } from "./useLoadMoreBtnInnerRefHandlers.js";
8
8
  import { useFocusTracker } from "../../../config/useFocusTracker/index.js";
9
9
  import { DSShuttleV2Name, DSShuttleV2Slots } from "../../../constants/index.js";
10
10
  const StyledLoadMoreBtn = styled(DSButtonV2, {
@@ -53,7 +53,7 @@ const LoadMoreBtn = (panelMetaInfo) => {
53
53
  trackFocusRegionPanelItem
54
54
  ]
55
55
  );
56
- const { innerRefHandlerLoadMoreBtn } = useInnerRefHandlers(panelMetaInfo);
56
+ const { innerRefHandlerLoadMoreBtn } = useLoadMoreBtnInnerRefHandlers(panelMetaInfo);
57
57
  const getOwnerProps = usePropsStore((store) => store.get);
58
58
  const getOwnerPropsArguments = React2.useCallback(() => panelMetaInfo, [panelMetaInfo]);
59
59
  return /* @__PURE__ */ jsx(