@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.
- package/dist/alarm-list-sheAq-pb.js +414 -0
- package/dist/alarm-rule-dialog-D_ml7V0v.js +417 -0
- package/dist/{alarm-rule-lists-C5v1Kf7A.js → alarm-rule-lists-DaA4soF4.js} +123 -125
- package/dist/{alarm-rules-page-CqFzofPd.js → alarm-rules-page-OFjOQ-dm.js} +15 -18
- package/dist/alert-dialog-B60PF7S9.js +891 -0
- package/dist/{base-revision-YCO27zR4.js → base-revision-DYCOZS0R.js} +26 -29
- package/dist/{breadcrumbs-0cjsV2cq.js → breadcrumbs-D2u8KZQo.js} +6 -7
- package/dist/{catalog-list-DjZojYLJ.js → catalog-list-LXuRix0-.js} +2 -4
- package/dist/{code-editor-BVimvjDV.js → code-editor-BMSyzAxu.js} +5 -6
- package/dist/dashboard-bindings.js +1 -2
- package/dist/{dashboards-page-BlrJguNz.js → dashboards-page-wnmmLpVC.js} +335 -359
- package/dist/{de-14WdmJxZ.js → de-hkEr2usK.js} +1 -2
- package/dist/diagnostic-text-CsbENUNI.js +116 -0
- package/dist/{dialogs-B6BRnf3Q.js → dialogs-AtIYlNSy.js} +219 -227
- package/dist/{dialogs-D_v1LeH4.js → dialogs-DsHbKgZD.js} +2523 -2590
- package/dist/{display-DmOo23mi.js → display-DSyEwQt8.js} +4 -6
- package/dist/{editor-language-To9MxloY.js → editor-language-CTfJBXMs.js} +3 -5
- package/dist/editor-page-BWbVGJvU.js +1337 -0
- package/dist/{en-BgercpT0.js → en-UW_k-Bd6.js} +1 -2
- package/dist/entity-controls-BCuRx882.js +71 -0
- package/dist/errors-Cawve9yD.js +25 -0
- package/dist/{footer-DC-Q0052.js → footer-B9XdpVzq.js} +2404 -2515
- package/dist/host.js +8143 -675
- package/dist/{i18n-BgzakKoC.js → i18n-Dt6xbSK6.js} +77 -90
- package/dist/i18n.js +1 -2
- package/dist/index.js +5149 -5345
- package/dist/{lat-lng-B12P7QyY.js → lat-lng-Bl77AGSO.js} +1 -2
- package/dist/{list-page-CvsdZb86.js → list-page-agHupfNb.js} +116 -123
- package/dist/{location-map-renderer-DO5yfdSU.js → location-map-renderer-kxU6cgFl.js} +6 -6
- package/dist/{location-picker-renderer-CjCxg6ai.js → location-picker-renderer-B1_-n8lf.js} +3 -4
- package/dist/{model-B8gGi4OK.js → model-tpg_xpFB.js} +1 -2
- package/dist/{notice-card-DyGywFsW.js → notice-card-CH28rYUt.js} +54 -58
- package/dist/{page-v6LCwswN.js → page-CZPHJUmz.js} +92 -100
- package/dist/page-DpdkOGGb.js +449 -0
- package/dist/page-HCGXXGjy.js +507 -0
- package/dist/panel-BCwBlB_h.js +949 -0
- package/dist/parameter-values.js +3 -16
- package/dist/{pl-lQ9HXV9k.js → pl-BokvsP3J.js} +1 -2
- package/dist/presence-code-cT6wxlTg.js +73 -0
- package/dist/{query-gate-DVhNIkge.js → query-gate-DqmHsZ07.js} +6 -6
- package/dist/{provider-DoEpKcQ-.js → quick-report-DEqqwQxR.js} +9423 -5102
- package/dist/{retention-BYXNpYmR.js → retention-DZ0reGGe.js} +4 -6
- package/dist/retention-note-nequESpo.js +40 -0
- package/dist/{rolldown-runtime-Dy4uBu1J.js → rolldown-runtime-CGnMp29N.js} +1 -2
- package/dist/{ru-qTKINoUj.js → ru-DZSlsRHq.js} +1 -2
- package/dist/run-text-DneX9rWh.js +112 -0
- package/dist/{search-D4rDnE9T.js → search-DP9_alSQ.js} +26 -29
- package/dist/{sections-kCOyc4NR.js → sections-BU7NKUOQ.js} +2 -3
- package/dist/{select-BKiOWdSr.js → select-Te6Qv1Zu.js} +17 -23
- package/dist/{spinner-C-HPNxOc.js → spinner-BRcNKwjH.js} +182 -201
- package/dist/src/version.d.ts +1 -1
- package/dist/src/workspace/local-workspace-app.d.ts +1 -1
- package/dist/src/workspace/routes.d.ts +1 -1
- package/dist/{starter-fields-BRLX0z-v.js → starter-fields-yM4B49nd.js} +154 -157
- package/dist/{starter-handoff-BA3ucMKL.js → starter-handoff-BaK8Ss8I.js} +1 -2
- package/dist/styles.css +1 -1
- package/dist/ui.js +334 -374
- package/dist/{uk-CwpJAxmx.js → uk-CjXPq9Lk.js} +1 -2
- package/dist/{wireguard-docs-AfU6NzTL.js → wireguard-docs-CC8XKBR7.js} +14 -17
- package/package.json +15 -9
- package/dist/alarm-list-BL3xQ5Lf.js +0 -423
- package/dist/alarm-rule-dialog-S1ZUg-74.js +0 -423
- package/dist/alert-B8MAoIO8.js +0 -45
- package/dist/alert-dialog-CYkuMg5D.js +0 -129
- package/dist/api-error-9rQmUN5L.js +0 -93
- package/dist/breadcrumb-DzVL1yHa.js +0 -74
- package/dist/button-6SxPBYMz.js +0 -44
- package/dist/context-u9KJQmdB.js +0 -102
- package/dist/copyable-id-DYGiAcnq.js +0 -40
- package/dist/dashboard-context-CBfG6DoT.js +0 -191
- package/dist/date-time-picker-C3FhMXk6.js +0 -266
- package/dist/diagnostic-text-BAkzW0SE.js +0 -111
- package/dist/diagnostic-text-DiKd2i1w.js +0 -76
- package/dist/dialog-BIhQXcZC.js +0 -237
- package/dist/dialog-BqyIxMD-.js +0 -54
- package/dist/dropdown-menu-DSzbBq3v.js +0 -136
- package/dist/editor-page-BiSZJz5b.js +0 -1353
- package/dist/empty-B-QJ-06w.js +0 -59
- package/dist/entity-controls-D1K4Ot3O.js +0 -76
- package/dist/errors-CcsvDHu8.js +0 -26
- package/dist/history-page-sAAhG54V.js +0 -1400
- package/dist/icon-D-pR9htW.js +0 -57
- package/dist/index-page-DMH82fZe.js +0 -214
- package/dist/item-B5SaTFQU.js +0 -120
- package/dist/mutation-form-validators-BNz5bsv1.js +0 -2408
- package/dist/mutations-THtGG6Ai.js +0 -240
- package/dist/page-2KPemaAj.js +0 -328
- package/dist/page-6rIoTg2L.js +0 -459
- package/dist/page-C6giEoEd.js +0 -1935
- package/dist/page-DCbTxKsi.js +0 -313
- package/dist/page-DWO427hT.js +0 -208
- package/dist/page-LXu_2zm3.js +0 -137
- package/dist/page-aaUiVOnk.js +0 -513
- package/dist/page-header-RB2YFWlE.js +0 -55
- package/dist/page-title-CdCbiLt8.js +0 -14
- package/dist/panel-DDy8tUNR.js +0 -338
- package/dist/presence-code-BfSXr50g.js +0 -83
- package/dist/progress-C7cxNJA1.js +0 -83
- package/dist/provider-BOeYHi0n.js +0 -134
- package/dist/quick-report-CUVJnbKP.js +0 -416
- package/dist/radio-group-CZGqVbkJ.js +0 -26
- package/dist/retention-note-CHhA6gjY.js +0 -42
- package/dist/run-text-DvaO8LDF.js +0 -113
- package/dist/select-eNgZdZ30.js +0 -521
- package/dist/skeleton-6yk8Tdh5.js +0 -19
- package/dist/slider-DorDsoF8.js +0 -37
- package/dist/status-page-DAHiKM9P.js +0 -3286
- package/dist/switch-BqD0RH_G.js +0 -18
- package/dist/table-Q2-voLuw.js +0 -65
- package/dist/tabs-CSIucYFP.js +0 -57
- package/dist/theme-provider-BkRohQFU.js +0 -61
- package/dist/toggle-group-9Bs0Mm3r.js +0 -82
- package/dist/trpc-CvJUuUXp.js +0 -153
- package/dist/utils-CX-Pz5p6.js +0 -8
- package/dist/writability-BuH-spxv.js +0 -57
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { f as t, h as n } from "./i18n-
|
|
1
|
+
import { ii as e } from "./quick-report-DEqqwQxR.js";
|
|
2
|
+
import { f as t, h as n } from "./i18n-Dt6xbSK6.js";
|
|
3
3
|
import { useMemo as r } from "react";
|
|
4
4
|
import { resolveLocalized as i } from "@overvis/hmi-shared";
|
|
5
5
|
import { createRetentionResolver as a } from "@overvis/hmi-shared/workspace";
|
|
6
|
-
|
|
6
|
+
// src/workspace/setup/storage/format.ts
|
|
7
7
|
function o(e, t) {
|
|
8
8
|
return new Intl.NumberFormat(t).format(e);
|
|
9
9
|
}
|
|
@@ -22,8 +22,7 @@ function s(e, n) {
|
|
|
22
22
|
function c(e) {
|
|
23
23
|
return e == null ? t("storage_keep_forever") : e === 1 ? t("storage_keep_one_day") : t("storage_keep_days", { days: String(e) });
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
//#region src/workspace/setup/storage/retention.ts
|
|
25
|
+
// src/workspace/setup/storage/retention.ts
|
|
27
26
|
function l(e, t) {
|
|
28
27
|
return a(e, {
|
|
29
28
|
parameterBranch: new Map(t.parameters.map((e) => [e.id, e.branchId])),
|
|
@@ -58,5 +57,4 @@ function d(e, n) {
|
|
|
58
57
|
});
|
|
59
58
|
}
|
|
60
59
|
}
|
|
61
|
-
//#endregion
|
|
62
60
|
export { o as a, s as i, l as n, c as o, u as r, d as t };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Gn as e } from "./quick-report-DEqqwQxR.js";
|
|
2
|
+
import { f as t, m as n } from "./i18n-Dt6xbSK6.js";
|
|
3
|
+
import { H as r, L as i, z as a } from "./spinner-BRcNKwjH.js";
|
|
4
|
+
import { r as o, t as s } from "./retention-DZ0reGGe.js";
|
|
5
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
|
+
import { Link as u } from "@tanstack/react-router";
|
|
7
|
+
// src/workspace/parameters/errors.ts
|
|
8
|
+
var d = {
|
|
9
|
+
parameter_name_invalid: "name",
|
|
10
|
+
parameter_invalid_value_type: "valueType",
|
|
11
|
+
parameter_branch_not_found: "branchId",
|
|
12
|
+
parameter_endpoint_not_found: "source",
|
|
13
|
+
parameter_input_not_found: "source",
|
|
14
|
+
parameter_input_self_reference: "source",
|
|
15
|
+
parameter_input_cycle: "source"
|
|
16
|
+
};
|
|
17
|
+
function f(n) {
|
|
18
|
+
let r = e(n).details, i = r?.availableBytes, a = r?.requiredBytes;
|
|
19
|
+
return r?.reason !== "modbus_source_too_short" || typeof i != "number" || typeof a != "number" ? null : () => t("parameter_field_addresses_too_short", {
|
|
20
|
+
available: i,
|
|
21
|
+
required: a
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
// src/workspace/setup/storage/retention-note.tsx
|
|
25
|
+
function p({ workspaceId: e, target: t }) {
|
|
26
|
+
let d = n(), f = o(e);
|
|
27
|
+
if (f == null) return null;
|
|
28
|
+
let p = t.kind === "parameter" ? f.resolver.parameter(t.id) : f.resolver.branch(t.id);
|
|
29
|
+
return /* @__PURE__ */ l(i, { children: [/* @__PURE__ */ c(r, { children: d("storage_retention_field") }), /* @__PURE__ */ l(a, { children: [
|
|
30
|
+
s(p, f.branchName),
|
|
31
|
+
" ",
|
|
32
|
+
/* @__PURE__ */ c(u, {
|
|
33
|
+
to: "/workspace/$workspaceId/setup/storage",
|
|
34
|
+
params: { workspaceId: e },
|
|
35
|
+
className: "\n text-primary\n hover:underline\n ",
|
|
36
|
+
children: d("storage_retention_change_link")
|
|
37
|
+
})
|
|
38
|
+
] })] });
|
|
39
|
+
}
|
|
40
|
+
export { f as n, d as r, p as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
2
|
var e = Object.defineProperty, t = (t, n) => {
|
|
3
3
|
let r = {};
|
|
4
4
|
for (var i in t) e(r, i, {
|
|
@@ -7,5 +7,4 @@ var e = Object.defineProperty, t = (t, n) => {
|
|
|
7
7
|
});
|
|
8
8
|
return n || e(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
9
9
|
};
|
|
10
|
-
//#endregion
|
|
11
10
|
export { t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/i18n/catalogs/ru/messages.ts
|
|
2
2
|
var e = {
|
|
3
3
|
messages_title: "Сообщения и уведомления",
|
|
4
4
|
messages_tab: "Сообщения",
|
|
@@ -4574,5 +4574,4 @@ var e = {
|
|
|
4574
4574
|
...k,
|
|
4575
4575
|
...A
|
|
4576
4576
|
};
|
|
4577
|
-
//#endregion
|
|
4578
4577
|
export { F as default };
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { Zt as e } from "./quick-report-DEqqwQxR.js";
|
|
2
|
+
import { f as t, p as n } from "./i18n-Dt6xbSK6.js";
|
|
3
|
+
import { formatAppDateTime as r } from "@overvis/hmi-shared";
|
|
4
|
+
import { Value as i } from "typebox/value";
|
|
5
|
+
import { automationTypedValueType as a } from "@overvis/hmi-shared/automation";
|
|
6
|
+
import { expressionDiagnosticType as o } from "@overvis/hmi-shared/expression";
|
|
7
|
+
// src/workspace/automations/run-text.ts
|
|
8
|
+
function s(e) {
|
|
9
|
+
return typeof e == "string" || typeof e == "number" ? String(e) : "";
|
|
10
|
+
}
|
|
11
|
+
function c(e) {
|
|
12
|
+
let t = Array.isArray(e) ? e.map(s).filter((e) => e !== "") : [];
|
|
13
|
+
return new Intl.ListFormat(n(), { type: "conjunction" }).format(t);
|
|
14
|
+
}
|
|
15
|
+
function l(e) {
|
|
16
|
+
return i.Check(o, e) ? e : null;
|
|
17
|
+
}
|
|
18
|
+
function u(e) {
|
|
19
|
+
return e?.value == null ? t("automation_value_unknown") : e.type === "instant" && typeof e.value == "number" ? r(e.value) : e.type === "string" ? JSON.stringify(e.value) : String(e.value);
|
|
20
|
+
}
|
|
21
|
+
function d(e, n) {
|
|
22
|
+
switch (e) {
|
|
23
|
+
case "inputChange": return t("automation_trigger_input_change", { inputs: c(n.inputs) });
|
|
24
|
+
case "period": return t("automation_trigger_period");
|
|
25
|
+
case "timeOfDay": return t("automation_trigger_time_of_day");
|
|
26
|
+
case "sun": return t("automation_trigger_sun");
|
|
27
|
+
case "alarm": return t("automation_trigger_alarm");
|
|
28
|
+
case "automation": return t("automation_trigger_automation");
|
|
29
|
+
case "telegram": return t("automation_trigger_telegram", { command: s(n.command) });
|
|
30
|
+
case "init": return t("automation_trigger_init");
|
|
31
|
+
case "hold": return t("automation_trigger_hold");
|
|
32
|
+
case "load": return t("automation_trigger_load");
|
|
33
|
+
default: return e;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function f(n, r) {
|
|
37
|
+
let i = r ?? {};
|
|
38
|
+
switch (n) {
|
|
39
|
+
case "fail": return t("automation_run_error_fail", { message: s(i.message) });
|
|
40
|
+
case "expression": {
|
|
41
|
+
let n = l(i.diagnostic);
|
|
42
|
+
return n === null ? t("automation_run_error_expression") : t("automation_run_error_expression_detail", { problem: e(n) });
|
|
43
|
+
}
|
|
44
|
+
case "invalid_formula": {
|
|
45
|
+
let n = i.diagnostics, r = l(Array.isArray(n) ? n[0] : null);
|
|
46
|
+
return r === null ? t("automation_run_error_invalid_formula") : t("automation_run_error_invalid_formula_detail", { problem: e(r) });
|
|
47
|
+
}
|
|
48
|
+
case "step_limit": return t("automation_run_error_step_limit", { limit: s(i.limit) });
|
|
49
|
+
case "value_too_long": return t("automation_run_error_value_too_long", { limit: s(i.limit) });
|
|
50
|
+
case "unknown_procedure": return t("automation_run_error_unknown_procedure", { name: s(i.procedure) });
|
|
51
|
+
case "invalid": return t("automation_run_error_invalid");
|
|
52
|
+
case "alarms_unavailable": return t("automation_run_error_alarms_unavailable");
|
|
53
|
+
case "location_missing": return t("automation_run_error_location_missing");
|
|
54
|
+
case "init_not_stored": return t("automation_run_error_init_not_stored");
|
|
55
|
+
case "not_stored": return t("automation_run_error_not_stored");
|
|
56
|
+
default: return n;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function p(e) {
|
|
60
|
+
return i.Check(a, e) ? e : void 0;
|
|
61
|
+
}
|
|
62
|
+
function m(e) {
|
|
63
|
+
switch (e) {
|
|
64
|
+
case "if": return t("automation_step_if");
|
|
65
|
+
case "call": return t("automation_step_call");
|
|
66
|
+
case "repeat": return t("automation_step_repeat");
|
|
67
|
+
case "set": return t("automation_step_set");
|
|
68
|
+
case "writeParameter": return t("automation_step_write_parameter");
|
|
69
|
+
case "raiseAlarm": return t("automation_step_raise_alarm");
|
|
70
|
+
case "clearAlarm": return t("automation_step_clear_alarm");
|
|
71
|
+
case "notify": return t("automation_step_notify");
|
|
72
|
+
case "cancelNotify": return t("automation_step_cancel_notify");
|
|
73
|
+
case "writeLog": return t("automation_step_write_log");
|
|
74
|
+
case "fail": return t("automation_step_fail");
|
|
75
|
+
case "reply": return t("automation_step_reply");
|
|
76
|
+
case "writeLimited": return t("automation_step_write_limited");
|
|
77
|
+
case "writeDropped": return t("automation_step_write_dropped");
|
|
78
|
+
case "writeFailed": return t("automation_step_write_failed");
|
|
79
|
+
default: return e;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
function h(e, n) {
|
|
83
|
+
let r = e.detail, i = (e) => n(s(e)) ?? s(e);
|
|
84
|
+
switch (e.kind) {
|
|
85
|
+
case "if": {
|
|
86
|
+
let e = r.branch;
|
|
87
|
+
return e === "else" ? t("automation_step_if_else") : typeof e == "number" ? t("automation_step_if_branch", { branch: String(e + 1) }) : r.reason === "unknown" ? t("automation_step_if_unknown") : r.reason === "once" ? t("automation_step_if_once") : t("automation_step_if_none");
|
|
88
|
+
}
|
|
89
|
+
case "call": return s(r.procedure);
|
|
90
|
+
case "repeat": return t("automation_step_repeat_times", { times: s(r.times) });
|
|
91
|
+
case "set": return `${s(r.variable)} = ${u(p(r.value))}`;
|
|
92
|
+
case "writeParameter": return r.skipped === "unknown" ? t("automation_step_write_skipped", { parameter: i(r.parameterId) }) : `${i(r.parameterId)} ← ${u(p(r.value))}`;
|
|
93
|
+
case "writeLog": return u(p(r.value));
|
|
94
|
+
case "fail": return s(r.message);
|
|
95
|
+
case "reply": return r.skipped === "not_a_command" ? t("automation_step_reply_skipped") : "";
|
|
96
|
+
case "writeDropped": return r.reason === "late" ? t("automation_step_write_dropped_late") : t("automation_step_write_dropped_lease");
|
|
97
|
+
case "writeFailed": return t("automation_step_write_failed_detail", {
|
|
98
|
+
parameter: i(r.parameterId),
|
|
99
|
+
error: s(r.error)
|
|
100
|
+
});
|
|
101
|
+
default: return "";
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
function g(e) {
|
|
105
|
+
switch (e) {
|
|
106
|
+
case "info": return t("automation_severity_info");
|
|
107
|
+
case "warning": return t("automation_severity_warning");
|
|
108
|
+
case "urgent": return t("automation_severity_urgent");
|
|
109
|
+
default: return e;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
export { h as a, g as i, d as n, m as o, u as r, f as t };
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { d as i, n as a } from "./provider-BOeYHi0n.js";
|
|
1
|
+
import { bn as e, dn as t } from "./quick-report-DEqqwQxR.js";
|
|
2
|
+
import { m as n } from "./i18n-Dt6xbSK6.js";
|
|
3
|
+
import { $ as r, Mt as i, jt as a } from "./alert-dialog-B60PF7S9.js";
|
|
5
4
|
import { useEffect as o, useId as s, useState as c, useSyncExternalStore as l } from "react";
|
|
6
5
|
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
7
6
|
import { BellOffIcon as f, Volume2Icon as p, VolumeXIcon as m } from "lucide-react";
|
|
8
7
|
import { alarmEventKinds as h, automationSeverities as g } from "@overvis/hmi-shared/automation";
|
|
9
8
|
import { Link as _, useRouterState as v } from "@tanstack/react-router";
|
|
10
|
-
|
|
9
|
+
// src/workspace/alarms/sound.tsx
|
|
11
10
|
var y = "overvis.alarm-sound", b = (e) => `overvis.alarm-sound-silenced.${e}`, x = {
|
|
12
11
|
urgent: 2e3,
|
|
13
12
|
warning: 5e3
|
|
@@ -129,7 +128,7 @@ function R(e, t) {
|
|
|
129
128
|
]), t && r;
|
|
130
129
|
}
|
|
131
130
|
function z() {
|
|
132
|
-
let
|
|
131
|
+
let n = t(), [r] = j(), i = n?.workspaceId ?? "", a = A(b(i)), s = n?.alarms == null ? [] : e(n.alarms, n.now), c = new Set(M(a)), l = r ? s.filter((e) => !c.has(e.id)) : [], u = n != null && l.length > 0, d = P(), f = d === "running", p = L(i, u && f), m = R(i, u && !f);
|
|
133
132
|
o(() => {
|
|
134
133
|
u && d === "blocked" && N.unlock();
|
|
135
134
|
}, [u, d]);
|
|
@@ -153,13 +152,13 @@ function z() {
|
|
|
153
152
|
return document.addEventListener("pointerdown", e, { capture: !0 }), document.addEventListener("keydown", e, { capture: !0 }), () => {
|
|
154
153
|
document.removeEventListener("pointerdown", e, { capture: !0 }), document.removeEventListener("keydown", e, { capture: !0 });
|
|
155
154
|
};
|
|
156
|
-
}, [g]),
|
|
157
|
-
enabled:
|
|
155
|
+
}, [g]), n == null ? null : {
|
|
156
|
+
enabled: r,
|
|
158
157
|
sounding: l,
|
|
159
158
|
blocked: _,
|
|
160
159
|
silence: () => {
|
|
161
|
-
let e = s.map((e) => e.id), t = [...c].filter((t) => !e.includes(t)),
|
|
162
|
-
k(b(
|
|
160
|
+
let e = s.map((e) => e.id), t = [...c].filter((t) => !e.includes(t)), n = t.slice(Math.max(0, t.length - (S - e.length)));
|
|
161
|
+
k(b(i), JSON.stringify([...n, ...e]));
|
|
163
162
|
},
|
|
164
163
|
allow: () => {
|
|
165
164
|
N.unlock();
|
|
@@ -167,8 +166,8 @@ function z() {
|
|
|
167
166
|
};
|
|
168
167
|
}
|
|
169
168
|
function B() {
|
|
170
|
-
let
|
|
171
|
-
return
|
|
169
|
+
let e = n(), r = z(), o = t(), s = v({ select: (e) => /^\/workspace\/[^/]+\/alarms(?:\/|$)/.test(e.location.pathname) });
|
|
170
|
+
return r == null || o == null || !r.enabled || r.sounding.length === 0 ? null : /* @__PURE__ */ d("div", {
|
|
172
171
|
role: "status",
|
|
173
172
|
className: "\n flex flex-wrap items-center gap-x-3 gap-y-2 border-b border-destructive/30\n bg-destructive/10 px-4 py-2 text-sm\n ",
|
|
174
173
|
children: [/* @__PURE__ */ d("span", {
|
|
@@ -178,42 +177,42 @@ function B() {
|
|
|
178
177
|
"aria-hidden": !0
|
|
179
178
|
}), /* @__PURE__ */ u("span", {
|
|
180
179
|
className: "min-w-0",
|
|
181
|
-
children:
|
|
180
|
+
children: r.blocked ? e("alarm_sound_blocked", { count: String(r.sounding.length) }) : e("alarm_sound_playing", { count: String(r.sounding.length) })
|
|
182
181
|
})]
|
|
183
182
|
}), /* @__PURE__ */ d("span", {
|
|
184
183
|
className: "flex flex-wrap gap-2",
|
|
185
184
|
children: [
|
|
186
|
-
|
|
185
|
+
r.blocked ? /* @__PURE__ */ d(a, {
|
|
187
186
|
size: "sm",
|
|
188
187
|
variant: "outline",
|
|
189
|
-
onClick:
|
|
190
|
-
children: [/* @__PURE__ */ u(p, { "data-icon": "inline-start" }),
|
|
188
|
+
onClick: r.allow,
|
|
189
|
+
children: [/* @__PURE__ */ u(p, { "data-icon": "inline-start" }), e("alarm_sound_allow")]
|
|
191
190
|
}) : null,
|
|
192
191
|
s ? null : /* @__PURE__ */ u(_, {
|
|
193
192
|
to: "/workspace/$workspaceId/alarms",
|
|
194
193
|
params: { workspaceId: o.workspaceId },
|
|
195
|
-
className:
|
|
194
|
+
className: i({
|
|
196
195
|
variant: "outline",
|
|
197
196
|
size: "sm"
|
|
198
197
|
}),
|
|
199
|
-
children:
|
|
198
|
+
children: e("alarm_sound_open")
|
|
200
199
|
}),
|
|
201
|
-
/* @__PURE__ */ d(
|
|
200
|
+
/* @__PURE__ */ d(a, {
|
|
202
201
|
size: "sm",
|
|
203
|
-
onClick:
|
|
204
|
-
children: [/* @__PURE__ */ u(f, { "data-icon": "inline-start" }),
|
|
202
|
+
onClick: r.silence,
|
|
203
|
+
children: [/* @__PURE__ */ u(f, { "data-icon": "inline-start" }), e("alarm_sound_silence")]
|
|
205
204
|
})
|
|
206
205
|
]
|
|
207
206
|
})]
|
|
208
207
|
});
|
|
209
208
|
}
|
|
210
209
|
function V() {
|
|
211
|
-
let
|
|
210
|
+
let e = n(), [t, i] = j(), a = P(), o = s();
|
|
212
211
|
return /* @__PURE__ */ d("div", {
|
|
213
212
|
className: "flex items-start gap-3 rounded-lg border p-3",
|
|
214
213
|
children: [/* @__PURE__ */ u(r, {
|
|
215
214
|
id: o,
|
|
216
|
-
checked:
|
|
215
|
+
checked: t,
|
|
217
216
|
disabled: a === "unavailable",
|
|
218
217
|
onCheckedChange: (e) => {
|
|
219
218
|
i(e);
|
|
@@ -224,20 +223,19 @@ function V() {
|
|
|
224
223
|
children: [/* @__PURE__ */ d("label", {
|
|
225
224
|
htmlFor: o,
|
|
226
225
|
className: "flex items-center gap-1.5 text-sm font-medium",
|
|
227
|
-
children: [u(
|
|
226
|
+
children: [u(t ? p : m, {
|
|
228
227
|
className: "size-4",
|
|
229
228
|
"aria-hidden": !0
|
|
230
|
-
}),
|
|
229
|
+
}), e("alarm_sound_toggle")]
|
|
231
230
|
}), /* @__PURE__ */ u("p", {
|
|
232
231
|
id: `${o}-description`,
|
|
233
232
|
className: "text-xs text-muted-foreground",
|
|
234
|
-
children:
|
|
233
|
+
children: e(a === "unavailable" ? "alarm_sound_unavailable" : "alarm_sound_description")
|
|
235
234
|
})]
|
|
236
235
|
})]
|
|
237
236
|
});
|
|
238
237
|
}
|
|
239
|
-
|
|
240
|
-
//#region src/workspace/alarms/search.ts
|
|
238
|
+
// src/workspace/alarms/search.ts
|
|
241
239
|
var H = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
242
240
|
function U(e) {
|
|
243
241
|
return typeof e == "string" && e.length > 0 && e.length <= 40 ? e : void 0;
|
|
@@ -261,5 +259,4 @@ function K(e) {
|
|
|
261
259
|
let { tab: t, ...n } = e;
|
|
262
260
|
return n;
|
|
263
261
|
}
|
|
264
|
-
//#endregion
|
|
265
262
|
export { V as i, G as n, B as r, K as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { f as e } from "./i18n-
|
|
1
|
+
import { f as e } from "./i18n-Dt6xbSK6.js";
|
|
2
2
|
import { CableIcon as t, ChartLineIcon as n, FolderIcon as r, HardDriveIcon as i, HistoryIcon as a, LayoutDashboardIcon as o, ListTreeIcon as s, WorkflowIcon as c } from "lucide-react";
|
|
3
|
-
|
|
3
|
+
// src/workspace/setup/sections.ts
|
|
4
4
|
var l = [
|
|
5
5
|
{
|
|
6
6
|
id: "dashboards",
|
|
@@ -73,5 +73,4 @@ function f(e) {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
//#endregion
|
|
77
76
|
export { u as n, l as r, f as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { q as t } from "./spinner-
|
|
1
|
+
import { Nt as e } from "./alert-dialog-B60PF7S9.js";
|
|
2
|
+
import { q as t } from "./spinner-BRcNKwjH.js";
|
|
3
3
|
import * as n from "react";
|
|
4
4
|
import { useEffect as r, useId as i, useState as a } from "react";
|
|
5
5
|
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
@@ -10,7 +10,7 @@ import * as m from "react-resizable-panels";
|
|
|
10
10
|
import { mergeProps as h } from "@base-ui/react/merge-props";
|
|
11
11
|
import { useRender as g } from "@base-ui/react/use-render";
|
|
12
12
|
import { Select as _ } from "@base-ui/react/select";
|
|
13
|
-
|
|
13
|
+
// src/ui/chart.tsx
|
|
14
14
|
var v = {
|
|
15
15
|
light: "",
|
|
16
16
|
dark: ".dark"
|
|
@@ -48,14 +48,16 @@ function w({ id: t, className: r, children: i, config: a, initialDimension: o =
|
|
|
48
48
|
}
|
|
49
49
|
function T({ id: e, config: t }) {
|
|
50
50
|
let n = Object.entries(t).filter(([, e]) => e.theme ?? e.color);
|
|
51
|
-
|
|
51
|
+
if (!n.length) return null;
|
|
52
|
+
let r = y.map((t) => `
|
|
52
53
|
${v[t]} [data-chart=${e}] {
|
|
53
54
|
${n.map(([e, n]) => {
|
|
54
55
|
let r = n.theme?.[t] ?? n.color;
|
|
55
56
|
return r ? ` --color-${e}: ${r};` : null;
|
|
56
57
|
}).join("\n")}
|
|
57
58
|
}
|
|
58
|
-
`).join("\n")
|
|
59
|
+
`).join("\n");
|
|
60
|
+
return /* @__PURE__ */ s("style", { children: r });
|
|
59
61
|
}
|
|
60
62
|
function E({ color: t, indicator: n, nested: r }) {
|
|
61
63
|
return n === "dot" ? /* @__PURE__ */ s("svg", {
|
|
@@ -162,7 +164,7 @@ function A({ className: t, hideIcon: n = !1, payload: r, verticalAlign: i = "bot
|
|
|
162
164
|
}) : null;
|
|
163
165
|
}
|
|
164
166
|
function j(e, t) {
|
|
165
|
-
if (
|
|
167
|
+
if (typeof e == "object" && e) return Reflect.get(e, t);
|
|
166
168
|
}
|
|
167
169
|
function ee(e, t) {
|
|
168
170
|
let n = j(e, t);
|
|
@@ -173,8 +175,7 @@ function M(e, t, n) {
|
|
|
173
175
|
let r = j(t, "payload"), i = n, a = j(t, n), o = j(r, n);
|
|
174
176
|
return typeof a == "string" ? i = a : typeof o == "string" && (i = o), i in e ? e[i] : e[n];
|
|
175
177
|
}
|
|
176
|
-
|
|
177
|
-
//#region src/hooks/use-now.ts
|
|
178
|
+
// src/hooks/use-now.ts
|
|
178
179
|
function N(e = 6e4) {
|
|
179
180
|
let [t, n] = a(() => Date.now());
|
|
180
181
|
return r(() => {
|
|
@@ -187,8 +188,7 @@ function N(e = 6e4) {
|
|
|
187
188
|
};
|
|
188
189
|
}, [e]), t;
|
|
189
190
|
}
|
|
190
|
-
|
|
191
|
-
//#region src/ui/gauge-bar.tsx
|
|
191
|
+
// src/ui/gauge-bar.tsx
|
|
192
192
|
var P = 8, F = 20, I = 6;
|
|
193
193
|
function L(e) {
|
|
194
194
|
return Math.min(100, Math.max(0, e));
|
|
@@ -300,8 +300,7 @@ function V({ bands: t = [], fill: n, ticks: r = [], marker: a, className: l }) {
|
|
|
300
300
|
]
|
|
301
301
|
});
|
|
302
302
|
}
|
|
303
|
-
|
|
304
|
-
//#region src/ui/sparkline.tsx
|
|
303
|
+
// src/ui/sparkline.tsx
|
|
305
304
|
function H(e, t) {
|
|
306
305
|
let n = Math.round(t.to / t.sampleIntervalMs) * t.sampleIntervalMs - (t.sampleCount - 1) * t.sampleIntervalMs, r = Array.from({ length: t.sampleCount }, () => null), i = Array.from({ length: t.sampleCount }, (e, r) => ({
|
|
307
306
|
at: n + r * t.sampleIntervalMs,
|
|
@@ -354,9 +353,9 @@ function U({ points: t, ariaLabel: n, window: r, range: a, referenceValue: o, fi
|
|
|
354
353
|
}),
|
|
355
354
|
O.length === 0 ? /* @__PURE__ */ s("line", {
|
|
356
355
|
x1: "2",
|
|
357
|
-
y1:
|
|
356
|
+
y1: 16,
|
|
358
357
|
x2: 118,
|
|
359
|
-
y2:
|
|
358
|
+
y2: 16,
|
|
360
359
|
stroke: "currentColor",
|
|
361
360
|
strokeOpacity: "0.25"
|
|
362
361
|
}) : O.map((e, t) => {
|
|
@@ -378,8 +377,7 @@ function U({ points: t, ariaLabel: n, window: r, range: a, referenceValue: o, fi
|
|
|
378
377
|
]
|
|
379
378
|
});
|
|
380
379
|
}
|
|
381
|
-
|
|
382
|
-
//#region src/ui/kbd.tsx
|
|
380
|
+
// src/ui/kbd.tsx
|
|
383
381
|
function W({ className: t, ...n }) {
|
|
384
382
|
return /* @__PURE__ */ s("kbd", {
|
|
385
383
|
"data-slot": "kbd",
|
|
@@ -394,8 +392,7 @@ function G({ className: t, ...n }) {
|
|
|
394
392
|
...n
|
|
395
393
|
});
|
|
396
394
|
}
|
|
397
|
-
|
|
398
|
-
//#region src/ui/resizable.tsx
|
|
395
|
+
// src/ui/resizable.tsx
|
|
399
396
|
function K({ className: t, ...n }) {
|
|
400
397
|
return /* @__PURE__ */ s(m.Group, {
|
|
401
398
|
"data-slot": "resizable-panel-group",
|
|
@@ -417,8 +414,7 @@ function J({ withHandle: t, className: n, ...r }) {
|
|
|
417
414
|
children: t && /* @__PURE__ */ s("div", { className: "z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border" })
|
|
418
415
|
});
|
|
419
416
|
}
|
|
420
|
-
|
|
421
|
-
//#region src/ui/button-group.tsx
|
|
417
|
+
// src/ui/button-group.tsx
|
|
422
418
|
var Y = f("\n flex w-fit items-stretch\n *:focus-visible:relative *:focus-visible:z-10\n has-[>[data-slot=button-group]]:gap-2\n has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg\n [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit\n [&>input]:flex-1\n ", {
|
|
423
419
|
variants: { orientation: {
|
|
424
420
|
horizontal: "\n *:data-slot:rounded-r-none\n [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-lg!\n [&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0\n ",
|
|
@@ -451,8 +447,7 @@ function Q({ className: n, orientation: r = "vertical", ...i }) {
|
|
|
451
447
|
...i
|
|
452
448
|
});
|
|
453
449
|
}
|
|
454
|
-
|
|
455
|
-
//#region src/ui/select.tsx
|
|
450
|
+
// src/ui/select.tsx
|
|
456
451
|
function te(e) {
|
|
457
452
|
return /* @__PURE__ */ s(_.Root, {
|
|
458
453
|
"data-slot": "select",
|
|
@@ -535,5 +530,4 @@ function se({ className: t, ...n }) {
|
|
|
535
530
|
...n
|
|
536
531
|
});
|
|
537
532
|
}
|
|
538
|
-
//#endregion
|
|
539
533
|
export { k as C, O as E, E as S, D as T, G as _, ae as a, N as b, ne as c, Z as d, Y as f, W as g, K as h, oe as i, X as l, q as m, re as n, se as o, J as p, ie as r, $ as s, te as t, Q as u, U as v, A as w, w as x, V as y };
|