@gusto/embedded-react-sdk 0.44.2 → 0.46.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 +64 -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/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/BankAccount/BankAccountForm/Head.js +11 -8
- package/dist/components/Company/BankAccount/BankAccountForm/Head.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/SignatureForm/SignatureForm.js +26 -26
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js +4 -4
- 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/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/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/PaySchedule/PayScheduleList.js +18 -18
- package/dist/components/Company/PaySchedule/PayScheduleList.js.map +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js +5 -5
- 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/Employee/Compensation/index.d.ts +1 -1
- package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.d.ts +11 -0
- package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js +230 -0
- package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js.map +1 -0
- package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.module.scss.js +8 -0
- package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.module.scss.js.map +1 -0
- package/dist/components/Employee/Compensation/management/EditCompensation/index.d.ts +3 -0
- package/dist/components/Employee/Compensation/management/index.d.ts +3 -0
- 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/fields.js +4 -4
- 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 +203 -188
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/fields.js +6 -6
- package/dist/components/Employee/Compensation/shared/useJobForm/index.d.ts +0 -2
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.d.ts +16 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js +21 -15
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.d.ts +30 -3
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +138 -130
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
- package/dist/components/Employee/Dashboard/BasicDetailsView.d.ts +19 -1
- package/dist/components/Employee/Dashboard/BasicDetailsView.js +93 -47
- 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.d.ts +2 -0
- package/dist/components/Employee/Dashboard/Dashboard.js +95 -109
- package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
- package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +19 -0
- package/dist/components/Employee/Dashboard/DashboardComponents.js +137 -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 +34 -20
- 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 +536 -135
- package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -1
- package/dist/components/Employee/Dashboard/JobAndPayView.module.scss.js +8 -0
- package/dist/components/Employee/Dashboard/JobAndPayView.module.scss.js.map +1 -0
- 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 +19 -1
- package/dist/components/Employee/Dashboard/TaxesView.js +92 -56
- 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 +238 -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.d.ts +12 -5
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js +21 -18
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js.map +1 -1
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.d.ts +26 -10
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js +61 -38
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js.map +1 -1
- package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.d.ts +10 -4
- package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js +10 -12
- package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js.map +1 -1
- package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.d.ts +10 -3
- package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js +19 -14
- package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.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/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/useDocumentList.js +6 -6
- 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/FederalTaxes/shared/useFederalTaxesForm/fields.js +4 -4
- 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/Profile/shared/useEmployeeDetailsForm/fields.js +8 -8
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js +5 -5
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js +4 -4
- 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/useEmployeeStateTaxesForm/fieldComponents.js +8 -8
- 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/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/PayrollOverview/PayrollOverviewPresentation.js +35 -35
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.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 +78 -55
- 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.Compensation.json.js +48 -44
- package/dist/i18n/en/Employee.Compensation.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 +14 -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 +10 -2
- package/dist/shared/constants.js +30 -26
- 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 +161 -5
- 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.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 +1 -1
- /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,74 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { IncludeDeductions as C } from "./IncludeDeductions/IncludeDeductions.js";
|
|
3
|
+
import { DeductionsList as L } from "./DeductionsList/DeductionsList.js";
|
|
4
|
+
import { DeductionsForm as O } from "./DeductionsForm/DeductionsForm.js";
|
|
5
|
+
import { useDeductionsList as m } from "./shared/useDeductionsList.js";
|
|
6
|
+
import { BaseLayout as s } from "../../Base/Base.js";
|
|
7
|
+
import { useFlow as l } from "../../Flow/useFlow.js";
|
|
8
|
+
import { componentEvents as n } from "../../../shared/constants.js";
|
|
9
|
+
import { ensureRequired as a } from "../../../helpers/ensureRequired.js";
|
|
10
|
+
function g() {
|
|
11
|
+
const { onEvent: t } = l();
|
|
12
|
+
return /* @__PURE__ */ r(s, { children: /* @__PURE__ */ r(C, { onAdd: () => {
|
|
13
|
+
t(n.EMPLOYEE_DEDUCTION_INCLUDE_YES);
|
|
14
|
+
}, onContinue: () => {
|
|
15
|
+
t(n.EMPLOYEE_DEDUCTION_INCLUDE_NO), t(n.EMPLOYEE_DEDUCTION_DONE);
|
|
16
|
+
} }) });
|
|
17
|
+
}
|
|
18
|
+
function A() {
|
|
19
|
+
const { employeeId: t, onEvent: o } = l(), e = m({ employeeId: a(t) });
|
|
20
|
+
if (e.isLoading)
|
|
21
|
+
return /* @__PURE__ */ r(s, { isLoading: !0, error: e.errorHandling.errors });
|
|
22
|
+
const E = () => {
|
|
23
|
+
o(n.EMPLOYEE_DEDUCTION_ADD);
|
|
24
|
+
}, D = (i) => {
|
|
25
|
+
o(n.EMPLOYEE_DEDUCTION_EDIT, i);
|
|
26
|
+
}, c = () => {
|
|
27
|
+
o(n.EMPLOYEE_DEDUCTION_DONE);
|
|
28
|
+
}, u = async (i) => {
|
|
29
|
+
const d = await e.actions.onDelete(i);
|
|
30
|
+
d && (d.data.remainingActiveCount === 0 ? o(n.EMPLOYEE_DEDUCTION_DELETED_EMPTY) : o(n.EMPLOYEE_DEDUCTION_DELETED, d.data.garnishment));
|
|
31
|
+
};
|
|
32
|
+
return /* @__PURE__ */ r(s, { error: e.errorHandling.errors, children: /* @__PURE__ */ r(
|
|
33
|
+
L,
|
|
34
|
+
{
|
|
35
|
+
deductionsList: e,
|
|
36
|
+
onAdd: E,
|
|
37
|
+
onEdit: D,
|
|
38
|
+
onDelete: (i) => {
|
|
39
|
+
u(i);
|
|
40
|
+
},
|
|
41
|
+
onContinue: c
|
|
42
|
+
}
|
|
43
|
+
) });
|
|
44
|
+
}
|
|
45
|
+
function v() {
|
|
46
|
+
const { employeeId: t, editingDeductionId: o, onEvent: e } = l(), E = m({ employeeId: a(t) });
|
|
47
|
+
if (E.isLoading)
|
|
48
|
+
return /* @__PURE__ */ r(s, { isLoading: !0, error: E.errorHandling.errors });
|
|
49
|
+
const D = o ? E.data.deductions.find((d) => d.uuid === o) ?? null : null, c = E.data.deductions.length > 0, u = (d, _) => {
|
|
50
|
+
e(
|
|
51
|
+
_ === "create" ? n.EMPLOYEE_DEDUCTION_CREATED : n.EMPLOYEE_DEDUCTION_UPDATED,
|
|
52
|
+
d
|
|
53
|
+
);
|
|
54
|
+
}, i = () => {
|
|
55
|
+
e(
|
|
56
|
+
c ? n.EMPLOYEE_DEDUCTION_CANCEL : n.EMPLOYEE_DEDUCTION_CANCEL_EMPTY
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
return /* @__PURE__ */ r(s, { error: E.errorHandling.errors, children: /* @__PURE__ */ r(
|
|
60
|
+
O,
|
|
61
|
+
{
|
|
62
|
+
employeeId: a(t),
|
|
63
|
+
deduction: D,
|
|
64
|
+
onSaved: u,
|
|
65
|
+
onCancel: i
|
|
66
|
+
}
|
|
67
|
+
) });
|
|
68
|
+
}
|
|
69
|
+
export {
|
|
70
|
+
v as DeductionsFormContextual,
|
|
71
|
+
A as DeductionsListContextual,
|
|
72
|
+
g as IncludeDeductionsContextual
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=deductionsContextualComponents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deductionsContextualComponents.js","sources":["../../../../src/components/Employee/Deductions/deductionsContextualComponents.tsx"],"sourcesContent":["import { type Garnishment } from '@gusto/embedded-api/models/components/garnishment'\nimport { IncludeDeductions } from './IncludeDeductions/IncludeDeductions'\nimport { DeductionsList } from './DeductionsList/DeductionsList'\nimport { DeductionsForm } from './DeductionsForm/DeductionsForm'\nimport { useDeductionsList } from './shared/useDeductionsList'\nimport { BaseLayout } from '@/components/Base/Base'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport { componentEvents } from '@/shared/constants'\nimport { ensureRequired } from '@/helpers/ensureRequired'\n\nexport type EventPayloads = {\n [componentEvents.EMPLOYEE_DEDUCTION_INCLUDE_YES]: undefined\n [componentEvents.EMPLOYEE_DEDUCTION_INCLUDE_NO]: undefined\n [componentEvents.EMPLOYEE_DEDUCTION_ADD]: undefined\n [componentEvents.EMPLOYEE_DEDUCTION_EDIT]: Garnishment\n [componentEvents.EMPLOYEE_DEDUCTION_CANCEL]: undefined\n [componentEvents.EMPLOYEE_DEDUCTION_CANCEL_EMPTY]: undefined\n [componentEvents.EMPLOYEE_DEDUCTION_CREATED]: Garnishment\n [componentEvents.EMPLOYEE_DEDUCTION_UPDATED]: Garnishment\n [componentEvents.EMPLOYEE_DEDUCTION_DELETED]: Garnishment\n [componentEvents.EMPLOYEE_DEDUCTION_DELETED_EMPTY]: undefined\n [componentEvents.EMPLOYEE_DEDUCTION_DONE]: undefined\n}\n\nexport interface DeductionsContextInterface extends FlowContextInterface {\n employeeId: string\n /** Set by the EDIT transition; consumed by the form-mode contextual. */\n editingDeductionId?: string\n}\n\nexport function IncludeDeductionsContextual() {\n const { onEvent } = useFlow<DeductionsContextInterface>()\n\n const onAdd = () => {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_INCLUDE_YES)\n }\n const onContinue = () => {\n // The outer onboarding flow advances on DONE; partners also receive\n // INCLUDE_NO so analytics can distinguish the empty-state confirmation.\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_INCLUDE_NO)\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_DONE)\n }\n\n // BaseLayout's inner FadeIn (width: 100%) is the canonical \"page\" container\n // for content rendered inside <Flow>. Without it the outer row-direction\n // Flex in Flow collapses to the intrinsic content width of its single\n // child, producing the \"squashed\" layout for narrow content.\n return (\n <BaseLayout>\n <IncludeDeductions onAdd={onAdd} onContinue={onContinue} />\n </BaseLayout>\n )\n}\n\nexport function DeductionsListContextual() {\n const { employeeId, onEvent } = useFlow<DeductionsContextInterface>()\n const list = useDeductionsList({ employeeId: ensureRequired(employeeId) })\n\n if (list.isLoading) {\n return <BaseLayout isLoading error={list.errorHandling.errors} />\n }\n\n const onAdd = () => {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_ADD)\n }\n const onEdit = (deduction: Garnishment) => {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_EDIT, deduction)\n }\n const onContinue = () => {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_DONE)\n }\n const onDelete = async (deduction: Garnishment) => {\n const result = await list.actions.onDelete(deduction)\n if (!result) return\n if (result.data.remainingActiveCount === 0) {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_DELETED_EMPTY)\n } else {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_DELETED, result.data.garnishment)\n }\n }\n\n return (\n <BaseLayout error={list.errorHandling.errors}>\n <DeductionsList\n deductionsList={list}\n onAdd={onAdd}\n onEdit={onEdit}\n onDelete={(d: Garnishment) => {\n void onDelete(d)\n }}\n onContinue={onContinue}\n />\n </BaseLayout>\n )\n}\n\nexport function DeductionsFormContextual() {\n const { employeeId, editingDeductionId, onEvent } = useFlow<DeductionsContextInterface>()\n // The same list query the form hooks use internally — React Query dedupes\n // so this is the only outstanding request.\n const list = useDeductionsList({ employeeId: ensureRequired(employeeId) })\n\n if (list.isLoading) {\n return <BaseLayout isLoading error={list.errorHandling.errors} />\n }\n\n const deduction = editingDeductionId\n ? (list.data.deductions.find(d => d.uuid === editingDeductionId) ?? null)\n : null\n const hasActiveDeductions = list.data.deductions.length > 0\n\n const onSaved = (saved: Garnishment, mode: 'create' | 'update') => {\n onEvent(\n mode === 'create'\n ? componentEvents.EMPLOYEE_DEDUCTION_CREATED\n : componentEvents.EMPLOYEE_DEDUCTION_UPDATED,\n saved,\n )\n }\n const onCancel = () => {\n onEvent(\n hasActiveDeductions\n ? componentEvents.EMPLOYEE_DEDUCTION_CANCEL\n : componentEvents.EMPLOYEE_DEDUCTION_CANCEL_EMPTY,\n )\n }\n\n return (\n <BaseLayout error={list.errorHandling.errors}>\n <DeductionsForm\n employeeId={ensureRequired(employeeId)}\n deduction={deduction}\n onSaved={onSaved}\n onCancel={onCancel}\n />\n </BaseLayout>\n )\n}\n"],"names":["IncludeDeductionsContextual","onEvent","useFlow","BaseLayout","jsx","IncludeDeductions","componentEvents","DeductionsListContextual","employeeId","list","useDeductionsList","ensureRequired","onAdd","onEdit","deduction","onContinue","onDelete","result","DeductionsList","d","DeductionsFormContextual","editingDeductionId","hasActiveDeductions","onSaved","saved","mode","onCancel","DeductionsForm"],"mappings":";;;;;;;;;AA8BO,SAASA,IAA8B;AAC5C,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA;AAgBpB,2BACGC,GAAA,EACC,UAAA,gBAAAC,EAACC,GAAA,EAAkB,OAhBT,MAAM;AAClB,IAAAJ,EAAQK,EAAgB,8BAA8B;AAAA,EACxD,GAcqC,YAblB,MAAM;AAGvB,IAAAL,EAAQK,EAAgB,6BAA6B,GACrDL,EAAQK,EAAgB,uBAAuB;AAAA,EACjD,GAQ6D,GAC3D;AAEJ;AAEO,SAASC,IAA2B;AACzC,QAAM,EAAE,YAAAC,GAAY,SAAAP,EAAA,IAAYC,EAAA,GAC1BO,IAAOC,EAAkB,EAAE,YAAYC,EAAeH,CAAU,GAAG;AAEzE,MAAIC,EAAK;AACP,6BAAQN,GAAA,EAAW,WAAS,IAAC,OAAOM,EAAK,cAAc,QAAQ;AAGjE,QAAMG,IAAQ,MAAM;AAClB,IAAAX,EAAQK,EAAgB,sBAAsB;AAAA,EAChD,GACMO,IAAS,CAACC,MAA2B;AACzC,IAAAb,EAAQK,EAAgB,yBAAyBQ,CAAS;AAAA,EAC5D,GACMC,IAAa,MAAM;AACvB,IAAAd,EAAQK,EAAgB,uBAAuB;AAAA,EACjD,GACMU,IAAW,OAAOF,MAA2B;AACjD,UAAMG,IAAS,MAAMR,EAAK,QAAQ,SAASK,CAAS;AACpD,IAAKG,MACDA,EAAO,KAAK,yBAAyB,IACvChB,EAAQK,EAAgB,gCAAgC,IAExDL,EAAQK,EAAgB,4BAA4BW,EAAO,KAAK,WAAW;AAAA,EAE/E;AAEA,SACE,gBAAAb,EAACD,GAAA,EAAW,OAAOM,EAAK,cAAc,QACpC,UAAA,gBAAAL;AAAA,IAACc;AAAA,IAAA;AAAA,MACC,gBAAgBT;AAAA,MAChB,OAAAG;AAAA,MACA,QAAAC;AAAA,MACA,UAAU,CAACM,MAAmB;AAC5B,QAAKH,EAASG,CAAC;AAAA,MACjB;AAAA,MACA,YAAAJ;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;AAEO,SAASK,IAA2B;AACzC,QAAM,EAAE,YAAAZ,GAAY,oBAAAa,GAAoB,SAAApB,EAAA,IAAYC,EAAA,GAG9CO,IAAOC,EAAkB,EAAE,YAAYC,EAAeH,CAAU,GAAG;AAEzE,MAAIC,EAAK;AACP,6BAAQN,GAAA,EAAW,WAAS,IAAC,OAAOM,EAAK,cAAc,QAAQ;AAGjE,QAAMK,IAAYO,IACbZ,EAAK,KAAK,WAAW,KAAK,CAAA,MAAK,EAAE,SAASY,CAAkB,KAAK,OAClE,MACEC,IAAsBb,EAAK,KAAK,WAAW,SAAS,GAEpDc,IAAU,CAACC,GAAoBC,MAA8B;AACjE,IAAAxB;AAAA,MACEwB,MAAS,WACLnB,EAAgB,6BAChBA,EAAgB;AAAA,MACpBkB;AAAA,IAAA;AAAA,EAEJ,GACME,IAAW,MAAM;AACrB,IAAAzB;AAAA,MACEqB,IACIhB,EAAgB,4BAChBA,EAAgB;AAAA,IAAA;AAAA,EAExB;AAEA,SACE,gBAAAF,EAACD,GAAA,EAAW,OAAOM,EAAK,cAAc,QACpC,UAAA,gBAAAL;AAAA,IAACuB;AAAA,IAAA;AAAA,MACC,YAAYhB,EAAeH,CAAU;AAAA,MACrC,WAAAM;AAAA,MACA,SAAAS;AAAA,MACA,UAAAG;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Garnishment } from '@gusto/embedded-api/models/components/garnishment';
|
|
2
|
+
export declare function DeleteDeductionDialog({ pendingDeleteDeduction, isPrimaryActionLoading, onClose, onConfirm, }: {
|
|
3
|
+
pendingDeleteDeduction: Garnishment | null;
|
|
4
|
+
isPrimaryActionLoading: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
onConfirm: () => void;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as r } from "react-i18next";
|
|
3
|
+
import { useComponentContext as a } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
4
|
+
function d({
|
|
5
|
+
pendingDeleteDeduction: t,
|
|
6
|
+
isPrimaryActionLoading: e,
|
|
7
|
+
onClose: i,
|
|
8
|
+
onConfirm: n
|
|
9
|
+
}) {
|
|
10
|
+
const { t: o } = r("Employee.Deductions"), l = a();
|
|
11
|
+
return /* @__PURE__ */ c(
|
|
12
|
+
l.Dialog,
|
|
13
|
+
{
|
|
14
|
+
isOpen: t !== null,
|
|
15
|
+
onClose: i,
|
|
16
|
+
onPrimaryActionClick: n,
|
|
17
|
+
isPrimaryActionLoading: e,
|
|
18
|
+
isDestructive: !0,
|
|
19
|
+
title: o("deleteDeductionDialog.title"),
|
|
20
|
+
primaryActionLabel: o("deleteDeductionDialog.confirmCta"),
|
|
21
|
+
closeActionLabel: o("deleteDeductionDialog.cancelCta"),
|
|
22
|
+
children: t && o("deleteDeductionDialog.description", {
|
|
23
|
+
deduction: t.description ?? ""
|
|
24
|
+
})
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
d as DeleteDeductionDialog
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=DeleteDeductionDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeleteDeductionDialog.js","sources":["../../../../../src/components/Employee/Deductions/shared/DeleteDeductionDialog.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { Garnishment } from '@gusto/embedded-api/models/components/garnishment'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function DeleteDeductionDialog({\n pendingDeleteDeduction,\n isPrimaryActionLoading,\n onClose,\n onConfirm,\n}: {\n pendingDeleteDeduction: Garnishment | null\n isPrimaryActionLoading: boolean\n onClose: () => void\n onConfirm: () => void\n}) {\n const { t } = useTranslation('Employee.Deductions')\n const Components = useComponentContext()\n return (\n <Components.Dialog\n isOpen={pendingDeleteDeduction !== null}\n onClose={onClose}\n onPrimaryActionClick={onConfirm}\n isPrimaryActionLoading={isPrimaryActionLoading}\n isDestructive\n title={t('deleteDeductionDialog.title')}\n primaryActionLabel={t('deleteDeductionDialog.confirmCta')}\n closeActionLabel={t('deleteDeductionDialog.cancelCta')}\n >\n {pendingDeleteDeduction &&\n t('deleteDeductionDialog.description', {\n deduction: pendingDeleteDeduction.description ?? '',\n })}\n </Components.Dialog>\n )\n}\n"],"names":["DeleteDeductionDialog","pendingDeleteDeduction","isPrimaryActionLoading","onClose","onConfirm","t","useTranslation","Components","useComponentContext","jsx"],"mappings":";;;AAIO,SAASA,EAAsB;AAAA,EACpC,wBAAAC;AAAA,EACA,wBAAAC;AAAA,EACA,SAAAC;AAAA,EACA,WAAAC;AACF,GAKG;AACD,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA;AACnB,SACE,gBAAAC;AAAA,IAACF,EAAW;AAAA,IAAX;AAAA,MACC,QAAQN,MAA2B;AAAA,MACnC,SAAAE;AAAA,MACA,sBAAsBC;AAAA,MACtB,wBAAAF;AAAA,MACA,eAAa;AAAA,MACb,OAAOG,EAAE,6BAA6B;AAAA,MACtC,oBAAoBA,EAAE,kCAAkC;AAAA,MACxD,kBAAkBA,EAAE,iCAAiC;AAAA,MAEpD,UAAAJ,KACCI,EAAE,qCAAqC;AAAA,QACrC,WAAWJ,EAAuB,eAAe;AAAA,MAAA,CAClD;AAAA,IAAA;AAAA,EAAA;AAGT;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Garnishment } from '@gusto/embedded-api/models/components/garnishment';
|
|
2
|
+
export interface DeductionAmountFormatters {
|
|
3
|
+
formatCurrency: (value: number) => string;
|
|
4
|
+
formatPercent: (value: number) => string;
|
|
5
|
+
formatPerPaycheck: (value: string) => string;
|
|
6
|
+
}
|
|
7
|
+
export declare function formatDeductionAmount(deduction: Pick<Garnishment, 'amount' | 'deductAsPercentage' | 'recurring'>, { formatCurrency, formatPercent, formatPerPaycheck }: DeductionAmountFormatters): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
function o(r, { formatCurrency: n, formatPercent: u, formatPerPaycheck: m }) {
|
|
2
|
+
const t = Number(r.amount);
|
|
3
|
+
if (Number.isNaN(t)) return "-";
|
|
4
|
+
const e = r.deductAsPercentage ? u(t) : n(t);
|
|
5
|
+
return r.recurring ? m(e) : e;
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
o as formatDeductionAmount
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=formatDeductionAmount.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatDeductionAmount.js","sources":["../../../../../src/components/Employee/Deductions/shared/formatDeductionAmount.ts"],"sourcesContent":["import type { Garnishment } from '@gusto/embedded-api/models/components/garnishment'\n\nexport interface DeductionAmountFormatters {\n formatCurrency: (value: number) => string\n formatPercent: (value: number) => string\n formatPerPaycheck: (value: string) => string\n}\n\nexport function formatDeductionAmount(\n deduction: Pick<Garnishment, 'amount' | 'deductAsPercentage' | 'recurring'>,\n { formatCurrency, formatPercent, formatPerPaycheck }: DeductionAmountFormatters,\n): string {\n const numericAmount = Number(deduction.amount)\n if (Number.isNaN(numericAmount)) return '-'\n const formatted = deduction.deductAsPercentage\n ? formatPercent(numericAmount)\n : formatCurrency(numericAmount)\n return deduction.recurring ? formatPerPaycheck(formatted) : formatted\n}\n"],"names":["formatDeductionAmount","deduction","formatCurrency","formatPercent","formatPerPaycheck","numericAmount","formatted"],"mappings":"AAQO,SAASA,EACdC,GACA,EAAE,gBAAAC,GAAgB,eAAAC,GAAe,mBAAAC,KACzB;AACR,QAAMC,IAAgB,OAAOJ,EAAU,MAAM;AAC7C,MAAI,OAAO,MAAMI,CAAa,EAAG,QAAO;AACxC,QAAMC,IAAYL,EAAU,qBACxBE,EAAcE,CAAa,IAC3BH,EAAeG,CAAa;AAChC,SAAOJ,EAAU,YAAYG,EAAkBE,CAAS,IAAIA;AAC9D;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "./types/i18next.d.ts"
|
|
2
|
+
export { useDeductionsList, type UseDeductionsListProps, type UseDeductionsListResult, type UseDeductionsListReady, type DeductionsListDeleteResult, } from './useDeductionsList';
|
|
3
|
+
export { useDeleteDeduction } from './useDeleteDeduction';
|
|
4
|
+
export { DeleteDeductionDialog } from './DeleteDeductionDialog';
|
|
5
|
+
export { formatDeductionAmount, type DeductionAmountFormatters } from './formatDeductionAmount';
|
|
6
|
+
export * from './useDeductionForm';
|
|
7
|
+
export * from './useChildSupportGarnishmentForm';
|
|
@@ -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 { TextInputHookField as n } from "../../../../../partner-hook-utils/form/fields/TextInputHookField.js";
|
|
3
|
+
import { SelectHookField as t } from "../../../../../partner-hook-utils/form/fields/SelectHookField.js";
|
|
4
|
+
import { NumberInputHookField as i } from "../../../../../partner-hook-utils/form/fields/NumberInputHookField.js";
|
|
5
|
+
function d(e) {
|
|
6
|
+
return /* @__PURE__ */ r(t, { ...e, name: "state" });
|
|
7
|
+
}
|
|
8
|
+
function f(e) {
|
|
9
|
+
return /* @__PURE__ */ r(t, { ...e, name: "fipsCode" });
|
|
10
|
+
}
|
|
11
|
+
function c(e) {
|
|
12
|
+
return /* @__PURE__ */ r(n, { ...e, name: "caseNumber" });
|
|
13
|
+
}
|
|
14
|
+
function l(e) {
|
|
15
|
+
return /* @__PURE__ */ r(n, { ...e, name: "orderNumber" });
|
|
16
|
+
}
|
|
17
|
+
function F(e) {
|
|
18
|
+
return /* @__PURE__ */ r(n, { ...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(t, { ...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'];
|