@paro.io/expert-shared-components 1.14.80 → 1.14.81

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.
@@ -1,10 +1,30 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
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;
4
24
  };
5
25
  Object.defineProperty(exports, "__esModule", { value: true });
6
26
  exports.TaxAxisIntake = TaxAxisIntake;
7
- const react_1 = __importDefault(require("react"));
27
+ const react_1 = __importStar(require("react"));
8
28
  const react_hook_form_1 = require("react-hook-form");
9
29
  const yup_1 = require("@hookform/resolvers/yup");
10
30
  const intakeSchema_1 = require("./intakeSchema");
@@ -13,6 +33,10 @@ const RefineAnalysisSection_1 = require("./RefineAnalysisSection");
13
33
  const CpaIntakeQuestionsSection_1 = require("./CpaIntakeQuestionsSection");
14
34
  const StrategyRadar_1 = require("./StrategyRadar");
15
35
  const IntakeCtaCards_1 = require("./IntakeCtaCards");
36
+ /* Dev-only scenario selector: visible on localhost and parodev hostnames */
37
+ const isDev = typeof window !== "undefined" &&
38
+ (window.location.hostname === "localhost" ||
39
+ window.location.hostname.includes("parodev"));
16
40
  function TaxAxisIntake({ userContext = "expert", onProspect, onFullAnalysis, initialProfile, }) {
17
41
  const methods = (0, react_hook_form_1.useForm)({
18
42
  resolver: (0, yup_1.yupResolver)(intakeSchema_1.intakeSchema), // yupResolver generic incompatibility with RHF v7 — cast is intentional
@@ -20,6 +44,19 @@ function TaxAxisIntake({ userContext = "expert", onProspect, onFullAnalysis, ini
20
44
  mode: "onChange",
21
45
  });
22
46
  const profile = methods.watch();
47
+ const [selectedScenario, setSelectedScenario] = (0, react_1.useState)("");
48
+ const handleLoadScenario = (key) => {
49
+ setSelectedScenario(key);
50
+ if (!key) {
51
+ // "Clear form" — reset to blank defaults
52
+ methods.reset(Object.assign(Object.assign({}, intakeSchema_1.intakeDefaultValues), initialProfile));
53
+ return;
54
+ }
55
+ const scenario = intakeSchema_1.TEST_SCENARIOS[key];
56
+ if (scenario) {
57
+ methods.reset(Object.assign(Object.assign({}, intakeSchema_1.intakeDefaultValues), scenario.values));
58
+ }
59
+ };
23
60
  const handleProspect = () => {
24
61
  methods.handleSubmit((valid) => onProspect(valid), () => { })();
25
62
  };
@@ -27,6 +64,15 @@ function TaxAxisIntake({ userContext = "expert", onProspect, onFullAnalysis, ini
27
64
  methods.handleSubmit((valid) => onFullAnalysis(valid), () => { })();
28
65
  };
29
66
  return (react_1.default.createElement(react_hook_form_1.FormProvider, Object.assign({}, methods),
67
+ isDev && (react_1.default.createElement("div", { className: "mb-4 rounded-lg border border-amber-500/40 bg-amber-950/30 p-3" },
68
+ react_1.default.createElement("label", { className: "block text-[11px] font-semibold tracking-wide text-amber-400 mb-1" }, "DEV: Load Test Scenario"),
69
+ react_1.default.createElement("div", { className: "relative" },
70
+ react_1.default.createElement("select", { value: selectedScenario, onChange: (e) => handleLoadScenario(e.target.value), className: "w-full appearance-none rounded-md border border-amber-500/30 bg-tax-axis-surface px-3 py-2 pr-8 text-sm text-white focus:border-amber-400 focus:outline-none focus:ring-1 focus:ring-amber-400/50" },
71
+ react_1.default.createElement("option", { value: "" }, "\u2014 Clear / blank form \u2014"),
72
+ Object.entries(intakeSchema_1.TEST_SCENARIOS).map(([key, { label }]) => (react_1.default.createElement("option", { key: key, value: key }, label)))),
73
+ react_1.default.createElement("svg", { className: "pointer-events-none absolute right-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-amber-400/60", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" },
74
+ react_1.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }))),
75
+ react_1.default.createElement("p", { className: "mt-1.5 text-[10px] text-amber-400/50" }, "Pre-fills all fields for testing. Not visible in production."))),
30
76
  react_1.default.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-5" },
31
77
  react_1.default.createElement("div", { className: "flex flex-col gap-4" },
32
78
  react_1.default.createElement(ClientParametersSection_1.ClientParametersSection, { userContext: userContext }),
@@ -148,4 +148,8 @@ export declare const intakeSchema: Yup.ObjectSchema<import("yup/lib/object").Ass
148
148
  familyEmployed: Yup.StringSchema<string, import("yup/lib/types").AnyObject, string>;
149
149
  period: Yup.StringSchema<string, import("yup/lib/types").AnyObject, string>;
150
150
  }>>>;
151
+ export declare const TEST_SCENARIOS: Record<string, {
152
+ label: string;
153
+ values: Partial<ClientProfile>;
154
+ }>;
151
155
  export declare const intakeDefaultValues: Partial<ClientProfile>;
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.intakeDefaultValues = exports.intakeSchema = void 0;
26
+ exports.intakeDefaultValues = exports.TEST_SCENARIOS = exports.intakeSchema = void 0;
27
27
  const Yup = __importStar(require("yup"));
28
28
  exports.intakeSchema = Yup.object().shape({
29
29
  bizName: Yup.string().required("Business name required").ensure(),
@@ -138,4 +138,116 @@ const _BLACKRIDGE_FIXTURE = {
138
138
  familyEmployed: "No",
139
139
  period: "Full Year",
140
140
  };
141
- exports.intakeDefaultValues = _BLACKRIDGE_FIXTURE;
141
+ /* ── Ironclad Systems, Inc. C-Corp Test Fixture ── */
142
+ const _IRONCLAD_FIXTURE = {
143
+ bizName: "Ironclad Systems, Inc.",
144
+ cpaName: "Amar",
145
+ entity: "C-Corporation",
146
+ industry: "Technology",
147
+ revenue: "1850000",
148
+ netIncome: "420000",
149
+ ownerComp: "185000",
150
+ employees: "12",
151
+ year: "2023",
152
+ states: ["GA"],
153
+ filingStatus: "MFJ",
154
+ age: "48",
155
+ sstb: "No",
156
+ ownsRealEstate: "No",
157
+ itemizesDeductions: "No",
158
+ singleOwner: "Yes",
159
+ partners: [],
160
+ equipmentPurchased: "85000",
161
+ realEstateValue: "0",
162
+ capitalGains: "0",
163
+ federalRate: "21%",
164
+ stateRate: "5.39",
165
+ taxDataYears: "3 years",
166
+ riskTolerance: "3",
167
+ overtimePremium: "0",
168
+ tipIncomePct: "0",
169
+ retirementContributions: "0",
170
+ hdhpEnrolled: "No",
171
+ hsaContributions: "0",
172
+ wotcHires: "No",
173
+ familyEmployed: "No",
174
+ period: "Full Year",
175
+ };
176
+ /* ── Meridian Consulting Group, Inc. — S-Corp Test Fixture ── */
177
+ const _MERIDIAN_FIXTURE = {
178
+ bizName: "Meridian Consulting Group, Inc.",
179
+ cpaName: "Amar",
180
+ entity: "S-Corporation",
181
+ industry: "Professional Services",
182
+ revenue: "1240000",
183
+ netIncome: "310000",
184
+ ownerComp: "150000",
185
+ employees: "8",
186
+ year: "2023",
187
+ states: ["IL"],
188
+ filingStatus: "MFJ",
189
+ age: "52",
190
+ sstb: "Yes",
191
+ ownsRealEstate: "No",
192
+ itemizesDeductions: "No",
193
+ singleOwner: "Yes",
194
+ partners: [],
195
+ equipmentPurchased: "35000",
196
+ realEstateValue: "0",
197
+ capitalGains: "0",
198
+ federalRate: "32%",
199
+ stateRate: "4.95",
200
+ taxDataYears: "3 years",
201
+ riskTolerance: "3",
202
+ overtimePremium: "0",
203
+ tipIncomePct: "0",
204
+ retirementContributions: "0",
205
+ hdhpEnrolled: "No",
206
+ hsaContributions: "0",
207
+ wotcHires: "No",
208
+ familyEmployed: "No",
209
+ period: "Full Year",
210
+ };
211
+ /* ── Riverstone Creative Studio — Sole Prop Test Fixture ── */
212
+ const _RIVERSTONE_FIXTURE = {
213
+ bizName: "Riverstone Creative Studio",
214
+ cpaName: "Amar",
215
+ entity: "Sole Proprietor",
216
+ industry: "Professional Services",
217
+ revenue: "270400",
218
+ netIncome: "159457",
219
+ ownerComp: "0",
220
+ employees: "0",
221
+ year: "2023",
222
+ states: ["CO"],
223
+ filingStatus: "Single",
224
+ age: "38",
225
+ sstb: "No",
226
+ ownsRealEstate: "No",
227
+ itemizesDeductions: "No",
228
+ singleOwner: "Yes",
229
+ partners: [],
230
+ equipmentPurchased: "2900",
231
+ realEstateValue: "0",
232
+ capitalGains: "0",
233
+ federalRate: "24%",
234
+ stateRate: "4.40",
235
+ taxDataYears: "3 years",
236
+ riskTolerance: "3",
237
+ overtimePremium: "0",
238
+ tipIncomePct: "0",
239
+ retirementContributions: "0",
240
+ hdhpEnrolled: "No",
241
+ hsaContributions: "0",
242
+ wotcHires: "No",
243
+ familyEmployed: "No",
244
+ period: "Full Year",
245
+ };
246
+ exports.TEST_SCENARIOS = {
247
+ blackridge: { label: "Blackridge (Partnership, TX+CA)", values: _BLACKRIDGE_FIXTURE },
248
+ ironclad: { label: "Ironclad (C-Corp, GA)", values: _IRONCLAD_FIXTURE },
249
+ meridian: { label: "Meridian (S-Corp, IL)", values: _MERIDIAN_FIXTURE },
250
+ riverstone: { label: "Riverstone (Sole Prop, CO)", values: _RIVERSTONE_FIXTURE },
251
+ };
252
+ // Default to empty form — use TEST_SCENARIOS to load fixtures on demand
253
+ exports.intakeDefaultValues = _EMPTY_DEFAULTS;
@@ -95,8 +95,21 @@ function TaxAxisProspectReport({ profile, backendComputePayload, outputPayload,
95
95
  const maxMid = Math.max(...barData.map(b => b.mid), 1);
96
96
  // ═══ DOCUMENT GROUPING ═══
97
97
  const allDocsNeeded = [...new Set(eligible.flatMap(s => { var _a; return ((_a = strategyProspect_1.STRATEGY_PROSPECT[s.rank]) === null || _a === void 0 ? void 0 : _a.docsNeeded) || []; }))];
98
- const requiredDocs = ["Profit & Loss Statement (current year)", "Balance Sheet (current year)"];
99
- const recommendedDocs = ["Federal Tax Return (most recent)", "W-2 / Officer Compensation records"];
98
+ // Entity-specific document names
99
+ const entityType = profile.entity || 'Sole Proprietor';
100
+ const isPartnership = entityType === 'Partnership';
101
+ const isSCorp = entityType === 'S-Corporation';
102
+ const isCCorp = entityType === 'C-Corporation';
103
+ const requiredDocs = isPartnership
104
+ ? ["Form 1065 (Partnership Tax Return)", "Balance Sheet (current year)"]
105
+ : isSCorp
106
+ ? ["Form 1120-S (S-Corp Tax Return)", "Balance Sheet (current year)"]
107
+ : isCCorp
108
+ ? ["Form 1120 (C-Corp Tax Return)", "Balance Sheet (current year)"]
109
+ : ["Schedule C (Profit & Loss)", "Balance Sheet (current year)"];
110
+ const recommendedDocs = isPartnership
111
+ ? ["Schedule K-1 (Partner's Share)", "Partnership Agreement"]
112
+ : ["Federal Tax Return (most recent)", "W-2 / Officer Compensation records"];
100
113
  const conditionalDocs = allDocsNeeded.filter(d => !requiredDocs.includes(d) && !recommendedDocs.includes(d)).slice(0, 5);
101
114
  const sectionNums = remaining > 0
102
115
  ? { recommended: "02", additional: "03", sample: "04", documents: "05", nextSteps: "06" }
@@ -72,8 +72,8 @@ exports.SIDEBAR_LOOKUP = {
72
72
  body: "HSA contributions are deductible above the line and reduce AGI directly, regardless of whether the taxpayer itemizes. Eligibility is determined month-by-month based on HDHP coverage. The last-month rule allows full-year contributions if HDHP coverage is in place on December 1, subject to a 13-month testing period \u2014 coverage must continue through December 31 of the following year or contributions are recaptured plus a 10% additional tax."
73
73
  },
74
74
  "\u00A7401(k)": {
75
- title: "Solo 401(k) deadlines",
76
- body: "Plan documents must generally be signed by December 31 of the contribution year. SECURE 2.0 \u00A7317 lets sole proprietors with no common-law employees adopt a Solo 401(k) and make first-year employee deferrals as late as the personal tax filing deadline (without extensions). Employer contributions can be made up to the extended filing deadline for all entity types."
75
+ title: "Solo 401(k) — sole proprietors & single-owner entities only",
76
+ body: "Solo 401(k) plans are available only to sole proprietors and single-member LLCs with no common-law employees. Plan documents must be signed by December 31 of the contribution year. SECURE 2.0 \u00A7317 allows first-year employee deferrals to be made as late as the personal tax filing deadline (without extensions). Employer contributions can be made until the extended filing deadline. Partnerships, multi-member LLCs, S-Corps, and C-Corps must use other qualified retirement plans (SEP-IRA, SIMPLE IRA, 401(k))."
77
77
  },
78
78
  "\u00A71400Z": {
79
79
  title: "Opportunity Zone timing",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paro.io/expert-shared-components",
3
- "version": "1.14.80",
3
+ "version": "1.14.81",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {