@kestra-io/ui-libs 0.0.282 → 0.0.284

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.
@@ -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
- P[0].date !== C[0].date && a();
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?.length && new Date(t.histories[0].date.toString()).getTime()), o = V(() => t.histories[t.histories.length - 1]), r = V(() => t.histories.filter((C) => C.date.isValid() && C.date && C.state));
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(), t.histories && !pe.isRunning(o.value.state) && s();
4410
- }, 100));
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
- return f() - l.value;
4416
+ const C = l.value;
4417
+ return C === null ? 0 : Math.max(0, f() - C);
4417
4418
  }
4418
4419
  function f() {
4419
- return !t.histories || pe.isRunning(o.value.state) ? +/* @__PURE__ */ new Date() : new Date(o.value.date.toString()).getTime();
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.date.toString()
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", {
@@ -7703,8 +7707,8 @@ const Zo = /* @__PURE__ */ F(jp, [["render", Xp]]), Zp = { class: "border overfl
7703
7707
  Se([() => i.schema, () => i.pluginType], ([b, L], [m, E]) => {
7704
7708
  (b !== m || L !== E) && i.schema.definitions && s();
7705
7709
  });
7706
- const d = (b) => b?.full ? b.code : `id: "${i.pluginType.split(".").reverse()[0]?.toLowerCase()}"
7707
- type: "${i.pluginType}"
7710
+ const d = (b) => b?.full ? b.code : `id: ${i.pluginType.split(".").reverse()[0]?.toLowerCase()}
7711
+ type: ${i.pluginType}
7708
7712
  `.concat(b.code), f = Z(), v = V(() => i.schema.properties?.$examples), p = V(() => Object.fromEntries(
7709
7713
  i.schema.properties?.$metrics?.map((b) => [b.name, { ...b, name: void 0 }])
7710
7714
  )), {
@@ -7735,7 +7739,7 @@ type: "${i.pluginType}"
7735
7739
  highlighter: f.value,
7736
7740
  language: "yaml",
7737
7741
  theme: P,
7738
- code: `type: "${e.pluginType}"`,
7742
+ code: `type: ${e.pluginType}`,
7739
7743
  key: e.pluginType
7740
7744
  }, null, 8, ["highlighter", "code"]))
7741
7745
  ]),
@@ -7866,7 +7870,7 @@ type: "${i.pluginType}"
7866
7870
  ]))
7867
7871
  ]));
7868
7872
  }
7869
- }), xv = /* @__PURE__ */ F(_y, [["__scopeId", "data-v-e4a617c8"]]), Ey = { key: 0 }, by = { class: "type-box rounded fs-7 px-2 py-1" }, Cy = { key: 1 }, ky = { class: "border rounded px-2 py-1" }, wy = { key: 2 }, Sy = { class: "border rounded px-2 py-1" }, Ly = { key: 3 }, Ty = { class: "border rounded px-2 py-1" }, Ny = { key: 4 }, Iy = { class: "border rounded px-2 py-1" }, $y = { key: 5 }, Ay = { class: "border rounded px-2 py-1" }, Oy = { key: 6 }, Dy = { class: "border rounded px-2 py-1" }, Ry = { key: 7 }, Py = { class: "border rounded px-2 py-1" }, xy = { key: 8 }, My = { class: "border rounded px-2 py-1" }, Vy = { key: 9 }, Uy = { class: "border rounded px-2 py-1" }, Fy = { key: 10 }, Hy = { class: "border rounded px-2 py-1" }, By = { key: 11 }, zy = { class: "border rounded px-2 py-1" }, Wy = { key: 12 }, jy = { class: "border rounded px-2 py-1" }, Gy = { key: 13 }, Ky = { class: "values-wrapper d-flex flex-wrap justify-content-end gap-7 p-0" }, Yy = /* @__PURE__ */ ie({
7873
+ }), xv = /* @__PURE__ */ F(_y, [["__scopeId", "data-v-9c18bd6d"]]), Ey = { key: 0 }, by = { class: "type-box rounded fs-7 px-2 py-1" }, Cy = { key: 1 }, ky = { class: "border rounded px-2 py-1" }, wy = { key: 2 }, Sy = { class: "border rounded px-2 py-1" }, Ly = { key: 3 }, Ty = { class: "border rounded px-2 py-1" }, Ny = { key: 4 }, Iy = { class: "border rounded px-2 py-1" }, $y = { key: 5 }, Ay = { class: "border rounded px-2 py-1" }, Oy = { key: 6 }, Dy = { class: "border rounded px-2 py-1" }, Ry = { key: 7 }, Py = { class: "border rounded px-2 py-1" }, xy = { key: 8 }, My = { class: "border rounded px-2 py-1" }, Vy = { key: 9 }, Uy = { class: "border rounded px-2 py-1" }, Fy = { key: 10 }, Hy = { class: "border rounded px-2 py-1" }, By = { key: 11 }, zy = { class: "border rounded px-2 py-1" }, Wy = { key: 12 }, jy = { class: "border rounded px-2 py-1" }, Gy = { key: 13 }, Ky = { class: "values-wrapper d-flex flex-wrap justify-content-end gap-7 p-0" }, Yy = /* @__PURE__ */ ie({
7870
7874
  __name: "PropertyMeta",
7871
7875
  props: {
7872
7876
  property: {},
@@ -8255,8 +8259,8 @@ type: "${i.pluginType}"
8255
8259
  },
8256
8260
  async setup(e) {
8257
8261
  let t, n;
8258
- const i = e, l = (f) => f?.full ? f.code : `id: "${i.pluginType.split(".").reverse()[0]?.toLowerCase()}"
8259
- type: "${i.pluginType}"
8262
+ const i = e, l = (f) => f?.full ? f.code : `id: ${i.pluginType.split(".").reverse()[0]?.toLowerCase()}
8263
+ type: ${i.pluginType}
8260
8264
  `.concat(f.code), o = Z(), r = V(() => i.schema.properties?.$examples), a = V(() => Object.fromEntries(
8261
8265
  i.schema.properties?.$metrics?.map((f) => [f.name, { ...f, name: void 0 }])
8262
8266
  )), { getHighlighterCore: s } = ([t, n] = tn(() => import("./shikiToolset-CQ31F75R.js")), t = await t, n(), t);
@@ -8276,7 +8280,7 @@ type: "${i.pluginType}"
8276
8280
  highlighter: o.value,
8277
8281
  language: "yaml",
8278
8282
  theme: d,
8279
- code: `type: "${e.pluginType}"`,
8283
+ code: `type: ${e.pluginType}`,
8280
8284
  key: e.pluginType
8281
8285
  }, null, 8, ["highlighter", "code"]))
8282
8286
  ]),
@@ -8372,7 +8376,7 @@ type: "${i.pluginType}"
8372
8376
  ]))
8373
8377
  ]));
8374
8378
  }
8375
- }), Mv = /* @__PURE__ */ F(k0, [["__scopeId", "data-v-1fe47a0f"]]), w0 = { class: "d-flex flex-column gap-4" }, S0 = {
8379
+ }), Mv = /* @__PURE__ */ F(k0, [["__scopeId", "data-v-4d644b07"]]), w0 = { class: "d-flex flex-column gap-4" }, S0 = {
8376
8380
  key: 0,
8377
8381
  class: "pb-2"
8378
8382
  }, L0 = { class: "row g-4 last" }, T0 = ["id"], N0 = { class: "row g-4 last" }, I0 = {