@elliemae/ds-shuttle-v2 3.70.0-next.4 → 3.70.0-next.40
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.
- package/dist/cjs/DSShuttleV2.js.map +2 -2
- package/dist/cjs/config/useAutoCalculated/index.js.map +2 -2
- package/dist/cjs/config/useAutoCalculated/useDataStructure.js.map +2 -2
- package/dist/cjs/config/useStore/useStore.js.map +1 -1
- package/dist/cjs/config/useValidateProps.js.map +2 -2
- package/dist/cjs/constants/index.js +3 -1
- package/dist/cjs/constants/index.js.map +2 -2
- package/dist/cjs/exported-related/ShuttleItem.js +27 -3
- package/dist/cjs/exported-related/ShuttleItem.js.map +2 -2
- package/dist/cjs/parts/Dnd/DndHandle.js +47 -21
- package/dist/cjs/parts/Dnd/DndHandle.js.map +2 -2
- package/dist/cjs/parts/Dnd/DragOverlay.js +1 -1
- package/dist/cjs/parts/Dnd/DragOverlay.js.map +2 -2
- package/dist/cjs/parts/HoC/withConditionalDnDRowContext.js +16 -14
- package/dist/cjs/parts/HoC/withConditionalDnDRowContext.js.map +2 -2
- package/dist/cjs/parts/Item/Item.js +29 -68
- package/dist/cjs/parts/Item/Item.js.map +3 -3
- package/dist/cjs/parts/Item/ItemActions/ItemActions.js +19 -5
- package/dist/cjs/parts/Item/ItemActions/ItemActions.js.map +2 -2
- package/dist/cjs/parts/Item/ItemActions/{useInnerRefHandlers.js → useInnerRefActionHandlers.js} +6 -6
- package/dist/cjs/parts/Item/ItemActions/useInnerRefActionHandlers.js.map +7 -0
- package/dist/cjs/parts/Item/ItemMiddleSection.js +1 -0
- package/dist/cjs/parts/Item/ItemMiddleSection.js.map +2 -2
- package/dist/cjs/parts/Item/ItemSelectionUi/CheckboxSelectionUI.js +72 -0
- package/dist/cjs/parts/Item/ItemSelectionUi/CheckboxSelectionUI.js.map +7 -0
- package/dist/cjs/parts/Item/ItemSelectionUi/ItemSelectionUI.js +83 -0
- package/dist/cjs/parts/Item/ItemSelectionUi/ItemSelectionUI.js.map +7 -0
- package/dist/cjs/parts/{HoC/withConditionalUseSortable.js → Item/ItemSelectionUi/ItemSelectionUI.types.js} +3 -18
- package/dist/cjs/parts/Item/ItemSelectionUi/ItemSelectionUI.types.js.map +7 -0
- package/dist/cjs/parts/Item/{ItemSelection.js → ItemSelectionUi/VerticalBarSelectionUI.js} +14 -12
- package/dist/cjs/parts/Item/ItemSelectionUi/VerticalBarSelectionUI.js.map +7 -0
- package/dist/cjs/parts/Item/useItemInnerRefHandlers.js +73 -0
- package/dist/cjs/parts/Item/useItemInnerRefHandlers.js.map +7 -0
- package/dist/cjs/parts/Panel/bottom/LoadMoreBtn.js +2 -2
- package/dist/cjs/parts/Panel/bottom/LoadMoreBtn.js.map +2 -2
- package/dist/cjs/parts/Panel/bottom/{useInnerRefHandlers.js → useLoadMoreBtnInnerRefHandlers.js} +6 -6
- package/dist/cjs/parts/Panel/bottom/useLoadMoreBtnInnerRefHandlers.js.map +7 -0
- package/dist/cjs/parts/Panel/middle/MultipleSelectionAction.js +65 -33
- package/dist/cjs/parts/Panel/middle/MultipleSelectionAction.js.map +2 -2
- package/dist/cjs/parts/Panel/middle/PanelContentMiddleSection.js +2 -2
- package/dist/cjs/parts/Panel/middle/PanelContentMiddleSection.js.map +2 -2
- package/dist/cjs/parts/Panel/top/SelectionHeader.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +8 -4
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/typescript-testing/slot-props.js +181 -0
- package/dist/cjs/typescript-testing/slot-props.js.map +7 -0
- package/dist/cjs/typescript-testing/typescript-shuttle-v2-valid-with-datum.js +159 -0
- package/dist/cjs/typescript-testing/typescript-shuttle-v2-valid-with-datum.js.map +7 -0
- package/dist/cjs/typescript-testing/typescript-shuttle-v2-valid.js +0 -1
- package/dist/cjs/typescript-testing/typescript-shuttle-v2-valid.js.map +2 -2
- package/dist/esm/DSShuttleV2.js.map +2 -2
- package/dist/esm/config/useAutoCalculated/index.js.map +2 -2
- package/dist/esm/config/useAutoCalculated/useDataStructure.js.map +2 -2
- package/dist/esm/config/useStore/useStore.js.map +1 -1
- package/dist/esm/config/useValidateProps.js.map +2 -2
- package/dist/esm/constants/index.js +3 -1
- package/dist/esm/constants/index.js.map +2 -2
- package/dist/esm/exported-related/ShuttleItem.js +28 -4
- package/dist/esm/exported-related/ShuttleItem.js.map +2 -2
- package/dist/esm/parts/Dnd/DndHandle.js +48 -22
- package/dist/esm/parts/Dnd/DndHandle.js.map +2 -2
- package/dist/esm/parts/Dnd/DragOverlay.js +1 -1
- package/dist/esm/parts/Dnd/DragOverlay.js.map +2 -2
- package/dist/esm/parts/HoC/withConditionalDnDRowContext.js +16 -14
- package/dist/esm/parts/HoC/withConditionalDnDRowContext.js.map +2 -2
- package/dist/esm/parts/Item/Item.js +30 -69
- package/dist/esm/parts/Item/Item.js.map +2 -2
- package/dist/esm/parts/Item/ItemActions/ItemActions.js +19 -5
- package/dist/esm/parts/Item/ItemActions/ItemActions.js.map +2 -2
- package/dist/esm/parts/Item/ItemActions/{useInnerRefHandlers.js → useInnerRefActionHandlers.js} +3 -3
- package/dist/esm/parts/Item/ItemActions/useInnerRefActionHandlers.js.map +7 -0
- package/dist/esm/parts/Item/ItemMiddleSection.js +1 -0
- package/dist/esm/parts/Item/ItemMiddleSection.js.map +2 -2
- package/dist/esm/parts/Item/ItemSelectionUi/CheckboxSelectionUI.js +42 -0
- package/dist/esm/parts/Item/ItemSelectionUi/CheckboxSelectionUI.js.map +7 -0
- package/dist/esm/parts/Item/ItemSelectionUi/ItemSelectionUI.js +53 -0
- package/dist/esm/parts/Item/ItemSelectionUi/ItemSelectionUI.js.map +7 -0
- package/dist/esm/parts/Item/ItemSelectionUi/ItemSelectionUI.types.js +2 -0
- package/dist/esm/parts/Item/ItemSelectionUi/ItemSelectionUI.types.js.map +7 -0
- package/dist/esm/parts/Item/{ItemSelection.js → ItemSelectionUi/VerticalBarSelectionUI.js} +11 -9
- package/dist/esm/parts/Item/ItemSelectionUi/VerticalBarSelectionUI.js.map +7 -0
- package/dist/esm/parts/Item/useItemInnerRefHandlers.js +43 -0
- package/dist/esm/parts/Item/useItemInnerRefHandlers.js.map +7 -0
- package/dist/esm/parts/Panel/bottom/LoadMoreBtn.js +2 -2
- package/dist/esm/parts/Panel/bottom/LoadMoreBtn.js.map +2 -2
- package/dist/esm/parts/Panel/bottom/{useInnerRefHandlers.js → useLoadMoreBtnInnerRefHandlers.js} +3 -3
- package/dist/esm/parts/Panel/bottom/useLoadMoreBtnInnerRefHandlers.js.map +7 -0
- package/dist/esm/parts/Panel/middle/MultipleSelectionAction.js +66 -34
- package/dist/esm/parts/Panel/middle/MultipleSelectionAction.js.map +2 -2
- package/dist/esm/parts/Panel/middle/PanelContentMiddleSection.js +2 -2
- package/dist/esm/parts/Panel/middle/PanelContentMiddleSection.js.map +2 -2
- package/dist/esm/parts/Panel/top/SelectionHeader.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js +8 -4
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/typescript-testing/slot-props.js +158 -0
- package/dist/esm/typescript-testing/slot-props.js.map +7 -0
- package/dist/esm/typescript-testing/typescript-shuttle-v2-valid-with-datum.js +136 -0
- package/dist/esm/typescript-testing/typescript-shuttle-v2-valid-with-datum.js.map +7 -0
- package/dist/esm/typescript-testing/typescript-shuttle-v2-valid.js +0 -1
- package/dist/esm/typescript-testing/typescript-shuttle-v2-valid.js.map +2 -2
- package/dist/types/DSShuttleV2.d.ts +2 -2
- package/dist/types/config/useAutoCalculated/index.d.ts +7 -7
- package/dist/types/config/useAutoCalculated/useDataStructure.d.ts +7 -7
- package/dist/types/config/useStore/useStore.d.ts +64 -64
- package/dist/types/config/useValidateProps.d.ts +1 -1
- package/dist/types/constants/index.d.ts +6 -2
- package/dist/types/parts/Dnd/DndHandle.d.ts +3 -10
- package/dist/types/parts/Item/Item.d.ts +1 -5
- package/dist/types/parts/Item/ItemActions/{useInnerRefHandlers.d.ts → useInnerRefActionHandlers.d.ts} +1 -1
- package/dist/types/parts/Item/ItemSelectionUi/CheckboxSelectionUI.d.ts +2 -0
- package/dist/types/parts/Item/ItemSelectionUi/ItemSelectionUI.d.ts +2 -0
- package/dist/types/parts/Item/ItemSelectionUi/ItemSelectionUI.types.d.ts +11 -0
- package/dist/types/parts/Item/ItemSelectionUi/VerticalBarSelectionUI.d.ts +2 -0
- package/dist/types/parts/Item/useItemInnerRefHandlers.d.ts +5 -0
- package/dist/types/parts/Panel/bottom/{useInnerRefHandlers.d.ts → useLoadMoreBtnInnerRefHandlers.d.ts} +1 -1
- package/dist/types/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.d.ts +2 -2
- package/dist/types/react-desc-prop-types.d.ts +111 -57
- package/package.json +25 -25
- package/dist/cjs/parts/HoC/withConditionalUseSortable.js.map +0 -7
- package/dist/cjs/parts/Item/ItemActions/useInnerRefHandlers.js.map +0 -7
- package/dist/cjs/parts/Item/ItemSelection.js.map +0 -7
- package/dist/cjs/parts/Panel/bottom/useInnerRefHandlers.js.map +0 -7
- package/dist/esm/parts/HoC/withConditionalUseSortable.js +0 -13
- package/dist/esm/parts/HoC/withConditionalUseSortable.js.map +0 -7
- package/dist/esm/parts/Item/ItemActions/useInnerRefHandlers.js.map +0 -7
- package/dist/esm/parts/Item/ItemSelection.js.map +0 -7
- package/dist/esm/parts/Panel/bottom/useInnerRefHandlers.js.map +0 -7
- package/dist/types/parts/HoC/withConditionalUseSortable.d.ts +0 -9
- package/dist/types/parts/Item/ItemSelection.d.ts +0 -3
- package/dist/types/tests/DSShuttlev2.PUI-16059.test.d.ts +0 -1
- package/dist/types/tests/configs/ControlledTestRender.d.ts +0 -1
- package/dist/types/tests/configs/basic.d.ts +0 -24
- package/dist/types/tests/configs/breadcrumb.d.ts +0 -1
- package/dist/types/tests/configs/dnd.d.ts +0 -1
- package/dist/types/tests/configs/filter.d.ts +0 -30
- package/dist/types/tests/configs/loadMore.d.ts +0 -28
- package/dist/types/tests/configs/soft-delete.d.ts +0 -1
- package/dist/types/tests/loadMore/ShuttleV2WithLoadMoreTestable.d.ts +0 -2
- package/dist/types/tests/loadMore/shuttle-v2.load-more.focus.test.d.ts +0 -1
- package/dist/types/tests/loadMore/shuttle-v2.load-more.test.d.ts +0 -1
- package/dist/types/tests/shuttle-v2.a11y.test.d.ts +0 -1
- package/dist/types/tests/shuttle-v2.data-testid.test.d.ts +0 -1
- package/dist/types/tests/shuttle-v2.dnd.test.d.ts +0 -1
- package/dist/types/tests/shuttle-v2.events.test.d.ts +0 -1
- package/dist/types/tests/shuttle-v2.exports.test.d.ts +0 -1
- package/dist/types/tests/shuttle-v2.get-owner-props.test.d.ts +0 -1
- package/dist/types/tests/shuttle-v2.keyboard.test.d.ts +0 -1
- package/dist/types/tests/shuttle-v2.soft-delete.test.d.ts +0 -1
- package/dist/types/typescript-testing/typescript-shuttle-v2-valid.d.ts +0 -1
|
@@ -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
|
+
}
|
|
@@ -1,21 +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 {
|
|
7
|
-
import
|
|
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
9
|
width: 5px;
|
|
10
10
|
height: 100%;
|
|
11
11
|
box-sizing: border-box;
|
|
12
|
+
pointer-events: none;
|
|
12
13
|
background-color: ${(props) => {
|
|
13
|
-
if (props.$isSelected) return props.theme.colors.brand[
|
|
14
|
+
if (props.$isSelected) return props.theme.colors.brand[800];
|
|
14
15
|
if (props.$selectionPrevented === true) return props.theme.colors.neutral["080"];
|
|
15
16
|
return props.theme.colors.brand[300];
|
|
16
17
|
}};
|
|
17
18
|
`;
|
|
18
|
-
const
|
|
19
|
+
const VerticalBarSelectionUI = (props) => {
|
|
20
|
+
const { itemMeta } = props;
|
|
19
21
|
const {
|
|
20
22
|
datumInternalMeta: { isSelected },
|
|
21
23
|
datumRenderFlags: { selectionPrevented }
|
|
@@ -31,8 +33,8 @@ const ItemSelection = React2.memo((itemMeta) => {
|
|
|
31
33
|
getOwnerPropsArguments
|
|
32
34
|
}
|
|
33
35
|
);
|
|
34
|
-
}
|
|
36
|
+
};
|
|
35
37
|
export {
|
|
36
|
-
|
|
38
|
+
VerticalBarSelectionUI
|
|
37
39
|
};
|
|
38
|
-
//# sourceMappingURL=
|
|
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 {
|
|
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 } =
|
|
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(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/Panel/bottom/LoadMoreBtn.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { DSButtonV2, BUTTON_SIZES, type DSButtonT } from '@elliemae/ds-button-v2';\nimport { usePropsStore } from '../../../config/useStore/index.js';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types.js';\nimport {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;AC6DnB;AA7DJ,OAAOA,YAAW;AAClB,SAAS,cAAc;AACvB,SAAS,YAAY,oBAAoC;AACzD,SAAS,qBAAqB;AAE9B,SAAS,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { DSButtonV2, BUTTON_SIZES, type DSButtonT } from '@elliemae/ds-button-v2';\nimport { usePropsStore } from '../../../config/useStore/index.js';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types.js';\nimport { useLoadMoreBtnInnerRefHandlers } from './useLoadMoreBtnInnerRefHandlers.js';\nimport { useFocusTracker } from '../../../config/useFocusTracker/index.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../constants/index.js';\n\nconst StyledLoadMoreBtn = styled(DSButtonV2, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.LIST_BOTTOM_LOAD_MORE_BTN,\n})`\n width: 100%;\n height: 100%;\n`;\n\nexport const LoadMoreBtn = (panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => {\n const { isDestinationPanel = false } = panelMetaInfo;\n const {\n getCanFocusLastItem,\n trackFocusItemLast,\n trackFocusActionParent,\n trackFocusRegionPanelItem,\n trackFocusRegionPanel,\n trackFocusItemReset,\n trackFocusActionReset,\n } = useFocusTracker();\n const onLoadMore = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationLoadMore : state.onSourceLoadMore,\n );\n const handleOnClick = React.useCallback(\n (e: Parameters<Required<DSButtonT.Props>['onClick']>[0]) => {\n onLoadMore(e);\n if (getCanFocusLastItem(panelMetaInfo)) {\n trackFocusItemLast(panelMetaInfo);\n trackFocusRegionPanelItem(panelMetaInfo.isDestinationPanel);\n trackFocusActionParent();\n } else {\n trackFocusItemReset();\n trackFocusActionReset();\n trackFocusRegionPanel(panelMetaInfo.isDestinationPanel);\n }\n },\n [\n getCanFocusLastItem,\n onLoadMore,\n panelMetaInfo,\n trackFocusActionParent,\n trackFocusActionReset,\n trackFocusItemLast,\n trackFocusItemReset,\n trackFocusRegionPanel,\n trackFocusRegionPanelItem,\n ],\n );\n const { innerRefHandlerLoadMoreBtn } = useLoadMoreBtnInnerRefHandlers(panelMetaInfo);\n const getOwnerProps = usePropsStore((store) => store.get);\n const getOwnerPropsArguments = React.useCallback(() => panelMetaInfo, [panelMetaInfo]);\n\n return (\n <StyledLoadMoreBtn\n buttonType=\"text\"\n onClick={handleOnClick}\n size={BUTTON_SIZES.S}\n innerRef={innerRefHandlerLoadMoreBtn}\n // aria-label set for default, can be overridden via getOwnerProps\n aria-label={isDestinationPanel ? 'Load more items in destination panel' : 'Load more items in source panel'}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n Load More...\n </StyledLoadMoreBtn>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC6DnB;AA7DJ,OAAOA,YAAW;AAClB,S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,MACD;AAAA;AAAA,EAED;AAEJ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
package/dist/esm/parts/Panel/bottom/{useInnerRefHandlers.js → useLoadMoreBtnInnerRefHandlers.js}
RENAMED
|
@@ -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 { ITEMS_FOCUSES } from "../../../constants/index.js";
|
|
5
|
-
const
|
|
5
|
+
const useLoadMoreBtnInnerRefHandlers = ({ isDestinationPanel }) => {
|
|
6
6
|
const setZustandRef = useInternalStore((state) => state.setZustandRef);
|
|
7
7
|
const innerRefHandlerLoadMoreBtn = React2.useCallback(
|
|
8
8
|
(node) => {
|
|
@@ -16,6 +16,6 @@ const useInnerRefHandlers = ({ isDestinationPanel }) => {
|
|
|
16
16
|
return React2.useMemo(() => ({ innerRefHandlerLoadMoreBtn }), [innerRefHandlerLoadMoreBtn]);
|
|
17
17
|
};
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
useLoadMoreBtnInnerRefHandlers
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=
|
|
21
|
+
//# sourceMappingURL=useLoadMoreBtnInnerRefHandlers.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/Panel/bottom/useLoadMoreBtnInnerRefHandlers.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable no-unused-vars */\nimport React from 'react';\nimport { useInternalStore } from '../../../config/useStore/index.js';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types.js';\nimport { ITEMS_FOCUSES } from '../../../constants/index.js';\n\nexport const useLoadMoreBtnInnerRefHandlers = ({ isDestinationPanel }: DSShuttleV2T.PanelMetaInfo) => {\n const setZustandRef = useInternalStore((state) => state.setZustandRef);\n\n const innerRefHandlerLoadMoreBtn = React.useCallback(\n (node: HTMLButtonElement) => {\n setZustandRef(\n [isDestinationPanel ? ITEMS_FOCUSES.LOAD_MORE_BTN_DESTINATION : ITEMS_FOCUSES.LOAD_MORE_BTN_SOURCE],\n node,\n );\n },\n [isDestinationPanel, setZustandRef],\n );\n return React.useMemo(() => ({ innerRefHandlerLoadMoreBtn }), [innerRefHandlerLoadMoreBtn]);\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACEvB,OAAOA,YAAW;AAClB,SAAS,wBAAwB;AAEjC,SAAS,qBAAqB;AAEvB,MAAM,iCAAiC,CAAC,EAAE,mBAAmB,MAAkC;AACpG,QAAM,gBAAgB,iBAAiB,CAAC,UAAU,MAAM,aAAa;AAErE,QAAM,6BAA6BA,OAAM;AAAA,IACvC,CAAC,SAA4B;AAC3B;AAAA,QACE,CAAC,qBAAqB,cAAc,4BAA4B,cAAc,oBAAoB;AAAA,QAClG;AAAA,MACF;AAAA,IACF;AAAA,IACA,CAAC,oBAAoB,aAAa;AAAA,EACpC;AACA,SAAOA,OAAM,QAAQ,OAAO,EAAE,2BAA2B,IAAI,CAAC,0BAA0B,CAAC;AAC3F;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import React2 from "react";
|
|
4
4
|
import { styled } from "@elliemae/ds-system";
|
|
5
5
|
import { Grid } from "@elliemae/ds-grid";
|
|
@@ -10,6 +10,7 @@ import { useHandleMoveSelection } from "../../../config/itemMovementHelpers.js";
|
|
|
10
10
|
import { useInternalStore, usePropsStore } from "../../../config/useStore/index.js";
|
|
11
11
|
import { useFocusTracker } from "../../../config/useFocusTracker/index.js";
|
|
12
12
|
import { DSShuttleV2Name, DSShuttleV2Slots, REGIONS_FOCUSES } from "../../../constants/index.js";
|
|
13
|
+
import { StyledA11yNoVisible } from "../../../styles.js";
|
|
13
14
|
const StyledMoveMultipleWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.MOVE_MULTIPLE_WRAPPER })`
|
|
14
15
|
position: absolute;
|
|
15
16
|
background-color: neutral-000;
|
|
@@ -51,6 +52,10 @@ const StyledArrowShortRightIcon = styled(ArrowShortRight, {
|
|
|
51
52
|
fill: brand-600;
|
|
52
53
|
}
|
|
53
54
|
`;
|
|
55
|
+
const StyledMoveMultipleLiveRegion = styled(StyledA11yNoVisible, {
|
|
56
|
+
name: DSShuttleV2Name,
|
|
57
|
+
slot: DSShuttleV2Slots.MOVE_MULTIPLE_LIVE_REGION
|
|
58
|
+
})``;
|
|
54
59
|
const gridFullFraction = ["1fr"];
|
|
55
60
|
const MultipleSelectionAction = React2.memo((panelMeta) => {
|
|
56
61
|
const { isDestinationPanel } = panelMeta;
|
|
@@ -65,11 +70,16 @@ const MultipleSelectionAction = React2.memo((panelMeta) => {
|
|
|
65
70
|
},
|
|
66
71
|
[isDestinationPanel, moveSelection, trackFocusActionReset, trackFocusItemReset, trackFocusRegionPanel]
|
|
67
72
|
);
|
|
73
|
+
const [isMoveAllFocused, setIsMoveAllFocused] = React2.useState(false);
|
|
68
74
|
const handleMoveAllBtnFocus = React2.useCallback(() => {
|
|
69
75
|
trackFocusItemReset();
|
|
70
76
|
trackFocusActionReset();
|
|
71
77
|
trackFocusRegionPanelFocusMoveAll(isDestinationPanel);
|
|
78
|
+
setIsMoveAllFocused(true);
|
|
72
79
|
}, [isDestinationPanel, trackFocusActionReset, trackFocusItemReset, trackFocusRegionPanelFocusMoveAll]);
|
|
80
|
+
const handleMoveAllBtnBlur = React2.useCallback(() => {
|
|
81
|
+
setIsMoveAllFocused(false);
|
|
82
|
+
}, []);
|
|
73
83
|
const setZustandRef = useInternalStore((state) => state.setZustandRef);
|
|
74
84
|
const currRegion = isDestinationPanel ? REGIONS_FOCUSES.DESTINATION_PANEL_ITEM_MOVE_ALL : REGIONS_FOCUSES.SOURCE_PANEL_ITEM_MOVE_ALL;
|
|
75
85
|
const innerRefHandlerMoveAll = React2.useCallback(
|
|
@@ -89,6 +99,10 @@ const MultipleSelectionAction = React2.memo((panelMeta) => {
|
|
|
89
99
|
},
|
|
90
100
|
[trackFocusItemReset, trackFocusActionReset, trackFocusRegionPanel, isDestinationPanel]
|
|
91
101
|
);
|
|
102
|
+
const selectionLength = usePropsStore(
|
|
103
|
+
(state) => isDestinationPanel ? state.destinationSelectionItemArray.length : state.sourceSelectionItemArray.length
|
|
104
|
+
);
|
|
105
|
+
const moveAllAriaLabel = `Move ${selectionLength} selected item${selectionLength === 1 ? "" : "s"} to ${isDestinationPanel ? "source" : "destination"}`;
|
|
92
106
|
const getBatchActionableButtonProps = usePropsStore((state) => state.getBatchActionableButtonProps);
|
|
93
107
|
const batchActionableButtonProps = React2.useMemo(
|
|
94
108
|
() => getBatchActionableButtonProps !== void 0 ? getBatchActionableButtonProps(panelMeta) : {},
|
|
@@ -98,14 +112,19 @@ const MultipleSelectionAction = React2.memo((panelMeta) => {
|
|
|
98
112
|
() => ({
|
|
99
113
|
onClick: handleMoveAllAction,
|
|
100
114
|
onFocus: handleMoveAllBtnFocus,
|
|
115
|
+
onBlur: handleMoveAllBtnBlur,
|
|
101
116
|
onKeyDown: handleMoveAllKeyDown
|
|
102
117
|
}),
|
|
103
|
-
[handleMoveAllAction, handleMoveAllBtnFocus, handleMoveAllKeyDown]
|
|
118
|
+
[handleMoveAllAction, handleMoveAllBtnFocus, handleMoveAllBtnBlur, handleMoveAllKeyDown]
|
|
104
119
|
);
|
|
105
120
|
const spreadableButtonProps = useGetGlobalAttributes(batchActionableButtonProps, buttonActions);
|
|
106
121
|
const getOwnerProps = usePropsStore((store) => store.get);
|
|
107
122
|
const getOwnerPropsArguments = React2.useCallback(() => panelMeta, [panelMeta]);
|
|
108
|
-
|
|
123
|
+
const getOwnerPropsArgumentsIcons = React2.useCallback(
|
|
124
|
+
() => ({ panelMetaInfo: panelMeta }),
|
|
125
|
+
[panelMeta]
|
|
126
|
+
);
|
|
127
|
+
return /* @__PURE__ */ jsxs(
|
|
109
128
|
StyledMoveMultipleWrapper,
|
|
110
129
|
{
|
|
111
130
|
boxShadow: "xs",
|
|
@@ -115,37 +134,50 @@ const MultipleSelectionAction = React2.memo((panelMeta) => {
|
|
|
115
134
|
rows: gridFullFraction,
|
|
116
135
|
getOwnerProps,
|
|
117
136
|
getOwnerPropsArguments,
|
|
118
|
-
children:
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
137
|
+
children: [
|
|
138
|
+
/* @__PURE__ */ jsx(
|
|
139
|
+
StyledButton,
|
|
140
|
+
{
|
|
141
|
+
"aria-label": moveAllAriaLabel,
|
|
142
|
+
buttonType: "icon",
|
|
143
|
+
onClick: handleMoveAllAction,
|
|
144
|
+
onFocus: handleMoveAllBtnFocus,
|
|
145
|
+
onBlur: handleMoveAllBtnBlur,
|
|
146
|
+
onKeyDown: handleMoveAllKeyDown,
|
|
147
|
+
innerRef: innerRefHandlerMoveAll,
|
|
148
|
+
...spreadableButtonProps,
|
|
149
|
+
getOwnerProps,
|
|
150
|
+
getOwnerPropsArguments,
|
|
151
|
+
children: isDestinationPanel ? /* @__PURE__ */ jsx(
|
|
152
|
+
StyledCloseMediumIcon,
|
|
153
|
+
{
|
|
154
|
+
width: "1.538rem",
|
|
155
|
+
height: "1.538rem",
|
|
156
|
+
getOwnerProps,
|
|
157
|
+
getOwnerPropsArguments: getOwnerPropsArgumentsIcons
|
|
158
|
+
}
|
|
159
|
+
) : /* @__PURE__ */ jsx(
|
|
160
|
+
StyledArrowShortRightIcon,
|
|
161
|
+
{
|
|
162
|
+
width: "1.538",
|
|
163
|
+
height: "1.538rem",
|
|
164
|
+
getOwnerProps,
|
|
165
|
+
getOwnerPropsArguments: getOwnerPropsArgumentsIcons
|
|
166
|
+
}
|
|
167
|
+
)
|
|
168
|
+
}
|
|
169
|
+
),
|
|
170
|
+
/* @__PURE__ */ jsx(
|
|
171
|
+
StyledMoveMultipleLiveRegion,
|
|
172
|
+
{
|
|
173
|
+
"aria-live": "polite",
|
|
174
|
+
"aria-atomic": "true",
|
|
175
|
+
getOwnerProps,
|
|
176
|
+
getOwnerPropsArguments,
|
|
177
|
+
children: isMoveAllFocused ? moveAllAriaLabel : ""
|
|
178
|
+
}
|
|
179
|
+
)
|
|
180
|
+
]
|
|
149
181
|
}
|
|
150
182
|
);
|
|
151
183
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/Panel/middle/MultipleSelectionAction.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-statements */\nimport React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { useGetGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport { DSButtonV2, type DSButtonT } from '@elliemae/ds-button-v2';\nimport { ArrowShortRight, CloseMedium } from '@elliemae/ds-icons';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types.js';\nimport { useHandleMoveSelection } from '../../../config/itemMovementHelpers.js';\nimport { useInternalStore, usePropsStore } from '../../../config/useStore/index.js';\nimport { useFocusTracker } from '../../../config/useFocusTracker/index.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots, REGIONS_FOCUSES } from '../../../constants/index.js';\nimport { StyledA11yNoVisible } from '../../../styles.js';\n\nconst StyledMoveMultipleWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.MOVE_MULTIPLE_WRAPPER })`\n position: absolute;\n background-color: neutral-000;\n top: 0px;\n right: 0px;\n transform: translateX(0);\n height: 100%;\n width: 5rem;\n :hover {\n background-color: brand-200;\n > svg {\n fill: brand-700;\n }\n }\n > svg {\n fill: brand-600;\n }\n`;\nconst StyledButton = styled(DSButtonV2, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.MOVE_MULTIPLE_BTN,\n})`\n width: 100%;\n height: 100%;\n`;\nconst StyledCloseMediumIcon = styled(CloseMedium, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.ITEM_ACTION_BTN_TO_SOURCE_ICON,\n})`\n > svg {\n fill: brand-600;\n }\n`;\nconst StyledArrowShortRightIcon = styled(ArrowShortRight, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.ITEM_ACTION_BTN_TO_DESTINATION_ICON,\n})`\n > svg {\n fill: brand-600;\n }\n`;\nconst StyledMoveMultipleLiveRegion = styled(StyledA11yNoVisible, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.MOVE_MULTIPLE_LIVE_REGION,\n})``;\nconst gridFullFraction = ['1fr'];\n\nexport const MultipleSelectionAction = React.memo((panelMeta: DSShuttleV2T.PanelMetaInfo) => {\n const { isDestinationPanel } = panelMeta;\n const { moveSelection } = useHandleMoveSelection(panelMeta);\n const { trackFocusRegionPanel, trackFocusRegionPanelFocusMoveAll, trackFocusItemReset, trackFocusActionReset } =\n useFocusTracker();\n const handleMoveAllAction = React.useCallback<Required<DSButtonT.Props>['onClick']>(\n (event) => {\n moveSelection(event);\n trackFocusItemReset();\n trackFocusActionReset();\n trackFocusRegionPanel(isDestinationPanel);\n },\n [isDestinationPanel, moveSelection, trackFocusActionReset, trackFocusItemReset, trackFocusRegionPanel],\n );\n // PUI-15537 \u2014 drives the focus-time live announcement (see the live-region note below).\n const [isMoveAllFocused, setIsMoveAllFocused] = React.useState(false);\n const handleMoveAllBtnFocus: React.FocusEventHandler<HTMLButtonElement> = React.useCallback(() => {\n trackFocusItemReset();\n trackFocusActionReset();\n trackFocusRegionPanelFocusMoveAll(isDestinationPanel);\n setIsMoveAllFocused(true);\n }, [isDestinationPanel, trackFocusActionReset, trackFocusItemReset, trackFocusRegionPanelFocusMoveAll]);\n const handleMoveAllBtnBlur: React.FocusEventHandler<HTMLButtonElement> = React.useCallback(() => {\n setIsMoveAllFocused(false);\n }, []);\n const setZustandRef = useInternalStore((state) => state.setZustandRef);\n\n const currRegion = isDestinationPanel\n ? REGIONS_FOCUSES.DESTINATION_PANEL_ITEM_MOVE_ALL\n : REGIONS_FOCUSES.SOURCE_PANEL_ITEM_MOVE_ALL;\n const innerRefHandlerMoveAll = React.useCallback(\n (node: HTMLButtonElement | null) => {\n setZustandRef([currRegion, '', ''], node);\n },\n [currRegion, setZustandRef],\n );\n\n const handleMoveAllKeyDown = React.useCallback<React.KeyboardEventHandler<HTMLButtonElement>>(\n (e) => {\n const { key } = e;\n if (['ArrowLeft', 'ArrowRight'].includes(key)) {\n trackFocusItemReset();\n trackFocusActionReset();\n trackFocusRegionPanel(isDestinationPanel);\n }\n },\n [trackFocusItemReset, trackFocusActionReset, trackFocusRegionPanel, isDestinationPanel],\n );\n\n // PUI-15537 \u2014 Bulk Action Button (BAB) selection announcement.\n // Two complementary mechanisms, because an aria-label alone proved unreliable on focus:\n // 1. aria-label \u2014 gives the button a meaningful accessible name (replacing the old static,\n // meaningless \"massive action button\"). Correct for assistive tech that reads the name on\n // focus, and what consumers see when they inspect the button.\n // 2. Focus-time polite live region (StyledMoveMultipleLiveRegion below) \u2014 the BAB is focused via\n // the component's roving-tabindex system rather than a native Tab, and an aria-label on an\n // icon-only button (its only content is aria-hidden) is not announced reliably across screen\n // readers in that scenario. To guarantee the count is spoken when focus lands on the BAB, we\n // also push the same text into a polite live region while the button is focused. This is\n // announced as live content, independent of whether the AT re-reads the aria-label.\n // Both derive from the same selection-count selector the visible \"{n} selected\" header and the\n // panel-center live region already use, so the spoken count stays in sync with the UI. A\n // consumer-provided aria-label via getBatchActionableButtonProps still wins because\n // spreadableButtonProps is spread after the aria-label prop.\n const selectionLength = usePropsStore((state) =>\n isDestinationPanel ? state.destinationSelectionItemArray.length : state.sourceSelectionItemArray.length,\n );\n const moveAllAriaLabel = `Move ${selectionLength} selected item${selectionLength === 1 ? '' : 's'} to ${\n isDestinationPanel ? 'source' : 'destination'\n }`;\n\n const getBatchActionableButtonProps = usePropsStore((state) => state.getBatchActionableButtonProps);\n const batchActionableButtonProps = React.useMemo(\n () => (getBatchActionableButtonProps !== undefined ? getBatchActionableButtonProps(panelMeta) : {}),\n [getBatchActionableButtonProps, panelMeta],\n );\n const buttonActions = React.useMemo(\n () => ({\n onClick: handleMoveAllAction,\n onFocus: handleMoveAllBtnFocus,\n onBlur: handleMoveAllBtnBlur,\n onKeyDown: handleMoveAllKeyDown,\n }),\n [handleMoveAllAction, handleMoveAllBtnFocus, handleMoveAllBtnBlur, handleMoveAllKeyDown],\n );\n\n // this \"as DSButtonT.Props\" is a workaround for the fact that useGetGlobalAttributes is not able to understand overloaded types\n // intellisense will mostly lie because of this but we are using this for the spread operator and it will work for aria-* and data-* props\n const spreadableButtonProps = useGetGlobalAttributes(batchActionableButtonProps, buttonActions) as DSButtonT.Props;\n\n const getOwnerProps = usePropsStore((store) => store.get);\n const getOwnerPropsArguments = React.useCallback(() => panelMeta, [panelMeta]);\n // The to-source / to-destination icon slots share a unified argument shape with the item-action\n // row (see ItemActions). In the bulk-action context there is no single item, so extraMetaInfo is omitted.\n const getOwnerPropsArgumentsIcons = React.useCallback(\n (): DSShuttleV2T.ItemActionIconArguments => ({ panelMetaInfo: panelMeta }),\n [panelMeta],\n );\n\n return (\n <StyledMoveMultipleWrapper\n boxShadow=\"xs\"\n alignItems=\"center\"\n justifyContent=\"center\"\n cols={gridFullFraction}\n rows={gridFullFraction}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledButton\n aria-label={moveAllAriaLabel}\n buttonType=\"icon\"\n onClick={handleMoveAllAction}\n onFocus={handleMoveAllBtnFocus}\n onBlur={handleMoveAllBtnBlur}\n onKeyDown={handleMoveAllKeyDown}\n innerRef={innerRefHandlerMoveAll}\n {...spreadableButtonProps}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\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.538\"\n height=\"1.538rem\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArgumentsIcons}\n />\n )}\n </StyledButton>\n {/* PUI-15537 \u2014 announced as polite live content when the BAB gains focus, so the count is\n spoken even when the aria-label is not re-read on this button. Empty while unfocused. */}\n <StyledMoveMultipleLiveRegion\n aria-live=\"polite\"\n aria-atomic=\"true\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {isMoveAllFocused ? moveAllAriaLabel : ''}\n </StyledMoveMultipleLiveRegion>\n </StyledMoveMultipleWrapper>\n );\n});\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACiKnB,SAsBM,KAtBN;AAhKJ,OAAOA,YAAW;AAClB,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,8BAA8B;AACvC,SAAS,kBAAkC;AAC3C,SAAS,iBAAiB,mBAAmB;A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MultipleSelectionAction.js";
|
|
|
13
13
|
import { DSShuttleV2Name, REGIONS_FOCUSES, DSShuttleV2Slots } from "../../../constants/index.js";
|
|
14
14
|
import { StyledA11yNoVisible } from "../../../styles.js";
|
|
15
15
|
import { ShuttleLoadingAnnouncement } from "./ShuttleLoadingAnnouncement.js";
|
|
16
|
-
const
|
|
16
|
+
const useMiddleSectionInnerRefHandlers = (isDestinationPanel) => {
|
|
17
17
|
const setZustandRef = useInternalStore((state) => state.setZustandRef);
|
|
18
18
|
const currRegion = isDestinationPanel ? REGIONS_FOCUSES.DESTINATION_PANEL : REGIONS_FOCUSES.SOURCE_PANEL;
|
|
19
19
|
const innerRefHandlerParentItem = React2.useCallback(
|
|
@@ -54,7 +54,7 @@ const PanelContentMiddleSection = React2.memo((panelMetaInfo) => {
|
|
|
54
54
|
const withLoadMore = usePropsStore(
|
|
55
55
|
(state) => isDestinationPanel ? state.destinationWithLoadMore : state.sourceWithLoadMore
|
|
56
56
|
);
|
|
57
|
-
const { innerRefHandlerParentItem } =
|
|
57
|
+
const { innerRefHandlerParentItem } = useMiddleSectionInnerRefHandlers(isDestinationPanel);
|
|
58
58
|
const {
|
|
59
59
|
trackFocusRegionPanel,
|
|
60
60
|
trackFocusItemFirst,
|