@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.
Files changed (161) hide show
  1. package/README.md +19 -0
  2. package/dist/bigconsole/BigConsoleRoot.js +88 -82
  3. package/dist/bigconsole/BigConsoleRoutes.js +163 -136
  4. package/dist/bigconsole/assistant/assistantProduct.js +1 -4
  5. package/dist/bigconsole/assistant/pageContext.d.ts +0 -14
  6. package/dist/bigconsole/assistant/pageContext.js +1 -6
  7. package/dist/bigconsole/assistant/recordAdapters.js +26 -27
  8. package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +31 -31
  9. package/dist/bigconsole/components/common/index.d.ts +0 -1
  10. package/dist/bigconsole/components/common/index.js +0 -1
  11. package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +44 -44
  12. package/dist/bigconsole/components/dashboard/DashboardCanvas.js +36 -36
  13. package/dist/bigconsole/components/dashboard/DashboardToolbar.js +59 -59
  14. package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +58 -57
  15. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +30 -30
  16. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +41 -41
  17. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js +34 -34
  18. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +34 -34
  19. package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +110 -110
  20. package/dist/bigconsole/components/dashboard/PublishToStoreDialog.js +21 -21
  21. package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js +46 -46
  22. package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +164 -173
  23. package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +101 -101
  24. package/dist/bigconsole/components/dashboard/TemplateInstallOptions.js +31 -31
  25. package/dist/bigconsole/components/dashboard/TemplateLayoutPreview.js +15 -15
  26. package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -1
  27. package/dist/bigconsole/components/dashboard/WidgetPalette.js +165 -163
  28. package/dist/bigconsole/components/datasink/AlertExecutionHistory.js +37 -37
  29. package/dist/bigconsole/components/datasink/AlertRuleEditor.js +66 -66
  30. package/dist/bigconsole/components/datasink/CacheTTLSelector.js +35 -35
  31. package/dist/bigconsole/components/datasink/DataSinkCard.js +50 -51
  32. package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js +18 -18
  33. package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js +20 -20
  34. package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +47 -47
  35. package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +91 -91
  36. package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +35 -35
  37. package/dist/bigconsole/components/parser/DataSinkSelector.js +40 -40
  38. package/dist/bigconsole/components/parser/ImportParserDialog.js +120 -120
  39. package/dist/bigconsole/components/parser/ParserSelector.js +51 -51
  40. package/dist/bigconsole/components/pipeline/PipelineScopePicker.js +10 -10
  41. package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +76 -77
  42. package/dist/bigconsole/components/preview/AiPreviewPanel.js +95 -96
  43. package/dist/bigconsole/components/widgets/ActionConfigDialog.js +4 -4
  44. package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +93 -93
  45. package/dist/bigconsole/components/widgets/PropertiesPanel.js +499 -507
  46. package/dist/bigconsole/components/widgets/WidgetRegistry.js +0 -1
  47. package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js +4 -4
  48. package/dist/bigconsole/components/widgets/chart/ChartConfig.js +48 -48
  49. package/dist/bigconsole/components/widgets/comments/WidgetComments.js +46 -46
  50. package/dist/bigconsole/components/widgets/custom/CustomWidget.js +73 -131
  51. package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +61 -61
  52. package/dist/bigconsole/components/widgets/form/FormWidget.js +36 -36
  53. package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +42 -42
  54. package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +25 -25
  55. package/dist/bigconsole/components/widgets/iframe-widget/IframeWidget.d.ts +28 -9
  56. package/dist/bigconsole/components/widgets/iframe-widget/IframeWidget.js +115 -42
  57. package/dist/bigconsole/components/widgets/iframe-widget/framePolicy.d.ts +20 -0
  58. package/dist/bigconsole/components/widgets/iframe-widget/framePolicy.js +10 -0
  59. package/dist/bigconsole/components/widgets/iframe-widget/index.d.ts +2 -1
  60. package/dist/bigconsole/components/widgets/iframe-widget/index.js +3 -2
  61. package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js +4 -4
  62. package/dist/bigconsole/components/widgets/list/ListConfig.js +30 -30
  63. package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +38 -38
  64. package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js +9 -9
  65. package/dist/bigconsole/components/widgets/metric-card/TrendIndicator.js +9 -9
  66. package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +49 -49
  67. package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +39 -39
  68. package/dist/bigconsole/components/widgets/table/TableConfig.js +73 -73
  69. package/dist/bigconsole/components/widgets/text-widget/TextWidget.js +110 -27
  70. package/dist/bigconsole/components/widgets/text-widget/textData.d.ts +6 -0
  71. package/dist/bigconsole/components/widgets/text-widget/textData.js +17 -14
  72. package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +64 -64
  73. package/dist/bigconsole/components/workflow/WorkflowOpenGuard.js +15 -15
  74. package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js +15 -15
  75. package/dist/bigconsole/context/BigConsoleContext.d.ts +10 -0
  76. package/dist/bigconsole/context/BigConsoleContext.js +47 -30
  77. package/dist/bigconsole/context/index.d.ts +1 -1
  78. package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +58 -49
  79. package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +74 -72
  80. package/dist/bigconsole/customWidget/proposalPreview.d.ts +5 -0
  81. package/dist/bigconsole/customWidget/proposalPreview.js +31 -0
  82. package/dist/bigconsole/hooks/useDataSinkAlerts.d.ts +0 -23
  83. package/dist/bigconsole/hooks/useDataSinkAlerts.js +113 -138
  84. package/dist/bigconsole/hooks/useDataSinkOperations.d.ts +7 -0
  85. package/dist/bigconsole/hooks/useDataSinkOperations.js +109 -98
  86. package/dist/bigconsole/hooks/useDataSinkSubscription.js +0 -1
  87. package/dist/bigconsole/hooks/useDrilldown.js +68 -67
  88. package/dist/bigconsole/hooks/useExportDataSink.js +1 -1
  89. package/dist/bigconsole/hooks/useGlobalFilters.js +3 -3
  90. package/dist/bigconsole/hooks/useImportDataSink.js +102 -90
  91. package/dist/bigconsole/pages/AdminPage.js +130 -130
  92. package/dist/bigconsole/pages/DashboardBuilderPage.js +60 -72
  93. package/dist/bigconsole/pages/DashboardViewPage.js +235 -258
  94. package/dist/bigconsole/pages/DashboardsPage.js +221 -269
  95. package/dist/bigconsole/pages/DataParsersPage.js +157 -180
  96. package/dist/bigconsole/pages/DataSinkAlertsPage.js +55 -62
  97. package/dist/bigconsole/pages/DataSinkBuilderPage.js +318 -295
  98. package/dist/bigconsole/pages/DataSinkViewPage.js +256 -255
  99. package/dist/bigconsole/pages/DataSinksPage.js +216 -251
  100. package/dist/bigconsole/pages/DataSourcesPage.js +5 -5
  101. package/dist/bigconsole/pages/InsightsPage.js +265 -279
  102. package/dist/bigconsole/pages/OverviewPage.js +47 -47
  103. package/dist/bigconsole/pages/ParserBuilderPage.js +213 -229
  104. package/dist/bigconsole/pages/ParserViewPage.js +97 -97
  105. package/dist/bigconsole/pages/PipelineBuilderPage.js +214 -256
  106. package/dist/bigconsole/pages/PipelineViewPage.js +146 -146
  107. package/dist/bigconsole/pages/PipelinesPage.js +88 -107
  108. package/dist/bigconsole/pages/SettingsPage.js +173 -179
  109. package/dist/bigconsole/pages/WidgetDemoPage.js +42 -42
  110. package/dist/bigconsole/pages/WorkflowViewPage.js +1 -1
  111. package/dist/bigconsole/pages/WorkflowsPage.js +141 -141
  112. package/dist/bigconsole/providers/BigConsoleQuotaProvider.js +12 -12
  113. package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js +235 -122
  114. package/dist/bigconsole/renderers/adapters/BlockKitRenderer.d.ts +6 -1
  115. package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +151 -151
  116. package/dist/bigconsole/renderers/adapters/CustomRenderer.js +46 -46
  117. package/dist/bigconsole/renderers/adapters/adaptiveCardContent.d.ts +29 -0
  118. package/dist/bigconsole/renderers/adapters/adaptiveCardContent.js +51 -0
  119. package/dist/bigconsole/store/widgetStore.d.ts +0 -12
  120. package/dist/bigconsole/store/widgetStore.js +1 -3
  121. package/dist/bigconsole/types/index.d.ts +17 -2
  122. package/dist/bigconsole/utils/backendError.d.ts +0 -18
  123. package/dist/bigconsole/utils/dataSinkPayload.d.ts +48 -0
  124. package/dist/bigconsole/utils/dataSinkPayload.js +38 -0
  125. package/dist/bigconsole/utils/index.d.ts +2 -0
  126. package/dist/bigconsole/utils/safeUrl.d.ts +79 -0
  127. package/dist/bigconsole/utils/safeUrl.js +93 -0
  128. package/dist/bigconsole/utils/sanitizeHtml.d.ts +16 -0
  129. package/dist/bigconsole/utils/sanitizeHtml.js +67 -0
  130. package/dist/bigconsole/workflowOpen.js +14 -15
  131. package/dist/generated/wspace-operations.d.ts +138 -8
  132. package/dist/generated/wspace-operations.js +281 -240
  133. package/dist/node_modules/dompurify/dist/purify.es.js +800 -0
  134. package/package.json +9 -5
  135. package/dist/bigconsole/assistant/displayCopy.d.ts +0 -32
  136. package/dist/bigconsole/assistant/pageControls.d.ts +0 -81
  137. package/dist/bigconsole/assistant/pageControls.js +0 -169
  138. package/dist/bigconsole/assistant/previewControl.d.ts +0 -16
  139. package/dist/bigconsole/assistant/previewControl.js +0 -10
  140. package/dist/bigconsole/assistant/usePreviewControl.d.ts +0 -2
  141. package/dist/bigconsole/assistant/usePreviewControl.js +0 -20
  142. package/dist/bigconsole/components/common/SortBySelect.d.ts +0 -11
  143. package/dist/bigconsole/components/common/SortBySelect.js +0 -29
  144. package/dist/bigconsole/constants/backendErrors.js +0 -94
  145. package/dist/bigconsole/hooks/useDashboardLayoutBaseline.d.ts +0 -14
  146. package/dist/bigconsole/hooks/useDashboardLayoutBaseline.js +0 -32
  147. package/dist/bigconsole/utils/backendError.js +0 -42
  148. package/dist/bigconsole/utils/dashboardList.d.ts +0 -28
  149. package/dist/bigconsole/utils/dashboardList.js +0 -15
  150. package/dist/bigconsole/utils/dataSinkList.d.ts +0 -15
  151. package/dist/bigconsole/utils/dataSinkList.js +0 -15
  152. package/dist/bigconsole/utils/formDirty.d.ts +0 -82
  153. package/dist/bigconsole/utils/formDirty.js +0 -21
  154. package/dist/bigconsole/utils/insightsDraft.d.ts +0 -29
  155. package/dist/bigconsole/utils/insightsDraft.js +0 -8
  156. package/dist/bigconsole/utils/layoutBaseline.d.ts +0 -130
  157. package/dist/bigconsole/utils/layoutBaseline.js +0 -96
  158. package/dist/bigconsole/utils/listSort.d.ts +0 -80
  159. package/dist/bigconsole/utils/listSort.js +0 -85
  160. package/dist/bigconsole/utils/widgetFormDirty.d.ts +0 -16
  161. package/dist/bigconsole/utils/widgetFormDirty.js +0 -13
@@ -1,44 +1,44 @@
1
- import { useI18n as e } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
2
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
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 } = e();
9
- return !r(i.definition) || !Array.isArray(i.definition.pages) ? null : /* @__PURE__ */ n("section", {
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__ */ t("h3", {
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((e, i) => /* @__PURE__ */ n("div", { children: [/* @__PURE__ */ t("p", {
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 e.name == "string" ? e.name : a("bigconsole.dashboards.templatePreview.page", "Page {number}", { number: i + 1 })
20
- }), /* @__PURE__ */ t("div", {
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(e.widgets) && e.widgets.filter(r).map((e, i) => {
27
- let o = r(e.config) ? e.config : {}, s = typeof o.chartType == "string" ? a("bigconsole.dashboards.templatePreview.chartType", "{type} chart", { type: o.chartType }) : typeof e.type == "string" ? e.type.toLowerCase().replaceAll("_", " ") : a("bigconsole.dashboards.templatePreview.widgetType", "Widget"), c = r(e.position) ? e.position : {};
28
- return /* @__PURE__ */ n("div", {
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__ */ t("p", {
31
+ children: [/* @__PURE__ */ e("p", {
32
32
  className: "truncate text-xs font-medium",
33
- children: typeof e.title == "string" ? e.title : a("bigconsole.dashboards.templatePreview.widget", "Widget {number}", { number: i + 1 })
34
- }), /* @__PURE__ */ t("p", {
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__ */ t("p", {
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,4 +1,4 @@
1
1
  import "../../../hooks/index.js";
2
2
  import "react";
3
- import "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
4
3
  import "react/jsx-runtime";
4
+ import "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
@@ -1,35 +1,37 @@
1
- import { SECTION_FOCUS_RING as e } from "../common/sectionStyles.js";
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 t, getWidgetCategories as n, getWidgetKey as r } from "../widgets/WidgetRegistry.js";
4
- import { memo as i, useCallback as a, useMemo as o, useState as s } from "react";
5
- import { Activity as c, BarChart3 as l, Calendar as u, ChevronDown as d, ChevronRight as f, Columns as p, ExternalLink as m, FileText as h, Filter as g, Gauge as _, GitBranch as v, Grid3x3 as y, GripVertical as b, Layers as x, LayoutDashboard as S, List as C, MapPin as w, Puzzle as T, Search as E, Store as D, Table as O, TrendingUp as k, Type as A, X as j } from "lucide-react";
6
- import { Input as M } from "@burdenoff/fe-libs/ui";
7
- import { useI18n as N } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
8
- import { jsx as P, jsxs as F } from "react/jsx-runtime";
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 I = {
11
- TrendingUp: k,
12
- BarChart3: l,
13
- Filter: g,
14
- Table: O,
15
- Grid3x3: y,
16
- Gauge: _,
17
- Activity: c,
18
- List: C,
19
- FileText: h,
20
- Type: A,
21
- ExternalLink: m,
22
- MapPin: w,
23
- Calendar: u,
24
- Columns: p,
25
- GitBranch: v,
26
- Puzzle: T,
27
- LayoutDashboard: S
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 L(e) {
30
- return I[e] || T;
31
+ function z(e) {
32
+ return R[e] || D;
31
33
  }
32
- var R = {
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
- }, z = i(function({ isOpen: i, onClose: c, onWidgetSelect: l, onDragStart: u, onDragEnd: p, installedWidgets: h = [], installedWidgetsLoading: g = !1, definitions: _ }) {
308
- let { t: v } = N(), [y, S] = s(""), [C, w] = s(new Set([
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
- ])), [T, O] = s(null), k = o(() => (_ ? Object.keys(t).map((e) => ({
318
+ ])), [j, M] = l(null), R = c(() => (y ? Object.keys(r).map((e) => ({
317
319
  category: e,
318
- label: t[e],
319
- widgets: _.filter((t) => t.category === e)
320
- })) : n()).map((e) => {
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 h) t.set(e.name.toLowerCase(), e);
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), [h, _]), A = o(() => {
341
- if (!y.trim()) return k;
342
- let e = y.toLowerCase();
343
- return k.map((t) => ({
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
- }, [k, y]), I = a((e) => {
348
- w((t) => {
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
- }, []), z = a((e, t) => {
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), u?.(t.type, t);
364
- }, [u]), B = a(() => {
365
- p?.();
366
- }, [p]), V = a((e) => {
367
- l?.(e.type, e);
368
- }, [l]), H = a(() => {
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}/bigconsole/store${window.location.search}`;
372
+ let e = `${window.location.origin}${w}/store${window.location.search}`;
371
373
  window.open(e, "_blank", "noopener,noreferrer");
372
- }, []);
373
- return i ? /* @__PURE__ */ F("section", {
374
+ }, [w]);
375
+ return o ? /* @__PURE__ */ I("section", {
374
376
  "aria-label": "Widget palette",
375
377
  "data-testid": "widget-palette",
376
- style: R.container,
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__ */ F("div", {
380
- style: R.header,
381
- children: [/* @__PURE__ */ F("div", {
382
- style: R.headerTop,
383
- children: [/* @__PURE__ */ F("div", {
384
- style: R.headerTitle,
385
- children: [/* @__PURE__ */ P("div", {
386
- style: R.headerIcon,
387
- children: /* @__PURE__ */ P(x, {
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__ */ F("div", { children: [/* @__PURE__ */ P("h2", {
396
- style: R.title,
397
- children: v("bigconsole.dashboards.widgetPalette.title", "Widgets")
398
- }), /* @__PURE__ */ P("p", {
399
- style: R.subtitle,
400
- children: v("bigconsole.dashboards.widgetPalette.subtitle", "Drag or click to add")
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__ */ P("button", {
404
+ }), /* @__PURE__ */ F("button", {
403
405
  type: "button",
404
- onClick: c,
406
+ onClick: u,
405
407
  "aria-label": "Close widget palette",
406
408
  title: "Close widget palette",
407
- style: R.closeButton,
408
- className: `hover:bg-action-ghost-bgHover motion-safe:transition-colors ${e}`,
409
- children: /* @__PURE__ */ P(j, {
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__ */ F("div", {
418
- style: R.searchContainer,
419
+ }), /* @__PURE__ */ I("div", {
420
+ style: B.searchContainer,
419
421
  children: [
420
- /* @__PURE__ */ P("label", {
422
+ /* @__PURE__ */ F("label", {
421
423
  htmlFor: "widget-palette-search",
422
424
  className: "sr-only",
423
425
  children: "Search widgets"
424
426
  }),
425
- /* @__PURE__ */ P(E, {
427
+ /* @__PURE__ */ F(O, {
426
428
  "aria-hidden": "true",
427
- style: R.searchIcon
429
+ style: B.searchIcon
428
430
  }),
429
- /* @__PURE__ */ P(M, {
431
+ /* @__PURE__ */ F(P, {
430
432
  id: "widget-palette-search",
431
433
  type: "text",
432
- placeholder: v("bigconsole.dashboards.widgetPalette.searchPlaceholder", "Search widgets..."),
433
- value: y,
434
- onChange: (e) => S(e.target.value),
435
- style: R.searchInput
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__ */ P("div", {
441
- style: R.content,
442
- children: /* @__PURE__ */ F("div", {
443
- style: R.scrollArea,
444
- children: [A.map((t) => {
445
- let n = C.has(t.category), i = `widget-palette-${t.category.toLowerCase()}`;
446
- return /* @__PURE__ */ F("div", {
447
- style: R.categoryContainer,
448
- children: [/* @__PURE__ */ P("h3", {
449
- style: R.categoryHeading,
450
- children: /* @__PURE__ */ F("button", {
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: () => I(t.category),
453
- "aria-expanded": n,
454
- "aria-controls": i,
455
- style: R.categoryHeader,
456
- className: `hover:bg-action-ghost-bgHover motion-safe:transition-colors ${e}`,
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
- P(n ? d : f, {
460
+ F(t ? p : m, {
459
461
  "aria-hidden": "true",
460
- style: R.categoryChevron
462
+ style: B.categoryChevron
461
463
  }),
462
- /* @__PURE__ */ P("span", {
463
- style: R.categoryLabel,
464
- children: t.label
464
+ /* @__PURE__ */ F("span", {
465
+ style: B.categoryLabel,
466
+ children: e.label
465
467
  }),
466
- /* @__PURE__ */ P("span", {
467
- style: R.categoryCount,
468
- children: t.widgets.length
468
+ /* @__PURE__ */ F("span", {
469
+ style: B.categoryCount,
470
+ children: e.widgets.length
469
471
  })
470
472
  ]
471
473
  })
472
- }), n && /* @__PURE__ */ F("div", {
473
- id: i,
474
- style: R.widgetList,
475
- children: [g && t.category === "Installed" && /* @__PURE__ */ P("div", {
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: v("bigconsole.dashboards.widgetPalette.loading", "Loading...")
482
- }), t.widgets.map((e) => {
483
- let t = L(e.icon), n = r(e), i = T === n;
484
- return /* @__PURE__ */ F("div", {
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) => z(t, e),
490
- onDragEnd: B,
491
- onClick: () => V(e),
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(), V(e));
495
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), G(e));
494
496
  },
495
- onMouseEnter: () => O(n),
496
- onMouseLeave: () => O(null),
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
- ...R.widgetCard,
500
- ...i ? R.widgetCardHover : {}
501
+ ...B.widgetCard,
502
+ ...r ? B.widgetCardHover : {}
501
503
  },
502
504
  children: [
503
- /* @__PURE__ */ P(b, {
505
+ /* @__PURE__ */ F(S, {
504
506
  "aria-hidden": "true",
505
- style: R.dragHandle
507
+ style: B.dragHandle
506
508
  }),
507
- /* @__PURE__ */ P("div", {
508
- style: R.widgetIcon,
509
- children: /* @__PURE__ */ P(t, {
509
+ /* @__PURE__ */ F("div", {
510
+ style: B.widgetIcon,
511
+ children: /* @__PURE__ */ F(t, {
510
512
  "aria-hidden": "true",
511
- style: R.widgetIconInner
513
+ style: B.widgetIconInner
512
514
  })
513
515
  }),
514
- /* @__PURE__ */ F("div", {
515
- style: R.widgetText,
516
- children: [/* @__PURE__ */ P("div", {
517
- style: R.widgetName,
516
+ /* @__PURE__ */ I("div", {
517
+ style: B.widgetText,
518
+ children: [/* @__PURE__ */ F("div", {
519
+ style: B.widgetName,
518
520
  children: e.name
519
- }), /* @__PURE__ */ P("div", {
520
- style: R.widgetDescription,
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
- }, t.category);
529
- }), A.length === 0 && /* @__PURE__ */ F("div", {
530
- style: R.emptyState,
530
+ }, e.category);
531
+ }), V.length === 0 && /* @__PURE__ */ I("div", {
532
+ style: B.emptyState,
531
533
  role: "status",
532
534
  children: [
533
- /* @__PURE__ */ P("div", {
534
- style: R.emptyIcon,
535
- children: /* @__PURE__ */ P(E, {
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__ */ F("p", {
545
- style: R.emptyTitle,
546
+ /* @__PURE__ */ I("p", {
547
+ style: B.emptyTitle,
546
548
  children: [
547
- v("bigconsole.dashboards.widgetPalette.noResultsBefore", "No widgets found for"),
549
+ b("bigconsole.dashboards.widgetPalette.noResultsBefore", "No widgets found for"),
548
550
  " “",
549
- /* @__PURE__ */ P("strong", { children: y }),
551
+ /* @__PURE__ */ F("strong", { children: T }),
550
552
  "”"
551
553
  ]
552
554
  }),
553
- /* @__PURE__ */ P("p", {
554
- style: R.emptyText,
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__ */ P("button", {
559
+ /* @__PURE__ */ F("button", {
558
560
  type: "button",
559
- onClick: () => S(""),
560
- style: R.clearButton,
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: v("bigconsole.dashboards.widgetPalette.clearSearch", "Clear search")
564
+ children: b("bigconsole.dashboards.widgetPalette.clearSearch", "Clear search")
563
565
  })
564
566
  ]
565
567
  })]
566
568
  })
567
569
  }),
568
- /* @__PURE__ */ F("div", {
569
- style: R.footer,
570
- children: [/* @__PURE__ */ F("button", {
570
+ /* @__PURE__ */ I("div", {
571
+ style: B.footer,
572
+ children: [!x && /* @__PURE__ */ I("button", {
571
573
  type: "button",
572
- onClick: H,
573
- style: R.browseStoreButton,
574
- className: `hover:border-action-primary-bg hover:text-action-primary-text motion-safe:transition-colors ${e}`,
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__ */ P(D, {
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
- v("bigconsole.dashboards.widgetPalette.browseStore", "Browse widget store"),
584
- /* @__PURE__ */ P(m, {
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__ */ P("p", {
594
- style: R.footerText,
595
- children: v("bigconsole.dashboards.widgetPalette.footerHint", "Drag widgets to position them on the canvas")
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 { z as default };
604
+ export { V as default };