@burdenoff/microfe-bigconsole 2026.1011.10 → 2026.1012.2
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 +357 -337
- 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 +17 -17
- 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/chart/ChartWidget.js +125 -129
- package/dist/bigconsole/components/widgets/chart/charts/AreaChart.js +50 -45
- package/dist/bigconsole/components/widgets/chart/charts/BarChart.js +40 -35
- package/dist/bigconsole/components/widgets/chart/charts/ComboChart.js +41 -48
- package/dist/bigconsole/components/widgets/chart/charts/LineChart.js +41 -36
- package/dist/bigconsole/components/widgets/chart/charts/numericSeries.d.ts +6 -0
- package/dist/bigconsole/components/widgets/chart/charts/numericSeries.js +26 -0
- package/dist/bigconsole/components/widgets/chart/charts/types.d.ts +2 -0
- 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
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import e from "./CalendarView.js";
|
|
2
2
|
import { memo as t } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
import { useI18n as r } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
5
5
|
//#region src/bigconsole/components/widgets/calendar/CalendarWidget.tsx
|
|
6
6
|
var i = t(function(t) {
|
|
7
|
-
let { t: i } =
|
|
8
|
-
return /* @__PURE__ */
|
|
7
|
+
let { t: i } = r();
|
|
8
|
+
return /* @__PURE__ */ n(e, {
|
|
9
9
|
...t,
|
|
10
10
|
t: i
|
|
11
11
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { memo as e, useCallback as t, useMemo as n } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
3
|
+
import { useI18n as o } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
4
4
|
//#region src/bigconsole/components/widgets/chart/ChartConfig.tsx
|
|
5
5
|
var s = e(function({ config: e, onChange: s }) {
|
|
6
|
-
let { t: c } =
|
|
6
|
+
let { t: c } = o(), l = n(() => [
|
|
7
7
|
{
|
|
8
8
|
value: "line",
|
|
9
9
|
label: c("bigconsole.widget.config.chart.type.line", "Line Chart")
|
|
@@ -64,47 +64,47 @@ var s = e(function({ config: e, onChange: s }) {
|
|
|
64
64
|
[t]: n
|
|
65
65
|
});
|
|
66
66
|
}, [e, s]), p = e.chartType === "pie" || e.chartType === "funnel";
|
|
67
|
-
return /* @__PURE__ */
|
|
67
|
+
return /* @__PURE__ */ a("div", {
|
|
68
68
|
className: "min-w-0 space-y-form-gap",
|
|
69
69
|
children: [
|
|
70
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ a("div", { children: [/* @__PURE__ */ i("label", {
|
|
71
71
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
72
72
|
children: c("bigconsole.widget.config.chart.chartTypeLabel", "Chart Type")
|
|
73
|
-
}), /* @__PURE__ */
|
|
73
|
+
}), /* @__PURE__ */ i("select", {
|
|
74
74
|
value: e.chartType || "line",
|
|
75
75
|
onChange: (e) => f("chartType", e.target.value),
|
|
76
76
|
className: "\n w-full px-3 py-2\n text-sm text-text-primary\n bg-bg-surface\n border border-border-default\n rounded-md\n focus:outline-none focus:ring-2 focus:ring-action-primary-bg\n ",
|
|
77
|
-
children: l.map((e) => /* @__PURE__ */
|
|
77
|
+
children: l.map((e) => /* @__PURE__ */ i("option", {
|
|
78
78
|
value: e.value,
|
|
79
79
|
children: e.label
|
|
80
80
|
}, e.value))
|
|
81
81
|
})] }),
|
|
82
|
-
!p && /* @__PURE__ */
|
|
83
|
-
/* @__PURE__ */
|
|
82
|
+
!p && /* @__PURE__ */ a(r, { children: [
|
|
83
|
+
/* @__PURE__ */ a("div", { children: [/* @__PURE__ */ i("label", {
|
|
84
84
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
85
85
|
children: c("bigconsole.widget.config.chart.xAxisFieldLabel", "X-Axis Field")
|
|
86
|
-
}), /* @__PURE__ */
|
|
86
|
+
}), /* @__PURE__ */ i("input", {
|
|
87
87
|
type: "text",
|
|
88
88
|
value: e.xAxisField || "",
|
|
89
89
|
onChange: (e) => f("xAxisField", e.target.value),
|
|
90
90
|
placeholder: c("bigconsole.widget.config.chart.xAxisFieldPlaceholder", "e.g., date, category"),
|
|
91
91
|
className: "\n w-full px-3 py-2\n text-sm text-text-primary\n bg-bg-surface\n border border-border-default\n rounded-md\n focus:outline-none focus:ring-2 focus:ring-action-primary-bg\n "
|
|
92
92
|
})] }),
|
|
93
|
-
/* @__PURE__ */
|
|
93
|
+
/* @__PURE__ */ a("div", {
|
|
94
94
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
|
|
95
|
-
children: [/* @__PURE__ */
|
|
95
|
+
children: [/* @__PURE__ */ a("div", { children: [/* @__PURE__ */ i("label", {
|
|
96
96
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
97
97
|
children: c("bigconsole.widget.config.chart.xAxisLabelLabel", "X-Axis Label")
|
|
98
|
-
}), /* @__PURE__ */
|
|
98
|
+
}), /* @__PURE__ */ i("input", {
|
|
99
99
|
type: "text",
|
|
100
100
|
value: e.xAxisLabel || "",
|
|
101
101
|
onChange: (e) => f("xAxisLabel", e.target.value),
|
|
102
102
|
placeholder: c("bigconsole.widget.config.chart.optionalPlaceholder", "Optional"),
|
|
103
103
|
className: "\n w-full px-3 py-2\n text-sm text-text-primary\n bg-bg-surface\n border border-border-default\n rounded-md\n focus:outline-none focus:ring-2 focus:ring-action-primary-bg\n "
|
|
104
|
-
})] }), /* @__PURE__ */
|
|
104
|
+
})] }), /* @__PURE__ */ a("div", { children: [/* @__PURE__ */ i("label", {
|
|
105
105
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
106
106
|
children: c("bigconsole.widget.config.chart.yAxisLabelLabel", "Y-Axis Label")
|
|
107
|
-
}), /* @__PURE__ */
|
|
107
|
+
}), /* @__PURE__ */ i("input", {
|
|
108
108
|
type: "text",
|
|
109
109
|
value: e.yAxisLabel || "",
|
|
110
110
|
onChange: (e) => f("yAxisLabel", e.target.value),
|
|
@@ -112,74 +112,74 @@ var s = e(function({ config: e, onChange: s }) {
|
|
|
112
112
|
className: "\n w-full px-3 py-2\n text-sm text-text-primary\n bg-bg-surface\n border border-border-default\n rounded-md\n focus:outline-none focus:ring-2 focus:ring-action-primary-bg\n "
|
|
113
113
|
})] })]
|
|
114
114
|
}),
|
|
115
|
-
(e.chartType === "line" || e.chartType === "area") && /* @__PURE__ */
|
|
115
|
+
(e.chartType === "line" || e.chartType === "area") && /* @__PURE__ */ a("div", { children: [/* @__PURE__ */ i("label", {
|
|
116
116
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
117
117
|
children: c("bigconsole.widget.config.chart.curveTypeLabel", "Curve Type")
|
|
118
|
-
}), /* @__PURE__ */
|
|
118
|
+
}), /* @__PURE__ */ i("select", {
|
|
119
119
|
value: e.curveType || "monotone",
|
|
120
120
|
onChange: (e) => f("curveType", e.target.value),
|
|
121
121
|
className: "\n w-full px-3 py-2\n text-sm text-text-primary\n bg-bg-surface\n border border-border-default\n rounded-md\n focus:outline-none focus:ring-2 focus:ring-action-primary-bg\n ",
|
|
122
|
-
children: u.map((e) => /* @__PURE__ */
|
|
122
|
+
children: u.map((e) => /* @__PURE__ */ i("option", {
|
|
123
123
|
value: e.value,
|
|
124
124
|
children: e.label
|
|
125
125
|
}, e.value))
|
|
126
126
|
})] })
|
|
127
127
|
] }),
|
|
128
|
-
p && /* @__PURE__ */
|
|
128
|
+
p && /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ a("div", {
|
|
129
129
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
|
|
130
|
-
children: [/* @__PURE__ */
|
|
130
|
+
children: [/* @__PURE__ */ a("div", { children: [/* @__PURE__ */ i("label", {
|
|
131
131
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
132
132
|
children: c("bigconsole.widget.config.chart.valueFieldLabel", "Value Field")
|
|
133
|
-
}), /* @__PURE__ */
|
|
133
|
+
}), /* @__PURE__ */ i("input", {
|
|
134
134
|
type: "text",
|
|
135
135
|
value: e.valueField || "",
|
|
136
136
|
onChange: (e) => f("valueField", e.target.value),
|
|
137
137
|
placeholder: c("bigconsole.widget.config.chart.valueFieldPlaceholder", "e.g., value"),
|
|
138
138
|
className: "\n w-full px-3 py-2\n text-sm text-text-primary\n bg-bg-surface\n border border-border-default\n rounded-md\n focus:outline-none focus:ring-2 focus:ring-action-primary-bg\n "
|
|
139
|
-
})] }), /* @__PURE__ */
|
|
139
|
+
})] }), /* @__PURE__ */ a("div", { children: [/* @__PURE__ */ i("label", {
|
|
140
140
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
141
141
|
children: c("bigconsole.widget.config.chart.labelFieldLabel", "Label Field")
|
|
142
|
-
}), /* @__PURE__ */
|
|
142
|
+
}), /* @__PURE__ */ i("input", {
|
|
143
143
|
type: "text",
|
|
144
144
|
value: e.labelField || "",
|
|
145
145
|
onChange: (e) => f("labelField", e.target.value),
|
|
146
146
|
placeholder: c("bigconsole.widget.config.chart.labelFieldPlaceholder", "e.g., name"),
|
|
147
147
|
className: "\n w-full px-3 py-2\n text-sm text-text-primary\n bg-bg-surface\n border border-border-default\n rounded-md\n focus:outline-none focus:ring-2 focus:ring-action-primary-bg\n "
|
|
148
148
|
})] })]
|
|
149
|
-
}), e.chartType === "pie" && /* @__PURE__ */
|
|
149
|
+
}), e.chartType === "pie" && /* @__PURE__ */ a("label", {
|
|
150
150
|
className: "flex items-center gap-3",
|
|
151
|
-
children: [/* @__PURE__ */
|
|
151
|
+
children: [/* @__PURE__ */ i("input", {
|
|
152
152
|
type: "checkbox",
|
|
153
153
|
checked: e.showAsDonut === !0,
|
|
154
154
|
onChange: (e) => f("showAsDonut", e.target.checked),
|
|
155
155
|
className: "\n w-4 h-4\n text-action-primary-bg\n bg-bg-surface\n border-border-default\n rounded\n focus:ring-action-primary-bg\n "
|
|
156
|
-
}), /* @__PURE__ */
|
|
156
|
+
}), /* @__PURE__ */ i("span", {
|
|
157
157
|
className: "text-sm text-text-primary",
|
|
158
158
|
children: c("bigconsole.widget.config.chart.showAsDonut", "Show as Donut")
|
|
159
159
|
})]
|
|
160
160
|
})] }),
|
|
161
|
-
/* @__PURE__ */
|
|
161
|
+
/* @__PURE__ */ a("div", { children: [/* @__PURE__ */ i("label", {
|
|
162
162
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
163
163
|
children: c("bigconsole.widget.config.chart.legendPositionLabel", "Legend Position")
|
|
164
|
-
}), /* @__PURE__ */
|
|
164
|
+
}), /* @__PURE__ */ i("select", {
|
|
165
165
|
value: e.legendPosition || "bottom",
|
|
166
166
|
onChange: (e) => f("legendPosition", e.target.value),
|
|
167
167
|
className: "\n w-full px-3 py-2\n text-sm text-text-primary\n bg-bg-surface\n border border-border-default\n rounded-md\n focus:outline-none focus:ring-2 focus:ring-action-primary-bg\n ",
|
|
168
|
-
children: d.map((e) => /* @__PURE__ */
|
|
168
|
+
children: d.map((e) => /* @__PURE__ */ i("option", {
|
|
169
169
|
value: e.value,
|
|
170
170
|
children: e.label
|
|
171
171
|
}, e.value))
|
|
172
172
|
})] }),
|
|
173
|
-
!p && /* @__PURE__ */
|
|
174
|
-
/* @__PURE__ */
|
|
173
|
+
!p && /* @__PURE__ */ a("div", { children: [
|
|
174
|
+
/* @__PURE__ */ i("label", {
|
|
175
175
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
176
176
|
children: c("bigconsole.widget.config.chart.fieldsToDisplayLabel", "Fields to Display")
|
|
177
177
|
}),
|
|
178
|
-
/* @__PURE__ */
|
|
178
|
+
/* @__PURE__ */ i("p", {
|
|
179
179
|
className: "text-xs text-text-secondary mb-2",
|
|
180
180
|
children: c("bigconsole.widget.config.chart.fieldsToDisplayHelp", "Select which numeric fields to show as chart series. Leave empty to show all.")
|
|
181
181
|
}),
|
|
182
|
-
/* @__PURE__ */
|
|
182
|
+
/* @__PURE__ */ i("input", {
|
|
183
183
|
type: "text",
|
|
184
184
|
value: e.selectedFields?.join(", ") || "",
|
|
185
185
|
onChange: (e) => {
|
|
@@ -189,63 +189,63 @@ var s = e(function({ config: e, onChange: s }) {
|
|
|
189
189
|
placeholder: c("bigconsole.widget.config.chart.fieldsToDisplayPlaceholder", "e.g., revenue, orders, users (comma-separated)"),
|
|
190
190
|
className: "\n w-full px-3 py-2\n text-sm text-text-primary\n bg-bg-surface\n border border-border-default\n rounded-md\n focus:outline-none focus:ring-2 focus:ring-action-primary-bg\n "
|
|
191
191
|
}),
|
|
192
|
-
/* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ i("p", {
|
|
193
193
|
className: "text-xs text-text-muted mt-1",
|
|
194
194
|
children: c("bigconsole.widget.config.chart.fieldsToDisplayHint", "Enter field names separated by commas")
|
|
195
195
|
})
|
|
196
196
|
] }),
|
|
197
|
-
/* @__PURE__ */
|
|
197
|
+
/* @__PURE__ */ a("div", {
|
|
198
198
|
role: "group",
|
|
199
199
|
"aria-label": "Display options",
|
|
200
200
|
className: "space-y-3 border-t border-[var(--color-border-subtle)] pt-form-gap",
|
|
201
201
|
children: [
|
|
202
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ i("p", {
|
|
203
203
|
className: "text-xs font-bold uppercase tracking-wider text-text-secondary",
|
|
204
204
|
children: "Display options"
|
|
205
205
|
}),
|
|
206
|
-
/* @__PURE__ */
|
|
206
|
+
/* @__PURE__ */ a("label", {
|
|
207
207
|
className: "flex items-center gap-3",
|
|
208
|
-
children: [/* @__PURE__ */
|
|
208
|
+
children: [/* @__PURE__ */ i("input", {
|
|
209
209
|
type: "checkbox",
|
|
210
210
|
checked: e.showGrid !== !1,
|
|
211
211
|
onChange: (e) => f("showGrid", e.target.checked),
|
|
212
212
|
className: "\n w-4 h-4\n text-action-primary-bg\n bg-bg-surface\n border-border-default\n rounded\n focus:ring-action-primary-bg\n "
|
|
213
|
-
}), /* @__PURE__ */
|
|
213
|
+
}), /* @__PURE__ */ i("span", {
|
|
214
214
|
className: "text-sm text-text-primary",
|
|
215
215
|
children: c("bigconsole.widget.config.chart.showGrid", "Show Grid")
|
|
216
216
|
})]
|
|
217
217
|
}),
|
|
218
|
-
/* @__PURE__ */
|
|
218
|
+
/* @__PURE__ */ a("label", {
|
|
219
219
|
className: "flex items-center gap-3",
|
|
220
|
-
children: [/* @__PURE__ */
|
|
220
|
+
children: [/* @__PURE__ */ i("input", {
|
|
221
221
|
type: "checkbox",
|
|
222
222
|
checked: e.showLegend !== !1,
|
|
223
223
|
onChange: (e) => f("showLegend", e.target.checked),
|
|
224
224
|
className: "\n w-4 h-4\n text-action-primary-bg\n bg-bg-surface\n border-border-default\n rounded\n focus:ring-action-primary-bg\n "
|
|
225
|
-
}), /* @__PURE__ */
|
|
225
|
+
}), /* @__PURE__ */ i("span", {
|
|
226
226
|
className: "text-sm text-text-primary",
|
|
227
227
|
children: c("bigconsole.widget.config.chart.showLegend", "Show Legend")
|
|
228
228
|
})]
|
|
229
229
|
}),
|
|
230
|
-
!p && /* @__PURE__ */
|
|
230
|
+
!p && /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ a("label", {
|
|
231
231
|
className: "flex items-center gap-3",
|
|
232
|
-
children: [/* @__PURE__ */
|
|
232
|
+
children: [/* @__PURE__ */ i("input", {
|
|
233
233
|
type: "checkbox",
|
|
234
234
|
checked: e.showDataPoints === !0,
|
|
235
235
|
onChange: (e) => f("showDataPoints", e.target.checked),
|
|
236
236
|
className: "\n w-4 h-4\n text-action-primary-bg\n bg-bg-surface\n border-border-default\n rounded\n focus:ring-action-primary-bg\n "
|
|
237
|
-
}), /* @__PURE__ */
|
|
237
|
+
}), /* @__PURE__ */ i("span", {
|
|
238
238
|
className: "text-sm text-text-primary",
|
|
239
239
|
children: c("bigconsole.widget.config.chart.showDataPoints", "Show Data Points")
|
|
240
240
|
})]
|
|
241
|
-
}), (e.chartType === "bar" || e.chartType === "area") && /* @__PURE__ */
|
|
241
|
+
}), (e.chartType === "bar" || e.chartType === "area") && /* @__PURE__ */ a("label", {
|
|
242
242
|
className: "flex items-center gap-3",
|
|
243
|
-
children: [/* @__PURE__ */
|
|
243
|
+
children: [/* @__PURE__ */ i("input", {
|
|
244
244
|
type: "checkbox",
|
|
245
245
|
checked: e.stacked === !0,
|
|
246
246
|
onChange: (e) => f("stacked", e.target.checked),
|
|
247
247
|
className: "\n w-4 h-4\n text-action-primary-bg\n bg-bg-surface\n border-border-default\n rounded\n focus:ring-action-primary-bg\n "
|
|
248
|
-
}), /* @__PURE__ */
|
|
248
|
+
}), /* @__PURE__ */ i("span", {
|
|
249
249
|
className: "text-sm text-text-primary",
|
|
250
250
|
children: c("bigconsole.widget.config.chart.stacked", "Stacked")
|
|
251
251
|
})]
|
|
@@ -1,106 +1,102 @@
|
|
|
1
1
|
import { useCrossFilterContext as e, useWidgetCrossFilter as t } from "../../../contexts/CrossFilterContext.js";
|
|
2
2
|
import "../../../contexts/index.js";
|
|
3
3
|
import n from "./ChartLegend.js";
|
|
4
|
-
import r from "./charts/
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
4
|
+
import { configuredNumericSeries as r, numericSeriesKeys as i } from "./charts/numericSeries.js";
|
|
5
|
+
import a from "./charts/LineChart.js";
|
|
6
|
+
import o from "./charts/BarChart.js";
|
|
7
|
+
import s from "./charts/AreaChart.js";
|
|
8
|
+
import c from "./charts/PieChart.js";
|
|
9
|
+
import l from "./charts/FunnelChart.js";
|
|
10
|
+
import u from "./charts/ComboChart.js";
|
|
11
|
+
import d from "./charts/WaterfallChart.js";
|
|
12
|
+
import f from "./charts/ScatterChart.js";
|
|
13
|
+
import { memo as p, useCallback as m, useMemo as h, useState as g } from "react";
|
|
14
|
+
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
14
15
|
//#region src/bigconsole/components/widgets/chart/ChartWidget.tsx
|
|
15
|
-
var
|
|
16
|
+
var y = [
|
|
16
17
|
"var(--color-chart-1)",
|
|
17
18
|
"var(--color-chart-2)",
|
|
18
19
|
"var(--color-chart-3)",
|
|
19
20
|
"var(--color-chart-4)",
|
|
20
21
|
"var(--color-chart-5)"
|
|
21
|
-
],
|
|
22
|
-
let
|
|
23
|
-
sourceField:
|
|
22
|
+
], b = p(function({ widget: p, data: b = [], onClick: x, onDrilldown: S }) {
|
|
23
|
+
let C = p.config, [w, T] = g([]), { handleDataClick: E, enabled: D } = t(p.id, C?.crossFilterMappings || [{
|
|
24
|
+
sourceField: C?.labelField || "name",
|
|
24
25
|
targetFilterId: "category"
|
|
25
|
-
}]), { clearAllCrossFilters:
|
|
26
|
-
type:
|
|
27
|
-
xAxisKey:
|
|
28
|
-
xAxisLabel:
|
|
29
|
-
yAxisLabel:
|
|
30
|
-
showGrid:
|
|
31
|
-
showLegend:
|
|
32
|
-
legendPosition:
|
|
33
|
-
showDots:
|
|
34
|
-
curveType:
|
|
35
|
-
colors:
|
|
36
|
-
seriesNames:
|
|
37
|
-
stacked:
|
|
38
|
-
isDonut:
|
|
39
|
-
innerRadius:
|
|
40
|
-
outerRadius:
|
|
41
|
-
referenceLines:
|
|
42
|
-
series:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
dataKey: e,
|
|
62
|
-
name: O.seriesNames?.[e] || e,
|
|
63
|
-
color: O.colors?.[t] || _[t % _.length],
|
|
64
|
-
hidden: S.includes(e)
|
|
65
|
-
}));
|
|
66
|
-
}, [
|
|
67
|
-
v,
|
|
68
|
-
O,
|
|
69
|
-
S,
|
|
70
|
-
x?.selectedFields
|
|
71
|
-
]), A = f((e) => {
|
|
72
|
-
C((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
73
|
-
}, []), j = f((e, t) => {
|
|
74
|
-
if (T) {
|
|
75
|
-
let t = e[x?.labelField || "name"];
|
|
76
|
-
w(e, t);
|
|
77
|
-
}
|
|
78
|
-
b ? b(e) : y && d.drilldowns?.length && y(e, t);
|
|
79
|
-
}, [
|
|
80
|
-
y,
|
|
26
|
+
}]), { clearAllCrossFilters: O, hasCrossFilters: k } = e(), A = h(() => ({
|
|
27
|
+
type: C?.chartType?.toLowerCase() || "line",
|
|
28
|
+
xAxisKey: C?.xAxisField || "name",
|
|
29
|
+
xAxisLabel: C?.xAxisLabel,
|
|
30
|
+
yAxisLabel: C?.yAxisLabel,
|
|
31
|
+
showGrid: C?.showGrid,
|
|
32
|
+
showLegend: C?.showLegend,
|
|
33
|
+
legendPosition: C?.legendPosition,
|
|
34
|
+
showDots: C?.showDataPoints,
|
|
35
|
+
curveType: C?.curveType,
|
|
36
|
+
colors: C?.colors,
|
|
37
|
+
seriesNames: C?.seriesLabels,
|
|
38
|
+
stacked: C?.stacked,
|
|
39
|
+
isDonut: C?.showAsDonut,
|
|
40
|
+
innerRadius: C?.innerRadius,
|
|
41
|
+
outerRadius: C?.outerRadius,
|
|
42
|
+
referenceLines: C?.referenceLines,
|
|
43
|
+
series: C?.series,
|
|
44
|
+
selectedFields: C?.selectedFields,
|
|
45
|
+
dualAxis: C?.dualAxis,
|
|
46
|
+
yAxisRightLabel: C?.yAxisRightLabel,
|
|
47
|
+
logScale: C?.logScale,
|
|
48
|
+
valueField: C?.valueField,
|
|
49
|
+
labelField: C?.labelField,
|
|
50
|
+
showTotal: C?.showTotal,
|
|
51
|
+
totalLabel: C?.totalLabel,
|
|
52
|
+
xField: C?.xField,
|
|
53
|
+
yField: C?.yField,
|
|
54
|
+
sizeField: C?.sizeField,
|
|
55
|
+
colorField: C?.colorField
|
|
56
|
+
}), [C]), j = A.type === "combo" || A.dualAxis === !0 || A.series?.some((e) => e.axis === "right" || e.type === "bar") && A.series?.some((e) => e.type === "line") || !1, M = h(() => !b.length || A.type === "pie" || A.type === "funnel" || A.type === "scatter" || A.type === "waterfall" ? [] : (j && A.selectedFields !== void 0 ? r(b, A).map((e) => e.field) : i(b, A.xAxisKey, A.selectedFields)).map((e, t) => ({
|
|
57
|
+
dataKey: e,
|
|
58
|
+
name: A.seriesNames?.[e] || e,
|
|
59
|
+
color: A.colors?.[t] || y[t % y.length],
|
|
60
|
+
hidden: w.includes(e)
|
|
61
|
+
})), [
|
|
81
62
|
b,
|
|
82
|
-
|
|
83
|
-
T,
|
|
63
|
+
A,
|
|
84
64
|
w,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
65
|
+
C?.selectedFields,
|
|
66
|
+
j
|
|
67
|
+
]), N = m((e) => {
|
|
68
|
+
T((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
69
|
+
}, []), P = m((e, t) => {
|
|
70
|
+
if (D) {
|
|
71
|
+
let t = e[C?.labelField || "name"];
|
|
72
|
+
E(e, t);
|
|
73
|
+
}
|
|
74
|
+
S ? S(e) : x && p.drilldowns?.length && x(e, t);
|
|
75
|
+
}, [
|
|
76
|
+
x,
|
|
77
|
+
S,
|
|
78
|
+
p.drilldowns,
|
|
79
|
+
D,
|
|
80
|
+
E,
|
|
81
|
+
C?.labelField
|
|
82
|
+
]);
|
|
83
|
+
return /* @__PURE__ */ v("div", {
|
|
88
84
|
className: "flex flex-col h-full p-4",
|
|
89
85
|
children: [
|
|
90
|
-
|
|
86
|
+
k && /* @__PURE__ */ _("div", {
|
|
91
87
|
className: "flex items-center gap-2 mb-2 -mt-1",
|
|
92
|
-
children: /* @__PURE__ */
|
|
88
|
+
children: /* @__PURE__ */ v("button", {
|
|
93
89
|
type: "button",
|
|
94
90
|
onClick: (e) => {
|
|
95
|
-
e.stopPropagation(),
|
|
91
|
+
e.stopPropagation(), O();
|
|
96
92
|
},
|
|
97
93
|
className: "\n inline-flex items-center gap-1.5\n px-2.5 py-1 rounded-md\n text-xs font-medium\n bg-action-primary-bg/10 text-action-primary-text\n hover:bg-action-primary-bg/20\n transition-colors\n ",
|
|
98
|
-
children: [/* @__PURE__ */
|
|
94
|
+
children: [/* @__PURE__ */ _("svg", {
|
|
99
95
|
className: "w-3.5 h-3.5",
|
|
100
96
|
fill: "none",
|
|
101
97
|
stroke: "currentColor",
|
|
102
98
|
viewBox: "0 0 24 24",
|
|
103
|
-
children: /* @__PURE__ */
|
|
99
|
+
children: /* @__PURE__ */ _("path", {
|
|
104
100
|
strokeLinecap: "round",
|
|
105
101
|
strokeLinejoin: "round",
|
|
106
102
|
strokeWidth: 2,
|
|
@@ -109,73 +105,73 @@ var _ = [
|
|
|
109
105
|
}), "Clear Filter"]
|
|
110
106
|
})
|
|
111
107
|
}),
|
|
112
|
-
|
|
113
|
-
items:
|
|
108
|
+
A.legendPosition === "top" && M.length > 0 && /* @__PURE__ */ _(n, {
|
|
109
|
+
items: M,
|
|
114
110
|
position: "top",
|
|
115
|
-
onItemClick:
|
|
111
|
+
onItemClick: N
|
|
116
112
|
}),
|
|
117
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ _("div", {
|
|
118
114
|
className: "flex-1 min-h-0",
|
|
119
115
|
children: (() => {
|
|
120
|
-
if (
|
|
121
|
-
data:
|
|
122
|
-
config:
|
|
123
|
-
hiddenSeries:
|
|
124
|
-
onDataClick:
|
|
116
|
+
if (j) return /* @__PURE__ */ _(u, {
|
|
117
|
+
data: b,
|
|
118
|
+
config: A,
|
|
119
|
+
hiddenSeries: w,
|
|
120
|
+
onDataClick: P
|
|
125
121
|
});
|
|
126
|
-
switch (
|
|
127
|
-
case "waterfall": return /* @__PURE__ */
|
|
128
|
-
data:
|
|
129
|
-
config:
|
|
130
|
-
onDataClick:
|
|
122
|
+
switch (A.type) {
|
|
123
|
+
case "waterfall": return /* @__PURE__ */ _(d, {
|
|
124
|
+
data: b,
|
|
125
|
+
config: A,
|
|
126
|
+
onDataClick: P
|
|
131
127
|
});
|
|
132
|
-
case "scatter": return /* @__PURE__ */
|
|
133
|
-
data:
|
|
134
|
-
config:
|
|
135
|
-
onDataClick:
|
|
128
|
+
case "scatter": return /* @__PURE__ */ _(f, {
|
|
129
|
+
data: b,
|
|
130
|
+
config: A,
|
|
131
|
+
onDataClick: P
|
|
136
132
|
});
|
|
137
|
-
case "bar": return /* @__PURE__ */
|
|
138
|
-
data:
|
|
139
|
-
config:
|
|
140
|
-
hiddenSeries:
|
|
141
|
-
onDataClick:
|
|
133
|
+
case "bar": return /* @__PURE__ */ _(o, {
|
|
134
|
+
data: b,
|
|
135
|
+
config: A,
|
|
136
|
+
hiddenSeries: w,
|
|
137
|
+
onDataClick: P
|
|
142
138
|
});
|
|
143
|
-
case "area": return /* @__PURE__ */
|
|
144
|
-
data:
|
|
145
|
-
config:
|
|
146
|
-
hiddenSeries:
|
|
147
|
-
onDataClick:
|
|
139
|
+
case "area": return /* @__PURE__ */ _(s, {
|
|
140
|
+
data: b,
|
|
141
|
+
config: A,
|
|
142
|
+
hiddenSeries: w,
|
|
143
|
+
onDataClick: P
|
|
148
144
|
});
|
|
149
|
-
case "pie": return /* @__PURE__ */
|
|
150
|
-
data:
|
|
151
|
-
config:
|
|
152
|
-
dataKey:
|
|
153
|
-
nameKey:
|
|
154
|
-
onDataClick:
|
|
145
|
+
case "pie": return /* @__PURE__ */ _(c, {
|
|
146
|
+
data: b,
|
|
147
|
+
config: A,
|
|
148
|
+
dataKey: C?.valueField || "value",
|
|
149
|
+
nameKey: C?.labelField || "name",
|
|
150
|
+
onDataClick: P
|
|
155
151
|
});
|
|
156
|
-
case "funnel": return /* @__PURE__ */
|
|
157
|
-
data:
|
|
158
|
-
config:
|
|
159
|
-
dataKey:
|
|
160
|
-
nameKey:
|
|
161
|
-
onDataClick:
|
|
152
|
+
case "funnel": return /* @__PURE__ */ _(l, {
|
|
153
|
+
data: b,
|
|
154
|
+
config: A,
|
|
155
|
+
dataKey: C?.valueField || "value",
|
|
156
|
+
nameKey: C?.labelField || "name",
|
|
157
|
+
onDataClick: P
|
|
162
158
|
});
|
|
163
|
-
default: return /* @__PURE__ */
|
|
164
|
-
data:
|
|
165
|
-
config:
|
|
166
|
-
hiddenSeries:
|
|
167
|
-
onDataClick:
|
|
159
|
+
default: return /* @__PURE__ */ _(a, {
|
|
160
|
+
data: b,
|
|
161
|
+
config: A,
|
|
162
|
+
hiddenSeries: w,
|
|
163
|
+
onDataClick: P
|
|
168
164
|
});
|
|
169
165
|
}
|
|
170
166
|
})()
|
|
171
167
|
}),
|
|
172
|
-
|
|
173
|
-
items:
|
|
168
|
+
A.legendPosition === "bottom" && M.length > 0 && /* @__PURE__ */ _(n, {
|
|
169
|
+
items: M,
|
|
174
170
|
position: "bottom",
|
|
175
|
-
onItemClick:
|
|
171
|
+
onItemClick: N
|
|
176
172
|
})
|
|
177
173
|
]
|
|
178
174
|
});
|
|
179
175
|
});
|
|
180
176
|
//#endregion
|
|
181
|
-
export {
|
|
177
|
+
export { b as default };
|