@kestra-io/ui-libs 0.0.283 → 0.0.285
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/dist/{FlowYamlUtils-DS9E9TyK.js → FlowYamlUtils-ByEGfKdP.js} +576 -563
- package/dist/{FlowYamlUtils-DS9E9TyK.js.map → FlowYamlUtils-ByEGfKdP.js.map} +1 -1
- package/dist/FlowYamlUtils-CAwjZu0s.cjs +3 -0
- package/dist/{FlowYamlUtils-BR3BpHdP.cjs.map → FlowYamlUtils-CAwjZu0s.cjs.map} +1 -1
- package/dist/{VueFlowUtils-CAqlzP8f.cjs → VueFlowUtils-CLCIuGav.cjs} +2 -2
- package/dist/{VueFlowUtils-CAqlzP8f.cjs.map → VueFlowUtils-CLCIuGav.cjs.map} +1 -1
- package/dist/{VueFlowUtils-CZUZUZIC.js → VueFlowUtils-CVECjUbY.js} +2 -2
- package/dist/{VueFlowUtils-CZUZUZIC.js.map → VueFlowUtils-CVECjUbY.js.map} +1 -1
- package/dist/components/misc/Duration.vue.d.ts.map +1 -1
- package/dist/kestra-flowyamlutils.cjs.js +1 -1
- package/dist/kestra-flowyamlutils.es.js +1 -1
- package/dist/kestra-index.cjs.js +10 -10
- package/dist/kestra-index.cjs.js.map +1 -1
- package/dist/kestra-index.es.js +15 -11
- package/dist/kestra-index.es.js.map +1 -1
- package/dist/kestra-vueflowutils.cjs.js +1 -1
- package/dist/kestra-vueflowutils.es.js +2 -2
- package/dist/utils/FlowYamlUtils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/misc/Duration.vue +17 -10
- package/src/utils/FlowYamlUtils.test.ts +37 -0
- package/src/utils/FlowYamlUtils.ts +41 -16
- package/dist/FlowYamlUtils-BR3BpHdP.cjs +0 -3
package/dist/kestra-index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import xi, { Document as Mi, YAMLMap as Rn } from "yaml";
|
|
2
|
-
import { S as mt, r as Er, E as B, U as xe, h as br, d as Cr, a as kr, c as wr, g as Sr, C as Vi, l as Lr, s as si } from "./VueFlowUtils-
|
|
3
|
-
import { N as Bv, V as zv } from "./VueFlowUtils-
|
|
4
|
-
import { g as Tr, e as Nr, d as Ir, r as $r, a as Ar, f as Or, b as Dr, c as Rr, h as Pr, u as xr, i as Mr, j as Vr, k as Ur, l as Fr, m as Hr, n as Br, s as zr, p as Wr, o as jr, q as Gr, t as Ul, v as Kr, w as Yr, x as Ui, y as Fi, z as qr, A as Xr, B as Fl, C as Zr } from "./FlowYamlUtils-
|
|
2
|
+
import { S as mt, r as Er, E as B, U as xe, h as br, d as Cr, a as kr, c as wr, g as Sr, C as Vi, l as Lr, s as si } from "./VueFlowUtils-CVECjUbY.js";
|
|
3
|
+
import { N as Bv, V as zv } from "./VueFlowUtils-CVECjUbY.js";
|
|
4
|
+
import { g as Tr, e as Nr, d as Ir, r as $r, a as Ar, f as Or, b as Dr, c as Rr, h as Pr, u as xr, i as Mr, j as Vr, k as Ur, l as Fr, m as Hr, n as Br, s as zr, p as Wr, o as jr, q as Gr, t as Ul, v as Kr, w as Yr, x as Ui, y as Fi, z as qr, A as Xr, B as Fl, C as Zr } from "./FlowYamlUtils-ByEGfKdP.js";
|
|
5
5
|
import * as Pn from "vue";
|
|
6
6
|
import { openBlock as u, createElementBlock as c, mergeProps as X, createElementVNode as h, toDisplayString as A, createCommentVNode as _, computed as V, isRef as Jr, defineComponent as ie, createBlock as j, inject as zn, watch as Se, onMounted as yt, onUnmounted as Hl, ref as Z, shallowRef as Jt, h as St, createVNode as x, Text as Rt, Fragment as ue, nextTick as Ut, onBeforeUnmount as Bl, renderSlot as K, createTextVNode as Be, normalizeClass as te, withCtx as U, normalizeStyle as ht, unref as $, toRef as Hi, renderList as Ie, resolveDynamicComponent as qe, createSlots as ui, provide as Bi, normalizeProps as zi, guardReactiveProps as Wi, getCurrentScope as Qr, onScopeDispose as ea, getCurrentInstance as ci, reactive as zl, withModifiers as pn, withAsyncContext as tn, resolveComponent as Wl, toRaw as ta, defineAsyncComponent as na, Comment as ia, Suspense as la } from "vue";
|
|
7
7
|
import { Handle as Ve, useVueFlow as jl, Position as nn, getSmoothStepPath as oa, EdgeLabelRenderer as ra, VueFlow as aa } from "@vue-flow/core";
|
|
@@ -4396,30 +4396,34 @@ const Kd = /* @__PURE__ */ F(Hd, [["render", Gd]]), Yd = { class: "add-task-div
|
|
|
4396
4396
|
Se(
|
|
4397
4397
|
() => t.histories,
|
|
4398
4398
|
(C, P) => {
|
|
4399
|
-
|
|
4399
|
+
C?.[0]?.date?.valueOf() !== P?.[0]?.date?.valueOf() && a();
|
|
4400
4400
|
}
|
|
4401
4401
|
);
|
|
4402
4402
|
const n = Z(""), i = Z();
|
|
4403
4403
|
yt(() => {
|
|
4404
4404
|
a();
|
|
4405
4405
|
});
|
|
4406
|
-
const l = V(() => t.histories?.
|
|
4406
|
+
const l = V(() => t.histories?.[0]?.date?.valueOf() ?? null), o = V(() => t.histories?.length ? t.histories[t.histories.length - 1] : void 0), r = V(() => t.histories.filter((C) => C.date.isValid() && C.date && C.state));
|
|
4407
4407
|
function a() {
|
|
4408
4408
|
i.value || (i.value = setInterval(() => {
|
|
4409
|
-
v(),
|
|
4410
|
-
},
|
|
4409
|
+
v(), o.value && !pe.isRunning(o.value.state) && s();
|
|
4410
|
+
}, 10));
|
|
4411
4411
|
}
|
|
4412
4412
|
function s() {
|
|
4413
4413
|
i.value && (clearInterval(i.value), i.value = void 0);
|
|
4414
4414
|
}
|
|
4415
4415
|
function d() {
|
|
4416
|
-
|
|
4416
|
+
const C = l.value;
|
|
4417
|
+
return C === null ? 0 : Math.max(0, f() - C);
|
|
4417
4418
|
}
|
|
4418
4419
|
function f() {
|
|
4419
|
-
return !
|
|
4420
|
+
return !o.value || pe.isRunning(o.value.state) ? +/* @__PURE__ */ new Date() : o.value.date.valueOf();
|
|
4420
4421
|
}
|
|
4421
4422
|
function v() {
|
|
4422
|
-
n.value = r.value.length === 0 ? " " : br(d() / 1e3
|
|
4423
|
+
n.value = r.value.length === 0 ? " " : br(d() / 1e3, {
|
|
4424
|
+
maxDecimalPoints: 2,
|
|
4425
|
+
units: ["h", "m", "s"]
|
|
4426
|
+
});
|
|
4423
4427
|
}
|
|
4424
4428
|
function p(C) {
|
|
4425
4429
|
return "ks-duration-tt-square-" + C.toLowerCase();
|
|
@@ -4427,7 +4431,7 @@ const Kd = /* @__PURE__ */ F(Hd, [["render", Gd]]), Yd = { class: "add-task-div
|
|
|
4427
4431
|
return Bl(() => {
|
|
4428
4432
|
s();
|
|
4429
4433
|
}), (C, P) => (u(), j(le, {
|
|
4430
|
-
key: o.value
|
|
4434
|
+
key: o.value?.date?.valueOf() ?? C.$t("no_history")
|
|
4431
4435
|
}, {
|
|
4432
4436
|
content: U(() => [
|
|
4433
4437
|
(u(!0), c(ue, null, Ie(r.value, (b, L) => (u(), c("span", {
|