@gusto/embedded-react-sdk 0.12.0 → 0.12.3
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 +133 -0
- package/dist/_virtual/dynamic-import-helper.js +1 -8
- package/dist/_virtual/dynamic-import-helper.js.map +1 -1
- package/dist/components/Base/Base.js +4 -4
- package/dist/components/Common/ReorderableList/DropZone.js +1 -1
- package/dist/components/Common/ReorderableList/DropZone.js.map +1 -1
- package/dist/components/Common/ReorderableList/ReorderableItem.js +1 -1
- package/dist/components/Common/ReorderableList/ReorderableItem.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.js +2 -2
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +1 -1
- package/dist/components/Common/UI/CalendarPreview/CalendarPreview.js +1 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.js +1 -1
- package/dist/components/Common/UI/ProgressBar/ProgressBar.d.ts +1 -1
- package/dist/components/Common/UI/ProgressBar/ProgressBar.js +19 -9
- package/dist/components/Common/UI/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/components/Common/UI/ProgressBar/ProgressBarTypes.d.ts +4 -0
- package/dist/components/Common/hooks/useNumberFormatter.js +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +6 -7
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +3 -2
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +3 -2
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +7 -8
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +13 -14
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -7
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +3 -2
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +9 -10
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +10 -11
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -7
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -9
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccount.js +7 -7
- package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +6 -6
- package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js +8 -8
- package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -8
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -7
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +9 -8
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js +4 -4
- package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +8 -7
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js +2 -2
- 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 +3 -2
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +10 -11
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -7
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentSigner.js +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +9 -10
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +3 -7
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +6 -5
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +15 -16
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +5 -4
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +11 -15
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +3 -2
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +6 -10
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +5 -4
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Industry/Industry.js +2 -2
- package/dist/components/Company/Locations/LocationForm/Actions.js +7 -6
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +5 -6
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +14 -15
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -7
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +7 -6
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +3 -2
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +7 -8
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -7
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +11 -10
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +7 -6
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +3 -4
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +3 -7
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +38 -39
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +10 -9
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +16 -17
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +7 -6
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +12 -11
- package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.js +6 -10
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +3 -2
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +3 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -7
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +3 -2
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +3 -2
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -7
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/Address.js +8 -9
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +3 -4
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +5 -9
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +18 -18
- package/dist/components/Contractor/ContractorList/useContractorList.js +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +3 -3
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js +12 -11
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.d.ts +1 -0
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js +42 -22
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.d.ts +5 -5
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js +34 -16
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +6 -5
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +86 -85
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfile.js +23 -16
- package/dist/components/Contractor/Profile/ContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.d.ts +3 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +68 -65
- package/dist/components/Contractor/Profile/ContractorProfileForm.js.map +1 -1
- package/dist/components/Contractor/Profile/useContractorProfile.d.ts +16 -16
- package/dist/components/Contractor/Profile/useContractorProfile.js +110 -107
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +38 -38
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Employee/Compensation/Actions.js +1 -1
- package/dist/components/Employee/Compensation/Compensation.js +10 -10
- package/dist/components/Employee/Compensation/Compensation.js.map +1 -1
- package/dist/components/Employee/Compensation/Edit.js +12 -12
- package/dist/components/Employee/Compensation/List.js +23 -22
- package/dist/components/Employee/Compensation/List.js.map +1 -1
- package/dist/components/Employee/Compensation/useCompensation.js +1 -1
- package/dist/components/Employee/Compensation/useCompensation.js.map +1 -1
- package/dist/components/Employee/Deductions/Deductions.js +1 -1
- package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +12 -12
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +3 -3
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +9 -9
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +7 -6
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +8 -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 +3 -7
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +12 -13
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +3 -7
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Actions.js +3 -2
- package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js +6 -7
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Head.js +6 -5
- package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
- package/dist/components/Employee/EmployeeList/List.js +12 -12
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +3 -7
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/Actions.d.ts +1 -0
- package/dist/components/Employee/FederalTaxes/Actions.js +15 -0
- package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -0
- package/dist/components/Employee/FederalTaxes/FederalForm.d.ts +29 -0
- package/dist/components/Employee/FederalTaxes/FederalForm.js +110 -0
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -0
- package/dist/components/Employee/FederalTaxes/FederalTaxes.d.ts +6 -0
- package/dist/components/Employee/FederalTaxes/FederalTaxes.js +72 -0
- package/dist/components/Employee/FederalTaxes/FederalTaxes.js.map +1 -0
- package/dist/components/Employee/FederalTaxes/Head.d.ts +1 -0
- package/dist/components/Employee/FederalTaxes/Head.js +24 -0
- package/dist/components/Employee/FederalTaxes/Head.js.map +1 -0
- package/dist/components/Employee/FederalTaxes/index.d.ts +2 -0
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.d.ts +5 -0
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +16 -0
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -0
- package/dist/components/Employee/Landing/Landing.js +10 -10
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.d.ts +1 -19
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.d.ts +22 -0
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +18 -0
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -0
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.d.ts +2 -1
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +72 -63
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +9 -9
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Actions.js +6 -5
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +9 -8
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js +8 -8
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +9 -9
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +9 -13
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/Actions.js +7 -6
- package/dist/components/Employee/Profile/Actions.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.d.ts +6 -6
- package/dist/components/Employee/Profile/HomeAddress.js +5 -6
- package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.d.ts +2 -2
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +21 -22
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
- package/dist/components/Employee/Profile/Profile.js +13 -13
- package/dist/components/Employee/Profile/Profile.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.js +3 -7
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.d.ts +2 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js +37 -24
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.d.ts +2 -1
- package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.js +31 -19
- package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.js.map +1 -1
- package/dist/components/Employee/StateTaxes/Actions.d.ts +1 -0
- package/dist/components/Employee/StateTaxes/Actions.js +15 -0
- package/dist/components/Employee/StateTaxes/Actions.js.map +1 -0
- package/dist/components/Employee/StateTaxes/StateForm.d.ts +10 -0
- package/dist/components/Employee/StateTaxes/StateForm.js +34 -0
- package/dist/components/Employee/StateTaxes/StateForm.js.map +1 -0
- package/dist/components/Employee/StateTaxes/StateTaxes.d.ts +7 -0
- package/dist/components/Employee/StateTaxes/StateTaxes.js +90 -0
- package/dist/components/Employee/StateTaxes/StateTaxes.js.map +1 -0
- package/dist/components/Employee/StateTaxes/index.d.ts +2 -0
- package/dist/components/Employee/StateTaxes/useStateTaxes.d.ts +8 -0
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +16 -0
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -0
- package/dist/components/Employee/Taxes/Actions.js +9 -8
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +13 -12
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/Taxes.d.ts +5 -0
- package/dist/components/Employee/Taxes/Taxes.js +73 -85
- package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +3 -7
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Employee/index.d.ts +3 -1
- package/dist/components/Employee/index.js +16 -12
- package/dist/components/Employee/index.js.map +1 -1
- package/dist/components/Flow/Flow.js +15 -13
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/Flow/useFlow.d.ts +1 -0
- package/dist/components/Flow/useFlow.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.d.ts +6 -0
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +41 -0
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -0
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +11 -0
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +80 -0
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -0
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.d.ts +6 -0
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +19 -0
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -0
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +5 -0
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +23 -0
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -0
- package/dist/components/Payroll/PayrollList/PayrollList.d.ts +6 -0
- package/dist/components/Payroll/PayrollList/PayrollList.js +17 -0
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -0
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +9 -0
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +51 -0
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -0
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +7 -0
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +32 -0
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -0
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +6 -0
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +70 -0
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -0
- package/dist/components/Payroll/RunPayrollFlow/RunPayroll.d.ts +16 -0
- package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js +55 -0
- package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js.map +1 -0
- package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.d.ts +6 -0
- package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.js +20 -0
- package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.js.map +1 -0
- package/dist/components/Payroll/index.d.ts +6 -0
- package/dist/components/Payroll/index.js +13 -0
- package/dist/components/Payroll/index.js.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/contexts/ApiProvider/ApiProvider.js +4 -4
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +3 -2
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/ThemeProvider/ThemeProvider.js +7 -7
- package/dist/contexts/ThemeProvider/ThemeProvider.js.map +1 -1
- package/dist/i18n/I18n.js +1 -1
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Contractor.ContractorList.json.js +13 -11
- package/dist/i18n/en/Contractor.ContractorList.json.js.map +1 -1
- package/dist/i18n/en/Contractor.Profile.json.js +1 -1
- package/dist/i18n/en/Employee.FederalTaxes.json.js +46 -0
- package/dist/i18n/en/Employee.FederalTaxes.json.js.map +1 -0
- package/dist/i18n/en/Employee.StateTaxes.json.js +6 -10
- package/dist/i18n/en/Employee.StateTaxes.json.js.map +1 -1
- package/dist/i18n/en/Employee.Taxes.json.js +7 -7
- package/dist/index.js +11 -9
- package/dist/index.js.map +1 -1
- package/dist/shared/constants.d.ts +30 -2
- package/dist/shared/constants.js +75 -47
- package/dist/shared/constants.js.map +1 -1
- package/dist/types/i18next.d.ts +29 -7
- package/package.json +12 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BankAccountForm.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountForm/BankAccountForm.tsx"],"sourcesContent":["import { useBankAccountsCreateMutation } from '@gusto/embedded-api/react-query/bankAccountsCreate'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { Head } from './Head'\nimport type { BankAccountFormInputs } from './Form'\nimport { BankAccountFormSchema, Form } from './Form'\nimport { Actions } from './Actions'\nimport { BankAccountFormProvider } from './context'\nimport { Form as HtmlForm } from '@/components/Common/Form'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n/I18n'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { componentEvents } from '@/shared/constants'\n\ninterface BankAccountFormProps extends CommonComponentInterface {\n companyId: string\n isEditing?: boolean\n}\n\nexport function BankAccountForm(props: BankAccountFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\nfunction Root({ companyId, className, children, isEditing = false }: BankAccountFormProps) {\n useI18n('Company.BankAccount')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { mutateAsync: createBankAccount, isPending: isPendingCreate } =\n useBankAccountsCreateMutation()\n\n const { control, ...methods } = useForm<BankAccountFormInputs>({\n resolver: zodResolver(BankAccountFormSchema),\n defaultValues: { accountNumber: '', routingNumber: '' },\n })\n\n const onSubmit = async (data: BankAccountFormInputs) => {\n await baseSubmitHandler(data, async payload => {\n const { companyBankAccount } = await createBankAccount({\n //Account type is always checking for company bank accounts\n request: { companyId,
|
|
1
|
+
{"version":3,"file":"BankAccountForm.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountForm/BankAccountForm.tsx"],"sourcesContent":["import { useBankAccountsCreateMutation } from '@gusto/embedded-api/react-query/bankAccountsCreate'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { Head } from './Head'\nimport type { BankAccountFormInputs } from './Form'\nimport { BankAccountFormSchema, Form } from './Form'\nimport { Actions } from './Actions'\nimport { BankAccountFormProvider } from './context'\nimport { Form as HtmlForm } from '@/components/Common/Form'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n/I18n'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { componentEvents } from '@/shared/constants'\n\ninterface BankAccountFormProps extends CommonComponentInterface {\n companyId: string\n isEditing?: boolean\n}\n\nexport function BankAccountForm(props: BankAccountFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\nfunction Root({ companyId, className, children, isEditing = false }: BankAccountFormProps) {\n useI18n('Company.BankAccount')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { mutateAsync: createBankAccount, isPending: isPendingCreate } =\n useBankAccountsCreateMutation()\n\n const { control, ...methods } = useForm<BankAccountFormInputs>({\n resolver: zodResolver(BankAccountFormSchema),\n defaultValues: { accountNumber: '', routingNumber: '' },\n })\n\n const onSubmit = async (data: BankAccountFormInputs) => {\n await baseSubmitHandler(data, async payload => {\n const { companyBankAccount } = await createBankAccount({\n //Account type is always checking for company bank accounts\n request: { companyId, companyBankAccountRequest: { ...payload, accountType: 'Checking' } },\n })\n\n onEvent(componentEvents.COMPANY_BANK_ACCOUNT_CREATED, companyBankAccount)\n })\n }\n return (\n <section className={className}>\n <FormProvider {...methods} control={control}>\n <HtmlForm onSubmit={methods.handleSubmit(onSubmit)}>\n <BankAccountFormProvider value={{ isPending: isPendingCreate, isEditing, onEvent }}>\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </BankAccountFormProvider>\n </HtmlForm>\n </FormProvider>\n </section>\n )\n}\n"],"names":["BankAccountForm","props","jsx","BaseComponent","Root","companyId","className","children","isEditing","useI18n","onEvent","baseSubmitHandler","useBase","createBankAccount","isPendingCreate","useBankAccountsCreateMutation","control","methods","useForm","zodResolver","BankAccountFormSchema","onSubmit","data","payload","companyBankAccount","componentEvents","FormProvider","HtmlForm","BankAccountFormProvider","Flex","jsxs","Fragment","Head","Form","Actions"],"mappings":";;;;;;;;;;;;;;AAqBO,SAASA,EAAgBC,GAAsD;AACpF,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AACA,SAASG,EAAK,EAAE,WAAAC,GAAW,WAAAC,GAAW,UAAAC,GAAU,WAAAC,IAAY,MAA+B;AACzF,EAAAC,EAAQ,qBAAqB;AAC7B,QAAM,EAAE,SAAAC,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GAEjC,EAAE,aAAaC,GAAmB,WAAWC,EAAA,IACjDC,EAAA,GAEI,EAAE,SAAAC,GAAS,GAAGC,EAAA,IAAYC,EAA+B;AAAA,IAC7D,UAAUC,EAAYC,CAAqB;AAAA,IAC3C,eAAe,EAAE,eAAe,IAAI,eAAe,GAAA;AAAA,EAAG,CACvD,GAEKC,IAAW,OAAOC,MAAgC;AACtD,UAAMX,EAAkBW,GAAM,OAAMC,MAAW;AAC7C,YAAM,EAAE,oBAAAC,MAAuB,MAAMX,EAAkB;AAAA;AAAA,QAErD,SAAS,EAAE,WAAAR,GAAW,2BAA2B,EAAE,GAAGkB,GAAS,aAAa,WAAA,EAAW;AAAA,MAAE,CAC1F;AAED,MAAAb,EAAQe,EAAgB,8BAA8BD,CAAkB;AAAA,IAC1E,CAAC;AAAA,EACH;AACA,SACE,gBAAAtB,EAAC,WAAA,EAAQ,WAAAI,GACP,UAAA,gBAAAJ,EAACwB,KAAc,GAAGT,GAAS,SAAAD,GACzB,UAAA,gBAAAd,EAACyB,GAAA,EAAS,UAAUV,EAAQ,aAAaI,CAAQ,GAC/C,UAAA,gBAAAnB,EAAC0B,GAAA,EAAwB,OAAO,EAAE,WAAWd,GAAiB,WAAAN,GAAW,SAAAE,KACvE,UAAA,gBAAAR,EAAC2B,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UAAAtB,KAGC,gBAAAuB,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAA7B,EAAC8B,GAAA,EAAK;AAAA,sBACLC,GAAA,EAAK;AAAA,sBACLC,GAAA,CAAA,CAAQ;AAAA,EAAA,EAAA,CACX,EAAA,CAEJ,EAAA,CACF,EAAA,CACF,EAAA,CACF,EAAA,CACF;AAEJ;"}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { jsxs as t, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { z as i } from "zod";
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { accountNumberValidation as
|
|
3
|
+
import { useTranslation as m } from "react-i18next";
|
|
4
|
+
import { accountNumberValidation as n, routingNumberValidation as u } from "../../../../helpers/validations.js";
|
|
5
5
|
import { Flex as a } from "../../../Common/Flex/Flex.js";
|
|
6
6
|
import "classnames";
|
|
7
|
+
import "../../../../shared/constants.js";
|
|
7
8
|
import { TextInputField as e } from "../../../Common/Fields/TextInputField/TextInputField.js";
|
|
8
|
-
const
|
|
9
|
+
const g = i.object({
|
|
9
10
|
routingNumber: u,
|
|
10
|
-
accountNumber:
|
|
11
|
+
accountNumber: n
|
|
11
12
|
});
|
|
12
|
-
function
|
|
13
|
-
const { t: r } =
|
|
13
|
+
function x() {
|
|
14
|
+
const { t: r } = m("Company.BankAccount");
|
|
14
15
|
return /* @__PURE__ */ t(a, { flexDirection: "column", gap: 20, children: [
|
|
15
16
|
/* @__PURE__ */ o(
|
|
16
17
|
e,
|
|
@@ -34,7 +35,7 @@ function g() {
|
|
|
34
35
|
] });
|
|
35
36
|
}
|
|
36
37
|
export {
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
g as BankAccountFormSchema,
|
|
39
|
+
x as Form
|
|
39
40
|
};
|
|
40
41
|
//# sourceMappingURL=Form.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountForm/Form.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useTranslation } from 'react-i18next'\nimport { accountNumberValidation, routingNumberValidation } from '@/helpers/validations'\nimport { Flex, TextInputField } from '@/components/Common'\n\nexport const BankAccountFormSchema = z.object({\n routingNumber: routingNumberValidation,\n accountNumber: accountNumberValidation,\n})\n\nexport type BankAccountFormInputs = z.infer<typeof BankAccountFormSchema>\n\nexport function Form() {\n const { t } = useTranslation('Company.BankAccount')\n\n return (\n <Flex flexDirection=\"column\" gap={20}>\n <TextInputField\n name=\"routingNumber\"\n isRequired\n label={t('form.routingNumberLabel')}\n description={t('form.routingNumberDescription')}\n errorMessage={t('validations.routingNumber')}\n />\n <TextInputField\n name=\"accountNumber\"\n label={t('form.accountNumberLabel')}\n isRequired\n errorMessage={t('validations.accountNumber')}\n />\n </Flex>\n )\n}\n"],"names":["BankAccountFormSchema","z","routingNumberValidation","accountNumberValidation","Form","t","useTranslation","jsxs","Flex","jsx","TextInputField"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Form.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountForm/Form.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useTranslation } from 'react-i18next'\nimport { accountNumberValidation, routingNumberValidation } from '@/helpers/validations'\nimport { Flex, TextInputField } from '@/components/Common'\n\nexport const BankAccountFormSchema = z.object({\n routingNumber: routingNumberValidation,\n accountNumber: accountNumberValidation,\n})\n\nexport type BankAccountFormInputs = z.infer<typeof BankAccountFormSchema>\n\nexport function Form() {\n const { t } = useTranslation('Company.BankAccount')\n\n return (\n <Flex flexDirection=\"column\" gap={20}>\n <TextInputField\n name=\"routingNumber\"\n isRequired\n label={t('form.routingNumberLabel')}\n description={t('form.routingNumberDescription')}\n errorMessage={t('validations.routingNumber')}\n />\n <TextInputField\n name=\"accountNumber\"\n label={t('form.accountNumberLabel')}\n isRequired\n errorMessage={t('validations.accountNumber')}\n />\n </Flex>\n )\n}\n"],"names":["BankAccountFormSchema","z","routingNumberValidation","accountNumberValidation","Form","t","useTranslation","jsxs","Flex","jsx","TextInputField"],"mappings":";;;;;;;;AAKO,MAAMA,IAAwBC,EAAE,OAAO;AAAA,EAC5C,eAAeC;AAAA,EACf,eAAeC;AACjB,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,YAAU;AAAA,QACV,OAAOL,EAAE,yBAAyB;AAAA,QAClC,aAAaA,EAAE,+BAA+B;AAAA,QAC9C,cAAcA,EAAE,2BAA2B;AAAA,MAAA;AAAA,IAAA;AAAA,IAE7C,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOL,EAAE,yBAAyB;AAAA,QAClC,YAAU;AAAA,QACV,cAAcA,EAAE,2BAA2B;AAAA,MAAA;AAAA,IAAA;AAAA,EAC7C,GACF;AAEJ;"}
|
|
@@ -2,19 +2,15 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-error-boundary";
|
|
4
4
|
import "react-i18next";
|
|
5
|
-
import "@gusto/embedded-api/models/errors/apierror";
|
|
6
|
-
import "@gusto/embedded-api/models/errors/sdkvalidationerror";
|
|
7
|
-
import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
|
|
8
|
-
import "@tanstack/react-query";
|
|
9
5
|
import "../../../Base/useBase.js";
|
|
10
6
|
import "../../../../shared/constants.js";
|
|
11
7
|
import "classnames";
|
|
12
8
|
import "dompurify";
|
|
13
9
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
10
|
import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
|
|
15
|
-
const [
|
|
11
|
+
const [k, x] = o("BankAccountContext");
|
|
16
12
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
x as BankAccountFormProvider,
|
|
14
|
+
k as useBankAccountForm
|
|
19
15
|
};
|
|
20
16
|
//# 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,17 +1,18 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useTranslation as
|
|
1
|
+
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as e } from "react-i18next";
|
|
3
3
|
import { useBankAccount as a } from "./context.js";
|
|
4
4
|
import "classnames";
|
|
5
|
+
import "../../../../shared/constants.js";
|
|
5
6
|
import { ActionsLayout as m } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
6
7
|
import { useComponentContext as s } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
|
-
function
|
|
8
|
-
const { handleContinue:
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
-
/* @__PURE__ */ t(o.Button, { variant: "secondary", onClick:
|
|
11
|
-
/* @__PURE__ */ t(o.Button, { onClick:
|
|
8
|
+
function k() {
|
|
9
|
+
const { handleContinue: r, handleChange: c } = a(), { t: n } = e("Company.BankAccount"), o = s();
|
|
10
|
+
return /* @__PURE__ */ i(m, { children: [
|
|
11
|
+
/* @__PURE__ */ t(o.Button, { variant: "secondary", onClick: c, children: n("changeBankAccountCta") }),
|
|
12
|
+
/* @__PURE__ */ t(o.Button, { onClick: r, children: n("continueCta") })
|
|
12
13
|
] });
|
|
13
14
|
}
|
|
14
15
|
export {
|
|
15
|
-
|
|
16
|
+
k as Actions
|
|
16
17
|
};
|
|
17
18
|
//# 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,5 +1,5 @@
|
|
|
1
1
|
import { jsx as n, jsxs as u, Fragment as f } from "react/jsx-runtime";
|
|
2
|
-
import { useBankAccountsGetSuspense as l } from "
|
|
2
|
+
import { useBankAccountsGetSuspense as l } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/bankAccountsGet.js";
|
|
3
3
|
import { Head as A } from "./Head.js";
|
|
4
4
|
import { AccountView as h } from "./AccountView.js";
|
|
5
5
|
import { BankAccountProvider as d } from "./context.js";
|
|
@@ -9,7 +9,7 @@ import { useBase as N } from "../../../Base/useBase.js";
|
|
|
9
9
|
import { useI18n as B } from "../../../../i18n/I18n.js";
|
|
10
10
|
import { Flex as _ } from "../../../Common/Flex/Flex.js";
|
|
11
11
|
import { componentEvents as c } from "../../../../shared/constants.js";
|
|
12
|
-
function
|
|
12
|
+
function U(o) {
|
|
13
13
|
return /* @__PURE__ */ n(C, { ...o, children: /* @__PURE__ */ n(k, { ...o, children: o.children }) });
|
|
14
14
|
}
|
|
15
15
|
function k({
|
|
@@ -19,7 +19,7 @@ function k({
|
|
|
19
19
|
showVerifiedMessage: m = !1
|
|
20
20
|
}) {
|
|
21
21
|
B("Company.BankAccount");
|
|
22
|
-
const { onEvent: t } = N(), { data: s } = l({ companyId: a }), i = s.
|
|
22
|
+
const { onEvent: t } = N(), { data: s } = l({ companyId: a }), i = s.companyBankAccounts, e = i.length > 0 ? i[0] : null;
|
|
23
23
|
if (!e)
|
|
24
24
|
throw new Error("No bank account found for the company.");
|
|
25
25
|
return /* @__PURE__ */ n("section", { className: o, children: /* @__PURE__ */ n(
|
|
@@ -47,6 +47,6 @@ function k({
|
|
|
47
47
|
) });
|
|
48
48
|
}
|
|
49
49
|
export {
|
|
50
|
-
|
|
50
|
+
U as BankAccountList
|
|
51
51
|
};
|
|
52
52
|
//# sourceMappingURL=BankAccountList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BankAccountList.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountList/BankAccountList.tsx"],"sourcesContent":["import { useBankAccountsGetSuspense } from '@gusto/embedded-api/react-query/bankAccountsGet'\nimport { Head } from './Head'\nimport { AccountView } from './AccountView'\nimport { BankAccountProvider } from './context'\nimport { Actions } from './Actions'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n/I18n'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { componentEvents } from '@/shared/constants'\n\ninterface BankAccountListProps extends CommonComponentInterface {\n companyId: string\n showVerifiedMessage?: boolean\n}\n\nexport function BankAccountList(props: BankAccountListProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\nfunction Root({\n className,\n children,\n companyId,\n showVerifiedMessage = false,\n}: BankAccountListProps) {\n useI18n('Company.BankAccount')\n const { onEvent } = useBase()\n const { data } = useBankAccountsGetSuspense({ companyId })\n const companyBankAccountList = data.
|
|
1
|
+
{"version":3,"file":"BankAccountList.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountList/BankAccountList.tsx"],"sourcesContent":["import { useBankAccountsGetSuspense } from '@gusto/embedded-api/react-query/bankAccountsGet'\nimport { Head } from './Head'\nimport { AccountView } from './AccountView'\nimport { BankAccountProvider } from './context'\nimport { Actions } from './Actions'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n/I18n'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { componentEvents } from '@/shared/constants'\n\ninterface BankAccountListProps extends CommonComponentInterface {\n companyId: string\n showVerifiedMessage?: boolean\n}\n\nexport function BankAccountList(props: BankAccountListProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\nfunction Root({\n className,\n children,\n companyId,\n showVerifiedMessage = false,\n}: BankAccountListProps) {\n useI18n('Company.BankAccount')\n const { onEvent } = useBase()\n const { data } = useBankAccountsGetSuspense({ companyId })\n const companyBankAccountList = data.companyBankAccounts!\n //Currently, we only support a single default bank account per company.\n const bankAccount = companyBankAccountList.length > 0 ? companyBankAccountList[0]! : null\n if (!bankAccount) {\n throw new Error('No bank account found for the company.')\n }\n const handleVerification = () => {\n onEvent(componentEvents.COMPANY_BANK_ACCOUNT_VERIFY, bankAccount)\n }\n const handleContinue = () => {\n onEvent(componentEvents.COMPANY_BANK_ACCOUNT_DONE)\n }\n const handleChange = () => {\n onEvent(componentEvents.COMPANY_BANK_ACCOUNT_CHANGE)\n }\n\n return (\n <section className={className}>\n <BankAccountProvider\n value={{\n bankAccount,\n showVerifiedMessage,\n handleVerification,\n handleContinue,\n handleChange,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <AccountView />\n <Actions />\n </>\n )}\n </Flex>\n </BankAccountProvider>\n </section>\n )\n}\n"],"names":["BankAccountList","props","jsx","BaseComponent","Root","className","children","companyId","showVerifiedMessage","useI18n","onEvent","useBase","data","useBankAccountsGetSuspense","companyBankAccountList","bankAccount","BankAccountProvider","componentEvents","Flex","jsxs","Fragment","Head","AccountView","Actions"],"mappings":";;;;;;;;;;;AAiBO,SAASA,EAAgBC,GAAsD;AACpF,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AACA,SAASG,EAAK;AAAA,EACZ,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,qBAAAC,IAAsB;AACxB,GAAyB;AACvB,EAAAC,EAAQ,qBAAqB;AAC7B,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GACd,EAAE,MAAAC,EAAA,IAASC,EAA2B,EAAE,WAAAN,GAAW,GACnDO,IAAyBF,EAAK,qBAE9BG,IAAcD,EAAuB,SAAS,IAAIA,EAAuB,CAAC,IAAK;AACrF,MAAI,CAACC;AACH,UAAM,IAAI,MAAM,wCAAwC;AAY1D,SACE,gBAAAb,EAAC,aAAQ,WAAAG,GACP,UAAA,gBAAAH;AAAA,IAACc;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,aAAAD;AAAA,QACA,qBAAAP;AAAA,QACA,oBAhBmB,MAAM;AAC/B,UAAAE,EAAQO,EAAgB,6BAA6BF,CAAW;AAAA,QAClE;AAAA,QAeQ,gBAde,MAAM;AAC3B,UAAAL,EAAQO,EAAgB,yBAAyB;AAAA,QACnD;AAAA,QAaQ,cAZa,MAAM;AACzB,UAAAP,EAAQO,EAAgB,2BAA2B;AAAA,QACrD;AAAA,MAUQ;AAAA,MAGF,UAAA,gBAAAf,EAACgB,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAAZ,KAGC,gBAAAa,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAlB,EAACmB,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAY;AAAA,0BACZC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX,EAAA,CAEJ;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { useBankAccountVerify as
|
|
1
|
+
import { jsxs as r, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as c } from "react-i18next";
|
|
3
|
+
import { useBankAccountVerify as e } from "./context.js";
|
|
4
4
|
import "classnames";
|
|
5
|
+
import "../../../../shared/constants.js";
|
|
5
6
|
import { ActionsLayout as s } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
6
7
|
import { useComponentContext as m } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
|
-
function
|
|
8
|
-
const { t } =
|
|
9
|
-
return /* @__PURE__ */
|
|
8
|
+
function k() {
|
|
9
|
+
const { t } = c("Company.BankAccount"), { isPending: n, handleCancel: a } = e(), o = m();
|
|
10
|
+
return /* @__PURE__ */ r(s, { children: [
|
|
10
11
|
/* @__PURE__ */ i(
|
|
11
12
|
o.Button,
|
|
12
13
|
{
|
|
@@ -29,6 +30,6 @@ function C() {
|
|
|
29
30
|
] });
|
|
30
31
|
}
|
|
31
32
|
export {
|
|
32
|
-
|
|
33
|
+
k as Actions
|
|
33
34
|
};
|
|
34
35
|
//# 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","useTranslation","isPending","handleCancel","useBankAccountVerify","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,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;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o, jsxs as y, Fragment as B } from "react/jsx-runtime";
|
|
2
2
|
import { useForm as k, FormProvider as v } from "react-hook-form";
|
|
3
|
-
import { zodResolver as C } from "
|
|
4
|
-
import { useBankAccountsVerifyMutation as F } from "
|
|
3
|
+
import { zodResolver as C } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@hookform/resolvers/zod/dist/zod.mjs";
|
|
4
|
+
import { useBankAccountsVerifyMutation as F } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/bankAccountsVerify.js";
|
|
5
5
|
import { Head as b } from "./Head.js";
|
|
6
6
|
import { BankAccountVerifyProvider as V } from "./context.js";
|
|
7
7
|
import { BankAccountVerifySchema as x, Form as E } from "./Form.js";
|
|
@@ -3,12 +3,13 @@ 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
5
|
import "classnames";
|
|
6
|
+
import "../../../../shared/constants.js";
|
|
6
7
|
import { NumberInputField as i } from "../../../Common/Fields/NumberInputField/NumberInputField.js";
|
|
7
|
-
const
|
|
8
|
+
const f = o.object({
|
|
8
9
|
deposit1: o.number().min(0),
|
|
9
10
|
deposit2: o.number().min(0)
|
|
10
11
|
});
|
|
11
|
-
function
|
|
12
|
+
function b() {
|
|
12
13
|
const { t: e } = n("Company.BankAccount");
|
|
13
14
|
return /* @__PURE__ */ t(s, { flexDirection: "column", gap: 20, children: [
|
|
14
15
|
/* @__PURE__ */ r(
|
|
@@ -36,7 +37,7 @@ function f() {
|
|
|
36
37
|
] });
|
|
37
38
|
}
|
|
38
39
|
export {
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
f as BankAccountVerifySchema,
|
|
41
|
+
b as Form
|
|
41
42
|
};
|
|
42
43
|
//# 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;"}
|
|
@@ -2,13 +2,14 @@ import { jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import { useTranslation as m } from "react-i18next";
|
|
3
3
|
import { useDocumentList as e } from "./useDocumentList.js";
|
|
4
4
|
import "classnames";
|
|
5
|
+
import "../../../../shared/constants.js";
|
|
5
6
|
import { ActionsLayout as s } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
6
7
|
import { useComponentContext as c } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
|
-
function
|
|
8
|
+
function h({ continueCtaLabel: t }) {
|
|
8
9
|
const { t: n } = m("Company.DocumentList"), { handleContinue: i } = e(), r = c();
|
|
9
10
|
return /* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(r.Button, { onClick: i, children: t || n("continueCta") }) });
|
|
10
11
|
}
|
|
11
12
|
export {
|
|
12
|
-
|
|
13
|
+
h as Actions
|
|
13
14
|
};
|
|
14
15
|
//# 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;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as o, jsxs as d, Fragment as g } from "react/jsx-runtime";
|
|
2
|
-
import { useCompanyFormsGetAllSuspense as h } from "
|
|
3
|
-
import { useSignatoriesListSuspense as S } from "
|
|
2
|
+
import { useCompanyFormsGetAllSuspense as h } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/companyFormsGetAll.js";
|
|
3
|
+
import { useSignatoriesListSuspense as S } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/signatoriesList.js";
|
|
4
4
|
import { Head as C } from "./Head.js";
|
|
5
5
|
import { List as F } from "./List.js";
|
|
6
6
|
import { ManageSignatories as O } from "./ManageSignatories.js";
|
|
@@ -10,13 +10,12 @@ import { useI18n as L } from "../../../../i18n/I18n.js";
|
|
|
10
10
|
import { BaseComponent as M } from "../../../Base/Base.js";
|
|
11
11
|
import { useBase as R } from "../../../Base/useBase.js";
|
|
12
12
|
import { Flex as A } from "../../../Common/Flex/Flex.js";
|
|
13
|
-
import "react-i18next";
|
|
14
13
|
import "classnames";
|
|
15
14
|
import { companyEvents as e } from "../../../../shared/constants.js";
|
|
16
|
-
function
|
|
15
|
+
function w(n) {
|
|
17
16
|
return /* @__PURE__ */ o(M, { ...n, children: /* @__PURE__ */ o(D, { ...n, children: n.children }) });
|
|
18
17
|
}
|
|
19
|
-
function D({ companyId: n, signatoryId: i, className:
|
|
18
|
+
function D({ companyId: n, signatoryId: i, className: m, children: s }) {
|
|
20
19
|
L("Company.DocumentList");
|
|
21
20
|
const { onEvent: t } = R(), {
|
|
22
21
|
data: { formList: a },
|
|
@@ -24,11 +23,11 @@ function D({ companyId: n, signatoryId: i, className: s, children: m }) {
|
|
|
24
23
|
} = h({
|
|
25
24
|
companyId: n
|
|
26
25
|
}), u = a, {
|
|
27
|
-
data: { signatoryList:
|
|
26
|
+
data: { signatoryList: l }
|
|
28
27
|
} = S({
|
|
29
28
|
companyUuid: n
|
|
30
|
-
}), r =
|
|
31
|
-
return /* @__PURE__ */ o("section", { className:
|
|
29
|
+
}), r = l[0], p = !!i && r?.uuid === i;
|
|
30
|
+
return /* @__PURE__ */ o("section", { className: m, children: /* @__PURE__ */ o(
|
|
32
31
|
y,
|
|
33
32
|
{
|
|
34
33
|
value: {
|
|
@@ -43,10 +42,10 @@ function D({ companyId: n, signatoryId: i, className: s, children: m }) {
|
|
|
43
42
|
handleContinue: () => {
|
|
44
43
|
t(e.COMPANY_FORMS_DONE);
|
|
45
44
|
},
|
|
46
|
-
isSelfSignatory:
|
|
45
|
+
isSelfSignatory: p,
|
|
47
46
|
signatory: r
|
|
48
47
|
},
|
|
49
|
-
children: /* @__PURE__ */ o(A, { flexDirection: "column", gap: 32, children:
|
|
48
|
+
children: /* @__PURE__ */ o(A, { flexDirection: "column", gap: 32, children: s || /* @__PURE__ */ d(g, { children: [
|
|
50
49
|
/* @__PURE__ */ o(C, {}),
|
|
51
50
|
/* @__PURE__ */ o(O, {}),
|
|
52
51
|
/* @__PURE__ */ o(F, {}),
|
|
@@ -56,6 +55,6 @@ function D({ companyId: n, signatoryId: i, className: s, children: m }) {
|
|
|
56
55
|
) });
|
|
57
56
|
}
|
|
58
57
|
export {
|
|
59
|
-
|
|
58
|
+
w as DocumentList
|
|
60
59
|
};
|
|
61
60
|
//# 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 } from '@/i18n'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common'\nimport { companyEvents } from '@/shared/constants'\n\ninterface DocumentListProps extends BaseComponentInterface<'Company.DocumentList'> {\n companyId: string\n signatoryId?: string\n}\n\nexport function DocumentList(props: DocumentListProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, signatoryId, className, children }: DocumentListProps) {\n useI18n('Company.DocumentList')\n const { onEvent } = useBase()\n\n const {\n data: { formList },\n error: documentListError,\n } = useCompanyFormsGetAllSuspense({\n companyId,\n })\n const companyForms = formList!\n\n const {\n data: { signatoryList },\n } = useSignatoriesListSuspense({\n companyUuid: companyId,\n })\n const signatories = signatoryList!\n\n // For now, this will only ever have one entry for the current signatory since companies can\n // only have one signatory. If that changes in the future, this UX will need to be revisited.\n const signatory = signatories[0]\n const isSelfSignatory = !!signatoryId && signatory?.uuid === signatoryId\n\n const handleRequestFormToSign = (form: FormSchema) => {\n onEvent(companyEvents.COMPANY_VIEW_FORM_TO_SIGN, form)\n }\n\n const handleChangeSignatory = () => {\n onEvent(companyEvents.COMPANY_FORM_EDIT_SIGNATORY, signatory)\n }\n\n const handleContinue = () => {\n onEvent(companyEvents.COMPANY_FORMS_DONE)\n }\n\n return (\n <section className={className}>\n <DocumentListProvider\n value={{\n companyForms,\n documentListError,\n handleRequestFormToSign,\n handleChangeSignatory,\n handleContinue,\n isSelfSignatory,\n signatory,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <ManageSignatories />\n <List />\n <Actions />\n </>\n )}\n </Flex>\n </DocumentListProvider>\n </section>\n )\n}\n"],"names":["DocumentList","props","jsx","BaseComponent","Root","companyId","signatoryId","className","children","useI18n","onEvent","useBase","formList","documentListError","useCompanyFormsGetAllSuspense","companyForms","signatoryList","useSignatoriesListSuspense","signatory","isSelfSignatory","DocumentListProvider","form","companyEvents","Flex","jsxs","Fragment","Head","ManageSignatories","List","Actions"],"mappings":"
|
|
1
|
+
{"version":3,"file":"DocumentList.js","sources":["../../../../../src/components/Company/DocumentSigner/DocumentList/DocumentList.tsx"],"sourcesContent":["import { type Form as FormSchema } from '@gusto/embedded-api/models/components/form'\nimport { useCompanyFormsGetAllSuspense } from '@gusto/embedded-api/react-query/companyFormsGetAll'\nimport { useSignatoriesListSuspense } from '@gusto/embedded-api/react-query/signatoriesList'\nimport { Head } from './Head'\nimport { List } from './List'\nimport { ManageSignatories } from './ManageSignatories'\nimport { Actions } from './Actions'\nimport { DocumentListProvider } from './useDocumentList'\nimport { useI18n } from '@/i18n'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common'\nimport { companyEvents } from '@/shared/constants'\n\ninterface DocumentListProps extends BaseComponentInterface<'Company.DocumentList'> {\n companyId: string\n signatoryId?: string\n}\n\nexport function DocumentList(props: DocumentListProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, signatoryId, className, children }: DocumentListProps) {\n useI18n('Company.DocumentList')\n const { onEvent } = useBase()\n\n const {\n data: { formList },\n error: documentListError,\n } = useCompanyFormsGetAllSuspense({\n companyId,\n })\n const companyForms = formList!\n\n const {\n data: { signatoryList },\n } = useSignatoriesListSuspense({\n companyUuid: companyId,\n })\n const signatories = signatoryList!\n\n // For now, this will only ever have one entry for the current signatory since companies can\n // only have one signatory. If that changes in the future, this UX will need to be revisited.\n const signatory = signatories[0]\n const isSelfSignatory = !!signatoryId && signatory?.uuid === signatoryId\n\n const handleRequestFormToSign = (form: FormSchema) => {\n onEvent(companyEvents.COMPANY_VIEW_FORM_TO_SIGN, form)\n }\n\n const handleChangeSignatory = () => {\n onEvent(companyEvents.COMPANY_FORM_EDIT_SIGNATORY, signatory)\n }\n\n const handleContinue = () => {\n onEvent(companyEvents.COMPANY_FORMS_DONE)\n }\n\n return (\n <section className={className}>\n <DocumentListProvider\n value={{\n companyForms,\n documentListError,\n handleRequestFormToSign,\n handleChangeSignatory,\n handleContinue,\n isSelfSignatory,\n signatory,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <ManageSignatories />\n <List />\n <Actions />\n </>\n )}\n </Flex>\n </DocumentListProvider>\n </section>\n )\n}\n"],"names":["DocumentList","props","jsx","BaseComponent","Root","companyId","signatoryId","className","children","useI18n","onEvent","useBase","formList","documentListError","useCompanyFormsGetAllSuspense","companyForms","signatoryList","useSignatoriesListSuspense","signatory","isSelfSignatory","DocumentListProvider","form","companyEvents","Flex","jsxs","Fragment","Head","ManageSignatories","List","Actions"],"mappings":";;;;;;;;;;;;;;AAmBO,SAASA,EAAaC,GAA0B;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,KAA+B;AAChF,EAAAC,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,WAAAT;AAAA,EAAA,CACD,GACKU,IAAeH,GAEf;AAAA,IACJ,MAAM,EAAE,eAAAI,EAAA;AAAA,EAAc,IACpBC,EAA2B;AAAA,IAC7B,aAAaZ;AAAA,EAAA,CACd,GAKKa,IAJcF,EAIU,CAAC,GACzBG,IAAkB,CAAC,CAACb,KAAeY,GAAW,SAASZ;AAc7D,SACE,gBAAAJ,EAAC,aAAQ,WAAAK,GACP,UAAA,gBAAAL;AAAA,IAACkB;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,cAAAL;AAAA,QACA,mBAAAF;AAAA,QACA,yBAlBwB,CAACQ,MAAqB;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,gBAAAhB,EAACqB,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAAf,KAGC,gBAAAgB,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAvB,EAACwB,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;"}
|
|
@@ -2,21 +2,17 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-error-boundary";
|
|
4
4
|
import "react-i18next";
|
|
5
|
-
import "@gusto/embedded-api/models/errors/apierror";
|
|
6
|
-
import "@gusto/embedded-api/models/errors/sdkvalidationerror";
|
|
7
|
-
import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
|
|
8
|
-
import "@tanstack/react-query";
|
|
9
5
|
import "../../../Base/useBase.js";
|
|
10
6
|
import "../../../../shared/constants.js";
|
|
11
7
|
import "classnames";
|
|
12
8
|
import "dompurify";
|
|
13
9
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
10
|
import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
|
|
15
|
-
const [
|
|
11
|
+
const [C, x] = t(
|
|
16
12
|
"CompanyDocumentListContext"
|
|
17
13
|
);
|
|
18
14
|
export {
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
x as DocumentListProvider,
|
|
16
|
+
C as useDocumentList
|
|
21
17
|
};
|
|
22
18
|
//# 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;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { createMachine as u } from "robot3";
|
|
3
|
-
import { useSignatoriesListSuspense as a } from "
|
|
3
|
+
import { useSignatoriesListSuspense as a } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/signatoriesList.js";
|
|
4
4
|
import { useMemo as p } from "react";
|
|
5
5
|
import { DocumentList as g, AssignSignatory as f } from "./documentSignerStateMachine.js";
|
|
6
6
|
import { documentSignerMachine as S } from "./stateMachine.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o, jsxs as S, Fragment as g } from "react/jsx-runtime";
|
|
2
|
-
import { useCompanyFormsGetSuspense as C } from "
|
|
3
|
-
import { useCompanyFormsSignMutation as h } from "
|
|
4
|
-
import { useCompanyFormsGetPdfSuspense as y } from "
|
|
2
|
+
import { useCompanyFormsGetSuspense as C } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/companyFormsGet.js";
|
|
3
|
+
import { useCompanyFormsSignMutation as h } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/companyFormsSign.js";
|
|
4
|
+
import { useCompanyFormsGetPdfSuspense as y } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/companyFormsGetPdf.js";
|
|
5
5
|
import { Head as N } from "./Head.js";
|
|
6
6
|
import { Preview as P } from "./Preview.js";
|
|
7
7
|
import { Form as _ } from "./Form.js";
|
|
@@ -12,10 +12,9 @@ import { BaseComponent as x } from "../../../Base/Base.js";
|
|
|
12
12
|
import { useBase as A } from "../../../Base/useBase.js";
|
|
13
13
|
import { SignatureForm as v } from "../../../Common/SignatureForm/SignatureForm.js";
|
|
14
14
|
import { Flex as G } from "../../../Common/Flex/Flex.js";
|
|
15
|
-
import "react-i18next";
|
|
16
15
|
import "classnames";
|
|
17
16
|
import { companyEvents as t } from "../../../../shared/constants.js";
|
|
18
|
-
function
|
|
17
|
+
function W(r) {
|
|
19
18
|
return /* @__PURE__ */ o(x, { ...r, children: /* @__PURE__ */ o(R, { ...r, children: r.children }) });
|
|
20
19
|
}
|
|
21
20
|
function R({ formId: r, children: e, dictionary: i }) {
|
|
@@ -24,11 +23,11 @@ function R({ formId: r, children: e, dictionary: i }) {
|
|
|
24
23
|
data: { form: s }
|
|
25
24
|
} = C({
|
|
26
25
|
formId: r
|
|
27
|
-
}), u = s, { isPending: c, mutateAsync:
|
|
28
|
-
data: { formPdf:
|
|
26
|
+
}), u = s, { isPending: c, mutateAsync: f } = h(), {
|
|
27
|
+
data: { formPdf: p }
|
|
29
28
|
} = y({
|
|
30
29
|
formId: r
|
|
31
|
-
}), l =
|
|
30
|
+
}), l = p.documentUrl;
|
|
32
31
|
return /* @__PURE__ */ o(
|
|
33
32
|
M,
|
|
34
33
|
{
|
|
@@ -42,7 +41,7 @@ function R({ formId: r, children: e, dictionary: i }) {
|
|
|
42
41
|
},
|
|
43
42
|
children: /* @__PURE__ */ o(v, { onSubmit: async (d) => {
|
|
44
43
|
await a(d, async (m) => {
|
|
45
|
-
const F = await
|
|
44
|
+
const F = await f({
|
|
46
45
|
request: {
|
|
47
46
|
formId: r,
|
|
48
47
|
requestBody: {
|
|
@@ -64,6 +63,6 @@ function R({ formId: r, children: e, dictionary: i }) {
|
|
|
64
63
|
}
|
|
65
64
|
export {
|
|
66
65
|
R as Root,
|
|
67
|
-
|
|
66
|
+
W as SignatureForm
|
|
68
67
|
};
|
|
69
68
|
//# sourceMappingURL=SignatureForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignatureForm.js","sources":["../../../../../src/components/Company/DocumentSigner/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { useCompanyFormsGetSuspense } from '@gusto/embedded-api/react-query/companyFormsGet'\nimport { useCompanyFormsSignMutation } from '@gusto/embedded-api/react-query/companyFormsSign'\nimport { useCompanyFormsGetPdfSuspense } from '@gusto/embedded-api/react-query/companyFormsGetPdf'\nimport { Head } from './Head'\nimport { Preview } from './Preview'\nimport { Form } from './Form'\nimport { Actions } from './Actions'\nimport { SignatureFormProvider } from './useSignatureForm'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport {\n SignatureForm as SharedSignatureForm,\n type SignatureFormInputs,\n} from '@/components/Common/SignatureForm'\nimport { Flex } from '@/components/Common'\nimport { companyEvents } from '@/shared/constants'\n\ninterface SignatureFormProps extends BaseComponentInterface<'Company.SignatureForm'> {\n formId: string\n companyId: string\n}\n\nexport function SignatureForm(props: SignatureFormProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nexport function Root({ formId, children, dictionary }: SignatureFormProps) {\n useComponentDictionary('Company.SignatureForm', dictionary)\n useI18n('Company.SignatureForm')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const {\n data: { form: formNullable },\n } = useCompanyFormsGetSuspense({\n formId,\n })\n const form = formNullable!\n\n const { isPending, mutateAsync: signForm } = useCompanyFormsSignMutation()\n\n const {\n data: { formPdf },\n } = useCompanyFormsGetPdfSuspense({\n formId,\n })\n const pdfUrl = formPdf!.documentUrl!\n\n const handleSubmit = async (data: SignatureFormInputs) => {\n await baseSubmitHandler(data, async payload => {\n const signFormResponse = await signForm({\n request: {\n formId,\n requestBody: {\n signatureText: payload.signature,\n agree: payload.confirmSignature,\n },\n },\n })\n\n onEvent(companyEvents.COMPANY_SIGN_FORM, signFormResponse.form)\n\n onEvent(companyEvents.COMPANY_SIGN_FORM_DONE)\n })\n }\n\n const handleBack = () => {\n onEvent(companyEvents.COMPANY_SIGN_FORM_BACK)\n }\n\n return (\n <SignatureFormProvider\n value={{\n form,\n pdfUrl,\n isPending,\n onBack: handleBack,\n }}\n >\n <SharedSignatureForm onSubmit={handleSubmit}>\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Preview />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </SharedSignatureForm>\n </SignatureFormProvider>\n )\n}\n"],"names":["SignatureForm","props","jsx","BaseComponent","Root","formId","children","dictionary","useComponentDictionary","useI18n","onEvent","baseSubmitHandler","useBase","formNullable","useCompanyFormsGetSuspense","form","isPending","signForm","useCompanyFormsSignMutation","formPdf","useCompanyFormsGetPdfSuspense","pdfUrl","SignatureFormProvider","companyEvents","SharedSignatureForm","data","payload","signFormResponse","Flex","jsxs","Fragment","Head","Preview","Form","Actions"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SignatureForm.js","sources":["../../../../../src/components/Company/DocumentSigner/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { useCompanyFormsGetSuspense } from '@gusto/embedded-api/react-query/companyFormsGet'\nimport { useCompanyFormsSignMutation } from '@gusto/embedded-api/react-query/companyFormsSign'\nimport { useCompanyFormsGetPdfSuspense } from '@gusto/embedded-api/react-query/companyFormsGetPdf'\nimport { Head } from './Head'\nimport { Preview } from './Preview'\nimport { Form } from './Form'\nimport { Actions } from './Actions'\nimport { SignatureFormProvider } from './useSignatureForm'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport {\n SignatureForm as SharedSignatureForm,\n type SignatureFormInputs,\n} from '@/components/Common/SignatureForm'\nimport { Flex } from '@/components/Common'\nimport { companyEvents } from '@/shared/constants'\n\ninterface SignatureFormProps extends BaseComponentInterface<'Company.SignatureForm'> {\n formId: string\n companyId: string\n}\n\nexport function SignatureForm(props: SignatureFormProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nexport function Root({ formId, children, dictionary }: SignatureFormProps) {\n useComponentDictionary('Company.SignatureForm', dictionary)\n useI18n('Company.SignatureForm')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const {\n data: { form: formNullable },\n } = useCompanyFormsGetSuspense({\n formId,\n })\n const form = formNullable!\n\n const { isPending, mutateAsync: signForm } = useCompanyFormsSignMutation()\n\n const {\n data: { formPdf },\n } = useCompanyFormsGetPdfSuspense({\n formId,\n })\n const pdfUrl = formPdf!.documentUrl!\n\n const handleSubmit = async (data: SignatureFormInputs) => {\n await baseSubmitHandler(data, async payload => {\n const signFormResponse = await signForm({\n request: {\n formId,\n requestBody: {\n signatureText: payload.signature,\n agree: payload.confirmSignature,\n },\n },\n })\n\n onEvent(companyEvents.COMPANY_SIGN_FORM, signFormResponse.form)\n\n onEvent(companyEvents.COMPANY_SIGN_FORM_DONE)\n })\n }\n\n const handleBack = () => {\n onEvent(companyEvents.COMPANY_SIGN_FORM_BACK)\n }\n\n return (\n <SignatureFormProvider\n value={{\n form,\n pdfUrl,\n isPending,\n onBack: handleBack,\n }}\n >\n <SharedSignatureForm onSubmit={handleSubmit}>\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Preview />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </SharedSignatureForm>\n </SignatureFormProvider>\n )\n}\n"],"names":["SignatureForm","props","jsx","BaseComponent","Root","formId","children","dictionary","useComponentDictionary","useI18n","onEvent","baseSubmitHandler","useBase","formNullable","useCompanyFormsGetSuspense","form","isPending","signForm","useCompanyFormsSignMutation","formPdf","useCompanyFormsGetPdfSuspense","pdfUrl","SignatureFormProvider","companyEvents","SharedSignatureForm","data","payload","signFormResponse","Flex","jsxs","Fragment","Head","Preview","Form","Actions"],"mappings":";;;;;;;;;;;;;;;;AAwBO,SAASA,EAAcC,GAA2B;AACvD,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEO,SAASG,EAAK,EAAE,QAAAC,GAAQ,UAAAC,GAAU,YAAAC,KAAkC;AACzE,EAAAC,EAAuB,yBAAyBD,CAAU,GAC1DE,EAAQ,uBAAuB;AAC/B,QAAM,EAAE,SAAAC,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GAEjC;AAAA,IACJ,MAAM,EAAE,MAAMC,EAAA;AAAA,EAAa,IACzBC,EAA2B;AAAA,IAC7B,QAAAT;AAAA,EAAA,CACD,GACKU,IAAOF,GAEP,EAAE,WAAAG,GAAW,aAAaC,EAAA,IAAaC,EAAA,GAEvC;AAAA,IACJ,MAAM,EAAE,SAAAC,EAAA;AAAA,EAAQ,IACdC,EAA8B;AAAA,IAChC,QAAAf;AAAA,EAAA,CACD,GACKgB,IAASF,EAAS;AAwBxB,SACE,gBAAAjB;AAAA,IAACoB;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,MAAAP;AAAA,QACA,QAAAM;AAAA,QACA,WAAAL;AAAA,QACA,QAVa,MAAM;AACvB,UAAAN,EAAQa,EAAc,sBAAsB;AAAA,QAC9C;AAAA,MAQc;AAAA,MAGV,UAAA,gBAAArB,EAACsB,GAAA,EAAoB,UA/BJ,OAAOC,MAA8B;AACxD,cAAMd,EAAkBc,GAAM,OAAMC,MAAW;AAC7C,gBAAMC,IAAmB,MAAMV,EAAS;AAAA,YACtC,SAAS;AAAA,cACP,QAAAZ;AAAA,cACA,aAAa;AAAA,gBACX,eAAeqB,EAAQ;AAAA,gBACvB,OAAOA,EAAQ;AAAA,cAAA;AAAA,YACjB;AAAA,UACF,CACD;AAED,UAAAhB,EAAQa,EAAc,mBAAmBI,EAAiB,IAAI,GAE9DjB,EAAQa,EAAc,sBAAsB;AAAA,QAC9C,CAAC;AAAA,MACH,GAgBM,UAAA,gBAAArB,EAAC0B,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UAAAtB,KAGC,gBAAAuB,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAA5B,EAAC6B,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAQ;AAAA,0BACRC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX,GAEJ,EAAA,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -2,21 +2,17 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-error-boundary";
|
|
4
4
|
import "react-i18next";
|
|
5
|
-
import "@gusto/embedded-api/models/errors/apierror";
|
|
6
|
-
import "@gusto/embedded-api/models/errors/sdkvalidationerror";
|
|
7
|
-
import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
|
|
8
|
-
import "@tanstack/react-query";
|
|
9
5
|
import "../../../Base/useBase.js";
|
|
10
6
|
import "../../../../shared/constants.js";
|
|
11
7
|
import "classnames";
|
|
12
8
|
import "dompurify";
|
|
13
9
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
10
|
import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
|
|
15
|
-
const [
|
|
11
|
+
const [g, x] = o(
|
|
16
12
|
"CompanySignatureFormContext"
|
|
17
13
|
);
|
|
18
14
|
export {
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
x as SignatureFormProvider,
|
|
16
|
+
g as useSignatureForm
|
|
21
17
|
};
|
|
22
18
|
//# sourceMappingURL=useSignatureForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSignatureForm.js","sources":["../../../../../src/components/Company/DocumentSigner/SignatureForm/useSignatureForm.ts"],"sourcesContent":["import { type Form as FormSchema } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype SignatureFormContextType = {\n form: FormSchema\n pdfUrl?: string | null\n isPending: boolean\n onBack: () => void\n}\n\nconst [useSignatureForm, SignatureFormProvider] = createCompoundContext<SignatureFormContextType>(\n 'CompanySignatureFormContext',\n)\n\nexport { useSignatureForm, SignatureFormProvider }\n"],"names":["useSignatureForm","SignatureFormProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useSignatureForm.js","sources":["../../../../../src/components/Company/DocumentSigner/SignatureForm/useSignatureForm.ts"],"sourcesContent":["import { type Form as FormSchema } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype SignatureFormContextType = {\n form: FormSchema\n pdfUrl?: string | null\n isPending: boolean\n onBack: () => void\n}\n\nconst [useSignatureForm, SignatureFormProvider] = createCompoundContext<SignatureFormContextType>(\n 'CompanySignatureFormContext',\n)\n\nexport { useSignatureForm, SignatureFormProvider }\n"],"names":["useSignatureForm","SignatureFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;AAUA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as
|
|
2
|
+
import { useTranslation as e } from "react-i18next";
|
|
3
3
|
import { useFederalTaxes as i } from "./useFederalTaxes.js";
|
|
4
4
|
import "classnames";
|
|
5
|
+
import "../../../shared/constants.js";
|
|
5
6
|
import { ActionsLayout as s } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
6
7
|
import { useComponentContext as m } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
|
-
const
|
|
8
|
-
const { t } =
|
|
9
|
-
return /* @__PURE__ */ o(s, { children: /* @__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") }) });
|
|
10
11
|
};
|
|
11
12
|
export {
|
|
12
|
-
|
|
13
|
+
x as Actions
|
|
13
14
|
};
|
|
14
15
|
//# sourceMappingURL=Actions.js.map
|