@kestra-io/ui-libs 0.0.68 → 0.0.70

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": "0.0.68",
3
+ "version": "0.0.70",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src",
@@ -17,34 +17,34 @@
17
17
  "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path ./.gitignore"
18
18
  },
19
19
  "peerDependencies": {
20
- "@vue-flow/background": "^1.3.0",
20
+ "@vue-flow/background": "^1.3.2",
21
21
  "@vue-flow/controls": "^1.1.1",
22
- "@vue-flow/core": "^1.41.1",
22
+ "@vue-flow/core": "^1.41.5",
23
23
  "bootstrap": "^5.3.3",
24
24
  "dagre": "^0.8.5",
25
25
  "humanize-duration": "^3.31.0",
26
26
  "js-yaml": "^4.1.0",
27
27
  "lodash": "^4.17.21",
28
28
  "moment": "^2.30.1",
29
- "vue": "^3.5.5",
30
- "vue-material-design-icons": "^5.3.0",
29
+ "vue": "^3.5.13",
30
+ "vue-material-design-icons": "^5.3.1",
31
31
  "vuex": "^4.1.0",
32
- "yaml": "^2.5.1"
32
+ "yaml": "^2.6.1"
33
33
  },
34
34
  "devDependencies": {
35
- "@esbuild/linux-x64": "^0.23.1",
36
- "@typescript-eslint/parser": "^8.5.0",
37
- "@vitejs/plugin-vue": "^5.1.3",
35
+ "@esbuild/linux-x64": "^0.24.0",
36
+ "@typescript-eslint/parser": "^8.15.0",
37
+ "@vitejs/plugin-vue": "^5.2.0",
38
38
  "eslint": "^8.57.0",
39
- "eslint-plugin-vue": "^9.28.0",
40
- "sass": "^1.78.0",
41
- "vite": "^5.4.5",
42
- "vite-plugin-static-copy": "^1.0.6"
39
+ "eslint-plugin-vue": "^9.31.0",
40
+ "sass": "^1.81.0",
41
+ "vite": "^5.4.11",
42
+ "vite-plugin-static-copy": "^2.1.0"
43
43
  },
44
44
  "dependencies": {
45
- "@nuxtjs/mdc": "^0.9.0",
45
+ "@nuxtjs/mdc": "^0.9.5",
46
46
  "@popperjs/core": "^2.11.8",
47
- "mermaid": "^11.2.1",
48
- "shiki": "^1.17.6"
47
+ "mermaid": "^11.4.0",
48
+ "shiki": "^1.23.1"
49
49
  }
50
50
  }
@@ -17,6 +17,16 @@
17
17
  <execution-informations v-if="taskExecution" :execution="taskExecution" :task="data.node.task" :color="color" :uid="data.node.uid" />
18
18
  </template>
19
19
  <template #badge-button-before>
20
+ <span
21
+ v-if="data.node.task.runIf"
22
+ class="circle-button"
23
+ :class="[`bg-warning`]"
24
+ @click="$emit(EVENTS.SHOW_CONDITION, {id: taskId, task: data.node.task, section: SECTIONS.TASKS})"
25
+ >
26
+ <tooltip :title="Utils.translate('show task condition')">
27
+ <SendLock class="button-icon" alt="Show condition" />
28
+ </tooltip>
29
+ </span>
20
30
  <span
21
31
  v-if="taskExecution"
22
32
  class="circle-button"
@@ -73,6 +83,7 @@
73
83
  import Delete from "vue-material-design-icons/Delete.vue";
74
84
  import TextBoxSearch from "vue-material-design-icons/TextBoxSearch.vue";
75
85
  import AlertOutline from "vue-material-design-icons/AlertOutline.vue"
86
+ import SendLock from "vue-material-design-icons/SendLock.vue"
76
87
  import {mapGetters, mapState} from "vuex";
77
88
  import Tooltip from "../misc/Tooltip.vue"
78
89
  import Utils from "../../utils/Utils.js";
@@ -86,7 +97,8 @@
86
97
  Handle,
87
98
  TextBoxSearch,
88
99
  AlertOutline,
89
- Tooltip
100
+ Tooltip,
101
+ SendLock
90
102
  },
91
103
  inheritAttrs: false,
92
104
  computed: {
@@ -190,7 +202,8 @@
190
202
  EVENTS.ADD_ERROR,
191
203
  EVENTS.EDIT,
192
204
  EVENTS.DELETE,
193
- EVENTS.ADD_TASK
205
+ EVENTS.ADD_TASK,
206
+ EVENTS.SHOW_CONDITION
194
207
  ],
195
208
  props: {
196
209
  data: {
@@ -90,7 +90,8 @@
90
90
  "loading",
91
91
  "swapped-task",
92
92
  "message",
93
- "expand-subflow"
93
+ "expand-subflow",
94
+ EVENTS.SHOW_CONDITION
94
95
  ]
95
96
  )
96
97
 
@@ -339,6 +340,7 @@
339
340
  @open-link="forwardEvent(EVENTS.OPEN_LINK, $event)"
340
341
  @show-logs="forwardEvent(EVENTS.SHOW_LOGS, $event)"
341
342
  @show-description="forwardEvent(EVENTS.SHOW_DESCRIPTION, $event)"
343
+ @show-condition="forwardEvent(EVENTS.SHOW_CONDITION, $event)"
342
344
  @mouseover="onMouseOver($event)"
343
345
  @mouseleave="onMouseLeave()"
344
346
  @add-error="forwardEvent('on-add-flowable-error', $event)"
@@ -164,7 +164,7 @@ export default class YamlUtils {
164
164
  static extractAllTypes(source) {
165
165
  const yamlDoc = yaml.parseDocument(source);
166
166
  const types = [];
167
- if (yamlDoc.contents && yamlDoc.contents.items && yamlDoc.contents.items.find(e => ["tasks", "triggers", "errors"].includes(e.key.value))) {
167
+ if (yamlDoc.contents && yamlDoc.contents.items && yamlDoc.contents.items.find(e => ["tasks", "triggers", "errors", "layout"].includes(e.key.value))) {
168
168
  yaml.visit(yamlDoc, {
169
169
  Map(_, map) {
170
170
  if (map.items) {
@@ -182,8 +182,9 @@ export default class YamlUtils {
182
182
  }
183
183
 
184
184
  static getTaskType(source, position) {
185
+ console.log("entering getTaskType...")
185
186
  const types = this.extractAllTypes(source)
186
-
187
+ console.log("types", types)
187
188
  const lineCounter = new LineCounter();
188
189
  yaml.parseDocument(source, {lineCounter});
189
190
  const cursorIndex = lineCounter.lineStarts[position.lineNumber - 1] + position.column;
@@ -16,6 +16,7 @@ export const EVENTS = {
16
16
  "MOUSE_LEAVE": "mouseleave",
17
17
  "ADD_ERROR": "addError",
18
18
  "EXPAND_DEPENDENCIES": "expandDependencies",
19
+ "SHOW_CONDITION": "showCondition",
19
20
  }
20
21
 
21
22
  export const CLUSTER_PREFIX = "cluster_";