@burdenoff/microfe-bigconsole 2026.730.1 → 2026.730.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +160 -127
- package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +73 -68
- package/dist/bigconsole/components/dashboard/DashboardCanvas.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/TemplateSetupBanner.js +82 -0
- package/dist/bigconsole/components/dashboard/TemplateSetupBanner.js.map +1 -0
- package/dist/bigconsole/components/dashboard/index.js +1 -2
- package/dist/bigconsole/components/widgets/WidgetWrapper.js +2 -1
- package/dist/bigconsole/components/widgets/WidgetWrapper.js.map +1 -1
- package/dist/bigconsole/components/widgets/states/EmptyState.js +3 -3
- package/dist/bigconsole/components/widgets/states/EmptyState.js.map +1 -1
- 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,905 +1,3 @@
|
|
|
1
|
-
import e from "../../../hooks/useDashboardTemplates.js";
|
|
2
1
|
import "../../../hooks/index.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
//#region src/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.tsx
|
|
6
|
-
var o = {
|
|
7
|
-
ANALYTICS: "Analytics",
|
|
8
|
-
OPERATIONS: "Operations",
|
|
9
|
-
SALES: "Sales",
|
|
10
|
-
MARKETING: "Marketing",
|
|
11
|
-
FINANCE: "Finance",
|
|
12
|
-
HR: "Human Resources",
|
|
13
|
-
CUSTOM: "Custom"
|
|
14
|
-
}, s = {
|
|
15
|
-
BEGINNER: "#22c55e",
|
|
16
|
-
INTERMEDIATE: "#f59e0b",
|
|
17
|
-
ADVANCED: "#ef4444"
|
|
18
|
-
};
|
|
19
|
-
function c({ isOpen: c, onClose: f, onSelectTemplate: p, selectedTemplateId: m, onSelect: h, compact: g = !1 }) {
|
|
20
|
-
let { templates: _, featuredTemplates: v, categories: y, loading: b, fetchTemplates: x, fetchFeaturedTemplates: S, searchTemplates: C } = e(), [w, T] = r("grid"), [E, D] = r(""), [O, k] = r(""), [A, j] = r(""), [M, N] = r(null), [P, F] = r(!1), [I, L] = r(""), [R, z] = r({}), B = g || c;
|
|
21
|
-
n(() => {
|
|
22
|
-
B && (x(), S());
|
|
23
|
-
}, [
|
|
24
|
-
B,
|
|
25
|
-
x,
|
|
26
|
-
S
|
|
27
|
-
]), n(() => {
|
|
28
|
-
if (E) {
|
|
29
|
-
let e = setTimeout(() => {
|
|
30
|
-
C(E, O || void 0, A || void 0);
|
|
31
|
-
}, 300);
|
|
32
|
-
return () => clearTimeout(e);
|
|
33
|
-
} else B && x({
|
|
34
|
-
category: O || void 0,
|
|
35
|
-
complexity: A || void 0
|
|
36
|
-
});
|
|
37
|
-
}, [
|
|
38
|
-
E,
|
|
39
|
-
O,
|
|
40
|
-
A,
|
|
41
|
-
B,
|
|
42
|
-
C,
|
|
43
|
-
x
|
|
44
|
-
]);
|
|
45
|
-
let V = t((e) => {
|
|
46
|
-
if (g && h) {
|
|
47
|
-
h(e);
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
N(e), L(`${e.name} Dashboard`), F(!0);
|
|
51
|
-
}, [g, h]), H = t(async () => {
|
|
52
|
-
!M || !I.trim() || (p?.(M.id, I.trim(), R), F(!1), N(null), L(""), z({}), f?.());
|
|
53
|
-
}, [
|
|
54
|
-
M,
|
|
55
|
-
I,
|
|
56
|
-
R,
|
|
57
|
-
p,
|
|
58
|
-
f
|
|
59
|
-
]), U = (e, t) => e ? /* @__PURE__ */ a("div", {
|
|
60
|
-
style: {
|
|
61
|
-
display: "flex",
|
|
62
|
-
alignItems: "center",
|
|
63
|
-
gap: "4px"
|
|
64
|
-
},
|
|
65
|
-
children: [/* @__PURE__ */ i("span", {
|
|
66
|
-
style: { color: "#f59e0b" },
|
|
67
|
-
children: "★"
|
|
68
|
-
}), /* @__PURE__ */ a("span", {
|
|
69
|
-
style: {
|
|
70
|
-
fontSize: "12px",
|
|
71
|
-
color: "var(--text-secondary)"
|
|
72
|
-
},
|
|
73
|
-
children: [
|
|
74
|
-
e.toFixed(1),
|
|
75
|
-
" (",
|
|
76
|
-
t,
|
|
77
|
-
")"
|
|
78
|
-
]
|
|
79
|
-
})]
|
|
80
|
-
}) : null;
|
|
81
|
-
if (!B) return null;
|
|
82
|
-
let W = E || O || A ? _ : v;
|
|
83
|
-
return g ? /* @__PURE__ */ a("div", { children: [/* @__PURE__ */ a("div", {
|
|
84
|
-
style: {
|
|
85
|
-
display: "flex",
|
|
86
|
-
gap: "8px",
|
|
87
|
-
marginBottom: "12px",
|
|
88
|
-
flexWrap: "wrap"
|
|
89
|
-
},
|
|
90
|
-
children: [/* @__PURE__ */ i("input", {
|
|
91
|
-
type: "text",
|
|
92
|
-
value: E,
|
|
93
|
-
onChange: (e) => D(e.target.value),
|
|
94
|
-
placeholder: "Search templates...",
|
|
95
|
-
style: {
|
|
96
|
-
flex: "1 1 150px",
|
|
97
|
-
padding: "6px 10px",
|
|
98
|
-
border: "1px solid var(--border-color)",
|
|
99
|
-
borderRadius: "4px",
|
|
100
|
-
fontSize: "12px"
|
|
101
|
-
}
|
|
102
|
-
}), /* @__PURE__ */ a("select", {
|
|
103
|
-
value: O,
|
|
104
|
-
onChange: (e) => k(e.target.value),
|
|
105
|
-
style: {
|
|
106
|
-
padding: "6px 10px",
|
|
107
|
-
border: "1px solid var(--border-color)",
|
|
108
|
-
borderRadius: "4px",
|
|
109
|
-
fontSize: "12px",
|
|
110
|
-
backgroundColor: "var(--bg-primary)"
|
|
111
|
-
},
|
|
112
|
-
children: [/* @__PURE__ */ i("option", {
|
|
113
|
-
value: "",
|
|
114
|
-
children: "All Categories"
|
|
115
|
-
}), y.map((e) => /* @__PURE__ */ i("option", {
|
|
116
|
-
value: e,
|
|
117
|
-
children: o[e]
|
|
118
|
-
}, e))]
|
|
119
|
-
})]
|
|
120
|
-
}), b && W.length === 0 ? /* @__PURE__ */ i("div", {
|
|
121
|
-
style: {
|
|
122
|
-
textAlign: "center",
|
|
123
|
-
padding: "20px",
|
|
124
|
-
color: "var(--text-secondary)",
|
|
125
|
-
fontSize: "13px"
|
|
126
|
-
},
|
|
127
|
-
children: "Loading templates..."
|
|
128
|
-
}) : W.length === 0 ? /* @__PURE__ */ i("div", {
|
|
129
|
-
style: {
|
|
130
|
-
textAlign: "center",
|
|
131
|
-
padding: "20px",
|
|
132
|
-
color: "var(--text-secondary)",
|
|
133
|
-
fontSize: "13px"
|
|
134
|
-
},
|
|
135
|
-
children: "No templates found"
|
|
136
|
-
}) : /* @__PURE__ */ i("div", {
|
|
137
|
-
style: {
|
|
138
|
-
display: "grid",
|
|
139
|
-
gridTemplateColumns: "repeat(auto-fill, minmax(min(200px, 100%), 1fr))",
|
|
140
|
-
gap: "12px"
|
|
141
|
-
},
|
|
142
|
-
children: W.map((e) => /* @__PURE__ */ i(d, {
|
|
143
|
-
template: e,
|
|
144
|
-
isSelected: m === e.id,
|
|
145
|
-
onSelect: () => V(e)
|
|
146
|
-
}, e.id))
|
|
147
|
-
})] }) : /* @__PURE__ */ a("div", {
|
|
148
|
-
style: {
|
|
149
|
-
position: "fixed",
|
|
150
|
-
top: 0,
|
|
151
|
-
left: 0,
|
|
152
|
-
right: 0,
|
|
153
|
-
bottom: 0,
|
|
154
|
-
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
155
|
-
display: "flex",
|
|
156
|
-
alignItems: "center",
|
|
157
|
-
justifyContent: "center",
|
|
158
|
-
zIndex: 9999
|
|
159
|
-
},
|
|
160
|
-
onClick: f,
|
|
161
|
-
children: [/* @__PURE__ */ a("div", {
|
|
162
|
-
style: {
|
|
163
|
-
width: "90%",
|
|
164
|
-
maxWidth: "1000px",
|
|
165
|
-
maxHeight: "85vh",
|
|
166
|
-
backgroundColor: "var(--bg-primary)",
|
|
167
|
-
borderRadius: "12px",
|
|
168
|
-
boxShadow: "0 8px 32px rgba(0, 0, 0, 0.2)",
|
|
169
|
-
overflow: "hidden",
|
|
170
|
-
display: "flex",
|
|
171
|
-
flexDirection: "column"
|
|
172
|
-
},
|
|
173
|
-
onClick: (e) => e.stopPropagation(),
|
|
174
|
-
children: [
|
|
175
|
-
/* @__PURE__ */ a("div", {
|
|
176
|
-
style: {
|
|
177
|
-
padding: "20px 24px",
|
|
178
|
-
borderBottom: "1px solid var(--border-color)",
|
|
179
|
-
display: "flex",
|
|
180
|
-
alignItems: "center",
|
|
181
|
-
justifyContent: "space-between"
|
|
182
|
-
},
|
|
183
|
-
children: [/* @__PURE__ */ a("div", { children: [/* @__PURE__ */ i("h2", {
|
|
184
|
-
style: {
|
|
185
|
-
margin: 0,
|
|
186
|
-
fontSize: "20px",
|
|
187
|
-
fontWeight: 600
|
|
188
|
-
},
|
|
189
|
-
children: "Choose a Template"
|
|
190
|
-
}), /* @__PURE__ */ i("p", {
|
|
191
|
-
style: {
|
|
192
|
-
margin: "4px 0 0",
|
|
193
|
-
fontSize: "13px",
|
|
194
|
-
color: "var(--text-secondary)"
|
|
195
|
-
},
|
|
196
|
-
children: "Start with a pre-built dashboard template"
|
|
197
|
-
})] }), /* @__PURE__ */ i("button", {
|
|
198
|
-
onClick: f,
|
|
199
|
-
style: {
|
|
200
|
-
background: "none",
|
|
201
|
-
border: "none",
|
|
202
|
-
fontSize: "24px",
|
|
203
|
-
cursor: "pointer",
|
|
204
|
-
color: "var(--text-secondary)"
|
|
205
|
-
},
|
|
206
|
-
children: "x"
|
|
207
|
-
})]
|
|
208
|
-
}),
|
|
209
|
-
/* @__PURE__ */ a("div", {
|
|
210
|
-
style: {
|
|
211
|
-
padding: "16px 24px",
|
|
212
|
-
borderBottom: "1px solid var(--border-color)",
|
|
213
|
-
display: "flex",
|
|
214
|
-
gap: "12px",
|
|
215
|
-
alignItems: "center",
|
|
216
|
-
flexWrap: "wrap"
|
|
217
|
-
},
|
|
218
|
-
children: [
|
|
219
|
-
/* @__PURE__ */ i("input", {
|
|
220
|
-
type: "text",
|
|
221
|
-
value: E,
|
|
222
|
-
onChange: (e) => D(e.target.value),
|
|
223
|
-
placeholder: "Search templates...",
|
|
224
|
-
style: {
|
|
225
|
-
flex: "1 1 200px",
|
|
226
|
-
padding: "8px 12px",
|
|
227
|
-
border: "1px solid var(--border-color)",
|
|
228
|
-
borderRadius: "6px",
|
|
229
|
-
fontSize: "13px"
|
|
230
|
-
}
|
|
231
|
-
}),
|
|
232
|
-
/* @__PURE__ */ a("select", {
|
|
233
|
-
value: O,
|
|
234
|
-
onChange: (e) => k(e.target.value),
|
|
235
|
-
style: {
|
|
236
|
-
padding: "8px 12px",
|
|
237
|
-
border: "1px solid var(--border-color)",
|
|
238
|
-
borderRadius: "6px",
|
|
239
|
-
fontSize: "13px",
|
|
240
|
-
backgroundColor: "var(--bg-primary)"
|
|
241
|
-
},
|
|
242
|
-
children: [/* @__PURE__ */ i("option", {
|
|
243
|
-
value: "",
|
|
244
|
-
children: "All Categories"
|
|
245
|
-
}), y.map((e) => /* @__PURE__ */ i("option", {
|
|
246
|
-
value: e,
|
|
247
|
-
children: o[e]
|
|
248
|
-
}, e))]
|
|
249
|
-
}),
|
|
250
|
-
/* @__PURE__ */ a("select", {
|
|
251
|
-
value: A,
|
|
252
|
-
onChange: (e) => j(e.target.value),
|
|
253
|
-
style: {
|
|
254
|
-
padding: "8px 12px",
|
|
255
|
-
border: "1px solid var(--border-color)",
|
|
256
|
-
borderRadius: "6px",
|
|
257
|
-
fontSize: "13px",
|
|
258
|
-
backgroundColor: "var(--bg-primary)"
|
|
259
|
-
},
|
|
260
|
-
children: [
|
|
261
|
-
/* @__PURE__ */ i("option", {
|
|
262
|
-
value: "",
|
|
263
|
-
children: "All Levels"
|
|
264
|
-
}),
|
|
265
|
-
/* @__PURE__ */ i("option", {
|
|
266
|
-
value: "BEGINNER",
|
|
267
|
-
children: "Beginner"
|
|
268
|
-
}),
|
|
269
|
-
/* @__PURE__ */ i("option", {
|
|
270
|
-
value: "INTERMEDIATE",
|
|
271
|
-
children: "Intermediate"
|
|
272
|
-
}),
|
|
273
|
-
/* @__PURE__ */ i("option", {
|
|
274
|
-
value: "ADVANCED",
|
|
275
|
-
children: "Advanced"
|
|
276
|
-
})
|
|
277
|
-
]
|
|
278
|
-
}),
|
|
279
|
-
/* @__PURE__ */ a("div", {
|
|
280
|
-
style: {
|
|
281
|
-
display: "flex",
|
|
282
|
-
border: "1px solid var(--border-color)",
|
|
283
|
-
borderRadius: "6px"
|
|
284
|
-
},
|
|
285
|
-
children: [/* @__PURE__ */ i("button", {
|
|
286
|
-
onClick: () => T("grid"),
|
|
287
|
-
style: {
|
|
288
|
-
padding: "8px 12px",
|
|
289
|
-
backgroundColor: w === "grid" ? "var(--bg-secondary)" : "transparent",
|
|
290
|
-
border: "none",
|
|
291
|
-
cursor: "pointer",
|
|
292
|
-
fontSize: "13px"
|
|
293
|
-
},
|
|
294
|
-
children: "Grid"
|
|
295
|
-
}), /* @__PURE__ */ i("button", {
|
|
296
|
-
onClick: () => T("list"),
|
|
297
|
-
style: {
|
|
298
|
-
padding: "8px 12px",
|
|
299
|
-
backgroundColor: w === "list" ? "var(--bg-secondary)" : "transparent",
|
|
300
|
-
border: "none",
|
|
301
|
-
cursor: "pointer",
|
|
302
|
-
fontSize: "13px"
|
|
303
|
-
},
|
|
304
|
-
children: "List"
|
|
305
|
-
})]
|
|
306
|
-
})
|
|
307
|
-
]
|
|
308
|
-
}),
|
|
309
|
-
/* @__PURE__ */ i("div", {
|
|
310
|
-
style: {
|
|
311
|
-
flex: 1,
|
|
312
|
-
overflowY: "auto",
|
|
313
|
-
padding: "24px"
|
|
314
|
-
},
|
|
315
|
-
children: b && W.length === 0 ? /* @__PURE__ */ i("div", {
|
|
316
|
-
style: {
|
|
317
|
-
textAlign: "center",
|
|
318
|
-
padding: "40px",
|
|
319
|
-
color: "var(--text-secondary)"
|
|
320
|
-
},
|
|
321
|
-
children: "Loading templates..."
|
|
322
|
-
}) : W.length === 0 ? /* @__PURE__ */ i("div", {
|
|
323
|
-
style: {
|
|
324
|
-
textAlign: "center",
|
|
325
|
-
padding: "40px",
|
|
326
|
-
color: "var(--text-secondary)"
|
|
327
|
-
},
|
|
328
|
-
children: "No templates found. Try adjusting your filters."
|
|
329
|
-
}) : w === "grid" ? /* @__PURE__ */ i("div", {
|
|
330
|
-
style: {
|
|
331
|
-
display: "grid",
|
|
332
|
-
gridTemplateColumns: "repeat(auto-fill, minmax(280px, 1fr))",
|
|
333
|
-
gap: "20px"
|
|
334
|
-
},
|
|
335
|
-
children: W.map((e) => /* @__PURE__ */ i(l, {
|
|
336
|
-
template: e,
|
|
337
|
-
onSelect: () => V(e),
|
|
338
|
-
renderRating: U
|
|
339
|
-
}, e.id))
|
|
340
|
-
}) : /* @__PURE__ */ i("div", {
|
|
341
|
-
style: {
|
|
342
|
-
display: "flex",
|
|
343
|
-
flexDirection: "column",
|
|
344
|
-
gap: "12px"
|
|
345
|
-
},
|
|
346
|
-
children: W.map((e) => /* @__PURE__ */ i(u, {
|
|
347
|
-
template: e,
|
|
348
|
-
onSelect: () => V(e),
|
|
349
|
-
renderRating: U
|
|
350
|
-
}, e.id))
|
|
351
|
-
})
|
|
352
|
-
}),
|
|
353
|
-
/* @__PURE__ */ a("div", {
|
|
354
|
-
style: {
|
|
355
|
-
padding: "16px 24px",
|
|
356
|
-
borderTop: "1px solid var(--border-color)",
|
|
357
|
-
display: "flex",
|
|
358
|
-
justifyContent: "space-between",
|
|
359
|
-
alignItems: "center"
|
|
360
|
-
},
|
|
361
|
-
children: [/* @__PURE__ */ a("span", {
|
|
362
|
-
style: {
|
|
363
|
-
fontSize: "13px",
|
|
364
|
-
color: "var(--text-secondary)"
|
|
365
|
-
},
|
|
366
|
-
children: [W.length, " templates available"]
|
|
367
|
-
}), /* @__PURE__ */ i("button", {
|
|
368
|
-
onClick: f,
|
|
369
|
-
style: {
|
|
370
|
-
padding: "10px 20px",
|
|
371
|
-
backgroundColor: "transparent",
|
|
372
|
-
border: "1px solid var(--border-color)",
|
|
373
|
-
borderRadius: "6px",
|
|
374
|
-
cursor: "pointer",
|
|
375
|
-
fontSize: "14px"
|
|
376
|
-
},
|
|
377
|
-
children: "Cancel"
|
|
378
|
-
})]
|
|
379
|
-
})
|
|
380
|
-
]
|
|
381
|
-
}), P && M && /* @__PURE__ */ i("div", {
|
|
382
|
-
style: {
|
|
383
|
-
position: "fixed",
|
|
384
|
-
top: 0,
|
|
385
|
-
left: 0,
|
|
386
|
-
right: 0,
|
|
387
|
-
bottom: 0,
|
|
388
|
-
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
389
|
-
display: "flex",
|
|
390
|
-
alignItems: "center",
|
|
391
|
-
justifyContent: "center",
|
|
392
|
-
zIndex: 1e4
|
|
393
|
-
},
|
|
394
|
-
onClick: () => F(!1),
|
|
395
|
-
children: /* @__PURE__ */ a("div", {
|
|
396
|
-
style: {
|
|
397
|
-
width: "500px",
|
|
398
|
-
backgroundColor: "var(--bg-primary)",
|
|
399
|
-
borderRadius: "12px",
|
|
400
|
-
boxShadow: "0 8px 32px rgba(0, 0, 0, 0.2)",
|
|
401
|
-
overflow: "hidden"
|
|
402
|
-
},
|
|
403
|
-
onClick: (e) => e.stopPropagation(),
|
|
404
|
-
children: [
|
|
405
|
-
/* @__PURE__ */ a("div", {
|
|
406
|
-
style: {
|
|
407
|
-
padding: "20px 24px",
|
|
408
|
-
borderBottom: "1px solid var(--border-color)"
|
|
409
|
-
},
|
|
410
|
-
children: [/* @__PURE__ */ i("h3", {
|
|
411
|
-
style: {
|
|
412
|
-
margin: 0,
|
|
413
|
-
fontSize: "18px",
|
|
414
|
-
fontWeight: 600
|
|
415
|
-
},
|
|
416
|
-
children: "Create from Template"
|
|
417
|
-
}), /* @__PURE__ */ i("p", {
|
|
418
|
-
style: {
|
|
419
|
-
margin: "4px 0 0",
|
|
420
|
-
fontSize: "13px",
|
|
421
|
-
color: "var(--text-secondary)"
|
|
422
|
-
},
|
|
423
|
-
children: M.name
|
|
424
|
-
})]
|
|
425
|
-
}),
|
|
426
|
-
/* @__PURE__ */ a("div", {
|
|
427
|
-
style: { padding: "24px" },
|
|
428
|
-
children: [/* @__PURE__ */ a("div", {
|
|
429
|
-
style: { marginBottom: "20px" },
|
|
430
|
-
children: [/* @__PURE__ */ i("label", {
|
|
431
|
-
style: {
|
|
432
|
-
display: "block",
|
|
433
|
-
marginBottom: "8px",
|
|
434
|
-
fontSize: "13px",
|
|
435
|
-
fontWeight: 500
|
|
436
|
-
},
|
|
437
|
-
children: "Dashboard Name *"
|
|
438
|
-
}), /* @__PURE__ */ i("input", {
|
|
439
|
-
type: "text",
|
|
440
|
-
value: I,
|
|
441
|
-
onChange: (e) => L(e.target.value),
|
|
442
|
-
placeholder: "Enter dashboard name...",
|
|
443
|
-
style: {
|
|
444
|
-
width: "100%",
|
|
445
|
-
padding: "10px 12px",
|
|
446
|
-
border: "1px solid var(--border-color)",
|
|
447
|
-
borderRadius: "6px",
|
|
448
|
-
fontSize: "14px"
|
|
449
|
-
}
|
|
450
|
-
})]
|
|
451
|
-
}), /* @__PURE__ */ a("div", {
|
|
452
|
-
style: {
|
|
453
|
-
padding: "16px",
|
|
454
|
-
backgroundColor: "var(--bg-secondary)",
|
|
455
|
-
borderRadius: "8px"
|
|
456
|
-
},
|
|
457
|
-
children: [/* @__PURE__ */ i("div", {
|
|
458
|
-
style: {
|
|
459
|
-
fontSize: "13px",
|
|
460
|
-
color: "var(--text-secondary)",
|
|
461
|
-
marginBottom: "8px"
|
|
462
|
-
},
|
|
463
|
-
children: "Template Details"
|
|
464
|
-
}), /* @__PURE__ */ a("div", {
|
|
465
|
-
style: {
|
|
466
|
-
display: "flex",
|
|
467
|
-
flexWrap: "wrap",
|
|
468
|
-
gap: "16px"
|
|
469
|
-
},
|
|
470
|
-
children: [
|
|
471
|
-
/* @__PURE__ */ a("div", { children: [/* @__PURE__ */ i("div", {
|
|
472
|
-
style: {
|
|
473
|
-
fontSize: "11px",
|
|
474
|
-
color: "var(--text-tertiary)"
|
|
475
|
-
},
|
|
476
|
-
children: "Category"
|
|
477
|
-
}), /* @__PURE__ */ i("div", {
|
|
478
|
-
style: { fontSize: "13px" },
|
|
479
|
-
children: o[M.category]
|
|
480
|
-
})] }),
|
|
481
|
-
/* @__PURE__ */ a("div", { children: [/* @__PURE__ */ i("div", {
|
|
482
|
-
style: {
|
|
483
|
-
fontSize: "11px",
|
|
484
|
-
color: "var(--text-tertiary)"
|
|
485
|
-
},
|
|
486
|
-
children: "Complexity"
|
|
487
|
-
}), /* @__PURE__ */ i("div", {
|
|
488
|
-
style: {
|
|
489
|
-
fontSize: "13px",
|
|
490
|
-
color: s[M.complexity]
|
|
491
|
-
},
|
|
492
|
-
children: M.complexity
|
|
493
|
-
})] }),
|
|
494
|
-
/* @__PURE__ */ a("div", { children: [/* @__PURE__ */ i("div", {
|
|
495
|
-
style: {
|
|
496
|
-
fontSize: "11px",
|
|
497
|
-
color: "var(--text-tertiary)"
|
|
498
|
-
},
|
|
499
|
-
children: "Used"
|
|
500
|
-
}), /* @__PURE__ */ a("div", {
|
|
501
|
-
style: { fontSize: "13px" },
|
|
502
|
-
children: [M.usageCount, " times"]
|
|
503
|
-
})] })
|
|
504
|
-
]
|
|
505
|
-
})]
|
|
506
|
-
})]
|
|
507
|
-
}),
|
|
508
|
-
/* @__PURE__ */ a("div", {
|
|
509
|
-
style: {
|
|
510
|
-
padding: "16px 24px",
|
|
511
|
-
borderTop: "1px solid var(--border-color)",
|
|
512
|
-
display: "flex",
|
|
513
|
-
justifyContent: "flex-end",
|
|
514
|
-
gap: "12px"
|
|
515
|
-
},
|
|
516
|
-
children: [/* @__PURE__ */ i("button", {
|
|
517
|
-
onClick: () => F(!1),
|
|
518
|
-
style: {
|
|
519
|
-
padding: "10px 20px",
|
|
520
|
-
backgroundColor: "transparent",
|
|
521
|
-
border: "1px solid var(--border-color)",
|
|
522
|
-
borderRadius: "6px",
|
|
523
|
-
cursor: "pointer",
|
|
524
|
-
fontSize: "14px"
|
|
525
|
-
},
|
|
526
|
-
children: "Cancel"
|
|
527
|
-
}), /* @__PURE__ */ i("button", {
|
|
528
|
-
onClick: H,
|
|
529
|
-
disabled: !I.trim(),
|
|
530
|
-
style: {
|
|
531
|
-
padding: "10px 20px",
|
|
532
|
-
backgroundColor: I.trim() ? "var(--primary)" : "var(--bg-tertiary)",
|
|
533
|
-
color: I.trim() ? "white" : "var(--text-secondary)",
|
|
534
|
-
border: "none",
|
|
535
|
-
borderRadius: "6px",
|
|
536
|
-
cursor: I.trim() ? "pointer" : "not-allowed",
|
|
537
|
-
fontSize: "14px",
|
|
538
|
-
fontWeight: 500
|
|
539
|
-
},
|
|
540
|
-
children: "Create Dashboard"
|
|
541
|
-
})]
|
|
542
|
-
})
|
|
543
|
-
]
|
|
544
|
-
})
|
|
545
|
-
})]
|
|
546
|
-
});
|
|
547
|
-
}
|
|
548
|
-
function l({ template: e, onSelect: t, renderRating: n }) {
|
|
549
|
-
return /* @__PURE__ */ a("div", {
|
|
550
|
-
onClick: t,
|
|
551
|
-
style: {
|
|
552
|
-
backgroundColor: "var(--bg-secondary)",
|
|
553
|
-
border: "1px solid var(--border-color)",
|
|
554
|
-
borderRadius: "10px",
|
|
555
|
-
overflow: "hidden",
|
|
556
|
-
cursor: "pointer",
|
|
557
|
-
transition: "transform 0.15s, box-shadow 0.15s"
|
|
558
|
-
},
|
|
559
|
-
onMouseOver: (e) => {
|
|
560
|
-
e.currentTarget.style.transform = "translateY(-2px)", e.currentTarget.style.boxShadow = "0 4px 12px rgba(0,0,0,0.1)";
|
|
561
|
-
},
|
|
562
|
-
onMouseOut: (e) => {
|
|
563
|
-
e.currentTarget.style.transform = "none", e.currentTarget.style.boxShadow = "none";
|
|
564
|
-
},
|
|
565
|
-
children: [/* @__PURE__ */ i("div", {
|
|
566
|
-
style: {
|
|
567
|
-
height: "140px",
|
|
568
|
-
backgroundColor: "var(--bg-tertiary)",
|
|
569
|
-
display: "flex",
|
|
570
|
-
alignItems: "center",
|
|
571
|
-
justifyContent: "center",
|
|
572
|
-
borderBottom: "1px solid var(--border-color)"
|
|
573
|
-
},
|
|
574
|
-
children: e.previewUrl ? /* @__PURE__ */ i("img", {
|
|
575
|
-
src: e.previewUrl,
|
|
576
|
-
alt: e.name,
|
|
577
|
-
style: {
|
|
578
|
-
width: "100%",
|
|
579
|
-
height: "100%",
|
|
580
|
-
objectFit: "cover"
|
|
581
|
-
}
|
|
582
|
-
}) : /* @__PURE__ */ i("span", {
|
|
583
|
-
style: {
|
|
584
|
-
fontSize: "40px",
|
|
585
|
-
color: "var(--text-tertiary)"
|
|
586
|
-
},
|
|
587
|
-
children: "📊"
|
|
588
|
-
})
|
|
589
|
-
}), /* @__PURE__ */ a("div", {
|
|
590
|
-
style: { padding: "16px" },
|
|
591
|
-
children: [
|
|
592
|
-
/* @__PURE__ */ a("div", {
|
|
593
|
-
style: {
|
|
594
|
-
display: "flex",
|
|
595
|
-
alignItems: "flex-start",
|
|
596
|
-
justifyContent: "space-between",
|
|
597
|
-
gap: "8px"
|
|
598
|
-
},
|
|
599
|
-
children: [/* @__PURE__ */ i("h3", {
|
|
600
|
-
style: {
|
|
601
|
-
margin: 0,
|
|
602
|
-
fontSize: "14px",
|
|
603
|
-
fontWeight: 600,
|
|
604
|
-
lineHeight: "1.3"
|
|
605
|
-
},
|
|
606
|
-
children: e.name
|
|
607
|
-
}), e.isFeatured && /* @__PURE__ */ i("span", {
|
|
608
|
-
style: {
|
|
609
|
-
fontSize: "9px",
|
|
610
|
-
padding: "2px 6px",
|
|
611
|
-
backgroundColor: "#fef3c7",
|
|
612
|
-
color: "#92400e",
|
|
613
|
-
borderRadius: "4px",
|
|
614
|
-
fontWeight: 600,
|
|
615
|
-
flexShrink: 0
|
|
616
|
-
},
|
|
617
|
-
children: "FEATURED"
|
|
618
|
-
})]
|
|
619
|
-
}),
|
|
620
|
-
e.description && /* @__PURE__ */ i("p", {
|
|
621
|
-
style: {
|
|
622
|
-
margin: "8px 0 0",
|
|
623
|
-
fontSize: "12px",
|
|
624
|
-
color: "var(--text-secondary)",
|
|
625
|
-
lineHeight: "1.4",
|
|
626
|
-
display: "-webkit-box",
|
|
627
|
-
WebkitLineClamp: 2,
|
|
628
|
-
WebkitBoxOrient: "vertical",
|
|
629
|
-
overflow: "hidden"
|
|
630
|
-
},
|
|
631
|
-
children: e.description
|
|
632
|
-
}),
|
|
633
|
-
/* @__PURE__ */ a("div", {
|
|
634
|
-
style: {
|
|
635
|
-
display: "flex",
|
|
636
|
-
alignItems: "center",
|
|
637
|
-
gap: "8px",
|
|
638
|
-
marginTop: "12px",
|
|
639
|
-
flexWrap: "wrap"
|
|
640
|
-
},
|
|
641
|
-
children: [
|
|
642
|
-
/* @__PURE__ */ i("span", {
|
|
643
|
-
style: {
|
|
644
|
-
fontSize: "10px",
|
|
645
|
-
padding: "2px 6px",
|
|
646
|
-
backgroundColor: "var(--bg-tertiary)",
|
|
647
|
-
borderRadius: "4px",
|
|
648
|
-
color: "var(--text-secondary)"
|
|
649
|
-
},
|
|
650
|
-
children: o[e.category]
|
|
651
|
-
}),
|
|
652
|
-
/* @__PURE__ */ i("span", {
|
|
653
|
-
style: {
|
|
654
|
-
fontSize: "10px",
|
|
655
|
-
padding: "2px 6px",
|
|
656
|
-
backgroundColor: `${s[e.complexity]}20`,
|
|
657
|
-
color: s[e.complexity],
|
|
658
|
-
borderRadius: "4px",
|
|
659
|
-
fontWeight: 500
|
|
660
|
-
},
|
|
661
|
-
children: e.complexity
|
|
662
|
-
}),
|
|
663
|
-
n(e.rating, e.ratingCount)
|
|
664
|
-
]
|
|
665
|
-
})
|
|
666
|
-
]
|
|
667
|
-
})]
|
|
668
|
-
});
|
|
669
|
-
}
|
|
670
|
-
function u({ template: e, onSelect: t, renderRating: n }) {
|
|
671
|
-
return /* @__PURE__ */ a("div", {
|
|
672
|
-
onClick: t,
|
|
673
|
-
style: {
|
|
674
|
-
display: "flex",
|
|
675
|
-
alignItems: "center",
|
|
676
|
-
gap: "16px",
|
|
677
|
-
padding: "16px",
|
|
678
|
-
backgroundColor: "var(--bg-secondary)",
|
|
679
|
-
border: "1px solid var(--border-color)",
|
|
680
|
-
borderRadius: "8px",
|
|
681
|
-
cursor: "pointer",
|
|
682
|
-
transition: "background-color 0.15s"
|
|
683
|
-
},
|
|
684
|
-
children: [
|
|
685
|
-
/* @__PURE__ */ i("div", {
|
|
686
|
-
style: {
|
|
687
|
-
width: "80px",
|
|
688
|
-
height: "60px",
|
|
689
|
-
backgroundColor: "var(--bg-tertiary)",
|
|
690
|
-
borderRadius: "6px",
|
|
691
|
-
display: "flex",
|
|
692
|
-
alignItems: "center",
|
|
693
|
-
justifyContent: "center",
|
|
694
|
-
flexShrink: 0
|
|
695
|
-
},
|
|
696
|
-
children: e.previewUrl ? /* @__PURE__ */ i("img", {
|
|
697
|
-
src: e.previewUrl,
|
|
698
|
-
alt: e.name,
|
|
699
|
-
style: {
|
|
700
|
-
width: "100%",
|
|
701
|
-
height: "100%",
|
|
702
|
-
objectFit: "cover",
|
|
703
|
-
borderRadius: "6px"
|
|
704
|
-
}
|
|
705
|
-
}) : /* @__PURE__ */ i("span", {
|
|
706
|
-
style: {
|
|
707
|
-
fontSize: "24px",
|
|
708
|
-
color: "var(--text-tertiary)"
|
|
709
|
-
},
|
|
710
|
-
children: "📊"
|
|
711
|
-
})
|
|
712
|
-
}),
|
|
713
|
-
/* @__PURE__ */ a("div", {
|
|
714
|
-
style: {
|
|
715
|
-
flex: 1,
|
|
716
|
-
minWidth: 0
|
|
717
|
-
},
|
|
718
|
-
children: [
|
|
719
|
-
/* @__PURE__ */ a("div", {
|
|
720
|
-
style: {
|
|
721
|
-
display: "flex",
|
|
722
|
-
alignItems: "center",
|
|
723
|
-
gap: "8px"
|
|
724
|
-
},
|
|
725
|
-
children: [/* @__PURE__ */ i("h3", {
|
|
726
|
-
style: {
|
|
727
|
-
margin: 0,
|
|
728
|
-
fontSize: "14px",
|
|
729
|
-
fontWeight: 600
|
|
730
|
-
},
|
|
731
|
-
children: e.name
|
|
732
|
-
}), e.isFeatured && /* @__PURE__ */ i("span", {
|
|
733
|
-
style: {
|
|
734
|
-
fontSize: "9px",
|
|
735
|
-
padding: "2px 6px",
|
|
736
|
-
backgroundColor: "#fef3c7",
|
|
737
|
-
color: "#92400e",
|
|
738
|
-
borderRadius: "4px",
|
|
739
|
-
fontWeight: 600
|
|
740
|
-
},
|
|
741
|
-
children: "FEATURED"
|
|
742
|
-
})]
|
|
743
|
-
}),
|
|
744
|
-
e.description && /* @__PURE__ */ i("p", {
|
|
745
|
-
style: {
|
|
746
|
-
margin: "4px 0 0",
|
|
747
|
-
fontSize: "12px",
|
|
748
|
-
color: "var(--text-secondary)",
|
|
749
|
-
whiteSpace: "nowrap",
|
|
750
|
-
overflow: "hidden",
|
|
751
|
-
textOverflow: "ellipsis"
|
|
752
|
-
},
|
|
753
|
-
children: e.description
|
|
754
|
-
}),
|
|
755
|
-
/* @__PURE__ */ a("div", {
|
|
756
|
-
style: {
|
|
757
|
-
display: "flex",
|
|
758
|
-
alignItems: "center",
|
|
759
|
-
gap: "8px",
|
|
760
|
-
marginTop: "8px"
|
|
761
|
-
},
|
|
762
|
-
children: [
|
|
763
|
-
/* @__PURE__ */ i("span", {
|
|
764
|
-
style: {
|
|
765
|
-
fontSize: "10px",
|
|
766
|
-
padding: "2px 6px",
|
|
767
|
-
backgroundColor: "var(--bg-tertiary)",
|
|
768
|
-
borderRadius: "4px"
|
|
769
|
-
},
|
|
770
|
-
children: o[e.category]
|
|
771
|
-
}),
|
|
772
|
-
/* @__PURE__ */ i("span", {
|
|
773
|
-
style: {
|
|
774
|
-
fontSize: "10px",
|
|
775
|
-
padding: "2px 6px",
|
|
776
|
-
backgroundColor: `${s[e.complexity]}20`,
|
|
777
|
-
color: s[e.complexity],
|
|
778
|
-
borderRadius: "4px"
|
|
779
|
-
},
|
|
780
|
-
children: e.complexity
|
|
781
|
-
}),
|
|
782
|
-
n(e.rating, e.ratingCount),
|
|
783
|
-
/* @__PURE__ */ a("span", {
|
|
784
|
-
style: {
|
|
785
|
-
fontSize: "11px",
|
|
786
|
-
color: "var(--text-tertiary)"
|
|
787
|
-
},
|
|
788
|
-
children: [e.usageCount, " uses"]
|
|
789
|
-
})
|
|
790
|
-
]
|
|
791
|
-
})
|
|
792
|
-
]
|
|
793
|
-
}),
|
|
794
|
-
/* @__PURE__ */ i("button", {
|
|
795
|
-
style: {
|
|
796
|
-
padding: "8px 16px",
|
|
797
|
-
backgroundColor: "var(--primary)",
|
|
798
|
-
color: "white",
|
|
799
|
-
border: "none",
|
|
800
|
-
borderRadius: "6px",
|
|
801
|
-
cursor: "pointer",
|
|
802
|
-
fontSize: "13px",
|
|
803
|
-
fontWeight: 500,
|
|
804
|
-
flexShrink: 0
|
|
805
|
-
},
|
|
806
|
-
children: "Use Template"
|
|
807
|
-
})
|
|
808
|
-
]
|
|
809
|
-
});
|
|
810
|
-
}
|
|
811
|
-
function d({ template: e, isSelected: t, onSelect: n }) {
|
|
812
|
-
return /* @__PURE__ */ a("div", {
|
|
813
|
-
onClick: n,
|
|
814
|
-
style: {
|
|
815
|
-
backgroundColor: t ? "var(--color-action-primary-bg-subtle, #e0f2fe)" : "var(--bg-secondary)",
|
|
816
|
-
border: `2px solid ${t ? "var(--color-action-primary-border, #3b82f6)" : "var(--border-color)"}`,
|
|
817
|
-
borderRadius: "8px",
|
|
818
|
-
overflow: "hidden",
|
|
819
|
-
cursor: "pointer",
|
|
820
|
-
transition: "all 0.15s ease"
|
|
821
|
-
},
|
|
822
|
-
children: [/* @__PURE__ */ i("div", {
|
|
823
|
-
style: {
|
|
824
|
-
height: "80px",
|
|
825
|
-
backgroundColor: "var(--bg-tertiary)",
|
|
826
|
-
display: "flex",
|
|
827
|
-
alignItems: "center",
|
|
828
|
-
justifyContent: "center",
|
|
829
|
-
borderBottom: "1px solid var(--border-color)"
|
|
830
|
-
},
|
|
831
|
-
children: e.previewUrl ? /* @__PURE__ */ i("img", {
|
|
832
|
-
src: e.previewUrl,
|
|
833
|
-
alt: e.name,
|
|
834
|
-
style: {
|
|
835
|
-
width: "100%",
|
|
836
|
-
height: "100%",
|
|
837
|
-
objectFit: "cover"
|
|
838
|
-
}
|
|
839
|
-
}) : /* @__PURE__ */ i("span", {
|
|
840
|
-
style: {
|
|
841
|
-
fontSize: "28px",
|
|
842
|
-
color: "var(--text-tertiary)"
|
|
843
|
-
},
|
|
844
|
-
children: "📊"
|
|
845
|
-
})
|
|
846
|
-
}), /* @__PURE__ */ a("div", {
|
|
847
|
-
style: { padding: "10px" },
|
|
848
|
-
children: [/* @__PURE__ */ a("div", {
|
|
849
|
-
style: {
|
|
850
|
-
display: "flex",
|
|
851
|
-
alignItems: "center",
|
|
852
|
-
justifyContent: "space-between",
|
|
853
|
-
gap: "4px"
|
|
854
|
-
},
|
|
855
|
-
children: [/* @__PURE__ */ i("h4", {
|
|
856
|
-
style: {
|
|
857
|
-
margin: 0,
|
|
858
|
-
fontSize: "12px",
|
|
859
|
-
fontWeight: 600,
|
|
860
|
-
whiteSpace: "nowrap",
|
|
861
|
-
overflow: "hidden",
|
|
862
|
-
textOverflow: "ellipsis"
|
|
863
|
-
},
|
|
864
|
-
children: e.name
|
|
865
|
-
}), t && /* @__PURE__ */ i("span", {
|
|
866
|
-
style: {
|
|
867
|
-
color: "var(--color-action-primary-text, #3b82f6)",
|
|
868
|
-
fontSize: "14px"
|
|
869
|
-
},
|
|
870
|
-
children: "✓"
|
|
871
|
-
})]
|
|
872
|
-
}), /* @__PURE__ */ a("div", {
|
|
873
|
-
style: {
|
|
874
|
-
display: "flex",
|
|
875
|
-
gap: "4px",
|
|
876
|
-
marginTop: "6px",
|
|
877
|
-
flexWrap: "wrap"
|
|
878
|
-
},
|
|
879
|
-
children: [/* @__PURE__ */ i("span", {
|
|
880
|
-
style: {
|
|
881
|
-
fontSize: "9px",
|
|
882
|
-
padding: "1px 4px",
|
|
883
|
-
backgroundColor: "var(--bg-tertiary)",
|
|
884
|
-
borderRadius: "3px",
|
|
885
|
-
color: "var(--text-secondary)"
|
|
886
|
-
},
|
|
887
|
-
children: o[e.category]
|
|
888
|
-
}), /* @__PURE__ */ i("span", {
|
|
889
|
-
style: {
|
|
890
|
-
fontSize: "9px",
|
|
891
|
-
padding: "1px 4px",
|
|
892
|
-
backgroundColor: `${s[e.complexity]}20`,
|
|
893
|
-
color: s[e.complexity],
|
|
894
|
-
borderRadius: "3px"
|
|
895
|
-
},
|
|
896
|
-
children: e.complexity
|
|
897
|
-
})]
|
|
898
|
-
})]
|
|
899
|
-
})]
|
|
900
|
-
});
|
|
901
|
-
}
|
|
902
|
-
//#endregion
|
|
903
|
-
export { c as default };
|
|
904
|
-
|
|
905
|
-
//# sourceMappingURL=TemplatePicker.js.map
|
|
2
|
+
import "react";
|
|
3
|
+
import "react/jsx-runtime";
|