@paro.io/expert-shared-components 1.14.43 → 1.14.46
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/LICENSE +21 -21
- package/README.md +2 -2
- package/lib/README.md +2 -0
- package/lib/components/ClientReferencesSection/DeleteButton.js +11 -11
- package/lib/components/ClientReferencesSection/ParoError.js +10 -10
- package/lib/components/ClientReferencesSection/TagsSection.js +2 -2
- package/lib/components/ClientReferencesSection/styles/BrandedTypography.js +2 -2
- package/lib/components/ClientReferencesSection/styles/Buttons.js +15 -15
- package/lib/components/ClientReferencesSection/styles/Name.js +5 -5
- package/lib/components/ClientReferencesSection/styles/NullContentConditionalColor.js +4 -4
- package/lib/components/ClientReferencesSection/styles/SectionBody.js +11 -11
- package/lib/components/ClientReferencesSection/styles/SectionTitle.js +6 -6
- package/lib/components/ClientReferencesSection/styles/Tags.js +2 -2
- package/lib/components/DiscussionThread/DiscussionThread.d.ts +25 -25
- package/lib/components/DiscussionThread/DiscussionThread.js +137 -137
- package/lib/components/DiscussionThread/chat.d.ts +22 -22
- package/lib/components/DiscussionThread/chat.js +106 -106
- package/lib/components/DiscussionThread/index.d.ts +1 -1
- package/lib/components/DiscussionThread/index.js +5 -5
- package/lib/components/DocumentCenter/DocumentTable.d.ts +15 -15
- package/lib/components/DocumentCenter/DocumentTable.js +350 -350
- package/lib/components/DocumentCenter/DragDropUpload.js +4 -4
- package/lib/components/DocumentCenter/UploadFilesButton.d.ts +6 -6
- package/lib/components/DocumentCenter/UploadFilesButton.js +29 -29
- package/lib/components/EarningsTracker/ActiveProjectCard.d.ts +52 -52
- package/lib/components/EarningsTracker/ActiveProjectCard.js +161 -161
- package/lib/components/EarningsTracker/CenterCardUI.d.ts +13 -13
- package/lib/components/EarningsTracker/CenterCardUI.js +134 -134
- package/lib/components/EarningsTracker/EarningsTracker.d.ts +52 -52
- package/lib/components/EarningsTracker/EarningsTracker.js +508 -508
- package/lib/components/EarningsTracker/EditDateModal.d.ts +22 -22
- package/lib/components/EarningsTracker/EditDateModal.js +149 -149
- package/lib/components/EarningsTracker/EmailModal.d.ts +14 -14
- package/lib/components/EarningsTracker/EmailModal.js +79 -79
- package/lib/components/EarningsTracker/EndProjectModal.d.ts +56 -56
- package/lib/components/EarningsTracker/EndProjectModal.js +221 -221
- package/lib/components/EarningsTracker/LeftCardUI.d.ts +18 -18
- package/lib/components/EarningsTracker/LeftCardUI.js +189 -189
- package/lib/components/EarningsTracker/LogTimeModalAuthenticated.d.ts +52 -52
- package/lib/components/EarningsTracker/LogTimeModalAuthenticated.js +358 -358
- package/lib/components/EarningsTracker/ProgressBar.d.ts +4 -4
- package/lib/components/EarningsTracker/ProgressBar.js +66 -66
- package/lib/components/EarningsTracker/ReviewRequestModal.d.ts +17 -17
- package/lib/components/EarningsTracker/ReviewRequestModal.js +135 -135
- package/lib/components/EarningsTracker/RightCardUI.d.ts +46 -46
- package/lib/components/EarningsTracker/RightCardUI.js +231 -231
- package/lib/components/EarningsTracker/index.d.ts +1 -1
- package/lib/components/EarningsTracker/index.js +5 -5
- package/lib/components/Escalations/CustomTag.d.ts +3 -3
- package/lib/components/Escalations/CustomTag.js +25 -25
- package/lib/components/Escalations/ViewReponseModal.d.ts +8 -8
- package/lib/components/Escalations/ViewReponseModal.js +27 -27
- package/lib/components/ExpertProfileHeader/ActionButtonSection.js +6 -6
- package/lib/components/ExpertProfileHeader/ProfileSection.js +7 -7
- package/lib/components/Invoices/TestDecisionSection.d.ts +1 -1
- package/lib/components/Invoices/TestDecisionSection.js +126 -126
- package/lib/components/OrganizationChart/OrganizationChart.d.ts +15 -15
- package/lib/components/OrganizationChart/OrganizationChart.js +312 -312
- package/lib/components/OrganizationChart/PersonCard.js +5 -5
- package/lib/components/OrganizationChart/utils.js +79 -79
- package/lib/components/ProjectCard/ProgressBar.js +4 -4
- package/lib/components/ProjectCard/ReviewRequestModal.js +5 -5
- package/lib/components/ProjectIntelligence/MissingInformation/index.js +1 -1
- package/lib/components/Reviews/Pagination.js +6 -6
- package/lib/components/ReviewsTab/RatingHeader.js +6 -6
- package/lib/components/ReviewsTab/expert-shared-components.code-workspace +20 -20
- package/lib/components/ReviewsTab/reviewRequestModal.js +5 -5
- package/lib/components/shared/Image.js +13 -13
- package/lib/components/shared/ProfileTextField.d.ts +18 -18
- package/lib/components/shared/ProfileTextField.js +16 -16
- package/lib/components/shared/StyledActionButtons.d.ts +7 -7
- package/lib/components/shared/StyledActionButtons.js +15 -15
- package/lib/components/shared/ToastNotification.d.ts +10 -10
- package/lib/components/shared/ToastNotification.js +63 -63
- package/lib/index.d.ts +13 -0
- package/lib/index.js +27 -1
- package/lib/package.json +68 -0
- package/lib/tax-axis/components/clientReport/ClientReportCover.d.ts +9 -0
- package/lib/tax-axis/components/clientReport/ClientReportCover.js +39 -0
- package/lib/tax-axis/components/clientReport/ClientReportTOC.d.ts +8 -0
- package/lib/tax-axis/components/clientReport/ClientReportTOC.js +24 -0
- package/lib/tax-axis/components/clientReport/ClientReportToolbar.d.ts +2 -0
- package/lib/tax-axis/components/clientReport/ClientReportToolbar.js +6 -0
- package/lib/tax-axis/components/clientReport/ETRChart.d.ts +10 -0
- package/lib/tax-axis/components/clientReport/ETRChart.js +50 -0
- package/lib/tax-axis/components/clientReport/ExecutiveSummary.d.ts +15 -0
- package/lib/tax-axis/components/clientReport/ExecutiveSummary.js +73 -0
- package/lib/tax-axis/components/clientReport/FootnoteBlock.d.ts +11 -0
- package/lib/tax-axis/components/clientReport/FootnoteBlock.js +34 -0
- package/lib/tax-axis/components/clientReport/ImplementationRoadmap.d.ts +26 -0
- package/lib/tax-axis/components/clientReport/ImplementationRoadmap.js +51 -0
- package/lib/tax-axis/components/clientReport/ImplementationTimelineChart.d.ts +10 -0
- package/lib/tax-axis/components/clientReport/ImplementationTimelineChart.js +49 -0
- package/lib/tax-axis/components/clientReport/Methodology.d.ts +10 -0
- package/lib/tax-axis/components/clientReport/Methodology.js +40 -0
- package/lib/tax-axis/components/clientReport/QuarterlyCashChart.d.ts +10 -0
- package/lib/tax-axis/components/clientReport/QuarterlyCashChart.js +56 -0
- package/lib/tax-axis/components/clientReport/RecommendedStrategies.d.ts +13 -0
- package/lib/tax-axis/components/clientReport/RecommendedStrategies.js +51 -0
- package/lib/tax-axis/components/clientReport/SavingsStackChart.d.ts +10 -0
- package/lib/tax-axis/components/clientReport/SavingsStackChart.js +66 -0
- package/lib/tax-axis/components/clientReport/SectionOpener.d.ts +11 -0
- package/lib/tax-axis/components/clientReport/SectionOpener.js +20 -0
- package/lib/tax-axis/components/clientReport/Sidebar.d.ts +8 -0
- package/lib/tax-axis/components/clientReport/Sidebar.js +37 -0
- package/lib/tax-axis/components/clientReport/StrategyCard.d.ts +16 -0
- package/lib/tax-axis/components/clientReport/StrategyCard.js +63 -0
- package/lib/tax-axis/components/clientReport/TaxAxisClientReport.d.ts +9 -0
- package/lib/tax-axis/components/clientReport/TaxAxisClientReport.js +125 -0
- package/lib/tax-axis/components/clientReport/applyFootnotes.d.ts +12 -0
- package/lib/tax-axis/components/clientReport/applyFootnotes.js +43 -0
- package/lib/tax-axis/components/clientReport/palette.d.ts +28 -0
- package/lib/tax-axis/components/clientReport/palette.js +34 -0
- package/lib/tax-axis/components/dashboard/ConfidenceArc.d.ts +7 -0
- package/lib/tax-axis/components/dashboard/ConfidenceArc.js +20 -0
- package/lib/tax-axis/components/dashboard/DashboardActions.d.ts +13 -0
- package/lib/tax-axis/components/dashboard/DashboardActions.js +94 -0
- package/lib/tax-axis/components/dashboard/DashboardSummary.d.ts +11 -0
- package/lib/tax-axis/components/dashboard/DashboardSummary.js +98 -0
- package/lib/tax-axis/components/dashboard/DashboardTopBar.d.ts +10 -0
- package/lib/tax-axis/components/dashboard/DashboardTopBar.js +48 -0
- package/lib/tax-axis/components/dashboard/StrategyDetailPanel.d.ts +10 -0
- package/lib/tax-axis/components/dashboard/StrategyDetailPanel.js +139 -0
- package/lib/tax-axis/components/dashboard/StrategyTile.d.ts +10 -0
- package/lib/tax-axis/components/dashboard/StrategyTile.js +82 -0
- package/lib/tax-axis/components/dashboard/TaxAxisDashboard.d.ts +12 -0
- package/lib/tax-axis/components/dashboard/TaxAxisDashboard.js +285 -0
- package/lib/tax-axis/components/dashboard/useCountUp.d.ts +1 -0
- package/lib/tax-axis/components/dashboard/useCountUp.js +25 -0
- package/lib/tax-axis/components/documents/DocumentCard.d.ts +18 -0
- package/lib/tax-axis/components/documents/DocumentCard.js +61 -0
- package/lib/tax-axis/components/documents/DocumentTier.d.ts +21 -0
- package/lib/tax-axis/components/documents/DocumentTier.js +23 -0
- package/lib/tax-axis/components/documents/TaxAxisDocuments.d.ts +8 -0
- package/lib/tax-axis/components/documents/TaxAxisDocuments.js +157 -0
- package/lib/tax-axis/components/extractionReview/DocumentCard.d.ts +17 -0
- package/lib/tax-axis/components/extractionReview/DocumentCard.js +105 -0
- package/lib/tax-axis/components/extractionReview/FieldRow.d.ts +17 -0
- package/lib/tax-axis/components/extractionReview/FieldRow.js +137 -0
- package/lib/tax-axis/components/extractionReview/PurposeBlock.d.ts +7 -0
- package/lib/tax-axis/components/extractionReview/PurposeBlock.js +18 -0
- package/lib/tax-axis/components/extractionReview/RerunFooter.d.ts +8 -0
- package/lib/tax-axis/components/extractionReview/RerunFooter.js +60 -0
- package/lib/tax-axis/components/extractionReview/TaxAxisExtractionReview.d.ts +11 -0
- package/lib/tax-axis/components/extractionReview/TaxAxisExtractionReview.js +186 -0
- package/lib/tax-axis/components/intake/ClientParametersSection.d.ts +7 -0
- package/lib/tax-axis/components/intake/ClientParametersSection.js +146 -0
- package/lib/tax-axis/components/intake/CpaIntakeQuestionsSection.d.ts +7 -0
- package/lib/tax-axis/components/intake/CpaIntakeQuestionsSection.js +93 -0
- package/lib/tax-axis/components/intake/IntakeCtaCards.d.ts +9 -0
- package/lib/tax-axis/components/intake/IntakeCtaCards.js +30 -0
- package/lib/tax-axis/components/intake/RefineAnalysisSection.d.ts +7 -0
- package/lib/tax-axis/components/intake/RefineAnalysisSection.js +151 -0
- package/lib/tax-axis/components/intake/StateMultiSelect.d.ts +7 -0
- package/lib/tax-axis/components/intake/StateMultiSelect.js +90 -0
- package/lib/tax-axis/components/intake/StrategyRadar.d.ts +7 -0
- package/lib/tax-axis/components/intake/StrategyRadar.js +240 -0
- package/lib/tax-axis/components/intake/TaxAxisIntake.d.ts +8 -0
- package/lib/tax-axis/components/intake/TaxAxisIntake.js +38 -0
- package/lib/tax-axis/components/intake/intakeSchema.d.ts +97 -0
- package/lib/tax-axis/components/intake/intakeSchema.js +91 -0
- package/lib/tax-axis/components/preparerWorkpaper/CalculationTraceAccordion.d.ts +9 -0
- package/lib/tax-axis/components/preparerWorkpaper/CalculationTraceAccordion.js +19 -0
- package/lib/tax-axis/components/preparerWorkpaper/EngagementHeader.d.ts +9 -0
- package/lib/tax-axis/components/preparerWorkpaper/EngagementHeader.js +43 -0
- package/lib/tax-axis/components/preparerWorkpaper/Position6694Accordion.d.ts +9 -0
- package/lib/tax-axis/components/preparerWorkpaper/Position6694Accordion.js +25 -0
- package/lib/tax-axis/components/preparerWorkpaper/PriorityGroup.d.ts +14 -0
- package/lib/tax-axis/components/preparerWorkpaper/PriorityGroup.js +20 -0
- package/lib/tax-axis/components/preparerWorkpaper/Section6694Summary.d.ts +9 -0
- package/lib/tax-axis/components/preparerWorkpaper/Section6694Summary.js +36 -0
- package/lib/tax-axis/components/preparerWorkpaper/SourceDocumentsAccordion.d.ts +9 -0
- package/lib/tax-axis/components/preparerWorkpaper/SourceDocumentsAccordion.js +20 -0
- package/lib/tax-axis/components/preparerWorkpaper/StrategyWorkpaperCard.d.ts +14 -0
- package/lib/tax-axis/components/preparerWorkpaper/StrategyWorkpaperCard.js +53 -0
- package/lib/tax-axis/components/preparerWorkpaper/TaxAxisPreparerWorkpaper.d.ts +9 -0
- package/lib/tax-axis/components/preparerWorkpaper/TaxAxisPreparerWorkpaper.js +175 -0
- package/lib/tax-axis/components/presentationMode/TaxAxisPresentationMode.d.ts +7 -0
- package/lib/tax-axis/components/presentationMode/TaxAxisPresentationMode.js +245 -0
- package/lib/tax-axis/components/processing/ProcessingStages.d.ts +7 -0
- package/lib/tax-axis/components/processing/ProcessingStages.js +17 -0
- package/lib/tax-axis/components/processing/TaxAxisProcessing.d.ts +7 -0
- package/lib/tax-axis/components/processing/TaxAxisProcessing.js +105 -0
- package/lib/tax-axis/components/prospectReport/ProspectCover.d.ts +10 -0
- package/lib/tax-axis/components/prospectReport/ProspectCover.js +47 -0
- package/lib/tax-axis/components/prospectReport/ProspectDocuments.d.ts +9 -0
- package/lib/tax-axis/components/prospectReport/ProspectDocuments.js +31 -0
- package/lib/tax-axis/components/prospectReport/ProspectNextSteps.d.ts +13 -0
- package/lib/tax-axis/components/prospectReport/ProspectNextSteps.js +37 -0
- package/lib/tax-axis/components/prospectReport/ProspectPrintView.d.ts +26 -0
- package/lib/tax-axis/components/prospectReport/ProspectPrintView.js +185 -0
- package/lib/tax-axis/components/prospectReport/ProspectStrategyCard.d.ts +10 -0
- package/lib/tax-axis/components/prospectReport/ProspectStrategyCard.js +52 -0
- package/lib/tax-axis/components/prospectReport/SampleAnalysisPreview.d.ts +7 -0
- package/lib/tax-axis/components/prospectReport/SampleAnalysisPreview.js +120 -0
- package/lib/tax-axis/components/prospectReport/TaxAxisProspectReport.d.ts +9 -0
- package/lib/tax-axis/components/prospectReport/TaxAxisProspectReport.js +173 -0
- package/lib/tax-axis/components/prospectReport/TaxPositionGap.d.ts +15 -0
- package/lib/tax-axis/components/prospectReport/TaxPositionGap.js +45 -0
- package/lib/tax-axis/components/prospectReport/theme.d.ts +26 -0
- package/lib/tax-axis/components/prospectReport/theme.js +33 -0
- package/lib/tax-axis/components/shared/ReportToolbar.d.ts +12 -0
- package/lib/tax-axis/components/shared/ReportToolbar.js +81 -0
- package/lib/tax-axis/components/shared/SectionHeader.d.ts +8 -0
- package/lib/tax-axis/components/shared/SectionHeader.js +15 -0
- package/lib/tax-axis/components/shared/TaxAxisBadge.d.ts +12 -0
- package/lib/tax-axis/components/shared/TaxAxisBadge.js +34 -0
- package/lib/tax-axis/components/shared/TaxAxisButton.d.ts +12 -0
- package/lib/tax-axis/components/shared/TaxAxisButton.js +17 -0
- package/lib/tax-axis/components/shared/TaxAxisCard.d.ts +9 -0
- package/lib/tax-axis/components/shared/TaxAxisCard.js +13 -0
- package/lib/tax-axis/index.d.ts +25 -0
- package/lib/tax-axis/index.js +51 -0
- package/lib/tax-axis/lib/compute/index.d.ts +8 -0
- package/lib/tax-axis/lib/compute/index.js +163 -0
- package/lib/tax-axis/lib/data/documents.d.ts +3 -0
- package/lib/tax-axis/lib/data/documents.js +33 -0
- package/lib/tax-axis/lib/data/extractedData.d.ts +2 -0
- package/lib/tax-axis/lib/data/extractedData.js +47 -0
- package/lib/tax-axis/lib/data/footnoteData.d.ts +2 -0
- package/lib/tax-axis/lib/data/footnoteData.js +48 -0
- package/lib/tax-axis/lib/data/index.d.ts +11 -0
- package/lib/tax-axis/lib/data/index.js +31 -0
- package/lib/tax-axis/lib/data/nextSteps.d.ts +2 -0
- package/lib/tax-axis/lib/data/nextSteps.js +35 -0
- package/lib/tax-axis/lib/data/sidebarLookup.d.ts +2 -0
- package/lib/tax-axis/lib/data/sidebarLookup.js +90 -0
- package/lib/tax-axis/lib/data/sourceDescriptions.d.ts +1 -0
- package/lib/tax-axis/lib/data/sourceDescriptions.js +32 -0
- package/lib/tax-axis/lib/data/states.d.ts +6 -0
- package/lib/tax-axis/lib/data/states.js +25 -0
- package/lib/tax-axis/lib/data/strategies.d.ts +8 -0
- package/lib/tax-axis/lib/data/strategies.js +166 -0
- package/lib/tax-axis/lib/data/strategyNarrative.d.ts +3 -0
- package/lib/tax-axis/lib/data/strategyNarrative.js +170 -0
- package/lib/tax-axis/lib/data/strategyProspect.d.ts +2 -0
- package/lib/tax-axis/lib/data/strategyProspect.js +66 -0
- package/lib/tax-axis/lib/data/workpaperInteractions.d.ts +1 -0
- package/lib/tax-axis/lib/data/workpaperInteractions.js +15 -0
- package/lib/tax-axis/lib/types/index.d.ts +183 -0
- package/lib/tax-axis/lib/types/index.js +7 -0
- package/package.json +68 -67
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DocumentCard = DocumentCard;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const TaxAxisBadge_1 = require("../shared/TaxAxisBadge");
|
|
9
|
+
// Inline style values per status — mock T hex values for SVG strokes and
|
|
10
|
+
// rgba borders that don't have direct Tailwind token equivalents.
|
|
11
|
+
const STATUS_STYLES = {
|
|
12
|
+
empty: {
|
|
13
|
+
iconBg: "#171B44",
|
|
14
|
+
iconBorder: "#2E3160",
|
|
15
|
+
cardBorder: "#2E3160",
|
|
16
|
+
},
|
|
17
|
+
validating: {
|
|
18
|
+
iconBg: "rgba(251,154,29,0.08)",
|
|
19
|
+
iconBorder: "rgba(251,154,29,0.25)",
|
|
20
|
+
cardBorder: "rgba(251,154,29,0.25)",
|
|
21
|
+
},
|
|
22
|
+
valid: {
|
|
23
|
+
iconBg: "rgba(15,110,86,0.08)",
|
|
24
|
+
iconBorder: "rgba(15,110,86,0.25)",
|
|
25
|
+
cardBorder: "rgba(15,110,86,0.25)",
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
function DocumentCard({ doc, tierBorderColor, tierBadgeColor, tierBadgeText, helpOverride, onUpload, onClear, }) {
|
|
29
|
+
var _a;
|
|
30
|
+
const ss = STATUS_STYLES[doc.status];
|
|
31
|
+
const leftBorder = doc.status === "valid" ? "rgba(15,110,86,0.6)" : tierBorderColor;
|
|
32
|
+
return (react_1.default.createElement("div", { className: "bg-tax-axis-surface overflow-hidden", style: {
|
|
33
|
+
border: `1px solid ${ss.cardBorder}`,
|
|
34
|
+
borderLeft: `3px solid ${leftBorder}`,
|
|
35
|
+
borderRadius: "0 10px 10px 0",
|
|
36
|
+
boxShadow: "0 2px 12px rgba(6,8,33,0.5)",
|
|
37
|
+
} },
|
|
38
|
+
react_1.default.createElement("div", { className: "px-4 py-3 flex gap-3 items-center" },
|
|
39
|
+
react_1.default.createElement("div", { className: "w-9 h-9 rounded-lg flex items-center justify-center flex-shrink-0", style: {
|
|
40
|
+
background: ss.iconBg,
|
|
41
|
+
border: `1px solid ${ss.iconBorder}`,
|
|
42
|
+
} }, doc.status === "validating" ? (react_1.default.createElement("div", { className: "w-3.5 h-3.5 rounded-full animate-spin", style: {
|
|
43
|
+
border: "2px solid transparent",
|
|
44
|
+
borderTopColor: "#FB9A1D",
|
|
45
|
+
} })) : doc.status === "valid" ? (react_1.default.createElement("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none" },
|
|
46
|
+
react_1.default.createElement("path", { d: "M2.5 7l3.5 3.5 5.5-6", stroke: "#0F6E56", strokeWidth: "2", strokeLinecap: "round" }))) : (react_1.default.createElement("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none" },
|
|
47
|
+
react_1.default.createElement("circle", { cx: "7", cy: "7", r: "5", stroke: "#9498B8", strokeWidth: "1.5", strokeDasharray: "3 3" })))),
|
|
48
|
+
react_1.default.createElement("div", { className: "flex-1 min-w-0" },
|
|
49
|
+
react_1.default.createElement("div", { className: "flex items-center gap-1.5" },
|
|
50
|
+
react_1.default.createElement("span", { className: "text-[13px] font-medium text-white font-tax-axis-body" }, doc.name),
|
|
51
|
+
doc.status === "empty" && (react_1.default.createElement(TaxAxisBadge_1.TaxAxisBadge, { color: tierBadgeColor, size: "xs" }, tierBadgeText))),
|
|
52
|
+
react_1.default.createElement("div", { className: "text-[11px] text-tax-axis-text-3 font-tax-axis-body mt-0.5" }, (_a = doc.fileName) !== null && _a !== void 0 ? _a : (helpOverride !== null && helpOverride !== void 0 ? helpOverride : doc.help))),
|
|
53
|
+
react_1.default.createElement("div", { className: "flex items-center gap-2 flex-shrink-0" },
|
|
54
|
+
doc.status === "valid" && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
55
|
+
react_1.default.createElement("span", { className: "text-[10px] font-semibold font-tax-axis-mono", style: { color: "#0F6E56" } }, "Done"),
|
|
56
|
+
react_1.default.createElement("button", { onClick: onClear, className: "bg-transparent border-none p-1 text-tax-axis-text-4 text-sm cursor-pointer" }, "\u00D7"))),
|
|
57
|
+
doc.status === "empty" && (react_1.default.createElement("button", { onClick: onUpload, className: "rounded-md px-3.5 py-1.5 text-[11px] font-semibold text-tax-axis-teal-light font-tax-axis-mono cursor-pointer", style: {
|
|
58
|
+
background: "rgba(36,131,132,0.10)",
|
|
59
|
+
border: "1px solid rgba(36,131,132,0.2)",
|
|
60
|
+
} }, "Upload"))))));
|
|
61
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { DocState } from "./DocumentCard";
|
|
3
|
+
export interface TierDef {
|
|
4
|
+
key: string;
|
|
5
|
+
label: string;
|
|
6
|
+
sublabel: string;
|
|
7
|
+
borderColor: string;
|
|
8
|
+
labelColor: string;
|
|
9
|
+
badgeColor: "red" | "orange" | "neutral";
|
|
10
|
+
badgeText: string;
|
|
11
|
+
ids: string[];
|
|
12
|
+
}
|
|
13
|
+
interface DocumentTierProps {
|
|
14
|
+
tier: TierDef;
|
|
15
|
+
docs: DocState[];
|
|
16
|
+
helpOverrides: Record<string, string>;
|
|
17
|
+
onUpload: (idx: number) => void;
|
|
18
|
+
onClear: (idx: number) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare function DocumentTier({ tier, docs, helpOverrides, onUpload, onClear, }: DocumentTierProps): React.JSX.Element | null;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DocumentTier = DocumentTier;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const DocumentCard_1 = require("./DocumentCard");
|
|
9
|
+
function DocumentTier({ tier, docs, helpOverrides, onUpload, onClear, }) {
|
|
10
|
+
const tierDocs = tier.ids
|
|
11
|
+
.map((id) => {
|
|
12
|
+
const idx = docs.findIndex((d) => d.id === id);
|
|
13
|
+
return idx >= 0 ? { doc: docs[idx], idx } : null;
|
|
14
|
+
})
|
|
15
|
+
.filter((entry) => entry !== null);
|
|
16
|
+
if (tierDocs.length === 0)
|
|
17
|
+
return null;
|
|
18
|
+
return (react_1.default.createElement("div", { className: "mb-4" },
|
|
19
|
+
react_1.default.createElement("div", { className: "flex items-center gap-2 mb-2" },
|
|
20
|
+
react_1.default.createElement("span", { className: "text-[10px] font-bold uppercase tracking-widest font-tax-axis-mono", style: { color: tier.labelColor } }, tier.label),
|
|
21
|
+
react_1.default.createElement("span", { className: "text-[10px] text-tax-axis-text-4 font-tax-axis-body" }, tier.sublabel)),
|
|
22
|
+
react_1.default.createElement("div", { className: "grid gap-1.5" }, tierDocs.map(({ doc, idx }) => (react_1.default.createElement(DocumentCard_1.DocumentCard, { key: doc.id, doc: doc, tierBorderColor: tier.borderColor, tierBadgeColor: tier.badgeColor, tierBadgeText: tier.badgeText, helpOverride: helpOverrides[doc.id], onUpload: () => onUpload(idx), onClear: () => onClear(idx) }))))));
|
|
23
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ClientProfile, TaxAxisScreenProps } from "../../lib/types";
|
|
3
|
+
export interface TaxAxisDocumentsProps extends TaxAxisScreenProps {
|
|
4
|
+
profile: ClientProfile;
|
|
5
|
+
onContinue: () => void;
|
|
6
|
+
onBack: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function TaxAxisDocuments({ profile, onContinue, onBack, userContext: _userContext, }: TaxAxisDocumentsProps): React.JSX.Element;
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.TaxAxisDocuments = TaxAxisDocuments;
|
|
27
|
+
const react_1 = __importStar(require("react"));
|
|
28
|
+
const documents_1 = require("../../lib/data/documents");
|
|
29
|
+
const TaxAxisButton_1 = require("../shared/TaxAxisButton");
|
|
30
|
+
const DocumentTier_1 = require("./DocumentTier");
|
|
31
|
+
// Stub filenames assigned when the user clicks "Upload" (mock App.jsx:1237)
|
|
32
|
+
const STUB_FILENAMES = {
|
|
33
|
+
"1120s": "2025_1120S.pdf",
|
|
34
|
+
"state-return": "2025_State_Return.pdf",
|
|
35
|
+
"payroll": "2025_Payroll.xlsx",
|
|
36
|
+
"pnl": "QBO_PnL_2025.pdf",
|
|
37
|
+
"balance": "QBO_BS_2025.pdf",
|
|
38
|
+
"cashflow": "QBO_CashFlow_2025.pdf",
|
|
39
|
+
"fixed-assets": "Fixed_Assets.xlsx",
|
|
40
|
+
"prior-returns": "Prior_Returns.pdf",
|
|
41
|
+
};
|
|
42
|
+
// Short help text shown below each doc name when not yet uploaded
|
|
43
|
+
// (mock App.jsx:1384). Overrides the longer DOC_SPECS_BASE.help.
|
|
44
|
+
const HELP_OVERRIDES = {
|
|
45
|
+
"1120s": "Improves accuracy of every strategy",
|
|
46
|
+
"payroll": "Critical for Entity Structure and QBI calculations",
|
|
47
|
+
"fixed-assets": "Unlocks Cost Segregation (potential $15K\u201385K)",
|
|
48
|
+
"state-return": "If client operates in income-tax states",
|
|
49
|
+
"cashflow": "Helps with income deferral and timing strategies",
|
|
50
|
+
"prior-returns": "Improves confidence intervals (more years = tighter estimates)",
|
|
51
|
+
};
|
|
52
|
+
// Tier groupings from mock (App.jsx:1379-1383)
|
|
53
|
+
const TIER_DEFS = [
|
|
54
|
+
{
|
|
55
|
+
key: "required",
|
|
56
|
+
label: "Required",
|
|
57
|
+
sublabel: "Cannot run analysis without these",
|
|
58
|
+
borderColor: "#C53030",
|
|
59
|
+
labelColor: "#C53030",
|
|
60
|
+
badgeColor: "red",
|
|
61
|
+
badgeText: "REQUIRED",
|
|
62
|
+
ids: ["pnl", "balance"],
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
key: "recommended",
|
|
66
|
+
label: "Highly Recommended",
|
|
67
|
+
sublabel: "Unlock major strategies",
|
|
68
|
+
borderColor: "#FB9A1D",
|
|
69
|
+
labelColor: "#FB9A1D",
|
|
70
|
+
badgeColor: "orange",
|
|
71
|
+
badgeText: "RECOMMENDED",
|
|
72
|
+
ids: ["1120s", "payroll", "fixed-assets"],
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
key: "conditional",
|
|
76
|
+
label: "Conditional",
|
|
77
|
+
sublabel: "Only if applicable to this client",
|
|
78
|
+
borderColor: "#2E3160",
|
|
79
|
+
labelColor: "#C8CCE5",
|
|
80
|
+
badgeColor: "neutral",
|
|
81
|
+
badgeText: "CONDITIONAL",
|
|
82
|
+
ids: ["state-return", "cashflow", "prior-returns"],
|
|
83
|
+
},
|
|
84
|
+
];
|
|
85
|
+
function TaxAxisDocuments({ profile, onContinue, onBack, userContext: _userContext = "expert", }) {
|
|
86
|
+
const docSpecs = (0, react_1.useMemo)(() => (0, documents_1.getDocSpecs)(profile), [profile]);
|
|
87
|
+
const [docs, setDocs] = (0, react_1.useState)(() => docSpecs.map((s) => (Object.assign(Object.assign({}, s), { status: "empty", fileName: null }))));
|
|
88
|
+
// Stub upload: empty -> validating -> valid after a short delay
|
|
89
|
+
// (mock App.jsx:1238-1241)
|
|
90
|
+
const handleUpload = (idx) => {
|
|
91
|
+
setDocs((prev) => prev.map((d, i) => i === idx
|
|
92
|
+
? Object.assign(Object.assign({}, d), { status: "validating", fileName: STUB_FILENAMES[d.id] || "document.pdf" }) : d));
|
|
93
|
+
setTimeout(() => setDocs((prev) => prev.map((d, i) => i === idx ? Object.assign(Object.assign({}, d), { status: "valid" }) : d)), 500 + Math.random() * 400);
|
|
94
|
+
};
|
|
95
|
+
const handleClear = (idx) => {
|
|
96
|
+
setDocs((prev) => prev.map((d, i) => i === idx
|
|
97
|
+
? Object.assign(Object.assign({}, d), { status: "empty", fileName: null }) : d));
|
|
98
|
+
};
|
|
99
|
+
const validCount = docs.filter((d) => d.status === "valid").length;
|
|
100
|
+
const requiredCount = docs.filter((d) => d.required === true).length;
|
|
101
|
+
const requiredValid = docs.filter((d) => d.required === true && d.status === "valid").length;
|
|
102
|
+
// Coverage heuristic from mock (App.jsx:1361)
|
|
103
|
+
const coveragePct = validCount === 0
|
|
104
|
+
? 32
|
|
105
|
+
: validCount === 1
|
|
106
|
+
? 50
|
|
107
|
+
: validCount === 2
|
|
108
|
+
? 60
|
|
109
|
+
: validCount <= 4
|
|
110
|
+
? 75
|
|
111
|
+
: validCount <= 6
|
|
112
|
+
? 90
|
|
113
|
+
: 100;
|
|
114
|
+
const strategiesCovered = Math.round((25 * coveragePct) / 100);
|
|
115
|
+
return (react_1.default.createElement("div", { className: "max-w-[580px] mx-auto" },
|
|
116
|
+
react_1.default.createElement("div", { className: "text-center mb-5 pt-5" },
|
|
117
|
+
react_1.default.createElement("h1", { className: "text-[28px] font-bold text-white font-tax-axis-head mb-1.5" }, "Source Documents"),
|
|
118
|
+
react_1.default.createElement("p", { className: "text-sm text-tax-axis-text-2 font-tax-axis-body" }, "Upload documents to run the full analysis.")),
|
|
119
|
+
react_1.default.createElement("div", { className: "py-3.5 px-[18px] mb-4 text-xs leading-relaxed font-tax-axis-body", style: {
|
|
120
|
+
background: "#171B44",
|
|
121
|
+
borderLeft: "3px solid #248384",
|
|
122
|
+
borderRadius: "0 8px 8px 0",
|
|
123
|
+
color: "#E6E8F5",
|
|
124
|
+
} }, "The minimum to run an analysis is the current-year P&L and Balance Sheet. However, accuracy and strategy coverage improve significantly with additional documents \u2014 particularly the federal tax return, fixed asset schedule, and W-2 forms."),
|
|
125
|
+
react_1.default.createElement("div", { className: "bg-tax-axis-surface border border-tax-axis-border rounded-[10px] px-[18px] py-3.5 mb-4" },
|
|
126
|
+
react_1.default.createElement("div", { className: "text-[10px] font-bold text-tax-axis-text-3 uppercase tracking-widest mb-2.5 font-tax-axis-mono" }, "Analysis Coverage"),
|
|
127
|
+
react_1.default.createElement("div", { className: "flex justify-between mb-1.5" },
|
|
128
|
+
react_1.default.createElement("span", { className: "text-xs text-tax-axis-text-2 font-tax-axis-body" },
|
|
129
|
+
"Documents uploaded:",
|
|
130
|
+
" ",
|
|
131
|
+
react_1.default.createElement("strong", { className: "text-white" },
|
|
132
|
+
validCount,
|
|
133
|
+
" / ",
|
|
134
|
+
docs.length)),
|
|
135
|
+
react_1.default.createElement("span", { className: "text-xs text-tax-axis-text-2 font-tax-axis-body" },
|
|
136
|
+
"Strategies covered:",
|
|
137
|
+
" ",
|
|
138
|
+
react_1.default.createElement("strong", { className: "text-tax-axis-teal-light" },
|
|
139
|
+
strategiesCovered,
|
|
140
|
+
" / 25"))),
|
|
141
|
+
react_1.default.createElement("div", { className: "h-1.5 bg-tax-axis-surface-2 rounded-sm overflow-hidden mb-1.5" },
|
|
142
|
+
react_1.default.createElement("div", { className: "h-full rounded-sm transition-[width] duration-[400ms]", style: {
|
|
143
|
+
width: `${coveragePct}%`,
|
|
144
|
+
background: "linear-gradient(90deg, #248384, #A1E5E6)",
|
|
145
|
+
} })),
|
|
146
|
+
react_1.default.createElement("div", { className: "flex justify-between" },
|
|
147
|
+
react_1.default.createElement("span", { className: "text-[10px] text-tax-axis-text-4 font-tax-axis-mono" },
|
|
148
|
+
coveragePct,
|
|
149
|
+
"% coverage"),
|
|
150
|
+
validCount < docs.length && (react_1.default.createElement("span", { className: "text-[10px] text-tax-axis-text-4 font-tax-axis-body" }, "Upload more documents to increase strategy coverage")))),
|
|
151
|
+
TIER_DEFS.map((tier) => (react_1.default.createElement(DocumentTier_1.DocumentTier, { key: tier.key, tier: tier, docs: docs, helpOverrides: HELP_OVERRIDES, onUpload: handleUpload, onClear: handleClear }))),
|
|
152
|
+
react_1.default.createElement("div", { className: "flex gap-3 mt-6" },
|
|
153
|
+
react_1.default.createElement(TaxAxisButton_1.TaxAxisButton, { variant: "secondary", onClick: onBack }, "Back"),
|
|
154
|
+
react_1.default.createElement(TaxAxisButton_1.TaxAxisButton, { onClick: onContinue, disabled: requiredCount > requiredValid, className: "flex-1" }, requiredCount > requiredValid
|
|
155
|
+
? `Upload ${requiredCount - requiredValid} more required doc${requiredCount - requiredValid > 1 ? "s" : ""}`
|
|
156
|
+
: "Run Analysis"))));
|
|
157
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ExtractionDocument } from "../../lib/types";
|
|
3
|
+
interface DocumentCardProps {
|
|
4
|
+
doc: ExtractionDocument;
|
|
5
|
+
isFlagged: boolean;
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
onToggle: (docId: string) => void;
|
|
8
|
+
editingKey: string | null;
|
|
9
|
+
editVal: string;
|
|
10
|
+
edits: Record<string, string>;
|
|
11
|
+
onStartEdit: (docId: string, fieldIdx: number, val: string) => void;
|
|
12
|
+
onSaveEdit: (docId: string, fieldIdx: number) => void;
|
|
13
|
+
onCancelEdit: () => void;
|
|
14
|
+
onEditValChange: (val: string) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare function DocumentCard({ doc, isFlagged, isOpen, onToggle, editingKey, editVal, edits, onStartEdit, onSaveEdit, onCancelEdit, onEditValChange, }: DocumentCardProps): React.JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DocumentCard = DocumentCard;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const FieldRow_1 = require("./FieldRow");
|
|
9
|
+
function DocumentCard({ doc, isFlagged, isOpen, onToggle, editingKey, editVal, edits, onStartEdit, onSaveEdit, onCancelEdit, onEditValChange, }) {
|
|
10
|
+
const flagsInDoc = doc.fields.filter((f, i) => f.status === "review" && edits[doc.docId + "-" + i] === undefined).length;
|
|
11
|
+
const editsInDoc = doc.fields.filter((_, i) => edits[doc.docId + "-" + i] !== undefined).length;
|
|
12
|
+
const borderColor = isFlagged && flagsInDoc > 0
|
|
13
|
+
? "rgba(251,154,29,0.25)"
|
|
14
|
+
: editsInDoc > 0
|
|
15
|
+
? "rgba(36,131,132,0.25)"
|
|
16
|
+
: "#2E3160";
|
|
17
|
+
return (react_1.default.createElement("div", { style: {
|
|
18
|
+
background: "#0E1133",
|
|
19
|
+
border: "1px solid " + borderColor,
|
|
20
|
+
borderRadius: 12,
|
|
21
|
+
overflow: "hidden",
|
|
22
|
+
boxShadow: "0 2px 12px rgba(6,8,33,0.5)",
|
|
23
|
+
transition: "border-color .3s",
|
|
24
|
+
} },
|
|
25
|
+
react_1.default.createElement("div", { onClick: () => onToggle(doc.docId), style: {
|
|
26
|
+
padding: "12px 16px",
|
|
27
|
+
display: "flex",
|
|
28
|
+
alignItems: "center",
|
|
29
|
+
gap: 10,
|
|
30
|
+
cursor: "pointer",
|
|
31
|
+
borderBottom: isOpen ? "1px solid #2E3160" : "none",
|
|
32
|
+
} },
|
|
33
|
+
react_1.default.createElement("div", { style: {
|
|
34
|
+
width: 30,
|
|
35
|
+
height: 30,
|
|
36
|
+
borderRadius: 7,
|
|
37
|
+
background: isFlagged && flagsInDoc > 0
|
|
38
|
+
? "rgba(251,154,29,0.08)"
|
|
39
|
+
: editsInDoc > 0
|
|
40
|
+
? "rgba(36,131,132,0.10)"
|
|
41
|
+
: "#171B44",
|
|
42
|
+
border: "1px solid " +
|
|
43
|
+
(isFlagged && flagsInDoc > 0
|
|
44
|
+
? "rgba(251,154,29,0.25)"
|
|
45
|
+
: editsInDoc > 0
|
|
46
|
+
? "rgba(36,131,132,0.2)"
|
|
47
|
+
: "#2E3160"),
|
|
48
|
+
display: "flex",
|
|
49
|
+
alignItems: "center",
|
|
50
|
+
justifyContent: "center",
|
|
51
|
+
flexShrink: 0,
|
|
52
|
+
} },
|
|
53
|
+
react_1.default.createElement("span", { className: "font-tax-axis-mono", style: {
|
|
54
|
+
fontSize: 10,
|
|
55
|
+
fontWeight: 600,
|
|
56
|
+
color: isFlagged && flagsInDoc > 0
|
|
57
|
+
? "#FB9A1D"
|
|
58
|
+
: editsInDoc > 0
|
|
59
|
+
? "#A1E5E6"
|
|
60
|
+
: "#E6E8F5",
|
|
61
|
+
} }, doc.code)),
|
|
62
|
+
react_1.default.createElement("div", { style: { flex: 1, minWidth: 0 } },
|
|
63
|
+
react_1.default.createElement("div", { className: "text-[13px] font-semibold text-white font-tax-axis-head" }, doc.docName),
|
|
64
|
+
react_1.default.createElement("div", { className: "text-[11px] text-tax-axis-text-2 font-tax-axis-body mt-px" }, flagsInDoc > 0 ? (react_1.default.createElement("span", { style: { color: "#FB9A1D" } },
|
|
65
|
+
flagsInDoc,
|
|
66
|
+
" of ",
|
|
67
|
+
doc.fields.length,
|
|
68
|
+
" field",
|
|
69
|
+
doc.fields.length > 1 ? "s" : "",
|
|
70
|
+
" flagged")) : editsInDoc > 0 ? (react_1.default.createElement("span", { style: { color: "#A1E5E6" } },
|
|
71
|
+
editsInDoc,
|
|
72
|
+
" corrected \u00B7 ",
|
|
73
|
+
doc.fields.length,
|
|
74
|
+
" field",
|
|
75
|
+
doc.fields.length > 1 ? "s" : "")) : (react_1.default.createElement("span", null,
|
|
76
|
+
doc.fields.length,
|
|
77
|
+
" field",
|
|
78
|
+
doc.fields.length > 1 ? "s" : "",
|
|
79
|
+
" \u00B7 all verified")))),
|
|
80
|
+
isFlagged && flagsInDoc > 0 && (react_1.default.createElement("span", { className: "font-tax-axis-mono", style: {
|
|
81
|
+
fontSize: 10,
|
|
82
|
+
fontWeight: 600,
|
|
83
|
+
color: "#FB9A1D",
|
|
84
|
+
background: "rgba(251,154,29,0.08)",
|
|
85
|
+
padding: "2px 8px",
|
|
86
|
+
borderRadius: 4,
|
|
87
|
+
} }, "REVIEW")),
|
|
88
|
+
editsInDoc > 0 && flagsInDoc === 0 && (react_1.default.createElement("span", { className: "font-tax-axis-mono", style: {
|
|
89
|
+
fontSize: 10,
|
|
90
|
+
fontWeight: 600,
|
|
91
|
+
color: "#248384",
|
|
92
|
+
background: "rgba(36,131,132,0.10)",
|
|
93
|
+
padding: "2px 8px",
|
|
94
|
+
borderRadius: 4,
|
|
95
|
+
} }, "EDITED")),
|
|
96
|
+
!isFlagged && editsInDoc === 0 && (react_1.default.createElement("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none" },
|
|
97
|
+
react_1.default.createElement("path", { d: "M2.5 6l3 3 4.5-5", stroke: "#34D399", strokeWidth: "1.5", strokeLinecap: "round" }))),
|
|
98
|
+
react_1.default.createElement("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", style: {
|
|
99
|
+
transform: isOpen ? "rotate(180deg)" : "none",
|
|
100
|
+
transition: "transform .2s",
|
|
101
|
+
flexShrink: 0,
|
|
102
|
+
} },
|
|
103
|
+
react_1.default.createElement("path", { d: "M3 4.5l3 3 3-3", stroke: "#E6E8F5", strokeWidth: "1.5", strokeLinecap: "round" }))),
|
|
104
|
+
isOpen && (react_1.default.createElement("div", { style: { padding: "4px 16px 8px" } }, doc.fields.map((f, i) => (react_1.default.createElement(FieldRow_1.FieldRow, { key: i, doc: doc, field: f, idx: i, isLast: i === doc.fields.length - 1, editingKey: editingKey, editVal: editVal, edits: edits, onStartEdit: onStartEdit, onSaveEdit: onSaveEdit, onCancelEdit: onCancelEdit, onEditValChange: onEditValChange })))))));
|
|
105
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ExtractionDocument, ExtractionField } from "../../lib/types";
|
|
3
|
+
interface FieldRowProps {
|
|
4
|
+
doc: ExtractionDocument;
|
|
5
|
+
field: ExtractionField;
|
|
6
|
+
idx: number;
|
|
7
|
+
isLast: boolean;
|
|
8
|
+
editingKey: string | null;
|
|
9
|
+
editVal: string;
|
|
10
|
+
edits: Record<string, string>;
|
|
11
|
+
onStartEdit: (docId: string, fieldIdx: number, val: string) => void;
|
|
12
|
+
onSaveEdit: (docId: string, fieldIdx: number) => void;
|
|
13
|
+
onCancelEdit: () => void;
|
|
14
|
+
onEditValChange: (val: string) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare function FieldRow({ doc, field, idx, isLast, editingKey, editVal, edits, onStartEdit, onSaveEdit, onCancelEdit, onEditValChange, }: FieldRowProps): React.JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.FieldRow = FieldRow;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
9
|
+
// FieldRow — single extracted value row with inline editing
|
|
10
|
+
// Ported from mock (App.jsx:676-697).
|
|
11
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
12
|
+
// Strip everything except digits and a single decimal point
|
|
13
|
+
const stripToNum = (v) => {
|
|
14
|
+
const stripped = v.replace(/[^0-9.]/g, "");
|
|
15
|
+
const parts = stripped.split(".");
|
|
16
|
+
if (parts.length <= 1)
|
|
17
|
+
return stripped;
|
|
18
|
+
return parts[0] + "." + parts.slice(1).join("");
|
|
19
|
+
};
|
|
20
|
+
// Format a raw numeric string with commas: "65000" → "65,000"
|
|
21
|
+
const fmtComma = (v) => {
|
|
22
|
+
const parts = v.split(".");
|
|
23
|
+
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
24
|
+
return parts.join(".");
|
|
25
|
+
};
|
|
26
|
+
// Format for display: raw number string → "$65,000"
|
|
27
|
+
const fmtDisplay = (v) => {
|
|
28
|
+
if (!v)
|
|
29
|
+
return v;
|
|
30
|
+
const raw = stripToNum(v);
|
|
31
|
+
if (!raw)
|
|
32
|
+
return v;
|
|
33
|
+
return "$" + fmtComma(raw);
|
|
34
|
+
};
|
|
35
|
+
function FieldRow({ doc, field, idx, isLast, editingKey, editVal, edits, onStartEdit, onSaveEdit, onCancelEdit, onEditValChange, }) {
|
|
36
|
+
const k = doc.docId + "-" + idx;
|
|
37
|
+
const isEditing = editingKey === k;
|
|
38
|
+
const wasEdited = edits[k] !== undefined;
|
|
39
|
+
const rawVal = wasEdited ? edits[k] : field.value;
|
|
40
|
+
const displayVal = wasEdited ? fmtDisplay(rawVal) : rawVal;
|
|
41
|
+
const isFlagged = field.status === "review" && !wasEdited;
|
|
42
|
+
return (react_1.default.createElement("div", null,
|
|
43
|
+
react_1.default.createElement("div", { style: {
|
|
44
|
+
display: "grid",
|
|
45
|
+
gridTemplateColumns: "1.3fr .7fr 1fr .3fr",
|
|
46
|
+
padding: "12px 0",
|
|
47
|
+
borderBottom: isLast ? "none" : "1px solid #2E3160",
|
|
48
|
+
alignItems: "center",
|
|
49
|
+
gap: 8,
|
|
50
|
+
} },
|
|
51
|
+
react_1.default.createElement("span", { className: "text-[14px] text-white font-tax-axis-body font-medium" }, field.field),
|
|
52
|
+
react_1.default.createElement("span", { className: "text-[12px] text-tax-axis-text-2 font-tax-axis-mono", style: { letterSpacing: 0.3 } }, field.line),
|
|
53
|
+
isEditing ? (react_1.default.createElement("div", { style: { display: "flex", gap: 4, alignItems: "center" } },
|
|
54
|
+
react_1.default.createElement("input", { type: "text", value: editVal, onChange: (e) => onEditValChange(stripToNum(e.target.value)), autoFocus: true, onKeyDown: (e) => {
|
|
55
|
+
if (e.key === "Enter")
|
|
56
|
+
onSaveEdit(doc.docId, idx);
|
|
57
|
+
if (e.key === "Escape")
|
|
58
|
+
onCancelEdit();
|
|
59
|
+
}, style: {
|
|
60
|
+
width: "100%",
|
|
61
|
+
padding: "6px 10px",
|
|
62
|
+
borderRadius: 5,
|
|
63
|
+
border: "1px solid rgba(161,229,230,0.3)",
|
|
64
|
+
fontSize: 15,
|
|
65
|
+
fontWeight: 700,
|
|
66
|
+
color: "#FFFFFF",
|
|
67
|
+
background: "#171B44",
|
|
68
|
+
outline: "none",
|
|
69
|
+
fontFamily: "inherit",
|
|
70
|
+
letterSpacing: "-0.2px",
|
|
71
|
+
} }),
|
|
72
|
+
react_1.default.createElement("button", { onClick: () => onSaveEdit(doc.docId, idx), style: {
|
|
73
|
+
background: "#248384",
|
|
74
|
+
border: "none",
|
|
75
|
+
borderRadius: 4,
|
|
76
|
+
width: 22,
|
|
77
|
+
height: 22,
|
|
78
|
+
display: "flex",
|
|
79
|
+
alignItems: "center",
|
|
80
|
+
justifyContent: "center",
|
|
81
|
+
flexShrink: 0,
|
|
82
|
+
cursor: "pointer",
|
|
83
|
+
} },
|
|
84
|
+
react_1.default.createElement("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none" },
|
|
85
|
+
react_1.default.createElement("path", { d: "M2 5l2.5 2.5L8 3", stroke: "#FFFFFF", strokeWidth: "1.5", strokeLinecap: "round" }))),
|
|
86
|
+
react_1.default.createElement("button", { onClick: onCancelEdit, style: {
|
|
87
|
+
background: "#171B44",
|
|
88
|
+
border: "1px solid #2E3160",
|
|
89
|
+
borderRadius: 4,
|
|
90
|
+
width: 22,
|
|
91
|
+
height: 22,
|
|
92
|
+
display: "flex",
|
|
93
|
+
alignItems: "center",
|
|
94
|
+
justifyContent: "center",
|
|
95
|
+
flexShrink: 0,
|
|
96
|
+
cursor: "pointer",
|
|
97
|
+
} },
|
|
98
|
+
react_1.default.createElement("svg", { width: "8", height: "8", viewBox: "0 0 8 8", fill: "none" },
|
|
99
|
+
react_1.default.createElement("path", { d: "M1.5 1.5l5 5M6.5 1.5l-5 5", stroke: "#E6E8F5", strokeWidth: "1.2", strokeLinecap: "round" }))))) : (react_1.default.createElement("div", { onClick: () => onStartEdit(doc.docId, idx, stripToNum(rawVal)), style: {
|
|
100
|
+
display: "flex",
|
|
101
|
+
alignItems: "center",
|
|
102
|
+
gap: 6,
|
|
103
|
+
cursor: "pointer",
|
|
104
|
+
padding: "2px 6px",
|
|
105
|
+
marginLeft: "-6px",
|
|
106
|
+
borderRadius: 5,
|
|
107
|
+
transition: "all .15s",
|
|
108
|
+
background: isFlagged
|
|
109
|
+
? "rgba(251,154,29,0.08)"
|
|
110
|
+
: wasEdited
|
|
111
|
+
? "rgba(36,131,132,0.08)"
|
|
112
|
+
: "transparent",
|
|
113
|
+
} },
|
|
114
|
+
react_1.default.createElement("span", { style: {
|
|
115
|
+
fontSize: 16,
|
|
116
|
+
fontWeight: 700,
|
|
117
|
+
color: isFlagged ? "#FFFFFF" : wasEdited ? "#A1E5E6" : "#FFFFFF",
|
|
118
|
+
fontFamily: "inherit",
|
|
119
|
+
letterSpacing: "-0.2px",
|
|
120
|
+
} }, displayVal),
|
|
121
|
+
wasEdited && (react_1.default.createElement("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none" },
|
|
122
|
+
react_1.default.createElement("path", { d: "M8.5 1.5L3.5 6.5 1.5 4.5", stroke: "#248384", strokeWidth: "1.2", strokeLinecap: "round", strokeLinejoin: "round" }))),
|
|
123
|
+
!wasEdited && (react_1.default.createElement("svg", { width: "9", height: "9", viewBox: "0 0 12 12", fill: "none", style: { opacity: 0.25 } },
|
|
124
|
+
react_1.default.createElement("path", { d: "M8.5 1.5l2 2-7 7H1.5V8.5z", stroke: isFlagged ? "#FB9A1D" : "#E6E8F5", strokeWidth: "1.2", strokeLinecap: "round", strokeLinejoin: "round" }))))),
|
|
125
|
+
react_1.default.createElement("div", { style: { textAlign: "center" } }, (wasEdited || field.status === "pass") && !isFlagged ? (react_1.default.createElement("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none" },
|
|
126
|
+
react_1.default.createElement("path", { d: "M2.5 6l3 3 4.5-5", stroke: "#34D399", strokeWidth: "1.5", strokeLinecap: "round" }))) : null)),
|
|
127
|
+
(isFlagged || wasEdited) && field.strategies.length > 0 && (react_1.default.createElement("div", { style: { display: "flex", gap: 4, flexWrap: "wrap", paddingBottom: 8 } }, field.strategies.map((s) => (react_1.default.createElement("span", { key: s, style: {
|
|
128
|
+
fontSize: 10,
|
|
129
|
+
fontWeight: 500,
|
|
130
|
+
color: "#E6E8F5",
|
|
131
|
+
padding: "2px 8px",
|
|
132
|
+
border: "1px solid #2E3160",
|
|
133
|
+
borderRadius: 4,
|
|
134
|
+
fontFamily: "inherit",
|
|
135
|
+
letterSpacing: 0.2,
|
|
136
|
+
} }, s)))))));
|
|
137
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PurposeBlock = PurposeBlock;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
function PurposeBlock({ totalFields, totalDocs }) {
|
|
9
|
+
return (react_1.default.createElement("div", { className: "mb-[18px] pb-[18px]", style: { borderBottom: "1px solid rgba(46,49,96,1)" } },
|
|
10
|
+
react_1.default.createElement("div", { className: "text-[11px] font-semibold font-tax-axis-mono uppercase mb-2", style: { color: "#A1E5E6", letterSpacing: "1.2px" } }, "Step 1 of 2 \u2014 Verify Extracted Data"),
|
|
11
|
+
react_1.default.createElement("div", { className: "text-[18px] font-semibold text-white font-tax-axis-head mb-2 leading-[1.3]" }, "Confirm the values TaxAxis pulled from your client's documents."),
|
|
12
|
+
react_1.default.createElement("div", { className: "text-[13px] text-tax-axis-text-2 font-tax-axis-body leading-[1.55]", style: { maxWidth: 640 } },
|
|
13
|
+
"TaxAxis extracted ",
|
|
14
|
+
totalFields,
|
|
15
|
+
" values from ",
|
|
16
|
+
totalDocs,
|
|
17
|
+
" documents. Values flagged for review had lower extraction confidence and need your eyes. Click any flagged value to correct it. When you're done, the Intelligence Report tab unlocks.")));
|
|
18
|
+
}
|