@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.
- package/dist/cjs/constants/index.js +1 -2
- package/dist/cjs/constants/index.js.map +2 -2
- package/dist/cjs/parts/Dnd/DndHandle.js +7 -6
- 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 +2 -2
- 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/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 -13
- 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/PanelContentMiddleSection.js +2 -2
- package/dist/cjs/parts/Panel/middle/PanelContentMiddleSection.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +7 -2
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/typescript-testing/slot-props.js +1 -0
- package/dist/cjs/typescript-testing/slot-props.js.map +2 -2
- package/dist/esm/constants/index.js +1 -2
- package/dist/esm/constants/index.js.map +2 -2
- package/dist/esm/parts/Dnd/DndHandle.js +8 -7
- 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 +2 -2
- 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/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 -10
- 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/PanelContentMiddleSection.js +2 -2
- package/dist/esm/parts/Panel/middle/PanelContentMiddleSection.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js +7 -2
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/typescript-testing/slot-props.js +1 -0
- package/dist/esm/typescript-testing/slot-props.js.map +2 -2
- package/dist/types/constants/index.d.ts +2 -1
- 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/react-desc-prop-types.d.ts +2 -0
- package/package.json +23 -23
- 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
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var CheckboxSelectionUI_exports = {};
|
|
30
|
+
__export(CheckboxSelectionUI_exports, {
|
|
31
|
+
CheckboxSelectionUI: () => CheckboxSelectionUI
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(CheckboxSelectionUI_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_ds_form_checkbox = require("@elliemae/ds-form-checkbox");
|
|
37
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
38
|
+
var import_react = __toESM(require("react"));
|
|
39
|
+
var import_useStore = require("../../../config/useStore/useStore.js");
|
|
40
|
+
var import_constants = require("../../../constants/index.js");
|
|
41
|
+
const StyledItemSelection = (0, import_ds_system.styled)(import_ds_form_checkbox.DSControlledCheckbox, {
|
|
42
|
+
name: import_constants.DSShuttleV2Name,
|
|
43
|
+
slot: import_constants.DSShuttleV2Slots.ITEM_SELECTION_CHECKBOX_UI
|
|
44
|
+
})`
|
|
45
|
+
margin-left: xxs2;
|
|
46
|
+
margin-right: xxs;
|
|
47
|
+
`;
|
|
48
|
+
const noOp = () => {
|
|
49
|
+
};
|
|
50
|
+
const CheckboxSelectionUI = (props) => {
|
|
51
|
+
const { itemMeta } = props;
|
|
52
|
+
const {
|
|
53
|
+
datumInternalMeta,
|
|
54
|
+
datumRenderFlags: { selectionPrevented }
|
|
55
|
+
} = itemMeta;
|
|
56
|
+
const { isSelected } = datumInternalMeta;
|
|
57
|
+
const getOwnerProps = (0, import_useStore.usePropsStore)((store) => store.get);
|
|
58
|
+
const getOwnerPropsArguments = import_react.default.useCallback(() => itemMeta, [itemMeta]);
|
|
59
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
60
|
+
StyledItemSelection,
|
|
61
|
+
{
|
|
62
|
+
applyAriaDisabled: selectionPrevented,
|
|
63
|
+
getOwnerProps,
|
|
64
|
+
getOwnerPropsArguments,
|
|
65
|
+
"aria-hidden": "true",
|
|
66
|
+
tabIndex: -1,
|
|
67
|
+
checked: isSelected,
|
|
68
|
+
onChange: noOp
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=CheckboxSelectionUI.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/parts/Item/ItemSelectionUi/CheckboxSelectionUI.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD2BnB;AA3BJ,8BAAqC;AACrC,uBAAuB;AACvB,mBAAkB;AAClB,sBAA8B;AAC9B,uBAAkD;AAGlD,MAAM,0BAAsB,yBAAO,8CAAsB;AAAA,EACvD,MAAM;AAAA,EACN,MAAM,kCAAiB;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,oBAAgB,+BAAc,CAAC,UAAU,MAAM,GAAG;AACxD,QAAM,yBAAyB,aAAAA,QAAM,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,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var ItemSelectionUI_exports = {};
|
|
30
|
+
__export(ItemSelectionUI_exports, {
|
|
31
|
+
ItemSelectionUI: () => ItemSelectionUI
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(ItemSelectionUI_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_ds_grid = require("@elliemae/ds-grid");
|
|
37
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
38
|
+
var import_react = __toESM(require("react"));
|
|
39
|
+
var import_useStore = require("../../../config/useStore/useStore.js");
|
|
40
|
+
var import_constants = require("../../../constants/index.js");
|
|
41
|
+
var import_CheckboxSelectionUI = require("./CheckboxSelectionUI.js");
|
|
42
|
+
var import_VerticalBarSelectionUI = require("./VerticalBarSelectionUI.js");
|
|
43
|
+
const ItemSelectionWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid, { name: import_constants.DSShuttleV2Name, slot: import_constants.DSShuttleV2Slots.ITEM_CHECKBOX })`
|
|
44
|
+
height: 100%;
|
|
45
|
+
&:focus {
|
|
46
|
+
outline: none;
|
|
47
|
+
}
|
|
48
|
+
`;
|
|
49
|
+
const ItemSelectionUI = (props) => {
|
|
50
|
+
const { tooltipHelpers, itemInnerRefHandlers, itemMeta } = props;
|
|
51
|
+
const {
|
|
52
|
+
datumInternalMeta,
|
|
53
|
+
datumRenderFlags: { selectionPrevented }
|
|
54
|
+
} = itemMeta;
|
|
55
|
+
const { isSelected, hydratedId, softDeleted } = datumInternalMeta;
|
|
56
|
+
const { innerRefHandlerParentItem } = itemInnerRefHandlers;
|
|
57
|
+
const getOwnerProps = (0, import_useStore.usePropsStore)((store) => store.get);
|
|
58
|
+
const explicitSelectionUI = (0, import_useStore.usePropsStore)((store) => store.explicitSelectionUI);
|
|
59
|
+
const getOwnerPropsArguments = import_react.default.useCallback(() => itemMeta, [itemMeta]);
|
|
60
|
+
const idItem = import_react.default.useMemo(
|
|
61
|
+
() => `${hydratedId}-wrapper${softDeleted ? "-soft-deleted" : ""}`,
|
|
62
|
+
[hydratedId, softDeleted]
|
|
63
|
+
);
|
|
64
|
+
const shouldDisable = softDeleted || selectionPrevented;
|
|
65
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
66
|
+
ItemSelectionWrapper,
|
|
67
|
+
{
|
|
68
|
+
role: "checkbox",
|
|
69
|
+
"aria-checked": isSelected,
|
|
70
|
+
onFocus: tooltipHelpers.onFocus,
|
|
71
|
+
onBlur: tooltipHelpers.onBlur,
|
|
72
|
+
"aria-labelledby": `${hydratedId}-text-section${softDeleted ? "-soft-deleted" : ""}`,
|
|
73
|
+
id: idItem,
|
|
74
|
+
innerRef: innerRefHandlerParentItem,
|
|
75
|
+
"aria-disabled": shouldDisable,
|
|
76
|
+
getOwnerProps,
|
|
77
|
+
getOwnerPropsArguments,
|
|
78
|
+
alignItems: "center",
|
|
79
|
+
children: explicitSelectionUI ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_CheckboxSelectionUI.CheckboxSelectionUI, { ...props }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_VerticalBarSelectionUI.VerticalBarSelectionUI, { ...props })
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=ItemSelectionUI.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/parts/Item/ItemSelectionUi/ItemSelectionUI.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD8CM;AA9C7B,qBAAqB;AACrB,uBAAuB;AACvB,mBAAkB;AAClB,sBAA8B;AAC9B,uBAAkD;AAClD,iCAAoC;AAEpC,oCAAuC;AAEvC,MAAM,2BAAuB,yBAAO,qBAAM,EAAE,MAAM,kCAAiB,MAAM,kCAAiB,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,oBAAgB,+BAAc,CAAC,UAAU,MAAM,GAAG;AACxD,QAAM,0BAAsB,+BAAc,CAAC,UAAU,MAAM,mBAAmB;AAC9E,QAAM,yBAAyB,aAAAA,QAAM,YAAY,MAAM,UAAU,CAAC,QAAQ,CAAC;AAC3E,QAAM,SAAS,aAAAA,QAAM;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,4CAAC,kDAAqB,GAAG,OAAO,IAAK,4CAAC,wDAAwB,GAAG,OAAO;AAAA;AAAA,EACjG;AAEJ;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -5,10 +5,6 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
8
|
var __copyProps = (to, from, except, desc) => {
|
|
13
9
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
10
|
for (let key of __getOwnPropNames(from))
|
|
@@ -26,18 +22,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
22
|
mod
|
|
27
23
|
));
|
|
28
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
|
|
31
|
-
withConditionalUseSortable: () => withConditionalUseSortable
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(withConditionalUseSortable_exports);
|
|
25
|
+
var ItemSelectionUI_types_exports = {};
|
|
26
|
+
module.exports = __toCommonJS(ItemSelectionUI_types_exports);
|
|
34
27
|
var React = __toESM(require("react"));
|
|
35
|
-
|
|
36
|
-
var import_ds_drag_and_drop = require("@elliemae/ds-drag-and-drop");
|
|
37
|
-
const withConditionalUseSortable = (Component) => function WithConditionalUseSortable(props) {
|
|
38
|
-
const { datumInternalMeta } = props;
|
|
39
|
-
const { hydratedId } = datumInternalMeta;
|
|
40
|
-
const useSortableHelpers = (0, import_ds_drag_and_drop.useSortable)({ id: hydratedId });
|
|
41
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { ...props, useSortableHelpers });
|
|
42
|
-
};
|
|
43
|
-
//# sourceMappingURL=withConditionalUseSortable.js.map
|
|
28
|
+
//# sourceMappingURL=ItemSelectionUI.types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/parts/Item/ItemSelectionUi/ItemSelectionUI.types.ts", "../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import type { useHeadlessTooltip } from '@elliemae/ds-hooks-headless-tooltip';\nimport type { DSShuttleV2T } from '../../../react-desc-prop-types.js';\nimport type { useItemInnerRefHandlers } from '../useItemInnerRefHandlers.js';\n\ntype TooltipHelpers = ReturnType<typeof useHeadlessTooltip>;\ntype ItemInnerRefHandlers = ReturnType<typeof useItemInnerRefHandlers>;\n\nexport interface SelectionUIProps {\n tooltipHelpers: TooltipHelpers;\n itemInnerRefHandlers: ItemInnerRefHandlers;\n itemMeta: DSShuttleV2T.ItemMeta;\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -26,30 +26,31 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
31
|
-
|
|
29
|
+
var VerticalBarSelectionUI_exports = {};
|
|
30
|
+
__export(VerticalBarSelectionUI_exports, {
|
|
31
|
+
VerticalBarSelectionUI: () => VerticalBarSelectionUI
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(VerticalBarSelectionUI_exports);
|
|
34
34
|
var React = __toESM(require("react"));
|
|
35
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
-
var import_react = __toESM(require("react"));
|
|
37
|
-
var import_ds_system = require("@elliemae/ds-system");
|
|
38
36
|
var import_ds_grid = require("@elliemae/ds-grid");
|
|
39
|
-
var
|
|
40
|
-
var
|
|
37
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
38
|
+
var import_react = __toESM(require("react"));
|
|
39
|
+
var import_useStore = require("../../../config/useStore/useStore.js");
|
|
40
|
+
var import_constants = require("../../../constants/index.js");
|
|
41
41
|
const StyledItemSelection = (0, import_ds_system.styled)(import_ds_grid.Grid, { name: import_constants.DSShuttleV2Name, slot: import_constants.DSShuttleV2Slots.ITEM_SELECTION })`
|
|
42
|
-
width:
|
|
42
|
+
width: 5px;
|
|
43
43
|
height: 100%;
|
|
44
44
|
box-sizing: border-box;
|
|
45
45
|
pointer-events: none;
|
|
46
46
|
background-color: ${(props) => {
|
|
47
|
-
if (props.$isSelected) return props.theme.colors.brand[
|
|
47
|
+
if (props.$isSelected) return props.theme.colors.brand[800];
|
|
48
48
|
if (props.$selectionPrevented === true) return props.theme.colors.neutral["080"];
|
|
49
49
|
return props.theme.colors.brand[300];
|
|
50
50
|
}};
|
|
51
51
|
`;
|
|
52
|
-
const
|
|
52
|
+
const VerticalBarSelectionUI = (props) => {
|
|
53
|
+
const { itemMeta } = props;
|
|
53
54
|
const {
|
|
54
55
|
datumInternalMeta: { isSelected },
|
|
55
56
|
datumRenderFlags: { selectionPrevented }
|
|
@@ -65,5 +66,5 @@ const ItemSelection = import_react.default.memo((itemMeta) => {
|
|
|
65
66
|
getOwnerPropsArguments
|
|
66
67
|
}
|
|
67
68
|
);
|
|
68
|
-
}
|
|
69
|
-
//# sourceMappingURL=
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=VerticalBarSelectionUI.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/parts/Item/ItemSelectionUi/VerticalBarSelectionUI.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkCnB;AAlCJ,qBAAqB;AACrB,uBAAuB;AACvB,mBAAkB;AAClB,sBAA8B;AAC9B,uBAAkD;AAGlD,MAAM,0BAAsB,yBAAO,qBAAM,EAAE,MAAM,kCAAiB,MAAM,kCAAiB,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,oBAAgB,+BAAc,CAAC,UAAU,MAAM,GAAG;AACxD,QAAM,yBAAyB,aAAAA,QAAM,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,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var useItemInnerRefHandlers_exports = {};
|
|
30
|
+
__export(useItemInnerRefHandlers_exports, {
|
|
31
|
+
useItemInnerRefHandlers: () => useItemInnerRefHandlers
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(useItemInnerRefHandlers_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_useStore = require("../../config/useStore/index.js");
|
|
37
|
+
var import_constants = require("../../constants/index.js");
|
|
38
|
+
var import_useThisItemIsFocused = require("./useThisItemIsFocused.js");
|
|
39
|
+
const useItemInnerRefHandlers = (itemMeta) => {
|
|
40
|
+
const { datumInternalMeta, isDestinationPanel } = itemMeta;
|
|
41
|
+
const { hydratedId } = datumInternalMeta;
|
|
42
|
+
const setZustandRef = (0, import_useStore.useInternalStore)((state) => state.setZustandRef);
|
|
43
|
+
const setDeferFocusUntilFirstRender = (0, import_useStore.useInternalStore)((state) => state.setDeferFocusUntilFirstRender);
|
|
44
|
+
const deferedAfterFirstRender = (0, import_useStore.useInternalStore)((state) => state.getDeferFocusUntilFirstRender());
|
|
45
|
+
const isLoadingMore = (0, import_useStore.usePropsStore)(
|
|
46
|
+
(state) => isDestinationPanel ? state.destinationIsLoadingMore : state.sourceIsLoadingMore
|
|
47
|
+
);
|
|
48
|
+
const thisItemIsFocused = (0, import_useThisItemIsFocused.useThisItemIsFocused)(itemMeta);
|
|
49
|
+
const currRegion = isDestinationPanel ? import_constants.REGIONS_FOCUSES.DESTINATION_PANEL_ITEM : import_constants.REGIONS_FOCUSES.SOURCE_PANEL_ITEM;
|
|
50
|
+
const currItemId = hydratedId;
|
|
51
|
+
const innerRefHandlerParentItem = import_react.default.useCallback(
|
|
52
|
+
(node) => {
|
|
53
|
+
setZustandRef([currRegion, currItemId, "parent"], node);
|
|
54
|
+
if (deferedAfterFirstRender && thisItemIsFocused && node) {
|
|
55
|
+
setDeferFocusUntilFirstRender(false);
|
|
56
|
+
if (node.tabIndex === -1) node.tabIndex = 0;
|
|
57
|
+
node.focus();
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
[setZustandRef, currRegion, currItemId, thisItemIsFocused, deferedAfterFirstRender, setDeferFocusUntilFirstRender]
|
|
61
|
+
);
|
|
62
|
+
(0, import_react.useEffect)(
|
|
63
|
+
() => () => {
|
|
64
|
+
if (isLoadingMore) setDeferFocusUntilFirstRender(true);
|
|
65
|
+
},
|
|
66
|
+
[isLoadingMore, setDeferFocusUntilFirstRender]
|
|
67
|
+
);
|
|
68
|
+
return import_react.default.useMemo(
|
|
69
|
+
() => ({ innerRefHandlerParentItem, thisItemIsFocused }),
|
|
70
|
+
[innerRefHandlerParentItem, thisItemIsFocused]
|
|
71
|
+
);
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=useItemInnerRefHandlers.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/parts/Item/useItemInnerRefHandlers.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAiC;AACjC,sBAAgD;AAChD,uBAAgC;AAEhC,kCAAqC;AAE9B,MAAM,0BAA0B,CAAC,aAAoC;AAC1E,QAAM,EAAE,mBAAmB,mBAAmB,IAAI;AAClD,QAAM,EAAE,WAAW,IAAI;AACvB,QAAM,oBAAgB,kCAAiB,CAAC,UAAU,MAAM,aAAa;AAErE,QAAM,oCAAgC,kCAAiB,CAAC,UAAU,MAAM,6BAA6B;AACrG,QAAM,8BAA0B,kCAAiB,CAAC,UAAU,MAAM,8BAA8B,CAAC;AACjG,QAAM,oBAAgB;AAAA,IAAc,CAAC,UACnC,qBAAqB,MAAM,2BAA2B,MAAM;AAAA,EAC9D;AAEA,QAAM,wBAAoB,kDAAqB,QAAQ;AAEvD,QAAM,aAAa,qBAAqB,iCAAgB,yBAAyB,iCAAgB;AACjG,QAAM,aAAa;AAEnB,QAAM,4BAA4B,aAAAA,QAAM;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,SAAO,aAAAA,QAAM;AAAA,IACX,OAAO,EAAE,2BAA2B,kBAAkB;AAAA,IACtD,CAAC,2BAA2B,iBAAiB;AAAA,EAC/C;AACF;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -37,7 +37,7 @@ var import_react = __toESM(require("react"));
|
|
|
37
37
|
var import_ds_system = require("@elliemae/ds-system");
|
|
38
38
|
var import_ds_button_v2 = require("@elliemae/ds-button-v2");
|
|
39
39
|
var import_useStore = require("../../../config/useStore/index.js");
|
|
40
|
-
var
|
|
40
|
+
var import_useLoadMoreBtnInnerRefHandlers = require("./useLoadMoreBtnInnerRefHandlers.js");
|
|
41
41
|
var import_useFocusTracker = require("../../../config/useFocusTracker/index.js");
|
|
42
42
|
var import_constants = require("../../../constants/index.js");
|
|
43
43
|
const StyledLoadMoreBtn = (0, import_ds_system.styled)(import_ds_button_v2.DSButtonV2, {
|
|
@@ -86,7 +86,7 @@ const LoadMoreBtn = (panelMetaInfo) => {
|
|
|
86
86
|
trackFocusRegionPanelItem
|
|
87
87
|
]
|
|
88
88
|
);
|
|
89
|
-
const { innerRefHandlerLoadMoreBtn } = (0,
|
|
89
|
+
const { innerRefHandlerLoadMoreBtn } = (0, import_useLoadMoreBtnInnerRefHandlers.useLoadMoreBtnInnerRefHandlers)(panelMetaInfo);
|
|
90
90
|
const getOwnerProps = (0, import_useStore.usePropsStore)((store) => store.get);
|
|
91
91
|
const getOwnerPropsArguments = import_react.default.useCallback(() => panelMetaInfo, [panelMetaInfo]);
|
|
92
92
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/parts/Panel/bottom/LoadMoreBtn.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["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;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD6DnB;AA7DJ,mBAAkB;AAClB,uBAAuB;AACvB,0BAAyD;AACzD,sBAA8B;AAE9B,
|
|
4
|
+
"sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
|
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,MAAM,iCAAa;AAAA,MACnB,UAAU;AAAA,MAEV,cAAY,qBAAqB,yCAAyC;AAAA,MAC1E;AAAA,MACA;AAAA,MACD;AAAA;AAAA,EAED;AAEJ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
package/dist/cjs/parts/Panel/bottom/{useInnerRefHandlers.js → useLoadMoreBtnInnerRefHandlers.js}
RENAMED
|
@@ -26,16 +26,16 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
31
|
-
|
|
29
|
+
var useLoadMoreBtnInnerRefHandlers_exports = {};
|
|
30
|
+
__export(useLoadMoreBtnInnerRefHandlers_exports, {
|
|
31
|
+
useLoadMoreBtnInnerRefHandlers: () => useLoadMoreBtnInnerRefHandlers
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(useLoadMoreBtnInnerRefHandlers_exports);
|
|
34
34
|
var React = __toESM(require("react"));
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_useStore = require("../../../config/useStore/index.js");
|
|
37
37
|
var import_constants = require("../../../constants/index.js");
|
|
38
|
-
const
|
|
38
|
+
const useLoadMoreBtnInnerRefHandlers = ({ isDestinationPanel }) => {
|
|
39
39
|
const setZustandRef = (0, import_useStore.useInternalStore)((state) => state.setZustandRef);
|
|
40
40
|
const innerRefHandlerLoadMoreBtn = import_react.default.useCallback(
|
|
41
41
|
(node) => {
|
|
@@ -48,4 +48,4 @@ const useInnerRefHandlers = ({ isDestinationPanel }) => {
|
|
|
48
48
|
);
|
|
49
49
|
return import_react.default.useMemo(() => ({ innerRefHandlerLoadMoreBtn }), [innerRefHandlerLoadMoreBtn]);
|
|
50
50
|
};
|
|
51
|
-
//# sourceMappingURL=
|
|
51
|
+
//# sourceMappingURL=useLoadMoreBtnInnerRefHandlers.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/parts/Panel/bottom/useLoadMoreBtnInnerRefHandlers.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* 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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAAkB;AAClB,sBAAiC;AAEjC,uBAA8B;AAEvB,MAAM,iCAAiC,CAAC,EAAE,mBAAmB,MAAkC;AACpG,QAAM,oBAAgB,kCAAiB,CAAC,UAAU,MAAM,aAAa;AAErE,QAAM,6BAA6B,aAAAA,QAAM;AAAA,IACvC,CAAC,SAA4B;AAC3B;AAAA,QACE,CAAC,qBAAqB,+BAAc,4BAA4B,+BAAc,oBAAoB;AAAA,QAClG;AAAA,MACF;AAAA,IACF;AAAA,IACA,CAAC,oBAAoB,aAAa;AAAA,EACpC;AACA,SAAO,aAAAA,QAAM,QAAQ,OAAO,EAAE,2BAA2B,IAAI,CAAC,0BAA0B,CAAC;AAC3F;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -46,7 +46,7 @@ var import_MultipleSelectionAction = require("./MultipleSelectionAction.js");
|
|
|
46
46
|
var import_constants = require("../../../constants/index.js");
|
|
47
47
|
var import_styles = require("../../../styles.js");
|
|
48
48
|
var import_ShuttleLoadingAnnouncement = require("./ShuttleLoadingAnnouncement.js");
|
|
49
|
-
const
|
|
49
|
+
const useMiddleSectionInnerRefHandlers = (isDestinationPanel) => {
|
|
50
50
|
const setZustandRef = (0, import_useStore.useInternalStore)((state) => state.setZustandRef);
|
|
51
51
|
const currRegion = isDestinationPanel ? import_constants.REGIONS_FOCUSES.DESTINATION_PANEL : import_constants.REGIONS_FOCUSES.SOURCE_PANEL;
|
|
52
52
|
const innerRefHandlerParentItem = import_react.default.useCallback(
|
|
@@ -87,7 +87,7 @@ const PanelContentMiddleSection = import_react.default.memo((panelMetaInfo) => {
|
|
|
87
87
|
const withLoadMore = (0, import_useStore.usePropsStore)(
|
|
88
88
|
(state) => isDestinationPanel ? state.destinationWithLoadMore : state.sourceWithLoadMore
|
|
89
89
|
);
|
|
90
|
-
const { innerRefHandlerParentItem } =
|
|
90
|
+
const { innerRefHandlerParentItem } = useMiddleSectionInnerRefHandlers(isDestinationPanel);
|
|
91
91
|
const {
|
|
92
92
|
trackFocusRegionPanel,
|
|
93
93
|
trackFocusItemFirst,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/parts/Panel/middle/PanelContentMiddleSection.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-statements */\n/* eslint-disable complexity */\nimport React, { useCallback } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { useOnSpecificFocus } from './useOnSpecificFocus.js';\nimport { usePropsStore, useInternalStore } from '../../../config/useStore/index.js';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types.js';\nimport { ItemListWrapperWithContext } from './ItemListWrapper/Index.js';\nimport { EmptyItems } from './EmptyItems.js';\nimport { useFocusTracker } from '../../../config/useFocusTracker/index.js';\nimport { LoadingItems } from './LoadingItems.js';\nimport { MultipleSelectionAction } from './MultipleSelectionAction.js';\nimport { DSShuttleV2Name, REGIONS_FOCUSES, DSShuttleV2Slots } from '../../../constants/index.js';\nimport { StyledA11yNoVisible } from '../../../styles.js';\nimport { ShuttleLoadingAnnouncement } from './ShuttleLoadingAnnouncement.js';\n\nconst
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADuKjB;AArKN,mBAAmC;AACnC,uBAAuB;AACvB,qBAAqB;AACrB,gCAAmC;AACnC,sBAAgD;AAEhD,mBAA2C;AAC3C,wBAA2B;AAC3B,6BAAgC;AAChC,0BAA6B;AAC7B,qCAAwC;AACxC,uBAAmE;AACnE,oBAAoC;AACpC,wCAA2C;AAE3C,MAAM,
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-statements */\n/* eslint-disable complexity */\nimport React, { useCallback } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { useOnSpecificFocus } from './useOnSpecificFocus.js';\nimport { usePropsStore, useInternalStore } from '../../../config/useStore/index.js';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types.js';\nimport { ItemListWrapperWithContext } from './ItemListWrapper/Index.js';\nimport { EmptyItems } from './EmptyItems.js';\nimport { useFocusTracker } from '../../../config/useFocusTracker/index.js';\nimport { LoadingItems } from './LoadingItems.js';\nimport { MultipleSelectionAction } from './MultipleSelectionAction.js';\nimport { DSShuttleV2Name, REGIONS_FOCUSES, DSShuttleV2Slots } from '../../../constants/index.js';\nimport { StyledA11yNoVisible } from '../../../styles.js';\nimport { ShuttleLoadingAnnouncement } from './ShuttleLoadingAnnouncement.js';\n\nconst useMiddleSectionInnerRefHandlers = (isDestinationPanel: boolean) => {\n const setZustandRef = useInternalStore((state) => state.setZustandRef);\n const currRegion = isDestinationPanel ? REGIONS_FOCUSES.DESTINATION_PANEL : REGIONS_FOCUSES.SOURCE_PANEL;\n\n const innerRefHandlerParentItem = React.useCallback(\n (node: HTMLDivElement | null) => {\n setZustandRef([currRegion, '', ''], node);\n },\n [currRegion, setZustandRef],\n );\n return React.useMemo(() => ({ innerRefHandlerParentItem }), [innerRefHandlerParentItem]);\n};\n\nconst rows = [1];\n\nconst StyledListWrapperMid = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.LIST_WRAPPER_MID })`\n overflow: hidden;\n position: relative;\n :focus,\n :focus-visible {\n outline: 2px solid brand-700;\n }\n`;\n\nexport const PanelContentMiddleSection = React.memo((panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => {\n const { isDestinationPanel = false, hasMultipleSelection } = panelMetaInfo;\n const itemsLength = usePropsStore((state) =>\n isDestinationPanel ? state.destinationData.length : state.sourceData.length,\n );\n\n const headerProps = usePropsStore((state) =>\n isDestinationPanel ? state.destinationHeaderProps : state.sourceHeaderProps,\n );\n\n const itemList = usePropsStore((state) =>\n isDestinationPanel ? state.destinationConfiguredData : state.sourceConfiguredData,\n );\n const isLoading = usePropsStore((state) => (isDestinationPanel ? state.destinationIsLoading : state.sourceIsLoading));\n const showEmptyMessage = !isLoading && itemsLength === 0;\n const showItems = !isLoading && !showEmptyMessage;\n\n const actionRef = usePropsStore((state) =>\n isDestinationPanel ? state.destinationVirtualRef : state.sourceVirtualRef,\n );\n\n const getIsDragAndDropHappening = useInternalStore((state) => state.getIsDragAndDropHappening);\n const withLoadMore = usePropsStore((state) =>\n isDestinationPanel ? state.destinationWithLoadMore : state.sourceWithLoadMore,\n );\n const { innerRefHandlerParentItem } = useMiddleSectionInnerRefHandlers(isDestinationPanel);\n const {\n trackFocusRegionPanel,\n trackFocusItemFirst,\n trackFocusItemLast,\n trackFocusActionParent,\n trackFocusRegionPanelItem,\n trackFocusLoadMoreBtnDestination,\n trackFocusLoadMoreBtn,\n } = useFocusTracker();\n const config = React.useMemo(\n () => ({\n onFocus: () => {\n trackFocusRegionPanel(isDestinationPanel);\n },\n }),\n [trackFocusRegionPanel, isDestinationPanel],\n );\n const onPanelFocus = useOnSpecificFocus(config);\n\n const onPanelKeyDown = React.useCallback<React.KeyboardEventHandler<HTMLDivElement>>(\n (e) => {\n const { key } = e;\n // we need to invoke \"getIsDragAndDropHappening\" here to ensure we have the latest info at the moment of the event\n const isDragAndDropHappening = getIsDragAndDropHappening();\n if (isDragAndDropHappening) {\n e.preventDefault();\n return;\n }\n if (['Home', 'End', 'ArrowUp', 'ArrowDown'].includes(key)) {\n e.preventDefault();\n e.stopPropagation();\n trackFocusRegionPanelItem(isDestinationPanel);\n trackFocusActionParent();\n // we won't receive ArrowUp/ArrowDown if this happens in a child because children are stopping propagation\n if ((key === 'ArrowDown' || key === 'Home') && itemList.length > 0) {\n actionRef.current.scrollTo(0);\n trackFocusItemFirst(panelMetaInfo);\n }\n if ((key === 'ArrowUp' || key === 'End') && itemList.length > 0) {\n if (withLoadMore) {\n if (isDestinationPanel) trackFocusLoadMoreBtnDestination();\n else trackFocusLoadMoreBtn();\n } else {\n trackFocusItemLast(panelMetaInfo);\n actionRef.current.scrollTo(itemsLength - 1);\n }\n }\n }\n },\n [\n getIsDragAndDropHappening,\n trackFocusRegionPanelItem,\n isDestinationPanel,\n trackFocusActionParent,\n itemList.length,\n actionRef,\n trackFocusItemFirst,\n panelMetaInfo,\n withLoadMore,\n trackFocusLoadMoreBtnDestination,\n trackFocusLoadMoreBtn,\n trackFocusItemLast,\n itemsLength,\n ],\n );\n\n const cols = React.useMemo(() => {\n if (hasMultipleSelection) return ['1fr', '5rem'];\n return ['auto'];\n }, [hasMultipleSelection]);\n\n const getOwnerProps = usePropsStore((store) => store.get);\n const getOwnerPropsArguments = useCallback(() => panelMetaInfo, [panelMetaInfo]);\n\n const defaultAriaDescribedBy =\n itemList.length > 0\n ? 'Press Up and Down arrow to navigate the options list and Press Right and Left arrow to access items actions'\n : 'No items available in the panel';\n\n const uidDescribedBy = useInternalStore((state) => state.shuttleInternalId);\n\n const defaultAriaLabel = React.useMemo(\n () => `Entering ${isDestinationPanel ? 'destination' : 'source'} panel.`,\n [isDestinationPanel],\n );\n\n return (\n <StyledListWrapperMid\n onFocus={onPanelFocus}\n onKeyDown={onPanelKeyDown}\n role=\"group\"\n tabIndex={0}\n rows={rows}\n aria-label={defaultAriaLabel}\n aria-describedby={uidDescribedBy}\n aria-roledescription={isDestinationPanel ? 'shuttle destination panel' : 'shuttle source panel'}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n innerRef={innerRefHandlerParentItem}\n >\n <Grid cols={cols} rows={rows}>\n <StyledA11yNoVisible id={uidDescribedBy}>{defaultAriaDescribedBy}</StyledA11yNoVisible>\n <ShuttleLoadingAnnouncement isLoading={isLoading} headerProps={headerProps} />\n {isLoading ? <LoadingItems {...panelMetaInfo} /> : null}\n {showEmptyMessage ? <EmptyItems {...panelMetaInfo} /> : null}\n {showItems ? <ItemListWrapperWithContext {...panelMetaInfo} /> : null}\n {hasMultipleSelection ? <MultipleSelectionAction {...panelMetaInfo} /> : null}\n </Grid>\n </StyledListWrapperMid>\n );\n});\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADuKjB;AArKN,mBAAmC;AACnC,uBAAuB;AACvB,qBAAqB;AACrB,gCAAmC;AACnC,sBAAgD;AAEhD,mBAA2C;AAC3C,wBAA2B;AAC3B,6BAAgC;AAChC,0BAA6B;AAC7B,qCAAwC;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}
|
|
@@ -36,6 +36,8 @@ var React = __toESM(require("react"));
|
|
|
36
36
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
37
37
|
var import_constants = require("./constants/index.js");
|
|
38
38
|
const defaultProps = {
|
|
39
|
+
// we start as false to avoid breaking changes, eventually converge to true for better accessibility
|
|
40
|
+
explicitSelectionUI: false,
|
|
39
41
|
addDragAndDropFromSource: false,
|
|
40
42
|
removeDragAndDropFromDestination: false,
|
|
41
43
|
destinationNoOptionsMessage: "There are no items to display",
|
|
@@ -74,12 +76,15 @@ const DSShuttleV2PropTypes = {
|
|
|
74
76
|
...(0, import_ds_props_helpers.getPropsPerSlotPropTypes)(import_constants.DSShuttleV2Name, import_constants.DSShuttleV2Slots),
|
|
75
77
|
...import_ds_props_helpers.globalAttributesPropTypes,
|
|
76
78
|
...import_ds_props_helpers.xstyledPropTypes,
|
|
79
|
+
explicitSelectionUI: import_ds_props_helpers.PropTypes.bool.description(
|
|
80
|
+
"A boolean indicating whether to use WCAG-compliant selection indicators (checkboxes) instead of color-only indicators for selected items, must be true for the component to meet WCAG 1.4.1 Use of Color guidelines"
|
|
81
|
+
).defaultValue(false),
|
|
77
82
|
sourceData: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.object).description(
|
|
78
83
|
"An array of objects representing the items in the source list"
|
|
79
84
|
).isRequired,
|
|
80
85
|
sourceSelectedItems: import_ds_props_helpers.PropTypes.object.description("An object representing the selected items in the source list").isRequired,
|
|
81
86
|
onSourceSelectionChange: import_ds_props_helpers.PropTypes.func.description("A function called when the selection in the source list changes").isRequired,
|
|
82
|
-
SourceHeader: import_ds_props_helpers.PropTypes.
|
|
87
|
+
SourceHeader: import_ds_props_helpers.PropTypes.elementType.description("The header component for the source list").isRequired,
|
|
83
88
|
sourceHeaderProps: import_ds_props_helpers.PropTypes.object.description("Props to be passed to the source header").defaultValue({}),
|
|
84
89
|
onSourceDrilldown: import_ds_props_helpers.PropTypes.func.description("A function called when an item in the source list is clicked").isRequired,
|
|
85
90
|
destinationData: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.object).description(
|
|
@@ -91,7 +96,7 @@ const DSShuttleV2PropTypes = {
|
|
|
91
96
|
onDestinationSelectionChange: import_ds_props_helpers.PropTypes.func.description(
|
|
92
97
|
"A function called when the selection in the destination list changes"
|
|
93
98
|
).isRequired,
|
|
94
|
-
DestinationHeader: import_ds_props_helpers.PropTypes.
|
|
99
|
+
DestinationHeader: import_ds_props_helpers.PropTypes.elementType.description("The header component for the destination list").isRequired,
|
|
95
100
|
destinationHeaderProps: import_ds_props_helpers.PropTypes.object.description("Props to be passed to the destination header").defaultValue({}),
|
|
96
101
|
onDestinationDrilldown: import_ds_props_helpers.PropTypes.func.description(
|
|
97
102
|
"A function called when an item in the destination list is clicked"
|