@gusto/embedded-react-sdk 0.33.0 → 0.35.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +63 -0
- package/dist/components/Base/Base.d.ts +6 -2
- package/dist/components/Base/Base.js +105 -59
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Base/useBase.d.ts +1 -0
- package/dist/components/Base/useBase.js.map +1 -1
- package/dist/components/Base/useBaseSubmit.d.ts +1 -1
- package/dist/components/Base/useBaseSubmit.js +60 -33
- package/dist/components/Base/useBaseSubmit.js.map +1 -1
- package/dist/components/Common/Fields/MultiSelectComboBoxField/MultiSelectComboBoxField.d.ts +5 -0
- package/dist/components/Common/Fields/MultiSelectComboBoxField/MultiSelectComboBoxField.js +34 -0
- package/dist/components/Common/Fields/MultiSelectComboBoxField/MultiSelectComboBoxField.js.map +1 -0
- package/dist/components/Common/Fields/MultiSelectComboBoxField/index.d.ts +2 -0
- package/dist/components/Common/HamburgerMenu/HamburgerMenu.d.ts +1 -1
- package/dist/components/Common/HamburgerMenu/HamburgerMenu.js +15 -13
- package/dist/components/Common/HamburgerMenu/HamburgerMenu.js.map +1 -1
- package/dist/components/Common/HamburgerMenu/HamburgerMenuTypes.d.ts +1 -0
- package/dist/components/Common/SignatureForm/SignatureForm.d.ts +1 -7
- package/dist/components/Common/SignatureForm/SignatureForm.js +12 -11
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +1 -1
- package/dist/components/Common/UI/Menu/Menu.js +24 -24
- package/dist/components/Common/UI/Menu/Menu.js.map +1 -1
- package/dist/components/Common/UI/Menu/Menu.module.scss.js +7 -7
- package/dist/components/Common/UI/Menu/MenuTypes.d.ts +5 -0
- package/dist/components/Common/UI/Menu/MenuTypes.js +4 -3
- package/dist/components/Common/UI/Menu/MenuTypes.js.map +1 -1
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.d.ts +2 -0
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js +127 -0
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js.map +1 -0
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.module.scss.js +16 -0
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.module.scss.js.map +1 -0
- package/dist/components/Common/{MultiSelectComboBox → UI/MultiSelectComboBox}/MultiSelectComboBoxTypes.d.ts +6 -5
- package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
- package/dist/components/Common/index.d.ts +1 -0
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +5 -6
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Schema.d.ts +4 -30
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.d.ts +2 -26
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +4 -5
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.d.ts +1 -7
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +5 -4
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.d.ts +1 -7
- 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/DocumentList.js +2 -2
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +2 -2
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +2 -2
- 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.d.ts +7 -13
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +1 -1
- package/dist/components/Company/Industry/Context.js +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.d.ts +7 -20
- package/dist/components/Company/Locations/LocationForm/Form.js +4 -5
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +2 -2
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +2 -2
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +3 -2
- 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 +2 -2
- package/dist/components/Company/OnboardingOverview/context.js +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +2 -2
- package/dist/components/Company/PaySchedule/_parts/Edit.js +9 -10
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +9 -8
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +12 -11
- package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.d.ts +7 -18
- package/dist/components/Company/PaySchedule/usePaySchedule.js +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +1 -1
- package/dist/components/Contractor/Address/Address.js +2 -2
- package/dist/components/Contractor/Address/Form.js +6 -7
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.d.ts +1 -13
- package/dist/components/Contractor/Address/useAddress.js +1 -1
- package/dist/components/Contractor/ContractorList/index.js +17 -17
- package/dist/components/Contractor/ContractorList/useContractorList.js +4 -4
- package/dist/components/Contractor/ContractorList/useContractorList.js.map +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.d.ts +5 -15
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +28 -28
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.d.ts +7 -20
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.d.ts +5 -6
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +119 -113
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.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/EditContractorPaymentFormSchema.d.ts +19 -67
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +2 -3
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +18 -17
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +27 -26
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js +76 -44
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.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/PaymentStatement.js +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +7 -6
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.d.ts +3 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js +28 -22
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.d.ts +3 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +66 -54
- 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/useContractorProfile.d.ts +54 -120
- package/dist/components/Contractor/Profile/useContractorProfile.js +50 -49
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +1 -1
- package/dist/components/Employee/Compensation/Edit.js +70 -70
- package/dist/components/Employee/Compensation/Edit.js.map +1 -1
- package/dist/components/Employee/Compensation/useCompensation.d.ts +17 -44
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.d.ts +4 -22
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +61 -61
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +4 -22
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +34 -34
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.d.ts +5 -27
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +47 -47
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +2 -3
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
- package/dist/components/Employee/Deductions/useDeductions.d.ts +7 -26
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +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 +1 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +3 -2
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.d.ts +5 -29
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js +8 -8
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.d.ts +9 -76
- package/dist/components/Employee/DocumentSigner/SignatureForm/Form.js +5 -5
- package/dist/components/Employee/DocumentSigner/SignatureForm/Form.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/Preview.js +8 -8
- package/dist/components/Employee/DocumentSigner/SignatureForm/Preview.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +1 -1
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.d.ts +1 -5
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +3 -2
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js +4 -3
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Head.js +3 -2
- package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.d.ts +7 -33
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +1 -1
- package/dist/components/Employee/Landing/Landing.js +8 -8
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
- package/dist/components/Employee/PaymentMethod/BankAccount.d.ts +5 -14
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.d.ts +5 -6
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.d.ts +12 -68
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +17 -16
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.d.ts +17 -82
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +38 -33
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/HomeAddress.d.ts +11 -66
- package/dist/components/Employee/Profile/HomeAddress.js +8 -9
- package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.d.ts +15 -64
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +31 -28
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
- package/dist/components/Employee/Profile/Profile.js +2 -5
- package/dist/components/Employee/Profile/Profile.js.map +1 -1
- package/dist/components/Employee/Profile/SelfPersonalDetails.d.ts +8 -37
- package/dist/components/Employee/Profile/SelfPersonalDetails.js +22 -19
- package/dist/components/Employee/Profile/SelfPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.js +1 -1
- package/dist/components/Employee/StateTaxes/StateForm.d.ts +1 -5
- package/dist/components/Employee/StateTaxes/StateTaxes.js +69 -61
- package/dist/components/Employee/StateTaxes/StateTaxes.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +1 -1
- package/dist/components/Employee/Taxes/FederalForm.d.ts +7 -33
- package/dist/components/Employee/Taxes/StateForm.d.ts +1 -5
- package/dist/components/Employee/Taxes/useTaxes.js +1 -1
- package/dist/components/Flow/Flow.js +3 -2
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +9 -9
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +4 -4
- package/dist/components/InformationRequests/InformationRequests.js +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.d.ts +1 -11
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.d.ts +2 -0
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +101 -0
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -0
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.module.scss.js +16 -0
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.module.scss.js.map +1 -0
- package/dist/components/Payroll/GrossUpModal/GrossUpModalTypes.d.ts +7 -0
- package/dist/components/Payroll/GrossUpModal/index.d.ts +3 -0
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +6 -9
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +104 -57
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.d.ts +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +93 -24
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationTypes.d.ts +11 -0
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.d.ts +2 -22
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +102 -0
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -0
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.module.scss.js +14 -0
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.module.scss.js.map +1 -0
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.js +52 -0
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.js.map +1 -0
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.module.scss.js +16 -0
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.module.scss.js.map +1 -0
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.d.ts +12 -2
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.js +15 -0
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.js.map +1 -0
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/index.d.ts +2 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +3 -2
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +12 -12
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +212 -120
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +3 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +88 -77
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/grossUpHelpers.d.ts +2 -0
- package/dist/components/Payroll/PayrollConfiguration/grossUpHelpers.js +11 -0
- package/dist/components/Payroll/PayrollConfiguration/grossUpHelpers.js.map +1 -0
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +67 -57
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +5 -5
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +2 -12
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +36 -37
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +13 -12
- 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 +3 -2
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +2 -3
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +8 -7
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +3 -2
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +6 -6
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +3 -2
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +47 -46
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/contexts/ApiProvider/ApiProvider.js +26 -25
- package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
- package/dist/contexts/ApiProvider/apiVersionHook.d.ts +2 -0
- package/dist/contexts/ApiProvider/apiVersionHook.js +7 -0
- package/dist/contexts/ApiProvider/apiVersionHook.js.map +1 -0
- package/dist/contexts/ApiProvider/apiVersionHook.test.d.ts +1 -0
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +60 -58
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
- package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +2 -0
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +58 -39
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/ObservabilityProvider/ObservabilityContext.d.ts +5 -0
- package/dist/contexts/ObservabilityProvider/ObservabilityContext.js +6 -0
- package/dist/contexts/ObservabilityProvider/ObservabilityContext.js.map +1 -0
- package/dist/contexts/ObservabilityProvider/ObservabilityProvider.d.ts +7 -0
- package/dist/contexts/ObservabilityProvider/ObservabilityProvider.js +11 -0
- package/dist/contexts/ObservabilityProvider/ObservabilityProvider.js.map +1 -0
- package/dist/contexts/ObservabilityProvider/index.d.ts +5 -0
- package/dist/contexts/ObservabilityProvider/observabilityUtils.d.ts +5 -0
- package/dist/contexts/ObservabilityProvider/observabilityUtils.js +45 -0
- package/dist/contexts/ObservabilityProvider/observabilityUtils.js.map +1 -0
- package/dist/contexts/ObservabilityProvider/sanitization.d.ts +19 -0
- package/dist/contexts/ObservabilityProvider/sanitization.js +95 -0
- package/dist/contexts/ObservabilityProvider/sanitization.js.map +1 -0
- package/dist/contexts/ObservabilityProvider/sanitization.test.d.ts +1 -0
- package/dist/contexts/ObservabilityProvider/useObservability.d.ts +2 -0
- package/dist/contexts/ObservabilityProvider/useObservability.js +11 -0
- package/dist/contexts/ObservabilityProvider/useObservability.js.map +1 -0
- package/dist/contexts/ObservabilityProvider/useSanitizedObservability.d.ts +8 -0
- package/dist/contexts/ObservabilityProvider/useSanitizedObservability.js +28 -0
- package/dist/contexts/ObservabilityProvider/useSanitizedObservability.js.map +1 -0
- package/dist/contexts/ThemeProvider/ThemeProvider.js +23 -23
- package/dist/contexts/ThemeProvider/ThemeProvider.js.map +1 -1
- package/dist/contexts/index.d.ts +2 -0
- package/dist/helpers/formattedStrings.js +12 -13
- package/dist/helpers/formattedStrings.js.map +1 -1
- package/dist/helpers/rem.d.ts +7 -3
- package/dist/helpers/rem.js +14 -10
- package/dist/helpers/rem.js.map +1 -1
- package/dist/helpers/rem.test.d.ts +1 -0
- package/dist/helpers/retryAsync.d.ts +7 -0
- package/dist/helpers/retryAsync.js +18 -0
- package/dist/helpers/retryAsync.js.map +1 -0
- package/dist/helpers/validations.d.ts +2 -2
- package/dist/i18n/I18n.js +1 -1
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.PaySchedule.json.js +1 -1
- package/dist/i18n/en/Contractor.Payments.PaymentSummary.json.js +42 -40
- package/dist/i18n/en/Contractor.Payments.PaymentSummary.json.js.map +1 -1
- package/dist/i18n/en/Contractor.Payments.PaymentsList.json.js +9 -9
- package/dist/i18n/en/Payroll.EmployeeSelection.json.js +10 -0
- package/dist/i18n/en/Payroll.EmployeeSelection.json.js.map +1 -0
- package/dist/i18n/en/Payroll.GrossUpModal.json.js +24 -0
- package/dist/i18n/en/Payroll.GrossUpModal.json.js.map +1 -0
- package/dist/i18n/en/Payroll.OffCycleCreation.json.js +10 -8
- package/dist/i18n/en/Payroll.OffCycleCreation.json.js.map +1 -1
- package/dist/i18n/en/Payroll.OffCycleTaxWithholding.json.js +13 -11
- package/dist/i18n/en/Payroll.OffCycleTaxWithholding.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +19 -13
- package/dist/index.js.map +1 -1
- package/dist/shared/constants.d.ts +5 -0
- package/dist/shared/constants.js +11 -8
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +36 -1
- package/dist/types/observability.d.ts +145 -0
- package/docs/reference/endpoint-inventory.json +14 -1
- package/package.json +25 -24
- package/dist/components/Common/MultiSelectComboBox/MultiSelectComboBox.d.ts +0 -2
- /package/dist/components/Common/{MultiSelectComboBox → UI/MultiSelectComboBox}/index.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmploymentEligibilitySchema.js","sources":["../../../../../src/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.ts"],"sourcesContent":["import { z } from 'zod'\nimport {\n AuthorizationStatus,\n I9AuthorizationDocumentType,\n} from '@gusto/embedded-api/models/components/i9authorization'\n\nconst isValidUscisNumber = (value: string) => /^[Aa]?\\d{7,9}$/.test(value)\nconst isValidI94Number = (value: string) => /^\\d{9} ?[A-Za-z\\d]\\d$/.test(value)\n\nexport const generateEmploymentEligibilitySchema = (hasDocumentNumber?: boolean | null) =>\n z\n .object({\n authorizationStatus: z.
|
|
1
|
+
{"version":3,"file":"EmploymentEligibilitySchema.js","sources":["../../../../../src/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.ts"],"sourcesContent":["import { z } from 'zod'\nimport {\n AuthorizationStatus,\n I9AuthorizationDocumentType,\n} from '@gusto/embedded-api/models/components/i9authorization'\n\nconst isValidUscisNumber = (value: string) => /^[Aa]?\\d{7,9}$/.test(value)\nconst isValidI94Number = (value: string) => /^\\d{9} ?[A-Za-z\\d]\\d$/.test(value)\n\nexport const generateEmploymentEligibilitySchema = (hasDocumentNumber?: boolean | null) =>\n z\n .object({\n authorizationStatus: z.enum(AuthorizationStatus).optional(),\n documentType: z.enum(I9AuthorizationDocumentType).optional(),\n documentNumber: z.string().optional(),\n expirationDate: z\n .date()\n .transform(date => date.toISOString().split('T')[0])\n .optional(),\n country: z.string().optional(),\n })\n .superRefine((data, ctx) => {\n if (!data.authorizationStatus) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Authorization status is required',\n path: ['authorizationStatus'],\n })\n return\n }\n if (data.authorizationStatus === 'permanent_resident') {\n if (!data.documentNumber) {\n if (!hasDocumentNumber) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Document number is required',\n path: ['documentNumber'],\n })\n }\n } else if (!isValidUscisNumber(data.documentNumber)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Enter a 7-9 digit USCIS number or A-Number (e.g. A123456789)',\n path: ['documentNumber'],\n })\n }\n }\n if (data.authorizationStatus === 'alien') {\n if (!data.documentType) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Authorization document is required',\n path: ['documentType'],\n })\n }\n if (!data.documentNumber) {\n if (!hasDocumentNumber) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Document number is required',\n path: ['documentNumber'],\n })\n }\n } else if (\n data.documentType === 'uscis_alien_registration_number' &&\n !isValidUscisNumber(data.documentNumber)\n ) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Enter a 7-9 digit USCIS number or A-Number (e.g. A123456789)',\n path: ['documentNumber'],\n })\n } else if (data.documentType === 'form_i94' && !isValidI94Number(data.documentNumber)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Enter a valid 11-character Form I-94 admission number',\n path: ['documentNumber'],\n })\n }\n if (data.documentType === 'foreign_passport' && !data.country) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Country of issuance is required',\n path: ['country'],\n })\n }\n }\n })\n\nexport type EmploymentEligibilityInputs = z.input<\n ReturnType<typeof generateEmploymentEligibilitySchema>\n>\nexport type EmploymentEligibilityPayload = z.infer<\n ReturnType<typeof generateEmploymentEligibilitySchema>\n>\n"],"names":["isValidUscisNumber","value","isValidI94Number","generateEmploymentEligibilitySchema","hasDocumentNumber","z","AuthorizationStatus","I9AuthorizationDocumentType","date","data","ctx"],"mappings":";;AAMA,MAAMA,IAAqB,CAACC,MAAkB,iBAAiB,KA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,CAAC,gBAAgB;AAAA,EAAA,CACxB,IACQI,EAAK,iBAAiB,cAAc,CAACP,EAAiBO,EAAK,cAAc,KAClFC,EAAI,SAAS;AAAA,IACX,MAAML,EAAE,aAAa;AAAA,IACrB,SAAS;AAAA,IACT,MAAM,CAAC,gBAAgB;AAAA,EAAA,CACxB,IArBID,KACHM,EAAI,SAAS;AAAA,IACX,MAAML,EAAE,aAAa;AAAA,IACrB,SAAS;AAAA,IACT,MAAM,CAAC,gBAAgB;AAAA,EAAA,CACxB,GAkBDI,EAAK,iBAAiB,sBAAsB,CAACA,EAAK,WACpDC,EAAI,SAAS;AAAA,IACX,MAAML,EAAE,aAAa;AAAA,IACrB,SAAS;AAAA,IACT,MAAM,CAAC,SAAS;AAAA,EAAA,CACjB;AAGP,CAAC;"}
|
|
@@ -9,33 +9,16 @@ declare const preparerSchema: z.ZodObject<{
|
|
|
9
9
|
state: z.ZodString;
|
|
10
10
|
zip: z.ZodString;
|
|
11
11
|
signature: z.ZodString;
|
|
12
|
-
agree: z.
|
|
13
|
-
},
|
|
14
|
-
firstName: string;
|
|
15
|
-
lastName: string;
|
|
16
|
-
street1: string;
|
|
17
|
-
city: string;
|
|
18
|
-
state: string;
|
|
19
|
-
zip: string;
|
|
20
|
-
signature: string;
|
|
21
|
-
agree: boolean;
|
|
22
|
-
street2?: string | undefined;
|
|
23
|
-
}, {
|
|
24
|
-
firstName: string;
|
|
25
|
-
lastName: string;
|
|
26
|
-
street1: string;
|
|
27
|
-
city: string;
|
|
28
|
-
state: string;
|
|
29
|
-
zip: string;
|
|
30
|
-
signature: string;
|
|
31
|
-
agree: boolean;
|
|
32
|
-
street2?: string | undefined;
|
|
33
|
-
}>;
|
|
12
|
+
agree: z.ZodBoolean;
|
|
13
|
+
}, z.core.$strip>;
|
|
34
14
|
export type PreparerInputs = z.infer<typeof preparerSchema>;
|
|
35
15
|
declare const i9SignatureFormSchema: z.ZodObject<{
|
|
36
16
|
signature: z.ZodString;
|
|
37
17
|
agree: z.ZodLiteral<true>;
|
|
38
|
-
usedPreparer: z.ZodEnum<
|
|
18
|
+
usedPreparer: z.ZodEnum<{
|
|
19
|
+
yes: "yes";
|
|
20
|
+
no: "no";
|
|
21
|
+
}>;
|
|
39
22
|
preparers: z.ZodArray<z.ZodObject<{
|
|
40
23
|
firstName: z.ZodString;
|
|
41
24
|
lastName: z.ZodString;
|
|
@@ -45,59 +28,9 @@ declare const i9SignatureFormSchema: z.ZodObject<{
|
|
|
45
28
|
state: z.ZodString;
|
|
46
29
|
zip: z.ZodString;
|
|
47
30
|
signature: z.ZodString;
|
|
48
|
-
agree: z.
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
lastName: string;
|
|
52
|
-
street1: string;
|
|
53
|
-
city: string;
|
|
54
|
-
state: string;
|
|
55
|
-
zip: string;
|
|
56
|
-
signature: string;
|
|
57
|
-
agree: boolean;
|
|
58
|
-
street2?: string | undefined;
|
|
59
|
-
}, {
|
|
60
|
-
firstName: string;
|
|
61
|
-
lastName: string;
|
|
62
|
-
street1: string;
|
|
63
|
-
city: string;
|
|
64
|
-
state: string;
|
|
65
|
-
zip: string;
|
|
66
|
-
signature: string;
|
|
67
|
-
agree: boolean;
|
|
68
|
-
street2?: string | undefined;
|
|
69
|
-
}>, "many">;
|
|
70
|
-
}, "strip", z.ZodTypeAny, {
|
|
71
|
-
signature: string;
|
|
72
|
-
agree: true;
|
|
73
|
-
usedPreparer: "yes" | "no";
|
|
74
|
-
preparers: {
|
|
75
|
-
firstName: string;
|
|
76
|
-
lastName: string;
|
|
77
|
-
street1: string;
|
|
78
|
-
city: string;
|
|
79
|
-
state: string;
|
|
80
|
-
zip: string;
|
|
81
|
-
signature: string;
|
|
82
|
-
agree: boolean;
|
|
83
|
-
street2?: string | undefined;
|
|
84
|
-
}[];
|
|
85
|
-
}, {
|
|
86
|
-
signature: string;
|
|
87
|
-
agree: true;
|
|
88
|
-
usedPreparer: "yes" | "no";
|
|
89
|
-
preparers: {
|
|
90
|
-
firstName: string;
|
|
91
|
-
lastName: string;
|
|
92
|
-
street1: string;
|
|
93
|
-
city: string;
|
|
94
|
-
state: string;
|
|
95
|
-
zip: string;
|
|
96
|
-
signature: string;
|
|
97
|
-
agree: boolean;
|
|
98
|
-
street2?: string | undefined;
|
|
99
|
-
}[];
|
|
100
|
-
}>;
|
|
31
|
+
agree: z.ZodBoolean;
|
|
32
|
+
}, z.core.$strip>>;
|
|
33
|
+
}, z.core.$strip>;
|
|
101
34
|
export type I9SignatureFormInputs = z.infer<typeof i9SignatureFormSchema>;
|
|
102
35
|
interface I9SignatureFormProps extends CommonComponentInterface {
|
|
103
36
|
employeeId: string;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { SignatureFormFields as
|
|
2
|
+
import { useTranslation as e } from "react-i18next";
|
|
3
|
+
import { SignatureFormFields as o } from "../../../Common/SignatureForm/SignatureFormFields.js";
|
|
4
4
|
function m() {
|
|
5
|
-
const { t: r } =
|
|
5
|
+
const { t: r } = e("Employee.DocumentSigner");
|
|
6
6
|
return /* @__PURE__ */ i(
|
|
7
|
-
|
|
7
|
+
o,
|
|
8
8
|
{
|
|
9
|
-
signatureLabel: "
|
|
9
|
+
signatureLabel: r("signatureFieldLabel"),
|
|
10
10
|
signatureDescription: r("signatureFieldDescription"),
|
|
11
11
|
signatureError: r("signatureFieldError"),
|
|
12
12
|
confirmationLabel: r("confirmSignatureCheckboxLabel"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/Form.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { SignatureFormFields } from '@/components/Common/SignatureForm'\n\nexport function Form() {\n const { t } = useTranslation('Employee.DocumentSigner')\n return (\n <SignatureFormFields\n signatureLabel
|
|
1
|
+
{"version":3,"file":"Form.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/Form.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { SignatureFormFields } from '@/components/Common/SignatureForm'\n\nexport function Form() {\n const { t } = useTranslation('Employee.DocumentSigner')\n return (\n <SignatureFormFields\n signatureLabel={t('signatureFieldLabel')}\n signatureDescription={t('signatureFieldDescription')}\n signatureError={t('signatureFieldError')}\n confirmationLabel={t('confirmSignatureCheckboxLabel')}\n confirmationError={t('confirmSignatureError')}\n />\n )\n}\n"],"names":["Form","t","useTranslation","jsx","SignatureFormFields"],"mappings":";;;AAGO,SAASA,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB;AACtD,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,gBAAgBH,EAAE,qBAAqB;AAAA,MACvC,sBAAsBA,EAAE,2BAA2B;AAAA,MACnD,gBAAgBA,EAAE,qBAAqB;AAAA,MACvC,mBAAmBA,EAAE,+BAA+B;AAAA,MACpD,mBAAmBA,EAAE,uBAAuB;AAAA,IAAA;AAAA,EAAA;AAGlD;"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useTranslation as
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as n } from "react-i18next";
|
|
3
3
|
import { useSignatureForm as i } from "./useSignatureForm.js";
|
|
4
4
|
import { DocumentViewer as m } from "../../../Common/DocumentViewer/DocumentViewer.js";
|
|
5
|
-
function
|
|
6
|
-
const { form: t, pdfUrl:
|
|
7
|
-
return /* @__PURE__ */
|
|
5
|
+
function a() {
|
|
6
|
+
const { form: t, pdfUrl: e } = i(), { t: o } = n("Employee.DocumentSigner");
|
|
7
|
+
return /* @__PURE__ */ r(
|
|
8
8
|
m,
|
|
9
9
|
{
|
|
10
|
-
url:
|
|
10
|
+
url: e,
|
|
11
11
|
title: t.title,
|
|
12
|
-
downloadInstructions: o("
|
|
12
|
+
downloadInstructions: o("downloadAndReviewInstructions"),
|
|
13
13
|
viewDocumentLabel: o("viewDocumentCta")
|
|
14
14
|
}
|
|
15
15
|
);
|
|
16
16
|
}
|
|
17
17
|
export {
|
|
18
|
-
|
|
18
|
+
a as Preview
|
|
19
19
|
};
|
|
20
20
|
//# sourceMappingURL=Preview.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Preview.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/Preview.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useSignatureForm } from './useSignatureForm'\nimport { DocumentViewer } from '@/components/Common/DocumentViewer'\n\nexport function Preview() {\n const { form, pdfUrl } = useSignatureForm()\n const { t } = useTranslation('
|
|
1
|
+
{"version":3,"file":"Preview.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/Preview.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useSignatureForm } from './useSignatureForm'\nimport { DocumentViewer } from '@/components/Common/DocumentViewer'\n\nexport function Preview() {\n const { form, pdfUrl } = useSignatureForm()\n const { t } = useTranslation('Employee.DocumentSigner')\n\n return (\n <DocumentViewer\n url={pdfUrl}\n title={form.title}\n downloadInstructions={t('downloadAndReviewInstructions')}\n viewDocumentLabel={t('viewDocumentCta')}\n />\n )\n}\n"],"names":["Preview","form","pdfUrl","useSignatureForm","t","useTranslation","jsx","DocumentViewer"],"mappings":";;;;AAIO,SAASA,IAAU;AACxB,QAAM,EAAE,MAAAC,GAAM,QAAAC,EAAA,IAAWC,EAAA,GACnB,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB;AAEtD,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAKL;AAAA,MACL,OAAOD,EAAK;AAAA,MACZ,sBAAsBG,EAAE,+BAA+B;AAAA,MACvD,mBAAmBA,EAAE,iBAAiB;AAAA,IAAA;AAAA,EAAA;AAG5C;"}
|
|
@@ -12,8 +12,8 @@ import { useBase as C } from "../../../Base/useBase.js";
|
|
|
12
12
|
import { useI18n as G } from "../../../../i18n/I18n.js";
|
|
13
13
|
import { componentEvents as i } from "../../../../shared/constants.js";
|
|
14
14
|
import { Flex as M } from "../../../Common/Flex/Flex.js";
|
|
15
|
-
import "react-i18next";
|
|
16
15
|
import "classnames";
|
|
16
|
+
import "react-i18next";
|
|
17
17
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
18
18
|
import "react";
|
|
19
19
|
import { SignatureForm as R } from "../../../Common/SignatureForm/SignatureForm.js";
|
|
@@ -9,8 +9,8 @@ import "../../../Base/useBase.js";
|
|
|
9
9
|
import "../../../../shared/constants.js";
|
|
10
10
|
import "classnames";
|
|
11
11
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
|
+
import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
12
13
|
import "dompurify";
|
|
13
|
-
import "../../../../contexts/LocaleProvider/useLocale.js";
|
|
14
14
|
import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
|
|
15
15
|
const [c, d] = o("SignatureFormContext");
|
|
16
16
|
export {
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
declare const EmployeeDocumentsSchema: z.ZodObject<{
|
|
3
3
|
includeI9: z.ZodBoolean;
|
|
4
|
-
},
|
|
5
|
-
includeI9: boolean;
|
|
6
|
-
}, {
|
|
7
|
-
includeI9: boolean;
|
|
8
|
-
}>;
|
|
4
|
+
}, z.core.$strip>;
|
|
9
5
|
export type EmployeeDocumentsFormValues = z.infer<typeof EmployeeDocumentsSchema>;
|
|
10
6
|
export interface EmployeeDocumentsPresentationProps {
|
|
11
7
|
isEmployeeSelfOnboarding: boolean;
|
|
@@ -5,6 +5,7 @@ import { zodResolver as E } from "@hookform/resolvers/zod";
|
|
|
5
5
|
import { z as p } from "zod";
|
|
6
6
|
import { Flex as l, FlexItem as o } from "../../Common/Flex/Flex.js";
|
|
7
7
|
import "classnames";
|
|
8
|
+
import "../../../shared/constants.js";
|
|
8
9
|
import { useComponentContext as v } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
9
10
|
import "react";
|
|
10
11
|
import { Form as w } from "../../Common/Form/Form.js";
|
|
@@ -12,7 +13,7 @@ import { useI18n as C } from "../../../i18n/I18n.js";
|
|
|
12
13
|
import { CheckboxField as F } from "../../Common/Fields/CheckboxField/CheckboxField.js";
|
|
13
14
|
const u = "gusto-sdk-employee-documents-form", T = p.object({
|
|
14
15
|
includeI9: p.boolean()
|
|
15
|
-
}),
|
|
16
|
+
}), Y = ({
|
|
16
17
|
isEmployeeSelfOnboarding: a,
|
|
17
18
|
currentI9Status: g,
|
|
18
19
|
onSubmit: f,
|
|
@@ -110,6 +111,6 @@ const u = "gusto-sdk-employee-documents-form", T = p.object({
|
|
|
110
111
|
] }) });
|
|
111
112
|
};
|
|
112
113
|
export {
|
|
113
|
-
|
|
114
|
+
Y as EmployeeDocumentsPresentation
|
|
114
115
|
};
|
|
115
116
|
//# sourceMappingURL=EmployeeDocumentsPresentation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmployeeDocumentsPresentation.js","sources":["../../../../src/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { z } from 'zod'\nimport { Flex, CheckboxField, FlexItem } from '@/components/Common'\nimport { Form } from '@/components/Common/Form'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\n\nconst EMPLOYEE_DOCUMENTS_FORM_ID = 'gusto-sdk-employee-documents-form'\n\nconst EmployeeDocumentsSchema = z.object({\n includeI9: z.boolean(),\n})\n\nexport type EmployeeDocumentsFormValues = z.infer<typeof EmployeeDocumentsSchema>\n\nexport interface EmployeeDocumentsPresentationProps {\n isEmployeeSelfOnboarding: boolean\n currentI9Status: boolean\n onSubmit: (formData: EmployeeDocumentsFormValues) => Promise<void>\n onDone: () => void\n isPending: boolean\n}\n\nexport const EmployeeDocumentsPresentation = ({\n isEmployeeSelfOnboarding,\n currentI9Status,\n onSubmit,\n onDone,\n isPending,\n}: EmployeeDocumentsPresentationProps) => {\n useI18n('Employee.EmployeeDocuments')\n const { t } = useTranslation('Employee.EmployeeDocuments')\n const { Alert, Heading, Text, Button, Link, UnorderedList } = useComponentContext()\n\n const formMethods = useForm<EmployeeDocumentsFormValues>({\n resolver: zodResolver(EmployeeDocumentsSchema),\n defaultValues: {\n includeI9: currentI9Status,\n },\n })\n\n const includeI9 = formMethods.watch('includeI9')\n\n const renderSelfOnboarding = () => (\n <FormProvider {...formMethods}>\n <Form id={EMPLOYEE_DOCUMENTS_FORM_ID} onSubmit={formMethods.handleSubmit(onSubmit)}>\n <Flex flexDirection=\"column\" gap={16}>\n <FlexItem>\n <Heading as=\"h2\">{t('selfOnboarding.title')}</Heading>\n <Text variant=\"supporting\">{t('selfOnboarding.description')}</Text>\n </FlexItem>\n\n <Heading as=\"h3\">{t('selfOnboarding.documentsIncludedLabel')}</Heading>\n <FlexItem>\n <Text weight=\"medium\">{t('selfOnboarding.taxWithholdingLabel')}</Text>\n <Text variant=\"supporting\">{t('selfOnboarding.taxWithholdingDescription')}</Text>\n </FlexItem>\n <FlexItem>\n <Text weight=\"medium\">{t('selfOnboarding.directDepositLabel')}</Text>\n <Text variant=\"supporting\">{t('selfOnboarding.directDepositDescription')}</Text>\n </FlexItem>\n\n <Heading as=\"h3\">{t('selfOnboarding.includeI9Heading')}</Heading>\n <CheckboxField\n name=\"includeI9\"\n label={t('selfOnboarding.includeI9Label')}\n description={t('selfOnboarding.includeI9Description')}\n />\n\n {includeI9 ? (\n <Alert status=\"warning\" label={t('selfOnboarding.alerts.includedTitle')}>\n <UnorderedList\n items={[\n <Trans\n key=\"included-description-1\"\n i18nKey={'selfOnboarding.alerts.includedDescription'}\n t={t}\n components={{\n Link: <Link />,\n }}\n />,\n <span key=\"included-description-2\">\n {t('selfOnboarding.alerts.includedDescription2')}\n </span>,\n ]}\n />\n </Alert>\n ) : (\n <Alert status=\"info\" label={t('selfOnboarding.alerts.notIncludedTitle')}>\n <Trans\n i18nKey={'selfOnboarding.alerts.notIncludedDescription'}\n t={t}\n components={{\n Link: <Link />,\n }}\n />\n </Alert>\n )}\n </Flex>\n </Form>\n </FormProvider>\n )\n\n const renderNotSelfOnboarding = () => (\n <Flex flexDirection=\"column\" gap={16}>\n <FlexItem>\n <Heading as=\"h2\">{t('notSelfOnboarding.title')}</Heading>\n <Text>{t('notSelfOnboarding.description')}</Text>\n </FlexItem>\n\n <FlexItem>\n <Text weight=\"medium\">{t('notSelfOnboarding.employmentEligibilityLabel')}</Text>\n <Text>{t('notSelfOnboarding.employmentEligibilityDescription')}</Text>\n </FlexItem>\n\n <FlexItem>\n <Text weight=\"medium\">{t('notSelfOnboarding.taxWithholdingLabel')}</Text>\n <Text>{t('notSelfOnboarding.taxWithholdingDescription')}</Text>\n </FlexItem>\n\n <FlexItem>\n <Text weight=\"medium\">{t('notSelfOnboarding.directDepositLabel')}</Text>\n <Text>{t('notSelfOnboarding.directDepositDescription')}</Text>\n </FlexItem>\n\n <Alert status=\"info\" label={t('notSelfOnboarding.alertTitle')} disableScrollIntoView></Alert>\n </Flex>\n )\n\n return (\n <>\n <Flex flexDirection=\"column\" gap={16}>\n {isEmployeeSelfOnboarding ? renderSelfOnboarding() : renderNotSelfOnboarding()}\n\n <Flex justifyContent=\"flex-end\" gap={12}>\n {isEmployeeSelfOnboarding ? (\n <Button\n variant=\"primary\"\n type=\"submit\"\n form={EMPLOYEE_DOCUMENTS_FORM_ID}\n isLoading={isPending}\n >\n {t('continueCta')}\n </Button>\n ) : (\n <Button variant=\"primary\" onClick={onDone}>\n {t('continueCta')}\n </Button>\n )}\n </Flex>\n </Flex>\n </>\n )\n}\n"],"names":["EMPLOYEE_DOCUMENTS_FORM_ID","EmployeeDocumentsSchema","z","EmployeeDocumentsPresentation","isEmployeeSelfOnboarding","currentI9Status","onSubmit","onDone","isPending","useI18n","t","useTranslation","Alert","Heading","Text","Button","Link","UnorderedList","useComponentContext","formMethods","useForm","zodResolver","includeI9","jsxs","Flex","jsx","FormProvider","Form","FlexItem","CheckboxField","Trans"],"mappings":"
|
|
1
|
+
{"version":3,"file":"EmployeeDocumentsPresentation.js","sources":["../../../../src/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { z } from 'zod'\nimport { Flex, CheckboxField, FlexItem } from '@/components/Common'\nimport { Form } from '@/components/Common/Form'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\n\nconst EMPLOYEE_DOCUMENTS_FORM_ID = 'gusto-sdk-employee-documents-form'\n\nconst EmployeeDocumentsSchema = z.object({\n includeI9: z.boolean(),\n})\n\nexport type EmployeeDocumentsFormValues = z.infer<typeof EmployeeDocumentsSchema>\n\nexport interface EmployeeDocumentsPresentationProps {\n isEmployeeSelfOnboarding: boolean\n currentI9Status: boolean\n onSubmit: (formData: EmployeeDocumentsFormValues) => Promise<void>\n onDone: () => void\n isPending: boolean\n}\n\nexport const EmployeeDocumentsPresentation = ({\n isEmployeeSelfOnboarding,\n currentI9Status,\n onSubmit,\n onDone,\n isPending,\n}: EmployeeDocumentsPresentationProps) => {\n useI18n('Employee.EmployeeDocuments')\n const { t } = useTranslation('Employee.EmployeeDocuments')\n const { Alert, Heading, Text, Button, Link, UnorderedList } = useComponentContext()\n\n const formMethods = useForm<EmployeeDocumentsFormValues>({\n resolver: zodResolver(EmployeeDocumentsSchema),\n defaultValues: {\n includeI9: currentI9Status,\n },\n })\n\n const includeI9 = formMethods.watch('includeI9')\n\n const renderSelfOnboarding = () => (\n <FormProvider {...formMethods}>\n <Form id={EMPLOYEE_DOCUMENTS_FORM_ID} onSubmit={formMethods.handleSubmit(onSubmit)}>\n <Flex flexDirection=\"column\" gap={16}>\n <FlexItem>\n <Heading as=\"h2\">{t('selfOnboarding.title')}</Heading>\n <Text variant=\"supporting\">{t('selfOnboarding.description')}</Text>\n </FlexItem>\n\n <Heading as=\"h3\">{t('selfOnboarding.documentsIncludedLabel')}</Heading>\n <FlexItem>\n <Text weight=\"medium\">{t('selfOnboarding.taxWithholdingLabel')}</Text>\n <Text variant=\"supporting\">{t('selfOnboarding.taxWithholdingDescription')}</Text>\n </FlexItem>\n <FlexItem>\n <Text weight=\"medium\">{t('selfOnboarding.directDepositLabel')}</Text>\n <Text variant=\"supporting\">{t('selfOnboarding.directDepositDescription')}</Text>\n </FlexItem>\n\n <Heading as=\"h3\">{t('selfOnboarding.includeI9Heading')}</Heading>\n <CheckboxField\n name=\"includeI9\"\n label={t('selfOnboarding.includeI9Label')}\n description={t('selfOnboarding.includeI9Description')}\n />\n\n {includeI9 ? (\n <Alert status=\"warning\" label={t('selfOnboarding.alerts.includedTitle')}>\n <UnorderedList\n items={[\n <Trans\n key=\"included-description-1\"\n i18nKey={'selfOnboarding.alerts.includedDescription'}\n t={t}\n components={{\n Link: <Link />,\n }}\n />,\n <span key=\"included-description-2\">\n {t('selfOnboarding.alerts.includedDescription2')}\n </span>,\n ]}\n />\n </Alert>\n ) : (\n <Alert status=\"info\" label={t('selfOnboarding.alerts.notIncludedTitle')}>\n <Trans\n i18nKey={'selfOnboarding.alerts.notIncludedDescription'}\n t={t}\n components={{\n Link: <Link />,\n }}\n />\n </Alert>\n )}\n </Flex>\n </Form>\n </FormProvider>\n )\n\n const renderNotSelfOnboarding = () => (\n <Flex flexDirection=\"column\" gap={16}>\n <FlexItem>\n <Heading as=\"h2\">{t('notSelfOnboarding.title')}</Heading>\n <Text>{t('notSelfOnboarding.description')}</Text>\n </FlexItem>\n\n <FlexItem>\n <Text weight=\"medium\">{t('notSelfOnboarding.employmentEligibilityLabel')}</Text>\n <Text>{t('notSelfOnboarding.employmentEligibilityDescription')}</Text>\n </FlexItem>\n\n <FlexItem>\n <Text weight=\"medium\">{t('notSelfOnboarding.taxWithholdingLabel')}</Text>\n <Text>{t('notSelfOnboarding.taxWithholdingDescription')}</Text>\n </FlexItem>\n\n <FlexItem>\n <Text weight=\"medium\">{t('notSelfOnboarding.directDepositLabel')}</Text>\n <Text>{t('notSelfOnboarding.directDepositDescription')}</Text>\n </FlexItem>\n\n <Alert status=\"info\" label={t('notSelfOnboarding.alertTitle')} disableScrollIntoView></Alert>\n </Flex>\n )\n\n return (\n <>\n <Flex flexDirection=\"column\" gap={16}>\n {isEmployeeSelfOnboarding ? renderSelfOnboarding() : renderNotSelfOnboarding()}\n\n <Flex justifyContent=\"flex-end\" gap={12}>\n {isEmployeeSelfOnboarding ? (\n <Button\n variant=\"primary\"\n type=\"submit\"\n form={EMPLOYEE_DOCUMENTS_FORM_ID}\n isLoading={isPending}\n >\n {t('continueCta')}\n </Button>\n ) : (\n <Button variant=\"primary\" onClick={onDone}>\n {t('continueCta')}\n </Button>\n )}\n </Flex>\n </Flex>\n </>\n )\n}\n"],"names":["EMPLOYEE_DOCUMENTS_FORM_ID","EmployeeDocumentsSchema","z","EmployeeDocumentsPresentation","isEmployeeSelfOnboarding","currentI9Status","onSubmit","onDone","isPending","useI18n","t","useTranslation","Alert","Heading","Text","Button","Link","UnorderedList","useComponentContext","formMethods","useForm","zodResolver","includeI9","jsxs","Flex","jsx","FormProvider","Form","FlexItem","CheckboxField","Trans"],"mappings":";;;;;;;;;;;;;AASA,MAAMA,IAA6B,qCAE7BC,IAA0BC,EAAE,OAAO;AAAA,EACvC,WAAWA,EAAE,QAAA;AACf,CAAC,GAYYC,IAAgC,CAAC;AAAA,EAC5C,0BAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AACF,MAA0C;AACxC,EAA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
|
import { useBase as F } from "../../Base/useBase.js";
|
|
10
10
|
import { Flex as U } from "../../Common/Flex/Flex.js";
|
|
11
|
+
import "classnames";
|
|
12
|
+
import { componentEvents as s, EmployeeOnboardingStatus as m } from "../../../shared/constants.js";
|
|
11
13
|
import { Loading as W } from "../../Common/Loading/Loading.js";
|
|
12
14
|
import "react-i18next";
|
|
13
15
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
16
|
import "react";
|
|
15
17
|
import { useI18n as q, useComponentDictionary as j } from "../../../i18n/I18n.js";
|
|
16
|
-
import { componentEvents as s, EmployeeOnboardingStatus as m } from "../../../shared/constants.js";
|
|
17
18
|
import { Head as k } from "./Head.js";
|
|
18
19
|
import { List as H } from "./List.js";
|
|
19
20
|
import { useFlow as V } from "../../Flow/useFlow.js";
|
|
@@ -92,12 +93,12 @@ function K({ companyId: n, className: r, children: E, dictionary: u }) {
|
|
|
92
93
|
}
|
|
93
94
|
) });
|
|
94
95
|
}
|
|
95
|
-
const
|
|
96
|
+
const Oe = () => {
|
|
96
97
|
const { companyId: n, onEvent: r } = V();
|
|
97
98
|
return /* @__PURE__ */ o(J, { companyId: n, onEvent: r });
|
|
98
99
|
};
|
|
99
100
|
export {
|
|
100
101
|
J as EmployeeList,
|
|
101
|
-
|
|
102
|
+
Oe as EmployeeListContextual
|
|
102
103
|
};
|
|
103
104
|
//# sourceMappingURL=EmployeeList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/EmployeeList.tsx"],"sourcesContent":["import { useEmployeesList } from '@gusto/embedded-api/react-query/employeesList'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\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 type { OnboardingContextInterface } from '../OnboardingFlow/OnboardingFlowComponents'\nimport { EmployeeListProvider } from './useEmployeeList'\nimport { Actions } from './Actions'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { Flex, Loading } from '@/components/Common'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport { componentEvents, EmployeeOnboardingStatus } from '@/shared/constants'\nimport { Head } from '@/components/Employee/EmployeeList/Head'\nimport { List } from '@/components/Employee/EmployeeList/List'\nimport { useFlow } from '@/components/Flow/useFlow'\nimport { usePagination } from '@/hooks/usePagination/usePagination'\n\n//Interface for component specific props\ninterface EmployeeListProps extends CommonComponentInterface<'Employee.EmployeeList'> {\n companyId: string\n}\n\nexport function EmployeeList(props: EmployeeListProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\nfunction Root({ companyId, className, children, dictionary }: EmployeeListProps) {\n //Using i18n hook to directly load necessary namespace\n useI18n('Employee.EmployeeList')\n useComponentDictionary('Employee.EmployeeList', dictionary)\n //Getting props from base context\n const { onEvent, baseSubmitHandler } = useBase()\n const { currentPage, itemsPerPage, getPaginationProps } = usePagination()\n\n const { data, fetchStatus, isFetching } = useEmployeesList(\n {\n companyId,\n page: currentPage,\n per: itemsPerPage,\n },\n { placeholderData: keepPreviousData },\n )\n\n const { mutateAsync: deleteEmployeeMutation } = useEmployeesDeleteMutation()\n const { mutateAsync: updateEmployeeOnboardingStatusMutation } =\n useEmployeesUpdateOnboardingStatusMutation()\n\n if (fetchStatus === 'fetching' && !data) {\n return <Loading />\n }\n const { httpMeta, showEmployees: employeeList } = data!\n const employees = employeeList!\n\n const handleDelete = async (uuid: string) => {\n await baseSubmitHandler(uuid, async payload => {\n await deleteEmployeeMutation({\n request: { employeeId: payload },\n })\n\n onEvent(componentEvents.EMPLOYEE_DELETED, { employeeId: payload })\n })\n }\n /**Set onboarding status to self_onboarding_awaiting_admin_review and proceed to edit */\n const handleReview = async (data: string) => {\n await baseSubmitHandler(data, async employeeId => {\n await updateOnboardingStatus({\n employeeId,\n status: EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW,\n })\n onEvent(componentEvents.EMPLOYEE_UPDATE, {\n employeeId,\n onboardingStatus: EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW,\n })\n })\n }\n /**Update employee onboarding status reverting it back to admin_onboarding_incomplete */\n const handleCancelSelfOnboarding = async (data: string) => {\n await baseSubmitHandler(data, async employeeId => {\n await updateOnboardingStatus({\n employeeId,\n status: EmployeeOnboardingStatus.ADMIN_ONBOARDING_INCOMPLETE,\n })\n })\n }\n const updateOnboardingStatus = async (data: { employeeId: string; status: OnboardingStatus }) => {\n await baseSubmitHandler(data, async ({ employeeId, status }) => {\n const { employeeOnboardingStatus: responseData } =\n await updateEmployeeOnboardingStatusMutation({\n request: { employeeId, requestBody: { onboardingStatus: status } },\n })\n onEvent(componentEvents.EMPLOYEE_ONBOARDING_STATUS_UPDATED, responseData)\n })\n }\n const handleNew = () => {\n onEvent(componentEvents.EMPLOYEE_CREATE)\n }\n const handleSkip = () => {\n onEvent(componentEvents.EMPLOYEE_ONBOARDING_DONE)\n }\n\n const handleEdit = (uuid: string, onboardingStatus?: OnboardingStatus) => {\n onEvent(componentEvents.EMPLOYEE_UPDATE, { employeeId: uuid, onboardingStatus })\n }\n return (\n <section className={className}>\n <EmployeeListProvider\n value={{\n ...getPaginationProps(httpMeta.response.headers, isFetching),\n isFetching,\n handleEdit,\n handleNew,\n handleReview,\n handleDelete,\n employees,\n handleCancelSelfOnboarding,\n handleSkip,\n }}\n >\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Actions />\n </Flex>\n )}\n </EmployeeListProvider>\n </section>\n )\n}\n\n/**\n * Wrapper used inside Flows -> exposes flow context for required parameters\n */\nexport const EmployeeListContextual = () => {\n const { companyId, onEvent } = useFlow<OnboardingContextInterface>()\n return <EmployeeList companyId={companyId} onEvent={onEvent} />\n}\n"],"names":["EmployeeList","props","jsx","BaseComponent","Root","companyId","className","children","dictionary","useI18n","useComponentDictionary","onEvent","baseSubmitHandler","useBase","currentPage","itemsPerPage","getPaginationProps","usePagination","data","fetchStatus","isFetching","useEmployeesList","keepPreviousData","deleteEmployeeMutation","useEmployeesDeleteMutation","updateEmployeeOnboardingStatusMutation","useEmployeesUpdateOnboardingStatusMutation","Loading","httpMeta","employeeList","employees","handleDelete","uuid","payload","componentEvents","handleReview","employeeId","updateOnboardingStatus","EmployeeOnboardingStatus","handleCancelSelfOnboarding","status","responseData","handleNew","handleSkip","handleEdit","onboardingStatus","EmployeeListProvider","jsxs","Flex","Head","List","Actions","EmployeeListContextual","useFlow"],"mappings":"
|
|
1
|
+
{"version":3,"file":"EmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/EmployeeList.tsx"],"sourcesContent":["import { useEmployeesList } from '@gusto/embedded-api/react-query/employeesList'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\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 type { OnboardingContextInterface } from '../OnboardingFlow/OnboardingFlowComponents'\nimport { EmployeeListProvider } from './useEmployeeList'\nimport { Actions } from './Actions'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { Flex, Loading } from '@/components/Common'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport { componentEvents, EmployeeOnboardingStatus } from '@/shared/constants'\nimport { Head } from '@/components/Employee/EmployeeList/Head'\nimport { List } from '@/components/Employee/EmployeeList/List'\nimport { useFlow } from '@/components/Flow/useFlow'\nimport { usePagination } from '@/hooks/usePagination/usePagination'\n\n//Interface for component specific props\ninterface EmployeeListProps extends CommonComponentInterface<'Employee.EmployeeList'> {\n companyId: string\n}\n\nexport function EmployeeList(props: EmployeeListProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\nfunction Root({ companyId, className, children, dictionary }: EmployeeListProps) {\n //Using i18n hook to directly load necessary namespace\n useI18n('Employee.EmployeeList')\n useComponentDictionary('Employee.EmployeeList', dictionary)\n //Getting props from base context\n const { onEvent, baseSubmitHandler } = useBase()\n const { currentPage, itemsPerPage, getPaginationProps } = usePagination()\n\n const { data, fetchStatus, isFetching } = useEmployeesList(\n {\n companyId,\n page: currentPage,\n per: itemsPerPage,\n },\n { placeholderData: keepPreviousData },\n )\n\n const { mutateAsync: deleteEmployeeMutation } = useEmployeesDeleteMutation()\n const { mutateAsync: updateEmployeeOnboardingStatusMutation } =\n useEmployeesUpdateOnboardingStatusMutation()\n\n if (fetchStatus === 'fetching' && !data) {\n return <Loading />\n }\n const { httpMeta, showEmployees: employeeList } = data!\n const employees = employeeList!\n\n const handleDelete = async (uuid: string) => {\n await baseSubmitHandler(uuid, async payload => {\n await deleteEmployeeMutation({\n request: { employeeId: payload },\n })\n\n onEvent(componentEvents.EMPLOYEE_DELETED, { employeeId: payload })\n })\n }\n /**Set onboarding status to self_onboarding_awaiting_admin_review and proceed to edit */\n const handleReview = async (data: string) => {\n await baseSubmitHandler(data, async employeeId => {\n await updateOnboardingStatus({\n employeeId,\n status: EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW,\n })\n onEvent(componentEvents.EMPLOYEE_UPDATE, {\n employeeId,\n onboardingStatus: EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW,\n })\n })\n }\n /**Update employee onboarding status reverting it back to admin_onboarding_incomplete */\n const handleCancelSelfOnboarding = async (data: string) => {\n await baseSubmitHandler(data, async employeeId => {\n await updateOnboardingStatus({\n employeeId,\n status: EmployeeOnboardingStatus.ADMIN_ONBOARDING_INCOMPLETE,\n })\n })\n }\n const updateOnboardingStatus = async (data: { employeeId: string; status: OnboardingStatus }) => {\n await baseSubmitHandler(data, async ({ employeeId, status }) => {\n const { employeeOnboardingStatus: responseData } =\n await updateEmployeeOnboardingStatusMutation({\n request: { employeeId, requestBody: { onboardingStatus: status } },\n })\n onEvent(componentEvents.EMPLOYEE_ONBOARDING_STATUS_UPDATED, responseData)\n })\n }\n const handleNew = () => {\n onEvent(componentEvents.EMPLOYEE_CREATE)\n }\n const handleSkip = () => {\n onEvent(componentEvents.EMPLOYEE_ONBOARDING_DONE)\n }\n\n const handleEdit = (uuid: string, onboardingStatus?: OnboardingStatus) => {\n onEvent(componentEvents.EMPLOYEE_UPDATE, { employeeId: uuid, onboardingStatus })\n }\n return (\n <section className={className}>\n <EmployeeListProvider\n value={{\n ...getPaginationProps(httpMeta.response.headers, isFetching),\n isFetching,\n handleEdit,\n handleNew,\n handleReview,\n handleDelete,\n employees,\n handleCancelSelfOnboarding,\n handleSkip,\n }}\n >\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Actions />\n </Flex>\n )}\n </EmployeeListProvider>\n </section>\n )\n}\n\n/**\n * Wrapper used inside Flows -> exposes flow context for required parameters\n */\nexport const EmployeeListContextual = () => {\n const { companyId, onEvent } = useFlow<OnboardingContextInterface>()\n return <EmployeeList companyId={companyId} onEvent={onEvent} />\n}\n"],"names":["EmployeeList","props","jsx","BaseComponent","Root","companyId","className","children","dictionary","useI18n","useComponentDictionary","onEvent","baseSubmitHandler","useBase","currentPage","itemsPerPage","getPaginationProps","usePagination","data","fetchStatus","isFetching","useEmployeesList","keepPreviousData","deleteEmployeeMutation","useEmployeesDeleteMutation","updateEmployeeOnboardingStatusMutation","useEmployeesUpdateOnboardingStatusMutation","Loading","httpMeta","employeeList","employees","handleDelete","uuid","payload","componentEvents","handleReview","employeeId","updateOnboardingStatus","EmployeeOnboardingStatus","handleCancelSelfOnboarding","status","responseData","handleNew","handleSkip","handleEdit","onboardingStatus","EmployeeListProvider","jsxs","Flex","Head","List","Actions","EmployeeListContextual","useFlow"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA2BO,SAASA,EAAaC,GAAmD;AAC9E,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AACA,SAASG,EAAK,EAAE,WAAAC,GAAW,WAAAC,GAAW,UAAAC,GAAU,YAAAC,KAAiC;AAE/E,EAAAC,EAAQ,uBAAuB,GAC/BC,EAAuB,yBAAyBF,CAAU;AAE1D,QAAM,EAAE,SAAAG,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GACjC,EAAE,aAAAC,GAAa,cAAAC,GAAc,oBAAAC,EAAA,IAAuBC,EAAA,GAEpD,EAAE,MAAAC,GAAM,aAAAC,GAAa,YAAAC,EAAA,IAAeC;AAAA,IACxC;AAAA,MACE,WAAAhB;AAAA,MACA,MAAMS;AAAA,MACN,KAAKC;AAAA,IAAA;AAAA,IAEP,EAAE,iBAAiBO,EAAA;AAAA,EAAiB,GAGhC,EAAE,aAAaC,EAAA,IAA2BC,EAAA,GAC1C,EAAE,aAAaC,EAAA,IACnBC,EAAA;AAEF,MAAIP,MAAgB,cAAc,CAACD;AACjC,6BAAQS,GAAA,EAAQ;AAElB,QAAM,EAAE,UAAAC,GAAU,eAAeC,EAAA,IAAiBX,GAC5CY,IAAYD,GAEZE,IAAe,OAAOC,MAAiB;AAC3C,UAAMpB,EAAkBoB,GAAM,OAAMC,MAAW;AAC7C,YAAMV,EAAuB;AAAA,QAC3B,SAAS,EAAE,YAAYU,EAAA;AAAA,MAAQ,CAChC,GAEDtB,EAAQuB,EAAgB,kBAAkB,EA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AAAA,QAC3D,YAAAA;AAAA,QACA,YAAAwB;AAAA,QACA,WAAAF;AAAA,QACA,cAAAP;AAAA,QACA,cAAAJ;AAAA,QACA,WAAAD;AAAA,QACA,4BAAAS;AAAA,QACA,YAAAI;AAAA,MAAA;AAAA,MAGD,UAAApC,KAGC,gBAAAwC,EAACC,GAAA,EAAK,eAAc,UAClB,UAAA;AAAA,QAAA,gBAAA9C,EAAC+C,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX;AAAA,IAAA;AAAA,EAAA,GAGN;AAEJ;AAKO,MAAMC,KAAyB,MAAM;AAC1C,QAAM,EAAE,WAAA/C,GAAW,SAAAM,EAAA,IAAY0C,EAAA;AAC/B,SAAO,gBAAAnD,EAACF,GAAA,EAAa,WAAAK,GAAsB,SAAAM,EAAA,CAAkB;AAC/D;"}
|
|
@@ -2,13 +2,14 @@ import { jsx as t } from "react/jsx-runtime";
|
|
|
2
2
|
import { useTranslation as n } from "react-i18next";
|
|
3
3
|
import { Flex as r } from "../../Common/Flex/Flex.js";
|
|
4
4
|
import "classnames";
|
|
5
|
+
import "../../../shared/constants.js";
|
|
5
6
|
import { useComponentContext as m } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
6
7
|
import "react";
|
|
7
|
-
const
|
|
8
|
+
const d = () => {
|
|
8
9
|
const { t: e } = n("Employee.EmployeeList"), o = m();
|
|
9
10
|
return /* @__PURE__ */ t(r, { justifyContent: "space-between", alignItems: "center", children: /* @__PURE__ */ t(o.Heading, { as: "h2", children: e("title") }) });
|
|
10
11
|
};
|
|
11
12
|
export {
|
|
12
|
-
|
|
13
|
+
d as Head
|
|
13
14
|
};
|
|
14
15
|
//# sourceMappingURL=Head.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Head.js","sources":["../../../../src/components/Employee/EmployeeList/Head.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n// Head slot for EmployeeList component\nexport const Head = () => {\n const { t } = useTranslation('Employee.EmployeeList')\n const Components = useComponentContext()\n\n return (\n <Flex justifyContent=\"space-between\" alignItems=\"center\">\n <Components.Heading as=\"h2\">{t('title')}</Components.Heading>\n </Flex>\n )\n}\n"],"names":["Head","t","useTranslation","Components","useComponentContext","jsx","Flex"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Head.js","sources":["../../../../src/components/Employee/EmployeeList/Head.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n// Head slot for EmployeeList component\nexport const Head = () => {\n const { t } = useTranslation('Employee.EmployeeList')\n const Components = useComponentContext()\n\n return (\n <Flex justifyContent=\"space-between\" alignItems=\"center\">\n <Components.Heading as=\"h2\">{t('title')}</Components.Heading>\n </Flex>\n )\n}\n"],"names":["Head","t","useTranslation","Components","useComponentContext","jsx","Flex"],"mappings":";;;;;;;AAKO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,uBAAuB,GAC9CC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAACC,GAAA,EAAK,gBAAe,iBAAgB,YAAW,UAC9C,UAAA,gBAAAD,EAACF,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,OAAO,GAAE,GAC1C;AAEJ;"}
|
|
@@ -9,8 +9,8 @@ import "../../Base/useBase.js";
|
|
|
9
9
|
import "../../../shared/constants.js";
|
|
10
10
|
import "classnames";
|
|
11
11
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
|
+
import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
12
13
|
import "dompurify";
|
|
13
|
-
import "../../../contexts/LocaleProvider/useLocale.js";
|
|
14
14
|
import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
|
|
15
15
|
const [c, d] = o("EmployeeListContext");
|
|
16
16
|
export {
|
|
@@ -1,44 +1,18 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const FederalFormSchema: z.ZodDiscriminatedUnion<
|
|
2
|
+
export declare const FederalFormSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3
3
|
w4DataType: z.ZodLiteral<"rev_2020_w4">;
|
|
4
4
|
filingStatus: z.ZodString;
|
|
5
5
|
twoJobs: z.ZodString;
|
|
6
|
-
dependentsAmount: z.
|
|
7
|
-
otherIncome: z.
|
|
8
|
-
deductions: z.
|
|
9
|
-
extraWithholding: z.
|
|
10
|
-
},
|
|
11
|
-
deductions: string;
|
|
12
|
-
extraWithholding: string;
|
|
13
|
-
filingStatus: string;
|
|
14
|
-
otherIncome: string;
|
|
15
|
-
w4DataType: "rev_2020_w4";
|
|
16
|
-
twoJobs: string;
|
|
17
|
-
dependentsAmount: string;
|
|
18
|
-
}, {
|
|
19
|
-
deductions: number;
|
|
20
|
-
extraWithholding: number;
|
|
21
|
-
filingStatus: string;
|
|
22
|
-
otherIncome: number;
|
|
23
|
-
w4DataType: "rev_2020_w4";
|
|
24
|
-
twoJobs: string;
|
|
25
|
-
dependentsAmount: number;
|
|
26
|
-
}>, z.ZodObject<{
|
|
6
|
+
dependentsAmount: z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>;
|
|
7
|
+
otherIncome: z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>;
|
|
8
|
+
deductions: z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>;
|
|
9
|
+
extraWithholding: z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>;
|
|
10
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
27
11
|
w4DataType: z.ZodLiteral<"pre_2020_w4">;
|
|
28
12
|
filingStatus: z.ZodString;
|
|
29
13
|
federalWithholdingAllowance: z.ZodNumber;
|
|
30
14
|
additionalWithholding: z.ZodString;
|
|
31
|
-
},
|
|
32
|
-
additionalWithholding: string;
|
|
33
|
-
federalWithholdingAllowance: number;
|
|
34
|
-
filingStatus: string;
|
|
35
|
-
w4DataType: "pre_2020_w4";
|
|
36
|
-
}, {
|
|
37
|
-
additionalWithholding: string;
|
|
38
|
-
federalWithholdingAllowance: number;
|
|
39
|
-
filingStatus: string;
|
|
40
|
-
w4DataType: "pre_2020_w4";
|
|
41
|
-
}>]>;
|
|
15
|
+
}, z.core.$strip>], "w4DataType">;
|
|
42
16
|
export type FederalFormInputs = z.input<typeof FederalFormSchema>;
|
|
43
17
|
export type FederalFormPayload = z.output<typeof FederalFormSchema>;
|
|
44
18
|
export declare function FederalForm(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -9,8 +9,8 @@ import "../../Base/useBase.js";
|
|
|
9
9
|
import "../../../shared/constants.js";
|
|
10
10
|
import "classnames";
|
|
11
11
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
|
+
import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
12
13
|
import "dompurify";
|
|
13
|
-
import "../../../contexts/LocaleProvider/useLocale.js";
|
|
14
14
|
import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
|
|
15
15
|
const [T, c] = o("FederalTaxesContext");
|
|
16
16
|
export {
|
|
@@ -8,16 +8,16 @@ import { BaseComponent as x } from "../../Base/Base.js";
|
|
|
8
8
|
import { useBase as E } from "../../Base/useBase.js";
|
|
9
9
|
import { Flex as r } from "../../Common/Flex/Flex.js";
|
|
10
10
|
import "classnames";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
11
|
+
import { componentEvents as C } from "../../../shared/constants.js";
|
|
12
|
+
import { ActionsLayout as L } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
13
|
+
import { useComponentContext as S } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
|
+
import { useI18n as D, useComponentDictionary as I } from "../../../i18n/I18n.js";
|
|
15
15
|
import N from "../../../assets/icons/icon-arrow-right.svg.js";
|
|
16
16
|
function w(o) {
|
|
17
|
-
return
|
|
17
|
+
return D("Employee.Landing"), I("Employee.Landing", o.dictionary), /* @__PURE__ */ e(x, { ...o, children: /* @__PURE__ */ e(v, { ...o, children: o.children }) });
|
|
18
18
|
}
|
|
19
19
|
const v = ({ employeeId: o, companyId: p, className: l }) => {
|
|
20
|
-
const { onEvent: d } = E(), t =
|
|
20
|
+
const { onEvent: d } = E(), t = S(), {
|
|
21
21
|
data: { employee: a }
|
|
22
22
|
} = g({ employeeId: o }), f = c(() => s.sanitize(a.firstName), [a]), {
|
|
23
23
|
data: { company: m }
|
|
@@ -25,12 +25,12 @@ const v = ({ employeeId: o, companyId: p, className: l }) => {
|
|
|
25
25
|
return /* @__PURE__ */ e("section", { className: l, children: /* @__PURE__ */ e(
|
|
26
26
|
t.Box,
|
|
27
27
|
{
|
|
28
|
-
footer: /* @__PURE__ */ e(
|
|
28
|
+
footer: /* @__PURE__ */ e(L, { children: /* @__PURE__ */ i(
|
|
29
29
|
t.Button,
|
|
30
30
|
{
|
|
31
31
|
variant: "secondary",
|
|
32
32
|
onClick: () => {
|
|
33
|
-
d(
|
|
33
|
+
d(C.EMPLOYEE_SELF_ONBOARDING_START);
|
|
34
34
|
},
|
|
35
35
|
children: [
|
|
36
36
|
n("getStartedCta"),
|
|
@@ -9,10 +9,10 @@ import r from "./OnboardingSummary.module.scss.js";
|
|
|
9
9
|
import { BaseComponent as P } from "../../Base/Base.js";
|
|
10
10
|
import { useBase as R } from "../../Base/useBase.js";
|
|
11
11
|
import { Flex as d } from "../../Common/Flex/Flex.js";
|
|
12
|
-
import {
|
|
12
|
+
import { componentEvents as E, EmployeeOnboardingStatus as N } from "../../../shared/constants.js";
|
|
13
|
+
import { ActionsLayout as O } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
13
14
|
import { useComponentContext as T } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
15
|
import { useI18n as _, useComponentDictionary as w } from "../../../i18n/I18n.js";
|
|
15
|
-
import { componentEvents as N, EmployeeOnboardingStatus as O } from "../../../shared/constants.js";
|
|
16
16
|
import F from "../../../assets/icons/success_check.svg.js";
|
|
17
17
|
import G from "../../../assets/icons/unchecked_circular.svg.js";
|
|
18
18
|
import { useFlow as M } from "../../Flow/useFlow.js";
|
|
@@ -22,7 +22,7 @@ function j(n) {
|
|
|
22
22
|
const k = ({ employeeId: n, className: c, isAdmin: m = !1 }) => {
|
|
23
23
|
const { onEvent: a } = R(), { t } = b("Employee.OnboardingSummary"), o = T(), {
|
|
24
24
|
data: { employee: x }
|
|
25
|
-
} = B({ employeeId: n }), { firstName: u, lastName: p } = x, { data: C } = L({ employeeId: n }), { onboardingStatus: h, onboardingSteps: l } = C.employeeOnboardingStatus, I = l?.length && l.findIndex((i) => i.required && !i.completed) > -1, f = h ===
|
|
25
|
+
} = B({ employeeId: n }), { firstName: u, lastName: p } = x, { data: C } = L({ employeeId: n }), { onboardingStatus: h, onboardingSteps: l } = C.employeeOnboardingStatus, I = l?.length && l.findIndex((i) => i.required && !i.completed) > -1, f = h === N.ONBOARDING_COMPLETED || !I && h === N.SELF_ONBOARDING_PENDING_INVITE, D = S(() => y.sanitize(u), [u]), v = S(() => y.sanitize(p), [p]);
|
|
26
26
|
return /* @__PURE__ */ e("section", { className: c, children: /* @__PURE__ */ s(d, { flexDirection: "column", gap: 32, children: [
|
|
27
27
|
/* @__PURE__ */ e(d, { alignItems: "center", flexDirection: "column", gap: 8, children: m ? f ? /* @__PURE__ */ s(g, { children: [
|
|
28
28
|
/* @__PURE__ */ e(o.Heading, { as: "h2", textAlign: "center", children: t("onboardedAdminSubtitle", {
|
|
@@ -47,23 +47,23 @@ const k = ({ employeeId: n, className: c, isAdmin: m = !1 }) => {
|
|
|
47
47
|
] }) : /* @__PURE__ */ s(g, { children: [
|
|
48
48
|
/* @__PURE__ */ e(o.Heading, { as: "h2", textAlign: "center", children: t("onboardedSelfSubtitle") }),
|
|
49
49
|
/* @__PURE__ */ e(o.Text, { className: r.description, children: t("onboardedSelfDescription") }),
|
|
50
|
-
/* @__PURE__ */ e(
|
|
50
|
+
/* @__PURE__ */ e(O, { justifyContent: f ? "center" : "start", children: /* @__PURE__ */ e(
|
|
51
51
|
o.Button,
|
|
52
52
|
{
|
|
53
53
|
variant: "secondary",
|
|
54
54
|
onClick: () => {
|
|
55
|
-
a(
|
|
55
|
+
a(E.EMPLOYEE_ONBOARDING_DONE);
|
|
56
56
|
},
|
|
57
57
|
children: t("doneCta")
|
|
58
58
|
}
|
|
59
59
|
) })
|
|
60
60
|
] }) }),
|
|
61
|
-
m && /* @__PURE__ */ e(
|
|
61
|
+
m && /* @__PURE__ */ e(O, { justifyContent: "center", children: /* @__PURE__ */ e(
|
|
62
62
|
o.Button,
|
|
63
63
|
{
|
|
64
64
|
variant: "secondary",
|
|
65
65
|
onClick: () => {
|
|
66
|
-
a(
|
|
66
|
+
a(E.EMPLOYEES_LIST);
|
|
67
67
|
},
|
|
68
68
|
children: t("doneCta")
|
|
69
69
|
}
|
|
@@ -3,20 +3,11 @@ export declare const BankAccountSchema: z.ZodObject<{
|
|
|
3
3
|
name: z.ZodString;
|
|
4
4
|
routingNumber: z.ZodString;
|
|
5
5
|
accountNumber: z.ZodString;
|
|
6
|
-
accountType: z.ZodEnum<
|
|
6
|
+
accountType: z.ZodEnum<{
|
|
7
|
+
Checking: "Checking";
|
|
8
|
+
Savings: "Savings";
|
|
9
|
+
}>;
|
|
7
10
|
hasBankPayload: z.ZodLiteral<true>;
|
|
8
|
-
},
|
|
9
|
-
routingNumber: string;
|
|
10
|
-
accountNumber: string;
|
|
11
|
-
name: string;
|
|
12
|
-
accountType: "Checking" | "Savings";
|
|
13
|
-
hasBankPayload: true;
|
|
14
|
-
}, {
|
|
15
|
-
routingNumber: string;
|
|
16
|
-
accountNumber: string;
|
|
17
|
-
name: string;
|
|
18
|
-
accountType: "Checking" | "Savings";
|
|
19
|
-
hasBankPayload: true;
|
|
20
|
-
}>;
|
|
11
|
+
}, z.core.$strip>;
|
|
21
12
|
export type BankAccountInputs = z.input<typeof BankAccountSchema>;
|
|
22
13
|
export type BankAccountDefaults = z.input<typeof BankAccountSchema>;
|