@elliemae/ds-shuttle 3.4.3-rc.0 → 3.4.4-next.0
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 +36 -21
- package/dist/cjs/AnimationState.js.map +2 -2
- package/dist/cjs/DSShuttle.js +71 -54
- package/dist/cjs/DSShuttle.js.map +2 -2
- package/dist/cjs/SearchState.js +4 -1
- package/dist/cjs/SearchState.js.map +2 -2
- package/dist/cjs/Shuttle.actions.js +17 -5
- package/dist/cjs/Shuttle.actions.js.map +2 -2
- package/dist/cjs/ShuttleContainer.js +25 -5
- package/dist/cjs/ShuttleContainer.js.map +2 -2
- package/dist/cjs/ShuttleImpl.js +61 -15
- package/dist/cjs/ShuttleImpl.js.map +1 -1
- package/dist/cjs/ShuttleRenderer.js +81 -65
- package/dist/cjs/ShuttleRenderer.js.map +1 -1
- package/dist/cjs/ShuttleState.js +10 -3
- package/dist/cjs/ShuttleState.js.map +2 -2
- package/dist/cjs/animation/animationConfig.js +4 -1
- package/dist/cjs/animation/animationConfig.js.map +1 -1
- package/dist/cjs/classedComponents.js +4 -1
- package/dist/cjs/classedComponents.js.map +1 -1
- package/dist/cjs/components/LoadingIndicator.js +12 -8
- package/dist/cjs/components/LoadingIndicator.js.map +1 -1
- package/dist/cjs/components/OverflowList.js +10 -6
- package/dist/cjs/components/OverflowList.js.map +1 -1
- package/dist/cjs/components/ShuttleBreadcrumb.js +17 -13
- package/dist/cjs/components/ShuttleBreadcrumb.js.map +1 -1
- package/dist/cjs/components/ShuttleInfiniteScrollIndicator.js +12 -8
- package/dist/cjs/components/ShuttleInfiniteScrollIndicator.js.map +1 -1
- package/dist/cjs/components/ShuttleListItem/ActionButtons.js +11 -8
- package/dist/cjs/components/ShuttleListItem/ActionButtons.js.map +1 -1
- package/dist/cjs/components/ShuttleListItem/ShuttleListItem.js +33 -16
- package/dist/cjs/components/ShuttleListItem/ShuttleListItem.js.map +1 -1
- package/dist/cjs/components/ShuttleListItem/ShuttleSourceListItem.js +11 -9
- package/dist/cjs/components/ShuttleListItem/ShuttleSourceListItem.js.map +1 -1
- package/dist/cjs/components/ShuttleListItem/ShuttleTargetListItem.js +11 -9
- package/dist/cjs/components/ShuttleListItem/ShuttleTargetListItem.js.map +1 -1
- package/dist/cjs/components/ShuttleListPanel.js +14 -10
- package/dist/cjs/components/ShuttleListPanel.js.map +2 -2
- package/dist/cjs/components/ShuttleSearchBox.js +18 -13
- package/dist/cjs/components/ShuttleSearchBox.js.map +1 -1
- package/dist/cjs/components/ShuttleSource.js +98 -59
- package/dist/cjs/components/ShuttleSource.js.map +2 -2
- package/dist/cjs/components/ShuttleTarget.js +60 -33
- package/dist/cjs/components/ShuttleTarget.js.map +1 -1
- package/dist/cjs/components/VirtualizedItem.js +20 -14
- package/dist/cjs/components/VirtualizedItem.js.map +1 -1
- package/dist/cjs/components/VirtualizedList.js +28 -20
- package/dist/cjs/components/VirtualizedList.js.map +2 -2
- package/dist/cjs/components/VirtualizedSortableList.js +9 -5
- package/dist/cjs/components/VirtualizedSortableList.js.map +1 -1
- package/dist/cjs/helper.js +18 -7
- package/dist/cjs/helper.js.map +2 -2
- package/dist/cjs/index.js +4 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/tests/utils.js +7 -2
- package/dist/cjs/tests/utils.js.map +1 -1
- package/dist/cjs/updateShuttleStateFromProps.js +13 -4
- package/dist/cjs/updateShuttleStateFromProps.js.map +1 -1
- package/dist/cjs/utils.js +4 -1
- package/dist/cjs/utils.js.map +1 -1
- package/dist/cjs/withProviders.js +14 -5
- package/dist/cjs/withProviders.js.map +1 -1
- package/dist/esm/AnimationState.js +32 -20
- package/dist/esm/AnimationState.js.map +1 -1
- package/dist/esm/DSShuttle.js +67 -53
- package/dist/esm/DSShuttle.js.map +1 -1
- package/dist/esm/SearchState.js.map +1 -1
- package/dist/esm/Shuttle.actions.js +13 -4
- package/dist/esm/Shuttle.actions.js.map +1 -1
- package/dist/esm/ShuttleContainer.js +21 -4
- package/dist/esm/ShuttleContainer.js.map +2 -2
- package/dist/esm/ShuttleImpl.js +57 -14
- package/dist/esm/ShuttleImpl.js.map +1 -1
- package/dist/esm/ShuttleRenderer.js +77 -64
- package/dist/esm/ShuttleRenderer.js.map +1 -1
- package/dist/esm/ShuttleState.js +6 -2
- package/dist/esm/ShuttleState.js.map +1 -1
- package/dist/esm/animation/animationConfig.js.map +1 -1
- package/dist/esm/classedComponents.js.map +1 -1
- package/dist/esm/components/LoadingIndicator.js +8 -7
- package/dist/esm/components/LoadingIndicator.js.map +1 -1
- package/dist/esm/components/OverflowList.js +6 -5
- package/dist/esm/components/OverflowList.js.map +1 -1
- package/dist/esm/components/ShuttleBreadcrumb.js +13 -12
- package/dist/esm/components/ShuttleBreadcrumb.js.map +1 -1
- package/dist/esm/components/ShuttleInfiniteScrollIndicator.js +8 -7
- package/dist/esm/components/ShuttleInfiniteScrollIndicator.js.map +1 -1
- package/dist/esm/components/ShuttleListItem/ActionButtons.js +7 -7
- package/dist/esm/components/ShuttleListItem/ActionButtons.js.map +1 -1
- package/dist/esm/components/ShuttleListItem/ShuttleListItem.js +29 -15
- package/dist/esm/components/ShuttleListItem/ShuttleListItem.js.map +1 -1
- package/dist/esm/components/ShuttleListItem/ShuttleSourceListItem.js +7 -8
- package/dist/esm/components/ShuttleListItem/ShuttleSourceListItem.js.map +1 -1
- package/dist/esm/components/ShuttleListItem/ShuttleTargetListItem.js +7 -8
- package/dist/esm/components/ShuttleListItem/ShuttleTargetListItem.js.map +1 -1
- package/dist/esm/components/ShuttleListPanel.js +10 -9
- package/dist/esm/components/ShuttleListPanel.js.map +1 -1
- package/dist/esm/components/ShuttleSearchBox.js +14 -12
- package/dist/esm/components/ShuttleSearchBox.js.map +1 -1
- package/dist/esm/components/ShuttleSource.js +94 -58
- package/dist/esm/components/ShuttleSource.js.map +1 -1
- package/dist/esm/components/ShuttleTarget.js +56 -32
- package/dist/esm/components/ShuttleTarget.js.map +1 -1
- package/dist/esm/components/VirtualizedItem.js +16 -13
- package/dist/esm/components/VirtualizedItem.js.map +1 -1
- package/dist/esm/components/VirtualizedList.js +24 -19
- package/dist/esm/components/VirtualizedList.js.map +1 -1
- package/dist/esm/components/VirtualizedSortableList.js +5 -4
- package/dist/esm/components/VirtualizedSortableList.js.map +1 -1
- package/dist/esm/helper.js +14 -6
- package/dist/esm/helper.js.map +2 -2
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/tests/utils.js +3 -1
- package/dist/esm/tests/utils.js.map +1 -1
- package/dist/esm/updateShuttleStateFromProps.js +9 -3
- package/dist/esm/updateShuttleStateFromProps.js.map +1 -1
- package/dist/esm/utils.js.map +1 -1
- package/dist/esm/withProviders.js +10 -4
- package/dist/esm/withProviders.js.map +1 -1
- package/package.json +11 -11
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useContext } from "react";
|
|
3
4
|
import { useTransition, animated } from "react-spring/web";
|
|
4
5
|
import { animationConfig } from "../animation/animationConfig";
|
|
5
6
|
import { AnimationState } from "../AnimationState";
|
|
@@ -12,11 +13,11 @@ function OverflowList({ className = "", activeHierarchy = "", children }) {
|
|
|
12
13
|
...animationConfig.moveList(isDrillingDown),
|
|
13
14
|
onDestroyed: () => setIsDrillingDown(false)
|
|
14
15
|
});
|
|
15
|
-
return overflowTransition.map(({ props, key }) => /* @__PURE__ */
|
|
16
|
-
key,
|
|
16
|
+
return overflowTransition.map(({ props, key }) => /* @__PURE__ */ jsx(animated.div, {
|
|
17
17
|
className,
|
|
18
|
-
style: props
|
|
19
|
-
|
|
18
|
+
style: props,
|
|
19
|
+
children
|
|
20
|
+
}, key));
|
|
20
21
|
}
|
|
21
22
|
var OverflowList_default = OverflowList;
|
|
22
23
|
export {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/OverflowList.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useContext } from 'react';\nimport { useTransition, animated } from 'react-spring/web';\nimport { animationConfig } from '../animation/animationConfig';\nimport { AnimationState } from '../AnimationState';\n\nfunction OverflowList({ className = '', activeHierarchy = '', children }) {\n const {\n state: { isDrillingDown = false },\n setIsDrillingDown,\n } = useContext(AnimationState.Context);\n\n const overflowTransition = useTransition(activeHierarchy, null, {\n ...animationConfig.moveList(isDrillingDown),\n onDestroyed: () => setIsDrillingDown(false),\n });\n return overflowTransition.map(({ props, key }) => (\n <animated.div key={key} className={className} style={props}>\n {children}\n </animated.div>\n ));\n}\n\nexport { OverflowList };\nexport default OverflowList;\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,SAAgB,kBAAkB;AAClC,SAAS,eAAe,gBAAgB;AACxC,SAAS,uBAAuB;AAChC,SAAS,sBAAsB;AAE/B,SAAS,aAAa,EAAE,YAAY,IAAI,kBAAkB,IAAI,SAAS,GAAG;AACxE,QAAM;AAAA,IACJ,OAAO,EAAE,iBAAiB,MAAM;AAAA,IAChC;AAAA,EACF,IAAI,WAAW,eAAe,OAAO;AAErC,QAAM,qBAAqB,cAAc,iBAAiB,MAAM;AAAA,IAC9D,GAAG,gBAAgB,SAAS,cAAc;AAAA,IAC1C,aAAa,MAAM,kBAAkB,KAAK;AAAA,EAC5C,CAAC;AACD,SAAO,mBAAmB,IAAI,CAAC,EAAE,OAAO,IAAI,MAC1C,oBAAC,SAAS,KAAT;AAAA,IAAuB;AAAA,IAAsB,OAAO;AAAA,IAClD;AAAA,KADgB,GAEnB,CACD;AACH;AAGA,IAAO,uBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useTransition, animated } from "react-spring/web";
|
|
4
4
|
import { DSBreadcrumb } from "@elliemae/ds-breadcrumb";
|
|
5
5
|
import { animationConfig } from "../animation/animationConfig";
|
|
6
6
|
function ShuttleBreadcrumb({ className = "", hierarchy = [], onNavigateTo = () => null }) {
|
|
7
7
|
const animatedCrumbs = useTransition(hierarchy, (item) => item.id, animationConfig.breadcrumb());
|
|
8
|
-
return /* @__PURE__ */
|
|
9
|
-
className
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
return /* @__PURE__ */ jsx("div", {
|
|
9
|
+
className,
|
|
10
|
+
children: /* @__PURE__ */ jsx(DSBreadcrumb, {
|
|
11
|
+
isTitle: true,
|
|
12
|
+
children: animatedCrumbs.map(({ item, props, key }) => /* @__PURE__ */ jsx(DSBreadcrumb.Item, {
|
|
13
|
+
containerComponent: animated.li,
|
|
14
|
+
label: item.name,
|
|
15
|
+
onClick: () => onNavigateTo(item, "up"),
|
|
16
|
+
style: props
|
|
17
|
+
}, key))
|
|
18
|
+
})
|
|
19
|
+
});
|
|
19
20
|
}
|
|
20
21
|
var ShuttleBreadcrumb_default = ShuttleBreadcrumb;
|
|
21
22
|
export {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/ShuttleBreadcrumb.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { useTransition, animated } from 'react-spring/web';\nimport { DSBreadcrumb } from '@elliemae/ds-breadcrumb';\nimport { animationConfig } from '../animation/animationConfig';\n\nfunction ShuttleBreadcrumb({ className = '', hierarchy = [], onNavigateTo = () => null }) {\n const animatedCrumbs = useTransition(hierarchy, (item) => item.id, animationConfig.breadcrumb());\n\n return (\n <div className={className}>\n <DSBreadcrumb isTitle>\n {animatedCrumbs.map(({ item, props, key }) => (\n <DSBreadcrumb.Item\n key={key}\n containerComponent={animated.li}\n label={item.name}\n onClick={() => onNavigateTo(item, 'up')}\n style={props}\n />\n ))}\n </DSBreadcrumb>\n </div>\n );\n}\n\nexport { ShuttleBreadcrumb };\nexport default ShuttleBreadcrumb;\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAEA,SAAS,eAAe,gBAAgB;AACxC,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAEhC,SAAS,kBAAkB,EAAE,YAAY,IAAI,YAAY,CAAC,GAAG,eAAe,MAAM,KAAK,GAAG;AACxF,QAAM,iBAAiB,cAAc,WAAW,CAAC,SAAS,KAAK,IAAI,gBAAgB,WAAW,CAAC;AAE/F,SACE,oBAAC;AAAA,IAAI;AAAA,IACH,8BAAC;AAAA,MAAa,SAAO;AAAA,MAClB,yBAAe,IAAI,CAAC,EAAE,MAAM,OAAO,IAAI,MACtC,oBAAC,aAAa,MAAb;AAAA,QAEC,oBAAoB,SAAS;AAAA,QAC7B,OAAO,KAAK;AAAA,QACZ,SAAS,MAAM,aAAa,MAAM,IAAI;AAAA,QACtC,OAAO;AAAA,SAJF,GAKP,CACD;AAAA,KACH;AAAA,GACF;AAEJ;AAGA,IAAO,4BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
4
4
|
import { DSIndeterminateProgressIndicator } from "@elliemae/ds-indeterminate-progress-indicator";
|
|
5
5
|
const blockName = "shuttle-infinite-scroll-indicator";
|
|
6
6
|
const InfiniteScrollBarContainer = aggregatedClasses("div")(blockName, null, ({ isOpen }) => ({ opened: isOpen }));
|
|
7
|
-
const ShuttleInfiniteScrollIndicator = ({ isOpen }) => /* @__PURE__ */
|
|
7
|
+
const ShuttleInfiniteScrollIndicator = ({ isOpen }) => /* @__PURE__ */ jsx(InfiniteScrollBarContainer, {
|
|
8
8
|
classProps: { isOpen },
|
|
9
|
-
"data-testid": blockName
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
})
|
|
9
|
+
"data-testid": blockName,
|
|
10
|
+
children: /* @__PURE__ */ jsx(DSIndeterminateProgressIndicator, {
|
|
11
|
+
processing: true,
|
|
12
|
+
title: "Loading"
|
|
13
|
+
})
|
|
14
|
+
});
|
|
14
15
|
var ShuttleInfiniteScrollIndicator_default = ShuttleInfiniteScrollIndicator;
|
|
15
16
|
export {
|
|
16
17
|
ShuttleInfiniteScrollIndicator,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/ShuttleInfiniteScrollIndicator.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/no-unused-state */\nimport React from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { DSIndeterminateProgressIndicator } from '@elliemae/ds-indeterminate-progress-indicator';\n\nconst blockName = 'shuttle-infinite-scroll-indicator';\n\nconst InfiniteScrollBarContainer = aggregatedClasses('div')(blockName, null, ({ isOpen }) => ({ opened: isOpen }));\n\nconst ShuttleInfiniteScrollIndicator = ({ isOpen }) => (\n <InfiniteScrollBarContainer classProps={{ isOpen }} data-testid={blockName}>\n <DSIndeterminateProgressIndicator processing title=\"Loading\" />\n </InfiniteScrollBarContainer>\n);\n\nexport { ShuttleInfiniteScrollIndicator };\nexport default ShuttleInfiniteScrollIndicator;\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAEA,SAAS,yBAAyB;AAClC,SAAS,wCAAwC;AAEjD,MAAM,YAAY;AAElB,MAAM,6BAA6B,kBAAkB,KAAK,EAAE,WAAW,MAAM,CAAC,EAAE,OAAO,OAAO,EAAE,QAAQ,OAAO,EAAE;AAEjH,MAAM,iCAAiC,CAAC,EAAE,OAAO,MAC/C,oBAAC;AAAA,EAA2B,YAAY,EAAE,OAAO;AAAA,EAAG,eAAa;AAAA,EAC/D,8BAAC;AAAA,IAAiC,YAAU;AAAA,IAAC,OAAM;AAAA,GAAU;AAAA,CAC/D;AAIF,IAAO,yCAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
4
4
|
import { DSButton } from "@elliemae/ds-button";
|
|
5
5
|
import { ArrowShortRight, ArrowShortReturn, CloseCircle } from "@elliemae/ds-icons";
|
|
6
6
|
const ActionButton = aggregatedClasses(DSButton)("shuttle-list-item", "action-button");
|
|
7
|
-
const DeleteButton = (props) => /* @__PURE__ */
|
|
7
|
+
const DeleteButton = (props) => /* @__PURE__ */ jsx(ActionButton, {
|
|
8
8
|
buttonType: "text",
|
|
9
|
-
icon: /* @__PURE__ */
|
|
9
|
+
icon: /* @__PURE__ */ jsx(CloseCircle, {}),
|
|
10
10
|
...props
|
|
11
11
|
});
|
|
12
|
-
const MoveButton = (props) => /* @__PURE__ */
|
|
12
|
+
const MoveButton = (props) => /* @__PURE__ */ jsx(ActionButton, {
|
|
13
13
|
buttonType: "text",
|
|
14
|
-
icon: /* @__PURE__ */
|
|
14
|
+
icon: /* @__PURE__ */ jsx(ArrowShortRight, {}),
|
|
15
15
|
...props,
|
|
16
16
|
containerProps: { "data-testid": "ds-shuttle__move-button" }
|
|
17
17
|
});
|
|
18
|
-
const DrillDownButton = (props) => /* @__PURE__ */
|
|
18
|
+
const DrillDownButton = (props) => /* @__PURE__ */ jsx(ActionButton, {
|
|
19
19
|
buttonType: "text",
|
|
20
|
-
icon: /* @__PURE__ */
|
|
20
|
+
icon: /* @__PURE__ */ jsx(ArrowShortReturn, {
|
|
21
21
|
"data-testid": "shuttle__drill-btn-icon"
|
|
22
22
|
}),
|
|
23
23
|
...props,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/ShuttleListItem/ActionButtons.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { DSButton } from '@elliemae/ds-button';\nimport { ArrowShortRight, ArrowShortReturn, CloseCircle } from '@elliemae/ds-icons';\n\nconst ActionButton = aggregatedClasses(DSButton)('shuttle-list-item', 'action-button');\n\nexport const DeleteButton = (props) => (\n <ActionButton\n buttonType=\"text\"\n icon={<CloseCircle />}\n {...props}\n // containerProps={{ 'data-testid': 'ds-shuttle__close-button' }}\n />\n);\n\nexport const MoveButton = (props) => (\n <ActionButton\n buttonType=\"text\"\n icon={<ArrowShortRight />}\n {...props}\n containerProps={{ 'data-testid': 'ds-shuttle__move-button' }}\n />\n);\n\nexport const DrillDownButton = (props) => (\n <ActionButton\n buttonType=\"text\"\n icon={<ArrowShortReturn data-testid=\"shuttle__drill-btn-icon\" />}\n {...props}\n containerProps={{ 'data-testid': 'shuttle__drill-btn' }}\n />\n);\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,SAAS,yBAAyB;AAClC,SAAS,gBAAgB;AACzB,SAAS,iBAAiB,kBAAkB,mBAAmB;AAE/D,MAAM,eAAe,kBAAkB,QAAQ,EAAE,qBAAqB,eAAe;AAE9E,MAAM,eAAe,CAAC,UAC3B,oBAAC;AAAA,EACC,YAAW;AAAA,EACX,MAAM,oBAAC,eAAY;AAAA,EAClB,GAAG;AAAA,CAEN;AAGK,MAAM,aAAa,CAAC,UACzB,oBAAC;AAAA,EACC,YAAW;AAAA,EACX,MAAM,oBAAC,mBAAgB;AAAA,EACtB,GAAG;AAAA,EACJ,gBAAgB,EAAE,eAAe,0BAA0B;AAAA,CAC7D;AAGK,MAAM,kBAAkB,CAAC,UAC9B,oBAAC;AAAA,EACC,YAAW;AAAA,EACX,MAAM,oBAAC;AAAA,IAAiB,eAAY;AAAA,GAA0B;AAAA,EAC7D,GAAG;AAAA,EACJ,gBAAgB,EAAE,eAAe,qBAAqB;AAAA,CACxD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useContext } from "react";
|
|
3
4
|
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
4
5
|
import { ThemeContext } from "@elliemae/ds-system";
|
|
5
6
|
import { animated } from "react-spring/web";
|
|
@@ -16,7 +17,7 @@ const Content = aggregatedClasses("label")(blockName, "content", ({ isChecked, c
|
|
|
16
17
|
"can-hover": canMove,
|
|
17
18
|
"read-only": isReadonly
|
|
18
19
|
}));
|
|
19
|
-
const SortHandler = sortableHandle(() => /* @__PURE__ */
|
|
20
|
+
const SortHandler = sortableHandle(() => /* @__PURE__ */ jsx(GripperVertical, {
|
|
20
21
|
className: "gripper"
|
|
21
22
|
}));
|
|
22
23
|
function ShuttleListItem({
|
|
@@ -32,21 +33,34 @@ function ShuttleListItem({
|
|
|
32
33
|
...rest
|
|
33
34
|
}) {
|
|
34
35
|
const theme = useContext(ThemeContext);
|
|
35
|
-
return /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ jsxs(Wrapper, {
|
|
36
37
|
...rest,
|
|
37
38
|
role: "listitem",
|
|
38
|
-
style: { ...style, zIndex: theme.zIndex.dialog }
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
39
|
+
style: { ...style, zIndex: theme.zIndex.dialog },
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ jsxs(Content, {
|
|
42
|
+
classProps: {
|
|
43
|
+
canMove: isMovable(item),
|
|
44
|
+
isChecked,
|
|
45
|
+
isReadonly: item.readyOnly
|
|
46
|
+
},
|
|
47
|
+
onClick: onSelect,
|
|
48
|
+
children: [
|
|
49
|
+
showSortHandler && /* @__PURE__ */ jsx(SortHandler, {}),
|
|
50
|
+
(showIcon || showIcons) && /* @__PURE__ */ jsx(IconWrapper, {
|
|
51
|
+
children: item.icon
|
|
52
|
+
}),
|
|
53
|
+
/* @__PURE__ */ jsx(DSTruncatedTooltipText, {
|
|
54
|
+
className: "shuttle-tooltip-text",
|
|
55
|
+
value: item.name
|
|
56
|
+
})
|
|
57
|
+
]
|
|
58
|
+
}),
|
|
59
|
+
showActions && /* @__PURE__ */ jsx(ActionsGroup, {
|
|
60
|
+
children: actions
|
|
61
|
+
})
|
|
62
|
+
]
|
|
63
|
+
});
|
|
50
64
|
}
|
|
51
65
|
var ShuttleListItem_default = ShuttleListItem;
|
|
52
66
|
export {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/ShuttleListItem/ShuttleListItem.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\nimport React, { useContext } from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { ThemeContext } from '@elliemae/ds-system';\nimport { animated } from 'react-spring/web';\nimport { DSTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { sortableHandle } from 'react-sortable-hoc';\nimport { GripperVertical } from '@elliemae/ds-icons';\nimport { isMovable } from '../../helper';\n\nconst blockName = 'shuttle-list-item';\nconst Wrapper = aggregatedClasses(animated.li)(blockName);\nconst ActionsGroup = aggregatedClasses('div')(blockName, 'actions');\nconst IconWrapper = aggregatedClasses('div')(blockName, 'icon-wrapper');\nconst Content = aggregatedClasses('label')(blockName, 'content', ({ isChecked, canMove, isReadonly }) => ({\n checked: isChecked,\n 'can-hover': canMove,\n 'read-only': isReadonly,\n}));\n\nconst SortHandler = sortableHandle(() => <GripperVertical className=\"gripper\" />);\n\nfunction ShuttleListItem({\n item = {},\n showIcons = undefined,\n showIcon = true,\n onSelect = () => null,\n isChecked = false,\n style = undefined,\n showActions = true,\n actions = [],\n showSortHandler = false,\n ...rest\n}) {\n const theme = useContext(ThemeContext);\n\n return (\n // z-index fixed https://jira.elliemae.io/browse/PUI-8802\n <Wrapper {...rest} role=\"listitem\" style={{ ...style, zIndex: theme.zIndex.dialog }}>\n <Content\n classProps={{\n canMove: isMovable(item),\n isChecked,\n isReadonly: item.readyOnly,\n }}\n onClick={onSelect}\n >\n {showSortHandler && <SortHandler />}\n {(showIcon || showIcons) && <IconWrapper>{item.icon}</IconWrapper>}\n <DSTruncatedTooltipText className=\"shuttle-tooltip-text\" value={item.name} />\n </Content>\n {showActions && <ActionsGroup>{actions}</ActionsGroup>}\n </Wrapper>\n );\n}\n\nexport { ShuttleListItem };\nexport default ShuttleListItem;\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,SAAgB,kBAAkB;AAClC,SAAS,yBAAyB;AAClC,SAAS,oBAAoB;AAC7B,SAAS,gBAAgB;AACzB,SAAS,8BAA8B;AACvC,SAAS,sBAAsB;AAC/B,SAAS,uBAAuB;AAChC,SAAS,iBAAiB;AAE1B,MAAM,YAAY;AAClB,MAAM,UAAU,kBAAkB,SAAS,EAAE,EAAE,SAAS;AACxD,MAAM,eAAe,kBAAkB,KAAK,EAAE,WAAW,SAAS;AAClE,MAAM,cAAc,kBAAkB,KAAK,EAAE,WAAW,cAAc;AACtE,MAAM,UAAU,kBAAkB,OAAO,EAAE,WAAW,WAAW,CAAC,EAAE,WAAW,SAAS,WAAW,OAAO;AAAA,EACxG,SAAS;AAAA,EACT,aAAa;AAAA,EACb,aAAa;AACf,EAAE;AAEF,MAAM,cAAc,eAAe,MAAM,oBAAC;AAAA,EAAgB,WAAU;AAAA,CAAU,CAAE;AAEhF,SAAS,gBAAgB;AAAA,EACvB,OAAO,CAAC;AAAA,EACR,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,WAAW,MAAM;AAAA,EACjB,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,UAAU,CAAC;AAAA,EACX,kBAAkB;AAAA,KACf;AACL,GAAG;AACD,QAAM,QAAQ,WAAW,YAAY;AAErC,SAEE,qBAAC;AAAA,IAAS,GAAG;AAAA,IAAM,MAAK;AAAA,IAAW,OAAO,EAAE,GAAG,OAAO,QAAQ,MAAM,OAAO,OAAO;AAAA,IAChF;AAAA,2BAAC;AAAA,QACC,YAAY;AAAA,UACV,SAAS,UAAU,IAAI;AAAA,UACvB;AAAA,UACA,YAAY,KAAK;AAAA,QACnB;AAAA,QACA,SAAS;AAAA,QAER;AAAA,6BAAmB,oBAAC,eAAY;AAAA,WAC/B,YAAY,cAAc,oBAAC;AAAA,YAAa,eAAK;AAAA,WAAK;AAAA,UACpD,oBAAC;AAAA,YAAuB,WAAU;AAAA,YAAuB,OAAO,KAAK;AAAA,WAAM;AAAA;AAAA,OAC7E;AAAA,MACC,eAAe,oBAAC;AAAA,QAAc;AAAA,OAAQ;AAAA;AAAA,GACzC;AAEJ;AAGA,IAAO,0BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useState, useCallback, useEffect } from "react";
|
|
3
4
|
import { isMovable } from "../../helper";
|
|
4
5
|
import { DrillDownButton, MoveButton } from "./ActionButtons";
|
|
5
6
|
import { ShuttleListItem } from "./ShuttleListItem";
|
|
@@ -33,20 +34,18 @@ function ShuttleSourceListItem({
|
|
|
33
34
|
setClicked(true);
|
|
34
35
|
}
|
|
35
36
|
};
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
+
return /* @__PURE__ */ jsx(ShuttleListItem, {
|
|
37
38
|
...rest,
|
|
38
39
|
actions: [
|
|
39
|
-
showDrillDownButton && /* @__PURE__ */
|
|
40
|
-
key: "drill-down",
|
|
40
|
+
showDrillDownButton && /* @__PURE__ */ jsx(DrillDownButton, {
|
|
41
41
|
disabled: !item.hasChildren && !item.asyncLoad || item.readOnly || item.disableDrillDown,
|
|
42
42
|
onClick: navigateOnSourceTo
|
|
43
|
-
}),
|
|
44
|
-
showMoveButton && /* @__PURE__ */
|
|
43
|
+
}, "drill-down"),
|
|
44
|
+
showMoveButton && /* @__PURE__ */ jsx(MoveButton, {
|
|
45
45
|
"data-testid": "ds-shuttle__move-button",
|
|
46
|
-
key: "move",
|
|
47
46
|
disabled: !isMovable(item) || item.readOnly,
|
|
48
47
|
onClick: handleOnClick
|
|
49
|
-
})
|
|
48
|
+
}, "move")
|
|
50
49
|
],
|
|
51
50
|
isChecked,
|
|
52
51
|
item,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/ShuttleListItem/ShuttleSourceListItem.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-underscore-dangle */\nimport React, { useState, useCallback, useEffect } from 'react';\nimport { isMovable } from '../../helper';\nimport { DrillDownButton, MoveButton } from './ActionButtons';\nimport { ShuttleListItem } from './ShuttleListItem';\n\nfunction ShuttleSourceListItem({\n item = {},\n onItemCheck = () => null,\n onMoveToTarget = () => null,\n onNavigateOnSourceTo = () => null,\n isChecked = false,\n showMoveButton = true,\n showDrillDownButton = true,\n index,\n ...rest\n}) {\n const [clicked, setClicked] = useState(false);\n const moveToTarget = useCallback(() => onMoveToTarget(item), [item]);\n useEffect(() => {\n if (clicked) {\n moveToTarget();\n }\n }, [clicked]);\n const navigateOnSourceTo = useCallback(() => onNavigateOnSourceTo(item), [\n item,\n ]);\n const checkItem = useCallback(() => {\n if (!clicked) onItemCheck(item);\n }, [item, clicked]);\n const handleOnClick = () => {\n if (!clicked) {\n setClicked(true);\n }\n };\n\n return (\n <ShuttleListItem\n {...rest}\n actions={[\n showDrillDownButton && (\n <DrillDownButton\n key=\"drill-down\"\n disabled={\n (!item.hasChildren && !item.asyncLoad) ||\n item.readOnly ||\n item.disableDrillDown\n }\n onClick={navigateOnSourceTo}\n />\n ),\n showMoveButton && (\n <MoveButton\n data-testid=\"ds-shuttle__move-button\"\n key=\"move\"\n disabled={!isMovable(item) || item.readOnly}\n onClick={handleOnClick}\n />\n ),\n ]}\n isChecked={isChecked}\n item={item}\n onSelect={checkItem}\n />\n );\n}\n\nexport { ShuttleSourceListItem };\nexport default ShuttleSourceListItem;\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,SAAgB,UAAU,aAAa,iBAAiB;AACxD,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB,kBAAkB;AAC5C,SAAS,uBAAuB;AAEhC,SAAS,sBAAsB;AAAA,EAC7B,OAAO,CAAC;AAAA,EACR,cAAc,MAAM;AAAA,EACpB,iBAAiB,MAAM;AAAA,EACvB,uBAAuB,MAAM;AAAA,EAC7B,YAAY;AAAA,EACZ,iBAAiB;AAAA,EACjB,sBAAsB;AAAA,EACtB;AAAA,KACG;AACL,GAAG;AACD,QAAM,CAAC,SAAS,UAAU,IAAI,SAAS,KAAK;AAC5C,QAAM,eAAe,YAAY,MAAM,eAAe,IAAI,GAAG,CAAC,IAAI,CAAC;AACnE,YAAU,MAAM;AACd,QAAI,SAAS;AACX,mBAAa;AAAA,IACf;AAAA,EACF,GAAG,CAAC,OAAO,CAAC;AACZ,QAAM,qBAAqB,YAAY,MAAM,qBAAqB,IAAI,GAAG;AAAA,IACvE;AAAA,EACF,CAAC;AACD,QAAM,YAAY,YAAY,MAAM;AAClC,QAAI,CAAC;AAAS,kBAAY,IAAI;AAAA,EAChC,GAAG,CAAC,MAAM,OAAO,CAAC;AAClB,QAAM,gBAAgB,MAAM;AAC1B,QAAI,CAAC,SAAS;AACZ,iBAAW,IAAI;AAAA,IACjB;AAAA,EACF;AAEA,SACE,oBAAC;AAAA,IACE,GAAG;AAAA,IACJ,SAAS;AAAA,MACP,uBACE,oBAAC;AAAA,QAEC,UACG,CAAC,KAAK,eAAe,CAAC,KAAK,aAC5B,KAAK,YACL,KAAK;AAAA,QAEP,SAAS;AAAA,SANL,YAON;AAAA,MAEF,kBACE,oBAAC;AAAA,QACC,eAAY;AAAA,QAEZ,UAAU,CAAC,UAAU,IAAI,KAAK,KAAK;AAAA,QACnC,SAAS;AAAA,SAFL,MAGN;AAAA,IAEJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU;AAAA,GACZ;AAEJ;AAGA,IAAO,gCAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback } from "react";
|
|
3
4
|
import { DeleteButton, DrillDownButton } from "./ActionButtons";
|
|
4
5
|
import { ShuttleListItem } from "./ShuttleListItem";
|
|
5
6
|
function ShuttleTargetListItem({
|
|
@@ -17,20 +18,18 @@ function ShuttleTargetListItem({
|
|
|
17
18
|
const navigateOnTargetTo = useCallback(() => onNavigateOnTargetTo(item), [
|
|
18
19
|
item
|
|
19
20
|
]);
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
+
return /* @__PURE__ */ jsx(ShuttleListItem, {
|
|
21
22
|
...rest,
|
|
22
23
|
actions: [
|
|
23
|
-
showDrillDownButton && /* @__PURE__ */
|
|
24
|
-
key: "drill-down",
|
|
24
|
+
showDrillDownButton && /* @__PURE__ */ jsx(DrillDownButton, {
|
|
25
25
|
disabled: !item.hasChildren && !item.asyncLoad || item.readOnly || item.disableDrillDown,
|
|
26
26
|
onClick: navigateOnTargetTo
|
|
27
|
-
}),
|
|
28
|
-
showDeleteButton && isRoot && /* @__PURE__ */
|
|
29
|
-
key: "delete",
|
|
27
|
+
}, "drill-down"),
|
|
28
|
+
showDeleteButton && isRoot && /* @__PURE__ */ jsx(DeleteButton, {
|
|
30
29
|
disabled: item.readOnly,
|
|
31
30
|
onClick: moveToSource,
|
|
32
31
|
"data-testid": "ds-shuttle__close-button"
|
|
33
|
-
})
|
|
32
|
+
}, "delete")
|
|
34
33
|
],
|
|
35
34
|
item,
|
|
36
35
|
showActions
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/ShuttleListItem/ShuttleTargetListItem.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-underscore-dangle */\nimport React, { useCallback } from 'react';\nimport { DeleteButton, DrillDownButton } from './ActionButtons';\nimport { ShuttleListItem } from './ShuttleListItem';\n\nfunction ShuttleTargetListItem({\n item = {},\n onMoveToSource = () => null,\n onNavigateOnTargetTo = () => null,\n isRoot = false,\n showDeleteButton = true,\n showDrillDownButton = true,\n showActions = true,\n index,\n ...rest\n}) {\n const moveToSource = useCallback(() => onMoveToSource(item), [item]);\n const navigateOnTargetTo = useCallback(() => onNavigateOnTargetTo(item), [\n item,\n ]);\n return (\n <ShuttleListItem\n {...rest}\n actions={[\n showDrillDownButton && (\n <DrillDownButton\n key=\"drill-down\"\n disabled={\n (!item.hasChildren && !item.asyncLoad) ||\n item.readOnly ||\n item.disableDrillDown\n }\n onClick={navigateOnTargetTo}\n />\n ),\n showDeleteButton && isRoot && (\n <DeleteButton\n key=\"delete\"\n disabled={item.readOnly}\n onClick={moveToSource}\n data-testid=\"ds-shuttle__close-button\"\n />\n ),\n ]}\n item={item}\n showActions={showActions}\n />\n );\n}\n\nexport { ShuttleTargetListItem };\nexport default ShuttleTargetListItem;\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,SAAgB,mBAAmB;AACnC,SAAS,cAAc,uBAAuB;AAC9C,SAAS,uBAAuB;AAEhC,SAAS,sBAAsB;AAAA,EAC7B,OAAO,CAAC;AAAA,EACR,iBAAiB,MAAM;AAAA,EACvB,uBAAuB,MAAM;AAAA,EAC7B,SAAS;AAAA,EACT,mBAAmB;AAAA,EACnB,sBAAsB;AAAA,EACtB,cAAc;AAAA,EACd;AAAA,KACG;AACL,GAAG;AACD,QAAM,eAAe,YAAY,MAAM,eAAe,IAAI,GAAG,CAAC,IAAI,CAAC;AACnE,QAAM,qBAAqB,YAAY,MAAM,qBAAqB,IAAI,GAAG;AAAA,IACvE;AAAA,EACF,CAAC;AACD,SACE,oBAAC;AAAA,IACE,GAAG;AAAA,IACJ,SAAS;AAAA,MACP,uBACE,oBAAC;AAAA,QAEC,UACG,CAAC,KAAK,eAAe,CAAC,KAAK,aAC5B,KAAK,YACL,KAAK;AAAA,QAEP,SAAS;AAAA,SANL,YAON;AAAA,MAEF,oBAAoB,UAClB,oBAAC;AAAA,QAEC,UAAU,KAAK;AAAA,QACf,SAAS;AAAA,QACT,eAAY;AAAA,SAHR,QAIN;AAAA,IAEJ;AAAA,IACA;AAAA,IACA;AAAA,GACF;AAEJ;AAGA,IAAO,gCAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { DSButton } from "@elliemae/ds-button";
|
|
4
4
|
import { ShuttleListPanel as Wrapper } from "../classedComponents";
|
|
5
5
|
function ShuttleListPanel({ onClick = () => null, open = false, children }) {
|
|
6
|
-
return /* @__PURE__ */
|
|
7
|
-
classProps: { open }
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
return /* @__PURE__ */ jsx(Wrapper, {
|
|
7
|
+
classProps: { open },
|
|
8
|
+
children: /* @__PURE__ */ jsx(DSButton, {
|
|
9
|
+
buttonType: "text",
|
|
10
|
+
icon: children,
|
|
11
|
+
onClick,
|
|
12
|
+
"data-testid": "list-panel-btn"
|
|
13
|
+
})
|
|
14
|
+
});
|
|
14
15
|
}
|
|
15
16
|
var ShuttleListPanel_default = ShuttleListPanel;
|
|
16
17
|
export {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/ShuttleListPanel.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { DSButton } from '@elliemae/ds-button';\nimport { ShuttleListPanel as Wrapper } from '../classedComponents';\n\nfunction ShuttleListPanel({ onClick = () => null, open = false, children }) {\n return (\n <Wrapper classProps={{ open }}>\n <DSButton buttonType=\"text\" icon={children} onClick={onClick} data-testid=\"list-panel-btn\" />\n </Wrapper>\n );\n}\n\nexport { ShuttleListPanel };\nexport default ShuttleListPanel;\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,SAAS,gBAAgB;AACzB,SAAS,oBAAoB,eAAe;AAE5C,SAAS,iBAAiB,EAAE,UAAU,MAAM,MAAM,OAAO,OAAO,SAAS,GAAG;AAC1E,SACE,oBAAC;AAAA,IAAQ,YAAY,EAAE,KAAK;AAAA,IAC1B,8BAAC;AAAA,MAAS,YAAW;AAAA,MAAO,MAAM;AAAA,MAAU;AAAA,MAAkB,eAAY;AAAA,KAAiB;AAAA,GAC7F;AAEJ;AAGA,IAAO,2BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Component } from "react";
|
|
3
4
|
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
4
5
|
import { debounce } from "@elliemae/ds-utilities";
|
|
5
6
|
import { DSTextBox } from "@elliemae/ds-form";
|
|
@@ -44,17 +45,18 @@ class ShuttleSearchBox extends Component {
|
|
|
44
45
|
render() {
|
|
45
46
|
const { value } = this.state;
|
|
46
47
|
const { isOpen, onClose, placeholder } = this.props;
|
|
47
|
-
return /* @__PURE__ */
|
|
48
|
-
classProps: { isOpen }
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
48
|
+
return /* @__PURE__ */ jsx(SearchBoxContainer, {
|
|
49
|
+
classProps: { isOpen },
|
|
50
|
+
children: /* @__PURE__ */ jsx(DSTextBox, {
|
|
51
|
+
autoFocus: true,
|
|
52
|
+
clearable: true,
|
|
53
|
+
onChange: this.handleChange,
|
|
54
|
+
onClear: onClose,
|
|
55
|
+
onKeyDown: this.handleKeyPress,
|
|
56
|
+
placeholder,
|
|
57
|
+
value
|
|
58
|
+
})
|
|
59
|
+
});
|
|
58
60
|
}
|
|
59
61
|
}
|
|
60
62
|
ShuttleSearchBox.defaultProps = {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/ShuttleSearchBox.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/no-unused-state */\nimport React, { Component } from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { debounce } from '@elliemae/ds-utilities';\nimport { DSTextBox } from '@elliemae/ds-form';\n\nconst blockName = 'shuttle-search-box';\n\nconst SearchBoxContainer = aggregatedClasses('div')(blockName, null, ({ isOpen }) => ({ opened: isOpen }));\n\nconst filterList = debounce((term, onFilterCallback) => {\n onFilterCallback(term);\n}, 200);\n\nclass ShuttleSearchBox extends Component {\n static defaultProps = {\n filterOnKeyStroke: false,\n onChange: () => null,\n onFilter: () => null,\n };\n\n constructor(props) {\n super(props);\n this.state = {\n value: props.value,\n prevProps: {},\n };\n this.handleKeyPress = this.handleKeyPress.bind(this);\n this.handleChange = this.handleChange.bind(this);\n }\n\n static getDerivedStateFromProps(nextProps, { prevProps }) {\n const { value } = nextProps;\n if (value !== prevProps.value) {\n return {\n value,\n prevProps: { value },\n };\n }\n return null;\n }\n\n handleChange(e) {\n const { onChange, filterOnKeyStroke, onFilter } = this.props;\n const { value } = e.target;\n onChange(value);\n if (filterOnKeyStroke) filterList(value, onFilter);\n this.setState({ value });\n }\n\n handleKeyPress(e) {\n const { onFilter } = this.props;\n if (e.keyCode === 13) onFilter(e.target.value);\n }\n\n render() {\n const { value } = this.state;\n const { isOpen, onClose, placeholder } = this.props;\n return (\n <SearchBoxContainer classProps={{ isOpen }}>\n <DSTextBox\n autoFocus\n clearable\n onChange={this.handleChange}\n onClear={onClose}\n onKeyDown={this.handleKeyPress}\n placeholder={placeholder}\n value={value}\n />\n </SearchBoxContainer>\n );\n }\n}\n\nexport { ShuttleSearchBox };\nexport default ShuttleSearchBox;\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,SAAgB,iBAAiB;AACjC,SAAS,yBAAyB;AAClC,SAAS,gBAAgB;AACzB,SAAS,iBAAiB;AAE1B,MAAM,YAAY;AAElB,MAAM,qBAAqB,kBAAkB,KAAK,EAAE,WAAW,MAAM,CAAC,EAAE,OAAO,OAAO,EAAE,QAAQ,OAAO,EAAE;AAEzG,MAAM,aAAa,SAAS,CAAC,MAAM,qBAAqB;AACtD,mBAAiB,IAAI;AACvB,GAAG,GAAG;AAEN,MAAM,yBAAyB,UAAU;AAAA,EAOvC,YAAY,OAAO;AACjB,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,OAAO,MAAM;AAAA,MACb,WAAW,CAAC;AAAA,IACd;AACA,SAAK,iBAAiB,KAAK,eAAe,KAAK,IAAI;AACnD,SAAK,eAAe,KAAK,aAAa,KAAK,IAAI;AAAA,EACjD;AAAA,EAEA,OAAO,yBAAyB,WAAW,EAAE,UAAU,GAAG;AACxD,UAAM,EAAE,MAAM,IAAI;AAClB,QAAI,UAAU,UAAU,OAAO;AAC7B,aAAO;AAAA,QACL;AAAA,QACA,WAAW,EAAE,MAAM;AAAA,MACrB;AAAA,IACF;AACA,WAAO;AAAA,EACT;AAAA,EAEA,aAAa,GAAG;AACd,UAAM,EAAE,UAAU,mBAAmB,SAAS,IAAI,KAAK;AACvD,UAAM,EAAE,MAAM,IAAI,EAAE;AACpB,aAAS,KAAK;AACd,QAAI;AAAmB,iBAAW,OAAO,QAAQ;AACjD,SAAK,SAAS,EAAE,MAAM,CAAC;AAAA,EACzB;AAAA,EAEA,eAAe,GAAG;AAChB,UAAM,EAAE,SAAS,IAAI,KAAK;AAC1B,QAAI,EAAE,YAAY;AAAI,eAAS,EAAE,OAAO,KAAK;AAAA,EAC/C;AAAA,EAEA,SAAS;AACP,UAAM,EAAE,MAAM,IAAI,KAAK;AACvB,UAAM,EAAE,QAAQ,SAAS,YAAY,IAAI,KAAK;AAC9C,WACE,oBAAC;AAAA,MAAmB,YAAY,EAAE,OAAO;AAAA,MACvC,8BAAC;AAAA,QACC,WAAS;AAAA,QACT,WAAS;AAAA,QACT,UAAU,KAAK;AAAA,QACf,SAAS;AAAA,QACT,WAAW,KAAK;AAAA,QAChB;AAAA,QACA;AAAA,OACF;AAAA,KACF;AAAA,EAEJ;AACF;AA1DM,iBACG,eAAe;AAAA,EACpB,mBAAmB;AAAA,EACnB,UAAU,MAAM;AAAA,EAChB,UAAU,MAAM;AAClB;AAwDF,IAAO,2BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|