@paro.io/expert-shared-components 1.14.63 → 1.14.64
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.
|
@@ -113,6 +113,36 @@ function entityTypeKey(entity) {
|
|
|
113
113
|
return undefined;
|
|
114
114
|
return (_a = ENTITY_DISPLAY_TO_KEY[entity]) !== null && _a !== void 0 ? _a : entity;
|
|
115
115
|
}
|
|
116
|
+
const GENERATING_STAGES = [
|
|
117
|
+
'Analyzing entity structure…',
|
|
118
|
+
'Evaluating deduction strategies…',
|
|
119
|
+
'Modeling tax scenarios…',
|
|
120
|
+
'Scoring strategy opportunities…',
|
|
121
|
+
'Generating prospect insights…',
|
|
122
|
+
];
|
|
123
|
+
function GeneratingOverlay() {
|
|
124
|
+
const [elapsed, setElapsed] = (0, react_1.useState)(0);
|
|
125
|
+
const [mounted, setMounted] = (0, react_1.useState)(false);
|
|
126
|
+
(0, react_1.useEffect)(() => { setMounted(true); }, []);
|
|
127
|
+
(0, react_1.useEffect)(() => {
|
|
128
|
+
const id = setInterval(() => setElapsed((s) => s + 1), 1000);
|
|
129
|
+
return () => clearInterval(id);
|
|
130
|
+
}, []);
|
|
131
|
+
const stageIdx = Math.min(Math.floor(elapsed / 9), GENERATING_STAGES.length - 1);
|
|
132
|
+
return (react_1.default.createElement("div", { className: 'fixed inset-0 z-[180] bg-black/25' },
|
|
133
|
+
react_1.default.createElement("div", { className: 'absolute left-1/2 top-1/3 -translate-x-1/2 rounded-xl bg-tax-axis-surface px-8 py-6 text-center shadow-lg border border-tax-axis-border', style: { maxWidth: 360, width: '100%' } },
|
|
134
|
+
react_1.default.createElement("div", { className: 'w-full h-1.5 rounded-full bg-tax-axis-border mb-4 overflow-hidden' },
|
|
135
|
+
react_1.default.createElement("div", { className: 'h-full rounded-full', style: {
|
|
136
|
+
background: 'linear-gradient(90deg, #248384, #2dd4bf)',
|
|
137
|
+
width: mounted ? '95%' : '0%',
|
|
138
|
+
transition: 'width 45s ease-out',
|
|
139
|
+
} })),
|
|
140
|
+
react_1.default.createElement("div", { className: 'text-sm font-semibold text-white mb-1 font-tax-axis-body' }, "Generating Prospect Report"),
|
|
141
|
+
react_1.default.createElement("div", { className: 'text-xs text-tax-axis-text-3 font-tax-axis-body mb-2', style: { minHeight: 18 } }, GENERATING_STAGES[stageIdx]),
|
|
142
|
+
react_1.default.createElement("div", { className: 'text-[10px] text-tax-axis-text-4 font-tax-axis-mono' },
|
|
143
|
+
elapsed,
|
|
144
|
+
"s elapsed"))));
|
|
145
|
+
}
|
|
116
146
|
function buildSessionInput(profile) {
|
|
117
147
|
const taxYear = Number(profile.year) || new Date().getFullYear();
|
|
118
148
|
return {
|
|
@@ -574,11 +604,7 @@ const TaxAxisShell = ({ taxAxisApi, userContext = 'expert', initialSessionId, in
|
|
|
574
604
|
react_1.default.createElement("div", { className: 'flex items-center gap-2' },
|
|
575
605
|
react_1.default.createElement("div", { className: 'w-3 h-3 rounded-full animate-spin flex-shrink-0', style: { border: '2px solid transparent', borderTopColor: '#248384' } }),
|
|
576
606
|
busyMessage)))),
|
|
577
|
-
generating &&
|
|
578
|
-
react_1.default.createElement("div", { className: 'absolute left-1/2 top-1/3 -translate-x-1/2 rounded-xl bg-tax-axis-surface px-8 py-6 text-center shadow-lg border border-tax-axis-border', style: { maxWidth: 360 } },
|
|
579
|
-
react_1.default.createElement("div", { className: 'w-6 h-6 rounded-full animate-spin mx-auto mb-3', style: { border: '2.5px solid transparent', borderTopColor: '#248384' } }),
|
|
580
|
-
react_1.default.createElement("div", { className: 'text-sm font-semibold text-white mb-1 font-tax-axis-body' }, "Generating Prospect Report"),
|
|
581
|
-
react_1.default.createElement("div", { className: 'text-xs text-tax-axis-text-3 font-tax-axis-body' }, "Analyzing strategies and generating insights...")))),
|
|
607
|
+
generating && react_1.default.createElement(GeneratingOverlay, null),
|
|
582
608
|
currentView));
|
|
583
609
|
};
|
|
584
610
|
exports.TaxAxisShell = TaxAxisShell;
|
|
@@ -88,26 +88,6 @@ function TaxAxisIntake({ userContext = "expert", onProspect, onFullAnalysis, ini
|
|
|
88
88
|
});
|
|
89
89
|
const profile = methods.watch();
|
|
90
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
91
|
const handleDemoToggle = () => {
|
|
112
92
|
const current = methods.getValues();
|
|
113
93
|
const isDemoFilled = current.bizName === DEMO_PROFILE.bizName;
|
|
@@ -127,9 +107,17 @@ function TaxAxisIntake({ userContext = "expert", onProspect, onFullAnalysis, ini
|
|
|
127
107
|
};
|
|
128
108
|
return (react_1.default.createElement(react_hook_form_1.FormProvider, Object.assign({}, methods),
|
|
129
109
|
react_1.default.createElement("div", { className: "grid grid-cols-[1fr_1fr] gap-5" },
|
|
130
|
-
react_1.default.createElement("div", { className: "
|
|
131
|
-
|
|
132
|
-
|
|
110
|
+
react_1.default.createElement("div", { className: "flex flex-col gap-4" },
|
|
111
|
+
react_1.default.createElement("div", { onClick: (e) => {
|
|
112
|
+
var _a;
|
|
113
|
+
if (e.detail === 3) {
|
|
114
|
+
const tag = (_a = e.target) === null || _a === void 0 ? void 0 : _a.tagName;
|
|
115
|
+
if (tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT')
|
|
116
|
+
return;
|
|
117
|
+
handleDemoToggle();
|
|
118
|
+
}
|
|
119
|
+
} },
|
|
120
|
+
react_1.default.createElement(ClientParametersSection_1.ClientParametersSection, { userContext: userContext })),
|
|
133
121
|
react_1.default.createElement(RefineAnalysisSection_1.RefineAnalysisSection, { userContext: userContext }),
|
|
134
122
|
react_1.default.createElement(CpaIntakeQuestionsSection_1.CpaIntakeQuestionsSection, { userContext: userContext }),
|
|
135
123
|
react_1.default.createElement(IntakeCtaCards_1.IntakeCtaCards, { onProspect: handleProspect, onFullAnalysis: handleFull, userContext: userContext, missingFields: missingFields })),
|