@kestra-io/ui-libs 0.0.17 → 0.0.19
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/package.json
CHANGED
|
@@ -100,6 +100,14 @@
|
|
|
100
100
|
|
|
101
101
|
nextTick(() => {
|
|
102
102
|
forwardEvent("loading", true);
|
|
103
|
+
|
|
104
|
+
// Workaround due to start & end nodes regeneration when fetching the graph again
|
|
105
|
+
const oldCollapsed = collapsed.value;
|
|
106
|
+
collapsed.value = new Set();
|
|
107
|
+
hiddenNodes.value = [];
|
|
108
|
+
edgeReplacer.value = {};
|
|
109
|
+
oldCollapsed.forEach(n => collapseCluster(CLUSTER_PREFIX + n, false, false))
|
|
110
|
+
|
|
103
111
|
const elements = VueflowUtils.generateGraph(
|
|
104
112
|
props.id,
|
|
105
113
|
props.flowId,
|
|
@@ -237,29 +245,21 @@
|
|
|
237
245
|
|
|
238
246
|
const collapseCluster = (clusterUid, regenerate, recursive) => {
|
|
239
247
|
const cluster = props.flowGraph.clusters.find(cluster => cluster.cluster.uid.endsWith(clusterUid));
|
|
240
|
-
const nodeId = clusterUid
|
|
248
|
+
const nodeId = clusterUid.replace(CLUSTER_PREFIX, "");
|
|
241
249
|
collapsed.value.add(nodeId)
|
|
242
250
|
|
|
243
251
|
hiddenNodes.value = hiddenNodes.value.concat(cluster.nodes.filter(e => e !== nodeId || recursive));
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
edgeReplacer.value
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
}
|
|
252
|
+
hiddenNodes.value = hiddenNodes.value.concat([cluster.cluster.uid])
|
|
253
|
+
edgeReplacer.value = {
|
|
254
|
+
...edgeReplacer.value,
|
|
255
|
+
[cluster.cluster.uid]: nodeId,
|
|
256
|
+
[cluster.start]: nodeId,
|
|
257
|
+
[cluster.end]: nodeId
|
|
258
|
+
}
|
|
252
259
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
} else {
|
|
259
|
-
edgeReplacer.value = {
|
|
260
|
-
...edgeReplacer.value,
|
|
261
|
-
[cluster.start]: nodeId,
|
|
262
|
-
[cluster.end]: nodeId
|
|
260
|
+
for (let child of cluster.nodes) {
|
|
261
|
+
if (props.flowGraph.clusters.map(cluster => cluster.cluster.uid).includes(child)) {
|
|
262
|
+
collapseCluster(child, false, true);
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
265
|
|
package/src/utils/YamlUtils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import JsYaml from "js-yaml";
|
|
2
2
|
import yaml, {Document, YAMLMap, isSeq, isMap, Pair, Scalar, YAMLSeq, LineCounter} from "yaml";
|
|
3
|
-
import {cloneDeep} from "lodash/cloneDeep"
|
|
3
|
+
import {cloneDeep} from "lodash/cloneDeep.js"
|
|
4
4
|
import {SECTIONS} from "./constants.js";
|
|
5
5
|
|
|
6
6
|
const TOSTRING_OPTIONS = {lineWidth: 0};
|
package/src/utils/global.js
CHANGED
|
@@ -15,9 +15,9 @@ String.prototype.hashCode = function () {
|
|
|
15
15
|
return hash + "";
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
export const cssVariable = (name) => {
|
|
18
19
|
const root = document.querySelector(":root");
|
|
19
20
|
const rootStyle = getComputedStyle(root);
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
22
|
+
return rootStyle.getPropertyValue(name);
|
|
23
|
+
}
|