@gusto/embedded-react-sdk 0.39.0 → 0.41.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 +127 -0
- package/dist/components/Base/Base.js +3 -2
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Common/Fields/hooks/useField.js.map +1 -1
- package/dist/components/Common/Form/Form.d.ts +1 -1
- package/dist/components/Common/Form/Form.js +15 -5
- package/dist/components/Common/Form/Form.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.js +6 -4
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +11 -9
- package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +12 -10
- package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.module.scss.js +12 -12
- package/dist/components/Common/UI/Box/Box.module.scss.js +4 -4
- package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +8 -6
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +3 -2
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +3 -2
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +7 -6
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +14 -13
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +3 -2
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +6 -5
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +10 -9
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -3
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +3 -2
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -5
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +3 -2
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +8 -7
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -3
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +9 -8
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +8 -7
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +5 -4
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +3 -2
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +10 -8
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -3
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +80 -61
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/{UNSTABLE_Hooks/hooks → Company/DocumentSigner/shared}/useSignCompanyForm/fields.d.ts +3 -3
- package/dist/components/{UNSTABLE_Hooks/hooks → Company/DocumentSigner/shared}/useSignCompanyForm/fields.js +2 -2
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js.map +1 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Company/DocumentSigner/shared}/useSignCompanyForm/index.d.ts +1 -3
- package/dist/components/{UNSTABLE_Hooks/hooks → Company/DocumentSigner/shared}/useSignCompanyForm/signCompanyFormSchema.d.ts +2 -2
- package/dist/components/{UNSTABLE_Hooks/hooks → Company/DocumentSigner/shared}/useSignCompanyForm/signCompanyFormSchema.js +1 -1
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/signCompanyFormSchema.js.map +1 -0
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.d.ts +33 -0
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js +106 -0
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js.map +1 -0
- package/dist/components/Company/FederalTaxes/Actions.js +6 -5
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +9 -7
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +3 -2
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +6 -5
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +3 -2
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +7 -6
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +5 -4
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +7 -6
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +5 -4
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +4 -2
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -3
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +7 -6
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +7 -6
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +8 -6
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -3
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.d.ts +1 -1
- package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +6 -5
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +6 -5
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +4 -2
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +4 -3
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.d.ts +6 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +31 -148
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleComponents.d.ts +10 -0
- package/dist/components/Company/PaySchedule/PayScheduleComponents.js +26 -0
- package/dist/components/Company/PaySchedule/PayScheduleComponents.js.map +1 -0
- package/dist/components/Company/PaySchedule/PayScheduleForm.d.ts +8 -0
- package/dist/components/Company/PaySchedule/PayScheduleForm.js +199 -0
- package/dist/components/Company/PaySchedule/PayScheduleForm.js.map +1 -0
- package/dist/components/Company/PaySchedule/PayScheduleList.d.ts +8 -0
- package/dist/components/Company/PaySchedule/PayScheduleList.js +103 -0
- package/dist/components/Company/PaySchedule/PayScheduleList.js.map +1 -0
- package/dist/components/Company/PaySchedule/{_parts/List.module.scss.js → PayScheduleList.module.scss.js} +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleList.module.scss.js.map +1 -0
- package/dist/components/Company/PaySchedule/payScheduleStateMachine.d.ts +6 -0
- package/dist/components/Company/PaySchedule/payScheduleStateMachine.js +49 -0
- package/dist/components/Company/PaySchedule/payScheduleStateMachine.js.map +1 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Company/PaySchedule/shared}/usePayScheduleForm/fields.d.ts +6 -6
- package/dist/components/{UNSTABLE_Hooks/hooks → Company/PaySchedule/shared}/usePayScheduleForm/fields.js +5 -5
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js.map +1 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Company/PaySchedule/shared}/usePayScheduleForm/index.d.ts +0 -2
- package/dist/components/{UNSTABLE_Hooks/hooks → Company/PaySchedule/shared}/usePayScheduleForm/payScheduleSchema.d.ts +2 -2
- package/dist/components/{UNSTABLE_Hooks/hooks → Company/PaySchedule/shared}/usePayScheduleForm/payScheduleSchema.js +2 -2
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.js.map +1 -0
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.d.ts +33 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Company/PaySchedule/shared}/usePayScheduleForm/usePayScheduleForm.js +30 -26
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js.map +1 -0
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +3 -2
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +3 -2
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +6 -5
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Company/exports/companyOnboarding.d.ts +14 -0
- package/dist/components/Company/exports/companyOnboarding.js +31 -0
- package/dist/components/Company/exports/companyOnboarding.js.map +1 -0
- package/dist/components/Contractor/Address/Address.js +4 -2
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +3 -2
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +6 -5
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +3 -2
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +3 -2
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +5 -4
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +3 -2
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +3 -2
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +3 -2
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +3 -2
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +3 -2
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +3 -2
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +3 -2
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +14 -13
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +3 -2
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +3 -2
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
- package/dist/components/Contractor/Profile/useContractorProfile.js +3 -2
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +74 -50
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Contractor/exports/contractorOnboarding.d.ts +7 -0
- package/dist/components/Contractor/exports/contractorOnboarding.js +17 -0
- package/dist/components/Contractor/exports/contractorOnboarding.js.map +1 -0
- package/dist/components/Employee/Compensation/Actions.js +5 -4
- package/dist/components/Employee/Compensation/Actions.js.map +1 -1
- package/dist/components/Employee/Compensation/Edit.js +23 -22
- package/dist/components/Employee/Compensation/Edit.js.map +1 -1
- package/dist/components/Employee/Compensation/List.js +23 -22
- package/dist/components/Employee/Compensation/List.js.map +1 -1
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Compensation/shared}/useCompensationForm/compensationSchema.d.ts +2 -2
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Compensation/shared}/useCompensationForm/compensationSchema.js +4 -4
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js.map +1 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Compensation/shared}/useCompensationForm/fields.d.ts +8 -8
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Compensation/shared}/useCompensationForm/fields.js +6 -6
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js.map +1 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Compensation/shared}/useCompensationForm/index.d.ts +0 -2
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.d.ts +43 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Compensation/shared}/useCompensationForm/useCompensationForm.js +28 -24
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -0
- package/dist/components/Employee/Dashboard/Dashboard.js +79 -79
- package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
- package/dist/components/Employee/Dashboard/DocumentsView.js +2 -5
- package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -1
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.d.ts +8 -11
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js +8 -8
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js.map +1 -1
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.d.ts +10 -12
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js +11 -11
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js.map +1 -1
- package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.d.ts +6 -9
- package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js +10 -10
- package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js.map +1 -1
- package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.d.ts +7 -10
- package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js +8 -8
- package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +3 -2
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +3 -2
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +3 -2
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +7 -6
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +3 -2
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +7 -6
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +11 -9
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +3 -2
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -3
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +23 -22
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +3 -2
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +13 -11
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/DocumentSigner/shared}/useSignEmployeeForm/fields.d.ts +5 -5
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/DocumentSigner/shared}/useSignEmployeeForm/fields.js +4 -4
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/fields.js.map +1 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/DocumentSigner/shared}/useSignEmployeeForm/index.d.ts +0 -4
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/DocumentSigner/shared}/useSignEmployeeForm/signEmployeeFormSchema.d.ts +1 -1
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/DocumentSigner/shared}/useSignEmployeeForm/signEmployeeFormSchema.js +1 -1
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +1 -0
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.d.ts +47 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/DocumentSigner/shared}/useSignEmployeeForm/useSignEmployeeForm.js +66 -59
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -0
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +3 -2
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/Actions.js +7 -6
- package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.js +5 -4
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +4 -3
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +7 -6
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Actions.js +6 -5
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -4
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +3 -2
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +7 -6
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +3 -2
- package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -5
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/AdminProfile.d.ts +2 -0
- package/dist/components/Employee/Profile/AdminProfile.js +358 -0
- package/dist/components/Employee/Profile/AdminProfile.js.map +1 -0
- package/dist/components/Employee/Profile/AdminProfile.module.scss.js +10 -0
- package/dist/components/Employee/Profile/AdminProfile.module.scss.js.map +1 -0
- package/dist/components/Employee/Profile/EmployeeProfile.d.ts +2 -0
- package/dist/components/Employee/Profile/EmployeeProfile.js +211 -0
- package/dist/components/Employee/Profile/EmployeeProfile.js.map +1 -0
- package/dist/components/Employee/Profile/EmployeeProfile.module.scss.js +10 -0
- package/dist/components/Employee/Profile/EmployeeProfile.module.scss.js.map +1 -0
- package/dist/components/Employee/Profile/Profile.d.ts +3 -3
- package/dist/components/Employee/Profile/Profile.js +25 -261
- package/dist/components/Employee/Profile/Profile.js.map +1 -1
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/employeeDetailsSchema.d.ts +2 -2
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/employeeDetailsSchema.js +2 -2
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/employeeDetailsSchema.js.map +1 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/fields.d.ts +4 -4
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/fields.js +5 -5
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js.map +1 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/index.d.ts +0 -2
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/useEmployeeDetailsForm.d.ts +15 -33
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/useEmployeeDetailsForm.js +31 -27
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.d.ts +22 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js +36 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js.map +1 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.d.ts +41 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.js +32 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.js.map +1 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/index.d.ts +5 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.d.ts +44 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js +161 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js.map +1 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/fields.d.ts +3 -3
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/fields.js +2 -2
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js.map +1 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/index.d.ts +0 -2
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/useWorkAddressForm.d.ts +11 -32
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/useWorkAddressForm.js +34 -30
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js.map +1 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/workAddressSchema.d.ts +3 -5
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/workAddressSchema.js +7 -9
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/workAddressSchema.js.map +1 -0
- package/dist/components/Employee/StateTaxes/Actions.js +8 -7
- package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +4 -3
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
- package/dist/components/Employee/Taxes/Actions.js +9 -8
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +5 -4
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +4 -3
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js +5 -5
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +13 -12
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js +9 -8
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js +3 -2
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js.map +1 -1
- package/dist/components/Employee/{EmployeeList → employee-list/management}/ManagementEmployeeList.d.ts +1 -1
- package/dist/components/Employee/{EmployeeList → employee-list/management}/ManagementEmployeeList.js +7 -7
- package/dist/components/Employee/employee-list/management/ManagementEmployeeList.js.map +1 -0
- package/dist/components/Employee/{EmployeeList → employee-list/management}/ManagementEmployeeListView.d.ts +1 -1
- package/dist/components/Employee/{EmployeeList → employee-list/management}/ManagementEmployeeListView.js +15 -14
- package/dist/components/Employee/employee-list/management/ManagementEmployeeListView.js.map +1 -0
- package/dist/components/Employee/{EmployeeList → employee-list/onboarding}/EmployeeList.d.ts +1 -1
- package/dist/components/Employee/{EmployeeList → employee-list/onboarding}/EmployeeList.js +7 -7
- package/dist/components/Employee/employee-list/onboarding/EmployeeList.js.map +1 -0
- package/dist/components/Employee/{EmployeeList → employee-list/onboarding}/EmployeeListView.d.ts +1 -1
- package/dist/components/Employee/employee-list/onboarding/EmployeeListView.js +131 -0
- package/dist/components/Employee/employee-list/onboarding/EmployeeListView.js.map +1 -0
- package/dist/components/Employee/employee-list/shared/index.d.ts +2 -0
- package/dist/components/Employee/{EmployeeList → employee-list/shared}/useEmployeeList.d.ts +8 -10
- package/dist/components/Employee/{EmployeeList → employee-list/shared}/useEmployeeList.js +32 -28
- package/dist/components/Employee/employee-list/shared/useEmployeeList.js.map +1 -0
- package/dist/components/Employee/exports/employeeManagement.d.ts +6 -0
- package/dist/components/Employee/exports/employeeManagement.js +15 -0
- package/dist/components/Employee/exports/employeeManagement.js.map +1 -0
- package/dist/components/Employee/exports/employeeOnboarding.d.ts +14 -0
- package/dist/components/Employee/exports/employeeOnboarding.js +31 -0
- package/dist/components/Employee/exports/employeeOnboarding.js.map +1 -0
- package/dist/components/Employee/index.d.ts +1 -2
- package/dist/components/Employee/index.js +35 -37
- package/dist/components/Employee/index.js.map +1 -1
- package/dist/components/Flow/Flow.js +12 -11
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +18 -17
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +8 -7
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequests.js +3 -2
- package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +11 -10
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js +9 -8
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +3 -2
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +19 -18
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +2 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +7 -6
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +3 -2
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +8 -7
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js +17 -17
- package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +3 -2
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +3 -2
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +5 -4
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +3 -2
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +13 -12
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +30 -29
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +3 -2
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +3 -2
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +106 -108
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +3 -2
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +1 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +3 -2
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +13 -12
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +10 -9
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js +13 -12
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.d.ts +1 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js +96 -62
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.d.ts +1 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js +48 -45
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListTypes.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.module.scss.js +18 -0
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.module.scss.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettingsPresentation.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettingsPresentation.js +166 -0
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettingsPresentation.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettingsTypes.d.ts +18 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +3 -2
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js +24 -22
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +3 -2
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/index.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/index.js +24 -22
- package/dist/components/UNSTABLE_TimeOff/index.js.map +1 -1
- package/dist/components/index.d.ts +7 -0
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +11 -10
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/ObservabilityProvider/useObservability.js +6 -6
- package/dist/contexts/ObservabilityProvider/useObservability.js.map +1 -1
- package/dist/i18n/I18n.js +9 -9
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.PaySchedule.json.js +15 -13
- package/dist/i18n/en/Company.PaySchedule.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js +1 -1
- package/dist/i18n/en/Contractor.Submit.json.js +16 -12
- package/dist/i18n/en/Contractor.Submit.json.js.map +1 -1
- package/dist/i18n/en/common.json.d.ts +1 -0
- package/dist/i18n/en/common.json.js +1 -1
- package/dist/index.d.ts +16 -0
- package/dist/index.js +102 -26
- package/dist/index.js.map +1 -1
- package/dist/partner-hook-utils/collectErrors.js.map +1 -0
- package/dist/partner-hook-utils/composeErrorHandler.d.ts +24 -0
- package/dist/partner-hook-utils/composeErrorHandler.js +30 -0
- package/dist/partner-hook-utils/composeErrorHandler.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/FormFieldsMetadataContext.d.ts +2 -2
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/FormFieldsMetadataContext.js +3 -3
- package/dist/partner-hook-utils/form/FormFieldsMetadataContext.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/FormFieldsMetadataProvider.d.ts +2 -2
- package/dist/partner-hook-utils/form/FormFieldsMetadataProvider.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/SDKFormProvider.d.ts +2 -2
- package/dist/partner-hook-utils/form/SDKFormProvider.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/buildFormSchema.d.ts +1 -1
- package/dist/partner-hook-utils/form/buildFormSchema.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/composeSubmitHandler.d.ts +29 -3
- package/dist/partner-hook-utils/form/composeSubmitHandler.js +40 -0
- package/dist/partner-hook-utils/form/composeSubmitHandler.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/CheckboxHookField.d.ts +3 -3
- package/dist/partner-hook-utils/form/fields/CheckboxHookField.js +37 -0
- package/dist/partner-hook-utils/form/fields/CheckboxHookField.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/DatePickerHookField.d.ts +3 -3
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/DatePickerHookField.js +1 -1
- package/dist/partner-hook-utils/form/fields/DatePickerHookField.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/NumberInputHookField.d.ts +3 -3
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js +43 -0
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/RadioGroupHookField.d.ts +3 -3
- package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js +43 -0
- package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/SelectHookField.d.ts +3 -3
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/SelectHookField.js +18 -16
- package/dist/partner-hook-utils/form/fields/SelectHookField.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/SwitchHookField.d.ts +3 -3
- package/dist/partner-hook-utils/form/fields/SwitchHookField.js +37 -0
- package/dist/partner-hook-utils/form/fields/SwitchHookField.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/TextInputHookField.d.ts +3 -3
- package/dist/partner-hook-utils/form/fields/TextInputHookField.js +41 -0
- package/dist/partner-hook-utils/form/fields/TextInputHookField.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/index.d.ts +7 -7
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/getFieldWithOptions.d.ts +1 -1
- package/dist/partner-hook-utils/form/getFieldWithOptions.js.map +1 -0
- package/dist/partner-hook-utils/form/getFormSubmissionValues.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/index.d.ts +2 -2
- package/dist/partner-hook-utils/form/preprocessors.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/resolveFieldError.d.ts +2 -2
- package/dist/partner-hook-utils/form/resolveFieldError.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/useDeriveFieldsMetadata.d.ts +1 -1
- package/dist/partner-hook-utils/form/useDeriveFieldsMetadata.js +21 -0
- package/dist/partner-hook-utils/form/useDeriveFieldsMetadata.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/useFieldErrorMessage.d.ts +1 -1
- package/dist/partner-hook-utils/form/useFieldErrorMessage.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/useHookFieldResolution.d.ts +2 -2
- package/dist/partner-hook-utils/form/useHookFieldResolution.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/withOptions.d.ts +1 -1
- package/dist/partner-hook-utils/form/withOptions.js.map +1 -0
- package/dist/partner-hook-utils/index.d.ts +5 -0
- package/dist/{types/sdkHooks.d.ts → partner-hook-utils/types.d.ts} +37 -9
- package/dist/shared/constants.d.ts +1 -1
- package/dist/shared/constants.js +15 -16
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +24 -252
- package/dist/types/sdkError.js.map +1 -1
- package/docs/reference/endpoint-inventory.json +531 -170
- package/package.json +15 -19
- package/dist/UNSTABLE_Hooks.d.ts +0 -1
- package/dist/UNSTABLE_Hooks.js +0 -71
- package/dist/UNSTABLE_Hooks.js.map +0 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/Actions.d.ts +0 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/Actions.js +0 -20
- package/dist/components/Company/DocumentSigner/SignatureForm/Actions.js.map +0 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/Form.d.ts +0 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/Form.js +0 -20
- package/dist/components/Company/DocumentSigner/SignatureForm/Form.js.map +0 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/Head.d.ts +0 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/Head.js +0 -35
- package/dist/components/Company/DocumentSigner/SignatureForm/Head.js.map +0 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/Preview.d.ts +0 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/Preview.js +0 -20
- package/dist/components/Company/DocumentSigner/SignatureForm/Preview.js.map +0 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.d.ts +0 -9
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +0 -22
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +0 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.d.ts +0 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +0 -63
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +0 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.d.ts +0 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +0 -134
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +0 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.module.scss.js +0 -14
- package/dist/components/Company/PaySchedule/_parts/Edit.module.scss.js.map +0 -1
- package/dist/components/Company/PaySchedule/_parts/Head.d.ts +0 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +0 -47
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +0 -1
- package/dist/components/Company/PaySchedule/_parts/List.d.ts +0 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +0 -57
- package/dist/components/Company/PaySchedule/_parts/List.js.map +0 -1
- package/dist/components/Company/PaySchedule/_parts/List.module.scss.js.map +0 -1
- package/dist/components/Company/PaySchedule/_parts/index.d.ts +0 -5
- package/dist/components/Company/PaySchedule/usePaySchedule.d.ts +0 -39
- package/dist/components/Company/PaySchedule/usePaySchedule.js +0 -30
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +0 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +0 -1
- package/dist/components/Employee/EmployeeList/EmployeeListView.js +0 -130
- package/dist/components/Employee/EmployeeList/EmployeeListView.js.map +0 -1
- package/dist/components/Employee/EmployeeList/ManagementEmployeeList.js.map +0 -1
- package/dist/components/Employee/EmployeeList/ManagementEmployeeListView.js.map +0 -1
- package/dist/components/Employee/EmployeeList/index.d.ts +0 -3
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +0 -1
- package/dist/components/Employee/Profile/Actions.d.ts +0 -1
- package/dist/components/Employee/Profile/Actions.js +0 -14
- package/dist/components/Employee/Profile/Actions.js.map +0 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.d.ts +0 -33
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +0 -59
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +0 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.module.scss.js +0 -8
- package/dist/components/Employee/Profile/AdminPersonalDetails.module.scss.js.map +0 -1
- package/dist/components/Employee/Profile/Head.d.ts +0 -1
- package/dist/components/Employee/Profile/Head.js +0 -14
- package/dist/components/Employee/Profile/Head.js.map +0 -1
- package/dist/components/Employee/Profile/HomeAddress.d.ts +0 -31
- package/dist/components/Employee/Profile/HomeAddress.js +0 -128
- package/dist/components/Employee/Profile/HomeAddress.js.map +0 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.d.ts +0 -49
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +0 -146
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +0 -1
- package/dist/components/Employee/Profile/SelfPersonalDetails.d.ts +0 -16
- package/dist/components/Employee/Profile/SelfPersonalDetails.js +0 -29
- package/dist/components/Employee/Profile/SelfPersonalDetails.js.map +0 -1
- package/dist/components/Employee/Profile/WorkAddress.d.ts +0 -1
- package/dist/components/Employee/Profile/WorkAddress.js +0 -21
- package/dist/components/Employee/Profile/WorkAddress.js.map +0 -1
- package/dist/components/Employee/Profile/WorkAddress.module.scss.js +0 -8
- package/dist/components/Employee/Profile/WorkAddress.module.scss.js.map +0 -1
- package/dist/components/Employee/Profile/getEmployeeAddressForProfile.d.ts +0 -2
- package/dist/components/Employee/Profile/getEmployeeAddressForProfile.js +0 -8
- package/dist/components/Employee/Profile/getEmployeeAddressForProfile.js.map +0 -1
- package/dist/components/Employee/Profile/useProfile.d.ts +0 -16
- package/dist/components/Employee/Profile/useProfile.js +0 -20
- package/dist/components/Employee/Profile/useProfile.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/buildFormSchema.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/composeSubmitHandler.js +0 -34
- package/dist/components/UNSTABLE_Hooks/form/composeSubmitHandler.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js +0 -35
- package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js +0 -41
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js +0 -41
- package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js +0 -35
- package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js +0 -39
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/getFormSubmissionValues.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/preprocessors.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/useDeriveFieldsMetadata.js +0 -21
- package/dist/components/UNSTABLE_Hooks/form/useDeriveFieldsMetadata.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/withOptions.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.d.ts +0 -5
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js +0 -149
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.d.ts +0 -102
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.d.ts +0 -5
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js +0 -112
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.d.ts +0 -5
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.js +0 -172
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/fields.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/payScheduleSchema.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/usePayScheduleForm.d.ts +0 -69
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/usePayScheduleForm.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/SignCompanyForm.d.ts +0 -5
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/SignCompanyForm.js +0 -69
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/SignCompanyForm.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/fields.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/signCompanyFormSchema.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/useSignCompanyForm.d.ts +0 -57
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/useSignCompanyForm.js +0 -101
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/useSignCompanyForm.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeForm.d.ts +0 -5
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeForm.js +0 -71
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeForm.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeI9Form.d.ts +0 -5
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeI9Form.js +0 -179
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeI9Form.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/fields.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/signEmployeeFormSchema.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/useSignEmployeeForm.d.ts +0 -151
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/useSignEmployeeForm.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.d.ts +0 -5
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js +0 -69
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/index.d.ts +0 -12
- package/dist/helpers/buildQueryErrorHandling.d.ts +0 -22
- package/dist/helpers/buildQueryErrorHandling.js +0 -11
- package/dist/helpers/buildQueryErrorHandling.js.map +0 -1
- package/dist/helpers/collectErrors.js.map +0 -1
- package/dist/hooks/useErrorHandling.d.ts +0 -9
- package/dist/hooks/useErrorHandling.js +0 -12
- package/dist/hooks/useErrorHandling.js.map +0 -1
- package/dist/hooks/useErrorHandling.test.d.ts +0 -1
- package/dist/i18n/en/UNSTABLE.CompensationForm.json.js +0 -58
- package/dist/i18n/en/UNSTABLE.CompensationForm.json.js.map +0 -1
- package/dist/i18n/en/UNSTABLE.EmployeeDetailsForm.json.js +0 -34
- package/dist/i18n/en/UNSTABLE.EmployeeDetailsForm.json.js.map +0 -1
- package/dist/i18n/en/UNSTABLE.PayScheduleForm.json.js +0 -24
- package/dist/i18n/en/UNSTABLE.PayScheduleForm.json.js.map +0 -1
- package/dist/i18n/en/UNSTABLE.SignCompanyForm.json.js +0 -20
- package/dist/i18n/en/UNSTABLE.SignCompanyForm.json.js.map +0 -1
- package/dist/i18n/en/UNSTABLE.SignEmployeeForm.json.js +0 -22
- package/dist/i18n/en/UNSTABLE.SignEmployeeForm.json.js.map +0 -1
- package/dist/i18n/en/UNSTABLE.SignEmployeeI9Form.json.js +0 -70
- package/dist/i18n/en/UNSTABLE.SignEmployeeI9Form.json.js.map +0 -1
- package/dist/i18n/en/UNSTABLE.WorkAddressForm.json.js +0 -24
- package/dist/i18n/en/UNSTABLE.WorkAddressForm.json.js.map +0 -1
- /package/dist/components/{UNSTABLE_Hooks/hooks/usePayScheduleForm → Company/PaySchedule}/PayScheduleForm.module.scss.js +0 -0
- /package/dist/components/{UNSTABLE_Hooks/hooks/usePayScheduleForm → Company/PaySchedule}/PayScheduleForm.module.scss.js.map +0 -0
- /package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Compensation/shared}/useCompensationForm/compensationSchemaParity.test.d.ts +0 -0
- /package/dist/{helpers → partner-hook-utils}/collectErrors.d.ts +0 -0
- /package/dist/{helpers → partner-hook-utils}/collectErrors.js +0 -0
- /package/dist/{components/Employee/Profile/getEmployeeAddressForProfile.test.d.ts → partner-hook-utils/composeErrorHandler.test.d.ts} +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/FormFieldsMetadataProvider.js +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/SDKFormProvider.js +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/buildFormSchema.js +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/buildFormSchema.test.d.ts +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/composeSubmitHandler.test.d.ts +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/getFieldWithOptions.js +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/getFormSubmissionValues.d.ts +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/getFormSubmissionValues.js +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/getFormSubmissionValues.test.d.ts +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/preprocessors.d.ts +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/preprocessors.js +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/resolveFieldError.js +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/useFieldErrorMessage.js +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/useHookFieldResolution.js +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/withOptions.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmployeeListView.js","sources":["../../../../../src/components/Employee/employee-list/onboarding/EmployeeListView.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\nimport type { UseEmployeeListResult, EmployeeWithActions } from '../shared/useEmployeeList'\nimport { DataView, EmptyData, ActionsLayout, useDataView, Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { EmployeeOnboardingStatusBadge } from '@/components/Common/OnboardingStatusBadge'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { firstLastName } from '@/helpers/formattedStrings'\nimport PlusCircleIcon from '@/assets/icons/plus-circle.svg?react'\n\nexport interface EmployeeListViewProps extends Pick<\n Extract<UseEmployeeListResult, { isLoading: false }>,\n 'pagination' | 'status'\n> {\n employees: EmployeeWithActions[]\n isFetching: boolean\n onEdit: (employeeId: string, onboardingStatus?: OnboardingStatus) => void\n onDelete: (employeeId: string) => Promise<void>\n onCancelSelfOnboarding: (employeeId: string) => Promise<void>\n onReview: (employeeId: string) => Promise<void>\n onAddEmployee: () => void\n onSkip: () => void\n}\n\nexport function EmployeeListView({\n employees,\n isFetching,\n pagination,\n status,\n onEdit,\n onDelete,\n onCancelSelfOnboarding,\n onReview,\n onAddEmployee,\n onSkip,\n}: EmployeeListViewProps) {\n const { t } = useTranslation('Employee.EmployeeList')\n const Components = useComponentContext()\n const [employeeToDelete, setEmployeeToDelete] = useState<string | null>(null)\n\n const { ...dataViewProps } = useDataView({\n data: employees,\n columns: [\n {\n key: 'name',\n title: t('nameLabel'),\n render: (employee: EmployeeWithActions) => {\n return firstLastName({\n first_name: employee.firstName,\n last_name: employee.lastName,\n })\n },\n },\n {\n key: 'status',\n title: t('statusLabel'),\n render: (employee: EmployeeWithActions) => (\n <EmployeeOnboardingStatusBadge\n onboarded={employee.onboarded}\n onboardingStatus={employee.onboardingStatus}\n />\n ),\n },\n ],\n itemMenu: employee => {\n const menuItems = []\n\n if (employee.allowedActions.includes('edit')) {\n menuItems.push({\n label: t('editCta'),\n onClick: () => {\n onEdit(employee.uuid, employee.onboardingStatus ?? undefined)\n },\n icon: <PencilSvg aria-hidden />,\n })\n }\n\n if (employee.allowedActions.includes('cancel_self_onboarding')) {\n menuItems.push({\n label: t('cancelSelfOnboardingCta'),\n onClick: () => {\n void onCancelSelfOnboarding(employee.uuid)\n },\n icon: <PencilSvg aria-hidden />,\n })\n }\n\n if (employee.allowedActions.includes('review')) {\n menuItems.push({\n label: t('reviewCta'),\n onClick: () => {\n void onReview(employee.uuid)\n },\n icon: <PencilSvg aria-hidden />,\n })\n }\n\n if (employee.allowedActions.includes('delete')) {\n menuItems.push({\n label: t('deleteCta'),\n onClick: () => {\n setEmployeeToDelete(employee.uuid)\n },\n icon: <TrashCanSvg aria-hidden />,\n })\n }\n\n return <HamburgerMenu items={menuItems} triggerLabel={t('hamburgerTitle')} />\n },\n isFetching,\n pagination,\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')}>\n <ActionsLayout justifyContent=\"center\">\n <Components.Button variant=\"secondary\" onClick={onSkip}>\n {t('skipCta')}\n </Components.Button>\n <Components.Button variant=\"primary\" onClick={onAddEmployee} icon={<PlusCircleIcon />}>\n {t('addEmployeeCta')}\n </Components.Button>\n </ActionsLayout>\n </EmptyData>\n ),\n })\n\n return (\n <>\n <Flex flexDirection=\"column\" gap={24}>\n <Flex justifyContent=\"space-between\" alignItems=\"center\">\n <Components.Heading as=\"h2\">{t('title')}</Components.Heading>\n\n {employees.length > 0 && (\n <Components.Button\n variant=\"secondary\"\n onClick={onAddEmployee}\n icon={<PlusCircleIcon />}\n >\n {t('addAnotherCta')}\n </Components.Button>\n )}\n </Flex>\n\n <DataView label={t('employeeListLabel')} {...dataViewProps} />\n\n {employees.length > 0 && (\n <ActionsLayout>\n <Components.Button onClick={onSkip}>{t('continueCta')}</Components.Button>\n </ActionsLayout>\n )}\n </Flex>\n\n <Components.Dialog\n isOpen={!!employeeToDelete}\n onClose={() => {\n setEmployeeToDelete(null)\n }}\n onPrimaryActionClick={async () => {\n if (employeeToDelete) {\n try {\n await onDelete(employeeToDelete)\n setEmployeeToDelete(null)\n } catch {\n // Keep dialog open on error\n }\n }\n }}\n isPrimaryActionLoading={status.isPending}\n isDestructive\n title={t('deleteDialog.title')}\n primaryActionLabel={t('deleteDialog.confirmCta')}\n closeActionLabel={t('deleteDialog.cancelCta')}\n >\n {t('deleteDialog.description')}\n </Components.Dialog>\n </>\n )\n}\n"],"names":["EmployeeListView","employees","isFetching","pagination","status","onEdit","onDelete","onCancelSelfOnboarding","onReview","onAddEmployee","onSkip","useTranslation","Components","useComponentContext","employeeToDelete","setEmployeeToDelete","useState","dataViewProps","useDataView","employee","firstLastName","jsx","EmployeeOnboardingStatusBadge","menuItems","PencilSvg","TrashCanSvg","HamburgerMenu","EmptyData","jsxs","ActionsLayout","PlusCircleIcon","Fragment","Flex","DataView"],"mappings":"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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Employee } from '@gusto/embedded-api/models/components/employee';
|
|
2
2
|
import { Job } from '@gusto/embedded-api/models/components/job';
|
|
3
|
-
import { PaginationControlProps } from '
|
|
4
|
-
import { HookLoadingResult, HookSubmitResult, BaseHookReady } from '
|
|
3
|
+
import { PaginationControlProps } from '../../../Common/PaginationControl/PaginationControlTypes';
|
|
4
|
+
import { HookLoadingResult, HookSubmitResult, BaseHookReady } from '../../../../partner-hook-utils/types';
|
|
5
5
|
export type EmployeeAction = 'edit' | 'delete' | 'cancel_self_onboarding' | 'review' | 'dismiss' | 'rehire';
|
|
6
6
|
export interface EmployeeWithActions extends Employee {
|
|
7
7
|
allowedActions: EmployeeAction[];
|
|
@@ -17,15 +17,13 @@ export interface UseEmployeeListProps {
|
|
|
17
17
|
companyId: string;
|
|
18
18
|
employeeType?: EmployeeType;
|
|
19
19
|
}
|
|
20
|
-
interface UseEmployeeListReady extends
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
interface UseEmployeeListReady extends BaseHookReady<{
|
|
21
|
+
employees: EmployeeWithActions[];
|
|
22
|
+
}, {
|
|
23
|
+
isFetching: boolean;
|
|
24
|
+
isPending: boolean;
|
|
25
|
+
}> {
|
|
24
26
|
pagination: PaginationControlProps;
|
|
25
|
-
status: {
|
|
26
|
-
isFetching: boolean;
|
|
27
|
-
isPending: boolean;
|
|
28
|
-
};
|
|
29
27
|
actions: {
|
|
30
28
|
onDelete: (employeeId: string, callbacks?: EmployeeActionCallbacks) => Promise<HookSubmitResult<void> | undefined>;
|
|
31
29
|
onReview: (employeeId: string, callbacks?: EmployeeActionCallbacks) => Promise<HookSubmitResult<string> | undefined>;
|
|
@@ -3,26 +3,26 @@ import { useEmployeesList as M } from "@gusto/embedded-api/react-query/employees
|
|
|
3
3
|
import { useEmployeesDeleteMutation as w } from "@gusto/embedded-api/react-query/employeesDelete";
|
|
4
4
|
import { useEmployeesUpdateOnboardingStatusMutation as R } from "@gusto/embedded-api/react-query/employeesUpdateOnboardingStatus";
|
|
5
5
|
import { keepPreviousData as y } from "@tanstack/react-query";
|
|
6
|
-
import { usePagination as B } from "
|
|
7
|
-
import { useBaseSubmit as v } from "
|
|
8
|
-
import {
|
|
9
|
-
import { EmployeeOnboardingStatus as i, EmployeeSelfOnboardingStatuses as C } from "
|
|
10
|
-
function q(e,
|
|
6
|
+
import { usePagination as B } from "../../../../hooks/usePagination/usePagination.js";
|
|
7
|
+
import { useBaseSubmit as v } from "../../../Base/useBaseSubmit.js";
|
|
8
|
+
import { composeErrorHandler as G } from "../../../../partner-hook-utils/composeErrorHandler.js";
|
|
9
|
+
import { EmployeeOnboardingStatus as i, EmployeeSelfOnboardingStatuses as C } from "../../../../shared/constants.js";
|
|
10
|
+
function q(e, o) {
|
|
11
11
|
const a = [];
|
|
12
|
-
return
|
|
13
|
-
C.has(e.onboardingStatus) && a.push("cancel_self_onboarding"), e.onboardingStatus === i.SELF_ONBOARDING_COMPLETED_BY_EMPLOYEE && a.push("review"), e.onboarded || a.push("delete"),
|
|
12
|
+
return o !== "terminated" && (e.onboardingStatus === i.ADMIN_ONBOARDING_INCOMPLETE || e.onboardingStatus === i.SELF_ONBOARDING_PENDING_INVITE || e.onboardingStatus === i.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW || e.onboardingStatus === i.ONBOARDING_COMPLETED) && a.push("edit"), e.onboardingStatus && // @ts-expect-error: onboardingStatus during runtime can be one of self onboarding statuses
|
|
13
|
+
C.has(e.onboardingStatus) && a.push("cancel_self_onboarding"), e.onboardingStatus === i.SELF_ONBOARDING_COMPLETED_BY_EMPLOYEE && a.push("review"), e.onboarded || a.push("delete"), o === "active" && a.push("dismiss"), o === "terminated" && a.push("rehire"), a;
|
|
14
14
|
}
|
|
15
15
|
function Q({
|
|
16
16
|
companyId: e,
|
|
17
|
-
employeeType:
|
|
17
|
+
employeeType: o
|
|
18
18
|
}) {
|
|
19
|
-
const { currentPage: a, itemsPerPage: l, getPaginationProps: O } = B(),
|
|
19
|
+
const { currentPage: a, itemsPerPage: l, getPaginationProps: O } = B(), S = P(() => {
|
|
20
20
|
const t = {
|
|
21
21
|
companyId: e,
|
|
22
22
|
page: a,
|
|
23
23
|
per: l
|
|
24
24
|
};
|
|
25
|
-
switch (
|
|
25
|
+
switch (o) {
|
|
26
26
|
case "active":
|
|
27
27
|
return { ...t, onboardedActive: !0 };
|
|
28
28
|
case "onboarding":
|
|
@@ -32,14 +32,18 @@ function Q({
|
|
|
32
32
|
default:
|
|
33
33
|
return t;
|
|
34
34
|
}
|
|
35
|
-
}, [e, a, l,
|
|
35
|
+
}, [e, a, l, o]), b = M(S, { placeholderData: y }), E = w(), d = R(), {
|
|
36
|
+
baseSubmitHandler: c,
|
|
37
|
+
error: f,
|
|
38
|
+
setError: N
|
|
39
|
+
} = v("EmployeeList"), p = G([b], { submitError: f, setSubmitError: N }), I = E.isPending || d.isPending, { data: u, isFetching: m } = b, h = P(() => (u?.showEmployees ?? []).map((t) => {
|
|
36
40
|
const r = t.jobs?.find((n) => n.primary === !0);
|
|
37
41
|
return {
|
|
38
42
|
...t,
|
|
39
|
-
allowedActions: q(t,
|
|
43
|
+
allowedActions: q(t, o),
|
|
40
44
|
primaryJob: r
|
|
41
45
|
};
|
|
42
|
-
}), [u?.showEmployees,
|
|
46
|
+
}), [u?.showEmployees, o]), A = u?.httpMeta.response.headers ? O(u.httpMeta.response.headers, m) : {
|
|
43
47
|
handleNextPage: () => {
|
|
44
48
|
},
|
|
45
49
|
handleFirstPage: () => {
|
|
@@ -56,48 +60,48 @@ function Q({
|
|
|
56
60
|
itemsPerPage: 5
|
|
57
61
|
}, _ = async (t, r) => {
|
|
58
62
|
let n;
|
|
59
|
-
return await c(t, async (
|
|
63
|
+
return await c(t, async (s) => {
|
|
60
64
|
await E.mutateAsync({
|
|
61
|
-
request: { employeeId:
|
|
62
|
-
}), r?.onDelete?.(
|
|
65
|
+
request: { employeeId: s }
|
|
66
|
+
}), r?.onDelete?.(s), n = {
|
|
63
67
|
mode: "update",
|
|
64
68
|
data: void 0
|
|
65
69
|
};
|
|
66
70
|
}), n;
|
|
67
71
|
}, D = async (t, r) => {
|
|
68
72
|
let n;
|
|
69
|
-
return await c(t, async (
|
|
70
|
-
const
|
|
73
|
+
return await c(t, async (s) => {
|
|
74
|
+
const g = await d.mutateAsync({
|
|
71
75
|
request: {
|
|
72
|
-
employeeId:
|
|
76
|
+
employeeId: s,
|
|
73
77
|
requestBody: {
|
|
74
78
|
onboardingStatus: i.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW
|
|
75
79
|
}
|
|
76
80
|
}
|
|
77
81
|
});
|
|
78
|
-
r?.onReview?.(
|
|
82
|
+
r?.onReview?.(s), n = {
|
|
79
83
|
mode: "update",
|
|
80
|
-
data:
|
|
84
|
+
data: g.employeeOnboardingStatus?.onboardingStatus ?? ""
|
|
81
85
|
};
|
|
82
86
|
}), n;
|
|
83
87
|
}, L = async (t, r) => {
|
|
84
88
|
let n;
|
|
85
|
-
return await c(t, async (
|
|
86
|
-
const
|
|
89
|
+
return await c(t, async (s) => {
|
|
90
|
+
const g = await d.mutateAsync({
|
|
87
91
|
request: {
|
|
88
|
-
employeeId:
|
|
92
|
+
employeeId: s,
|
|
89
93
|
requestBody: {
|
|
90
94
|
onboardingStatus: i.ADMIN_ONBOARDING_INCOMPLETE
|
|
91
95
|
}
|
|
92
96
|
}
|
|
93
97
|
});
|
|
94
|
-
r?.onCancelSelfOnboarding?.(
|
|
98
|
+
r?.onCancelSelfOnboarding?.(s), n = {
|
|
95
99
|
mode: "update",
|
|
96
|
-
data:
|
|
100
|
+
data: g.employeeOnboardingStatus?.onboardingStatus ?? ""
|
|
97
101
|
};
|
|
98
102
|
}), n;
|
|
99
103
|
};
|
|
100
|
-
return !u &&
|
|
104
|
+
return !u && m ? {
|
|
101
105
|
isLoading: !0,
|
|
102
106
|
errorHandling: p
|
|
103
107
|
} : {
|
|
@@ -106,7 +110,7 @@ function Q({
|
|
|
106
110
|
employees: h
|
|
107
111
|
},
|
|
108
112
|
pagination: A,
|
|
109
|
-
status: { isFetching:
|
|
113
|
+
status: { isFetching: m, isPending: I },
|
|
110
114
|
actions: { onDelete: _, onReview: D, onCancelSelfOnboarding: L },
|
|
111
115
|
errorHandling: p
|
|
112
116
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEmployeeList.js","sources":["../../../../../src/components/Employee/employee-list/shared/useEmployeeList.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useEmployeesList } from '@gusto/embedded-api/react-query/employeesList'\nimport type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { Job } from '@gusto/embedded-api/models/components/job'\nimport { useEmployeesDeleteMutation } from '@gusto/embedded-api/react-query/employeesDelete'\nimport { useEmployeesUpdateOnboardingStatusMutation } from '@gusto/embedded-api/react-query/employeesUpdateOnboardingStatus'\nimport { keepPreviousData } from '@tanstack/react-query'\nimport { usePagination } from '@/hooks/usePagination/usePagination'\nimport type { PaginationControlProps } from '@/components/Common/PaginationControl/PaginationControlTypes'\nimport { useBaseSubmit } from '@/components/Base/useBaseSubmit'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport { EmployeeOnboardingStatus, EmployeeSelfOnboardingStatuses } from '@/shared/constants'\nimport type { HookLoadingResult, HookSubmitResult, BaseHookReady } from '@/partner-hook-utils/types'\n\nexport type EmployeeAction =\n | 'edit'\n | 'delete'\n | 'cancel_self_onboarding'\n | 'review'\n | 'dismiss'\n | 'rehire'\n\nexport interface EmployeeWithActions extends Employee {\n allowedActions: EmployeeAction[]\n primaryJob?: Job\n}\n\nexport interface EmployeeActionCallbacks {\n onDelete?: (employeeId: string) => void\n onReview?: (employeeId: string) => void\n onCancelSelfOnboarding?: (employeeId: string) => void\n}\n\nexport type EmployeeType = 'active' | 'onboarding' | 'terminated'\n\nexport interface UseEmployeeListProps {\n companyId: string\n employeeType?: EmployeeType\n}\n\ninterface UseEmployeeListReady extends BaseHookReady<\n { employees: EmployeeWithActions[] },\n { isFetching: boolean; isPending: boolean }\n> {\n pagination: PaginationControlProps\n actions: {\n onDelete: (\n employeeId: string,\n callbacks?: EmployeeActionCallbacks,\n ) => Promise<HookSubmitResult<void> | undefined>\n onReview: (\n employeeId: string,\n callbacks?: EmployeeActionCallbacks,\n ) => Promise<HookSubmitResult<string> | undefined>\n onCancelSelfOnboarding: (\n employeeId: string,\n callbacks?: EmployeeActionCallbacks,\n ) => Promise<HookSubmitResult<string> | undefined>\n }\n}\n\nexport type UseEmployeeListResult = HookLoadingResult | UseEmployeeListReady\n\nfunction deriveAllowedActions(employee: Employee, employeeType?: EmployeeType): EmployeeAction[] {\n const actions: EmployeeAction[] = []\n\n // Edit action - available for certain onboarding statuses, but not for terminated employees\n if (\n employeeType !== 'terminated' &&\n (employee.onboardingStatus === EmployeeOnboardingStatus.ADMIN_ONBOARDING_INCOMPLETE ||\n employee.onboardingStatus === EmployeeOnboardingStatus.SELF_ONBOARDING_PENDING_INVITE ||\n employee.onboardingStatus ===\n EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW ||\n employee.onboardingStatus === EmployeeOnboardingStatus.ONBOARDING_COMPLETED)\n ) {\n actions.push('edit')\n }\n\n // Cancel self onboarding - available for employees in self-onboarding flow\n if (\n employee.onboardingStatus &&\n // @ts-expect-error: onboardingStatus during runtime can be one of self onboarding statuses\n EmployeeSelfOnboardingStatuses.has(employee.onboardingStatus)\n ) {\n actions.push('cancel_self_onboarding')\n }\n\n // Review action - available when employee completed self-onboarding\n if (\n employee.onboardingStatus === EmployeeOnboardingStatus.SELF_ONBOARDING_COMPLETED_BY_EMPLOYEE\n ) {\n actions.push('review')\n }\n\n // Delete action - available for non-onboarded employees\n if (!employee.onboarded) {\n actions.push('delete')\n }\n\n // Tab-specific actions for ManagementEmployeeList\n if (employeeType === 'active') {\n actions.push('dismiss')\n }\n\n if (employeeType === 'terminated') {\n actions.push('rehire')\n }\n\n return actions\n}\n\nexport function useEmployeeList({\n companyId,\n employeeType,\n}: UseEmployeeListProps): UseEmployeeListResult {\n const { currentPage, itemsPerPage, getPaginationProps } = usePagination()\n\n const queryParams = useMemo(() => {\n const baseParams = {\n companyId,\n page: currentPage,\n per: itemsPerPage,\n }\n\n switch (employeeType) {\n case 'active':\n return { ...baseParams, onboardedActive: true }\n case 'onboarding':\n return { ...baseParams, onboarded: false }\n case 'terminated':\n return { ...baseParams, terminated: true }\n default:\n return baseParams\n }\n }, [companyId, currentPage, itemsPerPage, employeeType])\n\n const employeesQuery = useEmployeesList(queryParams, { placeholderData: keepPreviousData })\n\n const deleteEmployeeMutation = useEmployeesDeleteMutation()\n const updateOnboardingStatusMutation = useEmployeesUpdateOnboardingStatusMutation()\n\n const {\n baseSubmitHandler,\n error: submitError,\n setError: setSubmitError,\n } = useBaseSubmit('EmployeeList')\n\n const errorHandling = composeErrorHandler([employeesQuery], { submitError, setSubmitError })\n\n const isPending = deleteEmployeeMutation.isPending || updateOnboardingStatusMutation.isPending\n\n const { data, isFetching } = employeesQuery\n\n const employees = useMemo<EmployeeWithActions[]>(() => {\n return (data?.showEmployees ?? []).map(employee => {\n const primaryJob = employee.jobs?.find(job => job.primary === true)\n\n return {\n ...employee,\n allowedActions: deriveAllowedActions(employee, employeeType),\n primaryJob,\n }\n })\n }, [data?.showEmployees, employeeType])\n\n const paginationProps = data?.httpMeta.response.headers\n ? getPaginationProps(data.httpMeta.response.headers, isFetching)\n : {\n handleNextPage: () => {},\n handleFirstPage: () => {},\n handleLastPage: () => {},\n handlePreviousPage: () => {},\n handleItemsPerPageChange: () => {},\n currentPage: 1,\n totalPages: 1,\n totalCount: 0,\n itemsPerPage: 5 as const,\n }\n\n const onDelete = async (\n employeeId: string,\n callbacks?: EmployeeActionCallbacks,\n ): Promise<HookSubmitResult<void> | undefined> => {\n let submitResult: HookSubmitResult<void> | undefined\n\n await baseSubmitHandler(employeeId, async id => {\n await deleteEmployeeMutation.mutateAsync({\n request: { employeeId: id },\n })\n callbacks?.onDelete?.(id)\n\n submitResult = {\n mode: 'update',\n data: undefined,\n }\n })\n\n return submitResult\n }\n\n const onReview = async (\n employeeId: string,\n callbacks?: EmployeeActionCallbacks,\n ): Promise<HookSubmitResult<string> | undefined> => {\n let submitResult: HookSubmitResult<string> | undefined\n\n await baseSubmitHandler(employeeId, async id => {\n const result = await updateOnboardingStatusMutation.mutateAsync({\n request: {\n employeeId: id,\n requestBody: {\n onboardingStatus: EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW,\n },\n },\n })\n callbacks?.onReview?.(id)\n\n submitResult = {\n mode: 'update',\n data: result.employeeOnboardingStatus?.onboardingStatus ?? '',\n }\n })\n\n return submitResult\n }\n\n const onCancelSelfOnboarding = async (\n employeeId: string,\n callbacks?: EmployeeActionCallbacks,\n ): Promise<HookSubmitResult<string> | undefined> => {\n let submitResult: HookSubmitResult<string> | undefined\n\n await baseSubmitHandler(employeeId, async id => {\n const result = await updateOnboardingStatusMutation.mutateAsync({\n request: {\n employeeId: id,\n requestBody: {\n onboardingStatus: EmployeeOnboardingStatus.ADMIN_ONBOARDING_INCOMPLETE,\n },\n },\n })\n callbacks?.onCancelSelfOnboarding?.(id)\n\n submitResult = {\n mode: 'update',\n data: result.employeeOnboardingStatus?.onboardingStatus ?? '',\n }\n })\n\n return submitResult\n }\n\n const isLoading = !data && isFetching\n\n if (isLoading) {\n return {\n isLoading: true,\n errorHandling,\n }\n }\n\n return {\n isLoading: false,\n data: {\n employees,\n },\n pagination: paginationProps,\n status: { isFetching, isPending },\n actions: { onDelete, onReview, onCancelSelfOnboarding },\n errorHandling,\n }\n}\n"],"names":["deriveAllowedActions","employee","employeeType","actions","EmployeeOnboardingStatus","EmployeeSelfOnboardingStatuses","useEmployeeList","companyId","currentPage","itemsPerPage","getPaginationProps","usePagination","queryParams","useMemo","baseParams","employeesQuery","useEmployeesList","keepPreviousData","deleteEmployeeMutation","useEmployeesDeleteMutation","updateOnboardingStatusMutation","useEmployeesUpdateOnboardingStatusMutation","baseSubmitHandler","submitError","setSubmitError","useBaseSubmit","errorHandling","composeErrorHandler","isPending","data","isFetching","employees","primaryJob","job","paginationProps","onDelete","employeeId","callbacks","submitResult","id","onReview","result","onCancelSelfOnboarding"],"mappings":"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"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ManagementEmployeeList as EmployeeList } from '../employee-list/management/ManagementEmployeeList';
|
|
2
|
+
export { EmployeeDocuments } from '../EmployeeDocuments';
|
|
3
|
+
export { DashboardFlow } from '../Dashboard';
|
|
4
|
+
export { TerminateEmployee } from '../Terminations/TerminateEmployee/TerminateEmployee';
|
|
5
|
+
export { TerminationSummary } from '../Terminations/TerminationSummary/TerminationSummary';
|
|
6
|
+
export { TerminationFlow } from '../Terminations/TerminationFlow/TerminationFlow';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ManagementEmployeeList as m } from "../employee-list/management/ManagementEmployeeList.js";
|
|
2
|
+
import { TerminateEmployee as t } from "../Terminations/TerminateEmployee/TerminateEmployee.js";
|
|
3
|
+
import { TerminationSummary as a } from "../Terminations/TerminationSummary/TerminationSummary.js";
|
|
4
|
+
import { TerminationFlow as i } from "../Terminations/TerminationFlow/TerminationFlow.js";
|
|
5
|
+
import { DashboardFlow as l } from "../Dashboard/DashboardFlow.js";
|
|
6
|
+
import { EmployeeDocuments as s } from "../EmployeeDocuments/EmployeeDocuments.js";
|
|
7
|
+
export {
|
|
8
|
+
l as DashboardFlow,
|
|
9
|
+
s as EmployeeDocuments,
|
|
10
|
+
m as EmployeeList,
|
|
11
|
+
t as TerminateEmployee,
|
|
12
|
+
i as TerminationFlow,
|
|
13
|
+
a as TerminationSummary
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=employeeManagement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"employeeManagement.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { OnboardingFlow } from '../OnboardingFlow/OnboardingFlow';
|
|
2
|
+
export { SelfOnboardingFlow } from '../SelfOnboardingFlow/SelfOnboardingFlow';
|
|
3
|
+
export { EmployeeList } from '../employee-list/onboarding/EmployeeList';
|
|
4
|
+
export { OnboardingSummary } from '../OnboardingSummary';
|
|
5
|
+
export { Landing } from '../Landing';
|
|
6
|
+
export { DocumentSigner } from '../DocumentSigner';
|
|
7
|
+
export { EmploymentEligibility } from '../DocumentSigner/EmploymentEligibility';
|
|
8
|
+
export { Profile } from '../Profile';
|
|
9
|
+
export { Compensation } from '../Compensation';
|
|
10
|
+
export { FederalTaxes } from '../FederalTaxes';
|
|
11
|
+
export { StateTaxes } from '../StateTaxes';
|
|
12
|
+
export { Deductions } from '../Deductions';
|
|
13
|
+
export { PaymentMethod } from '../PaymentMethod';
|
|
14
|
+
export { Taxes } from '../Taxes';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { OnboardingFlow as e } from "../OnboardingFlow/OnboardingFlow.js";
|
|
2
|
+
import { SelfOnboardingFlow as m } from "../SelfOnboardingFlow/SelfOnboardingFlow.js";
|
|
3
|
+
import { EmployeeList as x } from "../employee-list/onboarding/EmployeeList.js";
|
|
4
|
+
import { Compensation as n } from "../Compensation/Compensation.js";
|
|
5
|
+
import { Deductions as a } from "../Deductions/Deductions.js";
|
|
6
|
+
import { DocumentSigner as d } from "../DocumentSigner/DocumentSigner.js";
|
|
7
|
+
import { EmploymentEligibility as s } from "../DocumentSigner/EmploymentEligibility/EmploymentEligibility.js";
|
|
8
|
+
import { FederalTaxes as b } from "../FederalTaxes/FederalTaxes.js";
|
|
9
|
+
import { Landing as u } from "../Landing/Landing.js";
|
|
10
|
+
import { OnboardingSummary as F } from "../OnboardingSummary/OnboardingSummary.js";
|
|
11
|
+
import { PaymentMethod as T } from "../PaymentMethod/PaymentMethod.js";
|
|
12
|
+
import { Profile as w } from "../Profile/Profile.js";
|
|
13
|
+
import { StateTaxes as L } from "../StateTaxes/StateTaxes.js";
|
|
14
|
+
import { Taxes as h } from "../Taxes/Taxes.js";
|
|
15
|
+
export {
|
|
16
|
+
n as Compensation,
|
|
17
|
+
a as Deductions,
|
|
18
|
+
d as DocumentSigner,
|
|
19
|
+
x as EmployeeList,
|
|
20
|
+
s as EmploymentEligibility,
|
|
21
|
+
b as FederalTaxes,
|
|
22
|
+
u as Landing,
|
|
23
|
+
e as OnboardingFlow,
|
|
24
|
+
F as OnboardingSummary,
|
|
25
|
+
T as PaymentMethod,
|
|
26
|
+
w as Profile,
|
|
27
|
+
m as SelfOnboardingFlow,
|
|
28
|
+
L as StateTaxes,
|
|
29
|
+
h as Taxes
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=employeeOnboarding.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"employeeOnboarding.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import "./types/i18next.d.ts"
|
|
2
|
-
export { EmployeeList } from './
|
|
3
|
-
export { ManagementEmployeeList } from './EmployeeList/ManagementEmployeeList';
|
|
2
|
+
export { EmployeeList } from './employee-list/onboarding/EmployeeList';
|
|
4
3
|
export { Deductions } from './Deductions';
|
|
5
4
|
export { OnboardingSummary } from './OnboardingSummary';
|
|
6
5
|
export { Profile } from './Profile';
|
|
@@ -1,43 +1,41 @@
|
|
|
1
|
-
import { EmployeeList as e } from "./
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { TerminationSummary as s } from "./Terminations/TerminationSummary/TerminationSummary.js";
|
|
1
|
+
import { EmployeeList as e } from "./employee-list/onboarding/EmployeeList.js";
|
|
2
|
+
import { OnboardingFlow as t } from "./OnboardingFlow/OnboardingFlow.js";
|
|
3
|
+
import { SelfOnboardingFlow as x } from "./SelfOnboardingFlow/SelfOnboardingFlow.js";
|
|
4
|
+
import { TerminateEmployee as n } from "./Terminations/TerminateEmployee/TerminateEmployee.js";
|
|
5
|
+
import { TerminationSummary as i } from "./Terminations/TerminationSummary/TerminationSummary.js";
|
|
7
6
|
import { TerminationFlow as d } from "./Terminations/TerminationFlow/TerminationFlow.js";
|
|
8
|
-
import { Compensation as
|
|
9
|
-
import { DashboardFlow as
|
|
10
|
-
import { Deductions as
|
|
11
|
-
import { DocumentSigner as
|
|
12
|
-
import { EmployeeDocuments as
|
|
13
|
-
import { EmploymentEligibility as
|
|
14
|
-
import { FederalTaxes as
|
|
15
|
-
import { Landing as
|
|
16
|
-
import { OnboardingSummary as
|
|
17
|
-
import { PaymentMethod as
|
|
18
|
-
import { Profile as
|
|
19
|
-
import { StateTaxes as
|
|
20
|
-
import { Taxes as
|
|
7
|
+
import { Compensation as y } from "./Compensation/Compensation.js";
|
|
8
|
+
import { DashboardFlow as T } from "./Dashboard/DashboardFlow.js";
|
|
9
|
+
import { Deductions as u } from "./Deductions/Deductions.js";
|
|
10
|
+
import { DocumentSigner as F } from "./DocumentSigner/DocumentSigner.js";
|
|
11
|
+
import { EmployeeDocuments as w } from "./EmployeeDocuments/EmployeeDocuments.js";
|
|
12
|
+
import { EmploymentEligibility as c } from "./DocumentSigner/EmploymentEligibility/EmploymentEligibility.js";
|
|
13
|
+
import { FederalTaxes as h } from "./FederalTaxes/FederalTaxes.js";
|
|
14
|
+
import { Landing as P } from "./Landing/Landing.js";
|
|
15
|
+
import { OnboardingSummary as M } from "./OnboardingSummary/OnboardingSummary.js";
|
|
16
|
+
import { PaymentMethod as k } from "./PaymentMethod/PaymentMethod.js";
|
|
17
|
+
import { Profile as v } from "./Profile/Profile.js";
|
|
18
|
+
import { StateTaxes as A } from "./StateTaxes/StateTaxes.js";
|
|
19
|
+
import { Taxes as G } from "./Taxes/Taxes.js";
|
|
21
20
|
export {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
y as Compensation,
|
|
22
|
+
T as DashboardFlow,
|
|
23
|
+
u as Deductions,
|
|
24
|
+
F as DocumentSigner,
|
|
25
|
+
w as EmployeeDocuments,
|
|
27
26
|
e as EmployeeList,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
t as
|
|
32
|
-
|
|
33
|
-
k as
|
|
34
|
-
v as
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
G as
|
|
38
|
-
|
|
39
|
-
i as TerminateEmployee,
|
|
27
|
+
c as EmploymentEligibility,
|
|
28
|
+
h as FederalTaxes,
|
|
29
|
+
P as Landing,
|
|
30
|
+
t as OnboardingFlow,
|
|
31
|
+
M as OnboardingSummary,
|
|
32
|
+
k as PaymentMethod,
|
|
33
|
+
v as Profile,
|
|
34
|
+
x as SelfOnboardingFlow,
|
|
35
|
+
A as StateTaxes,
|
|
36
|
+
G as Taxes,
|
|
37
|
+
n as TerminateEmployee,
|
|
40
38
|
d as TerminationFlow,
|
|
41
|
-
|
|
39
|
+
i as TerminationSummary
|
|
42
40
|
};
|
|
43
41
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;"}
|
|
@@ -3,9 +3,10 @@ import { useMachine as v } from "react-robot";
|
|
|
3
3
|
import { useTranslation as w } from "react-i18next";
|
|
4
4
|
import { FlowBreadcrumbs as F } from "../Common/FlowBreadcrumbs/FlowBreadcrumbs.js";
|
|
5
5
|
import { Flex as s, FlexItem as d } from "../Common/Flex/Flex.js";
|
|
6
|
+
import "classnames";
|
|
6
7
|
import { FlowContext as j } from "./useFlow.js";
|
|
7
8
|
import { useComponentContext as E } from "../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
|
-
const
|
|
9
|
+
const M = ({
|
|
9
10
|
onEvent: x,
|
|
10
11
|
machine: f
|
|
11
12
|
}) => {
|
|
@@ -15,9 +16,9 @@ const L = ({
|
|
|
15
16
|
progressBarCta: null
|
|
16
17
|
}), {
|
|
17
18
|
progressBarType: l = null,
|
|
18
|
-
totalSteps:
|
|
19
|
-
currentStep:
|
|
20
|
-
currentBreadcrumbId:
|
|
19
|
+
totalSteps: o = null,
|
|
20
|
+
currentStep: t = null,
|
|
21
|
+
currentBreadcrumbId: n,
|
|
21
22
|
breadcrumbs: B = {}
|
|
22
23
|
} = r.context;
|
|
23
24
|
function a(i, m) {
|
|
@@ -31,12 +32,12 @@ const L = ({
|
|
|
31
32
|
...r.context
|
|
32
33
|
},
|
|
33
34
|
children: /* @__PURE__ */ u(s, { flexDirection: "column", gap: 32, children: [
|
|
34
|
-
l === "progress" &&
|
|
35
|
+
l === "progress" && t && o && /* @__PURE__ */ e(
|
|
35
36
|
b.ProgressBar,
|
|
36
37
|
{
|
|
37
|
-
totalSteps:
|
|
38
|
-
currentStep:
|
|
39
|
-
label: g("progressBarLabel", { totalSteps:
|
|
38
|
+
totalSteps: o,
|
|
39
|
+
currentStep: t,
|
|
40
|
+
label: g("progressBarLabel", { totalSteps: o, currentStep: t }),
|
|
40
41
|
cta: r.context.progressBarCta
|
|
41
42
|
}
|
|
42
43
|
),
|
|
@@ -44,8 +45,8 @@ const L = ({
|
|
|
44
45
|
/* @__PURE__ */ e(d, { flexGrow: 1, children: /* @__PURE__ */ e(
|
|
45
46
|
F,
|
|
46
47
|
{
|
|
47
|
-
breadcrumbs:
|
|
48
|
-
currentBreadcrumbId:
|
|
48
|
+
breadcrumbs: n ? B[n] ?? [] : [],
|
|
49
|
+
currentBreadcrumbId: n,
|
|
49
50
|
onEvent: a
|
|
50
51
|
}
|
|
51
52
|
) }),
|
|
@@ -57,6 +58,6 @@ const L = ({
|
|
|
57
58
|
) });
|
|
58
59
|
};
|
|
59
60
|
export {
|
|
60
|
-
|
|
61
|
+
M as Flow
|
|
61
62
|
};
|
|
62
63
|
//# sourceMappingURL=Flow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Flow.js","sources":["../../../src/components/Flow/Flow.tsx"],"sourcesContent":["import { useMachine } from 'react-robot'\nimport { type Machine, type SendFunction } from 'robot3'\nimport { useTranslation } from 'react-i18next'\nimport type { OnEventType } from '../Base/useBase'\nimport { FlowBreadcrumbs } from '../Common/FlowBreadcrumbs/FlowBreadcrumbs'\nimport { Flex } from '../Common/Flex'\nimport { FlexItem } from '../Common'\nimport type { FlowContextInterface } from './useFlow'\nimport { FlowContext } from './useFlow'\nimport { type EventType } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ntype FlowProps<M extends Machine> = {\n machine: M\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport const Flow = <M extends Machine<object, FlowContextInterface>>({\n onEvent,\n machine,\n}: FlowProps<M>) => {\n const Components = useComponentContext()\n const { t } = useTranslation()\n const [current, send, service] = useMachine(machine, {\n onEvent: handleEvent,\n component: null,\n progressBarCta: null,\n })\n\n const {\n progressBarType = null,\n totalSteps = null,\n currentStep = null,\n currentBreadcrumbId,\n breadcrumbs = {},\n } = current.context\n\n function handleEvent(type: EventType, data: unknown): void {\n const event = { type, payload: data }\n const sendFn = send as SendFunction<string>\n //When dealing with nested state machine, correct machine needs to recieve an event\n if (service.child) {\n ;(service.child.send as SendFunction<string>)(event)\n } else {\n sendFn(event)\n }\n // Pass event upstream - onEvent can be optional on Flow component\n onEvent(type, data)\n }\n\n return (\n <Flex>\n <FlowContext.Provider\n value={{\n ...current.context,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {progressBarType === 'progress' && currentStep && totalSteps && (\n <Components.ProgressBar\n totalSteps={totalSteps}\n currentStep={currentStep}\n label={t('progressBarLabel', { totalSteps, currentStep })}\n cta={current.context.progressBarCta}\n />\n )}\n {progressBarType === 'breadcrumbs' && (\n <Flex flexDirection=\"row\" justifyContent=\"space-between\" alignItems=\"center\">\n <FlexItem flexGrow={1}>\n <FlowBreadcrumbs\n breadcrumbs={currentBreadcrumbId ? (breadcrumbs[currentBreadcrumbId] ?? []) : []}\n currentBreadcrumbId={currentBreadcrumbId}\n onEvent={handleEvent}\n />\n </FlexItem>\n <FlexItem>\n {current.context.progressBarCta && <current.context.progressBarCta />}\n </FlexItem>\n </Flex>\n )}\n {current.context.component && <current.context.component />}\n </Flex>\n </FlowContext.Provider>\n </Flex>\n )\n}\n"],"names":["Flow","onEvent","machine","Components","useComponentContext","t","useTranslation","current","send","service","useMachine","handleEvent","progressBarType","totalSteps","currentStep","currentBreadcrumbId","breadcrumbs","type","data","event","sendFn","Flex","jsx","FlowContext","jsxs","FlexItem","FlowBreadcrumbs"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Flow.js","sources":["../../../src/components/Flow/Flow.tsx"],"sourcesContent":["import { useMachine } from 'react-robot'\nimport { type Machine, type SendFunction } from 'robot3'\nimport { useTranslation } from 'react-i18next'\nimport type { OnEventType } from '../Base/useBase'\nimport { FlowBreadcrumbs } from '../Common/FlowBreadcrumbs/FlowBreadcrumbs'\nimport { Flex } from '../Common/Flex'\nimport { FlexItem } from '../Common'\nimport type { FlowContextInterface } from './useFlow'\nimport { FlowContext } from './useFlow'\nimport { type EventType } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ntype FlowProps<M extends Machine> = {\n machine: M\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport const Flow = <M extends Machine<object, FlowContextInterface>>({\n onEvent,\n machine,\n}: FlowProps<M>) => {\n const Components = useComponentContext()\n const { t } = useTranslation()\n const [current, send, service] = useMachine(machine, {\n onEvent: handleEvent,\n component: null,\n progressBarCta: null,\n })\n\n const {\n progressBarType = null,\n totalSteps = null,\n currentStep = null,\n currentBreadcrumbId,\n breadcrumbs = {},\n } = current.context\n\n function handleEvent(type: EventType, data: unknown): void {\n const event = { type, payload: data }\n const sendFn = send as SendFunction<string>\n //When dealing with nested state machine, correct machine needs to recieve an event\n if (service.child) {\n ;(service.child.send as SendFunction<string>)(event)\n } else {\n sendFn(event)\n }\n // Pass event upstream - onEvent can be optional on Flow component\n onEvent(type, data)\n }\n\n return (\n <Flex>\n <FlowContext.Provider\n value={{\n ...current.context,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {progressBarType === 'progress' && currentStep && totalSteps && (\n <Components.ProgressBar\n totalSteps={totalSteps}\n currentStep={currentStep}\n label={t('progressBarLabel', { totalSteps, currentStep })}\n cta={current.context.progressBarCta}\n />\n )}\n {progressBarType === 'breadcrumbs' && (\n <Flex flexDirection=\"row\" justifyContent=\"space-between\" alignItems=\"center\">\n <FlexItem flexGrow={1}>\n <FlowBreadcrumbs\n breadcrumbs={currentBreadcrumbId ? (breadcrumbs[currentBreadcrumbId] ?? []) : []}\n currentBreadcrumbId={currentBreadcrumbId}\n onEvent={handleEvent}\n />\n </FlexItem>\n <FlexItem>\n {current.context.progressBarCta && <current.context.progressBarCta />}\n </FlexItem>\n </Flex>\n )}\n {current.context.component && <current.context.component />}\n </Flex>\n </FlowContext.Provider>\n </Flex>\n )\n}\n"],"names":["Flow","onEvent","machine","Components","useComponentContext","t","useTranslation","current","send","service","useMachine","handleEvent","progressBarType","totalSteps","currentStep","currentBreadcrumbId","breadcrumbs","type","data","event","sendFn","Flex","jsx","FlowContext","jsxs","FlexItem","FlowBreadcrumbs"],"mappings":";;;;;;;;AAiBO,MAAMA,IAAO,CAAkD;AAAA,EACpE,SAAAC;AAAA,EACA,SAAAC;AACF,MAAoB;AAClB,QAAMC,IAAaC,EAAA,GACb,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACR,CAACC,GAASC,GAAMC,CAAO,IAAIC,EAAWR,GAAS;AAAA,IACnD,SAASS;AAAA,IACT,WAAW;AAAA,IACX,gBAAgB;AAAA,EAAA,CACjB,GAEK;AAAA,IACJ,iBAAAC,IAAkB;AAAA,IAClB,YAAAC,IAAa;AAAA,IACb,aAAAC,IAAc;AAAA,IACd,qBAAAC;AAAA,IACA,aAAAC,IAAc,CAAA;AAAA,EAAC,IACbT,EAAQ;AAEZ,WAASI,EAAYM,GAAiBC,GAAqB;AACzD,UAAMC,IAAQ,EAAE,MAAAF,GAAM,SAASC,EAAA,GACzBE,IAASZ;AAEf,IAAIC,EAAQ,QACRA,EAAQ,MAAM,KAA8BU,CAAK,IAEnDC,EAAOD,CAAK,GAGdlB,EAAQgB,GAAMC,CAAI;AAAA,EACpB;AAEA,2BACGG,GAAA,EACC,UAAA,gBAAAC;AAAA,IAACC,EAAY;AAAA,IAAZ;AAAA,MACC,OAAO;AAAA,QACL,GAAGhB,EAAQ;AAAA,MAAA;AAAA,MAGb,UAAA,gBAAAiB,EAACH,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UAAA;AAAA,QAAAT,MAAoB,cAAcE,KAAeD,KAChD,gBAAAS;AAAA,UAACnB,EAAW;AAAA,UAAX;AAAA,YACC,YAAAU;AAAA,YACA,aAAAC;AAAA,YACA,OAAOT,EAAE,oBAAoB,EAAE,YAAAQ,GAAY,aAAAC,GAAa;AAAA,YACxD,KAAKP,EAAQ,QAAQ;AAAA,UAAA;AAAA,QAAA;AAAA,QAGxBK,MAAoB,iBACnB,gBAAAY,EAACH,GAAA,EAAK,eAAc,OAAM,gBAAe,iBAAgB,YAAW,UAClE,UAAA;AAAA,UAAA,gBAAAC,EAACG,GAAA,EAAS,UAAU,GAClB,UAAA,gBAAAH;AAAA,YAACI;AAAA,YAAA;AAAA,cACC,aAAaX,IAAuBC,EAAYD,CAAmB,KAAK,CAAA,IAAM,CAAA;AAAA,cAC9E,qBAAAA;AAAA,cACA,SAASJ;AAAA,YAAA;AAAA,UAAA,GAEb;AAAA,UACA,gBAAAW,EAACG,GAAA,EACE,UAAAlB,EAAQ,QAAQ,oCAAmBA,EAAQ,QAAQ,gBAAhB,CAAA,CAA+B,EAAA,CACrE;AAAA,QAAA,GACF;AAAA,QAEDA,EAAQ,QAAQ,+BAAcA,EAAQ,QAAQ,WAAhB,CAAA,CAA0B;AAAA,MAAA,EAAA,CAC3D;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
|
package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import B from "dompurify";
|
|
3
3
|
import { useTranslation as D } from "react-i18next";
|
|
4
4
|
import { useForm as W, FormProvider as H } from "react-hook-form";
|
|
@@ -13,6 +13,7 @@ import r from "./InformationRequestForm.module.scss.js";
|
|
|
13
13
|
import { BaseComponent as $ } from "../../Base/Base.js";
|
|
14
14
|
import { useBase as J } from "../../Base/useBase.js";
|
|
15
15
|
import { Flex as y } from "../../Common/Flex/Flex.js";
|
|
16
|
+
import "classnames";
|
|
16
17
|
import { FileInputField as X } from "../../Common/Fields/FileInputField/FileInputField.js";
|
|
17
18
|
import { Form as Z } from "../../Common/Form/Form.js";
|
|
18
19
|
import { useComponentContext as _ } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
@@ -28,7 +29,7 @@ const M = "gusto-sdk-information-request-form", oe = ["image/jpeg", "image/png",
|
|
|
28
29
|
f.union([f.string().min(1), f.instanceof(File)])
|
|
29
30
|
);
|
|
30
31
|
function ie(o) {
|
|
31
|
-
return /* @__PURE__ */ e($, { ...o, children: /* @__PURE__ */ e(
|
|
32
|
+
return /* @__PURE__ */ e($, { ...o, children: /* @__PURE__ */ e(ce, { ...o, children: o.children }) });
|
|
32
33
|
}
|
|
33
34
|
const ae = (o) => new Promise((s, i) => {
|
|
34
35
|
const n = new FileReader();
|
|
@@ -41,14 +42,14 @@ function O(o) {
|
|
|
41
42
|
(s) => s.responseType && !ue.includes(s.responseType)
|
|
42
43
|
);
|
|
43
44
|
}
|
|
44
|
-
function
|
|
45
|
+
function me(o) {
|
|
45
46
|
return o.some((s) => s.responseType === u.Persona);
|
|
46
47
|
}
|
|
47
|
-
function
|
|
48
|
+
function ce({ companyId: o, requestId: s, dictionary: i }) {
|
|
48
49
|
ee("InformationRequests.InformationRequestForm", i), A("InformationRequests.InformationRequestForm");
|
|
49
|
-
const { t: n } = D("InformationRequests.InformationRequestForm"), { Alert: T, Heading: q, Text:
|
|
50
|
+
const { t: n } = D("InformationRequests.InformationRequestForm"), { Alert: T, Heading: q, Text: m } = _(), { onEvent: g, baseSubmitHandler: I } = J(), { data: x } = P({
|
|
50
51
|
companyUuid: o
|
|
51
|
-
}), l = x.informationRequestList?.find((t) => t.uuid === s), a = l?.requiredQuestions ?? [], F = l?.blockingPayroll ?? !1, w = O(a), E =
|
|
52
|
+
}), l = x.informationRequestList?.find((t) => t.uuid === s), a = l?.requiredQuestions ?? [], F = l?.blockingPayroll ?? !1, w = O(a), E = me(a), { mutateAsync: L } = V(), v = {}, U = [];
|
|
52
53
|
a.forEach((t) => {
|
|
53
54
|
!t.questionUuid || !t.responseType || (t.responseType === u.Text ? (U.push(t.questionUuid), v[t.questionUuid] = "") : t.responseType === u.Document && (U.push(t.questionUuid), v[t.questionUuid] = void 0));
|
|
54
55
|
});
|
|
@@ -90,10 +91,10 @@ function me({ companyId: o, requestId: s, dictionary: i }) {
|
|
|
90
91
|
}, k = (t) => {
|
|
91
92
|
if (!t.questionUuid || !t.responseType) return null;
|
|
92
93
|
const R = t.questionUuid, h = t.responseType === u.Document, b = t.responseType === u.Text;
|
|
93
|
-
return /* @__PURE__ */
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
/* @__PURE__ */ e(
|
|
96
|
-
/* @__PURE__ */ e(
|
|
94
|
+
return /* @__PURE__ */ c("div", { className: r.questionCard, children: [
|
|
95
|
+
/* @__PURE__ */ c("div", { className: r.questionDescription, children: [
|
|
96
|
+
/* @__PURE__ */ e(m, { size: "sm", weight: "medium", children: n(h ? "questionTypes.document" : "questionTypes.answer") }),
|
|
97
|
+
/* @__PURE__ */ e(m, { size: "sm", variant: "supporting", children: /* @__PURE__ */ e(
|
|
97
98
|
"span",
|
|
98
99
|
{
|
|
99
100
|
dangerouslySetInnerHTML: {
|
|
@@ -124,17 +125,17 @@ function me({ companyId: o, requestId: s, dictionary: i }) {
|
|
|
124
125
|
}
|
|
125
126
|
) })
|
|
126
127
|
] }, R);
|
|
127
|
-
}, j = /* @__PURE__ */
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
-
/* @__PURE__ */ e(
|
|
130
|
-
/* @__PURE__ */ e(
|
|
128
|
+
}, j = /* @__PURE__ */ c("div", { className: r.questionCard, children: [
|
|
129
|
+
/* @__PURE__ */ c("div", { className: r.questionDescription, children: [
|
|
130
|
+
/* @__PURE__ */ e(m, { weight: "medium", children: n(E ? "unsupported.persona.title" : "unsupported.generic.title") }),
|
|
131
|
+
/* @__PURE__ */ e(m, { children: n(
|
|
131
132
|
E ? "unsupported.persona.description" : "unsupported.generic.description"
|
|
132
133
|
) })
|
|
133
134
|
] }),
|
|
134
135
|
/* @__PURE__ */ e("hr", { className: r.divider }),
|
|
135
|
-
/* @__PURE__ */ e("div", { className: r.contactSupport, children: /* @__PURE__ */ e(
|
|
136
|
+
/* @__PURE__ */ e("div", { className: r.contactSupport, children: /* @__PURE__ */ e(m, { variant: "supporting", children: n("unsupported.contactSupport") }) })
|
|
136
137
|
] });
|
|
137
|
-
return /* @__PURE__ */ e("div", { className: r.root, children: /* @__PURE__ */
|
|
138
|
+
return /* @__PURE__ */ e("div", { className: r.root, children: /* @__PURE__ */ c(y, { flexDirection: "column", gap: 16, children: [
|
|
138
139
|
/* @__PURE__ */ e(q, { as: "h2", children: n("title") }),
|
|
139
140
|
F && /* @__PURE__ */ e(T, { status: "error", label: n("blockingAlert.title"), disableScrollIntoView: !0, children: n("blockingAlert.description") }),
|
|
140
141
|
w ? j : /* @__PURE__ */ e(H, { ...N, children: /* @__PURE__ */ e(Z, { id: M, onSubmit: N.handleSubmit(Q), children: /* @__PURE__ */ e(y, { flexDirection: "column", gap: 16, children: a.map(k) }) }) })
|
|
@@ -151,7 +152,7 @@ const le = ({ onEvent: o }) => {
|
|
|
151
152
|
}) > 0, a = () => {
|
|
152
153
|
o(C.INFORMATION_REQUEST_FORM_CANCEL);
|
|
153
154
|
};
|
|
154
|
-
return I ? /* @__PURE__ */ e(y, { justifyContent: "flex-end", gap: 12, children: /* @__PURE__ */ e(i, { variant: "secondary", onClick: a, children: s("cta.close") }) }) : /* @__PURE__ */
|
|
155
|
+
return I ? /* @__PURE__ */ e(y, { justifyContent: "flex-end", gap: 12, children: /* @__PURE__ */ e(i, { variant: "secondary", onClick: a, children: s("cta.close") }) }) : /* @__PURE__ */ c(y, { justifyContent: "flex-end", gap: 12, children: [
|
|
155
156
|
/* @__PURE__ */ e(i, { variant: "secondary", onClick: a, isDisabled: l, children: s("cta.cancel") }),
|
|
156
157
|
/* @__PURE__ */ e(
|
|
157
158
|
i,
|