@burdenoff/microfe-bigconsole 2026.624.2 → 2026.626.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bigconsole/BigConsoleRoutes.js +175 -118
- package/dist/bigconsole/BigConsoleRoutes.js.map +1 -1
- package/dist/bigconsole/assistant/assistantApi.js +215 -0
- package/dist/bigconsole/assistant/assistantApi.js.map +1 -0
- package/dist/bigconsole/assistant/createSandboxAssistantTransport.js +119 -0
- package/dist/bigconsole/assistant/createSandboxAssistantTransport.js.map +1 -0
- package/dist/bigconsole/assistant/index.js +2 -0
- package/dist/bigconsole/assistant/pageContext.js +51 -0
- package/dist/bigconsole/assistant/pageContext.js.map +1 -0
- package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +48 -48
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js +52 -52
- package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js +33 -33
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +179 -179
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/WidgetPalette.js +38 -38
- package/dist/bigconsole/components/datasink/DataSinkTableViewer.js +32 -32
- package/dist/bigconsole/components/datasink/ExportDataSinkDialog.js +31 -31
- package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +98 -98
- package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js.map +1 -1
- package/dist/bigconsole/components/parser/ExportParserDialog.js +31 -31
- package/dist/bigconsole/components/parser/ImportParserDialog.js +162 -162
- package/dist/bigconsole/components/parser/ImportParserDialog.js.map +1 -1
- package/dist/bigconsole/components/widgets/ActionConfigDialog.js +79 -79
- package/dist/bigconsole/components/widgets/ActionConfigDialog.js.map +1 -1
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js.map +1 -1
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +307 -307
- package/dist/bigconsole/components/widgets/PropertiesPanel.js.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetConfigDialog.js +222 -222
- package/dist/bigconsole/components/widgets/WidgetConfigDialog.js.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetTypeSelector.js +23 -23
- package/dist/bigconsole/index.js +3 -0
- package/dist/bigconsole/pages/DashboardBuilderPage.js +74 -74
- package/dist/bigconsole/pages/DashboardBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/DashboardViewPage.js +168 -189
- package/dist/bigconsole/pages/DashboardViewPage.js.map +1 -1
- package/dist/bigconsole/pages/DashboardsPage.js +266 -310
- package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
- package/dist/bigconsole/pages/DataParsersPage.js +148 -194
- package/dist/bigconsole/pages/DataParsersPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +252 -246
- package/dist/bigconsole/pages/DataSinkBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinkViewPage.js +256 -231
- package/dist/bigconsole/pages/DataSinkViewPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinksPage.js +173 -219
- package/dist/bigconsole/pages/DataSinksPage.js.map +1 -1
- package/dist/bigconsole/pages/HomePage.js +125 -141
- package/dist/bigconsole/pages/HomePage.js.map +1 -1
- package/dist/bigconsole/pages/InsightsPage.js +159 -184
- package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
- package/dist/bigconsole/pages/ParserBuilderPage.js +401 -393
- package/dist/bigconsole/pages/ParserBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/ParserViewPage.js +220 -201
- package/dist/bigconsole/pages/ParserViewPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelineBuilderPage.js +212 -206
- package/dist/bigconsole/pages/PipelineBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelineViewPage.js +204 -181
- package/dist/bigconsole/pages/PipelineViewPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelinesPage.js +107 -150
- package/dist/bigconsole/pages/PipelinesPage.js.map +1 -1
- package/dist/bigconsole/pages/SettingsPage.js +184 -171
- package/dist/bigconsole/pages/SettingsPage.js.map +1 -1
- package/dist/bigconsole/pages/WidgetDemoPage.js +69 -81
- package/dist/bigconsole/pages/WidgetDemoPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowViewPage.js +230 -216
- package/dist/bigconsole/pages/WorkflowViewPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowsPage.js +106 -149
- package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
- package/dist/generated/wspace-operations.js +87 -36
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/index.js +3 -1
- package/package.json +6 -2
|
@@ -2,18 +2,18 @@ import { useAppNavigate as e } from "../contexts/NavigationContext.js";
|
|
|
2
2
|
import "../contexts/index.js";
|
|
3
3
|
import t from "../hooks/useDataSinkOperations.js";
|
|
4
4
|
import { isNative as n, nativeCopyText as ee, nativeToast as te } from "../../utils/nativeBridge.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { memo as
|
|
8
|
-
import { useParams as
|
|
9
|
-
import { AlertCircle as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
5
|
+
import r from "../components/datasink/CacheTTLSelector.js";
|
|
6
|
+
import ne from "../components/datasink/RefreshTypeSelector.js";
|
|
7
|
+
import { memo as i, useCallback as a, useEffect as o, useMemo as re, useState as s } from "react";
|
|
8
|
+
import { useParams as ie } from "react-router-dom";
|
|
9
|
+
import { AlertCircle as c, ArrowLeft as l, Check as ae, Copy as oe, Database as u, Eye as d, Loader2 as f, Save as se, Settings as ce } from "lucide-react";
|
|
10
|
+
import { Button as p, Card as m, CardContent as h, CardHeader as g, CardTitle as _, GlassCard as le, IllustratedEmptyState as v, Input as y, Label as b, PagePurpose as ue, Textarea as x } from "@burdenoff/fe-libs/ui";
|
|
11
|
+
import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
12
12
|
//#region src/bigconsole/pages/DataSinkBuilderPage.tsx
|
|
13
|
-
function
|
|
13
|
+
function de(e) {
|
|
14
14
|
return e.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "").substring(0, 64);
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function T(e) {
|
|
17
17
|
let t = {};
|
|
18
18
|
if (e.name.trim() ? e.name.length < 2 ? t.name = "Name must be at least 2 characters" : e.name.length > 100 && (t.name = "Name must be less than 100 characters") : t.name = "Name is required", e.key.trim() ? /^[a-z0-9_]+$/.test(e.key) ? e.key.length > 64 && (t.key = "Key must be less than 64 characters") : t.key = "Key can only contain lowercase letters, numbers, and underscores" : t.key = "Key is required", e.data && e.data.trim()) try {
|
|
19
19
|
JSON.parse(e.data);
|
|
@@ -22,62 +22,62 @@ function ce(e) {
|
|
|
22
22
|
}
|
|
23
23
|
return t;
|
|
24
24
|
}
|
|
25
|
-
var E =
|
|
26
|
-
let { dataSinkId:
|
|
25
|
+
var E = i(function() {
|
|
26
|
+
let { dataSinkId: i } = ie(), E = e(), D = i !== "new" && !!i, [O, k] = s({
|
|
27
27
|
name: "",
|
|
28
28
|
key: "",
|
|
29
29
|
description: "",
|
|
30
30
|
ttl: 300,
|
|
31
31
|
refresh: { type: "manual" },
|
|
32
32
|
data: "{}"
|
|
33
|
-
}), [A, j] =
|
|
34
|
-
|
|
35
|
-
D &&
|
|
33
|
+
}), [A, j] = s({}), [M, N] = s(!1), [P, F] = s(!1), [I, L] = s(null), [R, z] = s(!1), [B, V] = s(!1), [H, U] = s(null), [W, G] = s(null), { loading: fe, error: K, dataSinks: pe, fetchDataSink: q, createDataSink: J, updateDataSink: Y, getDataSinkData: X } = t({ skipFetch: !0 }), Z = D ? pe.find((e) => e.id === i) : null;
|
|
34
|
+
o(() => {
|
|
35
|
+
D && i && !Z && q(i);
|
|
36
36
|
}, [
|
|
37
37
|
D,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
i,
|
|
39
|
+
Z,
|
|
40
|
+
q
|
|
41
41
|
]);
|
|
42
|
-
let [
|
|
43
|
-
|
|
44
|
-
if (
|
|
42
|
+
let [Q, me] = s(!1);
|
|
43
|
+
o(() => {
|
|
44
|
+
if (Z && !Q) {
|
|
45
45
|
let e = "";
|
|
46
|
-
if (
|
|
47
|
-
if (typeof
|
|
48
|
-
let t = JSON.parse(
|
|
46
|
+
if (Z.data) try {
|
|
47
|
+
if (typeof Z.data == "string") {
|
|
48
|
+
let t = JSON.parse(Z.data);
|
|
49
49
|
e = JSON.stringify(t, null, 2);
|
|
50
|
-
} else e = JSON.stringify(
|
|
50
|
+
} else e = JSON.stringify(Z.data, null, 2);
|
|
51
51
|
} catch {
|
|
52
|
-
e = typeof
|
|
52
|
+
e = typeof Z.data == "string" ? Z.data : "";
|
|
53
53
|
}
|
|
54
54
|
k({
|
|
55
|
-
name:
|
|
56
|
-
key:
|
|
57
|
-
description:
|
|
58
|
-
ttl:
|
|
59
|
-
refresh:
|
|
60
|
-
type:
|
|
61
|
-
schedule:
|
|
62
|
-
cron:
|
|
63
|
-
timezone:
|
|
55
|
+
name: Z.name || "",
|
|
56
|
+
key: Z.key || "",
|
|
57
|
+
description: Z.description || "",
|
|
58
|
+
ttl: Z.ttl || 300,
|
|
59
|
+
refresh: Z.refresh ? {
|
|
60
|
+
type: Z.refresh.type === "scheduled" ? "scheduled" : "manual",
|
|
61
|
+
schedule: Z.refresh.schedule ? {
|
|
62
|
+
cron: Z.refresh.schedule.cron,
|
|
63
|
+
timezone: Z.refresh.schedule.timezone
|
|
64
64
|
} : void 0
|
|
65
65
|
} : { type: "manual" },
|
|
66
66
|
data: e
|
|
67
|
-
}), N(!0),
|
|
67
|
+
}), N(!0), me(!0), j({});
|
|
68
68
|
}
|
|
69
|
-
}, [
|
|
70
|
-
let
|
|
69
|
+
}, [Z, Q]);
|
|
70
|
+
let he = a((e) => {
|
|
71
71
|
let t = e.target.value;
|
|
72
72
|
k((e) => ({
|
|
73
73
|
...e,
|
|
74
74
|
name: t,
|
|
75
|
-
key: M ? e.key :
|
|
75
|
+
key: M ? e.key : de(t)
|
|
76
76
|
})), j((e) => ({
|
|
77
77
|
...e,
|
|
78
78
|
name: void 0
|
|
79
79
|
}));
|
|
80
|
-
}, [M]),
|
|
80
|
+
}, [M]), ge = a((e) => {
|
|
81
81
|
let t = e.target.value.toLowerCase().replace(/[^a-z0-9_]/g, "");
|
|
82
82
|
k((e) => ({
|
|
83
83
|
...e,
|
|
@@ -86,22 +86,22 @@ var E = r(function() {
|
|
|
86
86
|
...e,
|
|
87
87
|
key: void 0
|
|
88
88
|
}));
|
|
89
|
-
}, []),
|
|
89
|
+
}, []), _e = a((e) => {
|
|
90
90
|
k((t) => ({
|
|
91
91
|
...t,
|
|
92
92
|
description: e.target.value
|
|
93
93
|
}));
|
|
94
|
-
}, []),
|
|
94
|
+
}, []), ve = a((e) => {
|
|
95
95
|
k((t) => ({
|
|
96
96
|
...t,
|
|
97
97
|
ttl: e || 0
|
|
98
98
|
}));
|
|
99
|
-
}, []),
|
|
99
|
+
}, []), ye = a((e) => {
|
|
100
100
|
k((t) => ({
|
|
101
101
|
...t,
|
|
102
102
|
refresh: e
|
|
103
103
|
}));
|
|
104
|
-
}, []),
|
|
104
|
+
}, []), be = a((e) => {
|
|
105
105
|
k((t) => ({
|
|
106
106
|
...t,
|
|
107
107
|
data: e.target.value
|
|
@@ -109,7 +109,7 @@ var E = r(function() {
|
|
|
109
109
|
...e,
|
|
110
110
|
data: void 0
|
|
111
111
|
}));
|
|
112
|
-
}, []),
|
|
112
|
+
}, []), xe = a(() => {
|
|
113
113
|
try {
|
|
114
114
|
let e = JSON.parse(O.data);
|
|
115
115
|
k((t) => ({
|
|
@@ -125,29 +125,29 @@ var E = r(function() {
|
|
|
125
125
|
data: "Invalid JSON format"
|
|
126
126
|
}));
|
|
127
127
|
}
|
|
128
|
-
}, [O.data]),
|
|
129
|
-
O.key && (await ee(O.key),
|
|
130
|
-
}, [O.key]), $ =
|
|
128
|
+
}, [O.data]), Se = a(async () => {
|
|
129
|
+
O.key && (await ee(O.key), z(!0), n() && te("Key copied"), setTimeout(() => z(!1), 2e3));
|
|
130
|
+
}, [O.key]), $ = a(() => {
|
|
131
131
|
E("/datasinks");
|
|
132
|
-
}, [E]),
|
|
133
|
-
if (!(!D || !
|
|
134
|
-
|
|
132
|
+
}, [E]), Ce = a(async () => {
|
|
133
|
+
if (!(!D || !Z)) {
|
|
134
|
+
V(!0), G(null);
|
|
135
135
|
try {
|
|
136
|
-
let e = await
|
|
137
|
-
e?.raw ?
|
|
136
|
+
let e = await X({ key: Z.key });
|
|
137
|
+
e?.raw ? U(Array.isArray(e.raw) ? e.raw.slice(0, 20) : [e.raw]) : U([]);
|
|
138
138
|
} catch (e) {
|
|
139
|
-
|
|
139
|
+
G(e instanceof Error ? e.message : "Failed to load data");
|
|
140
140
|
} finally {
|
|
141
|
-
|
|
141
|
+
V(!1);
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
}, [
|
|
145
145
|
D,
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
]),
|
|
146
|
+
Z,
|
|
147
|
+
X
|
|
148
|
+
]), we = a(async (e) => {
|
|
149
149
|
e.preventDefault(), L(null);
|
|
150
|
-
let t =
|
|
150
|
+
let t = T(O);
|
|
151
151
|
if (Object.keys(t).length > 0) {
|
|
152
152
|
j(t);
|
|
153
153
|
return;
|
|
@@ -164,10 +164,10 @@ var E = r(function() {
|
|
|
164
164
|
})), F(!1);
|
|
165
165
|
return;
|
|
166
166
|
}
|
|
167
|
-
if (D &&
|
|
168
|
-
if (!await
|
|
169
|
-
id:
|
|
170
|
-
version:
|
|
167
|
+
if (D && Z) {
|
|
168
|
+
if (!await Y({
|
|
169
|
+
id: Z.id,
|
|
170
|
+
version: Z.version,
|
|
171
171
|
name: O.name,
|
|
172
172
|
description: O.description || void 0,
|
|
173
173
|
ttl: O.ttl,
|
|
@@ -177,7 +177,7 @@ var E = r(function() {
|
|
|
177
177
|
},
|
|
178
178
|
data: e
|
|
179
179
|
})) throw Error("Failed to update DataSink");
|
|
180
|
-
} else if (!await
|
|
180
|
+
} else if (!await J({
|
|
181
181
|
key: O.key,
|
|
182
182
|
name: O.name,
|
|
183
183
|
description: O.description || void 0,
|
|
@@ -197,11 +197,11 @@ var E = r(function() {
|
|
|
197
197
|
}, [
|
|
198
198
|
O,
|
|
199
199
|
D,
|
|
200
|
-
|
|
201
|
-
q,
|
|
200
|
+
Z,
|
|
202
201
|
J,
|
|
202
|
+
Y,
|
|
203
203
|
E
|
|
204
|
-
]),
|
|
204
|
+
]), Te = re(() => {
|
|
205
205
|
let e = O.name.trim().length >= 2, t = O.key.trim().length > 0, n = !0;
|
|
206
206
|
if (O.data && O.data.trim()) try {
|
|
207
207
|
JSON.parse(O.data);
|
|
@@ -214,315 +214,321 @@ var E = r(function() {
|
|
|
214
214
|
O.key,
|
|
215
215
|
O.data
|
|
216
216
|
]);
|
|
217
|
-
return
|
|
217
|
+
return fe && D ? /* @__PURE__ */ C("div", {
|
|
218
218
|
className: "flex items-center justify-center min-h-[400px]",
|
|
219
|
-
children: /* @__PURE__ */
|
|
220
|
-
}) :
|
|
219
|
+
children: /* @__PURE__ */ C(f, { className: "w-8 h-8 text-text-secondary animate-spin" })
|
|
220
|
+
}) : K ? /* @__PURE__ */ C("div", {
|
|
221
221
|
className: "flex items-center justify-center min-h-[400px] p-card-padding",
|
|
222
|
-
children: /* @__PURE__ */
|
|
222
|
+
children: /* @__PURE__ */ w("div", {
|
|
223
223
|
className: "text-center",
|
|
224
224
|
children: [
|
|
225
|
-
/* @__PURE__ */
|
|
226
|
-
/* @__PURE__ */
|
|
225
|
+
/* @__PURE__ */ C(c, { className: "w-12 h-12 text-state-error mx-auto mb-spacing-md" }),
|
|
226
|
+
/* @__PURE__ */ C("p", {
|
|
227
227
|
className: "text-state-error text-body-sm font-medium mb-spacing-sm",
|
|
228
228
|
children: "Failed to load DataSink"
|
|
229
229
|
}),
|
|
230
|
-
/* @__PURE__ */
|
|
230
|
+
/* @__PURE__ */ C("p", {
|
|
231
231
|
className: "text-text-tertiary text-body-xs",
|
|
232
|
-
children:
|
|
232
|
+
children: K.message
|
|
233
233
|
})
|
|
234
234
|
]
|
|
235
235
|
})
|
|
236
|
-
}) : /* @__PURE__ */
|
|
236
|
+
}) : /* @__PURE__ */ C("div", {
|
|
237
237
|
className: "min-h-screen bg-bg-canvas",
|
|
238
|
-
children: /* @__PURE__ */
|
|
238
|
+
children: /* @__PURE__ */ w("div", {
|
|
239
239
|
className: "max-w-3xl mx-auto p-card-padding",
|
|
240
240
|
children: [
|
|
241
|
-
/* @__PURE__ */
|
|
241
|
+
/* @__PURE__ */ w("div", {
|
|
242
242
|
className: "mb-spacing-lg",
|
|
243
243
|
children: [
|
|
244
|
-
/* @__PURE__ */
|
|
244
|
+
/* @__PURE__ */ w(p, {
|
|
245
245
|
onClick: $,
|
|
246
246
|
variant: "ghost",
|
|
247
247
|
size: "sm",
|
|
248
248
|
className: "mb-spacing-md",
|
|
249
|
-
children: [/* @__PURE__ */
|
|
249
|
+
children: [/* @__PURE__ */ C(l, { className: "w-4 h-4 mr-2" }), "Back to DataSinks"]
|
|
250
250
|
}),
|
|
251
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ C("h1", {
|
|
252
252
|
className: "text-heading-h1 font-bold text-text-primary",
|
|
253
253
|
children: D ? "Edit DataSink" : "Create DataSink"
|
|
254
254
|
}),
|
|
255
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ C("p", {
|
|
256
256
|
className: "text-body-sm text-text-secondary mt-spacing-xs",
|
|
257
257
|
children: D ? "Update the DataSink configuration." : "Create a new DataSink to store and cache data. Use the unique key to connect workflows."
|
|
258
258
|
})
|
|
259
259
|
]
|
|
260
260
|
}),
|
|
261
|
-
I && /* @__PURE__ */
|
|
261
|
+
I && /* @__PURE__ */ w("div", {
|
|
262
262
|
className: "mb-spacing-lg p-4 bg-state-error/10 border border-state-error/30 rounded-lg flex items-start gap-3",
|
|
263
|
-
children: [/* @__PURE__ */
|
|
263
|
+
children: [/* @__PURE__ */ C(c, { className: "w-5 h-5 text-state-error flex-shrink-0 mt-0.5" }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
|
|
264
264
|
className: "text-sm font-medium text-state-error",
|
|
265
265
|
children: "Failed to save DataSink"
|
|
266
|
-
}), /* @__PURE__ */
|
|
266
|
+
}), /* @__PURE__ */ C("p", {
|
|
267
267
|
className: "text-xs text-state-error/80 mt-1",
|
|
268
268
|
children: I
|
|
269
269
|
})] })]
|
|
270
270
|
}),
|
|
271
|
-
/* @__PURE__ */
|
|
272
|
-
|
|
271
|
+
/* @__PURE__ */ C(ue, {
|
|
272
|
+
className: "mb-spacing-lg",
|
|
273
|
+
children: "A data sink is the named, structured store your dashboards read from. Give it a unique key, configure how long data is cached and how it refreshes, then point a workflow at that key to push data in. Get the basics right here and everything downstream connects to it."
|
|
274
|
+
}),
|
|
275
|
+
/* @__PURE__ */ w("form", {
|
|
276
|
+
onSubmit: we,
|
|
273
277
|
className: "space-y-spacing-lg",
|
|
274
278
|
children: [
|
|
275
|
-
/* @__PURE__ */
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
children: [
|
|
293
|
-
/* @__PURE__ */ g("div", {
|
|
294
|
-
className: "space-y-spacing-sm",
|
|
295
|
-
children: [
|
|
296
|
-
/* @__PURE__ */ g(C, {
|
|
297
|
-
htmlFor: "name",
|
|
298
|
-
children: ["Name ", /* @__PURE__ */ h("span", {
|
|
299
|
-
className: "text-state-error",
|
|
300
|
-
children: "*"
|
|
301
|
-
})]
|
|
302
|
-
}),
|
|
303
|
-
/* @__PURE__ */ h(S, {
|
|
304
|
-
id: "name",
|
|
305
|
-
type: "text",
|
|
306
|
-
value: O.name,
|
|
307
|
-
onChange: pe,
|
|
308
|
-
placeholder: "e.g., Sales Metrics",
|
|
309
|
-
className: A.name ? "border-state-error" : ""
|
|
310
|
-
}),
|
|
311
|
-
A.name && /* @__PURE__ */ h("p", {
|
|
312
|
-
className: "text-body-xs text-state-error",
|
|
313
|
-
children: A.name
|
|
314
|
-
})
|
|
315
|
-
]
|
|
316
|
-
}),
|
|
317
|
-
/* @__PURE__ */ g("div", {
|
|
318
|
-
className: "space-y-spacing-sm",
|
|
319
|
-
children: [
|
|
320
|
-
/* @__PURE__ */ g(C, {
|
|
321
|
-
htmlFor: "key",
|
|
322
|
-
children: ["Unique Key ", /* @__PURE__ */ h("span", {
|
|
323
|
-
className: "text-state-error",
|
|
324
|
-
children: "*"
|
|
325
|
-
})]
|
|
326
|
-
}),
|
|
327
|
-
/* @__PURE__ */ g("div", {
|
|
328
|
-
className: "flex gap-2",
|
|
329
|
-
children: [/* @__PURE__ */ h(S, {
|
|
330
|
-
id: "key",
|
|
331
|
-
type: "text",
|
|
332
|
-
value: O.key,
|
|
333
|
-
onChange: me,
|
|
334
|
-
placeholder: "sales_metrics",
|
|
335
|
-
disabled: D,
|
|
336
|
-
className: `font-mono flex-1 ${A.key ? "border-state-error" : ""}`
|
|
337
|
-
}), O.key && /* @__PURE__ */ h(_, {
|
|
338
|
-
type: "button",
|
|
339
|
-
onClick: ye,
|
|
340
|
-
variant: "outline",
|
|
341
|
-
size: "sm",
|
|
342
|
-
className: "px-3",
|
|
343
|
-
children: le ? /* @__PURE__ */ h(c, { className: "w-4 h-4 text-state-success" }) : /* @__PURE__ */ h(se, { className: "w-4 h-4" })
|
|
344
|
-
})]
|
|
345
|
-
}),
|
|
346
|
-
A.key && /* @__PURE__ */ h("p", {
|
|
347
|
-
className: "text-body-xs text-state-error",
|
|
348
|
-
children: A.key
|
|
349
|
-
}),
|
|
350
|
-
/* @__PURE__ */ h("p", {
|
|
351
|
-
className: "text-body-xs text-text-tertiary",
|
|
352
|
-
children: D ? "Key cannot be changed. Use this key in your workflows to push data." : "Auto-generated from name. This key will be used by workflows to push data."
|
|
353
|
-
})
|
|
354
|
-
]
|
|
355
|
-
}),
|
|
356
|
-
/* @__PURE__ */ g("div", {
|
|
357
|
-
className: "space-y-spacing-sm",
|
|
358
|
-
children: [/* @__PURE__ */ h(C, {
|
|
359
|
-
htmlFor: "description",
|
|
360
|
-
children: "Description"
|
|
361
|
-
}), /* @__PURE__ */ h(w, {
|
|
362
|
-
id: "description",
|
|
363
|
-
value: O.description,
|
|
364
|
-
onChange: he,
|
|
365
|
-
placeholder: "Describe what data this sink stores...",
|
|
366
|
-
rows: 2,
|
|
367
|
-
className: "resize-none"
|
|
368
|
-
})]
|
|
279
|
+
/* @__PURE__ */ w(le, {
|
|
280
|
+
treatment: "glass",
|
|
281
|
+
glow: !0,
|
|
282
|
+
children: [/* @__PURE__ */ C(g, {
|
|
283
|
+
className: "pb-4",
|
|
284
|
+
children: /* @__PURE__ */ w("div", {
|
|
285
|
+
className: "flex items-center gap-3",
|
|
286
|
+
children: [/* @__PURE__ */ C("div", {
|
|
287
|
+
className: "w-8 h-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center",
|
|
288
|
+
children: /* @__PURE__ */ C(u, { className: "w-4 h-4 text-action-primary-bg" })
|
|
289
|
+
}), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C(_, {
|
|
290
|
+
className: "text-base",
|
|
291
|
+
children: "Basic Information"
|
|
292
|
+
}), /* @__PURE__ */ C("p", {
|
|
293
|
+
className: "text-xs text-text-secondary mt-0.5",
|
|
294
|
+
children: "Essential details for your DataSink"
|
|
295
|
+
})] })]
|
|
369
296
|
})
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
297
|
+
}), /* @__PURE__ */ w(h, {
|
|
298
|
+
className: "space-y-5",
|
|
299
|
+
children: [
|
|
300
|
+
/* @__PURE__ */ w("div", {
|
|
301
|
+
className: "space-y-spacing-sm",
|
|
302
|
+
children: [
|
|
303
|
+
/* @__PURE__ */ w(b, {
|
|
304
|
+
htmlFor: "name",
|
|
305
|
+
children: ["Name ", /* @__PURE__ */ C("span", {
|
|
306
|
+
className: "text-state-error",
|
|
307
|
+
children: "*"
|
|
308
|
+
})]
|
|
309
|
+
}),
|
|
310
|
+
/* @__PURE__ */ C(y, {
|
|
311
|
+
id: "name",
|
|
312
|
+
type: "text",
|
|
313
|
+
value: O.name,
|
|
314
|
+
onChange: he,
|
|
315
|
+
placeholder: "e.g., Sales Metrics",
|
|
316
|
+
className: A.name ? "border-state-error" : ""
|
|
317
|
+
}),
|
|
318
|
+
A.name && /* @__PURE__ */ C("p", {
|
|
319
|
+
className: "text-body-xs text-state-error",
|
|
320
|
+
children: A.name
|
|
321
|
+
})
|
|
322
|
+
]
|
|
323
|
+
}),
|
|
324
|
+
/* @__PURE__ */ w("div", {
|
|
325
|
+
className: "space-y-spacing-sm",
|
|
326
|
+
children: [
|
|
327
|
+
/* @__PURE__ */ w(b, {
|
|
328
|
+
htmlFor: "key",
|
|
329
|
+
children: ["Unique Key ", /* @__PURE__ */ C("span", {
|
|
330
|
+
className: "text-state-error",
|
|
331
|
+
children: "*"
|
|
332
|
+
})]
|
|
333
|
+
}),
|
|
334
|
+
/* @__PURE__ */ w("div", {
|
|
335
|
+
className: "flex gap-2",
|
|
336
|
+
children: [/* @__PURE__ */ C(y, {
|
|
337
|
+
id: "key",
|
|
338
|
+
type: "text",
|
|
339
|
+
value: O.key,
|
|
340
|
+
onChange: ge,
|
|
341
|
+
placeholder: "sales_metrics",
|
|
342
|
+
disabled: D,
|
|
343
|
+
className: `font-mono flex-1 ${A.key ? "border-state-error" : ""}`
|
|
344
|
+
}), O.key && /* @__PURE__ */ C(p, {
|
|
345
|
+
type: "button",
|
|
346
|
+
onClick: Se,
|
|
347
|
+
variant: "outline",
|
|
348
|
+
size: "sm",
|
|
349
|
+
className: "px-3",
|
|
350
|
+
children: R ? /* @__PURE__ */ C(ae, { className: "w-4 h-4 text-state-success" }) : /* @__PURE__ */ C(oe, { className: "w-4 h-4" })
|
|
351
|
+
})]
|
|
352
|
+
}),
|
|
353
|
+
A.key && /* @__PURE__ */ C("p", {
|
|
354
|
+
className: "text-body-xs text-state-error",
|
|
355
|
+
children: A.key
|
|
356
|
+
}),
|
|
357
|
+
/* @__PURE__ */ C("p", {
|
|
358
|
+
className: "text-body-xs text-text-tertiary",
|
|
359
|
+
children: D ? "Key cannot be changed. Use this key in your workflows to push data." : "Auto-generated from name. This key will be used by workflows to push data."
|
|
360
|
+
})
|
|
361
|
+
]
|
|
362
|
+
}),
|
|
363
|
+
/* @__PURE__ */ w("div", {
|
|
364
|
+
className: "space-y-spacing-sm",
|
|
365
|
+
children: [/* @__PURE__ */ C(b, {
|
|
366
|
+
htmlFor: "description",
|
|
367
|
+
children: "Description"
|
|
368
|
+
}), /* @__PURE__ */ C(x, {
|
|
369
|
+
id: "description",
|
|
370
|
+
value: O.description,
|
|
371
|
+
onChange: _e,
|
|
372
|
+
placeholder: "Describe what data this sink stores...",
|
|
373
|
+
rows: 2,
|
|
374
|
+
className: "resize-none"
|
|
375
|
+
})]
|
|
376
|
+
})
|
|
377
|
+
]
|
|
378
|
+
})]
|
|
379
|
+
}),
|
|
380
|
+
/* @__PURE__ */ w(m, { children: [/* @__PURE__ */ C(g, {
|
|
373
381
|
className: "pb-4",
|
|
374
|
-
children: /* @__PURE__ */
|
|
382
|
+
children: /* @__PURE__ */ w("div", {
|
|
375
383
|
className: "flex items-center gap-3",
|
|
376
|
-
children: [/* @__PURE__ */
|
|
384
|
+
children: [/* @__PURE__ */ C("div", {
|
|
377
385
|
className: "w-8 h-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center",
|
|
378
|
-
children: /* @__PURE__ */
|
|
379
|
-
}), /* @__PURE__ */
|
|
386
|
+
children: /* @__PURE__ */ C(ce, { className: "w-4 h-4 text-action-primary-bg" })
|
|
387
|
+
}), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C(_, {
|
|
380
388
|
className: "text-base",
|
|
381
389
|
children: "Configuration"
|
|
382
|
-
}), /* @__PURE__ */
|
|
390
|
+
}), /* @__PURE__ */ C("p", {
|
|
383
391
|
className: "text-xs text-text-secondary mt-0.5",
|
|
384
392
|
children: "Cache and refresh settings"
|
|
385
393
|
})] })]
|
|
386
394
|
})
|
|
387
|
-
}), /* @__PURE__ */
|
|
395
|
+
}), /* @__PURE__ */ w(h, {
|
|
388
396
|
className: "space-y-5",
|
|
389
|
-
children: [/* @__PURE__ */
|
|
397
|
+
children: [/* @__PURE__ */ w("div", {
|
|
390
398
|
className: "space-y-spacing-sm",
|
|
391
399
|
children: [
|
|
392
|
-
/* @__PURE__ */
|
|
393
|
-
/* @__PURE__ */
|
|
400
|
+
/* @__PURE__ */ C(b, { children: "Cache Duration" }),
|
|
401
|
+
/* @__PURE__ */ C(r, {
|
|
394
402
|
value: O.ttl,
|
|
395
|
-
onChange:
|
|
403
|
+
onChange: ve
|
|
396
404
|
}),
|
|
397
|
-
/* @__PURE__ */
|
|
405
|
+
/* @__PURE__ */ C("p", {
|
|
398
406
|
className: "text-body-xs text-text-tertiary",
|
|
399
407
|
children: "How long cached data remains valid before requiring refresh."
|
|
400
408
|
})
|
|
401
409
|
]
|
|
402
|
-
}), /* @__PURE__ */
|
|
410
|
+
}), /* @__PURE__ */ C(ne, {
|
|
403
411
|
value: O.refresh,
|
|
404
|
-
onChange:
|
|
412
|
+
onChange: ye
|
|
405
413
|
})]
|
|
406
414
|
})] }),
|
|
407
|
-
/* @__PURE__ */
|
|
415
|
+
/* @__PURE__ */ w(m, { children: [/* @__PURE__ */ C(g, {
|
|
408
416
|
className: "pb-4",
|
|
409
|
-
children: /* @__PURE__ */
|
|
417
|
+
children: /* @__PURE__ */ w("div", {
|
|
410
418
|
className: "flex items-center justify-between",
|
|
411
|
-
children: [/* @__PURE__ */
|
|
419
|
+
children: [/* @__PURE__ */ w("div", {
|
|
412
420
|
className: "flex items-center gap-3",
|
|
413
|
-
children: [/* @__PURE__ */
|
|
421
|
+
children: [/* @__PURE__ */ C("div", {
|
|
414
422
|
className: "w-8 h-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center",
|
|
415
|
-
children: /* @__PURE__ */
|
|
416
|
-
}), /* @__PURE__ */
|
|
423
|
+
children: /* @__PURE__ */ C(u, { className: "w-4 h-4 text-action-primary-bg" })
|
|
424
|
+
}), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C(_, {
|
|
417
425
|
className: "text-base",
|
|
418
426
|
children: "Data Payload"
|
|
419
|
-
}), /* @__PURE__ */
|
|
427
|
+
}), /* @__PURE__ */ C("p", {
|
|
420
428
|
className: "text-xs text-text-secondary mt-0.5",
|
|
421
429
|
children: D ? "Edit the JSON data stored in this DataSink" : "Optional initial data (JSON format)"
|
|
422
430
|
})] })]
|
|
423
|
-
}), /* @__PURE__ */
|
|
431
|
+
}), /* @__PURE__ */ C(p, {
|
|
424
432
|
type: "button",
|
|
425
|
-
onClick:
|
|
433
|
+
onClick: xe,
|
|
426
434
|
variant: "outline",
|
|
427
435
|
size: "sm",
|
|
428
436
|
children: "Format JSON"
|
|
429
437
|
})]
|
|
430
438
|
})
|
|
431
|
-
}), /* @__PURE__ */ h
|
|
439
|
+
}), /* @__PURE__ */ C(h, { children: /* @__PURE__ */ w("div", {
|
|
432
440
|
className: "space-y-spacing-sm",
|
|
433
441
|
children: [
|
|
434
|
-
/* @__PURE__ */
|
|
442
|
+
/* @__PURE__ */ C(x, {
|
|
435
443
|
value: O.data,
|
|
436
|
-
onChange:
|
|
444
|
+
onChange: be,
|
|
437
445
|
placeholder: "{\"key\": \"value\"}",
|
|
438
446
|
rows: 10,
|
|
439
447
|
className: `font-mono text-xs resize-y ${A.data ? "border-state-error" : ""}`
|
|
440
448
|
}),
|
|
441
|
-
A.data && /* @__PURE__ */
|
|
449
|
+
A.data && /* @__PURE__ */ C("p", {
|
|
442
450
|
className: "text-body-xs text-state-error",
|
|
443
451
|
children: A.data
|
|
444
452
|
}),
|
|
445
|
-
/* @__PURE__ */
|
|
453
|
+
/* @__PURE__ */ C("p", {
|
|
446
454
|
className: "text-body-xs text-text-tertiary",
|
|
447
455
|
children: "Enter valid JSON data. This data will be stored and can be accessed by widgets via parsers."
|
|
448
456
|
})
|
|
449
457
|
]
|
|
450
458
|
}) })] }),
|
|
451
|
-
D &&
|
|
459
|
+
D && Z && /* @__PURE__ */ w(m, { children: [/* @__PURE__ */ C(g, {
|
|
452
460
|
className: "pb-4",
|
|
453
|
-
children: /* @__PURE__ */
|
|
461
|
+
children: /* @__PURE__ */ w("div", {
|
|
454
462
|
className: "flex items-center justify-between",
|
|
455
|
-
children: [/* @__PURE__ */
|
|
463
|
+
children: [/* @__PURE__ */ w("div", {
|
|
456
464
|
className: "flex items-center gap-3",
|
|
457
|
-
children: [/* @__PURE__ */
|
|
465
|
+
children: [/* @__PURE__ */ C("div", {
|
|
458
466
|
className: "w-8 h-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center",
|
|
459
|
-
children: /* @__PURE__ */
|
|
460
|
-
}), /* @__PURE__ */
|
|
467
|
+
children: /* @__PURE__ */ C(d, { className: "w-4 h-4 text-action-primary-bg" })
|
|
468
|
+
}), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C(_, {
|
|
461
469
|
className: "text-base",
|
|
462
470
|
children: "Data Preview"
|
|
463
|
-
}), /* @__PURE__ */
|
|
471
|
+
}), /* @__PURE__ */ C("p", {
|
|
464
472
|
className: "text-xs text-text-secondary mt-0.5",
|
|
465
473
|
children: "Preview the first 20 records"
|
|
466
474
|
})] })]
|
|
467
|
-
}), /* @__PURE__ */
|
|
475
|
+
}), /* @__PURE__ */ C(p, {
|
|
468
476
|
type: "button",
|
|
469
|
-
onClick:
|
|
477
|
+
onClick: Ce,
|
|
470
478
|
variant: "outline",
|
|
471
479
|
size: "sm",
|
|
472
|
-
disabled:
|
|
473
|
-
children:
|
|
480
|
+
disabled: B,
|
|
481
|
+
children: B ? /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(f, { className: "w-4 h-4 mr-2 animate-spin" }), "Loading..."] }) : /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(d, { className: "w-4 h-4 mr-2" }), "Show Data"] })
|
|
474
482
|
})]
|
|
475
483
|
})
|
|
476
|
-
}), (
|
|
484
|
+
}), (H || W) && /* @__PURE__ */ C(h, { children: W ? /* @__PURE__ */ C("div", {
|
|
477
485
|
className: "p-4 bg-state-error/10 border border-state-error/30 rounded-md",
|
|
478
|
-
children: /* @__PURE__ */
|
|
486
|
+
children: /* @__PURE__ */ C("p", {
|
|
479
487
|
className: "text-sm text-state-error",
|
|
480
|
-
children:
|
|
488
|
+
children: W
|
|
481
489
|
})
|
|
482
|
-
}) :
|
|
490
|
+
}) : H && H.length > 0 ? /* @__PURE__ */ C("pre", {
|
|
483
491
|
className: "p-4 bg-bg-sunken rounded-md overflow-auto max-h-[300px] text-xs font-mono",
|
|
484
|
-
children: JSON.stringify(
|
|
485
|
-
}) : /* @__PURE__ */
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
children: "No data available yet. Connect a workflow to push data."
|
|
490
|
-
})
|
|
492
|
+
children: JSON.stringify(H, null, 2)
|
|
493
|
+
}) : /* @__PURE__ */ C(v, {
|
|
494
|
+
illustration: "empty-generic",
|
|
495
|
+
title: "No data available yet",
|
|
496
|
+
description: "Connect a workflow to this sink's key to start pushing data."
|
|
491
497
|
}) })] }),
|
|
492
|
-
/* @__PURE__ */
|
|
498
|
+
/* @__PURE__ */ w("div", {
|
|
493
499
|
className: "flex items-center justify-end gap-spacing-md pt-spacing-md",
|
|
494
|
-
children: [/* @__PURE__ */
|
|
500
|
+
children: [/* @__PURE__ */ C(p, {
|
|
495
501
|
type: "button",
|
|
496
502
|
onClick: $,
|
|
497
503
|
variant: "secondary",
|
|
498
504
|
children: "Cancel"
|
|
499
|
-
}), /* @__PURE__ */
|
|
505
|
+
}), /* @__PURE__ */ C(p, {
|
|
500
506
|
type: "submit",
|
|
501
|
-
disabled: !
|
|
507
|
+
disabled: !Te || P,
|
|
502
508
|
variant: "default",
|
|
503
|
-
children: P ? /* @__PURE__ */
|
|
509
|
+
children: P ? /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(f, { className: "w-4 h-4 mr-2 animate-spin" }), "Saving..."] }) : /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(se, { className: "w-4 h-4 mr-2" }), D ? "Save Changes" : "Create DataSink"] })
|
|
504
510
|
})]
|
|
505
511
|
})
|
|
506
512
|
]
|
|
507
513
|
}),
|
|
508
|
-
!D && /* @__PURE__ */
|
|
514
|
+
!D && /* @__PURE__ */ w("div", {
|
|
509
515
|
className: "mt-spacing-lg p-4 bg-bg-sunken rounded-lg border border-border-default",
|
|
510
|
-
children: [/* @__PURE__ */
|
|
516
|
+
children: [/* @__PURE__ */ C("h3", {
|
|
511
517
|
className: "text-sm font-medium text-text-primary mb-2",
|
|
512
518
|
children: "What's Next?"
|
|
513
|
-
}), /* @__PURE__ */
|
|
519
|
+
}), /* @__PURE__ */ w("ol", {
|
|
514
520
|
className: "list-decimal list-inside text-xs text-text-secondary space-y-1",
|
|
515
521
|
children: [
|
|
516
|
-
/* @__PURE__ */
|
|
517
|
-
/* @__PURE__ */
|
|
522
|
+
/* @__PURE__ */ C("li", { children: "Create this DataSink to get your unique key" }),
|
|
523
|
+
/* @__PURE__ */ w("li", { children: [
|
|
518
524
|
"Go to ",
|
|
519
|
-
/* @__PURE__ */
|
|
525
|
+
/* @__PURE__ */ C("strong", { children: "Workflows" }),
|
|
520
526
|
" and create a FluidGrids workflow"
|
|
521
527
|
] }),
|
|
522
|
-
/* @__PURE__ */
|
|
523
|
-
/* @__PURE__ */
|
|
528
|
+
/* @__PURE__ */ C("li", { children: "Use the unique key in your workflow to push data to this DataSink" }),
|
|
529
|
+
/* @__PURE__ */ w("li", { children: [
|
|
524
530
|
"Create ",
|
|
525
|
-
/* @__PURE__ */
|
|
531
|
+
/* @__PURE__ */ C("strong", { children: "Parsers" }),
|
|
526
532
|
" to transform the data using JQ or JSONata"
|
|
527
533
|
] })
|
|
528
534
|
]
|