@burdenoff/microfe-bigconsole 2026.1012.3 → 2026.1012.5

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 (158) hide show
  1. package/dist/bigconsole/BigConsoleRoutes.js +149 -140
  2. package/dist/bigconsole/assistant/assistantApi.js +5 -5
  3. package/dist/bigconsole/assistant/assistantProduct.js +4 -1
  4. package/dist/bigconsole/assistant/displayCopy.d.ts +32 -0
  5. package/dist/bigconsole/assistant/pageContext.d.ts +14 -0
  6. package/dist/bigconsole/assistant/pageContext.js +6 -1
  7. package/dist/bigconsole/assistant/pageControls.d.ts +81 -0
  8. package/dist/bigconsole/assistant/pageControls.js +169 -0
  9. package/dist/bigconsole/assistant/previewControl.d.ts +16 -0
  10. package/dist/bigconsole/assistant/previewControl.js +10 -0
  11. package/dist/bigconsole/assistant/recordAdapters.js +27 -26
  12. package/dist/bigconsole/assistant/usePreviewControl.d.ts +2 -0
  13. package/dist/bigconsole/assistant/usePreviewControl.js +20 -0
  14. package/dist/bigconsole/components/builder/inspector/AppearanceSection.js +33 -18
  15. package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +31 -31
  16. package/dist/bigconsole/components/common/SortBySelect.d.ts +11 -0
  17. package/dist/bigconsole/components/common/SortBySelect.js +29 -0
  18. package/dist/bigconsole/components/common/index.d.ts +1 -0
  19. package/dist/bigconsole/components/common/index.js +1 -0
  20. package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +44 -44
  21. package/dist/bigconsole/components/dashboard/DashboardCanvas.js +36 -36
  22. package/dist/bigconsole/components/dashboard/DashboardToolbar.js +59 -59
  23. package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +15 -15
  24. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +30 -30
  25. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +41 -41
  26. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js +34 -34
  27. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +34 -34
  28. package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +153 -153
  29. package/dist/bigconsole/components/dashboard/PublishToStoreDialog.js +21 -21
  30. package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js +46 -46
  31. package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +134 -134
  32. package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +101 -101
  33. package/dist/bigconsole/components/dashboard/TemplateInstallOptions.js +31 -31
  34. package/dist/bigconsole/components/dashboard/TemplateLayoutPreview.js +15 -15
  35. package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -1
  36. package/dist/bigconsole/components/dashboard/WidgetPalette.js +154 -150
  37. package/dist/bigconsole/components/datasink/AlertExecutionHistory.js +37 -37
  38. package/dist/bigconsole/components/datasink/AlertRuleEditor.js +66 -66
  39. package/dist/bigconsole/components/datasink/CacheTTLSelector.js +35 -35
  40. package/dist/bigconsole/components/datasink/DataSinkCard.js +51 -50
  41. package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js +18 -18
  42. package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js +20 -20
  43. package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +47 -47
  44. package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +91 -91
  45. package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +35 -35
  46. package/dist/bigconsole/components/embed/renderer-manifest.js +12 -0
  47. package/dist/bigconsole/components/parser/DataSinkSelector.js +40 -40
  48. package/dist/bigconsole/components/parser/ImportParserDialog.js +120 -120
  49. package/dist/bigconsole/components/parser/ParserSelector.js +51 -51
  50. package/dist/bigconsole/components/pipeline/PipelineScopePicker.js +10 -10
  51. package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +77 -76
  52. package/dist/bigconsole/components/preview/AiPreviewPanel.js +96 -95
  53. package/dist/bigconsole/components/widgets/ActionConfigDialog.js +4 -4
  54. package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +93 -93
  55. package/dist/bigconsole/components/widgets/PropertiesPanel.js +507 -499
  56. package/dist/bigconsole/components/widgets/WidgetRegistry.js +122 -1
  57. package/dist/bigconsole/components/widgets/WidgetWrapper.js +227 -224
  58. package/dist/bigconsole/components/widgets/advanced/AdvancedWidgetConfig.d.ts +10 -0
  59. package/dist/bigconsole/components/widgets/advanced/AdvancedWidgetConfig.js +113 -0
  60. package/dist/bigconsole/components/widgets/advanced/AdvancedWidgets.d.ts +10 -0
  61. package/dist/bigconsole/components/widgets/advanced/AdvancedWidgets.js +187 -0
  62. package/dist/bigconsole/components/widgets/advanced/boxPlotDescription.d.ts +7 -0
  63. package/dist/bigconsole/components/widgets/advanced/boxPlotDescription.js +12 -0
  64. package/dist/bigconsole/components/widgets/advanced/data.d.ts +36 -0
  65. package/dist/bigconsole/components/widgets/advanced/data.js +113 -0
  66. package/dist/bigconsole/components/widgets/advanced/mapData.d.ts +10 -0
  67. package/dist/bigconsole/components/widgets/advanced/mapData.js +22 -0
  68. package/dist/bigconsole/components/widgets/advanced/waterfallData.d.ts +15 -0
  69. package/dist/bigconsole/components/widgets/advanced/waterfallData.js +28 -0
  70. package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js +4 -4
  71. package/dist/bigconsole/components/widgets/chart/ChartConfig.js +48 -48
  72. package/dist/bigconsole/components/widgets/chart/charts/WaterfallChart.js +34 -37
  73. package/dist/bigconsole/components/widgets/comments/WidgetComments.js +46 -46
  74. package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +61 -61
  75. package/dist/bigconsole/components/widgets/form/FormWidget.js +36 -36
  76. package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +42 -42
  77. package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +25 -25
  78. package/dist/bigconsole/components/widgets/index.js +1 -1
  79. package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js +4 -4
  80. package/dist/bigconsole/components/widgets/list/ListConfig.js +30 -30
  81. package/dist/bigconsole/components/widgets/map-widget/MapWidget.d.ts +2 -0
  82. package/dist/bigconsole/components/widgets/map-widget/MapWidget.js +64 -63
  83. package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +38 -38
  84. package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js +9 -9
  85. package/dist/bigconsole/components/widgets/metric-card/TrendIndicator.js +9 -9
  86. package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +49 -49
  87. package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +39 -39
  88. package/dist/bigconsole/components/widgets/table/TableConfig.js +73 -73
  89. package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +64 -64
  90. package/dist/bigconsole/components/workflow/WorkflowOpenGuard.js +15 -15
  91. package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js +15 -15
  92. package/dist/bigconsole/constants/backendErrors.js +94 -0
  93. package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +10 -10
  94. package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +67 -67
  95. package/dist/bigconsole/graphql/widgetCapabilities.d.ts +7 -0
  96. package/dist/bigconsole/graphql/widgetCapabilities.js +37 -0
  97. package/dist/bigconsole/hooks/useDashboardLayoutBaseline.d.ts +14 -0
  98. package/dist/bigconsole/hooks/useDashboardLayoutBaseline.js +32 -0
  99. package/dist/bigconsole/hooks/useDataSinkAlerts.d.ts +23 -0
  100. package/dist/bigconsole/hooks/useDataSinkAlerts.js +138 -113
  101. package/dist/bigconsole/hooks/useDrilldown.js +3 -3
  102. package/dist/bigconsole/hooks/useGlobalFilters.js +3 -3
  103. package/dist/bigconsole/hooks/useWidgetCatalog.js +46 -41
  104. package/dist/bigconsole/hooks/useWidgetOperations.js +113 -88
  105. package/dist/bigconsole/pages/AdminPage.js +130 -130
  106. package/dist/bigconsole/pages/DashboardBuilderPage.js +72 -60
  107. package/dist/bigconsole/pages/DashboardViewPage.js +244 -221
  108. package/dist/bigconsole/pages/DashboardsPage.js +269 -221
  109. package/dist/bigconsole/pages/DataParsersPage.js +180 -157
  110. package/dist/bigconsole/pages/DataSinkAlertsPage.js +62 -55
  111. package/dist/bigconsole/pages/DataSinkBuilderPage.js +252 -234
  112. package/dist/bigconsole/pages/DataSinkViewPage.js +1 -1
  113. package/dist/bigconsole/pages/DataSinksPage.js +335 -299
  114. package/dist/bigconsole/pages/DataSourcesPage.js +5 -5
  115. package/dist/bigconsole/pages/InsightsPage.js +279 -265
  116. package/dist/bigconsole/pages/OverviewPage.js +47 -47
  117. package/dist/bigconsole/pages/ParserBuilderPage.js +229 -213
  118. package/dist/bigconsole/pages/ParserViewPage.js +97 -97
  119. package/dist/bigconsole/pages/PipelineBuilderPage.js +256 -214
  120. package/dist/bigconsole/pages/PipelineViewPage.js +146 -146
  121. package/dist/bigconsole/pages/PipelinesPage.js +107 -88
  122. package/dist/bigconsole/pages/SettingsPage.js +179 -173
  123. package/dist/bigconsole/pages/WidgetDemoPage.js +42 -42
  124. package/dist/bigconsole/pages/WorkflowViewPage.js +1 -1
  125. package/dist/bigconsole/pages/WorkflowsPage.js +141 -141
  126. package/dist/bigconsole/providers/BigConsoleQuotaProvider.js +12 -12
  127. package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js +34 -34
  128. package/dist/bigconsole/renderers/adapters/BigConsoleRenderer.js +8 -5
  129. package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +69 -69
  130. package/dist/bigconsole/renderers/adapters/CustomRenderer.js +46 -46
  131. package/dist/bigconsole/store/widgetStore.d.ts +12 -0
  132. package/dist/bigconsole/store/widgetStore.js +3 -1
  133. package/dist/bigconsole/types/index.d.ts +1 -1
  134. package/dist/bigconsole/utils/advancedWidgetCapabilities.d.ts +14 -0
  135. package/dist/bigconsole/utils/advancedWidgetCapabilities.js +36 -0
  136. package/dist/bigconsole/utils/backendError.d.ts +18 -0
  137. package/dist/bigconsole/utils/backendError.js +42 -0
  138. package/dist/bigconsole/utils/dashboardList.d.ts +28 -0
  139. package/dist/bigconsole/utils/dashboardList.js +15 -0
  140. package/dist/bigconsole/utils/dataSinkList.d.ts +15 -0
  141. package/dist/bigconsole/utils/dataSinkList.js +15 -0
  142. package/dist/bigconsole/utils/formDirty.d.ts +82 -0
  143. package/dist/bigconsole/utils/formDirty.js +21 -0
  144. package/dist/bigconsole/utils/insightsDraft.d.ts +29 -0
  145. package/dist/bigconsole/utils/insightsDraft.js +8 -0
  146. package/dist/bigconsole/utils/layoutBaseline.d.ts +130 -0
  147. package/dist/bigconsole/utils/layoutBaseline.js +96 -0
  148. package/dist/bigconsole/utils/listSort.d.ts +80 -0
  149. package/dist/bigconsole/utils/listSort.js +85 -0
  150. package/dist/bigconsole/utils/widgetFormDirty.d.ts +16 -0
  151. package/dist/bigconsole/utils/widgetFormDirty.js +13 -0
  152. package/dist/bigconsole/utils/widgetTypeMapping.d.ts +1 -1
  153. package/dist/bigconsole/utils/widgetTypeMapping.js +13 -2
  154. package/dist/bigconsole/workflowOpen.js +15 -14
  155. package/dist/generated/wspace-operations.d.ts +61 -2
  156. package/dist/generated/wspace-operations.js +44 -18
  157. package/dist/generated/wspace-types.d.ts +34 -3
  158. package/package.json +3 -3
@@ -1,12 +1,16 @@
1
1
  import { useWidgetStore as e } from "../store/widgetStore.js";
2
2
  import "../store/index.js";
3
3
  import { BatchUpdateWidgetPositionsDocument as t, CreateWidgetDocument as n, DeleteWidgetDocument as r, DuplicateWidgetDocument as i, ListWidgetsByDashboardDocument as a, ListWidgetsForPageDocument as o, RefreshWidgetDataDocument as s, UpdateWidgetDocument as c } from "../../generated/wspace-operations.js";
4
- import { mapFromFederationWidgetType as l, normalizeWidgetTypeForApi as u } from "../utils/widgetTypeMapping.js";
5
- import d from "./useBigConsoleAnalytics.js";
6
- import { useCallback as f, useEffect as p, useMemo as m, useState as h } from "react";
7
- import { useApolloClient as g } from "@apollo/client/react";
4
+ import { useBigConsole as l } from "../context/BigConsoleContext.js";
5
+ import "../context/index.js";
6
+ import { loadNativeWidgetCatalog as u } from "../graphql/widgetCapabilities.js";
7
+ import { mapFromFederationWidgetType as d } from "../utils/widgetTypeMapping.js";
8
+ import { nativeFederationTypes as f, widgetTypeForCapabilities as p } from "../utils/advancedWidgetCapabilities.js";
9
+ import m from "./useBigConsoleAnalytics.js";
10
+ import { useCallback as h, useEffect as g, useLayoutEffect as _, useMemo as v, useRef as y, useState as b } from "react";
11
+ import { useApolloClient as x } from "@apollo/client/react";
8
12
  //#region src/bigconsole/hooks/useWidgetOperations.ts
9
- function _(e) {
13
+ function S(e) {
10
14
  let t = e.actions, n = e.metadata, r = e.positionResponsive, i = e.position || {
11
15
  x: e.positionX ?? 0,
12
16
  y: e.positionY ?? 0,
@@ -23,7 +27,7 @@ function _(e) {
23
27
  id: e.id,
24
28
  pageId: e.pageId || "local",
25
29
  dashboardId: e.dashboardId,
26
- type: c || l(e.type || "KPI"),
30
+ type: c || d(e.type || "KPI"),
27
31
  title: e.title || "Untitled Widget",
28
32
  description: o,
29
33
  renderer: e.renderer || "BIGCONSOLE",
@@ -53,44 +57,59 @@ function _(e) {
53
57
  updatedAt: e.updatedAt || (/* @__PURE__ */ new Date()).toISOString()
54
58
  };
55
59
  }
56
- function v(l, v, y = {}) {
57
- let { skipFetch: b = !1 } = y, [x, S] = h(!1), [C, w] = h(null), T = g(), E = d(), D = e((e) => e.widgets), O = e((e) => e.setWidgets), k = e((e) => e.addWidget), A = e((e) => e.updateWidget), j = e((e) => e.removeWidget), M = m(() => Array.from(D.values()), [D]), N = f(async () => {
58
- if (!(!l && !v)) try {
59
- S(!0), w(null), v ? O(((await T.query({
60
+ function C(d, C, w = {}) {
61
+ let { skipFetch: T = !1 } = w, [E, D] = b(!1), [O, k] = b(null), A = x(), { workspaceId: j } = l(), M = y(j);
62
+ _(() => (M.current = j, () => {
63
+ M.current = void 0;
64
+ }), [j]);
65
+ let N = m(), P = e((e) => e.widgets), F = e((e) => e.setWidgets), I = e((e) => e.addWidget), L = e((e) => e.updateWidget), R = e((e) => e.removeWidget), z = v(() => Array.from(P.values()), [P]), B = h(async () => {
66
+ if (!(!d && !C)) try {
67
+ D(!0), k(null), C ? F(((await A.query({
60
68
  query: a,
61
- variables: { dashboardId: v },
69
+ variables: { dashboardId: C },
62
70
  fetchPolicy: "network-only"
63
- })).data?.listWidgetsByDashboard || []).map(_)) : l && O(((await T.query({
71
+ })).data?.listWidgetsByDashboard || []).map(S)) : d && F(((await A.query({
64
72
  query: o,
65
- variables: { pageId: l },
73
+ variables: { pageId: d },
66
74
  fetchPolicy: "network-only"
67
- })).data?.listWidgets?.edges || []).map((e) => e.node).map(_));
75
+ })).data?.listWidgets?.edges || []).map((e) => e.node).map(S));
68
76
  } catch (e) {
69
- w(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to fetch widgets"));
77
+ k(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to fetch widgets"));
70
78
  } finally {
71
- S(!1);
79
+ D(!1);
72
80
  }
73
81
  }, [
74
- T,
75
- l,
76
- v,
77
- O
82
+ A,
83
+ d,
84
+ C,
85
+ F
78
86
  ]);
79
- return p(() => {
80
- b || N();
81
- }, [N, b]), {
82
- loading: x,
83
- error: C,
84
- widgets: M,
85
- createWidget: f(async (e) => {
87
+ return g(() => {
88
+ T || B();
89
+ }, [B, T]), {
90
+ loading: E,
91
+ error: O,
92
+ widgets: z,
93
+ createWidget: h(async (e) => {
86
94
  try {
87
- S(!0), w(null);
88
- let t = u(e.type), r = {
95
+ D(!0), k(null);
96
+ let t = [];
97
+ if ([
98
+ "map",
99
+ "waterfall",
100
+ "sankey",
101
+ "box_plot"
102
+ ].includes(e.type)) {
103
+ if (!j || M.current !== j) throw Error("Widget workspace changed.");
104
+ t = f((await u(A, j)).getWidgetTypes);
105
+ }
106
+ if (!j || M.current !== j) throw Error("Widget workspace changed.");
107
+ let r = p(e.type, t), i = {
89
108
  ...e.config || {},
90
109
  _internalWidgetType: e.type
91
- }, i = {
110
+ }, a = {
92
111
  pageId: e.pageId,
93
- type: t,
112
+ type: r,
94
113
  title: e.title,
95
114
  renderer: e.renderer || "BIGCONSOLE",
96
115
  template: e.template || null,
@@ -98,7 +117,7 @@ function v(l, v, y = {}) {
98
117
  datasetId: e.datasetId,
99
118
  parserId: e.parserId,
100
119
  parserRules: e.parserRules,
101
- config: r,
120
+ config: i,
102
121
  position: {
103
122
  x: e.position.x,
104
123
  y: e.position.y,
@@ -108,24 +127,29 @@ function v(l, v, y = {}) {
108
127
  refreshInterval: e.refreshInterval,
109
128
  metadata: e.metadata
110
129
  };
111
- e.positionResponsive && (i.positionResponsive = {
130
+ e.positionResponsive && (a.positionResponsive = {
112
131
  xs: e.positionResponsive.xs ?? 12,
113
132
  sm: e.positionResponsive.sm ?? 6,
114
133
  md: e.positionResponsive.md ?? 4,
115
134
  lg: e.positionResponsive.lg ?? 3
116
- }), e.rowOrder !== void 0 && (i.rowOrder = e.rowOrder), E("bigconsole.widget.create_clicked", {
117
- dashboardId: e.dashboardId || v,
135
+ }), e.rowOrder !== void 0 && (a.rowOrder = e.rowOrder), N("bigconsole.widget.create_clicked", {
136
+ dashboardId: e.dashboardId || C,
118
137
  pageId: e.pageId,
119
138
  widgetType: e.type
120
139
  });
121
- let a = (await T.mutate({
140
+ let o = (await A.mutate({
122
141
  mutation: n,
123
- variables: { input: i }
142
+ variables: { input: a },
143
+ context: {
144
+ requiredWorkspaceAuth: !0,
145
+ requiredWorkspaceId: j,
146
+ queryDeduplication: !1
147
+ }
124
148
  })).data?.createBigConsoleWidget;
125
- if (a) {
126
- let t = _(a);
127
- return k(t), E("bigconsole.widget.created", {
128
- dashboardId: t.dashboardId || e.dashboardId || v,
149
+ if (o) {
150
+ let t = S(o);
151
+ return I(t), N("bigconsole.widget.created", {
152
+ dashboardId: t.dashboardId || e.dashboardId || C,
129
153
  pageId: t.pageId,
130
154
  widgetId: t.id,
131
155
  widgetType: t.type
@@ -133,19 +157,20 @@ function v(l, v, y = {}) {
133
157
  }
134
158
  return null;
135
159
  } catch (e) {
136
- return w(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to create widget")), null;
160
+ return k(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to create widget")), null;
137
161
  } finally {
138
- S(!1);
162
+ D(!1);
139
163
  }
140
164
  }, [
141
- T,
142
- k,
143
- v,
144
- E
165
+ A,
166
+ I,
167
+ C,
168
+ N,
169
+ j
145
170
  ]),
146
- updateWidget: f(async (t) => {
171
+ updateWidget: h(async (t) => {
147
172
  try {
148
- if (S(!0), w(null), !e.getState().widgets.get(t.id)) throw Error(`Widget not found: ${t.id}`);
173
+ if (D(!0), k(null), !e.getState().widgets.get(t.id)) throw Error(`Widget not found: ${t.id}`);
149
174
  let n = { id: t.id };
150
175
  t.title !== void 0 && (n.title = t.title), t.renderer !== void 0 && (n.renderer = t.renderer), t.template !== void 0 && (n.template = t.template), t.dataSinkId !== void 0 && (n.dataSinkId = t.dataSinkId), t.datasetId !== void 0 && (n.datasetId = t.datasetId), t.parserId !== void 0 && (n.parserId = t.parserId), t.parserRules !== void 0 && (n.parserRules = t.parserRules), t.config !== void 0 && (n.config = t.config), t.refreshInterval !== void 0 && (n.refreshInterval = t.refreshInterval), t.metadata !== void 0 && (n.metadata = t.metadata), t.position && (n.position = {
151
176
  x: t.position.x,
@@ -158,47 +183,47 @@ function v(l, v, y = {}) {
158
183
  md: t.positionResponsive.md,
159
184
  lg: t.positionResponsive.lg
160
185
  }), t.rowOrder !== void 0 && (n.rowOrder = t.rowOrder);
161
- let r = await T.mutate({
186
+ let r = await A.mutate({
162
187
  mutation: c,
163
188
  variables: { input: n }
164
189
  });
165
190
  if (r.error) throw r.error;
166
191
  let i = r.data?.updateBigConsoleWidget;
167
192
  if (i) {
168
- let e = _(i);
169
- return A(t.id, e), e;
193
+ let e = S(i);
194
+ return L(t.id, e), e;
170
195
  }
171
196
  return null;
172
197
  } catch (e) {
173
- return w(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to update widget")), null;
198
+ return k(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to update widget")), null;
174
199
  } finally {
175
- S(!1);
200
+ D(!1);
176
201
  }
177
- }, [T, A]),
178
- deleteWidget: f(async (e) => {
202
+ }, [A, L]),
203
+ deleteWidget: h(async (e) => {
179
204
  try {
180
- return S(!0), w(null), (await T.mutate({
205
+ return D(!0), k(null), (await A.mutate({
181
206
  mutation: r,
182
207
  variables: { id: e }
183
- })).data?.deleteBigConsoleWidget ? (j(e), !0) : !1;
208
+ })).data?.deleteBigConsoleWidget ? (R(e), !0) : !1;
184
209
  } catch (e) {
185
- return w(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to delete widget")), !1;
210
+ return k(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to delete widget")), !1;
186
211
  } finally {
187
- S(!1);
212
+ D(!1);
188
213
  }
189
- }, [T, j]),
190
- duplicateWidget: f(async (t, n, r) => {
214
+ }, [A, R]),
215
+ duplicateWidget: h(async (t, n, r) => {
191
216
  try {
192
- S(!0), w(null);
217
+ D(!0), k(null);
193
218
  let a = e.getState().widgets.get(t);
194
219
  if (!a) throw Error(`Widget not found: ${t}`);
195
- E("bigconsole.widget.duplicate_clicked", {
196
- dashboardId: a.dashboardId || v,
220
+ N("bigconsole.widget.duplicate_clicked", {
221
+ dashboardId: a.dashboardId || C,
197
222
  pageId: a.pageId,
198
223
  sourceWidgetId: t,
199
224
  widgetType: a.type
200
225
  });
201
- let o = await T.mutate({
226
+ let o = await A.mutate({
202
227
  mutation: i,
203
228
  variables: {
204
229
  id: t,
@@ -214,9 +239,9 @@ function v(l, v, y = {}) {
214
239
  if (o.error) throw o.error;
215
240
  let s = o.data?.duplicateWidget;
216
241
  if (s) {
217
- let e = _(s);
218
- return k(e), E("bigconsole.widget.duplicated", {
219
- dashboardId: e.dashboardId || a.dashboardId || v,
242
+ let e = S(s);
243
+ return I(e), N("bigconsole.widget.duplicated", {
244
+ dashboardId: e.dashboardId || a.dashboardId || C,
220
245
  pageId: e.pageId,
221
246
  widgetId: e.id,
222
247
  sourceWidgetId: t,
@@ -225,19 +250,19 @@ function v(l, v, y = {}) {
225
250
  }
226
251
  return null;
227
252
  } catch (e) {
228
- return w(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to duplicate widget")), null;
253
+ return k(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to duplicate widget")), null;
229
254
  } finally {
230
- S(!1);
255
+ D(!1);
231
256
  }
232
257
  }, [
233
- T,
234
- k,
235
- v,
236
- E
258
+ A,
259
+ I,
260
+ C,
261
+ N
237
262
  ]),
238
- batchUpdatePositions: f(async (e) => {
263
+ batchUpdatePositions: h(async (e) => {
239
264
  try {
240
- return S(!0), w(null), (await T.mutate({
265
+ return D(!0), k(null), (await A.mutate({
241
266
  mutation: t,
242
267
  variables: { updates: e.map((e) => ({
243
268
  id: e.id,
@@ -249,7 +274,7 @@ function v(l, v, y = {}) {
249
274
  }
250
275
  })) }
251
276
  })).data?.batchUpdateWidgetPositions ? (e.forEach((e) => {
252
- A(e.id, {
277
+ L(e.id, {
253
278
  position: e.position,
254
279
  positionX: e.position.x,
255
280
  positionY: e.position.y,
@@ -259,23 +284,23 @@ function v(l, v, y = {}) {
259
284
  });
260
285
  }), !0) : !1;
261
286
  } catch (e) {
262
- return w(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to batch update positions")), !1;
287
+ return k(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to batch update positions")), !1;
263
288
  } finally {
264
- S(!1);
289
+ D(!1);
265
290
  }
266
- }, [T, A]),
267
- refreshWidgetData: f(async (e) => {
291
+ }, [A, L]),
292
+ refreshWidgetData: h(async (e) => {
268
293
  try {
269
- await T.mutate({
294
+ await A.mutate({
270
295
  mutation: s,
271
296
  variables: { widgetId: e }
272
297
  });
273
298
  } catch {}
274
- }, [T]),
275
- refetch: f(async () => {
276
- await N();
277
- }, [N])
299
+ }, [A]),
300
+ refetch: h(async () => {
301
+ await B();
302
+ }, [B])
278
303
  };
279
304
  }
280
305
  //#endregion
281
- export { v as default, _ as normalizeWidget };
306
+ export { C as default, S as normalizeWidget };