@overvis/hmi-workspace-ui 0.1.0 → 0.1.2

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 (130) hide show
  1. package/dist/alarm-list-DKFio0hg.js +414 -0
  2. package/dist/alarm-rule-dialog-mb4_nHRW.js +417 -0
  3. package/dist/{alarm-rule-lists-C5v1Kf7A.js → alarm-rule-lists-CfZXTWkK.js} +123 -125
  4. package/dist/{alarm-rules-page-CqFzofPd.js → alarm-rules-page-DBLSkrrG.js} +15 -18
  5. package/dist/alert-dialog-D_iDv2lQ.js +891 -0
  6. package/dist/{base-revision-YCO27zR4.js → base-revision-DLF9EnGV.js} +26 -29
  7. package/dist/{breadcrumbs-0cjsV2cq.js → breadcrumbs-D5R6Fz74.js} +6 -7
  8. package/dist/{catalog-list-DjZojYLJ.js → catalog-list-BkWosvh1.js} +2 -4
  9. package/dist/{code-editor-BVimvjDV.js → code-editor-DCM0KdMJ.js} +9 -6
  10. package/dist/dashboard-bindings.js +1 -2
  11. package/dist/{dashboards-page-BlrJguNz.js → dashboards-page-DLc11Vzu.js} +335 -359
  12. package/dist/{de-14WdmJxZ.js → de-Z2er-E5v.js} +4 -2
  13. package/dist/diagnostic-text-CYZFPiND.js +116 -0
  14. package/dist/{dialogs-D_v1LeH4.js → dialogs-BX023zml.js} +2523 -2590
  15. package/dist/{dialogs-B6BRnf3Q.js → dialogs-DEOg9lxy.js} +219 -227
  16. package/dist/{display-DmOo23mi.js → display-VYGzneE0.js} +4 -6
  17. package/dist/{editor-language-To9MxloY.js → editor-language-CGENZxbI.js} +3 -5
  18. package/dist/editor-page-CaN52OQh.js +1337 -0
  19. package/dist/{en-BgercpT0.js → en-CKPPL6bQ.js} +4 -2
  20. package/dist/entity-controls-DJT47yeV.js +71 -0
  21. package/dist/errors-BAWoH_5w.js +25 -0
  22. package/dist/{footer-DC-Q0052.js → footer-CbPMP8aq.js} +2404 -2515
  23. package/dist/host.js +8254 -675
  24. package/dist/{i18n-BgzakKoC.js → i18n-ChjEbYEg.js} +77 -90
  25. package/dist/i18n.js +1 -2
  26. package/dist/index.js +5168 -5353
  27. package/dist/{lat-lng-B12P7QyY.js → lat-lng-Bl77AGSO.js} +1 -2
  28. package/dist/{list-page-CvsdZb86.js → list-page-Fa29SkaJ.js} +116 -123
  29. package/dist/{location-map-renderer-DO5yfdSU.js → location-map-renderer-DvXIYc1Z.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-V_0K0lO0.js} +54 -58
  33. package/dist/page-B5te_1Lc.js +449 -0
  34. package/dist/{page-v6LCwswN.js → page-BorlLnMX.js} +92 -100
  35. package/dist/page-DxF7FOve.js +507 -0
  36. package/dist/panel-DuZD-cBP.js +949 -0
  37. package/dist/parameter-values.js +3 -16
  38. package/dist/{pl-lQ9HXV9k.js → pl-DVABrn5G.js} +4 -2
  39. package/dist/presence-code-DsabLTZs.js +73 -0
  40. package/dist/{query-gate-DVhNIkge.js → query-gate-BbIo1Xrj.js} +6 -6
  41. package/dist/{provider-DoEpKcQ-.js → quick-report-BcZsfkCZ.js} +9423 -5102
  42. package/dist/{retention-BYXNpYmR.js → retention-C7EZsq8u.js} +4 -6
  43. package/dist/retention-note-CmMeHV_u.js +40 -0
  44. package/dist/{rolldown-runtime-Dy4uBu1J.js → rolldown-runtime-CGnMp29N.js} +1 -2
  45. package/dist/{ru-qTKINoUj.js → ru-CBRLC_xM.js} +8 -6
  46. package/dist/run-text-CDdfbKbg.js +112 -0
  47. package/dist/{search-D4rDnE9T.js → search-C6xQ_Hvo.js} +26 -29
  48. package/dist/{sections-kCOyc4NR.js → sections-D_SBfVzV.js} +2 -3
  49. package/dist/{select-BKiOWdSr.js → select-nNLG-AMz.js} +17 -23
  50. package/dist/{spinner-C-HPNxOc.js → spinner-B-KLtBjp.js} +182 -201
  51. package/dist/src/code-editor/code-editor.d.ts +3 -0
  52. package/dist/src/code-editor/taskfile-language.d.ts +22 -2
  53. package/dist/src/i18n/catalogs/de/edge-program.d.ts +3 -0
  54. package/dist/src/i18n/catalogs/de.d.ts +3 -0
  55. package/dist/src/i18n/catalogs/en/edge-program.d.ts +3 -0
  56. package/dist/src/i18n/catalogs/en.d.ts +3 -0
  57. package/dist/src/i18n/catalogs/pl/edge-program.d.ts +3 -0
  58. package/dist/src/i18n/catalogs/pl.d.ts +3 -0
  59. package/dist/src/i18n/catalogs/ru/edge-program.d.ts +5 -2
  60. package/dist/src/i18n/catalogs/ru/graphics.d.ts +2 -2
  61. package/dist/src/i18n/catalogs/ru.d.ts +7 -4
  62. package/dist/src/i18n/catalogs/uk/edge-program.d.ts +5 -2
  63. package/dist/src/i18n/catalogs/uk/graphics.d.ts +2 -2
  64. package/dist/src/i18n/catalogs/uk.d.ts +7 -4
  65. package/dist/src/version.d.ts +1 -1
  66. package/dist/src/workspace/graphics/inspector/item.d.ts +6 -6
  67. package/dist/src/workspace/local-workspace-app.d.ts +1 -1
  68. package/dist/src/workspace/routes.d.ts +1 -1
  69. package/dist/{starter-fields-BRLX0z-v.js → starter-fields-7S3LmtGa.js} +154 -157
  70. package/dist/{starter-handoff-BA3ucMKL.js → starter-handoff-BaK8Ss8I.js} +1 -2
  71. package/dist/styles.css +1 -1
  72. package/dist/ui.js +334 -374
  73. package/dist/{uk-CwpJAxmx.js → uk-17pbVYZa.js} +8 -6
  74. package/dist/{wireguard-docs-AfU6NzTL.js → wireguard-docs-Clb-7xRY.js} +14 -17
  75. package/package.json +15 -9
  76. package/dist/alarm-list-BL3xQ5Lf.js +0 -423
  77. package/dist/alarm-rule-dialog-S1ZUg-74.js +0 -423
  78. package/dist/alert-B8MAoIO8.js +0 -45
  79. package/dist/alert-dialog-CYkuMg5D.js +0 -129
  80. package/dist/api-error-9rQmUN5L.js +0 -93
  81. package/dist/breadcrumb-DzVL1yHa.js +0 -74
  82. package/dist/button-6SxPBYMz.js +0 -44
  83. package/dist/context-u9KJQmdB.js +0 -102
  84. package/dist/copyable-id-DYGiAcnq.js +0 -40
  85. package/dist/dashboard-context-CBfG6DoT.js +0 -191
  86. package/dist/date-time-picker-C3FhMXk6.js +0 -266
  87. package/dist/diagnostic-text-BAkzW0SE.js +0 -111
  88. package/dist/diagnostic-text-DiKd2i1w.js +0 -76
  89. package/dist/dialog-BIhQXcZC.js +0 -237
  90. package/dist/dialog-BqyIxMD-.js +0 -54
  91. package/dist/dropdown-menu-DSzbBq3v.js +0 -136
  92. package/dist/editor-page-BiSZJz5b.js +0 -1353
  93. package/dist/empty-B-QJ-06w.js +0 -59
  94. package/dist/entity-controls-D1K4Ot3O.js +0 -76
  95. package/dist/errors-CcsvDHu8.js +0 -26
  96. package/dist/history-page-sAAhG54V.js +0 -1400
  97. package/dist/icon-D-pR9htW.js +0 -57
  98. package/dist/index-page-DMH82fZe.js +0 -214
  99. package/dist/item-B5SaTFQU.js +0 -120
  100. package/dist/mutation-form-validators-BNz5bsv1.js +0 -2408
  101. package/dist/mutations-THtGG6Ai.js +0 -240
  102. package/dist/page-2KPemaAj.js +0 -328
  103. package/dist/page-6rIoTg2L.js +0 -459
  104. package/dist/page-C6giEoEd.js +0 -1935
  105. package/dist/page-DCbTxKsi.js +0 -313
  106. package/dist/page-DWO427hT.js +0 -208
  107. package/dist/page-LXu_2zm3.js +0 -137
  108. package/dist/page-aaUiVOnk.js +0 -513
  109. package/dist/page-header-RB2YFWlE.js +0 -55
  110. package/dist/page-title-CdCbiLt8.js +0 -14
  111. package/dist/panel-DDy8tUNR.js +0 -338
  112. package/dist/presence-code-BfSXr50g.js +0 -83
  113. package/dist/progress-C7cxNJA1.js +0 -83
  114. package/dist/provider-BOeYHi0n.js +0 -134
  115. package/dist/quick-report-CUVJnbKP.js +0 -416
  116. package/dist/radio-group-CZGqVbkJ.js +0 -26
  117. package/dist/retention-note-CHhA6gjY.js +0 -42
  118. package/dist/run-text-DvaO8LDF.js +0 -113
  119. package/dist/select-eNgZdZ30.js +0 -521
  120. package/dist/skeleton-6yk8Tdh5.js +0 -19
  121. package/dist/slider-DorDsoF8.js +0 -37
  122. package/dist/status-page-DAHiKM9P.js +0 -3286
  123. package/dist/switch-BqD0RH_G.js +0 -18
  124. package/dist/table-Q2-voLuw.js +0 -65
  125. package/dist/tabs-CSIucYFP.js +0 -57
  126. package/dist/theme-provider-BkRohQFU.js +0 -61
  127. package/dist/toggle-group-9Bs0Mm3r.js +0 -82
  128. package/dist/trpc-CvJUuUXp.js +0 -153
  129. package/dist/utils-CX-Pz5p6.js +0 -8
  130. package/dist/writability-BuH-spxv.js +0 -57
@@ -1,17 +1,16 @@
1
- import { f as e, h as t, m as n } from "./i18n-BgzakKoC.js";
2
- import { g as r } from "./mutation-form-validators-BNz5bsv1.js";
3
- import { A as i, G as a, H as o, L as s, M as c, R as l, U as u, V as d, Y as f, a as p, c as m, n as h, o as g, r as _, z as v } from "./spinner-C-HPNxOc.js";
4
- import { t as y } from "./button-6SxPBYMz.js";
5
- import { n as b, t as x } from "./toggle-group-9Bs0Mm3r.js";
6
- import { i as S, n as C, o as w, r as T, t as E, u as D } from "./item-B5SaTFQU.js";
7
- import { r as O, t as k } from "./alarm-rule-lists-C5v1Kf7A.js";
8
- import { i as A } from "./run-text-DvaO8LDF.js";
1
+ import { rr as e } from "./quick-report-BcZsfkCZ.js";
2
+ import { f as t, h as n, m as r } from "./i18n-ChjEbYEg.js";
3
+ import { X as i, Y as a, jt as o } from "./alert-dialog-D_iDv2lQ.js";
4
+ import { A as s, G as c, H as l, L as u, M as d, R as f, U as p, V as m, Y as h, a as g, c as _, n as v, o as y, r as b, z as x } from "./spinner-B-KLtBjp.js";
5
+ import { A as S, C, E as w, S as T, w as E, x as D } from "./panel-DuZD-cBP.js";
6
+ import { r as O, t as k } from "./alarm-rule-lists-CfZXTWkK.js";
7
+ import { i as A } from "./run-text-CDdfbKbg.js";
9
8
  import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
10
9
  import { ChevronRightIcon as P, PlusIcon as F, Trash2Icon as I } from "lucide-react";
11
10
  import { resolveLocalized as L } from "@overvis/hmi-shared";
12
11
  import { automationCommandRoles as R, automationSeverities as z } from "@overvis/hmi-shared/automation";
13
12
  import { starterPlaceholderShown as B } from "@overvis/hmi-shared/starter";
14
- //#region src/workspace/setup/starters/starter-form.ts
13
+ // src/workspace/setup/starters/starter-form.ts
15
14
  var V = {
16
15
  s: 1e3,
17
16
  min: 6e4,
@@ -160,8 +159,7 @@ function re(e) {
160
159
  }
161
160
  return t;
162
161
  }
163
- //#endregion
164
- //#region src/workspace/setup/starters/starter-fields.tsx
162
+ // src/workspace/setup/starters/starter-fields.tsx
165
163
  var ie = ["view_only", ...R], ae = [
166
164
  1,
167
165
  2,
@@ -176,27 +174,27 @@ var ie = ["view_only", ...R], ae = [
176
174
  "recipients",
177
175
  "text"
178
176
  ]);
179
- function oe({ starters: e, onPick: n }) {
180
- let r = t();
177
+ function oe({ starters: e, onPick: t }) {
178
+ let r = n();
181
179
  return /* @__PURE__ */ M(w, {
182
180
  className: "gap-2",
183
- children: e.map((e) => /* @__PURE__ */ N(E, {
181
+ children: e.map((e) => /* @__PURE__ */ N(D, {
184
182
  variant: "outline",
185
183
  render: /* @__PURE__ */ M("button", { type: "button" }),
186
184
  className: "text-left",
187
185
  onClick: () => {
188
- n(e.id);
186
+ t(e.id);
189
187
  },
190
- children: [/* @__PURE__ */ N(T, { children: [/* @__PURE__ */ M(D, { children: L(e.name, r) }), /* @__PURE__ */ M(S, {
188
+ children: [/* @__PURE__ */ N(C, { children: [/* @__PURE__ */ M(S, { children: L(e.name, r) }), /* @__PURE__ */ M(E, {
191
189
  className: "line-clamp-none",
192
190
  children: L(e.description, r)
193
- })] }), /* @__PURE__ */ M(C, { children: /* @__PURE__ */ M(P, { className: "size-4 text-muted-foreground" }) })]
191
+ })] }), /* @__PURE__ */ M(T, { children: /* @__PURE__ */ M(P, { className: "size-4 text-muted-foreground" }) })]
194
192
  }, e.id))
195
193
  });
196
194
  }
197
195
  function se({ workspaceId: e, placeholders: t, values: n, onChange: r, problems: i, data: a, newKey: o }) {
198
196
  let s = re(i), c = (e, t) => s.get(e)?.map((e) => Z(e, t));
199
- return /* @__PURE__ */ M(d, { children: t.filter((e) => B(e, t, n)).map((t) => t.kind === "list" ? /* @__PURE__ */ M(ue, {
197
+ return /* @__PURE__ */ M(m, { children: t.filter((e) => B(e, t, n)).map((t) => t.kind === "list" ? /* @__PURE__ */ M(ue, {
200
198
  workspaceId: e,
201
199
  placeholder: t,
202
200
  rows: Y(n[t.name]),
@@ -224,52 +222,52 @@ function se({ workspaceId: e, placeholders: t, values: n, onChange: r, problems:
224
222
  problems: c(`/${t.name}`, t)
225
223
  }, t.name)) });
226
224
  }
227
- function Z(t, n) {
228
- let r = (e) => e === void 0 ? "" : n.kind === "duration" && typeof e == "number" ? `${H(n, e)} ${Q(n.unit)}` : String(e), { args: i } = t;
229
- switch (t.code) {
230
- case "required": return e("starter_problem_required");
231
- case "invalid": return e("starter_problem_invalid");
232
- case "unknown_placeholder": return e("starter_problem_unknown_placeholder");
233
- case "out_of_range": return i.min !== void 0 && i.max !== void 0 ? e("starter_problem_out_of_range", {
225
+ function Z(e, n) {
226
+ let r = (e) => e === void 0 ? "" : n.kind === "duration" && typeof e == "number" ? `${H(n, e)} ${Q(n.unit)}` : String(e), { args: i } = e;
227
+ switch (e.code) {
228
+ case "required": return t("starter_problem_required");
229
+ case "invalid": return t("starter_problem_invalid");
230
+ case "unknown_placeholder": return t("starter_problem_unknown_placeholder");
231
+ case "out_of_range": return i.min !== void 0 && i.max !== void 0 ? t("starter_problem_out_of_range", {
234
232
  min: r(i.min),
235
233
  max: r(i.max)
236
- }) : i.min === void 0 ? i.max === void 0 ? e("starter_problem_invalid") : e("starter_problem_out_of_range_max", { max: r(i.max) }) : e("starter_problem_out_of_range_min", { min: r(i.min) });
237
- case "too_few": return e("starter_problem_too_few", { min: String(i.min ?? "") });
238
- case "too_many": return e("starter_problem_too_many", { max: String(i.max ?? "") });
239
- case "duplicate": return e("starter_problem_duplicate");
240
- case "parameter_not_found": return e("starter_problem_parameter_not_found");
241
- case "parameter_type": return i.expected === "boolean" ? e("starter_problem_parameter_type_boolean") : i.expected === "number" ? e("starter_problem_parameter_type_number") : e("starter_problem_parameter_type", { expected: String(i.expected ?? "") });
242
- case "parameter_not_writable": return e("starter_problem_parameter_not_writable");
243
- case "parameter_not_on_endpoint": return e("starter_problem_parameter_not_on_endpoint");
244
- case "parameter_encoding": return e("starter_problem_parameter_encoding");
245
- case "endpoint_not_found": return e("starter_problem_endpoint_not_found");
246
- case "alarm_rule_not_found": return e("starter_problem_alarm_rule_not_found");
247
- case "member_not_found": return e("starter_problem_member_not_found");
248
- case "branch_not_found": return e("starter_problem_branch_not_found");
249
- case "file_name_invalid": return e("starter_problem_file_name_invalid");
250
- case "file_name_taken": return e("starter_problem_file_name_taken");
234
+ }) : i.min === void 0 ? i.max === void 0 ? t("starter_problem_invalid") : t("starter_problem_out_of_range_max", { max: r(i.max) }) : t("starter_problem_out_of_range_min", { min: r(i.min) });
235
+ case "too_few": return t("starter_problem_too_few", { min: String(i.min ?? "") });
236
+ case "too_many": return t("starter_problem_too_many", { max: String(i.max ?? "") });
237
+ case "duplicate": return t("starter_problem_duplicate");
238
+ case "parameter_not_found": return t("starter_problem_parameter_not_found");
239
+ case "parameter_type": return i.expected === "boolean" ? t("starter_problem_parameter_type_boolean") : i.expected === "number" ? t("starter_problem_parameter_type_number") : t("starter_problem_parameter_type", { expected: String(i.expected ?? "") });
240
+ case "parameter_not_writable": return t("starter_problem_parameter_not_writable");
241
+ case "parameter_not_on_endpoint": return t("starter_problem_parameter_not_on_endpoint");
242
+ case "parameter_encoding": return t("starter_problem_parameter_encoding");
243
+ case "endpoint_not_found": return t("starter_problem_endpoint_not_found");
244
+ case "alarm_rule_not_found": return t("starter_problem_alarm_rule_not_found");
245
+ case "member_not_found": return t("starter_problem_member_not_found");
246
+ case "branch_not_found": return t("starter_problem_branch_not_found");
247
+ case "file_name_invalid": return t("starter_problem_file_name_invalid");
248
+ case "file_name_taken": return t("starter_problem_file_name_taken");
251
249
  }
252
250
  }
253
- function Q(t) {
254
- switch (t) {
255
- case "s": return e("starter_unit_s");
256
- case "min": return e("starter_unit_min");
257
- case "h": return e("starter_unit_h");
251
+ function Q(e) {
252
+ switch (e) {
253
+ case "s": return t("starter_unit_s");
254
+ case "min": return t("starter_unit_min");
255
+ case "h": return t("starter_unit_h");
258
256
  }
259
257
  }
260
- function ce(t) {
261
- switch (t) {
262
- case 1: return e("report_weekday_mon");
263
- case 2: return e("report_weekday_tue");
264
- case 3: return e("report_weekday_wed");
265
- case 4: return e("report_weekday_thu");
266
- case 5: return e("report_weekday_fri");
267
- case 6: return e("report_weekday_sat");
268
- default: return e("report_weekday_sun");
258
+ function ce(e) {
259
+ switch (e) {
260
+ case 1: return t("report_weekday_mon");
261
+ case 2: return t("report_weekday_tue");
262
+ case 3: return t("report_weekday_wed");
263
+ case 4: return t("report_weekday_thu");
264
+ case 5: return t("report_weekday_fri");
265
+ case 6: return t("report_weekday_sat");
266
+ default: return t("report_weekday_sun");
269
267
  }
270
268
  }
271
269
  function le() {
272
- let e = n();
270
+ let e = r();
273
271
  return (t) => {
274
272
  switch (t) {
275
273
  case "owner": return e("automation_role_owner");
@@ -280,52 +278,52 @@ function le() {
280
278
  }
281
279
  };
282
280
  }
283
- function ue({ workspaceId: e, placeholder: r, rows: i, onChange: o, data: s, newKey: c, problemsAt: l }) {
284
- let d = n(), f = t(), p = `/${r.name}`, m = r.itemLabel === void 0 ? void 0 : L(r.itemLabel, f), h = (e) => m === void 0 ? d("starter_row", { number: String(e + 1) }) : `${m} ${String(e + 1)}`, g = r.fields.filter((e) => X.has(e.kind)), _ = r.fields.filter((e) => !X.has(e.kind)), b = (e, t) => /* @__PURE__ */ M(y, {
281
+ function ue({ workspaceId: e, placeholder: t, rows: i, onChange: a, data: s, newKey: l, problemsAt: u }) {
282
+ let d = r(), f = n(), m = `/${t.name}`, h = t.itemLabel === void 0 ? void 0 : L(t.itemLabel, f), g = (e) => h === void 0 ? d("starter_row", { number: String(e + 1) }) : `${h} ${String(e + 1)}`, _ = t.fields.filter((e) => X.has(e.kind)), v = t.fields.filter((e) => !X.has(e.kind)), y = (e, n) => /* @__PURE__ */ M(o, {
285
283
  type: "button",
286
284
  variant: "ghost",
287
285
  size: "icon-sm",
288
- "aria-label": d("starter_remove_row", { row: h(t) }),
289
- disabled: i.length <= r.minItems,
286
+ "aria-label": d("starter_remove_row", { row: g(n) }),
287
+ disabled: i.length <= t.minItems,
290
288
  onClick: () => {
291
- o(i.filter((t) => t.key !== e.key));
289
+ a(i.filter((t) => t.key !== e.key));
292
290
  },
293
291
  children: /* @__PURE__ */ M(I, {})
294
- }), x = (t, n, a, c = !1) => /* @__PURE__ */ M($, {
295
- id: `starter-${r.name}-${t.key}-${a.name}`,
292
+ }), b = (n, r, o, c = !1) => /* @__PURE__ */ M($, {
293
+ id: `starter-${t.name}-${n.key}-${o.name}`,
296
294
  workspaceId: e,
297
- placeholder: a,
295
+ placeholder: o,
298
296
  ...c ? {
299
- label: h(n),
297
+ label: g(r),
300
298
  labelHidden: c
301
299
  } : {},
302
- value: t.fields[a.name],
300
+ value: n.fields[o.name],
303
301
  onChange: (e) => {
304
- o(i.map((n) => n.key === t.key ? {
305
- ...n,
302
+ a(i.map((t) => t.key === n.key ? {
303
+ ...t,
306
304
  fields: {
307
- ...n.fields,
308
- [a.name]: e
305
+ ...t.fields,
306
+ [o.name]: e
309
307
  }
310
- } : n), `${p}/${String(n)}/${a.name}`);
308
+ } : t), `${m}/${String(r)}/${o.name}`);
311
309
  },
312
310
  data: s,
313
- problems: l(`${p}/${String(n)}/${a.name}`, a)
314
- }, a.name), [S] = r.fields;
315
- return /* @__PURE__ */ N(a, { children: [
316
- /* @__PURE__ */ M(u, { children: L(r.label, f) }),
317
- r.help === void 0 ? null : /* @__PURE__ */ M(v, { children: L(r.help, f) }),
318
- /* @__PURE__ */ M(O, { texts: l(p, r) }),
319
- r.fields.length === 1 && S !== void 0 ? /* @__PURE__ */ M("div", {
311
+ problems: u(`${m}/${String(r)}/${o.name}`, o)
312
+ }, o.name), [S] = t.fields;
313
+ return /* @__PURE__ */ N(c, { children: [
314
+ /* @__PURE__ */ M(p, { children: L(t.label, f) }),
315
+ t.help === void 0 ? null : /* @__PURE__ */ M(x, { children: L(t.help, f) }),
316
+ /* @__PURE__ */ M(O, { texts: u(m, t) }),
317
+ t.fields.length === 1 && S !== void 0 ? /* @__PURE__ */ M("div", {
320
318
  className: "flex flex-col gap-2",
321
319
  children: i.map((e, t) => /* @__PURE__ */ N("div", {
322
320
  className: "flex items-start gap-2",
323
321
  children: [/* @__PURE__ */ M("div", {
324
322
  className: "min-w-0 flex-1",
325
- children: x(e, t, S, !0)
323
+ children: b(e, t, S, !0)
326
324
  }), /* @__PURE__ */ M("div", {
327
325
  className: "flex h-9 items-center",
328
- children: b(e, t)
326
+ children: y(e, t)
329
327
  })]
330
328
  }, e.key))
331
329
  }) : /* @__PURE__ */ M("div", {
@@ -337,52 +335,52 @@ function ue({ workspaceId: e, placeholder: r, rows: i, onChange: o, data: s, new
337
335
  className: "flex items-center justify-between gap-2",
338
336
  children: [/* @__PURE__ */ M("span", {
339
337
  className: "font-medium",
340
- children: h(t)
341
- }), b(e, t)]
338
+ children: g(t)
339
+ }), y(e, t)]
342
340
  }),
343
- g.map((n) => x(e, t, n)),
344
- _.length === 0 ? null : /* @__PURE__ */ M("div", {
341
+ _.map((n) => b(e, t, n)),
342
+ v.length === 0 ? null : /* @__PURE__ */ M("div", {
345
343
  className: "\n grid grid-cols-1 gap-3\n sm:grid-cols-2\n ",
346
- children: _.map((n) => x(e, t, n))
344
+ children: v.map((n) => b(e, t, n))
347
345
  })
348
346
  ]
349
347
  }, e.key))
350
348
  }),
351
- /* @__PURE__ */ M("div", { children: /* @__PURE__ */ N(y, {
349
+ /* @__PURE__ */ M("div", { children: /* @__PURE__ */ N(o, {
352
350
  type: "button",
353
351
  variant: "outline",
354
352
  size: "sm",
355
- disabled: i.length >= r.maxItems,
353
+ disabled: i.length >= t.maxItems,
356
354
  onClick: () => {
357
- o([...i, G(r.fields, c())]);
355
+ a([...i, G(t.fields, l())]);
358
356
  },
359
357
  children: [/* @__PURE__ */ M(F, { "data-icon": "inline-start" }), d("starter_add_row")]
360
358
  }) })
361
359
  ] });
362
360
  }
363
- function $({ id: e, workspaceId: a, placeholder: u, label: d, labelHidden: y = !1, value: S, onChange: C, data: w, problems: T }) {
364
- let E = n(), D = t(), P = le(), F = "optional" in u && (u.optional ?? !1), I = d ?? L(u.label, D), R = u.help === void 0 ? void 0 : L(u.help, D), B = typeof S == "string" ? S : "", V = T !== void 0 && T.length > 0, H = F ? /* @__PURE__ */ M("span", {
361
+ function $({ id: t, workspaceId: o, placeholder: c, label: p, labelHidden: m = !1, value: S, onChange: C, data: w, problems: T }) {
362
+ let E = r(), D = n(), P = le(), F = "optional" in c && (c.optional ?? !1), I = p ?? L(c.label, D), R = c.help === void 0 ? void 0 : L(c.help, D), B = typeof S == "string" ? S : "", V = T !== void 0 && T.length > 0, H = F ? /* @__PURE__ */ M("span", {
365
363
  className: "font-normal text-muted-foreground",
366
364
  children: E("starter_optional")
367
- }) : null, U = /* @__PURE__ */ N(o, {
368
- htmlFor: e,
369
- className: y ? "sr-only" : void 0,
365
+ }) : null, U = /* @__PURE__ */ N(l, {
366
+ htmlFor: t,
367
+ className: m ? "sr-only" : void 0,
370
368
  children: [I, H]
371
- }), W = /* @__PURE__ */ N(j, { children: [R === void 0 ? null : /* @__PURE__ */ M(v, { children: R }), /* @__PURE__ */ M(O, { texts: T })] }), G = (t, n) => /* @__PURE__ */ N(s, {
369
+ }), W = /* @__PURE__ */ N(j, { children: [R === void 0 ? null : /* @__PURE__ */ M(x, { children: R }), /* @__PURE__ */ M(O, { texts: T })] }), G = (e, n) => /* @__PURE__ */ N(u, {
372
370
  "data-invalid": V || void 0,
373
371
  children: [
374
372
  U,
375
- /* @__PURE__ */ N(i, {
376
- id: e,
373
+ /* @__PURE__ */ N(s, {
374
+ id: t,
377
375
  value: B,
378
376
  "aria-invalid": V || void 0,
379
377
  onChange: (e) => {
380
378
  C(e.target.value);
381
379
  },
382
- children: [n ? /* @__PURE__ */ M(c, {
380
+ children: [n ? /* @__PURE__ */ M(d, {
383
381
  value: "",
384
382
  children: E("starter_choose")
385
- }) : null, t.map((e) => /* @__PURE__ */ M(c, {
383
+ }) : null, e.map((e) => /* @__PURE__ */ M(d, {
386
384
  value: e.id,
387
385
  children: e.name
388
386
  }, e.id))]
@@ -390,52 +388,52 @@ function $({ id: e, workspaceId: a, placeholder: u, label: d, labelHidden: y = !
390
388
  W
391
389
  ]
392
390
  });
393
- switch (u.kind) {
391
+ switch (c.kind) {
394
392
  case "parameter": {
395
- let t = T !== void 0 || B === "" ? null : w.parameterProblem?.(u, B), n = t == null ? T : [Z(t, u)];
396
- return /* @__PURE__ */ M(r, {
397
- name: e,
393
+ let n = T !== void 0 || B === "" ? null : w.parameterProblem?.(c, B), r = n == null ? T : [Z(n, c)];
394
+ return /* @__PURE__ */ M(e, {
395
+ name: t,
398
396
  label: I,
399
397
  labelSuffix: H,
400
- labelHidden: y,
401
- workspaceId: a,
398
+ labelHidden: m,
399
+ workspaceId: o,
402
400
  value: B,
403
401
  onChange: C,
404
- preferred: (e) => w.parameterFits(u, e),
402
+ preferred: (e) => w.parameterFits(c, e),
405
403
  ...R === void 0 ? {} : { description: R },
406
- invalid: n !== void 0 && n.length > 0,
407
- errors: (n ?? []).map((e) => ({ message: e }))
404
+ invalid: r !== void 0 && r.length > 0,
405
+ errors: (r ?? []).map((e) => ({ message: e }))
408
406
  });
409
407
  }
410
408
  case "endpoint": return G(w.endpoints, !0);
411
409
  case "alarmRule": return G(w.alarmRules, !0);
412
410
  case "branch": return G(w.branches, !0);
413
- case "choice": return G(u.options.map((e) => ({
411
+ case "choice": return G(c.options.map((e) => ({
414
412
  id: e.value,
415
413
  name: L(e.label, D)
416
- })), u.default === void 0);
414
+ })), c.default === void 0);
417
415
  case "severity": return G(z.map((e) => ({
418
416
  id: e,
419
417
  name: A(e)
420
- })), u.default === void 0);
418
+ })), c.default === void 0);
421
419
  case "number":
422
420
  case "duration": {
423
- let t = u.kind === "duration" ? Q(u.unit) : u.unit === void 0 ? "" : L(u.unit, D);
424
- return /* @__PURE__ */ N(s, {
421
+ let e = c.kind === "duration" ? Q(c.unit) : c.unit === void 0 ? "" : L(c.unit, D);
422
+ return /* @__PURE__ */ N(u, {
425
423
  "data-invalid": V || void 0,
426
424
  children: [
427
425
  U,
428
- /* @__PURE__ */ N(h, { children: [/* @__PURE__ */ M(p, {
429
- id: e,
430
- inputMode: u.kind === "number" && u.integer === !0 ? "numeric" : "decimal",
426
+ /* @__PURE__ */ N(v, { children: [/* @__PURE__ */ M(g, {
427
+ id: t,
428
+ inputMode: c.kind === "number" && c.integer === !0 ? "numeric" : "decimal",
431
429
  value: B,
432
430
  "aria-invalid": V || void 0,
433
431
  onChange: (e) => {
434
432
  C(e.target.value);
435
433
  }
436
- }), t === "" ? null : /* @__PURE__ */ M(_, {
434
+ }), e === "" ? null : /* @__PURE__ */ M(b, {
437
435
  align: "inline-end",
438
- children: /* @__PURE__ */ M(g, { children: t })
436
+ children: /* @__PURE__ */ M(y, { children: e })
439
437
  })] }),
440
438
  W
441
439
  ]
@@ -444,16 +442,16 @@ function $({ id: e, workspaceId: a, placeholder: u, label: d, labelHidden: y = !
444
442
  case "timeOfDay":
445
443
  case "text":
446
444
  case "fileName":
447
- case "phone": return /* @__PURE__ */ N(s, {
445
+ case "phone": return /* @__PURE__ */ N(u, {
448
446
  "data-invalid": V || void 0,
449
447
  children: [
450
448
  U,
451
- /* @__PURE__ */ M(m, {
452
- id: e,
453
- ...u.kind === "timeOfDay" ? {
449
+ /* @__PURE__ */ M(_, {
450
+ id: t,
451
+ ...c.kind === "timeOfDay" ? {
454
452
  type: "time",
455
453
  step: 60
456
- } : u.kind === "text" ? { maxLength: u.maxLength } : u.kind === "phone" ? {
454
+ } : c.kind === "text" ? { maxLength: c.maxLength } : c.kind === "phone" ? {
457
455
  type: "tel",
458
456
  autoComplete: "off"
459
457
  } : {
@@ -470,39 +468,39 @@ function $({ id: e, workspaceId: a, placeholder: u, label: d, labelHidden: y = !
470
468
  W
471
469
  ]
472
470
  });
473
- case "boolean": return /* @__PURE__ */ N(s, {
471
+ case "boolean": return /* @__PURE__ */ N(u, {
474
472
  orientation: "horizontal",
475
473
  "data-invalid": V || void 0,
476
- children: [/* @__PURE__ */ M(f, {
477
- id: e,
474
+ children: [/* @__PURE__ */ M(h, {
475
+ id: t,
478
476
  checked: S === !0,
479
477
  onCheckedChange: (e) => {
480
478
  C(e);
481
479
  }
482
- }), /* @__PURE__ */ N(l, { children: [/* @__PURE__ */ M(o, {
483
- htmlFor: e,
480
+ }), /* @__PURE__ */ N(f, { children: [/* @__PURE__ */ M(l, {
481
+ htmlFor: t,
484
482
  children: I
485
483
  }), W] })]
486
484
  });
487
- case "weekdays": return /* @__PURE__ */ N(s, {
485
+ case "weekdays": return /* @__PURE__ */ N(u, {
488
486
  "data-invalid": V || void 0,
489
487
  children: [
490
- /* @__PURE__ */ M(o, {
491
- id: e,
488
+ /* @__PURE__ */ M(l, {
489
+ id: t,
492
490
  children: I
493
491
  }),
494
- /* @__PURE__ */ M(x, {
492
+ /* @__PURE__ */ M(a, {
495
493
  multiple: !0,
496
494
  variant: "outline",
497
495
  size: "sm",
498
496
  spacing: 0,
499
497
  className: "w-full",
500
- "aria-labelledby": e,
498
+ "aria-labelledby": t,
501
499
  value: (Array.isArray(S) ? S : []).map(String),
502
500
  onValueChange: (e) => {
503
501
  C(e.map(Number).filter((e) => Number.isInteger(e) && e >= 1 && e <= 7).sort((e, t) => e - t));
504
502
  },
505
- children: ae.map((e) => /* @__PURE__ */ M(b, {
503
+ children: ae.map((e) => /* @__PURE__ */ M(i, {
506
504
  value: String(e),
507
505
  className: "min-w-0 flex-1 px-1",
508
506
  children: ce(e)
@@ -512,67 +510,67 @@ function $({ id: e, workspaceId: a, placeholder: u, label: d, labelHidden: y = !
512
510
  ]
513
511
  });
514
512
  case "recipients": {
515
- let t = typeof S == "object" && !Array.isArray(S) ? S : {
513
+ let e = typeof S == "object" && !Array.isArray(S) ? S : {
516
514
  kind: "none",
517
515
  roles: [],
518
516
  memberIds: []
519
517
  };
520
- return /* @__PURE__ */ N(s, {
518
+ return /* @__PURE__ */ N(u, {
521
519
  "data-invalid": V || void 0,
522
520
  children: [
523
521
  U,
524
- /* @__PURE__ */ N(i, {
525
- id: e,
526
- value: t.kind,
527
- onChange: (e) => {
522
+ /* @__PURE__ */ N(s, {
523
+ id: t,
524
+ value: e.kind,
525
+ onChange: (t) => {
528
526
  let n = [
529
527
  "none",
530
528
  "roles",
531
529
  "members"
532
- ].find((t) => t === e.target.value);
530
+ ].find((e) => e === t.target.value);
533
531
  n !== void 0 && C({
534
- ...t,
532
+ ...e,
535
533
  kind: n
536
534
  });
537
535
  },
538
536
  children: [
539
- F ? /* @__PURE__ */ M(c, {
537
+ F ? /* @__PURE__ */ M(d, {
540
538
  value: "none",
541
539
  children: E("starter_recipients_none")
542
540
  }) : null,
543
- /* @__PURE__ */ M(c, {
541
+ /* @__PURE__ */ M(d, {
544
542
  value: "roles",
545
543
  children: E("alarm_rule_recipients_roles")
546
544
  }),
547
- /* @__PURE__ */ M(c, {
545
+ /* @__PURE__ */ M(d, {
548
546
  value: "members",
549
547
  children: E("alarm_rule_recipients_members")
550
548
  })
551
549
  ]
552
550
  }),
553
- t.kind === "roles" ? /* @__PURE__ */ M("div", {
551
+ e.kind === "roles" ? /* @__PURE__ */ M("div", {
554
552
  className: "flex flex-wrap gap-4",
555
- children: ie.map((e) => /* @__PURE__ */ N("label", {
553
+ children: ie.map((t) => /* @__PURE__ */ N("label", {
556
554
  className: "flex items-center gap-2 text-sm",
557
- children: [/* @__PURE__ */ M(f, {
558
- checked: t.roles.includes(e),
555
+ children: [/* @__PURE__ */ M(h, {
556
+ checked: e.roles.includes(t),
559
557
  onCheckedChange: (n) => {
560
- let r = n ? [...t.roles, e] : t.roles.filter((t) => t !== e);
558
+ let r = n ? [...e.roles, t] : e.roles.filter((e) => e !== t);
561
559
  C({
562
- ...t,
560
+ ...e,
563
561
  roles: r
564
562
  });
565
563
  }
566
- }), P(e)]
567
- }, e))
564
+ }), P(t)]
565
+ }, t))
568
566
  }) : null,
569
- t.kind === "members" ? /* @__PURE__ */ M(k, {
567
+ e.kind === "members" ? /* @__PURE__ */ M(k, {
570
568
  members: w.members,
571
- value: t.memberIds,
572
- onChange: (e) => {
569
+ value: e.memberIds,
570
+ onChange: (t) => {
573
571
  C({
574
- ...t,
575
- memberIds: e
572
+ ...e,
573
+ memberIds: t
576
574
  });
577
575
  }
578
576
  }) : null,
@@ -582,5 +580,4 @@ function $({ id: e, workspaceId: a, placeholder: u, label: d, labelHidden: y = !
582
580
  }
583
581
  }
584
582
  }
585
- //#endregion
586
583
  export { ne as i, se as n, K as r, oe as t };
@@ -1,6 +1,6 @@
1
1
  import { Value as e } from "typebox/value";
2
2
  import { alarmRuleType as t, automationType as n } from "@overvis/hmi-shared/automation";
3
- //#region src/workspace/setup/automations/starter-handoff.ts
3
+ // src/workspace/setup/automations/starter-handoff.ts
4
4
  function r(e) {
5
5
  return { overvisAutomationStarter: e };
6
6
  }
@@ -15,5 +15,4 @@ function o(n) {
15
15
  let r = i(n);
16
16
  return e.Check(t, r) ? r : void 0;
17
17
  }
18
- //#endregion
19
18
  export { a as n, r, o as t };