@paro.io/expert-shared-components 1.14.60 → 1.14.62

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.
@@ -273,7 +273,7 @@ const TaxAxisShell = ({ taxAxisApi, userContext = 'expert', initialSessionId, in
273
273
  setGenerating(true);
274
274
  try {
275
275
  const input = buildProspectInput(nextProfile);
276
- const result = yield taxAxisApi.generateProspectReport(input);
276
+ const result = yield taxAxisApi.generateProspectReport(Object.assign(Object.assign({}, input), { freelancerId: sessionDefaults === null || sessionDefaults === void 0 ? void 0 : sessionDefaults.freelancerId }));
277
277
  if (result) {
278
278
  setBackendResults(result);
279
279
  }
@@ -284,7 +284,7 @@ const TaxAxisShell = ({ taxAxisApi, userContext = 'expert', initialSessionId, in
284
284
  setGenerating(false);
285
285
  }
286
286
  setStep('PROSPECT_REPORT');
287
- }), [taxAxisApi]);
287
+ }), [taxAxisApi, sessionDefaults === null || sessionDefaults === void 0 ? void 0 : sessionDefaults.freelancerId]);
288
288
  const handleFullAnalysis = (0, react_1.useCallback)((nextProfile) => __awaiter(void 0, void 0, void 0, function* () {
289
289
  setProfile(nextProfile);
290
290
  setIsProspectFlow(false);
package/lib/index.d.ts CHANGED
@@ -29,3 +29,4 @@ export { TaxAxisPreparerWorkpaper } from './tax-axis';
29
29
  export { TaxAxisExtractionReview } from './tax-axis';
30
30
  export { TaxAxisProspectReport } from './tax-axis';
31
31
  export { TaxAxisPresentationMode } from './tax-axis';
32
+ export { TaxAxisShell } from './components/TaxAxis';
package/lib/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TaxAxisPresentationMode = exports.TaxAxisProspectReport = exports.TaxAxisExtractionReview = exports.TaxAxisPreparerWorkpaper = exports.TaxAxisClientReport = exports.TaxAxisDashboard = exports.TaxAxisProcessing = exports.TaxAxisDocuments = exports.TaxAxisIntake = exports.TaxAxisCard = exports.TaxAxisButton = exports.TaxAxisBadge = exports.SectionHeader = exports.ProjectIntelligence = exports.Escalations = exports.fileDownloader = exports.DiscussionSection = exports.fileUploader = exports.InvoiceCard = exports.ActiveProjectCard = exports.sharedUtils = exports.ServiceLinesTemplate = exports.HeaderNavBar = exports.DocumentCenter = exports.ProfileCompletedPercentage = exports.ExpertProfileHeader = exports.OrganizationChart = exports.FirmEmployeeSection = exports.ClientReferenceSection = exports.Reviews = exports.ReviewsTab = void 0;
3
+ exports.TaxAxisShell = exports.TaxAxisPresentationMode = exports.TaxAxisProspectReport = exports.TaxAxisExtractionReview = exports.TaxAxisPreparerWorkpaper = exports.TaxAxisClientReport = exports.TaxAxisDashboard = exports.TaxAxisProcessing = exports.TaxAxisDocuments = exports.TaxAxisIntake = exports.TaxAxisCard = exports.TaxAxisButton = exports.TaxAxisBadge = exports.SectionHeader = exports.ProjectIntelligence = exports.Escalations = exports.fileDownloader = exports.DiscussionSection = exports.fileUploader = exports.InvoiceCard = exports.ActiveProjectCard = exports.sharedUtils = exports.ServiceLinesTemplate = exports.HeaderNavBar = exports.DocumentCenter = exports.ProfileCompletedPercentage = exports.ExpertProfileHeader = exports.OrganizationChart = exports.FirmEmployeeSection = exports.ClientReferenceSection = exports.Reviews = exports.ReviewsTab = void 0;
4
4
  var ReviewsTab_1 = require("./components/ReviewsTab");
5
5
  Object.defineProperty(exports, "ReviewsTab", { enumerable: true, get: function () { return ReviewsTab_1.ReviewsTab; } });
6
6
  var Reviews_1 = require("./components/Reviews");
@@ -63,3 +63,5 @@ var tax_axis_12 = require("./tax-axis");
63
63
  Object.defineProperty(exports, "TaxAxisProspectReport", { enumerable: true, get: function () { return tax_axis_12.TaxAxisProspectReport; } });
64
64
  var tax_axis_13 = require("./tax-axis");
65
65
  Object.defineProperty(exports, "TaxAxisPresentationMode", { enumerable: true, get: function () { return tax_axis_13.TaxAxisPresentationMode; } });
66
+ var TaxAxis_1 = require("./components/TaxAxis");
67
+ Object.defineProperty(exports, "TaxAxisShell", { enumerable: true, get: function () { return TaxAxis_1.TaxAxisShell; } });
@@ -1,9 +1,12 @@
1
1
  import React from "react";
2
- import type { ClientProfile } from "../../lib/types";
2
+ import type { ClientProfile, Strategy, ComputedMap } from "../../lib/types";
3
3
  import type { TaxAxisScreenProps } from "../../lib/types";
4
4
  export interface TaxAxisClientReportProps extends TaxAxisScreenProps {
5
5
  profile: ClientProfile;
6
6
  onBack: () => void;
7
7
  onNavigatePreparer?: () => void;
8
+ liveStrategies?: Strategy[];
9
+ liveComputedMap?: ComputedMap;
10
+ engineRawOutput?: any;
8
11
  }
9
12
  export declare function TaxAxisClientReport({ profile, onBack, onNavigatePreparer }: TaxAxisClientReportProps): React.JSX.Element;
@@ -8,5 +8,7 @@ export interface TaxAxisDashboardProps extends TaxAxisScreenProps {
8
8
  onSend: () => void;
9
9
  onReset: () => void;
10
10
  onReviewData?: () => void;
11
+ llmResult?: any;
12
+ parsedDocuments?: any[];
11
13
  }
12
14
  export declare function TaxAxisDashboard({ profile, onDownloadClient, onDownloadPreparer, onPresent, onSend, onReset, onReviewData, userContext: _userContext, }: TaxAxisDashboardProps): React.JSX.Element;
@@ -4,5 +4,20 @@ export interface TaxAxisDocumentsProps extends TaxAxisScreenProps {
4
4
  profile: ClientProfile;
5
5
  onContinue: () => void;
6
6
  onBack: () => void;
7
+ entityType?: string;
8
+ onUploadDocument?: (doc: {
9
+ id: string;
10
+ }, file: File) => Promise<any>;
11
+ onDeleteDocument?: (documentId: string) => Promise<void>;
12
+ fetchUploadedDocuments?: () => Promise<any[]>;
13
+ jobId?: string;
14
+ onSaveReviewedField?: (documentId: string, reviewedData: Record<string, unknown>) => Promise<void>;
15
+ qboConnected?: boolean;
16
+ qboCompanyName?: string | null;
17
+ qboAuthorizeUrl?: string;
18
+ qboClientConfirmed?: boolean;
19
+ onImportQboReport?: (...args: any[]) => Promise<any>;
20
+ onQboConnected?: (companyName: string) => void;
21
+ onQboDisconnected?: () => void;
7
22
  }
8
23
  export declare function TaxAxisDocuments({ profile, onContinue, onBack, userContext: _userContext, }: TaxAxisDocumentsProps): React.JSX.Element;
@@ -34,6 +34,38 @@ const RefineAnalysisSection_1 = require("./RefineAnalysisSection");
34
34
  const CpaIntakeQuestionsSection_1 = require("./CpaIntakeQuestionsSection");
35
35
  const StrategyRadar_1 = require("./StrategyRadar");
36
36
  const IntakeCtaCards_1 = require("./IntakeCtaCards");
37
+ const DEMO_PROFILE = {
38
+ bizName: "Meridian Consulting Group, Inc.",
39
+ cpaName: "Sarah Chen, EA",
40
+ entity: "S-Corporation",
41
+ industry: "Professional Services",
42
+ period: "Full Year",
43
+ revenue: "2850000",
44
+ ownerComp: "185000",
45
+ employees: "14",
46
+ year: "2025",
47
+ states: ["IL"],
48
+ filingStatus: "MFJ",
49
+ age: "45",
50
+ sstb: "No",
51
+ ownsRealEstate: "Yes — Commercial",
52
+ itemizesDeductions: "Yes",
53
+ singleOwner: "Yes",
54
+ netIncome: "142000",
55
+ equipmentPurchased: "75000",
56
+ capitalGains: "50000",
57
+ federalRate: "24%",
58
+ stateRate: "4.95",
59
+ taxDataYears: "1 year",
60
+ riskTolerance: "3",
61
+ overtimePremium: "0",
62
+ tipIncomePct: "0",
63
+ retirementContributions: "22500",
64
+ hdhpEnrolled: "Yes",
65
+ hsaContributions: "0",
66
+ wotcHires: "Yes — Form 8850 submitted",
67
+ familyEmployed: "Yes",
68
+ };
37
69
  /** Returns a list of human-readable labels for missing required fields. */
38
70
  function getMissingFields(p) {
39
71
  const missing = [];
@@ -43,12 +75,9 @@ function getMissingFields(p) {
43
75
  missing.push("State");
44
76
  if (!p.revenue || (0, compute_1.parseNum)(p.revenue) <= 0)
45
77
  missing.push("Revenue");
46
- const fedPct = parseFloat((p.federalRate || "0").replace("%", ""));
47
- if (!fedPct || fedPct <= 0)
78
+ const fedStr = String(p.federalRate || "0").replace("%", "");
79
+ if (!parseFloat(fedStr) || parseFloat(fedStr) <= 0)
48
80
  missing.push("Federal Rate");
49
- const statePct = parseFloat((p.stateRate || "0").replace("%", ""));
50
- if (!statePct || statePct <= 0)
51
- missing.push("State Rate");
52
81
  return missing;
53
82
  }
54
83
  function TaxAxisIntake({ userContext = "expert", onProspect, onFullAnalysis, initialProfile, }) {
@@ -59,6 +88,37 @@ function TaxAxisIntake({ userContext = "expert", onProspect, onFullAnalysis, ini
59
88
  });
60
89
  const profile = methods.watch();
61
90
  const missingFields = (0, react_1.useMemo)(() => getMissingFields(profile), [profile]);
91
+ const [showDemo, setShowDemo] = (0, react_1.useState)(false);
92
+ const konamiRef = (0, react_1.useRef)({ keys: '', timer: null });
93
+ (0, react_1.useEffect)(() => {
94
+ const handler = (e) => {
95
+ var _a;
96
+ const tag = (_a = e.target) === null || _a === void 0 ? void 0 : _a.tagName;
97
+ if (tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT')
98
+ return;
99
+ const k = konamiRef.current;
100
+ k.keys += e.key.toLowerCase();
101
+ clearTimeout(k.timer);
102
+ k.timer = setTimeout(() => { k.keys = ''; }, 3000);
103
+ if (k.keys.includes('demo')) {
104
+ setShowDemo(true);
105
+ k.keys = '';
106
+ }
107
+ };
108
+ window.addEventListener('keydown', handler);
109
+ return () => window.removeEventListener('keydown', handler);
110
+ }, []);
111
+ const handleDemoToggle = () => {
112
+ const current = methods.getValues();
113
+ const isDemoFilled = current.bizName === DEMO_PROFILE.bizName;
114
+ if (isDemoFilled) {
115
+ methods.reset(Object.assign({}, intakeSchema_1.intakeDefaultValues));
116
+ }
117
+ else {
118
+ methods.reset(Object.assign(Object.assign({}, intakeSchema_1.intakeDefaultValues), DEMO_PROFILE));
119
+ }
120
+ setTimeout(() => methods.trigger(), 0);
121
+ };
62
122
  const handleProspect = () => {
63
123
  methods.handleSubmit((valid) => onProspect(valid), () => { })();
64
124
  };
@@ -67,7 +127,8 @@ function TaxAxisIntake({ userContext = "expert", onProspect, onFullAnalysis, ini
67
127
  };
68
128
  return (react_1.default.createElement(react_hook_form_1.FormProvider, Object.assign({}, methods),
69
129
  react_1.default.createElement("div", { className: "grid grid-cols-[1fr_1fr] gap-5" },
70
- react_1.default.createElement("div", { className: "flex flex-col gap-4" },
130
+ react_1.default.createElement("div", { className: "relative flex flex-col gap-4" },
131
+ showDemo && (react_1.default.createElement("button", { type: "button", onClick: handleDemoToggle, className: "absolute right-0 -top-1 text-[10px] text-tax-axis-text-4 opacity-40 hover:opacity-80 transition-opacity cursor-pointer bg-transparent border-none font-tax-axis-mono", style: { zIndex: 20 } }, "Demo")),
71
132
  react_1.default.createElement(ClientParametersSection_1.ClientParametersSection, { userContext: userContext }),
72
133
  react_1.default.createElement(RefineAnalysisSection_1.RefineAnalysisSection, { userContext: userContext }),
73
134
  react_1.default.createElement(CpaIntakeQuestionsSection_1.CpaIntakeQuestionsSection, { userContext: userContext }),
@@ -1,9 +1,14 @@
1
1
  import React from "react";
2
- import type { ClientProfile } from "../../lib/types";
2
+ import type { ClientProfile, Strategy, ComputedMap } from "../../lib/types";
3
3
  import type { TaxAxisScreenProps } from "../../lib/types";
4
4
  export interface TaxAxisPreparerWorkpaperProps extends TaxAxisScreenProps {
5
5
  profile: ClientProfile;
6
6
  onBack: () => void;
7
7
  onToggleToClient?: () => void;
8
+ liveStrategies?: Strategy[];
9
+ liveComputedMap?: ComputedMap;
10
+ cpaWorkflow?: any;
11
+ riskDisclosures?: any;
12
+ businessProfile?: any;
8
13
  }
9
14
  export declare function TaxAxisPreparerWorkpaper({ profile, onBack, onToggleToClient }: TaxAxisPreparerWorkpaperProps): React.JSX.Element;
@@ -3,5 +3,6 @@ import { ClientProfile, TaxAxisScreenProps } from "../../lib/types";
3
3
  export interface TaxAxisProcessingProps extends TaxAxisScreenProps {
4
4
  onComplete: () => void;
5
5
  profile?: ClientProfile;
6
+ reportReady?: boolean;
6
7
  }
7
8
  export declare function TaxAxisProcessing({ onComplete, profile, userContext: _userContext, }: TaxAxisProcessingProps): React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paro.io/expert-shared-components",
3
- "version": "1.14.60",
3
+ "version": "1.14.62",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {