@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
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { SEMANTIC_COLORS as e } from "../../../utils/semanticTokens.js";
|
|
2
2
|
import { useEffect as t, useRef as n, useState as r } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
4
|
+
import { useI18n as o } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
5
5
|
//#region src/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.tsx
|
|
6
6
|
function s({ presets: s, activePresetId: c, onApplyPreset: l, onSavePreset: u, onDeletePreset: d, disabled: f = !1 }) {
|
|
7
|
-
let { t: p } =
|
|
7
|
+
let { t: p } = o(), [m, h] = r(!1), [g, _] = r(!1), [v, y] = r(""), [b, x] = r(""), S = n(null), C = s.find((e) => e.id === c);
|
|
8
8
|
t(() => {
|
|
9
9
|
function e(e) {
|
|
10
10
|
S.current && !S.current.contains(e.target) && (h(!1), _(!1));
|
|
@@ -16,13 +16,13 @@ function s({ presets: s, activePresetId: c, onApplyPreset: l, onSavePreset: u, o
|
|
|
16
16
|
}, T = (e, t) => {
|
|
17
17
|
e.stopPropagation(), window.confirm(p("bigconsole.filters.presets.deleteConfirm", "Are you sure you want to delete this preset?")) && d(t);
|
|
18
18
|
};
|
|
19
|
-
return /* @__PURE__ */
|
|
19
|
+
return /* @__PURE__ */ a("div", {
|
|
20
20
|
ref: S,
|
|
21
21
|
style: {
|
|
22
22
|
position: "relative",
|
|
23
23
|
display: "inline-block"
|
|
24
24
|
},
|
|
25
|
-
children: [/* @__PURE__ */
|
|
25
|
+
children: [/* @__PURE__ */ a("button", {
|
|
26
26
|
onClick: () => !f && h(!m),
|
|
27
27
|
disabled: f,
|
|
28
28
|
style: {
|
|
@@ -42,13 +42,13 @@ function s({ presets: s, activePresetId: c, onApplyPreset: l, onSavePreset: u, o
|
|
|
42
42
|
maxWidth: "100%",
|
|
43
43
|
justifyContent: "space-between"
|
|
44
44
|
},
|
|
45
|
-
children: [/* @__PURE__ */
|
|
45
|
+
children: [/* @__PURE__ */ a("span", {
|
|
46
46
|
style: {
|
|
47
47
|
display: "flex",
|
|
48
48
|
alignItems: "center",
|
|
49
49
|
gap: "6px"
|
|
50
50
|
},
|
|
51
|
-
children: [/* @__PURE__ */
|
|
51
|
+
children: [/* @__PURE__ */ a("svg", {
|
|
52
52
|
width: "14",
|
|
53
53
|
height: "14",
|
|
54
54
|
viewBox: "0 0 24 24",
|
|
@@ -56,12 +56,12 @@ function s({ presets: s, activePresetId: c, onApplyPreset: l, onSavePreset: u, o
|
|
|
56
56
|
stroke: "currentColor",
|
|
57
57
|
strokeWidth: "2",
|
|
58
58
|
children: [
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ i("path", { d: "M19 21H5a2 2 0 01-2-2V5a2 2 0 012-2h11l5 5v11a2 2 0 01-2 2z" }),
|
|
60
|
+
/* @__PURE__ */ i("polyline", { points: "17,21 17,13 7,13 7,21" }),
|
|
61
|
+
/* @__PURE__ */ i("polyline", { points: "7,3 7,8 15,8" })
|
|
62
62
|
]
|
|
63
63
|
}), C ? C.name : p("bigconsole.filters.presets.buttonLabel", "Presets")]
|
|
64
|
-
}), /* @__PURE__ */
|
|
64
|
+
}), /* @__PURE__ */ i("svg", {
|
|
65
65
|
width: "12",
|
|
66
66
|
height: "12",
|
|
67
67
|
viewBox: "0 0 24 24",
|
|
@@ -72,9 +72,9 @@ function s({ presets: s, activePresetId: c, onApplyPreset: l, onSavePreset: u, o
|
|
|
72
72
|
transform: m ? "rotate(180deg)" : "rotate(0deg)",
|
|
73
73
|
transition: "transform 0.2s ease"
|
|
74
74
|
},
|
|
75
|
-
children: /* @__PURE__ */
|
|
75
|
+
children: /* @__PURE__ */ i("polyline", { points: "6,9 12,15 18,9" })
|
|
76
76
|
})]
|
|
77
|
-
}), m && /* @__PURE__ */
|
|
77
|
+
}), m && /* @__PURE__ */ a("div", {
|
|
78
78
|
style: {
|
|
79
79
|
position: "absolute",
|
|
80
80
|
top: "100%",
|
|
@@ -90,7 +90,7 @@ function s({ presets: s, activePresetId: c, onApplyPreset: l, onSavePreset: u, o
|
|
|
90
90
|
overflow: "hidden"
|
|
91
91
|
},
|
|
92
92
|
children: [
|
|
93
|
-
/* @__PURE__ */
|
|
93
|
+
/* @__PURE__ */ a("div", {
|
|
94
94
|
style: {
|
|
95
95
|
padding: "12px 16px",
|
|
96
96
|
borderBottom: `1px solid ${e.borderDefault}`,
|
|
@@ -99,14 +99,14 @@ function s({ presets: s, activePresetId: c, onApplyPreset: l, onSavePreset: u, o
|
|
|
99
99
|
justifyContent: "space-between",
|
|
100
100
|
alignItems: "center"
|
|
101
101
|
},
|
|
102
|
-
children: [/* @__PURE__ */
|
|
102
|
+
children: [/* @__PURE__ */ i("span", {
|
|
103
103
|
style: {
|
|
104
104
|
fontWeight: 600,
|
|
105
105
|
fontSize: "13px",
|
|
106
106
|
color: e.textPrimary
|
|
107
107
|
},
|
|
108
108
|
children: p("bigconsole.filters.presets.header", "Filter Presets")
|
|
109
|
-
}), /* @__PURE__ */
|
|
109
|
+
}), /* @__PURE__ */ i("button", {
|
|
110
110
|
onClick: () => _(!0),
|
|
111
111
|
style: {
|
|
112
112
|
padding: "4px 10px",
|
|
@@ -121,14 +121,14 @@ function s({ presets: s, activePresetId: c, onApplyPreset: l, onSavePreset: u, o
|
|
|
121
121
|
children: p("bigconsole.filters.presets.saveCurrent", "+ Save Current")
|
|
122
122
|
})]
|
|
123
123
|
}),
|
|
124
|
-
g && /* @__PURE__ */
|
|
124
|
+
g && /* @__PURE__ */ a("div", {
|
|
125
125
|
style: {
|
|
126
126
|
padding: "12px 16px",
|
|
127
127
|
borderBottom: `1px solid ${e.borderDefault}`,
|
|
128
128
|
backgroundColor: e.bgSecondary
|
|
129
129
|
},
|
|
130
130
|
children: [
|
|
131
|
-
/* @__PURE__ */
|
|
131
|
+
/* @__PURE__ */ i("input", {
|
|
132
132
|
type: "text",
|
|
133
133
|
value: v,
|
|
134
134
|
onChange: (e) => y(e.target.value),
|
|
@@ -146,7 +146,7 @@ function s({ presets: s, activePresetId: c, onApplyPreset: l, onSavePreset: u, o
|
|
|
146
146
|
color: e.textPrimary
|
|
147
147
|
}
|
|
148
148
|
}),
|
|
149
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ i("input", {
|
|
150
150
|
type: "text",
|
|
151
151
|
value: b,
|
|
152
152
|
onChange: (e) => x(e.target.value),
|
|
@@ -163,13 +163,13 @@ function s({ presets: s, activePresetId: c, onApplyPreset: l, onSavePreset: u, o
|
|
|
163
163
|
color: e.textPrimary
|
|
164
164
|
}
|
|
165
165
|
}),
|
|
166
|
-
/* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */ a("div", {
|
|
167
167
|
style: {
|
|
168
168
|
display: "flex",
|
|
169
169
|
gap: "8px",
|
|
170
170
|
justifyContent: "flex-end"
|
|
171
171
|
},
|
|
172
|
-
children: [/* @__PURE__ */
|
|
172
|
+
children: [/* @__PURE__ */ i("button", {
|
|
173
173
|
onClick: () => {
|
|
174
174
|
_(!1), y(""), x("");
|
|
175
175
|
},
|
|
@@ -183,7 +183,7 @@ function s({ presets: s, activePresetId: c, onApplyPreset: l, onSavePreset: u, o
|
|
|
183
183
|
color: e.textSecondary
|
|
184
184
|
},
|
|
185
185
|
children: p("bigconsole.filters.presets.cancel", "Cancel")
|
|
186
|
-
}), /* @__PURE__ */
|
|
186
|
+
}), /* @__PURE__ */ i("button", {
|
|
187
187
|
onClick: w,
|
|
188
188
|
disabled: !v.trim(),
|
|
189
189
|
style: {
|
|
@@ -201,12 +201,12 @@ function s({ presets: s, activePresetId: c, onApplyPreset: l, onSavePreset: u, o
|
|
|
201
201
|
})
|
|
202
202
|
]
|
|
203
203
|
}),
|
|
204
|
-
/* @__PURE__ */
|
|
204
|
+
/* @__PURE__ */ a("div", {
|
|
205
205
|
style: {
|
|
206
206
|
maxHeight: "300px",
|
|
207
207
|
overflowY: "auto"
|
|
208
208
|
},
|
|
209
|
-
children: [s.map((t) => /* @__PURE__ */
|
|
209
|
+
children: [s.map((t) => /* @__PURE__ */ a("div", {
|
|
210
210
|
onClick: () => {
|
|
211
211
|
l(t.id), h(!1);
|
|
212
212
|
},
|
|
@@ -227,9 +227,9 @@ function s({ presets: s, activePresetId: c, onApplyPreset: l, onSavePreset: u, o
|
|
|
227
227
|
c !== t.id && (e.currentTarget.style.backgroundColor = "transparent");
|
|
228
228
|
},
|
|
229
229
|
children: [
|
|
230
|
-
/* @__PURE__ */
|
|
230
|
+
/* @__PURE__ */ a("div", {
|
|
231
231
|
style: { flex: 1 },
|
|
232
|
-
children: [/* @__PURE__ */
|
|
232
|
+
children: [/* @__PURE__ */ a("div", {
|
|
233
233
|
style: {
|
|
234
234
|
fontSize: "13px",
|
|
235
235
|
fontWeight: 500,
|
|
@@ -238,7 +238,7 @@ function s({ presets: s, activePresetId: c, onApplyPreset: l, onSavePreset: u, o
|
|
|
238
238
|
alignItems: "center",
|
|
239
239
|
gap: "6px"
|
|
240
240
|
},
|
|
241
|
-
children: [t.name, t.isDefault && /* @__PURE__ */
|
|
241
|
+
children: [t.name, t.isDefault && /* @__PURE__ */ i("span", {
|
|
242
242
|
style: {
|
|
243
243
|
fontSize: "10px",
|
|
244
244
|
padding: "2px 6px",
|
|
@@ -248,7 +248,7 @@ function s({ presets: s, activePresetId: c, onApplyPreset: l, onSavePreset: u, o
|
|
|
248
248
|
},
|
|
249
249
|
children: p("bigconsole.filters.presets.defaultBadge", "Default")
|
|
250
250
|
})]
|
|
251
|
-
}), t.description && /* @__PURE__ */
|
|
251
|
+
}), t.description && /* @__PURE__ */ i("div", {
|
|
252
252
|
style: {
|
|
253
253
|
fontSize: "11px",
|
|
254
254
|
color: e.textTertiary,
|
|
@@ -257,7 +257,7 @@ function s({ presets: s, activePresetId: c, onApplyPreset: l, onSavePreset: u, o
|
|
|
257
257
|
children: t.description
|
|
258
258
|
})]
|
|
259
259
|
}),
|
|
260
|
-
!t.isDefault && !t.id.startsWith("preset-last") && !t.id.startsWith("preset-this") && /* @__PURE__ */
|
|
260
|
+
!t.isDefault && !t.id.startsWith("preset-last") && !t.id.startsWith("preset-this") && /* @__PURE__ */ i("button", {
|
|
261
261
|
onClick: (e) => T(e, t.id),
|
|
262
262
|
style: {
|
|
263
263
|
padding: "4px",
|
|
@@ -277,17 +277,17 @@ function s({ presets: s, activePresetId: c, onApplyPreset: l, onSavePreset: u, o
|
|
|
277
277
|
t.currentTarget.style.backgroundColor = "transparent", t.currentTarget.style.color = e.textTertiary;
|
|
278
278
|
},
|
|
279
279
|
title: p("bigconsole.filters.presets.deletePresetTitle", "Delete preset"),
|
|
280
|
-
children: /* @__PURE__ */
|
|
280
|
+
children: /* @__PURE__ */ a("svg", {
|
|
281
281
|
width: "14",
|
|
282
282
|
height: "14",
|
|
283
283
|
viewBox: "0 0 24 24",
|
|
284
284
|
fill: "none",
|
|
285
285
|
stroke: "currentColor",
|
|
286
286
|
strokeWidth: "2",
|
|
287
|
-
children: [/* @__PURE__ */
|
|
287
|
+
children: [/* @__PURE__ */ i("polyline", { points: "3,6 5,6 21,6" }), /* @__PURE__ */ i("path", { d: "M19,6v14a2,2,0,01-2,2H7a2,2,0,01-2-2V6m3,0V4a2,2,0,012-2h4a2,2,0,012,2v2" })]
|
|
288
288
|
})
|
|
289
289
|
}),
|
|
290
|
-
c === t.id && /* @__PURE__ */
|
|
290
|
+
c === t.id && /* @__PURE__ */ i("svg", {
|
|
291
291
|
width: "16",
|
|
292
292
|
height: "16",
|
|
293
293
|
viewBox: "0 0 24 24",
|
|
@@ -295,10 +295,10 @@ function s({ presets: s, activePresetId: c, onApplyPreset: l, onSavePreset: u, o
|
|
|
295
295
|
stroke: e.actionPrimaryBg,
|
|
296
296
|
strokeWidth: "3",
|
|
297
297
|
style: { marginLeft: "8px" },
|
|
298
|
-
children: /* @__PURE__ */
|
|
298
|
+
children: /* @__PURE__ */ i("polyline", { points: "20,6 9,17 4,12" })
|
|
299
299
|
})
|
|
300
300
|
]
|
|
301
|
-
}, t.id)), s.length === 0 && /* @__PURE__ */
|
|
301
|
+
}, t.id)), s.length === 0 && /* @__PURE__ */ i("div", {
|
|
302
302
|
style: {
|
|
303
303
|
padding: "20px 16px",
|
|
304
304
|
textAlign: "center",
|
|
@@ -11,12 +11,12 @@ import o from "./FilterChip.js";
|
|
|
11
11
|
import s from "./FilterEditor.js";
|
|
12
12
|
import c from "./FilterPresetSelector.js";
|
|
13
13
|
import { useCallback as l, useEffect as u, useState as d } from "react";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
14
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
15
|
+
import { useI18n as m } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
16
16
|
//#region src/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.tsx
|
|
17
17
|
var h = `inline-flex min-h-control-sm items-center gap-icon-gap rounded-button border border-[var(--color-border-subtle)] bg-bg-surface px-3 py-1 text-sm font-medium text-text-primary motion-safe:transition-colors hover:bg-bg-accentSubtle ${n}`, g = `inline-flex min-h-control-sm items-center gap-icon-gap rounded-button px-2 py-1 text-sm font-medium text-text-secondary motion-safe:transition-colors hover:bg-bg-accentSubtle ${n}`;
|
|
18
18
|
function _({ dashboardId: n, onFilterChange: _, collapsible: v = !0, className: y = "", enableUrlSync: b = !0, enablePresets: x = !0 }) {
|
|
19
|
-
let { t: S } =
|
|
19
|
+
let { t: S } = m(), { filters: C, loading: te, error: ne, fetchFilters: w, createFilter: T, updateFilter: E, deleteFilter: D } = ee(), O = t(), k = e((e) => e.setGlobalFilterValue), A = e((e) => e.setGlobalFilterValues), j = e((e) => e.clearGlobalFilterValue);
|
|
20
20
|
u(() => {
|
|
21
21
|
let t = e.getState().globalFilterValues, n = Object.fromEntries(C.filter((e) => e.defaultValue !== void 0 && !(e.id in t)).map((e) => [e.id, e.defaultValue]));
|
|
22
22
|
Object.keys(n).length && A({
|
|
@@ -105,48 +105,48 @@ function _({ dashboardId: n, onFilterChange: _, collapsible: v = !0, className:
|
|
|
105
105
|
}, [z]), ue = l(() => {
|
|
106
106
|
re((e) => !e);
|
|
107
107
|
}, []), Q = C.filter((e) => O[e.id] !== void 0 && O[e.id] !== null && O[e.id] !== "").length;
|
|
108
|
-
if (te && C.length === 0 && !H) return /* @__PURE__ */
|
|
108
|
+
if (te && C.length === 0 && !H) return /* @__PURE__ */ p("div", {
|
|
109
109
|
className: `flex flex-wrap items-center gap-control-gap border-b border-[var(--color-border-subtle)] bg-bg-sunken px-card-padding py-control-gap ${y}`,
|
|
110
110
|
role: "status",
|
|
111
111
|
"aria-live": "polite",
|
|
112
112
|
"data-testid": "global-filters-loading",
|
|
113
|
-
children: [/* @__PURE__ */
|
|
113
|
+
children: [/* @__PURE__ */ f("span", { className: "h-icon-sm w-icon-sm animate-spin rounded-full border-2 border-action-primary-bg border-t-transparent" }), /* @__PURE__ */ f("span", {
|
|
114
114
|
className: "text-sm text-text-secondary",
|
|
115
115
|
children: S("bigconsole.filters.bar.loading", "Loading filters...")
|
|
116
116
|
})]
|
|
117
117
|
});
|
|
118
|
-
let $ = ne && /* @__PURE__ */
|
|
118
|
+
let $ = ne && /* @__PURE__ */ p("div", {
|
|
119
119
|
role: "alert",
|
|
120
120
|
className: "flex flex-wrap items-center gap-2 px-3 py-2 text-sm text-status-error-text",
|
|
121
|
-
children: [/* @__PURE__ */
|
|
121
|
+
children: [/* @__PURE__ */ f("span", { children: S("bigconsole.filters.bar.requestFailed", "Filters could not be loaded or saved. Try again.") }), /* @__PURE__ */ f("button", {
|
|
122
122
|
type: "button",
|
|
123
123
|
onClick: () => void w(n),
|
|
124
124
|
className: g,
|
|
125
125
|
children: S("bigconsole.filters.bar.retry", "Retry")
|
|
126
126
|
})]
|
|
127
127
|
});
|
|
128
|
-
return C.length === 0 ? /* @__PURE__ */
|
|
128
|
+
return C.length === 0 ? /* @__PURE__ */ p("div", {
|
|
129
129
|
className: `flex flex-wrap items-center justify-between gap-control-gap border-b border-[var(--color-border-subtle)] bg-bg-sunken px-card-padding py-control-gap ${y}`,
|
|
130
130
|
"data-testid": "global-filters-empty",
|
|
131
131
|
children: [
|
|
132
|
-
/* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ p("div", {
|
|
133
133
|
className: "flex min-w-0 flex-wrap items-center gap-icon-gap",
|
|
134
|
-
children: [/* @__PURE__ */
|
|
134
|
+
children: [/* @__PURE__ */ f("h2", {
|
|
135
135
|
className: "text-sm font-semibold text-text-primary",
|
|
136
136
|
children: S("bigconsole.filters.bar.title", "Filters")
|
|
137
|
-
}), /* @__PURE__ */
|
|
137
|
+
}), /* @__PURE__ */ f("span", {
|
|
138
138
|
className: "text-sm text-text-muted",
|
|
139
139
|
children: S("bigconsole.filters.bar.noFiltersConfigured", "No filters configured")
|
|
140
140
|
})]
|
|
141
141
|
}),
|
|
142
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ f("button", {
|
|
143
143
|
type: "button",
|
|
144
144
|
onClick: Y,
|
|
145
145
|
className: h,
|
|
146
146
|
children: S("bigconsole.filters.bar.addFilter", "+ Add Filter")
|
|
147
147
|
}),
|
|
148
148
|
$,
|
|
149
|
-
H && /* @__PURE__ */
|
|
149
|
+
H && /* @__PURE__ */ f(s, {
|
|
150
150
|
filter: W,
|
|
151
151
|
onSave: X,
|
|
152
152
|
onClose: () => {
|
|
@@ -154,49 +154,49 @@ function _({ dashboardId: n, onFilterChange: _, collapsible: v = !0, className:
|
|
|
154
154
|
}
|
|
155
155
|
})
|
|
156
156
|
]
|
|
157
|
-
}) : /* @__PURE__ */
|
|
157
|
+
}) : /* @__PURE__ */ p("section", {
|
|
158
158
|
className: `flex min-w-0 flex-col border-b border-[var(--color-border-subtle)] bg-bg-sunken ${y}`,
|
|
159
159
|
"aria-labelledby": "global-filters-heading",
|
|
160
160
|
"data-testid": "global-filters-bar",
|
|
161
161
|
children: [
|
|
162
162
|
$,
|
|
163
|
-
/* @__PURE__ */
|
|
163
|
+
/* @__PURE__ */ p("div", {
|
|
164
164
|
className: `flex flex-wrap items-center justify-between gap-control-gap px-card-padding py-control-gap ${V ? "" : "border-b border-[var(--color-border-subtle)]"}`,
|
|
165
|
-
children: [/* @__PURE__ */
|
|
165
|
+
children: [/* @__PURE__ */ p("div", {
|
|
166
166
|
className: "flex min-w-0 flex-wrap items-center gap-icon-gap",
|
|
167
167
|
children: [
|
|
168
|
-
/* @__PURE__ */
|
|
168
|
+
/* @__PURE__ */ f("h2", {
|
|
169
169
|
id: "global-filters-heading",
|
|
170
170
|
className: "text-sm font-semibold text-text-primary",
|
|
171
171
|
children: S("bigconsole.filters.bar.title", "Filters")
|
|
172
172
|
}),
|
|
173
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ f("span", {
|
|
174
174
|
className: "rounded-pill bg-bg-surface px-2 py-0.5 text-xs font-medium text-text-secondary",
|
|
175
175
|
children: C.length
|
|
176
176
|
}),
|
|
177
|
-
Q > 0 && /* @__PURE__ */
|
|
177
|
+
Q > 0 && /* @__PURE__ */ f("span", {
|
|
178
178
|
className: "rounded-pill bg-[var(--color-status-success-bgSubtle)] px-2 py-0.5 text-xs font-medium text-status-success-text",
|
|
179
179
|
children: S("bigconsole.filters.bar.activeCount", "{{count}} active", { count: Q ?? "" })
|
|
180
180
|
})
|
|
181
181
|
]
|
|
182
|
-
}), /* @__PURE__ */
|
|
182
|
+
}), /* @__PURE__ */ p("div", {
|
|
183
183
|
className: "flex min-w-0 flex-wrap items-center justify-end gap-control-gap",
|
|
184
184
|
children: [
|
|
185
|
-
x && /* @__PURE__ */
|
|
185
|
+
x && /* @__PURE__ */ f(c, {
|
|
186
186
|
presets: P,
|
|
187
187
|
activePresetId: F,
|
|
188
188
|
onApplyPreset: ce,
|
|
189
189
|
onSavePreset: Z,
|
|
190
190
|
onDeletePreset: le
|
|
191
191
|
}),
|
|
192
|
-
b && Q > 0 && /* @__PURE__ */
|
|
192
|
+
b && Q > 0 && /* @__PURE__ */ p("div", {
|
|
193
193
|
style: { position: "relative" },
|
|
194
|
-
children: [/* @__PURE__ */
|
|
194
|
+
children: [/* @__PURE__ */ p("button", {
|
|
195
195
|
type: "button",
|
|
196
196
|
onClick: se,
|
|
197
197
|
title: S("bigconsole.filters.bar.shareUrlTitle", "Copy shareable URL with filters"),
|
|
198
198
|
className: h,
|
|
199
|
-
children: [/* @__PURE__ */
|
|
199
|
+
children: [/* @__PURE__ */ p("svg", {
|
|
200
200
|
width: "14",
|
|
201
201
|
height: "14",
|
|
202
202
|
viewBox: "0 0 24 24",
|
|
@@ -204,9 +204,9 @@ function _({ dashboardId: n, onFilterChange: _, collapsible: v = !0, className:
|
|
|
204
204
|
stroke: "currentColor",
|
|
205
205
|
strokeWidth: "2",
|
|
206
206
|
children: [
|
|
207
|
-
/* @__PURE__ */
|
|
208
|
-
/* @__PURE__ */
|
|
209
|
-
/* @__PURE__ */
|
|
207
|
+
/* @__PURE__ */ f("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8" }),
|
|
208
|
+
/* @__PURE__ */ f("polyline", { points: "16,6 12,2 8,6" }),
|
|
209
|
+
/* @__PURE__ */ f("line", {
|
|
210
210
|
x1: "12",
|
|
211
211
|
y1: "2",
|
|
212
212
|
x2: "12",
|
|
@@ -214,7 +214,7 @@ function _({ dashboardId: n, onFilterChange: _, collapsible: v = !0, className:
|
|
|
214
214
|
})
|
|
215
215
|
]
|
|
216
216
|
}), S("bigconsole.filters.bar.share", "Share")]
|
|
217
|
-
}), K && /* @__PURE__ */
|
|
217
|
+
}), K && /* @__PURE__ */ f("div", {
|
|
218
218
|
style: {
|
|
219
219
|
position: "absolute",
|
|
220
220
|
top: "100%",
|
|
@@ -232,19 +232,19 @@ function _({ dashboardId: n, onFilterChange: _, collapsible: v = !0, className:
|
|
|
232
232
|
children: S("bigconsole.filters.bar.urlCopied", "URL copied!")
|
|
233
233
|
})]
|
|
234
234
|
}),
|
|
235
|
-
Q > 0 && /* @__PURE__ */
|
|
235
|
+
Q > 0 && /* @__PURE__ */ f("button", {
|
|
236
236
|
type: "button",
|
|
237
237
|
onClick: oe,
|
|
238
238
|
className: `${g} text-status-error-text`,
|
|
239
239
|
children: S("bigconsole.filters.bar.resetAll", "Reset all")
|
|
240
240
|
}),
|
|
241
|
-
/* @__PURE__ */
|
|
241
|
+
/* @__PURE__ */ f("button", {
|
|
242
242
|
type: "button",
|
|
243
243
|
onClick: Y,
|
|
244
244
|
className: h,
|
|
245
245
|
children: S("bigconsole.filters.bar.addFilter", "+ Add Filter")
|
|
246
246
|
}),
|
|
247
|
-
v && /* @__PURE__ */
|
|
247
|
+
v && /* @__PURE__ */ f("button", {
|
|
248
248
|
type: "button",
|
|
249
249
|
onClick: ue,
|
|
250
250
|
"aria-expanded": !V,
|
|
@@ -255,11 +255,11 @@ function _({ dashboardId: n, onFilterChange: _, collapsible: v = !0, className:
|
|
|
255
255
|
]
|
|
256
256
|
})]
|
|
257
257
|
}),
|
|
258
|
-
!V && /* @__PURE__ */
|
|
258
|
+
!V && /* @__PURE__ */ f("div", {
|
|
259
259
|
id: "global-filters-chips",
|
|
260
260
|
className: "relative flex flex-wrap gap-control-gap px-card-padding py-control-gap",
|
|
261
261
|
style: { overflow: "visible" },
|
|
262
|
-
children: C.map((e) => /* @__PURE__ */
|
|
262
|
+
children: C.map((e) => /* @__PURE__ */ f(o, {
|
|
263
263
|
filter: e,
|
|
264
264
|
value: O[e.id],
|
|
265
265
|
onChange: (t) => J(e.id, t),
|
|
@@ -267,7 +267,7 @@ function _({ dashboardId: n, onFilterChange: _, collapsible: v = !0, className:
|
|
|
267
267
|
onDelete: () => ae(e.id)
|
|
268
268
|
}, e.id))
|
|
269
269
|
}),
|
|
270
|
-
H && /* @__PURE__ */
|
|
270
|
+
H && /* @__PURE__ */ f(s, {
|
|
271
271
|
filter: W,
|
|
272
272
|
onSave: X,
|
|
273
273
|
onClose: () => {
|