@gusto/embedded-react-sdk 0.10.5 → 0.10.6
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 +7 -0
- package/dist/components/Base/Base.js +18 -19
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Common/OnboardingStatusBadge/index.d.ts +1 -1
- package/dist/components/Common/OnboardingStatusBadge/index.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.js +4 -6
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +6 -7
- package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +7 -8
- package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
- package/dist/components/Common/TaxInputs/TaxInputs.d.ts +1 -0
- package/dist/components/Common/TaxInputs/TaxInputs.js +100 -80
- package/dist/components/Common/TaxInputs/TaxInputs.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +11 -13
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +0 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +2 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +9 -10
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +7 -8
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +8 -9
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +7 -8
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -5
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +15 -17
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +1 -1
- package/dist/components/Company/DocumentSigner/DocumentSigner.js +24 -22
- package/dist/components/Company/DocumentSigner/DocumentSigner.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +7 -9
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +15 -17
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +2 -3
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +1 -1
- package/dist/components/Company/Industry/Actions.js +1 -1
- package/dist/components/Company/Industry/Context.js +1 -1
- package/dist/components/Company/Industry/Edit.js +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +4 -5
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +7 -9
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +9 -11
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +5 -6
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +2 -3
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -4
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +16 -18
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +25 -26
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +2 -3
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +5 -6
- package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.js +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +14 -14
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +1 -1
- package/dist/components/Contractor/Address/Address.js +0 -2
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +6 -7
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +1 -1
- package/dist/components/Contractor/List/index.js +2 -3
- package/dist/components/Contractor/List/index.js.map +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +16 -17
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -3
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/Compensation/Actions.js +5 -6
- package/dist/components/Employee/Compensation/Actions.js.map +1 -1
- package/dist/components/Employee/Compensation/Edit.js +2 -3
- package/dist/components/Employee/Compensation/Edit.js.map +1 -1
- package/dist/components/Employee/Compensation/List.js +1 -1
- package/dist/components/Employee/Deductions/Actions.js +1 -1
- package/dist/components/Employee/Deductions/DeductionForm.js +1 -1
- package/dist/components/Employee/Deductions/DeductionsList.js +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductionsForm.js +1 -1
- package/dist/components/Employee/Deductions/useDeductions.js +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +10 -12
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -3
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +8 -10
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +1 -1
- package/dist/components/Employee/EmployeeList/Actions.js +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js +9 -11
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Head.js +2 -3
- package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
- package/dist/components/Employee/EmployeeList/List.js +14 -15
- package/dist/components/Employee/EmployeeList/List.js.map +1 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +1 -1
- package/dist/components/Employee/Landing/Landing.js +6 -7
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Actions.js +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +2 -3
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +2 -3
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +3 -4
- package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +1 -1
- package/dist/components/Employee/Profile/Actions.js +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +9 -10
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/HomeAddress.js +4 -5
- package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +1 -1
- package/dist/components/Employee/Profile/useProfile.js +1 -1
- package/dist/components/Employee/Taxes/Actions.js +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +1 -1
- package/dist/shared/constants.js +1 -1
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { jsxs as t, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { z as
|
|
3
|
-
import { useTranslation as
|
|
2
|
+
import { z as n } from "zod";
|
|
3
|
+
import { useTranslation as i } from "react-i18next";
|
|
4
4
|
import { accountNumberValidation as m, routingNumberValidation as u } from "../../../../helpers/validations.js";
|
|
5
5
|
import { Flex as a } from "../../../Common/Flex/Flex.js";
|
|
6
|
-
import "classnames";
|
|
7
6
|
import { TextInputField as e } from "../../../Common/Fields/TextInputField/TextInputField.js";
|
|
8
|
-
const
|
|
7
|
+
const N = n.object({
|
|
9
8
|
routingNumber: u,
|
|
10
9
|
accountNumber: m
|
|
11
10
|
});
|
|
12
|
-
function
|
|
13
|
-
const { t: r } =
|
|
11
|
+
function d() {
|
|
12
|
+
const { t: r } = i("Company.BankAccount");
|
|
14
13
|
return /* @__PURE__ */ t(a, { flexDirection: "column", gap: 20, children: [
|
|
15
14
|
/* @__PURE__ */ o(
|
|
16
15
|
e,
|
|
@@ -34,7 +33,7 @@ function g() {
|
|
|
34
33
|
] });
|
|
35
34
|
}
|
|
36
35
|
export {
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
N as BankAccountFormSchema,
|
|
37
|
+
d as Form
|
|
39
38
|
};
|
|
40
39
|
//# sourceMappingURL=Form.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountForm/Form.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useTranslation } from 'react-i18next'\nimport { accountNumberValidation, routingNumberValidation } from '@/helpers/validations'\nimport { Flex, TextInputField } from '@/components/Common'\n\nexport const BankAccountFormSchema = z.object({\n routingNumber: routingNumberValidation,\n accountNumber: accountNumberValidation,\n})\n\nexport type BankAccountFormInputs = z.infer<typeof BankAccountFormSchema>\n\nexport function Form() {\n const { t } = useTranslation('Company.BankAccount')\n\n return (\n <Flex flexDirection=\"column\" gap={20}>\n <TextInputField\n name=\"routingNumber\"\n isRequired\n label={t('form.routingNumberLabel')}\n description={t('form.routingNumberDescription')}\n errorMessage={t('validations.routingNumber')}\n />\n <TextInputField\n name=\"accountNumber\"\n label={t('form.accountNumberLabel')}\n isRequired\n errorMessage={t('validations.accountNumber')}\n />\n </Flex>\n )\n}\n"],"names":["BankAccountFormSchema","z","routingNumberValidation","accountNumberValidation","Form","t","useTranslation","jsxs","Flex","jsx","TextInputField"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Form.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountForm/Form.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useTranslation } from 'react-i18next'\nimport { accountNumberValidation, routingNumberValidation } from '@/helpers/validations'\nimport { Flex, TextInputField } from '@/components/Common'\n\nexport const BankAccountFormSchema = z.object({\n routingNumber: routingNumberValidation,\n accountNumber: accountNumberValidation,\n})\n\nexport type BankAccountFormInputs = z.infer<typeof BankAccountFormSchema>\n\nexport function Form() {\n const { t } = useTranslation('Company.BankAccount')\n\n return (\n <Flex flexDirection=\"column\" gap={20}>\n <TextInputField\n name=\"routingNumber\"\n isRequired\n label={t('form.routingNumberLabel')}\n description={t('form.routingNumberDescription')}\n errorMessage={t('validations.routingNumber')}\n />\n <TextInputField\n name=\"accountNumber\"\n label={t('form.accountNumberLabel')}\n isRequired\n errorMessage={t('validations.accountNumber')}\n />\n </Flex>\n )\n}\n"],"names":["BankAccountFormSchema","z","routingNumberValidation","accountNumberValidation","Form","t","useTranslation","jsxs","Flex","jsx","TextInputField"],"mappings":";;;;;;AAKa,MAAAA,IAAwBC,EAAE,OAAO;AAAA,EAC5C,eAAeC;AAAA,EACf,eAAeC;AACjB,CAAC;AAIM,SAASC,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB;AAElD,SACG,gBAAAC,EAAAC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAOL,EAAE,yBAAyB;AAAA,QAClC,aAAaA,EAAE,+BAA+B;AAAA,QAC9C,cAAcA,EAAE,2BAA2B;AAAA,MAAA;AAAA,IAC7C;AAAA,IACA,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOL,EAAE,yBAAyB;AAAA,QAClC,YAAU;AAAA,QACV,cAAcA,EAAE,2BAA2B;AAAA,MAAA;AAAA,IAAA;AAAA,EAC7C,GACF;AAEJ;"}
|
|
@@ -8,9 +8,9 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
|
|
|
8
8
|
import "@tanstack/react-query";
|
|
9
9
|
import "../../../Base/useBase.js";
|
|
10
10
|
import "../../../../shared/constants.js";
|
|
11
|
-
import "classnames";
|
|
12
11
|
import "dompurify";
|
|
13
12
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
13
|
+
import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
14
14
|
import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
|
|
15
15
|
const [C, d] = o("BankAccountContext");
|
|
16
16
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as e, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation as i } from "react-i18next";
|
|
3
3
|
import { useBankAccount as a } from "./context.js";
|
|
4
|
-
import "
|
|
4
|
+
import "../../../../shared/constants.js";
|
|
5
5
|
import { ActionsLayout as m } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
6
6
|
import { useComponentContext as s } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
7
|
function f() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as c, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation as e } from "react-i18next";
|
|
3
3
|
import { useBankAccountVerify as r } from "./context.js";
|
|
4
|
-
import "
|
|
4
|
+
import "../../../../shared/constants.js";
|
|
5
5
|
import { ActionsLayout as s } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
6
6
|
import { useComponentContext as m } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
7
|
function C() {
|
|
@@ -2,13 +2,12 @@ import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import { z as o } from "zod";
|
|
3
3
|
import { useTranslation as n } from "react-i18next";
|
|
4
4
|
import { Flex as s } from "../../../Common/Flex/Flex.js";
|
|
5
|
-
import "classnames";
|
|
6
5
|
import { NumberInputField as i } from "../../../Common/Fields/NumberInputField/NumberInputField.js";
|
|
7
|
-
const
|
|
6
|
+
const u = o.object({
|
|
8
7
|
deposit1: o.number().min(0),
|
|
9
8
|
deposit2: o.number().min(0)
|
|
10
9
|
});
|
|
11
|
-
function
|
|
10
|
+
function l() {
|
|
12
11
|
const { t: e } = n("Company.BankAccount");
|
|
13
12
|
return /* @__PURE__ */ t(s, { flexDirection: "column", gap: 20, children: [
|
|
14
13
|
/* @__PURE__ */ r(
|
|
@@ -36,7 +35,7 @@ function f() {
|
|
|
36
35
|
] });
|
|
37
36
|
}
|
|
38
37
|
export {
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
u as BankAccountVerifySchema,
|
|
39
|
+
l as Form
|
|
41
40
|
};
|
|
42
41
|
//# sourceMappingURL=Form.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountVerify/Form.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useTranslation } from 'react-i18next'\nimport { Flex, NumberInputField } from '@/components/Common'\n\nexport const BankAccountVerifySchema = z.object({\n deposit1: z.number().min(0),\n deposit2: z.number().min(0),\n})\n\nexport type BankAccountVerifyInputs = z.infer<typeof BankAccountVerifySchema>\n\nexport function Form() {\n const { t } = useTranslation('Company.BankAccount')\n\n return (\n <Flex flexDirection=\"column\" gap={20}>\n <NumberInputField\n name=\"deposit1\"\n format=\"currency\"\n isRequired\n label={t('deposit1Label')}\n description={t('deposit1Description')}\n errorMessage={t('validations.deposit1')}\n />\n <NumberInputField\n name=\"deposit2\"\n format=\"currency\"\n label={t('deposit2Label')}\n description={t('deposit2Description')}\n isRequired\n errorMessage={t('validations.deposit2')}\n />\n </Flex>\n )\n}\n"],"names":["BankAccountVerifySchema","z","Form","t","useTranslation","jsxs","Flex","jsx","NumberInputField"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Form.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountVerify/Form.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useTranslation } from 'react-i18next'\nimport { Flex, NumberInputField } from '@/components/Common'\n\nexport const BankAccountVerifySchema = z.object({\n deposit1: z.number().min(0),\n deposit2: z.number().min(0),\n})\n\nexport type BankAccountVerifyInputs = z.infer<typeof BankAccountVerifySchema>\n\nexport function Form() {\n const { t } = useTranslation('Company.BankAccount')\n\n return (\n <Flex flexDirection=\"column\" gap={20}>\n <NumberInputField\n name=\"deposit1\"\n format=\"currency\"\n isRequired\n label={t('deposit1Label')}\n description={t('deposit1Description')}\n errorMessage={t('validations.deposit1')}\n />\n <NumberInputField\n name=\"deposit2\"\n format=\"currency\"\n label={t('deposit2Label')}\n description={t('deposit2Description')}\n isRequired\n errorMessage={t('validations.deposit2')}\n />\n </Flex>\n )\n}\n"],"names":["BankAccountVerifySchema","z","Form","t","useTranslation","jsxs","Flex","jsx","NumberInputField"],"mappings":";;;;;AAIa,MAAAA,IAA0BC,EAAE,OAAO;AAAA,EAC9C,UAAUA,EAAE,SAAS,IAAI,CAAC;AAAA,EAC1B,UAAUA,EAAE,OAAO,EAAE,IAAI,CAAC;AAC5B,CAAC;AAIM,SAASC,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB;AAElD,SACG,gBAAAC,EAAAC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,QAAO;AAAA,QACP,YAAU;AAAA,QACV,OAAOL,EAAE,eAAe;AAAA,QACxB,aAAaA,EAAE,qBAAqB;AAAA,QACpC,cAAcA,EAAE,sBAAsB;AAAA,MAAA;AAAA,IACxC;AAAA,IACA,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,QAAO;AAAA,QACP,OAAOL,EAAE,eAAe;AAAA,QACxB,aAAaA,EAAE,qBAAqB;AAAA,QACpC,YAAU;AAAA,QACV,cAAcA,EAAE,sBAAsB;AAAA,MAAA;AAAA,IAAA;AAAA,EACxC,GACF;AAEJ;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation as m } from "react-i18next";
|
|
3
3
|
import { useDocumentList as e } from "./useDocumentList.js";
|
|
4
|
-
import "
|
|
4
|
+
import "../../../../shared/constants.js";
|
|
5
5
|
import { ActionsLayout as s } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
6
6
|
import { useComponentContext as c } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
7
|
function d({ continueCtaLabel: t }) {
|
|
@@ -4,53 +4,51 @@ import { useSignatoriesListSuspense as _ } from "@gusto/embedded-api/react-query
|
|
|
4
4
|
import { Head as a } from "./Head.js";
|
|
5
5
|
import { List as c } from "./List.js";
|
|
6
6
|
import { ManageSignatories as u } from "./ManageSignatories.js";
|
|
7
|
-
import { Actions as
|
|
7
|
+
import { Actions as l } from "./Actions.js";
|
|
8
8
|
import { DocumentListProvider as y } from "./useDocumentList.js";
|
|
9
9
|
import { useI18n as M } from "../../../../i18n/I18n.js";
|
|
10
10
|
import { BaseComponent as A } from "../../../Base/Base.js";
|
|
11
11
|
import { useBase as R } from "../../../Base/useBase.js";
|
|
12
12
|
import { Flex as D } from "../../../Common/Flex/Flex.js";
|
|
13
|
-
import "react-i18next";
|
|
14
|
-
import "classnames";
|
|
15
13
|
import { companyEvents as i } from "../../../../shared/constants.js";
|
|
16
14
|
function t(n) {
|
|
17
15
|
return /* @__PURE__ */ o(A, { ...n, children: /* @__PURE__ */ o(E, { ...n, children: n.children }) });
|
|
18
16
|
}
|
|
19
|
-
function E({ companyId: n, signatoryId: s, className:
|
|
17
|
+
function E({ companyId: n, signatoryId: s, className: d, children: m }) {
|
|
20
18
|
M("Company.DocumentList");
|
|
21
|
-
const { onEvent:
|
|
22
|
-
data: { formList:
|
|
23
|
-
error:
|
|
19
|
+
const { onEvent: e } = R(), {
|
|
20
|
+
data: { formList: f },
|
|
21
|
+
error: p
|
|
24
22
|
} = O({
|
|
25
23
|
companyId: n
|
|
26
|
-
}), g =
|
|
24
|
+
}), g = f, {
|
|
27
25
|
data: { signatoryList: h }
|
|
28
26
|
} = _({
|
|
29
27
|
companyUuid: n
|
|
30
|
-
}),
|
|
31
|
-
return /* @__PURE__ */ o("section", { className:
|
|
28
|
+
}), r = h[0], S = !!s && r?.uuid === s;
|
|
29
|
+
return /* @__PURE__ */ o("section", { className: d, children: /* @__PURE__ */ o(
|
|
32
30
|
y,
|
|
33
31
|
{
|
|
34
32
|
value: {
|
|
35
33
|
companyForms: g,
|
|
36
|
-
documentListError:
|
|
34
|
+
documentListError: p,
|
|
37
35
|
handleRequestFormToSign: (C) => {
|
|
38
|
-
|
|
36
|
+
e(i.COMPANY_VIEW_FORM_TO_SIGN, C);
|
|
39
37
|
},
|
|
40
38
|
handleChangeSignatory: () => {
|
|
41
|
-
|
|
39
|
+
e(i.COMPANY_FORM_EDIT_SIGNATORY, r);
|
|
42
40
|
},
|
|
43
41
|
handleContinue: () => {
|
|
44
|
-
|
|
42
|
+
e(i.COMPANY_FORMS_DONE);
|
|
45
43
|
},
|
|
46
44
|
isSelfSignatory: S,
|
|
47
|
-
signatory:
|
|
45
|
+
signatory: r
|
|
48
46
|
},
|
|
49
47
|
children: /* @__PURE__ */ o(D, { flexDirection: "column", gap: 32, children: m || /* @__PURE__ */ F(L, { children: [
|
|
50
48
|
/* @__PURE__ */ o(a, {}),
|
|
51
49
|
/* @__PURE__ */ o(u, {}),
|
|
52
50
|
/* @__PURE__ */ o(c, {}),
|
|
53
|
-
/* @__PURE__ */ o(
|
|
51
|
+
/* @__PURE__ */ o(l, {})
|
|
54
52
|
] }) })
|
|
55
53
|
}
|
|
56
54
|
) });
|
|
@@ -58,7 +56,7 @@ function E({ companyId: n, signatoryId: s, className: l, children: m }) {
|
|
|
58
56
|
t.Head = a;
|
|
59
57
|
t.ManageSignatories = u;
|
|
60
58
|
t.List = c;
|
|
61
|
-
t.Actions =
|
|
59
|
+
t.Actions = l;
|
|
62
60
|
export {
|
|
63
61
|
t as DocumentList
|
|
64
62
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentList.js","sources":["../../../../../src/components/Company/DocumentSigner/DocumentList/DocumentList.tsx"],"sourcesContent":["import { type Form as FormSchema } from '@gusto/embedded-api/models/components/form'\nimport { useCompanyFormsGetAllSuspense } from '@gusto/embedded-api/react-query/companyFormsGetAll'\nimport { useSignatoriesListSuspense } from '@gusto/embedded-api/react-query/signatoriesList'\nimport { Head } from './Head'\nimport { List } from './List'\nimport { ManageSignatories } from './ManageSignatories'\nimport { Actions } from './Actions'\nimport { DocumentListProvider } from './useDocumentList'\nimport { useI18n } from '@/i18n'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common'\nimport { companyEvents } from '@/shared/constants'\n\ninterface DocumentListProps extends BaseComponentInterface<'Company.DocumentList'> {\n companyId: string\n signatoryId?: string\n}\n\nexport function DocumentList(props: DocumentListProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, signatoryId, className, children }: DocumentListProps) {\n useI18n('Company.DocumentList')\n const { onEvent } = useBase()\n\n const {\n data: { formList },\n error: documentListError,\n } = useCompanyFormsGetAllSuspense({\n companyId,\n })\n const companyForms = formList!\n\n const {\n data: { signatoryList },\n } = useSignatoriesListSuspense({\n companyUuid: companyId,\n })\n const signatories = signatoryList!\n\n // For now, this will only ever have one entry for the current signatory since companies can\n // only have one signatory. If that changes in the future, this UX will need to be revisited.\n const signatory = signatories[0]\n const isSelfSignatory = !!signatoryId && signatory?.uuid === signatoryId\n\n const handleRequestFormToSign = (form: FormSchema) => {\n onEvent(companyEvents.COMPANY_VIEW_FORM_TO_SIGN, form)\n }\n\n const handleChangeSignatory = () => {\n onEvent(companyEvents.COMPANY_FORM_EDIT_SIGNATORY, signatory)\n }\n\n const handleContinue = () => {\n onEvent(companyEvents.COMPANY_FORMS_DONE)\n }\n\n return (\n <section className={className}>\n <DocumentListProvider\n value={{\n companyForms,\n documentListError,\n handleRequestFormToSign,\n handleChangeSignatory,\n handleContinue,\n isSelfSignatory,\n signatory,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <ManageSignatories />\n <List />\n <Actions />\n </>\n )}\n </Flex>\n </DocumentListProvider>\n </section>\n )\n}\n\nDocumentList.Head = Head\nDocumentList.ManageSignatories = ManageSignatories\nDocumentList.List = List\nDocumentList.Actions = Actions\n"],"names":["DocumentList","props","jsx","BaseComponent","Root","companyId","signatoryId","className","children","useI18n","onEvent","useBase","formList","documentListError","useCompanyFormsGetAllSuspense","companyForms","signatoryList","useSignatoriesListSuspense","signatory","isSelfSignatory","DocumentListProvider","form","companyEvents","Flex","jsxs","Fragment","Head","ManageSignatories","List","Actions"],"mappings":"
|
|
1
|
+
{"version":3,"file":"DocumentList.js","sources":["../../../../../src/components/Company/DocumentSigner/DocumentList/DocumentList.tsx"],"sourcesContent":["import { type Form as FormSchema } from '@gusto/embedded-api/models/components/form'\nimport { useCompanyFormsGetAllSuspense } from '@gusto/embedded-api/react-query/companyFormsGetAll'\nimport { useSignatoriesListSuspense } from '@gusto/embedded-api/react-query/signatoriesList'\nimport { Head } from './Head'\nimport { List } from './List'\nimport { ManageSignatories } from './ManageSignatories'\nimport { Actions } from './Actions'\nimport { DocumentListProvider } from './useDocumentList'\nimport { useI18n } from '@/i18n'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common'\nimport { companyEvents } from '@/shared/constants'\n\ninterface DocumentListProps extends BaseComponentInterface<'Company.DocumentList'> {\n companyId: string\n signatoryId?: string\n}\n\nexport function DocumentList(props: DocumentListProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, signatoryId, className, children }: DocumentListProps) {\n useI18n('Company.DocumentList')\n const { onEvent } = useBase()\n\n const {\n data: { formList },\n error: documentListError,\n } = useCompanyFormsGetAllSuspense({\n companyId,\n })\n const companyForms = formList!\n\n const {\n data: { signatoryList },\n } = useSignatoriesListSuspense({\n companyUuid: companyId,\n })\n const signatories = signatoryList!\n\n // For now, this will only ever have one entry for the current signatory since companies can\n // only have one signatory. If that changes in the future, this UX will need to be revisited.\n const signatory = signatories[0]\n const isSelfSignatory = !!signatoryId && signatory?.uuid === signatoryId\n\n const handleRequestFormToSign = (form: FormSchema) => {\n onEvent(companyEvents.COMPANY_VIEW_FORM_TO_SIGN, form)\n }\n\n const handleChangeSignatory = () => {\n onEvent(companyEvents.COMPANY_FORM_EDIT_SIGNATORY, signatory)\n }\n\n const handleContinue = () => {\n onEvent(companyEvents.COMPANY_FORMS_DONE)\n }\n\n return (\n <section className={className}>\n <DocumentListProvider\n value={{\n companyForms,\n documentListError,\n handleRequestFormToSign,\n handleChangeSignatory,\n handleContinue,\n isSelfSignatory,\n signatory,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <ManageSignatories />\n <List />\n <Actions />\n </>\n )}\n </Flex>\n </DocumentListProvider>\n </section>\n )\n}\n\nDocumentList.Head = Head\nDocumentList.ManageSignatories = ManageSignatories\nDocumentList.List = List\nDocumentList.Actions = Actions\n"],"names":["DocumentList","props","jsx","BaseComponent","Root","companyId","signatoryId","className","children","useI18n","onEvent","useBase","formList","documentListError","useCompanyFormsGetAllSuspense","companyForms","signatoryList","useSignatoriesListSuspense","signatory","isSelfSignatory","DocumentListProvider","form","companyEvents","Flex","jsxs","Fragment","Head","ManageSignatories","List","Actions"],"mappings":";;;;;;;;;;;;;AAmBO,SAASA,EAAaC,GAA0B;AAEnD,SAAA,gBAAAC,EAACC,GAAe,EAAA,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAMA,EAAA,SAAA,CAAS,EACnC,CAAA;AAEJ;AAEA,SAASG,EAAK,EAAE,WAAAC,GAAW,aAAAC,GAAa,WAAAC,GAAW,UAAAC,KAA+B;AAChF,EAAAC,EAAQ,sBAAsB;AACxB,QAAA,EAAE,SAAAC,EAAQ,IAAIC,EAAQ,GAEtB;AAAA,IACJ,MAAM,EAAE,UAAAC,EAAS;AAAA,IACjB,OAAOC;AAAA,MACLC,EAA8B;AAAA,IAChC,WAAAT;AAAA,EAAA,CACD,GACKU,IAAeH,GAEf;AAAA,IACJ,MAAM,EAAE,eAAAI,EAAc;AAAA,MACpBC,EAA2B;AAAA,IAC7B,aAAaZ;AAAA,EAAA,CACd,GAKKa,IAJcF,EAIU,CAAC,GACzBG,IAAkB,CAAC,CAACb,KAAeY,GAAW,SAASZ;AAe3D,SAAA,gBAAAJ,EAAC,aAAQ,WAAAK,GACP,UAAA,gBAAAL;AAAA,IAACkB;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,cAAAL;AAAA,QACA,mBAAAF;AAAA,QACA,yBAlBwB,CAACQ,MAAqB;AAC5C,UAAAX,EAAAY,EAAc,2BAA2BD,CAAI;AAAA,QACvD;AAAA,QAiBQ,uBAfsB,MAAM;AAC1B,UAAAX,EAAAY,EAAc,6BAA6BJ,CAAS;AAAA,QAC9D;AAAA,QAcQ,gBAZe,MAAM;AAC3B,UAAAR,EAAQY,EAAc,kBAAkB;AAAA,QAC1C;AAAA,QAWQ,iBAAAH;AAAA,QACA,WAAAD;AAAA,MACF;AAAA,MAEA,UAAA,gBAAAhB,EAACqB,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAAf,KAIG,gBAAAgB,EAAAC,GAAA,EAAA,UAAA;AAAA,QAAA,gBAAAvB,EAACwB,GAAK,EAAA;AAAA,0BACLC,GAAkB,EAAA;AAAA,0BAClBC,GAAK,EAAA;AAAA,0BACLC,GAAQ,CAAA,CAAA;AAAA,MAAA,EAAA,CACX,EAEJ,CAAA;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;AAEA7B,EAAa,OAAO0B;AACpB1B,EAAa,oBAAoB2B;AACjC3B,EAAa,OAAO4B;AACpB5B,EAAa,UAAU6B;"}
|
|
@@ -8,9 +8,9 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
|
|
|
8
8
|
import "@tanstack/react-query";
|
|
9
9
|
import "../../../Base/useBase.js";
|
|
10
10
|
import "../../../../shared/constants.js";
|
|
11
|
-
import "classnames";
|
|
12
11
|
import "dompurify";
|
|
13
12
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
13
|
+
import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
14
14
|
import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
|
|
15
15
|
const [a, d] = t(
|
|
16
16
|
"CompanyDocumentListContext"
|
|
@@ -1,41 +1,43 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createMachine as
|
|
3
|
-
import { useSignatoriesListSuspense as
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { createMachine as g } from "robot3";
|
|
3
|
+
import { useSignatoriesListSuspense as p } from "@gusto/embedded-api/react-query/signatoriesList";
|
|
4
4
|
import { useMemo as f } from "react";
|
|
5
|
-
import { DocumentList as
|
|
6
|
-
import { documentSignerMachine as
|
|
7
|
-
import { Flow as
|
|
8
|
-
import { BaseComponent as
|
|
5
|
+
import { DocumentList as i, AssignSignatory as S } from "./documentSignerStateMachine.js";
|
|
6
|
+
import { documentSignerMachine as d } from "./stateMachine.js";
|
|
7
|
+
import { Flow as D } from "../../Flow/Flow.js";
|
|
8
|
+
import { BaseComponent as L } from "../../Base/Base.js";
|
|
9
9
|
import "../../Base/useBase.js";
|
|
10
10
|
import { useComponentDictionary as h } from "../../../i18n/I18n.js";
|
|
11
11
|
import { SignatureForm as l } from "./SignatureForm/SignatureForm.js";
|
|
12
|
-
function x({ companyId: o, signatoryId:
|
|
12
|
+
function x({ companyId: o, signatoryId: e, onEvent: m, dictionary: s }) {
|
|
13
13
|
h("Company.DocumentList", s);
|
|
14
14
|
const {
|
|
15
15
|
data: { signatoryList: c }
|
|
16
|
-
} =
|
|
16
|
+
} = p({
|
|
17
17
|
companyUuid: o
|
|
18
|
-
}),
|
|
19
|
-
() =>
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
}), n = c.length > 0, u = f(
|
|
19
|
+
() => g(
|
|
20
|
+
n ? "documentList" : "index",
|
|
21
|
+
d,
|
|
22
22
|
(a) => ({
|
|
23
23
|
...a,
|
|
24
|
-
component:
|
|
24
|
+
component: n ? i : S,
|
|
25
25
|
companyId: o,
|
|
26
|
-
signatoryId:
|
|
26
|
+
signatoryId: e
|
|
27
27
|
})
|
|
28
28
|
),
|
|
29
|
-
|
|
29
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
30
|
+
[o]
|
|
31
|
+
// Only companyId - prevents recreation when signatoryId/doesSignatoryExist change
|
|
30
32
|
);
|
|
31
|
-
return /* @__PURE__ */
|
|
33
|
+
return /* @__PURE__ */ t(D, { machine: u, onEvent: m });
|
|
32
34
|
}
|
|
33
|
-
function
|
|
34
|
-
return /* @__PURE__ */
|
|
35
|
+
function r(o) {
|
|
36
|
+
return /* @__PURE__ */ t(L, { ...o, children: /* @__PURE__ */ t(x, { ...o }) });
|
|
35
37
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
r.DocumentList = i;
|
|
39
|
+
r.SignatureForm = l;
|
|
38
40
|
export {
|
|
39
|
-
|
|
41
|
+
r as DocumentSigner
|
|
40
42
|
};
|
|
41
43
|
//# sourceMappingURL=DocumentSigner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentSigner.js","sources":["../../../../src/components/Company/DocumentSigner/DocumentSigner.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useSignatoriesListSuspense } from '@gusto/embedded-api/react-query/signatoriesList'\nimport { useMemo } from 'react'\nimport { AssignSignatory, DocumentList } from './documentSignerStateMachine'\nimport { documentSignerMachine } from './stateMachine'\nimport type { DocumentSignerContextInterface } from './useDocumentSigner'\nimport { SignatureForm } from './SignatureForm'\nimport { Flow } from '@/components/Flow/Flow'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\nexport interface DocumentSignerProps extends BaseComponentInterface<'Company.DocumentList'> {\n companyId: string\n signatoryId?: string\n}\n\nfunction DocumentSignerFlow({ companyId, signatoryId, onEvent, dictionary }: DocumentSignerProps) {\n useComponentDictionary('Company.DocumentList', dictionary)\n const {\n data: { signatoryList },\n } = useSignatoriesListSuspense({\n companyUuid: companyId,\n })\n const signatories = signatoryList!\n const doesSignatoryExist = signatories.length > 0\n\n const documentSigner = useMemo(\n () =>\n createMachine(\n doesSignatoryExist ? 'documentList' : 'index',\n documentSignerMachine,\n (initialContext: DocumentSignerContextInterface) => ({\n ...initialContext,\n component: doesSignatoryExist ? DocumentList : AssignSignatory,\n companyId,\n signatoryId,\n }),\n ),\n [companyId, signatoryId
|
|
1
|
+
{"version":3,"file":"DocumentSigner.js","sources":["../../../../src/components/Company/DocumentSigner/DocumentSigner.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useSignatoriesListSuspense } from '@gusto/embedded-api/react-query/signatoriesList'\nimport { useMemo } from 'react'\nimport { AssignSignatory, DocumentList } from './documentSignerStateMachine'\nimport { documentSignerMachine } from './stateMachine'\nimport type { DocumentSignerContextInterface } from './useDocumentSigner'\nimport { SignatureForm } from './SignatureForm'\nimport { Flow } from '@/components/Flow/Flow'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\nexport interface DocumentSignerProps extends BaseComponentInterface<'Company.DocumentList'> {\n companyId: string\n signatoryId?: string\n}\n\nfunction DocumentSignerFlow({ companyId, signatoryId, onEvent, dictionary }: DocumentSignerProps) {\n useComponentDictionary('Company.DocumentList', dictionary)\n const {\n data: { signatoryList },\n } = useSignatoriesListSuspense({\n companyUuid: companyId,\n })\n const signatories = signatoryList!\n const doesSignatoryExist = signatories.length > 0\n\n const documentSigner = useMemo(\n () =>\n createMachine(\n doesSignatoryExist ? 'documentList' : 'index',\n documentSignerMachine,\n (initialContext: DocumentSignerContextInterface) => ({\n ...initialContext,\n component: doesSignatoryExist ? DocumentList : AssignSignatory,\n companyId,\n signatoryId,\n }),\n ),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [companyId], // Only companyId - prevents recreation when signatoryId/doesSignatoryExist change\n )\n return <Flow machine={documentSigner} onEvent={onEvent} />\n}\n\nexport function DocumentSigner(props: DocumentSignerProps) {\n return (\n <BaseComponent {...props}>\n <DocumentSignerFlow {...props} />\n </BaseComponent>\n )\n}\n\nDocumentSigner.DocumentList = DocumentList\nDocumentSigner.SignatureForm = SignatureForm\n"],"names":["DocumentSignerFlow","companyId","signatoryId","onEvent","dictionary","useComponentDictionary","signatoryList","useSignatoriesListSuspense","doesSignatoryExist","documentSigner","useMemo","createMachine","documentSignerMachine","initialContext","DocumentList","AssignSignatory","jsx","Flow","DocumentSigner","props","BaseComponent","SignatureForm"],"mappings":";;;;;;;;;;;AAgBA,SAASA,EAAmB,EAAE,WAAAC,GAAW,aAAAC,GAAa,SAAAC,GAAS,YAAAC,KAAmC;AAChG,EAAAC,EAAuB,wBAAwBD,CAAU;AACnD,QAAA;AAAA,IACJ,MAAM,EAAE,eAAAE,EAAc;AAAA,MACpBC,EAA2B;AAAA,IAC7B,aAAaN;AAAA,EAAA,CACd,GAEKO,IADcF,EACmB,SAAS,GAE1CG,IAAiBC;AAAA,IACrB,MACEC;AAAA,MACEH,IAAqB,iBAAiB;AAAA,MACtCI;AAAA,MACA,CAACC,OAAoD;AAAA,QACnD,GAAGA;AAAA,QACH,WAAWL,IAAqBM,IAAeC;AAAA,QAC/C,WAAAd;AAAA,QACA,aAAAC;AAAA,MACF;AAAA,IACF;AAAA;AAAA,IAEF,CAACD,CAAS;AAAA;AAAA,EACZ;AACA,SAAQ,gBAAAe,EAAAC,GAAA,EAAK,SAASR,GAAgB,SAAAN,EAAkB,CAAA;AAC1D;AAEO,SAASe,EAAeC,GAA4B;AAEvD,SAAA,gBAAAH,EAACI,KAAe,GAAGD,GACjB,4BAACnB,GAAoB,EAAA,GAAGmB,GAAO,EACjC,CAAA;AAEJ;AAEAD,EAAe,eAAeJ;AAC9BI,EAAe,gBAAgBG;"}
|
|
@@ -12,15 +12,13 @@ import { BaseComponent as v } from "../../../Base/Base.js";
|
|
|
12
12
|
import { useBase as x } from "../../../Base/useBase.js";
|
|
13
13
|
import { SignatureForm as G } from "../../../Common/SignatureForm/SignatureForm.js";
|
|
14
14
|
import { Flex as R } from "../../../Common/Flex/Flex.js";
|
|
15
|
-
import "
|
|
16
|
-
import "classnames";
|
|
17
|
-
import { companyEvents as e } from "../../../../shared/constants.js";
|
|
15
|
+
import { companyEvents as t } from "../../../../shared/constants.js";
|
|
18
16
|
function n(r) {
|
|
19
17
|
return /* @__PURE__ */ o(v, { ...r, children: /* @__PURE__ */ o(w, { ...r, children: r.children }) });
|
|
20
18
|
}
|
|
21
|
-
function w({ formId: r, children: m, dictionary:
|
|
22
|
-
O("Company.SignatureForm",
|
|
23
|
-
const { onEvent:
|
|
19
|
+
function w({ formId: r, children: m, dictionary: f }) {
|
|
20
|
+
O("Company.SignatureForm", f), b("Company.SignatureForm");
|
|
21
|
+
const { onEvent: e, baseSubmitHandler: p } = x(), {
|
|
24
22
|
data: { form: d }
|
|
25
23
|
} = _({
|
|
26
24
|
formId: r
|
|
@@ -37,11 +35,11 @@ function w({ formId: r, children: m, dictionary: p }) {
|
|
|
37
35
|
pdfUrl: C,
|
|
38
36
|
isPending: F,
|
|
39
37
|
onBack: () => {
|
|
40
|
-
t
|
|
38
|
+
e(t.COMPANY_SIGN_FORM_BACK);
|
|
41
39
|
}
|
|
42
40
|
},
|
|
43
41
|
children: /* @__PURE__ */ o(G, { onSubmit: async (h) => {
|
|
44
|
-
await
|
|
42
|
+
await p(h, async (i) => {
|
|
45
43
|
const y = await S({
|
|
46
44
|
request: {
|
|
47
45
|
formId: r,
|
|
@@ -51,7 +49,7 @@ function w({ formId: r, children: m, dictionary: p }) {
|
|
|
51
49
|
}
|
|
52
50
|
}
|
|
53
51
|
});
|
|
54
|
-
t
|
|
52
|
+
e(t.COMPANY_SIGN_FORM, y.form), e(t.COMPANY_SIGN_FORM_DONE);
|
|
55
53
|
});
|
|
56
54
|
}, children: /* @__PURE__ */ o(R, { flexDirection: "column", gap: 32, children: m || /* @__PURE__ */ P(N, { children: [
|
|
57
55
|
/* @__PURE__ */ o(a, {}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignatureForm.js","sources":["../../../../../src/components/Company/DocumentSigner/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { useCompanyFormsGetSuspense } from '@gusto/embedded-api/react-query/companyFormsGet'\nimport { useCompanyFormsSignMutation } from '@gusto/embedded-api/react-query/companyFormsSign'\nimport { useCompanyFormsGetPdfSuspense } from '@gusto/embedded-api/react-query/companyFormsGetPdf'\nimport { Head } from './Head'\nimport { Preview } from './Preview'\nimport { Form } from './Form'\nimport { Actions } from './Actions'\nimport { SignatureFormProvider } from './useSignatureForm'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport {\n SignatureForm as SharedSignatureForm,\n type SignatureFormInputs,\n} from '@/components/Common/SignatureForm'\nimport { Flex } from '@/components/Common'\nimport { companyEvents } from '@/shared/constants'\n\ninterface SignatureFormProps extends BaseComponentInterface<'Company.SignatureForm'> {\n formId: string\n companyId: string\n}\n\nexport function SignatureForm(props: SignatureFormProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nexport function Root({ formId, children, dictionary }: SignatureFormProps) {\n useComponentDictionary('Company.SignatureForm', dictionary)\n useI18n('Company.SignatureForm')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const {\n data: { form: formNullable },\n } = useCompanyFormsGetSuspense({\n formId,\n })\n const form = formNullable!\n\n const { isPending, mutateAsync: signForm } = useCompanyFormsSignMutation()\n\n const {\n data: { formPdf },\n } = useCompanyFormsGetPdfSuspense({\n formId,\n })\n const pdfUrl = formPdf!.documentUrl!\n\n const handleSubmit = async (data: SignatureFormInputs) => {\n await baseSubmitHandler(data, async payload => {\n const signFormResponse = await signForm({\n request: {\n formId,\n requestBody: {\n signatureText: payload.signature,\n agree: payload.confirmSignature,\n },\n },\n })\n\n onEvent(companyEvents.COMPANY_SIGN_FORM, signFormResponse.form)\n\n onEvent(companyEvents.COMPANY_SIGN_FORM_DONE)\n })\n }\n\n const handleBack = () => {\n onEvent(companyEvents.COMPANY_SIGN_FORM_BACK)\n }\n\n return (\n <SignatureFormProvider\n value={{\n form,\n pdfUrl,\n isPending,\n onBack: handleBack,\n }}\n >\n <SharedSignatureForm onSubmit={handleSubmit}>\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Preview />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </SharedSignatureForm>\n </SignatureFormProvider>\n )\n}\n\nSignatureForm.Head = Head\nSignatureForm.Preview = Preview\nSignatureForm.Form = Form\nSignatureForm.Actions = Actions\n"],"names":["SignatureForm","props","jsx","BaseComponent","Root","formId","children","dictionary","useComponentDictionary","useI18n","onEvent","baseSubmitHandler","useBase","formNullable","useCompanyFormsGetSuspense","form","isPending","signForm","useCompanyFormsSignMutation","formPdf","useCompanyFormsGetPdfSuspense","pdfUrl","SignatureFormProvider","companyEvents","SharedSignatureForm","data","payload","signFormResponse","Flex","jsxs","Fragment","Head","Preview","Form","Actions"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SignatureForm.js","sources":["../../../../../src/components/Company/DocumentSigner/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { useCompanyFormsGetSuspense } from '@gusto/embedded-api/react-query/companyFormsGet'\nimport { useCompanyFormsSignMutation } from '@gusto/embedded-api/react-query/companyFormsSign'\nimport { useCompanyFormsGetPdfSuspense } from '@gusto/embedded-api/react-query/companyFormsGetPdf'\nimport { Head } from './Head'\nimport { Preview } from './Preview'\nimport { Form } from './Form'\nimport { Actions } from './Actions'\nimport { SignatureFormProvider } from './useSignatureForm'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport {\n SignatureForm as SharedSignatureForm,\n type SignatureFormInputs,\n} from '@/components/Common/SignatureForm'\nimport { Flex } from '@/components/Common'\nimport { companyEvents } from '@/shared/constants'\n\ninterface SignatureFormProps extends BaseComponentInterface<'Company.SignatureForm'> {\n formId: string\n companyId: string\n}\n\nexport function SignatureForm(props: SignatureFormProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nexport function Root({ formId, children, dictionary }: SignatureFormProps) {\n useComponentDictionary('Company.SignatureForm', dictionary)\n useI18n('Company.SignatureForm')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const {\n data: { form: formNullable },\n } = useCompanyFormsGetSuspense({\n formId,\n })\n const form = formNullable!\n\n const { isPending, mutateAsync: signForm } = useCompanyFormsSignMutation()\n\n const {\n data: { formPdf },\n } = useCompanyFormsGetPdfSuspense({\n formId,\n })\n const pdfUrl = formPdf!.documentUrl!\n\n const handleSubmit = async (data: SignatureFormInputs) => {\n await baseSubmitHandler(data, async payload => {\n const signFormResponse = await signForm({\n request: {\n formId,\n requestBody: {\n signatureText: payload.signature,\n agree: payload.confirmSignature,\n },\n },\n })\n\n onEvent(companyEvents.COMPANY_SIGN_FORM, signFormResponse.form)\n\n onEvent(companyEvents.COMPANY_SIGN_FORM_DONE)\n })\n }\n\n const handleBack = () => {\n onEvent(companyEvents.COMPANY_SIGN_FORM_BACK)\n }\n\n return (\n <SignatureFormProvider\n value={{\n form,\n pdfUrl,\n isPending,\n onBack: handleBack,\n }}\n >\n <SharedSignatureForm onSubmit={handleSubmit}>\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Preview />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </SharedSignatureForm>\n </SignatureFormProvider>\n )\n}\n\nSignatureForm.Head = Head\nSignatureForm.Preview = Preview\nSignatureForm.Form = Form\nSignatureForm.Actions = Actions\n"],"names":["SignatureForm","props","jsx","BaseComponent","Root","formId","children","dictionary","useComponentDictionary","useI18n","onEvent","baseSubmitHandler","useBase","formNullable","useCompanyFormsGetSuspense","form","isPending","signForm","useCompanyFormsSignMutation","formPdf","useCompanyFormsGetPdfSuspense","pdfUrl","SignatureFormProvider","companyEvents","SharedSignatureForm","data","payload","signFormResponse","Flex","jsxs","Fragment","Head","Preview","Form","Actions"],"mappings":";;;;;;;;;;;;;;;AAwBO,SAASA,EAAcC,GAA2B;AAErD,SAAA,gBAAAC,EAACC,GAAe,EAAA,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAMA,EAAA,SAAA,CAAS,EACnC,CAAA;AAEJ;AAEO,SAASG,EAAK,EAAE,QAAAC,GAAQ,UAAAC,GAAU,YAAAC,KAAkC;AACzE,EAAAC,EAAuB,yBAAyBD,CAAU,GAC1DE,EAAQ,uBAAuB;AAC/B,QAAM,EAAE,SAAAC,GAAS,mBAAAC,EAAkB,IAAIC,EAAQ,GAEzC;AAAA,IACJ,MAAM,EAAE,MAAMC,EAAa;AAAA,MACzBC,EAA2B;AAAA,IAC7B,QAAAT;AAAA,EAAA,CACD,GACKU,IAAOF,GAEP,EAAE,WAAAG,GAAW,aAAaC,EAAA,IAAaC,EAA4B,GAEnE;AAAA,IACJ,MAAM,EAAE,SAAAC,EAAQ;AAAA,MACdC,EAA8B;AAAA,IAChC,QAAAf;AAAA,EAAA,CACD,GACKgB,IAASF,EAAS;AAyBtB,SAAA,gBAAAjB;AAAA,IAACoB;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,MAAAP;AAAA,QACA,QAAAM;AAAA,QACA,WAAAL;AAAA,QACA,QAVa,MAAM;AACvB,UAAAN,EAAQa,EAAc,sBAAsB;AAAA,QAC9C;AAAA,MASI;AAAA,MAEA,UAAC,gBAAArB,EAAAsB,GAAA,EAAoB,UA/BJ,OAAOC,MAA8B;AAClD,cAAAd,EAAkBc,GAAM,OAAMC,MAAW;AACvC,gBAAAC,IAAmB,MAAMV,EAAS;AAAA,YACtC,SAAS;AAAA,cACP,QAAAZ;AAAA,cACA,aAAa;AAAA,gBACX,eAAeqB,EAAQ;AAAA,gBACvB,OAAOA,EAAQ;AAAA,cAAA;AAAA,YACjB;AAAA,UACF,CACD;AAEO,UAAAhB,EAAAa,EAAc,mBAAmBI,EAAiB,IAAI,GAE9DjB,EAAQa,EAAc,sBAAsB;AAAA,QAAA,CAC7C;AAAA,MACH,GAgBM,UAAC,gBAAArB,EAAA0B,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UACCtB,KAGE,gBAAAuB,EAAAC,GAAA,EAAA,UAAA;AAAA,QAAA,gBAAA5B,EAAC6B,GAAK,EAAA;AAAA,0BACLC,GAAQ,EAAA;AAAA,0BACRC,GAAK,EAAA;AAAA,0BACLC,GAAQ,CAAA,CAAA;AAAA,MAAA,EACX,CAAA,EAEJ,CAAA,EACF,CAAA;AAAA,IAAA;AAAA,EACF;AAEJ;AAEAlC,EAAc,OAAO+B;AACrB/B,EAAc,UAAUgC;AACxBhC,EAAc,OAAOiC;AACrBjC,EAAc,UAAUkC;"}
|
|
@@ -8,9 +8,9 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
|
|
|
8
8
|
import "@tanstack/react-query";
|
|
9
9
|
import "../../../Base/useBase.js";
|
|
10
10
|
import "../../../../shared/constants.js";
|
|
11
|
-
import "classnames";
|
|
12
11
|
import "dompurify";
|
|
13
12
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
13
|
+
import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
14
14
|
import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
|
|
15
15
|
const [c, d] = o(
|
|
16
16
|
"CompanySignatureFormContext"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation as r } from "react-i18next";
|
|
3
3
|
import { useFederalTaxes as i } from "./useFederalTaxes.js";
|
|
4
|
-
import "
|
|
4
|
+
import "../../../shared/constants.js";
|
|
5
5
|
import { ActionsLayout as s } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
6
6
|
import { useComponentContext as m } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
7
|
const l = () => {
|
|
@@ -12,15 +12,13 @@ import { useI18n as R, useComponentDictionary as M } from "../../../i18n/I18n.js
|
|
|
12
12
|
import { BaseComponent as B } from "../../Base/Base.js";
|
|
13
13
|
import { useBase as O } from "../../Base/useBase.js";
|
|
14
14
|
import { Flex as j } from "../../Common/Flex/Flex.js";
|
|
15
|
-
import "react-i18next";
|
|
16
|
-
import "classnames";
|
|
17
15
|
import { companyEvents as l } from "../../../shared/constants.js";
|
|
18
|
-
function
|
|
19
|
-
return /* @__PURE__ */ e(B, { ...
|
|
16
|
+
function Z(a) {
|
|
17
|
+
return /* @__PURE__ */ e(B, { ...a, children: /* @__PURE__ */ e(q, { ...a, children: a.children }) });
|
|
20
18
|
}
|
|
21
|
-
function q({ companyId:
|
|
19
|
+
function q({ companyId: a, children: t, className: s, defaultValues: i, dictionary: d }) {
|
|
22
20
|
R("Company.FederalTaxes"), M("Company.FederalTaxes", d);
|
|
23
|
-
const { onEvent:
|
|
21
|
+
const { onEvent: n, baseSubmitHandler: f } = O(), { data: c } = h({ companyId: a }), r = c.federalTaxDetails, { mutateAsync: p, isPending: F } = D(), m = E({
|
|
24
22
|
resolver: v(A),
|
|
25
23
|
defaultValues: {
|
|
26
24
|
federalEin: r.hasEin ? void 0 : "",
|
|
@@ -29,23 +27,23 @@ function q({ companyId: o, children: t, className: s, defaultValues: i, dictiona
|
|
|
29
27
|
legalName: r.legalName ?? i?.legalName
|
|
30
28
|
}
|
|
31
29
|
}), x = async (u) => {
|
|
32
|
-
await f(u, async (
|
|
33
|
-
const T = await
|
|
30
|
+
await f(u, async (o) => {
|
|
31
|
+
const T = await p({
|
|
34
32
|
request: {
|
|
35
|
-
companyId:
|
|
33
|
+
companyId: a,
|
|
36
34
|
requestBody: {
|
|
37
|
-
ein:
|
|
38
|
-
taxPayerType:
|
|
39
|
-
filingForm:
|
|
40
|
-
legalName:
|
|
35
|
+
ein: o.federalEin,
|
|
36
|
+
taxPayerType: o.taxPayerType,
|
|
37
|
+
filingForm: o.filingForm,
|
|
38
|
+
legalName: o.legalName,
|
|
41
39
|
version: r.version
|
|
42
40
|
}
|
|
43
41
|
}
|
|
44
42
|
});
|
|
45
|
-
|
|
43
|
+
n(
|
|
46
44
|
l.COMPANY_FEDERAL_TAXES_UPDATED,
|
|
47
45
|
T.federalTaxDetails
|
|
48
|
-
),
|
|
46
|
+
), n(l.COMPANY_FEDERAL_TAXES_DONE);
|
|
49
47
|
});
|
|
50
48
|
};
|
|
51
49
|
return /* @__PURE__ */ e("section", { className: s, children: /* @__PURE__ */ e(
|
|
@@ -55,7 +53,7 @@ function q({ companyId: o, children: t, className: s, defaultValues: i, dictiona
|
|
|
55
53
|
isPending: F,
|
|
56
54
|
federalTaxDetails: r
|
|
57
55
|
},
|
|
58
|
-
children: /* @__PURE__ */ e(P, { ...
|
|
56
|
+
children: /* @__PURE__ */ e(P, { ...m, children: /* @__PURE__ */ e(S, { onSubmit: m.handleSubmit(x), children: /* @__PURE__ */ e(j, { flexDirection: "column", gap: 32, children: t || /* @__PURE__ */ y(g, { children: [
|
|
59
57
|
/* @__PURE__ */ e(b, {}),
|
|
60
58
|
/* @__PURE__ */ e(C, {}),
|
|
61
59
|
/* @__PURE__ */ e(_, {})
|
|
@@ -64,6 +62,6 @@ function q({ companyId: o, children: t, className: s, defaultValues: i, dictiona
|
|
|
64
62
|
) });
|
|
65
63
|
}
|
|
66
64
|
export {
|
|
67
|
-
|
|
65
|
+
Z as FederalTaxes
|
|
68
66
|
};
|
|
69
67
|
//# sourceMappingURL=FederalTaxes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FederalTaxes.js","sources":["../../../../src/components/Company/FederalTaxes/FederalTaxes.tsx"],"sourcesContent":["import { useFederalTaxDetailsUpdateMutation } from '@gusto/embedded-api/react-query/federalTaxDetailsUpdate'\nimport { useFederalTaxDetailsGetSuspense } from '@gusto/embedded-api/react-query/federalTaxDetailsGet'\nimport type {\n FilingForm,\n TaxPayerType,\n} from '@gusto/embedded-api/models/operations/putv1companiescompanyidfederaltaxdetails'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport {\n FederalTaxesProvider,\n type FederalTaxFormInputs,\n FederalTaxFormSchema,\n type FederalTaxesDefaultValues,\n} from './useFederalTaxes'\nimport { Form as HtmlForm } from '@/components/Common/Form'\nimport { Form } from '@/components/Company/FederalTaxes/Form'\nimport { Actions } from '@/components/Company/FederalTaxes/Actions'\nimport { Head } from '@/components/Company/FederalTaxes/Head'\nimport { useI18n } from '@/i18n'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common'\nimport { companyEvents } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n'\n\ninterface FederalTaxesProps extends CommonComponentInterface<'Company.FederalTaxes'> {\n companyId: string\n defaultValues?: FederalTaxesDefaultValues\n}\n\nexport function FederalTaxes(props: FederalTaxesProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, children, className, defaultValues, dictionary }: FederalTaxesProps) {\n useI18n('Company.FederalTaxes')\n useComponentDictionary('Company.FederalTaxes', dictionary)\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { data } = useFederalTaxDetailsGetSuspense({ companyId })\n const federalTaxDetails = data.federalTaxDetails!\n\n const { mutateAsync: updateFederalTaxDetails, isPending } = useFederalTaxDetailsUpdateMutation()\n\n const formMethods = useForm<FederalTaxFormInputs>({\n resolver: zodResolver(FederalTaxFormSchema),\n defaultValues: {\n federalEin: federalTaxDetails.hasEin ? undefined : '',\n taxPayerType: federalTaxDetails.taxPayerType\n ? (federalTaxDetails.taxPayerType as TaxPayerType)\n : defaultValues?.taxPayerType,\n filingForm: federalTaxDetails.filingForm\n ? (federalTaxDetails.filingForm as FilingForm)\n : defaultValues?.filingForm,\n legalName: federalTaxDetails.legalName ?? defaultValues?.legalName,\n },\n })\n\n const handleSubmit = async (data: FederalTaxFormInputs) => {\n await baseSubmitHandler(data, async payload => {\n const updateFederalTaxDetailsResponse = await updateFederalTaxDetails({\n request: {\n companyId: companyId,\n requestBody: {\n ein: payload.federalEin,\n taxPayerType: payload.taxPayerType as TaxPayerType | undefined,\n filingForm: payload.filingForm as FilingForm | undefined,\n legalName: payload.legalName,\n version: federalTaxDetails.version as string,\n },\n },\n })\n\n onEvent(\n companyEvents.COMPANY_FEDERAL_TAXES_UPDATED,\n updateFederalTaxDetailsResponse.federalTaxDetails,\n )\n onEvent(companyEvents.COMPANY_FEDERAL_TAXES_DONE)\n })\n }\n\n return (\n <section className={className}>\n <FederalTaxesProvider\n value={{\n isPending,\n federalTaxDetails,\n }}\n >\n <FormProvider {...formMethods}>\n <HtmlForm onSubmit={formMethods.handleSubmit(handleSubmit)}>\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </HtmlForm>\n </FormProvider>\n </FederalTaxesProvider>\n </section>\n )\n}\n"],"names":["FederalTaxes","props","jsx","BaseComponent","Root","companyId","children","className","defaultValues","dictionary","useI18n","useComponentDictionary","onEvent","baseSubmitHandler","useBase","data","useFederalTaxDetailsGetSuspense","federalTaxDetails","updateFederalTaxDetails","isPending","useFederalTaxDetailsUpdateMutation","formMethods","useForm","zodResolver","FederalTaxFormSchema","handleSubmit","payload","updateFederalTaxDetailsResponse","companyEvents","FederalTaxesProvider","FormProvider","HtmlForm","Flex","jsxs","Fragment","Head","Form","Actions"],"mappings":"
|
|
1
|
+
{"version":3,"file":"FederalTaxes.js","sources":["../../../../src/components/Company/FederalTaxes/FederalTaxes.tsx"],"sourcesContent":["import { useFederalTaxDetailsUpdateMutation } from '@gusto/embedded-api/react-query/federalTaxDetailsUpdate'\nimport { useFederalTaxDetailsGetSuspense } from '@gusto/embedded-api/react-query/federalTaxDetailsGet'\nimport type {\n FilingForm,\n TaxPayerType,\n} from '@gusto/embedded-api/models/operations/putv1companiescompanyidfederaltaxdetails'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport {\n FederalTaxesProvider,\n type FederalTaxFormInputs,\n FederalTaxFormSchema,\n type FederalTaxesDefaultValues,\n} from './useFederalTaxes'\nimport { Form as HtmlForm } from '@/components/Common/Form'\nimport { Form } from '@/components/Company/FederalTaxes/Form'\nimport { Actions } from '@/components/Company/FederalTaxes/Actions'\nimport { Head } from '@/components/Company/FederalTaxes/Head'\nimport { useI18n } from '@/i18n'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common'\nimport { companyEvents } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n'\n\ninterface FederalTaxesProps extends CommonComponentInterface<'Company.FederalTaxes'> {\n companyId: string\n defaultValues?: FederalTaxesDefaultValues\n}\n\nexport function FederalTaxes(props: FederalTaxesProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, children, className, defaultValues, dictionary }: FederalTaxesProps) {\n useI18n('Company.FederalTaxes')\n useComponentDictionary('Company.FederalTaxes', dictionary)\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { data } = useFederalTaxDetailsGetSuspense({ companyId })\n const federalTaxDetails = data.federalTaxDetails!\n\n const { mutateAsync: updateFederalTaxDetails, isPending } = useFederalTaxDetailsUpdateMutation()\n\n const formMethods = useForm<FederalTaxFormInputs>({\n resolver: zodResolver(FederalTaxFormSchema),\n defaultValues: {\n federalEin: federalTaxDetails.hasEin ? undefined : '',\n taxPayerType: federalTaxDetails.taxPayerType\n ? (federalTaxDetails.taxPayerType as TaxPayerType)\n : defaultValues?.taxPayerType,\n filingForm: federalTaxDetails.filingForm\n ? (federalTaxDetails.filingForm as FilingForm)\n : defaultValues?.filingForm,\n legalName: federalTaxDetails.legalName ?? defaultValues?.legalName,\n },\n })\n\n const handleSubmit = async (data: FederalTaxFormInputs) => {\n await baseSubmitHandler(data, async payload => {\n const updateFederalTaxDetailsResponse = await updateFederalTaxDetails({\n request: {\n companyId: companyId,\n requestBody: {\n ein: payload.federalEin,\n taxPayerType: payload.taxPayerType as TaxPayerType | undefined,\n filingForm: payload.filingForm as FilingForm | undefined,\n legalName: payload.legalName,\n version: federalTaxDetails.version as string,\n },\n },\n })\n\n onEvent(\n companyEvents.COMPANY_FEDERAL_TAXES_UPDATED,\n updateFederalTaxDetailsResponse.federalTaxDetails,\n )\n onEvent(companyEvents.COMPANY_FEDERAL_TAXES_DONE)\n })\n }\n\n return (\n <section className={className}>\n <FederalTaxesProvider\n value={{\n isPending,\n federalTaxDetails,\n }}\n >\n <FormProvider {...formMethods}>\n <HtmlForm onSubmit={formMethods.handleSubmit(handleSubmit)}>\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </HtmlForm>\n </FormProvider>\n </FederalTaxesProvider>\n </section>\n )\n}\n"],"names":["FederalTaxes","props","jsx","BaseComponent","Root","companyId","children","className","defaultValues","dictionary","useI18n","useComponentDictionary","onEvent","baseSubmitHandler","useBase","data","useFederalTaxDetailsGetSuspense","federalTaxDetails","updateFederalTaxDetails","isPending","useFederalTaxDetailsUpdateMutation","formMethods","useForm","zodResolver","FederalTaxFormSchema","handleSubmit","payload","updateFederalTaxDetailsResponse","companyEvents","FederalTaxesProvider","FormProvider","HtmlForm","Flex","jsxs","Fragment","Head","Form","Actions"],"mappings":";;;;;;;;;;;;;;;AA+BO,SAASA,EAAaC,GAAmD;AAE5E,SAAA,gBAAAC,EAACC,GAAe,EAAA,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAMA,EAAA,SAAA,CAAS,EACnC,CAAA;AAEJ;AAEA,SAASG,EAAK,EAAE,WAAAC,GAAW,UAAAC,GAAU,WAAAC,GAAW,eAAAC,GAAe,YAAAC,KAAiC;AAC9F,EAAAC,EAAQ,sBAAsB,GAC9BC,EAAuB,wBAAwBF,CAAU;AACzD,QAAM,EAAE,SAAAG,GAAS,mBAAAC,EAAkB,IAAIC,EAAQ,GAEzC,EAAE,MAAAC,EAAK,IAAIC,EAAgC,EAAE,WAAAX,GAAW,GACxDY,IAAoBF,EAAK,mBAEzB,EAAE,aAAaG,GAAyB,WAAAC,EAAA,IAAcC,EAAmC,GAEzFC,IAAcC,EAA8B;AAAA,IAChD,UAAUC,EAAYC,CAAoB;AAAA,IAC1C,eAAe;AAAA,MACb,YAAYP,EAAkB,SAAS,SAAY;AAAA,MACnD,cAAcA,EAAkB,eAC3BA,EAAkB,eACnBT,GAAe;AAAA,MACnB,YAAYS,EAAkB,aACzBA,EAAkB,aACnBT,GAAe;AAAA,MACnB,WAAWS,EAAkB,aAAaT,GAAe;AAAA,IAAA;AAAA,EAC3D,CACD,GAEKiB,IAAe,OAAOV,MAA+B;AACnD,UAAAF,EAAkBE,GAAM,OAAMW,MAAW;AACvC,YAAAC,IAAkC,MAAMT,EAAwB;AAAA,QACpE,SAAS;AAAA,UACP,WAAAb;AAAA,UACA,aAAa;AAAA,YACX,KAAKqB,EAAQ;AAAA,YACb,cAAcA,EAAQ;AAAA,YACtB,YAAYA,EAAQ;AAAA,YACpB,WAAWA,EAAQ;AAAA,YACnB,SAAST,EAAkB;AAAA,UAAA;AAAA,QAC7B;AAAA,MACF,CACD;AAED,MAAAL;AAAA,QACEgB,EAAc;AAAA,QACdD,EAAgC;AAAA,MAClC,GACAf,EAAQgB,EAAc,0BAA0B;AAAA,IAAA,CACjD;AAAA,EACH;AAGE,SAAA,gBAAA1B,EAAC,aAAQ,WAAAK,GACP,UAAA,gBAAAL;AAAA,IAAC2B;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,WAAAV;AAAA,QACA,mBAAAF;AAAA,MACF;AAAA,MAEA,4BAACa,GAAc,EAAA,GAAGT,GAChB,UAAC,gBAAAnB,EAAA6B,GAAA,EAAS,UAAUV,EAAY,aAAaI,CAAY,GACvD,UAAA,gBAAAvB,EAAC8B,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAA1B,KAIG,gBAAA2B,EAAAC,GAAA,EAAA,UAAA;AAAA,QAAA,gBAAAhC,EAACiC,GAAK,EAAA;AAAA,0BACLC,GAAK,EAAA;AAAA,0BACLC,GAAQ,CAAA,CAAA;AAAA,MAAA,GACX,EAAA,CAEJ,GACF,EACF,CAAA;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -4,12 +4,11 @@ import { useTranslation as c, Trans as t } from "react-i18next";
|
|
|
4
4
|
import { TaxPayerType as _, FilingForm as y } from "@gusto/embedded-api/models/operations/putv1companiescompanyidfederaltaxdetails";
|
|
5
5
|
import { useFederalTaxes as u } from "./useFederalTaxes.js";
|
|
6
6
|
import { Flex as b } from "../../Common/Flex/Flex.js";
|
|
7
|
-
import "classnames";
|
|
8
7
|
import { usePlaceholderEin as g, normalizeEin as x } from "../../../helpers/federalEin.js";
|
|
9
8
|
import { useComponentContext as F } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
10
9
|
import { TextInputField as l } from "../../Common/Fields/TextInputField/TextInputField.js";
|
|
11
10
|
import { SelectField as a } from "../../Common/Fields/SelectField/SelectField.js";
|
|
12
|
-
function
|
|
11
|
+
function O() {
|
|
13
12
|
const { t: e } = c("Company.FederalTaxes"), { federalTaxDetails: s } = u(), i = F(), m = g(s?.hasEin), p = n(
|
|
14
13
|
() => Object.values(_).map((o) => ({
|
|
15
14
|
value: o,
|
|
@@ -100,6 +99,6 @@ function R() {
|
|
|
100
99
|
] });
|
|
101
100
|
}
|
|
102
101
|
export {
|
|
103
|
-
|
|
102
|
+
O as Form
|
|
104
103
|
};
|
|
105
104
|
//# sourceMappingURL=Form.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.js","sources":["../../../../src/components/Company/FederalTaxes/Form.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useTranslation, Trans } from 'react-i18next'\nimport {\n TaxPayerType,\n FilingForm,\n} from '@gusto/embedded-api/models/operations/putv1companiescompanyidfederaltaxdetails'\nimport { useFederalTaxes } from './useFederalTaxes'\nimport { TextInputField, SelectField, Flex } from '@/components/Common'\nimport { usePlaceholderEin, normalizeEin } from '@/helpers/federalEin'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Form() {\n const { t } = useTranslation('Company.FederalTaxes')\n const { federalTaxDetails } = useFederalTaxes()\n const Components = useComponentContext()\n\n const placeholderEin = usePlaceholderEin(federalTaxDetails?.hasEin)\n\n const taxPayerTypeOptions = useMemo(\n () =>\n Object.values(TaxPayerType).map(value => ({\n value: value,\n label: t(`taxPayerType.${value}`),\n })),\n [t],\n )\n\n const filingFormOptions = useMemo(\n () =>\n Object.values(FilingForm).map(value => ({\n value: value,\n label: t(`filingForm.${value}`),\n })),\n [t],\n )\n\n return (\n <Flex flexDirection=\"column\" gap={28}>\n <TextInputField\n name=\"federalEin\"\n label={t('federal_ein_label')}\n description={\n <Trans\n t={t}\n i18nKey=\"federal_ein_description\"\n components={{\n applyLink: (\n <Components.Link\n href=\"https://www.irs.gov/businesses/employer-identification-number\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n ),\n }}\n />\n }\n isRequired\n transform={normalizeEin}\n placeholder={placeholderEin}\n />\n <SelectField\n name=\"taxPayerType\"\n label={t('taxpayer_type_label')}\n description={t('taxpayer_type_description')}\n options={taxPayerTypeOptions}\n isRequired\n />\n <SelectField\n name=\"filingForm\"\n label={t('federal_filing_form_label')}\n description={\n <Trans\n t={t}\n i18nKey=\"federal_filing_form_description\"\n components={{\n irsLink: (\n <Components.Link\n href=\"https://www.irs.gov/newsroom/employers-should-you-file-form-944-or-941\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n ),\n }}\n />\n }\n options={filingFormOptions}\n isRequired\n />\n <TextInputField\n name=\"legalName\"\n label={t('legal_entity_name_label')}\n description={t('legal_entity_name_description')}\n isRequired\n errorMessage={t('legal_entity_name_error')}\n />\n </Flex>\n )\n}\n"],"names":["Form","t","useTranslation","federalTaxDetails","useFederalTaxes","Components","useComponentContext","placeholderEin","usePlaceholderEin","taxPayerTypeOptions","useMemo","TaxPayerType","value","filingFormOptions","FilingForm","jsxs","Flex","jsx","TextInputField","Trans","normalizeEin","SelectField"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Form.js","sources":["../../../../src/components/Company/FederalTaxes/Form.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useTranslation, Trans } from 'react-i18next'\nimport {\n TaxPayerType,\n FilingForm,\n} from '@gusto/embedded-api/models/operations/putv1companiescompanyidfederaltaxdetails'\nimport { useFederalTaxes } from './useFederalTaxes'\nimport { TextInputField, SelectField, Flex } from '@/components/Common'\nimport { usePlaceholderEin, normalizeEin } from '@/helpers/federalEin'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Form() {\n const { t } = useTranslation('Company.FederalTaxes')\n const { federalTaxDetails } = useFederalTaxes()\n const Components = useComponentContext()\n\n const placeholderEin = usePlaceholderEin(federalTaxDetails?.hasEin)\n\n const taxPayerTypeOptions = useMemo(\n () =>\n Object.values(TaxPayerType).map(value => ({\n value: value,\n label: t(`taxPayerType.${value}`),\n })),\n [t],\n )\n\n const filingFormOptions = useMemo(\n () =>\n Object.values(FilingForm).map(value => ({\n value: value,\n label: t(`filingForm.${value}`),\n })),\n [t],\n )\n\n return (\n <Flex flexDirection=\"column\" gap={28}>\n <TextInputField\n name=\"federalEin\"\n label={t('federal_ein_label')}\n description={\n <Trans\n t={t}\n i18nKey=\"federal_ein_description\"\n components={{\n applyLink: (\n <Components.Link\n href=\"https://www.irs.gov/businesses/employer-identification-number\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n ),\n }}\n />\n }\n isRequired\n transform={normalizeEin}\n placeholder={placeholderEin}\n />\n <SelectField\n name=\"taxPayerType\"\n label={t('taxpayer_type_label')}\n description={t('taxpayer_type_description')}\n options={taxPayerTypeOptions}\n isRequired\n />\n <SelectField\n name=\"filingForm\"\n label={t('federal_filing_form_label')}\n description={\n <Trans\n t={t}\n i18nKey=\"federal_filing_form_description\"\n components={{\n irsLink: (\n <Components.Link\n href=\"https://www.irs.gov/newsroom/employers-should-you-file-form-944-or-941\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n ),\n }}\n />\n }\n options={filingFormOptions}\n isRequired\n />\n <TextInputField\n name=\"legalName\"\n label={t('legal_entity_name_label')}\n description={t('legal_entity_name_description')}\n isRequired\n errorMessage={t('legal_entity_name_error')}\n />\n </Flex>\n )\n}\n"],"names":["Form","t","useTranslation","federalTaxDetails","useFederalTaxes","Components","useComponentContext","placeholderEin","usePlaceholderEin","taxPayerTypeOptions","useMemo","TaxPayerType","value","filingFormOptions","FilingForm","jsxs","Flex","jsx","TextInputField","Trans","normalizeEin","SelectField"],"mappings":";;;;;;;;;;AAWO,SAASA,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,sBAAsB,GAC7C,EAAE,mBAAAC,EAAkB,IAAIC,EAAgB,GACxCC,IAAaC,EAAoB,GAEjCC,IAAiBC,EAAkBL,GAAmB,MAAM,GAE5DM,IAAsBC;AAAA,IAC1B,MACE,OAAO,OAAOC,CAAY,EAAE,IAAI,CAAUC,OAAA;AAAA,MACxC,OAAAA;AAAA,MACA,OAAOX,EAAE,gBAAgBW,CAAK,EAAE;AAAA,IAAA,EAChC;AAAA,IACJ,CAACX,CAAC;AAAA,EACJ,GAEMY,IAAoBH;AAAA,IACxB,MACE,OAAO,OAAOI,CAAU,EAAE,IAAI,CAAUF,OAAA;AAAA,MACtC,OAAAA;AAAA,MACA,OAAOX,EAAE,cAAcW,CAAK,EAAE;AAAA,IAAA,EAC9B;AAAA,IACJ,CAACX,CAAC;AAAA,EACJ;AAEA,SACG,gBAAAc,EAAAC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOjB,EAAE,mBAAmB;AAAA,QAC5B,aACE,gBAAAgB;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,GAAAlB;AAAA,YACA,SAAQ;AAAA,YACR,YAAY;AAAA,cACV,WACE,gBAAAgB;AAAA,gBAACZ,EAAW;AAAA,gBAAX;AAAA,kBACC,MAAK;AAAA,kBACL,QAAO;AAAA,kBACP,KAAI;AAAA,gBAAA;AAAA,cAAA;AAAA,YACN;AAAA,UAEJ;AAAA,QACF;AAAA,QAEF,YAAU;AAAA,QACV,WAAWe;AAAA,QACX,aAAab;AAAA,MAAA;AAAA,IACf;AAAA,IACA,gBAAAU;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOpB,EAAE,qBAAqB;AAAA,QAC9B,aAAaA,EAAE,2BAA2B;AAAA,QAC1C,SAASQ;AAAA,QACT,YAAU;AAAA,MAAA;AAAA,IACZ;AAAA,IACA,gBAAAQ;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOpB,EAAE,2BAA2B;AAAA,QACpC,aACE,gBAAAgB;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,GAAAlB;AAAA,YACA,SAAQ;AAAA,YACR,YAAY;AAAA,cACV,SACE,gBAAAgB;AAAA,gBAACZ,EAAW;AAAA,gBAAX;AAAA,kBACC,MAAK;AAAA,kBACL,QAAO;AAAA,kBACP,KAAI;AAAA,gBAAA;AAAA,cAAA;AAAA,YACN;AAAA,UAEJ;AAAA,QACF;AAAA,QAEF,SAASQ;AAAA,QACT,YAAU;AAAA,MAAA;AAAA,IACZ;AAAA,IACA,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOjB,EAAE,yBAAyB;AAAA,QAClC,aAAaA,EAAE,+BAA+B;AAAA,QAC9C,YAAU;AAAA,QACV,cAAcA,EAAE,yBAAyB;AAAA,MAAA;AAAA,IAAA;AAAA,EAC3C,GACF;AAEJ;"}
|
|
@@ -10,9 +10,9 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
|
|
|
10
10
|
import "@tanstack/react-query";
|
|
11
11
|
import "../../Base/useBase.js";
|
|
12
12
|
import "../../../shared/constants.js";
|
|
13
|
-
import "classnames";
|
|
14
13
|
import "dompurify";
|
|
15
14
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
15
|
+
import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
16
16
|
import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
|
|
17
17
|
const C = o.object({
|
|
18
18
|
federalEin: o.string().optional(),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation as i } from "react-i18next";
|
|
3
3
|
import { useIndustryApiState as s } from "./Context.js";
|
|
4
|
-
import "
|
|
4
|
+
import "../../../shared/constants.js";
|
|
5
5
|
import { ActionsLayout as m } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
6
6
|
import { useComponentContext as e } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
7
|
const y = () => {
|