@paro.io/expert-shared-components 1.14.66 → 1.14.67
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.
- package/lib/components/DocumentCenter/MultiFileUploadSection.js +220 -121
- package/lib/components/TaxAxis/TaxAxisApi.d.ts +0 -1
- package/lib/components/TaxAxis/TaxAxisShell.js +5 -80
- package/lib/components/shared/UploadClient.d.ts +2 -1
- package/lib/components/shared/UploadClient.js +6 -2
- package/lib/index.d.ts +1 -13
- package/lib/index.js +1 -27
- package/lib/tax-axis/components/clientReport/ExecutiveSummary.d.ts +4 -1
- package/lib/tax-axis/components/clientReport/ExecutiveSummary.js +10 -6
- package/lib/tax-axis/components/clientReport/Methodology.js +2 -2
- package/lib/tax-axis/components/clientReport/RecommendedStrategies.d.ts +6 -1
- package/lib/tax-axis/components/clientReport/RecommendedStrategies.js +26 -24
- package/lib/tax-axis/components/clientReport/StrategyCard.d.ts +1 -1
- package/lib/tax-axis/components/clientReport/StrategyCard.js +39 -23
- package/lib/tax-axis/components/clientReport/TaxAxisClientReport.d.ts +5 -2
- package/lib/tax-axis/components/clientReport/TaxAxisClientReport.js +9 -7
- package/lib/tax-axis/components/dashboard/DashboardActions.js +6 -5
- package/lib/tax-axis/components/dashboard/DashboardSummary.d.ts +6 -1
- package/lib/tax-axis/components/dashboard/DashboardSummary.js +19 -10
- package/lib/tax-axis/components/dashboard/StrategyDetailPanel.d.ts +1 -1
- package/lib/tax-axis/components/dashboard/StrategyDetailPanel.js +122 -95
- package/lib/tax-axis/components/dashboard/TaxAxisDashboard.d.ts +58 -4
- package/lib/tax-axis/components/dashboard/TaxAxisDashboard.js +375 -56
- package/lib/tax-axis/components/documents/DocumentCard.d.ts +6 -3
- package/lib/tax-axis/components/documents/DocumentCard.js +72 -15
- package/lib/tax-axis/components/documents/DocumentReviewModal.d.ts +3 -2
- package/lib/tax-axis/components/documents/DocumentReviewModal.js +109 -295
- package/lib/tax-axis/components/documents/DocumentTier.d.ts +5 -4
- package/lib/tax-axis/components/documents/DocumentTier.js +2 -2
- package/lib/tax-axis/components/documents/TaxAxisDocuments.d.ts +28 -8
- package/lib/tax-axis/components/documents/TaxAxisDocuments.js +335 -172
- package/lib/tax-axis/components/documents/qbo/QboAvailableReportsModal.d.ts +13 -0
- package/lib/tax-axis/components/documents/qbo/QboAvailableReportsModal.js +180 -0
- package/lib/tax-axis/components/documents/qbo/QboClientSelectorModal.d.ts +10 -0
- package/lib/tax-axis/components/documents/qbo/QboClientSelectorModal.js +155 -0
- package/lib/tax-axis/components/documents/qbo/QboConnectBanner.d.ts +9 -0
- package/lib/tax-axis/components/documents/qbo/QboConnectBanner.js +55 -0
- package/lib/tax-axis/components/documents/qbo/QboDocumentMappingModal.d.ts +10 -0
- package/lib/tax-axis/components/documents/qbo/QboDocumentMappingModal.js +202 -0
- package/lib/tax-axis/components/documents/qbo/QboImportingModal.d.ts +8 -0
- package/lib/tax-axis/components/documents/qbo/QboImportingModal.js +75 -0
- package/lib/tax-axis/components/documents/qbo/QboPermissionsModal.d.ts +8 -0
- package/lib/tax-axis/components/documents/qbo/QboPermissionsModal.js +126 -0
- package/lib/tax-axis/components/documents/qbo/index.d.ts +8 -0
- package/lib/tax-axis/components/documents/qbo/index.js +17 -0
- package/lib/tax-axis/components/documents/qbo/qboConstants.d.ts +24 -0
- package/lib/tax-axis/components/documents/qbo/qboConstants.js +71 -0
- package/lib/tax-axis/components/documents/qbo/types.d.ts +43 -0
- package/lib/tax-axis/components/documents/qbo/types.js +3 -0
- package/lib/tax-axis/components/documents/qbo/useQboFlow.d.ts +19 -0
- package/lib/tax-axis/components/documents/qbo/useQboFlow.js +207 -0
- package/lib/tax-axis/components/intake/ClientParametersSection.js +14 -30
- package/lib/tax-axis/components/intake/CpaIntakeQuestionsSection.js +3 -3
- package/lib/tax-axis/components/intake/IntakeCtaCards.d.ts +1 -2
- package/lib/tax-axis/components/intake/IntakeCtaCards.js +6 -13
- package/lib/tax-axis/components/intake/RefineAnalysisSection.js +7 -7
- package/lib/tax-axis/components/intake/TaxAxisIntake.js +7 -95
- package/lib/tax-axis/components/intake/intakeSchema.d.ts +0 -3
- package/lib/tax-axis/components/intake/intakeSchema.js +2 -4
- package/lib/tax-axis/components/preparerWorkpaper/TaxAxisPreparerWorkpaper.d.ts +23 -4
- package/lib/tax-axis/components/preparerWorkpaper/TaxAxisPreparerWorkpaper.js +15 -4
- package/lib/tax-axis/components/processing/TaxAxisProcessing.d.ts +2 -1
- package/lib/tax-axis/components/processing/TaxAxisProcessing.js +102 -31
- package/lib/tax-axis/components/prospectReport/ProspectPrintView.js +0 -2
- package/lib/tax-axis/components/prospectReport/ProspectStrategyCard.d.ts +1 -8
- package/lib/tax-axis/components/prospectReport/ProspectStrategyCard.js +5 -5
- package/lib/tax-axis/components/prospectReport/TaxAxisProspectReport.d.ts +1 -27
- package/lib/tax-axis/components/prospectReport/TaxAxisProspectReport.js +25 -43
- package/lib/tax-axis/index.d.ts +3 -1
- package/lib/tax-axis/index.js +4 -3
- package/lib/tax-axis/lib/adapters/useEngineOutput.d.ts +138 -13
- package/lib/tax-axis/lib/adapters/useEngineOutput.js +156 -7
- package/lib/tax-axis/lib/data/documents.d.ts +3 -2
- package/lib/tax-axis/lib/data/documents.js +225 -25
- package/lib/tax-axis/lib/data/strategies.js +9 -9
- package/lib/tax-axis/lib/documentFieldCatalog.d.ts +7 -12
- package/lib/tax-axis/lib/documentFieldCatalog.js +805 -8
- package/lib/tax-axis/lib/types/index.d.ts +13 -1
- package/package.json +1 -1
- package/lib/README.md +0 -2
- package/lib/package.json +0 -68
|
@@ -5,46 +5,120 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.StrategyDetailPanel = StrategyDetailPanel;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const data_1 = require("../../lib/data");
|
|
9
8
|
const TaxAxisBadge_1 = require("../shared/TaxAxisBadge");
|
|
10
|
-
function Sec({ title, children }) {
|
|
9
|
+
function Sec({ title, children, titleColor }) {
|
|
11
10
|
return (react_1.default.createElement("div", { className: "mb-6" },
|
|
12
|
-
react_1.default.createElement("div", { className: "text-[11px] font-bold
|
|
11
|
+
react_1.default.createElement("div", { className: "text-[11px] font-bold uppercase tracking-widest mb-2.5 font-tax-axis-mono", style: { color: titleColor || "#A1E5E6" } }, title),
|
|
13
12
|
children));
|
|
14
13
|
}
|
|
15
14
|
const fmtK = (n) => `$${(n / 1000).toFixed(n % 1000 ? 1 : 0)}K`;
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
function positionStrengthLabel(positionStrength) {
|
|
16
|
+
if (!positionStrength)
|
|
17
|
+
return { label: "Position Under Review", color: "#9498B8", dots: 2 };
|
|
18
|
+
const p = positionStrength.toUpperCase();
|
|
19
|
+
if (p.includes("SUBSTANTIAL"))
|
|
20
|
+
return { label: "Substantial Authority · Low §6694 Risk", color: "#0F6E56", dots: 4 };
|
|
21
|
+
if (p.includes("REASONABLE"))
|
|
22
|
+
return { label: "Reasonable Basis · Elevated §6694 Risk", color: "#FB9A1D", dots: 3 };
|
|
23
|
+
if (p.includes("DISCLOSURE") || p.includes("NEEDS_DISCLOSURE"))
|
|
24
|
+
return { label: "Needs Disclosure · High §6694 Risk", color: "#EF4444", dots: 2 };
|
|
25
|
+
return { label: positionStrength, color: "#9498B8", dots: 2 };
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Split engagement_recommendation at the implementation/action boundary.
|
|
29
|
+
*
|
|
30
|
+
* The LLM writes engagement_recommendation as a single paragraph covering both
|
|
31
|
+
* the savings math AND the CPA implementation steps. We split at the first
|
|
32
|
+
* implementation keyword so the savings math shows under "HOW SAVINGS BREAK DOWN"
|
|
33
|
+
* and the CPA action steps show under "CPA ENGAGEMENT NOTES".
|
|
34
|
+
*
|
|
35
|
+
* Heuristic: split at "Implementation:", "CPA should", "CPA must", or numbered
|
|
36
|
+
* action lists "(1)". If no split point found, entire text goes to savings section.
|
|
37
|
+
*/
|
|
38
|
+
function splitEngagementText(text) {
|
|
39
|
+
if (!text)
|
|
40
|
+
return { savingsSection: "", cpaSection: "" };
|
|
41
|
+
// Try splitting on double-newline first (well-structured LLM output)
|
|
42
|
+
const paraBreak = text.indexOf("\n\n");
|
|
43
|
+
if (paraBreak !== -1) {
|
|
44
|
+
return {
|
|
45
|
+
savingsSection: text.slice(0, paraBreak).trim(),
|
|
46
|
+
cpaSection: text.slice(paraBreak).trim(),
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
// Single-paragraph: find the first implementation boundary
|
|
50
|
+
const splitPatterns = [
|
|
51
|
+
/\s+Implementation:\s+/i,
|
|
52
|
+
/\s+CPA should\s+/i,
|
|
53
|
+
/\s+CPA must\s+/i,
|
|
54
|
+
/\s+To implement:\s+/i,
|
|
55
|
+
/\s+\(1\)\s+/, // numbered list start
|
|
56
|
+
];
|
|
57
|
+
for (const pattern of splitPatterns) {
|
|
58
|
+
const match = text.search(pattern);
|
|
59
|
+
if (match > 80) { // only split if there's meaningful content before it
|
|
60
|
+
return {
|
|
61
|
+
savingsSection: text.slice(0, match).trim(),
|
|
62
|
+
cpaSection: text.slice(match).trim(),
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
// No clean split point — show everything as savings breakdown, nothing as CPA notes
|
|
67
|
+
return { savingsSection: text, cpaSection: "" };
|
|
68
|
+
}
|
|
69
|
+
function SourceDocRows({ docs, trace }) {
|
|
70
|
+
if (docs && docs.length > 0) {
|
|
71
|
+
return (react_1.default.createElement("div", { className: "rounded-[10px] overflow-hidden", style: { border: "1px solid rgba(36,131,132,0.12)" } },
|
|
72
|
+
react_1.default.createElement("div", { className: "grid px-3.5 py-2", style: { background: "#161938", gridTemplateColumns: "1fr auto" } },
|
|
73
|
+
react_1.default.createElement("span", { className: "text-[10px] font-semibold text-tax-axis-text-3 uppercase tracking-wider font-tax-axis-mono" }, "Field \u00B7 Source"),
|
|
74
|
+
react_1.default.createElement("span", { className: "text-[10px] font-semibold text-tax-axis-text-3 uppercase tracking-wider font-tax-axis-mono text-right" }, "Value")),
|
|
75
|
+
docs.map((ref, i) => (react_1.default.createElement("div", { key: i, className: "grid px-3.5 py-2.5 items-center gap-3", style: { gridTemplateColumns: "1fr auto", borderTop: "1px solid rgba(36,131,132,0.08)" } },
|
|
76
|
+
react_1.default.createElement("div", null,
|
|
77
|
+
react_1.default.createElement("div", { className: "text-xs text-tax-axis-text font-tax-axis-body" }, ref.field_label),
|
|
78
|
+
react_1.default.createElement("div", { className: "text-[10px] text-tax-axis-text-3 font-tax-axis-mono mt-0.5" }, ref.source_hint)),
|
|
79
|
+
react_1.default.createElement("div", { className: "text-[13px] font-semibold text-tax-axis-teal-light font-tax-axis-mono text-right whitespace-nowrap" }, ref.value_display))))));
|
|
80
|
+
}
|
|
81
|
+
const traceSteps = trace !== null && trace !== void 0 ? trace : [];
|
|
82
|
+
if (!traceSteps.length) {
|
|
83
|
+
return react_1.default.createElement("p", { className: "text-xs text-tax-axis-text-2 italic" }, "Detailed source mapping not available for this strategy.");
|
|
84
|
+
}
|
|
85
|
+
return (react_1.default.createElement("div", { className: "rounded-[10px] overflow-hidden", style: { border: "1px solid rgba(36,131,132,0.12)" } },
|
|
86
|
+
react_1.default.createElement("div", { className: "grid grid-cols-2 px-3.5 py-2", style: { background: "#161938" } },
|
|
87
|
+
react_1.default.createElement("span", { className: "text-[10px] font-semibold text-tax-axis-text-3 uppercase tracking-wider font-tax-axis-mono" }, "Step"),
|
|
88
|
+
react_1.default.createElement("span", { className: "text-[10px] font-semibold text-tax-axis-text-3 uppercase tracking-wider font-tax-axis-mono text-right" }, "Result")),
|
|
89
|
+
traceSteps.map((t, i) => (react_1.default.createElement("div", { key: i, className: "grid grid-cols-2 px-3.5 py-2.5", style: { borderTop: "1px solid rgba(36,131,132,0.08)" } },
|
|
90
|
+
react_1.default.createElement("div", null,
|
|
91
|
+
react_1.default.createElement("div", { className: "text-xs text-tax-axis-text font-tax-axis-body" }, t.step),
|
|
92
|
+
react_1.default.createElement("div", { className: "text-[10px] text-tax-axis-text-3 font-tax-axis-mono mt-0.5 break-all" }, t.formula)),
|
|
93
|
+
react_1.default.createElement("div", { className: "text-right" },
|
|
94
|
+
react_1.default.createElement("div", { className: "text-[13px] font-semibold text-tax-axis-teal-light font-tax-axis-mono" }, t.result),
|
|
95
|
+
t.src && react_1.default.createElement("div", { className: "text-[9px] text-tax-axis-text-3 font-tax-axis-mono mt-0.5" }, t.src)))))));
|
|
96
|
+
}
|
|
97
|
+
function StrategyDetailPanel({ s, profile: _profile, computed, onClose }) {
|
|
98
|
+
var _a, _b;
|
|
19
99
|
const c = computed === null || computed === void 0 ? void 0 : computed.get(s.rank);
|
|
20
100
|
const lo = (_a = c === null || c === void 0 ? void 0 : c.lo) !== null && _a !== void 0 ? _a : s.lo;
|
|
21
101
|
const hi = (_b = c === null || c === void 0 ? void 0 : c.hi) !== null && _b !== void 0 ? _b : s.hi;
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const whyText = narr ? narr.whyMatters(profile) : data_1.NARRATIVE_FALLBACK.whyMatters(s);
|
|
25
|
-
const breakdownText = narr ? narr.breakdown(profile, c) : data_1.NARRATIVE_FALLBACK.breakdown(s, c);
|
|
26
|
-
const specialistText = (narr === null || narr === void 0 ? void 0 : narr.whySpecialist) || data_1.NARRATIVE_FALLBACK.whySpecialist(s);
|
|
27
|
-
const nextText = narr ? narr.nextSteps : data_1.NARRATIVE_FALLBACK.nextSteps(s);
|
|
102
|
+
const pos = positionStrengthLabel(s.positionStrength);
|
|
103
|
+
const { savingsSection, cpaSection } = splitEngagementText(s.abstract || "");
|
|
28
104
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
29
105
|
react_1.default.createElement("div", { onClick: onClose, className: "fixed inset-0 z-[200]", style: { background: "rgba(6,8,33,0.7)", backdropFilter: "blur(4px)" } }),
|
|
30
|
-
react_1.default.createElement("div", { className: "fixed top-0 right-0 bottom-0 z-[201] flex flex-col", style: {
|
|
31
|
-
width: 520,
|
|
32
|
-
maxWidth: "calc(100vw - 24px)",
|
|
106
|
+
react_1.default.createElement("div", { className: "fixed bottom-0 left-0 right-0 md:top-0 md:left-auto md:right-0 md:bottom-0 z-[201] flex flex-col w-full md:w-[520px] max-h-[85vh] md:max-h-none overflow-y-auto border-t border-tax-axis-border md:border-t-0 md:border-l", style: {
|
|
33
107
|
background: "#0E1132",
|
|
34
|
-
borderLeft: "1px solid rgba(36,131,132,0.12)",
|
|
35
108
|
boxShadow: "-8px 0 40px rgba(6,8,33,0.6)",
|
|
36
109
|
} },
|
|
110
|
+
react_1.default.createElement("div", { className: "w-10 h-1 rounded-full bg-tax-axis-text-4 mx-auto my-2 md:hidden" }),
|
|
37
111
|
react_1.default.createElement("div", { className: "px-6 py-5 flex-shrink-0", style: { borderBottom: "1px solid rgba(36,131,132,0.12)" } },
|
|
38
112
|
react_1.default.createElement("div", { className: "flex justify-between items-start mb-3" },
|
|
39
113
|
react_1.default.createElement("div", null,
|
|
40
|
-
react_1.default.createElement("div", { className: "flex items-center gap-2 mb-1.5" },
|
|
114
|
+
react_1.default.createElement("div", { className: "flex items-center gap-2 mb-1.5 flex-wrap" },
|
|
41
115
|
react_1.default.createElement("span", { className: "text-xl font-bold text-tax-axis-text font-tax-axis-head" }, s.name),
|
|
42
116
|
react_1.default.createElement("span", { className: "text-[11px] font-tax-axis-mono text-tax-axis-teal-light bg-tax-axis-teal-bg px-2 py-0.5 rounded" }, s.code)),
|
|
43
|
-
react_1.default.createElement("div", { className: "flex gap-2" },
|
|
117
|
+
react_1.default.createElement("div", { className: "flex gap-2 flex-wrap" },
|
|
44
118
|
react_1.default.createElement(TaxAxisBadge_1.TaxAxisBadge, null, s.priority),
|
|
45
119
|
react_1.default.createElement(TaxAxisBadge_1.TaxAxisBadge, { color: "neutral" }, s.timeline),
|
|
46
|
-
s.
|
|
47
|
-
react_1.default.createElement("button", { onClick: onClose, className: "flex items-center justify-center w-8 h-8 rounded-lg", style: { background: "#1A1D3A", border: "1px solid rgba(36,131,132,0.12)" } },
|
|
120
|
+
s.quickWin && react_1.default.createElement(TaxAxisBadge_1.TaxAxisBadge, { color: "orange" }, "\u26A1 Quick Win"))),
|
|
121
|
+
react_1.default.createElement("button", { onClick: onClose, className: "flex items-center justify-center w-8 h-8 rounded-lg flex-shrink-0", style: { background: "#1A1D3A", border: "1px solid rgba(36,131,132,0.12)" } },
|
|
48
122
|
react_1.default.createElement("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none" },
|
|
49
123
|
react_1.default.createElement("path", { d: "M2.5 2.5l7 7M9.5 2.5l-7 7", stroke: "#9498B8", strokeWidth: "1.5", strokeLinecap: "round" })))),
|
|
50
124
|
react_1.default.createElement("div", { className: "font-tax-axis-head", style: { fontSize: 34, fontWeight: 900, color: "#A1E5E6", letterSpacing: "-1.5px" } },
|
|
@@ -53,87 +127,40 @@ function StrategyDetailPanel({ s, profile, computed, onClose }) {
|
|
|
53
127
|
fmtK(hi),
|
|
54
128
|
react_1.default.createElement("span", { className: "text-[13px] text-tax-axis-text-3 font-normal font-tax-axis-body ml-2" }, "est. annual savings"))),
|
|
55
129
|
react_1.default.createElement("div", { className: "flex-1 overflow-y-auto p-6" },
|
|
56
|
-
s.warning && (react_1.default.createElement("div", { className: "p-3 rounded-lg mb-6 text-xs leading-relaxed", style: {
|
|
57
|
-
background: "rgba(251,154,29,0.06)",
|
|
58
|
-
border: "1px solid rgba(251,154,29,0.25)",
|
|
59
|
-
color: "#FB9A1D",
|
|
60
|
-
} },
|
|
130
|
+
s.warning && (react_1.default.createElement("div", { className: "p-3 rounded-lg mb-6 text-xs leading-relaxed", style: { background: "rgba(251,154,29,0.06)", border: "1px solid rgba(251,154,29,0.25)", color: "#FB9A1D" } },
|
|
61
131
|
react_1.default.createElement("strong", null, "Flag: "),
|
|
62
132
|
s.warning)),
|
|
63
|
-
react_1.default.createElement(
|
|
64
|
-
react_1.default.createElement("
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
react_1.default.createElement("div", { className: "text-[
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
react_1.default.createElement(
|
|
72
|
-
react_1.default.createElement(
|
|
73
|
-
react_1.default.createElement("div", { className: "
|
|
74
|
-
|
|
75
|
-
react_1.default.createElement(Sec, { title: "
|
|
76
|
-
react_1.default.createElement("p", { className: "text-sm text-tax-axis-text leading-[1.8] font-tax-axis-body" }, s.abstract)),
|
|
77
|
-
react_1.default.createElement(Sec, { title: "Plain Language" },
|
|
78
|
-
react_1.default.createElement("div", { className: "p-3.5 rounded-[10px]", style: { background: "rgba(36,131,132,0.06)", border: "1px solid rgba(36,131,132,0.2)" } },
|
|
79
|
-
react_1.default.createElement("p", { className: "text-sm text-tax-axis-teal-light leading-[1.7] font-tax-axis-body italic" },
|
|
80
|
-
"\u201C",
|
|
81
|
-
s.clientBrief,
|
|
82
|
-
"\u201D"))),
|
|
83
|
-
react_1.default.createElement(Sec, { title: "Source Documents" },
|
|
84
|
-
react_1.default.createElement("div", { className: "rounded-[10px] overflow-hidden", style: { border: "1px solid rgba(36,131,132,0.12)" } },
|
|
85
|
-
react_1.default.createElement("div", { className: "grid grid-cols-[1.2fr_1fr_.8fr_.8fr] px-3.5 py-2.5", style: { background: "#161938" } }, ["Field", "Document", "Line", "Value"].map((h) => (react_1.default.createElement("span", { key: h, className: "text-[10px] font-semibold text-tax-axis-text-3 uppercase tracking-wider font-tax-axis-mono" }, h)))),
|
|
86
|
-
sources.map((src, i) => (react_1.default.createElement("div", { key: i, className: "grid grid-cols-[1.2fr_1fr_.8fr_.8fr] px-3.5 py-2.5", style: { borderTop: "1px solid rgba(36,131,132,0.12)" } },
|
|
87
|
-
react_1.default.createElement("span", { className: "text-xs text-tax-axis-text" }, src.field),
|
|
88
|
-
react_1.default.createElement("span", { className: "text-[11px] font-tax-axis-mono text-tax-axis-text-2" }, src.doc),
|
|
89
|
-
react_1.default.createElement("span", { className: "text-[11px] font-tax-axis-mono text-tax-axis-text-2" }, src.line),
|
|
90
|
-
react_1.default.createElement("span", { className: "text-[13px] font-semibold text-tax-axis-teal-light font-tax-axis-mono" }, src.value)))))),
|
|
91
|
-
react_1.default.createElement(Sec, { title: "Calculation Trace" },
|
|
92
|
-
react_1.default.createElement("div", { className: "rounded-[10px] overflow-hidden", style: { border: "1px solid rgba(36,131,132,0.12)" } },
|
|
93
|
-
trace.map((t, i) => (react_1.default.createElement("div", { key: i, className: "p-3 flex gap-3 items-start", style: { borderTop: i ? "1px solid rgba(36,131,132,0.12)" : "none" } },
|
|
94
|
-
react_1.default.createElement("span", { className: "text-[11px] font-bold text-tax-axis-teal font-tax-axis-mono w-5 flex-shrink-0" }, t.n),
|
|
95
|
-
react_1.default.createElement("div", { className: "flex-1" },
|
|
96
|
-
react_1.default.createElement("div", { className: "text-[13px] font-medium text-tax-axis-text font-tax-axis-body mb-0.5" }, t.step),
|
|
97
|
-
react_1.default.createElement("div", { className: "text-[11px] font-tax-axis-mono text-tax-axis-text-2" }, t.formula)),
|
|
98
|
-
react_1.default.createElement("div", { className: "text-right flex-shrink-0" },
|
|
99
|
-
react_1.default.createElement("div", { className: "text-[13px] font-bold text-tax-axis-teal-light font-tax-axis-mono" }, t.result),
|
|
100
|
-
react_1.default.createElement("div", { className: "text-[9px] text-tax-axis-text-3 font-tax-axis-mono mt-0.5" }, t.src))))),
|
|
101
|
-
react_1.default.createElement("div", { className: "p-3.5", style: { borderTop: "1px solid rgba(36,131,132,0.12)", background: "#161938" } },
|
|
102
|
-
react_1.default.createElement("div", { className: "text-[10px] font-bold text-tax-axis-teal-light uppercase tracking-widest mb-2 font-tax-axis-mono" }, "Derivation"),
|
|
103
|
-
react_1.default.createElement("div", { className: "flex items-center gap-2 flex-wrap" }, trace.map((t, i) => (react_1.default.createElement("span", { key: i, className: "flex items-center gap-1.5" },
|
|
104
|
-
react_1.default.createElement("span", { className: "text-xs font-tax-axis-mono text-tax-axis-text px-2 py-0.5 rounded", style: { background: "#1A1D3A", border: "1px solid rgba(36,131,132,0.12)" } }, t.result),
|
|
105
|
-
i < trace.length - 1 && (react_1.default.createElement("span", { className: "text-[11px] text-tax-axis-text-3 font-tax-axis-mono" }, "\u2192")))))),
|
|
106
|
-
trace.length > 1 && (react_1.default.createElement("div", { className: "mt-2 text-xs font-tax-axis-mono p-2 rounded-md leading-relaxed", style: { background: "#1A1D3A", border: "1px solid rgba(36,131,132,0.12)" } },
|
|
107
|
-
react_1.default.createElement("span", { className: "text-tax-axis-text-2" }, "Result: "),
|
|
108
|
-
react_1.default.createElement("span", { className: "font-semibold text-tax-axis-teal-light" }, trace[trace.length - 1].result),
|
|
109
|
-
react_1.default.createElement("span", { className: "text-tax-axis-text-2" }, " via "),
|
|
110
|
-
react_1.default.createElement("span", { className: "text-tax-axis-text" }, trace[trace.length - 1].formula)))))),
|
|
111
|
-
react_1.default.createElement(Sec, { title: "IRS Authority" },
|
|
133
|
+
s.clientBrief && (react_1.default.createElement(Sec, { title: "Why This Matters" },
|
|
134
|
+
react_1.default.createElement("p", { className: "text-[13px] text-tax-axis-text-2 leading-[1.75] font-tax-axis-body" }, s.clientBrief))),
|
|
135
|
+
savingsSection && (react_1.default.createElement(Sec, { title: "How Savings Break Down" },
|
|
136
|
+
react_1.default.createElement("p", { className: "text-[13px] text-tax-axis-text-2 leading-[1.75] font-tax-axis-body whitespace-pre-line" }, savingsSection))),
|
|
137
|
+
s.specialistNote && (react_1.default.createElement("div", { className: "mb-6 pl-3.5 py-1", style: { borderLeft: "3px solid #FB9A1D" } },
|
|
138
|
+
react_1.default.createElement("div", { className: "text-[11px] font-bold uppercase tracking-widest mb-2 font-tax-axis-mono", style: { color: "#FB9A1D" } }, "Why You Need a Specialist"),
|
|
139
|
+
react_1.default.createElement("p", { className: "text-[13px] text-tax-axis-text-2 leading-[1.75] font-tax-axis-body" }, s.specialistNote))),
|
|
140
|
+
react_1.default.createElement(Sec, { title: "Data Used in This Analysis" },
|
|
141
|
+
react_1.default.createElement(SourceDocRows, { docs: s.sourceDocuments, trace: s.trace })),
|
|
142
|
+
cpaSection && (react_1.default.createElement(Sec, { title: "CPA Engagement Notes", titleColor: "#9498B8" },
|
|
143
|
+
react_1.default.createElement("div", { className: "rounded-[10px] p-3.5", style: { background: "rgba(14,17,50,0.6)", border: "1px solid rgba(36,131,132,0.10)" } },
|
|
144
|
+
react_1.default.createElement("p", { className: "text-[12px] text-tax-axis-text-3 leading-[1.75] font-tax-axis-body whitespace-pre-line" }, cpaSection)))),
|
|
145
|
+
react_1.default.createElement(Sec, { title: "IRS Authority", titleColor: "#9498B8" },
|
|
112
146
|
react_1.default.createElement("div", { className: "p-3.5 rounded-[10px] mb-3", style: { background: "#1A1D3A", border: "1px solid rgba(36,131,132,0.12)" } },
|
|
113
|
-
react_1.default.createElement("div", { className: "text-[13px] font-tax-axis-mono text-tax-axis-text mb-1" }, s.authority),
|
|
114
|
-
react_1.default.createElement("div", { className: "text-[11px] text-tax-axis-text-2" },
|
|
147
|
+
react_1.default.createElement("div", { className: "text-[13px] font-tax-axis-mono text-tax-axis-text mb-1" }, s.authority || "See engagement notes"),
|
|
148
|
+
s.forms && (react_1.default.createElement("div", { className: "text-[11px] text-tax-axis-text-2" },
|
|
115
149
|
"Forms: ",
|
|
116
|
-
react_1.default.createElement("span", { className: "font-tax-axis-mono text-tax-axis-text" }, s.forms))),
|
|
150
|
+
react_1.default.createElement("span", { className: "font-tax-axis-mono text-tax-axis-text" }, s.forms)))),
|
|
117
151
|
react_1.default.createElement("div", { className: "rounded-[10px] overflow-hidden", style: { background: "rgba(36,131,132,0.06)", border: "1px solid rgba(36,131,132,0.2)" } },
|
|
118
152
|
react_1.default.createElement("div", { className: "p-3 flex gap-3 items-center", style: { borderBottom: "1px solid rgba(36,131,132,0.15)" } },
|
|
119
|
-
react_1.default.createElement("div", { className: "flex gap-[3px]" }, [1, 2, 3, 4, 5].map((i) => (react_1.default.createElement("div", { key: i, className: "w-2 h-2 rounded-sm", style: { background: i <=
|
|
120
|
-
react_1.default.createElement("span", { className: "text-[13px] font-semibold
|
|
153
|
+
react_1.default.createElement("div", { className: "flex gap-[3px]" }, [1, 2, 3, 4, 5].map((i) => (react_1.default.createElement("div", { key: i, className: "w-2 h-2 rounded-sm", style: { background: i <= pos.dots ? pos.color : "rgba(36,131,132,0.2)" } })))),
|
|
154
|
+
react_1.default.createElement("span", { className: "text-[13px] font-semibold font-tax-axis-head", style: { color: pos.color } }, pos.label)),
|
|
121
155
|
react_1.default.createElement("div", { className: "p-3" },
|
|
122
|
-
react_1.default.createElement("p", { className: "text-xs text-tax-axis-text leading-[1.7] font-tax-axis-body
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
react_1.default.createElement("div", { className: "text-[11px] text-tax-axis-text-2 leading-relaxed font-tax-axis-body" }, "If the preparer knowingly disregards rules or regulations, the penalty is the greater of $5,000 or 75% of the fee earned."))),
|
|
130
|
-
react_1.default.createElement("div", { className: "p-2 rounded-md flex gap-2 items-start", style: { background: "rgba(15,110,86,0.06)", border: "1px solid rgba(15,110,86,0.15)" } },
|
|
131
|
-
react_1.default.createElement("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", className: "flex-shrink-0 mt-0.5" },
|
|
132
|
-
react_1.default.createElement("path", { d: "M2.5 7l3.5 3.5 5.5-6", stroke: "#0F6E56", strokeWidth: "1.5", strokeLinecap: "round" })),
|
|
133
|
-
react_1.default.createElement("div", { className: "text-[11px] text-tax-axis-text leading-relaxed font-tax-axis-body" },
|
|
134
|
-
react_1.default.createElement("strong", { style: { color: "#0F6E56" } }, "This strategy holds Substantial Authority"),
|
|
135
|
-
" \u2014 established IRS guidance, published revenue rulings, or settled case law support this position. Signing off on this carries low preparer penalty exposure under \u00A76694(a).")))))),
|
|
156
|
+
react_1.default.createElement("p", { className: "text-xs text-tax-axis-text leading-[1.7] font-tax-axis-body" },
|
|
157
|
+
"IRC \u00A76694 imposes penalties on preparers who sign off on positions that lack sufficient legal support.",
|
|
158
|
+
pos.dots >= 4
|
|
159
|
+
? " This strategy holds Substantial Authority — established IRS guidance supports this position. Low preparer penalty exposure under §6694(a)."
|
|
160
|
+
: pos.dots === 3
|
|
161
|
+
? " This strategy rests on Reasonable Basis. CPA should document the position before filing and consider disclosure on Form 8275."
|
|
162
|
+
: " This strategy requires preparer disclosure. Consult IRS guidance before taking this position."))))),
|
|
136
163
|
react_1.default.createElement("div", { className: "px-6 py-4 flex-shrink-0", style: { borderTop: "1px solid rgba(36,131,132,0.12)", background: "#0E1132" } },
|
|
137
|
-
react_1.default.createElement("div", { className: "text-[11px] text-tax-axis-text-3 mb-2" }, "
|
|
138
|
-
react_1.default.createElement("div", { className: "text-sm font-medium text-tax-axis-text" }, s.action)))));
|
|
164
|
+
react_1.default.createElement("div", { className: "text-[11px] text-tax-axis-text-3 uppercase tracking-widest font-tax-axis-mono mb-2" }, "What We'd Do Next"),
|
|
165
|
+
react_1.default.createElement("div", { className: "text-sm font-medium text-tax-axis-text leading-relaxed" }, s.action || "Work with your CPA to implement this strategy.")))));
|
|
139
166
|
}
|
|
@@ -1,15 +1,69 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type { ClientProfile, TaxAxisScreenProps } from "../../lib/types";
|
|
2
|
+
import type { ClientProfile, TaxAxisScreenProps, ExtractionDocument } from "../../lib/types";
|
|
3
|
+
export interface LlmStrategy {
|
|
4
|
+
strategyType: string;
|
|
5
|
+
applicable: boolean;
|
|
6
|
+
priority: string;
|
|
7
|
+
estimatedSavings: {
|
|
8
|
+
min: number;
|
|
9
|
+
max: number;
|
|
10
|
+
};
|
|
11
|
+
summary: string;
|
|
12
|
+
implementationSteps: string[];
|
|
13
|
+
requiredForms: string[];
|
|
14
|
+
strategyId?: string;
|
|
15
|
+
status?: "COMPLETE" | "FAILED";
|
|
16
|
+
error?: string;
|
|
17
|
+
weightedScore?: number;
|
|
18
|
+
quickWin?: boolean;
|
|
19
|
+
calculationTrace?: Record<string, unknown>;
|
|
20
|
+
}
|
|
21
|
+
export interface LlmExcludedStrategy {
|
|
22
|
+
strategy_id: string;
|
|
23
|
+
status?: "EXCLUDED";
|
|
24
|
+
reason: string;
|
|
25
|
+
irs_cite?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface LlmResult {
|
|
28
|
+
strategies: LlmStrategy[];
|
|
29
|
+
summary: {
|
|
30
|
+
applicableCount: number;
|
|
31
|
+
totalStrategies: number;
|
|
32
|
+
highPriorityCount: number;
|
|
33
|
+
quickWinCount: number;
|
|
34
|
+
notEligibleCount: number;
|
|
35
|
+
estimatedSavingsMin: number;
|
|
36
|
+
estimatedSavingsMax: number;
|
|
37
|
+
failedCount?: number;
|
|
38
|
+
top3?: string[];
|
|
39
|
+
};
|
|
40
|
+
meta: {
|
|
41
|
+
provider: string;
|
|
42
|
+
tokenCount?: number;
|
|
43
|
+
totalTokens?: number;
|
|
44
|
+
inputTokens?: number;
|
|
45
|
+
outputTokens?: number;
|
|
46
|
+
latencyMs?: number;
|
|
47
|
+
sourceDocumentCount: number;
|
|
48
|
+
parsedDocumentCount: number;
|
|
49
|
+
detectedDocumentTypes: string[];
|
|
50
|
+
modelId?: string;
|
|
51
|
+
promptVersion?: string;
|
|
52
|
+
};
|
|
53
|
+
excludedStrategies?: LlmExcludedStrategy[];
|
|
54
|
+
engineOutput?: Record<string, unknown>;
|
|
55
|
+
rawOutput?: Record<string, unknown>;
|
|
56
|
+
}
|
|
3
57
|
export interface TaxAxisDashboardProps extends TaxAxisScreenProps {
|
|
4
58
|
profile: ClientProfile;
|
|
59
|
+
llmResult?: LlmResult | null;
|
|
60
|
+
parsedDocuments?: ExtractionDocument[];
|
|
5
61
|
onDownloadClient: () => void;
|
|
6
62
|
onDownloadPreparer: () => void;
|
|
7
63
|
onPresent: () => void;
|
|
8
64
|
onSend: () => void;
|
|
9
65
|
onReset: () => void;
|
|
10
66
|
onReviewData?: () => void;
|
|
11
|
-
llmResult?: any;
|
|
12
|
-
parsedDocuments?: any[];
|
|
13
67
|
onUploadMore?: () => void;
|
|
14
68
|
}
|
|
15
|
-
export declare function TaxAxisDashboard({ profile, onDownloadClient, onDownloadPreparer, onPresent, onSend, onReset, onReviewData, onUploadMore, userContext: _userContext, }: TaxAxisDashboardProps): React.JSX.Element;
|
|
69
|
+
export declare function TaxAxisDashboard({ profile, llmResult, parsedDocuments, onDownloadClient, onDownloadPreparer, onPresent, onSend, onReset, onReviewData, onUploadMore, userContext: _userContext, }: TaxAxisDashboardProps): React.JSX.Element;
|