@gusto/embedded-react-sdk 0.41.0 → 0.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/dist/assets/icons/house.svg.js +10 -0
- package/dist/assets/icons/house.svg.js.map +1 -0
- package/dist/components/Base/Base.js +2 -3
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Common/EmptyData/EmptyData.d.ts +3 -0
- package/dist/components/Common/EmptyData/EmptyData.js +11 -11
- package/dist/components/Common/EmptyData/EmptyData.js.map +1 -1
- package/dist/components/Common/EmptyData/EmptyData.module.scss.js +8 -6
- package/dist/components/Common/EmptyData/EmptyData.module.scss.js.map +1 -1
- package/dist/components/Common/UI/Input/InputTypes.d.ts +1 -1
- package/dist/components/Common/UI/Input/InputTypes.js.map +1 -1
- package/dist/components/Common/UI/TextInput/TextInput.js +37 -35
- package/dist/components/Common/UI/TextInput/TextInput.js.map +1 -1
- package/dist/components/Common/UI/TextInput/TextInputTypes.d.ts +1 -1
- package/dist/components/Common/UI/TextInput/TextInputTypes.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +6 -8
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -8
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -10
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +6 -7
- 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 +3 -4
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -8
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +5 -6
- 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 +3 -4
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +2 -3
- package/dist/components/Company/AssignSignatory/TitleSelect.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/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 +3 -4
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +10 -12
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +11 -13
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +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 +5 -7
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +8 -10
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.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/DocumentSigner/SignatureForm/SignatureForm.d.ts +0 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +9 -11
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +7 -9
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +7 -9
- 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 +5 -6
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +5 -7
- package/dist/components/Company/Industry/Actions.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/Industry/Edit.js +10 -12
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +6 -8
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +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 +2 -4
- package/dist/components/Company/Locations/LocationForm/LocationForm.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/Actions.js +6 -8
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +8 -10
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +6 -8
- package/dist/components/Company/Locations/LocationsList/LocationsList.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/OnboardingFlow/OnboardingFlow.js +11 -15
- package/dist/components/Company/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js +37 -35
- package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js.map +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 +5 -6
- 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 +3 -4
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleForm.js +87 -100
- package/dist/components/Company/PaySchedule/PayScheduleForm.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleForm.module.scss.js +8 -10
- package/dist/components/Company/PaySchedule/PayScheduleForm.module.scss.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleList.js +2 -3
- package/dist/components/Company/PaySchedule/PayScheduleList.js.map +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.d.ts +11 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -7
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.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/Actions.js +6 -8
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -7
- package/dist/components/Company/StateTaxes/StateTaxesList/List.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/Contractor/Address/Address.js +2 -4
- 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 +5 -6
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +2 -3
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +2 -3
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js +13 -16
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js +61 -63
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +4 -6
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +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/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +2 -3
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +2 -3
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +2 -3
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +2 -3
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.js +11 -11
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js +88 -111
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +2 -3
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +13 -14
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +2 -3
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +2 -3
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Profile/useContractorProfile.js +2 -3
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +2 -3
- package/dist/components/Contractor/Submit/Submit.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 +14 -15
- package/dist/components/Employee/Compensation/Edit.js.map +1 -1
- package/dist/components/Employee/Compensation/List.js +23 -25
- package/dist/components/Employee/Compensation/List.js.map +1 -1
- package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +2 -0
- package/dist/components/Employee/Dashboard/DashboardComponents.js +18 -6
- package/dist/components/Employee/Dashboard/DashboardComponents.js.map +1 -1
- package/dist/components/Employee/Dashboard/dashboardStateMachine.d.ts +2 -0
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js +55 -4
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +2 -3
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +2 -3
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +2 -3
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +6 -7
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +2 -3
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +6 -8
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +9 -11
- 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 +3 -4
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +7 -8
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.d.ts +0 -33
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +130 -215
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +79 -58
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/fields.d.ts +2 -3
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/fields.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/index.d.ts +2 -2
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/signEmployeeFormSchema.d.ts +0 -1
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/signEmployeeFormSchema.js +33 -49
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.d.ts +12 -3
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -1
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +2 -3
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
- package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.js.map +1 -0
- package/dist/components/Employee/{employee-list → EmployeeList}/management/ManagementEmployeeListView.js +2 -3
- package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js.map +1 -0
- package/dist/components/Employee/EmployeeList/onboarding/EmployeeList.js.map +1 -0
- package/dist/components/Employee/{employee-list → EmployeeList}/onboarding/EmployeeListView.js +34 -35
- package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.js.map +1 -0
- package/dist/components/Employee/EmployeeList/shared/useEmployeeList.js.map +1 -0
- package/dist/components/Employee/FederalTaxes/Actions.js +6 -8
- package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.js +4 -6
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +3 -4
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddress.d.ts +6 -0
- package/dist/components/Employee/HomeAddress/management/HomeAddress.js +48 -0
- package/dist/components/Employee/HomeAddress/management/HomeAddress.js.map +1 -0
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.d.ts +18 -0
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.js +476 -0
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -0
- package/dist/components/Employee/HomeAddress/management/getPendingFutureHomeAddress.d.ts +8 -0
- package/dist/components/Employee/HomeAddress/management/getPendingFutureHomeAddress.js +36 -0
- package/dist/components/Employee/HomeAddress/management/getPendingFutureHomeAddress.js.map +1 -0
- package/dist/components/Employee/HomeAddress/management/getPendingFutureHomeAddress.test.d.ts +1 -0
- package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.d.ts +45 -0
- package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js +112 -0
- package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js.map +1 -0
- package/dist/components/Employee/Landing/Landing.js +6 -7
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Actions.js +7 -9
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +4 -5
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +6 -7
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +6 -7
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +25 -25
- package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -7
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/AdminProfile.js +42 -42
- package/dist/components/Employee/Profile/AdminProfile.js.map +1 -1
- package/dist/components/Employee/Profile/EmployeeProfile.js +40 -36
- package/dist/components/Employee/Profile/EmployeeProfile.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js +37 -36
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/index.d.ts +2 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useCurrentHomeAddressForm.d.ts +3 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useCurrentHomeAddressForm.js +24 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useCurrentHomeAddressForm.js.map +1 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.d.ts +9 -3
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js +97 -97
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/index.d.ts +2 -0
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useCurrentWorkAddressForm.d.ts +3 -0
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useCurrentWorkAddressForm.js +24 -0
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useCurrentWorkAddressForm.js.map +1 -0
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.d.ts +10 -4
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js +95 -84
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js.map +1 -1
- package/dist/components/Employee/StateTaxes/Actions.js +8 -10
- package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +3 -4
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
- package/dist/components/Employee/Taxes/Actions.js +8 -10
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +4 -6
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +3 -4
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +2 -3
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.js +11 -9
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js +8 -9
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js +71 -89
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js +2 -3
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddress.d.ts +6 -0
- package/dist/components/Employee/WorkAddress/management/WorkAddress.js +48 -0
- package/dist/components/Employee/WorkAddress/management/WorkAddress.js.map +1 -0
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.d.ts +16 -0
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.js +367 -0
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -0
- package/dist/components/Employee/WorkAddress/management/getPendingFutureWorkAddress.d.ts +4 -0
- package/dist/components/Employee/WorkAddress/management/getPendingFutureWorkAddress.js +35 -0
- package/dist/components/Employee/WorkAddress/management/getPendingFutureWorkAddress.js.map +1 -0
- package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.d.ts +45 -0
- package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js +143 -0
- package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js.map +1 -0
- package/dist/components/Employee/exports/employeeManagement.d.ts +3 -1
- package/dist/components/Employee/exports/employeeManagement.js +12 -10
- package/dist/components/Employee/exports/employeeManagement.js.map +1 -1
- package/dist/components/Employee/exports/employeeOnboarding.d.ts +1 -1
- package/dist/components/Employee/exports/employeeOnboarding.js +1 -1
- package/dist/components/Employee/index.d.ts +5 -1
- package/dist/components/Employee/index.js +37 -33
- package/dist/components/Employee/index.js.map +1 -1
- package/dist/components/Flow/Flow.js +23 -51
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/Flow/FlowHeader.d.ts +16 -0
- package/dist/components/Flow/FlowHeader.js +89 -0
- package/dist/components/Flow/FlowHeader.js.map +1 -0
- package/dist/components/Flow/useFlow.d.ts +33 -6
- package/dist/components/Flow/useFlow.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +17 -18
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +7 -8
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequests.js +2 -3
- package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +0 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalFlow.js +20 -18
- package/dist/components/Payroll/Dismissal/DismissalFlow.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js +10 -10
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js +8 -9
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/Dismissal/dismissalStateMachine.js +17 -19
- package/dist/components/Payroll/Dismissal/dismissalStateMachine.js.map +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/OffCycle/OffCycleFlow.js +13 -11
- package/dist/components/Payroll/OffCycle/OffCycleFlow.js.map +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +9 -9
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
- package/dist/components/Payroll/OffCycle/offCycleStateMachine.js +25 -29
- package/dist/components/Payroll/OffCycle/offCycleStateMachine.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +18 -19
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +10 -12
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +6 -8
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +2 -4
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +7 -8
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +2 -3
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +2 -3
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +4 -5
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js +43 -42
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js +38 -42
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlow.js +18 -17
- package/dist/components/Payroll/PayrollFlow/PayrollFlow.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +69 -78
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +2 -3
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.js +13 -12
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js +51 -82
- package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +12 -13
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +29 -30
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +2 -3
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +2 -3
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +45 -44
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +0 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +2 -3
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
- package/dist/components/Payroll/Transition/TransitionFlow.js +17 -15
- package/dist/components/Payroll/Transition/TransitionFlow.js.map +1 -1
- package/dist/components/Payroll/Transition/TransitionFlowComponents.js +24 -24
- package/dist/components/Payroll/Transition/TransitionFlowComponents.js.map +1 -1
- package/dist/components/Payroll/Transition/transitionStateMachine.js +25 -29
- package/dist/components/Payroll/Transition/transitionStateMachine.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +2 -3
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +6 -7
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js +12 -13
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js +2 -3
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +2 -3
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js +22 -24
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +2 -3
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/shared/EmployeeTable/EmployeeTableTypes.d.ts +1 -0
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +10 -12
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/helpers/breadcrumbHelpers.d.ts +35 -22
- package/dist/helpers/breadcrumbHelpers.js +45 -35
- package/dist/helpers/breadcrumbHelpers.js.map +1 -1
- package/dist/helpers/dateFormatting.d.ts +12 -0
- package/dist/helpers/dateFormatting.js +72 -65
- package/dist/helpers/dateFormatting.js.map +1 -1
- package/dist/helpers/formattedStrings.d.ts +2 -0
- package/dist/helpers/formattedStrings.js +30 -27
- package/dist/helpers/formattedStrings.js.map +1 -1
- package/dist/i18n/I18n.js +130 -35
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Employee.HomeAddress.Management.json.js +60 -0
- package/dist/i18n/en/Employee.HomeAddress.Management.json.js.map +1 -0
- package/dist/i18n/en/Employee.HomeAddress.json.js +22 -20
- package/dist/i18n/en/Employee.HomeAddress.json.js.map +1 -1
- package/dist/i18n/en/Employee.I9SignatureForm.json.js +79 -75
- package/dist/i18n/en/Employee.I9SignatureForm.json.js.map +1 -1
- package/dist/i18n/en/Employee.PaymentMethod.json.js +13 -13
- package/dist/i18n/en/Employee.WorkAddress.Management.json.js +62 -0
- package/dist/i18n/en/Employee.WorkAddress.Management.json.js.map +1 -0
- package/dist/i18n/en/Payroll.RecoveryCasesList.json.js +14 -10
- package/dist/i18n/en/Payroll.RecoveryCasesList.json.js.map +1 -1
- package/dist/i18n/en/common.json.d.ts +1 -0
- package/dist/i18n/en/common.json.js +28 -26
- package/dist/i18n/en/common.json.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +72 -68
- package/dist/index.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/CheckboxHookField.js +15 -18
- package/dist/partner-hook-utils/form/fields/CheckboxHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/DatePickerHookField.d.ts +4 -2
- package/dist/partner-hook-utils/form/fields/DatePickerHookField.js +19 -13
- package/dist/partner-hook-utils/form/fields/DatePickerHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js +21 -24
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js +15 -18
- package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/SelectHookField.d.ts +5 -2
- package/dist/partner-hook-utils/form/fields/SelectHookField.js +29 -28
- package/dist/partner-hook-utils/form/fields/SelectHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/SwitchHookField.js +16 -19
- package/dist/partner-hook-utils/form/fields/SwitchHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/TextInputHookField.js +22 -25
- package/dist/partner-hook-utils/form/fields/TextInputHookField.js.map +1 -1
- package/dist/shared/constants.d.ts +4 -0
- package/dist/shared/constants.js +14 -12
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +89 -1
- package/docs/reference/endpoint-inventory.json +72 -8
- package/package.json +7 -7
- package/dist/_virtual/dynamic-import-helper.js +0 -17
- package/dist/_virtual/dynamic-import-helper.js.map +0 -1
- package/dist/components/Common/SignatureForm/SignatureForm.d.ts +0 -14
- package/dist/components/Common/SignatureForm/SignatureForm.js +0 -28
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +0 -1
- package/dist/components/Common/SignatureForm/SignatureForm.module.scss.js +0 -10
- package/dist/components/Common/SignatureForm/SignatureForm.module.scss.js.map +0 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.d.ts +0 -8
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +0 -22
- package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +0 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.d.ts +0 -9
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +0 -39
- package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +0 -1
- package/dist/components/Common/SignatureForm/index.d.ts +0 -5
- package/dist/components/Employee/DocumentSigner/SignatureForm/Actions.d.ts +0 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/Actions.js +0 -20
- package/dist/components/Employee/DocumentSigner/SignatureForm/Actions.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/Form.d.ts +0 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/Form.js +0 -20
- package/dist/components/Employee/DocumentSigner/SignatureForm/Form.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/Head.d.ts +0 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/Head.js +0 -35
- package/dist/components/Employee/DocumentSigner/SignatureForm/Head.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/Preview.d.ts +0 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/Preview.js +0 -20
- package/dist/components/Employee/DocumentSigner/SignatureForm/Preview.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.d.ts +0 -9
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +0 -21
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +0 -1
- package/dist/components/Employee/employee-list/management/ManagementEmployeeList.js.map +0 -1
- package/dist/components/Employee/employee-list/management/ManagementEmployeeListView.js.map +0 -1
- package/dist/components/Employee/employee-list/onboarding/EmployeeList.js.map +0 -1
- package/dist/components/Employee/employee-list/onboarding/EmployeeListView.js.map +0 -1
- package/dist/components/Employee/employee-list/shared/useEmployeeList.js.map +0 -1
- /package/dist/components/Employee/{employee-list → EmployeeList}/management/ManagementEmployeeList.d.ts +0 -0
- /package/dist/components/Employee/{employee-list → EmployeeList}/management/ManagementEmployeeList.js +0 -0
- /package/dist/components/Employee/{employee-list → EmployeeList}/management/ManagementEmployeeListView.d.ts +0 -0
- /package/dist/components/Employee/{employee-list → EmployeeList}/onboarding/EmployeeList.d.ts +0 -0
- /package/dist/components/Employee/{employee-list → EmployeeList}/onboarding/EmployeeList.js +0 -0
- /package/dist/components/Employee/{employee-list → EmployeeList}/onboarding/EmployeeListView.d.ts +0 -0
- /package/dist/components/Employee/{employee-list → EmployeeList}/shared/index.d.ts +0 -0
- /package/dist/components/Employee/{employee-list → EmployeeList}/shared/useEmployeeList.d.ts +0 -0
- /package/dist/components/Employee/{employee-list → EmployeeList}/shared/useEmployeeList.js +0 -0
|
@@ -10,12 +10,11 @@ import "@gusto/embedded-api/models/errors/sdkvalidationerror";
|
|
|
10
10
|
import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
|
|
11
11
|
import "@gusto/embedded-api/models/errors/httpclienterrors";
|
|
12
12
|
import "../../../../shared/constants.js";
|
|
13
|
-
import "classnames";
|
|
14
13
|
import "../../../../contexts/ComponentAdapter/useComponentContext.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;"}
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useTranslation as
|
|
1
|
+
import { jsxs as e, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as i } from "react-i18next";
|
|
3
3
|
import { useBankAccount as a } from "./context.js";
|
|
4
|
-
import "
|
|
5
|
-
import "
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
/* @__PURE__ */ t(o.Button, { variant: "secondary", onClick: c, children: n("changeBankAccountCta") }),
|
|
12
|
-
/* @__PURE__ */ t(o.Button, { onClick: r, children: n("continueCta") })
|
|
4
|
+
import { ActionsLayout as s } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
5
|
+
import { useComponentContext as m } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
6
|
+
function d() {
|
|
7
|
+
const { handleContinue: c, handleChange: r } = a(), { t: n } = i("Company.BankAccount"), o = m();
|
|
8
|
+
return /* @__PURE__ */ e(s, { children: [
|
|
9
|
+
/* @__PURE__ */ t(o.Button, { variant: "secondary", onClick: r, children: n("changeBankAccountCta") }),
|
|
10
|
+
/* @__PURE__ */ t(o.Button, { onClick: c, children: n("continueCta") })
|
|
13
11
|
] });
|
|
14
12
|
}
|
|
15
13
|
export {
|
|
16
|
-
|
|
14
|
+
d as Actions
|
|
17
15
|
};
|
|
18
16
|
//# sourceMappingURL=Actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useBankAccount } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { handleContinue, handleChange } = useBankAccount()\n const { t } = useTranslation('Company.BankAccount')\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleChange}>\n {t('changeBankAccountCta')}\n </Components.Button>\n <Components.Button onClick={handleContinue}>{t('continueCta')}</Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","handleContinue","handleChange","useBankAccount","t","useTranslation","Components","useComponentContext","ActionsLayout","jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useBankAccount } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { handleContinue, handleChange } = useBankAccount()\n const { t } = useTranslation('Company.BankAccount')\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleChange}>\n {t('changeBankAccountCta')}\n </Components.Button>\n <Components.Button onClick={handleContinue}>{t('continueCta')}</Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","handleContinue","handleChange","useBankAccount","t","useTranslation","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,gBAAAC,GAAgB,cAAAC,EAAA,IAAiBC,EAAA,GACnC,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASJ,GAC7C,UAAAE,EAAE,sBAAsB,EAAA,CAC3B;AAAA,IACA,gBAAAK,EAACH,EAAW,QAAX,EAAkB,SAASL,GAAiB,UAAAG,EAAE,aAAa,EAAA,CAAE;AAAA,EAAA,GAChE;AAEJ;"}
|
|
@@ -1,35 +1,33 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { useBankAccountVerify as
|
|
4
|
-
import "../../../../shared/constants.js";
|
|
5
|
-
import "classnames";
|
|
1
|
+
import { jsxs as c, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as e } from "react-i18next";
|
|
3
|
+
import { useBankAccountVerify as r } from "./context.js";
|
|
6
4
|
import { ActionsLayout as s } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
7
5
|
import { useComponentContext as m } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
|
-
function
|
|
9
|
-
const { t } =
|
|
10
|
-
return /* @__PURE__ */
|
|
6
|
+
function y() {
|
|
7
|
+
const { t: n } = e("Company.BankAccount"), { isPending: t, handleCancel: a } = r(), o = m();
|
|
8
|
+
return /* @__PURE__ */ c(s, { children: [
|
|
11
9
|
/* @__PURE__ */ i(
|
|
12
10
|
o.Button,
|
|
13
11
|
{
|
|
14
12
|
variant: "secondary",
|
|
15
|
-
isLoading:
|
|
13
|
+
isLoading: t,
|
|
16
14
|
onClick: a,
|
|
17
15
|
"data-testid": "bank-account-verify-cancel",
|
|
18
|
-
children:
|
|
16
|
+
children: n("cancelCta")
|
|
19
17
|
}
|
|
20
18
|
),
|
|
21
19
|
/* @__PURE__ */ i(
|
|
22
20
|
o.Button,
|
|
23
21
|
{
|
|
24
22
|
type: "submit",
|
|
25
|
-
isLoading:
|
|
23
|
+
isLoading: t,
|
|
26
24
|
"data-testid": "bank-account-verify-submit",
|
|
27
|
-
children:
|
|
25
|
+
children: n("verifyCta")
|
|
28
26
|
}
|
|
29
27
|
)
|
|
30
28
|
] });
|
|
31
29
|
}
|
|
32
30
|
export {
|
|
33
|
-
|
|
31
|
+
y as Actions
|
|
34
32
|
};
|
|
35
33
|
//# sourceMappingURL=Actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountVerify/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useBankAccountVerify } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.BankAccount')\n const { isPending, handleCancel } = useBankAccountVerify()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n isLoading={isPending}\n onClick={handleCancel}\n data-testid=\"bank-account-verify-cancel\"\n >\n {t('cancelCta')}\n </Components.Button>\n <Components.Button\n type=\"submit\"\n isLoading={isPending}\n data-testid=\"bank-account-verify-submit\"\n >\n {t('verifyCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","isPending","handleCancel","useBankAccountVerify","Components","useComponentContext","ActionsLayout","jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountVerify/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useBankAccountVerify } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.BankAccount')\n const { isPending, handleCancel } = useBankAccountVerify()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n isLoading={isPending}\n onClick={handleCancel}\n data-testid=\"bank-account-verify-cancel\"\n >\n {t('cancelCta')}\n </Components.Button>\n <Components.Button\n type=\"submit\"\n isLoading={isPending}\n data-testid=\"bank-account-verify-submit\"\n >\n {t('verifyCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","isPending","handleCancel","useBankAccountVerify","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5C,EAAE,WAAAC,GAAW,cAAAC,EAAA,IAAiBC,EAAA,GAC9BC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACH,EAAW;AAAA,MAAX;AAAA,QACC,SAAQ;AAAA,QACR,WAAWH;AAAA,QACX,SAASC;AAAA,QACT,eAAY;AAAA,QAEX,YAAE,WAAW;AAAA,MAAA;AAAA,IAAA;AAAA,IAEhB,gBAAAK;AAAA,MAACH,EAAW;AAAA,MAAX;AAAA,QACC,MAAK;AAAA,QACL,WAAWH;AAAA,QACX,eAAY;AAAA,QAEX,YAAE,WAAW;AAAA,MAAA;AAAA,IAAA;AAAA,EAChB,GACF;AAEJ;"}
|
|
@@ -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":";;;;;AAIO,MAAMA,IAA0BC,EAAE,OAAO;AAAA,EAC9C,UAAUA,EAAE,SAAS,IAAI,CAAC;AAAA,EAC1B,UAAUA,EAAE,OAAA,EAAS,IAAI,CAAC;AAC5B,CAAC;AAIM,SAASC,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB;AAElD,SACE,gBAAAC,EAACC,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,IAAA;AAAA,IAExC,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,15 +1,13 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { useDocumentList as
|
|
4
|
-
import "../../../../shared/constants.js";
|
|
5
|
-
import "classnames";
|
|
2
|
+
import { useTranslation as e } from "react-i18next";
|
|
3
|
+
import { useDocumentList as m } from "./useDocumentList.js";
|
|
6
4
|
import { ActionsLayout as s } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
7
5
|
import { useComponentContext as c } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
|
-
function
|
|
9
|
-
const { t: n } =
|
|
6
|
+
function l({ continueCtaLabel: t }) {
|
|
7
|
+
const { t: n } = e("Company.DocumentList"), { handleContinue: i } = m(), r = c();
|
|
10
8
|
return /* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(r.Button, { onClick: i, children: t || n("continueCta") }) });
|
|
11
9
|
}
|
|
12
10
|
export {
|
|
13
|
-
|
|
11
|
+
l as Actions
|
|
14
12
|
};
|
|
15
13
|
//# sourceMappingURL=Actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/DocumentSigner/DocumentList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface ActionsProps {\n continueCtaLabel?: string\n}\n\nexport function Actions({ continueCtaLabel }: ActionsProps) {\n const { t } = useTranslation('Company.DocumentList')\n const { handleContinue } = useDocumentList()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button onClick={handleContinue}>\n {continueCtaLabel || t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","continueCtaLabel","t","useTranslation","handleContinue","useDocumentList","Components","useComponentContext","jsx","ActionsLayout"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/DocumentSigner/DocumentList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface ActionsProps {\n continueCtaLabel?: string\n}\n\nexport function Actions({ continueCtaLabel }: ActionsProps) {\n const { t } = useTranslation('Company.DocumentList')\n const { handleContinue } = useDocumentList()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button onClick={handleContinue}>\n {continueCtaLabel || t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","continueCtaLabel","t","useTranslation","handleContinue","useDocumentList","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;AASO,SAASA,EAAQ,EAAE,kBAAAC,KAAkC;AAC1D,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,sBAAsB,GAC7C,EAAE,gBAAAC,EAAA,IAAmBC,EAAA,GACrBC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACF,EAAW,QAAX,EAAkB,SAASF,GACzB,UAAAH,KAAoBC,EAAE,aAAa,EAAA,CACtC,GACF;AAEJ;"}
|
|
@@ -10,10 +10,8 @@ import { useComponentDictionary as D, useI18n as M } from "../../../../i18n/I18n
|
|
|
10
10
|
import { BaseComponent as R } from "../../../Base/Base.js";
|
|
11
11
|
import { useBase as A } from "../../../Base/useBase.js";
|
|
12
12
|
import { Flex as E } from "../../../Common/Flex/Flex.js";
|
|
13
|
-
import "
|
|
14
|
-
|
|
15
|
-
import { companyEvents as e } from "../../../../shared/constants.js";
|
|
16
|
-
function K(n) {
|
|
13
|
+
import { companyEvents as r } from "../../../../shared/constants.js";
|
|
14
|
+
function z(n) {
|
|
17
15
|
return /* @__PURE__ */ o(R, { ...n, children: /* @__PURE__ */ o(N, { ...n, children: n.children }) });
|
|
18
16
|
}
|
|
19
17
|
function N({ companyId: n, signatoryId: i, className: m, children: s, dictionary: a }) {
|
|
@@ -27,7 +25,7 @@ function N({ companyId: n, signatoryId: i, className: m, children: s, dictionary
|
|
|
27
25
|
data: { signatories: l }
|
|
28
26
|
} = C({
|
|
29
27
|
companyUuid: n
|
|
30
|
-
}),
|
|
28
|
+
}), e = l[0], f = !!i && e?.uuid === i;
|
|
31
29
|
return /* @__PURE__ */ o("section", { className: m, children: /* @__PURE__ */ o(
|
|
32
30
|
_,
|
|
33
31
|
{
|
|
@@ -35,16 +33,16 @@ function N({ companyId: n, signatoryId: i, className: m, children: s, dictionary
|
|
|
35
33
|
companyForms: p,
|
|
36
34
|
documentListError: u,
|
|
37
35
|
handleRequestFormToSign: (d) => {
|
|
38
|
-
t(
|
|
36
|
+
t(r.COMPANY_VIEW_FORM_TO_SIGN, d);
|
|
39
37
|
},
|
|
40
38
|
handleChangeSignatory: () => {
|
|
41
|
-
t(
|
|
39
|
+
t(r.COMPANY_FORM_EDIT_SIGNATORY, e);
|
|
42
40
|
},
|
|
43
41
|
handleContinue: () => {
|
|
44
|
-
t(
|
|
42
|
+
t(r.COMPANY_FORMS_DONE);
|
|
45
43
|
},
|
|
46
44
|
isSelfSignatory: f,
|
|
47
|
-
signatory:
|
|
45
|
+
signatory: e
|
|
48
46
|
},
|
|
49
47
|
children: /* @__PURE__ */ o(E, { flexDirection: "column", gap: 32, children: s || /* @__PURE__ */ g(h, { children: [
|
|
50
48
|
/* @__PURE__ */ o(y, {}),
|
|
@@ -56,6 +54,6 @@ function N({ companyId: n, signatoryId: i, className: m, children: s, dictionary
|
|
|
56
54
|
) });
|
|
57
55
|
}
|
|
58
56
|
export {
|
|
59
|
-
|
|
57
|
+
z as DocumentList
|
|
60
58
|
};
|
|
61
59
|
//# sourceMappingURL=DocumentList.js.map
|
|
@@ -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, useComponentDictionary } 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, dictionary }: DocumentListProps) {\n useComponentDictionary('Company.DocumentList', dictionary)\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: { signatories: 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"],"names":["DocumentList","props","jsx","BaseComponent","Root","companyId","signatoryId","className","children","dictionary","useComponentDictionary","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, useComponentDictionary } 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, dictionary }: DocumentListProps) {\n useComponentDictionary('Company.DocumentList', dictionary)\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: { signatories: 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"],"names":["DocumentList","props","jsx","BaseComponent","Root","companyId","signatoryId","className","children","dictionary","useComponentDictionary","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;AACrD,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,SAASG,EAAK,EAAE,WAAAC,GAAW,aAAAC,GAAa,WAAAC,GAAW,UAAAC,GAAU,YAAAC,KAAiC;AAC5F,EAAAC,EAAuB,wBAAwBD,CAAU,GACzDE,EAAQ,sBAAsB;AAC9B,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GAEd;AAAA,IACJ,MAAM,EAAE,UAAAC,EAAA;AAAA,IACR,OAAOC;AAAA,EAAA,IACLC,EAA8B;AAAA,IAChC,WAAAX;AAAA,EAAA,CACD,GACKY,IAAeH,GAEf;AAAA,IACJ,MAAM,EAAE,aAAaI,EAAA;AAAA,EAAc,IACjCC,EAA2B;AAAA,IAC7B,aAAad;AAAA,EAAA,CACd,GAKKe,IAJcF,EAIU,CAAC,GACzBG,IAAkB,CAAC,CAACf,KAAec,GAAW,SAASd;AAc7D,SACE,gBAAAJ,EAAC,aAAQ,WAAAK,GACP,UAAA,gBAAAL;AAAA,IAACoB;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,cAAAL;AAAA,QACA,mBAAAF;AAAA,QACA,yBAlBwB,CAACQ,MAAqB;AACpD,UAAAX,EAAQY,EAAc,2BAA2BD,CAAI;AAAA,QACvD;AAAA,QAiBQ,uBAfsB,MAAM;AAClC,UAAAX,EAAQY,EAAc,6BAA6BJ,CAAS;AAAA,QAC9D;AAAA,QAcQ,gBAZe,MAAM;AAC3B,UAAAR,EAAQY,EAAc,kBAAkB;AAAA,QAC1C;AAAA,QAWQ,iBAAAH;AAAA,QACA,WAAAD;AAAA,MAAA;AAAA,MAGF,UAAA,gBAAAlB,EAACuB,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAAjB,KAGC,gBAAAkB,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAzB,EAAC0B,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAkB;AAAA,0BAClBC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX,EAAA,CAEJ;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -10,14 +10,13 @@ import "@gusto/embedded-api/models/errors/sdkvalidationerror";
|
|
|
10
10
|
import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
|
|
11
11
|
import "@gusto/embedded-api/models/errors/httpclienterrors";
|
|
12
12
|
import "../../../../shared/constants.js";
|
|
13
|
-
import "classnames";
|
|
14
13
|
import "../../../../contexts/ComponentAdapter/useComponentContext.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;"}
|
|
@@ -4,5 +4,4 @@ interface SignatureFormProps extends BaseComponentInterface<'Company.SignatureFo
|
|
|
4
4
|
companyId: string;
|
|
5
5
|
}
|
|
6
6
|
export declare function SignatureForm(props: SignatureFormProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export declare function Root({ formId, children, dictionary }: SignatureFormProps): import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export {};
|
|
@@ -5,19 +5,18 @@ import { useComponentDictionary as L, useI18n as R } from "../../../../i18n/I18n
|
|
|
5
5
|
import { BaseComponent as v, BaseLayout as d } from "../../../Base/Base.js";
|
|
6
6
|
import { useBase as w } from "../../../Base/useBase.js";
|
|
7
7
|
import { Flex as E } from "../../../Common/Flex/Flex.js";
|
|
8
|
-
import "classnames";
|
|
9
8
|
import { ActionsLayout as _ } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { SDKFormProvider as M } from "../../../../partner-hook-utils/form/SDKFormProvider.js";
|
|
9
|
+
import { Form as k } from "../../../Common/Form/Form.js";
|
|
10
|
+
import { SDKFormProvider as I } from "../../../../partner-hook-utils/form/SDKFormProvider.js";
|
|
13
11
|
import { companyEvents as l } from "../../../../shared/constants.js";
|
|
14
|
-
import { useComponentContext as
|
|
15
|
-
|
|
12
|
+
import { useComponentContext as M } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
13
|
+
import { DocumentViewer as x } from "../../../Common/DocumentViewer/DocumentViewer.js";
|
|
14
|
+
function $(t) {
|
|
16
15
|
return /* @__PURE__ */ o(v, { ...t, children: /* @__PURE__ */ o(B, { ...t, children: t.children }) });
|
|
17
16
|
}
|
|
18
17
|
function B({ formId: t, children: u, dictionary: p }) {
|
|
19
18
|
L("Company.SignatureForm", p), R("Company.SignatureForm");
|
|
20
|
-
const { t: r } = S("Company.SignatureForm"), { onEvent: a } = w(), e =
|
|
19
|
+
const { t: r } = S("Company.SignatureForm"), { onEvent: a } = w(), e = M(), n = D({ formId: t });
|
|
21
20
|
if (n.isLoading)
|
|
22
21
|
return /* @__PURE__ */ o(d, { isLoading: !0, error: n.errorHandling.errors });
|
|
23
22
|
const { companyForm: i, pdfUrl: m } = n.data, { isPending: f } = n.status, { Signature: g, ConfirmSignature: h } = n.form.Fields, C = async () => {
|
|
@@ -26,7 +25,7 @@ function B({ formId: t, children: u, dictionary: p }) {
|
|
|
26
25
|
}, F = () => {
|
|
27
26
|
a(l.COMPANY_SIGN_FORM_BACK);
|
|
28
27
|
};
|
|
29
|
-
return /* @__PURE__ */ o(d, { error: n.errorHandling.errors, children: /* @__PURE__ */ o(
|
|
28
|
+
return /* @__PURE__ */ o(d, { error: n.errorHandling.errors, children: /* @__PURE__ */ o(I, { formHookResult: n, children: /* @__PURE__ */ o(k, { onSubmit: C, children: /* @__PURE__ */ o(E, { flexDirection: "column", gap: 32, children: u ?? /* @__PURE__ */ s(y, { children: [
|
|
30
29
|
/* @__PURE__ */ s("section", { children: [
|
|
31
30
|
/* @__PURE__ */ o(e.Heading, { as: "h2", children: r("signatureFormTitle", { formTitle: i.title }) }),
|
|
32
31
|
m && /* @__PURE__ */ o(e.Text, { children: /* @__PURE__ */ o(
|
|
@@ -50,7 +49,7 @@ function B({ formId: t, children: u, dictionary: p }) {
|
|
|
50
49
|
) })
|
|
51
50
|
] }),
|
|
52
51
|
/* @__PURE__ */ o(
|
|
53
|
-
|
|
52
|
+
x,
|
|
54
53
|
{
|
|
55
54
|
url: m,
|
|
56
55
|
title: i.title,
|
|
@@ -80,7 +79,6 @@ function B({ formId: t, children: u, dictionary: p }) {
|
|
|
80
79
|
] }) }) }) }) });
|
|
81
80
|
}
|
|
82
81
|
export {
|
|
83
|
-
|
|
84
|
-
q as SignatureForm
|
|
82
|
+
$ as SignatureForm
|
|
85
83
|
};
|
|
86
84
|
//# sourceMappingURL=SignatureForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignatureForm.js","sources":["../../../../../src/components/Company/DocumentSigner/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { useSignCompanyForm } from '../shared/useSignCompanyForm'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent, BaseLayout } from '@/components/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { ActionsLayout, Flex } from '@/components/Common'\nimport { Form as FormLayout } from '@/components/Common/Form'\nimport { DocumentViewer } from '@/components/Common/DocumentViewer'\nimport { SDKFormProvider } from '@/partner-hook-utils/form/SDKFormProvider'\nimport { companyEvents } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\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\
|
|
1
|
+
{"version":3,"file":"SignatureForm.js","sources":["../../../../../src/components/Company/DocumentSigner/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { useSignCompanyForm } from '../shared/useSignCompanyForm'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent, BaseLayout } from '@/components/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { ActionsLayout, Flex } from '@/components/Common'\nimport { Form as FormLayout } from '@/components/Common/Form'\nimport { DocumentViewer } from '@/components/Common/DocumentViewer'\nimport { SDKFormProvider } from '@/partner-hook-utils/form/SDKFormProvider'\nimport { companyEvents } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\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\nfunction Root({ formId, children, dictionary }: SignatureFormProps) {\n useComponentDictionary('Company.SignatureForm', dictionary)\n useI18n('Company.SignatureForm')\n const { t } = useTranslation('Company.SignatureForm')\n const { onEvent } = useBase()\n const Components = useComponentContext()\n\n const hookResult = useSignCompanyForm({ formId })\n\n if (hookResult.isLoading) {\n return <BaseLayout isLoading error={hookResult.errorHandling.errors} />\n }\n\n const { companyForm: form, pdfUrl } = hookResult.data\n const { isPending } = hookResult.status\n const { Signature, ConfirmSignature } = hookResult.form.Fields\n\n const handleFormSubmit = async () => {\n const result = await hookResult.actions.onSubmit()\n if (result) {\n onEvent(companyEvents.COMPANY_SIGN_FORM, result.data)\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 <BaseLayout error={hookResult.errorHandling.errors}>\n <SDKFormProvider formHookResult={hookResult}>\n <FormLayout onSubmit={handleFormSubmit}>\n <Flex flexDirection=\"column\" gap={32}>\n {children ?? (\n <>\n <section>\n <Components.Heading as=\"h2\">\n {t('signatureFormTitle', { formTitle: form.title })}\n </Components.Heading>\n {pdfUrl && (\n <Components.Text>\n <Trans\n t={t}\n i18nKey=\"downloadPrompt\"\n values={{ description: form.description }}\n components={{\n downloadLink: (\n <Components.Link\n href={pdfUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n download={`${form.title || 'form'}.pdf`}\n />\n ),\n }}\n />\n </Components.Text>\n )}\n </section>\n <DocumentViewer\n url={pdfUrl}\n title={form.title}\n downloadInstructions={t('downloadInstructions')}\n viewDocumentLabel={t('viewDocumentCta')}\n />\n <Signature\n label={t('signatureLabel')}\n description={t('signatureDescription')}\n validationMessages={{ REQUIRED: t('signatureError') }}\n />\n <ConfirmSignature\n label={t('confirmationLabel')}\n validationMessages={{ REQUIRED: t('confirmationError') }}\n />\n <ActionsLayout>\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleBack}>\n {t('backCta')}\n </Components.Button>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('submitCta')}\n </Components.Button>\n </ActionsLayout>\n </>\n )}\n </Flex>\n </FormLayout>\n </SDKFormProvider>\n </BaseLayout>\n )\n}\n"],"names":["SignatureForm","props","jsx","BaseComponent","Root","formId","children","dictionary","useComponentDictionary","useI18n","t","useTranslation","onEvent","useBase","Components","useComponentContext","hookResult","useSignCompanyForm","BaseLayout","form","pdfUrl","isPending","Signature","ConfirmSignature","handleFormSubmit","result","companyEvents","handleBack","SDKFormProvider","FormLayout","Flex","jsxs","Fragment","Trans","DocumentViewer","ActionsLayout"],"mappings":";;;;;;;;;;;;;AAkBO,SAASA,EAAcC,GAA2B;AACvD,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,SAASG,EAAK,EAAE,QAAAC,GAAQ,UAAAC,GAAU,YAAAC,KAAkC;AAClE,EAAAC,EAAuB,yBAAyBD,CAAU,GAC1DE,EAAQ,uBAAuB;AAC/B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,uBAAuB,GAC9C,EAAE,SAAAC,EAAA,IAAYC,EAAA,GACdC,IAAaC,EAAA,GAEbC,IAAaC,EAAmB,EAAE,QAAAZ,GAAQ;AAEhD,MAAIW,EAAW;AACb,6BAAQE,GAAA,EAAW,WAAS,IAAC,OAAOF,EAAW,cAAc,QAAQ;AAGvE,QAAM,EAAE,aAAaG,GAAM,QAAAC,EAAA,IAAWJ,EAAW,MAC3C,EAAE,WAAAK,MAAcL,EAAW,QAC3B,EAAE,WAAAM,GAAW,kBAAAC,EAAA,IAAqBP,EAAW,KAAK,QAElDQ,IAAmB,YAAY;AACnC,UAAMC,IAAS,MAAMT,EAAW,QAAQ,SAAA;AACxC,IAAIS,MACFb,EAAQc,EAAc,mBAAmBD,EAAO,IAAI,GACpDb,EAAQc,EAAc,sBAAsB;AAAA,EAEhD,GAEMC,IAAa,MAAM;AACvB,IAAAf,EAAQc,EAAc,sBAAsB;AAAA,EAC9C;AAEA,SACE,gBAAAxB,EAACgB,KAAW,OAAOF,EAAW,cAAc,QAC1C,UAAA,gBAAAd,EAAC0B,KAAgB,gBAAgBZ,GAC/B,4BAACa,GAAA,EAAW,UAAUL,GACpB,UAAA,gBAAAtB,EAAC4B,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UAAAxB,KACC,gBAAAyB,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAD,EAAC,WAAA,EACC,UAAA;AAAA,MAAA,gBAAA7B,EAACY,EAAW,SAAX,EAAmB,IAAG,MACpB,UAAAJ,EAAE,sBAAsB,EAAE,WAAWS,EAAK,MAAA,CAAO,EAAA,CACpD;AAAA,MACCC,KACC,gBAAAlB,EAACY,EAAW,MAAX,EACC,UAAA,gBAAAZ;AAAA,QAAC+B;AAAA,QAAA;AAAA,UACC,GAAAvB;AAAA,UACA,SAAQ;AAAA,UACR,QAAQ,EAAE,aAAaS,EAAK,YAAA;AAAA,UAC5B,YAAY;AAAA,YACV,cACE,gBAAAjB;AAAA,cAACY,EAAW;AAAA,cAAX;AAAA,gBACC,MAAMM;AAAA,gBACN,QAAO;AAAA,gBACP,KAAI;AAAA,gBACJ,UAAU,GAAGD,EAAK,SAAS,MAAM;AAAA,cAAA;AAAA,YAAA;AAAA,UACnC;AAAA,QAEJ;AAAA,MAAA,EACF,CACF;AAAA,IAAA,GAEJ;AAAA,IACA,gBAAAjB;AAAA,MAACgC;AAAA,MAAA;AAAA,QACC,KAAKd;AAAA,QACL,OAAOD,EAAK;AAAA,QACZ,sBAAsBT,EAAE,sBAAsB;AAAA,QAC9C,mBAAmBA,EAAE,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,IAExC,gBAAAR;AAAA,MAACoB;AAAA,MAAA;AAAA,QACC,OAAOZ,EAAE,gBAAgB;AAAA,QACzB,aAAaA,EAAE,sBAAsB;AAAA,QACrC,oBAAoB,EAAE,UAAUA,EAAE,gBAAgB,EAAA;AAAA,MAAE;AAAA,IAAA;AAAA,IAEtD,gBAAAR;AAAA,MAACqB;AAAA,MAAA;AAAA,QACC,OAAOb,EAAE,mBAAmB;AAAA,QAC5B,oBAAoB,EAAE,UAAUA,EAAE,mBAAmB,EAAA;AAAA,MAAE;AAAA,IAAA;AAAA,sBAExDyB,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAjC,EAACY,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAASa,GAC3D,UAAAjB,EAAE,SAAS,EAAA,CACd;AAAA,MACA,gBAAAR,EAACY,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWO,GACzC,UAAAX,EAAE,WAAW,EAAA,CAChB;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,EAAA,CACF,EAAA,CAEJ,GACF,EAAA,CACF,EAAA,CACF;AAEJ;"}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { useFederalTaxes as
|
|
4
|
-
import "
|
|
5
|
-
import "classnames";
|
|
6
|
-
import { ActionsLayout as s } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
2
|
+
import { useTranslation as r } from "react-i18next";
|
|
3
|
+
import { useFederalTaxes as s } from "./useFederalTaxes.js";
|
|
4
|
+
import { ActionsLayout as i } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
7
5
|
import { useComponentContext as m } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
|
-
const
|
|
9
|
-
const { t } =
|
|
10
|
-
return /* @__PURE__ */ o(
|
|
6
|
+
const f = () => {
|
|
7
|
+
const { t } = r("Company.FederalTaxes"), { isPending: n } = s(), e = m();
|
|
8
|
+
return /* @__PURE__ */ o(i, { children: /* @__PURE__ */ o(e.Button, { type: "submit", isLoading: n, children: t("continueCta") }) });
|
|
11
9
|
};
|
|
12
10
|
export {
|
|
13
|
-
|
|
11
|
+
f as Actions
|
|
14
12
|
};
|
|
15
13
|
//# sourceMappingURL=Actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.js","sources":["../../../../src/components/Company/FederalTaxes/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useFederalTaxes } from './useFederalTaxes'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.FederalTaxes')\n const { isPending } = useFederalTaxes()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","isPending","useFederalTaxes","Components","useComponentContext","jsx","ActionsLayout"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Actions.js","sources":["../../../../src/components/Company/FederalTaxes/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useFederalTaxes } from './useFederalTaxes'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.FederalTaxes')\n const { isPending } = useFederalTaxes()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","isPending","useFederalTaxes","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,EAAA,IAAMC,EAAe,sBAAsB,GAC7C,EAAE,WAAAC,EAAA,IAAcC,EAAA,GAChBC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAA,EAAE,aAAa,GAClB,GACF;AAEJ;"}
|
|
@@ -12,15 +12,13 @@ import { useI18n as R, useComponentDictionary as M } from "../../../i18n/I18n.js
|
|
|
12
12
|
import { BaseComponent as O } from "../../Base/Base.js";
|
|
13
13
|
import { useBase as U } 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
|
|
16
|
+
function Z(a) {
|
|
19
17
|
return /* @__PURE__ */ e(O, { ...a, children: /* @__PURE__ */ e(w, { ...a, children: a.children }) });
|
|
20
18
|
}
|
|
21
19
|
function w({ 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 } = U(), { data: c } = h({ companyId: a }), r = c.federalTaxDetails, { mutateAsync: p, isPending: F } = g(), m = E({
|
|
24
22
|
resolver: v(A),
|
|
25
23
|
defaultValues: {
|
|
26
24
|
federalEin: r.hasEin ? void 0 : "",
|
|
@@ -30,7 +28,7 @@ function w({ companyId: a, children: t, className: s, defaultValues: i, dictiona
|
|
|
30
28
|
}
|
|
31
29
|
}), x = async (T) => {
|
|
32
30
|
await f(T, async (o) => {
|
|
33
|
-
const u = await
|
|
31
|
+
const u = await p({
|
|
34
32
|
request: {
|
|
35
33
|
companyId: a,
|
|
36
34
|
federalTaxDetailsUpdate: {
|
|
@@ -42,10 +40,10 @@ function w({ companyId: a, children: t, className: s, defaultValues: i, dictiona
|
|
|
42
40
|
}
|
|
43
41
|
}
|
|
44
42
|
});
|
|
45
|
-
|
|
43
|
+
n(
|
|
46
44
|
l.COMPANY_FEDERAL_TAXES_UPDATED,
|
|
47
45
|
u.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 w({ companyId: a, 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(D, { children: [
|
|
59
57
|
/* @__PURE__ */ e(b, {}),
|
|
60
58
|
/* @__PURE__ */ e(C, {}),
|
|
61
59
|
/* @__PURE__ */ e(_, {})
|
|
@@ -64,6 +62,6 @@ function w({ companyId: a, 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/components/federaltaxdetails'\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\n : defaultValues?.taxPayerType,\n filingForm: federalTaxDetails.filingForm\n ? federalTaxDetails.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 federalTaxDetailsUpdate: {\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/components/federaltaxdetails'\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\n : defaultValues?.taxPayerType,\n filingForm: federalTaxDetails.filingForm\n ? federalTaxDetails.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 federalTaxDetailsUpdate: {\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;AAC9E,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;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,EAAA,IAAsBC,EAAA,GAEjC,EAAE,MAAAC,EAAA,IAASC,EAAgC,EAAE,WAAAX,GAAW,GACxDY,IAAoBF,EAAK,mBAEzB,EAAE,aAAaG,GAAyB,WAAAC,EAAA,IAAcC,EAAA,GAEtDC,IAAcC,EAA8B;AAAA,IAChD,UAAUC,EAAYC,CAAoB;AAAA,IAC1C,eAAe;AAAA,MACb,YAAYP,EAAkB,SAAS,SAAY;AAAA,MACnD,cAAcA,EAAkB,eAC5BA,EAAkB,eAClBT,GAAe;AAAA,MACnB,YAAYS,EAAkB,aAC1BA,EAAkB,aAClBT,GAAe;AAAA,MACnB,WAAWS,EAAkB,aAAaT,GAAe;AAAA,IAAA;AAAA,EAC3D,CACD,GAEKiB,IAAe,OAAOV,MAA+B;AACzD,UAAMF,EAAkBE,GAAM,OAAMW,MAAW;AAC7C,YAAMC,IAAkC,MAAMT,EAAwB;AAAA,QACpE,SAAS;AAAA,UACP,WAAAb;AAAA,UACA,yBAAyB;AAAA,YACvB,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,MAAA,GAElCf,EAAQgB,EAAc,0BAA0B;AAAA,IAClD,CAAC;AAAA,EACH;AAEA,SACE,gBAAA1B,EAAC,aAAQ,WAAAK,GACP,UAAA,gBAAAL;AAAA,IAAC2B;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,WAAAV;AAAA,QACA,mBAAAF;AAAA,MAAA;AAAA,MAGF,4BAACa,GAAA,EAAc,GAAGT,GAChB,UAAA,gBAAAnB,EAAC6B,GAAA,EAAS,UAAUV,EAAY,aAAaI,CAAY,GACvD,UAAA,gBAAAvB,EAAC8B,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAA1B,KAGC,gBAAA2B,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAhC,EAACiC,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,GACX,EAAA,CAEJ,GACF,EAAA,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -4,12 +4,11 @@ import { useTranslation as d, Trans as t } from "react-i18next";
|
|
|
4
4
|
import { TaxPayerType as y, FilingForm as u } from "@gusto/embedded-api/models/components/federaltaxdetails";
|
|
5
5
|
import { useFederalTaxes as b } from "./useFederalTaxes.js";
|
|
6
6
|
import { Flex as g } from "../../Common/Flex/Flex.js";
|
|
7
|
-
import "classnames";
|
|
8
7
|
import { usePlaceholderEin as x, normalizeEin as F } from "../../../helpers/federalEin.js";
|
|
9
8
|
import { useComponentContext as T } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
10
9
|
import { TextInputField as a } from "../../Common/Fields/TextInputField/TextInputField.js";
|
|
11
10
|
import { SelectField as l } from "../../Common/Fields/SelectField/SelectField.js";
|
|
12
|
-
function
|
|
11
|
+
function N() {
|
|
13
12
|
const { t: e } = d("Company.FederalTaxes"), { federalTaxDetails: s } = b(), i = T(), m = x(s?.hasEin), p = n(
|
|
14
13
|
() => Object.values(y).map((o) => ({
|
|
15
14
|
value: o,
|
|
@@ -100,6 +99,6 @@ function O() {
|
|
|
100
99
|
] });
|
|
101
100
|
}
|
|
102
101
|
export {
|
|
103
|
-
|
|
102
|
+
N 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 { TaxPayerType, FilingForm } from '@gusto/embedded-api/models/components/federaltaxdetails'\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('federalEinLabel')}\n description={\n <Trans\n t={t}\n i18nKey=\"federalEinDescription\"\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('taxpayerTypeLabel')}\n description={t('taxpayerTypeDescription')}\n options={taxPayerTypeOptions}\n isRequired\n />\n <SelectField\n name=\"filingForm\"\n label={t('federalFilingFormLabel')}\n description={\n <Trans\n t={t}\n i18nKey=\"federalFilingFormDescription\"\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('legalEntityNameLabel')}\n description={t('legalEntityNameDescription')}\n isRequired\n errorMessage={t('legalEntityNameError')}\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 { TaxPayerType, FilingForm } from '@gusto/embedded-api/models/components/federaltaxdetails'\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('federalEinLabel')}\n description={\n <Trans\n t={t}\n i18nKey=\"federalEinDescription\"\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('taxpayerTypeLabel')}\n description={t('taxpayerTypeDescription')}\n options={taxPayerTypeOptions}\n isRequired\n />\n <SelectField\n name=\"filingForm\"\n label={t('federalFilingFormLabel')}\n description={\n <Trans\n t={t}\n i18nKey=\"federalFilingFormDescription\"\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('legalEntityNameLabel')}\n description={t('legalEntityNameDescription')}\n isRequired\n errorMessage={t('legalEntityNameError')}\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":";;;;;;;;;;AAQO,SAASA,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,sBAAsB,GAC7C,EAAE,mBAAAC,EAAA,IAAsBC,EAAA,GACxBC,IAAaC,EAAA,GAEbC,IAAiBC,EAAkBL,GAAmB,MAAM,GAE5DM,IAAsBC;AAAA,IAC1B,MACE,OAAO,OAAOC,CAAY,EAAE,IAAI,CAAAC,OAAU;AAAA,MACxC,OAAAA;AAAA,MACA,OAAOX,EAAE,gBAAgBW,CAAK,EAAE;AAAA,IAAA,EAChC;AAAA,IACJ,CAACX,CAAC;AAAA,EAAA,GAGEY,IAAoBH;AAAA,IACxB,MACE,OAAO,OAAOI,CAAU,EAAE,IAAI,CAAAF,OAAU;AAAA,MACtC,OAAAA;AAAA,MACA,OAAOX,EAAE,cAAcW,CAAK,EAAE;AAAA,IAAA,EAC9B;AAAA,IACJ,CAACX,CAAC;AAAA,EAAA;AAGJ,SACE,gBAAAc,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOjB,EAAE,iBAAiB;AAAA,QAC1B,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,QAAA;AAAA,QAGJ,YAAU;AAAA,QACV,WAAWe;AAAA,QACX,aAAab;AAAA,MAAA;AAAA,IAAA;AAAA,IAEf,gBAAAU;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOpB,EAAE,mBAAmB;AAAA,QAC5B,aAAaA,EAAE,yBAAyB;AAAA,QACxC,SAASQ;AAAA,QACT,YAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAEZ,gBAAAQ;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOpB,EAAE,wBAAwB;AAAA,QACjC,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,QAAA;AAAA,QAGJ,SAASQ;AAAA,QACT,YAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAEZ,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOjB,EAAE,sBAAsB;AAAA,QAC/B,aAAaA,EAAE,4BAA4B;AAAA,QAC3C,YAAU;AAAA,QACV,cAAcA,EAAE,sBAAsB;AAAA,MAAA;AAAA,IAAA;AAAA,EACxC,GACF;AAEJ;"}
|