@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,6 +1,6 @@
|
|
|
1
1
|
import { useEffect as e, useRef as t, useState 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/dashboard/GlobalFiltersBar/FilterChip.tsx
|
|
5
5
|
var s = (e) => ({
|
|
6
6
|
bgPrimary: e ? "#1f2937" : "#ffffff",
|
|
@@ -64,13 +64,13 @@ function u(e) {
|
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
function d({ filter: u, value: d, onChange: p, onEdit: m, onDelete: h }) {
|
|
67
|
-
let { t: g } =
|
|
67
|
+
let { t: g } = o(), [_, v] = n(!1), [y, b] = n(!1), x = t(null), S = t(null), C = s(c()), w = d != null && d !== "", T = l(d, u.type, g);
|
|
68
68
|
return e(() => {
|
|
69
69
|
function e(e) {
|
|
70
70
|
x.current && !x.current.contains(e.target) && (v(!1), b(!1));
|
|
71
71
|
}
|
|
72
72
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
73
|
-
}, []), /* @__PURE__ */
|
|
73
|
+
}, []), /* @__PURE__ */ a("div", {
|
|
74
74
|
ref: x,
|
|
75
75
|
style: {
|
|
76
76
|
position: "relative",
|
|
@@ -89,7 +89,7 @@ function d({ filter: u, value: d, onChange: p, onEdit: m, onDelete: h }) {
|
|
|
89
89
|
maxWidth: "100%"
|
|
90
90
|
},
|
|
91
91
|
children: [
|
|
92
|
-
/* @__PURE__ */
|
|
92
|
+
/* @__PURE__ */ a("span", {
|
|
93
93
|
style: {
|
|
94
94
|
fontWeight: "var(--font-weight-semibold)",
|
|
95
95
|
color: "var(--color-text-primary)",
|
|
@@ -98,7 +98,7 @@ function d({ filter: u, value: d, onChange: p, onEdit: m, onDelete: h }) {
|
|
|
98
98
|
onClick: () => v(!_),
|
|
99
99
|
children: [u.name, ":"]
|
|
100
100
|
}),
|
|
101
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ i("span", {
|
|
102
102
|
style: {
|
|
103
103
|
color: w ? "var(--color-text-primary)" : "var(--color-text-secondary)",
|
|
104
104
|
maxWidth: "min(200px, 45vw)",
|
|
@@ -111,7 +111,7 @@ function d({ filter: u, value: d, onChange: p, onEdit: m, onDelete: h }) {
|
|
|
111
111
|
onClick: () => v(!_),
|
|
112
112
|
children: T
|
|
113
113
|
}),
|
|
114
|
-
w && /* @__PURE__ */
|
|
114
|
+
w && /* @__PURE__ */ i("button", {
|
|
115
115
|
onClick: (e) => {
|
|
116
116
|
e.stopPropagation(), p(void 0);
|
|
117
117
|
},
|
|
@@ -135,7 +135,7 @@ function d({ filter: u, value: d, onChange: p, onEdit: m, onDelete: h }) {
|
|
|
135
135
|
title: g("bigconsole.filters.chip.action.clear", "Clear filter"),
|
|
136
136
|
children: "×"
|
|
137
137
|
}),
|
|
138
|
-
/* @__PURE__ */
|
|
138
|
+
/* @__PURE__ */ i("button", {
|
|
139
139
|
onClick: (e) => {
|
|
140
140
|
e.stopPropagation(), b(!y);
|
|
141
141
|
},
|
|
@@ -159,7 +159,7 @@ function d({ filter: u, value: d, onChange: p, onEdit: m, onDelete: h }) {
|
|
|
159
159
|
title: g("bigconsole.filters.chip.action.options", "Filter options"),
|
|
160
160
|
children: "⋮"
|
|
161
161
|
}),
|
|
162
|
-
_ && /* @__PURE__ */
|
|
162
|
+
_ && /* @__PURE__ */ i(f, {
|
|
163
163
|
filter: u,
|
|
164
164
|
value: d,
|
|
165
165
|
onChange: (e) => {
|
|
@@ -167,7 +167,7 @@ function d({ filter: u, value: d, onChange: p, onEdit: m, onDelete: h }) {
|
|
|
167
167
|
},
|
|
168
168
|
onClose: () => v(!1)
|
|
169
169
|
}),
|
|
170
|
-
y && /* @__PURE__ */
|
|
170
|
+
y && /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i("div", {
|
|
171
171
|
style: {
|
|
172
172
|
position: "fixed",
|
|
173
173
|
top: 0,
|
|
@@ -179,7 +179,7 @@ function d({ filter: u, value: d, onChange: p, onEdit: m, onDelete: h }) {
|
|
|
179
179
|
onClick: (e) => {
|
|
180
180
|
e.stopPropagation(), b(!1);
|
|
181
181
|
}
|
|
182
|
-
}), /* @__PURE__ */
|
|
182
|
+
}), /* @__PURE__ */ a("div", {
|
|
183
183
|
ref: S,
|
|
184
184
|
style: {
|
|
185
185
|
position: "absolute",
|
|
@@ -195,7 +195,7 @@ function d({ filter: u, value: d, onChange: p, onEdit: m, onDelete: h }) {
|
|
|
195
195
|
zIndex: 99999,
|
|
196
196
|
overflow: "hidden"
|
|
197
197
|
},
|
|
198
|
-
children: [/* @__PURE__ */
|
|
198
|
+
children: [/* @__PURE__ */ a("button", {
|
|
199
199
|
onClick: (e) => {
|
|
200
200
|
e.stopPropagation(), b(!1), m();
|
|
201
201
|
},
|
|
@@ -215,7 +215,7 @@ function d({ filter: u, value: d, onChange: p, onEdit: m, onDelete: h }) {
|
|
|
215
215
|
fontWeight: 500
|
|
216
216
|
},
|
|
217
217
|
children: ["✏️ ", g("bigconsole.filters.chip.menu.edit", "Edit Filter")]
|
|
218
|
-
}), /* @__PURE__ */
|
|
218
|
+
}), /* @__PURE__ */ a("button", {
|
|
219
219
|
onClick: (e) => {
|
|
220
220
|
e.stopPropagation(), b(!1), h();
|
|
221
221
|
},
|
|
@@ -240,8 +240,8 @@ function d({ filter: u, value: d, onChange: p, onEdit: m, onDelete: h }) {
|
|
|
240
240
|
});
|
|
241
241
|
}
|
|
242
242
|
function f({ filter: e, value: t, onChange: l, onClose: u }) {
|
|
243
|
-
let { t: d } =
|
|
244
|
-
return /* @__PURE__ */
|
|
243
|
+
let { t: d } = o(), [f, p] = n(t), m = s(c());
|
|
244
|
+
return /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i("div", {
|
|
245
245
|
style: {
|
|
246
246
|
position: "fixed",
|
|
247
247
|
top: 0,
|
|
@@ -251,7 +251,7 @@ function f({ filter: e, value: t, onChange: l, onClose: u }) {
|
|
|
251
251
|
zIndex: 99998
|
|
252
252
|
},
|
|
253
253
|
onClick: u
|
|
254
|
-
}), /* @__PURE__ */
|
|
254
|
+
}), /* @__PURE__ */ a("div", {
|
|
255
255
|
style: {
|
|
256
256
|
position: "absolute",
|
|
257
257
|
top: "100%",
|
|
@@ -268,7 +268,7 @@ function f({ filter: e, value: t, onChange: l, onClose: u }) {
|
|
|
268
268
|
},
|
|
269
269
|
onClick: (e) => e.stopPropagation(),
|
|
270
270
|
children: [
|
|
271
|
-
e.type === "TEXT_SEARCH" && /* @__PURE__ */
|
|
271
|
+
e.type === "TEXT_SEARCH" && /* @__PURE__ */ i("input", {
|
|
272
272
|
type: "text",
|
|
273
273
|
value: f || "",
|
|
274
274
|
onChange: (e) => p(e.target.value),
|
|
@@ -284,7 +284,7 @@ function f({ filter: e, value: t, onChange: l, onClose: u }) {
|
|
|
284
284
|
color: m.textPrimary
|
|
285
285
|
}
|
|
286
286
|
}),
|
|
287
|
-
e.type === "CATEGORY" && /* @__PURE__ */
|
|
287
|
+
e.type === "CATEGORY" && /* @__PURE__ */ a("select", {
|
|
288
288
|
value: f || "",
|
|
289
289
|
onChange: (e) => p(e.target.value),
|
|
290
290
|
style: {
|
|
@@ -296,23 +296,23 @@ function f({ filter: e, value: t, onChange: l, onClose: u }) {
|
|
|
296
296
|
backgroundColor: m.bgPrimary,
|
|
297
297
|
color: m.textPrimary
|
|
298
298
|
},
|
|
299
|
-
children: [/* @__PURE__ */
|
|
299
|
+
children: [/* @__PURE__ */ i("option", {
|
|
300
300
|
value: "",
|
|
301
301
|
children: d("bigconsole.filters.chip.editor.allOption", "All")
|
|
302
|
-
}), e.config.options?.map((e) => /* @__PURE__ */
|
|
302
|
+
}), e.config.options?.map((e) => /* @__PURE__ */ i("option", {
|
|
303
303
|
value: String(e.value),
|
|
304
304
|
children: String(e.label)
|
|
305
305
|
}, String(e.value)))]
|
|
306
306
|
}),
|
|
307
307
|
e.type === "DATE_RANGE" && (() => {
|
|
308
308
|
let e = f || {};
|
|
309
|
-
return /* @__PURE__ */
|
|
309
|
+
return /* @__PURE__ */ a("div", {
|
|
310
310
|
style: {
|
|
311
311
|
display: "flex",
|
|
312
312
|
flexDirection: "column",
|
|
313
313
|
gap: "8px"
|
|
314
314
|
},
|
|
315
|
-
children: [/* @__PURE__ */
|
|
315
|
+
children: [/* @__PURE__ */ i("input", {
|
|
316
316
|
type: "date",
|
|
317
317
|
value: e.start || "",
|
|
318
318
|
onChange: (t) => p({
|
|
@@ -327,7 +327,7 @@ function f({ filter: e, value: t, onChange: l, onClose: u }) {
|
|
|
327
327
|
backgroundColor: m.bgPrimary,
|
|
328
328
|
color: m.textPrimary
|
|
329
329
|
}
|
|
330
|
-
}), /* @__PURE__ */
|
|
330
|
+
}), /* @__PURE__ */ i("input", {
|
|
331
331
|
type: "date",
|
|
332
332
|
value: e.end || "",
|
|
333
333
|
onChange: (t) => p({
|
|
@@ -347,12 +347,12 @@ function f({ filter: e, value: t, onChange: l, onClose: u }) {
|
|
|
347
347
|
})(),
|
|
348
348
|
e.type === "NUMERIC_RANGE" && (() => {
|
|
349
349
|
let e = f || {};
|
|
350
|
-
return /* @__PURE__ */
|
|
350
|
+
return /* @__PURE__ */ a("div", {
|
|
351
351
|
style: {
|
|
352
352
|
display: "flex",
|
|
353
353
|
gap: "8px"
|
|
354
354
|
},
|
|
355
|
-
children: [/* @__PURE__ */
|
|
355
|
+
children: [/* @__PURE__ */ i("input", {
|
|
356
356
|
type: "number",
|
|
357
357
|
value: e.min ?? "",
|
|
358
358
|
onChange: (t) => p({
|
|
@@ -369,7 +369,7 @@ function f({ filter: e, value: t, onChange: l, onClose: u }) {
|
|
|
369
369
|
backgroundColor: m.bgPrimary,
|
|
370
370
|
color: m.textPrimary
|
|
371
371
|
}
|
|
372
|
-
}), /* @__PURE__ */
|
|
372
|
+
}), /* @__PURE__ */ i("input", {
|
|
373
373
|
type: "number",
|
|
374
374
|
value: e.max ?? "",
|
|
375
375
|
onChange: (t) => p({
|
|
@@ -389,7 +389,7 @@ function f({ filter: e, value: t, onChange: l, onClose: u }) {
|
|
|
389
389
|
})]
|
|
390
390
|
});
|
|
391
391
|
})(),
|
|
392
|
-
e.type === "CUSTOM" && /* @__PURE__ */
|
|
392
|
+
e.type === "CUSTOM" && /* @__PURE__ */ i("input", {
|
|
393
393
|
type: "text",
|
|
394
394
|
value: typeof f == "string" ? f : JSON.stringify(f || ""),
|
|
395
395
|
onChange: (e) => p(e.target.value),
|
|
@@ -405,14 +405,14 @@ function f({ filter: e, value: t, onChange: l, onClose: u }) {
|
|
|
405
405
|
color: m.textPrimary
|
|
406
406
|
}
|
|
407
407
|
}),
|
|
408
|
-
/* @__PURE__ */
|
|
408
|
+
/* @__PURE__ */ a("div", {
|
|
409
409
|
style: {
|
|
410
410
|
marginTop: "16px",
|
|
411
411
|
display: "flex",
|
|
412
412
|
justifyContent: "flex-end",
|
|
413
413
|
gap: "10px"
|
|
414
414
|
},
|
|
415
|
-
children: [/* @__PURE__ */
|
|
415
|
+
children: [/* @__PURE__ */ i("button", {
|
|
416
416
|
onClick: u,
|
|
417
417
|
style: {
|
|
418
418
|
padding: "8px 16px",
|
|
@@ -425,7 +425,7 @@ function f({ filter: e, value: t, onChange: l, onClose: u }) {
|
|
|
425
425
|
fontWeight: 500
|
|
426
426
|
},
|
|
427
427
|
children: d("bigconsole.filters.chip.editor.cancel", "Cancel")
|
|
428
|
-
}), /* @__PURE__ */
|
|
428
|
+
}), /* @__PURE__ */ i("button", {
|
|
429
429
|
onClick: () => {
|
|
430
430
|
l(f);
|
|
431
431
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useEffect as e, useMemo as t, useState as n } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
3
|
+
import { useI18n as a } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
4
4
|
//#region src/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.tsx
|
|
5
5
|
var o = (e) => ({
|
|
6
6
|
bgPrimary: e ? "#1f2937" : "#ffffff",
|
|
@@ -17,7 +17,7 @@ var o = (e) => ({
|
|
|
17
17
|
backdropBg: "rgba(0, 0, 0, 0.5)"
|
|
18
18
|
});
|
|
19
19
|
function s({ filter: s, onSave: c, onClose: l }) {
|
|
20
|
-
let { t: u } =
|
|
20
|
+
let { t: u } = a(), [d, f] = n(!1), [p, m] = n(!1), [h, g] = n(s?.name || ""), [_, v] = n(s?.type || "CATEGORY"), [y, b] = n(s?.isRequired || !1), [x, S] = n(s?.config?.options || [{
|
|
21
21
|
value: "",
|
|
22
22
|
label: ""
|
|
23
23
|
}]), [C, w] = n(typeof s?.config?.field == "string" ? s.config.field : ""), [T, E] = n(s?.config?.placeholder || ""), [D, O] = n(!1);
|
|
@@ -88,7 +88,7 @@ function s({ filter: s, onSave: c, onClose: l }) {
|
|
|
88
88
|
f(!1);
|
|
89
89
|
}
|
|
90
90
|
}, I = h.trim() !== "" && (_ !== "CATEGORY" || x.some((e) => e.value && e.label));
|
|
91
|
-
return /* @__PURE__ */
|
|
91
|
+
return /* @__PURE__ */ r("div", {
|
|
92
92
|
style: {
|
|
93
93
|
position: "fixed",
|
|
94
94
|
top: 0,
|
|
@@ -105,7 +105,7 @@ function s({ filter: s, onSave: c, onClose: l }) {
|
|
|
105
105
|
isolation: "isolate"
|
|
106
106
|
},
|
|
107
107
|
onClick: l,
|
|
108
|
-
children: /* @__PURE__ */
|
|
108
|
+
children: /* @__PURE__ */ i("div", {
|
|
109
109
|
style: {
|
|
110
110
|
width: "100%",
|
|
111
111
|
maxWidth: "min(480px, calc(100vw - 2rem))",
|
|
@@ -118,7 +118,7 @@ function s({ filter: s, onSave: c, onClose: l }) {
|
|
|
118
118
|
},
|
|
119
119
|
onClick: (e) => e.stopPropagation(),
|
|
120
120
|
children: [
|
|
121
|
-
/* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ i("div", {
|
|
122
122
|
style: {
|
|
123
123
|
padding: "16px 20px",
|
|
124
124
|
borderBottom: `1px solid ${k.borderDefault}`,
|
|
@@ -127,7 +127,7 @@ function s({ filter: s, onSave: c, onClose: l }) {
|
|
|
127
127
|
justifyContent: "space-between",
|
|
128
128
|
backgroundColor: k.bgPrimary
|
|
129
129
|
},
|
|
130
|
-
children: [/* @__PURE__ */
|
|
130
|
+
children: [/* @__PURE__ */ r("h3", {
|
|
131
131
|
style: {
|
|
132
132
|
margin: 0,
|
|
133
133
|
fontSize: "16px",
|
|
@@ -135,7 +135,7 @@ function s({ filter: s, onSave: c, onClose: l }) {
|
|
|
135
135
|
color: k.textPrimary
|
|
136
136
|
},
|
|
137
137
|
children: A ? u("bigconsole.filters.editor.title.edit", "Edit Filter") : u("bigconsole.filters.editor.title.add", "Add Filter")
|
|
138
|
-
}), /* @__PURE__ */
|
|
138
|
+
}), /* @__PURE__ */ r("button", {
|
|
139
139
|
onClick: l,
|
|
140
140
|
style: {
|
|
141
141
|
background: "none",
|
|
@@ -148,7 +148,7 @@ function s({ filter: s, onSave: c, onClose: l }) {
|
|
|
148
148
|
children: "×"
|
|
149
149
|
})]
|
|
150
150
|
}),
|
|
151
|
-
/* @__PURE__ */
|
|
151
|
+
/* @__PURE__ */ i("div", {
|
|
152
152
|
style: {
|
|
153
153
|
padding: "20px",
|
|
154
154
|
overflowY: "auto",
|
|
@@ -156,9 +156,9 @@ function s({ filter: s, onSave: c, onClose: l }) {
|
|
|
156
156
|
backgroundColor: k.bgPrimary
|
|
157
157
|
},
|
|
158
158
|
children: [
|
|
159
|
-
/* @__PURE__ */
|
|
159
|
+
/* @__PURE__ */ i("div", {
|
|
160
160
|
style: { marginBottom: "16px" },
|
|
161
|
-
children: [/* @__PURE__ */
|
|
161
|
+
children: [/* @__PURE__ */ r("label", {
|
|
162
162
|
style: {
|
|
163
163
|
display: "block",
|
|
164
164
|
marginBottom: "6px",
|
|
@@ -167,7 +167,7 @@ function s({ filter: s, onSave: c, onClose: l }) {
|
|
|
167
167
|
color: k.textPrimary
|
|
168
168
|
},
|
|
169
169
|
children: u("bigconsole.filters.editor.field.name.label", "Filter Name *")
|
|
170
|
-
}), /* @__PURE__ */
|
|
170
|
+
}), /* @__PURE__ */ r("input", {
|
|
171
171
|
type: "text",
|
|
172
172
|
value: h,
|
|
173
173
|
onChange: (e) => g(e.target.value),
|
|
@@ -184,35 +184,35 @@ function s({ filter: s, onSave: c, onClose: l }) {
|
|
|
184
184
|
}
|
|
185
185
|
})]
|
|
186
186
|
}),
|
|
187
|
-
/* @__PURE__ */
|
|
187
|
+
/* @__PURE__ */ i("div", {
|
|
188
188
|
style: { marginBottom: "16px" },
|
|
189
189
|
children: [
|
|
190
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ r("label", {
|
|
191
191
|
htmlFor: "global-filter-data-field",
|
|
192
192
|
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
193
193
|
children: u("bigconsole.filters.editor.dataField", "Data field (optional)")
|
|
194
194
|
}),
|
|
195
|
-
/* @__PURE__ */
|
|
195
|
+
/* @__PURE__ */ r("input", {
|
|
196
196
|
id: "global-filter-data-field",
|
|
197
197
|
value: C,
|
|
198
198
|
onChange: (e) => w(e.target.value),
|
|
199
199
|
className: "w-full rounded-button border border-border-subtle bg-bg-surface px-3 py-2 text-text-primary",
|
|
200
200
|
placeholder: u("bigconsole.filters.editor.dataFieldPlaceholder", "e.g., region, country, cohort")
|
|
201
201
|
}),
|
|
202
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ r("p", {
|
|
203
203
|
className: "mt-1 text-xs text-text-secondary",
|
|
204
204
|
children: u("bigconsole.filters.editor.dataFieldHelp", "Match a field in the parser output. Leave blank to use automatic matching.")
|
|
205
205
|
})
|
|
206
206
|
]
|
|
207
207
|
}),
|
|
208
|
-
p && /* @__PURE__ */
|
|
208
|
+
p && /* @__PURE__ */ r("p", {
|
|
209
209
|
role: "alert",
|
|
210
210
|
className: "mb-3 text-sm text-status-error-text",
|
|
211
211
|
children: u("bigconsole.filters.editor.saveError", "The filter could not be saved. Your changes are still here; try again.")
|
|
212
212
|
}),
|
|
213
|
-
!A && /* @__PURE__ */
|
|
213
|
+
!A && /* @__PURE__ */ i("div", {
|
|
214
214
|
style: { marginBottom: "16px" },
|
|
215
|
-
children: [/* @__PURE__ */
|
|
215
|
+
children: [/* @__PURE__ */ r("label", {
|
|
216
216
|
style: {
|
|
217
217
|
display: "block",
|
|
218
218
|
marginBottom: "8px",
|
|
@@ -221,13 +221,13 @@ function s({ filter: s, onSave: c, onClose: l }) {
|
|
|
221
221
|
color: k.textPrimary
|
|
222
222
|
},
|
|
223
223
|
children: u("bigconsole.filters.editor.field.type.label", "Filter Type *")
|
|
224
|
-
}), /* @__PURE__ */
|
|
224
|
+
}), /* @__PURE__ */ r("div", {
|
|
225
225
|
style: {
|
|
226
226
|
display: "grid",
|
|
227
227
|
gridTemplateColumns: "repeat(2, 1fr)",
|
|
228
228
|
gap: "10px"
|
|
229
229
|
},
|
|
230
|
-
children: j.map((e) => /* @__PURE__ */
|
|
230
|
+
children: j.map((e) => /* @__PURE__ */ i("button", {
|
|
231
231
|
onClick: () => v(e.value),
|
|
232
232
|
type: "button",
|
|
233
233
|
style: {
|
|
@@ -240,14 +240,14 @@ function s({ filter: s, onSave: c, onClose: l }) {
|
|
|
240
240
|
transition: "all 0.2s ease",
|
|
241
241
|
minHeight: "60px"
|
|
242
242
|
},
|
|
243
|
-
children: [/* @__PURE__ */
|
|
243
|
+
children: [/* @__PURE__ */ r("div", {
|
|
244
244
|
style: {
|
|
245
245
|
fontWeight: 500,
|
|
246
246
|
fontSize: "13px",
|
|
247
247
|
color: k.textPrimary
|
|
248
248
|
},
|
|
249
249
|
children: e.label
|
|
250
|
-
}), /* @__PURE__ */
|
|
250
|
+
}), /* @__PURE__ */ r("div", {
|
|
251
251
|
style: {
|
|
252
252
|
fontSize: "11px",
|
|
253
253
|
color: k.textSecondary,
|
|
@@ -259,9 +259,9 @@ function s({ filter: s, onSave: c, onClose: l }) {
|
|
|
259
259
|
}, e.value))
|
|
260
260
|
})]
|
|
261
261
|
}),
|
|
262
|
-
_ === "CATEGORY" && /* @__PURE__ */
|
|
262
|
+
_ === "CATEGORY" && /* @__PURE__ */ i("div", {
|
|
263
263
|
style: { marginBottom: "16px" },
|
|
264
|
-
children: [/* @__PURE__ */
|
|
264
|
+
children: [/* @__PURE__ */ r("label", {
|
|
265
265
|
style: {
|
|
266
266
|
display: "block",
|
|
267
267
|
marginBottom: "8px",
|
|
@@ -270,20 +270,20 @@ function s({ filter: s, onSave: c, onClose: l }) {
|
|
|
270
270
|
color: k.textPrimary
|
|
271
271
|
},
|
|
272
272
|
children: u("bigconsole.filters.editor.field.options.label", "Options")
|
|
273
|
-
}), /* @__PURE__ */
|
|
273
|
+
}), /* @__PURE__ */ i("div", {
|
|
274
274
|
style: {
|
|
275
275
|
display: "flex",
|
|
276
276
|
flexDirection: "column",
|
|
277
277
|
gap: "8px"
|
|
278
278
|
},
|
|
279
|
-
children: [x.map((e, t) => /* @__PURE__ */
|
|
279
|
+
children: [x.map((e, t) => /* @__PURE__ */ i("div", {
|
|
280
280
|
style: {
|
|
281
281
|
display: "flex",
|
|
282
282
|
gap: "8px",
|
|
283
283
|
alignItems: "center"
|
|
284
284
|
},
|
|
285
285
|
children: [
|
|
286
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ r("input", {
|
|
287
287
|
type: "text",
|
|
288
288
|
value: e.value,
|
|
289
289
|
onChange: (e) => P(t, "value", e.target.value),
|
|
@@ -299,7 +299,7 @@ function s({ filter: s, onSave: c, onClose: l }) {
|
|
|
299
299
|
color: k.textPrimary
|
|
300
300
|
}
|
|
301
301
|
}),
|
|
302
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ r("input", {
|
|
303
303
|
type: "text",
|
|
304
304
|
value: e.label,
|
|
305
305
|
onChange: (e) => P(t, "label", e.target.value),
|
|
@@ -315,7 +315,7 @@ function s({ filter: s, onSave: c, onClose: l }) {
|
|
|
315
315
|
color: k.textPrimary
|
|
316
316
|
}
|
|
317
317
|
}),
|
|
318
|
-
x.length > 1 && /* @__PURE__ */
|
|
318
|
+
x.length > 1 && /* @__PURE__ */ r("button", {
|
|
319
319
|
type: "button",
|
|
320
320
|
onClick: () => N(t),
|
|
321
321
|
style: {
|
|
@@ -330,7 +330,7 @@ function s({ filter: s, onSave: c, onClose: l }) {
|
|
|
330
330
|
children: u("bigconsole.filters.editor.field.options.remove", "Remove")
|
|
331
331
|
})
|
|
332
332
|
]
|
|
333
|
-
}, t)), /* @__PURE__ */
|
|
333
|
+
}, t)), /* @__PURE__ */ r("button", {
|
|
334
334
|
type: "button",
|
|
335
335
|
onClick: M,
|
|
336
336
|
style: {
|
|
@@ -346,9 +346,9 @@ function s({ filter: s, onSave: c, onClose: l }) {
|
|
|
346
346
|
})]
|
|
347
347
|
})]
|
|
348
348
|
}),
|
|
349
|
-
(_ === "TEXT_SEARCH" || _ === "CATEGORY") && /* @__PURE__ */
|
|
349
|
+
(_ === "TEXT_SEARCH" || _ === "CATEGORY") && /* @__PURE__ */ i("div", {
|
|
350
350
|
style: { marginBottom: "16px" },
|
|
351
|
-
children: [/* @__PURE__ */
|
|
351
|
+
children: [/* @__PURE__ */ r("label", {
|
|
352
352
|
style: {
|
|
353
353
|
display: "block",
|
|
354
354
|
marginBottom: "8px",
|
|
@@ -357,7 +357,7 @@ function s({ filter: s, onSave: c, onClose: l }) {
|
|
|
357
357
|
color: k.textPrimary
|
|
358
358
|
},
|
|
359
359
|
children: u("bigconsole.filters.editor.field.placeholder.label", "Placeholder Text")
|
|
360
|
-
}), /* @__PURE__ */
|
|
360
|
+
}), /* @__PURE__ */ r("input", {
|
|
361
361
|
type: "text",
|
|
362
362
|
value: T,
|
|
363
363
|
onChange: (e) => E(e.target.value),
|
|
@@ -374,16 +374,16 @@ function s({ filter: s, onSave: c, onClose: l }) {
|
|
|
374
374
|
}
|
|
375
375
|
})]
|
|
376
376
|
}),
|
|
377
|
-
/* @__PURE__ */
|
|
377
|
+
/* @__PURE__ */ r("div", {
|
|
378
378
|
style: { marginBottom: "16px" },
|
|
379
|
-
children: /* @__PURE__ */
|
|
379
|
+
children: /* @__PURE__ */ i("label", {
|
|
380
380
|
style: {
|
|
381
381
|
display: "flex",
|
|
382
382
|
alignItems: "center",
|
|
383
383
|
gap: "8px",
|
|
384
384
|
cursor: "pointer"
|
|
385
385
|
},
|
|
386
|
-
children: [/* @__PURE__ */
|
|
386
|
+
children: [/* @__PURE__ */ r("input", {
|
|
387
387
|
type: "checkbox",
|
|
388
388
|
checked: y,
|
|
389
389
|
onChange: (e) => b(e.target.checked),
|
|
@@ -391,7 +391,7 @@ function s({ filter: s, onSave: c, onClose: l }) {
|
|
|
391
391
|
width: "16px",
|
|
392
392
|
height: "16px"
|
|
393
393
|
}
|
|
394
|
-
}), /* @__PURE__ */
|
|
394
|
+
}), /* @__PURE__ */ r("span", {
|
|
395
395
|
style: {
|
|
396
396
|
fontSize: "13px",
|
|
397
397
|
color: k.textPrimary
|
|
@@ -402,7 +402,7 @@ function s({ filter: s, onSave: c, onClose: l }) {
|
|
|
402
402
|
})
|
|
403
403
|
]
|
|
404
404
|
}),
|
|
405
|
-
/* @__PURE__ */
|
|
405
|
+
/* @__PURE__ */ i("div", {
|
|
406
406
|
style: {
|
|
407
407
|
padding: "16px 20px",
|
|
408
408
|
borderTop: `1px solid ${k.borderDefault}`,
|
|
@@ -411,7 +411,7 @@ function s({ filter: s, onSave: c, onClose: l }) {
|
|
|
411
411
|
gap: "12px",
|
|
412
412
|
backgroundColor: k.bgPrimary
|
|
413
413
|
},
|
|
414
|
-
children: [/* @__PURE__ */
|
|
414
|
+
children: [/* @__PURE__ */ r("button", {
|
|
415
415
|
type: "button",
|
|
416
416
|
onClick: l,
|
|
417
417
|
style: {
|
|
@@ -424,7 +424,7 @@ function s({ filter: s, onSave: c, onClose: l }) {
|
|
|
424
424
|
color: k.textSecondary
|
|
425
425
|
},
|
|
426
426
|
children: u("bigconsole.filters.editor.action.cancel", "Cancel")
|
|
427
|
-
}), /* @__PURE__ */
|
|
427
|
+
}), /* @__PURE__ */ r("button", {
|
|
428
428
|
type: "button",
|
|
429
429
|
onClick: F,
|
|
430
430
|
disabled: !I || d,
|