@knime/product-features 1.1.3 → 1.2.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/CHANGELOG.md +21 -0
- package/dist/dataTransfer.js +8 -116
- package/dist/dataTransfer.js.map +1 -1
- package/dist/index-B3ql6hun.js +2695 -0
- package/dist/index-B3ql6hun.js.map +1 -0
- package/dist/nodes.css +119 -0
- package/dist/nodes.js +270 -101
- package/dist/nodes.js.map +1 -1
- package/dist/rfcErrors.js +1 -1
- package/dist/src/dataTransfer/shared/ui/CollapsiblePanel/index.d.ts +1 -1
- package/dist/src/dataTransfer/shared/ui/CollapsiblePanel/index.d.ts.map +1 -1
- package/dist/src/dataTransfer/shared/ui/ProgressItem/index.d.ts +1 -1
- package/dist/src/dataTransfer/shared/ui/ProgressItem/index.d.ts.map +1 -1
- package/dist/src/nodes/NodePreview/NodePreview.vue.d.ts +4 -0
- package/dist/src/nodes/NodePreview/NodePreview.vue.d.ts.map +1 -0
- package/dist/src/nodes/NodePreview/SVGNodeTorso.vue.d.ts +4 -0
- package/dist/src/nodes/NodePreview/SVGNodeTorso.vue.d.ts.map +1 -0
- package/dist/src/nodes/NodePreview/constants.d.ts +2 -0
- package/dist/src/nodes/NodePreview/constants.d.ts.map +1 -0
- package/dist/src/nodes/NodePreview/enums.d.ts +27 -0
- package/dist/src/nodes/NodePreview/enums.d.ts.map +1 -0
- package/dist/src/nodes/NodePreview/index.d.ts +3 -0
- package/dist/src/nodes/NodePreview/index.d.ts.map +1 -0
- package/dist/src/nodes/NodePreview/types.d.ts +68 -0
- package/dist/src/nodes/NodePreview/types.d.ts.map +1 -0
- package/dist/src/nodes/PortIcon/PortIcon.vue.d.ts.map +1 -1
- package/dist/src/nodes/PortIcon/SVGPortIcon.vue.d.ts +4 -0
- package/dist/src/nodes/PortIcon/SVGPortIcon.vue.d.ts.map +1 -0
- package/dist/src/nodes/PortIcon/constants.d.ts +3 -0
- package/dist/src/nodes/PortIcon/constants.d.ts.map +1 -0
- package/dist/src/nodes/index.d.ts +2 -0
- package/dist/src/nodes/index.d.ts.map +1 -1
- package/dist/src/versions/VersionHistory/VersionLabel.vue.d.ts +6 -4
- package/dist/src/versions/VersionHistory/VersionLabel.vue.d.ts.map +1 -1
- package/dist/toasts.js +2 -9
- package/dist/toasts.js.map +1 -1
- package/dist/versions.js +1 -1
- package/package.json +8 -8
- package/dist/format-ra_vlnN7.js +0 -238
- package/dist/format-ra_vlnN7.js.map +0 -1
package/dist/nodes.css
CHANGED
|
@@ -15,6 +15,43 @@
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
[data-type="flowVariable"] {
|
|
19
|
+
&[data-v-3150264d] {
|
|
20
|
+
fill: transparent;
|
|
21
|
+
stroke: var(--kds-color-port-flow-variable);
|
|
22
|
+
}
|
|
23
|
+
&.filled[data-v-3150264d] {
|
|
24
|
+
fill: var(--kds-color-port-flow-variable);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
[data-type="table"] {
|
|
28
|
+
&[data-v-3150264d] {
|
|
29
|
+
fill: transparent;
|
|
30
|
+
stroke: var(--kds-color-port-data);
|
|
31
|
+
}
|
|
32
|
+
&.filled[data-v-3150264d] {
|
|
33
|
+
fill: var(--kds-color-port-data);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
[data-type="other"],
|
|
37
|
+
[data-type="generic"] {
|
|
38
|
+
&[data-v-3150264d] {
|
|
39
|
+
fill: transparent;
|
|
40
|
+
|
|
41
|
+
/** dark mode for custom colors generated using oklch */
|
|
42
|
+
--base: var(--v45d93a60);
|
|
43
|
+
--color: light-dark(
|
|
44
|
+
var(--base),
|
|
45
|
+
oklch(from var(--base) calc(1 - l * 0.8) c h)
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
stroke: var(--color);
|
|
49
|
+
}
|
|
50
|
+
&.filled[data-v-3150264d] {
|
|
51
|
+
fill: var(--color);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
18
55
|
.wrapper[data-v-4920a7fa] {
|
|
19
56
|
display: grid;
|
|
20
57
|
grid-template-columns: var(--kds-spacing-container-0-5x) 1fr;
|
|
@@ -71,3 +108,85 @@
|
|
|
71
108
|
.empty-state[data-v-d2eb8e2e] {
|
|
72
109
|
margin: 0 auto;
|
|
73
110
|
}
|
|
111
|
+
|
|
112
|
+
.bg {
|
|
113
|
+
&[data-v-6a055572] {
|
|
114
|
+
/** default color is unknown */
|
|
115
|
+
fill: var(--kds-color-nodes-and-variables-unknown);
|
|
116
|
+
|
|
117
|
+
/** Virtual = Components */
|
|
118
|
+
}
|
|
119
|
+
&.component[data-v-6a055572] {
|
|
120
|
+
fill: var(--kds-color-nodes-and-variables-special-nodes);
|
|
121
|
+
}
|
|
122
|
+
&[data-type="Configuration"][data-v-6a055572] {
|
|
123
|
+
fill: var(--kds-color-nodes-and-variables-configuration);
|
|
124
|
+
}
|
|
125
|
+
&[data-type="Container"][data-v-6a055572] {
|
|
126
|
+
fill: var(--kds-color-nodes-and-variables-container);
|
|
127
|
+
}
|
|
128
|
+
&[data-type="Learner"][data-v-6a055572] {
|
|
129
|
+
fill: var(--kds-color-nodes-and-variables-learner);
|
|
130
|
+
}
|
|
131
|
+
&[data-type="Loop"][data-v-6a055572] {
|
|
132
|
+
fill: var(--kds-color-nodes-and-variables-loop);
|
|
133
|
+
}
|
|
134
|
+
&[data-type="LoopEnd"][data-v-6a055572] {
|
|
135
|
+
fill: var(--kds-color-nodes-and-variables-loop);
|
|
136
|
+
}
|
|
137
|
+
&[data-type="LoopStart"][data-v-6a055572] {
|
|
138
|
+
fill: var(--kds-color-nodes-and-variables-loop);
|
|
139
|
+
}
|
|
140
|
+
&[data-type="Manipulator"][data-v-6a055572] {
|
|
141
|
+
fill: var(--kds-color-nodes-and-variables-manipulator);
|
|
142
|
+
}
|
|
143
|
+
&[data-type="Other"][data-v-6a055572] {
|
|
144
|
+
fill: var(--kds-color-nodes-and-variables-other);
|
|
145
|
+
}
|
|
146
|
+
&[data-type="Predictor"][data-v-6a055572] {
|
|
147
|
+
fill: var(--kds-color-nodes-and-variables-predictor);
|
|
148
|
+
}
|
|
149
|
+
&[data-type="ScopeEnd"][data-v-6a055572] {
|
|
150
|
+
fill: var(--kds-color-nodes-and-variables-scope);
|
|
151
|
+
}
|
|
152
|
+
&[data-type="ScopeStart"][data-v-6a055572] {
|
|
153
|
+
fill: var(--kds-color-nodes-and-variables-scope);
|
|
154
|
+
}
|
|
155
|
+
&[data-type="Sink"][data-v-6a055572] {
|
|
156
|
+
fill: var(--kds-color-nodes-and-variables-sink);
|
|
157
|
+
}
|
|
158
|
+
&[data-type="Source"][data-v-6a055572] {
|
|
159
|
+
fill: var(--kds-color-nodes-and-variables-source);
|
|
160
|
+
}
|
|
161
|
+
&[data-type="Visualizer"][data-v-6a055572] {
|
|
162
|
+
fill: var(--kds-color-nodes-and-variables-visualizer);
|
|
163
|
+
}
|
|
164
|
+
&[data-type="QuickForm"][data-v-6a055572] {
|
|
165
|
+
fill: var(--kds-color-nodes-and-variables-quickform);
|
|
166
|
+
}
|
|
167
|
+
&[data-type="VirtualIn"][data-v-6a055572],
|
|
168
|
+
&[data-type="VirtualOut"][data-v-6a055572] {
|
|
169
|
+
fill: var(--kds-color-nodes-and-variables-special-nodes);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.node-preview {
|
|
174
|
+
&[data-v-4ca34076] {
|
|
175
|
+
display: flex;
|
|
176
|
+
flex-direction: column;
|
|
177
|
+
gap: var(--kds-spacing-container-0-25x);
|
|
178
|
+
width: calc(var(--v33c62e54) * 1px);
|
|
179
|
+
}
|
|
180
|
+
&[data-size="small"][data-v-4ca34076] {
|
|
181
|
+
transform: scale(calc(12 / var(--v347765ac)));
|
|
182
|
+
}
|
|
183
|
+
&[data-size="medium"][data-v-4ca34076] {
|
|
184
|
+
transform: scale(0.5);
|
|
185
|
+
}
|
|
186
|
+
& .indicators[data-v-4ca34076] {
|
|
187
|
+
display: flex;
|
|
188
|
+
gap: var(--kds-spacing-container-0-25x);
|
|
189
|
+
justify-content: center;
|
|
190
|
+
height: var(--kds-dimension-icon-0-75x);
|
|
191
|
+
}
|
|
192
|
+
}
|
package/dist/nodes.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, openBlock, createElementBlock, createBlock, unref, createSlots, renderList, withCtx, createCommentVNode, Fragment, createElementVNode, toDisplayString, createVNode,
|
|
2
|
-
import { KdsAccordion, KdsDescription, KdsTabBar, KdsEmptyState } from '@knime/kds-components';
|
|
1
|
+
import { defineComponent, computed, ref, openBlock, createElementBlock, createBlock, unref, createSlots, renderList, withCtx, createCommentVNode, Fragment, createElementVNode, toDisplayString, createVNode, useCssVars, mergeProps, normalizeProps, guardReactiveProps, normalizeClass } from 'vue';
|
|
2
|
+
import { KdsAccordion, KdsDescription, KdsTabBar, KdsEmptyState, KdsIcon } from '@knime/kds-components';
|
|
3
3
|
import { _ as _export_sfc } from './_plugin-vue_export-helper-pcqpp-6-.js';
|
|
4
4
|
|
|
5
|
-
import './nodes.css';const _hoisted_1$
|
|
6
|
-
const _hoisted_2$
|
|
5
|
+
import './nodes.css';const _hoisted_1$9 = { class: "name" };
|
|
6
|
+
const _hoisted_2$5 = {
|
|
7
7
|
key: 1,
|
|
8
8
|
class: "single-option-wrapper"
|
|
9
9
|
};
|
|
10
|
-
const _hoisted_3$
|
|
11
|
-
const _sfc_main$
|
|
10
|
+
const _hoisted_3$4 = { class: "name" };
|
|
11
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
12
12
|
__name: "OptionsTab",
|
|
13
13
|
props: {
|
|
14
14
|
options: {},
|
|
@@ -49,7 +49,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
49
49
|
key: field.name,
|
|
50
50
|
class: "option-content"
|
|
51
51
|
}, [
|
|
52
|
-
createElementVNode("span", _hoisted_1$
|
|
52
|
+
createElementVNode("span", _hoisted_1$9, toDisplayString(field.name) + " " + toDisplayString(field.optional ? "(optional)" : ""), 1),
|
|
53
53
|
createVNode(unref(KdsDescription), {
|
|
54
54
|
text: field.description,
|
|
55
55
|
"render-as-html": __props.renderAsHtml
|
|
@@ -60,7 +60,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
60
60
|
};
|
|
61
61
|
})
|
|
62
62
|
]), 1032, ["modelValue", "items"])) : createCommentVNode("", true),
|
|
63
|
-
__props.options.length === 1 ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
63
|
+
__props.options.length === 1 ? (openBlock(), createElementBlock("div", _hoisted_2$5, [
|
|
64
64
|
__props.options[0].sectionDescription ? (openBlock(), createBlock(unref(KdsDescription), {
|
|
65
65
|
key: 0,
|
|
66
66
|
text: __props.options[0].sectionDescription,
|
|
@@ -72,7 +72,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
72
72
|
key: field.name,
|
|
73
73
|
class: "option-content"
|
|
74
74
|
}, [
|
|
75
|
-
createElementVNode("span", _hoisted_3$
|
|
75
|
+
createElementVNode("span", _hoisted_3$4, toDisplayString(field.name) + " " + toDisplayString(field.optional ? "(optional)" : ""), 1),
|
|
76
76
|
createVNode(unref(KdsDescription), {
|
|
77
77
|
text: field.description,
|
|
78
78
|
"render-as-html": __props.renderAsHtml
|
|
@@ -85,100 +85,99 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
85
85
|
}
|
|
86
86
|
});
|
|
87
87
|
|
|
88
|
-
const OptionsTab = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
88
|
+
const OptionsTab = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-4fcd17b8"]]);
|
|
89
89
|
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
FLOW_VARIABLE: "flowVariable",
|
|
93
|
-
OTHER: "other",
|
|
94
|
-
GENERIC: "generic"
|
|
95
|
-
});
|
|
96
|
-
Object.freeze(Object.values(PortType));
|
|
90
|
+
const PORT_SIZE = 8;
|
|
91
|
+
const PORT_STROKE_WIDTH = 1.4;
|
|
97
92
|
|
|
98
|
-
const _hoisted_1$
|
|
99
|
-
const _hoisted_2$
|
|
100
|
-
const _hoisted_3$
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
const strokeWidth = 1.4;
|
|
104
|
-
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
105
|
-
__name: "PortIcon",
|
|
93
|
+
const _hoisted_1$8 = ["points", "data-type", "stroke-width"];
|
|
94
|
+
const _hoisted_2$4 = ["r", "data-type", "stroke-width"];
|
|
95
|
+
const _hoisted_3$3 = ["width", "height", "x", "y", "data-type", "stroke-width"];
|
|
96
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
97
|
+
__name: "SVGPortIcon",
|
|
106
98
|
props: {
|
|
107
99
|
type: {},
|
|
108
100
|
color: {},
|
|
109
101
|
filled: { type: Boolean, default: true }
|
|
110
102
|
},
|
|
111
103
|
setup(__props) {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
};
|
|
116
|
-
const props = createPropsRestProxy(__props, ["filled"]);
|
|
104
|
+
useCssVars((_ctx) => ({
|
|
105
|
+
"v45d93a60": _ctx.color
|
|
106
|
+
}));
|
|
117
107
|
const trianglePath = computed(() => {
|
|
118
108
|
let [x1, y1, x2, y3] = [
|
|
119
|
-
-
|
|
120
|
-
-
|
|
121
|
-
|
|
122
|
-
|
|
109
|
+
-PORT_SIZE / 2,
|
|
110
|
+
-PORT_SIZE / 2,
|
|
111
|
+
PORT_SIZE / 2,
|
|
112
|
+
PORT_SIZE / 2
|
|
123
113
|
];
|
|
124
114
|
const d = Math.sqrt(5) / 2;
|
|
125
115
|
const y = d / 2 + 1 / 4;
|
|
126
|
-
x1 +=
|
|
127
|
-
x2 -=
|
|
128
|
-
y1 +=
|
|
129
|
-
y3 -=
|
|
116
|
+
x1 += PORT_STROKE_WIDTH / 2;
|
|
117
|
+
x2 -= PORT_STROKE_WIDTH * d;
|
|
118
|
+
y1 += PORT_STROKE_WIDTH * y;
|
|
119
|
+
y3 -= PORT_STROKE_WIDTH * y;
|
|
130
120
|
return `${x1},${y1} ${x2},${0} ${x1},${y3}`;
|
|
131
121
|
});
|
|
122
|
+
return (_ctx, _cache) => {
|
|
123
|
+
return __props.type === "table" ? (openBlock(), createElementBlock("polygon", mergeProps({
|
|
124
|
+
key: 0,
|
|
125
|
+
points: trianglePath.value,
|
|
126
|
+
class: { filled: __props.filled },
|
|
127
|
+
"data-type": __props.type,
|
|
128
|
+
"stroke-width": unref(PORT_STROKE_WIDTH)
|
|
129
|
+
}, _ctx.$attrs), null, 16, _hoisted_1$8)) : __props.type === "flowVariable" ? (openBlock(), createElementBlock("circle", mergeProps({
|
|
130
|
+
key: 1,
|
|
131
|
+
r: unref(PORT_SIZE) / 2 - unref(PORT_STROKE_WIDTH) / 2,
|
|
132
|
+
class: { filled: __props.filled },
|
|
133
|
+
"data-type": __props.type,
|
|
134
|
+
"stroke-width": unref(PORT_STROKE_WIDTH)
|
|
135
|
+
}, _ctx.$attrs), null, 16, _hoisted_2$4)) : (openBlock(), createElementBlock("rect", mergeProps({
|
|
136
|
+
key: 2,
|
|
137
|
+
width: unref(PORT_SIZE) - unref(PORT_STROKE_WIDTH),
|
|
138
|
+
height: unref(PORT_SIZE) - unref(PORT_STROKE_WIDTH),
|
|
139
|
+
x: -unref(PORT_SIZE) / 2 + unref(PORT_STROKE_WIDTH) / 2,
|
|
140
|
+
y: -unref(PORT_SIZE) / 2 + unref(PORT_STROKE_WIDTH) / 2,
|
|
141
|
+
class: { filled: __props.filled },
|
|
142
|
+
"data-type": __props.type,
|
|
143
|
+
"stroke-width": unref(PORT_STROKE_WIDTH)
|
|
144
|
+
}, _ctx.$attrs), null, 16, _hoisted_3$3));
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
const SVGPortIcon = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-3150264d"]]);
|
|
150
|
+
|
|
151
|
+
const _hoisted_1$7 = ["viewBox", "width", "height"];
|
|
152
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
153
|
+
__name: "PortIcon",
|
|
154
|
+
props: {
|
|
155
|
+
type: {},
|
|
156
|
+
color: {},
|
|
157
|
+
filled: { type: Boolean }
|
|
158
|
+
},
|
|
159
|
+
setup(__props) {
|
|
160
|
+
const props = __props;
|
|
132
161
|
const viewBox = computed(
|
|
133
|
-
() => [-
|
|
162
|
+
() => [-PORT_SIZE / 2, -PORT_SIZE / 2, PORT_SIZE, PORT_SIZE].join(" ")
|
|
134
163
|
);
|
|
135
|
-
const portColor = computed(() => {
|
|
136
|
-
if (props.type === "table" || props.type === "flowVariable") {
|
|
137
|
-
return colors[props.type];
|
|
138
|
-
}
|
|
139
|
-
return props.color;
|
|
140
|
-
});
|
|
141
|
-
const fillColor = computed(() => {
|
|
142
|
-
return __props.filled ? portColor.value : "transparent";
|
|
143
|
-
});
|
|
144
164
|
return (_ctx, _cache) => {
|
|
145
165
|
return openBlock(), createElementBlock("svg", {
|
|
146
166
|
viewBox: viewBox.value,
|
|
147
|
-
width:
|
|
148
|
-
height:
|
|
167
|
+
width: unref(PORT_SIZE),
|
|
168
|
+
height: unref(PORT_SIZE)
|
|
149
169
|
}, [
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
points: trianglePath.value,
|
|
153
|
-
fill: fillColor.value,
|
|
154
|
-
stroke: portColor.value,
|
|
155
|
-
"stroke-width": strokeWidth
|
|
156
|
-
}, _ctx.$attrs), null, 16, _hoisted_2$2)) : __props.type === "flowVariable" ? (openBlock(), createElementBlock("circle", mergeProps({
|
|
157
|
-
key: 1,
|
|
158
|
-
r: portSize / 2 - strokeWidth / 2,
|
|
159
|
-
fill: fillColor.value,
|
|
160
|
-
stroke: portColor.value,
|
|
161
|
-
"stroke-width": strokeWidth
|
|
162
|
-
}, _ctx.$attrs), null, 16, _hoisted_3$1)) : (openBlock(), createElementBlock("rect", mergeProps({
|
|
163
|
-
key: 2,
|
|
164
|
-
width: portSize - strokeWidth,
|
|
165
|
-
height: portSize - strokeWidth,
|
|
166
|
-
x: -portSize / 2 + strokeWidth / 2,
|
|
167
|
-
y: -portSize / 2 + strokeWidth / 2,
|
|
168
|
-
fill: fillColor.value,
|
|
169
|
-
stroke: portColor.value,
|
|
170
|
-
"stroke-width": strokeWidth
|
|
171
|
-
}, _ctx.$attrs), null, 16, _hoisted_4$1))
|
|
172
|
-
], 8, _hoisted_1$5);
|
|
170
|
+
createVNode(SVGPortIcon, normalizeProps(guardReactiveProps(props)), null, 16)
|
|
171
|
+
], 8, _hoisted_1$7);
|
|
173
172
|
};
|
|
174
173
|
}
|
|
175
174
|
});
|
|
176
175
|
|
|
177
|
-
const _hoisted_1$
|
|
178
|
-
const _hoisted_2$
|
|
179
|
-
const _hoisted_3 = { class: "title" };
|
|
176
|
+
const _hoisted_1$6 = { class: "wrapper" };
|
|
177
|
+
const _hoisted_2$3 = { class: "icon" };
|
|
178
|
+
const _hoisted_3$2 = { class: "title" };
|
|
180
179
|
const _hoisted_4 = { class: "name title" };
|
|
181
|
-
const _sfc_main$
|
|
180
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
182
181
|
__name: "PortTemplateInfo",
|
|
183
182
|
props: {
|
|
184
183
|
port: {},
|
|
@@ -186,15 +185,15 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
186
185
|
},
|
|
187
186
|
setup(__props) {
|
|
188
187
|
return (_ctx, _cache) => {
|
|
189
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
190
|
-
createElementVNode("div", _hoisted_2$
|
|
191
|
-
createVNode(_sfc_main$
|
|
188
|
+
return openBlock(), createElementBlock("div", _hoisted_1$6, [
|
|
189
|
+
createElementVNode("div", _hoisted_2$3, [
|
|
190
|
+
createVNode(_sfc_main$7, {
|
|
192
191
|
type: __props.port.type,
|
|
193
192
|
color: __props.port.color,
|
|
194
193
|
filled: !__props.port.optional
|
|
195
194
|
}, null, 8, ["type", "color", "filled"])
|
|
196
195
|
]),
|
|
197
|
-
createElementVNode("span", _hoisted_3, "Type: " + toDisplayString(__props.port.typeDisplayName), 1),
|
|
196
|
+
createElementVNode("span", _hoisted_3$2, "Type: " + toDisplayString(__props.port.typeDisplayName), 1),
|
|
198
197
|
createElementVNode("span", _hoisted_4, "Name: " + toDisplayString(__props.port.name), 1),
|
|
199
198
|
__props.showDescription ? (openBlock(), createBlock(unref(KdsDescription), {
|
|
200
199
|
key: 0,
|
|
@@ -207,11 +206,11 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
207
206
|
}
|
|
208
207
|
});
|
|
209
208
|
|
|
210
|
-
const PortTemplateInfo = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
209
|
+
const PortTemplateInfo = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-4920a7fa"]]);
|
|
211
210
|
|
|
212
|
-
const _hoisted_1$
|
|
213
|
-
const _hoisted_2 = { class: "group-name" };
|
|
214
|
-
const _sfc_main$
|
|
211
|
+
const _hoisted_1$5 = { class: "port-group-card" };
|
|
212
|
+
const _hoisted_2$2 = { class: "group-name" };
|
|
213
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
215
214
|
__name: "PortGroup",
|
|
216
215
|
props: {
|
|
217
216
|
name: {},
|
|
@@ -221,8 +220,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
221
220
|
},
|
|
222
221
|
setup(__props) {
|
|
223
222
|
return (_ctx, _cache) => {
|
|
224
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
225
|
-
createElementVNode("span", _hoisted_2, toDisplayString(__props.name), 1),
|
|
223
|
+
return openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
224
|
+
createElementVNode("span", _hoisted_2$2, toDisplayString(__props.name), 1),
|
|
226
225
|
__props.description ? (openBlock(), createBlock(unref(KdsDescription), {
|
|
227
226
|
key: 0,
|
|
228
227
|
text: __props.description,
|
|
@@ -240,10 +239,10 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
240
239
|
}
|
|
241
240
|
});
|
|
242
241
|
|
|
243
|
-
const PortGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
242
|
+
const PortGroup = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-ed993ae3"]]);
|
|
244
243
|
|
|
245
|
-
const _hoisted_1$
|
|
246
|
-
const _sfc_main$
|
|
244
|
+
const _hoisted_1$4 = { class: "port-list" };
|
|
245
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
247
246
|
__name: "PortsTab",
|
|
248
247
|
props: {
|
|
249
248
|
inputPorts: {},
|
|
@@ -253,7 +252,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
253
252
|
},
|
|
254
253
|
setup(__props) {
|
|
255
254
|
return (_ctx, _cache) => {
|
|
256
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
255
|
+
return openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
257
256
|
__props.inputPorts.length > 0 ? (openBlock(), createBlock(PortGroup, {
|
|
258
257
|
key: 0,
|
|
259
258
|
name: "Input ports",
|
|
@@ -295,10 +294,10 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
295
294
|
}
|
|
296
295
|
});
|
|
297
296
|
|
|
298
|
-
const PortsTab = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
297
|
+
const PortsTab = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-bf308a64"]]);
|
|
299
298
|
|
|
300
|
-
const _hoisted_1$
|
|
301
|
-
const _sfc_main$
|
|
299
|
+
const _hoisted_1$3 = { class: "name" };
|
|
300
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
302
301
|
__name: "ViewsTab",
|
|
303
302
|
props: {
|
|
304
303
|
views: {}
|
|
@@ -317,7 +316,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
317
316
|
key: view.id,
|
|
318
317
|
class: "card-wrapper"
|
|
319
318
|
}, [
|
|
320
|
-
createElementVNode("span", _hoisted_1$
|
|
319
|
+
createElementVNode("span", _hoisted_1$3, toDisplayString(view.name), 1),
|
|
321
320
|
view.description ? (openBlock(), createBlock(unref(KdsDescription), {
|
|
322
321
|
key: 0,
|
|
323
322
|
text: view.description,
|
|
@@ -329,10 +328,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
329
328
|
}
|
|
330
329
|
});
|
|
331
330
|
|
|
332
|
-
const ViewsTab = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
331
|
+
const ViewsTab = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-024c4b9d"]]);
|
|
333
332
|
|
|
334
|
-
const _hoisted_1 = { class: "content" };
|
|
335
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
333
|
+
const _hoisted_1$2 = { class: "content" };
|
|
334
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
336
335
|
__name: "NodeDescriptionTabs",
|
|
337
336
|
props: {
|
|
338
337
|
inputPorts: { default: () => [] },
|
|
@@ -399,7 +398,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
399
398
|
size: "small",
|
|
400
399
|
tabs: tabs.value
|
|
401
400
|
}, null, 8, ["modelValue", "full-width", "tabs"]),
|
|
402
|
-
createElementVNode("div", _hoisted_1, [
|
|
401
|
+
createElementVNode("div", _hoisted_1$2, [
|
|
403
402
|
activeTab.value === TAB_IDS.PORTS ? (openBlock(), createBlock(PortsTab, {
|
|
404
403
|
key: 0,
|
|
405
404
|
id: "panel-ports",
|
|
@@ -439,7 +438,177 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
439
438
|
}
|
|
440
439
|
});
|
|
441
440
|
|
|
442
|
-
const NodeDescriptionTabs = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d2eb8e2e"]]);
|
|
441
|
+
const NodeDescriptionTabs = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-d2eb8e2e"]]);
|
|
442
|
+
|
|
443
|
+
const NODE_SIZE = 32;
|
|
444
|
+
|
|
445
|
+
const _hoisted_1$1 = ["d", "data-type"];
|
|
446
|
+
const _hoisted_2$1 = ["d", "data-type", "transform"];
|
|
447
|
+
const _hoisted_3$1 = ["xlink:href"];
|
|
448
|
+
const componentBackgroundPortion = 0.75;
|
|
449
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
450
|
+
__name: "SVGNodeTorso",
|
|
451
|
+
props: {
|
|
452
|
+
type: { default: null },
|
|
453
|
+
isComponent: { type: Boolean, default: false },
|
|
454
|
+
icon: { default: null }
|
|
455
|
+
},
|
|
456
|
+
setup(__props) {
|
|
457
|
+
const backgroundPaths = {
|
|
458
|
+
default: "M0,29.2L0,2.8C0,1.3,1.3,0,2.8,0l26.3,0C30.7,0,32,1.3,32,2.8v26.3c0,1.6-1.3,2.8-2.8,2.8H2.8C1.3,32,0,30.7,0,29.2z",
|
|
459
|
+
LoopEnd: "M32,2.8v26.3c0,1.6-1.3,2.8-2.8,2.8H4L0,16.1L4,0l25.2,0C30.7,0,32,1.3,32,2.8z",
|
|
460
|
+
LoopStart: "M0,29.2L0,2.8C0,1.3,1.3,0,2.8,0L32,0l-4,15.9L32,32H2.8C1.3,32,0,30.7,0,29.2z",
|
|
461
|
+
ScopeEnd: "M32,2.8v26.3c0,1.6-1.3,2.8-2.8,2.8H4L0,16.1L4,0l25.2,0C30.7,0,32,1.3,32,2.8z",
|
|
462
|
+
ScopeStart: "M0,29.2L0,2.8C0,1.3,1.3,0,2.8,0L32,0l-4,15.9L32,32H2.8C1.3,32,0,30.7,0,29.2z",
|
|
463
|
+
VirtualIn: "M32,2.8v26.3c0,1.6-1.3,2.8-2.8,2.8H6.5L0,25.9l5.2-10L0.7,7.2L6.5,0l22.7,0C30.7,0,32,1.3,32,2.8z",
|
|
464
|
+
VirtualOut: "M0,29.2L0,2.8C0,1.3,1.3,0,2.8,0L32,0l-5.8,7.2l4.5,8.7l-5.2,10L32,32H2.8C1.3,32,0,30.7,0,29.2z"
|
|
465
|
+
};
|
|
466
|
+
const backgroundPath = computed(
|
|
467
|
+
() => __props.type && backgroundPaths[__props.type] || backgroundPaths.default
|
|
468
|
+
);
|
|
469
|
+
const componentBackgroundTransformation = computed(() => {
|
|
470
|
+
const offset = NODE_SIZE / 2;
|
|
471
|
+
const scaleFactor = componentBackgroundPortion;
|
|
472
|
+
return `translate(${offset}, ${offset}) scale(${scaleFactor}) translate(-${offset}, -${offset})`;
|
|
473
|
+
});
|
|
474
|
+
return (_ctx, _cache) => {
|
|
475
|
+
return openBlock(), createElementBlock("g", null, [
|
|
476
|
+
createElementVNode("path", {
|
|
477
|
+
d: backgroundPath.value,
|
|
478
|
+
class: normalizeClass(["bg", { component: __props.isComponent }]),
|
|
479
|
+
"data-type": __props.isComponent ? null : __props.type
|
|
480
|
+
}, null, 10, _hoisted_1$1),
|
|
481
|
+
__props.isComponent && __props.type ? (openBlock(), createElementBlock("path", {
|
|
482
|
+
key: 0,
|
|
483
|
+
d: backgroundPath.value,
|
|
484
|
+
class: "bg",
|
|
485
|
+
"data-type": __props.type,
|
|
486
|
+
transform: componentBackgroundTransformation.value
|
|
487
|
+
}, null, 8, _hoisted_2$1)) : createCommentVNode("", true),
|
|
488
|
+
__props.icon ? (openBlock(), createElementBlock("image", {
|
|
489
|
+
key: 1,
|
|
490
|
+
"xlink:href": __props.icon,
|
|
491
|
+
x: "8",
|
|
492
|
+
y: "8",
|
|
493
|
+
width: "16",
|
|
494
|
+
height: "16",
|
|
495
|
+
"pointer-events": "none"
|
|
496
|
+
}, null, 8, _hoisted_3$1)) : createCommentVNode("", true)
|
|
497
|
+
]);
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
});
|
|
501
|
+
|
|
502
|
+
const SVGNodeTorso = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-6a055572"]]);
|
|
503
|
+
|
|
504
|
+
const _hoisted_1 = ["data-size"];
|
|
505
|
+
const _hoisted_2 = ["viewBox", "width", "height"];
|
|
506
|
+
const _hoisted_3 = {
|
|
507
|
+
key: 0,
|
|
508
|
+
class: "indicators"
|
|
509
|
+
};
|
|
510
|
+
const maxShownPorts = 3;
|
|
511
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
512
|
+
__name: "NodePreview",
|
|
513
|
+
props: {
|
|
514
|
+
type: { default: null },
|
|
515
|
+
isComponent: { type: Boolean, default: false },
|
|
516
|
+
indicatorIcon: { default: () => void 0 },
|
|
517
|
+
inPorts: { default: () => [] },
|
|
518
|
+
outPorts: { default: () => [] },
|
|
519
|
+
icon: { default: null },
|
|
520
|
+
hidePorts: { type: Boolean, default: false },
|
|
521
|
+
hideIndicators: { type: Boolean, default: false },
|
|
522
|
+
size: { default: "xlarge" }
|
|
523
|
+
},
|
|
524
|
+
setup(__props) {
|
|
525
|
+
useCssVars((_ctx) => ({
|
|
526
|
+
"v33c62e54": width.value,
|
|
527
|
+
"v347765ac": unref(NODE_SIZE)
|
|
528
|
+
}));
|
|
529
|
+
const horizontalSpaceForPorts = computed(() => __props.hidePorts ? 0 : PORT_SIZE);
|
|
530
|
+
const width = computed(() => NODE_SIZE + 2 * horizontalSpaceForPorts.value);
|
|
531
|
+
const height = NODE_SIZE;
|
|
532
|
+
const viewBox = computed(
|
|
533
|
+
() => `-${horizontalSpaceForPorts.value} 0 ${width.value} ${height}`
|
|
534
|
+
);
|
|
535
|
+
function yPortShift(index, total) {
|
|
536
|
+
let spacing = 1;
|
|
537
|
+
if (total === 2) {
|
|
538
|
+
spacing = 12;
|
|
539
|
+
} else if (total === 3) {
|
|
540
|
+
spacing = 2;
|
|
541
|
+
}
|
|
542
|
+
const totalHeight = total * PORT_SIZE + (total - 1) * spacing;
|
|
543
|
+
const delta = (NODE_SIZE - totalHeight) / 2;
|
|
544
|
+
return (spacing + PORT_SIZE) * index + delta + PORT_SIZE / 2;
|
|
545
|
+
}
|
|
546
|
+
const cutOffPorts = (ports) => {
|
|
547
|
+
if (ports.length > maxShownPorts) {
|
|
548
|
+
return [...ports.slice(0, maxShownPorts)];
|
|
549
|
+
}
|
|
550
|
+
return ports;
|
|
551
|
+
};
|
|
552
|
+
const visibleInPorts = computed(() => cutOffPorts(__props.inPorts));
|
|
553
|
+
const visibleOutPorts = computed(() => cutOffPorts(__props.outPorts));
|
|
554
|
+
const numberOfHiddenPorts = computed(
|
|
555
|
+
() => __props.inPorts.length - visibleInPorts.value.length + __props.outPorts.length - visibleOutPorts.value.length
|
|
556
|
+
);
|
|
557
|
+
return (_ctx, _cache) => {
|
|
558
|
+
return openBlock(), createElementBlock("div", {
|
|
559
|
+
class: "node-preview",
|
|
560
|
+
"data-size": __props.size
|
|
561
|
+
}, [
|
|
562
|
+
(openBlock(), createElementBlock("svg", {
|
|
563
|
+
viewBox: viewBox.value,
|
|
564
|
+
width: width.value,
|
|
565
|
+
height: unref(height)
|
|
566
|
+
}, [
|
|
567
|
+
createVNode(SVGNodeTorso, {
|
|
568
|
+
type: __props.type,
|
|
569
|
+
icon: __props.icon,
|
|
570
|
+
"is-component": __props.isComponent
|
|
571
|
+
}, null, 8, ["type", "icon", "is-component"]),
|
|
572
|
+
!__props.hidePorts ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
573
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(visibleInPorts.value, (port, index) => {
|
|
574
|
+
return openBlock(), createBlock(SVGPortIcon, {
|
|
575
|
+
key: `in-${index}`,
|
|
576
|
+
color: port.color,
|
|
577
|
+
filled: !port.optional,
|
|
578
|
+
type: port.type,
|
|
579
|
+
transform: `translate(-${unref(PORT_SIZE) / 2}, ${yPortShift(index, visibleInPorts.value.length)})`
|
|
580
|
+
}, null, 8, ["color", "filled", "type", "transform"]);
|
|
581
|
+
}), 128)),
|
|
582
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(visibleOutPorts.value, (port, index) => {
|
|
583
|
+
return openBlock(), createBlock(SVGPortIcon, {
|
|
584
|
+
key: `out-${index}`,
|
|
585
|
+
color: port.color,
|
|
586
|
+
filled: !port.optional,
|
|
587
|
+
type: port.type,
|
|
588
|
+
transform: `translate(${unref(NODE_SIZE) + unref(PORT_SIZE) / 2}, ${yPortShift(index, visibleOutPorts.value.length)})`
|
|
589
|
+
}, null, 8, ["color", "filled", "type", "transform"]);
|
|
590
|
+
}), 128))
|
|
591
|
+
], 64)) : createCommentVNode("", true)
|
|
592
|
+
], 8, _hoisted_2)),
|
|
593
|
+
!__props.hideIndicators ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
594
|
+
__props.indicatorIcon ? (openBlock(), createBlock(unref(KdsIcon), {
|
|
595
|
+
key: 0,
|
|
596
|
+
name: __props.indicatorIcon,
|
|
597
|
+
size: "small"
|
|
598
|
+
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
599
|
+
numberOfHiddenPorts.value > 0 && !__props.hidePorts ? (openBlock(), createBlock(unref(KdsIcon), {
|
|
600
|
+
key: 1,
|
|
601
|
+
name: "more-connections",
|
|
602
|
+
"aria-label": "Indication that some ports are hidden",
|
|
603
|
+
size: "small"
|
|
604
|
+
})) : createCommentVNode("", true)
|
|
605
|
+
])) : createCommentVNode("", true)
|
|
606
|
+
], 8, _hoisted_1);
|
|
607
|
+
};
|
|
608
|
+
}
|
|
609
|
+
});
|
|
610
|
+
|
|
611
|
+
const NodePreview = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4ca34076"]]);
|
|
443
612
|
|
|
444
|
-
export { NodeDescriptionTabs, _sfc_main$
|
|
613
|
+
export { NodeDescriptionTabs, NodePreview, _sfc_main$7 as PortIcon };
|
|
445
614
|
//# sourceMappingURL=nodes.js.map
|