@elliemae/ds-shuttle 2.0.0-next.8 → 2.0.0-rc.3
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/DSShuttle.js +83 -80
- package/cjs/Shuttle.actions.js +27 -18
- package/cjs/ShuttleContainer.js +15 -8
- package/cjs/ShuttleImpl.js +22 -10
- package/cjs/ShuttleRenderer.js +9 -2
- package/cjs/ShuttleState.js +6 -2
- package/cjs/classedComponents.js +27 -18
- package/cjs/components/LoadingIndicator.js +2 -2
- package/cjs/components/OverflowList.js +23 -12
- package/cjs/components/ShuttleBreadcrumb.js +21 -15
- package/cjs/components/ShuttleInfiniteScrollIndicator.js +22 -16
- package/cjs/components/ShuttleListItem/ActionButtons.js +10 -10
- package/cjs/components/ShuttleListItem/ShuttleListItem.js +22 -15
- package/cjs/components/ShuttleListItem/ShuttleSourceListItem.js +5 -0
- package/cjs/components/ShuttleListItem/ShuttleTargetListItem.js +5 -0
- package/cjs/components/ShuttleListPanel.js +7 -6
- package/cjs/components/ShuttleSearchBox.js +16 -13
- package/cjs/components/ShuttleSource.js +49 -43
- package/cjs/components/ShuttleTarget.js +29 -22
- package/cjs/components/VirtualizedItem.js +12 -6
- package/cjs/components/VirtualizedList.js +47 -35
- package/cjs/components/VirtualizedSortableList.js +5 -0
- package/cjs/helper.js +36 -14
- package/cjs/updateShuttleStateFromProps.js +15 -6
- package/cjs/utils.js +7 -2
- package/cjs/withProviders.js +5 -0
- package/esm/DSShuttle.js +83 -80
- package/esm/Shuttle.actions.js +21 -12
- package/esm/ShuttleContainer.js +12 -5
- package/esm/ShuttleImpl.js +17 -5
- package/esm/ShuttleRenderer.js +9 -2
- package/esm/ShuttleState.js +6 -2
- package/esm/classedComponents.js +27 -18
- package/esm/components/LoadingIndicator.js +1 -1
- package/esm/components/OverflowList.js +23 -12
- package/esm/components/ShuttleBreadcrumb.js +21 -15
- package/esm/components/ShuttleInfiniteScrollIndicator.js +22 -16
- package/esm/components/ShuttleListItem/ActionButtons.js +7 -4
- package/esm/components/ShuttleListItem/ShuttleListItem.js +21 -13
- package/esm/components/ShuttleListItem/ShuttleSourceListItem.js +5 -0
- package/esm/components/ShuttleListItem/ShuttleTargetListItem.js +5 -0
- package/esm/components/ShuttleListPanel.js +7 -6
- package/esm/components/ShuttleSearchBox.js +14 -10
- package/esm/components/ShuttleSource.js +44 -36
- package/esm/components/ShuttleTarget.js +29 -22
- package/esm/components/VirtualizedItem.js +12 -6
- package/esm/components/VirtualizedList.js +47 -35
- package/esm/components/VirtualizedSortableList.js +5 -0
- package/esm/helper.js +33 -11
- package/esm/updateShuttleStateFromProps.js +10 -1
- package/esm/utils.js +6 -1
- package/esm/withProviders.js +5 -0
- package/package.json +10 -7
- package/types/components/ShuttleBreadcrumb.d.ts +1 -1
package/esm/classedComponents.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import DSButton from '@elliemae/ds-
|
|
1
|
+
import DSButton from '@elliemae/ds-button';
|
|
2
2
|
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
3
3
|
import ShuttleBreadcrumb from './components/ShuttleBreadcrumb.js';
|
|
4
4
|
import OverflowList from './components/OverflowList.js';
|
|
@@ -15,23 +15,32 @@ const ShuttleHeader = aggregatedClasses('div')(headerBlockName);
|
|
|
15
15
|
const ShuttleHeaderBreadcrumb = aggregatedClasses(ShuttleBreadcrumb)(headerBlockName, 'breadcrumb');
|
|
16
16
|
const ShuttleHeaderSearchToggle = aggregatedClasses(DSButton)(headerBlockName, 'search-toggle'); // list
|
|
17
17
|
|
|
18
|
-
const ShuttleList = aggregatedClasses('div')(listBlockName, null,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
18
|
+
const ShuttleList = aggregatedClasses('div')(listBlockName, null, _ref => {
|
|
19
|
+
let {
|
|
20
|
+
showPulse
|
|
21
|
+
} = _ref;
|
|
22
|
+
return {
|
|
23
|
+
'show-pulse': showPulse
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
const ShuttleListPanel = aggregatedClasses('div')(listBlockName, 'panel', _ref2 => {
|
|
27
|
+
let {
|
|
28
|
+
open
|
|
29
|
+
} = _ref2;
|
|
30
|
+
return {
|
|
31
|
+
open
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
const Overflow = aggregatedClasses(OverflowList)(listBlockName, 'overflow', _ref3 => {
|
|
35
|
+
let {
|
|
36
|
+
empty,
|
|
37
|
+
searching
|
|
38
|
+
} = _ref3;
|
|
39
|
+
return {
|
|
40
|
+
empty,
|
|
41
|
+
searching
|
|
42
|
+
};
|
|
43
|
+
});
|
|
35
44
|
const EmptyMessage = aggregatedClasses('span')(listBlockName, 'empty-message');
|
|
36
45
|
const LoadingList = aggregatedClasses('div')(listBlockName, 'loading-list'); // footer
|
|
37
46
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import 'react';
|
|
3
|
-
import { DSCircularProgressIndicator } from '@elliemae/ds-
|
|
3
|
+
import { DSCircularProgressIndicator } from '@elliemae/ds-circular-progress-indicator';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
|
|
6
6
|
var _Wrapper;
|
|
@@ -1,5 +1,12 @@
|
|
|
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';
|
|
1
6
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
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';
|
|
3
10
|
import { useContext } from 'react';
|
|
4
11
|
import { useTransition, animated } from 'react-spring/web';
|
|
5
12
|
import { animationConfig } from '../animation/animationConfig.js';
|
|
@@ -9,11 +16,12 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
9
16
|
|
|
10
17
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
11
18
|
|
|
12
|
-
function OverflowList({
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
19
|
+
function OverflowList(_ref) {
|
|
20
|
+
let {
|
|
21
|
+
className = '',
|
|
22
|
+
activeHierarchy = '',
|
|
23
|
+
children
|
|
24
|
+
} = _ref;
|
|
17
25
|
const {
|
|
18
26
|
state: {
|
|
19
27
|
isDrillingDown = false
|
|
@@ -23,13 +31,16 @@ function OverflowList({
|
|
|
23
31
|
const overflowTransition = useTransition(activeHierarchy, null, _objectSpread(_objectSpread({}, animationConfig.moveList(isDrillingDown)), {}, {
|
|
24
32
|
onDestroyed: () => setIsDrillingDown(false)
|
|
25
33
|
}));
|
|
26
|
-
return overflowTransition.map(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
+
});
|
|
33
44
|
}
|
|
34
45
|
|
|
35
46
|
export { OverflowList as default };
|
|
@@ -1,29 +1,35 @@
|
|
|
1
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';
|
|
2
4
|
import 'react';
|
|
3
5
|
import { useTransition, animated } from 'react-spring/web';
|
|
4
6
|
import DSBreadcrumb from '@elliemae/ds-basic/Breadcrumb';
|
|
5
7
|
import { animationConfig } from '../animation/animationConfig.js';
|
|
6
8
|
|
|
7
|
-
function ShuttleBreadcrumb({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
function ShuttleBreadcrumb(_ref) {
|
|
10
|
+
let {
|
|
11
|
+
className = '',
|
|
12
|
+
hierarchy = [],
|
|
13
|
+
onNavigateTo = () => null
|
|
14
|
+
} = _ref;
|
|
12
15
|
const animatedCrumbs = useTransition(hierarchy, item => item.id, animationConfig.breadcrumb());
|
|
13
16
|
return /*#__PURE__*/_jsx("div", {
|
|
14
17
|
className: className
|
|
15
18
|
}, void 0, /*#__PURE__*/_jsx(DSBreadcrumb, {
|
|
16
19
|
isTitle: true
|
|
17
|
-
}, void 0, animatedCrumbs.map(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
+
})));
|
|
27
33
|
}
|
|
28
34
|
|
|
29
35
|
export { ShuttleBreadcrumb as default };
|
|
@@ -1,26 +1,32 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import 'react';
|
|
3
3
|
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
4
|
-
import DSIndeterminateProgressIndicator from '@elliemae/ds-
|
|
4
|
+
import DSIndeterminateProgressIndicator from '@elliemae/ds-indeterminate-progress-indicator';
|
|
5
5
|
|
|
6
6
|
var _DSIndeterminateProgr;
|
|
7
7
|
const blockName = 'shuttle-infinite-scroll-indicator';
|
|
8
|
-
const InfiniteScrollBarContainer = aggregatedClasses('div')(blockName, null,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
const InfiniteScrollBarContainer = aggregatedClasses('div')(blockName, null, _ref => {
|
|
9
|
+
let {
|
|
10
|
+
isOpen
|
|
11
|
+
} = _ref;
|
|
12
|
+
return {
|
|
13
|
+
opened: isOpen
|
|
14
|
+
};
|
|
15
|
+
});
|
|
13
16
|
|
|
14
|
-
const ShuttleInfiniteScrollIndicator =
|
|
15
|
-
|
|
16
|
-
}) => /*#__PURE__*/_jsx(InfiniteScrollBarContainer, {
|
|
17
|
-
classProps: {
|
|
17
|
+
const ShuttleInfiniteScrollIndicator = _ref2 => {
|
|
18
|
+
let {
|
|
18
19
|
isOpen
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
+
})));
|
|
30
|
+
};
|
|
25
31
|
|
|
26
32
|
export { ShuttleInfiniteScrollIndicator as default };
|
|
@@ -1,11 +1,14 @@
|
|
|
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';
|
|
1
6
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
7
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
8
|
import 'react';
|
|
4
9
|
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
5
|
-
import DSButton from '@elliemae/ds-
|
|
6
|
-
import CloseCircle from '@elliemae/ds-icons
|
|
7
|
-
import ArrowShortRight from '@elliemae/ds-icons/ArrowShortRight';
|
|
8
|
-
import ArrowShortReturn from '@elliemae/ds-icons/ArrowShortReturn';
|
|
10
|
+
import DSButton from '@elliemae/ds-button';
|
|
11
|
+
import { ArrowShortRight, ArrowShortReturn, CloseCircle } from '@elliemae/ds-icons';
|
|
9
12
|
import { jsx } from 'react/jsx-runtime';
|
|
10
13
|
|
|
11
14
|
var _CloseCircle, _ArrowShortRight, _ArrowShortReturn;
|
|
@@ -1,3 +1,8 @@
|
|
|
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';
|
|
1
6
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
7
|
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
3
8
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
@@ -6,7 +11,7 @@ import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
|
6
11
|
import { animated } from 'react-spring/web';
|
|
7
12
|
import TruncatedTooltipText from '@elliemae/ds-basic/TruncatedTooltipText';
|
|
8
13
|
import { sortableHandle } from 'react-sortable-hoc';
|
|
9
|
-
import GripperVertical from '@elliemae/ds-icons
|
|
14
|
+
import { GripperVertical } from '@elliemae/ds-icons';
|
|
10
15
|
import { isMovable } from '../../helper.js';
|
|
11
16
|
import { jsxs } from 'react/jsx-runtime';
|
|
12
17
|
|
|
@@ -21,20 +26,23 @@ const blockName = 'shuttle-list-item';
|
|
|
21
26
|
const Wrapper = aggregatedClasses(animated.li)(blockName);
|
|
22
27
|
const ActionsGroup = aggregatedClasses('div')(blockName, 'actions');
|
|
23
28
|
const IconWrapper = aggregatedClasses('div')(blockName, 'icon-wrapper');
|
|
24
|
-
const Content = aggregatedClasses('label')(blockName, 'content',
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
+
});
|
|
33
41
|
const SortHandler = sortableHandle(() => _GripperVertical || (_GripperVertical = /*#__PURE__*/_jsx(GripperVertical, {
|
|
34
42
|
className: "gripper"
|
|
35
43
|
})));
|
|
36
44
|
|
|
37
|
-
function ShuttleListItem(
|
|
45
|
+
function ShuttleListItem(_ref2) {
|
|
38
46
|
let {
|
|
39
47
|
item = {},
|
|
40
48
|
showIcons = undefined,
|
|
@@ -45,8 +53,8 @@ function ShuttleListItem(_ref) {
|
|
|
45
53
|
showActions = true,
|
|
46
54
|
actions = [],
|
|
47
55
|
showSortHandler = false
|
|
48
|
-
} =
|
|
49
|
-
rest = _objectWithoutProperties(
|
|
56
|
+
} = _ref2,
|
|
57
|
+
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
50
58
|
|
|
51
59
|
return /*#__PURE__*/jsxs(Wrapper, _objectSpread(_objectSpread({}, rest), {}, {
|
|
52
60
|
role: "listitem",
|
|
@@ -2,6 +2,11 @@ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
|
2
2
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
3
|
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
4
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';
|
|
5
10
|
import { useState, useCallback, useEffect } from 'react';
|
|
6
11
|
import { isMovable } from '../../helper.js';
|
|
7
12
|
import { DrillDownButton, MoveButton } from './ActionButtons.js';
|
|
@@ -1,3 +1,8 @@
|
|
|
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';
|
|
1
6
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
7
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
8
|
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import 'react';
|
|
3
|
-
import DSButton from '@elliemae/ds-
|
|
3
|
+
import DSButton from '@elliemae/ds-button';
|
|
4
4
|
import { ShuttleListPanel as ShuttleListPanel$1 } from '../classedComponents.js';
|
|
5
5
|
|
|
6
|
-
function ShuttleListPanel({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
function ShuttleListPanel(_ref) {
|
|
7
|
+
let {
|
|
8
|
+
onClick = () => null,
|
|
9
|
+
open = false,
|
|
10
|
+
children
|
|
11
|
+
} = _ref;
|
|
11
12
|
return /*#__PURE__*/_jsx(ShuttleListPanel$1, {
|
|
12
13
|
classProps: {
|
|
13
14
|
open
|
|
@@ -2,15 +2,18 @@ import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
|
2
2
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
3
|
import { Component } from 'react';
|
|
4
4
|
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
5
|
-
import { debounce } from '@elliemae/ds-utilities
|
|
6
|
-
import DSTextBox from '@elliemae/ds-
|
|
5
|
+
import { debounce } from '@elliemae/ds-utilities';
|
|
6
|
+
import { DSTextBox } from '@elliemae/ds-form';
|
|
7
7
|
|
|
8
8
|
const blockName = 'shuttle-search-box';
|
|
9
|
-
const SearchBoxContainer = aggregatedClasses('div')(blockName, null,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
const SearchBoxContainer = aggregatedClasses('div')(blockName, null, _ref => {
|
|
10
|
+
let {
|
|
11
|
+
isOpen
|
|
12
|
+
} = _ref;
|
|
13
|
+
return {
|
|
14
|
+
opened: isOpen
|
|
15
|
+
};
|
|
16
|
+
});
|
|
14
17
|
const filterList = debounce((term, onFilterCallback) => {
|
|
15
18
|
onFilterCallback(term);
|
|
16
19
|
}, 200);
|
|
@@ -25,9 +28,10 @@ class ShuttleSearchBox extends Component {
|
|
|
25
28
|
this.handleKeyPress = this.handleKeyPress.bind(this);
|
|
26
29
|
}
|
|
27
30
|
|
|
28
|
-
static getDerivedStateFromProps(nextProps, {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
static getDerivedStateFromProps(nextProps, _ref2) {
|
|
32
|
+
let {
|
|
33
|
+
prevProps
|
|
34
|
+
} = _ref2;
|
|
31
35
|
const {
|
|
32
36
|
value
|
|
33
37
|
} = nextProps;
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
2
2
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
3
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.reduce.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
6
|
+
import 'core-js/modules/esnext.iterator.reduce.js';
|
|
7
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
8
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
9
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
10
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
4
11
|
import { useContext, useMemo, useCallback } from 'react';
|
|
5
|
-
import ArrowShortRight from '@elliemae/ds-icons
|
|
6
|
-
import DSButton from '@elliemae/ds-
|
|
7
|
-
import
|
|
8
|
-
import { runAll } from '@elliemae/ds-utilities/utils';
|
|
12
|
+
import { Search, ArrowShortRight } from '@elliemae/ds-icons';
|
|
13
|
+
import DSButton from '@elliemae/ds-button';
|
|
14
|
+
import { runAll } from '@elliemae/ds-utilities';
|
|
9
15
|
import ShuttleSearchBox from './ShuttleSearchBox.js';
|
|
10
16
|
import ShuttleInfiniteScrollIndicator from './ShuttleInfiniteScrollIndicator.js';
|
|
11
17
|
import ShuttleSourceListItem from './ShuttleListItem/ShuttleSourceListItem.js';
|
|
@@ -29,31 +35,32 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
29
35
|
|
|
30
36
|
const noop = () => {};
|
|
31
37
|
|
|
32
|
-
function ShuttleSource({
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
38
|
+
function ShuttleSource(_ref) {
|
|
39
|
+
let {
|
|
40
|
+
items = [],
|
|
41
|
+
checkedItems = [],
|
|
42
|
+
// build Map() and memoize it for better performance
|
|
43
|
+
hierarchy = [],
|
|
44
|
+
onMoveItem = noop,
|
|
45
|
+
onCheckItem = noop,
|
|
46
|
+
onMoveCheckedItems = noop,
|
|
47
|
+
onNavigateTo = noop,
|
|
48
|
+
onClearCheckedItems = noop,
|
|
49
|
+
emptyMessage = 'No items found',
|
|
50
|
+
composeSourceItemProps = noop,
|
|
51
|
+
loading = false,
|
|
52
|
+
onSearch = noop,
|
|
53
|
+
onSearchClose = noop,
|
|
54
|
+
onSearchOpen = noop,
|
|
55
|
+
sourceSortable = false,
|
|
56
|
+
onSortEnd = noop,
|
|
57
|
+
sourceClearItemsText = 'CLEAR ALL',
|
|
58
|
+
searchPlaceholder,
|
|
59
|
+
renderSourceCounter = amount => "".concat(amount, " items"),
|
|
60
|
+
onGetMoreItems = () => {},
|
|
61
|
+
moreItemsLoading = false,
|
|
62
|
+
hasNextPage = false
|
|
63
|
+
} = _ref;
|
|
57
64
|
const {
|
|
58
65
|
state: {
|
|
59
66
|
isMovingBack = false,
|
|
@@ -87,10 +94,11 @@ function ShuttleSource({
|
|
|
87
94
|
}, [searching]);
|
|
88
95
|
const ComponentList = useMemo(() => sourceSortable ? VirtualizedSortableList : VirtualizedList, [sourceSortable]);
|
|
89
96
|
|
|
90
|
-
const handleSortEnd =
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
97
|
+
const handleSortEnd = _ref2 => {
|
|
98
|
+
let {
|
|
99
|
+
oldIndex,
|
|
100
|
+
newIndex
|
|
101
|
+
} = _ref2;
|
|
94
102
|
onSortEnd({
|
|
95
103
|
sourceItem: items[oldIndex],
|
|
96
104
|
targetItem: items[newIndex]
|
|
@@ -131,11 +139,11 @@ function ShuttleSource({
|
|
|
131
139
|
}
|
|
132
140
|
}, void 0, /*#__PURE__*/_jsx(ComponentList, {
|
|
133
141
|
helperClass: "drag-helper",
|
|
134
|
-
itemRenderer:
|
|
142
|
+
itemRenderer: _ref3 => {
|
|
135
143
|
let {
|
|
136
144
|
item
|
|
137
|
-
} =
|
|
138
|
-
rest = _objectWithoutProperties(
|
|
145
|
+
} = _ref3,
|
|
146
|
+
rest = _objectWithoutProperties(_ref3, _excluded);
|
|
139
147
|
|
|
140
148
|
return /*#__PURE__*/jsx(ShuttleSourceListItem, _objectSpread(_objectSpread(_objectSpread({
|
|
141
149
|
"data-testid": "source-list-item"
|
|
@@ -1,8 +1,13 @@
|
|
|
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';
|
|
1
6
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
7
|
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
3
8
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
4
9
|
import { useContext } from 'react';
|
|
5
|
-
import DSButton from '@elliemae/ds-
|
|
10
|
+
import DSButton from '@elliemae/ds-button';
|
|
6
11
|
import { ShuttleWrapper, ShuttleHeader, ShuttleHeaderBreadcrumb, ShuttleList, Overflow, LoadingList, ShuttleFooter, ShuttleFooterActions, ShuttleFooterCounter, EmptyMessage } from '../classedComponents.js';
|
|
7
12
|
import { getActiveIdFromHierarchy } from '../helper.js';
|
|
8
13
|
import AnimationContext from '../AnimationState.js';
|
|
@@ -22,20 +27,21 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
22
27
|
|
|
23
28
|
const noop = () => {};
|
|
24
29
|
|
|
25
|
-
function ShuttleTarget({
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
function ShuttleTarget(_ref) {
|
|
31
|
+
let {
|
|
32
|
+
items = [],
|
|
33
|
+
hierarchy = [],
|
|
34
|
+
onNavigateTo = noop,
|
|
35
|
+
onMoveItem = noop,
|
|
36
|
+
onClearMovedItems = noop,
|
|
37
|
+
emptyMessage = 'No items selected',
|
|
38
|
+
composeTargetItemProps = () => ({}),
|
|
39
|
+
targetSortable = false,
|
|
40
|
+
onSortEnd = noop,
|
|
41
|
+
targetClearItemsText = 'CLEAR ALL',
|
|
42
|
+
renderTargetCounter = amount => "".concat(amount, " items"),
|
|
43
|
+
loading = false
|
|
44
|
+
} = _ref;
|
|
39
45
|
const {
|
|
40
46
|
state: {
|
|
41
47
|
isMoving = false
|
|
@@ -45,10 +51,11 @@ function ShuttleTarget({
|
|
|
45
51
|
const emptyContent = loading ? _LoadingIndicator || (_LoadingIndicator = /*#__PURE__*/_jsx(LoadingIndicator, {})) : /*#__PURE__*/_jsx(EmptyMessage, {}, void 0, emptyMessage);
|
|
46
52
|
const ComponentList = targetSortable ? VirtualizedSortableList : VirtualizedList;
|
|
47
53
|
|
|
48
|
-
const handleSortEnd =
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
54
|
+
const handleSortEnd = _ref2 => {
|
|
55
|
+
let {
|
|
56
|
+
oldIndex,
|
|
57
|
+
newIndex
|
|
58
|
+
} = _ref2;
|
|
52
59
|
onSortEnd({
|
|
53
60
|
sourceItem: items[oldIndex],
|
|
54
61
|
targetItem: items[newIndex]
|
|
@@ -68,11 +75,11 @@ function ShuttleTarget({
|
|
|
68
75
|
empty: !items.length
|
|
69
76
|
}
|
|
70
77
|
}, void 0, /*#__PURE__*/_jsx(ComponentList, {
|
|
71
|
-
itemRenderer:
|
|
78
|
+
itemRenderer: _ref3 => {
|
|
72
79
|
let {
|
|
73
80
|
item
|
|
74
|
-
} =
|
|
75
|
-
rest = _objectWithoutProperties(
|
|
81
|
+
} = _ref3,
|
|
82
|
+
rest = _objectWithoutProperties(_ref3, _excluded);
|
|
76
83
|
|
|
77
84
|
return /*#__PURE__*/jsx(ShuttleTargetListItem, _objectSpread(_objectSpread(_objectSpread({
|
|
78
85
|
"data-testid": "target-list-item"
|
|
@@ -1,3 +1,8 @@
|
|
|
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';
|
|
1
6
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
7
|
import { memo } from 'react';
|
|
3
8
|
import { areEqual } from 'react-window';
|
|
@@ -5,12 +10,13 @@ import { areEqual } from 'react-window';
|
|
|
5
10
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
6
11
|
|
|
7
12
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
8
|
-
const VirtualizedItem = /*#__PURE__*/memo(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
const VirtualizedItem = /*#__PURE__*/memo(_ref => {
|
|
14
|
+
let {
|
|
15
|
+
data,
|
|
16
|
+
index,
|
|
17
|
+
style: virtualizedStyles,
|
|
18
|
+
showSortHandler = false
|
|
19
|
+
} = _ref;
|
|
14
20
|
const {
|
|
15
21
|
items,
|
|
16
22
|
itemRenderer,
|