@burdenoff/microfe-bigconsole 2026.1104.1 → 2026.1104.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bigconsole/components/dashboard/LiveCanvasToggle.js +17 -16
- package/dist/bigconsole/components/datasink/LinkedWorkflowsPanel.d.ts +4 -0
- package/dist/bigconsole/components/datasink/LinkedWorkflowsPanel.js +80 -55
- package/dist/bigconsole/components/datasink/SinkWorkflowLinkForm.d.ts +13 -0
- package/dist/bigconsole/components/datasink/SinkWorkflowLinkForm.js +80 -0
- package/dist/bigconsole/pages/DashboardViewPage.js +247 -238
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +144 -111
- package/dist/bigconsole/pages/DataSinkViewPage.js +305 -287
- package/dist/bigconsole/utils/dataSinkOwner.d.ts +26 -0
- package/dist/bigconsole/utils/dataSinkOwner.js +17 -0
- package/dist/bigconsole/utils/liveBoardRefresh.d.ts +31 -0
- package/dist/bigconsole/utils/liveBoardRefresh.js +7 -0
- package/dist/bigconsole/utils/sinkWorkflowLink.d.ts +14 -0
- package/dist/bigconsole/utils/sinkWorkflowLink.js +7 -0
- package/package.json +1 -1
|
@@ -11,20 +11,21 @@ import { isNative as re, nativeCopyText as ie, nativeToast as ae } from "../../u
|
|
|
11
11
|
import { CacheTTLSelector as oe } from "../components/datasink/CacheTTLSelector.js";
|
|
12
12
|
import { RefreshTypeSelector as se } from "../components/datasink/RefreshTypeSelector.js";
|
|
13
13
|
import { diffPayloadEditor as ce, formatPayloadForEditor as le } from "../utils/dataSinkPayload.js";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
14
|
+
import { readSinkOwner as ue, sinkOwnerChanged as de, withSinkOwner as fe } from "../utils/dataSinkOwner.js";
|
|
15
|
+
import { memo as a, useCallback as o, useEffect as s, useMemo as pe, useState as c } from "react";
|
|
16
|
+
import { useParams as me } from "react-router";
|
|
17
|
+
import { AccessDenied as he, PermissionButton as ge } from "@burdenoff/fe-libs/shared/components";
|
|
18
|
+
import { usePermissions as _e } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
19
|
+
import { AlertCircle as l, ArrowLeft as u, Check as ve, Copy as ye, Database as d, Eye as be, ListChecks as xe, Loader2 as f, Save as Se, Settings as Ce } from "lucide-react";
|
|
20
|
+
import { Button as p, IllustratedEmptyState as we, Input as m, Label as h, PagePurpose as Te, Textarea as g } from "@burdenoff/fe-libs/ui";
|
|
21
|
+
import { useUnsavedChanges as Ee } from "@burdenoff/fe-libs/shared/hooks";
|
|
22
|
+
import { useI18n as De } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
22
23
|
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
23
24
|
//#region src/bigconsole/pages/DataSinkBuilderPage.tsx
|
|
24
|
-
function
|
|
25
|
+
function Oe(e) {
|
|
25
26
|
return e.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "").substring(0, 64);
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
+
function ke(e, t) {
|
|
28
29
|
let n = {};
|
|
29
30
|
if (e.name.trim() ? e.name.length < 2 ? n.name = t("bigconsole.dataSinks.builder.validation.nameMinLength", "Name must be at least 2 characters") : e.name.length > 100 && (n.name = t("bigconsole.dataSinks.builder.validation.nameMaxLength", "Name must be less than 100 characters")) : n.name = t("bigconsole.dataSinks.builder.validation.nameRequired", "Name is required"), e.key.trim() ? /^[a-z0-9_]+$/.test(e.key) ? e.key.length > 64 && (n.key = t("bigconsole.dataSinks.builder.validation.keyMaxLength", "Key must be less than 64 characters")) : n.key = t("bigconsole.dataSinks.builder.validation.keyFormat", "Key can only contain lowercase letters, numbers, and underscores") : n.key = t("bigconsole.dataSinks.builder.validation.keyRequired", "Key is required"), e.data && e.data.trim()) try {
|
|
30
31
|
JSON.parse(e.data);
|
|
@@ -34,116 +35,123 @@ function Ee(e, t) {
|
|
|
34
35
|
return n;
|
|
35
36
|
}
|
|
36
37
|
var b = a(function() {
|
|
37
|
-
let { dataSinkId: a } =
|
|
38
|
+
let { dataSinkId: a } = me(), b = e(), { t: x } = De(), S = a !== "new" && !!a, { hasPermission: Ae, isLoading: je } = _e(), Me = Ae(i.DATASINK_READ), Ne = S ? i.DATASINK_UPDATE : i.DATASINK_CREATE, [C, w] = c({
|
|
38
39
|
name: "",
|
|
39
40
|
key: "",
|
|
40
41
|
description: "",
|
|
42
|
+
owner: "",
|
|
41
43
|
ttl: (() => {
|
|
42
44
|
let e = te();
|
|
43
45
|
return e.cacheEnabled ? e.cacheTTLSeconds : 0;
|
|
44
46
|
})(),
|
|
45
47
|
refresh: { type: "manual" },
|
|
46
48
|
data: S ? "" : "{}"
|
|
47
|
-
}), [
|
|
48
|
-
|
|
49
|
+
}), [Pe, T] = c(() => S ? null : C);
|
|
50
|
+
Ee({
|
|
49
51
|
id: "datasink-editor",
|
|
50
52
|
label: x("bigconsole.assistant.unsaved.dataSourceForm", "the data source form"),
|
|
51
|
-
dirty: ne(C,
|
|
53
|
+
dirty: ne(C, Pe)
|
|
52
54
|
});
|
|
53
|
-
let [E, D] = c({}), [
|
|
55
|
+
let [E, D] = c({}), [O, k] = c(!1), [A, j] = c(!1), [M, N] = c(null), [Fe, P] = c(!1), [F, I] = c(!1), [L, R] = c(null), [z, B] = c(null), [V, H] = c("idle"), [U, W] = c(null), { loading: Ie, error: G, dataSinks: Le, fetchDataSink: K, fetchDataSinkPayload: q, createDataSink: J, updateDataSink: Y, getDataSinkData: X } = ee({ skipFetch: !0 }), Z = S ? Le.find((e) => e.id === a) : null;
|
|
54
56
|
s(() => {
|
|
55
|
-
S && a && !
|
|
57
|
+
S && a && !Z && K(a);
|
|
56
58
|
}, [
|
|
57
59
|
S,
|
|
58
60
|
a,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
+
Z,
|
|
62
|
+
K
|
|
61
63
|
]), s(() => {
|
|
62
64
|
if (!S || !a) return;
|
|
63
65
|
let e = !1;
|
|
64
|
-
return
|
|
66
|
+
return H("loading"), W(null), q(a).then((t) => {
|
|
65
67
|
if (e) return;
|
|
66
68
|
if (!t) {
|
|
67
|
-
|
|
69
|
+
H("unavailable");
|
|
68
70
|
return;
|
|
69
71
|
}
|
|
70
72
|
let n = le(t.data);
|
|
71
|
-
|
|
73
|
+
W(n), w((e) => ({
|
|
72
74
|
...e,
|
|
73
75
|
data: n
|
|
74
76
|
})), T((e) => e ? {
|
|
75
77
|
...e,
|
|
76
78
|
data: n
|
|
77
|
-
} : null),
|
|
79
|
+
} : null), H("loaded");
|
|
78
80
|
}).catch(() => {
|
|
79
|
-
e ||
|
|
81
|
+
e || H("unavailable");
|
|
80
82
|
}), () => {
|
|
81
83
|
e = !0;
|
|
82
84
|
};
|
|
83
85
|
}, [
|
|
84
86
|
S,
|
|
85
87
|
a,
|
|
86
|
-
|
|
88
|
+
q
|
|
87
89
|
]);
|
|
88
|
-
let [
|
|
90
|
+
let [Re, ze] = c(!1);
|
|
89
91
|
s(() => {
|
|
90
|
-
if (
|
|
92
|
+
if (Z && !Re) {
|
|
91
93
|
let e = {
|
|
92
94
|
...C,
|
|
93
|
-
name:
|
|
94
|
-
key:
|
|
95
|
-
description:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
95
|
+
name: Z.name || "",
|
|
96
|
+
key: Z.key || "",
|
|
97
|
+
description: Z.description || "",
|
|
98
|
+
owner: ue(Z.metadata),
|
|
99
|
+
ttl: Z.ttl ?? 300,
|
|
100
|
+
refresh: Z.refresh ? {
|
|
101
|
+
type: Z.refresh.type === "scheduled" ? "scheduled" : "manual",
|
|
102
|
+
schedule: Z.refresh.schedule ? {
|
|
103
|
+
cron: Z.refresh.schedule.cron,
|
|
104
|
+
timezone: Z.refresh.schedule.timezone
|
|
102
105
|
} : void 0
|
|
103
106
|
} : { type: "manual" }
|
|
104
107
|
};
|
|
105
|
-
w(e), T(e),
|
|
108
|
+
w(e), T(e), k(!0), ze(!0), D({});
|
|
106
109
|
}
|
|
107
110
|
}, [
|
|
108
|
-
X,
|
|
109
111
|
Z,
|
|
112
|
+
Re,
|
|
110
113
|
C
|
|
111
114
|
]);
|
|
112
|
-
let
|
|
115
|
+
let Be = o((e) => {
|
|
113
116
|
let t = e.target.value;
|
|
114
117
|
w((e) => ({
|
|
115
118
|
...e,
|
|
116
119
|
name: t,
|
|
117
|
-
key:
|
|
120
|
+
key: O ? e.key : Oe(t)
|
|
118
121
|
})), D((e) => ({
|
|
119
122
|
...e,
|
|
120
123
|
name: void 0
|
|
121
124
|
}));
|
|
122
|
-
}, [
|
|
125
|
+
}, [O]), Ve = o((e) => {
|
|
123
126
|
let t = e.target.value.toLowerCase().replace(/[^a-z0-9_]/g, "");
|
|
124
127
|
w((e) => ({
|
|
125
128
|
...e,
|
|
126
129
|
key: t
|
|
127
|
-
})),
|
|
130
|
+
})), k(!0), D((e) => ({
|
|
128
131
|
...e,
|
|
129
132
|
key: void 0
|
|
130
133
|
}));
|
|
131
|
-
}, []),
|
|
134
|
+
}, []), He = o((e) => {
|
|
132
135
|
w((t) => ({
|
|
133
136
|
...t,
|
|
134
137
|
description: e.target.value
|
|
135
138
|
}));
|
|
136
|
-
}, []),
|
|
139
|
+
}, []), Ue = o((e) => {
|
|
140
|
+
w((t) => ({
|
|
141
|
+
...t,
|
|
142
|
+
owner: e.target.value
|
|
143
|
+
}));
|
|
144
|
+
}, []), We = o((e) => {
|
|
137
145
|
w((t) => ({
|
|
138
146
|
...t,
|
|
139
147
|
ttl: e || 0
|
|
140
148
|
}));
|
|
141
|
-
}, []),
|
|
149
|
+
}, []), Ge = o((e) => {
|
|
142
150
|
w((t) => ({
|
|
143
151
|
...t,
|
|
144
152
|
refresh: e
|
|
145
153
|
}));
|
|
146
|
-
}, []),
|
|
154
|
+
}, []), Ke = o((e) => {
|
|
147
155
|
w((t) => ({
|
|
148
156
|
...t,
|
|
149
157
|
data: e.target.value
|
|
@@ -151,7 +159,7 @@ var b = a(function() {
|
|
|
151
159
|
...e,
|
|
152
160
|
data: void 0
|
|
153
161
|
}));
|
|
154
|
-
}, []),
|
|
162
|
+
}, []), qe = o(() => {
|
|
155
163
|
try {
|
|
156
164
|
let e = JSON.parse(C.data);
|
|
157
165
|
w((t) => ({
|
|
@@ -167,33 +175,33 @@ var b = a(function() {
|
|
|
167
175
|
data: x("bigconsole.dataSinks.builder.validation.invalidJson", "Invalid JSON format")
|
|
168
176
|
}));
|
|
169
177
|
}
|
|
170
|
-
}, [C.data, x]),
|
|
171
|
-
C.key && (await ie(C.key),
|
|
178
|
+
}, [C.data, x]), Je = o(async () => {
|
|
179
|
+
C.key && (await ie(C.key), P(!0), re() && ae(x("bigconsole.dataSinks.builder.toolbar.keyCopied", "Key copied")), setTimeout(() => P(!1), 2e3));
|
|
172
180
|
}, [C.key, x]), Q = o(() => {
|
|
173
181
|
b("/datasinks");
|
|
174
|
-
}, [b]),
|
|
175
|
-
if (!(!S || !
|
|
176
|
-
|
|
182
|
+
}, [b]), Ye = o(async () => {
|
|
183
|
+
if (!(!S || !Z)) {
|
|
184
|
+
I(!0), B(null);
|
|
177
185
|
try {
|
|
178
|
-
let e = await
|
|
186
|
+
let e = await X({ key: Z.key });
|
|
179
187
|
if (e?.raw) {
|
|
180
188
|
let t = Array.isArray(e.raw) ? e.raw.slice(0, 20) : [e.raw];
|
|
181
|
-
|
|
182
|
-
} else
|
|
189
|
+
R(t);
|
|
190
|
+
} else R([]);
|
|
183
191
|
} catch (e) {
|
|
184
|
-
|
|
192
|
+
B(e instanceof Error ? e.message : x("bigconsole.dataSinks.builder.errors.loadDataFailed", "Failed to load data"));
|
|
185
193
|
} finally {
|
|
186
|
-
|
|
194
|
+
I(!1);
|
|
187
195
|
}
|
|
188
196
|
}
|
|
189
197
|
}, [
|
|
190
198
|
S,
|
|
199
|
+
Z,
|
|
191
200
|
X,
|
|
192
|
-
Y,
|
|
193
201
|
x
|
|
194
|
-
]),
|
|
195
|
-
e.preventDefault(),
|
|
196
|
-
let n =
|
|
202
|
+
]), Xe = o(async (e) => {
|
|
203
|
+
e.preventDefault(), N(null);
|
|
204
|
+
let n = ke(C, x);
|
|
197
205
|
if (Object.keys(n).length > 0) {
|
|
198
206
|
D(n);
|
|
199
207
|
return;
|
|
@@ -204,17 +212,17 @@ var b = a(function() {
|
|
|
204
212
|
data: x("bigconsole.dataSinks.builder.validation.invalidJson", "Invalid JSON format")
|
|
205
213
|
}));
|
|
206
214
|
};
|
|
207
|
-
|
|
215
|
+
j(!0);
|
|
208
216
|
try {
|
|
209
|
-
if (S &&
|
|
210
|
-
let e = ce(C.data,
|
|
217
|
+
if (S && Z) {
|
|
218
|
+
let e = ce(C.data, U);
|
|
211
219
|
if (e.status === "invalid") {
|
|
212
220
|
r();
|
|
213
221
|
return;
|
|
214
222
|
}
|
|
215
223
|
let t = {
|
|
216
|
-
id:
|
|
217
|
-
version:
|
|
224
|
+
id: Z.id,
|
|
225
|
+
version: Z.version,
|
|
218
226
|
name: C.name,
|
|
219
227
|
description: C.description || void 0,
|
|
220
228
|
ttl: C.ttl,
|
|
@@ -222,9 +230,10 @@ var b = a(function() {
|
|
|
222
230
|
type: C.refresh.type,
|
|
223
231
|
schedule: C.refresh.schedule
|
|
224
232
|
},
|
|
225
|
-
...e.status === "changed" ? { data: e.payload } : {}
|
|
233
|
+
...e.status === "changed" ? { data: e.payload } : {},
|
|
234
|
+
...de(Z.metadata, C.owner) ? { metadata: fe(Z.metadata, C.owner) ?? {} } : {}
|
|
226
235
|
};
|
|
227
|
-
if (!await
|
|
236
|
+
if (!await Y(t)) throw Error(x("bigconsole.dataSinks.builder.errors.updateFailed", "Failed to update DataSink"));
|
|
228
237
|
} else {
|
|
229
238
|
let e = {};
|
|
230
239
|
if (C.data && C.data.trim()) try {
|
|
@@ -242,27 +251,28 @@ var b = a(function() {
|
|
|
242
251
|
type: C.refresh.type,
|
|
243
252
|
schedule: C.refresh.schedule
|
|
244
253
|
},
|
|
245
|
-
data: e
|
|
254
|
+
data: e,
|
|
255
|
+
metadata: fe(void 0, C.owner)
|
|
246
256
|
};
|
|
247
|
-
if (!await
|
|
257
|
+
if (!await J(t)) throw Error(x("bigconsole.dataSinks.builder.errors.createFailed", "Failed to create DataSink"));
|
|
248
258
|
}
|
|
249
259
|
T(C), b("/datasinks");
|
|
250
260
|
} catch (e) {
|
|
251
261
|
if (t(e)) return;
|
|
252
|
-
|
|
262
|
+
N(e instanceof Error ? e.message : x("bigconsole.dataSinks.builder.errors.saveFailed", "Failed to save DataSink"));
|
|
253
263
|
} finally {
|
|
254
|
-
|
|
264
|
+
j(!1);
|
|
255
265
|
}
|
|
256
266
|
}, [
|
|
257
267
|
C,
|
|
258
268
|
S,
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
q,
|
|
269
|
+
Z,
|
|
270
|
+
U,
|
|
262
271
|
J,
|
|
272
|
+
Y,
|
|
263
273
|
b,
|
|
264
274
|
x
|
|
265
|
-
]), $ = S &&
|
|
275
|
+
]), $ = S && V === "loading", Ze = pe(() => {
|
|
266
276
|
let e = C.name.trim().length >= 2, t = C.key.trim().length > 0, n = !0;
|
|
267
277
|
if (C.data && C.data.trim()) try {
|
|
268
278
|
JSON.parse(C.data);
|
|
@@ -275,16 +285,16 @@ var b = a(function() {
|
|
|
275
285
|
C.key,
|
|
276
286
|
C.data
|
|
277
287
|
]);
|
|
278
|
-
return
|
|
288
|
+
return Ie && S ? /* @__PURE__ */ v("div", {
|
|
279
289
|
className: "flex min-h-[240px] items-center justify-center p-card-padding",
|
|
280
290
|
children: /* @__PURE__ */ v(f, { className: "h-icon-lg w-icon-lg animate-spin text-text-secondary" })
|
|
281
|
-
}) :
|
|
291
|
+
}) : G ? /* @__PURE__ */ v("div", {
|
|
282
292
|
className: "mx-auto w-full max-w-7xl p-card-padding",
|
|
283
293
|
children: /* @__PURE__ */ v(n, {
|
|
284
294
|
tone: "danger",
|
|
285
295
|
headingLevel: 2,
|
|
286
296
|
title: x("bigconsole.dataSinks.builder.errors.loadFailed", "Failed to load DataSink"),
|
|
287
|
-
description:
|
|
297
|
+
description: G.message,
|
|
288
298
|
icon: /* @__PURE__ */ v(l, { className: "h-icon-sm w-icon-sm" }),
|
|
289
299
|
actions: /* @__PURE__ */ y(p, {
|
|
290
300
|
onClick: Q,
|
|
@@ -293,7 +303,7 @@ var b = a(function() {
|
|
|
293
303
|
children: [/* @__PURE__ */ v(u, { className: "w-4 h-4 mr-2" }), x("bigconsole.dataSinks.builder.header.backToDataSinks", "Back to DataSinks")]
|
|
294
304
|
})
|
|
295
305
|
})
|
|
296
|
-
}) : S && !
|
|
306
|
+
}) : S && !je && !Me ? /* @__PURE__ */ v(he, {
|
|
297
307
|
title: x("bigconsole.dataSinks.builder.accessDenied.title", "Access Denied"),
|
|
298
308
|
description: x("bigconsole.dataSinks.builder.accessDenied.description", "You don't have permission to view this data sink.")
|
|
299
309
|
}) : /* @__PURE__ */ y("div", {
|
|
@@ -319,28 +329,28 @@ var b = a(function() {
|
|
|
319
329
|
})
|
|
320
330
|
]
|
|
321
331
|
}),
|
|
322
|
-
/* @__PURE__ */ v(
|
|
332
|
+
/* @__PURE__ */ v(Te, {
|
|
323
333
|
className: "mb-section-gap",
|
|
324
334
|
children: x("bigconsole.dataSinks.builder.header.purpose", "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.")
|
|
325
335
|
}),
|
|
326
|
-
|
|
336
|
+
M && /* @__PURE__ */ v(n, {
|
|
327
337
|
tone: "danger",
|
|
328
338
|
headingLevel: 2,
|
|
329
339
|
title: x("bigconsole.dataSinks.builder.errors.saveFailed", "Failed to save DataSink"),
|
|
330
|
-
description:
|
|
340
|
+
description: M,
|
|
331
341
|
icon: /* @__PURE__ */ v(l, { className: "h-icon-sm w-icon-sm" }),
|
|
332
342
|
className: "mb-section-gap"
|
|
333
343
|
}),
|
|
334
344
|
/* @__PURE__ */ v("form", {
|
|
335
345
|
"data-tour": "bigconsole-datasink-builder",
|
|
336
|
-
onSubmit:
|
|
346
|
+
onSubmit: Xe,
|
|
337
347
|
children: /* @__PURE__ */ y(r, { children: [
|
|
338
348
|
/* @__PURE__ */ v(n, {
|
|
339
349
|
emphasis: "primary",
|
|
340
350
|
headingLevel: 2,
|
|
341
351
|
title: x("bigconsole.dataSinks.builder.basicInfo.title", "Basic Information"),
|
|
342
352
|
description: x("bigconsole.dataSinks.builder.basicInfo.subtitle", "Essential details for your DataSink"),
|
|
343
|
-
icon: /* @__PURE__ */ v(
|
|
353
|
+
icon: /* @__PURE__ */ v(d, { className: "h-icon-sm w-icon-sm" }),
|
|
344
354
|
bodyClassName: "grid gap-form-gap md:grid-cols-2",
|
|
345
355
|
children: /* @__PURE__ */ y(_, { children: [
|
|
346
356
|
/* @__PURE__ */ y("div", {
|
|
@@ -361,7 +371,7 @@ var b = a(function() {
|
|
|
361
371
|
id: "name",
|
|
362
372
|
type: "text",
|
|
363
373
|
value: C.name,
|
|
364
|
-
onChange:
|
|
374
|
+
onChange: Be,
|
|
365
375
|
placeholder: x("bigconsole.dataSinks.builder.basicInfo.namePlaceholder", "e.g., Sales Metrics"),
|
|
366
376
|
className: E.name ? "border-status-error-border" : ""
|
|
367
377
|
}),
|
|
@@ -391,18 +401,18 @@ var b = a(function() {
|
|
|
391
401
|
id: "key",
|
|
392
402
|
type: "text",
|
|
393
403
|
value: C.key,
|
|
394
|
-
onChange:
|
|
404
|
+
onChange: Ve,
|
|
395
405
|
placeholder: x("bigconsole.dataSinks.builder.basicInfo.keyPlaceholder", "sales_metrics"),
|
|
396
406
|
disabled: S,
|
|
397
407
|
className: `font-mono flex-1 ${E.key ? "border-status-error-border" : ""}`
|
|
398
408
|
}), C.key && /* @__PURE__ */ v(p, {
|
|
399
409
|
type: "button",
|
|
400
|
-
onClick:
|
|
410
|
+
onClick: Je,
|
|
401
411
|
"aria-label": x("bigconsole.dataSinks.builder.basicInfo.copyKey", "Copy unique key"),
|
|
402
412
|
variant: "outline",
|
|
403
413
|
size: "sm",
|
|
404
414
|
className: "px-3",
|
|
405
|
-
children:
|
|
415
|
+
children: Fe ? /* @__PURE__ */ v(ve, { className: "w-4 h-4 text-status-success-text" }) : /* @__PURE__ */ v(ye, { className: "w-4 h-4" })
|
|
406
416
|
})]
|
|
407
417
|
}),
|
|
408
418
|
E.key && /* @__PURE__ */ v("p", {
|
|
@@ -423,11 +433,34 @@ var b = a(function() {
|
|
|
423
433
|
}), /* @__PURE__ */ v(g, {
|
|
424
434
|
id: "description",
|
|
425
435
|
value: C.description,
|
|
426
|
-
onChange:
|
|
436
|
+
onChange: He,
|
|
427
437
|
placeholder: x("bigconsole.dataSinks.builder.basicInfo.descriptionPlaceholder", "Describe what data this sink stores..."),
|
|
428
438
|
rows: 2,
|
|
429
439
|
className: "resize-none"
|
|
430
440
|
})]
|
|
441
|
+
}),
|
|
442
|
+
/* @__PURE__ */ y("div", {
|
|
443
|
+
className: "space-y-2 md:col-span-2",
|
|
444
|
+
children: [
|
|
445
|
+
/* @__PURE__ */ v(h, {
|
|
446
|
+
htmlFor: "owner",
|
|
447
|
+
children: x("bigconsole.dataSinks.builder.basicInfo.ownerLabel", "Owner")
|
|
448
|
+
}),
|
|
449
|
+
/* @__PURE__ */ v(m, {
|
|
450
|
+
id: "owner",
|
|
451
|
+
value: C.owner,
|
|
452
|
+
onChange: Ue,
|
|
453
|
+
maxLength: 120,
|
|
454
|
+
autoComplete: "off",
|
|
455
|
+
"aria-describedby": "owner-help",
|
|
456
|
+
placeholder: x("bigconsole.dataSinks.builder.basicInfo.ownerPlaceholder", "e.g., FP&A team or priya@company.com")
|
|
457
|
+
}),
|
|
458
|
+
/* @__PURE__ */ v("p", {
|
|
459
|
+
id: "owner-help",
|
|
460
|
+
className: "text-xs text-text-secondary",
|
|
461
|
+
children: x("bigconsole.dataSinks.builder.basicInfo.ownerHelp", "Optional. The person or team accountable for these figures — useful for manual sinks such as budgets and targets.")
|
|
462
|
+
})
|
|
463
|
+
]
|
|
431
464
|
})
|
|
432
465
|
] })
|
|
433
466
|
}),
|
|
@@ -435,7 +468,7 @@ var b = a(function() {
|
|
|
435
468
|
headingLevel: 2,
|
|
436
469
|
title: x("bigconsole.dataSinks.builder.config.title", "Configuration"),
|
|
437
470
|
description: x("bigconsole.dataSinks.builder.config.subtitle", "Cache and refresh settings"),
|
|
438
|
-
icon: /* @__PURE__ */ v(
|
|
471
|
+
icon: /* @__PURE__ */ v(Ce, { className: "h-icon-sm w-icon-sm" }),
|
|
439
472
|
bodyClassName: "grid gap-form-gap md:grid-cols-2",
|
|
440
473
|
children: /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ y("div", {
|
|
441
474
|
className: "space-y-2",
|
|
@@ -443,7 +476,7 @@ var b = a(function() {
|
|
|
443
476
|
/* @__PURE__ */ v(h, { children: x("bigconsole.dataSinks.builder.config.cacheDurationLabel", "Cache Duration") }),
|
|
444
477
|
/* @__PURE__ */ v(oe, {
|
|
445
478
|
value: C.ttl,
|
|
446
|
-
onChange:
|
|
479
|
+
onChange: We,
|
|
447
480
|
hideLabel: !0
|
|
448
481
|
}),
|
|
449
482
|
/* @__PURE__ */ v("p", {
|
|
@@ -453,17 +486,17 @@ var b = a(function() {
|
|
|
453
486
|
]
|
|
454
487
|
}), /* @__PURE__ */ v(se, {
|
|
455
488
|
value: C.refresh,
|
|
456
|
-
onChange:
|
|
489
|
+
onChange: Ge
|
|
457
490
|
})] })
|
|
458
491
|
}),
|
|
459
492
|
/* @__PURE__ */ v(n, {
|
|
460
493
|
headingLevel: 2,
|
|
461
494
|
title: x("bigconsole.dataSinks.builder.dataPayload.title", "Data Payload"),
|
|
462
495
|
description: S ? x("bigconsole.dataSinks.builder.dataPayload.subtitleEdit", "Edit the JSON data stored in this DataSink") : x("bigconsole.dataSinks.builder.dataPayload.subtitleCreate", "Optional initial data (JSON format)"),
|
|
463
|
-
icon: /* @__PURE__ */ v(
|
|
496
|
+
icon: /* @__PURE__ */ v(d, { className: "h-icon-sm w-icon-sm" }),
|
|
464
497
|
actions: /* @__PURE__ */ v(p, {
|
|
465
498
|
type: "button",
|
|
466
|
-
onClick:
|
|
499
|
+
onClick: qe,
|
|
467
500
|
variant: "outline",
|
|
468
501
|
size: "sm",
|
|
469
502
|
disabled: $,
|
|
@@ -474,7 +507,7 @@ var b = a(function() {
|
|
|
474
507
|
/* @__PURE__ */ v(g, {
|
|
475
508
|
"aria-label": x("bigconsole.dataSinks.builder.dataPayload.title", "Data Payload"),
|
|
476
509
|
value: C.data,
|
|
477
|
-
onChange:
|
|
510
|
+
onChange: Ke,
|
|
478
511
|
disabled: $,
|
|
479
512
|
"aria-busy": $,
|
|
480
513
|
placeholder: $ ? x("bigconsole.dataSinks.builder.dataPayload.loading", "Loading the stored payload…") : x("bigconsole.dataSinks.builder.dataPayload.dataPlaceholder", "{\"key\": \"value\"}"),
|
|
@@ -485,7 +518,7 @@ var b = a(function() {
|
|
|
485
518
|
className: "text-xs text-status-error-text",
|
|
486
519
|
children: E.data
|
|
487
520
|
}),
|
|
488
|
-
S &&
|
|
521
|
+
S && V === "unavailable" && /* @__PURE__ */ v("p", {
|
|
489
522
|
role: "status",
|
|
490
523
|
className: "text-xs text-status-warning-text",
|
|
491
524
|
children: x("bigconsole.dataSinks.builder.dataPayload.unavailable", "The stored payload could not be loaded. Leave this empty to keep it unchanged, or enter JSON to replace it.")
|
|
@@ -496,33 +529,33 @@ var b = a(function() {
|
|
|
496
529
|
})
|
|
497
530
|
] })
|
|
498
531
|
}),
|
|
499
|
-
S &&
|
|
532
|
+
S && Z && /* @__PURE__ */ v(n, {
|
|
500
533
|
emphasis: "muted",
|
|
501
534
|
headingLevel: 2,
|
|
502
535
|
title: x("bigconsole.dataSinks.builder.preview.title", "Data Preview"),
|
|
503
536
|
description: x("bigconsole.dataSinks.builder.preview.subtitle", "Preview the first 20 records"),
|
|
504
|
-
icon: /* @__PURE__ */ v(
|
|
537
|
+
icon: /* @__PURE__ */ v(be, { className: "h-icon-sm w-icon-sm" }),
|
|
505
538
|
actions: /* @__PURE__ */ v(p, {
|
|
506
539
|
type: "button",
|
|
507
|
-
onClick:
|
|
540
|
+
onClick: Ye,
|
|
508
541
|
variant: "outline",
|
|
509
542
|
size: "sm",
|
|
510
|
-
disabled:
|
|
511
|
-
children:
|
|
543
|
+
disabled: F,
|
|
544
|
+
children: F ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(f, { className: "w-4 h-4 mr-2 animate-spin" }), x("bigconsole.dataSinks.builder.preview.loading", "Loading...")] }) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(be, { className: "w-4 h-4 mr-2" }), x("bigconsole.dataSinks.builder.preview.showData", "Show Data")] })
|
|
512
545
|
}),
|
|
513
|
-
children:
|
|
546
|
+
children: z ? /* @__PURE__ */ v(n, {
|
|
514
547
|
tone: "danger",
|
|
515
548
|
padding: "compact",
|
|
516
549
|
headingLevel: 3,
|
|
517
550
|
title: "Could not load the preview",
|
|
518
551
|
children: /* @__PURE__ */ v("p", {
|
|
519
552
|
className: "text-sm text-status-error-text",
|
|
520
|
-
children:
|
|
553
|
+
children: z
|
|
521
554
|
})
|
|
522
|
-
}) :
|
|
555
|
+
}) : L && L.length > 0 ? /* @__PURE__ */ v("pre", {
|
|
523
556
|
className: "max-h-[300px] min-w-0 overflow-auto rounded-input bg-bg-surface p-3 font-mono text-xs",
|
|
524
|
-
children: JSON.stringify(
|
|
525
|
-
}) :
|
|
557
|
+
children: JSON.stringify(L, null, 2)
|
|
558
|
+
}) : L ? /* @__PURE__ */ v(we, {
|
|
526
559
|
illustration: "empty-generic",
|
|
527
560
|
title: x("bigconsole.dataSinks.builder.preview.emptyTitle", "No data available yet"),
|
|
528
561
|
description: x("bigconsole.dataSinks.builder.preview.emptyDescription", "Connect a workflow to this sink's key to start pushing data.")
|
|
@@ -536,7 +569,7 @@ var b = a(function() {
|
|
|
536
569
|
emphasis: "muted",
|
|
537
570
|
headingLevel: 2,
|
|
538
571
|
title: x("bigconsole.dataSinks.builder.whatsNext.title", "What's Next?"),
|
|
539
|
-
icon: /* @__PURE__ */ v(
|
|
572
|
+
icon: /* @__PURE__ */ v(xe, { className: "h-icon-sm w-icon-sm" }),
|
|
540
573
|
children: /* @__PURE__ */ y("ol", {
|
|
541
574
|
className: "list-inside list-decimal space-y-1 text-xs text-text-secondary",
|
|
542
575
|
children: [
|
|
@@ -570,14 +603,14 @@ var b = a(function() {
|
|
|
570
603
|
onClick: Q,
|
|
571
604
|
variant: "secondary",
|
|
572
605
|
children: x("bigconsole.dataSinks.builder.actions.cancel", "Cancel")
|
|
573
|
-
}), /* @__PURE__ */ v(
|
|
574
|
-
permission:
|
|
606
|
+
}), /* @__PURE__ */ v(ge, {
|
|
607
|
+
permission: Ne,
|
|
575
608
|
deniedBehavior: "disable",
|
|
576
609
|
children: /* @__PURE__ */ v(p, {
|
|
577
610
|
type: "submit",
|
|
578
|
-
disabled: !
|
|
611
|
+
disabled: !Ze || A,
|
|
579
612
|
variant: "default",
|
|
580
|
-
children:
|
|
613
|
+
children: A ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(f, { className: "w-4 h-4 mr-2 animate-spin" }), x("bigconsole.dataSinks.builder.actions.saving", "Saving...")] }) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(Se, { className: "w-4 h-4 mr-2" }), S ? x("bigconsole.dataSinks.builder.actions.saveChanges", "Save Changes") : x("bigconsole.dataSinks.builder.actions.create", "Create DataSink")] })
|
|
581
614
|
})
|
|
582
615
|
})]
|
|
583
616
|
})
|