@gusto/embedded-react-sdk 0.44.2 → 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 +50 -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 +26 -26
- 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 +13 -13
- 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 +14 -14
- 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/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/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/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 +16 -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 +29 -21
- 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
package/dist/components/Employee/Documents/shared/useSignEmployeeForm/useSignEmployeeForm.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSignEmployeeForm.js","sources":["../../../../../../src/components/Employee/Documents/shared/useSignEmployeeForm/useSignEmployeeForm.tsx"],"sourcesContent":["import { useMemo, useCallback, useState, useEffect } from 'react'\nimport { useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport type { Form } from '@gusto/embedded-api/models/components/form'\nimport { useEmployeeFormsGet } from '@gusto/embedded-api/react-query/employeeFormsGet'\nimport { useEmployeeFormsGetPdf } from '@gusto/embedded-api/react-query/employeeFormsGetPdf'\nimport { useEmployeeFormsSignMutation } from '@gusto/embedded-api/react-query/employeeFormsSign'\nimport {\n createSignEmployeeFormSchema,\n MAX_PREPARERS,\n PREPARER_FIELDS_BY_INDEX,\n PREPARERS_BY_INDEX,\n type SignEmployeeFormData,\n type SignEmployeeFormOutputs,\n} from './signEmployeeFormSchema'\nimport {\n SignatureField,\n ConfirmSignatureField,\n UsedPreparerField,\n Preparer1FirstName,\n Preparer1LastName,\n Preparer1Street1,\n Preparer1Street2,\n Preparer1City,\n Preparer1State,\n Preparer1Zip,\n Preparer1Signature,\n Preparer1ConfirmSignature,\n Preparer2FirstName,\n Preparer2LastName,\n Preparer2Street1,\n Preparer2Street2,\n Preparer2City,\n Preparer2State,\n Preparer2Zip,\n Preparer2Signature,\n Preparer2ConfirmSignature,\n Preparer3FirstName,\n Preparer3LastName,\n Preparer3Street1,\n Preparer3Street2,\n Preparer3City,\n Preparer3State,\n Preparer3Zip,\n Preparer3Signature,\n Preparer3ConfirmSignature,\n Preparer4FirstName,\n Preparer4LastName,\n Preparer4Street1,\n Preparer4Street2,\n Preparer4City,\n Preparer4State,\n Preparer4Zip,\n Preparer4Signature,\n Preparer4ConfirmSignature,\n} from './fields'\nimport { useDeriveFieldsMetadata } from '@/partner-hook-utils/form/useDeriveFieldsMetadata'\nimport { useHookFormInternals } from '@/partner-hook-utils/form/useHookFormInternals'\nimport { withOptions } from '@/partner-hook-utils/form/withOptions'\nimport { createGetFormSubmissionValues } from '@/partner-hook-utils/form/getFormSubmissionValues'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport type {\n BaseFormHookReady,\n FieldsMetadata,\n HookLoadingResult,\n HookSubmitResult,\n} from '@/partner-hook-utils/types'\nimport { useBaseSubmit } from '@/components/Base/useBaseSubmit'\nimport { I9_FORM_NAME, STATES_ABBR } from '@/shared/constants'\n\nconst stateOptions = STATES_ABBR.map(abbr => ({ label: abbr, value: abbr }))\n\n// ── Preparer field groups ──────────────────────────────────────────────\n\nconst preparer1Fields = {\n FirstName: Preparer1FirstName,\n LastName: Preparer1LastName,\n Street1: Preparer1Street1,\n Street2: Preparer1Street2,\n City: Preparer1City,\n State: Preparer1State,\n Zip: Preparer1Zip,\n Signature: Preparer1Signature,\n ConfirmSignature: Preparer1ConfirmSignature,\n}\n\nconst preparer2Fields = {\n FirstName: Preparer2FirstName,\n LastName: Preparer2LastName,\n Street1: Preparer2Street1,\n Street2: Preparer2Street2,\n City: Preparer2City,\n State: Preparer2State,\n Zip: Preparer2Zip,\n Signature: Preparer2Signature,\n ConfirmSignature: Preparer2ConfirmSignature,\n}\n\nconst preparer3Fields = {\n FirstName: Preparer3FirstName,\n LastName: Preparer3LastName,\n Street1: Preparer3Street1,\n Street2: Preparer3Street2,\n City: Preparer3City,\n State: Preparer3State,\n Zip: Preparer3Zip,\n Signature: Preparer3Signature,\n ConfirmSignature: Preparer3ConfirmSignature,\n}\n\nconst preparer4Fields = {\n FirstName: Preparer4FirstName,\n LastName: Preparer4LastName,\n Street1: Preparer4Street1,\n Street2: Preparer4Street2,\n City: Preparer4City,\n State: Preparer4State,\n Zip: Preparer4Zip,\n Signature: Preparer4Signature,\n ConfirmSignature: Preparer4ConfirmSignature,\n}\n\nexport type PreparerFieldGroup = typeof preparer1Fields\n\n// ── Types ──────────────────────────────────────────────────────────────\n\nexport interface UseSignEmployeeFormProps {\n employeeId: string\n formId: string\n}\n\nexport interface SignEmployeeFormFieldComponents {\n Signature: typeof SignatureField\n ConfirmSignature: typeof ConfirmSignatureField\n UsedPreparer: typeof UsedPreparerField | undefined\n Preparer1: PreparerFieldGroup | undefined\n Preparer2: PreparerFieldGroup | undefined\n Preparer3: PreparerFieldGroup | undefined\n Preparer4: PreparerFieldGroup | undefined\n}\n\nexport interface UseSignEmployeeFormReady extends BaseFormHookReady<\n FieldsMetadata,\n SignEmployeeFormData,\n SignEmployeeFormFieldComponents\n> {\n data: {\n form: Form\n pdfUrl: string | null | undefined\n }\n status: { isPending: boolean; mode: 'create' }\n actions: {\n onSubmit: () => Promise<HookSubmitResult<Form> | undefined>\n addPreparer?: () => void\n removePreparer?: () => void\n }\n form: BaseFormHookReady<\n FieldsMetadata,\n SignEmployeeFormData,\n SignEmployeeFormFieldComponents\n >['form'] & {\n preparers?: { count: number; canAdd: boolean; canRemove: boolean }\n }\n}\n\n// ── Hook ───────────────────────────────────────────────────────────────\n\nexport function useSignEmployeeForm({\n employeeId,\n formId,\n}: UseSignEmployeeFormProps): HookLoadingResult | UseSignEmployeeFormReady {\n const formQuery = useEmployeeFormsGet({ employeeId, formId })\n const pdfQuery = useEmployeeFormsGetPdf({ employeeId, formId })\n\n const form = formQuery.data?.form\n const pdfUrl = pdfQuery.data?.formPdf?.documentUrl\n const isI9 = form?.name === I9_FORM_NAME\n\n const [preparerCount, setPreparerCount] = useState(0)\n\n const [schema, metadataConfig] = useMemo(\n () => createSignEmployeeFormSchema({ isI9, preparerCount }),\n [isI9, preparerCount],\n )\n\n const formMethods = useForm<SignEmployeeFormData, unknown, SignEmployeeFormOutputs>({\n resolver: zodResolver(schema),\n defaultValues: {\n signature: '',\n confirmSignature: false,\n usedPreparer: 'no',\n },\n })\n\n const { mutateAsync: signForm, isPending } = useEmployeeFormsSignMutation()\n\n const {\n baseSubmitHandler,\n error: submitError,\n setError: setSubmitError,\n } = useBaseSubmit('SignEmployeeForm')\n\n const queries = [formQuery, pdfQuery]\n const errorHandling = composeErrorHandler(queries, { submitError, setSubmitError })\n\n const baseMetadata = useDeriveFieldsMetadata(metadataConfig, formMethods.control)\n\n const fieldsMetadata = useMemo(\n () => ({\n ...baseMetadata,\n ...(isI9\n ? {\n usedPreparer: withOptions(baseMetadata.usedPreparer, [\n { label: 'No, I completed this myself', value: 'no' },\n { label: 'Yes, I used a preparer/translator', value: 'yes' },\n ]),\n preparerState: withOptions(baseMetadata.preparerState, stateOptions, STATES_ABBR),\n preparer2State: withOptions(baseMetadata.preparer2State, stateOptions, STATES_ABBR),\n preparer3State: withOptions(baseMetadata.preparer3State, stateOptions, STATES_ABBR),\n preparer4State: withOptions(baseMetadata.preparer4State, stateOptions, STATES_ABBR),\n }\n : {}),\n }),\n [baseMetadata, isI9],\n )\n\n const addPreparer = useCallback(() => {\n setPreparerCount(prev => Math.min(prev + 1, MAX_PREPARERS))\n }, [])\n\n const removePreparer = useCallback(() => {\n setPreparerCount(prev => {\n if (prev <= 0) return prev\n const preparerFields = PREPARER_FIELDS_BY_INDEX[prev - 1]\n if (!preparerFields) return prev\n for (const name of preparerFields) {\n formMethods.unregister(name)\n }\n return prev - 1\n })\n }, [formMethods.unregister])\n\n const usedPreparer = isI9 ? formMethods.watch('usedPreparer') : undefined\n\n useEffect(() => {\n if (!isI9) return\n if (usedPreparer === 'yes' && preparerCount === 0) {\n addPreparer()\n }\n if (usedPreparer === 'no' && preparerCount > 0) {\n for (let i = preparerCount; i > 0; i--) {\n removePreparer()\n }\n }\n }, [usedPreparer, isI9, preparerCount, addPreparer, removePreparer])\n\n const onSubmit = async (): Promise<HookSubmitResult<Form> | undefined> => {\n let submitResult: HookSubmitResult<Form> | undefined\n\n await new Promise<void>(resolve => {\n void formMethods.handleSubmit(\n async (data: SignEmployeeFormOutputs) => {\n await baseSubmitHandler(data, async payload => {\n const requestBody: Record<string, unknown> = {\n signatureText: payload.signature,\n agree: payload.confirmSignature,\n }\n\n if (isI9) {\n Object.assign(requestBody, buildPreparerPayload(payload, preparerCount))\n }\n\n const result = await signForm({\n request: {\n employeeId,\n formId: form!.uuid,\n requestBody: requestBody as {\n signatureText: string\n agree: boolean\n signedByIpAddress: string\n },\n },\n })\n\n if (result.form) {\n submitResult = { mode: 'create', data: result.form }\n }\n })\n resolve()\n },\n () => {\n resolve()\n },\n )()\n })\n\n return submitResult\n }\n\n const hookFormInternals = useHookFormInternals(formMethods)\n\n const isDataLoading = formQuery.isLoading || pdfQuery.isLoading\n\n if (isDataLoading || !form) {\n return { isLoading: true as const, errorHandling }\n }\n\n return {\n isLoading: false as const,\n data: { form, pdfUrl },\n status: { isPending, mode: 'create' as const },\n actions: {\n onSubmit,\n ...(isI9 ? { addPreparer, removePreparer } : {}),\n },\n errorHandling,\n form: {\n Fields: {\n Signature: SignatureField,\n ConfirmSignature: ConfirmSignatureField,\n UsedPreparer: isI9 ? UsedPreparerField : undefined,\n Preparer1: isI9 && preparerCount >= 1 ? preparer1Fields : undefined,\n Preparer2: isI9 && preparerCount >= 2 ? preparer2Fields : undefined,\n Preparer3: isI9 && preparerCount >= 3 ? preparer3Fields : undefined,\n Preparer4: isI9 && preparerCount >= 4 ? preparer4Fields : undefined,\n },\n fieldsMetadata,\n hookFormInternals,\n getFormSubmissionValues: createGetFormSubmissionValues(formMethods, schema),\n ...(isI9\n ? {\n preparers: {\n count: preparerCount,\n canAdd: preparerCount < MAX_PREPARERS,\n canRemove: preparerCount > 0,\n },\n }\n : {}),\n },\n }\n}\n\n// ── Helpers ─────────────────────────────────────────────────────────────\n\nfunction buildPreparerPayload(payload: SignEmployeeFormOutputs, count: number) {\n if (payload.usedPreparer !== 'yes' || count === 0) {\n return { preparer: false }\n }\n\n const result: Record<string, unknown> = { preparer: true }\n\n for (let index = 0; index < count; index++) {\n if (index > 0) {\n result[`preparer${String(index + 1)}`] = true\n }\n\n const preparer = PREPARERS_BY_INDEX[index]\n if (!preparer) continue\n\n result[preparer.firstName] = payload[preparer.firstName]\n result[preparer.lastName] = payload[preparer.lastName]\n result[preparer.street1] = payload[preparer.street1]\n if (payload[preparer.street2]) {\n result[preparer.street2] = payload[preparer.street2]\n }\n result[preparer.city] = payload[preparer.city]\n result[preparer.state] = payload[preparer.state]\n result[preparer.zip] = payload[preparer.zip]\n result[preparer.signature] = payload[preparer.signature]\n result[preparer.agree] = 'true'\n }\n\n return result\n}\n\nexport type UseSignEmployeeFormResult = HookLoadingResult | UseSignEmployeeFormReady\nexport type SignEmployeeFormFieldsMetadata = UseSignEmployeeFormReady['form']['fieldsMetadata']\nexport type SignEmployeeFormFields = UseSignEmployeeFormReady['form']['Fields']\n"],"names":["stateOptions","STATES_ABBR","abbr","preparer1Fields","Preparer1FirstName","Preparer1LastName","Preparer1Street1","Preparer1Street2","Preparer1City","Preparer1State","Preparer1Zip","Preparer1Signature","Preparer1ConfirmSignature","preparer2Fields","Preparer2FirstName","Preparer2LastName","Preparer2Street1","Preparer2Street2","Preparer2City","Preparer2State","Preparer2Zip","Preparer2Signature","Preparer2ConfirmSignature","preparer3Fields","Preparer3FirstName","Preparer3LastName","Preparer3Street1","Preparer3Street2","Preparer3City","Preparer3State","Preparer3Zip","Preparer3Signature","Preparer3ConfirmSignature","preparer4Fields","Preparer4FirstName","Preparer4LastName","Preparer4Street1","Preparer4Street2","Preparer4City","Preparer4State","Preparer4Zip","Preparer4Signature","Preparer4ConfirmSignature","useSignEmployeeForm","employeeId","formId","formQuery","useEmployeeFormsGet","pdfQuery","useEmployeeFormsGetPdf","form","pdfUrl","isI9","I9_FORM_NAME","preparerCount","setPreparerCount","useState","schema","metadataConfig","useMemo","createSignEmployeeFormSchema","formMethods","useForm","zodResolver","signForm","isPending","useEmployeeFormsSignMutation","baseSubmitHandler","submitError","setSubmitError","useBaseSubmit","errorHandling","composeErrorHandler","baseMetadata","useDeriveFieldsMetadata","fieldsMetadata","withOptions","addPreparer","useCallback","prev","MAX_PREPARERS","removePreparer","preparerFields","PREPARER_FIELDS_BY_INDEX","name","usedPreparer","useEffect","i","onSubmit","submitResult","resolve","data","payload","requestBody","buildPreparerPayload","result","hookFormInternals","useHookFormInternals","SignatureField","ConfirmSignatureField","UsedPreparerField","createGetFormSubmissionValues","count","index","preparer","PREPARERS_BY_INDEX"],"mappings":";;;;;;;;;;;;;;;AAsEA,MAAMA,IAAeC,EAAY,IAAI,CAAAC,OAAS,EAAE,OAAOA,GAAM,OAAOA,EAAA,EAAO,GAIrEC,KAAkB;AAAA,EACtB,WAAWC;AAAA,EACX,UAAUC;AAAA,EACV,SAASC;AAAA,EACT,SAASC;AAAA,EACT,MAAMC;AAAA,EACN,OAAOC;AAAA,EACP,KAAKC;AAAA,EACL,WAAWC;AAAA,EACX,kBAAkBC;AACpB,GAEMC,KAAkB;AAAA,EACtB,WAAWC;AAAA,EACX,UAAUC;AAAA,EACV,SAASC;AAAA,EACT,SAASC;AAAA,EACT,MAAMC;AAAA,EACN,OAAOC;AAAA,EACP,KAAKC;AAAA,EACL,WAAWC;AAAA,EACX,kBAAkBC;AACpB,GAEMC,KAAkB;AAAA,EACtB,WAAWC;AAAA,EACX,UAAUC;AAAA,EACV,SAASC;AAAA,EACT,SAASC;AAAA,EACT,MAAMC;AAAA,EACN,OAAOC;AAAA,EACP,KAAKC;AAAA,EACL,WAAWC;AAAA,EACX,kBAAkBC;AACpB,GAEMC,KAAkB;AAAA,EACtB,WAAW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, Trans as
|
|
3
|
-
import { BaseLayout as
|
|
1
|
+
import { jsx as i, jsxs as n, Fragment as h } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as f, Trans as a } from "react-i18next";
|
|
3
|
+
import { BaseLayout as b } from "../../../Base/Base.js";
|
|
4
4
|
import "../../../Base/useBase.js";
|
|
5
|
-
import { Form as
|
|
6
|
-
import { SDKFormProvider as
|
|
7
|
-
import { useComponentContext as
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
import { Form as E } from "../../../Common/Form/Form.js";
|
|
6
|
+
import { SDKFormProvider as R } from "../../../../partner-hook-utils/form/SDKFormProvider.js";
|
|
7
|
+
import { useComponentContext as x } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
|
+
import { Flex as l } from "../../../Common/Flex/Flex.js";
|
|
9
|
+
function T({
|
|
10
|
+
federalTaxes: r,
|
|
11
|
+
onSubmit: d,
|
|
12
|
+
actions: c,
|
|
13
|
+
alert: m,
|
|
14
|
+
className: u,
|
|
15
|
+
children: p
|
|
15
16
|
}) {
|
|
16
|
-
const { t: e } = f("Employee.FederalTaxes"), o =
|
|
17
|
-
switch (
|
|
17
|
+
const { t: e } = f("Employee.FederalTaxes"), o = x(), t = r.form.Fields, g = (s) => {
|
|
18
|
+
switch (s) {
|
|
18
19
|
case "Single":
|
|
19
20
|
return e("filingStatusSingle");
|
|
20
21
|
case "Married":
|
|
@@ -25,80 +26,86 @@ function H({
|
|
|
25
26
|
return e("filingStatusExemptFromWithholding");
|
|
26
27
|
}
|
|
27
28
|
};
|
|
28
|
-
return /* @__PURE__ */ i("section", { className:
|
|
29
|
-
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
t: e,
|
|
36
|
-
components: {
|
|
37
|
-
IrsCalculatorLink: /* @__PURE__ */ i(o.Link, {}),
|
|
38
|
-
HelpCenterLink: /* @__PURE__ */ i(o.Link, {})
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
) }),
|
|
42
|
-
/* @__PURE__ */ i(
|
|
43
|
-
t.FilingStatus,
|
|
44
|
-
{
|
|
45
|
-
label: e("federalFilingStatus1c"),
|
|
46
|
-
placeholder: e("federalFilingStatusPlaceholder"),
|
|
47
|
-
description: e("selectWithholdingDescription"),
|
|
48
|
-
validationMessages: { REQUIRED: e("validations.federalFilingStatus") },
|
|
49
|
-
getOptionLabel: m
|
|
50
|
-
}
|
|
51
|
-
),
|
|
52
|
-
/* @__PURE__ */ i(
|
|
53
|
-
t.TwoJobs,
|
|
54
|
-
{
|
|
55
|
-
label: e("multipleJobs2c"),
|
|
56
|
-
description: /* @__PURE__ */ i(
|
|
57
|
-
r,
|
|
29
|
+
return /* @__PURE__ */ i(l, { flexDirection: "column", alignItems: "stretch", children: /* @__PURE__ */ i("section", { className: u, children: /* @__PURE__ */ i(b, { error: r.errorHandling.errors, children: /* @__PURE__ */ i(R, { formHookResult: r, children: /* @__PURE__ */ i(E, { onSubmit: d, children: p ?? /* @__PURE__ */ n(h, { children: [
|
|
30
|
+
m,
|
|
31
|
+
/* @__PURE__ */ n(l, { flexDirection: "column", gap: 32, children: [
|
|
32
|
+
/* @__PURE__ */ n(l, { flexDirection: "column", gap: 4, children: [
|
|
33
|
+
/* @__PURE__ */ i(o.Heading, { as: "h1", styledAs: "h2", children: e("federalTaxesTitle") }),
|
|
34
|
+
/* @__PURE__ */ i(o.Text, { variant: "supporting", children: /* @__PURE__ */ i(
|
|
35
|
+
a,
|
|
58
36
|
{
|
|
59
|
-
i18nKey: "
|
|
37
|
+
i18nKey: "irsCalculator",
|
|
60
38
|
t: e,
|
|
61
39
|
components: {
|
|
62
|
-
|
|
40
|
+
IrsCalculatorLink: /* @__PURE__ */ i(o.Link, {}),
|
|
41
|
+
HelpCenterLink: /* @__PURE__ */ i(o.Link, {})
|
|
63
42
|
}
|
|
64
43
|
}
|
|
44
|
+
) })
|
|
45
|
+
] }),
|
|
46
|
+
/* @__PURE__ */ n(l, { flexDirection: "column", gap: 20, children: [
|
|
47
|
+
/* @__PURE__ */ i(
|
|
48
|
+
t.FilingStatus,
|
|
49
|
+
{
|
|
50
|
+
label: e("federalFilingStatus1c"),
|
|
51
|
+
placeholder: e("federalFilingStatusPlaceholder"),
|
|
52
|
+
description: e("selectWithholdingDescription"),
|
|
53
|
+
validationMessages: { REQUIRED: e("validations.federalFilingStatus") },
|
|
54
|
+
getOptionLabel: g
|
|
55
|
+
}
|
|
56
|
+
),
|
|
57
|
+
/* @__PURE__ */ i(
|
|
58
|
+
t.TwoJobs,
|
|
59
|
+
{
|
|
60
|
+
label: e("multipleJobs2c"),
|
|
61
|
+
description: /* @__PURE__ */ i(
|
|
62
|
+
a,
|
|
63
|
+
{
|
|
64
|
+
i18nKey: "includesSpouseExplanation",
|
|
65
|
+
t: e,
|
|
66
|
+
components: {
|
|
67
|
+
IrsLink: /* @__PURE__ */ i(o.Link, {})
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
),
|
|
71
|
+
validationMessages: { REQUIRED: e("validations.federalTwoJobs") },
|
|
72
|
+
getOptionLabel: (s) => e(s ? "twoJobYesLabel" : "twoJobNoLabel")
|
|
73
|
+
}
|
|
74
|
+
),
|
|
75
|
+
/* @__PURE__ */ i(
|
|
76
|
+
t.DependentsAmount,
|
|
77
|
+
{
|
|
78
|
+
label: e("dependentsTotalIfApplicable"),
|
|
79
|
+
validationMessages: { REQUIRED: e("fieldIsRequired") }
|
|
80
|
+
}
|
|
65
81
|
),
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
/* @__PURE__ */ i(
|
|
92
|
-
t.ExtraWithholding,
|
|
93
|
-
{
|
|
94
|
-
label: e("extraWithholding"),
|
|
95
|
-
validationMessages: { REQUIRED: e("fieldIsRequired") }
|
|
96
|
-
}
|
|
97
|
-
),
|
|
98
|
-
a
|
|
99
|
-
] }) }) }) }) });
|
|
82
|
+
/* @__PURE__ */ i(
|
|
83
|
+
t.OtherIncome,
|
|
84
|
+
{
|
|
85
|
+
label: e("otherIncome"),
|
|
86
|
+
validationMessages: { REQUIRED: e("fieldIsRequired") }
|
|
87
|
+
}
|
|
88
|
+
),
|
|
89
|
+
/* @__PURE__ */ i(
|
|
90
|
+
t.Deductions,
|
|
91
|
+
{
|
|
92
|
+
label: e("deductions"),
|
|
93
|
+
validationMessages: { REQUIRED: e("fieldIsRequired") }
|
|
94
|
+
}
|
|
95
|
+
),
|
|
96
|
+
/* @__PURE__ */ i(
|
|
97
|
+
t.ExtraWithholding,
|
|
98
|
+
{
|
|
99
|
+
label: e("extraWithholding"),
|
|
100
|
+
validationMessages: { REQUIRED: e("fieldIsRequired") }
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
] }),
|
|
104
|
+
c
|
|
105
|
+
] })
|
|
106
|
+
] }) }) }) }) }) });
|
|
100
107
|
}
|
|
101
108
|
export {
|
|
102
|
-
|
|
109
|
+
T as FederalTaxesView
|
|
103
110
|
};
|
|
104
111
|
//# sourceMappingURL=FederalTaxesView.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FederalTaxesView.js","sources":["../../../../../src/components/Employee/FederalTaxes/shared/FederalTaxesView.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { Trans, useTranslation } from 'react-i18next'\nimport { type useFederalTaxesForm, type FilingStatusValue } from './useFederalTaxesForm'\nimport { BaseLayout } from '@/components/Base'\nimport { Form } from '@/components/Common/Form'\nimport { SDKFormProvider } from '@/partner-hook-utils/form/SDKFormProvider'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ntype ReadyFederalTaxesForm = Extract<ReturnType<typeof useFederalTaxesForm>, { isLoading: false }>\n\nexport interface FederalTaxesViewProps {\n federalTaxes: ReadyFederalTaxesForm\n onSubmit: () => void | Promise<void>\n actions: ReactNode\n alert?: ReactNode\n className?: string\n children?: ReactNode\n}\n\nexport function FederalTaxesView({\n federalTaxes,\n onSubmit,\n actions,\n alert,\n className,\n children,\n}: FederalTaxesViewProps) {\n const { t } = useTranslation('Employee.FederalTaxes')\n const Components = useComponentContext()\n const Fields = federalTaxes.form.Fields\n\n const filingStatusLabel = (value: FilingStatusValue): string => {\n switch (value) {\n case 'Single':\n return t('filingStatusSingle')\n case 'Married':\n return t('filingStatusMarried')\n case 'Head of Household':\n return t('filingStatusHeadOfHousehold')\n case 'Exempt from withholding':\n return t('filingStatusExemptFromWithholding')\n }\n }\n\n return (\n <section className={className}>\n
|
|
1
|
+
{"version":3,"file":"FederalTaxesView.js","sources":["../../../../../src/components/Employee/FederalTaxes/shared/FederalTaxesView.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { Trans, useTranslation } from 'react-i18next'\nimport { type useFederalTaxesForm, type FilingStatusValue } from './useFederalTaxesForm'\nimport { BaseLayout } from '@/components/Base'\nimport { Form } from '@/components/Common/Form'\nimport { Flex } from '@/components/Common/Flex'\nimport { SDKFormProvider } from '@/partner-hook-utils/form/SDKFormProvider'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ntype ReadyFederalTaxesForm = Extract<ReturnType<typeof useFederalTaxesForm>, { isLoading: false }>\n\nexport interface FederalTaxesViewProps {\n federalTaxes: ReadyFederalTaxesForm\n onSubmit: () => void | Promise<void>\n actions: ReactNode\n alert?: ReactNode\n className?: string\n children?: ReactNode\n}\n\nexport function FederalTaxesView({\n federalTaxes,\n onSubmit,\n actions,\n alert,\n className,\n children,\n}: FederalTaxesViewProps) {\n const { t } = useTranslation('Employee.FederalTaxes')\n const Components = useComponentContext()\n const Fields = federalTaxes.form.Fields\n\n const filingStatusLabel = (value: FilingStatusValue): string => {\n switch (value) {\n case 'Single':\n return t('filingStatusSingle')\n case 'Married':\n return t('filingStatusMarried')\n case 'Head of Household':\n return t('filingStatusHeadOfHousehold')\n case 'Exempt from withholding':\n return t('filingStatusExemptFromWithholding')\n }\n }\n\n return (\n <Flex flexDirection=\"column\" alignItems=\"stretch\">\n <section className={className}>\n <BaseLayout error={federalTaxes.errorHandling.errors}>\n <SDKFormProvider formHookResult={federalTaxes}>\n <Form onSubmit={onSubmit}>\n {children ?? (\n <>\n {alert}\n <Flex flexDirection=\"column\" gap={32}>\n <Flex flexDirection=\"column\" gap={4}>\n <Components.Heading as=\"h1\" styledAs=\"h2\">\n {t('federalTaxesTitle')}\n </Components.Heading>\n <Components.Text variant=\"supporting\">\n <Trans\n i18nKey=\"irsCalculator\"\n t={t}\n components={{\n IrsCalculatorLink: <Components.Link />,\n HelpCenterLink: <Components.Link />,\n }}\n />\n </Components.Text>\n </Flex>\n <Flex flexDirection=\"column\" gap={20}>\n <Fields.FilingStatus\n label={t('federalFilingStatus1c')}\n placeholder={t('federalFilingStatusPlaceholder')}\n description={t('selectWithholdingDescription')}\n validationMessages={{ REQUIRED: t('validations.federalFilingStatus') }}\n getOptionLabel={filingStatusLabel}\n />\n <Fields.TwoJobs\n label={t('multipleJobs2c')}\n description={\n <Trans\n i18nKey=\"includesSpouseExplanation\"\n t={t}\n components={{\n IrsLink: <Components.Link />,\n }}\n />\n }\n validationMessages={{ REQUIRED: t('validations.federalTwoJobs') }}\n getOptionLabel={value => (value ? t('twoJobYesLabel') : t('twoJobNoLabel'))}\n />\n <Fields.DependentsAmount\n label={t('dependentsTotalIfApplicable')}\n validationMessages={{ REQUIRED: t('fieldIsRequired') }}\n />\n <Fields.OtherIncome\n label={t('otherIncome')}\n validationMessages={{ REQUIRED: t('fieldIsRequired') }}\n />\n <Fields.Deductions\n label={t('deductions')}\n validationMessages={{ REQUIRED: t('fieldIsRequired') }}\n />\n <Fields.ExtraWithholding\n label={t('extraWithholding')}\n validationMessages={{ REQUIRED: t('fieldIsRequired') }}\n />\n </Flex>\n\n {actions}\n </Flex>\n </>\n )}\n </Form>\n </SDKFormProvider>\n </BaseLayout>\n </section>\n </Flex>\n )\n}\n"],"names":["FederalTaxesView","federalTaxes","onSubmit","actions","alert","className","children","t","useTranslation","Components","useComponentContext","Fields","filingStatusLabel","value","jsx","Flex","BaseLayout","SDKFormProvider","Form","jsxs","Fragment","Trans"],"mappings":";;;;;;;;AAoBO,SAASA,EAAiB;AAAA,EAC/B,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AACF,GAA0B;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,uBAAuB,GAC9CC,IAAaC,EAAA,GACbC,IAASV,EAAa,KAAK,QAE3BW,IAAoB,CAACC,MAAqC;AAC9D,YAAQA,GAAA;AAAA,MACN,KAAK;AACH,eAAON,EAAE,oBAAoB;AAAA,MAC/B,KAAK;AACH,eAAOA,EAAE,qBAAqB;AAAA,MAChC,KAAK;AACH,eAAOA,EAAE,6BAA6B;AAAA,MACxC,KAAK;AACH,eAAOA,EAAE,mCAAmC;AAAA,IAAA;AAAA,EAElD;AAEA,SACE,gBAAAO,EAACC,KAAK,eAAc,UAAS,YAAW,WACtC,UAAA,gBAAAD,EAAC,WAAA,EAAQ,WAAAT,GACP,UAAA,gBAAAS,EAACE,GAAA,EAAW,OAAOf,EAAa,cAAc,QAC5C,UAAA,gBAAAa,EAACG,GAAA,EAAgB,gBAAgBhB,GAC/B,UAAA,gBAAAa,EAACI,GAAA,EAAK,UAAAhB,GACH,UAAAI,KACC,gBAAAa,EAAAC,GAAA,EACG,UAAA;AAAA,IAAAhB;AAAA,IACD,gB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C9D,gBAAgB,CAAAM,MAAkBN,EAARM,IAAU,mBAAsB,eAAN;AAAA,UAAqB;AAAA,QAAA;AAAA,QAE3E,gBAAAC;AAAA,UAACH,EAAO;AAAA,UAAP;AAAA,YACC,OAAOJ,EAAE,6BAA6B;AAAA,YACtC,oBAAoB,EAAE,UAAUA,EAAE,iBAAiB,EAAA;AAAA,UAAE;AAAA,QAAA;AAAA,QAEvD,gBAAAO;AAAA,UAACH,EAAO;AAAA,UAAP;AAAA,YACC,OAAOJ,EAAE,aAAa;AAAA,YACtB,oBAAoB,EAAE,UAAUA,EAAE,iBAAiB,EAAA;AAAA,UAAE;AAAA,QAAA;AAAA,QAEvD,gBAAAO;AAAA,UAACH,EAAO;AAAA,UAAP;AAAA,YACC,OAAOJ,EAAE,YAAY;AAAA,YACrB,oBAAoB,EAAE,UAAUA,EAAE,iBAAiB,EAAA;AAAA,UAAE;AAAA,QAAA;AAAA,QAEvD,gBAAAO;AAAA,UAACH,EAAO;AAAA,UAAP;AAAA,YACC,OAAOJ,EAAE,kBAAkB;AAAA,YAC3B,oBAAoB,EAAE,UAAUA,EAAE,iBAAiB,EAAA;AAAA,UAAE;AAAA,QAAA;AAAA,MACvD,GACF;AAAA,MAECJ;AAAA,IAAA,EAAA,CACH;AAAA,EAAA,EAAA,CACF,EAAA,CAEJ,EAAA,CACF,EAAA,CACF,EAAA,CACF,EAAA,CACF;AAEJ;"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e, Fragment as V } from "react/jsx-runtime";
|
|
2
|
-
import { useState as I, useRef as Re, useLayoutEffect as ke, useMemo as
|
|
3
|
-
import { useTranslation as O, Trans as
|
|
2
|
+
import { useState as I, useRef as Re, useLayoutEffect as ke, useMemo as A } from "react";
|
|
3
|
+
import { useTranslation as O, Trans as w } from "react-i18next";
|
|
4
4
|
import { useWatch as Te } from "react-hook-form";
|
|
5
5
|
import { getPendingFutureHomeAddress as Pe, formatPendingHomeAddressLine as z } from "./getPendingFutureHomeAddress.js";
|
|
6
6
|
import Ie from "../../../../assets/icons/house.svg.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import Ae from "../../../../assets/icons/pencil.svg.js";
|
|
8
|
+
import we from "../../../../assets/icons/trashcan.svg.js";
|
|
9
9
|
import { HomeAddressErrorCodes as a } from "../../Profile/shared/useHomeAddressForm/homeAddressSchema.js";
|
|
10
10
|
import { SDKFormProvider as Z } from "../../../../partner-hook-utils/form/SDKFormProvider.js";
|
|
11
|
-
import { Flex as s, FlexItem as
|
|
11
|
+
import { Flex as s, FlexItem as Le } from "../../../Common/Flex/Flex.js";
|
|
12
12
|
import { Grid as j } from "../../../Common/Grid/Grid.js";
|
|
13
13
|
import { EmptyData as Fe } from "../../../Common/EmptyData/EmptyData.js";
|
|
14
14
|
import { useComponentContext as Y } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
@@ -22,7 +22,7 @@ function q({
|
|
|
22
22
|
formHook: m,
|
|
23
23
|
tHa: c
|
|
24
24
|
}) {
|
|
25
|
-
const
|
|
25
|
+
const y = Y(), { control: L } = m.form.hookFormInternals.formMethods, f = Te({ control: L, name: "courtesyWithholding" });
|
|
26
26
|
return /* @__PURE__ */ r(V, { children: [
|
|
27
27
|
/* @__PURE__ */ e(
|
|
28
28
|
u,
|
|
@@ -31,33 +31,33 @@ function q({
|
|
|
31
31
|
description: /* @__PURE__ */ r(V, { children: [
|
|
32
32
|
c("courtesyWithholdingDescription"),
|
|
33
33
|
/* @__PURE__ */ e(
|
|
34
|
-
|
|
34
|
+
w,
|
|
35
35
|
{
|
|
36
36
|
t: c,
|
|
37
37
|
i18nKey: "learnMoreCta",
|
|
38
38
|
components: {
|
|
39
|
-
LearnMoreLink: /* @__PURE__ */ e(
|
|
39
|
+
LearnMoreLink: /* @__PURE__ */ e(y.Link, {})
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
)
|
|
43
43
|
] })
|
|
44
44
|
}
|
|
45
45
|
),
|
|
46
|
-
f ? /* @__PURE__ */ e(
|
|
46
|
+
f ? /* @__PURE__ */ e(y.Alert, { label: c("withholdingTitle"), status: "warning", children: /* @__PURE__ */ e(w, { t: c, i18nKey: "withholdingNote" }) }) : null
|
|
47
47
|
] });
|
|
48
48
|
}
|
|
49
49
|
function at({
|
|
50
50
|
editHomeAddressForm: u,
|
|
51
51
|
createHomeAddressForm: m,
|
|
52
52
|
employeeHomeAddresses: c,
|
|
53
|
-
employeeDisplayName:
|
|
54
|
-
editingHomeAddressUuid:
|
|
53
|
+
employeeDisplayName: y,
|
|
54
|
+
editingHomeAddressUuid: L,
|
|
55
55
|
onEditAddressTargetChange: f,
|
|
56
56
|
onSaved: G,
|
|
57
57
|
onConfirmDelete: N,
|
|
58
58
|
isDeletePending: _ = !1
|
|
59
59
|
}) {
|
|
60
|
-
const { t } = O("Employee.HomeAddress.Management"), { t: o } = O("Employee.HomeAddress"), n = Y(), [l,
|
|
60
|
+
const { t } = O("Employee.HomeAddress.Management"), { t: o } = O("Employee.HomeAddress"), n = Y(), [l, C] = I(null), [h, S] = I(null), R = Re(null), [k, F] = I(void 0);
|
|
61
61
|
ke(() => {
|
|
62
62
|
if (!l) {
|
|
63
63
|
F(void 0);
|
|
@@ -106,16 +106,16 @@ function at({
|
|
|
106
106
|
[a.INVALID_ZIP]: o("validations.zip")
|
|
107
107
|
}, he = {
|
|
108
108
|
[a.REQUIRED]: t("form.startDateRequired")
|
|
109
|
-
}, M =
|
|
109
|
+
}, M = A(
|
|
110
110
|
() => Pe(p),
|
|
111
111
|
[p]
|
|
112
|
-
), Q =
|
|
112
|
+
), Q = A(() => {
|
|
113
113
|
if (!(!h || !p))
|
|
114
114
|
return p.find((i) => i.uuid === h);
|
|
115
|
-
}, [h, p]), ge =
|
|
116
|
-
const i =
|
|
115
|
+
}, [h, p]), ge = A(() => {
|
|
116
|
+
const i = y.trim();
|
|
117
117
|
return i ? `${i}'s` : t("changePendingPossessiveFallback");
|
|
118
|
-
}, [
|
|
118
|
+
}, [y, t]), b = [...p ?? []].sort((i, d) => {
|
|
119
119
|
const v = i.effectiveDate?.toString() ?? "", D = d.effectiveDate?.toString() ?? "";
|
|
120
120
|
return !v && !D ? 0 : v ? D ? v.localeCompare(D) : -1 : 1;
|
|
121
121
|
}), pe = [...b.filter((i) => i.active !== !0)].reverse(), ve = (i) => {
|
|
@@ -154,16 +154,16 @@ function at({
|
|
|
154
154
|
{
|
|
155
155
|
label: t("rowEdit"),
|
|
156
156
|
onClick: () => {
|
|
157
|
-
f(i.uuid),
|
|
157
|
+
f(i.uuid), C("edit");
|
|
158
158
|
},
|
|
159
|
-
icon: /* @__PURE__ */ e(
|
|
159
|
+
icon: /* @__PURE__ */ e(Ae, { "aria-hidden": !0 })
|
|
160
160
|
},
|
|
161
161
|
{
|
|
162
162
|
label: t("rowDelete"),
|
|
163
163
|
onClick: () => {
|
|
164
164
|
i.active !== !0 && S(i.uuid);
|
|
165
165
|
},
|
|
166
|
-
icon: /* @__PURE__ */ e(
|
|
166
|
+
icon: /* @__PURE__ */ e(we, { "aria-hidden": !0 })
|
|
167
167
|
}
|
|
168
168
|
]
|
|
169
169
|
}
|
|
@@ -177,8 +177,8 @@ function at({
|
|
|
177
177
|
}
|
|
178
178
|
) })
|
|
179
179
|
}), T = () => {
|
|
180
|
-
|
|
181
|
-
},
|
|
180
|
+
C(null), f(void 0);
|
|
181
|
+
}, ye = async () => {
|
|
182
182
|
if (!h)
|
|
183
183
|
return;
|
|
184
184
|
await N(h) && S(null);
|
|
@@ -190,7 +190,7 @@ function at({
|
|
|
190
190
|
onSubmit: ee,
|
|
191
191
|
formMethods: m.form.hookFormInternals.formMethods,
|
|
192
192
|
isPending: W.isPending
|
|
193
|
-
} : null,
|
|
193
|
+
} : null, Ce = async () => {
|
|
194
194
|
if (!x)
|
|
195
195
|
return;
|
|
196
196
|
const i = await x.onSubmit();
|
|
@@ -199,8 +199,8 @@ function at({
|
|
|
199
199
|
(i || !d) && T();
|
|
200
200
|
}, Se = x?.isPending ?? !1;
|
|
201
201
|
return /* @__PURE__ */ r(s, { flexDirection: "column", gap: 24, children: [
|
|
202
|
-
/* @__PURE__ */ r(s, { flexDirection: "column", gap:
|
|
203
|
-
/* @__PURE__ */ e(n.Heading, { as: "h1", children: t("title") }),
|
|
202
|
+
/* @__PURE__ */ r(s, { flexDirection: "column", gap: 4, alignItems: "flex-start", children: [
|
|
203
|
+
/* @__PURE__ */ e(n.Heading, { as: "h1", styledAs: "h2", children: t("title") }),
|
|
204
204
|
/* @__PURE__ */ e(n.Text, { variant: "supporting", children: t("description") })
|
|
205
205
|
] }),
|
|
206
206
|
/* @__PURE__ */ e(
|
|
@@ -215,7 +215,7 @@ function at({
|
|
|
215
215
|
{
|
|
216
216
|
variant: "secondary",
|
|
217
217
|
onClick: () => {
|
|
218
|
-
f(void 0),
|
|
218
|
+
f(void 0), C("edit");
|
|
219
219
|
},
|
|
220
220
|
isLoading: U.isPending,
|
|
221
221
|
children: t("editCta")
|
|
@@ -228,7 +228,7 @@ function at({
|
|
|
228
228
|
{
|
|
229
229
|
variant: "secondary",
|
|
230
230
|
onClick: () => {
|
|
231
|
-
f(void 0),
|
|
231
|
+
f(void 0), C("create");
|
|
232
232
|
},
|
|
233
233
|
isLoading: W.isPending,
|
|
234
234
|
children: t("changeCta")
|
|
@@ -236,7 +236,7 @@ function at({
|
|
|
236
236
|
),
|
|
237
237
|
children: /* @__PURE__ */ r(s, { flexDirection: "column", gap: 16, children: [
|
|
238
238
|
g ? /* @__PURE__ */ r(s, { flexDirection: "column", gap: 4, children: [
|
|
239
|
-
/* @__PURE__ */ r(
|
|
239
|
+
/* @__PURE__ */ r(Le, { children: [
|
|
240
240
|
/* @__PURE__ */ e(n.Text, { weight: "medium", children: K(g) }),
|
|
241
241
|
/* @__PURE__ */ e(n.Text, { weight: "medium", children: $(g) })
|
|
242
242
|
] }),
|
|
@@ -254,7 +254,7 @@ function at({
|
|
|
254
254
|
}
|
|
255
255
|
),
|
|
256
256
|
/* @__PURE__ */ r(s, { flexDirection: "column", gap: 12, children: [
|
|
257
|
-
/* @__PURE__ */ e(n.Heading, { as: "h2", children: t("historySectionTitle") }),
|
|
257
|
+
/* @__PURE__ */ e(n.Heading, { as: "h2", styledAs: "h4", children: t("historySectionTitle") }),
|
|
258
258
|
/* @__PURE__ */ e(Qe, { label: t("historySectionTitle"), ...De })
|
|
259
259
|
] }),
|
|
260
260
|
/* @__PURE__ */ e(
|
|
@@ -280,16 +280,18 @@ function at({
|
|
|
280
280
|
{
|
|
281
281
|
variant: "primary",
|
|
282
282
|
onClick: () => {
|
|
283
|
-
|
|
283
|
+
Ce();
|
|
284
284
|
},
|
|
285
285
|
isLoading: Se,
|
|
286
286
|
children: t("submitCta")
|
|
287
287
|
}
|
|
288
288
|
)
|
|
289
289
|
] }),
|
|
290
|
-
children: /* @__PURE__ */ r(s, { flexDirection: "column", gap:
|
|
291
|
-
/* @__PURE__ */
|
|
292
|
-
|
|
290
|
+
children: /* @__PURE__ */ r(s, { flexDirection: "column", gap: 32, children: [
|
|
291
|
+
/* @__PURE__ */ r(s, { flexDirection: "column", gap: 4, children: [
|
|
292
|
+
/* @__PURE__ */ e(n.Heading, { as: "h2", children: t(l === "edit" ? "editModalTitle" : "createModalTitle") }),
|
|
293
|
+
/* @__PURE__ */ e(n.Text, { variant: "supporting", children: t(l === "edit" ? "editModalDescription" : "createModalDescription") })
|
|
294
|
+
] }),
|
|
293
295
|
l === "edit" ? /* @__PURE__ */ e(Z, { formHookResult: u, children: /* @__PURE__ */ r(
|
|
294
296
|
j,
|
|
295
297
|
{
|
|
@@ -442,7 +444,7 @@ function at({
|
|
|
442
444
|
{
|
|
443
445
|
variant: "error",
|
|
444
446
|
onClick: () => {
|
|
445
|
-
|
|
447
|
+
ye();
|
|
446
448
|
},
|
|
447
449
|
isLoading: _,
|
|
448
450
|
children: t("deleteModalConfirmCta")
|
|
@@ -452,7 +454,7 @@ function at({
|
|
|
452
454
|
children: /* @__PURE__ */ r(s, { flexDirection: "column", gap: 16, children: [
|
|
453
455
|
/* @__PURE__ */ e(n.Heading, { as: "h2", children: t("deleteModalTitle") }),
|
|
454
456
|
/* @__PURE__ */ e(n.Text, { variant: "supporting", children: Q ? /* @__PURE__ */ e(
|
|
455
|
-
|
|
457
|
+
w,
|
|
456
458
|
{
|
|
457
459
|
t,
|
|
458
460
|
i18nKey: "deleteModalDescription",
|