@gusto/embedded-react-sdk 0.25.0 → 0.26.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 +49 -0
- package/dist/assets/icons/icon-file-jpg.svg.js +10 -0
- package/dist/assets/icons/icon-file-jpg.svg.js.map +1 -0
- package/dist/assets/icons/icon-file-pdf.svg.js +10 -0
- package/dist/assets/icons/icon-file-pdf.svg.js.map +1 -0
- package/dist/assets/icons/icon-file-png.svg.js +10 -0
- package/dist/assets/icons/icon-file-png.svg.js.map +1 -0
- package/dist/assets/icons/icon-trashcan.svg.js +10 -0
- package/dist/assets/icons/icon-trashcan.svg.js.map +1 -0
- package/dist/components/Base/Base.js +12 -13
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.js +10 -12
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +3 -4
- package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +6 -7
- package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.js +10 -10
- package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.module.scss.js +14 -14
- package/dist/components/Common/UI/Badge/Badge.module.scss.js +1 -1
- package/dist/components/Common/UI/Banner/Banner.module.scss.js +4 -4
- package/dist/components/Common/UI/ComboBox/ComboBox.module.scss.js +6 -6
- package/dist/components/Common/UI/FileInput/FileInput.js +105 -106
- package/dist/components/Common/UI/FileInput/FileInput.js.map +1 -1
- package/dist/components/Common/UI/FileInput/FileInput.module.scss.js +30 -28
- package/dist/components/Common/UI/FileInput/FileInput.module.scss.js.map +1 -1
- package/dist/components/Common/UI/Input/Input.module.scss.js +7 -7
- package/dist/components/Common/UI/List/List.module.scss.js +1 -1
- package/dist/components/Common/UI/Modal/Modal.js +41 -40
- package/dist/components/Common/UI/Modal/Modal.js.map +1 -1
- package/dist/components/Common/UI/Modal/Modal.module.scss.js +4 -4
- package/dist/components/Common/UI/Select/Select.module.scss.js +6 -6
- package/dist/components/Common/UI/TextArea/TextArea.module.scss.js +4 -4
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +2 -3
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +2 -3
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +2 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +5 -6
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +2 -3
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +4 -5
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +3 -4
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +8 -9
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +4 -6
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +2 -3
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +6 -7
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -6
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +2 -3
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +8 -9
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +3 -4
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +6 -7
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +3 -4
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +2 -4
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +1 -1
- package/dist/components/Company/Industry/Actions.js +7 -8
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +1 -1
- package/dist/components/Company/Industry/Edit.js +2 -3
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +6 -7
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +4 -5
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +3 -4
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +2 -3
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +6 -7
- 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 +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +10 -12
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +6 -8
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +7 -8
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +3 -4
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +2 -3
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +9 -10
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +11 -13
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +13 -15
- package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.js +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +2 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +2 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +2 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +1 -1
- package/dist/components/Contractor/Address/Address.js +4 -5
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +6 -7
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +1 -1
- package/dist/components/Contractor/ContractorList/index.js +31 -32
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +13 -14
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +10 -11
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -3
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +102 -88
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +2 -4
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +13 -14
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.d.ts +8 -0
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +58 -0
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -0
- package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.d.ts +6 -0
- package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.js +18 -0
- package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.js.map +1 -0
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +3 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +86 -56
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.d.ts +2 -0
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +35 -22
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.d.ts +1 -0
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js +82 -65
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +9 -11
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +6 -8
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.d.ts +8 -0
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js +45 -0
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.d.ts +15 -0
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +125 -0
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentSummary/index.d.ts +3 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +37 -28
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.d.ts +5 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +52 -49
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Profile/useContractorProfile.js +2 -3
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +20 -21
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Employee/Compensation/Actions.js +12 -13
- package/dist/components/Employee/Compensation/Actions.js.map +1 -1
- package/dist/components/Employee/Compensation/Edit.js +2 -3
- package/dist/components/Employee/Compensation/Edit.js.map +1 -1
- package/dist/components/Employee/Compensation/List.js +22 -23
- package/dist/components/Employee/Compensation/List.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +2 -2
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +2 -2
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +2 -2
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +3 -4
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +2 -3
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +2 -3
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +2 -3
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -4
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +2 -3
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +1 -1
- package/dist/components/Employee/EmployeeList/Actions.js +6 -7
- package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js +3 -4
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Head.js +5 -7
- package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
- package/dist/components/Employee/EmployeeList/List.js +2 -3
- package/dist/components/Employee/EmployeeList/List.js.map +1 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +1 -1
- package/dist/components/Employee/EmploymentEligibility/EmploymentEligibility.d.ts +3 -0
- package/dist/components/Employee/EmploymentEligibility/EmploymentEligibilityPresentation.d.ts +37 -0
- package/dist/components/Employee/EmploymentEligibility/index.d.ts +4 -0
- package/dist/components/Employee/FederalTaxes/Actions.js +5 -6
- package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.js +4 -5
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +1 -1
- package/dist/components/Employee/Landing/Landing.js +10 -11
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
- package/dist/components/Employee/PaymentMethod/Actions.js +5 -6
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +2 -3
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +2 -3
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +5 -6
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +2 -3
- package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +1 -1
- package/dist/components/Employee/Profile/Actions.js +5 -6
- package/dist/components/Employee/Profile/Actions.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +4 -5
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/HomeAddress.js +8 -9
- package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +8 -9
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.js +1 -1
- package/dist/components/Employee/StateTaxes/Actions.js +5 -6
- package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +1 -1
- package/dist/components/Employee/Taxes/Actions.js +6 -7
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +6 -7
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +1 -1
- package/dist/components/Flow/Flow.js +7 -9
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestForm/InformationRequestForm.d.ts +4 -4
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +162 -0
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -0
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.module.scss.js +20 -0
- package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestForm/InformationRequestForm.module.scss.js.map +1 -1
- package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestList/InformationRequestList.d.ts +3 -2
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +96 -0
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -0
- package/dist/components/InformationRequests/InformationRequests.d.ts +7 -0
- package/dist/components/InformationRequests/InformationRequests.js +68 -0
- package/dist/components/InformationRequests/InformationRequests.js.map +1 -0
- package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestsComponents.d.ts +4 -4
- package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestsComponents.js +2 -2
- package/dist/components/InformationRequests/InformationRequestsComponents.js.map +1 -0
- package/dist/components/InformationRequests/index.d.ts +4 -0
- package/dist/components/InformationRequests/index.js +9 -0
- package/dist/components/InformationRequests/index.js.map +1 -0
- package/dist/components/{Payroll/InformationRequests → InformationRequests}/informationRequestsStateMachine.d.ts +1 -1
- package/dist/components/{Payroll/InformationRequests → InformationRequests}/informationRequestsStateMachine.js +1 -1
- package/dist/components/InformationRequests/informationRequestsStateMachine.js.map +1 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js +69 -59
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +0 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js +61 -52
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +22 -24
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.d.ts +5 -13
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +102 -28
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/index.d.ts +0 -1
- package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js +14 -14
- package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +132 -131
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +2 -3
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +14 -16
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +1 -0
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js +45 -38
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +54 -40
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +36 -38
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.d.ts +2 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.js +26 -24
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.d.ts +2 -0
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +70 -48
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js +72 -36
- package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js +14 -17
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +1 -2
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +89 -96
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +29 -30
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +3 -3
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +242 -243
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.d.ts +2 -2
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +2 -4
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.d.ts +2 -2
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +2 -3
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCaseErrorCode.module.scss.js +8 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCaseErrorCode.module.scss.js.map +1 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +83 -52
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.module.scss.js +2 -4
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.module.scss.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +59 -36
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.d.ts +7 -0
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +65 -0
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.d.ts +1 -1
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js.map +1 -1
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/index.d.ts +1 -2
- package/dist/components/Payroll/index.js +8 -10
- package/dist/components/Payroll/index.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.d.ts +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +1 -1
- package/dist/contexts/ThemeProvider/theme.js +5 -5
- package/dist/contexts/ThemeProvider/theme.js.map +1 -1
- package/dist/helpers/formattedStrings.js +12 -11
- package/dist/helpers/formattedStrings.js.map +1 -1
- package/dist/i18n/I18n.js +8 -8
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +30 -26
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js.map +1 -1
- package/dist/i18n/en/Contractor.Payments.PaymentSummary.json.js +58 -0
- package/dist/i18n/en/Contractor.Payments.PaymentSummary.json.js.map +1 -0
- package/dist/i18n/en/Employee.EmploymentEligibility.json.js +28 -0
- package/dist/i18n/en/Employee.EmploymentEligibility.json.js.map +1 -0
- package/dist/i18n/en/InformationRequests.InformationRequestForm.json.js +20 -0
- package/dist/i18n/en/InformationRequests.InformationRequestForm.json.js.map +1 -0
- package/dist/i18n/en/{Payroll.InformationRequestList.json.js → InformationRequests.InformationRequestList.json.js} +6 -6
- package/dist/i18n/en/InformationRequests.InformationRequestList.json.js.map +1 -0
- package/dist/i18n/en/Payroll.ConfirmWireDetailsBanner.json.js +1 -1
- package/dist/i18n/en/Payroll.PayrollBlocker.json.js +24 -20
- package/dist/i18n/en/Payroll.PayrollBlocker.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollLanding.json.js +5 -3
- package/dist/i18n/en/Payroll.PayrollLanding.json.js.map +1 -1
- package/dist/i18n/en/Payroll.RecoveryCasesList.json.js +14 -10
- package/dist/i18n/en/Payroll.RecoveryCasesList.json.js.map +1 -1
- package/dist/i18n/en/Payroll.RecoveryCasesResubmit.json.js +5 -3
- package/dist/i18n/en/Payroll.RecoveryCasesResubmit.json.js.map +1 -1
- package/dist/i18n/en/Payroll.WireInstructions.json.js +20 -16
- package/dist/i18n/en/Payroll.WireInstructions.json.js.map +1 -1
- package/dist/index.js +10 -8
- package/dist/index.js.map +1 -1
- package/dist/shared/constants.d.ts +6 -0
- package/dist/shared/constants.js +12 -9
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +248 -46
- package/package.json +16 -16
- package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.js +0 -142
- package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +0 -1
- package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.module.scss.js +0 -18
- package/dist/components/Payroll/InformationRequests/InformationRequestList/InformationRequestList.js +0 -88
- package/dist/components/Payroll/InformationRequests/InformationRequestList/InformationRequestList.js.map +0 -1
- package/dist/components/Payroll/InformationRequests/InformationRequests.d.ts +0 -6
- package/dist/components/Payroll/InformationRequests/InformationRequests.js +0 -55
- package/dist/components/Payroll/InformationRequests/InformationRequests.js.map +0 -1
- package/dist/components/Payroll/InformationRequests/InformationRequestsComponents.js.map +0 -1
- package/dist/components/Payroll/InformationRequests/index.d.ts +0 -3
- package/dist/components/Payroll/InformationRequests/informationRequestsStateMachine.js.map +0 -1
- package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.d.ts +0 -6
- package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.js +0 -32
- package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.js.map +0 -1
- package/dist/i18n/en/Payroll.InformationRequestForm.json.js +0 -18
- package/dist/i18n/en/Payroll.InformationRequestForm.json.js.map +0 -1
- package/dist/i18n/en/Payroll.InformationRequestList.json.js.map +0 -1
- /package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestForm/index.d.ts +0 -0
- /package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestList/index.d.ts +0 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const EligibilityStatusValues: readonly ["citizen", "lawfulPermanentResident", "noncitizen", "noncitizen_authorized"];
|
|
3
|
+
declare const AuthorizationDocumentValues: readonly ["uscis", "i94", "foreignPassport"];
|
|
4
|
+
export declare const EmploymentEligibilitySchema: z.ZodObject<{
|
|
5
|
+
eligibilityStatus: z.ZodOptional<z.ZodEnum<["citizen", "lawfulPermanentResident", "noncitizen", "noncitizen_authorized"]>>;
|
|
6
|
+
authorizedToWorkUntil: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodDate>>, Date | null | undefined, Date | null | undefined>;
|
|
7
|
+
authorizationDocumentType: z.ZodOptional<z.ZodEnum<["uscis", "i94", "foreignPassport"]>>;
|
|
8
|
+
uscisNumber: z.ZodOptional<z.ZodString>;
|
|
9
|
+
i94AdmissionNumber: z.ZodOptional<z.ZodString>;
|
|
10
|
+
foreignPassportNumber: z.ZodOptional<z.ZodString>;
|
|
11
|
+
countryOfIssuance: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
authorizedToWorkUntil?: Date | null | undefined;
|
|
14
|
+
uscisNumber?: string | undefined;
|
|
15
|
+
i94AdmissionNumber?: string | undefined;
|
|
16
|
+
countryOfIssuance?: string | undefined;
|
|
17
|
+
eligibilityStatus?: "citizen" | "lawfulPermanentResident" | "noncitizen" | "noncitizen_authorized" | undefined;
|
|
18
|
+
authorizationDocumentType?: "foreignPassport" | "uscis" | "i94" | undefined;
|
|
19
|
+
foreignPassportNumber?: string | undefined;
|
|
20
|
+
}, {
|
|
21
|
+
authorizedToWorkUntil?: Date | null | undefined;
|
|
22
|
+
uscisNumber?: string | undefined;
|
|
23
|
+
i94AdmissionNumber?: string | undefined;
|
|
24
|
+
countryOfIssuance?: string | undefined;
|
|
25
|
+
eligibilityStatus?: "citizen" | "lawfulPermanentResident" | "noncitizen" | "noncitizen_authorized" | undefined;
|
|
26
|
+
authorizationDocumentType?: "foreignPassport" | "uscis" | "i94" | undefined;
|
|
27
|
+
foreignPassportNumber?: string | undefined;
|
|
28
|
+
}>;
|
|
29
|
+
export type EmploymentEligibilityInputs = z.infer<typeof EmploymentEligibilitySchema>;
|
|
30
|
+
export type EligibilityStatus = (typeof EligibilityStatusValues)[number];
|
|
31
|
+
export type AuthorizationDocumentType = (typeof AuthorizationDocumentValues)[number];
|
|
32
|
+
interface EmploymentEligibilityPresentationProps {
|
|
33
|
+
onSubmit: (data: EmploymentEligibilityInputs) => void;
|
|
34
|
+
defaultValues?: Partial<EmploymentEligibilityInputs>;
|
|
35
|
+
}
|
|
36
|
+
export declare const EmploymentEligibilityPresentation: ({ onSubmit, defaultValues, }: EmploymentEligibilityPresentationProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
export {};
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as
|
|
2
|
+
import { useTranslation as r } from "react-i18next";
|
|
3
3
|
import { useFederalTaxes as i } from "./useFederalTaxes.js";
|
|
4
4
|
import "../../../shared/constants.js";
|
|
5
|
-
import "classnames";
|
|
6
5
|
import { ActionsLayout as m } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
7
6
|
import { useComponentContext as s } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
7
|
import "react";
|
|
9
|
-
function
|
|
10
|
-
const { t } =
|
|
11
|
-
return /* @__PURE__ */ o(m, { children: /* @__PURE__ */ o(
|
|
8
|
+
function x() {
|
|
9
|
+
const { t } = r("Employee.FederalTaxes"), { isPending: n } = i(), e = s();
|
|
10
|
+
return /* @__PURE__ */ o(m, { children: /* @__PURE__ */ o(e.Button, { type: "submit", isLoading: n, children: t("submitCta") }) });
|
|
12
11
|
}
|
|
13
12
|
export {
|
|
14
|
-
|
|
13
|
+
x as Actions
|
|
15
14
|
};
|
|
16
15
|
//# sourceMappingURL=Actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/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 function Actions() {\n const { t } = useTranslation('Employee.FederalTaxes')\n const { isPending } = useFederalTaxes()\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","useTranslation","isPending","useFederalTaxes","Components","useComponentContext","jsx","ActionsLayout"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/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 function Actions() {\n const { t } = useTranslation('Employee.FederalTaxes')\n const { isPending } = useFederalTaxes()\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","useTranslation","isPending","useFederalTaxes","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,EAAA,IAAMC,EAAe,uBAAuB,GAC9C,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,WAAW,GAChB,GACF;AAEJ;"}
|
|
@@ -3,7 +3,6 @@ import { useTranslation as o, Trans as u } from "react-i18next";
|
|
|
3
3
|
import { useFormContext as m } from "react-hook-form";
|
|
4
4
|
import { z as i } from "zod";
|
|
5
5
|
import "../../../shared/constants.js";
|
|
6
|
-
import "classnames";
|
|
7
6
|
import { useComponentContext as g } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
7
|
import "react";
|
|
9
8
|
import { SelectField as s } from "../../Common/Fields/SelectField/SelectField.js";
|
|
@@ -23,8 +22,8 @@ const p = i.object({
|
|
|
23
22
|
filingStatus: i.string().min(1),
|
|
24
23
|
federalWithholdingAllowance: i.number().int(),
|
|
25
24
|
additionalWithholding: i.string()
|
|
26
|
-
}),
|
|
27
|
-
function
|
|
25
|
+
}), D = i.discriminatedUnion("w4DataType", [p, h]);
|
|
26
|
+
function H() {
|
|
28
27
|
const { watch: e } = m();
|
|
29
28
|
return e("w4DataType") === "rev_2020_w4" ? /* @__PURE__ */ t(b, {}) : /* @__PURE__ */ t(S, {});
|
|
30
29
|
}
|
|
@@ -161,7 +160,7 @@ function S() {
|
|
|
161
160
|
] });
|
|
162
161
|
}
|
|
163
162
|
export {
|
|
164
|
-
|
|
165
|
-
|
|
163
|
+
H as FederalForm,
|
|
164
|
+
D as FederalFormSchema
|
|
166
165
|
};
|
|
167
166
|
//# sourceMappingURL=FederalForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FederalForm.js","sources":["../../../../src/components/Employee/FederalTaxes/FederalForm.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { useFormContext } from 'react-hook-form'\nimport { z } from 'zod'\nimport { SelectField, RadioGroupField, NumberInputField, TextInputField } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nconst Rev2020Schema = z.object({\n w4DataType: z.literal('rev_2020_w4'),\n filingStatus: z.string().min(1),\n twoJobs: z.string().min(1),\n dependentsAmount: z.number().transform(String),\n otherIncome: z.number().transform(String),\n deductions: z.number().transform(String),\n extraWithholding: z.number().transform(String),\n})\n\nconst Pre2020Schema = z.object({\n w4DataType: z.literal('pre_2020_w4'),\n filingStatus: z.string().min(1),\n federalWithholdingAllowance: z.number().int(),\n additionalWithholding: z.string(),\n})\n\nexport const FederalFormSchema = z.discriminatedUnion('w4DataType', [Rev2020Schema, Pre2020Schema])\n\nexport type FederalFormInputs = z.input<typeof FederalFormSchema>\nexport type FederalFormPayload = z.output<typeof FederalFormSchema>\n\nexport function FederalForm() {\n const { watch } = useFormContext<FederalFormInputs>()\n const w4DataType = watch('w4DataType')\n\n if (w4DataType === 'rev_2020_w4') {\n return <Rev2020Form />\n }\n\n return <Pre2020Form />\n}\n\nfunction Rev2020Form() {\n const { t } = useTranslation('Employee.FederalTaxes')\n const Components = useComponentContext()\n\n const filingStatusOptions = [\n { value: 'Single', label: t('filingStatusSingle') },\n { value: 'Married', label: t('filingStatusMarried') },\n { value: 'Head of Household', label: t('filingStatusHeadOfHousehold') },\n { value: 'Exempt from withholding', label: t('filingStatusExemptFromWithholding') },\n ]\n\n return (\n <>\n <SelectField\n name=\"filingStatus\"\n label={t('federalFilingStatus1c')}\n placeholder={t('federalFilingStatusPlaceholder')}\n description={t('selectWithholdingDescription')}\n options={filingStatusOptions}\n isRequired\n errorMessage={t('validations.federalFilingStatus')}\n />\n <RadioGroupField\n name=\"twoJobs\"\n isRequired\n label={t('multipleJobs2c')}\n errorMessage={t('validations.federalTwoJobs')}\n description={\n <Trans\n i18nKey={'includesSpouseExplanation'}\n t={t}\n components={{\n IrsLink: <Components.Link />,\n }}\n />\n }\n options={[\n { value: 'true', label: t('twoJobYesLabel') },\n { value: 'false', label: t('twoJobNoLabel') },\n ]}\n />\n <NumberInputField\n name=\"dependentsAmount\"\n isRequired\n label={t('dependentsTotalIfApplicable')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"otherIncome\"\n isRequired\n label={t('otherIncome')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"deductions\"\n isRequired\n label={t('deductions')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"extraWithholding\"\n isRequired\n label={t('extraWithholding')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n </>\n )\n}\n\nfunction Pre2020Form() {\n const { t } = useTranslation('Employee.FederalTaxes')\n\n const filingStatusOptions = [\n { value: 'Single', label: t('filingStatusSingle') },\n { value: 'Married', label: t('filingStatusMarried') },\n { value: 'Head of Household', label: t('filingStatusHeadOfHousehold') },\n { value: 'Exempt from withholding', label: t('filingStatusExemptFromWithholding') },\n { value: 'Married, but withhold as Single', label: t('filingStatusMarriedWithholdAsSingle') },\n ]\n\n return (\n <>\n <NumberInputField\n name=\"federalWithholdingAllowance\"\n isRequired\n label={t('federalWithholdingAllowance')}\n min={0}\n maximumFractionDigits={0}\n errorMessage={t('fieldIsRequired')}\n />\n <SelectField\n name=\"filingStatus\"\n label={t('filingStatus')}\n placeholder={t('federalFilingStatusPlaceholder')}\n description={t('selectWithholdingDescription')}\n options={filingStatusOptions}\n isRequired\n errorMessage={t('validations.federalFilingStatus')}\n />\n <TextInputField\n name=\"additionalWithholding\"\n label={t('additionalWithholding')}\n type=\"number\"\n errorMessage={t('fieldIsRequired')}\n />\n </>\n )\n}\n"],"names":["Rev2020Schema","z","Pre2020Schema","FederalFormSchema","FederalForm","watch","useFormContext","Rev2020Form","Pre2020Form","t","useTranslation","Components","useComponentContext","filingStatusOptions","jsxs","Fragment","jsx","SelectField","RadioGroupField","Trans","NumberInputField","TextInputField"],"mappings":"
|
|
1
|
+
{"version":3,"file":"FederalForm.js","sources":["../../../../src/components/Employee/FederalTaxes/FederalForm.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { useFormContext } from 'react-hook-form'\nimport { z } from 'zod'\nimport { SelectField, RadioGroupField, NumberInputField, TextInputField } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nconst Rev2020Schema = z.object({\n w4DataType: z.literal('rev_2020_w4'),\n filingStatus: z.string().min(1),\n twoJobs: z.string().min(1),\n dependentsAmount: z.number().transform(String),\n otherIncome: z.number().transform(String),\n deductions: z.number().transform(String),\n extraWithholding: z.number().transform(String),\n})\n\nconst Pre2020Schema = z.object({\n w4DataType: z.literal('pre_2020_w4'),\n filingStatus: z.string().min(1),\n federalWithholdingAllowance: z.number().int(),\n additionalWithholding: z.string(),\n})\n\nexport const FederalFormSchema = z.discriminatedUnion('w4DataType', [Rev2020Schema, Pre2020Schema])\n\nexport type FederalFormInputs = z.input<typeof FederalFormSchema>\nexport type FederalFormPayload = z.output<typeof FederalFormSchema>\n\nexport function FederalForm() {\n const { watch } = useFormContext<FederalFormInputs>()\n const w4DataType = watch('w4DataType')\n\n if (w4DataType === 'rev_2020_w4') {\n return <Rev2020Form />\n }\n\n return <Pre2020Form />\n}\n\nfunction Rev2020Form() {\n const { t } = useTranslation('Employee.FederalTaxes')\n const Components = useComponentContext()\n\n const filingStatusOptions = [\n { value: 'Single', label: t('filingStatusSingle') },\n { value: 'Married', label: t('filingStatusMarried') },\n { value: 'Head of Household', label: t('filingStatusHeadOfHousehold') },\n { value: 'Exempt from withholding', label: t('filingStatusExemptFromWithholding') },\n ]\n\n return (\n <>\n <SelectField\n name=\"filingStatus\"\n label={t('federalFilingStatus1c')}\n placeholder={t('federalFilingStatusPlaceholder')}\n description={t('selectWithholdingDescription')}\n options={filingStatusOptions}\n isRequired\n errorMessage={t('validations.federalFilingStatus')}\n />\n <RadioGroupField\n name=\"twoJobs\"\n isRequired\n label={t('multipleJobs2c')}\n errorMessage={t('validations.federalTwoJobs')}\n description={\n <Trans\n i18nKey={'includesSpouseExplanation'}\n t={t}\n components={{\n IrsLink: <Components.Link />,\n }}\n />\n }\n options={[\n { value: 'true', label: t('twoJobYesLabel') },\n { value: 'false', label: t('twoJobNoLabel') },\n ]}\n />\n <NumberInputField\n name=\"dependentsAmount\"\n isRequired\n label={t('dependentsTotalIfApplicable')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"otherIncome\"\n isRequired\n label={t('otherIncome')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"deductions\"\n isRequired\n label={t('deductions')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"extraWithholding\"\n isRequired\n label={t('extraWithholding')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n </>\n )\n}\n\nfunction Pre2020Form() {\n const { t } = useTranslation('Employee.FederalTaxes')\n\n const filingStatusOptions = [\n { value: 'Single', label: t('filingStatusSingle') },\n { value: 'Married', label: t('filingStatusMarried') },\n { value: 'Head of Household', label: t('filingStatusHeadOfHousehold') },\n { value: 'Exempt from withholding', label: t('filingStatusExemptFromWithholding') },\n { value: 'Married, but withhold as Single', label: t('filingStatusMarriedWithholdAsSingle') },\n ]\n\n return (\n <>\n <NumberInputField\n name=\"federalWithholdingAllowance\"\n isRequired\n label={t('federalWithholdingAllowance')}\n min={0}\n maximumFractionDigits={0}\n errorMessage={t('fieldIsRequired')}\n />\n <SelectField\n name=\"filingStatus\"\n label={t('filingStatus')}\n placeholder={t('federalFilingStatusPlaceholder')}\n description={t('selectWithholdingDescription')}\n options={filingStatusOptions}\n isRequired\n errorMessage={t('validations.federalFilingStatus')}\n />\n <TextInputField\n name=\"additionalWithholding\"\n label={t('additionalWithholding')}\n type=\"number\"\n errorMessage={t('fieldIsRequired')}\n />\n </>\n )\n}\n"],"names":["Rev2020Schema","z","Pre2020Schema","FederalFormSchema","FederalForm","watch","useFormContext","Rev2020Form","Pre2020Form","t","useTranslation","Components","useComponentContext","filingStatusOptions","jsxs","Fragment","jsx","SelectField","RadioGroupField","Trans","NumberInputField","TextInputField"],"mappings":";;;;;;;;;;;AAMA,MAAMA,IAAgBC,EAAE,OAAO;AAAA,EAC7B,YAAYA,EAAE,QAAQ,aAAa;AAAA,EACnC,cAAcA,EAAE,SAAS,IAAI,CAAC;AAAA,EAC9B,SAASA,EAAE,SAAS,IAAI,CAAC;AAAA,EACzB,kBAAkBA,EAAE,SAAS,UAAU,MAAM;AAAA,EAC7C,aAAaA,EAAE,SAAS,UAAU,MAAM;AAAA,EACxC,YAAYA,EAAE,SAAS,UAAU,MAAM;AAAA,E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
9
|
import "../../../shared/constants.js";
|
|
10
|
-
import "classnames";
|
|
11
10
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
11
|
import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
13
12
|
import "dompurify";
|
|
13
|
+
import "../../../contexts/LocaleProvider/useLocale.js";
|
|
14
14
|
import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
|
|
15
15
|
const [T, c] = o("FederalTaxesContext");
|
|
16
16
|
export {
|
|
@@ -6,17 +6,16 @@ import s from "./Landing.module.scss.js";
|
|
|
6
6
|
import { BaseComponent as x } from "../../Base/Base.js";
|
|
7
7
|
import { useBase as y } from "../../Base/useBase.js";
|
|
8
8
|
import { Flex as r } from "../../Common/Flex/Flex.js";
|
|
9
|
-
import "
|
|
10
|
-
import {
|
|
11
|
-
import { ActionsLayout as C } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
12
|
-
import { useComponentContext as D } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
9
|
+
import { ActionsLayout as E } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
10
|
+
import { useComponentContext as C } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
13
11
|
import "react";
|
|
14
|
-
import { useI18n as
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
import { useI18n as D, useComponentDictionary as I } from "../../../i18n/I18n.js";
|
|
13
|
+
import { componentEvents as L } from "../../../shared/constants.js";
|
|
14
|
+
function H(t) {
|
|
15
|
+
return D("Employee.Landing"), I("Employee.Landing", t.dictionary), /* @__PURE__ */ e(x, { ...t, children: /* @__PURE__ */ e(S, { ...t, children: t.children }) });
|
|
17
16
|
}
|
|
18
17
|
const S = ({ employeeId: t, companyId: m, className: c }) => {
|
|
19
|
-
const { onEvent: a } = y(), o =
|
|
18
|
+
const { onEvent: a } = y(), o = C(), {
|
|
20
19
|
data: { employee: l }
|
|
21
20
|
} = g({ employeeId: t }), p = l.firstName, {
|
|
22
21
|
data: { company: d }
|
|
@@ -36,12 +35,12 @@ const S = ({ employeeId: t, companyId: m, className: c }) => {
|
|
|
36
35
|
)
|
|
37
36
|
] }),
|
|
38
37
|
/* @__PURE__ */ i(r, { flexDirection: "column", alignItems: "center", gap: 8, children: [
|
|
39
|
-
/* @__PURE__ */ e(
|
|
38
|
+
/* @__PURE__ */ e(E, { justifyContent: "center", children: /* @__PURE__ */ e(
|
|
40
39
|
o.Button,
|
|
41
40
|
{
|
|
42
41
|
variant: "secondary",
|
|
43
42
|
onClick: () => {
|
|
44
|
-
a(
|
|
43
|
+
a(L.EMPLOYEE_SELF_ONBOARDING_START);
|
|
45
44
|
},
|
|
46
45
|
children: n("getStartedCta")
|
|
47
46
|
}
|
|
@@ -51,6 +50,6 @@ const S = ({ employeeId: t, companyId: m, className: c }) => {
|
|
|
51
50
|
] }) });
|
|
52
51
|
};
|
|
53
52
|
export {
|
|
54
|
-
|
|
53
|
+
H as Landing
|
|
55
54
|
};
|
|
56
55
|
//# sourceMappingURL=Landing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Landing.js","sources":["../../../../src/components/Employee/Landing/Landing.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useEmployeesGetSuspense } from '@gusto/embedded-api/react-query/employeesGet'\nimport { useCompaniesGetSuspense } from '@gusto/embedded-api/react-query/companiesGet'\nimport styles from './Landing.module.scss'\nimport {\n BaseComponent,\n useBase,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base'\nimport { Flex, ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\ninterface SummaryProps extends CommonComponentInterface<'Employee.Landing'> {\n employeeId: string\n companyId: string\n}\n\nexport function Landing(props: SummaryProps & BaseComponentInterface) {\n useI18n('Employee.Landing')\n useComponentDictionary('Employee.Landing', props.dictionary)\n\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ employeeId, companyId, className }: SummaryProps) => {\n const { onEvent } = useBase()\n const Components = useComponentContext()\n\n const {\n data: { employee },\n } = useEmployeesGetSuspense({ employeeId })\n const firstName = employee!.firstName\n\n const {\n data: { company },\n } = useCompaniesGetSuspense({ companyId })\n const companyName = company?.name\n\n const { t } = useTranslation('Employee.Landing')\n\n return (\n <section className={className}>\n <Flex alignItems=\"center\" flexDirection=\"column\" gap={32}>\n <Flex alignItems=\"center\" flexDirection=\"column\" gap={8}>\n <Components.Heading as=\"h2\" textAlign=\"center\">\n {t('landingSubtitle', { firstName, companyName })}\n </Components.Heading>\n <Components.Text className={styles.description}>\n {t('landingDescription')}\n </Components.Text>\n </Flex>\n <Flex flexDirection=\"column\" gap={8}>\n <Components.Heading as=\"h3\">{t('stepsSubtitle')}</Components.Heading>\n <Components.UnorderedList\n items={[t('steps.personalInfo'), t('steps.taxInfo'), t('steps.bankInfo')]}\n />\n </Flex>\n <Flex flexDirection=\"column\" alignItems=\"center\" gap={8}>\n <ActionsLayout justifyContent=\"center\">\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(componentEvents.EMPLOYEE_SELF_ONBOARDING_START)\n }}\n >\n {t('getStartedCta')}\n </Components.Button>\n </ActionsLayout>\n <Components.Text className={styles.description}>\n {t('getStartedDescription')}\n </Components.Text>\n </Flex>\n </Flex>\n </section>\n )\n}\n"],"names":["Landing","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","employeeId","companyId","className","onEvent","useBase","Components","useComponentContext","employee","useEmployeesGetSuspense","firstName","company","useCompaniesGetSuspense","companyName","t","useTranslation","jsxs","Flex","styles","ActionsLayout","componentEvents"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Landing.js","sources":["../../../../src/components/Employee/Landing/Landing.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useEmployeesGetSuspense } from '@gusto/embedded-api/react-query/employeesGet'\nimport { useCompaniesGetSuspense } from '@gusto/embedded-api/react-query/companiesGet'\nimport styles from './Landing.module.scss'\nimport {\n BaseComponent,\n useBase,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base'\nimport { Flex, ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\ninterface SummaryProps extends CommonComponentInterface<'Employee.Landing'> {\n employeeId: string\n companyId: string\n}\n\nexport function Landing(props: SummaryProps & BaseComponentInterface) {\n useI18n('Employee.Landing')\n useComponentDictionary('Employee.Landing', props.dictionary)\n\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ employeeId, companyId, className }: SummaryProps) => {\n const { onEvent } = useBase()\n const Components = useComponentContext()\n\n const {\n data: { employee },\n } = useEmployeesGetSuspense({ employeeId })\n const firstName = employee!.firstName\n\n const {\n data: { company },\n } = useCompaniesGetSuspense({ companyId })\n const companyName = company?.name\n\n const { t } = useTranslation('Employee.Landing')\n\n return (\n <section className={className}>\n <Flex alignItems=\"center\" flexDirection=\"column\" gap={32}>\n <Flex alignItems=\"center\" flexDirection=\"column\" gap={8}>\n <Components.Heading as=\"h2\" textAlign=\"center\">\n {t('landingSubtitle', { firstName, companyName })}\n </Components.Heading>\n <Components.Text className={styles.description}>\n {t('landingDescription')}\n </Components.Text>\n </Flex>\n <Flex flexDirection=\"column\" gap={8}>\n <Components.Heading as=\"h3\">{t('stepsSubtitle')}</Components.Heading>\n <Components.UnorderedList\n items={[t('steps.personalInfo'), t('steps.taxInfo'), t('steps.bankInfo')]}\n />\n </Flex>\n <Flex flexDirection=\"column\" alignItems=\"center\" gap={8}>\n <ActionsLayout justifyContent=\"center\">\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(componentEvents.EMPLOYEE_SELF_ONBOARDING_START)\n }}\n >\n {t('getStartedCta')}\n </Components.Button>\n </ActionsLayout>\n <Components.Text className={styles.description}>\n {t('getStartedDescription')}\n </Components.Text>\n </Flex>\n </Flex>\n </section>\n )\n}\n"],"names":["Landing","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","employeeId","companyId","className","onEvent","useBase","Components","useComponentContext","employee","useEmployeesGetSuspense","firstName","company","useCompaniesGetSuspense","companyName","t","useTranslation","jsxs","Flex","styles","ActionsLayout","componentEvents"],"mappings":";;;;;;;;;;;;;AAqBO,SAASA,EAAQC,GAA8C;AACpE,SAAAC,EAAQ,kBAAkB,GAC1BC,EAAuB,oBAAoBF,EAAM,UAAU,GAGzD,gBAAAG,EAACC,GAAA,EAAe,GAAGJ,GACjB,UAAA,gBAAAG,EAACE,KAAM,GAAGL,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,MAAMK,IAAO,CAAC,EAAE,YAAAC,GAAY,WAAAC,GAAW,WAAAC,QAA8B;AACnE,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GACdC,IAAaC,EAAA,GAEb;AAAA,IACJ,MAAM,EAAE,UAAAC,EAAA;AAAA,EAAS,IACfC,EAAwB,EAAE,YAAAR,GAAY,GACpCS,IAAYF,EAAU,WAEtB;AAAA,IACJ,MAAM,EAAE,SAAAG,EAAA;AAAA,EAAQ,IACdC,EAAwB,EAAE,WAAAV,GAAW,GACnCW,IAAcF,GAAS,MAEvB,EAAE,GAAAG,EAAA,IAAMC,EAAe,kBAAkB;AAE/C,SACE,gBAAAjB,EAAC,WAAA,EAAQ,WAAAK,GACP,UAAA,gBAAAa,EAACC,GAAA,EAAK,YAAW,UAAS,eAAc,UAAS,KAAK,IACpD,UAAA;AAAA,IAAA,gBAAAD,EAACC,KAAK,YAAW,UAAS,eAAc,UAAS,KAAK,GACpD,UAAA;AAAA,MAAA,gBAAAnB,EAACQ,EAAW,SAAX,EAAmB,IAAG,MAAK,WAAU,UACnC,UAAAQ,EAAE,mBAAmB,EAAE,WAAAJ,GAAW,aAAAG,EAAA,CAAa,EAAA,CAClD;AAAA,MACA,gBAAAf,EAACQ,EAAW,MAAX,EAAgB,WAAWY,EAAO,aAChC,UAAAJ,EAAE,oBAAoB,EAAA,CACzB;AAAA,IAAA,GACF;AAAA,IACA,gBAAAE,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,MAAA,gBAAAnB,EAACQ,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAQ,EAAE,eAAe,GAAE;AAAA,MAChD,gBAAAhB;AAAA,QAACQ,EAAW;AAAA,QAAX;AAAA,UACC,OAAO,CAACQ,EAAE,oBAAoB,GAAGA,EAAE,eAAe,GAAGA,EAAE,gBAAgB,CAAC;AAAA,QAAA;AAAA,MAAA;AAAA,IAC1E,GACF;AAAA,sBACCG,GAAA,EAAK,eAAc,UAAS,YAAW,UAAS,KAAK,GACpD,UAAA;AAAA,MAAA,gBAAAnB,EAACqB,GAAA,EAAc,gBAAe,UAC5B,UAAA,gBAAArB;AAAA,QAACQ,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAF,EAAQgB,EAAgB,8BAA8B;AAAA,UACxD;AAAA,UAEC,YAAE,eAAe;AAAA,QAAA;AAAA,MAAA,GAEtB;AAAA,MACA,gBAAAtB,EAACQ,EAAW,MAAX,EAAgB,WAAWY,EAAO,aAChC,UAAAJ,EAAE,uBAAuB,EAAA,CAC5B;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ;"}
|
|
@@ -9,10 +9,10 @@ import r from "./OnboardingSummary.module.scss.js";
|
|
|
9
9
|
import { BaseComponent as P } from "../../Base/Base.js";
|
|
10
10
|
import { useBase as R } from "../../Base/useBase.js";
|
|
11
11
|
import { Flex as d } from "../../Common/Flex/Flex.js";
|
|
12
|
-
import {
|
|
13
|
-
import { ActionsLayout as O } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
12
|
+
import { ActionsLayout as E } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
14
13
|
import { useComponentContext as T } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
15
14
|
import { useI18n as _, useComponentDictionary as w } from "../../../i18n/I18n.js";
|
|
15
|
+
import { componentEvents as N, EmployeeOnboardingStatus as O } from "../../../shared/constants.js";
|
|
16
16
|
import F from "../../../assets/icons/success_check.svg.js";
|
|
17
17
|
import G from "../../../assets/icons/unchecked_circular.svg.js";
|
|
18
18
|
import { useFlow as M } from "../../Flow/useFlow.js";
|
|
@@ -22,7 +22,7 @@ function j(n) {
|
|
|
22
22
|
const k = ({ employeeId: n, className: c, isAdmin: m = !1 }) => {
|
|
23
23
|
const { onEvent: a } = R(), { t } = b("Employee.OnboardingSummary"), o = T(), {
|
|
24
24
|
data: { employee: x }
|
|
25
|
-
} = B({ employeeId: n }), { firstName: u, lastName: p } = x, { data: C } = L({ employeeId: n }), { onboardingStatus: h, onboardingSteps: l } = C.employeeOnboardingStatus, I = l?.length && l.findIndex((i) => i.required && !i.completed) > -1, f = h ===
|
|
25
|
+
} = B({ employeeId: n }), { firstName: u, lastName: p } = x, { data: C } = L({ employeeId: n }), { onboardingStatus: h, onboardingSteps: l } = C.employeeOnboardingStatus, I = l?.length && l.findIndex((i) => i.required && !i.completed) > -1, f = h === O.ONBOARDING_COMPLETED || !I && h === O.SELF_ONBOARDING_PENDING_INVITE, D = S(() => y.sanitize(u), [u]), v = S(() => y.sanitize(p), [p]);
|
|
26
26
|
return /* @__PURE__ */ e("section", { className: c, children: /* @__PURE__ */ s(d, { flexDirection: "column", gap: 32, children: [
|
|
27
27
|
/* @__PURE__ */ e(d, { alignItems: "center", flexDirection: "column", gap: 8, children: m ? f ? /* @__PURE__ */ s(g, { children: [
|
|
28
28
|
/* @__PURE__ */ e(o.Heading, { as: "h2", textAlign: "center", children: t("onboardedAdminSubtitle", {
|
|
@@ -47,23 +47,23 @@ const k = ({ employeeId: n, className: c, isAdmin: m = !1 }) => {
|
|
|
47
47
|
] }) : /* @__PURE__ */ s(g, { children: [
|
|
48
48
|
/* @__PURE__ */ e(o.Heading, { as: "h2", textAlign: "center", children: t("onboardedSelfSubtitle") }),
|
|
49
49
|
/* @__PURE__ */ e(o.Text, { className: r.description, children: t("onboardedSelfDescription") }),
|
|
50
|
-
/* @__PURE__ */ e(
|
|
50
|
+
/* @__PURE__ */ e(E, { justifyContent: f ? "center" : "start", children: /* @__PURE__ */ e(
|
|
51
51
|
o.Button,
|
|
52
52
|
{
|
|
53
53
|
variant: "secondary",
|
|
54
54
|
onClick: () => {
|
|
55
|
-
a(
|
|
55
|
+
a(N.EMPLOYEE_ONBOARDING_DONE);
|
|
56
56
|
},
|
|
57
57
|
children: t("doneCta")
|
|
58
58
|
}
|
|
59
59
|
) })
|
|
60
60
|
] }) }),
|
|
61
|
-
m && /* @__PURE__ */ e(
|
|
61
|
+
m && /* @__PURE__ */ e(E, { justifyContent: "center", children: /* @__PURE__ */ e(
|
|
62
62
|
o.Button,
|
|
63
63
|
{
|
|
64
64
|
variant: "secondary",
|
|
65
65
|
onClick: () => {
|
|
66
|
-
a(
|
|
66
|
+
a(N.EMPLOYEES_LIST);
|
|
67
67
|
},
|
|
68
68
|
children: t("doneCta")
|
|
69
69
|
}
|
|
@@ -2,20 +2,19 @@ import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { useTranslation as m } from "react-i18next";
|
|
3
3
|
import { usePaymentMethod as l } from "./usePaymentMethod.js";
|
|
4
4
|
import "../../../shared/constants.js";
|
|
5
|
-
import "classnames";
|
|
6
5
|
import { ActionsLayout as p } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
7
6
|
import { useComponentContext as u } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
7
|
import "react";
|
|
9
|
-
const
|
|
10
|
-
const { handleAdd: i, handleCancel:
|
|
8
|
+
const P = () => {
|
|
9
|
+
const { handleAdd: i, handleCancel: a, isPending: r, bankAccounts: s, handleSplit: c, mode: t } = l(), { t: n } = m("Employee.PaymentMethod"), o = u();
|
|
11
10
|
return /* @__PURE__ */ d(p, { children: [
|
|
12
|
-
(t === "ADD" || t === "SPLIT") && /* @__PURE__ */ e(o.Button, { variant: "secondary", type: "button", onClick:
|
|
11
|
+
(t === "ADD" || t === "SPLIT") && /* @__PURE__ */ e(o.Button, { variant: "secondary", type: "button", onClick: a, children: n("cancelAddCta") }),
|
|
13
12
|
t === "LIST" && s.length > 1 && /* @__PURE__ */ e(o.Button, { variant: "secondary", type: "button", onClick: c, children: n("splitCta") }),
|
|
14
13
|
t === "LIST" && /* @__PURE__ */ e(o.Button, { variant: "secondary", type: "button", onClick: i, children: n("addAnotherCta") }),
|
|
15
|
-
/* @__PURE__ */ e(o.Button, { type: "submit", isLoading:
|
|
14
|
+
/* @__PURE__ */ e(o.Button, { type: "submit", isLoading: r, children: n(t === "ADD" || t === "SPLIT" ? "saveCta" : "submitCta") })
|
|
16
15
|
] });
|
|
17
16
|
};
|
|
18
17
|
export {
|
|
19
|
-
|
|
18
|
+
P as Actions
|
|
20
19
|
};
|
|
21
20
|
//# sourceMappingURL=Actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/PaymentMethod/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaymentMethod } from './usePaymentMethod'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { handleAdd, handleCancel, isPending, bankAccounts, handleSplit, mode } = usePaymentMethod()\n const { t } = useTranslation('Employee.PaymentMethod')\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n {(mode === 'ADD' || mode === 'SPLIT') && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleCancel}>\n {t('cancelAddCta')}\n </Components.Button>\n )}\n {mode === 'LIST' && bankAccounts.length > 1 && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleSplit}>\n {t('splitCta')}\n </Components.Button>\n )}\n {mode === 'LIST' && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleAdd}>\n {t('addAnotherCta')}\n </Components.Button>\n )}\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t(mode === 'ADD' || mode === 'SPLIT' ? 'saveCta' : 'submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","handleAdd","handleCancel","isPending","bankAccounts","handleSplit","mode","usePaymentMethod","t","useTranslation","Components","useComponentContext","ActionsLayout","jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/PaymentMethod/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaymentMethod } from './usePaymentMethod'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { handleAdd, handleCancel, isPending, bankAccounts, handleSplit, mode } = usePaymentMethod()\n const { t } = useTranslation('Employee.PaymentMethod')\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n {(mode === 'ADD' || mode === 'SPLIT') && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleCancel}>\n {t('cancelAddCta')}\n </Components.Button>\n )}\n {mode === 'LIST' && bankAccounts.length > 1 && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleSplit}>\n {t('splitCta')}\n </Components.Button>\n )}\n {mode === 'LIST' && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleAdd}>\n {t('addAnotherCta')}\n </Components.Button>\n )}\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t(mode === 'ADD' || mode === 'SPLIT' ? 'saveCta' : 'submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","handleAdd","handleCancel","isPending","bankAccounts","handleSplit","mode","usePaymentMethod","t","useTranslation","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,WAAAC,GAAW,cAAAC,GAAc,WAAAC,GAAW,cAAAC,GAAc,aAAAC,GAAa,MAAAC,EAAA,IAASC,EAAA,GAC1E,EAAE,GAAAC,EAAA,IAAMC,EAAe,wBAAwB,GAC/CC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACG,UAAA;AAAA,KAAAN,MAAS,SAASA,MAAS,YAC3B,gBAAAO,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAASR,GAC3D,UAAAM,EAAE,cAAc,GACnB;AAAA,IAEDF,MAAS,UAAUF,EAAa,SAAS,uBACvCM,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAASL,GAC3D,UAAAG,EAAE,UAAU,GACf;AAAA,IAEDF,MAAS,UACR,gBAAAO,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAAST,GAC3D,UAAAO,EAAE,eAAe,GACpB;AAAA,IAEF,gBAAAK,EAACH,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWP,GACzC,UAAAK,EAAEF,MAAS,SAASA,MAAS,UAAU,YAAY,WAAW,EAAA,CACjE;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -3,12 +3,11 @@ import { useFormContext as m } from "react-hook-form";
|
|
|
3
3
|
import { useTranslation as s } from "react-i18next";
|
|
4
4
|
import { usePaymentMethod as c } from "./usePaymentMethod.js";
|
|
5
5
|
import { PAYMENT_METHODS as l } from "../../../shared/constants.js";
|
|
6
|
-
import "classnames";
|
|
7
6
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
7
|
import "react";
|
|
9
8
|
import { TextInputField as o } from "../../Common/Fields/TextInputField/TextInputField.js";
|
|
10
9
|
import { RadioGroupField as p } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
11
|
-
const
|
|
10
|
+
const M = () => {
|
|
12
11
|
const { mode: t, watchedType: a } = c(), { t: e } = s("Employee.PaymentMethod"), { setValue: n } = m();
|
|
13
12
|
if (!(t !== "ADD" && t !== "INITIAL" || a === l.check))
|
|
14
13
|
return n("hasBankPayload", !0), /* @__PURE__ */ i(u, { children: [
|
|
@@ -55,6 +54,6 @@ const k = () => {
|
|
|
55
54
|
] });
|
|
56
55
|
};
|
|
57
56
|
export {
|
|
58
|
-
|
|
57
|
+
M as BankAccountForm
|
|
59
58
|
};
|
|
60
59
|
//# sourceMappingURL=BankAccountEdit.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BankAccountEdit.js","sources":["../../../../src/components/Employee/PaymentMethod/BankAccountEdit.tsx"],"sourcesContent":["import { useFormContext } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport type { BankAccountInputs } from './BankAccount'\nimport { usePaymentMethod } from './usePaymentMethod'\nimport { RadioGroupField, TextInputField } from '@/components/Common'\nimport { PAYMENT_METHODS } from '@/shared/constants'\n\nexport const BankAccountForm = () => {\n const { mode, watchedType } = usePaymentMethod()\n const { t } = useTranslation('Employee.PaymentMethod')\n const { setValue } = useFormContext<BankAccountInputs>()\n\n if ((mode !== 'ADD' && mode !== 'INITIAL') || watchedType === PAYMENT_METHODS.check) {\n return\n }\n //Used by form schema to determine variant\n setValue('hasBankPayload', true)\n\n return (\n <>\n <TextInputField\n name=\"name\"\n isRequired\n label={t('nameLabel')}\n errorMessage={t('validations.accountName')}\n />\n\n <TextInputField\n name=\"routingNumber\"\n label={t('routingNumberLabel')}\n isRequired\n description={t('routingNumberDescription')}\n errorMessage={t('validations.routingNumber')}\n />\n\n <TextInputField\n name=\"accountNumber\"\n label={t('accountNumberLabel')}\n errorMessage={t('validations.accountNumber')}\n isRequired\n />\n\n <RadioGroupField\n name=\"accountType\"\n isRequired\n label={t('accountTypeLabel')}\n options={[\n { value: 'Checking', label: t('accountTypeChecking') },\n { value: 'Savings', label: t('accountTypeSavings') },\n ]}\n />\n </>\n )\n}\n"],"names":["BankAccountForm","mode","watchedType","usePaymentMethod","t","useTranslation","setValue","useFormContext","PAYMENT_METHODS","jsxs","Fragment","jsx","TextInputField","RadioGroupField"],"mappings":"
|
|
1
|
+
{"version":3,"file":"BankAccountEdit.js","sources":["../../../../src/components/Employee/PaymentMethod/BankAccountEdit.tsx"],"sourcesContent":["import { useFormContext } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport type { BankAccountInputs } from './BankAccount'\nimport { usePaymentMethod } from './usePaymentMethod'\nimport { RadioGroupField, TextInputField } from '@/components/Common'\nimport { PAYMENT_METHODS } from '@/shared/constants'\n\nexport const BankAccountForm = () => {\n const { mode, watchedType } = usePaymentMethod()\n const { t } = useTranslation('Employee.PaymentMethod')\n const { setValue } = useFormContext<BankAccountInputs>()\n\n if ((mode !== 'ADD' && mode !== 'INITIAL') || watchedType === PAYMENT_METHODS.check) {\n return\n }\n //Used by form schema to determine variant\n setValue('hasBankPayload', true)\n\n return (\n <>\n <TextInputField\n name=\"name\"\n isRequired\n label={t('nameLabel')}\n errorMessage={t('validations.accountName')}\n />\n\n <TextInputField\n name=\"routingNumber\"\n label={t('routingNumberLabel')}\n isRequired\n description={t('routingNumberDescription')}\n errorMessage={t('validations.routingNumber')}\n />\n\n <TextInputField\n name=\"accountNumber\"\n label={t('accountNumberLabel')}\n errorMessage={t('validations.accountNumber')}\n isRequired\n />\n\n <RadioGroupField\n name=\"accountType\"\n isRequired\n label={t('accountTypeLabel')}\n options={[\n { value: 'Checking', label: t('accountTypeChecking') },\n { value: 'Savings', label: t('accountTypeSavings') },\n ]}\n />\n </>\n )\n}\n"],"names":["BankAccountForm","mode","watchedType","usePaymentMethod","t","useTranslation","setValue","useFormContext","PAYMENT_METHODS","jsxs","Fragment","jsx","TextInputField","RadioGroupField"],"mappings":";;;;;;;;;AAOO,MAA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aymentMethod.js";
|
|
4
4
|
import y from "../../../assets/icons/trashcan.svg.js";
|
|
5
5
|
import { SPLIT_BY as b } from "../../../shared/constants.js";
|
|
6
|
-
import "classnames";
|
|
7
6
|
import { HamburgerMenu as k } from "../../Common/HamburgerMenu/HamburgerMenu.js";
|
|
8
7
|
import g from "../../../hooks/useNumberFormatter.js";
|
|
9
8
|
import { centsToDollars as A } from "../../../helpers/currencyHelpers.js";
|
|
10
9
|
import { useDataView as T } from "../../Common/DataView/useDataView.js";
|
|
11
10
|
import { DataView as h } from "../../Common/DataView/DataView.js";
|
|
12
|
-
function
|
|
11
|
+
function x() {
|
|
13
12
|
const { bankAccounts: i, paymentMethod: e, mode: m, handleDelete: u, isPending: a } = f(), { t } = d("Employee.PaymentMethod"), l = g(e.splitBy === "Amount" ? "currency" : "percent"), { ...s } = T({
|
|
14
13
|
data: i,
|
|
15
14
|
columns: [
|
|
@@ -46,6 +45,6 @@ function I() {
|
|
|
46
45
|
return /* @__PURE__ */ n(h, { label: t("bankAccountsListLabel"), ...s });
|
|
47
46
|
}
|
|
48
47
|
export {
|
|
49
|
-
|
|
48
|
+
x as BankAccountsList
|
|
50
49
|
};
|
|
51
50
|
//# sourceMappingURL=BankAccountsList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BankAccountsList.js","sources":["../../../../src/components/Employee/PaymentMethod/BankAccountsList.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaymentMethod } from './usePaymentMethod'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { DataView, useDataView } from '@/components/Common'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { SPLIT_BY } from '@/shared/constants'\nimport { centsToDollars } from '@/helpers/currencyHelpers'\n\nexport function BankAccountsList() {\n const { bankAccounts, paymentMethod, mode, handleDelete, isPending } = usePaymentMethod()\n const { t } = useTranslation('Employee.PaymentMethod')\n const format = useNumberFormatter(paymentMethod.splitBy === 'Amount' ? 'currency' : 'percent')\n\n const { ...dataViewProps } = useDataView({\n data: bankAccounts,\n columns: [\n { key: 'name', title: t('nicknameColumn') },\n { key: 'routingNumber', title: t('routingNumberColumn') },\n { key: 'accountType', title: t('accountTypeColumn') },\n {\n key: 'splitAmount',\n title: t('allocationColumn'),\n render: bankAccount => {\n const splitAmount =\n paymentMethod.splits?.find(split => split.uuid === bankAccount.uuid)?.splitAmount ?? 0\n const displayValue =\n paymentMethod.splitBy === SPLIT_BY.amount\n ? (centsToDollars(splitAmount) ?? 0)\n : splitAmount\n return format(displayValue)\n },\n },\n ],\n itemMenu: bankAccount => {\n return (\n <HamburgerMenu\n items={[\n {\n label: t('deleteBankAccountCta'),\n onClick: () => {\n handleDelete(bankAccount.uuid)\n },\n icon: <TrashCanSvg aria-hidden />,\n },\n ]}\n triggerLabel={t('hamburgerTitle')}\n isLoading={isPending}\n />\n )\n },\n })\n\n if (mode !== 'LIST') return\n\n return <DataView label={t('bankAccountsListLabel')} {...dataViewProps} />\n}\n"],"names":["BankAccountsList","bankAccounts","paymentMethod","mode","handleDelete","isPending","usePaymentMethod","useTranslation","format","useNumberFormatter","dataViewProps","useDataView","bankAccount","splitAmount","split","displayValue","SPLIT_BY","centsToDollars","jsx","HamburgerMenu","TrashCanSvg","DataView"],"mappings":"
|
|
1
|
+
{"version":3,"file":"BankAccountsList.js","sources":["../../../../src/components/Employee/PaymentMethod/BankAccountsList.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaymentMethod } from './usePaymentMethod'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { DataView, useDataView } from '@/components/Common'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { SPLIT_BY } from '@/shared/constants'\nimport { centsToDollars } from '@/helpers/currencyHelpers'\n\nexport function BankAccountsList() {\n const { bankAccounts, paymentMethod, mode, handleDelete, isPending } = usePaymentMethod()\n const { t } = useTranslation('Employee.PaymentMethod')\n const format = useNumberFormatter(paymentMethod.splitBy === 'Amount' ? 'currency' : 'percent')\n\n const { ...dataViewProps } = useDataView({\n data: bankAccounts,\n columns: [\n { key: 'name', title: t('nicknameColumn') },\n { key: 'routingNumber', title: t('routingNumberColumn') },\n { key: 'accountType', title: t('accountTypeColumn') },\n {\n key: 'splitAmount',\n title: t('allocationColumn'),\n render: bankAccount => {\n const splitAmount =\n paymentMethod.splits?.find(split => split.uuid === bankAccount.uuid)?.splitAmount ?? 0\n const displayValue =\n paymentMethod.splitBy === SPLIT_BY.amount\n ? (centsToDollars(splitAmount) ?? 0)\n : splitAmount\n return format(displayValue)\n },\n },\n ],\n itemMenu: bankAccount => {\n return (\n <HamburgerMenu\n items={[\n {\n label: t('deleteBankAccountCta'),\n onClick: () => {\n handleDelete(bankAccount.uuid)\n },\n icon: <TrashCanSvg aria-hidden />,\n },\n ]}\n triggerLabel={t('hamburgerTitle')}\n isLoading={isPending}\n />\n )\n },\n })\n\n if (mode !== 'LIST') return\n\n return <DataView label={t('bankAccountsListLabel')} {...dataViewProps} />\n}\n"],"names":["BankAccountsList","bankAccounts","paymentMethod","mode","handleDelete","isPending","usePaymentMethod","useTranslation","format","useNumberFormatter","dataViewProps","useDataView","bankAccount","splitAmount","split","displayValue","SPLIT_BY","centsToDollars","jsx","HamburgerMenu","TrashCanSvg","DataView"],"mappings":";;;;;;;;;;AASO,SAASA,IAAmB;AACjC,QAAM,EAAE,cAAAC,GAAc,eAAAC,GAAe,MAAAC,GAAM,cAAAC,GAAc,WAAAC,EAAA,IAAcC,EAAA,GACjE,EAAE,EAAA,IAAMC,EAAe,wBAAwB,GAC/CC,IAASC,EAAmBP,EAAc,YAAY,WAAW,aAAa,SAAS,GAEvF,EAAE,GAAGQ,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAMV;AAAA,IACN,SAAS;AAAA,MACP,EAAE,KAAK,QAAQ,OAAO,EAAE,gBAAgB,EAAA;AAAA,MACxC,EAAE,KAAK,iBAAiB,OAAO,EAAE,qBAAqB,EAAA;AAAA,MACtD,EAAE,KAAK,eAAe,OAAO,EAAE,mBAAmB,EAAA;AAAA,MAClD;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,kBAAkB;AAAA,QAC3B,QAAQ,CAAAW,MAAe;AACrB,gBAAMC,IACJX,EAAc,QAAQ,KAAK,CAAAY,MAASA,EAAM,SAASF,EAAY,IAAI,GAAG,eAAe,GACjFG,IACJb,EAAc,YAAYc,EAAS,SAC9BC,EAAeJ,CAAW,KAAK,IAChCA;AACN,iBAAOL,EAAOO,CAAY;AAAA,QAC5B;AAAA,MAAA;AAAA,IACF;AAAA,IAEF,UAAU,CAAAH,MAEN,gBAAAM;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,OAAO;AAAA,UACL;AAAA,YACE,OAAO,EAAE,sBAAsB;AAAA,YAC/B,SAAS,MAAM;AACb,cAAAf,EAAaQ,EAAY,IAAI;AAAA,YAC/B;AAAA,YACA,MAAM,gBAAAM,EAACE,GAAA,EAAY,eAAW,GAAA,CAAC;AAAA,UAAA;AAAA,QACjC;AAAA,QAEF,cAAc,EAAE,gBAAgB;AAAA,QAChC,WAAWf;AAAA,MAAA;AAAA,IAAA;AAAA,EAGjB,CACD;AAED,MAAIF,MAAS;AAEb,6BAAQkB,GAAA,EAAS,OAAO,EAAE,uBAAuB,GAAI,GAAGX,GAAe;AACzE;"}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as
|
|
2
|
+
import { useTranslation as c } from "react-i18next";
|
|
3
3
|
import { z as o } from "zod";
|
|
4
|
-
import { usePaymentMethod as
|
|
4
|
+
import { usePaymentMethod as m } from "./usePaymentMethod.js";
|
|
5
5
|
import { PAYMENT_METHODS as r } from "../../../shared/constants.js";
|
|
6
|
-
import "classnames";
|
|
7
6
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
7
|
import "react";
|
|
9
8
|
import { RadioGroupField as n } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
10
9
|
o.object({
|
|
11
10
|
type: o.enum(["Check", "Direct Deposit"])
|
|
12
11
|
});
|
|
13
|
-
function
|
|
14
|
-
const { mode: t, isAdmin: i } =
|
|
12
|
+
function h() {
|
|
13
|
+
const { mode: t, isAdmin: i } = m(), { t: e } = c("Employee.PaymentMethod");
|
|
15
14
|
if (!(t !== "INITIAL" && t !== "LIST"))
|
|
16
15
|
return /* @__PURE__ */ p(
|
|
17
16
|
n,
|
|
@@ -35,6 +34,6 @@ function b() {
|
|
|
35
34
|
);
|
|
36
35
|
}
|
|
37
36
|
export {
|
|
38
|
-
|
|
37
|
+
h as PaymentTypeForm
|
|
39
38
|
};
|
|
40
39
|
//# sourceMappingURL=PaymentTypeForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaymentTypeForm.js","sources":["../../../../src/components/Employee/PaymentMethod/PaymentTypeForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { z } from 'zod'\nimport { usePaymentMethod } from './usePaymentMethod'\nimport { RadioGroupField } from '@/components/Common'\nimport { PAYMENT_METHODS } from '@/shared/constants'\n\nexport const PaymentTypeSchema = z.object({\n type: z.enum(['Check', 'Direct Deposit']),\n})\nexport type PaymentTypeInputs = z.input<typeof PaymentTypeSchema>\nexport type PaymentTypePayload = z.output<typeof PaymentTypeSchema>\n\nexport function PaymentTypeForm() {\n const { mode, isAdmin } = usePaymentMethod()\n const { t } = useTranslation('Employee.PaymentMethod')\n if (mode !== 'INITIAL' && mode !== 'LIST') return\n return (\n <RadioGroupField\n name=\"type\"\n label={t('paymentFieldsetLegend')}\n shouldVisuallyHideLabel\n options={[\n {\n value: PAYMENT_METHODS.directDeposit,\n label: t('directDepositLabel'),\n description: isAdmin ? t('directDepositDescription') : t('directDepositDescriptionSelf'),\n },\n {\n value: PAYMENT_METHODS.check,\n label: t('checkLabel'),\n description: isAdmin ? t('checkDescription') : t('checkDescriptionSelf'),\n },\n ]}\n />\n )\n}\n"],"names":["z","PaymentTypeForm","mode","isAdmin","usePaymentMethod","t","useTranslation","jsx","RadioGroupField","PAYMENT_METHODS"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PaymentTypeForm.js","sources":["../../../../src/components/Employee/PaymentMethod/PaymentTypeForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { z } from 'zod'\nimport { usePaymentMethod } from './usePaymentMethod'\nimport { RadioGroupField } from '@/components/Common'\nimport { PAYMENT_METHODS } from '@/shared/constants'\n\nexport const PaymentTypeSchema = z.object({\n type: z.enum(['Check', 'Direct Deposit']),\n})\nexport type PaymentTypeInputs = z.input<typeof PaymentTypeSchema>\nexport type PaymentTypePayload = z.output<typeof PaymentTypeSchema>\n\nexport function PaymentTypeForm() {\n const { mode, isAdmin } = usePaymentMethod()\n const { t } = useTranslation('Employee.PaymentMethod')\n if (mode !== 'INITIAL' && mode !== 'LIST') return\n return (\n <RadioGroupField\n name=\"type\"\n label={t('paymentFieldsetLegend')}\n shouldVisuallyHideLabel\n options={[\n {\n value: PAYMENT_METHODS.directDeposit,\n label: t('directDepositLabel'),\n description: isAdmin ? t('directDepositDescription') : t('directDepositDescriptionSelf'),\n },\n {\n value: PAYMENT_METHODS.check,\n label: t('checkLabel'),\n description: isAdmin ? t('checkDescription') : t('checkDescriptionSelf'),\n },\n ]}\n />\n )\n}\n"],"names":["z","PaymentTypeForm","mode","isAdmin","usePaymentMethod","t","useTranslation","jsx","RadioGroupField","PAYMENT_METHODS"],"mappings":";;;;;;;;AAMiCA,EAAE,OAAO;AAAA,EACxC,MAAMA,EAAE,KAAK,CAAC,SAAS,gBAAgB,CAAC;AAC1C,CAAC;AAIM,SAASC,IAAkB;AAChC,QAAM,EAAE,MAAAC,GAAM,SAAAC,EAAA,IAAYC,EAAA,GACpB,EAAE,GAAAC,EAAA,IAAMC,EAAe,wBAAwB;AACrD,MAAI,EAAAJ,MAAS,aAAaA,MAAS;AACnC,WACE,gBAAAK;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOH,EAAE,uBAAuB;AAAA,QAChC,yBAAuB;AAAA,QACvB,SAAS;AAAA,UACP;AAAA,YACE,OAAOI,EAAgB;AAAA,YACvB,OAAOJ,EAAE,oBAAoB;AAAA,YAC7B,aAAuBA,EAAVF,IAAY,6BAAgC,8BAAN;AAAA,UAAoC;AAAA,UAEzF;AAAA,YACE,OAAOM,EAAgB;AAAA,YACvB,OAAOJ,EAAE,YAAY;AAAA,YACrB,aAAuBA,EAAVF,IAAY,qBAAwB,sBAAN;AAAA,UAA4B;AAAA,QACzE;AAAA,MACF;AAAA,IAAA;AAGN;"}
|
|
@@ -6,13 +6,12 @@ import y from "dompurify";
|
|
|
6
6
|
import { useMemo as j, useEffect as D } from "react";
|
|
7
7
|
import { usePaymentMethod as N } from "./usePaymentMethod.js";
|
|
8
8
|
import { SPLIT_BY as h } from "../../../shared/constants.js";
|
|
9
|
-
import "classnames";
|
|
10
9
|
import { useComponentContext as q } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
11
10
|
import { useLocale as w } from "../../../contexts/LocaleProvider/useLocale.js";
|
|
12
11
|
import { ReorderableList as I } from "../../Common/ReorderableList/ReorderableList.js";
|
|
13
12
|
import { RadioGroupField as W } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
14
13
|
import { NumberInputField as F } from "../../Common/Fields/NumberInputField/NumberInputField.js";
|
|
15
|
-
function
|
|
14
|
+
function oe() {
|
|
16
15
|
const { paymentMethod: r, bankAccounts: m, mode: c } = N(), {
|
|
17
16
|
control: s,
|
|
18
17
|
setValue: o,
|
|
@@ -169,6 +168,6 @@ function G({
|
|
|
169
168
|
) }, r.uuid);
|
|
170
169
|
}
|
|
171
170
|
export {
|
|
172
|
-
|
|
171
|
+
oe as Split
|
|
173
172
|
};
|
|
174
173
|
//# sourceMappingURL=Split.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Split.js","sources":["../../../../src/components/Employee/PaymentMethod/Split.tsx"],"sourcesContent":["import type { Control } from 'react-hook-form'\nimport { useFormContext } from 'react-hook-form'\nimport { Trans, useTranslation } from 'react-i18next'\nimport { type EmployeePaymentMethod } from '@gusto/embedded-api/models/components/employeepaymentmethod'\nimport { ErrorMessage } from '@hookform/error-message'\nimport { Fragment } from 'react/jsx-runtime'\nimport DOMPurify from 'dompurify'\nimport { useEffect, useMemo } from 'react'\nimport { usePaymentMethod, type CombinedSchemaInputs } from './usePaymentMethod'\nimport { NumberInputField, RadioGroupField } from '@/components/Common'\nimport { useLocale } from '@/contexts/LocaleProvider'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { ReorderableList } from '@/components/Common/ReorderableList'\nimport { SPLIT_BY } from '@/shared/constants'\n\ntype Split = NonNullable<EmployeePaymentMethod['splits']>[number]\n\nexport function Split() {\n const { paymentMethod, bankAccounts, mode } = usePaymentMethod()\n const {\n control,\n setValue,\n resetField,\n watch,\n formState: { errors },\n } = useFormContext<CombinedSchemaInputs>()\n const { t } = useTranslation('Employee.PaymentMethod')\n const splitBy = watch('splitBy')\n const priorities = watch('priority')\n\n const splits = useMemo(() => paymentMethod.splits ?? [], [paymentMethod.splits])\n\n const remainderId = Object.entries(priorities).reduce(\n (maxId, [uuid, priority]) => (!maxId || (priorities[maxId] ?? 0) < priority ? uuid : maxId),\n '',\n )\n\n const { currency } = useLocale()\n\n // Handle splitBy value changes\n useEffect(() => {\n // Only run cleanup if splits exist\n if (!splits.length) return\n\n // Clean up when switching modes\n if (splitBy === SPLIT_BY.amount) {\n // When switching to amount mode, set the last item as remainder (null) and others to 0\n const newAmountValues = splits.reduce<Record<string, number | null>>((acc, curr) => {\n acc[curr.uuid] = curr.uuid === remainderId ? null : 0\n return acc\n }, {})\n setValue('splitAmount', newAmountValues)\n } else {\n // When switching to percentage mode, set the first item to 100% and others to 0\n const newPercentageValues = splits.reduce<Record<string, number>>((acc, curr, index) => {\n acc[curr.uuid] = index === 0 ? 100 : 0\n return acc\n }, {})\n setValue('splitAmount', newPercentageValues)\n }\n }, [splitBy, splits, remainderId, setValue])\n\n const Components = useComponentContext()\n\n if (mode !== 'SPLIT' || bankAccounts.length < 2 || paymentMethod.splits === null) return null\n //Used by form schema to determine variant\n setValue('isSplit', true)\n\n const updateSplitAmount = (uuid: string, value: number | null) => {\n setValue(`splitAmount.${uuid}`, value)\n }\n\n const handleReorder = (newOrder: number[]) => {\n // Calculate new priorities based on new order\n const newPriorities = newOrder.reduce(\n (acc: Record<string, number>, curr: number, currIndex: number) => {\n const split = splits[curr]\n return split ? { ...acc, [split.uuid]: currIndex + 1 } : acc\n },\n {},\n )\n\n // Get the last split in the new order\n const lastSplitIndex = newOrder[newOrder.length - 1]\n if (lastSplitIndex === undefined) return\n\n const lastSplit = splits[lastSplitIndex]\n if (!lastSplit) return\n\n // Update priorities\n setValue('priority', newPriorities)\n\n // Clear the previous remainder if different from the new one\n if (remainderId && remainderId !== lastSplit.uuid) {\n resetField(`splitAmount.${remainderId}`)\n updateSplitAmount(remainderId, 0)\n }\n\n // Set the new last item to null (remainder)\n updateSplitAmount(lastSplit.uuid, null)\n }\n\n const renderFieldsList = () => {\n if (splitBy === SPLIT_BY.amount) {\n return (\n <ReorderableList\n key={`reorderable-amount-list-${splitBy}`}\n label={t('draggableListLabel')}\n items={splits.map(split => ({\n label: split.name as string,\n content: (\n <AmountField\n key={`amount-${split.uuid}`}\n split={split}\n onChange={value => {\n updateSplitAmount(split.uuid, value)\n }}\n remainderId={remainderId}\n />\n ),\n }))}\n onReorder={handleReorder}\n />\n )\n }\n\n return splits.map(split => (\n <PercentageField\n key={`percentage-${split.uuid}`}\n split={split}\n control={control}\n onChange={value => {\n updateSplitAmount(split.uuid, value)\n }}\n currency={currency}\n />\n ))\n }\n\n return (\n <>\n <ErrorMessage\n errors={errors}\n name=\"splitAmount.root\"\n render={({ message }) => {\n // Handle enhanced error messages with current total\n if (message && message.startsWith('percentage_split_total_error:')) {\n const total = message.split(':')[1] || '0'\n return (\n <Components.Alert\n status=\"error\"\n label={t('validations.percentageErrorWithTotal', { total })}\n />\n )\n }\n // Fallback to original error message\n return <Components.Alert status=\"error\" label={t('validations.percentageError')} />\n }}\n />\n <Components.Heading as=\"h2\">{t('title')}</Components.Heading>\n <Trans t={t} i18nKey=\"splitDescription\" components={{ p: <Components.Text /> }} />\n <RadioGroupField\n name=\"splitBy\"\n label={t('splitByLabel')}\n options={[\n { value: SPLIT_BY.percentage, label: t('percentageLabel') },\n { value: SPLIT_BY.amount, label: t('amountLabel') },\n ]}\n />\n {paymentMethod.splits && renderFieldsList()}\n </>\n )\n}\n\nfunction AmountField({\n split,\n remainderId,\n onChange,\n}: {\n split: Split\n remainderId: string\n onChange: (value: number | null) => void\n}) {\n const { t } = useTranslation('Employee.PaymentMethod')\n return (\n <NumberInputField\n name={`splitAmount.${split.uuid}`}\n label={t('splitAmountLabel', {\n name: DOMPurify.sanitize(split.name ?? ''),\n account_number: DOMPurify.sanitize(split.hiddenAccountNumber ?? ''),\n interpolation: { escapeValue: false },\n })}\n format=\"currency\"\n min={0}\n isRequired\n errorMessage={t('validations.amountError')}\n placeholder={remainderId === split.uuid ? t('remainderLabel') : ''}\n isDisabled={remainderId === split.uuid}\n onChange={onChange}\n />\n )\n}\n\nfunction PercentageField({\n split,\n control,\n onChange,\n currency,\n}: {\n split: Split\n control: Control<CombinedSchemaInputs>\n onChange: (value: number) => void\n currency?: string\n}) {\n const { t } = useTranslation('Employee.PaymentMethod')\n return (\n <Fragment key={split.uuid}>\n <NumberInputField\n name={`splitAmount.${split.uuid}`}\n label={t('splitAmountLabel', {\n name: DOMPurify.sanitize(split.name ?? ''),\n account_number: DOMPurify.sanitize(split.hiddenAccountNumber ?? ''),\n interpolation: { escapeValue: false },\n })}\n format=\"percent\"\n min={0}\n isRequired\n errorMessage={t('validations.amountError')}\n onChange={onChange}\n />\n </Fragment>\n )\n}\n"],"names":["Split","paymentMethod","bankAccounts","mode","usePaymentMethod","control","setValue","resetField","watch","errors","useFormContext","t","useTranslation","splitBy","priorities","splits","useMemo","remainderId","maxId","uuid","priority","currency","useLocale","useEffect","SPLIT_BY","newAmountValues","acc","curr","newPercentageValues","index","Components","useComponentContext","updateSplitAmount","value","handleReorder","newOrder","newPriorities","currIndex","split","lastSplitIndex","lastSplit","renderFieldsList","jsx","ReorderableList","AmountField","PercentageField","jsxs","Fragment","ErrorMessage","message","total","Trans","RadioGroupField","onChange","NumberInputField","DOMPurify"],"mappings":";;;;;;;;;;;;;;AAiBO,SAASA,KAAQ;AACtB,QAAM,EAAE,eAAAC,GAAe,cAAAC,GAAc,MAAAC,EAAA,IAASC,EAAA,GACxC;AAAA,IACJ,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,YAAAC;AAAA,IACA,OAAAC;AAAA,IACA,WAAW,EAAE,QAAAC,EAAA;AAAA,EAAO,IAClBC,EAAA,GACE,EAAE,GAAAC,EAAA,IAAMC,EAAe,wBAAwB,GAC/CC,IAAUL,EAAM,SAAS,GACzBM,IAAaN,EAAM,UAAU,GAE7BO,IAASC,EAAQ,MAAMf,EAAc,UAAU,IAAI,CAACA,EAAc,MAAM,CAAC,GAEzEgB,IAAc,OAAO,QAAQH,CAAU,EAAE;AAAA,IAC7C,CAACI,GAAO,CAACC,GAAMC,CAAQ,MAAO,CAACF,MAAUJ,EAAWI,CAAK,KAAK,KAAKE,IAAWD,IAAOD;AAAA,IACrF;AAAA,EAAA,GAGI,EAAE,UAAAG,EAAA,IAAaC,EAAA;AAGrB,EAAAC,EAAU,MAAM;AAEd,QAAKR,EAAO;AAGZ,UAAIF,MAAYW,EAAS,QAAQ;AAE/B,cAAMC,IAAkBV,EAAO,OAAsC,CAACW,GAAKC,OACzED,EAAIC,EAAK,IAAI,IAAIA,EAAK,SAASV,IAAc,OAAO,GAC7CS,IACN,C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A,UAAAgD;AAAA,EACA,UAAAhC;AACF,GAKG;AACD,QAAM,EAAE,GAAAV,EAAA,IAAMC,EAAe,wBAAwB;AACrD,SACE,gBAAA8B,EAACK,GAAA,EACC,UAAA,gBAAAL;AAAA,IAACY;AAAA,IAAA;AAAA,MACC,MAAM,eAAehB,EAAM,IAAI;AAAA,MAC/B,OAAO3B,EAAE,oBAAoB;AAAA,QAC3B,MAAM4C,EAAU,SAASjB,EAAM,QAAQ,EAAE;AAAA,QACzC,gBAAgBiB,EAAU,SAASjB,EAAM,uBAAuB,EAAE;AAAA,QAClE,eAAe,EAAE,aAAa,GAAA;AAAA,MAAM,CACrC;AAAA,MACD,QAAO;AAAA,MACP,KAAK;AAAA,MACL,YAAU;AAAA,MACV,cAAc3B,EAAE,yBAAyB;AAAA,MACzC,UAAA0C;AAAA,IAAA;AAAA,EAAA,EACF,GAbaf,EAAM,IAcrB;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"Split.js","sources":["../../../../src/components/Employee/PaymentMethod/Split.tsx"],"sourcesContent":["import type { Control } from 'react-hook-form'\nimport { useFormContext } from 'react-hook-form'\nimport { Trans, useTranslation } from 'react-i18next'\nimport { type EmployeePaymentMethod } from '@gusto/embedded-api/models/components/employeepaymentmethod'\nimport { ErrorMessage } from '@hookform/error-message'\nimport { Fragment } from 'react/jsx-runtime'\nimport DOMPurify from 'dompurify'\nimport { useEffect, useMemo } from 'react'\nimport { usePaymentMethod, type CombinedSchemaInputs } from './usePaymentMethod'\nimport { NumberInputField, RadioGroupField } from '@/components/Common'\nimport { useLocale } from '@/contexts/LocaleProvider'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { ReorderableList } from '@/components/Common/ReorderableList'\nimport { SPLIT_BY } from '@/shared/constants'\n\ntype Split = NonNullable<EmployeePaymentMethod['splits']>[number]\n\nexport function Split() {\n const { paymentMethod, bankAccounts, mode } = usePaymentMethod()\n const {\n control,\n setValue,\n resetField,\n watch,\n formState: { errors },\n } = useFormContext<CombinedSchemaInputs>()\n const { t } = useTranslation('Employee.PaymentMethod')\n const splitBy = watch('splitBy')\n const priorities = watch('priority')\n\n const splits = useMemo(() => paymentMethod.splits ?? [], [paymentMethod.splits])\n\n const remainderId = Object.entries(priorities).reduce(\n (maxId, [uuid, priority]) => (!maxId || (priorities[maxId] ?? 0) < priority ? uuid : maxId),\n '',\n )\n\n const { currency } = useLocale()\n\n // Handle splitBy value changes\n useEffect(() => {\n // Only run cleanup if splits exist\n if (!splits.length) return\n\n // Clean up when switching modes\n if (splitBy === SPLIT_BY.amount) {\n // When switching to amount mode, set the last item as remainder (null) and others to 0\n const newAmountValues = splits.reduce<Record<string, number | null>>((acc, curr) => {\n acc[curr.uuid] = curr.uuid === remainderId ? null : 0\n return acc\n }, {})\n setValue('splitAmount', newAmountValues)\n } else {\n // When switching to percentage mode, set the first item to 100% and others to 0\n const newPercentageValues = splits.reduce<Record<string, number>>((acc, curr, index) => {\n acc[curr.uuid] = index === 0 ? 100 : 0\n return acc\n }, {})\n setValue('splitAmount', newPercentageValues)\n }\n }, [splitBy, splits, remainderId, setValue])\n\n const Components = useComponentContext()\n\n if (mode !== 'SPLIT' || bankAccounts.length < 2 || paymentMethod.splits === null) return null\n //Used by form schema to determine variant\n setValue('isSplit', true)\n\n const updateSplitAmount = (uuid: string, value: number | null) => {\n setValue(`splitAmount.${uuid}`, value)\n }\n\n const handleReorder = (newOrder: number[]) => {\n // Calculate new priorities based on new order\n const newPriorities = newOrder.reduce(\n (acc: Record<string, number>, curr: number, currIndex: number) => {\n const split = splits[curr]\n return split ? { ...acc, [split.uuid]: currIndex + 1 } : acc\n },\n {},\n )\n\n // Get the last split in the new order\n const lastSplitIndex = newOrder[newOrder.length - 1]\n if (lastSplitIndex === undefined) return\n\n const lastSplit = splits[lastSplitIndex]\n if (!lastSplit) return\n\n // Update priorities\n setValue('priority', newPriorities)\n\n // Clear the previous remainder if different from the new one\n if (remainderId && remainderId !== lastSplit.uuid) {\n resetField(`splitAmount.${remainderId}`)\n updateSplitAmount(remainderId, 0)\n }\n\n // Set the new last item to null (remainder)\n updateSplitAmount(lastSplit.uuid, null)\n }\n\n const renderFieldsList = () => {\n if (splitBy === SPLIT_BY.amount) {\n return (\n <ReorderableList\n key={`reorderable-amount-list-${splitBy}`}\n label={t('draggableListLabel')}\n items={splits.map(split => ({\n label: split.name as string,\n content: (\n <AmountField\n key={`amount-${split.uuid}`}\n split={split}\n onChange={value => {\n updateSplitAmount(split.uuid, value)\n }}\n remainderId={remainderId}\n />\n ),\n }))}\n onReorder={handleReorder}\n />\n )\n }\n\n return splits.map(split => (\n <PercentageField\n key={`percentage-${split.uuid}`}\n split={split}\n control={control}\n onChange={value => {\n updateSplitAmount(split.uuid, value)\n }}\n currency={currency}\n />\n ))\n }\n\n return (\n <>\n <ErrorMessage\n errors={errors}\n name=\"splitAmount.root\"\n render={({ message }) => {\n // Handle enhanced error messages with current total\n if (message && message.startsWith('percentage_split_total_error:')) {\n const total = message.split(':')[1] || '0'\n return (\n <Components.Alert\n status=\"error\"\n label={t('validations.percentageErrorWithTotal', { total })}\n />\n )\n }\n // Fallback to original error message\n return <Components.Alert status=\"error\" label={t('validations.percentageError')} />\n }}\n />\n <Components.Heading as=\"h2\">{t('title')}</Components.Heading>\n <Trans t={t} i18nKey=\"splitDescription\" components={{ p: <Components.Text /> }} />\n <RadioGroupField\n name=\"splitBy\"\n label={t('splitByLabel')}\n options={[\n { value: SPLIT_BY.percentage, label: t('percentageLabel') },\n { value: SPLIT_BY.amount, label: t('amountLabel') },\n ]}\n />\n {paymentMethod.splits && renderFieldsList()}\n </>\n )\n}\n\nfunction AmountField({\n split,\n remainderId,\n onChange,\n}: {\n split: Split\n remainderId: string\n onChange: (value: number | null) => void\n}) {\n const { t } = useTranslation('Employee.PaymentMethod')\n return (\n <NumberInputField\n name={`splitAmount.${split.uuid}`}\n label={t('splitAmountLabel', {\n name: DOMPurify.sanitize(split.name ?? ''),\n account_number: DOMPurify.sanitize(split.hiddenAccountNumber ?? ''),\n interpolation: { escapeValue: false },\n })}\n format=\"currency\"\n min={0}\n isRequired\n errorMessage={t('validations.amountError')}\n placeholder={remainderId === split.uuid ? t('remainderLabel') : ''}\n isDisabled={remainderId === split.uuid}\n onChange={onChange}\n />\n )\n}\n\nfunction PercentageField({\n split,\n control,\n onChange,\n currency,\n}: {\n split: Split\n control: Control<CombinedSchemaInputs>\n onChange: (value: number) => void\n currency?: string\n}) {\n const { t } = useTranslation('Employee.PaymentMethod')\n return (\n <Fragment key={split.uuid}>\n <NumberInputField\n name={`splitAmount.${split.uuid}`}\n label={t('splitAmountLabel', {\n name: DOMPurify.sanitize(split.name ?? ''),\n account_number: DOMPurify.sanitize(split.hiddenAccountNumber ?? ''),\n interpolation: { escapeValue: false },\n })}\n format=\"percent\"\n min={0}\n isRequired\n errorMessage={t('validations.amountError')}\n onChange={onChange}\n />\n </Fragment>\n )\n}\n"],"names":["Split","paymentMethod","bankAccounts","mode","usePaymentMethod","control","setValue","resetField","watch","errors","useFormContext","t","useTranslation","splitBy","priorities","splits","useMemo","remainderId","maxId","uuid","priority","currency","useLocale","useEffect","SPLIT_BY","newAmountValues","acc","curr","newPercentageValues","index","Components","useComponentContext","updateSplitAmount","value","handleReorder","newOrder","newPriorities","currIndex","split","lastSplitIndex","lastSplit","renderFieldsList","jsx","ReorderableList","AmountField","PercentageField","jsxs","Fragment","ErrorMessage","message","total","Trans","RadioGroupField","onChange","NumberInputField","DOMPurify"],"mappings":";;;;;;;;;;;;;AAiBO,SAASA,KAAQ;AACtB,QAAM,EAAE,eAAAC,GAAe,cAAAC,GAAc,MAAAC,EAAA,IAASC,EAAA,GACxC;AAAA,IACJ,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,YAAAC;AAAA,IACA,OAAAC;AAAA,IACA,WAAW,EAAE,QAAAC,EAAA;AAAA,EAAO,IAClBC,EAAA,GACE,EAAE,GAAAC,EAAA,IAAMC,EAAe,wBAAwB,GAC/CC,IAAUL,EAAM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AehB,EAAM,IAAI;AAAA,MAC/B,OAAO3B,EAAE,oBAAoB;AAAA,QAC3B,MAAM4C,EAAU,SAASjB,EAAM,QAAQ,EAAE;AAAA,QACzC,gBAAgBiB,EAAU,SAASjB,EAAM,uBAAuB,EAAE;AAAA,QAClE,eAAe,EAAE,aAAa,GAAA;AAAA,MAAM,CACrC;AAAA,MACD,QAAO;AAAA,MACP,KAAK;AAAA,MACL,YAAU;AAAA,MACV,cAAc3B,EAAE,yBAAyB;AAAA,MACzC,aAAaM,MAAgBqB,EAAM,OAAO3B,EAAE,gBAAgB,IAAI;AAAA,MAChE,YAAYM,MAAgBqB,EAAM;AAAA,MAClC,UAAAe;AAAA,IAAA;AAAA,EAAA;AAGN;AAEA,SAASR,EAAgB;AAAA,EACvB,OAAAP;AAAA,EACA,SAAAjC;AAAA,EACA,UAAAgD;AAAA,EACA,UAAAhC;AACF,GAKG;AACD,QAAM,EAAE,GAAAV,EAAA,IAAMC,EAAe,wBAAwB;AACrD,SACE,gBAAA8B,EAACK,GAAA,EACC,UAAA,gBAAAL;AAAA,IAACY;AAAA,IAAA;AAAA,MACC,MAAM,eAAehB,EAAM,IAAI;AAAA,MAC/B,OAAO3B,EAAE,oBAAoB;AAAA,QAC3B,MAAM4C,EAAU,SAASjB,EAAM,QAAQ,EAAE;AAAA,QACzC,gBAAgBiB,EAAU,SAASjB,EAAM,uBAAuB,EAAE;AAAA,QAClE,eAAe,EAAE,aAAa,GAAA;AAAA,MAAM,CACrC;AAAA,MACD,QAAO;AAAA,MACP,KAAK;AAAA,MACL,YAAU;AAAA,MACV,cAAc3B,EAAE,yBAAyB;AAAA,MACzC,UAAA0C;AAAA,IAAA;AAAA,EAAA,EACF,GAbaf,EAAM,IAcrB;AAEJ;"}
|
|
@@ -9,10 +9,10 @@ import "@gusto/embedded-api/models/errors/sdkvalidationerror";
|
|
|
9
9
|
import "@tanstack/react-query";
|
|
10
10
|
import "../../Base/useBase.js";
|
|
11
11
|
import "../../../shared/constants.js";
|
|
12
|
-
import "classnames";
|
|
13
12
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
13
|
import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
15
14
|
import "dompurify";
|
|
15
|
+
import "../../../contexts/LocaleProvider/useLocale.js";
|
|
16
16
|
import { createCompoundContext as a } from "../../Base/createCompoundContext.js";
|
|
17
17
|
const x = t.union([
|
|
18
18
|
l.extend({
|