@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.
- package/cjs/AnimationState.js +19 -46
- package/cjs/DSShuttle.js +219 -166
- package/cjs/SearchState.js +25 -44
- package/cjs/Shuttle.actions.js +98 -87
- package/cjs/ShuttleContainer.js +61 -56
- package/cjs/ShuttleImpl.js +206 -109
- package/cjs/ShuttleRenderer.js +135 -140
- package/cjs/ShuttleState.js +53 -57
- package/cjs/animation/animationConfig.js +56 -53
- package/cjs/classedComponents.js +69 -70
- package/cjs/components/LoadingIndicator.js +22 -49
- package/cjs/components/OverflowList.js +48 -50
- package/cjs/components/ShuttleBreadcrumb.js +40 -52
- package/cjs/components/ShuttleInfiniteScrollIndicator.js +37 -46
- package/cjs/components/ShuttleListItem/ActionButtons.js +51 -56
- package/cjs/components/ShuttleListItem/ShuttleListItem.js +80 -78
- package/cjs/components/ShuttleListItem/ShuttleSourceListItem.js +64 -78
- package/cjs/components/ShuttleListItem/ShuttleTargetListItem.js +56 -72
- package/cjs/components/ShuttleListPanel.js +26 -44
- package/cjs/components/ShuttleSearchBox.js +72 -61
- package/cjs/components/ShuttleSource.js +146 -150
- package/cjs/components/ShuttleTarget.js +100 -88
- package/cjs/components/VirtualizedItem.js +40 -45
- package/cjs/components/VirtualizedList.js +86 -81
- package/cjs/components/VirtualizedSortableList.js +40 -47
- package/cjs/helper.js +103 -69
- package/cjs/index.js +12 -38
- package/cjs/updateShuttleStateFromProps.js +69 -73
- package/cjs/utils.js +42 -40
- package/cjs/withProviders.js +27 -43
- package/esm/AnimationState.js +8 -12
- package/esm/DSShuttle.js +198 -126
- package/esm/SearchState.js +19 -15
- package/esm/Shuttle.actions.js +80 -63
- package/esm/ShuttleContainer.js +50 -34
- package/esm/ShuttleImpl.js +183 -78
- package/esm/ShuttleRenderer.js +128 -111
- package/esm/ShuttleState.js +53 -34
- package/esm/animation/animationConfig.js +52 -24
- package/esm/classedComponents.js +51 -43
- package/esm/components/LoadingIndicator.js +15 -20
- package/esm/components/OverflowList.js +41 -21
- package/esm/components/ShuttleBreadcrumb.js +33 -23
- package/esm/components/ShuttleInfiniteScrollIndicator.js +31 -18
- package/esm/components/ShuttleListItem/ActionButtons.js +39 -27
- package/esm/components/ShuttleListItem/ShuttleListItem.js +72 -50
- package/esm/components/ShuttleListItem/ShuttleSourceListItem.js +52 -45
- package/esm/components/ShuttleListItem/ShuttleTargetListItem.js +47 -42
- package/esm/components/ShuttleListPanel.js +19 -15
- package/esm/components/ShuttleSearchBox.js +66 -32
- package/esm/components/ShuttleSource.js +129 -125
- package/esm/components/ShuttleTarget.js +89 -68
- package/esm/components/VirtualizedItem.js +33 -15
- package/esm/components/VirtualizedList.js +75 -50
- package/esm/components/VirtualizedSortableList.js +32 -17
- package/esm/helper.js +67 -43
- package/esm/index.js +2 -9
- package/esm/updateShuttleStateFromProps.js +58 -39
- package/esm/utils.js +18 -12
- package/esm/withProviders.js +20 -14
- package/package.json +11 -11
- package/types/AnimationState.d.ts +2 -3
- package/types/DSShuttle.d.ts +1 -1
- package/types/SearchState.d.ts +2 -3
- package/types/ShuttleImpl.d.ts +2 -3
- package/types/ShuttleRenderer.d.ts +0 -1
- package/types/ShuttleState.d.ts +2 -3
- package/types/components/LoadingIndicator.d.ts +0 -1
- package/types/components/OverflowList.d.ts +0 -1
- package/types/components/ShuttleBreadcrumb.d.ts +0 -1
- package/types/components/ShuttleInfiniteScrollIndicator.d.ts +0 -1
- package/types/components/ShuttleListItem/ShuttleListItem.d.ts +0 -1
- package/types/components/ShuttleListItem/ShuttleSourceListItem.d.ts +0 -1
- package/types/components/ShuttleListItem/ShuttleTargetListItem.d.ts +0 -1
- package/types/components/ShuttleListPanel.d.ts +0 -1
- package/types/components/ShuttleSearchBox.d.ts +1 -3
- package/types/components/ShuttleSource.d.ts +0 -1
- package/types/components/ShuttleTarget.d.ts +0 -1
- package/types/components/VirtualizedItem.d.ts +0 -1
- package/types/components/VirtualizedList.d.ts +0 -1
- package/types/components/VirtualizedSortableList.d.ts +0 -1
- package/types/index.d.ts +1 -1
- package/types/updateShuttleStateFromProps.d.ts +1 -3
- package/types/withProviders.d.ts +0 -1
- package/cjs/AnimationState.js.map +0 -7
- package/cjs/DSShuttle.js.map +0 -7
- package/cjs/SearchState.js.map +0 -7
- package/cjs/Shuttle.actions.js.map +0 -7
- package/cjs/ShuttleContainer.js.map +0 -7
- package/cjs/ShuttleImpl.js.map +0 -7
- package/cjs/ShuttleRenderer.js.map +0 -7
- package/cjs/ShuttleState.js.map +0 -7
- package/cjs/animation/animationConfig.js.map +0 -7
- package/cjs/classedComponents.js.map +0 -7
- package/cjs/components/LoadingIndicator.js.map +0 -7
- package/cjs/components/OverflowList.js.map +0 -7
- package/cjs/components/ShuttleBreadcrumb.js.map +0 -7
- package/cjs/components/ShuttleInfiniteScrollIndicator.js.map +0 -7
- package/cjs/components/ShuttleListItem/ActionButtons.js.map +0 -7
- package/cjs/components/ShuttleListItem/ShuttleListItem.js.map +0 -7
- package/cjs/components/ShuttleListItem/ShuttleSourceListItem.js.map +0 -7
- package/cjs/components/ShuttleListItem/ShuttleTargetListItem.js.map +0 -7
- package/cjs/components/ShuttleListPanel.js.map +0 -7
- package/cjs/components/ShuttleSearchBox.js.map +0 -7
- package/cjs/components/ShuttleSource.js.map +0 -7
- package/cjs/components/ShuttleTarget.js.map +0 -7
- package/cjs/components/VirtualizedItem.js.map +0 -7
- package/cjs/components/VirtualizedList.js.map +0 -7
- package/cjs/components/VirtualizedSortableList.js.map +0 -7
- package/cjs/helper.js.map +0 -7
- package/cjs/index.js.map +0 -7
- package/cjs/tests/utils.js +0 -1218
- package/cjs/tests/utils.js.map +0 -7
- package/cjs/updateShuttleStateFromProps.js.map +0 -7
- package/cjs/utils.js.map +0 -7
- package/cjs/withProviders.js.map +0 -7
- package/esm/AnimationState.js.map +0 -7
- package/esm/DSShuttle.js.map +0 -7
- package/esm/SearchState.js.map +0 -7
- package/esm/Shuttle.actions.js.map +0 -7
- package/esm/ShuttleContainer.js.map +0 -7
- package/esm/ShuttleImpl.js.map +0 -7
- package/esm/ShuttleRenderer.js.map +0 -7
- package/esm/ShuttleState.js.map +0 -7
- package/esm/animation/animationConfig.js.map +0 -7
- package/esm/classedComponents.js.map +0 -7
- package/esm/components/LoadingIndicator.js.map +0 -7
- package/esm/components/OverflowList.js.map +0 -7
- package/esm/components/ShuttleBreadcrumb.js.map +0 -7
- package/esm/components/ShuttleInfiniteScrollIndicator.js.map +0 -7
- package/esm/components/ShuttleListItem/ActionButtons.js.map +0 -7
- package/esm/components/ShuttleListItem/ShuttleListItem.js.map +0 -7
- package/esm/components/ShuttleListItem/ShuttleSourceListItem.js.map +0 -7
- package/esm/components/ShuttleListItem/ShuttleTargetListItem.js.map +0 -7
- package/esm/components/ShuttleListPanel.js.map +0 -7
- package/esm/components/ShuttleSearchBox.js.map +0 -7
- package/esm/components/ShuttleSource.js.map +0 -7
- package/esm/components/ShuttleTarget.js.map +0 -7
- package/esm/components/VirtualizedItem.js.map +0 -7
- package/esm/components/VirtualizedList.js.map +0 -7
- package/esm/components/VirtualizedSortableList.js.map +0 -7
- package/esm/helper.js.map +0 -7
- package/esm/index.js.map +0 -7
- package/esm/tests/utils.js +0 -1189
- package/esm/tests/utils.js.map +0 -7
- package/esm/updateShuttleStateFromProps.js.map +0 -7
- package/esm/utils.js.map +0 -7
- package/esm/withProviders.js.map +0 -7
|
@@ -1,25 +1,35 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import { aggregatedClasses } from
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
|
|
31
|
+
|
|
32
|
+
export { ShuttleInfiniteScrollIndicator as default };
|
|
@@ -1,31 +1,43 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
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:
|
|
10
|
-
|
|
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:
|
|
15
|
-
|
|
16
|
-
containerProps: {
|
|
17
|
-
|
|
18
|
-
|
|
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:
|
|
34
|
+
icon: _ArrowShortReturn || (_ArrowShortReturn = /*#__PURE__*/_jsx(ArrowShortReturn, {
|
|
21
35
|
"data-testid": "shuttle__drill-btn-icon"
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
containerProps: {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
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(
|
|
12
|
-
const IconWrapper = aggregatedClasses(
|
|
13
|
-
const Content = aggregatedClasses(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
37
|
-
|
|
38
|
-
actions: [
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { ShuttleListPanel as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
16
|
-
export {
|
|
17
|
-
ShuttleListPanel,
|
|
18
|
-
ShuttleListPanel_default as default
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=ShuttleListPanel.js.map
|
|
23
|
+
|
|
24
|
+
export { ShuttleListPanel as default };
|