@overvis/hmi-workspace-ui 0.1.1 → 0.1.3
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/README.md +6 -4
- package/dist/{alarm-list-sheAq-pb.js → alarm-list-TDg7nwkn.js} +4 -4
- package/dist/{alarm-rule-dialog-D_ml7V0v.js → alarm-rule-dialog-DwbRtPZD.js} +10 -10
- package/dist/{alarm-rule-lists-DaA4soF4.js → alarm-rule-lists-Ax7PzbQy.js} +4 -4
- package/dist/{alarm-rules-page-OFjOQ-dm.js → alarm-rules-page-DisATKLV.js} +11 -11
- package/dist/{alert-dialog-B60PF7S9.js → alert-dialog-CskdoiGZ.js} +1 -1
- package/dist/{base-revision-DYCOZS0R.js → base-revision-C-tNhqGq.js} +3 -3
- package/dist/{breadcrumbs-D2u8KZQo.js → breadcrumbs-B5O9let7.js} +3 -3
- package/dist/{catalog-list-LXuRix0-.js → catalog-list-3yaB4bJD.js} +1 -1
- package/dist/{code-editor-BMSyzAxu.js → code-editor-B6myrPQm.js} +6 -2
- package/dist/{dashboards-page-wnmmLpVC.js → dashboards-page-CoKevu-T.js} +9 -9
- package/dist/{de-hkEr2usK.js → de-CPxvTPak.js} +11 -0
- package/dist/{diagnostic-text-CsbENUNI.js → diagnostic-text-BS4rdZcE.js} +2 -2
- package/dist/{dialogs-AtIYlNSy.js → dialogs-BUyPGimM.js} +6 -6
- package/dist/{dialogs-DsHbKgZD.js → dialogs-CF7Baagf.js} +512 -510
- package/dist/{display-DSyEwQt8.js → display-DmldtHdd.js} +2 -2
- package/dist/{editor-language-CTfJBXMs.js → editor-language-8UJkvBgX.js} +1 -1
- package/dist/{editor-page-BWbVGJvU.js → editor-page-_6TxO_iT.js} +14 -14
- package/dist/{en-UW_k-Bd6.js → en-DoFtc9Sn.js} +11 -0
- package/dist/{entity-controls-BCuRx882.js → entity-controls-rdv-ttvP.js} +3 -3
- package/dist/{errors-Cawve9yD.js → errors-BFeJfnyz.js} +2 -2
- package/dist/{footer-B9XdpVzq.js → footer-DZUQHVnt.js} +4 -4
- package/dist/host.js +1175 -1063
- package/dist/{i18n-Dt6xbSK6.js → i18n-D54xfDUE.js} +5 -5
- package/dist/i18n.js +1 -1
- package/dist/index.js +64 -42
- package/dist/{list-page-agHupfNb.js → list-page-Cz5bdD8r.js} +11 -11
- package/dist/{location-map-renderer-kxU6cgFl.js → location-map-renderer-Hb5N0AYH.js} +1 -1
- package/dist/{notice-card-CH28rYUt.js → notice-card-BMNjc7qi.js} +3 -3
- package/dist/{page-CZPHJUmz.js → page-BKnwJyv5.js} +8 -8
- package/dist/{page-HCGXXGjy.js → page-CBWLmbIE.js} +11 -11
- package/dist/{page-DpdkOGGb.js → page-UoQRnsm3.js} +11 -11
- package/dist/{panel-BCwBlB_h.js → panel-Cr3OXiRs.js} +3 -3
- package/dist/{pl-BokvsP3J.js → pl-DEPfFtMO.js} +11 -0
- package/dist/{presence-code-cT6wxlTg.js → presence-code-DIKs9fBe.js} +2 -2
- package/dist/{query-gate-DqmHsZ07.js → query-gate-2sU8OvEb.js} +3 -3
- package/dist/{quick-report-DEqqwQxR.js → quick-report-ZvrI5Jkh.js} +3130 -3102
- package/dist/{retention-note-nequESpo.js → retention-note-BrkxE2Wo.js} +9 -6
- package/dist/{retention-DZ0reGGe.js → retention-wDvnFMbN.js} +2 -2
- package/dist/{ru-DZSlsRHq.js → ru-Ct2zNOs8.js} +15 -4
- package/dist/{run-text-DneX9rWh.js → run-text-Bmkf_u0N.js} +2 -2
- package/dist/{search-DP9_alSQ.js → search-ADhiRT_S.js} +3 -3
- package/dist/{sections-BU7NKUOQ.js → sections-BDtBUhxn.js} +1 -1
- package/dist/{select-Te6Qv1Zu.js → select-Cpeslz01.js} +2 -2
- package/dist/{spinner-BRcNKwjH.js → spinner-LbVGWBQq.js} +2 -2
- 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/api-error.d.ts +3 -0
- package/dist/src/i18n/catalogs/de/audit.d.ts +1 -0
- package/dist/src/i18n/catalogs/de/edge-program.d.ts +4 -0
- package/dist/src/i18n/catalogs/de/parameter.d.ts +1 -0
- package/dist/src/i18n/catalogs/de/starter.d.ts +2 -0
- package/dist/src/i18n/catalogs/de.d.ts +11 -0
- package/dist/src/i18n/catalogs/en/api-error.d.ts +3 -0
- package/dist/src/i18n/catalogs/en/audit.d.ts +1 -0
- package/dist/src/i18n/catalogs/en/edge-program.d.ts +4 -0
- package/dist/src/i18n/catalogs/en/parameter.d.ts +1 -0
- package/dist/src/i18n/catalogs/en/starter.d.ts +2 -0
- package/dist/src/i18n/catalogs/en.d.ts +11 -0
- package/dist/src/i18n/catalogs/pl/api-error.d.ts +3 -0
- package/dist/src/i18n/catalogs/pl/audit.d.ts +1 -0
- package/dist/src/i18n/catalogs/pl/edge-program.d.ts +4 -0
- package/dist/src/i18n/catalogs/pl/parameter.d.ts +1 -0
- package/dist/src/i18n/catalogs/pl/starter.d.ts +2 -0
- package/dist/src/i18n/catalogs/pl.d.ts +11 -0
- package/dist/src/i18n/catalogs/ru/api-error.d.ts +3 -0
- package/dist/src/i18n/catalogs/ru/audit.d.ts +1 -0
- package/dist/src/i18n/catalogs/ru/edge-program.d.ts +6 -2
- package/dist/src/i18n/catalogs/ru/graphics.d.ts +2 -2
- package/dist/src/i18n/catalogs/ru/parameter.d.ts +1 -0
- package/dist/src/i18n/catalogs/ru/starter.d.ts +2 -0
- package/dist/src/i18n/catalogs/ru.d.ts +15 -4
- package/dist/src/i18n/catalogs/uk/api-error.d.ts +3 -0
- package/dist/src/i18n/catalogs/uk/audit.d.ts +1 -0
- package/dist/src/i18n/catalogs/uk/edge-program.d.ts +6 -2
- package/dist/src/i18n/catalogs/uk/graphics.d.ts +2 -2
- package/dist/src/i18n/catalogs/uk/parameter.d.ts +1 -0
- package/dist/src/i18n/catalogs/uk/starter.d.ts +2 -0
- package/dist/src/i18n/catalogs/uk.d.ts +15 -4
- package/dist/src/version.d.ts +1 -1
- package/dist/src/workspace/device-presets/layout.d.ts +2 -0
- package/dist/src/workspace/local-setup-link.d.ts +3 -0
- package/dist/src/workspace/parameters/errors.d.ts +5 -0
- package/dist/src/workspace/setup/starters/starter-form.d.ts +24 -6
- package/dist/starter-fields-BHNS6IQe.js +678 -0
- package/dist/styles.css +1 -1
- package/dist/ui.js +6 -6
- package/dist/{uk-CjXPq9Lk.js → uk-Dbm1i2uh.js} +15 -4
- package/dist/{wireguard-docs-CC8XKBR7.js → wireguard-docs-DIBtCviv.js} +3 -3
- package/package.json +2 -2
- package/dist/starter-fields-yM4B49nd.js +0 -583
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-CGnMp29N.js";
|
|
2
|
-
import { $ as t, $r as n, At as r, Bn as i, G as a, H as o, Hn as s, J as c, K as l, Kn as u, Lt as d, Ot as f, Q as p, Qn as m, Sr as h, Tt as g, U as _, Vt as ee, W as v, Wn as y, X as b, Y as x, Z as te, Zn as ne, Zt as re, _r as ie, _t as ae, ar as oe, at as se, br as ce, bt as le, ct as S, dr as ue, dt as de, et as fe, fr as pe, ft as me, gr as he, gt as ge, hr as _e, ht as ve, ii as C, ir as ye, it as be, jn as xe, kt as Se, lt as Ce, mr as we, mt as Te, nt as Ee, ot as De, pr as Oe, pt as ke, q as Ae, rt as je, st as Me, tt as Ne, ut as Pe, vr as Fe, vt as Ie, wt as Le, xr as Re, xt as ze, yr as Be, z as Ve, zn as He, zt as Ue } from "./quick-report-
|
|
3
|
-
import { f as w, h as T, m as E, n as We, v as Ge } from "./i18n-
|
|
4
|
-
import { $ as D, B as Ke, H as qe, K as Je, Nt as Ye, R as Xe, U as Ze, X as Qe, Y as $e, a as et, d as tt, et as nt, i as rt, jt as O, n as it, o as at, r as ot, s as st, t as ct, xt as k } from "./alert-dialog-
|
|
5
|
-
import { A, B as lt, G as j, H as M, L as N, M as P, R as ut, U as F, V as I, Y as L, c as R, z as dt } from "./spinner-
|
|
6
|
-
import { i as ft, n as pt, r as mt } from "./notice-card-
|
|
7
|
-
import { n as ht, r as gt } from "./query-gate-
|
|
8
|
-
import { n as _t, r as vt, t as yt } from "./dashboards-page-
|
|
9
|
-
import { i as bt, t as xt } from "./page-
|
|
10
|
-
import { n as St, t as Ct } from "./base-revision-
|
|
11
|
-
import {
|
|
12
|
-
import { t as
|
|
13
|
-
import { useCallback as
|
|
2
|
+
import { $ as t, $r as n, At as r, Bn as i, G as a, H as o, Hn as s, J as c, K as l, Kn as u, Lt as d, Ot as f, Q as p, Qn as m, Sr as h, Tt as g, U as _, Vt as ee, W as v, Wn as y, X as b, Y as x, Z as te, Zn as ne, Zt as re, _r as ie, _t as ae, ar as oe, at as se, br as ce, bt as le, ct as S, dr as ue, dt as de, et as fe, fr as pe, ft as me, gr as he, gt as ge, hr as _e, ht as ve, ii as C, ir as ye, it as be, jn as xe, kt as Se, lt as Ce, mr as we, mt as Te, nt as Ee, ot as De, pr as Oe, pt as ke, q as Ae, rt as je, st as Me, tt as Ne, ut as Pe, vr as Fe, vt as Ie, wt as Le, xr as Re, xt as ze, yr as Be, z as Ve, zn as He, zt as Ue } from "./quick-report-ZvrI5Jkh.js";
|
|
3
|
+
import { f as w, h as T, m as E, n as We, v as Ge } from "./i18n-D54xfDUE.js";
|
|
4
|
+
import { $ as D, B as Ke, H as qe, K as Je, Nt as Ye, R as Xe, U as Ze, X as Qe, Y as $e, a as et, d as tt, et as nt, i as rt, jt as O, n as it, o as at, r as ot, s as st, t as ct, xt as k } from "./alert-dialog-CskdoiGZ.js";
|
|
5
|
+
import { A, B as lt, G as j, H as M, L as N, M as P, R as ut, U as F, V as I, Y as L, c as R, z as dt } from "./spinner-LbVGWBQq.js";
|
|
6
|
+
import { i as ft, n as pt, r as mt } from "./notice-card-BMNjc7qi.js";
|
|
7
|
+
import { n as ht, r as gt } from "./query-gate-2sU8OvEb.js";
|
|
8
|
+
import { n as _t, r as vt, t as yt } from "./dashboards-page-CoKevu-T.js";
|
|
9
|
+
import { i as bt, t as xt } from "./page-UoQRnsm3.js";
|
|
10
|
+
import { n as St, t as Ct } from "./base-revision-C-tNhqGq.js";
|
|
11
|
+
import { i as wt, n as Tt, r as Et, t as Dt } from "./retention-note-BrkxE2Wo.js";
|
|
12
|
+
import { t as Ot } from "./errors-BFeJfnyz.js";
|
|
13
|
+
import { useCallback as kt, useEffect as At, useId as jt, useMemo as Mt, useRef as Nt, useState as z } from "react";
|
|
14
14
|
import { Fragment as B, jsx as V, jsxs as H } from "react/jsx-runtime";
|
|
15
|
-
import { ArrowDownIcon as
|
|
16
|
-
import { formatAppDateTime as
|
|
17
|
-
import { defaultConstSource as
|
|
18
|
-
import { reportPresetFormToInput as
|
|
19
|
-
import { Navigate as
|
|
20
|
-
import { endpointEditFormSchemaFor as
|
|
21
|
-
import { calcFormulaDiagnostics as
|
|
15
|
+
import { ArrowDownIcon as Pt, ArrowUpIcon as Ft, ChevronDownIcon as It, ChevronRightIcon as Lt, PlusIcon as U, Trash2Icon as Rt, XIcon as zt } from "lucide-react";
|
|
16
|
+
import { formatAppDateTime as Bt, parseAppDateTime as Vt, resolveLocalized as W } from "@overvis/hmi-shared";
|
|
17
|
+
import { defaultConstSource as Ht, defaultGeoValueType as Ut, defaultIntCompositionBits as Wt, defaultIntCompositionBytes as Gt, defaultValueType as Kt, formatModbusAddressesText as qt, parameterBranchNameFormSchema as Jt, parameterFormSchema as Yt, parameterFormToInput as Xt, parameterFormValues as Zt, parseModbusAddressesText as Qt } from "@overvis/hmi-shared/parameter";
|
|
18
|
+
import { reportPresetFormToInput as $t, reportPresetFormValues as en, reportPresetShellFormSchema as tn, reportSnapshotTypeForValueTypeName as nn } from "@overvis/hmi-shared/report";
|
|
19
|
+
import { Navigate as rn, useNavigate as an } from "@tanstack/react-router";
|
|
20
|
+
import { endpointEditFormSchemaFor as on, endpointEditFormToInput as sn, endpointEditFormValues as cn } from "@overvis/hmi-shared/endpoint";
|
|
21
|
+
import { calcFormulaDiagnostics as ln, transformFormulaDiagnostics as un } from "@overvis/hmi-shared/parameter-engine";
|
|
22
22
|
// src/workspace/parameters/defaults.ts
|
|
23
|
-
function
|
|
23
|
+
function dn() {
|
|
24
24
|
return {
|
|
25
25
|
kind: "calc",
|
|
26
26
|
inputParamIds: [""],
|
|
@@ -28,7 +28,7 @@ function un() {
|
|
|
28
28
|
returnFormat: "float"
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function fn(e) {
|
|
32
32
|
return {
|
|
33
33
|
kind: "modbus-tcp",
|
|
34
34
|
endpointId: e,
|
|
@@ -38,11 +38,11 @@ function dn(e) {
|
|
|
38
38
|
writeFunction: "none"
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
return e == null ?
|
|
41
|
+
function pn(e) {
|
|
42
|
+
return e == null ? Ht() : fn(e);
|
|
43
43
|
}
|
|
44
44
|
// src/workspace/parameters/form/values.ts
|
|
45
|
-
var
|
|
45
|
+
var mn = "__none__", hn = [
|
|
46
46
|
"str",
|
|
47
47
|
"num",
|
|
48
48
|
"int",
|
|
@@ -52,14 +52,14 @@ var pn = "__none__", mn = [
|
|
|
52
52
|
"ipaddr",
|
|
53
53
|
"macaddr",
|
|
54
54
|
"geo"
|
|
55
|
-
],
|
|
55
|
+
], gn = [
|
|
56
56
|
"timestamp-sec-32",
|
|
57
57
|
"timestamp-msec-32",
|
|
58
58
|
"timestamp-days-32",
|
|
59
59
|
"timestamp-days-16",
|
|
60
60
|
"iso-8601-string",
|
|
61
61
|
"datetime"
|
|
62
|
-
],
|
|
62
|
+
], _n = [
|
|
63
63
|
"unsigned-int",
|
|
64
64
|
"signed-int",
|
|
65
65
|
"bcd-int",
|
|
@@ -69,23 +69,23 @@ var pn = "__none__", mn = [
|
|
|
69
69
|
"decimal16",
|
|
70
70
|
"decimal32",
|
|
71
71
|
"decimal64"
|
|
72
|
-
],
|
|
72
|
+
], vn = [
|
|
73
73
|
"unsigned-int",
|
|
74
74
|
"signed-int",
|
|
75
75
|
"bcd"
|
|
76
|
-
],
|
|
76
|
+
], yn = [
|
|
77
77
|
"unsigned-int",
|
|
78
78
|
"signed-int",
|
|
79
79
|
"float32",
|
|
80
80
|
"float64"
|
|
81
|
-
],
|
|
81
|
+
], bn = [
|
|
82
82
|
"ascii",
|
|
83
83
|
"utf8",
|
|
84
84
|
"utf16le",
|
|
85
85
|
"base64",
|
|
86
86
|
"hex"
|
|
87
87
|
];
|
|
88
|
-
function
|
|
88
|
+
function xn(e, t) {
|
|
89
89
|
let n = /* @__PURE__ */ new Map();
|
|
90
90
|
for (let t of e) {
|
|
91
91
|
let e = n.get(t.parentId) ?? [];
|
|
@@ -101,7 +101,7 @@ function bn(e, t) {
|
|
|
101
101
|
};
|
|
102
102
|
return i(null, 0), r;
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function Sn(e) {
|
|
105
105
|
let t = e.trim();
|
|
106
106
|
if (t.length === 0) return null;
|
|
107
107
|
let n = Number(t);
|
|
@@ -111,7 +111,7 @@ function G(e) {
|
|
|
111
111
|
let t = e.trim();
|
|
112
112
|
return t.length === 0 || !/^-?\d+$/.test(t) ? null : Number(t);
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function Cn(e, t) {
|
|
115
115
|
let r = e?.[0];
|
|
116
116
|
if (r == null) return w(t === "source" ? "parameter_field_source_invalid" : "parameter_field_value_type_invalid");
|
|
117
117
|
let i = (r.path ?? []).map((e) => String(e)), a = i.length > 0 ? i.join(".") : t, o = n([r], a)[0]?.message ?? w("error_field_invalid");
|
|
@@ -120,22 +120,22 @@ function Sn(e, t) {
|
|
|
120
120
|
detail: o
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function wn(e) {
|
|
124
124
|
switch (e.problem) {
|
|
125
125
|
case "calc_inputs_required": return w("parameter_field_calc_inputs_required");
|
|
126
126
|
case "addresses_invalid": return w("parameter_field_addresses_invalid");
|
|
127
127
|
case "endpoint_required": return w("parameter_field_endpoint_required");
|
|
128
128
|
case "key_required": return w("error_field_required");
|
|
129
|
-
case "invalid": return
|
|
129
|
+
case "invalid": return Cn(e.issues, e.field);
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function Tn(e) {
|
|
133
133
|
return e === "coil" || e === "holding-register";
|
|
134
134
|
}
|
|
135
|
-
function Tn(e, t) {
|
|
136
|
-
return e === "const" ? Vt() : e === "calc" ? un() : t == null ? Vt() : dn(t);
|
|
137
|
-
}
|
|
138
135
|
function En(e, t) {
|
|
136
|
+
return e === "const" ? Ht() : e === "calc" ? dn() : t == null ? Ht() : fn(t);
|
|
137
|
+
}
|
|
138
|
+
function Dn(e, t) {
|
|
139
139
|
let n = {
|
|
140
140
|
kind: "modbus-tcp",
|
|
141
141
|
endpointId: e.endpointId,
|
|
@@ -143,7 +143,7 @@ function En(e, t) {
|
|
|
143
143
|
table: t,
|
|
144
144
|
addresses: e.addresses
|
|
145
145
|
};
|
|
146
|
-
if (
|
|
146
|
+
if (Tn(t)) {
|
|
147
147
|
let r = "writeFunction" in e ? e.writeFunction : "none";
|
|
148
148
|
return {
|
|
149
149
|
...n,
|
|
@@ -156,7 +156,7 @@ function En(e, t) {
|
|
|
156
156
|
table: t
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function On(e) {
|
|
160
160
|
return e === "datetime" ? {
|
|
161
161
|
kind: "datetime",
|
|
162
162
|
year: { bytePosition: 0 },
|
|
@@ -178,8 +178,8 @@ function Dn(e) {
|
|
|
178
178
|
timezoneOffset: null
|
|
179
179
|
} : { kind: e };
|
|
180
180
|
}
|
|
181
|
-
function
|
|
182
|
-
let r = t[0]?.id ?? null, i =
|
|
181
|
+
function kn(e, t, n) {
|
|
182
|
+
let r = t[0]?.id ?? null, i = xn(e, Ge());
|
|
183
183
|
return {
|
|
184
184
|
branchId: (n != null && e.some((e) => e.id === n) ? n : null) ?? i[0]?.id ?? "",
|
|
185
185
|
name: "",
|
|
@@ -190,22 +190,22 @@ function On(e, t, n) {
|
|
|
190
190
|
tags: [],
|
|
191
191
|
enabled: !0,
|
|
192
192
|
backgroundReadingPeriodSeconds: null,
|
|
193
|
-
source:
|
|
194
|
-
valueType:
|
|
193
|
+
source: pn(r),
|
|
194
|
+
valueType: Kt("num")
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
197
|
// src/workspace/setup/parameters/recorded.ts
|
|
198
|
-
var
|
|
198
|
+
var An = [
|
|
199
199
|
"coil",
|
|
200
200
|
"discrete-input",
|
|
201
201
|
"holding-register",
|
|
202
202
|
"input-register"
|
|
203
203
|
];
|
|
204
|
-
function
|
|
204
|
+
function jn(e, t) {
|
|
205
205
|
let n = typeof e == "string" ? Number(e) : e;
|
|
206
206
|
return typeof n == "number" && Number.isInteger(n) && n >= 0 && n <= t ? n : null;
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function Mn(e) {
|
|
209
209
|
return {
|
|
210
210
|
recordedEndpointId: e.endpointId,
|
|
211
211
|
recordedUnitId: e.unitId,
|
|
@@ -213,8 +213,8 @@ function jn(e) {
|
|
|
213
213
|
recordedAddress: e.address
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
|
-
function
|
|
217
|
-
let t = e.recordedEndpointId, n =
|
|
216
|
+
function Nn(e) {
|
|
217
|
+
let t = e.recordedEndpointId, n = jn(e.recordedUnitId, 255), r = An.find((t) => t === e.recordedTable), i = jn(e.recordedAddress, 65535);
|
|
218
218
|
return typeof t != "string" || t.length === 0 || n == null || r == null || i == null ? null : {
|
|
219
219
|
endpointId: t,
|
|
220
220
|
unitId: n,
|
|
@@ -222,7 +222,7 @@ function Mn(e) {
|
|
|
222
222
|
address: i
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function Pn(e) {
|
|
226
226
|
let t = {
|
|
227
227
|
kind: "modbus-tcp",
|
|
228
228
|
endpointId: e.endpointId,
|
|
@@ -239,7 +239,7 @@ function Nn(e) {
|
|
|
239
239
|
};
|
|
240
240
|
}
|
|
241
241
|
// src/workspace/reports/preset/submit.ts
|
|
242
|
-
function
|
|
242
|
+
function Fn(e) {
|
|
243
243
|
return e.presetId == null ? { kind: "create" } : e.promoteTemporary ? {
|
|
244
244
|
kind: "promote",
|
|
245
245
|
presetId: e.presetId
|
|
@@ -248,10 +248,10 @@ function Pn(e) {
|
|
|
248
248
|
presetId: e.presetId
|
|
249
249
|
};
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function In(e) {
|
|
252
252
|
return e.isTemporary && !e.promoteTemporary ? "runtime" : "editor";
|
|
253
253
|
}
|
|
254
|
-
function
|
|
254
|
+
function Ln(e) {
|
|
255
255
|
switch (e.mode.kind) {
|
|
256
256
|
case "create": return {
|
|
257
257
|
procedure: "create",
|
|
@@ -280,7 +280,7 @@ function In(e) {
|
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
282
|
// src/workspace/setup/endpoints/edit-dialog.tsx
|
|
283
|
-
function
|
|
283
|
+
function Rn(e, t) {
|
|
284
284
|
let n = [
|
|
285
285
|
e?.manufacturer,
|
|
286
286
|
t,
|
|
@@ -288,7 +288,7 @@ function Ln(e, t) {
|
|
|
288
288
|
].filter((e) => e != null && e.length > 0);
|
|
289
289
|
return n.length === 0 ? null : n.join(" · ");
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function zn({ workspaceId: e, endpointId: t, onClose: n }) {
|
|
292
292
|
let i = C.endpoint.get.useQuery({ id: t }), a = C.useUtils(), [o, s] = z(0);
|
|
293
293
|
return /* @__PURE__ */ V(gt, {
|
|
294
294
|
query: i,
|
|
@@ -301,7 +301,7 @@ function Rn({ workspaceId: e, endpointId: t, onClose: n }) {
|
|
|
301
301
|
message: y(e ?? "endpoint_not_found"),
|
|
302
302
|
onRetry: () => i.refetch()
|
|
303
303
|
}),
|
|
304
|
-
children: (i) => /* @__PURE__ */ V(r, { children: /* @__PURE__ */ V(
|
|
304
|
+
children: (i) => /* @__PURE__ */ V(r, { children: /* @__PURE__ */ V(Bn, {
|
|
305
305
|
endpoint: i,
|
|
306
306
|
workspaceId: e,
|
|
307
307
|
onClose: n,
|
|
@@ -312,13 +312,13 @@ function Rn({ workspaceId: e, endpointId: t, onClose: n }) {
|
|
|
312
312
|
}, `${i.id}-${String(o)}`) })
|
|
313
313
|
});
|
|
314
314
|
}
|
|
315
|
-
function
|
|
316
|
-
let a = E(), o = We(), s = T(), c =
|
|
317
|
-
defaultValues:
|
|
315
|
+
function Bn({ workspaceId: e, endpoint: t, onClose: n, onReload: r }) {
|
|
316
|
+
let a = E(), o = We(), s = T(), c = Rn(t.deviceMeta, t.sku), l = d(e).update, f = St(t.revision), p = u({
|
|
317
|
+
defaultValues: cn(t, s),
|
|
318
318
|
validators: He({
|
|
319
|
-
schema:
|
|
319
|
+
schema: on(t.kind),
|
|
320
320
|
submit: async (e) => {
|
|
321
|
-
let n =
|
|
321
|
+
let n = sn(e, t);
|
|
322
322
|
return n.ok ? (await l.mutateAsync({
|
|
323
323
|
...n.input,
|
|
324
324
|
...f.baseRevision === void 0 ? {} : { baseRevision: f.baseRevision }
|
|
@@ -541,7 +541,7 @@ function zn({ workspaceId: e, endpoint: t, onClose: n, onReload: r }) {
|
|
|
541
541
|
}) });
|
|
542
542
|
}
|
|
543
543
|
// src/workspace/parameters/form/shared-fields.tsx
|
|
544
|
-
function
|
|
544
|
+
function Vn({ id: e, label: t, value: n, problem: r, onChange: i }) {
|
|
545
545
|
T();
|
|
546
546
|
let a = r !== void 0;
|
|
547
547
|
return /* @__PURE__ */ H(N, {
|
|
@@ -564,8 +564,8 @@ function Bn({ id: e, label: t, value: n, problem: r, onChange: i }) {
|
|
|
564
564
|
]
|
|
565
565
|
});
|
|
566
566
|
}
|
|
567
|
-
function
|
|
568
|
-
let r = E(), [i, a] = z(""), o =
|
|
567
|
+
function Hn({ tags: e, errors: t, onChange: n }) {
|
|
568
|
+
let r = E(), [i, a] = z(""), o = Nt(null), s = (e, t) => {
|
|
569
569
|
let n = e.split(","), r = n.pop() ?? "", i = t;
|
|
570
570
|
for (let e of n) {
|
|
571
571
|
let t = e.trim();
|
|
@@ -601,7 +601,7 @@ function Vn({ tags: e, errors: t, onChange: n }) {
|
|
|
601
601
|
onClick: (r) => {
|
|
602
602
|
r.stopPropagation(), n(e.filter((e) => e !== t));
|
|
603
603
|
},
|
|
604
|
-
children: /* @__PURE__ */ V(
|
|
604
|
+
children: /* @__PURE__ */ V(zt, { className: "size-3.5" })
|
|
605
605
|
})]
|
|
606
606
|
}, t)), e.length < 32 ? /* @__PURE__ */ V("input", {
|
|
607
607
|
ref: o,
|
|
@@ -624,15 +624,15 @@ function Vn({ tags: e, errors: t, onChange: n }) {
|
|
|
624
624
|
]
|
|
625
625
|
});
|
|
626
626
|
}
|
|
627
|
-
function
|
|
628
|
-
let r = E(), i = T(), [a, o] = z(!1), [s, c] = z(""), l =
|
|
627
|
+
function Un({ value: e, options: t, onChange: n }) {
|
|
628
|
+
let r = E(), i = T(), [a, o] = z(!1), [s, c] = z(""), l = Nt(null), u = t.find((t) => t.id === e), d = Mt(() => {
|
|
629
629
|
let e = s.trim().toLowerCase();
|
|
630
630
|
return (e.length === 0 ? t : t.filter((t) => {
|
|
631
631
|
let n = ue(t.name, e), r = ue(t.mnemonic, e);
|
|
632
632
|
return n || r;
|
|
633
633
|
})).slice(0, 100);
|
|
634
634
|
}, [t, s]), f = u == null ? null : W(u.name, i), p = i;
|
|
635
|
-
return
|
|
635
|
+
return At(() => {
|
|
636
636
|
if (!a) return;
|
|
637
637
|
let e = (e) => {
|
|
638
638
|
let t = e.target;
|
|
@@ -700,7 +700,7 @@ function Hn({ value: e, options: t, onChange: n }) {
|
|
|
700
700
|
}) : null]
|
|
701
701
|
});
|
|
702
702
|
}
|
|
703
|
-
function
|
|
703
|
+
function Wn({ value: e, onChange: t }) {
|
|
704
704
|
let n = E();
|
|
705
705
|
return /* @__PURE__ */ H("div", {
|
|
706
706
|
className: "\n grid grid-cols-1 gap-4\n sm:grid-cols-3\n ",
|
|
@@ -796,14 +796,14 @@ function K({ id: e, label: t, value: n, integer: r = !1, description: i, onChang
|
|
|
796
796
|
a(null);
|
|
797
797
|
return;
|
|
798
798
|
}
|
|
799
|
-
let n = r ? G(t) :
|
|
799
|
+
let n = r ? G(t) : Sn(t);
|
|
800
800
|
n != null && a(n);
|
|
801
801
|
}
|
|
802
802
|
}),
|
|
803
803
|
i == null ? null : /* @__PURE__ */ V(dt, { children: i })
|
|
804
804
|
] });
|
|
805
805
|
}
|
|
806
|
-
function
|
|
806
|
+
function Gn({ transform: e, onChange: t }) {
|
|
807
807
|
let n = E();
|
|
808
808
|
return /* @__PURE__ */ H("div", {
|
|
809
809
|
className: "space-y-3",
|
|
@@ -824,22 +824,22 @@ function Wn({ transform: e, onChange: t }) {
|
|
|
824
824
|
})]
|
|
825
825
|
}), e == null ? null : /* @__PURE__ */ H("div", {
|
|
826
826
|
className: "\n grid grid-cols-1 gap-4\n sm:grid-cols-2\n ",
|
|
827
|
-
children: [/* @__PURE__ */ V(
|
|
827
|
+
children: [/* @__PURE__ */ V(Vn, {
|
|
828
828
|
id: "parameter-transform-from-read",
|
|
829
829
|
label: n("parameter_field_transform_from_read"),
|
|
830
830
|
value: e.fromRead,
|
|
831
|
-
problem:
|
|
831
|
+
problem: un(e.fromRead)[0],
|
|
832
832
|
onChange: (n) => {
|
|
833
833
|
t({
|
|
834
834
|
...e,
|
|
835
835
|
fromRead: n
|
|
836
836
|
});
|
|
837
837
|
}
|
|
838
|
-
}), /* @__PURE__ */ V(
|
|
838
|
+
}), /* @__PURE__ */ V(Vn, {
|
|
839
839
|
id: "parameter-transform-to-write",
|
|
840
840
|
label: n("parameter_field_transform_to_write"),
|
|
841
841
|
value: e.toWrite ?? "",
|
|
842
|
-
problem: e.toWrite == null ? void 0 :
|
|
842
|
+
problem: e.toWrite == null ? void 0 : un(e.toWrite)[0],
|
|
843
843
|
onChange: (n) => {
|
|
844
844
|
let r = n.trim();
|
|
845
845
|
t({
|
|
@@ -851,7 +851,7 @@ function Wn({ transform: e, onChange: t }) {
|
|
|
851
851
|
})]
|
|
852
852
|
});
|
|
853
853
|
}
|
|
854
|
-
function
|
|
854
|
+
function Kn({ values: e, digitOnly: t, onChange: n }) {
|
|
855
855
|
let r = E(), i = e != null, a = e ?? [];
|
|
856
856
|
return /* @__PURE__ */ H("div", {
|
|
857
857
|
className: "space-y-3",
|
|
@@ -886,7 +886,7 @@ function Gn({ values: e, digitOnly: t, onChange: n }) {
|
|
|
886
886
|
onClick: () => {
|
|
887
887
|
n(a.filter((e, t) => t !== r));
|
|
888
888
|
},
|
|
889
|
-
children: /* @__PURE__ */ V(
|
|
889
|
+
children: /* @__PURE__ */ V(Rt, {})
|
|
890
890
|
})]
|
|
891
891
|
}, `allowed-${String(r)}`)), /* @__PURE__ */ H(O, {
|
|
892
892
|
type: "button",
|
|
@@ -901,7 +901,7 @@ function Gn({ values: e, digitOnly: t, onChange: n }) {
|
|
|
901
901
|
});
|
|
902
902
|
}
|
|
903
903
|
// src/workspace/parameters/source-fields.tsx
|
|
904
|
-
function
|
|
904
|
+
function qn({ source: e, onChange: t }) {
|
|
905
905
|
let n = E();
|
|
906
906
|
return /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ H(N, { children: [/* @__PURE__ */ V(M, {
|
|
907
907
|
htmlFor: "parameter-const-key",
|
|
@@ -932,7 +932,7 @@ function Kn({ source: e, onChange: t }) {
|
|
|
932
932
|
})]
|
|
933
933
|
})] });
|
|
934
934
|
}
|
|
935
|
-
function
|
|
935
|
+
function Jn({ source: e, paramChoices: t, onChange: n }) {
|
|
936
936
|
let r = E(), i = e.inputParamIds.length > 0 ? e.inputParamIds : [""];
|
|
937
937
|
return /* @__PURE__ */ H(B, { children: [
|
|
938
938
|
/* @__PURE__ */ H(N, { children: [/* @__PURE__ */ V(M, { children: r("parameter_field_calc_inputs") }), /* @__PURE__ */ H("div", {
|
|
@@ -944,7 +944,7 @@ function qn({ source: e, paramChoices: t, onChange: n }) {
|
|
|
944
944
|
className: "w-8 shrink-0 text-xs text-muted-foreground",
|
|
945
945
|
children: ["#", String(a + 1)]
|
|
946
946
|
}),
|
|
947
|
-
/* @__PURE__ */ V(
|
|
947
|
+
/* @__PURE__ */ V(Un, {
|
|
948
948
|
value: r,
|
|
949
949
|
options: t,
|
|
950
950
|
onChange: (t) => {
|
|
@@ -965,7 +965,7 @@ function qn({ source: e, paramChoices: t, onChange: n }) {
|
|
|
965
965
|
inputParamIds: i.filter((e, t) => t !== a)
|
|
966
966
|
});
|
|
967
967
|
},
|
|
968
|
-
children: /* @__PURE__ */ V(
|
|
968
|
+
children: /* @__PURE__ */ V(Rt, {})
|
|
969
969
|
}) : null
|
|
970
970
|
]
|
|
971
971
|
}, `calc-input-${String(a)}`)), i.length < 32 ? /* @__PURE__ */ H(O, {
|
|
@@ -981,11 +981,11 @@ function qn({ source: e, paramChoices: t, onChange: n }) {
|
|
|
981
981
|
children: [/* @__PURE__ */ V(U, { "data-icon": "inline-start" }), r("parameter_field_calc_add_input")]
|
|
982
982
|
}) : null]
|
|
983
983
|
})] }),
|
|
984
|
-
/* @__PURE__ */ V(
|
|
984
|
+
/* @__PURE__ */ V(Vn, {
|
|
985
985
|
id: "parameter-calc-formula",
|
|
986
986
|
label: r("parameter_field_formula"),
|
|
987
987
|
value: e.formula,
|
|
988
|
-
problem:
|
|
988
|
+
problem: ln(e.formula, i.length)[0],
|
|
989
989
|
onChange: (t) => {
|
|
990
990
|
n({
|
|
991
991
|
...e,
|
|
@@ -1017,7 +1017,7 @@ function qn({ source: e, paramChoices: t, onChange: n }) {
|
|
|
1017
1017
|
})] })
|
|
1018
1018
|
] });
|
|
1019
1019
|
}
|
|
1020
|
-
function
|
|
1020
|
+
function Yn({ source: e, endpoints: t, addressesText: n, onAddressesTextChange: r, onChange: i }) {
|
|
1021
1021
|
let a = E(), o = T();
|
|
1022
1022
|
return /* @__PURE__ */ H(B, { children: [
|
|
1023
1023
|
/* @__PURE__ */ H(N, { children: [/* @__PURE__ */ V(M, {
|
|
@@ -1068,7 +1068,7 @@ function Jn({ source: e, endpoints: t, addressesText: n, onAddressesTextChange:
|
|
|
1068
1068
|
value: e.table,
|
|
1069
1069
|
onChange: (t) => {
|
|
1070
1070
|
let n = t.target.value;
|
|
1071
|
-
(n === "coil" || n === "discrete-input" || n === "holding-register" || n === "input-register") && i(
|
|
1071
|
+
(n === "coil" || n === "discrete-input" || n === "holding-register" || n === "input-register") && i(Dn(e, n));
|
|
1072
1072
|
},
|
|
1073
1073
|
children: [
|
|
1074
1074
|
/* @__PURE__ */ V(P, {
|
|
@@ -1105,15 +1105,15 @@ function Jn({ source: e, endpoints: t, addressesText: n, onAddressesTextChange:
|
|
|
1105
1105
|
r(e.target.value);
|
|
1106
1106
|
},
|
|
1107
1107
|
onBlur: () => {
|
|
1108
|
-
let t =
|
|
1108
|
+
let t = Qt(n);
|
|
1109
1109
|
t != null && (i({
|
|
1110
1110
|
...e,
|
|
1111
1111
|
addresses: t
|
|
1112
|
-
}), r(
|
|
1112
|
+
}), r(qt(t)));
|
|
1113
1113
|
}
|
|
1114
1114
|
})
|
|
1115
1115
|
] }),
|
|
1116
|
-
|
|
1116
|
+
Tn(e.table) && "writeFunction" in e ? /* @__PURE__ */ H(N, { children: [/* @__PURE__ */ V(M, {
|
|
1117
1117
|
htmlFor: "parameter-modbus-write",
|
|
1118
1118
|
children: a("parameter_field_write_function")
|
|
1119
1119
|
}), /* @__PURE__ */ H(A, {
|
|
@@ -1149,7 +1149,7 @@ function Jn({ source: e, endpoints: t, addressesText: n, onAddressesTextChange:
|
|
|
1149
1149
|
] });
|
|
1150
1150
|
}
|
|
1151
1151
|
// src/workspace/parameters/value/type/datetime-parts.tsx
|
|
1152
|
-
function
|
|
1152
|
+
function Xn({ composition: e, onChange: t }) {
|
|
1153
1153
|
let n = E(), r = e.year == null ? "byte" : "wordPosition" in e.year ? "word" : "byte", i = e.timezoneOffset != null, a = e.timezoneOffset == null ? "byte" : "wordPosition" in e.timezoneOffset.pos ? "word" : "byte";
|
|
1154
1154
|
return /* @__PURE__ */ H("div", {
|
|
1155
1155
|
className: "space-y-4",
|
|
@@ -1504,7 +1504,7 @@ function Yn({ composition: e, onChange: t }) {
|
|
|
1504
1504
|
});
|
|
1505
1505
|
}
|
|
1506
1506
|
// src/workspace/parameters/value/type/geo.tsx
|
|
1507
|
-
function
|
|
1507
|
+
function Zn({ label: e, description: t, field: n, onChange: r }) {
|
|
1508
1508
|
let i = E();
|
|
1509
1509
|
return /* @__PURE__ */ H("div", {
|
|
1510
1510
|
className: "space-y-3",
|
|
@@ -1519,7 +1519,7 @@ function Xn({ label: e, description: t, field: n, onChange: r }) {
|
|
|
1519
1519
|
children: t
|
|
1520
1520
|
}) : null]
|
|
1521
1521
|
}),
|
|
1522
|
-
/* @__PURE__ */ V(
|
|
1522
|
+
/* @__PURE__ */ V(Wn, {
|
|
1523
1523
|
value: n.fromBytes,
|
|
1524
1524
|
onChange: (e) => {
|
|
1525
1525
|
r({
|
|
@@ -1557,7 +1557,7 @@ function Xn({ label: e, description: t, field: n, onChange: r }) {
|
|
|
1557
1557
|
className: "w-full",
|
|
1558
1558
|
value: n.packing,
|
|
1559
1559
|
onChange: (e) => {
|
|
1560
|
-
for (let t of
|
|
1560
|
+
for (let t of yn) if (t === e.target.value) {
|
|
1561
1561
|
r({
|
|
1562
1562
|
...n,
|
|
1563
1563
|
packing: t
|
|
@@ -1565,7 +1565,7 @@ function Xn({ label: e, description: t, field: n, onChange: r }) {
|
|
|
1565
1565
|
return;
|
|
1566
1566
|
}
|
|
1567
1567
|
},
|
|
1568
|
-
children:
|
|
1568
|
+
children: yn.map((e) => /* @__PURE__ */ V(P, {
|
|
1569
1569
|
value: e,
|
|
1570
1570
|
children: Be(e)
|
|
1571
1571
|
}, e))
|
|
@@ -1575,11 +1575,11 @@ function Xn({ label: e, description: t, field: n, onChange: r }) {
|
|
|
1575
1575
|
]
|
|
1576
1576
|
});
|
|
1577
1577
|
}
|
|
1578
|
-
function
|
|
1578
|
+
function Qn({ label: e, axis: t, onChange: n }) {
|
|
1579
1579
|
let r = E();
|
|
1580
1580
|
return /* @__PURE__ */ H("div", {
|
|
1581
1581
|
className: "space-y-3",
|
|
1582
|
-
children: [/* @__PURE__ */ V(
|
|
1582
|
+
children: [/* @__PURE__ */ V(Zn, {
|
|
1583
1583
|
label: e,
|
|
1584
1584
|
field: t,
|
|
1585
1585
|
onChange: (e) => {
|
|
@@ -1614,7 +1614,7 @@ function Zn({ label: e, axis: t, onChange: n }) {
|
|
|
1614
1614
|
})]
|
|
1615
1615
|
});
|
|
1616
1616
|
}
|
|
1617
|
-
function
|
|
1617
|
+
function $n({ valueType: e, onChange: t, onEncodingChange: n }) {
|
|
1618
1618
|
let r = E(), i = e.composition;
|
|
1619
1619
|
return /* @__PURE__ */ H("div", {
|
|
1620
1620
|
className: "space-y-6",
|
|
@@ -1647,7 +1647,7 @@ function Qn({ valueType: e, onChange: t, onEncodingChange: n }) {
|
|
|
1647
1647
|
});
|
|
1648
1648
|
}
|
|
1649
1649
|
}),
|
|
1650
|
-
i.encoding === "scalar" ? /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(
|
|
1650
|
+
i.encoding === "scalar" ? /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(Qn, {
|
|
1651
1651
|
label: r("parameter_field_geo_latitude"),
|
|
1652
1652
|
axis: i.latitude,
|
|
1653
1653
|
onChange: (n) => {
|
|
@@ -1659,7 +1659,7 @@ function Qn({ valueType: e, onChange: t, onEncodingChange: n }) {
|
|
|
1659
1659
|
}
|
|
1660
1660
|
});
|
|
1661
1661
|
}
|
|
1662
|
-
}), /* @__PURE__ */ V(
|
|
1662
|
+
}), /* @__PURE__ */ V(Qn, {
|
|
1663
1663
|
label: r("parameter_field_geo_longitude"),
|
|
1664
1664
|
axis: i.longitude,
|
|
1665
1665
|
onChange: (n) => {
|
|
@@ -1678,7 +1678,7 @@ function Qn({ valueType: e, onChange: t, onEncodingChange: n }) {
|
|
|
1678
1678
|
className: "text-sm font-medium",
|
|
1679
1679
|
children: r(n === "latitude" ? "parameter_field_geo_latitude" : "parameter_field_geo_longitude")
|
|
1680
1680
|
}),
|
|
1681
|
-
/* @__PURE__ */ V(
|
|
1681
|
+
/* @__PURE__ */ V(Zn, {
|
|
1682
1682
|
label: r("parameter_field_geo_degrees"),
|
|
1683
1683
|
field: i[n].degrees,
|
|
1684
1684
|
onChange: (r) => {
|
|
@@ -1694,7 +1694,7 @@ function Qn({ valueType: e, onChange: t, onEncodingChange: n }) {
|
|
|
1694
1694
|
});
|
|
1695
1695
|
}
|
|
1696
1696
|
}),
|
|
1697
|
-
/* @__PURE__ */ V(
|
|
1697
|
+
/* @__PURE__ */ V(Zn, {
|
|
1698
1698
|
label: r("parameter_field_geo_minutes"),
|
|
1699
1699
|
field: i[n].minutes,
|
|
1700
1700
|
onChange: (r) => {
|
|
@@ -1710,7 +1710,7 @@ function Qn({ valueType: e, onChange: t, onEncodingChange: n }) {
|
|
|
1710
1710
|
});
|
|
1711
1711
|
}
|
|
1712
1712
|
}),
|
|
1713
|
-
/* @__PURE__ */ V(
|
|
1713
|
+
/* @__PURE__ */ V(Zn, {
|
|
1714
1714
|
label: r("parameter_field_geo_seconds"),
|
|
1715
1715
|
field: i[n].seconds,
|
|
1716
1716
|
onChange: (r) => {
|
|
@@ -1727,7 +1727,7 @@ function Qn({ valueType: e, onChange: t, onEncodingChange: n }) {
|
|
|
1727
1727
|
}
|
|
1728
1728
|
})
|
|
1729
1729
|
]
|
|
1730
|
-
}, n)), /* @__PURE__ */ V(
|
|
1730
|
+
}, n)), /* @__PURE__ */ V(Zn, {
|
|
1731
1731
|
label: r("parameter_field_geo_quadrant"),
|
|
1732
1732
|
description: r("parameter_field_geo_quadrant_hint"),
|
|
1733
1733
|
field: i.quadrant,
|
|
@@ -1745,7 +1745,7 @@ function Qn({ valueType: e, onChange: t, onEncodingChange: n }) {
|
|
|
1745
1745
|
});
|
|
1746
1746
|
}
|
|
1747
1747
|
// src/workspace/parameters/value/type/int-repr.tsx
|
|
1748
|
-
function
|
|
1748
|
+
function er({ repr: e, onChange: t }) {
|
|
1749
1749
|
let n = E(), r = T(), i = e != null, a = e ?? [];
|
|
1750
1750
|
return /* @__PURE__ */ H("div", {
|
|
1751
1751
|
className: "space-y-3",
|
|
@@ -1831,7 +1831,7 @@ function $n({ repr: e, onChange: t }) {
|
|
|
1831
1831
|
onClick: () => {
|
|
1832
1832
|
t(a.filter((e, t) => t !== i));
|
|
1833
1833
|
},
|
|
1834
|
-
children: /* @__PURE__ */ V(
|
|
1834
|
+
children: /* @__PURE__ */ V(Rt, {})
|
|
1835
1835
|
})
|
|
1836
1836
|
})
|
|
1837
1837
|
]
|
|
@@ -1852,11 +1852,11 @@ function $n({ repr: e, onChange: t }) {
|
|
|
1852
1852
|
});
|
|
1853
1853
|
}
|
|
1854
1854
|
// src/workspace/parameters/value/type/fields.tsx
|
|
1855
|
-
function
|
|
1855
|
+
function tr({ valueType: e, onChange: t }) {
|
|
1856
1856
|
let n = E(), r = T();
|
|
1857
1857
|
switch (e.name) {
|
|
1858
1858
|
case "str": return /* @__PURE__ */ H(B, { children: [
|
|
1859
|
-
/* @__PURE__ */ V(
|
|
1859
|
+
/* @__PURE__ */ V(Wn, {
|
|
1860
1860
|
value: e.fromBytes,
|
|
1861
1861
|
onChange: (n) => {
|
|
1862
1862
|
t({
|
|
@@ -1869,7 +1869,7 @@ function er({ valueType: e, onChange: t }) {
|
|
|
1869
1869
|
className: "w-full max-w-xs",
|
|
1870
1870
|
value: e.encoding,
|
|
1871
1871
|
onChange: (n) => {
|
|
1872
|
-
for (let r of
|
|
1872
|
+
for (let r of bn) if (r === n.target.value) {
|
|
1873
1873
|
t({
|
|
1874
1874
|
...e,
|
|
1875
1875
|
encoding: r
|
|
@@ -1877,7 +1877,7 @@ function er({ valueType: e, onChange: t }) {
|
|
|
1877
1877
|
return;
|
|
1878
1878
|
}
|
|
1879
1879
|
},
|
|
1880
|
-
children:
|
|
1880
|
+
children: bn.map((e) => /* @__PURE__ */ V(P, {
|
|
1881
1881
|
value: e,
|
|
1882
1882
|
children: ce(e)
|
|
1883
1883
|
}, e))
|
|
@@ -1929,7 +1929,7 @@ function er({ valueType: e, onChange: t }) {
|
|
|
1929
1929
|
}
|
|
1930
1930
|
})]
|
|
1931
1931
|
}),
|
|
1932
|
-
/* @__PURE__ */ V(
|
|
1932
|
+
/* @__PURE__ */ V(Kn, {
|
|
1933
1933
|
values: e.writeValidation.allowedValues,
|
|
1934
1934
|
digitOnly: !1,
|
|
1935
1935
|
onChange: (n) => {
|
|
@@ -1944,7 +1944,7 @@ function er({ valueType: e, onChange: t }) {
|
|
|
1944
1944
|
})
|
|
1945
1945
|
] });
|
|
1946
1946
|
case "num": return /* @__PURE__ */ H(B, { children: [
|
|
1947
|
-
/* @__PURE__ */ V(
|
|
1947
|
+
/* @__PURE__ */ V(Wn, {
|
|
1948
1948
|
value: e.composition.fromBytes,
|
|
1949
1949
|
onChange: (n) => {
|
|
1950
1950
|
t({
|
|
@@ -1986,7 +1986,7 @@ function er({ valueType: e, onChange: t }) {
|
|
|
1986
1986
|
className: "w-full",
|
|
1987
1987
|
value: e.composition.packing,
|
|
1988
1988
|
onChange: (n) => {
|
|
1989
|
-
for (let r of
|
|
1989
|
+
for (let r of _n) if (r === n.target.value) {
|
|
1990
1990
|
t({
|
|
1991
1991
|
...e,
|
|
1992
1992
|
composition: {
|
|
@@ -1997,7 +1997,7 @@ function er({ valueType: e, onChange: t }) {
|
|
|
1997
1997
|
return;
|
|
1998
1998
|
}
|
|
1999
1999
|
},
|
|
2000
|
-
children:
|
|
2000
|
+
children: _n.map((e) => /* @__PURE__ */ V(P, {
|
|
2001
2001
|
value: e,
|
|
2002
2002
|
children: Be(e)
|
|
2003
2003
|
}, e))
|
|
@@ -2010,7 +2010,7 @@ function er({ valueType: e, onChange: t }) {
|
|
|
2010
2010
|
type: "number",
|
|
2011
2011
|
value: String(e.multiplier),
|
|
2012
2012
|
onChange: (n) => {
|
|
2013
|
-
let r =
|
|
2013
|
+
let r = Sn(n.target.value);
|
|
2014
2014
|
r != null && t({
|
|
2015
2015
|
...e,
|
|
2016
2016
|
multiplier: r
|
|
@@ -2038,7 +2038,7 @@ function er({ valueType: e, onChange: t }) {
|
|
|
2038
2038
|
type: "number",
|
|
2039
2039
|
value: String(e.shift),
|
|
2040
2040
|
onChange: (n) => {
|
|
2041
|
-
let r =
|
|
2041
|
+
let r = Sn(n.target.value);
|
|
2042
2042
|
r != null && t({
|
|
2043
2043
|
...e,
|
|
2044
2044
|
shift: r
|
|
@@ -2075,7 +2075,7 @@ function er({ valueType: e, onChange: t }) {
|
|
|
2075
2075
|
})
|
|
2076
2076
|
]
|
|
2077
2077
|
}),
|
|
2078
|
-
/* @__PURE__ */ V(
|
|
2078
|
+
/* @__PURE__ */ V(Gn, {
|
|
2079
2079
|
transform: e.transform,
|
|
2080
2080
|
onChange: (n) => {
|
|
2081
2081
|
t({
|
|
@@ -2143,10 +2143,10 @@ function er({ valueType: e, onChange: t }) {
|
|
|
2143
2143
|
let r = n.target.value;
|
|
2144
2144
|
r === "bytes" ? t({
|
|
2145
2145
|
...e,
|
|
2146
|
-
composition:
|
|
2146
|
+
composition: Gt()
|
|
2147
2147
|
}) : r === "bits" && t({
|
|
2148
2148
|
...e,
|
|
2149
|
-
composition:
|
|
2149
|
+
composition: Wt()
|
|
2150
2150
|
});
|
|
2151
2151
|
},
|
|
2152
2152
|
children: [/* @__PURE__ */ V(P, {
|
|
@@ -2157,7 +2157,7 @@ function er({ valueType: e, onChange: t }) {
|
|
|
2157
2157
|
children: n("parameter_field_int_from_bits")
|
|
2158
2158
|
})]
|
|
2159
2159
|
})] }),
|
|
2160
|
-
"fromBytes" in e.composition ? /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(
|
|
2160
|
+
"fromBytes" in e.composition ? /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(Wn, {
|
|
2161
2161
|
value: e.composition.fromBytes,
|
|
2162
2162
|
onChange: (n) => {
|
|
2163
2163
|
"fromBytes" in e.composition && t({
|
|
@@ -2189,7 +2189,7 @@ function er({ valueType: e, onChange: t }) {
|
|
|
2189
2189
|
value: e.composition.packing,
|
|
2190
2190
|
onChange: (n) => {
|
|
2191
2191
|
if ("fromBytes" in e.composition) {
|
|
2192
|
-
for (let r of
|
|
2192
|
+
for (let r of vn) if (r === n.target.value) {
|
|
2193
2193
|
t({
|
|
2194
2194
|
...e,
|
|
2195
2195
|
composition: {
|
|
@@ -2201,7 +2201,7 @@ function er({ valueType: e, onChange: t }) {
|
|
|
2201
2201
|
}
|
|
2202
2202
|
}
|
|
2203
2203
|
},
|
|
2204
|
-
children:
|
|
2204
|
+
children: vn.map((e) => /* @__PURE__ */ V(P, {
|
|
2205
2205
|
value: e,
|
|
2206
2206
|
children: Be(e)
|
|
2207
2207
|
}, e))
|
|
@@ -2255,7 +2255,7 @@ function er({ valueType: e, onChange: t }) {
|
|
|
2255
2255
|
type: "number",
|
|
2256
2256
|
value: String(e.multiplier),
|
|
2257
2257
|
onChange: (n) => {
|
|
2258
|
-
let r =
|
|
2258
|
+
let r = Sn(n.target.value);
|
|
2259
2259
|
r != null && t({
|
|
2260
2260
|
...e,
|
|
2261
2261
|
multiplier: r
|
|
@@ -2305,7 +2305,7 @@ function er({ valueType: e, onChange: t }) {
|
|
|
2305
2305
|
})
|
|
2306
2306
|
]
|
|
2307
2307
|
}),
|
|
2308
|
-
/* @__PURE__ */ V(
|
|
2308
|
+
/* @__PURE__ */ V(Gn, {
|
|
2309
2309
|
transform: e.transform,
|
|
2310
2310
|
onChange: (n) => {
|
|
2311
2311
|
t({
|
|
@@ -2314,7 +2314,7 @@ function er({ valueType: e, onChange: t }) {
|
|
|
2314
2314
|
});
|
|
2315
2315
|
}
|
|
2316
2316
|
}),
|
|
2317
|
-
/* @__PURE__ */ V(
|
|
2317
|
+
/* @__PURE__ */ V(er, {
|
|
2318
2318
|
repr: e.repr,
|
|
2319
2319
|
onChange: (n) => {
|
|
2320
2320
|
t({
|
|
@@ -2385,7 +2385,7 @@ function er({ valueType: e, onChange: t }) {
|
|
|
2385
2385
|
})
|
|
2386
2386
|
] });
|
|
2387
2387
|
case "bigint": return /* @__PURE__ */ H(B, { children: [
|
|
2388
|
-
/* @__PURE__ */ V(
|
|
2388
|
+
/* @__PURE__ */ V(Wn, {
|
|
2389
2389
|
value: e.byteRelation,
|
|
2390
2390
|
onChange: (n) => {
|
|
2391
2391
|
t({
|
|
@@ -2463,7 +2463,7 @@ function er({ valueType: e, onChange: t }) {
|
|
|
2463
2463
|
})] })
|
|
2464
2464
|
]
|
|
2465
2465
|
}),
|
|
2466
|
-
/* @__PURE__ */ V(
|
|
2466
|
+
/* @__PURE__ */ V(Gn, {
|
|
2467
2467
|
transform: e.transform,
|
|
2468
2468
|
onChange: (n) => {
|
|
2469
2469
|
t({
|
|
@@ -2472,7 +2472,7 @@ function er({ valueType: e, onChange: t }) {
|
|
|
2472
2472
|
});
|
|
2473
2473
|
}
|
|
2474
2474
|
}),
|
|
2475
|
-
/* @__PURE__ */ V(
|
|
2475
|
+
/* @__PURE__ */ V(Kn, {
|
|
2476
2476
|
values: e.writeValidation.allowedValues,
|
|
2477
2477
|
digitOnly: !0,
|
|
2478
2478
|
onChange: (n) => {
|
|
@@ -2491,20 +2491,20 @@ function er({ valueType: e, onChange: t }) {
|
|
|
2491
2491
|
className: "w-full max-w-xs",
|
|
2492
2492
|
value: e.composition.kind,
|
|
2493
2493
|
onChange: (n) => {
|
|
2494
|
-
for (let r of
|
|
2494
|
+
for (let r of gn) if (r === n.target.value) {
|
|
2495
2495
|
t({
|
|
2496
2496
|
...e,
|
|
2497
|
-
composition:
|
|
2497
|
+
composition: On(r)
|
|
2498
2498
|
});
|
|
2499
2499
|
return;
|
|
2500
2500
|
}
|
|
2501
2501
|
},
|
|
2502
|
-
children:
|
|
2502
|
+
children: gn.map((e) => /* @__PURE__ */ V(P, {
|
|
2503
2503
|
value: e,
|
|
2504
2504
|
children: we(e)
|
|
2505
2505
|
}, e))
|
|
2506
2506
|
})] }),
|
|
2507
|
-
e.composition.kind === "datetime" ? /* @__PURE__ */ V(
|
|
2507
|
+
e.composition.kind === "datetime" ? /* @__PURE__ */ V(Xn, {
|
|
2508
2508
|
composition: e.composition,
|
|
2509
2509
|
onChange: (n) => {
|
|
2510
2510
|
t({
|
|
@@ -2550,7 +2550,7 @@ function er({ valueType: e, onChange: t }) {
|
|
|
2550
2550
|
]
|
|
2551
2551
|
})
|
|
2552
2552
|
] });
|
|
2553
|
-
case "ipaddr": return /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(
|
|
2553
|
+
case "ipaddr": return /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(Wn, {
|
|
2554
2554
|
value: e.byteRelation,
|
|
2555
2555
|
onChange: (n) => {
|
|
2556
2556
|
t({
|
|
@@ -2576,7 +2576,7 @@ function er({ valueType: e, onChange: t }) {
|
|
|
2576
2576
|
children: he("ipv6")
|
|
2577
2577
|
})]
|
|
2578
2578
|
})] })] });
|
|
2579
|
-
case "macaddr": return /* @__PURE__ */ V(
|
|
2579
|
+
case "macaddr": return /* @__PURE__ */ V(Wn, {
|
|
2580
2580
|
value: e.byteRelation,
|
|
2581
2581
|
onChange: (n) => {
|
|
2582
2582
|
t({
|
|
@@ -2585,21 +2585,21 @@ function er({ valueType: e, onChange: t }) {
|
|
|
2585
2585
|
});
|
|
2586
2586
|
}
|
|
2587
2587
|
});
|
|
2588
|
-
case "geo": return /* @__PURE__ */ V(
|
|
2588
|
+
case "geo": return /* @__PURE__ */ V($n, {
|
|
2589
2589
|
valueType: e,
|
|
2590
2590
|
onChange: t,
|
|
2591
2591
|
onEncodingChange: (e) => {
|
|
2592
|
-
t(
|
|
2592
|
+
t(Ut(e));
|
|
2593
2593
|
}
|
|
2594
2594
|
});
|
|
2595
2595
|
}
|
|
2596
2596
|
}
|
|
2597
2597
|
// src/workspace/setup/parameters/edit/create-branch-form.tsx
|
|
2598
|
-
function
|
|
2598
|
+
function nr({ workspaceId: e, branchOptions: t, onCancel: n, onCreated: r }) {
|
|
2599
2599
|
let i = E(), [a, o] = z(""), c = Ue(e).createBranch, l = u({
|
|
2600
2600
|
defaultValues: { name: "" },
|
|
2601
2601
|
validators: He({
|
|
2602
|
-
schema:
|
|
2602
|
+
schema: Jt,
|
|
2603
2603
|
submit: async (t) => {
|
|
2604
2604
|
let n = t.name.trim(), i = await c.mutateAsync(a.length > 0 ? {
|
|
2605
2605
|
parentId: a,
|
|
@@ -2613,7 +2613,7 @@ function tr({ workspaceId: e, branchOptions: t, onCancel: n, onCreated: r }) {
|
|
|
2613
2613
|
r(i.id);
|
|
2614
2614
|
}), null;
|
|
2615
2615
|
},
|
|
2616
|
-
mapError: (e, t) => s(e, t, { codeFields:
|
|
2616
|
+
mapError: (e, t) => s(e, t, { codeFields: wt })
|
|
2617
2617
|
}),
|
|
2618
2618
|
onSubmitInvalid: m,
|
|
2619
2619
|
onSubmit: () => {}
|
|
@@ -2665,11 +2665,11 @@ function tr({ workspaceId: e, branchOptions: t, onCancel: n, onCreated: r }) {
|
|
|
2665
2665
|
}) });
|
|
2666
2666
|
}
|
|
2667
2667
|
// src/workspace/setup/parameters/edit/form.tsx
|
|
2668
|
-
function
|
|
2668
|
+
function rr() {
|
|
2669
2669
|
return (/* @__PURE__ */ new Date()).toISOString();
|
|
2670
2670
|
}
|
|
2671
|
-
function
|
|
2672
|
-
let d = E(), f = We(), p = Ue(e), g = C.deviceLog.backfill.useMutation(), { parameter: _, branches: ee, parameters: v, endpoints: y } = o, b = St(_?.revision), [x, te] = z(!1), [ne, re] = z(() => _?.source.kind === "modbus-tcp" ?
|
|
2671
|
+
function ir({ workspaceId: e, parameterId: t, initialBranchId: r, recorded: a, data: o, onClose: c, onReload: l }) {
|
|
2672
|
+
let d = E(), f = We(), p = Ue(e), g = C.deviceLog.backfill.useMutation(), { parameter: _, branches: ee, parameters: v, endpoints: y } = o, b = St(_?.revision), [x, te] = z(!1), [ne, re] = z(() => _?.source.kind === "modbus-tcp" ? qt(_.source.addresses) : qt([a?.address ?? 0])), ie = T(), oe = Mt(() => xn(ee, ie), [ee, ie]), se = y[0]?.id ?? null, ce = Mt(() => v.filter((e) => e.id !== t), [v, t]);
|
|
2673
2673
|
async function le(e) {
|
|
2674
2674
|
try {
|
|
2675
2675
|
await g.mutateAsync({ parameterId: e }), f.success(d("parameter_recorded_backfill_toast"));
|
|
@@ -2679,19 +2679,19 @@ function rr({ workspaceId: e, parameterId: t, initialBranchId: r, recorded: a, d
|
|
|
2679
2679
|
}
|
|
2680
2680
|
let S = u({
|
|
2681
2681
|
defaultValues: _ == null ? {
|
|
2682
|
-
...
|
|
2683
|
-
...a == null ? {} : { source:
|
|
2684
|
-
} :
|
|
2682
|
+
...kn(ee, y, r),
|
|
2683
|
+
...a == null ? {} : { source: Pn(a) }
|
|
2684
|
+
} : Zt(_, ie),
|
|
2685
2685
|
validators: He({
|
|
2686
|
-
schema:
|
|
2686
|
+
schema: Yt,
|
|
2687
2687
|
submit: async (e) => {
|
|
2688
|
-
let n =
|
|
2688
|
+
let n = Xt(e, {
|
|
2689
2689
|
addressesText: ne,
|
|
2690
2690
|
endpoints: y,
|
|
2691
2691
|
previousDisabledSince: _?.disabledSince ?? null,
|
|
2692
|
-
nowIso:
|
|
2692
|
+
nowIso: rr()
|
|
2693
2693
|
});
|
|
2694
|
-
if (!n.ok) return i(n,
|
|
2694
|
+
if (!n.ok) return i(n, wn);
|
|
2695
2695
|
if (t != null) await p.update.mutateAsync({
|
|
2696
2696
|
...n.input,
|
|
2697
2697
|
id: t,
|
|
@@ -2704,8 +2704,10 @@ function rr({ workspaceId: e, parameterId: t, initialBranchId: r, recorded: a, d
|
|
|
2704
2704
|
return null;
|
|
2705
2705
|
},
|
|
2706
2706
|
mapError: b.mapError((e, t) => {
|
|
2707
|
-
let n =
|
|
2708
|
-
|
|
2707
|
+
let n = Et(e);
|
|
2708
|
+
if (n != null) return { fields: { source: n } };
|
|
2709
|
+
let r = Tt(e);
|
|
2710
|
+
return r == null ? s(e, t, { codeFields: wt }) : { fields: { valueType: r } };
|
|
2709
2711
|
}),
|
|
2710
2712
|
onError: b.onError
|
|
2711
2713
|
}),
|
|
@@ -2749,7 +2751,7 @@ function rr({ workspaceId: e, parameterId: t, initialBranchId: r, recorded: a, d
|
|
|
2749
2751
|
}),
|
|
2750
2752
|
/* @__PURE__ */ V(S.AppField, {
|
|
2751
2753
|
name: "tags",
|
|
2752
|
-
children: (e) => /* @__PURE__ */ V(
|
|
2754
|
+
children: (e) => /* @__PURE__ */ V(Hn, {
|
|
2753
2755
|
tags: e.state.value,
|
|
2754
2756
|
errors: n(e.state.meta.errors, e.name),
|
|
2755
2757
|
onChange: e.handleChange
|
|
@@ -2791,7 +2793,7 @@ function rr({ workspaceId: e, parameterId: t, initialBranchId: r, recorded: a, d
|
|
|
2791
2793
|
/* @__PURE__ */ V(S.AppField, {
|
|
2792
2794
|
name: "icon",
|
|
2793
2795
|
children: (e) => {
|
|
2794
|
-
let t = e.state.value, n = t == null || t === "" ?
|
|
2796
|
+
let t = e.state.value, n = t == null || t === "" ? mn : t;
|
|
2795
2797
|
return /* @__PURE__ */ H(N, { children: [/* @__PURE__ */ V(M, { children: d("parameter_field_icon") }), /* @__PURE__ */ H($e, {
|
|
2796
2798
|
variant: "outline",
|
|
2797
2799
|
size: "sm",
|
|
@@ -2803,7 +2805,7 @@ function rr({ workspaceId: e, parameterId: t, initialBranchId: r, recorded: a, d
|
|
|
2803
2805
|
},
|
|
2804
2806
|
className: "flex flex-wrap",
|
|
2805
2807
|
children: [/* @__PURE__ */ V(Qe, {
|
|
2806
|
-
value:
|
|
2808
|
+
value: mn,
|
|
2807
2809
|
"aria-label": d("parameter_field_icon_none"),
|
|
2808
2810
|
className: "size-8 min-w-8 p-0"
|
|
2809
2811
|
}), ae.map((e) => /* @__PURE__ */ V(Qe, {
|
|
@@ -2870,7 +2872,7 @@ function rr({ workspaceId: e, parameterId: t, initialBranchId: r, recorded: a, d
|
|
|
2870
2872
|
});
|
|
2871
2873
|
}
|
|
2872
2874
|
}),
|
|
2873
|
-
t == null ? null : /* @__PURE__ */ V(
|
|
2875
|
+
t == null ? null : /* @__PURE__ */ V(Dt, {
|
|
2874
2876
|
workspaceId: e,
|
|
2875
2877
|
target: {
|
|
2876
2878
|
kind: "parameter",
|
|
@@ -2898,8 +2900,8 @@ function rr({ workspaceId: e, parameterId: t, initialBranchId: r, recorded: a, d
|
|
|
2898
2900
|
let n = t.target.value;
|
|
2899
2901
|
if (n === "const" || n === "calc" || n === "modbus-tcp") {
|
|
2900
2902
|
if (n === "modbus-tcp" && !i) return;
|
|
2901
|
-
let t =
|
|
2902
|
-
e.handleChange(t), t.kind === "modbus-tcp" && re(
|
|
2903
|
+
let t = En(n, se);
|
|
2904
|
+
e.handleChange(t), t.kind === "modbus-tcp" && re(qt(t.addresses));
|
|
2903
2905
|
}
|
|
2904
2906
|
},
|
|
2905
2907
|
children: [
|
|
@@ -2921,16 +2923,16 @@ function rr({ workspaceId: e, parameterId: t, initialBranchId: r, recorded: a, d
|
|
|
2921
2923
|
/* @__PURE__ */ V(lt, { errors: r })
|
|
2922
2924
|
]
|
|
2923
2925
|
}),
|
|
2924
|
-
t.kind === "const" ? /* @__PURE__ */ V(
|
|
2926
|
+
t.kind === "const" ? /* @__PURE__ */ V(qn, {
|
|
2925
2927
|
source: t,
|
|
2926
2928
|
onChange: e.handleChange
|
|
2927
2929
|
}) : null,
|
|
2928
|
-
t.kind === "calc" ? /* @__PURE__ */ V(
|
|
2930
|
+
t.kind === "calc" ? /* @__PURE__ */ V(Jn, {
|
|
2929
2931
|
source: t,
|
|
2930
2932
|
paramChoices: ce,
|
|
2931
2933
|
onChange: e.handleChange
|
|
2932
2934
|
}) : null,
|
|
2933
|
-
t.kind === "modbus-tcp" ? /* @__PURE__ */ V(
|
|
2935
|
+
t.kind === "modbus-tcp" ? /* @__PURE__ */ V(Yn, {
|
|
2934
2936
|
source: t,
|
|
2935
2937
|
endpoints: y,
|
|
2936
2938
|
addressesText: ne,
|
|
@@ -2957,19 +2959,19 @@ function rr({ workspaceId: e, parameterId: t, initialBranchId: r, recorded: a, d
|
|
|
2957
2959
|
value: t.name,
|
|
2958
2960
|
onChange: (t) => {
|
|
2959
2961
|
let n = t.target.value;
|
|
2960
|
-
for (let t of
|
|
2961
|
-
e.handleChange(
|
|
2962
|
+
for (let t of hn) if (t === n) {
|
|
2963
|
+
e.handleChange(Kt(t));
|
|
2962
2964
|
return;
|
|
2963
2965
|
}
|
|
2964
2966
|
},
|
|
2965
|
-
children:
|
|
2967
|
+
children: hn.map((e) => /* @__PURE__ */ V(P, {
|
|
2966
2968
|
value: e,
|
|
2967
2969
|
children: h(e)
|
|
2968
2970
|
}, e))
|
|
2969
2971
|
}),
|
|
2970
2972
|
/* @__PURE__ */ V(lt, { errors: r })
|
|
2971
2973
|
]
|
|
2972
|
-
}), /* @__PURE__ */ V(
|
|
2974
|
+
}), /* @__PURE__ */ V(tr, {
|
|
2973
2975
|
valueType: t,
|
|
2974
2976
|
onChange: e.handleChange
|
|
2975
2977
|
})] });
|
|
@@ -2998,7 +3000,7 @@ function rr({ workspaceId: e, parameterId: t, initialBranchId: r, recorded: a, d
|
|
|
2998
3000
|
}), /* @__PURE__ */ V(Xe, {
|
|
2999
3001
|
open: x,
|
|
3000
3002
|
onOpenChange: te,
|
|
3001
|
-
children: /* @__PURE__ */ V(Ke, { children: x ? /* @__PURE__ */ V(
|
|
3003
|
+
children: /* @__PURE__ */ V(Ke, { children: x ? /* @__PURE__ */ V(nr, {
|
|
3002
3004
|
workspaceId: e,
|
|
3003
3005
|
branchOptions: oe,
|
|
3004
3006
|
onCancel: () => {
|
|
@@ -3011,7 +3013,7 @@ function rr({ workspaceId: e, parameterId: t, initialBranchId: r, recorded: a, d
|
|
|
3011
3013
|
})] });
|
|
3012
3014
|
}
|
|
3013
3015
|
// src/workspace/setup/parameters/edit/dialog-body.tsx
|
|
3014
|
-
function
|
|
3016
|
+
function ar({ workspaceId: e, parameterId: t, initialBranchId: n, recorded: i, onClose: a }) {
|
|
3015
3017
|
let o = E(), s = t != null, [c, l] = z(0), u = C.parameter.listTree.useQuery({ workspaceId: e }), d = C.useUtils(), f = C.endpoint.list.useQuery({ workspaceId: e }), p = C.parameter.get.useQuery({ id: t ?? "" }, { enabled: s }), m = u.data, h = f.data?.endpoints, g = p.data, _ = {
|
|
3016
3018
|
isLoading: u.isLoading || f.isLoading || s && p.isLoading,
|
|
3017
3019
|
isError: u.isError || f.isError || s && p.isError,
|
|
@@ -3055,7 +3057,7 @@ function ir({ workspaceId: e, parameterId: t, initialBranchId: n, recorded: i, o
|
|
|
3055
3057
|
children: o("parameter_create_needs_branch_action")
|
|
3056
3058
|
}) })]
|
|
3057
3059
|
}),
|
|
3058
|
-
children: (o) => /* @__PURE__ */ V(r, { children: /* @__PURE__ */ V(
|
|
3060
|
+
children: (o) => /* @__PURE__ */ V(r, { children: /* @__PURE__ */ V(ir, {
|
|
3059
3061
|
workspaceId: e,
|
|
3060
3062
|
parameterId: t,
|
|
3061
3063
|
initialBranchId: n,
|
|
@@ -3070,11 +3072,11 @@ function ir({ workspaceId: e, parameterId: t, initialBranchId: n, recorded: i, o
|
|
|
3070
3072
|
});
|
|
3071
3073
|
}
|
|
3072
3074
|
// src/workspace/setup/report/add-parameters-dialog.tsx
|
|
3073
|
-
function
|
|
3074
|
-
let a = E(), o = T(), s =
|
|
3075
|
+
function or({ workspaceId: e, existingIds: t, existingColors: n, onCancel: r, onConfirm: i }) {
|
|
3076
|
+
let a = E(), o = T(), s = Nt(t), c = kt((e) => !s.current.has(e.id) && nn(e.valueType.name) != null, []), { index: l, loading: u, parameters: d } = ye(e, {
|
|
3075
3077
|
include: c,
|
|
3076
3078
|
includeDisabled: !0
|
|
3077
|
-
}), [f, p] = z(() => /* @__PURE__ */ new Set()), m =
|
|
3079
|
+
}), [f, p] = z(() => /* @__PURE__ */ new Set()), m = Mt(() => new Map(d?.map((e) => [e.id, e])), [d]);
|
|
3078
3080
|
return /* @__PURE__ */ H(B, { children: [
|
|
3079
3081
|
/* @__PURE__ */ V(Ze, { children: /* @__PURE__ */ V(Je, { children: a("report_add_parameters") }) }),
|
|
3080
3082
|
/* @__PURE__ */ V(oe, {
|
|
@@ -3141,7 +3143,7 @@ function J({ title: e, subtitle: t }) {
|
|
|
3141
3143
|
}) : null]
|
|
3142
3144
|
});
|
|
3143
3145
|
}
|
|
3144
|
-
function
|
|
3146
|
+
function sr({ type: e, representationKey: t }) {
|
|
3145
3147
|
let n = E(), r = {
|
|
3146
3148
|
chart: n("report_view_chart"),
|
|
3147
3149
|
table: n("report_view_table"),
|
|
@@ -3163,7 +3165,7 @@ function or({ type: e, representationKey: t }) {
|
|
|
3163
3165
|
})]
|
|
3164
3166
|
});
|
|
3165
3167
|
}
|
|
3166
|
-
function
|
|
3168
|
+
function cr({ label: e, onClick: t, disabled: n, variant: r = "outline", children: i }) {
|
|
3167
3169
|
return /* @__PURE__ */ V(O, {
|
|
3168
3170
|
type: "button",
|
|
3169
3171
|
variant: r,
|
|
@@ -3175,27 +3177,27 @@ function sr({ label: e, onClick: t, disabled: n, variant: r = "outline", childre
|
|
|
3175
3177
|
});
|
|
3176
3178
|
}
|
|
3177
3179
|
function Y({ label: e, onClick: t }) {
|
|
3178
|
-
return /* @__PURE__ */ V(
|
|
3180
|
+
return /* @__PURE__ */ V(cr, {
|
|
3179
3181
|
label: e,
|
|
3180
3182
|
variant: "destructive",
|
|
3181
3183
|
onClick: t,
|
|
3182
|
-
children: /* @__PURE__ */ V(
|
|
3184
|
+
children: /* @__PURE__ */ V(Rt, {})
|
|
3183
3185
|
});
|
|
3184
3186
|
}
|
|
3185
3187
|
function X({ canMoveUp: e, canMoveDown: t, onMoveUp: n, onMoveDown: r, moveUpLabel: i, moveDownLabel: a }) {
|
|
3186
|
-
return /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(
|
|
3188
|
+
return /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(cr, {
|
|
3187
3189
|
label: i,
|
|
3188
3190
|
disabled: !e,
|
|
3189
3191
|
onClick: n,
|
|
3190
|
-
children: /* @__PURE__ */ V(
|
|
3191
|
-
}), /* @__PURE__ */ V(
|
|
3192
|
+
children: /* @__PURE__ */ V(Ft, {})
|
|
3193
|
+
}), /* @__PURE__ */ V(cr, {
|
|
3192
3194
|
label: a,
|
|
3193
3195
|
disabled: !t,
|
|
3194
3196
|
onClick: r,
|
|
3195
|
-
children: /* @__PURE__ */ V(
|
|
3197
|
+
children: /* @__PURE__ */ V(Pt, {})
|
|
3196
3198
|
})] });
|
|
3197
3199
|
}
|
|
3198
|
-
function
|
|
3200
|
+
function lr({ title: e, actions: t, toggle: n }) {
|
|
3199
3201
|
return /* @__PURE__ */ H("div", {
|
|
3200
3202
|
className: "flex items-center gap-1 p-2",
|
|
3201
3203
|
children: [
|
|
@@ -3211,18 +3213,18 @@ function cr({ title: e, actions: t, toggle: n }) {
|
|
|
3211
3213
|
]
|
|
3212
3214
|
});
|
|
3213
3215
|
}
|
|
3214
|
-
function
|
|
3216
|
+
function ur({ title: e, actions: t, className: n, children: r }) {
|
|
3215
3217
|
return /* @__PURE__ */ H("div", {
|
|
3216
3218
|
className: Ye("rounded-md border", n),
|
|
3217
|
-
children: [/* @__PURE__ */ V(
|
|
3219
|
+
children: [/* @__PURE__ */ V(lr, {
|
|
3218
3220
|
title: e,
|
|
3219
3221
|
actions: t
|
|
3220
3222
|
}), r]
|
|
3221
3223
|
});
|
|
3222
3224
|
}
|
|
3223
3225
|
function Z({ defaultOpen: e = !1, title: t, actions: n, className: r, contentClassName: i, children: a }) {
|
|
3224
|
-
let o = E(), [s, c] = z(e), l =
|
|
3225
|
-
return
|
|
3226
|
+
let o = E(), [s, c] = z(e), l = Nt(null);
|
|
3227
|
+
return At(() => {
|
|
3226
3228
|
let e = l.current;
|
|
3227
3229
|
if (e == null) return;
|
|
3228
3230
|
let t = () => {
|
|
@@ -3238,14 +3240,14 @@ function Z({ defaultOpen: e = !1, title: t, actions: n, className: r, contentCla
|
|
|
3238
3240
|
children: /* @__PURE__ */ H(pt, {
|
|
3239
3241
|
open: s,
|
|
3240
3242
|
onOpenChange: c,
|
|
3241
|
-
children: [/* @__PURE__ */ V(
|
|
3243
|
+
children: [/* @__PURE__ */ V(lr, {
|
|
3242
3244
|
title: t,
|
|
3243
3245
|
actions: n,
|
|
3244
3246
|
toggle: /* @__PURE__ */ H(ft, {
|
|
3245
3247
|
type: "button",
|
|
3246
3248
|
"aria-label": o(s ? "report_editor_collapse" : "report_editor_expand"),
|
|
3247
3249
|
className: "\n flex min-w-0 flex-1 cursor-pointer items-center gap-2 rounded-md border-0\n bg-transparent p-0 text-left font-normal outline-none\n hover:bg-transparent\n focus-visible:ring-3 focus-visible:ring-ring/50\n ",
|
|
3248
|
-
children: [V(s ?
|
|
3250
|
+
children: [V(s ? It : Lt, { className: "size-3.5 shrink-0" }), /* @__PURE__ */ V("div", {
|
|
3249
3251
|
className: "min-w-0 flex-1",
|
|
3250
3252
|
children: t
|
|
3251
3253
|
})]
|
|
@@ -3264,13 +3266,13 @@ function Q(e, t) {
|
|
|
3264
3266
|
return !1;
|
|
3265
3267
|
}
|
|
3266
3268
|
// src/workspace/setup/report/layout-editor.tsx
|
|
3267
|
-
var
|
|
3269
|
+
var dr = [
|
|
3268
3270
|
"full",
|
|
3269
3271
|
"1/2",
|
|
3270
3272
|
"1/3",
|
|
3271
3273
|
"1/4"
|
|
3272
3274
|
];
|
|
3273
|
-
function
|
|
3275
|
+
function fr(e) {
|
|
3274
3276
|
switch (e) {
|
|
3275
3277
|
case "full": return w("report_layout_column_full");
|
|
3276
3278
|
case "1/2": return w("report_layout_column_half");
|
|
@@ -3278,17 +3280,17 @@ function dr(e) {
|
|
|
3278
3280
|
case "1/4": return w("report_layout_column_quarter");
|
|
3279
3281
|
}
|
|
3280
3282
|
}
|
|
3281
|
-
function
|
|
3283
|
+
function pr(e) {
|
|
3282
3284
|
return e[0] ?? null;
|
|
3283
3285
|
}
|
|
3284
|
-
function
|
|
3285
|
-
let t =
|
|
3286
|
+
function mr(e) {
|
|
3287
|
+
let t = pr(e);
|
|
3286
3288
|
return t == null ? null : {
|
|
3287
3289
|
representation: t,
|
|
3288
3290
|
column: "full"
|
|
3289
3291
|
};
|
|
3290
3292
|
}
|
|
3291
|
-
function
|
|
3293
|
+
function hr({ layout: e, representations: t, onChange: n }) {
|
|
3292
3294
|
let r = E(), i = Object.keys(t).sort(), a = q(), o = (e) => {
|
|
3293
3295
|
n({
|
|
3294
3296
|
type: "simple",
|
|
@@ -3401,14 +3403,14 @@ function mr({ layout: e, representations: t, onChange: n }) {
|
|
|
3401
3403
|
className: "w-full",
|
|
3402
3404
|
onChange: (t) => {
|
|
3403
3405
|
let n = t.target.value;
|
|
3404
|
-
Q(
|
|
3406
|
+
Q(dr, n) && s(d, a, {
|
|
3405
3407
|
...e,
|
|
3406
3408
|
column: n
|
|
3407
3409
|
});
|
|
3408
3410
|
},
|
|
3409
|
-
children:
|
|
3411
|
+
children: dr.map((e) => /* @__PURE__ */ V(P, {
|
|
3410
3412
|
value: e,
|
|
3411
|
-
children:
|
|
3413
|
+
children: fr(e)
|
|
3412
3414
|
}, e))
|
|
3413
3415
|
})]
|
|
3414
3416
|
}),
|
|
@@ -3441,7 +3443,7 @@ function mr({ layout: e, representations: t, onChange: n }) {
|
|
|
3441
3443
|
size: "sm",
|
|
3442
3444
|
disabled: i.length === 0,
|
|
3443
3445
|
onClick: () => {
|
|
3444
|
-
let t =
|
|
3446
|
+
let t = mr(i);
|
|
3445
3447
|
if (t == null) return;
|
|
3446
3448
|
let n = e.rows.map((e, n) => n === d ? [...e, t] : e);
|
|
3447
3449
|
o(n);
|
|
@@ -3456,7 +3458,7 @@ function mr({ layout: e, representations: t, onChange: n }) {
|
|
|
3456
3458
|
size: "sm",
|
|
3457
3459
|
disabled: i.length === 0,
|
|
3458
3460
|
onClick: () => {
|
|
3459
|
-
let t =
|
|
3461
|
+
let t = mr(i);
|
|
3460
3462
|
t != null && (a.markAdded([String(e.rows.length)]), o([...e.rows, [t]]));
|
|
3461
3463
|
},
|
|
3462
3464
|
children: [/* @__PURE__ */ V(U, { "data-icon": "inline-start" }), r("report_layout_row_add")]
|
|
@@ -3465,7 +3467,7 @@ function mr({ layout: e, representations: t, onChange: n }) {
|
|
|
3465
3467
|
});
|
|
3466
3468
|
}
|
|
3467
3469
|
// src/workspace/setup/report/edit/confirm-removal-dialog.tsx
|
|
3468
|
-
function
|
|
3470
|
+
function gr({ open: e, title: t, description: n, confirmLabel: r, onConfirm: i, onCancel: a }) {
|
|
3469
3471
|
let o = E();
|
|
3470
3472
|
return /* @__PURE__ */ V(ct, {
|
|
3471
3473
|
open: e,
|
|
@@ -3481,8 +3483,8 @@ function hr({ open: e, title: t, description: n, confirmLabel: r, onConfirm: i,
|
|
|
3481
3483
|
});
|
|
3482
3484
|
}
|
|
3483
3485
|
// src/workspace/setup/report/number-draft-input.tsx
|
|
3484
|
-
function
|
|
3485
|
-
let t = e.integer ? G(e.draft) :
|
|
3486
|
+
function _r(e) {
|
|
3487
|
+
let t = e.integer ? G(e.draft) : Sn(e.draft);
|
|
3486
3488
|
return t == null ? e.nullable && e.draft.trim().length === 0 ? {
|
|
3487
3489
|
kind: "commit",
|
|
3488
3490
|
value: null
|
|
@@ -3502,7 +3504,7 @@ function gr(e) {
|
|
|
3502
3504
|
}
|
|
3503
3505
|
function $({ id: e, value: t, onCommit: n, integer: r = !1, min: i, max: a, nullable: o = !1 }) {
|
|
3504
3506
|
T();
|
|
3505
|
-
let [s, c] = z(null), [l, u] = z(!1), d =
|
|
3507
|
+
let [s, c] = z(null), [l, u] = z(!1), d = jt(), f = s ?? (t == null ? "" : String(t)), p = _r({
|
|
3506
3508
|
draft: f,
|
|
3507
3509
|
integer: r,
|
|
3508
3510
|
min: i,
|
|
@@ -3528,7 +3530,7 @@ function $({ id: e, value: t, onCommit: n, integer: r = !1, min: i, max: a, null
|
|
|
3528
3530
|
e.currentTarget.setCustomValidity(m), u(!0), p.kind !== "invalid" && (n(p.value), c(null));
|
|
3529
3531
|
},
|
|
3530
3532
|
onChange: (e) => {
|
|
3531
|
-
let t = e.target.value, n =
|
|
3533
|
+
let t = e.target.value, n = _r({
|
|
3532
3534
|
draft: t,
|
|
3533
3535
|
integer: r,
|
|
3534
3536
|
min: i,
|
|
@@ -3544,12 +3546,12 @@ function $({ id: e, value: t, onCommit: n, integer: r = !1, min: i, max: a, null
|
|
|
3544
3546
|
});
|
|
3545
3547
|
}
|
|
3546
3548
|
// src/workspace/setup/report/calendar-editor.tsx
|
|
3547
|
-
var
|
|
3549
|
+
var vr = [
|
|
3548
3550
|
"month-days",
|
|
3549
3551
|
"week-days",
|
|
3550
3552
|
"week-hours",
|
|
3551
3553
|
"year-days"
|
|
3552
|
-
],
|
|
3554
|
+
], yr = [
|
|
3553
3555
|
"first",
|
|
3554
3556
|
"latest",
|
|
3555
3557
|
"average",
|
|
@@ -3558,7 +3560,7 @@ var _r = [
|
|
|
3558
3560
|
"min",
|
|
3559
3561
|
"max"
|
|
3560
3562
|
];
|
|
3561
|
-
function
|
|
3563
|
+
function br(e) {
|
|
3562
3564
|
switch (e) {
|
|
3563
3565
|
case "month-days": return w("report_calendar_show_as_month_days");
|
|
3564
3566
|
case "week-days": return w("report_calendar_show_as_week_days");
|
|
@@ -3566,7 +3568,7 @@ function yr(e) {
|
|
|
3566
3568
|
case "year-days": return w("report_calendar_show_as_year_days");
|
|
3567
3569
|
}
|
|
3568
3570
|
}
|
|
3569
|
-
function
|
|
3571
|
+
function xr(e) {
|
|
3570
3572
|
switch (e) {
|
|
3571
3573
|
case "first": return w("report_table_per_cadence_first");
|
|
3572
3574
|
case "latest": return w("report_table_per_cadence_latest");
|
|
@@ -3577,7 +3579,7 @@ function br(e) {
|
|
|
3577
3579
|
case "max": return w("report_table_totals_max");
|
|
3578
3580
|
}
|
|
3579
3581
|
}
|
|
3580
|
-
function
|
|
3582
|
+
function Sr({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1, onChange: i, onRemove: a }) {
|
|
3581
3583
|
let o = E(), s = n.filter((e) => e.type === "numeric"), c = n.filter((e) => e.type === "numeric" || e.type === "integer"), l = new Map(n.map((e) => [e.parameterId, e.label])), u = (e) => {
|
|
3582
3584
|
i({
|
|
3583
3585
|
...t,
|
|
@@ -3606,7 +3608,7 @@ function xr({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
3606
3608
|
return /* @__PURE__ */ V(Z, {
|
|
3607
3609
|
defaultOpen: r,
|
|
3608
3610
|
contentClassName: "space-y-4",
|
|
3609
|
-
title: /* @__PURE__ */ V(
|
|
3611
|
+
title: /* @__PURE__ */ V(sr, {
|
|
3610
3612
|
type: "calendar",
|
|
3611
3613
|
representationKey: e
|
|
3612
3614
|
}),
|
|
@@ -3666,11 +3668,11 @@ function xr({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
3666
3668
|
className: "w-full max-w-xs",
|
|
3667
3669
|
onChange: (e) => {
|
|
3668
3670
|
let t = e.target.value;
|
|
3669
|
-
Q(
|
|
3671
|
+
Q(vr, t) && u({ showAs: t });
|
|
3670
3672
|
},
|
|
3671
|
-
children:
|
|
3673
|
+
children: vr.map((e) => /* @__PURE__ */ V(P, {
|
|
3672
3674
|
value: e,
|
|
3673
|
-
children:
|
|
3675
|
+
children: br(e)
|
|
3674
3676
|
}, e))
|
|
3675
3677
|
})] }),
|
|
3676
3678
|
/* @__PURE__ */ H(N, { children: [/* @__PURE__ */ V(M, {
|
|
@@ -3700,14 +3702,14 @@ function xr({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
3700
3702
|
className: "w-full max-w-xs",
|
|
3701
3703
|
onChange: (e) => {
|
|
3702
3704
|
let t = e.target.value;
|
|
3703
|
-
Q(
|
|
3705
|
+
Q(yr, t) && u({ dayValueParameter: {
|
|
3704
3706
|
...p,
|
|
3705
3707
|
perDayValue: t
|
|
3706
3708
|
} });
|
|
3707
3709
|
},
|
|
3708
|
-
children:
|
|
3710
|
+
children: yr.map((e) => /* @__PURE__ */ V(P, {
|
|
3709
3711
|
value: e,
|
|
3710
|
-
children:
|
|
3712
|
+
children: xr(e)
|
|
3711
3713
|
}, e))
|
|
3712
3714
|
})] }), /* @__PURE__ */ H(N, { children: [/* @__PURE__ */ V(M, {
|
|
3713
3715
|
htmlFor: `setup-report-calendar-${e}-dp`,
|
|
@@ -3751,43 +3753,43 @@ function xr({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
3751
3753
|
});
|
|
3752
3754
|
}
|
|
3753
3755
|
// src/workspace/setup/report/chart-editor.tsx
|
|
3754
|
-
var
|
|
3756
|
+
var Cr = [
|
|
3755
3757
|
"none",
|
|
3756
3758
|
"non-interactive",
|
|
3757
3759
|
"interactive"
|
|
3758
|
-
],
|
|
3760
|
+
], wr = ["frozen", "movable"], Tr = [
|
|
3759
3761
|
"none",
|
|
3760
3762
|
"frozen",
|
|
3761
3763
|
"movable"
|
|
3762
|
-
],
|
|
3764
|
+
], Er = [
|
|
3763
3765
|
"dots",
|
|
3764
3766
|
"line",
|
|
3765
3767
|
"fill",
|
|
3766
3768
|
"bars",
|
|
3767
3769
|
"stacked-fills",
|
|
3768
3770
|
"stacked-bars"
|
|
3769
|
-
],
|
|
3770
|
-
function
|
|
3771
|
+
], Dr = ["filled-areas", "vertical-line-on-change"];
|
|
3772
|
+
function Or(e) {
|
|
3771
3773
|
switch (e) {
|
|
3772
3774
|
case "none": return w("report_rep_legend_none");
|
|
3773
3775
|
case "non-interactive": return w("report_rep_legend_non_interactive");
|
|
3774
3776
|
case "interactive": return w("report_rep_legend_interactive");
|
|
3775
3777
|
}
|
|
3776
3778
|
}
|
|
3777
|
-
function
|
|
3779
|
+
function kr(e) {
|
|
3778
3780
|
switch (e) {
|
|
3779
3781
|
case "frozen": return w("report_rep_chart_display_frozen");
|
|
3780
3782
|
case "movable": return w("report_rep_chart_display_movable");
|
|
3781
3783
|
}
|
|
3782
3784
|
}
|
|
3783
|
-
function
|
|
3785
|
+
function Ar(e) {
|
|
3784
3786
|
switch (e) {
|
|
3785
3787
|
case "none": return w("report_rep_nav_strip_none");
|
|
3786
3788
|
case "frozen": return w("report_rep_nav_strip_frozen");
|
|
3787
3789
|
case "movable": return w("report_rep_nav_strip_movable");
|
|
3788
3790
|
}
|
|
3789
3791
|
}
|
|
3790
|
-
function
|
|
3792
|
+
function jr(e) {
|
|
3791
3793
|
switch (e) {
|
|
3792
3794
|
case "dots": return w("report_chart_show_as_dots");
|
|
3793
3795
|
case "line": return w("report_chart_show_as_line");
|
|
@@ -3797,13 +3799,13 @@ function Ar(e) {
|
|
|
3797
3799
|
case "stacked-bars": return w("report_chart_show_as_stacked_bars");
|
|
3798
3800
|
}
|
|
3799
3801
|
}
|
|
3800
|
-
function
|
|
3802
|
+
function Mr(e) {
|
|
3801
3803
|
switch (e) {
|
|
3802
3804
|
case "filled-areas": return w("report_chart_show_as_filled_areas");
|
|
3803
3805
|
case "vertical-line-on-change": return w("report_chart_show_as_vertical_line_on_change");
|
|
3804
3806
|
}
|
|
3805
3807
|
}
|
|
3806
|
-
function
|
|
3808
|
+
function Nr({ series: e, index: t, label: n, defaultOpen: r = !1, canMoveUp: i, canMoveDown: a, onChange: o, onRemove: s, onMoveUp: c, onMoveDown: l }) {
|
|
3807
3809
|
let u = E(), d = `setup-report-chart-series-${String(t)}`;
|
|
3808
3810
|
return /* @__PURE__ */ V(Z, {
|
|
3809
3811
|
defaultOpen: r,
|
|
@@ -3849,14 +3851,14 @@ function Mr({ series: e, index: t, label: n, defaultOpen: r = !1, canMoveUp: i,
|
|
|
3849
3851
|
className: "w-full max-w-xs",
|
|
3850
3852
|
onChange: (t) => {
|
|
3851
3853
|
let n = t.target.value;
|
|
3852
|
-
Q(
|
|
3854
|
+
Q(Er, n) && o({
|
|
3853
3855
|
...e,
|
|
3854
3856
|
showAs: n
|
|
3855
3857
|
});
|
|
3856
3858
|
},
|
|
3857
|
-
children:
|
|
3859
|
+
children: Er.map((e) => /* @__PURE__ */ V(P, {
|
|
3858
3860
|
value: e,
|
|
3859
|
-
children:
|
|
3861
|
+
children: jr(e)
|
|
3860
3862
|
}, e))
|
|
3861
3863
|
})] }),
|
|
3862
3864
|
/* @__PURE__ */ H(N, { children: [/* @__PURE__ */ V(M, {
|
|
@@ -3926,14 +3928,14 @@ function Mr({ series: e, index: t, label: n, defaultOpen: r = !1, canMoveUp: i,
|
|
|
3926
3928
|
className: "w-full max-w-xs",
|
|
3927
3929
|
onChange: (t) => {
|
|
3928
3930
|
let n = t.target.value;
|
|
3929
|
-
Q(
|
|
3931
|
+
Q(Dr, n) && o({
|
|
3930
3932
|
...e,
|
|
3931
3933
|
showAs: n
|
|
3932
3934
|
});
|
|
3933
3935
|
},
|
|
3934
|
-
children:
|
|
3936
|
+
children: Dr.map((e) => /* @__PURE__ */ V(P, {
|
|
3935
3937
|
value: e,
|
|
3936
|
-
children:
|
|
3938
|
+
children: Mr(e)
|
|
3937
3939
|
}, e))
|
|
3938
3940
|
})] }) : null,
|
|
3939
3941
|
e.type === "string" ? /* @__PURE__ */ H(N, { children: [/* @__PURE__ */ V(M, { children: u("report_chart_show_as") }), /* @__PURE__ */ V("p", {
|
|
@@ -3943,10 +3945,10 @@ function Mr({ series: e, index: t, label: n, defaultOpen: r = !1, canMoveUp: i,
|
|
|
3943
3945
|
] })
|
|
3944
3946
|
});
|
|
3945
3947
|
}
|
|
3946
|
-
function
|
|
3948
|
+
function Pr({ representationKey: e, entry: t, onRemove: n }) {
|
|
3947
3949
|
let r = E();
|
|
3948
|
-
return /* @__PURE__ */ V(
|
|
3949
|
-
title: /* @__PURE__ */ V(
|
|
3950
|
+
return /* @__PURE__ */ V(ur, {
|
|
3951
|
+
title: /* @__PURE__ */ V(sr, {
|
|
3950
3952
|
type: t.type,
|
|
3951
3953
|
representationKey: e
|
|
3952
3954
|
}),
|
|
@@ -3960,7 +3962,7 @@ function Nr({ representationKey: e, entry: t, onRemove: n }) {
|
|
|
3960
3962
|
})
|
|
3961
3963
|
});
|
|
3962
3964
|
}
|
|
3963
|
-
function
|
|
3965
|
+
function Fr({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1, onChange: i, onRemove: a }) {
|
|
3964
3966
|
let o = E(), [s, c] = z([]), l = q(), u = new Set(t.parameters.map((e) => e.parameterId)), d = n.filter((e) => !u.has(e.parameterId)), f = new Map(n.map((e) => [e.parameterId, e.label])), p = (e) => {
|
|
3965
3967
|
i({
|
|
3966
3968
|
...t,
|
|
@@ -3974,7 +3976,7 @@ function Pr({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
3974
3976
|
return /* @__PURE__ */ H(Z, {
|
|
3975
3977
|
defaultOpen: r,
|
|
3976
3978
|
contentClassName: "space-y-4",
|
|
3977
|
-
title: /* @__PURE__ */ V(
|
|
3979
|
+
title: /* @__PURE__ */ V(sr, {
|
|
3978
3980
|
type: "chart",
|
|
3979
3981
|
representationKey: e
|
|
3980
3982
|
}),
|
|
@@ -4020,11 +4022,11 @@ function Pr({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
4020
4022
|
className: "w-full max-w-xs",
|
|
4021
4023
|
onChange: (e) => {
|
|
4022
4024
|
let t = e.target.value;
|
|
4023
|
-
Q(
|
|
4025
|
+
Q(wr, t) && p({ chartDisplay: t });
|
|
4024
4026
|
},
|
|
4025
|
-
children:
|
|
4027
|
+
children: wr.map((e) => /* @__PURE__ */ V(P, {
|
|
4026
4028
|
value: e,
|
|
4027
|
-
children:
|
|
4029
|
+
children: kr(e)
|
|
4028
4030
|
}, e))
|
|
4029
4031
|
})] }),
|
|
4030
4032
|
/* @__PURE__ */ H(N, { children: [/* @__PURE__ */ V(M, {
|
|
@@ -4036,11 +4038,11 @@ function Pr({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
4036
4038
|
className: "w-full max-w-xs",
|
|
4037
4039
|
onChange: (e) => {
|
|
4038
4040
|
let t = e.target.value;
|
|
4039
|
-
Q(
|
|
4041
|
+
Q(Tr, t) && p({ navStrip: t });
|
|
4040
4042
|
},
|
|
4041
|
-
children:
|
|
4043
|
+
children: Tr.map((e) => /* @__PURE__ */ V(P, {
|
|
4042
4044
|
value: e,
|
|
4043
|
-
children:
|
|
4045
|
+
children: Ar(e)
|
|
4044
4046
|
}, e))
|
|
4045
4047
|
})] }),
|
|
4046
4048
|
/* @__PURE__ */ H(N, { children: [/* @__PURE__ */ V(M, {
|
|
@@ -4052,11 +4054,11 @@ function Pr({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
4052
4054
|
className: "w-full max-w-xs",
|
|
4053
4055
|
onChange: (e) => {
|
|
4054
4056
|
let t = e.target.value;
|
|
4055
|
-
Q(
|
|
4057
|
+
Q(Cr, t) && p({ legend: t });
|
|
4056
4058
|
},
|
|
4057
|
-
children:
|
|
4059
|
+
children: Cr.map((e) => /* @__PURE__ */ V(P, {
|
|
4058
4060
|
value: e,
|
|
4059
|
-
children:
|
|
4061
|
+
children: Or(e)
|
|
4060
4062
|
}, e))
|
|
4061
4063
|
})] }),
|
|
4062
4064
|
/* @__PURE__ */ H(N, {
|
|
@@ -4163,7 +4165,7 @@ function Pr({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
4163
4165
|
children: o("report_chart_series_empty")
|
|
4164
4166
|
}) : /* @__PURE__ */ V("div", {
|
|
4165
4167
|
className: "space-y-3",
|
|
4166
|
-
children: t.parameters.map((e, n) => /* @__PURE__ */ V(
|
|
4168
|
+
children: t.parameters.map((e, n) => /* @__PURE__ */ V(Nr, {
|
|
4167
4169
|
series: e,
|
|
4168
4170
|
index: n,
|
|
4169
4171
|
label: f.get(e.parameterId) ?? e.parameterId,
|
|
@@ -4248,21 +4250,21 @@ function Pr({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
4248
4250
|
});
|
|
4249
4251
|
}
|
|
4250
4252
|
// src/workspace/setup/report/histogram-editor.tsx
|
|
4251
|
-
var
|
|
4253
|
+
var Ir = [
|
|
4252
4254
|
"none",
|
|
4253
4255
|
"non-interactive",
|
|
4254
4256
|
"interactive"
|
|
4255
|
-
],
|
|
4257
|
+
], Lr = [
|
|
4256
4258
|
"neighbour-bars",
|
|
4257
4259
|
"stacked-bars",
|
|
4258
4260
|
"stacked-fills"
|
|
4259
|
-
],
|
|
4261
|
+
], Rr = [
|
|
4260
4262
|
"30m-of-day",
|
|
4261
4263
|
"1h-of-day",
|
|
4262
4264
|
"1d-of-week",
|
|
4263
4265
|
"1h-of-week",
|
|
4264
4266
|
"1d-of-month"
|
|
4265
|
-
],
|
|
4267
|
+
], zr = [
|
|
4266
4268
|
"first",
|
|
4267
4269
|
"latest",
|
|
4268
4270
|
"average",
|
|
@@ -4271,21 +4273,21 @@ var Fr = [
|
|
|
4271
4273
|
"min",
|
|
4272
4274
|
"max"
|
|
4273
4275
|
];
|
|
4274
|
-
function
|
|
4276
|
+
function Br(e) {
|
|
4275
4277
|
switch (e) {
|
|
4276
4278
|
case "none": return w("report_rep_legend_none");
|
|
4277
4279
|
case "non-interactive": return w("report_rep_legend_non_interactive");
|
|
4278
4280
|
case "interactive": return w("report_rep_legend_interactive");
|
|
4279
4281
|
}
|
|
4280
4282
|
}
|
|
4281
|
-
function
|
|
4283
|
+
function Vr(e) {
|
|
4282
4284
|
switch (e) {
|
|
4283
4285
|
case "neighbour-bars": return w("report_histogram_display_as_neighbour_bars");
|
|
4284
4286
|
case "stacked-bars": return w("report_histogram_display_as_stacked_bars");
|
|
4285
4287
|
case "stacked-fills": return w("report_histogram_display_as_stacked_fills");
|
|
4286
4288
|
}
|
|
4287
4289
|
}
|
|
4288
|
-
function
|
|
4290
|
+
function Hr(e) {
|
|
4289
4291
|
switch (e) {
|
|
4290
4292
|
case "30m-of-day": return w("report_histogram_cadence_30m_of_day");
|
|
4291
4293
|
case "1h-of-day": return w("report_histogram_cadence_1h_of_day");
|
|
@@ -4294,7 +4296,7 @@ function Vr(e) {
|
|
|
4294
4296
|
case "1d-of-month": return w("report_histogram_cadence_1d_of_month");
|
|
4295
4297
|
}
|
|
4296
4298
|
}
|
|
4297
|
-
function
|
|
4299
|
+
function Ur(e) {
|
|
4298
4300
|
switch (e) {
|
|
4299
4301
|
case "first": return w("report_table_per_cadence_first");
|
|
4300
4302
|
case "latest": return w("report_table_per_cadence_latest");
|
|
@@ -4305,7 +4307,7 @@ function Hr(e) {
|
|
|
4305
4307
|
case "max": return w("report_table_totals_max");
|
|
4306
4308
|
}
|
|
4307
4309
|
}
|
|
4308
|
-
function
|
|
4310
|
+
function Wr({ parameter: e, index: t, label: n, defaultOpen: r = !1, canMoveUp: i, canMoveDown: a, onChange: o, onRemove: s, onMoveUp: c, onMoveDown: l }) {
|
|
4309
4311
|
let u = E(), d = `setup-report-histogram-param-${String(t)}`;
|
|
4310
4312
|
return /* @__PURE__ */ V(Z, {
|
|
4311
4313
|
defaultOpen: r,
|
|
@@ -4334,14 +4336,14 @@ function Ur({ parameter: e, index: t, label: n, defaultOpen: r = !1, canMoveUp:
|
|
|
4334
4336
|
className: "w-full max-w-xs",
|
|
4335
4337
|
onChange: (t) => {
|
|
4336
4338
|
let n = t.target.value;
|
|
4337
|
-
Q(
|
|
4339
|
+
Q(zr, n) && o({
|
|
4338
4340
|
...e,
|
|
4339
4341
|
perCadenceValue: n
|
|
4340
4342
|
});
|
|
4341
4343
|
},
|
|
4342
|
-
children:
|
|
4344
|
+
children: zr.map((e) => /* @__PURE__ */ V(P, {
|
|
4343
4345
|
value: e,
|
|
4344
|
-
children:
|
|
4346
|
+
children: Ur(e)
|
|
4345
4347
|
}, e))
|
|
4346
4348
|
})] }),
|
|
4347
4349
|
/* @__PURE__ */ H(N, { children: [/* @__PURE__ */ V(M, {
|
|
@@ -4389,7 +4391,7 @@ function Ur({ parameter: e, index: t, label: n, defaultOpen: r = !1, canMoveUp:
|
|
|
4389
4391
|
] })
|
|
4390
4392
|
});
|
|
4391
4393
|
}
|
|
4392
|
-
function
|
|
4394
|
+
function Gr({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1, onChange: i, onRemove: a }) {
|
|
4393
4395
|
let o = E(), [s, c] = z([]), l = q(), u = new Set(t.parameters.map((e) => e.parameterId)), d = n.filter((e) => e.type === "numeric" && !u.has(e.parameterId)), f = new Map(n.map((e) => [e.parameterId, e.label])), p = (e) => {
|
|
4394
4396
|
i({
|
|
4395
4397
|
...t,
|
|
@@ -4403,7 +4405,7 @@ function Wr({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
4403
4405
|
return /* @__PURE__ */ H(Z, {
|
|
4404
4406
|
defaultOpen: r,
|
|
4405
4407
|
contentClassName: "space-y-4",
|
|
4406
|
-
title: /* @__PURE__ */ V(
|
|
4408
|
+
title: /* @__PURE__ */ V(sr, {
|
|
4407
4409
|
type: "histogram",
|
|
4408
4410
|
representationKey: e
|
|
4409
4411
|
}),
|
|
@@ -4434,11 +4436,11 @@ function Wr({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
4434
4436
|
className: "w-full max-w-xs",
|
|
4435
4437
|
onChange: (e) => {
|
|
4436
4438
|
let t = e.target.value;
|
|
4437
|
-
Q(
|
|
4439
|
+
Q(Ir, t) && p({ legend: t });
|
|
4438
4440
|
},
|
|
4439
|
-
children:
|
|
4441
|
+
children: Ir.map((e) => /* @__PURE__ */ V(P, {
|
|
4440
4442
|
value: e,
|
|
4441
|
-
children:
|
|
4443
|
+
children: Br(e)
|
|
4442
4444
|
}, e))
|
|
4443
4445
|
})] }),
|
|
4444
4446
|
/* @__PURE__ */ H(N, {
|
|
@@ -4464,11 +4466,11 @@ function Wr({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
4464
4466
|
className: "w-full max-w-xs",
|
|
4465
4467
|
onChange: (e) => {
|
|
4466
4468
|
let t = e.target.value;
|
|
4467
|
-
Q(
|
|
4469
|
+
Q(Rr, t) && p({ cadence: t });
|
|
4468
4470
|
},
|
|
4469
|
-
children:
|
|
4471
|
+
children: Rr.map((e) => /* @__PURE__ */ V(P, {
|
|
4470
4472
|
value: e,
|
|
4471
|
-
children:
|
|
4473
|
+
children: Hr(e)
|
|
4472
4474
|
}, e))
|
|
4473
4475
|
})] }),
|
|
4474
4476
|
/* @__PURE__ */ H(N, { children: [/* @__PURE__ */ V(M, {
|
|
@@ -4480,11 +4482,11 @@ function Wr({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
4480
4482
|
className: "w-full max-w-xs",
|
|
4481
4483
|
onChange: (e) => {
|
|
4482
4484
|
let t = e.target.value;
|
|
4483
|
-
Q(
|
|
4485
|
+
Q(Lr, t) && p({ displayAs: t });
|
|
4484
4486
|
},
|
|
4485
|
-
children:
|
|
4487
|
+
children: Lr.map((e) => /* @__PURE__ */ V(P, {
|
|
4486
4488
|
value: e,
|
|
4487
|
-
children:
|
|
4489
|
+
children: Vr(e)
|
|
4488
4490
|
}, e))
|
|
4489
4491
|
})] })
|
|
4490
4492
|
] }), /* @__PURE__ */ H(j, { children: [
|
|
@@ -4494,7 +4496,7 @@ function Wr({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
4494
4496
|
children: o("report_histogram_parameters_empty")
|
|
4495
4497
|
}) : /* @__PURE__ */ V("div", {
|
|
4496
4498
|
className: "space-y-3",
|
|
4497
|
-
children: t.parameters.map((e, n) => /* @__PURE__ */ V(
|
|
4499
|
+
children: t.parameters.map((e, n) => /* @__PURE__ */ V(Wr, {
|
|
4498
4500
|
parameter: e,
|
|
4499
4501
|
index: n,
|
|
4500
4502
|
label: f.get(e.parameterId) ?? e.parameterId,
|
|
@@ -4577,11 +4579,11 @@ function Wr({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
4577
4579
|
});
|
|
4578
4580
|
}
|
|
4579
4581
|
// src/workspace/setup/report/hourly-matrix-editor.tsx
|
|
4580
|
-
var
|
|
4582
|
+
var Kr = [
|
|
4581
4583
|
"15m",
|
|
4582
4584
|
"30m",
|
|
4583
4585
|
"1h"
|
|
4584
|
-
],
|
|
4586
|
+
], qr = [
|
|
4585
4587
|
"first",
|
|
4586
4588
|
"latest",
|
|
4587
4589
|
"average",
|
|
@@ -4589,7 +4591,7 @@ var Gr = [
|
|
|
4589
4591
|
"sum",
|
|
4590
4592
|
"min",
|
|
4591
4593
|
"max"
|
|
4592
|
-
],
|
|
4594
|
+
], Jr = ["first", "latest"], Yr = [
|
|
4593
4595
|
"none",
|
|
4594
4596
|
"last",
|
|
4595
4597
|
"delta",
|
|
@@ -4598,19 +4600,19 @@ var Gr = [
|
|
|
4598
4600
|
"min",
|
|
4599
4601
|
"max"
|
|
4600
4602
|
];
|
|
4601
|
-
function
|
|
4603
|
+
function Xr(e) {
|
|
4602
4604
|
if (!Array.isArray(e)) return !1;
|
|
4603
4605
|
for (let t of e) if (typeof t != "number") return !1;
|
|
4604
4606
|
return !0;
|
|
4605
4607
|
}
|
|
4606
|
-
function
|
|
4607
|
-
if (
|
|
4608
|
+
function Zr(e) {
|
|
4609
|
+
if (Xr(e)) {
|
|
4608
4610
|
let t = e[0];
|
|
4609
4611
|
return t != null && Number.isFinite(t) ? t : null;
|
|
4610
4612
|
}
|
|
4611
4613
|
return typeof e == "number" && Number.isFinite(e) ? e : null;
|
|
4612
4614
|
}
|
|
4613
|
-
function
|
|
4615
|
+
function Qr({ id: e, value: t, onChange: n }) {
|
|
4614
4616
|
return /* @__PURE__ */ V(nt, {
|
|
4615
4617
|
id: e,
|
|
4616
4618
|
min: 0,
|
|
@@ -4618,12 +4620,12 @@ function Zr({ id: e, value: t, onChange: n }) {
|
|
|
4618
4620
|
step: .01,
|
|
4619
4621
|
value: [t],
|
|
4620
4622
|
onValueChange: (e) => {
|
|
4621
|
-
let t =
|
|
4623
|
+
let t = Zr(e);
|
|
4622
4624
|
t != null && n(t);
|
|
4623
4625
|
}
|
|
4624
4626
|
});
|
|
4625
4627
|
}
|
|
4626
|
-
function
|
|
4628
|
+
function $r(e) {
|
|
4627
4629
|
switch (e) {
|
|
4628
4630
|
case "first": return w("report_table_per_cadence_first");
|
|
4629
4631
|
case "latest": return w("report_table_per_cadence_latest");
|
|
@@ -4634,7 +4636,7 @@ function Qr(e) {
|
|
|
4634
4636
|
case "max": return w("report_table_totals_max");
|
|
4635
4637
|
}
|
|
4636
4638
|
}
|
|
4637
|
-
function
|
|
4639
|
+
function ei(e) {
|
|
4638
4640
|
switch (e) {
|
|
4639
4641
|
case "none": return w("report_table_totals_none");
|
|
4640
4642
|
case "last": return w("report_table_totals_last");
|
|
@@ -4645,7 +4647,7 @@ function $r(e) {
|
|
|
4645
4647
|
case "max": return w("report_table_totals_max");
|
|
4646
4648
|
}
|
|
4647
4649
|
}
|
|
4648
|
-
function
|
|
4650
|
+
function ti({ group: e, index: t, representationKey: n, snapshots: r, defaultOpen: i = !1, canMoveUp: a, canMoveDown: o, onChange: s, onRemove: c, onMoveUp: l, onMoveDown: u }) {
|
|
4649
4651
|
let d = E(), f = T(), m = `setup-report-hourly-matrix-${n}-g${String(t)}`, h = f, g = q(), _ = r.filter((e) => e.type === "numeric"), ee = r.filter((e) => e.type === "numeric" || e.type === "integer"), v = new Map(r.map((e) => [e.parameterId, W(e.label, h)])), y = e.dayHeaderParameters ?? [], x = e.cellValueParameter, ne = (t) => {
|
|
4650
4652
|
if (t === "") {
|
|
4651
4653
|
s({
|
|
@@ -4765,7 +4767,7 @@ function ei({ group: e, index: t, representationKey: n, snapshots: r, defaultOpe
|
|
|
4765
4767
|
className: "w-full max-w-xs",
|
|
4766
4768
|
onChange: (t) => {
|
|
4767
4769
|
let n = t.target.value;
|
|
4768
|
-
Q(
|
|
4770
|
+
Q(qr, n) && s({
|
|
4769
4771
|
...e,
|
|
4770
4772
|
cellValueParameter: {
|
|
4771
4773
|
...x,
|
|
@@ -4773,9 +4775,9 @@ function ei({ group: e, index: t, representationKey: n, snapshots: r, defaultOpe
|
|
|
4773
4775
|
}
|
|
4774
4776
|
});
|
|
4775
4777
|
},
|
|
4776
|
-
children:
|
|
4778
|
+
children: qr.map((e) => /* @__PURE__ */ V(P, {
|
|
4777
4779
|
value: e,
|
|
4778
|
-
children:
|
|
4780
|
+
children: $r(e)
|
|
4779
4781
|
}, e))
|
|
4780
4782
|
})] }), /* @__PURE__ */ H(N, { children: [/* @__PURE__ */ V(M, {
|
|
4781
4783
|
htmlFor: `${m}-dp`,
|
|
@@ -4851,19 +4853,19 @@ function ei({ group: e, index: t, representationKey: n, snapshots: r, defaultOpe
|
|
|
4851
4853
|
className: "w-full max-w-xs",
|
|
4852
4854
|
onChange: (n) => {
|
|
4853
4855
|
let r = n.target.value;
|
|
4854
|
-
Q(
|
|
4856
|
+
Q(qr, r) && ae(t, {
|
|
4855
4857
|
...e,
|
|
4856
4858
|
perDayAggregation: r
|
|
4857
4859
|
});
|
|
4858
4860
|
},
|
|
4859
|
-
children:
|
|
4861
|
+
children: qr.map((e) => /* @__PURE__ */ V(P, {
|
|
4860
4862
|
value: e,
|
|
4861
|
-
children:
|
|
4863
|
+
children: $r(e)
|
|
4862
4864
|
}, e))
|
|
4863
4865
|
})] }), /* @__PURE__ */ H(N, { children: [/* @__PURE__ */ V(M, {
|
|
4864
4866
|
htmlFor: `${n}-opacity`,
|
|
4865
4867
|
children: d("report_table_bg_opacity")
|
|
4866
|
-
}), /* @__PURE__ */ V(
|
|
4868
|
+
}), /* @__PURE__ */ V(Qr, {
|
|
4867
4869
|
id: `${n}-opacity`,
|
|
4868
4870
|
value: e.zoneBgOpacity,
|
|
4869
4871
|
onChange: (n) => {
|
|
@@ -4881,14 +4883,14 @@ function ei({ group: e, index: t, representationKey: n, snapshots: r, defaultOpe
|
|
|
4881
4883
|
className: "w-full max-w-xs",
|
|
4882
4884
|
onChange: (n) => {
|
|
4883
4885
|
let r = n.target.value;
|
|
4884
|
-
Q(
|
|
4886
|
+
Q(Jr, r) && ae(t, {
|
|
4885
4887
|
...e,
|
|
4886
4888
|
perDayAggregation: r
|
|
4887
4889
|
});
|
|
4888
4890
|
},
|
|
4889
|
-
children:
|
|
4891
|
+
children: Jr.map((e) => /* @__PURE__ */ V(P, {
|
|
4890
4892
|
value: e,
|
|
4891
|
-
children:
|
|
4893
|
+
children: $r(e)
|
|
4892
4894
|
}, e))
|
|
4893
4895
|
})] })
|
|
4894
4896
|
}, n);
|
|
@@ -4917,7 +4919,7 @@ function ei({ group: e, index: t, representationKey: n, snapshots: r, defaultOpe
|
|
|
4917
4919
|
className: "w-full max-w-xs",
|
|
4918
4920
|
onChange: (t) => {
|
|
4919
4921
|
let n = t.target.value;
|
|
4920
|
-
Q(
|
|
4922
|
+
Q(Yr, n) && s({
|
|
4921
4923
|
...e,
|
|
4922
4924
|
valueTotalsPerDay: {
|
|
4923
4925
|
...e.valueTotalsPerDay,
|
|
@@ -4925,9 +4927,9 @@ function ei({ group: e, index: t, representationKey: n, snapshots: r, defaultOpe
|
|
|
4925
4927
|
}
|
|
4926
4928
|
});
|
|
4927
4929
|
},
|
|
4928
|
-
children:
|
|
4930
|
+
children: Yr.map((e) => /* @__PURE__ */ V(P, {
|
|
4929
4931
|
value: e,
|
|
4930
|
-
children:
|
|
4932
|
+
children: ei(e)
|
|
4931
4933
|
}, e))
|
|
4932
4934
|
})] }),
|
|
4933
4935
|
e.valueTotalsPerDay.aggregation === "none" ? null : /* @__PURE__ */ H(N, { children: [/* @__PURE__ */ V(M, {
|
|
@@ -4950,7 +4952,7 @@ function ei({ group: e, index: t, representationKey: n, snapshots: r, defaultOpe
|
|
|
4950
4952
|
] })
|
|
4951
4953
|
});
|
|
4952
4954
|
}
|
|
4953
|
-
function
|
|
4955
|
+
function ni({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1, onChange: i, onRemove: a }) {
|
|
4954
4956
|
let o = E(), s = q(), c = (e) => {
|
|
4955
4957
|
i({
|
|
4956
4958
|
...t,
|
|
@@ -4967,7 +4969,7 @@ function ti({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
4967
4969
|
return /* @__PURE__ */ H(Z, {
|
|
4968
4970
|
defaultOpen: r,
|
|
4969
4971
|
contentClassName: "space-y-4",
|
|
4970
|
-
title: /* @__PURE__ */ V(
|
|
4972
|
+
title: /* @__PURE__ */ V(sr, {
|
|
4971
4973
|
type: "hourly-matrix",
|
|
4972
4974
|
representationKey: e
|
|
4973
4975
|
}),
|
|
@@ -5027,9 +5029,9 @@ function ti({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
5027
5029
|
className: "w-full max-w-xs",
|
|
5028
5030
|
onChange: (e) => {
|
|
5029
5031
|
let t = e.target.value;
|
|
5030
|
-
Q(
|
|
5032
|
+
Q(Kr, t) && c({ cadence: t });
|
|
5031
5033
|
},
|
|
5032
|
-
children:
|
|
5034
|
+
children: Kr.map((e) => /* @__PURE__ */ V(P, {
|
|
5033
5035
|
value: e,
|
|
5034
5036
|
children: e
|
|
5035
5037
|
}, e))
|
|
@@ -5040,7 +5042,7 @@ function ti({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
5040
5042
|
className: "text-sm text-muted-foreground",
|
|
5041
5043
|
children: o("report_hourly_matrix_groups_empty")
|
|
5042
5044
|
}) : null,
|
|
5043
|
-
t.parameters.map((r, i) => /* @__PURE__ */ V(
|
|
5045
|
+
t.parameters.map((r, i) => /* @__PURE__ */ V(ti, {
|
|
5044
5046
|
group: r,
|
|
5045
5047
|
index: i,
|
|
5046
5048
|
representationKey: e,
|
|
@@ -5077,7 +5079,7 @@ function ti({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
5077
5079
|
});
|
|
5078
5080
|
}
|
|
5079
5081
|
// src/workspace/setup/report/sankey-editor.tsx
|
|
5080
|
-
var
|
|
5082
|
+
var ri = [
|
|
5081
5083
|
"delta",
|
|
5082
5084
|
"sum",
|
|
5083
5085
|
"average",
|
|
@@ -5086,7 +5088,7 @@ var ni = [
|
|
|
5086
5088
|
"min",
|
|
5087
5089
|
"max"
|
|
5088
5090
|
];
|
|
5089
|
-
function
|
|
5091
|
+
function ii(e) {
|
|
5090
5092
|
switch (e) {
|
|
5091
5093
|
case "first": return w("report_table_per_cadence_first");
|
|
5092
5094
|
case "latest": return w("report_table_per_cadence_latest");
|
|
@@ -5097,12 +5099,12 @@ function ri(e) {
|
|
|
5097
5099
|
case "max": return w("report_table_totals_max");
|
|
5098
5100
|
}
|
|
5099
5101
|
}
|
|
5100
|
-
function
|
|
5102
|
+
function ai(e, t, n) {
|
|
5101
5103
|
if (n < 0 || n >= e.length) return [...e];
|
|
5102
5104
|
let r = [...e], [i] = r.splice(t, 1);
|
|
5103
5105
|
return i == null ? [...e] : (r.splice(n, 0, i), r);
|
|
5104
5106
|
}
|
|
5105
|
-
function
|
|
5107
|
+
function oi(e, t, n) {
|
|
5106
5108
|
let r = e.map((e) => e.id);
|
|
5107
5109
|
for (let i of e) for (let e of n) {
|
|
5108
5110
|
let n = g(r, t, i.id, e)[0];
|
|
@@ -5114,12 +5116,12 @@ function ai(e, t, n) {
|
|
|
5114
5116
|
}
|
|
5115
5117
|
return null;
|
|
5116
5118
|
}
|
|
5117
|
-
function
|
|
5119
|
+
function si(e, t, n) {
|
|
5118
5120
|
let r = e.find((e) => e.id === t);
|
|
5119
5121
|
return r == null ? t : W(r.label, n) || t;
|
|
5120
5122
|
}
|
|
5121
|
-
function
|
|
5122
|
-
let o = E(), s = T(), c = q(), l = q(), u = n.filter((e) => e.type === "numeric"), d = u.map((e) => e.parameterId), f = t.nodes.map((e) => e.id), p = le(f, t.links), m =
|
|
5123
|
+
function ci({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1, onChange: i, onRemove: a }) {
|
|
5124
|
+
let o = E(), s = T(), c = q(), l = q(), u = n.filter((e) => e.type === "numeric"), d = u.map((e) => e.parameterId), f = t.nodes.map((e) => e.id), p = le(f, t.links), m = oi(t.nodes, t.links, d), h = t.nodes.length >= 2 && m != null, _ = (e) => {
|
|
5123
5125
|
i({
|
|
5124
5126
|
...t,
|
|
5125
5127
|
...e
|
|
@@ -5142,7 +5144,7 @@ function si({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
5142
5144
|
return /* @__PURE__ */ H(Z, {
|
|
5143
5145
|
defaultOpen: r,
|
|
5144
5146
|
contentClassName: "space-y-4",
|
|
5145
|
-
title: /* @__PURE__ */ V(
|
|
5147
|
+
title: /* @__PURE__ */ V(sr, {
|
|
5146
5148
|
type: "sankey",
|
|
5147
5149
|
representationKey: e
|
|
5148
5150
|
}),
|
|
@@ -5235,11 +5237,11 @@ function si({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
5235
5237
|
className: "w-full max-w-xs",
|
|
5236
5238
|
onChange: (e) => {
|
|
5237
5239
|
let t = e.target.value;
|
|
5238
|
-
Q(
|
|
5240
|
+
Q(ri, t) && _({ valueAggregation: t });
|
|
5239
5241
|
},
|
|
5240
|
-
children:
|
|
5242
|
+
children: ri.map((e) => /* @__PURE__ */ V(P, {
|
|
5241
5243
|
value: e,
|
|
5242
|
-
children:
|
|
5244
|
+
children: ii(e)
|
|
5243
5245
|
}, e))
|
|
5244
5246
|
})] })
|
|
5245
5247
|
] }),
|
|
@@ -5262,10 +5264,10 @@ function si({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
5262
5264
|
canMoveUp: r > 0,
|
|
5263
5265
|
canMoveDown: r < t.nodes.length - 1,
|
|
5264
5266
|
onMoveUp: () => {
|
|
5265
|
-
_({ nodes:
|
|
5267
|
+
_({ nodes: ai(t.nodes, r, r - 1) });
|
|
5266
5268
|
},
|
|
5267
5269
|
onMoveDown: () => {
|
|
5268
|
-
_({ nodes:
|
|
5270
|
+
_({ nodes: ai(t.nodes, r, r + 1) });
|
|
5269
5271
|
},
|
|
5270
5272
|
moveUpLabel: o("report_histogram_parameters_move_up"),
|
|
5271
5273
|
moveDownLabel: o("report_histogram_parameters_move_down")
|
|
@@ -5318,17 +5320,17 @@ function si({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
5318
5320
|
return /* @__PURE__ */ V(Z, {
|
|
5319
5321
|
defaultOpen: l.wasJustAdded(String(r)),
|
|
5320
5322
|
title: /* @__PURE__ */ V(J, {
|
|
5321
|
-
title: `${
|
|
5323
|
+
title: `${si(t.nodes, n.fromNodeId, s)} → ${si(t.nodes, n.toNodeId, s)}`,
|
|
5322
5324
|
subtitle: u.find((e) => e.parameterId === n.parameterId)?.label ?? n.parameterId
|
|
5323
5325
|
}),
|
|
5324
5326
|
actions: /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(X, {
|
|
5325
5327
|
canMoveUp: r > 0,
|
|
5326
5328
|
canMoveDown: r < t.links.length - 1,
|
|
5327
5329
|
onMoveUp: () => {
|
|
5328
|
-
_({ links:
|
|
5330
|
+
_({ links: ai(t.links, r, r - 1) });
|
|
5329
5331
|
},
|
|
5330
5332
|
onMoveDown: () => {
|
|
5331
|
-
_({ links:
|
|
5333
|
+
_({ links: ai(t.links, r, r + 1) });
|
|
5332
5334
|
},
|
|
5333
5335
|
moveUpLabel: o("report_histogram_parameters_move_up"),
|
|
5334
5336
|
moveDownLabel: o("report_histogram_parameters_move_down")
|
|
@@ -5356,7 +5358,7 @@ function si({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
5356
5358
|
},
|
|
5357
5359
|
children: p.map((e) => /* @__PURE__ */ V(P, {
|
|
5358
5360
|
value: e,
|
|
5359
|
-
children:
|
|
5361
|
+
children: si(t.nodes, e, s)
|
|
5360
5362
|
}, e))
|
|
5361
5363
|
})] }),
|
|
5362
5364
|
/* @__PURE__ */ H(N, { children: [/* @__PURE__ */ V(M, {
|
|
@@ -5375,7 +5377,7 @@ function si({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
5375
5377
|
},
|
|
5376
5378
|
children: d.map((e) => /* @__PURE__ */ V(P, {
|
|
5377
5379
|
value: e,
|
|
5378
|
-
children:
|
|
5380
|
+
children: si(t.nodes, e, s)
|
|
5379
5381
|
}, e))
|
|
5380
5382
|
})] }),
|
|
5381
5383
|
/* @__PURE__ */ H(N, { children: [/* @__PURE__ */ V(M, {
|
|
@@ -5439,21 +5441,21 @@ function si({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
5439
5441
|
});
|
|
5440
5442
|
}
|
|
5441
5443
|
// src/workspace/setup/report/state-duration-editor.tsx
|
|
5442
|
-
var
|
|
5444
|
+
var li = [
|
|
5443
5445
|
"pie",
|
|
5444
5446
|
"bars",
|
|
5445
5447
|
"table"
|
|
5446
5448
|
];
|
|
5447
|
-
function
|
|
5449
|
+
function ui(e) {
|
|
5448
5450
|
switch (e) {
|
|
5449
5451
|
case "pie": return w("report_state_duration_display_as_pie");
|
|
5450
5452
|
case "bars": return w("report_state_duration_display_as_bars");
|
|
5451
5453
|
case "table": return w("report_state_duration_display_as_table");
|
|
5452
5454
|
}
|
|
5453
5455
|
}
|
|
5454
|
-
function
|
|
5456
|
+
function di({ parameter: e, label: t, canMoveUp: n, canMoveDown: r, onRemove: i, onMoveUp: a, onMoveDown: o }) {
|
|
5455
5457
|
let s = E();
|
|
5456
|
-
return /* @__PURE__ */ V(
|
|
5458
|
+
return /* @__PURE__ */ V(ur, {
|
|
5457
5459
|
title: /* @__PURE__ */ V(J, {
|
|
5458
5460
|
title: t,
|
|
5459
5461
|
subtitle: e.type
|
|
@@ -5471,7 +5473,7 @@ function ui({ parameter: e, label: t, canMoveUp: n, canMoveDown: r, onRemove: i,
|
|
|
5471
5473
|
})] })
|
|
5472
5474
|
});
|
|
5473
5475
|
}
|
|
5474
|
-
function
|
|
5476
|
+
function fi({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1, onChange: i, onRemove: a }) {
|
|
5475
5477
|
let o = E(), [s, c] = z([]), l = new Set(t.parameters.map((e) => e.parameterId)), u = n.filter((e) => e.type === "integer" && !l.has(e.parameterId)), d = new Map(n.map((e) => [e.parameterId, e.label])), f = (e) => {
|
|
5476
5478
|
i({
|
|
5477
5479
|
...t,
|
|
@@ -5485,7 +5487,7 @@ function di({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
5485
5487
|
return /* @__PURE__ */ H(Z, {
|
|
5486
5488
|
defaultOpen: r,
|
|
5487
5489
|
contentClassName: "space-y-4",
|
|
5488
|
-
title: /* @__PURE__ */ V(
|
|
5490
|
+
title: /* @__PURE__ */ V(sr, {
|
|
5489
5491
|
type: "state-duration",
|
|
5490
5492
|
representationKey: e
|
|
5491
5493
|
}),
|
|
@@ -5559,11 +5561,11 @@ function di({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
5559
5561
|
className: "w-full max-w-xs",
|
|
5560
5562
|
onChange: (e) => {
|
|
5561
5563
|
let t = e.target.value;
|
|
5562
|
-
Q(
|
|
5564
|
+
Q(li, t) && f({ displayAs: t });
|
|
5563
5565
|
},
|
|
5564
|
-
children:
|
|
5566
|
+
children: li.map((e) => /* @__PURE__ */ V(P, {
|
|
5565
5567
|
value: e,
|
|
5566
|
-
children:
|
|
5568
|
+
children: ui(e)
|
|
5567
5569
|
}, e))
|
|
5568
5570
|
})] })
|
|
5569
5571
|
] }), /* @__PURE__ */ H(j, { children: [
|
|
@@ -5573,7 +5575,7 @@ function di({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
5573
5575
|
children: o("report_state_duration_parameters_empty")
|
|
5574
5576
|
}) : /* @__PURE__ */ V("div", {
|
|
5575
5577
|
className: "space-y-3",
|
|
5576
|
-
children: t.parameters.map((e, n) => /* @__PURE__ */ V(
|
|
5578
|
+
children: t.parameters.map((e, n) => /* @__PURE__ */ V(di, {
|
|
5577
5579
|
parameter: e,
|
|
5578
5580
|
label: d.get(e.parameterId) ?? e.parameterId,
|
|
5579
5581
|
canMoveUp: n > 0,
|
|
@@ -5650,7 +5652,7 @@ function di({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
5650
5652
|
});
|
|
5651
5653
|
}
|
|
5652
5654
|
// src/workspace/setup/report/table-editor.tsx
|
|
5653
|
-
var
|
|
5655
|
+
var pi = [
|
|
5654
5656
|
"precise",
|
|
5655
5657
|
"1s",
|
|
5656
5658
|
"1m",
|
|
@@ -5660,15 +5662,15 @@ var fi = [
|
|
|
5660
5662
|
"1h",
|
|
5661
5663
|
"4h",
|
|
5662
5664
|
"1d"
|
|
5663
|
-
],
|
|
5665
|
+
], mi = [
|
|
5664
5666
|
"none",
|
|
5665
5667
|
"per-day",
|
|
5666
5668
|
"per-hour"
|
|
5667
|
-
],
|
|
5669
|
+
], hi = [
|
|
5668
5670
|
"first",
|
|
5669
5671
|
"latest",
|
|
5670
5672
|
"average"
|
|
5671
|
-
],
|
|
5673
|
+
], gi = [
|
|
5672
5674
|
"none",
|
|
5673
5675
|
"last",
|
|
5674
5676
|
"delta",
|
|
@@ -5676,25 +5678,25 @@ var fi = [
|
|
|
5676
5678
|
"average",
|
|
5677
5679
|
"min",
|
|
5678
5680
|
"max"
|
|
5679
|
-
],
|
|
5680
|
-
function
|
|
5681
|
+
], _i = ["none", "last"];
|
|
5682
|
+
function vi(e) {
|
|
5681
5683
|
return e === "precise" ? w("report_table_row_cadence_precise") : e;
|
|
5682
5684
|
}
|
|
5683
|
-
function
|
|
5685
|
+
function yi(e) {
|
|
5684
5686
|
switch (e) {
|
|
5685
5687
|
case "none": return w("report_table_subtotals_none");
|
|
5686
5688
|
case "per-day": return w("report_table_subtotals_per_day");
|
|
5687
5689
|
case "per-hour": return w("report_table_subtotals_per_hour");
|
|
5688
5690
|
}
|
|
5689
5691
|
}
|
|
5690
|
-
function
|
|
5692
|
+
function bi(e) {
|
|
5691
5693
|
switch (e) {
|
|
5692
5694
|
case "first": return w("report_table_per_cadence_first");
|
|
5693
5695
|
case "latest": return w("report_table_per_cadence_latest");
|
|
5694
5696
|
case "average": return w("report_table_per_cadence_average");
|
|
5695
5697
|
}
|
|
5696
5698
|
}
|
|
5697
|
-
function
|
|
5699
|
+
function xi(e) {
|
|
5698
5700
|
switch (e) {
|
|
5699
5701
|
case "none": return w("report_table_totals_none");
|
|
5700
5702
|
case "last": return w("report_table_totals_last");
|
|
@@ -5705,19 +5707,19 @@ function bi(e) {
|
|
|
5705
5707
|
case "max": return w("report_table_totals_max");
|
|
5706
5708
|
}
|
|
5707
5709
|
}
|
|
5708
|
-
function
|
|
5710
|
+
function Si(e) {
|
|
5709
5711
|
if (!Array.isArray(e)) return !1;
|
|
5710
5712
|
for (let t of e) if (typeof t != "number") return !1;
|
|
5711
5713
|
return !0;
|
|
5712
5714
|
}
|
|
5713
|
-
function
|
|
5714
|
-
if (
|
|
5715
|
+
function Ci(e) {
|
|
5716
|
+
if (Si(e)) {
|
|
5715
5717
|
let t = e[0];
|
|
5716
5718
|
return t != null && Number.isFinite(t) ? t : null;
|
|
5717
5719
|
}
|
|
5718
5720
|
return typeof e == "number" && Number.isFinite(e) ? e : null;
|
|
5719
5721
|
}
|
|
5720
|
-
function
|
|
5722
|
+
function wi({ id: e, value: t, onChange: n }) {
|
|
5721
5723
|
return /* @__PURE__ */ V(nt, {
|
|
5722
5724
|
id: e,
|
|
5723
5725
|
min: 0,
|
|
@@ -5725,12 +5727,12 @@ function Ci({ id: e, value: t, onChange: n }) {
|
|
|
5725
5727
|
step: .01,
|
|
5726
5728
|
value: [t],
|
|
5727
5729
|
onValueChange: (e) => {
|
|
5728
|
-
let t =
|
|
5730
|
+
let t = Ci(e);
|
|
5729
5731
|
t != null && n(t);
|
|
5730
5732
|
}
|
|
5731
5733
|
});
|
|
5732
5734
|
}
|
|
5733
|
-
function
|
|
5735
|
+
function Ti({ column: e, index: t, label: n, snapshot: r, rowCadenceMs: i, defaultOpen: a = !1, canMoveUp: o, canMoveDown: s, onChange: c, onRemove: l, onMoveUp: u, onMoveDown: d }) {
|
|
5734
5736
|
let f = E();
|
|
5735
5737
|
return /* @__PURE__ */ V(Z, {
|
|
5736
5738
|
defaultOpen: a,
|
|
@@ -5778,14 +5780,14 @@ function wi({ column: e, index: t, label: n, snapshot: r, rowCadenceMs: i, defau
|
|
|
5778
5780
|
className: "w-full max-w-xs",
|
|
5779
5781
|
onChange: (t) => {
|
|
5780
5782
|
let n = t.target.value;
|
|
5781
|
-
Q(
|
|
5783
|
+
Q(hi, n) && c({
|
|
5782
5784
|
...e,
|
|
5783
5785
|
perCadenceValue: n
|
|
5784
5786
|
});
|
|
5785
5787
|
},
|
|
5786
|
-
children:
|
|
5788
|
+
children: hi.map((e) => /* @__PURE__ */ V(P, {
|
|
5787
5789
|
value: e,
|
|
5788
|
-
children:
|
|
5790
|
+
children: bi(e)
|
|
5789
5791
|
}, e))
|
|
5790
5792
|
}),
|
|
5791
5793
|
i === "precise" ? /* @__PURE__ */ V(dt, { children: f("report_table_per_cadence_precise_hint") }) : null
|
|
@@ -5799,20 +5801,20 @@ function wi({ column: e, index: t, label: n, snapshot: r, rowCadenceMs: i, defau
|
|
|
5799
5801
|
className: "w-full max-w-xs",
|
|
5800
5802
|
onChange: (t) => {
|
|
5801
5803
|
let n = t.target.value;
|
|
5802
|
-
Q(
|
|
5804
|
+
Q(gi, n) && c({
|
|
5803
5805
|
...e,
|
|
5804
5806
|
totals: n
|
|
5805
5807
|
});
|
|
5806
5808
|
},
|
|
5807
|
-
children:
|
|
5809
|
+
children: gi.map((e) => /* @__PURE__ */ V(P, {
|
|
5808
5810
|
value: e,
|
|
5809
|
-
children:
|
|
5811
|
+
children: xi(e)
|
|
5810
5812
|
}, e))
|
|
5811
5813
|
})] }),
|
|
5812
5814
|
/* @__PURE__ */ H(N, { children: [/* @__PURE__ */ V(M, {
|
|
5813
5815
|
htmlFor: `setup-report-table-col-${String(t)}-bg`,
|
|
5814
5816
|
children: f("report_table_bg_opacity")
|
|
5815
|
-
}), /* @__PURE__ */ V(
|
|
5817
|
+
}), /* @__PURE__ */ V(wi, {
|
|
5816
5818
|
id: `setup-report-table-col-${String(t)}-bg`,
|
|
5817
5819
|
value: e.bgZoneColorOpacity,
|
|
5818
5820
|
onChange: (t) => {
|
|
@@ -5832,21 +5834,21 @@ function wi({ column: e, index: t, label: n, snapshot: r, rowCadenceMs: i, defau
|
|
|
5832
5834
|
className: "w-full max-w-xs",
|
|
5833
5835
|
onChange: (t) => {
|
|
5834
5836
|
let n = t.target.value;
|
|
5835
|
-
Q(
|
|
5837
|
+
Q(_i, n) && c({
|
|
5836
5838
|
...e,
|
|
5837
5839
|
totals: n
|
|
5838
5840
|
});
|
|
5839
5841
|
},
|
|
5840
|
-
children:
|
|
5842
|
+
children: _i.map((e) => /* @__PURE__ */ V(P, {
|
|
5841
5843
|
value: e,
|
|
5842
|
-
children:
|
|
5844
|
+
children: xi(e)
|
|
5843
5845
|
}, e))
|
|
5844
5846
|
})] }), r?.type === "integer" ? r.valueColors.map((n) => {
|
|
5845
5847
|
let r = `setup-report-table-col-${String(t)}-bg-${n.value}`;
|
|
5846
5848
|
return /* @__PURE__ */ H(N, { children: [/* @__PURE__ */ V(M, {
|
|
5847
5849
|
htmlFor: r,
|
|
5848
5850
|
children: f("report_table_bg_opacity_value", { value: n.value })
|
|
5849
|
-
}), /* @__PURE__ */ V(
|
|
5851
|
+
}), /* @__PURE__ */ V(wi, {
|
|
5850
5852
|
id: r,
|
|
5851
5853
|
value: e.bgOpacity[n.value] ?? 0,
|
|
5852
5854
|
onChange: (t) => {
|
|
@@ -5869,20 +5871,20 @@ function wi({ column: e, index: t, label: n, snapshot: r, rowCadenceMs: i, defau
|
|
|
5869
5871
|
className: "w-full max-w-xs",
|
|
5870
5872
|
onChange: (t) => {
|
|
5871
5873
|
let n = t.target.value;
|
|
5872
|
-
Q(
|
|
5874
|
+
Q(_i, n) && c({
|
|
5873
5875
|
...e,
|
|
5874
5876
|
totals: n
|
|
5875
5877
|
});
|
|
5876
5878
|
},
|
|
5877
|
-
children:
|
|
5879
|
+
children: _i.map((e) => /* @__PURE__ */ V(P, {
|
|
5878
5880
|
value: e,
|
|
5879
|
-
children:
|
|
5881
|
+
children: xi(e)
|
|
5880
5882
|
}, e))
|
|
5881
5883
|
})] }) : null
|
|
5882
5884
|
] })
|
|
5883
5885
|
});
|
|
5884
5886
|
}
|
|
5885
|
-
function
|
|
5887
|
+
function Ei({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1, onChange: i, onRemove: a }) {
|
|
5886
5888
|
let o = E(), [s, c] = z([]), l = q(), u = new Map(n.map((e) => [e.parameterId, e.label])), d = new Map(n.map((e) => [e.parameterId, e])), f = (e) => {
|
|
5887
5889
|
i({
|
|
5888
5890
|
...t,
|
|
@@ -5896,7 +5898,7 @@ function Ti({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
5896
5898
|
return /* @__PURE__ */ H(Z, {
|
|
5897
5899
|
defaultOpen: r,
|
|
5898
5900
|
contentClassName: "space-y-4",
|
|
5899
|
-
title: /* @__PURE__ */ V(
|
|
5901
|
+
title: /* @__PURE__ */ V(sr, {
|
|
5900
5902
|
type: "table",
|
|
5901
5903
|
representationKey: e
|
|
5902
5904
|
}),
|
|
@@ -5984,11 +5986,11 @@ function Ti({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
5984
5986
|
className: "w-full max-w-xs",
|
|
5985
5987
|
onChange: (e) => {
|
|
5986
5988
|
let t = e.target.value;
|
|
5987
|
-
Q(
|
|
5989
|
+
Q(pi, t) && f({ rowCadenceMs: t });
|
|
5988
5990
|
},
|
|
5989
|
-
children:
|
|
5991
|
+
children: pi.map((e) => /* @__PURE__ */ V(P, {
|
|
5990
5992
|
value: e,
|
|
5991
|
-
children:
|
|
5993
|
+
children: vi(e)
|
|
5992
5994
|
}, e))
|
|
5993
5995
|
})] }),
|
|
5994
5996
|
/* @__PURE__ */ H(N, { children: [
|
|
@@ -6002,11 +6004,11 @@ function Ti({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
6002
6004
|
className: "w-full max-w-xs",
|
|
6003
6005
|
onChange: (e) => {
|
|
6004
6006
|
let t = e.target.value;
|
|
6005
|
-
Q(
|
|
6007
|
+
Q(mi, t) && f({ subtotals: t });
|
|
6006
6008
|
},
|
|
6007
|
-
children:
|
|
6009
|
+
children: mi.map((e) => /* @__PURE__ */ V(P, {
|
|
6008
6010
|
value: e,
|
|
6009
|
-
children:
|
|
6011
|
+
children: yi(e)
|
|
6010
6012
|
}, e))
|
|
6011
6013
|
}),
|
|
6012
6014
|
m && t.subtotals !== "none" ? /* @__PURE__ */ V(dt, { children: o("report_table_subtotals_noop_hint") }) : null
|
|
@@ -6018,7 +6020,7 @@ function Ti({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
6018
6020
|
children: o("report_table_columns_empty")
|
|
6019
6021
|
}) : /* @__PURE__ */ V("div", {
|
|
6020
6022
|
className: "space-y-3",
|
|
6021
|
-
children: t.parameters.map((e, n) => /* @__PURE__ */ V(
|
|
6023
|
+
children: t.parameters.map((e, n) => /* @__PURE__ */ V(Ti, {
|
|
6022
6024
|
column: e,
|
|
6023
6025
|
index: n,
|
|
6024
6026
|
label: u.get(e.parameterId) ?? e.parameterId,
|
|
@@ -6102,19 +6104,19 @@ function Ti({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
6102
6104
|
});
|
|
6103
6105
|
}
|
|
6104
6106
|
// src/workspace/setup/report/time-buckets-editor.tsx
|
|
6105
|
-
var
|
|
6107
|
+
var Di = [
|
|
6106
6108
|
"none",
|
|
6107
6109
|
"non-interactive",
|
|
6108
6110
|
"interactive"
|
|
6109
|
-
],
|
|
6111
|
+
], Oi = ["frozen", "movable"], ki = [
|
|
6110
6112
|
"none",
|
|
6111
6113
|
"frozen",
|
|
6112
6114
|
"movable"
|
|
6113
|
-
],
|
|
6115
|
+
], Ai = [
|
|
6114
6116
|
"neighbour-bars",
|
|
6115
6117
|
"stacked-bars",
|
|
6116
6118
|
"stacked-fills"
|
|
6117
|
-
],
|
|
6119
|
+
], ji = [
|
|
6118
6120
|
"1m",
|
|
6119
6121
|
"5m",
|
|
6120
6122
|
"15m",
|
|
@@ -6122,7 +6124,7 @@ var Ei = [
|
|
|
6122
6124
|
"1h",
|
|
6123
6125
|
"4h",
|
|
6124
6126
|
"1d"
|
|
6125
|
-
],
|
|
6127
|
+
], Mi = [
|
|
6126
6128
|
"first",
|
|
6127
6129
|
"latest",
|
|
6128
6130
|
"average",
|
|
@@ -6131,34 +6133,34 @@ var Ei = [
|
|
|
6131
6133
|
"min",
|
|
6132
6134
|
"max"
|
|
6133
6135
|
];
|
|
6134
|
-
function
|
|
6136
|
+
function Ni(e) {
|
|
6135
6137
|
switch (e) {
|
|
6136
6138
|
case "none": return w("report_rep_legend_none");
|
|
6137
6139
|
case "non-interactive": return w("report_rep_legend_non_interactive");
|
|
6138
6140
|
case "interactive": return w("report_rep_legend_interactive");
|
|
6139
6141
|
}
|
|
6140
6142
|
}
|
|
6141
|
-
function
|
|
6143
|
+
function Pi(e) {
|
|
6142
6144
|
switch (e) {
|
|
6143
6145
|
case "frozen": return w("report_rep_chart_display_frozen");
|
|
6144
6146
|
case "movable": return w("report_rep_chart_display_movable");
|
|
6145
6147
|
}
|
|
6146
6148
|
}
|
|
6147
|
-
function
|
|
6149
|
+
function Fi(e) {
|
|
6148
6150
|
switch (e) {
|
|
6149
6151
|
case "none": return w("report_rep_nav_strip_none");
|
|
6150
6152
|
case "frozen": return w("report_rep_nav_strip_frozen");
|
|
6151
6153
|
case "movable": return w("report_rep_nav_strip_movable");
|
|
6152
6154
|
}
|
|
6153
6155
|
}
|
|
6154
|
-
function
|
|
6156
|
+
function Ii(e) {
|
|
6155
6157
|
switch (e) {
|
|
6156
6158
|
case "neighbour-bars": return w("report_histogram_display_as_neighbour_bars");
|
|
6157
6159
|
case "stacked-bars": return w("report_histogram_display_as_stacked_bars");
|
|
6158
6160
|
case "stacked-fills": return w("report_histogram_display_as_stacked_fills");
|
|
6159
6161
|
}
|
|
6160
6162
|
}
|
|
6161
|
-
function
|
|
6163
|
+
function Li(e) {
|
|
6162
6164
|
switch (e) {
|
|
6163
6165
|
case "first": return w("report_table_per_cadence_first");
|
|
6164
6166
|
case "latest": return w("report_table_per_cadence_latest");
|
|
@@ -6169,7 +6171,7 @@ function Ii(e) {
|
|
|
6169
6171
|
case "max": return w("report_table_totals_max");
|
|
6170
6172
|
}
|
|
6171
6173
|
}
|
|
6172
|
-
function
|
|
6174
|
+
function Ri({ parameter: e, index: t, label: n, defaultOpen: r = !1, canMoveUp: i, canMoveDown: a, onChange: o, onRemove: s, onMoveUp: c, onMoveDown: l }) {
|
|
6173
6175
|
let u = E(), d = `setup-report-time-buckets-param-${String(t)}`;
|
|
6174
6176
|
return /* @__PURE__ */ V(Z, {
|
|
6175
6177
|
defaultOpen: r,
|
|
@@ -6198,14 +6200,14 @@ function Li({ parameter: e, index: t, label: n, defaultOpen: r = !1, canMoveUp:
|
|
|
6198
6200
|
className: "w-full max-w-xs",
|
|
6199
6201
|
onChange: (t) => {
|
|
6200
6202
|
let n = t.target.value;
|
|
6201
|
-
Q(
|
|
6203
|
+
Q(Mi, n) && o({
|
|
6202
6204
|
...e,
|
|
6203
6205
|
perCadenceValue: n
|
|
6204
6206
|
});
|
|
6205
6207
|
},
|
|
6206
|
-
children:
|
|
6208
|
+
children: Mi.map((e) => /* @__PURE__ */ V(P, {
|
|
6207
6209
|
value: e,
|
|
6208
|
-
children:
|
|
6210
|
+
children: Li(e)
|
|
6209
6211
|
}, e))
|
|
6210
6212
|
})] }),
|
|
6211
6213
|
/* @__PURE__ */ H(N, { children: [/* @__PURE__ */ V(M, {
|
|
@@ -6253,7 +6255,7 @@ function Li({ parameter: e, index: t, label: n, defaultOpen: r = !1, canMoveUp:
|
|
|
6253
6255
|
] })
|
|
6254
6256
|
});
|
|
6255
6257
|
}
|
|
6256
|
-
function
|
|
6258
|
+
function zi({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1, onChange: i, onRemove: a }) {
|
|
6257
6259
|
let o = E(), [s, c] = z([]), l = q(), u = new Set(t.parameters.map((e) => e.parameterId)), d = n.filter((e) => e.type === "numeric" && !u.has(e.parameterId)), f = new Map(n.map((e) => [e.parameterId, e.label])), p = (e) => {
|
|
6258
6260
|
i({
|
|
6259
6261
|
...t,
|
|
@@ -6267,7 +6269,7 @@ function Ri({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
6267
6269
|
return /* @__PURE__ */ H(Z, {
|
|
6268
6270
|
defaultOpen: r,
|
|
6269
6271
|
contentClassName: "space-y-4",
|
|
6270
|
-
title: /* @__PURE__ */ V(
|
|
6272
|
+
title: /* @__PURE__ */ V(sr, {
|
|
6271
6273
|
type: "time-buckets",
|
|
6272
6274
|
representationKey: e
|
|
6273
6275
|
}),
|
|
@@ -6298,11 +6300,11 @@ function Ri({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
6298
6300
|
className: "w-full max-w-xs",
|
|
6299
6301
|
onChange: (e) => {
|
|
6300
6302
|
let t = e.target.value;
|
|
6301
|
-
Q(
|
|
6303
|
+
Q(Di, t) && p({ legend: t });
|
|
6302
6304
|
},
|
|
6303
|
-
children:
|
|
6305
|
+
children: Di.map((e) => /* @__PURE__ */ V(P, {
|
|
6304
6306
|
value: e,
|
|
6305
|
-
children:
|
|
6307
|
+
children: Ni(e)
|
|
6306
6308
|
}, e))
|
|
6307
6309
|
})] }),
|
|
6308
6310
|
/* @__PURE__ */ H(N, {
|
|
@@ -6328,11 +6330,11 @@ function Ri({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
6328
6330
|
className: "w-full max-w-xs",
|
|
6329
6331
|
onChange: (e) => {
|
|
6330
6332
|
let t = e.target.value;
|
|
6331
|
-
Q(
|
|
6333
|
+
Q(Oi, t) && p({ chartDisplay: t });
|
|
6332
6334
|
},
|
|
6333
|
-
children:
|
|
6335
|
+
children: Oi.map((e) => /* @__PURE__ */ V(P, {
|
|
6334
6336
|
value: e,
|
|
6335
|
-
children:
|
|
6337
|
+
children: Pi(e)
|
|
6336
6338
|
}, e))
|
|
6337
6339
|
})] }),
|
|
6338
6340
|
/* @__PURE__ */ H(N, { children: [/* @__PURE__ */ V(M, {
|
|
@@ -6344,11 +6346,11 @@ function Ri({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
6344
6346
|
className: "w-full max-w-xs",
|
|
6345
6347
|
onChange: (e) => {
|
|
6346
6348
|
let t = e.target.value;
|
|
6347
|
-
Q(
|
|
6349
|
+
Q(ki, t) && p({ navStrip: t });
|
|
6348
6350
|
},
|
|
6349
|
-
children:
|
|
6351
|
+
children: ki.map((e) => /* @__PURE__ */ V(P, {
|
|
6350
6352
|
value: e,
|
|
6351
|
-
children:
|
|
6353
|
+
children: Fi(e)
|
|
6352
6354
|
}, e))
|
|
6353
6355
|
})] }),
|
|
6354
6356
|
/* @__PURE__ */ H(N, { children: [/* @__PURE__ */ V(M, {
|
|
@@ -6360,9 +6362,9 @@ function Ri({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
6360
6362
|
className: "w-full max-w-xs",
|
|
6361
6363
|
onChange: (e) => {
|
|
6362
6364
|
let t = e.target.value;
|
|
6363
|
-
Q(
|
|
6365
|
+
Q(ji, t) && p({ cadence: t });
|
|
6364
6366
|
},
|
|
6365
|
-
children:
|
|
6367
|
+
children: ji.map((e) => /* @__PURE__ */ V(P, {
|
|
6366
6368
|
value: e,
|
|
6367
6369
|
children: e
|
|
6368
6370
|
}, e))
|
|
@@ -6376,11 +6378,11 @@ function Ri({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
6376
6378
|
className: "w-full max-w-xs",
|
|
6377
6379
|
onChange: (e) => {
|
|
6378
6380
|
let t = e.target.value;
|
|
6379
|
-
Q(
|
|
6381
|
+
Q(Ai, t) && p({ displayAs: t });
|
|
6380
6382
|
},
|
|
6381
|
-
children:
|
|
6383
|
+
children: Ai.map((e) => /* @__PURE__ */ V(P, {
|
|
6382
6384
|
value: e,
|
|
6383
|
-
children:
|
|
6385
|
+
children: Ii(e)
|
|
6384
6386
|
}, e))
|
|
6385
6387
|
})] })
|
|
6386
6388
|
] }), /* @__PURE__ */ H(j, { children: [
|
|
@@ -6390,7 +6392,7 @@ function Ri({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
6390
6392
|
children: o("report_time_buckets_parameters_empty")
|
|
6391
6393
|
}) : /* @__PURE__ */ V("div", {
|
|
6392
6394
|
className: "space-y-3",
|
|
6393
|
-
children: t.parameters.map((e, n) => /* @__PURE__ */ V(
|
|
6395
|
+
children: t.parameters.map((e, n) => /* @__PURE__ */ V(Ri, {
|
|
6394
6396
|
parameter: e,
|
|
6395
6397
|
index: n,
|
|
6396
6398
|
label: f.get(e.parameterId) ?? e.parameterId,
|
|
@@ -6473,7 +6475,7 @@ function Ri({ representationKey: e, setup: t, snapshots: n, defaultOpen: r = !1,
|
|
|
6473
6475
|
});
|
|
6474
6476
|
}
|
|
6475
6477
|
// src/workspace/setup/report/edit/state.ts
|
|
6476
|
-
var
|
|
6478
|
+
var Bi = [
|
|
6477
6479
|
"chart",
|
|
6478
6480
|
"table",
|
|
6479
6481
|
"time-buckets",
|
|
@@ -6482,7 +6484,7 @@ var zi = [
|
|
|
6482
6484
|
"hourly-matrix",
|
|
6483
6485
|
"state-duration",
|
|
6484
6486
|
"sankey"
|
|
6485
|
-
],
|
|
6487
|
+
], Vi = {
|
|
6486
6488
|
chart: l,
|
|
6487
6489
|
table: De,
|
|
6488
6490
|
"time-buckets": S,
|
|
@@ -6492,16 +6494,16 @@ var zi = [
|
|
|
6492
6494
|
"state-duration": be,
|
|
6493
6495
|
sankey: Ne
|
|
6494
6496
|
};
|
|
6495
|
-
function
|
|
6497
|
+
function Hi(e, t) {
|
|
6496
6498
|
return ve(e.representations).has(t);
|
|
6497
6499
|
}
|
|
6498
|
-
function
|
|
6500
|
+
function Ui(e, t) {
|
|
6499
6501
|
return de(e.layout, t);
|
|
6500
6502
|
}
|
|
6501
|
-
function
|
|
6503
|
+
function Wi(e, t) {
|
|
6502
6504
|
switch (t.type) {
|
|
6503
6505
|
case "parameter-removed": {
|
|
6504
|
-
let n =
|
|
6506
|
+
let n = Hi(e, t.parameterId) ? Te(e.representations, t.parameterId) : e.representations, r = e.parameters.filter((e) => e.parameterId !== t.parameterId), i = new Set(r.map((e) => e.parameterId));
|
|
6505
6507
|
return {
|
|
6506
6508
|
...e,
|
|
6507
6509
|
representations: n,
|
|
@@ -6524,7 +6526,7 @@ function Ui(e, t) {
|
|
|
6524
6526
|
...e,
|
|
6525
6527
|
representations: {
|
|
6526
6528
|
...e.representations,
|
|
6527
|
-
[t.key]:
|
|
6529
|
+
[t.key]: Vi[t.representationType]()
|
|
6528
6530
|
},
|
|
6529
6531
|
layout: o(e.layout, t.key)
|
|
6530
6532
|
};
|
|
@@ -6556,7 +6558,7 @@ function Ui(e, t) {
|
|
|
6556
6558
|
}
|
|
6557
6559
|
}
|
|
6558
6560
|
// src/workspace/setup/report/edit/representations-section.tsx
|
|
6559
|
-
function
|
|
6561
|
+
function Gi({ representations: e, parameters: t, wasJustAdded: n, onAdd: r, onChange: i, onRemove: a }) {
|
|
6560
6562
|
let o = E(), s = (e) => {
|
|
6561
6563
|
switch (e) {
|
|
6562
6564
|
case "chart": return o("report_add_chart");
|
|
@@ -6592,39 +6594,39 @@ function Wi({ representations: e, parameters: t, wasJustAdded: n, onAdd: r, onCh
|
|
|
6592
6594
|
}
|
|
6593
6595
|
};
|
|
6594
6596
|
switch (o.type) {
|
|
6595
|
-
case "chart": return /* @__PURE__ */ V(
|
|
6597
|
+
case "chart": return /* @__PURE__ */ V(Fr, {
|
|
6596
6598
|
...s,
|
|
6597
6599
|
setup: o
|
|
6598
6600
|
}, r);
|
|
6599
|
-
case "table": return /* @__PURE__ */ V(
|
|
6601
|
+
case "table": return /* @__PURE__ */ V(Ei, {
|
|
6600
6602
|
...s,
|
|
6601
6603
|
setup: o
|
|
6602
6604
|
}, r);
|
|
6603
|
-
case "time-buckets": return /* @__PURE__ */ V(
|
|
6605
|
+
case "time-buckets": return /* @__PURE__ */ V(zi, {
|
|
6604
6606
|
...s,
|
|
6605
6607
|
setup: o
|
|
6606
6608
|
}, r);
|
|
6607
|
-
case "histogram": return /* @__PURE__ */ V(
|
|
6609
|
+
case "histogram": return /* @__PURE__ */ V(Gr, {
|
|
6608
6610
|
...s,
|
|
6609
6611
|
setup: o
|
|
6610
6612
|
}, r);
|
|
6611
|
-
case "calendar": return /* @__PURE__ */ V(
|
|
6613
|
+
case "calendar": return /* @__PURE__ */ V(Sr, {
|
|
6612
6614
|
...s,
|
|
6613
6615
|
setup: o
|
|
6614
6616
|
}, r);
|
|
6615
|
-
case "hourly-matrix": return /* @__PURE__ */ V(
|
|
6617
|
+
case "hourly-matrix": return /* @__PURE__ */ V(ni, {
|
|
6616
6618
|
...s,
|
|
6617
6619
|
setup: o
|
|
6618
6620
|
}, r);
|
|
6619
|
-
case "state-duration": return /* @__PURE__ */ V(
|
|
6621
|
+
case "state-duration": return /* @__PURE__ */ V(fi, {
|
|
6620
6622
|
...s,
|
|
6621
6623
|
setup: o
|
|
6622
6624
|
}, r);
|
|
6623
|
-
case "sankey": return /* @__PURE__ */ V(
|
|
6625
|
+
case "sankey": return /* @__PURE__ */ V(ci, {
|
|
6624
6626
|
...s,
|
|
6625
6627
|
setup: o
|
|
6626
6628
|
}, r);
|
|
6627
|
-
default: return /* @__PURE__ */ V(
|
|
6629
|
+
default: return /* @__PURE__ */ V(Pr, {
|
|
6628
6630
|
representationKey: r,
|
|
6629
6631
|
entry: o,
|
|
6630
6632
|
onRemove: s.onRemove
|
|
@@ -6633,7 +6635,7 @@ function Wi({ representations: e, parameters: t, wasJustAdded: n, onAdd: r, onCh
|
|
|
6633
6635
|
}),
|
|
6634
6636
|
/* @__PURE__ */ V("div", {
|
|
6635
6637
|
className: "flex flex-wrap gap-2",
|
|
6636
|
-
children:
|
|
6638
|
+
children: Bi.map((e) => /* @__PURE__ */ H(O, {
|
|
6637
6639
|
type: "button",
|
|
6638
6640
|
variant: "outline",
|
|
6639
6641
|
size: "sm",
|
|
@@ -6647,7 +6649,7 @@ function Wi({ representations: e, parameters: t, wasJustAdded: n, onAdd: r, onCh
|
|
|
6647
6649
|
});
|
|
6648
6650
|
}
|
|
6649
6651
|
// src/workspace/setup/report/edit/sections.tsx
|
|
6650
|
-
var
|
|
6652
|
+
var Ki = [
|
|
6651
6653
|
"precise",
|
|
6652
6654
|
"1s",
|
|
6653
6655
|
"1m",
|
|
@@ -6657,7 +6659,7 @@ var Gi = [
|
|
|
6657
6659
|
"1h",
|
|
6658
6660
|
"4h",
|
|
6659
6661
|
"1d"
|
|
6660
|
-
],
|
|
6662
|
+
], qi = [
|
|
6661
6663
|
"first",
|
|
6662
6664
|
"latest",
|
|
6663
6665
|
"average",
|
|
@@ -6665,20 +6667,20 @@ var Gi = [
|
|
|
6665
6667
|
"sum",
|
|
6666
6668
|
"min",
|
|
6667
6669
|
"max"
|
|
6668
|
-
],
|
|
6670
|
+
], Ji = ["first", "latest"], Yi = [
|
|
6669
6671
|
"fixed",
|
|
6670
6672
|
"current",
|
|
6671
6673
|
"last-days",
|
|
6672
6674
|
"from-to-now",
|
|
6673
6675
|
"full-range-to-now"
|
|
6674
|
-
],
|
|
6676
|
+
], Xi = [
|
|
6675
6677
|
"hour",
|
|
6676
6678
|
"day",
|
|
6677
6679
|
"week",
|
|
6678
6680
|
"month",
|
|
6679
6681
|
"year"
|
|
6680
6682
|
];
|
|
6681
|
-
function
|
|
6683
|
+
function Zi(e) {
|
|
6682
6684
|
let t = Date.now(), n = 6048e5;
|
|
6683
6685
|
switch (e) {
|
|
6684
6686
|
case "fixed": return {
|
|
@@ -6701,7 +6703,7 @@ function Xi(e) {
|
|
|
6701
6703
|
case "full-range-to-now": return { type: "full-range-to-now" };
|
|
6702
6704
|
}
|
|
6703
6705
|
}
|
|
6704
|
-
function
|
|
6706
|
+
function Qi(e) {
|
|
6705
6707
|
switch (e) {
|
|
6706
6708
|
case "fixed": return w("report_time_range_fixed");
|
|
6707
6709
|
case "current": return w("report_time_range_current");
|
|
@@ -6710,7 +6712,7 @@ function Zi(e) {
|
|
|
6710
6712
|
case "full-range-to-now": return w("report_time_range_full_range_to_now");
|
|
6711
6713
|
}
|
|
6712
6714
|
}
|
|
6713
|
-
function
|
|
6715
|
+
function $i(e) {
|
|
6714
6716
|
switch (e) {
|
|
6715
6717
|
case "hour": return w("report_time_range_segment_hour");
|
|
6716
6718
|
case "day": return w("report_time_range_segment_day");
|
|
@@ -6719,7 +6721,7 @@ function Qi(e) {
|
|
|
6719
6721
|
case "year": return w("report_time_range_segment_year");
|
|
6720
6722
|
}
|
|
6721
6723
|
}
|
|
6722
|
-
function
|
|
6724
|
+
function ea(e) {
|
|
6723
6725
|
switch (e) {
|
|
6724
6726
|
case "first": return w("report_table_per_cadence_first");
|
|
6725
6727
|
case "latest": return w("report_table_per_cadence_latest");
|
|
@@ -6730,8 +6732,8 @@ function $i(e) {
|
|
|
6730
6732
|
case "max": return w("report_table_totals_max");
|
|
6731
6733
|
}
|
|
6732
6734
|
}
|
|
6733
|
-
function
|
|
6734
|
-
let r =
|
|
6735
|
+
function ta({ id: e, valueMs: t, onCommit: n }) {
|
|
6736
|
+
let r = Bt(t), [i, a] = z(r), [o, s] = z(!1);
|
|
6735
6737
|
return /* @__PURE__ */ V(R, {
|
|
6736
6738
|
id: e,
|
|
6737
6739
|
type: "text",
|
|
@@ -6745,16 +6747,16 @@ function ea({ id: e, valueMs: t, onCommit: n }) {
|
|
|
6745
6747
|
},
|
|
6746
6748
|
onBlur: () => {
|
|
6747
6749
|
s(!1);
|
|
6748
|
-
let e =
|
|
6749
|
-
e == null ? a(r) : (n(e.getTime()), a(
|
|
6750
|
+
let e = Vt(i);
|
|
6751
|
+
e == null ? a(r) : (n(e.getTime()), a(Bt(e)));
|
|
6750
6752
|
},
|
|
6751
6753
|
onChange: (e) => {
|
|
6752
6754
|
a(e.target.value);
|
|
6753
6755
|
}
|
|
6754
6756
|
});
|
|
6755
6757
|
}
|
|
6756
|
-
function
|
|
6757
|
-
let a = E(), o = e.icon !== "" && ae.some((t) => t === e.icon) ? e.icon :
|
|
6758
|
+
function na({ parameter: e, index: t, defaultOpen: n = !1, onChange: r, onRemove: i }) {
|
|
6759
|
+
let a = E(), o = e.icon !== "" && ae.some((t) => t === e.icon) ? e.icon : mn, s = e.label.trim(), c = s.length > 0 ? s : e.parameterId, l = s.length > 0 ? `${e.type} · ${e.parameterId}` : e.type;
|
|
6758
6760
|
return /* @__PURE__ */ H(Z, {
|
|
6759
6761
|
defaultOpen: n,
|
|
6760
6762
|
title: /* @__PURE__ */ V(J, {
|
|
@@ -6834,7 +6836,7 @@ function ta({ parameter: e, index: t, defaultOpen: n = !1, onChange: r, onRemove
|
|
|
6834
6836
|
},
|
|
6835
6837
|
className: "flex flex-wrap",
|
|
6836
6838
|
children: [/* @__PURE__ */ V(Qe, {
|
|
6837
|
-
value:
|
|
6839
|
+
value: mn,
|
|
6838
6840
|
"aria-label": a("report_parameter_icon_none"),
|
|
6839
6841
|
className: "size-7 min-w-7 p-0"
|
|
6840
6842
|
}), ae.map((e) => /* @__PURE__ */ V(Qe, {
|
|
@@ -7022,7 +7024,7 @@ function ta({ parameter: e, index: t, defaultOpen: n = !1, onChange: r, onRemove
|
|
|
7022
7024
|
]
|
|
7023
7025
|
});
|
|
7024
7026
|
}
|
|
7025
|
-
function
|
|
7027
|
+
function ra({ value: e, onChange: t }) {
|
|
7026
7028
|
let n = E();
|
|
7027
7029
|
return /* @__PURE__ */ H(B, { children: [
|
|
7028
7030
|
/* @__PURE__ */ H(N, { children: [/* @__PURE__ */ V(M, {
|
|
@@ -7033,17 +7035,17 @@ function na({ value: e, onChange: t }) {
|
|
|
7033
7035
|
value: e.type,
|
|
7034
7036
|
onChange: (n) => {
|
|
7035
7037
|
let r = n.target.value;
|
|
7036
|
-
Q(
|
|
7038
|
+
Q(Yi, r) && r !== e.type && t(Zi(r));
|
|
7037
7039
|
},
|
|
7038
|
-
children:
|
|
7040
|
+
children: Yi.map((e) => /* @__PURE__ */ V(P, {
|
|
7039
7041
|
value: e,
|
|
7040
|
-
children:
|
|
7042
|
+
children: Qi(e)
|
|
7041
7043
|
}, e))
|
|
7042
7044
|
})] }),
|
|
7043
7045
|
e.type === "fixed" ? /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ H(N, { children: [/* @__PURE__ */ V(M, {
|
|
7044
7046
|
htmlFor: "setup-report-time-range-from",
|
|
7045
7047
|
children: n("report_time_range_from")
|
|
7046
|
-
}), /* @__PURE__ */ V(
|
|
7048
|
+
}), /* @__PURE__ */ V(ta, {
|
|
7047
7049
|
id: "setup-report-time-range-from",
|
|
7048
7050
|
valueMs: e.from,
|
|
7049
7051
|
onCommit: (n) => {
|
|
@@ -7055,7 +7057,7 @@ function na({ value: e, onChange: t }) {
|
|
|
7055
7057
|
})] }), /* @__PURE__ */ H(N, { children: [/* @__PURE__ */ V(M, {
|
|
7056
7058
|
htmlFor: "setup-report-time-range-to",
|
|
7057
7059
|
children: n("report_time_range_to")
|
|
7058
|
-
}), /* @__PURE__ */ V(
|
|
7060
|
+
}), /* @__PURE__ */ V(ta, {
|
|
7059
7061
|
id: "setup-report-time-range-to",
|
|
7060
7062
|
valueMs: e.to,
|
|
7061
7063
|
onCommit: (n) => {
|
|
@@ -7073,14 +7075,14 @@ function na({ value: e, onChange: t }) {
|
|
|
7073
7075
|
value: e.segment,
|
|
7074
7076
|
onChange: (e) => {
|
|
7075
7077
|
let n = e.target.value;
|
|
7076
|
-
Q(
|
|
7078
|
+
Q(Xi, n) && t({
|
|
7077
7079
|
type: "current",
|
|
7078
7080
|
segment: n
|
|
7079
7081
|
});
|
|
7080
7082
|
},
|
|
7081
|
-
children:
|
|
7083
|
+
children: Xi.map((e) => /* @__PURE__ */ V(P, {
|
|
7082
7084
|
value: e,
|
|
7083
|
-
children:
|
|
7085
|
+
children: $i(e)
|
|
7084
7086
|
}, e))
|
|
7085
7087
|
})] }) : null,
|
|
7086
7088
|
e.type === "last-days" ? /* @__PURE__ */ H(N, { children: [/* @__PURE__ */ V(M, {
|
|
@@ -7101,7 +7103,7 @@ function na({ value: e, onChange: t }) {
|
|
|
7101
7103
|
e.type === "from-to-now" ? /* @__PURE__ */ H(N, { children: [/* @__PURE__ */ V(M, {
|
|
7102
7104
|
htmlFor: "setup-report-time-range-from-now",
|
|
7103
7105
|
children: n("report_time_range_from")
|
|
7104
|
-
}), /* @__PURE__ */ V(
|
|
7106
|
+
}), /* @__PURE__ */ V(ta, {
|
|
7105
7107
|
id: "setup-report-time-range-from-now",
|
|
7106
7108
|
valueMs: e.from,
|
|
7107
7109
|
onCommit: (e) => {
|
|
@@ -7113,7 +7115,7 @@ function na({ value: e, onChange: t }) {
|
|
|
7113
7115
|
})] }) : null
|
|
7114
7116
|
] });
|
|
7115
7117
|
}
|
|
7116
|
-
function
|
|
7118
|
+
function ia({ value: e, onChange: t }) {
|
|
7117
7119
|
let n = E(), r = e === "browser" ? "browser" : "custom";
|
|
7118
7120
|
return /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ H(N, { children: [/* @__PURE__ */ V(M, {
|
|
7119
7121
|
htmlFor: "setup-report-timezone-mode",
|
|
@@ -7145,7 +7147,7 @@ function ra({ value: e, onChange: t }) {
|
|
|
7145
7147
|
}
|
|
7146
7148
|
})] }) : null] });
|
|
7147
7149
|
}
|
|
7148
|
-
function
|
|
7150
|
+
function aa({ enabled: e, exportToCsv: t, parameters: n, onEnabledChange: r, onExportChange: i }) {
|
|
7149
7151
|
let a = E(), o = q();
|
|
7150
7152
|
return /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ H(N, {
|
|
7151
7153
|
orientation: "horizontal",
|
|
@@ -7198,12 +7200,12 @@ function ia({ enabled: e, exportToCsv: t, parameters: n, onEnabledChange: r, onE
|
|
|
7198
7200
|
value: t.cadence,
|
|
7199
7201
|
onChange: (e) => {
|
|
7200
7202
|
let n = e.target.value;
|
|
7201
|
-
Q(
|
|
7203
|
+
Q(Ki, n) && i({
|
|
7202
7204
|
...t,
|
|
7203
7205
|
cadence: n
|
|
7204
7206
|
});
|
|
7205
7207
|
},
|
|
7206
|
-
children:
|
|
7208
|
+
children: Ki.map((e) => /* @__PURE__ */ V(P, {
|
|
7207
7209
|
value: e,
|
|
7208
7210
|
children: e
|
|
7209
7211
|
}, e))
|
|
@@ -7216,14 +7218,14 @@ function ia({ enabled: e, exportToCsv: t, parameters: n, onEnabledChange: r, onE
|
|
|
7216
7218
|
value: t.numericAggregation,
|
|
7217
7219
|
onChange: (e) => {
|
|
7218
7220
|
let n = e.target.value;
|
|
7219
|
-
Q(
|
|
7221
|
+
Q(qi, n) && i({
|
|
7220
7222
|
...t,
|
|
7221
7223
|
numericAggregation: n
|
|
7222
7224
|
});
|
|
7223
7225
|
},
|
|
7224
|
-
children:
|
|
7226
|
+
children: qi.map((e) => /* @__PURE__ */ V(P, {
|
|
7225
7227
|
value: e,
|
|
7226
|
-
children:
|
|
7228
|
+
children: ea(e)
|
|
7227
7229
|
}, e))
|
|
7228
7230
|
})] }),
|
|
7229
7231
|
/* @__PURE__ */ H(N, { children: [/* @__PURE__ */ V(M, {
|
|
@@ -7234,14 +7236,14 @@ function ia({ enabled: e, exportToCsv: t, parameters: n, onEnabledChange: r, onE
|
|
|
7234
7236
|
value: t.integerAggregation,
|
|
7235
7237
|
onChange: (e) => {
|
|
7236
7238
|
let n = e.target.value;
|
|
7237
|
-
Q(
|
|
7239
|
+
Q(Ji, n) && i({
|
|
7238
7240
|
...t,
|
|
7239
7241
|
integerAggregation: n
|
|
7240
7242
|
});
|
|
7241
7243
|
},
|
|
7242
|
-
children:
|
|
7244
|
+
children: Ji.map((e) => /* @__PURE__ */ V(P, {
|
|
7243
7245
|
value: e,
|
|
7244
|
-
children:
|
|
7246
|
+
children: ea(e)
|
|
7245
7247
|
}, e))
|
|
7246
7248
|
})] }),
|
|
7247
7249
|
/* @__PURE__ */ H(N, { children: [/* @__PURE__ */ V(M, {
|
|
@@ -7252,48 +7254,48 @@ function ia({ enabled: e, exportToCsv: t, parameters: n, onEnabledChange: r, onE
|
|
|
7252
7254
|
value: t.stringAggregation,
|
|
7253
7255
|
onChange: (e) => {
|
|
7254
7256
|
let n = e.target.value;
|
|
7255
|
-
Q(
|
|
7257
|
+
Q(Ji, n) && i({
|
|
7256
7258
|
...t,
|
|
7257
7259
|
stringAggregation: n
|
|
7258
7260
|
});
|
|
7259
7261
|
},
|
|
7260
|
-
children:
|
|
7262
|
+
children: Ji.map((e) => /* @__PURE__ */ V(P, {
|
|
7261
7263
|
value: e,
|
|
7262
|
-
children:
|
|
7264
|
+
children: ea(e)
|
|
7263
7265
|
}, e))
|
|
7264
7266
|
})] })
|
|
7265
7267
|
]
|
|
7266
7268
|
}) : null] });
|
|
7267
7269
|
}
|
|
7268
7270
|
// src/workspace/setup/report/edit/form.tsx
|
|
7269
|
-
var
|
|
7271
|
+
var oa = {
|
|
7270
7272
|
allowAddComments: "report_flag_allow_add_comments",
|
|
7271
7273
|
displayCommentsSummary: "report_flag_display_comments_summary",
|
|
7272
7274
|
allowSigning: "report_flag_allow_signing",
|
|
7273
7275
|
allowRender: "report_flag_allow_render",
|
|
7274
7276
|
showEditButton: "report_flag_show_edit_button"
|
|
7275
|
-
},
|
|
7277
|
+
}, sa = [
|
|
7276
7278
|
"allowAddComments",
|
|
7277
7279
|
"displayCommentsSummary",
|
|
7278
7280
|
"allowSigning",
|
|
7279
7281
|
"allowRender",
|
|
7280
7282
|
"showEditButton"
|
|
7281
7283
|
];
|
|
7282
|
-
function
|
|
7284
|
+
function ca({ workspaceId: e, preset: t, editorMode: n, onClose: r, onReload: i }) {
|
|
7283
7285
|
let a = E(), o = We(), c = ee(e), l = St(t?.revision), d = T(), [f, p] = z(!1), [h, g] = z(null), _ = q(), v = q(), y = u({
|
|
7284
|
-
defaultValues:
|
|
7286
|
+
defaultValues: en(t, d),
|
|
7285
7287
|
validators: He({
|
|
7286
|
-
schema:
|
|
7288
|
+
schema: tn,
|
|
7287
7289
|
submit: async (t) => {
|
|
7288
|
-
let r =
|
|
7290
|
+
let r = Ln({
|
|
7289
7291
|
mode: n,
|
|
7290
7292
|
workspaceId: e,
|
|
7291
|
-
payload:
|
|
7293
|
+
payload: $t(t),
|
|
7292
7294
|
...l.baseRevision === void 0 ? {} : { baseRevision: l.baseRevision }
|
|
7293
7295
|
});
|
|
7294
7296
|
return r.procedure === "create" ? await c.create.mutateAsync(r.input) : await c[r.procedure].mutateAsync(r.input), null;
|
|
7295
7297
|
},
|
|
7296
|
-
mapError: l.mapError((e, t) => s(e, t, { message:
|
|
7298
|
+
mapError: l.mapError((e, t) => s(e, t, { message: Ot })),
|
|
7297
7299
|
onError: l.onError
|
|
7298
7300
|
}),
|
|
7299
7301
|
onSubmitInvalid: m,
|
|
@@ -7301,7 +7303,7 @@ function sa({ workspaceId: e, preset: t, editorMode: n, onClose: r, onReload: i
|
|
|
7301
7303
|
o.success(n.kind === "create" ? a("report_create_toast") : a("report_update_toast")), r();
|
|
7302
7304
|
}
|
|
7303
7305
|
}), b = (e) => {
|
|
7304
|
-
let t = y.state.values, n =
|
|
7306
|
+
let t = y.state.values, n = Wi(t, e);
|
|
7305
7307
|
n.representations !== t.representations && y.setFieldValue("representations", n.representations), n.parameters !== t.parameters && y.setFieldValue("parameters", n.parameters), n.layout !== t.layout && y.setFieldValue("layout", n.layout), n.exportToCsvEnabled !== t.exportToCsvEnabled && y.setFieldValue("exportToCsvEnabled", n.exportToCsvEnabled), n.exportToCsv !== t.exportToCsv && y.setFieldValue("exportToCsv", n.exportToCsv);
|
|
7306
7308
|
}, x = (e) => {
|
|
7307
7309
|
b(e.kind === "parameter" ? {
|
|
@@ -7312,7 +7314,7 @@ function sa({ workspaceId: e, preset: t, editorMode: n, onClose: r, onReload: i
|
|
|
7312
7314
|
key: e.id
|
|
7313
7315
|
});
|
|
7314
7316
|
}, te = (e) => {
|
|
7315
|
-
(e.kind === "parameter" ?
|
|
7317
|
+
(e.kind === "parameter" ? Hi(y.state.values, e.id) : Ui(y.state.values, e.id)) ? g(e) : x(e);
|
|
7316
7318
|
}, ne = () => {
|
|
7317
7319
|
h != null && x(h), g(null);
|
|
7318
7320
|
}, re = () => {
|
|
@@ -7356,7 +7358,7 @@ function sa({ workspaceId: e, preset: t, editorMode: n, onClose: r, onReload: i
|
|
|
7356
7358
|
selector: (e) => e.values.parameters,
|
|
7357
7359
|
children: (e) => /* @__PURE__ */ H("div", {
|
|
7358
7360
|
className: "space-y-3",
|
|
7359
|
-
children: [e.map((e, t) => /* @__PURE__ */ V(
|
|
7361
|
+
children: [e.map((e, t) => /* @__PURE__ */ V(na, {
|
|
7360
7362
|
parameter: e,
|
|
7361
7363
|
index: t,
|
|
7362
7364
|
defaultOpen: _.wasJustAdded(e.parameterId),
|
|
@@ -7385,7 +7387,7 @@ function sa({ workspaceId: e, preset: t, editorMode: n, onClose: r, onReload: i
|
|
|
7385
7387
|
representations: e.values.representations,
|
|
7386
7388
|
parameters: e.values.parameters
|
|
7387
7389
|
}),
|
|
7388
|
-
children: ({ representations: e, parameters: t }) => /* @__PURE__ */ V(
|
|
7390
|
+
children: ({ representations: e, parameters: t }) => /* @__PURE__ */ V(Gi, {
|
|
7389
7391
|
representations: e,
|
|
7390
7392
|
parameters: t,
|
|
7391
7393
|
wasJustAdded: v.wasJustAdded,
|
|
@@ -7416,7 +7418,7 @@ function sa({ workspaceId: e, preset: t, editorMode: n, onClose: r, onReload: i
|
|
|
7416
7418
|
layout: e.values.layout,
|
|
7417
7419
|
representations: e.values.representations
|
|
7418
7420
|
}),
|
|
7419
|
-
children: ({ layout: e, representations: t }) => /* @__PURE__ */ V(
|
|
7421
|
+
children: ({ layout: e, representations: t }) => /* @__PURE__ */ V(hr, {
|
|
7420
7422
|
layout: e,
|
|
7421
7423
|
representations: t,
|
|
7422
7424
|
onChange: (e) => {
|
|
@@ -7427,7 +7429,7 @@ function sa({ workspaceId: e, preset: t, editorMode: n, onClose: r, onReload: i
|
|
|
7427
7429
|
/* @__PURE__ */ H(j, { children: [/* @__PURE__ */ V(F, { children: a("report_section_time_range") }), /* @__PURE__ */ H(I, { children: [
|
|
7428
7430
|
/* @__PURE__ */ V(y.Subscribe, {
|
|
7429
7431
|
selector: (e) => e.values.defaultTimeRange,
|
|
7430
|
-
children: (e) => /* @__PURE__ */ V(
|
|
7432
|
+
children: (e) => /* @__PURE__ */ V(ra, {
|
|
7431
7433
|
value: e,
|
|
7432
7434
|
onChange: (e) => {
|
|
7433
7435
|
y.setFieldValue("defaultTimeRange", e);
|
|
@@ -7453,7 +7455,7 @@ function sa({ workspaceId: e, preset: t, editorMode: n, onClose: r, onReload: i
|
|
|
7453
7455
|
}),
|
|
7454
7456
|
/* @__PURE__ */ V(y.Subscribe, {
|
|
7455
7457
|
selector: (e) => e.values.timezone,
|
|
7456
|
-
children: (e) => /* @__PURE__ */ V(
|
|
7458
|
+
children: (e) => /* @__PURE__ */ V(ia, {
|
|
7457
7459
|
value: e,
|
|
7458
7460
|
onChange: (e) => {
|
|
7459
7461
|
y.setFieldValue("timezone", e);
|
|
@@ -7461,7 +7463,7 @@ function sa({ workspaceId: e, preset: t, editorMode: n, onClose: r, onReload: i
|
|
|
7461
7463
|
})
|
|
7462
7464
|
})
|
|
7463
7465
|
] })] }),
|
|
7464
|
-
/* @__PURE__ */ H(j, { children: [/* @__PURE__ */ V(F, { children: a("report_section_flags") }), /* @__PURE__ */ H(I, { children: [
|
|
7466
|
+
/* @__PURE__ */ H(j, { children: [/* @__PURE__ */ V(F, { children: a("report_section_flags") }), /* @__PURE__ */ H(I, { children: [sa.map((e) => /* @__PURE__ */ V(y.AppField, {
|
|
7465
7467
|
name: e,
|
|
7466
7468
|
children: (t) => /* @__PURE__ */ H(N, {
|
|
7467
7469
|
orientation: "horizontal",
|
|
@@ -7474,7 +7476,7 @@ function sa({ workspaceId: e, preset: t, editorMode: n, onClose: r, onReload: i
|
|
|
7474
7476
|
}
|
|
7475
7477
|
}), /* @__PURE__ */ V(M, {
|
|
7476
7478
|
htmlFor: `setup-report-${e}`,
|
|
7477
|
-
children: a(
|
|
7479
|
+
children: a(oa[e])
|
|
7478
7480
|
})]
|
|
7479
7481
|
})
|
|
7480
7482
|
}, e)), /* @__PURE__ */ V(y.Subscribe, {
|
|
@@ -7483,7 +7485,7 @@ function sa({ workspaceId: e, preset: t, editorMode: n, onClose: r, onReload: i
|
|
|
7483
7485
|
exportToCsv: e.values.exportToCsv,
|
|
7484
7486
|
parameters: e.values.parameters
|
|
7485
7487
|
}),
|
|
7486
|
-
children: ({ enabled: e, exportToCsv: t, parameters: n }) => /* @__PURE__ */ V(
|
|
7488
|
+
children: ({ enabled: e, exportToCsv: t, parameters: n }) => /* @__PURE__ */ V(aa, {
|
|
7487
7489
|
enabled: e,
|
|
7488
7490
|
exportToCsv: t,
|
|
7489
7491
|
parameters: n,
|
|
@@ -7508,7 +7510,7 @@ function sa({ workspaceId: e, preset: t, editorMode: n, onClose: r, onReload: i
|
|
|
7508
7510
|
},
|
|
7509
7511
|
children: /* @__PURE__ */ V(Ke, {
|
|
7510
7512
|
className: "sm:max-w-xl",
|
|
7511
|
-
children: f ? /* @__PURE__ */ V(
|
|
7513
|
+
children: f ? /* @__PURE__ */ V(or, {
|
|
7512
7514
|
workspaceId: e,
|
|
7513
7515
|
existingIds: new Set(y.state.values.parameters.map((e) => e.parameterId)),
|
|
7514
7516
|
existingColors: y.state.values.parameters.map((e) => e.defaultColor),
|
|
@@ -7524,7 +7526,7 @@ function sa({ workspaceId: e, preset: t, editorMode: n, onClose: r, onReload: i
|
|
|
7524
7526
|
}) : null
|
|
7525
7527
|
})
|
|
7526
7528
|
}),
|
|
7527
|
-
/* @__PURE__ */ V(
|
|
7529
|
+
/* @__PURE__ */ V(gr, {
|
|
7528
7530
|
open: h?.kind === "parameter",
|
|
7529
7531
|
title: a("report_remove_parameter_confirm_title"),
|
|
7530
7532
|
description: a("report_remove_parameter_in_use"),
|
|
@@ -7532,7 +7534,7 @@ function sa({ workspaceId: e, preset: t, editorMode: n, onClose: r, onReload: i
|
|
|
7532
7534
|
onConfirm: ne,
|
|
7533
7535
|
onCancel: re
|
|
7534
7536
|
}),
|
|
7535
|
-
/* @__PURE__ */ V(
|
|
7537
|
+
/* @__PURE__ */ V(gr, {
|
|
7536
7538
|
open: h?.kind === "representation",
|
|
7537
7539
|
title: a("report_rep_remove_confirm_title"),
|
|
7538
7540
|
description: a("report_rep_remove_placed_confirm"),
|
|
@@ -7543,7 +7545,7 @@ function sa({ workspaceId: e, preset: t, editorMode: n, onClose: r, onReload: i
|
|
|
7543
7545
|
] });
|
|
7544
7546
|
}
|
|
7545
7547
|
// src/workspace/setup/report/edit/dialog-body.tsx
|
|
7546
|
-
function
|
|
7548
|
+
function la({ workspaceId: e, presetId: t, onClose: n, promoteTemporary: r = !1 }) {
|
|
7547
7549
|
let i = E(), a = t != null, [o, s] = z(0), c = C.report.preset.get.useQuery({ id: t ?? "" }, { enabled: a }), l = C.useUtils(), u = c.data;
|
|
7548
7550
|
return /* @__PURE__ */ V(gt, {
|
|
7549
7551
|
query: {
|
|
@@ -7570,20 +7572,20 @@ function ca({ workspaceId: e, presetId: t, onClose: n, promoteTemporary: r = !1
|
|
|
7570
7572
|
children: i("action_cancel")
|
|
7571
7573
|
})
|
|
7572
7574
|
}),
|
|
7573
|
-
children: ({ preset: i }) => i != null &&
|
|
7575
|
+
children: ({ preset: i }) => i != null && In({
|
|
7574
7576
|
isTemporary: i.isTemporary,
|
|
7575
7577
|
promoteTemporary: r
|
|
7576
|
-
}) === "runtime" ? /* @__PURE__ */ V(
|
|
7578
|
+
}) === "runtime" ? /* @__PURE__ */ V(rn, {
|
|
7577
7579
|
to: "/workspace/$workspaceId/reports/$presetId",
|
|
7578
7580
|
params: {
|
|
7579
7581
|
workspaceId: e,
|
|
7580
7582
|
presetId: i.id
|
|
7581
7583
|
},
|
|
7582
7584
|
replace: !0
|
|
7583
|
-
}) : /* @__PURE__ */ V(
|
|
7585
|
+
}) : /* @__PURE__ */ V(ca, {
|
|
7584
7586
|
workspaceId: e,
|
|
7585
7587
|
preset: i,
|
|
7586
|
-
editorMode:
|
|
7588
|
+
editorMode: Fn({
|
|
7587
7589
|
presetId: t,
|
|
7588
7590
|
promoteTemporary: r
|
|
7589
7591
|
}),
|
|
@@ -7597,17 +7599,17 @@ function ca({ workspaceId: e, presetId: t, onClose: n, promoteTemporary: r = !1
|
|
|
7597
7599
|
});
|
|
7598
7600
|
}
|
|
7599
7601
|
// src/workspace/setup/route/dialogs.tsx
|
|
7600
|
-
var
|
|
7601
|
-
SetupDashboardCreateDialog: () =>
|
|
7602
|
-
SetupDashboardCreateFromReportDialog: () =>
|
|
7603
|
-
SetupDashboardSettingsDialog: () =>
|
|
7604
|
-
SetupEndpointCreateDialog: () =>
|
|
7605
|
-
SetupEndpointEditDialog: () =>
|
|
7606
|
-
SetupParameterFormDialog: () =>
|
|
7607
|
-
SetupReportFormDialog: () =>
|
|
7602
|
+
var ua = /* @__PURE__ */ e({
|
|
7603
|
+
SetupDashboardCreateDialog: () => ga,
|
|
7604
|
+
SetupDashboardCreateFromReportDialog: () => _a,
|
|
7605
|
+
SetupDashboardSettingsDialog: () => va,
|
|
7606
|
+
SetupEndpointCreateDialog: () => ma,
|
|
7607
|
+
SetupEndpointEditDialog: () => ha,
|
|
7608
|
+
SetupParameterFormDialog: () => pa,
|
|
7609
|
+
SetupReportFormDialog: () => ya
|
|
7608
7610
|
});
|
|
7609
|
-
function
|
|
7610
|
-
let n =
|
|
7611
|
+
function da(e, t) {
|
|
7612
|
+
let n = an();
|
|
7611
7613
|
return () => {
|
|
7612
7614
|
n({
|
|
7613
7615
|
to: e,
|
|
@@ -7615,16 +7617,16 @@ function ua(e, t) {
|
|
|
7615
7617
|
});
|
|
7616
7618
|
};
|
|
7617
7619
|
}
|
|
7618
|
-
var
|
|
7619
|
-
function
|
|
7620
|
-
let a = E(), o =
|
|
7620
|
+
var fa = "max-w-2xl sm:max-w-2xl";
|
|
7621
|
+
function pa({ workspaceId: e, parameterId: t, initialBranchId: n, recorded: r, onClose: i }) {
|
|
7622
|
+
let a = E(), o = da("/workspace/$workspaceId/setup/parameters", e), s = i ?? o;
|
|
7621
7623
|
return /* @__PURE__ */ V(f, {
|
|
7622
7624
|
onClose: s,
|
|
7623
7625
|
title: a(t == null ? "setup_parameter_create_title" : "setup_parameter_edit_title"),
|
|
7624
7626
|
...t == null ? {} : { entityId: t },
|
|
7625
|
-
contentClassName:
|
|
7627
|
+
contentClassName: fa,
|
|
7626
7628
|
stickyChrome: !0,
|
|
7627
|
-
children: /* @__PURE__ */ V(
|
|
7629
|
+
children: /* @__PURE__ */ V(ar, {
|
|
7628
7630
|
workspaceId: e,
|
|
7629
7631
|
onClose: s,
|
|
7630
7632
|
...t == null ? {} : { parameterId: t },
|
|
@@ -7633,8 +7635,8 @@ function fa({ workspaceId: e, parameterId: t, initialBranchId: n, recorded: r, o
|
|
|
7633
7635
|
})
|
|
7634
7636
|
});
|
|
7635
7637
|
}
|
|
7636
|
-
function
|
|
7637
|
-
let t =
|
|
7638
|
+
function ma({ workspaceId: e }) {
|
|
7639
|
+
let t = da("/workspace/$workspaceId/setup/endpoints", e);
|
|
7638
7640
|
return /* @__PURE__ */ V(f, {
|
|
7639
7641
|
onClose: t,
|
|
7640
7642
|
children: /* @__PURE__ */ V(xt, {
|
|
@@ -7646,23 +7648,23 @@ function pa({ workspaceId: e }) {
|
|
|
7646
7648
|
})
|
|
7647
7649
|
});
|
|
7648
7650
|
}
|
|
7649
|
-
function
|
|
7650
|
-
let r = E(), i =
|
|
7651
|
+
function ha({ workspaceId: e, endpointId: t, onClose: n }) {
|
|
7652
|
+
let r = E(), i = da("/workspace/$workspaceId/setup/endpoints", e), a = n ?? i;
|
|
7651
7653
|
return /* @__PURE__ */ V(f, {
|
|
7652
7654
|
onClose: a,
|
|
7653
7655
|
title: r("endpoint_edit_title"),
|
|
7654
7656
|
entityId: t,
|
|
7655
|
-
contentClassName:
|
|
7657
|
+
contentClassName: fa,
|
|
7656
7658
|
stickyChrome: !0,
|
|
7657
|
-
children: /* @__PURE__ */ V(
|
|
7659
|
+
children: /* @__PURE__ */ V(zn, {
|
|
7658
7660
|
workspaceId: e,
|
|
7659
7661
|
endpointId: t,
|
|
7660
7662
|
onClose: a
|
|
7661
7663
|
})
|
|
7662
7664
|
});
|
|
7663
7665
|
}
|
|
7664
|
-
function
|
|
7665
|
-
let t =
|
|
7666
|
+
function ga({ workspaceId: e }) {
|
|
7667
|
+
let t = da("/workspace/$workspaceId/setup/dashboards", e);
|
|
7666
7668
|
return /* @__PURE__ */ V(f, {
|
|
7667
7669
|
onClose: t,
|
|
7668
7670
|
children: /* @__PURE__ */ V(yt, {
|
|
@@ -7674,8 +7676,8 @@ function ha({ workspaceId: e }) {
|
|
|
7674
7676
|
})
|
|
7675
7677
|
});
|
|
7676
7678
|
}
|
|
7677
|
-
function
|
|
7678
|
-
let t =
|
|
7679
|
+
function _a({ workspaceId: e }) {
|
|
7680
|
+
let t = da("/workspace/$workspaceId/setup/dashboards", e);
|
|
7679
7681
|
return /* @__PURE__ */ V(f, {
|
|
7680
7682
|
onClose: t,
|
|
7681
7683
|
children: /* @__PURE__ */ V(_t, {
|
|
@@ -7687,8 +7689,8 @@ function ga({ workspaceId: e }) {
|
|
|
7687
7689
|
})
|
|
7688
7690
|
});
|
|
7689
7691
|
}
|
|
7690
|
-
function
|
|
7691
|
-
let r = E(), i =
|
|
7692
|
+
function va({ workspaceId: e, dashboardId: t, onClose: n }) {
|
|
7693
|
+
let r = E(), i = da("/workspace/$workspaceId/setup/dashboards", e), a = n ?? i;
|
|
7692
7694
|
return /* @__PURE__ */ V(f, {
|
|
7693
7695
|
onClose: a,
|
|
7694
7696
|
title: r("dashboard_settings_title"),
|
|
@@ -7702,11 +7704,11 @@ function _a({ workspaceId: e, dashboardId: t, onClose: n }) {
|
|
|
7702
7704
|
})
|
|
7703
7705
|
});
|
|
7704
7706
|
}
|
|
7705
|
-
function
|
|
7706
|
-
let a = E(), o =
|
|
7707
|
-
if (
|
|
7707
|
+
function ya({ workspaceId: e, presetId: t, promoteTemporary: n = !1, onClose: r, backdropBlur: i = !0 }) {
|
|
7708
|
+
let a = E(), o = da("/workspace/$workspaceId/setup/reports", e), s = r ?? o, c = Nt(s), [l, u] = z(!0), [d, p] = z(!1), m = t != null, h = C.report.preset.get.useQuery({ id: t ?? "" }, { enabled: m && !n });
|
|
7709
|
+
if (At(() => {
|
|
7708
7710
|
c.current = s;
|
|
7709
|
-
}, [s]),
|
|
7711
|
+
}, [s]), At(() => {
|
|
7710
7712
|
if (!l) {
|
|
7711
7713
|
c.current();
|
|
7712
7714
|
return;
|
|
@@ -7717,10 +7719,10 @@ function va({ workspaceId: e, presetId: t, promoteTemporary: n = !1, onClose: r,
|
|
|
7717
7719
|
return () => {
|
|
7718
7720
|
cancelAnimationFrame(e);
|
|
7719
7721
|
};
|
|
7720
|
-
}, [l]), t != null && h.data != null &&
|
|
7722
|
+
}, [l]), t != null && h.data != null && In({
|
|
7721
7723
|
isTemporary: h.data.isTemporary,
|
|
7722
7724
|
promoteTemporary: n
|
|
7723
|
-
}) === "runtime") return /* @__PURE__ */ V(
|
|
7725
|
+
}) === "runtime") return /* @__PURE__ */ V(rn, {
|
|
7724
7726
|
to: "/workspace/$workspaceId/reports/$presetId",
|
|
7725
7727
|
params: {
|
|
7726
7728
|
workspaceId: e,
|
|
@@ -7736,10 +7738,10 @@ function va({ workspaceId: e, presetId: t, promoteTemporary: n = !1, onClose: r,
|
|
|
7736
7738
|
onClose: g,
|
|
7737
7739
|
title: a(m ? "setup_report_edit_title" : "setup_report_create_title"),
|
|
7738
7740
|
...t == null ? {} : { entityId: t },
|
|
7739
|
-
contentClassName:
|
|
7741
|
+
contentClassName: fa,
|
|
7740
7742
|
stickyChrome: !0,
|
|
7741
7743
|
backdropBlur: i,
|
|
7742
|
-
children: d ? /* @__PURE__ */ V(
|
|
7744
|
+
children: d ? /* @__PURE__ */ V(la, {
|
|
7743
7745
|
workspaceId: e,
|
|
7744
7746
|
onClose: g,
|
|
7745
7747
|
promoteTemporary: n,
|
|
@@ -7750,4 +7752,4 @@ function va({ workspaceId: e, presetId: t, promoteTemporary: n = !1, onClose: r,
|
|
|
7750
7752
|
})
|
|
7751
7753
|
});
|
|
7752
7754
|
}
|
|
7753
|
-
export {
|
|
7755
|
+
export { ha as a, ua as c, ma as i, Nn as l, _a as n, pa as o, va as r, ya as s, ga as t, Mn as u };
|