@elliemae/ds-shuttle 2.2.0-next.3 → 2.3.0-alpha.1

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 +46 -19
  2. package/cjs/AnimationState.js.map +7 -0
  3. package/cjs/DSShuttle.js +166 -219
  4. package/cjs/DSShuttle.js.map +7 -0
  5. package/cjs/SearchState.js +44 -25
  6. package/cjs/SearchState.js.map +7 -0
  7. package/cjs/Shuttle.actions.js +87 -98
  8. package/cjs/Shuttle.actions.js.map +7 -0
  9. package/cjs/ShuttleContainer.js +56 -61
  10. package/cjs/ShuttleContainer.js.map +7 -0
  11. package/cjs/ShuttleImpl.js +109 -206
  12. package/cjs/ShuttleImpl.js.map +7 -0
  13. package/cjs/ShuttleRenderer.js +140 -135
  14. package/cjs/ShuttleRenderer.js.map +7 -0
  15. package/cjs/ShuttleState.js +57 -53
  16. package/cjs/ShuttleState.js.map +7 -0
  17. package/cjs/animation/animationConfig.js +53 -56
  18. package/cjs/animation/animationConfig.js.map +7 -0
  19. package/cjs/classedComponents.js +70 -69
  20. package/cjs/classedComponents.js.map +7 -0
  21. package/cjs/components/LoadingIndicator.js +49 -22
  22. package/cjs/components/LoadingIndicator.js.map +7 -0
  23. package/cjs/components/OverflowList.js +50 -48
  24. package/cjs/components/OverflowList.js.map +7 -0
  25. package/cjs/components/ShuttleBreadcrumb.js +52 -40
  26. package/cjs/components/ShuttleBreadcrumb.js.map +7 -0
  27. package/cjs/components/ShuttleInfiniteScrollIndicator.js +46 -37
  28. package/cjs/components/ShuttleInfiniteScrollIndicator.js.map +7 -0
  29. package/cjs/components/ShuttleListItem/ActionButtons.js +56 -51
  30. package/cjs/components/ShuttleListItem/ActionButtons.js.map +7 -0
  31. package/cjs/components/ShuttleListItem/ShuttleListItem.js +78 -80
  32. package/cjs/components/ShuttleListItem/ShuttleListItem.js.map +7 -0
  33. package/cjs/components/ShuttleListItem/ShuttleSourceListItem.js +78 -64
  34. package/cjs/components/ShuttleListItem/ShuttleSourceListItem.js.map +7 -0
  35. package/cjs/components/ShuttleListItem/ShuttleTargetListItem.js +72 -56
  36. package/cjs/components/ShuttleListItem/ShuttleTargetListItem.js.map +7 -0
  37. package/cjs/components/ShuttleListPanel.js +44 -26
  38. package/cjs/components/ShuttleListPanel.js.map +7 -0
  39. package/cjs/components/ShuttleSearchBox.js +61 -72
  40. package/cjs/components/ShuttleSearchBox.js.map +7 -0
  41. package/cjs/components/ShuttleSource.js +150 -146
  42. package/cjs/components/ShuttleSource.js.map +7 -0
  43. package/cjs/components/ShuttleTarget.js +88 -100
  44. package/cjs/components/ShuttleTarget.js.map +7 -0
  45. package/cjs/components/VirtualizedItem.js +45 -40
  46. package/cjs/components/VirtualizedItem.js.map +7 -0
  47. package/cjs/components/VirtualizedList.js +81 -86
  48. package/cjs/components/VirtualizedList.js.map +7 -0
  49. package/cjs/components/VirtualizedSortableList.js +47 -40
  50. package/cjs/components/VirtualizedSortableList.js.map +7 -0
  51. package/cjs/helper.js +69 -103
  52. package/cjs/helper.js.map +7 -0
  53. package/cjs/index.js +38 -12
  54. package/cjs/index.js.map +7 -0
  55. package/cjs/tests/utils.js +1218 -0
  56. package/cjs/tests/utils.js.map +7 -0
  57. package/cjs/updateShuttleStateFromProps.js +73 -69
  58. package/cjs/updateShuttleStateFromProps.js.map +7 -0
  59. package/cjs/utils.js +40 -42
  60. package/cjs/utils.js.map +7 -0
  61. package/cjs/withProviders.js +43 -27
  62. package/cjs/withProviders.js.map +7 -0
  63. package/esm/AnimationState.js +12 -8
  64. package/esm/AnimationState.js.map +7 -0
  65. package/esm/DSShuttle.js +126 -198
  66. package/esm/DSShuttle.js.map +7 -0
  67. package/esm/SearchState.js +15 -19
  68. package/esm/SearchState.js.map +7 -0
  69. package/esm/Shuttle.actions.js +63 -80
  70. package/esm/Shuttle.actions.js.map +7 -0
  71. package/esm/ShuttleContainer.js +34 -50
  72. package/esm/ShuttleContainer.js.map +7 -0
  73. package/esm/ShuttleImpl.js +78 -183
  74. package/esm/ShuttleImpl.js.map +7 -0
  75. package/esm/ShuttleRenderer.js +111 -128
  76. package/esm/ShuttleRenderer.js.map +7 -0
  77. package/esm/ShuttleState.js +34 -53
  78. package/esm/ShuttleState.js.map +7 -0
  79. package/esm/animation/animationConfig.js +24 -52
  80. package/esm/animation/animationConfig.js.map +7 -0
  81. package/esm/classedComponents.js +43 -51
  82. package/esm/classedComponents.js.map +7 -0
  83. package/esm/components/LoadingIndicator.js +20 -15
  84. package/esm/components/LoadingIndicator.js.map +7 -0
  85. package/esm/components/OverflowList.js +21 -41
  86. package/esm/components/OverflowList.js.map +7 -0
  87. package/esm/components/ShuttleBreadcrumb.js +23 -33
  88. package/esm/components/ShuttleBreadcrumb.js.map +7 -0
  89. package/esm/components/ShuttleInfiniteScrollIndicator.js +18 -31
  90. package/esm/components/ShuttleInfiniteScrollIndicator.js.map +7 -0
  91. package/esm/components/ShuttleListItem/ActionButtons.js +27 -39
  92. package/esm/components/ShuttleListItem/ActionButtons.js.map +7 -0
  93. package/esm/components/ShuttleListItem/ShuttleListItem.js +50 -72
  94. package/esm/components/ShuttleListItem/ShuttleListItem.js.map +7 -0
  95. package/esm/components/ShuttleListItem/ShuttleSourceListItem.js +45 -52
  96. package/esm/components/ShuttleListItem/ShuttleSourceListItem.js.map +7 -0
  97. package/esm/components/ShuttleListItem/ShuttleTargetListItem.js +42 -47
  98. package/esm/components/ShuttleListItem/ShuttleTargetListItem.js.map +7 -0
  99. package/esm/components/ShuttleListPanel.js +15 -19
  100. package/esm/components/ShuttleListPanel.js.map +7 -0
  101. package/esm/components/ShuttleSearchBox.js +32 -66
  102. package/esm/components/ShuttleSearchBox.js.map +7 -0
  103. package/esm/components/ShuttleSource.js +125 -129
  104. package/esm/components/ShuttleSource.js.map +7 -0
  105. package/esm/components/ShuttleTarget.js +68 -89
  106. package/esm/components/ShuttleTarget.js.map +7 -0
  107. package/esm/components/VirtualizedItem.js +15 -33
  108. package/esm/components/VirtualizedItem.js.map +7 -0
  109. package/esm/components/VirtualizedList.js +50 -75
  110. package/esm/components/VirtualizedList.js.map +7 -0
  111. package/esm/components/VirtualizedSortableList.js +17 -32
  112. package/esm/components/VirtualizedSortableList.js.map +7 -0
  113. package/esm/helper.js +43 -67
  114. package/esm/helper.js.map +7 -0
  115. package/esm/index.js +9 -2
  116. package/esm/index.js.map +7 -0
  117. package/esm/tests/utils.js +1189 -0
  118. package/esm/tests/utils.js.map +7 -0
  119. package/esm/updateShuttleStateFromProps.js +39 -58
  120. package/esm/updateShuttleStateFromProps.js.map +7 -0
  121. package/esm/utils.js +12 -18
  122. package/esm/utils.js.map +7 -0
  123. package/esm/withProviders.js +14 -20
  124. package/esm/withProviders.js.map +7 -0
  125. package/package.json +11 -11
  126. package/types/AnimationState.d.ts +3 -2
  127. package/types/DSShuttle.d.ts +2 -39
  128. package/types/SearchState.d.ts +3 -2
  129. package/types/ShuttleImpl.d.ts +3 -2
  130. package/types/ShuttleRenderer.d.ts +1 -0
  131. package/types/ShuttleState.d.ts +3 -2
  132. package/types/components/LoadingIndicator.d.ts +1 -0
  133. package/types/components/OverflowList.d.ts +1 -0
  134. package/types/components/ShuttleBreadcrumb.d.ts +1 -0
  135. package/types/components/ShuttleInfiniteScrollIndicator.d.ts +1 -0
  136. package/types/components/ShuttleListItem/ShuttleListItem.d.ts +1 -0
  137. package/types/components/ShuttleListItem/ShuttleSourceListItem.d.ts +1 -0
  138. package/types/components/ShuttleListItem/ShuttleTargetListItem.d.ts +1 -0
  139. package/types/components/ShuttleListPanel.d.ts +1 -0
  140. package/types/components/ShuttleSearchBox.d.ts +3 -1
  141. package/types/components/ShuttleSource.d.ts +1 -0
  142. package/types/components/ShuttleTarget.d.ts +1 -0
  143. package/types/components/VirtualizedItem.d.ts +1 -0
  144. package/types/components/VirtualizedList.d.ts +1 -0
  145. package/types/components/VirtualizedSortableList.d.ts +1 -0
  146. package/types/index.d.ts +1 -1
  147. package/types/updateShuttleStateFromProps.d.ts +3 -1
  148. package/types/withProviders.d.ts +1 -0
@@ -1,18 +1,23 @@
1
- import _jsx from '@babel/runtime/helpers/esm/jsx';
2
- import 'react';
3
- import { DSCircularProgressIndicator } from '@elliemae/ds-circular-progress-indicator';
4
- import styled from 'styled-components';
5
-
6
- var _Wrapper;
7
- const Wrapper = /*#__PURE__*/styled.div.withConfig({
8
- componentId: "sc-18oj125-0"
9
- })(["display:flex;justify-content:center;align-items:center;width:100%;height:100%;"]);
10
-
11
- const LoadingIndicator = () => _Wrapper || (_Wrapper = /*#__PURE__*/_jsx(Wrapper, {
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, {
12
13
  "data-testid": "shuttle__loading-indicator"
13
- }, void 0, /*#__PURE__*/_jsx(DSCircularProgressIndicator, {
14
+ }, /* @__PURE__ */ React2.createElement(DSCircularProgressIndicator, {
14
15
  size: "xl",
15
16
  showLabel: true
16
- })));
17
-
18
- export { LoadingIndicator as default };
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
+ }
@@ -1,46 +1,26 @@
1
- import 'core-js/modules/esnext.async-iterator.filter.js';
2
- import 'core-js/modules/esnext.iterator.constructor.js';
3
- import 'core-js/modules/esnext.iterator.filter.js';
4
- import 'core-js/modules/esnext.async-iterator.for-each.js';
5
- import 'core-js/modules/esnext.iterator.for-each.js';
6
- import _jsx from '@babel/runtime/helpers/esm/jsx';
7
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
8
- import 'core-js/modules/esnext.async-iterator.map.js';
9
- import 'core-js/modules/esnext.iterator.map.js';
10
- import { useContext } from 'react';
11
- import { useTransition, animated } from 'react-spring/web';
12
- import { animationConfig } from '../animation/animationConfig.js';
13
- import AnimationContext from '../AnimationState.js';
14
-
15
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
16
-
17
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
18
-
19
- function OverflowList(_ref) {
20
- let {
21
- className = '',
22
- activeHierarchy = '',
23
- children
24
- } = _ref;
1
+ import * as React from "react";
2
+ import React2, { useContext } from "react";
3
+ import { useTransition, animated } from "react-spring/web";
4
+ import { animationConfig } from "../animation/animationConfig";
5
+ import { AnimationState } from "../AnimationState";
6
+ function OverflowList({ className = "", activeHierarchy = "", children }) {
25
7
  const {
26
- state: {
27
- isDrillingDown = false
28
- },
8
+ state: { isDrillingDown = false },
29
9
  setIsDrillingDown
30
- } = useContext(AnimationContext.Context);
31
- const overflowTransition = useTransition(activeHierarchy, null, _objectSpread(_objectSpread({}, animationConfig.moveList(isDrillingDown)), {}, {
10
+ } = useContext(AnimationState.Context);
11
+ const overflowTransition = useTransition(activeHierarchy, null, {
12
+ ...animationConfig.moveList(isDrillingDown),
32
13
  onDestroyed: () => setIsDrillingDown(false)
33
- }));
34
- return overflowTransition.map(_ref2 => {
35
- let {
36
- props,
37
- key
38
- } = _ref2;
39
- return /*#__PURE__*/_jsx(animated.div, {
40
- className: className,
41
- style: props
42
- }, key, children);
43
14
  });
15
+ return overflowTransition.map(({ props, key }) => /* @__PURE__ */ React2.createElement(animated.div, {
16
+ key,
17
+ className,
18
+ style: props
19
+ }, children));
44
20
  }
45
-
46
- export { OverflowList as default };
21
+ var OverflowList_default = OverflowList;
22
+ export {
23
+ OverflowList,
24
+ OverflowList_default as default
25
+ };
26
+ //# 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;AAAA,OAC3D,gBAAgB,SAAS;AAAA,IAC5B,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
+ }
@@ -1,35 +1,25 @@
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, {
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, {
19
11
  isTitle: true
20
- }, void 0, animatedCrumbs.map(_ref2 => {
21
- let {
22
- item,
23
- props,
24
- key
25
- } = _ref2;
26
- return /*#__PURE__*/_jsx(DSBreadcrumb.Item, {
27
- containerComponent: animated.li,
28
- label: item.name,
29
- onClick: () => onNavigateTo(item, 'up'),
30
- style: props
31
- }, key);
32
- })));
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
+ }))));
33
19
  }
34
-
35
- export { ShuttleBreadcrumb as default };
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
+ }
@@ -1,32 +1,19 @@
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
- })));
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
30
18
  };
31
-
32
- export { ShuttleInfiniteScrollIndicator as default };
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
+ }
@@ -1,43 +1,31 @@
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({
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, {
21
8
  buttonType: "text",
22
- icon: _CloseCircle || (_CloseCircle = /*#__PURE__*/_jsx(CloseCircle, {}))
23
- }, props));
24
- const MoveButton = props => /*#__PURE__*/jsx(ActionButton, _objectSpread(_objectSpread({
9
+ icon: /* @__PURE__ */ React2.createElement(CloseCircle, null),
10
+ ...props
11
+ });
12
+ const MoveButton = (props) => /* @__PURE__ */ React2.createElement(ActionButton, {
25
13
  buttonType: "text",
26
- icon: _ArrowShortRight || (_ArrowShortRight = /*#__PURE__*/_jsx(ArrowShortRight, {}))
27
- }, props), {}, {
28
- containerProps: {
29
- 'data-testid': 'ds-shuttle__move-button'
30
- }
31
- }));
32
- const DrillDownButton = props => /*#__PURE__*/jsx(ActionButton, _objectSpread(_objectSpread({
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, {
33
19
  buttonType: "text",
34
- icon: _ArrowShortReturn || (_ArrowShortReturn = /*#__PURE__*/_jsx(ArrowShortReturn, {
20
+ icon: /* @__PURE__ */ React2.createElement(ArrowShortReturn, {
35
21
  "data-testid": "shuttle__drill-btn-icon"
36
- }))
37
- }, props), {}, {
38
- containerProps: {
39
- 'data-testid': 'shuttle__drill-btn'
40
- }
41
- }));
42
-
43
- export { DeleteButton, DrillDownButton, MoveButton };
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
@@ -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,KACF;AAAA;AAKD,MAAM,aAAa,CAAC,UACzB,qCAAC,cAAD;AAAA,EACE,YAAW;AAAA,EACX,MAAM,qCAAC,iBAAD;AAAA,KACF;AAAA,EACJ,gBAAgB,EAAE,eAAe;AAAA;AAI9B,MAAM,kBAAkB,CAAC,UAC9B,qCAAC,cAAD;AAAA,EACE,YAAW;AAAA,EACX,MAAM,qCAAC,kBAAD;AAAA,IAAkB,eAAY;AAAA;AAAA,KAChC;AAAA,EACJ,gBAAgB,EAAE,eAAe;AAAA;",
6
+ "names": []
7
+ }
@@ -1,76 +1,54 @@
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';
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";
26
10
  const Wrapper = aggregatedClasses(animated.li)(blockName);
27
- const ActionsGroup = aggregatedClasses('div')(blockName, 'actions');
28
- const IconWrapper = aggregatedClasses('div')(blockName, 'icon-wrapper');
29
- const Content = aggregatedClasses('label')(blockName, 'content', _ref => {
30
- let {
31
- isChecked,
32
- canMove,
33
- isReadonly
34
- } = _ref;
35
- return {
36
- checked: isChecked,
37
- 'can-hover': canMove,
38
- 'read-only': isReadonly
39
- };
40
- });
41
- const SortHandler = sortableHandle(() => _GripperVertical || (_GripperVertical = /*#__PURE__*/_jsx(GripperVertical, {
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, {
42
19
  className: "gripper"
43
- })));
44
-
45
- function ShuttleListItem(_ref2) {
46
- let {
47
- item = {},
48
- showIcons = undefined,
49
- showIcon = true,
50
- onSelect = () => null,
51
- isChecked = false,
52
- style = undefined,
53
- showActions = true,
54
- actions = [],
55
- showSortHandler = false
56
- } = _ref2,
57
- rest = _objectWithoutProperties(_ref2, _excluded);
58
-
59
- return /*#__PURE__*/jsxs(Wrapper, _objectSpread(_objectSpread({}, rest), {}, {
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,
60
35
  role: "listitem",
61
- style: style,
62
- children: [/*#__PURE__*/_jsx(Content, {
63
- classProps: {
64
- canMove: isMovable(item),
65
- isChecked,
66
- isReadonly: item.readyOnly
67
- },
68
- onClick: onSelect
69
- }, void 0, showSortHandler && (_SortHandler || (_SortHandler = /*#__PURE__*/_jsx(SortHandler, {}))), (showIcon || showIcons) && /*#__PURE__*/_jsx(IconWrapper, {}, void 0, item.icon), /*#__PURE__*/_jsx(TruncatedTooltipText, {
70
- className: "shuttle-tooltip-text",
71
- value: item.name
72
- })), showActions && /*#__PURE__*/_jsx(ActionsGroup, {}, void 0, actions)]
73
- }));
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));
74
48
  }
75
-
76
- export { ShuttleListItem as default };
49
+ var ShuttleListItem_default = ShuttleListItem;
50
+ export {
51
+ ShuttleListItem,
52
+ ShuttleListItem_default as default
53
+ };
54
+ //# sourceMappingURL=ShuttleListItem.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/ShuttleListItem/ShuttleListItem.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { animated } from 'react-spring/web';\nimport { DSTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { sortableHandle } from 'react-sortable-hoc';\nimport { GripperVertical } from '@elliemae/ds-icons';\nimport { isMovable } from '../../helper';\n\nconst blockName = 'shuttle-list-item';\nconst Wrapper = aggregatedClasses(animated.li)(blockName);\nconst ActionsGroup = aggregatedClasses('div')(blockName, 'actions');\nconst IconWrapper = aggregatedClasses('div')(blockName, 'icon-wrapper');\nconst Content = aggregatedClasses('label')(blockName, 'content', ({ isChecked, canMove, isReadonly }) => ({\n checked: isChecked,\n 'can-hover': canMove,\n 'read-only': isReadonly,\n}));\n\nconst SortHandler = sortableHandle(() => <GripperVertical className=\"gripper\" />);\n\nfunction ShuttleListItem({\n item = {},\n showIcons = undefined,\n showIcon = true,\n onSelect = () => null,\n isChecked = false,\n style = undefined,\n showActions = true,\n actions = [],\n showSortHandler = false,\n ...rest\n}) {\n return (\n <Wrapper {...rest} role=\"listitem\" style={style}>\n <Content\n classProps={{\n canMove: isMovable(item),\n isChecked,\n isReadonly: item.readyOnly,\n }}\n onClick={onSelect}\n >\n {showSortHandler && <SortHandler />}\n {(showIcon || showIcons) && <IconWrapper>{item.icon}</IconWrapper>}\n <DSTruncatedTooltipText className=\"shuttle-tooltip-text\" value={item.name} />\n </Content>\n {showActions && <ActionsGroup>{actions}</ActionsGroup>}\n </Wrapper>\n );\n}\n\nexport { ShuttleListItem };\nexport default ShuttleListItem;\n"],
5
+ "mappings": "AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,YAAY;AAClB,MAAM,UAAU,kBAAkB,SAAS,IAAI;AAC/C,MAAM,eAAe,kBAAkB,OAAO,WAAW;AACzD,MAAM,cAAc,kBAAkB,OAAO,WAAW;AACxD,MAAM,UAAU,kBAAkB,SAAS,WAAW,WAAW,CAAC,EAAE,WAAW,SAAS,iBAAkB;AAAA,EACxG,SAAS;AAAA,EACT,aAAa;AAAA,EACb,aAAa;AAAA;AAGf,MAAM,cAAc,eAAe,MAAM,qCAAC,iBAAD;AAAA,EAAiB,WAAU;AAAA;AAEpE,yBAAyB;AAAA,EACvB,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,WAAW,MAAM;AAAA,EACjB,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,UAAU;AAAA,EACV,kBAAkB;AAAA,KACf;AAAA,GACF;AACD,SACE,qCAAC,SAAD;AAAA,OAAa;AAAA,IAAM,MAAK;AAAA,IAAW;AAAA,KACjC,qCAAC,SAAD;AAAA,IACE,YAAY;AAAA,MACV,SAAS,UAAU;AAAA,MACnB;AAAA,MACA,YAAY,KAAK;AAAA;AAAA,IAEnB,SAAS;AAAA,KAER,mBAAmB,qCAAC,aAAD,OAClB,aAAY,cAAc,qCAAC,aAAD,MAAc,KAAK,OAC/C,qCAAC,wBAAD;AAAA,IAAwB,WAAU;AAAA,IAAuB,OAAO,KAAK;AAAA,OAEtE,eAAe,qCAAC,cAAD,MAAe;AAAA;AAMrC,IAAO,0BAAQ;",
6
+ "names": []
7
+ }
@@ -1,37 +1,19 @@
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
-
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
+ }) {
35
17
  const [clicked, setClicked] = useState(false);
36
18
  const moveToTarget = useCallback(() => onMoveToTarget(item), [item]);
37
19
  useEffect(() => {
@@ -39,30 +21,41 @@ function ShuttleSourceListItem(_ref) {
39
21
  moveToTarget();
40
22
  }
41
23
  }, [clicked]);
42
- const navigateOnSourceTo = useCallback(() => onNavigateOnSourceTo(item), [item]);
24
+ const navigateOnSourceTo = useCallback(() => onNavigateOnSourceTo(item), [
25
+ item
26
+ ]);
43
27
  const checkItem = useCallback(() => {
44
- if (!clicked) onItemCheck(item);
28
+ if (!clicked)
29
+ onItemCheck(item);
45
30
  }, [item, clicked]);
46
-
47
31
  const handleOnClick = () => {
48
32
  if (!clicked) {
49
33
  setClicked(true);
50
34
  }
51
35
  };
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,
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,
64
53
  onSelect: checkItem
65
- }));
54
+ });
66
55
  }
67
-
68
- export { ShuttleSourceListItem as default };
56
+ var ShuttleSourceListItem_default = ShuttleSourceListItem;
57
+ export {
58
+ ShuttleSourceListItem,
59
+ ShuttleSourceListItem_default as default
60
+ };
61
+ //# sourceMappingURL=ShuttleSourceListItem.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/ShuttleListItem/ShuttleSourceListItem.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-underscore-dangle */\nimport React, { useState, useCallback, useEffect } from 'react';\nimport { isMovable } from '../../helper';\nimport { DrillDownButton, MoveButton } from './ActionButtons';\nimport { ShuttleListItem } from './ShuttleListItem';\n\nfunction ShuttleSourceListItem({\n item = {},\n onItemCheck = () => null,\n onMoveToTarget = () => null,\n onNavigateOnSourceTo = () => null,\n isChecked = false,\n showMoveButton = true,\n showDrillDownButton = true,\n index,\n ...rest\n}) {\n const [clicked, setClicked] = useState(false);\n const moveToTarget = useCallback(() => onMoveToTarget(item), [item]);\n useEffect(() => {\n if (clicked) {\n moveToTarget();\n }\n }, [clicked]);\n const navigateOnSourceTo = useCallback(() => onNavigateOnSourceTo(item), [\n item,\n ]);\n const checkItem = useCallback(() => {\n if (!clicked) onItemCheck(item);\n }, [item, clicked]);\n const handleOnClick = () => {\n if (!clicked) {\n setClicked(true);\n }\n };\n\n return (\n <ShuttleListItem\n {...rest}\n actions={[\n showDrillDownButton && (\n <DrillDownButton\n key=\"drill-down\"\n disabled={\n (!item.hasChildren && !item.asyncLoad) ||\n item.readOnly ||\n item.disableDrillDown\n }\n onClick={navigateOnSourceTo}\n />\n ),\n showMoveButton && (\n <MoveButton\n data-testid=\"ds-shuttle__move-button\"\n key=\"move\"\n disabled={!isMovable(item) || item.readOnly}\n onClick={handleOnClick}\n />\n ),\n ]}\n isChecked={isChecked}\n item={item}\n onSelect={checkItem}\n />\n );\n}\n\nexport { ShuttleSourceListItem };\nexport default ShuttleSourceListItem;\n"],
5
+ "mappings": "AAAA;ACCA;AACA;AACA;AACA;AAEA,+BAA+B;AAAA,EAC7B,OAAO;AAAA,EACP,cAAc,MAAM;AAAA,EACpB,iBAAiB,MAAM;AAAA,EACvB,uBAAuB,MAAM;AAAA,EAC7B,YAAY;AAAA,EACZ,iBAAiB;AAAA,EACjB,sBAAsB;AAAA,EACtB;AAAA,KACG;AAAA,GACF;AACD,QAAM,CAAC,SAAS,cAAc,SAAS;AACvC,QAAM,eAAe,YAAY,MAAM,eAAe,OAAO,CAAC;AAC9D,YAAU,MAAM;AACd,QAAI,SAAS;AACX;AAAA;AAAA,KAED,CAAC;AACJ,QAAM,qBAAqB,YAAY,MAAM,qBAAqB,OAAO;AAAA,IACvE;AAAA;AAEF,QAAM,YAAY,YAAY,MAAM;AAClC,QAAI,CAAC;AAAS,kBAAY;AAAA,KACzB,CAAC,MAAM;AACV,QAAM,gBAAgB,MAAM;AAC1B,QAAI,CAAC,SAAS;AACZ,iBAAW;AAAA;AAAA;AAIf,SACE,qCAAC,iBAAD;AAAA,OACM;AAAA,IACJ,SAAS;AAAA,MACP,uBACE,qCAAC,iBAAD;AAAA,QACE,KAAI;AAAA,QACJ,UACG,CAAC,KAAK,eAAe,CAAC,KAAK,aAC5B,KAAK,YACL,KAAK;AAAA,QAEP,SAAS;AAAA;AAAA,MAGb,kBACE,qCAAC,YAAD;AAAA,QACE,eAAY;AAAA,QACZ,KAAI;AAAA,QACJ,UAAU,CAAC,UAAU,SAAS,KAAK;AAAA,QACnC,SAAS;AAAA;AAAA;AAAA,IAIf;AAAA,IACA;AAAA,IACA,UAAU;AAAA;AAAA;AAMhB,IAAO,gCAAQ;",
6
+ "names": []
7
+ }