@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,159 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var React = __toESM(require("react"));
|
|
25
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
|
+
var import__ = require("../index.js");
|
|
27
|
+
const aDatum = { dsId: "1", label: "Team A", seed: 1, isBracket: false };
|
|
28
|
+
const testRequiredProps = {
|
|
29
|
+
destinationData: [],
|
|
30
|
+
sourceData: [aDatum],
|
|
31
|
+
DestinationHeader: () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "Destination" }),
|
|
32
|
+
SourceHeader: () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "Source" }),
|
|
33
|
+
destinationSelectedItems: {},
|
|
34
|
+
sourceSelectedItems: {},
|
|
35
|
+
onDestinationSelectionChange: () => null,
|
|
36
|
+
onSourceSelectionChange: () => null,
|
|
37
|
+
// hydraters receive the typed datum
|
|
38
|
+
getId: (item) => {
|
|
39
|
+
const { seed } = item;
|
|
40
|
+
return item.dsId;
|
|
41
|
+
},
|
|
42
|
+
getLabel: (item) => {
|
|
43
|
+
const { isBracket } = item;
|
|
44
|
+
return item.label;
|
|
45
|
+
},
|
|
46
|
+
// drilldown receives a single typed datum
|
|
47
|
+
onDestinationDrilldown: (item) => {
|
|
48
|
+
const { seed } = item;
|
|
49
|
+
},
|
|
50
|
+
onSourceDrilldown: (item) => {
|
|
51
|
+
const { seed } = item;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
const { sourceData } = testRequiredProps;
|
|
55
|
+
const { destinationData } = testRequiredProps;
|
|
56
|
+
const testOptionalProps = {
|
|
57
|
+
sourceItemProps: {},
|
|
58
|
+
destinationItemProps: {},
|
|
59
|
+
sourceHeaderProps: {},
|
|
60
|
+
destinationHeaderProps: {},
|
|
61
|
+
sourceShowSearchbar: true,
|
|
62
|
+
destinationShowSearchbar: true,
|
|
63
|
+
onSourceOpenSearchbar: () => null,
|
|
64
|
+
onDesinationOpenSearchbar: () => null,
|
|
65
|
+
sourceFilterValue: "",
|
|
66
|
+
destinationFilterValue: "",
|
|
67
|
+
onSourceFilterChange: (value) => null,
|
|
68
|
+
onDestinationFilterChange: (value) => null,
|
|
69
|
+
// moveButtonProps / drillDownButtonProps receive ItemMeta<TournamentDatum>
|
|
70
|
+
moveButtonProps: ({ itemMeta }) => {
|
|
71
|
+
const { seed } = itemMeta.datum;
|
|
72
|
+
return {};
|
|
73
|
+
},
|
|
74
|
+
drillDownButtonProps: ({ itemMeta }) => {
|
|
75
|
+
const { isBracket } = itemMeta.datum;
|
|
76
|
+
return {};
|
|
77
|
+
},
|
|
78
|
+
checkboxSelectAllProps: () => ({}),
|
|
79
|
+
areaSearchBarProps: () => ({}),
|
|
80
|
+
// item-level slot getter receives ItemMeta<TournamentDatum> → datum is TournamentDatum
|
|
81
|
+
dsShuttlev2ItemWrapper: (itemMeta) => {
|
|
82
|
+
const { datum } = itemMeta;
|
|
83
|
+
const { seed } = itemMeta.datum;
|
|
84
|
+
return { "aria-label": "typed datum slot" };
|
|
85
|
+
},
|
|
86
|
+
// mid-section slot getter receives ItemMidSectionArguments<TournamentDatum>
|
|
87
|
+
dsShuttlev2ItemMidsectionWrapper: (args) => {
|
|
88
|
+
const { seed } = args.datum;
|
|
89
|
+
return { "aria-label": "typed datum slot" };
|
|
90
|
+
},
|
|
91
|
+
// dual-context icon slot — datum reachable (and typed) via extraMetaInfo.itemMeta
|
|
92
|
+
dsShuttlev2ItemActionBtnToDestinationIcon: ({ panelMetaInfo, extraMetaInfo }) => {
|
|
93
|
+
const { isDestinationPanel } = panelMetaInfo;
|
|
94
|
+
const datum = extraMetaInfo?.itemMeta?.datum;
|
|
95
|
+
const seed = extraMetaInfo?.itemMeta?.datum.seed;
|
|
96
|
+
return { "aria-label": "typed datum slot" };
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
const testDefaultPropsPartial = {
|
|
100
|
+
onSourceAdd: (itemsArg) => {
|
|
101
|
+
const items = itemsArg;
|
|
102
|
+
const firstSeed = items[0]?.seed;
|
|
103
|
+
},
|
|
104
|
+
onSourceRemove: (itemsArg) => {
|
|
105
|
+
const items = itemsArg;
|
|
106
|
+
},
|
|
107
|
+
onDestinationAdd: (itemsArg) => {
|
|
108
|
+
const items = itemsArg;
|
|
109
|
+
},
|
|
110
|
+
onDestinationRemove: (itemsArg) => {
|
|
111
|
+
const items = itemsArg;
|
|
112
|
+
},
|
|
113
|
+
onSourceReorder: (movedItem) => {
|
|
114
|
+
const { seed } = movedItem;
|
|
115
|
+
},
|
|
116
|
+
onDestinationReorder: (movedItem) => {
|
|
117
|
+
const { seed } = movedItem;
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
const testProps = {
|
|
121
|
+
...testRequiredProps,
|
|
122
|
+
...testOptionalProps,
|
|
123
|
+
...testDefaultPropsPartial
|
|
124
|
+
};
|
|
125
|
+
const testInternalProps = {
|
|
126
|
+
...testRequiredProps,
|
|
127
|
+
...testOptionalProps,
|
|
128
|
+
...testDefaultPropsPartial
|
|
129
|
+
};
|
|
130
|
+
const BreadCrumb = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "Breadcrumb" });
|
|
131
|
+
const ExampleUsageComponent = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
132
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSShuttleV2, { ...testProps }),
|
|
133
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
134
|
+
import__.DSShuttleV2,
|
|
135
|
+
{
|
|
136
|
+
sourceData: [aDatum],
|
|
137
|
+
destinationData: [],
|
|
138
|
+
DestinationHeader: BreadCrumb,
|
|
139
|
+
SourceHeader: BreadCrumb,
|
|
140
|
+
destinationSelectedItems: {},
|
|
141
|
+
sourceSelectedItems: {},
|
|
142
|
+
onDestinationSelectionChange: () => null,
|
|
143
|
+
onSourceSelectionChange: () => null,
|
|
144
|
+
getId: (item) => item.dsId,
|
|
145
|
+
getLabel: (item) => item.label,
|
|
146
|
+
onDestinationDrilldown: (item) => {
|
|
147
|
+
const { seed } = item;
|
|
148
|
+
},
|
|
149
|
+
onSourceDrilldown: (item) => {
|
|
150
|
+
const { seed } = item;
|
|
151
|
+
},
|
|
152
|
+
onSourceAdd: (items) => {
|
|
153
|
+
const seed = items[0]?.seed;
|
|
154
|
+
},
|
|
155
|
+
dsShuttlev2ItemWrapper: (itemMeta) => ({ "data-seed": String(itemMeta.datum.seed) })
|
|
156
|
+
}
|
|
157
|
+
)
|
|
158
|
+
] });
|
|
159
|
+
//# sourceMappingURL=typescript-shuttle-v2-valid-with-datum.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-shuttle-v2-valid-with-datum.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { DSShuttleV2 } from '../index.js';\nimport type { DSShuttleV2T } from '../index.js';\n\n// =====================================================================================================\n// Typed-datum variant of typescript-shuttle-v2-valid.\n//\n// Same validity surface as the base file, but it supplies a CONCRETE datum type via the D generic and\n// asserts that D actually propagates: sourceData, hydraters, selection/drilldown/add/remove callbacks,\n// and every slot getter must surface `TournamentDatum` (not the default Record<string, unknown>).\n//\n// Each `const _x: <typed field> = ...` below reads a TournamentDatum-only field (e.g. `seed`). If the\n// generic ever stops flowing \u2014 datum collapsing back to Record<string, unknown> \u2014 `.seed` becomes\n// `unknown` and these assignments fail to compile. That is the shield.\n// =====================================================================================================\n\ninterface TournamentDatum extends Record<string, unknown> {\n dsId: string;\n label: string;\n seed: number;\n isBracket: boolean;\n}\n\ntype TypedProps = DSShuttleV2T.Props<TournamentDatum>;\ntype TypedInternalProps = DSShuttleV2T.InternalProps<TournamentDatum>;\ntype TypedDefaultProps = DSShuttleV2T.DefaultProps<TournamentDatum>;\ntype TypedOptionalProps = DSShuttleV2T.OptionalProps<TournamentDatum>;\ntype TypedRequiredProps = DSShuttleV2T.RequiredProps<TournamentDatum>;\n\nconst aDatum: TournamentDatum = { dsId: '1', label: 'Team A', seed: 1, isBracket: false };\n\nconst testRequiredProps: TypedRequiredProps = {\n destinationData: [],\n sourceData: [aDatum],\n DestinationHeader: () => <div>Destination</div>,\n SourceHeader: () => <div>Source</div>,\n destinationSelectedItems: {},\n sourceSelectedItems: {},\n onDestinationSelectionChange: () => null,\n onSourceSelectionChange: () => null,\n // hydraters receive the typed datum\n getId: (item) => {\n const { seed } = item;\n return item.dsId;\n },\n getLabel: (item) => {\n const { isBracket } = item;\n return item.label;\n },\n // drilldown receives a single typed datum\n onDestinationDrilldown: (item) => {\n const { seed } = item;\n },\n onSourceDrilldown: (item) => {\n const { seed } = item;\n },\n};\n\n// sourceData/destinationData are TournamentDatum arrays\nconst { sourceData } = testRequiredProps;\nconst { destinationData } = testRequiredProps;\n\nconst testOptionalProps: TypedOptionalProps = {\n sourceItemProps: {},\n destinationItemProps: {},\n sourceHeaderProps: {},\n destinationHeaderProps: {},\n sourceShowSearchbar: true,\n destinationShowSearchbar: true,\n onSourceOpenSearchbar: () => null,\n onDesinationOpenSearchbar: () => null,\n sourceFilterValue: '',\n destinationFilterValue: '',\n onSourceFilterChange: (value: string) => null,\n onDestinationFilterChange: (value: string) => null,\n\n // moveButtonProps / drillDownButtonProps receive ItemMeta<TournamentDatum>\n moveButtonProps: ({ itemMeta }) => {\n const { seed } = itemMeta.datum;\n return {};\n },\n drillDownButtonProps: ({ itemMeta }) => {\n const { isBracket } = itemMeta.datum;\n return {};\n },\n\n checkboxSelectAllProps: () => ({}),\n areaSearchBarProps: () => ({}),\n\n // item-level slot getter receives ItemMeta<TournamentDatum> \u2192 datum is TournamentDatum\n dsShuttlev2ItemWrapper: (itemMeta) => {\n const { datum } = itemMeta;\n const { seed } = itemMeta.datum;\n return { 'aria-label': 'typed datum slot' };\n },\n // mid-section slot getter receives ItemMidSectionArguments<TournamentDatum>\n dsShuttlev2ItemMidsectionWrapper: (args) => {\n const { seed } = args.datum;\n return { 'aria-label': 'typed datum slot' };\n },\n // dual-context icon slot \u2014 datum reachable (and typed) via extraMetaInfo.itemMeta\n dsShuttlev2ItemActionBtnToDestinationIcon: ({ panelMetaInfo, extraMetaInfo }) => {\n const { isDestinationPanel } = panelMetaInfo;\n const datum: TournamentDatum | undefined = extraMetaInfo?.itemMeta?.datum;\n const seed: number | undefined = extraMetaInfo?.itemMeta?.datum.seed;\n return { 'aria-label': 'typed datum slot' };\n },\n};\n\n// add/remove and reorder callbacks receive arrays / items of the typed datum\nconst testDefaultPropsPartial: Partial<TypedDefaultProps> = {\n onSourceAdd: (itemsArg) => {\n const items: TournamentDatum[] = itemsArg;\n const firstSeed: number | undefined = items[0]?.seed;\n },\n onSourceRemove: (itemsArg) => {\n const items: TournamentDatum[] = itemsArg;\n },\n onDestinationAdd: (itemsArg) => {\n const items: TournamentDatum[] = itemsArg;\n },\n onDestinationRemove: (itemsArg) => {\n const items: TournamentDatum[] = itemsArg;\n },\n onSourceReorder: (movedItem) => {\n const { seed } = movedItem;\n },\n onDestinationReorder: (movedItem) => {\n const { seed } = movedItem;\n },\n};\n\nconst testProps: TypedProps = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testDefaultPropsPartial,\n};\n\nconst testInternalProps: TypedInternalProps = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testDefaultPropsPartial,\n} as TypedInternalProps;\n\nconst BreadCrumb = () => <div>Breadcrumb</div>;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* spreading typed props keeps the datum generic */}\n <DSShuttleV2<TournamentDatum> {...testProps} />\n {/* explicit generic at the call site, inline values, with typed callbacks/getters */}\n <DSShuttleV2<TournamentDatum>\n sourceData={[aDatum]}\n destinationData={[]}\n DestinationHeader={BreadCrumb}\n SourceHeader={BreadCrumb}\n destinationSelectedItems={{}}\n sourceSelectedItems={{}}\n onDestinationSelectionChange={() => null}\n onSourceSelectionChange={() => null}\n getId={(item) => item.dsId}\n getLabel={(item) => item.label}\n onDestinationDrilldown={(item) => {\n const { seed } = item;\n }}\n onSourceDrilldown={(item) => {\n const { seed } = item;\n }}\n onSourceAdd={(items) => {\n const seed: number | undefined = items[0]?.seed;\n }}\n dsShuttlev2ItemWrapper={(itemMeta) => ({ 'data-seed': String(itemMeta.datum.seed) })}\n />\n </>\n);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACkCI;AAjC3B,eAA4B;AA4B5B,MAAM,SAA0B,EAAE,MAAM,KAAK,OAAO,UAAU,MAAM,GAAG,WAAW,MAAM;AAExF,MAAM,oBAAwC;AAAA,EAC5C,iBAAiB,CAAC;AAAA,EAClB,YAAY,CAAC,MAAM;AAAA,EACnB,mBAAmB,MAAM,4CAAC,SAAI,yBAAW;AAAA,EACzC,cAAc,MAAM,4CAAC,SAAI,oBAAM;AAAA,EAC/B,0BAA0B,CAAC;AAAA,EAC3B,qBAAqB,CAAC;AAAA,EACtB,8BAA8B,MAAM;AAAA,EACpC,yBAAyB,MAAM;AAAA;AAAA,EAE/B,OAAO,CAAC,SAAS;AACf,UAAM,EAAE,KAAK,IAAI;AACjB,WAAO,KAAK;AAAA,EACd;AAAA,EACA,UAAU,CAAC,SAAS;AAClB,UAAM,EAAE,UAAU,IAAI;AACtB,WAAO,KAAK;AAAA,EACd;AAAA;AAAA,EAEA,wBAAwB,CAAC,SAAS;AAChC,UAAM,EAAE,KAAK,IAAI;AAAA,EACnB;AAAA,EACA,mBAAmB,C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,MAAM,CAAC,GAAG;AAAA,MAC7C;AAAA,MACA,wBAAwB,CAAC,cAAc,EAAE,aAAa,OAAO,SAAS,MAAM,IAAI,EAAE;AAAA;AAAA,EACpF;AAAA,GACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -56,7 +56,6 @@ const testOptionalProps = {
|
|
|
56
56
|
moveButtonProps: () => ({}),
|
|
57
57
|
drillDownButtonProps: () => ({}),
|
|
58
58
|
checkboxSelectAllProps: () => ({}),
|
|
59
|
-
dsShuttleV2ListWrapperMid: () => ({}),
|
|
60
59
|
areaSearchBarProps: () => ({})
|
|
61
60
|
};
|
|
62
61
|
const testPartialDefaults = import_react_desc_prop_types.defaultProps;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-shuttle-v2-valid.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { DSShuttleV2 } from '../index.js';\nimport type { DSShuttleV2T } from '../index.js';\nimport { defaultProps } from '../react-desc-prop-types.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSShuttleV2T.Props
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACeI;AAd3B,eAA4B;AAE5B,mCAA6B;AAS7B,MAAM,oBAAiD;AAAA,EACrD,iBAAiB,CAAC;AAAA,EAClB,YAAY,CAAC;AAAA,EACb,mBAAmB,MAAM,4CAAC,SAAI,yBAAW;AAAA,EACzC,cAAc,MAAM,4CAAC,SAAI,oBAAM;AAAA,EAC/B,0BAA0B,CAAC;AAAA,EAC3B,qBAAqB,CAAC;AAAA,EACtB,8BAA8B,MAAM;AAAA,EACpC,yBAAyB,MAAM;AAAA,EAC/B,OAAO,CAAC,SAAU,KAA0B;AAAA,EAC5C,UAAU,CAAC,SAAU,KAA2B;AAAA,EAChD,wBAAwB,MAAM;AAAA,EAC9B,mBAAmB,MAAM;AAC3B;AACA,MAAM,oBAAiD;AAAA,EACrD,iBAAiB,CAAC;AAAA,EAClB,sBAAsB,CAAC;AAAA,EACvB,mBAAmB,CAAC;AAAA,EACpB,wBAAwB,CAAC;AAAA;AAAA,EAEzB,qBAAqB;AAAA,EACrB,0BAA0B;AAAA,EAC1B,uBAAuB,MAAM;AAAA,EAC7B,2BAA2B,MAAM;AAAA,EACjC,mBAAmB;AAAA,EACnB,wBAAwB;AAAA,EACxB,sBAAsB,CAAC,UAAkB;AAAA,EACzC,2BAA2B,CAAC,UAAkB;AAAA,EAE9C,iBAAiB,OAAO,CAAC;AAAA,EACzB,sBAAsB,OAAO,CAAC;AAAA,EAE9B,wBAAwB,OAAO,CAAC;AAAA,EAChC,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { DSShuttleV2 } from '../index.js';\nimport type { DSShuttleV2T } from '../index.js';\nimport { defaultProps } from '../react-desc-prop-types.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSShuttleV2T.Props;\ntype ComponentPropsInternals = DSShuttleV2T.InternalProps;\ntype ComponentPropsDefaultProps = DSShuttleV2T.DefaultProps;\ntype ComponentPropsOptionalProps = DSShuttleV2T.OptionalProps;\ntype ComponentPropsRequiredProps = DSShuttleV2T.RequiredProps;\n\nconst testRequiredProps: ComponentPropsRequiredProps = {\n destinationData: [],\n sourceData: [],\n DestinationHeader: () => <div>Destination</div>,\n SourceHeader: () => <div>Source</div>,\n destinationSelectedItems: {},\n sourceSelectedItems: {},\n onDestinationSelectionChange: () => null,\n onSourceSelectionChange: () => null,\n getId: (item) => (item as { dsId: string }).dsId,\n getLabel: (item) => (item as { label: string }).label,\n onDestinationDrilldown: () => null,\n onSourceDrilldown: () => null,\n};\nconst testOptionalProps: ComponentPropsOptionalProps = {\n sourceItemProps: {},\n destinationItemProps: {},\n sourceHeaderProps: {},\n destinationHeaderProps: {},\n // filtering\n sourceShowSearchbar: true,\n destinationShowSearchbar: true,\n onSourceOpenSearchbar: () => null,\n onDesinationOpenSearchbar: () => null,\n sourceFilterValue: '',\n destinationFilterValue: '',\n onSourceFilterChange: (value: string) => null,\n onDestinationFilterChange: (value: string) => null,\n\n moveButtonProps: () => ({}),\n drillDownButtonProps: () => ({}),\n\n checkboxSelectAllProps: () => ({}),\n areaSearchBarProps: () => ({}),\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = defaultProps;\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = defaultProps;\nconst testInternalProps: ComponentPropsInternals = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n destinationData: [],\n sourceData: [],\n DestinationHeader: () => <div>Destination</div>,\n SourceHeader: () => <div>Source</div>,\n destinationSelectedItems: {},\n sourceSelectedItems: {},\n onDestinationSelectionChange: () => null,\n onSourceSelectionChange: () => null,\n getId: (item) => (item as { dsId: string }).dsId,\n getLabel: (item) => (item as { label: string }).label,\n onDestinationDrilldown: () => null,\n onSourceDrilldown: () => null,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n destinationData: [],\n sourceData: [],\n DestinationHeader: () => <div>Destination</div>,\n SourceHeader: () => <div>Source</div>,\n destinationSelectedItems: {},\n sourceSelectedItems: {},\n onDestinationSelectionChange: () => null,\n onSourceSelectionChange: () => null,\n getId: (item) => (item as { dsId: string }).dsId,\n getLabel: (item) => (item as { label: string }).label,\n onDestinationDrilldown: () => null,\n onSourceDrilldown: () => null,\n} as ComponentPropsForApp;\n\nconst BreadCrumb = () => <div>Breadcrumb</div>;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSShuttleV2 {...testExplicitDefinition} />\n <DSShuttleV2 {...testInferedTypeCompatibility} />\n {/* works with inline values */}\n <DSShuttleV2\n destinationData={[]}\n sourceData={[]}\n DestinationHeader={BreadCrumb}\n SourceHeader={BreadCrumb}\n destinationSelectedItems={{}}\n sourceSelectedItems={{}}\n onDestinationSelectionChange={() => null}\n onSourceSelectionChange={() => null}\n getId={(item) => (item as { dsId: string }).dsId}\n getLabel={(item) => (item as { label: string }).label}\n onDestinationDrilldown={() => null}\n onSourceDrilldown={() => null}\n sourceShowSearchbar\n destinationShowSearchbar\n onSourceOpenSearchbar={() => null}\n onDesinationOpenSearchbar={() => null}\n sourceFilterValue=\"\"\n destinationFilterValue=\"\"\n onSourceFilterChange={(value: string) => null}\n onDestinationFilterChange={(value: string) => null}\n />\n </>\n);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACeI;AAd3B,eAA4B;AAE5B,mCAA6B;AAS7B,MAAM,oBAAiD;AAAA,EACrD,iBAAiB,CAAC;AAAA,EAClB,YAAY,CAAC;AAAA,EACb,mBAAmB,MAAM,4CAAC,SAAI,yBAAW;AAAA,EACzC,cAAc,MAAM,4CAAC,SAAI,oBAAM;AAAA,EAC/B,0BAA0B,CAAC;AAAA,EAC3B,qBAAqB,CAAC;AAAA,EACtB,8BAA8B,MAAM;AAAA,EACpC,yB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kB;AAAA,MACzC,2BAA2B,CAAC,UAAkB;AAAA;AAAA,EAChD;AAAA,GACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSShuttleV2.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { describe } from '@elliemae/ds-props-helpers';\nimport { withZustand } from '@elliemae/ds-zustand-helpers';\nimport { MainContent } from './parts/MainContent.js';\nimport { config } from './config/useStore/index.js';\nimport { DSShuttleV2PropTypesSchema } from './react-desc-prop-types.js';\nimport type { DSShuttleV2T } from './react-desc-prop-types.js';\n\nconst DSShuttleV2WithZustand = withZustand(MainContent, config);\n\nconst DSShuttleV2 = <
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { describe } from '@elliemae/ds-props-helpers';\nimport { withZustand } from '@elliemae/ds-zustand-helpers';\nimport { MainContent } from './parts/MainContent.js';\nimport { config } from './config/useStore/index.js';\nimport { DSShuttleV2PropTypesSchema } from './react-desc-prop-types.js';\nimport type { DSShuttleV2T } from './react-desc-prop-types.js';\n\nconst DSShuttleV2WithZustand = withZustand(MainContent, config);\n\nconst DSShuttleV2 = <D extends Record<string, unknown> = Record<string, unknown>>(\n props: DSShuttleV2T.Props<D>,\n // The internal zustand-wrapped tree operates on the default (erased) datum shape; the public\n // surface stays generic over D so consumers get typed data. Bridge the two with a single cast.\n): React.JSX.Element => <DSShuttleV2WithZustand {...(props as DSShuttleV2T.Props)} />;\n\nDSShuttleV2.displayName = 'DSShuttlev2';\nconst DSShuttleV2WithSchema = describe(DSShuttleV2);\n\nDSShuttleV2WithSchema.propTypes = DSShuttleV2PropTypesSchema;\n\nexport { DSShuttleV2, DSShuttleV2WithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACaC;AAbxB,SAAS,gBAAgB;AACzB,SAAS,mBAAmB;AAC5B,SAAS,mBAAmB;AAC5B,SAAS,cAAc;AACvB,SAAS,kCAAkC;AAG3C,MAAM,yBAAyB,YAAY,aAAa,MAAM;AAE9D,MAAM,cAAc,CAClB,UAGsB,oBAAC,0BAAwB,GAAI,OAA8B;AAEnF,YAAY,cAAc;AAC1B,MAAM,wBAAwB,SAAS,WAAW;AAElD,sBAAsB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/config/useAutoCalculated/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useMemo } from 'react';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types.js';\nimport { useDataStructure } from './useDataStructure.js';\nimport { useShuttleVirtualized } from './useShuttleVirtualized.js';\n\nexport const useAutoCalculated =
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,eAAe;AAExB,SAAS,wBAAwB;AACjC,SAAS,6BAA6B;AAE/B,MAAM,oBAAoB,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useMemo } from 'react';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types.js';\nimport { useDataStructure } from './useDataStructure.js';\nimport { useShuttleVirtualized } from './useShuttleVirtualized.js';\n\nexport const useAutoCalculated = (propsWithDefaults: DSShuttleV2T.InternalProps) => {\n const dataScructured = useDataStructure(propsWithDefaults);\n const virtualData = useShuttleVirtualized();\n\n return useMemo(() => ({ ...dataScructured, ...virtualData }), [dataScructured, virtualData]);\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,eAAe;AAExB,SAAS,wBAAwB;AACjC,SAAS,6BAA6B;AAE/B,MAAM,oBAAoB,CAAC,sBAAkD;AAClF,QAAM,iBAAiB,iBAAiB,iBAAiB;AACzD,QAAM,cAAc,sBAAsB;AAE1C,SAAO,QAAQ,OAAO,EAAE,GAAG,gBAAgB,GAAG,YAAY,IAAI,CAAC,gBAAgB,WAAW,CAAC;AAC7F;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/config/useAutoCalculated/useDataStructure.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useMemo } from 'react';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types.js';\n\ntype ConfigureDestinationConfig = {\n destinationData: DSShuttleV2T.Datum[];\n destinationSelectedItems: DSShuttleV2T.SelectionMap;\n destinationSoftDeletedItems: DSShuttleV2T.SoftDeletedMap;\n getId: DSShuttleV2T.PrimaryKeyHydraters['getId'];\n getPreventMove: DSShuttleV2T.FunctionalHydraters['getPreventMove'];\n};\nconst configureDestination = ({\n destinationData,\n destinationSelectedItems,\n destinationSoftDeletedItems,\n getId,\n getPreventMove,\n}: ConfigureDestinationConfig) => {\n const destinationSelectedItemsMap: Record<string, { datum: DSShuttleV2T.Datum; index: number }> = {};\n const destinationSelectionArray: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n const destinationSelectionableDataIds: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n\n const destinationSelectionItemArray: DSShuttleV2T.Datum[] = [];\n const destinationConfiguredData: DSShuttleV2T.ConfiguredDatum[] = [];\n const destinationSelectionableData: DSShuttleV2T.ConfiguredDatum[] = [];\n\n destinationData.forEach((datum, i) => {\n const hydratedId = getId(datum);\n const hydratedPreventMove = getPreventMove?.(datum, { isDestinationPanel: true }) ?? false;\n let isSelected = false;\n if (destinationSelectedItems[hydratedId] === true) {\n destinationSelectionItemArray.push(datum);\n destinationSelectionArray.push(hydratedId);\n isSelected = true;\n }\n let softDeleted = false;\n if (destinationSoftDeletedItems[hydratedId] === true) {\n softDeleted = true;\n }\n destinationSelectedItemsMap[hydratedId] = { datum, index: i };\n const configuredItem = {\n hydratedId,\n hydratedPreventMove,\n isSelected,\n softDeleted,\n original: datum,\n localIndex: i,\n isFirst: i === 0,\n isLast: i === destinationData.length - 1,\n } as const;\n destinationConfiguredData.push(configuredItem);\n if (!hydratedPreventMove && !softDeleted) {\n destinationSelectionableData.push(configuredItem);\n destinationSelectionableDataIds.push(`${hydratedId}`);\n }\n });\n const destinationHasMultipleSelectedItems = destinationSelectionArray.length >= 1;\n const destinationSelectionableIds = destinationSelectionableDataIds.join(' ');\n\n return {\n destinationSelectedItemsMap,\n destinationSelectionItemArray,\n destinationSelectionArray,\n destinationHasMultipleSelectedItems,\n destinationConfiguredData,\n destinationSelectionableData,\n destinationSelectionableDataIds,\n destinationSelectionableIds,\n };\n};\ntype ConfigureSourceConfig = {\n sourceData: DSShuttleV2T.Datum[];\n sourceSelectedItems: DSShuttleV2T.SelectionMap;\n sourceSoftDeletedItems: DSShuttleV2T.SoftDeletedMap;\n getId: DSShuttleV2T.PrimaryKeyHydraters['getId'];\n getPreventMove: DSShuttleV2T.FunctionalHydraters['getPreventMove'];\n};\n\nconst configureSource = ({\n sourceData,\n sourceSelectedItems,\n sourceSoftDeletedItems,\n getId,\n getPreventMove,\n}: ConfigureSourceConfig) => {\n const sourceSelectedItemsMap: Record<string, { datum: DSShuttleV2T.Datum; index: number }> = {};\n const sourceSelectionArray: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n const sourceSelectionableDataIds: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n\n const sourceSelectionItemArray: DSShuttleV2T.Datum[] = [];\n const sourceConfiguredData: DSShuttleV2T.ConfiguredDatum[] = [];\n const sourceSelectionableData: DSShuttleV2T.ConfiguredDatum[] = [];\n sourceData.forEach((datum, i) => {\n const hydratedId = getId(datum);\n const hydratedPreventMove = getPreventMove?.(datum, { isDestinationPanel: false }) ?? false;\n let isSelected = false;\n if (sourceSelectedItems[hydratedId] === true) {\n sourceSelectionItemArray.push(datum);\n sourceSelectionArray.push(hydratedId);\n isSelected = true;\n }\n let softDeleted = false;\n if (sourceSoftDeletedItems[hydratedId] === true) {\n softDeleted = true;\n }\n\n sourceSelectedItemsMap[hydratedId] = { datum, index: i };\n const configuredItem = {\n hydratedId,\n hydratedPreventMove,\n isSelected,\n softDeleted,\n original: datum,\n localIndex: i,\n isFirst: i === 0,\n isLast: i === sourceData.length - 1,\n } as const;\n sourceConfiguredData.push(configuredItem);\n if (!hydratedPreventMove && !softDeleted) {\n sourceSelectionableData.push(configuredItem);\n sourceSelectionableDataIds.push(`${hydratedId}`);\n }\n });\n const sourceHasMultipleSelectedItems = sourceSelectionArray.length >= 1;\n const sourceSelectionableIds = sourceSelectionableDataIds.join(' ');\n return {\n sourceConfiguredData,\n sourceSelectedItemsMap,\n sourceSelectionItemArray,\n sourceSelectionArray,\n sourceHasMultipleSelectedItems,\n sourceSelectionableData,\n sourceSelectionableDataIds,\n sourceSelectionableIds,\n };\n};\n\nexport const useDataStructure =
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,eAAe;AAUxB,MAAM,uBAAuB,CAAC;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAkC;AAChC,QAAM,8BAA4F,CAAC;AACnG,QAAM,4BAAwE,CAAC;AAC/E,QAAM,kCAA8E,CAAC;AAErF,QAAM,gCAAsD,CAAC;AAC7D,QAAM,4BAA4D,CAAC;AACnE,QAAM,+BAA+D,CAAC;AAEtE,kBAAgB,QAAQ,CAAC,OAAO,MAAM;AACpC,UAAM,aAAa,MAAM,KAAK;AAC9B,UAAM,sBAAsB,iBAAiB,OAAO,EAAE,oBAAoB,KAAK,CAAC,KAAK;AACrF,QAAI,aAAa;AACjB,QAAI,yBAAyB,UAAU,MAA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KAAK,UAAU;AACpC,mBAAa;AAAA,IACf;AACA,QAAI,cAAc;AAClB,QAAI,uBAAuB,UAAU,MAAM,MAAM;AAC/C,oBAAc;AAAA,IAChB;AAEA,2BAAuB,UAAU,IAAI,EAAE,OAAO,OAAO,EAAE;AACvD,UAAM,iBAAiB;AAAA,MACrB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MACV,YAAY;AAAA,MACZ,SAAS,MAAM;AAAA,MACf,QAAQ,MAAM,WAAW,SAAS;AAAA,IACpC;AACA,yBAAqB,KAAK,cAAc;AACxC,QAAI,CAAC,uBAAuB,CAAC,aAAa;AACxC,8BAAwB,KAAK,cAAc;AAC3C,iCAA2B,KAAK,GAAG,UAAU,EAAE;AAAA,IACjD;AAAA,EACF,CAAC;AACD,QAAM,iCAAiC,qBAAqB,UAAU;AACtE,QAAM,yBAAyB,2BAA2B,KAAK,GAAG;AAClE,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,MAAM,mBAAmB,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useMemo } from 'react';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types.js';\n\ntype ConfigureDestinationConfig = {\n destinationData: DSShuttleV2T.Datum[];\n destinationSelectedItems: DSShuttleV2T.SelectionMap;\n destinationSoftDeletedItems: DSShuttleV2T.SoftDeletedMap;\n getId: DSShuttleV2T.PrimaryKeyHydraters['getId'];\n getPreventMove: DSShuttleV2T.FunctionalHydraters['getPreventMove'];\n};\nconst configureDestination = ({\n destinationData,\n destinationSelectedItems,\n destinationSoftDeletedItems,\n getId,\n getPreventMove,\n}: ConfigureDestinationConfig) => {\n const destinationSelectedItemsMap: Record<string, { datum: DSShuttleV2T.Datum; index: number }> = {};\n const destinationSelectionArray: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n const destinationSelectionableDataIds: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n\n const destinationSelectionItemArray: DSShuttleV2T.Datum[] = [];\n const destinationConfiguredData: DSShuttleV2T.ConfiguredDatum[] = [];\n const destinationSelectionableData: DSShuttleV2T.ConfiguredDatum[] = [];\n\n destinationData.forEach((datum, i) => {\n const hydratedId = getId(datum);\n const hydratedPreventMove = getPreventMove?.(datum, { isDestinationPanel: true }) ?? false;\n let isSelected = false;\n if (destinationSelectedItems[hydratedId] === true) {\n destinationSelectionItemArray.push(datum);\n destinationSelectionArray.push(hydratedId);\n isSelected = true;\n }\n let softDeleted = false;\n if (destinationSoftDeletedItems[hydratedId] === true) {\n softDeleted = true;\n }\n destinationSelectedItemsMap[hydratedId] = { datum, index: i };\n const configuredItem = {\n hydratedId,\n hydratedPreventMove,\n isSelected,\n softDeleted,\n original: datum,\n localIndex: i,\n isFirst: i === 0,\n isLast: i === destinationData.length - 1,\n } as const;\n destinationConfiguredData.push(configuredItem);\n if (!hydratedPreventMove && !softDeleted) {\n destinationSelectionableData.push(configuredItem);\n destinationSelectionableDataIds.push(`${hydratedId}`);\n }\n });\n const destinationHasMultipleSelectedItems = destinationSelectionArray.length >= 1;\n const destinationSelectionableIds = destinationSelectionableDataIds.join(' ');\n\n return {\n destinationSelectedItemsMap,\n destinationSelectionItemArray,\n destinationSelectionArray,\n destinationHasMultipleSelectedItems,\n destinationConfiguredData,\n destinationSelectionableData,\n destinationSelectionableDataIds,\n destinationSelectionableIds,\n };\n};\ntype ConfigureSourceConfig = {\n sourceData: DSShuttleV2T.Datum[];\n sourceSelectedItems: DSShuttleV2T.SelectionMap;\n sourceSoftDeletedItems: DSShuttleV2T.SoftDeletedMap;\n getId: DSShuttleV2T.PrimaryKeyHydraters['getId'];\n getPreventMove: DSShuttleV2T.FunctionalHydraters['getPreventMove'];\n};\n\nconst configureSource = ({\n sourceData,\n sourceSelectedItems,\n sourceSoftDeletedItems,\n getId,\n getPreventMove,\n}: ConfigureSourceConfig) => {\n const sourceSelectedItemsMap: Record<string, { datum: DSShuttleV2T.Datum; index: number }> = {};\n const sourceSelectionArray: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n const sourceSelectionableDataIds: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n\n const sourceSelectionItemArray: DSShuttleV2T.Datum[] = [];\n const sourceConfiguredData: DSShuttleV2T.ConfiguredDatum[] = [];\n const sourceSelectionableData: DSShuttleV2T.ConfiguredDatum[] = [];\n sourceData.forEach((datum, i) => {\n const hydratedId = getId(datum);\n const hydratedPreventMove = getPreventMove?.(datum, { isDestinationPanel: false }) ?? false;\n let isSelected = false;\n if (sourceSelectedItems[hydratedId] === true) {\n sourceSelectionItemArray.push(datum);\n sourceSelectionArray.push(hydratedId);\n isSelected = true;\n }\n let softDeleted = false;\n if (sourceSoftDeletedItems[hydratedId] === true) {\n softDeleted = true;\n }\n\n sourceSelectedItemsMap[hydratedId] = { datum, index: i };\n const configuredItem = {\n hydratedId,\n hydratedPreventMove,\n isSelected,\n softDeleted,\n original: datum,\n localIndex: i,\n isFirst: i === 0,\n isLast: i === sourceData.length - 1,\n } as const;\n sourceConfiguredData.push(configuredItem);\n if (!hydratedPreventMove && !softDeleted) {\n sourceSelectionableData.push(configuredItem);\n sourceSelectionableDataIds.push(`${hydratedId}`);\n }\n });\n const sourceHasMultipleSelectedItems = sourceSelectionArray.length >= 1;\n const sourceSelectionableIds = sourceSelectionableDataIds.join(' ');\n return {\n sourceConfiguredData,\n sourceSelectedItemsMap,\n sourceSelectionItemArray,\n sourceSelectionArray,\n sourceHasMultipleSelectedItems,\n sourceSelectionableData,\n sourceSelectionableDataIds,\n sourceSelectionableIds,\n };\n};\n\nexport const useDataStructure = (propsFromUser: DSShuttleV2T.InternalProps) => {\n const {\n sourceData,\n sourceSelectedItems,\n destinationData,\n destinationSelectedItems,\n getId,\n getPreventMove,\n sourceSoftDeletedItems,\n destinationSoftDeletedItems,\n } = propsFromUser;\n return useMemo(\n () => ({\n ...configureSource({ sourceData, sourceSelectedItems, sourceSoftDeletedItems, getId, getPreventMove }),\n ...configureDestination({\n destinationData,\n destinationSelectedItems,\n destinationSoftDeletedItems,\n getId,\n getPreventMove,\n }),\n }),\n [\n sourceData,\n sourceSelectedItems,\n sourceSoftDeletedItems,\n getId,\n getPreventMove,\n destinationData,\n destinationSelectedItems,\n destinationSoftDeletedItems,\n ],\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,eAAe;AAUxB,MAAM,uBAAuB,CAAC;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAkC;AAChC,QAAM,8BAA4F,CAAC;AACnG,QAAM,4BAAwE,CAAC;AAC/E,QAAM,kCAA8E,CAAC;AAErF,QAAM,gCAAsD,CAAC;AAC7D,QAAM,4BAA4D,CAAC;AACnE,QAAM,+BAA+D,CAAC;AAEtE,kBAAgB,QAAQ,CAAC,OAAO,MAAM;AACpC,UAAM,aAAa,MAAM,KAAK;AAC9B,UAAM,sBAAsB,iBAAiB,OAAO,EAAE,oBAAoB,KAAK,CAAC,KAAK;AACrF,QAAI,aAAa;AACjB,QAAI,yBAAyB,UAAU,MAAM,MAAM;AACjD,oCAA8B,KAAK,KAAK;AACxC,gCAA0B,KAAK,UAAU;AACzC,mBAAa;AAAA,IACf;AACA,QAAI,cAAc;AAClB,QAAI,4BAA4B,UAAU,MAAM,MAAM;AACpD,oBAAc;AAAA,IAChB;AACA,gCAA4B,UAAU,IAAI,EAAE,OAAO,OAAO,EAAE;AAC5D,UAAM,iBAAiB;AAAA,MACrB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MACV,YAAY;AAAA,MACZ,SAAS,MAAM;AAAA,MACf,QAAQ,MAAM,gBAAgB,SAAS;AAAA,IACzC;AACA,8BAA0B,KAAK,cAAc;AAC7C,QAAI,CAAC,uBAAuB,CAAC,aAAa;AACxC,mCAA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AE;AAAA,IACjD;AAAA,EACF,CAAC;AACD,QAAM,iCAAiC,qBAAqB,UAAU;AACtE,QAAM,yBAAyB,2BAA2B,KAAK,GAAG;AAClE,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,MAAM,mBAAmB,CAAC,kBAA8C;AAC7E,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AACJ,SAAO;AAAA,IACL,OAAO;AAAA,MACL,GAAG,gBAAgB,EAAE,YAAY,qBAAqB,wBAAwB,OAAO,eAAe,CAAC;AAAA,MACrG,GAAG,qBAAqB;AAAA,QACtB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC;AAAA,IACH;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/config/useStore/useStore.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { createInternalAndPropsContext, type ZustandT } from '@elliemae/ds-zustand-helpers';\nimport { uid } from 'uid';\nimport deepequal from 'fast-deep-equal/react.js';\nimport { defaultProps, type DSShuttleV2T } from '../../react-desc-prop-types.js';\nimport { REGIONS_FOCUSES, ACTIONS_FOCUSES, ITEMS_FOCUSES } from '../../constants/index.js';\nimport { useAutoCalculated } from '../useAutoCalculated/index.js';\nimport { focusAndTabIndexManager } from './focusAndTabIndexManager.js';\n\nconst internalAtomDefaultValues: DSShuttleV2T.InternalAtoms = {\n focusRegion: REGIONS_FOCUSES.RESET,\n focusItem: ITEMS_FOCUSES.RESET,\n focusItemAction: ACTIONS_FOCUSES.RESET,\n deferFocusUntilFirstRender: false,\n dropIndicatorPosition: 'none',\n overId: '',\n lastActiveId: '',\n dndDraggingItem: null,\n dndDraggingItemMeta: null,\n isDropValid: false,\n sourcePanelLastSelectedItem: null,\n destinationPanelLastSelectedItem: null,\n shuttleInternalId: uid(),\n};\n\nconst selectors: ZustandT.SelectorObject<DSShuttleV2T.ShuttleInternalStore, DSShuttleV2T.Selectors> = (get) => ({\n getIsDragAndDropHappening: () => Boolean(get()?.lastActiveId) && get()?.lastActiveId !== '',\n getPanelLastSelectedItem: (isDestinationPanel: boolean) =>\n isDestinationPanel ? get()?.destinationPanelLastSelectedItem : get()?.sourcePanelLastSelectedItem,\n});\n\nconst reducers: ZustandT.ReducerObject<DSShuttleV2T.ShuttleInternalStore, DSShuttleV2T.Reducers> = () => ({});\n\nconst subscribers: ZustandT.Subscribers<DSShuttleV2T.ShuttleInternalStore> = (api) => {\n api.subscribe(\n (state) => [state.focusRegion, state.focusItem, state.focusItemAction, state.get] as const,\n focusAndTabIndexManager,\n {\n equalityFn: deepequal,\n },\n );\n};\n\nexport const { PropsProvider, usePropsStore, InternalProvider, useInternalStore } = createInternalAndPropsContext<\n DSShuttleV2T.InternalProps
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { createInternalAndPropsContext, type ZustandT } from '@elliemae/ds-zustand-helpers';\nimport { uid } from 'uid';\nimport deepequal from 'fast-deep-equal/react.js';\nimport { defaultProps, type DSShuttleV2T } from '../../react-desc-prop-types.js';\nimport { REGIONS_FOCUSES, ACTIONS_FOCUSES, ITEMS_FOCUSES } from '../../constants/index.js';\nimport { useAutoCalculated } from '../useAutoCalculated/index.js';\nimport { focusAndTabIndexManager } from './focusAndTabIndexManager.js';\n\nconst internalAtomDefaultValues: DSShuttleV2T.InternalAtoms = {\n focusRegion: REGIONS_FOCUSES.RESET,\n focusItem: ITEMS_FOCUSES.RESET,\n focusItemAction: ACTIONS_FOCUSES.RESET,\n deferFocusUntilFirstRender: false,\n dropIndicatorPosition: 'none',\n overId: '',\n lastActiveId: '',\n dndDraggingItem: null,\n dndDraggingItemMeta: null,\n isDropValid: false,\n sourcePanelLastSelectedItem: null,\n destinationPanelLastSelectedItem: null,\n shuttleInternalId: uid(),\n};\n\nconst selectors: ZustandT.SelectorObject<DSShuttleV2T.ShuttleInternalStore, DSShuttleV2T.Selectors> = (get) => ({\n getIsDragAndDropHappening: () => Boolean(get()?.lastActiveId) && get()?.lastActiveId !== '',\n getPanelLastSelectedItem: (isDestinationPanel: boolean) =>\n isDestinationPanel ? get()?.destinationPanelLastSelectedItem : get()?.sourcePanelLastSelectedItem,\n});\n\nconst reducers: ZustandT.ReducerObject<DSShuttleV2T.ShuttleInternalStore, DSShuttleV2T.Reducers> = () => ({});\n\nconst subscribers: ZustandT.Subscribers<DSShuttleV2T.ShuttleInternalStore> = (api) => {\n api.subscribe(\n (state) => [state.focusRegion, state.focusItem, state.focusItemAction, state.get] as const,\n focusAndTabIndexManager,\n {\n equalityFn: deepequal,\n },\n );\n};\n\nexport const { PropsProvider, usePropsStore, InternalProvider, useInternalStore } = createInternalAndPropsContext<\n DSShuttleV2T.InternalProps,\n DSShuttleV2T.InternalAtoms,\n DSShuttleV2T.UseAutoCalculatedT,\n DSShuttleV2T.Selectors,\n DSShuttleV2T.Reducers\n>();\n\nexport const config = {\n defaultProps: defaultProps as DSShuttleV2T.InternalProps,\n internalAtomDefaultValues,\n useAutoCalculated,\n selectors,\n reducers,\n subscribers,\n PropsProvider,\n usePropsStore,\n InternalProvider,\n useInternalStore,\n};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,qCAAoD;AAC7D,SAAS,WAAW;AACpB,OAAO,eAAe;AACtB,SAAS,oBAAuC;AAChD,SAAS,iBAAiB,iBAAiB,qBAAqB;AAChE,SAAS,yBAAyB;AAClC,SAAS,+BAA+B;AAExC,MAAM,4BAAwD;AAAA,EAC5D,aAAa,gBAAgB;AAAA,EAC7B,WAAW,cAAc;AAAA,EACzB,iBAAiB,gBAAgB;AAAA,EACjC,4BAA4B;AAAA,EAC5B,uBAAuB;AAAA,EACvB,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,aAAa;AAAA,EACb,6BAA6B;AAAA,EAC7B,kCAAkC;AAAA,EAClC,mBAAmB,IAAI;AACzB;AAEA,MAAM,YAAgG,CAAC,SAAS;AAAA,EAC9G,2BAA2B,MAAM,QAAQ,IAAI,GAAG,YAAY,KAAK,IAAI,GAAG,iBAAiB;AAAA,EACzF,0BAA0B,CAAC,uBACzB,qBAAqB,IAAI,GAAG,mCAAmC,IAAI,GAAG;AAC1E;AAEA,MAAM,WAA6F,OAAO,CAAC;AAE3G,MAAM,cAAuE,CAAC,QAAQ;AACpF,MAAI;AAAA,IACF,CAAC,UAAU,CAAC,MAAM,aAAa,MAAM,WAAW,MAAM,iBAAiB,MAAM,GAAG;AAAA,IAChF;AAAA,IACA;AAAA,MACE,YAAY;AAAA,IACd;AAAA,EACF;AACF;AAEO,MAAM,EAAE,eAAe,eAAe,kBAAkB,iBAAiB,IAAI,8BAMlF;AAEK,MAAM,SAAS;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useValidateProps.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { WeakValidationMap } from 'react';\nimport { DSShuttleV2Name } from '../constants/index.js';\nimport type { DSShuttleV2T } from '../react-desc-prop-types.js';\n\nexport const useValidateProps =
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,sCAAsC;AAE/C,SAAS,uBAAuB;AAGzB,MAAM,mBAAmB,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { WeakValidationMap } from 'react';\nimport { DSShuttleV2Name } from '../constants/index.js';\nimport type { DSShuttleV2T } from '../react-desc-prop-types.js';\n\nexport const useValidateProps = (props: DSShuttleV2T.Props, propTypes: WeakValidationMap<unknown>): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSShuttleV2Name);\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,sCAAsC;AAE/C,SAAS,uBAAuB;AAGzB,MAAM,mBAAmB,CAAC,OAA2B,cAAgD;AAE1G,iCAA+B,OAAO,WAAW,eAAe;AAClE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -12,6 +12,7 @@ const DSShuttleV2Slots = {
|
|
|
12
12
|
ITEM_LABEL_WRAPPER: "item-label-wrapper",
|
|
13
13
|
ITEM_MIDSECTION_WRAPPER: "item-midsection-wrapper",
|
|
14
14
|
ITEM_SELECTION: "item-selection",
|
|
15
|
+
ITEM_SELECTION_CHECKBOX_UI: "item-selection-checkbox-ui",
|
|
15
16
|
ITEM_ACTIONS_WRAPPER: "item-actions-wrapper",
|
|
16
17
|
ITEM_ACTION_WRAPPER: "item-action-wrapper",
|
|
17
18
|
ITEM_ACTION_BTN: "item-action-btn",
|
|
@@ -26,13 +27,14 @@ const DSShuttleV2Slots = {
|
|
|
26
27
|
LOADING_LIST_WRAPPER: "loading-list-wrapper",
|
|
27
28
|
MOVE_MULTIPLE_WRAPPER: "move-multiple-wrapper",
|
|
28
29
|
MOVE_MULTIPLE_BTN: "move-multiple-btn",
|
|
30
|
+
MOVE_MULTIPLE_LIVE_REGION: "move-multiple-live-region",
|
|
29
31
|
LIST_WRAPPER_MID: "list-wrapper-mid",
|
|
30
|
-
LIST_WRAPPER_MID_SCROLLER: "list-wrapper-mid-scroller",
|
|
31
32
|
LIST_WRAPPER_TOP: "list-wrapper-top",
|
|
32
33
|
AREA_SEARCH_WRAPPER: "area-search-wrapper",
|
|
33
34
|
AREA_SEARCH_BAR: "area-search-bar",
|
|
34
35
|
AREA_SELECTION_HEADER: "area-selection-header",
|
|
35
36
|
AREA_SELECTION_HEADER_COUNT_LABEL: "area-selection-header-count-label",
|
|
37
|
+
DRAG_AND_DROP_HANDLE_WRAPPER: "drag-and-drop-handle-wrapper",
|
|
36
38
|
DRAG_AND_DROP_HANDLE: "drag-and-drop-handle",
|
|
37
39
|
ARIA_LIVE_PANEL_CENTER: "aria-live-panel-center"
|
|
38
40
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/constants/index.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSShuttleV2Name = 'DSShuttlev2';\n\nexport const DSShuttleV2Slots = {\n HEADER_SEARCH_ICON: 'header-search-icon',\n WRAPPER: 'wrapper',\n PANEL_WRAPPER: 'panel-wrapper',\n LIST_WRAPPER: 'list-wrapper',\n ITEM_WRAPPER: 'item-wrapper',\n ITEM_CHECKBOX: 'item-checkbox',\n ITEM_ICON_WRAPPER: 'item-icon-wrapper',\n ITEM_LABEL_WRAPPER: 'item-label-wrapper',\n ITEM_MIDSECTION_WRAPPER: 'item-midsection-wrapper',\n ITEM_SELECTION: 'item-selection',\n ITEM_ACTIONS_WRAPPER: 'item-actions-wrapper',\n ITEM_ACTION_WRAPPER: 'item-action-wrapper',\n ITEM_ACTION_BTN: 'item-action-btn',\n ITEM_ACTION_BTN_DRILLDOWN_ICON: 'item-action-btn-drilldown-icon',\n ITEM_ACTION_BTN_TO_SOURCE_ICON: 'item-action-btn-to-source-icon',\n ITEM_ACTION_BTN_TO_DESTINATION_ICON: 'item-action-btn-to-destination-icon',\n LIST_BOTTOM_LOADING_MORE: 'list-bottom-loading-more',\n LIST_BOTTOM_LOAD_MORE_BTN: 'list-bottom-load-more-btn',\n LIST_WRAPPER_BOTTOM: 'list-wrapper-bottom',\n EMPTY_LIST_WRAPPER: 'empty-list-wrapper',\n ITEMS_WRAPPER: 'items-wrapper',\n LOADING_LIST_WRAPPER: 'loading-list-wrapper',\n MOVE_MULTIPLE_WRAPPER: 'move-multiple-wrapper',\n MOVE_MULTIPLE_BTN: 'move-multiple-btn',\n
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AAEjC,MAAM,kBAAkB;AAExB,MAAM,mBAAmB;AAAA,EAC9B,oBAAoB;AAAA,EACpB,SAAS;AAAA,EACT,eAAe;AAAA,EACf,cAAc;AAAA,EACd,cAAc;AAAA,EACd,eAAe;AAAA,EACf,mBAAmB;AAAA,EACnB,oBAAoB;AAAA,EACpB,yBAAyB;AAAA,EACzB,gBAAgB;AAAA,EAChB,sBAAsB;AAAA,EACtB,qBAAqB;AAAA,EACrB,iBAAiB;AAAA,EACjB,gCAAgC;AAAA,EAChC,gCAAgC;AAAA,EAChC,qCAAqC;AAAA,EACrC,0BAA0B;AAAA,EAC1B,2BAA2B;AAAA,EAC3B,qBAAqB;AAAA,EACrB,oBAAoB;AAAA,EACpB,eAAe;AAAA,EACf,sBAAsB;AAAA,EACtB,uBAAuB;AAAA,EACvB,mBAAmB;AAAA,EACnB,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSShuttleV2Name = 'DSShuttlev2';\n\nexport const DSShuttleV2Slots = {\n HEADER_SEARCH_ICON: 'header-search-icon',\n WRAPPER: 'wrapper',\n PANEL_WRAPPER: 'panel-wrapper',\n LIST_WRAPPER: 'list-wrapper',\n ITEM_WRAPPER: 'item-wrapper',\n ITEM_CHECKBOX: 'item-checkbox',\n ITEM_ICON_WRAPPER: 'item-icon-wrapper',\n ITEM_LABEL_WRAPPER: 'item-label-wrapper',\n ITEM_MIDSECTION_WRAPPER: 'item-midsection-wrapper',\n ITEM_SELECTION: 'item-selection',\n ITEM_SELECTION_CHECKBOX_UI: 'item-selection-checkbox-ui',\n ITEM_ACTIONS_WRAPPER: 'item-actions-wrapper',\n ITEM_ACTION_WRAPPER: 'item-action-wrapper',\n ITEM_ACTION_BTN: 'item-action-btn',\n ITEM_ACTION_BTN_DRILLDOWN_ICON: 'item-action-btn-drilldown-icon',\n ITEM_ACTION_BTN_TO_SOURCE_ICON: 'item-action-btn-to-source-icon',\n ITEM_ACTION_BTN_TO_DESTINATION_ICON: 'item-action-btn-to-destination-icon',\n LIST_BOTTOM_LOADING_MORE: 'list-bottom-loading-more',\n LIST_BOTTOM_LOAD_MORE_BTN: 'list-bottom-load-more-btn',\n LIST_WRAPPER_BOTTOM: 'list-wrapper-bottom',\n EMPTY_LIST_WRAPPER: 'empty-list-wrapper',\n ITEMS_WRAPPER: 'items-wrapper',\n LOADING_LIST_WRAPPER: 'loading-list-wrapper',\n MOVE_MULTIPLE_WRAPPER: 'move-multiple-wrapper',\n MOVE_MULTIPLE_BTN: 'move-multiple-btn',\n MOVE_MULTIPLE_LIVE_REGION: 'move-multiple-live-region',\n LIST_WRAPPER_MID: 'list-wrapper-mid',\n LIST_WRAPPER_TOP: 'list-wrapper-top',\n AREA_SEARCH_WRAPPER: 'area-search-wrapper',\n AREA_SEARCH_BAR: 'area-search-bar',\n AREA_SELECTION_HEADER: 'area-selection-header',\n AREA_SELECTION_HEADER_COUNT_LABEL: 'area-selection-header-count-label',\n DRAG_AND_DROP_HANDLE_WRAPPER: 'drag-and-drop-handle-wrapper',\n DRAG_AND_DROP_HANDLE: 'drag-and-drop-handle',\n ARIA_LIVE_PANEL_CENTER: 'aria-live-panel-center',\n} as const;\n\nexport const SHUTTLE_IDS = {\n SOURCE_PANEL_SEARCH: 'ds-shuttle-v2-source-panel-search',\n DESTINATION_PANEL_SEARCH: 'ds-shuttle-v2-destination-panel-search',\n} as const;\n\nexport const DSShuttleV2DataTestIds = slotObjectToDataTestIds(DSShuttleV2Name, DSShuttleV2Slots);\n\nexport const REGIONS_FOCUSES = {\n SOURCE_HEADER: 'source-header',\n SOURCE_PANEL: 'source-panel',\n SOURCE_PANEL_ITEM: 'source-panel-item',\n SOURCE_PANEL_ITEM_MOVE_ALL: 'source-panel-move-all',\n SOURCE_BOTTOM: 'source-bottom',\n DESTINATION_HEADER: 'destination-header',\n DESTINATION_PANEL: 'destination-panel',\n DESTINATION_PANEL_ITEM: 'destination-panel-item',\n DESTINATION_PANEL_ITEM_MOVE_ALL: 'destination-panel-move-all',\n DESTINATION_BOTTOM: 'destination-bottom',\n RESET: '',\n} as const;\n\nexport const ACTIONS_FOCUSES = {\n MOVE_BTN: 'move-btn',\n DRILLDOWN_BTN: 'drilldown-btn',\n DRAG_N_DROP: 'drag-n-drop',\n PARENT: 'parent',\n RESET: '',\n} as const;\n\nexport const ITEMS_FOCUSES = {\n LOAD_MORE_BTN_SOURCE: 'load-more-btn-source',\n LOAD_MORE_BTN_DESTINATION: 'load-more-btn-destination',\n GET_SPECIFIC_ITEM: ({ hydratedId }: { hydratedId: string }) => hydratedId,\n RESET: '',\n} as const;\n\nexport const DATA_TESTID = {\n SHUTTLE_DRAG_HANDLE: 'shuttle-drag-handle',\n} as const;\n\nexport const DropIndicatorPosition = {\n None: 'none',\n Before: 'before',\n After: 'after',\n Inside: 'inside',\n} as const;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AAEjC,MAAM,kBAAkB;AA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;AAAA,EACtB,2BAA2B;AAAA,EAC3B,mBAAmB,CAAC,EAAE,WAAW,MAA8B;AAAA,EAC/D,OAAO;AACT;AAEO,MAAM,cAAc;AAAA,EACzB,qBAAqB;AACvB;AAEO,MAAM,wBAAwB;AAAA,EACnC,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,QAAQ;AACV;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,14 +1,26 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useFloatingContext, FloatingWrapper, PopoverArrow } from "@elliemae/ds-floating-context";
|
|
3
4
|
import { Grid } from "@elliemae/ds-grid";
|
|
4
|
-
import {
|
|
5
|
-
import { styled } from "@elliemae/ds-system";
|
|
5
|
+
import { styled, mergeRefs } from "@elliemae/ds-system";
|
|
6
6
|
const StyledTooltipContentWrapper = styled(Grid)`
|
|
7
7
|
background: white;
|
|
8
8
|
`;
|
|
9
9
|
const ShuttleItem = (props) => {
|
|
10
10
|
const { componentProps, shouldShowTooltip = true, TooltipContent = null, children } = props;
|
|
11
11
|
const { tooltipHelpers } = componentProps;
|
|
12
|
+
const isOpen = !!(shouldShowTooltip && TooltipContent && tooltipHelpers?.shouldShowPopover);
|
|
13
|
+
const {
|
|
14
|
+
refs,
|
|
15
|
+
floatingStyles,
|
|
16
|
+
arrowStyles,
|
|
17
|
+
context,
|
|
18
|
+
isOpen: isFloatingOpen
|
|
19
|
+
} = useFloatingContext({
|
|
20
|
+
externallyControlledIsOpen: isOpen,
|
|
21
|
+
withoutAnimation: true,
|
|
22
|
+
customOffset: [0, 14]
|
|
23
|
+
});
|
|
12
24
|
return /* @__PURE__ */ jsxs(
|
|
13
25
|
Grid,
|
|
14
26
|
{
|
|
@@ -16,10 +28,22 @@ const ShuttleItem = (props) => {
|
|
|
16
28
|
alignItems: "center",
|
|
17
29
|
justifyContent: "center",
|
|
18
30
|
gutter: "xxxs",
|
|
19
|
-
ref: tooltipHelpers?.setReferenceElement,
|
|
31
|
+
ref: mergeRefs(tooltipHelpers?.setReferenceElement, refs.setReference),
|
|
20
32
|
children: [
|
|
21
33
|
children,
|
|
22
|
-
shouldShowTooltip && TooltipContent &&
|
|
34
|
+
shouldShowTooltip && TooltipContent && /* @__PURE__ */ jsxs(
|
|
35
|
+
FloatingWrapper,
|
|
36
|
+
{
|
|
37
|
+
innerRef: refs.setFloating,
|
|
38
|
+
isOpen: isFloatingOpen,
|
|
39
|
+
floatingStyles,
|
|
40
|
+
context,
|
|
41
|
+
children: [
|
|
42
|
+
/* @__PURE__ */ jsx(StyledTooltipContentWrapper, { children: /* @__PURE__ */ jsx(TooltipContent, { ...componentProps }) }),
|
|
43
|
+
/* @__PURE__ */ jsx(PopoverArrow, { ...arrowStyles })
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
)
|
|
23
47
|
]
|
|
24
48
|
}
|
|
25
49
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/exported-related/ShuttleItem.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { useFloatingContext, FloatingWrapper, PopoverArrow } from '@elliemae/ds-floating-context';\nimport { Grid } from '@elliemae/ds-grid';\nimport { styled, mergeRefs } from '@elliemae/ds-system';\nimport type { DSShuttleV2T } from '../react-desc-prop-types.js';\n\nconst StyledTooltipContentWrapper = styled(Grid)`\n background: white;\n`;\n\nexport type ShuttleItemProps = React.PropsWithChildren<{\n componentProps: DSShuttleV2T.ComponentProps;\n shouldShowTooltip?: boolean;\n TooltipContent?: React.ComponentType<DSShuttleV2T.ComponentProps>;\n}>;\n\n// for now we create a stud state and return a paragraph with the state while logging the props\nexport const ShuttleItem: React.ComponentType<ShuttleItemProps> = (props) => {\n const { componentProps, shouldShowTooltip = true, TooltipContent = null, children } = props;\n const { tooltipHelpers } = componentProps;\n\n const isOpen = !!(shouldShowTooltip && TooltipContent && tooltipHelpers?.shouldShowPopover);\n const {\n refs,\n floatingStyles,\n arrowStyles,\n context,\n isOpen: isFloatingOpen,\n } = useFloatingContext({\n externallyControlledIsOpen: isOpen,\n withoutAnimation: true,\n customOffset: [0, 14],\n });\n\n return (\n <Grid\n cols={['minmax(2.308rem, 1fr)', '1px', 'auto']}\n alignItems=\"center\"\n justifyContent=\"center\"\n gutter=\"xxxs\"\n ref={mergeRefs(tooltipHelpers?.setReferenceElement, refs.setReference)}\n >\n {children}\n {shouldShowTooltip && TooltipContent && (\n <FloatingWrapper\n innerRef={refs.setFloating}\n isOpen={isFloatingOpen}\n floatingStyles={floatingStyles}\n context={context}\n >\n <StyledTooltipContentWrapper>\n <TooltipContent {...componentProps} />\n </StyledTooltipContentWrapper>\n <PopoverArrow {...arrowStyles} />\n </FloatingWrapper>\n )}\n </Grid>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC4Cf,SAOI,KAPJ;AA3CR,SAAS,oBAAoB,iBAAiB,oBAAoB;AAClE,SAAS,YAAY;AACrB,SAAS,QAAQ,iBAAiB;AAGlC,MAAM,8BAA8B,OAAO,IAAI;AAAA;AAAA;AAWxC,MAAM,cAAqD,CAAC,UAAU;AAC3E,QAAM,EAAE,gBAAgB,oBAAoB,MAAM,iBAAiB,MAAM,SAAS,IAAI;AACtF,QAAM,EAAE,eAAe,IAAI;AAE3B,QAAM,SAAS,CAAC,EAAE,qBAAqB,kBAAkB,gBAAgB;AACzE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,EACV,IAAI,mBAAmB;AAAA,IACrB,4BAA4B;AAAA,IAC5B,kBAAkB;AAAA,IAClB,cAAc,CAAC,GAAG,EAAE;AAAA,EACtB,CAAC;AAED,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,CAAC,yBAAyB,OAAO,MAAM;AAAA,MAC7C,YAAW;AAAA,MACX,gBAAe;AAAA,MACf,QAAO;AAAA,MACP,KAAK,UAAU,gBAAgB,qBAAqB,KAAK,YAAY;AAAA,MAEpE;AAAA;AAAA,QACA,qBAAqB,kBACpB;AAAA,UAAC;AAAA;AAAA,YACC,UAAU,KAAK;AAAA,YACf,QAAQ;AAAA,YACR;AAAA,YACA;AAAA,YAEA;AAAA,kCAAC,+BACC,8BAAC,kBAAgB,GAAG,gBAAgB,GACtC;AAAA,cACA,oBAAC,gBAAc,GAAG,aAAa;AAAA;AAAA;AAAA,QACjC;AAAA;AAAA;AAAA,EAEJ;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { createElement } from "react";
|
|
4
|
-
import React2 from "react";
|
|
5
4
|
import { GripperVertical } from "@elliemae/ds-icons";
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
5
|
+
import { mergeRefs, styled } from "@elliemae/ds-system";
|
|
6
|
+
import React2 from "react";
|
|
8
7
|
import { usePropsStore } from "../../config/useStore/useStore.js";
|
|
8
|
+
import { DATA_TESTID, DSShuttleV2Name, DSShuttleV2Slots } from "../../constants/index.js";
|
|
9
9
|
const StyledGripperButtonOrOverlay = styled("div", {
|
|
10
10
|
name: DSShuttleV2Name,
|
|
11
11
|
slot: DSShuttleV2Slots.DRAG_AND_DROP_HANDLE
|
|
@@ -19,37 +19,63 @@ const StyledGripperButtonOrOverlay = styled("div", {
|
|
|
19
19
|
display: flex;
|
|
20
20
|
align-items: center;
|
|
21
21
|
touch-action: none;
|
|
22
|
+
display: flex;
|
|
23
|
+
min-width: 24px;
|
|
24
|
+
justify-content: center;
|
|
22
25
|
&:focus {
|
|
23
|
-
|
|
26
|
+
.em-ds-icon {
|
|
27
|
+
outline: 2px solid brand-700;
|
|
28
|
+
}
|
|
24
29
|
}
|
|
25
30
|
`;
|
|
31
|
+
const StyledGripperWrapper = styled("div", {
|
|
32
|
+
name: DSShuttleV2Name,
|
|
33
|
+
slot: DSShuttleV2Slots.DRAG_AND_DROP_HANDLE_WRAPPER
|
|
34
|
+
})`
|
|
35
|
+
display: flex;
|
|
36
|
+
height: 100%;
|
|
37
|
+
position: relative;
|
|
38
|
+
`;
|
|
26
39
|
const DragHandle = (props) => {
|
|
27
40
|
const { id, isDndActive, isDragging, disabled = false, innerRef, useSortableHelpers, ariaLabelledby } = props;
|
|
28
41
|
const getOwnerProps = usePropsStore((store) => store.get);
|
|
29
42
|
const getOwnerPropsArguments = React2.useCallback(() => props, [props]);
|
|
30
|
-
|
|
31
|
-
|
|
43
|
+
const stopPropagation = React2.useCallback((event) => {
|
|
44
|
+
event.stopPropagation();
|
|
45
|
+
}, []);
|
|
46
|
+
return /* @__PURE__ */ jsx(
|
|
47
|
+
StyledGripperWrapper,
|
|
32
48
|
{
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
...useSortableHelpers.attributes
|
|
36
|
-
} : {},
|
|
37
|
-
"aria-labelledby": ariaLabelledby,
|
|
38
|
-
isActive: isDndActive,
|
|
39
|
-
innerRef: mergeRefs(innerRef, useSortableHelpers?.setActivatorNodeRef),
|
|
40
|
-
tabIndex: -1,
|
|
41
|
-
"data-testid": DATA_TESTID.SHUTTLE_DRAG_HANDLE,
|
|
42
|
-
id: `${id}-drag-handle`,
|
|
43
|
-
key: `${id}-drag-handle`,
|
|
44
|
-
disabled,
|
|
49
|
+
onClick: stopPropagation,
|
|
50
|
+
onMouseDown: stopPropagation,
|
|
45
51
|
getOwnerProps,
|
|
46
|
-
getOwnerPropsArguments
|
|
47
|
-
|
|
48
|
-
|
|
52
|
+
getOwnerPropsArguments,
|
|
53
|
+
children: /* @__PURE__ */ createElement(
|
|
54
|
+
StyledGripperButtonOrOverlay,
|
|
55
|
+
{
|
|
56
|
+
...!disabled && useSortableHelpers ? {
|
|
57
|
+
...useSortableHelpers.listeners,
|
|
58
|
+
...useSortableHelpers.attributes
|
|
59
|
+
} : {},
|
|
60
|
+
"aria-labelledby": ariaLabelledby,
|
|
61
|
+
isActive: isDndActive,
|
|
62
|
+
innerRef: mergeRefs(innerRef, useSortableHelpers?.setActivatorNodeRef),
|
|
63
|
+
tabIndex: -1,
|
|
64
|
+
"data-testid": DATA_TESTID.SHUTTLE_DRAG_HANDLE,
|
|
65
|
+
id: `${id}-drag-handle`,
|
|
66
|
+
key: `${id}-drag-handle`,
|
|
67
|
+
disabled,
|
|
68
|
+
getOwnerProps,
|
|
69
|
+
getOwnerPropsArguments
|
|
70
|
+
},
|
|
71
|
+
/* @__PURE__ */ jsx(GripperVertical, { color: isDragging || disabled ? ["neutral", "500"] : ["brand-primary", "800"] })
|
|
72
|
+
)
|
|
73
|
+
}
|
|
49
74
|
);
|
|
50
75
|
};
|
|
51
76
|
export {
|
|
52
77
|
DragHandle,
|
|
53
|
-
StyledGripperButtonOrOverlay
|
|
78
|
+
StyledGripperButtonOrOverlay,
|
|
79
|
+
StyledGripperWrapper
|
|
54
80
|
};
|
|
55
81
|
//# sourceMappingURL=DndHandle.js.map
|