@gusto/embedded-react-sdk 0.44.1 → 0.45.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 +63 -0
- package/dist/components/Common/DetailViewLayout/DetailViewLayout.js +7 -7
- package/dist/components/Common/DetailViewLayout/DetailViewLayout.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.js +24 -23
- package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.module.scss.js +16 -14
- package/dist/components/Common/UI/Alert/Alert.module.scss.js.map +1 -1
- package/dist/components/Common/UI/Alert/AlertTypes.d.ts +8 -0
- package/dist/components/Common/UI/Alert/AlertTypes.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +38 -38
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -20
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/Head.js +12 -9
- package/dist/components/Company/AssignSignatory/Head.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +25 -25
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -20
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -22
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Head.js +11 -8
- package/dist/components/Company/BankAccount/BankAccountForm/Head.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -20
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Head.js +44 -39
- package/dist/components/Company/BankAccount/BankAccountList/Head.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -20
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +28 -28
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +9 -9
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Head.js +7 -6
- package/dist/components/Company/FederalTaxes/Head.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +12 -28
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +7 -23
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Head.js +10 -9
- package/dist/components/Company/Industry/Head.js.map +1 -1
- package/dist/components/Company/Industry/IndustrySelect.js +22 -19
- package/dist/components/Company/Industry/IndustrySelect.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Head.js +9 -8
- package/dist/components/Company/Locations/LocationForm/Head.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -20
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Head.js +11 -10
- package/dist/components/Company/Locations/LocationsList/Head.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +11 -11
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -20
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +4 -20
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleList.js +18 -18
- package/dist/components/Company/PaySchedule/PayScheduleList.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -20
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -20
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +6 -22
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +7 -7
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +2 -2
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Profile/useContractorProfile.js +42 -52
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Employee/Compensation/index.d.ts +1 -1
- package/dist/components/Employee/Compensation/{Compensation.d.ts → onboarding/Compensation.d.ts} +3 -3
- package/dist/components/Employee/Compensation/onboarding/Compensation.js +88 -0
- package/dist/components/Employee/Compensation/onboarding/Compensation.js.map +1 -0
- package/dist/components/Employee/Compensation/{CompensationFlowComponents.d.ts → onboarding/CompensationFlowComponents.d.ts} +3 -3
- package/dist/components/Employee/Compensation/onboarding/CompensationFlowComponents.js +59 -0
- package/dist/components/Employee/Compensation/onboarding/CompensationFlowComponents.js.map +1 -0
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.d.ts +21 -0
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js +249 -0
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js.map +1 -0
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.module.scss.js +8 -0
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.module.scss.js.map +1 -0
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/index.d.ts +3 -0
- package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/JobsList.d.ts +1 -1
- package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.js +43 -0
- package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.js.map +1 -0
- package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/JobsListPresentation.js +10 -10
- package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.js.map +1 -0
- package/dist/components/Employee/Compensation/{compensationStateMachine.js → onboarding/compensationStateMachine.js} +1 -1
- package/dist/components/Employee/Compensation/onboarding/compensationStateMachine.js.map +1 -0
- package/dist/components/Employee/Compensation/onboarding/index.d.ts +2 -0
- package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.d.ts +9 -0
- package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.js +10 -0
- package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.js.map +1 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts +7 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js +41 -35
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/index.d.ts +0 -2
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.d.ts +24 -3
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +193 -181
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/index.d.ts +0 -2
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.d.ts +8 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js +14 -13
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.d.ts +19 -2
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +133 -130
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
- package/dist/components/Employee/Dashboard/BasicDetailsView.d.ts +13 -0
- package/dist/components/Employee/Dashboard/BasicDetailsView.js +87 -65
- package/dist/components/Employee/Dashboard/BasicDetailsView.js.map +1 -1
- package/dist/components/Employee/Dashboard/CompensationCard.d.ts +13 -0
- package/dist/components/Employee/Dashboard/Dashboard.js +89 -109
- package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
- package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +15 -0
- package/dist/components/Employee/Dashboard/DashboardComponents.js +120 -25
- package/dist/components/Employee/Dashboard/DashboardComponents.js.map +1 -1
- package/dist/components/Employee/Dashboard/DocumentsView.d.ts +11 -0
- package/dist/components/Employee/Dashboard/DocumentsView.js +24 -17
- package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -1
- package/dist/components/Employee/Dashboard/JobAndPayView.d.ts +9 -17
- package/dist/components/Employee/Dashboard/JobAndPayView.js +495 -114
- package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -1
- package/dist/components/Employee/Dashboard/PendingChangesReviewModal.d.ts +10 -0
- package/dist/components/Employee/Dashboard/PendingChangesReviewModal.js +64 -0
- package/dist/components/Employee/Dashboard/PendingChangesReviewModal.js.map +1 -0
- package/dist/components/Employee/Dashboard/TaxesView.d.ts +13 -0
- package/dist/components/Employee/Dashboard/TaxesView.js +82 -60
- package/dist/components/Employee/Dashboard/TaxesView.js.map +1 -1
- package/dist/components/Employee/Dashboard/dashboardStateMachine.d.ts +7 -0
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js +227 -40
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
- package/dist/components/Employee/Dashboard/getPendingCompensationChanges.d.ts +50 -0
- package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js +57 -0
- package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js.map +1 -0
- package/dist/components/Employee/Dashboard/getPendingCompensationChanges.test.d.ts +1 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js +7 -4
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js.map +1 -1
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.d.ts +14 -8
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js +60 -36
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js.map +1 -1
- package/dist/components/Employee/Dashboard/usePendingChangeDetailRenderer.d.ts +8 -0
- package/dist/components/Employee/Dashboard/usePendingChangeDetailRenderer.js +61 -0
- package/dist/components/Employee/Dashboard/usePendingChangeDetailRenderer.js.map +1 -0
- package/dist/components/Employee/Deductions/Deductions.d.ts +2 -8
- package/dist/components/Employee/Deductions/Deductions.js +25 -52
- package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportFormView.d.ts +9 -0
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportFormView.js +137 -0
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportFormView.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.d.ts +9 -5
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +97 -94
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.d.ts +18 -0
- package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js +137 -0
- package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.d.ts +10 -5
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +57 -77
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.d.ts +5 -5
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +29 -39
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js +8 -6
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js.map +1 -1
- package/dist/components/Employee/Deductions/{DeductionsComponents.d.ts → deductionsContextualComponents.d.ts} +7 -8
- package/dist/components/Employee/Deductions/deductionsContextualComponents.js +74 -0
- package/dist/components/Employee/Deductions/deductionsContextualComponents.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.d.ts +7 -0
- package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.js +31 -0
- package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/formatDeductionAmount.d.ts +7 -0
- package/dist/components/Employee/Deductions/shared/formatDeductionAmount.js +10 -0
- package/dist/components/Employee/Deductions/shared/formatDeductionAmount.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/formatDeductionAmount.test.d.ts +1 -0
- package/dist/components/Employee/Deductions/shared/index.d.ts +7 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.d.ts +63 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js +64 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.d.ts +36 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js +39 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/index.d.ts +4 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.d.ts +62 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js +208 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.d.ts +63 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.js +52 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.d.ts +25 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js +36 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/index.d.ts +4 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.d.ts +64 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js +203 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/useDeductionsList.d.ts +22 -0
- package/dist/components/Employee/Deductions/shared/useDeductionsList.js +50 -0
- package/dist/components/Employee/Deductions/shared/useDeductionsList.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/useDeleteDeduction.d.ts +13 -0
- package/dist/components/Employee/Deductions/shared/useDeleteDeduction.js +17 -0
- package/dist/components/Employee/Deductions/shared/useDeleteDeduction.js.map +1 -0
- package/dist/components/Employee/Deductions/stateMachine.d.ts +4 -5
- package/dist/components/Employee/Deductions/stateMachine.js +67 -89
- package/dist/components/Employee/Deductions/stateMachine.js.map +1 -1
- package/dist/components/Employee/Documents/management/DocumentManager.d.ts +6 -0
- package/dist/components/Employee/Documents/management/DocumentManager.js +60 -0
- package/dist/components/Employee/Documents/management/DocumentManager.js.map +1 -0
- package/dist/components/Employee/Documents/management/index.d.ts +3 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Actions.js +3 -3
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/DocumentList.d.ts +1 -1
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/DocumentList.js +5 -5
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Head.js +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Head.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/List.js +3 -3
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.js.map +1 -0
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +8 -0
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentSigner.d.ts +1 -1
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentSigner.js +5 -5
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibility.d.ts +1 -1
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibility.js +4 -4
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilityPresentation.js +11 -11
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -0
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +1 -0
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.test.d.ts +1 -0
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/countries.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.d.ts +1 -1
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.js +11 -11
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/documentSignerStateMachine.d.ts +2 -2
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/documentSignerStateMachine.js +8 -8
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/documentSignerStateMachine.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/stateMachine.js +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/stateMachine.js.map +1 -0
- package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/EmployeeDocuments.d.ts +3 -3
- package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/EmployeeDocuments.js +6 -6
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js.map +1 -0
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.js +117 -0
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/shared}/SignatureForm/SignatureForm.d.ts +1 -1
- package/dist/components/Employee/{DocumentSigner → Documents/shared}/SignatureForm/SignatureForm.js +11 -11
- package/dist/components/Employee/Documents/shared/SignatureForm/SignatureForm.js.map +1 -0
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js.map +1 -0
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +1 -0
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -0
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +89 -82
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.js +37 -35
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.d.ts +1 -0
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +14 -8
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +38 -39
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +29 -27
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/index.d.ts +1 -1
- package/dist/components/Employee/PaymentMethod/management/ListView.d.ts +8 -0
- package/dist/components/Employee/PaymentMethod/management/ListView.js +138 -0
- package/dist/components/Employee/PaymentMethod/management/ListView.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/management/PaymentMethod.d.ts +11 -0
- package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js +49 -0
- package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.d.ts +8 -0
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.js +23 -0
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/management/index.d.ts +4 -0
- package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.d.ts +5 -0
- package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.js +75 -0
- package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/onboarding/BankForm.d.ts +8 -0
- package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +66 -0
- package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/onboarding/ListView.d.ts +9 -0
- package/dist/components/Employee/PaymentMethod/onboarding/ListView.js +168 -0
- package/dist/components/Employee/PaymentMethod/onboarding/ListView.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.d.ts +11 -0
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js +44 -0
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethodComponents.d.ts +8 -0
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethodComponents.js +23 -0
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethodComponents.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/onboarding/SplitView.d.ts +8 -0
- package/dist/components/Employee/PaymentMethod/onboarding/SplitView.js +97 -0
- package/dist/components/Employee/PaymentMethod/onboarding/SplitView.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/onboarding/index.d.ts +2 -0
- package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.d.ts +5 -0
- package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.js +75 -0
- package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/DeleteBankAccountDialog.d.ts +9 -0
- package/dist/components/Employee/PaymentMethod/shared/DeleteBankAccountDialog.js +31 -0
- package/dist/components/Employee/PaymentMethod/shared/DeleteBankAccountDialog.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/index.d.ts +7 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.d.ts +15 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js +22 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/index.d.ts +5 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.d.ts +37 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.js +105 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.d.ts +39 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.js +26 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/useDeleteBankAccount.d.ts +13 -0
- package/dist/components/Employee/PaymentMethod/shared/useDeleteBankAccount.js +19 -0
- package/dist/components/Employee/PaymentMethod/shared/useDeleteBankAccount.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.d.ts +6 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.js +9 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/index.d.ts +5 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.d.ts +31 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.js +94 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.d.ts +31 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.js +22 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.d.ts +20 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.js +68 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/fields.d.ts +6 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/fields.js +9 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/fields.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/index.d.ts +6 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.d.ts +48 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js +46 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.d.ts +65 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.js +209 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.d.ts +53 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.js +93 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.js.map +1 -0
- package/dist/components/Employee/Profile/onboarding/AdminProfile.js +88 -87
- package/dist/components/Employee/Profile/onboarding/AdminProfile.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js +2 -2
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
- package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js +19 -17
- package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js.map +1 -1
- package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.module.scss.js +8 -0
- package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.module.scss.js.map +1 -0
- package/dist/components/Employee/Taxes/FederalForm.js +27 -26
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalHead.js +13 -10
- package/dist/components/Employee/Taxes/FederalHead.js.map +1 -1
- package/dist/components/Employee/Taxes/StateForm.js +17 -14
- package/dist/components/Employee/Taxes/StateForm.js.map +1 -1
- package/dist/components/Employee/Taxes/Taxes.js +75 -69
- package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +4 -20
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.js +26 -26
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
- package/dist/components/Employee/exports/employeeManagement.d.ts +4 -1
- package/dist/components/Employee/exports/employeeManagement.js +22 -18
- package/dist/components/Employee/exports/employeeManagement.js.map +1 -1
- package/dist/components/Employee/exports/employeeOnboarding.d.ts +3 -3
- package/dist/components/Employee/exports/employeeOnboarding.js +4 -4
- package/dist/components/Employee/index.d.ts +4 -4
- package/dist/components/Employee/index.js +5 -5
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +26 -34
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +35 -35
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.d.ts +1 -1
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js +71 -54
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js.map +1 -1
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.d.ts +1 -1
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +22 -36
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js +84 -82
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js.map +1 -1
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.d.ts +1 -1
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js +49 -48
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js.map +1 -1
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailTypes.d.ts +1 -0
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +39 -37
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -1
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js +31 -31
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +1 -1
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormTypes.d.ts +1 -0
- package/dist/components/TimeOff/PolicyList/PolicyList.js +27 -27
- package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -1
- package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js +50 -50
- package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js.map +1 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettings.d.ts +1 -0
- package/dist/components/TimeOff/PolicySettings/PolicySettings.js +66 -41
- package/dist/components/TimeOff/PolicySettings/PolicySettings.js.map +1 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.d.ts +1 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js +59 -48
- package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js.map +1 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettingsTypes.d.ts +3 -0
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +34 -33
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +3 -0
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js +69 -61
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js +119 -75
- package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +72 -61
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.d.ts +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +103 -84
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormTypes.d.ts +2 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +51 -49
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.d.ts +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js +78 -59
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.module.scss.js +8 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.module.scss.js.map +1 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +6 -2
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +209 -154
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.d.ts +3 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js +36 -34
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js +136 -134
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.module.scss.js +6 -6
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.d.ts +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js +63 -65
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailTypes.d.ts +1 -0
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +50 -49
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -1
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.module.scss.js +4 -4
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.d.ts +1 -1
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js +66 -55
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js.map +1 -1
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayoutTypes.d.ts +1 -0
- package/dist/contexts/ApiProvider/ApiProvider.js +33 -39
- package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
- package/dist/contexts/ApiProvider/createSdkQueryClient.d.ts +17 -0
- package/dist/contexts/ApiProvider/createSdkQueryClient.js +14 -0
- package/dist/contexts/ApiProvider/createSdkQueryClient.js.map +1 -0
- package/dist/helpers/dateFormatting.js +52 -56
- package/dist/helpers/dateFormatting.js.map +1 -1
- package/dist/helpers/formattedStrings.d.ts +12 -0
- package/dist/helpers/formattedStrings.js +55 -33
- package/dist/helpers/formattedStrings.js.map +1 -1
- package/dist/hooks/useClientPagination/useClientPagination.d.ts +44 -0
- package/dist/hooks/useClientPagination/useClientPagination.js +69 -0
- package/dist/hooks/useClientPagination/useClientPagination.js.map +1 -0
- package/dist/hooks/useClientPagination/useClientPagination.test.d.ts +1 -0
- package/dist/i18n/I18n.js +6 -5
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.PaySchedule.json.js +22 -20
- package/dist/i18n/en/Company.PaySchedule.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js +8 -6
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js +9 -9
- package/dist/i18n/en/Company.TimeOff.PolicyDetail.json.js +6 -4
- package/dist/i18n/en/Company.TimeOff.PolicyDetail.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js +17 -15
- package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js +10 -8
- package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js.map +1 -1
- package/dist/i18n/en/Employee.Dashboard.json.js +16 -12
- package/dist/i18n/en/Employee.Dashboard.json.js.map +1 -1
- package/dist/i18n/en/Employee.Deductions.json.js +104 -76
- package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
- package/dist/i18n/en/Employee.DocumentManager.json.js +12 -0
- package/dist/i18n/en/Employee.DocumentManager.json.js.map +1 -0
- package/dist/i18n/en/Employee.PaymentMethod.json.js +76 -64
- package/dist/i18n/en/Employee.PaymentMethod.json.js.map +1 -1
- package/dist/i18n/en/common.json.d.ts +7 -0
- package/dist/i18n/en/common.json.js +19 -17
- package/dist/i18n/en/common.json.js.map +1 -1
- package/dist/index.d.ts +16 -6
- package/dist/index.js +138 -112
- package/dist/index.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.d.ts +2 -1
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js +20 -18
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -1
- package/dist/shared/constants.d.ts +8 -2
- package/dist/shared/constants.js +11 -8
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/test-utils/assertions.d.ts +20 -0
- package/dist/types/i18next.d.ts +140 -4
- package/dist/types/sdkError.js +58 -47
- package/dist/types/sdkError.js.map +1 -1
- package/docs/reference/endpoint-inventory.json +980 -1170
- package/package.json +33 -22
- package/dist/components/Employee/Compensation/Compensation.js +0 -87
- package/dist/components/Employee/Compensation/Compensation.js.map +0 -1
- package/dist/components/Employee/Compensation/CompensationFlowComponents.js +0 -61
- package/dist/components/Employee/Compensation/CompensationFlowComponents.js.map +0 -1
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.d.ts +0 -14
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.js +0 -128
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.js.map +0 -1
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.d.ts +0 -17
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.js +0 -224
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.js.map +0 -1
- package/dist/components/Employee/Compensation/EditCompensation/index.d.ts +0 -5
- package/dist/components/Employee/Compensation/JobsList/JobsList.js +0 -47
- package/dist/components/Employee/Compensation/JobsList/JobsList.js.map +0 -1
- package/dist/components/Employee/Compensation/JobsList/JobsListPresentation.js.map +0 -1
- package/dist/components/Employee/Compensation/compensationSchema.d.ts +0 -29
- package/dist/components/Employee/Compensation/compensationSchema.js +0 -63
- package/dist/components/Employee/Compensation/compensationSchema.js.map +0 -1
- package/dist/components/Employee/Compensation/compensationStateMachine.js.map +0 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.d.ts +0 -15
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.js +0 -27
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.js.map +0 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.d.ts +0 -13
- package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.js +0 -26
- package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.js.map +0 -1
- package/dist/components/Employee/Deductions/Actions.d.ts +0 -1
- package/dist/components/Employee/Deductions/DeductionsComponents.js +0 -31
- package/dist/components/Employee/Deductions/DeductionsComponents.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.d.ts +0 -39
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +0 -237
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +0 -22
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +0 -162
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.d.ts +0 -34
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +0 -168
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +0 -1
- package/dist/components/Employee/Deductions/Head.d.ts +0 -1
- package/dist/components/Employee/Deductions/useDeductions.d.ts +0 -30
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Head.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +0 -24
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/countries.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/documentSignerStateMachine.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/fields.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/stateMachine.js.map +0 -1
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocuments.js.map +0 -1
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +0 -115
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/Actions.d.ts +0 -1
- package/dist/components/Employee/PaymentMethod/Actions.js +0 -20
- package/dist/components/Employee/PaymentMethod/Actions.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/BankAccount.d.ts +0 -13
- package/dist/components/Employee/PaymentMethod/BankAccount.js +0 -13
- package/dist/components/Employee/PaymentMethod/BankAccount.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.d.ts +0 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +0 -58
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.d.ts +0 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +0 -51
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/Head.d.ts +0 -1
- package/dist/components/Employee/PaymentMethod/Head.js +0 -13
- package/dist/components/Employee/PaymentMethod/Head.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/PaymentMethod.d.ts +0 -9
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js +0 -183
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.d.ts +0 -10
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +0 -38
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/Split.d.ts +0 -1
- package/dist/components/Employee/PaymentMethod/Split.js +0 -175
- package/dist/components/Employee/PaymentMethod/Split.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.d.ts +0 -54
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +0 -68
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +0 -1
- /package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/JobsListPresentation.d.ts +0 -0
- /package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/index.d.ts +0 -0
- /package/dist/components/Employee/Compensation/{compensationStateMachine.d.ts → onboarding/compensationStateMachine.d.ts} +0 -0
- /package/dist/components/Employee/{DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.test.d.ts → Compensation/shared/derivePrimaryFlsaStatus.test.d.ts} +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Actions.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Head.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/List.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/useDocumentList.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilityPresentation.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilitySchema.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilitySchema.js +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/countries.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/countries.js +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/index.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.module.scss.js +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.module.scss.js.map +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/index.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/stateMachine.d.ts +0 -0
- /package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/EmployeeDocumentsPresentation.d.ts +0 -0
- /package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/index.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/fields.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/fields.js +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/index.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/signEmployeeFormSchema.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/signEmployeeFormSchema.js +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/useSignEmployeeForm.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/useSignEmployeeForm.js +0 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Agencies } from '@gusto/embedded-api/models/components/childsupportdata';
|
|
3
|
+
export declare const ChildSupportGarnishmentFormErrorCodes: {
|
|
4
|
+
readonly REQUIRED: "REQUIRED";
|
|
5
|
+
readonly NEGATIVE_AMOUNT: "NEGATIVE_AMOUNT";
|
|
6
|
+
readonly PERCENT_OUT_OF_RANGE: "PERCENT_OUT_OF_RANGE";
|
|
7
|
+
};
|
|
8
|
+
export type ChildSupportGarnishmentFormErrorCode = (typeof ChildSupportGarnishmentFormErrorCodes)[keyof typeof ChildSupportGarnishmentFormErrorCodes];
|
|
9
|
+
/**
|
|
10
|
+
* Agencies declare which child-support attributes they need via
|
|
11
|
+
* `required_attributes[].key`. The legacy form only mapped three keys;
|
|
12
|
+
* unknown keys are ignored both there and here.
|
|
13
|
+
*/
|
|
14
|
+
export declare const SUPPORTED_REQUIRED_ATTR_KEYS: readonly ["case_number", "order_number", "remittance_number"];
|
|
15
|
+
export type SupportedRequiredAttrKey = (typeof SUPPORTED_REQUIRED_ATTR_KEYS)[number];
|
|
16
|
+
export declare const REQUIRED_ATTR_FIELD_NAME: Record<SupportedRequiredAttrKey, string>;
|
|
17
|
+
export declare function getRequiredAttrKeys(agency?: Agencies | null): Set<SupportedRequiredAttrKey>;
|
|
18
|
+
declare const fieldValidators: {
|
|
19
|
+
state: z.ZodString;
|
|
20
|
+
fipsCode: z.ZodString;
|
|
21
|
+
caseNumber: z.ZodString;
|
|
22
|
+
orderNumber: z.ZodString;
|
|
23
|
+
remittanceNumber: z.ZodString;
|
|
24
|
+
payPeriodMaximum: z.ZodPipe<z.ZodTransform<number, unknown>, z.ZodNumber>;
|
|
25
|
+
amount: z.ZodPipe<z.ZodTransform<number, unknown>, z.ZodNumber>;
|
|
26
|
+
paymentPeriod: z.ZodEnum<{
|
|
27
|
+
readonly EveryWeek: "Every week";
|
|
28
|
+
readonly EveryOtherWeek: "Every other week";
|
|
29
|
+
readonly TwicePerMonth: "Twice per month";
|
|
30
|
+
readonly Monthly: "Monthly";
|
|
31
|
+
}>;
|
|
32
|
+
};
|
|
33
|
+
export type ChildSupportGarnishmentFormField = keyof typeof fieldValidators;
|
|
34
|
+
export type ChildSupportGarnishmentFormData = {
|
|
35
|
+
[K in keyof typeof fieldValidators]: z.infer<(typeof fieldValidators)[K]>;
|
|
36
|
+
};
|
|
37
|
+
export type ChildSupportGarnishmentFormOutputs = ChildSupportGarnishmentFormData;
|
|
38
|
+
interface ChildSupportGarnishmentFormSchemaOptions {
|
|
39
|
+
mode?: 'create' | 'update';
|
|
40
|
+
/**
|
|
41
|
+
* The agency record matching the currently selected `state`. The agency's
|
|
42
|
+
* `requiredAttributes` determine which of `caseNumber` / `orderNumber` /
|
|
43
|
+
* `remittanceNumber` are required. When omitted (no agency selected yet),
|
|
44
|
+
* all three are optional.
|
|
45
|
+
*/
|
|
46
|
+
selectedAgency?: Agencies | null;
|
|
47
|
+
}
|
|
48
|
+
export declare function createChildSupportGarnishmentFormSchema({ mode, selectedAgency, }?: ChildSupportGarnishmentFormSchemaOptions): import('../../../../../partner-hook-utils/form/buildFormSchema').BuildFormSchemaResult<{
|
|
49
|
+
state: z.ZodString;
|
|
50
|
+
fipsCode: z.ZodString;
|
|
51
|
+
caseNumber: z.ZodString;
|
|
52
|
+
orderNumber: z.ZodString;
|
|
53
|
+
remittanceNumber: z.ZodString;
|
|
54
|
+
payPeriodMaximum: z.ZodPipe<z.ZodTransform<number, unknown>, z.ZodNumber>;
|
|
55
|
+
amount: z.ZodPipe<z.ZodTransform<number, unknown>, z.ZodNumber>;
|
|
56
|
+
paymentPeriod: z.ZodEnum<{
|
|
57
|
+
readonly EveryWeek: "Every week";
|
|
58
|
+
readonly EveryOtherWeek: "Every other week";
|
|
59
|
+
readonly TwicePerMonth: "Twice per month";
|
|
60
|
+
readonly Monthly: "Monthly";
|
|
61
|
+
}>;
|
|
62
|
+
}>;
|
|
63
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { z as e } from "zod";
|
|
2
|
+
import { PaymentPeriod as i } from "@gusto/embedded-api/models/components/garnishmentchildsupport";
|
|
3
|
+
import { buildFormSchema as a } from "../../../../../partner-hook-utils/form/buildFormSchema.js";
|
|
4
|
+
import { coerceNaN as o } from "../../../../../partner-hook-utils/form/preprocessors.js";
|
|
5
|
+
const s = {
|
|
6
|
+
REQUIRED: "REQUIRED",
|
|
7
|
+
NEGATIVE_AMOUNT: "NEGATIVE_AMOUNT",
|
|
8
|
+
PERCENT_OUT_OF_RANGE: "PERCENT_OUT_OF_RANGE"
|
|
9
|
+
}, u = [
|
|
10
|
+
"case_number",
|
|
11
|
+
"order_number",
|
|
12
|
+
"remittance_number"
|
|
13
|
+
];
|
|
14
|
+
function E(n) {
|
|
15
|
+
const t = /* @__PURE__ */ new Set();
|
|
16
|
+
if (!n?.requiredAttributes) return t;
|
|
17
|
+
for (const r of n.requiredAttributes)
|
|
18
|
+
r.key && u.includes(r.key) && t.add(r.key);
|
|
19
|
+
return t;
|
|
20
|
+
}
|
|
21
|
+
const c = 0, _ = 100, d = {
|
|
22
|
+
state: e.string(),
|
|
23
|
+
fipsCode: e.string(),
|
|
24
|
+
caseNumber: e.string(),
|
|
25
|
+
orderNumber: e.string(),
|
|
26
|
+
remittanceNumber: e.string(),
|
|
27
|
+
// Currency cap on the pay-period — required, ≥ 0.
|
|
28
|
+
payPeriodMaximum: e.preprocess(
|
|
29
|
+
o(0),
|
|
30
|
+
e.number().min(0, { message: s.NEGATIVE_AMOUNT })
|
|
31
|
+
),
|
|
32
|
+
// Percentage of paycheck, 0-100. Required.
|
|
33
|
+
amount: e.preprocess(
|
|
34
|
+
o(0),
|
|
35
|
+
e.number().min(c, {
|
|
36
|
+
message: s.PERCENT_OUT_OF_RANGE
|
|
37
|
+
}).max(_, {
|
|
38
|
+
message: s.PERCENT_OUT_OF_RANGE
|
|
39
|
+
})
|
|
40
|
+
),
|
|
41
|
+
paymentPeriod: e.enum(i)
|
|
42
|
+
};
|
|
43
|
+
function p({
|
|
44
|
+
mode: n = "create",
|
|
45
|
+
selectedAgency: t
|
|
46
|
+
} = {}) {
|
|
47
|
+
const r = E(t), m = {
|
|
48
|
+
caseNumber: r.has("case_number") ? "always" : "never",
|
|
49
|
+
orderNumber: r.has("order_number") ? "always" : "never",
|
|
50
|
+
remittanceNumber: r.has("remittance_number") ? "always" : "never"
|
|
51
|
+
};
|
|
52
|
+
return a(d, {
|
|
53
|
+
requiredFieldsConfig: m,
|
|
54
|
+
requiredErrorCode: s.REQUIRED,
|
|
55
|
+
mode: n
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
s as ChildSupportGarnishmentFormErrorCodes,
|
|
60
|
+
u as SUPPORTED_REQUIRED_ATTR_KEYS,
|
|
61
|
+
p as createChildSupportGarnishmentFormSchema,
|
|
62
|
+
E as getRequiredAttrKeys
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=childSupportGarnishmentFormSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"childSupportGarnishmentFormSchema.js","sources":["../../../../../../src/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.ts"],"sourcesContent":["import { z } from 'zod'\nimport { PaymentPeriod } from '@gusto/embedded-api/models/components/garnishmentchildsupport'\nimport type { Agencies } from '@gusto/embedded-api/models/components/childsupportdata'\nimport {\n buildFormSchema,\n type RequiredFieldConfig,\n} from '@/partner-hook-utils/form/buildFormSchema'\nimport { coerceNaN } from '@/partner-hook-utils/form/preprocessors'\n\n// ── Error codes ────────────────────────────────────────────────────────\n\nexport const ChildSupportGarnishmentFormErrorCodes = {\n REQUIRED: 'REQUIRED',\n NEGATIVE_AMOUNT: 'NEGATIVE_AMOUNT',\n PERCENT_OUT_OF_RANGE: 'PERCENT_OUT_OF_RANGE',\n} as const\n\nexport type ChildSupportGarnishmentFormErrorCode =\n (typeof ChildSupportGarnishmentFormErrorCodes)[keyof typeof ChildSupportGarnishmentFormErrorCodes]\n\n// ── Required-attribute keys recognized from the API ────────────────────\n\n/**\n * Agencies declare which child-support attributes they need via\n * `required_attributes[].key`. The legacy form only mapped three keys;\n * unknown keys are ignored both there and here.\n */\nexport const SUPPORTED_REQUIRED_ATTR_KEYS = [\n 'case_number',\n 'order_number',\n 'remittance_number',\n] as const\n\nexport type SupportedRequiredAttrKey = (typeof SUPPORTED_REQUIRED_ATTR_KEYS)[number]\n\n// Field name on the form for each required-attribute key.\nexport const REQUIRED_ATTR_FIELD_NAME: Record<SupportedRequiredAttrKey, string> = {\n case_number: 'caseNumber',\n order_number: 'orderNumber',\n remittance_number: 'remittanceNumber',\n}\n\nexport function getRequiredAttrKeys(agency?: Agencies | null): Set<SupportedRequiredAttrKey> {\n const keys = new Set<SupportedRequiredAttrKey>()\n if (!agency?.requiredAttributes) return keys\n for (const attr of agency.requiredAttributes) {\n if (!attr.key) continue\n if ((SUPPORTED_REQUIRED_ATTR_KEYS as readonly string[]).includes(attr.key)) {\n keys.add(attr.key as SupportedRequiredAttrKey)\n }\n }\n return keys\n}\n\n// ── Field validators ───────────────────────────────────────────────────\n\nconst PERCENT_MIN = 0\nconst PERCENT_MAX = 100\n\nconst fieldValidators = {\n state: z.string(),\n fipsCode: z.string(),\n caseNumber: z.string(),\n orderNumber: z.string(),\n remittanceNumber: z.string(),\n // Currency cap on the pay-period — required, ≥ 0.\n payPeriodMaximum: z.preprocess(\n coerceNaN(0),\n z.number().min(0, { message: ChildSupportGarnishmentFormErrorCodes.NEGATIVE_AMOUNT }),\n ),\n // Percentage of paycheck, 0-100. Required.\n amount: z.preprocess(\n coerceNaN(0),\n z\n .number()\n .min(PERCENT_MIN, {\n message: ChildSupportGarnishmentFormErrorCodes.PERCENT_OUT_OF_RANGE,\n })\n .max(PERCENT_MAX, {\n message: ChildSupportGarnishmentFormErrorCodes.PERCENT_OUT_OF_RANGE,\n }),\n ),\n paymentPeriod: z.enum(PaymentPeriod),\n}\n\nexport type ChildSupportGarnishmentFormField = keyof typeof fieldValidators\n\nexport type ChildSupportGarnishmentFormData = {\n [K in keyof typeof fieldValidators]: z.infer<(typeof fieldValidators)[K]>\n}\n\nexport type ChildSupportGarnishmentFormOutputs = ChildSupportGarnishmentFormData\n\n// ── Required fields config ─────────────────────────────────────────────\n//\n// `state`, `fipsCode`, `payPeriodMaximum`, `amount`, `paymentPeriod` are\n// always required. The three agency-attribute fields toggle requiredness\n// based on the currently selected agency — see `createChildSupportGarnishmentFormSchema`\n// which assigns 'always' / 'never' per call.\n\ninterface ChildSupportGarnishmentFormSchemaOptions {\n mode?: 'create' | 'update'\n /**\n * The agency record matching the currently selected `state`. The agency's\n * `requiredAttributes` determine which of `caseNumber` / `orderNumber` /\n * `remittanceNumber` are required. When omitted (no agency selected yet),\n * all three are optional.\n */\n selectedAgency?: Agencies | null\n}\n\nexport function createChildSupportGarnishmentFormSchema({\n mode = 'create',\n selectedAgency,\n}: ChildSupportGarnishmentFormSchemaOptions = {}) {\n const requiredAttrKeys = getRequiredAttrKeys(selectedAgency)\n\n const requiredFieldsConfig = {\n caseNumber: requiredAttrKeys.has('case_number') ? 'always' : 'never',\n orderNumber: requiredAttrKeys.has('order_number') ? 'always' : 'never',\n remittanceNumber: requiredAttrKeys.has('remittance_number') ? 'always' : 'never',\n } satisfies RequiredFieldConfig<typeof fieldValidators>\n\n return buildFormSchema(fieldValidators, {\n requiredFieldsConfig,\n requiredErrorCode: ChildSupportGarnishmentFormErrorCodes.REQUIRED,\n mode,\n })\n}\n"],"names":["ChildSupportGarnishmentFormErrorCodes","SUPPORTED_REQUIRED_ATTR_KEYS","getRequiredAttrKeys","agency","keys","attr","PERCENT_MIN","PERCENT_MAX","fieldValidators","z","coerceNaN","PaymentPeriod","createChildSupportGarnishmentFormSchema","mode","selectedAgency","requiredAttrKeys","requiredFieldsConfig","buildFormSchema"],"mappings":";;;;AAWO,MAAMA,IAAwC;AAAA,EACnD,UAAU;AAAA,EACV,iBAAiB;AAAA,EACjB,sBAAsB;AACxB,GAYaC,IAA+B;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AACF;AAWO,SAASC,EAAoBC,GAAyD;AAC3F,QAAMC,wBAAW,IAAA;AACjB,MAAI,CAACD,GAAQ,mBAAoB,QAAOC;AACxC,aAAWC,KAAQF,EAAO;AACxB,IAAKE,EAAK,OACLJ,EAAmD,SAASI,EAAK,GAAG,KACvED,EAAK,IAAIC,EAAK,GAA+B;AAGjD,SAAOD;AACT;AAIA,MAAME,IAAc,GACdC,IAAc,KAEdC,IAAkB;AAAA,EACtB,OAAOC,EAAE,OAAA;AAAA,EACT,UAAUA,EAAE,OAAA;AAAA,EACZ,YAAYA,EAAE,OAAA;AAAA,EACd,aAAaA,EAAE,OAAA;AAAA,EACf,kBAAkBA,EAAE,OAAA;AAAA;AAAA,EAEpB,kBAAkBA,EAAE;AAAA,IAClBC,EAAU,CAAC;AAAA,IACXD,EAAE,SAAS,IAAI,GAAG,EAAE,SAAST,EAAsC,gBAAA,CAAiB;AAAA,EAAA;AAAA;AAAA,EAGtF,QAAQS,EAAE;AAAA,IACRC,EAAU,CAAC;AAAA,IACXD,EACG,OAAA,EACA,IAAIH,GAAa;AAAA,MAChB,SAASN,EAAsC;AAAA,IAAA,CAChD,EACA,IAAIO,GAAa;AAAA,MAChB,SAASP,EAAsC;AAAA,IAAA,CAChD;AAAA,EAAA;AAAA,EAEL,eAAeS,EAAE,KAAKE,CAAa;AACrC;AA4BO,SAASC,EAAwC;AAAA,EACtD,MAAAC,IAAO;AAAA,EACP,gBAAAC;AACF,IAA8C,IAAI;AAChD,QAAMC,IAAmBb,EAAoBY,CAAc,GAErDE,IAAuB;AAAA,IAC3B,YAAYD,EAAiB,IAAI,aAAa,IAAI,WAAW;AAAA,IAC7D,aAAaA,EAAiB,IAAI,cAAc,IAAI,WAAW;AAAA,IAC/D,kBAAkBA,EAAiB,IAAI,mBAAmB,IAAI,WAAW;AAAA,EAAA;AAG3E,SAAOE,EAAgBT,GAAiB;AAAA,IACtC,sBAAAQ;AAAA,IACA,mBAAmBhB,EAAsC;AAAA,IACzD,MAAAa;AAAA,EAAA,CACD;AACH;"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { PaymentPeriod } from '@gusto/embedded-api/models/components/garnishmentchildsupport';
|
|
2
|
+
import { ChildSupportGarnishmentFormErrorCodes } from './childSupportGarnishmentFormSchema';
|
|
3
|
+
import { TextInputHookFieldProps } from '../../../../../partner-hook-utils/form/fields/TextInputHookField';
|
|
4
|
+
import { NumberInputHookFieldProps } from '../../../../../partner-hook-utils/form/fields/NumberInputHookField';
|
|
5
|
+
import { SelectHookFieldProps } from '../../../../../partner-hook-utils/form/fields/SelectHookField';
|
|
6
|
+
import { HookFieldProps } from '../../../../../partner-hook-utils/types';
|
|
7
|
+
export type RequiredValidation = typeof ChildSupportGarnishmentFormErrorCodes.REQUIRED;
|
|
8
|
+
export type NegativeAmountValidation = typeof ChildSupportGarnishmentFormErrorCodes.NEGATIVE_AMOUNT;
|
|
9
|
+
export type PercentValidation = typeof ChildSupportGarnishmentFormErrorCodes.PERCENT_OUT_OF_RANGE;
|
|
10
|
+
export type PayPeriodMaximumValidation = RequiredValidation | NegativeAmountValidation;
|
|
11
|
+
export type AmountValidation = RequiredValidation | PercentValidation;
|
|
12
|
+
export type StateFieldEntry = {
|
|
13
|
+
state: string;
|
|
14
|
+
name: string;
|
|
15
|
+
manualPaymentRequired?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export type StateFieldProps = HookFieldProps<SelectHookFieldProps<RequiredValidation, StateFieldEntry>>;
|
|
18
|
+
export declare function StateField(props: StateFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export type CountyEntry = {
|
|
20
|
+
fipsCode: string;
|
|
21
|
+
county: string | null;
|
|
22
|
+
};
|
|
23
|
+
export type FipsCodeFieldProps = HookFieldProps<SelectHookFieldProps<RequiredValidation, CountyEntry>>;
|
|
24
|
+
export declare function FipsCodeField(props: FipsCodeFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export type CaseNumberFieldProps = HookFieldProps<TextInputHookFieldProps<RequiredValidation>>;
|
|
26
|
+
export declare function CaseNumberField(props: CaseNumberFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export type OrderNumberFieldProps = HookFieldProps<TextInputHookFieldProps<RequiredValidation>>;
|
|
28
|
+
export declare function OrderNumberField(props: OrderNumberFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export type RemittanceNumberFieldProps = HookFieldProps<TextInputHookFieldProps<RequiredValidation>>;
|
|
30
|
+
export declare function RemittanceNumberField(props: RemittanceNumberFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export type PayPeriodMaximumFieldProps = HookFieldProps<NumberInputHookFieldProps<PayPeriodMaximumValidation>>;
|
|
32
|
+
export declare function PayPeriodMaximumField(props: PayPeriodMaximumFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export type AmountFieldProps = HookFieldProps<NumberInputHookFieldProps<AmountValidation>>;
|
|
34
|
+
export declare function AmountField(props: AmountFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export type PaymentPeriodFieldProps = HookFieldProps<SelectHookFieldProps<RequiredValidation, PaymentPeriod>>;
|
|
36
|
+
export declare function PaymentPeriodField(props: PaymentPeriodFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { SelectHookField as n } from "../../../../../partner-hook-utils/form/fields/SelectHookField.js";
|
|
3
|
+
import { NumberInputHookField as i } from "../../../../../partner-hook-utils/form/fields/NumberInputHookField.js";
|
|
4
|
+
import { TextInputHookField as t } from "../../../../../partner-hook-utils/form/fields/TextInputHookField.js";
|
|
5
|
+
function d(e) {
|
|
6
|
+
return /* @__PURE__ */ r(n, { ...e, name: "state" });
|
|
7
|
+
}
|
|
8
|
+
function f(e) {
|
|
9
|
+
return /* @__PURE__ */ r(n, { ...e, name: "fipsCode" });
|
|
10
|
+
}
|
|
11
|
+
function c(e) {
|
|
12
|
+
return /* @__PURE__ */ r(t, { ...e, name: "caseNumber" });
|
|
13
|
+
}
|
|
14
|
+
function l(e) {
|
|
15
|
+
return /* @__PURE__ */ r(t, { ...e, name: "orderNumber" });
|
|
16
|
+
}
|
|
17
|
+
function F(e) {
|
|
18
|
+
return /* @__PURE__ */ r(t, { ...e, name: "remittanceNumber" });
|
|
19
|
+
}
|
|
20
|
+
function p(e) {
|
|
21
|
+
return /* @__PURE__ */ r(i, { ...e, name: "payPeriodMaximum" });
|
|
22
|
+
}
|
|
23
|
+
function b(e) {
|
|
24
|
+
return /* @__PURE__ */ r(i, { ...e, name: "amount" });
|
|
25
|
+
}
|
|
26
|
+
function N(e) {
|
|
27
|
+
return /* @__PURE__ */ r(n, { ...e, name: "paymentPeriod" });
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
b as AmountField,
|
|
31
|
+
c as CaseNumberField,
|
|
32
|
+
f as FipsCodeField,
|
|
33
|
+
l as OrderNumberField,
|
|
34
|
+
p as PayPeriodMaximumField,
|
|
35
|
+
N as PaymentPeriodField,
|
|
36
|
+
F as RemittanceNumberField,
|
|
37
|
+
d as StateField
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=fields.js.map
|
package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.js","sources":["../../../../../../src/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.tsx"],"sourcesContent":["import type { PaymentPeriod } from '@gusto/embedded-api/models/components/garnishmentchildsupport'\nimport type { ChildSupportGarnishmentFormErrorCodes } from './childSupportGarnishmentFormSchema'\nimport type { TextInputHookFieldProps } from '@/partner-hook-utils/form/fields/TextInputHookField'\nimport type { NumberInputHookFieldProps } from '@/partner-hook-utils/form/fields/NumberInputHookField'\nimport type { SelectHookFieldProps } from '@/partner-hook-utils/form/fields/SelectHookField'\nimport {\n TextInputHookField,\n NumberInputHookField,\n SelectHookField,\n} from '@/partner-hook-utils/form/fields'\nimport type { HookFieldProps } from '@/partner-hook-utils/types'\n\nexport type RequiredValidation = typeof ChildSupportGarnishmentFormErrorCodes.REQUIRED\nexport type NegativeAmountValidation = typeof ChildSupportGarnishmentFormErrorCodes.NEGATIVE_AMOUNT\nexport type PercentValidation = typeof ChildSupportGarnishmentFormErrorCodes.PERCENT_OUT_OF_RANGE\n\nexport type PayPeriodMaximumValidation = RequiredValidation | NegativeAmountValidation\nexport type AmountValidation = RequiredValidation | PercentValidation\n\n// ── State (agency) ─────────────────────────────────────────────────────\n//\n// The select carries the raw agency record as `entries`; the consumer can\n// supply `getOptionLabel` to translate the agency name into a localized\n// label (the SDK's option-label fallback is the agency state code).\n\nexport type StateFieldEntry = {\n state: string\n name: string\n manualPaymentRequired?: boolean\n}\n\nexport type StateFieldProps = HookFieldProps<\n SelectHookFieldProps<RequiredValidation, StateFieldEntry>\n>\n\nexport function StateField(props: StateFieldProps) {\n return <SelectHookField {...props} name=\"state\" />\n}\n\n// ── FipsCode (county) ──────────────────────────────────────────────────\n\nexport type CountyEntry = {\n fipsCode: string\n county: string | null\n}\n\nexport type FipsCodeFieldProps = HookFieldProps<\n SelectHookFieldProps<RequiredValidation, CountyEntry>\n>\n\nexport function FipsCodeField(props: FipsCodeFieldProps) {\n return <SelectHookField {...props} name=\"fipsCode\" />\n}\n\n// ── Required agency-attribute text inputs ──────────────────────────────\n\nexport type CaseNumberFieldProps = HookFieldProps<TextInputHookFieldProps<RequiredValidation>>\n\nexport function CaseNumberField(props: CaseNumberFieldProps) {\n return <TextInputHookField {...props} name=\"caseNumber\" />\n}\n\nexport type OrderNumberFieldProps = HookFieldProps<TextInputHookFieldProps<RequiredValidation>>\n\nexport function OrderNumberField(props: OrderNumberFieldProps) {\n return <TextInputHookField {...props} name=\"orderNumber\" />\n}\n\nexport type RemittanceNumberFieldProps = HookFieldProps<TextInputHookFieldProps<RequiredValidation>>\n\nexport function RemittanceNumberField(props: RemittanceNumberFieldProps) {\n return <TextInputHookField {...props} name=\"remittanceNumber\" />\n}\n\n// ── Pay-period maximum (currency) ──────────────────────────────────────\n\nexport type PayPeriodMaximumFieldProps = HookFieldProps<\n NumberInputHookFieldProps<PayPeriodMaximumValidation>\n>\n\nexport function PayPeriodMaximumField(props: PayPeriodMaximumFieldProps) {\n return <NumberInputHookField {...props} name=\"payPeriodMaximum\" />\n}\n\n// ── Amount (percent of paycheck, 0-100) ────────────────────────────────\n\nexport type AmountFieldProps = HookFieldProps<NumberInputHookFieldProps<AmountValidation>>\n\nexport function AmountField(props: AmountFieldProps) {\n return <NumberInputHookField {...props} name=\"amount\" />\n}\n\n// ── Payment period (select) ────────────────────────────────────────────\n\nexport type PaymentPeriodFieldProps = HookFieldProps<\n SelectHookFieldProps<RequiredValidation, PaymentPeriod>\n>\n\nexport function PaymentPeriodField(props: PaymentPeriodFieldProps) {\n return <SelectHookField {...props} name=\"paymentPeriod\" />\n}\n"],"names":["StateField","props","jsx","SelectHookField","FipsCodeField","CaseNumberField","TextInputHookField","OrderNumberField","RemittanceNumberField","PayPeriodMaximumField","NumberInputHookField","AmountField","PaymentPeriodField"],"mappings":";;;;AAmCO,SAASA,EAAWC,GAAwB;AACjD,SAAO,gBAAAC,EAACC,GAAA,EAAiB,GAAGF,GAAO,MAAK,SAAQ;AAClD;AAaO,SAASG,EAAcH,GAA2B;AACvD,SAAO,gBAAAC,EAACC,GAAA,EAAiB,GAAGF,GAAO,MAAK,YAAW;AACrD;AAMO,SAASI,EAAgBJ,GAA6B;AAC3D,SAAO,gBAAAC,EAACI,GAAA,EAAoB,GAAGL,GAAO,MAAK,cAAa;AAC1D;AAIO,SAASM,EAAiBN,GAA8B;AAC7D,SAAO,gBAAAC,EAACI,GAAA,EAAoB,GAAGL,GAAO,MAAK,eAAc;AAC3D;AAIO,SAASO,EAAsBP,GAAmC;AACvE,SAAO,gBAAAC,EAACI,GAAA,EAAoB,GAAGL,GAAO,MAAK,oBAAmB;AAChE;AAQO,SAASQ,EAAsBR,GAAmC;AACvE,SAAO,gBAAAC,EAACQ,GAAA,EAAsB,GAAGT,GAAO,MAAK,oBAAmB;AAClE;AAMO,SAASU,EAAYV,GAAyB;AACnD,SAAO,gBAAAC,EAACQ,GAAA,EAAsB,GAAGT,GAAO,MAAK,UAAS;AACxD;AAQO,SAASW,EAAmBX,GAAgC;AACjE,SAAO,gBAAAC,EAACC,GAAA,EAAiB,GAAGF,GAAO,MAAK,iBAAgB;AAC1D;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import "./types/i18next.d.ts"
|
|
2
|
+
export { useChildSupportGarnishmentForm, type UseChildSupportGarnishmentFormProps, type UseChildSupportGarnishmentFormResult, type UseChildSupportGarnishmentFormReady, type ChildSupportGarnishmentFormFields, type ChildSupportGarnishmentFormFieldsMetadata, type ChildSupportGarnishmentFormFieldsType, } from './useChildSupportGarnishmentForm';
|
|
3
|
+
export { createChildSupportGarnishmentFormSchema, ChildSupportGarnishmentFormErrorCodes, type ChildSupportGarnishmentFormErrorCode, type ChildSupportGarnishmentFormData, type ChildSupportGarnishmentFormOutputs, type ChildSupportGarnishmentFormField, type SupportedRequiredAttrKey, getRequiredAttrKeys, REQUIRED_ATTR_FIELD_NAME, SUPPORTED_REQUIRED_ATTR_KEYS, } from './childSupportGarnishmentFormSchema';
|
|
4
|
+
export type { RequiredValidation as ChildSupportGarnishmentRequiredValidation, NegativeAmountValidation as ChildSupportGarnishmentNegativeAmountValidation, PercentValidation as ChildSupportGarnishmentPercentValidation, PayPeriodMaximumValidation, AmountValidation as ChildSupportGarnishmentAmountValidation, StateFieldEntry, CountyEntry, StateFieldProps as ChildSupportGarnishmentStateFieldProps, FipsCodeFieldProps, CaseNumberFieldProps, OrderNumberFieldProps, RemittanceNumberFieldProps, PayPeriodMaximumFieldProps, AmountFieldProps as ChildSupportGarnishmentAmountFieldProps, PaymentPeriodFieldProps, } from './fields';
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { UseFormProps } from 'react-hook-form';
|
|
2
|
+
import { Garnishment } from '@gusto/embedded-api/models/components/garnishment';
|
|
3
|
+
import { Agencies } from '@gusto/embedded-api/models/components/childsupportdata';
|
|
4
|
+
import { ChildSupportGarnishmentFormData, SupportedRequiredAttrKey } from './childSupportGarnishmentFormSchema';
|
|
5
|
+
import { StateField, FipsCodeField, CaseNumberField, OrderNumberField, RemittanceNumberField, PayPeriodMaximumField, AmountField, PaymentPeriodField, CountyEntry, StateFieldEntry } from './fields';
|
|
6
|
+
import { BaseFormHookReady, FieldsMetadata, HookLoadingResult, HookSubmitResult } from '../../../../../partner-hook-utils/types';
|
|
7
|
+
export interface UseChildSupportGarnishmentFormProps {
|
|
8
|
+
employeeId: string;
|
|
9
|
+
/**
|
|
10
|
+
* When set, loads that garnishment via the list query and updates it (PUT).
|
|
11
|
+
* When omitted, the form is in create mode (POST).
|
|
12
|
+
*/
|
|
13
|
+
garnishmentId?: string;
|
|
14
|
+
defaultValues?: Partial<ChildSupportGarnishmentFormData>;
|
|
15
|
+
validationMode?: UseFormProps['mode'];
|
|
16
|
+
shouldFocusError?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface ChildSupportGarnishmentFormFields {
|
|
19
|
+
State: typeof StateField;
|
|
20
|
+
/** Only available when the selected agency has more than one fips code, or the
|
|
21
|
+
* sole code is county-scoped (not an "all counties" auto-pick). */
|
|
22
|
+
FipsCode: typeof FipsCodeField | undefined;
|
|
23
|
+
/** Only available when the selected agency requires `case_number`. */
|
|
24
|
+
CaseNumber: typeof CaseNumberField | undefined;
|
|
25
|
+
/** Only available when the selected agency requires `order_number`. */
|
|
26
|
+
OrderNumber: typeof OrderNumberField | undefined;
|
|
27
|
+
/** Only available when the selected agency requires `remittance_number`. */
|
|
28
|
+
RemittanceNumber: typeof RemittanceNumberField | undefined;
|
|
29
|
+
PayPeriodMaximum: typeof PayPeriodMaximumField;
|
|
30
|
+
Amount: typeof AmountField;
|
|
31
|
+
PaymentPeriod: typeof PaymentPeriodField;
|
|
32
|
+
}
|
|
33
|
+
export interface UseChildSupportGarnishmentFormReady extends BaseFormHookReady<FieldsMetadata, ChildSupportGarnishmentFormData, ChildSupportGarnishmentFormFields> {
|
|
34
|
+
data: {
|
|
35
|
+
/** Agencies offered as `State` options; raw entries the consumer can use
|
|
36
|
+
* with `getOptionLabel` for translated names. */
|
|
37
|
+
agencies: StateFieldEntry[];
|
|
38
|
+
/** Counties for the currently selected state. Empty array when no state
|
|
39
|
+
* is selected. */
|
|
40
|
+
counties: CountyEntry[];
|
|
41
|
+
/** The garnishment loaded for update; `null` in create mode. */
|
|
42
|
+
deduction: Garnishment | null;
|
|
43
|
+
};
|
|
44
|
+
status: {
|
|
45
|
+
isPending: boolean;
|
|
46
|
+
mode: 'create' | 'update';
|
|
47
|
+
/** The agency record matching the currently selected `state`. */
|
|
48
|
+
selectedAgency: Agencies | null;
|
|
49
|
+
/** Mirrors `selectedAgency.manualPaymentRequired`; convenient for showing
|
|
50
|
+
* a warning alert. */
|
|
51
|
+
isManualPaymentRequired: boolean;
|
|
52
|
+
/** Which `required_attributes` keys the selected agency declares. */
|
|
53
|
+
requiredAttrKeys: ReadonlySet<SupportedRequiredAttrKey>;
|
|
54
|
+
};
|
|
55
|
+
actions: {
|
|
56
|
+
onSubmit: () => Promise<HookSubmitResult<Garnishment> | undefined>;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
export type UseChildSupportGarnishmentFormResult = HookLoadingResult | UseChildSupportGarnishmentFormReady;
|
|
60
|
+
export declare function useChildSupportGarnishmentForm({ employeeId, garnishmentId, defaultValues: partnerDefaults, validationMode, shouldFocusError, }: UseChildSupportGarnishmentFormProps): UseChildSupportGarnishmentFormResult;
|
|
61
|
+
export type ChildSupportGarnishmentFormFieldsMetadata = UseChildSupportGarnishmentFormReady['form']['fieldsMetadata'];
|
|
62
|
+
export type ChildSupportGarnishmentFormFieldsType = UseChildSupportGarnishmentFormReady['form']['Fields'];
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { useMemo as u, useRef as Z, useEffect as q } from "react";
|
|
2
|
+
import { useForm as ee, useWatch as te } from "react-hook-form";
|
|
3
|
+
import { zodResolver as re } from "@hookform/resolvers/zod";
|
|
4
|
+
import { PaymentPeriod as r } from "@gusto/embedded-api/models/components/garnishmentchildsupport";
|
|
5
|
+
import { useGarnishmentsCreateMutation as oe } from "@gusto/embedded-api/react-query/garnishmentsCreate";
|
|
6
|
+
import { useGarnishmentsUpdateMutation as ie } from "@gusto/embedded-api/react-query/garnishmentsUpdate";
|
|
7
|
+
import { useGarnishmentsList as ne } from "@gusto/embedded-api/react-query/garnishmentsList";
|
|
8
|
+
import { useGarnishmentsGetChildSupportData as ae } from "@gusto/embedded-api/react-query/garnishmentsGetChildSupportData";
|
|
9
|
+
import { createChildSupportGarnishmentFormSchema as se, getRequiredAttrKeys as ue } from "./childSupportGarnishmentFormSchema.js";
|
|
10
|
+
import { PaymentPeriodField as me, AmountField as de, PayPeriodMaximumField as ce, RemittanceNumberField as le, OrderNumberField as pe, CaseNumberField as he, FipsCodeField as be, StateField as fe } from "./fields.js";
|
|
11
|
+
import { useDeriveFieldsMetadata as ye } from "../../../../../partner-hook-utils/form/useDeriveFieldsMetadata.js";
|
|
12
|
+
import { useHookFormInternals as Pe } from "../../../../../partner-hook-utils/form/useHookFormInternals.js";
|
|
13
|
+
import { createGetFormSubmissionValues as Ne } from "../../../../../partner-hook-utils/form/getFormSubmissionValues.js";
|
|
14
|
+
import { withOptions as M } from "../../../../../partner-hook-utils/form/withOptions.js";
|
|
15
|
+
import { composeErrorHandler as ge } from "../../../../../partner-hook-utils/composeErrorHandler.js";
|
|
16
|
+
import { useBaseSubmit as Se } from "../../../../Base/useBaseSubmit.js";
|
|
17
|
+
import { SDKInternalError as k } from "../../../../../types/sdkError.js";
|
|
18
|
+
const Me = [
|
|
19
|
+
{ value: r.EveryWeek, label: r.EveryWeek },
|
|
20
|
+
{ value: r.EveryOtherWeek, label: r.EveryOtherWeek },
|
|
21
|
+
{ value: r.TwicePerMonth, label: r.TwicePerMonth },
|
|
22
|
+
{ value: r.Monthly, label: r.Monthly }
|
|
23
|
+
], Ce = [
|
|
24
|
+
r.EveryWeek,
|
|
25
|
+
r.EveryOtherWeek,
|
|
26
|
+
r.TwicePerMonth,
|
|
27
|
+
r.Monthly
|
|
28
|
+
];
|
|
29
|
+
function He({
|
|
30
|
+
employeeId: C,
|
|
31
|
+
garnishmentId: P,
|
|
32
|
+
defaultValues: i,
|
|
33
|
+
validationMode: V = "onSubmit",
|
|
34
|
+
shouldFocusError: W = !0
|
|
35
|
+
}) {
|
|
36
|
+
const o = !P, v = o ? "create" : "update", d = ae({}), p = u(
|
|
37
|
+
() => d.data?.childSupportData?.agencies ?? [],
|
|
38
|
+
[d.data]
|
|
39
|
+
), h = ne({ employeeId: C }, { enabled: !o }), t = u(() => o ? null : h.data?.garnishments?.find((e) => e.uuid === P) ?? null, [o, P, h.data]), F = u(
|
|
40
|
+
() => ({
|
|
41
|
+
state: t?.childSupport?.state ?? i?.state ?? "",
|
|
42
|
+
fipsCode: t?.childSupport?.fipsCode ?? i?.fipsCode ?? "",
|
|
43
|
+
caseNumber: t?.childSupport?.caseNumber ?? i?.caseNumber ?? "",
|
|
44
|
+
orderNumber: t?.childSupport?.orderNumber ?? i?.orderNumber ?? "",
|
|
45
|
+
remittanceNumber: t?.childSupport?.remittanceNumber ?? i?.remittanceNumber ?? "",
|
|
46
|
+
amount: t?.amount ? Number(t.amount) : i?.amount ?? 0,
|
|
47
|
+
payPeriodMaximum: t?.payPeriodMaximum ? Number(t.payPeriodMaximum) : i?.payPeriodMaximum ?? 0,
|
|
48
|
+
paymentPeriod: t?.childSupport?.paymentPeriod ?? i?.paymentPeriod ?? r.Monthly
|
|
49
|
+
}),
|
|
50
|
+
[t, i]
|
|
51
|
+
), [E, L] = u(
|
|
52
|
+
() => se({ mode: v }),
|
|
53
|
+
[v]
|
|
54
|
+
), n = ee({
|
|
55
|
+
resolver: re(E),
|
|
56
|
+
mode: V,
|
|
57
|
+
shouldFocusError: W,
|
|
58
|
+
defaultValues: F,
|
|
59
|
+
values: F,
|
|
60
|
+
resetOptions: { keepDirtyValues: !0 }
|
|
61
|
+
}), c = te({ control: n.control, name: "state" }), m = u(
|
|
62
|
+
() => p.find((e) => e.state === c) ?? null,
|
|
63
|
+
[p, c]
|
|
64
|
+
), R = Z(null);
|
|
65
|
+
q(() => {
|
|
66
|
+
const e = R.current;
|
|
67
|
+
R.current = c, e !== null && e !== "" && e !== c && (n.setValue("caseNumber", ""), n.setValue("orderNumber", ""), n.setValue("remittanceNumber", ""));
|
|
68
|
+
}, [c]);
|
|
69
|
+
const N = m?.fipsCodes ?? [], b = N.length === 1 && !N[0]?.county?.length ? N[0]?.code ?? null : null;
|
|
70
|
+
q(() => {
|
|
71
|
+
b && n.setValue("fipsCode", b);
|
|
72
|
+
}, [b]);
|
|
73
|
+
const O = oe(), w = ie(), T = O.isPending || w.isPending, {
|
|
74
|
+
baseSubmitHandler: _,
|
|
75
|
+
error: I,
|
|
76
|
+
setError: H
|
|
77
|
+
} = Se("ChildSupportGarnishmentForm"), g = ge(
|
|
78
|
+
o ? [d] : [d, h],
|
|
79
|
+
{ submitError: I, setSubmitError: H }
|
|
80
|
+
), S = u(
|
|
81
|
+
() => p.map((e) => ({
|
|
82
|
+
state: e.state ?? "",
|
|
83
|
+
name: e.name ?? e.state ?? "",
|
|
84
|
+
manualPaymentRequired: e.manualPaymentRequired ?? !1
|
|
85
|
+
})),
|
|
86
|
+
[p]
|
|
87
|
+
), l = u(
|
|
88
|
+
() => (m?.fipsCodes ?? []).filter((e) => typeof e.code == "string").map((e) => ({ fipsCode: e.code, county: e.county ?? null })),
|
|
89
|
+
[m]
|
|
90
|
+
), f = u(
|
|
91
|
+
() => ue(m),
|
|
92
|
+
[m]
|
|
93
|
+
), K = l.length > 1 || l.length === 1 && b == null, s = ye(L, n.control), B = S.map((e) => ({ value: e.state, label: e.name })), D = l.map((e) => ({
|
|
94
|
+
value: e.fipsCode,
|
|
95
|
+
label: e.county ?? e.fipsCode
|
|
96
|
+
})), Q = {
|
|
97
|
+
state: M(s.state, B, S),
|
|
98
|
+
fipsCode: M(s.fipsCode, D, l),
|
|
99
|
+
caseNumber: s.caseNumber,
|
|
100
|
+
orderNumber: s.orderNumber,
|
|
101
|
+
remittanceNumber: s.remittanceNumber,
|
|
102
|
+
payPeriodMaximum: s.payPeriodMaximum,
|
|
103
|
+
amount: s.amount,
|
|
104
|
+
paymentPeriod: M(
|
|
105
|
+
s.paymentPeriod,
|
|
106
|
+
[...Me],
|
|
107
|
+
[...Ce]
|
|
108
|
+
)
|
|
109
|
+
}, Y = async () => {
|
|
110
|
+
let e;
|
|
111
|
+
return await new Promise((x) => {
|
|
112
|
+
n.handleSubmit(
|
|
113
|
+
async (U) => {
|
|
114
|
+
await _(U, async (a) => {
|
|
115
|
+
const A = {
|
|
116
|
+
state: a.state,
|
|
117
|
+
paymentPeriod: a.paymentPeriod,
|
|
118
|
+
fipsCode: a.fipsCode,
|
|
119
|
+
// Empty strings collapse to null so the API persists "no value
|
|
120
|
+
// declared" rather than an empty case number.
|
|
121
|
+
caseNumber: a.caseNumber || null,
|
|
122
|
+
orderNumber: a.orderNumber || null,
|
|
123
|
+
remittanceNumber: a.remittanceNumber || null
|
|
124
|
+
}, $ = `Child Support - ${A.caseNumber ?? ""}`, j = String(a.amount), J = a.payPeriodMaximum > 0 ? String(a.payPeriodMaximum) : null, G = {
|
|
125
|
+
active: !0,
|
|
126
|
+
amount: j,
|
|
127
|
+
description: $,
|
|
128
|
+
courtOrdered: !0,
|
|
129
|
+
garnishmentType: "child_support",
|
|
130
|
+
times: null,
|
|
131
|
+
deductAsPercentage: !0,
|
|
132
|
+
payPeriodMaximum: J,
|
|
133
|
+
recurring: !0,
|
|
134
|
+
childSupport: A
|
|
135
|
+
};
|
|
136
|
+
let y;
|
|
137
|
+
if (o)
|
|
138
|
+
y = (await O.mutateAsync({
|
|
139
|
+
request: { employeeId: C, garnishmentRequest: G }
|
|
140
|
+
})).garnishment;
|
|
141
|
+
else {
|
|
142
|
+
if (!t)
|
|
143
|
+
throw new k(
|
|
144
|
+
"Cannot update child-support deduction: no matching garnishment on file"
|
|
145
|
+
);
|
|
146
|
+
y = (await w.mutateAsync({
|
|
147
|
+
request: {
|
|
148
|
+
garnishmentId: t.uuid,
|
|
149
|
+
updateGarnishmentRequest: {
|
|
150
|
+
...G,
|
|
151
|
+
version: t.version
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
})).garnishment;
|
|
155
|
+
}
|
|
156
|
+
if (!y)
|
|
157
|
+
throw new k(
|
|
158
|
+
o ? "Child-support deduction creation failed" : "Child-support deduction update failed"
|
|
159
|
+
);
|
|
160
|
+
e = {
|
|
161
|
+
mode: o ? "create" : "update",
|
|
162
|
+
data: y
|
|
163
|
+
};
|
|
164
|
+
}), x();
|
|
165
|
+
},
|
|
166
|
+
() => {
|
|
167
|
+
x();
|
|
168
|
+
}
|
|
169
|
+
)();
|
|
170
|
+
}), e;
|
|
171
|
+
}, z = Pe(n);
|
|
172
|
+
return d.isLoading ? { isLoading: !0, errorHandling: g } : !o && h.isLoading ? { isLoading: !0, errorHandling: g } : {
|
|
173
|
+
isLoading: !1,
|
|
174
|
+
data: {
|
|
175
|
+
agencies: S,
|
|
176
|
+
counties: l,
|
|
177
|
+
deduction: t
|
|
178
|
+
},
|
|
179
|
+
status: {
|
|
180
|
+
isPending: T,
|
|
181
|
+
mode: o ? "create" : "update",
|
|
182
|
+
selectedAgency: m,
|
|
183
|
+
isManualPaymentRequired: m?.manualPaymentRequired ?? !1,
|
|
184
|
+
requiredAttrKeys: f
|
|
185
|
+
},
|
|
186
|
+
actions: { onSubmit: Y },
|
|
187
|
+
errorHandling: g,
|
|
188
|
+
form: {
|
|
189
|
+
Fields: {
|
|
190
|
+
State: fe,
|
|
191
|
+
FipsCode: K ? be : void 0,
|
|
192
|
+
CaseNumber: f.has("case_number") ? he : void 0,
|
|
193
|
+
OrderNumber: f.has("order_number") ? pe : void 0,
|
|
194
|
+
RemittanceNumber: f.has("remittance_number") ? le : void 0,
|
|
195
|
+
PayPeriodMaximum: ce,
|
|
196
|
+
Amount: de,
|
|
197
|
+
PaymentPeriod: me
|
|
198
|
+
},
|
|
199
|
+
fieldsMetadata: Q,
|
|
200
|
+
hookFormInternals: z,
|
|
201
|
+
getFormSubmissionValues: Ne(n, E)
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
export {
|
|
206
|
+
He as useChildSupportGarnishmentForm
|
|
207
|
+
};
|
|
208
|
+
//# sourceMappingURL=useChildSupportGarnishmentForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useChildSupportGarnishmentForm.js","sources":["../../../../../../src/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.tsx"],"sourcesContent":["import { useEffect, useMemo, useRef } from 'react'\nimport { useForm, useWatch } from 'react-hook-form'\nimport type { UseFormProps } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport {\n type Garnishment,\n type GarnishmentType,\n} from '@gusto/embedded-api/models/components/garnishment'\nimport type { Agencies } from '@gusto/embedded-api/models/components/childsupportdata'\nimport { PaymentPeriod } from '@gusto/embedded-api/models/components/garnishmentchildsupport'\nimport { useGarnishmentsCreateMutation } from '@gusto/embedded-api/react-query/garnishmentsCreate'\nimport { useGarnishmentsUpdateMutation } from '@gusto/embedded-api/react-query/garnishmentsUpdate'\nimport { useGarnishmentsList } from '@gusto/embedded-api/react-query/garnishmentsList'\nimport { useGarnishmentsGetChildSupportData } from '@gusto/embedded-api/react-query/garnishmentsGetChildSupportData'\nimport {\n createChildSupportGarnishmentFormSchema,\n getRequiredAttrKeys,\n type ChildSupportGarnishmentFormData,\n type ChildSupportGarnishmentFormOutputs,\n type SupportedRequiredAttrKey,\n} from './childSupportGarnishmentFormSchema'\nimport {\n StateField,\n FipsCodeField,\n CaseNumberField,\n OrderNumberField,\n RemittanceNumberField,\n PayPeriodMaximumField,\n AmountField,\n PaymentPeriodField,\n type CountyEntry,\n type StateFieldEntry,\n} from './fields'\nimport { useDeriveFieldsMetadata } from '@/partner-hook-utils/form/useDeriveFieldsMetadata'\nimport { useHookFormInternals } from '@/partner-hook-utils/form/useHookFormInternals'\nimport { createGetFormSubmissionValues } from '@/partner-hook-utils/form/getFormSubmissionValues'\nimport { withOptions } from '@/partner-hook-utils/form/withOptions'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport type {\n BaseFormHookReady,\n FieldsMetadata,\n HookLoadingResult,\n HookSubmitResult,\n} from '@/partner-hook-utils/types'\nimport { useBaseSubmit } from '@/components/Base/useBaseSubmit'\nimport { SDKInternalError } from '@/types/sdkError'\n\nconst PAYMENT_PERIOD_OPTIONS = [\n { value: PaymentPeriod.EveryWeek, label: PaymentPeriod.EveryWeek },\n { value: PaymentPeriod.EveryOtherWeek, label: PaymentPeriod.EveryOtherWeek },\n { value: PaymentPeriod.TwicePerMonth, label: PaymentPeriod.TwicePerMonth },\n { value: PaymentPeriod.Monthly, label: PaymentPeriod.Monthly },\n] as const\n\nconst PAYMENT_PERIOD_ENTRIES = [\n PaymentPeriod.EveryWeek,\n PaymentPeriod.EveryOtherWeek,\n PaymentPeriod.TwicePerMonth,\n PaymentPeriod.Monthly,\n] as const\n\nexport interface UseChildSupportGarnishmentFormProps {\n employeeId: string\n /**\n * When set, loads that garnishment via the list query and updates it (PUT).\n * When omitted, the form is in create mode (POST).\n */\n garnishmentId?: string\n defaultValues?: Partial<ChildSupportGarnishmentFormData>\n validationMode?: UseFormProps['mode']\n shouldFocusError?: boolean\n}\n\nexport interface ChildSupportGarnishmentFormFields {\n State: typeof StateField\n /** Only available when the selected agency has more than one fips code, or the\n * sole code is county-scoped (not an \"all counties\" auto-pick). */\n FipsCode: typeof FipsCodeField | undefined\n /** Only available when the selected agency requires `case_number`. */\n CaseNumber: typeof CaseNumberField | undefined\n /** Only available when the selected agency requires `order_number`. */\n OrderNumber: typeof OrderNumberField | undefined\n /** Only available when the selected agency requires `remittance_number`. */\n RemittanceNumber: typeof RemittanceNumberField | undefined\n PayPeriodMaximum: typeof PayPeriodMaximumField\n Amount: typeof AmountField\n PaymentPeriod: typeof PaymentPeriodField\n}\n\nexport interface UseChildSupportGarnishmentFormReady extends BaseFormHookReady<\n FieldsMetadata,\n ChildSupportGarnishmentFormData,\n ChildSupportGarnishmentFormFields\n> {\n data: {\n /** Agencies offered as `State` options; raw entries the consumer can use\n * with `getOptionLabel` for translated names. */\n agencies: StateFieldEntry[]\n /** Counties for the currently selected state. Empty array when no state\n * is selected. */\n counties: CountyEntry[]\n /** The garnishment loaded for update; `null` in create mode. */\n deduction: Garnishment | null\n }\n status: {\n isPending: boolean\n mode: 'create' | 'update'\n /** The agency record matching the currently selected `state`. */\n selectedAgency: Agencies | null\n /** Mirrors `selectedAgency.manualPaymentRequired`; convenient for showing\n * a warning alert. */\n isManualPaymentRequired: boolean\n /** Which `required_attributes` keys the selected agency declares. */\n requiredAttrKeys: ReadonlySet<SupportedRequiredAttrKey>\n }\n actions: {\n onSubmit: () => Promise<HookSubmitResult<Garnishment> | undefined>\n }\n}\n\nexport type UseChildSupportGarnishmentFormResult =\n | HookLoadingResult\n | UseChildSupportGarnishmentFormReady\n\nexport function useChildSupportGarnishmentForm({\n employeeId,\n garnishmentId,\n defaultValues: partnerDefaults,\n validationMode = 'onSubmit',\n shouldFocusError = true,\n}: UseChildSupportGarnishmentFormProps): UseChildSupportGarnishmentFormResult {\n const isCreateMode = !garnishmentId\n const schemaMode = isCreateMode ? 'create' : 'update'\n\n // Agencies + their required-attributes / fips codes come from a single GET.\n const agencyDataQuery = useGarnishmentsGetChildSupportData({})\n const agencyList = useMemo(\n () => agencyDataQuery.data?.childSupportData?.agencies ?? [],\n [agencyDataQuery.data],\n )\n\n // Update mode reads the row from the list endpoint (the garnishments API\n // has no single-row GET).\n const garnishmentsListQuery = useGarnishmentsList({ employeeId }, { enabled: !isCreateMode })\n const fetchedDeduction = useMemo(() => {\n if (isCreateMode) return null\n return garnishmentsListQuery.data?.garnishments?.find(g => g.uuid === garnishmentId) ?? null\n }, [isCreateMode, garnishmentId, garnishmentsListQuery.data])\n\n const resolvedDefaults: ChildSupportGarnishmentFormData = useMemo(\n () => ({\n state: fetchedDeduction?.childSupport?.state ?? partnerDefaults?.state ?? '',\n fipsCode: fetchedDeduction?.childSupport?.fipsCode ?? partnerDefaults?.fipsCode ?? '',\n caseNumber: fetchedDeduction?.childSupport?.caseNumber ?? partnerDefaults?.caseNumber ?? '',\n orderNumber:\n fetchedDeduction?.childSupport?.orderNumber ?? partnerDefaults?.orderNumber ?? '',\n remittanceNumber:\n fetchedDeduction?.childSupport?.remittanceNumber ?? partnerDefaults?.remittanceNumber ?? '',\n amount: fetchedDeduction?.amount\n ? Number(fetchedDeduction.amount)\n : (partnerDefaults?.amount ?? 0),\n payPeriodMaximum: fetchedDeduction?.payPeriodMaximum\n ? Number(fetchedDeduction.payPeriodMaximum)\n : (partnerDefaults?.payPeriodMaximum ?? 0),\n paymentPeriod:\n (fetchedDeduction?.childSupport?.paymentPeriod as PaymentPeriod | undefined) ??\n partnerDefaults?.paymentPeriod ??\n PaymentPeriod.Monthly,\n }),\n [fetchedDeduction, partnerDefaults],\n )\n\n // The schema is built statically here. The agency-attribute fields\n // (`caseNumber`, `orderNumber`, `remittanceNumber`) are kept optional in the\n // schema and surfaced as `isRequired` at the metadata level when the\n // selected agency declares them in `required_attributes`. This matches the\n // legacy ChildSupportForm, which also used a static schema and relied on the\n // API to enforce missing-attribute validation. The hook's `requiredAttrKeys`\n // status flag tells consumers which UI fields to mark required.\n const [schema, metadataConfig] = useMemo(\n () => createChildSupportGarnishmentFormSchema({ mode: schemaMode }),\n [schemaMode],\n )\n\n const formMethods = useForm<\n ChildSupportGarnishmentFormData,\n unknown,\n ChildSupportGarnishmentFormOutputs\n >({\n resolver: zodResolver(schema),\n mode: validationMode,\n shouldFocusError,\n defaultValues: resolvedDefaults,\n values: resolvedDefaults,\n resetOptions: { keepDirtyValues: true },\n })\n\n const liveWatchedState = useWatch({ control: formMethods.control, name: 'state' })\n const liveSelectedAgency = useMemo(\n () => agencyList.find(a => a.state === liveWatchedState) ?? null,\n [agencyList, liveWatchedState],\n )\n\n // The agency-attribute fields stay in sync with the chosen state: when the\n // user switches states, the previous attribute values would otherwise carry\n // over and potentially submit alongside the wrong agency. The ref tracks\n // the previous value so the wipe only fires on user-driven transitions —\n // NOT on the initial sync when an existing garnishment loads (state moves\n // from '' to e.g. 'AK' as a side effect of `values` updating, which would\n // otherwise clobber the loaded case/order/remittance values).\n const previousWatchedStateRef = useRef<string | null>(null)\n useEffect(() => {\n const previous = previousWatchedStateRef.current\n previousWatchedStateRef.current = liveWatchedState\n // First render (no previous value) → skip the wipe.\n if (previous === null) return\n // Server-side load: previous was '' (initial defaults before the row\n // arrived), now it's the loaded state. That's a sync, not a user toggle.\n if (previous === '') return\n if (previous === liveWatchedState) return\n formMethods.setValue('caseNumber', '')\n formMethods.setValue('orderNumber', '')\n formMethods.setValue('remittanceNumber', '')\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [liveWatchedState])\n\n // When the selected agency has a single \"all counties\" fips code, auto-fill\n // the field so the consumer doesn't have to render the county select.\n const fipsCodes = liveSelectedAgency?.fipsCodes ?? []\n const singleAllCountiesFipsCode =\n fipsCodes.length === 1 && !fipsCodes[0]?.county?.length ? (fipsCodes[0]?.code ?? null) : null\n useEffect(() => {\n if (singleAllCountiesFipsCode) {\n formMethods.setValue('fipsCode', singleAllCountiesFipsCode)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [singleAllCountiesFipsCode])\n\n const createGarnishmentMutation = useGarnishmentsCreateMutation()\n const updateGarnishmentMutation = useGarnishmentsUpdateMutation()\n const isPending = createGarnishmentMutation.isPending || updateGarnishmentMutation.isPending\n\n const {\n baseSubmitHandler,\n error: submitError,\n setError: setSubmitError,\n } = useBaseSubmit('ChildSupportGarnishmentForm')\n\n const errorHandling = composeErrorHandler(\n isCreateMode ? [agencyDataQuery] : [agencyDataQuery, garnishmentsListQuery],\n { submitError, setSubmitError },\n )\n\n // ── Derived data exposed on the ready branch ─────────────────────────\n\n const agencies: StateFieldEntry[] = useMemo(\n () =>\n agencyList.map(a => ({\n state: a.state ?? '',\n name: a.name ?? a.state ?? '',\n manualPaymentRequired: a.manualPaymentRequired ?? false,\n })),\n [agencyList],\n )\n\n const counties: CountyEntry[] = useMemo(\n () =>\n (liveSelectedAgency?.fipsCodes ?? [])\n .filter(f => typeof f.code === 'string')\n .map(f => ({ fipsCode: f.code as string, county: f.county ?? null })),\n [liveSelectedAgency],\n )\n\n const requiredAttrKeys = useMemo(\n () => getRequiredAttrKeys(liveSelectedAgency),\n [liveSelectedAgency],\n )\n\n const hasSelectableCounties =\n counties.length > 1 || (counties.length === 1 && singleAllCountiesFipsCode == null)\n\n // ── Metadata + field-options wiring ─────────────────────────────────\n\n const baseMetadata = useDeriveFieldsMetadata(metadataConfig, formMethods.control)\n const stateOptions = agencies.map(a => ({ value: a.state, label: a.name }))\n const countyOptions = counties.map(c => ({\n value: c.fipsCode,\n label: c.county ?? c.fipsCode,\n }))\n\n const fieldsMetadata = {\n state: withOptions(baseMetadata.state, stateOptions, agencies),\n fipsCode: withOptions(baseMetadata.fipsCode, countyOptions, counties),\n caseNumber: baseMetadata.caseNumber,\n orderNumber: baseMetadata.orderNumber,\n remittanceNumber: baseMetadata.remittanceNumber,\n payPeriodMaximum: baseMetadata.payPeriodMaximum,\n amount: baseMetadata.amount,\n paymentPeriod: withOptions(\n baseMetadata.paymentPeriod,\n [...PAYMENT_PERIOD_OPTIONS],\n [...PAYMENT_PERIOD_ENTRIES],\n ),\n }\n\n // ── Submit ───────────────────────────────────────────────────────────\n\n const onSubmit = async (): Promise<HookSubmitResult<Garnishment> | undefined> => {\n let submitResult: HookSubmitResult<Garnishment> | undefined\n\n await new Promise<void>(resolve => {\n void formMethods.handleSubmit(\n async (data: ChildSupportGarnishmentFormOutputs) => {\n await baseSubmitHandler(data, async payload => {\n const childSupport = {\n state: payload.state,\n paymentPeriod: payload.paymentPeriod,\n fipsCode: payload.fipsCode,\n // Empty strings collapse to null so the API persists \"no value\n // declared\" rather than an empty case number.\n caseNumber: payload.caseNumber || null,\n orderNumber: payload.orderNumber || null,\n remittanceNumber: payload.remittanceNumber || null,\n }\n\n const description = `Child Support - ${childSupport.caseNumber ?? ''}`\n const amountStr = String(payload.amount)\n const payPeriodMaximumStr =\n payload.payPeriodMaximum > 0 ? String(payload.payPeriodMaximum) : null\n\n const requestBody = {\n active: true,\n amount: amountStr,\n description,\n courtOrdered: true,\n garnishmentType: 'child_support' as GarnishmentType,\n times: null,\n deductAsPercentage: true,\n payPeriodMaximum: payPeriodMaximumStr,\n recurring: true,\n childSupport,\n }\n\n let updated: Garnishment | undefined\n\n if (isCreateMode) {\n const result = await createGarnishmentMutation.mutateAsync({\n request: { employeeId, garnishmentRequest: requestBody },\n })\n updated = result.garnishment\n } else {\n if (!fetchedDeduction) {\n throw new SDKInternalError(\n 'Cannot update child-support deduction: no matching garnishment on file',\n )\n }\n const result = await updateGarnishmentMutation.mutateAsync({\n request: {\n garnishmentId: fetchedDeduction.uuid,\n updateGarnishmentRequest: {\n ...requestBody,\n version: fetchedDeduction.version as string,\n },\n },\n })\n updated = result.garnishment\n }\n\n if (!updated) {\n throw new SDKInternalError(\n isCreateMode\n ? 'Child-support deduction creation failed'\n : 'Child-support deduction update failed',\n )\n }\n\n submitResult = {\n mode: isCreateMode ? 'create' : 'update',\n data: updated,\n }\n })\n resolve()\n },\n () => {\n resolve()\n },\n )()\n })\n\n return submitResult\n }\n\n const hookFormInternals = useHookFormInternals(formMethods)\n\n if (agencyDataQuery.isLoading) {\n return { isLoading: true as const, errorHandling }\n }\n if (!isCreateMode && garnishmentsListQuery.isLoading) {\n return { isLoading: true as const, errorHandling }\n }\n\n return {\n isLoading: false as const,\n data: {\n agencies,\n counties,\n deduction: fetchedDeduction,\n },\n status: {\n isPending,\n mode: isCreateMode ? 'create' : 'update',\n selectedAgency: liveSelectedAgency,\n isManualPaymentRequired: liveSelectedAgency?.manualPaymentRequired ?? false,\n requiredAttrKeys,\n },\n actions: { onSubmit },\n errorHandling,\n form: {\n Fields: {\n State: StateField,\n FipsCode: hasSelectableCounties ? FipsCodeField : undefined,\n CaseNumber: requiredAttrKeys.has('case_number') ? CaseNumberField : undefined,\n OrderNumber: requiredAttrKeys.has('order_number') ? OrderNumberField : undefined,\n RemittanceNumber: requiredAttrKeys.has('remittance_number')\n ? RemittanceNumberField\n : undefined,\n PayPeriodMaximum: PayPeriodMaximumField,\n Amount: AmountField,\n PaymentPeriod: PaymentPeriodField,\n },\n fieldsMetadata,\n hookFormInternals,\n getFormSubmissionValues: createGetFormSubmissionValues(formMethods, schema),\n },\n }\n}\n\nexport type ChildSupportGarnishmentFormFieldsMetadata =\n UseChildSupportGarnishmentFormReady['form']['fieldsMetadata']\nexport type ChildSupportGarnishmentFormFieldsType =\n UseChildSupportGarnishmentFormReady['form']['Fields']\n"],"names":["PAYMENT_PERIOD_OPTIONS","PaymentPeriod","PAYMENT_PERIOD_ENTRIES","useChildSupportGarnishmentForm","employeeId","garnishmentId","partnerDefaults","validationMode","shouldFocusError","isCreateMode","schemaMode","agencyDataQuery","useGarnishmentsGetChildSupportData","agencyList","useMemo","garnishmentsListQuery","useGarnishmentsList","fetchedDeduction","g","resolvedDefaults","schema","metadataConfig","createChildSupportGarnishmentFormSchema","formMethods","useForm","zodResolver","liveWatchedState","useWatch","liveSelectedAgency","a","previousWatchedStateRef","useRef","useEffect","previous","fipsCodes","singleAllCountiesFipsCode","createGarnishmentMutation","useGarnishmentsCreateMutation","updateGarnishmentMutation","useGarnishmentsUpdateMutation","isPending","baseSubmitHandler","submitError","setSubmitError","useBaseSubmit","errorHandling","composeErrorHandler","agencies","counties","f","requiredAttrKeys","getRequiredAttrKeys","hasSelectableCounties","baseMetadata","useDeriveFieldsMetadata","stateOptions","countyOptions","c","fieldsMetadata","withOptions","onSubmit","submitResult","resolve","data","payload","childSupport","description","amountStr","payPeriodMaximumStr","requestBody","updated","SDKInternalError","hookFormInternals","useHookFormInternals","StateField","FipsCodeField","CaseNumberField","OrderNumberField","RemittanceNumberField","PayPeriodMaximumField","AmountField","PaymentPeriodField","createGetFormSubmissionValues"],"mappings":"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"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { OptionalFieldsToRequire } from '../../../../../partner-hook-utils/form/buildFormSchema';
|
|
3
|
+
export declare const DeductionFormErrorCodes: {
|
|
4
|
+
readonly REQUIRED: "REQUIRED";
|
|
5
|
+
readonly NEGATIVE_AMOUNT: "NEGATIVE_AMOUNT";
|
|
6
|
+
};
|
|
7
|
+
export type DeductionFormErrorCode = (typeof DeductionFormErrorCodes)[keyof typeof DeductionFormErrorCodes];
|
|
8
|
+
declare const fieldValidators: {
|
|
9
|
+
description: z.ZodString;
|
|
10
|
+
recurring: z.ZodPipe<z.ZodTransform<boolean | undefined, unknown>, z.ZodBoolean>;
|
|
11
|
+
deductAsPercentage: z.ZodPipe<z.ZodTransform<boolean | undefined, unknown>, z.ZodBoolean>;
|
|
12
|
+
amount: z.ZodPipe<z.ZodTransform<number, unknown>, z.ZodNumber>;
|
|
13
|
+
totalAmount: z.ZodPipe<z.ZodTransform<number, unknown>, z.ZodNumber>;
|
|
14
|
+
annualMaximum: z.ZodPipe<z.ZodTransform<number, unknown>, z.ZodNumber>;
|
|
15
|
+
garnishmentType: z.ZodEnum<{
|
|
16
|
+
readonly ChildSupport: "child_support";
|
|
17
|
+
readonly FederalTaxLien: "federal_tax_lien";
|
|
18
|
+
readonly StateTaxLien: "state_tax_lien";
|
|
19
|
+
readonly StudentLoan: "student_loan";
|
|
20
|
+
readonly CreditorGarnishment: "creditor_garnishment";
|
|
21
|
+
readonly FederalLoan: "federal_loan";
|
|
22
|
+
readonly OtherGarnishment: "other_garnishment";
|
|
23
|
+
}>;
|
|
24
|
+
};
|
|
25
|
+
export type DeductionFormField = keyof typeof fieldValidators;
|
|
26
|
+
export type DeductionFormData = {
|
|
27
|
+
[K in keyof typeof fieldValidators]: z.infer<(typeof fieldValidators)[K]>;
|
|
28
|
+
};
|
|
29
|
+
export type DeductionFormOutputs = DeductionFormData;
|
|
30
|
+
declare const requiredFieldsConfig: {
|
|
31
|
+
totalAmount: "never";
|
|
32
|
+
annualMaximum: "never";
|
|
33
|
+
};
|
|
34
|
+
export type DeductionFormOptionalFieldsToRequire = OptionalFieldsToRequire<typeof requiredFieldsConfig>;
|
|
35
|
+
interface DeductionFormSchemaOptions {
|
|
36
|
+
mode?: 'create' | 'update';
|
|
37
|
+
/**
|
|
38
|
+
* Court-ordered garnishments require `garnishmentType` (Federal Tax Lien,
|
|
39
|
+
* Student Loan, etc.). Non-court-ordered "custom" deductions don't carry a
|
|
40
|
+
* type — the field is excluded from the schema entirely, matching the legacy
|
|
41
|
+
* GarnishmentForm vs CustomDeductionForm split.
|
|
42
|
+
*/
|
|
43
|
+
courtOrdered: boolean;
|
|
44
|
+
optionalFieldsToRequire?: DeductionFormOptionalFieldsToRequire;
|
|
45
|
+
}
|
|
46
|
+
export declare function createDeductionFormSchema(options: DeductionFormSchemaOptions): import('../../../../../partner-hook-utils/form/buildFormSchema').BuildFormSchemaResult<{
|
|
47
|
+
description: z.ZodString;
|
|
48
|
+
recurring: z.ZodPipe<z.ZodTransform<boolean | undefined, unknown>, z.ZodBoolean>;
|
|
49
|
+
deductAsPercentage: z.ZodPipe<z.ZodTransform<boolean | undefined, unknown>, z.ZodBoolean>;
|
|
50
|
+
amount: z.ZodPipe<z.ZodTransform<number, unknown>, z.ZodNumber>;
|
|
51
|
+
totalAmount: z.ZodPipe<z.ZodTransform<number, unknown>, z.ZodNumber>;
|
|
52
|
+
annualMaximum: z.ZodPipe<z.ZodTransform<number, unknown>, z.ZodNumber>;
|
|
53
|
+
garnishmentType: z.ZodEnum<{
|
|
54
|
+
readonly ChildSupport: "child_support";
|
|
55
|
+
readonly FederalTaxLien: "federal_tax_lien";
|
|
56
|
+
readonly StateTaxLien: "state_tax_lien";
|
|
57
|
+
readonly StudentLoan: "student_loan";
|
|
58
|
+
readonly CreditorGarnishment: "creditor_garnishment";
|
|
59
|
+
readonly FederalLoan: "federal_loan";
|
|
60
|
+
readonly OtherGarnishment: "other_garnishment";
|
|
61
|
+
}>;
|
|
62
|
+
}>;
|
|
63
|
+
export {};
|