@elliemae/ds-shuttle 2.3.0-alpha.8 → 2.3.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/AnimationState.js +48 -0
- package/cjs/DSShuttle.js +223 -0
- package/cjs/SearchState.js +41 -0
- package/cjs/Shuttle.actions.js +137 -0
- package/cjs/ShuttleContainer.js +87 -0
- package/cjs/ShuttleImpl.js +311 -0
- package/cjs/ShuttleRenderer.js +139 -0
- package/cjs/ShuttleState.js +80 -0
- package/cjs/animation/animationConfig.js +81 -0
- package/cjs/classedComponents.js +71 -0
- package/cjs/components/LoadingIndicator.js +25 -0
- package/cjs/components/OverflowList.js +53 -0
- package/cjs/components/ShuttleBreadcrumb.js +42 -0
- package/cjs/components/ShuttleInfiniteScrollIndicator.js +39 -0
- package/cjs/components/ShuttleListItem/ActionButtons.js +55 -0
- package/cjs/components/ShuttleListItem/ShuttleListItem.js +85 -0
- package/cjs/components/ShuttleListItem/ShuttleSourceListItem.js +76 -0
- package/cjs/components/ShuttleListItem/ShuttleTargetListItem.js +57 -0
- package/cjs/components/ShuttleListPanel.js +31 -0
- package/cjs/components/ShuttleSearchBox.js +110 -0
- package/cjs/components/ShuttleSource.js +188 -0
- package/cjs/components/ShuttleTarget.js +116 -0
- package/cjs/components/VirtualizedItem.js +46 -0
- package/cjs/components/VirtualizedList.js +93 -0
- package/cjs/components/VirtualizedSortableList.js +41 -0
- package/cjs/helper.js +117 -0
- package/cjs/index.js +12 -0
- package/cjs/updateShuttleStateFromProps.js +94 -0
- package/cjs/utils.js +43 -0
- package/cjs/withProviders.js +29 -0
- package/{dist/esm → esm}/AnimationState.js +8 -12
- package/esm/DSShuttle.js +213 -0
- package/esm/SearchState.js +35 -0
- package/esm/Shuttle.actions.js +123 -0
- package/esm/ShuttleContainer.js +80 -0
- package/esm/ShuttleImpl.js +304 -0
- package/esm/ShuttleRenderer.js +132 -0
- package/esm/ShuttleState.js +74 -0
- package/esm/animation/animationConfig.js +77 -0
- package/esm/classedComponents.js +51 -0
- package/esm/components/LoadingIndicator.js +18 -0
- package/esm/components/OverflowList.js +46 -0
- package/esm/components/ShuttleBreadcrumb.js +35 -0
- package/esm/components/ShuttleInfiniteScrollIndicator.js +32 -0
- package/esm/components/ShuttleListItem/ActionButtons.js +43 -0
- package/esm/components/ShuttleListItem/ShuttleListItem.js +76 -0
- package/esm/components/ShuttleListItem/ShuttleSourceListItem.js +68 -0
- package/esm/components/ShuttleListItem/ShuttleTargetListItem.js +49 -0
- package/esm/components/ShuttleListPanel.js +24 -0
- package/esm/components/ShuttleSearchBox.js +104 -0
- package/esm/components/ShuttleSource.js +179 -0
- package/esm/components/ShuttleTarget.js +107 -0
- package/esm/components/VirtualizedItem.js +40 -0
- package/esm/components/VirtualizedList.js +84 -0
- package/esm/components/VirtualizedSortableList.js +34 -0
- package/esm/helper.js +78 -0
- package/esm/index.js +2 -0
- package/esm/updateShuttleStateFromProps.js +88 -0
- package/esm/utils.js +18 -0
- package/esm/withProviders.js +22 -0
- package/package.json +90 -93
- package/types/AnimationState.d.ts +26 -0
- package/types/DSShuttle.d.ts +304 -0
- package/types/SearchState.d.ts +22 -0
- package/types/Shuttle.actions.d.ts +11 -0
- package/types/ShuttleContainer.d.ts +3 -0
- package/types/ShuttleImpl.d.ts +3 -0
- package/types/ShuttleRenderer.d.ts +37 -0
- package/types/ShuttleState.d.ts +53 -0
- package/types/animation/animationConfig.d.ts +68 -0
- package/types/classedComponents.d.ts +14 -0
- package/types/components/LoadingIndicator.d.ts +3 -0
- package/types/components/OverflowList.d.ts +7 -0
- package/types/components/ShuttleBreadcrumb.d.ts +7 -0
- package/types/components/ShuttleInfiniteScrollIndicator.d.ts +5 -0
- package/types/components/ShuttleListItem/ActionButtons.d.ts +4 -0
- package/types/components/ShuttleListItem/ShuttleListItem.d.ts +14 -0
- package/types/components/ShuttleListItem/ShuttleSourceListItem.d.ts +13 -0
- package/types/components/ShuttleListItem/ShuttleTargetListItem.d.ts +13 -0
- package/types/components/ShuttleListPanel.d.ts +7 -0
- package/types/components/ShuttleSearchBox.d.ts +20 -0
- package/types/components/ShuttleSource.d.ts +54 -0
- package/types/components/ShuttleTarget.d.ts +16 -0
- package/types/components/VirtualizedItem.d.ts +3 -0
- package/types/components/VirtualizedList.d.ts +12 -0
- package/types/components/VirtualizedSortableList.d.ts +6 -0
- package/types/helper.d.ts +16 -0
- package/types/index.d.ts +1 -0
- package/types/tests/DSShuttle.events.test.d.ts +1 -0
- package/types/tests/DSShuttle.test.d.ts +1 -0
- package/types/tests/utils.d.ts +116 -0
- package/types/updateShuttleStateFromProps.d.ts +1 -0
- package/types/utils.d.ts +2 -0
- package/types/withProviders.d.ts +3 -0
- package/dist/cjs/AnimationState.js +0 -75
- package/dist/cjs/AnimationState.js.map +0 -7
- package/dist/cjs/DSShuttle.js +0 -170
- package/dist/cjs/DSShuttle.js.map +0 -7
- package/dist/cjs/SearchState.js +0 -60
- package/dist/cjs/SearchState.js.map +0 -7
- package/dist/cjs/Shuttle.actions.js +0 -126
- package/dist/cjs/Shuttle.actions.js.map +0 -7
- package/dist/cjs/ShuttleContainer.js +0 -82
- package/dist/cjs/ShuttleContainer.js.map +0 -7
- package/dist/cjs/ShuttleImpl.js +0 -214
- package/dist/cjs/ShuttleImpl.js.map +0 -7
- package/dist/cjs/ShuttleRenderer.js +0 -144
- package/dist/cjs/ShuttleRenderer.js.map +0 -7
- package/dist/cjs/ShuttleState.js +0 -84
- package/dist/cjs/ShuttleState.js.map +0 -7
- package/dist/cjs/animation/animationConfig.js +0 -78
- package/dist/cjs/animation/animationConfig.js.map +0 -7
- package/dist/cjs/classedComponents.js +0 -72
- package/dist/cjs/classedComponents.js.map +0 -7
- package/dist/cjs/components/LoadingIndicator.js +0 -52
- package/dist/cjs/components/LoadingIndicator.js.map +0 -7
- package/dist/cjs/components/OverflowList.js +0 -55
- package/dist/cjs/components/OverflowList.js.map +0 -7
- package/dist/cjs/components/ShuttleBreadcrumb.js +0 -54
- package/dist/cjs/components/ShuttleBreadcrumb.js.map +0 -7
- package/dist/cjs/components/ShuttleInfiniteScrollIndicator.js +0 -48
- package/dist/cjs/components/ShuttleInfiniteScrollIndicator.js.map +0 -7
- package/dist/cjs/components/ShuttleListItem/ActionButtons.js +0 -60
- package/dist/cjs/components/ShuttleListItem/ActionButtons.js.map +0 -7
- package/dist/cjs/components/ShuttleListItem/ShuttleListItem.js +0 -83
- package/dist/cjs/components/ShuttleListItem/ShuttleListItem.js.map +0 -7
- package/dist/cjs/components/ShuttleListItem/ShuttleSourceListItem.js +0 -90
- package/dist/cjs/components/ShuttleListItem/ShuttleSourceListItem.js.map +0 -7
- package/dist/cjs/components/ShuttleListItem/ShuttleTargetListItem.js +0 -73
- package/dist/cjs/components/ShuttleListItem/ShuttleTargetListItem.js.map +0 -7
- package/dist/cjs/components/ShuttleListPanel.js +0 -49
- package/dist/cjs/components/ShuttleListPanel.js.map +0 -7
- package/dist/cjs/components/ShuttleSearchBox.js +0 -99
- package/dist/cjs/components/ShuttleSearchBox.js.map +0 -7
- package/dist/cjs/components/ShuttleSource.js +0 -192
- package/dist/cjs/components/ShuttleSource.js.map +0 -7
- package/dist/cjs/components/ShuttleTarget.js +0 -104
- package/dist/cjs/components/ShuttleTarget.js.map +0 -7
- package/dist/cjs/components/VirtualizedItem.js +0 -51
- package/dist/cjs/components/VirtualizedItem.js.map +0 -7
- package/dist/cjs/components/VirtualizedList.js +0 -88
- package/dist/cjs/components/VirtualizedList.js.map +0 -7
- package/dist/cjs/components/VirtualizedSortableList.js +0 -48
- package/dist/cjs/components/VirtualizedSortableList.js.map +0 -7
- package/dist/cjs/helper.js +0 -83
- package/dist/cjs/helper.js.map +0 -7
- package/dist/cjs/index.js +0 -38
- package/dist/cjs/index.js.map +0 -7
- package/dist/cjs/tests/utils.js +0 -1218
- package/dist/cjs/tests/utils.js.map +0 -7
- package/dist/cjs/updateShuttleStateFromProps.js +0 -98
- package/dist/cjs/updateShuttleStateFromProps.js.map +0 -7
- package/dist/cjs/utils.js +0 -41
- package/dist/cjs/utils.js.map +0 -7
- package/dist/cjs/withProviders.js +0 -45
- package/dist/cjs/withProviders.js.map +0 -7
- package/dist/esm/AnimationState.js.map +0 -7
- package/dist/esm/DSShuttle.js +0 -141
- package/dist/esm/DSShuttle.js.map +0 -7
- package/dist/esm/SearchState.js +0 -31
- package/dist/esm/SearchState.js.map +0 -7
- package/dist/esm/Shuttle.actions.js +0 -106
- package/dist/esm/Shuttle.actions.js.map +0 -7
- package/dist/esm/ShuttleContainer.js +0 -64
- package/dist/esm/ShuttleContainer.js.map +0 -7
- package/dist/esm/ShuttleImpl.js +0 -199
- package/dist/esm/ShuttleImpl.js.map +0 -7
- package/dist/esm/ShuttleRenderer.js +0 -115
- package/dist/esm/ShuttleRenderer.js.map +0 -7
- package/dist/esm/ShuttleState.js +0 -55
- package/dist/esm/ShuttleState.js.map +0 -7
- package/dist/esm/animation/animationConfig.js +0 -49
- package/dist/esm/animation/animationConfig.js.map +0 -7
- package/dist/esm/classedComponents.js +0 -43
- package/dist/esm/classedComponents.js.map +0 -7
- package/dist/esm/components/LoadingIndicator.js +0 -23
- package/dist/esm/components/LoadingIndicator.js.map +0 -7
- package/dist/esm/components/OverflowList.js +0 -26
- package/dist/esm/components/OverflowList.js.map +0 -7
- package/dist/esm/components/ShuttleBreadcrumb.js +0 -25
- package/dist/esm/components/ShuttleBreadcrumb.js.map +0 -7
- package/dist/esm/components/ShuttleInfiniteScrollIndicator.js +0 -19
- package/dist/esm/components/ShuttleInfiniteScrollIndicator.js.map +0 -7
- package/dist/esm/components/ShuttleListItem/ActionButtons.js +0 -31
- package/dist/esm/components/ShuttleListItem/ActionButtons.js.map +0 -7
- package/dist/esm/components/ShuttleListItem/ShuttleListItem.js +0 -54
- package/dist/esm/components/ShuttleListItem/ShuttleListItem.js.map +0 -7
- package/dist/esm/components/ShuttleListItem/ShuttleSourceListItem.js +0 -61
- package/dist/esm/components/ShuttleListItem/ShuttleSourceListItem.js.map +0 -7
- package/dist/esm/components/ShuttleListItem/ShuttleTargetListItem.js +0 -44
- package/dist/esm/components/ShuttleListItem/ShuttleTargetListItem.js.map +0 -7
- package/dist/esm/components/ShuttleListPanel.js +0 -20
- package/dist/esm/components/ShuttleListPanel.js.map +0 -7
- package/dist/esm/components/ShuttleSearchBox.js +0 -70
- package/dist/esm/components/ShuttleSearchBox.js.map +0 -7
- package/dist/esm/components/ShuttleSource.js +0 -175
- package/dist/esm/components/ShuttleSource.js.map +0 -7
- package/dist/esm/components/ShuttleTarget.js +0 -86
- package/dist/esm/components/ShuttleTarget.js.map +0 -7
- package/dist/esm/components/VirtualizedItem.js +0 -22
- package/dist/esm/components/VirtualizedItem.js.map +0 -7
- package/dist/esm/components/VirtualizedList.js +0 -59
- package/dist/esm/components/VirtualizedList.js.map +0 -7
- package/dist/esm/components/VirtualizedSortableList.js +0 -19
- package/dist/esm/components/VirtualizedSortableList.js.map +0 -7
- package/dist/esm/helper.js +0 -54
- package/dist/esm/helper.js.map +0 -7
- package/dist/esm/index.js +0 -9
- package/dist/esm/index.js.map +0 -7
- package/dist/esm/tests/utils.js +0 -1189
- package/dist/esm/tests/utils.js.map +0 -7
- package/dist/esm/updateShuttleStateFromProps.js +0 -69
- package/dist/esm/updateShuttleStateFromProps.js.map +0 -7
- package/dist/esm/utils.js +0 -12
- package/dist/esm/utils.js.map +0 -7
- package/dist/esm/withProviders.js +0 -16
- package/dist/esm/withProviders.js.map +0 -7
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
const itemAnimationDuration = 300;
|
|
3
|
-
const listAnimationDuration = 300;
|
|
4
|
-
const xPosMovement = 500;
|
|
5
|
-
const breadcrumbDuration = 200;
|
|
6
|
-
const xBreadcrumbPos = 300;
|
|
7
|
-
const animationConfig = {
|
|
8
|
-
slideRight: {
|
|
9
|
-
from: { transform: "translate3d(0,0,0)" },
|
|
10
|
-
to: { transform: `translate3d(${xPosMovement}px,0,0)` }
|
|
11
|
-
},
|
|
12
|
-
slideLeft: {
|
|
13
|
-
from: { transform: "translate3d(0,0,0)" },
|
|
14
|
-
to: { transform: `translate3d(${-xPosMovement}px,0,0)` }
|
|
15
|
-
},
|
|
16
|
-
moveItem: (isMovingLeft) => ({
|
|
17
|
-
config: { duration: itemAnimationDuration },
|
|
18
|
-
enter: { opacity: 1, transform: `translate3d(${0}px,0,0)` },
|
|
19
|
-
from: {
|
|
20
|
-
opacity: 1,
|
|
21
|
-
transform: `translate3d(${isMovingLeft ? -xPosMovement : xPosMovement}px,0,0)`
|
|
22
|
-
},
|
|
23
|
-
leave: {
|
|
24
|
-
transform: `translate3d(${isMovingLeft ? -xPosMovement : xPosMovement}px,0,0)`
|
|
25
|
-
}
|
|
26
|
-
}),
|
|
27
|
-
moveList: (isDrillingDown) => ({
|
|
28
|
-
config: { duration: listAnimationDuration },
|
|
29
|
-
enter: { opacity: 1, transform: "translate3d(0,0,0)" },
|
|
30
|
-
from: {
|
|
31
|
-
opacity: 0,
|
|
32
|
-
transform: `translate3d(0px,${isDrillingDown ? xPosMovement : -xPosMovement}px,0)`
|
|
33
|
-
},
|
|
34
|
-
leave: {
|
|
35
|
-
opacity: 0,
|
|
36
|
-
transform: `translate3d(0,${isDrillingDown ? -xPosMovement : xPosMovement}px,0)`
|
|
37
|
-
}
|
|
38
|
-
}),
|
|
39
|
-
breadcrumb: () => ({
|
|
40
|
-
config: { duration: breadcrumbDuration },
|
|
41
|
-
enter: { opacity: 1, transform: `translate3d(${0}px,0,0)` },
|
|
42
|
-
from: { opacity: 0, transform: `translate3d(${xBreadcrumbPos}px,0px,0)` },
|
|
43
|
-
leave: { opacity: 0, transform: `translate3d(${xBreadcrumbPos}px,0,0)` }
|
|
44
|
-
})
|
|
45
|
-
};
|
|
46
|
-
export {
|
|
47
|
-
animationConfig
|
|
48
|
-
};
|
|
49
|
-
//# sourceMappingURL=animationConfig.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/animation/animationConfig.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "// shuttle list and items constants\nconst itemAnimationDuration = 300;\nconst listAnimationDuration = 300;\nconst xPosMovement = 500;\n\n// breadcrumb constants\nconst breadcrumbDuration = 200;\nconst xBreadcrumbPos = 300;\n\nexport const animationConfig = {\n slideRight: {\n from: { transform: 'translate3d(0,0,0)' },\n to: { transform: `translate3d(${xPosMovement}px,0,0)` },\n },\n slideLeft: {\n from: { transform: 'translate3d(0,0,0)' },\n to: { transform: `translate3d(${-xPosMovement}px,0,0)` },\n },\n moveItem: isMovingLeft => ({\n config: { duration: itemAnimationDuration },\n enter: { opacity: 1, transform: `translate3d(${0}px,0,0)` },\n from: {\n opacity: 1,\n transform: `translate3d(${\n isMovingLeft ? -xPosMovement : xPosMovement\n }px,0,0)`,\n },\n leave: {\n transform: `translate3d(${\n isMovingLeft ? -xPosMovement : xPosMovement\n }px,0,0)`,\n },\n }),\n moveList: isDrillingDown => ({\n config: { duration: listAnimationDuration },\n enter: { opacity: 1, transform: 'translate3d(0,0,0)' },\n from: {\n opacity: 0,\n transform: `translate3d(0px,${\n isDrillingDown ? xPosMovement : -xPosMovement\n }px,0)`,\n },\n leave: {\n opacity: 0,\n transform: `translate3d(0,${\n isDrillingDown ? -xPosMovement : xPosMovement\n }px,0)`,\n },\n }),\n breadcrumb: () => ({\n config: { duration: breadcrumbDuration },\n enter: { opacity: 1, transform: `translate3d(${0}px,0,0)` },\n from: { opacity: 0, transform: `translate3d(${xBreadcrumbPos}px,0px,0)` },\n leave: { opacity: 0, transform: `translate3d(${xBreadcrumbPos}px,0,0)` },\n }),\n};\n"],
|
|
5
|
-
"mappings": "AAAA;ACCA,MAAM,wBAAwB;AAC9B,MAAM,wBAAwB;AAC9B,MAAM,eAAe;AAGrB,MAAM,qBAAqB;AAC3B,MAAM,iBAAiB;AAEhB,MAAM,kBAAkB;AAAA,EAC7B,YAAY;AAAA,IACV,MAAM,EAAE,WAAW;AAAA,IACnB,IAAI,EAAE,WAAW,eAAe;AAAA;AAAA,EAElC,WAAW;AAAA,IACT,MAAM,EAAE,WAAW;AAAA,IACnB,IAAI,EAAE,WAAW,eAAe,CAAC;AAAA;AAAA,EAEnC,UAAU,kBAAiB;AAAA,IACzB,QAAQ,EAAE,UAAU;AAAA,IACpB,OAAO,EAAE,SAAS,GAAG,WAAW,eAAe;AAAA,IAC/C,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,WAAW,eACT,eAAe,CAAC,eAAe;AAAA;AAAA,IAGnC,OAAO;AAAA,MACL,WAAW,eACT,eAAe,CAAC,eAAe;AAAA;AAAA;AAAA,EAIrC,UAAU,oBAAmB;AAAA,IAC3B,QAAQ,EAAE,UAAU;AAAA,IACpB,OAAO,EAAE,SAAS,GAAG,WAAW;AAAA,IAChC,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,WAAW,mBACT,iBAAiB,eAAe,CAAC;AAAA;AAAA,IAGrC,OAAO;AAAA,MACL,SAAS;AAAA,MACT,WAAW,iBACT,iBAAiB,CAAC,eAAe;AAAA;AAAA;AAAA,EAIvC,YAAY,MAAO;AAAA,IACjB,QAAQ,EAAE,UAAU;AAAA,IACpB,OAAO,EAAE,SAAS,GAAG,WAAW,eAAe;AAAA,IAC/C,MAAM,EAAE,SAAS,GAAG,WAAW,eAAe;AAAA,IAC9C,OAAO,EAAE,SAAS,GAAG,WAAW,eAAe;AAAA;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { DSButton } from "@elliemae/ds-button";
|
|
3
|
-
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
4
|
-
import { ShuttleBreadcrumb } from "./components/ShuttleBreadcrumb";
|
|
5
|
-
import { OverflowList } from "./components/OverflowList";
|
|
6
|
-
const blockName = "shuttle";
|
|
7
|
-
const headerBlockName = `${blockName}-header`;
|
|
8
|
-
const listBlockName = `${blockName}-list`;
|
|
9
|
-
const footerBlockName = `${blockName}-footer`;
|
|
10
|
-
const ShuttleContainer = aggregatedClasses("div")(blockName);
|
|
11
|
-
const ShuttleWrapper = aggregatedClasses("div")(`${blockName}-wrapper`);
|
|
12
|
-
const ShuttleHeader = aggregatedClasses("div")(headerBlockName);
|
|
13
|
-
const ShuttleHeaderBreadcrumb = aggregatedClasses(ShuttleBreadcrumb)(headerBlockName, "breadcrumb");
|
|
14
|
-
const ShuttleHeaderSearchToggle = aggregatedClasses(DSButton)(headerBlockName, "search-toggle");
|
|
15
|
-
const ShuttleList = aggregatedClasses("div")(listBlockName, null, ({ showPulse }) => ({
|
|
16
|
-
"show-pulse": showPulse
|
|
17
|
-
}));
|
|
18
|
-
const ShuttleListPanel = aggregatedClasses("div")(listBlockName, "panel", ({ open }) => ({ open }));
|
|
19
|
-
const Overflow = aggregatedClasses(OverflowList)(listBlockName, "overflow", ({ empty, searching }) => ({
|
|
20
|
-
empty,
|
|
21
|
-
searching
|
|
22
|
-
}));
|
|
23
|
-
const EmptyMessage = aggregatedClasses("span")(listBlockName, "empty-message");
|
|
24
|
-
const LoadingList = aggregatedClasses("div")(listBlockName, "loading-list");
|
|
25
|
-
const ShuttleFooter = aggregatedClasses("div")(footerBlockName);
|
|
26
|
-
const ShuttleFooterActions = aggregatedClasses("div")(footerBlockName, "actions");
|
|
27
|
-
const ShuttleFooterCounter = aggregatedClasses("span")(footerBlockName, "counter");
|
|
28
|
-
export {
|
|
29
|
-
EmptyMessage,
|
|
30
|
-
LoadingList,
|
|
31
|
-
Overflow,
|
|
32
|
-
ShuttleContainer,
|
|
33
|
-
ShuttleFooter,
|
|
34
|
-
ShuttleFooterActions,
|
|
35
|
-
ShuttleFooterCounter,
|
|
36
|
-
ShuttleHeader,
|
|
37
|
-
ShuttleHeaderBreadcrumb,
|
|
38
|
-
ShuttleHeaderSearchToggle,
|
|
39
|
-
ShuttleList,
|
|
40
|
-
ShuttleListPanel,
|
|
41
|
-
ShuttleWrapper
|
|
42
|
-
};
|
|
43
|
-
//# sourceMappingURL=classedComponents.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/classedComponents.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { DSButton } from '@elliemae/ds-button';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { ShuttleBreadcrumb } from './components/ShuttleBreadcrumb';\nimport { OverflowList } from './components/OverflowList';\n\n// block names\nconst blockName = 'shuttle';\nconst headerBlockName = `${blockName}-header`;\nconst listBlockName = `${blockName}-list`;\nconst footerBlockName = `${blockName}-footer`;\n\nexport const ShuttleContainer = aggregatedClasses('div')(blockName);\n\n// wrapper\nexport const ShuttleWrapper = aggregatedClasses('div')(`${blockName}-wrapper`);\n\n// header\nexport const ShuttleHeader = aggregatedClasses('div')(headerBlockName);\nexport const ShuttleHeaderBreadcrumb = aggregatedClasses(ShuttleBreadcrumb)(headerBlockName, 'breadcrumb');\nexport const ShuttleHeaderSearchToggle = aggregatedClasses(DSButton)(headerBlockName, 'search-toggle');\n\n// list\nexport const ShuttleList = aggregatedClasses('div')(listBlockName, null, ({ showPulse }) => ({\n 'show-pulse': showPulse,\n}));\n\nexport const ShuttleListPanel = aggregatedClasses('div')(listBlockName, 'panel', ({ open }) => ({ open }));\nexport const Overflow = aggregatedClasses(OverflowList)(listBlockName, 'overflow', ({ empty, searching }) => ({\n empty,\n searching,\n}));\nexport const EmptyMessage = aggregatedClasses('span')(listBlockName, 'empty-message');\nexport const LoadingList = aggregatedClasses('div')(listBlockName, 'loading-list');\n\n// footer\nexport const ShuttleFooter = aggregatedClasses('div')(footerBlockName);\nexport const ShuttleFooterActions = aggregatedClasses('div')(footerBlockName, 'actions');\nexport const ShuttleFooterCounter = aggregatedClasses('span')(footerBlockName, 'counter');\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AAGA,MAAM,YAAY;AAClB,MAAM,kBAAkB,GAAG;AAC3B,MAAM,gBAAgB,GAAG;AACzB,MAAM,kBAAkB,GAAG;AAEpB,MAAM,mBAAmB,kBAAkB,OAAO;AAGlD,MAAM,iBAAiB,kBAAkB,OAAO,GAAG;AAGnD,MAAM,gBAAgB,kBAAkB,OAAO;AAC/C,MAAM,0BAA0B,kBAAkB,mBAAmB,iBAAiB;AACtF,MAAM,4BAA4B,kBAAkB,UAAU,iBAAiB;AAG/E,MAAM,cAAc,kBAAkB,OAAO,eAAe,MAAM,CAAC,EAAE,gBAAiB;AAAA,EAC3F,cAAc;AAAA;AAGT,MAAM,mBAAmB,kBAAkB,OAAO,eAAe,SAAS,CAAC,EAAE,WAAY,GAAE;AAC3F,MAAM,WAAW,kBAAkB,cAAc,eAAe,YAAY,CAAC,EAAE,OAAO,gBAAiB;AAAA,EAC5G;AAAA,EACA;AAAA;AAEK,MAAM,eAAe,kBAAkB,QAAQ,eAAe;AAC9D,MAAM,cAAc,kBAAkB,OAAO,eAAe;AAG5D,MAAM,gBAAgB,kBAAkB,OAAO;AAC/C,MAAM,uBAAuB,kBAAkB,OAAO,iBAAiB;AACvE,MAAM,uBAAuB,kBAAkB,QAAQ,iBAAiB;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import React2 from "react";
|
|
3
|
-
import { DSCircularProgressIndicator } from "@elliemae/ds-circular-progress-indicator";
|
|
4
|
-
import styled from "styled-components";
|
|
5
|
-
const Wrapper = styled.div`
|
|
6
|
-
display: flex;
|
|
7
|
-
justify-content: center;
|
|
8
|
-
align-items: center;
|
|
9
|
-
width: 100%;
|
|
10
|
-
height: 100%;
|
|
11
|
-
`;
|
|
12
|
-
const LoadingIndicator = () => /* @__PURE__ */ React2.createElement(Wrapper, {
|
|
13
|
-
"data-testid": "shuttle__loading-indicator"
|
|
14
|
-
}, /* @__PURE__ */ React2.createElement(DSCircularProgressIndicator, {
|
|
15
|
-
size: "xl",
|
|
16
|
-
showLabel: true
|
|
17
|
-
}));
|
|
18
|
-
var LoadingIndicator_default = LoadingIndicator;
|
|
19
|
-
export {
|
|
20
|
-
LoadingIndicator,
|
|
21
|
-
LoadingIndicator_default as default
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=LoadingIndicator.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/LoadingIndicator.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { DSCircularProgressIndicator } from '@elliemae/ds-circular-progress-indicator';\nimport styled from 'styled-components';\n\nconst Wrapper = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n`;\n\nconst LoadingIndicator = () => (\n <Wrapper data-testid=\"shuttle__loading-indicator\">\n <DSCircularProgressIndicator size=\"xl\" showLabel />\n </Wrapper>\n);\n\nexport { LoadingIndicator };\nexport default LoadingIndicator;\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AACA;AAEA,MAAM,UAAU,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQvB,MAAM,mBAAmB,MACvB,qCAAC,SAAD;AAAA,EAAS,eAAY;AAAA,GACnB,qCAAC,6BAAD;AAAA,EAA6B,MAAK;AAAA,EAAK,WAAS;AAAA;AAKpD,IAAO,2BAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import React2, { useContext } from "react";
|
|
3
|
-
import { useTransition, animated } from "react-spring/web";
|
|
4
|
-
import { animationConfig } from "../animation/animationConfig";
|
|
5
|
-
import { AnimationState } from "../AnimationState";
|
|
6
|
-
function OverflowList({ className = "", activeHierarchy = "", children }) {
|
|
7
|
-
const {
|
|
8
|
-
state: { isDrillingDown = false },
|
|
9
|
-
setIsDrillingDown
|
|
10
|
-
} = useContext(AnimationState.Context);
|
|
11
|
-
const overflowTransition = useTransition(activeHierarchy, null, {
|
|
12
|
-
...animationConfig.moveList(isDrillingDown),
|
|
13
|
-
onDestroyed: () => setIsDrillingDown(false)
|
|
14
|
-
});
|
|
15
|
-
return overflowTransition.map(({ props, key }) => /* @__PURE__ */ React2.createElement(animated.div, {
|
|
16
|
-
key,
|
|
17
|
-
className,
|
|
18
|
-
style: props
|
|
19
|
-
}, children));
|
|
20
|
-
}
|
|
21
|
-
var OverflowList_default = OverflowList;
|
|
22
|
-
export {
|
|
23
|
-
OverflowList,
|
|
24
|
-
OverflowList_default as default
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=OverflowList.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/OverflowList.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useContext } from 'react';\nimport { useTransition, animated } from 'react-spring/web';\nimport { animationConfig } from '../animation/animationConfig';\nimport { AnimationState } from '../AnimationState';\n\nfunction OverflowList({ className = '', activeHierarchy = '', children }) {\n const {\n state: { isDrillingDown = false },\n setIsDrillingDown,\n } = useContext(AnimationState.Context);\n\n const overflowTransition = useTransition(activeHierarchy, null, {\n ...animationConfig.moveList(isDrillingDown),\n onDestroyed: () => setIsDrillingDown(false),\n });\n return overflowTransition.map(({ props, key }) => (\n <animated.div key={key} className={className} style={props}>\n {children}\n </animated.div>\n ));\n}\n\nexport { OverflowList };\nexport default OverflowList;\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AAEA,sBAAsB,EAAE,YAAY,IAAI,kBAAkB,IAAI,YAAY;AACxE,QAAM;AAAA,IACJ,OAAO,EAAE,iBAAiB;AAAA,IAC1B;AAAA,MACE,WAAW,eAAe;AAE9B,QAAM,qBAAqB,cAAc,iBAAiB,MAAM;AAAA,OAC3D,gBAAgB,SAAS;AAAA,IAC5B,aAAa,MAAM,kBAAkB;AAAA;AAEvC,SAAO,mBAAmB,IAAI,CAAC,EAAE,OAAO,UACtC,qCAAC,SAAS,KAAV;AAAA,IAAc;AAAA,IAAU;AAAA,IAAsB,OAAO;AAAA,KAClD;AAAA;AAMP,IAAO,uBAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import React2 from "react";
|
|
3
|
-
import { useTransition, animated } from "react-spring/web";
|
|
4
|
-
import { DSBreadcrumb } from "@elliemae/ds-breadcrumb";
|
|
5
|
-
import { animationConfig } from "../animation/animationConfig";
|
|
6
|
-
function ShuttleBreadcrumb({ className = "", hierarchy = [], onNavigateTo = () => null }) {
|
|
7
|
-
const animatedCrumbs = useTransition(hierarchy, (item) => item.id, animationConfig.breadcrumb());
|
|
8
|
-
return /* @__PURE__ */ React2.createElement("div", {
|
|
9
|
-
className
|
|
10
|
-
}, /* @__PURE__ */ React2.createElement(DSBreadcrumb, {
|
|
11
|
-
isTitle: true
|
|
12
|
-
}, animatedCrumbs.map(({ item, props, key }) => /* @__PURE__ */ React2.createElement(DSBreadcrumb.Item, {
|
|
13
|
-
key,
|
|
14
|
-
containerComponent: animated.li,
|
|
15
|
-
label: item.name,
|
|
16
|
-
onClick: () => onNavigateTo(item, "up"),
|
|
17
|
-
style: props
|
|
18
|
-
}))));
|
|
19
|
-
}
|
|
20
|
-
var ShuttleBreadcrumb_default = ShuttleBreadcrumb;
|
|
21
|
-
export {
|
|
22
|
-
ShuttleBreadcrumb,
|
|
23
|
-
ShuttleBreadcrumb_default as default
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=ShuttleBreadcrumb.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/ShuttleBreadcrumb.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { useTransition, animated } from 'react-spring/web';\nimport { DSBreadcrumb } from '@elliemae/ds-breadcrumb';\nimport { animationConfig } from '../animation/animationConfig';\n\nfunction ShuttleBreadcrumb({ className = '', hierarchy = [], onNavigateTo = () => null }) {\n const animatedCrumbs = useTransition(hierarchy, (item) => item.id, animationConfig.breadcrumb());\n\n return (\n <div className={className}>\n <DSBreadcrumb isTitle>\n {animatedCrumbs.map(({ item, props, key }) => (\n <DSBreadcrumb.Item\n key={key}\n containerComponent={animated.li}\n label={item.name}\n onClick={() => onNavigateTo(item, 'up')}\n style={props}\n />\n ))}\n </DSBreadcrumb>\n </div>\n );\n}\n\nexport { ShuttleBreadcrumb };\nexport default ShuttleBreadcrumb;\n"],
|
|
5
|
-
"mappings": "AAAA;ACCA;AACA;AACA;AACA;AAEA,2BAA2B,EAAE,YAAY,IAAI,YAAY,IAAI,eAAe,MAAM,QAAQ;AACxF,QAAM,iBAAiB,cAAc,WAAW,CAAC,SAAS,KAAK,IAAI,gBAAgB;AAEnF,SACE,qCAAC,OAAD;AAAA,IAAK;AAAA,KACH,qCAAC,cAAD;AAAA,IAAc,SAAO;AAAA,KAClB,eAAe,IAAI,CAAC,EAAE,MAAM,OAAO,UAClC,qCAAC,aAAa,MAAd;AAAA,IACE;AAAA,IACA,oBAAoB,SAAS;AAAA,IAC7B,OAAO,KAAK;AAAA,IACZ,SAAS,MAAM,aAAa,MAAM;AAAA,IAClC,OAAO;AAAA;AAAA;AASnB,IAAO,4BAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import React2 from "react";
|
|
3
|
-
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
4
|
-
import { DSIndeterminateProgressIndicator } from "@elliemae/ds-indeterminate-progress-indicator";
|
|
5
|
-
const blockName = "shuttle-infinite-scroll-indicator";
|
|
6
|
-
const InfiniteScrollBarContainer = aggregatedClasses("div")(blockName, null, ({ isOpen }) => ({ opened: isOpen }));
|
|
7
|
-
const ShuttleInfiniteScrollIndicator = ({ isOpen }) => /* @__PURE__ */ React2.createElement(InfiniteScrollBarContainer, {
|
|
8
|
-
classProps: { isOpen },
|
|
9
|
-
"data-testid": blockName
|
|
10
|
-
}, /* @__PURE__ */ React2.createElement(DSIndeterminateProgressIndicator, {
|
|
11
|
-
processing: true,
|
|
12
|
-
title: "Loading"
|
|
13
|
-
}));
|
|
14
|
-
var ShuttleInfiniteScrollIndicator_default = ShuttleInfiniteScrollIndicator;
|
|
15
|
-
export {
|
|
16
|
-
ShuttleInfiniteScrollIndicator,
|
|
17
|
-
ShuttleInfiniteScrollIndicator_default as default
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=ShuttleInfiniteScrollIndicator.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/ShuttleInfiniteScrollIndicator.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/no-unused-state */\nimport React from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { DSIndeterminateProgressIndicator } from '@elliemae/ds-indeterminate-progress-indicator';\n\nconst blockName = 'shuttle-infinite-scroll-indicator';\n\nconst InfiniteScrollBarContainer = aggregatedClasses('div')(blockName, null, ({ isOpen }) => ({ opened: isOpen }));\n\nconst ShuttleInfiniteScrollIndicator = ({ isOpen }) => (\n <InfiniteScrollBarContainer classProps={{ isOpen }} data-testid={blockName}>\n <DSIndeterminateProgressIndicator processing title=\"Loading\" />\n </InfiniteScrollBarContainer>\n);\n\nexport { ShuttleInfiniteScrollIndicator };\nexport default ShuttleInfiniteScrollIndicator;\n"],
|
|
5
|
-
"mappings": "AAAA;ACCA;AACA;AACA;AAEA,MAAM,YAAY;AAElB,MAAM,6BAA6B,kBAAkB,OAAO,WAAW,MAAM,CAAC,EAAE,aAAc,GAAE,QAAQ;AAExG,MAAM,iCAAiC,CAAC,EAAE,aACxC,qCAAC,4BAAD;AAAA,EAA4B,YAAY,EAAE;AAAA,EAAU,eAAa;AAAA,GAC/D,qCAAC,kCAAD;AAAA,EAAkC,YAAU;AAAA,EAAC,OAAM;AAAA;AAKvD,IAAO,yCAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import React2 from "react";
|
|
3
|
-
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
4
|
-
import { DSButton } from "@elliemae/ds-button";
|
|
5
|
-
import { ArrowShortRight, ArrowShortReturn, CloseCircle } from "@elliemae/ds-icons";
|
|
6
|
-
const ActionButton = aggregatedClasses(DSButton)("shuttle-list-item", "action-button");
|
|
7
|
-
const DeleteButton = (props) => /* @__PURE__ */ React2.createElement(ActionButton, {
|
|
8
|
-
buttonType: "text",
|
|
9
|
-
icon: /* @__PURE__ */ React2.createElement(CloseCircle, null),
|
|
10
|
-
...props
|
|
11
|
-
});
|
|
12
|
-
const MoveButton = (props) => /* @__PURE__ */ React2.createElement(ActionButton, {
|
|
13
|
-
buttonType: "text",
|
|
14
|
-
icon: /* @__PURE__ */ React2.createElement(ArrowShortRight, null),
|
|
15
|
-
...props,
|
|
16
|
-
containerProps: { "data-testid": "ds-shuttle__move-button" }
|
|
17
|
-
});
|
|
18
|
-
const DrillDownButton = (props) => /* @__PURE__ */ React2.createElement(ActionButton, {
|
|
19
|
-
buttonType: "text",
|
|
20
|
-
icon: /* @__PURE__ */ React2.createElement(ArrowShortReturn, {
|
|
21
|
-
"data-testid": "shuttle__drill-btn-icon"
|
|
22
|
-
}),
|
|
23
|
-
...props,
|
|
24
|
-
containerProps: { "data-testid": "shuttle__drill-btn" }
|
|
25
|
-
});
|
|
26
|
-
export {
|
|
27
|
-
DeleteButton,
|
|
28
|
-
DrillDownButton,
|
|
29
|
-
MoveButton
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=ActionButtons.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/ShuttleListItem/ActionButtons.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { DSButton } from '@elliemae/ds-button';\nimport { ArrowShortRight, ArrowShortReturn, CloseCircle } from '@elliemae/ds-icons';\n\nconst ActionButton = aggregatedClasses(DSButton)('shuttle-list-item', 'action-button');\n\nexport const DeleteButton = (props) => (\n <ActionButton\n buttonType=\"text\"\n icon={<CloseCircle />}\n {...props}\n // containerProps={{ 'data-testid': 'ds-shuttle__close-button' }}\n />\n);\n\nexport const MoveButton = (props) => (\n <ActionButton\n buttonType=\"text\"\n icon={<ArrowShortRight />}\n {...props}\n containerProps={{ 'data-testid': 'ds-shuttle__move-button' }}\n />\n);\n\nexport const DrillDownButton = (props) => (\n <ActionButton\n buttonType=\"text\"\n icon={<ArrowShortReturn data-testid=\"shuttle__drill-btn-icon\" />}\n {...props}\n containerProps={{ 'data-testid': 'shuttle__drill-btn' }}\n />\n);\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AAEA,MAAM,eAAe,kBAAkB,UAAU,qBAAqB;AAE/D,MAAM,eAAe,CAAC,UAC3B,qCAAC,cAAD;AAAA,EACE,YAAW;AAAA,EACX,MAAM,qCAAC,aAAD;AAAA,KACF;AAAA;AAKD,MAAM,aAAa,CAAC,UACzB,qCAAC,cAAD;AAAA,EACE,YAAW;AAAA,EACX,MAAM,qCAAC,iBAAD;AAAA,KACF;AAAA,EACJ,gBAAgB,EAAE,eAAe;AAAA;AAI9B,MAAM,kBAAkB,CAAC,UAC9B,qCAAC,cAAD;AAAA,EACE,YAAW;AAAA,EACX,MAAM,qCAAC,kBAAD;AAAA,IAAkB,eAAY;AAAA;AAAA,KAChC;AAAA,EACJ,gBAAgB,EAAE,eAAe;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import React2 from "react";
|
|
3
|
-
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
4
|
-
import { animated } from "react-spring/web";
|
|
5
|
-
import { DSTruncatedTooltipText } from "@elliemae/ds-truncated-tooltip-text";
|
|
6
|
-
import { sortableHandle } from "react-sortable-hoc";
|
|
7
|
-
import { GripperVertical } from "@elliemae/ds-icons";
|
|
8
|
-
import { isMovable } from "../../helper";
|
|
9
|
-
const blockName = "shuttle-list-item";
|
|
10
|
-
const Wrapper = aggregatedClasses(animated.li)(blockName);
|
|
11
|
-
const ActionsGroup = aggregatedClasses("div")(blockName, "actions");
|
|
12
|
-
const IconWrapper = aggregatedClasses("div")(blockName, "icon-wrapper");
|
|
13
|
-
const Content = aggregatedClasses("label")(blockName, "content", ({ isChecked, canMove, isReadonly }) => ({
|
|
14
|
-
checked: isChecked,
|
|
15
|
-
"can-hover": canMove,
|
|
16
|
-
"read-only": isReadonly
|
|
17
|
-
}));
|
|
18
|
-
const SortHandler = sortableHandle(() => /* @__PURE__ */ React2.createElement(GripperVertical, {
|
|
19
|
-
className: "gripper"
|
|
20
|
-
}));
|
|
21
|
-
function ShuttleListItem({
|
|
22
|
-
item = {},
|
|
23
|
-
showIcons = void 0,
|
|
24
|
-
showIcon = true,
|
|
25
|
-
onSelect = () => null,
|
|
26
|
-
isChecked = false,
|
|
27
|
-
style = void 0,
|
|
28
|
-
showActions = true,
|
|
29
|
-
actions = [],
|
|
30
|
-
showSortHandler = false,
|
|
31
|
-
...rest
|
|
32
|
-
}) {
|
|
33
|
-
return /* @__PURE__ */ React2.createElement(Wrapper, {
|
|
34
|
-
...rest,
|
|
35
|
-
role: "listitem",
|
|
36
|
-
style
|
|
37
|
-
}, /* @__PURE__ */ React2.createElement(Content, {
|
|
38
|
-
classProps: {
|
|
39
|
-
canMove: isMovable(item),
|
|
40
|
-
isChecked,
|
|
41
|
-
isReadonly: item.readyOnly
|
|
42
|
-
},
|
|
43
|
-
onClick: onSelect
|
|
44
|
-
}, showSortHandler && /* @__PURE__ */ React2.createElement(SortHandler, null), (showIcon || showIcons) && /* @__PURE__ */ React2.createElement(IconWrapper, null, item.icon), /* @__PURE__ */ React2.createElement(DSTruncatedTooltipText, {
|
|
45
|
-
className: "shuttle-tooltip-text",
|
|
46
|
-
value: item.name
|
|
47
|
-
})), showActions && /* @__PURE__ */ React2.createElement(ActionsGroup, null, actions));
|
|
48
|
-
}
|
|
49
|
-
var ShuttleListItem_default = ShuttleListItem;
|
|
50
|
-
export {
|
|
51
|
-
ShuttleListItem,
|
|
52
|
-
ShuttleListItem_default as default
|
|
53
|
-
};
|
|
54
|
-
//# sourceMappingURL=ShuttleListItem.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/ShuttleListItem/ShuttleListItem.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { animated } from 'react-spring/web';\nimport { DSTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { sortableHandle } from 'react-sortable-hoc';\nimport { GripperVertical } from '@elliemae/ds-icons';\nimport { isMovable } from '../../helper';\n\nconst blockName = 'shuttle-list-item';\nconst Wrapper = aggregatedClasses(animated.li)(blockName);\nconst ActionsGroup = aggregatedClasses('div')(blockName, 'actions');\nconst IconWrapper = aggregatedClasses('div')(blockName, 'icon-wrapper');\nconst Content = aggregatedClasses('label')(blockName, 'content', ({ isChecked, canMove, isReadonly }) => ({\n checked: isChecked,\n 'can-hover': canMove,\n 'read-only': isReadonly,\n}));\n\nconst SortHandler = sortableHandle(() => <GripperVertical className=\"gripper\" />);\n\nfunction ShuttleListItem({\n item = {},\n showIcons = undefined,\n showIcon = true,\n onSelect = () => null,\n isChecked = false,\n style = undefined,\n showActions = true,\n actions = [],\n showSortHandler = false,\n ...rest\n}) {\n return (\n <Wrapper {...rest} role=\"listitem\" style={style}>\n <Content\n classProps={{\n canMove: isMovable(item),\n isChecked,\n isReadonly: item.readyOnly,\n }}\n onClick={onSelect}\n >\n {showSortHandler && <SortHandler />}\n {(showIcon || showIcons) && <IconWrapper>{item.icon}</IconWrapper>}\n <DSTruncatedTooltipText className=\"shuttle-tooltip-text\" value={item.name} />\n </Content>\n {showActions && <ActionsGroup>{actions}</ActionsGroup>}\n </Wrapper>\n );\n}\n\nexport { ShuttleListItem };\nexport default ShuttleListItem;\n"],
|
|
5
|
-
"mappings": "AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,YAAY;AAClB,MAAM,UAAU,kBAAkB,SAAS,IAAI;AAC/C,MAAM,eAAe,kBAAkB,OAAO,WAAW;AACzD,MAAM,cAAc,kBAAkB,OAAO,WAAW;AACxD,MAAM,UAAU,kBAAkB,SAAS,WAAW,WAAW,CAAC,EAAE,WAAW,SAAS,iBAAkB;AAAA,EACxG,SAAS;AAAA,EACT,aAAa;AAAA,EACb,aAAa;AAAA;AAGf,MAAM,cAAc,eAAe,MAAM,qCAAC,iBAAD;AAAA,EAAiB,WAAU;AAAA;AAEpE,yBAAyB;AAAA,EACvB,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,WAAW,MAAM;AAAA,EACjB,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,UAAU;AAAA,EACV,kBAAkB;AAAA,KACf;AAAA,GACF;AACD,SACE,qCAAC,SAAD;AAAA,OAAa;AAAA,IAAM,MAAK;AAAA,IAAW;AAAA,KACjC,qCAAC,SAAD;AAAA,IACE,YAAY;AAAA,MACV,SAAS,UAAU;AAAA,MACnB;AAAA,MACA,YAAY,KAAK;AAAA;AAAA,IAEnB,SAAS;AAAA,KAER,mBAAmB,qCAAC,aAAD,OAClB,aAAY,cAAc,qCAAC,aAAD,MAAc,KAAK,OAC/C,qCAAC,wBAAD;AAAA,IAAwB,WAAU;AAAA,IAAuB,OAAO,KAAK;AAAA,OAEtE,eAAe,qCAAC,cAAD,MAAe;AAAA;AAMrC,IAAO,0BAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import React2, { useState, useCallback, useEffect } from "react";
|
|
3
|
-
import { isMovable } from "../../helper";
|
|
4
|
-
import { DrillDownButton, MoveButton } from "./ActionButtons";
|
|
5
|
-
import { ShuttleListItem } from "./ShuttleListItem";
|
|
6
|
-
function ShuttleSourceListItem({
|
|
7
|
-
item = {},
|
|
8
|
-
onItemCheck = () => null,
|
|
9
|
-
onMoveToTarget = () => null,
|
|
10
|
-
onNavigateOnSourceTo = () => null,
|
|
11
|
-
isChecked = false,
|
|
12
|
-
showMoveButton = true,
|
|
13
|
-
showDrillDownButton = true,
|
|
14
|
-
index,
|
|
15
|
-
...rest
|
|
16
|
-
}) {
|
|
17
|
-
const [clicked, setClicked] = useState(false);
|
|
18
|
-
const moveToTarget = useCallback(() => onMoveToTarget(item), [item]);
|
|
19
|
-
useEffect(() => {
|
|
20
|
-
if (clicked) {
|
|
21
|
-
moveToTarget();
|
|
22
|
-
}
|
|
23
|
-
}, [clicked]);
|
|
24
|
-
const navigateOnSourceTo = useCallback(() => onNavigateOnSourceTo(item), [
|
|
25
|
-
item
|
|
26
|
-
]);
|
|
27
|
-
const checkItem = useCallback(() => {
|
|
28
|
-
if (!clicked)
|
|
29
|
-
onItemCheck(item);
|
|
30
|
-
}, [item, clicked]);
|
|
31
|
-
const handleOnClick = () => {
|
|
32
|
-
if (!clicked) {
|
|
33
|
-
setClicked(true);
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
return /* @__PURE__ */ React2.createElement(ShuttleListItem, {
|
|
37
|
-
...rest,
|
|
38
|
-
actions: [
|
|
39
|
-
showDrillDownButton && /* @__PURE__ */ React2.createElement(DrillDownButton, {
|
|
40
|
-
key: "drill-down",
|
|
41
|
-
disabled: !item.hasChildren && !item.asyncLoad || item.readOnly || item.disableDrillDown,
|
|
42
|
-
onClick: navigateOnSourceTo
|
|
43
|
-
}),
|
|
44
|
-
showMoveButton && /* @__PURE__ */ React2.createElement(MoveButton, {
|
|
45
|
-
"data-testid": "ds-shuttle__move-button",
|
|
46
|
-
key: "move",
|
|
47
|
-
disabled: !isMovable(item) || item.readOnly,
|
|
48
|
-
onClick: handleOnClick
|
|
49
|
-
})
|
|
50
|
-
],
|
|
51
|
-
isChecked,
|
|
52
|
-
item,
|
|
53
|
-
onSelect: checkItem
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
var ShuttleSourceListItem_default = ShuttleSourceListItem;
|
|
57
|
-
export {
|
|
58
|
-
ShuttleSourceListItem,
|
|
59
|
-
ShuttleSourceListItem_default as default
|
|
60
|
-
};
|
|
61
|
-
//# sourceMappingURL=ShuttleSourceListItem.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/ShuttleListItem/ShuttleSourceListItem.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-underscore-dangle */\nimport React, { useState, useCallback, useEffect } from 'react';\nimport { isMovable } from '../../helper';\nimport { DrillDownButton, MoveButton } from './ActionButtons';\nimport { ShuttleListItem } from './ShuttleListItem';\n\nfunction ShuttleSourceListItem({\n item = {},\n onItemCheck = () => null,\n onMoveToTarget = () => null,\n onNavigateOnSourceTo = () => null,\n isChecked = false,\n showMoveButton = true,\n showDrillDownButton = true,\n index,\n ...rest\n}) {\n const [clicked, setClicked] = useState(false);\n const moveToTarget = useCallback(() => onMoveToTarget(item), [item]);\n useEffect(() => {\n if (clicked) {\n moveToTarget();\n }\n }, [clicked]);\n const navigateOnSourceTo = useCallback(() => onNavigateOnSourceTo(item), [\n item,\n ]);\n const checkItem = useCallback(() => {\n if (!clicked) onItemCheck(item);\n }, [item, clicked]);\n const handleOnClick = () => {\n if (!clicked) {\n setClicked(true);\n }\n };\n\n return (\n <ShuttleListItem\n {...rest}\n actions={[\n showDrillDownButton && (\n <DrillDownButton\n key=\"drill-down\"\n disabled={\n (!item.hasChildren && !item.asyncLoad) ||\n item.readOnly ||\n item.disableDrillDown\n }\n onClick={navigateOnSourceTo}\n />\n ),\n showMoveButton && (\n <MoveButton\n data-testid=\"ds-shuttle__move-button\"\n key=\"move\"\n disabled={!isMovable(item) || item.readOnly}\n onClick={handleOnClick}\n />\n ),\n ]}\n isChecked={isChecked}\n item={item}\n onSelect={checkItem}\n />\n );\n}\n\nexport { ShuttleSourceListItem };\nexport default ShuttleSourceListItem;\n"],
|
|
5
|
-
"mappings": "AAAA;ACCA;AACA;AACA;AACA;AAEA,+BAA+B;AAAA,EAC7B,OAAO;AAAA,EACP,cAAc,MAAM;AAAA,EACpB,iBAAiB,MAAM;AAAA,EACvB,uBAAuB,MAAM;AAAA,EAC7B,YAAY;AAAA,EACZ,iBAAiB;AAAA,EACjB,sBAAsB;AAAA,EACtB;AAAA,KACG;AAAA,GACF;AACD,QAAM,CAAC,SAAS,cAAc,SAAS;AACvC,QAAM,eAAe,YAAY,MAAM,eAAe,OAAO,CAAC;AAC9D,YAAU,MAAM;AACd,QAAI,SAAS;AACX;AAAA;AAAA,KAED,CAAC;AACJ,QAAM,qBAAqB,YAAY,MAAM,qBAAqB,OAAO;AAAA,IACvE;AAAA;AAEF,QAAM,YAAY,YAAY,MAAM;AAClC,QAAI,CAAC;AAAS,kBAAY;AAAA,KACzB,CAAC,MAAM;AACV,QAAM,gBAAgB,MAAM;AAC1B,QAAI,CAAC,SAAS;AACZ,iBAAW;AAAA;AAAA;AAIf,SACE,qCAAC,iBAAD;AAAA,OACM;AAAA,IACJ,SAAS;AAAA,MACP,uBACE,qCAAC,iBAAD;AAAA,QACE,KAAI;AAAA,QACJ,UACG,CAAC,KAAK,eAAe,CAAC,KAAK,aAC5B,KAAK,YACL,KAAK;AAAA,QAEP,SAAS;AAAA;AAAA,MAGb,kBACE,qCAAC,YAAD;AAAA,QACE,eAAY;AAAA,QACZ,KAAI;AAAA,QACJ,UAAU,CAAC,UAAU,SAAS,KAAK;AAAA,QACnC,SAAS;AAAA;AAAA;AAAA,IAIf;AAAA,IACA;AAAA,IACA,UAAU;AAAA;AAAA;AAMhB,IAAO,gCAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import React2, { useCallback } from "react";
|
|
3
|
-
import { DeleteButton, DrillDownButton } from "./ActionButtons";
|
|
4
|
-
import { ShuttleListItem } from "./ShuttleListItem";
|
|
5
|
-
function ShuttleTargetListItem({
|
|
6
|
-
item = {},
|
|
7
|
-
onMoveToSource = () => null,
|
|
8
|
-
onNavigateOnTargetTo = () => null,
|
|
9
|
-
isRoot = false,
|
|
10
|
-
showDeleteButton = true,
|
|
11
|
-
showDrillDownButton = true,
|
|
12
|
-
showActions = true,
|
|
13
|
-
index,
|
|
14
|
-
...rest
|
|
15
|
-
}) {
|
|
16
|
-
const moveToSource = useCallback(() => onMoveToSource(item), [item]);
|
|
17
|
-
const navigateOnTargetTo = useCallback(() => onNavigateOnTargetTo(item), [
|
|
18
|
-
item
|
|
19
|
-
]);
|
|
20
|
-
return /* @__PURE__ */ React2.createElement(ShuttleListItem, {
|
|
21
|
-
...rest,
|
|
22
|
-
actions: [
|
|
23
|
-
showDrillDownButton && /* @__PURE__ */ React2.createElement(DrillDownButton, {
|
|
24
|
-
key: "drill-down",
|
|
25
|
-
disabled: !item.hasChildren && !item.asyncLoad || item.readOnly || item.disableDrillDown,
|
|
26
|
-
onClick: navigateOnTargetTo
|
|
27
|
-
}),
|
|
28
|
-
showDeleteButton && isRoot && /* @__PURE__ */ React2.createElement(DeleteButton, {
|
|
29
|
-
key: "delete",
|
|
30
|
-
disabled: item.readOnly,
|
|
31
|
-
onClick: moveToSource,
|
|
32
|
-
"data-testid": "ds-shuttle__close-button"
|
|
33
|
-
})
|
|
34
|
-
],
|
|
35
|
-
item,
|
|
36
|
-
showActions
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
var ShuttleTargetListItem_default = ShuttleTargetListItem;
|
|
40
|
-
export {
|
|
41
|
-
ShuttleTargetListItem,
|
|
42
|
-
ShuttleTargetListItem_default as default
|
|
43
|
-
};
|
|
44
|
-
//# sourceMappingURL=ShuttleTargetListItem.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/ShuttleListItem/ShuttleTargetListItem.tsx"],
|
|
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;ACCA;AACA;AACA;AAEA,+BAA+B;AAAA,EAC7B,OAAO;AAAA,EACP,iBAAiB,MAAM;AAAA,EACvB,uBAAuB,MAAM;AAAA,EAC7B,SAAS;AAAA,EACT,mBAAmB;AAAA,EACnB,sBAAsB;AAAA,EACtB,cAAc;AAAA,EACd;AAAA,KACG;AAAA,GACF;AACD,QAAM,eAAe,YAAY,MAAM,eAAe,OAAO,CAAC;AAC9D,QAAM,qBAAqB,YAAY,MAAM,qBAAqB,OAAO;AAAA,IACvE;AAAA;AAEF,SACE,qCAAC,iBAAD;AAAA,OACM;AAAA,IACJ,SAAS;AAAA,MACP,uBACE,qCAAC,iBAAD;AAAA,QACE,KAAI;AAAA,QACJ,UACG,CAAC,KAAK,eAAe,CAAC,KAAK,aAC5B,KAAK,YACL,KAAK;AAAA,QAEP,SAAS;AAAA;AAAA,MAGb,oBAAoB,UAClB,qCAAC,cAAD;AAAA,QACE,KAAI;AAAA,QACJ,UAAU,KAAK;AAAA,QACf,SAAS;AAAA,QACT,eAAY;AAAA;AAAA;AAAA,IAIlB;AAAA,IACA;AAAA;AAAA;AAMN,IAAO,gCAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import React2 from "react";
|
|
3
|
-
import { DSButton } from "@elliemae/ds-button";
|
|
4
|
-
import { ShuttleListPanel as Wrapper } from "../classedComponents";
|
|
5
|
-
function ShuttleListPanel({ onClick = () => null, open = false, children }) {
|
|
6
|
-
return /* @__PURE__ */ React2.createElement(Wrapper, {
|
|
7
|
-
classProps: { open }
|
|
8
|
-
}, /* @__PURE__ */ React2.createElement(DSButton, {
|
|
9
|
-
buttonType: "text",
|
|
10
|
-
icon: children,
|
|
11
|
-
onClick,
|
|
12
|
-
"data-testid": "list-panel-btn"
|
|
13
|
-
}));
|
|
14
|
-
}
|
|
15
|
-
var ShuttleListPanel_default = ShuttleListPanel;
|
|
16
|
-
export {
|
|
17
|
-
ShuttleListPanel,
|
|
18
|
-
ShuttleListPanel_default as default
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=ShuttleListPanel.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/ShuttleListPanel.tsx"],
|
|
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;ACAA;AACA;AACA;AAEA,0BAA0B,EAAE,UAAU,MAAM,MAAM,OAAO,OAAO,YAAY;AAC1E,SACE,qCAAC,SAAD;AAAA,IAAS,YAAY,EAAE;AAAA,KACrB,qCAAC,UAAD;AAAA,IAAU,YAAW;AAAA,IAAO,MAAM;AAAA,IAAU;AAAA,IAAkB,eAAY;AAAA;AAAA;AAMhF,IAAO,2BAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import React2, { Component } from "react";
|
|
3
|
-
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
4
|
-
import { debounce } from "@elliemae/ds-utilities";
|
|
5
|
-
import { DSTextBox } from "@elliemae/ds-form";
|
|
6
|
-
const blockName = "shuttle-search-box";
|
|
7
|
-
const SearchBoxContainer = aggregatedClasses("div")(blockName, null, ({ isOpen }) => ({ opened: isOpen }));
|
|
8
|
-
const filterList = debounce((term, onFilterCallback) => {
|
|
9
|
-
onFilterCallback(term);
|
|
10
|
-
}, 200);
|
|
11
|
-
class ShuttleSearchBox extends Component {
|
|
12
|
-
constructor(props) {
|
|
13
|
-
super(props);
|
|
14
|
-
this.state = {
|
|
15
|
-
value: props.value,
|
|
16
|
-
prevProps: {}
|
|
17
|
-
};
|
|
18
|
-
this.handleKeyPress = this.handleKeyPress.bind(this);
|
|
19
|
-
this.handleChange = this.handleChange.bind(this);
|
|
20
|
-
}
|
|
21
|
-
static getDerivedStateFromProps(nextProps, { prevProps }) {
|
|
22
|
-
const { value } = nextProps;
|
|
23
|
-
if (value !== prevProps.value) {
|
|
24
|
-
return {
|
|
25
|
-
value,
|
|
26
|
-
prevProps: { value }
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
return null;
|
|
30
|
-
}
|
|
31
|
-
handleChange(e) {
|
|
32
|
-
const { onChange, filterOnKeyStroke, onFilter } = this.props;
|
|
33
|
-
const { value } = e.target;
|
|
34
|
-
onChange(value);
|
|
35
|
-
if (filterOnKeyStroke)
|
|
36
|
-
filterList(value, onFilter);
|
|
37
|
-
this.setState({ value });
|
|
38
|
-
}
|
|
39
|
-
handleKeyPress(e) {
|
|
40
|
-
const { onFilter } = this.props;
|
|
41
|
-
if (e.keyCode === 13)
|
|
42
|
-
onFilter(e.target.value);
|
|
43
|
-
}
|
|
44
|
-
render() {
|
|
45
|
-
const { value } = this.state;
|
|
46
|
-
const { isOpen, onClose, placeholder } = this.props;
|
|
47
|
-
return /* @__PURE__ */ React2.createElement(SearchBoxContainer, {
|
|
48
|
-
classProps: { isOpen }
|
|
49
|
-
}, /* @__PURE__ */ React2.createElement(DSTextBox, {
|
|
50
|
-
autoFocus: true,
|
|
51
|
-
clearable: true,
|
|
52
|
-
onChange: this.handleChange,
|
|
53
|
-
onClear: onClose,
|
|
54
|
-
onKeyDown: this.handleKeyPress,
|
|
55
|
-
placeholder,
|
|
56
|
-
value
|
|
57
|
-
}));
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
ShuttleSearchBox.defaultProps = {
|
|
61
|
-
filterOnKeyStroke: false,
|
|
62
|
-
onChange: () => null,
|
|
63
|
-
onFilter: () => null
|
|
64
|
-
};
|
|
65
|
-
var ShuttleSearchBox_default = ShuttleSearchBox;
|
|
66
|
-
export {
|
|
67
|
-
ShuttleSearchBox,
|
|
68
|
-
ShuttleSearchBox_default as default
|
|
69
|
-
};
|
|
70
|
-
//# sourceMappingURL=ShuttleSearchBox.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/ShuttleSearchBox.tsx"],
|
|
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;ACCA;AACA;AACA;AACA;AAEA,MAAM,YAAY;AAElB,MAAM,qBAAqB,kBAAkB,OAAO,WAAW,MAAM,CAAC,EAAE,aAAc,GAAE,QAAQ;AAEhG,MAAM,aAAa,SAAS,CAAC,MAAM,qBAAqB;AACtD,mBAAiB;AAAA,GAChB;AAEH,+BAA+B,UAAU;AAAA,EAOvC,YAAY,OAAO;AACjB,UAAM;AACN,SAAK,QAAQ;AAAA,MACX,OAAO,MAAM;AAAA,MACb,WAAW;AAAA;AAEb,SAAK,iBAAiB,KAAK,eAAe,KAAK;AAC/C,SAAK,eAAe,KAAK,aAAa,KAAK;AAAA;AAAA,SAGtC,yBAAyB,WAAW,EAAE,aAAa;AACxD,UAAM,EAAE,UAAU;AAClB,QAAI,UAAU,UAAU,OAAO;AAC7B,aAAO;AAAA,QACL;AAAA,QACA,WAAW,EAAE;AAAA;AAAA;AAGjB,WAAO;AAAA;AAAA,EAGT,aAAa,GAAG;AACd,UAAM,EAAE,UAAU,mBAAmB,aAAa,KAAK;AACvD,UAAM,EAAE,UAAU,EAAE;AACpB,aAAS;AACT,QAAI;AAAmB,iBAAW,OAAO;AACzC,SAAK,SAAS,EAAE;AAAA;AAAA,EAGlB,eAAe,GAAG;AAChB,UAAM,EAAE,aAAa,KAAK;AAC1B,QAAI,EAAE,YAAY;AAAI,eAAS,EAAE,OAAO;AAAA;AAAA,EAG1C,SAAS;AACP,UAAM,EAAE,UAAU,KAAK;AACvB,UAAM,EAAE,QAAQ,SAAS,gBAAgB,KAAK;AAC9C,WACE,qCAAC,oBAAD;AAAA,MAAoB,YAAY,EAAE;AAAA,OAChC,qCAAC,WAAD;AAAA,MACE,WAAS;AAAA,MACT,WAAS;AAAA,MACT,UAAU,KAAK;AAAA,MACf,SAAS;AAAA,MACT,WAAW,KAAK;AAAA,MAChB;AAAA,MACA;AAAA;AAAA;AAAA;AApDD,AADT,iBACS,eAAe;AAAA,EACpB,mBAAmB;AAAA,EACnB,UAAU,MAAM;AAAA,EAChB,UAAU,MAAM;AAAA;AAyDpB,IAAO,2BAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|