@burdenoff/microfe-bigconsole 2026.1012.1 → 2026.1012.3

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.
@@ -1,33 +1,26 @@
1
- import e from "../ChartTooltip.js";
2
- import { buildReferenceElements as t } from "./referenceElements.js";
3
- import { memo as n, useMemo as r } from "react";
4
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
- import { Bar as o, CartesianGrid as s, ComposedChart as c, Legend as l, Line as u, ResponsiveContainer as d, Tooltip as f, XAxis as p, YAxis as m } from "recharts";
1
+ import { configuredNumericSeries as e } from "./numericSeries.js";
2
+ import t from "../ChartTooltip.js";
3
+ import { buildReferenceElements as n } from "./referenceElements.js";
4
+ import { memo as r, useMemo as i } from "react";
5
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
6
+ import { Bar as s, CartesianGrid as c, ComposedChart as l, Legend as u, Line as d, ResponsiveContainer as f, Tooltip as p, XAxis as m, YAxis as h } from "recharts";
6
7
  //#region src/bigconsole/components/widgets/chart/charts/ComboChart.tsx
7
- var h = [
8
+ var g = [
8
9
  "var(--color-chart-1)",
9
10
  "var(--color-chart-2)",
10
11
  "var(--color-chart-3)",
11
12
  "var(--color-chart-4)",
12
13
  "var(--color-chart-5)"
13
- ], g = n(function({ data: n = [], config: g, hiddenSeries: _ = [], onDataClick: v }) {
14
- let y = r(() => g.series?.length ? g.series : n.length ? Object.keys(n[0]).filter((e) => e !== g.xAxisKey && typeof n[0][e] == "number").map((e, t) => ({
15
- field: e,
16
- type: t === 0 ? "bar" : "line",
17
- axis: t === 0 ? "left" : "right"
18
- })) : [], [
19
- g.series,
20
- n,
21
- g.xAxisKey
22
- ]), b = r(() => y.some((e) => e.axis === "right"), [y]), x = (e) => typeof e == "number" ? new Intl.NumberFormat("en-US", {
14
+ ], _ = r(function({ data: r = [], config: _, hiddenSeries: v = [], onDataClick: y }) {
15
+ let b = i(() => e(r, _), [_, r]), x = i(() => b.some((e) => e.axis === "right"), [b]), S = (e) => typeof e == "number" ? new Intl.NumberFormat("en-US", {
23
16
  notation: e >= 1e4 ? "compact" : "standard",
24
17
  maximumFractionDigits: 2
25
18
  }).format(e) : String(e);
26
- return n?.length ? /* @__PURE__ */ i(d, {
19
+ return r?.length ? /* @__PURE__ */ a(f, {
27
20
  width: "100%",
28
21
  height: "100%",
29
- children: /* @__PURE__ */ a(c, {
30
- data: n,
22
+ children: /* @__PURE__ */ o(l, {
23
+ data: r,
31
24
  margin: {
32
25
  top: 10,
33
26
  right: 10,
@@ -35,17 +28,17 @@ var h = [
35
28
  bottom: 0
36
29
  },
37
30
  onClick: (e) => {
38
- e?.activePayload?.[0] && v && v(e.activePayload[0].payload, e.activeTooltipIndex || 0);
31
+ e?.activePayload?.[0] && y && y(e.activePayload[0].payload, e.activeTooltipIndex || 0);
39
32
  },
40
33
  children: [
41
- g.showGrid !== !1 && /* @__PURE__ */ i(s, {
34
+ _.showGrid !== !1 && /* @__PURE__ */ a(c, {
42
35
  strokeDasharray: "3 3",
43
36
  stroke: "var(--color-border-default)",
44
37
  opacity: .5,
45
38
  vertical: !1
46
39
  }),
47
- /* @__PURE__ */ i(p, {
48
- dataKey: g.xAxisKey || "name",
40
+ /* @__PURE__ */ a(m, {
41
+ dataKey: _.xAxisKey || "name",
49
42
  tick: {
50
43
  fill: "var(--color-text-secondary)",
51
44
  fontSize: 12
@@ -53,7 +46,7 @@ var h = [
53
46
  tickLine: { stroke: "var(--color-border-default)" },
54
47
  axisLine: { stroke: "var(--color-border-default)" }
55
48
  }),
56
- /* @__PURE__ */ i(m, {
49
+ /* @__PURE__ */ a(h, {
57
50
  yAxisId: "left",
58
51
  tick: {
59
52
  fill: "var(--color-text-secondary)",
@@ -61,15 +54,15 @@ var h = [
61
54
  },
62
55
  tickLine: { stroke: "var(--color-border-default)" },
63
56
  axisLine: { stroke: "var(--color-border-default)" },
64
- tickFormatter: x,
65
- label: g.yAxisLabel ? {
66
- value: g.yAxisLabel,
57
+ tickFormatter: S,
58
+ label: _.yAxisLabel ? {
59
+ value: _.yAxisLabel,
67
60
  angle: -90,
68
61
  position: "insideLeft",
69
62
  fill: "var(--color-text-secondary)"
70
63
  } : void 0
71
64
  }),
72
- b && /* @__PURE__ */ i(m, {
65
+ x && /* @__PURE__ */ a(h, {
73
66
  yAxisId: "right",
74
67
  orientation: "right",
75
68
  tick: {
@@ -78,45 +71,45 @@ var h = [
78
71
  },
79
72
  tickLine: { stroke: "var(--color-border-default)" },
80
73
  axisLine: { stroke: "var(--color-border-default)" },
81
- tickFormatter: x,
82
- label: g.yAxisRightLabel ? {
83
- value: g.yAxisRightLabel,
74
+ tickFormatter: S,
75
+ label: _.yAxisRightLabel ? {
76
+ value: _.yAxisRightLabel,
84
77
  angle: 90,
85
78
  position: "insideRight",
86
79
  fill: "var(--color-text-secondary)"
87
80
  } : void 0
88
81
  }),
89
- /* @__PURE__ */ i(f, {
90
- content: /* @__PURE__ */ i(e, { valueFormatter: x }),
82
+ /* @__PURE__ */ a(p, {
83
+ content: /* @__PURE__ */ a(t, { valueFormatter: S }),
91
84
  cursor: {
92
85
  fill: "var(--color-bg-muted)",
93
86
  opacity: .5
94
87
  }
95
88
  }),
96
- g.showLegend !== !1 && /* @__PURE__ */ i(l, {
89
+ _.showLegend !== !1 && /* @__PURE__ */ a(u, {
97
90
  wrapperStyle: { paddingTop: 20 },
98
- formatter: (e) => /* @__PURE__ */ i("span", {
91
+ formatter: (e) => /* @__PURE__ */ a("span", {
99
92
  style: { color: "var(--color-text-primary)" },
100
93
  children: e
101
94
  })
102
95
  }),
103
- y.map((e, t) => {
104
- let n = e.color || g.colors?.[t] || h[t % h.length], r = e.axis === "right" && b ? "right" : "left", a = e.label || g.seriesNames?.[e.field] || e.field, s = _.includes(e.field);
105
- return e.type === "line" ? /* @__PURE__ */ i(u, {
96
+ b.map((e, t) => {
97
+ let n = e.color || _.colors?.[t] || g[t % g.length], r = e.axis === "right" && x ? "right" : "left", i = e.label || _.seriesNames?.[e.field] || e.field, o = v.includes(e.field);
98
+ return e.type === "line" ? /* @__PURE__ */ a(d, {
106
99
  yAxisId: r,
107
- type: g.curveType || "monotone",
100
+ type: _.curveType || "monotone",
108
101
  dataKey: e.field,
109
- name: a,
102
+ name: i,
110
103
  stroke: n,
111
104
  strokeWidth: 2,
112
- dot: g.showDots !== !1,
105
+ dot: _.showDots !== !1,
113
106
  activeDot: { r: 6 },
114
- hide: s,
107
+ hide: o,
115
108
  connectNulls: !0
116
- }, e.field) : /* @__PURE__ */ i(o, {
109
+ }, e.field) : /* @__PURE__ */ a(s, {
117
110
  yAxisId: r,
118
111
  dataKey: e.field,
119
- name: a,
112
+ name: i,
120
113
  fill: n,
121
114
  radius: [
122
115
  4,
@@ -124,14 +117,14 @@ var h = [
124
117
  0,
125
118
  0
126
119
  ],
127
- hide: s,
128
- stackId: g.stacked ? "stack" : void 0
120
+ hide: o,
121
+ stackId: _.stacked ? "stack" : void 0
129
122
  }, e.field);
130
123
  }),
131
- t(g.referenceLines, { yAxisId: "left" })
124
+ n(_.referenceLines, { yAxisId: "left" })
132
125
  ]
133
126
  })
134
127
  }) : null;
135
128
  });
136
129
  //#endregion
137
- export { g as default };
130
+ export { _ as default };
@@ -1,25 +1,30 @@
1
- import e from "../ChartTooltip.js";
2
- import { buildReferenceElements as t } from "./referenceElements.js";
3
- import { memo as n, useMemo as r } from "react";
4
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
- import { CartesianGrid as o, Legend as s, Line as c, LineChart as l, ResponsiveContainer as u, Tooltip as d, XAxis as f, YAxis as p } from "recharts";
1
+ import { numericSeriesKeys as e } from "./numericSeries.js";
2
+ import t from "../ChartTooltip.js";
3
+ import { buildReferenceElements as n } from "./referenceElements.js";
4
+ import { memo as r, useMemo as i } from "react";
5
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
6
+ import { CartesianGrid as s, Legend as c, Line as l, LineChart as u, ResponsiveContainer as d, Tooltip as f, XAxis as p, YAxis as m } from "recharts";
6
7
  //#region src/bigconsole/components/widgets/chart/charts/LineChart.tsx
7
- var m = [
8
+ var h = [
8
9
  "var(--color-chart-1)",
9
10
  "var(--color-chart-2)",
10
11
  "var(--color-chart-3)",
11
12
  "var(--color-chart-4)",
12
13
  "var(--color-chart-5)"
13
- ], h = n(function({ data: n = [], config: h, hiddenSeries: g = [], onDataClick: _ }) {
14
- let v = r(() => n?.length ? Object.keys(n[0]).filter((e) => e !== h.xAxisKey && typeof n[0][e] == "number") : [], [n, h.xAxisKey]), y = (e) => typeof e == "number" ? new Intl.NumberFormat("en-US", {
14
+ ], g = r(function({ data: r = [], config: g, hiddenSeries: _ = [], onDataClick: v }) {
15
+ let y = i(() => e(r, g.xAxisKey, g.selectedFields), [
16
+ r,
17
+ g.xAxisKey,
18
+ g.selectedFields
19
+ ]), b = (e) => typeof e == "number" ? new Intl.NumberFormat("en-US", {
15
20
  notation: e >= 1e4 ? "compact" : "standard",
16
21
  maximumFractionDigits: 2
17
22
  }).format(e) : String(e);
18
- return n?.length ? /* @__PURE__ */ i(u, {
23
+ return r?.length ? /* @__PURE__ */ a(d, {
19
24
  width: "100%",
20
25
  height: "100%",
21
- children: /* @__PURE__ */ a(l, {
22
- data: n,
26
+ children: /* @__PURE__ */ o(u, {
27
+ data: r,
23
28
  margin: {
24
29
  top: 10,
25
30
  right: 10,
@@ -27,68 +32,68 @@ var m = [
27
32
  bottom: 0
28
33
  },
29
34
  onClick: (e) => {
30
- e?.activePayload?.[0] && _ && _(e.activePayload[0].payload, e.activeTooltipIndex || 0);
35
+ e?.activePayload?.[0] && v && v(e.activePayload[0].payload, e.activeTooltipIndex || 0);
31
36
  },
32
37
  children: [
33
- h.showGrid !== !1 && /* @__PURE__ */ i(o, {
38
+ g.showGrid !== !1 && /* @__PURE__ */ a(s, {
34
39
  strokeDasharray: "3 3",
35
40
  stroke: "var(--color-border-default)",
36
41
  opacity: .5
37
42
  }),
38
- /* @__PURE__ */ i(f, {
39
- dataKey: h.xAxisKey || "name",
43
+ /* @__PURE__ */ a(p, {
44
+ dataKey: g.xAxisKey || "name",
40
45
  tick: {
41
46
  fill: "var(--color-text-secondary)",
42
47
  fontSize: 12
43
48
  },
44
49
  tickLine: { stroke: "var(--color-border-default)" },
45
50
  axisLine: { stroke: "var(--color-border-default)" },
46
- label: h.xAxisLabel ? {
47
- value: h.xAxisLabel,
51
+ label: g.xAxisLabel ? {
52
+ value: g.xAxisLabel,
48
53
  position: "insideBottom",
49
54
  offset: -5,
50
55
  fill: "var(--color-text-secondary)"
51
56
  } : void 0
52
57
  }),
53
- /* @__PURE__ */ i(p, {
58
+ /* @__PURE__ */ a(m, {
54
59
  tick: {
55
60
  fill: "var(--color-text-secondary)",
56
61
  fontSize: 12
57
62
  },
58
63
  tickLine: { stroke: "var(--color-border-default)" },
59
64
  axisLine: { stroke: "var(--color-border-default)" },
60
- tickFormatter: y,
61
- scale: h.logScale ? "log" : "auto",
62
- domain: h.logScale ? ["auto", "auto"] : void 0,
63
- allowDataOverflow: h.logScale || void 0,
64
- label: h.yAxisLabel ? {
65
- value: h.yAxisLabel,
65
+ tickFormatter: b,
66
+ scale: g.logScale ? "log" : "auto",
67
+ domain: g.logScale ? ["auto", "auto"] : void 0,
68
+ allowDataOverflow: g.logScale || void 0,
69
+ label: g.yAxisLabel ? {
70
+ value: g.yAxisLabel,
66
71
  angle: -90,
67
72
  position: "insideLeft",
68
73
  fill: "var(--color-text-secondary)"
69
74
  } : void 0
70
75
  }),
71
- /* @__PURE__ */ i(d, {
72
- content: /* @__PURE__ */ i(e, { valueFormatter: y }),
76
+ /* @__PURE__ */ a(f, {
77
+ content: /* @__PURE__ */ a(t, { valueFormatter: b }),
73
78
  cursor: { stroke: "var(--color-border-default)" }
74
79
  }),
75
- h.showLegend !== !1 && /* @__PURE__ */ i(s, {
80
+ g.showLegend !== !1 && /* @__PURE__ */ a(c, {
76
81
  wrapperStyle: { paddingTop: 20 },
77
- formatter: (e) => /* @__PURE__ */ i("span", {
82
+ formatter: (e) => /* @__PURE__ */ a("span", {
78
83
  style: { color: "var(--color-text-primary)" },
79
84
  children: e
80
85
  })
81
86
  }),
82
- t(h.referenceLines),
83
- v.map((e, t) => /* @__PURE__ */ i(c, {
84
- type: h.curveType || "monotone",
87
+ n(g.referenceLines),
88
+ y.map((e, t) => /* @__PURE__ */ a(l, {
89
+ type: g.curveType || "monotone",
85
90
  dataKey: e,
86
- name: h.seriesNames?.[e] || e,
87
- stroke: h.colors?.[t] || m[t % m.length],
91
+ name: g.seriesNames?.[e] || e,
92
+ stroke: g.colors?.[t] || h[t % h.length],
88
93
  strokeWidth: 2,
89
- dot: h.showDots !== !1,
94
+ dot: g.showDots !== !1,
90
95
  activeDot: { r: 6 },
91
- hide: g.includes(e),
96
+ hide: _.includes(e),
92
97
  connectNulls: !0
93
98
  }, e))
94
99
  ]
@@ -96,4 +101,4 @@ var m = [
96
101
  }) : null;
97
102
  });
98
103
  //#endregion
99
- export { h as default };
104
+ export { g as default };
@@ -0,0 +1,6 @@
1
+ import { ChartConfig, ChartData, SeriesConfig } from './types';
2
+
3
+ /** Use the saved field order and never turn an explicit empty selection into all metrics. */
4
+ export declare function numericSeriesKeys(data: readonly ChartData[], xAxisKey?: string, selectedFields?: readonly string[]): string[];
5
+ /** Keep explicit combo descriptors, but apply a saved numeric selection in its persisted order. */
6
+ export declare function configuredNumericSeries(data: readonly ChartData[], config: ChartConfig): SeriesConfig[];
@@ -0,0 +1,26 @@
1
+ //#region src/bigconsole/components/widgets/chart/charts/numericSeries.ts
2
+ function e(e, t, n) {
3
+ let r = e[0];
4
+ return r ? [...new Set((n ?? Object.keys(r)).filter((e) => {
5
+ if (typeof e != "string" || e === t) return !1;
6
+ let n = r[e];
7
+ return typeof n == "number" && Number.isFinite(n);
8
+ }))] : [];
9
+ }
10
+ function t(t, n) {
11
+ if (n.series?.length) {
12
+ if (n.selectedFields === void 0) return n.series;
13
+ let r = new Map(n.series.map((e) => [e.field, e]));
14
+ return e(t, n.xAxisKey, n.selectedFields).flatMap((e) => {
15
+ let t = r.get(e);
16
+ return t ? [t] : [];
17
+ });
18
+ }
19
+ return e(t, n.xAxisKey, n.selectedFields).map((e, t) => ({
20
+ field: e,
21
+ type: t === 0 ? "bar" : "line",
22
+ axis: t === 0 ? "left" : "right"
23
+ }));
24
+ }
25
+ //#endregion
26
+ export { t as configuredNumericSeries, e as numericSeriesKeys };
@@ -31,6 +31,8 @@ export interface ChartConfig {
31
31
  type?: ChartType;
32
32
  /** X-axis data key */
33
33
  xAxisKey?: string;
34
+ /** Ordered numeric series selection; undefined auto-detects, an empty list displays no series. */
35
+ selectedFields?: string[];
34
36
  /** X-axis label */
35
37
  xAxisLabel?: string;
36
38
  /** Y-axis label */
@@ -1,19 +1,38 @@
1
1
  import { ExportDashboardDocument as e } from "../../generated/wspace-operations.js";
2
- import { useCallback as t, useState as n } from "react";
3
- import { useApolloClient as r } from "@apollo/client/react";
2
+ import { useBigConsole as t } from "../context/BigConsoleContext.js";
3
+ import "../context/index.js";
4
+ import { useCallback as n, useLayoutEffect as r, useRef as i, useState as a } from "react";
5
+ import { useApolloClient as o } from "@apollo/client/react";
4
6
  //#region src/bigconsole/hooks/useExportDashboard.ts
5
- function i(e, t) {
7
+ function s(e, t) {
6
8
  let n = new Blob([e], { type: "application/json" }), r = URL.createObjectURL(n), i = document.createElement("a");
7
9
  i.href = r, i.download = t, document.body.appendChild(i), i.click(), document.body.removeChild(i), URL.revokeObjectURL(r);
8
10
  }
9
- function a(e) {
11
+ function c(e) {
10
12
  return e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").substring(0, 50);
11
13
  }
12
- function o() {
13
- let [o, s] = n(!1), [c, l] = n(null), u = r(), d = t(async (t, n = {}) => {
14
+ function l() {
15
+ let [l, u] = a(!1), [d, f] = a(null), p = o(), { currentUser: m, workspaceId: h } = t(), g = `${m?.id ?? ""}|${h ?? ""}`, _ = i(g), v = i(0);
16
+ r(() => (_.current = g, v.current++, u(!1), f(null), () => {
17
+ _.current = "";
18
+ }), [g]);
19
+ let y = n(() => {
20
+ if (!h || !m?.id || _.current !== g) throw Error("Select a workspace before exporting a dashboard.");
21
+ return {
22
+ requiredWorkspaceAuth: !0,
23
+ requiredWorkspaceId: h,
24
+ queryDeduplication: !1
25
+ };
26
+ }, [
27
+ h,
28
+ m?.id,
29
+ g
30
+ ]), b = n(async (t, n = {}) => {
31
+ let r = ++v.current, i = () => _.current === g && v.current === r;
14
32
  try {
15
- s(!0), l(null);
16
- let r = await u.query({
33
+ let r = y();
34
+ u(!0), f(null);
35
+ let a = await p.query({
17
36
  query: e,
18
37
  variables: {
19
38
  id: t,
@@ -23,51 +42,56 @@ function o() {
23
42
  prettyPrint: n.prettyPrint ?? !0
24
43
  }
25
44
  },
26
- fetchPolicy: "network-only"
45
+ fetchPolicy: "no-cache",
46
+ errorPolicy: "none",
47
+ context: r
27
48
  });
28
- if (r.error) throw r.error;
29
- let i = r.data?.exportDashboard;
30
- if (i) {
31
- let e = JSON.parse(i);
49
+ if (!i()) return null;
50
+ if (a.error) throw a.error;
51
+ let o = a.data?.exportDashboard;
52
+ if (o) {
53
+ let e = JSON.parse(o);
32
54
  if (!e || typeof e != "object" || Array.isArray(e)) throw Error("Export returned invalid JSON");
33
- let r = { ...e }, a = "exportedFrom" in r && r.exportedFrom && typeof r.exportedFrom == "object" ? r.exportedFrom : {};
34
- return Object.assign(r, { exportedFrom: {
35
- ...a,
36
- dashboardId: t
37
- } }), "dashboard" in r && r.dashboard && typeof r.dashboard == "object" && (r.dashboard = {
38
- ...r.dashboard,
39
- id: t
40
- }), JSON.stringify(r, null, n.prettyPrint === !1 ? void 0 : 2);
55
+ return JSON.stringify(e, null, n.prettyPrint === !1 ? void 0 : 2);
41
56
  }
42
57
  throw Error("Export returned empty content");
43
58
  } catch (e) {
44
- return l(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to export dashboard")), null;
59
+ return i() && f(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to export dashboard")), null;
45
60
  } finally {
46
- s(!1);
61
+ i() && u(!1);
47
62
  }
48
- }, [u]);
63
+ }, [
64
+ p,
65
+ g,
66
+ y
67
+ ]);
49
68
  return {
50
- loading: o,
51
- error: c,
52
- exportDashboard: d,
53
- downloadDashboard: t(async (e, t, n = {}) => {
69
+ loading: l,
70
+ error: d,
71
+ exportDashboard: b,
72
+ downloadDashboard: n(async (e, t, n = {}) => {
54
73
  try {
55
- let r = n.preparedContent ?? await d(e, n);
74
+ y();
75
+ let r = n.preparedContent ?? await b(e, n);
56
76
  if (!r) return !1;
57
- let o = t;
58
- if (!o) {
77
+ let i = t;
78
+ if (!i) {
59
79
  let e = JSON.parse(r);
60
- e && typeof e == "object" && "dashboard" in e && e.dashboard && typeof e.dashboard == "object" && "name" in e.dashboard && typeof e.dashboard.name == "string" && (o = e.dashboard.name);
80
+ e && typeof e == "object" && "dashboard" in e && e.dashboard && typeof e.dashboard == "object" && "name" in e.dashboard && typeof e.dashboard.name == "string" && (i = e.dashboard.name);
61
81
  }
62
- return i(r, `${a(o || "dashboard")}-export-${(/* @__PURE__ */ new Date()).toISOString().split("T")[0]}.json`), !0;
82
+ return s(r, `${c(i || "dashboard")}-export-${(/* @__PURE__ */ new Date()).toISOString().split("T")[0]}.json`), !0;
63
83
  } catch (e) {
64
- return l(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to download dashboard")), !1;
84
+ return _.current === g && f(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to download dashboard")), !1;
65
85
  }
66
- }, [d]),
67
- clearError: t(() => {
68
- l(null);
86
+ }, [
87
+ b,
88
+ g,
89
+ y
90
+ ]),
91
+ clearError: n(() => {
92
+ v.current++, u(!1), f(null);
69
93
  }, [])
70
94
  };
71
95
  }
72
96
  //#endregion
73
- export { o as default };
97
+ export { l as default };
@@ -1,8 +1,7 @@
1
1
  /**
2
2
  * useImportDashboard Hook
3
3
  *
4
- * Provides dashboard import functionality with validation and conflict resolution.
5
- * Supports both creating new dashboards and updating existing ones on re-import.
4
+ * Imports a validated new dashboard copy. Export provenance never authorizes updates to an existing dashboard.
6
5
  */
7
6
  export interface ImportDashboardInfo {
8
7
  name: string;
@@ -47,21 +46,12 @@ export interface ImportDashboardResult {
47
46
  };
48
47
  errorMessage?: string;
49
48
  stats?: ImportStats;
50
- /** Whether the original dashboard was also updated */
51
- originalUpdated?: boolean;
52
- /** The original dashboard that was updated (if any) */
53
- originalDashboard?: {
54
- id: string;
55
- name: string;
56
- };
57
- /** Whether the entity already exists with no changes (show "already exists" popup) */
58
- alreadyExists?: boolean;
59
49
  }
60
50
  export interface ImportDashboardOptions {
61
51
  /** Override dashboard name (optional) */
62
52
  name?: string;
63
53
  /** Target visibility (optional, defaults to PRIVATE) */
64
- visibility?: 'PRIVATE' | 'TEAM' | 'PUBLIC';
54
+ visibility?: 'PRIVATE' | 'WORKSPACE' | 'PUBLIC';
65
55
  /** Skip validation warnings (default: false) */
66
56
  skipWarnings?: boolean;
67
57
  }