policyengine-household-wizard 0.1.0 → 0.2.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 +37 -2
- 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-DWM0giHt.js +220 -0
- package/dist/index.cjs +1 -1
- 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 +3 -1
- 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 +1 -1
- package/dist/primitives/useWizardSteps.d.ts.map +1 -1
- package/dist/primitives.cjs +1 -1
- package/dist/primitives.js +5 -4
- 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/index.d.ts +2 -1
- package/dist/us-household/index.d.ts.map +1 -1
- package/dist/us-household/normalize.d.ts.map +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 +137 -4
- package/dist/us-household/types.d.ts.map +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.js +3 -90
- package/dist/us-household.cjs +1 -1
- package/dist/us-household.js +346 -246
- package/package.json +4 -1
- 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/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 +143 -4
- package/src/us-household/validate.ts +101 -4
- package/dist/WizardReviewList-De9RTK_4.js +0 -245
- package/dist/WizardReviewList-tfP9LcqU.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/us-household/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEnD,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,WAAW,CAAC;AAEjD
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/us-household/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEnD;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,WAAW,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;;;;;OAUG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,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,CAAC;IACnB,6EAA6E;IAC7E,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,gBAAgB;IAC/B,+EAA+E;IAC/E,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,gEAAgE;IAChE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,6EAA6E;IAC7E,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB;;;OAGG;IACH,aAAa,EAAE,eAAe,GAAG,IAAI,CAAC;IACtC;;;OAGG;IACH,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,eAAe;IAC9B,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,gBAAgB,GACxB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,KAAK,EAAE,CAAA;CAAE,GAC7B;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,eAAe,EAAE,CAAA;CAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/us-household/validate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/us-household/validate.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,gBAAgB,EAIhB,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAsBjB,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,0EAA0E;IAC1E,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,QAAQ,CACtB,KAAK,EAAE,gBAAgB,EACvB,OAAO,GAAE,eAAoB,GAC5B,gBAAgB,CAgLlB;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,gBAAgB,EAAE,OAAO,GAAE,eAAoB,GAAG,OAAO,CAE1F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-B_OXaS4a.cjs");exports.toV1HouseholdPayload=o.toV1HouseholdPayload;exports.toV1HouseholdSituation=o.toV1HouseholdSituation;
|
|
@@ -1,92 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
household: "household",
|
|
3
|
-
family: "family",
|
|
4
|
-
taxUnit: "tax_unit",
|
|
5
|
-
spmUnit: "spm_unit",
|
|
6
|
-
maritalUnit: "marital_unit"
|
|
7
|
-
}, I = {
|
|
8
|
-
household: "your household",
|
|
9
|
-
family: "your family",
|
|
10
|
-
taxUnit: "your tax unit",
|
|
11
|
-
spmUnit: "your household",
|
|
12
|
-
// app-v2 uses the same label for SPM unit
|
|
13
|
-
maritalUnit: "your marital unit"
|
|
14
|
-
}, U = {
|
|
15
|
-
isDisabled: "is_disabled",
|
|
16
|
-
isBlind: "is_blind",
|
|
17
|
-
isFullTimeStudent: "is_full_time_student",
|
|
18
|
-
isPregnant: "is_pregnant",
|
|
19
|
-
needsCare: "is_incapable_of_self_care"
|
|
20
|
-
}, v = {
|
|
21
|
-
employmentIncome: "employment_income",
|
|
22
|
-
selfEmploymentIncome: "self_employment_income",
|
|
23
|
-
socialSecurityIncome: "social_security",
|
|
24
|
-
ssiAmount: "ssi",
|
|
25
|
-
ssdiAmount: "social_security_disability",
|
|
26
|
-
pensionIncome: "taxable_pension_income",
|
|
27
|
-
dividendIncome: "qualified_dividend_income",
|
|
28
|
-
taxableInterestIncome: "taxable_interest_income",
|
|
29
|
-
rentalIncome: "rental_income",
|
|
30
|
-
unemploymentCompensation: "unemployment_compensation",
|
|
31
|
-
childSupportReceived: "child_support_received",
|
|
32
|
-
miscellaneousIncome: "miscellaneous_income"
|
|
33
|
-
};
|
|
34
|
-
function s(e, n) {
|
|
35
|
-
return { [e]: n };
|
|
36
|
-
}
|
|
37
|
-
function x(e, n) {
|
|
38
|
-
const i = {};
|
|
39
|
-
e.age !== null && e.age !== void 0 && (i.age = s(n, e.age)), e.kind === "dependent" && (i.is_tax_unit_dependent = s(n, !0));
|
|
40
|
-
for (const [l, a] of Object.entries(U)) {
|
|
41
|
-
const t = e[l];
|
|
42
|
-
t !== void 0 && (i[a] = s(n, t));
|
|
43
|
-
}
|
|
44
|
-
for (const [l, a] of Object.entries(v)) {
|
|
45
|
-
const t = e[l];
|
|
46
|
-
t != null && (i[a] = s(n, t));
|
|
47
|
-
}
|
|
48
|
-
return i;
|
|
49
|
-
}
|
|
50
|
-
function S(e, n = {}) {
|
|
51
|
-
const { groupKeyStyle: i = "short", includeMaritalUnit: l = !1, label: a = null } = n, t = i === "verbose" ? I : h, c = String(e.year), m = e.people.map((o) => o.id), d = {};
|
|
52
|
-
for (const o of e.people)
|
|
53
|
-
d[o.id] = x(o, c);
|
|
54
|
-
const u = {
|
|
55
|
-
members: [...m]
|
|
56
|
-
};
|
|
57
|
-
e.state && (u.state_name = s(c, e.state)), e.county && (u.county = s(c, e.county));
|
|
58
|
-
const p = {
|
|
59
|
-
[t.family]: { members: [...m] }
|
|
60
|
-
}, y = {
|
|
61
|
-
[t.taxUnit]: { members: [...m] }
|
|
62
|
-
}, f = {
|
|
63
|
-
[t.spmUnit]: { members: [...m] }
|
|
64
|
-
}, b = {
|
|
65
|
-
[t.household]: u
|
|
66
|
-
}, _ = {};
|
|
67
|
-
if (l) {
|
|
68
|
-
const o = e.people.filter((r) => r.kind === "adult");
|
|
69
|
-
_[t.maritalUnit] = {
|
|
70
|
-
members: o.slice(0, 2).map((r) => r.id)
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
return {
|
|
74
|
-
country_id: "us",
|
|
75
|
-
label: a,
|
|
76
|
-
data: {
|
|
77
|
-
people: d,
|
|
78
|
-
families: p,
|
|
79
|
-
marital_units: _,
|
|
80
|
-
tax_units: y,
|
|
81
|
-
spm_units: f,
|
|
82
|
-
households: b
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
function g(e, n = {}) {
|
|
87
|
-
return S(e, n).data;
|
|
88
|
-
}
|
|
1
|
+
import { b as t, c as s } from "./index-DWM0giHt.js";
|
|
89
2
|
export {
|
|
90
|
-
|
|
91
|
-
|
|
3
|
+
t as toV1HouseholdPayload,
|
|
4
|
+
s as toV1HouseholdSituation
|
|
92
5
|
};
|