@burdenoff/microfe-bigconsole 2026.1011.10 → 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,44 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import { useI18n as n } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
3
3
|
//#region src/bigconsole/components/dashboard/TemplateLayoutPreview.tsx
|
|
4
4
|
function r(e) {
|
|
5
5
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
6
6
|
}
|
|
7
7
|
function i({ content: i }) {
|
|
8
|
-
let { t: a } =
|
|
9
|
-
return !r(i.definition) || !Array.isArray(i.definition.pages) ? null : /* @__PURE__ */
|
|
8
|
+
let { t: a } = n();
|
|
9
|
+
return !r(i.definition) || !Array.isArray(i.definition.pages) ? null : /* @__PURE__ */ t("section", {
|
|
10
10
|
"aria-label": a("bigconsole.dashboards.templatePreview.label", "Template layout preview"),
|
|
11
11
|
className: "mb-form-gap space-y-control-gap",
|
|
12
12
|
children: [
|
|
13
|
-
/* @__PURE__ */
|
|
13
|
+
/* @__PURE__ */ e("h3", {
|
|
14
14
|
className: "text-sm font-medium",
|
|
15
15
|
children: a("bigconsole.dashboards.templatePreview.title", "Layout preview")
|
|
16
16
|
}),
|
|
17
|
-
i.definition.pages.filter(r).map((
|
|
17
|
+
i.definition.pages.filter(r).map((n, i) => /* @__PURE__ */ t("div", { children: [/* @__PURE__ */ e("p", {
|
|
18
18
|
className: "text-xs text-text-muted",
|
|
19
|
-
children: typeof
|
|
20
|
-
}), /* @__PURE__ */
|
|
19
|
+
children: typeof n.name == "string" ? n.name : a("bigconsole.dashboards.templatePreview.page", "Page {number}", { number: i + 1 })
|
|
20
|
+
}), /* @__PURE__ */ e("div", {
|
|
21
21
|
style: {
|
|
22
22
|
display: "grid",
|
|
23
23
|
gridTemplateColumns: "repeat(12, minmax(0, 1fr))",
|
|
24
24
|
gap: "var(--space-controlGap)"
|
|
25
25
|
},
|
|
26
|
-
children: Array.isArray(
|
|
27
|
-
let o = r(
|
|
28
|
-
return /* @__PURE__ */
|
|
26
|
+
children: Array.isArray(n.widgets) && n.widgets.filter(r).map((n, i) => {
|
|
27
|
+
let o = r(n.config) ? n.config : {}, s = typeof o.chartType == "string" ? a("bigconsole.dashboards.templatePreview.chartType", "{type} chart", { type: o.chartType }) : typeof n.type == "string" ? n.type.toLowerCase().replaceAll("_", " ") : a("bigconsole.dashboards.templatePreview.widgetType", "Widget"), c = r(n.position) ? n.position : {};
|
|
28
|
+
return /* @__PURE__ */ t("div", {
|
|
29
29
|
className: "rounded-card border border-border-default bg-bg-sunken p-3",
|
|
30
30
|
style: { gridColumn: `span ${typeof c.width == "number" ? Math.min(12, Math.max(1, Math.round(c.width))) : 6}` },
|
|
31
|
-
children: [/* @__PURE__ */
|
|
31
|
+
children: [/* @__PURE__ */ e("p", {
|
|
32
32
|
className: "truncate text-xs font-medium",
|
|
33
|
-
children: typeof
|
|
34
|
-
}), /* @__PURE__ */
|
|
33
|
+
children: typeof n.title == "string" ? n.title : a("bigconsole.dashboards.templatePreview.widget", "Widget {number}", { number: i + 1 })
|
|
34
|
+
}), /* @__PURE__ */ e("p", {
|
|
35
35
|
className: "truncate text-xs text-text-muted",
|
|
36
36
|
children: s
|
|
37
37
|
})]
|
|
38
38
|
}, i);
|
|
39
39
|
})
|
|
40
40
|
})] }, i)),
|
|
41
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ e("p", {
|
|
42
42
|
className: "text-xs text-text-muted",
|
|
43
43
|
children: a("bigconsole.dashboards.templatePreview.help", "Data appears after you connect a source. The dashboard uses these saved widgets and layouts.")
|
|
44
44
|
})
|
|
@@ -1,35 +1,37 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useBigConsoleBasePath as e, useBigConsoleDashboardOnly as t } from "../../context/BigConsoleContext.js";
|
|
2
|
+
import "../../context/index.js";
|
|
3
|
+
import { SECTION_FOCUS_RING as n } from "../common/sectionStyles.js";
|
|
2
4
|
import "../common/index.js";
|
|
3
|
-
import { WIDGET_CATEGORY_LABELS as
|
|
4
|
-
import { memo as
|
|
5
|
-
import { Activity as
|
|
6
|
-
import { Input as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { WIDGET_CATEGORY_LABELS as r, getWidgetCategories as i, getWidgetKey as a } from "../widgets/WidgetRegistry.js";
|
|
6
|
+
import { memo as o, useCallback as s, useMemo as c, useState as l } from "react";
|
|
7
|
+
import { Activity as u, BarChart3 as d, Calendar as f, ChevronDown as p, ChevronRight as m, Columns as h, ExternalLink as g, FileText as _, Filter as v, Gauge as y, GitBranch as b, Grid3x3 as x, GripVertical as S, Layers as C, LayoutDashboard as w, List as T, MapPin as E, Puzzle as D, Search as O, Store as k, Table as A, TrendingUp as j, Type as M, X as N } from "lucide-react";
|
|
8
|
+
import { Input as P } from "@burdenoff/fe-libs/ui";
|
|
9
|
+
import { jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
10
|
+
import { useI18n as L } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
9
11
|
//#region src/bigconsole/components/dashboard/WidgetPalette.tsx
|
|
10
|
-
var
|
|
11
|
-
TrendingUp:
|
|
12
|
-
BarChart3:
|
|
13
|
-
Filter:
|
|
14
|
-
Table:
|
|
15
|
-
Grid3x3:
|
|
16
|
-
Gauge:
|
|
17
|
-
Activity:
|
|
18
|
-
List:
|
|
19
|
-
FileText:
|
|
20
|
-
Type:
|
|
21
|
-
ExternalLink:
|
|
22
|
-
MapPin:
|
|
23
|
-
Calendar:
|
|
24
|
-
Columns:
|
|
25
|
-
GitBranch:
|
|
26
|
-
Puzzle:
|
|
27
|
-
LayoutDashboard:
|
|
12
|
+
var R = {
|
|
13
|
+
TrendingUp: j,
|
|
14
|
+
BarChart3: d,
|
|
15
|
+
Filter: v,
|
|
16
|
+
Table: A,
|
|
17
|
+
Grid3x3: x,
|
|
18
|
+
Gauge: y,
|
|
19
|
+
Activity: u,
|
|
20
|
+
List: T,
|
|
21
|
+
FileText: _,
|
|
22
|
+
Type: M,
|
|
23
|
+
ExternalLink: g,
|
|
24
|
+
MapPin: E,
|
|
25
|
+
Calendar: f,
|
|
26
|
+
Columns: h,
|
|
27
|
+
GitBranch: b,
|
|
28
|
+
Puzzle: D,
|
|
29
|
+
LayoutDashboard: w
|
|
28
30
|
};
|
|
29
|
-
function
|
|
30
|
-
return
|
|
31
|
+
function z(e) {
|
|
32
|
+
return R[e] || D;
|
|
31
33
|
}
|
|
32
|
-
var
|
|
34
|
+
var B = {
|
|
33
35
|
container: {
|
|
34
36
|
backgroundColor: "var(--color-bg-surface)",
|
|
35
37
|
display: "flex",
|
|
@@ -304,8 +306,8 @@ var R = {
|
|
|
304
306
|
cursor: "pointer",
|
|
305
307
|
transition: "border-color 0.15s, color 0.15s"
|
|
306
308
|
}
|
|
307
|
-
},
|
|
308
|
-
let { t:
|
|
309
|
+
}, V = o(function({ isOpen: o, onClose: u, onWidgetSelect: d, onDragStart: f, onDragEnd: h, installedWidgets: _ = [], installedWidgetsLoading: v = !1, definitions: y }) {
|
|
310
|
+
let { t: b } = L(), x = t(), w = e(), [T, E] = l(""), [D, A] = l(new Set([
|
|
309
311
|
"KPI",
|
|
310
312
|
"Visualization",
|
|
311
313
|
"Data",
|
|
@@ -313,14 +315,14 @@ var R = {
|
|
|
313
315
|
"Temporal",
|
|
314
316
|
"Custom",
|
|
315
317
|
"Installed"
|
|
316
|
-
])), [
|
|
318
|
+
])), [j, M] = l(null), R = c(() => (y ? Object.keys(r).map((e) => ({
|
|
317
319
|
category: e,
|
|
318
|
-
label:
|
|
319
|
-
widgets:
|
|
320
|
-
})) :
|
|
320
|
+
label: r[e],
|
|
321
|
+
widgets: y.filter((t) => t.category === e)
|
|
322
|
+
})) : i()).map((e) => {
|
|
321
323
|
if (e.category === "Installed") {
|
|
322
324
|
let t = /* @__PURE__ */ new Map();
|
|
323
|
-
for (let e of
|
|
325
|
+
for (let e of _) t.set(e.name.toLowerCase(), e);
|
|
324
326
|
for (let n of e.widgets) {
|
|
325
327
|
let e = n.name.toLowerCase(), r = t.get(e);
|
|
326
328
|
t.set(e, r ? {
|
|
@@ -337,19 +339,19 @@ var R = {
|
|
|
337
339
|
};
|
|
338
340
|
}
|
|
339
341
|
return e;
|
|
340
|
-
}).filter((e) => e.category !== "Installed" || e.widgets.length > 0), [
|
|
341
|
-
if (!
|
|
342
|
-
let e =
|
|
343
|
-
return
|
|
342
|
+
}).filter((e) => e.category !== "Installed" || e.widgets.length > 0), [_, y]), V = c(() => {
|
|
343
|
+
if (!T.trim()) return R;
|
|
344
|
+
let e = T.toLowerCase();
|
|
345
|
+
return R.map((t) => ({
|
|
344
346
|
...t,
|
|
345
347
|
widgets: t.widgets.filter((t) => t.name.toLowerCase().includes(e) || t.description.toLowerCase().includes(e) || t.tags.some((t) => t.includes(e)))
|
|
346
348
|
})).filter((e) => e.widgets.length > 0);
|
|
347
|
-
}, [
|
|
348
|
-
|
|
349
|
+
}, [R, T]), H = s((e) => {
|
|
350
|
+
A((t) => {
|
|
349
351
|
let n = new Set(t);
|
|
350
352
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
351
353
|
});
|
|
352
|
-
}, []),
|
|
354
|
+
}, []), U = s((e, t) => {
|
|
353
355
|
e.dataTransfer.setData("application/json", JSON.stringify({
|
|
354
356
|
type: t.type,
|
|
355
357
|
name: t.name,
|
|
@@ -360,31 +362,31 @@ var R = {
|
|
|
360
362
|
let n = document.createElement("div");
|
|
361
363
|
n.style.cssText = "\n position: absolute;\n top: -1000px;\n left: -1000px;\n padding: 8px 12px;\n background: var(--color-bg-surface);\n border: 2px solid var(--color-action-primary-bg);\n border-radius: var(--radius-card);\n font-size: var(--font-size-body-sm);\n font-weight: 500;\n color: var(--color-text-primary);\n box-shadow: var(--shadow-elevation-3);\n ", n.textContent = t.name, document.body.appendChild(n), e.dataTransfer.setDragImage(n, 0, 0), setTimeout(() => {
|
|
362
364
|
document.body.removeChild(n);
|
|
363
|
-
}, 0),
|
|
364
|
-
}, [
|
|
365
|
-
|
|
366
|
-
}, [
|
|
367
|
-
|
|
368
|
-
}, [
|
|
365
|
+
}, 0), f?.(t.type, t);
|
|
366
|
+
}, [f]), W = s(() => {
|
|
367
|
+
h?.();
|
|
368
|
+
}, [h]), G = s((e) => {
|
|
369
|
+
d?.(e.type, e);
|
|
370
|
+
}, [d]), K = s(() => {
|
|
369
371
|
if (typeof window > "u") return;
|
|
370
|
-
let e = `${window.location.origin}/
|
|
372
|
+
let e = `${window.location.origin}${w}/store${window.location.search}`;
|
|
371
373
|
window.open(e, "_blank", "noopener,noreferrer");
|
|
372
|
-
}, []);
|
|
373
|
-
return
|
|
374
|
+
}, [w]);
|
|
375
|
+
return o ? /* @__PURE__ */ I("section", {
|
|
374
376
|
"aria-label": "Widget palette",
|
|
375
377
|
"data-testid": "widget-palette",
|
|
376
|
-
style:
|
|
378
|
+
style: B.container,
|
|
377
379
|
className: "h-auto max-h-[45vh] w-full border-b border-[var(--color-border-subtle)] md:h-full md:max-h-none md:w-[300px] md:border-b-0 md:border-r",
|
|
378
380
|
children: [
|
|
379
|
-
/* @__PURE__ */
|
|
380
|
-
style:
|
|
381
|
-
children: [/* @__PURE__ */
|
|
382
|
-
style:
|
|
383
|
-
children: [/* @__PURE__ */
|
|
384
|
-
style:
|
|
385
|
-
children: [/* @__PURE__ */
|
|
386
|
-
style:
|
|
387
|
-
children: /* @__PURE__ */
|
|
381
|
+
/* @__PURE__ */ I("div", {
|
|
382
|
+
style: B.header,
|
|
383
|
+
children: [/* @__PURE__ */ I("div", {
|
|
384
|
+
style: B.headerTop,
|
|
385
|
+
children: [/* @__PURE__ */ I("div", {
|
|
386
|
+
style: B.headerTitle,
|
|
387
|
+
children: [/* @__PURE__ */ F("div", {
|
|
388
|
+
style: B.headerIcon,
|
|
389
|
+
children: /* @__PURE__ */ F(C, {
|
|
388
390
|
"aria-hidden": "true",
|
|
389
391
|
style: {
|
|
390
392
|
width: "18px",
|
|
@@ -392,21 +394,21 @@ var R = {
|
|
|
392
394
|
color: "var(--color-action-primary-text)"
|
|
393
395
|
}
|
|
394
396
|
})
|
|
395
|
-
}), /* @__PURE__ */
|
|
396
|
-
style:
|
|
397
|
-
children:
|
|
398
|
-
}), /* @__PURE__ */
|
|
399
|
-
style:
|
|
400
|
-
children:
|
|
397
|
+
}), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("h2", {
|
|
398
|
+
style: B.title,
|
|
399
|
+
children: b("bigconsole.dashboards.widgetPalette.title", "Widgets")
|
|
400
|
+
}), /* @__PURE__ */ F("p", {
|
|
401
|
+
style: B.subtitle,
|
|
402
|
+
children: b("bigconsole.dashboards.widgetPalette.subtitle", "Drag or click to add")
|
|
401
403
|
})] })]
|
|
402
|
-
}), /* @__PURE__ */
|
|
404
|
+
}), /* @__PURE__ */ F("button", {
|
|
403
405
|
type: "button",
|
|
404
|
-
onClick:
|
|
406
|
+
onClick: u,
|
|
405
407
|
"aria-label": "Close widget palette",
|
|
406
408
|
title: "Close widget palette",
|
|
407
|
-
style:
|
|
408
|
-
className: `hover:bg-action-ghost-bgHover motion-safe:transition-colors ${
|
|
409
|
-
children: /* @__PURE__ */
|
|
409
|
+
style: B.closeButton,
|
|
410
|
+
className: `hover:bg-action-ghost-bgHover motion-safe:transition-colors ${n}`,
|
|
411
|
+
children: /* @__PURE__ */ F(N, {
|
|
410
412
|
"aria-hidden": "true",
|
|
411
413
|
style: {
|
|
412
414
|
width: "16px",
|
|
@@ -414,110 +416,110 @@ var R = {
|
|
|
414
416
|
}
|
|
415
417
|
})
|
|
416
418
|
})]
|
|
417
|
-
}), /* @__PURE__ */
|
|
418
|
-
style:
|
|
419
|
+
}), /* @__PURE__ */ I("div", {
|
|
420
|
+
style: B.searchContainer,
|
|
419
421
|
children: [
|
|
420
|
-
/* @__PURE__ */
|
|
422
|
+
/* @__PURE__ */ F("label", {
|
|
421
423
|
htmlFor: "widget-palette-search",
|
|
422
424
|
className: "sr-only",
|
|
423
425
|
children: "Search widgets"
|
|
424
426
|
}),
|
|
425
|
-
/* @__PURE__ */
|
|
427
|
+
/* @__PURE__ */ F(O, {
|
|
426
428
|
"aria-hidden": "true",
|
|
427
|
-
style:
|
|
429
|
+
style: B.searchIcon
|
|
428
430
|
}),
|
|
429
|
-
/* @__PURE__ */ P
|
|
431
|
+
/* @__PURE__ */ F(P, {
|
|
430
432
|
id: "widget-palette-search",
|
|
431
433
|
type: "text",
|
|
432
|
-
placeholder:
|
|
433
|
-
value:
|
|
434
|
-
onChange: (e) =>
|
|
435
|
-
style:
|
|
434
|
+
placeholder: b("bigconsole.dashboards.widgetPalette.searchPlaceholder", "Search widgets..."),
|
|
435
|
+
value: T,
|
|
436
|
+
onChange: (e) => E(e.target.value),
|
|
437
|
+
style: B.searchInput
|
|
436
438
|
})
|
|
437
439
|
]
|
|
438
440
|
})]
|
|
439
441
|
}),
|
|
440
|
-
/* @__PURE__ */
|
|
441
|
-
style:
|
|
442
|
-
children: /* @__PURE__ */
|
|
443
|
-
style:
|
|
444
|
-
children: [
|
|
445
|
-
let
|
|
446
|
-
return /* @__PURE__ */
|
|
447
|
-
style:
|
|
448
|
-
children: [/* @__PURE__ */
|
|
449
|
-
style:
|
|
450
|
-
children: /* @__PURE__ */
|
|
442
|
+
/* @__PURE__ */ F("div", {
|
|
443
|
+
style: B.content,
|
|
444
|
+
children: /* @__PURE__ */ I("div", {
|
|
445
|
+
style: B.scrollArea,
|
|
446
|
+
children: [V.map((e) => {
|
|
447
|
+
let t = D.has(e.category), r = `widget-palette-${e.category.toLowerCase()}`;
|
|
448
|
+
return /* @__PURE__ */ I("div", {
|
|
449
|
+
style: B.categoryContainer,
|
|
450
|
+
children: [/* @__PURE__ */ F("h3", {
|
|
451
|
+
style: B.categoryHeading,
|
|
452
|
+
children: /* @__PURE__ */ I("button", {
|
|
451
453
|
type: "button",
|
|
452
|
-
onClick: () =>
|
|
453
|
-
"aria-expanded":
|
|
454
|
-
"aria-controls":
|
|
455
|
-
style:
|
|
456
|
-
className: `hover:bg-action-ghost-bgHover motion-safe:transition-colors ${
|
|
454
|
+
onClick: () => H(e.category),
|
|
455
|
+
"aria-expanded": t,
|
|
456
|
+
"aria-controls": r,
|
|
457
|
+
style: B.categoryHeader,
|
|
458
|
+
className: `hover:bg-action-ghost-bgHover motion-safe:transition-colors ${n}`,
|
|
457
459
|
children: [
|
|
458
|
-
|
|
460
|
+
F(t ? p : m, {
|
|
459
461
|
"aria-hidden": "true",
|
|
460
|
-
style:
|
|
462
|
+
style: B.categoryChevron
|
|
461
463
|
}),
|
|
462
|
-
/* @__PURE__ */
|
|
463
|
-
style:
|
|
464
|
-
children:
|
|
464
|
+
/* @__PURE__ */ F("span", {
|
|
465
|
+
style: B.categoryLabel,
|
|
466
|
+
children: e.label
|
|
465
467
|
}),
|
|
466
|
-
/* @__PURE__ */
|
|
467
|
-
style:
|
|
468
|
-
children:
|
|
468
|
+
/* @__PURE__ */ F("span", {
|
|
469
|
+
style: B.categoryCount,
|
|
470
|
+
children: e.widgets.length
|
|
469
471
|
})
|
|
470
472
|
]
|
|
471
473
|
})
|
|
472
|
-
}),
|
|
473
|
-
id:
|
|
474
|
-
style:
|
|
475
|
-
children: [
|
|
474
|
+
}), t && /* @__PURE__ */ I("div", {
|
|
475
|
+
id: r,
|
|
476
|
+
style: B.widgetList,
|
|
477
|
+
children: [v && e.category === "Installed" && /* @__PURE__ */ F("div", {
|
|
476
478
|
style: {
|
|
477
479
|
fontSize: "var(--font-size-body-sm)",
|
|
478
480
|
color: "var(--color-text-muted)",
|
|
479
481
|
padding: "var(--space-controlGap)"
|
|
480
482
|
},
|
|
481
|
-
children:
|
|
482
|
-
}),
|
|
483
|
-
let t =
|
|
484
|
-
return /* @__PURE__ */
|
|
483
|
+
children: b("bigconsole.dashboards.widgetPalette.loading", "Loading...")
|
|
484
|
+
}), e.widgets.map((e) => {
|
|
485
|
+
let t = z(e.icon), n = a(e), r = j === n;
|
|
486
|
+
return /* @__PURE__ */ I("div", {
|
|
485
487
|
draggable: !0,
|
|
486
488
|
role: "button",
|
|
487
489
|
tabIndex: 0,
|
|
488
490
|
"aria-label": `Add ${e.name} widget`,
|
|
489
|
-
onDragStart: (t) =>
|
|
490
|
-
onDragEnd:
|
|
491
|
-
onClick: () =>
|
|
491
|
+
onDragStart: (t) => U(t, e),
|
|
492
|
+
onDragEnd: W,
|
|
493
|
+
onClick: () => G(e),
|
|
492
494
|
onKeyDown: (t) => {
|
|
493
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
495
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), G(e));
|
|
494
496
|
},
|
|
495
|
-
onMouseEnter: () =>
|
|
496
|
-
onMouseLeave: () =>
|
|
497
|
+
onMouseEnter: () => M(n),
|
|
498
|
+
onMouseLeave: () => M(null),
|
|
497
499
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
498
500
|
style: {
|
|
499
|
-
...
|
|
500
|
-
...
|
|
501
|
+
...B.widgetCard,
|
|
502
|
+
...r ? B.widgetCardHover : {}
|
|
501
503
|
},
|
|
502
504
|
children: [
|
|
503
|
-
/* @__PURE__ */
|
|
505
|
+
/* @__PURE__ */ F(S, {
|
|
504
506
|
"aria-hidden": "true",
|
|
505
|
-
style:
|
|
507
|
+
style: B.dragHandle
|
|
506
508
|
}),
|
|
507
|
-
/* @__PURE__ */
|
|
508
|
-
style:
|
|
509
|
-
children: /* @__PURE__ */
|
|
509
|
+
/* @__PURE__ */ F("div", {
|
|
510
|
+
style: B.widgetIcon,
|
|
511
|
+
children: /* @__PURE__ */ F(t, {
|
|
510
512
|
"aria-hidden": "true",
|
|
511
|
-
style:
|
|
513
|
+
style: B.widgetIconInner
|
|
512
514
|
})
|
|
513
515
|
}),
|
|
514
|
-
/* @__PURE__ */
|
|
515
|
-
style:
|
|
516
|
-
children: [/* @__PURE__ */
|
|
517
|
-
style:
|
|
516
|
+
/* @__PURE__ */ I("div", {
|
|
517
|
+
style: B.widgetText,
|
|
518
|
+
children: [/* @__PURE__ */ F("div", {
|
|
519
|
+
style: B.widgetName,
|
|
518
520
|
children: e.name
|
|
519
|
-
}), /* @__PURE__ */
|
|
520
|
-
style:
|
|
521
|
+
}), /* @__PURE__ */ F("div", {
|
|
522
|
+
style: B.widgetDescription,
|
|
521
523
|
children: e.description
|
|
522
524
|
})]
|
|
523
525
|
})
|
|
@@ -525,14 +527,14 @@ var R = {
|
|
|
525
527
|
}, n);
|
|
526
528
|
})]
|
|
527
529
|
})]
|
|
528
|
-
},
|
|
529
|
-
}),
|
|
530
|
-
style:
|
|
530
|
+
}, e.category);
|
|
531
|
+
}), V.length === 0 && /* @__PURE__ */ I("div", {
|
|
532
|
+
style: B.emptyState,
|
|
531
533
|
role: "status",
|
|
532
534
|
children: [
|
|
533
|
-
/* @__PURE__ */
|
|
534
|
-
style:
|
|
535
|
-
children: /* @__PURE__ */
|
|
535
|
+
/* @__PURE__ */ F("div", {
|
|
536
|
+
style: B.emptyIcon,
|
|
537
|
+
children: /* @__PURE__ */ F(O, {
|
|
536
538
|
"aria-hidden": "true",
|
|
537
539
|
style: {
|
|
538
540
|
width: "24px",
|
|
@@ -541,47 +543,47 @@ var R = {
|
|
|
541
543
|
}
|
|
542
544
|
})
|
|
543
545
|
}),
|
|
544
|
-
/* @__PURE__ */
|
|
545
|
-
style:
|
|
546
|
+
/* @__PURE__ */ I("p", {
|
|
547
|
+
style: B.emptyTitle,
|
|
546
548
|
children: [
|
|
547
|
-
|
|
549
|
+
b("bigconsole.dashboards.widgetPalette.noResultsBefore", "No widgets found for"),
|
|
548
550
|
" “",
|
|
549
|
-
/* @__PURE__ */
|
|
551
|
+
/* @__PURE__ */ F("strong", { children: T }),
|
|
550
552
|
"”"
|
|
551
553
|
]
|
|
552
554
|
}),
|
|
553
|
-
/* @__PURE__ */
|
|
554
|
-
style:
|
|
555
|
+
/* @__PURE__ */ F("p", {
|
|
556
|
+
style: B.emptyText,
|
|
555
557
|
children: "Try a shorter term, or browse the widget store for more types."
|
|
556
558
|
}),
|
|
557
|
-
/* @__PURE__ */
|
|
559
|
+
/* @__PURE__ */ F("button", {
|
|
558
560
|
type: "button",
|
|
559
|
-
onClick: () =>
|
|
560
|
-
style:
|
|
561
|
+
onClick: () => E(""),
|
|
562
|
+
style: B.clearButton,
|
|
561
563
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
562
|
-
children:
|
|
564
|
+
children: b("bigconsole.dashboards.widgetPalette.clearSearch", "Clear search")
|
|
563
565
|
})
|
|
564
566
|
]
|
|
565
567
|
})]
|
|
566
568
|
})
|
|
567
569
|
}),
|
|
568
|
-
/* @__PURE__ */
|
|
569
|
-
style:
|
|
570
|
-
children: [/* @__PURE__ */
|
|
570
|
+
/* @__PURE__ */ I("div", {
|
|
571
|
+
style: B.footer,
|
|
572
|
+
children: [!x && /* @__PURE__ */ I("button", {
|
|
571
573
|
type: "button",
|
|
572
|
-
onClick:
|
|
573
|
-
style:
|
|
574
|
-
className:
|
|
574
|
+
onClick: K,
|
|
575
|
+
style: B.browseStoreButton,
|
|
576
|
+
className: "hover:border-action-primary-bg hover:text-action-primary-text motion-safe:transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
575
577
|
children: [
|
|
576
|
-
/* @__PURE__ */
|
|
578
|
+
/* @__PURE__ */ F(k, {
|
|
577
579
|
"aria-hidden": "true",
|
|
578
580
|
style: {
|
|
579
581
|
width: "15px",
|
|
580
582
|
height: "15px"
|
|
581
583
|
}
|
|
582
584
|
}),
|
|
583
|
-
|
|
584
|
-
/* @__PURE__ */
|
|
585
|
+
b("bigconsole.dashboards.widgetPalette.browseStore", "Browse widget store"),
|
|
586
|
+
/* @__PURE__ */ F(g, {
|
|
585
587
|
"aria-hidden": "true",
|
|
586
588
|
style: {
|
|
587
589
|
width: "13px",
|
|
@@ -590,13 +592,13 @@ var R = {
|
|
|
590
592
|
}
|
|
591
593
|
})
|
|
592
594
|
]
|
|
593
|
-
}), /* @__PURE__ */
|
|
594
|
-
style:
|
|
595
|
-
children:
|
|
595
|
+
}), /* @__PURE__ */ F("p", {
|
|
596
|
+
style: B.footerText,
|
|
597
|
+
children: b("bigconsole.dashboards.widgetPalette.footerHint", "Drag widgets to position them on the canvas")
|
|
596
598
|
})]
|
|
597
599
|
})
|
|
598
600
|
]
|
|
599
601
|
}) : null;
|
|
600
602
|
});
|
|
601
603
|
//#endregion
|
|
602
|
-
export {
|
|
604
|
+
export { V as default };
|