@gusto/embedded-react-sdk 0.24.1 → 0.25.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 +69 -0
- package/dist/assets/icons/slash-circle.svg.js +10 -0
- package/dist/assets/icons/slash-circle.svg.js.map +1 -0
- package/dist/components/Base/Base.d.ts +1 -1
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Common/Fields/FileInputField/FileInputField.d.ts +5 -0
- package/dist/components/Common/Fields/FileInputField/FileInputField.js +34 -0
- package/dist/components/Common/Fields/FileInputField/FileInputField.js.map +1 -0
- package/dist/components/Common/Fields/FileInputField/index.d.ts +2 -0
- package/dist/components/Common/PaginationControl/PaginationControl.js +41 -40
- package/dist/components/Common/PaginationControl/PaginationControl.js.map +1 -1
- package/dist/components/Common/PaginationControl/PaginationControlTypes.d.ts +1 -0
- 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/FileInput/FileInput.d.ts +2 -0
- package/dist/components/Common/UI/FileInput/FileInput.js +151 -0
- package/dist/components/Common/UI/FileInput/FileInput.js.map +1 -0
- package/dist/components/Common/UI/FileInput/FileInput.module.scss.js +34 -0
- package/dist/components/Common/UI/FileInput/FileInput.module.scss.js.map +1 -0
- package/dist/components/Common/UI/FileInput/FileInputTypes.d.ts +45 -0
- package/dist/components/Common/UI/FileInput/FileInputTypes.js +8 -0
- package/dist/components/Common/UI/FileInput/FileInputTypes.js.map +1 -0
- package/dist/components/Common/UI/FileInput/index.d.ts +4 -0
- package/dist/components/Common/UI/TextInput/TextInput.js +27 -23
- package/dist/components/Common/UI/TextInput/TextInput.js.map +1 -1
- package/dist/components/Common/UI/TextInput/TextInputTypes.d.ts +1 -1
- package/dist/components/Common/UI/TextInput/TextInputTypes.js.map +1 -1
- 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/useCreateSignatory.js +4 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +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/useAssignSignatory.js +6 -5
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- 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 +4 -3
- package/dist/components/Company/BankAccount/BankAccountForm/context.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/DocumentList.js +2 -2
- 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 +2 -2
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +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.js +9 -8
- package/dist/components/Company/FederalTaxes/useFederalTaxes.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/Locations/LocationForm/LocationForm.js +2 -2
- 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/List.js +35 -33
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +30 -29
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.d.ts +1 -0
- 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/OnboardingOverview/Completed.js +3 -2
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +3 -2
- 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 +4 -3
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +2 -2
- 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.js +6 -5
- package/dist/components/Company/PaySchedule/usePaySchedule.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/context.js +4 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/Address.js +2 -2
- 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 +31 -30
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +61 -59
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +34 -31
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +29 -10
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +3 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +33 -31
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.d.ts +2 -0
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +25 -19
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.d.ts +1 -0
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js +86 -56
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.d.ts +1 -2
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js +46 -21
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.d.ts +6 -15
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +116 -99
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.module.scss.js +8 -0
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.module.scss.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.d.ts +8 -0
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js +51 -0
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.d.ts +11 -0
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +157 -0
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.module.scss.js +22 -0
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.module.scss.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +46 -48
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- 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 +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +4 -3
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +4 -3
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +4 -3
- 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/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 +4 -3
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +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/Employee/EmployeeList/EmployeeList.js +58 -56
- 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/List.js +34 -32
- package/dist/components/Employee/EmployeeList/List.js.map +1 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.d.ts +1 -0
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +4 -3
- package/dist/components/Employee/EmployeeList/useEmployeeList.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 +8 -8
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -5
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.js +4 -3
- package/dist/components/Employee/Profile/useProfile.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/useTaxes.js +4 -3
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Flow/Flow.js +3 -2
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.d.ts +15 -0
- package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.js +142 -0
- package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -0
- package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.module.scss.js +18 -0
- package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.module.scss.js.map +1 -0
- package/dist/components/Payroll/InformationRequests/InformationRequestForm/index.d.ts +2 -0
- package/dist/components/Payroll/InformationRequests/InformationRequestList/InformationRequestList.d.ts +7 -0
- package/dist/components/Payroll/InformationRequests/InformationRequestList/InformationRequestList.js +88 -0
- package/dist/components/Payroll/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -0
- package/dist/components/Payroll/InformationRequests/InformationRequestList/index.d.ts +2 -0
- package/dist/components/Payroll/InformationRequests/InformationRequests.d.ts +6 -0
- package/dist/components/Payroll/InformationRequests/InformationRequests.js +55 -0
- package/dist/components/Payroll/InformationRequests/InformationRequests.js.map +1 -0
- package/dist/components/Payroll/InformationRequests/InformationRequestsComponents.d.ts +19 -0
- package/dist/components/Payroll/InformationRequests/InformationRequestsComponents.js +20 -0
- package/dist/components/Payroll/InformationRequests/InformationRequestsComponents.js.map +1 -0
- package/dist/components/Payroll/InformationRequests/index.d.ts +3 -0
- package/dist/components/Payroll/InformationRequests/informationRequestsStateMachine.d.ts +13 -0
- package/dist/components/Payroll/InformationRequests/informationRequestsStateMachine.js +47 -0
- package/dist/components/Payroll/InformationRequests/informationRequestsStateMachine.js.map +1 -0
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +7 -6
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +3 -2
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +116 -130
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +5 -2
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +107 -99
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.module.scss.js +2 -4
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.module.scss.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +21 -0
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +105 -0
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -0
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +41 -37
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +5 -4
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +151 -145
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +14 -12
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.d.ts +2 -0
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +174 -106
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +28 -28
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +2 -2
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +84 -102
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.js +24 -20
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.d.ts +2 -0
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +51 -46
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.d.ts +2 -0
- package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js +111 -45
- package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +137 -125
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js +8 -4
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +117 -110
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +4 -2
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +282 -278
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewTypes.d.ts +6 -0
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewTypes.js +5 -0
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewTypes.js.map +1 -0
- 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 +3 -2
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCases.d.ts +6 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCases.js +55 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCases.js.map +1 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesComponents.d.ts +19 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesComponents.js +19 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesComponents.js.map +1 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.d.ts +7 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +73 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.module.scss.js +10 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.module.scss.js.map +1 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/index.d.ts +2 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.d.ts +14 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +46 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/index.d.ts +2 -0
- package/dist/components/Payroll/RecoveryCases/index.d.ts +3 -0
- package/dist/components/Payroll/RecoveryCases/recoveryCasesStateMachine.d.ts +13 -0
- package/dist/components/Payroll/RecoveryCases/recoveryCasesStateMachine.js +47 -0
- package/dist/components/Payroll/RecoveryCases/recoveryCasesStateMachine.js.map +1 -0
- package/dist/components/Payroll/helpers.d.ts +12 -0
- package/dist/components/Payroll/helpers.js +129 -117
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/index.d.ts +2 -0
- package/dist/components/Payroll/index.js +18 -14
- package/dist/components/Payroll/index.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.d.ts +4 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +43 -31
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +27 -25
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
- package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +1 -0
- package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.d.ts +5 -0
- package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js +17 -15
- package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js.map +1 -1
- package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.js +3 -3
- package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
- package/dist/helpers/dateFormatting.d.ts +1 -0
- package/dist/helpers/dateFormatting.js +1 -0
- package/dist/helpers/dateFormatting.js.map +1 -1
- package/dist/helpers/formattedStrings.d.ts +1 -0
- package/dist/helpers/formattedStrings.js +23 -18
- package/dist/helpers/formattedStrings.js.map +1 -1
- package/dist/helpers/responsive.js +1 -1
- package/dist/helpers/responsive.js.map +1 -1
- package/dist/i18n/I18n.js +3 -3
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +36 -32
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js.map +1 -1
- package/dist/i18n/en/Contractor.Payments.PaymentHistory.json.js +11 -11
- package/dist/i18n/en/Contractor.Payments.PaymentStatement.json.js +28 -0
- package/dist/i18n/en/Contractor.Payments.PaymentStatement.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Payments.PaymentsList.json.js +14 -14
- package/dist/i18n/en/Payroll.InformationRequestForm.json.js +18 -0
- package/dist/i18n/en/Payroll.InformationRequestForm.json.js.map +1 -0
- package/dist/i18n/en/Payroll.InformationRequestList.json.js +18 -0
- package/dist/i18n/en/Payroll.InformationRequestList.json.js.map +1 -0
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +27 -21
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollHistory.json.js +6 -6
- package/dist/i18n/en/Payroll.PayrollLanding.json.js +5 -3
- package/dist/i18n/en/Payroll.PayrollLanding.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +32 -28
- package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
- package/dist/i18n/en/Payroll.RecoveryCasesList.json.js +14 -0
- package/dist/i18n/en/Payroll.RecoveryCasesList.json.js.map +1 -0
- package/dist/i18n/en/Payroll.RecoveryCasesResubmit.json.js +8 -0
- package/dist/i18n/en/Payroll.RecoveryCasesResubmit.json.js.map +1 -0
- package/dist/i18n/en/common.json.d.ts +5 -0
- package/dist/i18n/en/common.json.js +4 -2
- package/dist/i18n/en/common.json.js.map +1 -1
- package/dist/shared/constants.d.ts +24 -0
- package/dist/shared/constants.js +70 -54
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +119 -3
- package/package.json +31 -20
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { jsxs as u, jsx as
|
|
1
|
+
import { jsxs as u, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { useId as p } from "react";
|
|
3
3
|
import { useFormContext as d, useWatch as f } from "react-hook-form";
|
|
4
|
-
import { useTranslation as
|
|
4
|
+
import { useTranslation as c } from "react-i18next";
|
|
5
5
|
import { Flex as y } from "../../Common/Flex/Flex.js";
|
|
6
6
|
import "classnames";
|
|
7
|
+
import "../../../shared/constants.js";
|
|
7
8
|
import { useComponentContext as x } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
9
|
import { useI18n as h } from "../../../i18n/I18n.js";
|
|
9
10
|
import { TextInputField as B } from "../../Common/Fields/TextInputField/TextInputField.js";
|
|
@@ -13,27 +14,28 @@ const P = ({
|
|
|
13
14
|
hoursUsed: r,
|
|
14
15
|
id: t
|
|
15
16
|
}) => {
|
|
16
|
-
const { Text: n } = x(), { t:
|
|
17
|
+
const { Text: n } = x(), { t: i } = c("Payroll.PayrollEditEmployee");
|
|
17
18
|
if (o === "unlimited")
|
|
18
19
|
return null;
|
|
19
20
|
const a = parseFloat(e) - r;
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
-
},
|
|
22
|
-
const { t: r } =
|
|
21
|
+
return /* @__PURE__ */ l(n, { size: "sm", variant: "supporting", "aria-live": "polite", "aria-atomic": !0, id: t, children: i("timeOffBalance.remaining", { balance: a.toFixed(1) }) });
|
|
22
|
+
}, U = ({ timeOff: e, employee: o }) => {
|
|
23
|
+
const { t: r } = c("Payroll.PayrollEditEmployee");
|
|
23
24
|
h("Payroll.PayrollEditEmployee");
|
|
24
|
-
const { control: t } = d(), n = p(),
|
|
25
|
+
const { control: t } = d(), n = p(), i = f({
|
|
25
26
|
control: t,
|
|
26
27
|
name: `timeOffCompensations.${e.name}`
|
|
27
28
|
});
|
|
28
29
|
if (!e.name)
|
|
29
30
|
return null;
|
|
30
|
-
const
|
|
31
|
+
const m = parseFloat(i || "0"), a = o.eligiblePaidTimeOff?.find((s) => s.name === e.name);
|
|
31
32
|
return /* @__PURE__ */ u(y, { flexDirection: "column", gap: 4, children: [
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ l(
|
|
33
34
|
B,
|
|
34
35
|
{
|
|
35
36
|
name: `timeOffCompensations.${e.name}`,
|
|
36
37
|
type: "number",
|
|
38
|
+
min: 0,
|
|
37
39
|
adornmentEnd: r("hoursUnit"),
|
|
38
40
|
isRequired: !0,
|
|
39
41
|
label: e.name,
|
|
@@ -41,18 +43,18 @@ const P = ({
|
|
|
41
43
|
},
|
|
42
44
|
e.name
|
|
43
45
|
),
|
|
44
|
-
a?.accrualBalance && /* @__PURE__ */
|
|
46
|
+
a?.accrualBalance && /* @__PURE__ */ l(
|
|
45
47
|
P,
|
|
46
48
|
{
|
|
47
49
|
accrualBalance: a.accrualBalance,
|
|
48
50
|
accrualMethod: a.accrualMethod ?? void 0,
|
|
49
|
-
hoursUsed:
|
|
51
|
+
hoursUsed: m,
|
|
50
52
|
id: n
|
|
51
53
|
}
|
|
52
54
|
)
|
|
53
55
|
] });
|
|
54
56
|
};
|
|
55
57
|
export {
|
|
56
|
-
|
|
58
|
+
U as TimeOffField
|
|
57
59
|
};
|
|
58
60
|
//# sourceMappingURL=TimeOffField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeOffField.js","sources":["../../../../src/components/Payroll/PayrollEditEmployee/TimeOffField.tsx"],"sourcesContent":["import { useId } from 'react'\nimport { useWatch, useFormContext } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { PayrollEmployeeCompensationsTypePaidTimeOff } from '@gusto/embedded-api/models/components/payrollemployeecompensationstype'\nimport type { PayrollEditEmployeeFormValues } from './PayrollEditEmployeePresentation'\nimport { Flex, TextInputField } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\n\nexport interface TimeOffFieldProps {\n timeOff: PayrollEmployeeCompensationsTypePaidTimeOff\n employee: Employee\n}\n\nconst TimeOffBalance = ({\n accrualBalance,\n accrualMethod,\n hoursUsed,\n id,\n}: {\n accrualBalance: string\n accrualMethod?: string\n hoursUsed: number\n id: string\n}) => {\n const { Text } = useComponentContext()\n const { t } = useTranslation('Payroll.PayrollEditEmployee')\n\n if (accrualMethod === 'unlimited') {\n return null\n }\n\n const currentBalance = parseFloat(accrualBalance)\n const remainingBalance = currentBalance - hoursUsed\n\n return (\n <Text size=\"sm\" variant=\"supporting\" aria-live=\"polite\" aria-atomic={true} id={id}>\n {t('timeOffBalance.remaining', { balance: remainingBalance.toFixed(1) })}\n </Text>\n )\n}\n\nexport const TimeOffField = ({ timeOff, employee }: TimeOffFieldProps) => {\n const { t } = useTranslation('Payroll.PayrollEditEmployee')\n useI18n('Payroll.PayrollEditEmployee')\n\n const { control } = useFormContext<PayrollEditEmployeeFormValues>()\n const id = useId()\n\n const watchedValue = useWatch({\n control,\n name: `timeOffCompensations.${timeOff.name}`,\n })\n\n if (!timeOff.name) {\n return null\n }\n\n const hoursUsed = parseFloat(watchedValue || '0')\n const eligiblePolicy = employee.eligiblePaidTimeOff?.find(policy => policy.name === timeOff.name)\n\n return (\n <Flex flexDirection=\"column\" gap={4}>\n <TextInputField\n key={timeOff.name}\n name={`timeOffCompensations.${timeOff.name}`}\n type=\"number\"\n adornmentEnd={t('hoursUnit')}\n isRequired\n label={timeOff.name}\n aria-describedby={id}\n />\n {eligiblePolicy?.accrualBalance && (\n <TimeOffBalance\n accrualBalance={eligiblePolicy.accrualBalance}\n accrualMethod={eligiblePolicy.accrualMethod ?? undefined}\n hoursUsed={hoursUsed}\n id={id}\n />\n )}\n </Flex>\n )\n}\n"],"names":["TimeOffBalance","accrualBalance","accrualMethod","hoursUsed","id","Text","useComponentContext","t","useTranslation","remainingBalance","jsx","TimeOffField","timeOff","employee","useI18n","control","useFormContext","useId","watchedValue","useWatch","eligiblePolicy","policy","jsxs","Flex","TextInputField"],"mappings":"
|
|
1
|
+
{"version":3,"file":"TimeOffField.js","sources":["../../../../src/components/Payroll/PayrollEditEmployee/TimeOffField.tsx"],"sourcesContent":["import { useId } from 'react'\nimport { useWatch, useFormContext } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { PayrollEmployeeCompensationsTypePaidTimeOff } from '@gusto/embedded-api/models/components/payrollemployeecompensationstype'\nimport type { PayrollEditEmployeeFormValues } from './PayrollEditEmployeePresentation'\nimport { Flex, TextInputField } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\n\nexport interface TimeOffFieldProps {\n timeOff: PayrollEmployeeCompensationsTypePaidTimeOff\n employee: Employee\n}\n\nconst TimeOffBalance = ({\n accrualBalance,\n accrualMethod,\n hoursUsed,\n id,\n}: {\n accrualBalance: string\n accrualMethod?: string\n hoursUsed: number\n id: string\n}) => {\n const { Text } = useComponentContext()\n const { t } = useTranslation('Payroll.PayrollEditEmployee')\n\n if (accrualMethod === 'unlimited') {\n return null\n }\n\n const currentBalance = parseFloat(accrualBalance)\n const remainingBalance = currentBalance - hoursUsed\n\n return (\n <Text size=\"sm\" variant=\"supporting\" aria-live=\"polite\" aria-atomic={true} id={id}>\n {t('timeOffBalance.remaining', { balance: remainingBalance.toFixed(1) })}\n </Text>\n )\n}\n\nexport const TimeOffField = ({ timeOff, employee }: TimeOffFieldProps) => {\n const { t } = useTranslation('Payroll.PayrollEditEmployee')\n useI18n('Payroll.PayrollEditEmployee')\n\n const { control } = useFormContext<PayrollEditEmployeeFormValues>()\n const id = useId()\n\n const watchedValue = useWatch({\n control,\n name: `timeOffCompensations.${timeOff.name}`,\n })\n\n if (!timeOff.name) {\n return null\n }\n\n const hoursUsed = parseFloat(watchedValue || '0')\n const eligiblePolicy = employee.eligiblePaidTimeOff?.find(policy => policy.name === timeOff.name)\n\n return (\n <Flex flexDirection=\"column\" gap={4}>\n <TextInputField\n key={timeOff.name}\n name={`timeOffCompensations.${timeOff.name}`}\n type=\"number\"\n min={0}\n adornmentEnd={t('hoursUnit')}\n isRequired\n label={timeOff.name}\n aria-describedby={id}\n />\n {eligiblePolicy?.accrualBalance && (\n <TimeOffBalance\n accrualBalance={eligiblePolicy.accrualBalance}\n accrualMethod={eligiblePolicy.accrualMethod ?? undefined}\n hoursUsed={hoursUsed}\n id={id}\n />\n )}\n </Flex>\n )\n}\n"],"names":["TimeOffBalance","accrualBalance","accrualMethod","hoursUsed","id","Text","useComponentContext","t","useTranslation","remainingBalance","jsx","TimeOffField","timeOff","employee","useI18n","control","useForm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AAAA,QACf,oBAAkBR;AAAA,MAAA;AAAA,MAPbQ,EAAQ;AAAA,IAAA;AAAA,IASdQ,GAAgB,kBACf,gBAAAV;AAAA,MAACV;AAAA,MAAA;AAAA,QACC,gBAAgBoB,EAAe;AAAA,QAC/B,eAAeA,EAAe,iBAAiB;AAAA,QAC/C,WAAAjB;AAAA,QACA,IAAAC;AAAA,MAAA;AAAA,IAAA;AAAA,EACF,GAEJ;AAEJ;"}
|
|
@@ -4,6 +4,8 @@ export declare const payrollMachine: {
|
|
|
4
4
|
landing: import('robot3').MachineState<any>;
|
|
5
5
|
configuration: import('robot3').MachineState<any>;
|
|
6
6
|
overview: import('robot3').MachineState<any>;
|
|
7
|
+
submittedOverview: import('robot3').MachineState<any>;
|
|
8
|
+
submittedReceipts: import('robot3').MachineState<any>;
|
|
7
9
|
editEmployee: import('robot3').MachineState<any>;
|
|
8
10
|
receipts: import('robot3').MachineState<any>;
|
|
9
11
|
blockers: import('robot3').MachineState<any>;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { state as i, transition as
|
|
2
|
-
import { PayrollConfigurationContextual as
|
|
3
|
-
import { componentEvents as
|
|
4
|
-
import { updateBreadcrumbs as
|
|
5
|
-
import { createBreadcrumbNavigateTransition as
|
|
1
|
+
import { state as i, transition as r, reduce as o } from "robot3";
|
|
2
|
+
import { PayrollReceiptsContextual as m, PayrollConfigurationContextual as s, PayrollOverviewContextual as y, PayrollEditEmployeeContextual as P, PayrollBlockerContextual as u, PayrollLandingContextual as c } from "./PayrollFlowComponents.js";
|
|
3
|
+
import { componentEvents as t } from "../../../shared/constants.js";
|
|
4
|
+
import { updateBreadcrumbs as l } from "../../../helpers/breadcrumbHelpers.js";
|
|
5
|
+
import { createBreadcrumbNavigateTransition as b } from "../../Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.js";
|
|
6
6
|
const D = {
|
|
7
7
|
landing: {
|
|
8
8
|
parent: null,
|
|
9
9
|
item: {
|
|
10
10
|
id: "landing",
|
|
11
|
-
label: "
|
|
11
|
+
label: "breadcrumbs.landing",
|
|
12
12
|
namespace: "Payroll.PayrollLanding",
|
|
13
|
-
onNavigate: ((
|
|
14
|
-
...
|
|
13
|
+
onNavigate: ((e) => ({
|
|
14
|
+
...e,
|
|
15
15
|
currentBreadcrumb: "landing",
|
|
16
16
|
progressBarType: null,
|
|
17
17
|
component: c
|
|
@@ -24,12 +24,12 @@ const D = {
|
|
|
24
24
|
id: "configuration",
|
|
25
25
|
label: "breadcrumbLabel",
|
|
26
26
|
namespace: "Payroll.PayrollConfiguration",
|
|
27
|
-
onNavigate: ((
|
|
28
|
-
...
|
|
29
|
-
startDate:
|
|
30
|
-
endDate:
|
|
27
|
+
onNavigate: ((e) => ({
|
|
28
|
+
...l("configuration", e, {
|
|
29
|
+
startDate: e.payPeriod?.startDate ?? "",
|
|
30
|
+
endDate: e.payPeriod?.endDate ?? ""
|
|
31
31
|
}),
|
|
32
|
-
component:
|
|
32
|
+
component: s,
|
|
33
33
|
alerts: void 0
|
|
34
34
|
}))
|
|
35
35
|
}
|
|
@@ -40,16 +40,24 @@ const D = {
|
|
|
40
40
|
id: "overview",
|
|
41
41
|
label: "breadcrumbLabel",
|
|
42
42
|
namespace: "Payroll.PayrollOverview",
|
|
43
|
-
onNavigate: ((
|
|
44
|
-
...
|
|
45
|
-
startDate:
|
|
46
|
-
endDate:
|
|
43
|
+
onNavigate: ((e) => ({
|
|
44
|
+
...l("overview", e, {
|
|
45
|
+
startDate: e.payPeriod?.startDate ?? "",
|
|
46
|
+
endDate: e.payPeriod?.endDate ?? ""
|
|
47
47
|
}),
|
|
48
|
-
component:
|
|
48
|
+
component: y,
|
|
49
49
|
alerts: void 0
|
|
50
50
|
}))
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
|
+
submittedOverview: {
|
|
54
|
+
parent: "landing",
|
|
55
|
+
item: {
|
|
56
|
+
id: "submittedOverview",
|
|
57
|
+
label: "breadcrumbs.overview",
|
|
58
|
+
namespace: "Payroll.PayrollLanding"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
53
61
|
editEmployee: {
|
|
54
62
|
parent: "configuration",
|
|
55
63
|
item: {
|
|
@@ -66,6 +74,14 @@ const D = {
|
|
|
66
74
|
namespace: "Payroll.PayrollReceipts"
|
|
67
75
|
}
|
|
68
76
|
},
|
|
77
|
+
submittedReceipts: {
|
|
78
|
+
parent: "landing",
|
|
79
|
+
item: {
|
|
80
|
+
id: "submittedReceipts",
|
|
81
|
+
label: "breadcrumbs.receipt",
|
|
82
|
+
namespace: "Payroll.PayrollLanding"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
69
85
|
blockers: {
|
|
70
86
|
parent: "landing",
|
|
71
87
|
item: {
|
|
@@ -74,13 +90,13 @@ const D = {
|
|
|
74
90
|
namespace: "Payroll.PayrollBlocker"
|
|
75
91
|
}
|
|
76
92
|
}
|
|
77
|
-
}, d = (
|
|
78
|
-
...
|
|
79
|
-
...
|
|
80
|
-
}), n =
|
|
81
|
-
|
|
93
|
+
}, d = (e) => (a) => ({
|
|
94
|
+
...a,
|
|
95
|
+
...e
|
|
96
|
+
}), n = b(), p = r(
|
|
97
|
+
t.PAYROLL_EXIT_FLOW,
|
|
82
98
|
"landing",
|
|
83
|
-
|
|
99
|
+
o(
|
|
84
100
|
d({
|
|
85
101
|
component: c,
|
|
86
102
|
progressBarType: null,
|
|
@@ -88,20 +104,20 @@ const D = {
|
|
|
88
104
|
alerts: void 0
|
|
89
105
|
})
|
|
90
106
|
)
|
|
91
|
-
),
|
|
107
|
+
), f = {
|
|
92
108
|
landing: i(
|
|
93
|
-
|
|
94
|
-
|
|
109
|
+
r(
|
|
110
|
+
t.RUN_PAYROLL_SELECTED,
|
|
95
111
|
"configuration",
|
|
96
|
-
|
|
97
|
-
(
|
|
98
|
-
...
|
|
99
|
-
startDate:
|
|
100
|
-
endDate:
|
|
112
|
+
o(
|
|
113
|
+
(e, a) => ({
|
|
114
|
+
...l("configuration", e, {
|
|
115
|
+
startDate: a.payload.payPeriod.startDate ?? "",
|
|
116
|
+
endDate: a.payload.payPeriod.endDate ?? ""
|
|
101
117
|
}),
|
|
102
|
-
component:
|
|
103
|
-
payrollUuid:
|
|
104
|
-
payPeriod:
|
|
118
|
+
component: s,
|
|
119
|
+
payrollUuid: a.payload.payrollUuid,
|
|
120
|
+
payPeriod: a.payload.payPeriod,
|
|
105
121
|
progressBarType: "breadcrumbs",
|
|
106
122
|
ctaConfig: {
|
|
107
123
|
labelKey: "exitFlowCta",
|
|
@@ -110,18 +126,18 @@ const D = {
|
|
|
110
126
|
})
|
|
111
127
|
)
|
|
112
128
|
),
|
|
113
|
-
|
|
114
|
-
|
|
129
|
+
r(
|
|
130
|
+
t.REVIEW_PAYROLL,
|
|
115
131
|
"overview",
|
|
116
|
-
|
|
117
|
-
(
|
|
118
|
-
...
|
|
119
|
-
startDate:
|
|
120
|
-
endDate:
|
|
132
|
+
o(
|
|
133
|
+
(e, a) => ({
|
|
134
|
+
...l("overview", e, {
|
|
135
|
+
startDate: a.payload.payPeriod.startDate ?? "",
|
|
136
|
+
endDate: a.payload.payPeriod.endDate ?? ""
|
|
121
137
|
}),
|
|
122
|
-
component:
|
|
123
|
-
payrollUuid:
|
|
124
|
-
payPeriod:
|
|
138
|
+
component: y,
|
|
139
|
+
payrollUuid: a.payload.payrollUuid,
|
|
140
|
+
payPeriod: a.payload.payPeriod,
|
|
125
141
|
progressBarType: "breadcrumbs",
|
|
126
142
|
ctaConfig: {
|
|
127
143
|
labelKey: "exitFlowCta",
|
|
@@ -130,12 +146,12 @@ const D = {
|
|
|
130
146
|
})
|
|
131
147
|
)
|
|
132
148
|
),
|
|
133
|
-
|
|
134
|
-
|
|
149
|
+
r(
|
|
150
|
+
t.RUN_PAYROLL_BLOCKERS_VIEW_ALL,
|
|
135
151
|
"blockers",
|
|
136
|
-
|
|
152
|
+
o(
|
|
137
153
|
d({
|
|
138
|
-
component:
|
|
154
|
+
component: u,
|
|
139
155
|
progressBarType: "breadcrumbs",
|
|
140
156
|
ctaConfig: {
|
|
141
157
|
labelKey: "exitFlowCta",
|
|
@@ -147,18 +163,18 @@ const D = {
|
|
|
147
163
|
),
|
|
148
164
|
configuration: i(
|
|
149
165
|
n("landing"),
|
|
150
|
-
|
|
151
|
-
|
|
166
|
+
r(
|
|
167
|
+
t.RUN_PAYROLL_CALCULATED,
|
|
152
168
|
"overview",
|
|
153
|
-
|
|
154
|
-
(
|
|
155
|
-
...
|
|
156
|
-
startDate:
|
|
157
|
-
endDate:
|
|
169
|
+
o(
|
|
170
|
+
(e, a) => ({
|
|
171
|
+
...l("overview", e, {
|
|
172
|
+
startDate: a.payload.payPeriod?.startDate ?? "",
|
|
173
|
+
endDate: a.payload.payPeriod?.endDate ?? ""
|
|
158
174
|
}),
|
|
159
|
-
component:
|
|
160
|
-
payPeriod:
|
|
161
|
-
alerts:
|
|
175
|
+
component: y,
|
|
176
|
+
payPeriod: a.payload.payPeriod ?? e.payPeriod,
|
|
177
|
+
alerts: a.payload.alert ? [...e.alerts ?? [], a.payload.alert] : e.alerts,
|
|
162
178
|
ctaConfig: {
|
|
163
179
|
labelKey: "exitFlowCta",
|
|
164
180
|
namespace: "Payroll.PayrollOverview"
|
|
@@ -166,52 +182,52 @@ const D = {
|
|
|
166
182
|
})
|
|
167
183
|
)
|
|
168
184
|
),
|
|
169
|
-
|
|
170
|
-
|
|
185
|
+
r(
|
|
186
|
+
t.RUN_PAYROLL_EMPLOYEE_EDIT,
|
|
171
187
|
"editEmployee",
|
|
172
|
-
|
|
173
|
-
(
|
|
174
|
-
...
|
|
175
|
-
firstName:
|
|
176
|
-
lastName:
|
|
177
|
-
startDate:
|
|
178
|
-
endDate:
|
|
188
|
+
o(
|
|
189
|
+
(e, a) => ({
|
|
190
|
+
...l("editEmployee", e, {
|
|
191
|
+
firstName: a.payload.firstName,
|
|
192
|
+
lastName: a.payload.lastName,
|
|
193
|
+
startDate: e.payPeriod?.startDate ?? "",
|
|
194
|
+
endDate: e.payPeriod?.endDate ?? ""
|
|
179
195
|
}),
|
|
180
196
|
progressBarType: "breadcrumbs",
|
|
181
|
-
component:
|
|
182
|
-
employeeId:
|
|
183
|
-
firstName:
|
|
184
|
-
lastName:
|
|
197
|
+
component: P,
|
|
198
|
+
employeeId: a.payload.employeeId,
|
|
199
|
+
firstName: a.payload.firstName,
|
|
200
|
+
lastName: a.payload.lastName,
|
|
185
201
|
ctaConfig: null
|
|
186
202
|
// This state does not have exit cta in breadcrumbs
|
|
187
203
|
})
|
|
188
204
|
)
|
|
189
205
|
),
|
|
190
|
-
|
|
191
|
-
|
|
206
|
+
r(
|
|
207
|
+
t.RUN_PAYROLL_BLOCKERS_VIEW_ALL,
|
|
192
208
|
"blockers",
|
|
193
|
-
|
|
194
|
-
(
|
|
195
|
-
...
|
|
196
|
-
component:
|
|
209
|
+
o(
|
|
210
|
+
(e, a) => ({
|
|
211
|
+
...l("blockers", e),
|
|
212
|
+
component: u
|
|
197
213
|
})
|
|
198
214
|
)
|
|
199
215
|
),
|
|
200
|
-
|
|
216
|
+
p
|
|
201
217
|
),
|
|
202
218
|
overview: i(
|
|
203
219
|
n("landing"),
|
|
204
220
|
n("configuration"),
|
|
205
|
-
|
|
206
|
-
|
|
221
|
+
r(
|
|
222
|
+
t.RUN_PAYROLL_EDIT,
|
|
207
223
|
"configuration",
|
|
208
|
-
|
|
209
|
-
(
|
|
210
|
-
...
|
|
211
|
-
startDate:
|
|
212
|
-
endDate:
|
|
224
|
+
o(
|
|
225
|
+
(e, a) => ({
|
|
226
|
+
...l("configuration", e, {
|
|
227
|
+
startDate: e.payPeriod?.startDate ?? "",
|
|
228
|
+
endDate: e.payPeriod?.endDate ?? ""
|
|
213
229
|
}),
|
|
214
|
-
component:
|
|
230
|
+
component: s,
|
|
215
231
|
alerts: void 0,
|
|
216
232
|
ctaConfig: {
|
|
217
233
|
labelKey: "exitFlowCta",
|
|
@@ -220,12 +236,27 @@ const D = {
|
|
|
220
236
|
})
|
|
221
237
|
)
|
|
222
238
|
),
|
|
223
|
-
|
|
224
|
-
|
|
239
|
+
r(
|
|
240
|
+
t.RUN_PAYROLL_PROCESSED,
|
|
241
|
+
"submittedOverview",
|
|
242
|
+
o((e) => ({
|
|
243
|
+
...l("submittedOverview", e, {
|
|
244
|
+
startDate: e.payPeriod?.startDate ?? "",
|
|
245
|
+
endDate: e.payPeriod?.endDate ?? ""
|
|
246
|
+
}),
|
|
247
|
+
component: y,
|
|
248
|
+
ctaConfig: {
|
|
249
|
+
labelKey: "exitFlowCta",
|
|
250
|
+
namespace: "Payroll.PayrollOverview"
|
|
251
|
+
}
|
|
252
|
+
}))
|
|
253
|
+
),
|
|
254
|
+
r(
|
|
255
|
+
t.RUN_PAYROLL_RECEIPT_GET,
|
|
225
256
|
"receipts",
|
|
226
|
-
|
|
257
|
+
o(
|
|
227
258
|
d({
|
|
228
|
-
component:
|
|
259
|
+
component: m,
|
|
229
260
|
progressBarType: "breadcrumbs",
|
|
230
261
|
alerts: void 0,
|
|
231
262
|
ctaConfig: {
|
|
@@ -235,10 +266,43 @@ const D = {
|
|
|
235
266
|
})
|
|
236
267
|
)
|
|
237
268
|
),
|
|
238
|
-
|
|
239
|
-
|
|
269
|
+
r(
|
|
270
|
+
t.RUN_PAYROLL_CANCELLED,
|
|
271
|
+
"landing",
|
|
272
|
+
o(
|
|
273
|
+
d({
|
|
274
|
+
component: c,
|
|
275
|
+
progressBarType: null,
|
|
276
|
+
alerts: void 0,
|
|
277
|
+
currentBreadcrumbId: "landing"
|
|
278
|
+
})
|
|
279
|
+
)
|
|
280
|
+
),
|
|
281
|
+
p
|
|
282
|
+
),
|
|
283
|
+
submittedOverview: i(
|
|
284
|
+
n("landing"),
|
|
285
|
+
r(
|
|
286
|
+
t.RUN_PAYROLL_RECEIPT_GET,
|
|
287
|
+
"submittedReceipts",
|
|
288
|
+
o((e) => ({
|
|
289
|
+
...l("submittedReceipts", e, {
|
|
290
|
+
startDate: e.payPeriod?.startDate ?? "",
|
|
291
|
+
endDate: e.payPeriod?.endDate ?? ""
|
|
292
|
+
}),
|
|
293
|
+
component: m,
|
|
294
|
+
progressBarType: "breadcrumbs",
|
|
295
|
+
alerts: void 0,
|
|
296
|
+
ctaConfig: {
|
|
297
|
+
labelKey: "exitFlowCta",
|
|
298
|
+
namespace: "Payroll.PayrollReceipts"
|
|
299
|
+
}
|
|
300
|
+
}))
|
|
301
|
+
),
|
|
302
|
+
r(
|
|
303
|
+
t.RUN_PAYROLL_CANCELLED,
|
|
240
304
|
"landing",
|
|
241
|
-
|
|
305
|
+
o(
|
|
242
306
|
d({
|
|
243
307
|
component: c,
|
|
244
308
|
progressBarType: null,
|
|
@@ -247,18 +311,22 @@ const D = {
|
|
|
247
311
|
})
|
|
248
312
|
)
|
|
249
313
|
),
|
|
250
|
-
|
|
314
|
+
p
|
|
315
|
+
),
|
|
316
|
+
submittedReceipts: i(
|
|
317
|
+
n("landing"),
|
|
318
|
+
p
|
|
251
319
|
),
|
|
252
320
|
editEmployee: i(
|
|
253
321
|
n("landing"),
|
|
254
322
|
n("configuration"),
|
|
255
|
-
|
|
256
|
-
|
|
323
|
+
r(
|
|
324
|
+
t.RUN_PAYROLL_EMPLOYEE_SAVED,
|
|
257
325
|
"configuration",
|
|
258
|
-
|
|
326
|
+
o(
|
|
259
327
|
d({
|
|
260
328
|
currentBreadcrumbId: "configuration",
|
|
261
|
-
component:
|
|
329
|
+
component: s,
|
|
262
330
|
employeeId: void 0,
|
|
263
331
|
firstName: void 0,
|
|
264
332
|
lastName: void 0,
|
|
@@ -269,13 +337,13 @@ const D = {
|
|
|
269
337
|
})
|
|
270
338
|
)
|
|
271
339
|
),
|
|
272
|
-
|
|
273
|
-
|
|
340
|
+
r(
|
|
341
|
+
t.RUN_PAYROLL_EMPLOYEE_CANCELLED,
|
|
274
342
|
"configuration",
|
|
275
|
-
|
|
343
|
+
o(
|
|
276
344
|
d({
|
|
277
345
|
currentBreadcrumbId: "configuration",
|
|
278
|
-
component:
|
|
346
|
+
component: s,
|
|
279
347
|
employeeId: void 0,
|
|
280
348
|
firstName: void 0,
|
|
281
349
|
lastName: void 0,
|
|
@@ -287,11 +355,11 @@ const D = {
|
|
|
287
355
|
)
|
|
288
356
|
)
|
|
289
357
|
),
|
|
290
|
-
receipts: i(n("landing"),
|
|
291
|
-
blockers: i(n("landing"),
|
|
358
|
+
receipts: i(n("landing"), p),
|
|
359
|
+
blockers: i(n("landing"), p)
|
|
292
360
|
};
|
|
293
361
|
export {
|
|
294
362
|
D as payrollFlowBreadcrumbsNodes,
|
|
295
|
-
|
|
363
|
+
f as payrollMachine
|
|
296
364
|
};
|
|
297
365
|
//# sourceMappingURL=payrollStateMachine.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payrollStateMachine.js","sources":["../../../../src/components/Payroll/PayrollFlow/payrollStateMachine.ts"],"sourcesContent":["import { transition, reduce, state } from 'robot3'\nimport type { PayrollPayPeriodType } from '@gusto/embedded-api/models/components/payrollpayperiodtype'\nimport type { PayrollFlowAlert } from './PayrollFlowComponents'\nimport {\n PayrollConfigurationContextual,\n PayrollOverviewContextual,\n PayrollEditEmployeeContextual,\n PayrollReceiptsContextual,\n PayrollBlockerContextual,\n type PayrollFlowContextInterface,\n PayrollLandingContextual,\n} from './PayrollFlowComponents'\nimport { componentEvents } from '@/shared/constants'\nimport type { MachineEventType, MachineTransition } from '@/types/Helpers'\nimport { updateBreadcrumbs } from '@/helpers/breadcrumbHelpers'\nimport type { BreadcrumbNodes } from '@/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes'\nimport { createBreadcrumbNavigateTransition } from '@/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers'\n\ntype EventPayloads = {\n [componentEvents.RUN_PAYROLL_SELECTED]: {\n payrollUuid: string\n payPeriod: PayrollPayPeriodType\n }\n [componentEvents.REVIEW_PAYROLL]: {\n payrollUuid: string\n payPeriod: PayrollPayPeriodType\n }\n [componentEvents.RUN_PAYROLL_EMPLOYEE_EDIT]: {\n employeeId: string\n firstName: string\n lastName: string\n }\n [componentEvents.RUN_PAYROLL_CALCULATED]: {\n payrollUuid: string\n alert?: PayrollFlowAlert\n payPeriod?: PayrollPayPeriodType\n }\n [componentEvents.BREADCRUMB_NAVIGATE]: {\n key: string\n onNavigate: (ctx: PayrollFlowContextInterface) => PayrollFlowContextInterface\n }\n [componentEvents.RUN_PAYROLL_BLOCKERS_VIEW_ALL]: undefined\n [componentEvents.RUN_PAYROLL_EDIT]: undefined\n}\n\nexport const payrollFlowBreadcrumbsNodes: BreadcrumbNodes = {\n landing: {\n parent: null,\n item: {\n id: 'landing',\n label: 'labels.breadcrumbLabel',\n namespace: 'Payroll.PayrollLanding',\n onNavigate: ((ctx: PayrollFlowContextInterface) => ({\n ...ctx,\n currentBreadcrumb: 'landing',\n progressBarType: null,\n component: PayrollLandingContextual,\n })) as (context: unknown) => unknown,\n },\n },\n configuration: {\n parent: 'landing',\n item: {\n id: 'configuration',\n label: 'breadcrumbLabel',\n namespace: 'Payroll.PayrollConfiguration',\n onNavigate: ((ctx: PayrollFlowContextInterface) => ({\n ...updateBreadcrumbs('configuration', ctx, {\n startDate: ctx.payPeriod?.startDate ?? '',\n endDate: ctx.payPeriod?.endDate ?? '',\n }),\n component: PayrollConfigurationContextual,\n alerts: undefined,\n })) as (context: unknown) => unknown,\n },\n },\n overview: {\n parent: 'configuration',\n item: {\n id: 'overview',\n label: 'breadcrumbLabel',\n namespace: 'Payroll.PayrollOverview',\n onNavigate: ((ctx: PayrollFlowContextInterface) => ({\n ...updateBreadcrumbs('overview', ctx, {\n startDate: ctx.payPeriod?.startDate ?? '',\n endDate: ctx.payPeriod?.endDate ?? '',\n }),\n component: PayrollOverviewContextual,\n alerts: undefined,\n })) as (context: unknown) => unknown,\n },\n },\n editEmployee: {\n parent: 'configuration',\n item: {\n id: 'editEmployee',\n label: 'breadcrumbLabel',\n namespace: 'Payroll.PayrollEditEmployee',\n },\n },\n receipts: {\n parent: 'overview',\n item: {\n id: 'receipts',\n label: 'breadcrumbLabel',\n namespace: 'Payroll.PayrollReceipts',\n },\n },\n blockers: {\n parent: 'landing',\n item: {\n id: 'blockers',\n label: 'breadcrumbLabel',\n namespace: 'Payroll.PayrollBlocker',\n },\n },\n} as const\n\nconst createReducer = (props: Partial<PayrollFlowContextInterface>) => {\n return (ctx: PayrollFlowContextInterface): PayrollFlowContextInterface => ({\n ...ctx,\n ...props,\n })\n}\n\nconst breadcrumbNavigateTransition =\n createBreadcrumbNavigateTransition<PayrollFlowContextInterface>()\n\nconst exitFlowTransition = transition(\n componentEvents.PAYROLL_EXIT_FLOW,\n 'landing',\n reduce(\n createReducer({\n component: PayrollLandingContextual,\n progressBarType: null,\n currentBreadcrumbId: 'landing',\n alerts: undefined,\n }),\n ),\n)\n\nexport const payrollMachine = {\n landing: state<MachineTransition>(\n transition(\n componentEvents.RUN_PAYROLL_SELECTED,\n 'configuration',\n reduce(\n (\n ctx: PayrollFlowContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.RUN_PAYROLL_SELECTED>,\n ): PayrollFlowContextInterface => {\n return {\n ...updateBreadcrumbs('configuration', ctx, {\n startDate: ev.payload.payPeriod.startDate ?? '',\n endDate: ev.payload.payPeriod.endDate ?? '',\n }),\n component: PayrollConfigurationContextual,\n payrollUuid: ev.payload.payrollUuid,\n payPeriod: ev.payload.payPeriod,\n progressBarType: 'breadcrumbs',\n ctaConfig: {\n labelKey: 'exitFlowCta',\n namespace: 'Payroll.PayrollConfiguration',\n },\n }\n },\n ),\n ),\n transition(\n componentEvents.REVIEW_PAYROLL,\n 'overview',\n reduce(\n (\n ctx: PayrollFlowContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.REVIEW_PAYROLL>,\n ): PayrollFlowContextInterface => {\n return {\n ...updateBreadcrumbs('overview', ctx, {\n startDate: ev.payload.payPeriod.startDate ?? '',\n endDate: ev.payload.payPeriod.endDate ?? '',\n }),\n component: PayrollOverviewContextual,\n payrollUuid: ev.payload.payrollUuid,\n payPeriod: ev.payload.payPeriod,\n progressBarType: 'breadcrumbs',\n ctaConfig: {\n labelKey: 'exitFlowCta',\n namespace: 'Payroll.PayrollOverview',\n },\n }\n },\n ),\n ),\n transition(\n componentEvents.RUN_PAYROLL_BLOCKERS_VIEW_ALL,\n 'blockers',\n reduce(\n createReducer({\n component: PayrollBlockerContextual,\n progressBarType: 'breadcrumbs',\n ctaConfig: {\n labelKey: 'exitFlowCta',\n namespace: 'Payroll.PayrollBlocker',\n },\n }),\n ),\n ),\n ),\n configuration: state<MachineTransition>(\n breadcrumbNavigateTransition('landing'),\n transition(\n componentEvents.RUN_PAYROLL_CALCULATED,\n 'overview',\n reduce(\n (\n ctx: PayrollFlowContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.RUN_PAYROLL_CALCULATED>,\n ): PayrollFlowContextInterface => {\n return {\n ...updateBreadcrumbs('overview', ctx, {\n startDate: ev.payload.payPeriod?.startDate ?? '',\n endDate: ev.payload.payPeriod?.endDate ?? '',\n }),\n component: PayrollOverviewContextual,\n payPeriod: ev.payload.payPeriod ?? ctx.payPeriod,\n alerts: ev.payload.alert ? [...(ctx.alerts ?? []), ev.payload.alert] : ctx.alerts,\n ctaConfig: {\n labelKey: 'exitFlowCta',\n namespace: 'Payroll.PayrollOverview',\n },\n }\n },\n ),\n ),\n transition(\n componentEvents.RUN_PAYROLL_EMPLOYEE_EDIT,\n 'editEmployee',\n reduce(\n (\n ctx: PayrollFlowContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.RUN_PAYROLL_EMPLOYEE_EDIT>,\n ): PayrollFlowContextInterface => {\n return {\n ...updateBreadcrumbs('editEmployee', ctx, {\n firstName: ev.payload.firstName,\n lastName: ev.payload.lastName,\n startDate: ctx.payPeriod?.startDate ?? '',\n endDate: ctx.payPeriod?.endDate ?? '',\n }),\n progressBarType: 'breadcrumbs',\n component: PayrollEditEmployeeContextual,\n employeeId: ev.payload.employeeId,\n firstName: ev.payload.firstName,\n lastName: ev.payload.lastName,\n ctaConfig: null, // This state does not have exit cta in breadcrumbs\n }\n },\n ),\n ),\n transition(\n componentEvents.RUN_PAYROLL_BLOCKERS_VIEW_ALL,\n 'blockers',\n reduce(\n (\n ctx: PayrollFlowContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.RUN_PAYROLL_BLOCKERS_VIEW_ALL>,\n ): PayrollFlowContextInterface => {\n return {\n ...updateBreadcrumbs('blockers', ctx),\n component: PayrollBlockerContextual,\n }\n },\n ),\n ),\n exitFlowTransition,\n ),\n overview: state<MachineTransition>(\n breadcrumbNavigateTransition('landing'),\n breadcrumbNavigateTransition('configuration'),\n transition(\n componentEvents.RUN_PAYROLL_EDIT,\n 'configuration',\n reduce(\n (\n ctx: PayrollFlowContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.RUN_PAYROLL_EDIT>,\n ): PayrollFlowContextInterface => {\n return {\n ...updateBreadcrumbs('configuration', ctx, {\n startDate: ctx.payPeriod?.startDate ?? '',\n endDate: ctx.payPeriod?.endDate ?? '',\n }),\n component: PayrollConfigurationContextual,\n alerts: undefined,\n ctaConfig: {\n labelKey: 'exitFlowCta',\n namespace: 'Payroll.PayrollConfiguration',\n },\n }\n },\n ),\n ),\n\n transition(\n componentEvents.RUN_PAYROLL_RECEIPT_GET,\n 'receipts',\n reduce(\n createReducer({\n component: PayrollReceiptsContextual,\n progressBarType: 'breadcrumbs',\n alerts: undefined,\n ctaConfig: {\n labelKey: 'exitFlowCta',\n namespace: 'Payroll.PayrollReceipts',\n },\n }),\n ),\n ),\n transition(\n componentEvents.RUN_PAYROLL_CANCELLED,\n 'landing',\n reduce(\n createReducer({\n component: PayrollLandingContextual,\n progressBarType: null,\n alerts: undefined,\n currentBreadcrumbId: 'landing',\n }),\n ),\n ),\n exitFlowTransition,\n ),\n editEmployee: state<MachineTransition>(\n breadcrumbNavigateTransition('landing'),\n breadcrumbNavigateTransition('configuration'),\n transition(\n componentEvents.RUN_PAYROLL_EMPLOYEE_SAVED,\n 'configuration',\n reduce(\n createReducer({\n currentBreadcrumbId: 'configuration',\n component: PayrollConfigurationContextual,\n employeeId: undefined,\n firstName: undefined,\n lastName: undefined,\n ctaConfig: {\n labelKey: 'exitFlowCta',\n namespace: 'Payroll.PayrollConfiguration',\n },\n }),\n ),\n ),\n transition(\n componentEvents.RUN_PAYROLL_EMPLOYEE_CANCELLED,\n 'configuration',\n reduce(\n createReducer({\n currentBreadcrumbId: 'configuration',\n component: PayrollConfigurationContextual,\n employeeId: undefined,\n firstName: undefined,\n lastName: undefined,\n ctaConfig: {\n labelKey: 'exitFlowCta',\n namespace: 'Payroll.PayrollConfiguration',\n },\n }),\n ),\n ),\n ),\n receipts: state<MachineTransition>(breadcrumbNavigateTransition('landing'), exitFlowTransition),\n blockers: state<MachineTransition>(breadcrumbNavigateTransition('landing'), exitFlowTransition),\n}\n"],"names":["payrollFlowBreadcrumbsNodes","ctx","PayrollLandingContextual","updateBreadcrumbs","PayrollConfigurationContextual","PayrollOverviewContextual","createReducer","props","breadcrumbNavigateTransition","createBreadcrumbNavigateTransition","exitFlowTransition","transition","componentEvents","reduce","payrollMachine","state","ev","PayrollBlockerContextual","PayrollEditEmployeeContextual","PayrollReceiptsContextual"],"mappings":";;;;;AA6CO,MAAMA,IAA+C;AAAA,EAC1D,SAAS;AAAA,IACP,QAAQ;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,WAAW;AAAA,MACX,aAAa,CAACC,OAAsC;AAAA,QAClD,GAAGA;AAAA,QACH,mBAAmB;AAAA,QACnB,iBAAiB;AAAA,QACjB,WAAWC;AAAA,MAAA;AAAA,IACb;AAAA,EACF;AAAA,EAEF,eAAe;AAAA,IACb,QAAQ;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,WAAW;AAAA,MACX,aAAa,CAACD,OAAsC;AAAA,QAClD,GAAGE,EAAkB,iBAAiBF,GAAK;AAA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UAAU;AAAA,UACV,WAAW;AAAA,YACT,UAAU;AAAA,YACV,WAAW;AAAA,UAAA;AAAA,QACb,CACD;AAAA,MAAA;AAAA,IACH;AAAA,EACF;AAAA,EAEF,UAAUW,EAAyBP,EAA6B,SAAS,GAAGE,CAAkB;AAAA,EAC9F,UAAUK,EAAyBP,EAA6B,SAAS,GAAGE,CAAkB;AAChG;"}
|
|
1
|
+
{"version":3,"file":"payrollStateMachine.js","sources":["../../../../src/components/Payroll/PayrollFlow/payrollStateMachine.ts"],"sourcesContent":["import { transition, reduce, state } from 'robot3'\nimport type { PayrollPayPeriodType } from '@gusto/embedded-api/models/components/payrollpayperiodtype'\nimport type { PayrollFlowAlert } from './PayrollFlowComponents'\nimport {\n PayrollConfigurationContextual,\n PayrollOverviewContextual,\n PayrollEditEmployeeContextual,\n PayrollReceiptsContextual,\n PayrollBlockerContextual,\n type PayrollFlowContextInterface,\n PayrollLandingContextual,\n} from './PayrollFlowComponents'\nimport { componentEvents } from '@/shared/constants'\nimport type { MachineEventType, MachineTransition } from '@/types/Helpers'\nimport { updateBreadcrumbs } from '@/helpers/breadcrumbHelpers'\nimport type { BreadcrumbNodes } from '@/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes'\nimport { createBreadcrumbNavigateTransition } from '@/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers'\n\ntype EventPayloads = {\n [componentEvents.RUN_PAYROLL_SELECTED]: {\n payrollUuid: string\n payPeriod: PayrollPayPeriodType\n }\n [componentEvents.REVIEW_PAYROLL]: {\n payrollUuid: string\n payPeriod: PayrollPayPeriodType\n }\n [componentEvents.RUN_PAYROLL_EMPLOYEE_EDIT]: {\n employeeId: string\n firstName: string\n lastName: string\n }\n [componentEvents.RUN_PAYROLL_CALCULATED]: {\n payrollUuid: string\n alert?: PayrollFlowAlert\n payPeriod?: PayrollPayPeriodType\n }\n [componentEvents.BREADCRUMB_NAVIGATE]: {\n key: string\n onNavigate: (ctx: PayrollFlowContextInterface) => PayrollFlowContextInterface\n }\n [componentEvents.RUN_PAYROLL_BLOCKERS_VIEW_ALL]: undefined\n [componentEvents.RUN_PAYROLL_EDIT]: undefined\n}\n\nexport const payrollFlowBreadcrumbsNodes: BreadcrumbNodes = {\n landing: {\n parent: null,\n item: {\n id: 'landing',\n label: 'breadcrumbs.landing',\n namespace: 'Payroll.PayrollLanding',\n onNavigate: ((ctx: PayrollFlowContextInterface) => ({\n ...ctx,\n currentBreadcrumb: 'landing',\n progressBarType: null,\n component: PayrollLandingContextual,\n })) as (context: unknown) => unknown,\n },\n },\n configuration: {\n parent: 'landing',\n item: {\n id: 'configuration',\n label: 'breadcrumbLabel',\n namespace: 'Payroll.PayrollConfiguration',\n onNavigate: ((ctx: PayrollFlowContextInterface) => ({\n ...updateBreadcrumbs('configuration', ctx, {\n startDate: ctx.payPeriod?.startDate ?? '',\n endDate: ctx.payPeriod?.endDate ?? '',\n }),\n component: PayrollConfigurationContextual,\n alerts: undefined,\n })) as (context: unknown) => unknown,\n },\n },\n overview: {\n parent: 'configuration',\n item: {\n id: 'overview',\n label: 'breadcrumbLabel',\n namespace: 'Payroll.PayrollOverview',\n onNavigate: ((ctx: PayrollFlowContextInterface) => ({\n ...updateBreadcrumbs('overview', ctx, {\n startDate: ctx.payPeriod?.startDate ?? '',\n endDate: ctx.payPeriod?.endDate ?? '',\n }),\n component: PayrollOverviewContextual,\n alerts: undefined,\n })) as (context: unknown) => unknown,\n },\n },\n submittedOverview: {\n parent: 'landing',\n item: {\n id: 'submittedOverview',\n label: 'breadcrumbs.overview',\n namespace: 'Payroll.PayrollLanding',\n },\n },\n editEmployee: {\n parent: 'configuration',\n item: {\n id: 'editEmployee',\n label: 'breadcrumbLabel',\n namespace: 'Payroll.PayrollEditEmployee',\n },\n },\n receipts: {\n parent: 'overview',\n item: {\n id: 'receipts',\n label: 'breadcrumbLabel',\n namespace: 'Payroll.PayrollReceipts',\n },\n },\n submittedReceipts: {\n parent: 'landing',\n item: {\n id: 'submittedReceipts',\n label: 'breadcrumbs.receipt',\n namespace: 'Payroll.PayrollLanding',\n },\n },\n blockers: {\n parent: 'landing',\n item: {\n id: 'blockers',\n label: 'breadcrumbLabel',\n namespace: 'Payroll.PayrollBlocker',\n },\n },\n} as const\n\nconst createReducer = (props: Partial<PayrollFlowContextInterface>) => {\n return (ctx: PayrollFlowContextInterface): PayrollFlowContextInterface => ({\n ...ctx,\n ...props,\n })\n}\n\nconst breadcrumbNavigateTransition =\n createBreadcrumbNavigateTransition<PayrollFlowContextInterface>()\n\nconst exitFlowTransition = transition(\n componentEvents.PAYROLL_EXIT_FLOW,\n 'landing',\n reduce(\n createReducer({\n component: PayrollLandingContextual,\n progressBarType: null,\n currentBreadcrumbId: 'landing',\n alerts: undefined,\n }),\n ),\n)\n\nexport const payrollMachine = {\n landing: state<MachineTransition>(\n transition(\n componentEvents.RUN_PAYROLL_SELECTED,\n 'configuration',\n reduce(\n (\n ctx: PayrollFlowContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.RUN_PAYROLL_SELECTED>,\n ): PayrollFlowContextInterface => {\n return {\n ...updateBreadcrumbs('configuration', ctx, {\n startDate: ev.payload.payPeriod.startDate ?? '',\n endDate: ev.payload.payPeriod.endDate ?? '',\n }),\n component: PayrollConfigurationContextual,\n payrollUuid: ev.payload.payrollUuid,\n payPeriod: ev.payload.payPeriod,\n progressBarType: 'breadcrumbs',\n ctaConfig: {\n labelKey: 'exitFlowCta',\n namespace: 'Payroll.PayrollConfiguration',\n },\n }\n },\n ),\n ),\n transition(\n componentEvents.REVIEW_PAYROLL,\n 'overview',\n reduce(\n (\n ctx: PayrollFlowContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.REVIEW_PAYROLL>,\n ): PayrollFlowContextInterface => {\n return {\n ...updateBreadcrumbs('overview', ctx, {\n startDate: ev.payload.payPeriod.startDate ?? '',\n endDate: ev.payload.payPeriod.endDate ?? '',\n }),\n component: PayrollOverviewContextual,\n payrollUuid: ev.payload.payrollUuid,\n payPeriod: ev.payload.payPeriod,\n progressBarType: 'breadcrumbs',\n ctaConfig: {\n labelKey: 'exitFlowCta',\n namespace: 'Payroll.PayrollOverview',\n },\n }\n },\n ),\n ),\n transition(\n componentEvents.RUN_PAYROLL_BLOCKERS_VIEW_ALL,\n 'blockers',\n reduce(\n createReducer({\n component: PayrollBlockerContextual,\n progressBarType: 'breadcrumbs',\n ctaConfig: {\n labelKey: 'exitFlowCta',\n namespace: 'Payroll.PayrollBlocker',\n },\n }),\n ),\n ),\n ),\n configuration: state<MachineTransition>(\n breadcrumbNavigateTransition('landing'),\n transition(\n componentEvents.RUN_PAYROLL_CALCULATED,\n 'overview',\n reduce(\n (\n ctx: PayrollFlowContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.RUN_PAYROLL_CALCULATED>,\n ): PayrollFlowContextInterface => {\n return {\n ...updateBreadcrumbs('overview', ctx, {\n startDate: ev.payload.payPeriod?.startDate ?? '',\n endDate: ev.payload.payPeriod?.endDate ?? '',\n }),\n component: PayrollOverviewContextual,\n payPeriod: ev.payload.payPeriod ?? ctx.payPeriod,\n alerts: ev.payload.alert ? [...(ctx.alerts ?? []), ev.payload.alert] : ctx.alerts,\n ctaConfig: {\n labelKey: 'exitFlowCta',\n namespace: 'Payroll.PayrollOverview',\n },\n }\n },\n ),\n ),\n transition(\n componentEvents.RUN_PAYROLL_EMPLOYEE_EDIT,\n 'editEmployee',\n reduce(\n (\n ctx: PayrollFlowContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.RUN_PAYROLL_EMPLOYEE_EDIT>,\n ): PayrollFlowContextInterface => {\n return {\n ...updateBreadcrumbs('editEmployee', ctx, {\n firstName: ev.payload.firstName,\n lastName: ev.payload.lastName,\n startDate: ctx.payPeriod?.startDate ?? '',\n endDate: ctx.payPeriod?.endDate ?? '',\n }),\n progressBarType: 'breadcrumbs',\n component: PayrollEditEmployeeContextual,\n employeeId: ev.payload.employeeId,\n firstName: ev.payload.firstName,\n lastName: ev.payload.lastName,\n ctaConfig: null, // This state does not have exit cta in breadcrumbs\n }\n },\n ),\n ),\n transition(\n componentEvents.RUN_PAYROLL_BLOCKERS_VIEW_ALL,\n 'blockers',\n reduce(\n (\n ctx: PayrollFlowContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.RUN_PAYROLL_BLOCKERS_VIEW_ALL>,\n ): PayrollFlowContextInterface => {\n return {\n ...updateBreadcrumbs('blockers', ctx),\n component: PayrollBlockerContextual,\n }\n },\n ),\n ),\n exitFlowTransition,\n ),\n overview: state<MachineTransition>(\n breadcrumbNavigateTransition('landing'),\n breadcrumbNavigateTransition('configuration'),\n transition(\n componentEvents.RUN_PAYROLL_EDIT,\n 'configuration',\n reduce(\n (\n ctx: PayrollFlowContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.RUN_PAYROLL_EDIT>,\n ): PayrollFlowContextInterface => {\n return {\n ...updateBreadcrumbs('configuration', ctx, {\n startDate: ctx.payPeriod?.startDate ?? '',\n endDate: ctx.payPeriod?.endDate ?? '',\n }),\n component: PayrollConfigurationContextual,\n alerts: undefined,\n ctaConfig: {\n labelKey: 'exitFlowCta',\n namespace: 'Payroll.PayrollConfiguration',\n },\n }\n },\n ),\n ),\n transition(\n componentEvents.RUN_PAYROLL_PROCESSED,\n 'submittedOverview',\n reduce((ctx: PayrollFlowContextInterface): PayrollFlowContextInterface => {\n return {\n ...updateBreadcrumbs('submittedOverview', ctx, {\n startDate: ctx.payPeriod?.startDate ?? '',\n endDate: ctx.payPeriod?.endDate ?? '',\n }),\n component: PayrollOverviewContextual,\n ctaConfig: {\n labelKey: 'exitFlowCta',\n namespace: 'Payroll.PayrollOverview',\n },\n }\n }),\n ),\n transition(\n componentEvents.RUN_PAYROLL_RECEIPT_GET,\n 'receipts',\n reduce(\n createReducer({\n component: PayrollReceiptsContextual,\n progressBarType: 'breadcrumbs',\n alerts: undefined,\n ctaConfig: {\n labelKey: 'exitFlowCta',\n namespace: 'Payroll.PayrollReceipts',\n },\n }),\n ),\n ),\n transition(\n componentEvents.RUN_PAYROLL_CANCELLED,\n 'landing',\n reduce(\n createReducer({\n component: PayrollLandingContextual,\n progressBarType: null,\n alerts: undefined,\n currentBreadcrumbId: 'landing',\n }),\n ),\n ),\n exitFlowTransition,\n ),\n submittedOverview: state<MachineTransition>(\n breadcrumbNavigateTransition('landing'),\n transition(\n componentEvents.RUN_PAYROLL_RECEIPT_GET,\n 'submittedReceipts',\n reduce((ctx: PayrollFlowContextInterface): PayrollFlowContextInterface => {\n return {\n ...updateBreadcrumbs('submittedReceipts', ctx, {\n startDate: ctx.payPeriod?.startDate ?? '',\n endDate: ctx.payPeriod?.endDate ?? '',\n }),\n component: PayrollReceiptsContextual,\n progressBarType: 'breadcrumbs',\n alerts: undefined,\n ctaConfig: {\n labelKey: 'exitFlowCta',\n namespace: 'Payroll.PayrollReceipts',\n },\n }\n }),\n ),\n transition(\n componentEvents.RUN_PAYROLL_CANCELLED,\n 'landing',\n reduce(\n createReducer({\n component: PayrollLandingContextual,\n progressBarType: null,\n alerts: undefined,\n currentBreadcrumbId: 'landing',\n }),\n ),\n ),\n exitFlowTransition,\n ),\n submittedReceipts: state<MachineTransition>(\n breadcrumbNavigateTransition('landing'),\n exitFlowTransition,\n ),\n editEmployee: state<MachineTransition>(\n breadcrumbNavigateTransition('landing'),\n breadcrumbNavigateTransition('configuration'),\n transition(\n componentEvents.RUN_PAYROLL_EMPLOYEE_SAVED,\n 'configuration',\n reduce(\n createReducer({\n currentBreadcrumbId: 'configuration',\n component: PayrollConfigurationContextual,\n employeeId: undefined,\n firstName: undefined,\n lastName: undefined,\n ctaConfig: {\n labelKey: 'exitFlowCta',\n namespace: 'Payroll.PayrollConfiguration',\n },\n }),\n ),\n ),\n transition(\n componentEvents.RUN_PAYROLL_EMPLOYEE_CANCELLED,\n 'configuration',\n reduce(\n createReducer({\n currentBreadcrumbId: 'configuration',\n component: PayrollConfigurationContextual,\n employeeId: undefined,\n firstName: undefined,\n lastName: undefined,\n ctaConfig: {\n labelKey: 'exitFlowCta',\n namespace: 'Payroll.PayrollConfiguration',\n },\n }),\n ),\n ),\n ),\n receipts: state<MachineTransition>(breadcrumbNavigateTransition('landing'), exitFlowTransition),\n blockers: state<MachineTransition>(breadcrumbNavigateTransition('landing'), exitFlowTransition),\n}\n"],"names":["payrollFlowBreadcrumbsNodes","ctx","PayrollLandingContextual","updateBreadcrumbs","PayrollConfigurationContextual","PayrollOverviewContextual","createReducer","props","breadcrumbNavigateTransition","createBreadcrumbNavigateTransition","exitFlowTransition","transition","componentEvents","reduce","payrollMachine","state","ev","PayrollBlockerContextual","PayrollEditEmployeeContextual","PayrollReceiptsContextual"],"mappings":";;;;;AA6CO,MAAMA,IAA+C;AAAA,EAC1D,SAAS;AAAA,IACP,QAAQ;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,WAAW;AAAA,MACX,aAAa,CAACC,OAAsC;AAAA,QAClD,GAAGA;AAAA,QACH,mBAAmB;AAAA,QACnB,iBAAiB;AAAA,QACjB,WAAWC;AAAA,MAAA;AAAA,IACb;AAAA,EACF;AAAA,EAEF,eAAe;AAAA,IACb,QAAQ;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,WAAW;AAAA,MACX,aAAa,CAACD,OAAsC;AAAA,QAClD,GAAGE,EAAkB,iBAAiBF,GAAK;AAAA,UACzC,WAAWA,EAAI,WAAW,aAAa;AAAA,UACvC,SAASA,EAAI,WAAW,WAAW;AAAA,QAAA,CACpC;AAAA,QACD,WAAWG;AAAA,QACX,QAAQ;AAAA,MAAA;AAAA,IACV;AAAA,EACF;AAAA,EAEF,UAAU;AAAA,IACR,QAAQ;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,WAAW;AAAA,MACX,aAAa,CAACH,OAAsC;AAAA,QAClD,GAAGE,EAAkB,YAAYF,GAAK;AAAA,UACp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