@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,5 +1,5 @@
1
1
  import { resolveLocalized as e } from "@overvis/hmi-shared";
2
- //#region src/workspace/parameters/live/model.ts
2
+ // src/workspace/parameters/live/model.ts
3
3
  var t = {
4
4
  status: "idle",
5
5
  reason: "no-demand"
@@ -32,7 +32,7 @@ function c(e, t = {}) {
32
32
  }
33
33
  function l(e) {
34
34
  let t = null;
35
- for (let n of e) n?.status !== "value" || n.freshness !== "stale" || (t = t == null ? n.snapshot.receivedAt : Math.min(t, n.snapshot.receivedAt));
35
+ for (let n of e) n?.status === "value" && n.freshness === "stale" && (t = t == null ? n.snapshot.receivedAt : Math.min(t, n.snapshot.receivedAt));
36
36
  return t;
37
37
  }
38
38
  function u(e) {
@@ -182,19 +182,7 @@ function O(e) {
182
182
  let t = /* @__PURE__ */ new Map(), n = [], r = 0, i = 0, a = 0, o = 0, s = 0, c = [], l = null, u = !1, d = !1;
183
183
  for (let f of e.parameterIds) {
184
184
  let p = e.getState(f);
185
- if (t.set(f, p), p.status === "loading") {
186
- r += 1, u = !0;
187
- continue;
188
- }
189
- if (p.status === "idle") {
190
- p.reason === "no-demand" && (i += 1), p.reason === "forbidden" && c.push(f);
191
- continue;
192
- }
193
- if (p.status === "value") {
194
- a += 1, p.freshness === "fresh" && (o += 1), p.diagnostic != null && n.push(p.diagnostic), l = Math.max(l ?? 0, p.snapshot.receivedAt), u ||= p.refreshing, d ||= p.saving;
195
- continue;
196
- }
197
- s += 1, n.push(p.diagnostic), u ||= p.refreshing, d ||= p.saving;
185
+ t.set(f, p), p.status === "loading" ? (r += 1, u = !0) : p.status === "idle" ? (p.reason === "no-demand" && (i += 1), p.reason === "forbidden" && c.push(f)) : p.status === "value" ? (a += 1, p.freshness === "fresh" && (o += 1), p.diagnostic != null && n.push(p.diagnostic), l = Math.max(l ?? 0, p.snapshot.receivedAt), u ||= p.refreshing, d ||= p.saving) : (s += 1, n.push(p.diagnostic), u ||= p.refreshing, d ||= p.saving);
198
186
  }
199
187
  c.length > 0 && n.push({
200
188
  kind: "permission",
@@ -211,5 +199,4 @@ function O(e) {
211
199
  saving: d
212
200
  };
213
201
  }
214
- //#endregion
215
202
  export { O as aggregateParameterValues, D as combineParameterValuesDemands, T as groupParameterDiagnostics, n as isCurrentParameterValue, d as isParameterValuePending, u as latestParameterReceivedAt, t as noDemandParameterValueState, _ as parameterDiagnosticFromResult, S as parameterDiagnosticKey, l as parameterStatesStaleSince, s as parameterValueBoolean, i as parameterValueComparable, c as parameterValueFlag, o as parameterValueNumber, a as parameterValueTime, v as parameterWriteOutcome, p as primaryParameterDiagnosticKind };
@@ -1,4 +1,4 @@
1
- //#region src/i18n/catalogs/pl/messages.ts
1
+ // src/i18n/catalogs/pl/messages.ts
2
2
  var e = {
3
3
  messages_title: "Komunikaty i powiadomienia",
4
4
  messages_tab: "Komunikaty",
@@ -3140,6 +3140,8 @@ var e = {
3140
3140
  edge_program_delete_description: "Program zostanie usunięty z urządzenia przy następnym wdrożeniu, a urządzenie uruchomi ponownie pozostałe programy.",
3141
3141
  edge_program_delete_submit: "Usuń",
3142
3142
  edge_program_delete_toast: "Usunięto program",
3143
+ edge_program_indent_if_actions: "Wcięcie akcji po IF",
3144
+ edge_program_indent_if_actions_hint: "Wcina akcję po każdym IF o cztery spacje (Shift+Alt+F)",
3143
3145
  edge_program_enabled_label: "Program włączony",
3144
3146
  edge_program_enabled: "Włączony",
3145
3147
  edge_program_disabled: "Wyłączony",
@@ -3270,6 +3272,7 @@ var e = {
3270
3272
  taskfile_error_param_map_multiple_writers: "Inny program zapisuje ten odwzorowany parametr. Zapisywać go może tylko jeden program.",
3271
3273
  taskfile_error_obsolete_file_layout: "Pliki na urządzeniu mają przestarzały układ.",
3272
3274
  taskfile_error_unknown: "Urządzenie zgłosiło błąd {code}.",
3275
+ taskfile_warning_consecutive_if: "To IF jest sprawdzane tylko wtedy, gdy IF przed nim jest prawdziwe; w przeciwnym razie jest pomijane, a akcja po nim zostaje wykonana. Aby wymagać obu warunków, użyj IF AND.",
3273
3276
  taskfile_warning_depends_on_invalid_definition: "Ten wiersz używa definicji, która zawiera błąd.",
3274
3277
  taskfile_warning_filename_ignored: "Urządzenie pomija {filename}: pliki .MAP, .OBJ i .CNF są zarezerwowane.",
3275
3278
  taskfile_warning_filename_invalid: "{filename} nie jest nazwą pliku 8.3, więc urządzenie go pomija.",
@@ -4574,5 +4577,4 @@ var e = {
4574
4577
  ...k,
4575
4578
  ...A
4576
4579
  };
4577
- //#endregion
4578
4580
  export { F as default };
@@ -0,0 +1,73 @@
1
+ import { Hn as e, Un as t, Wn as n, ii as r } from "./quick-report-BcZsfkCZ.js";
2
+ import { f as i } from "./i18n-ChjEbYEg.js";
3
+ import { useEffect as a, useRef as o } from "react";
4
+ import { jsx as s } from "react/jsx-runtime";
5
+ // src/workspace/setup/endpoints/presence-challenge.tsx
6
+ function c(n, r, a) {
7
+ return e(n, r, { message: (e) => !a && t(e) === "endpoint_presence_not_pressed" ? i("error_endpoint_presence_not_pressed_button") : null });
8
+ }
9
+ function l(e) {
10
+ let n = t(e);
11
+ return n === "endpoint_presence_rejected" || n === "endpoint_presence_not_pressed" || n === "endpoint_presence_unavailable";
12
+ }
13
+ function u() {
14
+ let e = r.endpoint.beginPinPresence.useMutation(), t = r.endpoint.cancelPinPresence.useMutation(), n = o(t.mutate), i = o(null), s = o(!1);
15
+ return a(() => {
16
+ n.current = t.mutate;
17
+ }), a(() => (s.current = !1, () => {
18
+ s.current = !0;
19
+ let e = i.current;
20
+ i.current = null, e != null && n.current({ challengeId: e });
21
+ }), []), {
22
+ begin: async (t) => {
23
+ let r = await e.mutateAsync(t);
24
+ return s.current ? (r.presenceRequired && n.current({ challengeId: r.challengeId }), "closed") : r.presenceRequired ? (i.current = r.challengeId, {
25
+ challengeId: r.challengeId,
26
+ codeDisplayed: r.codeDisplayed
27
+ }) : null;
28
+ },
29
+ cancel: (e) => {
30
+ i.current === e && (i.current = null), n.current({ challengeId: e });
31
+ },
32
+ settle: (e) => {
33
+ i.current === e && (i.current = null);
34
+ }
35
+ };
36
+ }
37
+ function d({ challengeId: e, paused: i, onDone: c }) {
38
+ let l = r.endpoint.pollPinPresence.useQuery({ challengeId: e }, {
39
+ enabled: !i,
40
+ refetchInterval: (e) => {
41
+ let n = t(e.state.error);
42
+ return n === "endpoint_presence_invalid" || n === "endpoint_presence_unsupported" ? !1 : 1e3;
43
+ },
44
+ refetchIntervalInBackground: !0,
45
+ retry: !1,
46
+ gcTime: 0
47
+ }), u = t(l.error) === "endpoint_presence_invalid", d = l.data?.pressed === !0 ? l.dataUpdatedAt : 0, f = o(c), p = o(0), m = o(!1);
48
+ return a(() => {
49
+ f.current = c;
50
+ }), a(() => {
51
+ i || (u ? m.current || (m.current = !0, f.current()) : d > p.current && (p.current = d, f.current()));
52
+ }, [
53
+ u,
54
+ i,
55
+ d
56
+ ]), l.error == null || u ? null : /* @__PURE__ */ s("p", {
57
+ role: "status",
58
+ className: "text-sm text-destructive",
59
+ children: n(l.error)
60
+ });
61
+ }
62
+ // src/workspace/setup/endpoints/presence-code.ts
63
+ function f(e) {
64
+ let t = e.trim();
65
+ return t.length === 0 ? {
66
+ ok: !0,
67
+ code: void 0
68
+ } : /^[1-9][0-9]{7}$/.test(t) ? {
69
+ ok: !0,
70
+ code: Number(t)
71
+ } : { ok: !1 };
72
+ }
73
+ export { u as a, l as i, d as n, c as r, f as t };
@@ -1,14 +1,15 @@
1
- import { m as e } from "./i18n-BgzakKoC.js";
2
- import { t } from "./utils-CX-Pz5p6.js";
3
- import { t as n } from "./notice-card-DyGywFsW.js";
1
+ import { m as e } from "./i18n-ChjEbYEg.js";
2
+ import { Nt as t } from "./alert-dialog-D_iDv2lQ.js";
3
+ import { t as n } from "./notice-card-V_0K0lO0.js";
4
4
  import { jsx as r } from "react/jsx-runtime";
5
- //#region src/workspace/query-gate.tsx
5
+ // src/workspace/query-gate.tsx
6
6
  function i({ query: e, loading: t, error: n, isEmpty: r, empty: i, children: a }) {
7
7
  return e.isLoading ? t : e.isError ? n(e.error) : e.data === void 0 ? t : r?.(e.data) === !0 ? i : a(e.data);
8
8
  }
9
9
  function a({ message: t, onRetry: i, retrying: a, className: o }) {
10
+ let s = e();
10
11
  return /* @__PURE__ */ r(n, {
11
- title: e()("error_request_failed_title"),
12
+ title: s("error_request_failed_title"),
12
13
  description: t,
13
14
  ...i == null ? {} : { onRetry: i },
14
15
  ...a == null ? {} : { retrying: a },
@@ -29,5 +30,4 @@ function o({ message: i, onRetry: a, retrying: o, actions: s, className: c }) {
29
30
  })
30
31
  });
31
32
  }
32
- //#endregion
33
33
  export { o as n, i as r, a as t };