@burdenoff/microfe-bigconsole 2026.1123.7 → 2026.1124.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/asof/AsOfControl.js +2 -2
- package/dist/bigconsole/components/dashboard/DashboardCommentsDrawer.js +107 -106
- package/dist/bigconsole/components/dashboard/DashboardGalleryCard.d.ts +34 -0
- package/dist/bigconsole/components/dashboard/DashboardGalleryCard.js +123 -0
- package/dist/bigconsole/components/dashboard/DashboardReviewDialog.js +1 -1
- package/dist/bigconsole/components/dashboard/DashboardStatusPill.js +19 -35
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +119 -116
- package/dist/bigconsole/components/dashboard/LiveCanvasToggle.js +1 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.d.ts +0 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +172 -170
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +210 -208
- package/dist/bigconsole/components/dashboard/TemplateInstallOptions.js +97 -97
- package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -0
- package/dist/bigconsole/components/datasink/AlertExecutionHistory.js +92 -92
- package/dist/bigconsole/components/datasink/AlertRuleEditor.js +149 -149
- package/dist/bigconsole/components/datasink/AnomalyDetectorPanel.js +54 -54
- package/dist/bigconsole/components/datasink/DataSinkStatusBadge.js +30 -37
- package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +4 -4
- package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +130 -129
- package/dist/bigconsole/components/datasink/SetupStateBadge.js +24 -33
- package/dist/bigconsole/components/datasink/SinkWorkflowLinkForm.js +38 -38
- package/dist/bigconsole/components/explore/CreateQueryWidget.js +57 -56
- package/dist/bigconsole/components/explore/SqlDraftEditor.js +140 -140
- package/dist/bigconsole/components/explore/VisualBuilder.js +85 -84
- package/dist/bigconsole/components/explore/queryAccess/GrantsPanel.js +168 -167
- package/dist/bigconsole/components/explore/queryAccess/QueryAccessAdmin.js +2 -2
- package/dist/bigconsole/components/explore/queryAccess/RelationEditor.js +118 -117
- package/dist/bigconsole/components/insights/BoardLintPanel.js +2 -2
- package/dist/bigconsole/components/insights/OutlierSpottingDialog.js +123 -123
- package/dist/bigconsole/components/kpi-change/KpiChangePanel.js +2 -2
- package/dist/bigconsole/components/narrative/NarrativePanel.js +1 -1
- package/dist/bigconsole/components/overview/DataHealthCard.js +3 -0
- package/dist/bigconsole/components/overview/RecentDashboardsPanel.js +3 -0
- package/dist/bigconsole/components/parser/ParserStatusBadge.js +25 -28
- package/dist/bigconsole/components/pipeline/PipelineScopePicker.js +23 -22
- package/dist/bigconsole/components/pipeline/PipelineStatusBadge.js +15 -26
- package/dist/bigconsole/components/reconcile/KpiReconcileDialog.js +24 -24
- package/dist/bigconsole/components/settings/WidgetCatalogSection.js +1 -1
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +188 -187
- package/dist/bigconsole/components/widgets/FilterNotAppliedNotice.js +1 -1
- package/dist/bigconsole/components/widgets/UnsupportedDataSourceNotice.js +1 -1
- package/dist/bigconsole/components/widgets/WidgetCompareView.js +3 -1
- package/dist/bigconsole/components/widgets/WidgetHeader.js +1 -1
- package/dist/bigconsole/components/widgets/advanced/AdvancedWidgetConfig.js +45 -44
- package/dist/bigconsole/components/widgets/chart/ChartConfig.js +151 -147
- package/dist/bigconsole/components/widgets/chart/ReferenceLinesEditor.js +48 -47
- package/dist/bigconsole/components/widgets/comments/WidgetComments.js +1 -1
- package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +139 -138
- package/dist/bigconsole/components/widgets/form/FormWidget.js +149 -148
- package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +80 -77
- package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +58 -56
- package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +75 -73
- package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +86 -85
- package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +80 -77
- package/dist/bigconsole/components/widgets/retention/RetentionView.js +1 -1
- package/dist/bigconsole/components/widgets/table/TableConfig.js +214 -211
- package/dist/bigconsole/components/widgets/table/TablePagination.js +59 -58
- package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +140 -138
- package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js +74 -66
- package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js +48 -48
- package/dist/bigconsole/components/workflow/WorkflowStatusBadge.js +28 -37
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +69 -69
- package/dist/bigconsole/hooks/useDashboardListQuery.d.ts +22 -0
- package/dist/bigconsole/hooks/useDashboardListQuery.js +39 -0
- package/dist/bigconsole/pages/AdminPage.js +147 -146
- package/dist/bigconsole/pages/DashboardViewPage.js +2 -0
- package/dist/bigconsole/pages/DashboardsPage.js +638 -855
- package/dist/bigconsole/pages/DataParsersPage.js +5 -0
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +4 -1
- package/dist/bigconsole/pages/DataSinkViewPage.js +263 -261
- package/dist/bigconsole/pages/DataSinksPage.js +210 -186
- package/dist/bigconsole/pages/InsightsPage.js +386 -383
- package/dist/bigconsole/pages/ParserBuilderPage.js +413 -413
- package/dist/bigconsole/pages/ParserViewPage.js +2 -0
- package/dist/bigconsole/pages/PipelineBuilderPage.js +279 -276
- package/dist/bigconsole/pages/PipelineViewPage.js +3 -0
- package/dist/bigconsole/pages/PipelinesPage.js +198 -165
- package/dist/bigconsole/pages/SettingsPage.js +160 -160
- package/dist/bigconsole/pages/WidgetDemoPage.js +2 -0
- package/dist/bigconsole/pages/WorkflowViewPage.js +5 -0
- package/dist/bigconsole/pages/WorkflowsPage.js +144 -123
- package/dist/bigconsole/providers/BigConsoleQuotaProvider.js +1 -1
- package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +123 -122
- package/dist/bigconsole/utils/dashboardGallery.d.ts +84 -0
- package/dist/bigconsole/utils/dashboardGallery.js +93 -0
- package/dist/bigconsole/utils/statusTone.d.ts +17 -0
- package/dist/bigconsole/utils/statusTone.js +44 -0
- package/package.json +4 -4
|
@@ -4,7 +4,27 @@ import { usePermissions as s } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
|
4
4
|
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
5
5
|
import { createPortal as d } from "react-dom";
|
|
6
6
|
// src/bigconsole/components/widgets/widget-actions/WidgetActions.tsx
|
|
7
|
-
|
|
7
|
+
var f = {
|
|
8
|
+
DANGER: "bg-[var(--color-action-danger-bg)] text-[var(--color-action-danger-text)] hover:bg-[var(--color-action-danger-bgHover)]",
|
|
9
|
+
SUCCESS: "border border-[var(--color-status-success-border)] bg-[var(--color-status-success-bgSubtle)] text-[var(--color-status-success-text)] hover:border-[var(--color-status-success-bg)]",
|
|
10
|
+
WARNING: "border border-[var(--color-status-warning-border)] bg-[var(--color-status-warning-bgSubtle)] text-[var(--color-status-warning-text)] hover:border-[var(--color-status-warning-bg)]"
|
|
11
|
+
}, p = {
|
|
12
|
+
DANGER: {
|
|
13
|
+
backgroundColor: "var(--color-action-danger-bg)",
|
|
14
|
+
color: "var(--color-action-danger-text)"
|
|
15
|
+
},
|
|
16
|
+
SUCCESS: {
|
|
17
|
+
backgroundColor: "var(--color-status-success-bgSubtle)",
|
|
18
|
+
color: "var(--color-status-success-text)",
|
|
19
|
+
border: "1px solid var(--color-status-success-border)"
|
|
20
|
+
},
|
|
21
|
+
WARNING: {
|
|
22
|
+
backgroundColor: "var(--color-status-warning-bgSubtle)",
|
|
23
|
+
color: "var(--color-status-warning-text)",
|
|
24
|
+
border: "1px solid var(--color-status-warning-border)"
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
function m(e, t, n) {
|
|
8
28
|
let r = {
|
|
9
29
|
sm: "px-2.5 py-1.5 text-xs",
|
|
10
30
|
md: "px-4 py-2 text-sm",
|
|
@@ -12,13 +32,13 @@ function f(e, t, n) {
|
|
|
12
32
|
}, i = {
|
|
13
33
|
PRIMARY: "bg-action-primary text-white hover:bg-action-primary/90 focus:ring-action-primary/50 transition-colors",
|
|
14
34
|
SECONDARY: "bg-bg-sunken text-primary hover:bg-bg-sunken/80 focus:ring-muted transition-colors",
|
|
15
|
-
DANGER:
|
|
16
|
-
SUCCESS:
|
|
17
|
-
WARNING:
|
|
35
|
+
DANGER: `${f.DANGER} focus:ring-status-error-border/50 transition-colors`,
|
|
36
|
+
SUCCESS: `${f.SUCCESS} focus:ring-status-success-border/50 transition-colors`,
|
|
37
|
+
WARNING: `${f.WARNING} focus:ring-status-warning-border/50 transition-colors`
|
|
18
38
|
}, a = n ? "opacity-50 cursor-not-allowed" : "cursor-pointer", o = i[e || "SECONDARY"] || i.SECONDARY;
|
|
19
39
|
return `inline-flex items-center justify-center font-medium rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 ${r[t]} ${o} ${a}`;
|
|
20
40
|
}
|
|
21
|
-
function
|
|
41
|
+
function h(e) {
|
|
22
42
|
let t = {
|
|
23
43
|
PRIMARY: {
|
|
24
44
|
backgroundColor: "var(--color-action-primary-bg)",
|
|
@@ -28,32 +48,23 @@ function p(e) {
|
|
|
28
48
|
backgroundColor: "var(--color-bg-muted)",
|
|
29
49
|
color: "var(--color-text-primary)"
|
|
30
50
|
},
|
|
31
|
-
DANGER:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
},
|
|
35
|
-
SUCCESS: {
|
|
36
|
-
backgroundColor: "var(--color-status-success-bg)",
|
|
37
|
-
color: "var(--color-action-primary-text)"
|
|
38
|
-
},
|
|
39
|
-
WARNING: {
|
|
40
|
-
backgroundColor: "var(--color-status-warning-bg)",
|
|
41
|
-
color: "var(--color-action-primary-text)"
|
|
42
|
-
}
|
|
51
|
+
DANGER: p.DANGER,
|
|
52
|
+
SUCCESS: p.SUCCESS,
|
|
53
|
+
WARNING: p.WARNING
|
|
43
54
|
};
|
|
44
55
|
return t[e || "SECONDARY"] || t.SECONDARY;
|
|
45
56
|
}
|
|
46
|
-
function
|
|
57
|
+
function g(e) {
|
|
47
58
|
let t = {
|
|
48
59
|
PRIMARY: "bg-action-primary text-white hover:bg-action-primary/90",
|
|
49
60
|
SECONDARY: "bg-secondary text-white hover:bg-secondary/90",
|
|
50
|
-
DANGER:
|
|
51
|
-
SUCCESS:
|
|
52
|
-
WARNING:
|
|
61
|
+
DANGER: f.DANGER,
|
|
62
|
+
SUCCESS: f.SUCCESS,
|
|
63
|
+
WARNING: f.WARNING
|
|
53
64
|
};
|
|
54
65
|
return `px-4 py-2 text-sm font-medium rounded-md transition-colors ${t[e || "PRIMARY"] || t.PRIMARY}`;
|
|
55
66
|
}
|
|
56
|
-
function
|
|
67
|
+
function _(e) {
|
|
57
68
|
let t = {
|
|
58
69
|
PRIMARY: {
|
|
59
70
|
backgroundColor: "var(--color-action-primary-bg)",
|
|
@@ -70,22 +81,19 @@ function h(e) {
|
|
|
70
81
|
fontWeight: 500
|
|
71
82
|
},
|
|
72
83
|
DANGER: {
|
|
73
|
-
|
|
74
|
-
color: "var(--color-action-primary-text)",
|
|
84
|
+
...p.DANGER,
|
|
75
85
|
padding: "8px 16px",
|
|
76
86
|
borderRadius: "6px",
|
|
77
87
|
fontWeight: 500
|
|
78
88
|
},
|
|
79
89
|
SUCCESS: {
|
|
80
|
-
|
|
81
|
-
color: "var(--color-action-primary-text)",
|
|
90
|
+
...p.SUCCESS,
|
|
82
91
|
padding: "8px 16px",
|
|
83
92
|
borderRadius: "6px",
|
|
84
93
|
fontWeight: 500
|
|
85
94
|
},
|
|
86
95
|
WARNING: {
|
|
87
|
-
|
|
88
|
-
color: "var(--color-action-primary-text)",
|
|
96
|
+
...p.WARNING,
|
|
89
97
|
padding: "8px 16px",
|
|
90
98
|
borderRadius: "6px",
|
|
91
99
|
fontWeight: 500
|
|
@@ -93,7 +101,7 @@ function h(e) {
|
|
|
93
101
|
};
|
|
94
102
|
return t[e || "PRIMARY"] || t.PRIMARY;
|
|
95
103
|
}
|
|
96
|
-
var
|
|
104
|
+
var v = t(function({ name: e, className: t = "w-4 h-4" }) {
|
|
97
105
|
return {
|
|
98
106
|
"external-link": /* @__PURE__ */ l("svg", {
|
|
99
107
|
className: t,
|
|
@@ -228,7 +236,7 @@ var g = t(function({ name: e, className: t = "w-4 h-4" }) {
|
|
|
228
236
|
})
|
|
229
237
|
})
|
|
230
238
|
}[e] || null;
|
|
231
|
-
}),
|
|
239
|
+
}), y = t(function({ title: e, message: t, confirmLabel: n, cancelLabel: r, style: i, onConfirm: a, onCancel: o }) {
|
|
232
240
|
return /* @__PURE__ */ u("div", {
|
|
233
241
|
className: "fixed inset-0 z-50 flex items-center justify-center",
|
|
234
242
|
style: {
|
|
@@ -316,16 +324,16 @@ var g = t(function({ name: e, className: t = "w-4 h-4" }) {
|
|
|
316
324
|
}), /* @__PURE__ */ l("button", {
|
|
317
325
|
type: "button",
|
|
318
326
|
onClick: a,
|
|
319
|
-
className:
|
|
320
|
-
style:
|
|
327
|
+
className: g(i),
|
|
328
|
+
style: _(i),
|
|
321
329
|
children: n
|
|
322
330
|
})]
|
|
323
331
|
})
|
|
324
332
|
]
|
|
325
333
|
})]
|
|
326
334
|
});
|
|
327
|
-
}),
|
|
328
|
-
let [
|
|
335
|
+
}), b = t(function({ actions: e, context: t, onAction: i, disabled: s, size: f }) {
|
|
336
|
+
let [p, h] = o(!1), g = a(null), [_, y] = o({
|
|
329
337
|
top: 0,
|
|
330
338
|
left: 0
|
|
331
339
|
}), b = n(() => {
|
|
@@ -336,31 +344,31 @@ var g = t(function({ name: e, className: t = "w-4 h-4" }) {
|
|
|
336
344
|
h(!1);
|
|
337
345
|
}, []);
|
|
338
346
|
return r(() => {
|
|
339
|
-
if (
|
|
340
|
-
let e =
|
|
347
|
+
if (p && g.current) {
|
|
348
|
+
let e = g.current.getBoundingClientRect();
|
|
341
349
|
y({
|
|
342
350
|
top: e.bottom + 4,
|
|
343
351
|
left: e.right - 192
|
|
344
352
|
});
|
|
345
353
|
}
|
|
346
|
-
}, [
|
|
354
|
+
}, [p]), e.length === 0 ? null : /* @__PURE__ */ u("div", {
|
|
347
355
|
className: "relative",
|
|
348
356
|
children: [/* @__PURE__ */ l("button", {
|
|
349
|
-
ref:
|
|
357
|
+
ref: g,
|
|
350
358
|
type: "button",
|
|
351
359
|
onClick: b,
|
|
352
360
|
disabled: s,
|
|
353
|
-
className:
|
|
361
|
+
className: m("SECONDARY", f, s ?? !1),
|
|
354
362
|
"aria-label": "More actions",
|
|
355
|
-
children: /* @__PURE__ */ l(
|
|
356
|
-
}),
|
|
363
|
+
children: /* @__PURE__ */ l(v, { name: "more-horizontal" })
|
|
364
|
+
}), p && d(/* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("div", {
|
|
357
365
|
className: "fixed inset-0 z-[9998]",
|
|
358
366
|
onClick: S
|
|
359
367
|
}), /* @__PURE__ */ l("div", {
|
|
360
368
|
className: "fixed z-[9999] w-48 max-w-[calc(100vw-1rem)] rounded-card",
|
|
361
369
|
style: {
|
|
362
|
-
top:
|
|
363
|
-
left: Math.max(8,
|
|
370
|
+
top: _.top,
|
|
371
|
+
left: Math.max(8, _.left),
|
|
364
372
|
backgroundColor: "var(--color-bg-surface)",
|
|
365
373
|
border: "1px solid var(--color-border-subtle)",
|
|
366
374
|
borderRadius: "var(--radius-card)",
|
|
@@ -373,7 +381,7 @@ var g = t(function({ name: e, className: t = "w-4 h-4" }) {
|
|
|
373
381
|
onClick: () => x(e),
|
|
374
382
|
disabled: e.disabled,
|
|
375
383
|
className: "flex min-h-control-md w-full items-center gap-2 px-4 text-left text-sm text-text-secondary hover:bg-bg-sunken hover:text-text-primary disabled:cursor-not-allowed disabled:opacity-50 motion-safe:transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",
|
|
376
|
-
children: [e.icon && /* @__PURE__ */ l(
|
|
384
|
+
children: [e.icon && /* @__PURE__ */ l(v, {
|
|
377
385
|
name: e.icon,
|
|
378
386
|
className: "w-4 h-4"
|
|
379
387
|
}), e.label]
|
|
@@ -381,28 +389,28 @@ var g = t(function({ name: e, className: t = "w-4 h-4" }) {
|
|
|
381
389
|
})
|
|
382
390
|
})] }), document.body)]
|
|
383
391
|
});
|
|
384
|
-
}),
|
|
392
|
+
}), x = t(function({ action: e, context: t, onAction: r, disabled: i, size: a, showLabel: o = !0 }) {
|
|
385
393
|
let s = i || e.disabled, c = n(() => {
|
|
386
394
|
s || r(e);
|
|
387
395
|
}, [
|
|
388
396
|
e,
|
|
389
397
|
s,
|
|
390
398
|
r
|
|
391
|
-
]), d =
|
|
399
|
+
]), d = m(e.style, a, s), f = h(e.style);
|
|
392
400
|
return e.type === "LINK" && e.metadata?.url ? /* @__PURE__ */ u("a", {
|
|
393
401
|
href: e.metadata.url,
|
|
394
402
|
target: e.metadata.target || "_blank",
|
|
395
403
|
rel: "noopener noreferrer",
|
|
396
404
|
className: d,
|
|
397
|
-
style:
|
|
405
|
+
style: f,
|
|
398
406
|
"aria-disabled": s,
|
|
399
407
|
children: [
|
|
400
|
-
e.icon && /* @__PURE__ */ l(
|
|
408
|
+
e.icon && /* @__PURE__ */ l(v, {
|
|
401
409
|
name: e.icon,
|
|
402
410
|
className: "w-4 h-4 mr-1.5"
|
|
403
411
|
}),
|
|
404
412
|
o && e.label,
|
|
405
|
-
!e.icon && /* @__PURE__ */ l(
|
|
413
|
+
!e.icon && /* @__PURE__ */ l(v, {
|
|
406
414
|
name: "external-link",
|
|
407
415
|
className: "w-4 h-4 ml-1.5"
|
|
408
416
|
})
|
|
@@ -412,14 +420,14 @@ var g = t(function({ name: e, className: t = "w-4 h-4" }) {
|
|
|
412
420
|
onClick: c,
|
|
413
421
|
disabled: s,
|
|
414
422
|
className: d,
|
|
415
|
-
style:
|
|
416
|
-
children: [e.icon && /* @__PURE__ */ l(
|
|
423
|
+
style: f,
|
|
424
|
+
children: [e.icon && /* @__PURE__ */ l(v, {
|
|
417
425
|
name: e.icon,
|
|
418
426
|
className: "w-4 h-4 mr-1.5"
|
|
419
427
|
}), o && e.label]
|
|
420
428
|
});
|
|
421
|
-
}),
|
|
422
|
-
let [
|
|
429
|
+
}), S = t(function({ actions: t, context: r, onAction: a, disabled: d = !1, layout: f = "horizontal", size: p = "md", showLabels: m = !0, maxVisible: h = 3, className: g = "" }) {
|
|
430
|
+
let [_, v] = o(null), [S, C] = o(!1), { hasPermission: w } = s(), T = w(e.WIDGET_ACTION_EXECUTE), E = i(() => t.filter((e) => !e.hidden).sort((e, t) => e.order - t.order), [t]), { mainActions: D, overflowActions: O } = i(() => E.length <= h ? {
|
|
423
431
|
mainActions: E,
|
|
424
432
|
overflowActions: []
|
|
425
433
|
} : {
|
|
@@ -435,36 +443,36 @@ var g = t(function({ name: e, className: t = "w-4 h-4" }) {
|
|
|
435
443
|
}
|
|
436
444
|
}
|
|
437
445
|
}, [a, r]), A = n((e) => {
|
|
438
|
-
e.confirmation ?
|
|
446
|
+
e.confirmation ? v(e) : k(e);
|
|
439
447
|
}, [k]), j = n(() => {
|
|
440
|
-
|
|
441
|
-
}, [
|
|
442
|
-
|
|
448
|
+
_ && (k(_), v(null));
|
|
449
|
+
}, [_, k]), M = n(() => {
|
|
450
|
+
v(null);
|
|
443
451
|
}, []);
|
|
444
452
|
return E.length === 0 ? null : /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ u("div", {
|
|
445
453
|
className: `${f === "horizontal" ? "flex flex-row flex-wrap gap-2" : "flex flex-col gap-2"} ${g}`,
|
|
446
|
-
children: [D.map((e) => /* @__PURE__ */ l(
|
|
454
|
+
children: [D.map((e) => /* @__PURE__ */ l(x, {
|
|
447
455
|
action: e,
|
|
448
456
|
context: r,
|
|
449
457
|
onAction: A,
|
|
450
458
|
disabled: d || S || !T && e.type !== "LINK",
|
|
451
459
|
size: p,
|
|
452
460
|
showLabel: m
|
|
453
|
-
}, e.id)), O.length > 0 && /* @__PURE__ */ l(
|
|
461
|
+
}, e.id)), O.length > 0 && /* @__PURE__ */ l(b, {
|
|
454
462
|
actions: O,
|
|
455
463
|
context: r,
|
|
456
464
|
onAction: A,
|
|
457
465
|
disabled: d || S || !T,
|
|
458
466
|
size: p
|
|
459
467
|
})]
|
|
460
|
-
}),
|
|
461
|
-
title:
|
|
462
|
-
message:
|
|
463
|
-
confirmLabel:
|
|
464
|
-
cancelLabel:
|
|
465
|
-
style:
|
|
468
|
+
}), _?.confirmation && /* @__PURE__ */ l(y, {
|
|
469
|
+
title: _.confirmation.title || "Confirm Action",
|
|
470
|
+
message: _.confirmation.message || "Are you sure you want to proceed?",
|
|
471
|
+
confirmLabel: _.confirmation.confirmLabel || "OK",
|
|
472
|
+
cancelLabel: _.confirmation.cancelLabel || "Cancel",
|
|
473
|
+
style: _.style,
|
|
466
474
|
onConfirm: j,
|
|
467
475
|
onCancel: M
|
|
468
476
|
})] });
|
|
469
477
|
});
|
|
470
|
-
export {
|
|
478
|
+
export { S as WidgetActions, S as default };
|
|
@@ -3,96 +3,96 @@ import { SECTION_FOCUS_RING as t } from "../common/sectionStyles.js";
|
|
|
3
3
|
import n from "../../hooks/useWorkflowOperations.js";
|
|
4
4
|
import "../common/index.js";
|
|
5
5
|
import { useState as r } from "react";
|
|
6
|
-
import { Button as i } from "@burdenoff/fe-libs/ui";
|
|
7
|
-
import { useI18n as
|
|
8
|
-
import { jsx as
|
|
6
|
+
import { Button as i, ThemedSelect as a } from "@burdenoff/fe-libs/ui";
|
|
7
|
+
import { useI18n as o } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
8
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
9
9
|
// src/bigconsole/components/workflow/WorkflowSinkLinkForm.tsx
|
|
10
|
-
function
|
|
11
|
-
let { t:
|
|
12
|
-
if (e.preventDefault(), !
|
|
10
|
+
function l({ workflowId: l, linkedSinkIds: u, onLinked: d }) {
|
|
11
|
+
let { t: f } = o(), { dataSinks: p, loading: m, error: h } = e(), { linkDataSink: g } = n({ skipFetch: !0 }), [_, v] = r(""), [y, b] = r(0), [x, S] = r(""), [C, w] = r(!1), [T, E] = r(null), D = p.filter((e) => e.isActive && !u.includes(e.id)), O = async (e) => {
|
|
12
|
+
if (e.preventDefault(), !D.some((e) => e.key === _) || C) return;
|
|
13
13
|
let t;
|
|
14
|
-
if (
|
|
15
|
-
let e = JSON.parse(
|
|
14
|
+
if (x.trim()) try {
|
|
15
|
+
let e = JSON.parse(x);
|
|
16
16
|
if (!e || typeof e != "object" || Array.isArray(e)) throw Error("Expected a JSON object");
|
|
17
17
|
t = Object.fromEntries(Object.entries(e));
|
|
18
18
|
} catch {
|
|
19
|
-
|
|
19
|
+
E(f("bigconsole.workflows.links.mappingError", "Data mapping must be a JSON object."));
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
w(!0), E(null);
|
|
23
23
|
try {
|
|
24
|
-
if (!await
|
|
25
|
-
dataSinkKey:
|
|
26
|
-
priority:
|
|
24
|
+
if (!await g(l, {
|
|
25
|
+
dataSinkKey: _,
|
|
26
|
+
priority: y,
|
|
27
27
|
dataMapping: t
|
|
28
28
|
})) {
|
|
29
|
-
|
|
29
|
+
E(f("bigconsole.workflows.links.saveError", "The data sink could not be linked. Try again."));
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
|
-
await
|
|
32
|
+
await d();
|
|
33
33
|
} finally {
|
|
34
|
-
|
|
34
|
+
w(!1);
|
|
35
35
|
}
|
|
36
|
-
},
|
|
37
|
-
return /* @__PURE__ */
|
|
38
|
-
onSubmit:
|
|
36
|
+
}, k = `w-full min-w-0 rounded-input border border-[var(--color-border-subtle)] bg-bg-canvas px-3 py-2 text-sm text-text-primary ${t}`;
|
|
37
|
+
return /* @__PURE__ */ c("form", {
|
|
38
|
+
onSubmit: O,
|
|
39
39
|
className: "mb-form-gap flex min-w-0 flex-col gap-form-gap rounded-card border border-[var(--color-border-subtle)] bg-bg-sunken p-3",
|
|
40
40
|
children: [
|
|
41
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ c("label", {
|
|
42
42
|
className: "block text-sm font-medium text-text-primary",
|
|
43
|
-
children: [
|
|
44
|
-
value:
|
|
45
|
-
onChange: (e) =>
|
|
46
|
-
disabled:
|
|
43
|
+
children: [f("bigconsole.workflows.links.sinkLabel", "Data sink"), /* @__PURE__ */ c(a, {
|
|
44
|
+
value: _,
|
|
45
|
+
onChange: (e) => v(e.target.value),
|
|
46
|
+
disabled: m || C,
|
|
47
47
|
required: !0,
|
|
48
|
-
className:
|
|
49
|
-
children: [/* @__PURE__ */
|
|
48
|
+
className: k,
|
|
49
|
+
children: [/* @__PURE__ */ s("option", {
|
|
50
50
|
value: "",
|
|
51
|
-
children:
|
|
52
|
-
}),
|
|
51
|
+
children: f("bigconsole.workflows.links.selectSink", "Select a data sink")
|
|
52
|
+
}), D.map((e) => /* @__PURE__ */ s("option", {
|
|
53
53
|
value: e.key,
|
|
54
54
|
children: e.name || e.key
|
|
55
55
|
}, e.id))]
|
|
56
56
|
})]
|
|
57
57
|
}),
|
|
58
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ c("label", {
|
|
59
59
|
className: "block text-sm font-medium text-text-primary",
|
|
60
|
-
children: [
|
|
60
|
+
children: [f("bigconsole.workflows.links.priorityLabel", "Priority"), /* @__PURE__ */ s("input", {
|
|
61
61
|
type: "number",
|
|
62
62
|
min: 0,
|
|
63
63
|
step: 1,
|
|
64
|
-
value:
|
|
65
|
-
onChange: (e) =>
|
|
66
|
-
disabled:
|
|
67
|
-
className:
|
|
64
|
+
value: y,
|
|
65
|
+
onChange: (e) => b(Number(e.target.value)),
|
|
66
|
+
disabled: C,
|
|
67
|
+
className: k
|
|
68
68
|
})]
|
|
69
69
|
}),
|
|
70
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ c("label", {
|
|
71
71
|
className: "block text-sm font-medium text-text-primary",
|
|
72
|
-
children: [
|
|
73
|
-
value:
|
|
74
|
-
onChange: (e) =>
|
|
75
|
-
disabled:
|
|
72
|
+
children: [f("bigconsole.workflows.links.mappingLabel", "Data mapping (optional JSON)"), /* @__PURE__ */ s("textarea", {
|
|
73
|
+
value: x,
|
|
74
|
+
onChange: (e) => S(e.target.value),
|
|
75
|
+
disabled: C,
|
|
76
76
|
rows: 3,
|
|
77
|
-
className: `${
|
|
77
|
+
className: `${k} resize-y font-mono`
|
|
78
78
|
})]
|
|
79
79
|
}),
|
|
80
|
-
!
|
|
80
|
+
!m && !h && D.length === 0 && /* @__PURE__ */ s("p", {
|
|
81
81
|
className: "text-sm text-text-secondary",
|
|
82
|
-
children:
|
|
82
|
+
children: f("bigconsole.workflows.links.noAvailable", "No unlinked active data sinks are available in this workspace.")
|
|
83
83
|
}),
|
|
84
|
-
(
|
|
84
|
+
(h || T) && /* @__PURE__ */ s("p", {
|
|
85
85
|
role: "alert",
|
|
86
86
|
className: "text-sm text-status-error-text",
|
|
87
|
-
children:
|
|
87
|
+
children: T || f("bigconsole.workflows.links.loadError", "Data sinks could not be loaded. Close and reopen the form to retry.")
|
|
88
88
|
}),
|
|
89
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ s(i, {
|
|
90
90
|
type: "submit",
|
|
91
|
-
disabled: !
|
|
91
|
+
disabled: !_ || C || m,
|
|
92
92
|
className: "w-full sm:w-auto",
|
|
93
|
-
children:
|
|
93
|
+
children: C ? f("bigconsole.workflows.links.saving", "Linking…") : f("bigconsole.workflows.links.link", "Link sink")
|
|
94
94
|
})
|
|
95
95
|
]
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
|
-
export {
|
|
98
|
+
export { l as WorkflowSinkLinkForm };
|
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { WORKFLOW_STATUS_TONE as e, statusToneClasses as t } from "../../utils/statusTone.js";
|
|
2
|
+
import { memo as n } from "react";
|
|
3
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
3
4
|
// src/bigconsole/components/workflow/WorkflowStatusBadge.tsx
|
|
4
|
-
var
|
|
5
|
-
let
|
|
5
|
+
var a = n(function({ status: n, size: a = "md", showIcon: o = !0 }) {
|
|
6
|
+
let s = {
|
|
6
7
|
sm: "px-2 py-0.5 text-xs",
|
|
7
8
|
md: "px-2.5 py-1 text-xs sm:text-sm",
|
|
8
9
|
lg: "px-3 py-1.5 text-sm sm:text-base"
|
|
9
|
-
},
|
|
10
|
+
}, c = {
|
|
10
11
|
sm: "w-3 h-3",
|
|
11
12
|
md: "w-4 h-4",
|
|
12
13
|
lg: "w-5 h-5"
|
|
13
|
-
},
|
|
14
|
+
}, l = {
|
|
14
15
|
draft: {
|
|
15
|
-
surface: "border border-transparent bg-bg-sunken",
|
|
16
16
|
weight: "font-medium",
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
className: o[r],
|
|
17
|
+
icon: /* @__PURE__ */ r("svg", {
|
|
18
|
+
className: c[a],
|
|
20
19
|
fill: "none",
|
|
21
20
|
stroke: "currentColor",
|
|
22
21
|
viewBox: "0 0 24 24",
|
|
23
|
-
children: /* @__PURE__ */
|
|
22
|
+
children: /* @__PURE__ */ r("path", {
|
|
24
23
|
strokeLinecap: "round",
|
|
25
24
|
strokeLinejoin: "round",
|
|
26
25
|
strokeWidth: 2,
|
|
@@ -30,15 +29,13 @@ var r = e(function({ status: e, size: r = "md", showIcon: i = !0 }) {
|
|
|
30
29
|
label: "Draft"
|
|
31
30
|
},
|
|
32
31
|
active: {
|
|
33
|
-
surface: "border border-[var(--color-status-success-border)] bg-[var(--color-status-success-bgSubtle)]",
|
|
34
32
|
weight: "font-medium",
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
className: o[r],
|
|
33
|
+
icon: /* @__PURE__ */ r("svg", {
|
|
34
|
+
className: c[a],
|
|
38
35
|
fill: "none",
|
|
39
36
|
stroke: "currentColor",
|
|
40
37
|
viewBox: "0 0 24 24",
|
|
41
|
-
children: /* @__PURE__ */
|
|
38
|
+
children: /* @__PURE__ */ r("path", {
|
|
42
39
|
strokeLinecap: "round",
|
|
43
40
|
strokeLinejoin: "round",
|
|
44
41
|
strokeWidth: 2,
|
|
@@ -48,15 +45,13 @@ var r = e(function({ status: e, size: r = "md", showIcon: i = !0 }) {
|
|
|
48
45
|
label: "Active"
|
|
49
46
|
},
|
|
50
47
|
paused: {
|
|
51
|
-
surface: "border border-[var(--color-status-warning-border)] bg-[var(--color-status-warning-bgSubtle)]",
|
|
52
48
|
weight: "font-medium",
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
className: o[r],
|
|
49
|
+
icon: /* @__PURE__ */ r("svg", {
|
|
50
|
+
className: c[a],
|
|
56
51
|
fill: "none",
|
|
57
52
|
stroke: "currentColor",
|
|
58
53
|
viewBox: "0 0 24 24",
|
|
59
|
-
children: /* @__PURE__ */
|
|
54
|
+
children: /* @__PURE__ */ r("path", {
|
|
60
55
|
strokeLinecap: "round",
|
|
61
56
|
strokeLinejoin: "round",
|
|
62
57
|
strokeWidth: 2,
|
|
@@ -66,15 +61,13 @@ var r = e(function({ status: e, size: r = "md", showIcon: i = !0 }) {
|
|
|
66
61
|
label: "Paused"
|
|
67
62
|
},
|
|
68
63
|
error: {
|
|
69
|
-
surface: "border border-[var(--color-status-error-border)] bg-[var(--color-status-error-bgSubtle)]",
|
|
70
64
|
weight: "font-semibold",
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
className: o[r],
|
|
65
|
+
icon: /* @__PURE__ */ r("svg", {
|
|
66
|
+
className: c[a],
|
|
74
67
|
fill: "none",
|
|
75
68
|
stroke: "currentColor",
|
|
76
69
|
viewBox: "0 0 24 24",
|
|
77
|
-
children: /* @__PURE__ */
|
|
70
|
+
children: /* @__PURE__ */ r("path", {
|
|
78
71
|
strokeLinecap: "round",
|
|
79
72
|
strokeLinejoin: "round",
|
|
80
73
|
strokeWidth: 2,
|
|
@@ -84,15 +77,13 @@ var r = e(function({ status: e, size: r = "md", showIcon: i = !0 }) {
|
|
|
84
77
|
label: "Error"
|
|
85
78
|
},
|
|
86
79
|
archived: {
|
|
87
|
-
surface: "border border-transparent bg-bg-sunken",
|
|
88
80
|
weight: "font-medium",
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
className: o[r],
|
|
81
|
+
icon: /* @__PURE__ */ r("svg", {
|
|
82
|
+
className: c[a],
|
|
92
83
|
fill: "none",
|
|
93
84
|
stroke: "currentColor",
|
|
94
85
|
viewBox: "0 0 24 24",
|
|
95
|
-
children: /* @__PURE__ */
|
|
86
|
+
children: /* @__PURE__ */ r("path", {
|
|
96
87
|
strokeLinecap: "round",
|
|
97
88
|
strokeLinejoin: "round",
|
|
98
89
|
strokeWidth: 2,
|
|
@@ -101,11 +92,11 @@ var r = e(function({ status: e, size: r = "md", showIcon: i = !0 }) {
|
|
|
101
92
|
}),
|
|
102
93
|
label: "Archived"
|
|
103
94
|
}
|
|
104
|
-
}[
|
|
105
|
-
return /* @__PURE__ */
|
|
106
|
-
"data-workflow-status":
|
|
107
|
-
className: `inline-flex shrink-0 items-center gap-1.5 rounded-pill ${a
|
|
108
|
-
children: [
|
|
95
|
+
}[n];
|
|
96
|
+
return /* @__PURE__ */ i("span", {
|
|
97
|
+
"data-workflow-status": n,
|
|
98
|
+
className: `inline-flex shrink-0 items-center gap-1.5 rounded-pill border ${s[a]} ${t(e, n)} ${l.weight}`,
|
|
99
|
+
children: [o && l.icon, /* @__PURE__ */ r("span", { children: l.label })]
|
|
109
100
|
});
|
|
110
101
|
});
|
|
111
|
-
export {
|
|
102
|
+
export { a as WorkflowStatusBadge, a as default };
|