@receptron/graphai_vue_cytoscape 0.0.5 → 0.0.7
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/cytoscape.js +16 -8
- package/package.json +1 -1
package/lib/cytoscape.js
CHANGED
|
@@ -129,6 +129,12 @@ var inputs2dataSources = function (inputs) {
|
|
|
129
129
|
.map(function (input) { return (0, exports.inputs2dataSources)(input); })
|
|
130
130
|
.flat();
|
|
131
131
|
}
|
|
132
|
+
if (typeof inputs === "string") {
|
|
133
|
+
var templateMatch = Array.from(inputs.matchAll(/\${(:[^}]+)}/g)).map(function (m) { return m[1]; });
|
|
134
|
+
if (templateMatch.length > 0) {
|
|
135
|
+
return (0, exports.inputs2dataSources)(templateMatch);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
132
138
|
return inputs;
|
|
133
139
|
};
|
|
134
140
|
exports.inputs2dataSources = inputs2dataSources;
|
|
@@ -152,14 +158,16 @@ var cytoscapeFromGraph = function (graph_data) {
|
|
|
152
158
|
if ("inputs" in node) {
|
|
153
159
|
// computed node
|
|
154
160
|
(0, exports.inputs2dataSources)(node.inputs).forEach(function (input) {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
if (input[0] === ":") {
|
|
162
|
+
var _a = parseInput(input), source = _a.source, label = _a.label;
|
|
163
|
+
tmp.edges.push({
|
|
164
|
+
data: {
|
|
165
|
+
source: source,
|
|
166
|
+
target: nodeId,
|
|
167
|
+
label: label,
|
|
168
|
+
},
|
|
169
|
+
});
|
|
170
|
+
}
|
|
163
171
|
});
|
|
164
172
|
}
|
|
165
173
|
if ("update" in node && node.update) {
|