@burdenoff/microfe-bigconsole 2026.1001.4 → 2026.1004.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 (39) hide show
  1. package/dist/bigconsole/components/dashboard/CreateDashboardDialog.d.ts.map +1 -1
  2. package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +220 -161
  3. package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js.map +1 -1
  4. package/dist/bigconsole/components/dashboard/TemplateInstallOptions.d.ts +11 -0
  5. package/dist/bigconsole/components/dashboard/TemplateInstallOptions.d.ts.map +1 -0
  6. package/dist/bigconsole/components/dashboard/TemplateInstallOptions.js +208 -0
  7. package/dist/bigconsole/components/dashboard/TemplateInstallOptions.js.map +1 -0
  8. package/dist/bigconsole/components/dashboard/TemplateLayoutPreview.d.ts +7 -0
  9. package/dist/bigconsole/components/dashboard/TemplateLayoutPreview.d.ts.map +1 -0
  10. package/dist/bigconsole/components/dashboard/TemplateLayoutPreview.js +51 -0
  11. package/dist/bigconsole/components/dashboard/TemplateLayoutPreview.js.map +1 -0
  12. package/dist/bigconsole/hooks/useStoreDashboardTemplates.d.ts +2 -0
  13. package/dist/bigconsole/hooks/useStoreDashboardTemplates.d.ts.map +1 -1
  14. package/dist/bigconsole/hooks/useStoreDashboardTemplates.js +91 -90
  15. package/dist/bigconsole/hooks/useStoreDashboardTemplates.js.map +1 -1
  16. package/dist/bigconsole/pages/DashboardsPage.d.ts.map +1 -1
  17. package/dist/bigconsole/pages/DashboardsPage.js +25 -20
  18. package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
  19. package/dist/bigconsole/pages/DataSinkBuilderPage.js +1 -0
  20. package/dist/bigconsole/pages/DataSinkBuilderPage.js.map +1 -1
  21. package/dist/bigconsole/pages/InsightsPage.js +1 -0
  22. package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
  23. package/dist/bigconsole/pages/ParserBuilderPage.js +1 -0
  24. package/dist/bigconsole/pages/ParserBuilderPage.js.map +1 -1
  25. package/dist/bigconsole/pages/WorkflowsPage.js +1 -0
  26. package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
  27. package/dist/bigconsole/utils/dashboardTemplateContent.d.ts +10 -0
  28. package/dist/bigconsole/utils/dashboardTemplateContent.d.ts.map +1 -0
  29. package/dist/bigconsole/utils/dashboardTemplateContent.js +36 -0
  30. package/dist/bigconsole/utils/dashboardTemplateContent.js.map +1 -0
  31. package/dist/bigconsole/utils/templateInstallInputs.d.ts +5 -0
  32. package/dist/bigconsole/utils/templateInstallInputs.d.ts.map +1 -0
  33. package/dist/bigconsole/utils/templateInstallInputs.js +22 -0
  34. package/dist/bigconsole/utils/templateInstallInputs.js.map +1 -0
  35. package/dist/generated/global-operations.d.ts +1 -0
  36. package/dist/generated/global-operations.d.ts.map +1 -1
  37. package/dist/generated/global-operations.js +1 -0
  38. package/dist/generated/global-operations.js.map +1 -1
  39. package/package.json +1 -1
@@ -1,121 +1,161 @@
1
1
  import { Section as e } from "../common/Section.js";
2
2
  import "../common/index.js";
3
3
  import t from "./StoreTemplatePicker.js";
4
- import n from "../../hooks/useStoreDashboardTemplates.js";
5
- import { memo as r, useCallback as i, useEffect as a, useRef as o, useState as s } from "react";
6
- import { Copy as c, LayoutDashboard as l, Plus as u, Tag as d, X as f } from "lucide-react";
7
- import { Badge as p, Button as m, Dialog as ee, DialogContent as te, DialogDescription as h, DialogFooter as g, DialogHeader as _, DialogTitle as v, Input as y, Spinner as b, Textarea as x } from "@burdenoff/fe-libs/ui";
8
- import { jsx as S, jsxs as C } from "react/jsx-runtime";
9
- import { useI18n as w } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
4
+ import { TemplateInstallOptions as n } from "./TemplateInstallOptions.js";
5
+ import { TemplateLayoutPreview as r } from "./TemplateLayoutPreview.js";
6
+ import { templateInputDefaults as i, templateInputError as ee } from "../../utils/templateInstallInputs.js";
7
+ import te from "../../hooks/useStoreDashboardTemplates.js";
8
+ import { memo as a, useCallback as o, useEffect as s, useRef as c, useState as l } from "react";
9
+ import { Copy as ne, LayoutDashboard as re, Plus as u, Tag as ie, X as ae } from "lucide-react";
10
+ import { Badge as oe, Button as d, Dialog as se, DialogContent as ce, DialogDescription as le, DialogFooter as ue, DialogHeader as de, DialogTitle as f, Input as p, Spinner as m, Textarea as fe } from "@burdenoff/fe-libs/ui";
11
+ import { Fragment as pe, jsx as h, jsxs as g } from "react/jsx-runtime";
12
+ import { useI18n as me } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
13
+ import { useActiveContext as he } from "@burdenoff/fe-libs/shared/providers/shell/ActiveContextProvider";
10
14
  //#region src/bigconsole/components/dashboard/CreateDashboardDialog.tsx
11
- var T = r(function({ isOpen: r, isCreating: T = !1, onClose: E, onCreate: D, showTemplates: O = !0, onTemplateInstalled: k }) {
12
- let { t: A } = w(), { templates: j, loading: M, error: N, fetchTemplateContent: P, installTemplate: F } = n({ autoLoad: O }), [I, L] = s(!1), [R, z] = s("blank"), [B, V] = s(""), [H, U] = s(""), [W, G] = s([]), [K, q] = s(""), [J, Y] = s(null), [X, Z] = s(null), Q = o(null);
13
- a(() => {
14
- r && (z("blank"), V(""), U(""), G([]), q(""), Y(null), Z(null), setTimeout(() => {
15
- Q.current?.focus();
15
+ var _ = a(function({ isOpen: a, isCreating: _ = !1, onClose: v, onCreate: y, showTemplates: b = !0, onTemplateInstalled: x }) {
16
+ let { t: S } = me(), { templates: ge, loading: _e, error: C, fetchTemplateContent: w, installTemplate: T } = te({ autoLoad: b }), [E, D] = l(!1), { workspaceId: O } = he(), k = c(O);
17
+ k.current = O;
18
+ let [ve, A] = l(null), [ye, be] = l(null), [j, M] = l(!1), [N, P] = l({}), [F, I] = l({}), [L, R] = l("blank"), [z, B] = l(""), [V, H] = l(""), [U, W] = l([]), [G, K] = l(""), [q, J] = l(null), [Y, X] = l(null), Z = c(null), Q = ye === `${q?.id}:${O}` ? ve : null;
19
+ s(() => {
20
+ a && (R("blank"), B(""), H(""), W([]), K(""), J(null), X(null), setTimeout(() => {
21
+ Z.current?.focus();
16
22
  }, 100));
17
- }, [r]);
18
- let $ = i(() => {
19
- let e = K.trim().toLowerCase();
20
- e && !W.includes(e) && W.length < 10 && (G((t) => [...t, e]), q(""));
21
- }, [K, W]), ne = i((e) => {
22
- G((t) => t.filter((t) => t !== e));
23
- }, []), re = i((e) => {
24
- e.key === "Enter" ? (e.preventDefault(), $()) : e.key === "Backspace" && !K && W.length > 0 && G((e) => e.slice(0, -1));
23
+ }, [a]);
24
+ let $ = o(() => {
25
+ let e = G.trim().toLowerCase();
26
+ e && !U.includes(e) && U.length < 10 && (W((t) => [...t, e]), K(""));
27
+ }, [G, U]);
28
+ s(() => {
29
+ let e = !1;
30
+ if (A(null), P({}), I({}), M(!!q), !(!q || !a)) return w(q.id).then((t) => {
31
+ e || (A(t), be(`${q.id}:${O}`), M(!1), I(t ? i(t.requiredInputs) : {}), t || X(S("bigconsole.dashboards.createDialog.error.noDefinition", "This template has no dashboard definition attached and cannot be installed.")));
32
+ }), () => {
33
+ e = !0;
34
+ };
35
+ }, [
36
+ q,
37
+ w,
38
+ O,
39
+ a,
40
+ S
41
+ ]);
42
+ let xe = o((e) => {
43
+ W((t) => t.filter((t) => t !== e));
44
+ }, []), Se = o((e) => {
45
+ e.key === "Enter" ? (e.preventDefault(), $()) : e.key === "Backspace" && !G && U.length > 0 && W((e) => e.slice(0, -1));
25
46
  }, [
26
47
  $,
27
- K,
28
- W.length
29
- ]), ie = i((e) => {
30
- Y(e), V(e.name), U(e.description || "");
31
- }, []), ae = i(async (e) => {
32
- if (e.preventDefault(), R === "template" && !J) {
33
- Z(A("bigconsole.dashboards.createDialog.error.selectTemplate", "Please select a template"));
48
+ G,
49
+ U.length
50
+ ]), Ce = o((e) => {
51
+ J(e), X(null), B(e.name), H(e.description || "");
52
+ }, []), we = o(async (e) => {
53
+ if (e.preventDefault(), L === "template" && !q) {
54
+ X(S("bigconsole.dashboards.createDialog.error.selectTemplate", "Please select a template"));
34
55
  return;
35
56
  }
36
- let t = B.trim();
57
+ let t = z.trim();
37
58
  if (!t) {
38
- Z(A("bigconsole.dashboards.createDialog.error.nameRequired", "Dashboard name is required")), Q.current?.focus();
59
+ X(S("bigconsole.dashboards.createDialog.error.nameRequired", "Dashboard name is required")), Z.current?.focus();
39
60
  return;
40
61
  }
41
62
  if (t.length < 3) {
42
- Z(A("bigconsole.dashboards.createDialog.error.nameTooShort", "Dashboard name must be at least 3 characters")), Q.current?.focus();
63
+ X(S("bigconsole.dashboards.createDialog.error.nameTooShort", "Dashboard name must be at least 3 characters")), Z.current?.focus();
43
64
  return;
44
65
  }
45
66
  if (t.length > 100) {
46
- Z(A("bigconsole.dashboards.createDialog.error.nameTooLong", "Dashboard name must be less than 100 characters")), Q.current?.focus();
67
+ X(S("bigconsole.dashboards.createDialog.error.nameTooLong", "Dashboard name must be less than 100 characters")), Z.current?.focus();
47
68
  return;
48
69
  }
49
- if (Z(null), R === "template" && J) {
50
- L(!0);
70
+ if (X(null), L === "template" && q) {
71
+ D(!0);
51
72
  try {
52
- let e = await P(J.id);
73
+ let e = await w(q.id);
74
+ if (k.current !== O) {
75
+ X(S("bigconsole.dashboards.templateSetup.workspaceChanged", "The workspace changed. Review the template setup before creating your dashboard."));
76
+ return;
77
+ }
53
78
  if (!e) {
54
- Z(A("bigconsole.dashboards.createDialog.error.noDefinition", "This template has no dashboard definition attached and cannot be installed."));
79
+ X(S("bigconsole.dashboards.createDialog.error.noDefinition", "This template has no dashboard definition attached and cannot be installed."));
55
80
  return;
56
81
  }
57
- let n = await F({
58
- templateId: J.id,
59
- templateName: J.name,
82
+ let n = ee(e.requiredInputs, F, S);
83
+ if (n) {
84
+ X(n);
85
+ return;
86
+ }
87
+ let r = await T({
88
+ templateId: q.id,
89
+ templateName: q.name,
60
90
  content: e,
61
- name: t
91
+ name: t,
92
+ description: V.trim(),
93
+ tags: U,
94
+ dataSinkBindings: Object.entries(N).filter(([, e]) => e).map(([e, t]) => ({
95
+ slot: e,
96
+ dataSinkId: t
97
+ })),
98
+ inputValues: F
62
99
  });
63
- if (!n.success) {
64
- Z(n.errorMessage ?? A("bigconsole.dashboards.createDialog.error.installFailed", "Failed to create dashboard from template."));
100
+ if (!r.success) {
101
+ X(r.errorMessage ?? S("bigconsole.dashboards.createDialog.error.installFailed", "Failed to create dashboard from template."));
65
102
  return;
66
103
  }
67
- n.dashboardId && k?.({
68
- dashboardId: n.dashboardId,
69
- widgetsNeedingData: n.widgetsNeedingData
70
- }), E();
104
+ r.dashboardId && x?.({
105
+ dashboardId: r.dashboardId,
106
+ widgetsNeedingData: r.widgetsNeedingData
107
+ }), v();
71
108
  } catch (e) {
72
- Z(e instanceof Error ? e.message : A("bigconsole.dashboards.createDialog.error.installFailed", "Failed to create dashboard from template."));
109
+ X(e instanceof Error ? e.message : S("bigconsole.dashboards.createDialog.error.installFailed", "Failed to create dashboard from template."));
73
110
  } finally {
74
- L(!1);
111
+ D(!1);
75
112
  }
76
113
  return;
77
114
  }
78
115
  try {
79
- await D({
116
+ await y({
80
117
  name: t,
81
- description: H.trim(),
118
+ description: V.trim(),
82
119
  category: "CUSTOM",
83
- tags: W.length > 0 ? W : void 0
120
+ tags: U.length > 0 ? U : void 0
84
121
  });
85
122
  } catch (e) {
86
- Z(e instanceof Error ? e.message : A("bigconsole.dashboards.createDialog.error.createFailed", "Failed to create dashboard. Please try again."));
123
+ X(e instanceof Error ? e.message : S("bigconsole.dashboards.createDialog.error.createFailed", "Failed to create dashboard. Please try again."));
87
124
  }
88
125
  }, [
89
- B,
90
- H,
91
- W,
92
- R,
93
- J,
94
- D,
95
- E,
96
- P,
126
+ z,
127
+ V,
128
+ U,
129
+ L,
130
+ q,
131
+ O,
132
+ N,
97
133
  F,
98
- k,
99
- A
134
+ y,
135
+ v,
136
+ w,
137
+ T,
138
+ x,
139
+ S
100
140
  ]);
101
- return /* @__PURE__ */ S(ee, {
102
- open: r,
103
- onOpenChange: (e) => !e && !T && E(),
104
- children: /* @__PURE__ */ C(te, {
141
+ return /* @__PURE__ */ h(se, {
142
+ open: a,
143
+ onOpenChange: (e) => !e && !_ && !E && v(),
144
+ children: /* @__PURE__ */ g(ce, {
105
145
  style: {
106
- maxWidth: R === "template" ? "900px" : "480px",
146
+ maxWidth: L === "template" ? "900px" : "480px",
107
147
  width: "100%",
108
148
  padding: 0
109
149
  },
110
- children: [/* @__PURE__ */ S(_, {
150
+ children: [/* @__PURE__ */ h(de, {
111
151
  style: { padding: "var(--space-pagePadding) var(--space-pagePadding) 0" },
112
- children: /* @__PURE__ */ C("div", {
152
+ children: /* @__PURE__ */ g("div", {
113
153
  style: {
114
154
  display: "flex",
115
155
  alignItems: "center",
116
156
  gap: "var(--space-formGap)"
117
157
  },
118
- children: [/* @__PURE__ */ S("div", {
158
+ children: [/* @__PURE__ */ h("div", {
119
159
  style: {
120
160
  display: "flex",
121
161
  height: "var(--size-controlHeight-lg)",
@@ -126,7 +166,7 @@ var T = r(function({ isOpen: r, isCreating: T = !1, onClose: E, onCreate: D, sho
126
166
  borderRadius: "var(--radius-card)",
127
167
  backgroundColor: "var(--color-bg-accentSubtle)"
128
168
  },
129
- children: /* @__PURE__ */ S(l, {
169
+ children: /* @__PURE__ */ h(re, {
130
170
  "aria-hidden": "true",
131
171
  style: {
132
172
  height: "var(--size-icon-lg)",
@@ -134,29 +174,29 @@ var T = r(function({ isOpen: r, isCreating: T = !1, onClose: E, onCreate: D, sho
134
174
  color: "var(--color-action-primary-bg)"
135
175
  }
136
176
  })
137
- }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S(v, {
177
+ }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h(f, {
138
178
  style: {
139
179
  fontSize: "var(--font-size-heading-h4)",
140
180
  fontWeight: "var(--font-weight-bold)",
141
181
  color: "var(--color-text-primary)",
142
182
  margin: 0
143
183
  },
144
- children: A("bigconsole.dashboards.createDialog.title", "Create New Dashboard")
145
- }), /* @__PURE__ */ S(h, {
184
+ children: S("bigconsole.dashboards.createDialog.title", "Create New Dashboard")
185
+ }), /* @__PURE__ */ h(le, {
146
186
  style: {
147
187
  fontSize: "var(--font-size-body-sm)",
148
188
  color: "var(--color-text-secondary)",
149
189
  margin: "var(--space-controlGap) 0 0 0"
150
190
  },
151
- children: A("bigconsole.dashboards.createDialog.subtitle", "Create a new dashboard to visualize your data")
191
+ children: S("bigconsole.dashboards.createDialog.subtitle", "Create a new dashboard to visualize your data")
152
192
  })] })]
153
193
  })
154
- }), /* @__PURE__ */ C("form", {
155
- onSubmit: ae,
194
+ }), /* @__PURE__ */ g("form", {
195
+ onSubmit: we,
156
196
  children: [
157
- O && /* @__PURE__ */ S("div", {
197
+ b && /* @__PURE__ */ h("div", {
158
198
  style: { padding: "var(--space-pagePadding) var(--space-pagePadding) 0" },
159
- children: /* @__PURE__ */ C("div", {
199
+ children: /* @__PURE__ */ g("div", {
160
200
  role: "group",
161
201
  "aria-label": "How to start",
162
202
  style: {
@@ -167,10 +207,11 @@ var T = r(function({ isOpen: r, isCreating: T = !1, onClose: E, onCreate: D, sho
167
207
  backgroundColor: "var(--color-bg-sunken)",
168
208
  borderRadius: "var(--radius-button)"
169
209
  },
170
- children: [/* @__PURE__ */ C("button", {
210
+ children: [/* @__PURE__ */ g("button", {
171
211
  type: "button",
212
+ disabled: _ || E,
172
213
  onClick: () => {
173
- z("blank"), Y(null);
214
+ R("blank"), J(null);
174
215
  },
175
216
  style: {
176
217
  flex: 1,
@@ -181,21 +222,22 @@ var T = r(function({ isOpen: r, isCreating: T = !1, onClose: E, onCreate: D, sho
181
222
  padding: "var(--space-controlGap) var(--space-formGap)",
182
223
  borderRadius: "var(--radius-button)",
183
224
  border: "none",
184
- backgroundColor: R === "blank" ? "var(--color-bg-surface)" : "transparent",
185
- color: R === "blank" ? "var(--color-text-primary)" : "var(--color-text-secondary)",
186
- fontWeight: R === "blank" ? "var(--font-weight-semibold)" : "var(--font-weight-regular)",
225
+ backgroundColor: L === "blank" ? "var(--color-bg-surface)" : "transparent",
226
+ color: L === "blank" ? "var(--color-text-primary)" : "var(--color-text-secondary)",
227
+ fontWeight: L === "blank" ? "var(--font-weight-semibold)" : "var(--font-weight-regular)",
187
228
  fontSize: "var(--font-size-body-sm)",
188
229
  cursor: "pointer",
189
- boxShadow: R === "blank" ? "var(--shadow-elevation-1)" : "none",
230
+ boxShadow: L === "blank" ? "var(--shadow-elevation-1)" : "none",
190
231
  transition: "all 0.15s ease"
191
232
  },
192
- children: [/* @__PURE__ */ S(u, { style: {
233
+ children: [/* @__PURE__ */ h(u, { style: {
193
234
  height: "var(--size-icon-sm)",
194
235
  width: "var(--size-icon-sm)"
195
- } }), A("bigconsole.dashboards.createDialog.tab.blank", "Blank Dashboard")]
196
- }), /* @__PURE__ */ C("button", {
236
+ } }), S("bigconsole.dashboards.createDialog.tab.blank", "Blank Dashboard")]
237
+ }), /* @__PURE__ */ g("button", {
197
238
  type: "button",
198
- onClick: () => z("template"),
239
+ disabled: _ || E,
240
+ onClick: () => R("template"),
199
241
  style: {
200
242
  flex: 1,
201
243
  display: "flex",
@@ -205,38 +247,55 @@ var T = r(function({ isOpen: r, isCreating: T = !1, onClose: E, onCreate: D, sho
205
247
  padding: "var(--space-controlGap) var(--space-formGap)",
206
248
  borderRadius: "var(--radius-button)",
207
249
  border: "none",
208
- backgroundColor: R === "template" ? "var(--color-bg-surface)" : "transparent",
209
- color: R === "template" ? "var(--color-text-primary)" : "var(--color-text-secondary)",
210
- fontWeight: R === "template" ? "var(--font-weight-semibold)" : "var(--font-weight-regular)",
250
+ backgroundColor: L === "template" ? "var(--color-bg-surface)" : "transparent",
251
+ color: L === "template" ? "var(--color-text-primary)" : "var(--color-text-secondary)",
252
+ fontWeight: L === "template" ? "var(--font-weight-semibold)" : "var(--font-weight-regular)",
211
253
  fontSize: "var(--font-size-body-sm)",
212
254
  cursor: "pointer",
213
- boxShadow: R === "template" ? "var(--shadow-elevation-1)" : "none",
255
+ boxShadow: L === "template" ? "var(--shadow-elevation-1)" : "none",
214
256
  transition: "all 0.15s ease"
215
257
  },
216
- children: [/* @__PURE__ */ S(c, { style: {
258
+ children: [/* @__PURE__ */ h(ne, { style: {
217
259
  height: "var(--size-icon-sm)",
218
260
  width: "var(--size-icon-sm)"
219
- } }), A("bigconsole.dashboards.createDialog.tab.template", "From Template")]
261
+ } }), S("bigconsole.dashboards.createDialog.tab.template", "From Template")]
220
262
  })]
221
263
  })
222
264
  }),
223
- R === "template" && /* @__PURE__ */ S("div", {
265
+ L === "template" && /* @__PURE__ */ h("div", {
224
266
  style: {
225
267
  padding: "var(--space-pagePadding)",
226
268
  maxHeight: "400px",
227
269
  overflowY: "auto"
228
270
  },
229
- children: /* @__PURE__ */ S(t, {
230
- templates: j,
231
- loading: M,
232
- error: N,
233
- selectedTemplateId: J?.id,
234
- onSelect: ie
271
+ children: /* @__PURE__ */ h(t, {
272
+ templates: ge,
273
+ loading: _e,
274
+ error: C,
275
+ selectedTemplateId: q?.id,
276
+ onSelect: Ce
235
277
  })
236
278
  }),
237
- /* @__PURE__ */ S("div", {
279
+ L === "template" && q && /* @__PURE__ */ g("div", {
280
+ style: { padding: "var(--space-pagePadding)" },
281
+ children: [j && /* @__PURE__ */ h(m, {}), Q && /* @__PURE__ */ g(pe, { children: [/* @__PURE__ */ h(r, { content: Q }), /* @__PURE__ */ h(n, {
282
+ content: Q,
283
+ bindings: N,
284
+ onBindingChange: (e, t) => P((n) => ({
285
+ ...n,
286
+ [e]: t
287
+ })),
288
+ inputValues: F,
289
+ onInputChange: (e, t) => I((n) => ({
290
+ ...n,
291
+ [e]: t
292
+ })),
293
+ disabled: _ || E
294
+ })] })]
295
+ }),
296
+ /* @__PURE__ */ h("div", {
238
297
  style: { padding: "var(--space-pagePadding)" },
239
- children: /* @__PURE__ */ C(e, {
298
+ children: /* @__PURE__ */ g(e, {
240
299
  headingLevel: 3,
241
300
  emphasis: "bare",
242
301
  padding: "none",
@@ -244,10 +303,10 @@ var T = r(function({ isOpen: r, isCreating: T = !1, onClose: E, onCreate: D, sho
244
303
  description: "Name it now — everything else can change later.",
245
304
  "data-testid": "create-dashboard-details",
246
305
  children: [
247
- /* @__PURE__ */ C("div", {
306
+ /* @__PURE__ */ g("div", {
248
307
  style: { marginBottom: "var(--space-formGap)" },
249
308
  children: [
250
- /* @__PURE__ */ C("label", {
309
+ /* @__PURE__ */ g("label", {
251
310
  htmlFor: "dashboard-name",
252
311
  style: {
253
312
  display: "block",
@@ -256,7 +315,7 @@ var T = r(function({ isOpen: r, isCreating: T = !1, onClose: E, onCreate: D, sho
256
315
  color: "var(--color-text-primary)",
257
316
  marginBottom: "var(--space-controlGap)"
258
317
  },
259
- children: [A("bigconsole.dashboards.createDialog.field.name", "Dashboard Name"), /* @__PURE__ */ S("span", {
318
+ children: [S("bigconsole.dashboards.createDialog.field.name", "Dashboard Name"), /* @__PURE__ */ h("span", {
260
319
  style: {
261
320
  color: "var(--color-status-error-text)",
262
321
  marginLeft: "var(--space-controlGap)"
@@ -264,36 +323,36 @@ var T = r(function({ isOpen: r, isCreating: T = !1, onClose: E, onCreate: D, sho
264
323
  children: "*"
265
324
  })]
266
325
  }),
267
- /* @__PURE__ */ S(y, {
268
- ref: Q,
326
+ /* @__PURE__ */ h(p, {
327
+ ref: Z,
269
328
  id: "dashboard-name",
270
329
  type: "text",
271
- value: B,
330
+ value: z,
272
331
  onChange: (e) => {
273
- V(e.target.value), X && Z(null);
332
+ B(e.target.value), Y && X(null);
274
333
  },
275
- placeholder: A("bigconsole.dashboards.createDialog.field.namePlaceholder", "Enter dashboard name"),
276
- disabled: T || I,
334
+ placeholder: S("bigconsole.dashboards.createDialog.field.namePlaceholder", "Enter dashboard name"),
335
+ disabled: _ || E,
277
336
  style: {
278
337
  height: "var(--size-controlHeight-md)",
279
338
  fontSize: "var(--font-size-body-sm)",
280
- borderColor: X ? "var(--color-status-error-border)" : void 0
339
+ borderColor: Y ? "var(--color-status-error-border)" : void 0
281
340
  }
282
341
  }),
283
- X && /* @__PURE__ */ S("p", {
342
+ Y && /* @__PURE__ */ h("p", {
284
343
  style: {
285
344
  fontSize: "var(--font-size-body-sm)",
286
345
  color: "var(--color-status-error-text)",
287
346
  marginTop: "var(--space-controlGap)",
288
347
  fontWeight: "var(--font-weight-medium)"
289
348
  },
290
- children: X
349
+ children: Y
291
350
  })
292
351
  ]
293
352
  }),
294
- /* @__PURE__ */ C("div", {
353
+ /* @__PURE__ */ g("div", {
295
354
  style: { marginBottom: "var(--space-formGap)" },
296
- children: [/* @__PURE__ */ C("label", {
355
+ children: [/* @__PURE__ */ g("label", {
297
356
  htmlFor: "dashboard-description",
298
357
  style: {
299
358
  display: "block",
@@ -302,29 +361,29 @@ var T = r(function({ isOpen: r, isCreating: T = !1, onClose: E, onCreate: D, sho
302
361
  color: "var(--color-text-primary)",
303
362
  marginBottom: "var(--space-controlGap)"
304
363
  },
305
- children: [A("bigconsole.dashboards.createDialog.field.description", "Description"), /* @__PURE__ */ S("span", {
364
+ children: [S("bigconsole.dashboards.createDialog.field.description", "Description"), /* @__PURE__ */ h("span", {
306
365
  style: {
307
366
  color: "var(--color-text-muted)",
308
367
  fontWeight: "var(--font-weight-regular)",
309
368
  marginLeft: "var(--space-controlGap)"
310
369
  },
311
- children: A("bigconsole.dashboards.createDialog.field.optional", "(optional)")
370
+ children: S("bigconsole.dashboards.createDialog.field.optional", "(optional)")
312
371
  })]
313
- }), /* @__PURE__ */ S(x, {
372
+ }), /* @__PURE__ */ h(fe, {
314
373
  id: "dashboard-description",
315
- value: H,
316
- onChange: (e) => U(e.target.value),
317
- placeholder: A("bigconsole.dashboards.createDialog.field.descriptionPlaceholder", "Enter a brief description for this dashboard"),
374
+ value: V,
375
+ onChange: (e) => H(e.target.value),
376
+ placeholder: S("bigconsole.dashboards.createDialog.field.descriptionPlaceholder", "Enter a brief description for this dashboard"),
318
377
  rows: 3,
319
- disabled: T || I,
378
+ disabled: _ || E,
320
379
  style: {
321
380
  fontSize: "var(--font-size-body-sm)",
322
381
  resize: "none"
323
382
  }
324
383
  })]
325
384
  }),
326
- /* @__PURE__ */ C("div", { children: [
327
- /* @__PURE__ */ C("label", {
385
+ /* @__PURE__ */ g("div", { children: [
386
+ /* @__PURE__ */ g("label", {
328
387
  htmlFor: "dashboard-tags",
329
388
  style: {
330
389
  display: "flex",
@@ -336,28 +395,28 @@ var T = r(function({ isOpen: r, isCreating: T = !1, onClose: E, onCreate: D, sho
336
395
  marginBottom: "var(--space-controlGap)"
337
396
  },
338
397
  children: [
339
- /* @__PURE__ */ S(d, { style: {
398
+ /* @__PURE__ */ h(ie, { style: {
340
399
  height: "var(--size-icon-sm)",
341
400
  width: "var(--size-icon-sm)"
342
401
  } }),
343
- A("bigconsole.dashboards.createDialog.field.tags", "Tags"),
344
- /* @__PURE__ */ S("span", {
402
+ S("bigconsole.dashboards.createDialog.field.tags", "Tags"),
403
+ /* @__PURE__ */ h("span", {
345
404
  style: {
346
405
  color: "var(--color-text-muted)",
347
406
  fontWeight: "var(--font-weight-regular)"
348
407
  },
349
- children: A("bigconsole.dashboards.createDialog.field.tagsOptional", "(optional, max 10)")
408
+ children: S("bigconsole.dashboards.createDialog.field.tagsOptional", "(optional, max 10)")
350
409
  })
351
410
  ]
352
411
  }),
353
- W.length > 0 && /* @__PURE__ */ S("div", {
412
+ U.length > 0 && /* @__PURE__ */ h("div", {
354
413
  style: {
355
414
  display: "flex",
356
415
  flexWrap: "wrap",
357
416
  gap: "var(--space-controlGap)",
358
417
  marginBottom: "var(--space-controlGap)"
359
418
  },
360
- children: W.map((e) => /* @__PURE__ */ C(p, {
419
+ children: U.map((e) => /* @__PURE__ */ g(oe, {
361
420
  variant: "secondary",
362
421
  style: {
363
422
  display: "flex",
@@ -365,10 +424,10 @@ var T = r(function({ isOpen: r, isCreating: T = !1, onClose: E, onCreate: D, sho
365
424
  gap: "4px",
366
425
  paddingRight: "4px"
367
426
  },
368
- children: [e, /* @__PURE__ */ S("button", {
427
+ children: [e, /* @__PURE__ */ h("button", {
369
428
  type: "button",
370
- onClick: () => ne(e),
371
- disabled: T || I,
429
+ onClick: () => xe(e),
430
+ disabled: _ || E,
372
431
  style: {
373
432
  display: "flex",
374
433
  alignItems: "center",
@@ -383,53 +442,53 @@ var T = r(function({ isOpen: r, isCreating: T = !1, onClose: E, onCreate: D, sho
383
442
  },
384
443
  onMouseOver: (e) => e.currentTarget.style.opacity = "1",
385
444
  onMouseOut: (e) => e.currentTarget.style.opacity = "0.7",
386
- children: /* @__PURE__ */ S(f, { style: {
445
+ children: /* @__PURE__ */ h(ae, { style: {
387
446
  height: "12px",
388
447
  width: "12px"
389
448
  } })
390
449
  })]
391
450
  }, e))
392
451
  }),
393
- /* @__PURE__ */ C("div", {
452
+ /* @__PURE__ */ g("div", {
394
453
  style: {
395
454
  display: "flex",
396
455
  gap: "var(--space-controlGap)"
397
456
  },
398
- children: [/* @__PURE__ */ S(y, {
457
+ children: [/* @__PURE__ */ h(p, {
399
458
  id: "dashboard-tags",
400
459
  type: "text",
401
- value: K,
402
- onChange: (e) => q(e.target.value),
403
- onKeyDown: re,
404
- placeholder: W.length >= 10 ? A("bigconsole.dashboards.createDialog.field.tagsMaxReached", "Max tags reached") : A("bigconsole.dashboards.createDialog.field.tagsInputPlaceholder", "Type a tag and press Enter"),
405
- disabled: T || I || W.length >= 10,
460
+ value: G,
461
+ onChange: (e) => K(e.target.value),
462
+ onKeyDown: Se,
463
+ placeholder: U.length >= 10 ? S("bigconsole.dashboards.createDialog.field.tagsMaxReached", "Max tags reached") : S("bigconsole.dashboards.createDialog.field.tagsInputPlaceholder", "Type a tag and press Enter"),
464
+ disabled: _ || E || U.length >= 10,
406
465
  style: {
407
466
  flex: 1,
408
467
  height: "var(--size-controlHeight-md)",
409
468
  fontSize: "var(--font-size-body-sm)"
410
469
  }
411
- }), /* @__PURE__ */ S(m, {
470
+ }), /* @__PURE__ */ h(d, {
412
471
  type: "button",
413
472
  variant: "outline",
414
473
  onClick: $,
415
- disabled: T || I || !K.trim() || W.length >= 10,
474
+ disabled: _ || E || !G.trim() || U.length >= 10,
416
475
  style: { height: "var(--size-controlHeight-md)" },
417
- children: A("bigconsole.dashboards.createDialog.action.addTag", "Add")
476
+ children: S("bigconsole.dashboards.createDialog.action.addTag", "Add")
418
477
  })]
419
478
  }),
420
- /* @__PURE__ */ S("p", {
479
+ /* @__PURE__ */ h("p", {
421
480
  style: {
422
481
  fontSize: "var(--font-size-xs)",
423
482
  color: "var(--color-text-muted)",
424
483
  marginTop: "var(--space-controlGap)"
425
484
  },
426
- children: A("bigconsole.dashboards.createDialog.field.tagsHelp", "Press Enter to add a tag, or click Add")
485
+ children: S("bigconsole.dashboards.createDialog.field.tagsHelp", "Press Enter to add a tag, or click Add")
427
486
  })
428
487
  ] })
429
488
  ]
430
489
  })
431
490
  }),
432
- /* @__PURE__ */ C(g, {
491
+ /* @__PURE__ */ g(ue, {
433
492
  style: {
434
493
  padding: "var(--space-formGap) var(--space-pagePadding)",
435
494
  borderTop: "1px solid var(--color-border)",
@@ -438,40 +497,40 @@ var T = r(function({ isOpen: r, isCreating: T = !1, onClose: E, onCreate: D, sho
438
497
  justifyContent: "flex-end",
439
498
  gap: "var(--space-controlGap)"
440
499
  },
441
- children: [/* @__PURE__ */ S(m, {
500
+ children: [/* @__PURE__ */ h(d, {
442
501
  type: "button",
443
502
  variant: "outline",
444
- onClick: E,
445
- disabled: T || I,
503
+ onClick: v,
504
+ disabled: _ || E,
446
505
  style: { height: "var(--size-controlHeight-md)" },
447
- children: A("bigconsole.dashboards.createDialog.action.cancel", "Cancel")
448
- }), /* @__PURE__ */ S(m, {
506
+ children: S("bigconsole.dashboards.createDialog.action.cancel", "Cancel")
507
+ }), /* @__PURE__ */ h(d, {
449
508
  type: "submit",
450
- disabled: T || I || !B.trim(),
509
+ disabled: _ || E || !z.trim() || L === "template" && (!q || !Q || j),
451
510
  style: {
452
511
  height: "var(--size-controlHeight-md)",
453
512
  backgroundColor: "var(--color-action-primary-bg)"
454
513
  },
455
- children: T || I ? /* @__PURE__ */ C("span", {
514
+ children: _ || E ? /* @__PURE__ */ g("span", {
456
515
  style: {
457
516
  display: "flex",
458
517
  alignItems: "center",
459
518
  gap: "var(--space-iconGap)"
460
519
  },
461
- children: [/* @__PURE__ */ S(b, { style: {
520
+ children: [/* @__PURE__ */ h(m, { style: {
462
521
  height: "var(--size-icon-sm)",
463
522
  width: "var(--size-icon-sm)"
464
- } }), A("bigconsole.dashboards.createDialog.action.creating", "Creating...")]
465
- }) : /* @__PURE__ */ C("span", {
523
+ } }), S("bigconsole.dashboards.createDialog.action.creating", "Creating...")]
524
+ }) : /* @__PURE__ */ g("span", {
466
525
  style: {
467
526
  display: "flex",
468
527
  alignItems: "center",
469
528
  gap: "var(--space-iconGap)"
470
529
  },
471
- children: [/* @__PURE__ */ S(u, { style: {
530
+ children: [/* @__PURE__ */ h(u, { style: {
472
531
  height: "var(--size-icon-sm)",
473
532
  width: "var(--size-icon-sm)"
474
- } }), A("bigconsole.dashboards.createDialog.action.create", "Create Dashboard")]
533
+ } }), S("bigconsole.dashboards.createDialog.action.create", "Create Dashboard")]
475
534
  })
476
535
  })]
477
536
  })
@@ -481,6 +540,6 @@ var T = r(function({ isOpen: r, isCreating: T = !1, onClose: E, onCreate: D, sho
481
540
  });
482
541
  });
483
542
  //#endregion
484
- export { T as default };
543
+ export { _ as default };
485
544
 
486
545
  //# sourceMappingURL=CreateDashboardDialog.js.map