@gusto/embedded-react-sdk 0.40.0 → 0.41.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 +51 -42
- package/dist/components/Base/Base.js +3 -2
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Common/Form/Form.d.ts +1 -1
- package/dist/components/Common/Form/Form.js +15 -5
- package/dist/components/Common/Form/Form.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.js +6 -4
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +13 -10
- package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +13 -10
- package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +8 -6
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +8 -6
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +10 -8
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +7 -6
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +3 -2
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +8 -6
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +6 -5
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +10 -9
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -3
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +3 -2
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -5
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +9 -8
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +8 -7
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -3
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +12 -10
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +13 -11
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +5 -4
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +7 -5
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +10 -8
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -3
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +80 -61
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/index.d.ts +1 -1
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.d.ts +7 -6
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js +54 -54
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +9 -7
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +9 -7
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +3 -2
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +6 -5
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +7 -5
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +7 -6
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +12 -10
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +8 -6
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +5 -4
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +4 -2
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -3
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +8 -6
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +10 -8
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +8 -6
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -3
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.d.ts +1 -1
- package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +6 -5
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +6 -5
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +4 -2
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +4 -3
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.d.ts +6 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +31 -148
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleComponents.d.ts +10 -0
- package/dist/components/Company/PaySchedule/PayScheduleComponents.js +26 -0
- package/dist/components/Company/PaySchedule/PayScheduleComponents.js.map +1 -0
- package/dist/components/Company/PaySchedule/PayScheduleForm.d.ts +8 -0
- package/dist/components/Company/PaySchedule/PayScheduleForm.js +199 -0
- package/dist/components/Company/PaySchedule/PayScheduleForm.js.map +1 -0
- package/dist/components/Company/PaySchedule/{_parts/Edit.module.scss.js → PayScheduleForm.module.scss.js} +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleForm.module.scss.js.map +1 -0
- package/dist/components/Company/PaySchedule/PayScheduleList.d.ts +8 -0
- package/dist/components/Company/PaySchedule/PayScheduleList.js +103 -0
- package/dist/components/Company/PaySchedule/PayScheduleList.js.map +1 -0
- package/dist/components/Company/PaySchedule/{_parts/List.module.scss.js → PayScheduleList.module.scss.js} +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleList.module.scss.js.map +1 -0
- package/dist/components/Company/PaySchedule/payScheduleStateMachine.d.ts +6 -0
- package/dist/components/Company/PaySchedule/payScheduleStateMachine.js +49 -0
- package/dist/components/Company/PaySchedule/payScheduleStateMachine.js.map +1 -0
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +7 -5
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +8 -6
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +7 -5
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/Address.js +4 -2
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +7 -6
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +6 -5
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +3 -2
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +3 -2
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +6 -4
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +3 -2
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +3 -2
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +3 -2
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +3 -2
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +3 -2
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +3 -2
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +3 -2
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +14 -13
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +3 -2
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +3 -2
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Profile/useContractorProfile.js +3 -2
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +3 -2
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Employee/Compensation/Actions.js +6 -5
- package/dist/components/Employee/Compensation/Actions.js.map +1 -1
- package/dist/components/Employee/Compensation/Edit.js +23 -22
- package/dist/components/Employee/Compensation/Edit.js.map +1 -1
- package/dist/components/Employee/Compensation/List.js +25 -23
- package/dist/components/Employee/Compensation/List.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +3 -2
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +3 -2
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +3 -2
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +7 -6
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +3 -2
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +8 -6
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +11 -9
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +3 -2
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -3
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +8 -7
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +11 -10
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +13 -11
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +3 -2
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/Actions.js +8 -6
- package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.js +6 -4
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +4 -3
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +7 -6
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Actions.js +9 -7
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -4
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +7 -6
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +7 -6
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +4 -3
- package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -5
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/AdminProfile.js +124 -126
- package/dist/components/Employee/Profile/AdminProfile.js.map +1 -1
- package/dist/components/Employee/Profile/EmployeeProfile.js +8 -8
- package/dist/components/Employee/StateTaxes/Actions.js +10 -8
- package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +4 -3
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
- package/dist/components/Employee/Taxes/Actions.js +10 -8
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +6 -4
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +4 -3
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +3 -2
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js +9 -8
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js +3 -2
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js.map +1 -1
- package/dist/components/Employee/employee-list/management/ManagementEmployeeListView.js +3 -2
- package/dist/components/Employee/employee-list/management/ManagementEmployeeListView.js.map +1 -1
- package/dist/components/Employee/employee-list/onboarding/EmployeeListView.js +35 -34
- package/dist/components/Employee/employee-list/onboarding/EmployeeListView.js.map +1 -1
- package/dist/components/Flow/Flow.js +12 -11
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +18 -17
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +8 -7
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequests.js +3 -2
- package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +1 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js +9 -8
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +3 -2
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +19 -18
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +12 -10
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +8 -6
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +4 -2
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +8 -7
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +3 -2
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +3 -2
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +5 -4
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +3 -2
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +13 -12
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +30 -29
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +3 -2
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +3 -2
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +3 -2
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +1 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +3 -2
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +3 -2
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +7 -6
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js +13 -12
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js +3 -2
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +3 -2
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js +24 -22
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +3 -2
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +12 -10
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/i18n/en/Company.PaySchedule.json.js +15 -13
- package/dist/i18n/en/Company.PaySchedule.json.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/partner-hook-utils/form/fields/CheckboxHookField.js +18 -15
- package/dist/partner-hook-utils/form/fields/CheckboxHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js +24 -21
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js +18 -15
- package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/SelectHookField.js +20 -17
- package/dist/partner-hook-utils/form/fields/SelectHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/SwitchHookField.js +19 -16
- package/dist/partner-hook-utils/form/fields/SwitchHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/TextInputHookField.js +25 -22
- package/dist/partner-hook-utils/form/fields/TextInputHookField.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +9 -0
- package/docs/reference/endpoint-inventory.json +16 -35
- package/package.json +6 -6
- package/dist/components/Company/DocumentSigner/SignatureForm/Actions.d.ts +0 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/Actions.js +0 -20
- package/dist/components/Company/DocumentSigner/SignatureForm/Actions.js.map +0 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/Form.d.ts +0 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/Form.js +0 -20
- package/dist/components/Company/DocumentSigner/SignatureForm/Form.js.map +0 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/Head.d.ts +0 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/Head.js +0 -35
- package/dist/components/Company/DocumentSigner/SignatureForm/Head.js.map +0 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/Preview.d.ts +0 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/Preview.js +0 -20
- package/dist/components/Company/DocumentSigner/SignatureForm/Preview.js.map +0 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.d.ts +0 -9
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +0 -22
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +0 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.d.ts +0 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +0 -62
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +0 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.d.ts +0 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +0 -134
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +0 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.module.scss.js.map +0 -1
- package/dist/components/Company/PaySchedule/_parts/Head.d.ts +0 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +0 -47
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +0 -1
- package/dist/components/Company/PaySchedule/_parts/List.d.ts +0 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +0 -57
- package/dist/components/Company/PaySchedule/_parts/List.js.map +0 -1
- package/dist/components/Company/PaySchedule/_parts/List.module.scss.js.map +0 -1
- package/dist/components/Company/PaySchedule/_parts/index.d.ts +0 -5
- package/dist/components/Company/PaySchedule/usePaySchedule.d.ts +0 -39
- package/dist/components/Company/PaySchedule/usePaySchedule.js +0 -30
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +0 -1
package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { useMemo as
|
|
2
|
-
import { useForm as
|
|
3
|
-
import { zodResolver as
|
|
4
|
-
import { useCompanyFormsGet as
|
|
5
|
-
import { useCompanyFormsGetPdf as
|
|
6
|
-
import { useCompanyFormsSignMutation as
|
|
7
|
-
import { createSignCompanyFormSchema as
|
|
8
|
-
import { ConfirmSignatureField as
|
|
9
|
-
import { useDeriveFieldsMetadata as
|
|
10
|
-
import { createGetFormSubmissionValues as
|
|
11
|
-
import { composeErrorHandler as
|
|
12
|
-
import { useBaseSubmit as
|
|
13
|
-
import { SDKInternalError as
|
|
14
|
-
const
|
|
1
|
+
import { useMemo as q } from "react";
|
|
2
|
+
import { useForm as A } from "react-hook-form";
|
|
3
|
+
import { zodResolver as H } from "@hookform/resolvers/zod";
|
|
4
|
+
import { useCompanyFormsGet as B } from "@gusto/embedded-api/react-query/companyFormsGet";
|
|
5
|
+
import { useCompanyFormsGetPdf as G } from "@gusto/embedded-api/react-query/companyFormsGetPdf";
|
|
6
|
+
import { useCompanyFormsSignMutation as U } from "@gusto/embedded-api/react-query/companyFormsSign";
|
|
7
|
+
import { createSignCompanyFormSchema as k } from "./signCompanyFormSchema.js";
|
|
8
|
+
import { ConfirmSignatureField as x, SignatureField as O } from "./fields.js";
|
|
9
|
+
import { useDeriveFieldsMetadata as Q } from "../../../../../partner-hook-utils/form/useDeriveFieldsMetadata.js";
|
|
10
|
+
import { createGetFormSubmissionValues as R } from "../../../../../partner-hook-utils/form/getFormSubmissionValues.js";
|
|
11
|
+
import { composeErrorHandler as z } from "../../../../../partner-hook-utils/composeErrorHandler.js";
|
|
12
|
+
import { useBaseSubmit as I } from "../../../../Base/useBaseSubmit.js";
|
|
13
|
+
import { SDKInternalError as y } from "../../../../../types/sdkError.js";
|
|
14
|
+
const F = {
|
|
15
15
|
signature: "",
|
|
16
16
|
confirmSignature: !1
|
|
17
17
|
};
|
|
18
|
-
function
|
|
18
|
+
function ir({
|
|
19
19
|
formId: r,
|
|
20
|
-
optionalFieldsToRequire:
|
|
21
|
-
defaultValues:
|
|
20
|
+
optionalFieldsToRequire: n,
|
|
21
|
+
defaultValues: i,
|
|
22
22
|
validationMode: b = "onSubmit",
|
|
23
23
|
shouldFocusError: C = !0
|
|
24
24
|
}) {
|
|
25
|
-
const e =
|
|
26
|
-
() =>
|
|
27
|
-
[
|
|
28
|
-
),
|
|
29
|
-
signature:
|
|
30
|
-
confirmSignature:
|
|
31
|
-
}, o =
|
|
32
|
-
resolver:
|
|
25
|
+
const e = B({ formId: r }), t = G({ formId: r }), s = e.data?.form, a = t.data?.formPdf, [m, D] = q(
|
|
26
|
+
() => k({ optionalFieldsToRequire: n }),
|
|
27
|
+
[n]
|
|
28
|
+
), u = {
|
|
29
|
+
signature: i?.signature ?? F.signature,
|
|
30
|
+
confirmSignature: i?.confirmSignature ?? F.confirmSignature
|
|
31
|
+
}, o = A({
|
|
32
|
+
resolver: H(m),
|
|
33
33
|
mode: b,
|
|
34
34
|
shouldFocusError: C,
|
|
35
|
-
defaultValues:
|
|
36
|
-
values:
|
|
35
|
+
defaultValues: u,
|
|
36
|
+
values: u,
|
|
37
37
|
resetOptions: { keepDirtyValues: !0 }
|
|
38
|
-
}),
|
|
38
|
+
}), f = U(), w = f.isPending, {
|
|
39
39
|
baseSubmitHandler: h,
|
|
40
40
|
error: E,
|
|
41
41
|
setError: L
|
|
42
|
-
} =
|
|
43
|
-
signature:
|
|
44
|
-
confirmSignature:
|
|
45
|
-
}, P = async (
|
|
46
|
-
let
|
|
47
|
-
return await new Promise((
|
|
42
|
+
} = I("SignCompanyForm"), c = z([e, t], { submitError: E, setSubmitError: L }), d = Q(D, o.control), M = {
|
|
43
|
+
signature: d.signature,
|
|
44
|
+
confirmSignature: d.confirmSignature
|
|
45
|
+
}, P = async () => {
|
|
46
|
+
let g;
|
|
47
|
+
return await new Promise((l) => {
|
|
48
48
|
o.handleSubmit(
|
|
49
|
-
async (
|
|
50
|
-
await h(
|
|
49
|
+
async (V) => {
|
|
50
|
+
await h(V, async (p) => {
|
|
51
51
|
if (!r)
|
|
52
|
-
throw new
|
|
53
|
-
const
|
|
52
|
+
throw new y("formId is required to sign a company form");
|
|
53
|
+
const S = (await f.mutateAsync({
|
|
54
54
|
request: {
|
|
55
55
|
formId: r,
|
|
56
56
|
requestBody: {
|
|
@@ -60,27 +60,27 @@ function sr({
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
})).form;
|
|
63
|
-
if (!
|
|
64
|
-
throw new
|
|
65
|
-
|
|
63
|
+
if (!S)
|
|
64
|
+
throw new y("Company form signing failed");
|
|
65
|
+
g = {
|
|
66
66
|
mode: "create",
|
|
67
|
-
data:
|
|
67
|
+
data: S
|
|
68
68
|
};
|
|
69
|
-
}),
|
|
69
|
+
}), l();
|
|
70
70
|
},
|
|
71
71
|
() => {
|
|
72
|
-
|
|
72
|
+
l();
|
|
73
73
|
}
|
|
74
74
|
)();
|
|
75
|
-
}),
|
|
75
|
+
}), g;
|
|
76
76
|
};
|
|
77
|
-
if (e.isLoading || t.isLoading || !
|
|
78
|
-
return { isLoading: !0, errorHandling:
|
|
79
|
-
const v =
|
|
77
|
+
if (e.isLoading || t.isLoading || !s || !a)
|
|
78
|
+
return { isLoading: !0, errorHandling: c };
|
|
79
|
+
const v = a.documentUrl ?? null;
|
|
80
80
|
return {
|
|
81
81
|
isLoading: !1,
|
|
82
82
|
data: {
|
|
83
|
-
companyForm:
|
|
83
|
+
companyForm: s,
|
|
84
84
|
pdfUrl: v
|
|
85
85
|
},
|
|
86
86
|
status: {
|
|
@@ -88,19 +88,19 @@ function sr({
|
|
|
88
88
|
mode: "create"
|
|
89
89
|
},
|
|
90
90
|
actions: { onSubmit: P },
|
|
91
|
-
errorHandling:
|
|
91
|
+
errorHandling: c,
|
|
92
92
|
form: {
|
|
93
93
|
Fields: {
|
|
94
|
-
Signature:
|
|
95
|
-
ConfirmSignature:
|
|
94
|
+
Signature: O,
|
|
95
|
+
ConfirmSignature: x
|
|
96
96
|
},
|
|
97
97
|
fieldsMetadata: M,
|
|
98
98
|
hookFormInternals: { formMethods: o },
|
|
99
|
-
getFormSubmissionValues:
|
|
99
|
+
getFormSubmissionValues: R(o, m)
|
|
100
100
|
}
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
103
|
export {
|
|
104
|
-
|
|
104
|
+
ir as useSignCompanyForm
|
|
105
105
|
};
|
|
106
106
|
//# sourceMappingURL=useSignCompanyForm.js.map
|
package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSignCompanyForm.js","sources":["../../../../../../src/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useForm } from 'react-hook-form'\nimport type { UseFormProps } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport type { Form } from '@gusto/embedded-api/models/components/form'\nimport { useCompanyFormsGet } from '@gusto/embedded-api/react-query/companyFormsGet'\nimport { useCompanyFormsGetPdf } from '@gusto/embedded-api/react-query/companyFormsGetPdf'\nimport { useCompanyFormsSignMutation } from '@gusto/embedded-api/react-query/companyFormsSign'\nimport {\n createSignCompanyFormSchema,\n type SignCompanyFormOptionalFieldsToRequire,\n type SignCompanyFormData,\n type SignCompanyFormOutputs,\n} from './signCompanyFormSchema'\nimport { SignatureField, ConfirmSignatureField } from './fields'\nimport { useDeriveFieldsMetadata } from '@/partner-hook-utils/form/useDeriveFieldsMetadata'\nimport { createGetFormSubmissionValues } from '@/partner-hook-utils/form/getFormSubmissionValues'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport type {\n BaseFormHookReady,\n FieldsMetadata,\n HookLoadingResult,\n HookSubmitResult,\n} from '@/partner-hook-utils/types'\nimport { useBaseSubmit } from '@/components/Base/useBaseSubmit'\nimport { SDKInternalError } from '@/types/sdkError'\n\nexport type { SignCompanyFormOptionalFieldsToRequire } from './signCompanyFormSchema'\n\nexport interface
|
|
1
|
+
{"version":3,"file":"useSignCompanyForm.js","sources":["../../../../../../src/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useForm } from 'react-hook-form'\nimport type { UseFormProps } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport type { Form } from '@gusto/embedded-api/models/components/form'\nimport { useCompanyFormsGet } from '@gusto/embedded-api/react-query/companyFormsGet'\nimport { useCompanyFormsGetPdf } from '@gusto/embedded-api/react-query/companyFormsGetPdf'\nimport { useCompanyFormsSignMutation } from '@gusto/embedded-api/react-query/companyFormsSign'\nimport {\n createSignCompanyFormSchema,\n type SignCompanyFormOptionalFieldsToRequire,\n type SignCompanyFormData,\n type SignCompanyFormOutputs,\n} from './signCompanyFormSchema'\nimport { SignatureField, ConfirmSignatureField } from './fields'\nimport { useDeriveFieldsMetadata } from '@/partner-hook-utils/form/useDeriveFieldsMetadata'\nimport { createGetFormSubmissionValues } from '@/partner-hook-utils/form/getFormSubmissionValues'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport type {\n BaseFormHookReady,\n FieldsMetadata,\n HookLoadingResult,\n HookSubmitResult,\n} from '@/partner-hook-utils/types'\nimport { useBaseSubmit } from '@/components/Base/useBaseSubmit'\nimport { SDKInternalError } from '@/types/sdkError'\n\nexport type { SignCompanyFormOptionalFieldsToRequire } from './signCompanyFormSchema'\n\nexport interface UseSignCompanyFormProps {\n formId: string\n optionalFieldsToRequire?: SignCompanyFormOptionalFieldsToRequire\n defaultValues?: Partial<SignCompanyFormData>\n validationMode?: UseFormProps['mode']\n shouldFocusError?: boolean\n}\n\nexport interface SignCompanyFormFields {\n Signature: typeof SignatureField\n ConfirmSignature: typeof ConfirmSignatureField\n}\n\nexport interface UseSignCompanyFormReady extends BaseFormHookReady<\n FieldsMetadata,\n SignCompanyFormData,\n SignCompanyFormFields\n> {\n data: {\n companyForm: Form\n pdfUrl: string | null\n }\n status: { isPending: boolean; mode: 'create' }\n actions: {\n onSubmit: () => Promise<HookSubmitResult<Form> | undefined>\n }\n}\n\nconst HARDCODED_DEFAULTS: SignCompanyFormData = {\n signature: '',\n confirmSignature: false,\n}\n\nexport function useSignCompanyForm({\n formId,\n optionalFieldsToRequire,\n defaultValues: partnerDefaults,\n validationMode = 'onSubmit',\n shouldFocusError = true,\n}: UseSignCompanyFormProps): HookLoadingResult | UseSignCompanyFormReady {\n const formQuery = useCompanyFormsGet({ formId })\n const pdfQuery = useCompanyFormsGetPdf({ formId })\n\n const companyForm = formQuery.data?.form\n const formPdf = pdfQuery.data?.formPdf\n\n const [schema, metadataConfig] = useMemo(\n () => createSignCompanyFormSchema({ optionalFieldsToRequire }),\n [optionalFieldsToRequire],\n )\n\n const resolvedDefaults: SignCompanyFormData = {\n signature: partnerDefaults?.signature ?? HARDCODED_DEFAULTS.signature,\n confirmSignature: partnerDefaults?.confirmSignature ?? HARDCODED_DEFAULTS.confirmSignature,\n }\n\n const formMethods = useForm<SignCompanyFormData, unknown, SignCompanyFormOutputs>({\n resolver: zodResolver(schema),\n mode: validationMode,\n shouldFocusError,\n defaultValues: resolvedDefaults,\n values: resolvedDefaults,\n resetOptions: { keepDirtyValues: true },\n })\n\n const signFormMutation = useCompanyFormsSignMutation()\n const isPending = signFormMutation.isPending\n\n const {\n baseSubmitHandler,\n error: submitError,\n setError: setSubmitError,\n } = useBaseSubmit('SignCompanyForm')\n\n const queries = [formQuery, pdfQuery]\n const errorHandling = composeErrorHandler(queries, { submitError, setSubmitError })\n\n const baseMetadata = useDeriveFieldsMetadata(metadataConfig, formMethods.control)\n const fieldsMetadata = {\n signature: baseMetadata.signature,\n confirmSignature: baseMetadata.confirmSignature,\n }\n\n const onSubmit = async (): Promise<HookSubmitResult<Form> | undefined> => {\n let submitResult: HookSubmitResult<Form> | undefined\n\n await new Promise<void>(resolve => {\n void formMethods.handleSubmit(\n async (data: SignCompanyFormOutputs) => {\n await baseSubmitHandler(data, async payload => {\n if (!formId) {\n throw new SDKInternalError('formId is required to sign a company form')\n }\n\n const result = await signFormMutation.mutateAsync({\n request: {\n formId,\n requestBody: {\n signatureText: payload.signature,\n agree: payload.confirmSignature,\n signedByIpAddress: '',\n },\n },\n })\n\n const signedForm = result.form\n\n if (!signedForm) {\n throw new SDKInternalError('Company form signing failed')\n }\n\n submitResult = {\n mode: 'create',\n data: signedForm,\n }\n })\n resolve()\n },\n () => {\n resolve()\n },\n )()\n })\n\n return submitResult\n }\n\n const isDataLoading = formQuery.isLoading || pdfQuery.isLoading\n\n if (isDataLoading || !companyForm || !formPdf) {\n return { isLoading: true as const, errorHandling }\n }\n\n const pdfUrl = formPdf.documentUrl ?? null\n\n return {\n isLoading: false as const,\n data: {\n companyForm,\n pdfUrl,\n },\n status: {\n isPending,\n mode: 'create' as const,\n },\n actions: { onSubmit },\n errorHandling,\n form: {\n Fields: {\n Signature: SignatureField,\n ConfirmSignature: ConfirmSignatureField,\n },\n fieldsMetadata,\n hookFormInternals: { formMethods },\n getFormSubmissionValues: createGetFormSubmissionValues(formMethods, schema),\n },\n }\n}\n\nexport type UseSignCompanyFormResult = HookLoadingResult | UseSignCompanyFormReady\nexport type SignCompanyFormFieldsMetadata = UseSignCompanyFormReady['form']['fieldsMetadata']\n"],"names":["HARDCODED_DEFAULTS","useSignCompanyForm","formId","optionalFieldsToRequire","partnerDefaults","validationMode","shouldFocusError","formQuery","useCompanyFormsGet","pdfQuery","useCompanyFormsGetPdf","companyForm","formPdf","schema","metadataConfig","useMemo","createSignCompanyFormSchema","resolvedDefaults","formMethods","useForm","zodResolver","signFormMutation","useCompanyFormsSignMutation","isPending","baseSubmitHandler","submitError","setSubmitError","useBaseSubmit","errorHandling","composeErrorHandler","baseMetadata","useDeriveFieldsMetadata","fieldsMetadata","onSubmit","submitResult","resolve","data","payload","SDKInternalError","signedForm","pdfUrl","SignatureField","ConfirmSignatureField","createGetFormSubmissionValues"],"mappings":";;;;;;;;;;;;;AAyDA,MAAMA,IAA0C;AAAA,EAC9C,WAAW;AAAA,EACX,kBAAkB;AACpB;AAEO,SAASC,GAAmB;AAAA,EACjC,QAAAC;AAAA,EACA,yBAAAC;AAAA,EACA,eAAeC;AAAA,EACf,gBAAAC,IAAiB;AAAA,EACjB,kBAAAC,IAAmB;AACrB,GAAyE;AACvE,QAAMC,IAAYC,EAAmB,EAAE,QAAAN,GAAQ,GACzCO,IAAWC,EAAsB,EAAE,QAAAR,GAAQ,GAE3CS,IAAcJ,EAAU,MAAM,MAC9BK,IAAUH,EAAS,MAAM,SAEzB,CAACI,GAAQC,CAAc,IAAIC;AAAA,IAC/B,MAAMC,EAA4B,EAAE,yBAAAb,GAAyB;AAAA,IAC7D,CAACA,CAAuB;AAAA,EAAA,GAGpBc,IAAwC;AAAA,IAC5C,WAAWb,GAAiB,aAAaJ,EAAmB;AAAA,IAC5D,kBAAkBI,GAAiB,oBAAoBJ,EAAmB;AAAA,EAAA,GAGtEkB,IAAcC,EAA8D;AAAA,IAChF,UAAUC,EAAYP,CAAM;AAAA,IAC5B,MAAMR;AAAA,IACN,kBAAAC;AAAA,IACA,eAAeW;AAAA,IACf,QAAQA;AAAA,IACR,cAAc,EAAE,iBAAiB,GAAA;AAAA,EAAK,CACvC,GAEKI,IAAmBC,EAAA,GACnBC,IAAYF,EAAiB,WAE7B;AAAA,IACJ,mBAAAG;AAAA,IACA,OAAOC;AAAA,IACP,UAAUC;AAAA,EAAA,IACRC,EAAc,iBAAiB,GAG7BC,IAAgBC,EADN,CAACtB,GAAWE,CAAQ,GACe,EAAE,aAAAgB,GAAa,gBAAAC,GAAgB,GAE5EI,IAAeC,EAAwBjB,GAAgBI,EAAY,OAAO,GAC1Ec,IAAiB;AAAA,IACrB,WAAWF,EAAa;AAAA,IACxB,kBAAkBA,EAAa;AAAA,EAAA,GAG3BG,IAAW,YAAyD;AACxE,QAAIC;AAEJ,iBAAM,IAAI,QAAc,CAAAC,MAAW;AACjC,MAAKjB,EAAY;AAAA,QACf,OAAOkB,MAAiC;AACtC,gBAAMZ,EAAkBY,GAAM,OAAMC,MAAW;AAC7C,gBAAI,CAACnC;AACH,oBAAM,IAAIoC,EAAiB,2CAA2C;AAcxE,kBAAMC,KAXS,MAAMlB,EAAiB,YAAY;AAAA,cAChD,SAAS;AAAA,gBACP,QAAAnB;AAAA,gBACA,aAAa;AAAA,kBACX,eAAemC,EAAQ;AAAA,kBACvB,OAAOA,EAAQ;AAAA,kBACf,mBAAmB;AAAA,gBAAA;AAAA,cACrB;AAAA,YACF,CACD,GAEyB;AAE1B,gBAAI,CAACE;AACH,oBAAM,IAAID,EAAiB,6BAA6B;AAG1D,YAAAJ,IAAe;AAAA,cACb,MAAM;AAAA,cACN,MAAMK;AAAA,YAAA;AAAA,UAEV,CAAC,GACDJ,EAAA;AAAA,QACF;AAAA,QACA,MAAM;AACJ,UAAAA,EAAA;AAAA,QACF;AAAA,MAAA,EACF;AAAA,IACF,CAAC,GAEMD;AAAA,EACT;AAIA,MAFsB3B,EAAU,aAAaE,EAAS,aAEjC,CAACE,KAAe,CAACC;AACpC,WAAO,EAAE,WAAW,IAAe,eAAAgB,EAAA;AAGrC,QAAMY,IAAS5B,EAAQ,eAAe;AAEtC,SAAO;AAAA,IACL,WAAW;AAAA,IACX,MAAM;AAAA,MACJ,aAAAD;AAAA,MACA,QAAA6B;AAAA,IAAA;AAAA,IAEF,QAAQ;AAAA,MACN,WAAAjB;AAAA,MACA,MAAM;AAAA,IAAA;AAAA,IAER,SAAS,EAAE,UAAAU,EAAA;AAAA,IACX,eAAAL;AAAA,IACA,MAAM;AAAA,MACJ,QAAQ;AAAA,QACN,WAAWa;AAAA,QACX,kBAAkBC;AAAA,MAAA;AAAA,MAEpB,gBAAAV;AAAA,MACA,mBAAmB,EAAE,aAAAd,EAAA;AAAA,MACrB,yBAAyByB,EAA8BzB,GAAaL,CAAM;AAAA,IAAA;AAAA,EAC5E;AAEJ;"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { useFederalTaxes as
|
|
4
|
-
import
|
|
2
|
+
import { useTranslation as e } from "react-i18next";
|
|
3
|
+
import { useFederalTaxes as i } from "./useFederalTaxes.js";
|
|
4
|
+
import "../../../shared/constants.js";
|
|
5
|
+
import "classnames";
|
|
6
|
+
import { ActionsLayout as s } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
5
7
|
import { useComponentContext as m } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
6
|
-
const
|
|
7
|
-
const { t } =
|
|
8
|
-
return /* @__PURE__ */ o(
|
|
8
|
+
const x = () => {
|
|
9
|
+
const { t } = e("Company.FederalTaxes"), { isPending: n } = i(), r = m();
|
|
10
|
+
return /* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(r.Button, { type: "submit", isLoading: n, children: t("continueCta") }) });
|
|
9
11
|
};
|
|
10
12
|
export {
|
|
11
|
-
|
|
13
|
+
x as Actions
|
|
12
14
|
};
|
|
13
15
|
//# 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,13 +12,15 @@ 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";
|
|
15
17
|
import { companyEvents as l } from "../../../shared/constants.js";
|
|
16
|
-
function
|
|
18
|
+
function ee(a) {
|
|
17
19
|
return /* @__PURE__ */ e(O, { ...a, children: /* @__PURE__ */ e(w, { ...a, children: a.children }) });
|
|
18
20
|
}
|
|
19
21
|
function w({ companyId: a, children: t, className: s, defaultValues: i, dictionary: d }) {
|
|
20
22
|
R("Company.FederalTaxes"), M("Company.FederalTaxes", d);
|
|
21
|
-
const { onEvent:
|
|
23
|
+
const { onEvent: m, baseSubmitHandler: f } = U(), { data: p } = h({ companyId: a }), r = p.federalTaxDetails, { mutateAsync: c, isPending: F } = g(), n = E({
|
|
22
24
|
resolver: v(A),
|
|
23
25
|
defaultValues: {
|
|
24
26
|
federalEin: r.hasEin ? void 0 : "",
|
|
@@ -28,7 +30,7 @@ function w({ companyId: a, children: t, className: s, defaultValues: i, dictiona
|
|
|
28
30
|
}
|
|
29
31
|
}), x = async (T) => {
|
|
30
32
|
await f(T, async (o) => {
|
|
31
|
-
const u = await
|
|
33
|
+
const u = await c({
|
|
32
34
|
request: {
|
|
33
35
|
companyId: a,
|
|
34
36
|
federalTaxDetailsUpdate: {
|
|
@@ -40,10 +42,10 @@ function w({ companyId: a, children: t, className: s, defaultValues: i, dictiona
|
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
44
|
});
|
|
43
|
-
|
|
45
|
+
m(
|
|
44
46
|
l.COMPANY_FEDERAL_TAXES_UPDATED,
|
|
45
47
|
u.federalTaxDetails
|
|
46
|
-
),
|
|
48
|
+
), m(l.COMPANY_FEDERAL_TAXES_DONE);
|
|
47
49
|
});
|
|
48
50
|
};
|
|
49
51
|
return /* @__PURE__ */ e("section", { className: s, children: /* @__PURE__ */ e(
|
|
@@ -53,7 +55,7 @@ function w({ companyId: a, children: t, className: s, defaultValues: i, dictiona
|
|
|
53
55
|
isPending: F,
|
|
54
56
|
federalTaxDetails: r
|
|
55
57
|
},
|
|
56
|
-
children: /* @__PURE__ */ e(P, { ...
|
|
58
|
+
children: /* @__PURE__ */ e(P, { ...n, children: /* @__PURE__ */ e(S, { onSubmit: n.handleSubmit(x), children: /* @__PURE__ */ e(j, { flexDirection: "column", gap: 32, children: t || /* @__PURE__ */ y(D, { children: [
|
|
57
59
|
/* @__PURE__ */ e(b, {}),
|
|
58
60
|
/* @__PURE__ */ e(C, {}),
|
|
59
61
|
/* @__PURE__ */ e(_, {})
|
|
@@ -62,6 +64,6 @@ function w({ companyId: a, children: t, className: s, defaultValues: i, dictiona
|
|
|
62
64
|
) });
|
|
63
65
|
}
|
|
64
66
|
export {
|
|
65
|
-
|
|
67
|
+
ee as FederalTaxes
|
|
66
68
|
};
|
|
67
69
|
//# 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,GAAaC,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,11 +4,12 @@ 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";
|
|
7
8
|
import { usePlaceholderEin as x, normalizeEin as F } from "../../../helpers/federalEin.js";
|
|
8
9
|
import { useComponentContext as T } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
9
10
|
import { TextInputField as a } from "../../Common/Fields/TextInputField/TextInputField.js";
|
|
10
11
|
import { SelectField as l } from "../../Common/Fields/SelectField/SelectField.js";
|
|
11
|
-
function
|
|
12
|
+
function O() {
|
|
12
13
|
const { t: e } = d("Company.FederalTaxes"), { federalTaxDetails: s } = b(), i = T(), m = x(s?.hasEin), p = n(
|
|
13
14
|
() => Object.values(y).map((o) => ({
|
|
14
15
|
value: o,
|
|
@@ -99,6 +100,6 @@ function N() {
|
|
|
99
100
|
] });
|
|
100
101
|
}
|
|
101
102
|
export {
|
|
102
|
-
|
|
103
|
+
O as Form
|
|
103
104
|
};
|
|
104
105
|
//# 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;"}
|
|
@@ -12,19 +12,20 @@ import "@gusto/embedded-api/models/errors/sdkvalidationerror";
|
|
|
12
12
|
import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
|
|
13
13
|
import "@gusto/embedded-api/models/errors/httpclienterrors";
|
|
14
14
|
import "../../../shared/constants.js";
|
|
15
|
+
import "classnames";
|
|
15
16
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
16
17
|
import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
|
|
17
|
-
const
|
|
18
|
+
const b = o.object({
|
|
18
19
|
federalEin: o.string().optional(),
|
|
19
20
|
taxPayerType: o.enum(Object.values(e)).optional(),
|
|
20
21
|
filingForm: o.enum(Object.values(r)).optional(),
|
|
21
22
|
legalName: o.string().min(1)
|
|
22
|
-
}), [
|
|
23
|
+
}), [j, v] = t(
|
|
23
24
|
"CompanyFederalTaxesContext"
|
|
24
25
|
);
|
|
25
26
|
export {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
b as FederalTaxFormSchema,
|
|
28
|
+
v as FederalTaxesProvider,
|
|
29
|
+
j as useFederalTaxes
|
|
29
30
|
};
|
|
30
31
|
//# sourceMappingURL=useFederalTaxes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFederalTaxes.js","sources":["../../../../src/components/Company/FederalTaxes/useFederalTaxes.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { FederalTaxDetails } from '@gusto/embedded-api/models/components/federaltaxdetails'\nimport { FilingForm, TaxPayerType } from '@gusto/embedded-api/models/components/federaltaxdetails'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport const FederalTaxFormSchema = z.object({\n federalEin: z.string().optional(),\n taxPayerType: z.enum(Object.values(TaxPayerType) as [string, ...string[]]).optional(),\n filingForm: z.enum(Object.values(FilingForm) as [string, ...string[]]).optional(),\n legalName: z.string().min(1),\n})\n\nexport type FederalTaxFormInputs = z.input<typeof FederalTaxFormSchema>\n\nexport type FederalTaxesDefaultValues = RequireAtLeastOne<{\n taxPayerType?: FederalTaxFormInputs['taxPayerType']\n filingForm?: FederalTaxFormInputs['filingForm']\n legalName?: FederalTaxFormInputs['legalName']\n}>\n\ntype FederalTaxesContextType = {\n isPending: boolean\n federalTaxDetails?: FederalTaxDetails\n}\n\nconst [useFederalTaxes, FederalTaxesProvider] = createCompoundContext<FederalTaxesContextType>(\n 'CompanyFederalTaxesContext',\n)\n\nexport { useFederalTaxes, FederalTaxesProvider }\n"],"names":["FederalTaxFormSchema","z","TaxPayerType","FilingForm","useFederalTaxes","FederalTaxesProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useFederalTaxes.js","sources":["../../../../src/components/Company/FederalTaxes/useFederalTaxes.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { FederalTaxDetails } from '@gusto/embedded-api/models/components/federaltaxdetails'\nimport { FilingForm, TaxPayerType } from '@gusto/embedded-api/models/components/federaltaxdetails'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport const FederalTaxFormSchema = z.object({\n federalEin: z.string().optional(),\n taxPayerType: z.enum(Object.values(TaxPayerType) as [string, ...string[]]).optional(),\n filingForm: z.enum(Object.values(FilingForm) as [string, ...string[]]).optional(),\n legalName: z.string().min(1),\n})\n\nexport type FederalTaxFormInputs = z.input<typeof FederalTaxFormSchema>\n\nexport type FederalTaxesDefaultValues = RequireAtLeastOne<{\n taxPayerType?: FederalTaxFormInputs['taxPayerType']\n filingForm?: FederalTaxFormInputs['filingForm']\n legalName?: FederalTaxFormInputs['legalName']\n}>\n\ntype FederalTaxesContextType = {\n isPending: boolean\n federalTaxDetails?: FederalTaxDetails\n}\n\nconst [useFederalTaxes, FederalTaxesProvider] = createCompoundContext<FederalTaxesContextType>(\n 'CompanyFederalTaxesContext',\n)\n\nexport { useFederalTaxes, FederalTaxesProvider }\n"],"names":["FederalTaxFormSchema","z","TaxPayerType","FilingForm","useFederalTaxes","FederalTaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;;AAMO,MAAMA,IAAuBC,EAAE,OAAO;AAAA,EAC3C,YAAYA,EAAE,OAAA,EAAS,SAAA;AAAA,EACvB,cAAcA,EAAE,KAAK,OAAO,OAAOC,CAAY,CAA0B,EAAE,SAAA;AAAA,EAC3E,YAAYD,EAAE,KAAK,OAAO,OAAOE,CAAU,CAA0B,EAAE,SAAA;AAAA,EACvE,WAAWF,EAAE,OAAA,EAAS,IAAI,CAAC;AAC7B,CAAC,GAeK,CAACG,GAAiBC,CAAoB,IAAIC;AAAA,EAC9C;AACF;"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { useIndustryApiState as
|
|
2
|
+
import { useTranslation as i } from "react-i18next";
|
|
3
|
+
import { useIndustryApiState as s } from "./Context.js";
|
|
4
|
+
import "../../../shared/constants.js";
|
|
5
|
+
import "classnames";
|
|
4
6
|
import { ActionsLayout as m } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
5
7
|
import { useComponentContext as e } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
6
|
-
const
|
|
7
|
-
const { t: o } =
|
|
8
|
+
const C = () => {
|
|
9
|
+
const { t: o } = i("Company.Industry"), { isPending: n } = s(), r = e();
|
|
8
10
|
return /* @__PURE__ */ t(m, { children: /* @__PURE__ */ t(r.Button, { type: "submit", isLoading: n, children: o("submitCta") }) });
|
|
9
11
|
};
|
|
10
12
|
export {
|
|
11
|
-
|
|
13
|
+
C as Actions
|
|
12
14
|
};
|
|
13
15
|
//# sourceMappingURL=Actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.js","sources":["../../../../src/components/Company/Industry/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIndustryApiState } from './Context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.Industry')\n const { isPending } = useIndustryApiState()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","isPending","useIndustryApiState","Components","useComponentContext","jsx","ActionsLayout"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Actions.js","sources":["../../../../src/components/Company/Industry/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIndustryApiState } from './Context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.Industry')\n const { isPending } = useIndustryApiState()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","isPending","useIndustryApiState","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kBAAkB,GACzC,EAAE,WAAAC,EAAA,IAAcC,EAAA,GAChBC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAAF,EAAE,WAAW,GAChB,GACF;AAEJ;"}
|
|
@@ -10,17 +10,18 @@ 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";
|
|
13
14
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
15
|
import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
|
|
15
|
-
const [
|
|
16
|
+
const [P, f] = t("IndustryItems", {
|
|
16
17
|
items: []
|
|
17
|
-
}), [
|
|
18
|
+
}), [v, x] = t("IndustryApi", {
|
|
18
19
|
isPending: !1
|
|
19
20
|
});
|
|
20
21
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
x as IndustryApiStateProvider,
|
|
23
|
+
f as IndustryItemsProvider,
|
|
24
|
+
v as useIndustryApiState,
|
|
25
|
+
P as useIndustryItems
|
|
25
26
|
};
|
|
26
27
|
//# sourceMappingURL=Context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Context.js","sources":["../../../../src/components/Company/Industry/Context.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\nimport type { ComboBoxOption } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\n\nconst [useIndustryItems, IndustryItemsProvider] = createCompoundContext('IndustryItems', {\n items: [] as ComboBoxOption[],\n})\n\nconst [useIndustryApiState, IndustryApiStateProvider] = createCompoundContext('IndustryApi', {\n isPending: false,\n})\n\nexport { IndustryApiStateProvider, IndustryItemsProvider, useIndustryItems, useIndustryApiState }\n"],"names":["useIndustryItems","IndustryItemsProvider","createCompoundContext","useIndustryApiState","IndustryApiStateProvider"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Context.js","sources":["../../../../src/components/Company/Industry/Context.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\nimport type { ComboBoxOption } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\n\nconst [useIndustryItems, IndustryItemsProvider] = createCompoundContext('IndustryItems', {\n items: [] as ComboBoxOption[],\n})\n\nconst [useIndustryApiState, IndustryApiStateProvider] = createCompoundContext('IndustryApi', {\n isPending: false,\n})\n\nexport { IndustryApiStateProvider, IndustryItemsProvider, useIndustryItems, useIndustryApiState }\n"],"names":["useIndustryItems","IndustryItemsProvider","createCompoundContext","useIndustryApiState","IndustryApiStateProvider"],"mappings":";;;;;;;;;;;;;;;AAGA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC,EAAsB,iBAAiB;AAAA,EACvF,OAAO,CAAA;AACT,CAAC,GAEK,CAACC,GAAqBC,CAAwB,IAAIF,EAAsB,eAAe;AAAA,EAC3F,WAAW;AACb,CAAC;"}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { useIndustryItems as
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as e } from "react-i18next";
|
|
3
|
+
import { useIndustryItems as m } from "./Context.js";
|
|
4
|
+
import "../../../shared/constants.js";
|
|
5
|
+
import "classnames";
|
|
6
|
+
import { ComboBoxField as i } from "../../Common/Fields/ComboBoxField/ComboBoxField.js";
|
|
7
|
+
const c = () => {
|
|
8
|
+
const { t: o } = e("Company.Industry"), { items: r } = m();
|
|
9
|
+
return /* @__PURE__ */ t(
|
|
10
|
+
i,
|
|
9
11
|
{
|
|
10
12
|
isRequired: !0,
|
|
11
|
-
options:
|
|
13
|
+
options: r,
|
|
12
14
|
label: o("label"),
|
|
13
15
|
name: "naics_code",
|
|
14
16
|
placeholder: o("placeholder")
|
|
@@ -16,6 +18,6 @@ const p = () => {
|
|
|
16
18
|
);
|
|
17
19
|
};
|
|
18
20
|
export {
|
|
19
|
-
|
|
21
|
+
c as Edit
|
|
20
22
|
};
|
|
21
23
|
//# sourceMappingURL=Edit.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Edit.js","sources":["../../../../src/components/Company/Industry/Edit.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIndustryItems } from './Context'\nimport { ComboBoxField } from '@/components/Common'\n\nexport interface IndustryFormFields {\n naics_code: string\n}\n\nexport const Edit = () => {\n const { t } = useTranslation('Company.Industry')\n const { items } = useIndustryItems()\n\n return (\n <ComboBoxField\n isRequired\n options={items}\n label={t('label')}\n name=\"naics_code\"\n placeholder={t('placeholder')}\n />\n )\n}\n"],"names":["Edit","t","useTranslation","items","useIndustryItems","jsx","ComboBoxField"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Edit.js","sources":["../../../../src/components/Company/Industry/Edit.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIndustryItems } from './Context'\nimport { ComboBoxField } from '@/components/Common'\n\nexport interface IndustryFormFields {\n naics_code: string\n}\n\nexport const Edit = () => {\n const { t } = useTranslation('Company.Industry')\n const { items } = useIndustryItems()\n\n return (\n <ComboBoxField\n isRequired\n options={items}\n label={t('label')}\n name=\"naics_code\"\n placeholder={t('placeholder')}\n />\n )\n}\n"],"names":["Edit","t","useTranslation","items","useIndustryItems","jsx","ComboBoxField"],"mappings":";;;;;;AAQO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kBAAkB,GACzC,EAAE,OAAAC,EAAA,IAAUC,EAAA;AAElB,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,YAAU;AAAA,MACV,SAASH;AAAA,MACT,OAAOF,EAAE,OAAO;AAAA,MAChB,MAAK;AAAA,MACL,aAAaA,EAAE,aAAa;AAAA,IAAA;AAAA,EAAA;AAGlC;"}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { jsxs as r, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation as a } from "react-i18next";
|
|
3
3
|
import { useLocationsForm as e } from "./useLocationForm.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
import "../../../../shared/constants.js";
|
|
5
|
+
import "classnames";
|
|
6
|
+
import { ActionsLayout as m } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
7
|
+
import { useComponentContext as c } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
|
+
const x = () => {
|
|
9
|
+
const { t: o } = a("Company.Locations"), { handleCancel: i, isPending: s } = e(), t = c();
|
|
10
|
+
return /* @__PURE__ */ r(m, { children: [
|
|
9
11
|
/* @__PURE__ */ n(t.Button, { variant: "secondary", onClick: i, children: o("cancelCta") }),
|
|
10
12
|
/* @__PURE__ */ n(t.Button, { type: "submit", isLoading: s, "data-testid": "location-submit", children: o("saveCta") })
|
|
11
13
|
] });
|
|
12
14
|
};
|
|
13
15
|
export {
|
|
14
|
-
|
|
16
|
+
x as Actions
|
|
15
17
|
};
|
|
16
18
|
//# sourceMappingURL=Actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/Locations/LocationForm/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsForm } from './useLocationForm'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.Locations')\n const { handleCancel, isPending } = useLocationsForm()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button type=\"submit\" isLoading={isPending} data-testid=\"location-submit\">\n {t('saveCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","handleCancel","isPending","useLocationsForm","Components","useComponentContext","ActionsLayout","jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/Locations/LocationForm/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsForm } from './useLocationForm'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.Locations')\n const { handleCancel, isPending } = useLocationsForm()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button type=\"submit\" isLoading={isPending} data-testid=\"location-submit\">\n {t('saveCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","handleCancel","isPending","useLocationsForm","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,EAAE,cAAAC,GAAc,WAAAC,EAAA,IAAcC,EAAA,GAC9BC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAAF,EAAE,WAAW,EAAA,CAChB;AAAA,IACA,gBAAAQ,EAACH,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GAAW,eAAY,mBAChE,UAAAH,EAAE,SAAS,EAAA,CACd;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -4,12 +4,13 @@ import { useTranslation as l } from "react-i18next";
|
|
|
4
4
|
import { zipValidation as n, phoneValidation as m } from "../../../../helpers/validations.js";
|
|
5
5
|
import { Flex as d } from "../../../Common/Flex/Flex.js";
|
|
6
6
|
import { Grid as p } from "../../../Common/Grid/Grid.js";
|
|
7
|
+
import "classnames";
|
|
7
8
|
import { STATES_ABBR as c } from "../../../../shared/constants.js";
|
|
8
9
|
import { useMaskedTransform as u, commonMasks as b } from "../../../../helpers/mask.js";
|
|
9
10
|
import { TextInputField as s } from "../../../Common/Fields/TextInputField/TextInputField.js";
|
|
10
11
|
import { SelectField as f } from "../../../Common/Fields/SelectField/SelectField.js";
|
|
11
12
|
import { CheckboxGroupField as g } from "../../../Common/Fields/CheckboxGroupField/CheckboxGroupField.js";
|
|
12
|
-
const
|
|
13
|
+
const k = i.object({
|
|
13
14
|
phoneNumber: m,
|
|
14
15
|
street1: i.string().min(1),
|
|
15
16
|
street2: i.string().optional(),
|
|
@@ -18,7 +19,7 @@ const q = i.object({
|
|
|
18
19
|
zip: n,
|
|
19
20
|
addressType: i.array(i.enum(["mailingAddress", "filingAddress"])).optional()
|
|
20
21
|
});
|
|
21
|
-
function
|
|
22
|
+
function S() {
|
|
22
23
|
const { t: e } = l("Company.Locations"), o = u(b.phoneMask);
|
|
23
24
|
return /* @__PURE__ */ t(d, { flexDirection: "column", gap: 20, children: [
|
|
24
25
|
/* @__PURE__ */ t(
|
|
@@ -104,7 +105,7 @@ function k() {
|
|
|
104
105
|
] });
|
|
105
106
|
}
|
|
106
107
|
export {
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
S as Form,
|
|
109
|
+
k as LocationFormSchema
|
|
109
110
|
};
|
|
110
111
|
//# sourceMappingURL=Form.js.map
|