@burdenoff/microfe-bigconsole 2026.1118.4 → 2026.1118.6

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 (29) hide show
  1. package/dist/bigconsole/components/explore/CreateQueryWidget.d.ts +5 -0
  2. package/dist/bigconsole/components/explore/CreateQueryWidget.js +192 -0
  3. package/dist/bigconsole/components/explore/QueryResults.d.ts +4 -0
  4. package/dist/bigconsole/components/explore/QueryResults.js +42 -0
  5. package/dist/bigconsole/components/explore/SavedQueryWidget.d.ts +4 -0
  6. package/dist/bigconsole/components/explore/SavedQueryWidget.js +69 -0
  7. package/dist/bigconsole/components/explore/SqlDraftEditor.d.ts +3 -1
  8. package/dist/bigconsole/components/explore/SqlDraftEditor.js +336 -58
  9. package/dist/bigconsole/components/explore/SqlDraftEntry.js +11 -11
  10. package/dist/bigconsole/components/explore/VisualBuilder.d.ts +14 -0
  11. package/dist/bigconsole/components/explore/VisualBuilder.js +283 -0
  12. package/dist/bigconsole/components/explore/useExploreRun.d.ts +32 -0
  13. package/dist/bigconsole/components/explore/useExploreRun.js +104 -0
  14. package/dist/bigconsole/components/explore/visualSql.d.ts +49 -0
  15. package/dist/bigconsole/components/explore/visualSql.js +95 -0
  16. package/dist/bigconsole/components/insights/BoardLintPanel.d.ts +28 -0
  17. package/dist/bigconsole/components/insights/BoardLintPanel.js +171 -0
  18. package/dist/bigconsole/components/insights/DraftCheckDialog.d.ts +9 -3
  19. package/dist/bigconsole/components/insights/DraftCheckDialog.js +53 -146
  20. package/dist/bigconsole/components/widgets/WidgetWrapper.js +237 -228
  21. package/dist/bigconsole/hooks/useWidgetOperations.js +1 -0
  22. package/dist/bigconsole/pages/InsightsPage.js +305 -274
  23. package/dist/bigconsole/types/index.d.ts +1 -0
  24. package/dist/bigconsole/utils/boardLint.d.ts +5 -0
  25. package/dist/bigconsole/utils/boardLint.js +4 -1
  26. package/dist/generated/wspace-operations.d.ts +143 -0
  27. package/dist/generated/wspace-operations.js +1127 -73
  28. package/dist/generated/wspace-types.d.ts +93 -0
  29. package/package.json +1 -1
@@ -0,0 +1,171 @@
1
+ import { Section as e } from "../common/Section.js";
2
+ import "../common/index.js";
3
+ import { lintBoard as t, lintTone as n, planLintFix as r } from "../../utils/boardLint.js";
4
+ import { memo as i, useEffect as a, useMemo as o, useState as s } from "react";
5
+ import { CheckCircle as c, Info as l, TriangleAlert as u } from "lucide-react";
6
+ import { Button as d } from "@burdenoff/fe-libs/ui";
7
+ import { useI18n as f } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
8
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
9
+ // src/bigconsole/components/insights/BoardLintPanel.tsx
10
+ var h = {
11
+ success: /* @__PURE__ */ p(c, { className: "size-4" }),
12
+ info: /* @__PURE__ */ p(l, { className: "size-4" }),
13
+ warning: /* @__PURE__ */ p(u, { className: "size-4" })
14
+ }, g = i(function({ spec: i, onApplyFix: c, onUndoFix: l, applied: u, onAppliedChange: g }) {
15
+ let { t: _ } = f(), v = o(() => i ? t(i, { draft: !0 }) : [], [i]), y = n(v), [b, x] = s(null), [S, C] = s(null), [w, T] = s(null), [E, D] = s(null), O = g !== void 0, k = O ? u ?? null : E, A = O ? g : D;
16
+ a(() => {
17
+ x(null), T(null), O || D(null);
18
+ }, [i, O]);
19
+ let j = o(() => {
20
+ let e = b === null ? void 0 : v[b];
21
+ return i && e ? r(i, e) : null;
22
+ }, [
23
+ i,
24
+ b,
25
+ v
26
+ ]), M = async () => {
27
+ if (j && c && !k) {
28
+ C("apply"), T(null);
29
+ try {
30
+ let e = await c(j);
31
+ x(null), e && A({
32
+ generationId: e,
33
+ summary: j.summary
34
+ });
35
+ } catch (e) {
36
+ T(e instanceof Error ? e.message : String(e));
37
+ } finally {
38
+ C(null);
39
+ }
40
+ }
41
+ };
42
+ return i ? /* @__PURE__ */ m(e, {
43
+ headingLevel: 3,
44
+ tone: y,
45
+ padding: "compact",
46
+ icon: h[y],
47
+ title: v.length === 0 ? _("bigconsole.analysis.boardLint.cleanTitle", "No chart-quality problems found") : _("bigconsole.analysis.boardLint.issuesTitle", "{{count}} chart-quality note{{plural}}", {
48
+ count: v.length,
49
+ plural: v.length === 1 ? "" : "s"
50
+ }),
51
+ description: _("bigconsole.analysis.boardLint.description", "A quick review of axes, colours and labels. These do not block creating the dashboard."),
52
+ "data-testid": "board-lint",
53
+ children: [
54
+ k && /* @__PURE__ */ m("div", {
55
+ role: "status",
56
+ "data-testid": "board-lint-applied",
57
+ style: {
58
+ padding: "var(--space-controlGap)",
59
+ borderRadius: "var(--radius-input)",
60
+ border: "1px solid var(--color-border-subtle)",
61
+ backgroundColor: "var(--color-bg-surface)",
62
+ fontSize: "var(--font-size-body-sm)",
63
+ color: "var(--color-text-primary)"
64
+ },
65
+ children: [/* @__PURE__ */ p("p", { children: _("bigconsole.analysis.boardLint.appliedNote", "Created a refined copy with this change: {{summary}} Your original draft is unchanged.", { summary: k.summary }) }), l && /* @__PURE__ */ p("div", {
66
+ style: { marginTop: "var(--space-controlGap)" },
67
+ children: /* @__PURE__ */ p(d, {
68
+ type: "button",
69
+ size: "sm",
70
+ variant: "outline",
71
+ onClick: async () => {
72
+ if (k && l) {
73
+ C("undo"), T(null);
74
+ try {
75
+ await l(k.generationId), A(null);
76
+ } catch (e) {
77
+ T(e instanceof Error ? e.message : String(e));
78
+ } finally {
79
+ C(null);
80
+ }
81
+ }
82
+ },
83
+ disabled: S !== null,
84
+ "data-testid": "board-lint-undo",
85
+ children: S === "undo" ? _("bigconsole.analysis.boardLint.undoing", "Undoing…") : _("bigconsole.analysis.boardLint.undo", "Undo")
86
+ })
87
+ })]
88
+ }),
89
+ w && b === null && /* @__PURE__ */ p("p", {
90
+ role: "alert",
91
+ style: { color: "var(--color-status-danger-text, var(--color-text-primary))" },
92
+ children: w
93
+ }),
94
+ v.length > 0 && /* @__PURE__ */ p("ul", {
95
+ className: "space-y-2",
96
+ "data-testid": "board-lint-findings",
97
+ children: v.map((e, t) => /* @__PURE__ */ m("li", {
98
+ "data-rule": e.ruleId,
99
+ style: {
100
+ padding: "var(--space-controlGap)",
101
+ borderRadius: "var(--radius-input)",
102
+ border: "1px solid var(--color-border-subtle)",
103
+ backgroundColor: "var(--color-bg-surface)",
104
+ fontSize: "var(--font-size-body-sm)",
105
+ color: "var(--color-text-primary)"
106
+ },
107
+ children: [
108
+ _(`bigconsole.analysis.boardLint.rule.${e.ruleId}`, e.message),
109
+ c && e.fixable && b !== t && !k && /* @__PURE__ */ p("div", {
110
+ style: { marginTop: "var(--space-controlGap)" },
111
+ children: /* @__PURE__ */ p(d, {
112
+ type: "button",
113
+ size: "sm",
114
+ variant: "outline",
115
+ onClick: () => {
116
+ T(null), x(t);
117
+ },
118
+ disabled: S !== null,
119
+ "data-testid": "board-lint-fix",
120
+ children: _("bigconsole.analysis.boardLint.fixIt", "Fix it")
121
+ })
122
+ }),
123
+ b === t && j && /* @__PURE__ */ m("div", {
124
+ "data-testid": "board-lint-preview",
125
+ style: {
126
+ marginTop: "var(--space-controlGap)",
127
+ color: "var(--color-text-muted)"
128
+ },
129
+ children: [
130
+ /* @__PURE__ */ m("p", { children: [
131
+ /* @__PURE__ */ m("span", {
132
+ style: { fontWeight: "var(--font-weight-semibold)" },
133
+ children: [_("bigconsole.analysis.boardLint.previewLabel", "Proposed change"), ":"]
134
+ }),
135
+ " ",
136
+ j.summary
137
+ ] }),
138
+ /* @__PURE__ */ p("p", { children: _("bigconsole.analysis.boardLint.previewNote", "This creates a refined copy of the draft. Your current draft stays as it is, and you can undo it.") }),
139
+ w && /* @__PURE__ */ p("p", {
140
+ role: "alert",
141
+ style: { color: "var(--color-status-danger-text, var(--color-text-primary))" },
142
+ children: w
143
+ }),
144
+ /* @__PURE__ */ m("div", {
145
+ className: "flex gap-2",
146
+ style: { marginTop: "var(--space-controlGap)" },
147
+ children: [/* @__PURE__ */ p(d, {
148
+ type: "button",
149
+ size: "sm",
150
+ onClick: M,
151
+ disabled: S !== null,
152
+ "data-testid": "board-lint-apply",
153
+ children: S === "apply" ? _("bigconsole.analysis.boardLint.applying", "Creating…") : _("bigconsole.analysis.boardLint.apply", "Create refined draft")
154
+ }), /* @__PURE__ */ p(d, {
155
+ type: "button",
156
+ size: "sm",
157
+ variant: "outline",
158
+ onClick: () => x(null),
159
+ disabled: S !== null,
160
+ children: _("bigconsole.analysis.boardLint.cancel", "Cancel")
161
+ })]
162
+ })
163
+ ]
164
+ })
165
+ ]
166
+ }, `${e.ruleId}-${e.pageIndex}-${e.widgetIndex}-${t}`))
167
+ })
168
+ ]
169
+ }) : null;
170
+ });
171
+ export { g as BoardLintPanel, g as default };
@@ -1,16 +1,22 @@
1
1
  import { FC } from 'react';
2
2
  import { GeneratedDashboardSpecLike } from '../../utils/consoleDefinition';
3
3
  import { LintFix } from '../../utils/boardLint';
4
+ import { AppliedLintFix } from './BoardLintPanel';
4
5
  export interface DraftCheckDialogProps {
5
6
  open: boolean;
6
7
  onClose: () => void;
7
8
  /** The generated proposal being checked. */
8
9
  spec: GeneratedDashboardSpecLike | null;
9
10
  /**
10
- * Applies one Board Lint fix as a refined copy of the draft (the original is never changed).
11
- * When omitted, findings are listed without a "Fix it" action.
11
+ * Applies one Board Lint fix as a refined copy of the draft (the original is never changed) and
12
+ * returns the new generation's id. When omitted, findings are listed without a "Fix it" action.
12
13
  */
13
- onApplyFix?: (fix: LintFix) => Promise<void>;
14
+ onApplyFix?: (fix: LintFix) => Promise<string | null>;
15
+ /** Removes a refined copy created by `onApplyFix`. When omitted, no Undo link is shown. */
16
+ onUndoFix?: (generationId: string) => Promise<void>;
17
+ /** Shared refined-copy state for this draft (see BoardLintPanel); lets the dialog and the preview agree. */
18
+ appliedFix?: AppliedLintFix | null;
19
+ onAppliedFixChange?: (applied: AppliedLintFix | null) => void;
14
20
  }
15
21
  export declare const DraftCheckDialog: FC<DraftCheckDialogProps>;
16
22
  export default DraftCheckDialog;
@@ -2,53 +2,38 @@ import { BigConsoleValidateConsoleDefinitionDocument as e } from "../../../gener
2
2
  import { Section as t } from "../common/Section.js";
3
3
  import "../common/index.js";
4
4
  import { buildConsoleDefinition as n } from "../../utils/consoleDefinition.js";
5
- import { lintBoard as r, planLintFix as i } from "../../utils/boardLint.js";
6
- import { memo as a, useEffect as o, useMemo as s, useState as c } from "react";
7
- import { CheckCircle as l, Loader2 as u, TriangleAlert as d, XCircle as f } from "lucide-react";
8
- import { Button as p, Dialog as m, DialogContent as h, DialogDescription as g, DialogHeader as _, DialogTitle as v } from "@burdenoff/fe-libs/ui";
9
- import { useI18n as y } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
10
- import { useLazyQuery as b } from "@apollo/client/react";
11
- import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
5
+ import { BoardLintPanel as r } from "./BoardLintPanel.js";
6
+ import { memo as i, useEffect as a, useState as o } from "react";
7
+ import { CheckCircle as s, Loader2 as c, XCircle as l } from "lucide-react";
8
+ import { Dialog as u, DialogContent as d, DialogDescription as f, DialogHeader as p, DialogTitle as m } from "@burdenoff/fe-libs/ui";
9
+ import { useI18n as h } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
10
+ import { useLazyQuery as g } from "@apollo/client/react";
11
+ import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
12
12
  // src/bigconsole/components/insights/DraftCheckDialog.tsx
13
- var w = a(function({ open: a, onClose: w, spec: T, onApplyFix: E }) {
14
- let { t: D } = y(), [O, k] = c(null), [A, j] = c(null), M = s(() => T ? r(T, { draft: !0 }) : [], [T]), [N, P] = c(null), [F, I] = c(!1), [L, R] = c(null), z = s(() => T && N !== null && M[N] ? i(T, M[N]) : null, [
15
- T,
16
- N,
17
- M
18
- ]), B = async () => {
19
- if (z && E) {
20
- I(!0), R(null);
21
- try {
22
- await E(z), P(null), w();
23
- } catch (e) {
24
- R(e instanceof Error ? e.message : String(e));
25
- } finally {
26
- I(!1);
27
- }
28
- }
29
- }, [V, { loading: H }] = b(e, { fetchPolicy: "no-cache" });
30
- return o(() => {
31
- a && T && (k(null), j(null), P(null), R(null), V({ variables: { definition: n(T) } }).then((e) => {
32
- e.data && k(e.data.validateConsoleDefinition.errors);
13
+ var b = i(function({ open: i, onClose: b, spec: x, onApplyFix: S, onUndoFix: C, appliedFix: w, onAppliedFixChange: T }) {
14
+ let { t: E } = h(), [D, O] = o(null), [k, A] = o(null), [j, { loading: M }] = g(e, { fetchPolicy: "no-cache" });
15
+ return a(() => {
16
+ i && x && (O(null), A(null), j({ variables: { definition: n(x) } }).then((e) => {
17
+ e.data && O(e.data.validateConsoleDefinition.errors);
33
18
  }).catch((e) => {
34
- j(e instanceof Error ? e.message : String(e));
19
+ A(e instanceof Error ? e.message : String(e));
35
20
  }));
36
21
  }, [
37
- a,
38
- T,
39
- V
40
- ]), /* @__PURE__ */ S(m, {
41
- open: a,
42
- onOpenChange: (e) => !e && !H && w(),
43
- children: /* @__PURE__ */ C(h, {
22
+ i,
23
+ x,
24
+ j
25
+ ]), /* @__PURE__ */ v(u, {
26
+ open: i,
27
+ onOpenChange: (e) => !e && !M && b(),
28
+ children: /* @__PURE__ */ y(d, {
44
29
  className: "sm:max-w-lg flex max-h-[calc(100dvh-3rem)] flex-col overflow-hidden",
45
- children: [/* @__PURE__ */ C(_, {
30
+ children: [/* @__PURE__ */ y(p, {
46
31
  className: "shrink-0",
47
- children: [/* @__PURE__ */ C(v, { children: [D("bigconsole.analysis.draftCheck.title", "Draft check"), T ? ` — ${T.name}` : ""] }), /* @__PURE__ */ S(g, { children: D("bigconsole.analysis.draftCheck.description", "The proposal is validated against the Console Definition contract. Fix flagged issues by refining the draft before creating the dashboard.") })]
48
- }), /* @__PURE__ */ C("div", {
32
+ children: [/* @__PURE__ */ y(m, { children: [E("bigconsole.analysis.draftCheck.title", "Draft check"), x ? ` — ${x.name}` : ""] }), /* @__PURE__ */ v(f, { children: E("bigconsole.analysis.draftCheck.description", "The proposal is validated against the Console Definition contract. Fix flagged issues by refining the draft before creating the dashboard.") })]
33
+ }), /* @__PURE__ */ y("div", {
49
34
  className: "min-h-0 flex-1 overflow-y-auto py-4 space-y-4",
50
35
  children: [
51
- H && /* @__PURE__ */ C("div", {
36
+ M && /* @__PURE__ */ y("div", {
52
37
  style: {
53
38
  display: "flex",
54
39
  minHeight: "6rem",
@@ -58,53 +43,53 @@ var w = a(function({ open: a, onClose: w, spec: T, onApplyFix: E }) {
58
43
  gap: "var(--space-controlGap)",
59
44
  color: "var(--color-text-muted)"
60
45
  },
61
- children: [/* @__PURE__ */ S(u, {
46
+ children: [/* @__PURE__ */ v(c, {
62
47
  size: 24,
63
48
  className: "animate-spin",
64
49
  "aria-hidden": "true"
65
- }), /* @__PURE__ */ S("p", {
50
+ }), /* @__PURE__ */ v("p", {
66
51
  style: { fontSize: "var(--font-size-body-sm)" },
67
- children: D("bigconsole.analysis.draftCheck.checking", "Checking the draft…")
52
+ children: E("bigconsole.analysis.draftCheck.checking", "Checking the draft…")
68
53
  })]
69
54
  }),
70
- A && !H && /* @__PURE__ */ S(t, {
55
+ k && !M && /* @__PURE__ */ v(t, {
71
56
  headingLevel: 3,
72
57
  tone: "danger",
73
58
  padding: "compact",
74
- icon: /* @__PURE__ */ S(f, { className: "size-4" }),
75
- title: D("bigconsole.analysis.draftCheck.failedTitle", "Draft check failed"),
76
- description: A,
59
+ icon: /* @__PURE__ */ v(l, { className: "size-4" }),
60
+ title: E("bigconsole.analysis.draftCheck.failedTitle", "Draft check failed"),
61
+ description: k,
77
62
  "data-testid": "draft-check-error"
78
63
  }),
79
- O && !H && !A && /* @__PURE__ */ S(x, { children: O.length === 0 ? /* @__PURE__ */ S(t, {
64
+ D && !M && !k && /* @__PURE__ */ v(_, { children: D.length === 0 ? /* @__PURE__ */ v(t, {
80
65
  headingLevel: 3,
81
66
  tone: "success",
82
67
  padding: "compact",
83
- icon: /* @__PURE__ */ S(l, { className: "size-4" }),
84
- title: D("bigconsole.analysis.draftCheck.cleanTitle", "Draft is structurally sound"),
85
- description: D("bigconsole.analysis.draftCheck.cleanDescription", "The proposal satisfies the Console Definition v2.0 contract — pages, widget types and titles all check out."),
68
+ icon: /* @__PURE__ */ v(s, { className: "size-4" }),
69
+ title: E("bigconsole.analysis.draftCheck.cleanTitle", "Draft is structurally sound"),
70
+ description: E("bigconsole.analysis.draftCheck.cleanDescription", "The proposal satisfies the Console Definition v2.0 contract — pages, widget types and titles all check out."),
86
71
  "data-testid": "draft-check-clean"
87
- }) : /* @__PURE__ */ S(t, {
72
+ }) : /* @__PURE__ */ v(t, {
88
73
  headingLevel: 3,
89
74
  tone: "danger",
90
75
  padding: "compact",
91
- icon: /* @__PURE__ */ S(f, { className: "size-4" }),
92
- title: D("bigconsole.analysis.draftCheck.issuesTitle", "{{count}} issue{{plural}} found", {
93
- count: O.length,
94
- plural: O.length === 1 ? "" : "s"
76
+ icon: /* @__PURE__ */ v(l, { className: "size-4" }),
77
+ title: E("bigconsole.analysis.draftCheck.issuesTitle", "{{count}} issue{{plural}} found", {
78
+ count: D.length,
79
+ plural: D.length === 1 ? "" : "s"
95
80
  }),
96
- description: D("bigconsole.analysis.draftCheck.issuesDescription", "Each issue points at the exact location in the draft. Refine the generation and check again."),
81
+ description: E("bigconsole.analysis.draftCheck.issuesDescription", "Each issue points at the exact location in the draft. Refine the generation and check again."),
97
82
  "data-testid": "draft-check-issues",
98
- children: /* @__PURE__ */ S("ul", {
83
+ children: /* @__PURE__ */ v("ul", {
99
84
  className: "space-y-2",
100
- children: O.map((e, t) => /* @__PURE__ */ C("li", {
85
+ children: D.map((e, t) => /* @__PURE__ */ y("li", {
101
86
  style: {
102
87
  padding: "var(--space-controlGap)",
103
88
  borderRadius: "var(--radius-input)",
104
89
  border: "1px solid var(--color-border-subtle)",
105
90
  backgroundColor: "var(--color-bg-surface)"
106
91
  },
107
- children: [/* @__PURE__ */ S("span", {
92
+ children: [/* @__PURE__ */ v("span", {
108
93
  style: {
109
94
  display: "block",
110
95
  fontFamily: "var(--font-family-mono, monospace)",
@@ -113,13 +98,13 @@ var w = a(function({ open: a, onClose: w, spec: T, onApplyFix: E }) {
113
98
  wordBreak: "break-all"
114
99
  },
115
100
  children: e.path
116
- }), /* @__PURE__ */ C("span", {
101
+ }), /* @__PURE__ */ y("span", {
117
102
  style: {
118
103
  fontSize: "var(--font-size-body-sm)",
119
104
  color: "var(--color-text-primary)"
120
105
  },
121
106
  children: [
122
- /* @__PURE__ */ C("span", {
107
+ /* @__PURE__ */ y("span", {
123
108
  style: { fontWeight: "var(--font-weight-semibold)" },
124
109
  children: [
125
110
  "[",
@@ -134,94 +119,16 @@ var w = a(function({ open: a, onClose: w, spec: T, onApplyFix: E }) {
134
119
  }, `${e.path}-${e.code}-${t}`))
135
120
  })
136
121
  }) }),
137
- !H && T && /* @__PURE__ */ S(t, {
138
- headingLevel: 3,
139
- tone: M.length === 0 ? "success" : "warning",
140
- padding: "compact",
141
- icon: M.length === 0 ? /* @__PURE__ */ S(l, { className: "size-4" }) : /* @__PURE__ */ S(d, { className: "size-4" }),
142
- title: M.length === 0 ? D("bigconsole.analysis.boardLint.cleanTitle", "No chart-quality problems found") : D("bigconsole.analysis.boardLint.issuesTitle", "{{count}} chart-quality note{{plural}}", {
143
- count: M.length,
144
- plural: M.length === 1 ? "" : "s"
145
- }),
146
- description: D("bigconsole.analysis.boardLint.description", "A quick review of axes, colours and labels. These do not block creating the dashboard."),
147
- "data-testid": "board-lint",
148
- children: M.length > 0 && /* @__PURE__ */ S("ul", {
149
- className: "space-y-2",
150
- "data-testid": "board-lint-findings",
151
- children: M.map((e, t) => /* @__PURE__ */ C("li", {
152
- "data-rule": e.ruleId,
153
- style: {
154
- padding: "var(--space-controlGap)",
155
- borderRadius: "var(--radius-input)",
156
- border: "1px solid var(--color-border-subtle)",
157
- backgroundColor: "var(--color-bg-surface)",
158
- fontSize: "var(--font-size-body-sm)",
159
- color: "var(--color-text-primary)"
160
- },
161
- children: [
162
- D(`bigconsole.analysis.boardLint.rule.${e.ruleId}`, e.message),
163
- E && e.fixable && N !== t && /* @__PURE__ */ S("div", {
164
- style: { marginTop: "var(--space-controlGap)" },
165
- children: /* @__PURE__ */ S(p, {
166
- type: "button",
167
- size: "sm",
168
- variant: "outline",
169
- onClick: () => {
170
- R(null), P(t);
171
- },
172
- "data-testid": "board-lint-fix",
173
- children: D("bigconsole.analysis.boardLint.fixIt", "Fix it")
174
- })
175
- }),
176
- N === t && z && /* @__PURE__ */ C("div", {
177
- "data-testid": "board-lint-preview",
178
- style: {
179
- marginTop: "var(--space-controlGap)",
180
- color: "var(--color-text-muted)"
181
- },
182
- children: [
183
- /* @__PURE__ */ C("p", { children: [
184
- /* @__PURE__ */ C("span", {
185
- style: { fontWeight: "var(--font-weight-semibold)" },
186
- children: [D("bigconsole.analysis.boardLint.previewLabel", "Proposed change"), ":"]
187
- }),
188
- " ",
189
- z.summary
190
- ] }),
191
- /* @__PURE__ */ S("p", { children: D("bigconsole.analysis.boardLint.previewNote", "This creates a refined copy of the draft. Your current draft stays as it is.") }),
192
- L && /* @__PURE__ */ S("p", {
193
- role: "alert",
194
- style: { color: "var(--color-status-danger-text, var(--color-text-primary))" },
195
- children: L
196
- }),
197
- /* @__PURE__ */ C("div", {
198
- className: "flex gap-2",
199
- style: { marginTop: "var(--space-controlGap)" },
200
- children: [/* @__PURE__ */ S(p, {
201
- type: "button",
202
- size: "sm",
203
- onClick: B,
204
- disabled: F,
205
- "data-testid": "board-lint-apply",
206
- children: F ? D("bigconsole.analysis.boardLint.applying", "Creating…") : D("bigconsole.analysis.boardLint.apply", "Create refined draft")
207
- }), /* @__PURE__ */ S(p, {
208
- type: "button",
209
- size: "sm",
210
- variant: "outline",
211
- onClick: () => P(null),
212
- disabled: F,
213
- children: D("bigconsole.analysis.boardLint.cancel", "Cancel")
214
- })]
215
- })
216
- ]
217
- })
218
- ]
219
- }, `${e.ruleId}-${e.pageIndex}-${e.widgetIndex}-${t}`))
220
- })
122
+ !M && x && /* @__PURE__ */ v(r, {
123
+ spec: x,
124
+ onApplyFix: S,
125
+ onUndoFix: C,
126
+ applied: w,
127
+ onAppliedChange: T
221
128
  })
222
129
  ]
223
130
  })]
224
131
  })
225
132
  });
226
133
  });
227
- export { w as DraftCheckDialog, w as default };
134
+ export { b as DraftCheckDialog, b as default };