@burdenoff/microfe-bigconsole 2026.730.1 → 2026.730.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +160 -127
- package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/StoreTemplatePicker.js +144 -0
- package/dist/bigconsole/components/dashboard/StoreTemplatePicker.js.map +1 -0
- package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +2 -904
- package/dist/bigconsole/components/dashboard/index.js +1 -2
- package/dist/bigconsole/graphql/storeTemplates.js +27 -0
- package/dist/bigconsole/graphql/storeTemplates.js.map +1 -0
- package/dist/bigconsole/hooks/useDashboardTemplates.js +4 -301
- package/dist/bigconsole/hooks/useStoreDashboardTemplates.js +137 -0
- package/dist/bigconsole/hooks/useStoreDashboardTemplates.js.map +1 -0
- package/dist/generated/global-operations.js +49 -0
- package/dist/generated/global-operations.js.map +1 -0
- package/dist/generated/wspace-operations.js +127 -117
- package/dist/generated/wspace-operations.js.map +1 -1
- package/package.json +1 -1
- package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js.map +0 -1
- package/dist/bigconsole/hooks/useDashboardTemplates.js.map +0 -1
|
@@ -1,86 +1,117 @@
|
|
|
1
|
-
import e from "./
|
|
2
|
-
import "
|
|
3
|
-
import { memo as
|
|
4
|
-
import { Copy as
|
|
5
|
-
import { Badge as
|
|
6
|
-
import { jsx as
|
|
1
|
+
import e from "./StoreTemplatePicker.js";
|
|
2
|
+
import t from "../../hooks/useStoreDashboardTemplates.js";
|
|
3
|
+
import { memo as n, useCallback as r, useEffect as i, useRef as a, useState as o } from "react";
|
|
4
|
+
import { Copy as s, LayoutDashboard as c, Plus as l, Tag as u, X as d } from "lucide-react";
|
|
5
|
+
import { Badge as f, Button as p, Dialog as m, DialogContent as h, DialogDescription as g, DialogFooter as _, DialogHeader as v, DialogTitle as y, Input as b, Spinner as x, Textarea as S } from "@burdenoff/fe-libs/ui";
|
|
6
|
+
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
7
7
|
//#region src/bigconsole/components/dashboard/CreateDashboardDialog.tsx
|
|
8
|
-
var
|
|
9
|
-
let
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
var T = n(function({ isOpen: n, isCreating: T = !1, onClose: E, onCreate: D, showTemplates: O = !0, onTemplateInstalled: k }) {
|
|
9
|
+
let { templates: A, loading: j, error: M, fetchTemplateContent: N, installTemplate: P } = t({ autoLoad: O }), [F, I] = o(!1), [L, R] = o("blank"), [z, B] = o(""), [V, H] = o(""), [U, W] = o([]), [G, K] = o(""), [q, J] = o(null), [Y, X] = o(null), Z = a(null);
|
|
10
|
+
i(() => {
|
|
11
|
+
n && (R("blank"), B(""), H(""), W([]), K(""), J(null), X(null), setTimeout(() => {
|
|
12
|
+
Z.current?.focus();
|
|
13
13
|
}, 100));
|
|
14
|
-
}, [
|
|
15
|
-
let
|
|
16
|
-
let e =
|
|
17
|
-
e && !
|
|
18
|
-
}, [
|
|
19
|
-
|
|
20
|
-
}, []),
|
|
21
|
-
e.key === "Enter" ? (e.preventDefault(),
|
|
14
|
+
}, [n]);
|
|
15
|
+
let Q = r(() => {
|
|
16
|
+
let e = G.trim().toLowerCase();
|
|
17
|
+
e && !U.includes(e) && U.length < 10 && (W((t) => [...t, e]), K(""));
|
|
18
|
+
}, [G, U]), $ = r((e) => {
|
|
19
|
+
W((t) => t.filter((t) => t !== e));
|
|
20
|
+
}, []), ee = r((e) => {
|
|
21
|
+
e.key === "Enter" ? (e.preventDefault(), Q()) : e.key === "Backspace" && !G && U.length > 0 && W((e) => e.slice(0, -1));
|
|
22
22
|
}, [
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
]),
|
|
27
|
-
|
|
28
|
-
}, []),
|
|
29
|
-
if (e.preventDefault(),
|
|
30
|
-
|
|
23
|
+
Q,
|
|
24
|
+
G,
|
|
25
|
+
U.length
|
|
26
|
+
]), te = r((e) => {
|
|
27
|
+
J(e), B(e.name), H(e.description || "");
|
|
28
|
+
}, []), ne = r(async (e) => {
|
|
29
|
+
if (e.preventDefault(), L === "template" && !q) {
|
|
30
|
+
X("Please select a template");
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
|
-
let t =
|
|
33
|
+
let t = z.trim();
|
|
34
34
|
if (!t) {
|
|
35
|
-
|
|
35
|
+
X("Dashboard name is required"), Z.current?.focus();
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
38
|
if (t.length < 3) {
|
|
39
|
-
|
|
39
|
+
X("Dashboard name must be at least 3 characters"), Z.current?.focus();
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
42
|
if (t.length > 100) {
|
|
43
|
-
|
|
43
|
+
X("Dashboard name must be less than 100 characters"), Z.current?.focus();
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
if (X(null), L === "template" && q) {
|
|
47
|
+
I(!0);
|
|
48
|
+
try {
|
|
49
|
+
let e = await N(q.id);
|
|
50
|
+
if (!e) {
|
|
51
|
+
X("This template has no dashboard definition attached and cannot be installed.");
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
let n = await P({
|
|
55
|
+
templateId: q.id,
|
|
56
|
+
templateName: q.name,
|
|
57
|
+
content: e,
|
|
58
|
+
name: t
|
|
59
|
+
});
|
|
60
|
+
if (!n.success) {
|
|
61
|
+
X(n.errorMessage ?? "Failed to create dashboard from template.");
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
n.dashboardId && k?.({
|
|
65
|
+
dashboardId: n.dashboardId,
|
|
66
|
+
widgetsNeedingData: n.widgetsNeedingData
|
|
67
|
+
}), E();
|
|
68
|
+
} catch (e) {
|
|
69
|
+
X(e instanceof Error ? e.message : "Failed to create dashboard from template.");
|
|
70
|
+
} finally {
|
|
71
|
+
I(!1);
|
|
72
|
+
}
|
|
44
73
|
return;
|
|
45
74
|
}
|
|
46
|
-
V(null);
|
|
47
75
|
try {
|
|
48
|
-
await
|
|
76
|
+
await D({
|
|
49
77
|
name: t,
|
|
50
|
-
description:
|
|
78
|
+
description: V.trim(),
|
|
51
79
|
category: "CUSTOM",
|
|
52
|
-
tags:
|
|
53
|
-
templateId: R?.id
|
|
80
|
+
tags: U.length > 0 ? U : void 0
|
|
54
81
|
});
|
|
55
82
|
} catch (e) {
|
|
56
|
-
|
|
83
|
+
X(e instanceof Error ? e.message : "Failed to create dashboard. Please try again.");
|
|
57
84
|
}
|
|
58
85
|
}, [
|
|
59
|
-
|
|
60
|
-
|
|
86
|
+
z,
|
|
87
|
+
V,
|
|
88
|
+
U,
|
|
89
|
+
L,
|
|
90
|
+
q,
|
|
91
|
+
D,
|
|
92
|
+
E,
|
|
93
|
+
N,
|
|
61
94
|
P,
|
|
62
|
-
|
|
63
|
-
R,
|
|
64
|
-
E
|
|
95
|
+
k
|
|
65
96
|
]);
|
|
66
|
-
return /* @__PURE__ */
|
|
67
|
-
open:
|
|
68
|
-
onOpenChange: (e) => !e && !
|
|
69
|
-
children: /* @__PURE__ */
|
|
97
|
+
return /* @__PURE__ */ C(m, {
|
|
98
|
+
open: n,
|
|
99
|
+
onOpenChange: (e) => !e && !T && E(),
|
|
100
|
+
children: /* @__PURE__ */ w(h, {
|
|
70
101
|
style: {
|
|
71
|
-
maxWidth:
|
|
102
|
+
maxWidth: L === "template" ? "900px" : "480px",
|
|
72
103
|
padding: 0,
|
|
73
104
|
transition: "max-width 0.2s ease"
|
|
74
105
|
},
|
|
75
|
-
children: [/* @__PURE__ */
|
|
106
|
+
children: [/* @__PURE__ */ C(v, {
|
|
76
107
|
style: { padding: "var(--space-pagePadding) var(--space-pagePadding) 0" },
|
|
77
|
-
children: /* @__PURE__ */
|
|
108
|
+
children: /* @__PURE__ */ w("div", {
|
|
78
109
|
style: {
|
|
79
110
|
display: "flex",
|
|
80
111
|
alignItems: "center",
|
|
81
112
|
gap: "var(--space-formGap)"
|
|
82
113
|
},
|
|
83
|
-
children: [/* @__PURE__ */
|
|
114
|
+
children: [/* @__PURE__ */ C("div", {
|
|
84
115
|
style: {
|
|
85
116
|
display: "flex",
|
|
86
117
|
height: "var(--size-controlHeight-lg)",
|
|
@@ -91,12 +122,12 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
91
122
|
backgroundColor: "var(--color-action-primary-bg)",
|
|
92
123
|
boxShadow: "var(--shadow-elevation-2)"
|
|
93
124
|
},
|
|
94
|
-
children: /* @__PURE__ */
|
|
125
|
+
children: /* @__PURE__ */ C(c, { style: {
|
|
95
126
|
height: "var(--size-icon-lg)",
|
|
96
127
|
width: "var(--size-icon-lg)",
|
|
97
128
|
color: "var(--color-action-primary-text)"
|
|
98
129
|
} })
|
|
99
|
-
}), /* @__PURE__ */
|
|
130
|
+
}), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C(y, {
|
|
100
131
|
style: {
|
|
101
132
|
fontSize: "var(--font-size-heading-h4)",
|
|
102
133
|
fontWeight: "var(--font-weight-bold)",
|
|
@@ -104,7 +135,7 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
104
135
|
margin: 0
|
|
105
136
|
},
|
|
106
137
|
children: "Create New Dashboard"
|
|
107
|
-
}), /* @__PURE__ */
|
|
138
|
+
}), /* @__PURE__ */ C(g, {
|
|
108
139
|
style: {
|
|
109
140
|
fontSize: "var(--font-size-body-sm)",
|
|
110
141
|
color: "var(--color-text-secondary)",
|
|
@@ -113,12 +144,12 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
113
144
|
children: "Create a new dashboard to visualize your data"
|
|
114
145
|
})] })]
|
|
115
146
|
})
|
|
116
|
-
}), /* @__PURE__ */
|
|
117
|
-
onSubmit:
|
|
147
|
+
}), /* @__PURE__ */ w("form", {
|
|
148
|
+
onSubmit: ne,
|
|
118
149
|
children: [
|
|
119
|
-
|
|
150
|
+
O && /* @__PURE__ */ C("div", {
|
|
120
151
|
style: { padding: "var(--space-pagePadding) var(--space-pagePadding) 0" },
|
|
121
|
-
children: /* @__PURE__ */
|
|
152
|
+
children: /* @__PURE__ */ w("div", {
|
|
122
153
|
style: {
|
|
123
154
|
display: "flex",
|
|
124
155
|
gap: "var(--space-controlGap)",
|
|
@@ -126,10 +157,10 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
126
157
|
backgroundColor: "var(--color-bg-sunken)",
|
|
127
158
|
borderRadius: "var(--radius-button)"
|
|
128
159
|
},
|
|
129
|
-
children: [/* @__PURE__ */
|
|
160
|
+
children: [/* @__PURE__ */ w("button", {
|
|
130
161
|
type: "button",
|
|
131
162
|
onClick: () => {
|
|
132
|
-
|
|
163
|
+
R("blank"), J(null);
|
|
133
164
|
},
|
|
134
165
|
style: {
|
|
135
166
|
flex: 1,
|
|
@@ -140,21 +171,21 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
140
171
|
padding: "var(--space-controlGap) var(--space-formGap)",
|
|
141
172
|
borderRadius: "var(--radius-button)",
|
|
142
173
|
border: "none",
|
|
143
|
-
backgroundColor:
|
|
144
|
-
color:
|
|
145
|
-
fontWeight:
|
|
174
|
+
backgroundColor: L === "blank" ? "var(--color-bg-surface)" : "transparent",
|
|
175
|
+
color: L === "blank" ? "var(--color-text-primary)" : "var(--color-text-secondary)",
|
|
176
|
+
fontWeight: L === "blank" ? "var(--font-weight-semibold)" : "var(--font-weight-regular)",
|
|
146
177
|
fontSize: "var(--font-size-body-sm)",
|
|
147
178
|
cursor: "pointer",
|
|
148
|
-
boxShadow:
|
|
179
|
+
boxShadow: L === "blank" ? "var(--shadow-elevation-1)" : "none",
|
|
149
180
|
transition: "all 0.15s ease"
|
|
150
181
|
},
|
|
151
|
-
children: [/* @__PURE__ */
|
|
182
|
+
children: [/* @__PURE__ */ C(l, { style: {
|
|
152
183
|
height: "var(--size-icon-sm)",
|
|
153
184
|
width: "var(--size-icon-sm)"
|
|
154
185
|
} }), "Blank Dashboard"]
|
|
155
|
-
}), /* @__PURE__ */
|
|
186
|
+
}), /* @__PURE__ */ w("button", {
|
|
156
187
|
type: "button",
|
|
157
|
-
onClick: () =>
|
|
188
|
+
onClick: () => R("template"),
|
|
158
189
|
style: {
|
|
159
190
|
flex: 1,
|
|
160
191
|
display: "flex",
|
|
@@ -164,40 +195,42 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
164
195
|
padding: "var(--space-controlGap) var(--space-formGap)",
|
|
165
196
|
borderRadius: "var(--radius-button)",
|
|
166
197
|
border: "none",
|
|
167
|
-
backgroundColor:
|
|
168
|
-
color:
|
|
169
|
-
fontWeight:
|
|
198
|
+
backgroundColor: L === "template" ? "var(--color-bg-surface)" : "transparent",
|
|
199
|
+
color: L === "template" ? "var(--color-text-primary)" : "var(--color-text-secondary)",
|
|
200
|
+
fontWeight: L === "template" ? "var(--font-weight-semibold)" : "var(--font-weight-regular)",
|
|
170
201
|
fontSize: "var(--font-size-body-sm)",
|
|
171
202
|
cursor: "pointer",
|
|
172
|
-
boxShadow:
|
|
203
|
+
boxShadow: L === "template" ? "var(--shadow-elevation-1)" : "none",
|
|
173
204
|
transition: "all 0.15s ease"
|
|
174
205
|
},
|
|
175
|
-
children: [/* @__PURE__ */
|
|
206
|
+
children: [/* @__PURE__ */ C(s, { style: {
|
|
176
207
|
height: "var(--size-icon-sm)",
|
|
177
208
|
width: "var(--size-icon-sm)"
|
|
178
209
|
} }), "From Template"]
|
|
179
210
|
})]
|
|
180
211
|
})
|
|
181
212
|
}),
|
|
182
|
-
|
|
213
|
+
L === "template" && /* @__PURE__ */ C("div", {
|
|
183
214
|
style: {
|
|
184
215
|
padding: "var(--space-pagePadding)",
|
|
185
216
|
maxHeight: "400px",
|
|
186
217
|
overflowY: "auto"
|
|
187
218
|
},
|
|
188
|
-
children: /* @__PURE__ */
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
219
|
+
children: /* @__PURE__ */ C(e, {
|
|
220
|
+
templates: A,
|
|
221
|
+
loading: j,
|
|
222
|
+
error: M,
|
|
223
|
+
selectedTemplateId: q?.id,
|
|
224
|
+
onSelect: te
|
|
192
225
|
})
|
|
193
226
|
}),
|
|
194
|
-
/* @__PURE__ */
|
|
227
|
+
/* @__PURE__ */ w("div", {
|
|
195
228
|
style: { padding: "var(--space-pagePadding)" },
|
|
196
229
|
children: [
|
|
197
|
-
/* @__PURE__ */
|
|
230
|
+
/* @__PURE__ */ w("div", {
|
|
198
231
|
style: { marginBottom: "var(--space-formGap)" },
|
|
199
232
|
children: [
|
|
200
|
-
/* @__PURE__ */
|
|
233
|
+
/* @__PURE__ */ w("label", {
|
|
201
234
|
htmlFor: "dashboard-name",
|
|
202
235
|
style: {
|
|
203
236
|
display: "block",
|
|
@@ -206,7 +239,7 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
206
239
|
color: "var(--color-text-primary)",
|
|
207
240
|
marginBottom: "var(--space-controlGap)"
|
|
208
241
|
},
|
|
209
|
-
children: ["Dashboard Name", /* @__PURE__ */
|
|
242
|
+
children: ["Dashboard Name", /* @__PURE__ */ C("span", {
|
|
210
243
|
style: {
|
|
211
244
|
color: "var(--color-status-error-text)",
|
|
212
245
|
marginLeft: "var(--space-controlGap)"
|
|
@@ -214,36 +247,36 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
214
247
|
children: "*"
|
|
215
248
|
})]
|
|
216
249
|
}),
|
|
217
|
-
/* @__PURE__ */
|
|
218
|
-
ref:
|
|
250
|
+
/* @__PURE__ */ C(b, {
|
|
251
|
+
ref: Z,
|
|
219
252
|
id: "dashboard-name",
|
|
220
253
|
type: "text",
|
|
221
|
-
value:
|
|
254
|
+
value: z,
|
|
222
255
|
onChange: (e) => {
|
|
223
|
-
|
|
256
|
+
B(e.target.value), Y && X(null);
|
|
224
257
|
},
|
|
225
258
|
placeholder: "Enter dashboard name",
|
|
226
|
-
disabled:
|
|
259
|
+
disabled: T || F,
|
|
227
260
|
style: {
|
|
228
261
|
height: "var(--size-controlHeight-md)",
|
|
229
262
|
fontSize: "var(--font-size-body-sm)",
|
|
230
|
-
borderColor:
|
|
263
|
+
borderColor: Y ? "var(--color-status-error-border)" : void 0
|
|
231
264
|
}
|
|
232
265
|
}),
|
|
233
|
-
|
|
266
|
+
Y && /* @__PURE__ */ C("p", {
|
|
234
267
|
style: {
|
|
235
268
|
fontSize: "var(--font-size-body-sm)",
|
|
236
269
|
color: "var(--color-status-error-text)",
|
|
237
270
|
marginTop: "var(--space-controlGap)",
|
|
238
271
|
fontWeight: "var(--font-weight-medium)"
|
|
239
272
|
},
|
|
240
|
-
children:
|
|
273
|
+
children: Y
|
|
241
274
|
})
|
|
242
275
|
]
|
|
243
276
|
}),
|
|
244
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ w("div", {
|
|
245
278
|
style: { marginBottom: "var(--space-formGap)" },
|
|
246
|
-
children: [/* @__PURE__ */
|
|
279
|
+
children: [/* @__PURE__ */ w("label", {
|
|
247
280
|
htmlFor: "dashboard-description",
|
|
248
281
|
style: {
|
|
249
282
|
display: "block",
|
|
@@ -252,7 +285,7 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
252
285
|
color: "var(--color-text-primary)",
|
|
253
286
|
marginBottom: "var(--space-controlGap)"
|
|
254
287
|
},
|
|
255
|
-
children: ["Description", /* @__PURE__ */
|
|
288
|
+
children: ["Description", /* @__PURE__ */ C("span", {
|
|
256
289
|
style: {
|
|
257
290
|
color: "var(--color-text-muted)",
|
|
258
291
|
fontWeight: "var(--font-weight-regular)",
|
|
@@ -260,21 +293,21 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
260
293
|
},
|
|
261
294
|
children: "(optional)"
|
|
262
295
|
})]
|
|
263
|
-
}), /* @__PURE__ */ S
|
|
296
|
+
}), /* @__PURE__ */ C(S, {
|
|
264
297
|
id: "dashboard-description",
|
|
265
|
-
value:
|
|
266
|
-
onChange: (e) =>
|
|
298
|
+
value: V,
|
|
299
|
+
onChange: (e) => H(e.target.value),
|
|
267
300
|
placeholder: "Enter a brief description for this dashboard",
|
|
268
301
|
rows: 3,
|
|
269
|
-
disabled:
|
|
302
|
+
disabled: T || F,
|
|
270
303
|
style: {
|
|
271
304
|
fontSize: "var(--font-size-body-sm)",
|
|
272
305
|
resize: "none"
|
|
273
306
|
}
|
|
274
307
|
})]
|
|
275
308
|
}),
|
|
276
|
-
/* @__PURE__ */
|
|
277
|
-
/* @__PURE__ */
|
|
309
|
+
/* @__PURE__ */ w("div", { children: [
|
|
310
|
+
/* @__PURE__ */ w("label", {
|
|
278
311
|
htmlFor: "dashboard-tags",
|
|
279
312
|
style: {
|
|
280
313
|
display: "flex",
|
|
@@ -286,12 +319,12 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
286
319
|
marginBottom: "var(--space-controlGap)"
|
|
287
320
|
},
|
|
288
321
|
children: [
|
|
289
|
-
/* @__PURE__ */
|
|
322
|
+
/* @__PURE__ */ C(u, { style: {
|
|
290
323
|
height: "var(--size-icon-sm)",
|
|
291
324
|
width: "var(--size-icon-sm)"
|
|
292
325
|
} }),
|
|
293
326
|
"Tags",
|
|
294
|
-
/* @__PURE__ */
|
|
327
|
+
/* @__PURE__ */ C("span", {
|
|
295
328
|
style: {
|
|
296
329
|
color: "var(--color-text-muted)",
|
|
297
330
|
fontWeight: "var(--font-weight-regular)"
|
|
@@ -300,14 +333,14 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
300
333
|
})
|
|
301
334
|
]
|
|
302
335
|
}),
|
|
303
|
-
|
|
336
|
+
U.length > 0 && /* @__PURE__ */ C("div", {
|
|
304
337
|
style: {
|
|
305
338
|
display: "flex",
|
|
306
339
|
flexWrap: "wrap",
|
|
307
340
|
gap: "var(--space-controlGap)",
|
|
308
341
|
marginBottom: "var(--space-controlGap)"
|
|
309
342
|
},
|
|
310
|
-
children:
|
|
343
|
+
children: U.map((e) => /* @__PURE__ */ w(f, {
|
|
311
344
|
variant: "secondary",
|
|
312
345
|
style: {
|
|
313
346
|
display: "flex",
|
|
@@ -315,10 +348,10 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
315
348
|
gap: "4px",
|
|
316
349
|
paddingRight: "4px"
|
|
317
350
|
},
|
|
318
|
-
children: [e, /* @__PURE__ */
|
|
351
|
+
children: [e, /* @__PURE__ */ C("button", {
|
|
319
352
|
type: "button",
|
|
320
|
-
onClick: () =>
|
|
321
|
-
disabled:
|
|
353
|
+
onClick: () => $(e),
|
|
354
|
+
disabled: T || F,
|
|
322
355
|
style: {
|
|
323
356
|
display: "flex",
|
|
324
357
|
alignItems: "center",
|
|
@@ -333,41 +366,41 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
333
366
|
},
|
|
334
367
|
onMouseOver: (e) => e.currentTarget.style.opacity = "1",
|
|
335
368
|
onMouseOut: (e) => e.currentTarget.style.opacity = "0.7",
|
|
336
|
-
children: /* @__PURE__ */
|
|
369
|
+
children: /* @__PURE__ */ C(d, { style: {
|
|
337
370
|
height: "12px",
|
|
338
371
|
width: "12px"
|
|
339
372
|
} })
|
|
340
373
|
})]
|
|
341
374
|
}, e))
|
|
342
375
|
}),
|
|
343
|
-
/* @__PURE__ */
|
|
376
|
+
/* @__PURE__ */ w("div", {
|
|
344
377
|
style: {
|
|
345
378
|
display: "flex",
|
|
346
379
|
gap: "var(--space-controlGap)"
|
|
347
380
|
},
|
|
348
|
-
children: [/* @__PURE__ */
|
|
381
|
+
children: [/* @__PURE__ */ C(b, {
|
|
349
382
|
id: "dashboard-tags",
|
|
350
383
|
type: "text",
|
|
351
|
-
value:
|
|
352
|
-
onChange: (e) =>
|
|
353
|
-
onKeyDown:
|
|
354
|
-
placeholder:
|
|
355
|
-
disabled:
|
|
384
|
+
value: G,
|
|
385
|
+
onChange: (e) => K(e.target.value),
|
|
386
|
+
onKeyDown: ee,
|
|
387
|
+
placeholder: U.length >= 10 ? "Max tags reached" : "Type a tag and press Enter",
|
|
388
|
+
disabled: T || F || U.length >= 10,
|
|
356
389
|
style: {
|
|
357
390
|
flex: 1,
|
|
358
391
|
height: "var(--size-controlHeight-md)",
|
|
359
392
|
fontSize: "var(--font-size-body-sm)"
|
|
360
393
|
}
|
|
361
|
-
}), /* @__PURE__ */
|
|
394
|
+
}), /* @__PURE__ */ C(p, {
|
|
362
395
|
type: "button",
|
|
363
396
|
variant: "outline",
|
|
364
|
-
onClick:
|
|
365
|
-
disabled:
|
|
397
|
+
onClick: Q,
|
|
398
|
+
disabled: T || F || !G.trim() || U.length >= 10,
|
|
366
399
|
style: { height: "var(--size-controlHeight-md)" },
|
|
367
400
|
children: "Add"
|
|
368
401
|
})]
|
|
369
402
|
}),
|
|
370
|
-
/* @__PURE__ */
|
|
403
|
+
/* @__PURE__ */ C("p", {
|
|
371
404
|
style: {
|
|
372
405
|
fontSize: "var(--font-size-body-xs)",
|
|
373
406
|
color: "var(--color-text-muted)",
|
|
@@ -378,7 +411,7 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
378
411
|
] })
|
|
379
412
|
]
|
|
380
413
|
}),
|
|
381
|
-
/* @__PURE__ */
|
|
414
|
+
/* @__PURE__ */ w(_, {
|
|
382
415
|
style: {
|
|
383
416
|
padding: "var(--space-formGap) var(--space-pagePadding)",
|
|
384
417
|
borderTop: "1px solid var(--color-border)",
|
|
@@ -387,37 +420,37 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
387
420
|
justifyContent: "flex-end",
|
|
388
421
|
gap: "var(--space-controlGap)"
|
|
389
422
|
},
|
|
390
|
-
children: [/* @__PURE__ */
|
|
423
|
+
children: [/* @__PURE__ */ C(p, {
|
|
391
424
|
type: "button",
|
|
392
425
|
variant: "outline",
|
|
393
|
-
onClick:
|
|
394
|
-
disabled:
|
|
426
|
+
onClick: E,
|
|
427
|
+
disabled: T || F,
|
|
395
428
|
style: { height: "var(--size-controlHeight-md)" },
|
|
396
429
|
children: "Cancel"
|
|
397
|
-
}), /* @__PURE__ */
|
|
430
|
+
}), /* @__PURE__ */ C(p, {
|
|
398
431
|
type: "submit",
|
|
399
|
-
disabled:
|
|
432
|
+
disabled: T || F || !z.trim(),
|
|
400
433
|
style: {
|
|
401
434
|
height: "var(--size-controlHeight-md)",
|
|
402
435
|
backgroundColor: "var(--color-action-primary-bg)"
|
|
403
436
|
},
|
|
404
|
-
children:
|
|
437
|
+
children: T || F ? /* @__PURE__ */ w("span", {
|
|
405
438
|
style: {
|
|
406
439
|
display: "flex",
|
|
407
440
|
alignItems: "center",
|
|
408
441
|
gap: "var(--space-iconGap)"
|
|
409
442
|
},
|
|
410
|
-
children: [/* @__PURE__ */
|
|
443
|
+
children: [/* @__PURE__ */ C(x, { style: {
|
|
411
444
|
height: "var(--size-icon-sm)",
|
|
412
445
|
width: "var(--size-icon-sm)"
|
|
413
446
|
} }), "Creating..."]
|
|
414
|
-
}) : /* @__PURE__ */
|
|
447
|
+
}) : /* @__PURE__ */ w("span", {
|
|
415
448
|
style: {
|
|
416
449
|
display: "flex",
|
|
417
450
|
alignItems: "center",
|
|
418
451
|
gap: "var(--space-iconGap)"
|
|
419
452
|
},
|
|
420
|
-
children: [/* @__PURE__ */
|
|
453
|
+
children: [/* @__PURE__ */ C(l, { style: {
|
|
421
454
|
height: "var(--size-icon-sm)",
|
|
422
455
|
width: "var(--size-icon-sm)"
|
|
423
456
|
} }), "Create Dashboard"]
|
|
@@ -430,6 +463,6 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
430
463
|
});
|
|
431
464
|
});
|
|
432
465
|
//#endregion
|
|
433
|
-
export {
|
|
466
|
+
export { T as default };
|
|
434
467
|
|
|
435
468
|
//# sourceMappingURL=CreateDashboardDialog.js.map
|