@elliemae/ds-shuttle 1.55.0-next.7 → 2.0.0-alpha.10

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.
Files changed (190) hide show
  1. package/cjs/AnimationState.js +25 -42
  2. package/cjs/DSShuttle.js +89 -189
  3. package/cjs/SearchState.js +9 -22
  4. package/cjs/Shuttle.actions.js +57 -75
  5. package/cjs/ShuttleContainer.js +44 -79
  6. package/cjs/ShuttleImpl.js +236 -342
  7. package/cjs/ShuttleRenderer.js +114 -188
  8. package/cjs/ShuttleState.js +19 -41
  9. package/cjs/animation/animationConfig.js +58 -65
  10. package/cjs/classedComponents.js +37 -49
  11. package/cjs/components/LoadingIndicator.js +11 -12
  12. package/cjs/components/OverflowList.js +27 -34
  13. package/cjs/components/ShuttleBreadcrumb.js +23 -35
  14. package/cjs/components/ShuttleInfiniteScrollIndicator.js +21 -23
  15. package/cjs/components/ShuttleListItem/ActionButtons.js +34 -34
  16. package/cjs/components/ShuttleListItem/ShuttleListItem.js +57 -64
  17. package/cjs/components/ShuttleListItem/ShuttleSourceListItem.js +34 -64
  18. package/cjs/components/ShuttleListItem/ShuttleTargetListItem.js +30 -53
  19. package/cjs/components/ShuttleListPanel.js +11 -24
  20. package/cjs/components/ShuttleSearchBox.js +81 -107
  21. package/cjs/components/ShuttleSource.js +93 -175
  22. package/cjs/components/ShuttleTarget.js +55 -85
  23. package/cjs/components/VirtualizedItem.js +22 -22
  24. package/cjs/components/VirtualizedList.js +56 -66
  25. package/cjs/components/VirtualizedSortableList.js +20 -23
  26. package/cjs/helper.js +37 -89
  27. package/cjs/index.js +1 -64
  28. package/cjs/package.json +7 -0
  29. package/cjs/updateShuttleStateFromProps.js +31 -40
  30. package/cjs/utils.js +4 -9
  31. package/cjs/withProviders.js +10 -16
  32. package/esm/AnimationState.js +24 -40
  33. package/esm/DSShuttle.js +86 -186
  34. package/esm/SearchState.js +8 -20
  35. package/esm/Shuttle.actions.js +56 -73
  36. package/esm/ShuttleContainer.js +42 -77
  37. package/esm/ShuttleImpl.js +240 -337
  38. package/esm/ShuttleRenderer.js +110 -183
  39. package/esm/ShuttleState.js +14 -34
  40. package/esm/animation/animationConfig.js +58 -65
  41. package/esm/classedComponents.js +31 -43
  42. package/esm/components/LoadingIndicator.js +10 -11
  43. package/esm/components/OverflowList.js +23 -30
  44. package/esm/components/ShuttleBreadcrumb.js +21 -33
  45. package/esm/components/ShuttleInfiniteScrollIndicator.js +20 -22
  46. package/esm/components/ShuttleListItem/ActionButtons.js +32 -32
  47. package/esm/components/ShuttleListItem/ShuttleListItem.js +55 -62
  48. package/esm/components/ShuttleListItem/ShuttleSourceListItem.js +30 -59
  49. package/esm/components/ShuttleListItem/ShuttleTargetListItem.js +26 -49
  50. package/esm/components/ShuttleListPanel.js +10 -23
  51. package/esm/components/ShuttleSearchBox.js +79 -99
  52. package/esm/components/ShuttleSource.js +82 -162
  53. package/esm/components/ShuttleTarget.js +49 -79
  54. package/esm/components/VirtualizedItem.js +20 -20
  55. package/esm/components/VirtualizedList.js +52 -62
  56. package/esm/components/VirtualizedSortableList.js +16 -18
  57. package/esm/helper.js +35 -85
  58. package/esm/index.js +0 -63
  59. package/esm/package.json +7 -0
  60. package/esm/updateShuttleStateFromProps.js +30 -38
  61. package/esm/utils.js +1 -4
  62. package/esm/withProviders.js +8 -15
  63. package/package.json +150 -13
  64. package/types/AnimationState.d.ts +26 -0
  65. package/types/DSShuttle.d.ts +119 -0
  66. package/types/SearchState.d.ts +22 -0
  67. package/types/Shuttle.actions.d.ts +11 -0
  68. package/types/ShuttleContainer.d.ts +3 -0
  69. package/types/ShuttleImpl.d.ts +3 -0
  70. package/types/ShuttleRenderer.d.ts +37 -0
  71. package/types/ShuttleState.d.ts +53 -0
  72. package/types/animation/animationConfig.d.ts +68 -0
  73. package/types/classedComponents.d.ts +14 -0
  74. package/types/components/LoadingIndicator.d.ts +3 -0
  75. package/types/components/OverflowList.d.ts +7 -0
  76. package/types/components/ShuttleBreadcrumb.d.ts +7 -0
  77. package/types/components/ShuttleInfiniteScrollIndicator.d.ts +5 -0
  78. package/types/components/ShuttleListItem/ActionButtons.d.ts +4 -0
  79. package/types/components/ShuttleListItem/ShuttleListItem.d.ts +14 -0
  80. package/types/components/ShuttleListItem/ShuttleSourceListItem.d.ts +13 -0
  81. package/types/components/ShuttleListItem/ShuttleTargetListItem.d.ts +13 -0
  82. package/types/components/ShuttleListPanel.d.ts +7 -0
  83. package/types/components/ShuttleSearchBox.d.ts +20 -0
  84. package/types/components/ShuttleSource.d.ts +54 -0
  85. package/types/components/ShuttleTarget.d.ts +16 -0
  86. package/types/components/VirtualizedItem.d.ts +3 -0
  87. package/types/components/VirtualizedList.d.ts +12 -0
  88. package/types/components/VirtualizedSortableList.d.ts +6 -0
  89. package/types/helper.d.ts +16 -0
  90. package/types/index.d.ts +1 -0
  91. package/types/tests/DSShuttle.events.test.d.ts +1 -0
  92. package/types/tests/DSShuttle.test.d.ts +1 -0
  93. package/types/tests/utils.d.ts +116 -0
  94. package/types/updateShuttleStateFromProps.d.ts +1 -0
  95. package/types/utils.d.ts +2 -0
  96. package/types/withProviders.d.ts +3 -0
  97. package/AnimationState/package.json +0 -10
  98. package/DSShuttle/package.json +0 -10
  99. package/SearchState/package.json +0 -10
  100. package/Shuttle.actions/package.json +0 -10
  101. package/ShuttleContainer/package.json +0 -10
  102. package/ShuttleImpl/package.json +0 -10
  103. package/ShuttleRenderer/package.json +0 -10
  104. package/ShuttleState/package.json +0 -10
  105. package/animation/animationConfig/package.json +0 -10
  106. package/cjs/AnimationState.js.map +0 -1
  107. package/cjs/DSShuttle.js.map +0 -1
  108. package/cjs/SearchState.js.map +0 -1
  109. package/cjs/Shuttle.actions.js.map +0 -1
  110. package/cjs/ShuttleContainer.js.map +0 -1
  111. package/cjs/ShuttleImpl.js.map +0 -1
  112. package/cjs/ShuttleRenderer.js.map +0 -1
  113. package/cjs/ShuttleState.js.map +0 -1
  114. package/cjs/animation/animationConfig.js.map +0 -1
  115. package/cjs/classedComponents.js.map +0 -1
  116. package/cjs/components/LoadingIndicator.js.map +0 -1
  117. package/cjs/components/OverflowList.js.map +0 -1
  118. package/cjs/components/ShuttleBreadcrumb.js.map +0 -1
  119. package/cjs/components/ShuttleInfiniteScrollIndicator.js.map +0 -1
  120. package/cjs/components/ShuttleListItem/ActionButtons.js.map +0 -1
  121. package/cjs/components/ShuttleListItem/ShuttleListItem.js.map +0 -1
  122. package/cjs/components/ShuttleListItem/ShuttleSourceListItem.js.map +0 -1
  123. package/cjs/components/ShuttleListItem/ShuttleTargetListItem.js.map +0 -1
  124. package/cjs/components/ShuttleListPanel.js.map +0 -1
  125. package/cjs/components/ShuttleSearchBox.js.map +0 -1
  126. package/cjs/components/ShuttleSource.js.map +0 -1
  127. package/cjs/components/ShuttleTarget.js.map +0 -1
  128. package/cjs/components/VirtualizedItem.js.map +0 -1
  129. package/cjs/components/VirtualizedList.js.map +0 -1
  130. package/cjs/components/VirtualizedSortableList.js.map +0 -1
  131. package/cjs/helper.js.map +0 -1
  132. package/cjs/index.js.map +0 -1
  133. package/cjs/tests/utils.js +0 -1112
  134. package/cjs/tests/utils.js.map +0 -1
  135. package/cjs/updateShuttleStateFromProps.js.map +0 -1
  136. package/cjs/utils.js.map +0 -1
  137. package/cjs/withProviders.js.map +0 -1
  138. package/classedComponents/package.json +0 -10
  139. package/components/LoadingIndicator/package.json +0 -10
  140. package/components/OverflowList/package.json +0 -10
  141. package/components/ShuttleBreadcrumb/package.json +0 -10
  142. package/components/ShuttleInfiniteScrollIndicator/package.json +0 -10
  143. package/components/ShuttleListItem/ActionButtons/package.json +0 -10
  144. package/components/ShuttleListItem/ShuttleListItem/package.json +0 -10
  145. package/components/ShuttleListItem/ShuttleSourceListItem/package.json +0 -10
  146. package/components/ShuttleListItem/ShuttleTargetListItem/package.json +0 -10
  147. package/components/ShuttleListPanel/package.json +0 -10
  148. package/components/ShuttleSearchBox/package.json +0 -10
  149. package/components/ShuttleSource/package.json +0 -10
  150. package/components/ShuttleTarget/package.json +0 -10
  151. package/components/VirtualizedItem/package.json +0 -10
  152. package/components/VirtualizedList/package.json +0 -10
  153. package/components/VirtualizedSortableList/package.json +0 -10
  154. package/esm/AnimationState.js.map +0 -1
  155. package/esm/DSShuttle.js.map +0 -1
  156. package/esm/SearchState.js.map +0 -1
  157. package/esm/Shuttle.actions.js.map +0 -1
  158. package/esm/ShuttleContainer.js.map +0 -1
  159. package/esm/ShuttleImpl.js.map +0 -1
  160. package/esm/ShuttleRenderer.js.map +0 -1
  161. package/esm/ShuttleState.js.map +0 -1
  162. package/esm/animation/animationConfig.js.map +0 -1
  163. package/esm/classedComponents.js.map +0 -1
  164. package/esm/components/LoadingIndicator.js.map +0 -1
  165. package/esm/components/OverflowList.js.map +0 -1
  166. package/esm/components/ShuttleBreadcrumb.js.map +0 -1
  167. package/esm/components/ShuttleInfiniteScrollIndicator.js.map +0 -1
  168. package/esm/components/ShuttleListItem/ActionButtons.js.map +0 -1
  169. package/esm/components/ShuttleListItem/ShuttleListItem.js.map +0 -1
  170. package/esm/components/ShuttleListItem/ShuttleSourceListItem.js.map +0 -1
  171. package/esm/components/ShuttleListItem/ShuttleTargetListItem.js.map +0 -1
  172. package/esm/components/ShuttleListPanel.js.map +0 -1
  173. package/esm/components/ShuttleSearchBox.js.map +0 -1
  174. package/esm/components/ShuttleSource.js.map +0 -1
  175. package/esm/components/ShuttleTarget.js.map +0 -1
  176. package/esm/components/VirtualizedItem.js.map +0 -1
  177. package/esm/components/VirtualizedList.js.map +0 -1
  178. package/esm/components/VirtualizedSortableList.js.map +0 -1
  179. package/esm/helper.js.map +0 -1
  180. package/esm/index.js.map +0 -1
  181. package/esm/tests/utils.js +0 -1100
  182. package/esm/tests/utils.js.map +0 -1
  183. package/esm/updateShuttleStateFromProps.js.map +0 -1
  184. package/esm/utils.js.map +0 -1
  185. package/esm/withProviders.js.map +0 -1
  186. package/helper/package.json +0 -10
  187. package/tests/utils/package.json +0 -10
  188. package/updateShuttleStateFromProps/package.json +0 -10
  189. package/utils/package.json +0 -10
  190. package/withProviders/package.json +0 -10
@@ -1,19 +1,18 @@
1
- import React from 'react';
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'react';
2
3
  import { DSCircularProgressIndicator } from '@elliemae/ds-basic/CircularProgressIndicator';
3
4
  import styled from 'styled-components';
4
5
 
5
- var Wrapper = /*#__PURE__*/styled.div.withConfig({
6
+ var _Wrapper;
7
+ const Wrapper = /*#__PURE__*/styled.div.withConfig({
6
8
  componentId: "sc-18oj125-0"
7
9
  })(["display:flex;justify-content:center;align-items:center;width:100%;height:100%;"]);
8
10
 
9
- var LoadingIndicator = function LoadingIndicator() {
10
- return /*#__PURE__*/React.createElement(Wrapper, {
11
- "data-testid": "shuttle__loading-indicator"
12
- }, /*#__PURE__*/React.createElement(DSCircularProgressIndicator, {
13
- size: "xl",
14
- showLabel: true
15
- }));
16
- };
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
17
 
18
18
  export { LoadingIndicator as default };
19
- //# sourceMappingURL=LoadingIndicator.js.map
@@ -1,42 +1,35 @@
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
1
2
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
- import React, { useContext } from 'react';
3
- import { useTransition, animated } from 'react-spring/web.cjs';
3
+ import { useContext } from 'react';
4
+ import { useTransition, animated } from 'react-spring/web';
4
5
  import { animationConfig } from '../animation/animationConfig.js';
5
6
  import AnimationContext from '../AnimationState.js';
6
- import '@babel/runtime/helpers/esm/slicedToArray';
7
- import 'constate';
8
7
 
9
8
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
10
9
 
11
10
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
12
11
 
13
- function OverflowList(_ref) {
14
- var _ref$className = _ref.className,
15
- className = _ref$className === void 0 ? '' : _ref$className,
16
- _ref$activeHierarchy = _ref.activeHierarchy,
17
- activeHierarchy = _ref$activeHierarchy === void 0 ? '' : _ref$activeHierarchy,
18
- children = _ref.children;
19
-
20
- var _useContext = useContext(AnimationContext.Context),
21
- _useContext$state$isD = _useContext.state.isDrillingDown,
22
- isDrillingDown = _useContext$state$isD === void 0 ? false : _useContext$state$isD,
23
- setIsDrillingDown = _useContext.setIsDrillingDown;
24
-
25
- var overflowTransition = useTransition(activeHierarchy, null, _objectSpread(_objectSpread({}, animationConfig.moveList(isDrillingDown)), {}, {
26
- onDestroyed: function onDestroyed() {
27
- return setIsDrillingDown(false);
28
- }
12
+ function OverflowList({
13
+ className = '',
14
+ activeHierarchy = '',
15
+ children
16
+ }) {
17
+ const {
18
+ state: {
19
+ isDrillingDown = false
20
+ },
21
+ setIsDrillingDown
22
+ } = useContext(AnimationContext.Context);
23
+ const overflowTransition = useTransition(activeHierarchy, null, _objectSpread(_objectSpread({}, animationConfig.moveList(isDrillingDown)), {}, {
24
+ onDestroyed: () => setIsDrillingDown(false)
29
25
  }));
30
- return overflowTransition.map(function (_ref2) {
31
- var props = _ref2.props,
32
- key = _ref2.key;
33
- return /*#__PURE__*/React.createElement(animated.div, {
34
- key: key,
35
- className: className,
36
- style: props
37
- }, children);
38
- });
26
+ return overflowTransition.map(({
27
+ props,
28
+ key
29
+ }) => /*#__PURE__*/_jsx(animated.div, {
30
+ className: className,
31
+ style: props
32
+ }, key, children));
39
33
  }
40
34
 
41
35
  export { OverflowList as default };
42
- //# sourceMappingURL=OverflowList.js.map
@@ -1,41 +1,29 @@
1
- import React from 'react';
2
- import { useTransition, animated } from 'react-spring/web.cjs';
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'react';
3
+ import { useTransition, animated } from 'react-spring/web';
3
4
  import DSBreadcrumb from '@elliemae/ds-basic/Breadcrumb';
4
5
  import { animationConfig } from '../animation/animationConfig.js';
5
6
 
6
- /* eslint-disable react/prop-types */
7
-
8
- function ShuttleBreadcrumb(_ref) {
9
- var _ref$className = _ref.className,
10
- className = _ref$className === void 0 ? '' : _ref$className,
11
- _ref$hierarchy = _ref.hierarchy,
12
- hierarchy = _ref$hierarchy === void 0 ? [] : _ref$hierarchy,
13
- _ref$onNavigateTo = _ref.onNavigateTo,
14
- onNavigateTo = _ref$onNavigateTo === void 0 ? function () {
15
- return null;
16
- } : _ref$onNavigateTo;
17
- var animatedCrumbs = useTransition(hierarchy, function (item) {
18
- return item.id;
19
- }, animationConfig.breadcrumb());
20
- return /*#__PURE__*/React.createElement("div", {
7
+ function ShuttleBreadcrumb({
8
+ className = '',
9
+ hierarchy = [],
10
+ onNavigateTo = () => null
11
+ }) {
12
+ const animatedCrumbs = useTransition(hierarchy, item => item.id, animationConfig.breadcrumb());
13
+ return /*#__PURE__*/_jsx("div", {
21
14
  className: className
22
- }, /*#__PURE__*/React.createElement(DSBreadcrumb, {
15
+ }, void 0, /*#__PURE__*/_jsx(DSBreadcrumb, {
23
16
  isTitle: true
24
- }, animatedCrumbs.map(function (_ref2) {
25
- var item = _ref2.item,
26
- props = _ref2.props,
27
- key = _ref2.key;
28
- return /*#__PURE__*/React.createElement(DSBreadcrumb.Item, {
29
- key: key,
30
- containerComponent: animated.li,
31
- label: item.name,
32
- onClick: function onClick() {
33
- return onNavigateTo(item, 'up');
34
- },
35
- style: props
36
- });
37
- })));
17
+ }, void 0, animatedCrumbs.map(({
18
+ item,
19
+ props,
20
+ key
21
+ }) => /*#__PURE__*/_jsx(DSBreadcrumb.Item, {
22
+ containerComponent: animated.li,
23
+ label: item.name,
24
+ onClick: () => onNavigateTo(item, 'up'),
25
+ style: props
26
+ }, key))));
38
27
  }
39
28
 
40
29
  export { ShuttleBreadcrumb as default };
41
- //# sourceMappingURL=ShuttleBreadcrumb.js.map
@@ -1,28 +1,26 @@
1
- import React from 'react';
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'react';
2
3
  import { aggregatedClasses } from '@elliemae/ds-classnames';
3
4
  import DSIndeterminateProgressIndicator from '@elliemae/ds-basic/IndeterminateProgressIndicator';
4
5
 
5
- /* eslint-disable react/no-unused-state */
6
- var blockName = 'shuttle-infinite-scroll-indicator';
7
- var InfiniteScrollBarContainer = aggregatedClasses('div')(blockName, null, function (_ref) {
8
- var isOpen = _ref.isOpen;
9
- return {
10
- opened: isOpen
11
- };
12
- });
6
+ var _DSIndeterminateProgr;
7
+ const blockName = 'shuttle-infinite-scroll-indicator';
8
+ const InfiniteScrollBarContainer = aggregatedClasses('div')(blockName, null, ({
9
+ isOpen
10
+ }) => ({
11
+ opened: isOpen
12
+ }));
13
13
 
14
- var ShuttleInfiniteScrollIndicator = function ShuttleInfiniteScrollIndicator(_ref2) {
15
- var isOpen = _ref2.isOpen;
16
- return /*#__PURE__*/React.createElement(InfiniteScrollBarContainer, {
17
- classProps: {
18
- isOpen: isOpen
19
- },
20
- "data-testid": blockName
21
- }, /*#__PURE__*/React.createElement(DSIndeterminateProgressIndicator, {
22
- processing: true,
23
- title: "Loading"
24
- }));
25
- };
14
+ const ShuttleInfiniteScrollIndicator = ({
15
+ isOpen
16
+ }) => /*#__PURE__*/_jsx(InfiniteScrollBarContainer, {
17
+ classProps: {
18
+ isOpen
19
+ },
20
+ "data-testid": blockName
21
+ }, void 0, _DSIndeterminateProgr || (_DSIndeterminateProgr = /*#__PURE__*/_jsx(DSIndeterminateProgressIndicator, {
22
+ processing: true,
23
+ title: "Loading"
24
+ })));
26
25
 
27
26
  export { ShuttleInfiniteScrollIndicator as default };
28
- //# sourceMappingURL=ShuttleInfiniteScrollIndicator.js.map
@@ -1,40 +1,40 @@
1
- import _extends from '@babel/runtime/helpers/esm/extends';
2
- import React from 'react';
1
+ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
3
+ import 'react';
3
4
  import { aggregatedClasses } from '@elliemae/ds-classnames';
4
5
  import DSButton from '@elliemae/ds-basic/Button';
5
6
  import CloseCircle from '@elliemae/ds-icons/CloseCircle';
6
7
  import ArrowShortRight from '@elliemae/ds-icons/ArrowShortRight';
7
8
  import ArrowShortReturn from '@elliemae/ds-icons/ArrowShortReturn';
9
+ import { jsx } from 'react/jsx-runtime';
8
10
 
9
- var ActionButton = aggregatedClasses(DSButton)('shuttle-list-item', 'action-button');
10
- var DeleteButton = function DeleteButton(props) {
11
- return /*#__PURE__*/React.createElement(ActionButton, _extends({
12
- buttonType: "text",
13
- icon: /*#__PURE__*/React.createElement(CloseCircle, null)
14
- }, props));
15
- };
16
- var MoveButton = function MoveButton(props) {
17
- return /*#__PURE__*/React.createElement(ActionButton, _extends({
18
- buttonType: "text",
19
- icon: /*#__PURE__*/React.createElement(ArrowShortRight, null)
20
- }, props, {
21
- containerProps: {
22
- 'data-testid': 'ds-shuttle__move-button'
23
- }
24
- }));
25
- };
26
- var DrillDownButton = function DrillDownButton(props) {
27
- return /*#__PURE__*/React.createElement(ActionButton, _extends({
28
- buttonType: "text",
29
- icon: /*#__PURE__*/React.createElement(ArrowShortReturn, {
30
- "data-testid": "shuttle__drill-btn-icon"
31
- })
32
- }, props, {
33
- containerProps: {
34
- 'data-testid': 'shuttle__drill-btn'
35
- }
36
- }));
37
- };
11
+ var _CloseCircle, _ArrowShortRight, _ArrowShortReturn;
12
+
13
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
14
+
15
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
16
+ const ActionButton = aggregatedClasses(DSButton)('shuttle-list-item', 'action-button');
17
+ const DeleteButton = props => /*#__PURE__*/jsx(ActionButton, _objectSpread({
18
+ buttonType: "text",
19
+ icon: _CloseCircle || (_CloseCircle = /*#__PURE__*/_jsx(CloseCircle, {}))
20
+ }, props));
21
+ const MoveButton = props => /*#__PURE__*/jsx(ActionButton, _objectSpread(_objectSpread({
22
+ buttonType: "text",
23
+ icon: _ArrowShortRight || (_ArrowShortRight = /*#__PURE__*/_jsx(ArrowShortRight, {}))
24
+ }, props), {}, {
25
+ containerProps: {
26
+ 'data-testid': 'ds-shuttle__move-button'
27
+ }
28
+ }));
29
+ const DrillDownButton = props => /*#__PURE__*/jsx(ActionButton, _objectSpread(_objectSpread({
30
+ buttonType: "text",
31
+ icon: _ArrowShortReturn || (_ArrowShortReturn = /*#__PURE__*/_jsx(ArrowShortReturn, {
32
+ "data-testid": "shuttle__drill-btn-icon"
33
+ }))
34
+ }, props), {}, {
35
+ containerProps: {
36
+ 'data-testid': 'shuttle__drill-btn'
37
+ }
38
+ }));
38
39
 
39
40
  export { DeleteButton, DrillDownButton, MoveButton };
40
- //# sourceMappingURL=ActionButtons.js.map
@@ -1,75 +1,68 @@
1
- import _extends from '@babel/runtime/helpers/esm/extends';
1
+ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
2
  import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
3
- import React from 'react';
3
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
4
+ import 'react';
4
5
  import { aggregatedClasses } from '@elliemae/ds-classnames';
5
- import { animated } from 'react-spring/web.cjs';
6
+ import { animated } from 'react-spring/web';
6
7
  import TruncatedTooltipText from '@elliemae/ds-basic/TruncatedTooltipText';
7
8
  import { sortableHandle } from 'react-sortable-hoc';
8
9
  import GripperVertical from '@elliemae/ds-icons/GripperVertical';
9
10
  import { isMovable } from '../../helper.js';
10
- import '@babel/runtime/helpers/esm/defineProperty';
11
- import '@elliemae/ds-utilities/utils';
12
- import 'treetabular';
11
+ import { jsxs } from 'react/jsx-runtime';
13
12
 
14
- var _excluded = ["item", "showIcons", "showIcon", "onSelect", "isChecked", "style", "showActions", "actions", "showSortHandler"];
15
- var blockName = 'shuttle-list-item';
16
- var Wrapper = aggregatedClasses(animated.li)(blockName);
17
- var ActionsGroup = aggregatedClasses('div')(blockName, 'actions');
18
- var IconWrapper = aggregatedClasses('div')(blockName, 'icon-wrapper');
19
- var Content = aggregatedClasses('label')(blockName, 'content', function (_ref) {
20
- var isChecked = _ref.isChecked,
21
- canMove = _ref.canMove,
22
- isReadonly = _ref.isReadonly;
23
- return {
24
- checked: isChecked,
25
- 'can-hover': canMove,
26
- 'read-only': isReadonly
27
- };
28
- });
29
- var SortHandler = sortableHandle(function () {
30
- return /*#__PURE__*/React.createElement(GripperVertical, {
31
- className: "gripper"
32
- });
33
- });
13
+ const _excluded = ["item", "showIcons", "showIcon", "onSelect", "isChecked", "style", "showActions", "actions", "showSortHandler"];
34
14
 
35
- function ShuttleListItem(_ref2) {
36
- var _ref2$item = _ref2.item,
37
- item = _ref2$item === void 0 ? {} : _ref2$item,
38
- _ref2$showIcons = _ref2.showIcons,
39
- showIcons = _ref2$showIcons === void 0 ? undefined : _ref2$showIcons,
40
- _ref2$showIcon = _ref2.showIcon,
41
- showIcon = _ref2$showIcon === void 0 ? true : _ref2$showIcon,
42
- _ref2$onSelect = _ref2.onSelect,
43
- onSelect = _ref2$onSelect === void 0 ? function () {
44
- return null;
45
- } : _ref2$onSelect,
46
- _ref2$isChecked = _ref2.isChecked,
47
- isChecked = _ref2$isChecked === void 0 ? false : _ref2$isChecked,
48
- _ref2$style = _ref2.style,
49
- style = _ref2$style === void 0 ? undefined : _ref2$style,
50
- _ref2$showActions = _ref2.showActions,
51
- showActions = _ref2$showActions === void 0 ? true : _ref2$showActions,
52
- _ref2$actions = _ref2.actions,
53
- actions = _ref2$actions === void 0 ? [] : _ref2$actions,
54
- _ref2$showSortHandler = _ref2.showSortHandler,
55
- showSortHandler = _ref2$showSortHandler === void 0 ? false : _ref2$showSortHandler,
56
- rest = _objectWithoutProperties(_ref2, _excluded);
15
+ var _GripperVertical, _SortHandler;
57
16
 
58
- return /*#__PURE__*/React.createElement(Wrapper, _extends({}, rest, {
17
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
18
+
19
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
20
+ const blockName = 'shuttle-list-item';
21
+ const Wrapper = aggregatedClasses(animated.li)(blockName);
22
+ const ActionsGroup = aggregatedClasses('div')(blockName, 'actions');
23
+ const IconWrapper = aggregatedClasses('div')(blockName, 'icon-wrapper');
24
+ const Content = aggregatedClasses('label')(blockName, 'content', ({
25
+ isChecked,
26
+ canMove,
27
+ isReadonly
28
+ }) => ({
29
+ checked: isChecked,
30
+ 'can-hover': canMove,
31
+ 'read-only': isReadonly
32
+ }));
33
+ const SortHandler = sortableHandle(() => _GripperVertical || (_GripperVertical = /*#__PURE__*/_jsx(GripperVertical, {
34
+ className: "gripper"
35
+ })));
36
+
37
+ function ShuttleListItem(_ref) {
38
+ let {
39
+ item = {},
40
+ showIcons = undefined,
41
+ showIcon = true,
42
+ onSelect = () => null,
43
+ isChecked = false,
44
+ style = undefined,
45
+ showActions = true,
46
+ actions = [],
47
+ showSortHandler = false
48
+ } = _ref,
49
+ rest = _objectWithoutProperties(_ref, _excluded);
50
+
51
+ return /*#__PURE__*/jsxs(Wrapper, _objectSpread(_objectSpread({}, rest), {}, {
59
52
  role: "listitem",
60
- style: style
61
- }), /*#__PURE__*/React.createElement(Content, {
62
- classProps: {
63
- canMove: isMovable(item),
64
- isChecked: isChecked,
65
- isReadonly: item.readyOnly
66
- },
67
- onClick: onSelect
68
- }, showSortHandler && /*#__PURE__*/React.createElement(SortHandler, null), (showIcon || showIcons) && /*#__PURE__*/React.createElement(IconWrapper, null, item.icon), /*#__PURE__*/React.createElement(TruncatedTooltipText, {
69
- className: "shuttle-tooltip-text",
70
- value: item.name
71
- })), showActions && /*#__PURE__*/React.createElement(ActionsGroup, null, actions));
53
+ style: style,
54
+ children: [/*#__PURE__*/_jsx(Content, {
55
+ classProps: {
56
+ canMove: isMovable(item),
57
+ isChecked,
58
+ isReadonly: item.readyOnly
59
+ },
60
+ onClick: onSelect
61
+ }, void 0, showSortHandler && (_SortHandler || (_SortHandler = /*#__PURE__*/_jsx(SortHandler, {}))), (showIcon || showIcons) && /*#__PURE__*/_jsx(IconWrapper, {}, void 0, item.icon), /*#__PURE__*/_jsx(TruncatedTooltipText, {
62
+ className: "shuttle-tooltip-text",
63
+ value: item.name
64
+ })), showActions && /*#__PURE__*/_jsx(ActionsGroup, {}, void 0, actions)]
65
+ }));
72
66
  }
73
67
 
74
68
  export { ShuttleListItem as default };
75
- //# sourceMappingURL=ShuttleListItem.js.map
@@ -1,86 +1,58 @@
1
- import _extends from '@babel/runtime/helpers/esm/extends';
2
- import _slicedToArray from '@babel/runtime/helpers/esm/slicedToArray';
1
+ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
3
3
  import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
4
- import React, { useState, useCallback, useEffect } from 'react';
4
+ import { useState, useCallback, useEffect } from 'react';
5
5
  import { isMovable } from '../../helper.js';
6
6
  import { DrillDownButton, MoveButton } from './ActionButtons.js';
7
7
  import ShuttleListItem from './ShuttleListItem.js';
8
- import '@babel/runtime/helpers/esm/defineProperty';
9
- import '@elliemae/ds-utilities/utils';
10
- import 'treetabular';
11
- import '@elliemae/ds-classnames';
12
- import '@elliemae/ds-basic/Button';
13
- import '@elliemae/ds-icons/CloseCircle';
14
- import '@elliemae/ds-icons/ArrowShortRight';
15
- import '@elliemae/ds-icons/ArrowShortReturn';
16
- import 'react-spring/web.cjs';
17
- import '@elliemae/ds-basic/TruncatedTooltipText';
18
- import 'react-sortable-hoc';
19
- import '@elliemae/ds-icons/GripperVertical';
8
+ import { jsx } from 'react/jsx-runtime';
20
9
 
21
- var _excluded = ["item", "onItemCheck", "onMoveToTarget", "onNavigateOnSourceTo", "isChecked", "showMoveButton", "showDrillDownButton", "index"];
10
+ const _excluded = ["item", "onItemCheck", "onMoveToTarget", "onNavigateOnSourceTo", "isChecked", "showMoveButton", "showDrillDownButton", "index"];
22
11
 
23
- function ShuttleSourceListItem(_ref) {
24
- var _ref$item = _ref.item,
25
- item = _ref$item === void 0 ? {} : _ref$item,
26
- _ref$onItemCheck = _ref.onItemCheck,
27
- onItemCheck = _ref$onItemCheck === void 0 ? function () {
28
- return null;
29
- } : _ref$onItemCheck,
30
- _ref$onMoveToTarget = _ref.onMoveToTarget,
31
- onMoveToTarget = _ref$onMoveToTarget === void 0 ? function () {
32
- return null;
33
- } : _ref$onMoveToTarget,
34
- _ref$onNavigateOnSour = _ref.onNavigateOnSourceTo,
35
- onNavigateOnSourceTo = _ref$onNavigateOnSour === void 0 ? function () {
36
- return null;
37
- } : _ref$onNavigateOnSour,
38
- _ref$isChecked = _ref.isChecked,
39
- isChecked = _ref$isChecked === void 0 ? false : _ref$isChecked,
40
- _ref$showMoveButton = _ref.showMoveButton,
41
- showMoveButton = _ref$showMoveButton === void 0 ? true : _ref$showMoveButton,
42
- _ref$showDrillDownBut = _ref.showDrillDownButton,
43
- showDrillDownButton = _ref$showDrillDownBut === void 0 ? true : _ref$showDrillDownBut;
44
- _ref.index;
45
- var rest = _objectWithoutProperties(_ref, _excluded);
12
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
13
+
14
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
46
15
 
47
- var _useState = useState(false),
48
- _useState2 = _slicedToArray(_useState, 2),
49
- clicked = _useState2[0],
50
- setClicked = _useState2[1];
16
+ function ShuttleSourceListItem(_ref) {
17
+ let {
18
+ item = {},
19
+ onItemCheck = () => null,
20
+ onMoveToTarget = () => null,
21
+ onNavigateOnSourceTo = () => null,
22
+ isChecked = false,
23
+ showMoveButton = true,
24
+ showDrillDownButton = true,
25
+ index
26
+ } = _ref,
27
+ rest = _objectWithoutProperties(_ref, _excluded);
51
28
 
52
- var moveToTarget = useCallback(function () {
53
- return onMoveToTarget(item);
54
- }, [item]);
55
- useEffect(function () {
29
+ const [clicked, setClicked] = useState(false);
30
+ const moveToTarget = useCallback(() => onMoveToTarget(item), [item]);
31
+ useEffect(() => {
56
32
  if (clicked) {
57
33
  moveToTarget();
58
34
  }
59
35
  }, [clicked]);
60
- var navigateOnSourceTo = useCallback(function () {
61
- return onNavigateOnSourceTo(item);
62
- }, [item]);
63
- var checkItem = useCallback(function () {
36
+ const navigateOnSourceTo = useCallback(() => onNavigateOnSourceTo(item), [item]);
37
+ const checkItem = useCallback(() => {
64
38
  if (!clicked) onItemCheck(item);
65
39
  }, [item, clicked]);
66
40
 
67
- var handleOnClick = function handleOnClick() {
41
+ const handleOnClick = () => {
68
42
  if (!clicked) {
69
43
  setClicked(true);
70
44
  }
71
45
  };
72
46
 
73
- return /*#__PURE__*/React.createElement(ShuttleListItem, _extends({}, rest, {
74
- actions: [showDrillDownButton && /*#__PURE__*/React.createElement(DrillDownButton, {
75
- key: "drill-down",
47
+ return /*#__PURE__*/jsx(ShuttleListItem, _objectSpread(_objectSpread({}, rest), {}, {
48
+ actions: [showDrillDownButton && /*#__PURE__*/_jsx(DrillDownButton, {
76
49
  disabled: !item.hasChildren && !item.asyncLoad || item.readOnly || item.disableDrillDown,
77
50
  onClick: navigateOnSourceTo
78
- }), showMoveButton && /*#__PURE__*/React.createElement(MoveButton, {
51
+ }, "drill-down"), showMoveButton && /*#__PURE__*/_jsx(MoveButton, {
79
52
  "data-testid": "ds-shuttle__move-button",
80
- key: "move",
81
53
  disabled: !isMovable(item) || item.readOnly,
82
54
  onClick: handleOnClick
83
- })],
55
+ }, "move")],
84
56
  isChecked: isChecked,
85
57
  item: item,
86
58
  onSelect: checkItem
@@ -88,4 +60,3 @@ function ShuttleSourceListItem(_ref) {
88
60
  }
89
61
 
90
62
  export { ShuttleSourceListItem as default };
91
- //# sourceMappingURL=ShuttleSourceListItem.js.map
@@ -1,67 +1,44 @@
1
- import _extends from '@babel/runtime/helpers/esm/extends';
1
+ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
3
  import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
3
- import React, { useCallback } from 'react';
4
+ import { useCallback } from 'react';
4
5
  import { DrillDownButton, DeleteButton } from './ActionButtons.js';
5
6
  import ShuttleListItem from './ShuttleListItem.js';
6
- import '@elliemae/ds-classnames';
7
- import '@elliemae/ds-basic/Button';
8
- import '@elliemae/ds-icons/CloseCircle';
9
- import '@elliemae/ds-icons/ArrowShortRight';
10
- import '@elliemae/ds-icons/ArrowShortReturn';
11
- import 'react-spring/web.cjs';
12
- import '@elliemae/ds-basic/TruncatedTooltipText';
13
- import 'react-sortable-hoc';
14
- import '@elliemae/ds-icons/GripperVertical';
15
- import '../../helper.js';
16
- import '@babel/runtime/helpers/esm/defineProperty';
17
- import '@elliemae/ds-utilities/utils';
18
- import 'treetabular';
7
+ import { jsx } from 'react/jsx-runtime';
19
8
 
20
- var _excluded = ["item", "onMoveToSource", "onNavigateOnTargetTo", "isRoot", "showDeleteButton", "showDrillDownButton", "showActions", "index"];
9
+ const _excluded = ["item", "onMoveToSource", "onNavigateOnTargetTo", "isRoot", "showDeleteButton", "showDrillDownButton", "showActions", "index"];
10
+
11
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
12
+
13
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
21
14
 
22
15
  function ShuttleTargetListItem(_ref) {
23
- var _ref$item = _ref.item,
24
- item = _ref$item === void 0 ? {} : _ref$item,
25
- _ref$onMoveToSource = _ref.onMoveToSource,
26
- onMoveToSource = _ref$onMoveToSource === void 0 ? function () {
27
- return null;
28
- } : _ref$onMoveToSource,
29
- _ref$onNavigateOnTarg = _ref.onNavigateOnTargetTo,
30
- onNavigateOnTargetTo = _ref$onNavigateOnTarg === void 0 ? function () {
31
- return null;
32
- } : _ref$onNavigateOnTarg,
33
- _ref$isRoot = _ref.isRoot,
34
- isRoot = _ref$isRoot === void 0 ? false : _ref$isRoot,
35
- _ref$showDeleteButton = _ref.showDeleteButton,
36
- showDeleteButton = _ref$showDeleteButton === void 0 ? true : _ref$showDeleteButton,
37
- _ref$showDrillDownBut = _ref.showDrillDownButton,
38
- showDrillDownButton = _ref$showDrillDownBut === void 0 ? true : _ref$showDrillDownBut,
39
- _ref$showActions = _ref.showActions,
40
- showActions = _ref$showActions === void 0 ? true : _ref$showActions;
41
- _ref.index;
42
- var rest = _objectWithoutProperties(_ref, _excluded);
16
+ let {
17
+ item = {},
18
+ onMoveToSource = () => null,
19
+ onNavigateOnTargetTo = () => null,
20
+ isRoot = false,
21
+ showDeleteButton = true,
22
+ showDrillDownButton = true,
23
+ showActions = true,
24
+ index
25
+ } = _ref,
26
+ rest = _objectWithoutProperties(_ref, _excluded);
43
27
 
44
- var moveToSource = useCallback(function () {
45
- return onMoveToSource(item);
46
- }, [item]);
47
- var navigateOnTargetTo = useCallback(function () {
48
- return onNavigateOnTargetTo(item);
49
- }, [item]);
50
- return /*#__PURE__*/React.createElement(ShuttleListItem, _extends({}, rest, {
51
- actions: [showDrillDownButton && /*#__PURE__*/React.createElement(DrillDownButton, {
52
- key: "drill-down",
28
+ const moveToSource = useCallback(() => onMoveToSource(item), [item]);
29
+ const navigateOnTargetTo = useCallback(() => onNavigateOnTargetTo(item), [item]);
30
+ return /*#__PURE__*/jsx(ShuttleListItem, _objectSpread(_objectSpread({}, rest), {}, {
31
+ actions: [showDrillDownButton && /*#__PURE__*/_jsx(DrillDownButton, {
53
32
  disabled: !item.hasChildren && !item.asyncLoad || item.readOnly || item.disableDrillDown,
54
33
  onClick: navigateOnTargetTo
55
- }), showDeleteButton && isRoot && /*#__PURE__*/React.createElement(DeleteButton, {
56
- key: "delete",
34
+ }, "drill-down"), showDeleteButton && isRoot && /*#__PURE__*/_jsx(DeleteButton, {
57
35
  disabled: item.readOnly,
58
36
  onClick: moveToSource,
59
37
  "data-testid": "ds-shuttle__close-button"
60
- })],
38
+ }, "delete")],
61
39
  item: item,
62
40
  showActions: showActions
63
41
  }));
64
42
  }
65
43
 
66
44
  export { ShuttleTargetListItem as default };
67
- //# sourceMappingURL=ShuttleTargetListItem.js.map