@overvis/hmi-workspace-ui 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/dist/alarm-list-sheAq-pb.js +414 -0
  2. package/dist/alarm-rule-dialog-D_ml7V0v.js +417 -0
  3. package/dist/{alarm-rule-lists-C5v1Kf7A.js → alarm-rule-lists-DaA4soF4.js} +123 -125
  4. package/dist/{alarm-rules-page-CqFzofPd.js → alarm-rules-page-OFjOQ-dm.js} +15 -18
  5. package/dist/alert-dialog-B60PF7S9.js +891 -0
  6. package/dist/{base-revision-YCO27zR4.js → base-revision-DYCOZS0R.js} +26 -29
  7. package/dist/{breadcrumbs-0cjsV2cq.js → breadcrumbs-D2u8KZQo.js} +6 -7
  8. package/dist/{catalog-list-DjZojYLJ.js → catalog-list-LXuRix0-.js} +2 -4
  9. package/dist/{code-editor-BVimvjDV.js → code-editor-BMSyzAxu.js} +5 -6
  10. package/dist/dashboard-bindings.js +1 -2
  11. package/dist/{dashboards-page-BlrJguNz.js → dashboards-page-wnmmLpVC.js} +335 -359
  12. package/dist/{de-14WdmJxZ.js → de-hkEr2usK.js} +1 -2
  13. package/dist/diagnostic-text-CsbENUNI.js +116 -0
  14. package/dist/{dialogs-B6BRnf3Q.js → dialogs-AtIYlNSy.js} +219 -227
  15. package/dist/{dialogs-D_v1LeH4.js → dialogs-DsHbKgZD.js} +2523 -2590
  16. package/dist/{display-DmOo23mi.js → display-DSyEwQt8.js} +4 -6
  17. package/dist/{editor-language-To9MxloY.js → editor-language-CTfJBXMs.js} +3 -5
  18. package/dist/editor-page-BWbVGJvU.js +1337 -0
  19. package/dist/{en-BgercpT0.js → en-UW_k-Bd6.js} +1 -2
  20. package/dist/entity-controls-BCuRx882.js +71 -0
  21. package/dist/errors-Cawve9yD.js +25 -0
  22. package/dist/{footer-DC-Q0052.js → footer-B9XdpVzq.js} +2404 -2515
  23. package/dist/host.js +8143 -675
  24. package/dist/{i18n-BgzakKoC.js → i18n-Dt6xbSK6.js} +77 -90
  25. package/dist/i18n.js +1 -2
  26. package/dist/index.js +5149 -5345
  27. package/dist/{lat-lng-B12P7QyY.js → lat-lng-Bl77AGSO.js} +1 -2
  28. package/dist/{list-page-CvsdZb86.js → list-page-agHupfNb.js} +116 -123
  29. package/dist/{location-map-renderer-DO5yfdSU.js → location-map-renderer-kxU6cgFl.js} +6 -6
  30. package/dist/{location-picker-renderer-CjCxg6ai.js → location-picker-renderer-B1_-n8lf.js} +3 -4
  31. package/dist/{model-B8gGi4OK.js → model-tpg_xpFB.js} +1 -2
  32. package/dist/{notice-card-DyGywFsW.js → notice-card-CH28rYUt.js} +54 -58
  33. package/dist/{page-v6LCwswN.js → page-CZPHJUmz.js} +92 -100
  34. package/dist/page-DpdkOGGb.js +449 -0
  35. package/dist/page-HCGXXGjy.js +507 -0
  36. package/dist/panel-BCwBlB_h.js +949 -0
  37. package/dist/parameter-values.js +3 -16
  38. package/dist/{pl-lQ9HXV9k.js → pl-BokvsP3J.js} +1 -2
  39. package/dist/presence-code-cT6wxlTg.js +73 -0
  40. package/dist/{query-gate-DVhNIkge.js → query-gate-DqmHsZ07.js} +6 -6
  41. package/dist/{provider-DoEpKcQ-.js → quick-report-DEqqwQxR.js} +9423 -5102
  42. package/dist/{retention-BYXNpYmR.js → retention-DZ0reGGe.js} +4 -6
  43. package/dist/retention-note-nequESpo.js +40 -0
  44. package/dist/{rolldown-runtime-Dy4uBu1J.js → rolldown-runtime-CGnMp29N.js} +1 -2
  45. package/dist/{ru-qTKINoUj.js → ru-DZSlsRHq.js} +1 -2
  46. package/dist/run-text-DneX9rWh.js +112 -0
  47. package/dist/{search-D4rDnE9T.js → search-DP9_alSQ.js} +26 -29
  48. package/dist/{sections-kCOyc4NR.js → sections-BU7NKUOQ.js} +2 -3
  49. package/dist/{select-BKiOWdSr.js → select-Te6Qv1Zu.js} +17 -23
  50. package/dist/{spinner-C-HPNxOc.js → spinner-BRcNKwjH.js} +182 -201
  51. package/dist/src/version.d.ts +1 -1
  52. package/dist/src/workspace/local-workspace-app.d.ts +1 -1
  53. package/dist/src/workspace/routes.d.ts +1 -1
  54. package/dist/{starter-fields-BRLX0z-v.js → starter-fields-yM4B49nd.js} +154 -157
  55. package/dist/{starter-handoff-BA3ucMKL.js → starter-handoff-BaK8Ss8I.js} +1 -2
  56. package/dist/styles.css +1 -1
  57. package/dist/ui.js +334 -374
  58. package/dist/{uk-CwpJAxmx.js → uk-CjXPq9Lk.js} +1 -2
  59. package/dist/{wireguard-docs-AfU6NzTL.js → wireguard-docs-CC8XKBR7.js} +14 -17
  60. package/package.json +15 -9
  61. package/dist/alarm-list-BL3xQ5Lf.js +0 -423
  62. package/dist/alarm-rule-dialog-S1ZUg-74.js +0 -423
  63. package/dist/alert-B8MAoIO8.js +0 -45
  64. package/dist/alert-dialog-CYkuMg5D.js +0 -129
  65. package/dist/api-error-9rQmUN5L.js +0 -93
  66. package/dist/breadcrumb-DzVL1yHa.js +0 -74
  67. package/dist/button-6SxPBYMz.js +0 -44
  68. package/dist/context-u9KJQmdB.js +0 -102
  69. package/dist/copyable-id-DYGiAcnq.js +0 -40
  70. package/dist/dashboard-context-CBfG6DoT.js +0 -191
  71. package/dist/date-time-picker-C3FhMXk6.js +0 -266
  72. package/dist/diagnostic-text-BAkzW0SE.js +0 -111
  73. package/dist/diagnostic-text-DiKd2i1w.js +0 -76
  74. package/dist/dialog-BIhQXcZC.js +0 -237
  75. package/dist/dialog-BqyIxMD-.js +0 -54
  76. package/dist/dropdown-menu-DSzbBq3v.js +0 -136
  77. package/dist/editor-page-BiSZJz5b.js +0 -1353
  78. package/dist/empty-B-QJ-06w.js +0 -59
  79. package/dist/entity-controls-D1K4Ot3O.js +0 -76
  80. package/dist/errors-CcsvDHu8.js +0 -26
  81. package/dist/history-page-sAAhG54V.js +0 -1400
  82. package/dist/icon-D-pR9htW.js +0 -57
  83. package/dist/index-page-DMH82fZe.js +0 -214
  84. package/dist/item-B5SaTFQU.js +0 -120
  85. package/dist/mutation-form-validators-BNz5bsv1.js +0 -2408
  86. package/dist/mutations-THtGG6Ai.js +0 -240
  87. package/dist/page-2KPemaAj.js +0 -328
  88. package/dist/page-6rIoTg2L.js +0 -459
  89. package/dist/page-C6giEoEd.js +0 -1935
  90. package/dist/page-DCbTxKsi.js +0 -313
  91. package/dist/page-DWO427hT.js +0 -208
  92. package/dist/page-LXu_2zm3.js +0 -137
  93. package/dist/page-aaUiVOnk.js +0 -513
  94. package/dist/page-header-RB2YFWlE.js +0 -55
  95. package/dist/page-title-CdCbiLt8.js +0 -14
  96. package/dist/panel-DDy8tUNR.js +0 -338
  97. package/dist/presence-code-BfSXr50g.js +0 -83
  98. package/dist/progress-C7cxNJA1.js +0 -83
  99. package/dist/provider-BOeYHi0n.js +0 -134
  100. package/dist/quick-report-CUVJnbKP.js +0 -416
  101. package/dist/radio-group-CZGqVbkJ.js +0 -26
  102. package/dist/retention-note-CHhA6gjY.js +0 -42
  103. package/dist/run-text-DvaO8LDF.js +0 -113
  104. package/dist/select-eNgZdZ30.js +0 -521
  105. package/dist/skeleton-6yk8Tdh5.js +0 -19
  106. package/dist/slider-DorDsoF8.js +0 -37
  107. package/dist/status-page-DAHiKM9P.js +0 -3286
  108. package/dist/switch-BqD0RH_G.js +0 -18
  109. package/dist/table-Q2-voLuw.js +0 -65
  110. package/dist/tabs-CSIucYFP.js +0 -57
  111. package/dist/theme-provider-BkRohQFU.js +0 -61
  112. package/dist/toggle-group-9Bs0Mm3r.js +0 -82
  113. package/dist/trpc-CvJUuUXp.js +0 -153
  114. package/dist/utils-CX-Pz5p6.js +0 -8
  115. package/dist/writability-BuH-spxv.js +0 -57
@@ -1,26 +1,16 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { r as t } from "./trpc-CvJUuUXp.js";
3
- import { f as n, h as r, m as i, n as a } from "./i18n-BgzakKoC.js";
4
- import { a as o, at as s, d as c, i as l, n as u, t as d } from "./mutation-form-validators-BNz5bsv1.js";
5
- import { A as f, B as p, H as m, L as h, M as g, V as _, z as v } from "./spinner-C-HPNxOc.js";
6
- import { t as y } from "./button-6SxPBYMz.js";
7
- import { a as b, i as x, l as S, o as C, r as w, t as T } from "./dialog-BIhQXcZC.js";
8
- import { n as E } from "./skeleton-6yk8Tdh5.js";
9
- import { o as D, r as O } from "./context-u9KJQmdB.js";
10
- import { n as k } from "./api-error-9rQmUN5L.js";
11
- import { t as A } from "./switch-BqD0RH_G.js";
12
- import { n as j, t as M } from "./toggle-group-9Bs0Mm3r.js";
13
- import { i as N, m as P, p as ee } from "./mutations-THtGG6Ai.js";
14
- import { n as te } from "./dialog-BqyIxMD-.js";
15
- import { a as F, r as ne } from "./provider-DoEpKcQ-.js";
16
- import { t as re } from "./page-header-RB2YFWlE.js";
17
- import { n as ie, r as I, t as ae } from "./query-gate-DVhNIkge.js";
18
- import { t as oe } from "./breadcrumbs-0cjsV2cq.js";
19
- import { n as se, t as ce } from "./base-revision-YCO27zR4.js";
20
- import { a as le, c as ue, d as L, i as de, l as fe, n as pe, o as me, r as he, s as ge, t as _e, u as ve } from "./catalog-list-DjZojYLJ.js";
21
- import { useQuery as ye } from "@tanstack/react-query";
22
- import { createElement as be, useRef as xe, useState as R } from "react";
23
- import { DASHBOARD_ABI_VERSION as Se, DASHBOARD_ICON_IDS as Ce, DASHBOARD_MANIFEST_FILE as we, DEFAULT_DASHBOARD_ICON_ID as z, DEFAULT_DASHBOARD_TEMPLATE_ID as B, dashboardConfigurationIssues as Te, dashboardCopyFormSchema as V, dashboardCopyFormToInput as Ee, dashboardCreateFormToInput as De, dashboardCreateFromReportFormSchema as Oe, dashboardCreateFromReportFormToInput as ke, dashboardEntrypointUrl as Ae, dashboardManifestSchema as je, dashboardNameFormSchema as Me, dashboardSettingsFormSchema as Ne, dashboardSettingsFormToInput as Pe, dashboardSettingsFormValues as Fe, dashboardSupportedLocalesType as Ie, formatDashboardConfigurationIssues as Le, isDashboardConfigType as Re } from "@overvis/hmi-shared/dashboard";
1
+ import { t as e } from "./rolldown-runtime-CGnMp29N.js";
2
+ import { $r as t, Bn as n, Fr as r, Ft as i, Gt as a, Hn as o, Kn as s, Mr as c, Qn as l, Wn as u, Wt as d, c as f, ii as p, kt as m, o as h, zn as g } from "./quick-report-DEqqwQxR.js";
3
+ import { f as _, h as v, m as y, n as b } from "./i18n-Dt6xbSK6.js";
4
+ import { $ as x, B as S, H as C, K as w, R as T, U as E, V as D, X as O, Y as ee, jt as k, xt as A } from "./alert-dialog-B60PF7S9.js";
5
+ import { A as te, B as j, H as M, L as N, M as P, V as F, z as I } from "./spinner-BRcNKwjH.js";
6
+ import { b as ne } from "./panel-BCwBlB_h.js";
7
+ import { n as re, r as L, t as ie } from "./query-gate-DqmHsZ07.js";
8
+ import { t as ae } from "./breadcrumbs-D2u8KZQo.js";
9
+ import { n as oe, t as se } from "./base-revision-DYCOZS0R.js";
10
+ import { a as ce, c as le, d as R, i as ue, l as de, n as fe, o as pe, r as me, s as he, t as ge, u as _e } from "./catalog-list-LXuRix0-.js";
11
+ import { useQuery as ve } from "@tanstack/react-query";
12
+ import { createElement as ye, useRef as be, useState as z } from "react";
13
+ import { DASHBOARD_ABI_VERSION as xe, DASHBOARD_ICON_IDS as Se, DASHBOARD_MANIFEST_FILE as Ce, DEFAULT_DASHBOARD_ICON_ID as B, DEFAULT_DASHBOARD_TEMPLATE_ID as V, dashboardConfigurationIssues as we, dashboardCopyFormSchema as Te, dashboardCopyFormToInput as Ee, dashboardCreateFormToInput as De, dashboardCreateFromReportFormSchema as Oe, dashboardCreateFromReportFormToInput as ke, dashboardEntrypointUrl as Ae, dashboardManifestSchema as je, dashboardNameFormSchema as Me, dashboardSettingsFormSchema as Ne, dashboardSettingsFormToInput as Pe, dashboardSettingsFormValues as Fe, dashboardSupportedLocalesType as Ie, formatDashboardConfigurationIssues as Le, isDashboardConfigType as Re } from "@overvis/hmi-shared/dashboard";
24
14
  import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
25
15
  import { Compile as ze } from "typebox/compile";
26
16
  import { CopyIcon as Be, GripVerticalIcon as Ve, LayoutDashboardIcon as He, PencilIcon as Ue, PlusIcon as We, Trash2Icon as Ge, icons as G } from "lucide-react";
@@ -30,7 +20,7 @@ import { Accessibility as qe } from "@dnd-kit/dom";
30
20
  import { DragDropProvider as Je } from "@dnd-kit/react";
31
21
  import { isSortable as J, useSortable as Ye } from "@dnd-kit/react/sortable";
32
22
  import { builtinGraphicsSymbolPrefix as Xe } from "@overvis/hmi-shared/graphics";
33
- //#region src/workspace/dashboards/icon.tsx
23
+ // src/workspace/dashboards/icon.tsx
34
24
  function Ze(e) {
35
25
  return e.split("-").map((e) => e.length === 0 ? "" : e.charAt(0).toUpperCase() + e.slice(1)).join("");
36
26
  }
@@ -43,7 +33,7 @@ function $e(e) {
43
33
  let n = Reflect.get(G, t);
44
34
  return Qe(n) ? n : void 0;
45
35
  }
46
- var et = $e(z) ?? G.LayoutDashboard;
36
+ var et = $e(B) ?? G.LayoutDashboard;
47
37
  function tt(e) {
48
38
  if (e != null) {
49
39
  let t = e.trim();
@@ -55,16 +45,15 @@ function tt(e) {
55
45
  return et;
56
46
  }
57
47
  function Y({ icon: e, className: t, strokeWidth: n }) {
58
- return be(tt(e), {
48
+ return ye(tt(e), {
59
49
  className: t,
60
50
  strokeWidth: n,
61
51
  "aria-hidden": !0
62
52
  });
63
53
  }
64
- //#endregion
65
- //#region src/workspace/dashboards/copy-dialog.tsx
54
+ // src/workspace/dashboards/copy-dialog.tsx
66
55
  function nt(e, t) {
67
- let n = q(), r = xe(null);
56
+ let n = q(), r = be(null);
68
57
  return {
69
58
  record: (e) => {
70
59
  r.current = e;
@@ -82,51 +71,50 @@ function nt(e, t) {
82
71
  };
83
72
  }
84
73
  function rt({ workspaceId: e, dashboard: t, onClose: n }) {
85
- let a = i(), s = r(), l = nt(e, n), u = N(e).copy, f = Array.from(K(t.name, s)), p = a("dashboard_copy_default_name", { name: f.join("") });
86
- for (; f.length > 0 && V["~standard"].validate({ name: p }).issues?.some((e) => e.keyword === "maxLength");) f.pop(), p = a("dashboard_copy_default_name", { name: f.join("") });
87
- let m = o({
88
- defaultValues: { name: p },
89
- validators: d({
90
- schema: V,
74
+ let r = y(), a = v(), o = nt(e, n), c = i(e).copy, u = Array.from(K(t.name, a)), d = r("dashboard_copy_default_name", { name: u.join("") });
75
+ for (; u.length > 0 && Te["~standard"].validate({ name: d }).issues?.some((e) => e.keyword === "maxLength");) u.pop(), d = r("dashboard_copy_default_name", { name: u.join("") });
76
+ let f = s({
77
+ defaultValues: { name: d },
78
+ validators: g({
79
+ schema: Te,
91
80
  submit: async (e) => {
92
- let n = await u.mutateAsync(Ee(e, t.id));
93
- return l.record(n.id), null;
81
+ let n = await c.mutateAsync(Ee(e, t.id));
82
+ return o.record(n.id), null;
94
83
  }
95
84
  }),
96
- onSubmitInvalid: c,
97
- onSubmit: l.onSubmit
85
+ onSubmitInvalid: l,
86
+ onSubmit: o.onSubmit
98
87
  });
99
88
  return /* @__PURE__ */ U(T, {
100
89
  open: !0,
101
90
  onOpenChange: (e) => {
102
91
  e || n();
103
92
  },
104
- children: /* @__PURE__ */ U(w, { children: /* @__PURE__ */ U(m.AppForm, { children: /* @__PURE__ */ W(m.FormRoot, {
93
+ children: /* @__PURE__ */ U(S, { children: /* @__PURE__ */ U(f.AppForm, { children: /* @__PURE__ */ W(f.FormRoot, {
105
94
  layout: "dialog",
106
95
  children: [
107
- /* @__PURE__ */ W(C, { children: [/* @__PURE__ */ U(S, { children: a("dashboard_copy_title") }), /* @__PURE__ */ U(x, { children: a("dashboard_copy_description") })] }),
108
- /* @__PURE__ */ U(_, { children: /* @__PURE__ */ U(m.AppField, {
96
+ /* @__PURE__ */ W(E, { children: [/* @__PURE__ */ U(w, { children: r("dashboard_copy_title") }), /* @__PURE__ */ U(D, { children: r("dashboard_copy_description") })] }),
97
+ /* @__PURE__ */ U(F, { children: /* @__PURE__ */ U(f.AppField, {
109
98
  name: "name",
110
99
  children: (e) => /* @__PURE__ */ U(e.TextField, {
111
- label: a("dashboard_field_name"),
100
+ label: r("dashboard_field_name"),
112
101
  autoFocus: !0
113
102
  })
114
103
  }) }),
115
- /* @__PURE__ */ W(b, { children: [/* @__PURE__ */ U(y, {
104
+ /* @__PURE__ */ W(C, { children: [/* @__PURE__ */ U(k, {
116
105
  type: "button",
117
106
  variant: "outline",
118
107
  onClick: n,
119
- children: a("action_cancel")
120
- }), /* @__PURE__ */ U(m.SubmitButton, {
121
- label: a("dashboard_copy_action"),
122
- pendingLabel: a("dashboard_copy_pending")
108
+ children: r("action_cancel")
109
+ }), /* @__PURE__ */ U(f.SubmitButton, {
110
+ label: r("dashboard_copy_action"),
111
+ pendingLabel: r("dashboard_copy_pending")
123
112
  })] })
124
113
  ]
125
114
  }) }) })
126
115
  });
127
116
  }
128
- //#endregion
129
- //#region src/workspace/dashboards/load-module.ts
117
+ // src/workspace/dashboards/load-module.ts
130
118
  var it = [
131
119
  "en",
132
120
  "pl",
@@ -138,7 +126,7 @@ function ot(e) {
138
126
  }
139
127
  function st(e, t) {
140
128
  if (!e.ok) return e.reason === "rebuild_required" ? { kind: "rebuild_required" } : { kind: "load_failed" };
141
- let n = Te(e.module.dashboardConfigType, t);
129
+ let n = we(e.module.dashboardConfigType, t);
142
130
  return n.length > 0 ? {
143
131
  kind: "issues",
144
132
  text: Le(n)
@@ -176,7 +164,7 @@ function lt(e) {
176
164
  reason: "invalid_module"
177
165
  };
178
166
  let i = "graphicsSymbols" in e ? e.graphicsSymbols : [];
179
- return !Array.isArray(i) || !i.every(ne) || i.some((e) => e.id.startsWith(Xe)) || new Set([...F, ...i].map((e) => e.id)).size !== i.length + F.length ? {
167
+ return !Array.isArray(i) || !i.every(h) || i.some((e) => e.id.startsWith(Xe)) || new Set([...f, ...i].map((e) => e.id)).size !== i.length + f.length ? {
180
168
  ok: !1,
181
169
  reason: "invalid_module"
182
170
  } : {
@@ -192,7 +180,7 @@ function lt(e) {
192
180
  var ut = /\/static\/dashboard\/[^/]+\/index\.js$/;
193
181
  function dt(e) {
194
182
  let t = e.search(/[?#]/), n = t < 0 ? e : e.slice(0, t), r = t < 0 ? "" : e.slice(t);
195
- return ut.test(n) ? `${n.slice(0, -8)}${we}${r}` : null;
183
+ return ut.test(n) ? `${n.slice(0, -8)}${Ce}${r}` : null;
196
184
  }
197
185
  async function ft(e) {
198
186
  let t = await fetch(e, { headers: { Accept: "application/json" } });
@@ -205,7 +193,7 @@ async function ft(e) {
205
193
  return !1;
206
194
  }
207
195
  let r = je["~standard"].validate(n);
208
- return r.issues == null && r.value.abi === Se;
196
+ return r.issues == null && r.value.abi === xe;
209
197
  }
210
198
  async function pt(e) {
211
199
  let t = dt(e);
@@ -217,8 +205,7 @@ async function pt(e) {
217
205
  e
218
206
  ));
219
207
  }
220
- //#endregion
221
- //#region src/workspace/dashboards/entrypoint.ts
208
+ // src/workspace/dashboards/entrypoint.ts
222
209
  async function mt(e) {
223
210
  try {
224
211
  let t = await fetch(e, {
@@ -242,10 +229,10 @@ async function ht(e) {
242
229
  };
243
230
  }
244
231
  function gt(e) {
245
- let { mode: t, getDashboardEntrypointUrl: n } = D();
246
- return ye({
232
+ let { mode: t, getDashboardEntrypointUrl: n } = r();
233
+ return ve({
247
234
  queryKey: [
248
- P,
235
+ a,
249
236
  t,
250
237
  e
251
238
  ],
@@ -258,8 +245,7 @@ function gt(e) {
258
245
  retry: !1
259
246
  });
260
247
  }
261
- //#endregion
262
- //#region src/workspace/dashboards/stylesheet.ts
248
+ // src/workspace/dashboards/stylesheet.ts
263
249
  var _t = "data-overvis-dashboard-css", vt = 0;
264
250
  function yt() {
265
251
  return vt += 1, String(vt);
@@ -281,11 +267,7 @@ function bt(e, t) {
281
267
  let o = (n) => {
282
268
  r.signal.removeEventListener("abort", l), t.removeEventListener("load", s), t.removeEventListener("error", c), e(n);
283
269
  }, s = () => {
284
- if (i) {
285
- t.remove(), o("missing");
286
- return;
287
- }
288
- o("ok");
270
+ i ? (t.remove(), o("missing")) : o("ok");
289
271
  }, c = () => {
290
272
  t.remove(), a === t && (a = null), o("missing");
291
273
  }, l = () => {
@@ -298,17 +280,16 @@ function bt(e, t) {
298
280
  }
299
281
  };
300
282
  }
301
- //#endregion
302
- //#region src/workspace/dashboards/enabled-switch.tsx
283
+ // src/workspace/dashboards/enabled-switch.tsx
303
284
  function Z({ workspaceId: e, dashboard: t, compact: n = !1, className: r }) {
304
- let o = i(), s = a(), { enable: c, disable: l } = N(e), u = (e) => ({
285
+ let a = y(), o = b(), { enable: s, disable: c } = i(e), l = (e) => ({
305
286
  onSuccess: () => {
306
- s.success(e);
287
+ o.success(e);
307
288
  },
308
289
  onError: (e) => {
309
- s.error(k(e));
290
+ o.error(u(e));
310
291
  }
311
- });
292
+ }), d = t.disabledSince == null, f = c.isPending || s.isPending;
312
293
  return /* @__PURE__ */ W("div", {
313
294
  className: r,
314
295
  onClick: (e) => {
@@ -319,39 +300,38 @@ function Z({ workspaceId: e, dashboard: t, compact: n = !1, className: r }) {
319
300
  },
320
301
  children: [/* @__PURE__ */ W("div", {
321
302
  className: "flex items-center gap-2",
322
- children: [/* @__PURE__ */ U(A, {
323
- checked: t.disabledSince == null,
324
- disabled: l.isPending || c.isPending,
303
+ children: [/* @__PURE__ */ U(x, {
304
+ checked: d,
305
+ disabled: f,
325
306
  size: "sm",
326
- "aria-label": o("dashboard_enabled_label"),
307
+ "aria-label": a("dashboard_enabled_label"),
327
308
  onCheckedChange: (e) => {
328
- e ? c.mutate({
309
+ e ? s.mutate({
329
310
  id: t.id,
330
311
  baseRevision: t.revision
331
- }, u(o("dashboard_enable_toast"))) : l.mutate({
312
+ }, l(a("dashboard_enable_toast"))) : c.mutate({
332
313
  id: t.id,
333
314
  baseRevision: t.revision
334
- }, u(o("dashboard_disable_toast")));
315
+ }, l(a("dashboard_disable_toast")));
335
316
  }
336
317
  }), n ? null : /* @__PURE__ */ U("span", {
337
318
  className: "text-sm text-muted-foreground",
338
- children: o("dashboard_enabled_label")
319
+ children: a("dashboard_enabled_label")
339
320
  })]
340
321
  }), !n && t.disabledSince != null ? /* @__PURE__ */ U("p", {
341
322
  className: "mt-1 text-xs text-muted-foreground",
342
- children: o("dashboard_disabled_since", { since: Ke(t.disabledSince) })
323
+ children: a("dashboard_disabled_since", { since: Ke(t.disabledSince) })
343
324
  }) : null]
344
325
  });
345
326
  }
346
327
  function xt({ dashboard: e }) {
347
- let t = i();
328
+ let t = y();
348
329
  return e.disabledSince == null ? null : /* @__PURE__ */ U("span", {
349
330
  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 ",
350
331
  children: t("dashboard_disabled_badge")
351
332
  });
352
333
  }
353
- //#endregion
354
- //#region src/workspace/setup/dashboards-order.ts
334
+ // src/workspace/setup/dashboards-order.ts
355
335
  function St(e) {
356
336
  let { ids: t, fromIndex: n, toIndex: r } = e;
357
337
  if (!Number.isInteger(n) || !Number.isInteger(r) || n < 0 || r < 0 || n >= t.length || r >= t.length || n === r) return null;
@@ -368,8 +348,7 @@ function Ct(e, t) {
368
348
  for (let t of e) i.has(t.id) || (r.push(t), i.add(t.id));
369
349
  return r;
370
350
  }
371
- //#endregion
372
- //#region src/workspace/setup/dashboards-reorder-queue.ts
351
+ // src/workspace/setup/dashboards-reorder-queue.ts
373
352
  function wt() {
374
353
  let e = 0, t = null, n = !1;
375
354
  async function r() {
@@ -399,8 +378,7 @@ function wt() {
399
378
  }, r();
400
379
  } };
401
380
  }
402
- //#endregion
403
- //#region src/workspace/setup/dashboards-sortable-list.tsx
381
+ // src/workspace/setup/dashboards-sortable-list.tsx
404
382
  function Q(e) {
405
383
  let t = e.data;
406
384
  return typeof t == "object" && t && "name" in t && typeof t.name == "string" ? t.name : "";
@@ -410,119 +388,119 @@ function Tt({ workspaceId: e, dashboards: t, onDelete: n }) {
410
388
  workspaceId: e,
411
389
  dashboards: t,
412
390
  onDelete: n
413
- }) : /* @__PURE__ */ U(le, { children: t.map((t) => /* @__PURE__ */ U(Ot, {
391
+ }) : /* @__PURE__ */ U(ce, { children: t.map((t) => /* @__PURE__ */ U(Ot, {
414
392
  workspaceId: e,
415
393
  dashboard: t,
416
394
  onDelete: n
417
395
  }, t.id)) });
418
396
  }
419
- function Et({ workspaceId: e, dashboards: n, onDelete: r }) {
420
- let o = i(), s = a(), c = t.useUtils(), l = t.dashboard.reorder.useMutation(), [u, d] = R(null), f = u ?? n, p = f.length, [m] = R(() => wt());
397
+ function Et({ workspaceId: e, dashboards: t, onDelete: n }) {
398
+ let r = y(), i = b(), a = p.useUtils(), o = p.dashboard.reorder.useMutation(), [s, c] = z(null), l = s ?? t, f = l.length, [m] = z(() => wt());
421
399
  return /* @__PURE__ */ U(Je, {
422
400
  plugins: (e) => [...e, qe.configure({
423
- screenReaderInstructions: { draggable: o("dashboard_reorder_keyboard_instructions") },
401
+ screenReaderInstructions: { draggable: r("dashboard_reorder_keyboard_instructions") },
424
402
  announcements: {
425
403
  dragstart(e) {
426
404
  let t = e.operation.source;
427
- if (J(t)) return o("dashboard_reorder_announcement_start", {
405
+ if (J(t)) return r("dashboard_reorder_announcement_start", {
428
406
  name: Q(t),
429
407
  position: t.index + 1,
430
- total: p
408
+ total: f
431
409
  });
432
410
  },
433
411
  dragover(e) {
434
412
  let t = e.operation.source;
435
- if (J(t)) return o("dashboard_reorder_announcement_move", {
413
+ if (J(t)) return r("dashboard_reorder_announcement_move", {
436
414
  name: Q(t),
437
415
  position: t.index + 1,
438
- total: p
416
+ total: f
439
417
  });
440
418
  },
441
419
  dragend(e) {
442
420
  let t = e.operation.source;
443
- if (J(t)) return e.canceled ? o("dashboard_reorder_announcement_cancel", {
421
+ if (J(t)) return e.canceled ? r("dashboard_reorder_announcement_cancel", {
444
422
  name: Q(t),
445
423
  position: t.initialIndex + 1,
446
- total: p
447
- }) : o("dashboard_reorder_announcement_drop", {
424
+ total: f
425
+ }) : r("dashboard_reorder_announcement_drop", {
448
426
  name: Q(t),
449
427
  position: t.index + 1,
450
- total: p
428
+ total: f
451
429
  });
452
430
  }
453
431
  }
454
432
  })],
455
433
  onDragStart: () => {
456
- d(n);
434
+ c(t);
457
435
  },
458
- onDragEnd: (t) => {
459
- let r = u ?? n;
460
- if (d(null), t.canceled) return;
461
- let { source: i } = t.operation;
462
- if (!J(i)) return;
463
- let a = St({
436
+ onDragEnd: (n) => {
437
+ let r = s ?? t;
438
+ if (c(null), n.canceled) return;
439
+ let { source: l } = n.operation;
440
+ if (!J(l)) return;
441
+ let f = St({
464
442
  ids: r.map((e) => e.id),
465
- fromIndex: i.initialIndex,
466
- toIndex: i.index
443
+ fromIndex: l.initialIndex,
444
+ toIndex: l.index
467
445
  });
468
- a != null && (c.dashboard.list.setData({ workspaceId: e }, (e) => ({ dashboards: Ct(e?.dashboards ?? r, a) })), m.enqueue(a, {
469
- send: (t) => l.mutateAsync({
446
+ f != null && (a.dashboard.list.setData({ workspaceId: e }, (e) => ({ dashboards: Ct(e?.dashboards ?? r, f) })), m.enqueue(f, {
447
+ send: (t) => o.mutateAsync({
470
448
  workspaceId: e,
471
449
  ids: t
472
450
  }),
473
451
  onLatestSuccess: (t) => {
474
452
  let n = t.dashboards.map((e) => e.id);
475
- c.dashboard.list.setData({ workspaceId: e }, (e) => e == null ? t : { dashboards: Ct(e.dashboards, n) });
453
+ a.dashboard.list.setData({ workspaceId: e }, (e) => e == null ? t : { dashboards: Ct(e.dashboards, n) });
476
454
  },
477
455
  onLatestFailure: (t) => {
478
- s.error(k(t)), ee(c, {
456
+ i.error(u(t)), d(a, {
479
457
  entity: "dashboard",
480
458
  workspaceId: e
481
459
  });
482
460
  }
483
461
  }));
484
462
  },
485
- children: /* @__PURE__ */ U(le, { children: f.map((t, n) => /* @__PURE__ */ U(Dt, {
463
+ children: /* @__PURE__ */ U(ce, { children: l.map((t, r) => /* @__PURE__ */ U(Dt, {
486
464
  workspaceId: e,
487
465
  dashboard: t,
488
- index: n,
489
- onDelete: r
466
+ index: r,
467
+ onDelete: n
490
468
  }, t.id)) })
491
469
  });
492
470
  }
493
- function Dt({ workspaceId: e, dashboard: t, index: n, onDelete: i }) {
494
- let a = r(), o = K(t.name, a), { ref: s, handleRef: c, isDragging: l } = Ye({
471
+ function Dt({ workspaceId: e, dashboard: t, index: n, onDelete: r }) {
472
+ let i = v(), a = K(t.name, i), { ref: o, handleRef: s, isDragging: c } = Ye({
495
473
  id: t.id,
496
474
  index: n,
497
- data: { name: o }
475
+ data: { name: a }
498
476
  });
499
477
  return /* @__PURE__ */ U(Ot, {
500
478
  workspaceId: e,
501
479
  dashboard: t,
502
- onDelete: i,
503
- sortableRef: s,
504
- handleRef: c,
505
- isDragging: l
480
+ onDelete: r,
481
+ sortableRef: o,
482
+ handleRef: s,
483
+ isDragging: c
506
484
  });
507
485
  }
508
- function Ot({ workspaceId: e, dashboard: t, onDelete: n, sortableRef: a, handleRef: o, isDragging: s = !1 }) {
509
- let c = i(), l = r(), u = q(), d = O(), [f, p] = R(!1), m = t.description == null ? "" : K(t.description, l);
510
- return /* @__PURE__ */ W(ve, {
511
- ref: a,
486
+ function Ot({ workspaceId: e, dashboard: t, onDelete: n, sortableRef: r, handleRef: i, isDragging: a = !1 }) {
487
+ let o = y(), s = v(), l = q(), u = c(), [d, f] = z(!1), p = t.description == null ? "" : K(t.description, s);
488
+ return /* @__PURE__ */ W(_e, {
489
+ ref: r,
512
490
  "data-context-dashboard-id": t.id,
513
491
  className: `
514
- ${o == null ? "" : "gap-2"}
515
- ${s ? "border-b-transparent" : ""}
492
+ ${i == null ? "" : "gap-2"}
493
+ ${a ? "border-b-transparent" : ""}
516
494
  `,
517
495
  children: [
518
- o == null ? null : /* @__PURE__ */ U("button", {
496
+ i == null ? null : /* @__PURE__ */ U("button", {
519
497
  type: "button",
520
- "aria-label": c("dashboard_reorder_handle"),
498
+ "aria-label": o("dashboard_reorder_handle"),
521
499
  className: "\n -ml-1 flex h-7 w-4 shrink-0 cursor-grab touch-none items-center justify-center\n text-muted-foreground/50 transition-colors outline-none\n hover:text-muted-foreground\n focus-visible:rounded-sm focus-visible:ring-2 focus-visible:ring-ring\n active:cursor-grabbing\n [&_svg]:size-3.5\n ",
522
- ref: o,
500
+ ref: i,
523
501
  children: /* @__PURE__ */ U(Ve, {})
524
502
  }),
525
- /* @__PURE__ */ W(ue, {
503
+ /* @__PURE__ */ W(le, {
526
504
  to: "/workspace/$workspaceId/d/$dashboardId",
527
505
  params: {
528
506
  workspaceId: e,
@@ -537,26 +515,26 @@ function Ot({ workspaceId: e, dashboard: t, onDelete: n, sortableRef: a, handleR
537
515
  className: "min-w-0",
538
516
  children: [/* @__PURE__ */ W("div", {
539
517
  className: "flex min-w-0 items-center gap-2",
540
- children: [/* @__PURE__ */ U(ge, { children: K(t.name, l) }), /* @__PURE__ */ U(xt, { dashboard: t })]
541
- }), m.length > 0 ? /* @__PURE__ */ U(me, { children: m }) : null]
518
+ children: [/* @__PURE__ */ U(he, { children: K(t.name, s) }), /* @__PURE__ */ U(xt, { dashboard: t })]
519
+ }), p.length > 0 ? /* @__PURE__ */ U(pe, { children: p }) : null]
542
520
  })]
543
521
  }),
544
- /* @__PURE__ */ W(_e, { children: [/* @__PURE__ */ U(Z, {
522
+ /* @__PURE__ */ W(ge, { children: [/* @__PURE__ */ U(Z, {
545
523
  workspaceId: e,
546
524
  dashboard: t,
547
525
  compact: !0
548
- }), /* @__PURE__ */ W(de, { children: [
549
- d ? /* @__PURE__ */ U(L, {
550
- "aria-label": c("dashboard_copy_action"),
526
+ }), /* @__PURE__ */ W(ue, { children: [
527
+ u ? /* @__PURE__ */ U(R, {
528
+ "aria-label": o("dashboard_copy_action"),
551
529
  onClick: () => {
552
- p(!0);
530
+ f(!0);
553
531
  },
554
532
  children: /* @__PURE__ */ U(Be, {})
555
533
  }) : null,
556
- /* @__PURE__ */ U(L, {
557
- "aria-label": c("dashboard_edit_settings"),
534
+ /* @__PURE__ */ U(R, {
535
+ "aria-label": o("dashboard_edit_settings"),
558
536
  onClick: () => {
559
- u({
537
+ l({
560
538
  to: "/workspace/$workspaceId/setup/dashboards/$dashboardId",
561
539
  params: {
562
540
  workspaceId: e,
@@ -566,27 +544,26 @@ function Ot({ workspaceId: e, dashboard: t, onDelete: n, sortableRef: a, handleR
566
544
  },
567
545
  children: /* @__PURE__ */ U(Ue, {})
568
546
  }),
569
- /* @__PURE__ */ U(L, {
547
+ /* @__PURE__ */ U(R, {
570
548
  tone: "destructive",
571
- "aria-label": c("dashboard_delete_action"),
549
+ "aria-label": o("dashboard_delete_action"),
572
550
  onClick: () => {
573
551
  n(t);
574
552
  },
575
553
  children: /* @__PURE__ */ U(Ge, {})
576
554
  })
577
555
  ] })] }),
578
- f ? /* @__PURE__ */ U(rt, {
556
+ d ? /* @__PURE__ */ U(rt, {
579
557
  workspaceId: e,
580
558
  dashboard: t,
581
559
  onClose: () => {
582
- p(!1);
560
+ f(!1);
583
561
  }
584
562
  }) : null
585
563
  ]
586
564
  });
587
565
  }
588
- //#endregion
589
- //#region src/workspace/setup/dashboards-page.tsx
566
+ // src/workspace/setup/dashboards-page.tsx
590
567
  var kt = /* @__PURE__ */ e({
591
568
  CreateDashboardForm: () => Nt,
592
569
  CreateDashboardFromReportForm: () => jt,
@@ -595,409 +572,409 @@ var kt = /* @__PURE__ */ e({
595
572
  SetupDashboardsPage: () => At
596
573
  });
597
574
  function At({ workspaceId: e }) {
598
- let n = i(), r = a(), o = q(), s = t.dashboard.list.useQuery({ workspaceId: e }), [c, l] = R(null);
599
- return /* @__PURE__ */ W(fe, { children: [
600
- /* @__PURE__ */ U(re, {
575
+ let t = y(), n = b(), r = q(), i = p.dashboard.list.useQuery({ workspaceId: e }), [a, o] = z(null);
576
+ return /* @__PURE__ */ W(de, { children: [
577
+ /* @__PURE__ */ U(ne, {
601
578
  icon: /* @__PURE__ */ U(He, {}),
602
- breadcrumbs: /* @__PURE__ */ U(oe, { workspaceId: e }),
603
- title: n("setup_dashboards_title"),
604
- description: n("setup_dashboards_description"),
605
- actions: /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ W(y, {
579
+ breadcrumbs: /* @__PURE__ */ U(ae, { workspaceId: e }),
580
+ title: t("setup_dashboards_title"),
581
+ description: t("setup_dashboards_description"),
582
+ actions: /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ W(k, {
606
583
  type: "button",
607
584
  size: "sm",
608
585
  variant: "outline",
609
586
  onClick: () => {
610
- o({
587
+ r({
611
588
  to: "/workspace/$workspaceId/setup/dashboards/new-from-report",
612
589
  params: { workspaceId: e }
613
590
  });
614
591
  },
615
- children: [/* @__PURE__ */ U(We, { "data-icon": "inline-start" }), n("dashboard_create_from_report_action")]
616
- }), /* @__PURE__ */ W(y, {
592
+ children: [/* @__PURE__ */ U(We, { "data-icon": "inline-start" }), t("dashboard_create_from_report_action")]
593
+ }), /* @__PURE__ */ W(k, {
617
594
  type: "button",
618
595
  size: "sm",
619
596
  onClick: () => {
620
- o({
597
+ r({
621
598
  to: "/workspace/$workspaceId/setup/dashboards/new",
622
599
  params: { workspaceId: e }
623
600
  });
624
601
  },
625
- children: [/* @__PURE__ */ U(We, { "data-icon": "inline-start" }), n("dashboard_create_action")]
602
+ children: [/* @__PURE__ */ U(We, { "data-icon": "inline-start" }), t("dashboard_create_action")]
626
603
  })] })
627
604
  }),
628
- /* @__PURE__ */ U(pe, { children: /* @__PURE__ */ U(I, {
629
- query: s,
605
+ /* @__PURE__ */ U(fe, { children: /* @__PURE__ */ U(L, {
606
+ query: i,
630
607
  loading: /* @__PURE__ */ W("div", {
631
608
  className: "space-y-2",
632
- children: [/* @__PURE__ */ U(E, { className: "h-10 w-full" }), /* @__PURE__ */ U(E, { className: "h-10 w-4/5" })]
609
+ children: [/* @__PURE__ */ U(A, { className: "h-10 w-full" }), /* @__PURE__ */ U(A, { className: "h-10 w-4/5" })]
633
610
  }),
634
- error: (e) => /* @__PURE__ */ U(ae, { message: k(e) }),
611
+ error: (e) => /* @__PURE__ */ U(ie, { message: u(e) }),
635
612
  isEmpty: (e) => e.dashboards.length === 0,
636
- empty: /* @__PURE__ */ U(he, { children: n("setup_dashboards_empty") }),
613
+ empty: /* @__PURE__ */ U(me, { children: t("setup_dashboards_empty") }),
637
614
  children: ({ dashboards: t }) => /* @__PURE__ */ U(Tt, {
638
615
  workspaceId: e,
639
616
  dashboards: t,
640
- onDelete: l
617
+ onDelete: o
641
618
  })
642
619
  }) }),
643
620
  /* @__PURE__ */ U(T, {
644
- open: c != null,
621
+ open: a != null,
645
622
  onOpenChange: (e) => {
646
- e || l(null);
623
+ e || o(null);
647
624
  },
648
- children: /* @__PURE__ */ U(w, { children: c ? /* @__PURE__ */ U(It, {
625
+ children: /* @__PURE__ */ U(S, { children: a ? /* @__PURE__ */ U(It, {
649
626
  workspaceId: e,
650
- dashboardId: c.id,
651
- baseRevision: c.revision,
627
+ dashboardId: a.id,
628
+ baseRevision: a.revision,
652
629
  onCancel: () => {
653
- l(null);
630
+ o(null);
654
631
  },
655
632
  onDeleted: () => {
656
- l(null), r.success(n("dashboard_delete_toast"));
633
+ o(null), n.success(t("dashboard_delete_toast"));
657
634
  }
658
635
  }) : null })
659
636
  })
660
637
  ] });
661
638
  }
662
- function jt({ workspaceId: e, onCancel: n, onCreated: l }) {
663
- let u = i(), v = a(), w = r(), T = t.report.preset.list.useQuery({ workspaceId: e }), E = T.data?.reportPresets ?? [], D = T.isLoading, O = T.isError, k = !D && !O && E.length === 0, A = D || O || k, j = N(e).create, M = o({
639
+ function jt({ workspaceId: e, onCancel: n, onCreated: r }) {
640
+ let a = y(), o = b(), c = v(), u = p.report.preset.list.useQuery({ workspaceId: e }), d = u.data?.reportPresets ?? [], f = u.isLoading, m = u.isError, h = !f && !m && d.length === 0, _ = f || m || h, x = i(e).create, S = s({
664
641
  defaultValues: {
665
642
  name: "",
666
643
  presetId: ""
667
644
  },
668
- validators: d({
645
+ validators: g({
669
646
  schema: Oe,
670
- submit: async (t) => (await j.mutateAsync(ke(t, {
647
+ submit: async (t) => (await x.mutateAsync(ke(t, {
671
648
  workspaceId: e,
672
- report: E.find((e) => e.id === t.presetId),
673
- locale: w
649
+ report: d.find((e) => e.id === t.presetId),
650
+ locale: c
674
651
  })), null)
675
652
  }),
676
- onSubmitInvalid: c,
653
+ onSubmitInvalid: l,
677
654
  onSubmit: () => {
678
- v.success(u("dashboard_create_toast")), l();
655
+ o.success(a("dashboard_create_toast")), r();
679
656
  }
680
657
  });
681
- return /* @__PURE__ */ U(M.AppForm, { children: /* @__PURE__ */ W(M.FormRoot, {
658
+ return /* @__PURE__ */ U(S.AppForm, { children: /* @__PURE__ */ W(S.FormRoot, {
682
659
  layout: "dialog",
683
660
  children: [
684
- /* @__PURE__ */ W(C, { children: [/* @__PURE__ */ U(S, { children: u("dashboard_create_from_report_title") }), /* @__PURE__ */ U(x, { children: u("dashboard_create_from_report_description") })] }),
685
- /* @__PURE__ */ W(_, { children: [/* @__PURE__ */ U(M.AppField, {
661
+ /* @__PURE__ */ W(E, { children: [/* @__PURE__ */ U(w, { children: a("dashboard_create_from_report_title") }), /* @__PURE__ */ U(D, { children: a("dashboard_create_from_report_description") })] }),
662
+ /* @__PURE__ */ W(F, { children: [/* @__PURE__ */ U(S.AppField, {
686
663
  name: "presetId",
687
664
  children: (e) => {
688
- let t = !e.state.meta.isValid, n = s(e.state.meta.errors, e.name);
689
- return /* @__PURE__ */ W(h, {
690
- "data-invalid": t ? !0 : void 0,
665
+ let n = !e.state.meta.isValid, r = t(e.state.meta.errors, e.name);
666
+ return /* @__PURE__ */ W(N, {
667
+ "data-invalid": n ? !0 : void 0,
691
668
  children: [
692
- /* @__PURE__ */ U(m, {
669
+ /* @__PURE__ */ U(M, {
693
670
  htmlFor: "setup-dashboard-from-report-preset",
694
- children: u("dashboard_create_from_report_field_preset")
671
+ children: a("dashboard_create_from_report_field_preset")
695
672
  }),
696
- /* @__PURE__ */ U(f, {
673
+ /* @__PURE__ */ U(te, {
697
674
  id: "setup-dashboard-from-report-preset",
698
675
  className: "w-full",
699
676
  value: e.state.value,
700
- disabled: A,
677
+ disabled: _,
701
678
  onBlur: e.handleBlur,
702
679
  onChange: (t) => {
703
680
  let n = t.target.value;
704
681
  e.handleChange(n);
705
- let r = E.find((e) => e.id === n);
706
- r != null && M.setFieldValue("name", K(r.title, w));
682
+ let r = d.find((e) => e.id === n);
683
+ r != null && S.setFieldValue("name", K(r.title, c));
707
684
  },
708
- "aria-invalid": t || void 0,
709
- children: D ? /* @__PURE__ */ U(g, {
685
+ "aria-invalid": n || void 0,
686
+ children: f ? /* @__PURE__ */ U(P, {
710
687
  value: "",
711
- children: u("dashboard_create_from_report_preset_loading")
712
- }) : O ? /* @__PURE__ */ U(g, {
688
+ children: a("dashboard_create_from_report_preset_loading")
689
+ }) : m ? /* @__PURE__ */ U(P, {
713
690
  value: "",
714
- children: u("dashboard_create_from_report_preset_error")
715
- }) : k ? /* @__PURE__ */ U(g, {
691
+ children: a("dashboard_create_from_report_preset_error")
692
+ }) : h ? /* @__PURE__ */ U(P, {
716
693
  value: "",
717
- children: u("dashboard_create_from_report_preset_empty")
718
- }) : /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(g, {
694
+ children: a("dashboard_create_from_report_preset_empty")
695
+ }) : /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(P, {
719
696
  value: "",
720
- children: u("dashboard_create_from_report_preset_placeholder")
721
- }), E.map((e) => /* @__PURE__ */ U(g, {
697
+ children: a("dashboard_create_from_report_preset_placeholder")
698
+ }), d.map((e) => /* @__PURE__ */ U(P, {
722
699
  value: e.id,
723
- children: K(e.title, w)
700
+ children: K(e.title, c)
724
701
  }, e.id))] })
725
702
  }),
726
- /* @__PURE__ */ U(p, { errors: n })
703
+ /* @__PURE__ */ U(j, { errors: r })
727
704
  ]
728
705
  });
729
706
  }
730
- }), /* @__PURE__ */ U(M.AppField, {
707
+ }), /* @__PURE__ */ U(S.AppField, {
731
708
  name: "name",
732
709
  children: (e) => /* @__PURE__ */ U(e.TextField, {
733
- label: u("dashboard_field_name"),
710
+ label: a("dashboard_field_name"),
734
711
  id: "setup-dashboard-from-report-name"
735
712
  })
736
713
  })] }),
737
- /* @__PURE__ */ W(b, { children: [/* @__PURE__ */ U(y, {
714
+ /* @__PURE__ */ W(C, { children: [/* @__PURE__ */ U(k, {
738
715
  type: "button",
739
716
  variant: "outline",
740
717
  onClick: () => {
741
718
  n();
742
719
  },
743
- children: u("action_cancel")
744
- }), /* @__PURE__ */ U(M.SubmitButton, {
745
- label: u("dashboard_create_from_report_submit"),
746
- pendingLabel: u("action_creating"),
747
- disabled: A
720
+ children: a("action_cancel")
721
+ }), /* @__PURE__ */ U(S.SubmitButton, {
722
+ label: a("dashboard_create_from_report_submit"),
723
+ pendingLabel: a("action_creating"),
724
+ disabled: _
748
725
  })] })
749
726
  ]
750
727
  }) });
751
728
  }
752
- function Mt({ workspaceId: e, templateId: n }) {
753
- let a = i(), o = r(), s = t.templates.dashboard.get.useQuery({
729
+ function Mt({ workspaceId: e, templateId: t }) {
730
+ let n = y(), r = v(), i = p.templates.dashboard.get.useQuery({
754
731
  workspaceId: e,
755
- templateId: n
732
+ templateId: t
756
733
  });
757
- if (s.isPending) return /* @__PURE__ */ W("div", {
734
+ if (i.isPending) return /* @__PURE__ */ W("div", {
758
735
  className: "grid gap-1.5",
759
736
  "aria-busy": "true",
760
737
  "data-testid": "dashboard-template-description",
761
- children: [/* @__PURE__ */ U(E, { className: "h-4 w-full" }), /* @__PURE__ */ U(E, { className: "h-4 w-2/3" })]
738
+ children: [/* @__PURE__ */ U(A, { className: "h-4 w-full" }), /* @__PURE__ */ U(A, { className: "h-4 w-2/3" })]
762
739
  });
763
- if (s.isError) return /* @__PURE__ */ U(v, {
740
+ if (i.isError) return /* @__PURE__ */ U(I, {
764
741
  className: "text-destructive",
765
742
  role: "alert",
766
743
  "data-testid": "dashboard-template-description",
767
- children: a("dashboard_create_template_description_error")
744
+ children: n("dashboard_create_template_description_error")
768
745
  });
769
- let c = s.data.description;
770
- return c == null ? null : /* @__PURE__ */ U(v, {
746
+ let a = i.data.description;
747
+ return a == null ? null : /* @__PURE__ */ U(I, {
771
748
  "data-testid": "dashboard-template-description",
772
- children: K(c, o)
749
+ children: K(a, r)
773
750
  });
774
751
  }
775
- function Nt({ workspaceId: e, onCancel: l, onCreated: u }) {
776
- let v = i(), x = a(), w = r(), T = N(e).create, E = t.templates.dashboard.list.useQuery({ workspaceId: e }), D = E.data?.templates ?? [], O = E.isLoading, k = E.isError, A = !O && !k && D.length === 0, j = o({
752
+ function Nt({ workspaceId: e, onCancel: n, onCreated: r }) {
753
+ let a = y(), o = b(), c = v(), u = i(e).create, d = p.templates.dashboard.list.useQuery({ workspaceId: e }), f = d.data?.templates ?? [], m = d.isLoading, h = d.isError, x = !m && !h && f.length === 0, S = s({
777
754
  defaultValues: {
778
- name: v("dashboard_default_name"),
779
- template: B
755
+ name: a("dashboard_default_name"),
756
+ template: V
780
757
  },
781
- validators: d({
758
+ validators: g({
782
759
  schema: Me,
783
- submit: async (t) => (await T.mutateAsync(De(t, {
760
+ submit: async (t) => (await u.mutateAsync(De(t, {
784
761
  workspaceId: e,
785
- defaultName: n("dashboard_default_name")
762
+ defaultName: _("dashboard_default_name")
786
763
  })), null)
787
764
  }),
788
- onSubmitInvalid: c,
765
+ onSubmitInvalid: l,
789
766
  onSubmit: () => {
790
- x.success(v("dashboard_create_toast")), u();
767
+ o.success(a("dashboard_create_toast")), r();
791
768
  }
792
- }), M = w, P = O || k || A;
793
- return /* @__PURE__ */ U(j.AppForm, { children: /* @__PURE__ */ W(j.FormRoot, {
769
+ }), T = c, D = m || h || x;
770
+ return /* @__PURE__ */ U(S.AppForm, { children: /* @__PURE__ */ W(S.FormRoot, {
794
771
  layout: "dialog",
795
772
  children: [
796
- /* @__PURE__ */ U(C, { children: /* @__PURE__ */ U(S, { children: v("dashboard_create_title") }) }),
797
- /* @__PURE__ */ W(_, { children: [/* @__PURE__ */ U(j.AppField, {
773
+ /* @__PURE__ */ U(E, { children: /* @__PURE__ */ U(w, { children: a("dashboard_create_title") }) }),
774
+ /* @__PURE__ */ W(F, { children: [/* @__PURE__ */ U(S.AppField, {
798
775
  name: "template",
799
- children: (t) => {
800
- let n = D.find((e) => e.id === t.state.value);
801
- return /* @__PURE__ */ W(h, { children: [
802
- /* @__PURE__ */ U(m, {
776
+ children: (n) => {
777
+ let r = f.find((e) => e.id === n.state.value);
778
+ return /* @__PURE__ */ W(N, { children: [
779
+ /* @__PURE__ */ U(M, {
803
780
  htmlFor: "setup-dashboard-template",
804
- children: v("dashboard_create_field_template")
781
+ children: a("dashboard_create_field_template")
805
782
  }),
806
- /* @__PURE__ */ U(f, {
783
+ /* @__PURE__ */ U(te, {
807
784
  id: "setup-dashboard-template",
808
- value: t.state.value,
809
- disabled: P,
810
- onBlur: t.handleBlur,
785
+ value: n.state.value,
786
+ disabled: D,
787
+ onBlur: n.handleBlur,
811
788
  onChange: (e) => {
812
- t.handleChange(e.target.value);
789
+ n.handleChange(e.target.value);
813
790
  },
814
- children: O ? /* @__PURE__ */ U(g, {
815
- value: B,
791
+ children: m ? /* @__PURE__ */ U(P, {
792
+ value: V,
816
793
  disabled: !0,
817
- children: v("dashboard_create_template_loading")
818
- }) : k ? /* @__PURE__ */ U(g, {
819
- value: B,
794
+ children: a("dashboard_create_template_loading")
795
+ }) : h ? /* @__PURE__ */ U(P, {
796
+ value: V,
820
797
  disabled: !0,
821
- children: v("dashboard_create_template_error")
822
- }) : A ? /* @__PURE__ */ U(g, {
823
- value: B,
798
+ children: a("dashboard_create_template_error")
799
+ }) : x ? /* @__PURE__ */ U(P, {
800
+ value: V,
824
801
  disabled: !0,
825
- children: v("dashboard_create_template_empty")
826
- }) : D.map((e) => /* @__PURE__ */ U(g, {
802
+ children: a("dashboard_create_template_empty")
803
+ }) : f.map((e) => /* @__PURE__ */ U(P, {
827
804
  value: e.id,
828
- children: K(e.name, M)
805
+ children: K(e.name, T)
829
806
  }, e.id))
830
807
  }),
831
- n == null ? null : /* @__PURE__ */ U(Mt, {
808
+ r == null ? null : /* @__PURE__ */ U(Mt, {
832
809
  workspaceId: e,
833
- templateId: n.id
810
+ templateId: r.id
834
811
  }),
835
- /* @__PURE__ */ U(p, { errors: s(t.state.meta.errors, t.name) })
812
+ /* @__PURE__ */ U(j, { errors: t(n.state.meta.errors, n.name) })
836
813
  ] });
837
814
  }
838
- }), /* @__PURE__ */ U(j.AppField, {
815
+ }), /* @__PURE__ */ U(S.AppField, {
839
816
  name: "name",
840
817
  children: (e) => /* @__PURE__ */ U(e.TextField, {
841
- label: v("dashboard_field_name"),
818
+ label: a("dashboard_field_name"),
842
819
  id: "setup-dashboard-name",
843
820
  autoFocus: !0
844
821
  })
845
822
  })] }),
846
- /* @__PURE__ */ W(b, { children: [/* @__PURE__ */ U(y, {
823
+ /* @__PURE__ */ W(C, { children: [/* @__PURE__ */ U(k, {
847
824
  type: "button",
848
825
  variant: "outline",
849
826
  onClick: () => {
850
- l();
827
+ n();
851
828
  },
852
- children: v("action_cancel")
853
- }), /* @__PURE__ */ U(j.SubmitButton, {
854
- label: v("dashboard_create_submit"),
855
- pendingLabel: v("action_creating"),
856
- disabled: P
829
+ children: a("action_cancel")
830
+ }), /* @__PURE__ */ U(S.SubmitButton, {
831
+ label: a("dashboard_create_submit"),
832
+ pendingLabel: a("action_creating"),
833
+ disabled: D
857
834
  })] })
858
835
  ]
859
836
  }) });
860
837
  }
861
- function $({ workspaceId: e, dashboardId: n, onClose: a }) {
862
- let o = i(), s = r(), c = t.dashboard.get.useQuery({ id: n }), l = t.useUtils(), u = gt(n), d = c.data, f = u.data, [p, m] = R(0);
863
- return /* @__PURE__ */ U(I, {
838
+ function $({ workspaceId: e, dashboardId: t, onClose: n }) {
839
+ let r = y(), i = v(), a = p.dashboard.get.useQuery({ id: t }), o = p.useUtils(), s = gt(t), c = a.data, l = s.data, [u, d] = z(0);
840
+ return /* @__PURE__ */ U(L, {
864
841
  query: {
865
- isLoading: c.isLoading || u.isLoading || f == null,
866
- isError: c.isError,
867
- error: c.error,
868
- data: d != null && f != null ? {
869
- dashboard: d,
870
- entrypoint: f
842
+ isLoading: a.isLoading || s.isLoading || l == null,
843
+ isError: a.isError,
844
+ error: a.error,
845
+ data: c != null && l != null ? {
846
+ dashboard: c,
847
+ entrypoint: l
871
848
  } : void 0
872
849
  },
873
850
  loading: /* @__PURE__ */ W("div", {
874
851
  className: "flex flex-col gap-4 p-4",
875
- children: [/* @__PURE__ */ U(E, { className: "h-8 w-48" }), /* @__PURE__ */ U(E, { className: "h-40 w-full" })]
852
+ children: [/* @__PURE__ */ U(A, { className: "h-8 w-48" }), /* @__PURE__ */ U(A, { className: "h-40 w-full" })]
876
853
  }),
877
- error: () => /* @__PURE__ */ U(ie, {
854
+ error: () => /* @__PURE__ */ U(re, {
878
855
  className: "p-4",
879
- message: o("error_request_failed"),
880
- onRetry: () => c.refetch()
856
+ message: r("error_request_failed"),
857
+ onRetry: () => a.refetch()
881
858
  }),
882
- children: ({ dashboard: t, entrypoint: r }) => /* @__PURE__ */ U(Ft, {
859
+ children: ({ dashboard: r, entrypoint: a }) => /* @__PURE__ */ U(Ft, {
883
860
  workspaceId: e,
884
- dashboardId: t.id,
885
- entrypointUrl: r.url,
886
- initialConfiguration: t.configuration,
887
- initialRevision: t.revision,
888
- defaultValues: Fe(t, s),
889
- onDone: a,
861
+ dashboardId: r.id,
862
+ entrypointUrl: a.url,
863
+ initialConfiguration: r.configuration,
864
+ initialRevision: r.revision,
865
+ defaultValues: Fe(r, i),
866
+ onDone: n,
890
867
  onReload: async () => {
891
- let e = await l.client.dashboard.get.query({ id: n });
892
- l.dashboard.get.setData({ id: n }, e), m((e) => e + 1);
868
+ let e = await o.client.dashboard.get.query({ id: t });
869
+ o.dashboard.get.setData({ id: t }, e), d((e) => e + 1);
893
870
  }
894
- }, `${t.id}-${String(p)}`)
871
+ }, `${r.id}-${String(u)}`)
895
872
  });
896
873
  }
897
874
  function Pt({ problem: e }) {
898
875
  switch (e) {
899
- case "configuration_invalid_json": return n("dashboard_config_invalid_json");
900
- case "configuration_must_be_object": return n("dashboard_config_must_be_object");
901
- case "name_required": return n("error_field_required");
876
+ case "configuration_invalid_json": return _("dashboard_config_invalid_json");
877
+ case "configuration_must_be_object": return _("dashboard_config_must_be_object");
878
+ case "name_required": return _("error_field_required");
902
879
  }
903
880
  }
904
- function Ft({ workspaceId: e, dashboardId: r, entrypointUrl: s, initialConfiguration: f, initialRevision: p, defaultValues: g, onDone: b, onReload: x }) {
905
- let S = i(), C = a(), [w, T] = R(() => f), E = se(p), D = t.useUtils(), O = async () => {
906
- let e = await D.client.dashboard.get.query({ id: r });
907
- T(e.configuration), E.rebase(e.revision);
908
- }, k = t.dashboard.getSourceFile.useQuery({
909
- id: r,
881
+ function Ft({ workspaceId: e, dashboardId: t, entrypointUrl: r, initialConfiguration: a, initialRevision: c, defaultValues: u, onDone: d, onReload: f }) {
882
+ let h = y(), v = b(), [x, S] = z(() => a), C = oe(c), w = p.useUtils(), T = async () => {
883
+ let e = await w.client.dashboard.get.query({ id: t });
884
+ S(e.configuration), C.rebase(e.revision);
885
+ }, E = p.dashboard.getSourceFile.useQuery({
886
+ id: t,
910
887
  path: "config.schema.json"
911
- }), A = N(e).update, P = o({
912
- defaultValues: g,
913
- validators: d({
888
+ }), D = i(e).update, A = s({
889
+ defaultValues: u,
890
+ validators: g({
914
891
  schema: Ne,
915
892
  submit: async (e) => {
916
- let t = Pe(e, {
917
- id: r,
918
- expectedConfiguration: w
893
+ let i = Pe(e, {
894
+ id: t,
895
+ expectedConfiguration: x
919
896
  });
920
- if (!t.ok) return u(t, Pt);
897
+ if (!i.ok) return n(i, Pt);
921
898
  try {
922
- let e = st(await pt(X(s, yt())), t.input.configuration);
923
- if (e?.kind === "load_failed") return { fields: { configurationText: () => n("dashboard_config_schema_load_failed") } };
924
- if (e?.kind === "rebuild_required") return { fields: { configurationText: () => n("dashboard_rebuild_required_description") } };
899
+ let e = st(await pt(X(r, yt())), i.input.configuration);
900
+ if (e?.kind === "load_failed") return { fields: { configurationText: () => _("dashboard_config_schema_load_failed") } };
901
+ if (e?.kind === "rebuild_required") return { fields: { configurationText: () => _("dashboard_rebuild_required_description") } };
925
902
  if (e?.kind === "issues") return { fields: { configurationText: e.text } };
926
903
  } catch {
927
- return { fields: { configurationText: () => n("dashboard_config_schema_load_failed") } };
904
+ return { fields: { configurationText: () => _("dashboard_config_schema_load_failed") } };
928
905
  }
929
- return await A.mutateAsync({
930
- ...t.input,
931
- ...E.baseRevision === void 0 ? {} : { baseRevision: E.baseRevision }
906
+ return await D.mutateAsync({
907
+ ...i.input,
908
+ ...C.baseRevision === void 0 ? {} : { baseRevision: C.baseRevision }
932
909
  }), null;
933
910
  },
934
- mapError: E.mapError((e, t) => l(e, t, { fieldMap: { configuration: "configurationText" } })),
935
- onError: E.onError
911
+ mapError: C.mapError((e, t) => o(e, t, { fieldMap: { configuration: "configurationText" } })),
912
+ onError: C.onError
936
913
  }),
937
- onSubmitInvalid: c,
914
+ onSubmitInvalid: l,
938
915
  onSubmit: () => {
939
- b(), C.success(S("dashboard_update_toast"));
916
+ d(), v.success(h("dashboard_update_toast"));
940
917
  }
941
918
  });
942
- return /* @__PURE__ */ U(P.AppForm, { children: /* @__PURE__ */ U(P.FormRoot, {
919
+ return /* @__PURE__ */ U(A.AppForm, { children: /* @__PURE__ */ U(A.FormRoot, {
943
920
  layout: "dialog-fill",
944
- children: /* @__PURE__ */ U(te, {
945
- notice: /* @__PURE__ */ U(ce, {
946
- base: E,
947
- onReload: x,
948
- onKeepMine: O
921
+ children: /* @__PURE__ */ U(m, {
922
+ notice: /* @__PURE__ */ U(se, {
923
+ base: C,
924
+ onReload: f,
925
+ onKeepMine: T
949
926
  }),
950
- footer: /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(y, {
927
+ footer: /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(k, {
951
928
  type: "button",
952
929
  variant: "outline",
953
930
  onClick: () => {
954
- b();
931
+ d();
955
932
  },
956
- children: S("action_cancel")
957
- }), /* @__PURE__ */ U(P.SubmitButton, {
958
- label: S("dashboard_settings_save"),
959
- pendingLabel: S("action_saving")
933
+ children: h("action_cancel")
934
+ }), /* @__PURE__ */ U(A.SubmitButton, {
935
+ label: h("dashboard_settings_save"),
936
+ pendingLabel: h("action_saving")
960
937
  })] }),
961
- children: /* @__PURE__ */ W(_, { children: [
962
- /* @__PURE__ */ U(P.AppField, {
938
+ children: /* @__PURE__ */ W(F, { children: [
939
+ /* @__PURE__ */ U(A.AppField, {
963
940
  name: "name",
964
941
  children: (e) => /* @__PURE__ */ U(e.TextField, {
965
- label: S("dashboard_field_name"),
942
+ label: h("dashboard_field_name"),
966
943
  id: "setup-edit-dashboard-name"
967
944
  })
968
945
  }),
969
- /* @__PURE__ */ U(P.AppField, {
946
+ /* @__PURE__ */ U(A.AppField, {
970
947
  name: "description",
971
948
  children: (e) => /* @__PURE__ */ U(e.TextAreaField, {
972
- label: S("dashboard_field_description"),
949
+ label: h("dashboard_field_description"),
973
950
  id: "setup-edit-dashboard-description",
974
951
  rows: 3
975
952
  })
976
953
  }),
977
- /* @__PURE__ */ U(P.AppField, {
954
+ /* @__PURE__ */ U(A.AppField, {
978
955
  name: "icon",
979
956
  children: (e) => {
980
- let t = e.state.value, n = t === "" || t === z ? z : t;
981
- return /* @__PURE__ */ W(h, { children: [/* @__PURE__ */ U(m, { children: S("dashboard_field_icon") }), /* @__PURE__ */ W(M, {
957
+ let t = e.state.value, n = t === "" || t === B ? B : t;
958
+ return /* @__PURE__ */ W(N, { children: [/* @__PURE__ */ U(M, { children: h("dashboard_field_icon") }), /* @__PURE__ */ W(ee, {
982
959
  variant: "outline",
983
960
  size: "sm",
984
961
  spacing: 2,
985
962
  value: [n],
986
963
  onValueChange: (t) => {
987
964
  let n = t[0];
988
- n != null && e.handleChange(n === z ? "" : n);
965
+ n != null && e.handleChange(n === B ? "" : n);
989
966
  },
990
967
  className: "grid w-full grid-cols-8",
991
- children: [/* @__PURE__ */ U(j, {
992
- value: z,
993
- "aria-label": S("dashboard_field_icon_default"),
968
+ children: [/* @__PURE__ */ U(O, {
969
+ value: B,
970
+ "aria-label": h("dashboard_field_icon_default"),
994
971
  className: "size-8 min-w-8 p-0 text-muted-foreground",
995
972
  children: /* @__PURE__ */ U(Y, {
996
973
  icon: null,
997
974
  className: "size-4",
998
975
  strokeWidth: 1.75
999
976
  })
1000
- }), Ce.filter((e) => e !== z).map((e) => /* @__PURE__ */ U(j, {
977
+ }), Se.filter((e) => e !== B).map((e) => /* @__PURE__ */ U(O, {
1001
978
  value: e,
1002
979
  "aria-label": e,
1003
980
  className: "size-8 min-w-8 p-0 text-muted-foreground",
@@ -1010,19 +987,19 @@ function Ft({ workspaceId: e, dashboardId: r, entrypointUrl: s, initialConfigura
1010
987
  })] });
1011
988
  }
1012
989
  }),
1013
- /* @__PURE__ */ U(P.AppField, {
990
+ /* @__PURE__ */ U(A.AppField, {
1014
991
  name: "configurationText",
1015
992
  children: (e) => /* @__PURE__ */ U(e.TextAreaField, {
1016
- label: S("dashboard_field_configuration"),
993
+ label: h("dashboard_field_configuration"),
1017
994
  id: "setup-edit-dashboard-config",
1018
995
  spellCheck: !1,
1019
996
  className: "\n min-h-40 font-mono\n md:text-xs\n "
1020
997
  })
1021
998
  }),
1022
- /* @__PURE__ */ W(h, { children: [/* @__PURE__ */ U(m, { children: S("dashboard_config_schema_title") }), /* @__PURE__ */ U(I, {
1023
- query: k,
1024
- loading: /* @__PURE__ */ U(v, { children: S("dashboard_config_schema_loading") }),
1025
- error: () => /* @__PURE__ */ U(v, { children: S("dashboard_config_schema_missing") }),
999
+ /* @__PURE__ */ W(N, { children: [/* @__PURE__ */ U(M, { children: h("dashboard_config_schema_title") }), /* @__PURE__ */ U(L, {
1000
+ query: E,
1001
+ loading: /* @__PURE__ */ U(I, { children: h("dashboard_config_schema_loading") }),
1002
+ error: () => /* @__PURE__ */ U(I, { children: h("dashboard_config_schema_missing") }),
1026
1003
  children: (e) => /* @__PURE__ */ U("pre", {
1027
1004
  className: "\n max-h-48 overflow-auto rounded-md border bg-muted/30 p-3 font-mono text-xs\n ",
1028
1005
  children: e
@@ -1033,32 +1010,31 @@ function Ft({ workspaceId: e, dashboardId: r, entrypointUrl: s, initialConfigura
1033
1010
  }) });
1034
1011
  }
1035
1012
  function It({ workspaceId: e, dashboardId: t, baseRevision: n, onCancel: r, onDeleted: a }) {
1036
- let s = i(), l = N(e).remove, u = o({
1013
+ let o = y(), c = i(e).remove, u = s({
1037
1014
  defaultValues: {},
1038
- validators: d({ submit: async () => (await l.mutateAsync({
1015
+ validators: g({ submit: async () => (await c.mutateAsync({
1039
1016
  id: t,
1040
1017
  baseRevision: n
1041
1018
  }), null) }),
1042
- onSubmitInvalid: c,
1019
+ onSubmitInvalid: l,
1043
1020
  onSubmit: () => {
1044
1021
  a();
1045
1022
  }
1046
1023
  });
1047
1024
  return /* @__PURE__ */ U(u.AppForm, { children: /* @__PURE__ */ W(u.FormRoot, {
1048
1025
  layout: "dialog",
1049
- children: [/* @__PURE__ */ W(C, { children: [/* @__PURE__ */ U(S, { children: s("dashboard_delete_confirm_title") }), /* @__PURE__ */ U(x, { children: s("dashboard_delete_confirm_description") })] }), /* @__PURE__ */ W(b, { children: [/* @__PURE__ */ U(y, {
1026
+ children: [/* @__PURE__ */ W(E, { children: [/* @__PURE__ */ U(w, { children: o("dashboard_delete_confirm_title") }), /* @__PURE__ */ U(D, { children: o("dashboard_delete_confirm_description") })] }), /* @__PURE__ */ W(C, { children: [/* @__PURE__ */ U(k, {
1050
1027
  type: "button",
1051
1028
  variant: "outline",
1052
1029
  onClick: () => {
1053
1030
  r();
1054
1031
  },
1055
- children: s("action_cancel")
1032
+ children: o("action_cancel")
1056
1033
  }), /* @__PURE__ */ U(u.SubmitButton, {
1057
- label: s("dashboard_delete_confirm_submit"),
1058
- pendingLabel: s("action_deleting"),
1034
+ label: o("dashboard_delete_confirm_submit"),
1035
+ pendingLabel: o("action_deleting"),
1059
1036
  variant: "destructive"
1060
1037
  })] })]
1061
1038
  }) });
1062
1039
  }
1063
- //#endregion
1064
1040
  export { kt as a, yt as c, gt as d, pt as f, Y as h, At as i, bt as l, rt as m, jt as n, xt as o, ot as p, $ as r, Z as s, Nt as t, X as u };