@elliemae/ds-shuttle 2.3.0-next.0 → 3.0.0-alpha.0
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/AnimationState.js +75 -0
- package/dist/cjs/AnimationState.js.map +7 -0
- package/dist/cjs/DSShuttle.js +170 -0
- package/dist/cjs/DSShuttle.js.map +7 -0
- package/dist/cjs/SearchState.js +60 -0
- package/dist/cjs/SearchState.js.map +7 -0
- package/dist/cjs/Shuttle.actions.js +126 -0
- package/dist/cjs/Shuttle.actions.js.map +7 -0
- package/dist/cjs/ShuttleContainer.js +82 -0
- package/dist/cjs/ShuttleContainer.js.map +7 -0
- package/dist/cjs/ShuttleImpl.js +214 -0
- package/dist/cjs/ShuttleImpl.js.map +7 -0
- package/dist/cjs/ShuttleRenderer.js +144 -0
- package/dist/cjs/ShuttleRenderer.js.map +7 -0
- package/dist/cjs/ShuttleState.js +84 -0
- package/dist/cjs/ShuttleState.js.map +7 -0
- package/dist/cjs/animation/animationConfig.js +78 -0
- package/dist/cjs/animation/animationConfig.js.map +7 -0
- package/dist/cjs/classedComponents.js +72 -0
- package/dist/cjs/classedComponents.js.map +7 -0
- package/dist/cjs/components/LoadingIndicator.js +52 -0
- package/dist/cjs/components/LoadingIndicator.js.map +7 -0
- package/dist/cjs/components/OverflowList.js +55 -0
- package/dist/cjs/components/OverflowList.js.map +7 -0
- package/dist/cjs/components/ShuttleBreadcrumb.js +54 -0
- package/dist/cjs/components/ShuttleBreadcrumb.js.map +7 -0
- package/dist/cjs/components/ShuttleInfiniteScrollIndicator.js +48 -0
- package/dist/cjs/components/ShuttleInfiniteScrollIndicator.js.map +7 -0
- package/dist/cjs/components/ShuttleListItem/ActionButtons.js +60 -0
- package/dist/cjs/components/ShuttleListItem/ActionButtons.js.map +7 -0
- package/dist/cjs/components/ShuttleListItem/ShuttleListItem.js +83 -0
- package/dist/cjs/components/ShuttleListItem/ShuttleListItem.js.map +7 -0
- package/dist/cjs/components/ShuttleListItem/ShuttleSourceListItem.js +90 -0
- package/dist/cjs/components/ShuttleListItem/ShuttleSourceListItem.js.map +7 -0
- package/dist/cjs/components/ShuttleListItem/ShuttleTargetListItem.js +73 -0
- package/dist/cjs/components/ShuttleListItem/ShuttleTargetListItem.js.map +7 -0
- package/dist/cjs/components/ShuttleListPanel.js +49 -0
- package/dist/cjs/components/ShuttleListPanel.js.map +7 -0
- package/dist/cjs/components/ShuttleSearchBox.js +99 -0
- package/dist/cjs/components/ShuttleSearchBox.js.map +7 -0
- package/dist/cjs/components/ShuttleSource.js +192 -0
- package/dist/cjs/components/ShuttleSource.js.map +7 -0
- package/dist/cjs/components/ShuttleTarget.js +104 -0
- package/dist/cjs/components/ShuttleTarget.js.map +7 -0
- package/dist/cjs/components/VirtualizedItem.js +51 -0
- package/dist/cjs/components/VirtualizedItem.js.map +7 -0
- package/dist/cjs/components/VirtualizedList.js +88 -0
- package/dist/cjs/components/VirtualizedList.js.map +7 -0
- package/dist/cjs/components/VirtualizedSortableList.js +48 -0
- package/dist/cjs/components/VirtualizedSortableList.js.map +7 -0
- package/dist/cjs/helper.js +83 -0
- package/dist/cjs/helper.js.map +7 -0
- package/dist/cjs/index.js +38 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/tests/utils.js +1218 -0
- package/dist/cjs/tests/utils.js.map +7 -0
- package/dist/cjs/updateShuttleStateFromProps.js +98 -0
- package/dist/cjs/updateShuttleStateFromProps.js.map +7 -0
- package/dist/cjs/utils.js +41 -0
- package/dist/cjs/utils.js.map +7 -0
- package/dist/cjs/withProviders.js +45 -0
- package/dist/cjs/withProviders.js.map +7 -0
- package/{esm → dist/esm}/AnimationState.js +12 -8
- package/dist/esm/AnimationState.js.map +7 -0
- package/dist/esm/DSShuttle.js +141 -0
- package/dist/esm/DSShuttle.js.map +7 -0
- package/dist/esm/SearchState.js +31 -0
- package/dist/esm/SearchState.js.map +7 -0
- package/dist/esm/Shuttle.actions.js +106 -0
- package/dist/esm/Shuttle.actions.js.map +7 -0
- package/dist/esm/ShuttleContainer.js +64 -0
- package/dist/esm/ShuttleContainer.js.map +7 -0
- package/dist/esm/ShuttleImpl.js +199 -0
- package/dist/esm/ShuttleImpl.js.map +7 -0
- package/dist/esm/ShuttleRenderer.js +115 -0
- package/dist/esm/ShuttleRenderer.js.map +7 -0
- package/dist/esm/ShuttleState.js +55 -0
- package/dist/esm/ShuttleState.js.map +7 -0
- package/dist/esm/animation/animationConfig.js +49 -0
- package/dist/esm/animation/animationConfig.js.map +7 -0
- package/dist/esm/classedComponents.js +43 -0
- package/dist/esm/classedComponents.js.map +7 -0
- package/dist/esm/components/LoadingIndicator.js +23 -0
- package/dist/esm/components/LoadingIndicator.js.map +7 -0
- package/dist/esm/components/OverflowList.js +26 -0
- package/dist/esm/components/OverflowList.js.map +7 -0
- package/dist/esm/components/ShuttleBreadcrumb.js +25 -0
- package/dist/esm/components/ShuttleBreadcrumb.js.map +7 -0
- package/dist/esm/components/ShuttleInfiniteScrollIndicator.js +19 -0
- package/dist/esm/components/ShuttleInfiniteScrollIndicator.js.map +7 -0
- package/dist/esm/components/ShuttleListItem/ActionButtons.js +31 -0
- package/dist/esm/components/ShuttleListItem/ActionButtons.js.map +7 -0
- package/dist/esm/components/ShuttleListItem/ShuttleListItem.js +54 -0
- package/dist/esm/components/ShuttleListItem/ShuttleListItem.js.map +7 -0
- package/dist/esm/components/ShuttleListItem/ShuttleSourceListItem.js +61 -0
- package/dist/esm/components/ShuttleListItem/ShuttleSourceListItem.js.map +7 -0
- package/dist/esm/components/ShuttleListItem/ShuttleTargetListItem.js +44 -0
- package/dist/esm/components/ShuttleListItem/ShuttleTargetListItem.js.map +7 -0
- package/dist/esm/components/ShuttleListPanel.js +20 -0
- package/dist/esm/components/ShuttleListPanel.js.map +7 -0
- package/dist/esm/components/ShuttleSearchBox.js +70 -0
- package/dist/esm/components/ShuttleSearchBox.js.map +7 -0
- package/dist/esm/components/ShuttleSource.js +175 -0
- package/dist/esm/components/ShuttleSource.js.map +7 -0
- package/dist/esm/components/ShuttleTarget.js +86 -0
- package/dist/esm/components/ShuttleTarget.js.map +7 -0
- package/dist/esm/components/VirtualizedItem.js +22 -0
- package/dist/esm/components/VirtualizedItem.js.map +7 -0
- package/dist/esm/components/VirtualizedList.js +59 -0
- package/dist/esm/components/VirtualizedList.js.map +7 -0
- package/dist/esm/components/VirtualizedSortableList.js +19 -0
- package/dist/esm/components/VirtualizedSortableList.js.map +7 -0
- package/dist/esm/helper.js +54 -0
- package/dist/esm/helper.js.map +7 -0
- package/dist/esm/index.js +9 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/tests/utils.js +1189 -0
- package/dist/esm/tests/utils.js.map +7 -0
- package/dist/esm/updateShuttleStateFromProps.js +69 -0
- package/dist/esm/updateShuttleStateFromProps.js.map +7 -0
- package/dist/esm/utils.js +12 -0
- package/dist/esm/utils.js.map +7 -0
- package/dist/esm/withProviders.js +16 -0
- package/dist/esm/withProviders.js.map +7 -0
- package/{types → dist/types}/AnimationState.d.ts +3 -2
- package/{types → dist/types}/DSShuttle.d.ts +1 -1
- package/{types → dist/types}/SearchState.d.ts +3 -2
- package/{types → dist/types}/Shuttle.actions.d.ts +0 -0
- package/{types → dist/types}/ShuttleContainer.d.ts +0 -0
- package/dist/types/ShuttleImpl.d.ts +4 -0
- package/{types → dist/types}/ShuttleRenderer.d.ts +1 -0
- package/{types → dist/types}/ShuttleState.d.ts +3 -2
- package/{types → dist/types}/animation/animationConfig.d.ts +0 -0
- package/{types → dist/types}/classedComponents.d.ts +0 -0
- package/{types → dist/types}/components/LoadingIndicator.d.ts +1 -0
- package/{types → dist/types}/components/OverflowList.d.ts +1 -0
- package/{types → dist/types}/components/ShuttleBreadcrumb.d.ts +1 -0
- package/{types → dist/types}/components/ShuttleInfiniteScrollIndicator.d.ts +1 -0
- package/{types → dist/types}/components/ShuttleListItem/ActionButtons.d.ts +0 -0
- package/{types → dist/types}/components/ShuttleListItem/ShuttleListItem.d.ts +1 -0
- package/{types → dist/types}/components/ShuttleListItem/ShuttleSourceListItem.d.ts +1 -0
- package/{types → dist/types}/components/ShuttleListItem/ShuttleTargetListItem.d.ts +1 -0
- package/{types → dist/types}/components/ShuttleListPanel.d.ts +1 -0
- package/{types → dist/types}/components/ShuttleSearchBox.d.ts +3 -1
- package/{types → dist/types}/components/ShuttleSource.d.ts +1 -0
- package/{types → dist/types}/components/ShuttleTarget.d.ts +1 -0
- package/{types → dist/types}/components/VirtualizedItem.d.ts +1 -0
- package/{types → dist/types}/components/VirtualizedList.d.ts +1 -0
- package/{types → dist/types}/components/VirtualizedSortableList.d.ts +1 -0
- package/{types → dist/types}/helper.d.ts +0 -0
- package/dist/types/index.d.ts +1 -0
- package/{types → dist/types}/tests/DSShuttle.events.test.d.ts +0 -0
- package/{types → dist/types}/tests/DSShuttle.test.d.ts +0 -0
- package/{types → dist/types}/tests/utils.d.ts +0 -0
- package/dist/types/updateShuttleStateFromProps.d.ts +3 -0
- package/{types → dist/types}/utils.d.ts +0 -0
- package/{types → dist/types}/withProviders.d.ts +1 -0
- package/package.json +97 -89
- package/cjs/AnimationState.js +0 -48
- package/cjs/DSShuttle.js +0 -223
- package/cjs/SearchState.js +0 -41
- package/cjs/Shuttle.actions.js +0 -137
- package/cjs/ShuttleContainer.js +0 -87
- package/cjs/ShuttleImpl.js +0 -311
- package/cjs/ShuttleRenderer.js +0 -139
- package/cjs/ShuttleState.js +0 -80
- package/cjs/animation/animationConfig.js +0 -81
- package/cjs/classedComponents.js +0 -71
- package/cjs/components/LoadingIndicator.js +0 -25
- package/cjs/components/OverflowList.js +0 -53
- package/cjs/components/ShuttleBreadcrumb.js +0 -42
- package/cjs/components/ShuttleInfiniteScrollIndicator.js +0 -39
- package/cjs/components/ShuttleListItem/ActionButtons.js +0 -55
- package/cjs/components/ShuttleListItem/ShuttleListItem.js +0 -85
- package/cjs/components/ShuttleListItem/ShuttleSourceListItem.js +0 -76
- package/cjs/components/ShuttleListItem/ShuttleTargetListItem.js +0 -57
- package/cjs/components/ShuttleListPanel.js +0 -31
- package/cjs/components/ShuttleSearchBox.js +0 -110
- package/cjs/components/ShuttleSource.js +0 -188
- package/cjs/components/ShuttleTarget.js +0 -116
- package/cjs/components/VirtualizedItem.js +0 -46
- package/cjs/components/VirtualizedList.js +0 -93
- package/cjs/components/VirtualizedSortableList.js +0 -41
- package/cjs/helper.js +0 -117
- package/cjs/index.js +0 -12
- package/cjs/updateShuttleStateFromProps.js +0 -94
- package/cjs/utils.js +0 -43
- package/cjs/withProviders.js +0 -29
- package/esm/DSShuttle.js +0 -213
- package/esm/SearchState.js +0 -35
- package/esm/Shuttle.actions.js +0 -123
- package/esm/ShuttleContainer.js +0 -80
- package/esm/ShuttleImpl.js +0 -304
- package/esm/ShuttleRenderer.js +0 -132
- package/esm/ShuttleState.js +0 -74
- package/esm/animation/animationConfig.js +0 -77
- package/esm/classedComponents.js +0 -51
- package/esm/components/LoadingIndicator.js +0 -18
- package/esm/components/OverflowList.js +0 -46
- package/esm/components/ShuttleBreadcrumb.js +0 -35
- package/esm/components/ShuttleInfiniteScrollIndicator.js +0 -32
- package/esm/components/ShuttleListItem/ActionButtons.js +0 -43
- package/esm/components/ShuttleListItem/ShuttleListItem.js +0 -76
- package/esm/components/ShuttleListItem/ShuttleSourceListItem.js +0 -68
- package/esm/components/ShuttleListItem/ShuttleTargetListItem.js +0 -49
- package/esm/components/ShuttleListPanel.js +0 -24
- package/esm/components/ShuttleSearchBox.js +0 -104
- package/esm/components/ShuttleSource.js +0 -179
- package/esm/components/ShuttleTarget.js +0 -107
- package/esm/components/VirtualizedItem.js +0 -40
- package/esm/components/VirtualizedList.js +0 -84
- package/esm/components/VirtualizedSortableList.js +0 -34
- package/esm/helper.js +0 -78
- package/esm/index.js +0 -2
- package/esm/updateShuttleStateFromProps.js +0 -88
- package/esm/utils.js +0 -18
- package/esm/withProviders.js +0 -22
- package/types/ShuttleImpl.d.ts +0 -3
- package/types/index.d.ts +0 -1
- package/types/updateShuttleStateFromProps.d.ts +0 -1
package/esm/ShuttleState.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
2
|
-
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
3
|
-
import 'core-js/modules/esnext.iterator.map.js';
|
|
4
|
-
import { useState } from 'react';
|
|
5
|
-
import createContainer from 'constate';
|
|
6
|
-
import { getItemsById, pipe } from './helper.js';
|
|
7
|
-
import { moveItem, resetMovedItems, navigateTo, resetCheckedItems, toggleItemSelection } from './Shuttle.actions.js';
|
|
8
|
-
|
|
9
|
-
function useShuttleState() {
|
|
10
|
-
const [shuttleState, setShuttleState] = useState({
|
|
11
|
-
checkedItems: [],
|
|
12
|
-
movedItems: {},
|
|
13
|
-
hierarchy: [{
|
|
14
|
-
name: 'Category',
|
|
15
|
-
id: null
|
|
16
|
-
}],
|
|
17
|
-
hierarchyDest: [{
|
|
18
|
-
name: 'Added users',
|
|
19
|
-
id: null
|
|
20
|
-
}]
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
const setState = state => setShuttleState(state(shuttleState));
|
|
24
|
-
|
|
25
|
-
function setMovedItems() {
|
|
26
|
-
let itemsIds = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
27
|
-
let items = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
28
|
-
const itemsToMove = getItemsById(itemsIds, items);
|
|
29
|
-
const pipeActions = itemsToMove.map(item => moveItem(item));
|
|
30
|
-
setState(pipe([resetMovedItems(), ...pipeActions]));
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function navigate(item, dest) {
|
|
34
|
-
setState(pipe([navigateTo(item, dest), resetCheckedItems()]));
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function resetCheckedItems$1() {
|
|
38
|
-
setState(resetCheckedItems());
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function resetMovedItems$1() {
|
|
42
|
-
setState(pipe([navigateTo({
|
|
43
|
-
id: null
|
|
44
|
-
}, true), resetMovedItems()]));
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function moveItem$1(item, dest) {
|
|
48
|
-
setState(pipe([moveItem(item), resetCheckedItems()]));
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function toggleItemSelection$1(item) {
|
|
52
|
-
setState(toggleItemSelection(item.id));
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function moveCheckedItems(items) {
|
|
56
|
-
const pipeActions = items.map(item => moveItem$1(item));
|
|
57
|
-
setState(pipe([...pipeActions, resetCheckedItems$1()]));
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
return {
|
|
61
|
-
state: shuttleState,
|
|
62
|
-
toggleItemSelection: toggleItemSelection$1,
|
|
63
|
-
moveCheckedItems,
|
|
64
|
-
moveItem: moveItem$1,
|
|
65
|
-
resetMovedItems: resetMovedItems$1,
|
|
66
|
-
resetCheckedItems: resetCheckedItems$1,
|
|
67
|
-
navigate,
|
|
68
|
-
setMovedItems
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
var useShuttleState$1 = createContainer(useShuttleState, value => [value.state]);
|
|
73
|
-
|
|
74
|
-
export { useShuttleState$1 as default };
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
// shuttle list and items constants
|
|
2
|
-
const itemAnimationDuration = 300;
|
|
3
|
-
const listAnimationDuration = 300;
|
|
4
|
-
const xPosMovement = 500; // breadcrumb constants
|
|
5
|
-
|
|
6
|
-
const breadcrumbDuration = 200;
|
|
7
|
-
const xBreadcrumbPos = 300;
|
|
8
|
-
const animationConfig = {
|
|
9
|
-
slideRight: {
|
|
10
|
-
from: {
|
|
11
|
-
transform: 'translate3d(0,0,0)'
|
|
12
|
-
},
|
|
13
|
-
to: {
|
|
14
|
-
transform: "translate3d(".concat(xPosMovement, "px,0,0)")
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
slideLeft: {
|
|
18
|
-
from: {
|
|
19
|
-
transform: 'translate3d(0,0,0)'
|
|
20
|
-
},
|
|
21
|
-
to: {
|
|
22
|
-
transform: "translate3d(".concat(-xPosMovement, "px,0,0)")
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
moveItem: isMovingLeft => ({
|
|
26
|
-
config: {
|
|
27
|
-
duration: itemAnimationDuration
|
|
28
|
-
},
|
|
29
|
-
enter: {
|
|
30
|
-
opacity: 1,
|
|
31
|
-
transform: "translate3d(".concat(0, "px,0,0)")
|
|
32
|
-
},
|
|
33
|
-
from: {
|
|
34
|
-
opacity: 1,
|
|
35
|
-
transform: "translate3d(".concat(isMovingLeft ? -xPosMovement : xPosMovement, "px,0,0)")
|
|
36
|
-
},
|
|
37
|
-
leave: {
|
|
38
|
-
transform: "translate3d(".concat(isMovingLeft ? -xPosMovement : xPosMovement, "px,0,0)")
|
|
39
|
-
}
|
|
40
|
-
}),
|
|
41
|
-
moveList: isDrillingDown => ({
|
|
42
|
-
config: {
|
|
43
|
-
duration: listAnimationDuration
|
|
44
|
-
},
|
|
45
|
-
enter: {
|
|
46
|
-
opacity: 1,
|
|
47
|
-
transform: 'translate3d(0,0,0)'
|
|
48
|
-
},
|
|
49
|
-
from: {
|
|
50
|
-
opacity: 0,
|
|
51
|
-
transform: "translate3d(0px,".concat(isDrillingDown ? xPosMovement : -xPosMovement, "px,0)")
|
|
52
|
-
},
|
|
53
|
-
leave: {
|
|
54
|
-
opacity: 0,
|
|
55
|
-
transform: "translate3d(0,".concat(isDrillingDown ? -xPosMovement : xPosMovement, "px,0)")
|
|
56
|
-
}
|
|
57
|
-
}),
|
|
58
|
-
breadcrumb: () => ({
|
|
59
|
-
config: {
|
|
60
|
-
duration: breadcrumbDuration
|
|
61
|
-
},
|
|
62
|
-
enter: {
|
|
63
|
-
opacity: 1,
|
|
64
|
-
transform: "translate3d(".concat(0, "px,0,0)")
|
|
65
|
-
},
|
|
66
|
-
from: {
|
|
67
|
-
opacity: 0,
|
|
68
|
-
transform: "translate3d(".concat(xBreadcrumbPos, "px,0px,0)")
|
|
69
|
-
},
|
|
70
|
-
leave: {
|
|
71
|
-
opacity: 0,
|
|
72
|
-
transform: "translate3d(".concat(xBreadcrumbPos, "px,0,0)")
|
|
73
|
-
}
|
|
74
|
-
})
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
export { animationConfig };
|
package/esm/classedComponents.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import DSButton from '@elliemae/ds-button';
|
|
2
|
-
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
3
|
-
import ShuttleBreadcrumb from './components/ShuttleBreadcrumb.js';
|
|
4
|
-
import OverflowList from './components/OverflowList.js';
|
|
5
|
-
|
|
6
|
-
const blockName = 'shuttle';
|
|
7
|
-
const headerBlockName = "".concat(blockName, "-header");
|
|
8
|
-
const listBlockName = "".concat(blockName, "-list");
|
|
9
|
-
const footerBlockName = "".concat(blockName, "-footer");
|
|
10
|
-
const ShuttleContainer = aggregatedClasses('div')(blockName); // wrapper
|
|
11
|
-
|
|
12
|
-
const ShuttleWrapper = aggregatedClasses('div')("".concat(blockName, "-wrapper")); // header
|
|
13
|
-
|
|
14
|
-
const ShuttleHeader = aggregatedClasses('div')(headerBlockName);
|
|
15
|
-
const ShuttleHeaderBreadcrumb = aggregatedClasses(ShuttleBreadcrumb)(headerBlockName, 'breadcrumb');
|
|
16
|
-
const ShuttleHeaderSearchToggle = aggregatedClasses(DSButton)(headerBlockName, 'search-toggle'); // list
|
|
17
|
-
|
|
18
|
-
const ShuttleList = aggregatedClasses('div')(listBlockName, null, _ref => {
|
|
19
|
-
let {
|
|
20
|
-
showPulse
|
|
21
|
-
} = _ref;
|
|
22
|
-
return {
|
|
23
|
-
'show-pulse': showPulse
|
|
24
|
-
};
|
|
25
|
-
});
|
|
26
|
-
const ShuttleListPanel = aggregatedClasses('div')(listBlockName, 'panel', _ref2 => {
|
|
27
|
-
let {
|
|
28
|
-
open
|
|
29
|
-
} = _ref2;
|
|
30
|
-
return {
|
|
31
|
-
open
|
|
32
|
-
};
|
|
33
|
-
});
|
|
34
|
-
const Overflow = aggregatedClasses(OverflowList)(listBlockName, 'overflow', _ref3 => {
|
|
35
|
-
let {
|
|
36
|
-
empty,
|
|
37
|
-
searching
|
|
38
|
-
} = _ref3;
|
|
39
|
-
return {
|
|
40
|
-
empty,
|
|
41
|
-
searching
|
|
42
|
-
};
|
|
43
|
-
});
|
|
44
|
-
const EmptyMessage = aggregatedClasses('span')(listBlockName, 'empty-message');
|
|
45
|
-
const LoadingList = aggregatedClasses('div')(listBlockName, 'loading-list'); // footer
|
|
46
|
-
|
|
47
|
-
const ShuttleFooter = aggregatedClasses('div')(footerBlockName);
|
|
48
|
-
const ShuttleFooterActions = aggregatedClasses('div')(footerBlockName, 'actions');
|
|
49
|
-
const ShuttleFooterCounter = aggregatedClasses('span')(footerBlockName, 'counter');
|
|
50
|
-
|
|
51
|
-
export { EmptyMessage, LoadingList, Overflow, ShuttleContainer, ShuttleFooter, ShuttleFooterActions, ShuttleFooterCounter, ShuttleHeader, ShuttleHeaderBreadcrumb, ShuttleHeaderSearchToggle, ShuttleList, ShuttleListPanel, ShuttleWrapper };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
-
import 'react';
|
|
3
|
-
import { DSCircularProgressIndicator } from '@elliemae/ds-circular-progress-indicator';
|
|
4
|
-
import styled from 'styled-components';
|
|
5
|
-
|
|
6
|
-
var _Wrapper;
|
|
7
|
-
const Wrapper = /*#__PURE__*/styled.div.withConfig({
|
|
8
|
-
componentId: "sc-18oj125-0"
|
|
9
|
-
})(["display:flex;justify-content:center;align-items:center;width:100%;height:100%;"]);
|
|
10
|
-
|
|
11
|
-
const LoadingIndicator = () => _Wrapper || (_Wrapper = /*#__PURE__*/_jsx(Wrapper, {
|
|
12
|
-
"data-testid": "shuttle__loading-indicator"
|
|
13
|
-
}, void 0, /*#__PURE__*/_jsx(DSCircularProgressIndicator, {
|
|
14
|
-
size: "xl",
|
|
15
|
-
showLabel: true
|
|
16
|
-
})));
|
|
17
|
-
|
|
18
|
-
export { LoadingIndicator as default };
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
-
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
-
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
-
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
-
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
-
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
7
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
8
|
-
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
9
|
-
import 'core-js/modules/esnext.iterator.map.js';
|
|
10
|
-
import { useContext } from 'react';
|
|
11
|
-
import { useTransition, animated } from 'react-spring/web';
|
|
12
|
-
import { animationConfig } from '../animation/animationConfig.js';
|
|
13
|
-
import AnimationContext from '../AnimationState.js';
|
|
14
|
-
|
|
15
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
16
|
-
|
|
17
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
18
|
-
|
|
19
|
-
function OverflowList(_ref) {
|
|
20
|
-
let {
|
|
21
|
-
className = '',
|
|
22
|
-
activeHierarchy = '',
|
|
23
|
-
children
|
|
24
|
-
} = _ref;
|
|
25
|
-
const {
|
|
26
|
-
state: {
|
|
27
|
-
isDrillingDown = false
|
|
28
|
-
},
|
|
29
|
-
setIsDrillingDown
|
|
30
|
-
} = useContext(AnimationContext.Context);
|
|
31
|
-
const overflowTransition = useTransition(activeHierarchy, null, _objectSpread(_objectSpread({}, animationConfig.moveList(isDrillingDown)), {}, {
|
|
32
|
-
onDestroyed: () => setIsDrillingDown(false)
|
|
33
|
-
}));
|
|
34
|
-
return overflowTransition.map(_ref2 => {
|
|
35
|
-
let {
|
|
36
|
-
props,
|
|
37
|
-
key
|
|
38
|
-
} = _ref2;
|
|
39
|
-
return /*#__PURE__*/_jsx(animated.div, {
|
|
40
|
-
className: className,
|
|
41
|
-
style: props
|
|
42
|
-
}, key, children);
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export { OverflowList as default };
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
-
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
3
|
-
import 'core-js/modules/esnext.iterator.map.js';
|
|
4
|
-
import 'react';
|
|
5
|
-
import { useTransition, animated } from 'react-spring/web';
|
|
6
|
-
import DSBreadcrumb from '@elliemae/ds-basic/Breadcrumb';
|
|
7
|
-
import { animationConfig } from '../animation/animationConfig.js';
|
|
8
|
-
|
|
9
|
-
function ShuttleBreadcrumb(_ref) {
|
|
10
|
-
let {
|
|
11
|
-
className = '',
|
|
12
|
-
hierarchy = [],
|
|
13
|
-
onNavigateTo = () => null
|
|
14
|
-
} = _ref;
|
|
15
|
-
const animatedCrumbs = useTransition(hierarchy, item => item.id, animationConfig.breadcrumb());
|
|
16
|
-
return /*#__PURE__*/_jsx("div", {
|
|
17
|
-
className: className
|
|
18
|
-
}, void 0, /*#__PURE__*/_jsx(DSBreadcrumb, {
|
|
19
|
-
isTitle: true
|
|
20
|
-
}, void 0, animatedCrumbs.map(_ref2 => {
|
|
21
|
-
let {
|
|
22
|
-
item,
|
|
23
|
-
props,
|
|
24
|
-
key
|
|
25
|
-
} = _ref2;
|
|
26
|
-
return /*#__PURE__*/_jsx(DSBreadcrumb.Item, {
|
|
27
|
-
containerComponent: animated.li,
|
|
28
|
-
label: item.name,
|
|
29
|
-
onClick: () => onNavigateTo(item, 'up'),
|
|
30
|
-
style: props
|
|
31
|
-
}, key);
|
|
32
|
-
})));
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export { ShuttleBreadcrumb as default };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
-
import 'react';
|
|
3
|
-
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
4
|
-
import DSIndeterminateProgressIndicator from '@elliemae/ds-indeterminate-progress-indicator';
|
|
5
|
-
|
|
6
|
-
var _DSIndeterminateProgr;
|
|
7
|
-
const blockName = 'shuttle-infinite-scroll-indicator';
|
|
8
|
-
const InfiniteScrollBarContainer = aggregatedClasses('div')(blockName, null, _ref => {
|
|
9
|
-
let {
|
|
10
|
-
isOpen
|
|
11
|
-
} = _ref;
|
|
12
|
-
return {
|
|
13
|
-
opened: isOpen
|
|
14
|
-
};
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
const ShuttleInfiniteScrollIndicator = _ref2 => {
|
|
18
|
-
let {
|
|
19
|
-
isOpen
|
|
20
|
-
} = _ref2;
|
|
21
|
-
return /*#__PURE__*/_jsx(InfiniteScrollBarContainer, {
|
|
22
|
-
classProps: {
|
|
23
|
-
isOpen
|
|
24
|
-
},
|
|
25
|
-
"data-testid": blockName
|
|
26
|
-
}, void 0, _DSIndeterminateProgr || (_DSIndeterminateProgr = /*#__PURE__*/_jsx(DSIndeterminateProgressIndicator, {
|
|
27
|
-
processing: true,
|
|
28
|
-
title: "Loading"
|
|
29
|
-
})));
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export { ShuttleInfiniteScrollIndicator as default };
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
-
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
-
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
-
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
-
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
7
|
-
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
8
|
-
import 'react';
|
|
9
|
-
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
10
|
-
import DSButton from '@elliemae/ds-button';
|
|
11
|
-
import { ArrowShortRight, ArrowShortReturn, CloseCircle } from '@elliemae/ds-icons';
|
|
12
|
-
import { jsx } from 'react/jsx-runtime';
|
|
13
|
-
|
|
14
|
-
var _CloseCircle, _ArrowShortRight, _ArrowShortReturn;
|
|
15
|
-
|
|
16
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
17
|
-
|
|
18
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
19
|
-
const ActionButton = aggregatedClasses(DSButton)('shuttle-list-item', 'action-button');
|
|
20
|
-
const DeleteButton = props => /*#__PURE__*/jsx(ActionButton, _objectSpread({
|
|
21
|
-
buttonType: "text",
|
|
22
|
-
icon: _CloseCircle || (_CloseCircle = /*#__PURE__*/_jsx(CloseCircle, {}))
|
|
23
|
-
}, props));
|
|
24
|
-
const MoveButton = props => /*#__PURE__*/jsx(ActionButton, _objectSpread(_objectSpread({
|
|
25
|
-
buttonType: "text",
|
|
26
|
-
icon: _ArrowShortRight || (_ArrowShortRight = /*#__PURE__*/_jsx(ArrowShortRight, {}))
|
|
27
|
-
}, props), {}, {
|
|
28
|
-
containerProps: {
|
|
29
|
-
'data-testid': 'ds-shuttle__move-button'
|
|
30
|
-
}
|
|
31
|
-
}));
|
|
32
|
-
const DrillDownButton = props => /*#__PURE__*/jsx(ActionButton, _objectSpread(_objectSpread({
|
|
33
|
-
buttonType: "text",
|
|
34
|
-
icon: _ArrowShortReturn || (_ArrowShortReturn = /*#__PURE__*/_jsx(ArrowShortReturn, {
|
|
35
|
-
"data-testid": "shuttle__drill-btn-icon"
|
|
36
|
-
}))
|
|
37
|
-
}, props), {}, {
|
|
38
|
-
containerProps: {
|
|
39
|
-
'data-testid': 'shuttle__drill-btn'
|
|
40
|
-
}
|
|
41
|
-
}));
|
|
42
|
-
|
|
43
|
-
export { DeleteButton, DrillDownButton, MoveButton };
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
-
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
-
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
-
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
-
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
7
|
-
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
8
|
-
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
9
|
-
import 'react';
|
|
10
|
-
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
11
|
-
import { animated } from 'react-spring/web';
|
|
12
|
-
import TruncatedTooltipText from '@elliemae/ds-basic/TruncatedTooltipText';
|
|
13
|
-
import { sortableHandle } from 'react-sortable-hoc';
|
|
14
|
-
import { GripperVertical } from '@elliemae/ds-icons';
|
|
15
|
-
import { isMovable } from '../../helper.js';
|
|
16
|
-
import { jsxs } from 'react/jsx-runtime';
|
|
17
|
-
|
|
18
|
-
const _excluded = ["item", "showIcons", "showIcon", "onSelect", "isChecked", "style", "showActions", "actions", "showSortHandler"];
|
|
19
|
-
|
|
20
|
-
var _GripperVertical, _SortHandler;
|
|
21
|
-
|
|
22
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
23
|
-
|
|
24
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
25
|
-
const blockName = 'shuttle-list-item';
|
|
26
|
-
const Wrapper = aggregatedClasses(animated.li)(blockName);
|
|
27
|
-
const ActionsGroup = aggregatedClasses('div')(blockName, 'actions');
|
|
28
|
-
const IconWrapper = aggregatedClasses('div')(blockName, 'icon-wrapper');
|
|
29
|
-
const Content = aggregatedClasses('label')(blockName, 'content', _ref => {
|
|
30
|
-
let {
|
|
31
|
-
isChecked,
|
|
32
|
-
canMove,
|
|
33
|
-
isReadonly
|
|
34
|
-
} = _ref;
|
|
35
|
-
return {
|
|
36
|
-
checked: isChecked,
|
|
37
|
-
'can-hover': canMove,
|
|
38
|
-
'read-only': isReadonly
|
|
39
|
-
};
|
|
40
|
-
});
|
|
41
|
-
const SortHandler = sortableHandle(() => _GripperVertical || (_GripperVertical = /*#__PURE__*/_jsx(GripperVertical, {
|
|
42
|
-
className: "gripper"
|
|
43
|
-
})));
|
|
44
|
-
|
|
45
|
-
function ShuttleListItem(_ref2) {
|
|
46
|
-
let {
|
|
47
|
-
item = {},
|
|
48
|
-
showIcons = undefined,
|
|
49
|
-
showIcon = true,
|
|
50
|
-
onSelect = () => null,
|
|
51
|
-
isChecked = false,
|
|
52
|
-
style = undefined,
|
|
53
|
-
showActions = true,
|
|
54
|
-
actions = [],
|
|
55
|
-
showSortHandler = false
|
|
56
|
-
} = _ref2,
|
|
57
|
-
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
58
|
-
|
|
59
|
-
return /*#__PURE__*/jsxs(Wrapper, _objectSpread(_objectSpread({}, rest), {}, {
|
|
60
|
-
role: "listitem",
|
|
61
|
-
style: style,
|
|
62
|
-
children: [/*#__PURE__*/_jsx(Content, {
|
|
63
|
-
classProps: {
|
|
64
|
-
canMove: isMovable(item),
|
|
65
|
-
isChecked,
|
|
66
|
-
isReadonly: item.readyOnly
|
|
67
|
-
},
|
|
68
|
-
onClick: onSelect
|
|
69
|
-
}, void 0, showSortHandler && (_SortHandler || (_SortHandler = /*#__PURE__*/_jsx(SortHandler, {}))), (showIcon || showIcons) && /*#__PURE__*/_jsx(IconWrapper, {}, void 0, item.icon), /*#__PURE__*/_jsx(TruncatedTooltipText, {
|
|
70
|
-
className: "shuttle-tooltip-text",
|
|
71
|
-
value: item.name
|
|
72
|
-
})), showActions && /*#__PURE__*/_jsx(ActionsGroup, {}, void 0, actions)]
|
|
73
|
-
}));
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export { ShuttleListItem as default };
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
|
-
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
|
-
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
4
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
5
|
-
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
6
|
-
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
7
|
-
import 'core-js/modules/esnext.iterator.filter.js';
|
|
8
|
-
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
9
|
-
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
10
|
-
import { useState, useCallback, useEffect } from 'react';
|
|
11
|
-
import { isMovable } from '../../helper.js';
|
|
12
|
-
import { DrillDownButton, MoveButton } from './ActionButtons.js';
|
|
13
|
-
import ShuttleListItem from './ShuttleListItem.js';
|
|
14
|
-
import { jsx } from 'react/jsx-runtime';
|
|
15
|
-
|
|
16
|
-
const _excluded = ["item", "onItemCheck", "onMoveToTarget", "onNavigateOnSourceTo", "isChecked", "showMoveButton", "showDrillDownButton", "index"];
|
|
17
|
-
|
|
18
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
19
|
-
|
|
20
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
21
|
-
|
|
22
|
-
function ShuttleSourceListItem(_ref) {
|
|
23
|
-
let {
|
|
24
|
-
item = {},
|
|
25
|
-
onItemCheck = () => null,
|
|
26
|
-
onMoveToTarget = () => null,
|
|
27
|
-
onNavigateOnSourceTo = () => null,
|
|
28
|
-
isChecked = false,
|
|
29
|
-
showMoveButton = true,
|
|
30
|
-
showDrillDownButton = true,
|
|
31
|
-
index
|
|
32
|
-
} = _ref,
|
|
33
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
34
|
-
|
|
35
|
-
const [clicked, setClicked] = useState(false);
|
|
36
|
-
const moveToTarget = useCallback(() => onMoveToTarget(item), [item]);
|
|
37
|
-
useEffect(() => {
|
|
38
|
-
if (clicked) {
|
|
39
|
-
moveToTarget();
|
|
40
|
-
}
|
|
41
|
-
}, [clicked]);
|
|
42
|
-
const navigateOnSourceTo = useCallback(() => onNavigateOnSourceTo(item), [item]);
|
|
43
|
-
const checkItem = useCallback(() => {
|
|
44
|
-
if (!clicked) onItemCheck(item);
|
|
45
|
-
}, [item, clicked]);
|
|
46
|
-
|
|
47
|
-
const handleOnClick = () => {
|
|
48
|
-
if (!clicked) {
|
|
49
|
-
setClicked(true);
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
return /*#__PURE__*/jsx(ShuttleListItem, _objectSpread(_objectSpread({}, rest), {}, {
|
|
54
|
-
actions: [showDrillDownButton && /*#__PURE__*/_jsx(DrillDownButton, {
|
|
55
|
-
disabled: !item.hasChildren && !item.asyncLoad || item.readOnly || item.disableDrillDown,
|
|
56
|
-
onClick: navigateOnSourceTo
|
|
57
|
-
}, "drill-down"), showMoveButton && /*#__PURE__*/_jsx(MoveButton, {
|
|
58
|
-
"data-testid": "ds-shuttle__move-button",
|
|
59
|
-
disabled: !isMovable(item) || item.readOnly,
|
|
60
|
-
onClick: handleOnClick
|
|
61
|
-
}, "move")],
|
|
62
|
-
isChecked: isChecked,
|
|
63
|
-
item: item,
|
|
64
|
-
onSelect: checkItem
|
|
65
|
-
}));
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export { ShuttleSourceListItem as default };
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
-
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
-
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
-
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
-
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
7
|
-
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
8
|
-
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
9
|
-
import { useCallback } from 'react';
|
|
10
|
-
import { DrillDownButton, DeleteButton } from './ActionButtons.js';
|
|
11
|
-
import ShuttleListItem from './ShuttleListItem.js';
|
|
12
|
-
import { jsx } from 'react/jsx-runtime';
|
|
13
|
-
|
|
14
|
-
const _excluded = ["item", "onMoveToSource", "onNavigateOnTargetTo", "isRoot", "showDeleteButton", "showDrillDownButton", "showActions", "index"];
|
|
15
|
-
|
|
16
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
17
|
-
|
|
18
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
19
|
-
|
|
20
|
-
function ShuttleTargetListItem(_ref) {
|
|
21
|
-
let {
|
|
22
|
-
item = {},
|
|
23
|
-
onMoveToSource = () => null,
|
|
24
|
-
onNavigateOnTargetTo = () => null,
|
|
25
|
-
isRoot = false,
|
|
26
|
-
showDeleteButton = true,
|
|
27
|
-
showDrillDownButton = true,
|
|
28
|
-
showActions = true,
|
|
29
|
-
index
|
|
30
|
-
} = _ref,
|
|
31
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
32
|
-
|
|
33
|
-
const moveToSource = useCallback(() => onMoveToSource(item), [item]);
|
|
34
|
-
const navigateOnTargetTo = useCallback(() => onNavigateOnTargetTo(item), [item]);
|
|
35
|
-
return /*#__PURE__*/jsx(ShuttleListItem, _objectSpread(_objectSpread({}, rest), {}, {
|
|
36
|
-
actions: [showDrillDownButton && /*#__PURE__*/_jsx(DrillDownButton, {
|
|
37
|
-
disabled: !item.hasChildren && !item.asyncLoad || item.readOnly || item.disableDrillDown,
|
|
38
|
-
onClick: navigateOnTargetTo
|
|
39
|
-
}, "drill-down"), showDeleteButton && isRoot && /*#__PURE__*/_jsx(DeleteButton, {
|
|
40
|
-
disabled: item.readOnly,
|
|
41
|
-
onClick: moveToSource,
|
|
42
|
-
"data-testid": "ds-shuttle__close-button"
|
|
43
|
-
}, "delete")],
|
|
44
|
-
item: item,
|
|
45
|
-
showActions: showActions
|
|
46
|
-
}));
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export { ShuttleTargetListItem as default };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
-
import 'react';
|
|
3
|
-
import DSButton from '@elliemae/ds-button';
|
|
4
|
-
import { ShuttleListPanel as ShuttleListPanel$1 } from '../classedComponents.js';
|
|
5
|
-
|
|
6
|
-
function ShuttleListPanel(_ref) {
|
|
7
|
-
let {
|
|
8
|
-
onClick = () => null,
|
|
9
|
-
open = false,
|
|
10
|
-
children
|
|
11
|
-
} = _ref;
|
|
12
|
-
return /*#__PURE__*/_jsx(ShuttleListPanel$1, {
|
|
13
|
-
classProps: {
|
|
14
|
-
open
|
|
15
|
-
}
|
|
16
|
-
}, void 0, /*#__PURE__*/_jsx(DSButton, {
|
|
17
|
-
buttonType: "text",
|
|
18
|
-
icon: children,
|
|
19
|
-
onClick: onClick,
|
|
20
|
-
"data-testid": "list-panel-btn"
|
|
21
|
-
}));
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export { ShuttleListPanel as default };
|