@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.
- package/dist/alarm-list-DKFio0hg.js +414 -0
- package/dist/alarm-rule-dialog-mb4_nHRW.js +417 -0
- package/dist/{alarm-rule-lists-C5v1Kf7A.js → alarm-rule-lists-CfZXTWkK.js} +123 -125
- package/dist/{alarm-rules-page-CqFzofPd.js → alarm-rules-page-DBLSkrrG.js} +15 -18
- package/dist/alert-dialog-D_iDv2lQ.js +891 -0
- package/dist/{base-revision-YCO27zR4.js → base-revision-DLF9EnGV.js} +26 -29
- package/dist/{breadcrumbs-0cjsV2cq.js → breadcrumbs-D5R6Fz74.js} +6 -7
- package/dist/{catalog-list-DjZojYLJ.js → catalog-list-BkWosvh1.js} +2 -4
- package/dist/{code-editor-BVimvjDV.js → code-editor-DCM0KdMJ.js} +9 -6
- package/dist/dashboard-bindings.js +1 -2
- package/dist/{dashboards-page-BlrJguNz.js → dashboards-page-DLc11Vzu.js} +335 -359
- package/dist/{de-14WdmJxZ.js → de-Z2er-E5v.js} +4 -2
- package/dist/diagnostic-text-CYZFPiND.js +116 -0
- package/dist/{dialogs-D_v1LeH4.js → dialogs-BX023zml.js} +2523 -2590
- package/dist/{dialogs-B6BRnf3Q.js → dialogs-DEOg9lxy.js} +219 -227
- package/dist/{display-DmOo23mi.js → display-VYGzneE0.js} +4 -6
- package/dist/{editor-language-To9MxloY.js → editor-language-CGENZxbI.js} +3 -5
- package/dist/editor-page-CaN52OQh.js +1337 -0
- package/dist/{en-BgercpT0.js → en-CKPPL6bQ.js} +4 -2
- package/dist/entity-controls-DJT47yeV.js +71 -0
- package/dist/errors-BAWoH_5w.js +25 -0
- package/dist/{footer-DC-Q0052.js → footer-CbPMP8aq.js} +2404 -2515
- package/dist/host.js +8254 -675
- package/dist/{i18n-BgzakKoC.js → i18n-ChjEbYEg.js} +77 -90
- package/dist/i18n.js +1 -2
- package/dist/index.js +5168 -5353
- package/dist/{lat-lng-B12P7QyY.js → lat-lng-Bl77AGSO.js} +1 -2
- package/dist/{list-page-CvsdZb86.js → list-page-Fa29SkaJ.js} +116 -123
- package/dist/{location-map-renderer-DO5yfdSU.js → location-map-renderer-DvXIYc1Z.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-V_0K0lO0.js} +54 -58
- package/dist/page-B5te_1Lc.js +449 -0
- package/dist/{page-v6LCwswN.js → page-BorlLnMX.js} +92 -100
- package/dist/page-DxF7FOve.js +507 -0
- package/dist/panel-DuZD-cBP.js +949 -0
- package/dist/parameter-values.js +3 -16
- package/dist/{pl-lQ9HXV9k.js → pl-DVABrn5G.js} +4 -2
- package/dist/presence-code-DsabLTZs.js +73 -0
- package/dist/{query-gate-DVhNIkge.js → query-gate-BbIo1Xrj.js} +6 -6
- package/dist/{provider-DoEpKcQ-.js → quick-report-BcZsfkCZ.js} +9423 -5102
- package/dist/{retention-BYXNpYmR.js → retention-C7EZsq8u.js} +4 -6
- package/dist/retention-note-CmMeHV_u.js +40 -0
- package/dist/{rolldown-runtime-Dy4uBu1J.js → rolldown-runtime-CGnMp29N.js} +1 -2
- package/dist/{ru-qTKINoUj.js → ru-CBRLC_xM.js} +8 -6
- package/dist/run-text-CDdfbKbg.js +112 -0
- package/dist/{search-D4rDnE9T.js → search-C6xQ_Hvo.js} +26 -29
- package/dist/{sections-kCOyc4NR.js → sections-D_SBfVzV.js} +2 -3
- package/dist/{select-BKiOWdSr.js → select-nNLG-AMz.js} +17 -23
- package/dist/{spinner-C-HPNxOc.js → spinner-B-KLtBjp.js} +182 -201
- package/dist/src/code-editor/code-editor.d.ts +3 -0
- package/dist/src/code-editor/taskfile-language.d.ts +22 -2
- package/dist/src/i18n/catalogs/de/edge-program.d.ts +3 -0
- package/dist/src/i18n/catalogs/de.d.ts +3 -0
- package/dist/src/i18n/catalogs/en/edge-program.d.ts +3 -0
- package/dist/src/i18n/catalogs/en.d.ts +3 -0
- package/dist/src/i18n/catalogs/pl/edge-program.d.ts +3 -0
- package/dist/src/i18n/catalogs/pl.d.ts +3 -0
- package/dist/src/i18n/catalogs/ru/edge-program.d.ts +5 -2
- package/dist/src/i18n/catalogs/ru/graphics.d.ts +2 -2
- package/dist/src/i18n/catalogs/ru.d.ts +7 -4
- package/dist/src/i18n/catalogs/uk/edge-program.d.ts +5 -2
- package/dist/src/i18n/catalogs/uk/graphics.d.ts +2 -2
- package/dist/src/i18n/catalogs/uk.d.ts +7 -4
- package/dist/src/version.d.ts +1 -1
- package/dist/src/workspace/graphics/inspector/item.d.ts +6 -6
- 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-7S3LmtGa.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-17pbVYZa.js} +8 -6
- package/dist/{wireguard-docs-AfU6NzTL.js → wireguard-docs-Clb-7xRY.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,125 +1,124 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { qr as e, rr as t } from "./quick-report-BcZsfkCZ.js";
|
|
2
|
+
import { f as n, m as r } from "./i18n-ChjEbYEg.js";
|
|
3
|
+
import { jt as i } from "./alert-dialog-D_iDv2lQ.js";
|
|
4
|
+
import { A as a, H as o, L as s, M as c, Y as l, c as u } from "./spinner-B-KLtBjp.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
|
-
|
|
9
|
-
function v(
|
|
10
|
-
switch (
|
|
11
|
-
case "view_only": return
|
|
12
|
-
case "operator": return
|
|
13
|
-
case "editor": return
|
|
14
|
-
case "admin": return
|
|
15
|
-
case "owner": return
|
|
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
|
-
|
|
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:
|
|
27
|
-
let w =
|
|
28
|
-
let r = e
|
|
29
|
-
r !== void 0 &&
|
|
30
|
-
...
|
|
31
|
-
[
|
|
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
|
-
...
|
|
32
|
+
...t
|
|
34
33
|
}
|
|
35
34
|
});
|
|
36
|
-
}, E = (e, t, n, r,
|
|
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(
|
|
38
|
+
}), /* @__PURE__ */ f(a, {
|
|
40
39
|
id: e,
|
|
41
40
|
value: n,
|
|
42
41
|
onChange: (e) => {
|
|
43
|
-
|
|
42
|
+
i(e.target.value);
|
|
44
43
|
},
|
|
45
|
-
children: [/* @__PURE__ */ d(
|
|
44
|
+
children: [/* @__PURE__ */ d(c, {
|
|
46
45
|
value: "",
|
|
47
46
|
children: w("alarm_rule_choose")
|
|
48
|
-
}), r.map((e) => /* @__PURE__ */ d(
|
|
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(
|
|
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(
|
|
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(
|
|
61
|
+
children: [/* @__PURE__ */ d(c, {
|
|
63
62
|
value: "active",
|
|
64
63
|
children: w("alarm_rule_variable_alarm_state_active")
|
|
65
|
-
}), /* @__PURE__ */ d(
|
|
64
|
+
}), /* @__PURE__ */ d(c, {
|
|
66
65
|
value: "unacknowledged",
|
|
67
66
|
children: w("alarm_rule_variable_alarm_state_unacknowledged")
|
|
68
67
|
})]
|
|
69
|
-
})] }), O = (
|
|
70
|
-
let i = `alarm-rule-variable-${
|
|
71
|
-
switch (
|
|
72
|
-
case "parameter": return /* @__PURE__ */ d(
|
|
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:
|
|
76
|
-
onChange: (
|
|
77
|
-
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"),
|
|
81
|
-
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"),
|
|
86
|
-
T(
|
|
87
|
-
}), D(i,
|
|
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"),
|
|
93
|
-
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(
|
|
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(
|
|
97
|
+
}), /* @__PURE__ */ d(u, {
|
|
99
98
|
id: `${i}-key`,
|
|
100
99
|
className: "font-mono",
|
|
101
|
-
value:
|
|
102
|
-
onChange: (
|
|
103
|
-
T(
|
|
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,
|
|
107
|
+
children: D(i, n, r)
|
|
109
108
|
})
|
|
110
109
|
]
|
|
111
110
|
});
|
|
112
|
-
case "calc": return /* @__PURE__ */ f(
|
|
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(
|
|
115
|
+
}), /* @__PURE__ */ d(e, {
|
|
117
116
|
id: `${i}-formula`,
|
|
118
117
|
labelId: `${i}-formula-label`,
|
|
119
|
-
value:
|
|
118
|
+
value: r.formula,
|
|
120
119
|
language: v,
|
|
121
|
-
onChange: (
|
|
122
|
-
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(
|
|
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(
|
|
136
|
-
htmlFor: `alarm-rule-variable-${
|
|
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(
|
|
139
|
-
id: `alarm-rule-variable-${
|
|
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:
|
|
144
|
-
onChange: (
|
|
145
|
-
T(
|
|
142
|
+
value: t.name,
|
|
143
|
+
onChange: (t) => {
|
|
144
|
+
T(e, { name: t.target.value });
|
|
146
145
|
}
|
|
147
146
|
})] }),
|
|
148
|
-
/* @__PURE__ */ f(
|
|
149
|
-
htmlFor: `alarm-rule-variable-${
|
|
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(
|
|
152
|
-
id: `alarm-rule-variable-${
|
|
153
|
-
value:
|
|
154
|
-
onChange: (
|
|
155
|
-
let n = g.find((
|
|
156
|
-
n !== void 0 && T(
|
|
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(
|
|
158
|
+
/* @__PURE__ */ d(c, {
|
|
160
159
|
value: "parameter",
|
|
161
160
|
children: w("alarm_rule_variable_parameter")
|
|
162
161
|
}),
|
|
163
|
-
/* @__PURE__ */ d(
|
|
162
|
+
/* @__PURE__ */ d(c, {
|
|
164
163
|
value: "endpoint",
|
|
165
164
|
children: w("alarm_rule_variable_endpoint")
|
|
166
165
|
}),
|
|
167
|
-
/* @__PURE__ */ d(
|
|
166
|
+
/* @__PURE__ */ d(c, {
|
|
168
167
|
value: "alarmRule",
|
|
169
168
|
children: w("alarm_rule_variable_alarm_rule")
|
|
170
169
|
}),
|
|
171
|
-
/* @__PURE__ */ d(
|
|
170
|
+
/* @__PURE__ */ d(c, {
|
|
172
171
|
value: "automationAlarm",
|
|
173
172
|
children: w("alarm_rule_variable_automation_alarm")
|
|
174
173
|
}),
|
|
175
|
-
/* @__PURE__ */ d(
|
|
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(
|
|
182
|
+
children: O(e, t)
|
|
184
183
|
}),
|
|
185
|
-
/* @__PURE__ */ d(
|
|
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
|
-
|
|
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.${
|
|
197
|
-
},
|
|
195
|
+
}), /* @__PURE__ */ d(y, { texts: S(`variables.${e}`) })]
|
|
196
|
+
}, e)),
|
|
198
197
|
/* @__PURE__ */ d(y, { texts: S("variables") }),
|
|
199
|
-
/* @__PURE__ */ f(
|
|
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(
|
|
203
|
+
disabled: Object.keys(n).length >= 50,
|
|
205
204
|
onClick: () => {
|
|
206
|
-
|
|
207
|
-
...
|
|
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:
|
|
217
|
-
let h =
|
|
218
|
-
let i = e
|
|
219
|
-
i !== void 0 &&
|
|
220
|
-
...
|
|
221
|
-
[
|
|
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
|
-
...
|
|
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(
|
|
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(
|
|
240
|
-
htmlFor: `alarm-rule-param-${
|
|
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(
|
|
243
|
-
id: `alarm-rule-param-${
|
|
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:
|
|
246
|
+
value: l.name,
|
|
248
247
|
onChange: (e) => {
|
|
249
|
-
g(
|
|
248
|
+
g(r, { name: e.target.value });
|
|
250
249
|
}
|
|
251
250
|
})] }),
|
|
252
|
-
/* @__PURE__ */ f(
|
|
253
|
-
id: `alarm-rule-param-${
|
|
254
|
-
htmlFor: `alarm-rule-param-${
|
|
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(
|
|
257
|
-
id: `alarm-rule-param-${
|
|
258
|
-
labelId: `alarm-rule-param-${
|
|
259
|
-
value:
|
|
260
|
-
language:
|
|
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(
|
|
261
|
+
g(r, { formula: e });
|
|
263
262
|
}
|
|
264
263
|
})] }),
|
|
265
|
-
/* @__PURE__ */ d(
|
|
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
|
-
|
|
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:
|
|
277
|
-
},
|
|
278
|
-
/* @__PURE__ */ d(y, { texts:
|
|
279
|
-
/* @__PURE__ */ f(
|
|
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(
|
|
283
|
+
disabled: Object.keys(t).length >= 20,
|
|
285
284
|
onClick: () => {
|
|
286
|
-
|
|
287
|
-
...
|
|
288
|
-
[
|
|
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:
|
|
300
|
-
let i =
|
|
301
|
-
r
|
|
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(
|
|
314
|
-
checked:
|
|
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(
|
|
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 {
|
|
2
|
-
import { h as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { t as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
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-BcZsfkCZ.js";
|
|
2
|
+
import { h as n, m as r, n as i } from "./i18n-ChjEbYEg.js";
|
|
3
|
+
import { jt as a, xt as o } from "./alert-dialog-D_iDv2lQ.js";
|
|
4
|
+
import { l as s } from "./spinner-B-KLtBjp.js";
|
|
5
|
+
import { b as c } from "./panel-DuZD-cBP.js";
|
|
6
|
+
import { r as l, t as u } from "./query-gate-BbIo1Xrj.js";
|
|
7
|
+
import { t as d } from "./breadcrumbs-D5R6Fz74.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-BkWosvh1.js";
|
|
9
|
+
import { i as C } from "./run-text-CDdfbKbg.js";
|
|
10
|
+
import { n as w } from "./entity-controls-DJT47yeV.js";
|
|
11
|
+
import { AutomationSectionTabs as T, DeleteDialog as E, ProblemBadges as D, t as O, useDashboardNames as k } from "./list-page-Fa29SkaJ.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
|
-
|
|
17
|
+
// src/workspace/setup/automations/alarm-rules-page.tsx
|
|
20
18
|
function z({ workspaceId: z }) {
|
|
21
|
-
let B =
|
|
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: (
|
|
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(
|
|
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 };
|