@hitachivantara/uikit-react-lab 6.1.9 → 6.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Blade/Blade.js +134 -173
- package/dist/Blade/Blade.styles.js +54 -69
- package/dist/Blades/Blades.js +70 -101
- package/dist/Blades/Blades.styles.js +7 -10
- package/dist/Dashboard/Dashboard.js +57 -60
- package/dist/Dashboard/Dashboard.styles.js +6 -10
- package/dist/Flow/Background/Background.js +10 -16
- package/dist/Flow/Controls/Controls.js +77 -91
- package/dist/Flow/DroppableFlow.js +135 -200
- package/dist/Flow/Empty/Empty.js +12 -9
- package/dist/Flow/Empty/Empty.styles.js +12 -15
- package/dist/Flow/Flow.js +28 -30
- package/dist/Flow/Flow.styles.js +12 -18
- package/dist/Flow/FlowContext/FlowContext.js +22 -23
- package/dist/Flow/FlowContext/NodeMetaContext.js +36 -39
- package/dist/Flow/Minimap/Minimap.js +15 -28
- package/dist/Flow/Minimap/Minimap.styles.js +4 -9
- package/dist/Flow/Node/BaseNode.js +144 -190
- package/dist/Flow/Node/BaseNode.styles.js +122 -133
- package/dist/Flow/Node/Node.js +90 -108
- package/dist/Flow/Node/Node.styles.js +30 -40
- package/dist/Flow/Node/Parameters/ParamRenderer.js +17 -14
- package/dist/Flow/Node/Parameters/Select.js +33 -38
- package/dist/Flow/Node/Parameters/Slider.js +27 -29
- package/dist/Flow/Node/Parameters/Text.js +17 -17
- package/dist/Flow/Node/utils.js +44 -49
- package/dist/Flow/Sidebar/Sidebar.js +115 -137
- package/dist/Flow/Sidebar/Sidebar.styles.js +21 -22
- package/dist/Flow/Sidebar/SidebarGroup/SidebarGroup.js +57 -60
- package/dist/Flow/Sidebar/SidebarGroup/SidebarGroup.styles.js +27 -33
- package/dist/Flow/Sidebar/SidebarGroup/SidebarGroupItem/DraggableSidebarGroupItem.js +27 -47
- package/dist/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.js +14 -32
- package/dist/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.styles.js +17 -23
- package/dist/Flow/base.js +5 -5
- package/dist/Flow/hooks/useFlowContext.js +5 -5
- package/dist/Flow/hooks/useFlowInstance.js +5 -4
- package/dist/Flow/hooks/useFlowNode.js +92 -113
- package/dist/Flow/hooks/useFlowNodeMeta.js +7 -7
- package/dist/Flow/hooks/useNode.js +136 -154
- package/dist/Flow/hooks/useNodeId.js +8 -7
- package/dist/Flow/nodes/DashboardNode.js +64 -86
- package/dist/Flow/nodes/DashboardNode.styles.js +8 -14
- package/dist/Flow/nodes/StickyNode.js +370 -435
- package/dist/StepNavigation/DefaultNavigation/DefaultNavigation.js +36 -52
- package/dist/StepNavigation/DefaultNavigation/Step/Step.js +40 -51
- package/dist/StepNavigation/DefaultNavigation/Step/Step.styles.js +22 -33
- package/dist/StepNavigation/DefaultNavigation/utils.js +38 -30
- package/dist/StepNavigation/SimpleNavigation/Dot/Dot.js +24 -41
- package/dist/StepNavigation/SimpleNavigation/Dot/Dot.styles.js +13 -16
- package/dist/StepNavigation/SimpleNavigation/SimpleNavigation.js +35 -47
- package/dist/StepNavigation/SimpleNavigation/utils.js +10 -11
- package/dist/StepNavigation/StepNavigation.js +136 -179
- package/dist/StepNavigation/StepNavigation.styles.js +29 -32
- package/dist/Wizard/Wizard.js +81 -104
- package/dist/Wizard/Wizard.styles.js +4 -7
- package/dist/Wizard/WizardActions/WizardActions.js +111 -131
- package/dist/Wizard/WizardActions/WizardActions.styles.js +19 -20
- package/dist/Wizard/WizardContainer/WizardContainer.js +19 -28
- package/dist/Wizard/WizardContainer/WizardContainer.styles.js +8 -14
- package/dist/Wizard/WizardContent/WizardContent.js +103 -120
- package/dist/Wizard/WizardContent/WizardContent.styles.js +33 -36
- package/dist/Wizard/WizardContext/WizardContext.js +10 -13
- package/dist/Wizard/WizardTitle/WizardTitle.js +74 -79
- package/dist/Wizard/WizardTitle/WizardTitle.styles.js +12 -15
- package/dist/index.d.ts +1 -1
- package/dist/index.js +30 -81
- package/package.json +6 -6
- package/dist/StepNavigation/utils.js +0 -8
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { createClasses, theme } from "@hitachivantara/uikit-react-core";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
});
|
|
7
|
-
export {
|
|
8
|
-
staticClasses,
|
|
9
|
-
useClasses
|
|
10
|
-
};
|
|
2
|
+
//#region src/Flow/Minimap/Minimap.styles.tsx
|
|
3
|
+
var { staticClasses, useClasses } = createClasses("HvFlowMinimap", { root: { "&.react-flow__minimap": { backgroundColor: theme.colors.bgPage } } });
|
|
4
|
+
//#endregion
|
|
5
|
+
export { staticClasses, useClasses };
|
|
@@ -1,193 +1,147 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { NodeToolbar, Handle, Position } from "reactflow";
|
|
3
|
-
import { useLabels, HvIconButton, HvTypography } from "@hitachivantara/uikit-react-core";
|
|
4
|
-
import { mergeStyles } from "@hitachivantara/uikit-react-utils";
|
|
5
|
-
import { useClasses } from "./BaseNode.styles.js";
|
|
6
|
-
import { staticClasses } from "./BaseNode.styles.js";
|
|
7
|
-
import { renderedIcon, isInputGroup, isOutputGroup, isConnected } from "./utils.js";
|
|
1
|
+
import { isConnected, isInputGroup, isOutputGroup, renderedIcon } from "./utils.js";
|
|
8
2
|
import { useHvNode } from "../hooks/useNode.js";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
color: colorProp,
|
|
21
|
-
inputs: inputsProp,
|
|
22
|
-
outputs: outputsProp,
|
|
23
|
-
nodeActions: nodeActionsProp,
|
|
24
|
-
footer,
|
|
25
|
-
classes: classesProp,
|
|
26
|
-
labels: labelsProp,
|
|
27
|
-
className,
|
|
28
|
-
children
|
|
29
|
-
}) => {
|
|
30
|
-
const {
|
|
31
|
-
toggleShowActions,
|
|
32
|
-
getNodeToolbarProps,
|
|
33
|
-
handleDefaultAction,
|
|
34
|
-
nodeActions,
|
|
35
|
-
title,
|
|
36
|
-
icon,
|
|
37
|
-
color,
|
|
38
|
-
iconColor,
|
|
39
|
-
inputEdges,
|
|
40
|
-
inputs,
|
|
41
|
-
outputEdges,
|
|
42
|
-
outputs,
|
|
43
|
-
node
|
|
44
|
-
} = useHvNode({
|
|
45
|
-
id,
|
|
46
|
-
title: titleProp,
|
|
47
|
-
inputs: inputsProp,
|
|
48
|
-
outputs: outputsProp,
|
|
49
|
-
icon: iconProp,
|
|
50
|
-
color: colorProp,
|
|
51
|
-
labels: labelsProp,
|
|
52
|
-
nodeActions: nodeActionsProp
|
|
53
|
-
});
|
|
54
|
-
const labels = useLabels(DEFAULT_LABELS, labelsProp);
|
|
55
|
-
const { classes, cx } = useClasses(classesProp);
|
|
56
|
-
const renderOutput = (output) => {
|
|
57
|
-
const edgeConnected = isConnected(id, "source", output.id, outputEdges);
|
|
58
|
-
return /* @__PURE__ */ jsxs("div", { className: classes.outputContainer, children: [
|
|
59
|
-
/* @__PURE__ */ jsx(
|
|
60
|
-
Handle,
|
|
61
|
-
{
|
|
62
|
-
type: "source",
|
|
63
|
-
isConnectableEnd: false,
|
|
64
|
-
id: output.id,
|
|
65
|
-
position: Position.Right,
|
|
66
|
-
className: cx(classes.handle, {
|
|
67
|
-
[classes.handleConnected]: edgeConnected
|
|
68
|
-
})
|
|
69
|
-
}
|
|
70
|
-
),
|
|
71
|
-
output.isMandatory && !edgeConnected && /* @__PURE__ */ jsx("div", { className: classes.mandatory }),
|
|
72
|
-
/* @__PURE__ */ jsx(HvTypography, { component: "div", children: output.label })
|
|
73
|
-
] }, output.id);
|
|
74
|
-
};
|
|
75
|
-
const renderInput = (input) => {
|
|
76
|
-
const edgeConnected = isConnected(id, "target", input.id, inputEdges);
|
|
77
|
-
return /* @__PURE__ */ jsxs("div", { className: classes.inputContainer, children: [
|
|
78
|
-
/* @__PURE__ */ jsx(
|
|
79
|
-
Handle,
|
|
80
|
-
{
|
|
81
|
-
type: "target",
|
|
82
|
-
isConnectableStart: false,
|
|
83
|
-
id: input.id,
|
|
84
|
-
position: Position.Left,
|
|
85
|
-
className: cx(classes.handle, {
|
|
86
|
-
[classes.handleConnected]: edgeConnected
|
|
87
|
-
})
|
|
88
|
-
}
|
|
89
|
-
),
|
|
90
|
-
/* @__PURE__ */ jsx(HvTypography, { component: "div", children: input.label }),
|
|
91
|
-
input.isMandatory && !edgeConnected && /* @__PURE__ */ jsx("div", { className: classes.mandatory })
|
|
92
|
-
] }, input.id);
|
|
93
|
-
};
|
|
94
|
-
if (!node) return null;
|
|
95
|
-
return /* @__PURE__ */ jsxs(
|
|
96
|
-
"div",
|
|
97
|
-
{
|
|
98
|
-
style: mergeStyles(void 0, {
|
|
99
|
-
"--node-color": color
|
|
100
|
-
}),
|
|
101
|
-
className: cx(
|
|
102
|
-
"nowheel",
|
|
103
|
-
// Disables the default canvas pan behaviour when scrolling inside the node
|
|
104
|
-
classes.root,
|
|
105
|
-
className
|
|
106
|
-
),
|
|
107
|
-
onMouseEnter: toggleShowActions,
|
|
108
|
-
onMouseLeave: toggleShowActions,
|
|
109
|
-
children: [
|
|
110
|
-
/* @__PURE__ */ jsx(NodeToolbar, { ...getNodeToolbarProps(), children: nodeActions?.map((action) => /* @__PURE__ */ jsx(
|
|
111
|
-
HvIconButton,
|
|
112
|
-
{
|
|
113
|
-
title: action.label,
|
|
114
|
-
onClick: () => handleDefaultAction(action),
|
|
115
|
-
children: renderedIcon(action.icon)
|
|
116
|
-
},
|
|
117
|
-
action.id
|
|
118
|
-
)) }),
|
|
119
|
-
/* @__PURE__ */ jsxs("div", { className: classes.headerContainer, children: [
|
|
120
|
-
/* @__PURE__ */ jsxs(
|
|
121
|
-
"div",
|
|
122
|
-
{
|
|
123
|
-
style: mergeStyles(void 0, {
|
|
124
|
-
"--icon-color": iconColor
|
|
125
|
-
}),
|
|
126
|
-
className: classes.titleContainer,
|
|
127
|
-
children: [
|
|
128
|
-
icon,
|
|
129
|
-
/* @__PURE__ */ jsx(
|
|
130
|
-
HvTypography,
|
|
131
|
-
{
|
|
132
|
-
component: "p",
|
|
133
|
-
variant: "title4",
|
|
134
|
-
className: classes.title,
|
|
135
|
-
children: title
|
|
136
|
-
}
|
|
137
|
-
)
|
|
138
|
-
]
|
|
139
|
-
}
|
|
140
|
-
),
|
|
141
|
-
headerItems && /* @__PURE__ */ jsx("div", { style: { display: "flex" }, children: headerItems })
|
|
142
|
-
] }),
|
|
143
|
-
children && /* @__PURE__ */ jsx("div", { className: classes.contentContainer, children }),
|
|
144
|
-
inputs && inputs.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
145
|
-
/* @__PURE__ */ jsx("div", { className: classes.inputsTitleContainer, children: /* @__PURE__ */ jsx(HvTypography, { children: labels?.inputsTitle }) }),
|
|
146
|
-
/* @__PURE__ */ jsx("div", { className: classes.inputsContainer, children: inputs?.map((input, idx) => {
|
|
147
|
-
if (!isInputGroup(input)) return renderInput(input);
|
|
148
|
-
return /* @__PURE__ */ jsxs(
|
|
149
|
-
"div",
|
|
150
|
-
{
|
|
151
|
-
className: classes.inputGroupContainer,
|
|
152
|
-
children: [
|
|
153
|
-
/* @__PURE__ */ jsx(HvTypography, { component: "div", variant: "label", children: input.label }),
|
|
154
|
-
input.inputs.map(
|
|
155
|
-
(inp) => renderInput(inp)
|
|
156
|
-
)
|
|
157
|
-
]
|
|
158
|
-
},
|
|
159
|
-
`group${idx}`
|
|
160
|
-
);
|
|
161
|
-
}) })
|
|
162
|
-
] }),
|
|
163
|
-
outputs && outputs.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
164
|
-
/* @__PURE__ */ jsx("div", { className: classes.outputsTitleContainer, children: /* @__PURE__ */ jsx(HvTypography, { children: labels?.outputsTitle }) }),
|
|
165
|
-
/* @__PURE__ */ jsx("div", { className: classes.outputsContainer, children: outputs?.map((output, idx) => {
|
|
166
|
-
if (!isOutputGroup(output)) {
|
|
167
|
-
return renderOutput(output);
|
|
168
|
-
}
|
|
169
|
-
return /* @__PURE__ */ jsxs(
|
|
170
|
-
"div",
|
|
171
|
-
{
|
|
172
|
-
className: classes.outputGroupContainer,
|
|
173
|
-
children: [
|
|
174
|
-
/* @__PURE__ */ jsx(HvTypography, { component: "div", variant: "label", children: output.label }),
|
|
175
|
-
output.outputs.map((out) => {
|
|
176
|
-
return renderOutput(out);
|
|
177
|
-
})
|
|
178
|
-
]
|
|
179
|
-
},
|
|
180
|
-
`group${idx}`
|
|
181
|
-
);
|
|
182
|
-
}) })
|
|
183
|
-
] }),
|
|
184
|
-
footer && /* @__PURE__ */ jsx("div", { className: classes.footerContainer, children: footer })
|
|
185
|
-
]
|
|
186
|
-
}
|
|
187
|
-
);
|
|
3
|
+
import { useClasses } from "./BaseNode.styles.js";
|
|
4
|
+
import { HvIconButton, HvTypography, useLabels } from "@hitachivantara/uikit-react-core";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Handle, NodeToolbar, Position } from "reactflow";
|
|
7
|
+
import { mergeStyles } from "@hitachivantara/uikit-react-utils";
|
|
8
|
+
//#region src/Flow/Node/BaseNode.tsx
|
|
9
|
+
var DEFAULT_LABELS = {
|
|
10
|
+
outputsTitle: "Outputs",
|
|
11
|
+
inputsTitle: "Inputs",
|
|
12
|
+
deleteActionLabel: "Delete",
|
|
13
|
+
duplicateActionLabel: "Duplicate"
|
|
188
14
|
};
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
15
|
+
var HvFlowBaseNode = ({ id, title: titleProp, headerItems, icon: iconProp, color: colorProp, inputs: inputsProp, outputs: outputsProp, nodeActions: nodeActionsProp, footer, classes: classesProp, labels: labelsProp, className, children }) => {
|
|
16
|
+
const { toggleShowActions, getNodeToolbarProps, handleDefaultAction, nodeActions, title, icon, color, iconColor, inputEdges, inputs, outputEdges, outputs, node } = useHvNode({
|
|
17
|
+
id,
|
|
18
|
+
title: titleProp,
|
|
19
|
+
inputs: inputsProp,
|
|
20
|
+
outputs: outputsProp,
|
|
21
|
+
icon: iconProp,
|
|
22
|
+
color: colorProp,
|
|
23
|
+
labels: labelsProp,
|
|
24
|
+
nodeActions: nodeActionsProp
|
|
25
|
+
});
|
|
26
|
+
const labels = useLabels(DEFAULT_LABELS, labelsProp);
|
|
27
|
+
const { classes, cx } = useClasses(classesProp);
|
|
28
|
+
const renderOutput = (output) => {
|
|
29
|
+
const edgeConnected = isConnected(id, "source", output.id, outputEdges);
|
|
30
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
31
|
+
className: classes.outputContainer,
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ jsx(Handle, {
|
|
34
|
+
type: "source",
|
|
35
|
+
isConnectableEnd: false,
|
|
36
|
+
id: output.id,
|
|
37
|
+
position: Position.Right,
|
|
38
|
+
className: cx(classes.handle, { [classes.handleConnected]: edgeConnected })
|
|
39
|
+
}),
|
|
40
|
+
output.isMandatory && !edgeConnected && /* @__PURE__ */ jsx("div", { className: classes.mandatory }),
|
|
41
|
+
/* @__PURE__ */ jsx(HvTypography, {
|
|
42
|
+
component: "div",
|
|
43
|
+
children: output.label
|
|
44
|
+
})
|
|
45
|
+
]
|
|
46
|
+
}, output.id);
|
|
47
|
+
};
|
|
48
|
+
const renderInput = (input) => {
|
|
49
|
+
const edgeConnected = isConnected(id, "target", input.id, inputEdges);
|
|
50
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
51
|
+
className: classes.inputContainer,
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ jsx(Handle, {
|
|
54
|
+
type: "target",
|
|
55
|
+
isConnectableStart: false,
|
|
56
|
+
id: input.id,
|
|
57
|
+
position: Position.Left,
|
|
58
|
+
className: cx(classes.handle, { [classes.handleConnected]: edgeConnected })
|
|
59
|
+
}),
|
|
60
|
+
/* @__PURE__ */ jsx(HvTypography, {
|
|
61
|
+
component: "div",
|
|
62
|
+
children: input.label
|
|
63
|
+
}),
|
|
64
|
+
input.isMandatory && !edgeConnected && /* @__PURE__ */ jsx("div", { className: classes.mandatory })
|
|
65
|
+
]
|
|
66
|
+
}, input.id);
|
|
67
|
+
};
|
|
68
|
+
if (!node) return null;
|
|
69
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
70
|
+
style: mergeStyles(void 0, { "--node-color": color }),
|
|
71
|
+
className: cx("nowheel", classes.root, className),
|
|
72
|
+
onMouseEnter: toggleShowActions,
|
|
73
|
+
onMouseLeave: toggleShowActions,
|
|
74
|
+
children: [
|
|
75
|
+
/* @__PURE__ */ jsx(NodeToolbar, {
|
|
76
|
+
...getNodeToolbarProps(),
|
|
77
|
+
children: nodeActions?.map((action) => /* @__PURE__ */ jsx(HvIconButton, {
|
|
78
|
+
title: action.label,
|
|
79
|
+
onClick: () => handleDefaultAction(action),
|
|
80
|
+
children: renderedIcon(action.icon)
|
|
81
|
+
}, action.id))
|
|
82
|
+
}),
|
|
83
|
+
/* @__PURE__ */ jsxs("div", {
|
|
84
|
+
className: classes.headerContainer,
|
|
85
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
86
|
+
style: mergeStyles(void 0, { "--icon-color": iconColor }),
|
|
87
|
+
className: classes.titleContainer,
|
|
88
|
+
children: [icon, /* @__PURE__ */ jsx(HvTypography, {
|
|
89
|
+
component: "p",
|
|
90
|
+
variant: "title4",
|
|
91
|
+
className: classes.title,
|
|
92
|
+
children: title
|
|
93
|
+
})]
|
|
94
|
+
}), headerItems && /* @__PURE__ */ jsx("div", {
|
|
95
|
+
style: { display: "flex" },
|
|
96
|
+
children: headerItems
|
|
97
|
+
})]
|
|
98
|
+
}),
|
|
99
|
+
children && /* @__PURE__ */ jsx("div", {
|
|
100
|
+
className: classes.contentContainer,
|
|
101
|
+
children
|
|
102
|
+
}),
|
|
103
|
+
inputs && inputs.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
|
|
104
|
+
className: classes.inputsTitleContainer,
|
|
105
|
+
children: /* @__PURE__ */ jsx(HvTypography, { children: labels?.inputsTitle })
|
|
106
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
107
|
+
className: classes.inputsContainer,
|
|
108
|
+
children: inputs?.map((input, idx) => {
|
|
109
|
+
if (!isInputGroup(input)) return renderInput(input);
|
|
110
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
111
|
+
className: classes.inputGroupContainer,
|
|
112
|
+
children: [/* @__PURE__ */ jsx(HvTypography, {
|
|
113
|
+
component: "div",
|
|
114
|
+
variant: "label",
|
|
115
|
+
children: input.label
|
|
116
|
+
}), input.inputs.map((inp) => renderInput(inp))]
|
|
117
|
+
}, `group${idx}`);
|
|
118
|
+
})
|
|
119
|
+
})] }),
|
|
120
|
+
outputs && outputs.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
|
|
121
|
+
className: classes.outputsTitleContainer,
|
|
122
|
+
children: /* @__PURE__ */ jsx(HvTypography, { children: labels?.outputsTitle })
|
|
123
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
124
|
+
className: classes.outputsContainer,
|
|
125
|
+
children: outputs?.map((output, idx) => {
|
|
126
|
+
if (!isOutputGroup(output)) return renderOutput(output);
|
|
127
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
128
|
+
className: classes.outputGroupContainer,
|
|
129
|
+
children: [/* @__PURE__ */ jsx(HvTypography, {
|
|
130
|
+
component: "div",
|
|
131
|
+
variant: "label",
|
|
132
|
+
children: output.label
|
|
133
|
+
}), output.outputs.map((out) => {
|
|
134
|
+
return renderOutput(out);
|
|
135
|
+
})]
|
|
136
|
+
}, `group${idx}`);
|
|
137
|
+
})
|
|
138
|
+
})] }),
|
|
139
|
+
footer && /* @__PURE__ */ jsx("div", {
|
|
140
|
+
className: classes.footerContainer,
|
|
141
|
+
children: footer
|
|
142
|
+
})
|
|
143
|
+
]
|
|
144
|
+
});
|
|
193
145
|
};
|
|
146
|
+
//#endregion
|
|
147
|
+
export { DEFAULT_LABELS, HvFlowBaseNode };
|
|
@@ -1,135 +1,124 @@
|
|
|
1
1
|
import { createClasses, theme } from "@hitachivantara/uikit-react-core";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
height: 10,
|
|
123
|
-
margin: theme.spacing(0, theme.space.xs),
|
|
124
|
-
borderRadius: theme.radii.full,
|
|
125
|
-
backgroundColor: theme.colors.negativeDimmed
|
|
126
|
-
},
|
|
127
|
-
footerContainer: {
|
|
128
|
-
padding: theme.space.sm,
|
|
129
|
-
borderTop: `1px solid ${theme.colors.borderSubtle}`
|
|
130
|
-
}
|
|
2
|
+
//#region src/Flow/Node/BaseNode.styles.tsx
|
|
3
|
+
var { staticClasses, useClasses } = createClasses("HvFlowBaseNode", {
|
|
4
|
+
root: {
|
|
5
|
+
borderRadius: theme.radii.round,
|
|
6
|
+
backgroundColor: theme.colors.bgContainer,
|
|
7
|
+
boxShadow: theme.colors.shadow,
|
|
8
|
+
minWidth: "250px",
|
|
9
|
+
border: "1px solid var(--node-color)"
|
|
10
|
+
},
|
|
11
|
+
headerContainer: {
|
|
12
|
+
padding: theme.spacing(.5, 1),
|
|
13
|
+
display: "flex",
|
|
14
|
+
flexDirection: "row",
|
|
15
|
+
justifyContent: "space-between",
|
|
16
|
+
alignItems: "center",
|
|
17
|
+
borderTopLeftRadius: "inherit",
|
|
18
|
+
borderTopRightRadius: "inherit",
|
|
19
|
+
backgroundColor: "var(--node-color)"
|
|
20
|
+
},
|
|
21
|
+
titleContainer: {
|
|
22
|
+
display: "flex",
|
|
23
|
+
flexDirection: "row",
|
|
24
|
+
alignItems: "center",
|
|
25
|
+
"& svg *.color0": { fill: "var(--icon-color)" }
|
|
26
|
+
},
|
|
27
|
+
title: { color: theme.colors.textDark },
|
|
28
|
+
inputsTitleContainer: {
|
|
29
|
+
display: "flex",
|
|
30
|
+
justifyContent: "center",
|
|
31
|
+
padding: theme.space.xs,
|
|
32
|
+
backgroundColor: theme.colors.bgPage,
|
|
33
|
+
borderTop: `1px solid ${theme.colors.borderSubtle}`,
|
|
34
|
+
borderBottom: `1px solid ${theme.colors.borderSubtle}`
|
|
35
|
+
},
|
|
36
|
+
outputsTitleContainer: {
|
|
37
|
+
display: "flex",
|
|
38
|
+
justifyContent: "center",
|
|
39
|
+
padding: theme.space.xs,
|
|
40
|
+
backgroundColor: theme.colors.bgPage,
|
|
41
|
+
borderTop: `1px solid ${theme.colors.borderSubtle}`,
|
|
42
|
+
borderBottom: `1px solid ${theme.colors.borderSubtle}`
|
|
43
|
+
},
|
|
44
|
+
contentContainer: {},
|
|
45
|
+
inputsContainer: {
|
|
46
|
+
display: "flex",
|
|
47
|
+
flexDirection: "column",
|
|
48
|
+
padding: theme.space.sm,
|
|
49
|
+
gap: theme.space.xs,
|
|
50
|
+
alignItems: "flex-start"
|
|
51
|
+
},
|
|
52
|
+
outputsContainer: {
|
|
53
|
+
display: "flex",
|
|
54
|
+
flexDirection: "column",
|
|
55
|
+
padding: theme.space.sm,
|
|
56
|
+
gap: theme.space.xs,
|
|
57
|
+
alignItems: "flex-end"
|
|
58
|
+
},
|
|
59
|
+
inputGroupContainer: {
|
|
60
|
+
display: "flex",
|
|
61
|
+
flexDirection: "column",
|
|
62
|
+
gap: theme.space.xs,
|
|
63
|
+
alignItems: "flex-start"
|
|
64
|
+
},
|
|
65
|
+
outputGroupContainer: {
|
|
66
|
+
display: "flex",
|
|
67
|
+
flexDirection: "column",
|
|
68
|
+
gap: theme.space.xs,
|
|
69
|
+
alignItems: "flex-end"
|
|
70
|
+
},
|
|
71
|
+
inputContainer: {
|
|
72
|
+
display: "flex",
|
|
73
|
+
flexDirection: "row",
|
|
74
|
+
alignItems: "center",
|
|
75
|
+
position: "relative"
|
|
76
|
+
},
|
|
77
|
+
outputContainer: {
|
|
78
|
+
display: "flex",
|
|
79
|
+
flexDirection: "row",
|
|
80
|
+
alignItems: "center",
|
|
81
|
+
position: "relative"
|
|
82
|
+
},
|
|
83
|
+
handle: {
|
|
84
|
+
zIndex: theme.zIndices.overlay,
|
|
85
|
+
marginLeft: 2,
|
|
86
|
+
backgroundColor: theme.colors.bgContainer,
|
|
87
|
+
height: 10,
|
|
88
|
+
width: 10,
|
|
89
|
+
border: `1px solid ${theme.colors.textDisabled}`,
|
|
90
|
+
"&.react-flow__handle-left": { left: -23 },
|
|
91
|
+
"&.react-flow__handle-right": { right: -21 },
|
|
92
|
+
"&.react-flow__handle-connecting": { backgroundColor: theme.colors.negativeDimmed },
|
|
93
|
+
"&.react-flow__handle-valid": { backgroundColor: theme.colors.positiveDimmed },
|
|
94
|
+
"::before": {
|
|
95
|
+
fontSize: 14,
|
|
96
|
+
color: theme.colors.textDisabled,
|
|
97
|
+
content: "\"+\"",
|
|
98
|
+
marginTop: -7,
|
|
99
|
+
position: "absolute"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
handleConnected: {
|
|
103
|
+
backgroundColor: theme.colors.textDisabled,
|
|
104
|
+
width: 8,
|
|
105
|
+
height: 8,
|
|
106
|
+
"::before": {
|
|
107
|
+
fontSize: 11,
|
|
108
|
+
marginTop: -8
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
mandatory: {
|
|
112
|
+
width: 10,
|
|
113
|
+
height: 10,
|
|
114
|
+
margin: theme.spacing(0, theme.space.xs),
|
|
115
|
+
borderRadius: theme.radii.full,
|
|
116
|
+
backgroundColor: theme.colors.negativeDimmed
|
|
117
|
+
},
|
|
118
|
+
footerContainer: {
|
|
119
|
+
padding: theme.space.sm,
|
|
120
|
+
borderTop: `1px solid ${theme.colors.borderSubtle}`
|
|
121
|
+
}
|
|
131
122
|
});
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
useClasses
|
|
135
|
-
};
|
|
123
|
+
//#endregion
|
|
124
|
+
export { staticClasses, useClasses };
|