@elliemae/ds-shuttle-v2 3.70.0-next.7 → 3.70.0-next.71
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/package.json +1 -4
- 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/package.json +1 -4
- 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/Header.d.ts +1 -1
- package/dist/types/parts/Item/Item.d.ts +1 -4
- package/dist/types/parts/Item/ItemActions/ItemActions.d.ts +1 -1
- package/dist/types/parts/Item/ItemActions/{useInnerRefHandlers.d.ts → useInnerRefActionHandlers.d.ts} +1 -1
- package/dist/types/parts/Item/ItemMiddleSection.d.ts +1 -1
- package/dist/types/parts/Item/ItemOverlay.d.ts +1 -1
- package/dist/types/parts/Item/ItemSelectionUi/CheckboxSelectionUI.d.ts +3 -0
- package/dist/types/parts/Item/ItemSelectionUi/ItemSelectionUI.d.ts +3 -0
- package/dist/types/parts/Item/ItemSelectionUi/ItemSelectionUI.types.d.ts +11 -0
- package/dist/types/parts/Item/ItemSelectionUi/VerticalBarSelectionUI.d.ts +3 -0
- package/dist/types/parts/Item/TextSection.d.ts +1 -1
- package/dist/types/parts/Item/useItemInnerRefHandlers.d.ts +5 -0
- package/dist/types/parts/MainContent.d.ts +1 -1
- package/dist/types/parts/Panel/bottom/LoadMoreBtn.d.ts +2 -1
- package/dist/types/parts/Panel/bottom/LoadingMore.d.ts +2 -1
- package/dist/types/parts/Panel/bottom/PanelContentBottomSection.d.ts +1 -1
- package/dist/types/parts/Panel/bottom/{useInnerRefHandlers.d.ts → useLoadMoreBtnInnerRefHandlers.d.ts} +1 -1
- package/dist/types/parts/Panel/middle/EmptyItems.d.ts +2 -1
- package/dist/types/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.d.ts +2 -2
- package/dist/types/parts/Panel/middle/LoadingItems.d.ts +2 -1
- package/dist/types/parts/Panel/middle/MultipleSelectionAction.d.ts +1 -1
- package/dist/types/parts/Panel/middle/PanelContentMiddleSection.d.ts +1 -1
- package/dist/types/parts/Panel/middle/ShuttleLoadingAnnouncement.d.ts +1 -1
- package/dist/types/parts/Panel/top/AriaLivePanelCenter.d.ts +2 -1
- package/dist/types/parts/Panel/top/PanelContentTopSection.d.ts +2 -1
- package/dist/types/parts/Panel/top/PanelFilterSection.d.ts +2 -1
- package/dist/types/parts/Panel/top/SelectionHeader.d.ts +1 -1
- package/dist/types/parts/PanelWrapper.d.ts +1 -1
- package/dist/types/react-desc-prop-types.d.ts +111 -57
- package/package.json +29 -29
- 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,158 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
const SlotPropsAsObj = {
|
|
3
|
+
// Panel-level
|
|
4
|
+
dsShuttlev2PanelWrapper: { "aria-label": "just a typescript test" },
|
|
5
|
+
dsShuttlev2ListWrapper: { "aria-label": "just a typescript test" },
|
|
6
|
+
dsShuttlev2HeaderSearchIcon: { "aria-label": "just a typescript test" },
|
|
7
|
+
dsShuttlev2ListWrapperTop: { "aria-label": "just a typescript test" },
|
|
8
|
+
dsShuttlev2AreaSearchWrapper: { "aria-label": "just a typescript test" },
|
|
9
|
+
dsShuttlev2AreaSearchBar: { "aria-label": "just a typescript test" },
|
|
10
|
+
dsShuttlev2AreaSelectionHeader: { "aria-label": "just a typescript test" },
|
|
11
|
+
dsShuttlev2AreaSelectionHeaderCountLabel: { "aria-label": "just a typescript test" },
|
|
12
|
+
dsShuttlev2AriaLivePanelCenter: { "aria-label": "just a typescript test" },
|
|
13
|
+
dsShuttlev2ListWrapperMid: { "aria-label": "just a typescript test" },
|
|
14
|
+
dsShuttlev2ItemsWrapper: { "aria-label": "just a typescript test" },
|
|
15
|
+
dsShuttlev2MoveMultipleWrapper: { "aria-label": "just a typescript test" },
|
|
16
|
+
dsShuttlev2MoveMultipleBtn: { "aria-label": "just a typescript test" },
|
|
17
|
+
dsShuttlev2MoveMultipleLiveRegion: { "aria-label": "just a typescript test" },
|
|
18
|
+
dsShuttlev2EmptyListWrapper: { "aria-label": "just a typescript test" },
|
|
19
|
+
dsShuttlev2LoadingListWrapper: { "aria-label": "just a typescript test" },
|
|
20
|
+
dsShuttlev2ListBottomLoadingMore: { "aria-label": "just a typescript test" },
|
|
21
|
+
dsShuttlev2ListBottomLoadMoreBtn: { "aria-label": "just a typescript test" },
|
|
22
|
+
dsShuttlev2ListWrapperBottom: { "aria-label": "just a typescript test" },
|
|
23
|
+
// Item-level
|
|
24
|
+
dsShuttlev2ItemWrapper: { "aria-label": "just a typescript test" },
|
|
25
|
+
dsShuttlev2ItemCheckbox: { "aria-label": "just a typescript test" },
|
|
26
|
+
dsShuttlev2ItemSelection: { "aria-label": "just a typescript test" },
|
|
27
|
+
dsShuttlev2ItemLabelWrapper: { "aria-label": "just a typescript test" },
|
|
28
|
+
dsShuttlev2ItemActionsWrapper: { "aria-label": "just a typescript test" },
|
|
29
|
+
dsShuttlev2ItemActionWrapper: { "aria-label": "just a typescript test" },
|
|
30
|
+
dsShuttlev2ItemActionBtn: { "aria-label": "just a typescript test" },
|
|
31
|
+
dsShuttlev2ItemActionBtnDrilldownIcon: { "aria-label": "just a typescript test" },
|
|
32
|
+
// Item-level with tooltipHelpers
|
|
33
|
+
dsShuttlev2ItemMidsectionWrapper: { "aria-label": "just a typescript test" },
|
|
34
|
+
dsShuttlev2ItemIconWrapper: { "aria-label": "just a typescript test" },
|
|
35
|
+
// Dual-context
|
|
36
|
+
dsShuttlev2ItemActionBtnToSourceIcon: { "aria-label": "just a typescript test" },
|
|
37
|
+
dsShuttlev2ItemActionBtnToDestinationIcon: { "aria-label": "just a typescript test" },
|
|
38
|
+
// Drag-and-drop
|
|
39
|
+
dsShuttlev2DragAndDropHandleWrapper: { "aria-label": "just a typescript test" },
|
|
40
|
+
dsShuttlev2DragAndDropHandle: { "aria-label": "just a typescript test" },
|
|
41
|
+
// Root wrapper
|
|
42
|
+
dsShuttlev2Wrapper: { "aria-label": "just a typescript test" }
|
|
43
|
+
};
|
|
44
|
+
const testReturn = { "aria-label": "just a typescript test" };
|
|
45
|
+
const panelMetaProbe = (args) => {
|
|
46
|
+
const { isDestinationPanel, hasMultipleSelection, height } = args;
|
|
47
|
+
const _isDestinationPanel = isDestinationPanel;
|
|
48
|
+
const _hasMultipleSelection = hasMultipleSelection;
|
|
49
|
+
const _height = height;
|
|
50
|
+
return testReturn;
|
|
51
|
+
};
|
|
52
|
+
const itemMetaProbe = (args) => {
|
|
53
|
+
const {
|
|
54
|
+
isDestinationPanel,
|
|
55
|
+
hasMultipleSelection,
|
|
56
|
+
height,
|
|
57
|
+
datum,
|
|
58
|
+
datumHydratables,
|
|
59
|
+
datumInternalMeta,
|
|
60
|
+
datumRenderFlags,
|
|
61
|
+
withDragNDrop,
|
|
62
|
+
useSortableHelpers
|
|
63
|
+
} = args;
|
|
64
|
+
const _isDestinationPanel = isDestinationPanel;
|
|
65
|
+
const _hasMultipleSelection = hasMultipleSelection;
|
|
66
|
+
const _height = height;
|
|
67
|
+
const _datum = datum;
|
|
68
|
+
const _datumHydratables = datumHydratables;
|
|
69
|
+
const _datumInternalMeta = datumInternalMeta;
|
|
70
|
+
const _datumRenderFlags = datumRenderFlags;
|
|
71
|
+
const _withDragNDrop = withDragNDrop;
|
|
72
|
+
const _useSortableHelpers = useSortableHelpers;
|
|
73
|
+
return testReturn;
|
|
74
|
+
};
|
|
75
|
+
const itemMidSectionProbe = (args) => {
|
|
76
|
+
const {
|
|
77
|
+
datum,
|
|
78
|
+
datumHydratables,
|
|
79
|
+
datumInternalMeta,
|
|
80
|
+
datumRenderFlags,
|
|
81
|
+
withDragNDrop,
|
|
82
|
+
useSortableHelpers,
|
|
83
|
+
isDestinationPanel,
|
|
84
|
+
tooltipHelpers
|
|
85
|
+
} = args;
|
|
86
|
+
const _datum = datum;
|
|
87
|
+
const _datumHydratables = datumHydratables;
|
|
88
|
+
const _datumInternalMeta = datumInternalMeta;
|
|
89
|
+
const _datumRenderFlags = datumRenderFlags;
|
|
90
|
+
const _withDragNDrop = withDragNDrop;
|
|
91
|
+
const _useSortableHelpers = useSortableHelpers;
|
|
92
|
+
const _isDestinationPanel = isDestinationPanel;
|
|
93
|
+
const _tooltipHelpers = tooltipHelpers;
|
|
94
|
+
return testReturn;
|
|
95
|
+
};
|
|
96
|
+
const itemActionIconProbe = (args) => {
|
|
97
|
+
const { panelMetaInfo, extraMetaInfo } = args;
|
|
98
|
+
const _panelMetaInfo = panelMetaInfo;
|
|
99
|
+
const _extraMetaInfo = extraMetaInfo;
|
|
100
|
+
const _itemMeta = extraMetaInfo?.itemMeta;
|
|
101
|
+
return testReturn;
|
|
102
|
+
};
|
|
103
|
+
const dragHandleProbe = (args) => {
|
|
104
|
+
const { id, innerRef, useSortableHelpers, isDndActive, isDragging, disabled, ariaLabelledby } = args;
|
|
105
|
+
const _id = id;
|
|
106
|
+
const _innerRef = innerRef;
|
|
107
|
+
const _useSortableHelpers = useSortableHelpers;
|
|
108
|
+
const _isDndActive = isDndActive;
|
|
109
|
+
const _isDragging = isDragging;
|
|
110
|
+
const _disabled = disabled;
|
|
111
|
+
const _ariaLabelledby = ariaLabelledby;
|
|
112
|
+
return testReturn;
|
|
113
|
+
};
|
|
114
|
+
const SlotPropsAsFunctions = {
|
|
115
|
+
// Panel-level — receive PanelMetaInfo
|
|
116
|
+
dsShuttlev2PanelWrapper: panelMetaProbe,
|
|
117
|
+
dsShuttlev2ListWrapper: panelMetaProbe,
|
|
118
|
+
dsShuttlev2HeaderSearchIcon: panelMetaProbe,
|
|
119
|
+
dsShuttlev2ListWrapperTop: panelMetaProbe,
|
|
120
|
+
dsShuttlev2AreaSearchWrapper: panelMetaProbe,
|
|
121
|
+
dsShuttlev2AreaSearchBar: panelMetaProbe,
|
|
122
|
+
dsShuttlev2AreaSelectionHeader: panelMetaProbe,
|
|
123
|
+
dsShuttlev2AreaSelectionHeaderCountLabel: panelMetaProbe,
|
|
124
|
+
dsShuttlev2AriaLivePanelCenter: panelMetaProbe,
|
|
125
|
+
dsShuttlev2ListWrapperMid: panelMetaProbe,
|
|
126
|
+
dsShuttlev2ItemsWrapper: panelMetaProbe,
|
|
127
|
+
dsShuttlev2MoveMultipleWrapper: panelMetaProbe,
|
|
128
|
+
dsShuttlev2MoveMultipleBtn: panelMetaProbe,
|
|
129
|
+
dsShuttlev2MoveMultipleLiveRegion: panelMetaProbe,
|
|
130
|
+
dsShuttlev2EmptyListWrapper: panelMetaProbe,
|
|
131
|
+
dsShuttlev2LoadingListWrapper: panelMetaProbe,
|
|
132
|
+
dsShuttlev2ListBottomLoadingMore: panelMetaProbe,
|
|
133
|
+
dsShuttlev2ListBottomLoadMoreBtn: panelMetaProbe,
|
|
134
|
+
dsShuttlev2ListWrapperBottom: panelMetaProbe,
|
|
135
|
+
// Item-level — receive ItemMeta
|
|
136
|
+
dsShuttlev2ItemWrapper: itemMetaProbe,
|
|
137
|
+
dsShuttlev2ItemCheckbox: itemMetaProbe,
|
|
138
|
+
dsShuttlev2ItemSelection: itemMetaProbe,
|
|
139
|
+
dsShuttlev2ItemSelectionCheckboxUi: itemMetaProbe,
|
|
140
|
+
dsShuttlev2ItemLabelWrapper: itemMetaProbe,
|
|
141
|
+
dsShuttlev2ItemActionsWrapper: itemMetaProbe,
|
|
142
|
+
dsShuttlev2ItemActionWrapper: itemMetaProbe,
|
|
143
|
+
dsShuttlev2ItemActionBtn: itemMetaProbe,
|
|
144
|
+
dsShuttlev2ItemActionBtnDrilldownIcon: itemMetaProbe,
|
|
145
|
+
// Item-level with tooltipHelpers — receive ItemMidSectionArguments
|
|
146
|
+
dsShuttlev2ItemMidsectionWrapper: itemMidSectionProbe,
|
|
147
|
+
dsShuttlev2ItemIconWrapper: itemMidSectionProbe,
|
|
148
|
+
// Dual-context — receive ItemActionIconArguments
|
|
149
|
+
dsShuttlev2ItemActionBtnToSourceIcon: itemActionIconProbe,
|
|
150
|
+
dsShuttlev2ItemActionBtnToDestinationIcon: itemActionIconProbe,
|
|
151
|
+
// Drag-and-drop — receive DragHandleArguments
|
|
152
|
+
dsShuttlev2DragAndDropHandleWrapper: dragHandleProbe,
|
|
153
|
+
dsShuttlev2DragAndDropHandle: dragHandleProbe,
|
|
154
|
+
// Root wrapper — no arguments
|
|
155
|
+
dsShuttlev2Wrapper: () => testReturn
|
|
156
|
+
};
|
|
157
|
+
const EnsureAllSlotsExistInSlotFunctionArguments = SlotPropsAsFunctions;
|
|
158
|
+
//# sourceMappingURL=slot-props.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/slot-props.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/naming-convention */\n/* eslint-disable no-underscore-dangle */\n/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\n\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { DSShuttleV2Name, DSShuttleV2Slots } from '../constants/index.js';\nimport type { DSShuttleV2T } from '../react-desc-prop-types.js';\n\nconst SlotPropsAsObj: Partial<DSShuttleV2T.Props> = {\n // Panel-level\n dsShuttlev2PanelWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ListWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2HeaderSearchIcon: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ListWrapperTop: { 'aria-label': 'just a typescript test' },\n dsShuttlev2AreaSearchWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2AreaSearchBar: { 'aria-label': 'just a typescript test' },\n dsShuttlev2AreaSelectionHeader: { 'aria-label': 'just a typescript test' },\n dsShuttlev2AreaSelectionHeaderCountLabel: { 'aria-label': 'just a typescript test' },\n dsShuttlev2AriaLivePanelCenter: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ListWrapperMid: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemsWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2MoveMultipleWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2MoveMultipleBtn: { 'aria-label': 'just a typescript test' },\n dsShuttlev2MoveMultipleLiveRegion: { 'aria-label': 'just a typescript test' },\n dsShuttlev2EmptyListWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2LoadingListWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ListBottomLoadingMore: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ListBottomLoadMoreBtn: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ListWrapperBottom: { 'aria-label': 'just a typescript test' },\n // Item-level\n dsShuttlev2ItemWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemCheckbox: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemSelection: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemLabelWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemActionsWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemActionWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemActionBtn: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemActionBtnDrilldownIcon: { 'aria-label': 'just a typescript test' },\n // Item-level with tooltipHelpers\n dsShuttlev2ItemMidsectionWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemIconWrapper: { 'aria-label': 'just a typescript test' },\n // Dual-context\n dsShuttlev2ItemActionBtnToSourceIcon: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemActionBtnToDestinationIcon: { 'aria-label': 'just a typescript test' },\n // Drag-and-drop\n dsShuttlev2DragAndDropHandleWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2DragAndDropHandle: { 'aria-label': 'just a typescript test' },\n // Root wrapper\n dsShuttlev2Wrapper: { 'aria-label': 'just a typescript test' },\n};\n\n// Probes: each fully deconstructs its argument interface and assigns every field to a const of the\n// exact expected type. This makes the test shield against ANY change to the argument shape \u2014 a\n// removed/renamed field breaks the destructure; a retyped field breaks the typed assignment.\nconst testReturn = { 'aria-label': 'just a typescript test' };\n\nconst panelMetaProbe = (args: DSShuttleV2T.PanelMetaInfo): object => {\n const { isDestinationPanel, hasMultipleSelection, height } = args;\n const _isDestinationPanel: boolean = isDestinationPanel;\n const _hasMultipleSelection: boolean | undefined = hasMultipleSelection;\n const _height: number | undefined = height;\n return testReturn;\n};\n\nconst itemMetaProbe = (args: DSShuttleV2T.ItemMeta): object => {\n const {\n isDestinationPanel,\n hasMultipleSelection,\n height,\n datum,\n datumHydratables,\n datumInternalMeta,\n datumRenderFlags,\n withDragNDrop,\n useSortableHelpers,\n } = args;\n const _isDestinationPanel: boolean = isDestinationPanel;\n const _hasMultipleSelection: boolean | undefined = hasMultipleSelection;\n const _height: number | undefined = height;\n const _datum: DSShuttleV2T.Datum = datum;\n const _datumHydratables: DSShuttleV2T.DatumHydratables = datumHydratables;\n const _datumInternalMeta: DSShuttleV2T.DatumInternalMeta = datumInternalMeta;\n const _datumRenderFlags: DSShuttleV2T.DatumRenderFlags = datumRenderFlags;\n const _withDragNDrop: boolean = withDragNDrop;\n const _useSortableHelpers: DSShuttleV2T.ItemMeta['useSortableHelpers'] = useSortableHelpers;\n return testReturn;\n};\n\nconst itemMidSectionProbe = (args: DSShuttleV2T.ItemMidSectionArguments): object => {\n const {\n datum,\n datumHydratables,\n datumInternalMeta,\n datumRenderFlags,\n withDragNDrop,\n useSortableHelpers,\n isDestinationPanel,\n tooltipHelpers,\n } = args;\n const _datum: DSShuttleV2T.Datum = datum;\n const _datumHydratables: DSShuttleV2T.DatumHydratables = datumHydratables;\n const _datumInternalMeta: DSShuttleV2T.DatumInternalMeta = datumInternalMeta;\n const _datumRenderFlags: DSShuttleV2T.DatumRenderFlags = datumRenderFlags;\n const _withDragNDrop: boolean = withDragNDrop;\n const _useSortableHelpers: DSShuttleV2T.ItemMeta['useSortableHelpers'] = useSortableHelpers;\n const _isDestinationPanel: boolean = isDestinationPanel;\n const _tooltipHelpers: DSShuttleV2T.ComponentProps['tooltipHelpers'] = tooltipHelpers;\n return testReturn;\n};\n\nconst itemActionIconProbe = (args: DSShuttleV2T.ItemActionIconArguments): object => {\n const { panelMetaInfo, extraMetaInfo } = args;\n const _panelMetaInfo: DSShuttleV2T.PanelMetaInfo = panelMetaInfo;\n const _extraMetaInfo: { itemMeta?: DSShuttleV2T.ItemMeta } | undefined = extraMetaInfo;\n const _itemMeta: DSShuttleV2T.ItemMeta | undefined = extraMetaInfo?.itemMeta;\n return testReturn;\n};\n\nconst dragHandleProbe = (args: DSShuttleV2T.DragHandleArguments): object => {\n const { id, innerRef, useSortableHelpers, isDndActive, isDragging, disabled, ariaLabelledby } = args;\n const _id: string = id;\n const _innerRef: DSShuttleV2T.DragHandleArguments['innerRef'] = innerRef;\n const _useSortableHelpers: DSShuttleV2T.DragHandleArguments['useSortableHelpers'] = useSortableHelpers;\n const _isDndActive: boolean = isDndActive;\n const _isDragging: boolean = isDragging;\n const _disabled: boolean | undefined = disabled;\n const _ariaLabelledby: string | undefined = ariaLabelledby;\n return testReturn;\n};\n\nconst SlotPropsAsFunctions: DSShuttleV2T.SlotFunctionArguments = {\n // Panel-level \u2014 receive PanelMetaInfo\n dsShuttlev2PanelWrapper: panelMetaProbe,\n dsShuttlev2ListWrapper: panelMetaProbe,\n dsShuttlev2HeaderSearchIcon: panelMetaProbe,\n dsShuttlev2ListWrapperTop: panelMetaProbe,\n dsShuttlev2AreaSearchWrapper: panelMetaProbe,\n dsShuttlev2AreaSearchBar: panelMetaProbe,\n dsShuttlev2AreaSelectionHeader: panelMetaProbe,\n dsShuttlev2AreaSelectionHeaderCountLabel: panelMetaProbe,\n dsShuttlev2AriaLivePanelCenter: panelMetaProbe,\n dsShuttlev2ListWrapperMid: panelMetaProbe,\n dsShuttlev2ItemsWrapper: panelMetaProbe,\n dsShuttlev2MoveMultipleWrapper: panelMetaProbe,\n dsShuttlev2MoveMultipleBtn: panelMetaProbe,\n dsShuttlev2MoveMultipleLiveRegion: panelMetaProbe,\n dsShuttlev2EmptyListWrapper: panelMetaProbe,\n dsShuttlev2LoadingListWrapper: panelMetaProbe,\n dsShuttlev2ListBottomLoadingMore: panelMetaProbe,\n dsShuttlev2ListBottomLoadMoreBtn: panelMetaProbe,\n dsShuttlev2ListWrapperBottom: panelMetaProbe,\n // Item-level \u2014 receive ItemMeta\n dsShuttlev2ItemWrapper: itemMetaProbe,\n dsShuttlev2ItemCheckbox: itemMetaProbe,\n dsShuttlev2ItemSelection: itemMetaProbe,\n dsShuttlev2ItemSelectionCheckboxUi: itemMetaProbe,\n dsShuttlev2ItemLabelWrapper: itemMetaProbe,\n dsShuttlev2ItemActionsWrapper: itemMetaProbe,\n dsShuttlev2ItemActionWrapper: itemMetaProbe,\n dsShuttlev2ItemActionBtn: itemMetaProbe,\n dsShuttlev2ItemActionBtnDrilldownIcon: itemMetaProbe,\n // Item-level with tooltipHelpers \u2014 receive ItemMidSectionArguments\n dsShuttlev2ItemMidsectionWrapper: itemMidSectionProbe,\n dsShuttlev2ItemIconWrapper: itemMidSectionProbe,\n // Dual-context \u2014 receive ItemActionIconArguments\n dsShuttlev2ItemActionBtnToSourceIcon: itemActionIconProbe,\n dsShuttlev2ItemActionBtnToDestinationIcon: itemActionIconProbe,\n // Drag-and-drop \u2014 receive DragHandleArguments\n dsShuttlev2DragAndDropHandleWrapper: dragHandleProbe,\n dsShuttlev2DragAndDropHandle: dragHandleProbe,\n // Root wrapper \u2014 no arguments\n dsShuttlev2Wrapper: () => testReturn,\n};\n\n// Exhaustiveness check \u2014 fails compilation if a slot defined in DSShuttleV2Slots\n// is missing from SlotFunctionArguments (or vice versa).\nconst EnsureAllSlotsExistInSlotFunctionArguments: Required<\n TypescriptHelpersT.PropsForSlots<typeof DSShuttleV2Name, typeof DSShuttleV2Slots>\n> = SlotPropsAsFunctions;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACQvB,MAAM,iBAA8C;AAAA;AAAA,EAElD,yBAAyB,EAAE,cAAc,yBAAyB;AAAA,EAClE,wBAAwB,EAAE,cAAc,yBAAyB;AAAA,EACjE,6BAA6B,EAAE,cAAc,yBAAyB;AAAA,EACtE,2BAA2B,EAAE,cAAc,yBAAyB;AAAA,EACpE,8BAA8B,EAAE,cAAc,yBAAyB;AAAA,EACvE,0BAA0B,EAAE,cAAc,yBAAyB;AAAA,EACnE,gCAAgC,EAAE,cAAc,yBAAyB;AAAA,E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BAA2D;AAAA;AAAA,EAE/D,yBAAyB;AAAA,EACzB,wBAAwB;AAAA,EACxB,6BAA6B;AAAA,EAC7B,2BAA2B;AAAA,EAC3B,8BAA8B;AAAA,EAC9B,0BAA0B;AAAA,EAC1B,gCAAgC;AAAA,EAChC,0CAA0C;AAAA,EAC1C,gCAAgC;AAAA,EAChC,2BAA2B;AAAA,EAC3B,yBAAyB;AAAA,EACzB,gCAAgC;AAAA,EAChC,4BAA4B;AAAA,EAC5B,mCAAmC;AAAA,EACnC,6BAA6B;AAAA,EAC7B,+BAA+B;AAAA,EAC/B,kCAAkC;AAAA,EAClC,kCAAkC;AAAA,EAClC,8BAA8B;AAAA;AAAA,EAE9B,wBAAwB;AAAA,EACxB,yBAAyB;AAAA,EACzB,0BAA0B;AAAA,EAC1B,oCAAoC;AAAA,EACpC,6BAA6B;AAAA,EAC7B,+BAA+B;AAAA,EAC/B,8BAA8B;AAAA,EAC9B,0BAA0B;AAAA,EAC1B,uCAAuC;AAAA;AAAA,EAEvC,kCAAkC;AAAA,EAClC,4BAA4B;AAAA;AAAA,EAE5B,sCAAsC;AAAA,EACtC,2CAA2C;AAAA;AAAA,EAE3C,qCAAqC;AAAA,EACrC,8BAA8B;AAAA;AAAA,EAE9B,oBAAoB,MAAM;AAC5B;AAIA,MAAM,6CAEF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { DSShuttleV2 } from "../index.js";
|
|
4
|
+
const aDatum = { dsId: "1", label: "Team A", seed: 1, isBracket: false };
|
|
5
|
+
const testRequiredProps = {
|
|
6
|
+
destinationData: [],
|
|
7
|
+
sourceData: [aDatum],
|
|
8
|
+
DestinationHeader: () => /* @__PURE__ */ jsx("div", { children: "Destination" }),
|
|
9
|
+
SourceHeader: () => /* @__PURE__ */ jsx("div", { children: "Source" }),
|
|
10
|
+
destinationSelectedItems: {},
|
|
11
|
+
sourceSelectedItems: {},
|
|
12
|
+
onDestinationSelectionChange: () => null,
|
|
13
|
+
onSourceSelectionChange: () => null,
|
|
14
|
+
// hydraters receive the typed datum
|
|
15
|
+
getId: (item) => {
|
|
16
|
+
const { seed } = item;
|
|
17
|
+
return item.dsId;
|
|
18
|
+
},
|
|
19
|
+
getLabel: (item) => {
|
|
20
|
+
const { isBracket } = item;
|
|
21
|
+
return item.label;
|
|
22
|
+
},
|
|
23
|
+
// drilldown receives a single typed datum
|
|
24
|
+
onDestinationDrilldown: (item) => {
|
|
25
|
+
const { seed } = item;
|
|
26
|
+
},
|
|
27
|
+
onSourceDrilldown: (item) => {
|
|
28
|
+
const { seed } = item;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
const { sourceData } = testRequiredProps;
|
|
32
|
+
const { destinationData } = testRequiredProps;
|
|
33
|
+
const testOptionalProps = {
|
|
34
|
+
sourceItemProps: {},
|
|
35
|
+
destinationItemProps: {},
|
|
36
|
+
sourceHeaderProps: {},
|
|
37
|
+
destinationHeaderProps: {},
|
|
38
|
+
sourceShowSearchbar: true,
|
|
39
|
+
destinationShowSearchbar: true,
|
|
40
|
+
onSourceOpenSearchbar: () => null,
|
|
41
|
+
onDesinationOpenSearchbar: () => null,
|
|
42
|
+
sourceFilterValue: "",
|
|
43
|
+
destinationFilterValue: "",
|
|
44
|
+
onSourceFilterChange: (value) => null,
|
|
45
|
+
onDestinationFilterChange: (value) => null,
|
|
46
|
+
// moveButtonProps / drillDownButtonProps receive ItemMeta<TournamentDatum>
|
|
47
|
+
moveButtonProps: ({ itemMeta }) => {
|
|
48
|
+
const { seed } = itemMeta.datum;
|
|
49
|
+
return {};
|
|
50
|
+
},
|
|
51
|
+
drillDownButtonProps: ({ itemMeta }) => {
|
|
52
|
+
const { isBracket } = itemMeta.datum;
|
|
53
|
+
return {};
|
|
54
|
+
},
|
|
55
|
+
checkboxSelectAllProps: () => ({}),
|
|
56
|
+
areaSearchBarProps: () => ({}),
|
|
57
|
+
// item-level slot getter receives ItemMeta<TournamentDatum> → datum is TournamentDatum
|
|
58
|
+
dsShuttlev2ItemWrapper: (itemMeta) => {
|
|
59
|
+
const { datum } = itemMeta;
|
|
60
|
+
const { seed } = itemMeta.datum;
|
|
61
|
+
return { "aria-label": "typed datum slot" };
|
|
62
|
+
},
|
|
63
|
+
// mid-section slot getter receives ItemMidSectionArguments<TournamentDatum>
|
|
64
|
+
dsShuttlev2ItemMidsectionWrapper: (args) => {
|
|
65
|
+
const { seed } = args.datum;
|
|
66
|
+
return { "aria-label": "typed datum slot" };
|
|
67
|
+
},
|
|
68
|
+
// dual-context icon slot — datum reachable (and typed) via extraMetaInfo.itemMeta
|
|
69
|
+
dsShuttlev2ItemActionBtnToDestinationIcon: ({ panelMetaInfo, extraMetaInfo }) => {
|
|
70
|
+
const { isDestinationPanel } = panelMetaInfo;
|
|
71
|
+
const datum = extraMetaInfo?.itemMeta?.datum;
|
|
72
|
+
const seed = extraMetaInfo?.itemMeta?.datum.seed;
|
|
73
|
+
return { "aria-label": "typed datum slot" };
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
const testDefaultPropsPartial = {
|
|
77
|
+
onSourceAdd: (itemsArg) => {
|
|
78
|
+
const items = itemsArg;
|
|
79
|
+
const firstSeed = items[0]?.seed;
|
|
80
|
+
},
|
|
81
|
+
onSourceRemove: (itemsArg) => {
|
|
82
|
+
const items = itemsArg;
|
|
83
|
+
},
|
|
84
|
+
onDestinationAdd: (itemsArg) => {
|
|
85
|
+
const items = itemsArg;
|
|
86
|
+
},
|
|
87
|
+
onDestinationRemove: (itemsArg) => {
|
|
88
|
+
const items = itemsArg;
|
|
89
|
+
},
|
|
90
|
+
onSourceReorder: (movedItem) => {
|
|
91
|
+
const { seed } = movedItem;
|
|
92
|
+
},
|
|
93
|
+
onDestinationReorder: (movedItem) => {
|
|
94
|
+
const { seed } = movedItem;
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
const testProps = {
|
|
98
|
+
...testRequiredProps,
|
|
99
|
+
...testOptionalProps,
|
|
100
|
+
...testDefaultPropsPartial
|
|
101
|
+
};
|
|
102
|
+
const testInternalProps = {
|
|
103
|
+
...testRequiredProps,
|
|
104
|
+
...testOptionalProps,
|
|
105
|
+
...testDefaultPropsPartial
|
|
106
|
+
};
|
|
107
|
+
const BreadCrumb = () => /* @__PURE__ */ jsx("div", { children: "Breadcrumb" });
|
|
108
|
+
const ExampleUsageComponent = () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
109
|
+
/* @__PURE__ */ jsx(DSShuttleV2, { ...testProps }),
|
|
110
|
+
/* @__PURE__ */ jsx(
|
|
111
|
+
DSShuttleV2,
|
|
112
|
+
{
|
|
113
|
+
sourceData: [aDatum],
|
|
114
|
+
destinationData: [],
|
|
115
|
+
DestinationHeader: BreadCrumb,
|
|
116
|
+
SourceHeader: BreadCrumb,
|
|
117
|
+
destinationSelectedItems: {},
|
|
118
|
+
sourceSelectedItems: {},
|
|
119
|
+
onDestinationSelectionChange: () => null,
|
|
120
|
+
onSourceSelectionChange: () => null,
|
|
121
|
+
getId: (item) => item.dsId,
|
|
122
|
+
getLabel: (item) => item.label,
|
|
123
|
+
onDestinationDrilldown: (item) => {
|
|
124
|
+
const { seed } = item;
|
|
125
|
+
},
|
|
126
|
+
onSourceDrilldown: (item) => {
|
|
127
|
+
const { seed } = item;
|
|
128
|
+
},
|
|
129
|
+
onSourceAdd: (items) => {
|
|
130
|
+
const seed = items[0]?.seed;
|
|
131
|
+
},
|
|
132
|
+
dsShuttlev2ItemWrapper: (itemMeta) => ({ "data-seed": String(itemMeta.datum.seed) })
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
|
+
] });
|
|
136
|
+
//# 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,YAAY,WAAW;ACkCI,SAiHzB,UAjHyB,KAiHzB,YAjHyB;AAjC3B,SAAS,mBAAmB;AA4B5B,MAAM,SAA0B,EAAE,MAAM,KAAK,OAAO,UAAU,MAAM,GAAG,WAAW,MAAM;AAExF,MAAM,oBAAwC;AAAA,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;AAAA,sBAAC,eAA8B,GAAG,WAAW;AAAA,EAE7C;AAAA,IAAC;AAAA;AAAA,MACC,YAAY,CAAC,MAAM;AAAA,MACnB,iBAAiB,CAAC;AAAA,MAClB,mBAAmB;AAAA,MACnB,cAAc;AAAA,MACd,0BAA0B,CAAC;AAAA,MAC3B,qBAAqB,CAAC;AAAA,MACtB,8BAA8B,MAAM;AAAA,MACpC,yBAAyB,MAAM;AAAA,MAC/B,OAAO,CAAC,SAAS,KAAK;AAAA,MACtB,UAAU,CAAC,SAAS,KAAK;AAAA,MACzB,wBAAwB,CAAC,SAAS;AAChC,cAAM,EAAE,KAAK,IAAI;AAAA,MACnB;AAAA,MACA,mBAAmB,CAAC,SAAS;AAC3B,cAAM,EAAE,KAAK,IAAI;AAAA,MACnB;AAAA,MACA,aAAa,CAAC,UAAU;AACtB,cAAM,OAA2B,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
|
+
}
|
|
@@ -33,7 +33,6 @@ const testOptionalProps = {
|
|
|
33
33
|
moveButtonProps: () => ({}),
|
|
34
34
|
drillDownButtonProps: () => ({}),
|
|
35
35
|
checkboxSelectAllProps: () => ({}),
|
|
36
|
-
dsShuttleV2ListWrapperMid: () => ({}),
|
|
37
36
|
areaSearchBarProps: () => ({})
|
|
38
37
|
};
|
|
39
38
|
const testPartialDefaults = 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,YAAY,WAAW;ACeI,
|
|
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,YAAY,WAAW;ACeI,SA8FzB,UA9FyB,KA8FzB,YA9FyB;AAd3B,SAAS,mBAAmB;AAE5B,SAAS,oBAAoB;AAS7B,MAAM,oBAAiD;AAAA,EACrD,iBAAiB,CAAC;AAAA,EAClB,YAAY,CAAC;AAAA,EACb,mBAAmB,MAAM,oBAAC,SAAI,yBAAW;AAAA,EACzC,cAAc,MAAM,oBAAC,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,2B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AA,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;AAEA,MAAM,aAAa,MAAM,oBAAC,SAAI,wBAAU;AAExC,MAAM,wBAAwB,MAC5B,iCAEE;AAAA,sBAAC,eAAa,GAAG,wBAAwB;AAAA,EACzC,oBAAC,eAAa,GAAG,8BAA8B;AAAA,EAE/C;AAAA,IAAC;AAAA;AAAA,MACC,iBAAiB,CAAC;AAAA,MAClB,YAAY,CAAC;AAAA,MACb,mBAAmB;AAAA,MACnB,cAAc;AAAA,MACd,0BAA0B,CAAC;AAAA,MAC3B,qBAAqB,CAAC;AAAA,MACtB,8BAA8B,MAAM;AAAA,MACpC,yBAAyB,MAAM;AAAA,MAC/B,OAAO,CAAC,SAAU,KAA0B;AAAA,MAC5C,UAAU,CAAC,SAAU,KAA2B;AAAA,MAChD,wBAAwB,MAAM;AAAA,MAC9B,mBAAmB,MAAM;AAAA,MACzB,qBAAmB;AAAA,MACnB,0BAAwB;AAAA,MACxB,uBAAuB,MAAM;AAAA,MAC7B,2BAA2B,MAAM;AAAA,MACjC,mBAAkB;AAAA,MAClB,wBAAuB;AAAA,MACvB,sBAAsB,CAAC,UAAkB;AAAA,MACzC,2BAA2B,CAAC,UAAkB;AAAA;AAAA,EAChD;AAAA,GACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DSShuttleV2T } from './react-desc-prop-types.js';
|
|
2
2
|
declare const DSShuttleV2: {
|
|
3
|
-
<
|
|
3
|
+
<D extends Record<string, unknown> = Record<string, unknown>>(props: DSShuttleV2T.Props<D>): React.JSX.Element;
|
|
4
4
|
displayName: string;
|
|
5
5
|
};
|
|
6
|
-
declare const DSShuttleV2WithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<DSShuttleV2T.Props<
|
|
6
|
+
declare const DSShuttleV2WithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<DSShuttleV2T.Props<Record<string, unknown>>>;
|
|
7
7
|
export { DSShuttleV2, DSShuttleV2WithSchema };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type DSShuttleV2T } from '../../react-desc-prop-types.js';
|
|
2
|
-
export declare const useAutoCalculated:
|
|
2
|
+
export declare const useAutoCalculated: (propsWithDefaults: DSShuttleV2T.InternalProps) => {
|
|
3
3
|
destinationVirtualRef: import("react").MutableRefObject<{
|
|
4
4
|
scrollTo: (index: number) => void;
|
|
5
5
|
}>;
|
|
@@ -10,22 +10,22 @@ export declare const useAutoCalculated: <T extends object, H extends object, N e
|
|
|
10
10
|
datum: DSShuttleV2T.Datum;
|
|
11
11
|
index: number;
|
|
12
12
|
}>;
|
|
13
|
-
destinationSelectionItemArray:
|
|
13
|
+
destinationSelectionItemArray: Record<string, unknown>[];
|
|
14
14
|
destinationSelectionArray: string[];
|
|
15
15
|
destinationHasMultipleSelectedItems: boolean;
|
|
16
|
-
destinationConfiguredData: DSShuttleV2T.ConfiguredDatum[];
|
|
17
|
-
destinationSelectionableData: DSShuttleV2T.ConfiguredDatum[];
|
|
16
|
+
destinationConfiguredData: DSShuttleV2T.ConfiguredDatum<Record<string, unknown>>[];
|
|
17
|
+
destinationSelectionableData: DSShuttleV2T.ConfiguredDatum<Record<string, unknown>>[];
|
|
18
18
|
destinationSelectionableDataIds: string[];
|
|
19
19
|
destinationSelectionableIds: string;
|
|
20
|
-
sourceConfiguredData: DSShuttleV2T.ConfiguredDatum[];
|
|
20
|
+
sourceConfiguredData: DSShuttleV2T.ConfiguredDatum<Record<string, unknown>>[];
|
|
21
21
|
sourceSelectedItemsMap: Record<string, {
|
|
22
22
|
datum: DSShuttleV2T.Datum;
|
|
23
23
|
index: number;
|
|
24
24
|
}>;
|
|
25
|
-
sourceSelectionItemArray:
|
|
25
|
+
sourceSelectionItemArray: Record<string, unknown>[];
|
|
26
26
|
sourceSelectionArray: string[];
|
|
27
27
|
sourceHasMultipleSelectedItems: boolean;
|
|
28
|
-
sourceSelectionableData: DSShuttleV2T.ConfiguredDatum[];
|
|
28
|
+
sourceSelectionableData: DSShuttleV2T.ConfiguredDatum<Record<string, unknown>>[];
|
|
29
29
|
sourceSelectionableDataIds: string[];
|
|
30
30
|
sourceSelectionableIds: string;
|
|
31
31
|
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { type DSShuttleV2T } from '../../react-desc-prop-types.js';
|
|
2
|
-
export declare const useDataStructure:
|
|
2
|
+
export declare const useDataStructure: (propsFromUser: DSShuttleV2T.InternalProps) => {
|
|
3
3
|
destinationSelectedItemsMap: Record<string, {
|
|
4
4
|
datum: DSShuttleV2T.Datum;
|
|
5
5
|
index: number;
|
|
6
6
|
}>;
|
|
7
|
-
destinationSelectionItemArray:
|
|
7
|
+
destinationSelectionItemArray: Record<string, unknown>[];
|
|
8
8
|
destinationSelectionArray: string[];
|
|
9
9
|
destinationHasMultipleSelectedItems: boolean;
|
|
10
|
-
destinationConfiguredData: DSShuttleV2T.ConfiguredDatum[];
|
|
11
|
-
destinationSelectionableData: DSShuttleV2T.ConfiguredDatum[];
|
|
10
|
+
destinationConfiguredData: DSShuttleV2T.ConfiguredDatum<Record<string, unknown>>[];
|
|
11
|
+
destinationSelectionableData: DSShuttleV2T.ConfiguredDatum<Record<string, unknown>>[];
|
|
12
12
|
destinationSelectionableDataIds: string[];
|
|
13
13
|
destinationSelectionableIds: string;
|
|
14
|
-
sourceConfiguredData: DSShuttleV2T.ConfiguredDatum[];
|
|
14
|
+
sourceConfiguredData: DSShuttleV2T.ConfiguredDatum<Record<string, unknown>>[];
|
|
15
15
|
sourceSelectedItemsMap: Record<string, {
|
|
16
16
|
datum: DSShuttleV2T.Datum;
|
|
17
17
|
index: number;
|
|
18
18
|
}>;
|
|
19
|
-
sourceSelectionItemArray:
|
|
19
|
+
sourceSelectionItemArray: Record<string, unknown>[];
|
|
20
20
|
sourceSelectionArray: string[];
|
|
21
21
|
sourceHasMultipleSelectedItems: boolean;
|
|
22
|
-
sourceSelectionableData: DSShuttleV2T.ConfiguredDatum[];
|
|
22
|
+
sourceSelectionableData: DSShuttleV2T.ConfiguredDatum<Record<string, unknown>>[];
|
|
23
23
|
sourceSelectionableDataIds: string[];
|
|
24
24
|
sourceSelectionableIds: string;
|
|
25
25
|
};
|