@elliemae/ds-shuttle 2.2.1 → 2.3.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/AnimationState.js +46 -19
- package/cjs/AnimationState.js.map +7 -0
- package/cjs/DSShuttle.js +166 -219
- package/cjs/DSShuttle.js.map +7 -0
- package/cjs/SearchState.js +44 -25
- package/cjs/SearchState.js.map +7 -0
- package/cjs/Shuttle.actions.js +87 -98
- package/cjs/Shuttle.actions.js.map +7 -0
- package/cjs/ShuttleContainer.js +56 -61
- package/cjs/ShuttleContainer.js.map +7 -0
- package/cjs/ShuttleImpl.js +109 -206
- package/cjs/ShuttleImpl.js.map +7 -0
- package/cjs/ShuttleRenderer.js +140 -135
- package/cjs/ShuttleRenderer.js.map +7 -0
- package/cjs/ShuttleState.js +57 -53
- package/cjs/ShuttleState.js.map +7 -0
- package/cjs/animation/animationConfig.js +53 -56
- package/cjs/animation/animationConfig.js.map +7 -0
- package/cjs/classedComponents.js +70 -69
- package/cjs/classedComponents.js.map +7 -0
- package/cjs/components/LoadingIndicator.js +49 -22
- package/cjs/components/LoadingIndicator.js.map +7 -0
- package/cjs/components/OverflowList.js +50 -48
- package/cjs/components/OverflowList.js.map +7 -0
- package/cjs/components/ShuttleBreadcrumb.js +52 -40
- package/cjs/components/ShuttleBreadcrumb.js.map +7 -0
- package/cjs/components/ShuttleInfiniteScrollIndicator.js +46 -37
- package/cjs/components/ShuttleInfiniteScrollIndicator.js.map +7 -0
- package/cjs/components/ShuttleListItem/ActionButtons.js +56 -51
- package/cjs/components/ShuttleListItem/ActionButtons.js.map +7 -0
- package/cjs/components/ShuttleListItem/ShuttleListItem.js +78 -80
- package/cjs/components/ShuttleListItem/ShuttleListItem.js.map +7 -0
- package/cjs/components/ShuttleListItem/ShuttleSourceListItem.js +78 -64
- package/cjs/components/ShuttleListItem/ShuttleSourceListItem.js.map +7 -0
- package/cjs/components/ShuttleListItem/ShuttleTargetListItem.js +72 -56
- package/cjs/components/ShuttleListItem/ShuttleTargetListItem.js.map +7 -0
- package/cjs/components/ShuttleListPanel.js +44 -26
- package/cjs/components/ShuttleListPanel.js.map +7 -0
- package/cjs/components/ShuttleSearchBox.js +61 -72
- package/cjs/components/ShuttleSearchBox.js.map +7 -0
- package/cjs/components/ShuttleSource.js +150 -146
- package/cjs/components/ShuttleSource.js.map +7 -0
- package/cjs/components/ShuttleTarget.js +88 -100
- package/cjs/components/ShuttleTarget.js.map +7 -0
- package/cjs/components/VirtualizedItem.js +45 -40
- package/cjs/components/VirtualizedItem.js.map +7 -0
- package/cjs/components/VirtualizedList.js +81 -86
- package/cjs/components/VirtualizedList.js.map +7 -0
- package/cjs/components/VirtualizedSortableList.js +47 -40
- package/cjs/components/VirtualizedSortableList.js.map +7 -0
- package/cjs/helper.js +69 -103
- package/cjs/helper.js.map +7 -0
- package/cjs/index.js +38 -12
- package/cjs/index.js.map +7 -0
- package/cjs/tests/utils.js +1218 -0
- package/cjs/tests/utils.js.map +7 -0
- package/cjs/updateShuttleStateFromProps.js +73 -69
- package/cjs/updateShuttleStateFromProps.js.map +7 -0
- package/cjs/utils.js +40 -42
- package/cjs/utils.js.map +7 -0
- package/cjs/withProviders.js +43 -27
- package/cjs/withProviders.js.map +7 -0
- package/esm/AnimationState.js +12 -8
- package/esm/AnimationState.js.map +7 -0
- package/esm/DSShuttle.js +126 -198
- package/esm/DSShuttle.js.map +7 -0
- package/esm/SearchState.js +15 -19
- package/esm/SearchState.js.map +7 -0
- package/esm/Shuttle.actions.js +63 -80
- package/esm/Shuttle.actions.js.map +7 -0
- package/esm/ShuttleContainer.js +34 -50
- package/esm/ShuttleContainer.js.map +7 -0
- package/esm/ShuttleImpl.js +78 -183
- package/esm/ShuttleImpl.js.map +7 -0
- package/esm/ShuttleRenderer.js +111 -128
- package/esm/ShuttleRenderer.js.map +7 -0
- package/esm/ShuttleState.js +34 -53
- package/esm/ShuttleState.js.map +7 -0
- package/esm/animation/animationConfig.js +24 -52
- package/esm/animation/animationConfig.js.map +7 -0
- package/esm/classedComponents.js +43 -51
- package/esm/classedComponents.js.map +7 -0
- package/esm/components/LoadingIndicator.js +20 -15
- package/esm/components/LoadingIndicator.js.map +7 -0
- package/esm/components/OverflowList.js +21 -41
- package/esm/components/OverflowList.js.map +7 -0
- package/esm/components/ShuttleBreadcrumb.js +23 -33
- package/esm/components/ShuttleBreadcrumb.js.map +7 -0
- package/esm/components/ShuttleInfiniteScrollIndicator.js +18 -31
- package/esm/components/ShuttleInfiniteScrollIndicator.js.map +7 -0
- package/esm/components/ShuttleListItem/ActionButtons.js +27 -39
- package/esm/components/ShuttleListItem/ActionButtons.js.map +7 -0
- package/esm/components/ShuttleListItem/ShuttleListItem.js +50 -72
- package/esm/components/ShuttleListItem/ShuttleListItem.js.map +7 -0
- package/esm/components/ShuttleListItem/ShuttleSourceListItem.js +45 -52
- package/esm/components/ShuttleListItem/ShuttleSourceListItem.js.map +7 -0
- package/esm/components/ShuttleListItem/ShuttleTargetListItem.js +42 -47
- package/esm/components/ShuttleListItem/ShuttleTargetListItem.js.map +7 -0
- package/esm/components/ShuttleListPanel.js +15 -19
- package/esm/components/ShuttleListPanel.js.map +7 -0
- package/esm/components/ShuttleSearchBox.js +32 -66
- package/esm/components/ShuttleSearchBox.js.map +7 -0
- package/esm/components/ShuttleSource.js +125 -129
- package/esm/components/ShuttleSource.js.map +7 -0
- package/esm/components/ShuttleTarget.js +68 -89
- package/esm/components/ShuttleTarget.js.map +7 -0
- package/esm/components/VirtualizedItem.js +15 -33
- package/esm/components/VirtualizedItem.js.map +7 -0
- package/esm/components/VirtualizedList.js +50 -75
- package/esm/components/VirtualizedList.js.map +7 -0
- package/esm/components/VirtualizedSortableList.js +17 -32
- package/esm/components/VirtualizedSortableList.js.map +7 -0
- package/esm/helper.js +43 -67
- package/esm/helper.js.map +7 -0
- package/esm/index.js +9 -2
- package/esm/index.js.map +7 -0
- package/esm/tests/utils.js +1189 -0
- package/esm/tests/utils.js.map +7 -0
- package/esm/updateShuttleStateFromProps.js +39 -58
- package/esm/updateShuttleStateFromProps.js.map +7 -0
- package/esm/utils.js +12 -18
- package/esm/utils.js.map +7 -0
- package/esm/withProviders.js +14 -20
- package/esm/withProviders.js.map +7 -0
- package/package.json +11 -11
- package/types/AnimationState.d.ts +3 -2
- package/types/DSShuttle.d.ts +1 -1
- package/types/SearchState.d.ts +3 -2
- package/types/ShuttleImpl.d.ts +3 -2
- package/types/ShuttleRenderer.d.ts +1 -0
- package/types/ShuttleState.d.ts +3 -2
- package/types/components/LoadingIndicator.d.ts +1 -0
- package/types/components/OverflowList.d.ts +1 -0
- package/types/components/ShuttleBreadcrumb.d.ts +1 -0
- package/types/components/ShuttleInfiniteScrollIndicator.d.ts +1 -0
- package/types/components/ShuttleListItem/ShuttleListItem.d.ts +1 -0
- package/types/components/ShuttleListItem/ShuttleSourceListItem.d.ts +1 -0
- package/types/components/ShuttleListItem/ShuttleTargetListItem.d.ts +1 -0
- package/types/components/ShuttleListPanel.d.ts +1 -0
- package/types/components/ShuttleSearchBox.d.ts +3 -1
- package/types/components/ShuttleSource.d.ts +1 -0
- package/types/components/ShuttleTarget.d.ts +1 -0
- package/types/components/VirtualizedItem.d.ts +1 -0
- package/types/components/VirtualizedList.d.ts +1 -0
- package/types/components/VirtualizedSortableList.d.ts +1 -0
- package/types/index.d.ts +1 -1
- package/types/updateShuttleStateFromProps.d.ts +3 -1
- package/types/withProviders.d.ts +1 -0
|
@@ -1,18 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { DSCircularProgressIndicator } from
|
|
4
|
-
import styled from
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
},
|
|
14
|
+
}, /* @__PURE__ */ React2.createElement(DSCircularProgressIndicator, {
|
|
14
15
|
size: "xl",
|
|
15
16
|
showLabel: true
|
|
16
|
-
}))
|
|
17
|
-
|
|
18
|
-
export {
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
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(
|
|
31
|
-
const overflowTransition = useTransition(activeHierarchy, null,
|
|
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 {
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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 {
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import { aggregatedClasses } from
|
|
4
|
-
import DSIndeterminateProgressIndicator from
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
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:
|
|
23
|
-
|
|
24
|
-
|
|
9
|
+
icon: /* @__PURE__ */ React2.createElement(CloseCircle, null),
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
const MoveButton = (props) => /* @__PURE__ */ React2.createElement(ActionButton, {
|
|
25
13
|
buttonType: "text",
|
|
26
|
-
icon:
|
|
27
|
-
|
|
28
|
-
containerProps: {
|
|
29
|
-
|
|
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:
|
|
20
|
+
icon: /* @__PURE__ */ React2.createElement(ArrowShortReturn, {
|
|
35
21
|
"data-testid": "shuttle__drill-btn-icon"
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
containerProps: {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
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(
|
|
28
|
-
const IconWrapper = aggregatedClasses(
|
|
29
|
-
const Content = aggregatedClasses(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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 {
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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), [
|
|
24
|
+
const navigateOnSourceTo = useCallback(() => onNavigateOnSourceTo(item), [
|
|
25
|
+
item
|
|
26
|
+
]);
|
|
43
27
|
const checkItem = useCallback(() => {
|
|
44
|
-
if (!clicked)
|
|
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
|
-
|
|
54
|
-
actions: [
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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 {
|
|
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
|
+
}
|