@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,125 +1,124 @@
1
- import { f as e, m as t } from "./i18n-BgzakKoC.js";
2
- import { $ as n, g as r } from "./mutation-form-validators-BNz5bsv1.js";
3
- import { A as i, H as a, L as o, M as s, Y as c, c as l } from "./spinner-C-HPNxOc.js";
4
- import { t as u } from "./button-6SxPBYMz.js";
1
+ import { qr as e, rr as t } from "./quick-report-DEqqwQxR.js";
2
+ import { f as n, m as r } from "./i18n-Dt6xbSK6.js";
3
+ import { jt as i } from "./alert-dialog-B60PF7S9.js";
4
+ import { A as a, H as o, L as s, M as c, Y as l, c as u } from "./spinner-BRcNKwjH.js";
5
5
  import { jsx as d, jsxs as f } from "react/jsx-runtime";
6
6
  import { PlusIcon as p, Trash2Icon as m } from "lucide-react";
7
7
  import { alarmRuleFormVariable as h, alarmRuleFormVariableKinds as g, automationAlarmInputStates as _ } from "@overvis/hmi-shared/automation";
8
- //#region src/workspace/access-label.ts
9
- function v(t) {
10
- switch (t) {
11
- case "view_only": return e("workspace_access_view_only");
12
- case "operator": return e("workspace_access_operator");
13
- case "editor": return e("workspace_access_editor");
14
- case "admin": return e("workspace_access_admin");
15
- case "owner": return e("workspace_access_owner");
8
+ // src/workspace/access-label.ts
9
+ function v(e) {
10
+ switch (e) {
11
+ case "view_only": return n("workspace_access_view_only");
12
+ case "operator": return n("workspace_access_operator");
13
+ case "editor": return n("workspace_access_editor");
14
+ case "admin": return n("workspace_access_admin");
15
+ case "owner": return n("workspace_access_owner");
16
16
  }
17
17
  }
18
- //#endregion
19
- //#region src/workspace/setup/automations/alarm-rule-lists.tsx
18
+ // src/workspace/setup/automations/alarm-rule-lists.tsx
20
19
  function y({ texts: e }) {
21
20
  return e === void 0 || e.length === 0 ? null : /* @__PURE__ */ d("ul", {
22
21
  className: "flex flex-col gap-0.5 text-sm text-destructive",
23
22
  children: e.map((e) => /* @__PURE__ */ d("li", { children: e }, e))
24
23
  });
25
24
  }
26
- function b({ value: e, onChange: c, formulaLanguage: v, data: b, workspaceId: x, at: S, newKey: C }) {
27
- let w = t(), T = (t, n) => {
28
- let r = e[t];
29
- r !== void 0 && c({
30
- ...e,
31
- [t]: {
25
+ function b({ value: n, onChange: l, formulaLanguage: v, data: b, workspaceId: x, at: S, newKey: C }) {
26
+ let w = r(), T = (e, t) => {
27
+ let r = n[e];
28
+ r !== void 0 && l({
29
+ ...n,
30
+ [e]: {
32
31
  ...r,
33
- ...n
32
+ ...t
34
33
  }
35
34
  });
36
- }, E = (e, t, n, r, c) => /* @__PURE__ */ f(o, { children: [/* @__PURE__ */ d(a, {
35
+ }, E = (e, t, n, r, i) => /* @__PURE__ */ f(s, { children: [/* @__PURE__ */ d(o, {
37
36
  htmlFor: e,
38
37
  children: t
39
- }), /* @__PURE__ */ f(i, {
38
+ }), /* @__PURE__ */ f(a, {
40
39
  id: e,
41
40
  value: n,
42
41
  onChange: (e) => {
43
- c(e.target.value);
42
+ i(e.target.value);
44
43
  },
45
- children: [/* @__PURE__ */ d(s, {
44
+ children: [/* @__PURE__ */ d(c, {
46
45
  value: "",
47
46
  children: w("alarm_rule_choose")
48
- }), r.map((e) => /* @__PURE__ */ d(s, {
47
+ }), r.map((e) => /* @__PURE__ */ d(c, {
49
48
  value: e.id,
50
49
  children: e.name
51
50
  }, e.id))]
52
- })] }), D = (e, t, n) => /* @__PURE__ */ f(o, { children: [/* @__PURE__ */ d(a, {
51
+ })] }), D = (e, t, n) => /* @__PURE__ */ f(s, { children: [/* @__PURE__ */ d(o, {
53
52
  htmlFor: `${e}-state`,
54
53
  children: w("alarm_rule_variable_alarm_state")
55
- }), /* @__PURE__ */ f(i, {
54
+ }), /* @__PURE__ */ f(a, {
56
55
  id: `${e}-state`,
57
56
  value: n.alarmState,
58
57
  onChange: (e) => {
59
58
  let n = _.find((t) => t === e.target.value);
60
59
  n !== void 0 && T(t, { alarmState: n });
61
60
  },
62
- children: [/* @__PURE__ */ d(s, {
61
+ children: [/* @__PURE__ */ d(c, {
63
62
  value: "active",
64
63
  children: w("alarm_rule_variable_alarm_state_active")
65
- }), /* @__PURE__ */ d(s, {
64
+ }), /* @__PURE__ */ d(c, {
66
65
  value: "unacknowledged",
67
66
  children: w("alarm_rule_variable_alarm_state_unacknowledged")
68
67
  })]
69
- })] }), O = (e, t) => {
70
- let i = `alarm-rule-variable-${e}`;
71
- switch (t.kind) {
72
- case "parameter": return /* @__PURE__ */ d(r, {
68
+ })] }), O = (n, r) => {
69
+ let i = `alarm-rule-variable-${n}`;
70
+ switch (r.kind) {
71
+ case "parameter": return /* @__PURE__ */ d(t, {
73
72
  label: w("alarm_rule_variable_parameter"),
74
73
  workspaceId: x,
75
- value: t.parameterId,
76
- onChange: (t) => {
77
- T(e, { parameterId: t });
74
+ value: r.parameterId,
75
+ onChange: (e) => {
76
+ T(n, { parameterId: e });
78
77
  }
79
78
  });
80
- case "endpoint": return E(`${i}-endpoint`, w("alarm_rule_variable_endpoint"), t.endpointId, b.endpoints, (t) => {
81
- T(e, { endpointId: t });
79
+ case "endpoint": return E(`${i}-endpoint`, w("alarm_rule_variable_endpoint"), r.endpointId, b.endpoints, (e) => {
80
+ T(n, { endpointId: e });
82
81
  });
83
82
  case "alarmRule": return /* @__PURE__ */ f("div", {
84
83
  className: "grid grid-cols-[minmax(0,1fr)_minmax(0,10rem)] items-end gap-2",
85
- children: [E(`${i}-alarm-rule`, w("alarm_rule_variable_alarm_rule"), t.alarmRuleId, b.alarmRules, (t) => {
86
- T(e, { alarmRuleId: t });
87
- }), D(i, e, t)]
84
+ children: [E(`${i}-alarm-rule`, w("alarm_rule_variable_alarm_rule"), r.alarmRuleId, b.alarmRules, (e) => {
85
+ T(n, { alarmRuleId: e });
86
+ }), D(i, n, r)]
88
87
  });
89
88
  case "automationAlarm": return /* @__PURE__ */ f("div", {
90
89
  className: "grid grid-cols-[minmax(0,1fr)_minmax(0,8rem)] items-end gap-2",
91
90
  children: [
92
- E(`${i}-automation`, w("alarm_rule_variable_automation"), t.automationId, b.automations, (t) => {
93
- T(e, { automationId: t });
91
+ E(`${i}-automation`, w("alarm_rule_variable_automation"), r.automationId, b.automations, (e) => {
92
+ T(n, { automationId: e });
94
93
  }),
95
- /* @__PURE__ */ f(o, { children: [/* @__PURE__ */ d(a, {
94
+ /* @__PURE__ */ f(s, { children: [/* @__PURE__ */ d(o, {
96
95
  htmlFor: `${i}-key`,
97
96
  children: w("alarm_rule_variable_alarm_key")
98
- }), /* @__PURE__ */ d(l, {
97
+ }), /* @__PURE__ */ d(u, {
99
98
  id: `${i}-key`,
100
99
  className: "font-mono",
101
- value: t.alarmKey,
102
- onChange: (t) => {
103
- T(e, { alarmKey: t.target.value });
100
+ value: r.alarmKey,
101
+ onChange: (e) => {
102
+ T(n, { alarmKey: e.target.value });
104
103
  }
105
104
  })] }),
106
105
  /* @__PURE__ */ d("div", {
107
106
  className: "col-span-2",
108
- children: D(i, e, t)
107
+ children: D(i, n, r)
109
108
  })
110
109
  ]
111
110
  });
112
- case "calc": return /* @__PURE__ */ f(o, { children: [/* @__PURE__ */ d(a, {
111
+ case "calc": return /* @__PURE__ */ f(s, { children: [/* @__PURE__ */ d(o, {
113
112
  id: `${i}-formula-label`,
114
113
  htmlFor: `${i}-formula`,
115
114
  children: w("alarm_rule_variable_formula")
116
- }), /* @__PURE__ */ d(n, {
115
+ }), /* @__PURE__ */ d(e, {
117
116
  id: `${i}-formula`,
118
117
  labelId: `${i}-formula-label`,
119
- value: t.formula,
118
+ value: r.formula,
120
119
  language: v,
121
- onChange: (t) => {
122
- T(e, { formula: t });
120
+ onChange: (e) => {
121
+ T(n, { formula: e });
123
122
  }
124
123
  })] });
125
124
  }
@@ -127,52 +126,52 @@ function b({ value: e, onChange: c, formulaLanguage: v, data: b, workspaceId: x,
127
126
  return /* @__PURE__ */ f("div", {
128
127
  className: "flex flex-col gap-3",
129
128
  children: [
130
- Object.entries(e).map(([t, n]) => /* @__PURE__ */ f("div", {
129
+ Object.entries(n).map(([e, t]) => /* @__PURE__ */ f("div", {
131
130
  className: "flex flex-col gap-2 rounded-md border p-3",
132
131
  children: [/* @__PURE__ */ f("div", {
133
132
  className: "\n grid grid-cols-1 gap-2\n sm:grid-cols-[minmax(0,10rem)_minmax(0,1fr)_auto] sm:items-end\n ",
134
133
  children: [
135
- /* @__PURE__ */ f(o, { children: [/* @__PURE__ */ d(a, {
136
- htmlFor: `alarm-rule-variable-${t}-name`,
134
+ /* @__PURE__ */ f(s, { children: [/* @__PURE__ */ d(o, {
135
+ htmlFor: `alarm-rule-variable-${e}-name`,
137
136
  children: w("alarm_rule_variable_name")
138
- }), /* @__PURE__ */ d(l, {
139
- id: `alarm-rule-variable-${t}-name`,
137
+ }), /* @__PURE__ */ d(u, {
138
+ id: `alarm-rule-variable-${e}-name`,
140
139
  className: "font-mono",
141
140
  spellCheck: !1,
142
141
  autoComplete: "off",
143
- value: n.name,
144
- onChange: (e) => {
145
- T(t, { name: e.target.value });
142
+ value: t.name,
143
+ onChange: (t) => {
144
+ T(e, { name: t.target.value });
146
145
  }
147
146
  })] }),
148
- /* @__PURE__ */ f(o, { children: [/* @__PURE__ */ d(a, {
149
- htmlFor: `alarm-rule-variable-${t}-kind`,
147
+ /* @__PURE__ */ f(s, { children: [/* @__PURE__ */ d(o, {
148
+ htmlFor: `alarm-rule-variable-${e}-kind`,
150
149
  children: w("alarm_rule_variable_kind")
151
- }), /* @__PURE__ */ f(i, {
152
- id: `alarm-rule-variable-${t}-kind`,
153
- value: n.kind,
154
- onChange: (e) => {
155
- let n = g.find((t) => t === e.target.value);
156
- n !== void 0 && T(t, { kind: n });
150
+ }), /* @__PURE__ */ f(a, {
151
+ id: `alarm-rule-variable-${e}-kind`,
152
+ value: t.kind,
153
+ onChange: (t) => {
154
+ let n = g.find((e) => e === t.target.value);
155
+ n !== void 0 && T(e, { kind: n });
157
156
  },
158
157
  children: [
159
- /* @__PURE__ */ d(s, {
158
+ /* @__PURE__ */ d(c, {
160
159
  value: "parameter",
161
160
  children: w("alarm_rule_variable_parameter")
162
161
  }),
163
- /* @__PURE__ */ d(s, {
162
+ /* @__PURE__ */ d(c, {
164
163
  value: "endpoint",
165
164
  children: w("alarm_rule_variable_endpoint")
166
165
  }),
167
- /* @__PURE__ */ d(s, {
166
+ /* @__PURE__ */ d(c, {
168
167
  value: "alarmRule",
169
168
  children: w("alarm_rule_variable_alarm_rule")
170
169
  }),
171
- /* @__PURE__ */ d(s, {
170
+ /* @__PURE__ */ d(c, {
172
171
  value: "automationAlarm",
173
172
  children: w("alarm_rule_variable_automation_alarm")
174
173
  }),
175
- /* @__PURE__ */ d(s, {
174
+ /* @__PURE__ */ d(c, {
176
175
  value: "calc",
177
176
  children: w("alarm_rule_variable_calc")
178
177
  })
@@ -180,31 +179,31 @@ function b({ value: e, onChange: c, formulaLanguage: v, data: b, workspaceId: x,
180
179
  })] }),
181
180
  /* @__PURE__ */ d("div", {
182
181
  className: "sm:col-span-full sm:row-start-2",
183
- children: O(t, n)
182
+ children: O(e, t)
184
183
  }),
185
- /* @__PURE__ */ d(u, {
184
+ /* @__PURE__ */ d(i, {
186
185
  type: "button",
187
186
  variant: "ghost",
188
187
  size: "icon-sm",
189
188
  "aria-label": w("alarm_rule_variable_remove"),
190
189
  onClick: () => {
191
- c(Object.fromEntries(Object.entries(e).filter(([e]) => e !== t)));
190
+ l(Object.fromEntries(Object.entries(n).filter(([t]) => t !== e)));
192
191
  },
193
192
  children: /* @__PURE__ */ d(m, {})
194
193
  })
195
194
  ]
196
- }), /* @__PURE__ */ d(y, { texts: S(`variables.${t}`) })]
197
- }, t)),
195
+ }), /* @__PURE__ */ d(y, { texts: S(`variables.${e}`) })]
196
+ }, e)),
198
197
  /* @__PURE__ */ d(y, { texts: S("variables") }),
199
- /* @__PURE__ */ f(u, {
198
+ /* @__PURE__ */ f(i, {
200
199
  type: "button",
201
200
  variant: "outline",
202
201
  size: "sm",
203
202
  className: "self-start",
204
- disabled: Object.keys(e).length >= 50,
203
+ disabled: Object.keys(n).length >= 50,
205
204
  onClick: () => {
206
- c({
207
- ...e,
205
+ l({
206
+ ...n,
208
207
  [C()]: h()
209
208
  });
210
209
  },
@@ -213,14 +212,14 @@ function b({ value: e, onChange: c, formulaLanguage: v, data: b, workspaceId: x,
213
212
  ]
214
213
  });
215
214
  }
216
- function x({ value: e, onChange: r, formulaLanguage: i, at: s, newKey: c }) {
217
- let h = t(), g = (t, n) => {
218
- let i = e[t];
219
- i !== void 0 && r({
220
- ...e,
221
- [t]: {
215
+ function x({ value: t, onChange: n, formulaLanguage: a, at: c, newKey: l }) {
216
+ let h = r(), g = (e, r) => {
217
+ let i = t[e];
218
+ i !== void 0 && n({
219
+ ...t,
220
+ [e]: {
222
221
  ...i,
223
- ...n
222
+ ...r
224
223
  }
225
224
  });
226
225
  };
@@ -231,61 +230,61 @@ function x({ value: e, onChange: r, formulaLanguage: i, at: s, newKey: c }) {
231
230
  className: "text-sm font-medium",
232
231
  children: h("alarm_rule_params")
233
232
  }),
234
- Object.entries(e).map(([t, c]) => /* @__PURE__ */ f("div", {
233
+ Object.entries(t).map(([r, l]) => /* @__PURE__ */ f("div", {
235
234
  className: "flex flex-col gap-1",
236
235
  children: [/* @__PURE__ */ f("div", {
237
236
  className: "grid grid-cols-[minmax(0,10rem)_minmax(0,1fr)_auto] items-end gap-2",
238
237
  children: [
239
- /* @__PURE__ */ f(o, { children: [/* @__PURE__ */ d(a, {
240
- htmlFor: `alarm-rule-param-${t}-name`,
238
+ /* @__PURE__ */ f(s, { children: [/* @__PURE__ */ d(o, {
239
+ htmlFor: `alarm-rule-param-${r}-name`,
241
240
  children: h("alarm_rule_param_name")
242
- }), /* @__PURE__ */ d(l, {
243
- id: `alarm-rule-param-${t}-name`,
241
+ }), /* @__PURE__ */ d(u, {
242
+ id: `alarm-rule-param-${r}-name`,
244
243
  className: "font-mono",
245
244
  spellCheck: !1,
246
245
  autoComplete: "off",
247
- value: c.name,
246
+ value: l.name,
248
247
  onChange: (e) => {
249
- g(t, { name: e.target.value });
248
+ g(r, { name: e.target.value });
250
249
  }
251
250
  })] }),
252
- /* @__PURE__ */ f(o, { children: [/* @__PURE__ */ d(a, {
253
- id: `alarm-rule-param-${t}-formula-label`,
254
- htmlFor: `alarm-rule-param-${t}-formula`,
251
+ /* @__PURE__ */ f(s, { children: [/* @__PURE__ */ d(o, {
252
+ id: `alarm-rule-param-${r}-formula-label`,
253
+ htmlFor: `alarm-rule-param-${r}-formula`,
255
254
  children: h("alarm_rule_param_formula")
256
- }), /* @__PURE__ */ d(n, {
257
- id: `alarm-rule-param-${t}-formula`,
258
- labelId: `alarm-rule-param-${t}-formula-label`,
259
- value: c.formula,
260
- language: i,
255
+ }), /* @__PURE__ */ d(e, {
256
+ id: `alarm-rule-param-${r}-formula`,
257
+ labelId: `alarm-rule-param-${r}-formula-label`,
258
+ value: l.formula,
259
+ language: a,
261
260
  onChange: (e) => {
262
- g(t, { formula: e });
261
+ g(r, { formula: e });
263
262
  }
264
263
  })] }),
265
- /* @__PURE__ */ d(u, {
264
+ /* @__PURE__ */ d(i, {
266
265
  type: "button",
267
266
  variant: "ghost",
268
267
  size: "icon-sm",
269
268
  "aria-label": h("alarm_rule_param_remove"),
270
269
  onClick: () => {
271
- r(Object.fromEntries(Object.entries(e).filter(([e]) => e !== t)));
270
+ n(Object.fromEntries(Object.entries(t).filter(([e]) => e !== r)));
272
271
  },
273
272
  children: /* @__PURE__ */ d(m, {})
274
273
  })
275
274
  ]
276
- }), /* @__PURE__ */ d(y, { texts: s(`params.${t}`) })]
277
- }, t)),
278
- /* @__PURE__ */ d(y, { texts: s("params") }),
279
- /* @__PURE__ */ f(u, {
275
+ }), /* @__PURE__ */ d(y, { texts: c(`params.${r}`) })]
276
+ }, r)),
277
+ /* @__PURE__ */ d(y, { texts: c("params") }),
278
+ /* @__PURE__ */ f(i, {
280
279
  type: "button",
281
280
  variant: "outline",
282
281
  size: "sm",
283
282
  className: "self-start",
284
- disabled: Object.keys(e).length >= 20,
283
+ disabled: Object.keys(t).length >= 20,
285
284
  onClick: () => {
286
- r({
287
- ...e,
288
- [c()]: {
285
+ n({
286
+ ...t,
287
+ [l()]: {
289
288
  name: "",
290
289
  formula: ""
291
290
  }
@@ -296,9 +295,9 @@ function x({ value: e, onChange: r, formulaLanguage: i, at: s, newKey: c }) {
296
295
  ]
297
296
  });
298
297
  }
299
- function S({ members: e, value: n, onChange: r }) {
300
- let i = t(), a = new Set(e.map((e) => e.userId)), o = n.filter((e) => !a.has(e)), s = (e, t) => {
301
- r(t ? [...n, e] : n.filter((t) => t !== e));
298
+ function S({ members: e, value: t, onChange: n }) {
299
+ let i = r(), a = new Set(e.map((e) => e.userId)), o = t.filter((e) => !a.has(e)), s = (e, r) => {
300
+ n(r ? [...t, e] : t.filter((t) => t !== e));
302
301
  };
303
302
  return /* @__PURE__ */ f("fieldset", {
304
303
  className: "flex flex-col gap-1",
@@ -310,8 +309,8 @@ function S({ members: e, value: n, onChange: r }) {
310
309
  children: [e.map((e) => /* @__PURE__ */ f("label", {
311
310
  className: "\n flex items-center gap-2 rounded-sm p-1 text-sm\n hover:bg-muted/40\n ",
312
311
  children: [
313
- /* @__PURE__ */ d(c, {
314
- checked: n.includes(e.userId),
312
+ /* @__PURE__ */ d(l, {
313
+ checked: t.includes(e.userId),
315
314
  onCheckedChange: (t) => {
316
315
  s(e.userId, t);
317
316
  }
@@ -327,7 +326,7 @@ function S({ members: e, value: n, onChange: r }) {
327
326
  ]
328
327
  }, e.userId)), o.map((e) => /* @__PURE__ */ f("label", {
329
328
  className: "flex items-center gap-2 rounded-sm p-1 text-sm",
330
- children: [/* @__PURE__ */ d(c, {
329
+ children: [/* @__PURE__ */ d(l, {
331
330
  checked: !0,
332
331
  onCheckedChange: (t) => {
333
332
  s(e, t);
@@ -340,5 +339,4 @@ function S({ members: e, value: n, onChange: r }) {
340
339
  })]
341
340
  });
342
341
  }
343
- //#endregion
344
342
  export { v as a, b as i, x as n, y as r, S as t };
@@ -1,24 +1,22 @@
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 { l as i } from "./spinner-C-HPNxOc.js";
4
- import { t as a } from "./button-6SxPBYMz.js";
5
- import { n as o } from "./skeleton-6yk8Tdh5.js";
6
- import { n as s } from "./api-error-9rQmUN5L.js";
7
- import { t as c } from "./page-header-RB2YFWlE.js";
8
- import { r as l, t as u } from "./query-gate-DVhNIkge.js";
9
- import { t as d } from "./breadcrumbs-0cjsV2cq.js";
10
- import { a as f, c as p, d as m, i as h, l as g, n as _, o as v, r as y, s as b, t as x, u as S } from "./catalog-list-DjZojYLJ.js";
11
- import { i as C } from "./run-text-DvaO8LDF.js";
12
- import { n as w } from "./entity-controls-D1K4Ot3O.js";
13
- import { AutomationSectionTabs as T, DeleteDialog as E, ProblemBadges as D, t as O, useDashboardNames as k } from "./list-page-CvsdZb86.js";
1
+ import { Wn as e, ii as t } from "./quick-report-DEqqwQxR.js";
2
+ import { h as n, m as r, n as i } from "./i18n-Dt6xbSK6.js";
3
+ import { jt as a, xt as o } from "./alert-dialog-B60PF7S9.js";
4
+ import { l as s } from "./spinner-BRcNKwjH.js";
5
+ import { b as c } from "./panel-BCwBlB_h.js";
6
+ import { r as l, t as u } from "./query-gate-DqmHsZ07.js";
7
+ import { t as d } from "./breadcrumbs-D2u8KZQo.js";
8
+ import { a as f, c as p, d as m, i as h, l as g, n as _, o as v, r as y, s as b, t as x, u as S } from "./catalog-list-LXuRix0-.js";
9
+ import { i as C } from "./run-text-DneX9rWh.js";
10
+ import { n as w } from "./entity-controls-BCuRx882.js";
11
+ import { AutomationSectionTabs as T, DeleteDialog as E, ProblemBadges as D, t as O, useDashboardNames as k } from "./list-page-agHupfNb.js";
14
12
  import { useState as A } from "react";
15
13
  import { jsx as j, jsxs as M } from "react/jsx-runtime";
16
14
  import { LayoutTemplateIcon as N, PlusIcon as P, Trash2Icon as F, WorkflowIcon as I } from "lucide-react";
17
15
  import { resolveLocalized as L } from "@overvis/hmi-shared";
18
16
  import { useNavigate as R } from "@tanstack/react-router";
19
- //#region src/workspace/setup/automations/alarm-rules-page.tsx
17
+ // src/workspace/setup/automations/alarm-rules-page.tsx
20
18
  function z({ workspaceId: z }) {
21
- let B = n(), V = r(), H = t(), U = R(), W = e.alarmRule.list.useQuery({ workspaceId: z }), G = k(z), [K, q] = A(null), [J, Y] = A(!1);
19
+ let B = r(), V = i(), H = n(), U = R(), W = t.alarmRule.list.useQuery({ workspaceId: z }), G = k(z), [K, q] = A(null), [J, Y] = A(!1);
22
20
  return /* @__PURE__ */ M(g, { children: [
23
21
  /* @__PURE__ */ j(c, {
24
22
  icon: /* @__PURE__ */ j(I, {}),
@@ -57,7 +55,7 @@ function z({ workspaceId: z }) {
57
55
  className: "space-y-2",
58
56
  children: [/* @__PURE__ */ j(o, { className: "h-10 w-full" }), /* @__PURE__ */ j(o, { className: "h-10 w-4/5" })]
59
57
  }),
60
- error: (e) => /* @__PURE__ */ j(u, { message: s(e) }),
58
+ error: (t) => /* @__PURE__ */ j(u, { message: e(t) }),
61
59
  isEmpty: (e) => e.items.length === 0,
62
60
  empty: /* @__PURE__ */ j(y, { children: B("setup_alarm_rules_empty") }),
63
61
  children: ({ items: e }) => /* @__PURE__ */ j(f, { children: e.map((e) => {
@@ -73,7 +71,7 @@ function z({ workspaceId: z }) {
73
71
  className: "flex min-w-0 flex-wrap items-center gap-2",
74
72
  children: [
75
73
  /* @__PURE__ */ j(b, { children: L(e.name, H) }),
76
- /* @__PURE__ */ j(i, {
74
+ /* @__PURE__ */ j(s, {
77
75
  variant: e.severity === "urgent" ? "destructive" : "secondary",
78
76
  children: C(e.severity)
79
77
  }),
@@ -117,5 +115,4 @@ function z({ workspaceId: z }) {
117
115
  }) : null
118
116
  ] });
119
117
  }
120
- //#endregion
121
118
  export { z as SetupAlarmRulesPage };