@overvis/hmi-workspace-ui 0.1.0 → 0.1.1

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 (115) hide show
  1. package/dist/alarm-list-sheAq-pb.js +414 -0
  2. package/dist/alarm-rule-dialog-D_ml7V0v.js +417 -0
  3. package/dist/{alarm-rule-lists-C5v1Kf7A.js → alarm-rule-lists-DaA4soF4.js} +123 -125
  4. package/dist/{alarm-rules-page-CqFzofPd.js → alarm-rules-page-OFjOQ-dm.js} +15 -18
  5. package/dist/alert-dialog-B60PF7S9.js +891 -0
  6. package/dist/{base-revision-YCO27zR4.js → base-revision-DYCOZS0R.js} +26 -29
  7. package/dist/{breadcrumbs-0cjsV2cq.js → breadcrumbs-D2u8KZQo.js} +6 -7
  8. package/dist/{catalog-list-DjZojYLJ.js → catalog-list-LXuRix0-.js} +2 -4
  9. package/dist/{code-editor-BVimvjDV.js → code-editor-BMSyzAxu.js} +5 -6
  10. package/dist/dashboard-bindings.js +1 -2
  11. package/dist/{dashboards-page-BlrJguNz.js → dashboards-page-wnmmLpVC.js} +335 -359
  12. package/dist/{de-14WdmJxZ.js → de-hkEr2usK.js} +1 -2
  13. package/dist/diagnostic-text-CsbENUNI.js +116 -0
  14. package/dist/{dialogs-B6BRnf3Q.js → dialogs-AtIYlNSy.js} +219 -227
  15. package/dist/{dialogs-D_v1LeH4.js → dialogs-DsHbKgZD.js} +2523 -2590
  16. package/dist/{display-DmOo23mi.js → display-DSyEwQt8.js} +4 -6
  17. package/dist/{editor-language-To9MxloY.js → editor-language-CTfJBXMs.js} +3 -5
  18. package/dist/editor-page-BWbVGJvU.js +1337 -0
  19. package/dist/{en-BgercpT0.js → en-UW_k-Bd6.js} +1 -2
  20. package/dist/entity-controls-BCuRx882.js +71 -0
  21. package/dist/errors-Cawve9yD.js +25 -0
  22. package/dist/{footer-DC-Q0052.js → footer-B9XdpVzq.js} +2404 -2515
  23. package/dist/host.js +8143 -675
  24. package/dist/{i18n-BgzakKoC.js → i18n-Dt6xbSK6.js} +77 -90
  25. package/dist/i18n.js +1 -2
  26. package/dist/index.js +5149 -5345
  27. package/dist/{lat-lng-B12P7QyY.js → lat-lng-Bl77AGSO.js} +1 -2
  28. package/dist/{list-page-CvsdZb86.js → list-page-agHupfNb.js} +116 -123
  29. package/dist/{location-map-renderer-DO5yfdSU.js → location-map-renderer-kxU6cgFl.js} +6 -6
  30. package/dist/{location-picker-renderer-CjCxg6ai.js → location-picker-renderer-B1_-n8lf.js} +3 -4
  31. package/dist/{model-B8gGi4OK.js → model-tpg_xpFB.js} +1 -2
  32. package/dist/{notice-card-DyGywFsW.js → notice-card-CH28rYUt.js} +54 -58
  33. package/dist/{page-v6LCwswN.js → page-CZPHJUmz.js} +92 -100
  34. package/dist/page-DpdkOGGb.js +449 -0
  35. package/dist/page-HCGXXGjy.js +507 -0
  36. package/dist/panel-BCwBlB_h.js +949 -0
  37. package/dist/parameter-values.js +3 -16
  38. package/dist/{pl-lQ9HXV9k.js → pl-BokvsP3J.js} +1 -2
  39. package/dist/presence-code-cT6wxlTg.js +73 -0
  40. package/dist/{query-gate-DVhNIkge.js → query-gate-DqmHsZ07.js} +6 -6
  41. package/dist/{provider-DoEpKcQ-.js → quick-report-DEqqwQxR.js} +9423 -5102
  42. package/dist/{retention-BYXNpYmR.js → retention-DZ0reGGe.js} +4 -6
  43. package/dist/retention-note-nequESpo.js +40 -0
  44. package/dist/{rolldown-runtime-Dy4uBu1J.js → rolldown-runtime-CGnMp29N.js} +1 -2
  45. package/dist/{ru-qTKINoUj.js → ru-DZSlsRHq.js} +1 -2
  46. package/dist/run-text-DneX9rWh.js +112 -0
  47. package/dist/{search-D4rDnE9T.js → search-DP9_alSQ.js} +26 -29
  48. package/dist/{sections-kCOyc4NR.js → sections-BU7NKUOQ.js} +2 -3
  49. package/dist/{select-BKiOWdSr.js → select-Te6Qv1Zu.js} +17 -23
  50. package/dist/{spinner-C-HPNxOc.js → spinner-BRcNKwjH.js} +182 -201
  51. package/dist/src/version.d.ts +1 -1
  52. package/dist/src/workspace/local-workspace-app.d.ts +1 -1
  53. package/dist/src/workspace/routes.d.ts +1 -1
  54. package/dist/{starter-fields-BRLX0z-v.js → starter-fields-yM4B49nd.js} +154 -157
  55. package/dist/{starter-handoff-BA3ucMKL.js → starter-handoff-BaK8Ss8I.js} +1 -2
  56. package/dist/styles.css +1 -1
  57. package/dist/ui.js +334 -374
  58. package/dist/{uk-CwpJAxmx.js → uk-CjXPq9Lk.js} +1 -2
  59. package/dist/{wireguard-docs-AfU6NzTL.js → wireguard-docs-CC8XKBR7.js} +14 -17
  60. package/package.json +15 -9
  61. package/dist/alarm-list-BL3xQ5Lf.js +0 -423
  62. package/dist/alarm-rule-dialog-S1ZUg-74.js +0 -423
  63. package/dist/alert-B8MAoIO8.js +0 -45
  64. package/dist/alert-dialog-CYkuMg5D.js +0 -129
  65. package/dist/api-error-9rQmUN5L.js +0 -93
  66. package/dist/breadcrumb-DzVL1yHa.js +0 -74
  67. package/dist/button-6SxPBYMz.js +0 -44
  68. package/dist/context-u9KJQmdB.js +0 -102
  69. package/dist/copyable-id-DYGiAcnq.js +0 -40
  70. package/dist/dashboard-context-CBfG6DoT.js +0 -191
  71. package/dist/date-time-picker-C3FhMXk6.js +0 -266
  72. package/dist/diagnostic-text-BAkzW0SE.js +0 -111
  73. package/dist/diagnostic-text-DiKd2i1w.js +0 -76
  74. package/dist/dialog-BIhQXcZC.js +0 -237
  75. package/dist/dialog-BqyIxMD-.js +0 -54
  76. package/dist/dropdown-menu-DSzbBq3v.js +0 -136
  77. package/dist/editor-page-BiSZJz5b.js +0 -1353
  78. package/dist/empty-B-QJ-06w.js +0 -59
  79. package/dist/entity-controls-D1K4Ot3O.js +0 -76
  80. package/dist/errors-CcsvDHu8.js +0 -26
  81. package/dist/history-page-sAAhG54V.js +0 -1400
  82. package/dist/icon-D-pR9htW.js +0 -57
  83. package/dist/index-page-DMH82fZe.js +0 -214
  84. package/dist/item-B5SaTFQU.js +0 -120
  85. package/dist/mutation-form-validators-BNz5bsv1.js +0 -2408
  86. package/dist/mutations-THtGG6Ai.js +0 -240
  87. package/dist/page-2KPemaAj.js +0 -328
  88. package/dist/page-6rIoTg2L.js +0 -459
  89. package/dist/page-C6giEoEd.js +0 -1935
  90. package/dist/page-DCbTxKsi.js +0 -313
  91. package/dist/page-DWO427hT.js +0 -208
  92. package/dist/page-LXu_2zm3.js +0 -137
  93. package/dist/page-aaUiVOnk.js +0 -513
  94. package/dist/page-header-RB2YFWlE.js +0 -55
  95. package/dist/page-title-CdCbiLt8.js +0 -14
  96. package/dist/panel-DDy8tUNR.js +0 -338
  97. package/dist/presence-code-BfSXr50g.js +0 -83
  98. package/dist/progress-C7cxNJA1.js +0 -83
  99. package/dist/provider-BOeYHi0n.js +0 -134
  100. package/dist/quick-report-CUVJnbKP.js +0 -416
  101. package/dist/radio-group-CZGqVbkJ.js +0 -26
  102. package/dist/retention-note-CHhA6gjY.js +0 -42
  103. package/dist/run-text-DvaO8LDF.js +0 -113
  104. package/dist/select-eNgZdZ30.js +0 -521
  105. package/dist/skeleton-6yk8Tdh5.js +0 -19
  106. package/dist/slider-DorDsoF8.js +0 -37
  107. package/dist/status-page-DAHiKM9P.js +0 -3286
  108. package/dist/switch-BqD0RH_G.js +0 -18
  109. package/dist/table-Q2-voLuw.js +0 -65
  110. package/dist/tabs-CSIucYFP.js +0 -57
  111. package/dist/theme-provider-BkRohQFU.js +0 -61
  112. package/dist/toggle-group-9Bs0Mm3r.js +0 -82
  113. package/dist/trpc-CvJUuUXp.js +0 -153
  114. package/dist/utils-CX-Pz5p6.js +0 -8
  115. package/dist/writability-BuH-spxv.js +0 -57
@@ -1,4 +1,4 @@
1
- //#region src/workspace/maps/lat-lng.ts
1
+ // src/workspace/maps/lat-lng.ts
2
2
  function e(e) {
3
3
  if (e == null) return null;
4
4
  let t = typeof e.lat == "function" ? e.lat() : e.lat, n = typeof e.lng == "function" ? e.lng() : e.lng;
@@ -7,5 +7,4 @@ function e(e) {
7
7
  lng: n
8
8
  };
9
9
  }
10
- //#endregion
11
10
  export { e as t };
@@ -1,34 +1,29 @@
1
- import { r as e } from "./trpc-CvJUuUXp.js";
2
- import { h as t, m as n, n as r } from "./i18n-BgzakKoC.js";
3
- import { a as i, d as a, t as o } from "./mutation-form-validators-BNz5bsv1.js";
4
- import { l as s } from "./spinner-C-HPNxOc.js";
5
- import { t as c } from "./button-6SxPBYMz.js";
6
- import { a as l, i as u, l as d, o as f, r as p, t as m } from "./dialog-BIhQXcZC.js";
7
- import { n as h } from "./skeleton-6yk8Tdh5.js";
8
- import { n as g } from "./api-error-9rQmUN5L.js";
9
- import { t as _ } from "./page-header-RB2YFWlE.js";
10
- import { i as v, r as y, t as b } from "./tabs-CSIucYFP.js";
11
- import { r as x, t as S } from "./query-gate-DVhNIkge.js";
12
- import { t as C } from "./breadcrumbs-0cjsV2cq.js";
13
- import { a as w, c as T, d as E, i as D, l as O, n as k, o as A, r as j, s as M, t as ee, u as te } from "./catalog-list-DjZojYLJ.js";
14
- import { t as ne } from "./run-text-DvaO8LDF.js";
15
- import { i as re, n as ie, r as ae, t as oe } from "./starter-fields-BRLX0z-v.js";
16
- import { r as N } from "./starter-handoff-BA3ucMKL.js";
17
- import { n as P, t as F } from "./entity-controls-D1K4Ot3O.js";
1
+ import { Kn as e, Qn as t, Wn as n, ii as r, zn as i } from "./quick-report-DEqqwQxR.js";
2
+ import { h as a, m as o, n as s } from "./i18n-Dt6xbSK6.js";
3
+ import { B as c, H as l, K as u, R as d, U as f, V as p, jt as m, xt as h } from "./alert-dialog-B60PF7S9.js";
4
+ import { l as g } from "./spinner-BRcNKwjH.js";
5
+ import { a as _, b as v, i as y, n as b } from "./panel-BCwBlB_h.js";
6
+ import { r as x, t as S } from "./query-gate-DqmHsZ07.js";
7
+ import { t as C } from "./breadcrumbs-D2u8KZQo.js";
8
+ import { a as w, c as T, d as E, i as D, l as O, n as k, o as A, r as j, s as M, t as ee, u as te } from "./catalog-list-LXuRix0-.js";
9
+ import { t as ne } from "./run-text-DneX9rWh.js";
10
+ import { i as re, n as ie, r as ae, t as oe } from "./starter-fields-yM4B49nd.js";
11
+ import { r as N } from "./starter-handoff-BaK8Ss8I.js";
12
+ import { n as P, t as F } from "./entity-controls-BCuRx882.js";
18
13
  import { useRef as I, useState as L } from "react";
19
14
  import { Fragment as R, jsx as z, jsxs as B } from "react/jsx-runtime";
20
15
  import { LayoutTemplateIcon as V, PlusIcon as H, Trash2Icon as U, WorkflowIcon as W } from "lucide-react";
21
16
  import { formatAppDateTime as G, resolveLocalized as K } from "@overvis/hmi-shared";
22
17
  import { useNavigate as q } from "@tanstack/react-router";
23
- //#region src/workspace/setup/automations/starter-dialog.tsx
18
+ // src/workspace/setup/automations/starter-dialog.tsx
24
19
  function J({ workspaceId: e, kind: t, onClose: n }) {
25
20
  let [r, i] = L(null), [a, o] = L(!1);
26
- return /* @__PURE__ */ z(m, {
21
+ return /* @__PURE__ */ z(d, {
27
22
  open: !0,
28
23
  onOpenChange: (e) => {
29
24
  !e && !a && n();
30
25
  },
31
- children: /* @__PURE__ */ z(p, {
26
+ children: /* @__PURE__ */ z(c, {
32
27
  className: "sm:max-w-xl",
33
28
  showCloseButton: !a,
34
29
  children: r == null ? /* @__PURE__ */ z(se, {
@@ -47,18 +42,18 @@ function J({ workspaceId: e, kind: t, onClose: n }) {
47
42
  })
48
43
  });
49
44
  }
50
- function se({ workspaceId: t, kind: r, onPick: i }) {
51
- let a = n(), o = e.templates.automation.list.useQuery({
52
- workspaceId: t,
53
- kind: r
45
+ function se({ workspaceId: e, kind: t, onPick: i }) {
46
+ let a = o(), s = r.templates.automation.list.useQuery({
47
+ workspaceId: e,
48
+ kind: t
54
49
  });
55
- return /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ B(f, { children: [/* @__PURE__ */ z(d, { children: a("automation_starter_title") }), /* @__PURE__ */ z(u, { children: a("automation_starter_pick_description") })] }), /* @__PURE__ */ z(x, {
56
- query: o,
50
+ return /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ B(f, { children: [/* @__PURE__ */ z(u, { children: a("automation_starter_title") }), /* @__PURE__ */ z(p, { children: a("automation_starter_pick_description") })] }), /* @__PURE__ */ z(x, {
51
+ query: s,
57
52
  loading: /* @__PURE__ */ B("div", {
58
53
  className: "flex flex-col gap-2",
59
54
  children: [/* @__PURE__ */ z(h, { className: "h-14 w-full" }), /* @__PURE__ */ z(h, { className: "h-14 w-full" })]
60
55
  }),
61
- error: (e) => /* @__PURE__ */ z(S, { message: g(e) }),
56
+ error: (e) => /* @__PURE__ */ z(S, { message: n(e) }),
62
57
  isEmpty: (e) => e.starters.length === 0,
63
58
  empty: /* @__PURE__ */ z("p", {
64
59
  className: "text-muted-foreground",
@@ -70,20 +65,20 @@ function se({ workspaceId: t, kind: r, onPick: i }) {
70
65
  })
71
66
  })] });
72
67
  }
73
- function ce({ workspaceId: r, starterId: i, onBack: a, onBuilt: o, onBuilding: s }) {
74
- let c = n(), l = t(), u = e.templates.automation.get.useQuery({
75
- workspaceId: r,
76
- starterId: i
77
- }), d = e.automation.validationContext.useQuery({ workspaceId: r }), f = new Set((u.data?.placeholders ?? []).flatMap((e) => e.kind === "list" ? e.fields.map((e) => e.kind) : [e.kind])), p = e.endpoint.list.useQuery({ workspaceId: r }, { enabled: f.has("endpoint") }), m = e.alarmRule.list.useQuery({ workspaceId: r }, { enabled: f.has("alarmRule") }), _ = e.automation.members.useQuery({ workspaceId: r }, { enabled: f.has("recipients") }), v = [
78
- u,
68
+ function ce({ workspaceId: e, starterId: t, onBack: i, onBuilt: s, onBuilding: c }) {
69
+ let l = o(), u = a(), d = r.templates.automation.get.useQuery({
70
+ workspaceId: e,
71
+ starterId: t
72
+ }), f = r.automation.validationContext.useQuery({ workspaceId: e }), p = new Set((d.data?.placeholders ?? []).flatMap((e) => e.kind === "list" ? e.fields.map((e) => e.kind) : [e.kind])), m = r.endpoint.list.useQuery({ workspaceId: e }, { enabled: p.has("endpoint") }), g = r.alarmRule.list.useQuery({ workspaceId: e }, { enabled: p.has("alarmRule") }), _ = r.automation.members.useQuery({ workspaceId: e }, { enabled: p.has("recipients") }), v = [
79
73
  d,
80
- ...f.has("endpoint") ? [p] : [],
81
- ...f.has("alarmRule") ? [m] : [],
82
- ...f.has("recipients") ? [_] : []
74
+ f,
75
+ ...p.has("endpoint") ? [m] : [],
76
+ ...p.has("alarmRule") ? [g] : [],
77
+ ...p.has("recipients") ? [_] : []
83
78
  ], y = (e) => e.map((e) => ({
84
79
  id: e.id,
85
- name: K(e.name, l)
86
- })), b = u.data, C = d.data, w = new Map((C?.parameters ?? []).map((e) => [e.id, e])), T = b != null && C != null && v.every((e) => e.data != null);
80
+ name: K(e.name, u)
81
+ })), b = d.data, C = f.data, w = new Map((C?.parameters ?? []).map((e) => [e.id, e])), T = b != null && C != null && v.every((e) => e.data != null);
87
82
  return /* @__PURE__ */ z(x, {
88
83
  query: {
89
84
  isLoading: v.some((e) => e.isLoading),
@@ -96,8 +91,8 @@ function ce({ workspaceId: r, starterId: i, onBack: a, onBuilt: o, onBuilding: s
96
91
  let n = w.get(t), r = e.valueTypes;
97
92
  return n !== void 0 && (r === void 0 || r.includes(n.type)) && (e.writable !== !0 || n.writable);
98
93
  },
99
- endpoints: y(p.data?.endpoints ?? []),
100
- alarmRules: y(m.data?.items ?? []),
94
+ endpoints: y(m.data?.endpoints ?? []),
95
+ alarmRules: y(g.data?.items ?? []),
101
96
  branches: [],
102
97
  members: _.data?.members ?? []
103
98
  }
@@ -107,79 +102,79 @@ function ce({ workspaceId: r, starterId: i, onBack: a, onBuilt: o, onBuilding: s
107
102
  className: "flex flex-col gap-4",
108
103
  children: [/* @__PURE__ */ z(h, { className: "h-6 w-48" }), /* @__PURE__ */ z(h, { className: "h-40 w-full" })]
109
104
  }),
110
- error: (e) => /* @__PURE__ */ z(S, { message: e == null ? c("error_request_failed") : g(e) }),
111
- children: (e) => /* @__PURE__ */ z(le, {
112
- workspaceId: r,
113
- starter: e.starter,
114
- data: e.data,
115
- onBack: a,
116
- onBuilt: o,
117
- onBuilding: s
105
+ error: (e) => /* @__PURE__ */ z(S, { message: e == null ? l("error_request_failed") : n(e) }),
106
+ children: (t) => /* @__PURE__ */ z(le, {
107
+ workspaceId: e,
108
+ starter: t.starter,
109
+ data: t.data,
110
+ onBack: i,
111
+ onBuilt: s,
112
+ onBuilding: c
118
113
  })
119
114
  });
120
115
  }
121
- function le({ workspaceId: r, starter: s, data: p, onBack: m, onBuilt: h, onBuilding: g }) {
122
- let _ = n(), v = t(), y = q(), b = e.useUtils(), [x, S] = L([]), C = I(1e3), w = () => `row-${String(C.current++)}`, T = i({
116
+ function le({ workspaceId: n, starter: s, data: c, onBack: d, onBuilt: h, onBuilding: g }) {
117
+ let _ = o(), v = a(), y = q(), b = r.useUtils(), [x, S] = L([]), C = I(1e3), w = () => `row-${String(C.current++)}`, T = e({
123
118
  defaultValues: { values: ae(s.placeholders) },
124
- validators: o({ submit: async (e) => {
125
- let t = re(s.placeholders, e.values), n;
119
+ validators: i({ submit: async (e) => {
120
+ let t = re(s.placeholders, e.values), r;
126
121
  g(!0);
127
122
  try {
128
- n = t.ok ? await b.client.templates.automation.instantiate.query({
129
- workspaceId: r,
123
+ r = t.ok ? await b.client.templates.automation.instantiate.query({
124
+ workspaceId: n,
130
125
  starterId: s.id,
131
126
  values: t.values
132
127
  }) : t;
133
128
  } finally {
134
129
  g(!1);
135
130
  }
136
- if (!n.ok) return S(n.problems), {
131
+ if (!r.ok) return S(r.problems), {
137
132
  form: () => _("starter_fix_problems"),
138
133
  fields: {}
139
134
  };
140
135
  S([]);
141
- let i = n.kind === "automation" ? {
136
+ let i = r.kind === "automation" ? {
142
137
  kind: "automation",
143
- document: n.document
138
+ document: r.document
144
139
  } : {
145
140
  kind: "alarmRule",
146
- document: n.document
141
+ document: r.document
147
142
  };
148
143
  return h(), y({
149
144
  to: i.kind === "automation" ? "/workspace/$workspaceId/setup/automations/new" : "/workspace/$workspaceId/setup/automations/alarm-rules/new",
150
- params: { workspaceId: r },
145
+ params: { workspaceId: n },
151
146
  state: N(i)
152
147
  }), null;
153
148
  } }),
154
- onSubmitInvalid: a
149
+ onSubmitInvalid: t
155
150
  }), E = (e) => {
156
151
  S((t) => t.filter((t) => t.path !== e && !t.path.startsWith(`${e}/`)));
157
152
  };
158
153
  return /* @__PURE__ */ z(T.AppForm, { children: /* @__PURE__ */ B(T.FormRoot, {
159
154
  layout: "dialog",
160
155
  children: [
161
- /* @__PURE__ */ B(f, { children: [/* @__PURE__ */ z(d, { children: K(s.name, v) }), /* @__PURE__ */ z(u, { children: K(s.description, v) })] }),
156
+ /* @__PURE__ */ B(f, { children: [/* @__PURE__ */ z(u, { children: K(s.name, v) }), /* @__PURE__ */ z(p, { children: K(s.description, v) })] }),
162
157
  /* @__PURE__ */ z(T.AppField, {
163
158
  name: "values",
164
159
  children: (e) => /* @__PURE__ */ z(ie, {
165
- workspaceId: r,
160
+ workspaceId: n,
166
161
  placeholders: s.placeholders,
167
162
  values: e.state.value,
168
163
  onChange: (t, n) => {
169
164
  E(n), e.handleChange(t);
170
165
  },
171
166
  problems: x,
172
- data: p,
167
+ data: c,
173
168
  newKey: w
174
169
  })
175
170
  }),
176
171
  /* @__PURE__ */ B(l, { children: [/* @__PURE__ */ z(T.Subscribe, {
177
172
  selector: (e) => e.isSubmitting,
178
- children: (e) => /* @__PURE__ */ z(c, {
173
+ children: (e) => /* @__PURE__ */ z(m, {
179
174
  type: "button",
180
175
  variant: "outline",
181
176
  disabled: e,
182
- onClick: m,
177
+ onClick: d,
183
178
  children: _("starter_back")
184
179
  })
185
180
  }), /* @__PURE__ */ z(T.SubmitButton, {
@@ -189,96 +184,95 @@ function le({ workspaceId: r, starter: s, data: p, onBack: m, onBuilt: h, onBuil
189
184
  ]
190
185
  }) });
191
186
  }
192
- //#endregion
193
- //#region src/workspace/setup/automations/list-page.tsx
187
+ // src/workspace/setup/automations/list-page.tsx
194
188
  function Y({ workspaceId: e, active: t }) {
195
- let r = n(), i = q();
189
+ let n = o(), r = q();
196
190
  return /* @__PURE__ */ z(b, {
197
191
  value: t,
198
192
  onValueChange: (t) => {
199
- t === "automations" ? i({
193
+ t === "automations" ? r({
200
194
  to: "/workspace/$workspaceId/setup/automations",
201
195
  params: { workspaceId: e }
202
- }) : t === "alarm-rules" && i({
196
+ }) : t === "alarm-rules" && r({
203
197
  to: "/workspace/$workspaceId/setup/automations/alarm-rules",
204
198
  params: { workspaceId: e }
205
199
  });
206
200
  },
207
201
  children: /* @__PURE__ */ B(y, {
208
202
  variant: "line",
209
- children: [/* @__PURE__ */ z(v, {
203
+ children: [/* @__PURE__ */ z(_, {
210
204
  value: "automations",
211
- children: r("automation_tab_automations")
212
- }), /* @__PURE__ */ z(v, {
205
+ children: n("automation_tab_automations")
206
+ }), /* @__PURE__ */ z(_, {
213
207
  value: "alarm-rules",
214
- children: r("automation_tab_alarm_rules")
208
+ children: n("automation_tab_alarm_rules")
215
209
  })]
216
210
  })
217
211
  });
218
212
  }
219
213
  function X({ errors: e, warnings: t }) {
220
- let r = n();
221
- return /* @__PURE__ */ B(R, { children: [e > 0 ? /* @__PURE__ */ z(s, {
214
+ let n = o();
215
+ return /* @__PURE__ */ B(R, { children: [e > 0 ? /* @__PURE__ */ z(g, {
222
216
  variant: "destructive",
223
- children: r("automation_error_count", { count: String(e) })
224
- }) : null, t > 0 ? /* @__PURE__ */ z(s, {
217
+ children: n("automation_error_count", { count: String(e) })
218
+ }) : null, t > 0 ? /* @__PURE__ */ z(g, {
225
219
  variant: "warning",
226
- children: r("automation_warning_count", { count: String(t) })
220
+ children: n("automation_warning_count", { count: String(t) })
227
221
  }) : null] });
228
222
  }
229
- function Z(n) {
230
- let r = t(), i = e.dashboard.list.useQuery({ workspaceId: n });
223
+ function Z(e) {
224
+ let t = a(), n = r.dashboard.list.useQuery({ workspaceId: e });
231
225
  return (e) => {
232
226
  if (e == null) return null;
233
- let t = i.data?.dashboards.find((t) => t.id === e);
234
- return t == null ? null : K(t.name, r);
227
+ let r = n.data?.dashboards.find((t) => t.id === e);
228
+ return r == null ? null : K(r.name, t);
235
229
  };
236
230
  }
237
231
  function ue({ run: e }) {
238
- let t = n();
232
+ let t = o();
239
233
  if (e === void 0) return /* @__PURE__ */ z(A, { children: t("automation_last_run_none") });
240
- let r = G(e.startedAt);
241
- return e.status === "ok" ? /* @__PURE__ */ z(A, { children: t("automation_last_run_ok", { at: r }) }) : /* @__PURE__ */ z(A, {
234
+ let n = G(e.startedAt);
235
+ return e.status === "ok" ? /* @__PURE__ */ z(A, { children: t("automation_last_run_ok", { at: n }) }) : /* @__PURE__ */ z(A, {
242
236
  className: "text-destructive",
243
237
  children: t("automation_last_run_failed", {
244
- at: r,
238
+ at: n,
245
239
  error: ne(e.errorCode ?? "", e.error)
246
240
  })
247
241
  });
248
242
  }
249
- function Q({ workspaceId: i }) {
250
- let a = n(), o = r(), s = t(), l = q(), u = e.automation.list.useQuery({ workspaceId: i }), d = e.automation.latestRuns.useQuery({ workspaceId: i }), f = Z(i), [p, m] = L(null), [v, y] = L(!1), b = new Map(d.data?.items.map((e) => [e.automationId, e.run]));
243
+ function Q({ workspaceId: e }) {
244
+ let t = o(), i = s(), c = a(), l = q(), u = r.automation.list.useQuery({ workspaceId: e }), d = r.automation.latestRuns.useQuery({ workspaceId: e }), f = Z(e), [p, g] = L(null), [_, y] = L(!1), b = new Map(d.data?.items.map((e) => [e.automationId, e.run]));
251
245
  return /* @__PURE__ */ B(O, { children: [
252
- /* @__PURE__ */ z(_, {
246
+ /* @__PURE__ */ z(v, {
253
247
  icon: /* @__PURE__ */ z(W, {}),
254
- breadcrumbs: /* @__PURE__ */ z(C, { workspaceId: i }),
255
- title: a("setup_automations_title"),
256
- description: a("setup_automations_description"),
248
+ breadcrumbs: /* @__PURE__ */ z(C, { workspaceId: e }),
249
+ title: t("setup_automations_title"),
250
+ description: t("setup_automations_description"),
257
251
  actions: /* @__PURE__ */ B("div", {
258
252
  className: "flex items-center gap-2",
259
- children: [/* @__PURE__ */ B(c, {
253
+ children: [/* @__PURE__ */ B(m, {
260
254
  type: "button",
261
255
  size: "sm",
262
256
  variant: "outline",
263
257
  onClick: () => {
264
258
  y(!0);
265
259
  },
266
- children: [/* @__PURE__ */ z(V, { "data-icon": "inline-start" }), a("automation_starter_action")]
267
- }), /* @__PURE__ */ B(c, {
260
+ children: [/* @__PURE__ */ z(V, { "data-icon": "inline-start" }), t("automation_starter_action")]
261
+ }), /* @__PURE__ */ B(m, {
268
262
  type: "button",
269
263
  size: "sm",
270
264
  onClick: () => {
271
265
  l({
272
266
  to: "/workspace/$workspaceId/setup/automations/new",
273
- params: { workspaceId: i }
267
+ params: { workspaceId: e }
274
268
  });
275
269
  },
276
- children: [/* @__PURE__ */ z(H, { "data-icon": "inline-start" }), a("automation_create_action")]
270
+ children: [/* @__PURE__ */ z(H, { "data-icon": "inline-start" }), t("automation_create_action")]
277
271
  })]
278
272
  })
279
273
  }),
280
274
  /* @__PURE__ */ B(k, { children: [/* @__PURE__ */ z(Y, {
281
- workspaceId: i,
275
+ workspaceId: e,
282
276
  active: "automations"
283
277
  }), /* @__PURE__ */ z(x, {
284
278
  query: u,
@@ -286,56 +280,56 @@ function Q({ workspaceId: i }) {
286
280
  className: "space-y-2",
287
281
  children: [/* @__PURE__ */ z(h, { className: "h-10 w-full" }), /* @__PURE__ */ z(h, { className: "h-10 w-4/5" })]
288
282
  }),
289
- error: (e) => /* @__PURE__ */ z(S, { message: g(e) }),
283
+ error: (e) => /* @__PURE__ */ z(S, { message: n(e) }),
290
284
  isEmpty: (e) => e.items.length === 0,
291
- empty: /* @__PURE__ */ z(j, { children: a("setup_automations_empty") }),
292
- children: ({ items: e }) => /* @__PURE__ */ z(w, { children: e.map((e) => {
293
- let t = f(e.dashboardId);
285
+ empty: /* @__PURE__ */ z(j, { children: t("setup_automations_empty") }),
286
+ children: ({ items: n }) => /* @__PURE__ */ z(w, { children: n.map((n) => {
287
+ let r = f(n.dashboardId);
294
288
  return /* @__PURE__ */ B(te, { children: [/* @__PURE__ */ B(T, {
295
289
  to: "/workspace/$workspaceId/setup/automations/$automationId",
296
290
  params: {
297
- workspaceId: i,
298
- automationId: e.id
291
+ workspaceId: e,
292
+ automationId: n.id
299
293
  },
300
294
  className: "sm:flex-col sm:items-start",
301
295
  children: [
302
296
  /* @__PURE__ */ B("div", {
303
297
  className: "flex min-w-0 flex-wrap items-center gap-2",
304
- children: [/* @__PURE__ */ z(M, { children: K(e.name, s) }), /* @__PURE__ */ z(X, {
305
- errors: e.errorCount,
306
- warnings: e.warningCount
298
+ children: [/* @__PURE__ */ z(M, { children: K(n.name, c) }), /* @__PURE__ */ z(X, {
299
+ errors: n.errorCount,
300
+ warnings: n.warningCount
307
301
  })]
308
302
  }),
309
- t == null ? null : /* @__PURE__ */ z(A, { children: a("automation_owned_by", { owner: t }) }),
310
- d.isSuccess ? /* @__PURE__ */ z(ue, { run: b.get(e.id) }) : null
303
+ r == null ? null : /* @__PURE__ */ z(A, { children: t("automation_owned_by", { owner: r }) }),
304
+ d.isSuccess ? /* @__PURE__ */ z(ue, { run: b.get(n.id) }) : null
311
305
  ]
312
306
  }), /* @__PURE__ */ B(ee, { children: [/* @__PURE__ */ z(P, {
313
- workspaceId: i,
314
- entity: e,
307
+ workspaceId: e,
308
+ entity: n,
315
309
  kind: "automation"
316
310
  }), /* @__PURE__ */ z(D, { children: /* @__PURE__ */ z(E, {
317
311
  tone: "destructive",
318
- "aria-label": a("automation_delete_action"),
312
+ "aria-label": t("automation_delete_action"),
319
313
  onClick: () => {
320
- m(e);
314
+ g(n);
321
315
  },
322
316
  children: /* @__PURE__ */ z(U, {})
323
- }) })] })] }, e.id);
317
+ }) })] })] }, n.id);
324
318
  }) })
325
319
  })] }),
326
320
  /* @__PURE__ */ z($, {
327
- workspaceId: i,
321
+ workspaceId: e,
328
322
  kind: "automation",
329
323
  entity: p,
330
324
  onClose: () => {
331
- m(null);
325
+ g(null);
332
326
  },
333
327
  onDeleted: () => {
334
- m(null), o.success(a("automation_delete_toast"));
328
+ g(null), i.success(t("automation_delete_toast"));
335
329
  }
336
330
  }),
337
- v ? /* @__PURE__ */ z(J, {
338
- workspaceId: i,
331
+ _ ? /* @__PURE__ */ z(J, {
332
+ workspaceId: e,
339
333
  kind: "automation",
340
334
  onClose: () => {
341
335
  y(!1);
@@ -344,12 +338,12 @@ function Q({ workspaceId: i }) {
344
338
  ] });
345
339
  }
346
340
  function $({ workspaceId: e, kind: t, entity: n, onClose: r, onDeleted: i }) {
347
- return /* @__PURE__ */ z(m, {
341
+ return /* @__PURE__ */ z(d, {
348
342
  open: n != null,
349
343
  onOpenChange: (e) => {
350
344
  e || r();
351
345
  },
352
- children: /* @__PURE__ */ z(p, { children: n == null ? null : /* @__PURE__ */ z(F, {
346
+ children: /* @__PURE__ */ z(c, { children: n == null ? null : /* @__PURE__ */ z(F, {
353
347
  workspaceId: e,
354
348
  kind: t,
355
349
  id: n.id,
@@ -359,5 +353,4 @@ function $({ workspaceId: e, kind: t, entity: n, onClose: r, onDeleted: i }) {
359
353
  }) })
360
354
  });
361
355
  }
362
- //#endregion
363
356
  export { Y as AutomationSectionTabs, $ as DeleteDialog, X as ProblemBadges, Q as SetupAutomationsPage, J as t, Z as useDashboardNames };
@@ -1,9 +1,9 @@
1
- import { t as e } from "./utils-CX-Pz5p6.js";
1
+ import { Nt as e } from "./alert-dialog-B60PF7S9.js";
2
2
  import { useCallback as t, useEffect as n, useEffectEvent as r, useState as i } from "react";
3
3
  import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
4
4
  import { APIProvider as c, AdvancedMarker as l, InfoWindow as u, Map as d, useMap as f } from "@vis.gl/react-google-maps";
5
5
  import { MarkerClusterer as p } from "@googlemaps/markerclusterer";
6
- //#region src/workspace/maps/location-map-renderer.tsx
6
+ // src/workspace/maps/location-map-renderer.tsx
7
7
  var m = {
8
8
  normal: 0,
9
9
  warning: 1,
@@ -131,15 +131,15 @@ function v(e) {
131
131
  return new Map(e.map(({ id: e, tone: t }) => [e, t ?? "normal"]));
132
132
  }
133
133
  function y({ location: e, register: n, onClick: r }) {
134
+ let i = t((t) => {
135
+ n(e.id, t);
136
+ }, [n, e.id]);
134
137
  return /* @__PURE__ */ o(l, {
135
- ref: t((t) => {
136
- n(e.id, t);
137
- }, [n, e.id]),
138
+ ref: i,
138
139
  position: e.position,
139
140
  title: e.title ?? e.name,
140
141
  onClick: r,
141
142
  children: e.marker
142
143
  });
143
144
  }
144
- //#endregion
145
145
  export { g as default };
@@ -1,8 +1,8 @@
1
- import { t as e } from "./lat-lng-B12P7QyY.js";
1
+ import { t as e } from "./lat-lng-Bl77AGSO.js";
2
2
  import { useEffect as t, useState as n } from "react";
3
3
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
4
4
  import { APIProvider as a, AdvancedMarker as o, Map as s, useMap as c } from "@vis.gl/react-google-maps";
5
- //#region src/workspace/maps/location-picker-renderer.tsx
5
+ // src/workspace/maps/location-picker-renderer.tsx
6
6
  var l = {
7
7
  lat: 20,
8
8
  lng: 0
@@ -88,7 +88,7 @@ function f({ positions: e }) {
88
88
  function p({ value: e }) {
89
89
  let n = c(), r = e?.lat, i = e?.lng;
90
90
  return t(() => {
91
- n == null || r == null || i == null || n.getBounds()?.contains({
91
+ n != null && r != null && i != null && n.getBounds()?.contains({
92
92
  lat: r,
93
93
  lng: i
94
94
  }) !== !0 && n.panTo({
@@ -101,5 +101,4 @@ function p({ value: e }) {
101
101
  i
102
102
  ]), null;
103
103
  }
104
- //#endregion
105
104
  export { d as default };
@@ -1,9 +1,8 @@
1
1
  import { resolveLocalized as e } from "@overvis/hmi-shared";
2
- //#region src/workspace/page-state/model.ts
2
+ // src/workspace/page-state/model.ts
3
3
  function t(t, n) {
4
4
  if (t == null) return null;
5
5
  let r = e(t, n);
6
6
  return r.length > 0 ? r : null;
7
7
  }
8
- //#endregion
9
8
  export { t };