@elliemae/ds-shuttle 3.15.0 → 3.16.0-next.10
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/dist/cjs/AnimationState.js +1 -3
- package/dist/cjs/AnimationState.js.map +2 -2
- package/dist/cjs/DSShuttle.js +46 -46
- package/dist/cjs/DSShuttle.js.map +2 -2
- package/dist/cjs/SearchState.js.map +2 -2
- package/dist/cjs/Shuttle.actions.js +6 -15
- package/dist/cjs/Shuttle.actions.js.map +3 -3
- package/dist/cjs/ShuttleContainer.js +6 -10
- package/dist/cjs/ShuttleContainer.js.map +2 -2
- package/dist/cjs/ShuttleImpl.js +26 -55
- package/dist/cjs/ShuttleImpl.js.map +2 -2
- package/dist/cjs/ShuttleRenderer.js +11 -19
- package/dist/cjs/ShuttleRenderer.js.map +2 -2
- package/dist/cjs/ShuttleState.js +4 -8
- package/dist/cjs/ShuttleState.js.map +2 -2
- package/dist/cjs/animation/animationConfig.js.map +2 -2
- package/dist/cjs/classedComponents.js +2 -2
- package/dist/cjs/classedComponents.js.map +1 -1
- package/dist/cjs/components/OverflowList.js +2 -2
- package/dist/cjs/components/OverflowList.js.map +1 -1
- package/dist/cjs/components/ShuttleBreadcrumb.js +3 -3
- package/dist/cjs/components/ShuttleBreadcrumb.js.map +2 -2
- package/dist/cjs/components/ShuttleListItem/ShuttleListItem.js +4 -4
- package/dist/cjs/components/ShuttleListItem/ShuttleListItem.js.map +2 -2
- package/dist/cjs/components/ShuttleListItem/ShuttleSourceListItem.js +7 -9
- package/dist/cjs/components/ShuttleListItem/ShuttleSourceListItem.js.map +2 -2
- package/dist/cjs/components/ShuttleListItem/ShuttleTargetListItem.js +6 -8
- package/dist/cjs/components/ShuttleListItem/ShuttleTargetListItem.js.map +2 -2
- package/dist/cjs/components/ShuttleListPanel.js +2 -4
- package/dist/cjs/components/ShuttleListPanel.js.map +2 -2
- package/dist/cjs/components/ShuttleSource.js +14 -14
- package/dist/cjs/components/ShuttleSource.js.map +2 -2
- package/dist/cjs/components/ShuttleTarget.js +10 -10
- package/dist/cjs/components/ShuttleTarget.js.map +2 -2
- package/dist/cjs/components/VirtualizedItem.js +13 -16
- package/dist/cjs/components/VirtualizedItem.js.map +2 -2
- package/dist/cjs/components/VirtualizedList.js +22 -30
- package/dist/cjs/components/VirtualizedList.js.map +2 -2
- package/dist/cjs/components/VirtualizedSortableList.js +3 -5
- package/dist/cjs/components/VirtualizedSortableList.js.map +2 -2
- package/dist/cjs/helper.js.map +2 -2
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/package.json +7 -0
- package/dist/cjs/tests/utils.js +1 -3
- package/dist/cjs/tests/utils.js.map +2 -2
- package/dist/cjs/updateShuttleStateFromProps.js +6 -10
- package/dist/cjs/updateShuttleStateFromProps.js.map +2 -2
- package/dist/cjs/utils.js +1 -1
- package/dist/cjs/utils.js.map +2 -2
- package/dist/cjs/withProviders.js +6 -4
- package/dist/cjs/withProviders.js.map +2 -2
- package/dist/esm/AnimationState.js +1 -3
- package/dist/esm/AnimationState.js.map +2 -2
- package/dist/esm/DSShuttle.js +3 -3
- package/dist/esm/DSShuttle.js.map +1 -1
- package/dist/esm/SearchState.js.map +2 -2
- package/dist/esm/Shuttle.actions.js +7 -25
- package/dist/esm/Shuttle.actions.js.map +3 -3
- package/dist/esm/ShuttleContainer.js +7 -22
- package/dist/esm/ShuttleContainer.js.map +2 -2
- package/dist/esm/ShuttleImpl.js +18 -47
- package/dist/esm/ShuttleImpl.js.map +2 -2
- package/dist/esm/ShuttleRenderer.js +11 -19
- package/dist/esm/ShuttleRenderer.js.map +2 -2
- package/dist/esm/ShuttleState.js +4 -8
- package/dist/esm/ShuttleState.js.map +2 -2
- package/dist/esm/animation/animationConfig.js.map +2 -2
- package/dist/esm/classedComponents.js +2 -2
- package/dist/esm/classedComponents.js.map +1 -1
- package/dist/esm/components/OverflowList.js +2 -2
- package/dist/esm/components/OverflowList.js.map +1 -1
- package/dist/esm/components/ShuttleBreadcrumb.js +3 -3
- package/dist/esm/components/ShuttleBreadcrumb.js.map +2 -2
- package/dist/esm/components/ShuttleListItem/ShuttleListItem.js +4 -4
- package/dist/esm/components/ShuttleListItem/ShuttleListItem.js.map +2 -2
- package/dist/esm/components/ShuttleListItem/ShuttleSourceListItem.js +7 -9
- package/dist/esm/components/ShuttleListItem/ShuttleSourceListItem.js.map +2 -2
- package/dist/esm/components/ShuttleListItem/ShuttleTargetListItem.js +6 -8
- package/dist/esm/components/ShuttleListItem/ShuttleTargetListItem.js.map +2 -2
- package/dist/esm/components/ShuttleListPanel.js +2 -4
- package/dist/esm/components/ShuttleListPanel.js.map +2 -2
- package/dist/esm/components/ShuttleSource.js +14 -14
- package/dist/esm/components/ShuttleSource.js.map +2 -2
- package/dist/esm/components/ShuttleTarget.js +10 -10
- package/dist/esm/components/ShuttleTarget.js.map +2 -2
- package/dist/esm/components/VirtualizedItem.js +13 -16
- package/dist/esm/components/VirtualizedItem.js.map +2 -2
- package/dist/esm/components/VirtualizedList.js +22 -30
- package/dist/esm/components/VirtualizedList.js.map +2 -2
- package/dist/esm/components/VirtualizedSortableList.js +3 -5
- package/dist/esm/components/VirtualizedSortableList.js.map +2 -2
- package/dist/esm/helper.js.map +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/package.json +7 -0
- package/dist/esm/tests/utils.js +1 -3
- package/dist/esm/tests/utils.js.map +2 -2
- package/dist/esm/updateShuttleStateFromProps.js +4 -8
- package/dist/esm/updateShuttleStateFromProps.js.map +2 -2
- package/dist/esm/utils.js +1 -1
- package/dist/esm/utils.js.map +2 -2
- package/dist/esm/withProviders.js +6 -4
- package/dist/esm/withProviders.js.map +2 -2
- package/dist/types/DSShuttle.d.ts +38 -38
- package/dist/types/Shuttle.actions.d.ts +7 -7
- package/dist/types/ShuttleRenderer.d.ts +2 -2
- package/dist/types/ShuttleState.d.ts +1 -1
- package/dist/types/components/ShuttleBreadcrumb.d.ts +2 -2
- package/dist/types/components/ShuttleListItem/ShuttleListItem.d.ts +2 -2
- package/dist/types/components/ShuttleListItem/ShuttleSourceListItem.d.ts +2 -2
- package/dist/types/components/ShuttleListItem/ShuttleTargetListItem.d.ts +2 -2
- package/dist/types/components/ShuttleListPanel.d.ts +2 -2
- package/dist/types/components/ShuttleSource.d.ts +27 -28
- package/dist/types/components/ShuttleTarget.d.ts +2 -2
- package/dist/types/components/VirtualizedList.d.ts +2 -2
- package/dist/types/components/VirtualizedSortableList.d.ts +2 -2
- package/dist/types/index.d.ts +1 -1
- package/package.json +15 -14
|
@@ -35,20 +35,20 @@ var import_prop_types = __toESM(require("prop-types"));
|
|
|
35
35
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
36
36
|
var import_ds_button = require("@elliemae/ds-button");
|
|
37
37
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
38
|
-
var import_ShuttleSearchBox = require("./ShuttleSearchBox");
|
|
39
|
-
var import_ShuttleInfiniteScrollIndicator = require("./ShuttleInfiniteScrollIndicator");
|
|
40
|
-
var import_ShuttleSourceListItem = require("./ShuttleListItem/ShuttleSourceListItem");
|
|
41
|
-
var import_classedComponents = require("../classedComponents");
|
|
42
|
-
var import_ShuttleListPanel = require("./ShuttleListPanel");
|
|
43
|
-
var import_VirtualizedList = require("./VirtualizedList");
|
|
44
|
-
var import_helper = require("../helper");
|
|
45
|
-
var import_AnimationState = require("../AnimationState");
|
|
46
|
-
var import_SearchState = require("../SearchState");
|
|
47
|
-
var import_VirtualizedSortableList = require("./VirtualizedSortableList");
|
|
48
|
-
var import_LoadingIndicator = require("./LoadingIndicator");
|
|
38
|
+
var import_ShuttleSearchBox = require("./ShuttleSearchBox.js");
|
|
39
|
+
var import_ShuttleInfiniteScrollIndicator = require("./ShuttleInfiniteScrollIndicator.js");
|
|
40
|
+
var import_ShuttleSourceListItem = require("./ShuttleListItem/ShuttleSourceListItem.js");
|
|
41
|
+
var import_classedComponents = require("../classedComponents.js");
|
|
42
|
+
var import_ShuttleListPanel = require("./ShuttleListPanel.js");
|
|
43
|
+
var import_VirtualizedList = require("./VirtualizedList.js");
|
|
44
|
+
var import_helper = require("../helper.js");
|
|
45
|
+
var import_AnimationState = require("../AnimationState.js");
|
|
46
|
+
var import_SearchState = require("../SearchState.js");
|
|
47
|
+
var import_VirtualizedSortableList = require("./VirtualizedSortableList.js");
|
|
48
|
+
var import_LoadingIndicator = require("./LoadingIndicator.js");
|
|
49
49
|
const noop = () => {
|
|
50
50
|
};
|
|
51
|
-
|
|
51
|
+
const ShuttleSource = ({
|
|
52
52
|
items = [],
|
|
53
53
|
checkedItems = [],
|
|
54
54
|
hierarchy = [],
|
|
@@ -72,7 +72,7 @@ function ShuttleSource({
|
|
|
72
72
|
},
|
|
73
73
|
moreItemsLoading = false,
|
|
74
74
|
hasNextPage = false
|
|
75
|
-
}) {
|
|
75
|
+
}) => {
|
|
76
76
|
const {
|
|
77
77
|
state: { isMovingBack = false, isMoving }
|
|
78
78
|
} = (0, import_react.useContext)(import_AnimationState.AnimationState.Context);
|
|
@@ -178,7 +178,7 @@ function ShuttleSource({
|
|
|
178
178
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_classedComponents.ShuttleFooterCounter, { children: renderSourceCounter(checkedItems.length) })
|
|
179
179
|
] })
|
|
180
180
|
] });
|
|
181
|
-
}
|
|
181
|
+
};
|
|
182
182
|
ShuttleSource.propTypes = {
|
|
183
183
|
items: import_prop_types.default.arrayOf(import_prop_types.default.shape({})),
|
|
184
184
|
checkedItems: import_prop_types.default.arrayOf(import_prop_types.default.shape({})),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/ShuttleSource.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable no-shadow */\nimport React, { useCallback, useContext, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport { ArrowShortRight, Search } from '@elliemae/ds-icons';\nimport { DSButton } from '@elliemae/ds-button';\nimport { runAll } from '@elliemae/ds-utilities';\nimport { ShuttleSearchBox } from './ShuttleSearchBox';\nimport { ShuttleInfiniteScrollIndicator } from './ShuttleInfiniteScrollIndicator';\nimport { ShuttleSourceListItem } from './ShuttleListItem/ShuttleSourceListItem';\nimport {\n ShuttleFooterCounter,\n Overflow,\n ShuttleFooter,\n ShuttleHeader,\n ShuttleHeaderBreadcrumb,\n ShuttleHeaderSearchToggle,\n ShuttleList,\n ShuttleWrapper,\n ShuttleFooterActions,\n EmptyMessage,\n LoadingList,\n} from '../classedComponents';\nimport { ShuttleListPanel } from './ShuttleListPanel';\nimport { VirtualizedList } from './VirtualizedList';\nimport { getActiveIdFromHierarchy } from '../helper';\nimport { AnimationState } from '../AnimationState';\nimport { SearchState } from '../SearchState';\nimport { VirtualizedSortableList } from './VirtualizedSortableList';\nimport { LoadingIndicator } from './LoadingIndicator';\n\nconst noop = () => {};\n\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADqGjB;AAnGN,mBAAwD;AACxD,wBAAsB;AACtB,sBAAwC;AACxC,uBAAyB;AACzB,0BAAuB;AACvB,8BAAiC;AACjC,4CAA+C;AAC/C,mCAAsC;AACtC,+BAYO;AACP,8BAAiC;AACjC,6BAAgC;AAChC,oBAAyC;AACzC,4BAA+B;AAC/B,yBAA4B;AAC5B,qCAAwC;AACxC,8BAAiC;AAEjC,MAAM,OAAO,MAAM;AAAC;AAEpB,
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable no-shadow */\nimport React, { useCallback, useContext, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport { ArrowShortRight, Search } from '@elliemae/ds-icons';\nimport { DSButton } from '@elliemae/ds-button';\nimport { runAll } from '@elliemae/ds-utilities';\nimport { ShuttleSearchBox } from './ShuttleSearchBox.js';\nimport { ShuttleInfiniteScrollIndicator } from './ShuttleInfiniteScrollIndicator.js';\nimport { ShuttleSourceListItem } from './ShuttleListItem/ShuttleSourceListItem.js';\nimport {\n ShuttleFooterCounter,\n Overflow,\n ShuttleFooter,\n ShuttleHeader,\n ShuttleHeaderBreadcrumb,\n ShuttleHeaderSearchToggle,\n ShuttleList,\n ShuttleWrapper,\n ShuttleFooterActions,\n EmptyMessage,\n LoadingList,\n} from '../classedComponents.js';\nimport { ShuttleListPanel } from './ShuttleListPanel.js';\nimport { VirtualizedList } from './VirtualizedList.js';\nimport { getActiveIdFromHierarchy } from '../helper.js';\nimport { AnimationState } from '../AnimationState.js';\nimport { SearchState } from '../SearchState.js';\nimport { VirtualizedSortableList } from './VirtualizedSortableList.js';\nimport { LoadingIndicator } from './LoadingIndicator.js';\n\nconst noop = () => {};\n\nconst ShuttleSource = ({\n items = [],\n checkedItems = [], // build Map() and memoize it for better performance\n hierarchy = [],\n onMoveItem = noop,\n onCheckItem = noop,\n onMoveCheckedItems = noop,\n onNavigateTo = noop,\n onClearCheckedItems = noop,\n emptyMessage = 'No items found',\n composeSourceItemProps = noop,\n loading = false,\n onSearch = noop,\n onSearchClose = noop,\n onSearchOpen = noop,\n sourceSortable = false,\n onSortEnd = noop,\n sourceClearItemsText = 'CLEAR ALL',\n searchPlaceholder,\n renderSourceCounter = (amount) => `${amount} items`,\n onGetMoreItems = () => {},\n moreItemsLoading = false,\n hasNextPage = false,\n}) => {\n const {\n state: { isMovingBack = false, isMoving },\n } = useContext(AnimationState.Context);\n const {\n state: { searching, searchTerm },\n setSearchTerm,\n reset: resetSearch,\n toggleSearchBox,\n } = useContext(SearchState.Context);\n\n const hashedCheckedItems = useMemo(\n () => checkedItems.reduce((result, item) => ({ ...result, [item]: true }), {}),\n [checkedItems],\n );\n\n const handleCloseSearch = useCallback(() => {\n setSearchTerm('');\n runAll(resetSearch, onSearchClose)();\n }, [searching]);\n\n const handleToggleSearch = useCallback(() => {\n toggleSearchBox(!searching);\n if (searching) {\n handleCloseSearch();\n } else {\n onSearchOpen();\n }\n }, [searching]);\n\n const ComponentList = useMemo(() => (sourceSortable ? VirtualizedSortableList : VirtualizedList), [sourceSortable]);\n\n const handleSortEnd = ({ oldIndex, newIndex }) => {\n onSortEnd({\n sourceItem: items[oldIndex],\n targetItem: items[newIndex],\n });\n };\n\n const isEmpty = !items.length;\n const hasContent = !loading && !isEmpty;\n const contentIsEmpty = !loading && isEmpty;\n\n return (\n <ShuttleWrapper>\n <ShuttleHeader>\n <ShuttleHeaderBreadcrumb hierarchy={hierarchy} onNavigateTo={onNavigateTo} />\n <ShuttleHeaderSearchToggle\n buttonType=\"text\"\n icon={<Search />}\n onClick={handleToggleSearch}\n containerProps={{ 'data-testid': 'shuttle-header-search-toggle' }}\n />\n </ShuttleHeader>\n <ShuttleList classProps={{ showPulse: isMovingBack }} style={{ pointerEvents: isMoving ? 'none' : null }}>\n <ShuttleSearchBox\n key={searching}\n isOpen={searching}\n onClose={runAll(() => toggleSearchBox(false), handleCloseSearch)}\n onFilter={runAll(setSearchTerm, onSearch)}\n placeholder={searchPlaceholder}\n value={searchTerm}\n />\n {hasContent ? (\n <Overflow\n activeHierarchy={getActiveIdFromHierarchy(hierarchy).id}\n classProps={{\n searching,\n empty: isEmpty,\n }}\n >\n <ComponentList\n key={searchTerm}\n helperClass=\"drag-helper\"\n itemRenderer={({ item, ...rest }) => (\n <ShuttleSourceListItem\n data-testid=\"source-list-item\"\n {...rest}\n {...composeSourceItemProps(item, rest)}\n isChecked={!!hashedCheckedItems[item.id]}\n item={item}\n onItemCheck={onCheckItem}\n onMoveToTarget={onMoveItem}\n onNavigateOnSourceTo={onNavigateTo}\n showSortHandler={sourceSortable}\n />\n )}\n items={items}\n onSortEnd={handleSortEnd}\n getMoreItems={onGetMoreItems}\n hasNextPage={hasNextPage}\n />\n </Overflow>\n ) : null}\n {contentIsEmpty ? (\n <LoadingList data-testid=\"shuttle__loading-list\">\n <EmptyMessage>{emptyMessage}</EmptyMessage>\n </LoadingList>\n ) : null}\n {loading ? (\n <LoadingList data-testid=\"shuttle__loading-list\">\n <LoadingIndicator />\n </LoadingList>\n ) : null}\n <ShuttleListPanel onClick={onMoveCheckedItems} open={checkedItems.length > 1}>\n <ArrowShortRight />\n </ShuttleListPanel>\n {moreItemsLoading ? <ShuttleInfiniteScrollIndicator isOpen /> : null}\n </ShuttleList>\n <ShuttleFooter>\n <ShuttleFooterActions>\n {!!checkedItems.length && (\n <DSButton buttonType=\"link\" labelText={sourceClearItemsText} onClick={onClearCheckedItems} />\n )}\n </ShuttleFooterActions>\n <ShuttleFooterCounter>{renderSourceCounter(checkedItems.length)}</ShuttleFooterCounter>\n </ShuttleFooter>\n </ShuttleWrapper>\n );\n};\n\nShuttleSource.propTypes = {\n items: PropTypes.arrayOf(PropTypes.shape({})),\n checkedItems: PropTypes.arrayOf(PropTypes.shape({})),\n hierarchy: PropTypes.arrayOf(PropTypes.shape({})),\n onMoveItem: PropTypes.func,\n onCheckItem: PropTypes.func,\n onMoveCheckedItems: PropTypes.func,\n onNavigateTo: PropTypes.func,\n onClearCheckedItems: PropTypes.func,\n emptyMessage: PropTypes.string,\n composeSourceItemProps: PropTypes.func,\n loading: PropTypes.bool,\n onSearch: PropTypes.func,\n onSearchClose: PropTypes.func,\n onSearchOpen: PropTypes.func,\n sourceSortable: PropTypes.bool,\n onSortEnd: PropTypes.func,\n sourceClearItemsText: PropTypes.string,\n searchPlaceholder: PropTypes.string,\n renderSourceCounter: PropTypes.func,\n onGetMoreItems: PropTypes.func,\n moreItemsLoading: PropTypes.bool,\n hasNextPage: PropTypes.bool,\n};\n\nexport { ShuttleSource };\nexport default ShuttleSource;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADqGjB;AAnGN,mBAAwD;A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QAAU;AAAA,EACvB,oBAAoB,kBAAAA,QAAU;AAAA,EAC9B,cAAc,kBAAAA,QAAU;AAAA,EACxB,qBAAqB,kBAAAA,QAAU;AAAA,EAC/B,cAAc,kBAAAA,QAAU;AAAA,EACxB,wBAAwB,kBAAAA,QAAU;AAAA,EAClC,SAAS,kBAAAA,QAAU;AAAA,EACnB,UAAU,kBAAAA,QAAU;AAAA,EACpB,eAAe,kBAAAA,QAAU;AAAA,EACzB,cAAc,kBAAAA,QAAU;AAAA,EACxB,gBAAgB,kBAAAA,QAAU;AAAA,EAC1B,WAAW,kBAAAA,QAAU;AAAA,EACrB,sBAAsB,kBAAAA,QAAU;AAAA,EAChC,mBAAmB,kBAAAA,QAAU;AAAA,EAC7B,qBAAqB,kBAAAA,QAAU;AAAA,EAC/B,gBAAgB,kBAAAA,QAAU;AAAA,EAC1B,kBAAkB,kBAAAA,QAAU;AAAA,EAC5B,aAAa,kBAAAA,QAAU;AACzB;AAGA,IAAO,wBAAQ;",
|
|
6
6
|
"names": ["PropTypes"]
|
|
7
7
|
}
|
|
@@ -32,16 +32,16 @@ var React = __toESM(require("react"));
|
|
|
32
32
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
33
33
|
var import_react = require("react");
|
|
34
34
|
var import_ds_button = require("@elliemae/ds-button");
|
|
35
|
-
var import_classedComponents = require("../classedComponents");
|
|
36
|
-
var import_helper = require("../helper");
|
|
37
|
-
var import_AnimationState = require("../AnimationState");
|
|
38
|
-
var import_VirtualizedList = require("./VirtualizedList");
|
|
39
|
-
var import_ShuttleTargetListItem = require("./ShuttleListItem/ShuttleTargetListItem");
|
|
40
|
-
var import_VirtualizedSortableList = require("./VirtualizedSortableList");
|
|
41
|
-
var import_LoadingIndicator = require("./LoadingIndicator");
|
|
35
|
+
var import_classedComponents = require("../classedComponents.js");
|
|
36
|
+
var import_helper = require("../helper.js");
|
|
37
|
+
var import_AnimationState = require("../AnimationState.js");
|
|
38
|
+
var import_VirtualizedList = require("./VirtualizedList.js");
|
|
39
|
+
var import_ShuttleTargetListItem = require("./ShuttleListItem/ShuttleTargetListItem.js");
|
|
40
|
+
var import_VirtualizedSortableList = require("./VirtualizedSortableList.js");
|
|
41
|
+
var import_LoadingIndicator = require("./LoadingIndicator.js");
|
|
42
42
|
const noop = () => {
|
|
43
43
|
};
|
|
44
|
-
|
|
44
|
+
const ShuttleTarget = ({
|
|
45
45
|
items = [],
|
|
46
46
|
hierarchy = [],
|
|
47
47
|
onNavigateTo = noop,
|
|
@@ -54,7 +54,7 @@ function ShuttleTarget({
|
|
|
54
54
|
targetClearItemsText = "CLEAR ALL",
|
|
55
55
|
renderTargetCounter = (amount) => `${amount} items`,
|
|
56
56
|
loading = false
|
|
57
|
-
}) {
|
|
57
|
+
}) => {
|
|
58
58
|
const {
|
|
59
59
|
state: { isMoving = false }
|
|
60
60
|
} = (0, import_react.useContext)(import_AnimationState.AnimationState.Context);
|
|
@@ -112,6 +112,6 @@ function ShuttleTarget({
|
|
|
112
112
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_classedComponents.ShuttleFooterCounter, { children: renderTargetCounter(items.length) })
|
|
113
113
|
] })
|
|
114
114
|
] });
|
|
115
|
-
}
|
|
115
|
+
};
|
|
116
116
|
var ShuttleTarget_default = ShuttleTarget;
|
|
117
117
|
//# sourceMappingURL=ShuttleTarget.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/ShuttleTarget.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { useContext } from 'react';\nimport { DSButton } from '@elliemae/ds-button';\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import React, { useContext } from 'react';\nimport { DSButton } from '@elliemae/ds-button';\nimport {\n EmptyMessage,\n Overflow,\n ShuttleFooter,\n ShuttleFooterActions,\n ShuttleFooterCounter,\n ShuttleHeader,\n ShuttleHeaderBreadcrumb,\n ShuttleList,\n ShuttleWrapper,\n LoadingList,\n} from '../classedComponents.js';\nimport { getActiveIdFromHierarchy } from '../helper.js';\nimport { AnimationState } from '../AnimationState.js';\nimport { VirtualizedList } from './VirtualizedList.js';\nimport { ShuttleTargetListItem } from './ShuttleListItem/ShuttleTargetListItem.js';\nimport { VirtualizedSortableList } from './VirtualizedSortableList.js';\nimport { LoadingIndicator } from './LoadingIndicator.js';\n\nconst noop = () => {};\n\nconst ShuttleTarget = ({\n items = [],\n hierarchy = [],\n onNavigateTo = noop,\n onMoveItem = noop,\n onClearMovedItems = noop,\n emptyMessage = 'No items selected',\n composeTargetItemProps = () => ({}),\n targetSortable = false,\n onSortEnd = noop,\n targetClearItemsText = 'CLEAR ALL',\n renderTargetCounter = (amount) => `${amount} items`,\n loading = false,\n}) => {\n const {\n state: { isMoving = false },\n } = useContext(AnimationState.Context);\n const isEmpty = !items.length;\n const emptyContent = loading ? <LoadingIndicator /> : <EmptyMessage>{emptyMessage}</EmptyMessage>;\n\n const ComponentList = targetSortable ? VirtualizedSortableList : VirtualizedList;\n\n const handleSortEnd = ({ oldIndex, newIndex }) => {\n onSortEnd({\n sourceItem: items[oldIndex],\n targetItem: items[newIndex],\n });\n };\n\n return (\n <ShuttleWrapper>\n <ShuttleHeader>\n <ShuttleHeaderBreadcrumb hierarchy={hierarchy} onNavigateTo={onNavigateTo} />\n </ShuttleHeader>\n <ShuttleList classProps={{ showPulse: isMoving }}>\n {!loading && !isEmpty ? (\n <Overflow\n activeHierarchy={getActiveIdFromHierarchy(hierarchy).id}\n classProps={{\n empty: !items.length,\n }}\n >\n <ComponentList\n itemRenderer={({ item, ...rest }) => (\n <ShuttleTargetListItem\n data-testid=\"target-list-item\"\n {...rest}\n {...composeTargetItemProps(item, rest)}\n isRoot={!getActiveIdFromHierarchy(hierarchy).id}\n item={item}\n onMoveToSource={onMoveItem}\n onNavigateOnTargetTo={onNavigateTo}\n showSortHandler={targetSortable}\n />\n )}\n items={items}\n onSortEnd={handleSortEnd}\n target\n />\n </Overflow>\n ) : (\n <LoadingList>{emptyContent}</LoadingList>\n )}\n </ShuttleList>\n <ShuttleFooter>\n <ShuttleFooterActions>\n {!!items.length && (\n <DSButton\n containerProps={{ 'data-testid': 'shuttle-clear-all-target' }}\n buttonType=\"link\"\n labelText={targetClearItemsText}\n onClick={onClearMovedItems}\n />\n )}\n </ShuttleFooterActions>\n <ShuttleFooterCounter>{renderTargetCounter(items.length)}</ShuttleFooterCounter>\n </ShuttleFooter>\n </ShuttleWrapper>\n );\n};\n\nexport { ShuttleTarget };\nexport default ShuttleTarget;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADyCU;AAzCjC,mBAAkC;AAClC,uBAAyB;AACzB,+BAWO;AACP,oBAAyC;AACzC,4BAA+B;AAC/B,6BAAgC;AAChC,mCAAsC;AACtC,qCAAwC;AACxC,8BAAiC;AAEjC,MAAM,OAAO,MAAM;AAAC;AAEpB,MAAM,gBAAgB,CAAC;AAAA,EACrB,QAAQ,CAAC;AAAA,EACT,YAAY,CAAC;AAAA,EACb,eAAe;AAAA,EACf,aAAa;AAAA,EACb,oBAAoB;AAAA,EACpB,eAAe;AAAA,EACf,yBAAyB,OAAO,CAAC;AAAA,EACjC,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,uBAAuB;AAAA,EACvB,sBAAsB,CAAC,WAAW,GAAG;AAAA,EACrC,UAAU;AACZ,MAAM;AACJ,QAAM;AAAA,IACJ,OAAO,EAAE,WAAW,MAAM;AAAA,EAC5B,QAAI,yBAAW,qCAAe,OAAO;AACrC,QAAM,UAAU,CAAC,MAAM;AACvB,QAAM,eAAe,UAAU,4CAAC,4CAAiB,IAAK,4CAAC,yCA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}
|
|
@@ -31,21 +31,18 @@ module.exports = __toCommonJS(VirtualizedItem_exports);
|
|
|
31
31
|
var React = __toESM(require("react"));
|
|
32
32
|
var import_react = require("react");
|
|
33
33
|
var import_react_window = require("react-window");
|
|
34
|
-
const VirtualizedItem = (0, import_react.memo)(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
import_react_window.areEqual
|
|
49
|
-
);
|
|
34
|
+
const VirtualizedItem = (0, import_react.memo)(({ data, index, style: virtualizedStyles, showSortHandler = false }) => {
|
|
35
|
+
const { items, itemRenderer, isItemMoving } = data;
|
|
36
|
+
const { item, props: animatedStyles, key } = items[index] || {};
|
|
37
|
+
if (!item)
|
|
38
|
+
return null;
|
|
39
|
+
return itemRenderer({
|
|
40
|
+
index,
|
|
41
|
+
key,
|
|
42
|
+
item,
|
|
43
|
+
showSortHandler,
|
|
44
|
+
style: isItemMoving ? { ...animatedStyles, ...virtualizedStyles } : virtualizedStyles
|
|
45
|
+
});
|
|
46
|
+
}, import_react_window.areEqual);
|
|
50
47
|
var VirtualizedItem_default = VirtualizedItem;
|
|
51
48
|
//# sourceMappingURL=VirtualizedItem.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/VirtualizedItem.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { memo } from 'react';\nimport { areEqual } from 'react-window';\n\nconst VirtualizedItem = memo(
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAqB;AACrB,0BAAyB;AAEzB,MAAM,sBAAkB
|
|
4
|
+
"sourcesContent": ["import { memo } from 'react';\nimport { areEqual } from 'react-window';\n\nconst VirtualizedItem = memo(({ data, index, style: virtualizedStyles, showSortHandler = false }) => {\n const { items, itemRenderer, isItemMoving } = data;\n const { item, props: animatedStyles, key } = items[index] || {};\n if (!item) return null;\n return itemRenderer({\n index,\n key,\n item,\n showSortHandler,\n style: isItemMoving ? { ...animatedStyles, ...virtualizedStyles } : virtualizedStyles,\n });\n}, areEqual);\n\nexport { VirtualizedItem };\nexport default VirtualizedItem;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAqB;AACrB,0BAAyB;AAEzB,MAAM,sBAAkB,mBAAK,CAAC,EAAE,MAAM,OAAO,OAAO,mBAAmB,kBAAkB,MAAM,MAAM;AACnG,QAAM,EAAE,OAAO,cAAc,aAAa,IAAI;AAC9C,QAAM,EAAE,MAAM,OAAO,gBAAgB,IAAI,IAAI,MAAM,UAAU,CAAC;AAC9D,MAAI,CAAC;AAAM,WAAO;AAClB,SAAO,aAAa;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO,eAAe,EAAE,GAAG,gBAAgB,GAAG,kBAAkB,IAAI;AAAA,EACtE,CAAC;AACH,GAAG,4BAAQ;AAGX,IAAO,0BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -35,10 +35,10 @@ var import_web = require("react-spring/web");
|
|
|
35
35
|
var import_react_window = require("react-window");
|
|
36
36
|
var import_react_window_infinite_loader = __toESM(require("react-window-infinite-loader"));
|
|
37
37
|
var import_react_virtualized_auto_sizer = __toESM(require("react-virtualized-auto-sizer"));
|
|
38
|
-
var import_animationConfig = require("../animation/animationConfig");
|
|
39
|
-
var import_AnimationState = require("../AnimationState");
|
|
40
|
-
var import_VirtualizedItem = require("./VirtualizedItem");
|
|
41
|
-
|
|
38
|
+
var import_animationConfig = require("../animation/animationConfig.js");
|
|
39
|
+
var import_AnimationState = require("../AnimationState.js");
|
|
40
|
+
var import_VirtualizedItem = require("./VirtualizedItem.js");
|
|
41
|
+
const VirtualizedList = ({
|
|
42
42
|
items,
|
|
43
43
|
itemRenderer,
|
|
44
44
|
searching,
|
|
@@ -48,7 +48,7 @@ function VirtualizedList({
|
|
|
48
48
|
hasNextPage = true,
|
|
49
49
|
getMoreItems = () => {
|
|
50
50
|
}
|
|
51
|
-
}) {
|
|
51
|
+
}) => {
|
|
52
52
|
const hasMounted = (0, import_react.useRef)(false);
|
|
53
53
|
const {
|
|
54
54
|
state: { isMoving, isMovingBack },
|
|
@@ -63,32 +63,24 @@ function VirtualizedList({
|
|
|
63
63
|
});
|
|
64
64
|
const itemCount = hasNextPage ? items.length + 1 : items.length;
|
|
65
65
|
const isItemLoaded = (index) => !hasNextPage || index < items.length;
|
|
66
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_virtualized_auto_sizer.default, { children: ({ height, width }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
67
|
-
|
|
66
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_virtualized_auto_sizer.default, { children: ({ height, width }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_window_infinite_loader.default, { isItemLoaded, itemCount, loadMoreItems: getMoreItems, children: ({ onItemsRendered, ref }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
67
|
+
import_react_window.FixedSizeList,
|
|
68
68
|
{
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
isItemMoving: hasMounted.current && (isMoving || isMovingBack)
|
|
83
|
-
},
|
|
84
|
-
itemSize: 35,
|
|
85
|
-
onItemsRendered,
|
|
86
|
-
ref,
|
|
87
|
-
children: children || import_VirtualizedItem.VirtualizedItem
|
|
88
|
-
}
|
|
89
|
-
)
|
|
69
|
+
height: searching ? 300 : height,
|
|
70
|
+
width,
|
|
71
|
+
innerRef,
|
|
72
|
+
itemCount: transitions.length,
|
|
73
|
+
itemData: {
|
|
74
|
+
items: transitions,
|
|
75
|
+
itemRenderer,
|
|
76
|
+
isItemMoving: hasMounted.current && (isMoving || isMovingBack)
|
|
77
|
+
},
|
|
78
|
+
itemSize: 35,
|
|
79
|
+
onItemsRendered,
|
|
80
|
+
ref,
|
|
81
|
+
children: children || import_VirtualizedItem.VirtualizedItem
|
|
90
82
|
}
|
|
91
|
-
) });
|
|
92
|
-
}
|
|
83
|
+
) }) });
|
|
84
|
+
};
|
|
93
85
|
var VirtualizedList_default = VirtualizedList;
|
|
94
86
|
//# sourceMappingURL=VirtualizedList.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/VirtualizedList.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable react/prop-types */\nimport React, { useContext, useEffect, useRef } from 'react';\nimport { useTransition } from 'react-spring/web';\nimport { FixedSizeList as List } from 'react-window';\nimport InfiniteLoader from 'react-window-infinite-loader';\nimport AutoSizer from 'react-virtualized-auto-sizer';\nimport { animationConfig } from '../animation/animationConfig';\nimport { AnimationState } from '../AnimationState';\nimport { VirtualizedItem } from './VirtualizedItem';\n\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable react/prop-types */\nimport React, { useContext, useEffect, useRef } from 'react';\nimport { useTransition } from 'react-spring/web';\nimport { FixedSizeList as List } from 'react-window';\nimport InfiniteLoader from 'react-window-infinite-loader';\nimport AutoSizer from 'react-virtualized-auto-sizer';\nimport { animationConfig } from '../animation/animationConfig.js';\nimport { AnimationState } from '../AnimationState.js';\nimport { VirtualizedItem } from './VirtualizedItem.js';\n\nconst VirtualizedList = ({\n items,\n itemRenderer,\n searching,\n target = false,\n innerRef,\n children,\n hasNextPage = true,\n getMoreItems = () => {},\n}) => {\n const hasMounted = useRef(false);\n const {\n state: { isMoving, isMovingBack },\n reset,\n } = useContext(AnimationState.Context);\n\n useEffect(() => {\n hasMounted.current = true;\n }, []);\n\n const transitions = useTransition(items, (item) => item.id, {\n ...animationConfig.moveItem(target),\n onDestroyed: () => reset(),\n });\n\n const itemCount = hasNextPage ? items.length + 1 : items.length;\n\n const isItemLoaded = (index) => !hasNextPage || index < items.length;\n\n return (\n <AutoSizer>\n {({ height, width }) => (\n <InfiniteLoader isItemLoaded={isItemLoaded} itemCount={itemCount} loadMoreItems={getMoreItems}>\n {({ onItemsRendered, ref }) => (\n <List\n height={searching ? 300 : height}\n width={width}\n innerRef={innerRef}\n itemCount={transitions.length}\n itemData={{\n items: transitions,\n itemRenderer,\n isItemMoving: hasMounted.current && (isMoving || isMovingBack),\n }}\n itemSize={35}\n onItemsRendered={onItemsRendered}\n ref={ref}\n >\n {children || VirtualizedItem}\n </List>\n )}\n </InfiniteLoader>\n )}\n </AutoSizer>\n );\n};\n\nexport { VirtualizedList };\nexport default VirtualizedList;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD4CX;AA3CZ,mBAAqD;AACrD,iBAA8B;AAC9B,0BAAsC;AACtC,0CAA2B;AAC3B,0CAAsB;AACtB,6BAAgC;AAChC,4BAA+B;AAC/B,6BAAgC;AAEhC,MAAM,kBAAkB,CAAC;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA,SAAS;AAAA,EACT;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,eAAe,MAAM;AAAA,EAAC;AACxB,MAAM;AACJ,QAAM,iBAAa,qBAAO,KAAK;AAC/B,QAAM;AAAA,IACJ,OAAO,EAAE,UAAU,aAAa;AAAA,IAChC;AAAA,EACF,QAAI,yBAAW,qCAAe,OAAO;AAErC,8BAAU,MAAM;AACd,eAAW,UAAU;AAAA,EACvB,GAAG,CAAC,CAAC;AAEL,QAAM,kBAAc,0BAAc,OAAO,CAAC,SAAS,KAAK,IAAI;AAAA,IAC1D,GAAG,uCAAgB,SAAS,MAAM;AAAA,IAClC,aAAa,MAAM,MAAM;AAAA,EAC3B,CAAC;AAED,QAAM,YAAY,cAAc,MAAM,SAAS,IAAI,MAAM;AAEzD,QAAM,eAAe,CAAC,UAAU,CAAC,eAAe,QAAQ,MAAM;AAE9D,SACE,4CAAC,oCAAAA,SAAA,EACE,WAAC,EAAE,QAAQ,MAAM,MAChB,4CAAC,oCAAAC,SAAA,EAAe,cAA4B,WAAsB,eAAe,cAC9E,WAAC,EAAE,iBAAiB,IAAI,MACvB;AAAA,IAAC,oBAAAC;AAAA,IAAA;AAAA,MACC,QAAQ,YAAY,MAAM;AAAA,MAC1B;AAAA,MACA;AAAA,MACA,WAAW,YAAY;AAAA,MACvB,UAAU;AAAA,QACR,OAAO;AAAA,QACP;AAAA,QACA,cAAc,WAAW,YAAY,YAAY;AAAA,MACnD;AAAA,MACA,UAAU;AAAA,MACV;AAAA,MACA;AAAA,MAEC,sBAAY;AAAA;AAAA,EACf,GAEJ,GAEJ;AAEJ;AAGA,IAAO,0BAAQ;",
|
|
6
6
|
"names": ["AutoSizer", "InfiniteLoader", "List"]
|
|
7
7
|
}
|
|
@@ -31,11 +31,9 @@ module.exports = __toCommonJS(VirtualizedSortableList_exports);
|
|
|
31
31
|
var React = __toESM(require("react"));
|
|
32
32
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
33
33
|
var import_react_sortable_hoc = require("react-sortable-hoc");
|
|
34
|
-
var import_VirtualizedList = require("./VirtualizedList");
|
|
35
|
-
var import_VirtualizedItem = require("./VirtualizedItem");
|
|
34
|
+
var import_VirtualizedList = require("./VirtualizedList.js");
|
|
35
|
+
var import_VirtualizedItem = require("./VirtualizedItem.js");
|
|
36
36
|
const SortableList = (0, import_react_sortable_hoc.sortableContainer)(import_VirtualizedList.VirtualizedList);
|
|
37
|
-
|
|
38
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SortableList, { ...otherProps, items, useDragHandle: true, children: (0, import_react_sortable_hoc.sortableElement)(import_VirtualizedItem.VirtualizedItem) });
|
|
39
|
-
}
|
|
37
|
+
const VirtualizedSortableList = ({ items, ...otherProps }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SortableList, { ...otherProps, items, useDragHandle: true, children: (0, import_react_sortable_hoc.sortableElement)(import_VirtualizedItem.VirtualizedItem) });
|
|
40
38
|
var VirtualizedSortableList_default = VirtualizedSortableList;
|
|
41
39
|
//# sourceMappingURL=VirtualizedSortableList.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/VirtualizedSortableList.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { sortableElement, sortableContainer } from 'react-sortable-hoc';\nimport { VirtualizedList } from './VirtualizedList';\nimport { VirtualizedItem } from './VirtualizedItem';\n\nconst SortableList = sortableContainer(VirtualizedList);\n\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { sortableElement, sortableContainer } from 'react-sortable-hoc';\nimport { VirtualizedList } from './VirtualizedList.js';\nimport { VirtualizedItem } from './VirtualizedItem.js';\n\nconst SortableList = sortableContainer(VirtualizedList);\n\nconst VirtualizedSortableList = ({ items, ...otherProps }) => (\n <SortableList {...otherProps} items={items} useDragHandle>\n {sortableElement(VirtualizedItem)}\n </SortableList>\n);\n\nexport { VirtualizedSortableList };\nexport default VirtualizedSortableList;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADQrB;AAPF,gCAAmD;AACnD,6BAAgC;AAChC,6BAAgC;AAEhC,MAAM,mBAAe,6CAAkB,sCAAe;AAEtD,MAAM,0BAA0B,CAAC,EAAE,UAAU,WAAW,MACtD,4CAAC,gBAAc,GAAG,YAAY,OAAc,eAAa,MACtD,yDAAgB,sCAAe,GAClC;AAIF,IAAO,kCAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/helper.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/helper.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable prettier/prettier */\n/* eslint-disable no-shadow,no-plusplus */\nimport { omit, compose, hashArray } from '@elliemae/ds-utilities';\nimport * as tree from 'treetabular';\n\nexport const getHierarchyTypeName = (dest) =>\n !dest ? 'hierarchy' : 'hierarchyDest';\nexport const checkHasChildren = (list, currentItem) =>\n list.some((item) => currentItem.id === item.parent);\nexport const getActiveIdFromHierarchy = (hierarchy = []) =>\n hierarchy[hierarchy.length - 1] || {};\n\nexport const filterItemsByHierarchy = (\n list,\n hierarchyId,\n parentField = 'parent',\n) => list.filter((item) => item[parentField] === hierarchyId);\nexport const getItemsById = (ids, list) =>\n ids\n .reduce(\n (acc, id) =>\n acc.concat(list.find((item) => String(item.id) === String(id))),\n [],\n )\n .filter((item) => item);\nexport const toggleInObject = (obj, key, value) =>\n obj[key] ? omit(obj, [key]) : { ...obj, [key]: value };\nexport const isMovable = (item) =>\n !item.forceNotMovable &&\n ((item.hasChildren && item.isMoveableContainer) || !item.hasChildren);\n// utility to execute all specified actions in sequence\nexport const pipe = (actions) => (initState, props) =>\n actions.reduce((prevState, action) => action(prevState, props), initState);\n\nexport const moveItems = ({ oldIndex, newIndex }) => (items) => {\n const sourceItem = items[oldIndex];\n items.splice(oldIndex, 1);\n items.splice(newIndex, 0, sourceItem);\n return items;\n};\n\nexport const prepareItems = (items) =>\n compose(tree.fixOrder(), (items) =>\n items.map((item) => ({\n ...item,\n hasChildren: checkHasChildren(items, item),\n })),\n )(items);\n\nconst defaultOptions = {\n parentField: 'parent',\n idField: 'id',\n op: (hasMoved) => !hasMoved,\n};\n\nexport function getChildrenFromParent(parentId, options) {\n const { parentField } = { ...defaultOptions, ...options };\n return (items) => items.filter((item) => item[parentField] === parentId);\n}\n\nexport function filterMovedItems(movedItems, options) {\n const { idField, op: filterOp } = { ...defaultOptions, ...options };\n const movedItemsHash = hashArray(movedItems, idField);\n return (items) =>\n items.filter((item) => filterOp(!!movedItemsHash[item[idField]]));\n}\n\nexport function filterBySearch(term, searching) {\n return (items) =>\n searching\n ? items.filter(\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,0BAAyC;AACzC,WAAsB;AAEf,MAAM,uBAAuB,CAAC,SACnC,CAAC,OAAO,cAAc;AACjB,MAAM,mBAAmB,CAAC,MAAM,gBACrC,KAAK,KAAK,CAAC,SAAS,YAAY,OAAO,KAAK,MAAM;AAC7C,MAAM,2BAA2B,CAAC,YAAY,CAAC,MACpD,UAAU,UAAU,SAAS,MAAM,CAAC;AAE/B,MAAM,yBAAyB,CACpC,MACA,aACA,cAAc,aACX,KAAK,OAAO,CAAC,SAAS,KAAK,iBAAiB,WAAW;AACrD,MAAM,eAAe,CAAC,KAAK,SAChC,IACG;AAAA,EACC,CAAC,KAAK,OACJ,I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AAU,YAAY,OAAO;AACpD,SAAO,CAAC,UACN,MAAM,OAAO,CAAC,SAAS,SAAS,CAAC,CAAC,eAAe,KAAK,SAAS,CAAC;AACpE;AAEO,SAAS,eAAe,MAAM,WAAW;AAC9C,SAAO,CAAC,UACN,YACI,MAAM;AAAA,
|
|
4
|
+
"sourcesContent": ["/* eslint-disable prettier/prettier */\n/* eslint-disable no-shadow,no-plusplus */\nimport { omit, compose, hashArray } from '@elliemae/ds-utilities';\nimport * as tree from 'treetabular';\n\nexport const getHierarchyTypeName = (dest) =>\n !dest ? 'hierarchy' : 'hierarchyDest';\nexport const checkHasChildren = (list, currentItem) =>\n list.some((item) => currentItem.id === item.parent);\nexport const getActiveIdFromHierarchy = (hierarchy = []) =>\n hierarchy[hierarchy.length - 1] || {};\n\nexport const filterItemsByHierarchy = (\n list,\n hierarchyId,\n parentField = 'parent',\n) => list.filter((item) => item[parentField] === hierarchyId);\nexport const getItemsById = (ids, list) =>\n ids\n .reduce(\n (acc, id) =>\n acc.concat(list.find((item) => String(item.id) === String(id))),\n [],\n )\n .filter((item) => item);\nexport const toggleInObject = (obj, key, value) =>\n obj[key] ? omit(obj, [key]) : { ...obj, [key]: value };\nexport const isMovable = (item) =>\n !item.forceNotMovable &&\n ((item.hasChildren && item.isMoveableContainer) || !item.hasChildren);\n// utility to execute all specified actions in sequence\nexport const pipe = (actions) => (initState, props) =>\n actions.reduce((prevState, action) => action(prevState, props), initState);\n\nexport const moveItems = ({ oldIndex, newIndex }) => (items) => {\n const sourceItem = items[oldIndex];\n items.splice(oldIndex, 1);\n items.splice(newIndex, 0, sourceItem);\n return items;\n};\n\nexport const prepareItems = (items) =>\n compose(tree.fixOrder(), (items) =>\n items.map((item) => ({\n ...item,\n hasChildren: checkHasChildren(items, item),\n })),\n )(items);\n\nconst defaultOptions = {\n parentField: 'parent',\n idField: 'id',\n op: (hasMoved) => !hasMoved,\n};\n\nexport function getChildrenFromParent(parentId, options) {\n const { parentField } = { ...defaultOptions, ...options };\n return (items) => items.filter((item) => item[parentField] === parentId);\n}\n\nexport function filterMovedItems(movedItems, options) {\n const { idField, op: filterOp } = { ...defaultOptions, ...options };\n const movedItemsHash = hashArray(movedItems, idField);\n return (items) =>\n items.filter((item) => filterOp(!!movedItemsHash[item[idField]]));\n}\n\nexport function filterBySearch(term, searching) {\n return (items) =>\n searching\n ? items.filter(\n (item) =>\n item.name.toLowerCase().indexOf(String(term).toLowerCase()) !== -1,\n )\n : items;\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,0BAAyC;AACzC,WAAsB;AAEf,MAAM,uBAAuB,CAAC,SACnC,CAAC,OAAO,cAAc;AACjB,MAAM,mBAAmB,CAAC,MAAM,gBACrC,KAAK,KAAK,CAAC,SAAS,YAAY,OAAO,KAAK,MAAM;AAC7C,MAAM,2BAA2B,CAAC,YAAY,CAAC,MACpD,UAAU,UAAU,SAAS,MAAM,CAAC;AAE/B,MAAM,yBAAyB,CACpC,MACA,aACA,cAAc,aACX,KAAK,OAAO,CAAC,SAAS,KAAK,iBAAiB,WAAW;AACrD,MAAM,eAAe,CAAC,KAAK,SAChC,IACG;AAAA,EACC,CAAC,KAAK,OACJ,IAAI,OAAO,KAAK,KAAK,CAAC,SAAS,OAAO,KAAK,EAAE,MAAM,OAAO,EAAE,CAAC,CAAC;AAAA,EAChE,CAAC;AACH,EACC,OAAO,CAAC,SAAS,IAAI;AACnB,MAAM,iBAAiB,CAAC,KAAK,KAAK,UACvC,IAAI,WAAO,0BAAK,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,MAAM,MAAM;AAChD,MAAM,YAAY,CAAC,SACxB,CAAC,KAAK,oBACJ,KAAK,eAAe,KAAK,uBAAwB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/index.js
CHANGED
|
@@ -31,5 +31,5 @@ __export(src_exports, {
|
|
|
31
31
|
});
|
|
32
32
|
module.exports = __toCommonJS(src_exports);
|
|
33
33
|
var React = __toESM(require("react"));
|
|
34
|
-
var import_DSShuttle = __toESM(require("./DSShuttle"));
|
|
34
|
+
var import_DSShuttle = __toESM(require("./DSShuttle.js"));
|
|
35
35
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export { default, utils, DSShuttleWithSchema, DSShuttle } from './DSShuttle';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
4
|
+
"sourcesContent": ["export { default, utils, DSShuttleWithSchema, DSShuttle } from './DSShuttle.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAA+D;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/tests/utils.js
CHANGED
|
@@ -1211,7 +1211,5 @@ const newLoadedOptions = [
|
|
|
1211
1211
|
userId: "venkat"
|
|
1212
1212
|
}
|
|
1213
1213
|
];
|
|
1214
|
-
const options2 = options.map(
|
|
1215
|
-
(op, i) => i < 2 ? { ...op, parent: "admin" } : op
|
|
1216
|
-
);
|
|
1214
|
+
const options2 = options.map((op, i) => i < 2 ? { ...op, parent: "admin" } : op);
|
|
1217
1215
|
//# sourceMappingURL=utils.js.map
|