@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,10 +1,10 @@
1
1
  import { useDataSinkStore as e } from "../store/dataSinkStore.js";
2
- import { BatchCreateDataSinksDocument as t, BatchDeleteDataSinksDocument as n, CreateDataSinkDocument as r, DeleteDataSinkDocument as i, GetDataSinkDataDocument as a, GetDataSinkDocument as o, InvalidateDataSinkCacheDocument as s, ListDataSinksDocument as c, RefreshDataSinkDocument as l, UpdateDataSinkDocument as u } from "../../generated/wspace-operations.js";
3
- import { createBigConsoleQuotaError as d, isBigConsoleQuotaError as f } from "../utils/quota.js";
4
- import { useCallback as p, useEffect as m, useMemo as h, useState as g } from "react";
5
- import { useApolloClient as _ } from "@apollo/client/react";
2
+ import { BatchCreateDataSinksDocument as t, BatchDeleteDataSinksDocument as n, CreateDataSinkDocument as r, DeleteDataSinkDocument as i, GetDataSinkDataDocument as a, GetDataSinkDocument as o, GetDataSinkPayloadDocument as s, InvalidateDataSinkCacheDocument as c, ListDataSinksDocument as l, RefreshDataSinkDocument as u, UpdateDataSinkDocument as d } from "../../generated/wspace-operations.js";
3
+ import { createBigConsoleQuotaError as f, isBigConsoleQuotaError as p } from "../utils/quota.js";
4
+ import { useCallback as m, useEffect as h, useMemo as g, useState as _ } from "react";
5
+ import { useApolloClient as v } from "@apollo/client/react";
6
6
  //#region src/bigconsole/hooks/useDataSinkOperations.ts
7
- function v(e) {
7
+ function y(e) {
8
8
  let t = e;
9
9
  return {
10
10
  id: t.id,
@@ -16,7 +16,6 @@ function v(e) {
16
16
  fluidGridsWorkflowId: t.fluidGridsWorkflowId || null,
17
17
  fluidGridsWorkflowExecutionId: t.fluidGridsWorkflowExecutionId || null,
18
18
  config: t.config || null,
19
- data: t.data || {},
20
19
  dataStats: t.dataStats || null,
21
20
  lastRefreshedAt: t.lastRefreshedAt || (/* @__PURE__ */ new Date()).toISOString(),
22
21
  lastRefreshedBy: t.lastRefreshedBy || null,
@@ -47,46 +46,57 @@ function v(e) {
47
46
  deletedBy: t.deletedBy || null
48
47
  };
49
48
  }
50
- function y(y = {}) {
51
- let { workspaceId: b, skipFetch: x = !1 } = y, [S, C] = g(!1), [w, T] = g(null), E = _(), D = e((e) => e.dataSinks), O = e((e) => e.setDataSinks), k = e((e) => e.addDataSink), A = e((e) => e.updateDataSink), j = e((e) => e.removeDataSink), M = e((e) => e.setDataSinkRefreshing), N = h(() => Array.from(D.values()), [D]), P = p(async (e) => {
49
+ function b(b = {}) {
50
+ let { workspaceId: x, skipFetch: S = !1 } = b, [C, w] = _(!1), [T, E] = _(null), D = v(), O = e((e) => e.dataSinks), k = e((e) => e.setDataSinks), A = e((e) => e.addDataSink), j = e((e) => e.updateDataSink), M = e((e) => e.removeDataSink), N = e((e) => e.setDataSinkRefreshing), P = g(() => Array.from(O.values()), [O]), F = m(async (e) => {
52
51
  try {
53
- C(!0), T(null), O([]);
54
- let t = ((await E.query({
55
- query: c,
52
+ w(!0), E(null), k([]);
53
+ let t = ((await D.query({
54
+ query: l,
56
55
  variables: {
57
56
  status: e?.status,
58
57
  isActive: e?.isActive,
59
58
  search: e?.search
60
59
  },
61
60
  fetchPolicy: "network-only"
62
- })).data?.listDataSinks?.edges || []).map((e) => v(e.node));
63
- return O(t), t;
61
+ })).data?.listDataSinks?.edges || []).map((e) => y(e.node));
62
+ return k(t), t;
64
63
  } catch (e) {
65
- return T(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to fetch DataSinks")), O([]), [];
64
+ return E(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to fetch DataSinks")), k([]), [];
66
65
  } finally {
67
- C(!1);
66
+ w(!1);
68
67
  }
69
- }, [E, O]), F = p(async (e) => {
68
+ }, [D, k]), I = m(async (e) => {
70
69
  try {
71
- C(!0), T(null);
72
- let t = await E.query({
70
+ w(!0), E(null);
71
+ let t = await D.query({
73
72
  query: o,
74
73
  variables: { id: e },
75
74
  fetchPolicy: "network-only"
76
75
  });
77
76
  if (t.data?.getDataSink) {
78
- let e = v(t.data.getDataSink);
79
- return k(e), e;
77
+ let e = y(t.data.getDataSink);
78
+ return A(e), e;
80
79
  }
81
80
  return null;
82
81
  } catch (e) {
83
- return T(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to fetch DataSink")), null;
82
+ return E(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to fetch DataSink")), null;
84
83
  } finally {
85
- C(!1);
84
+ w(!1);
86
85
  }
87
- }, [E, k]), I = p(async (e, t) => {
86
+ }, [D, A]), L = m(async (e) => {
87
+ let t = (await D.query({
88
+ query: s,
89
+ variables: { id: e },
90
+ fetchPolicy: "network-only"
91
+ })).data?.getDataSink;
92
+ return t ? {
93
+ id: t.id,
94
+ version: t.version,
95
+ data: t.data
96
+ } : null;
97
+ }, [D]), R = m(async (e, t) => {
88
98
  try {
89
- return C(!0), T(null), (await E.query({
99
+ return w(!0), E(null), (await D.query({
90
100
  query: a,
91
101
  variables: {
92
102
  id: e.id,
@@ -100,82 +110,82 @@ function y(y = {}) {
100
110
  fetchPolicy: "network-only"
101
111
  })).data?.getDataSinkData || null;
102
112
  } catch (e) {
103
- return T(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to get DataSink data")), null;
113
+ return E(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to get DataSink data")), null;
104
114
  } finally {
105
- C(!1);
115
+ w(!1);
106
116
  }
107
- }, [E]), L = p(async (e) => {
117
+ }, [D]), z = m(async (e) => {
108
118
  try {
109
- C(!0), T(null);
110
- let t = await E.mutate({
119
+ w(!0), E(null);
120
+ let t = await D.mutate({
111
121
  mutation: r,
112
122
  variables: { input: e }
113
123
  });
114
- if (f(t)) throw d(t);
124
+ if (p(t)) throw f(t);
115
125
  if (t.data?.createDataSink) {
116
- let e = v(t.data.createDataSink);
117
- return k(e), e;
126
+ let e = y(t.data.createDataSink);
127
+ return A(e), e;
118
128
  }
119
129
  return null;
120
130
  } catch (e) {
121
- if (f(e)) throw e;
122
- return T(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to create DataSink")), null;
131
+ if (p(e)) throw e;
132
+ return E(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to create DataSink")), null;
123
133
  } finally {
124
- C(!1);
134
+ w(!1);
125
135
  }
126
- }, [E, k]), R = p(async (e) => {
136
+ }, [D, A]), B = m(async (e) => {
127
137
  try {
128
- C(!0), T(null);
129
- let t = await E.mutate({
130
- mutation: u,
138
+ w(!0), E(null);
139
+ let t = await D.mutate({
140
+ mutation: d,
131
141
  variables: { input: e }
132
142
  });
133
143
  if (t.data?.updateDataSink) {
134
- let e = v(t.data.updateDataSink);
135
- return A(e.id, e), e;
144
+ let e = y(t.data.updateDataSink);
145
+ return j(e.id, e), e;
136
146
  }
137
147
  return null;
138
148
  } catch (e) {
139
- return T(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to update DataSink")), null;
149
+ return E(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to update DataSink")), null;
140
150
  } finally {
141
- C(!1);
151
+ w(!1);
142
152
  }
143
- }, [E, A]), z = p(async (e) => {
153
+ }, [D, j]), V = m(async (e) => {
144
154
  try {
145
- return C(!0), T(null), (await E.mutate({
155
+ return w(!0), E(null), (await D.mutate({
146
156
  mutation: i,
147
157
  variables: { id: e }
148
- })).data?.deleteDataSink ? (j(e), !0) : !1;
158
+ })).data?.deleteDataSink ? (M(e), !0) : !1;
149
159
  } catch (e) {
150
- return T(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to delete DataSink")), !1;
160
+ return E(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to delete DataSink")), !1;
151
161
  } finally {
152
- C(!1);
162
+ w(!1);
153
163
  }
154
- }, [E, j]), B = p(async (e) => {
164
+ }, [D, M]), H = m(async (e) => {
155
165
  try {
156
- C(!0), T(null), e.id && M(e.id, !0);
157
- let t = await E.mutate({
158
- mutation: l,
166
+ w(!0), E(null), e.id && N(e.id, !0);
167
+ let t = await D.mutate({
168
+ mutation: u,
159
169
  variables: { input: e }
160
170
  });
161
171
  if (t.data?.refreshDataSink) {
162
- let e = v(t.data.refreshDataSink);
163
- return A(e.id, e), M(e.id, !1), e;
172
+ let e = y(t.data.refreshDataSink);
173
+ return j(e.id, e), N(e.id, !1), e;
164
174
  }
165
175
  return null;
166
176
  } catch (t) {
167
- return T(t instanceof Error ? t : /* @__PURE__ */ Error("Failed to refresh DataSink")), e.id && M(e.id, !1), null;
177
+ return E(t instanceof Error ? t : /* @__PURE__ */ Error("Failed to refresh DataSink")), e.id && N(e.id, !1), null;
168
178
  } finally {
169
- C(!1);
179
+ w(!1);
170
180
  }
171
181
  }, [
172
- E,
173
- A,
174
- M
175
- ]), V = p(async (e) => {
182
+ D,
183
+ j,
184
+ N
185
+ ]), U = m(async (e) => {
176
186
  try {
177
- return C(!0), T(null), (await E.mutate({
178
- mutation: s,
187
+ return w(!0), E(null), (await D.mutate({
188
+ mutation: c,
179
189
  variables: { id: e }
180
190
  })).data?.invalidateDataSinkCache || {
181
191
  count: 0,
@@ -184,66 +194,67 @@ function y(y = {}) {
184
194
  };
185
195
  } catch (e) {
186
196
  let t = e instanceof Error ? e : /* @__PURE__ */ Error("Failed to invalidate cache");
187
- return T(t), {
197
+ return E(t), {
188
198
  count: 0,
189
199
  invalidatedIds: [],
190
200
  success: !1,
191
201
  message: t.message
192
202
  };
193
203
  } finally {
194
- C(!1);
204
+ w(!1);
195
205
  }
196
- }, [E, b]), H = p(async (e) => {
206
+ }, [D, x]), W = m(async (e) => {
197
207
  try {
198
- C(!0), T(null);
199
- let n = await E.mutate({
208
+ w(!0), E(null);
209
+ let n = await D.mutate({
200
210
  mutation: t,
201
211
  variables: { inputs: e }
202
212
  });
203
213
  if (n.data?.batchCreateDataSinks) {
204
- let e = n.data.batchCreateDataSinks.map(v);
205
- return e.forEach(k), e;
214
+ let e = n.data.batchCreateDataSinks.map(y);
215
+ return e.forEach(A), e;
206
216
  }
207
217
  return [];
208
218
  } catch (e) {
209
- return T(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to batch create DataSinks")), [];
219
+ return E(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to batch create DataSinks")), [];
210
220
  } finally {
211
- C(!1);
221
+ w(!1);
212
222
  }
213
- }, [E, k]), U = p(async (e) => {
223
+ }, [D, A]), G = m(async (e) => {
214
224
  try {
215
- C(!0), T(null);
216
- let t = await E.mutate({
225
+ w(!0), E(null);
226
+ let t = await D.mutate({
217
227
  mutation: n,
218
228
  variables: { ids: e }
219
229
  });
220
- return t.data?.batchDeleteDataSinks ? (e.forEach(j), t.data.batchDeleteDataSinks) : [];
230
+ return t.data?.batchDeleteDataSinks ? (e.forEach(M), t.data.batchDeleteDataSinks) : [];
221
231
  } catch (e) {
222
- return T(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to batch delete DataSinks")), [];
232
+ return E(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to batch delete DataSinks")), [];
223
233
  } finally {
224
- C(!1);
234
+ w(!1);
225
235
  }
226
- }, [E, j]), W = p(async () => {
227
- await P();
228
- }, [P]);
229
- return m(() => {
230
- x || P();
231
- }, [x, P]), {
232
- loading: S,
233
- error: w,
234
- dataSinks: N,
235
- fetchDataSinks: P,
236
- fetchDataSink: F,
237
- getDataSinkData: I,
238
- createDataSink: L,
239
- updateDataSink: R,
240
- deleteDataSink: z,
241
- refreshDataSink: B,
242
- invalidateCache: V,
243
- batchCreateDataSinks: H,
244
- batchDeleteDataSinks: U,
245
- refetch: W
236
+ }, [D, M]), K = m(async () => {
237
+ await F();
238
+ }, [F]);
239
+ return h(() => {
240
+ S || F();
241
+ }, [S, F]), {
242
+ loading: C,
243
+ error: T,
244
+ dataSinks: P,
245
+ fetchDataSinks: F,
246
+ fetchDataSink: I,
247
+ fetchDataSinkPayload: L,
248
+ getDataSinkData: R,
249
+ createDataSink: z,
250
+ updateDataSink: B,
251
+ deleteDataSink: V,
252
+ refreshDataSink: H,
253
+ invalidateCache: U,
254
+ batchCreateDataSinks: W,
255
+ batchDeleteDataSinks: G,
256
+ refetch: K
246
257
  };
247
258
  }
248
259
  //#endregion
249
- export { y as default };
260
+ export { b as default };
@@ -18,7 +18,6 @@ function c(e) {
18
18
  fluidGridsWorkflowId: e.fluidGridsWorkflowId || null,
19
19
  fluidGridsWorkflowExecutionId: e.fluidGridsWorkflowExecutionId || null,
20
20
  config: e.config || null,
21
- data: e.data || {},
22
21
  dataStats: e.dataStats || null,
23
22
  lastRefreshedAt: e.lastRefreshedAt || (/* @__PURE__ */ new Date()).toISOString(),
24
23
  lastRefreshedBy: e.lastRefreshedBy || null,
@@ -4,17 +4,18 @@ import "../store/index.js";
4
4
  import { GetDrilldownTargetDashboardDocument as n } from "../../generated/wspace-operations.js";
5
5
  import { useBigConsoleBasePath as r, useBigConsoleNavigate as i } from "../context/BigConsoleContext.js";
6
6
  import "../context/index.js";
7
- import { PAGE_PARAM as a } from "./useActivePage.js";
8
- import { useCallback as o } from "react";
9
- import { useI18n as s } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
7
+ import { appendPathSegment as a } from "../utils/safeUrl.js";
8
+ import { PAGE_PARAM as o } from "./useActivePage.js";
9
+ import { useCallback as s } from "react";
10
10
  import { useApolloClient as c } from "@apollo/client/react";
11
- import { toast as l } from "sonner";
11
+ import { useI18n as l } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
12
+ import { toast as u } from "sonner";
12
13
  //#region src/bigconsole/hooks/useDrilldown.ts
13
- var u = "ctx_", d = "filter_", f = "drilldown_", p = "__targetPageId", m = [
14
+ var d = "ctx_", f = "filter_", p = "drilldown_", m = "__targetPageId", h = [
14
15
  "org",
15
16
  "workspace",
16
17
  "project"
17
- ], h = new Set([
18
+ ], g = new Set([
18
19
  "selectedData",
19
20
  "selectedRow",
20
21
  "selectedPoint",
@@ -24,12 +25,12 @@ var u = "ctx_", d = "filter_", f = "drilldown_", p = "__targetPageId", m = [
24
25
  "widgetData",
25
26
  "metadata"
26
27
  ]);
27
- function g(e, t) {
28
+ function _(e, t) {
28
29
  if (t.startsWith("$.")) {
29
30
  let n = t.slice(2).split(".");
30
31
  if (n.length >= 1 && e && typeof e == "object" && "selectedData" in e) {
31
32
  let t = e.selectedData, r = n[0];
32
- if (!h.has(r) && t && typeof t == "object" && r in t) {
33
+ if (!g.has(r) && t && typeof t == "object" && r in t) {
33
34
  let e = t;
34
35
  for (let t of n) {
35
36
  if (e == null) return;
@@ -77,10 +78,10 @@ function g(e, t) {
77
78
  }
78
79
  return t;
79
80
  }
80
- function _(e) {
81
+ function v(e) {
81
82
  return e == null ? "" : encodeURIComponent(typeof e == "object" ? JSON.stringify(e) : String(e));
82
83
  }
83
- function v(e) {
84
+ function y(e) {
84
85
  if (!e) return;
85
86
  let t = decodeURIComponent(e);
86
87
  try {
@@ -89,23 +90,23 @@ function v(e) {
89
90
  return t;
90
91
  }
91
92
  }
92
- function y(h = {}) {
93
- let { basePath: y = "/dashboards", onDrilldown: b, onModalOpen: x, onMaxDepthReached: S } = h, C = i(), w = r(), T = c(), { t: E } = s(), D = t((e) => e.openModal), O = t((e) => e.pushDrilldown), k = t((e) => e.isOpen), A = t((e) => e.dashboardId), j = o(() => {
94
- let e = new URLSearchParams(window.location.search), t = e.get(`${f}depth`), n = e.get(`${f}parent`), r = e.get(`${f}path`);
93
+ function b(g = {}) {
94
+ let { basePath: b = "/dashboards", onDrilldown: x, onModalOpen: S, onMaxDepthReached: C } = g, w = i(), T = r(), E = c(), { t: D } = l(), O = t((e) => e.openModal), k = t((e) => e.pushDrilldown), A = t((e) => e.isOpen), j = t((e) => e.dashboardId), M = s(() => {
95
+ let e = new URLSearchParams(window.location.search), t = e.get(`${p}depth`), n = e.get(`${p}parent`), r = e.get(`${p}path`);
95
96
  return {
96
97
  depth: t ? parseInt(t, 10) : 0,
97
98
  parent: n || null,
98
99
  path: r ? JSON.parse(decodeURIComponent(r)) : []
99
100
  };
100
- }, []), M = o(() => {
101
+ }, []), N = s(() => {
101
102
  let e = new URLSearchParams(window.location.search), t = {};
102
103
  return e.forEach((e, n) => {
103
104
  if (n.startsWith("ctx_")) {
104
105
  let r = n.slice(4);
105
- t[r] = v(e);
106
+ t[r] = y(e);
106
107
  }
107
108
  }), t;
108
- }, []), N = o((e, t) => {
109
+ }, []), P = s((e, t) => {
109
110
  let n = {}, r = {
110
111
  selectedData: t.selectedData || {},
111
112
  selectedRow: t.selectedData || {},
@@ -124,27 +125,27 @@ function y(h = {}) {
124
125
  for (let [t, a] of Object.entries(e)) if (typeof a == "string") {
125
126
  let e = a.startsWith("$."), o = /^\{\{.+\}\}$/.test(a);
126
127
  if (e || o) {
127
- let e = g(r, a);
128
+ let e = _(r, a);
128
129
  e === void 0 ? i.push(`${t}="${a}"`) : n[t] = e;
129
130
  } else n[t] = a;
130
131
  } else n[t] = a;
131
132
  if (i.length > 0 && console.warn("[useDrilldown] Drilldown parameterMapping path(s) failed to resolve from the clicked context:", i.join(", "), "— available selectedData keys:", t.selectedData ? Object.keys(t.selectedData).join(", ") : "(none)"), Object.keys(n).length === 0 && t.selectedData && Object.keys(t.selectedData).length > 0) for (let [e, r] of Object.entries(t.selectedData)) e.startsWith("_") || e.startsWith("__") || r != null && (typeof r == "string" || typeof r == "number" || typeof r == "boolean" || Array.isArray(r) && r.every((e) => typeof e != "object")) && (n[e] = r);
132
133
  return n;
133
- }, []), P = o((e, t, n, r, i) => {
134
- let o = new URL(`${y}/${e}`, window.location.origin), s = new URLSearchParams(window.location.search);
135
- for (let e of m) {
136
- let t = s.get(e);
137
- t && o.searchParams.set(e, t);
134
+ }, []), F = s((e, t, n, r, i) => {
135
+ let s = new URL(a(b, e) ?? b, window.location.origin), c = new URLSearchParams(window.location.search);
136
+ for (let e of h) {
137
+ let t = c.get(e);
138
+ t && s.searchParams.set(e, t);
138
139
  }
139
- i && o.searchParams.set(a, i);
140
- for (let [e, n] of Object.entries(t)) n != null && o.searchParams.set(`${u}${e}`, _(n));
141
- for (let [e, t] of Object.entries(n)) t != null && o.searchParams.set(`${d}${e}`, _(t));
142
- return o.searchParams.set(`${f}depth`, String(r.depth)), r.parent && o.searchParams.set(`${f}parent`, r.parent), r.path.length > 0 && o.searchParams.set(`${f}path`, encodeURIComponent(JSON.stringify(r.path))), o.pathname + o.search;
143
- }, [y]), F = o((e) => !!(e.drilldown?.enabled && e.drilldown?.targetDashboardId), []), I = o((e, t) => t < (e.maxDepth ?? 3), []), L = o(() => {
144
- l.warning(E("bigconsole.widget.drilldown.targetUnavailableToast", "This drilldown target is no longer available"), { description: E("bigconsole.widget.drilldown.targetUnavailableToastHelp", "It may have been deleted, archived, or unshared. Ask the dashboard owner to update the drilldown.") });
145
- }, [E]), R = o(async (e) => {
140
+ i && s.searchParams.set(o, i);
141
+ for (let [e, n] of Object.entries(t)) n != null && s.searchParams.set(`${d}${e}`, v(n));
142
+ for (let [e, t] of Object.entries(n)) t != null && s.searchParams.set(`${f}${e}`, v(t));
143
+ return s.searchParams.set(`${p}depth`, String(r.depth)), r.parent && s.searchParams.set(`${p}parent`, r.parent), r.path.length > 0 && s.searchParams.set(`${p}path`, encodeURIComponent(JSON.stringify(r.path))), s.pathname + s.search;
144
+ }, [b]), I = s((e) => !!(e.drilldown?.enabled && e.drilldown?.targetDashboardId), []), L = s((e, t) => t < (e.maxDepth ?? 3), []), R = s(() => {
145
+ u.warning(D("bigconsole.widget.drilldown.targetUnavailableToast", "This drilldown target is no longer available"), { description: D("bigconsole.widget.drilldown.targetUnavailableToastHelp", "It may have been deleted, archived, or unshared. Ask the dashboard owner to update the drilldown.") });
146
+ }, [D]), z = s(async (e) => {
146
147
  try {
147
- let t = (await T.query({
148
+ let t = (await E.query({
148
149
  query: n,
149
150
  variables: { id: e },
150
151
  fetchPolicy: "network-only"
@@ -153,85 +154,85 @@ function y(h = {}) {
153
154
  } catch {
154
155
  return !1;
155
156
  }
156
- }, [T]), z = o((e) => new URL(`${w}${e}`, window.location.origin).toString(), [w]);
157
+ }, [E]), B = s((e) => new URL(`${T}${e}`, window.location.origin).toString(), [T]);
157
158
  return {
158
- executeDrilldown: o(async (t, n) => {
159
+ executeDrilldown: s(async (t, n) => {
159
160
  if (!t.enabled || !t.targetDashboardId) return;
160
- let r = n.currentDepth ?? j().depth, i = n.currentPath ?? j().path, a = t.maxDepth ?? 3;
161
+ let r = n.currentDepth ?? M().depth, i = n.currentPath ?? M().path, a = t.maxDepth ?? 3;
161
162
  if (r >= a) {
162
- S && S(r, a), console.warn(`[useDrilldown] Max drilldown depth (${a}) reached. Navigation blocked.`);
163
+ C && C(r, a), console.warn(`[useDrilldown] Max drilldown depth (${a}) reached. Navigation blocked.`);
163
164
  return;
164
165
  }
165
- let o = t.targetDashboardId, s = t.targetPageId ?? null, c = n.sourceDashboardId || "", l = o === c, d = k && !!c && c === A;
166
- if (l && !d) {
166
+ let o = t.targetDashboardId, s = t.targetPageId ?? null, c = n.sourceDashboardId || "", l = o === c, u = A && !!c && c === j;
167
+ if (l && !u) {
167
168
  let t = e.getState().currentDashboard?.pages ?? [];
168
169
  if (!s || !t.some((e) => e.id === s)) {
169
- L();
170
+ R();
170
171
  return;
171
172
  }
172
- } else if (!l && !await R(o)) {
173
- L();
173
+ } else if (!l && !await z(o)) {
174
+ R();
174
175
  return;
175
176
  }
176
- let f = N(t.parameterMapping || {}, n), m = {};
177
- for (let [e, t] of Object.entries(f)) t != null && (m[`${u}${e}`] = t);
178
- t.passGlobalFilters && n.globalFilters && Object.assign(m, n.globalFilters);
177
+ let f = P(t.parameterMapping || {}, n), p = {};
178
+ for (let [e, t] of Object.entries(f)) t != null && (p[`${d}${e}`] = t);
179
+ t.passGlobalFilters && n.globalFilters && Object.assign(p, n.globalFilters);
179
180
  let h = {
180
181
  depth: r + 1,
181
182
  parent: c,
182
183
  path: c ? [...i, c] : i
183
- }, g = P(o, f, m, h, s);
184
- b && b({
184
+ }, g = F(o, f, p, h, s);
185
+ x && x({
185
186
  ...f,
186
- ...m
187
+ ...p
187
188
  }, t.navigationMode);
188
189
  let _ = t.navigationMode;
189
190
  if (_ === "NEW_TAB") {
190
- window.open(z(g), "_blank", "noopener,noreferrer");
191
+ window.open(B(g), "_blank", "noopener,noreferrer");
191
192
  return;
192
193
  }
193
- if (_ === "MODAL" || d) {
194
+ if (_ === "MODAL" || u) {
194
195
  let e = {
195
196
  ...f,
196
- ...m,
197
+ ...p,
197
198
  __drilldown: h,
198
- [p]: s
199
+ [m]: s
199
200
  };
200
- k ? O(o, e) : D(o, e), x && x(o, {
201
+ A ? k(o, e) : O(o, e), S && S(o, {
201
202
  ...f,
202
- ...m
203
+ ...p
203
204
  });
204
205
  return;
205
206
  }
206
207
  if (l) {
207
208
  let e = g.slice(g.indexOf("?"));
208
- C(`${window.location.pathname}${e}`);
209
+ w(`${window.location.pathname}${e}`);
209
210
  return;
210
211
  }
211
- C(g);
212
+ w(g);
212
213
  }, [
213
- N,
214
214
  P,
215
- C,
216
- D,
215
+ F,
216
+ w,
217
217
  O,
218
218
  k,
219
219
  A,
220
- b,
220
+ j,
221
221
  x,
222
222
  S,
223
- j,
224
- L,
223
+ C,
224
+ M,
225
225
  R,
226
- z
226
+ z,
227
+ B
227
228
  ]),
228
- canDrilldown: F,
229
- canNavigate: I,
230
- buildDrilldownUrl: P,
231
- extractParameters: N,
232
- parseUrlMetadata: j,
233
- parseUrlContext: M
229
+ canDrilldown: I,
230
+ canNavigate: L,
231
+ buildDrilldownUrl: F,
232
+ extractParameters: P,
233
+ parseUrlMetadata: M,
234
+ parseUrlContext: N
234
235
  };
235
236
  }
236
237
  //#endregion
237
- export { u as CONTEXT_PARAM_PREFIX, f as DRILLDOWN_PARAM_PREFIX, d as FILTER_PARAM_PREFIX, p as MODAL_TARGET_PAGE_PARAM, y as default };
238
+ export { d as CONTEXT_PARAM_PREFIX, p as DRILLDOWN_PARAM_PREFIX, f as FILTER_PARAM_PREFIX, m as MODAL_TARGET_PAGE_PARAM, b as default };
@@ -1,4 +1,4 @@
1
- import { GetDataSinkDocument as e } from "../../generated/wspace-operations.js";
1
+ import { GetDataSinkForExportDocument as e } from "../../generated/wspace-operations.js";
2
2
  import { useCallback as t, useState as n } from "react";
3
3
  import { useApolloClient as r } from "@apollo/client/react";
4
4
  //#region src/bigconsole/hooks/useExportDataSink.ts
@@ -1,7 +1,7 @@
1
1
  import { CreateGlobalFilterDocument as e, DeleteGlobalFilterDocument as t, GetDashboardDocument as n, ReorderGlobalFiltersDocument as r, UpdateGlobalFilterDocument as i } from "../../generated/wspace-operations.js";
2
2
  import { useCallback as a, useRef as o, useState as s } from "react";
3
- import { useLocalStorage as c } from "@burdenoff/fe-libs/shared/hooks";
4
- import { useApolloClient as l } from "@apollo/client/react";
3
+ import { useApolloClient as c } from "@apollo/client/react";
4
+ import { useLocalStorage as l } from "@burdenoff/fe-libs/shared/hooks";
5
5
  //#region src/bigconsole/hooks/useGlobalFilters.ts
6
6
  var u = "bigconsole_local_filters";
7
7
  function d(e) {
@@ -24,7 +24,7 @@ function d(e) {
24
24
  };
25
25
  }
26
26
  function f() {
27
- let [f, p] = s([]), [m, h] = s({}), [g, _] = s(!1), [v, y] = s(null), b = o(""), [x, S] = c(u, {}), C = l();
27
+ let [f, p] = s([]), [m, h] = s({}), [g, _] = s(!1), [v, y] = s(null), b = o(""), [x, S] = l(u, {}), C = c();
28
28
  a((e) => {
29
29
  let t = x[e];
30
30
  return t ? t.map((e) => d(e)) : [];