@kestra-io/ui-libs 0.0.16 → 0.0.17

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kestra-io/ui-libs",
3
- "version": "v0.0.16",
3
+ "version": "v0.0.17",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src",
@@ -187,21 +187,19 @@
187
187
  lastPosition.value = null;
188
188
  })
189
189
 
190
- const subflowNestedTasks = computed(() => {
190
+ const subflowPrefixes = computed(() => {
191
191
  if(!props.flowGraph) {
192
192
  return [];
193
193
  }
194
194
 
195
195
  return props.flowGraph.clusters.filter(cluster => cluster.cluster.type.endsWith("SubflowGraphCluster"))
196
- .flatMap(cluster =>
197
- cluster.nodes.filter(node => node !== cluster.cluster.taskNode.uid)
198
- );
196
+ .map(cluster => cluster.cluster.taskNode.uid + ".");
199
197
  })
200
198
 
201
199
  onNodeDrag((e) => {
202
200
  resetNodesStyle();
203
- getNodes.value.filter(n => Utils.afterLastDot(n.id) !== Utils.afterLastDot(e.node.id)).forEach(n => {
204
- if (n.type === "trigger" || (n.type === "task" && n.id.startsWith(e.node.id + ".")) || subflowNestedTasks.value.includes(n.id)) {
201
+ getNodes.value.filter(n => n.id !== e.node.id).forEach(n => {
202
+ if (n.type === "trigger" || (n.type === "task" && (n.id.startsWith(e.node.id + ".") || e.node.id.startsWith(n.id + "."))) || subflowPrefixes.value.some(subflowPrefix => n.id.startsWith(subflowPrefix))) {
205
203
  n.style = {...n.style, opacity: "0.5"}
206
204
  } else {
207
205
  n.style = {...n.style, opacity: "1"}