flow-lib-creomnia 1.0.15 → 1.0.16-dev.1
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/lib/modules/node/components/ChoiseNode/index.js +1 -1
- package/lib/modules/node/components/ChoiseNode/styled.d.ts +3 -16
- package/lib/modules/node/components/ChoiseNode/styled.js +22 -14
- package/lib/modules/node/contexts/SettingsContext/index.js +3 -3
- package/lib/modules/node/types/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -40,6 +40,6 @@ const ChoiceNode = ({ nodeData, isProcessed, isFailed, failedNodeColor }) => {
|
|
|
40
40
|
});
|
|
41
41
|
const ChoiceNodeImg = (0, react_1.useMemo)(() => (0, styled_1.createChoiceNodeImg)(), [color, node?.id, nodeData?.id]);
|
|
42
42
|
const AnimatedChoiceNodeImg = (0, web_1.animated)(ChoiceNodeImg);
|
|
43
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(AnimatedChoiceNodeImg, { src: ChoiceNodeIcon_svg_1.default, style: props }), (0, jsx_runtime_1.jsx)(styled_1.Container, { onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), onClick: onNodeClick, children: (0, jsx_runtime_1.jsxs)(
|
|
43
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(AnimatedChoiceNodeImg, { src: ChoiceNodeIcon_svg_1.default, style: props }), (0, jsx_runtime_1.jsx)(styled_1.Container, { onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), onClick: onNodeClick, children: (0, jsx_runtime_1.jsxs)(styled_1.ContentRow, { children: [(0, jsx_runtime_1.jsx)(styled_1.ArrowImg, { src: LeftArrowIcon_svg_1.default, alt: "leftArrow" }), (0, jsx_runtime_1.jsx)(styled_1.NameGreed, { children: (0, jsx_runtime_1.jsx)(styled_1.NameText, { children: nodeData?.name || nodeData?.nodeType }) }), (0, jsx_runtime_1.jsx)(styled_1.ArrowImg, { src: RightArrowIcon_svg_1.default, alt: "RightArrow" })] }) })] }));
|
|
44
44
|
};
|
|
45
45
|
exports.default = ChoiceNode;
|
|
@@ -1,20 +1,7 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
2
|
export declare const Container: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/system").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
3
|
+
export declare const ContentRow: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/system").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
3
4
|
export declare const createChoiceNodeImg: () => FC<any>;
|
|
4
|
-
export declare const NameGreed: import("@emotion/styled").StyledComponent<import("@mui/system").
|
|
5
|
-
|
|
6
|
-
classes?: Partial<import("@mui/material").GridClasses> | undefined;
|
|
7
|
-
columns?: import("@mui/system").ResponsiveStyleValue<number> | undefined;
|
|
8
|
-
columnSpacing?: import("@mui/system").ResponsiveStyleValue<import("@mui/material").GridSpacing> | undefined;
|
|
9
|
-
container?: boolean | undefined;
|
|
10
|
-
direction?: import("@mui/system").ResponsiveStyleValue<import("@mui/material").GridDirection> | undefined;
|
|
11
|
-
item?: boolean | undefined;
|
|
12
|
-
rowSpacing?: import("@mui/system").ResponsiveStyleValue<import("@mui/material").GridSpacing> | undefined;
|
|
13
|
-
spacing?: import("@mui/system").ResponsiveStyleValue<import("@mui/material").GridSpacing> | undefined;
|
|
14
|
-
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
15
|
-
wrap?: import("@mui/material").GridWrap | undefined;
|
|
16
|
-
zeroMinWidth?: boolean | undefined;
|
|
17
|
-
} & import("@mui/material").RegularBreakpoints & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
18
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
19
|
-
}, "item" | "columns" | "container" | "direction" | "children" | "wrap" | "spacing" | ("flex" | "height" | "width" | "left" | "top" | "alignContent" | "alignItems" | "alignSelf" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "bottom" | "boxShadow" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gap" | "gridArea" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridColumn" | "gridRow" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "letterSpacing" | "lineHeight" | "margin" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "overflow" | "padding" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "visibility" | "whiteSpace" | "zIndex" | "p" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "sx" | "columnSpacing" | "rowSpacing" | keyof import("@mui/material/OverridableComponent").CommonProps | "zeroMinWidth" | keyof import("@mui/material").RegularBreakpoints> & import("@mui/system").MUIStyledCommonProps<import("@mui/system").Theme>, {}, {}>;
|
|
5
|
+
export declare const NameGreed: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/system").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
+
export declare const NameText: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/system").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
20
7
|
export declare const ArrowImg: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/system").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ArrowImg = exports.NameGreed = exports.createChoiceNodeImg = exports.Container = void 0;
|
|
3
|
+
exports.ArrowImg = exports.NameText = exports.NameGreed = exports.createChoiceNodeImg = exports.ContentRow = exports.Container = void 0;
|
|
4
4
|
const config_1 = require("../../../../config");
|
|
5
|
-
const material_1 = require("@mui/material");
|
|
6
5
|
const system_1 = require("@mui/system");
|
|
7
6
|
const react_svg_1 = require("react-svg");
|
|
8
7
|
exports.Container = (0, system_1.styled)('div') `
|
|
9
|
-
width:
|
|
10
|
-
max-width: 376px;
|
|
8
|
+
min-width: 300px;
|
|
11
9
|
height: ${config_1.Config.NODE_HEIGHT}px;
|
|
12
10
|
cursor: pointer;
|
|
13
11
|
display: flex;
|
|
14
|
-
flex-direction: row;
|
|
15
12
|
align-items: center;
|
|
16
|
-
|
|
17
|
-
padding: 0 32px;
|
|
13
|
+
position: relative;
|
|
18
14
|
z-index: 1000;
|
|
19
15
|
`;
|
|
16
|
+
exports.ContentRow = (0, system_1.styled)('div') `
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: 100%;
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: space-between;
|
|
22
|
+
flex-wrap: nowrap;
|
|
23
|
+
`;
|
|
20
24
|
const createChoiceNodeImg = () => (0, system_1.styled)(react_svg_1.ReactSVG) `
|
|
21
25
|
top: -23px;
|
|
22
26
|
position: absolute;
|
|
@@ -28,22 +32,26 @@ const createChoiceNodeImg = () => (0, system_1.styled)(react_svg_1.ReactSVG) `
|
|
|
28
32
|
}
|
|
29
33
|
`;
|
|
30
34
|
exports.createChoiceNodeImg = createChoiceNodeImg;
|
|
31
|
-
exports.NameGreed = (0, system_1.styled)(
|
|
32
|
-
display:
|
|
35
|
+
exports.NameGreed = (0, system_1.styled)('div') `
|
|
36
|
+
display: flex;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
align-items: center;
|
|
33
39
|
min-width: 0;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
40
|
+
flex: 1 1 auto;
|
|
41
|
+
`;
|
|
42
|
+
exports.NameText = (0, system_1.styled)('span') `
|
|
43
|
+
display: block;
|
|
44
|
+
max-width: 80%;
|
|
38
45
|
overflow: hidden;
|
|
39
46
|
text-overflow: ellipsis;
|
|
40
47
|
white-space: nowrap;
|
|
41
48
|
font-size: 16px;
|
|
42
49
|
font-weight: 700;
|
|
50
|
+
line-height: 1.2;
|
|
51
|
+
text-align: left;
|
|
43
52
|
color: ${props => `${props.theme.palette.text.primary}`};
|
|
44
53
|
font-family: Inter, 'circular', serif;;
|
|
45
54
|
`;
|
|
46
55
|
exports.ArrowImg = (0, system_1.styled)('img') `
|
|
47
|
-
margin-top: 5px;
|
|
48
56
|
flex-shrink: 0;
|
|
49
57
|
`;
|
|
@@ -47,9 +47,9 @@ const NodeSettingsProvider = ({ children, permissions: { canUpdate, canDelete },
|
|
|
47
47
|
setInternalNodeBase(null);
|
|
48
48
|
}, config_1.Config.CLEAR_NODE_DELAY);
|
|
49
49
|
};
|
|
50
|
-
const onSaveNode =
|
|
51
|
-
const result =
|
|
52
|
-
if (result
|
|
50
|
+
const onSaveNode = () => {
|
|
51
|
+
const result = node?.settings?.footer?.onSave?.(node?.id);
|
|
52
|
+
if (result === false)
|
|
53
53
|
return;
|
|
54
54
|
handleClose();
|
|
55
55
|
};
|
|
@@ -5,7 +5,7 @@ export type NodesFooterType = {
|
|
|
5
5
|
saveText?: string;
|
|
6
6
|
cancelText?: string;
|
|
7
7
|
deleteText?: string;
|
|
8
|
-
onSave?: (nodeId: string) => void |
|
|
8
|
+
onSave?: (nodeId: string) => void | false;
|
|
9
9
|
onCancel?: (nodeId: string) => void;
|
|
10
10
|
onDelete?: (nodeId: string) => void;
|
|
11
11
|
};
|