@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,41 +1,35 @@
1
- import { r as e } from "./trpc-CvJUuUXp.js";
2
- import { f as t, h as n, m as r } from "./i18n-BgzakKoC.js";
3
- import { A as i, M as a, j as o, l as s } from "./spinner-C-HPNxOc.js";
4
- import { t as c } from "./button-6SxPBYMz.js";
5
- import { n as l } from "./skeleton-6yk8Tdh5.js";
6
- import { i as u } from "./context-u9KJQmdB.js";
7
- import { n as d } from "./api-error-9rQmUN5L.js";
8
- import { i as f, n as p, r as m, t as h } from "./alarm-list-BL3xQ5Lf.js";
9
- import { a as g, i as _, o as v, r as y } from "./provider-BOeYHi0n.js";
10
- import { n as b } from "./date-time-picker-C3FhMXk6.js";
11
- import { t as x } from "./page-header-RB2YFWlE.js";
12
- import { i as S, n as C, r as w, t as T } from "./tabs-CSIucYFP.js";
13
- import { r as E, t as D } from "./query-gate-DVhNIkge.js";
14
- import { i as O, n as k, t as A } from "./search-D4rDnE9T.js";
1
+ import { Nr as e, Wn as t, fn as n, hn as r, ii as i, mn as a, pn as o } from "./quick-report-BcZsfkCZ.js";
2
+ import { f as s, h as c, m as l } from "./i18n-ChjEbYEg.js";
3
+ import { jt as u, xt as d } from "./alert-dialog-D_iDv2lQ.js";
4
+ import { A as f, M as p, j as m, l as h } from "./spinner-B-KLtBjp.js";
5
+ import { i as g, n as _, r as v, t as y } from "./alarm-list-DKFio0hg.js";
6
+ import { M as b, a as x, b as S, i as C, n as w, r as T } from "./panel-DuZD-cBP.js";
7
+ import { r as E, t as D } from "./query-gate-BbIo1Xrj.js";
8
+ import { i as O, n as k, t as A } from "./search-C6xQ_Hvo.js";
15
9
  import { jsx as j, jsxs as M } from "react/jsx-runtime";
16
10
  import { SirenIcon as N, XIcon as P } from "lucide-react";
17
11
  import { formatAppDateTime as F, parseExactAppDateTime as I } from "@overvis/hmi-shared";
18
12
  import { alarmEventKinds as L, automationSeverities as R } from "@overvis/hmi-shared/automation";
19
- //#region src/workspace/alarms/history.tsx
13
+ // src/workspace/alarms/history.tsx
20
14
  function z(e) {
21
- return t(e === "raised" ? "alarm_event_raised" : e === "cleared" ? "alarm_event_cleared" : e === "acknowledged" ? "alarm_event_acknowledged" : e === "shelved" ? "alarm_event_shelved" : e === "unshelved" ? "alarm_event_unshelved" : "alarm_event_removed");
15
+ return s(e === "raised" ? "alarm_event_raised" : e === "cleared" ? "alarm_event_cleared" : e === "acknowledged" ? "alarm_event_acknowledged" : e === "shelved" ? "alarm_event_shelved" : e === "unshelved" ? "alarm_event_unshelved" : "alarm_event_removed");
22
16
  }
23
17
  function B(e) {
24
- return t(e === "urgent" ? "automation_severity_urgent" : e === "warning" ? "automation_severity_warning" : "automation_severity_info");
18
+ return s(e === "urgent" ? "automation_severity_urgent" : e === "warning" ? "automation_severity_warning" : "automation_severity_info");
25
19
  }
26
20
  function V(e) {
27
21
  if (e.kind === "acknowledged" || e.kind === "shelved" || e.kind === "unshelved") {
28
- let n = [
22
+ let t = [
29
23
  e.actorName,
30
- e.kind === "shelved" && e.shelvedUntil != null ? t("alarm_event_shelved_until", { time: F(e.shelvedUntil) }) : null,
24
+ e.kind === "shelved" && e.shelvedUntil != null ? s("alarm_event_shelved_until", { time: F(e.shelvedUntil) }) : null,
31
25
  e.note
32
26
  ].filter((e) => e != null && e.length > 0);
33
- return n.length === 0 ? null : n.join(" · ");
27
+ return t.length === 0 ? null : t.join(" · ");
34
28
  }
35
- return e.kind === "removed" ? t("alarm_event_removed_detail") : null;
29
+ return e.kind === "removed" ? s("alarm_event_removed_detail") : null;
36
30
  }
37
- function H({ event: e, sourceName: t, timeZone: i, onShowAlarm: a }) {
38
- let o = r(), c = n(), { title: l } = m(e, _(e.message, c, i)), u = V(e);
31
+ function H({ event: e, sourceName: t, timeZone: n, onShowAlarm: r }) {
32
+ let i = l(), a = c(), { title: s } = v(e, o(e.message, a, n)), u = V(e);
39
33
  return /* @__PURE__ */ M("li", {
40
34
  className: "\n flex flex-col gap-1 border-b py-2.5 text-sm\n last:border-b-0\n @2xl:grid @2xl:grid-cols-[11rem_7rem_1fr] @2xl:gap-x-3\n ",
41
35
  children: [
@@ -46,7 +40,7 @@ function H({ event: e, sourceName: t, timeZone: i, onShowAlarm: a }) {
46
40
  }),
47
41
  /* @__PURE__ */ j("div", {
48
42
  className: "\n hidden items-start\n @2xl:flex\n ",
49
- children: /* @__PURE__ */ j(s, {
43
+ children: /* @__PURE__ */ j(h, {
50
44
  variant: "secondary",
51
45
  children: z(e.kind)
52
46
  })
@@ -57,20 +51,20 @@ function H({ event: e, sourceName: t, timeZone: i, onShowAlarm: a }) {
57
51
  /* @__PURE__ */ M("div", {
58
52
  className: "flex flex-wrap items-center gap-2",
59
53
  children: [
60
- /* @__PURE__ */ j(s, {
54
+ /* @__PURE__ */ j(h, {
61
55
  variant: "secondary",
62
56
  className: "@2xl:hidden",
63
57
  children: z(e.kind)
64
58
  }),
65
- /* @__PURE__ */ j(p, { severity: e.severity }),
59
+ /* @__PURE__ */ j(_, { severity: e.severity }),
66
60
  /* @__PURE__ */ j("button", {
67
61
  type: "button",
68
62
  className: "\n min-w-0 text-left font-medium wrap-break-word underline-offset-4\n hover:underline\n focus-visible:underline focus-visible:outline-none\n ",
69
- title: o("alarm_history_of_alarm"),
63
+ title: i("alarm_history_of_alarm"),
70
64
  onClick: () => {
71
- a(e.alarmId);
65
+ r(e.alarmId);
72
66
  },
73
- children: l
67
+ children: s
74
68
  })
75
69
  ]
76
70
  }),
@@ -87,19 +81,19 @@ function H({ event: e, sourceName: t, timeZone: i, onShowAlarm: a }) {
87
81
  ]
88
82
  });
89
83
  }
90
- function U({ workspaceId: t, filters: n, onFiltersChange: s }) {
91
- let p = r(), m = u()?.timezone ?? "UTC", h = f(t, !0), _ = I(n.from ?? "")?.toISOString(), v = I(n.to ?? "")?.toISOString(), y = e.alarm.log.useInfiniteQuery({
92
- workspaceId: t,
93
- ...n.severity == null ? {} : { severities: [n.severity] },
94
- ...n.kind == null ? {} : { kinds: [n.kind] },
95
- ...n.source == null ? {} : { sourceIds: [n.source] },
96
- ...n.alarm == null ? {} : { alarmId: n.alarm },
84
+ function U({ workspaceId: n, filters: r, onFiltersChange: o }) {
85
+ let s = l(), c = e()?.timezone ?? "UTC", h = g(n, !0), _ = I(r.from ?? "")?.toISOString(), v = I(r.to ?? "")?.toISOString(), y = i.alarm.log.useInfiniteQuery({
86
+ workspaceId: n,
87
+ ...r.severity == null ? {} : { severities: [r.severity] },
88
+ ...r.kind == null ? {} : { kinds: [r.kind] },
89
+ ...r.source == null ? {} : { sourceIds: [r.source] },
90
+ ...r.alarm == null ? {} : { alarmId: r.alarm },
97
91
  ..._ == null ? {} : { from: _ },
98
92
  ...v == null ? {} : { to: v },
99
93
  limit: 50
100
- }, { getNextPageParam: (e) => e.nextCursor ?? void 0 }), x = Object.values(n).some((e) => e != null && e !== ""), S = (e) => {
101
- s(A(k({
102
- ...n,
94
+ }, { getNextPageParam: (e) => e.nextCursor ?? void 0 }), x = Object.values(r).some((e) => e != null && e !== ""), S = (e) => {
95
+ o(A(k({
96
+ ...r,
103
97
  ...e
104
98
  })));
105
99
  };
@@ -108,61 +102,61 @@ function U({ workspaceId: t, filters: n, onFiltersChange: s }) {
108
102
  children: [
109
103
  /* @__PURE__ */ M("div", {
110
104
  role: "group",
111
- "aria-label": p("alarm_history_filters"),
105
+ "aria-label": s("alarm_history_filters"),
112
106
  className: "\n grid grid-cols-2 items-start gap-2\n @2xl:grid-cols-6\n @4xl:grid-cols-12\n ",
113
107
  children: [
114
- /* @__PURE__ */ M(i, {
108
+ /* @__PURE__ */ M(f, {
115
109
  className: "\n w-full\n @2xl:col-span-2\n ",
116
- "aria-label": p("alarm_history_severity"),
117
- value: n.severity ?? "",
110
+ "aria-label": s("alarm_history_severity"),
111
+ value: r.severity ?? "",
118
112
  onChange: (e) => {
119
113
  S({ severity: e.target.value });
120
114
  },
121
- children: [/* @__PURE__ */ j(a, {
115
+ children: [/* @__PURE__ */ j(p, {
122
116
  value: "",
123
- children: p("alarm_history_all_severities")
124
- }), R.map((e) => /* @__PURE__ */ j(a, {
117
+ children: s("alarm_history_all_severities")
118
+ }), R.map((e) => /* @__PURE__ */ j(p, {
125
119
  value: e,
126
120
  children: B(e)
127
121
  }, e))]
128
122
  }),
129
- /* @__PURE__ */ M(i, {
123
+ /* @__PURE__ */ M(f, {
130
124
  className: "\n w-full\n @2xl:col-span-2\n ",
131
- "aria-label": p("alarm_history_kind"),
132
- value: n.kind ?? "",
125
+ "aria-label": s("alarm_history_kind"),
126
+ value: r.kind ?? "",
133
127
  onChange: (e) => {
134
128
  S({ kind: e.target.value });
135
129
  },
136
- children: [/* @__PURE__ */ j(a, {
130
+ children: [/* @__PURE__ */ j(p, {
137
131
  value: "",
138
- children: p("alarm_history_all_kinds")
139
- }), L.map((e) => /* @__PURE__ */ j(a, {
132
+ children: s("alarm_history_all_kinds")
133
+ }), L.map((e) => /* @__PURE__ */ j(p, {
140
134
  value: e,
141
135
  children: z(e)
142
136
  }, e))]
143
137
  }),
144
- /* @__PURE__ */ M(i, {
138
+ /* @__PURE__ */ M(f, {
145
139
  className: "\n col-span-2 w-full\n @4xl:col-span-2\n ",
146
- "aria-label": p("alarm_history_source"),
147
- value: n.source ?? "",
140
+ "aria-label": s("alarm_history_source"),
141
+ value: r.source ?? "",
148
142
  onChange: (e) => {
149
143
  S({ source: e.target.value });
150
144
  },
151
145
  children: [
152
- /* @__PURE__ */ j(a, {
146
+ /* @__PURE__ */ j(p, {
153
147
  value: "",
154
- children: p("alarm_history_all_sources")
148
+ children: s("alarm_history_all_sources")
155
149
  }),
156
- h.rules.length > 0 ? /* @__PURE__ */ j(o, {
157
- label: p("alarm_history_alarm_rules"),
158
- children: h.rules.map((e) => /* @__PURE__ */ j(a, {
150
+ h.rules.length > 0 ? /* @__PURE__ */ j(m, {
151
+ label: s("alarm_history_alarm_rules"),
152
+ children: h.rules.map((e) => /* @__PURE__ */ j(p, {
159
153
  value: e.id,
160
154
  children: h.names.get(e.id)
161
155
  }, e.id))
162
156
  }) : null,
163
- h.automations.length > 0 ? /* @__PURE__ */ j(o, {
164
- label: p("alarm_history_automations"),
165
- children: h.automations.map((e) => /* @__PURE__ */ j(a, {
157
+ h.automations.length > 0 ? /* @__PURE__ */ j(m, {
158
+ label: s("alarm_history_automations"),
159
+ children: h.automations.map((e) => /* @__PURE__ */ j(p, {
166
160
  value: e.id,
167
161
  children: h.names.get(e.id)
168
162
  }, e.id))
@@ -171,13 +165,13 @@ function U({ workspaceId: t, filters: n, onFiltersChange: s }) {
171
165
  }),
172
166
  /* @__PURE__ */ j("div", {
173
167
  role: "group",
174
- "aria-label": p("alarm_history_period"),
168
+ "aria-label": s("alarm_history_period"),
175
169
  className: "\n col-span-2\n @2xl:col-span-6\n @4xl:col-span-6\n ",
176
170
  children: /* @__PURE__ */ j(b, {
177
171
  optional: !0,
178
172
  value: {
179
- from: n.from ?? "",
180
- to: n.to ?? ""
173
+ from: r.from ?? "",
174
+ to: r.to ?? ""
181
175
  },
182
176
  onValueChange: (e) => {
183
177
  S({
@@ -187,53 +181,53 @@ function U({ workspaceId: t, filters: n, onFiltersChange: s }) {
187
181
  }
188
182
  })
189
183
  }),
190
- n.alarm == null ? null : /* @__PURE__ */ M(c, {
184
+ r.alarm == null ? null : /* @__PURE__ */ M(u, {
191
185
  variant: "outline",
192
186
  size: "sm",
193
187
  className: "col-span-2 justify-self-start",
194
188
  onClick: () => {
195
189
  S({ alarm: void 0 });
196
190
  },
197
- children: [/* @__PURE__ */ j(P, { "data-icon": "inline-start" }), p("alarm_history_one_alarm")]
191
+ children: [/* @__PURE__ */ j(P, { "data-icon": "inline-start" }), s("alarm_history_one_alarm")]
198
192
  }),
199
- x ? /* @__PURE__ */ M(c, {
193
+ x ? /* @__PURE__ */ M(u, {
200
194
  variant: "ghost",
201
195
  size: "sm",
202
196
  className: "col-span-2 justify-self-start",
203
197
  onClick: () => {
204
- s({});
198
+ o({});
205
199
  },
206
- children: [/* @__PURE__ */ j(P, { "data-icon": "inline-start" }), p("alarm_history_clear_filters")]
200
+ children: [/* @__PURE__ */ j(P, { "data-icon": "inline-start" }), s("alarm_history_clear_filters")]
207
201
  }) : null
208
202
  ]
209
203
  }),
210
204
  /* @__PURE__ */ j("p", {
211
205
  className: "text-xs text-muted-foreground",
212
- children: p("alarm_history_delay")
206
+ children: s("alarm_history_delay")
213
207
  }),
214
208
  /* @__PURE__ */ j(E, {
215
209
  query: y,
216
- loading: /* @__PURE__ */ j(l, { className: "h-52 w-full" }),
217
- error: (e) => /* @__PURE__ */ j(D, { message: d(e) }),
210
+ loading: /* @__PURE__ */ j(d, { className: "h-52 w-full" }),
211
+ error: (e) => /* @__PURE__ */ j(D, { message: t(e) }),
218
212
  isEmpty: (e) => e.pages.every((e) => e.events.length === 0),
219
213
  empty: /* @__PURE__ */ j("p", {
220
214
  className: "rounded-lg border py-10 text-center text-sm text-muted-foreground",
221
- children: p("alarm_history_empty")
215
+ children: s("alarm_history_empty")
222
216
  }),
223
217
  children: (e) => /* @__PURE__ */ j("ul", {
224
- "aria-label": p("alarm_history_title"),
218
+ "aria-label": s("alarm_history_title"),
225
219
  className: "rounded-lg border px-3",
226
220
  children: e.pages.flatMap((e) => e.events.map((e) => /* @__PURE__ */ j(H, {
227
221
  event: e,
228
- sourceName: h.names.get(g(e.source)) ?? null,
229
- timeZone: m,
222
+ sourceName: h.names.get(a(e.source)) ?? null,
223
+ timeZone: c,
230
224
  onShowAlarm: (e) => {
231
225
  S({ alarm: e });
232
226
  }
233
227
  }, e.id)))
234
228
  })
235
229
  }),
236
- y.hasNextPage ? /* @__PURE__ */ j(c, {
230
+ y.hasNextPage ? /* @__PURE__ */ j(u, {
237
231
  variant: "outline",
238
232
  size: "sm",
239
233
  className: "self-center",
@@ -241,54 +235,53 @@ function U({ workspaceId: t, filters: n, onFiltersChange: s }) {
241
235
  onClick: () => {
242
236
  y.fetchNextPage();
243
237
  },
244
- children: p("alarm_history_more")
238
+ children: s("alarm_history_more")
245
239
  }) : null
246
240
  ]
247
241
  });
248
242
  }
249
- //#endregion
250
- //#region src/workspace/alarms/page.tsx
251
- function W({ workspaceId: e, search: t, onSearchChange: n }) {
252
- let i = r(), { alarms: a, now: o } = y(e), s = a == null ? 0 : v(a, o), c = t.tab ?? "active";
243
+ // src/workspace/alarms/page.tsx
244
+ function W({ workspaceId: e, search: t, onSearchChange: i }) {
245
+ let a = l(), { alarms: o, now: s } = n(e), c = o == null ? 0 : r(o, s), u = t.tab ?? "active";
253
246
  return /* @__PURE__ */ M("div", {
254
247
  className: "\n @container mx-auto flex w-full max-w-5xl flex-1 flex-col gap-4 p-4\n md:p-6\n ",
255
248
  children: [
256
- /* @__PURE__ */ j(x, {
249
+ /* @__PURE__ */ j(S, {
257
250
  icon: /* @__PURE__ */ j(N, {}),
258
- title: i("alarm_page_title"),
259
- description: i("alarm_page_description"),
251
+ title: a("alarm_page_title"),
252
+ description: a("alarm_page_description"),
260
253
  className: "p-0"
261
254
  }),
262
255
  /* @__PURE__ */ j(O, {}),
263
- /* @__PURE__ */ M(T, {
264
- value: c,
256
+ /* @__PURE__ */ M(w, {
257
+ value: u,
265
258
  onValueChange: (e) => {
266
- n(e === "history" ? {
259
+ i(e === "history" ? {
267
260
  ...A(t),
268
261
  tab: "history"
269
262
  } : {});
270
263
  },
271
264
  children: [
272
- /* @__PURE__ */ M(w, { children: [/* @__PURE__ */ j(S, {
265
+ /* @__PURE__ */ M(C, { children: [/* @__PURE__ */ j(x, {
273
266
  value: "active",
274
- children: s > 0 ? i("alarm_tab_active_count", { count: String(s) }) : i("alarm_tab_active")
275
- }), /* @__PURE__ */ j(S, {
267
+ children: c > 0 ? a("alarm_tab_active_count", { count: String(c) }) : a("alarm_tab_active")
268
+ }), /* @__PURE__ */ j(x, {
276
269
  value: "history",
277
- children: i("alarm_tab_history")
270
+ children: a("alarm_tab_history")
278
271
  })] }),
279
- /* @__PURE__ */ j(C, {
272
+ /* @__PURE__ */ j(T, {
280
273
  value: "active",
281
274
  className: "pt-2",
282
- children: /* @__PURE__ */ j(h, { workspaceId: e })
275
+ children: /* @__PURE__ */ j(y, { workspaceId: e })
283
276
  }),
284
- /* @__PURE__ */ j(C, {
277
+ /* @__PURE__ */ j(T, {
285
278
  value: "history",
286
279
  className: "pt-2",
287
- children: c === "history" ? /* @__PURE__ */ j(U, {
280
+ children: u === "history" ? /* @__PURE__ */ j(U, {
288
281
  workspaceId: e,
289
282
  filters: A(t),
290
283
  onFiltersChange: (e) => {
291
- n({
284
+ i({
292
285
  ...e,
293
286
  tab: "history"
294
287
  });
@@ -300,5 +293,4 @@ function W({ workspaceId: e, search: t, onSearchChange: n }) {
300
293
  ]
301
294
  });
302
295
  }
303
- //#endregion
304
296
  export { W as AlarmsPage };