@gusto/embedded-react-sdk 0.55.0 → 0.55.1
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/CHANGELOG.md +18 -0
- package/dist/components/Common/TaxInputs/TaxInputs.js +65 -64
- package/dist/components/Common/TaxInputs/TaxInputs.js.map +1 -1
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
- package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
- package/dist/components/Common/UI/Select/Select.module.scss.js +5 -5
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +5 -6
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +6 -7
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +3 -4
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/TaxRateManagement/context.js +3 -4
- package/dist/components/Company/StateTaxes/TaxRateManagement/context.js.map +1 -1
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.d.ts +4 -2
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.js +148 -117
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +56 -55
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePaymentFlow/CreatePaymentFlow.d.ts +1 -1
- package/dist/components/Contractor/Payments/CreatePaymentFlow/CreatePaymentFlow.js +15 -12
- package/dist/components/Contractor/Payments/CreatePaymentFlow/CreatePaymentFlow.js.map +1 -1
- package/dist/components/Contractor/Payments/HistoricalPaymentFlow/HistoricalPaymentFlow.d.ts +69 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentFlow/HistoricalPaymentFlow.js +48 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentFlow/HistoricalPaymentFlow.js.map +1 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentFlow/HistoricalPaymentFlowComponents.d.ts +20 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentFlow/HistoricalPaymentFlowComponents.js +25 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentFlow/HistoricalPaymentFlowComponents.js.map +1 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentFlow/historicalPaymentMachine.d.ts +20 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentFlow/historicalPaymentMachine.js +24 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentFlow/historicalPaymentMachine.js.map +1 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentFlow/index.d.ts +2 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.js +16 -15
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.d.ts +2 -0
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +36 -23
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.d.ts +10 -8
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js +46 -25
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +53 -52
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +37 -47
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +47 -44
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.d.ts +2 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +65 -53
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.module.scss.js +6 -4
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.module.scss.js.map +1 -1
- package/dist/components/Contractor/Payments/ViewPaymentFlow/ViewPaymentFlow.d.ts +1 -1
- package/dist/components/Contractor/Payments/ViewPaymentFlow/ViewPaymentFlow.js +22 -19
- package/dist/components/Contractor/Payments/ViewPaymentFlow/ViewPaymentFlow.js.map +1 -1
- package/dist/components/Contractor/Payments/shared/PaymentSummaryBlock/PaymentSummaryBlock.d.ts +2 -8
- package/dist/components/Contractor/Payments/shared/PaymentSummaryBlock/PaymentSummaryBlock.js +43 -42
- package/dist/components/Contractor/Payments/shared/PaymentSummaryBlock/PaymentSummaryBlock.js.map +1 -1
- package/dist/components/Contractor/Payments/shared/paymentAmounts.d.ts +32 -0
- package/dist/components/Contractor/Payments/shared/paymentAmounts.js +11 -0
- package/dist/components/Contractor/Payments/shared/paymentAmounts.js.map +1 -0
- package/dist/components/Contractor/Payments/shared/paymentAmounts.test.d.ts +1 -0
- package/dist/components/Contractor/Payments/shared/usePaymentAmountsEditor.d.ts +13 -4
- package/dist/components/Contractor/Payments/shared/usePaymentAmountsEditor.js +43 -38
- package/dist/components/Contractor/Payments/shared/usePaymentAmountsEditor.js.map +1 -1
- package/dist/components/Contractor/exports/contractorManagement.d.ts +1 -0
- package/dist/components/Contractor/exports/contractorManagement.js +34 -32
- package/dist/components/Contractor/exports/contractorManagement.js.map +1 -1
- package/dist/components/Contractor/shared/SelectContractors/SelectContractors.d.ts +6 -1
- package/dist/components/Contractor/shared/SelectContractors/SelectContractors.js +13 -12
- package/dist/components/Contractor/shared/SelectContractors/SelectContractors.js.map +1 -1
- package/dist/components/Contractor/shared/SelectContractors/useSelectContractors.d.ts +5 -1
- package/dist/components/Contractor/shared/SelectContractors/useSelectContractors.js +34 -32
- package/dist/components/Contractor/shared/SelectContractors/useSelectContractors.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +3 -4
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +1 -1
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodBankForm.js +4 -4
- package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +4 -4
- package/dist/components/Flow/Flow.js +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +2 -3
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +8 -9
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +6 -0
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +36 -34
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/UnstableFeaturesProvider/UnstableFeaturesProvider.d.ts +22 -0
- package/dist/contexts/UnstableFeaturesProvider/UnstableFeaturesProvider.js +14 -0
- package/dist/contexts/UnstableFeaturesProvider/UnstableFeaturesProvider.js.map +1 -0
- package/dist/contexts/UnstableFeaturesProvider/WithUnstableFeature.d.ts +19 -0
- package/dist/contexts/UnstableFeaturesProvider/WithUnstableFeature.js +8 -0
- package/dist/contexts/UnstableFeaturesProvider/WithUnstableFeature.js.map +1 -0
- package/dist/contexts/UnstableFeaturesProvider/useUnstableFeature.d.ts +41 -0
- package/dist/contexts/UnstableFeaturesProvider/useUnstableFeature.js +14 -0
- package/dist/contexts/UnstableFeaturesProvider/useUnstableFeature.js.map +1 -0
- package/dist/contexts/index.d.ts +1 -0
- package/dist/i18n/en/Contractor.Payments.CreateHistoricalPayment.json.js +34 -32
- package/dist/i18n/en/Contractor.Payments.CreateHistoricalPayment.json.js.map +1 -1
- package/dist/i18n/en/Contractor.Payments.PaymentsList.json.js +20 -18
- package/dist/i18n/en/Contractor.Payments.PaymentsList.json.js.map +1 -1
- package/dist/i18n/en/common.json.d.ts +0 -21
- package/dist/i18n/types.d.ts +10 -2
- package/dist/shared/constants.d.ts +2 -0
- package/dist/shared/constants.js +1 -0
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/test-utils/renderWithProviders.d.ts +4 -1
- package/dist/test-utils/tableQueries.d.ts +9 -0
- package/docs/guides/endpoint-inventory.json +7 -0
- package/package.json +18 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.55.1](https://github.com/Gusto/embedded-react-sdk/compare/v0.55.0...v0.55.1) (2026-08-20)
|
|
4
|
+
|
|
5
|
+
### Features & Enhancements
|
|
6
|
+
|
|
7
|
+
- Add an opt-in `unstableFeatures` prop to `GustoProvider` for enabling alpha SDK functionality ahead of general availability ([#2583](https://github.com/Gusto/embedded-react-sdk/issues/2583))
|
|
8
|
+
- Add alpha support for recording historical contractor payments in `PaymentsFlow`, available via `unstableFeatures={{ historicalPayments: true }}` ([#2589](https://github.com/Gusto/embedded-react-sdk/issues/2589), [#2552](https://github.com/Gusto/embedded-react-sdk/issues/2552))
|
|
9
|
+
|
|
10
|
+
### Fixes
|
|
11
|
+
|
|
12
|
+
- Fix `AccountNumber` input to render the `metadata.prefix` value as an input adornment ([#2569](https://github.com/Gusto/embedded-react-sdk/issues/2569))
|
|
13
|
+
- Fix incorrect contractor payment totals ([#2596](https://github.com/Gusto/embedded-react-sdk/issues/2596))
|
|
14
|
+
- Fix select item selected-state styling to use the correct theme token ([#2582](https://github.com/Gusto/embedded-react-sdk/issues/2582))
|
|
15
|
+
- Remove duplicate `compensationRateFormats` translation key ([#2571](https://github.com/Gusto/embedded-react-sdk/issues/2571))
|
|
16
|
+
|
|
17
|
+
### Chores & Maintenance
|
|
18
|
+
|
|
19
|
+
- Bump dev dependencies (`@axe-core/playwright`, `@commitlint/cli`, `@commitlint/config-conventional`, `@hookform/resolvers`, `@storybook/*`, `@testing-library/user-event`, `@typescript-eslint/*`, `eslint-plugin-storybook`, `globals`, `mermaid`, `react-error-boundary`, `sass-embedded`, `tsx`, `typescript-eslint`)
|
|
20
|
+
|
|
3
21
|
## [0.55.0](https://github.com/Gusto/embedded-react-sdk/compare/v0.54.1...v0.55.0) (2026-08-13)
|
|
4
22
|
|
|
5
23
|
### Features & Enhancements
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import D from "dompurify";
|
|
3
3
|
import { useTranslation as v } from "react-i18next";
|
|
4
|
-
import { SelectField as
|
|
5
|
-
import { TextInputField as
|
|
6
|
-
import { NumberInputField as
|
|
4
|
+
import { SelectField as x } from "../Fields/SelectField/SelectField.js";
|
|
5
|
+
import { TextInputField as R } from "../Fields/TextInputField/TextInputField.js";
|
|
6
|
+
import { NumberInputField as h } from "../Fields/NumberInputField/NumberInputField.js";
|
|
7
7
|
import { RadioGroupField as _ } from "../Fields/RadioGroupField/RadioGroupField.js";
|
|
8
8
|
import { DatePickerField as T } from "../Fields/DatePickerField/DatePickerField.js";
|
|
9
9
|
import { PercentageField as w } from "../Fields/PercentageField/PercentageField.js";
|
|
@@ -13,45 +13,45 @@ import { useMaskedTransform as g } from "../../../helpers/mask.js";
|
|
|
13
13
|
import { formatPercentLabel as F } from "../../../helpers/percentageConversion.js";
|
|
14
14
|
const E = { ALLOWED_TAGS: ["a", "b", "strong"], ALLOWED_ATTR: ["target", "href"] };
|
|
15
15
|
function K({
|
|
16
|
-
questionType:
|
|
17
|
-
...
|
|
16
|
+
questionType: a,
|
|
17
|
+
...e
|
|
18
18
|
}) {
|
|
19
|
-
switch (
|
|
19
|
+
switch (a.toLowerCase()) {
|
|
20
20
|
case "date":
|
|
21
|
-
return /* @__PURE__ */ t(
|
|
21
|
+
return /* @__PURE__ */ t(S, { ...e });
|
|
22
22
|
case "radio":
|
|
23
|
-
return /* @__PURE__ */ t(P, { ...
|
|
23
|
+
return /* @__PURE__ */ t(P, { ...e });
|
|
24
24
|
case "text":
|
|
25
25
|
case "account_number":
|
|
26
|
-
return /* @__PURE__ */ t(k, { ...
|
|
26
|
+
return /* @__PURE__ */ t(k, { ...e });
|
|
27
27
|
case "select":
|
|
28
|
-
return /* @__PURE__ */ t(L, { ...
|
|
28
|
+
return /* @__PURE__ */ t(L, { ...e });
|
|
29
29
|
case "number":
|
|
30
|
-
return /* @__PURE__ */ t(p, { ...
|
|
30
|
+
return /* @__PURE__ */ t(p, { ...e });
|
|
31
31
|
case "workers_compensation_rate":
|
|
32
|
-
return /* @__PURE__ */ t(p, { ...
|
|
32
|
+
return /* @__PURE__ */ t(p, { ...e, isPercent: e.requirement?.metadata?.rateType === "percent" });
|
|
33
33
|
case "percent":
|
|
34
34
|
case "tax_rate":
|
|
35
|
-
return /* @__PURE__ */ t(
|
|
35
|
+
return /* @__PURE__ */ t(N, { ...e });
|
|
36
36
|
case "currency":
|
|
37
|
-
return /* @__PURE__ */ t(p, { ...
|
|
37
|
+
return /* @__PURE__ */ t(p, { ...e, isCurrency: !0 });
|
|
38
38
|
default:
|
|
39
|
-
return /* @__PURE__ */ t(k, { ...
|
|
39
|
+
return /* @__PURE__ */ t(k, { ...e });
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
function L({ question:
|
|
43
|
-
const { t: n } = v("common"), { key:
|
|
42
|
+
function L({ question: a, requirement: e, isDisabled: s = !1 }) {
|
|
43
|
+
const { t: n } = v("common"), { key: l, label: i, description: o } = a || e, u = a ? a.answers[0]?.value : e.value, c = a ? a.inputQuestionFormat : e.metadata;
|
|
44
44
|
if (!c?.options) throw new Error("Select input must have options");
|
|
45
|
-
return
|
|
46
|
-
|
|
45
|
+
return l ? /* @__PURE__ */ t(
|
|
46
|
+
x,
|
|
47
47
|
{
|
|
48
48
|
isRequired: !0,
|
|
49
|
-
name:
|
|
49
|
+
name: l,
|
|
50
50
|
defaultValue: u,
|
|
51
51
|
label: i,
|
|
52
|
-
description:
|
|
52
|
+
description: o,
|
|
53
53
|
placeholder: n("selectPlaceholder"),
|
|
54
|
-
isDisabled:
|
|
54
|
+
isDisabled: l.includes("fileNewHireReport") ? u !== void 0 : s,
|
|
55
55
|
options: c.options.map((r, d) => ({
|
|
56
56
|
value: r.value,
|
|
57
57
|
label: r.label
|
|
@@ -60,70 +60,71 @@ function L({ question: e, requirement: a, isDisabled: s = !1 }) {
|
|
|
60
60
|
) : null;
|
|
61
61
|
}
|
|
62
62
|
function k({
|
|
63
|
-
question:
|
|
64
|
-
requirement:
|
|
63
|
+
question: a,
|
|
64
|
+
requirement: e,
|
|
65
65
|
isDisabled: s = !1,
|
|
66
66
|
type: n = "text",
|
|
67
|
-
isPercent:
|
|
67
|
+
isPercent: l = !1
|
|
68
68
|
}) {
|
|
69
|
-
const { key: i, label:
|
|
69
|
+
const { key: i, label: o, description: u } = a || e, c = a ? a.answers[0]?.value : e.value, r = e?.metadata?.mask ?? null, d = e?.metadata?.prefix ?? void 0, m = g(r);
|
|
70
70
|
return i ? /* @__PURE__ */ t(
|
|
71
|
-
|
|
71
|
+
R,
|
|
72
72
|
{
|
|
73
73
|
isRequired: !0,
|
|
74
74
|
name: i,
|
|
75
|
-
label:
|
|
75
|
+
label: o,
|
|
76
76
|
defaultValue: c,
|
|
77
77
|
description: u,
|
|
78
78
|
isDisabled: s,
|
|
79
|
-
transform: r ?
|
|
79
|
+
transform: r ? m : void 0,
|
|
80
80
|
placeholder: r || void 0,
|
|
81
81
|
type: n,
|
|
82
|
-
|
|
82
|
+
adornmentStart: d,
|
|
83
|
+
adornmentEnd: l ? "%" : void 0
|
|
83
84
|
}
|
|
84
85
|
) : null;
|
|
85
86
|
}
|
|
86
87
|
function p({
|
|
87
|
-
question:
|
|
88
|
-
requirement:
|
|
88
|
+
question: a,
|
|
89
|
+
requirement: e,
|
|
89
90
|
isCurrency: s,
|
|
90
91
|
isPercent: n,
|
|
91
|
-
isDisabled:
|
|
92
|
+
isDisabled: l = !1
|
|
92
93
|
}) {
|
|
93
|
-
const { t: i } = v("common"), { key:
|
|
94
|
-
if (!
|
|
95
|
-
const d =
|
|
94
|
+
const { t: i } = v("common"), { key: o, label: u, description: c } = a || e, r = a ? a.answers[0]?.value : e.value;
|
|
95
|
+
if (!o) return null;
|
|
96
|
+
const d = e?.metadata?.type === "workers_compensation_rate" && e.metadata.riskClassCode !== void 0 ? `${e.metadata.riskClassCode}: ${e.metadata.riskClassDescription}` : null, m = e?.metadata?.rateType === "currency_per_hour" ? i("inputs.workersCompensationRatePerHourAdornment") : void 0;
|
|
96
97
|
return /* @__PURE__ */ t(
|
|
97
|
-
|
|
98
|
+
h,
|
|
98
99
|
{
|
|
99
100
|
isRequired: !0,
|
|
100
|
-
name:
|
|
101
|
+
name: o,
|
|
101
102
|
label: u,
|
|
102
103
|
description: c ?? d,
|
|
103
104
|
defaultValue: r != null ? Number(r) : void 0,
|
|
104
105
|
format: s ? "currency" : n ? "percent" : "decimal",
|
|
105
|
-
isDisabled:
|
|
106
|
+
isDisabled: l,
|
|
106
107
|
maximumFractionDigits: n ? 4 : void 0,
|
|
107
108
|
adornmentEnd: m
|
|
108
109
|
}
|
|
109
110
|
);
|
|
110
111
|
}
|
|
111
|
-
function P({ question:
|
|
112
|
-
const { key: n, label:
|
|
113
|
-
if (!c?.options) throw new Error(`RadioInput must have options:${JSON.stringify(
|
|
112
|
+
function P({ question: a, requirement: e, isDisabled: s = !1 }) {
|
|
113
|
+
const { key: n, label: l, description: i } = a || e, o = a ? a.answers[0]?.value : e.value, { Text: u } = C(), c = a ? a.inputQuestionFormat : e.metadata;
|
|
114
|
+
if (!c?.options) throw new Error(`RadioInput must have options:${JSON.stringify(a)}`);
|
|
114
115
|
return n ? /* @__PURE__ */ t(
|
|
115
116
|
_,
|
|
116
117
|
{
|
|
117
118
|
isRequired: !0,
|
|
118
119
|
name: n,
|
|
119
|
-
isDisabled: n.includes("fileNewHireReport") ?
|
|
120
|
+
isDisabled: n.includes("fileNewHireReport") ? o !== void 0 : s,
|
|
120
121
|
description: i && /* @__PURE__ */ t(u, { as: "span", children: /* @__PURE__ */ t(
|
|
121
122
|
"span",
|
|
122
123
|
{
|
|
123
|
-
dangerouslySetInnerHTML: { __html:
|
|
124
|
+
dangerouslySetInnerHTML: { __html: D.sanitize(i, E) }
|
|
124
125
|
}
|
|
125
126
|
) }),
|
|
126
|
-
label:
|
|
127
|
+
label: l,
|
|
127
128
|
options: c.options.map((r) => ({
|
|
128
129
|
value: r.value,
|
|
129
130
|
label: r.label
|
|
@@ -131,38 +132,38 @@ function P({ question: e, requirement: a, isDisabled: s = !1 }) {
|
|
|
131
132
|
}
|
|
132
133
|
) : null;
|
|
133
134
|
}
|
|
134
|
-
function
|
|
135
|
-
question:
|
|
136
|
-
requirement:
|
|
135
|
+
function S({
|
|
136
|
+
question: a,
|
|
137
|
+
requirement: e,
|
|
137
138
|
isDisabled: s = !1
|
|
138
139
|
}) {
|
|
139
|
-
const { key: n, label:
|
|
140
|
-
if (typeof
|
|
140
|
+
const { key: n, label: l, description: i } = a || e, o = a ? a.answers[0]?.value : e.value;
|
|
141
|
+
if (typeof o != "string" && typeof o < "u")
|
|
141
142
|
throw new Error("Expecting value to be string for DateInput");
|
|
142
143
|
return n ? /* @__PURE__ */ t(
|
|
143
144
|
T,
|
|
144
145
|
{
|
|
145
146
|
isRequired: !0,
|
|
146
147
|
name: n,
|
|
147
|
-
defaultValue:
|
|
148
|
-
label:
|
|
148
|
+
defaultValue: o ? new Date(o) : null,
|
|
149
|
+
label: l,
|
|
149
150
|
description: i,
|
|
150
151
|
isDisabled: s
|
|
151
152
|
}
|
|
152
153
|
) : null;
|
|
153
154
|
}
|
|
154
|
-
function
|
|
155
|
-
const { locale: n } = I(), { t:
|
|
156
|
-
if (
|
|
157
|
-
const { key: r, metadata: d, label: m, description: b } =
|
|
155
|
+
function N({ requirement: a, question: e, ...s }) {
|
|
156
|
+
const { locale: n } = I(), { t: l } = v("common");
|
|
157
|
+
if (a) {
|
|
158
|
+
const { key: r, metadata: d, label: m, description: b } = a, { validation: f } = d || {};
|
|
158
159
|
return f?.type === "one_of" ? /* @__PURE__ */ t(
|
|
159
|
-
|
|
160
|
+
x,
|
|
160
161
|
{
|
|
161
162
|
isRequired: !0,
|
|
162
163
|
name: r || "",
|
|
163
164
|
label: m || "",
|
|
164
165
|
description: b,
|
|
165
|
-
placeholder:
|
|
166
|
+
placeholder: l("selectPlaceholder"),
|
|
166
167
|
options: f.rates?.map((y) => ({
|
|
167
168
|
value: y,
|
|
168
169
|
label: F(y, n)
|
|
@@ -175,20 +176,20 @@ function S({ requirement: e, question: a, ...s }) {
|
|
|
175
176
|
name: r || "",
|
|
176
177
|
label: m || "",
|
|
177
178
|
description: b,
|
|
178
|
-
decimalValue:
|
|
179
|
+
decimalValue: a.value,
|
|
179
180
|
decimalMin: f?.min,
|
|
180
181
|
decimalMax: f?.max,
|
|
181
182
|
isDisabled: s.isDisabled
|
|
182
183
|
}
|
|
183
184
|
);
|
|
184
185
|
}
|
|
185
|
-
const { key: i, label:
|
|
186
|
+
const { key: i, label: o, description: u, answers: c } = e;
|
|
186
187
|
return /* @__PURE__ */ t(
|
|
187
188
|
w,
|
|
188
189
|
{
|
|
189
190
|
isRequired: !0,
|
|
190
191
|
name: i || "",
|
|
191
|
-
label:
|
|
192
|
+
label: o || "",
|
|
192
193
|
description: u,
|
|
193
194
|
decimalValue: c[0]?.value,
|
|
194
195
|
isDisabled: s.isDisabled
|
|
@@ -196,12 +197,12 @@ function S({ requirement: e, question: a, ...s }) {
|
|
|
196
197
|
);
|
|
197
198
|
}
|
|
198
199
|
export {
|
|
199
|
-
|
|
200
|
+
S as DateField,
|
|
200
201
|
p as NumberInput,
|
|
201
202
|
K as QuestionInput,
|
|
202
203
|
P as RadioInput,
|
|
203
204
|
L as SelectInput,
|
|
204
|
-
|
|
205
|
+
N as TaxRateInput,
|
|
205
206
|
k as TextInput
|
|
206
207
|
};
|
|
207
208
|
//# sourceMappingURL=TaxInputs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaxInputs.js","sources":["../../../../src/components/Common/TaxInputs/TaxInputs.tsx"],"sourcesContent":["import DOMPurify from 'dompurify'\nimport type { EmployeeStateTaxQuestion } from '@gusto/embedded-api/models/components/employeestatetaxquestion'\nimport { type TaxRequirement } from '@gusto/embedded-api/models/components/taxrequirement'\nimport { useTranslation } from 'react-i18next'\nimport { SelectField } from '../Fields/SelectField/SelectField'\nimport { TextInputField } from '../Fields/TextInputField/TextInputField'\nimport { NumberInputField } from '../Fields/NumberInputField/NumberInputField'\nimport { RadioGroupField } from '../Fields/RadioGroupField/RadioGroupField'\nimport { DatePickerField } from '../Fields/DatePickerField/DatePickerField'\nimport { PercentageField } from '../Fields/PercentageField/PercentageField'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useLocale } from '@/contexts/LocaleProvider'\nimport { useMaskedTransform } from '@/helpers/mask'\nimport { formatPercentLabel } from '@/helpers/percentageConversion'\n\nconst dompurifyConfig = { ALLOWED_TAGS: ['a', 'b', 'strong'], ALLOWED_ATTR: ['target', 'href'] }\n\ninterface EmpQ {\n question: NonNullable<EmployeeStateTaxQuestion>\n requirement?: never\n isDisabled?: boolean\n}\ninterface CompR {\n requirement: TaxRequirement\n question?: never\n isDisabled?: boolean\n}\n\ntype NumberFieldProps = { isCurrency?: boolean; isPercent?: boolean }\n\ntype TextInputProps = { type?: string; isPercent?: boolean }\n\n/** @internal */\nexport function QuestionInput({\n questionType,\n ...props\n}: (EmpQ | CompR) & {\n questionType: string\n}) {\n switch (questionType.toLowerCase()) {\n case 'date':\n return <DateField {...props} />\n case 'radio':\n return <RadioInput {...props} />\n case 'text':\n case 'account_number': //TODO: temporary - need special handling for account numbers\n return <TextInput {...props} />\n case 'select':\n return <SelectInput {...props} />\n case 'number':\n return <NumberInput {...props} />\n case 'workers_compensation_rate':\n return (\n <NumberInput {...props} isPercent={props.requirement?.metadata?.rateType === 'percent'} />\n )\n case 'percent':\n case 'tax_rate':\n return <TaxRateInput {...props} />\n case 'currency':\n return <NumberInput {...props} isCurrency />\n default:\n return <TextInput {...props} />\n // return null\n }\n}\n\n/** @internal */\nexport function SelectInput({ question, requirement, isDisabled = false }: EmpQ | CompR) {\n const { t } = useTranslation('common')\n const { key, label, description } = question ? question : requirement\n const value = question ? question.answers[0]?.value : requirement.value\n\n const meta = question ? question.inputQuestionFormat : requirement.metadata\n if (!meta?.options) throw new Error('Select input must have options')\n\n if (!key) return null\n\n return (\n <SelectField\n isRequired\n name={key}\n defaultValue={value}\n label={label as string}\n description={description}\n placeholder={t('selectPlaceholder')}\n isDisabled={\n key.includes('fileNewHireReport') ? (value === undefined ? false : true) : isDisabled\n }\n options={meta.options.map((item, _) => ({\n value: item.value,\n label: item.label,\n }))}\n />\n )\n}\n\n/** @internal */\nexport function TextInput({\n question,\n requirement,\n isDisabled = false,\n type = 'text',\n isPercent = false,\n}: (EmpQ | CompR) & TextInputProps) {\n const { key, label, description } = question ? question : requirement\n const value = question ? question.answers[0]?.value : requirement.value\n const mask = requirement?.metadata?.mask ?? null\n const transform = useMaskedTransform(mask)\n\n if (!key) return null\n return (\n <TextInputField\n isRequired\n name={key}\n label={label}\n // @ts-expect-error HACK value is insufficiently narrowed here\n defaultValue={value}\n description={description}\n isDisabled={isDisabled}\n transform={mask ? transform : undefined}\n placeholder={mask ? mask : undefined}\n type={type}\n adornmentEnd={isPercent ? '%' : undefined}\n />\n )\n}\n\n/** @internal */\nexport function NumberInput({\n question,\n requirement,\n isCurrency,\n isPercent,\n isDisabled = false,\n}: (EmpQ | CompR) & NumberFieldProps) {\n const { t } = useTranslation('common')\n const { key, label, description } = question ? question : requirement\n const value = question ? question.answers[0]?.value : requirement.value\n\n if (!key) return null\n\n const wcDescription =\n requirement?.metadata?.type === 'workers_compensation_rate' &&\n requirement.metadata.riskClassCode !== undefined\n ? `${requirement.metadata.riskClassCode}: ${requirement.metadata.riskClassDescription}`\n : null\n const adornmentEnd =\n requirement?.metadata?.rateType === 'currency_per_hour'\n ? t('inputs.workersCompensationRatePerHourAdornment')\n : undefined\n\n return (\n <NumberInputField\n isRequired\n name={key}\n label={label}\n description={description ?? wcDescription}\n defaultValue={value !== undefined && value !== null ? Number(value) : undefined}\n format={isCurrency ? 'currency' : isPercent ? 'percent' : 'decimal'}\n isDisabled={isDisabled}\n maximumFractionDigits={isPercent ? 4 : undefined}\n adornmentEnd={adornmentEnd}\n />\n )\n}\n\n/** @internal */\nexport function RadioInput({ question, requirement, isDisabled = false }: EmpQ | CompR) {\n const { key, label, description } = question ? question : requirement\n const value = question ? question.answers[0]?.value : requirement.value\n const { Text } = useComponentContext()\n\n const meta = question ? question.inputQuestionFormat : requirement.metadata\n if (!meta?.options) throw new Error(`RadioInput must have options:${JSON.stringify(question)}`)\n\n if (!key) return null\n\n return (\n <RadioGroupField\n isRequired\n name={key}\n //File new hire report setting cannot be changed after it has been configured.\n isDisabled={\n key.includes('fileNewHireReport') ? (value === undefined ? false : true) : isDisabled\n }\n description={\n description && (\n <Text as=\"span\">\n <span\n dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(description, dompurifyConfig) }}\n />\n </Text>\n )\n }\n label={label as string}\n options={meta.options.map(item => ({\n value: item.value,\n label: item.label,\n }))}\n />\n )\n}\n//TODO: This type is untested as of yet\n/** @internal */\nexport function DateField({\n question,\n requirement,\n isDisabled = false,\n}: (EmpQ | CompR) & NumberFieldProps) {\n const { key, label, description } = question ? question : requirement\n const value = question ? question.answers[0]?.value : requirement.value\n if (typeof value !== 'string' && typeof value !== 'undefined')\n throw new Error('Expecting value to be string for DateInput')\n\n if (!key) return null\n\n return (\n <DatePickerField\n isRequired\n name={key}\n defaultValue={value ? new Date(value) : null}\n label={label as string}\n description={description}\n isDisabled={isDisabled}\n />\n )\n}\n\n/** @internal */\nexport function TaxRateInput({ requirement, question, ...props }: EmpQ | CompR) {\n const { locale } = useLocale()\n const { t } = useTranslation('common')\n\n if (requirement) {\n const { key, metadata, label, description } = requirement\n const { validation } = metadata || {}\n\n if (validation?.type === 'one_of') {\n return (\n <SelectField\n isRequired\n name={key || ''}\n label={label || ''}\n description={description}\n placeholder={t('selectPlaceholder')}\n options={\n validation.rates?.map(rate => ({\n value: rate,\n label: formatPercentLabel(rate, locale),\n })) || []\n }\n />\n )\n }\n\n return (\n <PercentageField\n isRequired\n name={key || ''}\n label={label || ''}\n description={description}\n decimalValue={requirement.value}\n decimalMin={validation?.min}\n decimalMax={validation?.max}\n isDisabled={props.isDisabled}\n />\n )\n }\n\n const { key, label, description, answers } = question\n return (\n <PercentageField\n isRequired\n name={key || ''}\n label={label || ''}\n description={description}\n decimalValue={answers[0]?.value}\n isDisabled={props.isDisabled}\n />\n )\n}\n"],"names":["dompurifyConfig","QuestionInput","questionType","props","jsx","DateField","RadioInput","TextInput","SelectInput","NumberInput","TaxRateInput","question","requirement","isDisabled","t","useTranslation","key","label","description","value","meta","SelectField","item","_","type","isPercent","mask","transform","useMaskedTransform","TextInputField","isCurrency","wcDescription","adornmentEnd","NumberInputField","Text","useComponentContext","RadioGroupField","DOMPurify","DatePickerField","locale","useLocale","metadata","validation","rate","formatPercentLabel","PercentageField","answers"],"mappings":";;;;;;;;;;;;;AAeA,MAAMA,IAAkB,EAAE,cAAc,CAAC,KAAK,KAAK,QAAQ,GAAG,cAAc,CAAC,UAAU,MAAM,EAAA;AAkBtF,SAASC,EAAc;AAAA,EAC5B,cAAAC;AAAA,EACA,GAAGC;AACL,GAEG;AACD,UAAQD,EAAa,eAAY;AAAA,IAC/B,KAAK;AACH,aAAO,gBAAAE,EAACC,GAAA,EAAW,GAAGF,EAAA,CAAO;AAAA,IAC/B,KAAK;AACH,aAAO,gBAAAC,EAACE,GAAA,EAAY,GAAGH,EAAA,CAAO;AAAA,IAChC,KAAK;AAAA,IACL,KAAK;AACH,aAAO,gBAAAC,EAACG,GAAA,EAAW,GAAGJ,EAAA,CAAO;AAAA,IAC/B,KAAK;AACH,aAAO,gBAAAC,EAACI,GAAA,EAAa,GAAGL,EAAA,CAAO;AAAA,IACjC,KAAK;AACH,aAAO,gBAAAC,EAACK,GAAA,EAAa,GAAGN,EAAA,CAAO;AAAA,IACjC,KAAK;AACH,aACE,gBAAAC,EAACK,KAAa,GAAG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AAA,IAAA;AAAA,EAGxB;AAEA,QAAM,EAAE,KAAAa,GAAK,OAAAC,GAAO,aAAAC,GAAa,SAAA4B,MAAYnC;AAC7C,SACE,gBAAAP;AAAA,IAACyC;AAAA,IAAA;AAAA,MACC,YAAU;AAAA,MACV,MAAM7B,KAAO;AAAA,MACb,OAAOC,KAAS;AAAA,MAChB,aAAAC;AAAA,MACA,cAAc4B,EAAQ,CAAC,GAAG;AAAA,MAC1B,YAAY3C,EAAM;AAAA,IAAA;AAAA,EAAA;AAGxB;"}
|
|
1
|
+
{"version":3,"file":"TaxInputs.js","sources":["../../../../src/components/Common/TaxInputs/TaxInputs.tsx"],"sourcesContent":["import DOMPurify from 'dompurify'\nimport type { EmployeeStateTaxQuestion } from '@gusto/embedded-api/models/components/employeestatetaxquestion'\nimport { type TaxRequirement } from '@gusto/embedded-api/models/components/taxrequirement'\nimport { useTranslation } from 'react-i18next'\nimport { SelectField } from '../Fields/SelectField/SelectField'\nimport { TextInputField } from '../Fields/TextInputField/TextInputField'\nimport { NumberInputField } from '../Fields/NumberInputField/NumberInputField'\nimport { RadioGroupField } from '../Fields/RadioGroupField/RadioGroupField'\nimport { DatePickerField } from '../Fields/DatePickerField/DatePickerField'\nimport { PercentageField } from '../Fields/PercentageField/PercentageField'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useLocale } from '@/contexts/LocaleProvider'\nimport { useMaskedTransform } from '@/helpers/mask'\nimport { formatPercentLabel } from '@/helpers/percentageConversion'\n\nconst dompurifyConfig = { ALLOWED_TAGS: ['a', 'b', 'strong'], ALLOWED_ATTR: ['target', 'href'] }\n\ninterface EmpQ {\n question: NonNullable<EmployeeStateTaxQuestion>\n requirement?: never\n isDisabled?: boolean\n}\ninterface CompR {\n requirement: TaxRequirement\n question?: never\n isDisabled?: boolean\n}\n\ntype NumberFieldProps = { isCurrency?: boolean; isPercent?: boolean }\n\ntype TextInputProps = { type?: string; isPercent?: boolean }\n\n/** @internal */\nexport function QuestionInput({\n questionType,\n ...props\n}: (EmpQ | CompR) & {\n questionType: string\n}) {\n switch (questionType.toLowerCase()) {\n case 'date':\n return <DateField {...props} />\n case 'radio':\n return <RadioInput {...props} />\n case 'text':\n case 'account_number':\n return <TextInput {...props} />\n case 'select':\n return <SelectInput {...props} />\n case 'number':\n return <NumberInput {...props} />\n case 'workers_compensation_rate':\n return (\n <NumberInput {...props} isPercent={props.requirement?.metadata?.rateType === 'percent'} />\n )\n case 'percent':\n case 'tax_rate':\n return <TaxRateInput {...props} />\n case 'currency':\n return <NumberInput {...props} isCurrency />\n default:\n return <TextInput {...props} />\n // return null\n }\n}\n\n/** @internal */\nexport function SelectInput({ question, requirement, isDisabled = false }: EmpQ | CompR) {\n const { t } = useTranslation('common')\n const { key, label, description } = question ? question : requirement\n const value = question ? question.answers[0]?.value : requirement.value\n\n const meta = question ? question.inputQuestionFormat : requirement.metadata\n if (!meta?.options) throw new Error('Select input must have options')\n\n if (!key) return null\n\n return (\n <SelectField\n isRequired\n name={key}\n defaultValue={value}\n label={label as string}\n description={description}\n placeholder={t('selectPlaceholder')}\n isDisabled={\n key.includes('fileNewHireReport') ? (value === undefined ? false : true) : isDisabled\n }\n options={meta.options.map((item, _) => ({\n value: item.value,\n label: item.label,\n }))}\n />\n )\n}\n\n/** @internal */\nexport function TextInput({\n question,\n requirement,\n isDisabled = false,\n type = 'text',\n isPercent = false,\n}: (EmpQ | CompR) & TextInputProps) {\n const { key, label, description } = question ? question : requirement\n const value = question ? question.answers[0]?.value : requirement.value\n const mask = requirement?.metadata?.mask ?? null\n const prefix = requirement?.metadata?.prefix ?? undefined\n const transform = useMaskedTransform(mask)\n\n if (!key) return null\n return (\n <TextInputField\n isRequired\n name={key}\n label={label}\n // @ts-expect-error HACK value is insufficiently narrowed here\n defaultValue={value}\n description={description}\n isDisabled={isDisabled}\n transform={mask ? transform : undefined}\n placeholder={mask ? mask : undefined}\n type={type}\n adornmentStart={prefix}\n adornmentEnd={isPercent ? '%' : undefined}\n />\n )\n}\n\n/** @internal */\nexport function NumberInput({\n question,\n requirement,\n isCurrency,\n isPercent,\n isDisabled = false,\n}: (EmpQ | CompR) & NumberFieldProps) {\n const { t } = useTranslation('common')\n const { key, label, description } = question ? question : requirement\n const value = question ? question.answers[0]?.value : requirement.value\n\n if (!key) return null\n\n const wcDescription =\n requirement?.metadata?.type === 'workers_compensation_rate' &&\n requirement.metadata.riskClassCode !== undefined\n ? `${requirement.metadata.riskClassCode}: ${requirement.metadata.riskClassDescription}`\n : null\n const adornmentEnd =\n requirement?.metadata?.rateType === 'currency_per_hour'\n ? t('inputs.workersCompensationRatePerHourAdornment')\n : undefined\n\n return (\n <NumberInputField\n isRequired\n name={key}\n label={label}\n description={description ?? wcDescription}\n defaultValue={value !== undefined && value !== null ? Number(value) : undefined}\n format={isCurrency ? 'currency' : isPercent ? 'percent' : 'decimal'}\n isDisabled={isDisabled}\n maximumFractionDigits={isPercent ? 4 : undefined}\n adornmentEnd={adornmentEnd}\n />\n )\n}\n\n/** @internal */\nexport function RadioInput({ question, requirement, isDisabled = false }: EmpQ | CompR) {\n const { key, label, description } = question ? question : requirement\n const value = question ? question.answers[0]?.value : requirement.value\n const { Text } = useComponentContext()\n\n const meta = question ? question.inputQuestionFormat : requirement.metadata\n if (!meta?.options) throw new Error(`RadioInput must have options:${JSON.stringify(question)}`)\n\n if (!key) return null\n\n return (\n <RadioGroupField\n isRequired\n name={key}\n //File new hire report setting cannot be changed after it has been configured.\n isDisabled={\n key.includes('fileNewHireReport') ? (value === undefined ? false : true) : isDisabled\n }\n description={\n description && (\n <Text as=\"span\">\n <span\n dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(description, dompurifyConfig) }}\n />\n </Text>\n )\n }\n label={label as string}\n options={meta.options.map(item => ({\n value: item.value,\n label: item.label,\n }))}\n />\n )\n}\n//TODO: This type is untested as of yet\n/** @internal */\nexport function DateField({\n question,\n requirement,\n isDisabled = false,\n}: (EmpQ | CompR) & NumberFieldProps) {\n const { key, label, description } = question ? question : requirement\n const value = question ? question.answers[0]?.value : requirement.value\n if (typeof value !== 'string' && typeof value !== 'undefined')\n throw new Error('Expecting value to be string for DateInput')\n\n if (!key) return null\n\n return (\n <DatePickerField\n isRequired\n name={key}\n defaultValue={value ? new Date(value) : null}\n label={label as string}\n description={description}\n isDisabled={isDisabled}\n />\n )\n}\n\n/** @internal */\nexport function TaxRateInput({ requirement, question, ...props }: EmpQ | CompR) {\n const { locale } = useLocale()\n const { t } = useTranslation('common')\n\n if (requirement) {\n const { key, metadata, label, description } = requirement\n const { validation } = metadata || {}\n\n if (validation?.type === 'one_of') {\n return (\n <SelectField\n isRequired\n name={key || ''}\n label={label || ''}\n description={description}\n placeholder={t('selectPlaceholder')}\n options={\n validation.rates?.map(rate => ({\n value: rate,\n label: formatPercentLabel(rate, locale),\n })) || []\n }\n />\n )\n }\n\n return (\n <PercentageField\n isRequired\n name={key || ''}\n label={label || ''}\n description={description}\n decimalValue={requirement.value}\n decimalMin={validation?.min}\n decimalMax={validation?.max}\n isDisabled={props.isDisabled}\n />\n )\n }\n\n const { key, label, description, answers } = question\n return (\n <PercentageField\n isRequired\n name={key || ''}\n label={label || ''}\n description={description}\n decimalValue={answers[0]?.value}\n isDisabled={props.isDisabled}\n />\n )\n}\n"],"names":["dompurifyConfig","QuestionInput","questionType","props","jsx","DateField","RadioInput","TextInput","SelectInput","NumberInput","TaxRateInput","question","requirement","isDisabled","t","useTranslation","key","label","description","value","meta","SelectField","item","_","type","isPercent","mask","prefix","transform","useMaskedTransform","TextInputField","isCurrency","wcDescription","adornmentEnd","NumberInputField","Text","useComponentContext","RadioGroupField","DOMPurify","DatePickerField","locale","useLocale","metadata","validation","rate","formatPercentLabel","PercentageField","answers"],"mappings":";;;;;;;;;;;;;AAeA,MAAMA,IAAkB,EAAE,cAAc,CAAC,KAAK,KAAK,QAAQ,GAAG,cAAc,CAAC,UAAU,MAAM,EAAA;AAkBtF,SAASC,EAAc;AAAA,EAC5B,cAAAC;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AAvC;AAAA,MAACiB;AAAA,MAAA;AAAA,QACC,YAAU;AAAA,QACV,MAAML,KAAO;AAAA,QACb,OAAOC,KAAS;AAAA,QAChB,aAAaC;AAAAA,QACb,aAAaJ,EAAE,mBAAmB;AAAA,QAClC,SACE6B,EAAW,OAAO,IAAI,CAAAC,OAAS;AAAA,UAC7B,OAAOA;AAAA,UACP,OAAOC,EAAmBD,GAAMJ,CAAM;AAAA,QAAA,EACtC,KAAK,CAAA;AAAA,MAAC;AAAA,IAAA,IAOd,gBAAApC;AAAA,MAAC0C;AAAA,MAAA;AAAA,QACC,YAAU;AAAA,QACV,MAAM9B,KAAO;AAAA,QACb,OAAOC,KAAS;AAAA,QAChB,aAAaC;AAAAA,QACb,cAAcN,EAAY;AAAA,QAC1B,YAAY+B,GAAY;AAAA,QACxB,YAAYA,GAAY;AAAA,QACxB,YAAYxC,EAAM;AAAA,MAAA;AAAA,IAAA;AAAA,EAGxB;AAEA,QAAM,EAAE,KAAAa,GAAK,OAAAC,GAAO,aAAAC,GAAa,SAAA6B,MAAYpC;AAC7C,SACE,gBAAAP;AAAA,IAAC0C;AAAA,IAAA;AAAA,MACC,YAAU;AAAA,MACV,MAAM9B,KAAO;AAAA,MACb,OAAOC,KAAS;AAAA,MAChB,aAAAC;AAAA,MACA,cAAc6B,EAAQ,CAAC,GAAG;AAAA,MAC1B,YAAY5C,EAAM;AAAA,IAAA;AAAA,EAAA;AAGxB;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import h from "classnames";
|
|
3
|
+
import { Flex as u } from "../../Flex/Flex.js";
|
|
3
4
|
import { BreadcrumbsDefaults as C } from "./BreadcrumbsTypes.js";
|
|
4
5
|
import i from "./Breadcrumbs.module.scss.js";
|
|
5
6
|
import { applyMissingDefaults as x } from "../../../../helpers/applyMissingDefaults.js";
|
|
6
|
-
import { Flex as u } from "../../Flex/Flex.js";
|
|
7
7
|
function P(f) {
|
|
8
8
|
const p = x(f, C), {
|
|
9
9
|
className: s,
|
|
@@ -7,13 +7,13 @@ import { FileInputDefaults as K } from "./FileInputTypes.js";
|
|
|
7
7
|
import n from "./FileInput.module.scss.js";
|
|
8
8
|
import { applyMissingDefaults as L } from "../../../../helpers/applyMissingDefaults.js";
|
|
9
9
|
import { FieldLayout as O } from "../../FieldLayout/FieldLayout.js";
|
|
10
|
+
import { Flex as y } from "../../Flex/Flex.js";
|
|
10
11
|
import { ButtonIcon as R } from "../Button/ButtonIcon.js";
|
|
11
12
|
import W from "../../../../assets/icons/icon-trashcan.svg.js";
|
|
12
13
|
import Z from "../../../../assets/icons/icon-file-outline.svg.js";
|
|
13
14
|
import $ from "../../../../assets/icons/icon-file-pdf.svg.js";
|
|
14
15
|
import H from "../../../../assets/icons/icon-file-png.svg.js";
|
|
15
16
|
import V from "../../../../assets/icons/icon-file-jpg.svg.js";
|
|
16
|
-
import { Flex as y } from "../../Flex/Flex.js";
|
|
17
17
|
function Q(i) {
|
|
18
18
|
return i === "application/pdf" ? $ : i === "image/png" ? H : i === "image/jpeg" || i === "image/jpg" ? V : Z;
|
|
19
19
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import c from "classnames";
|
|
3
|
-
import n from "
|
|
4
|
-
import
|
|
3
|
+
import { Flex as n } from "../../Flex/Flex.js";
|
|
4
|
+
import p from "./ProgressBar.module.scss.js";
|
|
5
5
|
import { VisuallyHidden as d } from "../../VisuallyHidden/VisuallyHidden.js";
|
|
6
6
|
function y({
|
|
7
7
|
className: i,
|
|
@@ -13,9 +13,9 @@ function y({
|
|
|
13
13
|
const s = Math.max(1, Math.min(m, e)), l = {
|
|
14
14
|
"--g-progress-bar-width": `${s * 100 / e}%`
|
|
15
15
|
};
|
|
16
|
-
return /* @__PURE__ */ t(
|
|
16
|
+
return /* @__PURE__ */ t(n, { flexDirection: "column", children: [
|
|
17
17
|
o && /* @__PURE__ */ r(o, {}),
|
|
18
|
-
/* @__PURE__ */ r("div", { className: c(
|
|
18
|
+
/* @__PURE__ */ r("div", { className: c(p.root, i), style: l, children: /* @__PURE__ */ r(d, { children: /* @__PURE__ */ r("progress", { "aria-label": a, value: s, max: e }) }) })
|
|
19
19
|
] });
|
|
20
20
|
}
|
|
21
21
|
export {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const o = "
|
|
1
|
+
const o = "_root_1elr3_1", r = "_icons_1elr3_17", s = "_popover_1elr3_68", t = {
|
|
2
2
|
root: o,
|
|
3
|
-
icons:
|
|
4
|
-
popover:
|
|
3
|
+
icons: r,
|
|
4
|
+
popover: s
|
|
5
5
|
};
|
|
6
6
|
export {
|
|
7
7
|
t as default,
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
r as icons,
|
|
9
|
+
s as popover,
|
|
10
10
|
o as root
|
|
11
11
|
};
|
|
12
12
|
//# sourceMappingURL=Select.module.scss.js.map
|
|
@@ -11,11 +11,10 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerror";
|
|
|
11
11
|
import "@gusto/embedded-api/models/errors/httpclienterrors";
|
|
12
12
|
import "../../../../shared/constants.js";
|
|
13
13
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
|
-
import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
15
14
|
import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
|
|
16
|
-
const [
|
|
15
|
+
const [d, s] = t("CreateSignatoryContext");
|
|
17
16
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
s as CreateSignatoryProvider,
|
|
18
|
+
d as useCreateSignatory
|
|
20
19
|
};
|
|
21
20
|
//# sourceMappingURL=useCreateSignatory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCreateSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\n/**\n * Initial values for the {@link CreateSignatory} form fields. At least one field must be provided.\n *\n * @public\n */\nexport type CreateSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title' | 'phone' | 'birthday'> &\n Pick<\n NonNullable<Signatory['homeAddress']>,\n 'street1' | 'street2' | 'city' | 'state' | 'zip'\n > & {\n ssn?: string\n }\n>\ntype CreateSignatoryContextType = {\n isPending: boolean\n currentSignatory?: Signatory\n}\n\nconst [useCreateSignatory, CreateSignatoryProvider] =\n createCompoundContext<CreateSignatoryContextType>('CreateSignatoryContext')\n\nexport {\n /** @internal */\n useCreateSignatory,\n /** @internal */\n CreateSignatoryProvider,\n}\n"],"names":["useCreateSignatory","CreateSignatoryProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useCreateSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\n/**\n * Initial values for the {@link CreateSignatory} form fields. At least one field must be provided.\n *\n * @public\n */\nexport type CreateSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title' | 'phone' | 'birthday'> &\n Pick<\n NonNullable<Signatory['homeAddress']>,\n 'street1' | 'street2' | 'city' | 'state' | 'zip'\n > & {\n ssn?: string\n }\n>\ntype CreateSignatoryContextType = {\n isPending: boolean\n currentSignatory?: Signatory\n}\n\nconst [useCreateSignatory, CreateSignatoryProvider] =\n createCompoundContext<CreateSignatoryContextType>('CreateSignatoryContext')\n\nexport {\n /** @internal */\n useCreateSignatory,\n /** @internal */\n CreateSignatoryProvider,\n}\n"],"names":["useCreateSignatory","CreateSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAuBA,MAAM,CAACA,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
|
|
@@ -11,11 +11,10 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerror";
|
|
|
11
11
|
import "@gusto/embedded-api/models/errors/httpclienterrors";
|
|
12
12
|
import "../../../../shared/constants.js";
|
|
13
13
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
|
-
import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
15
14
|
import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
|
|
16
|
-
const [
|
|
15
|
+
const [S, c] = t("InviteSignatoryContext");
|
|
17
16
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
c as InviteSignatoryProvider,
|
|
18
|
+
S as useInviteSignatory
|
|
20
19
|
};
|
|
21
20
|
//# sourceMappingURL=useInviteSignatory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInviteSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\ntype InviteSignatoryContextType = {\n isPending: boolean\n}\n\n/**\n * Default values for the invite signatory form fields: `firstName`, `lastName`, `email`,\n * `confirmEmail`, and `title`. At least one field is required.\n *\n * @public\n */\nexport type InviteSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title'> & {\n confirmEmail: string\n }\n>\n\nconst [useInviteSignatory, InviteSignatoryProvider] =\n createCompoundContext<InviteSignatoryContextType>('InviteSignatoryContext')\n\nexport { useInviteSignatory, InviteSignatoryProvider }\n"],"names":["useInviteSignatory","InviteSignatoryProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useInviteSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\ntype InviteSignatoryContextType = {\n isPending: boolean\n}\n\n/**\n * Default values for the invite signatory form fields: `firstName`, `lastName`, `email`,\n * `confirmEmail`, and `title`. At least one field is required.\n *\n * @public\n */\nexport type InviteSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title'> & {\n confirmEmail: string\n }\n>\n\nconst [useInviteSignatory, InviteSignatoryProvider] =\n createCompoundContext<InviteSignatoryContextType>('InviteSignatoryContext')\n\nexport { useInviteSignatory, InviteSignatoryProvider }\n"],"names":["useInviteSignatory","InviteSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAoBA,MAAM,CAACA,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
|
|
@@ -11,15 +11,14 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerror";
|
|
|
11
11
|
import "@gusto/embedded-api/models/errors/httpclienterrors";
|
|
12
12
|
import "../../../shared/constants.js";
|
|
13
13
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
|
-
import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
15
14
|
import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
|
|
16
|
-
const
|
|
15
|
+
const d = {
|
|
17
16
|
createSignatory: "createSignatory",
|
|
18
17
|
inviteSignatory: "inviteSignatory"
|
|
19
|
-
}, [
|
|
18
|
+
}, [v, x] = t("AssignSignatoryContext");
|
|
20
19
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
x as AssignSignatoryProvider,
|
|
21
|
+
d as SignatoryAssignmentMode,
|
|
22
|
+
v as useAssignSignatory
|
|
24
23
|
};
|
|
25
24
|
//# sourceMappingURL=useAssignSignatory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAssignSignatory.js","sources":["../../../../src/components/Company/AssignSignatory/useAssignSignatory.ts"],"sourcesContent":["import { type CreateSignatoryDefaultValues } from './CreateSignatory'\nimport { type InviteSignatoryDefaultValues } from './InviteSignatory'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\n/** @internal */\nexport const SignatoryAssignmentMode = {\n createSignatory: 'createSignatory',\n inviteSignatory: 'inviteSignatory',\n} as const\n\n/**\n * Default values for the create and invite forms rendered by {@link AssignSignatory}.\n *\n * @remarks\n * At least one of `create` or `invite` must be provided.\n *\n * @public\n */\nexport type AssignSignatoryDefaultValues = RequireAtLeastOne<{\n create?: CreateSignatoryDefaultValues\n invite?: InviteSignatoryDefaultValues\n}>\n\ntype AssignSignatoryContextType = {\n companyId: string\n signatoryId?: string\n defaultValues?: AssignSignatoryDefaultValues\n onSignatoryAssignmentModeChange: (mode: string) => void\n onSignatoryFormEvent: BaseComponentInterface['onEvent']\n}\n\nconst [useAssignSignatory, AssignSignatoryProvider] =\n createCompoundContext<AssignSignatoryContextType>('AssignSignatoryContext')\n\nexport { useAssignSignatory, AssignSignatoryProvider }\n"],"names":["SignatoryAssignmentMode","useAssignSignatory","AssignSignatoryProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useAssignSignatory.js","sources":["../../../../src/components/Company/AssignSignatory/useAssignSignatory.ts"],"sourcesContent":["import { type CreateSignatoryDefaultValues } from './CreateSignatory'\nimport { type InviteSignatoryDefaultValues } from './InviteSignatory'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\n/** @internal */\nexport const SignatoryAssignmentMode = {\n createSignatory: 'createSignatory',\n inviteSignatory: 'inviteSignatory',\n} as const\n\n/**\n * Default values for the create and invite forms rendered by {@link AssignSignatory}.\n *\n * @remarks\n * At least one of `create` or `invite` must be provided.\n *\n * @public\n */\nexport type AssignSignatoryDefaultValues = RequireAtLeastOne<{\n create?: CreateSignatoryDefaultValues\n invite?: InviteSignatoryDefaultValues\n}>\n\ntype AssignSignatoryContextType = {\n companyId: string\n signatoryId?: string\n defaultValues?: AssignSignatoryDefaultValues\n onSignatoryAssignmentModeChange: (mode: string) => void\n onSignatoryFormEvent: BaseComponentInterface['onEvent']\n}\n\nconst [useAssignSignatory, AssignSignatoryProvider] =\n createCompoundContext<AssignSignatoryContextType>('AssignSignatoryContext')\n\nexport { useAssignSignatory, AssignSignatoryProvider }\n"],"names":["SignatoryAssignmentMode","useAssignSignatory","AssignSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAOO,MAAMA,IAA0B;AAAA,EACrC,iBAAiB;AAAA,EACjB,iBAAiB;AACnB,GAuBM,CAACC,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
|
|
@@ -11,11 +11,10 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerror";
|
|
|
11
11
|
import "@gusto/embedded-api/models/errors/httpclienterrors";
|
|
12
12
|
import "../../../../shared/constants.js";
|
|
13
13
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
|
-
import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
15
14
|
import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
|
|
16
|
-
const [
|
|
15
|
+
const [C, d] = o("BankAccountContext");
|
|
17
16
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
d as BankAccountFormProvider,
|
|
18
|
+
C as useBankAccountForm
|
|
20
19
|
};
|
|
21
20
|
//# sourceMappingURL=context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountForm/context.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\nimport { type OnEventType } from '@/components/Base/useBase'\nimport { type EventType } from '@/shared/constants'\n\ntype BankAccountFormContextType = {\n isPending: boolean\n isEditing: boolean\n onEvent: OnEventType<EventType, unknown>\n}\n\nconst [useBankAccountForm, BankAccountFormProvider] =\n createCompoundContext<BankAccountFormContextType>('BankAccountContext')\n\nexport { useBankAccountForm, BankAccountFormProvider }\n"],"names":["useBankAccountForm","BankAccountFormProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountForm/context.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\nimport { type OnEventType } from '@/components/Base/useBase'\nimport { type EventType } from '@/shared/constants'\n\ntype BankAccountFormContextType = {\n isPending: boolean\n isEditing: boolean\n onEvent: OnEventType<EventType, unknown>\n}\n\nconst [useBankAccountForm, BankAccountFormProvider] =\n createCompoundContext<BankAccountFormContextType>('BankAccountContext')\n\nexport { useBankAccountForm, BankAccountFormProvider }\n"],"names":["useBankAccountForm","BankAccountFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAoBC,CAAuB,IAChDC,EAAkD,oBAAoB;"}
|
|
@@ -11,13 +11,12 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerror";
|
|
|
11
11
|
import "@gusto/embedded-api/models/errors/httpclienterrors";
|
|
12
12
|
import "../../../../shared/constants.js";
|
|
13
13
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
|
-
import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
15
14
|
import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
|
|
16
|
-
const [
|
|
15
|
+
const [a, d] = t(
|
|
17
16
|
"CompanyDocumentListContext"
|
|
18
17
|
);
|
|
19
18
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
d as DocumentListProvider,
|
|
20
|
+
a as useDocumentList
|
|
22
21
|
};
|
|
23
22
|
//# sourceMappingURL=useDocumentList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDocumentList.js","sources":["../../../../../src/components/Company/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { type Form as FormSchema } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n companyForms: FormSchema[]\n documentListError: Error | null\n handleRequestFormToSign: (form: FormSchema) => void\n handleChangeSignatory: () => void\n handleContinue: () => void\n isSelfSignatory: boolean\n signatory?: Signatory\n}\n\nconst [useDocumentList, DocumentListProvider] = createCompoundContext<DocumentListContextType>(\n 'CompanyDocumentListContext',\n)\n\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useDocumentList.js","sources":["../../../../../src/components/Company/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { type Form as FormSchema } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n companyForms: FormSchema[]\n documentListError: Error | null\n handleRequestFormToSign: (form: FormSchema) => void\n handleChangeSignatory: () => void\n handleContinue: () => void\n isSelfSignatory: boolean\n signatory?: Signatory\n}\n\nconst [useDocumentList, DocumentListProvider] = createCompoundContext<DocumentListContextType>(\n 'CompanyDocumentListContext',\n)\n\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAcA,MAAM,CAACA,GAAiBC,CAAoB,IAAIC;AAAA,EAC9C;AACF;"}
|
|
@@ -13,19 +13,18 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerror";
|
|
|
13
13
|
import "@gusto/embedded-api/models/errors/httpclienterrors";
|
|
14
14
|
import "../../../shared/constants.js";
|
|
15
15
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
16
|
-
import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
17
16
|
import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
|
|
18
|
-
const
|
|
17
|
+
const C = o.object({
|
|
19
18
|
federalEin: o.string().optional(),
|
|
20
19
|
taxPayerType: o.enum(Object.values(e)).optional(),
|
|
21
20
|
filingForm: o.enum(Object.values(r)).optional(),
|
|
22
21
|
legalName: o.string().min(1)
|
|
23
|
-
}), [
|
|
22
|
+
}), [b, j] = t(
|
|
24
23
|
"CompanyFederalTaxesContext"
|
|
25
24
|
);
|
|
26
25
|
export {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
C as FederalTaxFormSchema,
|
|
27
|
+
j as FederalTaxesProvider,
|
|
28
|
+
b as useFederalTaxes
|
|
30
29
|
};
|
|
31
30
|
//# sourceMappingURL=useFederalTaxes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFederalTaxes.js","sources":["../../../../src/components/Company/FederalTaxes/useFederalTaxes.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { FederalTaxDetails } from '@gusto/embedded-api/models/components/federaltaxdetails'\nimport { FilingForm, TaxPayerType } from '@gusto/embedded-api/models/components/federaltaxdetails'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\n/** @internal */\nexport const FederalTaxFormSchema = z.object({\n federalEin: z.string().optional(),\n taxPayerType: z.enum(Object.values(TaxPayerType) as [string, ...string[]]).optional(),\n filingForm: z.enum(Object.values(FilingForm) as [string, ...string[]]).optional(),\n legalName: z.string().min(1),\n})\n\n/** @internal */\nexport type FederalTaxFormInputs = z.input<typeof FederalTaxFormSchema>\n\n/**\n * Pre-populated values for the company federal tax form, supplied via {@link FederalTaxesProps}.\n * At least one of `taxPayerType`, `filingForm`, or `legalName` must be provided.\n *\n * @public\n */\nexport type FederalTaxesDefaultValues = RequireAtLeastOne<{\n taxPayerType?: FederalTaxFormInputs['taxPayerType']\n filingForm?: FederalTaxFormInputs['filingForm']\n legalName?: FederalTaxFormInputs['legalName']\n}>\n\ntype FederalTaxesContextType = {\n isPending: boolean\n federalTaxDetails?: FederalTaxDetails\n}\n\nconst [useFederalTaxes, FederalTaxesProvider] = createCompoundContext<FederalTaxesContextType>(\n 'CompanyFederalTaxesContext',\n)\n\nexport { useFederalTaxes, FederalTaxesProvider }\n"],"names":["FederalTaxFormSchema","z","TaxPayerType","FilingForm","useFederalTaxes","FederalTaxesProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useFederalTaxes.js","sources":["../../../../src/components/Company/FederalTaxes/useFederalTaxes.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { FederalTaxDetails } from '@gusto/embedded-api/models/components/federaltaxdetails'\nimport { FilingForm, TaxPayerType } from '@gusto/embedded-api/models/components/federaltaxdetails'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\n/** @internal */\nexport const FederalTaxFormSchema = z.object({\n federalEin: z.string().optional(),\n taxPayerType: z.enum(Object.values(TaxPayerType) as [string, ...string[]]).optional(),\n filingForm: z.enum(Object.values(FilingForm) as [string, ...string[]]).optional(),\n legalName: z.string().min(1),\n})\n\n/** @internal */\nexport type FederalTaxFormInputs = z.input<typeof FederalTaxFormSchema>\n\n/**\n * Pre-populated values for the company federal tax form, supplied via {@link FederalTaxesProps}.\n * At least one of `taxPayerType`, `filingForm`, or `legalName` must be provided.\n *\n * @public\n */\nexport type FederalTaxesDefaultValues = RequireAtLeastOne<{\n taxPayerType?: FederalTaxFormInputs['taxPayerType']\n filingForm?: FederalTaxFormInputs['filingForm']\n legalName?: FederalTaxFormInputs['legalName']\n}>\n\ntype FederalTaxesContextType = {\n isPending: boolean\n federalTaxDetails?: FederalTaxDetails\n}\n\nconst [useFederalTaxes, FederalTaxesProvider] = createCompoundContext<FederalTaxesContextType>(\n 'CompanyFederalTaxesContext',\n)\n\nexport { useFederalTaxes, FederalTaxesProvider }\n"],"names":["FederalTaxFormSchema","z","TaxPayerType","FilingForm","useFederalTaxes","FederalTaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AAOO,MAAMA,IAAuBC,EAAE,OAAO;AAAA,EAC3C,YAAYA,EAAE,OAAA,EAAS,SAAA;AAAA,EACvB,cAAcA,EAAE,KAAK,OAAO,OAAOC,CAAY,CAA0B,EAAE,SAAA;AAAA,EAC3E,YAAYD,EAAE,KAAK,OAAO,OAAOE,CAAU,CAA0B,EAAE,SAAA;AAAA,EACvE,WAAWF,EAAE,OAAA,EAAS,IAAI,CAAC;AAC7B,CAAC,GAsBK,CAACG,GAAiBC,CAAoB,IAAIC;AAAA,EAC9C;AACF;"}
|