@elliemae/ds-shuttle 3.0.0-next.1 → 3.0.0-next.13
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 +136 -0
- package/dist/cjs/Shuttle.actions.js.map +7 -0
- package/dist/cjs/ShuttleContainer.js +108 -0
- package/dist/cjs/ShuttleContainer.js.map +7 -0
- package/dist/cjs/ShuttleImpl.js +242 -0
- package/dist/cjs/ShuttleImpl.js.map +7 -0
- package/dist/cjs/ShuttleRenderer.js +203 -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 +71 -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 +76 -0
- package/dist/cjs/components/ShuttleListItem/ActionButtons.js.map +7 -0
- package/dist/cjs/components/ShuttleListItem/ShuttleListItem.js +121 -0
- package/dist/cjs/components/ShuttleListItem/ShuttleListItem.js.map +7 -0
- package/dist/cjs/components/ShuttleListItem/ShuttleSourceListItem.js +127 -0
- package/dist/cjs/components/ShuttleListItem/ShuttleSourceListItem.js.map +7 -0
- package/dist/cjs/components/ShuttleListItem/ShuttleTargetListItem.js +110 -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 +223 -0
- package/dist/cjs/components/ShuttleSource.js.map +7 -0
- package/dist/cjs/components/ShuttleTarget.js +135 -0
- package/dist/cjs/components/ShuttleTarget.js.map +7 -0
- package/dist/cjs/components/VirtualizedItem.js +65 -0
- package/dist/cjs/components/VirtualizedItem.js.map +7 -0
- package/dist/cjs/components/VirtualizedList.js +104 -0
- package/dist/cjs/components/VirtualizedList.js.map +7 -0
- package/dist/cjs/components/VirtualizedSortableList.js +77 -0
- package/dist/cjs/components/VirtualizedSortableList.js.map +7 -0
- package/dist/cjs/helper.js +99 -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 +1235 -0
- package/dist/cjs/tests/utils.js.map +7 -0
- package/dist/cjs/updateShuttleStateFromProps.js +108 -0
- package/dist/cjs/updateShuttleStateFromProps.js.map +7 -0
- package/dist/cjs/utils.js +54 -0
- package/dist/cjs/utils.js.map +7 -0
- package/dist/cjs/withProviders.js +57 -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 +118 -0
- package/dist/esm/Shuttle.actions.js.map +7 -0
- package/dist/esm/ShuttleContainer.js +92 -0
- package/dist/esm/ShuttleContainer.js.map +7 -0
- package/dist/esm/ShuttleImpl.js +229 -0
- package/dist/esm/ShuttleImpl.js.map +7 -0
- package/dist/esm/ShuttleRenderer.js +176 -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 +44 -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 +49 -0
- package/dist/esm/components/ShuttleListItem/ActionButtons.js.map +7 -0
- package/dist/esm/components/ShuttleListItem/ShuttleListItem.js +94 -0
- package/dist/esm/components/ShuttleListItem/ShuttleListItem.js.map +7 -0
- package/dist/esm/components/ShuttleListItem/ShuttleSourceListItem.js +100 -0
- package/dist/esm/components/ShuttleListItem/ShuttleSourceListItem.js.map +7 -0
- package/dist/esm/components/ShuttleListItem/ShuttleTargetListItem.js +83 -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 +208 -0
- package/dist/esm/components/ShuttleSource.js.map +7 -0
- package/dist/esm/components/ShuttleTarget.js +119 -0
- package/dist/esm/components/ShuttleTarget.js.map +7 -0
- package/dist/esm/components/VirtualizedItem.js +38 -0
- package/dist/esm/components/VirtualizedItem.js.map +7 -0
- package/dist/esm/components/VirtualizedList.js +77 -0
- package/dist/esm/components/VirtualizedList.js.map +7 -0
- package/dist/esm/components/VirtualizedSortableList.js +50 -0
- package/dist/esm/components/VirtualizedSortableList.js.map +7 -0
- package/dist/esm/helper.js +72 -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 +1208 -0
- package/dist/esm/tests/utils.js.map +7 -0
- package/dist/esm/updateShuttleStateFromProps.js +81 -0
- package/dist/esm/updateShuttleStateFromProps.js.map +7 -0
- package/dist/esm/utils.js +27 -0
- package/dist/esm/utils.js.map +7 -0
- package/dist/esm/withProviders.js +30 -0
- package/dist/esm/withProviders.js.map +7 -0
- package/package.json +99 -90
- 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/AnimationState.d.ts +0 -26
- package/types/DSShuttle.d.ts +0 -341
- package/types/SearchState.d.ts +0 -22
- package/types/Shuttle.actions.d.ts +0 -11
- package/types/ShuttleContainer.d.ts +0 -3
- package/types/ShuttleImpl.d.ts +0 -3
- package/types/ShuttleRenderer.d.ts +0 -37
- package/types/ShuttleState.d.ts +0 -53
- package/types/animation/animationConfig.d.ts +0 -68
- package/types/classedComponents.d.ts +0 -14
- package/types/components/LoadingIndicator.d.ts +0 -3
- package/types/components/OverflowList.d.ts +0 -7
- package/types/components/ShuttleBreadcrumb.d.ts +0 -7
- package/types/components/ShuttleInfiniteScrollIndicator.d.ts +0 -5
- package/types/components/ShuttleListItem/ActionButtons.d.ts +0 -4
- package/types/components/ShuttleListItem/ShuttleListItem.d.ts +0 -14
- package/types/components/ShuttleListItem/ShuttleSourceListItem.d.ts +0 -13
- package/types/components/ShuttleListItem/ShuttleTargetListItem.d.ts +0 -13
- package/types/components/ShuttleListPanel.d.ts +0 -7
- package/types/components/ShuttleSearchBox.d.ts +0 -20
- package/types/components/ShuttleSource.d.ts +0 -54
- package/types/components/ShuttleTarget.d.ts +0 -16
- package/types/components/VirtualizedItem.d.ts +0 -3
- package/types/components/VirtualizedList.d.ts +0 -12
- package/types/components/VirtualizedSortableList.d.ts +0 -6
- package/types/helper.d.ts +0 -16
- package/types/index.d.ts +0 -1
- package/types/tests/DSShuttle.events.test.d.ts +0 -1
- package/types/tests/DSShuttle.test.d.ts +0 -1
- package/types/tests/utils.d.ts +0 -116
- package/types/updateShuttleStateFromProps.d.ts +0 -1
- package/types/utils.d.ts +0 -2
- package/types/withProviders.d.ts +0 -3
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
import * as React from "react";
|
|
33
|
+
import React2, { useCallback, useContext } from "react";
|
|
34
|
+
import { ShuttleSource } from "./components/ShuttleSource";
|
|
35
|
+
import { ShuttleTarget } from "./components/ShuttleTarget";
|
|
36
|
+
import { ShuttleContainer } from "./classedComponents";
|
|
37
|
+
import { AnimationState } from "./AnimationState";
|
|
38
|
+
const noop = () => {
|
|
39
|
+
};
|
|
40
|
+
function ShuttleRenderer(_a) {
|
|
41
|
+
var _b = _a, {
|
|
42
|
+
containerProps,
|
|
43
|
+
onNavigateOnTargetTo = noop,
|
|
44
|
+
onNavigateOnSourceTo = noop,
|
|
45
|
+
onMoveItemToSource = noop,
|
|
46
|
+
onMoveItemToTarget = noop,
|
|
47
|
+
onClearMovedItems = noop,
|
|
48
|
+
onMoveCheckedItems = noop,
|
|
49
|
+
onClearCheckedItems = noop,
|
|
50
|
+
onToggleSearch = noop,
|
|
51
|
+
onSearch = noop,
|
|
52
|
+
onSearchClose = noop,
|
|
53
|
+
onSearchOpen = noop,
|
|
54
|
+
searching = false,
|
|
55
|
+
onCheckItem = noop,
|
|
56
|
+
hierarchy = [],
|
|
57
|
+
hierarchyDest = [],
|
|
58
|
+
checkedItems = [],
|
|
59
|
+
sourceItems = [],
|
|
60
|
+
targetItems = [],
|
|
61
|
+
sourceEmptyMessage,
|
|
62
|
+
targetEmptyMessage,
|
|
63
|
+
composeTargetItemProps,
|
|
64
|
+
composeSourceItemProps,
|
|
65
|
+
targetSortable,
|
|
66
|
+
sourceSortable,
|
|
67
|
+
onSourceSortEnd,
|
|
68
|
+
onTargetSortEnd,
|
|
69
|
+
loadingSource = false,
|
|
70
|
+
loadingTarget = false,
|
|
71
|
+
onGetMoreItems = () => {
|
|
72
|
+
},
|
|
73
|
+
moreItemsLoading = false,
|
|
74
|
+
hasNextPage = false
|
|
75
|
+
} = _b, otherProps = __objRest(_b, [
|
|
76
|
+
"containerProps",
|
|
77
|
+
"onNavigateOnTargetTo",
|
|
78
|
+
"onNavigateOnSourceTo",
|
|
79
|
+
"onMoveItemToSource",
|
|
80
|
+
"onMoveItemToTarget",
|
|
81
|
+
"onClearMovedItems",
|
|
82
|
+
"onMoveCheckedItems",
|
|
83
|
+
"onClearCheckedItems",
|
|
84
|
+
"onToggleSearch",
|
|
85
|
+
"onSearch",
|
|
86
|
+
"onSearchClose",
|
|
87
|
+
"onSearchOpen",
|
|
88
|
+
"searching",
|
|
89
|
+
"onCheckItem",
|
|
90
|
+
"hierarchy",
|
|
91
|
+
"hierarchyDest",
|
|
92
|
+
"checkedItems",
|
|
93
|
+
"sourceItems",
|
|
94
|
+
"targetItems",
|
|
95
|
+
"sourceEmptyMessage",
|
|
96
|
+
"targetEmptyMessage",
|
|
97
|
+
"composeTargetItemProps",
|
|
98
|
+
"composeSourceItemProps",
|
|
99
|
+
"targetSortable",
|
|
100
|
+
"sourceSortable",
|
|
101
|
+
"onSourceSortEnd",
|
|
102
|
+
"onTargetSortEnd",
|
|
103
|
+
"loadingSource",
|
|
104
|
+
"loadingTarget",
|
|
105
|
+
"onGetMoreItems",
|
|
106
|
+
"moreItemsLoading",
|
|
107
|
+
"hasNextPage"
|
|
108
|
+
]);
|
|
109
|
+
const { setIsMoving, setIsDrillingDown, setIsMovingBack, reset } = useContext(AnimationState.Context);
|
|
110
|
+
const removeAnimationState = useCallback(() => setTimeout(() => reset(), 500));
|
|
111
|
+
return /* @__PURE__ */ React2.createElement(ShuttleContainer, __spreadValues({
|
|
112
|
+
"data-testid": "em-ds-shuttle"
|
|
113
|
+
}, containerProps), /* @__PURE__ */ React2.createElement(ShuttleSource, __spreadProps(__spreadValues({}, otherProps), {
|
|
114
|
+
checkedItems,
|
|
115
|
+
composeSourceItemProps,
|
|
116
|
+
emptyMessage: sourceEmptyMessage,
|
|
117
|
+
hierarchy,
|
|
118
|
+
items: sourceItems,
|
|
119
|
+
onCheckItem,
|
|
120
|
+
onClearCheckedItems,
|
|
121
|
+
onMoveCheckedItems: (item) => {
|
|
122
|
+
setIsMoving(true);
|
|
123
|
+
onMoveCheckedItems(item);
|
|
124
|
+
},
|
|
125
|
+
onMoveItem: (item) => {
|
|
126
|
+
setIsMoving(true);
|
|
127
|
+
onMoveItemToTarget(item);
|
|
128
|
+
removeAnimationState();
|
|
129
|
+
},
|
|
130
|
+
onNavigateTo: (item, direction = "down") => {
|
|
131
|
+
const indexInHierarchy = hierarchy.findIndex((hItem) => hItem.id === item.id);
|
|
132
|
+
setIsDrillingDown(indexInHierarchy === -1);
|
|
133
|
+
onNavigateOnSourceTo(item, direction);
|
|
134
|
+
},
|
|
135
|
+
onSearch,
|
|
136
|
+
onSearchClose,
|
|
137
|
+
onSearchOpen,
|
|
138
|
+
onSortEnd: onSourceSortEnd,
|
|
139
|
+
onToggleSearch,
|
|
140
|
+
searching,
|
|
141
|
+
sourceSortable,
|
|
142
|
+
loading: loadingSource,
|
|
143
|
+
onGetMoreItems,
|
|
144
|
+
moreItemsLoading,
|
|
145
|
+
hasNextPage
|
|
146
|
+
})), /* @__PURE__ */ React2.createElement(ShuttleTarget, __spreadProps(__spreadValues({}, otherProps), {
|
|
147
|
+
composeTargetItemProps,
|
|
148
|
+
emptyMessage: targetEmptyMessage,
|
|
149
|
+
hierarchy: hierarchyDest,
|
|
150
|
+
items: targetItems,
|
|
151
|
+
onClearMovedItems: () => {
|
|
152
|
+
setIsMovingBack(true);
|
|
153
|
+
removeAnimationState();
|
|
154
|
+
onClearMovedItems();
|
|
155
|
+
},
|
|
156
|
+
onMoveItem: (item) => {
|
|
157
|
+
setIsMovingBack(true);
|
|
158
|
+
removeAnimationState();
|
|
159
|
+
onMoveItemToSource(item);
|
|
160
|
+
},
|
|
161
|
+
onNavigateTo: (item, direction = "down") => {
|
|
162
|
+
const indexInHierarchy = hierarchyDest.findIndex((hItem) => hItem.id === item.id);
|
|
163
|
+
setIsDrillingDown(indexInHierarchy === -1);
|
|
164
|
+
onNavigateOnTargetTo(item, direction);
|
|
165
|
+
},
|
|
166
|
+
onSortEnd: onTargetSortEnd,
|
|
167
|
+
targetSortable,
|
|
168
|
+
loading: loadingTarget
|
|
169
|
+
})));
|
|
170
|
+
}
|
|
171
|
+
var ShuttleRenderer_default = ShuttleRenderer;
|
|
172
|
+
export {
|
|
173
|
+
ShuttleRenderer,
|
|
174
|
+
ShuttleRenderer_default as default
|
|
175
|
+
};
|
|
176
|
+
//# sourceMappingURL=ShuttleRenderer.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/ShuttleRenderer.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\n/* eslint-disable max-lines */\nimport React, { useCallback, useContext } from 'react';\nimport { ShuttleSource } from './components/ShuttleSource';\nimport { ShuttleTarget } from './components/ShuttleTarget';\nimport { ShuttleContainer } from './classedComponents';\nimport { AnimationState } from './AnimationState';\n\n// todo: clean methods on jsx\nconst noop = () => {};\nfunction ShuttleRenderer({\n containerProps,\n onNavigateOnTargetTo = noop,\n onNavigateOnSourceTo = noop,\n onMoveItemToSource = noop,\n onMoveItemToTarget = noop,\n onClearMovedItems = noop,\n onMoveCheckedItems = noop,\n onClearCheckedItems = noop,\n onToggleSearch = noop,\n onSearch = noop,\n onSearchClose = noop,\n onSearchOpen = noop,\n searching = false,\n onCheckItem = noop,\n hierarchy = [],\n hierarchyDest = [],\n checkedItems = [],\n sourceItems = [],\n targetItems = [],\n sourceEmptyMessage,\n targetEmptyMessage,\n composeTargetItemProps,\n composeSourceItemProps,\n targetSortable,\n sourceSortable,\n onSourceSortEnd,\n onTargetSortEnd,\n loadingSource = false,\n loadingTarget = false,\n onGetMoreItems = () => {},\n moreItemsLoading = false,\n hasNextPage = false,\n ...otherProps\n}) {\n const { setIsMoving, setIsDrillingDown, setIsMovingBack, reset } = useContext(\n AnimationState.Context,\n );\n\n const removeAnimationState = useCallback(() =>\n setTimeout(() => reset(), 500),\n );\n\n return (\n <ShuttleContainer data-testid=\"em-ds-shuttle\" {...containerProps}>\n <ShuttleSource\n {...otherProps}\n checkedItems={checkedItems}\n composeSourceItemProps={composeSourceItemProps}\n emptyMessage={sourceEmptyMessage}\n hierarchy={hierarchy}\n items={sourceItems}\n onCheckItem={onCheckItem}\n onClearCheckedItems={onClearCheckedItems}\n onMoveCheckedItems={(item) => {\n setIsMoving(true);\n onMoveCheckedItems(item);\n }}\n onMoveItem={(item) => {\n setIsMoving(true);\n onMoveItemToTarget(item);\n removeAnimationState();\n }}\n onNavigateTo={(item, direction = 'down') => {\n const indexInHierarchy = hierarchy.findIndex(\n (hItem) => hItem.id === item.id,\n );\n setIsDrillingDown(indexInHierarchy === -1);\n onNavigateOnSourceTo(item, direction);\n }}\n onSearch={onSearch}\n onSearchClose={onSearchClose}\n onSearchOpen={onSearchOpen}\n onSortEnd={onSourceSortEnd}\n onToggleSearch={onToggleSearch}\n searching={searching}\n sourceSortable={sourceSortable}\n loading={loadingSource}\n onGetMoreItems={onGetMoreItems}\n moreItemsLoading={moreItemsLoading}\n hasNextPage={hasNextPage}\n />\n <ShuttleTarget\n {...otherProps}\n composeTargetItemProps={composeTargetItemProps}\n emptyMessage={targetEmptyMessage}\n hierarchy={hierarchyDest}\n items={targetItems}\n onClearMovedItems={() => {\n setIsMovingBack(true);\n removeAnimationState();\n onClearMovedItems();\n }}\n onMoveItem={(item) => {\n setIsMovingBack(true);\n removeAnimationState();\n onMoveItemToSource(item);\n }}\n onNavigateTo={(item, direction = 'down') => {\n const indexInHierarchy = hierarchyDest.findIndex(\n (hItem) => hItem.id === item.id,\n );\n setIsDrillingDown(indexInHierarchy === -1);\n onNavigateOnTargetTo(item, direction);\n }}\n onSortEnd={onTargetSortEnd}\n targetSortable={targetSortable}\n loading={loadingTarget}\n />\n </ShuttleContainer>\n );\n}\n\nexport { ShuttleRenderer };\nexport default ShuttleRenderer;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACEA;AACA;AACA;AACA;AACA;AAGA,MAAM,OAAO,MAAM;AAAA;AACnB,yBAAyB,IAkCtB;AAlCsB,eACvB;AAAA;AAAA,IACA,uBAAuB;AAAA,IACvB,uBAAuB;AAAA,IACvB,qBAAqB;AAAA,IACrB,qBAAqB;AAAA,IACrB,oBAAoB;AAAA,IACpB,qBAAqB;AAAA,IACrB,sBAAsB;AAAA,IACtB,iBAAiB;AAAA,IACjB,WAAW;AAAA,IACX,gBAAgB;AAAA,IAChB,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,YAAY;AAAA,IACZ,gBAAgB;AAAA,IAChB,eAAe;AAAA,IACf,cAAc;AAAA,IACd,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,IAChB,iBAAiB,MAAM;AAAA;AAAA,IACvB,mBAAmB;AAAA,IACnB,cAAc;AAAA,MAhCS,IAiCpB,uBAjCoB,IAiCpB;AAAA,IAhCH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGA,QAAM,EAAE,aAAa,mBAAmB,iBAAiB,UAAU,WACjE,eAAe;AAGjB,QAAM,uBAAuB,YAAY,MACvC,WAAW,MAAM,SAAS;AAG5B,SACE,qCAAC,kBAAD;AAAA,IAAkB,eAAY;AAAA,KAAoB,iBAChD,qCAAC,eAAD,iCACM,aADN;AAAA,IAEE;AAAA,IACA;AAAA,IACA,cAAc;AAAA,IACd;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA,oBAAoB,CAAC,SAAS;AAC5B,kBAAY;AACZ,yBAAmB;AAAA;AAAA,IAErB,YAAY,CAAC,SAAS;AACpB,kBAAY;AACZ,yBAAmB;AACnB;AAAA;AAAA,IAEF,cAAc,CAAC,MAAM,YAAY,WAAW;AAC1C,YAAM,mBAAmB,UAAU,UACjC,CAAC,UAAU,MAAM,OAAO,KAAK;AAE/B,wBAAkB,qBAAqB;AACvC,2BAAqB,MAAM;AAAA;AAAA,IAE7B;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA;AAAA,IACA;AAAA,OAEF,qCAAC,eAAD,iCACM,aADN;AAAA,IAEE;AAAA,IACA,cAAc;AAAA,IACd,WAAW;AAAA,IACX,OAAO;AAAA,IACP,mBAAmB,MAAM;AACvB,sBAAgB;AAChB;AACA;AAAA;AAAA,IAEF,YAAY,CAAC,SAAS;AACpB,sBAAgB;AAChB;AACA,yBAAmB;AAAA;AAAA,IAErB,cAAc,CAAC,MAAM,YAAY,WAAW;AAC1C,YAAM,mBAAmB,cAAc,UACrC,CAAC,UAAU,MAAM,OAAO,KAAK;AAE/B,wBAAkB,qBAAqB;AACvC,2BAAqB,MAAM;AAAA;AAAA,IAE7B,WAAW;AAAA,IACX;AAAA,IACA,SAAS;AAAA;AAAA;AAOjB,IAAO,0BAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import createContainer from "constate";
|
|
4
|
+
import { getItemsById, pipe } from "./helper";
|
|
5
|
+
import * as actions from "./Shuttle.actions";
|
|
6
|
+
function useShuttleState() {
|
|
7
|
+
const [shuttleState, setShuttleState] = useState({
|
|
8
|
+
checkedItems: [],
|
|
9
|
+
movedItems: {},
|
|
10
|
+
hierarchy: [{ name: "Category", id: null }],
|
|
11
|
+
hierarchyDest: [{ name: "Added users", id: null }]
|
|
12
|
+
});
|
|
13
|
+
const setState = (state) => setShuttleState(state(shuttleState));
|
|
14
|
+
function setMovedItems(itemsIds = [], items = []) {
|
|
15
|
+
const itemsToMove = getItemsById(itemsIds, items);
|
|
16
|
+
const pipeActions = itemsToMove.map((item) => actions.moveItem(item, true));
|
|
17
|
+
setState(pipe([actions.resetMovedItems(), ...pipeActions]));
|
|
18
|
+
}
|
|
19
|
+
function navigate(item, dest) {
|
|
20
|
+
setState(pipe([actions.navigateTo(item, dest), actions.resetCheckedItems()]));
|
|
21
|
+
}
|
|
22
|
+
function resetCheckedItems() {
|
|
23
|
+
setState(actions.resetCheckedItems());
|
|
24
|
+
}
|
|
25
|
+
function resetMovedItems() {
|
|
26
|
+
setState(pipe([actions.navigateTo({ id: null }, true), actions.resetMovedItems()]));
|
|
27
|
+
}
|
|
28
|
+
function moveItem(item, dest) {
|
|
29
|
+
setState(pipe([actions.moveItem(item, dest), actions.resetCheckedItems()]));
|
|
30
|
+
}
|
|
31
|
+
function toggleItemSelection(item) {
|
|
32
|
+
setState(actions.toggleItemSelection(item.id));
|
|
33
|
+
}
|
|
34
|
+
function moveCheckedItems(items, dest = true) {
|
|
35
|
+
const pipeActions = items.map((item) => moveItem(item, dest));
|
|
36
|
+
setState(pipe([...pipeActions, resetCheckedItems()]));
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
state: shuttleState,
|
|
40
|
+
toggleItemSelection,
|
|
41
|
+
moveCheckedItems,
|
|
42
|
+
moveItem,
|
|
43
|
+
resetMovedItems,
|
|
44
|
+
resetCheckedItems,
|
|
45
|
+
navigate,
|
|
46
|
+
setMovedItems
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
const useShuttleStateHOC = createContainer(useShuttleState, (value) => [value.state]);
|
|
50
|
+
var ShuttleState_default = useShuttleStateHOC;
|
|
51
|
+
export {
|
|
52
|
+
useShuttleStateHOC as ShuttleState,
|
|
53
|
+
ShuttleState_default as default
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=ShuttleState.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/ShuttleState.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useState } from 'react';\nimport createContainer from 'constate';\nimport { getItemsById, pipe } from './helper';\nimport * as actions from './Shuttle.actions';\n\nfunction useShuttleState() {\n const [shuttleState, setShuttleState] = useState({\n checkedItems: [],\n movedItems: {},\n hierarchy: [{ name: 'Category', id: null }],\n hierarchyDest: [{ name: 'Added users', id: null }],\n });\n\n const setState = state => setShuttleState(state(shuttleState));\n\n function setMovedItems(itemsIds = [], items = []) {\n const itemsToMove = getItemsById(itemsIds, items);\n const pipeActions = itemsToMove.map(item => actions.moveItem(item, true));\n setState(pipe([actions.resetMovedItems(), ...pipeActions]));\n }\n\n function navigate(item, dest) {\n setState(\n pipe([actions.navigateTo(item, dest), actions.resetCheckedItems()]),\n );\n }\n\n function resetCheckedItems() {\n setState(actions.resetCheckedItems());\n }\n\n function resetMovedItems() {\n setState(\n pipe([actions.navigateTo({ id: null }, true), actions.resetMovedItems()]),\n );\n }\n\n function moveItem(item, dest) {\n setState(pipe([actions.moveItem(item, dest), actions.resetCheckedItems()]));\n }\n\n function toggleItemSelection(item) {\n setState(actions.toggleItemSelection(item.id));\n }\n\n function moveCheckedItems(items, dest = true) {\n const pipeActions = items.map(item => moveItem(item, dest));\n setState(pipe([...pipeActions, resetCheckedItems()]));\n }\n\n return {\n state: shuttleState,\n toggleItemSelection,\n moveCheckedItems,\n moveItem,\n resetMovedItems,\n resetCheckedItems,\n navigate,\n setMovedItems,\n };\n}\n\nconst useShuttleStateHOC = createContainer(useShuttleState, value => [value.state]);\nexport { useShuttleStateHOC as ShuttleState };\nexport default useShuttleStateHOC;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AAEA,2BAA2B;AACzB,QAAM,CAAC,cAAc,mBAAmB,SAAS;AAAA,IAC/C,cAAc;AAAA,IACd,YAAY;AAAA,IACZ,WAAW,CAAC,EAAE,MAAM,YAAY,IAAI;AAAA,IACpC,eAAe,CAAC,EAAE,MAAM,eAAe,IAAI;AAAA;AAG7C,QAAM,WAAW,WAAS,gBAAgB,MAAM;AAEhD,yBAAuB,WAAW,IAAI,QAAQ,IAAI;AAChD,UAAM,cAAc,aAAa,UAAU;AAC3C,UAAM,cAAc,YAAY,IAAI,UAAQ,QAAQ,SAAS,MAAM;AACnE,aAAS,KAAK,CAAC,QAAQ,mBAAmB,GAAG;AAAA;AAG/C,oBAAkB,MAAM,MAAM;AAC5B,aACE,KAAK,CAAC,QAAQ,WAAW,MAAM,OAAO,QAAQ;AAAA;AAIlD,+BAA6B;AAC3B,aAAS,QAAQ;AAAA;AAGnB,6BAA2B;AACzB,aACE,KAAK,CAAC,QAAQ,WAAW,EAAE,IAAI,QAAQ,OAAO,QAAQ;AAAA;AAI1D,oBAAkB,MAAM,MAAM;AAC5B,aAAS,KAAK,CAAC,QAAQ,SAAS,MAAM,OAAO,QAAQ;AAAA;AAGvD,+BAA6B,MAAM;AACjC,aAAS,QAAQ,oBAAoB,KAAK;AAAA;AAG5C,4BAA0B,OAAO,OAAO,MAAM;AAC5C,UAAM,cAAc,MAAM,IAAI,UAAQ,SAAS,MAAM;AACrD,aAAS,KAAK,CAAC,GAAG,aAAa;AAAA;AAGjC,SAAO;AAAA,IACL,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA;AAIJ,MAAM,qBAAqB,gBAAgB,iBAAiB,WAAS,CAAC,MAAM;AAE5E,IAAO,uBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
const itemAnimationDuration = 300;
|
|
3
|
+
const listAnimationDuration = 300;
|
|
4
|
+
const xPosMovement = 500;
|
|
5
|
+
const breadcrumbDuration = 200;
|
|
6
|
+
const xBreadcrumbPos = 300;
|
|
7
|
+
const animationConfig = {
|
|
8
|
+
slideRight: {
|
|
9
|
+
from: { transform: "translate3d(0,0,0)" },
|
|
10
|
+
to: { transform: `translate3d(${xPosMovement}px,0,0)` }
|
|
11
|
+
},
|
|
12
|
+
slideLeft: {
|
|
13
|
+
from: { transform: "translate3d(0,0,0)" },
|
|
14
|
+
to: { transform: `translate3d(${-xPosMovement}px,0,0)` }
|
|
15
|
+
},
|
|
16
|
+
moveItem: (isMovingLeft) => ({
|
|
17
|
+
config: { duration: itemAnimationDuration },
|
|
18
|
+
enter: { opacity: 1, transform: `translate3d(${0}px,0,0)` },
|
|
19
|
+
from: {
|
|
20
|
+
opacity: 1,
|
|
21
|
+
transform: `translate3d(${isMovingLeft ? -xPosMovement : xPosMovement}px,0,0)`
|
|
22
|
+
},
|
|
23
|
+
leave: {
|
|
24
|
+
transform: `translate3d(${isMovingLeft ? -xPosMovement : xPosMovement}px,0,0)`
|
|
25
|
+
}
|
|
26
|
+
}),
|
|
27
|
+
moveList: (isDrillingDown) => ({
|
|
28
|
+
config: { duration: listAnimationDuration },
|
|
29
|
+
enter: { opacity: 1, transform: "translate3d(0,0,0)" },
|
|
30
|
+
from: {
|
|
31
|
+
opacity: 0,
|
|
32
|
+
transform: `translate3d(0px,${isDrillingDown ? xPosMovement : -xPosMovement}px,0)`
|
|
33
|
+
},
|
|
34
|
+
leave: {
|
|
35
|
+
opacity: 0,
|
|
36
|
+
transform: `translate3d(0,${isDrillingDown ? -xPosMovement : xPosMovement}px,0)`
|
|
37
|
+
}
|
|
38
|
+
}),
|
|
39
|
+
breadcrumb: () => ({
|
|
40
|
+
config: { duration: breadcrumbDuration },
|
|
41
|
+
enter: { opacity: 1, transform: `translate3d(${0}px,0,0)` },
|
|
42
|
+
from: { opacity: 0, transform: `translate3d(${xBreadcrumbPos}px,0px,0)` },
|
|
43
|
+
leave: { opacity: 0, transform: `translate3d(${xBreadcrumbPos}px,0,0)` }
|
|
44
|
+
})
|
|
45
|
+
};
|
|
46
|
+
export {
|
|
47
|
+
animationConfig
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=animationConfig.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/animation/animationConfig.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "// shuttle list and items constants\nconst itemAnimationDuration = 300;\nconst listAnimationDuration = 300;\nconst xPosMovement = 500;\n\n// breadcrumb constants\nconst breadcrumbDuration = 200;\nconst xBreadcrumbPos = 300;\n\nexport const animationConfig = {\n slideRight: {\n from: { transform: 'translate3d(0,0,0)' },\n to: { transform: `translate3d(${xPosMovement}px,0,0)` },\n },\n slideLeft: {\n from: { transform: 'translate3d(0,0,0)' },\n to: { transform: `translate3d(${-xPosMovement}px,0,0)` },\n },\n moveItem: isMovingLeft => ({\n config: { duration: itemAnimationDuration },\n enter: { opacity: 1, transform: `translate3d(${0}px,0,0)` },\n from: {\n opacity: 1,\n transform: `translate3d(${\n isMovingLeft ? -xPosMovement : xPosMovement\n }px,0,0)`,\n },\n leave: {\n transform: `translate3d(${\n isMovingLeft ? -xPosMovement : xPosMovement\n }px,0,0)`,\n },\n }),\n moveList: isDrillingDown => ({\n config: { duration: listAnimationDuration },\n enter: { opacity: 1, transform: 'translate3d(0,0,0)' },\n from: {\n opacity: 0,\n transform: `translate3d(0px,${\n isDrillingDown ? xPosMovement : -xPosMovement\n }px,0)`,\n },\n leave: {\n opacity: 0,\n transform: `translate3d(0,${\n isDrillingDown ? -xPosMovement : xPosMovement\n }px,0)`,\n },\n }),\n breadcrumb: () => ({\n config: { duration: breadcrumbDuration },\n enter: { opacity: 1, transform: `translate3d(${0}px,0,0)` },\n from: { opacity: 0, transform: `translate3d(${xBreadcrumbPos}px,0px,0)` },\n leave: { opacity: 0, transform: `translate3d(${xBreadcrumbPos}px,0,0)` },\n }),\n};\n"],
|
|
5
|
+
"mappings": "AAAA;ACCA,MAAM,wBAAwB;AAC9B,MAAM,wBAAwB;AAC9B,MAAM,eAAe;AAGrB,MAAM,qBAAqB;AAC3B,MAAM,iBAAiB;AAEhB,MAAM,kBAAkB;AAAA,EAC7B,YAAY;AAAA,IACV,MAAM,EAAE,WAAW;AAAA,IACnB,IAAI,EAAE,WAAW,eAAe;AAAA;AAAA,EAElC,WAAW;AAAA,IACT,MAAM,EAAE,WAAW;AAAA,IACnB,IAAI,EAAE,WAAW,eAAe,CAAC;AAAA;AAAA,EAEnC,UAAU,kBAAiB;AAAA,IACzB,QAAQ,EAAE,UAAU;AAAA,IACpB,OAAO,EAAE,SAAS,GAAG,WAAW,eAAe;AAAA,IAC/C,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,WAAW,eACT,eAAe,CAAC,eAAe;AAAA;AAAA,IAGnC,OAAO;AAAA,MACL,WAAW,eACT,eAAe,CAAC,eAAe;AAAA;AAAA;AAAA,EAIrC,UAAU,oBAAmB;AAAA,IAC3B,QAAQ,EAAE,UAAU;AAAA,IACpB,OAAO,EAAE,SAAS,GAAG,WAAW;AAAA,IAChC,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,WAAW,mBACT,iBAAiB,eAAe,CAAC;AAAA;AAAA,IAGrC,OAAO;AAAA,MACL,SAAS;AAAA,MACT,WAAW,iBACT,iBAAiB,CAAC,eAAe;AAAA;AAAA;AAAA,EAIvC,YAAY,MAAO;AAAA,IACjB,QAAQ,EAAE,UAAU;AAAA,IACpB,OAAO,EAAE,SAAS,GAAG,WAAW,eAAe;AAAA,IAC/C,MAAM,EAAE,SAAS,GAAG,WAAW,eAAe;AAAA,IAC9C,OAAO,EAAE,SAAS,GAAG,WAAW,eAAe;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { DSButton } from "@elliemae/ds-button";
|
|
3
|
+
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
4
|
+
import { ShuttleBreadcrumb } from "./components/ShuttleBreadcrumb";
|
|
5
|
+
import { OverflowList } from "./components/OverflowList";
|
|
6
|
+
const blockName = "shuttle";
|
|
7
|
+
const headerBlockName = `${blockName}-header`;
|
|
8
|
+
const listBlockName = `${blockName}-list`;
|
|
9
|
+
const footerBlockName = `${blockName}-footer`;
|
|
10
|
+
const ShuttleContainer = aggregatedClasses("div")(blockName);
|
|
11
|
+
const ShuttleWrapper = aggregatedClasses("div")(`${blockName}-wrapper`);
|
|
12
|
+
const ShuttleHeader = aggregatedClasses("div")(headerBlockName);
|
|
13
|
+
const ShuttleHeaderBreadcrumb = aggregatedClasses(ShuttleBreadcrumb)(headerBlockName, "breadcrumb");
|
|
14
|
+
const ShuttleHeaderSearchToggle = aggregatedClasses(DSButton)(headerBlockName, "search-toggle");
|
|
15
|
+
const ShuttleList = aggregatedClasses("div")(listBlockName, null, ({ showPulse }) => ({
|
|
16
|
+
"show-pulse": showPulse
|
|
17
|
+
}));
|
|
18
|
+
const ShuttleListPanel = aggregatedClasses("div")(listBlockName, "panel", ({ open }) => ({ open }));
|
|
19
|
+
const Overflow = aggregatedClasses(OverflowList)(listBlockName, "overflow", ({ empty, searching }) => ({
|
|
20
|
+
empty,
|
|
21
|
+
searching
|
|
22
|
+
}));
|
|
23
|
+
const EmptyMessage = aggregatedClasses("span")(listBlockName, "empty-message");
|
|
24
|
+
const LoadingList = aggregatedClasses("div")(listBlockName, "loading-list");
|
|
25
|
+
const ShuttleFooter = aggregatedClasses("div")(footerBlockName);
|
|
26
|
+
const ShuttleFooterActions = aggregatedClasses("div")(footerBlockName, "actions");
|
|
27
|
+
const ShuttleFooterCounter = aggregatedClasses("span")(footerBlockName, "counter");
|
|
28
|
+
export {
|
|
29
|
+
EmptyMessage,
|
|
30
|
+
LoadingList,
|
|
31
|
+
Overflow,
|
|
32
|
+
ShuttleContainer,
|
|
33
|
+
ShuttleFooter,
|
|
34
|
+
ShuttleFooterActions,
|
|
35
|
+
ShuttleFooterCounter,
|
|
36
|
+
ShuttleHeader,
|
|
37
|
+
ShuttleHeaderBreadcrumb,
|
|
38
|
+
ShuttleHeaderSearchToggle,
|
|
39
|
+
ShuttleList,
|
|
40
|
+
ShuttleListPanel,
|
|
41
|
+
ShuttleWrapper
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=classedComponents.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/classedComponents.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { DSButton } from '@elliemae/ds-button';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { ShuttleBreadcrumb } from './components/ShuttleBreadcrumb';\nimport { OverflowList } from './components/OverflowList';\n\n// block names\nconst blockName = 'shuttle';\nconst headerBlockName = `${blockName}-header`;\nconst listBlockName = `${blockName}-list`;\nconst footerBlockName = `${blockName}-footer`;\n\nexport const ShuttleContainer = aggregatedClasses('div')(blockName);\n\n// wrapper\nexport const ShuttleWrapper = aggregatedClasses('div')(`${blockName}-wrapper`);\n\n// header\nexport const ShuttleHeader = aggregatedClasses('div')(headerBlockName);\nexport const ShuttleHeaderBreadcrumb = aggregatedClasses(ShuttleBreadcrumb)(headerBlockName, 'breadcrumb');\nexport const ShuttleHeaderSearchToggle = aggregatedClasses(DSButton)(headerBlockName, 'search-toggle');\n\n// list\nexport const ShuttleList = aggregatedClasses('div')(listBlockName, null, ({ showPulse }) => ({\n 'show-pulse': showPulse,\n}));\n\nexport const ShuttleListPanel = aggregatedClasses('div')(listBlockName, 'panel', ({ open }) => ({ open }));\nexport const Overflow = aggregatedClasses(OverflowList)(listBlockName, 'overflow', ({ empty, searching }) => ({\n empty,\n searching,\n}));\nexport const EmptyMessage = aggregatedClasses('span')(listBlockName, 'empty-message');\nexport const LoadingList = aggregatedClasses('div')(listBlockName, 'loading-list');\n\n// footer\nexport const ShuttleFooter = aggregatedClasses('div')(footerBlockName);\nexport const ShuttleFooterActions = aggregatedClasses('div')(footerBlockName, 'actions');\nexport const ShuttleFooterCounter = aggregatedClasses('span')(footerBlockName, 'counter');\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AAGA,MAAM,YAAY;AAClB,MAAM,kBAAkB,GAAG;AAC3B,MAAM,gBAAgB,GAAG;AACzB,MAAM,kBAAkB,GAAG;AAEpB,MAAM,mBAAmB,kBAAkB,OAAO;AAGlD,MAAM,iBAAiB,kBAAkB,OAAO,GAAG;AAGnD,MAAM,gBAAgB,kBAAkB,OAAO;AAC/C,MAAM,0BAA0B,kBAAkB,mBAAmB,iBAAiB;AACtF,MAAM,4BAA4B,kBAAkB,UAAU,iBAAiB;AAG/E,MAAM,cAAc,kBAAkB,OAAO,eAAe,MAAM,CAAC,EAAE,gBAAiB;AAAA,EAC3F,cAAc;AAAA;AAGT,MAAM,mBAAmB,kBAAkB,OAAO,eAAe,SAAS,CAAC,EAAE,WAAY,GAAE;AAC3F,MAAM,WAAW,kBAAkB,cAAc,eAAe,YAAY,CAAC,EAAE,OAAO,gBAAiB;AAAA,EAC5G;AAAA,EACA;AAAA;AAEK,MAAM,eAAe,kBAAkB,QAAQ,eAAe;AAC9D,MAAM,cAAc,kBAAkB,OAAO,eAAe;AAG5D,MAAM,gBAAgB,kBAAkB,OAAO;AAC/C,MAAM,uBAAuB,kBAAkB,OAAO,iBAAiB;AACvE,MAAM,uBAAuB,kBAAkB,QAAQ,iBAAiB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { DSCircularProgressIndicator } from "@elliemae/ds-circular-progress-indicator";
|
|
4
|
+
import styled from "styled-components";
|
|
5
|
+
const Wrapper = styled.div`
|
|
6
|
+
display: flex;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
align-items: center;
|
|
9
|
+
width: 100%;
|
|
10
|
+
height: 100%;
|
|
11
|
+
`;
|
|
12
|
+
const LoadingIndicator = () => /* @__PURE__ */ React2.createElement(Wrapper, {
|
|
13
|
+
"data-testid": "shuttle__loading-indicator"
|
|
14
|
+
}, /* @__PURE__ */ React2.createElement(DSCircularProgressIndicator, {
|
|
15
|
+
size: "xl",
|
|
16
|
+
showLabel: true
|
|
17
|
+
}));
|
|
18
|
+
var LoadingIndicator_default = LoadingIndicator;
|
|
19
|
+
export {
|
|
20
|
+
LoadingIndicator,
|
|
21
|
+
LoadingIndicator_default as default
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=LoadingIndicator.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/LoadingIndicator.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { DSCircularProgressIndicator } from '@elliemae/ds-circular-progress-indicator';\nimport styled from 'styled-components';\n\nconst Wrapper = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n`;\n\nconst LoadingIndicator = () => (\n <Wrapper data-testid=\"shuttle__loading-indicator\">\n <DSCircularProgressIndicator size=\"xl\" showLabel />\n </Wrapper>\n);\n\nexport { LoadingIndicator };\nexport default LoadingIndicator;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AAEA,MAAM,UAAU,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQvB,MAAM,mBAAmB,MACvB,qCAAC,SAAD;AAAA,EAAS,eAAY;AAAA,GACnB,qCAAC,6BAAD;AAAA,EAA6B,MAAK;AAAA,EAAK,WAAS;AAAA;AAKpD,IAAO,2BAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import * as React from "react";
|
|
21
|
+
import React2, { useContext } from "react";
|
|
22
|
+
import { useTransition, animated } from "react-spring/web";
|
|
23
|
+
import { animationConfig } from "../animation/animationConfig";
|
|
24
|
+
import { AnimationState } from "../AnimationState";
|
|
25
|
+
function OverflowList({ className = "", activeHierarchy = "", children }) {
|
|
26
|
+
const {
|
|
27
|
+
state: { isDrillingDown = false },
|
|
28
|
+
setIsDrillingDown
|
|
29
|
+
} = useContext(AnimationState.Context);
|
|
30
|
+
const overflowTransition = useTransition(activeHierarchy, null, __spreadProps(__spreadValues({}, animationConfig.moveList(isDrillingDown)), {
|
|
31
|
+
onDestroyed: () => setIsDrillingDown(false)
|
|
32
|
+
}));
|
|
33
|
+
return overflowTransition.map(({ props, key }) => /* @__PURE__ */ React2.createElement(animated.div, {
|
|
34
|
+
key,
|
|
35
|
+
className,
|
|
36
|
+
style: props
|
|
37
|
+
}, children));
|
|
38
|
+
}
|
|
39
|
+
var OverflowList_default = OverflowList;
|
|
40
|
+
export {
|
|
41
|
+
OverflowList,
|
|
42
|
+
OverflowList_default as default
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=OverflowList.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/OverflowList.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useContext } from 'react';\nimport { useTransition, animated } from 'react-spring/web';\nimport { animationConfig } from '../animation/animationConfig';\nimport { AnimationState } from '../AnimationState';\n\nfunction OverflowList({ className = '', activeHierarchy = '', children }) {\n const {\n state: { isDrillingDown = false },\n setIsDrillingDown,\n } = useContext(AnimationState.Context);\n\n const overflowTransition = useTransition(activeHierarchy, null, {\n ...animationConfig.moveList(isDrillingDown),\n onDestroyed: () => setIsDrillingDown(false),\n });\n return overflowTransition.map(({ props, key }) => (\n <animated.div key={key} className={className} style={props}>\n {children}\n </animated.div>\n ));\n}\n\nexport { OverflowList };\nexport default OverflowList;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AAEA,sBAAsB,EAAE,YAAY,IAAI,kBAAkB,IAAI,YAAY;AACxE,QAAM;AAAA,IACJ,OAAO,EAAE,iBAAiB;AAAA,IAC1B;AAAA,MACE,WAAW,eAAe;AAE9B,QAAM,qBAAqB,cAAc,iBAAiB,MAAM,iCAC3D,gBAAgB,SAAS,kBADkC;AAAA,IAE9D,aAAa,MAAM,kBAAkB;AAAA;AAEvC,SAAO,mBAAmB,IAAI,CAAC,EAAE,OAAO,UACtC,qCAAC,SAAS,KAAV;AAAA,IAAc;AAAA,IAAU;AAAA,IAAsB,OAAO;AAAA,KAClD;AAAA;AAMP,IAAO,uBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { useTransition, animated } from "react-spring/web";
|
|
4
|
+
import { DSBreadcrumb } from "@elliemae/ds-breadcrumb";
|
|
5
|
+
import { animationConfig } from "../animation/animationConfig";
|
|
6
|
+
function ShuttleBreadcrumb({ className = "", hierarchy = [], onNavigateTo = () => null }) {
|
|
7
|
+
const animatedCrumbs = useTransition(hierarchy, (item) => item.id, animationConfig.breadcrumb());
|
|
8
|
+
return /* @__PURE__ */ React2.createElement("div", {
|
|
9
|
+
className
|
|
10
|
+
}, /* @__PURE__ */ React2.createElement(DSBreadcrumb, {
|
|
11
|
+
isTitle: true
|
|
12
|
+
}, animatedCrumbs.map(({ item, props, key }) => /* @__PURE__ */ React2.createElement(DSBreadcrumb.Item, {
|
|
13
|
+
key,
|
|
14
|
+
containerComponent: animated.li,
|
|
15
|
+
label: item.name,
|
|
16
|
+
onClick: () => onNavigateTo(item, "up"),
|
|
17
|
+
style: props
|
|
18
|
+
}))));
|
|
19
|
+
}
|
|
20
|
+
var ShuttleBreadcrumb_default = ShuttleBreadcrumb;
|
|
21
|
+
export {
|
|
22
|
+
ShuttleBreadcrumb,
|
|
23
|
+
ShuttleBreadcrumb_default as default
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=ShuttleBreadcrumb.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/ShuttleBreadcrumb.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { useTransition, animated } from 'react-spring/web';\nimport { DSBreadcrumb } from '@elliemae/ds-breadcrumb';\nimport { animationConfig } from '../animation/animationConfig';\n\nfunction ShuttleBreadcrumb({ className = '', hierarchy = [], onNavigateTo = () => null }) {\n const animatedCrumbs = useTransition(hierarchy, (item) => item.id, animationConfig.breadcrumb());\n\n return (\n <div className={className}>\n <DSBreadcrumb isTitle>\n {animatedCrumbs.map(({ item, props, key }) => (\n <DSBreadcrumb.Item\n key={key}\n containerComponent={animated.li}\n label={item.name}\n onClick={() => onNavigateTo(item, 'up')}\n style={props}\n />\n ))}\n </DSBreadcrumb>\n </div>\n );\n}\n\nexport { ShuttleBreadcrumb };\nexport default ShuttleBreadcrumb;\n"],
|
|
5
|
+
"mappings": "AAAA;ACCA;AACA;AACA;AACA;AAEA,2BAA2B,EAAE,YAAY,IAAI,YAAY,IAAI,eAAe,MAAM,QAAQ;AACxF,QAAM,iBAAiB,cAAc,WAAW,CAAC,SAAS,KAAK,IAAI,gBAAgB;AAEnF,SACE,qCAAC,OAAD;AAAA,IAAK;AAAA,KACH,qCAAC,cAAD;AAAA,IAAc,SAAO;AAAA,KAClB,eAAe,IAAI,CAAC,EAAE,MAAM,OAAO,UAClC,qCAAC,aAAa,MAAd;AAAA,IACE;AAAA,IACA,oBAAoB,SAAS;AAAA,IAC7B,OAAO,KAAK;AAAA,IACZ,SAAS,MAAM,aAAa,MAAM;AAAA,IAClC,OAAO;AAAA;AAAA;AASnB,IAAO,4BAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
4
|
+
import { DSIndeterminateProgressIndicator } from "@elliemae/ds-indeterminate-progress-indicator";
|
|
5
|
+
const blockName = "shuttle-infinite-scroll-indicator";
|
|
6
|
+
const InfiniteScrollBarContainer = aggregatedClasses("div")(blockName, null, ({ isOpen }) => ({ opened: isOpen }));
|
|
7
|
+
const ShuttleInfiniteScrollIndicator = ({ isOpen }) => /* @__PURE__ */ React2.createElement(InfiniteScrollBarContainer, {
|
|
8
|
+
classProps: { isOpen },
|
|
9
|
+
"data-testid": blockName
|
|
10
|
+
}, /* @__PURE__ */ React2.createElement(DSIndeterminateProgressIndicator, {
|
|
11
|
+
processing: true,
|
|
12
|
+
title: "Loading"
|
|
13
|
+
}));
|
|
14
|
+
var ShuttleInfiniteScrollIndicator_default = ShuttleInfiniteScrollIndicator;
|
|
15
|
+
export {
|
|
16
|
+
ShuttleInfiniteScrollIndicator,
|
|
17
|
+
ShuttleInfiniteScrollIndicator_default as default
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=ShuttleInfiniteScrollIndicator.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/ShuttleInfiniteScrollIndicator.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/no-unused-state */\nimport React from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { DSIndeterminateProgressIndicator } from '@elliemae/ds-indeterminate-progress-indicator';\n\nconst blockName = 'shuttle-infinite-scroll-indicator';\n\nconst InfiniteScrollBarContainer = aggregatedClasses('div')(blockName, null, ({ isOpen }) => ({ opened: isOpen }));\n\nconst ShuttleInfiniteScrollIndicator = ({ isOpen }) => (\n <InfiniteScrollBarContainer classProps={{ isOpen }} data-testid={blockName}>\n <DSIndeterminateProgressIndicator processing title=\"Loading\" />\n </InfiniteScrollBarContainer>\n);\n\nexport { ShuttleInfiniteScrollIndicator };\nexport default ShuttleInfiniteScrollIndicator;\n"],
|
|
5
|
+
"mappings": "AAAA;ACCA;AACA;AACA;AAEA,MAAM,YAAY;AAElB,MAAM,6BAA6B,kBAAkB,OAAO,WAAW,MAAM,CAAC,EAAE,aAAc,GAAE,QAAQ;AAExG,MAAM,iCAAiC,CAAC,EAAE,aACxC,qCAAC,4BAAD;AAAA,EAA4B,YAAY,EAAE;AAAA,EAAU,eAAa;AAAA,GAC/D,qCAAC,kCAAD;AAAA,EAAkC,YAAU;AAAA,EAAC,OAAM;AAAA;AAKvD,IAAO,yCAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import * as React from "react";
|
|
21
|
+
import React2 from "react";
|
|
22
|
+
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
23
|
+
import { DSButton } from "@elliemae/ds-button";
|
|
24
|
+
import { ArrowShortRight, ArrowShortReturn, CloseCircle } from "@elliemae/ds-icons";
|
|
25
|
+
const ActionButton = aggregatedClasses(DSButton)("shuttle-list-item", "action-button");
|
|
26
|
+
const DeleteButton = (props) => /* @__PURE__ */ React2.createElement(ActionButton, __spreadValues({
|
|
27
|
+
buttonType: "text",
|
|
28
|
+
icon: /* @__PURE__ */ React2.createElement(CloseCircle, null)
|
|
29
|
+
}, props));
|
|
30
|
+
const MoveButton = (props) => /* @__PURE__ */ React2.createElement(ActionButton, __spreadProps(__spreadValues({
|
|
31
|
+
buttonType: "text",
|
|
32
|
+
icon: /* @__PURE__ */ React2.createElement(ArrowShortRight, null)
|
|
33
|
+
}, props), {
|
|
34
|
+
containerProps: { "data-testid": "ds-shuttle__move-button" }
|
|
35
|
+
}));
|
|
36
|
+
const DrillDownButton = (props) => /* @__PURE__ */ React2.createElement(ActionButton, __spreadProps(__spreadValues({
|
|
37
|
+
buttonType: "text",
|
|
38
|
+
icon: /* @__PURE__ */ React2.createElement(ArrowShortReturn, {
|
|
39
|
+
"data-testid": "shuttle__drill-btn-icon"
|
|
40
|
+
})
|
|
41
|
+
}, props), {
|
|
42
|
+
containerProps: { "data-testid": "shuttle__drill-btn" }
|
|
43
|
+
}));
|
|
44
|
+
export {
|
|
45
|
+
DeleteButton,
|
|
46
|
+
DrillDownButton,
|
|
47
|
+
MoveButton
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=ActionButtons.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/ShuttleListItem/ActionButtons.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { DSButton } from '@elliemae/ds-button';\nimport { ArrowShortRight, ArrowShortReturn, CloseCircle } from '@elliemae/ds-icons';\n\nconst ActionButton = aggregatedClasses(DSButton)('shuttle-list-item', 'action-button');\n\nexport const DeleteButton = (props) => (\n <ActionButton\n buttonType=\"text\"\n icon={<CloseCircle />}\n {...props}\n // containerProps={{ 'data-testid': 'ds-shuttle__close-button' }}\n />\n);\n\nexport const MoveButton = (props) => (\n <ActionButton\n buttonType=\"text\"\n icon={<ArrowShortRight />}\n {...props}\n containerProps={{ 'data-testid': 'ds-shuttle__move-button' }}\n />\n);\n\nexport const DrillDownButton = (props) => (\n <ActionButton\n buttonType=\"text\"\n icon={<ArrowShortReturn data-testid=\"shuttle__drill-btn-icon\" />}\n {...props}\n containerProps={{ 'data-testid': 'shuttle__drill-btn' }}\n />\n);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AAEA,MAAM,eAAe,kBAAkB,UAAU,qBAAqB;AAE/D,MAAM,eAAe,CAAC,UAC3B,qCAAC,cAAD;AAAA,EACE,YAAW;AAAA,EACX,MAAM,qCAAC,aAAD;AAAA,GACF;AAKD,MAAM,aAAa,CAAC,UACzB,qCAAC,cAAD;AAAA,EACE,YAAW;AAAA,EACX,MAAM,qCAAC,iBAAD;AAAA,GACF,QAHN;AAAA,EAIE,gBAAgB,EAAE,eAAe;AAAA;AAI9B,MAAM,kBAAkB,CAAC,UAC9B,qCAAC,cAAD;AAAA,EACE,YAAW;AAAA,EACX,MAAM,qCAAC,kBAAD;AAAA,IAAkB,eAAY;AAAA;AAAA,GAChC,QAHN;AAAA,EAIE,gBAAgB,EAAE,eAAe;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|