@burdenoff/microfe-bigconsole 2026.1010.12 → 2026.1012.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/README.md +19 -0
- package/dist/bigconsole/BigConsoleRoot.js +88 -82
- package/dist/bigconsole/BigConsoleRoutes.js +163 -136
- package/dist/bigconsole/assistant/assistantProduct.js +1 -4
- package/dist/bigconsole/assistant/pageContext.d.ts +0 -14
- package/dist/bigconsole/assistant/pageContext.js +1 -6
- package/dist/bigconsole/assistant/recordAdapters.js +26 -27
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +31 -31
- package/dist/bigconsole/components/common/index.d.ts +0 -1
- package/dist/bigconsole/components/common/index.js +0 -1
- package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +44 -44
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +36 -36
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js +59 -59
- package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +58 -57
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +30 -30
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +41 -41
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js +34 -34
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +34 -34
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +110 -110
- package/dist/bigconsole/components/dashboard/PublishToStoreDialog.js +21 -21
- package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js +46 -46
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +164 -173
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +101 -101
- package/dist/bigconsole/components/dashboard/TemplateInstallOptions.js +31 -31
- package/dist/bigconsole/components/dashboard/TemplateLayoutPreview.js +15 -15
- package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -1
- package/dist/bigconsole/components/dashboard/WidgetPalette.js +165 -163
- package/dist/bigconsole/components/datasink/AlertExecutionHistory.js +37 -37
- package/dist/bigconsole/components/datasink/AlertRuleEditor.js +66 -66
- package/dist/bigconsole/components/datasink/CacheTTLSelector.js +35 -35
- package/dist/bigconsole/components/datasink/DataSinkCard.js +50 -51
- package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js +18 -18
- package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js +20 -20
- package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +47 -47
- package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +91 -91
- package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +35 -35
- package/dist/bigconsole/components/parser/DataSinkSelector.js +40 -40
- package/dist/bigconsole/components/parser/ImportParserDialog.js +120 -120
- package/dist/bigconsole/components/parser/ParserSelector.js +51 -51
- package/dist/bigconsole/components/pipeline/PipelineScopePicker.js +10 -10
- package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +76 -77
- package/dist/bigconsole/components/preview/AiPreviewPanel.js +95 -96
- package/dist/bigconsole/components/widgets/ActionConfigDialog.js +4 -4
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +93 -93
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +499 -507
- package/dist/bigconsole/components/widgets/WidgetRegistry.js +0 -1
- package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js +4 -4
- package/dist/bigconsole/components/widgets/chart/ChartConfig.js +48 -48
- package/dist/bigconsole/components/widgets/comments/WidgetComments.js +46 -46
- package/dist/bigconsole/components/widgets/custom/CustomWidget.js +73 -131
- package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +61 -61
- package/dist/bigconsole/components/widgets/form/FormWidget.js +36 -36
- package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +42 -42
- package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +25 -25
- package/dist/bigconsole/components/widgets/iframe-widget/IframeWidget.d.ts +28 -9
- package/dist/bigconsole/components/widgets/iframe-widget/IframeWidget.js +115 -42
- package/dist/bigconsole/components/widgets/iframe-widget/framePolicy.d.ts +20 -0
- package/dist/bigconsole/components/widgets/iframe-widget/framePolicy.js +10 -0
- package/dist/bigconsole/components/widgets/iframe-widget/index.d.ts +2 -1
- package/dist/bigconsole/components/widgets/iframe-widget/index.js +3 -2
- package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js +4 -4
- package/dist/bigconsole/components/widgets/list/ListConfig.js +30 -30
- package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +38 -38
- package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js +9 -9
- package/dist/bigconsole/components/widgets/metric-card/TrendIndicator.js +9 -9
- package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +49 -49
- package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +39 -39
- package/dist/bigconsole/components/widgets/table/TableConfig.js +73 -73
- package/dist/bigconsole/components/widgets/text-widget/TextWidget.js +110 -27
- package/dist/bigconsole/components/widgets/text-widget/textData.d.ts +6 -0
- package/dist/bigconsole/components/widgets/text-widget/textData.js +17 -14
- package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +64 -64
- package/dist/bigconsole/components/workflow/WorkflowOpenGuard.js +15 -15
- package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js +15 -15
- package/dist/bigconsole/context/BigConsoleContext.d.ts +10 -0
- package/dist/bigconsole/context/BigConsoleContext.js +47 -30
- package/dist/bigconsole/context/index.d.ts +1 -1
- package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +58 -49
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +74 -72
- package/dist/bigconsole/customWidget/proposalPreview.d.ts +5 -0
- package/dist/bigconsole/customWidget/proposalPreview.js +31 -0
- package/dist/bigconsole/hooks/useDataSinkAlerts.d.ts +0 -23
- package/dist/bigconsole/hooks/useDataSinkAlerts.js +113 -138
- package/dist/bigconsole/hooks/useDataSinkOperations.d.ts +7 -0
- package/dist/bigconsole/hooks/useDataSinkOperations.js +109 -98
- package/dist/bigconsole/hooks/useDataSinkSubscription.js +0 -1
- package/dist/bigconsole/hooks/useDrilldown.js +68 -67
- package/dist/bigconsole/hooks/useExportDataSink.js +1 -1
- package/dist/bigconsole/hooks/useGlobalFilters.js +3 -3
- package/dist/bigconsole/hooks/useImportDataSink.js +102 -90
- package/dist/bigconsole/pages/AdminPage.js +130 -130
- package/dist/bigconsole/pages/DashboardBuilderPage.js +60 -72
- package/dist/bigconsole/pages/DashboardViewPage.js +235 -258
- package/dist/bigconsole/pages/DashboardsPage.js +221 -269
- package/dist/bigconsole/pages/DataParsersPage.js +157 -180
- package/dist/bigconsole/pages/DataSinkAlertsPage.js +55 -62
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +318 -295
- package/dist/bigconsole/pages/DataSinkViewPage.js +256 -255
- package/dist/bigconsole/pages/DataSinksPage.js +216 -251
- package/dist/bigconsole/pages/DataSourcesPage.js +5 -5
- package/dist/bigconsole/pages/InsightsPage.js +265 -279
- package/dist/bigconsole/pages/OverviewPage.js +47 -47
- package/dist/bigconsole/pages/ParserBuilderPage.js +213 -229
- package/dist/bigconsole/pages/ParserViewPage.js +97 -97
- package/dist/bigconsole/pages/PipelineBuilderPage.js +214 -256
- package/dist/bigconsole/pages/PipelineViewPage.js +146 -146
- package/dist/bigconsole/pages/PipelinesPage.js +88 -107
- package/dist/bigconsole/pages/SettingsPage.js +173 -179
- package/dist/bigconsole/pages/WidgetDemoPage.js +42 -42
- package/dist/bigconsole/pages/WorkflowViewPage.js +1 -1
- package/dist/bigconsole/pages/WorkflowsPage.js +141 -141
- package/dist/bigconsole/providers/BigConsoleQuotaProvider.js +12 -12
- package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js +235 -122
- package/dist/bigconsole/renderers/adapters/BlockKitRenderer.d.ts +6 -1
- package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +151 -151
- package/dist/bigconsole/renderers/adapters/CustomRenderer.js +46 -46
- package/dist/bigconsole/renderers/adapters/adaptiveCardContent.d.ts +29 -0
- package/dist/bigconsole/renderers/adapters/adaptiveCardContent.js +51 -0
- package/dist/bigconsole/store/widgetStore.d.ts +0 -12
- package/dist/bigconsole/store/widgetStore.js +1 -3
- package/dist/bigconsole/types/index.d.ts +17 -2
- package/dist/bigconsole/utils/backendError.d.ts +0 -18
- package/dist/bigconsole/utils/dataSinkPayload.d.ts +48 -0
- package/dist/bigconsole/utils/dataSinkPayload.js +38 -0
- package/dist/bigconsole/utils/index.d.ts +2 -0
- package/dist/bigconsole/utils/safeUrl.d.ts +79 -0
- package/dist/bigconsole/utils/safeUrl.js +93 -0
- package/dist/bigconsole/utils/sanitizeHtml.d.ts +16 -0
- package/dist/bigconsole/utils/sanitizeHtml.js +67 -0
- package/dist/bigconsole/workflowOpen.js +14 -15
- package/dist/generated/wspace-operations.d.ts +138 -8
- package/dist/generated/wspace-operations.js +281 -240
- package/dist/node_modules/dompurify/dist/purify.es.js +800 -0
- package/package.json +9 -5
- package/dist/bigconsole/assistant/displayCopy.d.ts +0 -32
- package/dist/bigconsole/assistant/pageControls.d.ts +0 -81
- package/dist/bigconsole/assistant/pageControls.js +0 -169
- package/dist/bigconsole/assistant/previewControl.d.ts +0 -16
- package/dist/bigconsole/assistant/previewControl.js +0 -10
- package/dist/bigconsole/assistant/usePreviewControl.d.ts +0 -2
- package/dist/bigconsole/assistant/usePreviewControl.js +0 -20
- package/dist/bigconsole/components/common/SortBySelect.d.ts +0 -11
- package/dist/bigconsole/components/common/SortBySelect.js +0 -29
- package/dist/bigconsole/constants/backendErrors.js +0 -94
- package/dist/bigconsole/hooks/useDashboardLayoutBaseline.d.ts +0 -14
- package/dist/bigconsole/hooks/useDashboardLayoutBaseline.js +0 -32
- package/dist/bigconsole/utils/backendError.js +0 -42
- package/dist/bigconsole/utils/dashboardList.d.ts +0 -28
- package/dist/bigconsole/utils/dashboardList.js +0 -15
- package/dist/bigconsole/utils/dataSinkList.d.ts +0 -15
- package/dist/bigconsole/utils/dataSinkList.js +0 -15
- package/dist/bigconsole/utils/formDirty.d.ts +0 -82
- package/dist/bigconsole/utils/formDirty.js +0 -21
- package/dist/bigconsole/utils/insightsDraft.d.ts +0 -29
- package/dist/bigconsole/utils/insightsDraft.js +0 -8
- package/dist/bigconsole/utils/layoutBaseline.d.ts +0 -130
- package/dist/bigconsole/utils/layoutBaseline.js +0 -96
- package/dist/bigconsole/utils/listSort.d.ts +0 -80
- package/dist/bigconsole/utils/listSort.js +0 -85
- package/dist/bigconsole/utils/widgetFormDirty.d.ts +0 -16
- package/dist/bigconsole/utils/widgetFormDirty.js +0 -13
|
@@ -3,8 +3,8 @@ import "../../common/index.js";
|
|
|
3
3
|
import n from "../../parser/DataSinkSelector.js";
|
|
4
4
|
import r from "../../parser/ParserSelector.js";
|
|
5
5
|
import { Input as i, Label as a, Spinner as o } from "@burdenoff/fe-libs/ui";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
7
|
+
import { useI18n as l } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
8
8
|
//#region src/bigconsole/components/builder/inspector/DataBindingSection.tsx
|
|
9
9
|
var u = {
|
|
10
10
|
unbound: "info",
|
|
@@ -14,7 +14,7 @@ var u = {
|
|
|
14
14
|
parser_error: "danger",
|
|
15
15
|
field_mismatch: "warning"
|
|
16
16
|
}, d = ({ consoleId: d, binding: f, resolvedParser: p, dataSinkKey: m, dataPath: h, status: g, resolving: _ = !1, missingFields: v = [], preview: y, error: b, onDataSinkChange: x, onParserChange: S, onDataPathChange: C }) => {
|
|
17
|
-
let { t: w } =
|
|
17
|
+
let { t: w } = l(), T = {
|
|
18
18
|
unbound: w("bigconsole.builder.dataBinding.status.unbound", "Select a DataSink to begin"),
|
|
19
19
|
loading: _ ? w("bigconsole.parsers.selector.loading", "Loading parsers...") : w("bigconsole.builder.dataBinding.status.loading", "Testing parser and detecting fields…"),
|
|
20
20
|
bound: w("bigconsole.builder.dataBinding.status.bound", "Binding ready"),
|
|
@@ -22,33 +22,33 @@ var u = {
|
|
|
22
22
|
parser_error: w("bigconsole.builder.dataBinding.status.parserError", "Parser test failed"),
|
|
23
23
|
field_mismatch: w("bigconsole.builder.dataBinding.status.fieldMismatch", "Some mapped fields were not found")
|
|
24
24
|
};
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
/* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ c(t, { children: [
|
|
26
|
+
/* @__PURE__ */ s(e, {
|
|
27
27
|
title: "Data source",
|
|
28
28
|
description: w("bigconsole.builder.dataBinding.intro", "Connect this widget to a DataSink and Parser to display transformed data."),
|
|
29
29
|
"data-testid": "widget-inspector-data-source",
|
|
30
|
-
children: /* @__PURE__ */
|
|
30
|
+
children: /* @__PURE__ */ c("div", {
|
|
31
31
|
className: "flex flex-col gap-form-gap",
|
|
32
|
-
children: [/* @__PURE__ */
|
|
32
|
+
children: [/* @__PURE__ */ c("div", {
|
|
33
33
|
className: "space-y-2",
|
|
34
34
|
children: [
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
/* @__PURE__ */
|
|
35
|
+
/* @__PURE__ */ s(a, { children: w("bigconsole.builder.dataBinding.dataSinkLabel", "DataSink") }),
|
|
36
|
+
/* @__PURE__ */ s(n, {
|
|
37
37
|
value: m,
|
|
38
38
|
onChange: x,
|
|
39
39
|
placeholder: w("bigconsole.builder.dataBinding.dataSinkPlaceholder", "Select a DataSink...")
|
|
40
40
|
}),
|
|
41
|
-
m && /* @__PURE__ */
|
|
41
|
+
m && /* @__PURE__ */ c("p", {
|
|
42
42
|
className: "text-xs text-text-secondary",
|
|
43
|
-
children: [w("bigconsole.builder.dataBinding.keyLabel", "Key: {{key}}", { key: m }), f.source.ref && /* @__PURE__ */
|
|
43
|
+
children: [w("bigconsole.builder.dataBinding.keyLabel", "Key: {{key}}", { key: m }), f.source.ref && /* @__PURE__ */ s("span", {
|
|
44
44
|
className: "ml-2 text-text-muted",
|
|
45
45
|
children: w("bigconsole.builder.dataBinding.idLabel", "ID: {{id}}...", { id: f.source.ref.slice(0, 8) })
|
|
46
46
|
})]
|
|
47
47
|
})
|
|
48
48
|
]
|
|
49
|
-
}), /* @__PURE__ */
|
|
49
|
+
}), /* @__PURE__ */ c("div", {
|
|
50
50
|
className: "space-y-2",
|
|
51
|
-
children: [/* @__PURE__ */
|
|
51
|
+
children: [/* @__PURE__ */ s(a, { children: w("bigconsole.builder.dataBinding.parserLabel", "Parser") }), /* @__PURE__ */ s(r, {
|
|
52
52
|
consoleId: d,
|
|
53
53
|
value: f.parserId ?? null,
|
|
54
54
|
resolvedParser: p,
|
|
@@ -61,53 +61,53 @@ var u = {
|
|
|
61
61
|
})]
|
|
62
62
|
})
|
|
63
63
|
}),
|
|
64
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ s(e, {
|
|
65
65
|
title: T[g],
|
|
66
66
|
tone: u[g],
|
|
67
67
|
padding: "compact",
|
|
68
68
|
headingLevel: 3,
|
|
69
|
-
icon: g === "loading" ? /* @__PURE__ */
|
|
69
|
+
icon: g === "loading" ? /* @__PURE__ */ s(o, { style: {
|
|
70
70
|
width: "14px",
|
|
71
71
|
height: "14px"
|
|
72
72
|
} }) : void 0,
|
|
73
73
|
"data-testid": "widget-inspector-binding-status",
|
|
74
|
-
children: /* @__PURE__ */
|
|
74
|
+
children: /* @__PURE__ */ c("div", {
|
|
75
75
|
role: "status",
|
|
76
76
|
"aria-live": "polite",
|
|
77
77
|
className: "min-w-0 space-y-1",
|
|
78
78
|
children: [
|
|
79
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ s("p", {
|
|
80
80
|
className: "sr-only",
|
|
81
81
|
children: T[g]
|
|
82
82
|
}),
|
|
83
|
-
b && /* @__PURE__ */
|
|
83
|
+
b && /* @__PURE__ */ s("p", {
|
|
84
84
|
className: "break-words text-xs text-[var(--color-status-error-text)]",
|
|
85
85
|
children: b
|
|
86
86
|
}),
|
|
87
|
-
v.length > 0 && /* @__PURE__ */
|
|
87
|
+
v.length > 0 && /* @__PURE__ */ s("p", {
|
|
88
88
|
className: "break-words text-xs text-[var(--color-status-warning-text)]",
|
|
89
89
|
children: w("bigconsole.builder.dataBinding.missingFields", "Missing: {{fields}}", { fields: v.join(", ") })
|
|
90
90
|
}),
|
|
91
|
-
!b && v.length === 0 && g === "bound" && y !== void 0 && /* @__PURE__ */
|
|
91
|
+
!b && v.length === 0 && g === "bound" && y !== void 0 && /* @__PURE__ */ s("p", {
|
|
92
92
|
className: "text-xs text-text-secondary",
|
|
93
93
|
children: "The parser ran and its output matches the fields this widget expects."
|
|
94
94
|
})
|
|
95
95
|
]
|
|
96
96
|
})
|
|
97
97
|
}),
|
|
98
|
-
f.parserId && Object.keys(f.fields).length > 0 && /* @__PURE__ */
|
|
98
|
+
f.parserId && Object.keys(f.fields).length > 0 && /* @__PURE__ */ s(e, {
|
|
99
99
|
emphasis: "muted",
|
|
100
100
|
padding: "compact",
|
|
101
101
|
title: w("bigconsole.builder.dataBinding.fieldMappingsConfigured", "Field mappings configured"),
|
|
102
102
|
headingLevel: 3,
|
|
103
|
-
children: /* @__PURE__ */
|
|
103
|
+
children: /* @__PURE__ */ s("div", {
|
|
104
104
|
className: "min-w-0 space-y-1 text-xs text-text-secondary",
|
|
105
|
-
children: Object.entries(f.fields).map(([e, t]) => /* @__PURE__ */
|
|
105
|
+
children: Object.entries(f.fields).map(([e, t]) => /* @__PURE__ */ c("p", {
|
|
106
106
|
className: "break-words",
|
|
107
107
|
children: [
|
|
108
108
|
e,
|
|
109
109
|
": ",
|
|
110
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ s("code", {
|
|
111
111
|
className: "rounded bg-bg-surface px-1 font-mono",
|
|
112
112
|
children: t
|
|
113
113
|
})
|
|
@@ -115,36 +115,36 @@ var u = {
|
|
|
115
115
|
}, e))
|
|
116
116
|
})
|
|
117
117
|
}),
|
|
118
|
-
y !== void 0 && /* @__PURE__ */
|
|
118
|
+
y !== void 0 && /* @__PURE__ */ s(e, {
|
|
119
119
|
emphasis: "muted",
|
|
120
120
|
padding: "compact",
|
|
121
121
|
title: w("bigconsole.builder.dataBinding.livePreviewLabel", "Live Preview"),
|
|
122
122
|
description: "Raw parser output, exactly as the widget receives it.",
|
|
123
123
|
headingLevel: 3,
|
|
124
|
-
children: /* @__PURE__ */
|
|
124
|
+
children: /* @__PURE__ */ s("pre", {
|
|
125
125
|
className: "max-h-40 min-w-0 overflow-auto rounded-input border border-[var(--color-border-subtle)] bg-bg-surface p-3 text-xs text-text-secondary",
|
|
126
126
|
children: JSON.stringify(y, null, 2)
|
|
127
127
|
})
|
|
128
128
|
}),
|
|
129
|
-
/* @__PURE__ */
|
|
129
|
+
/* @__PURE__ */ s(e, {
|
|
130
130
|
emphasis: "muted",
|
|
131
131
|
padding: "compact",
|
|
132
132
|
title: "Data path",
|
|
133
133
|
headingLevel: 3,
|
|
134
|
-
children: /* @__PURE__ */
|
|
134
|
+
children: /* @__PURE__ */ c("div", {
|
|
135
135
|
className: "space-y-2",
|
|
136
136
|
children: [
|
|
137
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ s(a, {
|
|
138
138
|
htmlFor: "widget-inspector-data-path",
|
|
139
139
|
children: w("bigconsole.builder.dataBinding.dataPathLabel", "Data Path (Optional)")
|
|
140
140
|
}),
|
|
141
|
-
/* @__PURE__ */
|
|
141
|
+
/* @__PURE__ */ s(i, {
|
|
142
142
|
id: "widget-inspector-data-path",
|
|
143
143
|
value: h ?? "",
|
|
144
144
|
onChange: (e) => C(e.target.value || void 0),
|
|
145
145
|
placeholder: w("bigconsole.builder.dataBinding.dataPathPlaceholder", "e.g., summary.totalRevenue")
|
|
146
146
|
}),
|
|
147
|
-
/* @__PURE__ */
|
|
147
|
+
/* @__PURE__ */ s("p", {
|
|
148
148
|
className: "text-xs text-text-secondary",
|
|
149
149
|
children: w("bigconsole.builder.dataBinding.dataPathHelp", "Path to extract specific data from the parser output (dot notation)")
|
|
150
150
|
})
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export { Section, SectionHeader, SectionStack } from './Section';
|
|
2
2
|
export type { SectionHeadingLevel, SectionHeaderProps, SectionProps, SectionStackProps } from './Section';
|
|
3
3
|
export { SECTION_FOCUS_RING, SECTION_MOTION, SECTION_STACK, sectionSurfaceClasses, sectionTitleClasses, type SectionEmphasis, type SectionPadding, type SectionTone, } from './sectionStyles';
|
|
4
|
-
export { SortBySelect, type SortBySelectProps } from './SortBySelect';
|
|
@@ -3,32 +3,32 @@ import "../common/index.js";
|
|
|
3
3
|
import t from "./StoreTemplatePicker.js";
|
|
4
4
|
import { TemplateInstallOptions as n } from "./TemplateInstallOptions.js";
|
|
5
5
|
import { TemplateLayoutPreview as r } from "./TemplateLayoutPreview.js";
|
|
6
|
-
import { templateInputDefaults as
|
|
7
|
-
import
|
|
8
|
-
import { memo as
|
|
9
|
-
import { Copy as
|
|
10
|
-
import { Badge as
|
|
6
|
+
import { templateInputDefaults as i, templateInputError as ee } from "../../utils/templateInstallInputs.js";
|
|
7
|
+
import te from "../../hooks/useStoreDashboardTemplates.js";
|
|
8
|
+
import { memo as a, useCallback as o, useEffect as s, useRef as c, useState as l } from "react";
|
|
9
|
+
import { Copy as ne, LayoutDashboard as re, Plus as u, Tag as ie, X as ae } from "lucide-react";
|
|
10
|
+
import { Badge as oe, Button as d, Dialog as se, DialogContent as ce, DialogDescription as le, DialogFooter as ue, DialogHeader as de, DialogTitle as f, Input as p, Spinner as m, Textarea as fe } from "@burdenoff/fe-libs/ui";
|
|
11
|
+
import { Fragment as pe, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
11
12
|
import { useI18n as me } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
12
|
-
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
13
13
|
import { useActiveContext as he } from "@burdenoff/fe-libs/shared/providers/shell/ActiveContextProvider";
|
|
14
14
|
//#region src/bigconsole/components/dashboard/CreateDashboardDialog.tsx
|
|
15
|
-
var _ =
|
|
16
|
-
let { t: S } = me(), { templates: ge, loading: _e, error: C, fetchTemplateContent: w, installTemplate: T } =
|
|
15
|
+
var _ = a(function({ isOpen: a, isCreating: _ = !1, onClose: v, onCreate: y, showTemplates: b = !0, onTemplateInstalled: x }) {
|
|
16
|
+
let { t: S } = me(), { templates: ge, loading: _e, error: C, fetchTemplateContent: w, installTemplate: T } = te({ autoLoad: b }), [E, D] = l(!1), { workspaceId: O } = he(), k = c(O);
|
|
17
17
|
k.current = O;
|
|
18
|
-
let [ve, A] =
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
let [ve, A] = l(null), [ye, be] = l(null), [j, M] = l(!1), [N, P] = l({}), [F, I] = l({}), [L, R] = l("blank"), [z, B] = l(""), [V, H] = l(""), [U, W] = l([]), [G, K] = l(""), [q, J] = l(null), [Y, X] = l(null), Z = c(null), Q = ye === `${q?.id}:${O}` ? ve : null;
|
|
19
|
+
s(() => {
|
|
20
|
+
a && (R("blank"), B(""), H(""), W([]), K(""), J(null), X(null), setTimeout(() => {
|
|
21
21
|
Z.current?.focus();
|
|
22
22
|
}, 100));
|
|
23
|
-
}, [
|
|
24
|
-
let $ =
|
|
23
|
+
}, [a]);
|
|
24
|
+
let $ = o(() => {
|
|
25
25
|
let e = G.trim().toLowerCase();
|
|
26
26
|
e && !U.includes(e) && U.length < 10 && (W((t) => [...t, e]), K(""));
|
|
27
27
|
}, [G, U]);
|
|
28
|
-
|
|
28
|
+
s(() => {
|
|
29
29
|
let e = !1;
|
|
30
|
-
if (A(null), P({}), I({}), M(!!q), !(!q || !
|
|
31
|
-
e || (A(t), be(`${q.id}:${O}`), M(!1), I(t ?
|
|
30
|
+
if (A(null), P({}), I({}), M(!!q), !(!q || !a)) return w(q.id).then((t) => {
|
|
31
|
+
e || (A(t), be(`${q.id}:${O}`), M(!1), I(t ? i(t.requiredInputs) : {}), t || X(S("bigconsole.dashboards.createDialog.error.noDefinition", "This template has no dashboard definition attached and cannot be installed.")));
|
|
32
32
|
}), () => {
|
|
33
33
|
e = !0;
|
|
34
34
|
};
|
|
@@ -36,20 +36,20 @@ var _ = i(function({ isOpen: i, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
36
36
|
q,
|
|
37
37
|
w,
|
|
38
38
|
O,
|
|
39
|
-
|
|
39
|
+
a,
|
|
40
40
|
S
|
|
41
41
|
]);
|
|
42
|
-
let xe =
|
|
42
|
+
let xe = o((e) => {
|
|
43
43
|
W((t) => t.filter((t) => t !== e));
|
|
44
|
-
}, []), Se =
|
|
44
|
+
}, []), Se = o((e) => {
|
|
45
45
|
e.key === "Enter" ? (e.preventDefault(), $()) : e.key === "Backspace" && !G && U.length > 0 && W((e) => e.slice(0, -1));
|
|
46
46
|
}, [
|
|
47
47
|
$,
|
|
48
48
|
G,
|
|
49
49
|
U.length
|
|
50
|
-
]), Ce =
|
|
50
|
+
]), Ce = o((e) => {
|
|
51
51
|
J(e), X(null), B(e.name), H(e.description || "");
|
|
52
|
-
}, []), we =
|
|
52
|
+
}, []), we = o(async (e) => {
|
|
53
53
|
if (e.preventDefault(), L === "template" && !q) {
|
|
54
54
|
X(S("bigconsole.dashboards.createDialog.error.selectTemplate", "Please select a template"));
|
|
55
55
|
return;
|
|
@@ -79,7 +79,7 @@ var _ = i(function({ isOpen: i, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
79
79
|
X(S("bigconsole.dashboards.createDialog.error.noDefinition", "This template has no dashboard definition attached and cannot be installed."));
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
|
-
let n =
|
|
82
|
+
let n = ee(e.requiredInputs, F, S);
|
|
83
83
|
if (n) {
|
|
84
84
|
X(n);
|
|
85
85
|
return;
|
|
@@ -138,16 +138,16 @@ var _ = i(function({ isOpen: i, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
138
138
|
x,
|
|
139
139
|
S
|
|
140
140
|
]);
|
|
141
|
-
return /* @__PURE__ */ h(
|
|
142
|
-
open:
|
|
141
|
+
return /* @__PURE__ */ h(se, {
|
|
142
|
+
open: a,
|
|
143
143
|
onOpenChange: (e) => !e && !_ && !E && v(),
|
|
144
|
-
children: /* @__PURE__ */ g(
|
|
144
|
+
children: /* @__PURE__ */ g(ce, {
|
|
145
145
|
style: {
|
|
146
146
|
maxWidth: L === "template" ? "900px" : "480px",
|
|
147
147
|
width: "100%",
|
|
148
148
|
padding: 0
|
|
149
149
|
},
|
|
150
|
-
children: [/* @__PURE__ */ h(
|
|
150
|
+
children: [/* @__PURE__ */ h(de, {
|
|
151
151
|
style: { padding: "var(--space-pagePadding) var(--space-pagePadding) 0" },
|
|
152
152
|
children: /* @__PURE__ */ g("div", {
|
|
153
153
|
style: {
|
|
@@ -166,7 +166,7 @@ var _ = i(function({ isOpen: i, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
166
166
|
borderRadius: "var(--radius-card)",
|
|
167
167
|
backgroundColor: "var(--color-bg-accentSubtle)"
|
|
168
168
|
},
|
|
169
|
-
children: /* @__PURE__ */ h(
|
|
169
|
+
children: /* @__PURE__ */ h(re, {
|
|
170
170
|
"aria-hidden": "true",
|
|
171
171
|
style: {
|
|
172
172
|
height: "var(--size-icon-lg)",
|
|
@@ -174,7 +174,7 @@ var _ = i(function({ isOpen: i, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
174
174
|
color: "var(--color-action-primary-bg)"
|
|
175
175
|
}
|
|
176
176
|
})
|
|
177
|
-
}), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h(
|
|
177
|
+
}), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h(f, {
|
|
178
178
|
style: {
|
|
179
179
|
fontSize: "var(--font-size-heading-h4)",
|
|
180
180
|
fontWeight: "var(--font-weight-bold)",
|
|
@@ -182,7 +182,7 @@ var _ = i(function({ isOpen: i, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
182
182
|
margin: 0
|
|
183
183
|
},
|
|
184
184
|
children: S("bigconsole.dashboards.createDialog.title", "Create New Dashboard")
|
|
185
|
-
}), /* @__PURE__ */ h(
|
|
185
|
+
}), /* @__PURE__ */ h(le, {
|
|
186
186
|
style: {
|
|
187
187
|
fontSize: "var(--font-size-body-sm)",
|
|
188
188
|
color: "var(--color-text-secondary)",
|
|
@@ -230,7 +230,7 @@ var _ = i(function({ isOpen: i, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
230
230
|
boxShadow: L === "blank" ? "var(--shadow-elevation-1)" : "none",
|
|
231
231
|
transition: "all 0.15s ease"
|
|
232
232
|
},
|
|
233
|
-
children: [/* @__PURE__ */ h(
|
|
233
|
+
children: [/* @__PURE__ */ h(u, { style: {
|
|
234
234
|
height: "var(--size-icon-sm)",
|
|
235
235
|
width: "var(--size-icon-sm)"
|
|
236
236
|
} }), S("bigconsole.dashboards.createDialog.tab.blank", "Blank Dashboard")]
|
|
@@ -255,7 +255,7 @@ var _ = i(function({ isOpen: i, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
255
255
|
boxShadow: L === "template" ? "var(--shadow-elevation-1)" : "none",
|
|
256
256
|
transition: "all 0.15s ease"
|
|
257
257
|
},
|
|
258
|
-
children: [/* @__PURE__ */ h(
|
|
258
|
+
children: [/* @__PURE__ */ h(ne, { style: {
|
|
259
259
|
height: "var(--size-icon-sm)",
|
|
260
260
|
width: "var(--size-icon-sm)"
|
|
261
261
|
} }), S("bigconsole.dashboards.createDialog.tab.template", "From Template")]
|
|
@@ -278,7 +278,7 @@ var _ = i(function({ isOpen: i, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
278
278
|
}),
|
|
279
279
|
L === "template" && q && /* @__PURE__ */ g("div", {
|
|
280
280
|
style: { padding: "var(--space-pagePadding)" },
|
|
281
|
-
children: [j && /* @__PURE__ */ h(
|
|
281
|
+
children: [j && /* @__PURE__ */ h(m, {}), Q && /* @__PURE__ */ g(pe, { children: [/* @__PURE__ */ h(r, { content: Q }), /* @__PURE__ */ h(n, {
|
|
282
282
|
content: Q,
|
|
283
283
|
bindings: N,
|
|
284
284
|
onBindingChange: (e, t) => P((n) => ({
|
|
@@ -323,7 +323,7 @@ var _ = i(function({ isOpen: i, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
323
323
|
children: "*"
|
|
324
324
|
})]
|
|
325
325
|
}),
|
|
326
|
-
/* @__PURE__ */ h(
|
|
326
|
+
/* @__PURE__ */ h(p, {
|
|
327
327
|
ref: Z,
|
|
328
328
|
id: "dashboard-name",
|
|
329
329
|
type: "text",
|
|
@@ -369,7 +369,7 @@ var _ = i(function({ isOpen: i, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
369
369
|
},
|
|
370
370
|
children: S("bigconsole.dashboards.createDialog.field.optional", "(optional)")
|
|
371
371
|
})]
|
|
372
|
-
}), /* @__PURE__ */ h(
|
|
372
|
+
}), /* @__PURE__ */ h(fe, {
|
|
373
373
|
id: "dashboard-description",
|
|
374
374
|
value: V,
|
|
375
375
|
onChange: (e) => H(e.target.value),
|
|
@@ -395,7 +395,7 @@ var _ = i(function({ isOpen: i, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
395
395
|
marginBottom: "var(--space-controlGap)"
|
|
396
396
|
},
|
|
397
397
|
children: [
|
|
398
|
-
/* @__PURE__ */ h(
|
|
398
|
+
/* @__PURE__ */ h(ie, { style: {
|
|
399
399
|
height: "var(--size-icon-sm)",
|
|
400
400
|
width: "var(--size-icon-sm)"
|
|
401
401
|
} }),
|
|
@@ -416,7 +416,7 @@ var _ = i(function({ isOpen: i, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
416
416
|
gap: "var(--space-controlGap)",
|
|
417
417
|
marginBottom: "var(--space-controlGap)"
|
|
418
418
|
},
|
|
419
|
-
children: U.map((e) => /* @__PURE__ */ g(
|
|
419
|
+
children: U.map((e) => /* @__PURE__ */ g(oe, {
|
|
420
420
|
variant: "secondary",
|
|
421
421
|
style: {
|
|
422
422
|
display: "flex",
|
|
@@ -442,7 +442,7 @@ var _ = i(function({ isOpen: i, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
442
442
|
},
|
|
443
443
|
onMouseOver: (e) => e.currentTarget.style.opacity = "1",
|
|
444
444
|
onMouseOut: (e) => e.currentTarget.style.opacity = "0.7",
|
|
445
|
-
children: /* @__PURE__ */ h(
|
|
445
|
+
children: /* @__PURE__ */ h(ae, { style: {
|
|
446
446
|
height: "12px",
|
|
447
447
|
width: "12px"
|
|
448
448
|
} })
|
|
@@ -454,7 +454,7 @@ var _ = i(function({ isOpen: i, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
454
454
|
display: "flex",
|
|
455
455
|
gap: "var(--space-controlGap)"
|
|
456
456
|
},
|
|
457
|
-
children: [/* @__PURE__ */ h(
|
|
457
|
+
children: [/* @__PURE__ */ h(p, {
|
|
458
458
|
id: "dashboard-tags",
|
|
459
459
|
type: "text",
|
|
460
460
|
value: G,
|
|
@@ -467,7 +467,7 @@ var _ = i(function({ isOpen: i, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
467
467
|
height: "var(--size-controlHeight-md)",
|
|
468
468
|
fontSize: "var(--font-size-body-sm)"
|
|
469
469
|
}
|
|
470
|
-
}), /* @__PURE__ */ h(
|
|
470
|
+
}), /* @__PURE__ */ h(d, {
|
|
471
471
|
type: "button",
|
|
472
472
|
variant: "outline",
|
|
473
473
|
onClick: $,
|
|
@@ -488,7 +488,7 @@ var _ = i(function({ isOpen: i, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
488
488
|
]
|
|
489
489
|
})
|
|
490
490
|
}),
|
|
491
|
-
/* @__PURE__ */ g(
|
|
491
|
+
/* @__PURE__ */ g(ue, {
|
|
492
492
|
style: {
|
|
493
493
|
padding: "var(--space-formGap) var(--space-pagePadding)",
|
|
494
494
|
borderTop: "1px solid var(--color-border)",
|
|
@@ -497,14 +497,14 @@ var _ = i(function({ isOpen: i, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
497
497
|
justifyContent: "flex-end",
|
|
498
498
|
gap: "var(--space-controlGap)"
|
|
499
499
|
},
|
|
500
|
-
children: [/* @__PURE__ */ h(
|
|
500
|
+
children: [/* @__PURE__ */ h(d, {
|
|
501
501
|
type: "button",
|
|
502
502
|
variant: "outline",
|
|
503
503
|
onClick: v,
|
|
504
504
|
disabled: _ || E,
|
|
505
505
|
style: { height: "var(--size-controlHeight-md)" },
|
|
506
506
|
children: S("bigconsole.dashboards.createDialog.action.cancel", "Cancel")
|
|
507
|
-
}), /* @__PURE__ */ h(
|
|
507
|
+
}), /* @__PURE__ */ h(d, {
|
|
508
508
|
type: "submit",
|
|
509
509
|
disabled: _ || E || !z.trim() || L === "template" && (!q || !Q || j),
|
|
510
510
|
style: {
|
|
@@ -517,7 +517,7 @@ var _ = i(function({ isOpen: i, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
517
517
|
alignItems: "center",
|
|
518
518
|
gap: "var(--space-iconGap)"
|
|
519
519
|
},
|
|
520
|
-
children: [/* @__PURE__ */ h(
|
|
520
|
+
children: [/* @__PURE__ */ h(m, { style: {
|
|
521
521
|
height: "var(--size-icon-sm)",
|
|
522
522
|
width: "var(--size-icon-sm)"
|
|
523
523
|
} }), S("bigconsole.dashboards.createDialog.action.creating", "Creating...")]
|
|
@@ -527,7 +527,7 @@ var _ = i(function({ isOpen: i, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
527
527
|
alignItems: "center",
|
|
528
528
|
gap: "var(--space-iconGap)"
|
|
529
529
|
},
|
|
530
|
-
children: [/* @__PURE__ */ h(
|
|
530
|
+
children: [/* @__PURE__ */ h(u, { style: {
|
|
531
531
|
height: "var(--size-icon-sm)",
|
|
532
532
|
width: "var(--size-icon-sm)"
|
|
533
533
|
} }), S("bigconsole.dashboards.createDialog.action.create", "Create Dashboard")]
|
|
@@ -33,8 +33,8 @@ import { memo as p, useCallback as m, useEffect as de, useMemo as fe, useRef as
|
|
|
33
33
|
import { usePermissions as pe } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
34
34
|
import { Plus as me } from "lucide-react";
|
|
35
35
|
import { Button as _ } from "@burdenoff/fe-libs/ui";
|
|
36
|
-
import { useI18n as he } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
37
36
|
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
37
|
+
import { useI18n as he } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
38
38
|
//#region src/bigconsole/components/dashboard/DashboardCanvas.tsx
|
|
39
39
|
var b = p(function({ dashboardId: p, pageId: b, title: x, onPaste: ge, onSave: _e, isSaving: ve = !1, onExport: ye, onPublishTemplate: be, pages: S = [], activePageId: xe, onPageChange: Se, onPagesReorder: C, onPageAdd: Ce, onPageRename: we, onPageDuplicate: Te, onPageDelete: Ee, showFilters: De = !0, showPageTabs: Oe = !0, enableCrossFilter: ke = !0 }) {
|
|
40
40
|
let { t: w } = he(), T = h(null), E = h(null), [D, Ae] = g(1200), [je, O] = g(!1), [k, A] = g(null), [j, M] = g(!1), [Me, N] = g(null), [P, Ne] = g(null), F = t((e) => e.viewMode === "edit"), I = t((e) => e.currentDashboard), L = I?.pages.find((e) => e.id === b)?.gridColumns ?? 12, { updateDashboard: R } = c({ skipFetch: !0 }), { hasPermission: Pe } = pe(), Fe = Pe(u.DASHBOARD_UPDATE), Ie = P?.id === p ? P.value : I?.id === p ? I.visibility : void 0, Le = m(async (e) => {
|
|
@@ -62,7 +62,7 @@ var b = p(function({ dashboardId: p, pageId: b, title: x, onPaste: ge, onSave: _
|
|
|
62
62
|
}, [K]), { createWidget: q } = s(b, p, { skipFetch: !0 }), J = e((e) => e.widgets), Y = fe(() => {
|
|
63
63
|
let e = Array.from(J.values());
|
|
64
64
|
return b ? e.filter((e) => e.pageId === b) : e;
|
|
65
|
-
}, [J, b]), He = e((e) => e.selectedWidgetId), X = e((e) => e.selectWidget),
|
|
65
|
+
}, [J, b]), He = e((e) => e.selectedWidgetId), X = e((e) => e.selectWidget), Z = e((e) => e.addWidget), Q = e((e) => e.updateWidgetPosition), Ue = e((e) => e.configPanelOpen), We = e((e) => e.closeConfigPanel);
|
|
66
66
|
de(() => {
|
|
67
67
|
let e = T.current;
|
|
68
68
|
if (!e) return;
|
|
@@ -75,18 +75,18 @@ var b = p(function({ dashboardId: p, pageId: b, title: x, onPaste: ge, onSave: _
|
|
|
75
75
|
}
|
|
76
76
|
return window.addEventListener("resize", t), () => window.removeEventListener("resize", t);
|
|
77
77
|
}, []);
|
|
78
|
-
let
|
|
78
|
+
let Ge = m((e) => {
|
|
79
79
|
e.forEach((e) => {
|
|
80
|
-
|
|
80
|
+
Q(e.i, {
|
|
81
81
|
x: e.x,
|
|
82
82
|
y: e.y,
|
|
83
83
|
width: e.w,
|
|
84
84
|
height: e.h
|
|
85
85
|
});
|
|
86
86
|
});
|
|
87
|
-
}, [
|
|
87
|
+
}, [Q]), Ke = m((e) => {
|
|
88
88
|
X(e);
|
|
89
|
-
}, [X]),
|
|
89
|
+
}, [X]), $ = m(async (e, t) => {
|
|
90
90
|
A(null);
|
|
91
91
|
let n = t?.definition || (e.type ? a(e.type) : null), r = d(), i = {
|
|
92
92
|
width: Math.min(n?.defaultSize?.width ?? 4, L),
|
|
@@ -147,21 +147,21 @@ var b = p(function({ dashboardId: p, pageId: b, title: x, onPaste: ge, onSave: _
|
|
|
147
147
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
148
148
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
149
149
|
};
|
|
150
|
-
|
|
150
|
+
Z(c), X(c.id);
|
|
151
151
|
}, [
|
|
152
152
|
p,
|
|
153
153
|
b,
|
|
154
154
|
q,
|
|
155
|
-
|
|
155
|
+
Z,
|
|
156
156
|
X,
|
|
157
157
|
Y,
|
|
158
158
|
L,
|
|
159
159
|
w
|
|
160
|
-
]),
|
|
160
|
+
]), qe = m((e) => {
|
|
161
161
|
M(!0), N(e);
|
|
162
|
-
}, []),
|
|
162
|
+
}, []), Je = m(() => {
|
|
163
163
|
M(!1), N(null);
|
|
164
|
-
}, []),
|
|
164
|
+
}, []), Ye = m((e) => {
|
|
165
165
|
e.preventDefault(), M(!1), N(null);
|
|
166
166
|
try {
|
|
167
167
|
let t = e.dataTransfer.getData("application/json");
|
|
@@ -187,7 +187,7 @@ var b = p(function({ dashboardId: p, pageId: b, title: x, onPaste: ge, onSave: _
|
|
|
187
187
|
width: c.width,
|
|
188
188
|
height: c.height
|
|
189
189
|
};
|
|
190
|
-
|
|
190
|
+
$({
|
|
191
191
|
type: r.type,
|
|
192
192
|
title: r.name || i.name,
|
|
193
193
|
config: r.defaultConfig || i.defaultConfig
|
|
@@ -200,20 +200,20 @@ var b = p(function({ dashboardId: p, pageId: b, title: x, onPaste: ge, onSave: _
|
|
|
200
200
|
}
|
|
201
201
|
}, [
|
|
202
202
|
D,
|
|
203
|
-
|
|
203
|
+
$,
|
|
204
204
|
L
|
|
205
|
-
]),
|
|
205
|
+
]), Xe = m((e) => {
|
|
206
206
|
e.preventDefault(), e.dataTransfer.dropEffect = "copy";
|
|
207
|
-
}, []),
|
|
207
|
+
}, []), Ze = m((e, t) => {
|
|
208
208
|
let n = t || a(e);
|
|
209
|
-
|
|
209
|
+
$({
|
|
210
210
|
type: e,
|
|
211
211
|
title: n.name,
|
|
212
212
|
config: n.defaultConfig
|
|
213
213
|
});
|
|
214
|
-
}, [
|
|
214
|
+
}, [$]), Qe = m(() => {
|
|
215
215
|
W();
|
|
216
|
-
}, [W]),
|
|
216
|
+
}, [W]), $e = m(() => {
|
|
217
217
|
U && W(), window.requestAnimationFrame(() => {
|
|
218
218
|
let e = w("bigconsole.dashboards.widgetPalette.searchPlaceholder", "Search widgets...");
|
|
219
219
|
document.querySelector(`input[placeholder="${e}"]`)?.focus();
|
|
@@ -222,7 +222,7 @@ var b = p(function({ dashboardId: p, pageId: b, title: x, onPaste: ge, onSave: _
|
|
|
222
222
|
U,
|
|
223
223
|
W,
|
|
224
224
|
w
|
|
225
|
-
]), { exportPNG:
|
|
225
|
+
]), { exportPNG: et, exportPDF: tt, isExporting: nt } = l({
|
|
226
226
|
containerRef: E,
|
|
227
227
|
name: x || "dashboard"
|
|
228
228
|
});
|
|
@@ -232,8 +232,8 @@ var b = p(function({ dashboardId: p, pageId: b, title: x, onPaste: ge, onSave: _
|
|
|
232
232
|
/* @__PURE__ */ v(te, {
|
|
233
233
|
dashboardId: p,
|
|
234
234
|
title: x,
|
|
235
|
-
onAddWidget:
|
|
236
|
-
onTogglePalette:
|
|
235
|
+
onAddWidget: $e,
|
|
236
|
+
onTogglePalette: Qe,
|
|
237
237
|
isPaletteOpen: G,
|
|
238
238
|
onPaste: ge,
|
|
239
239
|
onSave: _e,
|
|
@@ -241,11 +241,11 @@ var b = p(function({ dashboardId: p, pageId: b, title: x, onPaste: ge, onSave: _
|
|
|
241
241
|
onExport: ye,
|
|
242
242
|
onPublishTemplate: be,
|
|
243
243
|
onExportImage: m(() => {
|
|
244
|
+
et();
|
|
245
|
+
}, [et]),
|
|
246
|
+
onExportPdf: m(() => {
|
|
244
247
|
tt();
|
|
245
248
|
}, [tt]),
|
|
246
|
-
onExportPdf: m(() => {
|
|
247
|
-
$();
|
|
248
|
-
}, [$]),
|
|
249
249
|
isExportingImage: nt,
|
|
250
250
|
onShare: () => O(!0)
|
|
251
251
|
}),
|
|
@@ -295,13 +295,13 @@ var b = p(function({ dashboardId: p, pageId: b, title: x, onPaste: ge, onSave: _
|
|
|
295
295
|
}),
|
|
296
296
|
/* @__PURE__ */ y("div", {
|
|
297
297
|
"data-testid": "dashboard-canvas-panes",
|
|
298
|
-
className: `flex flex-1 min-w-0 overflow-hidden ${
|
|
298
|
+
className: `flex flex-1 min-w-0 overflow-hidden ${Ue ? "lg:mr-[var(--bc-inspector-width,420px)]" : ""}`,
|
|
299
299
|
children: [F && /* @__PURE__ */ v(se, {
|
|
300
300
|
isOpen: G,
|
|
301
|
-
onClose:
|
|
302
|
-
onWidgetSelect:
|
|
303
|
-
onDragStart:
|
|
304
|
-
onDragEnd:
|
|
301
|
+
onClose: Qe,
|
|
302
|
+
onWidgetSelect: Ze,
|
|
303
|
+
onDragStart: qe,
|
|
304
|
+
onDragEnd: Je,
|
|
305
305
|
installedWidgets: Re,
|
|
306
306
|
installedWidgetsLoading: ze,
|
|
307
307
|
definitions: Be
|
|
@@ -312,8 +312,8 @@ var b = p(function({ dashboardId: p, pageId: b, title: x, onPaste: ge, onSave: _
|
|
|
312
312
|
"data-section-emphasis": "primary",
|
|
313
313
|
"data-testid": "dashboard-board",
|
|
314
314
|
className: "relative min-w-0 flex-1 overflow-auto border-2 border-transparent bg-bg-sunken motion-safe:transition-[border-color,background-color]",
|
|
315
|
-
onDrop:
|
|
316
|
-
onDragOver:
|
|
315
|
+
onDrop: Ye,
|
|
316
|
+
onDragOver: Xe,
|
|
317
317
|
onClick: () => {
|
|
318
318
|
F && X(null);
|
|
319
319
|
},
|
|
@@ -365,8 +365,8 @@ var b = p(function({ dashboardId: p, pageId: b, title: x, onPaste: ge, onSave: _
|
|
|
365
365
|
cols: L,
|
|
366
366
|
isEditMode: F,
|
|
367
367
|
width: D,
|
|
368
|
-
onLayoutChange:
|
|
369
|
-
onWidgetSelect:
|
|
368
|
+
onLayoutChange: Ge,
|
|
369
|
+
onWidgetSelect: Ke,
|
|
370
370
|
selectedWidgetId: He
|
|
371
371
|
})
|
|
372
372
|
}) : /* @__PURE__ */ v("div", {
|
|
@@ -379,7 +379,7 @@ var b = p(function({ dashboardId: p, pageId: b, title: x, onPaste: ge, onSave: _
|
|
|
379
379
|
title: w("bigconsole.dashboards.canvas.noWidgetsTitle", "No widgets yet"),
|
|
380
380
|
description: w("bigconsole.dashboards.canvas.noWidgetsDescription", "Add widgets to build your dashboard. Click the \"Add Widget\" button to get started."),
|
|
381
381
|
children: F && /* @__PURE__ */ y(_, {
|
|
382
|
-
onClick:
|
|
382
|
+
onClick: $e,
|
|
383
383
|
children: [/* @__PURE__ */ v(me, { className: "size-4" }), w("bigconsole.dashboards.canvas.addWidget", "Add Widget")]
|
|
384
384
|
})
|
|
385
385
|
})
|
|
@@ -388,8 +388,8 @@ var b = p(function({ dashboardId: p, pageId: b, title: x, onPaste: ge, onSave: _
|
|
|
388
388
|
})]
|
|
389
389
|
}),
|
|
390
390
|
/* @__PURE__ */ v(ue, {
|
|
391
|
-
isOpen:
|
|
392
|
-
onClose:
|
|
391
|
+
isOpen: Ue,
|
|
392
|
+
onClose: We
|
|
393
393
|
}),
|
|
394
394
|
/* @__PURE__ */ v(oe, {
|
|
395
395
|
dashboardId: p,
|