@burdenoff/microfe-bigconsole 2026.1119.8 → 2026.1119.9
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/ExportDashboardDialog.js +129 -117
- package/dist/bigconsole/components/parser/ParserCard.d.ts +3 -1
- package/dist/bigconsole/components/parser/ParserCard.js +125 -120
- package/dist/bigconsole/components/parser/ParserScopeBadge.d.ts +6 -0
- package/dist/bigconsole/components/parser/ParserScopeBadge.js +23 -0
- package/dist/bigconsole/hooks/useExportDashboard.d.ts +14 -2
- package/dist/bigconsole/hooks/useExportDashboard.js +45 -41
- package/dist/bigconsole/hooks/useParserOperations.d.ts +6 -0
- package/dist/bigconsole/hooks/useParserOperations.js +64 -65
- package/dist/bigconsole/pages/DataParsersPage.js +201 -172
- package/dist/bigconsole/store/parserScope.js +9 -6
- package/dist/bigconsole/types/index.d.ts +8 -0
- package/dist/bigconsole/utils/parserScopeFilter.d.ts +14 -0
- package/dist/bigconsole/utils/parserScopeFilter.js +25 -0
- package/dist/generated/wspace-operations.d.ts +18 -1
- package/dist/generated/wspace-operations.js +58 -7
- package/package.json +1 -1
|
@@ -8,9 +8,10 @@ import { nativeCopyText as i } from "../../../utils/nativeBridge.js";
|
|
|
8
8
|
import { memo as a, useCallback as o, useEffect as s, useState as c } from "react";
|
|
9
9
|
import { Check as l, Copy as u, Download as d, FileJson as f } from "lucide-react";
|
|
10
10
|
import { ResponsiveDialog as p, ResponsiveDialogContent as m, ResponsiveDialogDescription as h, ResponsiveDialogTitle as g, Spinner as _ } from "@burdenoff/fe-libs/ui";
|
|
11
|
-
import {
|
|
11
|
+
import { useI18n as v } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
12
|
+
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
12
13
|
// src/bigconsole/components/dashboard/ExportDashboardDialog.tsx
|
|
13
|
-
var
|
|
14
|
+
var S = {
|
|
14
15
|
dialogContent: {
|
|
15
16
|
maxWidth: "640px",
|
|
16
17
|
width: "95vw",
|
|
@@ -170,15 +171,15 @@ var x = {
|
|
|
170
171
|
opacity: .5,
|
|
171
172
|
cursor: "not-allowed"
|
|
172
173
|
}
|
|
173
|
-
},
|
|
174
|
-
return /* @__PURE__ */
|
|
174
|
+
}, C = a(function({ checked: e, onChange: t, disabled: n, label: r, description: i }) {
|
|
175
|
+
return /* @__PURE__ */ x("label", {
|
|
175
176
|
style: {
|
|
176
|
-
...
|
|
177
|
-
...e ?
|
|
177
|
+
...S.optionItem,
|
|
178
|
+
...e ? S.optionItemActive : {},
|
|
178
179
|
opacity: n ? .6 : 1,
|
|
179
180
|
cursor: n ? "not-allowed" : "pointer"
|
|
180
181
|
},
|
|
181
|
-
children: [/* @__PURE__ */
|
|
182
|
+
children: [/* @__PURE__ */ b("input", {
|
|
182
183
|
type: "checkbox",
|
|
183
184
|
checked: e,
|
|
184
185
|
onChange: (e) => t(e.target.checked),
|
|
@@ -190,33 +191,34 @@ var x = {
|
|
|
190
191
|
flexShrink: 0,
|
|
191
192
|
accentColor: "var(--color-action-primary-bg)"
|
|
192
193
|
}
|
|
193
|
-
}), /* @__PURE__ */
|
|
194
|
-
style:
|
|
195
|
-
children: [/* @__PURE__ */
|
|
194
|
+
}), /* @__PURE__ */ x("span", {
|
|
195
|
+
style: S.optionText,
|
|
196
|
+
children: [/* @__PURE__ */ b("span", {
|
|
196
197
|
className: "block",
|
|
197
|
-
style:
|
|
198
|
+
style: S.optionLabel,
|
|
198
199
|
children: r
|
|
199
|
-
}), /* @__PURE__ */
|
|
200
|
+
}), /* @__PURE__ */ b("span", {
|
|
200
201
|
className: "block",
|
|
201
|
-
style:
|
|
202
|
+
style: S.optionDescription,
|
|
202
203
|
children: i
|
|
203
204
|
})]
|
|
204
205
|
})]
|
|
205
206
|
});
|
|
206
|
-
}),
|
|
207
|
-
let [
|
|
207
|
+
}), w = a(function({ isOpen: a, dashboardId: w, dashboardName: T, onClose: E, onSuccess: D }) {
|
|
208
|
+
let [O, k] = c(!1), [A, j] = c(!1), [M, N] = c(!0), [P, F] = c(!0), { t: I } = v(), [L, R] = c(null), [z, B] = c(null), { loading: V, error: H, downloadDashboard: U, clearError: W } = r(), { currentUser: G, workspaceId: K } = e(), { loading: q, error: J, exportDashboard: Y } = r(), X = `${G?.id ?? ""}|${K ?? ""}|${w}|${O}|${A}|${M}|${P}`, Z = L?.key === X ? L.json : null, Q = z === X;
|
|
208
209
|
s(() => {
|
|
209
|
-
a && (
|
|
210
|
-
}, [a,
|
|
211
|
-
if (!a || !
|
|
210
|
+
a && (k(!1), j(!1), N(!0), F(!0), W());
|
|
211
|
+
}, [a, W]), s(() => {
|
|
212
|
+
if (!a || !w) return;
|
|
212
213
|
let e = !1;
|
|
213
|
-
return
|
|
214
|
-
includeDataSourceRefs:
|
|
215
|
-
includeWebhookMappings:
|
|
216
|
-
|
|
214
|
+
return Y(w, {
|
|
215
|
+
includeDataSourceRefs: O,
|
|
216
|
+
includeWebhookMappings: A,
|
|
217
|
+
includeExportedAt: M,
|
|
218
|
+
prettyPrint: P
|
|
217
219
|
}).then((t) => {
|
|
218
|
-
e ||
|
|
219
|
-
key:
|
|
220
|
+
e || R({
|
|
221
|
+
key: X,
|
|
220
222
|
json: t
|
|
221
223
|
});
|
|
222
224
|
}), () => {
|
|
@@ -224,170 +226,180 @@ var x = {
|
|
|
224
226
|
};
|
|
225
227
|
}, [
|
|
226
228
|
a,
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
229
|
+
w,
|
|
230
|
+
O,
|
|
231
|
+
A,
|
|
232
|
+
M,
|
|
233
|
+
P,
|
|
234
|
+
X,
|
|
235
|
+
Y
|
|
233
236
|
]);
|
|
234
|
-
let
|
|
235
|
-
|
|
236
|
-
}, [
|
|
237
|
-
|
|
238
|
-
includeDataSourceRefs:
|
|
239
|
-
includeWebhookMappings:
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
237
|
+
let $ = o(async () => {
|
|
238
|
+
Z && await i(Z) && (B(X), window.setTimeout(() => B(null), 2e3));
|
|
239
|
+
}, [Z, X]), ee = o(async () => {
|
|
240
|
+
w && Z && !q && await U(w, T, {
|
|
241
|
+
includeDataSourceRefs: O,
|
|
242
|
+
includeWebhookMappings: A,
|
|
243
|
+
includeExportedAt: M,
|
|
244
|
+
prettyPrint: P,
|
|
245
|
+
preparedContent: Z
|
|
246
|
+
}) && (D?.(), E());
|
|
243
247
|
}, [
|
|
244
|
-
C,
|
|
245
248
|
w,
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
249
|
+
T,
|
|
250
|
+
O,
|
|
251
|
+
A,
|
|
252
|
+
M,
|
|
253
|
+
P,
|
|
251
254
|
U,
|
|
252
|
-
|
|
253
|
-
|
|
255
|
+
Z,
|
|
256
|
+
q,
|
|
257
|
+
D,
|
|
258
|
+
E
|
|
254
259
|
]);
|
|
255
|
-
return
|
|
260
|
+
return w ? /* @__PURE__ */ b(p, {
|
|
256
261
|
open: a,
|
|
257
|
-
onOpenChange: (e) => !e && !
|
|
258
|
-
children: /* @__PURE__ */
|
|
259
|
-
style:
|
|
262
|
+
onOpenChange: (e) => !e && !V && E(),
|
|
263
|
+
children: /* @__PURE__ */ x(m, {
|
|
264
|
+
style: S.dialogContent,
|
|
260
265
|
children: [
|
|
261
|
-
/* @__PURE__ */
|
|
262
|
-
style:
|
|
263
|
-
children: [/* @__PURE__ */
|
|
264
|
-
style:
|
|
265
|
-
children: /* @__PURE__ */
|
|
266
|
+
/* @__PURE__ */ x("div", {
|
|
267
|
+
style: S.header,
|
|
268
|
+
children: [/* @__PURE__ */ b("div", {
|
|
269
|
+
style: S.iconWrapper,
|
|
270
|
+
children: /* @__PURE__ */ b(f, { style: {
|
|
266
271
|
width: "22px",
|
|
267
272
|
height: "22px"
|
|
268
273
|
} })
|
|
269
|
-
}), /* @__PURE__ */
|
|
270
|
-
style:
|
|
271
|
-
children: [/* @__PURE__ */
|
|
274
|
+
}), /* @__PURE__ */ x("div", {
|
|
275
|
+
style: S.headerText,
|
|
276
|
+
children: [/* @__PURE__ */ b(g, {
|
|
272
277
|
asChild: !0,
|
|
273
|
-
children: /* @__PURE__ */
|
|
274
|
-
style:
|
|
278
|
+
children: /* @__PURE__ */ b("h2", {
|
|
279
|
+
style: S.title,
|
|
275
280
|
children: "Export Dashboard"
|
|
276
281
|
})
|
|
277
|
-
}), /* @__PURE__ */
|
|
282
|
+
}), /* @__PURE__ */ b(h, {
|
|
278
283
|
asChild: !0,
|
|
279
|
-
children: /* @__PURE__ */
|
|
280
|
-
style:
|
|
284
|
+
children: /* @__PURE__ */ b("p", {
|
|
285
|
+
style: S.description,
|
|
281
286
|
children: "Export your dashboard configuration to a JSON file."
|
|
282
287
|
})
|
|
283
288
|
})]
|
|
284
289
|
})]
|
|
285
290
|
}),
|
|
286
|
-
/* @__PURE__ */
|
|
287
|
-
style:
|
|
288
|
-
children: /* @__PURE__ */
|
|
289
|
-
|
|
291
|
+
/* @__PURE__ */ b("div", {
|
|
292
|
+
style: S.content,
|
|
293
|
+
children: /* @__PURE__ */ x(n, { children: [
|
|
294
|
+
T && /* @__PURE__ */ b(t, {
|
|
290
295
|
headingLevel: 3,
|
|
291
296
|
emphasis: "muted",
|
|
292
297
|
padding: "compact",
|
|
293
298
|
title: "Exporting",
|
|
294
|
-
description:
|
|
299
|
+
description: T,
|
|
295
300
|
"data-testid": "export-target"
|
|
296
301
|
}),
|
|
297
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ x(t, {
|
|
298
303
|
headingLevel: 3,
|
|
299
304
|
title: "Export options",
|
|
300
305
|
description: "What to include in the JSON file.",
|
|
301
306
|
"data-testid": "export-options",
|
|
302
307
|
bodyClassName: "flex flex-col gap-form-gap",
|
|
303
308
|
children: [
|
|
304
|
-
/* @__PURE__ */
|
|
305
|
-
checked:
|
|
306
|
-
onChange:
|
|
307
|
-
disabled:
|
|
308
|
-
label: "Include Data Source References",
|
|
309
|
-
description: "
|
|
309
|
+
/* @__PURE__ */ b(C, {
|
|
310
|
+
checked: O,
|
|
311
|
+
onChange: k,
|
|
312
|
+
disabled: V,
|
|
313
|
+
label: I("bigconsole.dashboards.export.options.dataSources.label", "Include Data Source References"),
|
|
314
|
+
description: I("bigconsole.dashboards.export.options.dataSources.description", "Writes data sink and parser bindings as stable keys, so an import into another workspace can reconnect them. When off, the file contains no data source or workspace identifiers.")
|
|
310
315
|
}),
|
|
311
|
-
/* @__PURE__ */
|
|
312
|
-
checked:
|
|
313
|
-
onChange:
|
|
316
|
+
/* @__PURE__ */ b(C, {
|
|
317
|
+
checked: A,
|
|
318
|
+
onChange: j,
|
|
314
319
|
disabled: !0,
|
|
315
|
-
label: "Include Webhook Mappings",
|
|
316
|
-
description: "
|
|
320
|
+
label: I("bigconsole.dashboards.export.options.webhooks.label", "Include Webhook Mappings"),
|
|
321
|
+
description: I("bigconsole.dashboards.export.options.webhooks.unavailable", "Unavailable here: webhook mappings contain destination URLs and payload templates, so exporting them requires an export consent grant, which this dialog does not request.")
|
|
317
322
|
}),
|
|
318
|
-
/* @__PURE__ */
|
|
319
|
-
checked:
|
|
320
|
-
onChange:
|
|
321
|
-
disabled:
|
|
323
|
+
/* @__PURE__ */ b(C, {
|
|
324
|
+
checked: M,
|
|
325
|
+
onChange: N,
|
|
326
|
+
disabled: V,
|
|
327
|
+
label: I("bigconsole.dashboards.export.options.exportedAt.label", "Include Export Timestamp"),
|
|
328
|
+
description: I("bigconsole.dashboards.export.options.exportedAt.description", "Records when the file was exported. Turn off for diff-stable files: exporting an unchanged dashboard then produces an identical file.")
|
|
329
|
+
}),
|
|
330
|
+
/* @__PURE__ */ b(C, {
|
|
331
|
+
checked: P,
|
|
332
|
+
onChange: F,
|
|
333
|
+
disabled: V,
|
|
322
334
|
label: "Format JSON (Pretty Print)",
|
|
323
335
|
description: "Makes the export file human-readable (larger file size)"
|
|
324
336
|
})
|
|
325
337
|
]
|
|
326
338
|
}),
|
|
327
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ x(t, {
|
|
328
340
|
headingLevel: 3,
|
|
329
341
|
title: "Preview",
|
|
330
342
|
description: "The exact JSON the download writes. Credentials are never serialized — only data source references.",
|
|
331
343
|
"data-testid": "export-preview",
|
|
332
|
-
actions:
|
|
344
|
+
actions: Z ? /* @__PURE__ */ x("button", {
|
|
333
345
|
type: "button",
|
|
334
|
-
style:
|
|
335
|
-
onClick:
|
|
336
|
-
children: [
|
|
346
|
+
style: S.previewAction,
|
|
347
|
+
onClick: $,
|
|
348
|
+
children: [b(Q ? l : u, {
|
|
337
349
|
style: {
|
|
338
350
|
width: "14px",
|
|
339
351
|
height: "14px"
|
|
340
352
|
},
|
|
341
353
|
"aria-hidden": "true"
|
|
342
|
-
}),
|
|
354
|
+
}), Q ? "Copied" : "Copy"]
|
|
343
355
|
}) : void 0,
|
|
344
356
|
children: [
|
|
345
|
-
|
|
357
|
+
q && !Z && /* @__PURE__ */ x("div", {
|
|
346
358
|
style: {
|
|
347
359
|
display: "flex",
|
|
348
360
|
alignItems: "center",
|
|
349
361
|
gap: "8px",
|
|
350
362
|
color: "var(--color-text-secondary)"
|
|
351
363
|
},
|
|
352
|
-
children: [/* @__PURE__ */
|
|
364
|
+
children: [/* @__PURE__ */ b(_, { style: {
|
|
353
365
|
width: "16px",
|
|
354
366
|
height: "16px"
|
|
355
|
-
} }), /* @__PURE__ */
|
|
367
|
+
} }), /* @__PURE__ */ b("span", {
|
|
356
368
|
style: { fontSize: "13px" },
|
|
357
369
|
children: "Building the export…"
|
|
358
370
|
})]
|
|
359
371
|
}),
|
|
360
|
-
!
|
|
372
|
+
!q && J && /* @__PURE__ */ x("p", {
|
|
361
373
|
style: {
|
|
362
374
|
margin: 0,
|
|
363
375
|
fontSize: "13px",
|
|
364
376
|
color: "var(--color-status-error-text)"
|
|
365
377
|
},
|
|
366
|
-
children: ["Preview unavailable: ",
|
|
378
|
+
children: ["Preview unavailable: ", J.message]
|
|
367
379
|
}),
|
|
368
|
-
|
|
369
|
-
style:
|
|
380
|
+
Z && /* @__PURE__ */ b("pre", {
|
|
381
|
+
style: S.previewBlock,
|
|
370
382
|
"data-testid": "export-preview-json",
|
|
371
|
-
children:
|
|
383
|
+
children: Z
|
|
372
384
|
})
|
|
373
385
|
]
|
|
374
386
|
}),
|
|
375
|
-
|
|
387
|
+
H && /* @__PURE__ */ b(t, {
|
|
376
388
|
headingLevel: 3,
|
|
377
389
|
tone: "danger",
|
|
378
390
|
padding: "compact",
|
|
379
391
|
title: "Export failed",
|
|
380
|
-
description:
|
|
392
|
+
description: H.message,
|
|
381
393
|
"data-testid": "export-error"
|
|
382
394
|
})
|
|
383
395
|
] })
|
|
384
396
|
}),
|
|
385
|
-
/* @__PURE__ */
|
|
386
|
-
style:
|
|
387
|
-
children: [/* @__PURE__ */
|
|
388
|
-
style:
|
|
389
|
-
onClick:
|
|
390
|
-
disabled:
|
|
397
|
+
/* @__PURE__ */ x("div", {
|
|
398
|
+
style: S.footer,
|
|
399
|
+
children: [/* @__PURE__ */ b("button", {
|
|
400
|
+
style: S.cancelButton,
|
|
401
|
+
onClick: E,
|
|
402
|
+
disabled: V,
|
|
391
403
|
onMouseEnter: (e) => {
|
|
392
404
|
e.currentTarget.style.backgroundColor = "var(--color-bg-muted)";
|
|
393
405
|
},
|
|
@@ -395,23 +407,23 @@ var x = {
|
|
|
395
407
|
e.currentTarget.style.backgroundColor = "var(--color-bg-surface)";
|
|
396
408
|
},
|
|
397
409
|
children: "Cancel"
|
|
398
|
-
}), /* @__PURE__ */
|
|
410
|
+
}), /* @__PURE__ */ b("button", {
|
|
399
411
|
style: {
|
|
400
|
-
...
|
|
401
|
-
...
|
|
412
|
+
...S.exportButton,
|
|
413
|
+
...V || q || !Z ? S.exportButtonDisabled : {}
|
|
402
414
|
},
|
|
403
|
-
onClick:
|
|
404
|
-
disabled:
|
|
415
|
+
onClick: ee,
|
|
416
|
+
disabled: V || q || !Z,
|
|
405
417
|
onMouseEnter: (e) => {
|
|
406
|
-
|
|
418
|
+
V || (e.currentTarget.style.opacity = "0.9");
|
|
407
419
|
},
|
|
408
420
|
onMouseLeave: (e) => {
|
|
409
|
-
|
|
421
|
+
V || (e.currentTarget.style.opacity = "1");
|
|
410
422
|
},
|
|
411
|
-
children:
|
|
423
|
+
children: V ? /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(_, { style: {
|
|
412
424
|
width: "16px",
|
|
413
425
|
height: "16px"
|
|
414
|
-
} }), "Exporting..."] }) : /* @__PURE__ */
|
|
426
|
+
} }), "Exporting..."] }) : /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(d, { style: {
|
|
415
427
|
width: "16px",
|
|
416
428
|
height: "16px"
|
|
417
429
|
} }), "Download Export"] })
|
|
@@ -421,4 +433,4 @@ var x = {
|
|
|
421
433
|
})
|
|
422
434
|
}) : null;
|
|
423
435
|
});
|
|
424
|
-
export {
|
|
436
|
+
export { w as ExportDashboardDialog, w as default };
|
|
@@ -18,6 +18,8 @@ interface ParserCardProps {
|
|
|
18
18
|
isDeleting?: boolean;
|
|
19
19
|
/** Card grid tile (default) or compact single-row presentation for the list view */
|
|
20
20
|
layout?: 'grid' | 'list';
|
|
21
|
+
/** Show where the parser can be used (Global or its dashboard) — for lists that mix scopes */
|
|
22
|
+
showScope?: boolean;
|
|
21
23
|
}
|
|
22
24
|
/**
|
|
23
25
|
* Trim an expression down to the first `maxLines` lines for the card preview.
|
|
@@ -28,5 +30,5 @@ export declare function previewExpression(expression: string | null | undefined,
|
|
|
28
30
|
lines: string[];
|
|
29
31
|
truncated: boolean;
|
|
30
32
|
};
|
|
31
|
-
export declare const ParserCard: import('react').MemoExoticComponent<({ parser, onView, onEdit, onTest, onExecute, onExport, onDelete, isDeleting, layout, }: ParserCardProps) => import('react').JSX.Element>;
|
|
33
|
+
export declare const ParserCard: import('react').MemoExoticComponent<({ parser, onView, onEdit, onTest, onExecute, onExport, onDelete, isDeleting, layout, showScope, }: ParserCardProps) => import('react').JSX.Element>;
|
|
32
34
|
export default ParserCard;
|