policyengine-household-wizard 0.1.0 → 0.3.0
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/README.md +50 -5
- package/dist/WizardReviewList-DhLx8Bla.cjs +1 -0
- package/dist/WizardReviewList-oY1HqmLw.js +354 -0
- package/dist/index-B_OXaS4a.cjs +1 -0
- package/dist/index-CIL8FXNR.cjs +1 -0
- package/dist/index-DWM0giHt.js +220 -0
- package/dist/index-fgLnXugs.js +225 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +34 -28
- package/dist/primitives/WizardReviewList.d.ts +3 -2
- package/dist/primitives/WizardReviewList.d.ts.map +1 -1
- package/dist/primitives/index.d.ts +12 -10
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/types.d.ts +18 -0
- package/dist/primitives/types.d.ts.map +1 -1
- package/dist/primitives/useWizardStepFocus.d.ts +13 -0
- package/dist/primitives/useWizardStepFocus.d.ts.map +1 -0
- package/dist/primitives/useWizardSteps.d.ts +2 -2
- package/dist/primitives/useWizardSteps.d.ts.map +1 -1
- package/dist/primitives.cjs +1 -1
- package/dist/primitives.d.ts +1 -1
- package/dist/primitives.js +5 -4
- package/dist/uk-household/adapters/householdImpactRequest.d.ts +91 -0
- package/dist/uk-household/adapters/householdImpactRequest.d.ts.map +1 -0
- package/dist/uk-household/adapters/index.d.ts +2 -0
- package/dist/uk-household/adapters/index.d.ts.map +1 -0
- package/dist/uk-household/children.d.ts +18 -0
- package/dist/uk-household/children.d.ts.map +1 -0
- package/dist/uk-household/codes.d.ts +22 -0
- package/dist/uk-household/codes.d.ts.map +1 -0
- package/dist/uk-household/defaults.d.ts +56 -0
- package/dist/uk-household/defaults.d.ts.map +1 -0
- package/dist/uk-household/draft.d.ts +37 -0
- package/dist/uk-household/draft.d.ts.map +1 -0
- package/dist/uk-household/index.d.ts +10 -0
- package/dist/uk-household/index.d.ts.map +1 -0
- package/dist/uk-household/serialize.d.ts +4 -0
- package/dist/uk-household/serialize.d.ts.map +1 -0
- package/dist/uk-household/statePension.d.ts +42 -0
- package/dist/uk-household/statePension.d.ts.map +1 -0
- package/dist/uk-household/types.d.ts +134 -0
- package/dist/uk-household/types.d.ts.map +1 -0
- package/dist/uk-household/validate.d.ts +59 -0
- package/dist/uk-household/validate.d.ts.map +1 -0
- package/dist/uk-household-adapters.cjs +1 -0
- package/dist/uk-household-adapters.d.ts +1 -0
- package/dist/uk-household-adapters.js +5 -0
- package/dist/uk-household.cjs +1 -0
- package/dist/uk-household.d.ts +1 -0
- package/dist/uk-household.js +220 -0
- package/dist/us-household/adapters/index.d.ts +1 -1
- package/dist/us-household/adapters/v1Payload.d.ts +119 -3
- package/dist/us-household/adapters/v1Payload.d.ts.map +1 -1
- package/dist/us-household/amount.d.ts +8 -0
- package/dist/us-household/amount.d.ts.map +1 -0
- package/dist/us-household/draft.d.ts +1 -1
- package/dist/us-household/index.d.ts +9 -8
- package/dist/us-household/index.d.ts.map +1 -1
- package/dist/us-household/normalize.d.ts +1 -1
- package/dist/us-household/normalize.d.ts.map +1 -1
- package/dist/us-household/serialize.d.ts +1 -1
- package/dist/us-household/serialize.d.ts.map +1 -1
- package/dist/us-household/tippedOccupations.d.ts +40 -0
- package/dist/us-household/tippedOccupations.d.ts.map +1 -0
- package/dist/us-household/types.d.ts +138 -18
- package/dist/us-household/types.d.ts.map +1 -1
- package/dist/us-household/validate.d.ts +1 -1
- package/dist/us-household/validate.d.ts.map +1 -1
- package/dist/us-household-adapters.cjs +1 -1
- package/dist/us-household-adapters.d.ts +1 -1
- package/dist/us-household-adapters.js +3 -90
- package/dist/us-household.cjs +1 -1
- package/dist/us-household.d.ts +1 -1
- package/dist/us-household.js +346 -246
- package/dist/validation.d.ts +16 -0
- package/dist/validation.d.ts.map +1 -0
- package/package.json +16 -2
- package/src/primitives/WizardReviewList.tsx +35 -18
- package/src/primitives/index.ts +3 -0
- package/src/primitives/types.ts +20 -0
- package/src/primitives/useWizardStepFocus.ts +42 -0
- package/src/primitives/useWizardSteps.ts +181 -84
- package/src/styles.css +9 -0
- package/src/uk-household/adapters/householdImpactRequest.ts +164 -0
- package/src/uk-household/adapters/index.ts +9 -0
- package/src/uk-household/children.ts +23 -0
- package/src/uk-household/codes.ts +67 -0
- package/src/uk-household/defaults.ts +101 -0
- package/src/uk-household/draft.ts +138 -0
- package/src/uk-household/index.ts +75 -0
- package/src/uk-household/serialize.ts +189 -0
- package/src/uk-household/statePension.ts +69 -0
- package/src/uk-household/types.ts +159 -0
- package/src/uk-household/validate.ts +190 -0
- package/src/us-household/adapters/v1Payload.ts +211 -18
- package/src/us-household/amount.ts +10 -0
- package/src/us-household/index.ts +11 -0
- package/src/us-household/normalize.ts +79 -4
- package/src/us-household/serialize.ts +5 -1
- package/src/us-household/tippedOccupations.ts +145 -0
- package/src/us-household/types.ts +144 -15
- package/src/us-household/validate.ts +101 -4
- package/src/validation.ts +12 -0
- package/dist/WizardReviewList-De9RTK_4.js +0 -245
- package/dist/WizardReviewList-tfP9LcqU.cjs +0 -1
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { n as I, h as R, f as _, c as P, y as L, A as f, x as v, z as K } from "./index-fgLnXugs.js";
|
|
2
|
+
import { U as X, a as q, b as J, d as Q, e as Z, g as ee, i as ne, j as te, k as ie, l as se, m as oe, o as re, p as ae, q as le, r as ce, s as ue, t as me, u as pe, v as de, w as ge, B as he, C as Ee, D as _e, E as ye, F as Pe, G as Ue, H as Ne } from "./index-fgLnXugs.js";
|
|
3
|
+
function S(e = I) {
|
|
4
|
+
return {
|
|
5
|
+
salaryYear: e,
|
|
6
|
+
region: null,
|
|
7
|
+
head: {
|
|
8
|
+
age: null,
|
|
9
|
+
employmentIncome: 0,
|
|
10
|
+
privatePensionIncome: 0,
|
|
11
|
+
statePension: null,
|
|
12
|
+
studentLoanPlan: "NONE",
|
|
13
|
+
salarySacrificePensionContributions: 0,
|
|
14
|
+
dividendIncome: 0,
|
|
15
|
+
savingsInterestIncome: 0,
|
|
16
|
+
propertyIncome: 0
|
|
17
|
+
},
|
|
18
|
+
hasPartner: !1,
|
|
19
|
+
partner: { age: null, employmentIncome: 0, privatePensionIncome: 0, statePension: null },
|
|
20
|
+
children: [],
|
|
21
|
+
tenure: null,
|
|
22
|
+
monthlyRent: null,
|
|
23
|
+
councilTaxBand: null,
|
|
24
|
+
claimsUniversalCredit: null,
|
|
25
|
+
monthlyChildcare: 0,
|
|
26
|
+
spending: { petrol: 0, diesel: 0, electricity: null }
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function Y(e = I) {
|
|
30
|
+
return {
|
|
31
|
+
salaryYear: e,
|
|
32
|
+
region: "NORTH_WEST",
|
|
33
|
+
head: {
|
|
34
|
+
age: 30,
|
|
35
|
+
employmentIncome: P,
|
|
36
|
+
privatePensionIncome: 0,
|
|
37
|
+
statePension: null,
|
|
38
|
+
studentLoanPlan: "NONE",
|
|
39
|
+
salarySacrificePensionContributions: 0,
|
|
40
|
+
dividendIncome: 0,
|
|
41
|
+
savingsInterestIncome: 0,
|
|
42
|
+
propertyIncome: 0
|
|
43
|
+
},
|
|
44
|
+
hasPartner: !1,
|
|
45
|
+
partner: { age: 30, employmentIncome: P, privatePensionIncome: 0, statePension: null },
|
|
46
|
+
children: [],
|
|
47
|
+
tenure: "RENT_PRIVATELY",
|
|
48
|
+
monthlyRent: null,
|
|
49
|
+
councilTaxBand: "D",
|
|
50
|
+
claimsUniversalCredit: !0,
|
|
51
|
+
monthlyChildcare: 0,
|
|
52
|
+
spending: {
|
|
53
|
+
petrol: _.petrol,
|
|
54
|
+
diesel: _.diesel,
|
|
55
|
+
electricity: _.electricity
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
const d = (e) => e ? { extras: structuredClone(e) } : {};
|
|
60
|
+
function F(e) {
|
|
61
|
+
return {
|
|
62
|
+
...e,
|
|
63
|
+
head: { ...e.head, ...d(e.head.extras) },
|
|
64
|
+
partner: { ...e.partner, ...d(e.partner.extras) },
|
|
65
|
+
children: e.children.map((n) => ({ ...n, ...d(n.extras) })),
|
|
66
|
+
spending: { ...e.spending },
|
|
67
|
+
...d(e.extras)
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
function H(e, n) {
|
|
71
|
+
return { ...e, head: { ...e.head, ...n } };
|
|
72
|
+
}
|
|
73
|
+
function B(e, n) {
|
|
74
|
+
return { ...e, partner: { ...e.partner, ...n } };
|
|
75
|
+
}
|
|
76
|
+
function w(e, n = {}) {
|
|
77
|
+
return { ...e, children: [...e.children, { age: null, ...n }] };
|
|
78
|
+
}
|
|
79
|
+
function k(e, n) {
|
|
80
|
+
return { ...e, children: e.children.filter((t, i) => i !== n) };
|
|
81
|
+
}
|
|
82
|
+
function $(e, n, t) {
|
|
83
|
+
return {
|
|
84
|
+
...e,
|
|
85
|
+
children: e.children.map((i, s) => s === n ? { ...i, ...t } : i)
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
function M(e, n, t = R) {
|
|
89
|
+
const i = e.children.slice(0, Math.max(0, n));
|
|
90
|
+
for (; i.length < n; ) i.push({ age: t });
|
|
91
|
+
return { ...e, children: i };
|
|
92
|
+
}
|
|
93
|
+
const g = [
|
|
94
|
+
["employmentIncome", "e"],
|
|
95
|
+
["privatePensionIncome", "p"],
|
|
96
|
+
["statePension", "s"]
|
|
97
|
+
], A = [
|
|
98
|
+
["salarySacrificePensionContributions", "x"],
|
|
99
|
+
["dividendIncome", "d"],
|
|
100
|
+
["savingsInterestIncome", "i"],
|
|
101
|
+
["propertyIncome", "r"]
|
|
102
|
+
], T = "l", D = S(), a = (e) => typeof e == "number" && Number.isFinite(e), C = (e) => a(e) ? String(e) : "";
|
|
103
|
+
function U(e, n) {
|
|
104
|
+
const t = e, i = [C(e.age)];
|
|
105
|
+
for (const [s, o] of n) {
|
|
106
|
+
const r = t[s];
|
|
107
|
+
a(r) && (r === 0 && s !== "statePension" || i.push(`${o}${r}`));
|
|
108
|
+
}
|
|
109
|
+
return i.join(":");
|
|
110
|
+
}
|
|
111
|
+
function h(e) {
|
|
112
|
+
if (e.trim() === "") return;
|
|
113
|
+
const n = Number(e);
|
|
114
|
+
if (Number.isFinite(n))
|
|
115
|
+
return n === 0 ? 0 : n;
|
|
116
|
+
}
|
|
117
|
+
function N(e, n, t) {
|
|
118
|
+
const [i = "", ...s] = e.split(":"), o = { ...n }, r = o;
|
|
119
|
+
o.age = h(i) ?? null;
|
|
120
|
+
for (const c of s) {
|
|
121
|
+
const u = c[0], l = c.slice(1);
|
|
122
|
+
if (u === T && "studentLoanPlan" in n) {
|
|
123
|
+
o.studentLoanPlan = K(l) ? l : "NONE";
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
const m = t.find(([, E]) => E === u), p = h(l);
|
|
127
|
+
m && p !== void 0 && (r[m[0]] = p);
|
|
128
|
+
}
|
|
129
|
+
return o;
|
|
130
|
+
}
|
|
131
|
+
function O(e) {
|
|
132
|
+
const n = C(e == null ? void 0 : e.age), t = (e == null ? void 0 : e.inEducation) === !0 ? "y" : (e == null ? void 0 : e.inEducation) === !1 ? "n" : "";
|
|
133
|
+
return `${n}${t}`;
|
|
134
|
+
}
|
|
135
|
+
function x(e) {
|
|
136
|
+
const n = e.slice(-1), t = n === "y" || n === "n", i = { age: h(t ? e.slice(0, -1) : e) ?? null };
|
|
137
|
+
return t && (i.inEducation = n === "y"), i;
|
|
138
|
+
}
|
|
139
|
+
const b = (e, n) => e.age === n.age && e.employmentIncome === n.employmentIncome && (e.privatePensionIncome ?? 0) === (n.privatePensionIncome ?? 0) && e.statePension === n.statePension;
|
|
140
|
+
function j(e) {
|
|
141
|
+
const n = new URLSearchParams();
|
|
142
|
+
a(e.salaryYear) && n.set("sy", String(e.salaryYear)), e.region && n.set("region", e.region), e.tenure && n.set("tenure", e.tenure), a(e.monthlyRent) && n.set("rent", String(e.monthlyRent)), e.councilTaxBand && n.set("band", e.councilTaxBand), typeof e.claimsUniversalCredit == "boolean" && n.set("uc", e.claimsUniversalCredit ? "1" : "0");
|
|
143
|
+
let t = U(e.head, [...g, ...A]);
|
|
144
|
+
e.head.studentLoanPlan && e.head.studentLoanPlan !== "NONE" && (t += `:${T}${e.head.studentLoanPlan}`), n.set("you", t), e.hasPartner && n.set("hp", "1"), (e.hasPartner || !b(e.partner, D.partner)) && n.set("partner", U(e.partner, g)), e.children.length > 0 && n.set("c", Array.from(e.children, O).join(","));
|
|
145
|
+
const { petrol: i, diesel: s, electricity: o } = e.spending;
|
|
146
|
+
return a(i) && i !== 0 && n.set("petrol", String(i)), a(s) && s !== 0 && n.set("diesel", String(s)), a(o) && n.set("elec", String(o)), a(e.monthlyChildcare) && e.monthlyChildcare !== 0 && n.set("cc", String(e.monthlyChildcare)), n.toString();
|
|
147
|
+
}
|
|
148
|
+
function z(e) {
|
|
149
|
+
const n = typeof e == "string" ? new URLSearchParams(e) : e, t = S(), i = (E) => {
|
|
150
|
+
const y = n.get(E);
|
|
151
|
+
return y === null ? void 0 : h(y);
|
|
152
|
+
}, s = i("sy");
|
|
153
|
+
s !== void 0 && (t.salaryYear = s);
|
|
154
|
+
const o = n.get("region");
|
|
155
|
+
t.region = L(o) ? o : null;
|
|
156
|
+
const r = n.get("tenure");
|
|
157
|
+
t.tenure = f(r) ? r : null, t.monthlyRent = i("rent") ?? null;
|
|
158
|
+
const c = n.get("band");
|
|
159
|
+
t.councilTaxBand = v(c) ? c : null;
|
|
160
|
+
const u = n.get("uc");
|
|
161
|
+
t.claimsUniversalCredit = u === "1" ? !0 : u === "0" ? !1 : null;
|
|
162
|
+
const l = n.get("you");
|
|
163
|
+
l !== null && (t.head = N(l, t.head, [...g, ...A])), t.hasPartner = n.get("hp") === "1";
|
|
164
|
+
const m = n.get("partner");
|
|
165
|
+
m !== null && (t.partner = N(m, t.partner, g));
|
|
166
|
+
const p = n.get("c");
|
|
167
|
+
return p !== null && (t.children = p.split(",").map(x)), t.spending = {
|
|
168
|
+
petrol: i("petrol") ?? 0,
|
|
169
|
+
diesel: i("diesel") ?? 0,
|
|
170
|
+
electricity: i("elec") ?? null
|
|
171
|
+
}, t.monthlyChildcare = i("cc") ?? 0, t;
|
|
172
|
+
}
|
|
173
|
+
export {
|
|
174
|
+
X as UK_AVERAGE_RENT,
|
|
175
|
+
q as UK_CHILD_AGE_MESSAGE,
|
|
176
|
+
J as UK_COUNCIL_TAX_BANDS,
|
|
177
|
+
P as UK_DEFAULT_SALARY,
|
|
178
|
+
Q as UK_DEFAULT_SALARY_NOTE,
|
|
179
|
+
Z as UK_DEFAULT_SOURCES,
|
|
180
|
+
_ as UK_DEFAULT_SPENDING,
|
|
181
|
+
ee as UK_HOUSEHOLD_LIMITS,
|
|
182
|
+
R as UK_NEW_CHILD_AGE,
|
|
183
|
+
ne as UK_OLDEST_CHILD_AGE,
|
|
184
|
+
te as UK_POLICY_YEARS,
|
|
185
|
+
ie as UK_REGIONAL_RENT,
|
|
186
|
+
se as UK_REGIONS,
|
|
187
|
+
oe as UK_RENTING_TENURES,
|
|
188
|
+
I as UK_SALARY_YEAR,
|
|
189
|
+
re as UK_STATE_PENSION,
|
|
190
|
+
ae as UK_STUDENT_LOAN_PLANS,
|
|
191
|
+
le as UK_TENURES,
|
|
192
|
+
ce as UK_YOUNG_PERSON_AGE,
|
|
193
|
+
w as addChild,
|
|
194
|
+
ue as asksEducation,
|
|
195
|
+
me as atStatePensionAge,
|
|
196
|
+
F as cloneDraft,
|
|
197
|
+
S as createBlankDraft,
|
|
198
|
+
Y as createTypicalDraft,
|
|
199
|
+
z as deserializeDraft,
|
|
200
|
+
pe as getRegionName,
|
|
201
|
+
de as isComplete,
|
|
202
|
+
ge as isRenting,
|
|
203
|
+
v as isUKCouncilTaxBand,
|
|
204
|
+
L as isUKRegion,
|
|
205
|
+
K as isUKStudentLoanPlan,
|
|
206
|
+
f as isUKTenure,
|
|
207
|
+
he as monthlyRentFor,
|
|
208
|
+
Ee as regionalRent,
|
|
209
|
+
_e as regionalRentMonth,
|
|
210
|
+
k as removeChild,
|
|
211
|
+
j as serializeDraft,
|
|
212
|
+
M as setChildCount,
|
|
213
|
+
ye as statePensionEntered,
|
|
214
|
+
Pe as statePensionFor,
|
|
215
|
+
Ue as toHouseholdImpactRequest,
|
|
216
|
+
$ as updateChild,
|
|
217
|
+
H as updateHead,
|
|
218
|
+
B as updatePartner,
|
|
219
|
+
Ne as validate
|
|
220
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { toV1HouseholdPayload, toV1HouseholdSituation, type V1EntityCollection, type V1EntityRecord, type V1FieldValue, type V1GroupCollection, type V1GroupRecord, type V1HouseholdEnvelope, type V1HouseholdSituation, type V1PersonCollection, type V1PersonRecord, type V1ValueMap, type ToV1PayloadOptions, } from './v1Payload';
|
|
1
|
+
export { toV1HouseholdPayload, toV1HouseholdSituation, type V1EntityCollection, type V1EntityRecord, type V1FieldValue, type V1GroupCollection, type V1GroupRecord, type V1HouseholdEnvelope, type V1HouseholdSituation, type V1PersonCollection, type V1PersonRecord, type V1ValueMap, type ToV1PayloadOptions, } from './v1Payload.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { USHouseholdDraft } from '../types';
|
|
1
|
+
import type { USHouseholdDraft, USPersonExpenses, USPersonFlags, USPersonIncomes } from '../types.js';
|
|
2
2
|
/**
|
|
3
3
|
* The shape of a PolicyEngine US "situation" / household-creation payload at
|
|
4
4
|
* the wire level. Variables are year-keyed; person/group keys are arbitrary
|
|
@@ -48,8 +48,10 @@ export interface ToV1PayloadOptions {
|
|
|
48
48
|
*/
|
|
49
49
|
groupKeyStyle?: 'short' | 'verbose';
|
|
50
50
|
/**
|
|
51
|
-
* If true,
|
|
52
|
-
*
|
|
51
|
+
* If true, puts the first two adults in one marital unit. Off by default for
|
|
52
|
+
* compatibility. With `marital_units: {}`, policyengine-core gives each
|
|
53
|
+
* person their own marital unit, so a married couple gets individual SSI
|
|
54
|
+
* rates instead of the couple rate; pass true for married drafts.
|
|
53
55
|
*/
|
|
54
56
|
includeMaritalUnit?: boolean;
|
|
55
57
|
/**
|
|
@@ -58,6 +60,120 @@ export interface ToV1PayloadOptions {
|
|
|
58
60
|
*/
|
|
59
61
|
label?: string | null;
|
|
60
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* Person flags and the PolicyEngine US variables they set. Exported for tests
|
|
65
|
+
* and tooling; not part of the package entry points. Only true and false are
|
|
66
|
+
* sent; anything else (such as null in a JSON draft) counts as not answered.
|
|
67
|
+
*
|
|
68
|
+
* `is_full_time_student` is computed as `is_full_time_college_student` or
|
|
69
|
+
* `is_in_k12_school`, and the model counts everyone aged 5 to 17 as a K-12
|
|
70
|
+
* student. So `isFullTimeStudent` is sent as full-time college enrollment,
|
|
71
|
+
* and only from `COLLEGE_MIN_AGE`: sending it for a child would make them a
|
|
72
|
+
* college student (for example, for New Jersey's exemption for dependents
|
|
73
|
+
* attending college), and sending the computed total would take K-12 status
|
|
74
|
+
* away from every other child in the household.
|
|
75
|
+
*/
|
|
76
|
+
export declare const FLAG_TO_VARIABLE: Readonly<Record<keyof USPersonFlags, string>>;
|
|
77
|
+
/**
|
|
78
|
+
* The youngest age at which `isFullTimeStudent` is sent. PolicyEngine US's
|
|
79
|
+
* `is_in_k12_school` covers ages 5 to 17, so a full-time student aged 18 or
|
|
80
|
+
* over is taken to be in college. A person with no age is sent the flag,
|
|
81
|
+
* because the model then assumes an adult age.
|
|
82
|
+
*/
|
|
83
|
+
export declare const COLLEGE_MIN_AGE = 18;
|
|
84
|
+
/**
|
|
85
|
+
* An entered 0 in `ssiAmount` is sent as this variable, set to false. It is an
|
|
86
|
+
* input (default true), so it sets that person's SSI to 0 without affecting
|
|
87
|
+
* anyone else. In policyengine-us 1.764.6 only `ssi` reads it. In 2.49.2,
|
|
88
|
+
* the shared state-supplement helper and a county General Relief rule read it
|
|
89
|
+
* too, so a 0 also means no supplement from that helper. Some states compute
|
|
90
|
+
* their own supplement from federal SSI instead: California's is its payment
|
|
91
|
+
* standard less SSI and countable income, so a 0 raises it.
|
|
92
|
+
*/
|
|
93
|
+
export declare const SSI_TAKE_UP_VARIABLE = "takes_up_ssi_if_eligible";
|
|
94
|
+
/**
|
|
95
|
+
* Person income fields and the PolicyEngine US variables they set. Exported
|
|
96
|
+
* for tests and tooling; not part of the package entry points.
|
|
97
|
+
*
|
|
98
|
+
* Where PolicyEngine US defines a variable as the sum of components (`adds`),
|
|
99
|
+
* an input on the total replaces that sum: components sent alongside it are
|
|
100
|
+
* left out of the total and everything computed from it, and components not
|
|
101
|
+
* sent read as zero where rules use them directly. `social_security` adds
|
|
102
|
+
* retirement, disability, survivors, and dependents benefits, so
|
|
103
|
+
* `socialSecurityIncome` sets `social_security_retirement` and `ssdiAmount`
|
|
104
|
+
* sets `social_security_disability`; the model sums them.
|
|
105
|
+
*
|
|
106
|
+
* Likewise `taxable_pension_income` adds public and private pensions, and
|
|
107
|
+
* state rules read those components. `publicPensionIncome` and
|
|
108
|
+
* `privatePensionIncome` set them. A pension of unknown source
|
|
109
|
+
* (`pensionIncome`) is sent as private. Fields that share a variable are
|
|
110
|
+
* summed. Numeric strings are read as numbers and other amounts that are not
|
|
111
|
+
* finite numbers are skipped, so a bad value in one field cannot corrupt a
|
|
112
|
+
* shared sum.
|
|
113
|
+
*
|
|
114
|
+
* `ssi` is computed, so `ssiAmount` follows the household rule above: the
|
|
115
|
+
* amounts are sent as `ssi` for everyone when every person has one, and
|
|
116
|
+
* otherwise the model computes everyone's SSI. `validate()` asks for the
|
|
117
|
+
* missing amounts in that case.
|
|
118
|
+
*
|
|
119
|
+
* Three totals are set directly: `employment_income`, `self_employment_income`
|
|
120
|
+
* and `long_term_capital_gains`. Each adds an input and a behavioral response,
|
|
121
|
+
* and PolicyEngine US's Simulation moves an input on the total onto that
|
|
122
|
+
* component input (`employment_income_before_lsr`,
|
|
123
|
+
* `self_employment_income_before_lsr`, `long_term_capital_gains_before_response`).
|
|
124
|
+
*
|
|
125
|
+
* `tests/us-household/v1PayloadInvariants.test.ts` checks this mapping against
|
|
126
|
+
* the PolicyEngine US variable graph, including the few totals that are safe
|
|
127
|
+
* to set directly.
|
|
128
|
+
*/
|
|
129
|
+
export declare const INCOME_TO_VARIABLE: Readonly<Record<keyof USPersonIncomes, string>>;
|
|
130
|
+
/**
|
|
131
|
+
* Income fields that PolicyEngine US also counts inside another variable, and
|
|
132
|
+
* that variable. Exported for tests and tooling; not part of the package entry
|
|
133
|
+
* points.
|
|
134
|
+
*
|
|
135
|
+
* PolicyEngine US counts tips as part of wages: `employment_income` is wages
|
|
136
|
+
* "including tips and commissions", and income and payroll taxes read it
|
|
137
|
+
* (through `irs_employment_income` and `payroll_tax_gross_wages`). A few rules
|
|
138
|
+
* read `tip_income` on its own: the qualified tips deduction, Georgia's cash
|
|
139
|
+
* tip exclusion, and Washington's long-term care premium (which subtracts it
|
|
140
|
+
* from wages). So `tipIncome` is sent as `tip_income` and also added to
|
|
141
|
+
* `employment_income`; without the second, tips would be deducted but never
|
|
142
|
+
* taxed. One rule departs from this convention: Florida School Readiness
|
|
143
|
+
* adds `tip_income` to `employment_income` and so counts tips twice
|
|
144
|
+
* (PolicyEngine/policyengine-us#10262).
|
|
145
|
+
*/
|
|
146
|
+
export declare const INCOME_ALSO_ADDED_TO: Readonly<Partial<Record<keyof USPersonIncomes, string>>>;
|
|
147
|
+
/**
|
|
148
|
+
* Person expense fields and the PolicyEngine US input variables they set.
|
|
149
|
+
* Exported for tests and tooling; not part of the package entry points.
|
|
150
|
+
*
|
|
151
|
+
* `mortgageInterest` sets `home_mortgage_interest`, the input. PolicyEngine US
|
|
152
|
+
* computes `mortgage_interest` as the sum of deductible and non-deductible
|
|
153
|
+
* interest, and its federal interest deduction reads the input, so an amount
|
|
154
|
+
* sent as `mortgage_interest` changes no federal deduction. (North Carolina,
|
|
155
|
+
* Hawaii and Alabama rules read the computed total, which includes the input.)
|
|
156
|
+
*/
|
|
157
|
+
export declare const EXPENSE_TO_VARIABLE: Readonly<Record<keyof USPersonExpenses, string>>;
|
|
158
|
+
/**
|
|
159
|
+
* `tippedOccupationCode` is sent as this variable, an integer input whose
|
|
160
|
+
* default 0 means no listed occupation. Only listed codes and 0 are sent.
|
|
161
|
+
* Amounts are sent as entered and checked by `validate()`, but an unlisted
|
|
162
|
+
* code is dropped: the model reads any code above 0 as a listed occupation,
|
|
163
|
+
* so a stray one would claim the deduction.
|
|
164
|
+
*/
|
|
165
|
+
export declare const TIPPED_OCCUPATION_VARIABLE = "treasury_tipped_occupation_code";
|
|
166
|
+
/**
|
|
167
|
+
* Build the PolicyEngine API V1 household payload for a draft. Everyone shares
|
|
168
|
+
* one family, tax unit, SPM unit and household. Check the draft with
|
|
169
|
+
* `validate()` first:
|
|
170
|
+
*
|
|
171
|
+
* - A person with no age is sent without one, and PolicyEngine US then uses
|
|
172
|
+
* its default age of 40 (`validate()` requires ages by default).
|
|
173
|
+
* - SSI amounts are sent only when every person has one. If some are
|
|
174
|
+
* missing, the entered amounts are dropped and the model computes
|
|
175
|
+
* everyone's SSI (`validate()` reports `person.ssiAmount.requiredWhenAnyReceives`).
|
|
176
|
+
*/
|
|
61
177
|
export declare function toV1HouseholdPayload(draft: USHouseholdDraft, options?: ToV1PayloadOptions): V1HouseholdEnvelope;
|
|
62
178
|
/**
|
|
63
179
|
* Convenience that returns just the inner `V1HouseholdSituation` — useful for
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1Payload.d.ts","sourceRoot":"","sources":["../../../src/us-household/adapters/v1Payload.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"v1Payload.d.ts","sourceRoot":"","sources":["../../../src/us-household/adapters/v1Payload.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An entered amount as a finite number, or `undefined` when nothing usable was
|
|
3
|
+
* entered. Drafts parsed from JSON or forms can carry numeric strings, null,
|
|
4
|
+
* NaN, or Infinity. `validate()` and the V1 adapter both use this, so they
|
|
5
|
+
* agree on which amounts count as entered.
|
|
6
|
+
*/
|
|
7
|
+
export declare function toAmount(value: unknown): number | undefined;
|
|
8
|
+
//# sourceMappingURL=amount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"amount.d.ts","sourceRoot":"","sources":["../../src/us-household/amount.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAG3D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { USHouseholdDraft, USPersonDraft, USPersonKind } from './types';
|
|
1
|
+
import type { USHouseholdDraft, USPersonDraft, USPersonKind } from './types.js';
|
|
2
2
|
export declare const DEFAULT_HOUSEHOLD_YEAR: number;
|
|
3
3
|
/**
|
|
4
4
|
* Returns a draft with no defaults for state, ages, or marital status. The
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export type { USHouseholdDraft, USMaritalStatus, USPersonDraft, USPersonFlags, USPersonIncomes, USPersonKind, ValidationIssue, ValidationResult, } from './types';
|
|
2
|
-
export { DEFAULT_HOUSEHOLD_YEAR, createBlankDraft, cloneDraft, createPerson, addPerson, removePerson, updatePerson, getAdults, getDependents, applyMaritalStatusChange, } from './draft';
|
|
3
|
-
export { normalizeLegacyDraft } from './normalize';
|
|
4
|
-
export { validate, isComplete, type ValidateOptions } from './validate';
|
|
5
|
-
export { serializeDraft, deserializeDraft } from './serialize';
|
|
6
|
-
export { US_STATES, isUSStateCode, getStateName, getStateFromZip, type USState, } from './states';
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
1
|
+
export type { USHouseholdDraft, USMaritalStatus, USPersonDraft, USPersonExpenses, USPersonFlags, USPersonIncomes, USPersonKind, USPersonOccupation, ValidationIssue, ValidationResult, } from './types.js';
|
|
2
|
+
export { DEFAULT_HOUSEHOLD_YEAR, createBlankDraft, cloneDraft, createPerson, addPerson, removePerson, updatePerson, getAdults, getDependents, applyMaritalStatusChange, } from './draft.js';
|
|
3
|
+
export { normalizeLegacyDraft } from './normalize.js';
|
|
4
|
+
export { validate, isComplete, type ValidateOptions } from './validate.js';
|
|
5
|
+
export { serializeDraft, deserializeDraft } from './serialize.js';
|
|
6
|
+
export { US_STATES, isUSStateCode, getStateName, getStateFromZip, type USState, } from './states.js';
|
|
7
|
+
export { NOT_A_TIPPED_OCCUPATION, TIPPED_OCCUPATIONS, getTippedOccupation, isTippedOccupationCode, toTippedOccupationCode, type TippedOccupation, } from './tippedOccupations.js';
|
|
8
|
+
export { getCountiesByState, getCountyName, isCountyCode, resolveCountyCode, type County, } from './counties.js';
|
|
9
|
+
export { toV1HouseholdPayload, toV1HouseholdSituation, type V1HouseholdEnvelope, type V1HouseholdSituation, type V1ValueMap, type V1FieldValue, type V1PersonRecord, type V1GroupRecord, type V1PersonCollection, type V1GroupCollection, type V1EntityRecord, type V1EntityCollection, type ToV1PayloadOptions, } from './adapters/v1Payload.js';
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/us-household/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,aAAa,EACb,eAAe,EACf,YAAY,EACZ,eAAe,EACf,gBAAgB,GACjB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,aAAa,EACb,wBAAwB,GACzB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/D,OAAO,EACL,SAAS,EACT,aAAa,EACb,YAAY,EACZ,eAAe,EACf,KAAK,OAAO,GACb,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,KAAK,MAAM,GACZ,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,GACxB,MAAM,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/us-household/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,YAAY,EACZ,kBAAkB,EAClB,eAAe,EACf,gBAAgB,GACjB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,aAAa,EACb,wBAAwB,GACzB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/D,OAAO,EACL,SAAS,EACT,aAAa,EACb,YAAY,EACZ,eAAe,EACf,KAAK,OAAO,GACb,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,KAAK,gBAAgB,GACtB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,KAAK,MAAM,GACZ,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,GACxB,MAAM,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../src/us-household/normalize.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../src/us-household/normalize.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,gBAAgB,EAIjB,MAAM,SAAS,CAAC;AAmNjB;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,OAAO,EACZ,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAO,GAC9B,gBAAgB,CAgGlB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { USHouseholdDraft } from './types';
|
|
1
|
+
import type { USHouseholdDraft } from './types.js';
|
|
2
2
|
export declare function serializeDraft(draft: USHouseholdDraft): string;
|
|
3
3
|
export declare function deserializeDraft(query: string | URLSearchParams): USHouseholdDraft;
|
|
4
4
|
//# sourceMappingURL=serialize.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serialize.d.ts","sourceRoot":"","sources":["../../src/us-household/serialize.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAiB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"serialize.d.ts","sourceRoot":"","sources":["../../src/us-household/serialize.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAiB,MAAM,SAAS,CAAC;AAiG/D,wBAAgB,cAAc,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAW9D;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,GAAG,gBAAgB,CA6ClF"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Treasury Tipped Occupation Codes (TTOCs): the occupations whose tips can
|
|
3
|
+
* qualify for the federal deduction for qualified tips (26 U.S.C. 224) in tax
|
|
4
|
+
* years 2025 through 2028.
|
|
5
|
+
*
|
|
6
|
+
* Source: Table 1 to paragraph (h) of 26 CFR 1.224-1, "Occupations that
|
|
7
|
+
* Customarily and Regularly Received Tips on or Before December 31, 2024",
|
|
8
|
+
* final regulations T.D. 10044, Internal Revenue Bulletin 2026-18
|
|
9
|
+
* (April 27, 2026), https://www.irs.gov/pub/irs-irbs/irb26-18.pdf. The final
|
|
10
|
+
* table lists 71 occupations; it adds 509, 510 and 810 to the proposed
|
|
11
|
+
* regulations' list (IRB 2025-42) and renames 103, 506 and 606. Labels are the
|
|
12
|
+
* table's occupation titles in sentence case.
|
|
13
|
+
*
|
|
14
|
+
* PolicyEngine US reads the code as `treasury_tipped_occupation_code`, where 0
|
|
15
|
+
* means the person did not receive tips in a listed occupation. Its deduction
|
|
16
|
+
* checks only that the code is above 0, so the code itself does not change
|
|
17
|
+
* results; the list lets apps ask the question the law asks.
|
|
18
|
+
*/
|
|
19
|
+
export interface TippedOccupation {
|
|
20
|
+
/** Treasury Tipped Occupation Code. */
|
|
21
|
+
code: number;
|
|
22
|
+
/** Occupation title, in sentence case. */
|
|
23
|
+
label: string;
|
|
24
|
+
/** The table's category heading, in sentence case. */
|
|
25
|
+
category: string;
|
|
26
|
+
}
|
|
27
|
+
/** The code for "no listed occupation", which PolicyEngine US also uses. */
|
|
28
|
+
export declare const NOT_A_TIPPED_OCCUPATION = 0;
|
|
29
|
+
/** Every listed occupation, in code order. */
|
|
30
|
+
export declare const TIPPED_OCCUPATIONS: ReadonlyArray<TippedOccupation>;
|
|
31
|
+
export declare function getTippedOccupation(code: number): TippedOccupation | undefined;
|
|
32
|
+
export declare function isTippedOccupationCode(code: unknown): code is number;
|
|
33
|
+
/**
|
|
34
|
+
* An entered occupation code as a number the V1 adapter sends: a listed code,
|
|
35
|
+
* or 0 for "not a listed occupation". Strings of decimal digits are read as
|
|
36
|
+
* numbers. Anything else, including codes the table does not list, reads as
|
|
37
|
+
* not answered, so a stray value cannot claim the deduction.
|
|
38
|
+
*/
|
|
39
|
+
export declare function toTippedOccupationCode(value: unknown): number | undefined;
|
|
40
|
+
//# sourceMappingURL=tippedOccupations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tippedOccupations.d.ts","sourceRoot":"","sources":["../../src/us-household/tippedOccupations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,4EAA4E;AAC5E,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAuFzC,8CAA8C;AAC9C,eAAO,MAAM,kBAAkB,EAAE,aAAa,CAAC,gBAAgB,CAE9D,CAAC;AAIF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS,CAE9E;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,MAAM,CAEpE;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAOzE"}
|