@kestra-io/ui-libs 0.0.228 → 0.0.230

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.
Files changed (47) hide show
  1. package/dist/VueFlowUtils-BhTB7zMW.cjs +2 -0
  2. package/dist/VueFlowUtils-BhTB7zMW.cjs.map +1 -0
  3. package/dist/{VueFlowUtils-8xjnZl4e.js → VueFlowUtils-BmNdCDFy.js} +461 -452
  4. package/dist/VueFlowUtils-BmNdCDFy.js.map +1 -0
  5. package/dist/assets/icons/RotatingDots.vue.d.ts +6 -0
  6. package/dist/assets/icons/RotatingDots.vue.d.ts.map +1 -0
  7. package/dist/components/misc/ExecutionInformations.vue.d.ts +1 -0
  8. package/dist/components/misc/ExecutionInformations.vue.d.ts.map +1 -1
  9. package/dist/components/nodes/BasicNode.vue.d.ts +44 -113
  10. package/dist/components/nodes/BasicNode.vue.d.ts.map +1 -1
  11. package/dist/components/nodes/EdgeNode.vue.d.ts +5 -7
  12. package/dist/components/nodes/EdgeNode.vue.d.ts.map +1 -1
  13. package/dist/components/nodes/TaskNode.vue.d.ts +48 -240
  14. package/dist/components/nodes/TaskNode.vue.d.ts.map +1 -1
  15. package/dist/components/plugins/PluginIndex.vue.d.ts +2 -8
  16. package/dist/components/plugins/PluginIndex.vue.d.ts.map +1 -1
  17. package/dist/components/topology/Topology.vue.d.ts +13 -4
  18. package/dist/components/topology/Topology.vue.d.ts.map +1 -1
  19. package/dist/components/topology/injectionKeys.d.ts +0 -1
  20. package/dist/components/topology/injectionKeys.d.ts.map +1 -1
  21. package/dist/index.d.ts +1 -0
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/kestra-index.cjs.js +14 -14
  24. package/dist/kestra-index.cjs.js.map +1 -1
  25. package/dist/kestra-index.es.js +3636 -3679
  26. package/dist/kestra-index.es.js.map +1 -1
  27. package/dist/kestra-vueflowutils.cjs.js +1 -1
  28. package/dist/kestra-vueflowutils.es.js +6 -6
  29. package/dist/ui-libs.css +1 -1
  30. package/dist/utils/Utils.d.ts +14 -7
  31. package/dist/utils/Utils.d.ts.map +1 -1
  32. package/dist/utils/state.d.ts +1 -0
  33. package/dist/utils/state.d.ts.map +1 -1
  34. package/package.json +1 -1
  35. package/src/assets/icons/RotatingDots.vue +25 -0
  36. package/src/components/misc/Duration.vue +2 -2
  37. package/src/components/misc/ExecutionInformations.vue +6 -36
  38. package/src/components/nodes/BasicNode.vue +127 -152
  39. package/src/components/nodes/TaskNode.vue +265 -189
  40. package/src/components/topology/Topology.vue +8 -3
  41. package/src/components/topology/injectionKeys.ts +1 -2
  42. package/src/index.ts +1 -0
  43. package/src/utils/Utils.ts +48 -34
  44. package/src/utils/state.ts +4 -0
  45. package/dist/VueFlowUtils-8xjnZl4e.js.map +0 -1
  46. package/dist/VueFlowUtils-dC12uRkV.cjs +0 -2
  47. package/dist/VueFlowUtils-dC12uRkV.cjs.map +0 -1
@@ -29,9 +29,10 @@ const humanizeDurationLanguages = {
29
29
  export const DATE_FORMAT_STORAGE_KEY = "dateFormat";
30
30
  export const TIMEZONE_STORAGE_KEY = "timezone";
31
31
 
32
- export default {
33
- capitalize: (str: string) => str.charAt(0).toUpperCase() + str.slice(1),
34
- dateFilter: (dateString: string, format: string) => {
32
+
33
+ export const capitalize = (str: string) => str.charAt(0).toUpperCase() + str.slice(1)
34
+
35
+ export const dateFilter = (dateString: string, format: string) => {
35
36
  const currentLocale = getCurrentInstance()?.appContext.config.globalProperties.$moment().locale();
36
37
  const momentInstance = getCurrentInstance()?.appContext.config.globalProperties.$moment(dateString).locale(currentLocale);
37
38
  let f;
@@ -44,39 +45,52 @@ export default {
44
45
  return momentInstance
45
46
  .tz(localStorage.getItem(TIMEZONE_STORAGE_KEY) ?? momentTz.tz.guess())
46
47
  .format(f);
47
- },
48
- splitFirst(str: string, separator: string) {
49
- return str.split(separator).slice(1).join(separator);
50
- },
48
+ }
51
49
 
52
- duration(isoString: string) {
53
- return (
54
- moment.duration(isoString, moment.ISO_8601 as any).asMilliseconds() / 1000
55
- );
56
- },
57
- humanDuration(
58
- value: number | string,
59
- options?: HumanizeDurationOptions & { languages?: any }
60
- ) {
61
- options = options || {maxDecimalPoints: 2};
62
- options.spacer = "";
63
- options.language = localStorage.getItem("lang") || "en";
64
- options.languages = humanizeDurationLanguages;
65
- options.largest = 2;
50
+ export function splitFirst(str: string, separator: string) {
51
+ return str.split(separator).slice(1).join(separator);
52
+ }
66
53
 
67
- if (typeof value !== "number") {
68
- value = this.duration(value);
69
- }
54
+ export function duration(isoString: string) {
55
+ return (
56
+ moment.duration(isoString, moment.ISO_8601 as any).asMilliseconds() / 1000
57
+ );
58
+ }
70
59
 
71
- return humanizeDuration(value * 1000, options).replace(
72
- /\.([0-9])s$/i,
73
- ".$10s"
74
- );
75
- },
76
- afterLastDot(str: string) {
77
- return str.split(".").pop();
78
- },
79
- distinctFilter(value: any, index: number, array: any[]) {
80
- return array.indexOf(value) === index;
60
+ export function humanDuration(
61
+ value: number | string,
62
+ options?: HumanizeDurationOptions & { languages?: any }
63
+ ) {
64
+ options = options || {maxDecimalPoints: 2};
65
+ options.spacer = "";
66
+ options.language = localStorage.getItem("lang") || "en";
67
+ options.languages = humanizeDurationLanguages;
68
+ options.largest = 2;
69
+
70
+ if (typeof value !== "number") {
71
+ value = duration(value);
81
72
  }
73
+
74
+ return humanizeDuration(value * 1000, options).replace(
75
+ /\.([0-9])s$/i,
76
+ ".$10s"
77
+ );
78
+ }
79
+
80
+ export function afterLastDot(str: string) {
81
+ return str.split(".").pop();
82
+ }
83
+
84
+ export function distinctFilter(value: any, index: number, array: any[]) {
85
+ return array.indexOf(value) === index;
86
+ }
87
+
88
+ export default {
89
+ capitalize,
90
+ dateFilter,
91
+ splitFirst,
92
+ duration,
93
+ humanDuration,
94
+ afterLastDot,
95
+ distinctFilter
82
96
  };
@@ -201,6 +201,10 @@ export default class State {
201
201
  return STATES.CANCELLED.name;
202
202
  }
203
203
 
204
+ static get SKIPPED() {
205
+ return STATES.SKIPPED.name;
206
+ }
207
+
204
208
  static get QUEUED() {
205
209
  return STATES.QUEUED.name;
206
210
  }