@nice2dev/ui-bi 1.0.21 → 1.0.22
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/NiceDashboardStudio.d.ts +1 -1
- package/dist/NiceETLBuilder.d.ts +1 -1
- package/dist/NiceReportBuilder.d.ts +1 -1
- package/dist/index.cjs +28 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +2685 -845
- package/dist/types.d.ts +8 -4
- package/dist/viewAdapters.d.ts +5 -0
- package/package.json +4 -1
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,1773 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useState as
|
|
3
|
-
const
|
|
1
|
+
import { jsx as e, jsxs as a, Fragment as $ } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as J, createContext as L, memo as ce, useState as D, useEffect as oe, useCallback as k, useRef as Q } from "react";
|
|
3
|
+
const de = (r, i) => i, se = L(de);
|
|
4
|
+
function le() {
|
|
5
|
+
return { t: J(se) };
|
|
6
|
+
}
|
|
7
|
+
L({
|
|
8
|
+
dir: "ltr",
|
|
9
|
+
isRTL: !1,
|
|
10
|
+
flip: (r) => r,
|
|
11
|
+
value: (r) => r.ltr
|
|
12
|
+
});
|
|
13
|
+
L(null);
|
|
14
|
+
L(null);
|
|
15
|
+
const fe = {
|
|
16
|
+
radius: "md",
|
|
17
|
+
shadow: "md",
|
|
18
|
+
fill: "solid",
|
|
19
|
+
buttonStyle: "flat",
|
|
20
|
+
inputStyle: "bordered",
|
|
21
|
+
cardStyle: "elevated",
|
|
22
|
+
badgeStyle: "solid",
|
|
23
|
+
tabStyle: "underline",
|
|
24
|
+
toggleStyle: "default",
|
|
25
|
+
tooltipStyle: "dark",
|
|
26
|
+
modalStyle: "default",
|
|
27
|
+
tableStyle: "default",
|
|
28
|
+
menuStyle: "default",
|
|
29
|
+
animation: "normal",
|
|
30
|
+
density: "normal"
|
|
31
|
+
};
|
|
32
|
+
L({
|
|
33
|
+
displayStyle: "default",
|
|
34
|
+
variantConfig: fe,
|
|
35
|
+
setDisplayStyle: () => {
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
L({});
|
|
39
|
+
L({
|
|
40
|
+
direction: "ltr",
|
|
41
|
+
isRTL: !1,
|
|
42
|
+
flip: (r) => r,
|
|
43
|
+
flipStyle: (r, i) => ({ [r]: i })
|
|
44
|
+
});
|
|
45
|
+
L({
|
|
46
|
+
permissions: {},
|
|
47
|
+
getAccessMode: () => "full"
|
|
48
|
+
});
|
|
49
|
+
L(null);
|
|
50
|
+
const ue = process.env.NODE_ENV === "development";
|
|
51
|
+
let Z = {
|
|
52
|
+
enabled: ue,
|
|
53
|
+
slowRenderThreshold: 16
|
|
54
|
+
};
|
|
55
|
+
const ee = [], Y = /* @__PURE__ */ new Map(), re = /* @__PURE__ */ new Map();
|
|
56
|
+
function pe() {
|
|
57
|
+
ee.length = 0, Y.clear(), re.clear();
|
|
58
|
+
}
|
|
59
|
+
function me(r) {
|
|
60
|
+
const i = Z.slowRenderThreshold;
|
|
61
|
+
return ee.filter((n) => n.actualDuration > i);
|
|
62
|
+
}
|
|
63
|
+
function B(r) {
|
|
64
|
+
return r < 1 ? `${(r * 1e3).toFixed(0)}μs` : r < 1e3 ? `${r.toFixed(2)}ms` : `${(r / 1e3).toFixed(2)}s`;
|
|
65
|
+
}
|
|
66
|
+
function ye() {
|
|
67
|
+
const r = Array.from(Y.values()), i = me(), n = r.reduce((u, m) => u + m.renderCount, 0), s = r.length > 0 ? r.reduce((u, m) => u + m.avgRenderTime, 0) / r.length : 0, c = Array.from(re.values());
|
|
68
|
+
return { stats: r, slowRenders: i, totalRenders: n, avgRenderTime: s, marks: c };
|
|
69
|
+
}
|
|
70
|
+
function be() {
|
|
71
|
+
const r = ye();
|
|
72
|
+
console.group(
|
|
73
|
+
"%c[Nice2Dev Performance Report]",
|
|
74
|
+
"color: var(--nice-info, #6366f1); font-weight: bold; font-size: 14px"
|
|
75
|
+
), console.log(`Total renders: ${r.totalRenders}`), console.log(`Average render time: ${B(r.avgRenderTime)}`), console.log(`Slow renders: ${r.slowRenders.length}`), console.group("Component Stats"), console.table(
|
|
76
|
+
r.stats.sort((i, n) => n.totalRenderTime - i.totalRenderTime).map((i) => ({
|
|
77
|
+
Name: i.componentName,
|
|
78
|
+
Renders: i.renderCount,
|
|
79
|
+
"Avg Time": B(i.avgRenderTime),
|
|
80
|
+
"Max Time": B(i.maxRenderTime),
|
|
81
|
+
"Total Time": B(i.totalRenderTime),
|
|
82
|
+
"Slow Renders": i.slowRenderCount
|
|
83
|
+
}))
|
|
84
|
+
), console.groupEnd(), r.slowRenders.length > 0 && (console.group("Slow Renders (last 10)"), console.table(
|
|
85
|
+
r.slowRenders.slice(-10).map((i) => ({
|
|
86
|
+
Component: i.componentName,
|
|
87
|
+
Phase: i.phase,
|
|
88
|
+
Duration: B(i.actualDuration),
|
|
89
|
+
Time: new Date(i.timestamp).toLocaleTimeString()
|
|
90
|
+
}))
|
|
91
|
+
), console.groupEnd()), r.marks.length > 0 && (console.group("Custom Marks"), console.table(
|
|
92
|
+
r.marks.filter((i) => i.duration).map((i) => ({
|
|
93
|
+
Name: i.name,
|
|
94
|
+
Duration: B(i.duration)
|
|
95
|
+
}))
|
|
96
|
+
), console.groupEnd()), console.groupEnd();
|
|
97
|
+
}
|
|
98
|
+
const he = ce(
|
|
99
|
+
({ position: r = "bottom-right", defaultCollapsed: i = !0 }) => {
|
|
100
|
+
const [n, s] = D(i), [c, u] = D([]), [m, o] = D({ used: 0, total: 0 });
|
|
101
|
+
if (oe(() => {
|
|
102
|
+
const d = () => {
|
|
103
|
+
const l = Array.from(Y.values());
|
|
104
|
+
u(l.sort((E, T) => T.totalRenderTime - E.totalRenderTime).slice(0, 10));
|
|
105
|
+
const g = window.performance;
|
|
106
|
+
g.memory && o({
|
|
107
|
+
used: g.memory.usedJSHeapSize / 1024 / 1024,
|
|
108
|
+
total: g.memory.totalJSHeapSize / 1024 / 1024
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
d();
|
|
112
|
+
const h = setInterval(d, 2e3);
|
|
113
|
+
return () => clearInterval(h);
|
|
114
|
+
}, []), !Z.enabled)
|
|
115
|
+
return null;
|
|
116
|
+
const v = {
|
|
117
|
+
position: "fixed",
|
|
118
|
+
zIndex: 99999,
|
|
119
|
+
...r.includes("top") ? { top: 8 } : { bottom: 8 },
|
|
120
|
+
...r.includes("left") ? { left: 8 } : { right: 8 }
|
|
121
|
+
};
|
|
122
|
+
return /* @__PURE__ */ a(
|
|
123
|
+
"div",
|
|
124
|
+
{
|
|
125
|
+
style: {
|
|
126
|
+
...v,
|
|
127
|
+
background: "var(--nice-overlay-85, rgba(0, 0, 0, 0.85))",
|
|
128
|
+
color: "var(--bg-primary, #fff)",
|
|
129
|
+
borderRadius: 8,
|
|
130
|
+
fontSize: 11,
|
|
131
|
+
fontFamily: "Monaco, Consolas, monospace",
|
|
132
|
+
padding: n ? "4px 8px" : 8,
|
|
133
|
+
maxWidth: n ? "auto" : 300,
|
|
134
|
+
maxHeight: n ? "auto" : 400,
|
|
135
|
+
overflow: "auto"
|
|
136
|
+
},
|
|
137
|
+
children: [
|
|
138
|
+
/* @__PURE__ */ a(
|
|
139
|
+
"div",
|
|
140
|
+
{
|
|
141
|
+
style: { cursor: "pointer", display: "flex", alignItems: "center", gap: 8 },
|
|
142
|
+
onClick: () => s((d) => !d),
|
|
143
|
+
children: [
|
|
144
|
+
/* @__PURE__ */ e("span", { style: { color: "var(--color-success, #22c55e)" }, children: "●" }),
|
|
145
|
+
/* @__PURE__ */ e("span", { children: "Profiler" }),
|
|
146
|
+
m.used > 0 && /* @__PURE__ */ a(
|
|
147
|
+
"span",
|
|
148
|
+
{
|
|
149
|
+
style: {
|
|
150
|
+
color: m.used > 100 ? "var(--color-warning, #f59e0b)" : "var(--text-muted, #64748b)"
|
|
151
|
+
},
|
|
152
|
+
children: [
|
|
153
|
+
m.used.toFixed(0),
|
|
154
|
+
"MB"
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
),
|
|
158
|
+
/* @__PURE__ */ e("span", { style: { marginLeft: "auto", opacity: 0.5 }, children: n ? "▼" : "▲" })
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
),
|
|
162
|
+
!n && /* @__PURE__ */ a("div", { style: { marginTop: 8 }, children: [
|
|
163
|
+
/* @__PURE__ */ e(
|
|
164
|
+
"div",
|
|
165
|
+
{
|
|
166
|
+
style: {
|
|
167
|
+
borderBottom: "1px solid var(--border-color, #333)",
|
|
168
|
+
paddingBottom: 4,
|
|
169
|
+
marginBottom: 8
|
|
170
|
+
},
|
|
171
|
+
children: /* @__PURE__ */ e("strong", { children: "Top Components" })
|
|
172
|
+
}
|
|
173
|
+
),
|
|
174
|
+
c.map((d) => /* @__PURE__ */ a("div", { style: { marginBottom: 4, display: "flex", gap: 8 }, children: [
|
|
175
|
+
/* @__PURE__ */ e("span", { style: { flex: 1, overflow: "hidden", textOverflow: "ellipsis" }, children: d.componentName }),
|
|
176
|
+
/* @__PURE__ */ e(
|
|
177
|
+
"span",
|
|
178
|
+
{
|
|
179
|
+
style: {
|
|
180
|
+
color: d.avgRenderTime > 16 ? "var(--color-warning, #f59e0b)" : "var(--color-success, #22c55e)"
|
|
181
|
+
},
|
|
182
|
+
children: B(d.avgRenderTime)
|
|
183
|
+
}
|
|
184
|
+
),
|
|
185
|
+
/* @__PURE__ */ a(
|
|
186
|
+
"span",
|
|
187
|
+
{
|
|
188
|
+
style: { color: "var(--text-muted, #64748b)", minWidth: 30, textAlign: "right" },
|
|
189
|
+
children: [
|
|
190
|
+
"x",
|
|
191
|
+
d.renderCount
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
)
|
|
195
|
+
] }, d.componentName)),
|
|
196
|
+
/* @__PURE__ */ a("div", { style: { marginTop: 8, display: "flex", gap: 8 }, children: [
|
|
197
|
+
/* @__PURE__ */ e(
|
|
198
|
+
"button",
|
|
199
|
+
{
|
|
200
|
+
onClick: be,
|
|
201
|
+
style: {
|
|
202
|
+
flex: 1,
|
|
203
|
+
padding: "4px 8px",
|
|
204
|
+
background: "var(--bg-tertiary, #333)",
|
|
205
|
+
border: "none",
|
|
206
|
+
borderRadius: 4,
|
|
207
|
+
color: "var(--bg-primary, #fff)",
|
|
208
|
+
cursor: "pointer",
|
|
209
|
+
fontSize: 10
|
|
210
|
+
},
|
|
211
|
+
children: "Print Report"
|
|
212
|
+
}
|
|
213
|
+
),
|
|
214
|
+
/* @__PURE__ */ e(
|
|
215
|
+
"button",
|
|
216
|
+
{
|
|
217
|
+
onClick: pe,
|
|
218
|
+
style: {
|
|
219
|
+
flex: 1,
|
|
220
|
+
padding: "4px 8px",
|
|
221
|
+
background: "var(--bg-tertiary, #333)",
|
|
222
|
+
border: "none",
|
|
223
|
+
borderRadius: 4,
|
|
224
|
+
color: "var(--bg-primary, #fff)",
|
|
225
|
+
cursor: "pointer",
|
|
226
|
+
fontSize: 10
|
|
227
|
+
},
|
|
228
|
+
children: "Clear"
|
|
229
|
+
}
|
|
230
|
+
)
|
|
231
|
+
] })
|
|
232
|
+
] })
|
|
233
|
+
]
|
|
234
|
+
}
|
|
235
|
+
);
|
|
236
|
+
}
|
|
237
|
+
);
|
|
238
|
+
he.displayName = "ProfilerOverlay";
|
|
239
|
+
process.env.NODE_ENV;
|
|
240
|
+
L(null);
|
|
241
|
+
const ve = L({
|
|
242
|
+
enabled: !0,
|
|
243
|
+
active: !1,
|
|
244
|
+
run: () => {
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
function ge() {
|
|
248
|
+
return J(ve);
|
|
249
|
+
}
|
|
250
|
+
function X(r, i) {
|
|
251
|
+
if (!r)
|
|
252
|
+
return null;
|
|
253
|
+
if (r === !0)
|
|
254
|
+
return i && i.length > 0 ? i : null;
|
|
255
|
+
if (Array.isArray(r))
|
|
256
|
+
return r.length > 0 ? r : null;
|
|
257
|
+
const n = r.steps ?? i;
|
|
258
|
+
return n && n.length > 0 ? n : null;
|
|
259
|
+
}
|
|
260
|
+
function _e(r, i) {
|
|
261
|
+
return r.map((n) => ({
|
|
262
|
+
target: n.target,
|
|
263
|
+
title: n.titleKey ? i(n.titleKey, n.title ?? "") : n.title ?? "",
|
|
264
|
+
content: n.contentKey ? i(n.contentKey, n.content ?? "") : n.content ?? "",
|
|
265
|
+
placement: n.placement,
|
|
266
|
+
highlightPadding: n.highlightPadding,
|
|
267
|
+
showArrow: n.showArrow,
|
|
268
|
+
scrollIntoView: n.scrollIntoView,
|
|
269
|
+
disableInteraction: n.disableInteraction
|
|
270
|
+
}));
|
|
271
|
+
}
|
|
272
|
+
const K = ({
|
|
273
|
+
steps: r,
|
|
274
|
+
autoStart: i,
|
|
275
|
+
label: n,
|
|
276
|
+
size: s = "md",
|
|
277
|
+
className: c,
|
|
278
|
+
style: u,
|
|
279
|
+
"data-testid": m
|
|
280
|
+
}) => {
|
|
281
|
+
const { enabled: o, run: v } = ge(), { t: d } = le();
|
|
282
|
+
if (!o || !r || r.length === 0)
|
|
283
|
+
return null;
|
|
284
|
+
const h = n ?? d("tutorial.startAria", "Start tutorial");
|
|
285
|
+
return /* @__PURE__ */ e(
|
|
286
|
+
"button",
|
|
287
|
+
{
|
|
288
|
+
type: "button",
|
|
289
|
+
className: `nice-tutorial-button nice-tutorial-button--${s}` + (c ? ` ${c}` : ""),
|
|
290
|
+
style: u,
|
|
291
|
+
"data-testid": m,
|
|
292
|
+
"aria-label": h,
|
|
293
|
+
title: h,
|
|
294
|
+
onClick: () => v(_e(r, d), { autoStart: i }),
|
|
295
|
+
children: "?"
|
|
296
|
+
}
|
|
297
|
+
);
|
|
298
|
+
}, j = "nice-tutorial-button-styles";
|
|
299
|
+
if (typeof document < "u" && !document.getElementById(j)) {
|
|
300
|
+
const r = document.createElement("style");
|
|
301
|
+
r.id = j, r.textContent = `
|
|
302
|
+
.nice-tutorial-button {
|
|
303
|
+
display: inline-flex;
|
|
304
|
+
align-items: center;
|
|
305
|
+
justify-content: center;
|
|
306
|
+
border: 1px solid var(--nice-border, #cbd5e1);
|
|
307
|
+
background: var(--nice-bg, #fff);
|
|
308
|
+
color: var(--nice-text-secondary, #475569);
|
|
309
|
+
border-radius: var(--nice-radius-full, 9999px);
|
|
310
|
+
cursor: help;
|
|
311
|
+
font-weight: 700;
|
|
312
|
+
line-height: 1;
|
|
313
|
+
padding: 0;
|
|
314
|
+
transition: background var(--nice-transition, 200ms ease), color var(--nice-transition, 200ms ease), border-color var(--nice-transition, 200ms ease);
|
|
315
|
+
}
|
|
316
|
+
.nice-tutorial-button:hover {
|
|
317
|
+
background: var(--nice-primary, #2563eb);
|
|
318
|
+
border-color: var(--nice-primary, #2563eb);
|
|
319
|
+
color: var(--nice-text-inverse, #fff);
|
|
320
|
+
}
|
|
321
|
+
.nice-tutorial-button:focus-visible {
|
|
322
|
+
outline: none;
|
|
323
|
+
box-shadow: 0 0 0 2px var(--nice-bg, #fff), 0 0 0 4px var(--nice-primary, #2563eb);
|
|
324
|
+
}
|
|
325
|
+
.nice-tutorial-button--sm { width: 16px; height: 16px; font-size: 11px; }
|
|
326
|
+
.nice-tutorial-button--md { width: 20px; height: 20px; font-size: 12px; }
|
|
327
|
+
`, document.head.appendChild(r);
|
|
328
|
+
}
|
|
329
|
+
L(null);
|
|
330
|
+
L(null);
|
|
331
|
+
L(null);
|
|
332
|
+
const ae = {
|
|
333
|
+
space1: "4px",
|
|
334
|
+
space2: "8px",
|
|
335
|
+
space3: "12px",
|
|
336
|
+
space4: "16px",
|
|
337
|
+
space5: "20px",
|
|
338
|
+
space6: "24px",
|
|
339
|
+
space8: "32px"
|
|
340
|
+
}, ie = {
|
|
341
|
+
fontFamily: "'Inter', system-ui, -apple-system, sans-serif",
|
|
342
|
+
fontSizeXs: "0.75rem",
|
|
343
|
+
fontSizeSm: "0.8125rem",
|
|
344
|
+
fontSizeMd: "0.875rem",
|
|
345
|
+
fontSizeLg: "1rem",
|
|
346
|
+
fontSizeXl: "1.125rem",
|
|
347
|
+
fontWeightNormal: 400,
|
|
348
|
+
fontWeightMedium: 500,
|
|
349
|
+
fontWeightSemibold: 600,
|
|
350
|
+
fontWeightBold: 700,
|
|
351
|
+
lineHeight: 1.5
|
|
352
|
+
}, ne = { fast: "120ms ease", normal: "200ms ease", slow: "300ms ease" }, te = (r) => ({
|
|
353
|
+
color: r,
|
|
354
|
+
radiusSm: "4px",
|
|
355
|
+
radiusMd: "6px",
|
|
356
|
+
radiusLg: "8px",
|
|
357
|
+
radiusXl: "12px",
|
|
358
|
+
radiusFull: "9999px"
|
|
359
|
+
}), we = {
|
|
360
|
+
sm: "0 1px 2px rgba(0,0,0,0.05)",
|
|
361
|
+
md: "0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",
|
|
362
|
+
lg: "0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",
|
|
363
|
+
xl: "0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)"
|
|
364
|
+
}, xe = {
|
|
365
|
+
sm: "0 1px 2px rgba(0,0,0,0.3)",
|
|
366
|
+
md: "0 4px 6px -1px rgba(0,0,0,0.4)",
|
|
367
|
+
lg: "0 10px 15px -3px rgba(0,0,0,0.4)",
|
|
368
|
+
xl: "0 20px 25px -5px rgba(0,0,0,0.4)"
|
|
369
|
+
};
|
|
370
|
+
function f(r, i, n, s, c) {
|
|
371
|
+
return {
|
|
372
|
+
name: r,
|
|
373
|
+
darkMode: "light",
|
|
374
|
+
colors: {
|
|
375
|
+
...i,
|
|
376
|
+
surface: i.surface ?? n.primary,
|
|
377
|
+
surfaceHover: i.surfaceHover ?? n.secondary
|
|
378
|
+
},
|
|
379
|
+
backgrounds: {
|
|
380
|
+
...n,
|
|
381
|
+
elevated: n.elevated ?? n.primary,
|
|
382
|
+
inset: n.inset ?? n.tertiary,
|
|
383
|
+
canvas: n.canvas ?? n.primary
|
|
384
|
+
},
|
|
385
|
+
text: { ...s, inverse: s.inverse ?? "#ffffff" },
|
|
386
|
+
borders: te(c),
|
|
387
|
+
shadows: we,
|
|
388
|
+
spacing: ae,
|
|
389
|
+
typography: ie,
|
|
390
|
+
transitions: ne
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
function H(r, i, n, s, c) {
|
|
394
|
+
return {
|
|
395
|
+
name: r,
|
|
396
|
+
darkMode: "dark",
|
|
397
|
+
colors: {
|
|
398
|
+
...i,
|
|
399
|
+
surface: i.surface ?? n.secondary,
|
|
400
|
+
surfaceHover: i.surfaceHover ?? n.tertiary
|
|
401
|
+
},
|
|
402
|
+
backgrounds: {
|
|
403
|
+
...n,
|
|
404
|
+
elevated: n.elevated ?? n.secondary,
|
|
405
|
+
inset: n.inset ?? n.primary,
|
|
406
|
+
canvas: n.canvas ?? n.primary
|
|
407
|
+
},
|
|
408
|
+
text: { ...s, inverse: s.inverse ?? "#0f172a" },
|
|
409
|
+
borders: te(c),
|
|
410
|
+
shadows: xe,
|
|
411
|
+
spacing: ae,
|
|
412
|
+
typography: ie,
|
|
413
|
+
transitions: ne
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
f(
|
|
417
|
+
"Slate",
|
|
418
|
+
{
|
|
419
|
+
primary: "#64748b",
|
|
420
|
+
primaryHover: "#475569",
|
|
421
|
+
success: "#10b981",
|
|
422
|
+
warning: "#f59e0b",
|
|
423
|
+
error: "#ef4444",
|
|
424
|
+
info: "#06b6d4"
|
|
425
|
+
},
|
|
426
|
+
{ primary: "#f8fafc", secondary: "#f1f5f9", tertiary: "#e2e8f0", hover: "#e2e8f0" },
|
|
427
|
+
{ primary: "#1e293b", secondary: "#475569", muted: "#94a3b8" },
|
|
428
|
+
"#cbd5e1"
|
|
429
|
+
);
|
|
430
|
+
f(
|
|
431
|
+
"Zinc",
|
|
432
|
+
{
|
|
433
|
+
primary: "#71717a",
|
|
434
|
+
primaryHover: "#52525b",
|
|
435
|
+
success: "#22c55e",
|
|
436
|
+
warning: "#eab308",
|
|
437
|
+
error: "#ef4444",
|
|
438
|
+
info: "#06b6d4"
|
|
439
|
+
},
|
|
440
|
+
{ primary: "#fafafa", secondary: "#f4f4f5", tertiary: "#e4e4e7", hover: "#e4e4e7" },
|
|
441
|
+
{ primary: "#18181b", secondary: "#3f3f46", muted: "#a1a1aa" },
|
|
442
|
+
"#d4d4d8"
|
|
443
|
+
);
|
|
444
|
+
f(
|
|
445
|
+
"Stone",
|
|
446
|
+
{
|
|
447
|
+
primary: "#78716c",
|
|
448
|
+
primaryHover: "#57534e",
|
|
449
|
+
success: "#16a34a",
|
|
450
|
+
warning: "#ca8a04",
|
|
451
|
+
error: "#dc2626",
|
|
452
|
+
info: "#0891b2"
|
|
453
|
+
},
|
|
454
|
+
{ primary: "#fafaf9", secondary: "#f5f5f4", tertiary: "#e7e5e4", hover: "#e7e5e4" },
|
|
455
|
+
{ primary: "#1c1917", secondary: "#44403c", muted: "#a8a29e" },
|
|
456
|
+
"#d6d3d1"
|
|
457
|
+
);
|
|
458
|
+
f(
|
|
459
|
+
"Cool Gray",
|
|
460
|
+
{
|
|
461
|
+
primary: "#6b7280",
|
|
462
|
+
primaryHover: "#4b5563",
|
|
463
|
+
success: "#10b981",
|
|
464
|
+
warning: "#f59e0b",
|
|
465
|
+
error: "#ef4444",
|
|
466
|
+
info: "#3b82f6"
|
|
467
|
+
},
|
|
468
|
+
{ primary: "#f9fafb", secondary: "#f3f4f6", tertiary: "#e5e7eb", hover: "#e5e7eb" },
|
|
469
|
+
{ primary: "#111827", secondary: "#374151", muted: "#9ca3af" },
|
|
470
|
+
"#d1d5db"
|
|
471
|
+
);
|
|
472
|
+
f(
|
|
473
|
+
"Warm Gray",
|
|
474
|
+
{
|
|
475
|
+
primary: "#7c7568",
|
|
476
|
+
primaryHover: "#5c564c",
|
|
477
|
+
success: "#4d7c0f",
|
|
478
|
+
warning: "#a16207",
|
|
479
|
+
error: "#b91c1c",
|
|
480
|
+
info: "#0e7490"
|
|
481
|
+
},
|
|
482
|
+
{ primary: "#faf9f7", secondary: "#f5f4f0", tertiary: "#e8e6e1", hover: "#e8e6e1" },
|
|
483
|
+
{ primary: "#1f1d19", secondary: "#4a463d", muted: "#a09888" },
|
|
484
|
+
"#d4d0c8"
|
|
485
|
+
);
|
|
486
|
+
f(
|
|
487
|
+
"Silver",
|
|
488
|
+
{
|
|
489
|
+
primary: "#94a3b8",
|
|
490
|
+
primaryHover: "#64748b",
|
|
491
|
+
success: "#10b981",
|
|
492
|
+
warning: "#f59e0b",
|
|
493
|
+
error: "#ef4444",
|
|
494
|
+
info: "#38bdf8"
|
|
495
|
+
},
|
|
496
|
+
{ primary: "#f8fafc", secondary: "#f1f5f9", tertiary: "#e2e8f0", hover: "#e2e8f0" },
|
|
497
|
+
{ primary: "#334155", secondary: "#64748b", muted: "#94a3b8" },
|
|
498
|
+
"#cbd5e1"
|
|
499
|
+
);
|
|
500
|
+
f(
|
|
501
|
+
"Charcoal",
|
|
502
|
+
{
|
|
503
|
+
primary: "#374151",
|
|
504
|
+
primaryHover: "#1f2937",
|
|
505
|
+
success: "#059669",
|
|
506
|
+
warning: "#d97706",
|
|
507
|
+
error: "#dc2626",
|
|
508
|
+
info: "#0284c7"
|
|
509
|
+
},
|
|
510
|
+
{ primary: "#f9fafb", secondary: "#f3f4f6", tertiary: "#e5e7eb", hover: "#e5e7eb" },
|
|
511
|
+
{ primary: "#111827", secondary: "#374151", muted: "#6b7280" },
|
|
512
|
+
"#d1d5db"
|
|
513
|
+
);
|
|
514
|
+
f(
|
|
515
|
+
"Ivory",
|
|
516
|
+
{
|
|
517
|
+
primary: "#92876d",
|
|
518
|
+
primaryHover: "#7a6f55",
|
|
519
|
+
success: "#4d7c0f",
|
|
520
|
+
warning: "#a16207",
|
|
521
|
+
error: "#b91c1c",
|
|
522
|
+
info: "#0e7490"
|
|
523
|
+
},
|
|
524
|
+
{ primary: "#fffef7", secondary: "#faf6eb", tertiary: "#f0ead6", hover: "#f0ead6" },
|
|
525
|
+
{ primary: "#2b2517", secondary: "#5c5340", muted: "#9c9280" },
|
|
526
|
+
"#ddd8c4"
|
|
527
|
+
);
|
|
528
|
+
f(
|
|
529
|
+
"Rose",
|
|
530
|
+
{
|
|
531
|
+
primary: "#e11d48",
|
|
532
|
+
primaryHover: "#be123c",
|
|
533
|
+
success: "#16a34a",
|
|
534
|
+
warning: "#ea580c",
|
|
535
|
+
error: "#dc2626",
|
|
536
|
+
info: "#0891b2"
|
|
537
|
+
},
|
|
538
|
+
{ primary: "#fff1f2", secondary: "#ffe4e6", tertiary: "#fecdd3", hover: "#ffe4e6" },
|
|
539
|
+
{ primary: "#4c0519", secondary: "#881337", muted: "#f43f5e" },
|
|
540
|
+
"#fda4af"
|
|
541
|
+
);
|
|
542
|
+
f(
|
|
543
|
+
"Emerald",
|
|
544
|
+
{
|
|
545
|
+
primary: "#059669",
|
|
546
|
+
primaryHover: "#047857",
|
|
547
|
+
success: "#16a34a",
|
|
548
|
+
warning: "#d97706",
|
|
549
|
+
error: "#dc2626",
|
|
550
|
+
info: "#0891b2"
|
|
551
|
+
},
|
|
552
|
+
{ primary: "#ecfdf5", secondary: "#d1fae5", tertiary: "#a7f3d0", hover: "#d1fae5" },
|
|
553
|
+
{ primary: "#064e3b", secondary: "#065f46", muted: "#34d399" },
|
|
554
|
+
"#6ee7b7"
|
|
555
|
+
);
|
|
556
|
+
f(
|
|
557
|
+
"Amber",
|
|
558
|
+
{
|
|
559
|
+
primary: "#d97706",
|
|
560
|
+
primaryHover: "#b45309",
|
|
561
|
+
success: "#16a34a",
|
|
562
|
+
warning: "#ca8a04",
|
|
563
|
+
error: "#dc2626",
|
|
564
|
+
info: "#0284c7"
|
|
565
|
+
},
|
|
566
|
+
{ primary: "#fffbeb", secondary: "#fef3c7", tertiary: "#fde68a", hover: "#fef3c7" },
|
|
567
|
+
{ primary: "#451a03", secondary: "#78350f", muted: "#f59e0b" },
|
|
568
|
+
"#fcd34d"
|
|
569
|
+
);
|
|
570
|
+
f(
|
|
571
|
+
"Violet",
|
|
572
|
+
{
|
|
573
|
+
primary: "#7c3aed",
|
|
574
|
+
primaryHover: "#6d28d9",
|
|
575
|
+
success: "#10b981",
|
|
576
|
+
warning: "#f59e0b",
|
|
577
|
+
error: "#ef4444",
|
|
578
|
+
info: "#06b6d4"
|
|
579
|
+
},
|
|
580
|
+
{ primary: "#f5f3ff", secondary: "#ede9fe", tertiary: "#ddd6fe", hover: "#ede9fe" },
|
|
581
|
+
{ primary: "#2e1065", secondary: "#4c1d95", muted: "#a78bfa" },
|
|
582
|
+
"#c4b5fd"
|
|
583
|
+
);
|
|
584
|
+
f(
|
|
585
|
+
"Teal",
|
|
586
|
+
{
|
|
587
|
+
primary: "#0d9488",
|
|
588
|
+
primaryHover: "#0f766e",
|
|
589
|
+
success: "#16a34a",
|
|
590
|
+
warning: "#d97706",
|
|
591
|
+
error: "#dc2626",
|
|
592
|
+
info: "#0284c7"
|
|
593
|
+
},
|
|
594
|
+
{ primary: "#f0fdfa", secondary: "#ccfbf1", tertiary: "#99f6e4", hover: "#ccfbf1" },
|
|
595
|
+
{ primary: "#134e4a", secondary: "#115e59", muted: "#2dd4bf" },
|
|
596
|
+
"#5eead4"
|
|
597
|
+
);
|
|
598
|
+
f(
|
|
599
|
+
"Indigo",
|
|
600
|
+
{
|
|
601
|
+
primary: "#4f46e5",
|
|
602
|
+
primaryHover: "#4338ca",
|
|
603
|
+
success: "#10b981",
|
|
604
|
+
warning: "#f59e0b",
|
|
605
|
+
error: "#ef4444",
|
|
606
|
+
info: "#06b6d4"
|
|
607
|
+
},
|
|
608
|
+
{ primary: "#eef2ff", secondary: "#e0e7ff", tertiary: "#c7d2fe", hover: "#e0e7ff" },
|
|
609
|
+
{ primary: "#1e1b4b", secondary: "#312e81", muted: "#818cf8" },
|
|
610
|
+
"#a5b4fc"
|
|
611
|
+
);
|
|
612
|
+
f(
|
|
613
|
+
"Cyan",
|
|
614
|
+
{
|
|
615
|
+
primary: "#0891b2",
|
|
616
|
+
primaryHover: "#0e7490",
|
|
617
|
+
success: "#10b981",
|
|
618
|
+
warning: "#f59e0b",
|
|
619
|
+
error: "#ef4444",
|
|
620
|
+
info: "#0284c7"
|
|
621
|
+
},
|
|
622
|
+
{ primary: "#ecfeff", secondary: "#cffafe", tertiary: "#a5f3fc", hover: "#cffafe" },
|
|
623
|
+
{ primary: "#164e63", secondary: "#155e75", muted: "#22d3ee" },
|
|
624
|
+
"#67e8f9"
|
|
625
|
+
);
|
|
626
|
+
f(
|
|
627
|
+
"Lime",
|
|
628
|
+
{
|
|
629
|
+
primary: "#65a30d",
|
|
630
|
+
primaryHover: "#4d7c0f",
|
|
631
|
+
success: "#16a34a",
|
|
632
|
+
warning: "#ca8a04",
|
|
633
|
+
error: "#dc2626",
|
|
634
|
+
info: "#0891b2"
|
|
635
|
+
},
|
|
636
|
+
{ primary: "#f7fee7", secondary: "#ecfccb", tertiary: "#d9f99d", hover: "#ecfccb" },
|
|
637
|
+
{ primary: "#1a2e05", secondary: "#365314", muted: "#84cc16" },
|
|
638
|
+
"#bef264"
|
|
639
|
+
);
|
|
640
|
+
f(
|
|
641
|
+
"Pink",
|
|
642
|
+
{
|
|
643
|
+
primary: "#db2777",
|
|
644
|
+
primaryHover: "#be185d",
|
|
645
|
+
success: "#10b981",
|
|
646
|
+
warning: "#f59e0b",
|
|
647
|
+
error: "#dc2626",
|
|
648
|
+
info: "#06b6d4"
|
|
649
|
+
},
|
|
650
|
+
{ primary: "#fdf2f8", secondary: "#fce7f3", tertiary: "#fbcfe8", hover: "#fce7f3" },
|
|
651
|
+
{ primary: "#500724", secondary: "#831843", muted: "#f472b6" },
|
|
652
|
+
"#f9a8d4"
|
|
653
|
+
);
|
|
654
|
+
f(
|
|
655
|
+
"Orange",
|
|
656
|
+
{
|
|
657
|
+
primary: "#ea580c",
|
|
658
|
+
primaryHover: "#c2410c",
|
|
659
|
+
success: "#16a34a",
|
|
660
|
+
warning: "#ca8a04",
|
|
661
|
+
error: "#dc2626",
|
|
662
|
+
info: "#0891b2"
|
|
663
|
+
},
|
|
664
|
+
{ primary: "#fff7ed", secondary: "#ffedd5", tertiary: "#fed7aa", hover: "#ffedd5" },
|
|
665
|
+
{ primary: "#431407", secondary: "#7c2d12", muted: "#fb923c" },
|
|
666
|
+
"#fdba74"
|
|
667
|
+
);
|
|
668
|
+
f(
|
|
669
|
+
"Fuchsia",
|
|
670
|
+
{
|
|
671
|
+
primary: "#c026d3",
|
|
672
|
+
primaryHover: "#a21caf",
|
|
673
|
+
success: "#10b981",
|
|
674
|
+
warning: "#eab308",
|
|
675
|
+
error: "#ef4444",
|
|
676
|
+
info: "#06b6d4"
|
|
677
|
+
},
|
|
678
|
+
{ primary: "#fdf4ff", secondary: "#fae8ff", tertiary: "#f5d0fe", hover: "#fae8ff" },
|
|
679
|
+
{ primary: "#4a044e", secondary: "#701a75", muted: "#d946ef" },
|
|
680
|
+
"#e879f9"
|
|
681
|
+
);
|
|
682
|
+
f(
|
|
683
|
+
"Sky",
|
|
684
|
+
{
|
|
685
|
+
primary: "#0284c7",
|
|
686
|
+
primaryHover: "#0369a1",
|
|
687
|
+
success: "#10b981",
|
|
688
|
+
warning: "#f59e0b",
|
|
689
|
+
error: "#ef4444",
|
|
690
|
+
info: "#06b6d4"
|
|
691
|
+
},
|
|
692
|
+
{ primary: "#f0f9ff", secondary: "#e0f2fe", tertiary: "#bae6fd", hover: "#e0f2fe" },
|
|
693
|
+
{ primary: "#0c4a6e", secondary: "#075985", muted: "#38bdf8" },
|
|
694
|
+
"#7dd3fc"
|
|
695
|
+
);
|
|
696
|
+
f(
|
|
697
|
+
"Ruby",
|
|
698
|
+
{
|
|
699
|
+
primary: "#be123c",
|
|
700
|
+
primaryHover: "#9f1239",
|
|
701
|
+
success: "#059669",
|
|
702
|
+
warning: "#d97706",
|
|
703
|
+
error: "#dc2626",
|
|
704
|
+
info: "#0284c7"
|
|
705
|
+
},
|
|
706
|
+
{ primary: "#fff1f2", secondary: "#ffe4e6", tertiary: "#fecdd3", hover: "#ffe4e6" },
|
|
707
|
+
{ primary: "#4c0519", secondary: "#881337", muted: "#fb7185" },
|
|
708
|
+
"#fda4af"
|
|
709
|
+
);
|
|
710
|
+
f(
|
|
711
|
+
"Coral",
|
|
712
|
+
{
|
|
713
|
+
primary: "#f97316",
|
|
714
|
+
primaryHover: "#ea580c",
|
|
715
|
+
success: "#10b981",
|
|
716
|
+
warning: "#eab308",
|
|
717
|
+
error: "#ef4444",
|
|
718
|
+
info: "#06b6d4"
|
|
719
|
+
},
|
|
720
|
+
{ primary: "#fff7ed", secondary: "#ffedd5", tertiary: "#fed7aa", hover: "#ffedd5" },
|
|
721
|
+
{ primary: "#431407", secondary: "#9a3412", muted: "#fb923c" },
|
|
722
|
+
"#fdba74"
|
|
723
|
+
);
|
|
724
|
+
H(
|
|
725
|
+
"Midnight",
|
|
726
|
+
{
|
|
727
|
+
primary: "#818cf8",
|
|
728
|
+
primaryHover: "#6366f1",
|
|
729
|
+
success: "#34d399",
|
|
730
|
+
warning: "#fbbf24",
|
|
731
|
+
error: "#f87171",
|
|
732
|
+
info: "#22d3ee"
|
|
733
|
+
},
|
|
734
|
+
{ primary: "#020617", secondary: "#0f172a", tertiary: "#1e293b", hover: "#1e293b" },
|
|
735
|
+
{ primary: "#f1f5f9", secondary: "#94a3b8", muted: "#475569" },
|
|
736
|
+
"#1e293b"
|
|
737
|
+
);
|
|
738
|
+
H(
|
|
739
|
+
"Obsidian",
|
|
740
|
+
{
|
|
741
|
+
primary: "#a78bfa",
|
|
742
|
+
primaryHover: "#8b5cf6",
|
|
743
|
+
success: "#4ade80",
|
|
744
|
+
warning: "#facc15",
|
|
745
|
+
error: "#fb7185",
|
|
746
|
+
info: "#38bdf8"
|
|
747
|
+
},
|
|
748
|
+
{ primary: "#09090b", secondary: "#18181b", tertiary: "#27272a", hover: "#27272a" },
|
|
749
|
+
{ primary: "#fafafa", secondary: "#a1a1aa", muted: "#52525b" },
|
|
750
|
+
"#3f3f46"
|
|
751
|
+
);
|
|
752
|
+
H(
|
|
753
|
+
"Eclipse",
|
|
754
|
+
{
|
|
755
|
+
primary: "#c084fc",
|
|
756
|
+
primaryHover: "#a855f7",
|
|
757
|
+
success: "#34d399",
|
|
758
|
+
warning: "#fbbf24",
|
|
759
|
+
error: "#f87171",
|
|
760
|
+
info: "#67e8f9"
|
|
761
|
+
},
|
|
762
|
+
{ primary: "#0c0a1d", secondary: "#1a1533", tertiary: "#2a2248", hover: "#2a2248" },
|
|
763
|
+
{ primary: "#f5f3ff", secondary: "#a78bfa", muted: "#6d5eac" },
|
|
764
|
+
"#3b3266"
|
|
765
|
+
);
|
|
766
|
+
H(
|
|
767
|
+
"Onyx",
|
|
768
|
+
{
|
|
769
|
+
primary: "#60a5fa",
|
|
770
|
+
primaryHover: "#3b82f6",
|
|
771
|
+
success: "#4ade80",
|
|
772
|
+
warning: "#fbbf24",
|
|
773
|
+
error: "#f87171",
|
|
774
|
+
info: "#22d3ee"
|
|
775
|
+
},
|
|
776
|
+
{ primary: "#000000", secondary: "#0a0a0a", tertiary: "#171717", hover: "#171717" },
|
|
777
|
+
{ primary: "#ffffff", secondary: "#a3a3a3", muted: "#525252" },
|
|
778
|
+
"#262626"
|
|
779
|
+
);
|
|
780
|
+
H(
|
|
781
|
+
"Carbon",
|
|
782
|
+
{
|
|
783
|
+
primary: "#38bdf8",
|
|
784
|
+
primaryHover: "#0ea5e9",
|
|
785
|
+
success: "#4ade80",
|
|
786
|
+
warning: "#facc15",
|
|
787
|
+
error: "#f87171",
|
|
788
|
+
info: "#67e8f9"
|
|
789
|
+
},
|
|
790
|
+
{ primary: "#161616", secondary: "#262626", tertiary: "#393939", hover: "#393939" },
|
|
791
|
+
{ primary: "#f4f4f4", secondary: "#c6c6c6", muted: "#6f6f6f" },
|
|
792
|
+
"#525252"
|
|
793
|
+
);
|
|
794
|
+
H(
|
|
795
|
+
"Cosmos",
|
|
796
|
+
{
|
|
797
|
+
primary: "#6366f1",
|
|
798
|
+
primaryHover: "#4f46e5",
|
|
799
|
+
success: "#34d399",
|
|
800
|
+
warning: "#fbbf24",
|
|
801
|
+
error: "#f87171",
|
|
802
|
+
info: "#22d3ee"
|
|
803
|
+
},
|
|
804
|
+
{ primary: "#030712", secondary: "#111827", tertiary: "#1f2937", hover: "#1f2937" },
|
|
805
|
+
{ primary: "#e5e7eb", secondary: "#9ca3af", muted: "#4b5563" },
|
|
806
|
+
"#374151"
|
|
807
|
+
);
|
|
808
|
+
H(
|
|
809
|
+
"Nebula",
|
|
810
|
+
{
|
|
811
|
+
primary: "#e879f9",
|
|
812
|
+
primaryHover: "#d946ef",
|
|
813
|
+
success: "#4ade80",
|
|
814
|
+
warning: "#fbbf24",
|
|
815
|
+
error: "#fb7185",
|
|
816
|
+
info: "#67e8f9"
|
|
817
|
+
},
|
|
818
|
+
{ primary: "#0d0117", secondary: "#1a0533", tertiary: "#2d0a52", hover: "#2d0a52" },
|
|
819
|
+
{ primary: "#fae8ff", secondary: "#d8b4fe", muted: "#7c3aed" },
|
|
820
|
+
"#581c87"
|
|
821
|
+
);
|
|
822
|
+
H(
|
|
823
|
+
"Abyss",
|
|
824
|
+
{
|
|
825
|
+
primary: "#22d3ee",
|
|
826
|
+
primaryHover: "#06b6d4",
|
|
827
|
+
success: "#34d399",
|
|
828
|
+
warning: "#fbbf24",
|
|
829
|
+
error: "#f87171",
|
|
830
|
+
info: "#38bdf8"
|
|
831
|
+
},
|
|
832
|
+
{ primary: "#001219", secondary: "#002a3a", tertiary: "#003e54", hover: "#003e54" },
|
|
833
|
+
{ primary: "#e0f2fe", secondary: "#7dd3fc", muted: "#0369a1" },
|
|
834
|
+
"#075985"
|
|
835
|
+
);
|
|
836
|
+
H(
|
|
837
|
+
"Shadow",
|
|
838
|
+
{
|
|
839
|
+
primary: "#a3a3a3",
|
|
840
|
+
primaryHover: "#737373",
|
|
841
|
+
success: "#4ade80",
|
|
842
|
+
warning: "#facc15",
|
|
843
|
+
error: "#f87171",
|
|
844
|
+
info: "#38bdf8"
|
|
845
|
+
},
|
|
846
|
+
{ primary: "#171717", secondary: "#1f1f1f", tertiary: "#2a2a2a", hover: "#2a2a2a" },
|
|
847
|
+
{ primary: "#e5e5e5", secondary: "#a3a3a3", muted: "#525252" },
|
|
848
|
+
"#404040"
|
|
849
|
+
);
|
|
850
|
+
H(
|
|
851
|
+
"Emerald Dark",
|
|
852
|
+
{
|
|
853
|
+
primary: "#34d399",
|
|
854
|
+
primaryHover: "#10b981",
|
|
855
|
+
success: "#4ade80",
|
|
856
|
+
warning: "#fbbf24",
|
|
857
|
+
error: "#f87171",
|
|
858
|
+
info: "#22d3ee"
|
|
859
|
+
},
|
|
860
|
+
{ primary: "#022c22", secondary: "#064e3b", tertiary: "#065f46", hover: "#065f46" },
|
|
861
|
+
{ primary: "#ecfdf5", secondary: "#6ee7b7", muted: "#047857" },
|
|
862
|
+
"#047857"
|
|
863
|
+
);
|
|
864
|
+
f(
|
|
865
|
+
"Forest",
|
|
866
|
+
{
|
|
867
|
+
primary: "#166534",
|
|
868
|
+
primaryHover: "#14532d",
|
|
869
|
+
success: "#22c55e",
|
|
870
|
+
warning: "#ca8a04",
|
|
871
|
+
error: "#dc2626",
|
|
872
|
+
info: "#0891b2"
|
|
873
|
+
},
|
|
874
|
+
{ primary: "#f0fdf4", secondary: "#dcfce7", tertiary: "#bbf7d0", hover: "#dcfce7" },
|
|
875
|
+
{ primary: "#052e16", secondary: "#166534", muted: "#4ade80" },
|
|
876
|
+
"#86efac"
|
|
877
|
+
);
|
|
878
|
+
f(
|
|
879
|
+
"Ocean",
|
|
880
|
+
{
|
|
881
|
+
primary: "#0369a1",
|
|
882
|
+
primaryHover: "#075985",
|
|
883
|
+
success: "#059669",
|
|
884
|
+
warning: "#d97706",
|
|
885
|
+
error: "#dc2626",
|
|
886
|
+
info: "#0284c7"
|
|
887
|
+
},
|
|
888
|
+
{ primary: "#f0f9ff", secondary: "#e0f2fe", tertiary: "#bae6fd", hover: "#e0f2fe" },
|
|
889
|
+
{ primary: "#0c4a6e", secondary: "#0369a1", muted: "#38bdf8" },
|
|
890
|
+
"#7dd3fc"
|
|
891
|
+
);
|
|
892
|
+
f(
|
|
893
|
+
"Desert",
|
|
894
|
+
{
|
|
895
|
+
primary: "#b45309",
|
|
896
|
+
primaryHover: "#92400e",
|
|
897
|
+
success: "#4d7c0f",
|
|
898
|
+
warning: "#a16207",
|
|
899
|
+
error: "#b91c1c",
|
|
900
|
+
info: "#0e7490"
|
|
901
|
+
},
|
|
902
|
+
{ primary: "#fefce8", secondary: "#fef9c3", tertiary: "#fef08a", hover: "#fef9c3" },
|
|
903
|
+
{ primary: "#422006", secondary: "#713f12", muted: "#ca8a04" },
|
|
904
|
+
"#fde047"
|
|
905
|
+
);
|
|
906
|
+
f(
|
|
907
|
+
"Sunset",
|
|
908
|
+
{
|
|
909
|
+
primary: "#ea580c",
|
|
910
|
+
primaryHover: "#c2410c",
|
|
911
|
+
success: "#16a34a",
|
|
912
|
+
warning: "#d97706",
|
|
913
|
+
error: "#dc2626",
|
|
914
|
+
info: "#0891b2"
|
|
915
|
+
},
|
|
916
|
+
{ primary: "#fff7ed", secondary: "#ffedd5", tertiary: "#fed7aa", hover: "#ffedd5" },
|
|
917
|
+
{ primary: "#431407", secondary: "#9a3412", muted: "#f97316" },
|
|
918
|
+
"#fdba74"
|
|
919
|
+
);
|
|
920
|
+
f(
|
|
921
|
+
"Aurora",
|
|
922
|
+
{
|
|
923
|
+
primary: "#0d9488",
|
|
924
|
+
primaryHover: "#0f766e",
|
|
925
|
+
success: "#22c55e",
|
|
926
|
+
warning: "#eab308",
|
|
927
|
+
error: "#ef4444",
|
|
928
|
+
info: "#06b6d4"
|
|
929
|
+
},
|
|
930
|
+
{ primary: "#f0fdfa", secondary: "#ccfbf1", tertiary: "#99f6e4", hover: "#ccfbf1" },
|
|
931
|
+
{ primary: "#134e4a", secondary: "#115e59", muted: "#2dd4bf" },
|
|
932
|
+
"#5eead4"
|
|
933
|
+
);
|
|
934
|
+
f(
|
|
935
|
+
"Lavender",
|
|
936
|
+
{
|
|
937
|
+
primary: "#7e22ce",
|
|
938
|
+
primaryHover: "#6b21a8",
|
|
939
|
+
success: "#16a34a",
|
|
940
|
+
warning: "#d97706",
|
|
941
|
+
error: "#dc2626",
|
|
942
|
+
info: "#0891b2"
|
|
943
|
+
},
|
|
944
|
+
{ primary: "#faf5ff", secondary: "#f3e8ff", tertiary: "#e9d5ff", hover: "#f3e8ff" },
|
|
945
|
+
{ primary: "#3b0764", secondary: "#581c87", muted: "#a855f7" },
|
|
946
|
+
"#d8b4fe"
|
|
947
|
+
);
|
|
948
|
+
f(
|
|
949
|
+
"Autumn",
|
|
950
|
+
{
|
|
951
|
+
primary: "#c2410c",
|
|
952
|
+
primaryHover: "#9a3412",
|
|
953
|
+
success: "#4d7c0f",
|
|
954
|
+
warning: "#a16207",
|
|
955
|
+
error: "#b91c1c",
|
|
956
|
+
info: "#0e7490"
|
|
957
|
+
},
|
|
958
|
+
{ primary: "#fef2f2", secondary: "#fee2e2", tertiary: "#fecaca", hover: "#fee2e2" },
|
|
959
|
+
{ primary: "#450a0a", secondary: "#7f1d1d", muted: "#f87171" },
|
|
960
|
+
"#fca5a5"
|
|
961
|
+
);
|
|
962
|
+
f(
|
|
963
|
+
"Spring",
|
|
964
|
+
{
|
|
965
|
+
primary: "#16a34a",
|
|
966
|
+
primaryHover: "#15803d",
|
|
967
|
+
success: "#22c55e",
|
|
968
|
+
warning: "#eab308",
|
|
969
|
+
error: "#ef4444",
|
|
970
|
+
info: "#06b6d4"
|
|
971
|
+
},
|
|
972
|
+
{ primary: "#f0fdf4", secondary: "#dcfce7", tertiary: "#bbf7d0", hover: "#dcfce7" },
|
|
973
|
+
{ primary: "#14532d", secondary: "#166534", muted: "#4ade80" },
|
|
974
|
+
"#86efac"
|
|
975
|
+
);
|
|
976
|
+
f(
|
|
977
|
+
"Arctic",
|
|
978
|
+
{
|
|
979
|
+
primary: "#0ea5e9",
|
|
980
|
+
primaryHover: "#0284c7",
|
|
981
|
+
success: "#10b981",
|
|
982
|
+
warning: "#f59e0b",
|
|
983
|
+
error: "#ef4444",
|
|
984
|
+
info: "#06b6d4"
|
|
985
|
+
},
|
|
986
|
+
{ primary: "#f0f9ff", secondary: "#e0f2fe", tertiary: "#bae6fd", hover: "#e0f2fe" },
|
|
987
|
+
{ primary: "#0c4a6e", secondary: "#0369a1", muted: "#7dd3fc" },
|
|
988
|
+
"#bae6fd"
|
|
989
|
+
);
|
|
990
|
+
f(
|
|
991
|
+
"Tropical",
|
|
992
|
+
{
|
|
993
|
+
primary: "#0d9488",
|
|
994
|
+
primaryHover: "#0f766e",
|
|
995
|
+
success: "#16a34a",
|
|
996
|
+
warning: "#f59e0b",
|
|
997
|
+
error: "#ef4444",
|
|
998
|
+
info: "#06b6d4"
|
|
999
|
+
},
|
|
1000
|
+
{ primary: "#ecfdf5", secondary: "#d1fae5", tertiary: "#a7f3d0", hover: "#d1fae5" },
|
|
1001
|
+
{ primary: "#064e3b", secondary: "#065f46", muted: "#6ee7b7" },
|
|
1002
|
+
"#a7f3d0"
|
|
1003
|
+
);
|
|
1004
|
+
f(
|
|
1005
|
+
"Pastel Rose",
|
|
1006
|
+
{
|
|
1007
|
+
primary: "#f472b6",
|
|
1008
|
+
primaryHover: "#ec4899",
|
|
1009
|
+
success: "#4ade80",
|
|
1010
|
+
warning: "#fcd34d",
|
|
1011
|
+
error: "#fb7185",
|
|
1012
|
+
info: "#67e8f9"
|
|
1013
|
+
},
|
|
1014
|
+
{ primary: "#fdf2f8", secondary: "#fce7f3", tertiary: "#fbcfe8", hover: "#fce7f3" },
|
|
1015
|
+
{ primary: "#831843", secondary: "#9d174d", muted: "#f9a8d4" },
|
|
1016
|
+
"#f9a8d4"
|
|
1017
|
+
);
|
|
1018
|
+
f(
|
|
1019
|
+
"Pastel Sky",
|
|
1020
|
+
{
|
|
1021
|
+
primary: "#38bdf8",
|
|
1022
|
+
primaryHover: "#0ea5e9",
|
|
1023
|
+
success: "#4ade80",
|
|
1024
|
+
warning: "#fcd34d",
|
|
1025
|
+
error: "#fb7185",
|
|
1026
|
+
info: "#67e8f9"
|
|
1027
|
+
},
|
|
1028
|
+
{ primary: "#f0f9ff", secondary: "#e0f2fe", tertiary: "#bae6fd", hover: "#e0f2fe" },
|
|
1029
|
+
{ primary: "#075985", secondary: "#0369a1", muted: "#7dd3fc" },
|
|
1030
|
+
"#bae6fd"
|
|
1031
|
+
);
|
|
1032
|
+
f(
|
|
1033
|
+
"Pastel Mint",
|
|
1034
|
+
{
|
|
1035
|
+
primary: "#34d399",
|
|
1036
|
+
primaryHover: "#10b981",
|
|
1037
|
+
success: "#4ade80",
|
|
1038
|
+
warning: "#fcd34d",
|
|
1039
|
+
error: "#fb7185",
|
|
1040
|
+
info: "#67e8f9"
|
|
1041
|
+
},
|
|
1042
|
+
{ primary: "#ecfdf5", secondary: "#d1fae5", tertiary: "#a7f3d0", hover: "#d1fae5" },
|
|
1043
|
+
{ primary: "#065f46", secondary: "#047857", muted: "#6ee7b7" },
|
|
1044
|
+
"#a7f3d0"
|
|
1045
|
+
);
|
|
1046
|
+
f(
|
|
1047
|
+
"Pastel Peach",
|
|
1048
|
+
{
|
|
1049
|
+
primary: "#fb923c",
|
|
1050
|
+
primaryHover: "#f97316",
|
|
1051
|
+
success: "#4ade80",
|
|
1052
|
+
warning: "#fcd34d",
|
|
1053
|
+
error: "#fb7185",
|
|
1054
|
+
info: "#67e8f9"
|
|
1055
|
+
},
|
|
1056
|
+
{ primary: "#fff7ed", secondary: "#ffedd5", tertiary: "#fed7aa", hover: "#ffedd5" },
|
|
1057
|
+
{ primary: "#7c2d12", secondary: "#9a3412", muted: "#fdba74" },
|
|
1058
|
+
"#fed7aa"
|
|
1059
|
+
);
|
|
1060
|
+
f(
|
|
1061
|
+
"Pastel Lavender",
|
|
1062
|
+
{
|
|
1063
|
+
primary: "#a78bfa",
|
|
1064
|
+
primaryHover: "#8b5cf6",
|
|
1065
|
+
success: "#4ade80",
|
|
1066
|
+
warning: "#fcd34d",
|
|
1067
|
+
error: "#fb7185",
|
|
1068
|
+
info: "#67e8f9"
|
|
1069
|
+
},
|
|
1070
|
+
{ primary: "#f5f3ff", secondary: "#ede9fe", tertiary: "#ddd6fe", hover: "#ede9fe" },
|
|
1071
|
+
{ primary: "#4c1d95", secondary: "#5b21b6", muted: "#c4b5fd" },
|
|
1072
|
+
"#ddd6fe"
|
|
1073
|
+
);
|
|
1074
|
+
f(
|
|
1075
|
+
"Pastel Lemon",
|
|
1076
|
+
{
|
|
1077
|
+
primary: "#facc15",
|
|
1078
|
+
primaryHover: "#eab308",
|
|
1079
|
+
success: "#4ade80",
|
|
1080
|
+
warning: "#fcd34d",
|
|
1081
|
+
error: "#fb7185",
|
|
1082
|
+
info: "#67e8f9"
|
|
1083
|
+
},
|
|
1084
|
+
{ primary: "#fefce8", secondary: "#fef9c3", tertiary: "#fef08a", hover: "#fef9c3" },
|
|
1085
|
+
{ primary: "#713f12", secondary: "#854d0e", muted: "#fde047" },
|
|
1086
|
+
"#fef08a"
|
|
1087
|
+
);
|
|
1088
|
+
f(
|
|
1089
|
+
"Pastel Sage",
|
|
1090
|
+
{
|
|
1091
|
+
primary: "#86efac",
|
|
1092
|
+
primaryHover: "#4ade80",
|
|
1093
|
+
success: "#22c55e",
|
|
1094
|
+
warning: "#fcd34d",
|
|
1095
|
+
error: "#fb7185",
|
|
1096
|
+
info: "#67e8f9"
|
|
1097
|
+
},
|
|
1098
|
+
{ primary: "#f0fdf4", secondary: "#dcfce7", tertiary: "#bbf7d0", hover: "#dcfce7" },
|
|
1099
|
+
{ primary: "#166534", secondary: "#15803d", muted: "#86efac" },
|
|
1100
|
+
"#bbf7d0"
|
|
1101
|
+
);
|
|
1102
|
+
f(
|
|
1103
|
+
"Pastel Coral",
|
|
1104
|
+
{
|
|
1105
|
+
primary: "#fb7185",
|
|
1106
|
+
primaryHover: "#f43f5e",
|
|
1107
|
+
success: "#4ade80",
|
|
1108
|
+
warning: "#fcd34d",
|
|
1109
|
+
error: "#ef4444",
|
|
1110
|
+
info: "#67e8f9"
|
|
1111
|
+
},
|
|
1112
|
+
{ primary: "#fff1f2", secondary: "#ffe4e6", tertiary: "#fecdd3", hover: "#ffe4e6" },
|
|
1113
|
+
{ primary: "#881337", secondary: "#9f1239", muted: "#fda4af" },
|
|
1114
|
+
"#fecdd3"
|
|
1115
|
+
);
|
|
1116
|
+
f(
|
|
1117
|
+
"Banking",
|
|
1118
|
+
{
|
|
1119
|
+
primary: "#1e3a5f",
|
|
1120
|
+
primaryHover: "#152c4a",
|
|
1121
|
+
success: "#059669",
|
|
1122
|
+
warning: "#d97706",
|
|
1123
|
+
error: "#dc2626",
|
|
1124
|
+
info: "#0891b2"
|
|
1125
|
+
},
|
|
1126
|
+
{ primary: "#f8fafc", secondary: "#f1f5f9", tertiary: "#e2e8f0", hover: "#e2e8f0" },
|
|
1127
|
+
{ primary: "#0f172a", secondary: "#334155", muted: "#94a3b8" },
|
|
1128
|
+
"#cbd5e1"
|
|
1129
|
+
);
|
|
1130
|
+
f(
|
|
1131
|
+
"Healthcare",
|
|
1132
|
+
{
|
|
1133
|
+
primary: "#0891b2",
|
|
1134
|
+
primaryHover: "#0e7490",
|
|
1135
|
+
success: "#059669",
|
|
1136
|
+
warning: "#d97706",
|
|
1137
|
+
error: "#dc2626",
|
|
1138
|
+
info: "#0284c7"
|
|
1139
|
+
},
|
|
1140
|
+
{ primary: "#f0fdfa", secondary: "#e0f7fa", tertiary: "#b2ebf2", hover: "#e0f7fa" },
|
|
1141
|
+
{ primary: "#134e4a", secondary: "#1a6b6a", muted: "#80cbc4" },
|
|
1142
|
+
"#b2dfdb"
|
|
1143
|
+
);
|
|
1144
|
+
f(
|
|
1145
|
+
"Legal",
|
|
1146
|
+
{
|
|
1147
|
+
primary: "#1e293b",
|
|
1148
|
+
primaryHover: "#0f172a",
|
|
1149
|
+
success: "#059669",
|
|
1150
|
+
warning: "#d97706",
|
|
1151
|
+
error: "#dc2626",
|
|
1152
|
+
info: "#0284c7"
|
|
1153
|
+
},
|
|
1154
|
+
{ primary: "#fafaf9", secondary: "#f5f5f4", tertiary: "#e7e5e4", hover: "#e7e5e4" },
|
|
1155
|
+
{ primary: "#0f172a", secondary: "#44403c", muted: "#a8a29e" },
|
|
1156
|
+
"#d6d3d1"
|
|
1157
|
+
);
|
|
1158
|
+
f(
|
|
1159
|
+
"Tech Startup",
|
|
1160
|
+
{
|
|
1161
|
+
primary: "#7c3aed",
|
|
1162
|
+
primaryHover: "#6d28d9",
|
|
1163
|
+
success: "#10b981",
|
|
1164
|
+
warning: "#f59e0b",
|
|
1165
|
+
error: "#ef4444",
|
|
1166
|
+
info: "#06b6d4"
|
|
1167
|
+
},
|
|
1168
|
+
{ primary: "#faf5ff", secondary: "#f3e8ff", tertiary: "#e9d5ff", hover: "#f3e8ff" },
|
|
1169
|
+
{ primary: "#1e1b4b", secondary: "#4c1d95", muted: "#a78bfa" },
|
|
1170
|
+
"#c4b5fd"
|
|
1171
|
+
);
|
|
1172
|
+
f(
|
|
1173
|
+
"Enterprise",
|
|
1174
|
+
{
|
|
1175
|
+
primary: "#1e40af",
|
|
1176
|
+
primaryHover: "#1e3a8a",
|
|
1177
|
+
success: "#059669",
|
|
1178
|
+
warning: "#d97706",
|
|
1179
|
+
error: "#dc2626",
|
|
1180
|
+
info: "#0891b2"
|
|
1181
|
+
},
|
|
1182
|
+
{ primary: "#eff6ff", secondary: "#dbeafe", tertiary: "#bfdbfe", hover: "#dbeafe" },
|
|
1183
|
+
{ primary: "#1e3a5f", secondary: "#1e40af", muted: "#60a5fa" },
|
|
1184
|
+
"#93c5fd"
|
|
1185
|
+
);
|
|
1186
|
+
f(
|
|
1187
|
+
"Government",
|
|
1188
|
+
{
|
|
1189
|
+
primary: "#1d4ed8",
|
|
1190
|
+
primaryHover: "#1e40af",
|
|
1191
|
+
success: "#059669",
|
|
1192
|
+
warning: "#d97706",
|
|
1193
|
+
error: "#dc2626",
|
|
1194
|
+
info: "#0891b2"
|
|
1195
|
+
},
|
|
1196
|
+
{ primary: "#f8fafc", secondary: "#f1f5f9", tertiary: "#e2e8f0", hover: "#e2e8f0" },
|
|
1197
|
+
{ primary: "#0f172a", secondary: "#1e293b", muted: "#64748b" },
|
|
1198
|
+
"#cbd5e1"
|
|
1199
|
+
);
|
|
1200
|
+
f(
|
|
1201
|
+
"Education",
|
|
1202
|
+
{
|
|
1203
|
+
primary: "#059669",
|
|
1204
|
+
primaryHover: "#047857",
|
|
1205
|
+
success: "#16a34a",
|
|
1206
|
+
warning: "#f59e0b",
|
|
1207
|
+
error: "#ef4444",
|
|
1208
|
+
info: "#0891b2"
|
|
1209
|
+
},
|
|
1210
|
+
{ primary: "#f0fdf9", secondary: "#d1fae5", tertiary: "#a7f3d0", hover: "#d1fae5" },
|
|
1211
|
+
{ primary: "#064e3b", secondary: "#065f46", muted: "#6ee7b7" },
|
|
1212
|
+
"#a7f3d0"
|
|
1213
|
+
);
|
|
1214
|
+
f(
|
|
1215
|
+
"Real Estate",
|
|
1216
|
+
{
|
|
1217
|
+
primary: "#92400e",
|
|
1218
|
+
primaryHover: "#78350f",
|
|
1219
|
+
success: "#059669",
|
|
1220
|
+
warning: "#b45309",
|
|
1221
|
+
error: "#dc2626",
|
|
1222
|
+
info: "#0891b2"
|
|
1223
|
+
},
|
|
1224
|
+
{ primary: "#fffbeb", secondary: "#fef3c7", tertiary: "#fde68a", hover: "#fef3c7" },
|
|
1225
|
+
{ primary: "#422006", secondary: "#713f12", muted: "#d97706" },
|
|
1226
|
+
"#fcd34d"
|
|
1227
|
+
);
|
|
1228
|
+
f(
|
|
1229
|
+
"Nord",
|
|
1230
|
+
{
|
|
1231
|
+
primary: "#5e81ac",
|
|
1232
|
+
primaryHover: "#4c6b90",
|
|
1233
|
+
success: "#a3be8c",
|
|
1234
|
+
warning: "#ebcb8b",
|
|
1235
|
+
error: "#bf616a",
|
|
1236
|
+
info: "#88c0d0"
|
|
1237
|
+
},
|
|
1238
|
+
{ primary: "#eceff4", secondary: "#e5e9f0", tertiary: "#d8dee9", hover: "#d8dee9" },
|
|
1239
|
+
{ primary: "#2e3440", secondary: "#3b4252", muted: "#4c566a" },
|
|
1240
|
+
"#d8dee9"
|
|
1241
|
+
);
|
|
1242
|
+
H(
|
|
1243
|
+
"Dracula",
|
|
1244
|
+
{
|
|
1245
|
+
primary: "#bd93f9",
|
|
1246
|
+
primaryHover: "#9d79d9",
|
|
1247
|
+
success: "#50fa7b",
|
|
1248
|
+
warning: "#f1fa8c",
|
|
1249
|
+
error: "#ff5555",
|
|
1250
|
+
info: "#8be9fd"
|
|
1251
|
+
},
|
|
1252
|
+
{ primary: "#282a36", secondary: "#343746", tertiary: "#44475a", hover: "#44475a" },
|
|
1253
|
+
{ primary: "#f8f8f2", secondary: "#c0c0c0", muted: "#6272a4" },
|
|
1254
|
+
"#44475a"
|
|
1255
|
+
);
|
|
1256
|
+
f(
|
|
1257
|
+
"Solarized Light",
|
|
1258
|
+
{
|
|
1259
|
+
primary: "#268bd2",
|
|
1260
|
+
primaryHover: "#1a6da0",
|
|
1261
|
+
success: "#859900",
|
|
1262
|
+
warning: "#b58900",
|
|
1263
|
+
error: "#dc322f",
|
|
1264
|
+
info: "#2aa198"
|
|
1265
|
+
},
|
|
1266
|
+
{ primary: "#fdf6e3", secondary: "#eee8d5", tertiary: "#e0dbc7", hover: "#eee8d5" },
|
|
1267
|
+
{ primary: "#073642", secondary: "#586e75", muted: "#93a1a1" },
|
|
1268
|
+
"#eee8d5"
|
|
1269
|
+
);
|
|
1270
|
+
H(
|
|
1271
|
+
"Solarized Dark",
|
|
1272
|
+
{
|
|
1273
|
+
primary: "#268bd2",
|
|
1274
|
+
primaryHover: "#3d98db",
|
|
1275
|
+
success: "#859900",
|
|
1276
|
+
warning: "#b58900",
|
|
1277
|
+
error: "#dc322f",
|
|
1278
|
+
info: "#2aa198"
|
|
1279
|
+
},
|
|
1280
|
+
{ primary: "#002b36", secondary: "#073642", tertiary: "#0a4858", hover: "#073642" },
|
|
1281
|
+
{ primary: "#eee8d5", secondary: "#93a1a1", muted: "#586e75" },
|
|
1282
|
+
"#073642"
|
|
1283
|
+
);
|
|
1284
|
+
H(
|
|
1285
|
+
"Monokai",
|
|
1286
|
+
{
|
|
1287
|
+
primary: "#66d9ef",
|
|
1288
|
+
primaryHover: "#45c0d6",
|
|
1289
|
+
success: "#a6e22e",
|
|
1290
|
+
warning: "#e6db74",
|
|
1291
|
+
error: "#f92672",
|
|
1292
|
+
info: "#66d9ef"
|
|
1293
|
+
},
|
|
1294
|
+
{ primary: "#272822", secondary: "#34352e", tertiary: "#3e3d32", hover: "#3e3d32" },
|
|
1295
|
+
{ primary: "#f8f8f2", secondary: "#cfcfc2", muted: "#75715e" },
|
|
1296
|
+
"#3e3d32"
|
|
1297
|
+
);
|
|
1298
|
+
H(
|
|
1299
|
+
"One Dark",
|
|
1300
|
+
{
|
|
1301
|
+
primary: "#61afef",
|
|
1302
|
+
primaryHover: "#4b9ee0",
|
|
1303
|
+
success: "#98c379",
|
|
1304
|
+
warning: "#e5c07b",
|
|
1305
|
+
error: "#e06c75",
|
|
1306
|
+
info: "#56b6c2"
|
|
1307
|
+
},
|
|
1308
|
+
{ primary: "#282c34", secondary: "#2c313a", tertiary: "#353b45", hover: "#353b45" },
|
|
1309
|
+
{ primary: "#abb2bf", secondary: "#828997", muted: "#545862" },
|
|
1310
|
+
"#3e4452"
|
|
1311
|
+
);
|
|
1312
|
+
H(
|
|
1313
|
+
"Synthwave",
|
|
1314
|
+
{
|
|
1315
|
+
primary: "#ff7edb",
|
|
1316
|
+
primaryHover: "#e660c2",
|
|
1317
|
+
success: "#72f1b8",
|
|
1318
|
+
warning: "#fede5d",
|
|
1319
|
+
error: "#fe4450",
|
|
1320
|
+
info: "#36f9f6"
|
|
1321
|
+
},
|
|
1322
|
+
{ primary: "#241b2f", secondary: "#2d2140", tertiary: "#362a50", hover: "#362a50" },
|
|
1323
|
+
{ primary: "#f0e4fc", secondary: "#b4a0cc", muted: "#6c5c84" },
|
|
1324
|
+
"#4a3866"
|
|
1325
|
+
);
|
|
1326
|
+
f(
|
|
1327
|
+
"Vaporwave",
|
|
1328
|
+
{
|
|
1329
|
+
primary: "#ff71ce",
|
|
1330
|
+
primaryHover: "#e655b5",
|
|
1331
|
+
success: "#78dcca",
|
|
1332
|
+
warning: "#ffb86c",
|
|
1333
|
+
error: "#ff5555",
|
|
1334
|
+
info: "#76e8fc"
|
|
1335
|
+
},
|
|
1336
|
+
{ primary: "#fce4f7", secondary: "#e8d0f4", tertiary: "#d4bcf0", hover: "#e8d0f4" },
|
|
1337
|
+
{ primary: "#4a1a4e", secondary: "#7b3f7d", muted: "#c080c0" },
|
|
1338
|
+
"#d8a8e8"
|
|
1339
|
+
);
|
|
1340
|
+
H(
|
|
1341
|
+
"Terminal Green",
|
|
1342
|
+
{
|
|
1343
|
+
primary: "#00ff41",
|
|
1344
|
+
primaryHover: "#00cc34",
|
|
1345
|
+
success: "#00ff41",
|
|
1346
|
+
warning: "#ffff00",
|
|
1347
|
+
error: "#ff0000",
|
|
1348
|
+
info: "#00ffff"
|
|
1349
|
+
},
|
|
1350
|
+
{ primary: "#0a0a0a", secondary: "#0d1a0d", tertiary: "#1a2e1a", hover: "#1a2e1a" },
|
|
1351
|
+
{ primary: "#00ff41", secondary: "#00cc33", muted: "#008822" },
|
|
1352
|
+
"#003300"
|
|
1353
|
+
);
|
|
1354
|
+
f(
|
|
1355
|
+
"Sepia",
|
|
1356
|
+
{
|
|
1357
|
+
primary: "#8b6914",
|
|
1358
|
+
primaryHover: "#704f10",
|
|
1359
|
+
success: "#6b8e23",
|
|
1360
|
+
warning: "#cd853f",
|
|
1361
|
+
error: "#b22222",
|
|
1362
|
+
info: "#5f9ea0"
|
|
1363
|
+
},
|
|
1364
|
+
{ primary: "#faf0e6", secondary: "#f5e6d3", tertiary: "#eddcc7", hover: "#f5e6d3" },
|
|
1365
|
+
{ primary: "#3e2723", secondary: "#5d4037", muted: "#a1887f" },
|
|
1366
|
+
"#d7ccc8"
|
|
1367
|
+
);
|
|
1368
|
+
f(
|
|
1369
|
+
"Vintage",
|
|
1370
|
+
{
|
|
1371
|
+
primary: "#8d6e63",
|
|
1372
|
+
primaryHover: "#6d4c41",
|
|
1373
|
+
success: "#66bb6a",
|
|
1374
|
+
warning: "#ffb300",
|
|
1375
|
+
error: "#e53935",
|
|
1376
|
+
info: "#29b6f6"
|
|
1377
|
+
},
|
|
1378
|
+
{ primary: "#efebe9", secondary: "#d7ccc8", tertiary: "#bcaaa4", hover: "#d7ccc8" },
|
|
1379
|
+
{ primary: "#3e2723", secondary: "#5d4037", muted: "#a1887f" },
|
|
1380
|
+
"#bcaaa4"
|
|
1381
|
+
);
|
|
1382
|
+
H(
|
|
1383
|
+
"Cyberpunk",
|
|
1384
|
+
{
|
|
1385
|
+
primary: "#00f0ff",
|
|
1386
|
+
primaryHover: "#00c8d4",
|
|
1387
|
+
success: "#39ff14",
|
|
1388
|
+
warning: "#ffff00",
|
|
1389
|
+
error: "#ff003c",
|
|
1390
|
+
info: "#bf00ff"
|
|
1391
|
+
},
|
|
1392
|
+
{ primary: "#0a0e17", secondary: "#131824", tertiary: "#1c2333", hover: "#1c2333" },
|
|
1393
|
+
{ primary: "#e0fbfc", secondary: "#80d4dd", muted: "#3a6b72" },
|
|
1394
|
+
"#1c3a44"
|
|
1395
|
+
);
|
|
1396
|
+
H(
|
|
1397
|
+
"Neon",
|
|
1398
|
+
{
|
|
1399
|
+
primary: "#ff00ff",
|
|
1400
|
+
primaryHover: "#cc00cc",
|
|
1401
|
+
success: "#00ff00",
|
|
1402
|
+
warning: "#ffff00",
|
|
1403
|
+
error: "#ff0000",
|
|
1404
|
+
info: "#00ffff"
|
|
1405
|
+
},
|
|
1406
|
+
{ primary: "#0d0d0d", secondary: "#1a1a1a", tertiary: "#262626", hover: "#262626" },
|
|
1407
|
+
{ primary: "#ffffff", secondary: "#cccccc", muted: "#666666" },
|
|
1408
|
+
"#333333"
|
|
1409
|
+
);
|
|
1410
|
+
H(
|
|
1411
|
+
"Retrowave",
|
|
1412
|
+
{
|
|
1413
|
+
primary: "#f77fbe",
|
|
1414
|
+
primaryHover: "#e462a3",
|
|
1415
|
+
success: "#72f1b8",
|
|
1416
|
+
warning: "#ffe261",
|
|
1417
|
+
error: "#ff4444",
|
|
1418
|
+
info: "#79e8fb"
|
|
1419
|
+
},
|
|
1420
|
+
{ primary: "#1b0a2e", secondary: "#261440", tertiary: "#321e52", hover: "#321e52" },
|
|
1421
|
+
{ primary: "#ffe6f7", secondary: "#c9a0c9", muted: "#6b4c7a" },
|
|
1422
|
+
"#4a2d66"
|
|
1423
|
+
);
|
|
1424
|
+
f(
|
|
1425
|
+
"Christmas",
|
|
1426
|
+
{
|
|
1427
|
+
primary: "#c41e3a",
|
|
1428
|
+
primaryHover: "#a01830",
|
|
1429
|
+
success: "#228b22",
|
|
1430
|
+
warning: "#ffd700",
|
|
1431
|
+
error: "#dc2626",
|
|
1432
|
+
info: "#0891b2"
|
|
1433
|
+
},
|
|
1434
|
+
{ primary: "#fef2f2", secondary: "#fde8e8", tertiary: "#f8d0d0", hover: "#fde8e8" },
|
|
1435
|
+
{ primary: "#3b0a0a", secondary: "#7f1d1d", muted: "#dc6868" },
|
|
1436
|
+
"#e8a0a0"
|
|
1437
|
+
);
|
|
1438
|
+
H(
|
|
1439
|
+
"Halloween",
|
|
1440
|
+
{
|
|
1441
|
+
primary: "#ff6600",
|
|
1442
|
+
primaryHover: "#e05500",
|
|
1443
|
+
success: "#4ade80",
|
|
1444
|
+
warning: "#fbbf24",
|
|
1445
|
+
error: "#ff0000",
|
|
1446
|
+
info: "#9333ea"
|
|
1447
|
+
},
|
|
1448
|
+
{ primary: "#1a0a00", secondary: "#2d1500", tertiary: "#402000", hover: "#402000" },
|
|
1449
|
+
{ primary: "#ffedd5", secondary: "#fdba74", muted: "#9a5c28" },
|
|
1450
|
+
"#5c3400"
|
|
1451
|
+
);
|
|
1452
|
+
f(
|
|
1453
|
+
"Valentine",
|
|
1454
|
+
{
|
|
1455
|
+
primary: "#e11d48",
|
|
1456
|
+
primaryHover: "#be123c",
|
|
1457
|
+
success: "#10b981",
|
|
1458
|
+
warning: "#f59e0b",
|
|
1459
|
+
error: "#dc2626",
|
|
1460
|
+
info: "#ec4899"
|
|
1461
|
+
},
|
|
1462
|
+
{ primary: "#fff1f2", secondary: "#ffe4e6", tertiary: "#fecdd3", hover: "#ffe4e6" },
|
|
1463
|
+
{ primary: "#4c0519", secondary: "#881337", muted: "#f9a8d4" },
|
|
1464
|
+
"#fda4af"
|
|
1465
|
+
);
|
|
1466
|
+
f(
|
|
1467
|
+
"Easter",
|
|
1468
|
+
{
|
|
1469
|
+
primary: "#a78bfa",
|
|
1470
|
+
primaryHover: "#8b5cf6",
|
|
1471
|
+
success: "#4ade80",
|
|
1472
|
+
warning: "#fcd34d",
|
|
1473
|
+
error: "#fb7185",
|
|
1474
|
+
info: "#67e8f9"
|
|
1475
|
+
},
|
|
1476
|
+
{ primary: "#fef9ff", secondary: "#f3e8ff", tertiary: "#e8d5ff", hover: "#f3e8ff" },
|
|
1477
|
+
{ primary: "#581c87", secondary: "#6d28d9", muted: "#c4b5fd" },
|
|
1478
|
+
"#ddd6fe"
|
|
1479
|
+
);
|
|
1480
|
+
f(
|
|
1481
|
+
"Summer Beach",
|
|
1482
|
+
{
|
|
1483
|
+
primary: "#0ea5e9",
|
|
1484
|
+
primaryHover: "#0284c7",
|
|
1485
|
+
success: "#10b981",
|
|
1486
|
+
warning: "#f59e0b",
|
|
1487
|
+
error: "#ef4444",
|
|
1488
|
+
info: "#06b6d4"
|
|
1489
|
+
},
|
|
1490
|
+
{ primary: "#fffbeb", secondary: "#fef3c7", tertiary: "#fde68a", hover: "#fef3c7" },
|
|
1491
|
+
{ primary: "#0c4a6e", secondary: "#0369a1", muted: "#7dd3fc" },
|
|
1492
|
+
"#fcd34d"
|
|
1493
|
+
);
|
|
1494
|
+
f(
|
|
1495
|
+
"Winter Frost",
|
|
1496
|
+
{
|
|
1497
|
+
primary: "#3b82f6",
|
|
1498
|
+
primaryHover: "#2563eb",
|
|
1499
|
+
success: "#10b981",
|
|
1500
|
+
warning: "#f59e0b",
|
|
1501
|
+
error: "#ef4444",
|
|
1502
|
+
info: "#06b6d4"
|
|
1503
|
+
},
|
|
1504
|
+
{ primary: "#f0f9ff", secondary: "#e0f2fe", tertiary: "#bae6fd", hover: "#e0f2fe" },
|
|
1505
|
+
{ primary: "#1e3a5f", secondary: "#1e40af", muted: "#93c5fd" },
|
|
1506
|
+
"#bfdbfe"
|
|
1507
|
+
);
|
|
1508
|
+
f(
|
|
1509
|
+
"Cherry Blossom",
|
|
1510
|
+
{
|
|
1511
|
+
primary: "#ec4899",
|
|
1512
|
+
primaryHover: "#db2777",
|
|
1513
|
+
success: "#10b981",
|
|
1514
|
+
warning: "#f59e0b",
|
|
1515
|
+
error: "#ef4444",
|
|
1516
|
+
info: "#06b6d4"
|
|
1517
|
+
},
|
|
1518
|
+
{ primary: "#fdf2f8", secondary: "#fce7f3", tertiary: "#fbcfe8", hover: "#fce7f3" },
|
|
1519
|
+
{ primary: "#831843", secondary: "#9d174d", muted: "#f9a8d4" },
|
|
1520
|
+
"#fbcfe8"
|
|
1521
|
+
);
|
|
1522
|
+
f(
|
|
1523
|
+
"Harvest",
|
|
1524
|
+
{
|
|
1525
|
+
primary: "#b45309",
|
|
1526
|
+
primaryHover: "#92400e",
|
|
1527
|
+
success: "#4d7c0f",
|
|
1528
|
+
warning: "#a16207",
|
|
1529
|
+
error: "#b91c1c",
|
|
1530
|
+
info: "#0e7490"
|
|
1531
|
+
},
|
|
1532
|
+
{ primary: "#fffbeb", secondary: "#fef3c7", tertiary: "#fde68a", hover: "#fef3c7" },
|
|
1533
|
+
{ primary: "#451a03", secondary: "#78350f", muted: "#d97706" },
|
|
1534
|
+
"#fcd34d"
|
|
1535
|
+
);
|
|
1536
|
+
f(
|
|
1537
|
+
"Japanese Zen",
|
|
1538
|
+
{
|
|
1539
|
+
primary: "#6b7280",
|
|
1540
|
+
primaryHover: "#4b5563",
|
|
1541
|
+
success: "#6b8e23",
|
|
1542
|
+
warning: "#d4a017",
|
|
1543
|
+
error: "#c0392b",
|
|
1544
|
+
info: "#5f9ea0"
|
|
1545
|
+
},
|
|
1546
|
+
{ primary: "#faf9f6", secondary: "#f0ece3", tertiary: "#e6e0d4", hover: "#f0ece3" },
|
|
1547
|
+
{ primary: "#2c2c2c", secondary: "#5c5c5c", muted: "#a0998a" },
|
|
1548
|
+
"#d5cec0"
|
|
1549
|
+
);
|
|
1550
|
+
f(
|
|
1551
|
+
"Moroccan",
|
|
1552
|
+
{
|
|
1553
|
+
primary: "#c2410c",
|
|
1554
|
+
primaryHover: "#9a3412",
|
|
1555
|
+
success: "#15803d",
|
|
1556
|
+
warning: "#ca8a04",
|
|
1557
|
+
error: "#b91c1c",
|
|
1558
|
+
info: "#0e7490"
|
|
1559
|
+
},
|
|
1560
|
+
{ primary: "#fffbf0", secondary: "#fef3e0", tertiary: "#fde6c4", hover: "#fef3e0" },
|
|
1561
|
+
{ primary: "#3a1a00", secondary: "#7c2d12", muted: "#d97706" },
|
|
1562
|
+
"#f5d0a0"
|
|
1563
|
+
);
|
|
1564
|
+
f(
|
|
1565
|
+
"Scandinavian",
|
|
1566
|
+
{
|
|
1567
|
+
primary: "#4b5563",
|
|
1568
|
+
primaryHover: "#374151",
|
|
1569
|
+
success: "#059669",
|
|
1570
|
+
warning: "#d97706",
|
|
1571
|
+
error: "#dc2626",
|
|
1572
|
+
info: "#0891b2"
|
|
1573
|
+
},
|
|
1574
|
+
{ primary: "#ffffff", secondary: "#f9fafb", tertiary: "#f3f4f6", hover: "#f3f4f6" },
|
|
1575
|
+
{ primary: "#111827", secondary: "#374151", muted: "#9ca3af" },
|
|
1576
|
+
"#e5e7eb"
|
|
1577
|
+
);
|
|
1578
|
+
f(
|
|
1579
|
+
"Mediterranean",
|
|
1580
|
+
{
|
|
1581
|
+
primary: "#1e40af",
|
|
1582
|
+
primaryHover: "#1e3a8a",
|
|
1583
|
+
success: "#059669",
|
|
1584
|
+
warning: "#d97706",
|
|
1585
|
+
error: "#dc2626",
|
|
1586
|
+
info: "#0891b2"
|
|
1587
|
+
},
|
|
1588
|
+
{ primary: "#eff6ff", secondary: "#dbeafe", tertiary: "#bfdbfe", hover: "#dbeafe" },
|
|
1589
|
+
{ primary: "#1e3a5f", secondary: "#2563eb", muted: "#93c5fd" },
|
|
1590
|
+
"#bfdbfe"
|
|
1591
|
+
);
|
|
1592
|
+
f(
|
|
1593
|
+
"Chinese New Year",
|
|
1594
|
+
{
|
|
1595
|
+
primary: "#dc2626",
|
|
1596
|
+
primaryHover: "#b91c1c",
|
|
1597
|
+
success: "#16a34a",
|
|
1598
|
+
warning: "#d4a017",
|
|
1599
|
+
error: "#ef4444",
|
|
1600
|
+
info: "#0891b2"
|
|
1601
|
+
},
|
|
1602
|
+
{ primary: "#fef2f2", secondary: "#fee2e2", tertiary: "#fecaca", hover: "#fee2e2" },
|
|
1603
|
+
{ primary: "#450a0a", secondary: "#991b1b", muted: "#f87171" },
|
|
1604
|
+
"#fca5a5"
|
|
1605
|
+
);
|
|
1606
|
+
f(
|
|
1607
|
+
"Indian Festive",
|
|
1608
|
+
{
|
|
1609
|
+
primary: "#d97706",
|
|
1610
|
+
primaryHover: "#b45309",
|
|
1611
|
+
success: "#16a34a",
|
|
1612
|
+
warning: "#ca8a04",
|
|
1613
|
+
error: "#dc2626",
|
|
1614
|
+
info: "#7c3aed"
|
|
1615
|
+
},
|
|
1616
|
+
{ primary: "#fffbeb", secondary: "#fef3c7", tertiary: "#fde68a", hover: "#fef3c7" },
|
|
1617
|
+
{ primary: "#451a03", secondary: "#92400e", muted: "#f59e0b" },
|
|
1618
|
+
"#fcd34d"
|
|
1619
|
+
);
|
|
1620
|
+
f(
|
|
1621
|
+
"Brazilian Carnival",
|
|
1622
|
+
{
|
|
1623
|
+
primary: "#16a34a",
|
|
1624
|
+
primaryHover: "#15803d",
|
|
1625
|
+
success: "#22c55e",
|
|
1626
|
+
warning: "#facc15",
|
|
1627
|
+
error: "#ef4444",
|
|
1628
|
+
info: "#0ea5e9"
|
|
1629
|
+
},
|
|
1630
|
+
{ primary: "#f0fdf4", secondary: "#dcfce7", tertiary: "#bbf7d0", hover: "#dcfce7" },
|
|
1631
|
+
{ primary: "#052e16", secondary: "#166534", muted: "#4ade80" },
|
|
1632
|
+
"#86efac"
|
|
1633
|
+
);
|
|
1634
|
+
f(
|
|
1635
|
+
"African Earth",
|
|
1636
|
+
{
|
|
1637
|
+
primary: "#92400e",
|
|
1638
|
+
primaryHover: "#78350f",
|
|
1639
|
+
success: "#4d7c0f",
|
|
1640
|
+
warning: "#a16207",
|
|
1641
|
+
error: "#b91c1c",
|
|
1642
|
+
info: "#0e7490"
|
|
1643
|
+
},
|
|
1644
|
+
{ primary: "#faf5f0", secondary: "#f0e6d6", tertiary: "#e6d5bb", hover: "#f0e6d6" },
|
|
1645
|
+
{ primary: "#2b1a0e", secondary: "#5c3d1e", muted: "#a08060" },
|
|
1646
|
+
"#d4b896"
|
|
1647
|
+
);
|
|
1648
|
+
H(
|
|
1649
|
+
"High Contrast Dark",
|
|
1650
|
+
{
|
|
1651
|
+
primary: "#ffff00",
|
|
1652
|
+
primaryHover: "#cccc00",
|
|
1653
|
+
success: "#00ff00",
|
|
1654
|
+
warning: "#ff8c00",
|
|
1655
|
+
error: "#ff0000",
|
|
1656
|
+
info: "#00ffff"
|
|
1657
|
+
},
|
|
1658
|
+
{ primary: "#000000", secondary: "#1a1a1a", tertiary: "#333333", hover: "#333333" },
|
|
1659
|
+
{ primary: "#ffffff", secondary: "#ffffff", muted: "#cccccc" },
|
|
1660
|
+
"#ffffff"
|
|
1661
|
+
);
|
|
1662
|
+
f(
|
|
1663
|
+
"Monochrome",
|
|
1664
|
+
{
|
|
1665
|
+
primary: "#404040",
|
|
1666
|
+
primaryHover: "#262626",
|
|
1667
|
+
success: "#4d7c0f",
|
|
1668
|
+
warning: "#a16207",
|
|
1669
|
+
error: "#b91c1c",
|
|
1670
|
+
info: "#0e7490"
|
|
1671
|
+
},
|
|
1672
|
+
{ primary: "#fafafa", secondary: "#f0f0f0", tertiary: "#e0e0e0", hover: "#e0e0e0" },
|
|
1673
|
+
{ primary: "#1a1a1a", secondary: "#404040", muted: "#808080" },
|
|
1674
|
+
"#c0c0c0"
|
|
1675
|
+
);
|
|
1676
|
+
f(
|
|
1677
|
+
"Enhanced Contrast",
|
|
1678
|
+
{
|
|
1679
|
+
primary: "#0050b3",
|
|
1680
|
+
primaryHover: "#003d8c",
|
|
1681
|
+
success: "#006400",
|
|
1682
|
+
warning: "#cc7000",
|
|
1683
|
+
error: "#cc0000",
|
|
1684
|
+
info: "#006680"
|
|
1685
|
+
},
|
|
1686
|
+
{ primary: "#ffffff", secondary: "#f5f5f5", tertiary: "#ebebeb", hover: "#ebebeb" },
|
|
1687
|
+
{ primary: "#000000", secondary: "#1a1a1a", muted: "#595959" },
|
|
1688
|
+
"#8c8c8c"
|
|
1689
|
+
);
|
|
1690
|
+
f(
|
|
1691
|
+
"Minimalist",
|
|
1692
|
+
{
|
|
1693
|
+
primary: "#18181b",
|
|
1694
|
+
primaryHover: "#27272a",
|
|
1695
|
+
success: "#22c55e",
|
|
1696
|
+
warning: "#eab308",
|
|
1697
|
+
error: "#ef4444",
|
|
1698
|
+
info: "#3b82f6"
|
|
1699
|
+
},
|
|
1700
|
+
{ primary: "#ffffff", secondary: "#fafafa", tertiary: "#f5f5f5", hover: "#f5f5f5" },
|
|
1701
|
+
{ primary: "#0a0a0a", secondary: "#404040", muted: "#a3a3a3" },
|
|
1702
|
+
"#e5e5e5"
|
|
1703
|
+
);
|
|
1704
|
+
H(
|
|
1705
|
+
"Warm Dark",
|
|
1706
|
+
{
|
|
1707
|
+
primary: "#f59e0b",
|
|
1708
|
+
primaryHover: "#d97706",
|
|
1709
|
+
success: "#10b981",
|
|
1710
|
+
warning: "#fbbf24",
|
|
1711
|
+
error: "#f87171",
|
|
1712
|
+
info: "#38bdf8"
|
|
1713
|
+
},
|
|
1714
|
+
{ primary: "#1c1917", secondary: "#292524", tertiary: "#44403c", hover: "#44403c" },
|
|
1715
|
+
{ primary: "#fafaf9", secondary: "#d6d3d1", muted: "#78716c" },
|
|
1716
|
+
"#57534e"
|
|
1717
|
+
);
|
|
1718
|
+
H(
|
|
1719
|
+
"Soft Dark",
|
|
1720
|
+
{
|
|
1721
|
+
primary: "#a78bfa",
|
|
1722
|
+
primaryHover: "#8b5cf6",
|
|
1723
|
+
success: "#34d399",
|
|
1724
|
+
warning: "#fcd34d",
|
|
1725
|
+
error: "#fb7185",
|
|
1726
|
+
info: "#67e8f9"
|
|
1727
|
+
},
|
|
1728
|
+
{ primary: "#1e1e2e", secondary: "#262637", tertiary: "#313147", hover: "#313147" },
|
|
1729
|
+
{ primary: "#e8e8f0", secondary: "#a0a0b8", muted: "#5c5c74" },
|
|
1730
|
+
"#3e3e58"
|
|
1731
|
+
);
|
|
1732
|
+
f(
|
|
1733
|
+
"Coffee",
|
|
1734
|
+
{
|
|
1735
|
+
primary: "#6f4e37",
|
|
1736
|
+
primaryHover: "#5c3d28",
|
|
1737
|
+
success: "#4d7c0f",
|
|
1738
|
+
warning: "#a16207",
|
|
1739
|
+
error: "#b91c1c",
|
|
1740
|
+
info: "#0e7490"
|
|
1741
|
+
},
|
|
1742
|
+
{ primary: "#faf6f1", secondary: "#f0e8dc", tertiary: "#e6d8c6", hover: "#f0e8dc" },
|
|
1743
|
+
{ primary: "#2c1a0e", secondary: "#5c3d28", muted: "#a08868" },
|
|
1744
|
+
"#d4c4a8"
|
|
1745
|
+
);
|
|
1746
|
+
f(
|
|
1747
|
+
"Wine",
|
|
1748
|
+
{
|
|
1749
|
+
primary: "#7f1d1d",
|
|
1750
|
+
primaryHover: "#641717",
|
|
1751
|
+
success: "#059669",
|
|
1752
|
+
warning: "#d97706",
|
|
1753
|
+
error: "#dc2626",
|
|
1754
|
+
info: "#0891b2"
|
|
1755
|
+
},
|
|
1756
|
+
{ primary: "#fef2f2", secondary: "#fde8e8", tertiary: "#f8d0d0", hover: "#fde8e8" },
|
|
1757
|
+
{ primary: "#3b0a0a", secondary: "#7f1d1d", muted: "#dc6868" },
|
|
1758
|
+
"#e8a0a0"
|
|
1759
|
+
);
|
|
1760
|
+
L(null);
|
|
1761
|
+
const Ne = [
|
|
1762
|
+
{
|
|
1763
|
+
target: ".nice-report-builder",
|
|
1764
|
+
titleKey: "tutorial.biReportBuilder.intro.title",
|
|
1765
|
+
title: "Report builder",
|
|
1766
|
+
contentKey: "tutorial.biReportBuilder.intro.content",
|
|
1767
|
+
content: "Drag elements from the palette onto the report, bind them to data sources, switch design/preview, then export to PDF or Excel.",
|
|
1768
|
+
placement: "auto"
|
|
1769
|
+
}
|
|
1770
|
+
], Se = {
|
|
4
1771
|
id: "",
|
|
5
1772
|
name: "New Report",
|
|
6
1773
|
dataSource: "",
|
|
@@ -20,7 +1787,7 @@ const Y = {
|
|
|
20
1787
|
alternateRowColors: !0,
|
|
21
1788
|
gridLines: !0
|
|
22
1789
|
}
|
|
23
|
-
},
|
|
1790
|
+
}, G = [
|
|
24
1791
|
{ type: "table", label: "Table", icon: "📊" },
|
|
25
1792
|
{ type: "chart", label: "Chart", icon: "📈" },
|
|
26
1793
|
{ type: "text", label: "Text", icon: "📝" },
|
|
@@ -31,155 +1798,157 @@ const Y = {
|
|
|
31
1798
|
{ type: "subreport", label: "Subreport", icon: "📋" },
|
|
32
1799
|
{ type: "page-break", label: "Page Break", icon: "📄" }
|
|
33
1800
|
];
|
|
34
|
-
function
|
|
35
|
-
report:
|
|
36
|
-
dataSources:
|
|
37
|
-
onChange:
|
|
1801
|
+
function Qe({
|
|
1802
|
+
report: r,
|
|
1803
|
+
dataSources: i = [],
|
|
1804
|
+
onChange: n,
|
|
38
1805
|
onPreview: s,
|
|
39
|
-
onExport:
|
|
40
|
-
className:
|
|
1806
|
+
onExport: c,
|
|
1807
|
+
className: u = "",
|
|
1808
|
+
tutorial: m
|
|
41
1809
|
}) {
|
|
42
|
-
const [
|
|
43
|
-
|
|
44
|
-
), [
|
|
45
|
-
(
|
|
46
|
-
|
|
47
|
-
const
|
|
48
|
-
return
|
|
1810
|
+
const [o, v] = D(
|
|
1811
|
+
r || { ...Se, id: crypto.randomUUID() }
|
|
1812
|
+
), [d, h] = D(null), [l, g] = D("design"), [E, T] = D(null), [M, N] = D(100), C = k(
|
|
1813
|
+
(t) => {
|
|
1814
|
+
v((b) => {
|
|
1815
|
+
const _ = t(b);
|
|
1816
|
+
return n == null || n(_), _;
|
|
49
1817
|
});
|
|
50
1818
|
},
|
|
51
|
-
[
|
|
52
|
-
),
|
|
53
|
-
(
|
|
54
|
-
const
|
|
1819
|
+
[n]
|
|
1820
|
+
), P = k(
|
|
1821
|
+
(t, b) => {
|
|
1822
|
+
const _ = {
|
|
55
1823
|
id: crypto.randomUUID(),
|
|
56
|
-
type:
|
|
1824
|
+
type: t,
|
|
57
1825
|
position: {
|
|
58
|
-
x:
|
|
59
|
-
y:
|
|
1826
|
+
x: b.x,
|
|
1827
|
+
y: b.y,
|
|
60
1828
|
width: 200,
|
|
61
|
-
height:
|
|
1829
|
+
height: t === "page-break" ? 20 : 100
|
|
62
1830
|
},
|
|
63
|
-
config:
|
|
1831
|
+
config: Ce(t),
|
|
64
1832
|
style: {}
|
|
65
1833
|
};
|
|
66
|
-
|
|
67
|
-
...
|
|
1834
|
+
C((R) => ({
|
|
1835
|
+
...R,
|
|
68
1836
|
layout: {
|
|
69
|
-
...
|
|
70
|
-
elements: [...
|
|
1837
|
+
...R.layout,
|
|
1838
|
+
elements: [...R.layout.elements, _]
|
|
71
1839
|
}
|
|
72
|
-
})),
|
|
1840
|
+
})), h(_);
|
|
73
1841
|
},
|
|
74
|
-
[
|
|
75
|
-
),
|
|
76
|
-
(
|
|
77
|
-
|
|
78
|
-
...
|
|
1842
|
+
[C]
|
|
1843
|
+
), I = k(
|
|
1844
|
+
(t, b) => {
|
|
1845
|
+
C((_) => ({
|
|
1846
|
+
..._,
|
|
79
1847
|
layout: {
|
|
80
|
-
...
|
|
81
|
-
elements:
|
|
82
|
-
(
|
|
1848
|
+
..._.layout,
|
|
1849
|
+
elements: _.layout.elements.map(
|
|
1850
|
+
(R) => R.id === t ? { ...R, ...b } : R
|
|
83
1851
|
)
|
|
84
1852
|
}
|
|
85
|
-
})), (
|
|
1853
|
+
})), (d == null ? void 0 : d.id) === t && h((_) => _ ? { ..._, ...b } : null);
|
|
86
1854
|
},
|
|
87
|
-
[
|
|
88
|
-
),
|
|
89
|
-
(
|
|
90
|
-
|
|
91
|
-
...
|
|
1855
|
+
[C, d]
|
|
1856
|
+
), S = k(
|
|
1857
|
+
(t) => {
|
|
1858
|
+
C((b) => ({
|
|
1859
|
+
...b,
|
|
92
1860
|
layout: {
|
|
93
|
-
...
|
|
94
|
-
elements:
|
|
1861
|
+
...b.layout,
|
|
1862
|
+
elements: b.layout.elements.filter((_) => _.id !== t)
|
|
95
1863
|
}
|
|
96
|
-
})),
|
|
1864
|
+
})), h(null);
|
|
97
1865
|
},
|
|
98
|
-
[
|
|
99
|
-
),
|
|
100
|
-
(
|
|
101
|
-
if (
|
|
1866
|
+
[C]
|
|
1867
|
+
), z = k(
|
|
1868
|
+
(t) => {
|
|
1869
|
+
if (t.preventDefault(), !E)
|
|
102
1870
|
return;
|
|
103
|
-
const
|
|
104
|
-
|
|
1871
|
+
const b = t.currentTarget.getBoundingClientRect(), _ = (t.clientX - b.left) * (100 / M), R = (t.clientY - b.top) * (100 / M);
|
|
1872
|
+
P(E, { x: _, y: R }), T(null);
|
|
105
1873
|
},
|
|
106
|
-
[
|
|
107
|
-
),
|
|
108
|
-
s == null || s(
|
|
109
|
-
}, [
|
|
110
|
-
(
|
|
111
|
-
|
|
1874
|
+
[E, P, M]
|
|
1875
|
+
), A = k(() => {
|
|
1876
|
+
s == null || s(o);
|
|
1877
|
+
}, [o, s]), U = k(
|
|
1878
|
+
(t) => {
|
|
1879
|
+
c == null || c(o, t);
|
|
112
1880
|
},
|
|
113
|
-
[
|
|
114
|
-
),
|
|
115
|
-
return /* @__PURE__ */
|
|
116
|
-
/* @__PURE__ */
|
|
1881
|
+
[o, c]
|
|
1882
|
+
), y = i.find((t) => t.id === o.dataSource);
|
|
1883
|
+
return /* @__PURE__ */ a("div", { className: `nice-report-builder ${u}`, children: [
|
|
1884
|
+
/* @__PURE__ */ a("div", { className: "nice-report-builder__toolbar", children: [
|
|
117
1885
|
/* @__PURE__ */ e(
|
|
118
1886
|
"input",
|
|
119
1887
|
{
|
|
120
1888
|
type: "text",
|
|
121
|
-
value:
|
|
122
|
-
onChange: (
|
|
1889
|
+
value: o.name,
|
|
1890
|
+
onChange: (t) => C((b) => ({ ...b, name: t.target.value })),
|
|
123
1891
|
className: "nice-report-builder__name-input"
|
|
124
1892
|
}
|
|
125
1893
|
),
|
|
126
|
-
/* @__PURE__ */ e("div", { className: "nice-report-builder__tabs", children: ["design", "data", "parameters", "formatting"].map((
|
|
1894
|
+
/* @__PURE__ */ e("div", { className: "nice-report-builder__tabs", children: ["design", "data", "parameters", "formatting"].map((t) => /* @__PURE__ */ e(
|
|
127
1895
|
"button",
|
|
128
1896
|
{
|
|
129
|
-
className: `nice-report-builder__tab ${
|
|
130
|
-
onClick: () =>
|
|
131
|
-
children:
|
|
1897
|
+
className: `nice-report-builder__tab ${l === t ? "nice-report-builder__tab--active" : ""}`,
|
|
1898
|
+
onClick: () => g(t),
|
|
1899
|
+
children: t.charAt(0).toUpperCase() + t.slice(1)
|
|
132
1900
|
},
|
|
133
|
-
|
|
1901
|
+
t
|
|
134
1902
|
)) }),
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
-
/* @__PURE__ */ e("button", { onClick: () =>
|
|
137
|
-
/* @__PURE__ */
|
|
138
|
-
|
|
1903
|
+
/* @__PURE__ */ a("div", { className: "nice-report-builder__zoom", children: [
|
|
1904
|
+
/* @__PURE__ */ e("button", { onClick: () => N((t) => Math.max(25, t - 25)), children: "−" }),
|
|
1905
|
+
/* @__PURE__ */ a("span", { children: [
|
|
1906
|
+
M,
|
|
139
1907
|
"%"
|
|
140
1908
|
] }),
|
|
141
|
-
/* @__PURE__ */ e("button", { onClick: () =>
|
|
1909
|
+
/* @__PURE__ */ e("button", { onClick: () => N((t) => Math.min(200, t + 25)), children: "+" })
|
|
142
1910
|
] }),
|
|
143
|
-
/* @__PURE__ */
|
|
144
|
-
/* @__PURE__ */ e("button", { onClick:
|
|
1911
|
+
/* @__PURE__ */ a("div", { className: "nice-report-builder__actions", children: [
|
|
1912
|
+
/* @__PURE__ */ e("button", { onClick: A, children: "👁 Preview" }),
|
|
145
1913
|
/* @__PURE__ */ e("button", { onClick: () => U("pdf"), children: "📄 PDF" }),
|
|
146
|
-
/* @__PURE__ */ e("button", { onClick: () => U("excel"), children: "📊 Excel" })
|
|
1914
|
+
/* @__PURE__ */ e("button", { onClick: () => U("excel"), children: "📊 Excel" }),
|
|
1915
|
+
/* @__PURE__ */ e(K, { steps: X(m, Ne) })
|
|
147
1916
|
] })
|
|
148
1917
|
] }),
|
|
149
|
-
/* @__PURE__ */
|
|
150
|
-
|
|
1918
|
+
/* @__PURE__ */ a("div", { className: "nice-report-builder__main", children: [
|
|
1919
|
+
l === "design" && /* @__PURE__ */ a("div", { className: "nice-report-builder__palette", children: [
|
|
151
1920
|
/* @__PURE__ */ e("h4", { children: "Elements" }),
|
|
152
|
-
|
|
1921
|
+
G.map((t) => /* @__PURE__ */ a(
|
|
153
1922
|
"div",
|
|
154
1923
|
{
|
|
155
1924
|
className: "nice-report-builder__palette-item",
|
|
156
1925
|
draggable: !0,
|
|
157
|
-
onDragStart: () =>
|
|
158
|
-
onDragEnd: () =>
|
|
1926
|
+
onDragStart: () => T(t.type),
|
|
1927
|
+
onDragEnd: () => T(null),
|
|
159
1928
|
children: [
|
|
160
|
-
/* @__PURE__ */ e("span", { className: "nice-report-builder__palette-icon", children:
|
|
161
|
-
/* @__PURE__ */ e("span", { children:
|
|
1929
|
+
/* @__PURE__ */ e("span", { className: "nice-report-builder__palette-icon", children: t.icon }),
|
|
1930
|
+
/* @__PURE__ */ e("span", { children: t.label })
|
|
162
1931
|
]
|
|
163
1932
|
},
|
|
164
|
-
|
|
1933
|
+
t.type
|
|
165
1934
|
)),
|
|
166
1935
|
/* @__PURE__ */ e("h4", { children: "Data Source" }),
|
|
167
|
-
/* @__PURE__ */
|
|
1936
|
+
/* @__PURE__ */ a(
|
|
168
1937
|
"select",
|
|
169
1938
|
{
|
|
170
|
-
value:
|
|
171
|
-
onChange: (
|
|
1939
|
+
value: o.dataSource,
|
|
1940
|
+
onChange: (t) => C((b) => ({ ...b, dataSource: t.target.value })),
|
|
172
1941
|
children: [
|
|
173
1942
|
/* @__PURE__ */ e("option", { value: "", children: "Select data source..." }),
|
|
174
|
-
|
|
1943
|
+
i.map((t) => /* @__PURE__ */ e("option", { value: t.id, children: t.name }, t.id))
|
|
175
1944
|
]
|
|
176
1945
|
}
|
|
177
1946
|
),
|
|
178
|
-
(
|
|
1947
|
+
(y == null ? void 0 : y.schema) && /* @__PURE__ */ a("div", { className: "nice-report-builder__fields", children: [
|
|
179
1948
|
/* @__PURE__ */ e("h5", { children: "Fields" }),
|
|
180
|
-
|
|
181
|
-
/* @__PURE__ */ e("strong", { children:
|
|
182
|
-
|
|
1949
|
+
y.schema.tables.map((t) => /* @__PURE__ */ a("div", { className: "nice-report-builder__table-fields", children: [
|
|
1950
|
+
/* @__PURE__ */ e("strong", { children: t.name }),
|
|
1951
|
+
t.columns.map((b) => /* @__PURE__ */ a(
|
|
183
1952
|
"div",
|
|
184
1953
|
{
|
|
185
1954
|
className: "nice-report-builder__field",
|
|
@@ -187,88 +1956,88 @@ function he({
|
|
|
187
1956
|
onDragStart: () => {
|
|
188
1957
|
},
|
|
189
1958
|
children: [
|
|
190
|
-
|
|
1959
|
+
b.name,
|
|
191
1960
|
" ",
|
|
192
|
-
/* @__PURE__ */
|
|
1961
|
+
/* @__PURE__ */ a("small", { children: [
|
|
193
1962
|
"(",
|
|
194
|
-
|
|
1963
|
+
b.type,
|
|
195
1964
|
")"
|
|
196
1965
|
] })
|
|
197
1966
|
]
|
|
198
1967
|
},
|
|
199
|
-
|
|
1968
|
+
b.name
|
|
200
1969
|
))
|
|
201
|
-
] },
|
|
1970
|
+
] }, t.name))
|
|
202
1971
|
] })
|
|
203
1972
|
] }),
|
|
204
|
-
|
|
1973
|
+
l === "design" && /* @__PURE__ */ e("div", { className: "nice-report-builder__canvas-container", children: /* @__PURE__ */ a(
|
|
205
1974
|
"div",
|
|
206
1975
|
{
|
|
207
1976
|
className: "nice-report-builder__canvas",
|
|
208
1977
|
style: {
|
|
209
|
-
transform: `scale(${
|
|
1978
|
+
transform: `scale(${M / 100})`,
|
|
210
1979
|
transformOrigin: "top left",
|
|
211
|
-
width:
|
|
212
|
-
height:
|
|
1980
|
+
width: o.layout.orientation === "landscape" ? "297mm" : "210mm",
|
|
1981
|
+
height: o.layout.orientation === "landscape" ? "210mm" : "297mm"
|
|
213
1982
|
},
|
|
214
|
-
onDragOver: (
|
|
215
|
-
onDrop:
|
|
216
|
-
onClick: () =>
|
|
1983
|
+
onDragOver: (t) => t.preventDefault(),
|
|
1984
|
+
onDrop: z,
|
|
1985
|
+
onClick: () => h(null),
|
|
217
1986
|
children: [
|
|
218
|
-
|
|
219
|
-
|
|
1987
|
+
o.layout.elements.map((t) => /* @__PURE__ */ e(
|
|
1988
|
+
De,
|
|
220
1989
|
{
|
|
221
|
-
element:
|
|
222
|
-
isSelected: (
|
|
223
|
-
onSelect: () =>
|
|
224
|
-
onUpdate: (
|
|
225
|
-
onDelete: () =>
|
|
1990
|
+
element: t,
|
|
1991
|
+
isSelected: (d == null ? void 0 : d.id) === t.id,
|
|
1992
|
+
onSelect: () => h(t),
|
|
1993
|
+
onUpdate: (b) => I(t.id, b),
|
|
1994
|
+
onDelete: () => S(t.id)
|
|
226
1995
|
},
|
|
227
|
-
|
|
1996
|
+
t.id
|
|
228
1997
|
)),
|
|
229
|
-
|
|
1998
|
+
o.layout.elements.length === 0 && /* @__PURE__ */ e("div", { className: "nice-report-builder__canvas-empty", children: "Drag elements here to build your report" })
|
|
230
1999
|
]
|
|
231
2000
|
}
|
|
232
2001
|
) }),
|
|
233
|
-
|
|
234
|
-
|
|
2002
|
+
l === "data" && /* @__PURE__ */ e(
|
|
2003
|
+
He,
|
|
235
2004
|
{
|
|
236
|
-
report:
|
|
237
|
-
dataSource:
|
|
238
|
-
onChange: (
|
|
2005
|
+
report: o,
|
|
2006
|
+
dataSource: y,
|
|
2007
|
+
onChange: (t) => C((b) => ({ ...b, query: t }))
|
|
239
2008
|
}
|
|
240
2009
|
),
|
|
241
|
-
|
|
242
|
-
|
|
2010
|
+
l === "parameters" && /* @__PURE__ */ e(
|
|
2011
|
+
ke,
|
|
243
2012
|
{
|
|
244
|
-
parameters:
|
|
245
|
-
calculations:
|
|
246
|
-
onChange: (
|
|
2013
|
+
parameters: o.parameters,
|
|
2014
|
+
calculations: o.calculations,
|
|
2015
|
+
onChange: (t, b) => C((_) => ({ ..._, parameters: t, calculations: b }))
|
|
247
2016
|
}
|
|
248
2017
|
),
|
|
249
|
-
|
|
250
|
-
|
|
2018
|
+
l === "formatting" && /* @__PURE__ */ e(
|
|
2019
|
+
Te,
|
|
251
2020
|
{
|
|
252
|
-
formatting:
|
|
253
|
-
grouping:
|
|
254
|
-
sorting:
|
|
255
|
-
onChange: (
|
|
2021
|
+
formatting: o.formatting,
|
|
2022
|
+
grouping: o.grouping,
|
|
2023
|
+
sorting: o.sorting,
|
|
2024
|
+
onChange: (t, b, _) => C((R) => ({ ...R, formatting: t, grouping: b, sorting: _ }))
|
|
256
2025
|
}
|
|
257
2026
|
),
|
|
258
|
-
|
|
259
|
-
|
|
2027
|
+
d && l === "design" && /* @__PURE__ */ e(
|
|
2028
|
+
Re,
|
|
260
2029
|
{
|
|
261
|
-
element:
|
|
262
|
-
dataSource:
|
|
263
|
-
onChange: (
|
|
264
|
-
onClose: () =>
|
|
2030
|
+
element: d,
|
|
2031
|
+
dataSource: y,
|
|
2032
|
+
onChange: (t) => I(d.id, t),
|
|
2033
|
+
onClose: () => h(null)
|
|
265
2034
|
}
|
|
266
2035
|
)
|
|
267
2036
|
] })
|
|
268
2037
|
] });
|
|
269
2038
|
}
|
|
270
|
-
function
|
|
271
|
-
switch (
|
|
2039
|
+
function Ce(r) {
|
|
2040
|
+
switch (r) {
|
|
272
2041
|
case "table":
|
|
273
2042
|
return { columns: [], showHeader: !0, showFooter: !1 };
|
|
274
2043
|
case "chart":
|
|
@@ -295,66 +2064,66 @@ function B(i) {
|
|
|
295
2064
|
return {};
|
|
296
2065
|
}
|
|
297
2066
|
}
|
|
298
|
-
function
|
|
299
|
-
element:
|
|
300
|
-
isSelected:
|
|
301
|
-
onSelect:
|
|
2067
|
+
function De({
|
|
2068
|
+
element: r,
|
|
2069
|
+
isSelected: i,
|
|
2070
|
+
onSelect: n,
|
|
302
2071
|
onUpdate: s,
|
|
303
|
-
onDelete:
|
|
2072
|
+
onDelete: c
|
|
304
2073
|
}) {
|
|
305
|
-
var
|
|
306
|
-
const [
|
|
307
|
-
if (
|
|
2074
|
+
var M;
|
|
2075
|
+
const [u, m] = D(!1), [o, v] = D(!1), d = (N) => {
|
|
2076
|
+
if (N.button !== 0)
|
|
308
2077
|
return;
|
|
309
|
-
|
|
310
|
-
const
|
|
311
|
-
const
|
|
2078
|
+
N.stopPropagation(), n(), m(!0);
|
|
2079
|
+
const C = N.clientX, P = N.clientY, I = { ...r.position }, S = (A) => {
|
|
2080
|
+
const U = A.clientX - C, y = A.clientY - P;
|
|
312
2081
|
s({
|
|
313
2082
|
position: {
|
|
314
|
-
...
|
|
315
|
-
x: Math.max(0,
|
|
316
|
-
y: Math.max(0,
|
|
2083
|
+
...I,
|
|
2084
|
+
x: Math.max(0, I.x + U),
|
|
2085
|
+
y: Math.max(0, I.y + y)
|
|
317
2086
|
}
|
|
318
2087
|
});
|
|
319
|
-
},
|
|
320
|
-
|
|
2088
|
+
}, z = () => {
|
|
2089
|
+
m(!1), window.removeEventListener("mousemove", S), window.removeEventListener("mouseup", z);
|
|
321
2090
|
};
|
|
322
|
-
window.addEventListener("mousemove",
|
|
323
|
-
},
|
|
324
|
-
|
|
325
|
-
const
|
|
326
|
-
const
|
|
327
|
-
|
|
328
|
-
},
|
|
329
|
-
|
|
2091
|
+
window.addEventListener("mousemove", S), window.addEventListener("mouseup", z);
|
|
2092
|
+
}, h = (N, C) => {
|
|
2093
|
+
N.stopPropagation(), v(!0);
|
|
2094
|
+
const P = N.clientX, I = N.clientY, S = { ...r.position }, z = (U) => {
|
|
2095
|
+
const y = U.clientX - P, t = U.clientY - I, b = { ...S };
|
|
2096
|
+
C.includes("e") && (b.width = Math.max(50, S.width + y)), C.includes("s") && (b.height = Math.max(30, S.height + t)), C.includes("w") && (b.x = S.x + y, b.width = Math.max(50, S.width - y)), C.includes("n") && (b.y = S.y + t, b.height = Math.max(30, S.height - t)), s({ position: b });
|
|
2097
|
+
}, A = () => {
|
|
2098
|
+
v(!1), window.removeEventListener("mousemove", z), window.removeEventListener("mouseup", A);
|
|
330
2099
|
};
|
|
331
|
-
window.addEventListener("mousemove",
|
|
332
|
-
},
|
|
333
|
-
return /* @__PURE__ */
|
|
2100
|
+
window.addEventListener("mousemove", z), window.addEventListener("mouseup", A);
|
|
2101
|
+
}, l = G.find((N) => N.type === r.type), { padding: g, ...E } = r.style ?? {}, T = typeof g == "object" && g !== null ? `${g.top}px ${g.right}px ${g.bottom}px ${g.left}px` : g;
|
|
2102
|
+
return /* @__PURE__ */ a(
|
|
334
2103
|
"div",
|
|
335
2104
|
{
|
|
336
|
-
className: `nice-report-builder__element nice-report-builder__element--${
|
|
2105
|
+
className: `nice-report-builder__element nice-report-builder__element--${r.type} ${i ? "nice-report-builder__element--selected" : ""}`,
|
|
337
2106
|
style: {
|
|
338
|
-
left:
|
|
339
|
-
top:
|
|
340
|
-
width:
|
|
341
|
-
height:
|
|
342
|
-
...
|
|
2107
|
+
left: r.position.x,
|
|
2108
|
+
top: r.position.y,
|
|
2109
|
+
width: r.position.width,
|
|
2110
|
+
height: r.position.height,
|
|
2111
|
+
...E,
|
|
343
2112
|
padding: T
|
|
344
2113
|
},
|
|
345
|
-
onMouseDown:
|
|
2114
|
+
onMouseDown: d,
|
|
346
2115
|
children: [
|
|
347
|
-
/* @__PURE__ */
|
|
348
|
-
/* @__PURE__ */ e("span", { className: "nice-report-builder__element-icon", children:
|
|
349
|
-
/* @__PURE__ */ e("span", { className: "nice-report-builder__element-label", children: ((
|
|
2116
|
+
/* @__PURE__ */ a("div", { className: "nice-report-builder__element-content", children: [
|
|
2117
|
+
/* @__PURE__ */ e("span", { className: "nice-report-builder__element-icon", children: l == null ? void 0 : l.icon }),
|
|
2118
|
+
/* @__PURE__ */ e("span", { className: "nice-report-builder__element-label", children: ((M = r.binding) == null ? void 0 : M.field) || (l == null ? void 0 : l.label) })
|
|
350
2119
|
] }),
|
|
351
|
-
|
|
2120
|
+
i && /* @__PURE__ */ a($, { children: [
|
|
352
2121
|
/* @__PURE__ */ e(
|
|
353
2122
|
"button",
|
|
354
2123
|
{
|
|
355
2124
|
className: "nice-report-builder__element-delete",
|
|
356
|
-
onClick: (
|
|
357
|
-
|
|
2125
|
+
onClick: (N) => {
|
|
2126
|
+
N.stopPropagation(), c();
|
|
358
2127
|
},
|
|
359
2128
|
children: "×"
|
|
360
2129
|
}
|
|
@@ -363,21 +2132,21 @@ function O({
|
|
|
363
2132
|
"div",
|
|
364
2133
|
{
|
|
365
2134
|
className: "nice-report-builder__resize-handle nice-report-builder__resize-handle--se",
|
|
366
|
-
onMouseDown: (
|
|
2135
|
+
onMouseDown: (N) => h(N, "se")
|
|
367
2136
|
}
|
|
368
2137
|
),
|
|
369
2138
|
/* @__PURE__ */ e(
|
|
370
2139
|
"div",
|
|
371
2140
|
{
|
|
372
2141
|
className: "nice-report-builder__resize-handle nice-report-builder__resize-handle--e",
|
|
373
|
-
onMouseDown: (
|
|
2142
|
+
onMouseDown: (N) => h(N, "e")
|
|
374
2143
|
}
|
|
375
2144
|
),
|
|
376
2145
|
/* @__PURE__ */ e(
|
|
377
2146
|
"div",
|
|
378
2147
|
{
|
|
379
2148
|
className: "nice-report-builder__resize-handle nice-report-builder__resize-handle--s",
|
|
380
|
-
onMouseDown: (
|
|
2149
|
+
onMouseDown: (N) => h(N, "s")
|
|
381
2150
|
}
|
|
382
2151
|
)
|
|
383
2152
|
] })
|
|
@@ -385,50 +2154,50 @@ function O({
|
|
|
385
2154
|
}
|
|
386
2155
|
);
|
|
387
2156
|
}
|
|
388
|
-
function
|
|
389
|
-
report:
|
|
390
|
-
dataSource:
|
|
391
|
-
onChange:
|
|
2157
|
+
function He({
|
|
2158
|
+
report: r,
|
|
2159
|
+
dataSource: i,
|
|
2160
|
+
onChange: n
|
|
392
2161
|
}) {
|
|
393
|
-
var
|
|
394
|
-
const [s,
|
|
395
|
-
return /* @__PURE__ */
|
|
396
|
-
/* @__PURE__ */
|
|
397
|
-
/* @__PURE__ */ e("button", { className: s === "builder" ? "active" : "", onClick: () =>
|
|
398
|
-
/* @__PURE__ */ e("button", { className: s === "sql" ? "active" : "", onClick: () =>
|
|
2162
|
+
var u, m, o, v;
|
|
2163
|
+
const [s, c] = D("builder");
|
|
2164
|
+
return /* @__PURE__ */ a("div", { className: "nice-report-builder__query-builder", children: [
|
|
2165
|
+
/* @__PURE__ */ a("div", { className: "nice-report-builder__query-tabs", children: [
|
|
2166
|
+
/* @__PURE__ */ e("button", { className: s === "builder" ? "active" : "", onClick: () => c("builder"), children: "Query Builder" }),
|
|
2167
|
+
/* @__PURE__ */ e("button", { className: s === "sql" ? "active" : "", onClick: () => c("sql"), children: "SQL" })
|
|
399
2168
|
] }),
|
|
400
|
-
s === "builder" ? /* @__PURE__ */
|
|
2169
|
+
s === "builder" ? /* @__PURE__ */ a("div", { className: "nice-report-builder__visual-query", children: [
|
|
401
2170
|
/* @__PURE__ */ e("h4", { children: "Tables" }),
|
|
402
|
-
(
|
|
403
|
-
var
|
|
404
|
-
return /* @__PURE__ */ e("div", { className: "nice-report-builder__query-table", children: /* @__PURE__ */
|
|
2171
|
+
(u = i == null ? void 0 : i.schema) == null ? void 0 : u.tables.map((d) => {
|
|
2172
|
+
var h, l;
|
|
2173
|
+
return /* @__PURE__ */ e("div", { className: "nice-report-builder__query-table", children: /* @__PURE__ */ a("label", { children: [
|
|
405
2174
|
/* @__PURE__ */ e(
|
|
406
2175
|
"input",
|
|
407
2176
|
{
|
|
408
2177
|
type: "checkbox",
|
|
409
|
-
checked: ((
|
|
410
|
-
onChange: (
|
|
411
|
-
var T,
|
|
412
|
-
const
|
|
413
|
-
|
|
2178
|
+
checked: ((l = (h = r.query) == null ? void 0 : h.tables) == null ? void 0 : l.includes(d.name)) || !1,
|
|
2179
|
+
onChange: (g) => {
|
|
2180
|
+
var T, M;
|
|
2181
|
+
const E = g.target.checked ? [...((T = r.query) == null ? void 0 : T.tables) || [], d.name] : (((M = r.query) == null ? void 0 : M.tables) || []).filter((N) => N !== d.name);
|
|
2182
|
+
n({ ...r.query, type: "builder", tables: E });
|
|
414
2183
|
}
|
|
415
2184
|
}
|
|
416
2185
|
),
|
|
417
|
-
|
|
418
|
-
] }) },
|
|
2186
|
+
d.name
|
|
2187
|
+
] }) }, d.name);
|
|
419
2188
|
}),
|
|
420
2189
|
/* @__PURE__ */ e("h4", { children: "Columns" }),
|
|
421
|
-
/* @__PURE__ */ e("div", { className: "nice-report-builder__column-list", children: (
|
|
422
|
-
var
|
|
423
|
-
const
|
|
424
|
-
return
|
|
2190
|
+
/* @__PURE__ */ e("div", { className: "nice-report-builder__column-list", children: (o = (m = r.query) == null ? void 0 : m.tables) == null ? void 0 : o.map((d) => {
|
|
2191
|
+
var l;
|
|
2192
|
+
const h = (l = i == null ? void 0 : i.schema) == null ? void 0 : l.tables.find((g) => g.name === d);
|
|
2193
|
+
return h == null ? void 0 : h.columns.map((g) => /* @__PURE__ */ a("div", { className: "nice-report-builder__column-item", children: [
|
|
425
2194
|
/* @__PURE__ */ e("input", { type: "checkbox" }),
|
|
426
|
-
/* @__PURE__ */
|
|
427
|
-
|
|
2195
|
+
/* @__PURE__ */ a("span", { children: [
|
|
2196
|
+
d,
|
|
428
2197
|
".",
|
|
429
|
-
|
|
2198
|
+
g.name
|
|
430
2199
|
] }),
|
|
431
|
-
/* @__PURE__ */
|
|
2200
|
+
/* @__PURE__ */ a("select", { children: [
|
|
432
2201
|
/* @__PURE__ */ e("option", { value: "", children: "No aggregate" }),
|
|
433
2202
|
/* @__PURE__ */ e("option", { value: "sum", children: "SUM" }),
|
|
434
2203
|
/* @__PURE__ */ e("option", { value: "avg", children: "AVG" }),
|
|
@@ -436,56 +2205,56 @@ function X({
|
|
|
436
2205
|
/* @__PURE__ */ e("option", { value: "min", children: "MIN" }),
|
|
437
2206
|
/* @__PURE__ */ e("option", { value: "max", children: "MAX" })
|
|
438
2207
|
] })
|
|
439
|
-
] }, `${
|
|
2208
|
+
] }, `${d}.${g.name}`));
|
|
440
2209
|
}) })
|
|
441
2210
|
] }) : /* @__PURE__ */ e("div", { className: "nice-report-builder__sql-editor", children: /* @__PURE__ */ e(
|
|
442
2211
|
"textarea",
|
|
443
2212
|
{
|
|
444
|
-
value: ((
|
|
445
|
-
onChange: (
|
|
2213
|
+
value: ((v = r.query) == null ? void 0 : v.text) || "",
|
|
2214
|
+
onChange: (d) => n({ ...r.query, type: "sql", text: d.target.value }),
|
|
446
2215
|
placeholder: "SELECT * FROM table_name",
|
|
447
2216
|
rows: 15
|
|
448
2217
|
}
|
|
449
2218
|
) })
|
|
450
2219
|
] });
|
|
451
2220
|
}
|
|
452
|
-
function
|
|
453
|
-
parameters:
|
|
454
|
-
calculations:
|
|
455
|
-
onChange:
|
|
2221
|
+
function ke({
|
|
2222
|
+
parameters: r,
|
|
2223
|
+
calculations: i,
|
|
2224
|
+
onChange: n
|
|
456
2225
|
}) {
|
|
457
2226
|
const s = () => {
|
|
458
|
-
const
|
|
2227
|
+
const u = {
|
|
459
2228
|
id: crypto.randomUUID(),
|
|
460
|
-
name: "param" + (
|
|
461
|
-
label: "Parameter " + (
|
|
2229
|
+
name: "param" + (r.length + 1),
|
|
2230
|
+
label: "Parameter " + (r.length + 1),
|
|
462
2231
|
type: "text"
|
|
463
2232
|
};
|
|
464
|
-
|
|
465
|
-
},
|
|
466
|
-
const
|
|
2233
|
+
n([...r, u], i);
|
|
2234
|
+
}, c = () => {
|
|
2235
|
+
const u = {
|
|
467
2236
|
id: crypto.randomUUID(),
|
|
468
|
-
name: "calc" + (
|
|
2237
|
+
name: "calc" + (i.length + 1),
|
|
469
2238
|
expression: ""
|
|
470
2239
|
};
|
|
471
|
-
|
|
2240
|
+
n(r, [...i, u]);
|
|
472
2241
|
};
|
|
473
|
-
return /* @__PURE__ */
|
|
474
|
-
/* @__PURE__ */
|
|
475
|
-
/* @__PURE__ */
|
|
2242
|
+
return /* @__PURE__ */ a("div", { className: "nice-report-builder__parameters-editor", children: [
|
|
2243
|
+
/* @__PURE__ */ a("section", { children: [
|
|
2244
|
+
/* @__PURE__ */ a("div", { className: "nice-report-builder__section-header", children: [
|
|
476
2245
|
/* @__PURE__ */ e("h4", { children: "Parameters" }),
|
|
477
2246
|
/* @__PURE__ */ e("button", { onClick: s, children: "+ Add" })
|
|
478
2247
|
] }),
|
|
479
|
-
|
|
2248
|
+
r.map((u, m) => /* @__PURE__ */ a("div", { className: "nice-report-builder__param-row", children: [
|
|
480
2249
|
/* @__PURE__ */ e(
|
|
481
2250
|
"input",
|
|
482
2251
|
{
|
|
483
2252
|
type: "text",
|
|
484
|
-
value:
|
|
2253
|
+
value: u.name,
|
|
485
2254
|
placeholder: "Name",
|
|
486
|
-
onChange: (
|
|
487
|
-
const
|
|
488
|
-
|
|
2255
|
+
onChange: (o) => {
|
|
2256
|
+
const v = [...r];
|
|
2257
|
+
v[m] = { ...u, name: o.target.value }, n(v, i);
|
|
489
2258
|
}
|
|
490
2259
|
}
|
|
491
2260
|
),
|
|
@@ -493,21 +2262,21 @@ function H({
|
|
|
493
2262
|
"input",
|
|
494
2263
|
{
|
|
495
2264
|
type: "text",
|
|
496
|
-
value:
|
|
2265
|
+
value: u.label,
|
|
497
2266
|
placeholder: "Label",
|
|
498
|
-
onChange: (
|
|
499
|
-
const
|
|
500
|
-
|
|
2267
|
+
onChange: (o) => {
|
|
2268
|
+
const v = [...r];
|
|
2269
|
+
v[m] = { ...u, label: o.target.value }, n(v, i);
|
|
501
2270
|
}
|
|
502
2271
|
}
|
|
503
2272
|
),
|
|
504
|
-
/* @__PURE__ */
|
|
2273
|
+
/* @__PURE__ */ a(
|
|
505
2274
|
"select",
|
|
506
2275
|
{
|
|
507
|
-
value:
|
|
508
|
-
onChange: (
|
|
509
|
-
const
|
|
510
|
-
|
|
2276
|
+
value: u.type,
|
|
2277
|
+
onChange: (o) => {
|
|
2278
|
+
const v = [...r];
|
|
2279
|
+
v[m] = { ...u, type: o.target.value }, n(v, i);
|
|
511
2280
|
},
|
|
512
2281
|
children: [
|
|
513
2282
|
/* @__PURE__ */ e("option", { value: "text", children: "Text" }),
|
|
@@ -523,31 +2292,31 @@ function H({
|
|
|
523
2292
|
"button",
|
|
524
2293
|
{
|
|
525
2294
|
onClick: () => {
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
2295
|
+
n(
|
|
2296
|
+
r.filter((o) => o.id !== u.id),
|
|
2297
|
+
i
|
|
529
2298
|
);
|
|
530
2299
|
},
|
|
531
2300
|
children: "×"
|
|
532
2301
|
}
|
|
533
2302
|
)
|
|
534
|
-
] },
|
|
2303
|
+
] }, u.id))
|
|
535
2304
|
] }),
|
|
536
|
-
/* @__PURE__ */
|
|
537
|
-
/* @__PURE__ */
|
|
2305
|
+
/* @__PURE__ */ a("section", { children: [
|
|
2306
|
+
/* @__PURE__ */ a("div", { className: "nice-report-builder__section-header", children: [
|
|
538
2307
|
/* @__PURE__ */ e("h4", { children: "Calculated Fields" }),
|
|
539
|
-
/* @__PURE__ */ e("button", { onClick:
|
|
2308
|
+
/* @__PURE__ */ e("button", { onClick: c, children: "+ Add" })
|
|
540
2309
|
] }),
|
|
541
|
-
|
|
2310
|
+
i.map((u, m) => /* @__PURE__ */ a("div", { className: "nice-report-builder__calc-row", children: [
|
|
542
2311
|
/* @__PURE__ */ e(
|
|
543
2312
|
"input",
|
|
544
2313
|
{
|
|
545
2314
|
type: "text",
|
|
546
|
-
value:
|
|
2315
|
+
value: u.name,
|
|
547
2316
|
placeholder: "Name",
|
|
548
|
-
onChange: (
|
|
549
|
-
const
|
|
550
|
-
|
|
2317
|
+
onChange: (o) => {
|
|
2318
|
+
const v = [...i];
|
|
2319
|
+
v[m] = { ...u, name: o.target.value }, n(r, v);
|
|
551
2320
|
}
|
|
552
2321
|
}
|
|
553
2322
|
),
|
|
@@ -555,11 +2324,11 @@ function H({
|
|
|
555
2324
|
"input",
|
|
556
2325
|
{
|
|
557
2326
|
type: "text",
|
|
558
|
-
value:
|
|
2327
|
+
value: u.expression,
|
|
559
2328
|
placeholder: "Expression (e.g., [Sales] * [Quantity])",
|
|
560
|
-
onChange: (
|
|
561
|
-
const
|
|
562
|
-
|
|
2329
|
+
onChange: (o) => {
|
|
2330
|
+
const v = [...i];
|
|
2331
|
+
v[m] = { ...u, expression: o.target.value }, n(r, v);
|
|
563
2332
|
}
|
|
564
2333
|
}
|
|
565
2334
|
),
|
|
@@ -567,57 +2336,57 @@ function H({
|
|
|
567
2336
|
"button",
|
|
568
2337
|
{
|
|
569
2338
|
onClick: () => {
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
2339
|
+
n(
|
|
2340
|
+
r,
|
|
2341
|
+
i.filter((o) => o.id !== u.id)
|
|
573
2342
|
);
|
|
574
2343
|
},
|
|
575
2344
|
children: "×"
|
|
576
2345
|
}
|
|
577
2346
|
)
|
|
578
|
-
] },
|
|
2347
|
+
] }, u.id))
|
|
579
2348
|
] })
|
|
580
2349
|
] });
|
|
581
2350
|
}
|
|
582
|
-
function
|
|
583
|
-
formatting:
|
|
584
|
-
grouping:
|
|
585
|
-
sorting:
|
|
2351
|
+
function Te({
|
|
2352
|
+
formatting: r,
|
|
2353
|
+
grouping: i,
|
|
2354
|
+
sorting: n,
|
|
586
2355
|
onChange: s
|
|
587
2356
|
}) {
|
|
588
|
-
return /* @__PURE__ */
|
|
589
|
-
/* @__PURE__ */
|
|
2357
|
+
return /* @__PURE__ */ a("div", { className: "nice-report-builder__formatting-editor", children: [
|
|
2358
|
+
/* @__PURE__ */ a("section", { children: [
|
|
590
2359
|
/* @__PURE__ */ e("h4", { children: "General" }),
|
|
591
|
-
/* @__PURE__ */
|
|
2360
|
+
/* @__PURE__ */ a("label", { children: [
|
|
592
2361
|
/* @__PURE__ */ e(
|
|
593
2362
|
"input",
|
|
594
2363
|
{
|
|
595
2364
|
type: "checkbox",
|
|
596
|
-
checked:
|
|
597
|
-
onChange: (
|
|
2365
|
+
checked: r.alternateRowColors,
|
|
2366
|
+
onChange: (c) => s({ ...r, alternateRowColors: c.target.checked }, i, n)
|
|
598
2367
|
}
|
|
599
2368
|
),
|
|
600
2369
|
"Alternate row colors"
|
|
601
2370
|
] }),
|
|
602
|
-
/* @__PURE__ */
|
|
2371
|
+
/* @__PURE__ */ a("label", { children: [
|
|
603
2372
|
/* @__PURE__ */ e(
|
|
604
2373
|
"input",
|
|
605
2374
|
{
|
|
606
2375
|
type: "checkbox",
|
|
607
|
-
checked:
|
|
608
|
-
onChange: (
|
|
2376
|
+
checked: r.gridLines,
|
|
2377
|
+
onChange: (c) => s({ ...r, gridLines: c.target.checked }, i, n)
|
|
609
2378
|
}
|
|
610
2379
|
),
|
|
611
2380
|
"Show grid lines"
|
|
612
2381
|
] })
|
|
613
2382
|
] }),
|
|
614
|
-
/* @__PURE__ */
|
|
2383
|
+
/* @__PURE__ */ a("section", { children: [
|
|
615
2384
|
/* @__PURE__ */ e("h4", { children: "Conditional Formatting" }),
|
|
616
2385
|
/* @__PURE__ */ e(
|
|
617
2386
|
"button",
|
|
618
2387
|
{
|
|
619
2388
|
onClick: () => {
|
|
620
|
-
const
|
|
2389
|
+
const c = {
|
|
621
2390
|
id: crypto.randomUUID(),
|
|
622
2391
|
condition: { column: "", operator: "gt", value: 0 },
|
|
623
2392
|
style: { backgroundColor: "#ffcccc" },
|
|
@@ -625,92 +2394,92 @@ function j({
|
|
|
625
2394
|
};
|
|
626
2395
|
s(
|
|
627
2396
|
{
|
|
628
|
-
...
|
|
629
|
-
conditionalFormats: [...
|
|
2397
|
+
...r,
|
|
2398
|
+
conditionalFormats: [...r.conditionalFormats, c]
|
|
630
2399
|
},
|
|
631
|
-
|
|
632
|
-
|
|
2400
|
+
i,
|
|
2401
|
+
n
|
|
633
2402
|
);
|
|
634
2403
|
},
|
|
635
2404
|
children: "+ Add Rule"
|
|
636
2405
|
}
|
|
637
2406
|
),
|
|
638
|
-
|
|
639
|
-
/* @__PURE__ */
|
|
2407
|
+
r.conditionalFormats.map((c) => /* @__PURE__ */ a("div", { className: "nice-report-builder__format-rule", children: [
|
|
2408
|
+
/* @__PURE__ */ a("span", { children: [
|
|
640
2409
|
"If column ",
|
|
641
|
-
|
|
2410
|
+
c.condition.operator,
|
|
642
2411
|
" ",
|
|
643
|
-
String(
|
|
2412
|
+
String(c.condition.value)
|
|
644
2413
|
] }),
|
|
645
2414
|
/* @__PURE__ */ e(
|
|
646
2415
|
"input",
|
|
647
2416
|
{
|
|
648
2417
|
type: "color",
|
|
649
|
-
value:
|
|
650
|
-
onChange: (
|
|
2418
|
+
value: c.style.backgroundColor || "var(--nice-bg, #fff)",
|
|
2419
|
+
onChange: (u) => {
|
|
651
2420
|
s(
|
|
652
2421
|
{
|
|
653
|
-
...
|
|
654
|
-
conditionalFormats:
|
|
655
|
-
(
|
|
2422
|
+
...r,
|
|
2423
|
+
conditionalFormats: r.conditionalFormats.map(
|
|
2424
|
+
(m) => m.id === c.id ? { ...m, style: { ...m.style, backgroundColor: u.target.value } } : m
|
|
656
2425
|
)
|
|
657
2426
|
},
|
|
658
|
-
|
|
659
|
-
|
|
2427
|
+
i,
|
|
2428
|
+
n
|
|
660
2429
|
);
|
|
661
2430
|
}
|
|
662
2431
|
}
|
|
663
2432
|
)
|
|
664
|
-
] },
|
|
2433
|
+
] }, c.id))
|
|
665
2434
|
] })
|
|
666
2435
|
] });
|
|
667
2436
|
}
|
|
668
|
-
function
|
|
669
|
-
element:
|
|
670
|
-
dataSource:
|
|
671
|
-
onChange:
|
|
2437
|
+
function Re({
|
|
2438
|
+
element: r,
|
|
2439
|
+
dataSource: i,
|
|
2440
|
+
onChange: n,
|
|
672
2441
|
onClose: s
|
|
673
2442
|
}) {
|
|
674
|
-
var
|
|
675
|
-
return /* @__PURE__ */
|
|
676
|
-
/* @__PURE__ */
|
|
677
|
-
/* @__PURE__ */
|
|
678
|
-
(
|
|
2443
|
+
var c, u, m, o, v, d, h;
|
|
2444
|
+
return /* @__PURE__ */ a("div", { className: "nice-report-builder__properties", children: [
|
|
2445
|
+
/* @__PURE__ */ a("div", { className: "nice-report-builder__properties-header", children: [
|
|
2446
|
+
/* @__PURE__ */ a("h4", { children: [
|
|
2447
|
+
(c = G.find((l) => l.type === r.type)) == null ? void 0 : c.label,
|
|
679
2448
|
" Properties"
|
|
680
2449
|
] }),
|
|
681
2450
|
/* @__PURE__ */ e("button", { onClick: s, children: "×" })
|
|
682
2451
|
] }),
|
|
683
|
-
/* @__PURE__ */
|
|
684
|
-
/* @__PURE__ */
|
|
2452
|
+
/* @__PURE__ */ a("div", { className: "nice-report-builder__properties-content", children: [
|
|
2453
|
+
/* @__PURE__ */ a("div", { className: "nice-report-builder__field", children: [
|
|
685
2454
|
/* @__PURE__ */ e("label", { children: "Data Binding" }),
|
|
686
|
-
/* @__PURE__ */
|
|
2455
|
+
/* @__PURE__ */ a(
|
|
687
2456
|
"select",
|
|
688
2457
|
{
|
|
689
|
-
value: ((
|
|
690
|
-
onChange: (
|
|
2458
|
+
value: ((u = r.binding) == null ? void 0 : u.field) || "",
|
|
2459
|
+
onChange: (l) => n({ binding: { ...r.binding, field: l.target.value } }),
|
|
691
2460
|
children: [
|
|
692
2461
|
/* @__PURE__ */ e("option", { value: "", children: "None" }),
|
|
693
|
-
(
|
|
694
|
-
(
|
|
695
|
-
|
|
2462
|
+
(m = i == null ? void 0 : i.schema) == null ? void 0 : m.tables.flatMap(
|
|
2463
|
+
(l) => l.columns.map((g) => /* @__PURE__ */ a("option", { value: `${l.name}.${g.name}`, children: [
|
|
2464
|
+
l.name,
|
|
696
2465
|
".",
|
|
697
|
-
|
|
698
|
-
] }, `${
|
|
2466
|
+
g.name
|
|
2467
|
+
] }, `${l.name}.${g.name}`))
|
|
699
2468
|
)
|
|
700
2469
|
]
|
|
701
2470
|
}
|
|
702
2471
|
)
|
|
703
2472
|
] }),
|
|
704
|
-
/* @__PURE__ */
|
|
2473
|
+
/* @__PURE__ */ a("div", { className: "nice-report-builder__field", children: [
|
|
705
2474
|
/* @__PURE__ */ e("label", { children: "Position" }),
|
|
706
|
-
/* @__PURE__ */
|
|
2475
|
+
/* @__PURE__ */ a("div", { className: "nice-report-builder__position-inputs", children: [
|
|
707
2476
|
/* @__PURE__ */ e(
|
|
708
2477
|
"input",
|
|
709
2478
|
{
|
|
710
2479
|
type: "number",
|
|
711
|
-
value:
|
|
712
|
-
onChange: (
|
|
713
|
-
position: { ...
|
|
2480
|
+
value: r.position.x,
|
|
2481
|
+
onChange: (l) => n({
|
|
2482
|
+
position: { ...r.position, x: parseInt(l.target.value, 10) || 0 }
|
|
714
2483
|
}),
|
|
715
2484
|
placeholder: "X"
|
|
716
2485
|
}
|
|
@@ -719,9 +2488,9 @@ function G({
|
|
|
719
2488
|
"input",
|
|
720
2489
|
{
|
|
721
2490
|
type: "number",
|
|
722
|
-
value:
|
|
723
|
-
onChange: (
|
|
724
|
-
position: { ...
|
|
2491
|
+
value: r.position.y,
|
|
2492
|
+
onChange: (l) => n({
|
|
2493
|
+
position: { ...r.position, y: parseInt(l.target.value, 10) || 0 }
|
|
725
2494
|
}),
|
|
726
2495
|
placeholder: "Y"
|
|
727
2496
|
}
|
|
@@ -730,9 +2499,9 @@ function G({
|
|
|
730
2499
|
"input",
|
|
731
2500
|
{
|
|
732
2501
|
type: "number",
|
|
733
|
-
value:
|
|
734
|
-
onChange: (
|
|
735
|
-
position: { ...
|
|
2502
|
+
value: r.position.width,
|
|
2503
|
+
onChange: (l) => n({
|
|
2504
|
+
position: { ...r.position, width: parseInt(l.target.value, 10) || 50 }
|
|
736
2505
|
}),
|
|
737
2506
|
placeholder: "W"
|
|
738
2507
|
}
|
|
@@ -741,44 +2510,44 @@ function G({
|
|
|
741
2510
|
"input",
|
|
742
2511
|
{
|
|
743
2512
|
type: "number",
|
|
744
|
-
value:
|
|
745
|
-
onChange: (
|
|
746
|
-
position: { ...
|
|
2513
|
+
value: r.position.height,
|
|
2514
|
+
onChange: (l) => n({
|
|
2515
|
+
position: { ...r.position, height: parseInt(l.target.value, 10) || 30 }
|
|
747
2516
|
}),
|
|
748
2517
|
placeholder: "H"
|
|
749
2518
|
}
|
|
750
2519
|
)
|
|
751
2520
|
] })
|
|
752
2521
|
] }),
|
|
753
|
-
/* @__PURE__ */
|
|
2522
|
+
/* @__PURE__ */ a("div", { className: "nice-report-builder__field", children: [
|
|
754
2523
|
/* @__PURE__ */ e("label", { children: "Background Color" }),
|
|
755
2524
|
/* @__PURE__ */ e(
|
|
756
2525
|
"input",
|
|
757
2526
|
{
|
|
758
2527
|
type: "color",
|
|
759
|
-
value: ((
|
|
760
|
-
onChange: (
|
|
2528
|
+
value: ((o = r.style) == null ? void 0 : o.backgroundColor) || "var(--nice-bg, #fff)",
|
|
2529
|
+
onChange: (l) => n({ style: { ...r.style, backgroundColor: l.target.value } })
|
|
761
2530
|
}
|
|
762
2531
|
)
|
|
763
2532
|
] }),
|
|
764
|
-
/* @__PURE__ */
|
|
2533
|
+
/* @__PURE__ */ a("div", { className: "nice-report-builder__field", children: [
|
|
765
2534
|
/* @__PURE__ */ e("label", { children: "Border" }),
|
|
766
|
-
/* @__PURE__ */
|
|
2535
|
+
/* @__PURE__ */ a("div", { className: "nice-report-builder__border-inputs", children: [
|
|
767
2536
|
/* @__PURE__ */ e(
|
|
768
2537
|
"input",
|
|
769
2538
|
{
|
|
770
2539
|
type: "color",
|
|
771
|
-
value: ((
|
|
772
|
-
onChange: (
|
|
2540
|
+
value: ((v = r.style) == null ? void 0 : v.borderColor) || "var(--nice-text, #000000)",
|
|
2541
|
+
onChange: (l) => n({ style: { ...r.style, borderColor: l.target.value } })
|
|
773
2542
|
}
|
|
774
2543
|
),
|
|
775
2544
|
/* @__PURE__ */ e(
|
|
776
2545
|
"input",
|
|
777
2546
|
{
|
|
778
2547
|
type: "number",
|
|
779
|
-
value: ((
|
|
780
|
-
onChange: (
|
|
781
|
-
style: { ...
|
|
2548
|
+
value: ((d = r.style) == null ? void 0 : d.borderWidth) || 0,
|
|
2549
|
+
onChange: (l) => n({
|
|
2550
|
+
style: { ...r.style, borderWidth: parseInt(l.target.value, 10) || 0 }
|
|
782
2551
|
}),
|
|
783
2552
|
placeholder: "Width",
|
|
784
2553
|
min: 0,
|
|
@@ -787,27 +2556,27 @@ function G({
|
|
|
787
2556
|
)
|
|
788
2557
|
] })
|
|
789
2558
|
] }),
|
|
790
|
-
|
|
791
|
-
/* @__PURE__ */
|
|
2559
|
+
r.type === "text" && /* @__PURE__ */ a($, { children: [
|
|
2560
|
+
/* @__PURE__ */ a("div", { className: "nice-report-builder__field", children: [
|
|
792
2561
|
/* @__PURE__ */ e("label", { children: "Content" }),
|
|
793
2562
|
/* @__PURE__ */ e(
|
|
794
2563
|
"textarea",
|
|
795
2564
|
{
|
|
796
|
-
value:
|
|
797
|
-
onChange: (
|
|
2565
|
+
value: r.config.content || "",
|
|
2566
|
+
onChange: (l) => n({ config: { ...r.config, content: l.target.value } }),
|
|
798
2567
|
rows: 3
|
|
799
2568
|
}
|
|
800
2569
|
)
|
|
801
2570
|
] }),
|
|
802
|
-
/* @__PURE__ */
|
|
2571
|
+
/* @__PURE__ */ a("div", { className: "nice-report-builder__field", children: [
|
|
803
2572
|
/* @__PURE__ */ e("label", { children: "Font Size" }),
|
|
804
2573
|
/* @__PURE__ */ e(
|
|
805
2574
|
"input",
|
|
806
2575
|
{
|
|
807
2576
|
type: "number",
|
|
808
|
-
value: ((
|
|
809
|
-
onChange: (
|
|
810
|
-
style: { ...
|
|
2577
|
+
value: ((h = r.style) == null ? void 0 : h.fontSize) || 12,
|
|
2578
|
+
onChange: (l) => n({
|
|
2579
|
+
style: { ...r.style, fontSize: parseInt(l.target.value, 10) || 12 }
|
|
811
2580
|
}),
|
|
812
2581
|
min: 8,
|
|
813
2582
|
max: 72
|
|
@@ -815,13 +2584,13 @@ function G({
|
|
|
815
2584
|
)
|
|
816
2585
|
] })
|
|
817
2586
|
] }),
|
|
818
|
-
|
|
2587
|
+
r.type === "chart" && /* @__PURE__ */ a("div", { className: "nice-report-builder__field", children: [
|
|
819
2588
|
/* @__PURE__ */ e("label", { children: "Chart Type" }),
|
|
820
|
-
/* @__PURE__ */
|
|
2589
|
+
/* @__PURE__ */ a(
|
|
821
2590
|
"select",
|
|
822
2591
|
{
|
|
823
|
-
value:
|
|
824
|
-
onChange: (
|
|
2592
|
+
value: r.config.chartType || "bar",
|
|
2593
|
+
onChange: (l) => n({ config: { ...r.config, chartType: l.target.value } }),
|
|
825
2594
|
children: [
|
|
826
2595
|
/* @__PURE__ */ e("option", { value: "bar", children: "Bar" }),
|
|
827
2596
|
/* @__PURE__ */ e("option", { value: "line", children: "Line" }),
|
|
@@ -835,7 +2604,16 @@ function G({
|
|
|
835
2604
|
] })
|
|
836
2605
|
] });
|
|
837
2606
|
}
|
|
838
|
-
const
|
|
2607
|
+
const Ee = [
|
|
2608
|
+
{
|
|
2609
|
+
target: ".nice-dashboard-studio",
|
|
2610
|
+
titleKey: "tutorial.dashboardStudio.intro.title",
|
|
2611
|
+
title: "Dashboard studio",
|
|
2612
|
+
contentKey: "tutorial.dashboardStudio.intro.content",
|
|
2613
|
+
content: "Drag widgets from the palette onto the grid, bind them to data sources, add filters, then toggle Edit/View, refresh and save.",
|
|
2614
|
+
placement: "auto"
|
|
2615
|
+
}
|
|
2616
|
+
], Me = {
|
|
839
2617
|
id: "",
|
|
840
2618
|
name: "New Dashboard",
|
|
841
2619
|
layout: {
|
|
@@ -846,7 +2624,7 @@ const Q = {
|
|
|
846
2624
|
},
|
|
847
2625
|
widgets: [],
|
|
848
2626
|
filters: []
|
|
849
|
-
},
|
|
2627
|
+
}, q = [
|
|
850
2628
|
{ type: "chart", label: "Chart", icon: "📈", category: "Visualization" },
|
|
851
2629
|
{ type: "table", label: "Table", icon: "📊", category: "Visualization" },
|
|
852
2630
|
{ type: "card", label: "KPI Card", icon: "🎯", category: "Visualization" },
|
|
@@ -862,176 +2640,178 @@ const Q = {
|
|
|
862
2640
|
{ type: "text", label: "Text", icon: "📝", category: "Layout" },
|
|
863
2641
|
{ type: "image", label: "Image", icon: "🖼️", category: "Layout" }
|
|
864
2642
|
];
|
|
865
|
-
function
|
|
866
|
-
dashboard:
|
|
867
|
-
dataSources:
|
|
868
|
-
onChange:
|
|
2643
|
+
function Ze({
|
|
2644
|
+
dashboard: r,
|
|
2645
|
+
dataSources: i = [],
|
|
2646
|
+
onChange: n,
|
|
869
2647
|
onWidgetAdd: s,
|
|
870
|
-
onRefresh:
|
|
871
|
-
className:
|
|
2648
|
+
onRefresh: c,
|
|
2649
|
+
className: u = "",
|
|
2650
|
+
tutorial: m
|
|
872
2651
|
}) {
|
|
873
|
-
const [
|
|
874
|
-
|
|
875
|
-
), [
|
|
876
|
-
(
|
|
877
|
-
|
|
878
|
-
const
|
|
879
|
-
return
|
|
2652
|
+
const [o, v] = D(
|
|
2653
|
+
r || { ...Me, id: crypto.randomUUID() }
|
|
2654
|
+
), [d, h] = D(null), [l, g] = D(!0), [E, T] = D(null), [M, N] = D(!0), C = Q(null), P = k(
|
|
2655
|
+
(y) => {
|
|
2656
|
+
v((t) => {
|
|
2657
|
+
const b = y(t);
|
|
2658
|
+
return n == null || n(b), b;
|
|
880
2659
|
});
|
|
881
2660
|
},
|
|
882
|
-
[
|
|
883
|
-
),
|
|
884
|
-
(
|
|
885
|
-
var
|
|
886
|
-
const
|
|
2661
|
+
[n]
|
|
2662
|
+
), I = k(
|
|
2663
|
+
(y, t) => {
|
|
2664
|
+
var _;
|
|
2665
|
+
const b = {
|
|
887
2666
|
id: crypto.randomUUID(),
|
|
888
|
-
type:
|
|
889
|
-
title: ((
|
|
2667
|
+
type: y,
|
|
2668
|
+
title: ((_ = q.find((R) => R.type === y)) == null ? void 0 : _.label) || y,
|
|
890
2669
|
position: {
|
|
891
|
-
x: (
|
|
892
|
-
y: (
|
|
893
|
-
width: (
|
|
894
|
-
height: (
|
|
2670
|
+
x: (t == null ? void 0 : t.x) ?? 0,
|
|
2671
|
+
y: (t == null ? void 0 : t.y) ?? Pe(o.widgets),
|
|
2672
|
+
width: (t == null ? void 0 : t.width) ?? Le(y),
|
|
2673
|
+
height: (t == null ? void 0 : t.height) ?? Ie(y)
|
|
895
2674
|
},
|
|
896
|
-
config:
|
|
2675
|
+
config: ze(y)
|
|
897
2676
|
};
|
|
898
|
-
|
|
899
|
-
...
|
|
900
|
-
widgets: [...
|
|
901
|
-
})),
|
|
2677
|
+
P((R) => ({
|
|
2678
|
+
...R,
|
|
2679
|
+
widgets: [...R.widgets, b]
|
|
2680
|
+
})), h(b), s == null || s(y);
|
|
902
2681
|
},
|
|
903
|
-
[
|
|
904
|
-
),
|
|
905
|
-
(
|
|
906
|
-
|
|
907
|
-
...
|
|
908
|
-
widgets:
|
|
909
|
-
})), (
|
|
2682
|
+
[o.widgets, P, s]
|
|
2683
|
+
), S = k(
|
|
2684
|
+
(y, t) => {
|
|
2685
|
+
P((b) => ({
|
|
2686
|
+
...b,
|
|
2687
|
+
widgets: b.widgets.map((_) => _.id === y ? { ..._, ...t } : _)
|
|
2688
|
+
})), (d == null ? void 0 : d.id) === y && h((b) => b ? { ...b, ...t } : null);
|
|
910
2689
|
},
|
|
911
|
-
[
|
|
912
|
-
),
|
|
913
|
-
(
|
|
914
|
-
|
|
915
|
-
...
|
|
916
|
-
widgets:
|
|
917
|
-
})),
|
|
2690
|
+
[P, d]
|
|
2691
|
+
), z = k(
|
|
2692
|
+
(y) => {
|
|
2693
|
+
P((t) => ({
|
|
2694
|
+
...t,
|
|
2695
|
+
widgets: t.widgets.filter((b) => b.id !== y)
|
|
2696
|
+
})), h(null);
|
|
918
2697
|
},
|
|
919
|
-
[
|
|
920
|
-
),
|
|
921
|
-
(
|
|
922
|
-
if (
|
|
2698
|
+
[P]
|
|
2699
|
+
), A = k(
|
|
2700
|
+
(y) => {
|
|
2701
|
+
if (y.preventDefault(), !E || !C.current)
|
|
923
2702
|
return;
|
|
924
|
-
const
|
|
925
|
-
|
|
2703
|
+
const t = C.current.getBoundingClientRect(), b = t.width / (o.layout.columns || 12), _ = Math.floor((y.clientX - t.left) / b), R = Math.floor((y.clientY - t.top) / (o.layout.rowHeight || 50));
|
|
2704
|
+
I(E, { x: _, y: R }), T(null);
|
|
926
2705
|
},
|
|
927
|
-
[
|
|
928
|
-
), U =
|
|
929
|
-
|
|
930
|
-
}, [
|
|
931
|
-
return /* @__PURE__ */
|
|
932
|
-
/* @__PURE__ */
|
|
2706
|
+
[E, o.layout, I]
|
|
2707
|
+
), U = k(() => {
|
|
2708
|
+
c == null || c();
|
|
2709
|
+
}, [c]);
|
|
2710
|
+
return /* @__PURE__ */ a("div", { className: `nice-dashboard-studio ${u}`, children: [
|
|
2711
|
+
/* @__PURE__ */ a("div", { className: "nice-dashboard-studio__toolbar", children: [
|
|
933
2712
|
/* @__PURE__ */ e(
|
|
934
2713
|
"input",
|
|
935
2714
|
{
|
|
936
2715
|
type: "text",
|
|
937
|
-
value:
|
|
938
|
-
onChange: (
|
|
2716
|
+
value: o.name,
|
|
2717
|
+
onChange: (y) => P((t) => ({ ...t, name: y.target.value })),
|
|
939
2718
|
className: "nice-dashboard-studio__name-input",
|
|
940
|
-
disabled: !
|
|
2719
|
+
disabled: !l
|
|
941
2720
|
}
|
|
942
2721
|
),
|
|
943
|
-
/* @__PURE__ */
|
|
2722
|
+
/* @__PURE__ */ a("div", { className: "nice-dashboard-studio__actions", children: [
|
|
944
2723
|
/* @__PURE__ */ e(
|
|
945
2724
|
"button",
|
|
946
2725
|
{
|
|
947
|
-
className: `nice-dashboard-studio__action ${
|
|
948
|
-
onClick: () =>
|
|
949
|
-
children:
|
|
2726
|
+
className: `nice-dashboard-studio__action ${l ? "active" : ""}`,
|
|
2727
|
+
onClick: () => g(!l),
|
|
2728
|
+
children: l ? "✏️ Editing" : "👁 Viewing"
|
|
950
2729
|
}
|
|
951
2730
|
),
|
|
952
|
-
/* @__PURE__ */
|
|
2731
|
+
/* @__PURE__ */ a("button", { onClick: () => N(!M), children: [
|
|
953
2732
|
"🔍 Filters ",
|
|
954
|
-
|
|
2733
|
+
M ? "▲" : "▼"
|
|
955
2734
|
] }),
|
|
956
2735
|
/* @__PURE__ */ e("button", { onClick: U, children: "🔄 Refresh" }),
|
|
957
2736
|
/* @__PURE__ */ e("button", { children: "📤 Share" }),
|
|
958
|
-
/* @__PURE__ */ e("button", { children: "💾 Save" })
|
|
2737
|
+
/* @__PURE__ */ e("button", { children: "💾 Save" }),
|
|
2738
|
+
/* @__PURE__ */ e(K, { steps: X(m, Ee) })
|
|
959
2739
|
] })
|
|
960
2740
|
] }),
|
|
961
|
-
|
|
962
|
-
/* @__PURE__ */
|
|
963
|
-
|
|
2741
|
+
M && o.filters.length > 0 && /* @__PURE__ */ e("div", { className: "nice-dashboard-studio__filters-bar", children: o.filters.map((y) => /* @__PURE__ */ e(Fe, { filter: y }, y.id)) }),
|
|
2742
|
+
/* @__PURE__ */ a("div", { className: "nice-dashboard-studio__main", children: [
|
|
2743
|
+
l && /* @__PURE__ */ a("div", { className: "nice-dashboard-studio__palette", children: [
|
|
964
2744
|
/* @__PURE__ */ e("h4", { children: "Widgets" }),
|
|
965
|
-
["Visualization", "Controls", "Layout"].map((
|
|
966
|
-
/* @__PURE__ */ e("h5", { children:
|
|
967
|
-
|
|
2745
|
+
["Visualization", "Controls", "Layout"].map((y) => /* @__PURE__ */ a("div", { className: "nice-dashboard-studio__category", children: [
|
|
2746
|
+
/* @__PURE__ */ e("h5", { children: y }),
|
|
2747
|
+
q.filter((t) => t.category === y).map((t) => /* @__PURE__ */ a(
|
|
968
2748
|
"div",
|
|
969
2749
|
{
|
|
970
2750
|
className: "nice-dashboard-studio__palette-item",
|
|
971
2751
|
draggable: !0,
|
|
972
|
-
onDragStart: () =>
|
|
973
|
-
onDragEnd: () =>
|
|
2752
|
+
onDragStart: () => T(t.type),
|
|
2753
|
+
onDragEnd: () => T(null),
|
|
974
2754
|
children: [
|
|
975
|
-
/* @__PURE__ */ e("span", { className: "nice-dashboard-studio__palette-icon", children:
|
|
976
|
-
/* @__PURE__ */ e("span", { children:
|
|
2755
|
+
/* @__PURE__ */ e("span", { className: "nice-dashboard-studio__palette-icon", children: t.icon }),
|
|
2756
|
+
/* @__PURE__ */ e("span", { children: t.label })
|
|
977
2757
|
]
|
|
978
2758
|
},
|
|
979
|
-
|
|
2759
|
+
t.type
|
|
980
2760
|
))
|
|
981
|
-
] },
|
|
2761
|
+
] }, y)),
|
|
982
2762
|
/* @__PURE__ */ e("h4", { children: "Data Sources" }),
|
|
983
|
-
|
|
2763
|
+
i.map((y) => /* @__PURE__ */ e("div", { className: "nice-dashboard-studio__datasource", children: /* @__PURE__ */ a("span", { children: [
|
|
984
2764
|
"🗄️ ",
|
|
985
|
-
|
|
986
|
-
] }) },
|
|
2765
|
+
y.name
|
|
2766
|
+
] }) }, y.id))
|
|
987
2767
|
] }),
|
|
988
|
-
/* @__PURE__ */
|
|
2768
|
+
/* @__PURE__ */ a(
|
|
989
2769
|
"div",
|
|
990
2770
|
{
|
|
991
|
-
ref:
|
|
992
|
-
className: `nice-dashboard-studio__grid ${
|
|
2771
|
+
ref: C,
|
|
2772
|
+
className: `nice-dashboard-studio__grid ${l ? "nice-dashboard-studio__grid--editing" : ""}`,
|
|
993
2773
|
style: {
|
|
994
|
-
"--columns":
|
|
995
|
-
"--row-height": `${
|
|
996
|
-
"--gap": `${
|
|
2774
|
+
"--columns": o.layout.columns || 12,
|
|
2775
|
+
"--row-height": `${o.layout.rowHeight || 50}px`,
|
|
2776
|
+
"--gap": `${o.layout.gap || 8}px`
|
|
997
2777
|
},
|
|
998
|
-
onDragOver: (
|
|
999
|
-
onDrop:
|
|
1000
|
-
onClick: () =>
|
|
2778
|
+
onDragOver: (y) => y.preventDefault(),
|
|
2779
|
+
onDrop: A,
|
|
2780
|
+
onClick: () => h(null),
|
|
1001
2781
|
children: [
|
|
1002
|
-
|
|
1003
|
-
|
|
2782
|
+
o.widgets.map((y) => /* @__PURE__ */ e(
|
|
2783
|
+
Ae,
|
|
1004
2784
|
{
|
|
1005
|
-
widget:
|
|
1006
|
-
isSelected: (
|
|
1007
|
-
isEditing:
|
|
1008
|
-
onSelect: () =>
|
|
1009
|
-
onUpdate: (
|
|
1010
|
-
onDelete: () =>
|
|
2785
|
+
widget: y,
|
|
2786
|
+
isSelected: (d == null ? void 0 : d.id) === y.id,
|
|
2787
|
+
isEditing: l,
|
|
2788
|
+
onSelect: () => h(y),
|
|
2789
|
+
onUpdate: (t) => S(y.id, t),
|
|
2790
|
+
onDelete: () => z(y.id)
|
|
1011
2791
|
},
|
|
1012
|
-
|
|
2792
|
+
y.id
|
|
1013
2793
|
)),
|
|
1014
|
-
|
|
2794
|
+
o.widgets.length === 0 && l && /* @__PURE__ */ e("div", { className: "nice-dashboard-studio__empty", children: "Drag widgets from the palette to build your dashboard" })
|
|
1015
2795
|
]
|
|
1016
2796
|
}
|
|
1017
2797
|
),
|
|
1018
|
-
|
|
1019
|
-
|
|
2798
|
+
d && l && /* @__PURE__ */ e(
|
|
2799
|
+
$e,
|
|
1020
2800
|
{
|
|
1021
|
-
widget:
|
|
1022
|
-
dataSources:
|
|
1023
|
-
onChange: (
|
|
1024
|
-
onClose: () =>
|
|
2801
|
+
widget: d,
|
|
2802
|
+
dataSources: i,
|
|
2803
|
+
onChange: (y) => S(d.id, y),
|
|
2804
|
+
onClose: () => h(null)
|
|
1025
2805
|
}
|
|
1026
2806
|
)
|
|
1027
2807
|
] })
|
|
1028
2808
|
] });
|
|
1029
2809
|
}
|
|
1030
|
-
function
|
|
1031
|
-
return
|
|
2810
|
+
function Pe(r) {
|
|
2811
|
+
return r.length === 0 ? 0 : Math.max(...r.map((i) => i.position.y + i.position.height));
|
|
1032
2812
|
}
|
|
1033
|
-
function
|
|
1034
|
-
switch (
|
|
2813
|
+
function Le(r) {
|
|
2814
|
+
switch (r) {
|
|
1035
2815
|
case "card":
|
|
1036
2816
|
return 3;
|
|
1037
2817
|
case "gauge":
|
|
@@ -1050,8 +2830,8 @@ function J(i) {
|
|
|
1050
2830
|
return 4;
|
|
1051
2831
|
}
|
|
1052
2832
|
}
|
|
1053
|
-
function
|
|
1054
|
-
switch (
|
|
2833
|
+
function Ie(r) {
|
|
2834
|
+
switch (r) {
|
|
1055
2835
|
case "card":
|
|
1056
2836
|
return 2;
|
|
1057
2837
|
case "gauge":
|
|
@@ -1070,8 +2850,8 @@ function Z(i) {
|
|
|
1070
2850
|
return 4;
|
|
1071
2851
|
}
|
|
1072
2852
|
}
|
|
1073
|
-
function
|
|
1074
|
-
switch (
|
|
2853
|
+
function ze(r) {
|
|
2854
|
+
switch (r) {
|
|
1075
2855
|
case "chart":
|
|
1076
2856
|
return { chartType: "bar", series: [], axes: [], legend: { show: !0, position: "bottom" } };
|
|
1077
2857
|
case "table":
|
|
@@ -1094,71 +2874,71 @@ function ee(i) {
|
|
|
1094
2874
|
return {};
|
|
1095
2875
|
}
|
|
1096
2876
|
}
|
|
1097
|
-
function
|
|
1098
|
-
widget:
|
|
1099
|
-
isSelected:
|
|
1100
|
-
isEditing:
|
|
2877
|
+
function Ae({
|
|
2878
|
+
widget: r,
|
|
2879
|
+
isSelected: i,
|
|
2880
|
+
isEditing: n,
|
|
1101
2881
|
onSelect: s,
|
|
1102
|
-
onUpdate:
|
|
1103
|
-
onDelete:
|
|
2882
|
+
onUpdate: c,
|
|
2883
|
+
onDelete: u
|
|
1104
2884
|
}) {
|
|
1105
|
-
const
|
|
1106
|
-
if (!
|
|
2885
|
+
const m = (v) => {
|
|
2886
|
+
if (!n || v.button !== 0)
|
|
1107
2887
|
return;
|
|
1108
|
-
|
|
1109
|
-
const
|
|
1110
|
-
const
|
|
1111
|
-
|
|
2888
|
+
v.stopPropagation(), s();
|
|
2889
|
+
const d = v.clientX, h = v.clientY, l = { ...r.position }, g = (T) => {
|
|
2890
|
+
const M = Math.round((T.clientX - d) / 50), N = Math.round((T.clientY - h) / 50);
|
|
2891
|
+
c({
|
|
1112
2892
|
position: {
|
|
1113
|
-
...
|
|
1114
|
-
x: Math.max(0,
|
|
1115
|
-
y: Math.max(0,
|
|
2893
|
+
...l,
|
|
2894
|
+
x: Math.max(0, l.x + M),
|
|
2895
|
+
y: Math.max(0, l.y + N)
|
|
1116
2896
|
}
|
|
1117
2897
|
});
|
|
1118
|
-
},
|
|
1119
|
-
window.removeEventListener("mousemove",
|
|
2898
|
+
}, E = () => {
|
|
2899
|
+
window.removeEventListener("mousemove", g), window.removeEventListener("mouseup", E);
|
|
1120
2900
|
};
|
|
1121
|
-
window.addEventListener("mousemove",
|
|
1122
|
-
},
|
|
1123
|
-
return /* @__PURE__ */
|
|
2901
|
+
window.addEventListener("mousemove", g), window.addEventListener("mouseup", E);
|
|
2902
|
+
}, o = q.find((v) => v.type === r.type);
|
|
2903
|
+
return /* @__PURE__ */ a(
|
|
1124
2904
|
"div",
|
|
1125
2905
|
{
|
|
1126
|
-
className: `nice-dashboard-studio__widget nice-dashboard-studio__widget--${
|
|
2906
|
+
className: `nice-dashboard-studio__widget nice-dashboard-studio__widget--${r.type} ${i ? "nice-dashboard-studio__widget--selected" : ""}`,
|
|
1127
2907
|
style: {
|
|
1128
|
-
gridColumn: `${
|
|
1129
|
-
gridRow: `${
|
|
2908
|
+
gridColumn: `${r.position.x + 1} / span ${r.position.width}`,
|
|
2909
|
+
gridRow: `${r.position.y + 1} / span ${r.position.height}`
|
|
1130
2910
|
},
|
|
1131
|
-
onMouseDown:
|
|
2911
|
+
onMouseDown: m,
|
|
1132
2912
|
children: [
|
|
1133
|
-
/* @__PURE__ */
|
|
1134
|
-
/* @__PURE__ */ e("span", { className: "nice-dashboard-studio__widget-icon", children:
|
|
1135
|
-
/* @__PURE__ */ e("span", { className: "nice-dashboard-studio__widget-title", children:
|
|
1136
|
-
|
|
2913
|
+
/* @__PURE__ */ a("div", { className: "nice-dashboard-studio__widget-header", children: [
|
|
2914
|
+
/* @__PURE__ */ e("span", { className: "nice-dashboard-studio__widget-icon", children: o == null ? void 0 : o.icon }),
|
|
2915
|
+
/* @__PURE__ */ e("span", { className: "nice-dashboard-studio__widget-title", children: r.title }),
|
|
2916
|
+
n && /* @__PURE__ */ e(
|
|
1137
2917
|
"button",
|
|
1138
2918
|
{
|
|
1139
2919
|
className: "nice-dashboard-studio__widget-delete",
|
|
1140
|
-
onClick: (
|
|
1141
|
-
|
|
2920
|
+
onClick: (v) => {
|
|
2921
|
+
v.stopPropagation(), u();
|
|
1142
2922
|
},
|
|
1143
2923
|
children: "×"
|
|
1144
2924
|
}
|
|
1145
2925
|
)
|
|
1146
2926
|
] }),
|
|
1147
|
-
/* @__PURE__ */ e("div", { className: "nice-dashboard-studio__widget-content", children: /* @__PURE__ */ e(
|
|
2927
|
+
/* @__PURE__ */ e("div", { className: "nice-dashboard-studio__widget-content", children: /* @__PURE__ */ e(Ue, { widget: r }) })
|
|
1148
2928
|
]
|
|
1149
2929
|
}
|
|
1150
2930
|
);
|
|
1151
2931
|
}
|
|
1152
|
-
function
|
|
1153
|
-
switch (
|
|
2932
|
+
function Ue({ widget: r }) {
|
|
2933
|
+
switch (r.type) {
|
|
1154
2934
|
case "card":
|
|
1155
|
-
return /* @__PURE__ */
|
|
1156
|
-
/* @__PURE__ */ e("div", { className: "nice-dashboard-studio__card-value", children: String(
|
|
1157
|
-
/* @__PURE__ */ e("div", { className: "nice-dashboard-studio__card-label", children: String(
|
|
2935
|
+
return /* @__PURE__ */ a("div", { className: "nice-dashboard-studio__card", children: [
|
|
2936
|
+
/* @__PURE__ */ e("div", { className: "nice-dashboard-studio__card-value", children: String(r.config.value || "0") }),
|
|
2937
|
+
/* @__PURE__ */ e("div", { className: "nice-dashboard-studio__card-label", children: String(r.config.label || "Label") })
|
|
1158
2938
|
] });
|
|
1159
2939
|
case "gauge": {
|
|
1160
|
-
const
|
|
1161
|
-
return /* @__PURE__ */ e("div", { className: "nice-dashboard-studio__gauge", children: /* @__PURE__ */
|
|
2940
|
+
const i = Number(r.config.value) || 0, n = Number(r.config.max) || 100, s = i / n * 100;
|
|
2941
|
+
return /* @__PURE__ */ e("div", { className: "nice-dashboard-studio__gauge", children: /* @__PURE__ */ a("svg", { viewBox: "0 0 100 60", children: [
|
|
1162
2942
|
/* @__PURE__ */ e(
|
|
1163
2943
|
"path",
|
|
1164
2944
|
{
|
|
@@ -1178,27 +2958,27 @@ function te({ widget: i }) {
|
|
|
1178
2958
|
strokeDasharray: `${s * 1.26} 126`
|
|
1179
2959
|
}
|
|
1180
2960
|
),
|
|
1181
|
-
/* @__PURE__ */
|
|
1182
|
-
|
|
2961
|
+
/* @__PURE__ */ a("text", { x: "50", y: "50", textAnchor: "middle", fontSize: "16", fontWeight: "bold", children: [
|
|
2962
|
+
i,
|
|
1183
2963
|
"%"
|
|
1184
2964
|
] })
|
|
1185
2965
|
] }) });
|
|
1186
2966
|
}
|
|
1187
2967
|
case "chart":
|
|
1188
|
-
return /* @__PURE__ */
|
|
2968
|
+
return /* @__PURE__ */ a("div", { className: "nice-dashboard-studio__chart-placeholder", children: [
|
|
1189
2969
|
/* @__PURE__ */ e("span", { children: "📊" }),
|
|
1190
|
-
/* @__PURE__ */
|
|
1191
|
-
String(
|
|
2970
|
+
/* @__PURE__ */ a("span", { children: [
|
|
2971
|
+
String(r.config.chartType || "bar"),
|
|
1192
2972
|
" chart"
|
|
1193
2973
|
] })
|
|
1194
2974
|
] });
|
|
1195
2975
|
case "table":
|
|
1196
|
-
return /* @__PURE__ */
|
|
2976
|
+
return /* @__PURE__ */ a("div", { className: "nice-dashboard-studio__table-placeholder", children: [
|
|
1197
2977
|
/* @__PURE__ */ e("span", { children: "📋" }),
|
|
1198
2978
|
/* @__PURE__ */ e("span", { children: "Data table" })
|
|
1199
2979
|
] });
|
|
1200
2980
|
case "map":
|
|
1201
|
-
return /* @__PURE__ */
|
|
2981
|
+
return /* @__PURE__ */ a("div", { className: "nice-dashboard-studio__map-placeholder", children: [
|
|
1202
2982
|
/* @__PURE__ */ e("span", { children: "🗺️" }),
|
|
1203
2983
|
/* @__PURE__ */ e("span", { children: "Map visualization" })
|
|
1204
2984
|
] });
|
|
@@ -1207,95 +2987,95 @@ function te({ widget: i }) {
|
|
|
1207
2987
|
"div",
|
|
1208
2988
|
{
|
|
1209
2989
|
className: "nice-dashboard-studio__text",
|
|
1210
|
-
style: { fontSize: Number(
|
|
1211
|
-
children: String(
|
|
2990
|
+
style: { fontSize: Number(r.config.fontSize) || 14 },
|
|
2991
|
+
children: String(r.config.content || "")
|
|
1212
2992
|
}
|
|
1213
2993
|
);
|
|
1214
2994
|
default:
|
|
1215
|
-
return /* @__PURE__ */ e("div", { className: "nice-dashboard-studio__widget-placeholder", children:
|
|
2995
|
+
return /* @__PURE__ */ e("div", { className: "nice-dashboard-studio__widget-placeholder", children: r.type });
|
|
1216
2996
|
}
|
|
1217
2997
|
}
|
|
1218
|
-
function
|
|
1219
|
-
const [
|
|
1220
|
-
switch (
|
|
2998
|
+
function Fe({ filter: r }) {
|
|
2999
|
+
const [i, n] = D(r.defaultValue);
|
|
3000
|
+
switch (r.type) {
|
|
1221
3001
|
case "dropdown":
|
|
1222
|
-
return /* @__PURE__ */
|
|
1223
|
-
/* @__PURE__ */ e("label", { children:
|
|
1224
|
-
/* @__PURE__ */ e("select", { value: String(
|
|
3002
|
+
return /* @__PURE__ */ a("div", { className: "nice-dashboard-studio__filter", children: [
|
|
3003
|
+
/* @__PURE__ */ e("label", { children: r.label }),
|
|
3004
|
+
/* @__PURE__ */ e("select", { value: String(i || ""), onChange: (s) => n(s.target.value), children: /* @__PURE__ */ e("option", { value: "", children: "All" }) })
|
|
1225
3005
|
] });
|
|
1226
3006
|
case "daterange":
|
|
1227
|
-
return /* @__PURE__ */
|
|
1228
|
-
/* @__PURE__ */ e("label", { children:
|
|
3007
|
+
return /* @__PURE__ */ a("div", { className: "nice-dashboard-studio__filter", children: [
|
|
3008
|
+
/* @__PURE__ */ e("label", { children: r.label }),
|
|
1229
3009
|
/* @__PURE__ */ e("input", { type: "date" }),
|
|
1230
3010
|
/* @__PURE__ */ e("span", { children: "to" }),
|
|
1231
3011
|
/* @__PURE__ */ e("input", { type: "date" })
|
|
1232
3012
|
] });
|
|
1233
3013
|
case "slider":
|
|
1234
|
-
return /* @__PURE__ */
|
|
1235
|
-
/* @__PURE__ */ e("label", { children:
|
|
3014
|
+
return /* @__PURE__ */ a("div", { className: "nice-dashboard-studio__filter", children: [
|
|
3015
|
+
/* @__PURE__ */ e("label", { children: r.label }),
|
|
1236
3016
|
/* @__PURE__ */ e("input", { type: "range" })
|
|
1237
3017
|
] });
|
|
1238
3018
|
default:
|
|
1239
|
-
return /* @__PURE__ */
|
|
1240
|
-
/* @__PURE__ */ e("label", { children:
|
|
3019
|
+
return /* @__PURE__ */ a("div", { className: "nice-dashboard-studio__filter", children: [
|
|
3020
|
+
/* @__PURE__ */ e("label", { children: r.label }),
|
|
1241
3021
|
/* @__PURE__ */ e(
|
|
1242
3022
|
"input",
|
|
1243
3023
|
{
|
|
1244
3024
|
type: "text",
|
|
1245
|
-
value: String(
|
|
1246
|
-
onChange: (s) =>
|
|
3025
|
+
value: String(i || ""),
|
|
3026
|
+
onChange: (s) => n(s.target.value)
|
|
1247
3027
|
}
|
|
1248
3028
|
)
|
|
1249
3029
|
] });
|
|
1250
3030
|
}
|
|
1251
3031
|
}
|
|
1252
|
-
function
|
|
1253
|
-
widget:
|
|
1254
|
-
dataSources:
|
|
1255
|
-
onChange:
|
|
3032
|
+
function $e({
|
|
3033
|
+
widget: r,
|
|
3034
|
+
dataSources: i,
|
|
3035
|
+
onChange: n,
|
|
1256
3036
|
onClose: s
|
|
1257
3037
|
}) {
|
|
1258
|
-
return /* @__PURE__ */
|
|
1259
|
-
/* @__PURE__ */
|
|
3038
|
+
return /* @__PURE__ */ a("div", { className: "nice-dashboard-studio__properties", children: [
|
|
3039
|
+
/* @__PURE__ */ a("div", { className: "nice-dashboard-studio__properties-header", children: [
|
|
1260
3040
|
/* @__PURE__ */ e("h4", { children: "Widget Properties" }),
|
|
1261
3041
|
/* @__PURE__ */ e("button", { onClick: s, children: "×" })
|
|
1262
3042
|
] }),
|
|
1263
|
-
/* @__PURE__ */
|
|
1264
|
-
/* @__PURE__ */
|
|
3043
|
+
/* @__PURE__ */ a("div", { className: "nice-dashboard-studio__properties-content", children: [
|
|
3044
|
+
/* @__PURE__ */ a("div", { className: "nice-dashboard-studio__field", children: [
|
|
1265
3045
|
/* @__PURE__ */ e("label", { children: "Title" }),
|
|
1266
3046
|
/* @__PURE__ */ e(
|
|
1267
3047
|
"input",
|
|
1268
3048
|
{
|
|
1269
3049
|
type: "text",
|
|
1270
|
-
value:
|
|
1271
|
-
onChange: (
|
|
3050
|
+
value: r.title || "",
|
|
3051
|
+
onChange: (c) => n({ title: c.target.value })
|
|
1272
3052
|
}
|
|
1273
3053
|
)
|
|
1274
3054
|
] }),
|
|
1275
|
-
/* @__PURE__ */
|
|
3055
|
+
/* @__PURE__ */ a("div", { className: "nice-dashboard-studio__field", children: [
|
|
1276
3056
|
/* @__PURE__ */ e("label", { children: "Data Source" }),
|
|
1277
|
-
/* @__PURE__ */
|
|
3057
|
+
/* @__PURE__ */ a(
|
|
1278
3058
|
"select",
|
|
1279
3059
|
{
|
|
1280
|
-
value:
|
|
1281
|
-
onChange: (
|
|
3060
|
+
value: r.dataSource || "",
|
|
3061
|
+
onChange: (c) => n({ dataSource: c.target.value }),
|
|
1282
3062
|
children: [
|
|
1283
3063
|
/* @__PURE__ */ e("option", { value: "", children: "Select..." }),
|
|
1284
|
-
|
|
3064
|
+
i.map((c) => /* @__PURE__ */ e("option", { value: c.id, children: c.name }, c.id))
|
|
1285
3065
|
]
|
|
1286
3066
|
}
|
|
1287
3067
|
)
|
|
1288
3068
|
] }),
|
|
1289
|
-
/* @__PURE__ */
|
|
3069
|
+
/* @__PURE__ */ a("div", { className: "nice-dashboard-studio__field", children: [
|
|
1290
3070
|
/* @__PURE__ */ e("label", { children: "Size" }),
|
|
1291
|
-
/* @__PURE__ */
|
|
3071
|
+
/* @__PURE__ */ a("div", { className: "nice-dashboard-studio__size-inputs", children: [
|
|
1292
3072
|
/* @__PURE__ */ e(
|
|
1293
3073
|
"input",
|
|
1294
3074
|
{
|
|
1295
3075
|
type: "number",
|
|
1296
|
-
value:
|
|
1297
|
-
onChange: (
|
|
1298
|
-
position: { ...
|
|
3076
|
+
value: r.position.width,
|
|
3077
|
+
onChange: (c) => n({
|
|
3078
|
+
position: { ...r.position, width: parseInt(c.target.value, 10) || 1 }
|
|
1299
3079
|
}),
|
|
1300
3080
|
min: 1,
|
|
1301
3081
|
max: 12
|
|
@@ -1306,9 +3086,9 @@ function ae({
|
|
|
1306
3086
|
"input",
|
|
1307
3087
|
{
|
|
1308
3088
|
type: "number",
|
|
1309
|
-
value:
|
|
1310
|
-
onChange: (
|
|
1311
|
-
position: { ...
|
|
3089
|
+
value: r.position.height,
|
|
3090
|
+
onChange: (c) => n({
|
|
3091
|
+
position: { ...r.position, height: parseInt(c.target.value, 10) || 1 }
|
|
1312
3092
|
}),
|
|
1313
3093
|
min: 1,
|
|
1314
3094
|
max: 20
|
|
@@ -1316,13 +3096,13 @@ function ae({
|
|
|
1316
3096
|
)
|
|
1317
3097
|
] })
|
|
1318
3098
|
] }),
|
|
1319
|
-
|
|
3099
|
+
r.type === "chart" && /* @__PURE__ */ a("div", { className: "nice-dashboard-studio__field", children: [
|
|
1320
3100
|
/* @__PURE__ */ e("label", { children: "Chart Type" }),
|
|
1321
|
-
/* @__PURE__ */
|
|
3101
|
+
/* @__PURE__ */ a(
|
|
1322
3102
|
"select",
|
|
1323
3103
|
{
|
|
1324
|
-
value: String(
|
|
1325
|
-
onChange: (
|
|
3104
|
+
value: String(r.config.chartType || "bar"),
|
|
3105
|
+
onChange: (c) => n({ config: { ...r.config, chartType: c.target.value } }),
|
|
1326
3106
|
children: [
|
|
1327
3107
|
/* @__PURE__ */ e("option", { value: "bar", children: "Bar" }),
|
|
1328
3108
|
/* @__PURE__ */ e("option", { value: "line", children: "Line" }),
|
|
@@ -1334,50 +3114,50 @@ function ae({
|
|
|
1334
3114
|
}
|
|
1335
3115
|
)
|
|
1336
3116
|
] }),
|
|
1337
|
-
|
|
1338
|
-
/* @__PURE__ */
|
|
3117
|
+
r.type === "card" && /* @__PURE__ */ a($, { children: [
|
|
3118
|
+
/* @__PURE__ */ a("div", { className: "nice-dashboard-studio__field", children: [
|
|
1339
3119
|
/* @__PURE__ */ e("label", { children: "Value Field" }),
|
|
1340
3120
|
/* @__PURE__ */ e(
|
|
1341
3121
|
"input",
|
|
1342
3122
|
{
|
|
1343
3123
|
type: "text",
|
|
1344
|
-
value: String(
|
|
1345
|
-
onChange: (
|
|
3124
|
+
value: String(r.config.value || ""),
|
|
3125
|
+
onChange: (c) => n({ config: { ...r.config, value: c.target.value } }),
|
|
1346
3126
|
placeholder: "e.g., SUM(Sales)"
|
|
1347
3127
|
}
|
|
1348
3128
|
)
|
|
1349
3129
|
] }),
|
|
1350
|
-
/* @__PURE__ */
|
|
3130
|
+
/* @__PURE__ */ a("div", { className: "nice-dashboard-studio__field", children: [
|
|
1351
3131
|
/* @__PURE__ */ e("label", { children: "Label" }),
|
|
1352
3132
|
/* @__PURE__ */ e(
|
|
1353
3133
|
"input",
|
|
1354
3134
|
{
|
|
1355
3135
|
type: "text",
|
|
1356
|
-
value: String(
|
|
1357
|
-
onChange: (
|
|
3136
|
+
value: String(r.config.label || ""),
|
|
3137
|
+
onChange: (c) => n({ config: { ...r.config, label: c.target.value } })
|
|
1358
3138
|
}
|
|
1359
3139
|
)
|
|
1360
3140
|
] })
|
|
1361
3141
|
] }),
|
|
1362
|
-
|
|
3142
|
+
r.type === "text" && /* @__PURE__ */ a("div", { className: "nice-dashboard-studio__field", children: [
|
|
1363
3143
|
/* @__PURE__ */ e("label", { children: "Content" }),
|
|
1364
3144
|
/* @__PURE__ */ e(
|
|
1365
3145
|
"textarea",
|
|
1366
3146
|
{
|
|
1367
|
-
value: String(
|
|
1368
|
-
onChange: (
|
|
3147
|
+
value: String(r.config.content || ""),
|
|
3148
|
+
onChange: (c) => n({ config: { ...r.config, content: c.target.value } }),
|
|
1369
3149
|
rows: 4
|
|
1370
3150
|
}
|
|
1371
3151
|
)
|
|
1372
3152
|
] }),
|
|
1373
|
-
/* @__PURE__ */
|
|
3153
|
+
/* @__PURE__ */ a("div", { className: "nice-dashboard-studio__field", children: [
|
|
1374
3154
|
/* @__PURE__ */ e("label", { children: "Refresh Interval (seconds)" }),
|
|
1375
3155
|
/* @__PURE__ */ e(
|
|
1376
3156
|
"input",
|
|
1377
3157
|
{
|
|
1378
3158
|
type: "number",
|
|
1379
|
-
value:
|
|
1380
|
-
onChange: (
|
|
3159
|
+
value: r.refreshInterval || 0,
|
|
3160
|
+
onChange: (c) => n({ refreshInterval: parseInt(c.target.value, 10) || 0 }),
|
|
1381
3161
|
min: 0,
|
|
1382
3162
|
placeholder: "0 = manual"
|
|
1383
3163
|
}
|
|
@@ -1386,14 +3166,23 @@ function ae({
|
|
|
1386
3166
|
] })
|
|
1387
3167
|
] });
|
|
1388
3168
|
}
|
|
1389
|
-
const
|
|
3169
|
+
const Be = [
|
|
3170
|
+
{
|
|
3171
|
+
target: ".nice-etl-builder",
|
|
3172
|
+
titleKey: "tutorial.etlBuilder.intro.title",
|
|
3173
|
+
title: "ETL builder",
|
|
3174
|
+
contentKey: "tutorial.etlBuilder.intro.content",
|
|
3175
|
+
content: "Wire sources → transformations → destinations into a pipeline, switch the views, then run it and save the configuration.",
|
|
3176
|
+
placement: "auto"
|
|
3177
|
+
}
|
|
3178
|
+
], Oe = {
|
|
1390
3179
|
id: "",
|
|
1391
3180
|
name: "New Pipeline",
|
|
1392
3181
|
sources: [],
|
|
1393
3182
|
transformations: [],
|
|
1394
3183
|
destinations: [],
|
|
1395
3184
|
version: 1
|
|
1396
|
-
},
|
|
3185
|
+
}, V = [
|
|
1397
3186
|
{ type: "filter", label: "Filter", icon: "🔍" },
|
|
1398
3187
|
{ type: "map", label: "Map", icon: "🔄" },
|
|
1399
3188
|
{ type: "aggregate", label: "Aggregate", icon: "∑" },
|
|
@@ -1411,309 +3200,311 @@ const le = {
|
|
|
1411
3200
|
{ type: "cleanse", label: "Cleanse", icon: "🧹" },
|
|
1412
3201
|
{ type: "custom", label: "Custom", icon: "ƒ" }
|
|
1413
3202
|
];
|
|
1414
|
-
function
|
|
1415
|
-
pipeline:
|
|
1416
|
-
dataSources:
|
|
1417
|
-
onChange:
|
|
3203
|
+
function er({
|
|
3204
|
+
pipeline: r,
|
|
3205
|
+
dataSources: i = [],
|
|
3206
|
+
onChange: n,
|
|
1418
3207
|
onRun: s,
|
|
1419
|
-
onSchedule:
|
|
1420
|
-
className:
|
|
3208
|
+
onSchedule: c,
|
|
3209
|
+
className: u = "",
|
|
3210
|
+
tutorial: m
|
|
1421
3211
|
}) {
|
|
1422
|
-
const [
|
|
1423
|
-
|
|
1424
|
-
), [
|
|
1425
|
-
(
|
|
1426
|
-
|
|
1427
|
-
const x =
|
|
1428
|
-
return
|
|
3212
|
+
const [o, v] = D(
|
|
3213
|
+
r || { ...Oe, id: crypto.randomUUID() }
|
|
3214
|
+
), [d, h] = D(null), [l, g] = D("design"), [E, T] = D(!1), [M, N] = D([]), [C, P] = D(null), I = Q(null), S = k(
|
|
3215
|
+
(p) => {
|
|
3216
|
+
v((w) => {
|
|
3217
|
+
const x = p(w);
|
|
3218
|
+
return n == null || n(x), x;
|
|
1429
3219
|
});
|
|
1430
3220
|
},
|
|
1431
|
-
[
|
|
1432
|
-
),
|
|
1433
|
-
(
|
|
3221
|
+
[n]
|
|
3222
|
+
), z = k(
|
|
3223
|
+
(p) => {
|
|
1434
3224
|
var x;
|
|
1435
|
-
const
|
|
3225
|
+
const w = {
|
|
1436
3226
|
id: crypto.randomUUID(),
|
|
1437
|
-
type:
|
|
1438
|
-
name:
|
|
1439
|
-
config:
|
|
1440
|
-
schema: (x =
|
|
3227
|
+
type: p.type,
|
|
3228
|
+
name: p.name,
|
|
3229
|
+
config: p.config,
|
|
3230
|
+
schema: (x = p.schema) == null ? void 0 : x.tables[0]
|
|
1441
3231
|
};
|
|
1442
|
-
|
|
1443
|
-
...
|
|
1444
|
-
sources: [...
|
|
3232
|
+
S((F) => ({
|
|
3233
|
+
...F,
|
|
3234
|
+
sources: [...F.sources, w]
|
|
1445
3235
|
}));
|
|
1446
3236
|
},
|
|
1447
|
-
[
|
|
1448
|
-
),
|
|
1449
|
-
(
|
|
1450
|
-
var
|
|
3237
|
+
[S]
|
|
3238
|
+
), A = k(
|
|
3239
|
+
(p, w) => {
|
|
3240
|
+
var F;
|
|
1451
3241
|
const x = {
|
|
1452
3242
|
id: crypto.randomUUID(),
|
|
1453
|
-
type:
|
|
1454
|
-
name: ((
|
|
3243
|
+
type: p,
|
|
3244
|
+
name: ((F = V.find((O) => O.type === p)) == null ? void 0 : F.label) || p,
|
|
1455
3245
|
input: [],
|
|
1456
3246
|
output: crypto.randomUUID(),
|
|
1457
|
-
config:
|
|
3247
|
+
config: Ve(p)
|
|
1458
3248
|
};
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
transformations: [
|
|
1462
|
-
})),
|
|
3249
|
+
S((O) => ({
|
|
3250
|
+
...O,
|
|
3251
|
+
transformations: [...O.transformations, x]
|
|
3252
|
+
})), h({ type: "transformation", id: x.id });
|
|
1463
3253
|
},
|
|
1464
|
-
[
|
|
1465
|
-
), U =
|
|
1466
|
-
const
|
|
3254
|
+
[S]
|
|
3255
|
+
), U = k(() => {
|
|
3256
|
+
const p = {
|
|
1467
3257
|
id: crypto.randomUUID(),
|
|
1468
3258
|
type: "database",
|
|
1469
3259
|
name: "New Destination",
|
|
1470
3260
|
config: {},
|
|
1471
3261
|
writeMode: "append"
|
|
1472
3262
|
};
|
|
1473
|
-
|
|
1474
|
-
...
|
|
1475
|
-
destinations: [...
|
|
1476
|
-
})),
|
|
1477
|
-
}, [
|
|
1478
|
-
(
|
|
1479
|
-
|
|
1480
|
-
switch (
|
|
3263
|
+
S((w) => ({
|
|
3264
|
+
...w,
|
|
3265
|
+
destinations: [...w.destinations, p]
|
|
3266
|
+
})), h({ type: "destination", id: p.id });
|
|
3267
|
+
}, [S]), y = k(
|
|
3268
|
+
(p, w) => {
|
|
3269
|
+
S((x) => {
|
|
3270
|
+
switch (p) {
|
|
1481
3271
|
case "source":
|
|
1482
|
-
return { ...x, sources: x.sources.filter((
|
|
3272
|
+
return { ...x, sources: x.sources.filter((F) => F.id !== w) };
|
|
1483
3273
|
case "transformation":
|
|
1484
3274
|
return {
|
|
1485
3275
|
...x,
|
|
1486
|
-
transformations: x.transformations.filter((
|
|
3276
|
+
transformations: x.transformations.filter((F) => F.id !== w)
|
|
1487
3277
|
};
|
|
1488
3278
|
case "destination":
|
|
1489
|
-
return { ...x, destinations: x.destinations.filter((
|
|
3279
|
+
return { ...x, destinations: x.destinations.filter((F) => F.id !== w) };
|
|
1490
3280
|
default:
|
|
1491
3281
|
return x;
|
|
1492
3282
|
}
|
|
1493
|
-
}),
|
|
3283
|
+
}), h(null);
|
|
1494
3284
|
},
|
|
1495
|
-
[
|
|
1496
|
-
),
|
|
3285
|
+
[S]
|
|
3286
|
+
), t = k(async () => {
|
|
1497
3287
|
if (s) {
|
|
1498
|
-
|
|
3288
|
+
T(!0);
|
|
1499
3289
|
try {
|
|
1500
|
-
const
|
|
1501
|
-
|
|
3290
|
+
const p = await s(o);
|
|
3291
|
+
N((w) => [p, ...w].slice(0, 50));
|
|
1502
3292
|
} finally {
|
|
1503
|
-
|
|
3293
|
+
T(!1);
|
|
1504
3294
|
}
|
|
1505
3295
|
}
|
|
1506
|
-
}, [
|
|
1507
|
-
(
|
|
1508
|
-
|
|
3296
|
+
}, [o, s]), b = k(
|
|
3297
|
+
(p) => {
|
|
3298
|
+
S((w) => ({ ...w, schedule: p })), c == null || c(o, p);
|
|
1509
3299
|
},
|
|
1510
|
-
[
|
|
1511
|
-
),
|
|
1512
|
-
(
|
|
1513
|
-
if (
|
|
1514
|
-
if (
|
|
1515
|
-
const
|
|
1516
|
-
|
|
3300
|
+
[o, S, c]
|
|
3301
|
+
), _ = k(
|
|
3302
|
+
(p) => {
|
|
3303
|
+
if (p.preventDefault(), !!C) {
|
|
3304
|
+
if (C.startsWith("transform:")) {
|
|
3305
|
+
const w = C.replace("transform:", "");
|
|
3306
|
+
A(w);
|
|
1517
3307
|
}
|
|
1518
|
-
|
|
3308
|
+
P(null);
|
|
1519
3309
|
}
|
|
1520
3310
|
},
|
|
1521
|
-
[
|
|
1522
|
-
),
|
|
1523
|
-
if (!
|
|
3311
|
+
[C, A]
|
|
3312
|
+
), R = () => {
|
|
3313
|
+
if (!d)
|
|
1524
3314
|
return null;
|
|
1525
|
-
switch (
|
|
3315
|
+
switch (d.type) {
|
|
1526
3316
|
case "source":
|
|
1527
|
-
return
|
|
3317
|
+
return o.sources.find((p) => p.id === d.id);
|
|
1528
3318
|
case "transformation":
|
|
1529
|
-
return
|
|
3319
|
+
return o.transformations.find((p) => p.id === d.id);
|
|
1530
3320
|
case "destination":
|
|
1531
|
-
return
|
|
3321
|
+
return o.destinations.find((p) => p.id === d.id);
|
|
1532
3322
|
default:
|
|
1533
3323
|
return null;
|
|
1534
3324
|
}
|
|
1535
3325
|
};
|
|
1536
|
-
return /* @__PURE__ */
|
|
1537
|
-
/* @__PURE__ */
|
|
3326
|
+
return /* @__PURE__ */ a("div", { className: `nice-etl-builder ${u}`, children: [
|
|
3327
|
+
/* @__PURE__ */ a("div", { className: "nice-etl-builder__toolbar", children: [
|
|
1538
3328
|
/* @__PURE__ */ e(
|
|
1539
3329
|
"input",
|
|
1540
3330
|
{
|
|
1541
3331
|
type: "text",
|
|
1542
|
-
value:
|
|
1543
|
-
onChange: (
|
|
3332
|
+
value: o.name,
|
|
3333
|
+
onChange: (p) => S((w) => ({ ...w, name: p.target.value })),
|
|
1544
3334
|
className: "nice-etl-builder__name-input"
|
|
1545
3335
|
}
|
|
1546
3336
|
),
|
|
1547
|
-
/* @__PURE__ */ e("div", { className: "nice-etl-builder__tabs", children: ["design", "code", "schedule", "history"].map((
|
|
3337
|
+
/* @__PURE__ */ e("div", { className: "nice-etl-builder__tabs", children: ["design", "code", "schedule", "history"].map((p) => /* @__PURE__ */ e(
|
|
1548
3338
|
"button",
|
|
1549
3339
|
{
|
|
1550
|
-
className: `nice-etl-builder__tab ${
|
|
1551
|
-
onClick: () => p
|
|
1552
|
-
children:
|
|
3340
|
+
className: `nice-etl-builder__tab ${l === p ? "nice-etl-builder__tab--active" : ""}`,
|
|
3341
|
+
onClick: () => g(p),
|
|
3342
|
+
children: p.charAt(0).toUpperCase() + p.slice(1)
|
|
1553
3343
|
},
|
|
1554
|
-
|
|
3344
|
+
p
|
|
1555
3345
|
)) }),
|
|
1556
|
-
/* @__PURE__ */
|
|
1557
|
-
/* @__PURE__ */ e("button", { onClick:
|
|
1558
|
-
/* @__PURE__ */ e("button", { className: "nice-etl-builder__save-btn", children: "💾 Save" })
|
|
3346
|
+
/* @__PURE__ */ a("div", { className: "nice-etl-builder__actions", children: [
|
|
3347
|
+
/* @__PURE__ */ e("button", { onClick: t, disabled: E, className: "nice-etl-builder__run-btn", children: E ? "⏳ Running..." : "▶ Run" }),
|
|
3348
|
+
/* @__PURE__ */ e("button", { className: "nice-etl-builder__save-btn", children: "💾 Save" }),
|
|
3349
|
+
/* @__PURE__ */ e(K, { steps: X(m, Be) })
|
|
1559
3350
|
] })
|
|
1560
3351
|
] }),
|
|
1561
|
-
/* @__PURE__ */
|
|
1562
|
-
|
|
3352
|
+
/* @__PURE__ */ a("div", { className: "nice-etl-builder__main", children: [
|
|
3353
|
+
l === "design" && /* @__PURE__ */ a("div", { className: "nice-etl-builder__palette", children: [
|
|
1563
3354
|
/* @__PURE__ */ e("h4", { children: "Sources" }),
|
|
1564
|
-
|
|
3355
|
+
i.map((p) => /* @__PURE__ */ a(
|
|
1565
3356
|
"div",
|
|
1566
3357
|
{
|
|
1567
3358
|
className: "nice-etl-builder__palette-item",
|
|
1568
|
-
onClick: () =>
|
|
3359
|
+
onClick: () => z(p),
|
|
1569
3360
|
children: [
|
|
1570
3361
|
/* @__PURE__ */ e("span", { className: "nice-etl-builder__palette-icon", children: "🗄️" }),
|
|
1571
|
-
/* @__PURE__ */ e("span", { children:
|
|
3362
|
+
/* @__PURE__ */ e("span", { children: p.name })
|
|
1572
3363
|
]
|
|
1573
3364
|
},
|
|
1574
|
-
|
|
3365
|
+
p.id
|
|
1575
3366
|
)),
|
|
1576
3367
|
/* @__PURE__ */ e(
|
|
1577
3368
|
"button",
|
|
1578
3369
|
{
|
|
1579
|
-
onClick: () =>
|
|
3370
|
+
onClick: () => z({ id: "", name: "New Source", type: "database", config: {} }),
|
|
1580
3371
|
children: "+ Add Source"
|
|
1581
3372
|
}
|
|
1582
3373
|
),
|
|
1583
3374
|
/* @__PURE__ */ e("h4", { children: "Transformations" }),
|
|
1584
|
-
|
|
3375
|
+
V.map((p) => /* @__PURE__ */ a(
|
|
1585
3376
|
"div",
|
|
1586
3377
|
{
|
|
1587
3378
|
className: "nice-etl-builder__palette-item",
|
|
1588
3379
|
draggable: !0,
|
|
1589
|
-
onDragStart: () =>
|
|
1590
|
-
onDragEnd: () =>
|
|
3380
|
+
onDragStart: () => P(`transform:${p.type}`),
|
|
3381
|
+
onDragEnd: () => P(null),
|
|
1591
3382
|
children: [
|
|
1592
|
-
/* @__PURE__ */ e("span", { className: "nice-etl-builder__palette-icon", children:
|
|
1593
|
-
/* @__PURE__ */ e("span", { children:
|
|
3383
|
+
/* @__PURE__ */ e("span", { className: "nice-etl-builder__palette-icon", children: p.icon }),
|
|
3384
|
+
/* @__PURE__ */ e("span", { children: p.label })
|
|
1594
3385
|
]
|
|
1595
3386
|
},
|
|
1596
|
-
|
|
3387
|
+
p.type
|
|
1597
3388
|
)),
|
|
1598
3389
|
/* @__PURE__ */ e("h4", { children: "Destinations" }),
|
|
1599
3390
|
/* @__PURE__ */ e("button", { onClick: U, children: "+ Add Destination" })
|
|
1600
3391
|
] }),
|
|
1601
|
-
|
|
3392
|
+
l === "design" && /* @__PURE__ */ e(
|
|
1602
3393
|
"div",
|
|
1603
3394
|
{
|
|
1604
|
-
ref:
|
|
3395
|
+
ref: I,
|
|
1605
3396
|
className: "nice-etl-builder__canvas",
|
|
1606
|
-
onDragOver: (
|
|
1607
|
-
onDrop:
|
|
1608
|
-
onClick: () =>
|
|
1609
|
-
children: /* @__PURE__ */
|
|
1610
|
-
/* @__PURE__ */
|
|
3397
|
+
onDragOver: (p) => p.preventDefault(),
|
|
3398
|
+
onDrop: _,
|
|
3399
|
+
onClick: () => h(null),
|
|
3400
|
+
children: /* @__PURE__ */ a("div", { className: "nice-etl-builder__flow", children: [
|
|
3401
|
+
/* @__PURE__ */ a("div", { className: "nice-etl-builder__column", children: [
|
|
1611
3402
|
/* @__PURE__ */ e("h5", { children: "Sources" }),
|
|
1612
|
-
|
|
1613
|
-
|
|
3403
|
+
o.sources.map((p) => /* @__PURE__ */ e(
|
|
3404
|
+
W,
|
|
1614
3405
|
{
|
|
1615
|
-
node:
|
|
3406
|
+
node: p,
|
|
1616
3407
|
nodeType: "source",
|
|
1617
3408
|
icon: "🗄️",
|
|
1618
|
-
isSelected: (
|
|
1619
|
-
onSelect: () =>
|
|
1620
|
-
onDelete: () =>
|
|
3409
|
+
isSelected: (d == null ? void 0 : d.id) === p.id,
|
|
3410
|
+
onSelect: () => h({ type: "source", id: p.id }),
|
|
3411
|
+
onDelete: () => y("source", p.id)
|
|
1621
3412
|
},
|
|
1622
|
-
|
|
3413
|
+
p.id
|
|
1623
3414
|
))
|
|
1624
3415
|
] }),
|
|
1625
3416
|
/* @__PURE__ */ e("div", { className: "nice-etl-builder__arrow", children: "→" }),
|
|
1626
|
-
/* @__PURE__ */
|
|
3417
|
+
/* @__PURE__ */ a("div", { className: "nice-etl-builder__column nice-etl-builder__column--transforms", children: [
|
|
1627
3418
|
/* @__PURE__ */ e("h5", { children: "Transformations" }),
|
|
1628
|
-
|
|
1629
|
-
const
|
|
3419
|
+
o.transformations.map((p) => {
|
|
3420
|
+
const w = V.find((x) => x.type === p.type);
|
|
1630
3421
|
return /* @__PURE__ */ e(
|
|
1631
|
-
|
|
3422
|
+
W,
|
|
1632
3423
|
{
|
|
1633
|
-
node:
|
|
3424
|
+
node: p,
|
|
1634
3425
|
nodeType: "transformation",
|
|
1635
|
-
icon: (
|
|
1636
|
-
isSelected: (
|
|
1637
|
-
onSelect: () =>
|
|
1638
|
-
onDelete: () =>
|
|
3426
|
+
icon: (w == null ? void 0 : w.icon) || "🔄",
|
|
3427
|
+
isSelected: (d == null ? void 0 : d.id) === p.id,
|
|
3428
|
+
onSelect: () => h({ type: "transformation", id: p.id }),
|
|
3429
|
+
onDelete: () => y("transformation", p.id)
|
|
1639
3430
|
},
|
|
1640
|
-
|
|
3431
|
+
p.id
|
|
1641
3432
|
);
|
|
1642
3433
|
}),
|
|
1643
|
-
|
|
3434
|
+
o.transformations.length === 0 && /* @__PURE__ */ e("div", { className: "nice-etl-builder__empty-column", children: "Drag transformations here" })
|
|
1644
3435
|
] }),
|
|
1645
3436
|
/* @__PURE__ */ e("div", { className: "nice-etl-builder__arrow", children: "→" }),
|
|
1646
|
-
/* @__PURE__ */
|
|
3437
|
+
/* @__PURE__ */ a("div", { className: "nice-etl-builder__column", children: [
|
|
1647
3438
|
/* @__PURE__ */ e("h5", { children: "Destinations" }),
|
|
1648
|
-
|
|
1649
|
-
|
|
3439
|
+
o.destinations.map((p) => /* @__PURE__ */ e(
|
|
3440
|
+
W,
|
|
1650
3441
|
{
|
|
1651
|
-
node:
|
|
3442
|
+
node: p,
|
|
1652
3443
|
nodeType: "destination",
|
|
1653
3444
|
icon: "📥",
|
|
1654
|
-
isSelected: (
|
|
1655
|
-
onSelect: () =>
|
|
1656
|
-
onDelete: () =>
|
|
3445
|
+
isSelected: (d == null ? void 0 : d.id) === p.id,
|
|
3446
|
+
onSelect: () => h({ type: "destination", id: p.id }),
|
|
3447
|
+
onDelete: () => y("destination", p.id)
|
|
1657
3448
|
},
|
|
1658
|
-
|
|
3449
|
+
p.id
|
|
1659
3450
|
))
|
|
1660
3451
|
] })
|
|
1661
3452
|
] })
|
|
1662
3453
|
}
|
|
1663
3454
|
),
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
3455
|
+
l === "code" && /* @__PURE__ */ e("div", { className: "nice-etl-builder__code-view", children: /* @__PURE__ */ e("pre", { children: JSON.stringify(o, null, 2) }) }),
|
|
3456
|
+
l === "schedule" && /* @__PURE__ */ e(
|
|
3457
|
+
qe,
|
|
1667
3458
|
{
|
|
1668
|
-
schedule:
|
|
1669
|
-
monitoring:
|
|
1670
|
-
onChange:
|
|
3459
|
+
schedule: o.schedule,
|
|
3460
|
+
monitoring: o.monitoring,
|
|
3461
|
+
onChange: b
|
|
1671
3462
|
}
|
|
1672
3463
|
),
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
3464
|
+
l === "history" && /* @__PURE__ */ e(Ye, { runs: M }),
|
|
3465
|
+
d && l === "design" && /* @__PURE__ */ e(
|
|
3466
|
+
We,
|
|
1676
3467
|
{
|
|
1677
|
-
nodeType:
|
|
1678
|
-
node:
|
|
1679
|
-
dataSources:
|
|
1680
|
-
onChange: (
|
|
1681
|
-
|
|
1682
|
-
switch (
|
|
3468
|
+
nodeType: d.type,
|
|
3469
|
+
node: R() ?? null,
|
|
3470
|
+
dataSources: i,
|
|
3471
|
+
onChange: (p) => {
|
|
3472
|
+
S((w) => {
|
|
3473
|
+
switch (d.type) {
|
|
1683
3474
|
case "source":
|
|
1684
3475
|
return {
|
|
1685
|
-
...
|
|
1686
|
-
sources:
|
|
1687
|
-
(x) => x.id ===
|
|
3476
|
+
...w,
|
|
3477
|
+
sources: w.sources.map(
|
|
3478
|
+
(x) => x.id === d.id ? { ...x, ...p } : x
|
|
1688
3479
|
)
|
|
1689
3480
|
};
|
|
1690
3481
|
case "transformation":
|
|
1691
3482
|
return {
|
|
1692
|
-
...
|
|
1693
|
-
transformations:
|
|
1694
|
-
(x) => x.id ===
|
|
3483
|
+
...w,
|
|
3484
|
+
transformations: w.transformations.map(
|
|
3485
|
+
(x) => x.id === d.id ? { ...x, ...p } : x
|
|
1695
3486
|
)
|
|
1696
3487
|
};
|
|
1697
3488
|
case "destination":
|
|
1698
3489
|
return {
|
|
1699
|
-
...
|
|
1700
|
-
destinations:
|
|
1701
|
-
(x) => x.id ===
|
|
3490
|
+
...w,
|
|
3491
|
+
destinations: w.destinations.map(
|
|
3492
|
+
(x) => x.id === d.id ? { ...x, ...p } : x
|
|
1702
3493
|
)
|
|
1703
3494
|
};
|
|
1704
3495
|
default:
|
|
1705
|
-
return
|
|
3496
|
+
return w;
|
|
1706
3497
|
}
|
|
1707
3498
|
});
|
|
1708
3499
|
},
|
|
1709
|
-
onClose: () =>
|
|
3500
|
+
onClose: () => h(null)
|
|
1710
3501
|
}
|
|
1711
3502
|
)
|
|
1712
3503
|
] })
|
|
1713
3504
|
] });
|
|
1714
3505
|
}
|
|
1715
|
-
function
|
|
1716
|
-
switch (
|
|
3506
|
+
function Ve(r) {
|
|
3507
|
+
switch (r) {
|
|
1717
3508
|
case "filter":
|
|
1718
3509
|
return { condition: "" };
|
|
1719
3510
|
case "map":
|
|
@@ -1745,30 +3536,30 @@ return data;` };
|
|
|
1745
3536
|
return {};
|
|
1746
3537
|
}
|
|
1747
3538
|
}
|
|
1748
|
-
function
|
|
1749
|
-
node:
|
|
1750
|
-
nodeType:
|
|
1751
|
-
icon:
|
|
3539
|
+
function W({
|
|
3540
|
+
node: r,
|
|
3541
|
+
nodeType: i,
|
|
3542
|
+
icon: n,
|
|
1752
3543
|
isSelected: s,
|
|
1753
|
-
onSelect:
|
|
1754
|
-
onDelete:
|
|
3544
|
+
onSelect: c,
|
|
3545
|
+
onDelete: u
|
|
1755
3546
|
}) {
|
|
1756
|
-
return /* @__PURE__ */
|
|
3547
|
+
return /* @__PURE__ */ a(
|
|
1757
3548
|
"div",
|
|
1758
3549
|
{
|
|
1759
|
-
className: `nice-etl-builder__node nice-etl-builder__node--${
|
|
1760
|
-
onClick: (
|
|
1761
|
-
|
|
3550
|
+
className: `nice-etl-builder__node nice-etl-builder__node--${i} ${s ? "nice-etl-builder__node--selected" : ""}`,
|
|
3551
|
+
onClick: (m) => {
|
|
3552
|
+
m.stopPropagation(), c();
|
|
1762
3553
|
},
|
|
1763
3554
|
children: [
|
|
1764
|
-
/* @__PURE__ */ e("span", { className: "nice-etl-builder__node-icon", children:
|
|
1765
|
-
/* @__PURE__ */ e("span", { className: "nice-etl-builder__node-name", children:
|
|
3555
|
+
/* @__PURE__ */ e("span", { className: "nice-etl-builder__node-icon", children: n }),
|
|
3556
|
+
/* @__PURE__ */ e("span", { className: "nice-etl-builder__node-name", children: r.name }),
|
|
1766
3557
|
/* @__PURE__ */ e(
|
|
1767
3558
|
"button",
|
|
1768
3559
|
{
|
|
1769
3560
|
className: "nice-etl-builder__node-delete",
|
|
1770
|
-
onClick: (
|
|
1771
|
-
|
|
3561
|
+
onClick: (m) => {
|
|
3562
|
+
m.stopPropagation(), u();
|
|
1772
3563
|
},
|
|
1773
3564
|
children: "×"
|
|
1774
3565
|
}
|
|
@@ -1777,42 +3568,42 @@ function A({
|
|
|
1777
3568
|
}
|
|
1778
3569
|
);
|
|
1779
3570
|
}
|
|
1780
|
-
function
|
|
1781
|
-
nodeType:
|
|
1782
|
-
node:
|
|
1783
|
-
dataSources:
|
|
3571
|
+
function We({
|
|
3572
|
+
nodeType: r,
|
|
3573
|
+
node: i,
|
|
3574
|
+
dataSources: n,
|
|
1784
3575
|
onChange: s,
|
|
1785
|
-
onClose:
|
|
3576
|
+
onClose: c
|
|
1786
3577
|
}) {
|
|
1787
|
-
var
|
|
1788
|
-
return
|
|
1789
|
-
/* @__PURE__ */
|
|
1790
|
-
/* @__PURE__ */
|
|
1791
|
-
|
|
3578
|
+
var u;
|
|
3579
|
+
return i ? /* @__PURE__ */ a("div", { className: "nice-etl-builder__properties", children: [
|
|
3580
|
+
/* @__PURE__ */ a("div", { className: "nice-etl-builder__properties-header", children: [
|
|
3581
|
+
/* @__PURE__ */ a("h4", { children: [
|
|
3582
|
+
r.charAt(0).toUpperCase() + r.slice(1),
|
|
1792
3583
|
" Properties"
|
|
1793
3584
|
] }),
|
|
1794
|
-
/* @__PURE__ */ e("button", { onClick:
|
|
3585
|
+
/* @__PURE__ */ e("button", { onClick: c, children: "×" })
|
|
1795
3586
|
] }),
|
|
1796
|
-
/* @__PURE__ */
|
|
1797
|
-
/* @__PURE__ */
|
|
3587
|
+
/* @__PURE__ */ a("div", { className: "nice-etl-builder__properties-content", children: [
|
|
3588
|
+
/* @__PURE__ */ a("div", { className: "nice-etl-builder__field", children: [
|
|
1798
3589
|
/* @__PURE__ */ e("label", { children: "Name" }),
|
|
1799
3590
|
/* @__PURE__ */ e(
|
|
1800
3591
|
"input",
|
|
1801
3592
|
{
|
|
1802
3593
|
type: "text",
|
|
1803
|
-
value:
|
|
1804
|
-
onChange: (
|
|
3594
|
+
value: i.name,
|
|
3595
|
+
onChange: (m) => s({ name: m.target.value })
|
|
1805
3596
|
}
|
|
1806
3597
|
)
|
|
1807
3598
|
] }),
|
|
1808
|
-
|
|
1809
|
-
/* @__PURE__ */
|
|
3599
|
+
r === "source" && /* @__PURE__ */ a($, { children: [
|
|
3600
|
+
/* @__PURE__ */ a("div", { className: "nice-etl-builder__field", children: [
|
|
1810
3601
|
/* @__PURE__ */ e("label", { children: "Type" }),
|
|
1811
|
-
/* @__PURE__ */
|
|
3602
|
+
/* @__PURE__ */ a(
|
|
1812
3603
|
"select",
|
|
1813
3604
|
{
|
|
1814
|
-
value:
|
|
1815
|
-
onChange: (
|
|
3605
|
+
value: i.type,
|
|
3606
|
+
onChange: (m) => s({ type: m.target.value }),
|
|
1816
3607
|
children: [
|
|
1817
3608
|
/* @__PURE__ */ e("option", { value: "database", children: "Database" }),
|
|
1818
3609
|
/* @__PURE__ */ e("option", { value: "api", children: "API" }),
|
|
@@ -1822,19 +3613,19 @@ function ce({
|
|
|
1822
3613
|
}
|
|
1823
3614
|
)
|
|
1824
3615
|
] }),
|
|
1825
|
-
/* @__PURE__ */ e("div", { className: "nice-etl-builder__field", children: /* @__PURE__ */
|
|
3616
|
+
/* @__PURE__ */ e("div", { className: "nice-etl-builder__field", children: /* @__PURE__ */ a("label", { children: [
|
|
1826
3617
|
/* @__PURE__ */ e(
|
|
1827
3618
|
"input",
|
|
1828
3619
|
{
|
|
1829
3620
|
type: "checkbox",
|
|
1830
|
-
checked: ((
|
|
1831
|
-
onChange: (
|
|
1832
|
-
var
|
|
3621
|
+
checked: ((u = i.incremental) == null ? void 0 : u.enabled) || !1,
|
|
3622
|
+
onChange: (m) => {
|
|
3623
|
+
var o;
|
|
1833
3624
|
return s({
|
|
1834
3625
|
incremental: {
|
|
1835
|
-
...
|
|
1836
|
-
enabled:
|
|
1837
|
-
column: ((
|
|
3626
|
+
...i.incremental,
|
|
3627
|
+
enabled: m.target.checked,
|
|
3628
|
+
column: ((o = i.incremental) == null ? void 0 : o.column) || ""
|
|
1838
3629
|
}
|
|
1839
3630
|
});
|
|
1840
3631
|
}
|
|
@@ -1843,50 +3634,50 @@ function ce({
|
|
|
1843
3634
|
"Incremental Load"
|
|
1844
3635
|
] }) })
|
|
1845
3636
|
] }),
|
|
1846
|
-
|
|
1847
|
-
/* @__PURE__ */
|
|
3637
|
+
r === "transformation" && /* @__PURE__ */ a($, { children: [
|
|
3638
|
+
/* @__PURE__ */ a("div", { className: "nice-etl-builder__field", children: [
|
|
1848
3639
|
/* @__PURE__ */ e("label", { children: "Type" }),
|
|
1849
|
-
/* @__PURE__ */ e("span", { children:
|
|
3640
|
+
/* @__PURE__ */ e("span", { children: i.type })
|
|
1850
3641
|
] }),
|
|
1851
|
-
|
|
3642
|
+
i.type === "filter" && /* @__PURE__ */ a("div", { className: "nice-etl-builder__field", children: [
|
|
1852
3643
|
/* @__PURE__ */ e("label", { children: "Condition" }),
|
|
1853
3644
|
/* @__PURE__ */ e(
|
|
1854
3645
|
"textarea",
|
|
1855
3646
|
{
|
|
1856
|
-
value: String(
|
|
1857
|
-
onChange: (
|
|
1858
|
-
config: { ...
|
|
3647
|
+
value: String(i.config.condition || ""),
|
|
3648
|
+
onChange: (m) => s({
|
|
3649
|
+
config: { ...i.config, condition: m.target.value }
|
|
1859
3650
|
}),
|
|
1860
3651
|
placeholder: "e.g., age > 18 AND status = 'active'",
|
|
1861
3652
|
rows: 3
|
|
1862
3653
|
}
|
|
1863
3654
|
)
|
|
1864
3655
|
] }),
|
|
1865
|
-
|
|
1866
|
-
/* @__PURE__ */
|
|
3656
|
+
i.type === "derive" && /* @__PURE__ */ a($, { children: [
|
|
3657
|
+
/* @__PURE__ */ a("div", { className: "nice-etl-builder__field", children: [
|
|
1867
3658
|
/* @__PURE__ */ e("label", { children: "Column Name" }),
|
|
1868
3659
|
/* @__PURE__ */ e(
|
|
1869
3660
|
"input",
|
|
1870
3661
|
{
|
|
1871
3662
|
type: "text",
|
|
1872
|
-
value: String(
|
|
1873
|
-
onChange: (
|
|
1874
|
-
config: { ...
|
|
3663
|
+
value: String(i.config.name || ""),
|
|
3664
|
+
onChange: (m) => s({
|
|
3665
|
+
config: { ...i.config, name: m.target.value }
|
|
1875
3666
|
})
|
|
1876
3667
|
}
|
|
1877
3668
|
)
|
|
1878
3669
|
] }),
|
|
1879
|
-
/* @__PURE__ */
|
|
3670
|
+
/* @__PURE__ */ a("div", { className: "nice-etl-builder__field", children: [
|
|
1880
3671
|
/* @__PURE__ */ e("label", { children: "Expression" }),
|
|
1881
3672
|
/* @__PURE__ */ e(
|
|
1882
3673
|
"input",
|
|
1883
3674
|
{
|
|
1884
3675
|
type: "text",
|
|
1885
|
-
value: String(
|
|
1886
|
-
onChange: (
|
|
3676
|
+
value: String(i.config.expression || ""),
|
|
3677
|
+
onChange: (m) => s({
|
|
1887
3678
|
config: {
|
|
1888
|
-
...
|
|
1889
|
-
expression:
|
|
3679
|
+
...i.config,
|
|
3680
|
+
expression: m.target.value
|
|
1890
3681
|
}
|
|
1891
3682
|
}),
|
|
1892
3683
|
placeholder: "e.g., price * quantity"
|
|
@@ -1894,14 +3685,14 @@ function ce({
|
|
|
1894
3685
|
)
|
|
1895
3686
|
] })
|
|
1896
3687
|
] }),
|
|
1897
|
-
|
|
3688
|
+
i.type === "custom" && /* @__PURE__ */ a("div", { className: "nice-etl-builder__field", children: [
|
|
1898
3689
|
/* @__PURE__ */ e("label", { children: "Code" }),
|
|
1899
3690
|
/* @__PURE__ */ e(
|
|
1900
3691
|
"textarea",
|
|
1901
3692
|
{
|
|
1902
|
-
value: String(
|
|
1903
|
-
onChange: (
|
|
1904
|
-
config: { ...
|
|
3693
|
+
value: String(i.config.code || ""),
|
|
3694
|
+
onChange: (m) => s({
|
|
3695
|
+
config: { ...i.config, code: m.target.value }
|
|
1905
3696
|
}),
|
|
1906
3697
|
rows: 10,
|
|
1907
3698
|
className: "nice-etl-builder__code-input"
|
|
@@ -1909,14 +3700,14 @@ function ce({
|
|
|
1909
3700
|
)
|
|
1910
3701
|
] })
|
|
1911
3702
|
] }),
|
|
1912
|
-
|
|
1913
|
-
/* @__PURE__ */
|
|
3703
|
+
r === "destination" && /* @__PURE__ */ a($, { children: [
|
|
3704
|
+
/* @__PURE__ */ a("div", { className: "nice-etl-builder__field", children: [
|
|
1914
3705
|
/* @__PURE__ */ e("label", { children: "Type" }),
|
|
1915
|
-
/* @__PURE__ */
|
|
3706
|
+
/* @__PURE__ */ a(
|
|
1916
3707
|
"select",
|
|
1917
3708
|
{
|
|
1918
|
-
value:
|
|
1919
|
-
onChange: (
|
|
3709
|
+
value: i.type,
|
|
3710
|
+
onChange: (m) => s({ type: m.target.value }),
|
|
1920
3711
|
children: [
|
|
1921
3712
|
/* @__PURE__ */ e("option", { value: "database", children: "Database" }),
|
|
1922
3713
|
/* @__PURE__ */ e("option", { value: "file", children: "File" }),
|
|
@@ -1926,13 +3717,13 @@ function ce({
|
|
|
1926
3717
|
}
|
|
1927
3718
|
)
|
|
1928
3719
|
] }),
|
|
1929
|
-
/* @__PURE__ */
|
|
3720
|
+
/* @__PURE__ */ a("div", { className: "nice-etl-builder__field", children: [
|
|
1930
3721
|
/* @__PURE__ */ e("label", { children: "Write Mode" }),
|
|
1931
|
-
/* @__PURE__ */
|
|
3722
|
+
/* @__PURE__ */ a(
|
|
1932
3723
|
"select",
|
|
1933
3724
|
{
|
|
1934
|
-
value:
|
|
1935
|
-
onChange: (
|
|
3725
|
+
value: i.writeMode,
|
|
3726
|
+
onChange: (m) => s({ writeMode: m.target.value }),
|
|
1936
3727
|
children: [
|
|
1937
3728
|
/* @__PURE__ */ e("option", { value: "append", children: "Append" }),
|
|
1938
3729
|
/* @__PURE__ */ e("option", { value: "overwrite", children: "Overwrite" }),
|
|
@@ -1944,56 +3735,56 @@ function ce({
|
|
|
1944
3735
|
] })
|
|
1945
3736
|
] })
|
|
1946
3737
|
] })
|
|
1947
|
-
] }) : /* @__PURE__ */ e(
|
|
3738
|
+
] }) : /* @__PURE__ */ e($, {});
|
|
1948
3739
|
}
|
|
1949
|
-
function
|
|
1950
|
-
schedule:
|
|
1951
|
-
monitoring:
|
|
1952
|
-
onChange:
|
|
3740
|
+
function qe({
|
|
3741
|
+
schedule: r,
|
|
3742
|
+
monitoring: i,
|
|
3743
|
+
onChange: n
|
|
1953
3744
|
}) {
|
|
1954
|
-
const [s,
|
|
1955
|
-
return /* @__PURE__ */
|
|
3745
|
+
const [s, c] = D(r || { enabled: !1 });
|
|
3746
|
+
return /* @__PURE__ */ a("div", { className: "nice-etl-builder__schedule-editor", children: [
|
|
1956
3747
|
/* @__PURE__ */ e("h4", { children: "Schedule Configuration" }),
|
|
1957
|
-
/* @__PURE__ */ e("div", { className: "nice-etl-builder__field", children: /* @__PURE__ */
|
|
3748
|
+
/* @__PURE__ */ e("div", { className: "nice-etl-builder__field", children: /* @__PURE__ */ a("label", { children: [
|
|
1958
3749
|
/* @__PURE__ */ e(
|
|
1959
3750
|
"input",
|
|
1960
3751
|
{
|
|
1961
3752
|
type: "checkbox",
|
|
1962
3753
|
checked: s.enabled,
|
|
1963
|
-
onChange: (
|
|
1964
|
-
const
|
|
1965
|
-
|
|
3754
|
+
onChange: (u) => {
|
|
3755
|
+
const m = { ...s, enabled: u.target.checked };
|
|
3756
|
+
c(m), n(m);
|
|
1966
3757
|
}
|
|
1967
3758
|
}
|
|
1968
3759
|
),
|
|
1969
3760
|
"Enable scheduled execution"
|
|
1970
3761
|
] }) }),
|
|
1971
|
-
s.enabled && /* @__PURE__ */
|
|
1972
|
-
/* @__PURE__ */
|
|
3762
|
+
s.enabled && /* @__PURE__ */ a($, { children: [
|
|
3763
|
+
/* @__PURE__ */ a("div", { className: "nice-etl-builder__field", children: [
|
|
1973
3764
|
/* @__PURE__ */ e("label", { children: "Cron Expression" }),
|
|
1974
3765
|
/* @__PURE__ */ e(
|
|
1975
3766
|
"input",
|
|
1976
3767
|
{
|
|
1977
3768
|
type: "text",
|
|
1978
3769
|
value: s.cron || "",
|
|
1979
|
-
onChange: (
|
|
1980
|
-
const
|
|
1981
|
-
|
|
3770
|
+
onChange: (u) => {
|
|
3771
|
+
const m = { ...s, cron: u.target.value };
|
|
3772
|
+
c(m);
|
|
1982
3773
|
},
|
|
1983
3774
|
placeholder: "0 0 * * * (every hour)"
|
|
1984
3775
|
}
|
|
1985
3776
|
),
|
|
1986
3777
|
/* @__PURE__ */ e("small", { children: "Format: minute hour day month weekday" })
|
|
1987
3778
|
] }),
|
|
1988
|
-
/* @__PURE__ */
|
|
3779
|
+
/* @__PURE__ */ a("div", { className: "nice-etl-builder__field", children: [
|
|
1989
3780
|
/* @__PURE__ */ e("label", { children: "Timezone" }),
|
|
1990
|
-
/* @__PURE__ */
|
|
3781
|
+
/* @__PURE__ */ a(
|
|
1991
3782
|
"select",
|
|
1992
3783
|
{
|
|
1993
3784
|
value: s.timezone || "UTC",
|
|
1994
|
-
onChange: (
|
|
1995
|
-
const
|
|
1996
|
-
|
|
3785
|
+
onChange: (u) => {
|
|
3786
|
+
const m = { ...s, timezone: u.target.value };
|
|
3787
|
+
c(m);
|
|
1997
3788
|
},
|
|
1998
3789
|
children: [
|
|
1999
3790
|
/* @__PURE__ */ e("option", { value: "UTC", children: "UTC" }),
|
|
@@ -2006,16 +3797,16 @@ function oe({
|
|
|
2006
3797
|
}
|
|
2007
3798
|
)
|
|
2008
3799
|
] }),
|
|
2009
|
-
/* @__PURE__ */ e("button", { onClick: () =>
|
|
3800
|
+
/* @__PURE__ */ e("button", { onClick: () => n(s), children: "Save Schedule" })
|
|
2010
3801
|
] }),
|
|
2011
3802
|
/* @__PURE__ */ e("h4", { children: "Monitoring" }),
|
|
2012
|
-
/* @__PURE__ */ e("div", { className: "nice-etl-builder__field", children: /* @__PURE__ */
|
|
2013
|
-
/* @__PURE__ */ e("input", { type: "checkbox", checked: (
|
|
3803
|
+
/* @__PURE__ */ e("div", { className: "nice-etl-builder__field", children: /* @__PURE__ */ a("label", { children: [
|
|
3804
|
+
/* @__PURE__ */ e("input", { type: "checkbox", checked: (i == null ? void 0 : i.alertOnFailure) || !1, disabled: !0 }),
|
|
2014
3805
|
"Alert on failure"
|
|
2015
3806
|
] }) }),
|
|
2016
|
-
/* @__PURE__ */
|
|
3807
|
+
/* @__PURE__ */ a("div", { className: "nice-etl-builder__field", children: [
|
|
2017
3808
|
/* @__PURE__ */ e("label", { children: "Log Level" }),
|
|
2018
|
-
/* @__PURE__ */
|
|
3809
|
+
/* @__PURE__ */ a("select", { value: (i == null ? void 0 : i.logLevel) || "info", disabled: !0, children: [
|
|
2019
3810
|
/* @__PURE__ */ e("option", { value: "error", children: "Error" }),
|
|
2020
3811
|
/* @__PURE__ */ e("option", { value: "warn", children: "Warning" }),
|
|
2021
3812
|
/* @__PURE__ */ e("option", { value: "info", children: "Info" }),
|
|
@@ -2024,49 +3815,98 @@ function oe({
|
|
|
2024
3815
|
] })
|
|
2025
3816
|
] });
|
|
2026
3817
|
}
|
|
2027
|
-
function
|
|
2028
|
-
return /* @__PURE__ */
|
|
3818
|
+
function Ye({ runs: r }) {
|
|
3819
|
+
return /* @__PURE__ */ a("div", { className: "nice-etl-builder__history-view", children: [
|
|
2029
3820
|
/* @__PURE__ */ e("h4", { children: "Run History" }),
|
|
2030
|
-
|
|
2031
|
-
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */
|
|
3821
|
+
r.length === 0 ? /* @__PURE__ */ e("div", { className: "nice-etl-builder__no-history", children: "No runs yet" }) : /* @__PURE__ */ a("table", { className: "nice-etl-builder__history-table", children: [
|
|
3822
|
+
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ a("tr", { children: [
|
|
2032
3823
|
/* @__PURE__ */ e("th", { children: "Status" }),
|
|
2033
3824
|
/* @__PURE__ */ e("th", { children: "Start Time" }),
|
|
2034
3825
|
/* @__PURE__ */ e("th", { children: "Duration" }),
|
|
2035
3826
|
/* @__PURE__ */ e("th", { children: "Rows" }),
|
|
2036
3827
|
/* @__PURE__ */ e("th", { children: "Errors" })
|
|
2037
3828
|
] }) }),
|
|
2038
|
-
/* @__PURE__ */ e("tbody", { children:
|
|
3829
|
+
/* @__PURE__ */ e("tbody", { children: r.map((i) => /* @__PURE__ */ a(
|
|
2039
3830
|
"tr",
|
|
2040
3831
|
{
|
|
2041
|
-
className: `nice-etl-builder__run nice-etl-builder__run--${
|
|
3832
|
+
className: `nice-etl-builder__run nice-etl-builder__run--${i.status}`,
|
|
2042
3833
|
children: [
|
|
2043
|
-
/* @__PURE__ */ e("td", { children: /* @__PURE__ */
|
|
3834
|
+
/* @__PURE__ */ e("td", { children: /* @__PURE__ */ a(
|
|
2044
3835
|
"span",
|
|
2045
3836
|
{
|
|
2046
|
-
className: `nice-etl-builder__status nice-etl-builder__status--${
|
|
3837
|
+
className: `nice-etl-builder__status nice-etl-builder__status--${i.status}`,
|
|
2047
3838
|
children: [
|
|
2048
|
-
|
|
2049
|
-
|
|
3839
|
+
i.status === "success" ? "✓" : i.status === "failed" ? "✗" : "⏳",
|
|
3840
|
+
i.status
|
|
2050
3841
|
]
|
|
2051
3842
|
}
|
|
2052
3843
|
) }),
|
|
2053
|
-
/* @__PURE__ */ e("td", { children:
|
|
2054
|
-
/* @__PURE__ */ e("td", { children:
|
|
2055
|
-
/* @__PURE__ */
|
|
2056
|
-
|
|
3844
|
+
/* @__PURE__ */ e("td", { children: i.startTime.toLocaleString() }),
|
|
3845
|
+
/* @__PURE__ */ e("td", { children: i.endTime ? `${Math.round((i.endTime.getTime() - i.startTime.getTime()) / 1e3)}s` : "-" }),
|
|
3846
|
+
/* @__PURE__ */ a("td", { children: [
|
|
3847
|
+
i.rowsProcessed.toLocaleString(),
|
|
2057
3848
|
" / ",
|
|
2058
|
-
|
|
3849
|
+
i.rowsWritten.toLocaleString()
|
|
2059
3850
|
] }),
|
|
2060
|
-
/* @__PURE__ */ e("td", { children:
|
|
3851
|
+
/* @__PURE__ */ e("td", { children: i.errors.length })
|
|
2061
3852
|
]
|
|
2062
3853
|
},
|
|
2063
|
-
|
|
3854
|
+
i.id
|
|
2064
3855
|
)) })
|
|
2065
3856
|
] })
|
|
2066
3857
|
] });
|
|
2067
3858
|
}
|
|
3859
|
+
const Xe = {
|
|
3860
|
+
chart: "chart",
|
|
3861
|
+
table: "dataGrid",
|
|
3862
|
+
card: "card",
|
|
3863
|
+
gauge: "gauge",
|
|
3864
|
+
map: "map",
|
|
3865
|
+
text: "text",
|
|
3866
|
+
image: "image",
|
|
3867
|
+
filter: "select",
|
|
3868
|
+
slicer: "select",
|
|
3869
|
+
timeline: "timeline",
|
|
3870
|
+
treemap: "treemap",
|
|
3871
|
+
funnel: "funnel",
|
|
3872
|
+
sankey: "sankey",
|
|
3873
|
+
heatmap: "heatmap"
|
|
3874
|
+
};
|
|
3875
|
+
let Ke = 0;
|
|
3876
|
+
const Ge = (r) => `${r}-${Date.now().toString(36)}-${(Ke++).toString(36)}`;
|
|
3877
|
+
function rr(r) {
|
|
3878
|
+
var c;
|
|
3879
|
+
const i = ((c = r.layout) == null ? void 0 : c.columns) ?? 12, n = Array.from(
|
|
3880
|
+
new Set(r.widgets.map((u) => u.dataSource).filter((u) => !!u))
|
|
3881
|
+
), s = r.widgets.map(
|
|
3882
|
+
(u) => {
|
|
3883
|
+
var m, o;
|
|
3884
|
+
return {
|
|
3885
|
+
id: u.id,
|
|
3886
|
+
controlType: Xe[u.type] ?? "card",
|
|
3887
|
+
props: {
|
|
3888
|
+
...u.title ? { title: u.title } : {},
|
|
3889
|
+
...u.dataSource ? { dataSource: u.dataSource } : {},
|
|
3890
|
+
...u.config ?? {}
|
|
3891
|
+
},
|
|
3892
|
+
colSpan: ((m = u.position) == null ? void 0 : m.width) ?? 4,
|
|
3893
|
+
...(o = u.position) != null && o.height ? { rowSpan: u.position.height } : {}
|
|
3894
|
+
};
|
|
3895
|
+
}
|
|
3896
|
+
);
|
|
3897
|
+
return {
|
|
3898
|
+
id: r.id,
|
|
3899
|
+
name: r.name,
|
|
3900
|
+
version: 2,
|
|
3901
|
+
columns: i,
|
|
3902
|
+
dataSources: n.map((u) => ({ key: u, type: "rest", autoLoad: !0 })),
|
|
3903
|
+
rows: [{ id: Ge("dash-row"), cells: s }],
|
|
3904
|
+
meta: { description: r.description, tags: ["dashboard"] }
|
|
3905
|
+
};
|
|
3906
|
+
}
|
|
2068
3907
|
export {
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
3908
|
+
Ze as NiceDashboardStudio,
|
|
3909
|
+
er as NiceETLBuilder,
|
|
3910
|
+
Qe as NiceReportBuilder,
|
|
3911
|
+
rr as dashboardToV2
|
|
2072
3912
|
};
|