@burdenoff/microfe-bigconsole 2026.1012.4 → 2026.1012.6
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/BigConsoleRoutes.js +149 -140
- package/dist/bigconsole/assistant/assistantProduct.js +4 -1
- package/dist/bigconsole/assistant/displayCopy.d.ts +32 -0
- package/dist/bigconsole/assistant/pageContext.d.ts +14 -0
- package/dist/bigconsole/assistant/pageContext.js +6 -1
- package/dist/bigconsole/assistant/pageControls.d.ts +81 -0
- package/dist/bigconsole/assistant/pageControls.js +169 -0
- package/dist/bigconsole/assistant/previewControl.d.ts +16 -0
- package/dist/bigconsole/assistant/previewControl.js +10 -0
- package/dist/bigconsole/assistant/recordAdapters.js +27 -26
- package/dist/bigconsole/assistant/usePreviewControl.d.ts +2 -0
- package/dist/bigconsole/assistant/usePreviewControl.js +20 -0
- package/dist/bigconsole/components/builder/inspector/AppearanceSection.js +9 -9
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +31 -31
- package/dist/bigconsole/components/common/SortBySelect.d.ts +11 -0
- package/dist/bigconsole/components/common/SortBySelect.js +29 -0
- package/dist/bigconsole/components/common/index.d.ts +1 -0
- package/dist/bigconsole/components/common/index.js +1 -0
- 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 +15 -15
- 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 +153 -153
- 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 +134 -134
- 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 +46 -46
- 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 +51 -50
- 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/AiPreviewContent.js +0 -1
- package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +77 -76
- package/dist/bigconsole/components/preview/AiPreviewPanel.js +96 -95
- 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 +507 -499
- package/dist/bigconsole/components/widgets/advanced/AdvancedWidgetConfig.js +14 -14
- package/dist/bigconsole/components/widgets/advanced/AdvancedWidgets.js +68 -67
- package/dist/bigconsole/components/widgets/advanced/boxPlotDescription.d.ts +7 -0
- package/dist/bigconsole/components/widgets/advanced/boxPlotDescription.js +12 -0
- 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/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/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/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/constants/backendErrors.js +94 -0
- package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +10 -10
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +67 -67
- package/dist/bigconsole/hooks/useDashboardLayoutBaseline.d.ts +14 -0
- package/dist/bigconsole/hooks/useDashboardLayoutBaseline.js +32 -0
- package/dist/bigconsole/hooks/useDataSinkAlerts.d.ts +23 -0
- package/dist/bigconsole/hooks/useDataSinkAlerts.js +138 -113
- package/dist/bigconsole/hooks/useDrilldown.js +3 -3
- package/dist/bigconsole/hooks/useGlobalFilters.js +3 -3
- package/dist/bigconsole/pages/AdminPage.js +130 -130
- package/dist/bigconsole/pages/DashboardBuilderPage.js +72 -60
- package/dist/bigconsole/pages/DashboardViewPage.js +244 -221
- package/dist/bigconsole/pages/DashboardsPage.js +269 -221
- package/dist/bigconsole/pages/DataParsersPage.js +180 -157
- package/dist/bigconsole/pages/DataSinkAlertsPage.js +62 -55
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +252 -234
- package/dist/bigconsole/pages/DataSinkViewPage.js +1 -1
- package/dist/bigconsole/pages/DataSinksPage.js +335 -299
- package/dist/bigconsole/pages/DataSourcesPage.js +5 -5
- package/dist/bigconsole/pages/InsightsPage.js +279 -265
- package/dist/bigconsole/pages/OverviewPage.js +47 -47
- package/dist/bigconsole/pages/ParserBuilderPage.js +229 -213
- package/dist/bigconsole/pages/ParserViewPage.js +97 -97
- package/dist/bigconsole/pages/PipelineBuilderPage.js +256 -214
- package/dist/bigconsole/pages/PipelineViewPage.js +146 -146
- package/dist/bigconsole/pages/PipelinesPage.js +107 -88
- package/dist/bigconsole/pages/SettingsPage.js +179 -173
- 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 +34 -34
- package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +69 -69
- package/dist/bigconsole/renderers/adapters/CustomRenderer.js +46 -46
- package/dist/bigconsole/store/widgetStore.d.ts +12 -0
- package/dist/bigconsole/store/widgetStore.js +3 -1
- package/dist/bigconsole/utils/backendError.d.ts +18 -0
- package/dist/bigconsole/utils/backendError.js +42 -0
- package/dist/bigconsole/utils/dashboardList.d.ts +28 -0
- package/dist/bigconsole/utils/dashboardList.js +15 -0
- package/dist/bigconsole/utils/dataSinkList.d.ts +15 -0
- package/dist/bigconsole/utils/dataSinkList.js +15 -0
- package/dist/bigconsole/utils/formDirty.d.ts +82 -0
- package/dist/bigconsole/utils/formDirty.js +21 -0
- package/dist/bigconsole/utils/insightsDraft.d.ts +29 -0
- package/dist/bigconsole/utils/insightsDraft.js +8 -0
- package/dist/bigconsole/utils/layoutBaseline.d.ts +130 -0
- package/dist/bigconsole/utils/layoutBaseline.js +96 -0
- package/dist/bigconsole/utils/listSort.d.ts +80 -0
- package/dist/bigconsole/utils/listSort.js +85 -0
- package/dist/bigconsole/utils/widgetFormDirty.d.ts +16 -0
- package/dist/bigconsole/utils/widgetFormDirty.js +13 -0
- package/dist/bigconsole/workflowOpen.js +15 -14
- package/package.json +3 -3
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { memo as e, useCallback as t } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useI18n as n } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
3
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
4
|
//#region src/bigconsole/components/widgets/list/ListConfig.tsx
|
|
5
5
|
var a = e(function({ config: e, onChange: a }) {
|
|
6
|
-
let { t: o } =
|
|
6
|
+
let { t: o } = n(), s = t((t, n) => {
|
|
7
7
|
a({
|
|
8
8
|
...e,
|
|
9
9
|
[t]: n
|
|
10
10
|
});
|
|
11
11
|
}, [e, a]);
|
|
12
|
-
return /* @__PURE__ */
|
|
12
|
+
return /* @__PURE__ */ i("div", {
|
|
13
13
|
className: "min-w-0 space-y-form-gap",
|
|
14
14
|
children: [
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
15
|
+
/* @__PURE__ */ i("div", { children: [
|
|
16
|
+
/* @__PURE__ */ r("label", {
|
|
17
17
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
18
18
|
children: o("bigconsole.widget.config.list.maxItems.label", "Maximum Items to Display")
|
|
19
19
|
}),
|
|
20
|
-
/* @__PURE__ */
|
|
20
|
+
/* @__PURE__ */ r("input", {
|
|
21
21
|
type: "number",
|
|
22
22
|
value: e.maxItems ?? "",
|
|
23
23
|
onChange: (e) => s("maxItems", e.target.value ? Number(e.target.value) : void 0),
|
|
@@ -25,104 +25,104 @@ var a = e(function({ config: e, onChange: a }) {
|
|
|
25
25
|
placeholder: o("bigconsole.widget.config.list.maxItems.placeholder", "No limit"),
|
|
26
26
|
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 "
|
|
27
27
|
}),
|
|
28
|
-
/* @__PURE__ */
|
|
28
|
+
/* @__PURE__ */ r("p", {
|
|
29
29
|
className: "text-xs text-text-secondary mt-1",
|
|
30
30
|
children: o("bigconsole.widget.config.list.maxItems.help", "Leave empty to show all items")
|
|
31
31
|
})
|
|
32
32
|
] }),
|
|
33
|
-
/* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("label", {
|
|
34
34
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
35
35
|
children: o("bigconsole.widget.config.list.titleField.label", "Title Field")
|
|
36
|
-
}), /* @__PURE__ */
|
|
36
|
+
}), /* @__PURE__ */ r("input", {
|
|
37
37
|
type: "text",
|
|
38
38
|
value: e.titleField || "",
|
|
39
39
|
onChange: (e) => s("titleField", e.target.value),
|
|
40
40
|
placeholder: o("bigconsole.widget.config.list.titleField.placeholder", "e.g., name, title"),
|
|
41
41
|
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 "
|
|
42
42
|
})] }),
|
|
43
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("label", {
|
|
44
44
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
45
45
|
children: o("bigconsole.widget.config.list.subtitleField.label", "Subtitle Field")
|
|
46
|
-
}), /* @__PURE__ */
|
|
46
|
+
}), /* @__PURE__ */ r("input", {
|
|
47
47
|
type: "text",
|
|
48
48
|
value: e.subtitleField || "",
|
|
49
49
|
onChange: (e) => s("subtitleField", e.target.value),
|
|
50
50
|
placeholder: o("bigconsole.widget.config.list.subtitleField.placeholder", "e.g., description, email"),
|
|
51
51
|
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 "
|
|
52
52
|
})] }),
|
|
53
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("label", {
|
|
54
54
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
55
55
|
children: o("bigconsole.widget.config.list.valueField.label", "Value Field (right side)")
|
|
56
|
-
}), /* @__PURE__ */
|
|
56
|
+
}), /* @__PURE__ */ r("input", {
|
|
57
57
|
type: "text",
|
|
58
58
|
value: e.valueField || "",
|
|
59
59
|
onChange: (e) => s("valueField", e.target.value),
|
|
60
60
|
placeholder: o("bigconsole.widget.config.list.valueField.placeholder", "e.g., amount, count"),
|
|
61
61
|
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 "
|
|
62
62
|
})] }),
|
|
63
|
-
/* @__PURE__ */
|
|
63
|
+
/* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("label", {
|
|
64
64
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
65
65
|
children: o("bigconsole.widget.config.list.badgeField.label", "Badge Field")
|
|
66
|
-
}), /* @__PURE__ */
|
|
66
|
+
}), /* @__PURE__ */ r("input", {
|
|
67
67
|
type: "text",
|
|
68
68
|
value: e.badgeField || "",
|
|
69
69
|
onChange: (e) => s("badgeField", e.target.value),
|
|
70
70
|
placeholder: o("bigconsole.widget.config.list.badgeField.placeholder", "e.g., status, type"),
|
|
71
71
|
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 "
|
|
72
72
|
})] }),
|
|
73
|
-
/* @__PURE__ */
|
|
73
|
+
/* @__PURE__ */ i("div", {
|
|
74
74
|
role: "group",
|
|
75
75
|
"aria-label": "Display options",
|
|
76
76
|
className: "space-y-3 border-t border-[var(--color-border-subtle)] pt-form-gap",
|
|
77
77
|
children: [
|
|
78
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ r("p", {
|
|
79
79
|
className: "text-xs font-bold uppercase tracking-wider text-text-secondary",
|
|
80
80
|
children: "Display options"
|
|
81
81
|
}),
|
|
82
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ i("label", {
|
|
83
83
|
className: "flex items-center gap-3",
|
|
84
|
-
children: [/* @__PURE__ */
|
|
84
|
+
children: [/* @__PURE__ */ r("input", {
|
|
85
85
|
type: "checkbox",
|
|
86
86
|
checked: e.showCount !== !1,
|
|
87
87
|
onChange: (e) => s("showCount", e.target.checked),
|
|
88
88
|
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 "
|
|
89
|
-
}), /* @__PURE__ */
|
|
89
|
+
}), /* @__PURE__ */ r("span", {
|
|
90
90
|
className: "text-sm text-text-primary",
|
|
91
91
|
children: o("bigconsole.widget.config.list.showCount", "Show item count")
|
|
92
92
|
})]
|
|
93
93
|
}),
|
|
94
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ i("label", {
|
|
95
95
|
className: "flex items-center gap-3",
|
|
96
|
-
children: [/* @__PURE__ */
|
|
96
|
+
children: [/* @__PURE__ */ r("input", {
|
|
97
97
|
type: "checkbox",
|
|
98
98
|
checked: e.showSearch === !0,
|
|
99
99
|
onChange: (e) => s("showSearch", e.target.checked),
|
|
100
100
|
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 "
|
|
101
|
-
}), /* @__PURE__ */
|
|
101
|
+
}), /* @__PURE__ */ r("span", {
|
|
102
102
|
className: "text-sm text-text-primary",
|
|
103
103
|
children: o("bigconsole.widget.config.list.showSearch", "Show search box")
|
|
104
104
|
})]
|
|
105
105
|
}),
|
|
106
|
-
/* @__PURE__ */
|
|
106
|
+
/* @__PURE__ */ i("label", {
|
|
107
107
|
className: "flex items-center gap-3",
|
|
108
|
-
children: [/* @__PURE__ */
|
|
108
|
+
children: [/* @__PURE__ */ r("input", {
|
|
109
109
|
type: "checkbox",
|
|
110
110
|
checked: e.showViewAll !== !1,
|
|
111
111
|
onChange: (e) => s("showViewAll", e.target.checked),
|
|
112
112
|
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 "
|
|
113
|
-
}), /* @__PURE__ */
|
|
113
|
+
}), /* @__PURE__ */ r("span", {
|
|
114
114
|
className: "text-sm text-text-primary",
|
|
115
115
|
children: o("bigconsole.widget.config.list.showViewAll", "Show \"View All\" link when truncated")
|
|
116
116
|
})]
|
|
117
117
|
}),
|
|
118
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ i("label", {
|
|
119
119
|
className: "flex items-center gap-3",
|
|
120
|
-
children: [/* @__PURE__ */
|
|
120
|
+
children: [/* @__PURE__ */ r("input", {
|
|
121
121
|
type: "checkbox",
|
|
122
122
|
checked: e.showIcon === !0,
|
|
123
123
|
onChange: (e) => s("showIcon", e.target.checked),
|
|
124
124
|
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 "
|
|
125
|
-
}), /* @__PURE__ */
|
|
125
|
+
}), /* @__PURE__ */ r("span", {
|
|
126
126
|
className: "text-sm text-text-primary",
|
|
127
127
|
children: o("bigconsole.widget.config.list.showIcon", "Show item icons")
|
|
128
128
|
})]
|
|
@@ -1,89 +1,89 @@
|
|
|
1
1
|
import { memo as e, useCallback as t } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useI18n as n } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
3
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
4
|
//#region src/bigconsole/components/widgets/metric-card/MetricCardConfig.tsx
|
|
5
5
|
var a = e(function({ config: e, onChange: a }) {
|
|
6
|
-
let { t: o } =
|
|
6
|
+
let { t: o } = n(), s = t((t, n) => {
|
|
7
7
|
a({
|
|
8
8
|
...e,
|
|
9
9
|
[t]: n
|
|
10
10
|
});
|
|
11
11
|
}, [e, a]);
|
|
12
|
-
return /* @__PURE__ */
|
|
12
|
+
return /* @__PURE__ */ i("div", {
|
|
13
13
|
className: "min-w-0 space-y-form-gap",
|
|
14
14
|
children: [
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
15
|
+
/* @__PURE__ */ i("div", { children: [
|
|
16
|
+
/* @__PURE__ */ r("label", {
|
|
17
17
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
18
18
|
children: o("bigconsole.widget.config.metricCard.valueField.label", "Value Field")
|
|
19
19
|
}),
|
|
20
|
-
/* @__PURE__ */
|
|
20
|
+
/* @__PURE__ */ r("input", {
|
|
21
21
|
type: "text",
|
|
22
22
|
value: e.valueField || "",
|
|
23
23
|
onChange: (e) => s("valueField", e.target.value),
|
|
24
24
|
placeholder: o("bigconsole.widget.config.metricCard.valueField.placeholder", "e.g., totalSales, value, amount"),
|
|
25
25
|
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 "
|
|
26
26
|
}),
|
|
27
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ r("p", {
|
|
28
28
|
className: "text-xs text-text-secondary mt-1",
|
|
29
29
|
children: o("bigconsole.widget.config.metricCard.valueField.help", "Field name to extract from data (leave empty for auto-detect)")
|
|
30
30
|
})
|
|
31
31
|
] }),
|
|
32
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("label", {
|
|
33
33
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
34
34
|
children: o("bigconsole.widget.config.metricCard.subtitle.label", "Subtitle")
|
|
35
|
-
}), /* @__PURE__ */
|
|
35
|
+
}), /* @__PURE__ */ r("input", {
|
|
36
36
|
type: "text",
|
|
37
37
|
value: e.subtitle || "",
|
|
38
38
|
onChange: (e) => s("subtitle", e.target.value),
|
|
39
39
|
placeholder: o("bigconsole.widget.config.metricCard.subtitle.placeholder", "e.g., Total Revenue"),
|
|
40
40
|
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 "
|
|
41
41
|
})] }),
|
|
42
|
-
/* @__PURE__ */
|
|
42
|
+
/* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("label", {
|
|
43
43
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
44
44
|
children: o("bigconsole.widget.config.metricCard.format.label", "Value Format")
|
|
45
|
-
}), /* @__PURE__ */
|
|
45
|
+
}), /* @__PURE__ */ i("select", {
|
|
46
46
|
value: e.format || "auto",
|
|
47
47
|
onChange: (e) => s("format", e.target.value),
|
|
48
48
|
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 ",
|
|
49
49
|
children: [
|
|
50
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ r("option", {
|
|
51
51
|
value: "auto",
|
|
52
52
|
children: o("bigconsole.widget.config.metricCard.format.auto", "Auto (from data)")
|
|
53
53
|
}),
|
|
54
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ r("option", {
|
|
55
55
|
value: "number",
|
|
56
56
|
children: o("bigconsole.widget.config.metricCard.format.number", "Number")
|
|
57
57
|
}),
|
|
58
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ r("option", {
|
|
59
59
|
value: "currency",
|
|
60
60
|
children: o("bigconsole.widget.config.metricCard.format.currency", "Currency")
|
|
61
61
|
}),
|
|
62
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ r("option", {
|
|
63
63
|
value: "percentage",
|
|
64
64
|
children: o("bigconsole.widget.config.metricCard.format.percentage", "Percentage")
|
|
65
65
|
}),
|
|
66
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ r("option", {
|
|
67
67
|
value: "compact",
|
|
68
68
|
children: o("bigconsole.widget.config.metricCard.format.compact", "Compact (1K, 1M)")
|
|
69
69
|
})
|
|
70
70
|
]
|
|
71
71
|
})] }),
|
|
72
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ i("div", {
|
|
73
73
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
|
|
74
|
-
children: [/* @__PURE__ */
|
|
74
|
+
children: [/* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("label", {
|
|
75
75
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
76
76
|
children: o("bigconsole.widget.config.metricCard.prefix.label", "Prefix")
|
|
77
|
-
}), /* @__PURE__ */
|
|
77
|
+
}), /* @__PURE__ */ r("input", {
|
|
78
78
|
type: "text",
|
|
79
79
|
value: e.prefix || "",
|
|
80
80
|
onChange: (e) => s("prefix", e.target.value),
|
|
81
81
|
placeholder: o("bigconsole.widget.config.metricCard.prefix.placeholder", "e.g., $"),
|
|
82
82
|
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 "
|
|
83
|
-
})] }), /* @__PURE__ */
|
|
83
|
+
})] }), /* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("label", {
|
|
84
84
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
85
85
|
children: o("bigconsole.widget.config.metricCard.suffix.label", "Suffix")
|
|
86
|
-
}), /* @__PURE__ */
|
|
86
|
+
}), /* @__PURE__ */ r("input", {
|
|
87
87
|
type: "text",
|
|
88
88
|
value: e.suffix || "",
|
|
89
89
|
onChange: (e) => s("suffix", e.target.value),
|
|
@@ -91,69 +91,69 @@ var a = e(function({ config: e, onChange: a }) {
|
|
|
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
93
|
}),
|
|
94
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("label", {
|
|
95
95
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
96
96
|
children: o("bigconsole.widget.config.metricCard.comparisonLabel.label", "Comparison Label")
|
|
97
|
-
}), /* @__PURE__ */
|
|
97
|
+
}), /* @__PURE__ */ r("input", {
|
|
98
98
|
type: "text",
|
|
99
99
|
value: e.comparisonLabel || "",
|
|
100
100
|
onChange: (e) => s("comparisonLabel", e.target.value),
|
|
101
101
|
placeholder: o("bigconsole.widget.config.metricCard.comparisonLabel.placeholder", "e.g., vs last week"),
|
|
102
102
|
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 "
|
|
103
103
|
})] }),
|
|
104
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ i("div", {
|
|
105
105
|
role: "group",
|
|
106
106
|
"aria-label": "Display options",
|
|
107
107
|
className: "space-y-3 border-t border-[var(--color-border-subtle)] pt-form-gap",
|
|
108
108
|
children: [
|
|
109
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ r("p", {
|
|
110
110
|
className: "text-xs font-bold uppercase tracking-wider text-text-secondary",
|
|
111
111
|
children: "Display options"
|
|
112
112
|
}),
|
|
113
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ i("label", {
|
|
114
114
|
className: "flex items-center gap-3",
|
|
115
|
-
children: [/* @__PURE__ */
|
|
115
|
+
children: [/* @__PURE__ */ r("input", {
|
|
116
116
|
type: "checkbox",
|
|
117
117
|
checked: e.showTrend !== !1,
|
|
118
118
|
onChange: (e) => s("showTrend", e.target.checked),
|
|
119
119
|
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 "
|
|
120
|
-
}), /* @__PURE__ */
|
|
120
|
+
}), /* @__PURE__ */ r("span", {
|
|
121
121
|
className: "text-sm text-text-primary",
|
|
122
122
|
children: o("bigconsole.widget.config.metricCard.showTrend", "Show trend indicator")
|
|
123
123
|
})]
|
|
124
124
|
}),
|
|
125
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ i("label", {
|
|
126
126
|
className: "flex items-center gap-3",
|
|
127
|
-
children: [/* @__PURE__ */
|
|
127
|
+
children: [/* @__PURE__ */ r("input", {
|
|
128
128
|
type: "checkbox",
|
|
129
129
|
checked: e.showComparison !== !1,
|
|
130
130
|
onChange: (e) => s("showComparison", e.target.checked),
|
|
131
131
|
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 "
|
|
132
|
-
}), /* @__PURE__ */
|
|
132
|
+
}), /* @__PURE__ */ r("span", {
|
|
133
133
|
className: "text-sm text-text-primary",
|
|
134
134
|
children: o("bigconsole.widget.config.metricCard.showComparison", "Show comparison badge")
|
|
135
135
|
})]
|
|
136
136
|
}),
|
|
137
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ i("label", {
|
|
138
138
|
className: "flex items-center gap-3",
|
|
139
|
-
children: [/* @__PURE__ */
|
|
139
|
+
children: [/* @__PURE__ */ r("input", {
|
|
140
140
|
type: "checkbox",
|
|
141
141
|
checked: e.showSparkline !== !1,
|
|
142
142
|
onChange: (e) => s("showSparkline", e.target.checked),
|
|
143
143
|
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 "
|
|
144
|
-
}), /* @__PURE__ */
|
|
144
|
+
}), /* @__PURE__ */ r("span", {
|
|
145
145
|
className: "text-sm text-text-primary",
|
|
146
146
|
children: o("bigconsole.widget.config.metricCard.showSparkline", "Show sparkline chart")
|
|
147
147
|
})]
|
|
148
148
|
}),
|
|
149
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ i("label", {
|
|
150
150
|
className: "flex items-center gap-3",
|
|
151
|
-
children: [/* @__PURE__ */
|
|
151
|
+
children: [/* @__PURE__ */ r("input", {
|
|
152
152
|
type: "checkbox",
|
|
153
153
|
checked: e.positiveIsGood !== !1,
|
|
154
154
|
onChange: (e) => s("positiveIsGood", 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__ */ r("span", {
|
|
157
157
|
className: "text-sm text-text-primary",
|
|
158
158
|
children: o("bigconsole.widget.config.metricCard.positiveIsGood", "Positive change is good")
|
|
159
159
|
})]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { memo as e, useMemo as t } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useI18n as n } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
3
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
4
|
//#region src/bigconsole/components/widgets/metric-card/SparklineChart.tsx
|
|
5
5
|
var a = {
|
|
6
6
|
primary: {
|
|
@@ -24,7 +24,7 @@ var a = {
|
|
|
24
24
|
fill: "fill-text-secondary/10"
|
|
25
25
|
}
|
|
26
26
|
}, o = e(function({ data: e, width: o = 100, height: s = 32, color: c = "primary", showFill: l = !0, strokeWidth: u = 2 }) {
|
|
27
|
-
let { t: d } =
|
|
27
|
+
let { t: d } = n(), f = t(() => {
|
|
28
28
|
if (!e.length) return {
|
|
29
29
|
line: "",
|
|
30
30
|
area: "",
|
|
@@ -56,31 +56,31 @@ var a = {
|
|
|
56
56
|
s,
|
|
57
57
|
u
|
|
58
58
|
]);
|
|
59
|
-
if (!f.end) return /* @__PURE__ */
|
|
59
|
+
if (!f.end) return /* @__PURE__ */ r("div", {
|
|
60
60
|
className: "flex items-center justify-center text-text-secondary",
|
|
61
61
|
style: {
|
|
62
62
|
width: o,
|
|
63
63
|
height: s
|
|
64
64
|
},
|
|
65
|
-
children: /* @__PURE__ */
|
|
65
|
+
children: /* @__PURE__ */ r("span", {
|
|
66
66
|
className: "text-xs",
|
|
67
67
|
children: d("bigconsole.widget.sparkline.noData", "No data")
|
|
68
68
|
})
|
|
69
69
|
});
|
|
70
70
|
let p = a[c];
|
|
71
|
-
return /* @__PURE__ */
|
|
71
|
+
return /* @__PURE__ */ i("svg", {
|
|
72
72
|
width: o,
|
|
73
73
|
height: s,
|
|
74
74
|
className: "overflow-visible",
|
|
75
75
|
role: "img",
|
|
76
76
|
"aria-label": d("bigconsole.widget.sparkline.ariaLabel", "Sparkline chart"),
|
|
77
77
|
children: [
|
|
78
|
-
l && /* @__PURE__ */
|
|
78
|
+
l && /* @__PURE__ */ r("path", {
|
|
79
79
|
d: f.area,
|
|
80
80
|
className: p.fill,
|
|
81
81
|
strokeWidth: 0
|
|
82
82
|
}),
|
|
83
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ r("path", {
|
|
84
84
|
d: f.line,
|
|
85
85
|
className: p.stroke,
|
|
86
86
|
fill: "none",
|
|
@@ -88,7 +88,7 @@ var a = {
|
|
|
88
88
|
strokeLinecap: "round",
|
|
89
89
|
strokeLinejoin: "round"
|
|
90
90
|
}),
|
|
91
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ r("circle", {
|
|
92
92
|
cx: f.end.x,
|
|
93
93
|
cy: f.end.y,
|
|
94
94
|
r: u + 1,
|
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
import { memo as e } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useI18n as t } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
4
|
//#region src/bigconsole/components/widgets/metric-card/TrendIndicator.tsx
|
|
5
5
|
var r = {
|
|
6
6
|
sm: "w-3 h-3",
|
|
7
7
|
md: "w-4 h-4",
|
|
8
8
|
lg: "w-5 h-5"
|
|
9
9
|
}, i = e(function({ direction: e, size: i = "md", positiveIsGood: a = !0 }) {
|
|
10
|
-
let { t: o } =
|
|
10
|
+
let { t: o } = t(), s = () => {
|
|
11
11
|
if (e === "flat") return "text-text-secondary";
|
|
12
12
|
let t = e === "up";
|
|
13
13
|
return (a ? t : !t) ? "text-status-success-text" : "text-status-error-text";
|
|
14
14
|
}, c = r[i], l = s();
|
|
15
|
-
return e === "flat" ? /* @__PURE__ */
|
|
15
|
+
return e === "flat" ? /* @__PURE__ */ n("svg", {
|
|
16
16
|
className: `${c} ${l}`,
|
|
17
17
|
fill: "none",
|
|
18
18
|
stroke: "currentColor",
|
|
19
19
|
viewBox: "0 0 24 24",
|
|
20
20
|
"aria-label": o("bigconsole.widget.trend.noChange", "No change"),
|
|
21
|
-
children: /* @__PURE__ */
|
|
21
|
+
children: /* @__PURE__ */ n("path", {
|
|
22
22
|
strokeLinecap: "round",
|
|
23
23
|
strokeLinejoin: "round",
|
|
24
24
|
strokeWidth: 2,
|
|
25
25
|
d: "M5 12h14"
|
|
26
26
|
})
|
|
27
|
-
}) : e === "up" ? /* @__PURE__ */
|
|
27
|
+
}) : e === "up" ? /* @__PURE__ */ n("svg", {
|
|
28
28
|
className: `${c} ${l}`,
|
|
29
29
|
fill: "none",
|
|
30
30
|
stroke: "currentColor",
|
|
31
31
|
viewBox: "0 0 24 24",
|
|
32
32
|
"aria-label": o("bigconsole.widget.trend.up", "Trending up"),
|
|
33
|
-
children: /* @__PURE__ */
|
|
33
|
+
children: /* @__PURE__ */ n("path", {
|
|
34
34
|
strokeLinecap: "round",
|
|
35
35
|
strokeLinejoin: "round",
|
|
36
36
|
strokeWidth: 2,
|
|
37
37
|
d: "M5 15l7-7 7 7"
|
|
38
38
|
})
|
|
39
|
-
}) : /* @__PURE__ */
|
|
39
|
+
}) : /* @__PURE__ */ n("svg", {
|
|
40
40
|
className: `${c} ${l}`,
|
|
41
41
|
fill: "none",
|
|
42
42
|
stroke: "currentColor",
|
|
43
43
|
viewBox: "0 0 24 24",
|
|
44
44
|
"aria-label": o("bigconsole.widget.trend.down", "Trending down"),
|
|
45
|
-
children: /* @__PURE__ */
|
|
45
|
+
children: /* @__PURE__ */ n("path", {
|
|
46
46
|
strokeLinecap: "round",
|
|
47
47
|
strokeLinejoin: "round",
|
|
48
48
|
strokeWidth: 2,
|