@burdenoff/microfe-bigconsole 2026.1118.9 → 2026.1119.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 (46) hide show
  1. package/dist/bigconsole/asof/AsOfBanner.d.ts +3 -0
  2. package/dist/bigconsole/asof/AsOfBanner.js +38 -0
  3. package/dist/bigconsole/asof/AsOfControl.d.ts +4 -0
  4. package/dist/bigconsole/asof/AsOfControl.js +96 -0
  5. package/dist/bigconsole/asof/AsOfProvider.d.ts +24 -0
  6. package/dist/bigconsole/asof/AsOfProvider.js +76 -0
  7. package/dist/bigconsole/asof/asOfMessage.d.ts +12 -0
  8. package/dist/bigconsole/asof/asOfMessage.js +12 -0
  9. package/dist/bigconsole/asof/asOfParam.d.ts +48 -0
  10. package/dist/bigconsole/asof/asOfParam.js +34 -0
  11. package/dist/bigconsole/asof/index.d.ts +7 -0
  12. package/dist/bigconsole/asof/index.js +6 -0
  13. package/dist/bigconsole/components/dashboard/BoardMigrationReport.d.ts +7 -0
  14. package/dist/bigconsole/components/dashboard/BoardMigrationReport.js +136 -0
  15. package/dist/bigconsole/components/dashboard/DashboardCanvas.js +142 -138
  16. package/dist/bigconsole/components/dashboard/DashboardToolbar.js +97 -92
  17. package/dist/bigconsole/components/dashboard/ImportFromToolDialog.d.ts +8 -0
  18. package/dist/bigconsole/components/dashboard/ImportFromToolDialog.js +464 -0
  19. package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +78 -74
  20. package/dist/bigconsole/components/dashboard/index.d.ts +2 -0
  21. package/dist/bigconsole/components/dashboard/index.js +2 -0
  22. package/dist/bigconsole/components/widgets/WidgetMenu.js +98 -96
  23. package/dist/bigconsole/components/widgets/WidgetWrapper.js +345 -306
  24. package/dist/bigconsole/constants/backendErrors.js +1 -0
  25. package/dist/bigconsole/hooks/index.d.ts +1 -0
  26. package/dist/bigconsole/hooks/index.js +14 -13
  27. package/dist/bigconsole/hooks/useBoardMigrationPreview.d.ts +22 -0
  28. package/dist/bigconsole/hooks/useBoardMigrationPreview.js +62 -0
  29. package/dist/bigconsole/hooks/useFilterFieldValues.js +52 -22
  30. package/dist/bigconsole/hooks/useWidgetData.d.ts +7 -0
  31. package/dist/bigconsole/hooks/useWidgetData.js +53 -43
  32. package/dist/bigconsole/pages/DashboardViewPage.d.ts +7 -1
  33. package/dist/bigconsole/pages/DashboardViewPage.js +300 -278
  34. package/dist/bigconsole/pages/DashboardsPage.js +396 -376
  35. package/dist/bigconsole/pages/index.d.ts +1 -1
  36. package/dist/bigconsole/types/index.d.ts +13 -0
  37. package/dist/bigconsole/utils/backendError.js +46 -24
  38. package/dist/bigconsole/utils/boardMigration.d.ts +53 -0
  39. package/dist/bigconsole/utils/boardMigration.js +92 -0
  40. package/dist/bigconsole/utils/widgetDisplayData.d.ts +6 -0
  41. package/dist/bigconsole/utils/widgetDisplayData.js +4 -0
  42. package/dist/generated/wspace-operations.d.ts +116 -0
  43. package/dist/generated/wspace-operations.js +793 -183
  44. package/dist/generated/wspace-types.d.ts +78 -0
  45. package/dist/generated/wspace-types.js +12 -10
  46. package/package.json +1 -1
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ export declare const AsOfBanner: FC;
3
+ export default AsOfBanner;
@@ -0,0 +1,38 @@
1
+ import { Section as e } from "../components/common/Section.js";
2
+ import "../components/common/index.js";
3
+ import { formatWhen as t } from "./AsOfControl.js";
4
+ import { useAsOf as n } from "./AsOfProvider.js";
5
+ import { memo as r } from "react";
6
+ import { History as i } from "lucide-react";
7
+ import { Button as a } from "@burdenoff/fe-libs/ui";
8
+ import { useI18n as o } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
9
+ import { jsx as s } from "react/jsx-runtime";
10
+ // src/bigconsole/asof/AsOfBanner.tsx
11
+ var c = r(function() {
12
+ let { t: r } = o(), { asOf: c, clearAsOf: l } = n();
13
+ return c ? /* @__PURE__ */ s("div", {
14
+ role: "status",
15
+ "aria-live": "polite",
16
+ className: "mx-card-padding mt-control-gap flex-shrink-0",
17
+ children: /* @__PURE__ */ s(e, {
18
+ tone: "warning",
19
+ padding: "compact",
20
+ headingLevel: 3,
21
+ "data-testid": "as-of-banner",
22
+ icon: /* @__PURE__ */ s(i, {
23
+ className: "size-4",
24
+ "aria-hidden": "true"
25
+ }),
26
+ title: r("bigconsole.asOf.banner.title", "Showing data as of {{date}}", { date: t(c) }),
27
+ description: r("bigconsole.asOf.banner.description", "Parser versions are pinned to that date. The layout shown is the current one. This is not live data."),
28
+ meta: /* @__PURE__ */ s(a, {
29
+ variant: "outline",
30
+ size: "sm",
31
+ onClick: l,
32
+ "data-testid": "as-of-banner-back",
33
+ children: r("bigconsole.asOf.banner.back", "Back to now")
34
+ })
35
+ })
36
+ }) : null;
37
+ });
38
+ export { c as AsOfBanner, c as default };
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ export declare const AsOfControl: FC;
3
+ /** A short, locale-aware date and time, in the viewer's time zone. */
4
+ export declare function formatWhen(date: Date): string;
@@ -0,0 +1,96 @@
1
+ import { fromLocalInputValue as e, toLocalInputValue as t } from "./asOfParam.js";
2
+ import { useAsOf as n } from "./AsOfProvider.js";
3
+ import { memo as r, useEffect as i, useState as a } from "react";
4
+ import { History as o } from "lucide-react";
5
+ import { Button as s, Input as c, Popover as l, PopoverContent as u, PopoverTrigger as d } from "@burdenoff/fe-libs/ui";
6
+ import { useI18n as f } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
7
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
8
+ // src/bigconsole/asof/AsOfControl.tsx
9
+ var h = r(function() {
10
+ let { t: r } = f(), { enabled: h, asOf: _, setAsOf: v, clearAsOf: y } = n(), [b, x] = a(!1), [S, C] = a(t(_)), [w, T] = a(!1);
11
+ if (i(() => {
12
+ b && (C(t(_)), T(!1));
13
+ }, [b, _]), !h) return null;
14
+ let E = _ ? r("bigconsole.asOf.control.at", "As of: {{date}}", { date: g(_) }) : r("bigconsole.asOf.control.now", "As of: Now");
15
+ return /* @__PURE__ */ m(l, {
16
+ open: b,
17
+ onOpenChange: x,
18
+ children: [/* @__PURE__ */ p(d, {
19
+ asChild: !0,
20
+ children: /* @__PURE__ */ m(s, {
21
+ variant: _ ? "secondary" : "outline",
22
+ size: "sm",
23
+ "data-testid": "as-of-control",
24
+ "aria-label": r("bigconsole.asOf.control.aria", "Show this board as of a past date and time"),
25
+ children: [/* @__PURE__ */ p(o, {
26
+ className: "size-4",
27
+ "aria-hidden": "true"
28
+ }), /* @__PURE__ */ p("span", {
29
+ className: "ml-1",
30
+ children: E
31
+ })]
32
+ })
33
+ }), /* @__PURE__ */ m(u, {
34
+ align: "end",
35
+ className: "w-80 space-y-3",
36
+ "data-testid": "as-of-picker",
37
+ children: [
38
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
39
+ className: "text-sm font-medium text-text-primary",
40
+ children: r("bigconsole.asOf.picker.title", "Show this board as of")
41
+ }), /* @__PURE__ */ p("p", {
42
+ className: "mt-1 text-xs text-text-muted",
43
+ children: r("bigconsole.asOf.picker.hint", "Pick a past date and time. Each data source is read as it was then, and parsers are pinned to that date.")
44
+ })] }),
45
+ /* @__PURE__ */ p(c, {
46
+ type: "datetime-local",
47
+ value: S,
48
+ max: t(/* @__PURE__ */ new Date()),
49
+ onChange: (e) => {
50
+ C(e.target.value), T(!1);
51
+ },
52
+ "aria-label": r("bigconsole.asOf.picker.input", "Date and time"),
53
+ "aria-invalid": w,
54
+ "data-testid": "as-of-input"
55
+ }),
56
+ w && /* @__PURE__ */ p("p", {
57
+ role: "alert",
58
+ className: "text-xs text-status-danger-text",
59
+ "data-testid": "as-of-invalid",
60
+ children: r("bigconsole.asOf.picker.invalid", "Pick a date and time that is not in the future.")
61
+ }),
62
+ /* @__PURE__ */ m("div", {
63
+ className: "flex items-center justify-between gap-2",
64
+ children: [/* @__PURE__ */ p(s, {
65
+ variant: "ghost",
66
+ size: "sm",
67
+ disabled: !_,
68
+ onClick: () => {
69
+ y(), x(!1);
70
+ },
71
+ "data-testid": "as-of-back-to-now",
72
+ children: r("bigconsole.asOf.picker.back", "Back to now")
73
+ }), /* @__PURE__ */ p(s, {
74
+ size: "sm",
75
+ onClick: () => {
76
+ let t = e(S);
77
+ t ? (v(t), x(!1)) : T(!0);
78
+ },
79
+ "data-testid": "as-of-apply",
80
+ children: r("bigconsole.asOf.picker.apply", "Show")
81
+ })]
82
+ })
83
+ ]
84
+ })]
85
+ });
86
+ });
87
+ function g(e) {
88
+ return e.toLocaleString([], {
89
+ day: "numeric",
90
+ month: "short",
91
+ year: "numeric",
92
+ hour: "2-digit",
93
+ minute: "2-digit"
94
+ });
95
+ }
96
+ export { h as AsOfControl, g as formatWhen };
@@ -0,0 +1,24 @@
1
+ import { FC, ReactNode } from 'react';
2
+ export interface AsOfState {
3
+ /** The workspace has the as-of view on. */
4
+ enabled: boolean;
5
+ /** The time being shown, or null for live data. */
6
+ asOf: Date | null;
7
+ /** Show the board as of a time. */
8
+ setAsOf: (date: Date) => void;
9
+ /** Go back to live data. */
10
+ clearAsOf: () => void;
11
+ }
12
+ export interface AsOfProviderProps {
13
+ workspaceId?: string | null;
14
+ children: ReactNode;
15
+ }
16
+ export declare const AsOfProvider: FC<AsOfProviderProps>;
17
+ export declare function useAsOf(): AsOfState;
18
+ /**
19
+ * Renders its children only for a live view. For parts of a board that describe
20
+ * or act on current data (the AI digest, for one), which would contradict a past view.
21
+ */
22
+ export declare const HideWhenAsOf: FC<{
23
+ children: ReactNode;
24
+ }>;
@@ -0,0 +1,76 @@
1
+ import { AS_OF_FEATURE_FLAG as e, AS_OF_PARAM as t, flagStatusForScope as n, formatAsOf as r, parseAsOf as i, shouldWaitForFlag as a } from "./asOfParam.js";
2
+ import { createContext as o, useCallback as s, useContext as c, useEffect as l, useMemo as u, useState as d } from "react";
3
+ import { useSearchParams as f } from "react-router";
4
+ import { FeatureFlagProvider as p, useFeatureFlag as m, useFeatureFlags as h } from "@burdenoff/fe-libs/shared/feature-flags";
5
+ import { Spinner as g } from "@burdenoff/fe-libs/ui";
6
+ import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
7
+ // src/bigconsole/asof/AsOfProvider.tsx
8
+ var b = o({
9
+ enabled: !1,
10
+ asOf: null,
11
+ setAsOf: () => {},
12
+ clearAsOf: () => {}
13
+ }), x = {
14
+ ready: !1,
15
+ enabled: !1
16
+ }, S = ({ onChange: t }) => {
17
+ let n = m(e, !1) === !0, { isLoading: r } = h(), i = !r;
18
+ return l(() => t({
19
+ ready: i,
20
+ enabled: n
21
+ }), [
22
+ i,
23
+ n,
24
+ t
25
+ ]), null;
26
+ }, C = ({ workspaceId: e, children: o }) => {
27
+ let c = e ?? null, [l, m] = d({
28
+ ...x,
29
+ workspaceId: c
30
+ }), { enabled: h, ready: _ } = n(l, c), C = s((e) => m({
31
+ ...e,
32
+ workspaceId: c
33
+ }), [c]), [w, T] = f(), E = w.get(t), D = a(_, E), O = u(() => h ? i(E) : null, [h, E]), k = s((e) => {
34
+ T((n) => {
35
+ let i = new URLSearchParams(n);
36
+ return i.set(t, r(e)), i;
37
+ }, { replace: !0 });
38
+ }, [T]), A = s(() => {
39
+ T((e) => {
40
+ let n = new URLSearchParams(e);
41
+ return n.delete(t), n;
42
+ }, { replace: !0 });
43
+ }, [T]), j = u(() => ({
44
+ enabled: h,
45
+ asOf: O,
46
+ setAsOf: k,
47
+ clearAsOf: A
48
+ }), [
49
+ h,
50
+ O,
51
+ k,
52
+ A
53
+ ]);
54
+ return /* @__PURE__ */ y(b.Provider, {
55
+ value: j,
56
+ children: [/* @__PURE__ */ v(p, {
57
+ workspaceId: c,
58
+ gateway: "global",
59
+ defaultEnabled: !1,
60
+ children: /* @__PURE__ */ v(S, { onChange: C })
61
+ }, c ?? "none"), D ? /* @__PURE__ */ v("div", {
62
+ className: "flex flex-1 items-center justify-center p-8",
63
+ role: "status",
64
+ "data-testid": "as-of-pending",
65
+ children: /* @__PURE__ */ v(g, {})
66
+ }) : o]
67
+ });
68
+ };
69
+ function w() {
70
+ return c(b);
71
+ }
72
+ var T = ({ children: e }) => {
73
+ let { asOf: t } = w();
74
+ return t ? null : /* @__PURE__ */ v(_, { children: e });
75
+ };
76
+ export { C as AsOfProvider, T as HideWhenAsOf, w as useAsOf };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Why a widget has no data as of a past time, in words a viewer understands
3
+ * (BOFF-14757). The reasons come from the as-of read (BOFF-14755, BOFF-14756).
4
+ */
5
+ type Translate = (key: string, fallback: string) => string;
6
+ /** The widget has nothing to show when the as-of read could not answer. */
7
+ export interface AsOfReadInfo {
8
+ historyAvailable: boolean;
9
+ reason?: string | null;
10
+ }
11
+ export declare function asOfUnavailableMessage(info: AsOfReadInfo | null | undefined, t: Translate): string | null;
12
+ export {};
@@ -0,0 +1,12 @@
1
+ // src/bigconsole/asof/asOfMessage.ts
2
+ function e(e, t) {
3
+ if (!e || e.historyAvailable) return null;
4
+ switch (e.reason) {
5
+ case "NO_DATA_AT_DATE": return t("bigconsole.asOf.unavailable.noDataAtDate", "This data source has no data at the chosen date");
6
+ case "READ_FAILED": return t("bigconsole.asOf.unavailable.readFailed", "History could not be read for this data source");
7
+ case "PAYLOAD_TOO_LARGE": return t("bigconsole.asOf.unavailable.payloadTooLarge", "This data source is too large to read as of a past date");
8
+ case "PARSER_UNAVAILABLE": return t("bigconsole.asOf.unavailable.parserUnavailable", "The parser this widget uses was not available at the chosen date");
9
+ default: return t("bigconsole.asOf.unavailable.historyNotAvailable", "History is not available for this data source");
10
+ }
11
+ }
12
+ export { e as asOfUnavailableMessage };
@@ -0,0 +1,48 @@
1
+ /**
2
+ * The "as of" time of a dashboard view (BOFF-14757).
3
+ *
4
+ * It lives in the URL (`?asOf=2026-10-31T02:00:00.000Z`) so a view can be
5
+ * shared and survives a reload. Only a strict UTC ISO-8601 time is accepted,
6
+ * and never one in the future: anything else means a live view.
7
+ */
8
+ export declare const AS_OF_PARAM = "asOf";
9
+ /** Workspace feature flag that turns the as-of view on. Off unless set. */
10
+ export declare const AS_OF_FEATURE_FLAG = "bigconsole.as-of-view";
11
+ /**
12
+ * The time in an `asOf` URL value, or null when it is missing, malformed,
13
+ * not a real calendar time, or later than `now`.
14
+ */
15
+ export declare function parseAsOf(value: string | null | undefined, now?: Date): Date | null;
16
+ /** The URL value for a time: UTC, whole seconds. */
17
+ export declare function formatAsOf(date: Date): string;
18
+ /**
19
+ * The value of a `datetime-local` input (local time, minutes) for a time.
20
+ * An empty string when there is no time, so the input is cleared.
21
+ */
22
+ export declare function toLocalInputValue(date: Date | null): string;
23
+ /**
24
+ * The time a `datetime-local` value means, read as local time. Null when it is
25
+ * empty, not a real time, or later than `now`.
26
+ */
27
+ export declare function fromLocalInputValue(value: string, now?: Date): Date | null;
28
+ /**
29
+ * Whether a view must wait for the workspace flag before showing anything: a
30
+ * link to a past time must not render as live data first. A view with no valid
31
+ * time has nothing to protect and never waits.
32
+ */
33
+ export declare function shouldWaitForFlag(flagReady: boolean, raw: string | null | undefined, now?: Date): boolean;
34
+ /** What the flag lookup last reported, and for which workspace. */
35
+ export interface ReportedFlag {
36
+ ready: boolean;
37
+ enabled: boolean;
38
+ workspaceId: string | null;
39
+ }
40
+ /**
41
+ * The flag status to trust for a workspace. What was reported for another
42
+ * workspace says nothing about this one, so after a workspace switch the flag is
43
+ * "not looked up yet" (and off) until this workspace reports.
44
+ */
45
+ export declare function flagStatusForScope(reported: ReportedFlag, workspaceId: string | null): {
46
+ ready: boolean;
47
+ enabled: boolean;
48
+ };
@@ -0,0 +1,34 @@
1
+ // src/bigconsole/asof/asOfParam.ts
2
+ var e = "asOf", t = "bigconsole.as-of-view", n = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(?::\d{2}(?:\.\d{1,3})?)?Z$/;
3
+ function r(e, t = /* @__PURE__ */ new Date()) {
4
+ if (!e || !n.test(e)) return null;
5
+ let r = new Date(e);
6
+ return Number.isNaN(r.getTime()) || r.toISOString().slice(0, 10) !== e.slice(0, 10) || r.getTime() > t.getTime() ? null : r;
7
+ }
8
+ function i(e) {
9
+ return e.toISOString().replace(/\.\d{3}Z$/, "Z");
10
+ }
11
+ function a(e) {
12
+ if (!e) return "";
13
+ let t = (e) => String(e).padStart(2, "0");
14
+ return `${e.getFullYear()}-${t(e.getMonth() + 1)}-${t(e.getDate())}T${t(e.getHours())}:${t(e.getMinutes())}`;
15
+ }
16
+ function o(e, t = /* @__PURE__ */ new Date()) {
17
+ let n = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})$/.exec(e);
18
+ if (!n) return null;
19
+ let [r, i, a, o, s] = n.slice(1).map(Number), c = new Date(r, i - 1, a, o, s, 0, 0);
20
+ return c.getFullYear() !== r || c.getMonth() !== i - 1 || c.getDate() !== a || c.getHours() !== o || c.getMinutes() !== s || c.getTime() > t.getTime() ? null : c;
21
+ }
22
+ function s(e, t, n = /* @__PURE__ */ new Date()) {
23
+ return !e && r(t, n) !== null;
24
+ }
25
+ function c(e, t) {
26
+ return e.workspaceId === t ? {
27
+ ready: e.ready,
28
+ enabled: e.enabled
29
+ } : {
30
+ ready: !1,
31
+ enabled: !1
32
+ };
33
+ }
34
+ export { t as AS_OF_FEATURE_FLAG, e as AS_OF_PARAM, c as flagStatusForScope, i as formatAsOf, o as fromLocalInputValue, r as parseAsOf, s as shouldWaitForFlag, a as toLocalInputValue };
@@ -0,0 +1,7 @@
1
+ export { AsOfBanner } from './AsOfBanner';
2
+ export { AsOfControl } from './AsOfControl';
3
+ export { AsOfProvider, HideWhenAsOf, useAsOf } from './AsOfProvider';
4
+ export type { AsOfState } from './AsOfProvider';
5
+ export { AS_OF_FEATURE_FLAG, AS_OF_PARAM, formatAsOf, fromLocalInputValue, parseAsOf, toLocalInputValue, } from './asOfParam';
6
+ export { asOfUnavailableMessage } from './asOfMessage';
7
+ export type { AsOfReadInfo } from './asOfMessage';
@@ -0,0 +1,6 @@
1
+ import { AS_OF_PARAM as e, formatAsOf as t } from "./asOfParam.js";
2
+ import { AsOfBanner as n } from "./AsOfBanner.js";
3
+ import { AsOfControl as r } from "./AsOfControl.js";
4
+ import { AsOfProvider as i, HideWhenAsOf as a, useAsOf as o } from "./AsOfProvider.js";
5
+ import { asOfUnavailableMessage as s } from "./asOfMessage.js";
6
+ export { e as AS_OF_PARAM, n as AsOfBanner, r as AsOfControl, i as AsOfProvider, a as HideWhenAsOf, s as asOfUnavailableMessage, t as formatAsOf, o as useAsOf };
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ import { BoardMigrationReportData } from '../../hooks/useBoardMigrationPreview';
3
+ export interface BoardMigrationReportProps {
4
+ report: BoardMigrationReportData;
5
+ }
6
+ export declare const BoardMigrationReport: FC<BoardMigrationReportProps>;
7
+ export default BoardMigrationReport;
@@ -0,0 +1,136 @@
1
+ import { Section as e } from "../common/Section.js";
2
+ import "../common/index.js";
3
+ import { statusBadgeVariant as t } from "../../utils/boardMigration.js";
4
+ import { memo as n } from "react";
5
+ import { Badge as r } from "@burdenoff/fe-libs/ui";
6
+ import { useI18n as i } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
7
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
8
+ // src/bigconsole/components/dashboard/BoardMigrationReport.tsx
9
+ var s = {
10
+ CLEAN: "Clean",
11
+ APPROXIMATE: "Approximate",
12
+ UNSUPPORTED: "Not supported"
13
+ }, c = n(function({ report: n }) {
14
+ let { t: c } = i(), l = (e) => c(`bigconsole.dashboards.importFromTool.status.${e}`, s[e]);
15
+ return /* @__PURE__ */ o("div", {
16
+ className: "space-y-4",
17
+ "data-testid": "board-migration-report",
18
+ children: [
19
+ /* @__PURE__ */ o(e, {
20
+ headingLevel: 3,
21
+ emphasis: "muted",
22
+ padding: "compact",
23
+ title: c("bigconsole.dashboards.importFromTool.summaryTitle", "What carried over"),
24
+ "data-testid": "board-migration-summary",
25
+ bodyClassName: "space-y-2",
26
+ children: [/* @__PURE__ */ o("div", {
27
+ className: "flex flex-wrap items-center gap-2",
28
+ children: [
29
+ /* @__PURE__ */ a(r, {
30
+ variant: "success",
31
+ "data-testid": "board-migration-clean",
32
+ children: c("bigconsole.dashboards.importFromTool.cleanCount", "{{count}} clean", { count: n.cleanCount })
33
+ }),
34
+ /* @__PURE__ */ a(r, {
35
+ variant: "warning",
36
+ "data-testid": "board-migration-approximate",
37
+ children: c("bigconsole.dashboards.importFromTool.approximateCount", "{{count}} approximate", { count: n.approximateCount })
38
+ }),
39
+ /* @__PURE__ */ a(r, {
40
+ variant: "destructive",
41
+ "data-testid": "board-migration-unsupported",
42
+ children: c("bigconsole.dashboards.importFromTool.unsupportedCount", "{{count}} not supported", { count: n.unsupportedCount })
43
+ })
44
+ ]
45
+ }), /* @__PURE__ */ a("p", {
46
+ className: "text-xs text-text-secondary",
47
+ children: c("bigconsole.dashboards.importFromTool.summaryBody", "{{count}} items in \"{{name}}\". Nothing has been created yet.", {
48
+ count: n.totalCount,
49
+ name: n.sourceName
50
+ })
51
+ })]
52
+ }),
53
+ n.warnings.length > 0 && /* @__PURE__ */ a(e, {
54
+ headingLevel: 3,
55
+ tone: "info",
56
+ padding: "compact",
57
+ title: c("bigconsole.dashboards.importFromTool.notesTitle", "Before you import"),
58
+ "data-testid": "board-migration-warnings",
59
+ children: /* @__PURE__ */ a("ul", {
60
+ className: "space-y-1 text-xs",
61
+ children: n.warnings.map((e) => /* @__PURE__ */ a("li", {
62
+ className: "break-words",
63
+ children: e
64
+ }, e))
65
+ })
66
+ }),
67
+ /* @__PURE__ */ a(e, {
68
+ headingLevel: 3,
69
+ padding: "compact",
70
+ title: c("bigconsole.dashboards.importFromTool.itemsTitle", "Cards and filters"),
71
+ "data-testid": "board-migration-items",
72
+ children: /* @__PURE__ */ a("ul", {
73
+ className: "divide-y divide-border-subtle",
74
+ children: n.items.map((e, n) => /* @__PURE__ */ o("li", {
75
+ className: "flex flex-wrap items-start justify-between gap-x-3 gap-y-1 py-2",
76
+ "data-testid": "board-migration-item",
77
+ children: [/* @__PURE__ */ o("div", {
78
+ className: "min-w-0 flex-1",
79
+ children: [
80
+ /* @__PURE__ */ a("p", {
81
+ className: "break-words text-sm font-medium",
82
+ children: e.title
83
+ }),
84
+ /* @__PURE__ */ o("p", {
85
+ className: "text-xs text-text-secondary",
86
+ children: [
87
+ e.sourceType,
88
+ " → ",
89
+ e.targetType,
90
+ e.page ? ` · ${e.page}` : ""
91
+ ]
92
+ }),
93
+ e.reason && /* @__PURE__ */ a("p", {
94
+ className: "mt-1 break-words text-xs text-text-secondary",
95
+ children: e.reason
96
+ })
97
+ ]
98
+ }), /* @__PURE__ */ a(r, {
99
+ variant: t(e.status),
100
+ children: l(e.status)
101
+ })]
102
+ }, `${e.kind}-${e.page ?? ""}-${e.title}-${n}`))
103
+ })
104
+ }),
105
+ n.dataNeeds.length > 0 && /* @__PURE__ */ a(e, {
106
+ headingLevel: 3,
107
+ tone: "warning",
108
+ padding: "compact",
109
+ title: c("bigconsole.dashboards.importFromTool.dataNeedsTitle", "Widgets that need a data source ({{count}})", { count: n.dataNeeds.length }),
110
+ description: c("bigconsole.dashboards.importFromTool.dataNeedsBody", "BigConsole does not copy data. After the import, connect each widget to a data sink. The original query is kept on the widget for reference."),
111
+ "data-testid": "board-migration-data-needs",
112
+ children: /* @__PURE__ */ a("ul", {
113
+ className: "space-y-2 text-xs",
114
+ children: n.dataNeeds.map((e, t) => /* @__PURE__ */ o("li", {
115
+ className: "min-w-0",
116
+ children: [/* @__PURE__ */ o("p", {
117
+ className: "break-words font-medium",
118
+ children: [
119
+ e.widgetTitle,
120
+ " ",
121
+ /* @__PURE__ */ o("span", {
122
+ className: "font-normal text-text-secondary",
123
+ children: ["· ", e.page]
124
+ })
125
+ ]
126
+ }), /* @__PURE__ */ a("p", {
127
+ className: "line-clamp-2 break-words font-mono text-text-secondary",
128
+ children: e.summary
129
+ })]
130
+ }, `${e.page}-${e.widgetTitle}-${t}`))
131
+ })
132
+ })
133
+ ]
134
+ });
135
+ });
136
+ export { c as BoardMigrationReport, c as default };