@overvis/hmi-workspace-ui 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/alarm-list-DKFio0hg.js +414 -0
- package/dist/alarm-rule-dialog-mb4_nHRW.js +417 -0
- package/dist/{alarm-rule-lists-C5v1Kf7A.js → alarm-rule-lists-CfZXTWkK.js} +123 -125
- package/dist/{alarm-rules-page-CqFzofPd.js → alarm-rules-page-DBLSkrrG.js} +15 -18
- package/dist/alert-dialog-D_iDv2lQ.js +891 -0
- package/dist/{base-revision-YCO27zR4.js → base-revision-DLF9EnGV.js} +26 -29
- package/dist/{breadcrumbs-0cjsV2cq.js → breadcrumbs-D5R6Fz74.js} +6 -7
- package/dist/{catalog-list-DjZojYLJ.js → catalog-list-BkWosvh1.js} +2 -4
- package/dist/{code-editor-BVimvjDV.js → code-editor-DCM0KdMJ.js} +9 -6
- package/dist/dashboard-bindings.js +1 -2
- package/dist/{dashboards-page-BlrJguNz.js → dashboards-page-DLc11Vzu.js} +335 -359
- package/dist/{de-14WdmJxZ.js → de-Z2er-E5v.js} +4 -2
- package/dist/diagnostic-text-CYZFPiND.js +116 -0
- package/dist/{dialogs-D_v1LeH4.js → dialogs-BX023zml.js} +2523 -2590
- package/dist/{dialogs-B6BRnf3Q.js → dialogs-DEOg9lxy.js} +219 -227
- package/dist/{display-DmOo23mi.js → display-VYGzneE0.js} +4 -6
- package/dist/{editor-language-To9MxloY.js → editor-language-CGENZxbI.js} +3 -5
- package/dist/editor-page-CaN52OQh.js +1337 -0
- package/dist/{en-BgercpT0.js → en-CKPPL6bQ.js} +4 -2
- package/dist/entity-controls-DJT47yeV.js +71 -0
- package/dist/errors-BAWoH_5w.js +25 -0
- package/dist/{footer-DC-Q0052.js → footer-CbPMP8aq.js} +2404 -2515
- package/dist/host.js +8254 -675
- package/dist/{i18n-BgzakKoC.js → i18n-ChjEbYEg.js} +77 -90
- package/dist/i18n.js +1 -2
- package/dist/index.js +5168 -5353
- package/dist/{lat-lng-B12P7QyY.js → lat-lng-Bl77AGSO.js} +1 -2
- package/dist/{list-page-CvsdZb86.js → list-page-Fa29SkaJ.js} +116 -123
- package/dist/{location-map-renderer-DO5yfdSU.js → location-map-renderer-DvXIYc1Z.js} +6 -6
- package/dist/{location-picker-renderer-CjCxg6ai.js → location-picker-renderer-B1_-n8lf.js} +3 -4
- package/dist/{model-B8gGi4OK.js → model-tpg_xpFB.js} +1 -2
- package/dist/{notice-card-DyGywFsW.js → notice-card-V_0K0lO0.js} +54 -58
- package/dist/page-B5te_1Lc.js +449 -0
- package/dist/{page-v6LCwswN.js → page-BorlLnMX.js} +92 -100
- package/dist/page-DxF7FOve.js +507 -0
- package/dist/panel-DuZD-cBP.js +949 -0
- package/dist/parameter-values.js +3 -16
- package/dist/{pl-lQ9HXV9k.js → pl-DVABrn5G.js} +4 -2
- package/dist/presence-code-DsabLTZs.js +73 -0
- package/dist/{query-gate-DVhNIkge.js → query-gate-BbIo1Xrj.js} +6 -6
- package/dist/{provider-DoEpKcQ-.js → quick-report-BcZsfkCZ.js} +9423 -5102
- package/dist/{retention-BYXNpYmR.js → retention-C7EZsq8u.js} +4 -6
- package/dist/retention-note-CmMeHV_u.js +40 -0
- package/dist/{rolldown-runtime-Dy4uBu1J.js → rolldown-runtime-CGnMp29N.js} +1 -2
- package/dist/{ru-qTKINoUj.js → ru-CBRLC_xM.js} +8 -6
- package/dist/run-text-CDdfbKbg.js +112 -0
- package/dist/{search-D4rDnE9T.js → search-C6xQ_Hvo.js} +26 -29
- package/dist/{sections-kCOyc4NR.js → sections-D_SBfVzV.js} +2 -3
- package/dist/{select-BKiOWdSr.js → select-nNLG-AMz.js} +17 -23
- package/dist/{spinner-C-HPNxOc.js → spinner-B-KLtBjp.js} +182 -201
- package/dist/src/code-editor/code-editor.d.ts +3 -0
- package/dist/src/code-editor/taskfile-language.d.ts +22 -2
- package/dist/src/i18n/catalogs/de/edge-program.d.ts +3 -0
- package/dist/src/i18n/catalogs/de.d.ts +3 -0
- package/dist/src/i18n/catalogs/en/edge-program.d.ts +3 -0
- package/dist/src/i18n/catalogs/en.d.ts +3 -0
- package/dist/src/i18n/catalogs/pl/edge-program.d.ts +3 -0
- package/dist/src/i18n/catalogs/pl.d.ts +3 -0
- package/dist/src/i18n/catalogs/ru/edge-program.d.ts +5 -2
- package/dist/src/i18n/catalogs/ru/graphics.d.ts +2 -2
- package/dist/src/i18n/catalogs/ru.d.ts +7 -4
- package/dist/src/i18n/catalogs/uk/edge-program.d.ts +5 -2
- package/dist/src/i18n/catalogs/uk/graphics.d.ts +2 -2
- package/dist/src/i18n/catalogs/uk.d.ts +7 -4
- package/dist/src/version.d.ts +1 -1
- package/dist/src/workspace/graphics/inspector/item.d.ts +6 -6
- package/dist/src/workspace/local-workspace-app.d.ts +1 -1
- package/dist/src/workspace/routes.d.ts +1 -1
- package/dist/{starter-fields-BRLX0z-v.js → starter-fields-7S3LmtGa.js} +154 -157
- package/dist/{starter-handoff-BA3ucMKL.js → starter-handoff-BaK8Ss8I.js} +1 -2
- package/dist/styles.css +1 -1
- package/dist/ui.js +334 -374
- package/dist/{uk-CwpJAxmx.js → uk-17pbVYZa.js} +8 -6
- package/dist/{wireguard-docs-AfU6NzTL.js → wireguard-docs-Clb-7xRY.js} +14 -17
- package/package.json +15 -9
- package/dist/alarm-list-BL3xQ5Lf.js +0 -423
- package/dist/alarm-rule-dialog-S1ZUg-74.js +0 -423
- package/dist/alert-B8MAoIO8.js +0 -45
- package/dist/alert-dialog-CYkuMg5D.js +0 -129
- package/dist/api-error-9rQmUN5L.js +0 -93
- package/dist/breadcrumb-DzVL1yHa.js +0 -74
- package/dist/button-6SxPBYMz.js +0 -44
- package/dist/context-u9KJQmdB.js +0 -102
- package/dist/copyable-id-DYGiAcnq.js +0 -40
- package/dist/dashboard-context-CBfG6DoT.js +0 -191
- package/dist/date-time-picker-C3FhMXk6.js +0 -266
- package/dist/diagnostic-text-BAkzW0SE.js +0 -111
- package/dist/diagnostic-text-DiKd2i1w.js +0 -76
- package/dist/dialog-BIhQXcZC.js +0 -237
- package/dist/dialog-BqyIxMD-.js +0 -54
- package/dist/dropdown-menu-DSzbBq3v.js +0 -136
- package/dist/editor-page-BiSZJz5b.js +0 -1353
- package/dist/empty-B-QJ-06w.js +0 -59
- package/dist/entity-controls-D1K4Ot3O.js +0 -76
- package/dist/errors-CcsvDHu8.js +0 -26
- package/dist/history-page-sAAhG54V.js +0 -1400
- package/dist/icon-D-pR9htW.js +0 -57
- package/dist/index-page-DMH82fZe.js +0 -214
- package/dist/item-B5SaTFQU.js +0 -120
- package/dist/mutation-form-validators-BNz5bsv1.js +0 -2408
- package/dist/mutations-THtGG6Ai.js +0 -240
- package/dist/page-2KPemaAj.js +0 -328
- package/dist/page-6rIoTg2L.js +0 -459
- package/dist/page-C6giEoEd.js +0 -1935
- package/dist/page-DCbTxKsi.js +0 -313
- package/dist/page-DWO427hT.js +0 -208
- package/dist/page-LXu_2zm3.js +0 -137
- package/dist/page-aaUiVOnk.js +0 -513
- package/dist/page-header-RB2YFWlE.js +0 -55
- package/dist/page-title-CdCbiLt8.js +0 -14
- package/dist/panel-DDy8tUNR.js +0 -338
- package/dist/presence-code-BfSXr50g.js +0 -83
- package/dist/progress-C7cxNJA1.js +0 -83
- package/dist/provider-BOeYHi0n.js +0 -134
- package/dist/quick-report-CUVJnbKP.js +0 -416
- package/dist/radio-group-CZGqVbkJ.js +0 -26
- package/dist/retention-note-CHhA6gjY.js +0 -42
- package/dist/run-text-DvaO8LDF.js +0 -113
- package/dist/select-eNgZdZ30.js +0 -521
- package/dist/skeleton-6yk8Tdh5.js +0 -19
- package/dist/slider-DorDsoF8.js +0 -37
- package/dist/status-page-DAHiKM9P.js +0 -3286
- package/dist/switch-BqD0RH_G.js +0 -18
- package/dist/table-Q2-voLuw.js +0 -65
- package/dist/tabs-CSIucYFP.js +0 -57
- package/dist/theme-provider-BkRohQFU.js +0 -61
- package/dist/toggle-group-9Bs0Mm3r.js +0 -82
- package/dist/trpc-CvJUuUXp.js +0 -153
- package/dist/utils-CX-Pz5p6.js +0 -8
- package/dist/writability-BuH-spxv.js +0 -57
|
@@ -1,65 +1,63 @@
|
|
|
1
|
-
import { m as e } from "./i18n-
|
|
2
|
-
import { t } from "./
|
|
3
|
-
import { t as
|
|
4
|
-
import { n as r, t as i } from "./button-6SxPBYMz.js";
|
|
1
|
+
import { m as e } from "./i18n-ChjEbYEg.js";
|
|
2
|
+
import { Mt as t, Nt as n, jt as r } from "./alert-dialog-D_iDv2lQ.js";
|
|
3
|
+
import { t as i } from "./spinner-B-KLtBjp.js";
|
|
5
4
|
import * as a from "react";
|
|
6
5
|
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
7
6
|
import { ChevronRightIcon as l, CircleAlertIcon as u, InfoIcon as d, RefreshCwIcon as f, TriangleAlertIcon as p } from "lucide-react";
|
|
8
7
|
import { cva as m } from "class-variance-authority";
|
|
9
8
|
import { Collapsible as h } from "@base-ui/react/collapsible";
|
|
10
|
-
|
|
11
|
-
function g({ className: e, size:
|
|
9
|
+
// src/ui/card.tsx
|
|
10
|
+
function g({ className: e, size: t = "default", ...r }) {
|
|
12
11
|
return /* @__PURE__ */ s("div", {
|
|
13
12
|
"data-slot": "card",
|
|
14
|
-
"data-size":
|
|
15
|
-
className:
|
|
13
|
+
"data-size": t,
|
|
14
|
+
className: n("\n group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl border bg-card\n py-(--card-spacing) text-sm text-card-foreground shadow-xs [--card-spacing:--spacing(4)]\n has-data-[slot=card-footer]:pb-0\n has-[>img:first-child]:pt-0\n data-[size=sm]:[--card-spacing:--spacing(3)]\n data-[size=sm]:has-data-[slot=card-footer]:pb-0\n *:[img:first-child]:rounded-t-xl\n *:[img:last-child]:rounded-b-xl\n ", e),
|
|
16
15
|
...r
|
|
17
16
|
});
|
|
18
17
|
}
|
|
19
|
-
function _({ className: e, ...
|
|
18
|
+
function _({ className: e, ...t }) {
|
|
20
19
|
return /* @__PURE__ */ s("div", {
|
|
21
20
|
"data-slot": "card-header",
|
|
22
|
-
className:
|
|
23
|
-
...
|
|
21
|
+
className: n("\n group/card-header @container/card-header grid auto-rows-min items-start gap-1\n rounded-t-xl px-(--card-spacing)\n has-data-[slot=card-action]:grid-cols-[1fr_auto]\n has-data-[slot=card-description]:grid-rows-[auto_auto]\n [.border-b]:pb-(--card-spacing)\n ", e),
|
|
22
|
+
...t
|
|
24
23
|
});
|
|
25
24
|
}
|
|
26
|
-
function v({ className: e, ...
|
|
25
|
+
function v({ className: e, ...t }) {
|
|
27
26
|
return /* @__PURE__ */ s("div", {
|
|
28
27
|
"data-slot": "card-title",
|
|
29
|
-
className:
|
|
30
|
-
...
|
|
28
|
+
className: n("\n font-heading text-sm/snug font-semibold\n group-data-[size=sm]/card:text-[13px]\n ", e),
|
|
29
|
+
...t
|
|
31
30
|
});
|
|
32
31
|
}
|
|
33
|
-
function y({ className: e, ...
|
|
32
|
+
function y({ className: e, ...t }) {
|
|
34
33
|
return /* @__PURE__ */ s("div", {
|
|
35
34
|
"data-slot": "card-description",
|
|
36
|
-
className:
|
|
37
|
-
...
|
|
35
|
+
className: n("text-[13px] text-muted-foreground", e),
|
|
36
|
+
...t
|
|
38
37
|
});
|
|
39
38
|
}
|
|
40
|
-
function b({ className: e, ...
|
|
39
|
+
function b({ className: e, ...t }) {
|
|
41
40
|
return /* @__PURE__ */ s("div", {
|
|
42
41
|
"data-slot": "card-action",
|
|
43
|
-
className:
|
|
44
|
-
...
|
|
42
|
+
className: n("col-start-2 row-span-2 row-start-1 self-start justify-self-end", e),
|
|
43
|
+
...t
|
|
45
44
|
});
|
|
46
45
|
}
|
|
47
|
-
function x({ className: e, ...
|
|
46
|
+
function x({ className: e, ...t }) {
|
|
48
47
|
return /* @__PURE__ */ s("div", {
|
|
49
48
|
"data-slot": "card-content",
|
|
50
|
-
className:
|
|
51
|
-
...
|
|
49
|
+
className: n("px-(--card-spacing)", e),
|
|
50
|
+
...t
|
|
52
51
|
});
|
|
53
52
|
}
|
|
54
|
-
function S({ className: e, ...
|
|
53
|
+
function S({ className: e, ...t }) {
|
|
55
54
|
return /* @__PURE__ */ s("div", {
|
|
56
55
|
"data-slot": "card-footer",
|
|
57
|
-
className:
|
|
58
|
-
...
|
|
56
|
+
className: n("flex items-center rounded-b-xl border-t bg-muted/40 p-(--card-spacing)", e),
|
|
57
|
+
...t
|
|
59
58
|
});
|
|
60
59
|
}
|
|
61
|
-
|
|
62
|
-
//#region src/ui/collapsible.tsx
|
|
60
|
+
// src/ui/collapsible.tsx
|
|
63
61
|
function C({ className: e, ...t }) {
|
|
64
62
|
return /* @__PURE__ */ s(h.Root, {
|
|
65
63
|
"data-slot": "collapsible",
|
|
@@ -74,15 +72,14 @@ function w({ className: e, ...t }) {
|
|
|
74
72
|
...t
|
|
75
73
|
});
|
|
76
74
|
}
|
|
77
|
-
function T({ className: e, ...
|
|
75
|
+
function T({ className: e, ...t }) {
|
|
78
76
|
return /* @__PURE__ */ s(h.Panel, {
|
|
79
77
|
"data-slot": "collapsible-content",
|
|
80
|
-
className:
|
|
81
|
-
...
|
|
78
|
+
className: n("overflow-hidden", e),
|
|
79
|
+
...t
|
|
82
80
|
});
|
|
83
81
|
}
|
|
84
|
-
|
|
85
|
-
//#region src/ui/notice-card.tsx
|
|
82
|
+
// src/ui/notice-card.tsx
|
|
86
83
|
var E = m("\n group/notice relative isolate w-full flex-row items-start gap-3 bg-linear-to-r to-card to-40%\n p-4 text-left\n before:absolute before:inset-y-0 before:left-0 before:w-[3px]\n sm:gap-4\n ", { variants: {
|
|
87
84
|
severity: {
|
|
88
85
|
error: "\n border-destructive/25 from-destructive/6\n before:bg-destructive\n ",
|
|
@@ -112,35 +109,35 @@ function k(e) {
|
|
|
112
109
|
return typeof e == "object" && !!e && "then" in e && typeof e.then == "function";
|
|
113
110
|
}
|
|
114
111
|
function A({ action: e, variant: l, size: u }) {
|
|
115
|
-
let d =
|
|
112
|
+
let d = e.pending === !0 ? /* @__PURE__ */ s(i, {
|
|
116
113
|
"aria-hidden": "true",
|
|
117
114
|
"data-icon": "inline-start"
|
|
118
|
-
}) : e.icon, e.label] }),
|
|
115
|
+
}) : e.icon, f = /* @__PURE__ */ c(o, { children: [d, e.label] }), p = e.disabled === !0 || e.pending === !0, m = t({
|
|
119
116
|
variant: l,
|
|
120
117
|
size: u
|
|
121
118
|
});
|
|
122
|
-
if (!
|
|
123
|
-
let
|
|
124
|
-
return a.cloneElement(
|
|
125
|
-
className:
|
|
126
|
-
children:
|
|
119
|
+
if (!p && e.render != null) {
|
|
120
|
+
let t = e.render;
|
|
121
|
+
return a.cloneElement(t, {
|
|
122
|
+
className: n(m, t.props.className),
|
|
123
|
+
children: f
|
|
127
124
|
});
|
|
128
125
|
}
|
|
129
|
-
return !
|
|
126
|
+
return !p && e.href != null ? /* @__PURE__ */ s("a", {
|
|
130
127
|
href: e.href,
|
|
131
|
-
className:
|
|
132
|
-
children:
|
|
133
|
-
}) : /* @__PURE__ */ s(
|
|
128
|
+
className: m,
|
|
129
|
+
children: f
|
|
130
|
+
}) : /* @__PURE__ */ s(r, {
|
|
134
131
|
type: "button",
|
|
135
132
|
variant: l,
|
|
136
133
|
size: u,
|
|
137
|
-
disabled:
|
|
134
|
+
disabled: p,
|
|
138
135
|
"aria-busy": e.pending === !0 || void 0,
|
|
139
136
|
onClick: e.onClick,
|
|
140
|
-
children:
|
|
137
|
+
children: f
|
|
141
138
|
});
|
|
142
139
|
}
|
|
143
|
-
function j({ severity:
|
|
140
|
+
function j({ severity: t = "error", size: r = "default", icon: i, subject: o, title: u, description: d, details: p, detailsOpen: m = !1, primaryAction: h, secondaryActions: _, onRetry: v, retrying: y, retryLabel: b, actions: x, className: S, children: j, ...M }) {
|
|
144
141
|
let N = e(), [P, F] = a.useState(!1), I = r === "compact", L = y === !0 || P, R = v == null ? null : {
|
|
145
142
|
label: L ? N("ui_notice_retrying") : b ?? N("ui_notice_retry"),
|
|
146
143
|
icon: /* @__PURE__ */ s(f, { "data-icon": "inline-start" }),
|
|
@@ -157,26 +154,26 @@ function j({ severity: n = "error", size: r = "default", icon: i, subject: o, ti
|
|
|
157
154
|
}, z = h ?? R, B = I ? "sm" : "default", V = z != null || (_?.length ?? 0) > 0 || x != null;
|
|
158
155
|
return /* @__PURE__ */ c(g, {
|
|
159
156
|
"data-slot": "notice-card",
|
|
160
|
-
"data-severity":
|
|
157
|
+
"data-severity": t,
|
|
161
158
|
"data-size": r,
|
|
162
|
-
role:
|
|
163
|
-
className:
|
|
164
|
-
severity:
|
|
159
|
+
role: t === "error" ? "alert" : "status",
|
|
160
|
+
className: n(E({
|
|
161
|
+
severity: t,
|
|
165
162
|
size: r
|
|
166
163
|
}), S),
|
|
167
164
|
...M,
|
|
168
165
|
children: [/* @__PURE__ */ s("span", {
|
|
169
166
|
"aria-hidden": "true",
|
|
170
167
|
className: D({
|
|
171
|
-
severity:
|
|
168
|
+
severity: t,
|
|
172
169
|
size: r
|
|
173
170
|
}),
|
|
174
|
-
children: i ?? O[
|
|
171
|
+
children: i ?? O[t]
|
|
175
172
|
}), /* @__PURE__ */ c("div", {
|
|
176
|
-
className:
|
|
173
|
+
className: n("flex min-w-0 flex-1 flex-col", I ? "gap-2" : "gap-3"),
|
|
177
174
|
children: [
|
|
178
175
|
/* @__PURE__ */ c("div", {
|
|
179
|
-
className:
|
|
176
|
+
className: n("flex min-w-0 flex-col", I ? "gap-0.5 pt-1" : o == null ? "gap-1 pt-2" : "gap-0.5"),
|
|
180
177
|
children: [
|
|
181
178
|
o == null ? null : /* @__PURE__ */ s("div", {
|
|
182
179
|
"data-slot": "notice-card-subject",
|
|
@@ -185,12 +182,12 @@ function j({ severity: n = "error", size: r = "default", icon: i, subject: o, ti
|
|
|
185
182
|
}),
|
|
186
183
|
u == null ? null : /* @__PURE__ */ s("div", {
|
|
187
184
|
"data-slot": "notice-card-title",
|
|
188
|
-
className:
|
|
185
|
+
className: n("font-semibold tracking-tight text-pretty text-foreground", I ? "text-sm/5" : "text-[0.9375rem]/snug"),
|
|
189
186
|
children: u
|
|
190
187
|
}),
|
|
191
188
|
d == null ? null : /* @__PURE__ */ s("div", {
|
|
192
189
|
"data-slot": "notice-card-description",
|
|
193
|
-
className:
|
|
190
|
+
className: n("text-sm/relaxed text-pretty", u == null ? "text-foreground" : "text-muted-foreground", "\n [&_a]:underline [&_a]:underline-offset-3\n [&_a]:hover:text-foreground\n "),
|
|
194
191
|
children: d
|
|
195
192
|
})
|
|
196
193
|
]
|
|
@@ -242,5 +239,4 @@ function j({ severity: n = "error", size: r = "default", icon: i, subject: o, ti
|
|
|
242
239
|
})]
|
|
243
240
|
});
|
|
244
241
|
}
|
|
245
|
-
//#endregion
|
|
246
242
|
export { g as a, y as c, v as d, w as i, S as l, C as n, b as o, T as r, x as s, j as t, _ as u };
|
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-CGnMp29N.js";
|
|
2
|
+
import { Bn as t, Kn as n, Lt as r, Qn as i, Wn as a, ii as o, zn as s } from "./quick-report-BcZsfkCZ.js";
|
|
3
|
+
import { f as c, h as l, m as u, n as d } from "./i18n-ChjEbYEg.js";
|
|
4
|
+
import { $ as f, B as p, H as m, K as h, Nt as g, R as _, U as v, V as y, X as b, Y as x, jt as S, xt as C } from "./alert-dialog-D_iDv2lQ.js";
|
|
5
|
+
import { G as w, V as T } from "./spinner-B-KLtBjp.js";
|
|
6
|
+
import { b as E } from "./panel-DuZD-cBP.js";
|
|
7
|
+
import { r as D, t as O } from "./query-gate-BbIo1Xrj.js";
|
|
8
|
+
import { i as k, n as A, t as ee } from "./display-VYGzneE0.js";
|
|
9
|
+
import { t as te } from "./breadcrumbs-D5R6Fz74.js";
|
|
10
|
+
import { a as ne, i as re, n as ie, r as j, t as M } from "./presence-code-DsabLTZs.js";
|
|
11
|
+
import { a as N, c as P, d as F, i as I, l as L, n as R, o as z, r as B, s as V, t as H, u as U } from "./catalog-list-BkWosvh1.js";
|
|
12
|
+
import { t as W } from "./wireguard-docs-Clb-7xRY.js";
|
|
13
|
+
import { useState as G } from "react";
|
|
14
|
+
import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
|
|
15
|
+
import { BookOpenIcon as Y, CableIcon as ae, PencilIcon as oe, PlusIcon as se, Trash2Icon as ce } from "lucide-react";
|
|
16
|
+
import { formatAppDateTime as le, resolveLocalized as ue } from "@overvis/hmi-shared";
|
|
17
|
+
import { useNavigate as de } from "@tanstack/react-router";
|
|
18
|
+
import { endpointCreateFormSchema as fe, endpointCreateFormToInput as pe, endpointDefaultPort as me } from "@overvis/hmi-shared/endpoint";
|
|
19
|
+
// src/workspace/setup/endpoints/form-problem.ts
|
|
20
|
+
function X({ problem: e }) {
|
|
21
|
+
switch (e) {
|
|
22
|
+
case "name_required": return c("error_field_required");
|
|
23
|
+
case "hostname_invalid": return c("error_endpoint_hostname_invalid");
|
|
24
|
+
case "pin_invalid": return c("error_endpoint_pin_invalid");
|
|
25
|
+
case "public_key_invalid": return c("error_endpoint_public_key_invalid");
|
|
26
|
+
case "port_invalid": return c("error_endpoint_port_invalid");
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
// src/workspace/setup/endpoints/connection-indicator.tsx
|
|
30
|
+
function he(e) {
|
|
31
|
+
if (e === void 0) return c("endpoint_status_state_unknown");
|
|
32
|
+
if (e == null) return c("endpoint_status_state_disconnected");
|
|
33
|
+
switch (e) {
|
|
34
|
+
case "connecting": return c("endpoint_status_state_connecting");
|
|
35
|
+
case "connected": return c("endpoint_status_state_connected");
|
|
36
|
+
case "disconnected": return c("endpoint_status_state_disconnected");
|
|
37
|
+
case "error": return c("endpoint_status_state_error");
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function Z(e) {
|
|
41
|
+
return e === "connected" ? "bg-emerald-500" : e === "error" ? "bg-destructive" : e === "connecting" ? "bg-amber-500" : "bg-muted-foreground/40";
|
|
42
|
+
}
|
|
43
|
+
function ge({ endpointId: e }) {
|
|
44
|
+
l();
|
|
45
|
+
let t = k(e), n = t === void 0 ? void 0 : t?.state ?? null, r = he(n);
|
|
46
|
+
return /* @__PURE__ */ q("span", {
|
|
47
|
+
className: "inline-flex size-5 shrink-0 items-center justify-center",
|
|
48
|
+
title: r,
|
|
49
|
+
"aria-label": r,
|
|
50
|
+
role: "img",
|
|
51
|
+
children: /* @__PURE__ */ q("span", { className: g("size-2.5 rounded-full", Z(n)) })
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
// src/workspace/setup/endpoints/enabled-switch.tsx
|
|
55
|
+
function _e({ workspaceId: e, endpoint: t, compact: n = !1, className: i }) {
|
|
56
|
+
let o = u(), s = d(), { enable: c, disable: l } = r(e), p = (e) => ({
|
|
57
|
+
onSuccess: () => {
|
|
58
|
+
s.success(e);
|
|
59
|
+
},
|
|
60
|
+
onError: (e) => {
|
|
61
|
+
s.error(a(e));
|
|
62
|
+
}
|
|
63
|
+
}), m = t.disabledSince == null, h = l.isPending || c.isPending;
|
|
64
|
+
return /* @__PURE__ */ J("div", {
|
|
65
|
+
className: i,
|
|
66
|
+
onClick: (e) => {
|
|
67
|
+
e.stopPropagation();
|
|
68
|
+
},
|
|
69
|
+
onKeyDown: (e) => {
|
|
70
|
+
e.stopPropagation();
|
|
71
|
+
},
|
|
72
|
+
children: [/* @__PURE__ */ J("div", {
|
|
73
|
+
className: "flex items-center gap-2",
|
|
74
|
+
children: [/* @__PURE__ */ q(f, {
|
|
75
|
+
checked: m,
|
|
76
|
+
disabled: h,
|
|
77
|
+
size: "sm",
|
|
78
|
+
"aria-label": o("endpoint_enabled_label"),
|
|
79
|
+
onCheckedChange: (e) => {
|
|
80
|
+
e ? c.mutate({
|
|
81
|
+
id: t.id,
|
|
82
|
+
baseRevision: t.revision
|
|
83
|
+
}, p(o("endpoint_enable_toast"))) : l.mutate({
|
|
84
|
+
id: t.id,
|
|
85
|
+
baseRevision: t.revision
|
|
86
|
+
}, p(o("endpoint_disable_toast")));
|
|
87
|
+
}
|
|
88
|
+
}), n ? null : /* @__PURE__ */ q("span", {
|
|
89
|
+
className: "text-sm text-muted-foreground",
|
|
90
|
+
children: o("endpoint_enabled_label")
|
|
91
|
+
})]
|
|
92
|
+
}), !n && t.disabledSince != null ? /* @__PURE__ */ q("p", {
|
|
93
|
+
className: "mt-1 text-xs text-muted-foreground",
|
|
94
|
+
children: o("endpoint_disabled_since", { since: le(t.disabledSince) })
|
|
95
|
+
}) : null]
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
function ve({ endpoint: e }) {
|
|
99
|
+
let t = u();
|
|
100
|
+
return e.disabledSince == null ? null : /* @__PURE__ */ q("span", {
|
|
101
|
+
className: "\n inline-flex shrink-0 items-center rounded-md bg-muted px-1.5 py-0.5 text-xs font-medium\n text-muted-foreground\n ",
|
|
102
|
+
children: t("endpoint_disabled_badge")
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
// src/workspace/setup/endpoints/page.tsx
|
|
106
|
+
var ye = /* @__PURE__ */ e({
|
|
107
|
+
CreateEndpointForm: () => $,
|
|
108
|
+
SetupEndpointsPage: () => Q
|
|
109
|
+
});
|
|
110
|
+
function Q({ workspaceId: e }) {
|
|
111
|
+
let t = u(), n = d(), r = l(), i = de(), s = o.endpoint.list.useQuery({ workspaceId: e }), { open: c } = W(), [f, m] = G(null);
|
|
112
|
+
return /* @__PURE__ */ J(L, { children: [
|
|
113
|
+
/* @__PURE__ */ q(E, {
|
|
114
|
+
icon: /* @__PURE__ */ q(ae, {}),
|
|
115
|
+
breadcrumbs: /* @__PURE__ */ q(te, { workspaceId: e }),
|
|
116
|
+
title: t("setup_endpoints_title"),
|
|
117
|
+
description: t("setup_endpoints_description"),
|
|
118
|
+
actions: /* @__PURE__ */ J(S, {
|
|
119
|
+
type: "button",
|
|
120
|
+
size: "sm",
|
|
121
|
+
onClick: () => {
|
|
122
|
+
i({
|
|
123
|
+
to: "/workspace/$workspaceId/setup/endpoints/new",
|
|
124
|
+
params: { workspaceId: e }
|
|
125
|
+
});
|
|
126
|
+
},
|
|
127
|
+
children: [/* @__PURE__ */ q(se, { "data-icon": "inline-start" }), t("endpoint_create_action")]
|
|
128
|
+
})
|
|
129
|
+
}),
|
|
130
|
+
/* @__PURE__ */ q(R, { children: /* @__PURE__ */ q(D, {
|
|
131
|
+
query: s,
|
|
132
|
+
loading: /* @__PURE__ */ J("div", {
|
|
133
|
+
className: "space-y-2",
|
|
134
|
+
children: [/* @__PURE__ */ q(C, { className: "h-10 w-full" }), /* @__PURE__ */ q(C, { className: "h-10 w-4/5" })]
|
|
135
|
+
}),
|
|
136
|
+
error: (e) => /* @__PURE__ */ q(O, { message: a(e) }),
|
|
137
|
+
isEmpty: (e) => e.endpoints.length === 0,
|
|
138
|
+
empty: /* @__PURE__ */ q(B, { children: t("setup_endpoints_empty") }),
|
|
139
|
+
children: ({ endpoints: n }) => /* @__PURE__ */ q(N, { children: n.map((n) => /* @__PURE__ */ J(U, {
|
|
140
|
+
"data-context-endpoint-id": n.id,
|
|
141
|
+
children: [
|
|
142
|
+
/* @__PURE__ */ q(ge, { endpointId: n.id }),
|
|
143
|
+
/* @__PURE__ */ J(P, {
|
|
144
|
+
to: "/workspace/$workspaceId/setup/endpoints/$endpointId/status",
|
|
145
|
+
params: {
|
|
146
|
+
workspaceId: e,
|
|
147
|
+
endpointId: n.id
|
|
148
|
+
},
|
|
149
|
+
children: [/* @__PURE__ */ J("div", {
|
|
150
|
+
className: "flex min-w-0 items-center gap-2",
|
|
151
|
+
children: [/* @__PURE__ */ q(V, { children: ue(n.name, r) }), /* @__PURE__ */ q(ve, { endpoint: n })]
|
|
152
|
+
}), /* @__PURE__ */ q(z, { children: n.kind === "pin" ? ee(n) : n.kind === "wireguard" ? A(n.port) : `${t("endpoint_list_host")}: ${n.hostname ?? "—"}:${String(n.port)}` })]
|
|
153
|
+
}),
|
|
154
|
+
/* @__PURE__ */ J(H, { children: [/* @__PURE__ */ q(_e, {
|
|
155
|
+
workspaceId: e,
|
|
156
|
+
endpoint: n,
|
|
157
|
+
compact: !0
|
|
158
|
+
}), /* @__PURE__ */ J(I, { children: [
|
|
159
|
+
n.kind === "wireguard" ? /* @__PURE__ */ q(F, {
|
|
160
|
+
"aria-label": t("endpoint_docs_action"),
|
|
161
|
+
onClick: () => {
|
|
162
|
+
c(n.id);
|
|
163
|
+
},
|
|
164
|
+
children: /* @__PURE__ */ q(Y, {})
|
|
165
|
+
}) : null,
|
|
166
|
+
/* @__PURE__ */ q(F, {
|
|
167
|
+
"aria-label": t("endpoint_edit_action"),
|
|
168
|
+
onClick: () => {
|
|
169
|
+
i({
|
|
170
|
+
to: "/workspace/$workspaceId/setup/endpoints/$endpointId",
|
|
171
|
+
params: {
|
|
172
|
+
workspaceId: e,
|
|
173
|
+
endpointId: n.id
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
},
|
|
177
|
+
children: /* @__PURE__ */ q(oe, {})
|
|
178
|
+
}),
|
|
179
|
+
/* @__PURE__ */ q(F, {
|
|
180
|
+
tone: "destructive",
|
|
181
|
+
"aria-label": t("endpoint_delete_action"),
|
|
182
|
+
onClick: () => {
|
|
183
|
+
m(n);
|
|
184
|
+
},
|
|
185
|
+
children: /* @__PURE__ */ q(ce, {})
|
|
186
|
+
})
|
|
187
|
+
] })] })
|
|
188
|
+
]
|
|
189
|
+
}, n.id)) })
|
|
190
|
+
}) }),
|
|
191
|
+
/* @__PURE__ */ q(_, {
|
|
192
|
+
open: f != null,
|
|
193
|
+
onOpenChange: (e) => {
|
|
194
|
+
e || m(null);
|
|
195
|
+
},
|
|
196
|
+
children: /* @__PURE__ */ q(p, { children: f ? /* @__PURE__ */ q(be, {
|
|
197
|
+
workspaceId: e,
|
|
198
|
+
endpointId: f.id,
|
|
199
|
+
baseRevision: f.revision,
|
|
200
|
+
onCancel: () => {
|
|
201
|
+
m(null);
|
|
202
|
+
},
|
|
203
|
+
onDeleted: () => {
|
|
204
|
+
m(null), n.success(t("endpoint_delete_toast"));
|
|
205
|
+
}
|
|
206
|
+
}) : null })
|
|
207
|
+
})
|
|
208
|
+
] });
|
|
209
|
+
}
|
|
210
|
+
function $({ workspaceId: e, onCancel: a, onCreated: o }) {
|
|
211
|
+
let l = u(), f = d(), { open: p } = W(), g = r(e).create, _ = ne(), [C, E] = G(null), D = {
|
|
212
|
+
kind: "pin",
|
|
213
|
+
name: l("endpoint_default_name"),
|
|
214
|
+
hostname: "",
|
|
215
|
+
pinCode: "",
|
|
216
|
+
publicKey: "",
|
|
217
|
+
port: String(me),
|
|
218
|
+
authorizationCode: ""
|
|
219
|
+
}, O = n({
|
|
220
|
+
defaultValues: D,
|
|
221
|
+
validators: s({
|
|
222
|
+
schema: fe,
|
|
223
|
+
submit: async (n) => {
|
|
224
|
+
let r = pe(n, {
|
|
225
|
+
workspaceId: e,
|
|
226
|
+
defaultName: c("endpoint_default_name")
|
|
227
|
+
});
|
|
228
|
+
if (!r.ok) return t(r, X);
|
|
229
|
+
let i = r.input;
|
|
230
|
+
if (i.kind === "pin") {
|
|
231
|
+
if (C == null) {
|
|
232
|
+
let t = await _.begin({
|
|
233
|
+
workspaceId: e,
|
|
234
|
+
pinCode: i.pinCode
|
|
235
|
+
});
|
|
236
|
+
if (t === "closed") return null;
|
|
237
|
+
if (t != null) return E({
|
|
238
|
+
...t,
|
|
239
|
+
pinCode: i.pinCode
|
|
240
|
+
}), null;
|
|
241
|
+
} else {
|
|
242
|
+
let e = M(n.authorizationCode);
|
|
243
|
+
if (!e.ok) return { fields: { authorizationCode: () => c("endpoint_presence_code_invalid") } };
|
|
244
|
+
i = {
|
|
245
|
+
...i,
|
|
246
|
+
pinCode: C.pinCode,
|
|
247
|
+
challengeId: C.challengeId,
|
|
248
|
+
...e.code == null ? {} : { authorizationCode: e.code }
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
let a;
|
|
253
|
+
try {
|
|
254
|
+
a = await g.mutateAsync(i);
|
|
255
|
+
} catch (e) {
|
|
256
|
+
throw C != null && !re(e) && (_.cancel(C.challengeId), E(null), O.setFieldValue("authorizationCode", "")), e;
|
|
257
|
+
}
|
|
258
|
+
return C != null && _.settle(C.challengeId), f.success(l("endpoint_create_toast")), queueMicrotask(() => {
|
|
259
|
+
o({
|
|
260
|
+
id: a.id,
|
|
261
|
+
kind: a.kind
|
|
262
|
+
}), a.kind === "wireguard" && p(a.id);
|
|
263
|
+
}), null;
|
|
264
|
+
},
|
|
265
|
+
mapError: (e, t) => j(e, t, C?.codeDisplayed ?? !0)
|
|
266
|
+
}),
|
|
267
|
+
onSubmitInvalid: i
|
|
268
|
+
});
|
|
269
|
+
return /* @__PURE__ */ q(O.AppForm, { children: /* @__PURE__ */ J(O.FormRoot, {
|
|
270
|
+
layout: "dialog",
|
|
271
|
+
children: [
|
|
272
|
+
/* @__PURE__ */ J(v, { children: [/* @__PURE__ */ q(h, { children: l(C == null ? "endpoint_create_title" : "endpoint_presence_title") }), C == null ? /* @__PURE__ */ q(O.Subscribe, {
|
|
273
|
+
selector: (e) => e.values.kind,
|
|
274
|
+
children: (e) => /* @__PURE__ */ q(y, { children: l(e === "pin" ? "endpoint_create_description_pin" : e === "wireguard" ? "endpoint_create_description_wireguard" : "endpoint_create_description") })
|
|
275
|
+
}) : /* @__PURE__ */ q(y, { children: l("endpoint_presence_button") })] }),
|
|
276
|
+
/* @__PURE__ */ J(T, { children: [C == null ? null : /* @__PURE__ */ J(K, { children: [
|
|
277
|
+
/* @__PURE__ */ q(O.Subscribe, {
|
|
278
|
+
selector: (e) => e.isSubmitting,
|
|
279
|
+
children: (e) => /* @__PURE__ */ q(ie, {
|
|
280
|
+
challengeId: C.challengeId,
|
|
281
|
+
paused: e,
|
|
282
|
+
onDone: () => {
|
|
283
|
+
O.setFieldValue("authorizationCode", ""), O.handleSubmit();
|
|
284
|
+
}
|
|
285
|
+
})
|
|
286
|
+
}),
|
|
287
|
+
/* @__PURE__ */ q("p", {
|
|
288
|
+
className: "text-sm",
|
|
289
|
+
children: C.codeDisplayed ? l("endpoint_presence_or_code") : l("endpoint_presence_button_only")
|
|
290
|
+
}),
|
|
291
|
+
C.codeDisplayed ? /* @__PURE__ */ q(O.AppField, {
|
|
292
|
+
name: "authorizationCode",
|
|
293
|
+
children: (e) => /* @__PURE__ */ q(e.TextField, {
|
|
294
|
+
label: l("endpoint_presence_code_label"),
|
|
295
|
+
id: "endpoint-authorization-code",
|
|
296
|
+
autoComplete: "off",
|
|
297
|
+
spellCheck: !1,
|
|
298
|
+
inputMode: "numeric",
|
|
299
|
+
autoFocus: !0
|
|
300
|
+
})
|
|
301
|
+
}) : null
|
|
302
|
+
] }), C == null ? /* @__PURE__ */ q(O.Subscribe, {
|
|
303
|
+
selector: (e) => e.isSubmitting,
|
|
304
|
+
children: (e) => /* @__PURE__ */ J(w, {
|
|
305
|
+
disabled: e,
|
|
306
|
+
className: "contents",
|
|
307
|
+
children: [
|
|
308
|
+
/* @__PURE__ */ q(O.AppField, {
|
|
309
|
+
name: "kind",
|
|
310
|
+
children: (e) => /* @__PURE__ */ J("div", {
|
|
311
|
+
className: "space-y-2",
|
|
312
|
+
children: [/* @__PURE__ */ q("p", {
|
|
313
|
+
className: "text-sm font-medium",
|
|
314
|
+
children: l("endpoint_field_kind")
|
|
315
|
+
}), /* @__PURE__ */ J(x, {
|
|
316
|
+
variant: "outline",
|
|
317
|
+
size: "sm",
|
|
318
|
+
spacing: 0,
|
|
319
|
+
value: [e.state.value],
|
|
320
|
+
onValueChange: (t) => {
|
|
321
|
+
let n = t[0];
|
|
322
|
+
(n === "direct" || n === "pin" || n === "wireguard") && e.handleChange(n);
|
|
323
|
+
},
|
|
324
|
+
className: "w-full",
|
|
325
|
+
children: [
|
|
326
|
+
/* @__PURE__ */ q(b, {
|
|
327
|
+
value: "pin",
|
|
328
|
+
className: "flex-1",
|
|
329
|
+
children: l("endpoint_kind_pin")
|
|
330
|
+
}),
|
|
331
|
+
/* @__PURE__ */ q(b, {
|
|
332
|
+
value: "wireguard",
|
|
333
|
+
className: "flex-1",
|
|
334
|
+
children: l("endpoint_kind_wireguard")
|
|
335
|
+
}),
|
|
336
|
+
/* @__PURE__ */ q(b, {
|
|
337
|
+
value: "direct",
|
|
338
|
+
className: "flex-1",
|
|
339
|
+
children: l("endpoint_kind_direct")
|
|
340
|
+
})
|
|
341
|
+
]
|
|
342
|
+
})]
|
|
343
|
+
})
|
|
344
|
+
}),
|
|
345
|
+
/* @__PURE__ */ q(O.AppField, {
|
|
346
|
+
name: "name",
|
|
347
|
+
children: (e) => /* @__PURE__ */ q(e.TextField, {
|
|
348
|
+
label: l("endpoint_field_name"),
|
|
349
|
+
id: "endpoint-name",
|
|
350
|
+
autoFocus: !0
|
|
351
|
+
})
|
|
352
|
+
}),
|
|
353
|
+
/* @__PURE__ */ q(O.Subscribe, {
|
|
354
|
+
selector: (e) => e.values.kind,
|
|
355
|
+
children: (e) => e === "pin" ? /* @__PURE__ */ q(O.AppField, {
|
|
356
|
+
name: "pinCode",
|
|
357
|
+
children: (e) => /* @__PURE__ */ q(e.TextField, {
|
|
358
|
+
label: l("endpoint_field_pin_code"),
|
|
359
|
+
id: "endpoint-pin",
|
|
360
|
+
autoComplete: "off",
|
|
361
|
+
spellCheck: !1
|
|
362
|
+
})
|
|
363
|
+
}) : e === "wireguard" ? /* @__PURE__ */ J("div", {
|
|
364
|
+
className: "\n grid grid-cols-1 gap-4\n sm:grid-cols-[minmax(0,1fr)_6.5rem]\n ",
|
|
365
|
+
children: [/* @__PURE__ */ q(O.AppField, {
|
|
366
|
+
name: "publicKey",
|
|
367
|
+
children: (e) => /* @__PURE__ */ q(e.TextField, {
|
|
368
|
+
label: l("endpoint_field_public_key"),
|
|
369
|
+
id: "endpoint-public-key",
|
|
370
|
+
autoComplete: "off",
|
|
371
|
+
spellCheck: !1
|
|
372
|
+
})
|
|
373
|
+
}), /* @__PURE__ */ q(O.AppField, {
|
|
374
|
+
name: "port",
|
|
375
|
+
children: (e) => /* @__PURE__ */ q(e.TextField, {
|
|
376
|
+
label: l("endpoint_field_port"),
|
|
377
|
+
id: "endpoint-port",
|
|
378
|
+
type: "number",
|
|
379
|
+
inputMode: "numeric"
|
|
380
|
+
})
|
|
381
|
+
})]
|
|
382
|
+
}) : /* @__PURE__ */ J("div", {
|
|
383
|
+
className: "\n grid grid-cols-1 gap-4\n sm:grid-cols-[minmax(0,1fr)_6.5rem]\n ",
|
|
384
|
+
children: [/* @__PURE__ */ q(O.AppField, {
|
|
385
|
+
name: "hostname",
|
|
386
|
+
children: (e) => /* @__PURE__ */ q(e.TextField, {
|
|
387
|
+
label: l("endpoint_field_hostname"),
|
|
388
|
+
id: "endpoint-hostname",
|
|
389
|
+
autoComplete: "off",
|
|
390
|
+
spellCheck: !1
|
|
391
|
+
})
|
|
392
|
+
}), /* @__PURE__ */ q(O.AppField, {
|
|
393
|
+
name: "port",
|
|
394
|
+
children: (e) => /* @__PURE__ */ q(e.TextField, {
|
|
395
|
+
label: l("endpoint_field_port"),
|
|
396
|
+
id: "endpoint-port",
|
|
397
|
+
type: "number",
|
|
398
|
+
inputMode: "numeric"
|
|
399
|
+
})
|
|
400
|
+
})]
|
|
401
|
+
})
|
|
402
|
+
})
|
|
403
|
+
]
|
|
404
|
+
})
|
|
405
|
+
}) : null] }),
|
|
406
|
+
/* @__PURE__ */ J(m, { children: [/* @__PURE__ */ q(S, {
|
|
407
|
+
type: "button",
|
|
408
|
+
variant: "outline",
|
|
409
|
+
onClick: () => {
|
|
410
|
+
a();
|
|
411
|
+
},
|
|
412
|
+
children: l("action_cancel")
|
|
413
|
+
}), /* @__PURE__ */ q(O.SubmitButton, {
|
|
414
|
+
label: C == null ? l("endpoint_create_submit") : C.codeDisplayed ? l("endpoint_presence_submit") : l("endpoint_presence_waiting"),
|
|
415
|
+
pendingLabel: l("action_creating"),
|
|
416
|
+
disabled: C != null && !C.codeDisplayed
|
|
417
|
+
})] })
|
|
418
|
+
]
|
|
419
|
+
}) });
|
|
420
|
+
}
|
|
421
|
+
function be({ workspaceId: e, endpointId: t, baseRevision: a, onCancel: o, onDeleted: c }) {
|
|
422
|
+
let l = u(), d = r(e).remove, f = n({
|
|
423
|
+
defaultValues: {},
|
|
424
|
+
validators: s({ submit: async () => (await d.mutateAsync({
|
|
425
|
+
id: t,
|
|
426
|
+
baseRevision: a
|
|
427
|
+
}), null) }),
|
|
428
|
+
onSubmitInvalid: i,
|
|
429
|
+
onSubmit: () => {
|
|
430
|
+
c();
|
|
431
|
+
}
|
|
432
|
+
});
|
|
433
|
+
return /* @__PURE__ */ q(f.AppForm, { children: /* @__PURE__ */ J(f.FormRoot, {
|
|
434
|
+
layout: "dialog",
|
|
435
|
+
children: [/* @__PURE__ */ J(v, { children: [/* @__PURE__ */ q(h, { children: l("endpoint_delete_confirm_title") }), /* @__PURE__ */ q(y, { children: l("endpoint_delete_confirm_description") })] }), /* @__PURE__ */ J(m, { children: [/* @__PURE__ */ q(S, {
|
|
436
|
+
type: "button",
|
|
437
|
+
variant: "outline",
|
|
438
|
+
onClick: () => {
|
|
439
|
+
o();
|
|
440
|
+
},
|
|
441
|
+
children: l("action_cancel")
|
|
442
|
+
}), /* @__PURE__ */ q(f.SubmitButton, {
|
|
443
|
+
label: l("endpoint_delete_confirm_submit"),
|
|
444
|
+
pendingLabel: l("action_deleting"),
|
|
445
|
+
variant: "destructive"
|
|
446
|
+
})] })]
|
|
447
|
+
}) });
|
|
448
|
+
}
|
|
449
|
+
export { X as i, Q as n, ye as r, $ as t };
|