@kestra-io/ui-libs 0.0.283 → 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", {