@elliemae/ds-shuttle 2.2.0-alpha.4 → 3.0.0-next.2

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 (148) hide show
  1. package/cjs/AnimationState.js +19 -46
  2. package/cjs/DSShuttle.js +219 -166
  3. package/cjs/SearchState.js +25 -44
  4. package/cjs/Shuttle.actions.js +98 -87
  5. package/cjs/ShuttleContainer.js +61 -56
  6. package/cjs/ShuttleImpl.js +206 -109
  7. package/cjs/ShuttleRenderer.js +135 -140
  8. package/cjs/ShuttleState.js +53 -57
  9. package/cjs/animation/animationConfig.js +56 -53
  10. package/cjs/classedComponents.js +69 -70
  11. package/cjs/components/LoadingIndicator.js +22 -49
  12. package/cjs/components/OverflowList.js +48 -50
  13. package/cjs/components/ShuttleBreadcrumb.js +40 -52
  14. package/cjs/components/ShuttleInfiniteScrollIndicator.js +37 -46
  15. package/cjs/components/ShuttleListItem/ActionButtons.js +51 -56
  16. package/cjs/components/ShuttleListItem/ShuttleListItem.js +80 -78
  17. package/cjs/components/ShuttleListItem/ShuttleSourceListItem.js +64 -78
  18. package/cjs/components/ShuttleListItem/ShuttleTargetListItem.js +56 -72
  19. package/cjs/components/ShuttleListPanel.js +26 -44
  20. package/cjs/components/ShuttleSearchBox.js +72 -61
  21. package/cjs/components/ShuttleSource.js +146 -150
  22. package/cjs/components/ShuttleTarget.js +100 -88
  23. package/cjs/components/VirtualizedItem.js +40 -45
  24. package/cjs/components/VirtualizedList.js +86 -81
  25. package/cjs/components/VirtualizedSortableList.js +40 -47
  26. package/cjs/helper.js +103 -69
  27. package/cjs/index.js +12 -38
  28. package/cjs/updateShuttleStateFromProps.js +69 -73
  29. package/cjs/utils.js +42 -40
  30. package/cjs/withProviders.js +27 -43
  31. package/esm/AnimationState.js +8 -12
  32. package/esm/DSShuttle.js +198 -126
  33. package/esm/SearchState.js +19 -15
  34. package/esm/Shuttle.actions.js +80 -63
  35. package/esm/ShuttleContainer.js +50 -34
  36. package/esm/ShuttleImpl.js +183 -78
  37. package/esm/ShuttleRenderer.js +128 -111
  38. package/esm/ShuttleState.js +53 -34
  39. package/esm/animation/animationConfig.js +52 -24
  40. package/esm/classedComponents.js +51 -43
  41. package/esm/components/LoadingIndicator.js +15 -20
  42. package/esm/components/OverflowList.js +41 -21
  43. package/esm/components/ShuttleBreadcrumb.js +33 -23
  44. package/esm/components/ShuttleInfiniteScrollIndicator.js +31 -18
  45. package/esm/components/ShuttleListItem/ActionButtons.js +39 -27
  46. package/esm/components/ShuttleListItem/ShuttleListItem.js +72 -50
  47. package/esm/components/ShuttleListItem/ShuttleSourceListItem.js +52 -45
  48. package/esm/components/ShuttleListItem/ShuttleTargetListItem.js +47 -42
  49. package/esm/components/ShuttleListPanel.js +19 -15
  50. package/esm/components/ShuttleSearchBox.js +66 -32
  51. package/esm/components/ShuttleSource.js +129 -125
  52. package/esm/components/ShuttleTarget.js +89 -68
  53. package/esm/components/VirtualizedItem.js +33 -15
  54. package/esm/components/VirtualizedList.js +75 -50
  55. package/esm/components/VirtualizedSortableList.js +32 -17
  56. package/esm/helper.js +67 -43
  57. package/esm/index.js +2 -9
  58. package/esm/updateShuttleStateFromProps.js +58 -39
  59. package/esm/utils.js +18 -12
  60. package/esm/withProviders.js +20 -14
  61. package/package.json +11 -11
  62. package/types/AnimationState.d.ts +2 -3
  63. package/types/DSShuttle.d.ts +1 -1
  64. package/types/SearchState.d.ts +2 -3
  65. package/types/ShuttleImpl.d.ts +2 -3
  66. package/types/ShuttleRenderer.d.ts +0 -1
  67. package/types/ShuttleState.d.ts +2 -3
  68. package/types/components/LoadingIndicator.d.ts +0 -1
  69. package/types/components/OverflowList.d.ts +0 -1
  70. package/types/components/ShuttleBreadcrumb.d.ts +0 -1
  71. package/types/components/ShuttleInfiniteScrollIndicator.d.ts +0 -1
  72. package/types/components/ShuttleListItem/ShuttleListItem.d.ts +0 -1
  73. package/types/components/ShuttleListItem/ShuttleSourceListItem.d.ts +0 -1
  74. package/types/components/ShuttleListItem/ShuttleTargetListItem.d.ts +0 -1
  75. package/types/components/ShuttleListPanel.d.ts +0 -1
  76. package/types/components/ShuttleSearchBox.d.ts +1 -3
  77. package/types/components/ShuttleSource.d.ts +0 -1
  78. package/types/components/ShuttleTarget.d.ts +0 -1
  79. package/types/components/VirtualizedItem.d.ts +0 -1
  80. package/types/components/VirtualizedList.d.ts +0 -1
  81. package/types/components/VirtualizedSortableList.d.ts +0 -1
  82. package/types/index.d.ts +1 -1
  83. package/types/updateShuttleStateFromProps.d.ts +1 -3
  84. package/types/withProviders.d.ts +0 -1
  85. package/cjs/AnimationState.js.map +0 -7
  86. package/cjs/DSShuttle.js.map +0 -7
  87. package/cjs/SearchState.js.map +0 -7
  88. package/cjs/Shuttle.actions.js.map +0 -7
  89. package/cjs/ShuttleContainer.js.map +0 -7
  90. package/cjs/ShuttleImpl.js.map +0 -7
  91. package/cjs/ShuttleRenderer.js.map +0 -7
  92. package/cjs/ShuttleState.js.map +0 -7
  93. package/cjs/animation/animationConfig.js.map +0 -7
  94. package/cjs/classedComponents.js.map +0 -7
  95. package/cjs/components/LoadingIndicator.js.map +0 -7
  96. package/cjs/components/OverflowList.js.map +0 -7
  97. package/cjs/components/ShuttleBreadcrumb.js.map +0 -7
  98. package/cjs/components/ShuttleInfiniteScrollIndicator.js.map +0 -7
  99. package/cjs/components/ShuttleListItem/ActionButtons.js.map +0 -7
  100. package/cjs/components/ShuttleListItem/ShuttleListItem.js.map +0 -7
  101. package/cjs/components/ShuttleListItem/ShuttleSourceListItem.js.map +0 -7
  102. package/cjs/components/ShuttleListItem/ShuttleTargetListItem.js.map +0 -7
  103. package/cjs/components/ShuttleListPanel.js.map +0 -7
  104. package/cjs/components/ShuttleSearchBox.js.map +0 -7
  105. package/cjs/components/ShuttleSource.js.map +0 -7
  106. package/cjs/components/ShuttleTarget.js.map +0 -7
  107. package/cjs/components/VirtualizedItem.js.map +0 -7
  108. package/cjs/components/VirtualizedList.js.map +0 -7
  109. package/cjs/components/VirtualizedSortableList.js.map +0 -7
  110. package/cjs/helper.js.map +0 -7
  111. package/cjs/index.js.map +0 -7
  112. package/cjs/tests/utils.js +0 -1218
  113. package/cjs/tests/utils.js.map +0 -7
  114. package/cjs/updateShuttleStateFromProps.js.map +0 -7
  115. package/cjs/utils.js.map +0 -7
  116. package/cjs/withProviders.js.map +0 -7
  117. package/esm/AnimationState.js.map +0 -7
  118. package/esm/DSShuttle.js.map +0 -7
  119. package/esm/SearchState.js.map +0 -7
  120. package/esm/Shuttle.actions.js.map +0 -7
  121. package/esm/ShuttleContainer.js.map +0 -7
  122. package/esm/ShuttleImpl.js.map +0 -7
  123. package/esm/ShuttleRenderer.js.map +0 -7
  124. package/esm/ShuttleState.js.map +0 -7
  125. package/esm/animation/animationConfig.js.map +0 -7
  126. package/esm/classedComponents.js.map +0 -7
  127. package/esm/components/LoadingIndicator.js.map +0 -7
  128. package/esm/components/OverflowList.js.map +0 -7
  129. package/esm/components/ShuttleBreadcrumb.js.map +0 -7
  130. package/esm/components/ShuttleInfiniteScrollIndicator.js.map +0 -7
  131. package/esm/components/ShuttleListItem/ActionButtons.js.map +0 -7
  132. package/esm/components/ShuttleListItem/ShuttleListItem.js.map +0 -7
  133. package/esm/components/ShuttleListItem/ShuttleSourceListItem.js.map +0 -7
  134. package/esm/components/ShuttleListItem/ShuttleTargetListItem.js.map +0 -7
  135. package/esm/components/ShuttleListPanel.js.map +0 -7
  136. package/esm/components/ShuttleSearchBox.js.map +0 -7
  137. package/esm/components/ShuttleSource.js.map +0 -7
  138. package/esm/components/ShuttleTarget.js.map +0 -7
  139. package/esm/components/VirtualizedItem.js.map +0 -7
  140. package/esm/components/VirtualizedList.js.map +0 -7
  141. package/esm/components/VirtualizedSortableList.js.map +0 -7
  142. package/esm/helper.js.map +0 -7
  143. package/esm/index.js.map +0 -7
  144. package/esm/tests/utils.js +0 -1189
  145. package/esm/tests/utils.js.map +0 -7
  146. package/esm/updateShuttleStateFromProps.js.map +0 -7
  147. package/esm/utils.js.map +0 -7
  148. package/esm/withProviders.js.map +0 -7
@@ -1,25 +1,35 @@
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, {
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'core-js/modules/esnext.async-iterator.map.js';
3
+ import 'core-js/modules/esnext.iterator.map.js';
4
+ import 'react';
5
+ import { useTransition, animated } from 'react-spring/web';
6
+ import DSBreadcrumb from '@elliemae/ds-basic/Breadcrumb';
7
+ import { animationConfig } from '../animation/animationConfig.js';
8
+
9
+ function ShuttleBreadcrumb(_ref) {
10
+ let {
11
+ className = '',
12
+ hierarchy = [],
13
+ onNavigateTo = () => null
14
+ } = _ref;
15
+ const animatedCrumbs = useTransition(hierarchy, item => item.id, animationConfig.breadcrumb());
16
+ return /*#__PURE__*/_jsx("div", {
17
+ className: className
18
+ }, void 0, /*#__PURE__*/_jsx(DSBreadcrumb, {
11
19
  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
- }))));
20
+ }, void 0, animatedCrumbs.map(_ref2 => {
21
+ let {
22
+ item,
23
+ props,
24
+ key
25
+ } = _ref2;
26
+ return /*#__PURE__*/_jsx(DSBreadcrumb.Item, {
27
+ containerComponent: animated.li,
28
+ label: item.name,
29
+ onClick: () => onNavigateTo(item, 'up'),
30
+ style: props
31
+ }, key);
32
+ })));
19
33
  }
20
- var ShuttleBreadcrumb_default = ShuttleBreadcrumb;
21
- export {
22
- ShuttleBreadcrumb,
23
- ShuttleBreadcrumb_default as default
24
- };
25
- //# sourceMappingURL=ShuttleBreadcrumb.js.map
34
+
35
+ export { ShuttleBreadcrumb as default };
@@ -1,19 +1,32 @@
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
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'react';
3
+ import { aggregatedClasses } from '@elliemae/ds-classnames';
4
+ import DSIndeterminateProgressIndicator from '@elliemae/ds-indeterminate-progress-indicator';
5
+
6
+ var _DSIndeterminateProgr;
7
+ const blockName = 'shuttle-infinite-scroll-indicator';
8
+ const InfiniteScrollBarContainer = aggregatedClasses('div')(blockName, null, _ref => {
9
+ let {
10
+ isOpen
11
+ } = _ref;
12
+ return {
13
+ opened: isOpen
14
+ };
15
+ });
16
+
17
+ const ShuttleInfiniteScrollIndicator = _ref2 => {
18
+ let {
19
+ isOpen
20
+ } = _ref2;
21
+ return /*#__PURE__*/_jsx(InfiniteScrollBarContainer, {
22
+ classProps: {
23
+ isOpen
24
+ },
25
+ "data-testid": blockName
26
+ }, void 0, _DSIndeterminateProgr || (_DSIndeterminateProgr = /*#__PURE__*/_jsx(DSIndeterminateProgressIndicator, {
27
+ processing: true,
28
+ title: "Loading"
29
+ })));
18
30
  };
19
- //# sourceMappingURL=ShuttleInfiniteScrollIndicator.js.map
31
+
32
+ export { ShuttleInfiniteScrollIndicator as default };
@@ -1,31 +1,43 @@
1
- import * as React from "react";
2
- import React2 from "react";
3
- import { aggregatedClasses } from "@elliemae/ds-classnames";
4
- import { DSButton } from "@elliemae/ds-button";
5
- import { ArrowShortRight, ArrowShortReturn, CloseCircle } from "@elliemae/ds-icons";
6
- const ActionButton = aggregatedClasses(DSButton)("shuttle-list-item", "action-button");
7
- const DeleteButton = (props) => /* @__PURE__ */ React2.createElement(ActionButton, {
1
+ import 'core-js/modules/esnext.async-iterator.filter.js';
2
+ import 'core-js/modules/esnext.iterator.constructor.js';
3
+ import 'core-js/modules/esnext.iterator.filter.js';
4
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
5
+ import 'core-js/modules/esnext.iterator.for-each.js';
6
+ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
7
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
8
+ import 'react';
9
+ import { aggregatedClasses } from '@elliemae/ds-classnames';
10
+ import DSButton from '@elliemae/ds-button';
11
+ import { ArrowShortRight, ArrowShortReturn, CloseCircle } from '@elliemae/ds-icons';
12
+ import { jsx } from 'react/jsx-runtime';
13
+
14
+ var _CloseCircle, _ArrowShortRight, _ArrowShortReturn;
15
+
16
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
17
+
18
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
19
+ const ActionButton = aggregatedClasses(DSButton)('shuttle-list-item', 'action-button');
20
+ const DeleteButton = props => /*#__PURE__*/jsx(ActionButton, _objectSpread({
8
21
  buttonType: "text",
9
- icon: /* @__PURE__ */ React2.createElement(CloseCircle, null),
10
- ...props
11
- });
12
- const MoveButton = (props) => /* @__PURE__ */ React2.createElement(ActionButton, {
22
+ icon: _CloseCircle || (_CloseCircle = /*#__PURE__*/_jsx(CloseCircle, {}))
23
+ }, props));
24
+ const MoveButton = props => /*#__PURE__*/jsx(ActionButton, _objectSpread(_objectSpread({
13
25
  buttonType: "text",
14
- icon: /* @__PURE__ */ React2.createElement(ArrowShortRight, null),
15
- ...props,
16
- containerProps: { "data-testid": "ds-shuttle__move-button" }
17
- });
18
- const DrillDownButton = (props) => /* @__PURE__ */ React2.createElement(ActionButton, {
26
+ icon: _ArrowShortRight || (_ArrowShortRight = /*#__PURE__*/_jsx(ArrowShortRight, {}))
27
+ }, props), {}, {
28
+ containerProps: {
29
+ 'data-testid': 'ds-shuttle__move-button'
30
+ }
31
+ }));
32
+ const DrillDownButton = props => /*#__PURE__*/jsx(ActionButton, _objectSpread(_objectSpread({
19
33
  buttonType: "text",
20
- icon: /* @__PURE__ */ React2.createElement(ArrowShortReturn, {
34
+ icon: _ArrowShortReturn || (_ArrowShortReturn = /*#__PURE__*/_jsx(ArrowShortReturn, {
21
35
  "data-testid": "shuttle__drill-btn-icon"
22
- }),
23
- ...props,
24
- containerProps: { "data-testid": "shuttle__drill-btn" }
25
- });
26
- export {
27
- DeleteButton,
28
- DrillDownButton,
29
- MoveButton
30
- };
31
- //# sourceMappingURL=ActionButtons.js.map
36
+ }))
37
+ }, props), {}, {
38
+ containerProps: {
39
+ 'data-testid': 'shuttle__drill-btn'
40
+ }
41
+ }));
42
+
43
+ export { DeleteButton, DrillDownButton, MoveButton };
@@ -1,54 +1,76 @@
1
- import * as React from "react";
2
- import React2 from "react";
3
- import { aggregatedClasses } from "@elliemae/ds-classnames";
4
- import { animated } from "react-spring/web";
5
- import { DSTruncatedTooltipText } from "@elliemae/ds-truncated-tooltip-text";
6
- import { sortableHandle } from "react-sortable-hoc";
7
- import { GripperVertical } from "@elliemae/ds-icons";
8
- import { isMovable } from "../../helper";
9
- const blockName = "shuttle-list-item";
1
+ import 'core-js/modules/esnext.async-iterator.filter.js';
2
+ import 'core-js/modules/esnext.iterator.constructor.js';
3
+ import 'core-js/modules/esnext.iterator.filter.js';
4
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
5
+ import 'core-js/modules/esnext.iterator.for-each.js';
6
+ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
7
+ import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
8
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
9
+ import 'react';
10
+ import { aggregatedClasses } from '@elliemae/ds-classnames';
11
+ import { animated } from 'react-spring/web';
12
+ import TruncatedTooltipText from '@elliemae/ds-basic/TruncatedTooltipText';
13
+ import { sortableHandle } from 'react-sortable-hoc';
14
+ import { GripperVertical } from '@elliemae/ds-icons';
15
+ import { isMovable } from '../../helper.js';
16
+ import { jsxs } from 'react/jsx-runtime';
17
+
18
+ const _excluded = ["item", "showIcons", "showIcon", "onSelect", "isChecked", "style", "showActions", "actions", "showSortHandler"];
19
+
20
+ var _GripperVertical, _SortHandler;
21
+
22
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
23
+
24
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
25
+ const blockName = 'shuttle-list-item';
10
26
  const Wrapper = aggregatedClasses(animated.li)(blockName);
11
- const ActionsGroup = aggregatedClasses("div")(blockName, "actions");
12
- const IconWrapper = aggregatedClasses("div")(blockName, "icon-wrapper");
13
- const Content = aggregatedClasses("label")(blockName, "content", ({ isChecked, canMove, isReadonly }) => ({
14
- checked: isChecked,
15
- "can-hover": canMove,
16
- "read-only": isReadonly
17
- }));
18
- const SortHandler = sortableHandle(() => /* @__PURE__ */ React2.createElement(GripperVertical, {
27
+ const ActionsGroup = aggregatedClasses('div')(blockName, 'actions');
28
+ const IconWrapper = aggregatedClasses('div')(blockName, 'icon-wrapper');
29
+ const Content = aggregatedClasses('label')(blockName, 'content', _ref => {
30
+ let {
31
+ isChecked,
32
+ canMove,
33
+ isReadonly
34
+ } = _ref;
35
+ return {
36
+ checked: isChecked,
37
+ 'can-hover': canMove,
38
+ 'read-only': isReadonly
39
+ };
40
+ });
41
+ const SortHandler = sortableHandle(() => _GripperVertical || (_GripperVertical = /*#__PURE__*/_jsx(GripperVertical, {
19
42
  className: "gripper"
20
- }));
21
- function ShuttleListItem({
22
- item = {},
23
- showIcons = void 0,
24
- showIcon = true,
25
- onSelect = () => null,
26
- isChecked = false,
27
- style = void 0,
28
- showActions = true,
29
- actions = [],
30
- showSortHandler = false,
31
- ...rest
32
- }) {
33
- return /* @__PURE__ */ React2.createElement(Wrapper, {
34
- ...rest,
43
+ })));
44
+
45
+ function ShuttleListItem(_ref2) {
46
+ let {
47
+ item = {},
48
+ showIcons = undefined,
49
+ showIcon = true,
50
+ onSelect = () => null,
51
+ isChecked = false,
52
+ style = undefined,
53
+ showActions = true,
54
+ actions = [],
55
+ showSortHandler = false
56
+ } = _ref2,
57
+ rest = _objectWithoutProperties(_ref2, _excluded);
58
+
59
+ return /*#__PURE__*/jsxs(Wrapper, _objectSpread(_objectSpread({}, rest), {}, {
35
60
  role: "listitem",
36
- style
37
- }, /* @__PURE__ */ React2.createElement(Content, {
38
- classProps: {
39
- canMove: isMovable(item),
40
- isChecked,
41
- isReadonly: item.readyOnly
42
- },
43
- onClick: onSelect
44
- }, showSortHandler && /* @__PURE__ */ React2.createElement(SortHandler, null), (showIcon || showIcons) && /* @__PURE__ */ React2.createElement(IconWrapper, null, item.icon), /* @__PURE__ */ React2.createElement(DSTruncatedTooltipText, {
45
- className: "shuttle-tooltip-text",
46
- value: item.name
47
- })), showActions && /* @__PURE__ */ React2.createElement(ActionsGroup, null, actions));
61
+ style: style,
62
+ children: [/*#__PURE__*/_jsx(Content, {
63
+ classProps: {
64
+ canMove: isMovable(item),
65
+ isChecked,
66
+ isReadonly: item.readyOnly
67
+ },
68
+ onClick: onSelect
69
+ }, void 0, showSortHandler && (_SortHandler || (_SortHandler = /*#__PURE__*/_jsx(SortHandler, {}))), (showIcon || showIcons) && /*#__PURE__*/_jsx(IconWrapper, {}, void 0, item.icon), /*#__PURE__*/_jsx(TruncatedTooltipText, {
70
+ className: "shuttle-tooltip-text",
71
+ value: item.name
72
+ })), showActions && /*#__PURE__*/_jsx(ActionsGroup, {}, void 0, actions)]
73
+ }));
48
74
  }
49
- var ShuttleListItem_default = ShuttleListItem;
50
- export {
51
- ShuttleListItem,
52
- ShuttleListItem_default as default
53
- };
54
- //# sourceMappingURL=ShuttleListItem.js.map
75
+
76
+ export { ShuttleListItem as default };
@@ -1,19 +1,37 @@
1
- import * as React from "react";
2
- import React2, { useState, useCallback, useEffect } from "react";
3
- import { isMovable } from "../../helper";
4
- import { DrillDownButton, MoveButton } from "./ActionButtons";
5
- import { ShuttleListItem } from "./ShuttleListItem";
6
- function ShuttleSourceListItem({
7
- item = {},
8
- onItemCheck = () => null,
9
- onMoveToTarget = () => null,
10
- onNavigateOnSourceTo = () => null,
11
- isChecked = false,
12
- showMoveButton = true,
13
- showDrillDownButton = true,
14
- index,
15
- ...rest
16
- }) {
1
+ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
3
+ import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
4
+ import 'core-js/modules/web.dom-collections.iterator.js';
5
+ import 'core-js/modules/esnext.async-iterator.filter.js';
6
+ import 'core-js/modules/esnext.iterator.constructor.js';
7
+ import 'core-js/modules/esnext.iterator.filter.js';
8
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
9
+ import 'core-js/modules/esnext.iterator.for-each.js';
10
+ import { useState, useCallback, useEffect } from 'react';
11
+ import { isMovable } from '../../helper.js';
12
+ import { DrillDownButton, MoveButton } from './ActionButtons.js';
13
+ import ShuttleListItem from './ShuttleListItem.js';
14
+ import { jsx } from 'react/jsx-runtime';
15
+
16
+ const _excluded = ["item", "onItemCheck", "onMoveToTarget", "onNavigateOnSourceTo", "isChecked", "showMoveButton", "showDrillDownButton", "index"];
17
+
18
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
19
+
20
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
21
+
22
+ function ShuttleSourceListItem(_ref) {
23
+ let {
24
+ item = {},
25
+ onItemCheck = () => null,
26
+ onMoveToTarget = () => null,
27
+ onNavigateOnSourceTo = () => null,
28
+ isChecked = false,
29
+ showMoveButton = true,
30
+ showDrillDownButton = true,
31
+ index
32
+ } = _ref,
33
+ rest = _objectWithoutProperties(_ref, _excluded);
34
+
17
35
  const [clicked, setClicked] = useState(false);
18
36
  const moveToTarget = useCallback(() => onMoveToTarget(item), [item]);
19
37
  useEffect(() => {
@@ -21,41 +39,30 @@ function ShuttleSourceListItem({
21
39
  moveToTarget();
22
40
  }
23
41
  }, [clicked]);
24
- const navigateOnSourceTo = useCallback(() => onNavigateOnSourceTo(item), [
25
- item
26
- ]);
42
+ const navigateOnSourceTo = useCallback(() => onNavigateOnSourceTo(item), [item]);
27
43
  const checkItem = useCallback(() => {
28
- if (!clicked)
29
- onItemCheck(item);
44
+ if (!clicked) onItemCheck(item);
30
45
  }, [item, clicked]);
46
+
31
47
  const handleOnClick = () => {
32
48
  if (!clicked) {
33
49
  setClicked(true);
34
50
  }
35
51
  };
36
- return /* @__PURE__ */ React2.createElement(ShuttleListItem, {
37
- ...rest,
38
- actions: [
39
- showDrillDownButton && /* @__PURE__ */ React2.createElement(DrillDownButton, {
40
- key: "drill-down",
41
- disabled: !item.hasChildren && !item.asyncLoad || item.readOnly || item.disableDrillDown,
42
- onClick: navigateOnSourceTo
43
- }),
44
- showMoveButton && /* @__PURE__ */ React2.createElement(MoveButton, {
45
- "data-testid": "ds-shuttle__move-button",
46
- key: "move",
47
- disabled: !isMovable(item) || item.readOnly,
48
- onClick: handleOnClick
49
- })
50
- ],
51
- isChecked,
52
- item,
52
+
53
+ return /*#__PURE__*/jsx(ShuttleListItem, _objectSpread(_objectSpread({}, rest), {}, {
54
+ actions: [showDrillDownButton && /*#__PURE__*/_jsx(DrillDownButton, {
55
+ disabled: !item.hasChildren && !item.asyncLoad || item.readOnly || item.disableDrillDown,
56
+ onClick: navigateOnSourceTo
57
+ }, "drill-down"), showMoveButton && /*#__PURE__*/_jsx(MoveButton, {
58
+ "data-testid": "ds-shuttle__move-button",
59
+ disabled: !isMovable(item) || item.readOnly,
60
+ onClick: handleOnClick
61
+ }, "move")],
62
+ isChecked: isChecked,
63
+ item: item,
53
64
  onSelect: checkItem
54
- });
65
+ }));
55
66
  }
56
- var ShuttleSourceListItem_default = ShuttleSourceListItem;
57
- export {
58
- ShuttleSourceListItem,
59
- ShuttleSourceListItem_default as default
60
- };
61
- //# sourceMappingURL=ShuttleSourceListItem.js.map
67
+
68
+ export { ShuttleSourceListItem as default };
@@ -1,44 +1,49 @@
1
- import * as React from "react";
2
- import React2, { useCallback } from "react";
3
- import { DeleteButton, DrillDownButton } from "./ActionButtons";
4
- import { ShuttleListItem } from "./ShuttleListItem";
5
- function ShuttleTargetListItem({
6
- item = {},
7
- onMoveToSource = () => null,
8
- onNavigateOnTargetTo = () => null,
9
- isRoot = false,
10
- showDeleteButton = true,
11
- showDrillDownButton = true,
12
- showActions = true,
13
- index,
14
- ...rest
15
- }) {
1
+ import 'core-js/modules/esnext.async-iterator.filter.js';
2
+ import 'core-js/modules/esnext.iterator.constructor.js';
3
+ import 'core-js/modules/esnext.iterator.filter.js';
4
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
5
+ import 'core-js/modules/esnext.iterator.for-each.js';
6
+ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
7
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
8
+ import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
9
+ import { useCallback } from 'react';
10
+ import { DrillDownButton, DeleteButton } from './ActionButtons.js';
11
+ import ShuttleListItem from './ShuttleListItem.js';
12
+ import { jsx } from 'react/jsx-runtime';
13
+
14
+ const _excluded = ["item", "onMoveToSource", "onNavigateOnTargetTo", "isRoot", "showDeleteButton", "showDrillDownButton", "showActions", "index"];
15
+
16
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
17
+
18
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
19
+
20
+ function ShuttleTargetListItem(_ref) {
21
+ let {
22
+ item = {},
23
+ onMoveToSource = () => null,
24
+ onNavigateOnTargetTo = () => null,
25
+ isRoot = false,
26
+ showDeleteButton = true,
27
+ showDrillDownButton = true,
28
+ showActions = true,
29
+ index
30
+ } = _ref,
31
+ rest = _objectWithoutProperties(_ref, _excluded);
32
+
16
33
  const moveToSource = useCallback(() => onMoveToSource(item), [item]);
17
- const navigateOnTargetTo = useCallback(() => onNavigateOnTargetTo(item), [
18
- item
19
- ]);
20
- return /* @__PURE__ */ React2.createElement(ShuttleListItem, {
21
- ...rest,
22
- actions: [
23
- showDrillDownButton && /* @__PURE__ */ React2.createElement(DrillDownButton, {
24
- key: "drill-down",
25
- disabled: !item.hasChildren && !item.asyncLoad || item.readOnly || item.disableDrillDown,
26
- onClick: navigateOnTargetTo
27
- }),
28
- showDeleteButton && isRoot && /* @__PURE__ */ React2.createElement(DeleteButton, {
29
- key: "delete",
30
- disabled: item.readOnly,
31
- onClick: moveToSource,
32
- "data-testid": "ds-shuttle__close-button"
33
- })
34
- ],
35
- item,
36
- showActions
37
- });
34
+ const navigateOnTargetTo = useCallback(() => onNavigateOnTargetTo(item), [item]);
35
+ return /*#__PURE__*/jsx(ShuttleListItem, _objectSpread(_objectSpread({}, rest), {}, {
36
+ actions: [showDrillDownButton && /*#__PURE__*/_jsx(DrillDownButton, {
37
+ disabled: !item.hasChildren && !item.asyncLoad || item.readOnly || item.disableDrillDown,
38
+ onClick: navigateOnTargetTo
39
+ }, "drill-down"), showDeleteButton && isRoot && /*#__PURE__*/_jsx(DeleteButton, {
40
+ disabled: item.readOnly,
41
+ onClick: moveToSource,
42
+ "data-testid": "ds-shuttle__close-button"
43
+ }, "delete")],
44
+ item: item,
45
+ showActions: showActions
46
+ }));
38
47
  }
39
- var ShuttleTargetListItem_default = ShuttleTargetListItem;
40
- export {
41
- ShuttleTargetListItem,
42
- ShuttleTargetListItem_default as default
43
- };
44
- //# sourceMappingURL=ShuttleTargetListItem.js.map
48
+
49
+ export { ShuttleTargetListItem as default };
@@ -1,20 +1,24 @@
1
- import * as React from "react";
2
- import React2 from "react";
3
- import { DSButton } from "@elliemae/ds-button";
4
- import { ShuttleListPanel as Wrapper } from "../classedComponents";
5
- function ShuttleListPanel({ onClick = () => null, open = false, children }) {
6
- return /* @__PURE__ */ React2.createElement(Wrapper, {
7
- classProps: { open }
8
- }, /* @__PURE__ */ React2.createElement(DSButton, {
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'react';
3
+ import DSButton from '@elliemae/ds-button';
4
+ import { ShuttleListPanel as ShuttleListPanel$1 } from '../classedComponents.js';
5
+
6
+ function ShuttleListPanel(_ref) {
7
+ let {
8
+ onClick = () => null,
9
+ open = false,
10
+ children
11
+ } = _ref;
12
+ return /*#__PURE__*/_jsx(ShuttleListPanel$1, {
13
+ classProps: {
14
+ open
15
+ }
16
+ }, void 0, /*#__PURE__*/_jsx(DSButton, {
9
17
  buttonType: "text",
10
18
  icon: children,
11
- onClick,
19
+ onClick: onClick,
12
20
  "data-testid": "list-panel-btn"
13
21
  }));
14
22
  }
15
- var ShuttleListPanel_default = ShuttleListPanel;
16
- export {
17
- ShuttleListPanel,
18
- ShuttleListPanel_default as default
19
- };
20
- //# sourceMappingURL=ShuttleListPanel.js.map
23
+
24
+ export { ShuttleListPanel as default };