@gusto/embedded-react-sdk 0.44.1 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +63 -0
- package/dist/components/Common/DetailViewLayout/DetailViewLayout.js +7 -7
- package/dist/components/Common/DetailViewLayout/DetailViewLayout.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.js +24 -23
- package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.module.scss.js +16 -14
- package/dist/components/Common/UI/Alert/Alert.module.scss.js.map +1 -1
- package/dist/components/Common/UI/Alert/AlertTypes.d.ts +8 -0
- package/dist/components/Common/UI/Alert/AlertTypes.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +38 -38
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -20
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/Head.js +12 -9
- package/dist/components/Company/AssignSignatory/Head.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +25 -25
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -20
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -22
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Head.js +11 -8
- package/dist/components/Company/BankAccount/BankAccountForm/Head.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -20
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Head.js +44 -39
- package/dist/components/Company/BankAccount/BankAccountList/Head.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -20
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +28 -28
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +9 -9
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Head.js +7 -6
- package/dist/components/Company/FederalTaxes/Head.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +12 -28
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +7 -23
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Head.js +10 -9
- package/dist/components/Company/Industry/Head.js.map +1 -1
- package/dist/components/Company/Industry/IndustrySelect.js +22 -19
- package/dist/components/Company/Industry/IndustrySelect.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Head.js +9 -8
- package/dist/components/Company/Locations/LocationForm/Head.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -20
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Head.js +11 -10
- package/dist/components/Company/Locations/LocationsList/Head.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +11 -11
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -20
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +4 -20
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleList.js +18 -18
- package/dist/components/Company/PaySchedule/PayScheduleList.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -20
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -20
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +6 -22
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +7 -7
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +2 -2
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Profile/useContractorProfile.js +42 -52
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Employee/Compensation/index.d.ts +1 -1
- package/dist/components/Employee/Compensation/{Compensation.d.ts → onboarding/Compensation.d.ts} +3 -3
- package/dist/components/Employee/Compensation/onboarding/Compensation.js +88 -0
- package/dist/components/Employee/Compensation/onboarding/Compensation.js.map +1 -0
- package/dist/components/Employee/Compensation/{CompensationFlowComponents.d.ts → onboarding/CompensationFlowComponents.d.ts} +3 -3
- package/dist/components/Employee/Compensation/onboarding/CompensationFlowComponents.js +59 -0
- package/dist/components/Employee/Compensation/onboarding/CompensationFlowComponents.js.map +1 -0
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.d.ts +21 -0
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js +249 -0
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js.map +1 -0
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.module.scss.js +8 -0
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.module.scss.js.map +1 -0
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/index.d.ts +3 -0
- package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/JobsList.d.ts +1 -1
- package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.js +43 -0
- package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.js.map +1 -0
- package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/JobsListPresentation.js +10 -10
- package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.js.map +1 -0
- package/dist/components/Employee/Compensation/{compensationStateMachine.js → onboarding/compensationStateMachine.js} +1 -1
- package/dist/components/Employee/Compensation/onboarding/compensationStateMachine.js.map +1 -0
- package/dist/components/Employee/Compensation/onboarding/index.d.ts +2 -0
- package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.d.ts +9 -0
- package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.js +10 -0
- package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.js.map +1 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts +7 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js +41 -35
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/index.d.ts +0 -2
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.d.ts +24 -3
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +193 -181
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/index.d.ts +0 -2
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.d.ts +8 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js +14 -13
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.d.ts +19 -2
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +133 -130
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
- package/dist/components/Employee/Dashboard/BasicDetailsView.d.ts +13 -0
- package/dist/components/Employee/Dashboard/BasicDetailsView.js +87 -65
- package/dist/components/Employee/Dashboard/BasicDetailsView.js.map +1 -1
- package/dist/components/Employee/Dashboard/CompensationCard.d.ts +13 -0
- package/dist/components/Employee/Dashboard/Dashboard.js +89 -109
- package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
- package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +15 -0
- package/dist/components/Employee/Dashboard/DashboardComponents.js +120 -25
- package/dist/components/Employee/Dashboard/DashboardComponents.js.map +1 -1
- package/dist/components/Employee/Dashboard/DocumentsView.d.ts +11 -0
- package/dist/components/Employee/Dashboard/DocumentsView.js +24 -17
- package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -1
- package/dist/components/Employee/Dashboard/JobAndPayView.d.ts +9 -17
- package/dist/components/Employee/Dashboard/JobAndPayView.js +495 -114
- package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -1
- package/dist/components/Employee/Dashboard/PendingChangesReviewModal.d.ts +10 -0
- package/dist/components/Employee/Dashboard/PendingChangesReviewModal.js +64 -0
- package/dist/components/Employee/Dashboard/PendingChangesReviewModal.js.map +1 -0
- package/dist/components/Employee/Dashboard/TaxesView.d.ts +13 -0
- package/dist/components/Employee/Dashboard/TaxesView.js +82 -60
- package/dist/components/Employee/Dashboard/TaxesView.js.map +1 -1
- package/dist/components/Employee/Dashboard/dashboardStateMachine.d.ts +7 -0
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js +227 -40
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
- package/dist/components/Employee/Dashboard/getPendingCompensationChanges.d.ts +50 -0
- package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js +57 -0
- package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js.map +1 -0
- package/dist/components/Employee/Dashboard/getPendingCompensationChanges.test.d.ts +1 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js +7 -4
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js.map +1 -1
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.d.ts +14 -8
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js +60 -36
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js.map +1 -1
- package/dist/components/Employee/Dashboard/usePendingChangeDetailRenderer.d.ts +8 -0
- package/dist/components/Employee/Dashboard/usePendingChangeDetailRenderer.js +61 -0
- package/dist/components/Employee/Dashboard/usePendingChangeDetailRenderer.js.map +1 -0
- package/dist/components/Employee/Deductions/Deductions.d.ts +2 -8
- package/dist/components/Employee/Deductions/Deductions.js +25 -52
- package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportFormView.d.ts +9 -0
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportFormView.js +137 -0
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportFormView.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.d.ts +9 -5
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +97 -94
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.d.ts +18 -0
- package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js +137 -0
- package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.d.ts +10 -5
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +57 -77
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.d.ts +5 -5
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +29 -39
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js +8 -6
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js.map +1 -1
- package/dist/components/Employee/Deductions/{DeductionsComponents.d.ts → deductionsContextualComponents.d.ts} +7 -8
- package/dist/components/Employee/Deductions/deductionsContextualComponents.js +74 -0
- package/dist/components/Employee/Deductions/deductionsContextualComponents.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.d.ts +7 -0
- package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.js +31 -0
- package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/formatDeductionAmount.d.ts +7 -0
- package/dist/components/Employee/Deductions/shared/formatDeductionAmount.js +10 -0
- package/dist/components/Employee/Deductions/shared/formatDeductionAmount.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/formatDeductionAmount.test.d.ts +1 -0
- package/dist/components/Employee/Deductions/shared/index.d.ts +7 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.d.ts +63 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js +64 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.d.ts +36 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js +39 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/index.d.ts +4 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.d.ts +62 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js +208 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.d.ts +63 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.js +52 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.d.ts +25 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js +36 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/index.d.ts +4 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.d.ts +64 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js +203 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/useDeductionsList.d.ts +22 -0
- package/dist/components/Employee/Deductions/shared/useDeductionsList.js +50 -0
- package/dist/components/Employee/Deductions/shared/useDeductionsList.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/useDeleteDeduction.d.ts +13 -0
- package/dist/components/Employee/Deductions/shared/useDeleteDeduction.js +17 -0
- package/dist/components/Employee/Deductions/shared/useDeleteDeduction.js.map +1 -0
- package/dist/components/Employee/Deductions/stateMachine.d.ts +4 -5
- package/dist/components/Employee/Deductions/stateMachine.js +67 -89
- package/dist/components/Employee/Deductions/stateMachine.js.map +1 -1
- package/dist/components/Employee/Documents/management/DocumentManager.d.ts +6 -0
- package/dist/components/Employee/Documents/management/DocumentManager.js +60 -0
- package/dist/components/Employee/Documents/management/DocumentManager.js.map +1 -0
- package/dist/components/Employee/Documents/management/index.d.ts +3 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Actions.js +3 -3
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/DocumentList.d.ts +1 -1
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/DocumentList.js +5 -5
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Head.js +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Head.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/List.js +3 -3
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.js.map +1 -0
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +8 -0
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentSigner.d.ts +1 -1
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentSigner.js +5 -5
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibility.d.ts +1 -1
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibility.js +4 -4
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilityPresentation.js +11 -11
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -0
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +1 -0
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.test.d.ts +1 -0
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/countries.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.d.ts +1 -1
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.js +11 -11
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/documentSignerStateMachine.d.ts +2 -2
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/documentSignerStateMachine.js +8 -8
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/documentSignerStateMachine.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/stateMachine.js +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/stateMachine.js.map +1 -0
- package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/EmployeeDocuments.d.ts +3 -3
- package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/EmployeeDocuments.js +6 -6
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js.map +1 -0
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.js +117 -0
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/shared}/SignatureForm/SignatureForm.d.ts +1 -1
- package/dist/components/Employee/{DocumentSigner → Documents/shared}/SignatureForm/SignatureForm.js +11 -11
- package/dist/components/Employee/Documents/shared/SignatureForm/SignatureForm.js.map +1 -0
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js.map +1 -0
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +1 -0
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -0
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +89 -82
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.js +37 -35
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.d.ts +1 -0
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +14 -8
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +38 -39
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +29 -27
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/index.d.ts +1 -1
- package/dist/components/Employee/PaymentMethod/management/ListView.d.ts +8 -0
- package/dist/components/Employee/PaymentMethod/management/ListView.js +138 -0
- package/dist/components/Employee/PaymentMethod/management/ListView.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/management/PaymentMethod.d.ts +11 -0
- package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js +49 -0
- package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.d.ts +8 -0
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.js +23 -0
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/management/index.d.ts +4 -0
- package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.d.ts +5 -0
- package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.js +75 -0
- package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/onboarding/BankForm.d.ts +8 -0
- package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +66 -0
- package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/onboarding/ListView.d.ts +9 -0
- package/dist/components/Employee/PaymentMethod/onboarding/ListView.js +168 -0
- package/dist/components/Employee/PaymentMethod/onboarding/ListView.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.d.ts +11 -0
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js +44 -0
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethodComponents.d.ts +8 -0
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethodComponents.js +23 -0
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethodComponents.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/onboarding/SplitView.d.ts +8 -0
- package/dist/components/Employee/PaymentMethod/onboarding/SplitView.js +97 -0
- package/dist/components/Employee/PaymentMethod/onboarding/SplitView.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/onboarding/index.d.ts +2 -0
- package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.d.ts +5 -0
- package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.js +75 -0
- package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/DeleteBankAccountDialog.d.ts +9 -0
- package/dist/components/Employee/PaymentMethod/shared/DeleteBankAccountDialog.js +31 -0
- package/dist/components/Employee/PaymentMethod/shared/DeleteBankAccountDialog.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/index.d.ts +7 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.d.ts +15 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js +22 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/index.d.ts +5 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.d.ts +37 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.js +105 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.d.ts +39 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.js +26 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/useDeleteBankAccount.d.ts +13 -0
- package/dist/components/Employee/PaymentMethod/shared/useDeleteBankAccount.js +19 -0
- package/dist/components/Employee/PaymentMethod/shared/useDeleteBankAccount.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.d.ts +6 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.js +9 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/index.d.ts +5 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.d.ts +31 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.js +94 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.d.ts +31 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.js +22 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.d.ts +20 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.js +68 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/fields.d.ts +6 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/fields.js +9 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/fields.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/index.d.ts +6 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.d.ts +48 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js +46 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.d.ts +65 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.js +209 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.d.ts +53 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.js +93 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.js.map +1 -0
- package/dist/components/Employee/Profile/onboarding/AdminProfile.js +88 -87
- package/dist/components/Employee/Profile/onboarding/AdminProfile.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js +2 -2
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
- package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js +19 -17
- package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js.map +1 -1
- package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.module.scss.js +8 -0
- package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.module.scss.js.map +1 -0
- package/dist/components/Employee/Taxes/FederalForm.js +27 -26
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalHead.js +13 -10
- package/dist/components/Employee/Taxes/FederalHead.js.map +1 -1
- package/dist/components/Employee/Taxes/StateForm.js +17 -14
- package/dist/components/Employee/Taxes/StateForm.js.map +1 -1
- package/dist/components/Employee/Taxes/Taxes.js +75 -69
- package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +4 -20
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.js +26 -26
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
- package/dist/components/Employee/exports/employeeManagement.d.ts +4 -1
- package/dist/components/Employee/exports/employeeManagement.js +22 -18
- package/dist/components/Employee/exports/employeeManagement.js.map +1 -1
- package/dist/components/Employee/exports/employeeOnboarding.d.ts +3 -3
- package/dist/components/Employee/exports/employeeOnboarding.js +4 -4
- package/dist/components/Employee/index.d.ts +4 -4
- package/dist/components/Employee/index.js +5 -5
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +26 -34
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +35 -35
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.d.ts +1 -1
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js +71 -54
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js.map +1 -1
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.d.ts +1 -1
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +22 -36
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js +84 -82
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js.map +1 -1
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.d.ts +1 -1
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js +49 -48
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js.map +1 -1
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailTypes.d.ts +1 -0
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +39 -37
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -1
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js +31 -31
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +1 -1
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormTypes.d.ts +1 -0
- package/dist/components/TimeOff/PolicyList/PolicyList.js +27 -27
- package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -1
- package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js +50 -50
- package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js.map +1 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettings.d.ts +1 -0
- package/dist/components/TimeOff/PolicySettings/PolicySettings.js +66 -41
- package/dist/components/TimeOff/PolicySettings/PolicySettings.js.map +1 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.d.ts +1 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js +59 -48
- package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js.map +1 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettingsTypes.d.ts +3 -0
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +34 -33
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +3 -0
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js +69 -61
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js +119 -75
- package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +72 -61
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.d.ts +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +103 -84
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormTypes.d.ts +2 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +51 -49
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.d.ts +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js +78 -59
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.module.scss.js +8 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.module.scss.js.map +1 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +6 -2
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +209 -154
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.d.ts +3 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js +36 -34
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js +136 -134
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.module.scss.js +6 -6
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.d.ts +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js +63 -65
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailTypes.d.ts +1 -0
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +50 -49
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -1
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.module.scss.js +4 -4
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.d.ts +1 -1
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js +66 -55
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js.map +1 -1
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayoutTypes.d.ts +1 -0
- package/dist/contexts/ApiProvider/ApiProvider.js +33 -39
- package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
- package/dist/contexts/ApiProvider/createSdkQueryClient.d.ts +17 -0
- package/dist/contexts/ApiProvider/createSdkQueryClient.js +14 -0
- package/dist/contexts/ApiProvider/createSdkQueryClient.js.map +1 -0
- package/dist/helpers/dateFormatting.js +52 -56
- package/dist/helpers/dateFormatting.js.map +1 -1
- package/dist/helpers/formattedStrings.d.ts +12 -0
- package/dist/helpers/formattedStrings.js +55 -33
- package/dist/helpers/formattedStrings.js.map +1 -1
- package/dist/hooks/useClientPagination/useClientPagination.d.ts +44 -0
- package/dist/hooks/useClientPagination/useClientPagination.js +69 -0
- package/dist/hooks/useClientPagination/useClientPagination.js.map +1 -0
- package/dist/hooks/useClientPagination/useClientPagination.test.d.ts +1 -0
- package/dist/i18n/I18n.js +6 -5
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.PaySchedule.json.js +22 -20
- package/dist/i18n/en/Company.PaySchedule.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js +8 -6
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js +9 -9
- package/dist/i18n/en/Company.TimeOff.PolicyDetail.json.js +6 -4
- package/dist/i18n/en/Company.TimeOff.PolicyDetail.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js +17 -15
- package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js +10 -8
- package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js.map +1 -1
- package/dist/i18n/en/Employee.Dashboard.json.js +16 -12
- package/dist/i18n/en/Employee.Dashboard.json.js.map +1 -1
- package/dist/i18n/en/Employee.Deductions.json.js +104 -76
- package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
- package/dist/i18n/en/Employee.DocumentManager.json.js +12 -0
- package/dist/i18n/en/Employee.DocumentManager.json.js.map +1 -0
- package/dist/i18n/en/Employee.PaymentMethod.json.js +76 -64
- package/dist/i18n/en/Employee.PaymentMethod.json.js.map +1 -1
- package/dist/i18n/en/common.json.d.ts +7 -0
- package/dist/i18n/en/common.json.js +19 -17
- package/dist/i18n/en/common.json.js.map +1 -1
- package/dist/index.d.ts +16 -6
- package/dist/index.js +138 -112
- package/dist/index.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.d.ts +2 -1
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js +20 -18
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -1
- package/dist/shared/constants.d.ts +8 -2
- package/dist/shared/constants.js +11 -8
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/test-utils/assertions.d.ts +20 -0
- package/dist/types/i18next.d.ts +140 -4
- package/dist/types/sdkError.js +58 -47
- package/dist/types/sdkError.js.map +1 -1
- package/docs/reference/endpoint-inventory.json +980 -1170
- package/package.json +33 -22
- package/dist/components/Employee/Compensation/Compensation.js +0 -87
- package/dist/components/Employee/Compensation/Compensation.js.map +0 -1
- package/dist/components/Employee/Compensation/CompensationFlowComponents.js +0 -61
- package/dist/components/Employee/Compensation/CompensationFlowComponents.js.map +0 -1
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.d.ts +0 -14
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.js +0 -128
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.js.map +0 -1
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.d.ts +0 -17
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.js +0 -224
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.js.map +0 -1
- package/dist/components/Employee/Compensation/EditCompensation/index.d.ts +0 -5
- package/dist/components/Employee/Compensation/JobsList/JobsList.js +0 -47
- package/dist/components/Employee/Compensation/JobsList/JobsList.js.map +0 -1
- package/dist/components/Employee/Compensation/JobsList/JobsListPresentation.js.map +0 -1
- package/dist/components/Employee/Compensation/compensationSchema.d.ts +0 -29
- package/dist/components/Employee/Compensation/compensationSchema.js +0 -63
- package/dist/components/Employee/Compensation/compensationSchema.js.map +0 -1
- package/dist/components/Employee/Compensation/compensationStateMachine.js.map +0 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.d.ts +0 -15
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.js +0 -27
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.js.map +0 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.d.ts +0 -13
- package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.js +0 -26
- package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.js.map +0 -1
- package/dist/components/Employee/Deductions/Actions.d.ts +0 -1
- package/dist/components/Employee/Deductions/DeductionsComponents.js +0 -31
- package/dist/components/Employee/Deductions/DeductionsComponents.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.d.ts +0 -39
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +0 -237
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +0 -22
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +0 -162
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.d.ts +0 -34
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +0 -168
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +0 -1
- package/dist/components/Employee/Deductions/Head.d.ts +0 -1
- package/dist/components/Employee/Deductions/useDeductions.d.ts +0 -30
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Head.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +0 -24
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/countries.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/documentSignerStateMachine.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/fields.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/stateMachine.js.map +0 -1
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocuments.js.map +0 -1
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +0 -115
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/Actions.d.ts +0 -1
- package/dist/components/Employee/PaymentMethod/Actions.js +0 -20
- package/dist/components/Employee/PaymentMethod/Actions.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/BankAccount.d.ts +0 -13
- package/dist/components/Employee/PaymentMethod/BankAccount.js +0 -13
- package/dist/components/Employee/PaymentMethod/BankAccount.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.d.ts +0 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +0 -58
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.d.ts +0 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +0 -51
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/Head.d.ts +0 -1
- package/dist/components/Employee/PaymentMethod/Head.js +0 -13
- package/dist/components/Employee/PaymentMethod/Head.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/PaymentMethod.d.ts +0 -9
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js +0 -183
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.d.ts +0 -10
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +0 -38
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/Split.d.ts +0 -1
- package/dist/components/Employee/PaymentMethod/Split.js +0 -175
- package/dist/components/Employee/PaymentMethod/Split.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.d.ts +0 -54
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +0 -68
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +0 -1
- /package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/JobsListPresentation.d.ts +0 -0
- /package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/index.d.ts +0 -0
- /package/dist/components/Employee/Compensation/{compensationStateMachine.d.ts → onboarding/compensationStateMachine.d.ts} +0 -0
- /package/dist/components/Employee/{DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.test.d.ts → Compensation/shared/derivePrimaryFlsaStatus.test.d.ts} +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Actions.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Head.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/List.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/useDocumentList.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilityPresentation.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilitySchema.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilitySchema.js +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/countries.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/countries.js +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/index.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.module.scss.js +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.module.scss.js.map +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/index.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/stateMachine.d.ts +0 -0
- /package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/EmployeeDocumentsPresentation.d.ts +0 -0
- /package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/index.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/fields.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/fields.js +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/index.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/signEmployeeFormSchema.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/signEmployeeFormSchema.js +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/useSignEmployeeForm.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/useSignEmployeeForm.js +0 -0
|
@@ -1,127 +1,105 @@
|
|
|
1
|
-
import { state as
|
|
2
|
-
import {
|
|
1
|
+
import { state as i, transition as E, reduce as t } from "robot3";
|
|
2
|
+
import { DeductionsListContextual as e, IncludeDeductionsContextual as D, DeductionsFormContextual as d } from "./deductionsContextualComponents.js";
|
|
3
3
|
import { componentEvents as n } from "../../../shared/constants.js";
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}), I = {
|
|
8
|
-
includeDeductions: D(
|
|
9
|
-
e(
|
|
4
|
+
const m = {
|
|
5
|
+
include: i(
|
|
6
|
+
E(
|
|
10
7
|
n.EMPLOYEE_DEDUCTION_INCLUDE_YES,
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
"form",
|
|
9
|
+
t(
|
|
10
|
+
(o) => ({
|
|
11
|
+
...o,
|
|
12
|
+
component: d,
|
|
13
|
+
editingDeductionId: void 0
|
|
16
14
|
})
|
|
17
15
|
)
|
|
18
16
|
),
|
|
19
|
-
|
|
20
|
-
n.EMPLOYEE_DEDUCTION_INCLUDE_NO,
|
|
21
|
-
"done",
|
|
22
|
-
E((o) => (o.onEvent(n.EMPLOYEE_DEDUCTION_DONE), o))
|
|
23
|
-
)
|
|
17
|
+
E(n.EMPLOYEE_DEDUCTION_DONE, "done")
|
|
24
18
|
),
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
list: i(
|
|
20
|
+
E(
|
|
27
21
|
n.EMPLOYEE_DEDUCTION_ADD,
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
"form",
|
|
23
|
+
t(
|
|
24
|
+
(o) => ({
|
|
25
|
+
...o,
|
|
26
|
+
component: d,
|
|
27
|
+
editingDeductionId: void 0
|
|
33
28
|
})
|
|
34
29
|
)
|
|
35
30
|
),
|
|
36
|
-
|
|
31
|
+
E(
|
|
37
32
|
n.EMPLOYEE_DEDUCTION_EDIT,
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
(o,
|
|
33
|
+
"form",
|
|
34
|
+
t(
|
|
35
|
+
(o, c) => ({
|
|
41
36
|
...o,
|
|
42
|
-
component:
|
|
43
|
-
|
|
44
|
-
})
|
|
45
|
-
)
|
|
46
|
-
),
|
|
47
|
-
e(
|
|
48
|
-
n.EMPLOYEE_DEDUCTION_DELETED,
|
|
49
|
-
"viewDeductions",
|
|
50
|
-
E(
|
|
51
|
-
t({
|
|
52
|
-
component: c
|
|
37
|
+
component: d,
|
|
38
|
+
editingDeductionId: c.payload.uuid
|
|
53
39
|
})
|
|
54
40
|
)
|
|
55
41
|
),
|
|
56
|
-
|
|
42
|
+
E(
|
|
57
43
|
n.EMPLOYEE_DEDUCTION_DELETED_EMPTY,
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
44
|
+
"include",
|
|
45
|
+
t(
|
|
46
|
+
(o) => ({
|
|
47
|
+
...o,
|
|
48
|
+
component: D
|
|
63
49
|
})
|
|
64
50
|
)
|
|
65
51
|
),
|
|
66
|
-
|
|
52
|
+
E(n.EMPLOYEE_DEDUCTION_DONE, "done")
|
|
67
53
|
),
|
|
68
|
-
|
|
69
|
-
|
|
54
|
+
form: i(
|
|
55
|
+
E(
|
|
70
56
|
n.EMPLOYEE_DEDUCTION_CREATED,
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
57
|
+
"list",
|
|
58
|
+
t(
|
|
59
|
+
(o) => ({
|
|
60
|
+
...o,
|
|
61
|
+
component: e,
|
|
62
|
+
editingDeductionId: void 0
|
|
76
63
|
})
|
|
77
64
|
)
|
|
78
65
|
),
|
|
79
|
-
|
|
80
|
-
n.
|
|
81
|
-
"
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
66
|
+
E(
|
|
67
|
+
n.EMPLOYEE_DEDUCTION_UPDATED,
|
|
68
|
+
"list",
|
|
69
|
+
t(
|
|
70
|
+
(o) => ({
|
|
71
|
+
...o,
|
|
72
|
+
component: e,
|
|
73
|
+
editingDeductionId: void 0
|
|
86
74
|
})
|
|
87
75
|
)
|
|
88
76
|
),
|
|
89
|
-
|
|
90
|
-
n.
|
|
91
|
-
"
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
)
|
|
98
|
-
)
|
|
99
|
-
),
|
|
100
|
-
editDeduction: D(
|
|
101
|
-
e(
|
|
102
|
-
n.EMPLOYEE_DEDUCTION_UPDATED,
|
|
103
|
-
"viewDeductions",
|
|
104
|
-
E(
|
|
105
|
-
t({
|
|
106
|
-
component: c,
|
|
107
|
-
currentDeductionId: null
|
|
77
|
+
E(
|
|
78
|
+
n.EMPLOYEE_DEDUCTION_CANCEL,
|
|
79
|
+
"list",
|
|
80
|
+
t(
|
|
81
|
+
(o) => ({
|
|
82
|
+
...o,
|
|
83
|
+
component: e,
|
|
84
|
+
editingDeductionId: void 0
|
|
108
85
|
})
|
|
109
86
|
)
|
|
110
87
|
),
|
|
111
|
-
|
|
112
|
-
n.
|
|
113
|
-
"
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
88
|
+
E(
|
|
89
|
+
n.EMPLOYEE_DEDUCTION_CANCEL_EMPTY,
|
|
90
|
+
"include",
|
|
91
|
+
t(
|
|
92
|
+
(o) => ({
|
|
93
|
+
...o,
|
|
94
|
+
component: D,
|
|
95
|
+
editingDeductionId: void 0
|
|
118
96
|
})
|
|
119
97
|
)
|
|
120
98
|
)
|
|
121
99
|
),
|
|
122
|
-
done:
|
|
100
|
+
done: i()
|
|
123
101
|
};
|
|
124
102
|
export {
|
|
125
|
-
|
|
103
|
+
m as deductionsMachine
|
|
126
104
|
};
|
|
127
105
|
//# sourceMappingURL=stateMachine.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stateMachine.js","sources":["../../../../src/components/Employee/Deductions/stateMachine.ts"],"sourcesContent":["import { state, transition, reduce, state as final } from 'robot3'\nimport type { DeductionsContextInterface, EventPayloads } from './
|
|
1
|
+
{"version":3,"file":"stateMachine.js","sources":["../../../../src/components/Employee/Deductions/stateMachine.ts"],"sourcesContent":["import { state, transition, reduce, state as final } from 'robot3'\nimport type { DeductionsContextInterface, EventPayloads } from './deductionsContextualComponents'\nimport {\n IncludeDeductionsContextual,\n DeductionsListContextual,\n DeductionsFormContextual,\n} from './deductionsContextualComponents'\nimport { componentEvents } from '@/shared/constants'\nimport type { MachineEventType, MachineTransition } from '@/types/Helpers'\n\nexport const deductionsMachine = {\n include: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_INCLUDE_YES,\n 'form',\n reduce(\n (ctx: DeductionsContextInterface): DeductionsContextInterface => ({\n ...ctx,\n component: DeductionsFormContextual,\n editingDeductionId: undefined,\n }),\n ),\n ),\n transition(componentEvents.EMPLOYEE_DEDUCTION_DONE, 'done'),\n ),\n list: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_ADD,\n 'form',\n reduce(\n (ctx: DeductionsContextInterface): DeductionsContextInterface => ({\n ...ctx,\n component: DeductionsFormContextual,\n editingDeductionId: undefined,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_EDIT,\n 'form',\n reduce(\n (\n ctx: DeductionsContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.EMPLOYEE_DEDUCTION_EDIT>,\n ): DeductionsContextInterface => ({\n ...ctx,\n component: DeductionsFormContextual,\n editingDeductionId: ev.payload.uuid,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_DELETED_EMPTY,\n 'include',\n reduce(\n (ctx: DeductionsContextInterface): DeductionsContextInterface => ({\n ...ctx,\n component: IncludeDeductionsContextual,\n }),\n ),\n ),\n transition(componentEvents.EMPLOYEE_DEDUCTION_DONE, 'done'),\n ),\n form: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_CREATED,\n 'list',\n reduce(\n (ctx: DeductionsContextInterface): DeductionsContextInterface => ({\n ...ctx,\n component: DeductionsListContextual,\n editingDeductionId: undefined,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_UPDATED,\n 'list',\n reduce(\n (ctx: DeductionsContextInterface): DeductionsContextInterface => ({\n ...ctx,\n component: DeductionsListContextual,\n editingDeductionId: undefined,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_CANCEL,\n 'list',\n reduce(\n (ctx: DeductionsContextInterface): DeductionsContextInterface => ({\n ...ctx,\n component: DeductionsListContextual,\n editingDeductionId: undefined,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_CANCEL_EMPTY,\n 'include',\n reduce(\n (ctx: DeductionsContextInterface): DeductionsContextInterface => ({\n ...ctx,\n component: IncludeDeductionsContextual,\n editingDeductionId: undefined,\n }),\n ),\n ),\n ),\n done: final(),\n}\n"],"names":["deductionsMachine","state","transition","componentEvents","reduce","ctx","DeductionsFormContextual","ev","IncludeDeductionsContextual","DeductionsListContextual","final"],"mappings":";;;AAUO,MAAMA,IAAoB;AAAA,EAC/B,SAASC;AAAA,IACPC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACE,CAACC,OAAiE;AAAA,UAChE,GAAGA;AAAA,UACH,WAAWC;AAAA,UACX,oBAAoB;AAAA,QAAA;AAAA,MACtB;AAAA,IACF;AAAA,IAEFJ,EAAWC,EAAgB,yBAAyB,MAAM;AAAA,EAAA;AAAA,EAE5D,MAAMF;AAAA,IACJC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACE,CAACC,OAAiE;AAAA,UAChE,GAAGA;AAAA,UACH,WAAWC;AAAA,UACX,oBAAoB;AAAA,QAAA;AAAA,MACtB;AAAA,IACF;AAAA,IAEFJ;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACE,CACEC,GACAE,OACgC;AAAA,UAChC,GAAGF;AAAA,UACH,WAAWC;AAAA,UACX,oBAAoBC,EAAG,QAAQ;AAAA,QAAA;AAAA,MACjC;AAAA,IACF;AAAA,IAEFL;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACE,CAACC,OAAiE;AAAA,UAChE,GAAGA;AAAA,UACH,WAAWG;AAAA,QAAA;AAAA,MACb;AAAA,IACF;AAAA,IAEFN,EAAWC,EAAgB,yBAAyB,MAAM;AAAA,EAAA;AAAA,EAE5D,MAAMF;AAAA,IACJC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACE,CAACC,OAAiE;AAAA,UAChE,GAAGA;AAAA,UACH,WAAWI;AAAA,UACX,oBAAoB;AAAA,QAAA;AAAA,MACtB;AAAA,IACF;AAAA,IAEFP;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACE,CAACC,OAAiE;AAAA,UAChE,GAAGA;AAAA,UACH,WAAWI;AAAA,UACX,oBAAoB;AAAA,QAAA;AAAA,MACtB;AAAA,IACF;AAAA,IAEFP;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACE,CAACC,OAAiE;AAAA,UAChE,GAAGA;AAAA,UACH,WAAWI;AAAA,UACX,oBAAoB;AAAA,QAAA;AAAA,MACtB;AAAA,IACF;AAAA,IAEFP;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACE,CAACC,OAAiE;AAAA,UAChE,GAAGA;AAAA,UACH,WAAWG;AAAA,UACX,oBAAoB;AAAA,QAAA;AAAA,MACtB;AAAA,IACF;AAAA,EACF;AAAA,EAEF,MAAME,EAAA;AACR;"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BaseComponentInterface } from '../../../Base';
|
|
2
|
+
export interface DocumentManagerProps {
|
|
3
|
+
employeeId: string;
|
|
4
|
+
formId: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function DocumentManager(props: DocumentManagerProps & BaseComponentInterface): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as u, Trans as s } from "react-i18next";
|
|
3
|
+
import { useEmployeeFormsGetSuspense as p } from "@gusto/embedded-api/react-query/employeeFormsGet";
|
|
4
|
+
import { useEmployeeFormsGetPdfSuspense as f } from "@gusto/embedded-api/react-query/employeeFormsGetPdf";
|
|
5
|
+
import { SignatureForm as d } from "../shared/SignatureForm/SignatureForm.js";
|
|
6
|
+
import { BaseComponent as g } from "../../../Base/Base.js";
|
|
7
|
+
import { useBase as C } from "../../../Base/useBase.js";
|
|
8
|
+
import { Flex as D } from "../../../Common/Flex/Flex.js";
|
|
9
|
+
import "classnames";
|
|
10
|
+
import { componentEvents as h } from "../../../../shared/constants.js";
|
|
11
|
+
import { ActionsLayout as y } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
12
|
+
import { DocumentViewer as E } from "../../../Common/DocumentViewer/DocumentViewer.js";
|
|
13
|
+
import { useComponentContext as x } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
|
+
import { useI18n as w } from "../../../../i18n/I18n.js";
|
|
15
|
+
function q(o) {
|
|
16
|
+
return w("Employee.DocumentManager"), /* @__PURE__ */ e(g, { ...o, componentName: "Employee.DocumentManager", children: /* @__PURE__ */ e(k, { employeeId: o.employeeId, formId: o.formId }) });
|
|
17
|
+
}
|
|
18
|
+
function k({ employeeId: o, formId: r }) {
|
|
19
|
+
const { t: m } = u("Employee.DocumentManager"), t = x(), { onEvent: a } = C(), {
|
|
20
|
+
data: { form: n }
|
|
21
|
+
} = p({ employeeId: o, formId: r }), {
|
|
22
|
+
data: { formPdf: c }
|
|
23
|
+
} = f({ employeeId: o, formId: r }), i = c?.documentUrl;
|
|
24
|
+
return n ? n.requiresSigning ? /* @__PURE__ */ e(d, { employeeId: o, formId: r, onEvent: a }) : /* @__PURE__ */ l(D, { flexDirection: "column", gap: 16, children: [
|
|
25
|
+
n.title && /* @__PURE__ */ e(t.Heading, { as: "h2", children: n.title }),
|
|
26
|
+
i && /* @__PURE__ */ e(t.Text, { children: /* @__PURE__ */ e(
|
|
27
|
+
s,
|
|
28
|
+
{
|
|
29
|
+
t: m,
|
|
30
|
+
i18nKey: "downloadDocumentCta",
|
|
31
|
+
components: {
|
|
32
|
+
downloadLink: /* @__PURE__ */ e(
|
|
33
|
+
t.Link,
|
|
34
|
+
{
|
|
35
|
+
href: i,
|
|
36
|
+
target: "_blank",
|
|
37
|
+
rel: "noopener noreferrer",
|
|
38
|
+
download: `${n.title || "form"}.pdf`
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
) }),
|
|
44
|
+
/* @__PURE__ */ e(E, { url: i, title: n.title, viewDocumentLabel: m("viewDocumentCta") }),
|
|
45
|
+
/* @__PURE__ */ e(y, { children: /* @__PURE__ */ e(
|
|
46
|
+
t.Button,
|
|
47
|
+
{
|
|
48
|
+
variant: "secondary",
|
|
49
|
+
onClick: () => {
|
|
50
|
+
a(h.CANCEL);
|
|
51
|
+
},
|
|
52
|
+
children: m("backCta")
|
|
53
|
+
}
|
|
54
|
+
) })
|
|
55
|
+
] }) : null;
|
|
56
|
+
}
|
|
57
|
+
export {
|
|
58
|
+
q as DocumentManager
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=DocumentManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentManager.js","sources":["../../../../../src/components/Employee/Documents/management/DocumentManager.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { useEmployeeFormsGetSuspense } from '@gusto/embedded-api/react-query/employeeFormsGet'\nimport { useEmployeeFormsGetPdfSuspense } from '@gusto/embedded-api/react-query/employeeFormsGetPdf'\nimport { SignatureForm } from '../shared/SignatureForm/SignatureForm'\nimport { BaseComponent, useBase, type BaseComponentInterface } from '@/components/Base'\nimport { ActionsLayout, Flex } from '@/components/Common'\nimport { DocumentViewer } from '@/components/Common/DocumentViewer'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\n\nexport interface DocumentManagerProps {\n employeeId: string\n formId: string\n}\n\nexport function DocumentManager(props: DocumentManagerProps & BaseComponentInterface) {\n useI18n('Employee.DocumentManager')\n return (\n <BaseComponent {...props} componentName=\"Employee.DocumentManager\">\n <DocumentManagerRoot employeeId={props.employeeId} formId={props.formId} />\n </BaseComponent>\n )\n}\n\nfunction DocumentManagerRoot({ employeeId, formId }: DocumentManagerProps) {\n const { t } = useTranslation('Employee.DocumentManager')\n const Components = useComponentContext()\n const { onEvent } = useBase()\n\n const {\n data: { form },\n } = useEmployeeFormsGetSuspense({ employeeId, formId })\n const {\n data: { formPdf },\n } = useEmployeeFormsGetPdfSuspense({ employeeId, formId })\n\n const pdfUrl = formPdf?.documentUrl\n\n if (!form) return null\n\n if (form.requiresSigning) {\n return <SignatureForm employeeId={employeeId} formId={formId} onEvent={onEvent} />\n }\n\n return (\n <Flex flexDirection=\"column\" gap={16}>\n {form.title && <Components.Heading as=\"h2\">{form.title}</Components.Heading>}\n {pdfUrl && (\n <Components.Text>\n <Trans\n t={t}\n i18nKey=\"downloadDocumentCta\"\n components={{\n downloadLink: (\n <Components.Link\n href={pdfUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n download={`${form.title || 'form'}.pdf`}\n />\n ),\n }}\n />\n </Components.Text>\n )}\n <DocumentViewer url={pdfUrl} title={form.title} viewDocumentLabel={t('viewDocumentCta')} />\n\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(componentEvents.CANCEL)\n }}\n >\n {t('backCta')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n )\n}\n"],"names":["DocumentManager","props","useI18n","jsx","BaseComponent","DocumentManagerRoot","employeeId","formId","t","useTranslation","Components","useComponentContext","onEvent","useBase","form","useEmployeeFormsGetSuspense","formPdf","useEmployeeFormsGetPdfSuspense","pdfUrl","SignatureForm","jsxs","Flex","Trans","DocumentViewer","ActionsLayout","componentEvents"],"mappings":";;;;;;;;;;;;;;AAgBO,SAASA,EAAgBC,GAAsD;AACpF,SAAAC,EAAQ,0BAA0B,GAEhC,gBAAAC,EAACC,GAAA,EAAe,GAAGH,GAAO,eAAc,4BACtC,UAAA,gBAAAE,EAACE,GAAA,EAAoB,YAAYJ,EAAM,YAAY,QAAQA,EAAM,QAAQ,GAC3E;AAEJ;AAEA,SAASI,EAAoB,EAAE,YAAAC,GAAY,QAAAC,KAAgC;AACzE,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,0BAA0B,GACjDC,IAAaC,EAAA,GACb,EAAE,SAAAC,EAAA,IAAYC,EAAA,GAEd;AAAA,IACJ,MAAM,EAAE,MAAAC,EAAA;AAAA,EAAK,IACXC,EAA4B,EAAE,YAAAT,GAAY,QAAAC,GAAQ,GAChD;AAAA,IACJ,MAAM,EAAE,SAAAS,EAAA;AAAA,EAAQ,IACdC,EAA+B,EAAE,YAAAX,GAAY,QAAAC,GAAQ,GAEnDW,IAASF,GAAS;AAExB,SAAKF,IAEDA,EAAK,kBACA,gBAAAX,EAACgB,GAAA,EAAc,YAAAb,GAAwB,QAAAC,GAAgB,SAAAK,EAAA,CAAkB,IAIhF,gBAAAQ,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UAAA;AAAA,IAAAP,EAAK,2BAAUJ,EAAW,SAAX,EAAmB,IAAG,MAAM,YAAK,MAAA,CAAM;AAAA,IACtDQ,KACC,gBAAAf,EAACO,EAAW,MAAX,EACC,UAAA,gBAAAP;AAAA,MAACmB;AAAA,MAAA;AAAA,QACC,GAAAd;AAAA,QACA,SAAQ;AAAA,QACR,YAAY;AAAA,UACV,cACE,gBAAAL;AAAA,YAACO,EAAW;AAAA,YAAX;AAAA,cACC,MAAMQ;AAAA,cACN,QAAO;AAAA,cACP,KAAI;AAAA,cACJ,UAAU,GAAGJ,EAAK,SAAS,MAAM;AAAA,YAAA;AAAA,UAAA;AAAA,QACnC;AAAA,MAEJ;AAAA,IAAA,GAEJ;AAAA,IAEF,gBAAAX,EAACoB,GAAA,EAAe,KAAKL,GAAQ,OAAOJ,EAAK,OAAO,mBAAmBN,EAAE,iBAAiB,EAAA,CAAG;AAAA,sBAExFgB,GAAA,EACC,UAAA,gBAAArB;AAAA,MAACO,EAAW;AAAA,MAAX;AAAA,QACC,SAAQ;AAAA,QACR,SAAS,MAAM;AACb,UAAAE,EAAQa,EAAgB,MAAM;AAAA,QAChC;AAAA,QAEC,YAAE,SAAS;AAAA,MAAA;AAAA,IAAA,EACd,CACF;AAAA,EAAA,GACF,IAvCgB;AAyCpB;"}
|
|
@@ -2,9 +2,9 @@ import { jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import { useTranslation as r } from "react-i18next";
|
|
3
3
|
import { useDocumentList as m } from "./useDocumentList.js";
|
|
4
4
|
import "classnames";
|
|
5
|
-
import "
|
|
6
|
-
import { ActionsLayout as s } from "
|
|
7
|
-
import { useComponentContext as c } from "
|
|
5
|
+
import "../../../../../../shared/constants.js";
|
|
6
|
+
import { ActionsLayout as s } from "../../../../../Common/ActionsLayout/ActionsLayout.js";
|
|
7
|
+
import { useComponentContext as c } from "../../../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
8
|
function h() {
|
|
9
9
|
const { t } = r("Employee.DocumentSigner"), { handleContinue: n, hasSignedAllForms: i } = m(), e = c();
|
|
10
10
|
return /* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(e.Button, { onClick: n, isLoading: !1, isDisabled: !i, children: t("continueCta") }) });
|
package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Actions.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Employee.DocumentSigner')\n const { handleContinue, hasSignedAllForms } = useDocumentList()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button onClick={handleContinue} isLoading={false} isDisabled={!hasSignedAllForms}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","handleContinue","hasSignedAllForms","useDocumentList","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,EAAA,IAAMC,EAAe,yBAAyB,GAChD,EAAE,gBAAAC,GAAgB,mBAAAC,EAAA,IAAsBC,EAAA,GACxCC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAASH,GAAgB,WAAW,IAAO,YAAY,CAACC,GACxE,UAAA,EAAE,aAAa,GAClB,GACF;AAEJ;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseComponentInterface, CommonComponentInterface } from '
|
|
1
|
+
import { BaseComponentInterface, CommonComponentInterface } from '../../../../../Base/Base';
|
|
2
2
|
interface DocumentListProps extends CommonComponentInterface {
|
|
3
3
|
employeeId: string;
|
|
4
4
|
}
|
|
@@ -4,11 +4,11 @@ import { Head as a } from "./Head.js";
|
|
|
4
4
|
import { List as F } from "./List.js";
|
|
5
5
|
import { Actions as h } from "./Actions.js";
|
|
6
6
|
import { DocumentListProvider as S } from "./useDocumentList.js";
|
|
7
|
-
import { BaseComponent as L } from "
|
|
8
|
-
import { useBase as g } from "
|
|
9
|
-
import { useI18n as O } from "
|
|
10
|
-
import { componentEvents as i } from "
|
|
11
|
-
import { Flex as _ } from "
|
|
7
|
+
import { BaseComponent as L } from "../../../../../Base/Base.js";
|
|
8
|
+
import { useBase as g } from "../../../../../Base/useBase.js";
|
|
9
|
+
import { useI18n as O } from "../../../../../../i18n/I18n.js";
|
|
10
|
+
import { componentEvents as i } from "../../../../../../shared/constants.js";
|
|
11
|
+
import { Flex as _ } from "../../../../../Common/Flex/Flex.js";
|
|
12
12
|
import "classnames";
|
|
13
13
|
function Y(e) {
|
|
14
14
|
return /* @__PURE__ */ o(L, { ...e, children: /* @__PURE__ */ o(v, { ...e }) });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentList.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.tsx"],"sourcesContent":["import { useEmployeeFormsListSuspense } from '@gusto/embedded-api/react-query/employeeFormsList'\nimport { type Form } from '@gusto/embedded-api/models/components/form'\nimport { Head } from './Head'\nimport { List } from './List'\nimport { Actions } from './Actions'\nimport { DocumentListProvider } from './useDocumentList'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { Flex } from '@/components/Common'\n\ninterface DocumentListProps extends CommonComponentInterface {\n employeeId: string\n}\n\nexport function DocumentList(props: DocumentListProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, className, children }: DocumentListProps) {\n useI18n('Employee.DocumentSigner')\n const { onEvent } = useBase()\n\n const { data, error: documentListError } = useEmployeeFormsListSuspense({ employeeId })\n const employeeForms = data.forms!\n\n const hasSignedAllForms = employeeForms.every(employeeForm => !employeeForm.requiresSigning)\n\n const handleRequestFormToSign = (data: Form) => {\n const fullForm = employeeForms.find(f => f.uuid === data.uuid)\n onEvent(componentEvents.EMPLOYEE_VIEW_FORM_TO_SIGN, { uuid: data.uuid, name: fullForm?.name })\n }\n\n const handleContinue = () => {\n onEvent(componentEvents.EMPLOYEE_FORMS_DONE)\n }\n\n return (\n <section className={className}>\n <DocumentListProvider\n value={{\n employeeForms,\n hasSignedAllForms,\n handleContinue,\n handleRequestFormToSign,\n documentListError,\n }}\n >\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Actions />\n </Flex>\n )}\n </DocumentListProvider>\n </section>\n )\n}\n"],"names":["DocumentList","props","jsx","BaseComponent","Root","employeeId","className","children","useI18n","onEvent","useBase","data","documentListError","useEmployeeFormsListSuspense","employeeForms","hasSignedAllForms","employeeForm","DocumentListProvider","componentEvents","fullForm","f","jsxs","Flex","Head","List","Actions"],"mappings":";;;;;;;;;;;;AAoBO,SAASA,EAAaC,GAAmD;AAC9E,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,WAAAC,GAAW,UAAAC,KAA+B;AACpE,EAAAC,EAAQ,yBAAyB;AACjC,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GAEd,EAAE,MAAAC,GAAM,OAAOC,EAAA,IAAsBC,EAA6B,EAAE,YAAAR,GAAY,GAChFS,IAAgBH,EAAK,OAErBI,IAAoBD,EAAc,MAAM,CAAAE,MAAgB,CAACA,EAAa,eAAe;AAW3F,SACE,gBAAAd,EAAC,aAAQ,WAAAI,GACP,UAAA,gBAAAJ;AAAA,IAACe;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,eAAAH;AAAA,QACA,mBAAAC;AAAA,QACA,gBAVe,MAAM;AAC3B,UAAAN,EAAQS,EAAgB,mBAAmB;AAAA,QAC7C;AAAA,QASQ,yBAhBwB,CAACP,MAAe;AAC9C,gBAAMQ,IAAWL,EAAc,KAAK,OAAKM,EAAE,SAAST,EAAK,IAAI;AAC7D,UAAAF,EAAQS,EAAgB,4BAA4B,EAAE,MAAMP,EAAK,MAAM,MAAMQ,GAAU,MAAM;AAAA,QAC/F;AAAA,QAcQ,mBAAAP;AAAA,MAAA;AAAA,MAGD,UAAAL,KAGC,gBAAAc,EAACC,GAAA,EAAK,eAAc,UAClB,UAAA;AAAA,QAAA,gBAAApB,EAACqB,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX;AAAA,IAAA;AAAA,EAAA,GAGN;AAEJ;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation as e } from "react-i18next";
|
|
3
|
-
import { useComponentContext as r } from "
|
|
3
|
+
import { useComponentContext as r } from "../../../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
4
4
|
function p() {
|
|
5
5
|
const { t: o } = e("Employee.DocumentSigner"), t = r();
|
|
6
6
|
return /* @__PURE__ */ n(t.Heading, { as: "h2", children: o("documentListTitle") });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Head.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Head.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nfunction Head() {\n const { t } = useTranslation('Employee.DocumentSigner')\n const Components = useComponentContext()\n\n return <Components.Heading as=\"h2\">{t('documentListTitle')}</Components.Heading>\n}\n\nexport { Head }\n"],"names":["Head","t","useTranslation","Components","useComponentContext","jsx"],"mappings":";;;AAGA,SAASA,IAAO;AACd,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB,GAChDC,IAAaC,EAAA;AAEnB,SAAO,gBAAAC,EAACF,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,mBAAmB,GAAE;AAC7D;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation as m } from "react-i18next";
|
|
3
3
|
import { useDocumentList as s } from "./useDocumentList.js";
|
|
4
|
-
import { Flex as l } from "
|
|
4
|
+
import { Flex as l } from "../../../../../Common/Flex/Flex.js";
|
|
5
5
|
import "classnames";
|
|
6
|
-
import "
|
|
7
|
-
import { DocumentList as u } from "
|
|
6
|
+
import "../../../../../../shared/constants.js";
|
|
7
|
+
import { DocumentList as u } from "../../../../../Common/DocumentList/DocumentList.js";
|
|
8
8
|
function f() {
|
|
9
9
|
const { employeeForms: i, handleRequestFormToSign: n, documentListError: r } = s(), { t: e } = m("Employee.DocumentSigner");
|
|
10
10
|
return /* @__PURE__ */ o("section", { style: { width: "100%" }, children: /* @__PURE__ */ o(l, { flexDirection: "column", gap: 32, children: /* @__PURE__ */ o(
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"List.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport { Flex, DocumentList as SharedDocumentList } from '@/components/Common'\n\nexport function List() {\n const { employeeForms, handleRequestFormToSign, documentListError } = useDocumentList()\n const { t } = useTranslation('Employee.DocumentSigner')\n\n return (\n <section style={{ width: '100%' }}>\n <Flex flexDirection=\"column\" gap={32}>\n <SharedDocumentList\n forms={employeeForms.map(form => ({\n uuid: form.uuid,\n title: form.title,\n description: form.description,\n requires_signing: form.requiresSigning,\n }))}\n onRequestSign={handleRequestFormToSign}\n withError={!!documentListError}\n label={t('documentListLabel')}\n columnLabels={{\n form: t('formColumnLabel'),\n action: t('actionColumnLabel'),\n }}\n statusLabels={{\n signCta: t('signDocumentCta'),\n notSigned: t('notSigned'),\n complete: t('signDocumentComplete'),\n }}\n emptyStateLabel={t('emptyTableTitle')}\n errorLabel={t('documentListError')}\n />\n </Flex>\n </section>\n )\n}\n"],"names":["List","employeeForms","handleRequestFormToSign","documentListError","useDocumentList","t","useTranslation","jsx","Flex","SharedDocumentList","form"],"mappings":";;;;;;;AAIO,SAASA,IAAO;AACrB,QAAM,EAAE,eAAAC,GAAe,yBAAAC,GAAyB,mBAAAC,EAAA,IAAsBC,EAAA,GAChE,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB;AAEtD,SACE,gBAAAC,EAAC,WAAA,EAAQ,OAAO,EAAE,OAAO,UACvB,UAAA,gBAAAA,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA,gBAAAD;AAAA,IAACE;AAAAA,IAAA;AAAA,MACC,OAAOR,EAAc,IAAI,CAAAS,OAAS;AAAA,QAChC,MAAMA,EAAK;AAAA,QACX,OAAOA,EAAK;AAAA,QACZ,aAAaA,EAAK;AAAA,QAClB,kBAAkBA,EAAK;AAAA,MAAA,EACvB;AAAA,MACF,eAAeR;AAAA,MACf,WAAW,CAAC,CAACC;AAAA,MACb,OAAOE,EAAE,mBAAmB;AAAA,MAC5B,cAAc;AAAA,QACZ,MAAMA,EAAE,iBAAiB;AAAA,QACzB,QAAQA,EAAE,mBAAmB;AAAA,MAAA;AAAA,MAE/B,cAAc;AAAA,QACZ,SAASA,EAAE,iBAAiB;AAAA,QAC5B,WAAWA,EAAE,WAAW;AAAA,QACxB,UAAUA,EAAE,sBAAsB;AAAA,MAAA;AAAA,MAEpC,iBAAiBA,EAAE,iBAAiB;AAAA,MACpC,YAAYA,EAAE,mBAAmB;AAAA,IAAA;AAAA,EAAA,GAErC,EAAA,CACF;AAEJ;"}
|
package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createCompoundContext as t } from "../../../../../Base/createCompoundContext.js";
|
|
2
|
+
import "../../../../../Base/useBase.js";
|
|
3
|
+
const [m, n] = t("DocumentListContext");
|
|
4
|
+
export {
|
|
5
|
+
n as DocumentListProvider,
|
|
6
|
+
m as useDocumentList
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=useDocumentList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDocumentList.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n employeeForms: Form[]\n hasSignedAllForms: boolean\n handleContinue: () => void\n handleRequestFormToSign: (form: Form) => void\n documentListError: Error | null\n formToSign?: Form\n}\n\nconst [useDocumentList, DocumentListProvider] =\n createCompoundContext<DocumentListContextType>('DocumentListContext')\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":";;AAYA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
|
|
@@ -5,11 +5,11 @@ import { useEmployeesGetSuspense as g } from "@gusto/embedded-api/react-query/em
|
|
|
5
5
|
import { useEmployeeFormsListSuspense as D } from "@gusto/embedded-api/react-query/employeeFormsList";
|
|
6
6
|
import { EmploymentEligibilityContextual as d, DocumentListContextual as y } from "./documentSignerStateMachine.js";
|
|
7
7
|
import { documentSignerMachine as E } from "./stateMachine.js";
|
|
8
|
-
import { Flow as S } from "
|
|
9
|
-
import { BaseComponent as x } from "
|
|
10
|
-
import "
|
|
11
|
-
import { useComponentDictionary as C } from "
|
|
12
|
-
import { I9_FORM_NAME as F } from "
|
|
8
|
+
import { Flow as S } from "../../../../Flow/Flow.js";
|
|
9
|
+
import { BaseComponent as x } from "../../../../Base/Base.js";
|
|
10
|
+
import "../../../../Base/useBase.js";
|
|
11
|
+
import { useComponentDictionary as C } from "../../../../../i18n/I18n.js";
|
|
12
|
+
import { I9_FORM_NAME as F } from "../../../../../shared/constants.js";
|
|
13
13
|
function O(o) {
|
|
14
14
|
return /* @__PURE__ */ n(x, { ...o, children: /* @__PURE__ */ n(M, { ...o }) });
|
|
15
15
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentSigner.js","sources":["../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useMemo } from 'react'\nimport { useEmployeesGetSuspense } from '@gusto/embedded-api/react-query/employeesGet'\nimport { useEmployeeFormsListSuspense } from '@gusto/embedded-api/react-query/employeeFormsList'\nimport {\n DocumentListContextual,\n EmploymentEligibilityContextual,\n type DocumentSignerContextInterface,\n} from './documentSignerStateMachine'\nimport { documentSignerMachine } from './stateMachine'\nimport { Flow } from '@/components/Flow/Flow'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentDictionary } from '@/i18n/I18n'\nimport { I9_FORM_NAME } from '@/shared/constants'\n\nexport interface DocumentSignerProps extends BaseComponentInterface<'Employee.DocumentSigner'> {\n employeeId: string\n withEmployeeI9?: boolean\n}\n\nexport function DocumentSigner(props: DocumentSignerProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, onEvent, dictionary, withEmployeeI9 = false }: DocumentSignerProps) {\n useComponentDictionary('Employee.DocumentSigner', dictionary)\n\n const { data: employeeData } = useEmployeesGetSuspense({ employeeId })\n const { data: formsData } = useEmployeeFormsListSuspense({ employeeId })\n\n const employeeHasI9Enabled = employeeData.employee?.onboardingDocumentsConfig?.i9Document === true\n\n const i9Form = formsData.forms?.find(form => form.name === I9_FORM_NAME)\n const needsI9Form =\n withEmployeeI9 && employeeHasI9Enabled && (!i9Form || i9Form.requiresSigning === true)\n\n const machine = useMemo(\n () =>\n createMachine(\n needsI9Form ? 'employmentEligibility' : 'index',\n documentSignerMachine,\n (initialContext: DocumentSignerContextInterface) => ({\n ...initialContext,\n component: needsI9Form ? EmploymentEligibilityContextual : DocumentListContextual,\n employeeId,\n withEmployeeI9,\n }),\n ),\n [employeeId, withEmployeeI9],\n )\n\n return <Flow machine={machine} onEvent={onEvent} />\n}\n"],"names":["DocumentSigner","props","jsx","BaseComponent","Root","employeeId","onEvent","dictionary","withEmployeeI9","useComponentDictionary","employeeData","useEmployeesGetSuspense","formsData","useEmployeeFormsListSuspense","employeeHasI9Enabled","i9Form","form","I9_FORM_NAME","needsI9Form","machine","useMemo","createMachine","documentSignerMachine","initialContext","EmploymentEligibilityContextual","DocumentListContextual","Flow"],"mappings":";;;;;;;;;;;;AAoBO,SAASA,EAAeC,GAA4B;AACzD,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,SAAAC,GAAS,YAAAC,GAAY,gBAAAC,IAAiB,MAA8B;AAC9F,EAAAC,EAAuB,2BAA2BF,CAAU;AAE5D,QAAM,EAAE,MAAMG,EAAA,IAAiBC,EAAwB,EAAE,YAAAN,GAAY,GAC/D,EAAE,MAAMO,EAAA,IAAcC,EAA6B,EAAE,YAAAR,GAAY,GAEjES,IAAuBJ,EAAa,UAAU,2BAA2B,eAAe,IAExFK,IAASH,EAAU,OAAO,KAAK,CAAAI,MAAQA,EAAK,SAASC,CAAY,GACjEC,IACJV,KAAkBM,MAAyB,CAACC,KAAUA,EAAO,oBAAoB,KAE7EI,IAAUC;AAAA,IACd,MACEC;AAAA,MACEH,IAAc,0BAA0B;AAAA,MACxCI;AAAA,MACA,CAACC,OAAoD;AAAA,QACnD,GAAGA;AAAA,QACH,WAAWL,IAAcM,IAAkCC;AAAA,QAC3D,YAAApB;AAAA,QACA,gBAAAG;AAAA,MAAA;AAAA,IACF;AAAA,IAEJ,CAACH,GAAYG,CAAc;AAAA,EAAA;AAG7B,SAAO,gBAAAN,EAACwB,GAAA,EAAK,SAAAP,GAAkB,SAAAb,EAAA,CAAkB;AACnD;"}
|
|
@@ -3,10 +3,10 @@ import { GustoEmbeddedError as z } from "@gusto/embedded-api/models/errors/gusto
|
|
|
3
3
|
import { useI9VerificationGetAuthorization as A } from "@gusto/embedded-api/react-query/i9VerificationGetAuthorization";
|
|
4
4
|
import { useI9VerificationUpdateMutation as I } from "@gusto/embedded-api/react-query/i9VerificationUpdate";
|
|
5
5
|
import { EmploymentEligibilityPresentation as _ } from "./EmploymentEligibilityPresentation.js";
|
|
6
|
-
import { BaseComponent as v } from "
|
|
7
|
-
import { useBase as x } from "
|
|
8
|
-
import { useComponentDictionary as L, useI18n as S } from "
|
|
9
|
-
import { componentEvents as T } from "
|
|
6
|
+
import { BaseComponent as v } from "../../../../../Base/Base.js";
|
|
7
|
+
import { useBase as x } from "../../../../../Base/useBase.js";
|
|
8
|
+
import { useComponentDictionary as L, useI18n as S } from "../../../../../../i18n/I18n.js";
|
|
9
|
+
import { componentEvents as T } from "../../../../../../shared/constants.js";
|
|
10
10
|
function C(o) {
|
|
11
11
|
return /* @__PURE__ */ r(v, { ...o, children: /* @__PURE__ */ r(M, { ...o }) });
|
|
12
12
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmploymentEligibility.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.tsx"],"sourcesContent":["import { GustoEmbeddedError } from '@gusto/embedded-api/models/errors/gustoembeddederror'\nimport { useI9VerificationGetAuthorization } from '@gusto/embedded-api/react-query/i9VerificationGetAuthorization'\nimport { useI9VerificationUpdateMutation } from '@gusto/embedded-api/react-query/i9VerificationUpdate'\nimport { EmploymentEligibilityPresentation } from './EmploymentEligibilityPresentation'\nimport type {\n EmploymentEligibilityInputs,\n EmploymentEligibilityPayload,\n} from './EmploymentEligibilitySchema'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\n\nexport interface EmploymentEligibilityProps extends BaseComponentInterface<'Employee.EmploymentEligibility'> {\n employeeId: string\n}\n\nexport function EmploymentEligibility(props: EmploymentEligibilityProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nconst Root = ({ employeeId, dictionary }: EmploymentEligibilityProps) => {\n useComponentDictionary('Employee.EmploymentEligibility', dictionary)\n useI18n('Employee.EmploymentEligibility')\n const { onEvent, baseSubmitHandler, LoadingIndicator } = useBase()\n\n const { data: i9AuthData, isLoading } = useI9VerificationGetAuthorization(\n { employeeId },\n {\n retry: false,\n throwOnError: (error: Error) => {\n return !(error instanceof GustoEmbeddedError && error.httpMeta.response.status === 404)\n },\n },\n )\n\n const existingAuth = i9AuthData?.i9Authorization\n\n const { mutateAsync: updateI9Authorization, isPending } = useI9VerificationUpdateMutation()\n\n const handleSubmit = async (data: EmploymentEligibilityPayload) => {\n await baseSubmitHandler(data, async payload => {\n const { authorizationStatus, documentType, documentNumber, expirationDate, country } = payload\n\n if (!authorizationStatus) return\n\n const result = await updateI9Authorization({\n request: {\n employeeId,\n i9AuthorizationRequestBody: {\n authorizationStatus,\n version: existingAuth?.version,\n ...(authorizationStatus === 'permanent_resident' &&\n documentNumber && {\n documentType: 'uscis_alien_registration_number',\n documentNumber,\n }),\n ...(authorizationStatus === 'alien' && {\n ...(documentNumber && documentType && { documentType, documentNumber }),\n expirationDate,\n ...(documentType === 'foreign_passport' && { country }),\n }),\n },\n },\n })\n\n onEvent(componentEvents.EMPLOYEE_EMPLOYMENT_ELIGIBILITY_DONE, result.i9Authorization)\n })\n }\n\n const defaultValues: Partial<EmploymentEligibilityInputs> = existingAuth\n ? {\n authorizationStatus: existingAuth.authorizationStatus,\n documentType: existingAuth.documentType ?? undefined,\n expirationDate: existingAuth.expirationDate\n ? new Date(existingAuth.expirationDate)\n : undefined,\n country: existingAuth.country ?? undefined,\n }\n : {}\n\n if (!isPending && isLoading) return <LoadingIndicator />\n\n return (\n <EmploymentEligibilityPresentation\n key={existingAuth?.uuid}\n onSubmit={handleSubmit}\n defaultValues={defaultValues}\n hasDocumentNumber={existingAuth?.hasDocumentNumber}\n isPending={isPending}\n />\n )\n}\n"],"names":["EmploymentEligibility","props","jsx","BaseComponent","Root","employeeId","dictionary","useComponentDictionary","useI18n","onEvent","baseSubmitHandler","LoadingIndicator","useBase","i9AuthData","isLoading","useI9VerificationGetAuthorization","error","GustoEmbeddedError","existingAuth","updateI9Authorization","isPending","useI9VerificationUpdateMutation","handleSubmit","data","payload","authorizationStatus","documentType","documentNumber","expirationDate","country","result","componentEvents","defaultValues","EmploymentEligibilityPresentation"],"mappings":";;;;;;;;;AAkBO,SAASA,EAAsBC,GAAmC;AACvE,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,MAAMG,IAAO,CAAC,EAAE,YAAAC,GAAY,YAAAC,QAA6C;AACvE,EAAAC,EAAuB,kCAAkCD,CAAU,GACnEE,EAAQ,gCAAgC;AACxC,QAAM,EAAE,SAAAC,GAAS,mBAAAC,GAAmB,kBAAAC,EAAA,IAAqBC,EAAA,GAEnD,EAAE,MAAMC,GAAY,WAAAC,EAAA,IAAcC;AAAA,IACtC,EAAE,YAAAV,EAAA;AAAA,IACF;AAAA,MACE,OAAO;AAAA,MACP,cAAc,CAACW,MACN,EAAEA,aAAiBC,KAAsBD,EAAM,SAAS,SAAS,WAAW;AAAA,IACrF;AAAA,EACF,GAGIE,IAAeL,GAAY,iBAE3B,EAAE,aAAaM,GAAuB,WAAAC,EAAA,IAAcC,EAAA,GAEpDC,IAAe,OAAOC,MAAuC;AACjE,UAAMb,EAAkBa,GAAM,OAAMC,MAAW;AAC7C,YAAM,EAAE,qBAAAC,GAAqB,cAAAC,GAAc,gBAAAC,GAAgB,gBAAAC,GAAgB,SAAAC,MAAYL;AAEvF,UAAI,CAACC,EAAqB;AAE1B,YAAMK,IAAS,MAAMX,EAAsB;AAAA,QACzC,SAAS;AAAA,UACP,YAAAd;AAAA,UACA,4BAA4B;AAAA,YAC1B,qBAAAoB;AAAA,YACA,SAASP,GAAc;AAAA,YACvB,GAAIO,MAAwB,wBAC1BE,KAAkB;AAAA,cAChB,cAAc;AAAA,cACd,gBAAAA;AAAA,YAAA;AAAA,YAEJ,GAAIF,MAAwB,WAAW;AAAA,cACrC,GAAIE,KAAkBD,KAAgB,EAAE,cAAAA,GAAc,gBAAAC,EAAA;AAAA,cACtD,gBAAAC;AAAA,cACA,GAAIF,MAAiB,sBAAsB,EAAE,SAAAG,EAAA;AAAA,YAAQ;AAAA,UACvD;AAAA,QACF;AAAA,MACF,CACD;AAED,MAAApB,EAAQsB,EAAgB,sCAAsCD,EAAO,eAAe;AAAA,IACtF,CAAC;AAAA,EACH,GAEME,IAAsDd,IACxD;AAAA,IACE,qBAAqBA,EAAa;AAAA,IAClC,cAAcA,EAAa,gBAAgB;AAAA,IAC3C,gBAAgBA,EAAa,iBACzB,IAAI,KAAKA,EAAa,cAAc,IACpC;AAAA,IACJ,SAASA,EAAa,WAAW;AAAA,EAAA,IAEnC,CAAA;AAEJ,SAAI,CAACE,KAAaN,sBAAmBH,GAAA,CAAA,CAAiB,IAGpD,gBAAAT;AAAA,IAAC+B;AAAA,IAAA;AAAA,MAEC,UAAUX;AAAA,MACV,eAAAU;AAAA,MACA,mBAAmBd,GAAc;AAAA,MACjC,WAAAE;AAAA,IAAA;AAAA,IAJKF,GAAc;AAAA,EAAA;AAOzB;"}
|
|
@@ -6,18 +6,18 @@ import { zodResolver as q } from "@hookform/resolvers/zod";
|
|
|
6
6
|
import { AuthorizationStatus as w, DocumentType as A } from "@gusto/embedded-api/models/components/i9authorization";
|
|
7
7
|
import { generateEmploymentEligibilitySchema as k } from "./EmploymentEligibilitySchema.js";
|
|
8
8
|
import { COUNTRIES as P } from "./countries.js";
|
|
9
|
-
import { Flex as b } from "
|
|
9
|
+
import { Flex as b } from "../../../../../Common/Flex/Flex.js";
|
|
10
10
|
import "classnames";
|
|
11
|
-
import "
|
|
12
|
-
import { ActionsLayout as V } from "
|
|
13
|
-
import { ComboBoxField as B } from "
|
|
14
|
-
import { Form as H } from "
|
|
15
|
-
import { useComponentContext as K } from "
|
|
16
|
-
import { useI18n as M } from "
|
|
17
|
-
import { SelectField as G } from "
|
|
18
|
-
import { RadioGroupField as U } from "
|
|
19
|
-
import { TextInputField as W } from "
|
|
20
|
-
import { DatePickerField as J } from "
|
|
11
|
+
import "../../../../../../shared/constants.js";
|
|
12
|
+
import { ActionsLayout as V } from "../../../../../Common/ActionsLayout/ActionsLayout.js";
|
|
13
|
+
import { ComboBoxField as B } from "../../../../../Common/Fields/ComboBoxField/ComboBoxField.js";
|
|
14
|
+
import { Form as H } from "../../../../../Common/Form/Form.js";
|
|
15
|
+
import { useComponentContext as K } from "../../../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
16
|
+
import { useI18n as M } from "../../../../../../i18n/I18n.js";
|
|
17
|
+
import { SelectField as G } from "../../../../../Common/Fields/SelectField/SelectField.js";
|
|
18
|
+
import { RadioGroupField as U } from "../../../../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
19
|
+
import { TextInputField as W } from "../../../../../Common/Fields/TextInputField/TextInputField.js";
|
|
20
|
+
import { DatePickerField as J } from "../../../../../Common/Fields/DatePickerField/DatePickerField.js";
|
|
21
21
|
const Q = {
|
|
22
22
|
citizen: "statusDescriptions.citizen",
|
|
23
23
|
permanent_resident: "statusDescriptions.permanent_resident",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmploymentEligibilityPresentation.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useTranslation, Trans } from 'react-i18next'\nimport { FormProvider, useForm, useWatch, type SubmitHandler } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport {\n AuthorizationStatus,\n DocumentType as I9AuthorizationDocumentType,\n} from '@gusto/embedded-api/models/components/i9authorization'\nimport {\n generateEmploymentEligibilitySchema,\n type EmploymentEligibilityInputs,\n type EmploymentEligibilityPayload,\n} from './EmploymentEligibilitySchema'\nimport { COUNTRIES } from './countries'\nimport {\n Flex,\n SelectField,\n RadioGroupField,\n TextInputField,\n DatePickerField,\n ActionsLayout,\n} from '@/components/Common'\nimport { ComboBoxField } from '@/components/Common/Fields/ComboBoxField/ComboBoxField'\nimport { Form } from '@/components/Common/Form'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\n\ninterface EmploymentEligibilityPresentationProps {\n onSubmit: SubmitHandler<EmploymentEligibilityPayload>\n defaultValues?: Partial<EmploymentEligibilityInputs>\n hasDocumentNumber?: boolean | null\n isPending?: boolean\n}\n\nconst statusDescriptionKeys = {\n citizen: 'statusDescriptions.citizen',\n permanent_resident: 'statusDescriptions.permanent_resident',\n noncitizen: 'statusDescriptions.noncitizen',\n alien: 'statusDescriptions.alien',\n} as const satisfies Record<AuthorizationStatus, string>\n\nexport const EmploymentEligibilityPresentation = ({\n onSubmit,\n defaultValues,\n hasDocumentNumber,\n isPending,\n}: EmploymentEligibilityPresentationProps) => {\n useI18n('Employee.EmploymentEligibility')\n const { Heading, Text, Alert, Button, Link } = useComponentContext()\n const { t } = useTranslation('Employee.EmploymentEligibility')\n\n const [hasExistingDocumentNumber, setHasExistingDocumentNumber] = useState(!!hasDocumentNumber)\n\n const formMethods = useForm<EmploymentEligibilityInputs, unknown, EmploymentEligibilityPayload>({\n resolver: zodResolver(generateEmploymentEligibilitySchema(hasExistingDocumentNumber)),\n defaultValues,\n })\n\n const { control, setValue, clearErrors } = formMethods\n const authorizationStatus = useWatch({ control, name: 'authorizationStatus' })\n const documentType = useWatch({ control, name: 'documentType' })\n\n const statusOptions = Object.values(AuthorizationStatus).map(value => ({\n value,\n label: t(`select.options.${value}`),\n }))\n\n const authorizationDocumentOptions = Object.values(I9AuthorizationDocumentType).map(value => ({\n value,\n label: t(`authorizationDocument.options.${value}`),\n }))\n\n const handleAuthorizationStatusChange = () => {\n setValue('documentNumber', '')\n clearErrors('documentNumber')\n setHasExistingDocumentNumber(false)\n }\n\n const handleDocumentTypeChange = () => {\n setValue('documentNumber', '')\n clearErrors('documentNumber')\n setHasExistingDocumentNumber(false)\n }\n\n const showDocumentTypeRadio = authorizationStatus === 'alien'\n const showDocumentNumberInput =\n authorizationStatus === 'permanent_resident' ||\n (authorizationStatus === 'alien' && !!documentType)\n const activeDocumentType =\n authorizationStatus === 'permanent_resident' ? 'uscis_alien_registration_number' : documentType\n\n const documentNumberMaxLength: Partial<Record<I9AuthorizationDocumentType, number>> = {\n uscis_alien_registration_number: 9,\n form_i94: 11,\n }\n\n return (\n <FormProvider {...formMethods}>\n <Form onSubmit={formMethods.handleSubmit(onSubmit)}>\n <Flex flexDirection=\"column\" gap={16}>\n <Flex flexDirection=\"column\" gap={2}>\n <Heading as=\"h2\">{t('title')}</Heading>\n <Text variant=\"supporting\">\n <Trans\n i18nKey={'subtitle'}\n t={t}\n components={{\n formI9Link: <Link />,\n }}\n />\n </Text>\n </Flex>\n\n <SelectField\n name=\"authorizationStatus\"\n label={t('select.label')}\n description={t('select.description')}\n placeholder={t('select.placeholder')}\n options={statusOptions}\n isRequired\n onChange={handleAuthorizationStatusChange}\n />\n\n {authorizationStatus && (\n <Alert\n status=\"info\"\n label={t(statusDescriptionKeys[authorizationStatus])}\n disableScrollIntoView\n />\n )}\n\n {authorizationStatus === 'alien' && (\n <DatePickerField name=\"expirationDate\" label={t('expirationDate.label')} />\n )}\n\n {showDocumentTypeRadio && (\n <RadioGroupField\n name=\"documentType\"\n label={t('authorizationDocument.label')}\n options={authorizationDocumentOptions}\n isRequired\n onChange={handleDocumentTypeChange}\n />\n )}\n\n {showDocumentNumberInput && activeDocumentType && (\n <TextInputField\n name=\"documentNumber\"\n label={t(`documentNumber.${activeDocumentType}.label`)}\n description={\n activeDocumentType !== 'foreign_passport'\n ? t(`documentNumber.${activeDocumentType}.description`)\n : undefined\n }\n placeholder={\n hasExistingDocumentNumber\n ? t(`documentNumber.${activeDocumentType}.placeholder`)\n : undefined\n }\n maxLength={documentNumberMaxLength[activeDocumentType]}\n isRequired\n />\n )}\n\n {documentType === 'foreign_passport' && authorizationStatus === 'alien' && (\n <ComboBoxField\n name=\"country\"\n label={t('country.label')}\n description={t('country.description')}\n options={COUNTRIES}\n placeholder={t('country.placeholder')}\n allowsCustomValue\n isRequired\n />\n )}\n\n <ActionsLayout>\n <Button type=\"submit\" isLoading={isPending}>\n {t('submit')}\n </Button>\n </ActionsLayout>\n </Flex>\n </Form>\n </FormProvider>\n )\n}\n"],"names":["statusDescriptionKeys","EmploymentEligibilityPresentation","onSubmit","defaultValues","hasDocumentNumber","isPending","useI18n","Heading","Text","Alert","Button","Link","useComponentContext","t","useTranslation","hasExistingDocumentNumber","setHasExistingDocumentNumber","useState","formMethods","useForm","zodResolver","generateEmploymentEligibilitySchema","control","setValue","clearErrors","authorizationStatus","useWatch","documentType","statusOptions","AuthorizationStatus","value","authorizationDocumentOptions","I9AuthorizationDocumentType","handleAuthorizationStatusChange","handleDocumentTypeChange","showDocumentTypeRadio","showDocumentNumberInput","activeDocumentType","documentNumberMaxLength","FormProvider","jsx","Form","jsxs","Flex","Trans","SelectField","DatePickerField","RadioGroupField","TextInputField","ComboBoxField","COUNTRIES","ActionsLayout"],"mappings":";;;;;;;;;;;;;;;;;;;;AAkCA,MAAMA,IAAwB;AAAA,EAC5B,SAAS;AAAA,EACT,oBAAoB;AAAA,EACpB,YAAY;AAAA,EACZ,OAAO;AACT,GAEaC,KAAoC,CAAC;AAAA,EAChD,UAAAC;AAAA,EACA,eAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,WAAAC;AACF,MAA8C;AAC5C,EAAAC,EAAQ,gCAAgC;AACxC,QAAM,EAAE,SAAAC,GAAS,MAAAC,GAAM,OAAAC,GAAO,QAAAC,GAAQ,MAAAC,EAAA,IAASC,EAAA,GACzC,EAAE,GAAAC,EAAA,IAAMC,EAAe,gCAAgC,GAEvD,CAACC,GAA2BC,CAA4B,IAAIC,EAAS,CAAC,CAACb,CAAiB,GAExFc,IAAcC,EAA4E;AAAA,IAC9F,UAAUC,EAAYC,EAAoCN,CAAyB,CAAC;AAAA,IACpF,eAAAZ;AAAA,EAAA,CACD,GAEK,EAAE,SAAAmB,GAAS,UAAAC,GAAU,aAAAC,EAAA,IAAgBN,GACrCO,IAAsBC,EAAS,EAAE,SAAAJ,GAAS,MAAM,uBAAuB,GACvEK,IAAeD,EAAS,EAAE,SAAAJ,GAAS,MAAM,gBAAgB,GAEzDM,IAAgB,OAAO,OAAOC,CAAmB,EAAE,IAAI,CAAAC,OAAU;AAAA,IACrE,OAAAA;AAAA,IACA,OAAOjB,EAAE,kBAAkBiB,CAAK,EAAE;AAAA,EAAA,EAClC,GAEIC,IAA+B,OAAO,OAAOC,CAA2B,EAAE,IAAI,CAAAF,OAAU;AAAA,IAC5F,OAAAA;AAAA,IACA,OAAOjB,EAAE,iCAAiCiB,CAAK,EAAE;AAAA,EAAA,EACjD,GAEIG,IAAkC,MAAM;AAC5C,IAAAV,EAAS,kBAAkB,EAAE,GAC7BC,EAAY,gBAAgB,GAC5BR,EAA6B,EAAK;AAAA,EACpC,GAEMkB,IAA2B,MAAM;AACrC,IAAAX,EAAS,kBAAkB,EAAE,GAC7BC,EAAY,gBAAgB,GAC5BR,EAA6B,EAAK;AAAA,EACpC,GAEMmB,IAAwBV,MAAwB,SAChDW,IACJX,MAAwB,wBACvBA,MAAwB,WAAW,CAAC,CAACE,GAClCU,IACJZ,MAAwB,uBAAuB,oCAAoCE,GAE/EW,IAAgF;AAAA,IACpF,iCAAiC;AAAA,IACjC,UAAU;AAAA,EAAA;AAGZ,2BACGC,GAAA,EAAc,GAAGrB,GAChB,UAAA,gBAAAsB,EAACC,KAAK,UAAUvB,EAAY,aAAahB,CAAQ,GAC/C,UAAA,gBAAAwC,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAD,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,MAAA,gBAAAH,EAACjC,GAAA,EAAQ,IAAG,MAAM,UAAAM,EAAE,OAAO,GAAE;AAAA,MAC7B,gBAAA2B,EAAChC,GAAA,EAAK,SAAQ,cACZ,UAAA,gBAAAgC;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,SAAS;AAAA,UACT,GAAA/B;AAAA,UACA,YAAY;AAAA,YACV,8BAAaF,GAAA,CAAA,CAAK;AAAA,UAAA;AAAA,QACpB;AAAA,MAAA,EACF,CACF;AAAA,IAAA,GACF;AAAA,IAEA,gBAAA6B;AAAA,MAACK;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOhC,EAAE,cAAc;AAAA,QACvB,aAAaA,EAAE,oBAAoB;AAAA,QACnC,aAAaA,EAAE,oBAAoB;AAAA,QACnC,SAASe;AAAA,QACT,YAAU;AAAA,QACV,UAAUK;AAAA,MAAA;AAAA,IAAA;AAAA,IAGXR,KACC,gBAAAe;AAAA,MAAC/B;AAAA,MAAA;AAAA,QACC,QAAO;AAAA,QACP,OAAOI,EAAEb,EAAsByB,CAAmB,CAAC;AAAA,QACnD,uBAAqB;AAAA,MAAA;AAAA,IAAA;AAAA,IAIxBA,MAAwB,WACvB,gBAAAe,EAACM,GAAA,EAAgB,MAAK,kBAAiB,OAAOjC,EAAE,sBAAsB,GAAG;AAAA,IAG1EsB,KACC,gBAAAK;AAAA,MAACO;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOlC,EAAE,6BAA6B;AAAA,QACtC,SAASkB;AAAA,QACT,YAAU;AAAA,QACV,UAAUG;AAAA,MAAA;AAAA,IAAA;AAAA,IAIbE,KAA2BC,KAC1B,gBAAAG;AAAA,MAACQ;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOnC,EAAE,kBAAkBwB,CAAkB,QAAQ;AAAA,QACrD,aACEA,MAAuB,qBACnBxB,EAAE,kBAAkBwB,CAAkB,cAAc,IACpD;AAAA,QAEN,aACEtB,IACIF,EAAE,kBAAkBwB,CAAkB,cAAc,IACpD;AAAA,QAEN,WAAWC,EAAwBD,CAAkB;AAAA,QACrD,YAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAIbV,MAAiB,sBAAsBF,MAAwB,WAC9D,gBAAAe;AAAA,MAACS;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOpC,EAAE,eAAe;AAAA,QACxB,aAAaA,EAAE,qBAAqB;AAAA,QACpC,SAASqC;AAAA,QACT,aAAarC,EAAE,qBAAqB;AAAA,QACpC,mBAAiB;AAAA,QACjB,YAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAId,gBAAA2B,EAACW,GAAA,EACC,UAAA,gBAAAX,EAAC9B,GAAA,EAAO,MAAK,UAAS,WAAWL,GAC9B,UAAAQ,EAAE,QAAQ,EAAA,CACb,EAAA,CACF;AAAA,EAAA,EAAA,CACF,GACF,GACF;AAEJ;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmploymentEligibilitySchema.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.ts"],"sourcesContent":["import { z } from 'zod'\nimport {\n AuthorizationStatus,\n DocumentType as I9AuthorizationDocumentType,\n} from '@gusto/embedded-api/models/components/i9authorization'\n\nconst isValidUscisNumber = (value: string) => /^[Aa]?\\d{7,9}$/.test(value)\nconst isValidI94Number = (value: string) => /^\\d{9} ?[A-Za-z\\d]\\d$/.test(value)\n\nexport const generateEmploymentEligibilitySchema = (hasDocumentNumber?: boolean | null) =>\n z\n .object({\n authorizationStatus: z.enum(AuthorizationStatus).optional(),\n documentType: z.enum(I9AuthorizationDocumentType).optional(),\n documentNumber: z.string().optional(),\n expirationDate: z\n .date()\n .transform(date => date.toISOString().split('T')[0])\n .optional(),\n country: z.string().optional(),\n })\n .superRefine((data, ctx) => {\n if (!data.authorizationStatus) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Authorization status is required',\n path: ['authorizationStatus'],\n })\n return\n }\n if (data.authorizationStatus === 'permanent_resident') {\n if (!data.documentNumber) {\n if (!hasDocumentNumber) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Document number is required',\n path: ['documentNumber'],\n })\n }\n } else if (!isValidUscisNumber(data.documentNumber)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Enter a 7-9 digit USCIS number or A-Number (e.g. A123456789)',\n path: ['documentNumber'],\n })\n }\n }\n if (data.authorizationStatus === 'alien') {\n if (!data.documentType) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Authorization document is required',\n path: ['documentType'],\n })\n }\n if (!data.documentNumber) {\n if (!hasDocumentNumber) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Document number is required',\n path: ['documentNumber'],\n })\n }\n } else if (\n data.documentType === 'uscis_alien_registration_number' &&\n !isValidUscisNumber(data.documentNumber)\n ) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Enter a 7-9 digit USCIS number or A-Number (e.g. A123456789)',\n path: ['documentNumber'],\n })\n } else if (data.documentType === 'form_i94' && !isValidI94Number(data.documentNumber)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Enter a valid 11-character Form I-94 admission number',\n path: ['documentNumber'],\n })\n }\n if (data.documentType === 'foreign_passport' && !data.country) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Country of issuance is required',\n path: ['country'],\n })\n }\n }\n })\n\nexport type EmploymentEligibilityInputs = z.input<\n ReturnType<typeof generateEmploymentEligibilitySchema>\n>\nexport type EmploymentEligibilityPayload = z.infer<\n ReturnType<typeof generateEmploymentEligibilitySchema>\n>\n"],"names":["isValidUscisNumber","value","isValidI94Number","generateEmploymentEligibilitySchema","hasDocumentNumber","z","AuthorizationStatus","I9AuthorizationDocumentType","date","data","ctx"],"mappings":";;AAMA,MAAMA,IAAqB,CAACC,MAAkB,iBAAiB,KAAKA,CAAK,GACnEC,IAAmB,CAACD,MAAkB,wBAAwB,KAAKA,CAAK,GAEjEE,IAAsC,CAACC,MAClDC,EACG,OAAO;AAAA,EACN,qBAAqBA,EAAE,KAAKC,CAAmB,EAAE,SAAA;AAAA,EACjD,cAAcD,EAAE,KAAKE,CAA2B,EAAE,SAAA;AAAA,EAClD,gBAAgBF,EAAE,OAAA,EAAS,SAAA;AAAA,EAC3B,gBAAgBA,EACb,KAAA,EACA,UAAU,CAAAG,MAAQA,EAAK,YAAA,EAAc,MAAM,GAAG,EAAE,CAAC,CAAC,EAClD,SAAA;AAAA,EACH,SAASH,EAAE,OAAA,EAAS,SAAA;AACtB,CAAC,EACA,YAAY,CAACI,GAAMC,MAAQ;AAC1B,MAAI,CAACD,EAAK,qBAAqB;AAC7B,IAAAC,EAAI,SAAS;AAAA,MACX,MAAML,EAAE,aAAa;AAAA,MACrB,SAAS;AAAA,MACT,MAAM,CAAC,qBAAqB;AAAA,IAAA,CAC7B;AACD;AAAA,EACF;AACA,EAAII,EAAK,wBAAwB,yBAC1BA,EAAK,iBAQET,EAAmBS,EAAK,cAAc,KAChDC,EAAI,SAAS;AAAA,IACX,MAAML,EAAE,aAAa;AAAA,IACrB,SAAS;AAAA,IACT,MAAM,CAAC,gBAAgB;AAAA,EAAA,CACxB,IAZID,KACHM,EAAI,SAAS;AAAA,IACX,MAAML,EAAE,aAAa;AAAA,IACrB,SAAS;AAAA,IACT,MAAM,CAAC,gBAAgB;AAAA,EAAA,CACxB,IAUHI,EAAK,wBAAwB,YAC1BA,EAAK,gBACRC,EAAI,SAAS;AAAA,IACX,MAAML,EAAE,aAAa;AAAA,IACrB,SAAS;AAAA,IACT,MAAM,CAAC,cAAc;AAAA,EAAA,CACtB,GAEEI,EAAK,iBASRA,EAAK,iBAAiB,qCACtB,CAACT,EAAmBS,EAAK,cAAc,IAEvCC,EAAI,SAAS;AAAA,IACX,MAAML,EAAE,aAAa;AAAA,IACrB,SAAS;AAAA,IACT,MAAM,CAAC,gBAAgB;AAAA,EAAA,CACxB,IACQI,EAAK,iBAAiB,cAAc,CAACP,EAAiBO,EAAK,cAAc,KAClFC,EAAI,SAAS;AAAA,IACX,MAAML,EAAE,aAAa;AAAA,IACrB,SAAS;AAAA,IACT,MAAM,CAAC,gBAAgB;AAAA,EAAA,CACxB,IArBID,KACHM,EAAI,SAAS;AAAA,IACX,MAAML,EAAE,aAAa;AAAA,IACrB,SAAS;AAAA,IACT,MAAM,CAAC,gBAAgB;AAAA,EAAA,CACxB,GAkBDI,EAAK,iBAAiB,sBAAsB,CAACA,EAAK,WACpDC,EAAI,SAAS;AAAA,IACX,MAAML,EAAE,aAAa;AAAA,IACrB,SAAS;AAAA,IACT,MAAM,CAAC,SAAS;AAAA,EAAA,CACjB;AAGP,CAAC;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|